[Scummvm-git-logs] scummvm master -> a48534f32a23bb41af61d644f5f03d043e01f5b8

dreammaster noreply at scummvm.org
Fri Mar 4 02:48:26 UTC 2022


This automated email contains information about 709 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1931420cf0 CHEWY: Removal current engine (almost fully)
165ea7c29f CHEWY: Initial commit
652db4113f CHEWY: Have error method trigger ScummVM error
b655cd5a3f CHEWY: Fix relative engine paths
996e0ebcd5 CHEWY: Convert get_tafinfo to use ScummVM File
507538a6a4 CHEWY: Fix compiler warnings
a417d3e23a CHEWY: Convert char * pointers to byte *
006ee720de CHEWY: Added Chewy namespace back in
09dfd05932 CHEWY: Convert typedef structs to structs
e8dd257178 CHEWY: Adding load methods to ngstypes structures
598ab91667 CHEWY: Create C file replacement methods to use ScummVM files
fb218ee72b CHEWY: Remove deprecated correct_fname method
ce023c14d2 CHEWY: Converting palette & taf loading
1ec342053f CHEWY: Converting palette & taf loading
8768d044a0 CHEWY: Fix taf_info image field
cf136f9e6d CHEWY: Cleanups for remainder of load_full_taf
6a29bc654b CHEWY: Cleanup of load_korrektur
d7ff6e3a2a CHEWY: Cleanup of size method
be8ff3bcb2 CHEWY: Cleaned up file loading
7482a64ed0 CHEWY: Fix initialization order
a7fee5e2ec CHEWY: Fixed first variation of objekt::load
c8b4256d81 CHEWY: Increase some limits to match original
18ff18fec8 CHEWY: Fix other two objectk::load variants
e8e4bedd93 CHEWY: Cleanup of new_game method
6052fedf42 CHEWY: Cleanup and fixes for memory pool methods
8f3cf5084d CHEWY: Implement fcopy method
349cfff2b9 CHEWY: Open up the adsh.tmp file as a memory stream
5629ceffdc CHEWY: Cleanup of set_handle
4973182698 CHEWY: Creating load method for room_detail_info
4a3d4a767e CHEWY: Fix room_detail_info size and loading
fa5d4e73da CHEWY: Fixed detail load_sprite_pointer method
77630f35cb CHEWY: Update detail load_taf_seq method
7beae7f591 CHEWY: Update load_image method
584e269a97 CHEWY: Minor cleanups
0a22abac9a CHEWY: Implemented gedclass class
76b73a25e3 CHEWY: Cleanup of datei::imsize
297716f3ac CHEWY: Cleanup of datei::load_tafmcga
f47b011863 CHEWY: Cleanup of atdsys::load_atds
b9fc77462b CHEWY: Further loading cleanup
66ba9cd104 CHEWY: Remove common/textconsole.h from chewy.h
04536d7216 CHEWY: Add screen surface to ChewyEngine
f29ed7a5e6 CHEWY: Split mcga_grafik class into it's own file
02280116ab CHEWY: Shift standalone methods into mcga.cpp
d85b399064 CHEWY: Implementing mcga methods
e869c55993 CHEWY: Move some variables from mcga to mcga_grafik
626fbbc48e CHEWY: More mcga method implementations
fb37d95f4e CHEWY: Added mcga screen copying methods
25e61f766d CHEWY: Added mcga sprite methods
81d2f77d63 CHEWY: More sprite drawing code
fba13ed0f7 CHEWY: Added events manager class
a8eee11ce8 CHEWY: Added a base class for the EventsManager
436b0cd454 CHEWY: Shift life_line timer to EventsManager
3def51a841 CHEWY: Moved timer handler to EventsManager, life_line unused
0531bd59b3 CHEWY: Minor mouse/rendering cleanup
62671f9bf2 CHEWY: Properly translate palettes when setting them
c3a5c09315 CHEWY: Start of MainMenu class, clean up load_tmf methods
f3b3b9aeec CHEWY: Added File methods for opening files and reading uint16 arrays
7ac1c991ec CHEWY: Cleanup of flic class
3dcdb41b9d CHEWY: Further flic class cleanup
fe6c1ceecb CHEWY: Implemented decode_rle method
8d5a394c51 CHEWY: Fixes for flic playback frame display
910e18aad1 CHEWY: Implemented decode_flc method
2be255fa9c CHEWY: Adding extra fields & flags to Spieler structure
4fab30ef83 CHEWY: Added effect::border method
12ca6ba57e CHEWY: Implementing more main menu code
77577bc5c1 CHEWY: Main menu is now displaying
7dc3106ec7 CHEWY: Implemented mouse cursor show
52df062e9f CHEWY: Implement cursor movement
ffd5d06a2f CHEWY: Removal of ununused method declarations
1a93c1286d CHEWY: Implementing character draw routines
f017f1eeb2 CHEWY: Fixing atdsys block search, some header casts to use load functions
c256d09773 CHEWY: Change ats_search_str to match release
34faad99d6 CHEWY: Fix ttf_header loading in set_fontadr
d769ccfd04 CHEWY: Implement missing font loading
5219ff6bbe CHEWY: Fixes for displaying on-screen text
e5d7aeb6df CHEWY: Start implementing main menu options, flic parsing fix
a8fd1ce5a7 CHEWY: Implement delay mehtod
7e09c6ff4a CHEWY: More main menu implementation
8849afe9a6 CHEWY: Adding a TempFiles class for better simulating temporary files
03ec59bbc6 COMMON: Implement MemoryReadWriteStream::seek
0606370aa4 CHEWY: Fix incorrect atdsys stream closing
c4a7b806de CHEWY: Add missing code to new_game
41a4c720e4 CHEWY: Shutdown fixes, cutscene breaks on should quit
63f0f346e3 CHEWY: Janitorial
2ce77320d5 CHEWY: Setting up keyboard event handler
17a736e848 CHEWY: Setting up scancodes to use Common::KeyCode
ff05313cc2 CHEWY: Show intro first time game runs
394b6d1b13 CHEWY: Update room 0 methods
bedbaa19ad CHEWY: Remove redundant timer_flag
4bca85fab6 CHEWY: Add sound initialization, room sounds loading
b031fb4498 CHEWY: Create class for room 0 methods
c30ce2d39f CHEWY: Hooking up room 0 actions to ats_action
7c5984f99c CHEWY: Updating atdsys print methods
9791b38fc2 CHEWY: Remove debug timer code
9cf8a5411a CHEWY: Update timer_action
36b4b2c1b7 CHEWY: Implement Spieler synchronization for savegames
264835e44a CHEWY: Shifting saving/loading code into engine class
c7a89d1c0a CHEWY: Only allow GMM saving/loading from main game loop
b35bf9635d CHEWY: ADSH footer isn't needed for ScummVM savegames
268d19618a CHEWY: Fixes for Spieler flags
ea96f96b4c CHEWY: Add missing set_display call
de9a09740c CHEWY: Hooking up speech playback
9d8a35cdc0 CHEWY: Further VOC playback implementation
7e81b86414 CHEWY: Timer methods cleanup
056a476875 CHEWY: Add missing if check to Room0::entry
21867e4b86 CHEWY: Janitorial
3164ffa1c2 CHEWY: Fix room 0 start timer action
c4af358995 CHEWY: Fix speech playback
6d67d66b9e CHEWY: Added SHOULD_QUIT checks to while loops
05efb84c4c CHEWY: Updates to set_up_screen
e5d10a655b CHEWY: Set BLENDE4 blend mode after showing file menu
cbb2574097 CHEWY: Change fx_blende to an enum
a7013366d0 CHEWY: Janitorial
b7e31a7e97 CHEWY: Fix talk character animation
12e1bf8a0e CHEWY: Endian fix for loading sprite correction offsets
dcf496fba9 CHEWY: Implementing zoom_set method
431ac4d685 CHEWY: zoom_set is rendering more properly
443766f348 CHEWY: Add support for mouse wheel to cycle cursors
cedbdda240 CHEWY: Temporarily disable room 0 entry speech
2381c1ab76 CHEWY: Further fix for action menu
cdc8bc4e58 CHEWY: Respect the ScummVM speech/subtitle setting
edfa9309b2 CHEWY: Rename room 0 action1 to getPillow
5c44229c04 CHEWY: Fix finishing room 0 action2
be163111ae CHEWY: Fix option_icons array values
786b5927ff CHEWY: Don't reset mouse buttons on mouse move
4e541a57fc CHEWY: Rename room 0 action2 to pullSlime
31f8c60cd9 CHEWY: Save & Inventory cursors were swapped in release game
6d618f0811 CHEWY: Updates to inventory menu
50634a53cd CHEWY: Change the structure SIZE() methods to return int
de5c27661a CHEWY: Refactoring reading
5dcf70d571 CHEWY: Converting more data loading
276e83ffee CHEWY: Fix drawing boxes and lines
62be47a690 CHEWY: Don't keep creating temporary surfaces to wrap screenP
382cc1a384 CHEWY: Fix extern array sizes
13dbb6cc84 CHEWY: Constifying some arrays
6c54fa031b CHEWY: Start of Globals class
d312df2813 CHEWY: Fix shadowed warning
5936ed19b0 CHEWY: Move Spieler instance to new Globals
569f5ded9c CHEWY: Fix GMM loading of savegames
85bb040f4b CHEWY: Refactor use of rand() function
f834a50aaf CHEWY: Allow loading game on startup
cfc9a018f7 CHEWY: Basic debugger added
ef0512a920 CHEWY: In-progress fleshing out ats_action
657a41ad35 CHEWY: Finished implementing ats_action
568de6434c CHEWY: Add missing case from ads_ende
1e894a58a5 CHEWY: Added missing calc_inv_use_txt content
10e78324ca CHEWY: Added changes to calc_inv_no_use
e007f9076d CHEWY: Added changes to calc_person_txt
9cff82bce4 CHEWY: Added changes to calc_person_click
f38cd362aa CHEWY: Added changes to calc_person_dia
d592ee654a CHEWY: Added changes to go_auto_xy
3308aeb9bd CHEWY: Added changes to play_scene_ani
2503249cf1 CHEWY: Added changes to check_ged_action
a74d1a1a17 CHEWY: Added changes to ged_user_func
d800fbc471 CHEWY: Added changes to enter_room
4d20cd66db CHEWY: Added changes to exit_room
b3786f3464 CHEWY: Added changes to sib_event_inv method
3eddc2c2f3 CHEWY: Added changes to sib_event_no_inv method
3702a38c39 CHEWY: Implementing flic_cut method
53c006cbf5 CHEWY: Further work on flic_cut
7501ed6223 CHEWY: More flic_cut implementation
70b2375f01 CHEWY: Finished implementing flic_cut
6731756dde CHEWY: Janitorial
65cd7c1da9 CHEWY: gcc compilation fixes
3deb7e2396 CHEWY: Changing calloc calls to malloc
e9867bbfde CHEWY: Fix gcc warnings
f25d952802 CHEWY: Further gcc warning fix
ddd0c298f4 CHEWY: Change mallocs to a wrapper that initializes the memory
81991ab9e3 CHEWY: Fix dereferencing null pointer
e2400e81fb CHEWY: Change structures from using variable length arrays
b772628e9c CHEWY: Further startup initialization
aff7ddf3e7 CHEWY: Fix memory leak
00f202c456 CHEWY: Constifying source arrays in palette calls
90df5000e6 CHEWY: Fix updating palette for shadows handling
d7eda3abfe CHEWY: Janitorial
647932d865 CHEWY: Move vec_tbl to a field of movclass
7447e9f360 CHEWY: Fix the array index formula for checking walkable areas
2d4bab1be0 CHEWY: Fix using monacle on book within inventory
78144eeae4 CHEWY: Split up Room0 class into it's own file
4b4487c7c6 CHEWY: Starting to cleanup eye animations
81b17afa4d CHEWY: Update headers to GPL3
2de8ff17f6 CHEWY: Update credits.pl
80f3a2670b CHEWY: Moved room 0 timer actions into Room0 class
30ff675e46 CHEWY: Clear mouse click when starting game from main menu
633d1af934 CHEWY: Change ende from int16 to bool in Room0
9ae2ed3119 CHEWY: More room 0 cleanups
c3a90f6672 CHEWY: Fix loading of animation frame offset corrections
834c15c351 CHEWY: Re-enable room 0 start sequence
533a97f4af CHEWY: Room 0 method renamings
32f2bbaa9f CHEWY: Adding quit checks to room 0 loops
cc3969d7a8 CHEWY: Fix cursor freezing as feeder tube appears
a6b1b4ef97 CHEWY: Fix palette updates in cutscenes
465f9fb731 CHEWY: Add debugger item command
a0c4642788 CHEWY: Added extra should quit checks
10faec434f CHEWY: Move ANI defines to room.h
1dc023c837 CHEWY: Added Room2 class
05e4f0f527 CHEWY: Added Room3 and Room4 classes
5d41b24636 CHEWY: Split up episode1.cpp methods into Room classes
116c098430 CHEWY: Update some static arrays for release
2564539e71 CHEWY: Move room 2 cutscene into Room2 class
81b502ff7e CHEWY: Move room 1 specific code to a new Room1 class
dbc8459a85 CHEWY: Make various room data arrays static const
4046eefed4 CHEWY: Split episode2.cpp into separate room classes
367e8ae795 CHEWY: Split episode3.cpp into separate room classes
19f2d98f6f CHEWY: Split episode4.cpp into separate room classes
d151497b53 CHEWY: Split episode5.cpp into separate room classes
f3797cb558 CHEWY: Remove deprecated episode files
2bba407db0 CHEWY: Merge roomdefs into room
af6d8fcc32 CHEWY: Add further credits
ed2fb0e96f CHEWY: Added event handling to stop File Menu from freezing
5497f41b0c CHEWY: Implement getch to allow quitting via File Menu
6fb3f94bd0 CHEWY: Implement loading of savegame list in in-game file menu
c38a71dd1e CHEWY: Janitorial cleanup of array square bracket usage
32edbec7c4 CHEWY: Fix loading games from in-game file menu
9d8f37500d CHEWY: Fix compiler warning
b54c5b9c2a CHEWY: Cleanups whilst investigating mid-cutscene interaction enablement
689ccc89f1 CHEWY: Further add to credits
1ec8c82c79 CHEWY: Create room entry methods for code from enter_room
f51dceab6d CHEWY: Move room-specific code in timer_action to individual Room classes
2c2110e663 CHEWY: Room 5 fixes
35abb49d91 CHEWY: Cleanup of PersonHide as numeric
72a3bc49d6 CHEWY: Room 6 fixes
2d92e881b1 CHEWY: Fix changed total count before vending machine in room 6
43a8e31f71 CHEWY: Fix drawing zoomed sprites
eccadf13b7 CHEWY: Fixed sib_event_inv switch cases
bec6ffccc6 CHEWY: Move ablock25 to a const array in room7.cpp
b2696fa0ae CHEWY: Fix playback of flic animations
84b1e2bd92 CHEWY: Fixes for room 8
48d63328f6 CHEWY: Fix special strings that suppress display
39093215d0 CHEWY: Cleanup look_invent_screen method
06b8291cd5 CHEWY: fix a compilation error on VS2019
271963714a CHEWY: Extra initialization of atds fields
6532dc7e7d CHEWY: Fix timer_action switch block
3506f54a31 CHEWY: Fix some little things noticed while progressing on the implementation of room 97
9b394584a0 CHEWY: use constant in some uses of start_spz
31834e9267 CHEWY: Some more progress in room 97, recheck parameters of start_detail_wait and set_person_pos
8dc3e50c8a CHEWY: Implement room 97 proc3 & 4, use enum in some calls of auto_move
109d8f49aa CHEWY: Implementing loading and saving dialogue data to savegames
39698fa76d CHEWY: Room 97 compilation fix
54038a3872 CHEWY: Fix writing dialogue state updates after talk finishes
932541bf90 CHEWY: Fix using bucket in room 8
6b6a0b74ee CHEWY: For implementation consistency, move R97 variables to spieler
f62bd8337f CHEWY: Implement room 97 proc 5 and 6, use some enum values in some other function calls
ecf76678db CHEWY: Implement room 97 proc 7 to 10, use enums in various places where cursors are involved
f6ca439746 CHEWY: Implement room 97 proc 11 to 15
6bf43bf310 CHEWY: Add release changes to calc_maus_txt
a04d401e74 CHEWY: Add stop check to atdsys::start_ats
fa1241bc9d CHEWY: Room 97 compilation fix
37ca369e9d CHEWY: Fix TAP_OFF constants for release game
31ba5c39ed CHEWY: Finish the implementation of room 97
aaf0f7a1ad CHEWY: Remove useless include in room97
4e916c18f9 CHEWY: Implement Room 96
3c21841ffc CHEWY: Implement room 95
195460a70a CHEWY: Room 9 logic changes
e033708570 CHEWY: Room 10 logic fixes
86fe2ac6ba CHEWY: Room 22 logic fixes
61ae48aca1 CHEWY: Room 11 logic fixes
73023392be CHEWY: Move ablock static arrays to the room files that use them
9b27647ed1 CHEWY: Move room-specific check_ged_action code to Room classes
47287f10b0 CHEWY: Room 12 logic fixes
edd29fc4cb CHEWY: Room 13 logic fixes
8bd5f104f6 CHEWY: Implement room 94
936a520e12 CHEWY: Room 14 logic fixes
4211ee5a79 CHEWY: Implement Room 93
606322e91b CHEWY: Implement Room 92
6189a361c6 CHEWY: Implement room 91
5356ee1976 CHEWY: Room 16 logic fixes
f41256a82d CHEWY: Room 17 logic fixes
9973c7e812 CHEWY: Room 18 logic fixes
d05326b884 CHEWY: Room 21 logic fixes
d241e66cf4 CHEWY: Room 23 logic fixes
20062f6e65 CHEWY: Room 6 logic fixes
b99ba267f8 CHEWY: Room 24 logic fixes
40810f055d CHEWY: Room 11 & 12 script fixes
f386e90ea8 CHEWY: Room 25 logic fixes
0c52563100 CHEWY: Room 27 logic fixes
f4edc4e5f3 CHEWY: Room 28 logic fixes
8d980ebea7 CHEWY: Room 29 logic fixes
f513e5802c CHEWY: Room 31 logic fixes
6166f273b1 CHEWY: Room 32 logic fixes
79902c154e CHEWY: Room 33 logic fixes
44b633884a CHEWY: Implement room 90
ee18555548 CHEWY: Room 33 logic fixes
ff6029e3fc CHEWY: Room 35 logic fixes
4e9c1e8964 CHEWY: Room 37 logic fixes
241969d5f2 CHEWY: Room 39 logic fixes
3dcddd4897 CHEWY: Room 40 logic fixes
9f79211f49 CHEWY: Room 41 logic fixes
71aff3ff5f CHEWY: Room 42 logic fixes
cfe28c91bb CHEWY: Room 43 logic fixes
b63c280eb1 CHEWY: Room 44 logic fixes
2159c58da9 CHEWY: Implement Room 89, fix a couple of small things in room 90 & 94
159b881abd CHEWY: Room 45 logic fixes
4ae97c6187 CHEWY: Room 46 logic fixes
e001ed7e22 CHEWY: Room 47 logic fixes
aed9bbf6bd CHEWY: Room 48 logic fixes
bacf5410a4 CHEWY: Room 49 logic fixes
9d7df51250 CHEWY: Room 50 logic fixes
430bd3a93d CHEWY: Implement Room 88
dccae5438d CHEWY: pending change forgotten in Room 88
47a3fd8d3e CHEWY: Implement Room 87
f0ebc30ccb CHEWY: Room 51 logic fixes
f0e1e62095 CHEWY: Room 52 logic fixes
b773a5e396 CHEWY: Room 53 logic fixes
128b4e88b9 CHEWY: Room 54 logic fixes
17d0e33e75 CHEWY: Room 55 logic fixes
d846033867 CHEWY: gcc compilation fixes
528f82d9b0 CHEWY: Fix logic bug in Room 17
194f3feeb4 CHEWY: Implement room 86, check more calls to set_ats_str()
08b9b36f97 CHEWY: Implement Room 85
48c0b14f8d CHEWY: Fix at_action to actually use Room85::proc2
8f47ecae0f CHEWY: enforce the use of constant on room_e_obj.Attribut; fix a boolean parameter in room9
40da94cf03 CHEWY: Implement room84, check the initializations of SetUpScreenFunc
9a550bf3fd CHEWY: Make Resharper happy about Room84
a6912052ba CHEWY: Smallest room ever - Room 83
0fa633c64a CHEWY: Implement room 82, enforce the use of constants with start_detail_wait and set_timer_status
dab2e9735f CHEWY: Implement room 81, fix the use of some boolean vs 0/1, use some more constants
1f87509037 CHEWY: Fix logic bug in room 50
4972ef9795 CHEWY: Implement Room 80
230f755cb2 CHEWY: Compilation fix
950da68adf CHEWY: Fix invalid memory writes identified by Valgrind
3aa7029936 CHEWY: Fix some Resharper and CppCheck warnings
06e226cd9b CHEWY: Implement room 79
25b3350f9f CHEWY: Implement room 78
3077523349 CHEWY: Implement Room 77
b8ec7a2437 CHEWY: Implement Room 76
26a40b4214 CHEWY: Fix signature of entry() for rooms 70 to 75
2dd8cfa445 CHEWY: Implement Room 75 + partial implementation of Room 70
25ef3ca14a CHEWY: Implement Room 74
a88068be79 CHEWY: Implement Room 73
4e37d76f25 CHEWY: Implement Room 72
f5a4c9a7cb CHEWY: Finish the implementation of Room 70
7d376524b5 CHEWY: Beginnings of changes to ads_string_start
766e351cfd CHEWY: Changes for a large switch in atds_string_start
be7e66a1d1 CHEWY: Add a few ChewyAni checks to atds_string_start
f3755b3788 CHEWY: Add semicolons to START_STOP_TMP usage
ee32266102 CHEWY: Implement Room 71
c18d9fc30e CHEWY: Partial rewrite of Room 69, check go_auto_xy calls and fix the constant used
2f2a226801 CHEWY: Fix logic in Room 68, check use of booleans and constants in start_spz_wait
c4df14c8d2 CHEWY: Fix some differences in the logic of Room67
91a05eae68 CHEWY: Fix crash in mouse_auto_obj in room 18
59048c75d1 CHEWY: Fix exiting room 17 via closed door
27f765e25f CHEWY: Show cursor after using room 18 monitor
a9907d5ed8 CHEWY: Remove redundant SURIMY_OBJ defines
fc6061f473 CHEWY: Fix re-enabling cursor after opening fridge
b9e5737344 CHEWY: Fix animation putting out glider flames
324cf75b39 CHEWY: Fix flic play custom user function returns
9df3217af2 CHEWY: Change some get_switch_code result comparisons to use ESC
727b3eab53 CHEWY: Fix mode parameters in a lot of flic_cut calls
2d6ef96d94 CHEWY: Implement Room 66
a294f0641a CHEWY: Fix logic of room 65
efe7313a8d CHEWY: Fix logic of Room 64
dd1b2250df CHEWY: Review logic of Room 62
728c4f0545 CHEWY: Fix logic in room 63
1bbc1713bb CHEWY: Review logic of Room 59
18d4fe0986 CHEWY: review logic of Room 58
1390d3aafd CHEWY: Fix logic in Room 57
42f318b4aa CHEWY: Partial rewrite of logic of Room 56
8c55d3afe1 CHEWY: Extra should quit check in flic playback
29dd009eec CHEWY: Fix movement to chicken coop
1259e19806 CHEWY: Added some ATDS struct load methods
c058c67a9e CHEWY: Updates to atdsys::aad_search_dia
e9392c51bf CHEWY: Fix logic in Room 55, enforce the use of chewy ani constants in various places
8cb1e46ce1 CHEWY: Fix logic in room 54
10eb66f09e CHEWY: Fix some syncArray's in Spieler::synchronize
b85b66aade CHEWY: Check logic in Room 53
bebbfcb084 CHEWY: Review logic of Room 52
00df78810f CHEWY: Small changes in the logic of Room 51
0592e4ffdc CHEWY: Fix glitch in logic of Room 50
005964d21a CHEWY: Fix cutscene where pumpkin is grown
4889453c71 CHEWY: Fight night-time city cutscene
bae1b1f476 CHEWY: Fix city train animation
0f4d1c3a59 CHEWY: Some renaming in ailclass, start cleaning atds
26922a37dd CHEWY: Remove ch_icm (unused)
b70f984db4 CHEWY: rename source file maus -> mouse
c545c36c43 CHEWY: mouse - remove some unused extern, reduce some variable scopes, turn some uint8 to boolean
3e6c3b31f7 CHEWY: Reduce variable scopes in atds, fix some CppCheck warnings
8d9060b9c9 CHEWY: Move ged_user_func room code into their Room classes
ccb3a6ae9f CHEWY: Fix Howard disappearing in room 42
30d0520c0c CHEWY: Stop redundant default response after using boombox
b7debd8bef CHEWY: Fix room 47 combination lock
383c094f0b CHEWY: Fix room 46 fight cutscene
08af2295d8 CHEWY: Fix using taxi sign in room 45
75cdacaf7e CHEWY: Fix room 49 water pistol cutscene
a65bfeb8d3 CHEWY: Use gum constant in add inventory call
d3f734a00c CHEWY: Revert Move ged_user_func room code into their Room classes
0eba439f4b CHEWY: Fix cutscene using cockroaches on secretary
10b15ddcf4 CHEWY: remove unused functions in datei, reduce some variable scopes
b880a40b15 CHEWY: Remove debug, reduce some variable scopes, fix a couple of variable types
a416a12ff7 CHEWY: Remove dead code, reduce more variable scopes
72e367bf83 CHEWY: Fix opening crate in room 66
3eb1e5e115 CHEWY: Fix giving artifact to trader
7642371053 CHEWY: Fix Nichelle singing cutscene
437fed7ea3 CHEWY: Janitorial
bc48079711 CHEWY: Flesh out room 70 implementation
69626ad2b4 CHEWY: Range checking for checking to display exit cursors
57e6e74558 CHEWY: Fix loading master room exists list
48d825923b CHEWY: Remove dead code
3b9cec226b CHEWY: Add first version of new video code, currently disabled
2574347f82 CHEWY: Start removing ERROR from code
f512718281 CHEWY: Use error() instead of returning a global error flag
282235ef64 CHEWY: Error out on unused custom FLIC frame types
97c902b455 CHEWY: Create JungleRoom base class for shared entry/exit logic
5b9ab5b650 CHEWY: Fixes for room 71 leopard vining, variables cleanup
ef41a8b904 CHEWY: Reduce some variable scopes
a6cb14b463 CHEWY: Remove unused includes in scenes 73 to 75
b0b6a0f7c9 CHEWY: Fix room 71 walk area after leopard is tied up
98faf5ac58 CHEWY: Fix room 74 cutting rubber plant
617b52aa95 CHEWY: Fix cutscene when first entering room 76
b57197c43a CHEWY: Fix giving chocolate to chief
33902bc8ce CHEWY: Workaround for original bug loading saves in room 77
90a666d0d0 CHEWY: Fix selecting destinations in room 80
04193434d9 CHEWY: Use the new TGP image resource loading code
23f70c6c7f CHEWY: Small modification in the logic of Room 46, review logic of rooms 47 to 49
75f3dde121 CHEWY:Fix logic of Room 45
b817313f48 CHEWY: Review logic of rooms 43 and 44, add a missing (useless?) call of test_intro
057b99f930 CHEWY: Fix logic in room 42
bdca03f332 CHEWY: Review of the logic of Room 41, small fix
f62de89d93 CHEWY: Fix switch in calc_person_dia method
ebd8c36857 CHEWY: Fix Nichelle's initial position in room 82
f334ecb53b CHEWY: Added constant for food certificate inventory item
b3cff29901 CHEWY: Fix display of 'Jim' hover text in room 82
065ce40e18 CHEWY: Fix selecting hermit's hut in lost valley
4fcd88e252 CHEWY: Janitorial
14e2d89b35 CHEWY: Partially working display of diary
b2885e52d8 CHEWY: Fix flag for having gotten diary
45f313cffc CHEWY: Move room 84 global to a static local
3ae7d64011 CHEWY: Renaming SPieler field to r88DestRoom
4aeda52e0c CHEWY: Fix entering crashed glider
13b3860aea CHEWY: Rework logic in Room 40
2a98a78211 CHEWY: Some more changes in scene 40
2399a8aa87 CHEWY: Fix a bug in Room 51, hopefully fix the memory reused by room 65, fi a couple of warnings
34b2dcdd39 CHEWY: Shift global into room 91 local
b63b80e763 CHEWY: Renaming global used for room 93 & 94
2cd8e50d58 CHEWY: Fix initial location in hotel during endgame
77defa5bbf CHEWY: Fix array indexing in room 51
d39dd81427 CHEWY: Fixed Howard text in room 90 after escaping Borx
5ad55150c5 CHEWY: Cleanup of method for getting hubcaps
69a4ab71c2 CHEWY: Add loading switch case for wearing hubcap
113420ab9b CHEWY: Clean up of room 90 globals to be local & static
afc0e0729b CHEWY: Some methods cleanup in room 90
759c28dc24 CHEWY: Fix giving bottle to ghost
14e9cceee9 CHEWY: Move room 97 globals to room fields
f105802ecf CHEWY: Fix destX in Room97::setup_func
7b139a9132 CHEWY: Fix logic in room97::entry
a74d0e8c25 CHEWY: Fix an issue in Room97::proc2
6aaa8ceaa6 CHEWY: Use the new sound code
63ebfc0d9b CHEWY: Fix more issues in Room 97 logic
7f31a9d41e CHEWY: Fix compilation
666f5318ed CHEWY: Fix palette in new video code and hook it in a console command
0271fb2f52 CHEWY: Add a description for all videos
d9cd096931 CHEWY: Remove superfluous code
6c9177efeb CHEWY: Remove unused video frame handling code
620d85c172 CHEWY: Start hooking the new video code
eb83ea4bd8 CHEWY: Remove unused code
491952c6b6 CHEWY: Re-add accidentally removed FLIC speed code
14aa8d92f5 CHEWY: Remove unused code
d0db1ee26c CHEWY: Remove more unused code
666565dae9 CHEWY: Use the new TAF sprite loading code
ee5b444f0d CHEWY: Commented out duplicate define
7408afa36c CHEWY: Added a bunch of quit checks to flic playback
fd7e82993d CHEWY: Fix overrun on SpritePos array
fd8a494be3 CHEWY: Fix cursor change guard in scene 97
2707dda8d4 CHEWY: Fix initial walkable areas in room 97
700e357cc5 CHEWY: Add debugger command for showing walkable areas
729735434f CHEWY: Fix another walkable area check in room 97
206432b7a9 CHEWY: Fix gedAction indexing for room 97
eb791c7514 CHEWY: Fixes for eye sensor anim in room 97, endgame comments
beed429633 CHEWY: Remove unused feature detection code
70713e4a63 CHEWY: Remove unused sound code
bc17ade120 CHEWY: Remove unused defines
7e1e2188a2 CHEWY: Remove obsolete palette code
748bbf12d2 CHEWY: Remove more unused resource handling code
cbe29e4b15 CHEWY : WIP implementation of gbook
4ca5ea2e89 CHEWY: Fix a bug in gbook, reduce some variable scopes in printxy
c594485550 CHEWY: FIxes and cleanup for credits method gbook
12c393c9fd CHEWY: Fix sprite saving
f43b7357bb CHEWY: Janitorial for endgame sprite code
4834cfa89b CHEWY: Fix accents in credits text
613a3471ce CHEWY: Should quit checks on zoom in/out during endgame sequence
3fa814fa90 CHEWY: Properly implement register_cutscene from test_intro
0e6bcfc680 CHEWY: Add missing calls to register_cutscene
24b8640fb6 CHEWY: Cutscenes are 1 based rather than 0
e550159c45 CHEWY: Beginnings of Cinema main menu dialog
3728ccf045 CHEWY: Modify hardcoded logic in Room 39
6086ee20ce CHEWY: Review logic of Room 37
32b99089b5 CHEWY: Finished main menu cinema dialog
9ad7c9c77c CHEWY: Remove redundant null characters from the end of string constants
1cf9b1e78a CHEWY: Fix clipping sprites off the left edge of the screen
9c5d8da1de CHEWY: Fix mouse clicks removing on-screen text
f41734d1cc CHEWY: Finally fixed room backgrounds being incorrectly offset by 8 pixels
5895c2e072 CHEWY: Fix logic in Room 35
f3d7286a55 CHEWY: Review logic of room 34
9d28b764e7 CHEWY: Split credits and cinema dialogs into their own classes
5ea7cb956f CHEWY: Change uses of GBOOK.TGP to a define
2560edc9a3 CHEWY: Split files and options menus into their own classes
ac48be729e CHEWY: Move inventory methods to it's own class
a34672b86d CHEWY: Move calc_use_invent and showDiary to Inventory
577e0f13c2 CHEWY: Workarounds for incorrectly wrapped inventory item descriptions
82bf5e547e CHEWY: Improve prior workaround using inventory constants
b9af0333c5 CHEWY: Review logic of Room 33
3691054963 CHEWY: In progress proper implementation of Files dialog
86772b3d18 CHEWY: Further work on Files dialog
bbccfb8785 CHEWY: Moved MainMenu class to dialogs folder
c205543c3d CHEWY: Fixes for scanxy
bb363bce25 CHEWY: Use the ScummVM GMM dialog by default
574d8ad9cd CHEWY: Fix occassional speech playback even in text mode
050bb36a7f CHEWY: Review logic of Room 32
3c43537329 CHEWY: Remove unused file functions
3c23b39bbe CHEWY: Improvements for sprite handling in the new resource loader
8f60024811 CHEWY: Simplify inventory sprite loading
0963ce948d CHEWY: Cleanup
282e165777 CHEWY: Remove obsolete error checking
b3863a4f57 CHEWY: Remove dead code
9c411272fe CHEWY: Reduce scope of sound buffer
3471cecbf0 CHEWY: Switch to the new sprite loading code
c293beae86 CHEWY: Fix logic of room 31
c715a101b0 CHEWY: Remove unused methods. Some cleanup
0c36a691de CHEWY: Fix logic in room 29
82b435076f CHEWY: Check logic of Room 28
6f67f04200 CHEWY: Change ailclass to SoundPlayer
f3a51b1407 CHEWY: Rename object class files
16fcf62af9 CHEWY: Renamed datei.cpp to data.cpp
ecf68aadff CHEWY: Rename mcga_grafik to mcga_graphics
0d2fcd0496 CHEWY: Rename two classes
12c1612ced CHEWY: Room 27 - Review + small fix
9266a8be9b CHEWY: Review hardcoded logic of Room26, remove duplicate call of playsound and a useless include
a9af72eacb CHEWY: Fix logic in Room 25
931db1a86d CHEWY: Review logic of Room 24
5133a4875d CHEWY: Fix logic in Room 23
73d99548de CHEWY: Fix logic in Room 22
d5591a8aff CHEWY: Fix detection table to work with Mass Add properly
4a129032ee CHEWY: Further cleanup of McgaGraphics
0ec95e3487 CHEWY: Refactored mcga_graphics.cpp globals
acb1f74826 CHEWY: Cleanup of io_game.cpp
03d836ca7a CHEWY: Remove deprecated code from mcga_graphics
4bfa4a73c3 CHEWY: Re-enable title sequence
7f256088fc CHEWY: Cleanup of atds
c5d0eb9f9f CHEWY: Fix a bunch of global shadowing warnings
0e2739d42c CHEWY: Review Room 19
c62d758124 CHEWY: Review logic of Room 21
22ae05e061 CHEWY: Review logic of Room 18, fix a small issue
9b437b227a CHEWY: Initialize the file property when creating memory class
04cdb08501 CHEWY: Refactored global statics for Data
47da3236ec CHEWY: Refactored global statics for flic
f7e480cc40 CHEWY: Rename fields of io_game
b7a34ca29f CHEWY: Rename atds fields
021b20ea39 CHEWY: Rename cursor fields
ee41d4a289 CHEWY: Rename detail class fields
c7647e4b60 CHEWY: Rename flic class fields
eb1d434f8a CHEWY: Rename McgaGraphics class fields
3f0d86d88b CHEWY: Cleanup of memory class
988c210ec5 CHEWY: Rename InputMgr class fields
e866f7ca08 CHEWY: Rename of movclass class fields
fab4e985f1 CHEWY: Rename of Room class fields
b220b5cd37 CHEWY: Rename of timer class fields
c5d0e15fd8 CHEWY: Move main.cpp globals to Globals
b48cbcfaab CHEWY: Move mcga.cpp globals to Globals
643cda6085 CHEWY: Move menus.cpp globals to Globals
858998106d CHEWY: Move various globals to Globals
2233ffa598 CHEWY: Move some static arrays from global.cpp to room.cpp
56a560f7bb CHEWY: Fix a couple of issues in Room 17
5f9f51ed59 CHEWY: Remove useless include in Room 16, review logic of Room 14
153fe2c351 CHEWY: Review calls to set_steuer_bit, fix various issues in Room13 logic
7e5078b433 CHEWY: review of Room 12, fix a bug and move cut_serv to Room 11
296093a17b CHEWY: Review logic of Room 11, fix a couple of issues
15be829a0d CHEWY: Review Room 10, move Room6::cut_serv2 to Room10::cut_serv
b263d38ec9 CHEWY: Re-introduce content of check_shad method
2bc4ccd779 CHEWY: Fix mismatched allocation/delete in Resource
af02358284 CHEWY: Fix memory overrun in Resource::unpackRLE
97d8d700f1 CHEWY: Review logic of Room 9
acf19682c0 CHEWY: Review logic in room 8, fix a bug
9aaa14ad5f CHEWY: Move io_pal1 static array to file.cpp
a6aa69e49c CHEWY: Remove the original's keycode constants
640b101e5d CHEWY: Capitalize class names
e9a67381ec CHEWY: Clean deprecated stuff out of ngshext.h
dbd71d5f63 CHEWY: Cleanup of palette array in taf_dateiheader
6a84e1d620 CHEWY: Cleanup of #if blocks
0b4be086c0 CHEWY: Add zeroes to better sort files for rooms 1 to 9
7692967adb CHEWY: Strip out unused code from IOGame
3780ada931 CHEWY: Remove method declarations that have no implementation
49fd2bd1f0 CHEWY: Properly clear mouse click when used to skip dialogue
15831e1866 CHEWY: Review logic of Room 7; fix a couple of issues
babff2b11f CHEWY: Review logic of Room 6, fix issue
4cb351eeb4 CHEWY: More arrays to become statics
0d19fd29e8 CHEWY: Remove unused globals
232ffd0b93 CHEWY: Review logic in Room 5, reduce variable scope
911798a78c CHEWY: Review the logic of Room 4
4469a6ce1b CHEWY: Review logic of Room 02
d1ac557f14 CHEWY: Use more consistently constants with start_spz
69ed392124 CHEWY: Move graphics related globals to Globals
24daa6e493 CHEWY: Review logic of Room 01
75c029de78 CHEWY: Revert cleanup of #ifdef blocks
793e53c09a CHEWY: Moving globals to Globals
096b125379 CHEWY: Move SetupScreenFunc to Globals, remove unused life globals
546cb99e0b CHEWY: Move globals to Globals
d9c6188922 CHEWY: Move spz globals to Globals
8d42bf7690 CHEWY: Move object pointer globals to Globals
cf7ac0878b CHEWY: Move various array globals to Globals
a4a0f0a009 CHEWY: Move final globals from global.cpp to Globals
9c15eefa80 CHEWY: Further Globals cleanup, renamed file to globals.cpp
d349d46776 CHEWY: Capitalize classes in ngstypes.h
cf3f5aba60 CHEWY: MInor cleanup of main, shifted field to Globals
d3a16e4015 CHEWY: Cleanup of atds method parameters
34251e12d5 CHEWY: Fix logic of Room 03
36ee1adf76 CHEWY: Fix issues in Room 00
316f0aee6e CHEWY: Room 0 - Remove two defines, reduce some variable scopes
a5a997dbad CHEWY: End of review of Room 00
da6eca635e CHEWY: Set DISPLAY_BOTH mode when subtitles and speech are both on
e7f5c1341f CHEWY: Handle mixed speech and subtitles
5717c8ac5a CHEWY: Add German credits
c81d3cb5e5 CHEWY: Remove the file mode in several functions
9700be8e5a CHEWY: Janitorial
097a485ea7 CHEWY: Change DISPLAY constants to an enum
995128b467 CHEWY: Work on CppCheck warnings
bf6cee2b9a CHEWY: More work on CppCheck
7da7a2781e CHEWY: Fix compilation with new video code
4dfc0ffeea CHEWY: Fixes regarding the video skipping flag
26139fd227 CHEWY: Rename setze_zeiger -> set_pointer
70b1e80bd1 CHEWY: Switch more functions to the new sound code
25ad52094d CHEWY: Remove the unused mode parameter of flic_cut()
58ee087edd CHEWY: Fix loading the correct speech data for item interactions
883664cf00 CHEWY: More work on CppCheck, Fix an endianness issue (one of maaaaany)
2123e8887f CHEWY: Remove unused functions
b292ea84bf CHEWY: Use enums for video IDs
a085db8a7b CHEWY: Move all custom video callbacks to r_event.cpp
de38f58836 CHEWY: Use more movie enums
7d9cd2b8ad CHEWY: Rename all movie enums so that they match their values
7f85d2d5b0 CHEWY: Work on CppCheck warnings in Object, rename a couple of functions
f5f1e89ed1 CHEWY: Fix missing file in previous commit
efddc43975 CHEWY: Process mouse events on button up in the cinema screen
318f3ea2bb CHEWY: Restore some of the deleted refactored functions
b8d0082971 CHEWY: Simplify the game initialization code
cfb636c1bd CHEWY: More work on the new video player
c5f604db2d CHEWY: Restore comments
3d7209f44a CHEWY: Use the new video player in more videos
1ea4b7bd5b Remove the modul / fcode checks
e0eff4c511 CHEWY: Remove unused chunk types
8ba4c1b29c CHEWY: Start rewriting taf_seq_adr()
239f53a104 CHEWY: More janitorial work around CppCheck
a8f913b5a9 CHEWY: More janitorial work on CppCheck warnings
4009fd7a6a CHEWY: Finish refactoring taf_seq_adr()
62b70a5add CHEWY: Simplify loading of blende.rnd
c620f1d93c CHEWY: Remove more unused types
5d6fd6de1a CHEWY:Add missing va_end(), add on TODO in devices()
a805e55759 CHEWY: Remove file function wrappers
cd7de90e42 CHEWY: Remove stubbed mouse speed code
e93c5f0928 CHEWY: Remove unused variable in Cinema::Execute
e3f5e5ae44 CHEWY: Rename Display enum
8853eaba2c CHEWY: Fix some more CppCheck warnings, some renaming
03e3b2a8f9 CHEWY: Fix speech num after looking at pillow twice
ccbffc0bd4 CHEWY: Mixed speech & subtitle support for item interactions
ca5dd69fd0 CHEWY: Remove useless check and include in mcga.cpp
6e8cf71682 CHEWY: Some renaming
e35654ac19 CHEWY: More renaming
94f5cf5085 CHEWY: Fix an endianness issue in cursorChoice
fcce6ef9dd CHEWY: Add German exit message
891648a851 CHEWY: Fix German intro number
19234c3315 CHEWY: Fix incorrect text replacement
8e2ea2c8d5 CHEWY: Refactor text printing and font handling code
1bc86dc799 CHEWY: Remove unused functions
2cb5267002 CHEWY: Remove more unused functions
ee46ccf2a1 CHEWY: Fix drawing overlay elements (e.g. subtitles) on videos
3fc3959f7f CHEWY: Various fixes in flic_cut()
8d83a363fb CHEWY: Fix incorrect busy status for Chewy in is_chewy_busy()
84a0dfb35d CHEWY: Explicitly mark AtsBlock as packed
0c80d40d95 CHEWY: Fix compiler warnings
5b0afcffa6 CHEWY: Change AadInfo * to AadInfoArray
c8fa407e93 CHEWY: Fix bad direct cast to a AdsTxtHeader pointer
ecd5d11eac CHEWY: Janitorial
4104095241 CHEWY: Remove initialization of menu_first not present in the binary (and useless)
cb3983d102 CHEWY: More janitorial work in Inventory::menu()
97cde7eba9 CHEWY: Use the new video playing code for special videos 9 and 10
03de363e36 CHEWY: Unify switch cases in room 39
60f8257fdd CHEWY: Remove superfluous mouse handling code
37149b2bc8 CHEWY: Fix crash when entering room 21
a248e9b8da CHEWY: More fixes for CppCheck warnings
56616bac2f CHEWY: Some renaming
3f5f2c0bbf CHEWY: Allow rewinding of CFO videos
b9aabf3353 CHEWY: Switch the TV videos to the new video code
3a8e151d93 CHEWY: Cleanup of the TV video code
b3fc15feeb CHEWY: Some renaming
f3baadd733 CHEWY: Fix shooting dolls cutscene in room 94
5c6b258716 CHEWY: Room 56 entry cleanup
eddb5b6db8 CHEWY: Fix Howard zooming when entering room 56
da2905f8fe CHEWY: Add enums for the cinema videos
c8fa3c2538 CHEWY: Remove special video cases for video IDs over 1000
06bd3eeca9 CHEWY: Cleanup video callbacks
d20703122d CHEWY: Renaming
6c14ba9e80 CHEWY: Remove obsolete functions
e66abfa8e0 CHEWY: Fix compilation
3b86f9e94e CHEWY: Some more renaming
c7284144a8 CHEWY: Remove flic_cut switch cases that were unused
3073043a0d CHEWY: Fix compiler warnings
e919953073 CHEWY: renaming, add some missing breaks in flic_cut
ef70d3ef56 CHEWY: more renaming
c668422506 CHEWY: Revert 'Remove flic_cut switch cases that were unused'
30ff8c38dc CHEWY: Add missing breaks to re-added switch cases
873bb78724 CHEWY: Header define fixes
8aec52fd82 CHEWY; Some more renaming
beec516ffb CHEWY: Some more renaming
266b30eb55 CHEWY: More renaming
407001362c CHEWY: Remove useless parameter in startAadWait()
9cd7694d07 CHEWY: Remove unused structure, some renaming
6ff32ec391 CHEWY: Remove some unused structures in ngstypes
b27b209021 CHEWY: Still renaming
23c5a4ce3e CHEWY: More renaming
5d579f2dff CHEWY: Rename mouseLeftClick
a48534f32a CHEWY: Remove two useless externals in mouse, some renaming


Commit: 1931420cf0b5b90df24a05d4f76f8dd8c8805d68
    https://github.com/scummvm/scummvm/commit/1931420cf0b5b90df24a05d4f76f8dd8c8805d68
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:38-08:00

Commit Message:
CHEWY: Removal current engine (almost fully)

Changed paths:
  R engines/chewy/console.cpp
  R engines/chewy/console.h
  R engines/chewy/cursor.cpp
  R engines/chewy/cursor.h
  R engines/chewy/events.cpp
  R engines/chewy/events.h
  R engines/chewy/graphics.cpp
  R engines/chewy/graphics.h
  R engines/chewy/resource.cpp
  R engines/chewy/resource.h
  R engines/chewy/scene.cpp
  R engines/chewy/scene.h
  R engines/chewy/sound.cpp
  R engines/chewy/sound.h
  R engines/chewy/text.cpp
  R engines/chewy/text.h
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/module.mk


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 3f8dea87ecd..9a27444fe0f 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -20,23 +20,9 @@
  */
 
 #include "common/config-manager.h"
-#include "common/error.h"
-#include "common/events.h"
-#include "common/system.h"
-#include "graphics/palette.h"
-
-#include "engines/engine.h"
+#include "common/fs.h"
 #include "engines/util.h"
-
 #include "chewy/chewy.h"
-#include "chewy/console.h"
-#include "chewy/cursor.h"
-#include "chewy/events.h"
-#include "chewy/graphics.h"
-#include "chewy/resource.h"
-#include "chewy/scene.h"
-#include "chewy/sound.h"
-#include "chewy/text.h"
 
 namespace Chewy {
 
@@ -57,26 +43,9 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 }
 
 ChewyEngine::~ChewyEngine() {
-	delete _events;
-	delete _text;
-	delete _sound;
-	delete _cursor;
-	delete _scene;
-	delete _graphics;
 }
 
 void ChewyEngine::initialize() {
-	setDebugger(new Console(this));
-	_cursor = new Cursor();
-	_graphics = new Graphics(this);
-	_scene = new Scene(this);
-	_sound = new Sound(_mixer);
-	_text = new Text();
-	_events = new Events(this);
-
-	_curCursor = 0;
-	_elapsedFrames = 0;
-	_videoNum = -1;
 }
 
 Common::Error ChewyEngine::run() {
@@ -86,38 +55,6 @@ Common::Error ChewyEngine::run() {
 
 	initialize();
 
-	/*for (uint i = 0; i < 161; i++) {
-		debug("Video %d", i);
-		_graphics->playVideo(i);
-	}*/
-
-	//_graphics->playVideo(0);
-
-	_scene->change(0);
-	//_sound->playSpeech(1);
-	//_sound->playSound(1);
-	//_sound->playMusic(2);
-
-	// Run a dummy loop
-	while (!shouldQuit()) {
-		_events->processEvents();
-
-		// Cursor animation
-		if (_elapsedFrames % 30 == 0)
-			_cursor->animateCursor();
-
-		if (_videoNum >= 0) {
-			_graphics->playVideo(_videoNum);
-			_scene->draw();
-			_videoNum = -1;
-		}
-
-		g_system->updateScreen();
-		g_system->delayMillis(10);
-
-		_elapsedFrames++;
-	}
-
 	return Common::kNoError;
 }
 
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index f1807ed99b8..b5f682fead0 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -24,25 +24,15 @@
 
 
 #include "common/scummsys.h"
+#include "common/error.h"
 #include "common/file.h"
-#include "common/util.h"
-#include "common/str.h"
-#include "common/hashmap.h"
-#include "common/hash-str.h"
 #include "common/random.h"
-
+#include "common/textconsole.h"
 #include "engines/engine.h"
 
 namespace Chewy {
 
 struct ChewyGameDescription;
-class Console;
-class Cursor;
-class Events;
-class Graphics;
-class Scene;
-class Sound;
-class Text;
 
 class ChewyEngine : public Engine {
 public:
@@ -57,14 +47,6 @@ public:
 	const ChewyGameDescription *_gameDescription;
 	Common::RandomSource _rnd;
 
-	void setPlayVideo(uint num) { _videoNum = num; }
-
-	Graphics *_graphics;
-	Cursor *_cursor;
-	Scene *_scene;
-	Sound *_sound;
-	Text *_text;
-
 protected:
 	// Engine APIs
 	Common::Error run() override;
@@ -72,12 +54,6 @@ protected:
 
 	void initialize();
 	void shutdown();
-
-	Events *_events;
-
-	uint _curCursor;
-	uint _elapsedFrames;
-	int _videoNum;
 };
 
 } // End of namespace Chewy
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp
deleted file mode 100644
index 29774456928..00000000000
--- a/engines/chewy/console.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "gui/debugger.h"
-
-#include "chewy/chewy.h"
-#include "chewy/console.h"
-#include "chewy/graphics.h"
-#include "chewy/resource.h"
-#include "chewy/scene.h"
-#include "chewy/sound.h"
-#include "chewy/text.h"
-
-namespace Chewy {
-
-Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) {
-	registerCmd("dump",          WRAP_METHOD(Console, Cmd_Dump));
-	registerCmd("dump_bg",       WRAP_METHOD(Console, Cmd_DumpBg));
-	registerCmd("draw_image",    WRAP_METHOD(Console, Cmd_DrawImage));
-	registerCmd("draw_sprite",   WRAP_METHOD(Console, Cmd_DrawSprite));
-	registerCmd("play_sound",    WRAP_METHOD(Console, Cmd_PlaySound));
-	registerCmd("play_speech",   WRAP_METHOD(Console, Cmd_PlaySpeech));
-	registerCmd("play_music",    WRAP_METHOD(Console, Cmd_PlayMusic));
-	registerCmd("play_video",    WRAP_METHOD(Console, Cmd_PlayVideo));
-	registerCmd("video_info",    WRAP_METHOD(Console, Cmd_VideoInfo));
-	registerCmd("error_message", WRAP_METHOD(Console, Cmd_ErrorMessage));
-	registerCmd("dialog",        WRAP_METHOD(Console, Cmd_Dialog));
-	registerCmd("text",          WRAP_METHOD(Console, Cmd_Text));
-	registerCmd("scene",         WRAP_METHOD(Console, Cmd_Scene));
-}
-
-Console::~Console() {
-}
-
-bool Console::Cmd_Dump(int argc, const char **argv) {
-	if (argc < 4) {
-		debugPrintf("Usage: dump <file> <resource number> <dump file name>\n");
-		return true;
-	}
-
-	Common::String filename = argv[1];
-	int resNum = atoi(argv[2]);
-	Common::String dumpFilename = argv[3];
-
-	Resource *res = new Resource(filename);
-	Chunk *chunk = res->getChunk(resNum);
-	byte *data = res->getChunkData(resNum);
-	uint32 size = chunk->size;
-
-	Common::DumpFile outFile;
-	outFile.open(dumpFilename);
-	outFile.write(data, size);
-	outFile.flush();
-	outFile.close();
-
-	delete[] data;
-	delete res;
-
-	return true;
-}
-
-bool Console::Cmd_DumpBg(int argc, const char **argv) {
-	if (argc < 4) {
-		debugPrintf("Usage: dump_bg <file> <resource number> <dump file name>\n");
-		return true;
-	}
-
-	Common::String filename = argv[1];
-	int resNum = atoi(argv[2]);
-	Common::String dumpFilename = argv[3];
-
-	BackgroundResource *res = new BackgroundResource(filename);
-	TBFChunk *image = res->getImage(resNum);
-
-	Common::DumpFile outFile;
-	outFile.open(dumpFilename);
-	outFile.write(image->data, image->size);
-	outFile.flush();
-	outFile.close();
-
-	delete[] image->data;
-	delete image;
-	delete res;
-
-	return true;
-}
-
-
-bool Console::Cmd_DrawImage(int argc, const char **argv) {
-	if (argc < 3) {
-		debugPrintf("Usage: draw_image <file> <resource number>\n");
-		return true;
-	}
-
-	Common::String filename = argv[1];
-	int resNum = atoi(argv[2]);
-
-	_vm->_graphics->drawImage(filename, resNum);
-
-	return false;
-}
-
-bool Console::Cmd_DrawSprite(int argc, const char **argv) {
-	if (argc < 3) {
-		debugPrintf("Usage: draw_sprite <file> <resource number> [x] [y]\n");
-		return true;
-	}
-
-	Common::String filename = argv[1];
-	int spriteNum = atoi(argv[2]);
-	int x = (argc < 4) ? 0 : atoi(argv[3]);
-	int y = (argc < 5) ? 0 : atoi(argv[4]);
-
-	_vm->_graphics->drawSprite(filename, spriteNum, x, y);
-
-	return false;
-}
-
-bool Console::Cmd_PlaySound(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Usage: play_sound <number>\n");
-		return true;
-	}
-
-	int resNum = atoi(argv[1]);
-	_vm->_sound->playSound(resNum);
-
-	return true;
-}
-
-bool Console::Cmd_PlaySpeech(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Usage: play_speech <number>\n");
-		return true;
-	}
-
-	int resNum = atoi(argv[1]);
-	_vm->_sound->playSpeech(resNum);
-
-	return true;
-}
-
-bool Console::Cmd_PlayMusic(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Usage: play_music <number>\n");
-		return true;
-	}
-
-	int resNum = atoi(argv[1]);
-	_vm->_sound->playMusic(resNum);
-
-	return true;
-}
-
-bool Console::Cmd_PlayVideo(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Usage: play_video <number>\n");
-		return true;
-	}
-
-	int resNum = atoi(argv[1]);
-	_vm->setPlayVideo(resNum);
-
-	return false;
-}
-
-bool Console::Cmd_VideoInfo(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Usage: video_info <number>\n");
-		return true;
-	}
-
-	int resNum = atoi(argv[1]);
-	VideoResource *res = new VideoResource("cut.tap");
-	VideoChunk *header = res->getVideoHeader(resNum);
-	debugPrintf("Size: %d, %d x %d, %d frames, %d ms frame delay, first frame at %d\n", header->size, header->width, header->height, header->frameCount, header->frameDelay, header->firstFrameOffset);
-	delete header;
-	delete res;
-
-	return true;
-}
-
-bool Console::Cmd_ErrorMessage(int argc, const char **argv) {
-	if (argc < 3) {
-		debugPrintf("Usage: error_message <file> <message number>\n");
-		return true;
-	}
-
-	Common::String filename = argv[1];
-	int resNum = atoi(argv[2]);
-
-	ErrorMessage *res = new ErrorMessage(filename);
-	Common::String str = res->getErrorMessage(resNum);
-	this->debugPrintf("Error message: %s\n", str.c_str());
-	delete res;
-
-	return true;
-}
-
-bool Console::Cmd_Dialog(int argc, const char **argv) {
-	if (argc < 3) {
-		debugPrintf("Usage: dialog <dialog> <entry>\n");
-		return true;
-	}
-
-	int dialogNum = atoi(argv[1]);
-	int entryNum  = atoi(argv[2]);
-	uint cur = 0;
-	TextEntryList *d = _vm->_text->getDialog(dialogNum, entryNum);
-
-	for (TextEntryList::iterator it = d->begin(); it != d->end(); ++it) {
-		this->debugPrintf("Entry %d: speech %d, text '%s'\n", cur, (*it).speechId, (*it).text.c_str());
-	}
-
-	d->clear();
-	delete d;
-
-	return true;
-}
-
-bool Console::Cmd_Text(int argc, const char **argv) {
-	if (argc < 3) {
-		debugPrintf("Usage: text <dialog> <entry>\n");
-		return true;
-	}
-
-	int dialogNum = atoi(argv[1]);
-	int entryNum = atoi(argv[2]);
-	TextEntry *d = _vm->_text->getText(dialogNum, entryNum);
-
-	debugPrintf("Speech %d, text '%s'\n", d->speechId, d->text.c_str());
-
-	delete d;
-
-	return true;
-}
-
-bool Console::Cmd_Scene(int argc, const char **argv) {
-	if (argc < 2) {
-		debugPrintf("Current scene is: %d\n", _vm->_scene->getCurScene());
-		debugPrintf("Use scene <scene num> to change the scene\n");
-		return true;
-	}
-
-	int sceneNum = atoi(argv[1]);
-	_vm->_scene->change(sceneNum);
-
-	return false;
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/console.h b/engines/chewy/console.h
deleted file mode 100644
index 2f76f9eec91..00000000000
--- a/engines/chewy/console.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_CONSOLE_H
-#define CHEWY_CONSOLE_H
-
-#include "gui/debugger.h"
-
-namespace Chewy {
-
-class ChewyEngine;
-
-class Console : public GUI::Debugger {
-public:
-	Console(ChewyEngine *vm);
-	~Console(void) override;
-
-private:
-	ChewyEngine *_vm;
-
-	bool Cmd_Dump(int argc, const char **argv);
-	bool Cmd_DumpBg(int argc, const char **argv);
-	bool Cmd_DrawImage(int argc, const char **argv);
-	bool Cmd_DrawSprite(int argc, const char **argv);
-	bool Cmd_PlaySound(int argc, const char **argv);
-	bool Cmd_PlaySpeech(int argc, const char **argv);
-	bool Cmd_PlayMusic(int argc, const char **argv);
-	bool Cmd_PlayVideo(int argc, const char **argv);
-	bool Cmd_VideoInfo(int argc, const char **argv);
-	bool Cmd_ErrorMessage(int argc, const char **argv);
-	bool Cmd_Dialog(int argc, const char **argv);
-	bool Cmd_Text(int argc, const char **argv);
-	bool Cmd_Scene(int argc, const char **argv);
-};
-
-} // End of namespace Chewy
-#endif
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
deleted file mode 100644
index 3196b76a57a..00000000000
--- a/engines/chewy/cursor.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/system.h"
-#include "common/events.h"
-#include "graphics/cursorman.h"
-#include "graphics/palette.h"
-#include "graphics/surface.h"
-
-#include "chewy/cursor.h"
-#include "chewy/resource.h"
-
-namespace Chewy {
-
-const byte _cursorFrames[] = {
-	4, 1, 1, 1,     //   0-3: walk
-	4, 1, 1, 1,     //   5-7: use (+ no use, 4)
-	1,              //     8: go to
-	4, 1, 1, 1,     //  9-12: nope
-	4, 1, 1, 1,     // 13-16: look
-	4, 1, 1, 1,     // 17-20: talk (+ no talk, 17)
-	4, 1, 1, 1,     // 21-24: inventory
-	1,              // 25: save
-	1,              // 26: exit left
-	1,              // 27: exit right
-	1,              // 28: exit up
-	1,              // 29: exit down
-	1,              // 30: disk
-	1,              // 31: Howard
-	5, 1, 1, 1, 1,  // 32: animated arrow
-	1,              // 37: Nichelle
-	1,              // 38: use (inventory)
-	1,              // 39: look (inventory)
-	1               // 40: gun
-};
-
-Cursor::Cursor() {
-	_curCursor = 0;
-	_curCursorFrame = 0;
-	_cursorSprites = new SpriteResource("cursor.taf");
-}
-
-Cursor::~Cursor() {
-	delete _cursorSprites;
-}
-
-// TODO: This may need to be refactored, since in the original the user
-// selects the cursor to use from a pop-up menu
-CurrentCursor Cursor::getCurrentCursor() const {
-	switch (_curCursor) {
-	case 0:
-	case 1:
-	case 2:
-	case 3:
-		return kWalk;
-	case 4:
-	case 5:
-	case 6:
-	case 7:
-		return kUse;
-	case 13:
-	case 14:
-	case 15:
-	case 16:
-		return kLook;
-	case 17:
-	case 18:
-	case 19:
-	case 20:
-		return kTalk;
-	default:
-		return kOther;
-	}
-}
-
-void Cursor::setCursor(uint num, bool newCursor) {
-	TAFChunk *cursor = _cursorSprites->getSprite(num);
-	if (newCursor)
-		_curCursor = num;
-
-	CursorMan.replaceCursor(cursor->data, cursor->width, cursor->height, 0, 0, 0);
-
-	delete[] cursor->data;
-	delete cursor;
-}
-
-void Cursor::showCursor() {
-	CursorMan.showMouse(true);
-}
-
-void Cursor::hideCursor() {
-	CursorMan.showMouse(false);
-}
-
-void Cursor::animateCursor() {
-	if (_cursorFrames[_curCursor] > 1) {
-		_curCursorFrame++;
-
-		if (_curCursorFrame >= _cursorFrames[_curCursor])
-			_curCursorFrame = 0;
-
-		setCursor(_curCursor + _curCursorFrame, false);
-	}
-}
-
-void Cursor::nextCursor() {
-	uint maxCursors = ARRAYSIZE(_cursorFrames);
-
-	if (_cursorFrames[_curCursor] > 0)
-		_curCursor += _cursorFrames[_curCursor];
-	else
-		_curCursor++;
-
-	if (_curCursor >= maxCursors)
-		_curCursor = 0;
-
-	_curCursorFrame = 0;
-	setCursor(_curCursor);
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
deleted file mode 100644
index 08567ce6352..00000000000
--- a/engines/chewy/cursor.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_CURSOR_H
-#define CHEWY_CURSOR_H
-
-#include "chewy/chewy.h"
-
-namespace Chewy {
-
-class SpriteResource;
-class Font;
-
-enum CurrentCursor {
-	kWalk,
-	kLook,
-	kUse,
-	kTalk,
-	kOther
-};
-
-class Cursor {
-public:
-	Cursor();
-	virtual ~Cursor();
-
-	void setCursor(uint num, bool newCursor = true);
-	void showCursor();
-	void hideCursor();
-	void animateCursor();
-	void nextCursor();
-	CurrentCursor getCurrentCursor() const;
-
-private:
-	uint _curCursor;
-	uint _curCursorFrame;
-	SpriteResource *_cursorSprites;
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
deleted file mode 100644
index 94d51bd5331..00000000000
--- a/engines/chewy/events.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/system.h"
-#include "common/events.h"
-
-#include "chewy/chewy.h"
-#include "chewy/console.h"
-#include "chewy/cursor.h"
-#include "chewy/events.h"
-#include "chewy/graphics.h"
-#include "chewy/scene.h"
-
-namespace Chewy {
-
-Events::Events(ChewyEngine *vm) : _vm(vm) {
-
-	_eventManager = g_system->getEventManager();
-}
-
-void Events::processEvents() {
-	while (_eventManager->pollEvent(_event)) {
-		if (_event.type == Common::EVENT_KEYDOWN) {
-			switch (_event.kbd.keycode) {
-			case Common::KEYCODE_ESCAPE:
-				_vm->quitGame();
-				break;
-			case Common::KEYCODE_SPACE:
-				_vm->_cursor->nextCursor();
-				break;
-			default:
-				break;
-			}
-		} else if (_event.type == Common::EVENT_LBUTTONUP) {
-			_vm->_scene->mouseClick(_event.mouse);
-		} else if (_event.type == Common::EVENT_RBUTTONUP) {
-			_vm->_cursor->nextCursor();
-		} else if (_event.type == Common::EVENT_MOUSEMOVE) {
-			_vm->_scene->updateMouse(_event.mouse);
-		}
-	}
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
deleted file mode 100644
index ac56469c461..00000000000
--- a/engines/chewy/events.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EVENTS_H
-#define CHEWY_EVENTS_H
-
-#include "common/events.h"
-
-namespace Chewy {
-
-class ChewyEngine;
-class Graphics;
-class Console;
-
-class Events {
-public:
-	Events(ChewyEngine *vm);
-	virtual ~Events() {}
-
-	void processEvents();
-
-private:
-	Common::Event _event;
-	Common::EventManager *_eventManager;
-	ChewyEngine *_vm;
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/graphics.cpp b/engines/chewy/graphics.cpp
deleted file mode 100644
index 7e1563cc7f3..00000000000
--- a/engines/chewy/graphics.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/system.h"
-#include "common/events.h"
-#include "graphics/cursorman.h"
-#include "graphics/palette.h"
-#include "graphics/surface.h"
-
-#include "chewy/cursor.h"
-#include "chewy/graphics.h"
-#include "chewy/resource.h"
-#include "chewy/text.h"
-#include "chewy/video/cfo_decoder.h"
-
-namespace Chewy {
-
-#define DESC_WIDTH 80
-#define DESC_HEIGHT 8
-
-Graphics::Graphics(ChewyEngine *vm) : _vm(vm) {
-	_font = nullptr;
-	_descSurface.create(DESC_WIDTH, DESC_HEIGHT, ::Graphics::PixelFormat::createFormatCLUT8());
-}
-
-Graphics::~Graphics() {
-	delete _font;
-	_descSurface.free();
-}
-
-void Graphics::drawSprite(Common::String filename, int spriteNum, uint x, uint y) {
-	SpriteResource *res = new SpriteResource(filename);
-	TAFChunk *sprite = res->getSprite(spriteNum);
-
-	drawTransparent(x, y, sprite->data, sprite->width, sprite->height, 0);
-	g_system->updateScreen();
-
-	delete[] sprite->data;
-	delete sprite;
-	delete res;
-}
-
-void Graphics::drawImage(Common::String filename, int imageNum) {
-	BackgroundResource *res = new BackgroundResource(filename);
-	TBFChunk *image = res->getImage(imageNum);
-
-	g_system->getPaletteManager()->setPalette(image->palette, 0, 256);
-	g_system->copyRectToScreen(image->data, image->width, 0, 0, image->width, image->height);
-	g_system->updateScreen();
-
-	delete[] image->data;
-	delete image;
-	delete res;
-}
-
-void Graphics::drawRect(Common::Rect r, byte color) {
-	::Graphics::Surface *screen = g_system->lockScreen();
-	screen->drawLine(r.left, r.top, r.right, r.top, color);
-	screen->drawLine(r.right, r.top, r.right, r.bottom, color);
-	screen->drawLine(r.left, r.bottom, r.right, r.bottom, color);
-	screen->drawLine(r.left, r.top, r.left, r.bottom, color);
-	g_system->unlockScreen();
-}
-
-void Graphics::loadFont(Common::String filename) {
-	_font = new Font(filename);
-}
-
-void Graphics::drawTransparent(uint16 x, uint16 y, byte *data, uint16 width, uint16 height, byte transparentColor) {
-	::Graphics::Surface *screen = g_system->lockScreen();
-	for (uint curX = 0; curX < width; curX++) {
-		for (uint curY = 0; curY < height; curY++) {
-			if (curX + x < 320 && curY + y < 200) {
-				byte *src = data + (curY * width) + curX;
-				byte *dst = (byte *)screen->getBasePtr(curX + x, curY + y);
-				if (*src != transparentColor)
-					*dst = *src;
-			}
-		}
-	}
-	g_system->unlockScreen();
-}
-
-void Graphics::drawText(Common::String text, uint x, uint y) {
-	::Graphics::Surface *textSurface = _font->getLine(text);
-
-	drawTransparent(x, y, (byte *)textSurface->getPixels(), textSurface->pitch, textSurface->h, 0xFF);
-
-	textSurface->free();
-	delete textSurface;
-}
-
-void Graphics::playVideo(uint num) {
-	CfoDecoder *cfoDecoder = new CfoDecoder(_vm->_sound);
-	VideoResource *videoResource = new VideoResource("cut.tap");
-	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
-
-	if (!cfoDecoder->loadStream(videoStream)) {
-		delete videoResource;
-		delete cfoDecoder;
-		return;
-	}
-
-	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
-	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
-	bool skipVideo = false;
-	byte curPalette[256 * 3];
-
-	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
-	_vm->_cursor->hideCursor();
-
-	cfoDecoder->start();
-
-	while (!_vm->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo) {
-		if (cfoDecoder->needsUpdate()) {
-			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
-			if (frame) {
-				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
-
-				if (cfoDecoder->hasDirtyPalette())
-					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
-
-				g_system->updateScreen();
-			}
-		}
-
-		Common::Event event;
-		while (g_system->getEventManager()->pollEvent(event)) {
-			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
-				skipVideo = true;
-		}
-
-		g_system->delayMillis(10);
-	}
-
-	cfoDecoder->close();
-
-	g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
-	_vm->_cursor->showCursor();
-
-	delete videoResource;
-	delete cfoDecoder;
-}
-
-void Graphics::setDescSurface(Common::Point pos) {
-	_descPos = pos;
-
-	if (pos.x < 0)
-		return;
-
-	::Graphics::Surface *s = g_system->lockScreen();
-	Common::Rect r = Common::Rect(pos.x, pos.y, pos.x + _descSurface.w, pos.y + _descSurface.h);
-	r.clip(Common::Rect(0, 0, 320, 200));
-	_descSurface.copyRectToSurface(*s, 0, 0, r);
-	g_system->unlockScreen();
-}
-
-void Graphics::restoreDescSurface() {
-	if (_descPos.x < 0)
-		return;
-
-	Common::Rect r = Common::Rect(_descPos.x, _descPos.y, _descPos.x + _descSurface.w, _descPos.y + _descSurface.h);
-	r.clip(Common::Rect(0, 0, 320, 200));
-	g_system->copyRectToScreen(_descSurface.getPixels(), _descSurface.pitch, _descPos.x, _descPos.y, r.width(), r.height());
-	_descPos = Common::Point(-1, -1);
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/graphics.h b/engines/chewy/graphics.h
deleted file mode 100644
index f3a91559206..00000000000
--- a/engines/chewy/graphics.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_GRAPHICS_H
-#define CHEWY_GRAPHICS_H
-
-#include "chewy/chewy.h"
-#include "common/rect.h"
-#include "graphics/surface.h"
-
-namespace Chewy {
-
-class SpriteResource;
-class Font;
-
-class Graphics {
-public:
-	Graphics(ChewyEngine *vm);
-	virtual ~Graphics();
-
-	void drawImage(Common::String filename, int imageNum);
-	void drawSprite(Common::String filename, int spriteNum, uint x, uint y);
-	void drawRect(Common::Rect r, byte color);
-	void playVideo(uint num);
-	void loadFont(Common::String filename);
-	void drawText(Common::String text, uint x, uint y);
-	void setDescSurface(Common::Point pos);
-	void restoreDescSurface();
-
-private:
-	void drawTransparent(uint16 x, uint16 y, byte *data, uint16 width, uint16 height, byte transparentColor);
-
-	ChewyEngine *_vm;
-	Font *_font;
-	Common::Point _descPos;
-	::Graphics::Surface _descSurface;
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 87d8042c520..6a621bbbc14 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -2,16 +2,7 @@ MODULE := engines/chewy
 
 MODULE_OBJS = \
 	chewy.o \
-	cursor.o \
-	console.o \
-	events.o \
-	graphics.o \
-	metaengine.o \
-	resource.o \
-	scene.o \
-	sound.o \
-	text.o \
-	video/cfo_decoder.o
+	metaengine.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
deleted file mode 100644
index 889291fe6eb..00000000000
--- a/engines/chewy/resource.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/debug.h"
-#include "common/stream.h"
-#include "common/substream.h"
-#include "common/textconsole.h"
-#include "graphics/pixelformat.h"
-#include "graphics/surface.h"
-
-#include "chewy/chewy.h"
-#include "chewy/resource.h"
-
-namespace Chewy {
-
-// Resource files - TODO:
-// ======================
-// back/episode1.gep
-// cut/blende.rnd
-// misc/exit.eib
-// misc/inventar.iib
-// misc/inventar.sib
-// room/test.rdi
-// txt/diah.adh
-// txt/inv_st.s and txt/room_st.s (inventory/room control bytes)
-// txt/inv_use.idx
-
-Resource::Resource(Common::String filename) {
-	const uint32 headerGeneric = MKTAG('N', 'G', 'S', '\0');
-	const uint32 headerTxtDec  = MKTAG('T', 'C', 'F', '\0');
-	const uint32 headerTxtEnc  = MKTAG('T', 'C', 'F', '\1');
-	const uint32 headerSprite  = MKTAG('T', 'A', 'F', '\0');
-
-	filename.toLowercase();
-	_stream.open(filename);
-
-	uint32 header = _stream.readUint32BE();
-	bool isText = (header == headerTxtDec || header == headerTxtEnc);
-	bool isSprite = (header == headerSprite);
-
-	if (header != headerGeneric && !isSprite && !isText)
-		error("Invalid resource - %s", filename.c_str());
-
-	if (isText) {
-		_resType = kResourceTCF;
-		_encrypted = (header == headerTxtEnc);
-	} else if (isSprite) {
-		initSprite(filename);
-		return;
-	} else {
-		_resType = (ResourceType)_stream.readUint16LE();
-		_encrypted = false;
-	}
-
-	if (filename == "atds.tap")
-		_encrypted = true;
-
-	_chunkCount = _stream.readUint16LE();
-
-	for (uint i = 0; i < _chunkCount; i++) {
-		Chunk cur;
-		cur.size = _stream.readUint32LE();
-
-		if (!isText)
-			cur.type = (ResourceType)_stream.readUint16LE();
-		else
-			cur.num = _stream.readUint16LE();
-
-		cur.pos = _stream.pos();
-
-		_stream.skip(cur.size);
-		_chunkList.push_back(cur);
-	}
-}
-
-Resource::~Resource() {
-	_chunkList.clear();
-	_stream.close();
-}
-
-uint32 Resource::getChunkCount() const {
-	return _chunkList.size();
-}
-
-Chunk *Resource::getChunk(uint num) {
-	assert(num < _chunkList.size());
-
-	return &_chunkList[num];
-}
-
-byte *Resource::getChunkData(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	byte *data = new byte[chunk->size];
-
-	_stream.seek(chunk->pos, SEEK_SET);
-	_stream.read(data, chunk->size);
-	if (_encrypted)
-		decrypt(data, chunk->size);
-
-	return data;
-}
-
-void Resource::initSprite(Common::String filename) {
-	uint32 nextSpriteOffset;
-
-	// TAF (sprite) resources are much different than the rest, so we have a
-	// separate initializer for them here
-
-	_resType = kResourceTAF;
-	_encrypted = false;
-	/*screenMode = */_stream.readUint16LE();
-	_chunkCount = _stream.readUint16LE();
-	_stream.skip(4);		// total size of all sprites
-	_stream.skip(3 * 256);	// palette
-	nextSpriteOffset = _stream.readUint32LE();
-	_stream.skip(2 + 1);	// correction table, padding
-	if ((int32)nextSpriteOffset != _stream.pos())
-		error("Invalid sprite resource - %s", filename.c_str());
-
-	for (uint i = 0; i < _chunkCount; i++) {
-		Chunk cur;
-
-		cur.pos = _stream.pos();
-		cur.type = kResourceTAF;
-
-		_stream.skip(2 + 2 + 2);	// compression flag, width, height
-		nextSpriteOffset = _stream.readUint32LE();
-		uint32 spriteImageOffset = _stream.readUint32LE();
-		_stream.skip(1);	// padding
-
-		if ((int32)spriteImageOffset != _stream.pos())
-			error("Invalid sprite resource - %s", filename.c_str());
-
-		cur.size = nextSpriteOffset - cur.pos - 15; // 15 = sizeof(TAFChunk)
-
-		_stream.skip(cur.size);
-		_chunkList.push_back(cur);
-	}
-}
-
-void Resource::unpackRLE(byte *buffer, uint32 compressedSize, uint32 uncompressedSize) {
-	// Compressed images are packed using a very simple RLE compression
-	byte count;
-	byte value;
-	uint32 outPos = 0;
-
-	for (uint i = 0; i < (compressedSize) / 2 && outPos < uncompressedSize; i++) {
-		count = _stream.readByte();
-		value = _stream.readByte();
-		for (byte j = 0; j < count; j++) {
-			buffer[outPos++] = value;
-		}
-	}
-}
-
-void Resource::decrypt(byte *data, uint32 size) {
-	byte *c = data;
-
-	for (uint i = 0; i < size; i++) {
-		*c = -(*c);
-		++c;
-	}
-}
-
-TAFChunk *SpriteResource::getSprite(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	TAFChunk *taf = new TAFChunk();
-
-	_stream.seek(chunk->pos, SEEK_SET);
-
-	taf->compressionFlag = _stream.readUint16LE();
-	taf->width = _stream.readUint16LE();
-	taf->height = _stream.readUint16LE();
-	_stream.skip(4 + 4 + 1);	// nextSpriteOffset, spriteImageOffset, padding
-
-	taf->data = new byte[taf->width * taf->height];
-
-	if (!taf->compressionFlag)
-		_stream.read(taf->data, chunk->size);
-	else
-		unpackRLE(taf->data, chunk->size, taf->width * taf->height);
-
-	return taf;
-}
-
-TBFChunk *BackgroundResource::getImage(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	TBFChunk *tbf = new TBFChunk();
-
-	_stream.seek(chunk->pos, SEEK_SET);
-
-	if (_stream.readUint32BE() != MKTAG('T', 'B', 'F', '\0'))
-		error("Corrupt TBF resource");
-
-	tbf->screenMode = _stream.readUint16LE();
-	tbf->compressionFlag = _stream.readUint16LE();
-	tbf->size = _stream.readUint32LE();
-	tbf->width = _stream.readUint16LE();
-	tbf->height = _stream.readUint16LE();
-	for (int j = 0; j < 3 * 256; j++)
-		tbf->palette[j] = (_stream.readByte() << 2) & 0xff;
-
-	tbf->data = new byte[tbf->size];
-
-	if (!tbf->compressionFlag)
-		_stream.read(tbf->data, chunk->size);
-	else
-		unpackRLE(tbf->data, chunk->size, tbf->size);
-
-	return tbf;
-}
-
-SoundChunk *SoundResource::getSound(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	SoundChunk *sound = new SoundChunk();
-
-	_stream.seek(chunk->pos, SEEK_SET);
-
-	// Voice files are split in blocks, so reassemble them here
-	byte blocksRemaining;
-	uint32 totalLength = 0;
-	uint32 blockSize;
-
-	// Find the total length of the voice file
-	do {
-		blocksRemaining = _stream.readByte();
-
-		byte b1 = _stream.readByte();
-		byte b2 = _stream.readByte();
-		byte b3 = _stream.readByte();
-		blockSize = b1 + (b2 << 8) + (b3 << 16);
-
-		totalLength += blockSize;
-		_stream.skip(blockSize);
-	} while (blocksRemaining > 1);
-
-	// Read the voice data
-	sound->size = totalLength;
-	sound->data = new byte[totalLength];
-	byte *ptr = sound->data;
-
-	_stream.seek(chunk->pos, SEEK_SET);
-
-	do {
-		blocksRemaining = _stream.readByte();
-
-		byte b1 = _stream.readByte();
-		byte b2 = _stream.readByte();
-		byte b3 = _stream.readByte();
-		blockSize = b1 + (b2 << 8) + (b3 << 16);
-
-		_stream.read(ptr, blockSize);
-		ptr += blockSize;
-	} while (blocksRemaining > 1);
-
-	return sound;
-}
-
-VideoChunk *VideoResource::getVideoHeader(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	VideoChunk *vid = new VideoChunk();
-
-	_stream.seek(chunk->pos, SEEK_SET);
-
-	if (_stream.readUint32BE() != MKTAG('C', 'F', 'O', '\0'))
-		error("Corrupt video resource");
-
-	vid->size = _stream.readUint32LE();	// always 0
-	vid->frameCount = _stream.readUint16LE();
-	vid->width = _stream.readUint16LE();
-	vid->height = _stream.readUint16LE();
-	vid->frameDelay = _stream.readUint32LE();
-	vid->firstFrameOffset = _stream.readUint32LE();	// always 22
-
-	return vid;
-}
-
-Common::SeekableReadStream *VideoResource::getVideoStream(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	return new Common::SeekableSubReadStream(&_stream, chunk->pos, chunk->pos + chunk->size);
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
deleted file mode 100644
index 7ff1022cb6a..00000000000
--- a/engines/chewy/resource.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_RESOURCE_H
-#define CHEWY_RESOURCE_H
-
-
-#include "common/scummsys.h"
-#include "common/file.h"
-#include "common/util.h"
-#include "common/str.h"
-#include "common/hashmap.h"
-#include "common/hash-str.h"
-#include "common/random.h"
-#include "common/stream.h"
-#include "graphics/surface.h"
-
-namespace Chewy {
-
-enum ResourceType {
-	kResourcePCX = 0,		// unused
-	kResourceTBF = 1,		// background art, contained in TGPs
-	kResourceTAF = 2,
-	kResourceTFF = 3,
-	kResourceVOC = 4,		// speech and SFX, contained in TVPs
-	kResourceTPF = 5,		// unused
-	kResourceTMF = 6,		// music, similar to a MOD file, contained in details.tap
-	kResourceMOD = 7,		// unused
-	kResourceRAW = 8,		// unused
-	kResourceLBM = 9,		// unused
-	kResourceRDI = 10,
-	kResourceTXT = 11,
-	kResourceIIB = 12,
-	kResourceSIB = 13,
-	kResourceEIB = 14,
-	kResourceATS = 15,		// unused
-	kResourceSAA = 16,		// unused
-	kResourceFLC = 17,		// unused
-	kResourceAAD = 18,		// unused
-	kResourceADS = 19,		// unused
-	kResourceADH = 20,		// used in txt/diah.adh
-	kResourceTGP = 21,		// container for background art, used in back/comic.tgp, back/episode1.tgp and back/gbook.tgp
-	kResourceTVP = 22,		// container for speech, used in sound/speech.tvp
-	kResourceTTP = 23,		// unused
-	kResourceTAP = 24,		// container for sound effects, music and cutscenes, used in sound/details.tap and cut/cut.tap
-	kResourceCFO = 25,		// unused
-	kResourceTCF = 26		// error messages, used in err/err_e.tcf (English) and err/err_d.tcf (German)
-};
-
-// Generic chunk header
-struct Chunk {
-	uint32 size;
-	uint16 num;	// same as the type below, used in chunks where the type is substituted with count
-	ResourceType type;
-	uint32 pos;	// position of the actual data
-};
-
-// TBF (background) chunk header
-struct TBFChunk {
-	// TBF chunk header
-	// ID (TBF, followed by a zero)
-	uint16 screenMode;
-	uint16 compressionFlag;
-	uint32 size;
-	uint16 width;
-	uint16 height;
-	byte palette[3 * 256];
-	byte *data;
-};
-
-// TAF (sprite) image data chunk header - 15 bytes
-struct TAFChunk {
-	uint16 compressionFlag;
-	uint16 width;
-	uint16 height;
-	// 4 bytes next sprite offset
-	// 4 bytes sprite image offset
-	// 1 byte padding
-	byte *data;
-};
-
-// Sound chunk header
-struct SoundChunk {
-	uint32 size;
-	byte *data;
-};
-
-// Video chunk header
-struct VideoChunk {
-	// ID (CFA, followed by a zero)
-	uint32 size;
-	uint16 frameCount;
-	uint16 width;
-	uint16 height;
-	uint32 frameDelay;	// in ms
-	uint32 firstFrameOffset;
-};
-
-enum VideoFrameType {
-	kVideoFrameNormal = 0xF1FA,
-	kVideoFrameCustom = 0xFAF1
-};
-
-typedef Common::Array<Chunk> ChunkList;
-typedef Common::Array<TBFChunk> TBFChunkList;
-
-class Resource {
-public:
-	Resource(Common::String filename);
-	virtual ~Resource();
-
-	ResourceType getType() const { return _resType; }
-	uint32 getChunkCount() const;
-	Chunk *getChunk(uint num);
-	virtual byte *getChunkData(uint num);
-
-protected:
-	void initSprite(Common::String filename);
-	void unpackRLE(byte *buffer, uint32 compressedSize, uint32 uncompressedSize);
-	void decrypt(byte *data, uint32 size);
-
-	Common::File _stream;
-	uint16 _chunkCount;
-	ResourceType _resType;
-	bool _encrypted;
-
-	ChunkList _chunkList;
-};
-
-class SpriteResource : public Resource {
-public:
-	SpriteResource(Common::String filename) : Resource(filename) {}
-	~SpriteResource() override {}
-
-	TAFChunk *getSprite(uint num);
-};
-
-class BackgroundResource : public Resource {
-public:
-	BackgroundResource(Common::String filename) : Resource(filename) {}
-	~BackgroundResource() override {}
-
-	TBFChunk *getImage(uint num);
-};
-
-class SoundResource : public Resource {
-public:
-	SoundResource(Common::String filename) : Resource(filename) {}
-	~SoundResource() override {}
-
-	SoundChunk *getSound(uint num);
-};
-
-class VideoResource : public Resource {
-public:
-	VideoResource(Common::String filename) : Resource(filename) {}
-	~VideoResource() override {}
-
-	VideoChunk *getVideoHeader(uint num);
-	Common::SeekableReadStream *getVideoStream(uint num);
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/scene.cpp b/engines/chewy/scene.cpp
deleted file mode 100644
index acb2d5c066b..00000000000
--- a/engines/chewy/scene.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/system.h"
-#include "common/events.h"
-#include "graphics/cursorman.h"
-#include "graphics/palette.h"
-#include "graphics/surface.h"
-
-#include "chewy/cursor.h"
-#include "chewy/graphics.h"
-#include "chewy/scene.h"
-#include "chewy/resource.h"
-#include "chewy/sound.h"
-#include "chewy/text.h"
-#include "chewy/video/cfo_decoder.h"
-
-namespace Chewy {
-
-#define MAX_DETAILS 32
-#define MAX_HOTSPOTS 50
-#define MAX_AUTOMOVE 20
-#define MAX_SOUNDS 3
-
-struct SoundInfo {
-	uint16 enable[MAX_SOUNDS];	// flag, 0 = disable, 1 = enable
-	int16 index[MAX_SOUNDS];
-	uint16 start[MAX_SOUNDS];
-	uint16 channel[MAX_SOUNDS];
-	uint16 volume[MAX_SOUNDS];
-	uint16 repeatCount[MAX_SOUNDS];
-	uint16 stereo[MAX_SOUNDS];	// stereo position for the SFX
-};
-
-// Animated details - scene animations
-struct AnimatedDetails {
-	int16 x;
-	int16 y;
-	byte startFlag;     // 0: no animation
-	byte repeat;
-	int16 startSprite;
-	int16 endSprite;
-	int16 spriteCount;
-	uint16 delay;
-	uint16 delayCount;
-	uint16 reverse;     // 0: play normally, 1: play in reverse
-	uint16 timerStart;  // seconds until detail is started (0: no timer)
-	uint16 zIndex;
-	byte loadFlag;      // 0: load animation in memory immediately, 1: load animation in memory when it is played
-	byte zoom;
-	SoundInfo soundInfo;
-	byte showOneFrame;  // show a sprite, 0: none, 1: before animation, 2: after animation
-	byte currentFrame;
-};
-
-// Static details - scene sprites and props
-struct StaticDetails {
-	int16 x;
-	int16 y;
-	int16 spriteNum;
-	uint16 zIndex;
-	byte hide;
-	// 1 byte dummy
-};
-
-struct Hotspot {
-	Common::Rect rect;
-	uint16 resource;
-	Common::String desc;
-	int16 speechId;
-};
-
-struct RoomInfo {
-	byte roomNum;
-	byte picNum;
-	byte autoMoveCount;
-	byte loadTaf;
-	Common::String tafName;	// 14 bytes
-	byte zoomFactor;
-	// 1 byte dummy
-};
-
-struct AutoMove {
-	int16 x;
-	int16 y;
-	byte spriteNum;	// sprite number to draw when the end point is reached
-	// 1 byte dummy
-};
-
-/*struct HotspotSpeech {
-	int16 look;
-	int16 use;
-	int16 talk;
-};*/
-
-struct SceneInfo {
-	uint16 staticDetailsCount;
-	uint16 animatedDetailsCount;
-	uint32 spritePtr;
-	AnimatedDetails animatedDetails[MAX_DETAILS];
-	StaticDetails staticDetails[MAX_DETAILS];
-	Hotspot hotspot[MAX_HOTSPOTS];
-	RoomInfo roomInfo;
-	AutoMove autoMove[MAX_AUTOMOVE];
-	int16 hotspotSpeech[MAX_DETAILS * MAX_SOUNDS];
-	//uint32 hotspotSoundPtr[MAX_DETAILS][MAX_SOUNDS];	// unused
-};
-
-Scene::Scene(ChewyEngine *vm) : _vm(vm) {
-	_sceneInfo = new SceneInfo();
-	_vm->_graphics->setDescSurface(Common::Point(-1, -1));
-}
-
-Scene::~Scene() {
-	delete _sceneInfo;
-}
-
-void Scene::change(uint scene) {
-	_curScene = scene;
-	_vm->_cursor->setCursor(0);
-	_vm->_cursor->showCursor();
-
-	loadSceneInfo();
-	draw();
-}
-
-void Scene::draw() {
-	// Background
-	_vm->_graphics->drawImage("episode1.tgp", _curScene);
-
-	for (uint16 i = 0; i < MAX_DETAILS; i++) {
-		// Static details
-		StaticDetails s = _sceneInfo->staticDetails[i];
-		if (s.spriteNum >= 0 && s.x >= 0 && s.y >= 0 && !s.hide)
-			_vm->_graphics->drawSprite(Common::String::format("det%d.taf", _curScene), s.spriteNum, s.x, s.y);
-	}
-
-	// TODO: These are all hardcoded for now
-	_vm->_graphics->drawSprite("det1.taf", 0, 200, 100);
-	_vm->_graphics->loadFont("6x8.tff");
-	//_vm->_graphics->drawText("This is a test", 200, 80);
-
-	_vm->_graphics->setDescSurface(Common::Point(-1, -1));
-}
-
-void Scene::updateMouse(Common::Point coords) {
-	_vm->_graphics->restoreDescSurface();
-
-	// Static details
-	for (uint16 i = 0; i < MAX_HOTSPOTS; i++) {
-		//_vm->_graphics->drawRect(_sceneInfo->hotspot[i].rect, 0);	// debug
-		if (_sceneInfo->hotspot[i].rect.contains(coords) && _sceneInfo->hotspot[i].resource < kATSTextMax) {
-			if (coords.y >= 8) {
-				_vm->_graphics->setDescSurface(Common::Point(coords.x, coords.y - 8));
-				_vm->_graphics->drawText(_sceneInfo->hotspot[i].desc, coords.x, coords.y - 8);
-				//_vm->_graphics->drawText(_sceneInfo->hotspot[i].desc + Common::String::format(" (%d)", i), coords.x, coords.y - 8);	// debug
-			}
-			break;
-		}
-	}
-}
-
-void Scene::mouseClick(Common::Point coords) {
-	// Static details
-	for (uint16 i = 0; i < MAX_HOTSPOTS; i++) {
-		//_vm->_graphics->drawRect(_sceneInfo->hotspot[i].rect, 0);	// debug
-		if (_sceneInfo->hotspot[i].rect.contains(coords)) {
-			int16 sample = -1;
-
-			// TODO: This is still not right
-			int16 speechId = _sceneInfo->hotspotSpeech[_sceneInfo->hotspot[i].resource - 4];
-			SoundInfo *s = &_sceneInfo->animatedDetails[speechId].soundInfo;
-
-			switch (_vm->_cursor->getCurrentCursor()) {
-			case kUse:
-				sample = s->index[0];
-				break;
-			case kLook:
-				sample = s->index[1];
-				break;
-			case kTalk:
-				sample = s->index[2];
-				break;
-			default:
-				break;
-			}
-
-			if (sample >= 0)
-				_vm->_sound->playSpeech(sample);
-		}
-	}
-}
-
-static void readSSoundInfo(Common::File &indexFile, int16 *data) {
-	for (int i = 0; i < MAX_SOUNDS; i++)
-		data[i] = indexFile.readSint16LE();
-}
-
-static void readUSoundInfo(Common::File &indexFile, uint16 *data) {
-	for (int i = 0; i < MAX_SOUNDS; i++)
-		data[i] = indexFile.readUint16LE();
-}
-
-/**
- * Loads scene information from test.rdi
- * Note that the original loads everything with a single read into a structure,
- * which is why there are some pointers saved in the resource file - however,
- * these are set to zero
- */
-void Scene::loadSceneInfo() {
-	const uint32 sceneInfoSize = 3784;
-	const uint32 headerRDI = MKTAG('R', 'D', 'I', '\0');
-	const char *sceneIndexFileName = "test.rdi";
-	Common::File indexFile;
-	if (!Common::File::exists(sceneIndexFileName))
-		error("File %s not found", sceneIndexFileName);
-	Text *text = new Text();
-
-	indexFile.open(sceneIndexFileName);
-
-	uint32 header = indexFile.readUint32BE();
-	if (header != headerRDI)
-		error("Invalid resource - %s", sceneIndexFileName);
-	indexFile.skip(2);	// room count, unused (set to 100)
-
-	indexFile.seek(sceneInfoSize * _curScene, SEEK_CUR);
-
-	_sceneInfo->staticDetailsCount = indexFile.readUint16LE();
-	_sceneInfo->animatedDetailsCount = indexFile.readUint16LE();
-	indexFile.skip(4);	// pointer to sprites
-
-	// Animated details
-	for (int i = 0; i < MAX_DETAILS; i++) {
-		_sceneInfo->animatedDetails[i].x = indexFile.readSint16LE();
-		_sceneInfo->animatedDetails[i].y = indexFile.readSint16LE();
-		_sceneInfo->animatedDetails[i].startFlag = indexFile.readByte();
-		_sceneInfo->animatedDetails[i].repeat = indexFile.readByte();
-		_sceneInfo->animatedDetails[i].startSprite = indexFile.readSint16LE();
-		_sceneInfo->animatedDetails[i].endSprite = indexFile.readSint16LE();
-		_sceneInfo->animatedDetails[i].spriteCount = indexFile.readSint16LE();
-		_sceneInfo->animatedDetails[i].delay = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].delayCount = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].reverse = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].timerStart = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].zIndex = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].loadFlag = indexFile.readByte();
-		_sceneInfo->animatedDetails[i].zoom = indexFile.readByte();
-
-		SoundInfo *s = &_sceneInfo->animatedDetails[i].soundInfo;
-		readUSoundInfo(indexFile, s->enable);
-		readSSoundInfo(indexFile, s->index);
-		readUSoundInfo(indexFile, s->start);
-		readUSoundInfo(indexFile, s->channel);
-		readUSoundInfo(indexFile, s->volume);
-		readUSoundInfo(indexFile, s->repeatCount);
-		readUSoundInfo(indexFile, s->stereo);
-		//debug("Sound %i: %i, %i, %i", i, s->index[0], s->index[1], s->index[2]);
-
-		_sceneInfo->animatedDetails[i].showOneFrame = indexFile.readUint16LE();
-		_sceneInfo->animatedDetails[i].currentFrame = indexFile.readUint16LE();
-	}
-
-	// Static details
-	for (int i = 0; i < MAX_DETAILS; i++) {
-		_sceneInfo->staticDetails[i].x = indexFile.readSint16LE();
-		_sceneInfo->staticDetails[i].y = indexFile.readSint16LE();
-		_sceneInfo->staticDetails[i].spriteNum = indexFile.readSint16LE();
-		_sceneInfo->staticDetails[i].zIndex = indexFile.readUint16LE();
-		_sceneInfo->staticDetails[i].hide = indexFile.readByte();
-		indexFile.readByte();	// padding
-	}
-
-	// Hotspots
-	for (int i = 0; i < MAX_HOTSPOTS; i++) {
-		_sceneInfo->hotspot[i].rect.left = indexFile.readUint16LE();
-		_sceneInfo->hotspot[i].rect.top = indexFile.readUint16LE();
-		_sceneInfo->hotspot[i].rect.right = indexFile.readUint16LE();
-		_sceneInfo->hotspot[i].rect.bottom = indexFile.readUint16LE();
-		if (!_sceneInfo->hotspot[i].rect.isValidRect())
-			warning("Hotspot %d has an invalid rect", i);
-	}
-
-	// Hotspot descriptions
-	for (int i = 0; i < MAX_HOTSPOTS; i++) {
-		_sceneInfo->hotspot[i].resource = indexFile.readUint16LE() + 4;
-		_sceneInfo->hotspot[i].desc = "";
-		_sceneInfo->hotspot[i].speechId = -1;
-
-		if (_sceneInfo->hotspot[i].resource < kATSTextMax) {
-			TextEntry *entry = text->getText(_curScene + kADSTextMax, _sceneInfo->hotspot[i].resource);
-			if (entry) {
-				_sceneInfo->hotspot[i].desc = entry->text;
-				//_sceneInfo->hotspot[i].speechId = entry->speechId;	// TODO
-				//debug("Hotspot %i: '%s', resource %d", i, entry->text.c_str(), _sceneInfo->hotspot[i].resource);
-			}
-		}
-	}
-
-	// Room info
-	_sceneInfo->roomInfo.roomNum = indexFile.readByte();
-	_sceneInfo->roomInfo.picNum = indexFile.readByte();
-	_sceneInfo->roomInfo.autoMoveCount = indexFile.readByte();
-	_sceneInfo->roomInfo.loadTaf = indexFile.readByte();
-
-	_sceneInfo->roomInfo.tafName = "";
-	for (int i = 0; i < 14; i++)
-		_sceneInfo->roomInfo.tafName += indexFile.readByte();
-
-	_sceneInfo->roomInfo.zoomFactor = indexFile.readByte();
-	indexFile.readByte();	// padding
-
-	for (int i = 0; i < MAX_AUTOMOVE; i++) {
-		_sceneInfo->autoMove[i].x = indexFile.readSint16LE();
-		_sceneInfo->autoMove[i].y = indexFile.readSint16LE();
-		_sceneInfo->autoMove[i].spriteNum = indexFile.readByte();
-		indexFile.readByte();	// padding
-		if (i > _sceneInfo->roomInfo.autoMoveCount && !(_sceneInfo->autoMove[i].x <= 0 || _sceneInfo->autoMove[i].y <= 0))
-			warning("Auto move %d should be unused, but it isn't (max auto move items are %d)", i, _sceneInfo->roomInfo.autoMoveCount);
-	}
-
-	for (int i = 0; i < MAX_DETAILS * MAX_SOUNDS; i++) {
-		_sceneInfo->hotspotSpeech[i] = indexFile.readSint16LE();
-		/*HotspotSpeech *hs = &_sceneInfo->hotspotSpeech[i];
-		hs->look = indexFile.readSint16LE();
-		hs->use = indexFile.readSint16LE();
-		hs->talk = indexFile.readSint16LE();
-		debug("Hotspot %d: (%d, %d, %d)", i, hs->look, hs->use, hs->talk);*/
-	}
-
-	// The rest of the scene data is MAX_DETAILS * 3 * 4 bytes full of null or
-	// invalid pointers to sound buffers, where sounds for each hotspot are
-	// preloaded
-	indexFile.skip(MAX_DETAILS * 3 * 4);
-
-	delete text;
-	indexFile.close();
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/scene.h b/engines/chewy/scene.h
deleted file mode 100644
index 751ac279ff7..00000000000
--- a/engines/chewy/scene.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_SCENE_H
-#define CHEWY_SCENE_H
-
-#include "chewy/chewy.h"
-
-namespace Chewy {
-
-struct SceneInfo;
-
-class Scene {
-public:
-	Scene(ChewyEngine *vm);
-	virtual ~Scene();
-
-	void change(uint scene);
-	void draw();
-	void updateMouse(Common::Point coords);
-	void mouseClick(Common::Point coords);
-	uint getCurScene() const {
-		return _curScene;
-	}
-
-private:
-	void loadSceneInfo();
-
-	ChewyEngine *_vm;
-	uint _curScene;
-	SceneInfo *_sceneInfo;
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
deleted file mode 100644
index 6e278b72485..00000000000
--- a/engines/chewy/sound.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
-#include "audio/decoders/raw.h"
-#include "common/system.h"
-
-#include "chewy/resource.h"
-#include "chewy/sound.h"
-
-namespace Chewy {
-
-Sound::Sound(Audio::Mixer *mixer) {
-	_mixer = mixer;
-	_speechRes = new SoundResource("speech.tvp");
-	_soundRes = new SoundResource("details.tap");
-}
-
-Sound::~Sound() {
-	delete _soundRes;
-	delete _speechRes;
-}
-
-void Sound::playSound(int num, bool loop, uint channel) {
-	SoundChunk *sound = _soundRes->getSound(num);
-	byte *data = (byte *)malloc(sound->size);
-	memcpy(data, sound->data, sound->size);
-
-	playSound(data, sound->size, loop, channel);
-
-	delete[] sound->data;
-	delete sound;
-}
-
-void Sound::playSound(byte *data, uint32 size, bool loop, uint channel, DisposeAfterUse::Flag dispose) {
-	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-		Audio::makeRawStream(data,
-		size, 22050, Audio::FLAG_UNSIGNED,
-		dispose),
-		loop ? 0 : 1);
-
-	_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle[channel], stream);
-}
-
-void Sound::pauseSound(uint channel) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	_mixer->pauseHandle(_soundHandle[channel], true);
-}
-
-void Sound::resumeSound(uint channel) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	_mixer->pauseHandle(_soundHandle[channel], false);
-}
-
-void Sound::stopSound(uint channel) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	_mixer->stopHandle(_soundHandle[channel]);
-}
-
-bool Sound::isSoundActive(uint channel) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	return _mixer->isSoundHandleActive(_soundHandle[channel]);
-}
-
-void Sound::setSoundVolume(uint volume) {
-	_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, volume);
-}
-
-void Sound::setSoundChannelVolume(uint channel, uint volume) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	_mixer->setChannelVolume(_soundHandle[channel], volume);
-}
-
-void Sound::setSoundChannelBalance(uint channel, uint balance) {
-	assert(channel < MAX_SOUND_EFFECTS);
-	_mixer->setChannelBalance(_soundHandle[channel], balance);
-}
-
-void Sound::playMusic(int num, bool loop) {
-	uint32 musicNum = _soundRes->getChunkCount() - 1 - num;
-	Chunk *chunk = _soundRes->getChunk(musicNum);
-	byte *data = _soundRes->getChunkData(musicNum);
-
-	playMusic(data, chunk->size, loop);
-
-	delete[] data;
-	delete chunk;
-}
-
-void Sound::playMusic(byte *data, uint32 size, bool loop, DisposeAfterUse::Flag dispose) {
-	byte *modData = nullptr;
-	uint32 modSize;
-
-	// TODO: TMF music files are similar to MOD files. With the following
-	// incorrect implementation, the PCM parts of these files can be played
-	warning("The current music playing implementation is wrong");
-	modSize = size;
-	modData = (byte *)malloc(modSize);
-	memcpy(modData, data, size);
-	//convertTMFToMod(data, size, modData, modSize);
-
-	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-		Audio::makeRawStream(modData,
-		modSize, 22050, Audio::FLAG_UNSIGNED,
-		dispose),
-		loop ? 0 : 1);
-
-	_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream);
-}
-
-void Sound::pauseMusic() {
-	_mixer->pauseHandle(_musicHandle, true);
-}
-
-void Sound::resumeMusic() {
-	_mixer->pauseHandle(_musicHandle, false);
-}
-
-void Sound::stopMusic() {
-	_mixer->stopHandle(_musicHandle);
-}
-
-bool Sound::isMusicActive() {
-	return _mixer->isSoundHandleActive(_musicHandle);
-}
-
-void Sound::setMusicVolume(uint volume) {
-	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
-}
-
-void Sound::playSpeech(int num) {
-	SoundChunk *sound = _speechRes->getSound(num);
-	byte *data = (byte *)malloc(sound->size);
-	memcpy(data, sound->data, sound->size);
-
-	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-		Audio::makeRawStream(data,
-		sound->size, 22050, Audio::FLAG_UNSIGNED,
-		DisposeAfterUse::YES),
-		1);
-
-	_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);
-
-	delete[] sound->data;
-	delete sound;
-}
-
-void Sound::pauseSpeech() {
-	_mixer->pauseHandle(_speechHandle, true);
-}
-
-void Sound::resumeSpeech() {
-	_mixer->pauseHandle(_speechHandle, false);
-}
-
-void Sound::stopSpeech() {
-	_mixer->stopHandle(_speechHandle);
-}
-
-bool Sound::isSpeechActive() {
-	return _mixer->isSoundHandleActive(_speechHandle);
-}
-
-void Sound::setSpeechVolume(uint volume) {
-	_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume);
-}
-
-void Sound::stopAll() {
-	_mixer->stopAll();
-}
-
-void Sound::convertTMFToMod(byte *tmfData, uint32 tmfSize, byte *modData, uint32 &modSize) {
-	// Convert the TMF stream back to a regular Protracker MOD stream
-	const int maxInstruments = 31;
-	// Extra bytes needed: 20 bytes song name, 31 * 22 instrument names, 4 magic bytes "M.K."
-	modSize = tmfSize + 20 + maxInstruments * 22 + 4;
-	modData = (byte *)malloc(modSize);
-	byte *tmfPtr = tmfData;
-	byte *modPtr = modData;
-
-	const byte songName[20] = {
-		'S', 'C', 'U', 'M', 'M',
-		'V', 'M', ' ', 'M', 'O',
-		'D', 'U', 'L', 'E', '\0',
-		'\0', '\0', '\0', '\0', '\0'
-	};
-	const byte instrumentName[22] = {
-		'S', 'C', 'U', 'M', 'M',
-		'V', 'M', ' ', 'I', 'N',
-		'S', 'T', 'R', 'U', 'M',
-		'E', 'N', 'T', '\0', '\0',
-		'\0', '\0'
-	};
-
-	if (READ_BE_UINT32(tmfPtr) != MKTAG('T', 'M', 'F', '\0'))
-		error("Corrupt TMF resource");
-	tmfPtr += 4;
-
-	memcpy(modPtr, songName, 20);
-	modPtr += 20;
-
-	byte fineTune, instVolume;
-	uint16 repeatPoint, repeatLength, sampleLength;
-
-	for (int i = 0; i < maxInstruments; i++) {
-		fineTune = *tmfPtr++;
-		instVolume = *tmfPtr++;
-		repeatPoint = READ_BE_UINT16(tmfPtr);	tmfPtr += 2;
-		repeatLength = READ_BE_UINT16(tmfPtr);	tmfPtr += 2;
-		sampleLength = READ_BE_UINT16(tmfPtr);	tmfPtr += 2;
-
-		// Instrument name
-		memcpy(modPtr, instrumentName, 18);	modPtr += 18;
-		*modPtr++ = ' ';
-		*modPtr++ = i / 10;
-		*modPtr++ = i % 10;
-		*modPtr++ = '\0';
-
-		WRITE_BE_UINT16(modPtr, sampleLength / 2);	modPtr += 2;
-		*modPtr++ = fineTune;
-		*modPtr++ = instVolume;
-		WRITE_BE_UINT16(modPtr, repeatPoint / 2);	modPtr += 2;
-		WRITE_BE_UINT16(modPtr, repeatLength / 2);	modPtr += 2;
-	}
-
-	*modPtr++ = *tmfPtr++;	// song length
-	*modPtr++ = *tmfPtr++;	// undef
-	memcpy(modPtr, tmfPtr, 128);
-	modPtr += 128;
-	tmfPtr += 128;
-	WRITE_BE_UINT32(modPtr, MKTAG('M', '.', 'K', '.'));	modPtr += 4;
-	// TODO: 31 bytes instrument positions
-
-	// TODO: notes
-
-	free(modData);
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
deleted file mode 100644
index 9963580d79c..00000000000
--- a/engines/chewy/sound.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_SOUND_H
-#define CHEWY_SOUND_H
-
-#include "audio/mixer.h"
-#include "chewy/chewy.h"
-
-namespace Chewy {
-
-class SoundResource;
-
-#define MAX_SOUND_EFFECTS 14
-
-class Sound {
-public:
-	Sound(Audio::Mixer *mixer);
-	virtual ~Sound();
-
-	void playSound(int num, bool loop = false, uint channel = 0);
-	void playSound(byte *data, uint32 size, bool loop = false, uint channel = 0, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
-	void pauseSound(uint channel);
-	void resumeSound(uint channel);
-	void stopSound(uint channel);
-	bool isSoundActive(uint channel);
-	void setSoundVolume(uint volume);
-	void setSoundChannelVolume(uint channel, uint volume);
-	void setSoundChannelBalance(uint channel, uint balance);
-
-	void playMusic(int num, bool loop = false);
-	void playMusic(byte *data, uint32 size, bool loop = false, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
-	void pauseMusic();
-	void resumeMusic();
-	void stopMusic();
-	bool isMusicActive();
-	void setMusicVolume(uint volume);
-
-	void playSpeech(int num);
-	void pauseSpeech();
-	void resumeSpeech();
-	void stopSpeech();
-	bool isSpeechActive();
-	void setSpeechVolume(uint volume);
-
-	void stopAll();
-
-private:
-	Audio::Mixer *_mixer;
-	Audio::SoundHandle _soundHandle[MAX_SOUND_EFFECTS];
-	Audio::SoundHandle _musicHandle;
-	Audio::SoundHandle _speechHandle;
-
-	SoundResource *_speechRes;
-	SoundResource *_soundRes;
-
-	void convertTMFToMod(byte *tmfData, uint32 tmfSize, byte *modData, uint32 &modSize);
-};
-
-} // End of namespace Chewy
-
-#endif
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
deleted file mode 100644
index e6eef428f34..00000000000
--- a/engines/chewy/text.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/rect.h"
-#include "common/system.h"
-
-#include "chewy/resource.h"
-#include "chewy/text.h"
-
-namespace Chewy {
-
-Text::Text() : Resource("atds.tap") {
-}
-
-Text::~Text() {
-}
-
-TextEntryList *Text::getDialog(uint dialogNum, uint entryNum) {
-	if (dialogNum >= kADSTextMax)
-		error("getDialog(): Invalid entry number requested, %d (max %d)", dialogNum, kADSTextMax - 1);
-
-	TextEntryList *l = new TextEntryList();
-
-	byte *data = getChunkData(dialogNum);
-	byte *ptr = data;
-
-	ptr += 2;	// entry number
-	ptr += 2;	// number of persons
-	ptr += 2;	// automove count
-	ptr += 2;	// cursor number
-	ptr += 13;	// misc data
-
-	for (uint i = 0; i <= entryNum; i++) {
-		do {
-			TextEntry curDialog;
-			ptr++;	// current entry
-			ptr += 2;
-			curDialog.speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;	ptr += 2;
-
-			do {
-				curDialog.text += *ptr++;
-
-				if (*ptr == 0 && *(ptr + 1) != kEndText) {
-					// TODO: Split lines
-					*ptr = ' ';
-				}
-			} while (*ptr != kEndText);
-
-			if (i == entryNum)
-				l->push_back(curDialog);
-
-		} while (*(ptr + 1) != kEndEntry);
-
-		ptr += 2;	// kEndText, kEndEntry
-
-		if (*ptr == kEndBlock)	// not found
-			break;
-	}
-
-	delete[] data;
-
-	return l;
-}
-
-TextEntry *Text::getText(uint dialogNum, uint entryNum) {
-	if (dialogNum < kADSTextMax)
-		error("getText(): Invalid entry number requested, %d (min %d)", dialogNum, kADSTextMax);
-
-	TextEntry *d = new TextEntry();
-	bool isText = (dialogNum >= kADSTextMax && dialogNum < kADSTextMax + kATSTextMax);
-	bool isAutoDialog = (dialogNum >= kADSTextMax + kATSTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax);
-	//bool isInvText = (dialogNum >= kADSTextMax + kATSTextMax + kAADTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax + kINVTextMax);
-
-	byte *data = getChunkData(dialogNum);
-	byte *ptr = data;
-
-	if (isAutoDialog)
-		ptr += 3;
-
-	for (uint i = 0; i <= entryNum; i++) {
-		ptr += 13;
-		d->speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;	ptr += 2;
-
-		do {
-			if (i == entryNum)
-				d->text += *ptr++;
-			else
-				ptr++;
-
-			if (*ptr == 0 && *(ptr + 1) != kEndText) {
-				// TODO: Split lines
-				*ptr = ' ';
-			}
-		} while (*ptr);
-
-		if (*(ptr + 1) != kEndText || *(ptr + 2) != kEndChunk) {
-			warning("Invalid text resource - %d, %d", dialogNum, entryNum);
-
-			delete[] data;
-			delete d;
-
-			return nullptr;
-		}
-
-		if (!isText)
-			ptr += 3;	// 0, kEndText, kEndChunk
-		if (isAutoDialog)
-			ptr += 3;
-
-		if (i == entryNum) {
-			// Found
-			delete[] data;
-			return d;
-		}
-	}
-
-	// Not found
-	delete[] data;
-	delete d;
-
-	return nullptr;
-}
-
-Font::Font(Common::String filename) {
-	const uint32 headerFont = MKTAG('T', 'F', 'F', '\0');
-	Common::File stream;
-
-	stream.open(filename);
-
-	uint32 header = stream.readUint32BE();
-
-	if (header != headerFont)
-		error("Invalid resource - %s", filename.c_str());
-
-	stream.skip(4);	// total memory
-	_count = stream.readUint16LE();
-	_first = stream.readUint16LE();
-	_last = stream.readUint16LE();
-	_width = stream.readUint16LE();
-	_height = stream.readUint16LE();
-
-	_fontSurface.create(_width * _count, _height, ::Graphics::PixelFormat::createFormatCLUT8());
-
-	byte cur;
-	int bitIndex = 7;
-	byte *p;
-
-	cur = stream.readByte();
-
-	for (uint n = 0; n < _count; n++) {
-		for (uint y = 0; y < _height; y++) {
-			p = (byte *)_fontSurface.getBasePtr(n * _width, y);
-
-			for (uint x = n * _width; x < n * _width + _width; x++) {
-				*p++ = (cur & (1 << bitIndex)) ? 0 : 0xFF;
-
-				bitIndex--;
-				if (bitIndex < 0) {
-					bitIndex = 7;
-					cur = stream.readByte();
-				}
-			}
-		}
-	}
-}
-
-Font::~Font() {
-	_fontSurface.free();
-}
-
-::Graphics::Surface *Font::getLine(const Common::String &text) {
-	::Graphics::Surface *line = new ::Graphics::Surface();
-	line->create(text.size() * _width, _height, ::Graphics::PixelFormat::createFormatCLUT8());
-
-	for (uint i = 0; i < text.size(); i++) {
-		uint x = (text[i] - _first) * _width;
-		line->copyRectToSurface(_fontSurface, i * _width, 0, Common::Rect(x, 0, x + _width, _height));
-	}
-
-	return line;
-}
-
-Common::String ErrorMessage::getErrorMessage(uint num) {
-	assert(num < _chunkList.size());
-
-	Chunk *chunk = &_chunkList[num];
-	Common::String str;
-	byte *data = new byte[chunk->size];
-
-	_stream.seek(chunk->pos, SEEK_SET);
-	_stream.read(data, chunk->size);
-	if (_encrypted)
-		decrypt(data, chunk->size);
-
-	str = (char *)data;
-	delete[] data;
-
-	return str;
-}
-
-} // End of namespace Chewy
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
deleted file mode 100644
index d75f63907ea..00000000000
--- a/engines/chewy/text.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_TEXT_H
-#define CHEWY_TEXT_H
-
-#include "common/list.h"
-#include "chewy/chewy.h"
-#include "chewy/resource.h"
-
-namespace Chewy {
-
-/**
- * Game texts are contained in txt/atds.tap, and contain the following (in that order):
- * ADS (Adventure Dialog System) - dialogs, 500 entries max
- * ATS (Adventure Text System) - text descriptions, 100 entries max
- * AAD (Adventure Auto Dialog System) - automatic dialogs, 100 entries max
- * INV - inventory text descriptions, 100 entries max
- * USE - use action texts, 100 entries max
- */
-enum MaxTextTypes {
-	kADSTextMax = 500,	//   0 - 499
-	kATSTextMax = 100,	// 500 - 599
-	kAADTextMax = 100,	// 600 - 699
-	kINVTextMax = 100,	// 700 - 799
-	kUSETextMax = 100	// 800 - 899
-};
-
-/**
- * Markers for text entries
- */
-enum TextEntryMarkers {
-	kEndRow = 0x00,
-	kEndBlock = 0x0b,
-	kEndEntry = 0x0c,
-	kEndText = 0x0d,
-	kEndChunk = 0x0e
-	// There's also 0x0f, block end, which we don't use
-};
-
-#define VOICE_OFFSET 20
-
-struct TextEntry {
-	int16 speechId;
-	Common::String text;
-};
-
-typedef Common::List<TextEntry> TextEntryList;
-
-
-class Text : public Resource {
-public:
-	Text();
-	~Text() override;
-
-	/**
-	 * Gets a list of lines for a specific dialog entry
-	 */
-	TextEntryList *getDialog(uint dialogNum, uint entryNum);
-
-	/**
-	* Gets a line of text of the following types:
-	* - text (ATS) - 500 - 599
-	* - auto dialog (AAD) - 600 - 699
-	* - inventory text (INV) - 700 - 799
-	* - use text (USE) - 800 - 899
-	*/
-	TextEntry *getText(uint dialogNum, uint entryNum);
-};
-
-class ErrorMessage : public Resource {
-public:
-	ErrorMessage(Common::String filename) : Resource(filename) {}
-	~ErrorMessage() override {}
-
-	Common::String getErrorMessage(uint num);
-};
-
-class Font {
-public:
-	Font(Common::String filename);
-	virtual ~Font();
-
-	::Graphics::Surface *getLine(const Common::String &text);
-
-private:
-	uint16 _count, _first, _last, _width, _height;
-
-	::Graphics::Surface _fontSurface;
-};
-
-} // End of namespace Chewy
-
-#endif


Commit: 165ea7c29fb65ef49d12cc4d8ac3b73b68cf8194
    https://github.com/scummvm/scummvm/commit/165ea7c29fb65ef49d12cc4d8ac3b73b68cf8194
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-03T18:34:39-08:00

Commit Message:
CHEWY: Initial commit

Changed paths:
  A engines/chewy/ailclass.cpp
  A engines/chewy/ailclass.h
  A engines/chewy/ani_dat.cpp
  A engines/chewy/ani_dat.h
  A engines/chewy/atds.cpp
  A engines/chewy/atds.h
  A engines/chewy/bitclass.h
  A engines/chewy/ch_icm.cpp
  A engines/chewy/ch_icm.h
  A engines/chewy/cursor.cpp
  A engines/chewy/cursor.h
  A engines/chewy/datei.cpp
  A engines/chewy/datei.h
  A engines/chewy/debug.cpp
  A engines/chewy/debug.h
  A engines/chewy/defines.h
  A engines/chewy/detail.cpp
  A engines/chewy/detail.h
  A engines/chewy/effect.cpp
  A engines/chewy/effect.h
  A engines/chewy/episode1.cpp
  A engines/chewy/episode1.h
  A engines/chewy/episode2.cpp
  A engines/chewy/episode2.h
  A engines/chewy/episode3.cpp
  A engines/chewy/episode3.h
  A engines/chewy/episode4.cpp
  A engines/chewy/episode4.h
  A engines/chewy/fehler.cpp
  A engines/chewy/fehler.h
  A engines/chewy/file.cpp
  A engines/chewy/flic.cpp
  A engines/chewy/flic.h
  A engines/chewy/gedclass.cpp
  A engines/chewy/gedclass.h
  A engines/chewy/global.cpp
  A engines/chewy/global.h
  A engines/chewy/inits.cpp
  A engines/chewy/io_game.cpp
  A engines/chewy/io_game.h
  A engines/chewy/m_event.cpp
  A engines/chewy/main.cpp
  A engines/chewy/main.h
  A engines/chewy/maus.cpp
  A engines/chewy/maus.h
  A engines/chewy/mcga.cpp
  A engines/chewy/mcga.h
  A engines/chewy/memory.cpp
  A engines/chewy/memory.h
  A engines/chewy/menus.cpp
  A engines/chewy/menus.h
  A engines/chewy/movclass.cpp
  A engines/chewy/movclass.h
  A engines/chewy/ngsdefs.h
  A engines/chewy/ngshext.h
  A engines/chewy/ngstypes.h
  A engines/chewy/objekt.h
  A engines/chewy/objekte.cpp
  A engines/chewy/objekte.h
  A engines/chewy/r_event.cpp
  A engines/chewy/resource.cpp
  A engines/chewy/resource.h
  A engines/chewy/room.cpp
  A engines/chewy/room.h
  A engines/chewy/sound.cpp
  A engines/chewy/sound.h
  A engines/chewy/sprite.cpp
  A engines/chewy/t_event.cpp
  A engines/chewy/text.cpp
  A engines/chewy/text.h
  A engines/chewy/timer.cpp
  A engines/chewy/timer.h
  A engines/chewy/types.h
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/detection.cpp
    engines/chewy/module.mk
    engines/chewy/video/cfo_decoder.cpp
    engines/chewy/video/cfo_decoder.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
new file mode 100644
index 00000000000..c7827005f98
--- /dev/null
+++ b/engines/chewy/ailclass.cpp
@@ -0,0 +1,904 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
+#define FORBIDDEN_SYMBOL_EXCEPTION_fread
+#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
+
+#include "engines/chewy/chewy.h"
+#include "engines/chewy/ailclass.h"
+#include "engines/chewy/ngshext.h"
+
+#define MAX_VOICES 8
+#define NORMAL_PLAYBACK 0
+#define PATTERN_PLAYBACK 1
+#define SEQUENCE_PLAYBACK 2
+#define FADE_OUT 1
+#define FADE_IN 2
+
+static int16 FreqTable[] = {
+	856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453,
+	428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226,
+	214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113,
+	107, 101, 95, 90, 85, 80, 76, 71, 67, 64, 60, 57,
+
+	862, 814, 768, 725, 684, 646, 610, 575, 543, 513, 484, 457,
+	431, 407, 384, 363, 342, 323, 305, 288, 272, 256, 242, 228,
+	216, 203, 192, 181, 171, 161, 152, 144, 136, 128, 121, 114,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	868, 820, 774, 730, 689, 651, 614, 580, 547, 516, 487, 460,
+	434, 410, 387, 365, 345, 325, 307, 290, 274, 258, 244, 230,
+	217, 205, 193, 183, 172, 163, 154, 145, 137, 129, 122, 115,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	875, 826, 779, 736, 694, 655, 619, 584, 551, 520, 491, 463,
+	437, 413, 390, 368, 347, 328, 309, 292, 276, 260, 245, 232,
+	219, 206, 195, 184, 174, 164, 155, 146, 138, 130, 123, 116,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	881, 832, 785, 741, 699, 660, 623, 588, 555, 524, 494, 467,
+	441, 416, 392, 370, 350, 330, 312, 294, 278, 262, 247, 233,
+	220, 208, 196, 185, 175, 165, 156, 147, 139, 131, 123, 117,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	887, 838, 791, 746, 704, 665, 628, 592, 559, 528, 498, 470,
+	444, 419, 395, 373, 352, 332, 314, 296, 280, 264, 249, 235,
+	222, 209, 198, 187, 176, 166, 157, 148, 140, 132, 125, 118,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	894, 844, 796, 752, 709, 670, 632, 597, 563, 532, 502, 474,
+	447, 422, 398, 376, 355, 335, 316, 298, 282, 266, 251, 237,
+	223, 211, 199, 188, 177, 167, 158, 149, 141, 133, 125, 118,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	900, 850, 802, 757, 715, 675, 636, 601, 567, 535, 505, 477,
+	450, 425, 401, 379, 357, 337, 318, 300, 284, 268, 253, 238,
+	225, 212, 200, 189, 179, 169, 159, 150, 142, 134, 126, 119,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	907, 856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480,
+	453, 428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240,
+	226, 214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	814, 768, 725, 684, 646, 610, 575, 543, 513, 484, 457, 431,
+	407, 384, 363, 342, 323, 305, 288, 272, 256, 242, 228, 216,
+	204, 192, 181, 171, 161, 152, 144, 136, 128, 121, 114, 108,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	820, 774, 730, 689, 651, 614, 580, 547, 516, 487, 460, 434,
+	410, 387, 365, 345, 325, 307, 290, 274, 258, 244, 230, 217,
+	205, 193, 183, 172, 163, 154, 145, 137, 129, 122, 115, 109,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	826, 779, 736, 694, 655, 619, 584, 551, 520, 491, 463, 437,
+	413, 390, 368, 347, 328, 309, 292, 276, 260, 245, 232, 219,
+	206, 195, 184, 174, 164, 155, 146, 138, 130, 123, 116, 109,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	832, 785, 741, 699, 660, 623, 588, 555, 524, 495, 467, 441,
+	416, 392, 370, 350, 330, 312, 294, 278, 262, 247, 233, 220,
+	208, 196, 185, 175, 165, 156, 147, 139, 131, 124, 117, 110,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	838, 791, 746, 704, 665, 628, 592, 559, 528, 498, 470, 444,
+	419, 395, 373, 352, 332, 314, 296, 280, 264, 249, 235, 222,
+	209, 198, 187, 176, 166, 157, 148, 140, 132, 125, 118, 111,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	844, 796, 752, 709, 670, 632, 597, 563, 532, 502, 474, 447,
+	422, 398, 376, 355, 335, 316, 298, 282, 266, 251, 237, 224,
+	211, 199, 188, 177, 167, 158, 149, 141, 133, 125, 118, 112,
+	94, 89, 83, 78, 73, 68, 64, 59, 55, 53, 48, 45,
+
+	850, 802, 757, 715, 674, 637, 601, 567, 535, 505, 477, 450,
+	425, 401, 379, 357, 337, 318, 300, 284, 268, 253, 239, 225,
+	213, 201, 189, 179, 169, 159, 150, 142, 134, 126, 119, 113,
+	100, 95, 89, 84, 79, 74, 70, 65, 61, 59, 54, 51,
+};
+static uint16 RealFreq[800] = {0};
+
+void *dig; // FIXME: DIG_DRIVER
+int smp[MAX_VOICES]; // FIXME: HSAMPLE
+int TimerHandle; // FIXME: HTIMER
+int16 TimerEnabled = false;
+int16 RealVoices;
+
+int16 SoundEnable = 0;
+int16 SoundCard = 0;
+int16 SoundMasterVol = 120;
+int16 MusicMasterVol = 120;
+int16 MusicSwitch = false;
+int16 SoundSwitch = false;
+int16 LoopEnable = OFF;
+int16 PlaybackMode = NORMAL_PLAYBACK;
+int16 StartPos = 0;
+int16 EndPos = 0;
+int16 MusicFade = OFF;
+uint16 FadeStart = 0;
+uint16 FadeCounter = 0;
+uint16 FadeVol = 0;
+uint16 GlobalFrequency = 22050;
+
+int16 MusicStatus = OFF;
+int16 InInterrupt = 0;
+int16 PatternCount = 6;
+int16 CurrentTempo = 6;
+int16 FineSpeedV;
+int16 FineSpeedN;
+int16 FineSpeedS;
+tmf_inst Instrument[4] = {{ 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }};
+uint16 InsFreq [4] = {0};
+char *Sample [4] = {0};
+
+tmf_header *ActiveSong;
+int16 SeqPointer;
+int16 PatPointer;
+int16 PatLine;
+char *Patterns[128];
+char *CurrentLine;
+int16 StereoPos [8] = {63};
+
+char *Dbuffer [8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
+uint32 DbufferLen [8] = {0};
+uint32 DbSampleLen [8] = {0};
+FILE *DbufferHandles [8] = {0};
+
+ailclass::ailclass() {
+#if 0
+	int16 i;
+	char *enstr;
+	char a[] = {116, 109, 121, 83, 120, 107, 124, 107, 103, 114, 0}; // "NGS-REVEAL"
+	char
+	b[] = {121, 117, 123, 116, 106, 133, 121, 127, 121, 122, 107, 115, 133, 78, 105, 79,
+		133, 116, 107, 125, 133, 109, 107, 116, 107, 120, 103, 122, 111, 117, 116, 133,
+		121, 117, 108, 122, 125, 103, 120, 107, 0 }; // "SOUND_SYSTEM_(C)_NEW_GENERATION_SOFTWARE"
+	for (i = 0; a[i] != 0; i++)
+		a[i] -= 38;
+	for (i = 0; b[i] != 0; i++)
+		b[i] -= 38;
+	enstr = (char *)getenv(a);
+	if (enstr) {
+		printf(b);
+		printf("\n");
+		delay(800);
+	}
+#endif
+	SoundEnable = false;
+	MusicFade = false;
+}
+
+ailclass::~ailclass() {
+	warning("STUB: ailclass::~ailclass()");
+
+#if 0
+	if (SoundCard != NONE)
+		AIL_shutdown();
+#endif
+}
+
+int16 ailclass::init(uint16 freq) {
+	warning("STUB: ailclass::init()");
+
+#if 0
+	int16 port, irq, dma;
+	int16 i;
+	GlobalFrequency = freq;
+	AIL_startup();
+	AIL_set_preference(DIG_SERVICE_RATE, 300);
+	AIL_set_preference(DIG_LATENCY, 30);
+	AIL_set_preference(DIG_USE_STEREO, YES);
+	AIL_set_preference(DIG_HARDWARE_SAMPLE_RATE, freq);
+	AIL_set_preference(DIG_USE_16_BITS, NO);
+	dig = AIL_install_DIG_INI();
+	if (dig == NULL) {
+		AIL_shutdown();
+		SoundCard = 0;
+	} else {
+		SoundEnable = TRUE;
+		for (i = 0; i < MAX_VOICES; i++) {
+			smp[i] = AIL_allocate_sample_handle(dig);
+			if (smp[i] == NULL) {
+				break;
+			}
+		}
+		RealVoices = i;
+		SoundCard = SOUNDBLASTER;
+	}
+	return (SoundCard);
+#endif
+	return SOUNDBLASTER;
+}
+
+int16 ailclass::init(char *midi_drv_name) {
+	return (SoundCard);
+}
+
+void ailclass::exit1() {
+	warning("STUB: ailclass::exit1()");
+	// AIL_shutdown();
+	SoundCard = NONE;
+}
+
+void ailclass::set_music_mastervol(int16 vol) {
+	vol <<= 1;
+	if (vol > 120)
+		vol = 120;
+	MusicMasterVol = vol;
+}
+
+void ailclass::set_sound_mastervol(int16 vol) {
+	vol <<= 1;
+	if (vol > 120)
+		vol = 120;
+	SoundMasterVol = vol;
+}
+
+void ailclass::set_channelvol(uint8 channel, uint8 vol) {
+	channel &= 3;
+	channel += 4;
+
+	warning("STUB: ailclass::set_channelvol()");
+#if 0
+	if (SoundEnable)
+		AIL_set_sample_volume(smp[channel], vol);
+#endif
+}
+
+void ailclass::set_stereo_pos(int16 channel, int16 pos) {
+	channel &= 7;
+	channel += 4;
+	pos &= 127;
+
+	warning("STUB: ailclass::set_stereo_pos()");
+#if 0
+	if (SoundEnable) {
+		StereoPos[channel] = pos;
+		AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
+	}
+#endif
+}
+
+void ailclass::disable_sound() {
+	SoundEnable = false;
+}
+
+void ailclass::init_mix_mode() {
+	warning("STUB: ailclass::init_mix_mode()");
+
+	if (SoundEnable) {
+		init_note_table(GlobalFrequency);
+#if 0
+		TimerHandle = AIL_register_timer(mod_irq);
+		if (TimerHandle != -1) {
+			AIL_set_timer_frequency(TimerHandle, 50);
+			AIL_start_timer(TimerHandle);
+			TimerEnabled = true;
+		} else
+#endif
+			TimerEnabled = false;
+		StereoPos[0] = 7;
+		StereoPos[1] = 120;
+		StereoPos[2] = 30;
+		StereoPos[3] = 90;
+	}
+}
+
+void ailclass::exit_mix_mode() {
+	warning("STUB: ailclass::exit_mix_mode()");
+
+#if 0
+	if (SoundEnable) {
+		if (TimerEnabled) {
+			AIL_stop_timer(TimerHandle);
+			AIL_release_timer_handle(TimerHandle);
+		}
+	}
+#endif
+}
+
+void ailclass::play_mod(tmf_header *th) {
+	char *tmp;
+	int16 i;
+	ActiveSong = th;
+	if (SoundEnable) {
+		tmp = (char *)ActiveSong;
+		tmp += sizeof(tmf_header);
+		for (i = 0; i < 128; i++) {
+			Patterns[i] = tmp;
+			tmp += 1024;
+		}
+		SeqPointer = 0;
+		PatLine = 0;
+		PatPointer = ActiveSong->sequenz[SeqPointer];
+		CurrentLine = Patterns[PatPointer];
+		CurrentTempo = 6;
+		PatternCount = 0;
+		FineSpeedV = 1;
+		FineSpeedN = 0;
+		FineSpeedS = 0;
+
+		MusicStatus = ON;
+	}
+}
+
+void ailclass::stop_mod() {
+	warning("STUB: ailclass::stop_mod()");
+
+#if 0
+	int16 i;
+	if (SoundEnable) {
+		for (i = 0; i < 4; i++) {
+			AIL_end_sample(smp[i]);
+			Instrument[i].replen = 0;
+		}
+		MusicStatus = OFF;
+	}
+#endif
+}
+
+void ailclass::continue_music() {
+	if (SoundEnable)
+		if (!strncmp(ActiveSong->id, "TMF", 3))
+			MusicStatus = ON;
+}
+
+void ailclass::play_sequence(int16 startpos, int16 endpos) {
+	if (SoundEnable) {
+		if (!strncmp(ActiveSong->id, "TMF", 3)) {
+			StartPos = startpos;
+			EndPos = endpos;
+			SeqPointer = StartPos;
+			PatLine = 0;
+			PatPointer = ActiveSong->sequenz[SeqPointer];
+			CurrentLine = Patterns[PatPointer];
+			MusicStatus = ON;
+		}
+	}
+}
+
+void ailclass::play_pattern(int16 pattnr) {
+	if (SoundEnable) {
+		if (!strncmp(ActiveSong->id, "TMF", 3)) {
+			StartPos = 0;
+			EndPos = 0;
+			SeqPointer = 0;
+			PatLine = 0;
+			PatPointer = pattnr;
+			CurrentLine = Patterns[PatPointer];
+			MusicStatus = ON;
+		}
+	}
+}
+
+void ailclass::set_loopmode(int16 mode) {
+	mode &= 1;
+	if (SoundEnable)
+		LoopEnable = mode;
+}
+
+void ailclass::fade_in(uint16 delay) {
+	FadeVol = MusicMasterVol;
+	MusicMasterVol = 0;
+	FadeStart = delay;
+	FadeCounter = 0;
+	MusicFade = FADE_IN;
+}
+
+void ailclass::fade_out(uint16 delay) {
+	FadeStart = delay;
+	FadeCounter = 0;
+	MusicFade = FADE_OUT;
+	FadeVol = MusicMasterVol;
+}
+
+void ailclass::get_musik_info(musik_info *mi) {
+	mi->musik_playing = MusicStatus;
+	mi->play_mode = 0;
+	mi->pattern_line = PatLine;
+	mi->sequence_pos = SeqPointer;
+	mi->cur_pattnr = PatPointer;
+}
+
+void ailclass::get_channel_info(channel_info *ch, int16 kanal) {
+	warning("STUB: ailclass::get_channel_info()");
+
+#if 0
+	ch->finetune = Instrument[kanal].finetune;
+	ch->volume = Instrument[kanal].insvol;
+	ch->repstart = Instrument[kanal].repstart;
+	ch->replen = Instrument[kanal].replen;
+	ch->len = Instrument[kanal].laenge;
+	ch->pointer = (dword)Sample[kanal];
+	ch->pos = AIL_sample_position(smp[kanal]);
+#endif
+}
+
+int16 ailclass::music_playing() {
+	return (MusicStatus);
+}
+
+int16 ailclass::get_sample_status(int16 kanal) {
+	warning("STUB: ailclass::get_sample_status()");
+
+#if 0
+	int16 ret;
+	kanal &= 3;
+	kanal += 4;
+	ret = AIL_sample_status(smp[kanal]);
+	return (ret);
+#endif
+	return 0;
+}
+
+void ailclass::init_note_table(uint16 sfreq) {
+	float TimerFreq;
+	TimerFreq = 7093789.2f;
+	for (int j = 0; j < 16; j++) {
+		for (int i = 0; i < 48; i++)
+			RealFreq[(j * 48) + i] = (uint16)(TimerFreq / (float)(FreqTable[(j * 48) + i] << 1));
+
+	}
+}
+
+void ailclass::play_voc(char *anf_adr, int16 kanal, int16 vol, int16 rep) {
+	warning("STUB: ailclass::play_voc()");
+
+#if 0
+	byte *vptr = 0;
+	byte blockt;
+	byte freq = 0;
+	dword blocklen;
+	uint16 RealFrq;
+	if (SoundEnable) {
+		vptr = (byte *)anf_adr;
+		vol = (vol << 1) & 127;
+		kanal &= 3;
+		kanal += 4;
+		while (*vptr != 0) {
+			blockt = *vptr++;
+			if (blockt > 7)
+				blockt = 8;
+			blocklen = (uint32) * vptr++;
+			blocklen += ((uint32) * vptr++) << 8;
+			blocklen += ((uint32) * vptr++) << 16;
+			if (blockt == 1) {
+				freq = vptr[0];
+				RealFrq = 1000000 / (256 - freq);
+				AIL_init_sample(smp[kanal]);
+				AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
+				AIL_set_sample_address(smp[kanal], vptr + 2, blocklen);
+				AIL_set_sample_playback_rate(smp[kanal], RealFrq);
+				AIL_set_sample_volume(smp[kanal], vol);
+				AIL_set_sample_loop_count(smp[kanal], rep);
+				AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
+				AIL_start_sample(smp[kanal]);
+			}
+			vptr += blocklen;
+		}
+	}
+#endif
+}
+
+void ailclass::play_raw(int16 kanal, char *sp, uint32 len,
+                        uint16 freqwert, int16 volume, int16 rep) {
+	warning("STUB: ailclass::play_raw()");
+
+#if 0
+	kanal &= 3;
+	kanal += 4;
+	if (SoundEnable) {
+		AIL_init_sample(smp[kanal]);
+		AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
+		AIL_set_sample_address(smp[kanal], sp, len);
+		AIL_set_sample_playback_rate(smp[kanal], freqwert);
+		AIL_set_sample_volume(smp[kanal], volume);
+		AIL_set_sample_loop_count(smp[kanal], rep);
+		AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
+		AIL_start_sample(smp[kanal]);
+	}
+#endif
+}
+
+void ailclass::stop_sound() {
+	warning("STUB: ailclass::stop_sound()");
+
+#if 0
+	int16 i;
+	for (i = 4; i < 8; i++)
+		AIL_stop_sample(smp[i]);
+#endif
+}
+
+void ailclass::continue_sound() {
+	warning("STUB: ailclass::continue_sound()");
+
+#if 0
+	int16 i;
+	for (i = 4; i < 8; i++)
+		AIL_resume_sample(smp[i]);
+#endif
+}
+
+void ailclass::end_sound() {
+	warning("STUB: ailclass::end_sound()");
+
+#if 0
+	int16 i;
+	for (i = 4; i < 8; i++)
+		AIL_end_sample(smp[i]);
+#endif
+}
+
+void ailclass::stop_sample(int16 kanal) {
+	warning("STUB: ailclass::stop_sample()");
+
+#if 0
+	kanal &= 3;
+	kanal += 4;
+	AIL_stop_sample(smp[kanal]);
+#endif
+}
+
+void ailclass::continue_sample(int16 kanal) {
+	warning("STUB: ailclass::continue_sample()");
+
+#if 0
+	kanal &= 3;
+	kanal += 4;
+	AIL_resume_sample(smp[kanal]);
+#endif
+}
+
+void ailclass::end_sample(int16 kanal) {
+	warning("STUB: ailclass::end_sample()");
+
+#if 0
+	kanal &= 3;
+	kanal += 4;
+	AIL_end_sample(smp[kanal]);
+#endif
+}
+
+void ailclass::init_double_buffer(char *b1, char *b2, uint32 len, int16 kanal) {
+	kanal &= 3;
+	kanal += 4;
+	Dbuffer [kanal][0] = b1;
+	Dbuffer [kanal][1] = b2;
+	DbufferLen [kanal] = len;
+}
+
+void ailclass::start_db_voc(void *v, int16 kanal, int16 vol) {
+	warning("STUB: ailclass::start_db_voc()");
+
+#if 0
+	byte *vptr = 0;
+	byte blockt;
+	byte freq = 0;
+	dword blocklen;
+	uint16 RealFrq;
+	kanal &= 3;
+	kanal += 4;
+	vol = (vol << 1) & 127;
+	if ((SoundEnable) && (DbufferLen[kanal] != 0) && (voc != 0) &&
+	        (Dbuffer[kanal][0] != 0) && (Dbuffer[kanal][1] != 0)) {
+		memset(Dbuffer[kanal][0], 0, DbufferLen[kanal]);
+		memset(Dbuffer[kanal][1], 0, DbufferLen[kanal]);
+		do {
+			blockt = fgetc(voc);
+			if (blockt > 7)
+				blockt = 8;
+			blocklen = (uint32) fgetc(voc);
+			blocklen += ((uint32)fgetc(voc)) << 8;
+			blocklen += ((uint32)fgetc(voc)) << 16;
+			if (blockt != 1)
+				fseek(voc, blocklen, SEEK_CUR);
+		} while ((blockt != 1) && (blockt != 0));
+		if ((blockt == 1) && (!modul)) {
+			freq = fgetc(voc);
+			RealFrq = 1000000 / (256 - freq);
+			if (blocklen > DbufferLen[kanal]) {
+				DbufferHandles[kanal] = voc;
+				DbSampleLen[kanal] = blocklen;
+				AIL_init_sample(smp[kanal]);
+				AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
+				AIL_set_sample_playback_rate(smp[kanal], RealFrq);
+				AIL_set_sample_volume(smp[kanal], vol);
+				AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
+				AIL_load_sample_buffer(smp[kanal], 0, Dbuffer[kanal][0],
+				                       DbufferLen[kanal]);
+			} else {
+				DbSampleLen[kanal] = 0;
+				if (!fread(Dbuffer[kanal][0], blocklen, 1, voc)) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				}
+				if (!modul) {
+					AIL_init_sample(smp[kanal]);
+					AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
+					AIL_set_sample_address(smp[kanal], Dbuffer[kanal][0], blocklen);
+					AIL_set_sample_playback_rate(smp[kanal], RealFrq);
+					AIL_set_sample_volume(smp[kanal], vol);
+					AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
+					AIL_start_sample(smp[kanal]);
+				}
+			}
+		}
+	}
+#endif
+}
+
+void ailclass::serve_db_samples() {
+	warning("STUB: ailclass::serve_db_samples()");
+
+#if 0
+	int16 i;
+	int16 BufNr;
+	dword len;
+	for (i = 4; (i < 8) && (!modul); i++) {
+		if (DbSampleLen[i] != 0) {
+			BufNr = AIL_sample_buffer_ready(smp[i]);
+			if (BufNr != -1) {
+				if (DbSampleLen[i] > DbufferLen[i]) {
+					len = DbufferLen[i];
+					DbSampleLen[i] -= DbufferLen[i];
+				} else {
+					len = DbSampleLen[i];
+					DbSampleLen[i] = 0;
+				}
+				if (!fread(Dbuffer[i][BufNr], len, 1, DbufferHandles[i])) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				} else
+					AIL_load_sample_buffer(smp[i], BufNr, Dbuffer[i][BufNr], len);
+			}
+		} else if (DbufferHandles[i]) {
+			BufNr = AIL_sample_buffer_ready(smp[i]);
+			if (BufNr != -1) {
+				AIL_load_sample_buffer(smp[i], BufNr, Dbuffer[i][BufNr], 0);
+				DbufferHandles[i] = 0;
+			}
+		}
+	}
+#endif
+}
+
+void mod_irq() {
+	if (!InInterrupt) {
+		++InInterrupt;
+		if (MusicSwitch && (MusicStatus == ON)) {
+			check_sample_end();
+			if (PatternCount <= 0) {
+				PatternCount = CurrentTempo;
+				DecodePatternLine();
+			}
+			if (MusicFade == FADE_IN) {
+				if (!FadeCounter) {
+					FadeCounter = FadeStart;
+					if ((MusicMasterVol + 2) <= FadeVol)
+						MusicMasterVol += 2;
+					else {
+						MusicFade = OFF;
+						MusicMasterVol = FadeVol;
+					}
+				} else
+					--FadeCounter;
+			} else if (MusicFade == FADE_OUT) {
+				if (!FadeCounter) {
+					FadeCounter = FadeStart;
+					if ((MusicMasterVol - 2) > 0)
+						MusicMasterVol -= 2;
+					else {
+						MusicFade = OFF;
+						MusicStatus = OFF;
+						MusicMasterVol = FadeVol;
+					}
+				} else
+					--FadeCounter;
+			}
+		}
+		PatternCount -= FineSpeedV;
+		FineSpeedS += FineSpeedN;
+		while (FineSpeedS > 1000) {
+			FineSpeedS -= 1000;
+			--PatternCount;
+		}
+	}
+	--InInterrupt;
+}
+
+void check_sample_end() {
+	warning("STUB: ailclass::check_sample_end()");
+
+#if 0
+	int16 i;
+	for (i = 0; i < 4; i++) {
+		if (AIL_sample_status(smp[i]) != SMP_PLAYING) {
+			if (Instrument[i].replen >= 10) {
+				AIL_init_sample(smp[i]);
+				AIL_set_sample_type(smp[i], DIG_F_MONO_8, 0);
+				AIL_set_sample_address(smp[i], Sample[i] +
+				                       Instrument[i].repstart,
+				                       Instrument[i].replen);
+				AIL_set_sample_playback_rate(smp[i], InsFreq[i]);
+				if ((byte)Instrument[i].insvol > (byte)(MusicMasterVol))
+					Instrument[i].insvol = (byte)MusicMasterVol;
+				AIL_set_sample_volume(smp[i], Instrument[i].insvol);
+				AIL_set_sample_pan(smp[i], StereoPos[i]);
+				AIL_start_sample(smp[i]);
+			}
+		}
+	}
+#endif
+}
+
+void DecodePatternLine() {
+	DecodeChannel(0);
+	DecodeChannel(1);
+	DecodeChannel(2);
+	DecodeChannel(3);
+	++PatLine;
+	if (PatLine > 63) {
+		PatLine = 0;
+		++SeqPointer;
+		switch (PlaybackMode) {
+		case NORMAL_PLAYBACK:
+			if (SeqPointer < ActiveSong->lied_len) {
+				PatPointer = ActiveSong->sequenz[SeqPointer];
+				CurrentLine = Patterns[PatPointer];
+			} else {
+				if (LoopEnable == OFF)
+					MusicStatus = OFF;
+				else {
+					PatLine = 0;
+					SeqPointer = 0;
+					PatPointer = ActiveSong->sequenz[SeqPointer];
+					CurrentLine = Patterns[PatPointer];
+				}
+			}
+			break;
+
+		case SEQUENCE_PLAYBACK:
+			if (SeqPointer != EndPos) {
+				PatPointer = ActiveSong->sequenz[SeqPointer];
+				CurrentLine = Patterns[PatPointer];
+			} else {
+				if (LoopEnable == OFF)
+					MusicStatus = OFF;
+				else {
+					PatLine = 0;
+					SeqPointer = StartPos;
+					PatPointer = ActiveSong->sequenz[SeqPointer];
+					CurrentLine = Patterns[PatPointer];
+				}
+			}
+			break;
+
+		case PATTERN_PLAYBACK:
+			if (LoopEnable == OFF)
+				MusicStatus = OFF;
+			else {
+				PatLine = 0;
+				SeqPointer = 0;
+				PatPointer = StartPos;
+				CurrentLine = Patterns[PatPointer];
+			}
+			break;
+		}
+	}
+}
+
+void DecodeChannel(int16 ch) {
+	warning("STUB: ailclass::decode_channel()");
+
+#if 0
+	byte note, effect, inst, effpar;
+	tmf_inst *ti;
+	int16 tmp1;
+	dword tmp2;
+	ch &= 3;
+	ti = &Instrument[ch];
+	note = *CurrentLine;
+	++CurrentLine;
+	inst = *CurrentLine;
+	++CurrentLine;
+	effect = *CurrentLine;
+	++CurrentLine;
+	effpar = *CurrentLine;
+	++CurrentLine;
+	if (note <= 48) {
+		switch (effect) {
+		case 0x9:
+			break;
+
+		case 0xa:
+			if (effpar & 0xf0) {
+				effpar >>= 4;
+				ti->insvol += effpar;
+				if ((byte)ti->insvol > (byte)MusicMasterVol)
+					ti->insvol = (byte)MusicMasterVol;
+			} else {
+				effpar &= 0x0f;
+				if (ti->insvol > effpar)
+					ti->insvol -= effpar;
+				else
+					ti->insvol = 0;
+			}
+			AIL_set_sample_volume(smp[ch], ti->insvol);
+			break;
+
+		case 0xb:
+			PatLine = 63;
+			SeqPointer = effpar;
+			break;
+
+		case 0xc:
+			ti->insvol = effpar;
+			if (ti->insvol > (byte)MusicMasterVol)
+				ti->insvol = (byte)MusicMasterVol;
+			AIL_set_sample_volume(smp[ch], ti->insvol);
+			break;
+
+		case 0xd:
+			PatLine = 63;
+			break;
+
+		case 0xe:
+			break;
+
+		case 0xf:
+			if (effpar >= 0x20) {
+				FineSpeedV = effpar / 125;
+				FineSpeedN = ((effpar % 125) * 1000) / 125;
+			} else {
+				CurrentTempo = (int16) effpar;
+				FineSpeedV = 1;
+				FineSpeedN = 0;
+				FineSpeedS = 0;
+			}
+			break;
+		}
+		if (note < 48) {
+			InsFreq[ch] = RealFreq[note];
+			if (inst > 0) {
+				--inst;
+				memcpy(ti, &ActiveSong->instrument[inst], sizeof(tmf_inst));
+				Sample[ch] = ActiveSong->ipos[inst];
+			}
+
+			if (ti->insvol > (byte)MusicMasterVol)
+				ti->insvol = (byte)MusicMasterVol;
+			AIL_end_sample(smp[ch]);
+			while (AIL_sample_status(smp[ch]) == SMP_PLAYING);
+			AIL_init_sample(smp[ch]);
+			AIL_set_sample_type(smp[ch], DIG_F_MONO_8, 0);
+			AIL_set_sample_address(smp[ch], Sample[ch], ti->laenge);
+			AIL_set_sample_playback_rate(smp[ch], InsFreq[ch]);
+			AIL_set_sample_volume(smp[ch], ti->insvol);
+			AIL_set_sample_pan(smp[ch], StereoPos[ch]);
+			AIL_start_sample(smp[ch]);
+		}
+	}
+#endif
+}
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
new file mode 100644
index 00000000000..b7725d582ed
--- /dev/null
+++ b/engines/chewy/ailclass.h
@@ -0,0 +1,82 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_AILCLASS_H
+#define CHEWY_AILCLASS_H
+
+#include "engines/chewy/ngstypes.h"
+
+void mod_irq();
+void check_sample_end();
+void DecodePatternLine();
+void DecodeChannel(int16 ch);
+
+class ailclass {
+public:
+	ailclass();
+	~ailclass();
+
+	int16 init(uint16 freq);
+	int16 init(char *midi_drv_name);
+	void exit1();
+
+	void set_music_mastervol(int16 vol);
+	void set_sound_mastervol(int16 vol);
+	void set_stereo_pos(int16 channel, int16 pos);
+	void set_channelvol(uint8 channel, uint8 vol);
+	void disable_sound();
+
+	void get_musik_info(musik_info *mi);
+	void get_channel_info(channel_info *mi, int16 kanal);
+	int16 music_playing();
+	int16 get_sample_status(int16 kanal);
+
+	void init_note_table(uint16 sfreq);
+	void init_mix_mode();
+	void exit_mix_mode();
+	void play_mod(tmf_header *th);
+	void stop_mod();
+	void continue_music();
+	void play_sequence(int16 startpos, int16 endpos);
+	void play_pattern(int16 pattnr);
+	void set_loopmode(int16 mode);
+	void fade_in(uint16 delay);
+	void fade_out(uint16 delay);
+
+	void play_voc(char *anf_adr, int16 kanal, int16 vol,
+	              int16 rep);
+	void play_raw(int16 kanal, char *voc, uint32 len,
+	              uint16 freqwert, int16 volume, int16 rep);
+	void end_sound();
+	void stop_sound();
+	void continue_sound();
+	void stop_sample(int16 kanal);
+	void continue_sample(int16 kanal);
+	void end_sample(int16 kanal);
+	void init_double_buffer(char *b1, char *b2,
+	                        uint32 len, int16 kanal);
+	// FIXME : was FILE*
+	void start_db_voc(void *voc, int16 kanal, int16 vol);
+	void serve_db_samples();
+private:
+};
+#endif
diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
new file mode 100644
index 00000000000..b98cf98bbd2
--- /dev/null
+++ b/engines/chewy/ani_dat.cpp
@@ -0,0 +1,253 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+
+#define STERNE_ANI 17
+#define TUER_ZU_ANI 3
+#define GITTER_BLITZEN 7
+
+AniBlock ablock0[5] = {
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 7, 3, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock1[2] = {
+	{10, 1, ANI_VOR, ANI_WAIT, 0},
+	{13, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock2[2] = {
+	{12, 1, ANI_VOR, ANI_WAIT, 0},
+	{GITTER_BLITZEN, 1, ANI_VOR, ANI_GO, 0}
+};
+
+AniBlock ablock3[2] = {
+	{ 4, 2, ANI_VOR, ANI_GO, 0},
+	{11, 255, ANI_VOR, ANI_GO, 0}
+};
+
+AniBlock ablock4[2] = {
+	{GITTER_BLITZEN, 3, ANI_VOR, ANI_WAIT, 0},
+	{GITTER_BLITZEN, 12, ANI_VOR, ANI_GO, 0}
+};
+
+AniBlock ablock5[3] = {
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 8, 9, ANI_VOR, ANI_GO, 0},
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
+
+};
+
+AniBlock ablock6[3] = {
+	{ 3, 1, ANI_VOR, ANI_GO, 0 },
+	{13, 1, ANI_VOR, ANI_WAIT, 0},
+	{14, 4, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock7[2] = {
+	{ 1, 2, ANI_VOR, ANI_WAIT, 0},
+	{ 2, 1, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock25[3] = {
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 5, 255, ANI_VOR, ANI_GO, 0},
+	{ 4, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock8[3] = {
+	{ 10, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 12, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 11, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock9[3] = {
+	{ 10, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 13, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 11, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock10[4] = {
+
+	{ 15, 2, ANI_VOR, ANI_WAIT, 0},
+	{ 16, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 17, 2, ANI_VOR, ANI_WAIT, 0},
+	{ 18, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock12[2] = {
+	{8, 1, ANI_VOR, ANI_WAIT, 0},
+	{9, 2, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock13[2] = {
+	{10, 1, ANI_VOR, ANI_WAIT, 0},
+	{11, 255, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock17[2] = {
+	{8, 1, ANI_VOR, ANI_WAIT, 0},
+	{9, 255, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock18[2] = {
+	{7, 1, ANI_VOR, ANI_WAIT, 0},
+	{7, 1, ANI_RUECK, ANI_WAIT, 0},
+};
+
+AniBlock ablock16[2] = {
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{1, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock20[3] = {
+	{5, 3, ANI_VOR, ANI_GO, 0},
+	{6, 3, ANI_VOR, ANI_GO, 0},
+	{7, 3, ANI_VOR, ANI_WAIT, 0}
+};
+
+AniBlock ablock21[2] = {
+	{8, 1, ANI_VOR, ANI_WAIT, 0},
+	{23, 255, ANI_RUECK, ANI_GO, 0},
+};
+
+AniBlock ablock22[2] = {
+	{13, 1, ANI_VOR, ANI_WAIT, 0},
+	{14, 13, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock23[2] = {
+	{11, 1, ANI_VOR, ANI_WAIT, 0},
+	{12, 1, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock24[2] = {
+	{15, 1, ANI_VOR, ANI_WAIT, 0},
+	{16, 7, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock19[3] = {
+	{12, 1, ANI_VOR, ANI_WAIT, 0},
+	{13, 4, ANI_VOR, ANI_WAIT, 0},
+	{14, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock14[2] = {
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{3, 255, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock15[4] = {
+	{0, 2, ANI_VOR, ANI_GO, 0},
+	{1, 255, ANI_VOR, ANI_GO, 0},
+	{2, 255, ANI_VOR, ANI_GO, 0},
+	{3, 255, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock26[4] = {
+	{2, 255, ANI_VOR, ANI_GO, 0},
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{0, 1, ANI_RUECK, ANI_WAIT, 0},
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock27[5] = {
+	{0, 1, ANI_RUECK, ANI_WAIT, 0},
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{0, 1, ANI_RUECK, ANI_WAIT, 0},
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{0, 1, ANI_RUECK, ANI_WAIT, 0},
+};
+
+AniBlock ablock30[3] = {
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{1, 4, ANI_VOR, ANI_WAIT, 0},
+	{2, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock28[2] = {
+	{4, 1, ANI_VOR, ANI_WAIT, 0},
+	{5, 3, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock31[3] = {
+	{0, 1, ANI_VOR, ANI_GO, 0},
+	{1, 2, ANI_VOR, ANI_GO, 0},
+	{5, 1, ANI_RUECK, ANI_WAIT, 0},
+};
+
+AniBlock ablock29[2] = {
+	{8, 1, ANI_VOR, ANI_WAIT, 0},
+	{9, 4, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock33[2] = {
+	{2, 1, ANI_VOR, ANI_WAIT, 0},
+	{3, 255, ANI_VOR, ANI_GO, 0},
+};
+
+AniBlock ablock32[2] = {
+
+	{6, 255, ANI_VOR, ANI_GO, 0},
+	{2, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock34[2] = {
+	{7, 1, ANI_VOR, ANI_WAIT, 0},
+	{6, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock36[2] = {
+	{6, 1, ANI_VOR, ANI_WAIT, 0},
+	{7, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock37[5] = {
+	{6, 1, ANI_VOR, ANI_WAIT, 0},
+	{7, 3, ANI_VOR, ANI_WAIT, 0},
+	{6, 1, ANI_RUECK, ANI_WAIT, 0},
+	{5, 1, ANI_RUECK, ANI_WAIT, 0},
+	{2, 1, ANI_RUECK, ANI_WAIT, 0},
+};
+
+AniBlock ablock35[7] = {
+	{2, 1, ANI_VOR, ANI_WAIT, 0},
+	{7, 1, ANI_VOR, ANI_WAIT, 0},
+	{8, 3, ANI_VOR, ANI_WAIT, 0},
+	{4, 1, ANI_VOR, ANI_WAIT, 0},
+	{5, 1, ANI_VOR, ANI_WAIT, 0},
+	{9, 1, ANI_VOR, ANI_WAIT, 0},
+	{5, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock38[2] = {
+	{5, 1, ANI_VOR, ANI_WAIT, 0},
+	{6, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
+AniBlock ablock39[3] = {
+	{15, 1, ANI_VOR, ANI_WAIT, 0},
+	{17, 1, ANI_VOR, ANI_WAIT, 0},
+	{15, 1, ANI_RUECK, ANI_WAIT, 0},
+};
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
new file mode 100644
index 00000000000..ba740690e09
--- /dev/null
+++ b/engines/chewy/ani_dat.h
@@ -0,0 +1,191 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_ANIDAT_H
+#define CHEWY_ANIDAT_H
+
+#define SIB_KABEL_R1 1
+#define SIB_MONOKEL 6
+#define SIB_GBUCH 7
+#define SIB_TERMINAL_R5 8
+#define SIB_KNOPF_R5 9
+#define SIB_TUERE_R5 10
+#define SIB_TKNOPF1_R6 11
+#define SIB_SEIL 12
+#define SIB_TKNOPF2_R6 13
+#define SIB_TKNOPF3_R6 15
+#define SIB_BOLA_SCHACHT 17
+#define SIB_BOLA_KNOPF_R6 18
+#define SIB_BOLA_FLECK_R6 20
+#define SIB_BOLA_R6 21
+#define SIB_TKNOPF1_R7 22
+#define SIB_HEBEL_R7 23
+#define SIB_KLINGEL_R7 24
+#define SIB_GIPS_R7 25
+#define SIB_TKNOPF2_R7 26
+#define SIB_SCHLOTT_R7 27
+#define SIB_LHAKEN_R7 28
+#define SIB_RHAKEN_R7 29
+#define SIB_FOLTER_R8 30
+#define SIB_GTUER 31
+#define SIB_TUER_R8 32
+#define SIB_GIPS_R8 33
+#define SIB_DEE_PAINT_R9 34
+#define SIB_GGITTER_R9 35
+#define SIB_SURIMY_R10 36
+#define SIB_PAINT_R22 37
+#define SIB_SCHLITZ_R11 38
+#define SIB_TKNOPF1_R11 39
+#define SIB_BANDKNOPF_R13 40
+#define SIB_TKNOPF2_R11 41
+#define SIB_TKNOPF3_R11 42
+#define SIB_CARTRIDGE_R23 43
+#define SIB_FLUXO_R23 44
+#define SIB_TRANSLATOR_23 45
+#define SIB_FEUER_R14 46
+#define SIB_TALISMAN_R12 47
+#define SIB_ROEHRE_R12 48
+#define SIB_L_ROEHRE_R12 49
+#define SIB_GITTER_R16 50
+#define SIB_SCHALTER1_R21 51
+#define SIB_SCHALTER2_R21 52
+#define SIB_SCHALTER3_R21 53
+#define SIB_SEIL_R21 54
+#define SIB_GITTER1_R21 55
+#define SIB_GITTER2_R21 56
+#define SIB_FLUESSIG_R17 57
+#define SIB_HEBEL_R17 58
+#define SIB_CART1_R18 59
+#define SIB_TUERKNOPF_R18 60
+#define SIB_CART_FACH_R18 61
+#define SIB_SCHLAUCH_R25 62
+#define SIB_SCHLAUCH_R26 63
+#define SIB_TRICHTER_R26 64
+#define SIB_ANGEL0_R26 65
+#define SIB_MILCH_R27 66
+#define SIB_AUTO_SITZ 67
+#define SIB_PUTE_R34 68
+#define SIB_KAFFEE_R33 69
+#define SIB_ZAPPER_R39 70
+#define SIB_KNOCHEN_R35 71
+#define SIB_RADIO_R35 72
+#define SIB_TOPF_R31 73
+#define SIB_HFUTTER1_R37 74
+#define SIB_HFUTTER2_R37 75
+#define SIB_KUERBIS_R37 76
+#define SIB_AUTO_R28 77
+#define SIB_SURIMY_R27 78
+#define SIB_ZEITUNG_R27 79
+#define SIB_BKASTEN_R28 80
+#define SIB_MUENZE_R40 81
+#define SIB_VISIT_R53 82
+#define SIB_CIGAR_R50 83
+#define SIB_KAPPE_R51 84
+#define SIB_FLASCHE_R51 85
+#define SIB_LAMPE_R52 86
+#define SIB_AUSRUEST_R51 87
+#define SIB_KAUTABAK_R56 88
+#define SIB_ASCHE_R64 89
+#define SIB_PIRANHA 90
+#define SIB_SCHALL 91
+#define SIB_ARTEFAKT 92
+#define SIB_AUSRUEST_R52 93
+
+extern AniBlock ablock0[5];
+
+extern AniBlock ablock1[2];
+
+extern AniBlock ablock2[2];
+
+extern AniBlock ablock3[2];
+
+extern AniBlock ablock4[2];
+
+extern AniBlock ablock5[5];
+
+extern AniBlock ablock6[3];
+
+extern AniBlock ablock7[2];
+
+extern AniBlock ablock25[3];
+
+extern AniBlock ablock8[3];
+
+extern AniBlock ablock9[3];
+
+extern AniBlock ablock10[4];
+
+extern AniBlock ablock12[2];
+
+extern AniBlock ablock13[2];
+
+extern AniBlock ablock17[2];
+
+extern AniBlock ablock18[2];
+
+extern AniBlock ablock16[2];
+
+extern AniBlock ablock20[3];
+
+extern AniBlock ablock21[2];
+
+extern AniBlock ablock22[2];
+
+extern AniBlock ablock23[2];
+
+extern AniBlock ablock24[2];
+
+extern AniBlock ablock19[3];
+
+extern AniBlock ablock14[2];
+
+extern AniBlock ablock15[4];
+
+extern AniBlock ablock26[4];
+
+extern AniBlock ablock27[5];
+
+extern AniBlock ablock30[3];
+
+extern AniBlock ablock28[2];
+
+extern AniBlock ablock31[3];
+
+extern AniBlock ablock29[2];
+
+extern AniBlock ablock33[2];
+
+extern AniBlock ablock32[2];
+
+extern AniBlock ablock34[2];
+
+extern AniBlock ablock36[2];
+
+extern AniBlock ablock37[5];
+
+extern AniBlock ablock35[7];
+
+extern AniBlock ablock38[2];
+
+extern AniBlock ablock39[3];
+
+#endif
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
new file mode 100644
index 00000000000..fe7b2202d86
--- /dev/null
+++ b/engines/chewy/atds.cpp
@@ -0,0 +1,1365 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
+#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
+#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
+#define FORBIDDEN_SYMBOL_EXCEPTION_fread
+#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
+#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+
+
+#include "engines/chewy/ngshext.h"
+#include "engines/chewy/atds.h"
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+extern char *err_str;
+int16 mouse_push;
+
+atdsys::atdsys() {
+	int16 i;
+	SplitStringInit init_ssi = { 0, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
+	aadv.Dialog = false;
+	aadv.StrNr = -1;
+	aadv.SilentCount = false;
+	adsv.Dialog = -1;
+	adsv.AutoDia = false;
+	adsv.StrNr = -1;
+	adsv.SilentCount = false;
+	atsv.Display = false;
+	atsv.SilentCount = false;
+	atdsv.Delay = &tmp_delay;
+	tmp_delay = 1;
+	atdsv.Silent = false;
+	atdsv.Display = DISPLAY_TXT;
+	atdsv.DiaNr = -1;
+	atdsv.aad_str = 0;
+	atdsv.SpeechHandle = 0;
+	atdsv.VocNr = -1;
+	ssret.Next = false;
+	ssr = &ssret;
+	for (i = 0; i < AAD_MAX_PERSON; i++)
+		ssi[i] = init_ssi;
+	inv_block_nr = -1;
+	inv_use_mem = false;
+	inzeig = in->get_in_zeiger();
+	for (i = 0; i < MAX_HANDLE; i++) {
+		atdshandle[i] = 0;
+		atdsmem[i] = 0;
+		atdspooloff[i] = 0;
+	}
+}
+
+atdsys::~atdsys() {
+	int16 i;
+	for (i = 0; i < MAX_HANDLE; i++) {
+		if (atdshandle[i])
+			warning("FIXME : close handler");
+
+		free(atdsmem[i]);
+	}
+	if (inv_use_mem)
+		free(inv_use_mem);
+}
+
+char atds_id[4][4] = { "ATS",
+                       "AAD",
+                       "ADS",
+                       "ADH",
+                     };
+
+void atdsys::set_font(char *font_adr, int16 fvorx, int16 fhoehe) {
+	atdsv.Font = font_adr;
+	atdsv.Fvorx = fvorx;
+	atdsv.Fhoehe = fhoehe;
+}
+
+void atdsys::set_delay(int16 *delay, int16 silent) {
+	atdsv.Delay = delay;
+	atdsv.Silent = silent;
+}
+
+void atdsys::set_string_end_func
+(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)) {
+	atdsv.aad_str = str_func;
+}
+
+void atdsys::set_display(int16 mode) {
+	atdsv.Display = mode;
+}
+
+int16 atdsys::get_delay(int16 txt_len) {
+	int16 max_len;
+	int16 z_len;
+	int16 ret;
+	z_len = (ssi->Width / ssi->Fvorx) + 1;
+	max_len = z_len * ssi->Zeilen;
+	if (txt_len > max_len)
+		txt_len = max_len;
+
+	ret = *atdsv.Delay * (txt_len + z_len);
+	return (ret);
+}
+
+SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
+	char *str_adr;
+	char *start_adr;
+	int16 zeichen_anz;
+	int16 count;
+	int16 tmp_count;
+	int16 ende;
+	int16 test_zeilen;
+	int16 ende1;
+	ssret.Anz = 0;
+	ssret.Next = false;
+	ssret.StrPtr = split_ptr;
+	ssret.X = split_x;
+	zeichen_anz = (ssi_->Width / ssi_->Fvorx) + 1;
+	memset(split_ptr, 0, sizeof(char *)*MAX_STR_SPLIT);
+	calc_txt_win(ssi_);
+	str_adr = ssi_->Str;
+	count = 0;
+	tmp_count = 0;
+	ende = 0;
+	start_adr = str_adr;
+	while (!ende) {
+		switch (*str_adr) {
+		case 0:
+			if (str_adr[1] != ATDS_END_TEXT) {
+				str_adr[0] = ' ';
+			}
+		case 0x20:
+			if (count < zeichen_anz && *str_adr == 0) {
+
+				tmp_count = count;
+			}
+			if (count < zeichen_anz && *str_adr != 0) {
+
+				tmp_count = count;
+				++str_adr;
+				++count;
+			} else {
+				split_ptr[ssret.Anz] = start_adr;
+				start_adr[tmp_count] = 0;
+				if (ssi_->Mode == SPLIT_MITTE)
+					split_x[ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
+				else
+					split_x[ssret.Anz] = ssi_->X;
+				++ssret.Anz;
+				if (ssret.Anz == ssi_->Zeilen) {
+					ende = 1;
+					ende1 = 0;
+					while (!ende1) {
+						if (*str_adr == ATDS_END_TEXT)
+							ende1 = true;
+						else if (*str_adr != ' ' && *str_adr != 0) {
+							ende1 = true;
+							ssret.Next = true;
+						}
+						++str_adr;
+					}
+				} else if (*str_adr == 0 && count < zeichen_anz) {
+					ende = 1;
+				} else {
+					str_adr = start_adr + tmp_count + 1;
+					start_adr = str_adr;
+					count = 0;
+					tmp_count = 0;
+				}
+			}
+			break;
+
+		case '!':
+		case '?':
+		case '.':
+		case ',':
+			if (str_adr[1] == 0 || str_adr[1] == ' ') {
+				if (*str_adr == ',')
+					test_zeilen = 1;
+				else
+					test_zeilen = 2;
+				++count;
+				++str_adr;
+				if ((ssret.Anz + test_zeilen) >= ssi_->Zeilen) {
+					if (count < zeichen_anz) {
+						tmp_count = count;
+						ende = 1;
+					}
+					split_ptr[ssret.Anz] = start_adr;
+					start_adr[tmp_count] = 0;
+					if (ssi_->Mode == SPLIT_MITTE)
+						split_x[ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
+					else
+						split_x[ssret.Anz] = ssi_->X;
+					++ssret.Anz;
+					ende1 = 0;
+					while (!ende1) {
+						if (*str_adr == ATDS_END_TEXT)
+							ende1 = true;
+						else if (*str_adr != ' ' && *str_adr != 0) {
+							ende1 = true;
+							ssret.Next = true;
+						}
+						++str_adr;
+					}
+					if (!ende) {
+						str_adr = start_adr + tmp_count + 1;
+						start_adr = str_adr;
+						count = 0;
+						tmp_count = 0;
+					}
+				}
+			} else {
+				++count;
+				++str_adr;
+			}
+			break;
+
+		default:
+			++count;
+			++str_adr;
+			break;
+
+		}
+	}
+	if (ssret.Anz <= ssi_->Zeilen)
+		ssret.Y = ssi_->Y + (ssi_->Zeilen - ssret.Anz) * ssi_->FHoehe;
+	else
+		ssret.Y = ssi_->Y;
+	return (&ssret);
+}
+
+void atdsys::str_null2leer(char *str_start, char *str_end) {
+	while (str_start < str_end) {
+		if (*str_start == 0)
+			*str_start = 32;
+		++str_start;
+	}
+}
+
+void atdsys::calc_txt_win(SplitStringInit *ssi_) {
+
+	if (ssi_->X - (ssi_->Width >> 1) < 2)
+		ssi_->X = 2;
+	else if (ssi_->X + (ssi_->Width >> 1) > (SCREEN_WIDTH - 2))
+		ssi_->X = ((SCREEN_WIDTH - 2) - ssi_->Width);
+	else
+		ssi_->X -= (ssi_->Width >> 1);
+
+	if (ssi_->Y - (ssi_->Zeilen * ssi_->FHoehe) < 2) {
+		ssi_->Y = 2;
+	} else if (ssi_->Y + (ssi_->Zeilen * ssi_->FHoehe) > (SCREEN_HEIGHT - 2))
+		ssi_->Y = (SCREEN_HEIGHT - 2) - (ssi_->Zeilen * ssi_->FHoehe);
+	else {
+		ssi_->Y -= (ssi_->Zeilen * ssi_->FHoehe);
+	}
+}
+
+void atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
+	ssi[nr] = ssinit[0];
+}
+
+void *atdsys::pool_handle(const char *fname_, const char *fmode) {
+	FILE *handle;
+	handle = fopen(fname_, fmode);
+	if (handle) {
+		close_handle(ATDS_HANDLE);
+		atdshandle[ATDS_HANDLE] = handle;
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+		err->set_user_msg(fname_);
+	}
+	return (handle);
+}
+
+void atdsys::set_speech_handle(void *speech_handle_) {
+	atdsv.SpeechHandle = speech_handle_;
+}
+
+void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chunk_start, int16 chunk_anz) {
+	char *tmp_adr;
+	ChunkHead Ch;
+	tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
+	if (!modul) {
+		if (handle) {
+			close_handle(mode);
+			atdshandle[mode] = handle;
+			atdsmem[mode] = tmp_adr;
+			atdspooloff[mode] = chunk_start;
+			switch (mode) {
+			case INV_USE_DATEI:
+				mem->file->select_pool_item(atdshandle[mode], atdspooloff[mode]);
+				fseek((FILE *)atdshandle[mode], -(sizeof(ChunkHead)), SEEK_CUR);
+
+				if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[mode])) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				} else {
+					inv_use_mem = (char *)calloc(Ch.size + 3l, 1);
+					if (!modul) {
+						if (Ch.size) {
+							if (!fread(inv_use_mem, Ch.size, 1, (FILE *)atdshandle[mode])) {
+								fcode = READFEHLER;
+								modul = DATEI;
+							} else
+								crypt(inv_use_mem, Ch.size);
+						}
+						inv_use_mem[Ch.size] = (char)BLOCKENDE;
+						inv_use_mem[Ch.size + 1] = (char)BLOCKENDE;
+						inv_use_mem[Ch.size + 2] = (char)BLOCKENDE;
+					}
+				}
+				break;
+
+			}
+		}
+	} else
+		err->set_user_msg(fname_);
+}
+
+void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
+	FILE *handle;
+	char *tmp_adr;
+
+	if (mode != INV_IDX_DATEI)
+		tmp_adr = atds_adr(fname_, 0, 20000);
+	if (!modul) {
+		handle = fopen(fname_, fmode);
+		if (handle) {
+			close_handle(mode);
+			atdshandle[mode] = handle;
+			atdsmem[mode] = tmp_adr;
+			switch (mode) {
+			case ADH_DATEI:
+				ads_block = (AdsBlock *)atdsmem[ADH_HANDLE];
+				break;
+
+			case INV_IDX_DATEI:
+				atdsmem[INV_IDX_HANDLE] = (char *)calloc(INV_STRC_ANZ * sizeof(InvUse), 1);
+				break;
+
+			}
+		} else {
+			modul = DATEI;
+			fcode = OPENFEHLER;
+			err->set_user_msg(fname_);
+		}
+	}
+}
+
+void atdsys::close_handle(int16 mode) {
+	if (atdshandle[mode])
+		fclose((FILE *)atdshandle[mode]);
+	atdshandle[mode] = 0;
+	if (atdsmem[mode])
+		free(atdsmem[mode]);
+	atdsmem[mode] = 0;
+}
+
+char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
+	char *tmp_adr;
+	uint32 size;
+	tmp_adr = NULL;
+	size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
+	if (size) {
+		tmp_adr = (char *)calloc(size + 3l, 1);
+	}
+	return (tmp_adr);
+}
+
+void atdsys::load_atds(int16 chunk_nr, int16 mode) {
+	FILE *handle;
+	ChunkHead Ch;
+	char *txt_adr;
+	handle = (FILE *)atdshandle[mode];
+	txt_adr = atdsmem[mode];
+	if (handle && txt_adr) {
+		mem->file->select_pool_item(handle, chunk_nr + atdspooloff[mode]);
+		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		if (!fread(&Ch, sizeof(ChunkHead), 1, handle)) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		} else {
+			if (Ch.size) {
+				if (!fread(txt_adr, Ch.size, 1, handle)) {
+					fcode = READFEHLER;
+					modul = DATEI;
+				} else if (mode != ADH_DATEI)
+					crypt(txt_adr, Ch.size);
+			}
+			txt_adr[Ch.size] = (char)BLOCKENDE;
+			txt_adr[Ch.size + 1] = (char)BLOCKENDE;
+			txt_adr[Ch.size + 2] = (char)BLOCKENDE;
+		}
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+	}
+}
+
+void atdsys::save_ads_header(int16 dia_nr) {
+	ChunkHead Ch;
+	if (atdshandle[ADH_HANDLE]) {
+		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
+
+		fseek((FILE *)atdshandle[ADH_HANDLE], -sizeof(ChunkHead), SEEK_CUR);
+		if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[ADH_HANDLE])) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		} else {
+			fseek((FILE *)atdshandle[ADH_HANDLE], 0, SEEK_CUR);
+			if (Ch.size) {
+				if (!fwrite(atdsmem[ADH_HANDLE], Ch.size, 1, (FILE *)atdshandle[ADH_HANDLE])) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+				}
+			}
+		}
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+	}
+}
+
+void atdsys::crypt(char *txt_, uint32 size) {
+	uint8 *sp;
+	uint32 i;
+	sp = (uint8 *)txt_;
+	for (i = 0; i < size; i++) {
+		*sp = -(*sp);
+		++sp;
+	}
+}
+
+void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
+	switch (mode) {
+	case ATS_DATEI:
+		ats_st_header[0] = atsheader;
+		break;
+
+	case INV_USE_DATEI:
+		ats_st_header[1] = atsheader;
+		break;
+
+	case INV_USE_DEF:
+		ats_st_header[2] = atsheader;
+		break;
+
+	case INV_ATS_DATEI:
+		ats_st_header[3] = atsheader;
+		break;
+
+	}
+}
+
+void atdsys::set_ats_mem(int16 mode) {
+	switch (mode) {
+	case ATS_DATEI:
+		ats_sheader = ats_st_header[0];
+		atsmem = atdsmem[mode];
+		break;
+
+	case INV_USE_DATEI:
+		ats_sheader = ats_st_header[1];
+		atsmem = atdsmem[mode];
+		break;
+
+	case INV_USE_DEF:
+		ats_sheader = ats_st_header[2];
+		atsmem = inv_use_mem;
+		break;
+
+	case INV_ATS_DATEI:
+		ats_sheader = ats_st_header[3];
+		atsmem = atdsmem[mode];
+		break;
+
+	default:
+		break;
+
+	}
+}
+
+bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
+                        int16 *voc_nr) {
+	int16 txt_anz;
+	char *ptr;
+	*voc_nr = -1;
+	set_ats_mem(mode);
+	if (atsmem) {
+		atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
+		if (atsv.Ptr) {
+			atsv.Display = true;
+			ptr = atsv.Ptr;
+			atsv.TxtLen = 0;
+			while (*ptr++ != ATDS_END_TEXT)
+				++atsv.TxtLen;
+			if (*atsv.Ptr == '\xb0') { // FIXME. CHECK THE ACTUAL CODE
+
+				atsv.Display = false;
+			} else {
+				atsv.DelayCount = get_delay(atsv.TxtLen);
+				atsv.Color = color;
+				mouse_push = true;
+			}
+			*voc_nr = atsv.StrHeader->VocNr - ATDS_VOC_OFFSET;
+			if ((atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
+				atsv.Display = false;
+			}
+		} else
+			atsv.Display = false;
+	} else
+		atsv.Display = false;
+	return (atsv.Display);
+}
+
+void atdsys::stop_ats() {
+	atsv.Display = false;
+}
+
+int16 atdsys::ats_get_status() {
+	return (atsv.Display);
+}
+
+void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
+	int16 i;
+	char *tmp_ptr;
+	char *start_ptr;
+	SplitStringInit tmp_ssi;
+	if (atsv.Display) {
+		switch (in->get_switch_code()) {
+		case ESC:
+		case ENTER:
+		case MAUS_LINKS:
+			if (mouse_push == false) {
+				if (atsv.SilentCount <= 0) {
+					mouse_push = true;
+					atsv.DelayCount = 0;
+					inzeig->kbinfo->scan_code = 0;
+					inzeig->kbinfo->key_code = 0;
+				}
+			}
+			break;
+
+		default:
+			mouse_push = false;
+			break;
+
+		}
+		if (atsv.SilentCount <= 0) {
+			tmp_ptr = atsv.Ptr;
+			out->set_fontadr(atdsv.Font);
+			out->set_vorschub(atdsv.Fvorx, 0);
+			ats_ssi = ssi[0];
+			ats_ssi.Str = tmp_ptr;
+			ats_ssi.Fvorx = atdsv.Fvorx;
+			ats_ssi.FHoehe = atdsv.Fhoehe;
+			ats_ssi.X = x - scrx;
+			ats_ssi.Y = y - scry;
+			start_ptr = tmp_ptr;
+			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
+			tmp_ssi = ats_ssi;
+			ssr = split_string(&tmp_ssi);
+			for (i = 0; i < ssr->Anz; i++) {
+
+				out->printxy(ssr->X[i],
+				              ssr->Y + (i * ats_ssi.FHoehe) + 1,
+				              0, 300, 0, ssr->StrPtr[i]);
+				out->printxy(ssr->X[i],
+				              ssr->Y + (i * ats_ssi.FHoehe) - 1,
+				              0, 300, 0, ssr->StrPtr[i]);
+				out->printxy(ssr->X[i] + 1,
+				              ssr->Y + (i * ats_ssi.FHoehe),
+				              0, 300, 0, ssr->StrPtr[i]);
+				out->printxy(ssr->X[i] - 1,
+				              ssr->Y + (i * ats_ssi.FHoehe),
+				              0, 300, 0, ssr->StrPtr[i]);
+				out->printxy(ssr->X[i],
+				              ssr->Y + (i * ats_ssi.FHoehe),
+				              atsv.Color,
+				              300, 0, ssr->StrPtr[i]);
+				tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+			}
+			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
+			if (atsv.DelayCount <= 0) {
+				if (ssr->Next == false) {
+					atsv.Display = false;
+				} else {
+					atsv.Ptr = tmp_ptr;
+					atsv.TxtLen = 0;
+					while (*tmp_ptr++ != ATDS_END_TEXT)
+						++atsv.TxtLen;
+					atsv.DelayCount = get_delay(atsv.TxtLen);
+					atsv.SilentCount = atdsv.Silent;
+				}
+			} else
+				--atsv.DelayCount;
+		} else
+			--atsv.SilentCount;
+	}
+}
+
+char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mode) {
+	char *str_;
+	uint8 status;
+	uint8 lo_hi[2];
+	int16 ak_nybble;
+	str_ = 0;
+	set_ats_mem(mode);
+
+	atsv.TxtMode = txt_mode;
+	if (!get_steuer_bit(txt_nr, ATS_AKTIV_BIT, mode)) {
+
+		status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2];
+		ak_nybble = (atsv.TxtMode + 1) % 2;
+
+		lo_hi[1] = status >> 4;
+		lo_hi[0] = status &= 15;
+		str_ = ats_search_block(atsv.TxtMode, atsmem);
+		if (str_ != 0) {
+			ats_search_nr(txt_nr, &str_);
+			if (str_ != 0) {
+
+				ats_search_str(txt_anz, &lo_hi[ak_nybble],
+				               (uint8)ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
+				if (str_ != 0) {
+					status = 0;
+					lo_hi[1] <<= 4;
+					status |= lo_hi[0];
+					status |= lo_hi[1];
+					ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2] = status;
+				}
+			}
+		}
+	}
+	return (str_);
+}
+
+void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
+	uint8 status;
+	uint8 lo_hi[2];
+	int16 ak_nybble;
+	set_ats_mem(mode);
+	status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	ak_nybble = (txt_mode + 1) % 2;
+
+	lo_hi[1] = status >> 4;
+	lo_hi[0] = status &= 15;
+	lo_hi[ak_nybble] = str_nr;
+	status = 0;
+	lo_hi[1] <<= 4;
+	status |= lo_hi[0];
+	status |= lo_hi[1];
+	ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2] = status;
+}
+
+void atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
+	int16 i;
+	for (i = 0; i < 5; i++)
+		set_ats_str(txt_nr, i, str_nr, mode);
+}
+
+int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
+	uint8 status;
+	uint8 lo_hi[2];
+	int16 ak_nybble;
+	set_ats_mem(mode);
+	status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	ak_nybble = (txt_mode + 1) % 2;
+
+	lo_hi[1] = status >> 4;
+	lo_hi[0] = status &= 15;
+	return ((int16)lo_hi[ak_nybble]);
+}
+
+int16 atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+	int16 ret;
+	set_ats_mem(mode);
+	ret = bit->is_bit(ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	return (ret);
+}
+
+void atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+	set_ats_mem(mode);
+	bit->set_bit(&ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+}
+
+void atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+	set_ats_mem(mode);
+	bit->del_bit(&ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+}
+
+char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
+	char *str_;
+	int16 ende;
+	str_ = txt_adr;
+	ende = 0;
+	while (!ende) {
+		if (str_[0] == (char)BLOCKENDE &&
+		        str_[1] == (char)BLOCKENDE &&
+		        str_[2] == (char)BLOCKENDE) {
+			ende = 2;
+		} else if (*str_ == (char)STEUERBYTE) {
+			if (str_[1] == (char)txt_mode) {
+				ende = 1;
+				++str_;
+			}
+		}
+		++str_;
+	}
+	if (ende == 2)
+		str_ = 0;
+	return (str_);
+}
+
+void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
+	char *start_str;
+	int16 *pos;
+	int16 ende;
+	int16 ende1;
+	start_str = *str_;
+	ende = 0;
+	while (!ende) {
+		pos = (int16 *)start_str;
+		if (*pos == txt_nr) {
+			ende = 1;
+			atsv.TxtHeader = (AtsTxtHeader *)pos;
+			*str_ = (char *)pos;
+			*str_ += sizeof(AtsTxtHeader);
+			if (atsv.TxtMode != TXT_MARK_NAME)
+				atsv.StrHeader = (AtsStrHeader *)str_;
+			*str_ += sizeof(AtsStrHeader);
+		} else {
+			start_str += sizeof(AtsTxtHeader);
+			start_str += sizeof(AtsStrHeader);
+			ende1 = 0;
+			while (!ende1) {
+				if (start_str[0] == ATDS_END) {
+					if ((start_str[1] == (char)BLOCKENDE &&
+					        start_str[2] == (char)BLOCKENDE &&
+					        start_str[3] == (char)BLOCKENDE) ||
+					        start_str[1] == STEUERBYTE) {
+						ende = 1;
+						ende1 = 1;
+						*str_ = 0;
+					} else {
+						ende1 = 1;
+
+					}
+				}
+				++start_str;
+			}
+		}
+	}
+}
+
+void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
+	char *tmp_str;
+	char *start_str;
+	int16 ende;
+	int16 count;
+	tmp_str = *str_;
+	start_str = *str_;
+	tmp_str += sizeof(AtsStrHeader);
+	*anz = 0;
+	ende = 0;
+	count = 0;
+	while (!ende) {
+		if (count == *status) {
+			if (!*tmp_str) {
+				++*anz;
+			} else if (*tmp_str == ATDS_END_TEXT) {
+				ende = 1;
+				*str_ = start_str;
+				start_str -= sizeof(AtsStrHeader);
+				if (atsv.TxtMode != TXT_MARK_NAME)
+					atsv.StrHeader = (AtsStrHeader *)start_str;
+				if (tmp_str[1] != ATDS_END) {
+
+					if (!bit->is_bit(steuer, ATS_COUNT_BIT))
+						++*status;
+				} else {
+
+					if (bit->is_bit(steuer, ATS_RESET_BIT))
+						*status = 0;
+				}
+			}
+		} else {
+			if (*tmp_str == ATDS_END_TEXT) {
+				if (tmp_str[1] == ATDS_END) {
+					ende = 1;
+					*anz = 0;
+					*status = count;
+					*str_ = start_str;
+					start_str -= sizeof(AtsStrHeader);
+					if (atsv.TxtMode != TXT_MARK_NAME)
+						atsv.StrHeader = (AtsStrHeader *)start_str;
+				} else {
+					++count;
+
+					tmp_str += sizeof(AtsStrHeader);
+					start_str = tmp_str + 1;
+				}
+			} else if (*tmp_str == ATDS_END ||
+			           (tmp_str[0] == (char)BLOCKENDE &&
+			            tmp_str[1] == (char)BLOCKENDE &&
+			            tmp_str[2] == (char)BLOCKENDE)) {
+				ende = 1;
+				*anz = 0;
+				*str_ = 0;
+			}
+		}
+		++tmp_str;
+	}
+}
+
+int16 atdsys::start_aad(int16 dia_nr) {
+	int16 *pos;
+	int16 txt_len;
+
+	aadv.Dialog = false;
+	if (atdsmem[AAD_HANDLE]) {
+		aadv.Ptr = atdsmem[AAD_HANDLE];
+		aad_search_dia(dia_nr, &aadv.Ptr);
+		if (aadv.Ptr) {
+			pos = (int16 *)aadv.Ptr;
+			aadv.Person = (AadInfo *) aadv.Ptr;
+			aadv.Ptr += aadv.TxtHeader->PerAnz * sizeof(AadInfo);
+			aadv.Dialog = true;
+			aadv.StrNr = 0;
+			aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
+			aadv.Ptr += sizeof(AadStrHeader);
+			aad_get_zeilen(aadv.Ptr, &txt_len);
+			aadv.DelayCount = get_delay(txt_len);
+			atdsv.DiaNr = dia_nr;
+			if (atdsv.aad_str != 0)
+				atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
+			mouse_push = true;
+			stop_ats();
+			atdsv.VocNr = -1;
+		}
+	}
+	return (aadv.Dialog);
+}
+
+void atdsys::stop_aad() {
+	aadv.Dialog = false;
+	aadv.StrNr = -1;
+}
+
+void atdsys::print_aad(int16 scrx, int16 scry) {
+	int16 *pos;
+	int16 i;
+	int16 txt_len;
+	int16 tmp_person;
+	int16 tmp_str_nr;
+	char *tmp_ptr;
+	char *start_ptr;
+	int16 vocx;
+	SplitStringInit tmp_ssi;
+	if (aadv.Dialog) {
+		switch (in->get_switch_code()) {
+		case ESC:
+		case ENTER:
+		case MAUS_LINKS:
+			if (mouse_push == false) {
+				if (aadv.SilentCount <= 0) {
+					mouse_push = true;
+					aadv.DelayCount = 0;
+					inzeig->kbinfo->scan_code = 0;
+					inzeig->kbinfo->key_code = 0;
+				}
+			}
+			break;
+
+		default:
+			mouse_push = false;
+			break;
+
+		}
+		if (aadv.SilentCount <= 0) {
+			tmp_ptr = aadv.Ptr;
+			out->set_fontadr(atdsv.Font);
+			out->set_vorschub(atdsv.Fvorx, 0);
+			ssi[aadv.StrHeader->AkPerson].Str = tmp_ptr;
+			if (aadv.Person[aadv.StrHeader->AkPerson].X != -1) {
+				ssi[aadv.StrHeader->AkPerson].X = aadv.Person[aadv.StrHeader->AkPerson].X - scrx;
+			}
+			if (aadv.Person[aadv.StrHeader->AkPerson].Y != -1) {
+				ssi[aadv.StrHeader->AkPerson].Y = aadv.Person[aadv.StrHeader->AkPerson].Y - scry;
+			}
+			ssi[aadv.StrHeader->AkPerson].Fvorx = atdsv.Fvorx;
+			ssi[aadv.StrHeader->AkPerson].FHoehe = atdsv.Fhoehe;
+			start_ptr = tmp_ptr;
+			aad_get_zeilen(start_ptr, &txt_len);
+			str_null2leer(start_ptr, start_ptr + txt_len - 1);
+			tmp_ssi = ssi[aadv.StrHeader->AkPerson];
+			ssr = split_string(&tmp_ssi);
+
+			if (atdsv.Display == DISPLAY_TXT ||
+			        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
+				for (i = 0; i < ssr->Anz; i++) {
+					out->printxy(ssr->X[i] + 1,
+					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
+					              0, 300, 0, ssr->StrPtr[i]);
+					out->printxy(ssr->X[i] - 1,
+					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
+					              0, 300, 0, ssr->StrPtr[i]);
+					out->printxy(ssr->X[i],
+					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe) + 1,
+					              0, 300, 0, ssr->StrPtr[i]);
+					out->printxy(ssr->X[i],
+					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe) - 1,
+					              0, 300, 0, ssr->StrPtr[i]);
+					out->printxy(ssr->X[i],
+					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
+					              aadv.Person[aadv.StrHeader->AkPerson].Color,
+					              300, 0, ssr->StrPtr[i]);
+					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+				}
+				str_null2leer(start_ptr, start_ptr + txt_len - 1);
+			}
+
+#ifndef SCRIPT
+			else if (atdsv.Display == DISPLAY_VOC) {
+				if (atdsv.VocNr != aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
+					if (atdsv.SpeechHandle) {
+						atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
+						if (atdsv.VocNr != -1) {
+							mem->file->select_pool_item(atdsv.SpeechHandle, atdsv.VocNr);
+							ERROR
+
+							vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
+							       spieler.scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
+							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
+							ailsnd->start_db_voc(atdsv.SpeechHandle, 0, 63);
+							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
+							aadv.DelayCount = 1;
+						}
+					} else {
+						modul = DATEI;
+						fcode = OPENFEHLER;
+						err->set_user_msg("SPRACHAUSGABE.TVP\0");
+					}
+				}
+				for (i = 0; i < ssr->Anz; i++) {
+					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+				}
+				str_null2leer(start_ptr, start_ptr + txt_len - 1);
+			}
+#endif
+			if (aadv.DelayCount <= 0) {
+				aadv.Ptr = tmp_ptr;
+				while (*tmp_ptr == ' ' || *tmp_ptr == 0)
+					++tmp_ptr;
+				if (tmp_ptr[1] == ATDS_END ||
+				        tmp_ptr[1] == ATDS_END_EINTRAG) {
+					if (atdsv.aad_str != 0)
+						atdsv.aad_str(atdsv.DiaNr, aadv.StrNr, aadv.StrHeader->AkPerson, AAD_STR_END);
+					aadv.Dialog = false;
+					adsv.AutoDia = false;
+					aadv.StrNr = -1;
+					ssret.Next = false;
+				} else {
+					if (ssr->Next == false) {
+						++aadv.StrNr;
+						while (*aadv.Ptr++ != ATDS_END_TEXT);
+
+						tmp_person = aadv.StrHeader->AkPerson;
+						tmp_str_nr = aadv.StrNr;
+						pos = (int16 *)aadv.Ptr;
+						aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
+						aadv.Ptr += sizeof(AadStrHeader);
+						if (atdsv.aad_str != 0) {
+							if (tmp_person != aadv.StrHeader->AkPerson) {
+								atdsv.aad_str(atdsv.DiaNr, tmp_str_nr, tmp_person, AAD_STR_END);
+								atdsv.aad_str(atdsv.DiaNr, aadv.StrNr, aadv.StrHeader->AkPerson, AAD_STR_START);
+							}
+						}
+					}
+					aad_get_zeilen(aadv.Ptr, &txt_len);
+					aadv.DelayCount = get_delay(txt_len);
+					aadv.SilentCount = atdsv.Silent;
+				}
+			} else {
+				if (atdsv.Display == DISPLAY_TXT ||
+				        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1)
+					--aadv.DelayCount;
+#ifndef SCRIPT
+				else if (atdsv.Display == DISPLAY_VOC) {
+					warning("FIXME - unknown constant SMP_PLAYING");
+
+					aadv.DelayCount = 0;
+				}
+#endif
+			}
+		} else
+			--aadv.SilentCount;
+	}
+}
+
+int16 atdsys::aad_get_status() {
+	return (aadv.StrNr);
+}
+
+int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
+	int16 zeilen;
+	char *ptr;
+	*txt_len = 0;
+	ptr = str_;
+	zeilen = 0;
+	while (*str_ != ATDS_END_TEXT) {
+		if (*str_++ == 0)
+			++zeilen;
+	}
+	*txt_len = (str_ - ptr) - 1;
+	return (zeilen);
+}
+
+void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
+	char *start_ptr;
+	int16 *pos;
+	int16 ende;
+	int16 ende1;
+	start_ptr = *ptr;
+	ende = 0;
+	if (start_ptr[0] == (char)BLOCKENDE &&
+	        start_ptr[1] == (char)BLOCKENDE &&
+	        start_ptr[2] == (char)BLOCKENDE) {
+		*ptr = 0;
+	} else {
+		while (!ende) {
+			pos = (int16 *)start_ptr;
+			if (pos[0] == dia_nr) {
+				ende = 1;
+				aadv.TxtHeader = (AadTxtHeader *)start_ptr;
+				*ptr = start_ptr + sizeof(AadTxtHeader);
+			} else {
+				start_ptr += sizeof(AadTxtHeader) + pos[1] * sizeof(AadInfo);
+				ende1 = 0;
+				while (!ende1) {
+					if (*start_ptr == ATDS_END) {
+						if (start_ptr[1] == (char)BLOCKENDE &&
+						        start_ptr[2] == (char)BLOCKENDE &&
+						        start_ptr[3] == (char)BLOCKENDE) {
+							ende = 1;
+							ende1 = 1;
+							*ptr = 0;
+						} else
+							ende1 = 1;
+					}
+					++start_ptr;
+				}
+			}
+		}
+	}
+}
+
+bool  atdsys::ads_start(int16 dia_nr) {
+	bool ret = false;
+
+	load_atds(dia_nr, ADS_DATEI);
+	if (!modul) {
+		bool ende = false;
+		if (atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
+		        atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
+		        atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
+			ende = true;
+		if (!ende) {
+			adsv.Ptr = atdsmem[ADS_HANDLE];
+			adsv.TxtHeader = (AdsTxtHeader *)adsv.Ptr;
+			if (adsv.TxtHeader->DiaNr == dia_nr) {
+				ret = true;
+				adsv.Ptr += sizeof(AdsTxtHeader);
+				adsv.Person = (AadInfo *) adsv.Ptr;
+				adsv.Ptr += adsv.TxtHeader->PerAnz * sizeof(AadInfo);
+				adsv.Dialog = dia_nr;
+				adsv.StrNr = 0;
+				ads_stack[0] = 0;
+				ads_stack_ptr = 1;
+			}
+		}
+	}
+	return (ret);
+}
+
+void atdsys::stop_ads() {
+	adsv.Dialog = -1;
+	adsv.AutoDia = false;
+
+}
+
+int16 atdsys::ads_get_status() {
+	return (adsv.Dialog);
+}
+
+int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
+	int16 ret;
+	char *tmp_adr;
+	ret = true;
+	tmp_adr = adsv.Ptr;
+	ads_search_block(block_nr, &tmp_adr);
+	if (tmp_adr) {
+		ads_search_item(item_nr, &tmp_adr);
+		if (tmp_adr) {
+			ret = true;
+		}
+	}
+	return (ret);
+}
+
+char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
+	int16 i;
+	char nr;
+	char *tmp_adr;
+	*anzahl = 0;
+	memset(e_ptr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
+	if (adsv.Dialog != -1) {
+		adsv.BlkPtr = adsv.Ptr;
+		ads_search_block(block_nr, &adsv.BlkPtr);
+		if (adsv.BlkPtr) {
+			for (i = 0; i < ADS_MAX_BL_EIN; i++) {
+				tmp_adr = adsv.BlkPtr;
+				ads_search_item(i, &tmp_adr);
+				if (tmp_adr) {
+					nr = tmp_adr[-1];
+					tmp_adr += sizeof(AadStrHeader);
+					if (ads_block[block_nr].Show[(int16)nr] == true) {
+						e_ptr[*anzahl] = tmp_adr;
+						e_nr [*anzahl] = (int16)nr;
+						++(*anzahl);
+					}
+				}
+			}
+		}
+	}
+	return (e_ptr);
+}
+
+AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
+	adsnb.BlkNr = blk_nr;
+	if (!aadv.Dialog) {
+		if (!adsv.AutoDia) {
+			ads_search_item(e_nr[item_nr], &adsv.BlkPtr);
+			if (adsv.BlkPtr) {
+				if (start_ads_auto_dia(adsv.BlkPtr))
+					adsv.AutoDia = true;
+				if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_EXIT_BIT) == true) {
+					stop_ads();
+					adsnb.EndNr = e_nr[item_nr];
+					adsnb.BlkNr = -1;
+				}
+			}
+		}
+	}
+	return (&adsnb);
+}
+
+AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
+	int16 anzahl;
+
+	if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_SHOW_BIT) == false)
+		ads_block[blk_nr].Show[e_nr[item_nr]] = false;
+	adsnb.EndNr = e_nr[item_nr];
+	if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_RESTART_BIT) == true) {
+		adsnb.BlkNr = 0;
+
+		ads_stack_ptr = 0;
+	} else {
+		if (ads_block[blk_nr].Next[e_nr[item_nr]]) {
+			adsnb.BlkNr = ads_block[blk_nr].Next[e_nr[item_nr]];
+
+			anzahl = 0;
+			while (!anzahl && adsnb.BlkNr != -1) {
+
+				anzahl = 0;
+				ads_item_ptr(adsnb.BlkNr, &anzahl);
+				if (!anzahl) {
+					adsnb.BlkNr = return_block(ads_block);
+				}
+			}
+		} else {
+			adsnb.BlkNr = return_block(ads_block);
+		}
+	}
+	ads_stack[ads_stack_ptr] = adsnb.BlkNr;
+	++ads_stack_ptr;
+	return (&adsnb);
+}
+
+int16 atdsys::return_block(AdsBlock *ab) {
+	int16 ret;
+	short blk_nr;
+	int16 anz;
+	int16 ende;
+	ads_stack_ptr -= 1;
+	ret = -1;
+	ende = 0;
+	while (ads_stack_ptr >= 0 && !ende) {
+		blk_nr = ads_stack[ads_stack_ptr];
+		ads_item_ptr(blk_nr, &anz);
+		if (anz) {
+			ret = blk_nr;
+			ende = 1;
+		} else
+			--ads_stack_ptr;
+	}
+	++ads_stack_ptr;
+	return (ret);
+}
+
+void atdsys::ads_search_block(int16 blk_nr, char **ptr) {
+	char *start_ptr;
+	int16 ende;
+	start_ptr = *ptr;
+	ende = 0;
+	while (!ende) {
+		if (*start_ptr == (char)blk_nr) {
+			ende = 1;
+			*ptr = start_ptr;
+		} else {
+			start_ptr += 2 + sizeof(AadStrHeader);
+			while (*start_ptr++ != ATDS_END_BLOCK);
+			if (start_ptr[0] == ATDS_END &&
+			        start_ptr[1] == ATDS_END) {
+				ende = 1;
+				*ptr = 0;
+			}
+		}
+	}
+}
+
+void atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
+	char *start_ptr;
+	int16 ende;
+	start_ptr = *blk_adr + 1;
+	ende = 0;
+	while (!ende) {
+		if (*start_ptr == item_nr) {
+			ende = 1;
+			*blk_adr = start_ptr + 1;
+		} else {
+			start_ptr += 1 + sizeof(AadStrHeader);
+			while (*start_ptr++ != ATDS_END_EINTRAG);
+			if (*start_ptr == ATDS_END_BLOCK) {
+				ende = 1;
+				*blk_adr = 0;
+			}
+		}
+	}
+}
+
+int16 atdsys::start_ads_auto_dia(char *item_adr) {
+	int16 txt_len;
+	aadv.Dialog = false;
+	if (item_adr) {
+		aadv.Person = adsv.Person;
+		aadv.Ptr = item_adr;
+		aadv.Dialog = true;
+		aadv.StrNr = 0;
+		aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
+		aadv.Ptr += sizeof(AadStrHeader);
+		aad_get_zeilen(aadv.Ptr, &txt_len);
+		aadv.DelayCount = get_delay(txt_len);
+		atdsv.DiaNr = adsv.TxtHeader->DiaNr + 10000;
+
+		if (atdsv.aad_str != 0)
+			atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
+		mouse_push = true;
+		stop_ats();
+	} else {
+		aadv.Dialog = false;
+	}
+	return (aadv.Dialog);
+}
+
+void atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
+	if (adsv.Dialog == dia_nr) {
+		if (check_item(blk_nr, item_nr))
+			ads_block[blk_nr].Show[item_nr] = false;
+	} else {
+		load_atds(dia_nr, ADH_DATEI);
+		if (check_item(blk_nr, item_nr))
+			ads_block[blk_nr].Show[item_nr] = false;
+		save_ads_header(dia_nr);
+	}
+}
+
+void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
+	if (adsv.Dialog == dia_nr) {
+		if (check_item(blk_nr, item_nr))
+			ads_block[blk_nr].Show[item_nr] = true;
+	} else {
+		load_atds(dia_nr, ADH_DATEI);
+		if (check_item(blk_nr, item_nr))
+			ads_block[blk_nr].Show[item_nr] = true;
+		save_ads_header(dia_nr);
+	}
+}
+
+int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
+	int16 i;
+	bool ok;
+	int16 txt_nr;
+	InvUse *iu;
+	txt_nr = -1;
+	if (cur_inv != -1) {
+		if (inv_block_nr != cur_inv) {
+			inv_block_nr = cur_inv + 1;
+			load_atds(inv_block_nr + atdspooloff[mode], INV_USE_DATEI);
+			if (atdshandle[INV_IDX_HANDLE]) {
+				fseek((FILE *)atdshandle[INV_IDX_HANDLE], sizeof(InvUse)*inv_block_nr
+				      *INV_STRC_ANZ, SEEK_SET);
+				if
+				(!fread(atdsmem[INV_IDX_HANDLE], sizeof(InvUse)*INV_STRC_ANZ, 1, (FILE *)atdshandle[INV_IDX_HANDLE])) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				}
+			} else {
+				modul = DATEI;
+				fcode = OPENFEHLER;
+			}
+		}
+		iu = (InvUse *) atdsmem[INV_IDX_HANDLE];
+		ok = false;
+		for (i = 0; i < INV_STRC_ANZ && !ok; i++) {
+			if (iu[i].ObjId == mode) {
+				if (iu[i].ObjNr == test_nr) {
+					txt_nr = iu[i].TxtNr;
+					ok = true;
+				}
+			}
+		}
+	}
+	return (txt_nr);
+}
+
+int16 atdsys::get_stereo_pos(int16 x) {
+	float fx_ = (float)x;
+
+	fx_ /= 2.5;
+	if ((fx_ - ((float)((int16)fx_))) > 0.5)
+		fx_ += 1.0;
+
+	return ((int16)fx_);
+}
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
new file mode 100644
index 00000000000..70993826566
--- /dev/null
+++ b/engines/chewy/atds.h
@@ -0,0 +1,342 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_ATDS_H
+#define CHEWY_ATDS_H
+
+#define ATDS_VOC_OFFSET 20
+
+#define AAD_MAX_PERSON 10
+
+#define AAD_STR_START 0
+#define AAD_STR_END 1
+#define AAD_DATEI 0
+#define ATS_DATEI 1
+#define ADS_DATEI 2
+#define ADH_DATEI 3
+#define INV_USE_DATEI 4
+#define INV_IDX_DATEI 5
+#define INV_ATS_DATEI 6
+
+#define MAX_HANDLE 8
+#define AAD_HANDLE 0
+#define ATS_HANDLE 1
+#define ADS_HANDLE 2
+#define ADH_HANDLE 3
+#define INV_USE_HANDLE 4
+#define INV_IDX_HANDLE 5
+#define INV_ATS_HANDLE 6
+#define ATDS_HANDLE 7
+
+#define DISPLAY_TXT 0
+#define DISPLAY_VOC 1
+#define DISPLAY_ALL 2
+
+#define MAX_STR_SPLIT 10
+
+#define SPLIT_MITTE 1
+#define SPLIT_LEFT 2
+
+#define ATDS_END_ZEILE 0
+
+#define ATDS_END_BLOCK 0x0b
+
+#define ATDS_END_EINTRAG 0x0c
+
+#define ATDS_END_TEXT 0x0d
+
+#define ATDS_END 0x0e
+
+#define BLOCKENDE 0x0f
+
+#define MAX_ATS_ROOM 100
+
+#define ATS_AKTIV_BIT 1
+#define ATS_COUNT_BIT 2
+#define ATS_RESET_BIT 4
+#define ATS_ACTION_BIT 8
+
+#define MAX_ATS_STATUS 3
+
+#define TXT_MARK_NAME 0
+#define TXT_MARK_LOOK 1
+#define TXT_MARK_USE 2
+#define TXT_MARK_WALK 3
+#define TXT_MARK_TALK 4
+
+#define STEUERBYTE 0xff
+
+#define MAX_ADS_DIALOG 500
+#define ADS_MAX_BL_EIN 6
+#define ADS_STACK_SIZE 50
+
+#define ADS_EXIT_BIT 1
+
+#define ADS_SHOW_BIT 2
+
+#define ADS_RESTART_BIT 4
+
+typedef struct {
+	int16 Anz;
+} AdsDiaHeaders;
+
+typedef struct {
+	bool Show[ADS_MAX_BL_EIN];
+
+	uint8 Next[ADS_MAX_BL_EIN];
+	uint8 Steuer[ADS_MAX_BL_EIN];
+} AdsBlock;
+
+typedef struct {
+	char *Font;
+	int16 Fvorx;
+	int16 Fhoehe;
+	int16 Silent;
+	int16 *Delay;
+	int16 DiaNr;
+
+	uint8 Display;
+
+	int16 VocNr;
+
+	//FIXME : Was using FILE*
+	void *SpeechHandle;
+
+	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode);
+} AtdsVar;
+
+#define IUID_IIB 0
+#define IUID_SIB 1
+#define IUID_REC 2
+#define IUID_AUTO 3
+#define IUID_DET 4
+#define IUID_SPIELER 5
+#define INV_USE_DEF 16
+#define INV_STRC_ANZ 30
+
+typedef struct {
+	int16 ObjId;
+	int16 ObjNr;
+	int16 TxtNr;
+} InvUse;
+
+typedef struct {
+	int16 X;
+	int16 Y;
+	int16 Color;
+} AadInfo;
+
+typedef struct {
+	int16 DiaNr;
+	int16 PerAnz;
+	int16 AMov;
+	int16 CurNr;
+} AadTxtHeader;
+
+typedef struct {
+	int16 AkPerson;
+	int16 VocNr;
+} AadStrHeader;
+
+typedef struct {
+	int16 Dialog;
+
+	AadTxtHeader *TxtHeader;
+	AadStrHeader *StrHeader;
+	AadInfo *Person;
+	char *Ptr;
+	int16 StrNr;
+	int16 DelayCount;
+	int16 SilentCount;
+} AadVar;
+
+typedef struct {
+	int16 DiaNr;
+	int16 PerAnz;
+	int16 AMov;
+	int16 CurNr;
+} AdsTxtHeader;
+
+typedef struct {
+	int16 Dialog;
+	int16 AutoDia;
+	AdsTxtHeader *TxtHeader;
+	AadInfo *Person;
+	char *Ptr;
+	char *BlkPtr;
+	int16 StrNr;
+	int16 DelayCount;
+	int16 SilentCount;
+} AdsVar;
+
+typedef struct {
+	int16 BlkNr;
+	int16 EndNr;
+} AdsNextBlk;
+
+typedef struct {
+	int16 TxtNr;
+	int16 AMov;
+	int16 CurNr;
+} AtsTxtHeader;
+
+typedef struct {
+	int16 VocNr;
+} AtsStrHeader;
+
+typedef struct {
+	bool Display;
+	AtsTxtHeader *TxtHeader;
+	AtsStrHeader *StrHeader;
+	char *Ptr;
+	int16 DelayCount;
+	int16 SilentCount;
+	int16 TxtLen;
+	int16 Color;
+	int16 TxtMode;
+} AtsVar;
+
+typedef struct {
+	char **StrPtr;
+	int16 *X;
+	int16 Y;
+	short Anz;
+	int16 Next;
+
+} SplitStringRet;
+
+typedef struct {
+	char *Str;
+
+	int16 X;
+	int16 Y;
+	int16 Width;
+	int16 Zeilen;
+	int16 Mode;
+
+	int16 Fvorx;
+	int16 FHoehe;
+} SplitStringInit;
+
+class atdsys {
+
+public:
+	atdsys();
+	~atdsys();
+
+	void set_font(char *font_adr, int16 fvorx, int16 fhoehe);
+	void set_delay(int16 *delay, int16 silent);
+	void set_display(int16 mode);
+	void set_split_win(int16 nr, SplitStringInit *ssinit);
+	SplitStringRet *split_string(SplitStringInit *ssi);
+	void calc_txt_win(SplitStringInit *ssi);
+	void str_null2leer(char *str_start, char *str_end);
+	void get_atds_id_ptr(int16 mode);
+	char *atds_adr(const char *fname, int16 chunk_start, int16 chunk_anz);
+	void load_atds(int16 chunk_nr, int16 mode);
+	void save_ads_header(int16 dia_nr);
+
+	// FIXME: was using FILE*
+	void *pool_handle(const char *fname, const char *fmode);
+	void set_speech_handle(void *speech_handle);
+	void set_handle(const char *fname, int16 mode, void *handle, int16 chunk_start, int16 chunk_anz);
+	void open_handle(const char *fname, const char *fmode, int16 mode);
+	void close_handle(int16 mode);
+	int16 atds_get_zeilen(char *str, int16 end_txt);
+	void crypt(char *txt, uint32 size);
+	void init_ats_mode(int16 mode, uint8 *atsheader);
+	bool start_ats(int16 txt_nr, int16 txt_mode, int16 color,
+	                int16 mode, int16 *voc_nr);
+	void stop_ats();
+	int16 ats_get_status();
+	void print_ats(int16 x, int16 y, int16 scrx, int16 scry);
+	int16 get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode);
+	void set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode);
+	void del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode);
+	void set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode);
+	void set_ats_str(int16 txt_nr, int16 str_nr, int16 mode);
+	int16 get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode);
+	char *ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz,
+	                  int16 mode);
+	char *ats_search_block(int16 txt_mode, char *txt_adr);
+	void ats_search_nr(int16 txt_nr, char **str);
+	void ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str);
+	void set_ats_mem(int16 mode);
+	int16 start_aad(int16 dia_nr);
+	void stop_aad();
+	void print_aad(int16 scrx, int16 scry);
+	int16 aad_get_status();
+	void set_string_end_func
+	(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode));
+	void aad_search_dia(int16 dia_nr, char **ptr);
+	int16 aad_get_zeilen(char *str, int16 *txt_len);
+	bool ads_start(int16 dia_nr);
+	void stop_ads();
+	char **ads_item_ptr(int16 block_nr, int16 *anzahl);
+	AdsNextBlk *ads_item_choice(int16 blk_nr, int16 item_nr);
+	AdsNextBlk *calc_next_block(int16 blk_nr, int16 item_nr);
+	int16 ads_get_status();
+	void hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr);
+	void show_item(int16 dia_nr, int16 blk_nr, int16 item_nr);
+	int16 return_block(AdsBlock *ab);
+	void ads_search_block(int16 blk_nr, char **ptr);
+	void ads_search_item(int16 item_nr, char **blk_adr);
+	int16 start_ads_auto_dia(char *item_adr);
+	int16 check_item(int16 block_nr, int16 item_nr);
+	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
+	int16 get_stereo_pos(int16 x);
+
+private:
+
+	int16 get_delay(int16 txt_len);
+
+	// FIXME : Was using FILE*
+	void *atdshandle[MAX_HANDLE];
+	char *atdsmem[MAX_HANDLE];
+	int16 atdspooloff[MAX_HANDLE];
+	char *atsmem;
+	uint8 *ats_sheader;
+	uint8 *ats_st_header[4];
+	char *atds_id_ptr;
+	AadVar aadv;
+	AtsVar atsv;
+	AdsVar adsv;
+	AtdsVar atdsv;
+	char *e_ptr[ADS_MAX_BL_EIN];
+	int16 e_nr[ADS_MAX_BL_EIN];
+	AdsBlock *ads_block;
+	AdsNextBlk adsnb;
+	uint8 ads_stack[ADS_STACK_SIZE];
+	int16 ads_stack_ptr;
+	SplitStringRet ssret;
+	SplitStringRet *ssr;
+	SplitStringInit ssi[AAD_MAX_PERSON];
+	SplitStringInit ats_ssi;
+
+	char *split_ptr[MAX_STR_SPLIT];
+	int16 split_x [MAX_STR_SPLIT];
+	int16 inv_block_nr;
+	char *inv_use_mem;
+	int16 tmp_delay;
+	in_zeiger *inzeig;
+};
+#endif
diff --git a/engines/chewy/bitclass.h b/engines/chewy/bitclass.h
new file mode 100644
index 00000000000..da4a6c334e4
--- /dev/null
+++ b/engines/chewy/bitclass.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_BITCLASS_H
+#define CHEWY_BITCLASS_H
+
+class bitclass {
+
+public:
+	bitclass() {}
+	~bitclass() {}
+
+	bool is_bit(int16 value, int16 bit) { return (value & bit) != 0; }
+	void set_bit(int16 *value, int16 bit) { *value |= bit; }
+	void del_bit(int16 *value, int16 bit) { *value &= ~bit;}
+
+	bool is_bit(uint8 value, int16 bit) { return (value & bit) != 0; }
+	void set_bit(uint8 *value, int16 bit) { *value |= bit; }
+	void del_bit(uint8 *value, int16 bit) { *value &= ~bit;}
+};
+#endif
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
new file mode 100644
index 00000000000..e9bc3d25242
--- /dev/null
+++ b/engines/chewy/ch_icm.cpp
@@ -0,0 +1,1367 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+
+#ifdef ICM
+#include "engines/chewy/ch_icm.h"
+int16 maus_rect_first;
+int16 koordinate[4] = {0};
+int16 last_debug_ani;
+int16 p_nr = P_CHEWY;
+void grab();
+void get_inv();
+void del_inv();
+char no_sav[] = {"Es wurde noch nicht gespeichert\0"
+                 "Speichern Ja/Nein ??\0"
+                };
+
+void draw_ice_win() {
+	int16 x;
+	int16 y;
+	int16 i;
+	int16 str_anz;
+
+	char c[] = {" Inline I.C.M Adventure Engine \0"
+	            "F1 ..... Einen neuen Raum anwählen\0"
+	            "F2 ..... Raum Info\0"
+	            "F3 ..... Zoom Werte eingeben\0"
+	            "F4 ..... Gehe zu Auto Mov Punkt\0"
+	            "F5 ..... Rechteck festlegen\0"
+	            "F6 ..... Auto Move Punkt ermitteln\0"
+	            "F7 ..... Scroll Werte anzeigen\0"
+	            "F8 ..... Letzte Animation(F7) abspielen\0"
+	            "F9 ..... Z Ebene eingeben\0"
+	            "F10 ..... Person setzen\0"
+	            "F11 ..... NeoGrab\0"
+	            "F12 ..... Inventar holen\0"
+	            "ALT + F12 Inventar löschen\0"
+	           };
+
+	x = 160;
+	y = 100;
+	str_anz = 14;
+	auto_menu(&x, &y, str_anz, 10, c, 0);
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	for (i = 0; i < str_anz; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+}
+
+void grab() {
+	set_up_screen(DO_SETUP);
+	in ->alter_kb_handler();
+	while (getch() != 'a');
+	in ->neuer_kb_handler(&kbinfo);
+}
+
+void get_room_nr() {
+	short tmp;
+	int16 abfrage;
+	int16 x;
+	int16 y;
+	int16 i;
+	char c[] = {"Bitte Raum Nr eingeben zulässig 0 bis %d\0"
+	            "Ihre Wahl : \0"
+	           };
+	x = 160;
+	y = 100;
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	auto_menu(&x, &y, 2, 10, c, 0);
+	in ->alter_kb_handler();
+	tmp = 0;
+	for (i = 0; i < 2; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i), MAX_RAUM);
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+	if (abfrage != 27) {
+		if (tmp <= MAX_RAUM) {
+			flags.IcmEntry = true;
+			exit_room(-1);
+			spieler.PersonRoomNr[P_CHEWY] = tmp;
+			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+			ERROR
+			out->set_palette(pal);
+
+			if (spieler.AkInvent != -1)
+				spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
+			obj->sort();
+
+			if (spieler.AkInvent != -1)
+				spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
+			auto_obj = 0;
+			enter_room(-1);
+			spieler_vector[P_CHEWY].Count = 0;
+			flags.IcmEntry = false;
+		} else
+			BELL
+		}
+	in ->neuer_kb_handler(&kbinfo);
+}
+
+void get_zoom_value() {
+	int16 tmp;
+	int16 abfrage;
+	int16 x;
+	int16 y;
+	int16 i;
+	char c[] = {"Bitte Zoom Faktor eingeben \0"
+	            "Ihre Wahl : \0"
+	           };
+	char c1[] = {"Bitte Zoom Horizont eingeben \0"
+	             "Ihre Wahl : \0"
+	            };
+	x = 160;
+	y = 100;
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	auto_menu(&x, &y, 2, 10, c, 0);
+	in ->alter_kb_handler();
+	for (i = 0; i < 2; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+	tmp = room->room_info->ZoomFak;
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+	if (abfrage != 27) {
+		room->set_zoom(tmp);
+	}
+	x = 160;
+	y = 100;
+	auto_menu(&x, &y, 2, 10, c1, 0);
+	in ->alter_kb_handler();
+	for (i = 0; i < 2; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
+	tmp = zoom_horizont;
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+	if (abfrage != 27) {
+		zoom_horizont = tmp;
+	}
+	in ->neuer_kb_handler(&kbinfo);
+}
+
+void room_info() {
+	int16 str_anz;
+	int16 x, y;
+	int16 i;
+	int16 value[255];
+	char c[] = {" Allgemeine Raum Info \0"
+	            "Ged Seiten Anzahl : %d\0"
+	            "Auto Objekte : %d\0"
+	            "Zoom Horizont : %d\0"
+	            "Zoom Faktor : %d\0"
+	            "Freie Handles : %d\0"
+	           };
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	x = 160;
+	y = 100;
+	str_anz = 6;
+	value[0] = 0;
+	value[1] = room->GedInfo[room_blk.AkAblage].Ebenen;
+	value[2] = auto_obj;
+	value[3] = zoom_horizont;
+	value[4] = (int16)room->room_info->ZoomFak;
+	value[5] = get_max_handle();
+	auto_menu(&x, &y, str_anz, 10, c, 0);
+	for (i = 0; i < str_anz; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i), value[i]);
+	while (kbinfo.key_code != ESC && kbinfo.key_code != ENTER);
+	while (kbinfo.key_code != 0);
+}
+
+void plot_auto_mov(int16 mode) {
+	int16 i;
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	if (!room->room_info->AutoMovAnz) {
+		out->printxy(0, 0, 255, 0, scr_width, "Kein Auto Mov Punkt vorhanden!!\0");
+
+	} else {
+		for (i = 0; i < room->room_info->AutoMovAnz; i++) {
+			out->box_fill(Rdi->AutoMov[i].X - spieler.scrollx,
+			               Rdi->AutoMov[i].Y - spieler.scrolly,
+			               Rdi->AutoMov[i].X + 10 - spieler.scrollx,
+			               Rdi->AutoMov[i].Y + 13 - spieler.scrolly, 255);
+			out->box(Rdi->AutoMov[i].X + 1 - spieler.scrollx,
+			          Rdi->AutoMov[i].Y + 1 - spieler.scrolly,
+			          Rdi->AutoMov[i].X + 9 - spieler.scrollx,
+			          Rdi->AutoMov[i].Y + 11 - spieler.scrolly, 0);
+			if (Rdi->AutoMov[i].X + 3 - spieler.scrollx > 0 &&
+			        Rdi->AutoMov[i].X + 3 - spieler.scrollx < (319 - 16) &&
+			        Rdi->AutoMov[i].Y + 3 - spieler.scrolly > 0 &&
+			        Rdi->AutoMov[i].Y + 3 - spieler.scrolly < (199 - 10))
+				out->printxy(Rdi->AutoMov[i].X + 3 - spieler.scrollx,
+				              Rdi->AutoMov[i].Y + 3 - spieler.scrolly, 0, 300, scr_width, "%d\0", i);
+		}
+	}
+	if (!mode) {
+		while (kbinfo.key_code != ESC && kbinfo.key_code != ENTER);
+		while (kbinfo.key_code != 0);
+	}
+}
+
+void go_auto_mov() {
+	int16 tmp;
+	int16 str_anz;
+	int16 i;
+	int16 x, y;
+	int16 abfrage;
+	char c[] = {"Welchen Punkt ansteuern ??\0"
+	            "Ihre Wahl : \0"
+	           };
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	if (!room->room_info->AutoMovAnz) {
+		out->printxy(0, 0, 255, 0, scr_width, "Kein Auto Mov Punkt vorhanden!!\0");
+		BELL
+	} else {
+		str_anz = 2;
+		x = 160;
+		y = 100;
+		auto_menu(&x, &y, str_anz, 10, c, 0);
+		in ->alter_kb_handler();
+		tmp = 0;
+		for (i = 0; i < str_anz; i++)
+			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+		abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]2d\0", &tmp);
+		in ->neuer_kb_handler(&kbinfo);
+		if (abfrage != 27) {
+			if (tmp < room->room_info->AutoMovAnz) {
+				auto_move(tmp, P_CHEWY);
+			} else {
+				out->printxy(0, 0, 255, 0, scr_width, "Nr zu hoch !!\0");
+				BELL
+				delay(300);
+			}
+		}
+	}
+}
+
+void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
+	int16 ende;
+	int16 ok;
+	int16 *ScrXy;
+	in->rectangle(0, 0, 319, 199);
+	maus_rect_first = false;
+	ScrXy = (int16 *)ablage[room_blk.AkAblage];
+	ende = 0;
+	while (!ende) {
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+		if (spr1 != 0)
+			out->sprite_set(spr1, x1 - spieler.scrollx, y1 - spieler.scrolly, 0);
+		if (spr2 != 0)
+			out->sprite_set(spr2, x2 - spieler.scrollx, y2 - spieler.scrolly, 0);
+		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
+		switch (in->get_switch_code()) {
+
+		case ESC:
+			ende = 1;
+			while (kbinfo.key_code != 0);
+			break;
+
+		}
+		if (minfo.button) {
+
+			if (minfo.button == 1 && maus_rect_first == false) {
+				maus_rect_first = true;
+				koordinate[0] = minfo.x + spieler.scrollx;
+				koordinate[1] = minfo.y + spieler.scrolly;
+				ok = 0;
+				while (!ok) {
+					mouse_aktiv = 0;
+					cur_move = 0;
+					out->setze_zeiger(workptr);
+					calc_mouse_scroll(ScrXy[0], ScrXy[1]);
+					out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+					if (spr1 != 0)
+						out->sprite_set(spr1, x1 - spieler.scrollx, y1 - spieler.scrolly, 0);
+					if (spr2 != 0)
+						out->sprite_set(spr2, x2 - spieler.scrollx, y2 - spieler.scrolly, 0);
+					out->printxy(0, 0, 255, 0, 0, "X1 = %4d Y1 = %4d \0", koordinate[0], koordinate[1]);
+					out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
+					out->printxy(0, 20, 255, 0, 0, "X2 = %4d Y2 = %4d XOff %3d YOff %3d\0",
+					              minfo.x + spieler.scrollx, minfo.y + spieler.scrolly,
+					              (minfo.x + spieler.scrollx) - koordinate[0],
+					              (minfo.y + spieler.scrolly) - koordinate[1]);
+					out->
+					box(koordinate[0] - spieler.scrollx, koordinate[1] - spieler.scrolly, minfo.x, minfo.y, 255);
+					out->back2screen(workpage);
+					if (minfo.button != 1)
+						ok = 1;
+				}
+			}
+		}
+		maus_rect_first = false;
+		out->printxy(0, 0, 255, 0, 0, "X = %d Y = %d mit scroll
+		              Offset\0", minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+		              out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
+		              plot_maus();
+		              out->setze_zeiger(screen0);
+		              out->back2screen(workpage);
+	}
+}
+
+void plot_maus() {
+	mouse_aktiv = 0;
+	cur_move = 0;
+	out->linie(0, minfo.y, 320, minfo.y, 255);
+	out->linie(minfo.x, 0, minfo.x, 205, 255);
+}
+
+void get_auto_mov() {
+	ani_detail_info *adi;
+	taf_info *dptr;
+	int16 x, y;
+	int16 str_anz, str_anz1, str_anz2;
+	int16 tmp;
+	int16 i;
+	int16 ende;
+	int16 abfrage;
+	int16 *Cxy;
+	int16 Dx, Dy;
+	int16 det_nr;
+	int16 auto_nr;
+	int16 info_flag;
+	short detail_nr;
+	int16 save_flag;
+	int16 ani_wahl;
+	int16 *ScrXy;
+
+	ObjMov detmov;
+	int16 dy;
+	char c[] = {"Detail Nummer eingeben\0"
+	            "Werte zwischen 0 - 31 sind zulässig\0"
+	            "Ihre Wahl : \0"
+	           };
+	char c1[] = {" HELP AUTO MOV PUNKT\0"
+	             "PLUS + MINUS Detail weiterblättern\0"
+	             "TAB Chewy Flip/Flop\0"
+	             "R Rechteck aufziehen\0"
+	             "PAGE_UP/DOWN AutoMov Umschalten\0"
+	             "ENTER AutoMov festsetzen\0"
+	             "Alt+S AutoMov speichern\0"
+	             "N AutoMov neuanlegen\0"
+	             "I Info AN/AUS\0"
+	             "F2 gehezu AutoMov Punkt\0"
+	             "F3 neues Detail wählen\0"
+	             "F4 End Sprite Nummer eingeben\0"
+	            };
+	char c2[] = {"End-Sprite Nummer eingeben wenn Held\0"
+	             "Punkt erreicht hat \0"
+	             "Ihre Wahl : \0"
+	            };
+	save_flag = true;
+	Rdi = det->get_room_detail_info();
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	str_anz = 3;
+	str_anz1 = 12;
+	str_anz2 = 3;
+	det_nr = -1;
+	detail_nr = -1;
+	if (!room->room_info->AutoMovAnz)
+		auto_nr = -1;
+	else
+		auto_nr = 0;
+	info_flag = true;
+
+	ende = 0;
+	load_org();
+	ani_wahl = 0;
+	ScrXy = (int16 *)ablage[room_blk.AkAblage];
+	while (!ende) {
+		out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+		if (minfo.button == 1) {
+			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
+			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
+			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
+			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			mov->get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_v
+			                    ector[P_CHEWY]);
+			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+			holen
+			spieler_vector[P_CHEWY].DelayCount = 0;
+		}
+		switch (in->get_switch_code()) {
+		case ESC :
+			ende = 1;
+			break;
+
+		case CURSOR_UP:
+			spieler_vector[P_CHEWY].Xypos[1] -= 1;
+			break;
+
+		case CURSOR_DOWN:
+			spieler_vector[P_CHEWY].Xypos[1] += 1;
+			break;
+
+		case CURSOR_LEFT:
+			spieler_vector[P_CHEWY].Xypos[0] -= 1;
+			break;
+
+		case CURSOR_RIGHT:
+			spieler_vector[P_CHEWY].Xypos[0] += 1;
+			break;
+
+		case ALT+CURSOR_LEFT :
+			if (spieler.scrollx > 0)
+				--spieler.scrollx;
+			break;
+
+		case ALT+CURSOR_RIGHT:
+			if ((spieler.scrollx + 320) < ScrXy[0])
+				++spieler.scrollx;
+			break;
+
+		case ALT+CURSOR_UP :
+			if (spieler.scrolly > 0)
+				--spieler.scrolly;
+			break;
+
+		case ALT+CURSOR_DOWN :
+			if ((spieler.scrolly + 200) < ScrXy[1])
+				++spieler.scrolly;
+			break;
+
+		case PLUS:
+			if (ani_wahl != 0) {
+				if (det_nr < adi->end_ani)
+					++det_nr;
+				else
+					det_nr = adi->start_ani;
+				Cxy = dptr->korrektur + (det_nr << 1);
+				Dx = adi->x + Cxy[0];
+				Dy = adi->y + Cxy[1];
+				while (kbinfo.key_code != 0);
+			}
+			break;
+
+		case MINUS:
+			if (ani_wahl != 0) {
+				if (det_nr > adi->start_ani)
+					--det_nr;
+				else
+					det_nr = adi->end_ani;
+				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+				Dx = adi->x + Cxy[0];
+				Dy = adi->y + Cxy[1];
+				while (kbinfo.key_code != 0);
+			}
+			break;
+
+		case R_KEY:
+			if (det_nr != -1)
+				get_rect(dptr->image[det_nr], Dx, Dy,
+				         chewy->image[spieler_vector[P_CHEWY].Phase * 8],
+				         spieler_vector[P_CHEWY].Xypos[0],
+				         spieler_vector[P_CHEWY].Xypos[1]);
+			else
+				get_rect(0, 0, 0, chewy->image[spieler_vector[P_CHEWY].Phase * 8],
+				         spieler_vector[P_CHEWY].Xypos[0],
+				         spieler_vector[P_CHEWY].Xypos[1]);
+			break;
+
+		case I_KEY:
+			info_flag ^= 1;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case TAB:
+			if (person_end_phase[P_CHEWY] == P_LEFT)
+				person_end_phase[P_CHEWY] = P_RIGHT;
+			else
+				person_end_phase[P_CHEWY] = P_LEFT;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case PAGE_UP:
+
+			if (auto_nr < (int16)room->room_info->AutoMovAnz - 1)
+				++auto_nr;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case PAGE_DOWN:
+
+			if (auto_nr > 0)
+				--auto_nr;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case N_KEY:
+			if (room->room_info->AutoMovAnz < MAX_AUTO_MOV) {
+				auto_nr = room->room_info->AutoMovAnz;
+				++room->room_info->AutoMovAnz;
+				Rdi->AutoMov[auto_nr].X =
+				    spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X + spieler.scrollx;
+				Rdi->AutoMov[auto_nr].Y =
+				    spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y + spieler.scrolly;
+			}
+			while (kbinfo.key_code != 0);
+			break;
+
+		case S_KEY + ALT:
+			save_flag = true;
+			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
+			while (kbinfo.key_code != 0);
+			while (kbinfo.key_code == 0);
+			while (kbinfo.key_code != 0);
+			break;
+
+		case ENTER:
+			save_flag = false;
+			Rdi->AutoMov[auto_nr].X = spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X;
+			Rdi->AutoMov[auto_nr].Y = spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y;
+		case F4_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz2, 10, c2, 0);
+			in ->alter_kb_handler();
+			for (i = 0; i < str_anz2; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c2, i));
+			tmp = (int16)Rdi->AutoMov[auto_nr].SprNr;
+			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			in ->neuer_kb_handler(&kbinfo);
+			if (abfrage != 27) {
+				save_flag = false;
+				Rdi->AutoMov[auto_nr].SprNr = (uint8) tmp;
+			}
+			break;
+
+		case F1_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz1, 10, c1, 0);
+			for (i = 0; i < str_anz1; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
+			out->back2screen(workpage);
+			while (kbinfo.key_code != 0);
+			while (kbinfo.key_code == 0);
+			while (kbinfo.key_code != 0);
+			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			break;
+
+		case F2_KEY:
+			out->setze_zeiger(0);
+			go_auto_mov();
+			break;
+
+		case F3_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			in ->alter_kb_handler();
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			tmp = 0;
+			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			in ->neuer_kb_handler(&kbinfo);
+			if (abfrage != 27) {
+				ani_wahl = 1;
+				adi = det->get_ani_detail(tmp);
+				det_nr = adi->start_ani;
+				dptr = det->get_taf_info();
+				detail_nr = tmp;
+				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+				Dx = adi->x + Cxy[0];
+				Dy = adi->y + Cxy[1];
+			}
+			break;
+
+		}
+		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
+		set_up_screen(NO_SETUP);
+		out->set_fontadr(font6x8);
+		out->set_vorschub(fvorx6x8, fvory6x8);
+		plot_auto_mov(1);
+		if (auto_nr != -1)
+			out->box(Rdi->AutoMov[auto_nr].X - 2 - spieler.scrollx,
+			          Rdi->AutoMov[auto_nr].Y - 2 - spieler.scrolly,
+			          Rdi->AutoMov[auto_nr].X + 12 - spieler.scrollx,
+			          Rdi->AutoMov[auto_nr].Y + 14 - spieler.scrolly, 8);
+		if (det_nr != -1) {
+			if (Adi[det_nr].zoom) {
+
+				dy = adi->y;
+				calc_zoom(dy, (int16)room->room_info->ZoomFak,
+				          spieler.ZoomXy[P_HOWARD][0],
+				          &detmov);
+			} else {
+				detmov.Xzoom = 0;
+				detmov.Yzoom = 0;
+			}
+			out->scale_set(dptr->image[det_nr], Dx - spieler.scrollx, Dy - spieler.scrolly,
+			                detmov.Xzoom, detmov.Yzoom, 0);
+		}
+		if (info_flag) {
+			out->printxy(0, 0, 255, 300, scr_width, "MIT OFFSET x = %3d y =
+			              % 3d\0", spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X, spieler_vector[P_CHEWY].Xypos[1] + CH
+			              _HOT_MOV_Y);
+			out->printxy(0, 10, 255, 300, scr_width, "NORMAL x = %3d y =
+			              % 3d\0", spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			              out->printxy(0, 20, 255, 300, scr_width, "AUTOPUNKT x = %3d y =
+			                            % 3d\0", Rdi->AutoMov[auto_nr].X, Rdi->AutoMov[auto_nr].Y);
+			                            out->printxy(0, 30, 255, 300, scr_width, "DETAIL NUMMER %d\0", detail_nr);
+		}
+		              cur->plot_cur();
+		out->back2screen(workpage);
+	}
+	if (save_flag == false) {
+		x = 160;
+		y = 100;
+		str_anz1 = 2;
+		out->setze_zeiger(0);
+		auto_menu(&x, &y, str_anz1, 10, no_sav, 0);
+		for (i = 0; i < str_anz1; i++)
+			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
+		if (ja_nein() == J_KEY) {
+			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
+		}
+	}
+
+}
+
+void get_scroll_val() {
+	out->setze_zeiger(0);
+	out->printxy(0, 0, 255, 300, scr_width, "SCROLL X = %3d ", spieler.scrollx);
+	out->printxy(0, 10, 255, 300, scr_width, "SCROLL Y = %3d ", spieler.scrolly);
+	while (in->get_switch_code() != ESC);
+}
+
+void play_last_ani(int16 nr) {
+}
+
+void set_z_ebene() {
+#define ANI_DETAIL 1
+#define STATIC_DETAIL 2
+#define INVENT_DETAIL 3
+	static_detail_info *sdi;
+	ani_detail_info *adi;
+	taf_info *dptr;
+	int16 ende;
+	int16 x, y;
+	int16 lx, ly;
+	int16 str_anz, str_anz1;
+	int16 info_flag;
+	int16 i;
+	int16 tmp;
+	int16 abfrage;
+	int16 det_nr;
+	int16 detail_nr;
+	int16 *Cxy;
+	int16 Dx, Dy;
+	int16 *xy;
+	int16 detail_flag;
+	int16 plot_flag;
+	short save_flag;
+	int16 *ScrXy;
+	int16 dy;
+	char *image;
+	ObjMov detmov;
+	char c[] = {"Detail Nummer eingeben\0"
+	            "Werte zwischen 0 - 32 sind zulässig\0"
+	            "Ihre Wahl : \0"
+	           };
+	char c1[] = {" HELP Z-EBENE\0"
+	             "I Info AN/AUS\0"
+	             "P Detail nicht zeichnen\0"
+	             "TAB Chewy Flip/Flop\0"
+	             "CURSOR + ALT Z-Linie verschieben\0"
+	             "F2 neues Ani Detail wählen\0"
+	             "F3 neues Static Detail wählen\0"
+	             "F4 Inventar wählen\0"
+	             "PLUS + MINUS Ani Detail weiterblättern\0"
+	             "Alt+S Z-Ebenen speichern\0"
+	             "ENTER Z-Ebene festsetzen\0"
+	            };
+	save_flag = true;
+	str_anz1 = 11;
+	str_anz = 3;
+	ende = 0;
+	lx = 0;
+	ly = 1;
+	det_nr = -1;
+	detail_nr = -1;
+	detail_flag = false;
+
+	info_flag = true;
+	plot_flag = true;
+	load_org();
+	ScrXy = (int16 *)ablage[room_blk.AkAblage];
+	while (!ende) {
+		if (minfo.button == 1) {
+			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
+			Bewegungs
+			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
+			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
+			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			mov->
+			get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector
+			               [P_CHEWY]);
+			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+			spieler_vector[P_CHEWY].DelayCount = 0;
+		}
+		switch (in->get_switch_code()) {
+		case I_KEY:
+			info_flag ^= 1;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case P_KEY:
+			plot_flag ^= 1;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case ESC :
+			ende = 1;
+			break;
+
+		case PAGE_UP:
+			if (detail_flag == STATIC_DETAIL) {
+				if (detail_nr < MAXDETAILS - 1) {
+					++detail_nr;
+					sdi = &Rdi->Sinfo[detail_nr];
+					det_nr = sdi->SprNr;
+					if (det_nr != -1) {
+						ly = sdi->z_ebene;
+						dptr = det->get_taf_info();
+						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+						Dx = sdi->x;
+						Dy = sdi->y;
+						image = dptr->image[det_nr];
+					}
+				}
+			} else if (detail_flag == ANI_DETAIL) {
+				if (detail_nr < MAXDETAILS - 1) {
+					++detail_nr;
+					adi = &Rdi->Ainfo[detail_nr];
+					det_nr = adi->start_ani;
+					if (det_nr != -1) {
+						ly = adi->z_ebene;
+						dptr = det->get_taf_info();
+						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+						Dx = adi->x + Cxy[0];
+						Dy = adi->y + Cxy[1];
+						image = dptr->image[det_nr];
+					}
+				}
+			} else if (detail_flag == INVENT_DETAIL) {
+				if (detail_nr < obj->mov_obj_room[0] - 1) {
+					++detail_nr;
+					det_nr = obj->mov_obj_room[detail_nr + 1];
+					image = inv_spr[det_nr];
+					Dx = spieler.room_m_obj[det_nr].X;
+					Dy = spieler.room_m_obj[det_nr].Y;
+					ly = spieler.room_m_obj[det_nr].ZEbene;
+				}
+			}
+			while (kbinfo.key_code != 0);
+			break;
+
+		case PAGE_DOWN:
+			if (detail_flag == STATIC_DETAIL) {
+				if (detail_nr > 0) {
+					--detail_nr;
+					sdi = &Rdi->Sinfo[detail_nr];
+					det_nr = sdi->SprNr;
+					if (det_nr != -1) {
+						ly = sdi->z_ebene;
+						dptr = det->get_taf_info();
+						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+						Dx = sdi->x;
+						Dy = sdi->y;
+						image = dptr->image[det_nr];
+					}
+				}
+			} else if (detail_flag == ANI_DETAIL) {
+				if (detail_nr > 0) {
+					--detail_nr;
+					adi = &Rdi->Ainfo[detail_nr];
+					det_nr = adi->start_ani;
+					if (det_nr != -1) {
+						ly = adi->z_ebene;
+						dptr = det->get_taf_info();
+						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+						Dx = adi->x + Cxy[0];
+						Dy = adi->y + Cxy[1];
+						image = dptr->image[det_nr];
+					}
+				}
+			} else if (detail_flag == INVENT_DETAIL) {
+				if (detail_nr > 0) {
+					--detail_nr;
+					det_nr = obj->mov_obj_room[detail_nr + 1];
+					image = inv_spr[det_nr];
+					Dx = spieler.room_m_obj[det_nr].X;
+					Dy = spieler.room_m_obj[det_nr].Y;
+					ly = spieler.room_m_obj[det_nr].ZEbene;
+				}
+			}
+			while (kbinfo.key_code != 0);
+			break;
+
+		case CURSOR_UP:
+			spieler_vector[P_CHEWY].Xypos[1] -= 1;
+			break;
+
+		case CURSOR_DOWN:
+			spieler_vector[P_CHEWY].Xypos[1] += 1;
+			break;
+
+		case CURSOR_LEFT:
+			spieler_vector[P_CHEWY].Xypos[0] -= 1;
+			break;
+
+		case CURSOR_RIGHT:
+			spieler_vector[P_CHEWY].Xypos[0] += 1;
+			break;
+
+		case CURSOR_UP + ALT:
+			if (ly > 0)
+				--ly;
+			break;
+
+		case CURSOR_DOWN + ALT:
+
+			++ly;
+			break;
+
+		case TAB:
+			if (person_end_phase[P_CHEWY] == P_LEFT)
+				person_end_phase[P_CHEWY] = P_RIGHT;
+			else
+				person_end_phase[P_CHEWY] = P_LEFT;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case PLUS:
+			if (detail_flag == ANI_DETAIL) {
+				if (det_nr < adi->end_ani)
+					++det_nr;
+				else
+					det_nr = adi->start_ani;
+				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+				Dx = adi->x + Cxy[0];
+				Dy = adi->y + Cxy[1];
+				image = dptr->image[det_nr];
+				if (adi->zoom) {
+					dy = adi->y;
+					calc_zoom(dy, (int16)room->room_info->ZoomFak,
+					          (int16)room->room_info->ZoomFak, &detmov);
+				} else {
+					detmov.Xzoom = 0;
+					detmov.Yzoom = 0;
+				}
+				while (kbinfo.key_code != 0);
+			}
+			break;
+
+		case MINUS:
+			if (detail_flag == ANI_DETAIL) {
+				if (det_nr > adi->start_ani)
+					--det_nr;
+				else
+					det_nr = adi->end_ani;
+				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+				Dx = adi->x + Cxy[0];
+				Dy = adi->y + Cxy[1];
+				image = dptr->image[det_nr];
+				if (adi->zoom) {
+					dy = adi->y;
+					calc_zoom(dy, (int16)room->room_info->ZoomFak,
+					          (int16)room->room_info->ZoomFak, &detmov);
+				} else {
+					detmov.Xzoom = 0;
+					detmov.Yzoom = 0;
+				}
+				while (kbinfo.key_code != 0);
+			}
+			break;
+
+		case S_KEY + ALT:
+			save_flag = true;
+			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+
+			save_iib(INVENTAR_IIB);
+			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
+			while (kbinfo.key_code != 0);
+			while (kbinfo.key_code == 0);
+			while (kbinfo.key_code != 0);
+			break;
+
+		case ENTER:
+			save_flag = false;
+			if (detail_flag == ANI_DETAIL) {
+				adi->z_ebene = ly;
+			} else if (detail_flag == STATIC_DETAIL) {
+				sdi->z_ebene = ly;
+			} else if (detail_flag == INVENT_DETAIL) {
+				spieler.room_m_obj[det_nr].ZEbene = ly;
+			}
+			break;
+
+		case F1_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz1, 10, c1, 0);
+			for (i = 0; i < str_anz1; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
+			out->back2screen(workpage);
+			while (kbinfo.key_code != 0);
+			while (kbinfo.key_code == 0);
+			while (kbinfo.key_code != 0);
+			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			break;
+
+		case F2_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			in ->alter_kb_handler();
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			tmp = 0;
+			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			in ->neuer_kb_handler(&kbinfo);
+			if (abfrage != 27) {
+				detail_nr = tmp;
+				detail_flag = ANI_DETAIL;
+				adi = det->get_ani_detail(tmp);
+				det_nr = adi->start_ani;
+				if (det_nr != -1) {
+					ly = adi->z_ebene;
+					dptr = det->get_taf_info();
+					Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+					Dx = adi->x + Cxy[0];
+					Dy = adi->y + Cxy[1];
+					image = dptr->image[det_nr];
+					if (adi->zoom) {
+						dy = adi->y ;
+						calc_zoom(dy, (int16)room->room_info->ZoomFak,
+						          (int16)room->room_info->ZoomFak, &detmov);
+					} else {
+						detmov.Xzoom = 0;
+						detmov.Yzoom = 0;
+					}
+				}
+			}
+			break;
+
+		case F3_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			in ->alter_kb_handler();
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			tmp = 0;
+			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			in ->neuer_kb_handler(&kbinfo);
+			if (abfrage != 27) {
+				detail_flag = STATIC_DETAIL;
+				detail_nr = tmp;
+				sdi = &Rdi->Sinfo[tmp];
+				det_nr = sdi->SprNr;
+				if (det_nr != -1) {
+					detmov.Xzoom = 0;
+					detmov.Yzoom = 0;
+					ly = sdi->z_ebene;
+					dptr = det->get_taf_info();
+					Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
+					Dx = sdi->x;
+					Dy = sdi->y;
+					image = dptr->image[det_nr];
+				}
+			}
+			break;
+
+		case F4_KEY:
+			if (obj->mov_obj_room[0] != 0) {
+				detail_flag = INVENT_DETAIL;
+				detail_nr = 0;
+				det_nr = obj->mov_obj_room[detail_nr + 1];
+				image = inv_spr[det_nr];
+				Dx = spieler.room_m_obj[det_nr].X;
+				Dy = spieler.room_m_obj[det_nr].Y;
+				ly = spieler.room_m_obj[det_nr].ZEbene;
+			} else {
+				out->setze_zeiger(0);
+				out->printxy(0, 190, 0, 255, scr_width, " Kein Inventar vorhanden ...\0");
+				while (kbinfo.key_code != 0);
+			}
+			break;
+
+		}
+		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
+		set_up_screen(NO_SETUP);
+		if (det_nr != -1 && plot_flag) {
+			out->scale_set(image, Dx - spieler.scrollx, Dy - spieler.scrolly,
+			                detmov.Xzoom, detmov.Yzoom, 0);
+
+			xy = (int16 *)image;
+			out->
+			box(Dx - spieler.scrollx, Dy - spieler.scrolly, Dx + xy[0] - spieler.scrollx, Dy + xy[1] - spieler.scro
+			    lly, 255);
+		}
+		out->set_fontadr(font6x8);
+		out->set_vorschub(fvorx6x8, fvory6x8);
+		out->linie(lx, ly - spieler.scrolly, lx + 320, ly - spieler.scrolly, 255);
+		if (info_flag) {
+			out->printxy(0, 0, 255, 300, scr_width, "CHEWY Z_EBENE %d LINIE Z_EBENE
+			              % d\0", spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y - abs(spieler_vector[P_CHEWY].Yzoom), l
+			              y);
+			if (detail_flag == ANI_DETAIL)
+				out->printxy(0, 10, 255, 300, scr_width, "ANI DETAIL NUMMER %d\0", detail_nr);
+			if (detail_flag == STATIC_DETAIL)
+				out->printxy(0, 10, 255, 300, scr_width, "STATIC DETAIL NUMMER %d\0", detail_nr);
+			if (detail_flag == INVENT_DETAIL)
+				out->printxy(0, 10, 255, 300, scr_width, "INVENTAR NUMMER %d\0", detail_nr);
+		}
+		cur->plot_cur();
+		out->back2screen(workpage);
+	}
+	if (save_flag == false) {
+		x = 160;
+		y = 100;
+		str_anz1 = 2;
+		out->setze_zeiger(0);
+		auto_menu(&x, &y, str_anz1, 10, no_sav, 0);
+		for (i = 0; i < str_anz1; i++)
+			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
+		if (ja_nein() == J_KEY) {
+			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			save_iib(INVENTAR_IIB);
+			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
+		}
+	}
+
+}
+
+int16 ja_nein() {
+	int16 ende;
+	int16 ret;
+	ende = 0;
+	while (in->get_switch_code());
+	while (!ende) {
+		switch (in->get_switch_code()) {
+		case ESC:
+			ret = false;
+			ende = 1;
+			break;
+
+		case J_KEY:
+			ret = kbinfo.scan_code;
+			ende = 1;
+			break;
+
+		case N_KEY:
+			ret = kbinfo.scan_code;
+			ende = 1;
+			break;
+
+		}
+	}
+	return (ret);
+}
+
+void save_iib(char *fname) {
+	FILE *handle;
+	modul = 0;
+	fcode = 0;
+	handle = fopen(fname, "rb+");
+	if (handle) {
+		if (!fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+			fcode = READFEHLER;
+			modul = DATEI;
+		} else if (!strnicmp(iib_datei_header.Id, "IIB", 3)) {
+			fclose(handle);
+			handle = fopen(fname, "wb+");
+			if (handle) {
+				iib_datei_header.Size = (uint32)(sizeof(RoomMovObjekt) * MAX_MOV_OBJ);
+				if (!fwrite(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+					modul = DATEI;
+					fcode = WRITEFEHLER;
+				} else if (!fwrite(spieler.room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
+					modul = DATEI;
+					fcode = WRITEFEHLER;
+				}
+			}
+		}
+		fclose(handle);
+	}
+}
+
+void load_org() {
+	int16 i;
+	det->load_rdi(room_blk.DetFile, spieler.PersonRoomNr[P_CHEWY]);
+	obj->load(INVENTAR_IIB, &spieler.room_m_obj[0]);
+	ERROR
+	obj->load(INVENTAR_SIB, &spieler.room_s_obj[0]);
+	ERROR
+	obj->sort();
+	for (i = 0; i < MAX_MOV_OBJ; i++) {
+		spieler.InventSlot[i] = -1;
+	}
+	for (i = 0; i < obj->spieler_invnr[0]; i++)
+		spieler.InventSlot[i] = obj->spieler_invnr[i + 1];
+	obj->calc_all_static_detail();
+}
+
+void calc_mouse_scroll(int16 scrx, int16 scry) {
+	if (minfo.x > 319 - (curblk.xsize + 20)) {
+		if ((spieler.scrollx + 320) < scrx)
+			++spieler.scrollx;
+	}
+	if (minfo.x < 10) {
+		if (spieler.scrollx > 0)
+			--spieler.scrollx;
+	}
+	if (minfo.y > 199 - (curblk.ysize + 10)) {
+		if ((spieler.scrolly + 200) < scry)
+			++spieler.scrolly;
+	}
+	if (minfo.y < 10) {
+		if (spieler.scrolly > 0)
+			--spieler.scrolly;
+	}
+}
+
+void set_person() {
+	int16 ende;
+	int16 x, y;
+	int16 str_anz;
+	int16 tmp;
+	int16 info_flag;
+	int16 i;
+	int16 abfrage;
+	void (*TmpSetUpScreenFunc)(void);
+	char c[] = {" HELP PERSON setzen\0"
+	            "F2 Person wählen\0"
+	            "F3 Zoomwerte eingeben\0"
+	            "I Info AN/AUS\0"
+	           };
+	char c1[] = {"Bitte Zoom Faktor eingeben \0"
+	             "X Zoom : \0"
+	            };
+	char c2[] = {"Bitte Zoom Faktor eingeben \0"
+	             "Y Zoom : \0"
+	            };
+	char c3[] = {"Bitte Zoom Horizont eingeben \0"
+	             "Ihre Wahl : \0"
+	            };
+	char c4[] = {"Person Nummer eingeben\0"
+	             "Ihre Wahl : \0"
+	            };
+	str_anz = 4;
+	ende = 0;
+	info_flag = true;
+	TmpSetUpScreenFunc = SetUpScreenFunc;
+	SetUpScreenFunc = 0;
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	spieler.ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
+	spieler.ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
+	while (!ende) {
+		if (minfo.button == 1) {
+			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
+			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
+			spieler_mi[p_nr].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
+			spieler_mi[p_nr].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			mov->
+			get_mov_vector(spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]
+			              );
+			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
+			spieler_vector[p_nr].DelayCount = 0;
+		}
+		switch (in->get_switch_code()) {
+		case I_KEY:
+			info_flag ^= 1;
+			while (kbinfo.key_code != 0);
+			break;
+
+		case F1_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			out->back2screen(workpage);
+			while (kbinfo.key_code != 0);
+			while (kbinfo.key_code == 0);
+			while (kbinfo.key_code != 0);
+			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			break;
+
+		case F2_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, 2, 10, c, 0);
+			in ->alter_kb_handler();
+			tmp = p_nr;
+			for (i = 0; i < 2; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c4, i));
+			abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			if (abfrage != 27) {
+				p_nr = tmp;
+			}
+			in->neuer_kb_handler(&kbinfo);
+			break;
+
+		case F3_KEY:
+			out->setze_zeiger(0);
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, 2, 10, c, 0);
+			in ->alter_kb_handler();
+			if (p_nr == P_CHEWY) {
+				for (i = 0; i < 2; i++)
+					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
+				tmp = room->room_info->ZoomFak;
+				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+				if (abfrage != 27) {
+					room->set_zoom(tmp);
+					spieler.ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
+					spieler.ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
+				}
+			} else {
+				for (i = 0; i < 2; i++)
+					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
+				tmp = spieler.ZoomXy[p_nr][0];
+				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+				if (abfrage != 27) {
+					spieler.ZoomXy[p_nr][0] = tmp;
+				}
+				for (i = 0; i < 2; i++)
+					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c2, i));
+				tmp = spieler.ZoomXy[p_nr][1];
+				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+				if (abfrage != 27) {
+					spieler.ZoomXy[p_nr][1] = tmp;
+				}
+			}
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, 2, 10, c1, 0);
+			for (i = 0; i < 2; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c3, i));
+			tmp = zoom_horizont;
+			abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
+			if (abfrage != 27) {
+				zoom_horizont = tmp;
+			}
+			in->neuer_kb_handler(&kbinfo);
+			break;
+
+		case ESC:
+			ende = 1;
+			break;
+
+		case CURSOR_UP:
+			spieler_vector[p_nr].Xypos[1] -= 1;
+			break;
+
+		case CURSOR_DOWN:
+			spieler_vector[p_nr].Xypos[1] += 1;
+			break;
+
+		case CURSOR_LEFT:
+			spieler_vector[p_nr].Xypos[0] -= 1;
+			break;
+
+		case CURSOR_RIGHT:
+			spieler_vector[p_nr].Xypos[0] += 1;
+			break;
+
+		}
+		set_up_screen(NO_SETUP);
+		out->set_fontadr(font6x8);
+		out->set_vorschub(fvorx6x8, fvory6x8);
+		if (info_flag) {
+			out->printxy(0, 0, 255, 300, scr_width, "Person x %d Person y %d", spieler_vector[p_nr].Xypos[0], spieler_vector[p_nr].Xypos[1]);
+			out->printxy(0, 10, 255, 300, scr_width, "Zoomx %d Zoomy %d", spieler.ZoomXy[p_nr][0], spieler.ZoomXy[p_nr][1]);
+			out->printxy(0, 20, 255, 300, scr_width, "ZoomHorizont %d", zoom_horizont);
+			out->printxy(0, 30, 255, 300, scr_width, "AK-Zoomx %d AK-Zoomy %d", spieler_vector[p_nr].Xzoom, spieler_vector[p_nr].Yzoom);
+
+		}
+		cur->plot_cur();
+		out->back2screen(workpage);
+	}
+	SetUpScreenFunc = TmpSetUpScreenFunc;
+}
+
+void get_inv() {
+	int16 x, y;
+	int16 abfrage;
+	int16 i;
+	int16 tmp;
+	char c[] = {" INVENTAR holen n\0"
+	            "Ihre Wahl :\0"
+	           };
+	out->setze_zeiger(0);
+	x = 160;
+	y = 100;
+	auto_menu(&x, &y, 2, 10, c, 0);
+	in ->alter_kb_handler();
+	tmp = 0;
+	for (i = 0; i < 2; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " % [0 - 9]3d\0", &tmp);
+	if (abfrage != 27)
+	{
+		invent_2_slot(tmp);
+	}
+	in->neuer_kb_handler(&kbinfo);
+}
+
+void del_inv() {
+	int16 x, y;
+	int16 abfrage;
+	int16 i;
+	int16 tmp;
+	char c[] = {" INVENTAR löschen n\0"
+	            "Ihre Wahl :\0"
+	           };
+	out->setze_zeiger(0);
+	x = 160;
+	y = 100;
+	auto_menu(&x, &y, 2, 10, c, 0);
+	in ->alter_kb_handler();
+	tmp = 0;
+	for (i = 0; i < 2; i++)
+		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " % [0 - 9]3d\0", &tmp);
+	if (abfrage != 27)
+	{
+		del_invent_slot(tmp);
+	}
+	in->neuer_kb_handler(&kbinfo);
+}
+
+#endif
diff --git a/engines/chewy/ch_icm.h b/engines/chewy/ch_icm.h
new file mode 100644
index 00000000000..6d32187c087
--- /dev/null
+++ b/engines/chewy/ch_icm.h
@@ -0,0 +1,62 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_CHICM_H
+#define CHEWY_CHICM_H
+
+void set_person();
+
+void draw_ice_win();
+
+void get_room_nr();
+
+void room_info();
+
+void plot_auto_mov(int16 mode);
+
+void go_auto_mov();
+
+void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2);
+void plot_maus();
+void plot_rect();
+
+void get_auto_mov();
+void start_detail();
+void play_last_ani(int16 nr);
+
+void set_z_ebene();
+void get_phase(ObjMov *om, MovInfo *mi);
+
+void save_iib(char *fname);
+
+int16 ja_nein();
+
+void load_org();
+
+void calc_mouse_scroll(int16 scrx, int16 scry);
+void get_scroll_val();
+
+void get_zoom_value();
+
+IibDateiHeader iib_datei_header;
+
+#endif
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 9a27444fe0f..169db7d53d3 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -21,15 +21,19 @@
 
 #include "common/config-manager.h"
 #include "common/fs.h"
+#include "common/system.h"
 #include "engines/util.h"
 #include "chewy/chewy.h"
+#include "chewy/main.h"
+#include "chewy/resource.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
 ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 	: Engine(syst),
-	_gameDescription(gameDesc),
-	_rnd("chewy") {
+	  _gameDescription(gameDesc),
+	  _rnd("chewy") {
 
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 
@@ -43,9 +47,11 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 }
 
 ChewyEngine::~ChewyEngine() {
+	delete _sound;
 }
 
 void ChewyEngine::initialize() {
+	_sound = new Sound(_mixer);
 }
 
 Common::Error ChewyEngine::run() {
@@ -55,6 +61,14 @@ Common::Error ChewyEngine::run() {
 
 	initialize();
 
+	game_main();
+
+	// Run a dummy loop
+	while (!shouldQuit()) {
+		g_system->updateScreen();
+		g_system->delayMillis(10);
+	}
+
 	return Common::kNoError;
 }
 
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index b5f682fead0..8b363021f63 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -22,6 +22,9 @@
 #ifndef CHEWY_CHEWY_H
 #define CHEWY_CHEWY_H
 
+// FIXME
+#define AIL
+#define ENGLISCH
 
 #include "common/scummsys.h"
 #include "common/error.h"
@@ -33,6 +36,7 @@
 namespace Chewy {
 
 struct ChewyGameDescription;
+class Sound;
 
 class ChewyEngine : public Engine {
 public:
@@ -54,6 +58,8 @@ protected:
 
 	void initialize();
 	void shutdown();
+
+	Sound *_sound;
 };
 
 } // End of namespace Chewy
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
new file mode 100644
index 00000000000..93803911c7d
--- /dev/null
+++ b/engines/chewy/cursor.cpp
@@ -0,0 +1,206 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/cursor.h"
+#include "common/textconsole.h"
+
+#define false false
+#define true true
+
+cursor::cursor(mcga_grafik *iout, maus *iin, cur_blk *curblkp) {
+	out = iout;
+	in = iin;
+	scr_width = scr_w;
+	curblk = curblkp;
+	inzeig = in->get_in_zeiger();
+	if (!inzeig->minfo)
+		maus_da = false;
+	else {
+		maus_da = true;
+		minfo = inzeig->minfo;
+		sichtbar = false;
+		ani = false;
+		cur_aufruf = false;
+		ani_count = false;
+	}
+}
+
+cursor::~cursor() {
+}
+
+void cursor::plot_cur() {
+	if (maus_da && sichtbar) {
+		if (cur_move == 1) {
+			mouse_aktiv = 1;
+			cur_move = 0;
+			if (!curblk->no_back) {
+
+				out->blockcopy(curblk->cur_back, cur_x_old, cur_y_old, scr_width);
+
+				out->sprite_save(curblk->cur_back, (minfo->x + curblk->page_off_x),
+				                  (minfo->y + curblk->page_off_y), curblk->xsize,
+				                  curblk->ysize, scr_width);
+			}
+
+			cur_x_old = (minfo->x + curblk->page_off_x);
+			cur_y_old = (minfo->y + curblk->page_off_y);
+		}
+
+		cur_aufruf -= 1;
+		if ((cur_aufruf <= 0) && (ani != false)) {
+			cur_aufruf = ani->delay;
+			++ani_count;
+			if (ani_count > ani->ani_end)
+				ani_count = ani->ani_anf;
+		}
+
+		out->sprite_set(curblk->sprite[ani_count], cur_x_old, cur_y_old,
+		                 scr_width);
+		mouse_aktiv = 0;
+	}
+}
+
+void cursor::show_cur() {
+	warning("STUB - show_cur");
+#if 0
+	int16 x, y;
+	if ((maus_da) && (!sichtbar)) {
+		sichtbar = TRUE;
+		mouse_aktiv = 1;
+		x = minfo->x;
+		y = minfo->y;
+#pragma aux asm_pos = \
+"push eax"\
+"push edx"\
+"push ecx"\
+"mov ax,3"\
+"int 033h"\
+"mov x,cx"\
+"mov y,dx"\
+"pop ecx"\
+"pop edx"\
+"pop eax"
+		asm_pos();
+		minfo->x = x;
+		minfo->y = y;
+		if (curblk->no_back != TRUE) {
+
+			out->sprite_save(curblk->cur_back, (minfo->x + curblk->page_off_x),
+			                  (minfo->y + curblk->page_off_y), curblk->xsize,
+			                  curblk->ysize, scr_width);
+		}
+
+		cur_x_old = (minfo->x + curblk->page_off_x);
+		cur_y_old = (minfo->y + curblk->page_off_y);
+		cur_move = 1;
+		plot_cur();
+	}
+#endif
+}
+
+void cursor::hide_cur() {
+	if ((maus_da) && (sichtbar)) {
+		if (!curblk->no_back) {
+			out->blockcopy(curblk->cur_back, cur_x_old, cur_y_old, scr_width);
+		}
+		sichtbar = false;
+	}
+}
+
+void cursor::set_cur_ani(cur_ani *ani1) {
+	ani = ani1;
+	cur_aufruf = 0;
+	ani_count = ani->ani_anf;
+}
+
+void cursor::move(int16 x, int16 y) {
+	if (maus_da) {
+		mouse_aktiv = 1;
+
+		minfo->x = x;
+		minfo->y = y;
+		cur_x_old = (minfo->x + curblk->page_off_x);
+		cur_y_old = (minfo->y + curblk->page_off_y);
+		in->move_mouse(x, y);
+		if (sichtbar == true)
+			cur_move = 1;
+		else
+			cur_move = 0;
+		mouse_aktiv = 0;
+	}
+}
+
+void cursor::wait_taste_los(int16 maus_plot) {
+	warning("STUB - wait_taste_los");
+#if 0
+	int16 is_mouse, stay;
+	int16 switch_code;
+	is_mouse = 0;
+	if (maus_da) {
+
+#pragma aux check_mknopf = \
+"push ax"\
+"push bx"\
+"push cx"\
+"push dx"\
+"mov ax,3"\
+"int 033h"\
+"mov is_mouse,bx"\
+"pop dx"\
+"pop cx"\
+"pop bx"\
+"pop ax"
+		check_mknopf();
+	}
+	if (!is_mouse)
+		in->hot_key = 0;
+	stay = 1;
+	switch_code = 1;
+	while ((switch_code != 0) && (stay)) {
+		switch_code = in->get_switch_code();
+		if (is_mouse) {
+			switch_code = 2;
+#pragma aux check_mknopf2 = \
+"push ax"\
+"push bx"\
+"push cx"\
+"push dx"\
+"mov ax,3"\
+"int 033h"\
+"mov stay,bx"\
+"pop dx"\
+"pop cx"\
+"pop bx"\
+"pop ax"\
+check_mknopf2();
+		}
+		if (maus_plot != FALSE)
+			plot_cur();
+	}
+#endif
+}
+
+void cursor::wait_taste(int16 maus_plot) {
+	while (in->get_switch_code() == 0)
+		if (maus_plot != false)
+			plot_cur();
+}
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
new file mode 100644
index 00000000000..7290d3e56b2
--- /dev/null
+++ b/engines/chewy/cursor.h
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_CURSOR_H
+#define CHEWY_CURSOR_H
+
+#include "engines/chewy/mcga.h"
+#include "engines/chewy/ngstypes.h"
+
+extern int16 scr_w;
+
+class cursor {
+
+public:
+	cursor();
+	cursor(mcga_grafik *out, maus *in, cur_blk *curblk);
+	~cursor();
+
+	void plot_cur();
+
+	void show_cur();
+
+	void hide_cur();
+
+	void set_cur_ani(cur_ani *ani);
+
+	void move(int16 x, int16 y);
+	void wait_taste_los(int16 maus_plot);
+	void wait_taste(int16 maus_plot);
+
+	mcga_grafik *out;
+	maus *in;
+	maus_info *minfo;
+	in_zeiger *inzeig;
+	cur_blk *curblk;
+	cur_ani *ani;
+	int scr_width;
+	int16 cur_x_old;
+	int16 cur_y_old;
+	int16 cur_aufruf;
+	int16 ani_count;
+	uint8 maus_da;
+	bool sichtbar;
+};
+#endif
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
new file mode 100644
index 00000000000..255ccb38d0c
--- /dev/null
+++ b/engines/chewy/datei.cpp
@@ -0,0 +1,1998 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_fread
+#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
+#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
+#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
+#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
+#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
+#define FORBIDDEN_SYMBOL_EXCEPTION_fputc
+#define FORBIDDEN_SYMBOL_EXCEPTION_ftell
+#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_getch
+
+
+#include "common/debug.h"
+#include "engines/chewy/datei.h"
+#define GRAFIK 1
+#define SPEICHER 2
+#define DATEI 3
+#define MAUS 4
+#define DIALOG 5
+
+#undef MAXPATH
+#define MAXPATH 1000
+
+char filename[MAXPATH];
+uint8 tmp[10000]; // FIXME
+
+extern int16 modul;
+extern int16 fcode;
+int16 *ft ;
+datei::datei() {
+#if 0
+	int16 i;
+	char *enstr;
+	char a[] = {129, 122, 134, 96, 133, 120, 137, 120, 116, 127, 0}; //"NGS-REVEAL"
+	char
+	b[] = {121, 124, 127, 120, 146, 128, 116, 129, 116, 122, 120, 133, 146, 91, 118, 92, 146,
+		129, 120, 138, 146, 122, 120, 129, 120, 133, 116, 135, 124, 130, 129, 146, 134, 130,
+		121, 135, 138, 116, 133, 120, 0 }; // "FILE_MANAGER_(C)_NEW_GENERATION_SOFTWARE"
+	for (i = 0; a[i] != 0; i++)
+		a[i] -= 51;
+	for (i = 0; b[i] != 0; i++)
+		b[i] -= 51;
+	enstr = (char *)getenv(a);
+	if (enstr) {
+		printf(b);
+		printf("\n");
+		delay(800);
+	}
+#endif
+}
+datei::~datei() {
+}
+
+void datei::load_pcx(char *fname, char *speicher, char *palette) {
+	FILE *handle;
+	pcx_header *header;
+	uint8 zeichen;
+	uint16 count, i = 0, j = 0, index;
+	int16 hoehe;
+	int16 breite;
+	int16 *abmess;
+	header = (pcx_header *)tmp;
+	abmess = (int16 *)speicher;
+	speicher += 4;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".PCX\0");
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (fread(header, sizeof(pcx_header), 1, handle)) {
+			if ((header->id == 10) && (header->version == 5) && (header->bpp == 8)) {
+				hoehe = (header->ymax - header->ymin) + 1;
+				breite = header->bpz * header->planes;
+
+				abmess[0] = breite;
+				abmess[1] = hoehe;
+				fseek(handle, 128L, SEEK_SET);
+				for (i = 0; i < hoehe; i++) {
+					index = 0;
+					while (index < breite) {
+						zeichen = fgetc(handle);
+						if (((zeichen & 0xc0) == 0xc0) && (header->komp)) {
+							count = zeichen & 0x3f;
+
+							zeichen = fgetc(handle);
+							for (j = 0; j < count; j++) {
+
+								speicher[index] = zeichen;
+								++index;
+							}
+
+						}
+						else {
+							speicher[index] = zeichen;
+							index++;
+						}
+					}
+					speicher += breite;
+				}
+				if (!(fseek(handle, -769L, SEEK_END))) {
+					zeichen = fgetc(handle);
+					if (zeichen == 12) {
+						fseek(handle, -768L, SEEK_END);
+						if ((fread(palette, 768, 1, handle)) != 1) {
+							fcode = PALETTEFEHLER;
+							modul = DATEI;
+						} else {
+							j = 0;
+							for (i = 0; i < 256; i++) {
+								palette[j] >>= 2;
+								palette[j + 1] >>= 2;
+								palette[j + 2] >>= 2;
+								j += 3;
+							}
+						}
+					}
+					else {
+						fcode = PALETTEFEHLER;
+						modul = DATEI;
+					}
+				}
+			}
+			else {
+				fcode = NOTPCX;
+				modul = DATEI;
+			}
+		}
+		else {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::load_image(char *fname, char *sp, char *palette) {
+	FILE *handle;
+	tbf_dateiheader *header;
+	uint16 i = 0;
+	int16 *abmess;
+	char *speicher;
+	int16 format;
+	header = (tbf_dateiheader *)tmp;
+	speicher = sp;
+	abmess = (int16 *) speicher;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".TBF\0");
+	correct_fname(filename);
+	if ((speicher) && (palette)) {
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+				format = get_id(header->id);
+				if (format != -1) {
+					for (i = 0; i < 768; i++)
+						palette[i] = header->palette[i];
+					fseek(handle, ((long)(sizeof(tbf_dateiheader) + 1)), SEEK_SET);
+					switch (format) {
+					case TBFDATEI:
+						abmess[0] = header->width;
+						abmess[1] = header->height;
+						speicher += 4;
+						read_tbf_image((void *)handle, header->komp,
+						               header->entpsize, speicher);
+						break;
+					case TPFDATEI:
+						abmess[0] = header->width;
+						abmess[1] = header->height;
+						speicher += 4;
+						read_tpf_image((void *)handle, header->komp,
+						               header->entpsize, speicher);
+						break;
+					}
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::load_image(void *h, char *sp, char *palette) {
+	FILE *handle = (FILE *)h;
+	tbf_dateiheader *header;
+	uint16 i = 0;
+	int16 *abmess;
+	char *speicher;
+	int16 format;
+	ChunkHead ch;
+	header = (tbf_dateiheader *)tmp;
+	speicher = sp;
+	abmess = (int16 *) speicher;
+	if ((speicher) && (palette) && (handle)) {
+		if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+			format = get_id(header->id);
+			if (format != -1) {
+				for (i = 0; i < 768; i++)
+					palette[i] = header->palette[i];
+				switch (format) {
+				case TBFDATEI:
+					abmess[0] = header->width;
+					abmess[1] = header->height;
+					speicher += 4;
+					read_tbf_image((void *)handle, header->komp,
+					               header->entpsize, speicher);
+					break;
+				case TPFDATEI:
+					abmess[0] = header->width;
+					abmess[1] = header->height;
+					speicher += 4;
+					read_tpf_image((void *)handle, header->komp,
+					               header->entpsize, speicher);
+					break;
+				}
+			}
+			else {
+				fcode = NOTTBF;
+				modul = DATEI;
+			}
+		}
+		else {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+	if (!modul)
+		fread(&ch, sizeof(ChunkHead), 1, handle);
+}
+
+uint16 datei::select_pool_item(void *h, uint16 nr) {
+	FILE *handle = (FILE *)h;
+	uint32 tmp1;
+	NewPhead *ph;
+	ph = (NewPhead *)tmp;
+	if (handle) {
+		fseek(handle, 0, SEEK_SET);
+		if (!(fread(ph, sizeof(NewPhead), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+			fseek(handle, 0, SEEK_SET);
+		} else {
+			if (!strncmp(ph->id, "NGS", 3)) {
+				if (nr >= ph->PoolAnz)
+					nr = ph->PoolAnz - 1;
+				fseek(handle, -((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+				if (!(fread(&tmp1, sizeof(uint32), 1, handle))) {
+					modul = DATEI;
+					fcode = READFEHLER;
+					fseek(handle, 0, SEEK_SET);
+				} else
+					fseek(handle, tmp1, SEEK_SET);
+			}
+		}
+	}
+	return (nr);
+}
+
+void datei::load_tafmcga(const char *fname, char *sp, int16 nr) {
+	FILE *handle;
+	taf_dateiheader *header;
+	taf_imageheader iheader;
+	int16 *abmess, komp;
+	int16 id, i;
+	uint16 sprcount = 0;
+	uint32 size = 0, next = 0, image = 0;
+	char *speicher;
+	speicher = sp;
+	header = (taf_dateiheader *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	correct_fname(filename);
+	abmess = (int16 *) speicher;
+	speicher += 4;
+	if (abmess) {
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+				id = get_id(header->id);
+				if (id == TAFDATEI) {
+					if (header->korrekt == 1) {
+						next = header->next;
+						while ((sprcount <= nr) && (nr <= header->count)) {
+							fseek(handle, next, SEEK_SET);
+							if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+								next = iheader.next;
+								image = iheader.image;
+							} else {
+								fcode = READFEHLER;
+								modul = DATEI;
+							}
+							++sprcount;
+						}
+					}
+					else {
+						fseek(handle, (-((header->count - nr)*sizeof(uint32))), SEEK_END);
+						if (!fread(&next, sizeof(uint32), 1, handle)) {
+							fcode = READFEHLER;
+							modul = DATEI;
+						} else {
+							fseek(handle, next, SEEK_SET);
+							if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+								next = iheader.next;
+								image = iheader.image;
+							} else {
+								fcode = READFEHLER;
+								modul = DATEI;
+							}
+						}
+					}
+					abmess[0] = iheader.width;
+					abmess[1] = iheader.height;
+					size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
+					komp = iheader.komp;
+					fseek(handle, image, SEEK_SET);
+					read_tbf_image((void *)handle, komp, size, speicher);
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::load_tafmcga(void *h, int16 komp, uint32 size, char *speicher) {
+	read_tbf_image(h, komp, size, speicher);
+}
+
+void datei::load_full_taf(const char *fname, char *hi_sp, taf_info *tinfo) {
+	FILE *handle;
+	taf_dateiheader *header;
+	taf_imageheader iheader;
+	int16 komp, id, i;
+	uint16 sprcount, anzahl, *abmess;
+	uint32 size = 0, next = 0, image = 0;
+	char *speicher;
+	header = (taf_dateiheader *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	i = 0;
+	if ((filename[0]) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	correct_fname(filename);
+	speicher = hi_sp;
+	if (speicher) {
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+				id = get_id(header->id);
+				if ((id == TAFDATEI) && (header->mode == 19)) {
+					next = header->next;
+					anzahl = header->count;
+					for (sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
+						tinfo->image[sprcount] = speicher;
+						fseek(handle, next, SEEK_SET);
+						if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+							next = iheader.next;
+							image = iheader.image;
+						} else {
+							fcode = READFEHLER;
+							modul = DATEI;
+						}
+						abmess = (uint16 *)speicher;
+						abmess[0] = iheader.width;
+						abmess[1] = iheader.height;
+						speicher += 4;
+						size = (uint32)((uint32)iheader.height) *
+						       ((uint32)iheader.width);
+						komp = iheader.komp;
+						fseek(handle, image, SEEK_SET);
+						read_tbf_image((void *)handle, komp, size, speicher);
+						speicher += size;
+					}
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::load_korrektur(const char *fname, char *sp) {
+	FILE *handle;
+	taf_dateiheader *header;
+	int16 id, i;
+	char *speicher;
+	header = (taf_dateiheader *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	i = 0;
+	if ((filename[0]) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	correct_fname(filename);
+	speicher = sp;
+	if (speicher) {
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+				id = get_id(header->id);
+				if ((id == TAFDATEI) && (header->korrekt > 0)) {
+					fseek(handle, -((header->count * sizeof(uint32))*header->korrekt), SEEK_END);
+					if (!fread(speicher, header->count * sizeof(uint32), 1, handle)) {
+						fcode = READFEHLER;
+						modul = DATEI;
+					}
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::load_tff(const char *fname, char *speicher) {
+	FILE *handle;
+	tff_header *tff;
+	uint32 size;
+	int16 i;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if (speicher) {
+		tff = (tff_header *)speicher;
+		if ((*filename) == 0)
+			get_filename(filename, MAXPATH);
+		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
+		correct_fname(filename);
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (fread(speicher, sizeof(tff_header), 1, handle)) {
+				size = tff->size;
+				if (!(fread((speicher + sizeof(tff_header)),
+				            (uint16)size, 1, handle))) {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::read_tbf_image(void *h, int16 komp, uint32 size, char *sp) {
+	FILE *handle = (FILE *)h;
+	uint32 pos;
+	char zeichen;
+	uint8 count, i;
+	char *speicher;
+	speicher = sp;
+	pos = 0;
+	if (komp == 1) {
+		for (pos = 0; pos < size;) {
+			count = fgetc(handle);
+			zeichen = fgetc(handle);
+			for (i = 0; (i < count) && (pos < size); i++) {
+				speicher[pos] = zeichen;
+				++pos;
+			}
+		}
+	}
+	else {
+		for (pos = 0; pos < size; pos++)
+			*speicher++ = (uint8)fgetc(handle);
+	}
+}
+
+void datei::read_tpf_image(void *h, int16 komp, uint32 size,
+                           char *speicher) {
+	FILE *handle = (FILE *)h;
+	uint32 pos = 0;
+	char zeichen;
+	uint8 count, i = 0;
+	int16 plane;
+	if (komp == 1) {
+		for (plane = 0; plane < 4; plane++) {
+			for (pos = (uint32)plane; pos < (size + plane);) {
+				count = fgetc(handle);
+				zeichen = fgetc(handle);
+				for (i = 0; i < count && pos < (size + plane); i++) {
+					speicher[pos] = zeichen;
+					pos += 4;
+				}
+			}
+		}
+	}
+	else {
+		for (plane = 0; plane < 4; plane++) {
+			for (pos = (uint32) plane; pos < size + plane;) {
+				zeichen = fgetc(handle);
+				speicher[pos] = zeichen;
+				pos += 4;
+			}
+		}
+	}
+}
+
+void datei::load_dialog(char *fname, dialogue *dial, menue *men,
+                        knopf *knpf) {
+	FILE *handle;
+	int16 i = 0, j = 0;
+	knopf *lknpf;
+	menue *lmen;
+	lknpf = knpf;
+	lmen = men;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'D';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (!(fread(dial, sizeof(dialogue), 1, handle))) {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+		else {
+			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
+				if (!(fread(lmen, sizeof(menue), 1, handle))) {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+				else {
+					dial->menueliste[i] = lmen;
+					for (j = 0; (j < lmen->anzknoepfe) && (!modul); j++) {
+						if (!(fread(lknpf, sizeof(knopf), 1, handle))) {
+							fcode = READFEHLER;
+							modul = DATEI;
+						}
+						else {
+							lmen->knopfliste[j] = lknpf;
+							lknpf++;
+						}
+					}
+					++lmen;
+				}
+			}
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::load_sbi(char *fname, sbi_inst *speicher) {
+	FILE *handle;
+	int16 i = 0;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'S';
+	filename[i + 2] = 'B';
+	filename[i + 3] = 'I';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (!(fread(speicher, sizeof(sbi_inst), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+	if (strncmp((char *)speicher->id, "SBI", 3)) {
+		modul = DATEI;
+		fcode = NOTSBI;
+	}
+}
+
+uint32 datei::load_voc(char *fname, char *speicher) {
+	FILE *handle;
+	int16 i = 0;
+	voc_header *header;
+	uint32 s;
+	char *sp = 0;
+	header = (voc_header *)tmp;
+	sp = speicher;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'V';
+	filename[i + 2] = 'O';
+	filename[i + 3] = 'C';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	s = size(filename, VOCDATEI);
+
+	if (!modul) {
+		handle = fopen(filename, "rb");
+		if (handle) {
+			if (!(fread(header, sizeof(voc_header), 1, handle))) {
+				modul = DATEI;
+				fcode = READFEHLER;
+			} else {
+				if (strncmp(header->id, "Creative Voice File", 19)) {
+					modul = DATEI;
+					fcode = NOTVOC;
+				}
+				else {
+					fseek(handle, header->offset, SEEK_SET);
+					if (!(fread(sp, s, 1, handle))) {
+						modul = DATEI;
+						fcode = READFEHLER;
+					}
+				}
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	return (s);
+}
+
+uint32 datei::load_voc(void *h, char *speicher) {
+	FILE *handle = (FILE *)h;
+	ChunkHead *ch;
+	ch = (ChunkHead *) tmp;
+	if (handle) {
+		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		} else {
+			if (ch->type == VOCDATEI) {
+				if (!(fread(speicher, ch->size, 1, handle))) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				}
+			}
+			else {
+				modul = DATEI;
+				fcode = NOTVOC;
+			}
+		}
+	}
+	return (ch->size);
+}
+
+void datei::load_vocinfo(char *fname, voc_header *speicher) {
+	FILE *handle;
+	int16 i = 0;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'V';
+	filename[i + 2] = 'O';
+	filename[i + 3] = 'C';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (!(fread(speicher, sizeof(voc_header), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+	if (strncmp(speicher->id, "CREATIVE VOICE FILE", 0x14)) {
+		modul = DATEI;
+		fcode = NOTVOC;
+	}
+}
+
+void datei::void_load(const char *fname, char *speicher, uint32 size) {
+	FILE *handle;
+	int16 i;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (!(fread(speicher, (uint16)size, 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+uint32 datei::load_file(char *fname, char *speicher) {
+	FILE *handle;
+	uint32 size = 0;
+	int16 i = 0;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		fseek(handle, 0l, SEEK_END);
+		size = ftell(handle);
+		fseek(handle, 0l, SEEK_SET);
+		if (!(fread(speicher, (size_t)size, 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+	return (size);
+}
+
+uint32 datei::load_item(void *h, char *speicher) {
+	FILE *handle = (FILE *)h;
+	ChunkHead *ch;
+	ch = (ChunkHead *) tmp;
+	if (handle) {
+		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		else {
+			if (!(fread(speicher, ch->size, 1, handle))) {
+				modul = DATEI;
+				fcode = READFEHLER;
+			}
+		}
+	}
+	return (ch->size);
+}
+
+uint32 datei::load_tmf(char *fname, tmf_header *th) {
+	FILE *handle;
+	uint32 size;
+	char *speicher;
+	int16 ok, i;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'M';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	speicher = (char *)th;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		fseek(handle, 0l, SEEK_END);
+		size = ftell(handle);
+		fseek(handle, 0l, SEEK_SET);
+		if (!(fread(th, sizeof(tmf_header), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		} else {
+			size -= sizeof(tmf_header);
+			speicher += sizeof(tmf_header);
+			ok = 0;
+			if (!strncmp(th->id, "TMF", 3))
+				ok = 1;
+			if (!ok) {
+				modul = DATEI;
+				fcode = NOTTBF;
+			}
+		}
+		if (!modul) {
+			if (!(fread(speicher, size, 1, handle))) {
+				modul = DATEI;
+				fcode = READFEHLER;
+			}
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+	if (!modul) {
+		speicher = (char *)th;
+		speicher += sizeof(tmf_header);
+		speicher += ((uint32)th->pattern_anz) * 1024l;
+		for (i = 0; i < 31; i++) {
+			if (th->instrument[i].laenge) {
+				th->ipos[i] = speicher;
+				speicher += th->instrument[i].laenge;
+			}
+		}
+	}
+	return (size + sizeof(tmf_header));
+}
+
+uint32 datei::load_tmf(void *h, tmf_header *song) {
+	FILE *handle = (FILE *)h;
+	ChunkHead *ch;
+	char *speicher;
+	int16 i;
+	ch = (ChunkHead *) tmp;
+	speicher = (char *)song;
+	if (handle) {
+		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		else {
+			if (ch->type == TMFDATEI) {
+				if (!(fread(speicher, ch->size, 1, handle))) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				}
+				else {
+					speicher = (char *)song;
+					speicher += sizeof(tmf_header);
+					speicher += ((uint32)song->pattern_anz) * 1024l;
+					for (i = 0; i < 31; i++) {
+						if (song->instrument[i].laenge) {
+							song->ipos[i] = speicher;
+							speicher += song->instrument[i].laenge;
+						}
+					}
+				}
+			}
+			else {
+				modul = DATEI;
+				fcode = NOTTBF;
+			}
+		}
+	}
+	return (ch->size);
+}
+
+void datei::save_pcx(char *fname, char *speicher, char *palette) {
+	FILE *handle;
+	pcx_header *header;
+
+	char *line_ptr, *sptr;
+	uint16 i;
+	int16 curr_data;
+	int16 prev_data;
+	int16 data_count;
+	int16 line_count;
+	int16 hoehe;
+	int16 breite;
+	int16 *abmess;
+	header = (pcx_header *)tmp;
+	abmess = (int16 *)speicher;
+	sptr = speicher + 4;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	for (i = 0; (filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)); i++);
+	filename[i] = '.';
+	filename[i + 1] = 'P';
+	filename[i + 2] = 'C';
+	filename[i + 3] = 'X';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+
+	breite = abmess[0];
+	hoehe = abmess[1];
+
+	header->id = 10;
+	header->version = 5;
+	header->bpp = 8;
+	header->bpz = breite;
+	header->planes = 1;
+	header->screenx = breite;
+	header->screeny = hoehe;
+	header->hodpi = breite;
+	header->verdpi = hoehe;
+	header->xmax = breite - 1;
+	header->xmin = 0;
+	header->ymax = hoehe - 1;
+	header->ymin = 0;
+	header->komp = 1;
+	header->reserviert = 0;
+	header->palinfo = 1;
+	handle = fopen(filename, "wb");
+	if (handle) {
+		if (fwrite(header, sizeof(pcx_header), 1, handle)) {
+			fseek(handle, 128L, SEEK_SET);
+			line_ptr = sptr;
+			for (i = 0; i < hoehe; i++) {
+				prev_data = *line_ptr++;
+				data_count = 1;
+				line_count = 1;
+
+				while (line_count < breite) {
+					curr_data = *line_ptr++;
+					line_count++;
+					if (curr_data == prev_data) {
+						data_count++;
+						if (data_count == 0x3f) {
+							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
+								fputc(0xc0 | data_count, handle);
+							fputc(prev_data, handle);
+							data_count = 0;
+						}
+					}
+					else {
+						if (data_count > 0) {
+							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
+								fputc(0xc0 | data_count, handle);
+							fputc(prev_data, handle);
+						}
+						prev_data = curr_data;
+						data_count = 1;
+					}
+				}
+				if (data_count > 0) {
+					if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
+						fputc(0xc0 | data_count, handle);
+					fputc(prev_data, handle);
+				}
+			}
+			fputc(12, handle);
+			for (i = 0; i < 768; i++)
+				fputc(palette[i] << 2, handle);
+		}
+		else {
+			fcode = WRITEFEHLER;
+			modul = DATEI;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::save_tafmcga(char *fname, char **spvekt, char *palette,
+                         int16 komp, int16 *korrektur) {
+	FILE *handle;
+	taf_dateiheader *header;
+	taf_imageheader iheader;
+	uint16 i = 0;
+	uint16 sprcount = 0;
+	int16 *abmess;
+	char *speicher;
+	uint32 size = 0, allsize = 0, next = 0;
+	header = (taf_dateiheader *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'A';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "wb");
+	if (handle) {
+		strncpy(header->id, "TAF\0", 4);
+		header->mode = 19;
+		for (i = 0; i < 768; i++)
+			header->palette[i] = palette[i];
+		fseek(handle, sizeof(taf_dateiheader) + 1, SEEK_SET);
+		header->next = ftell(handle);
+		abmess = (int16 *) spvekt[sprcount];
+		speicher = spvekt[sprcount];
+		speicher += 4;
+		next = ftell(handle);
+		while ((abmess != 0) && (sprcount < MAXSPRITE)) {
+			fseek(handle, next + (sizeof(taf_imageheader) + 1), SEEK_SET);
+			iheader.image = ftell(handle);
+			iheader.komp = komp;
+			iheader.width = abmess[0];
+			iheader.height = abmess[1];
+			size = (uint32)((long)iheader.height) * ((long)iheader.width);
+			allsize += size;
+			write_tbf_image(handle, komp, size, speicher);
+			if (!modul) {
+				iheader.next = ftell(handle);
+				fseek(handle, next, SEEK_SET);
+				if (!fwrite(&iheader, sizeof(taf_imageheader), 1, handle)) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+				}
+				next = iheader.next;
+			}
+			++sprcount;
+			abmess = (int16 *) spvekt[sprcount];
+			speicher = spvekt[sprcount];
+			speicher += 4;
+		}
+		header->allsize = allsize;
+		header->count = sprcount;
+		if (!korrektur)
+			header->korrekt = 0;
+		else {
+			header->korrekt = 1;
+			fseek(handle, 0l, SEEK_END);
+			if (!fwrite(korrektur, 4 * sprcount, 1, handle)) {
+				fcode = WRITEFEHLER;
+				modul = DATEI;
+			}
+		}
+		fseek(handle, 0L, SEEK_SET);
+		if (!fwrite(header, sizeof(taf_dateiheader), 1, handle)) {
+			fcode = WRITEFEHLER;
+			modul = DATEI;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::save_tff(char *fname, char *speicher) {
+	FILE *handle;
+	uint32 size;
+	uint16 i = 0;
+	tff_header *tff;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if (speicher) {
+		tff = (tff_header *) speicher;
+		if ((*filename) == 0)
+			get_filename(filename, MAXPATH);
+		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
+		i = 0;
+		while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+			i++;
+		filename[i] = '.';
+		filename[i + 1] = 'T';
+		filename[i + 2] = 'F';
+		filename[i + 3] = 'F';
+		filename[i + 4] = 0;
+		correct_fname(filename);
+		handle = fopen(filename, "wb");
+		if (handle) {
+			tff->size = (uint32)tff->count * ((uint32)(tff->width / 8) *
+			                                       (uint32)tff->height);
+			size = tff->size + sizeof(tff_header);
+			if (!(fwrite(speicher, (size_t)size, 1, handle))) {
+				fcode = WRITEFEHLER;
+				modul = DATEI;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+	else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::write_tbf_image(void *h, int16 komp, uint32 size, char *speicher) {
+	FILE *handle = (FILE *)h;
+	uint32 pos = 0;
+	int16 fehler;
+	uint8 zeichen;
+	uint8 count;
+	if (komp == 1) {
+		for (pos = 0; pos < size;) {
+			count = 0;
+			zeichen = speicher[pos];
+			while (speicher[pos] == zeichen && count < 254 && pos < size) {
+				++pos;
+				++count;
+			}
+			fehler = fputc((int16)count, handle);
+			fehler = fputc((int16)zeichen, handle);
+			if (fehler == EOF) {
+				fcode = WRITEFEHLER;
+				modul = DATEI;
+				break;
+			}
+		}
+	} else {
+		if (!fwrite(speicher, size, 1, handle)) {
+			fcode = WRITEFEHLER;
+			modul = DATEI;
+		}
+	}
+}
+
+void datei::save_dialog(char *fname, dialogue *dial) {
+	FILE *handle;
+	menue *men;
+	knopf *knpf;
+	int16 i = 0, j = 0;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'D';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "wb");
+	if (handle) {
+		strncpy(dial->id, "TDF\0", 4);
+		if (!(fwrite(dial, sizeof(dialogue), 1, handle))) {
+			fcode = WRITEFEHLER;
+			modul = DATEI;
+		}
+		else {
+			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
+				men = dial->menueliste[i];
+				if (!(fwrite(men, sizeof(menue), 1, handle))) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+				}
+				else {
+					for (j = 0; (j < men->anzknoepfe) && (!modul); j++) {
+						knpf = men->knopfliste[j];
+						if (knpf != 0) {
+							if (!(fwrite(knpf, sizeof(knopf), 1, handle))) {
+								fcode = WRITEFEHLER;
+								modul = DATEI;
+							}
+						}
+					}
+				}
+			}
+		}
+		fclose(handle);
+	} else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::save_tmf(char *fname, tmf_header *thead) {
+	uint16 i = 0;
+	char *sp;
+	sp = (char *)thead;
+	sp += sizeof(tmf_header);
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'M';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	FILE *handle = fopen(filename, "wb");
+	if (handle) {
+		if ((fwrite(thead, sizeof(tmf_header), 1, handle))) {
+			for (i = 0; (i < thead->pattern_anz) && (!modul); i++) {
+				if (!(fwrite(sp, 1024, 1, handle))) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+				}
+				sp += 1024;
+			}
+			for (i = 0; (i < 31) && (!modul); i++) {
+				if (thead->instrument[i].laenge) {
+					if (!(fwrite(thead->ipos[i], (size_t)thead->instrument[i].laenge, 1,
+					             handle))) {
+						fcode = WRITEFEHLER;
+						modul = DATEI;
+					}
+				}
+			}
+		} else {
+			fcode = WRITEFEHLER;
+			modul = DATEI;
+		}
+		fclose(handle);
+	} else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::get_tdfanz(char *fname, int16 *menueanz, int16 *knopfanz) {
+	FILE *handle;
+	menue men;
+	int16 i = 0;
+	dialogue dial;
+	*menueanz = 0;
+	*knopfanz = 0;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	i = 0;
+	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
+		i++;
+	filename[i] = '.';
+	filename[i + 1] = 'T';
+	filename[i + 2] = 'D';
+	filename[i + 3] = 'F';
+	filename[i + 4] = 0;
+	correct_fname(filename);
+	handle = fopen(filename, "rb");
+	if (handle) {
+		if (!(fread(&dial, sizeof(dialogue), 1, handle))) {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+		else {
+			if ((!(strncmp(dial.id, "TDF", 3)))) {
+				*menueanz = dial.anzmenue;
+				for (i = 0; (i < dial.anzmenue) && (!modul); i++) {
+					if (!(fread(&men, sizeof(menue), 1, handle))) {
+						fcode = READFEHLER;
+						modul = DATEI;
+					}
+					else {
+						*knopfanz += men.anzknoepfe;
+						fseek(handle, (long)(men.anzknoepfe * sizeof(knopf)), SEEK_CUR);
+					}
+				}
+			}
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+uint32 datei::size(const char *fname, int16 typ) {
+	FILE *handle;
+	tbf_dateiheader *tbfheader;
+	tff_header tff;
+	pcx_header *pcxheader;
+	mod_header *mh;
+	uint16 hoehe, breite;
+	uint32 size = 0;
+	int16 id = 0, i;
+	tbfheader = (tbf_dateiheader *)tmp;
+	pcxheader = (pcx_header *) tmp;
+	mh = (mod_header *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	i = 0;
+	correct_fname(filename);
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.')) {
+		switch (typ) {
+		case TBFDATEI:
+		case TPFDATEI:
+			strcat(filename, ".TBF\0");
+			break;
+		case PCXDATEI:
+			strcat(filename, ".PCX\0");
+			break;
+		case TFFDATEI:
+			strcat(filename, ".TFF\0");
+			break;
+		case VOCDATEI:
+			strcat(filename, ".VOC\0");
+			break;
+		case MODDATEI:
+			strcat(filename, ".MOD\0");
+			break;
+		case TMFDATEI:
+			strcat(filename, ".TMF\0");
+			typ = 300;
+			break;
+		}
+	}
+	handle = fopen(filename, "rb");
+	if (handle) {
+		switch (typ) {
+		case TBFDATEI:
+		case TPFDATEI:
+			if (fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+				id = get_id(tbfheader->id);
+				if ((id == TBFDATEI) || (id == TPFDATEI)) {
+					size = tbfheader->entpsize + 4;
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+					size = 0;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			break;
+
+		case PCXDATEI:
+			if (fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+				if ((pcxheader->id == 10) && (pcxheader->version == 5)
+				        && (pcxheader->bpp == 8)) {
+					hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
+					breite = pcxheader->bpz * pcxheader->planes;
+					size = (uint32)((long)hoehe) * ((long)breite) + 4;
+				}
+				else {
+					fcode = NOTTBF;
+					modul = DATEI;
+					size = 0;
+				}
+			}
+			else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+			break;
+
+		case TFFDATEI:
+			if (fread(&tff, sizeof(tff_header), 1, handle)) {
+				id = get_id(tff.id);
+				if (id == TFFDATEI)
+					size = tff.size + sizeof(tff_header);
+				else {
+					modul = DATEI;
+					fcode = NOTTBF;
+				}
+			}
+			else {
+				modul = DATEI;
+				fcode = READFEHLER;
+			}
+			break;
+
+		case VOCDATEI:
+			fseek(handle, 0, SEEK_END);
+			size = (uint32)ftell(handle);
+			size -= sizeof(voc_header);
+			break;
+
+		case MODDATEI:
+			fseek(handle, 0, SEEK_END);
+			size = (uint32)ftell(handle);
+			id = 0;
+			if (fread(mh, sizeof(mod_header), 1, handle)) {
+				if (!strncmp(mh->id, "M.K.", 4))
+					id = 1;
+				if (!strncmp(mh->id, "M!K!", 4))
+					id = 2;
+				if (!strncmp(mh->id, "FLT4", 4))
+					id = 3;
+				if (!strncmp(mh->id, "FLT8", 4))
+					id = 4;
+			}
+			if (id)
+				size -= (uint32)sizeof(mod_header);
+			else
+				size -= (uint32)sizeof(mod15_header);
+			size += sizeof(tmf_header);
+			break;
+
+		default:
+			fseek(handle, 0, SEEK_END);
+			size = (uint32)ftell(handle);
+			break;
+		}
+		fclose(handle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+		size = 0;
+	}
+	return (size);
+}
+
+uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
+	FILE *handle;
+	NewPhead *Nph;
+	ChunkHead ch;
+	int16 i;
+	uint32 size;
+	Nph = (NewPhead *)tmp;
+	size = 0;
+	handle = fopen(fname, "rb");
+	if (handle) {
+		if (!(fread(Nph, sizeof(NewPhead), 1, handle))) {
+			modul = DATEI;
+			fcode = READFEHLER;
+		} else {
+			if (!strncmp(Nph->id, "NGS", 3)) {
+				select_pool_item(handle, chunk_start);
+				fseek(handle, -(sizeof(ChunkHead)), SEEK_CUR);
+				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
+				        && i < (chunk_start + chunk_anz); i++) {
+					if (!fread(&ch, sizeof(ChunkHead), 1, handle)) {
+						modul = DATEI;
+						fcode = READFEHLER;
+						size = 0;
+					} else {
+						if (ch.size > size)
+							size = ch.size;
+						fseek(handle, ch.size, SEEK_CUR);
+					}
+				}
+			}
+		}
+		fclose(handle);
+	} else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+	return (size);
+}
+
+uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
+	FILE *tafhandle;
+	uint32 size = 0;
+	int16 id, i;
+	taf_dateiheader *tdh;
+	tdh = (taf_dateiheader *)tmp;
+	*tafheader = tdh;
+	for (i = 0; (i < MAXPATH - 4) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	i = 0;
+	if ((filename[i]) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))
+		strcat(filename, ".TAF\0");
+	correct_fname(filename);
+	tafhandle = 0;
+	tafhandle = fopen(filename, "rb");
+	if (tafhandle) {
+		if (!(fread(tdh, sizeof(taf_dateiheader), 1, tafhandle))) {
+			fcode = READFEHLER;
+			modul = DATEI;
+		} else {
+			id = get_id(tdh->id);
+			if ((id == TAFDATEI) && (tdh->mode == 19)) {
+				size = tdh->allsize + (((uint32)tdh->count) * 8l);
+
+				size += ((uint32)sizeof(taf_info));
+			} else {
+				fcode = NOTTBF;
+				modul = DATEI;
+				size = 0;
+			}
+		}
+		fclose(tafhandle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+		size = 0;
+	}
+	return (size);
+}
+
+void datei::load_palette(const char *fname, char *palette, int16 typ) {
+	FILE *handle;
+	uint8 zeichen;
+	uint16 j = 0;
+	tbf_dateiheader *tbfheader;
+	taf_dateiheader *tafheader;
+	pcx_header *pcxheader;
+	uint i = 0;
+	int16 id;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	tbfheader = (tbf_dateiheader *)tmp;
+	pcxheader = (pcx_header *) tmp;
+	tafheader = (taf_dateiheader *)tmp;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.')) {
+		switch (typ) {
+		case TBFDATEI:
+		case TPFDATEI:
+			strcat(filename, ".TBF\0");
+			break;
+		case PCXDATEI:
+			strcat(filename, ".PCX\0");
+			break;
+		case TAFDATEI:
+			strcat(filename, ".TAF\0");
+			break;
+		default:
+			modul = DATEI;
+			fcode = NOTTBF;
+		}
+	}
+	if (!modul) {
+		correct_fname(filename);
+		handle = fopen(filename, "rb");
+		if (handle) {
+			switch (typ) {
+			case TBFDATEI:
+			case TPFDATEI:
+				if (fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+					id = get_id(tbfheader->id);
+					if (((id == TBFDATEI) || (id == TPFDATEI)) &&
+					        (tbfheader->mode == 19)) {
+						for (i = 0; i < 768; i++)
+							palette[i] = tbfheader->palette[i];
+					}
+					else {
+						fcode = NOTTBF;
+						modul = DATEI;
+					}
+				}
+				else {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+				break;
+
+			case PCXDATEI:
+				if (fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+					if ((pcxheader->id == 10) && (pcxheader->version == 5)
+					        && (pcxheader->bpp == 8)) {
+						if (!(fseek(handle, -769L, SEEK_END))) {
+							zeichen = fgetc(handle);
+							if (zeichen == 12) {
+								fseek(handle, -768L, SEEK_END);
+								if ((fread(palette, 768, 1, handle)) != 1) {
+									fcode = PALETTEFEHLER;
+									modul = DATEI;
+								} else {
+									j = 0;
+									for (i = 0; i < 255; i++) {
+										palette[j] >>= 2;
+										palette[j + 1] >>= 2;
+										palette[j + 2] >>= 2;
+										j += 3;
+									}
+								}
+							}
+							else {
+								fcode = PALETTEFEHLER;
+								modul = DATEI;
+							}
+						}
+					}
+					else {
+						fcode = NOTTBF;
+						modul = DATEI;
+					}
+				}
+				else {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+				break;
+
+			case TAFDATEI:
+				if (fread(tafheader, sizeof(taf_dateiheader), 1, handle)) {
+					id = get_id(tafheader->id);
+					if ((id == TAFDATEI) && (tafheader->mode == 19)) {
+						for (i = 0; i < 768; i++)
+							palette[i] = tafheader->palette[i];
+					}
+					else {
+						fcode = NOTTBF;
+						modul = DATEI;
+					}
+				}
+				else {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+				break;
+
+			default:
+				modul = DATEI;
+				fcode = NOTTBF;
+			}
+			fclose(handle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	}
+}
+
+void datei::load_palette(void *h, char *palette) {
+	FILE *handle = (FILE *)h;
+	tbf_dateiheader *header;
+	uint16 i = 0;
+	int format;
+	header = (tbf_dateiheader *)tmp;
+	if (palette) {
+		if (handle) {
+			if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+				format = get_id(header->id);
+				if (format != -1) {
+					for (i = 0; i < 768; i++)
+						palette[i] = header->palette[i];
+					fseek(handle, -sizeof(tbf_dateiheader), SEEK_CUR);
+				} else {
+					fcode = NOTTBF;
+					modul = DATEI;
+				}
+			} else {
+				fcode = READFEHLER;
+				modul = DATEI;
+			}
+		} else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+	} else {
+		fcode = ZEIGERFEHLER;
+		modul = GRAFIK;
+	}
+}
+
+void datei::imsize(const char *fname, uint32 *svekt) {
+	taf_dateiheader *header;
+	taf_imageheader iheader;
+	uint16 sprcount = 0;
+	uint32 next = 0;
+	int16 id, i;
+	header = (taf_dateiheader *)tmp;
+	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
+		filename[i] = fname[i];
+	filename[i] = 0;
+	if ((*filename) == 0)
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	correct_fname(filename);
+	FILE *handle = fopen(filename, "rb");
+	if (handle) {
+		if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+			id = get_id(header->id);
+			if ((id == TAFDATEI) && (header->mode == 19)) {
+				next = header->next;
+				while (sprcount < header->count) {
+					fseek(handle, next, SEEK_SET);
+					if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+						next = iheader.next;
+						svekt[sprcount] = ((uint32)iheader.width) * ((uint32)iheader.width);
+					}
+					else {
+						fcode = READFEHLER;
+						modul = DATEI;
+					}
+					++sprcount;
+				}
+			}
+		}
+		fclose(handle);
+	} else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
+
+void datei::correct_fname(char *fname) {
+	int16 i = 0;
+	while ((fname[i] != '.') && (fname[i] != 0)) {
+		if (fname[i] == '/')
+			fname[i] = '\\';
+		i++;
+	}
+}
+
+int16 datei::get_filename(char *fname, int16 maxlen) {
+	warning("STUB - get_filename");
+
+	int16 ret = 0;
+#if 0
+	char z = 0;
+	debugN("Dateiname: ");
+	while ((z != 27) && (z != 13) && (ret < maxlen)) {
+		z = getch();
+		if ((((z & 0xdf) >= 65) && ((z & 0xdf) <= 90))) {
+			z &= 0xdf;
+			debugN("%c", z);
+			fname[ret] = z;
+			ret += 1;
+		} else if ((z >= 0x30) && (z <= 0x39)) {
+			debugN("%c", z);
+			fname[ret] = z;
+			ret += 1;
+		} else if (z == 92) {
+			debugN("%c", z);
+			fname[ret] = '\\';
+			ret += 1;
+		} else if (z == 46) {
+			debugN("%c", z);
+			fname[ret] = z;
+			ret += 1;
+		} else if (z == 58) {
+			debugN("%c", z);
+			fname[ret] = z;
+			ret += 1;
+		} else if (z == 8) {
+			debugN("%c", z);
+			debugN("%c", 32);
+			debugN("%c", 8);
+			if (ret > 0)
+				ret -= 1;
+		} else if ((z != 13) && (z != 27))
+			debugN("%c", 7);
+	}
+	fname[ret] = 0;
+	debugN("\n");
+	if (z == 27)
+		ret = 0;
+#endif
+	return (ret);
+}
+
+void datei::respfad(char *respath, char *resdir) {
+	warning("STUB: respfad()");
+
+#if 0
+	getcwd(respath, MAXPATH);
+	strcat(respath, "/");
+	strcat(respath, resdir);
+	strcat(respath, "/");
+#endif
+}
+
+void datei::res2dname(char *respath, char *fnme, char *dtname) {
+	strcpy(fnme, respath);
+	strcat(fnme, dtname);
+}
+
+void datei::cwd(char *buf, int16 buflen) {
+	warning("STUB: cwd()");
+
+#if 0
+	getcwd(buf, buflen);
+#endif
+}
+
+void datei::cd(char *dir) {
+	warning("STUB: cd()");
+
+#if 0
+	char tmpname[16] = {0};
+	strncpy(tmpname, "cd ", 3);
+	strcat(tmpname, dir);
+	system(tmpname);
+#endif
+}
+
+void datei::write_tpf_image(void *h, int16 komp, uint32 size, char *speicher) {
+	FILE *handle = (FILE *)h;
+	uint32 pos = 0;
+	int16 fehler;
+	uint8 zeichen;
+	uint8 count;
+	int16 plane;
+	if (komp == 1) {
+		plane = 0;
+		while (plane <= 3) {
+			for (pos = plane; pos < (size);) {
+				count = 0;
+				zeichen = speicher[pos];
+				while ((speicher[pos] == zeichen) && (count < 255) && (pos < (size))) {
+					pos += 4;
+					++count;
+				}
+				fehler = fputc(count, handle);
+				fehler = fputc(zeichen, handle);
+				if (fehler == EOF) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+					break;
+				}
+			}
+			++plane;
+		}
+	} else {
+		plane = 0;
+		while (plane <= 3) {
+			for (pos = plane; pos < (size); pos += 4) {
+				zeichen = speicher[pos];
+				fehler = fputc(zeichen, handle);
+				if (fehler == EOF) {
+					fcode = WRITEFEHLER;
+					modul = DATEI;
+					break;
+				}
+			}
+			++plane;
+		}
+	}
+}
+
+int16 datei::get_id(char *id_code) {
+	int16 id;
+	id = -1;
+	if (!(scumm_strnicmp(id_code, "TBF", 3)))
+		id = TBFDATEI;
+	if (!(scumm_strnicmp(id_code, "TPF", 3)))
+		id = TPFDATEI;
+	if (!(scumm_strnicmp(id_code, "TAF", 3)))
+		id = TAFDATEI;
+	if (!(scumm_strnicmp(id_code, "TFF", 3)))
+		id = TFFDATEI;
+	return (id);
+}
+
+void datei::fcopy(const char *d_fname, const char *s_fname) {
+	FILE *shandle;
+	FILE *dhandle;
+	int16 ch;
+	shandle = fopen(s_fname, "rb");
+	if (shandle) {
+		dhandle = fopen(d_fname, "wb+");
+		if (shandle) {
+			while ((ch = fgetc(shandle)) != EOF)
+				fputc(ch, dhandle);
+			fclose(dhandle);
+		}
+		else {
+			fcode = OPENFEHLER;
+			modul = DATEI;
+		}
+		fclose(shandle);
+	}
+	else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+	}
+}
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
new file mode 100644
index 00000000000..9d5931c3c2a
--- /dev/null
+++ b/engines/chewy/datei.h
@@ -0,0 +1,82 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_DATEI_H
+#define CHEWY_DATEI_H
+
+#include "engines/chewy/chewy.h"
+#include "engines/chewy/ngstypes.h"
+
+class datei {
+public:
+	datei();
+	~datei();
+
+	void load_pcx(char *fname, char *speicher, char *palette);
+	void load_image(char *fname, char *sp, char *palette);
+	void load_tafmcga(const char *fname, char *sp, int16 nr);
+// FIXME: Were using FILE*
+	/**/
+	void load_image(void *handle, char *sp, char *palette);
+	uint16 select_pool_item(void *handle, uint16 nr);
+	void load_tafmcga(void *handle, int16 komp, uint32 size, char *speicher);
+	void read_tpf_image(void *handle, int16 komp, uint32 size, char *speicher);
+	uint32 load_voc(void *handle, char *speicher);
+	uint32 load_item(void *handle, char *speicher);
+	uint32 load_tmf(void *handle, tmf_header *song);
+	void write_tbf_image(void *handle, int16 komp, uint32 size, char *speicher);
+	void write_tpf_image(void *handle, int16 komp, uint32 size, char *speicher);
+	void load_palette(void *handle, char *palette);
+	/**/
+	void load_full_taf(const char *fname, char *hi_sp, taf_info *tinfo);
+	void load_korrektur(const char *fname, char *sp);
+	void load_tff(const char *fname, char *speicher);
+	void load_dialog(char *fname, dialogue *dial, menue *men, knopf *knpf);
+	void load_sbi(char *fname, sbi_inst *speicher);
+	uint32 load_voc(char *fname, char *speicher);
+	void load_vocinfo(char *fname, voc_header *speicher);
+	void void_load(const char *fname, char *speicher, uint32 size);
+	uint32 load_file(char *fname, char *speicher);
+	uint32 load_tmf(char *fname, tmf_header *th);
+	void save_pcx(char *fname, char *speicher, char *palette);
+	void save_tafmcga(char *fname, char **spvekt, char *palette, int16 komp, int16 *korrektur);
+	void save_tff(char *fname, char *speicher);
+	void save_dialog(char *fname, dialogue *dial);
+	void save_tmf(char *fname, tmf_header *thead);
+	void get_tdfanz(char *fname, int16 *menueanz, int16 *knopfanz);
+	uint32 size(const char *fname, int16 typ);
+	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
+	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
+	void load_palette(const char *fname, char *palette, int16 typ);
+	void imsize(const char *fname, uint32 *svekt);
+	void correct_fname(char *fname);
+	short get_filename(char *fname, int16 maxlen);
+	void respfad(char *respath, char *resdir);
+	void res2dname(char *respath, char *fnme, char *dtname);
+	void cwd(char *buf, int16 buflen);
+	void cd(char *dir);
+	short get_id(char *id_code);
+	void fcopy(const char *d_fname, const char *s_fname);
+	void read_tbf_image(void *h, int16 komp, uint32 size, char *sp);
+
+};
+#endif
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
new file mode 100644
index 00000000000..e4c96353698
--- /dev/null
+++ b/engines/chewy/debug.cpp
@@ -0,0 +1,211 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+#include "engines/chewy/debug.h"
+
+void look_debug_action(int16 key_nr) {
+	int16 ende;
+#define TXT_MARK_NAME 0
+#define TXT_MARK_LOOK 1
+#define TXT_MARK_USE 2
+#define TXT_MARK_WALK 3
+#define TXT_MARK_TALK 4
+	switch (key_nr) {
+	case I_KEY:
+	case I_KEY + ALT:
+		ende = 0;
+		while (!ende) {
+			switch (in->get_switch_code()) {
+			case ENTER:
+			case ESC:
+				ende = 1;
+				break;
+
+			case ALT + ENTER:
+//				look_icm_action();
+				break;
+
+			}
+		}
+		break;
+
+	case F1_KEY + ALT:
+		warning("Removed : get memory");
+		break;
+
+	case F2_KEY +ALT:
+//		get_maus_speed();
+		break;
+
+	case F3_KEY +ALT:
+//		room->cache_test(&room_blk);
+		break;
+
+	case F4_KEY +ALT:
+//		taf_sequence_test();
+		break;
+
+	case T_KEY + ALT:
+//		timer_test();
+		break;
+
+	case H_KEY + ALT:
+//		draw_help_win(1);
+		break;
+
+	case H_KEY:
+//		draw_help_win(2);
+		break;
+
+	case F_KEY + ALT:
+		show_frame ^= 1;
+		cur->wait_taste_los(0);
+		break;
+
+	}
+}
+
+void test_load(void *handle, taf_info *Tt, int16 anz) {
+	warning("STUB - test_load");
+#if 0
+	int16 ende;
+	int16 ende1;
+	int16 i;
+	int16 tmp1, tmp2;
+	int16 str_anz;
+	int16 x, y;
+	int16 abfrage;
+	int16 spr;
+	int16 action;
+	int16 *Cxy;
+	char c[] = {
+		"Erstes Sprite : \0"
+		"Anzahl Sprites : \0"
+	};
+	str_anz = 2;
+	ende = 0;
+	out->setze_zeiger(0);
+	while (!ende) {
+		out->printxy(0, 0, 255, 0, 0, "F1 Bereich laden\0");
+		out->printxy(0, 10, 255, 0, 0, "F2 Sprites anzeigen\0");
+		out->printxy(0, 20, 255, 0, 0, "F3 Bereich löschen\0");
+		switch (in->get_switch_code()) {
+		case ESC :
+			ende = 1;
+			break;
+
+		case F1_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			in ->alter_kb_handler();
+			tmp1 = 0;
+			tmp2 = 0;
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp1);
+			abfrage = out->scanxy(x + 96, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp2);
+			if (abfrage != 27) {
+				det->load_taf_seq(handle, tmp1, tmp2, Tt);
+				ERROR
+			}
+			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			in ->neuer_kb_handler(&kbinfo);
+			break;
+
+		case F2_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, 1, 10, c, 0);
+			in ->alter_kb_handler();
+			spr = 0;
+			for (i = 0; i < 1; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &spr);
+			in ->neuer_kb_handler(&kbinfo);
+			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			if (abfrage != 27) {
+				ende1 = 0;
+				action = 1;
+				while (!ende1) {
+					switch (kbinfo.scan_code) {
+					case ESC:
+						ende1 = 1;
+						break;
+
+					case PLUS:
+						if (spr >= anz - 1)
+							spr = 0;
+						else
+							++spr;
+						action = 1;
+						break;
+
+					case MINUS:
+						if (spr > 0)
+							--spr;
+						else
+							spr = anz - 1;
+						action = 1;
+						break;
+
+					}
+					if (action) {
+						kbinfo.scan_code = 0;
+						action = 0;
+						out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+						if (Tt->image[spr] != 0) {
+							Cxy = Tt->korrektur + (spr << 1);
+							out->sprite_set(Tt->image[spr], 100 + Cxy[0], 60 + Cxy[1], 0);
+						}
+						out->printxy(0, 0, 255, 0, 0, "Sprite Nr:%d\0", spr);
+					}
+				}
+			}
+			in ->neuer_kb_handler(&kbinfo);
+			break;
+
+		case F3_KEY:
+			x = 160;
+			y = 100;
+			auto_menu(&x, &y, str_anz, 10, c, 0);
+			in ->alter_kb_handler();
+			tmp1 = 0;
+			tmp2 = 0;
+			for (i = 0; i < str_anz; i++)
+				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
+			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp1);
+			abfrage = out->scanxy(x + 96, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp2);
+			if (abfrage != 27) {
+				det->del_taf_tbl(tmp1, tmp2, Tt);
+				ERROR
+			}
+			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			in ->neuer_kb_handler(&kbinfo);
+			break;
+
+		}
+	}
+#endif
+}
diff --git a/engines/chewy/debug.h b/engines/chewy/debug.h
new file mode 100644
index 00000000000..cc613f193d2
--- /dev/null
+++ b/engines/chewy/debug.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_DEBUG_H
+#define CHEWY_DEBUG_H
+
+void get_room_nr();
+
+void room_info();
+
+void plot_auto_mov(int16 mode);
+
+void go_auto_mov();
+
+void plot_maus();
+void plot_rect();
+void get_auto_mov();
+void start_detail();
+void play_last_ani(int16 nr);
+
+void set_z_ebene();
+void get_phase(ObjMov *om);
+//FIXME: was using FILE *
+void test_load(void *handle, taf_info *Tt, int16 anz);
+
+#endif
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
new file mode 100644
index 00000000000..065ae15b953
--- /dev/null
+++ b/engines/chewy/defines.h
@@ -0,0 +1,490 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_DEFINES_H
+#define CHEWY_DEFINES_H
+
+#define VERSION1 0
+#define VERSION2 2
+
+#define ADS_TAP_MAX 500
+#define ATS_TAP_MAX 100
+#define AAD_TAP_MAX 100
+#define INV_TAP_MAX 100
+#define USE_TAP_MAX 100
+
+#define ADS_TAP_OFF 0
+#define ATS_TAP_OFF ADS_TAP_MAX
+#define AAD_TAP_OFF ATS_TAP_OFF+ATS_TAP_MAX
+#define INV_TAP_OFF AAD_TAP_OFF+AAD_TAP_MAX
+#define USE_TAP_OFF INV_TAP_OFF+INV_TAP_MAX
+
+#define SCREEN_WIDTH 320
+#define SCREEN_HEIGHT 200
+
+#define NO_SETUP 0
+
+#define DO_SETUP 1
+
+#define MIN_FAR_MEM 3000000
+#define MIN_LOW_MEM 100000
+#define MUSIC_SLOT_SIZE 500000
+#define SOUND_SLOT_SIZE 500000
+#define SPEECH_HALF_BUF 25000
+
+#define ERROR if(modul) {error();}
+
+#define JXDIFF 180
+#define JYDIFF 150
+
+#define SAVEIO 1
+#define LOADIO 2
+#define ALLIO 3
+#define PAL1 1
+
+#define CUR_WALK 0
+#define CUR_USE 1
+#define CUR_LOOK 2
+#define CUR_TALK 3
+#define CUR_INVENT 4
+#define CUR_SAVE 5
+#define CUR_NO_WALK 6
+#define CUR_NOPE 7
+#define CUR_AK_INVENT 8
+#define CUR_NO_USE 10
+#define CUR_NO_LOOK 11
+#define CUR_NO_TALK 12
+#define CUR_AUSGANG_LINKS 13
+#define CUR_AUSGANG_RECHTS 14
+#define CUR_AUSGANG_OBEN 15
+#define CUR_AUSGANG_UNTEN 16
+#define CUR_USER 17
+
+#define CUR_DISK 18
+#define CUR_HOWARD 19
+#define CUR_ZEIGE 20
+#define CUR_NICHELLE 21
+#define AUSGANG_LINKS_SPR 26
+#define AUSGANG_RECHTS_SPR 27
+#define AUSGANG_OBEN_SPR 28
+#define AUSGANG_UNTEN_SPR 29
+
+#define MENU_X 26
+#define MENU_Y 21
+#define MENU_CLIPX1 18
+#define MENU_CLIPY1 5
+#define MENU_CLIPX2 245
+#define MENU_CLIPY2 30
+#define MAX_MENU_SPRITE 13
+#define MENU_START_SPRITE 0
+#define WIN_INF_X 15
+#define WIN_INF_Y 15
+#define WIN_LOOK_X 30
+#define WIN_LOOK_Y 150
+#define PFEIL_UP 26
+#define HOT_INVENT_ANZ 8
+#define HOT_LOOK_ANZ 2
+#define MES_RAHMEN 1
+#define MES_NO_RAHMEN 2
+#define INV_ATS_MODE 0
+#define INV_USE_ATS_MODE 1
+
+#define WIN_INVENTAR WIN_INF_X,WIN_INF_Y,18,11,60,1
+#define WIN_TEST 24,36,2,8,60,0
+#define WIN_LOOK WIN_LOOK_X,WIN_LOOK_Y,10,6,60,1
+#define WIN_LOOK2 WIN_LOOK_X+4,WIN_LOOK_Y+4,3,3,60,0
+
+#define MAX_RAUM 70
+#define MAX_MOV_OBJ 100
+
+#define MAX_FEST_OBJ 100
+
+#define MAX_EXIT 150
+#define MAX_AUTO_MOV 20
+#define MAX_TIMER_OBJ 10
+#define MAX_ROOM_TIMER 10
+
+#define ANI_VOR 0
+#define ANI_RUECK 1
+#define ANI_WAIT 0
+#define ANI_GO 1
+#define MAX_PROG_ANI 10
+
+#define INVENTAR_NORMAL 0
+
+#define INVENTAR_STATIC 1
+#define STATIC_USE 2
+
+#define DETEDIT_REC 3
+#define AUTO_OBJ 4
+#define DETAIL_OBJ 5
+#define SPIELER_OBJ 6
+
+#define CURSOR "misc/cursor.taf"
+#define INVENTAR "misc/inventar.taf"
+#define INVENTAR_IIB "misc/inventar.iib"
+#define INVENTAR_SIB "misc/inventar.sib"
+#define EXIT_EIB "misc/exit.eib"
+#define CHEWY_TAF "misc/ch_walk.taf"
+#define CHEWY_BO_TAF "misc/ch_bork.taf"
+#define CHEWY_MI_TAF "misc/ch_mini.taf"
+#define CHEWY_PUMP_TAF "misc/ch_pump.taf"
+#define CHEWY_ROCK_TAF "misc/ch_rock.taf"
+#define CHEWY_JMAN_TAF "misc/ch_mans.taf"
+#define MENUTAF "misc/menu.taf"
+#define CH_SPZ_FILE "misc/ch_spez.taf"
+#define OPTION_TAF "MISC/OPTION.TAF"
+
+#define SAVEDIR "save/savegame.\0"
+
+#define DETAILTEST "room/test.rdi"
+
+#define EPISODE1_TGP 0
+#define GBOOK_TGP 1
+#define EPISODE1 "back/episode1.tgp\0"
+#define BUCH_START 2
+
+#define EPISODE1_GEP "back/episode1.gep\0"
+
+#define FONT6x8 "txt/6x8.tff\0"
+#define FONT8x8 "txt/8x8.tff\0"
+
+#define ATDS_TXT "txt/atds.tap"
+#define INV_ATS_STEUER "txt/inv_st.s"
+#define ROOM_ATS_STEUER "txt/room_st.s"
+#define ADS_TXT_STEUER "txt/diah.adh"
+#define INV_USE_IDX "txt/inv_use.idx"
+
+#define DETAIL_TVP "SOUND\\DETAILS.TAP\0"
+#define SPEECH_TVP "SOUND\\SPEECH.TVP\0"
+
+#define ADSH_TMP "adsh.tmp"
+
+#define MAX_PERSON 3
+
+#define P_CHEWY 0
+#define P_HOWARD 1
+#define P_NICHELLE 2
+
+#define CHEWY_NORMAL 1
+#define CHEWY_BORK 2
+#define CHEWY_MINI 3
+#define CHEWY_PUMPKIN 4
+#define CHEWY_ROCKER 5
+#define CHEWY_JMANS 6
+
+#define P_LEFT 0
+#define P_RIGHT 1
+#define LEFT 0
+#define RIGHT 1
+#define UP 2
+#define DOWN 3
+
+#define CH_UP 0
+#define CH_DOWN 1
+#define CH_LEFT_GE 2
+#define CH_LEFT_NO 3
+#define CH_LEFT_ZW 4
+#define CH_RIGHT_GE 5
+#define CH_RIGHT_NO 6
+#define CH_RIGHT_ZW 7
+#define CH_L_STEHEN 4
+
+#define CH_R_STEHEN 7
+#define CH_X_PIX 8
+#define CH_Y_PIX 8
+#define CH_HOT_MOV_X 8
+#define CH_HOT_MOV_Y 25
+#define CH_HOT_Y 34
+#define CH_HOT_X 25
+
+#define HO_HOT_MOV_X 8
+#define HO_HOT_MOV_Y 59
+#define HO_HOT_X 25
+#define HO_HOT_Y 68
+#define HO_X_PIX 8
+
+#define NI_HOT_MOV_X 8
+#define NI_HOT_MOV_Y 59
+#define NI_HOT_X 25
+#define NI_HOT_Y 68
+#define NI_X_PIX 8
+
+#define CH_SPZ_OFFSET 222
+#define MAX_SPZ_PHASEN 30
+
+#define CH_TALK1 0
+#define CH_TALK2 1
+#define CH_TALK3 2
+#define CH_TALK4 3
+#define CH_TALK5 4
+#define CH_TALK6 5
+#define CH_TALK7 6
+#define CH_TALK8 7
+#define CH_TALK9 8
+#define CH_TALK10 9
+#define CH_BAD1 10
+#define CH_WONDER1 11
+#define CH_EKEL 12
+#define CH_LGET_O 13
+#define CH_LGET_U 14
+#define CH_TALK11 15
+#define CH_TALK12 16
+#define CH_TRANS 17
+#define HO_WALK_L 18
+#define HO_STAND_L 19
+#define HO_TALK_L 20
+#define HO_FRONT 21
+#define HO_WALK_R 22
+#define HO_STAND_R 23
+#define HO_TALK_R 24
+#define HO_BACK 25
+#define CH_PUMP_TALK 26
+#define CH_PUMP_GET1 27
+#define CH_ROCK_GET1 28
+#define CH_ROCK_HAND 29
+#define CH_ROCK_TALK1 30
+#define CH_ROCK_GET2 31
+#define HO_BRILL_JMP 32
+#define CH_JM_TITS 33
+#define CH_JM_TALK 34
+#define NI_WALK_L 35
+#define NI_STAND_L 36
+#define NI_TALK_L 37
+#define NI_FRONT 38
+#define NI_WALK_R 39
+#define NI_STAND_R 40
+#define NI_TALK_R 41
+#define NI_BACK 42
+
+#define ROOM_0_3 3
+
+#define AUGE_TIMER 2
+#define FUETTER_POS 3
+#define KISSEN_POS 4
+#define BLITZ_POS 5
+#define VERSTECK_POS 6
+
+#define KISSEN_INV 0
+#define SCHLEIM_INV 1
+#define RED_CARD_INV 2
+#define KABEL_INV 3
+#define MONOKEL_INV 4
+#define GBUCH_INV 5
+#define GBUCH_OPEN_INV 6
+#define DEFEKT_INV 7
+#define STAHLSEIL_INV 8
+#define BECHER_LEER_INV 9
+#define BECHER_VOLL_INV 10
+#define GIPS_EIMER_INV 11
+#define SCHLOTT_INV 12
+#define ZANGE_INV 13
+#define MASKE_INV 14
+#define KOHLE_HEISS_INV 15
+#define KOHLE_KALT_INV 16
+#define DEE_PAINT_INV 17
+#define SURIMY_INV 18
+#define BORK_INV 19
+#define SPINAT_INV 20
+#define YEL_CARD_INV 21
+#define BWAFFE_INV 22
+#define SICHERUNG_INV 23
+#define FLUXO_INV 24
+#define TRANSLATOR_INV 25
+#define CARTRIDGE_INV 26
+#define TALISMAN_INV 27
+#define SEIL_INV 28
+#define CYB_KRONE_INV 29
+#define SCHLAUCH_INV 30
+#define TRICHTER_INV 31
+#define ANGEL_INV 32
+#define MILCH_INV 33
+#define MESSER_INV 34
+#define PUMPE_INV 35
+#define CENT_INV 36
+#define ANGEL2_INV 37
+#define GEBISS_INV 38
+#define H_FUTTER_INV 39
+#define KUERBIS1_INV 40
+#define K_MASKE_INV 41
+#define K_FLEISCH_INV 42
+#define K_KERNE_INV 43
+#define EIER_INV 44
+#define KAFFEE_INV 45
+#define PUTENKEULE_INV 46
+#define KNOCHEN_INV 47
+#define MANUSKRIPT_INV 48
+#define RECORDER_INV 49
+#define ZAPPER_INV 50
+#define MUNTER_INV 51
+#define MILCH_LEER_INV 52
+#define MILCH_WAS_INV 53
+#define PAPIER_INV 54
+#define BRIEF_INV 55
+#define TICKET_INV 56
+#define ZEITUNG_INV 57
+#define BMARKE_INV 58
+#define BRIEF2_INV 59
+#define DUENGER_INV 60
+#define LIKOER_INV 61
+#define LIKOER2_INV 62
+#define DOLLAR175_INV 63
+#define CASSETTE_INV 64
+#define HOTEL_INV 65
+#define KAPPE_INV 66
+#define FLASCHE_INV 67
+#define GUM_INV 68
+#define CIGAR_INV 69
+#define KEY_INV 70
+#define BURGER_INV 71
+#define WOLLE_INV 72
+#define UHR_INV 73
+#define RING_INV 74
+#define SACKGELD_INV 75
+#define KILLER_INV 76
+#define CUTMAG_INV 77
+#define JMKOST_INV 78
+#define LEDER_INV 79
+#define SPARK_INV 80
+#define BESTELL_INV 81
+#define VCARD_INV 82
+#define EINLAD_INV 83
+#define GERAET_INV 84
+#define ASCHE_INV 85
+#define PIRANHA_INV 86
+#define SCHALL_INV 87
+#define ARTE_INV 88
+#define GALA_INV 89
+#define PAPAGEI_INV 90
+#define BAR_GUT_INV 91
+#define CLINT_500_INV 92
+#define CLINT_1500_INV 93
+#define CLINT_3000_INV 94
+#define B_MARY_INV 95
+#define VIDEO_INV 96
+#define B_MARY2_INV 97
+#define KARTE_INV 98
+
+#define SIB_SCHLEIM 3
+
+#define NO_MOV_OBJ 127
+#define CHEWY_OBJ 255
+#define HOWARD_OBJ 254
+#define NICHELLE_OBJ 253
+#define AUTO_OBJ0 0
+#define AUTO_OBJ1 1
+#define AUTO_OBJ2 2
+#define AUTO_OBJ3 3
+#define AUTO_OBJ4 4
+#define MAX_OBJ_MOV 3
+
+#define ROOM_ATS_MAX 1000
+#define INV_USE_ATS_MAX 500
+#define ATS_ACTION_VOR 0
+#define ATS_ACTION_NACH 1
+
+#define CFO_MODE 0
+#define FLC_MODE 1
+#define ASF_MODE 2
+#define FCUT_001 0
+#define FCUT_002 1
+#define FCUT_003 2
+#define FCUT_004 3
+#define FCUT_005 4
+#define FCUT_006 5
+#define FCUT_007 6
+#define FCUT_008 7
+#define FCUT_009 8
+#define FCUT_010 9
+#define FCUT_011 10
+#define FCUT_012 11
+#define FCUT_013 12
+#define FCUT_014 13
+#define FCUT_015 14
+#define FCUT_016 15
+#define FCUT_017 16
+#define FCUT_018 17
+#define FCUT_019 18
+#define FCUT_029 29
+#define FCUT_030 30
+#define FCUT_031 31
+#define FCUT_032 32
+#define FCUT_033 33
+#define FCUT_034 34
+#define FCUT_035 35
+#define FCUT_036 36
+#define FCUT_037 37
+#define FCUT_038 38
+#define FCUT_039 39
+#define FCUT_040 40
+#define FCUT_041 41
+#define FCUT_042 42
+#define FCUT_043 43
+#define FCUT_044 44
+#define FCUT_045 45
+#define FCUT_046 46
+#define FCUT_047 47
+#define FCUT_048 48
+#define FCUT_049 49
+#define FCUT_050 50
+#define FCUT_051 51
+#define FCUT_052 52
+#define FCUT_053 53
+#define FCUT_054 54
+#define FCUT_055 55
+#define FCUT_056 56
+#define FCUT_057 57
+#define FCUT_058 58
+#define FCUT_059 59
+#define FCUT_060 60
+#define FCUT_061 61
+#define FCUT_062 62
+#define FCUT_063 63
+#define FCUT_064 64
+#define FCUT_065 65
+#define FCUT_066 66
+#define FCUT_067 67
+#define FCUT_068 68
+#define FCUT_069 69
+#define FCUT_070 70
+#define FCUT_071 71
+#define FCUT_072 72
+#define FCUT_073 73
+#define FCUT_074 74
+#define FCUT_075 75
+#define FCUT_076 76
+#define FCUT_077 77
+#define FCUT_078 78
+#define FCUT_079 79
+#define FCUT_080 80
+#define FCUT_081 81
+#define FCUT_082 82
+#define FCUT_083 83
+
+#define AUSGANG_LINKS 1
+#define AUSGANG_RECHTS 2
+#define AUSGANG_OBEN 3
+#define AUSGANG_UNTEN 4
+#define WAIT_TASTE_LOS while (in->get_switch_code() != 0);
+#define FILEMENUE 1
+
+#endif
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
new file mode 100644
index 00000000000..9f61e25a4ff
--- /dev/null
+++ b/engines/chewy/detail.cpp
@@ -0,0 +1,1164 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
+#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
+#define FORBIDDEN_SYMBOL_EXCEPTION_fread
+#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
+#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+
+#include "engines/chewy/detail.h"
+#include "engines/chewy/global.h"
+
+detail::detail() {
+	char *tptr;
+	int16 i, size;
+	size = sizeof(room_detail_info);
+	tptr = (char *)&rdi;
+	for (i = 0; i < size; i++)
+		*tptr++ = 0;
+	for (i = 0; i < MAXDETAILS; i++) {
+		rdi.Sinfo[i].SprNr = -1;
+		rdi.Ainfo[i].start_ani = -1;
+	}
+	for (i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
+		rdi.mvect[i] = -1;
+#ifdef KONVERT
+	for (i = 0; i < MAXDETAILS; i++) {
+		rdi_new.Sinfo[i].SprNr = -1;
+		rdi_new.Ainfo[i].start_ani = -1;
+	}
+
+#endif
+	global_delay = false;
+	ani_freezeflag = false;
+	fulltaf = false;
+	rdi.dptr = 0;
+	tafname[0] = 0;
+	for (i = 0; i < (MAXDETAILS * MAX_SOUNDS); i++) {
+		rdi.sample[i] = NULL;
+		rdi.tvp_index[i] = -1;
+	}
+	SoundBuffer = 0;
+	direct_taf_ani = OFF;
+	CurrentTaf = 0;
+}
+
+detail::~detail() {
+	if (CurrentTaf)
+		fclose((FILE *)CurrentTaf);
+	direct_taf_ani = OFF;
+}
+
+void detail::load_rdi(const char *fname_, int16 room_nr) {
+	FILE *handle;
+	taf_info *tmprdi;
+	tmprdi = rdi.dptr;
+	handle = fopen(fname_, "rb");
+	if (handle) {
+		if (fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, handle)) {
+			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
+				fseek(handle, (long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
+				if (!fread(&rdi, sizeof(room_detail_info), 1, handle)) {
+					modul = DATEI;
+					fcode = READFEHLER;
+				}
+			} else {
+				modul = DATEI;
+				fcode = READFEHLER;
+			}
+		} else {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+		fclose(handle);
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+	}
+	rdi.dptr = tmprdi;
+}
+
+void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
+	if (strcmp(tafname, fname_)) {
+		if (rdi.dptr) {
+			if (fulltaf) {
+				free((char *)rdi.dptr);
+				rdi.dptr = 0;
+				fulltaf = false;
+			} else {
+				del_taf_tbl(rdi.dptr);
+			}
+		}
+		strcpy(tafname, fname_);
+		if (!load_flag) {
+			rdi.dptr = init_taf_tbl(fname_);
+			if (!modul)
+				load_taf_tbl(rdi.dptr);
+		} else {
+			rdi.dptr = mem->taf_adr(fname_);
+			fulltaf = true;
+		}
+	} else {
+		if (!fulltaf)
+			load_taf_tbl(rdi.dptr);
+	}
+
+}
+
+void detail::del_dptr() {
+	if (rdi.dptr) {
+		if (fulltaf)
+			free((char *)rdi.dptr);
+		else {
+			del_taf_tbl(rdi.dptr);
+			rdi.dptr = 0;
+			tafname[0] = 0;
+		}
+		rdi.dptr = 0;
+	}
+
+}
+
+void detail::load_taf_tbl(taf_info *fti) {
+
+	int16 i;
+	if (!fti) {
+		fti = rdi.dptr;
+	}
+	if (!modul) {
+		if (fti) {
+
+			if (CurrentTaf) {
+				for (i = 0; i < MAXDETAILS; i++) {
+					if (rdi.Sinfo[i].SprNr != -1)
+						load_taf_seq(CurrentTaf, rdi.Sinfo[i].SprNr, 1, fti);
+					if (rdi.Ainfo[i].start_ani != -1 &&
+					        rdi.Ainfo[i].end_ani != -1 && !rdi.Ainfo[i].load_flag)
+						load_taf_seq(CurrentTaf, rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
+				}
+
+			} else {
+				modul = DATEI;
+				fcode = OPENFEHLER;
+			}
+		}
+	} else {
+		ERROR
+	}
+}
+
+taf_info *detail::init_taf_tbl(const char *fname_) {
+	taf_dateiheader *tafheader;
+	taf_info *Tt;
+	char *tmp;
+	int16 anz;
+	int16 i;
+
+	Tt = 0;
+
+	mem->file->get_tafinfo(fname_, &tafheader);
+	if (!modul) {
+		anz = tafheader->count;
+		tmp = (char *)calloc((int32)anz * 4l + sizeof(taf_info), 1);
+		if (!modul) {
+			Tt = (taf_info *)tmp;
+			Tt->anzahl = anz;
+			Tt->korrektur = (int16 *)calloc((int32)Tt->anzahl * 4l, 1);
+			if (!modul) {
+				mem->file->load_korrektur(fname_, (char *)Tt->korrektur);
+				Tt->palette = 0;
+				CurrentTaf = fopen(fname_, "rb");
+				if (CurrentTaf) {
+					load_sprite_pointer(CurrentTaf);
+				} else {
+					modul = DATEI;
+					fcode = OPENFEHLER;
+				}
+				for (i = 0; i < Tt->anzahl; i++)
+					Tt->image[i] = 0;
+			}
+		}
+	}
+	return(Tt);
+}
+
+void detail::del_taf_tbl(taf_info *Tt) {
+	int16 i;
+	if (!Tt) {
+		Tt = rdi.dptr;
+	}
+	for (i = 0; i < Tt->anzahl; i++) {
+		free(Tt->image[i]);
+	}
+	free((char *) Tt->korrektur);
+	free((char *) Tt);
+
+	if (CurrentTaf) {
+		fclose((FILE *)CurrentTaf);
+		CurrentTaf = 0;
+	}
+}
+
+void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
+	int16 i;
+	if (!Tt)
+		Tt = rdi.dptr;
+	for (i = start; i < start + anz && i < Tt->anzahl; i++) {
+		free(Tt->image[i]);
+		Tt->image[i] = 0;
+	}
+}
+
+void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
+
+	if (!Tt)
+		Tt = rdi.dptr;
+
+	if (CurrentTaf) {
+		load_taf_seq(CurrentTaf, spr_nr, spr_anz, Tt);
+
+	}
+}
+
+void detail::load_taf_seq(void *h, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
+	FILE *handle = (FILE *)h;
+	uint32 size;
+	taf_imageheader iheader;
+	int16 i;
+
+	fseek(handle, SpritePos[spr_nr], SEEK_SET);
+	for (i = 0; i < spr_anz && !modul; i++) {
+		if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+			if (!Tt->image[spr_nr + i]) {
+				size = iheader.width * iheader.height ;
+				Tt->image[spr_nr + i] = (char *)calloc(size + 4l, 1);
+				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
+				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
+				fseek(handle, iheader.image, SEEK_SET);
+				mem->file->load_tafmcga(handle, iheader.komp, size, Tt->image[spr_nr + i] + 4l);
+			}
+			fseek(handle, iheader.next, SEEK_SET);
+		} else {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+	}
+}
+
+#ifdef ICM
+
+void detail::save_detail(char *fname, int16 room_nr) {
+	FILE *new_handle;
+	FILE *old_handle;
+	taf_info *tmprdi;
+	char tmp_name[MAXPATH + 1];
+	char *str;
+#ifdef KONVERT
+	room_detail_info_new tmp_rdi_new;
+#endif
+	room_detail_info tmp_rdi;
+	int16 i;
+	char *tmp;
+	modul = 0;
+	fcode = 0;
+	tmprdi = rdi.dptr;
+	tmp = (char *)&tmp_rdi;
+	for (i = 0; i < sizeof(room_detail_info); i++)
+		tmp[i] = 0;
+
+	strcpy(tmp_name, fname);
+	str = strchr(tmp_name, '.');
+	strcpy(str + 1, "BAK");
+	mem->file->fcopy(tmp_name, fname);
+	remove("rdi.old\0");
+	mem->file->fcopy("rdi.old", fname);
+	old_handle = fopen("rdi.old", "rb");
+	if (old_handle) {
+		new_handle = fopen(fname, "wb");
+		if (new_handle) {
+			strcpy(rdi_datei_header.Id, "RDI\0");
+			rdi_datei_header.Anz = MAX_RDI_ROOM;
+			if (fwrite(&rdi_datei_header, sizeof(RdiDateiHeader), 1, new_handle)) {
+
+				fseek(old_handle, sizeof(RdiDateiHeader), SEEK_SET);
+				for (i = 0; i < room_nr && !modul ; i++) {
+					if (fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
+#ifdef KONVERT
+						konvert_format(&tmp_rdi, &tmp_rdi_new);
+						if (!fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+#else
+						if (!fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
+#endif
+						{
+							modul = DATEI;
+							fcode = WRITEFEHLER;
+						}
+					} else {
+						modul = DATEI;
+						fcode = READFEHLER;
+					}
+				}
+
+#ifdef KONVERT
+				konvert_format(&rdi, &rdi_new);
+				if (fwrite(&rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+#else
+				if (fwrite(&rdi, sizeof(room_detail_info), 1, new_handle))
+#endif
+				{
+
+					fseek(old_handle, sizeof(room_detail_info), SEEK_CUR);
+
+					for (i = 0; i < MAX_RDI_ROOM - (room_nr + 1) && !modul ; i++) {
+						if (fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
+#ifdef KONVERT
+							konvert_format(&tmp_rdi, &tmp_rdi_new);
+							if (!fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+#else
+							if (!fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
+#endif
+							{
+								modul = DATEI;
+								fcode = WRITEFEHLER;
+							}
+						} else {
+							modul = DATEI;
+							fcode = READFEHLER;
+						}
+					}
+				} else {
+					modul = DATEI;
+					fcode = WRITEFEHLER;
+				}
+			} else {
+				modul = DATEI;
+				fcode = WRITEFEHLER;
+			}
+			fclose(new_handle);
+		} else {
+			modul = DATEI;
+			fcode = OPENFEHLER;
+		}
+		fclose(old_handle);
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+	}
+	remove("rdi.old\0");
+	rdi.dptr = tmprdi;
+}
+
+#endif
+
+#ifdef KONVERT
+void detail::konvert_format(room_detail_info *rdi_a,
+                            room_detail_info_new *rdi_n) {
+
+	char *tmp;
+	char *tmp1;
+	int16 j;
+	int16 i;
+
+	rdi_n->StaticDetailAnz = rdi_a->StaticDetailAnz;
+	rdi_n->AniDetailAnz = rdi_a->AniDetailAnz;
+	rdi_n->dptr = rdi_a->dptr;
+
+	for (j = 0; j < MAXDETAILS; j++) {
+		rdi_n->Ainfo[j].x = rdi_a->Ainfo[j].x;
+		rdi_n->Ainfo[j].y = rdi_a->Ainfo[j].y;
+		rdi_n->Ainfo[j].start_flag = rdi_a->Ainfo[j].start_flag;
+		rdi_n->Ainfo[j].repeat = rdi_a->Ainfo[j].repeat;
+		rdi_n->Ainfo[j].start_ani = rdi_a->Ainfo[j].start_ani;
+		rdi_n->Ainfo[j].end_ani = rdi_a->Ainfo[j].end_ani;
+		rdi_n->Ainfo[j].ani_count = rdi_a->Ainfo[j].ani_count;
+		rdi_n->Ainfo[j].delay = rdi_a->Ainfo[j].delay;
+		rdi_n->Ainfo[j].delay_count = rdi_a->Ainfo[j].delay_count;
+		rdi_n->Ainfo[j].reverse = rdi_a->Ainfo[j].reverse;
+		rdi_n->Ainfo[j].timer_start = rdi_a->Ainfo[j].timer_start;
+		rdi_n->Ainfo[j].z_ebene = rdi_a->Ainfo[j].z_ebene;
+		rdi_n->Ainfo[j].load_flag = rdi_a->Ainfo[j].load_flag;
+		rdi_n->Ainfo[j].zoom = rdi_a->Ainfo[j].zoom;
+		rdi_n->Ainfo[j].show_1_phase = rdi_a->Ainfo[j].show_1_phase;
+		rdi_n->Ainfo[j].phase_nr = rdi_a->Ainfo[j].phase_nr;
+	}
+
+	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
+		rdi_n->tvp_index[i] = rdi_a->tvp_index[i];
+		rdi_n->sample [i] = rdi_a->sample [i];
+		for (j = 0; j < MAX_SOUNDS; j++) {
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_enable[j] =
+			    rdi_a->Ainfo[i / 3].sfx.sound_enable[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_index [j] =
+			    rdi_a->Ainfo[i / 3].sfx.sound_index [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_start [j] =
+			    rdi_a->Ainfo[i / 3].sfx.sound_start [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.kanal [j] =
+			    rdi_a->Ainfo[i / 3].sfx.kanal [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.volume [j] =
+			    rdi_a->Ainfo[i / 3].sfx.volume [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.repeats [j] =
+			    rdi_a->Ainfo[i / 3].sfx.repeats [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.stereo [j] =
+			    rdi_a->Ainfo[i / 3].sfx.stereo [j];
+		}
+	}
+
+	for (j = 0; j < MAXDETAILS; j++) {
+		rdi_n->Sinfo[j].x = rdi_a->Sinfo[j].x;
+		rdi_n->Sinfo[j].y = rdi_a->Sinfo[j].y;
+		rdi_n->Sinfo[j].SprNr = rdi_a->Sinfo[j].SprNr;
+		rdi_n->Sinfo[j].z_ebene = rdi_a->Sinfo[j].z_ebene;
+		rdi_n->Sinfo[j].Hide = rdi_a->Sinfo[j].Hide;
+		rdi_n->Sinfo[j].Dummy = rdi_a->Sinfo[j].Dummy;
+	}
+
+	for (i = 0; i < MAX_M_ITEMS * 4; i++)
+		rdi_n->mvect[i] = rdi_a->mvect[i];
+
+	for (i = 0; i < MAX_M_ITEMS; i++)
+		rdi_n->mtxt[i] = rdi_a->mtxt[i];
+
+	rdi_n->Ri.RoomNr = rdi_a->Ri.RoomNr;
+	rdi_n->Ri.BildNr = rdi_a->Ri.BildNr;
+	rdi_n->Ri.AutoMovAnz = rdi_a->Ri.AutoMovAnz;
+	rdi_n->Ri.TafLoad = rdi_a->Ri.TafLoad;
+	strncpy(rdi_n->Ri.TafName, rdi_a->Ri.TafName, 14);
+	rdi_n->Ri.ZoomFak = rdi_a->Ri.ZoomFak;
+	rdi_n->Ri.Dummy = rdi_a->Ri.Dummy;
+
+	for (j = 0; j < MAX_AUTO_MOV; j++) {
+		rdi_n->AutoMov[j].X = rdi_a->AutoMov[j].X;
+		rdi_n->AutoMov[j].Y = rdi_a->AutoMov[j].Y;
+		rdi_n->AutoMov[j].SprNr = rdi_a->AutoMov[j].SprNr;
+		rdi_n->AutoMov[j].dummy = rdi_a->AutoMov[j].dummy;
+	}
+}
+#endif
+
+void detail::set_static_spr(int16 nr, int16 spr_nr) {
+	rdi.Sinfo[nr].SprNr = spr_nr;
+}
+
+void detail::hide_static_spr(int16 nr) {
+	if (nr >= 0 && nr < MAXDETAILS)
+		rdi.Sinfo[nr].Hide = true;
+}
+
+void detail::show_static_spr(int16 nr) {
+	if (nr >= 0 && nr < MAXDETAILS)
+		rdi.Sinfo[nr].Hide = false;
+}
+
+char *detail::get_static_image(int16 det_nr) {
+	char *ret;
+	int16 index;
+	index = rdi.Sinfo[det_nr].SprNr;
+	if (index == -1)
+		ret = 0;
+	else
+		ret = rdi.dptr->image[index];
+	return(ret);
+}
+
+void detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
+	if (korr_flag) {
+		int16 *Cxy = rdi.dptr->korrektur + (rdi.Sinfo[det_nr].SprNr << 1);
+		x += Cxy[0];
+		y += Cxy[1];
+	}
+	rdi.Sinfo[det_nr].x = x;
+	rdi.Sinfo[det_nr].y = y;
+	rdi.Sinfo[det_nr].Hide = hide;
+}
+
+void detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
+	rdi.Ainfo[det_nr].x = x;
+	rdi.Ainfo[det_nr].y = y;
+}
+
+void detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
+	*start = rdi.Ainfo[ani_nr].start_ani;
+	*end = rdi.Ainfo[ani_nr].end_ani;
+}
+
+void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
+	int16 tmp;
+	if (start > end) {
+		tmp = start;
+		start = end;
+		end = tmp;
+	}
+	rdi.Ainfo[ani_nr].start_ani = start;
+	rdi.Ainfo[ani_nr].end_ani = end;
+}
+
+char *detail::get_image(int16 spr_nr) {
+	char *ret;
+	ret = rdi.dptr->image[spr_nr];
+	return(ret);
+}
+
+ani_detail_info *detail::get_ani_detail(int16 ani_nr) {
+	ani_detail_info *ret;
+	ret = &rdi.Ainfo[ani_nr];
+	return(ret);
+}
+
+int16 *detail::get_korrektur_tbl() {
+	int16 *ret;
+	ret = rdi.dptr->korrektur;
+	return(ret);
+}
+
+void detail::init_taf(taf_info *dptr) {
+	rdi.dptr = dptr;
+}
+
+taf_info *detail::get_taf_info() {
+	taf_info *ret;
+	ret = rdi.dptr;
+	return(ret);
+}
+
+room_detail_info *detail::get_room_detail_info() {
+	return(&rdi);
+}
+
+void detail::freeze_ani() {
+	ani_freezeflag = true;
+}
+
+void detail::unfreeze_ani() {
+	ani_freezeflag = false;
+}
+
+void detail::set_static_ani(int16 ani_nr, int16 static_nr) {
+	rdi.Ainfo[ani_nr].show_1_phase = true;
+	if (static_nr != -1)
+		rdi.Ainfo[ani_nr].phase_nr = static_nr;
+}
+
+void detail::del_static_ani(int16 ani_nr) {
+	rdi.Ainfo[ani_nr].show_1_phase = false;
+}
+
+void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
+                              int16 zoomx, int16 zoomy) {
+	int16 i, k;
+	int16 x, y, sprnr;
+	int16 *Cxy;
+	int16 kx, ky;
+	ani_detail_info *adiptr;
+	int16 sound_effect;
+	if (start > end) {
+		i = start;
+		start = end;
+		end = i;
+	}
+	if (start > MAXDETAILS)
+		start = 0;
+	if (end > MAXDETAILS)
+		end = MAXDETAILS - 1;
+	for (i = start; (i <= end) && (!modul); i++) {
+		adiptr = &rdi.Ainfo[i];
+		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
+			sprnr = adiptr->ani_count;
+			Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			kx = Cxy[0];
+			ky = Cxy[1];
+			if (zoomx != 0 || zoomy != 0)
+				calc_zoom_kor(&kx, &ky, zoomx, zoomy);
+			x = adiptr->x + kx - scrx;
+			y = adiptr->y + ky - scry;
+			if (adiptr->load_flag == 1) {
+				load_taf_ani_sprite(sprnr);
+				if (!modul)
+					out->scale_set(taf_load_buffer, x, y, zoomx, zoomy, 0);
+			} else
+				out->scale_set(rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
+
+			for (k = 0; k < MAX_SOUNDS; k++) {
+				sound_effect = adiptr->sfx.sound_index[k];
+				if ((adiptr->sfx.sound_enable[k]) && (sound_effect != -1) &&
+				        (rdi.sample[sound_effect])) {
+					if ((adiptr->sfx.sound_start[k] == adiptr->ani_count) &&
+					        (!adiptr->delay_count)) {
+#ifdef AIL
+						ailsnd->set_stereo_pos(adiptr->sfx.kanal[k],
+						                       adiptr->sfx.stereo[k]);
+						ailsnd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+						                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
+#else
+#if 0
+						snd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+						              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
+#endif
+						warning("STUB: detail::plot_ani_details()");
+#endif
+					}
+				}
+			}
+
+			if (!ani_freezeflag) {
+				if (adiptr->reverse) {
+					if (adiptr->delay_count > 0)
+						--adiptr->delay_count;
+					else {
+						adiptr->delay_count = adiptr->delay + global_delay;
+						if (adiptr->ani_count > adiptr->start_ani)
+							--adiptr->ani_count;
+						else {
+							adiptr->ani_count = adiptr->end_ani;
+							if ((adiptr->start_flag != 255) && (adiptr->start_flag > 0)) {
+								--adiptr->start_flag;
+
+							}
+						}
+					}
+				} else {
+					if (adiptr->delay_count > 0)
+						--adiptr->delay_count;
+					else {
+						adiptr->delay_count = adiptr->delay + global_delay;
+						if (adiptr->ani_count < adiptr->end_ani)
+							++adiptr->ani_count;
+						else {
+							adiptr->ani_count = adiptr->start_ani;
+							if ((adiptr->start_flag != 255) && (adiptr->start_flag > 0)) {
+								--adiptr->start_flag;
+
+							}
+						}
+					}
+				}
+			}
+		} else {
+			adiptr->start_flag = 0;
+			if (adiptr->show_1_phase) {
+				rdi.Sinfo[adiptr->phase_nr].Hide = false;
+				plot_static_details(scrx, scry, adiptr->phase_nr, adiptr->phase_nr);
+				rdi.Sinfo[adiptr->phase_nr].Hide = true;
+			}
+		}
+	}
+}
+
+void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end) {
+	int16 x, y;
+	int16 i;
+	char *simage;
+	if (start > end) {
+		i = start;
+		start = end;
+		end = i;
+	}
+	if (start > MAXDETAILS)
+		start = 0;
+	if (end > MAXDETAILS)
+		end = MAXDETAILS - 1;
+	for (i = start; i <= end; i++) {
+		if (rdi.Sinfo[i].SprNr != -1 && !rdi.Sinfo[i].Hide) {
+			x = rdi.Sinfo[i].x - scrx;
+			y = rdi.Sinfo[i].y - scry;
+			simage = rdi.dptr->image[rdi.Sinfo[i].SprNr];
+			out->sprite_set(simage, x, y, 0);
+		}
+	}
+}
+
+void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
+	if (nr != -1) {
+		ani_detail_info *adiptr;
+		adiptr = &rdi.Ainfo[nr];
+		if (rep)
+			adiptr->start_flag = rep;
+		else
+			adiptr->start_flag = adiptr->repeat;
+
+		adiptr->reverse = reverse;
+		if (reverse)
+			adiptr->ani_count = adiptr->end_ani;
+		else
+			adiptr->ani_count = adiptr->start_ani;
+	}
+}
+
+void detail::stop_detail(int16 nr) {
+	ani_detail_info *adiptr;
+	adiptr = &rdi.Ainfo[nr];
+	adiptr->start_flag = 0;
+
+}
+
+void detail::set_ani_delay(int16 nr, int16 del) {
+	ani_detail_info *adiptr;
+	adiptr = &rdi.Ainfo[nr];
+	adiptr->delay = del;
+}
+
+void detail::init_list(int16 *mv) {
+	int16 i;
+	for (i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
+		rdi.mvect[i] = mv[i];
+}
+
+void detail::get_list(int16 *mv) {
+	int16 i;
+	for (i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
+		mv[i] = rdi.mvect[i];
+}
+
+int16 detail::maus_vector(int16 x, int16 y) {
+	int16 i, j;
+	i = -1;
+	for (j = 0; (j < (MAX_M_ITEMS - 1) << 2) && (i == -1); j += 4) {
+		if (rdi.mvect[j] != -1) {
+			if ((x >= rdi.mvect[j]) && (x <= rdi.mvect[j + 2]) &&
+			        (y >= rdi.mvect[j + 1]) && (y <= rdi.mvect[j + 3]))
+				i = j / 4;
+		}
+	}
+	return (i);
+}
+
+int16 detail::get_ani_status(int16 det_nr) {
+	int16 ret;
+	if (rdi.Ainfo[det_nr].start_flag > 0)
+		ret = 1;
+	else
+		ret = 0;
+	return(ret);
+}
+
+SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
+                                   int16 spr_nr, int16 mode) {
+	int16 *Cxy;
+	int16 *Xy;
+	ani_detail_info *adiptr;
+	int16 k, sound_effect;
+	if (det_nr > MAXDETAILS)
+		det_nr = MAXDETAILS - 1;
+	adiptr = &rdi.Ainfo[det_nr];
+	if (spr_nr < adiptr->start_ani)
+		spr_nr = adiptr->start_ani;
+	if (spr_nr > adiptr->end_ani)
+		spr_nr = adiptr->end_ani - 1;
+	Cxy = rdi.dptr->korrektur + (spr_nr << 1);
+	Xy = (int16 *) rdi.dptr->image[spr_nr];
+	spr_info.Image = rdi.dptr->image[spr_nr];
+	spr_info.X = adiptr->x + Cxy[0] - scrx;
+	spr_info.Y = adiptr->y + Cxy[1] - scry;
+	spr_info.X1 = spr_info.X + Xy[0];
+	spr_info.Y1 = spr_info.Y + Xy[1];
+	if (mode)
+		out->sprite_set(spr_info.Image, spr_info.X, spr_info.Y, 0);
+
+	for (k = 0; k < MAX_SOUNDS; k++) {
+		sound_effect = adiptr->sfx.sound_index[k];
+		if ((adiptr->sfx.sound_enable[k] != false) && (sound_effect != -1) &&
+		        (rdi.sample[sound_effect])) {
+			if (adiptr->sfx.sound_start[k] == spr_nr) {
+#ifdef AIL
+				ailsnd->set_stereo_pos(adiptr->sfx.kanal[k],
+				                       adiptr->sfx.stereo[k]);
+				ailsnd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+				                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
+#else
+				warning("STUB: detail::plot_detail_sprite()");
+#if 0
+				snd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+				              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
+#endif
+#endif
+			}
+		}
+	}
+
+	return (spr_info);
+}
+
+void detail::set_global_delay(int16 delay) {
+	global_delay = delay;
+	global_delay -= 2;
+}
+
+void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
+	float tmpx;
+	float tmpy;
+	float tmpx1;
+	float tmpy1;
+	tmpx = (float)(((float) * kx / 100.0) * ((float)xzoom));
+	tmpy = (float)(((float) * ky / 100.0) * ((float)yzoom));
+
+	tmpx1 = tmpx - (int16)tmpx;
+	if (fabs(tmpx1) > 0.5)
+		++tmpx;
+	tmpy1 = tmpy - (int16)tmpy;
+	if (fabs(tmpy1) > 0.5)
+		++tmpy;
+	*kx += (int16)tmpx;
+	*ky += (int16)tmpy;
+}
+
+void detail::set_sound_area(char *buffer, uint32 size) {
+	SoundBuffer = buffer;
+	SoundBufferSize = size;
+}
+
+void detail::load_room_sounds(void *tvp_handle) {
+	int16 i, break_flag;
+	int16 index;
+	char *workbuf;
+	uint32 size;
+	uint32 allsize;
+	if (tvp_handle) {
+		workbuf = SoundBuffer;
+		allsize = 0;
+		size = 0;
+		break_flag = false;
+		if (workbuf) {
+
+			for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++)
+				rdi.sample[i] = NULL;
+
+			for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (break_flag == false); i++) {
+				index = rdi.tvp_index[i];
+				if ((index != -1) && (rdi.sample[i] == NULL)) {
+					mem->file->select_pool_item(tvp_handle, index);
+					size = mem->file->load_voc(tvp_handle, workbuf);
+					if (!modul) {
+
+						rdi.sample[i] = workbuf;
+						workbuf += size;
+						allsize += size;
+					} else
+						break_flag = true;
+					if (allsize > SoundBufferSize) {
+						modul = SPEICHER;
+						fcode = NOSPEICHER;
+						err->set_user_msg("SFX-SIZE TOO LARGE");
+						break_flag = true;
+					}
+				}
+			}
+		}
+	} else {
+		modul = DATEI;
+		fcode = OPENFEHLER;
+	}
+}
+
+void detail::set_sound_para(int16 nr, sound_def_blk *sdb_src) {
+	sound_def_blk *sdb_dest;
+	sdb_dest = &rdi.Ainfo[nr].sfx;
+	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
+}
+
+void detail::get_sound_para(int16 nr, sound_def_blk *sdb_dest) {
+	sound_def_blk *sdb_src;
+	sdb_src = &rdi.Ainfo[nr].sfx;
+	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
+}
+
+void detail::map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index) {
+	sound_def_blk *sdb;
+	int16 i, j;
+	sdb = &rdi.Ainfo[nr].sfx;
+	remove_unused_samples();
+
+	bool found = false;
+	if (sdb->sound_index[sslot] != -1) {
+		for (i = 0; (i < MAXDETAILS) && (!found); i++) {
+			for (j = 0; (j < MAX_SOUNDS) && (!found); j++)
+				if ((rdi.Ainfo[i].sfx.sound_index[j] == sdb->sound_index[sslot]) &&
+				        (i != nr) && (j != sslot))
+					found = true;
+		}
+
+		if (!found) {
+			rdi.tvp_index[sdb->sound_index[sslot]] = -1;
+			sdb->sound_index[sslot] = -1;
+		}
+	}
+
+	found = false;
+	for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
+		if (rdi.tvp_index[i] == tvp_index) {
+			found = true;
+			sdb->sound_index[sslot] = i;
+		}
+	}
+
+	for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
+		if (rdi.tvp_index[i] == -1) {
+			found = true;
+			sdb->sound_index[sslot] = i;
+			rdi.tvp_index[i] = tvp_index;
+		}
+	}
+}
+
+void detail::disable_sound(int16 nr, int16 sslot) {
+	sound_def_blk *sdb;
+	sdb = &rdi.Ainfo[nr].sfx;
+	sdb->sound_enable[sslot] = 0;
+	ailsnd->end_sample(sdb->kanal[sslot]);
+}
+
+void detail::enable_sound(int16 nr, int16 sslot) {
+	sound_def_blk *sdb;
+	sdb = &rdi.Ainfo[nr].sfx;
+	sdb->sound_enable[sslot] = 1;
+}
+
+void detail::play_sound(int16 nr, int16 sslot) {
+	warning("STUB: detail::play_sound()");
+#if 0
+	sound_def_blk *sdb;
+	sdb = &rdi.Ainfo[nr].sfx;
+	if ((sdb->sound_enable[sslot] != FALSE) && (sdb->sound_index[sslot] != -1) &&
+	        (rdi.sample[sdb->sound_index[sslot]])) {
+#ifdef AIL
+		ailsnd->set_stereo_pos(sdb->kanal[sslot], sdb->stereo[sslot]);
+		ailsnd->play_voc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
+		                 sdb->volume[sslot], sdb->repeats[sslot]);
+#else
+		snd->play_voc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
+		              sdb->volume[sslot], sdb->repeats[sslot]);
+#endif
+	}
+#endif
+}
+
+void detail::disable_detail_sound(int16 nr) {
+	sound_def_blk *sdb;
+	int16 i;
+	sdb = &rdi.Ainfo[nr].sfx;
+	for (i = 0; i < MAX_SOUNDS; i++)
+		sdb->sound_enable[i] = 0;
+}
+
+void detail::enable_detail_sound(int16 nr) {
+	sound_def_blk *sdb;
+	int16 i;
+	sdb = &rdi.Ainfo[nr].sfx;
+	for (i = 0; i < MAX_SOUNDS; i++)
+		if (sdb->sound_index[i] != -1)
+			sdb->sound_enable[i] = 1;
+}
+
+void detail::play_detail_sound(int16 nr) {
+	warning("STUB: detail::play_detail_sound()");
+#if 0
+	sound_def_blk *sdb;
+	int16 k;
+	sdb = &rdi.Ainfo[nr].sfx;
+	for (k = 0; k < MAX_SOUNDS; k++) {
+		if ((sdb->sound_enable[k] != FALSE) && (sdb->sound_index[k] != -1) &&
+		        (rdi.sample[sdb->sound_index[k]])) {
+#ifdef AIL
+			ailsnd->set_stereo_pos(sdb->kanal[k], sdb->stereo[k]);
+			ailsnd->play_voc(rdi.sample[sdb->sound_index[k]], sdb->kanal[k],
+			                 sdb->volume[k], sdb->repeats[k]);
+#else
+			snd->play_voc(rdi.sample[sound_effect], sdb->kanal[k],
+			              sdb->volume[k], sdb->repeats[k]);
+#endif
+		}
+	}
+#endif
+}
+
+void detail::clear_detail_sound(int16 nr) {
+	sound_def_blk *sdb;
+	short i;
+	sdb = &rdi.Ainfo[nr].sfx;
+	for (i = 0; i < MAX_SOUNDS; i++) {
+		sdb->sound_enable[i] = 0;
+		sdb->sound_index [i] = -1;
+		sdb->sound_start [i] = 0;
+		sdb->kanal [i] = 0;
+		sdb->volume [i] = 0;
+		sdb->repeats [i] = 0;
+		sdb->stereo [i] = 0;
+	}
+	remove_unused_samples();
+}
+
+void detail::disable_room_sound() {
+	int16 i;
+	for (i = 0; i < MAXDETAILS; i++)
+		disable_detail_sound(i);
+	ailsnd->end_sound();
+}
+
+void detail::enable_room_sound() {
+	int16 i;
+	for (i = 0; i < MAXDETAILS; i++)
+		enable_detail_sound(i);
+}
+
+void detail::clear_room_sound() {
+	sound_def_blk *sdb;
+	int16 i, j;
+	for (j = 0; j < MAXDETAILS; j++) {
+		sdb = &rdi.Ainfo[j].sfx;
+		for (i = 0; i < MAX_SOUNDS; i++) {
+			sdb->sound_enable[i] = 0;
+			sdb->sound_index [i] = -1;
+			sdb->sound_start [i] = 0;
+			sdb->kanal [i] = 0;
+			sdb->volume [i] = 0;
+			sdb->repeats [i] = 0;
+			sdb->stereo [i] = 0;
+		}
+	}
+	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
+		rdi.tvp_index[i] = -1;
+		rdi.sample [i] = NULL;
+	}
+}
+#ifdef DETEDIT
+
+void detail::shadow_room(int16 mode) {
+	if (mode == SAVE_ROOM)
+		memcpy(&rdi_shadow, &rdi, sizeof(room_detail_info));
+	else
+		memcpy(&rdi, &rdi_shadow, sizeof(room_detail_info));
+}
+#endif
+
+void detail::remove_unused_samples() {
+	int16 i, j, k, found;
+	found = false;
+
+	for (k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
+		if (rdi.tvp_index[k] != -1) {
+			found = false;
+			for (i = 0; (i < MAXDETAILS) && (found == false); i++) {
+				for (j = 0; (j < MAX_SOUNDS) && (found == false); j++)
+					if (rdi.Ainfo[i].sfx.sound_index[j] == k)
+						found = true;
+			}
+			if (found == false) {
+				rdi.tvp_index[k] = -1;
+				rdi.sample[k] = NULL;
+			}
+		}
+	}
+}
+
+int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y,
+                              int16 scrx, int16 scry) {
+	int16 i;
+	int16 ok;
+	int16 detail_nr;
+	int16 *Cxy;
+	int16 *Xy;
+	int16 sprnr;
+	int16 x, y;
+	ani_detail_info *adiptr;
+	ok = false;
+	detail_nr = -1;
+	for (i = 0; i < MAXDETAILS && !ok; i++) {
+		adiptr = &rdi.Ainfo[i];
+		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
+			sprnr = adiptr->ani_count;
+			Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			x = adiptr->x + Cxy[0] - scrx;
+			y = adiptr->y + Cxy[1] - scry;
+			if (adiptr->load_flag == 1) {
+				Xy = (int16 *)taf_load_buffer;
+			} else {
+				Xy = (int16 *)rdi.dptr->image[sprnr];
+			}
+			if (mouse_x >= x && mouse_x <= x + Xy[0] &&
+			        mouse_y >= y && mouse_y <= y + Xy[1]) {
+				ok = true;
+				detail_nr = i;
+			}
+		}
+	}
+	return (detail_nr);
+}
+
+void detail::set_taf_ani_mem(char *load_area) {
+	taf_load_buffer = load_area;
+	direct_taf_ani = ON;
+}
+
+void detail::load_taf_ani_sprite(int16 nr) {
+	int32 size;
+	taf_imageheader iheader;
+	if (CurrentTaf) {
+		fseek((FILE *)CurrentTaf, SpritePos[nr], SEEK_SET);
+
+		if (fread(&iheader, sizeof(taf_imageheader), 1, (FILE *)CurrentTaf)) {
+			size = (int32)iheader.width * (int32)iheader.height;
+			((int16 *)taf_load_buffer)[0] = iheader.width;
+			((int16 *)taf_load_buffer)[1] = iheader.height;
+			fseek((FILE *)CurrentTaf, iheader.image, SEEK_SET);
+			if (taf_load_buffer)
+				mem->file->load_tafmcga(CurrentTaf, iheader.komp, size, taf_load_buffer + 4l);
+			else {
+				modul = SPEICHER;
+				fcode = NOSPEICHER;
+				err->set_user_msg("Taf-Load-Puffer nicht initialisiert");
+			}
+		} else {
+			fcode = READFEHLER;
+			modul = DATEI;
+		}
+	} else {
+		fcode = OPENFEHLER;
+		modul = DATEI;
+		err->set_user_msg("Arbeitstaf nicht geöffnet");
+	}
+}
+
+void detail::load_sprite_pointer(void *h) {
+	FILE *handle = (FILE *)h;
+	uint16 anzahl;
+	taf_dateiheader header;
+	taf_imageheader iheader;
+	int16 i;
+	if (handle) {
+		fseek(handle, 0, SEEK_SET);
+		if (fread(&header, sizeof(taf_dateiheader), 1, handle)) {
+			anzahl = header.count;
+			fseek(handle, header.next, SEEK_SET);
+			SpritePos[0] = header.next;
+			for (i = 1; i < anzahl && !modul; i++) {
+				if (!fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+					fcode = READFEHLER;
+					modul = DATEI;
+				}
+				SpritePos[i] = iheader.next;
+				fseek(handle, iheader.next, SEEK_SET);
+			}
+		} else {
+			modul = DATEI;
+			fcode = READFEHLER;
+		}
+	}
+}
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
new file mode 100644
index 00000000000..4b6976dee6e
--- /dev/null
+++ b/engines/chewy/detail.h
@@ -0,0 +1,285 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_DETAIL_H
+#define CHEWY_DETAIL_H
+
+#include "engines/chewy/ngshext.h"
+#include "engines/chewy/defines.h"
+
+#define SAVE_ROOM 0
+#define RESTORE_ROOM 1
+#define MAX_SOUNDS 3
+
+#define MAX_AUTO_MOV 20
+
+typedef struct {
+	uint8 RoomNr;
+	uint8 BildNr;
+
+	uint8 AutoMovAnz;
+	uint8 TafLoad;
+
+	char TafName[14];
+	uint8 ZoomFak;
+	uint8 Dummy;
+
+} RaumInfo;
+
+typedef struct {
+	int16 X;
+	int16 Y;
+	uint8 SprNr;
+
+	uint8 dummy;
+} RaumAutoMov;
+
+#define MAXTAF 10
+#define MAXDETAILS 32
+#define MAX_M_ITEMS 50
+#define MAX_RDI_ROOM 100
+
+typedef struct {
+
+	char *Image;
+	int16 ZEbene;
+	int16 X;
+	int16 Y;
+	int16 X1;
+	int16 Y1;
+} SprInfo;
+
+typedef struct {
+	int16 sound_enable[MAX_SOUNDS];
+	int16 sound_index [MAX_SOUNDS];
+	int16 sound_start [MAX_SOUNDS];
+	int16 kanal [MAX_SOUNDS];
+	int16 volume [MAX_SOUNDS];
+	int16 repeats [MAX_SOUNDS];
+	int16 stereo [MAX_SOUNDS];
+} sound_def_blk;
+
+typedef struct {
+	int16 x;
+	int16 y;
+
+	uint8 start_flag;
+	uint8 repeat;
+	int16 start_ani;
+	int16 end_ani;
+	int16 ani_count;
+	int16 delay;
+	int16 delay_count;
+	int16 reverse;
+
+	int16 timer_start;
+
+	int16 z_ebene;
+
+	uint8 load_flag;
+
+	uint8 zoom;
+	sound_def_blk sfx;
+
+	int16 show_1_phase;
+
+	int16 phase_nr;
+
+} ani_detail_info;
+
+typedef struct {
+	int16 x;
+	int16 y;
+	int16 SprNr;
+
+	short z_ebene;
+
+	bool Hide;
+
+	uint8 Dummy;
+} static_detail_info;
+
+typedef struct {
+	int16 StaticDetailAnz;
+	int16 AniDetailAnz;
+	taf_info *dptr;
+	ani_detail_info Ainfo [MAXDETAILS];
+	static_detail_info Sinfo [MAXDETAILS];
+	int16 mvect [MAX_M_ITEMS * 4];
+	int16 mtxt [MAX_M_ITEMS];
+	RaumInfo Ri;
+	RaumAutoMov AutoMov [MAX_AUTO_MOV];
+	int16 tvp_index[MAXDETAILS * MAX_SOUNDS];
+	char *sample [MAXDETAILS * MAX_SOUNDS];
+} room_detail_info;
+
+typedef struct {
+	char Id[4];
+	int16 Anz;
+} RdiDateiHeader;
+
+#define MAXPATH 255
+typedef struct {
+	char Id[7];
+	char IibFile[MAXPATH];
+	char SibFile[MAXPATH];
+	char RdiFile[MAXPATH];
+	char TafFile[MAXPATH];
+	char TgpFile[MAXPATH];
+	char Workdir[MAXPATH];
+	char InventFile[MAXPATH];
+	char EibFile[MAXPATH];
+	char AtsRoomFile[MAXPATH];
+	char AadFile[MAXPATH];
+	char AtsRoomSteuer[MAXPATH];
+	char AdsFile[MAXPATH];
+	char AtdsFont[MAXPATH];
+	char AdhFile[MAXPATH];
+	char TvpFile[MAXPATH];
+	char DummyFile[MAXPATH];
+} DeteditPrj;
+
+class detail {
+public:
+	detail();
+	~detail();
+
+	void load_rdi(const char *fname, int16 room_nr);
+
+	void load_rdi_taf(const char *fname, int16 load_flag);
+
+#ifdef ICM
+	void save_detail(char *fname, int16 room_nr);
+#endif
+	void set_static_spr(int16 nr, int16 spr_nr);
+	char *get_static_image(int16 det_nr);
+
+	void set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag);
+	void set_detail_pos(int16 det_nr, int16 x, int16 y);
+	void hide_static_spr(int16 nr);
+	void show_static_spr(int16 nr);
+	void freeze_ani();
+	void unfreeze_ani();
+	void get_ani_werte(int16 ani_nr, int16 *start, int16 *end);
+	void set_ani(int16 ani_nr, int16 start, int16 end);
+	char *get_image(int16 spr_nr);
+	ani_detail_info *get_ani_detail(int16 ani_nr);
+	int16 *get_korrektur_tbl();
+	void init_taf(taf_info *dptr);
+	taf_info *get_taf_info();
+	room_detail_info *get_room_detail_info();
+
+	void set_static_ani(int16 ani_nr, int16 static_nr);
+
+	void del_static_ani(int16 ani_nr);
+	void set_ani_delay(int16 nr, int16 del);
+	void start_detail(int16 nr, int16 rep, int16 reverse);
+	void stop_detail(int16 nr);
+	void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
+	                      int16 zoomx, int16 zoomy);
+	void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end);
+	void plot_static_details(int16 scrx, int16 scry, int16 start, int16 end);
+	void init_list(int16 *mv);
+	void get_list(int16 *mv);
+	int16 maus_vector(int16 x, int16 y);
+	int16 get_ani_status(int16 det_nr);
+
+	SprInfo plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
+	                           int16 spr_nr, int16 mode);
+
+	void set_global_delay(int16 delay);
+
+	taf_info *init_taf_tbl(const char *fname);
+
+	void del_taf_tbl(taf_info *Tt);
+
+	void del_taf_tbl(int16 start, int16 anz, taf_info *Tt);
+
+	// FIXME : was FILE*
+	void load_taf_seq(void *handle, int16 spr_nr, int16 spr_anz,
+	                  taf_info *Tt);
+
+	void load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt);
+	void load_taf_tbl(taf_info *fti);
+
+	void del_dptr();
+
+	void calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom,
+	                   int16 yzoom);
+
+	int16 mouse_on_detail(int16 mouse_x, int16 mouse_y,
+	                      int16 scrx, int16 scry);
+
+	void set_sound_area(char *buffer, uint32 size);
+	// FIXME : was FILE*
+	void load_room_sounds(void *tvp_handle);
+	void get_sound_para(int16 nr, sound_def_blk *sdb_dest);
+	void set_sound_para(int16 nr, sound_def_blk *sdb_src);
+	void map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index);
+	void disable_sound(int16 nr, int16 sslot);
+	void enable_sound(int16 nr, int16 sslot);
+	void play_sound(int16 nr, int16 sslot);
+	void disable_detail_sound(int16 nr);
+	void enable_detail_sound(int16 nr);
+	void clear_detail_sound(int16 nr);
+	void play_detail_sound(int16 nr);
+	void disable_room_sound();
+	void enable_room_sound();
+	void clear_room_sound();
+#ifdef DETEDIT
+	void shadow_room(int16 mode);
+#endif
+	void set_taf_ani_mem(char *load_area);
+	// FIXME : was FILE*
+	void load_sprite_pointer(void *handle);
+
+private:
+	void load_taf_ani_sprite(int16 nr);
+
+	void remove_unused_samples();
+#ifdef KONVERT
+	void konvert_format(room_detail_info *rdi_a,
+	                    room_detail_info_new *rdi_n);
+	room_detail_info_new rdi_new;
+#endif
+	room_detail_info rdi;
+#ifdef DETEDIT
+	room_detail_info rdi_shadow;
+#endif
+	RdiDateiHeader rdi_datei_header;
+	SprInfo spr_info;
+
+	int16 global_delay;
+	int16 ani_freezeflag;
+	int16 fulltaf;
+	char tafname[80];
+	char *taf_load_buffer;
+	int16 direct_taf_ani;
+	// FIXME : was FILE*
+	void *CurrentTaf;
+	uint32 SpritePos[MAXSPRITE];
+
+	char *SoundBuffer;
+	uint32 SoundBufferSize;
+};
+
+#endif
diff --git a/engines/chewy/detection.cpp b/engines/chewy/detection.cpp
index d1df7dd3498..b58de96f9e9 100644
--- a/engines/chewy/detection.cpp
+++ b/engines/chewy/detection.cpp
@@ -64,11 +64,6 @@ static const ChewyGameDescription gameDescriptions[] = {
 	},
 
 	{
-		// Chewy - ESC von F5 - German
-		// Master version 1.1 (CHEWY.EXE - offset 0x8AB28)
-		// The source CD-ROM has the Matrix code SONOPRESS R-7885 B
-		// The disc contains several demos and files from 1996
-		// Provided by lotharsm
 		{
 			"chewy",
 			nullptr,
@@ -81,11 +76,6 @@ static const ChewyGameDescription gameDescriptions[] = {
 	},
 
 	{
-		// Chewy - ESC von F5 - German
-		// Master version 1.0 (CHEWY.EXE - offset 0x8AB10)
-		// The source CD-ROM has the Matrix code SONOPRESS M-2742 A
-		// CD-ROM has the label "CHEWY_V1_0"
-		// Provided by lotharsm
 		{
 			"chewy",
 			nullptr,
@@ -117,7 +107,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 	{ AD_TABLE_END_MARKER }
 };
 
-} // End of namespace Chewy
+} // namespace Chewy
 
 class ChewyMetaEngineDetection : public AdvancedMetaEngineDetection {
 public:
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
new file mode 100644
index 00000000000..1319d30f429
--- /dev/null
+++ b/engines/chewy/effect.cpp
@@ -0,0 +1,203 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/ngshext.h"
+#include "engines/chewy/effect.h"
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+
+effect::effect() {
+}
+effect::~effect() {
+}
+
+void effect::rnd_blende(char *rnd_speicher, char *sram_speicher,
+                        char *screen, char *palette, int16 col, int16 skip_line)
+
+{
+	int16 *rnd_zeiger;
+	int16 i, x, y;
+	char *sp;
+	sp = (char *)calloc(8 * 8 + 4, 1);
+	if (!modul) {
+		rnd_zeiger = (int16 *)rnd_speicher;
+		if (col < 256) {
+			for (i = 0; i < 1002; i++) {
+				y = (rnd_zeiger[i] / 40) * 8;
+				if (rnd_zeiger[i] > 39)
+					x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
+				else
+					x = rnd_zeiger[i] * 8;
+				out->skip_line(skip_line);
+				out->box_fill(x, y, x + 8, y + 8, col);
+			}
+			out->set_palette(palette);
+		}
+		for (i = 0; i < 1000; i++) {
+			y = (rnd_zeiger[i] / 40) * 8;
+			if (rnd_zeiger[i] > 39)
+				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
+			else
+				x = rnd_zeiger[i] * 8;
+			out->skip_line(skip_line);
+			out->setze_zeiger(sram_speicher);
+			out->sprite_save(sp, x, y, 8, 8, 0);
+			out->setze_zeiger(screen);
+			out->sprite_set(sp, x, y, 0);
+		}
+		free(sp);
+	}
+}
+
+void effect::blende1(char *sram_speicher, char *screen,
+                     char *palette, int16 frames, uint8 mode, int16 col) {
+
+	int16 i;
+	int16 x, y, x1, y1;
+	char *sp;
+	sp = (char *)calloc(8 * 8 + 4, 1);
+	if (!modul) {
+		i = 0;
+		if (col < 256) {
+			for (i = 0; i < 13; i++) {
+				for (x = i; x < 39 - i; x++)
+					out->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
+				for (y = i; y < 24 - i; y++)
+					out->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
+				for (x1 = 39 - i; x1 > i; x1--)
+					out->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
+				for (y1 = 24 - i; y1 >= i; y1--)
+					out->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
+				out->skip_line(frames);
+			}
+			out->set_palette(palette);
+		}
+		switch ((int16)mode) {
+
+		case 0:
+			for (i = 13; i >= 0; i--) {
+				for (x = i; x < 39 - i; x++) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x * 8, i * 8, 0);
+				}
+				for (y = i; y < 24 - i; y++) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x * 8, y * 8, 0);
+				}
+				for (x1 = 39 - i; x1 > i; x1--) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x1 * 8, y * 8, 0);
+				}
+				for (y1 = 24 - i; y1 > i; y1--) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
+				}
+				out->skip_line(frames);
+			}
+			break;
+
+		case 1:
+			for (i = 0; i < 13; i++) {
+				for (x = i; x < 39 - i; x++) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x * 8, i * 8, 0);
+				}
+				for (y = i; y < 24 - i; y++) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x * 8, y * 8, 0);
+				}
+				for (x1 = 39 - i; x1 > i; x1--) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x1 * 8, y * 8, 0);
+				}
+				for (y1 = 24 - i; y1 > i; y1--) {
+					out->setze_zeiger(sram_speicher);
+					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+					out->setze_zeiger(screen);
+					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
+				}
+				out->skip_line(frames);
+			}
+			break;
+
+		}
+		free(sp);
+	}
+}
+
+void effect::spr_blende(char *workpage_, char *ablage_,
+                        char *palette, int16 frames, int16 col) {
+	int16 i;
+	int16 x, y;
+	int16 zoomx, zoomy;
+	taf_info *spr;
+
+	spr = mem->taf_adr("cut/ch_blend.taf");
+	ERROR
+	x = 128;
+	y = 68;
+	zoomx = 128 * 2;
+	zoomy = 168 * 2;
+	out->set_clip(0, 0, 320, 200);
+
+	for (i = 0; i < 8; i++) {
+		out->box_fill(0, 0, 320, y - (zoomy / 2), 12);
+		out->box_fill(0, 0, x - (zoomx / 2), 200, 12);
+		out->box_fill(0, 200 - (y - (zoomy / 2)), 320, 200, 12);
+		out->box_fill(320 - (x - (zoomx / 2)), 0, 320, 200, 12);
+		out->scale_set(spr->image[0], x - (zoomx / 2), y - (zoomy / 2), zoomx, zoomy, 0);
+		zoomx -= ((128 * 2) / 6);
+		zoomy -= ((68 * 2) / 6);
+	}
+
+	out->box_fill(128, 68, 128 + 64, 68 + 64, 12);
+	out->set_palette(palette);
+	out->setze_zeiger(workpage_);
+
+	for (i = 0; i < 8; i++) {
+		out->map_spr2screen(ablage_, spieler.scrollx, spieler.scrolly);
+		out->scale_set(spr->image[0], x - (zoomx / 2), y - (zoomy / 2), zoomx, zoomy, 0);
+		out->box_fill(0, 0, 320, y - (zoomy / 2), 12);
+		out->box_fill(0, 0, x - (zoomx / 2), 200, 12);
+		out->box_fill(0, 200 - (y - (zoomy / 2)), 320, 200, 12);
+		out->box_fill(320 - (x - (zoomx / 2)), 0, 320, 200, 12);
+		zoomx += ((128 * 2) / 6);
+		zoomy += ((68 * 2) / 6);
+		out->back2screen(workpage_ - 4);
+	}
+	out->back2screen(workpage_ - 4);
+	free((char *)spr);
+}
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
new file mode 100644
index 00000000000..da07271e80f
--- /dev/null
+++ b/engines/chewy/effect.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_EFFECT_H
+#define CHEWY_EFFECT_H
+
+class effect {
+
+public:
+	effect();
+	~effect();
+
+	void blende1(char *sram_speicher, char *screen,
+	             char *palette, int16 frames, uint8 mode, int16 col);
+
+	void rnd_blende(char *rnd_speicher, char *sram_speicher,
+	                char *screen, char *palette, int16 col, int16 skip_line);
+
+	void spr_blende(char *workpage, char *ablage,
+	                char *palette, int16 frames, int16 col);
+
+private:
+
+};
+#endif
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
new file mode 100644
index 00000000000..d46808e0214
--- /dev/null
+++ b/engines/chewy/episode1.cpp
@@ -0,0 +1,3493 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "engines/chewy/defines.h"
+#include "engines/chewy/global.h"
+#include "engines/chewy/ani_dat.h"
+#include "engines/chewy/episode1.h"
+
+#define VOR 0
+#define RUECK 1
+#define SCHLAUCH1 11
+#define SCHLAUCH2 38
+#define SCHLAUCH3 59
+#define KOPF1 39
+#define KOPF2 46
+#define KOPF3 48
+#define KLAPPE_SPRITE 5
+#define SCHLEIM_DETAIL 2
+#define CH_ZIEHT_SCHLEIM 3
+#define CH_BLITZ 8
+#define TUER_DETAIL 9
+#define KLAPPE_DETAIL 10
+#define SCHLAUCH_DETAIL 11
+#define CH_WIRFT_SCHLEIM 12
+#define CH_NACH_FUETTERN 13
+#define CH_WIRFT_KISSEN 14
+#define FUETTER_SCHLAUCH 15
+#define STERNE_STEHEN 16
+#define ANI_HIDE 0
+#define ANI_SHOW 1
+int16 e_streifen;
+
+void load_chewy_taf(int16 taf_nr) {
+	taf_dateiheader *tafheader;
+	const char *fname_;
+	if (AkChewyTaf != taf_nr) {
+		if (chewy)
+			free((char *)chewy);
+		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
+		switch (taf_nr) {
+		case CHEWY_NORMAL:
+			fname_ = CHEWY_TAF;
+			chewy_ph_anz = chewy_phasen_anz;
+			chewy_ph = (uint8 *)chewy_phasen;
+			break;
+
+		case CHEWY_BORK:
+			fname_ = CHEWY_BO_TAF;
+			chewy_ph_anz = chewy_bo_phasen_anz;
+			chewy_ph = (uint8 *)chewy_bo_phasen;
+			break;
+
+		case CHEWY_MINI:
+			fname_ = CHEWY_MI_TAF;
+			chewy_ph_anz = chewy_mi_phasen_anz;
+			chewy_ph = (uint8 *)chewy_mi_phasen;
+			break;
+
+		case CHEWY_PUMPKIN:
+			fname_ = CHEWY_PUMP_TAF;
+			chewy_ph_anz = chewy_mi_phasen_anz;
+			chewy_ph = (uint8 *)chewy_mi_phasen;
+			break;
+
+		case CHEWY_ROCKER:
+			fname_ = CHEWY_ROCK_TAF;
+			chewy_ph_anz = chewy_ro_phasen_anz;
+			chewy_ph = (uint8 *)chewy_ro_phasen;
+			break;
+
+		case CHEWY_JMANS:
+			fname_ = CHEWY_JMAN_TAF;
+			chewy_ph_anz = chewy_ro_phasen_anz;
+			chewy_ph = (uint8 *)chewy_jm_phasen;
+			spieler_mi[P_CHEWY].HotY = 68;
+			break;
+
+		default:
+			fname_ = NULL;
+			break;
+
+		}
+		if (fname_ != NULL) {
+			spieler.ChewyAni = taf_nr;
+			AkChewyTaf = taf_nr;
+			chewy = mem->taf_adr(fname_);
+			ERROR
+			mem->file->get_tafinfo(fname_, &tafheader);
+			if (!modul) {
+				chewy_kor = chewy->korrektur;
+			} else {
+				error();
+			}
+		}
+	}
+}
+
+void r0_entry() {
+	set_person_pos(150, 100, P_CHEWY, P_RIGHT);
+	cur_hide_flag = false;
+	hide_cur();
+	spieler_vector[P_CHEWY].Delay = 5;
+	spieler.DelaySpeed = 5;
+	auto_move(1, P_CHEWY);
+	auto_move(7, P_CHEWY);
+	auto_move(1, P_CHEWY);
+	auto_move(7, P_CHEWY);
+	auto_move(9, P_CHEWY);
+	start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+	start_aad_wait(2, -1);
+	show_cur();
+}
+
+void r0_auge_start(int16 mode) {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	if (!mode)
+		adi->ani_count = adi->start_ani;
+	else
+		adi->ani_count = 38;
+
+	if (!mode) {
+
+		r0_ani_klappe_delay();
+	}
+	ende = 0;
+	flags.AniUserAction = true;
+	if (!mode) {
+
+		det->enable_sound(KLAPPE_DETAIL, 0);
+		det->disable_sound(KLAPPE_DETAIL, 1);
+		det->enable_sound(SCHLAUCH_DETAIL, 0);
+		det->disable_sound(SCHLAUCH_DETAIL, 2);
+	} else {
+
+		det->disable_sound(KLAPPE_DETAIL, 0);
+		det->enable_sound(KLAPPE_DETAIL, 1);
+		det->disable_sound(SCHLAUCH_DETAIL, 0);
+		det->enable_sound(SCHLAUCH_DETAIL, 2);
+	}
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count == 38) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		r0_calc_auge_click(3);
+		out->back2screen(workpage);
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			if (!mode) {
+				++adi->ani_count;
+				if (adi->ani_count > 38)
+					ende = 1;
+			} else {
+				--adi->ani_count;
+				if (adi->ani_count == adi->start_ani - 1)
+					ende = 1;
+			}
+		}
+	}
+	clear_prog_ani();
+	flags.AniUserAction = false;
+	if (mode) {
+		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
+		while (det->get_ani_status(KLAPPE_DETAIL))
+			set_ani_screen();
+	}
+}
+
+void r0_auge_wait() {
+	ani_detail_info *adi;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 39;
+	adi->delay_count = 15;
+
+	flags.AniUserAction = true;
+	while (adi->ani_count < 46) {
+		clear_prog_ani();
+
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[2].ZEbene = 192;
+		get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		r0_calc_auge_click(2);
+		out->back2screen(workpage);
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			++adi->ani_count;
+		}
+	}
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void r0_calc_auge_click(int16 ani_nr) {
+	int16 anz;
+	int16 x, y;
+	int16 i;
+
+	if (mouse_on_prog_ani() == ani_nr) {
+		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
+			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
+			if (str_ != 0) {
+				out->set_fontadr(font8x8);
+				out->set_vorschub(fvorx8x8, fvory8x8);
+				x = minfo.x;
+				y = minfo.y;
+				calc_txt_xy(&x, &y, str_, anz);
+				for (i = 0; i < anz; i++)
+					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+			}
+		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			if (is_cur_inventar(SCHLEIM_INV)) {
+				del_inventar(spieler.AkInvent);
+				spieler.R0SchleimWurf = 1;
+			} else if (is_cur_inventar(KISSEN_INV)) {
+
+				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
+			}
+		}
+	}
+}
+
+void r0_auge_shoot() {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 47;
+
+	ende = 0;
+	det->start_detail(CH_BLITZ, 1, VOR);
+	while (!ende) {
+		clear_prog_ani();
+		spieler.PersonHide[P_CHEWY] = true;
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		if (adi->ani_count < 53) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		} else {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+			if (!det->get_ani_status(CH_BLITZ))
+				ende = 1;
+		}
+		set_up_screen(DO_SETUP);
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			++adi->ani_count;
+		}
+	}
+	det->start_detail(STERNE_STEHEN, 255, VOR);
+	clear_prog_ani();
+	spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+	spr_info[0].ZEbene = 190;
+	spr_info[1] =
+	    det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+	spr_info[1].ZEbene = 191;
+	spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+	spr_info[2].ZEbene = 192;
+	wait_show_screen(30);
+	clear_prog_ani();
+	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+	spieler.PersonHide[P_CHEWY] = false;
+}
+
+void r0_auge_schleim_back() {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 53;
+
+	ende = 0;
+	flags.AniUserAction = true;
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count == 61) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		set_ani_screen();
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			++adi->ani_count;
+			if (adi->ani_count == 77)
+				ende = 1;
+		}
+	}
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void r0_ch_schleim_auge() {
+	ani_detail_info *adi;
+
+	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);


Commit: 652db4113f111320fd733ebdf372a7ca824d9eae
    https://github.com/scummvm/scummvm/commit/652db4113f111320fd733ebdf372a7ca824d9eae
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:39-08:00

Commit Message:
CHEWY: Have error method trigger ScummVM error

Changed paths:
    engines/chewy/fehler.h
    engines/chewy/inits.cpp


diff --git a/engines/chewy/fehler.h b/engines/chewy/fehler.h
index 9292a89e948..b749107fcbd 100644
--- a/engines/chewy/fehler.h
+++ b/engines/chewy/fehler.h
@@ -36,7 +36,7 @@ public:
 
 	void msg();
 	void set_user_msg(const char *msg);
-
+	Common::String get_user_msg() const { return user_msg; }
 private:
 	char err_txt[120];
 	char err_dat[80];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 53530f59756..49bab192214 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -359,10 +359,12 @@ void error() {
 	in->alter_kb_handler();
 	out->rest_palette();
 	out->restore_mode();
+
+	Common::String msg = err->get_user_msg();
 	err->msg();
 	tidy();
-	// FIXME
 
+	error("%s", msg.c_str());
 }
 
 void tidy() {
@@ -390,6 +392,25 @@ void tidy() {
 	delete err;
 	delete out;
 	delete mem;
+
+	iog = nullptr;
+	cur = nullptr;
+	mov = nullptr;
+	flc = nullptr;
+	ailsnd = nullptr;
+	atds = nullptr;
+	det = nullptr;
+	uhr = nullptr;
+	obj = nullptr;
+	room = nullptr;
+	ged = nullptr;
+	bit = nullptr;
+	txt = nullptr;
+	fx = nullptr;
+	in = nullptr;
+	err = nullptr;
+	out = nullptr;
+	mem = nullptr;
 }
 
 void set_speed() {


Commit: b655cd5a3fa16175f8e7d79e3f4a29f6a29eaf67
    https://github.com/scummvm/scummvm/commit/b655cd5a3fa16175f8e7d79e3f4a29f6a29eaf67
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:39-08:00

Commit Message:
CHEWY: Fix relative engine paths

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/ani_dat.cpp
    engines/chewy/atds.cpp
    engines/chewy/ch_icm.cpp
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/debug.cpp
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/effect.cpp
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/episode4.cpp
    engines/chewy/fehler.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/maus.cpp
    engines/chewy/maus.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/menus.cpp
    engines/chewy/movclass.cpp
    engines/chewy/ngshext.h
    engines/chewy/ngstypes.h
    engines/chewy/objekte.cpp
    engines/chewy/objekte.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/text.cpp
    engines/chewy/timer.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index c7827005f98..f7c0667402e 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -25,9 +25,9 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fread
 #define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/ailclass.h"
-#include "engines/chewy/ngshext.h"
+#include "chewy/chewy.h"
+#include "chewy/ailclass.h"
+#include "chewy/ngshext.h"
 
 #define MAX_VOICES 8
 #define NORMAL_PLAYBACK 0
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index b7725d582ed..b97f3d27d19 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_AILCLASS_H
 #define CHEWY_AILCLASS_H
 
-#include "engines/chewy/ngstypes.h"
+#include "chewy/ngstypes.h"
 
 void mod_irq();
 void check_sample_end();
diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index b98cf98bbd2..de112fe6280 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index fe7b2202d86..77fa269c4bf 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -28,10 +28,10 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/atds.h"
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/ngshext.h"
+#include "chewy/atds.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 extern char *err_str;
 int16 mouse_push;
 
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index e9bc3d25242..db0f8ae002d 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -20,11 +20,11 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 #ifdef ICM
-#include "engines/chewy/ch_icm.h"
+#include "chewy/ch_icm.h"
 int16 maus_rect_first;
 int16 koordinate[4] = {0};
 int16 last_debug_ani;
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 93803911c7d..88659f2ae8a 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "engines/chewy/cursor.h"
+#include "chewy/cursor.h"
 #include "common/textconsole.h"
 
 #define false false
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 7290d3e56b2..013fd9a66f3 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_CURSOR_H
 #define CHEWY_CURSOR_H
 
-#include "engines/chewy/mcga.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/mcga.h"
+#include "chewy/ngstypes.h"
 
 extern int16 scr_w;
 
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 255ccb38d0c..4c0fdf0073f 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -34,7 +34,7 @@
 
 
 #include "common/debug.h"
-#include "engines/chewy/datei.h"
+#include "chewy/datei.h"
 #define GRAFIK 1
 #define SPEICHER 2
 #define DATEI 3
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 9d5931c3c2a..7d6b7343317 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_DATEI_H
 #define CHEWY_DATEI_H
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/chewy.h"
+#include "chewy/ngstypes.h"
 
 class datei {
 public:
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
index e4c96353698..2ca68e29927 100644
--- a/engines/chewy/debug.cpp
+++ b/engines/chewy/debug.cpp
@@ -20,9 +20,9 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/debug.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/debug.h"
 
 void look_debug_action(int16 key_nr) {
 	int16 ende;
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 9f61e25a4ff..efc482824f1 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -26,8 +26,8 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fseek
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/detail.h"
-#include "engines/chewy/global.h"
+#include "chewy/detail.h"
+#include "chewy/global.h"
 
 detail::detail() {
 	char *tptr;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 4b6976dee6e..fae63d73955 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_DETAIL_H
 #define CHEWY_DETAIL_H
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/defines.h"
+#include "chewy/ngshext.h"
+#include "chewy/defines.h"
 
 #define SAVE_ROOM 0
 #define RESTORE_ROOM 1
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 1319d30f429..88ef74056b3 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/effect.h"
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/ngshext.h"
+#include "chewy/effect.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 effect::effect() {
 }
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index d46808e0214..db62196b350 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/ani_dat.h"
-#include "engines/chewy/episode1.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/episode1.h"
 
 #define VOR 0
 #define RUECK 1
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 09cd4569720..3d2fac98ba5 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/ani_dat.h"
-#include "engines/chewy/episode2.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/episode2.h"
 
 void calc_person_look() {
 	int16 i;
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 9cb3d30135b..2835abcc7e8 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/ani_dat.h"
-#include "engines/chewy/episode3.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/episode3.h"
 
 int16 r45_delay;
 int16 r50Wasser;
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 0fbfa66a596..0b5f8320b32 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/ani_dat.h"
-#include "engines/chewy/episode4.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/episode4.h"
 
 int16 r68HohesC;
 
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
index cc313a36e0c..47ba4f754f8 100644
--- a/engines/chewy/fehler.cpp
+++ b/engines/chewy/fehler.cpp
@@ -28,8 +28,8 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
 #include "common/system.h"
-#include "engines/chewy/fehler.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/fehler.h"
+#include "chewy/ngstypes.h"
 
 fehler *err;
 
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 895d169eb71..7a88f7f9ec9 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -29,8 +29,8 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 int16 file_icons[8 * 4] = { 14, 73, 32, 94,
                             14, 96, 32, 118,
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index c634b95053b..d2f45d8b8a2 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -27,7 +27,7 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
 #include "common/system.h"
-#include "engines/chewy/flic.h"
+#include "chewy/flic.h"
 
 void decode_flc(char *vscr, char *dbuf) {
 	warning("STUB: decode_flc()");
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 148508ffd25..79d744a5b36 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_FLIC_H
 #define CHEWY_FLIC_H 1
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/ngshext.h"
+#include "chewy/ngstypes.h"
 
 #define taste error("aborted")
 
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index b9f4831e438..a6b3471fcd8 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/gedclass.h"
+#include "chewy/chewy.h"
+#include "chewy/gedclass.h"
 
 	gedclass::gedclass(int16(*user_func)(int16 idx_nr)) {
 		warning("STUB - missing constructor gedclass");
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 4ab4952255a..2e68f158ec6 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_GEDCLASS_H
 #define CHEWY_GEDCLASS_H
 
-#include "engines/chewy/ngstypes.h"
+#include "chewy/ngstypes.h"
 
 class gedclass {
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index a04e9a8178b..1702172cf4c 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -20,23 +20,23 @@
  *
  */
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/types.h"
-#include "engines/chewy/defines.h"
-#include "engines/chewy/ngshext.h"
-
-#include "engines/chewy/objekt.h"
-#include "engines/chewy/text.h"
-#include "engines/chewy/room.h"
-#include "engines/chewy/objekte.h"
-#include "engines/chewy/timer.h"
-#include "engines/chewy/detail.h"
-#include "engines/chewy/effect.h"
-#include "engines/chewy/atds.h"
-#include "engines/chewy/movclass.h"
-#include "engines/chewy/gedclass.h"
-#include "engines/chewy/bitclass.h"
-#include "engines/chewy/ailclass.h"
+#include "chewy/chewy.h"
+#include "chewy/types.h"
+#include "chewy/defines.h"
+#include "chewy/ngshext.h"
+
+#include "chewy/objekt.h"
+#include "chewy/text.h"
+#include "chewy/room.h"
+#include "chewy/objekte.h"
+#include "chewy/timer.h"
+#include "chewy/detail.h"
+#include "chewy/effect.h"
+#include "chewy/atds.h"
+#include "chewy/movclass.h"
+#include "chewy/gedclass.h"
+#include "chewy/bitclass.h"
+#include "chewy/ailclass.h"
 
 #define MAX_RAND_NO_USE 6
 uint8 rand_no_use[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1085073a19e..1164097e04b 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -23,18 +23,18 @@
 #ifndef CHEWY_GLOBAL_H
 #define CHEWY_GLOBAL_H
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/types.h"
-#include "engines/chewy/atds.h"
-#include "engines/chewy/room.h"
-#include "engines/chewy/movclass.h"
-#include "engines/chewy/timer.h"
-#include "engines/chewy/gedclass.h"
-#include "engines/chewy/bitclass.h"
-#include "engines/chewy/text.h"
-#include "engines/chewy/objekte.h"
-#include "engines/chewy/effect.h"
-#include "engines/chewy/ailclass.h"
+#include "chewy/chewy.h"
+#include "chewy/types.h"
+#include "chewy/atds.h"
+#include "chewy/room.h"
+#include "chewy/movclass.h"
+#include "chewy/timer.h"
+#include "chewy/gedclass.h"
+#include "chewy/bitclass.h"
+#include "chewy/text.h"
+#include "chewy/objekte.h"
+#include "chewy/effect.h"
+#include "chewy/ailclass.h"
 
 #define MAX_RAND_NO_USE 6
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 49bab192214..bbe5949372b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -25,8 +25,8 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fclose
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 extern int16 room_start_nr;
 
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index de37384dfc4..33d72c94b53 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -29,7 +29,7 @@
 
 #include "common/system.h"
 
-#include "engines/chewy/io_game.h"
+#include "chewy/io_game.h"
 extern int16 scr_w;
 
 io_game::io_game(mcga_grafik *iout, maus *iin, cursor *curp) {
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index acf0ea30913..17a43c7635e 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -23,9 +23,9 @@
 #ifndef CHEWY_IOGAME_H
 #define CHEWY_IOGAME_H
 
-#include "engines/chewy/mcga.h"
-#include "engines/chewy/cursor.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/mcga.h"
+#include "chewy/cursor.h"
+#include "chewy/ngstypes.h"
 
 #ifdef ENGLISCH
 
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 8f2c5ced73d..7a80553d618 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 #define NORMAL_PLAY 0
 #define SEQUENCE_PLAY 1
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 86635114b94..e050cdebf68 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -22,9 +22,9 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_rand
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/main.h"
-#include "engines/chewy/menus.h"
+#include "chewy/ngshext.h"
+#include "chewy/main.h"
+#include "chewy/menus.h"
 
 #define AUSGANG_CHECK_PIX 8
 #define BLENDE1 1
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index b8a3060adee..aee03a93864 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -26,8 +26,8 @@
 #include "graphics/surface.h"
 #include "common/rect.h"
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 void game_main();
 void free_buffers();
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 574da7c8778..6f03c2fd34f 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include "engines/chewy/maus.h"
+#include "chewy/maus.h"
 #include "common/textconsole.h"
 
 // FIXME. Externals
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index 9b3c8a1ca56..8bf2bd2fcf2 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_MAUS_H
 #define CHEWY_MAUS_H
 
-#include "engines/chewy/ngstypes.h"
+#include "chewy/ngstypes.h"
 
 void set_new_kb_handler(kb_info *key);
 void set_old_kb_handler();
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 86422de6bc1..27ef73ff93d 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/mcga.h"
+#include "chewy/chewy.h"
+#include "chewy/mcga.h"
 
 #define SETZEN 0
 #define UND 1
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 5dded35d042..a90a9750169 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_MCGA_H
 #define CHEWY_MCGA_H
 
-#include "engines/chewy/maus.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/maus.h"
+#include "chewy/ngstypes.h"
 
 extern uint8 svga;
 
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index eec2e80fc2d..3d59e567cb4 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -27,7 +27,7 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fclose
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/memory.h"
+#include "chewy/memory.h"
 
 extern int16 modul;
 extern int16 fcode;
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index 0bc2812bc2f..3274a2b3b68 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -23,8 +23,8 @@
 #ifndef CHEWY_MEMORY_H
 #define CHEWY_MEMORY_H
 
-#include "engines/chewy/datei.h"
-#include "engines/chewy/ngstypes.h"
+#include "chewy/datei.h"
+#include "chewy/ngstypes.h"
 
 class memory {
 public:
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index f481575ecaf..090c2fdb467 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -20,9 +20,9 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/menus.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/menus.h"
 
 void r44_look_news();
 void r58_look_cut_mag(int16 r_nr);
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 1b604a35760..caadf37f54f 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -20,10 +20,10 @@
  *
  */
 
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/movclass.h"
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/ngshext.h"
+#include "chewy/movclass.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 #define LEFT_VECT -1
 #define RIGHT_VECT 1
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 1fd843bf7d4..360d08b66f8 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -23,16 +23,16 @@
 #ifndef CHEWY_NGSHEXT_H
 #define CHEWY_NGSHEXT_H
 
-#include "engines/chewy/memory.h"
-#include "engines/chewy/mcga.h"
-#include "engines/chewy/fehler.h"
-#include "engines/chewy/maus.h"
-
-#include "engines/chewy/io_game.h"
-#include "engines/chewy/cursor.h"
-#include "engines/chewy/flic.h"
+#include "chewy/memory.h"
+#include "chewy/mcga.h"
+#include "chewy/fehler.h"
+#include "chewy/maus.h"
+
+#include "chewy/io_game.h"
+#include "chewy/cursor.h"
+#include "chewy/flic.h"
 #ifdef AIL
-#include "engines/chewy/ailclass.h"
+#include "chewy/ailclass.h"
 #endif
 
 #define MAXPFAD 81
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 67318d34f04..bdda85b1248 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_NGSTYPES_H
 #define CHEWY_NGSTYPES_H
 
-#include "engines/chewy/ngsdefs.h"
+#include "chewy/ngsdefs.h"
 #include "common/scummsys.h"
 
 typedef struct {
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 717a1fc214d..289abb84676 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -25,10 +25,10 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fread
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/ngshext.h"
-#include "engines/chewy/objekte.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ngshext.h"
+#include "chewy/objekte.h"
 
 int16 action_obj_tbl[] = {
 
diff --git a/engines/chewy/objekte.h b/engines/chewy/objekte.h
index 6bfdb044794..d5686137599 100644
--- a/engines/chewy/objekte.h
+++ b/engines/chewy/objekte.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_OBJEKTE_H
 #define CHEWY_OBJEKTE_H
 
-#include "engines/chewy/objekt.h"
+#include "chewy/objekt.h"
 
 #define ENDLOS_FLIP_FLOP 255
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index de05a47623b..943f53cc4c6 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -31,14 +31,14 @@
 
 #include "common/system.h"
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-
-#include "engines/chewy/ani_dat.h"
-#include "engines/chewy/episode1.h"
-#include "engines/chewy/episode2.h"
-#include "engines/chewy/episode3.h"
-#include "engines/chewy/episode4.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+
+#include "chewy/ani_dat.h"
+#include "chewy/episode1.h"
+#include "chewy/episode2.h"
+#include "chewy/episode3.h"
+#include "chewy/episode4.h"
 
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 9fb7a521675..72bb27e9f65 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -26,10 +26,10 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_fseek
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
-#include "engines/chewy/room.h"
-#include "engines/chewy/ngshext.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/room.h"
+#include "chewy/ngshext.h"
 
 Room::Room() {
 	int16 i;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index a1705f491fc..5711003e74c 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_RAUM_H
 #define CHEWY_RAUM_H
 
-#include "engines/chewy/objekt.h"
+#include "chewy/objekt.h"
 
 #define MAX_ABLAGE 4
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 1dc5f0dbe2a..99cd469f892 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -20,8 +20,8 @@
  *
  */
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
 #define ZOBJ_ANI_DETAIL 1
 #define ZOBJ_STATIC_DETAIL 2
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 9d6e06f1272..838a85d9f0f 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -20,15 +20,15 @@
  *
  */
 
-#include "engines/chewy/chewy.h"
+#include "chewy/chewy.h"
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/global.h"
+#include "chewy/defines.h"
+#include "chewy/global.h"
 
-#include "engines/chewy/episode1.h"
-#include "engines/chewy/episode2.h"
-#include "engines/chewy/episode3.h"
-#include "engines/chewy/episode4.h"
+#include "chewy/episode1.h"
+#include "chewy/episode2.h"
+#include "chewy/episode3.h"
+#include "chewy/episode4.h"
 
 int16 load_ads_dia(int16 dia_nr) {
 	int16 ret = false;
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 4310fd30487..02fea4eaf2a 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -21,7 +21,7 @@
  */
 
 #include "common/system.h"
-#include "engines/chewy/text.h"
+#include "chewy/text.h"
 
 text::text() {
 }
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 495cc90cfe4..39afc93d253 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -20,9 +20,9 @@
  *
  */
 
-#include "engines/chewy/chewy.h"
-#include "engines/chewy/timer.h"
-#include "engines/chewy/defines.h"
+#include "chewy/chewy.h"
+#include "chewy/timer.h"
+#include "chewy/defines.h"
 
 static int16 timer_flag;
 static int16 timer_int;
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index b57110a9600..71a3bac9419 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -23,9 +23,9 @@
 #ifndef CHEWY_TYPES_H
 #define CHEWY_TYPES_H
 
-#include "engines/chewy/defines.h"
-#include "engines/chewy/objekt.h"
-#include "engines/chewy/detail.h"
+#include "chewy/defines.h"
+#include "chewy/objekt.h"
+#include "chewy/detail.h"
 
 typedef struct {
 	uint8 Ats[ROOM_ATS_MAX * 3];


Commit: 996e0ebcd562ceba9ffca95fe99ba02399557139
    https://github.com/scummvm/scummvm/commit/996e0ebcd562ceba9ffca95fe99ba02399557139
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:39-08:00

Commit Message:
CHEWY: Convert get_tafinfo to use ScummVM File

Changed paths:
  A engines/chewy/ngstypes.cpp
    engines/chewy/datei.cpp
    engines/chewy/module.mk
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 4c0fdf0073f..f804cc1569e 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -34,7 +34,9 @@
 
 
 #include "common/debug.h"
+#include "common/file.h"
 #include "chewy/datei.h"
+
 #define GRAFIK 1
 #define SPEICHER 2
 #define DATEI 3
@@ -1580,28 +1582,24 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 }
 
 uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
-	FILE *tafhandle;
+	Common::File tafFile;
 	uint32 size = 0;
-	int16 id, i;
+	int16 id;
 	taf_dateiheader *tdh;
 	tdh = (taf_dateiheader *)tmp;
 	*tafheader = tdh;
-	for (i = 0; (i < MAXPATH - 4) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	i = 0;
-	if ((filename[i]) == 0)
+
+	strncpy(filename, fname, MAXPATH - 4);
+	filename[MAXPATH - 4] = '\0';
+
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
+
 	if (!strchr(filename, '.'))
-		strcat(filename, ".TAF\0");
-	correct_fname(filename);
-	tafhandle = 0;
-	tafhandle = fopen(filename, "rb");
-	if (tafhandle) {
-		if (!(fread(tdh, sizeof(taf_dateiheader), 1, tafhandle))) {
-			fcode = READFEHLER;
-			modul = DATEI;
-		} else {
+		strcat(filename, ".taf");
+
+	if (tafFile.open(filename)) {
+		if (tdh->load(&tafFile)) {
 			id = get_id(tdh->id);
 			if ((id == TAFDATEI) && (tdh->mode == 19)) {
 				size = tdh->allsize + (((uint32)tdh->count) * 8l);
@@ -1612,15 +1610,20 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 				modul = DATEI;
 				size = 0;
 			}
+		} else {
+			fcode = NOTTBF;
+			modul = DATEI;
+			size = 0;
 		}
-		fclose(tafhandle);
-	}
-	else {
+
+		tafFile.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 		size = 0;
 	}
-	return (size);
+
+	return size;
 }
 
 void datei::load_palette(const char *fname, char *palette, int16 typ) {
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index eb3d2f68b01..68236a32460 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -30,6 +30,7 @@ MODULE_OBJS = \
 	menus.o \
 	metaengine.o \
 	movclass.o \
+	ngstypes.o \
 	objekte.o \
 	r_event.o \
 	room.o \
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
new file mode 100644
index 00000000000..fff1d7377b1
--- /dev/null
+++ b/engines/chewy/ngstypes.cpp
@@ -0,0 +1,35 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/ngstypes.h"
+
+bool taf_dateiheader::load(Common::ReadStream *src) {
+	src->read(id, 4);
+	mode = src->readSint16LE();
+	count = src->readSint16LE();
+	allsize = src->readUint32LE();
+	src->read(palette, 768);
+	next = src->readUint32LE();
+	korrekt = src->readSint16LE();
+
+	return true;
+}
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index bdda85b1248..a9a79e16f12 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -24,7 +24,7 @@
 #define CHEWY_NGSTYPES_H
 
 #include "chewy/ngsdefs.h"
-#include "common/scummsys.h"
+#include "common/stream.h"
 
 typedef struct {
 	uint32 Len;
@@ -68,7 +68,7 @@ typedef struct {
 	char palette [768];
 } tbf_dateiheader;
 
-typedef struct {
+struct taf_dateiheader {
 	char id[4];
 	int16 mode;
 	int16 count;
@@ -76,7 +76,9 @@ typedef struct {
 	char palette[768];
 	uint32 next;
 	int16 korrekt;
-} taf_dateiheader;
+
+	bool load(Common::ReadStream *src);
+};
 
 typedef struct {
 	int16 komp;


Commit: 507538a6a4603c3f02a37898727d03b97803bdb0
    https://github.com/scummvm/scummvm/commit/507538a6a4603c3f02a37898727d03b97803bdb0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:40-08:00

Commit Message:
CHEWY: Fix compiler warnings

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/datei.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/movclass.cpp
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 77fa269c4bf..0bbb0cc5282 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -309,7 +309,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chun
 			switch (mode) {
 			case INV_USE_DATEI:
 				mem->file->select_pool_item(atdshandle[mode], atdspooloff[mode]);
-				fseek((FILE *)atdshandle[mode], -(sizeof(ChunkHead)), SEEK_CUR);
+				fseek((FILE *)atdshandle[mode], -(int)(sizeof(ChunkHead)), SEEK_CUR);
 
 				if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[mode])) {
 					modul = DATEI;
@@ -339,7 +339,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chun
 
 void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 	FILE *handle;
-	char *tmp_adr;
+	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname_, 0, 20000);
@@ -395,7 +395,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	txt_adr = atdsmem[mode];
 	if (handle && txt_adr) {
 		mem->file->select_pool_item(handle, chunk_nr + atdspooloff[mode]);
-		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!fread(&Ch, sizeof(ChunkHead), 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -422,7 +422,7 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	if (atdshandle[ADH_HANDLE]) {
 		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
 
-		fseek((FILE *)atdshandle[ADH_HANDLE], -sizeof(ChunkHead), SEEK_CUR);
+		fseek((FILE *)atdshandle[ADH_HANDLE], -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[ADH_HANDLE])) {
 			modul = DATEI;
 			fcode = READFEHLER;
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index f804cc1569e..617f09f4292 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -298,7 +298,7 @@ uint16 datei::select_pool_item(void *h, uint16 nr) {
 			if (!strncmp(ph->id, "NGS", 3)) {
 				if (nr >= ph->PoolAnz)
 					nr = ph->PoolAnz - 1;
-				fseek(handle, -((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+				fseek(handle, -(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
 				if (!(fread(&tmp1, sizeof(uint32), 1, handle))) {
 					modul = DATEI;
 					fcode = READFEHLER;
@@ -352,7 +352,7 @@ void datei::load_tafmcga(const char *fname, char *sp, int16 nr) {
 						}
 					}
 					else {
-						fseek(handle, (-((header->count - nr)*sizeof(uint32))), SEEK_END);
+						fseek(handle, (-(int)((header->count - nr)*sizeof(uint32))), SEEK_END);
 						if (!fread(&next, sizeof(uint32), 1, handle)) {
 							fcode = READFEHLER;
 							modul = DATEI;
@@ -491,7 +491,7 @@ void datei::load_korrektur(const char *fname, char *sp) {
 			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
-					fseek(handle, -((header->count * sizeof(uint32))*header->korrekt), SEEK_END);
+					fseek(handle, -((int)(header->count * sizeof(uint32))*header->korrekt), SEEK_END);
 					if (!fread(speicher, header->count * sizeof(uint32), 1, handle)) {
 						fcode = READFEHLER;
 						modul = DATEI;
@@ -761,7 +761,7 @@ uint32 datei::load_voc(void *h, char *speicher) {
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
 	if (handle) {
-		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -868,7 +868,7 @@ uint32 datei::load_item(void *h, char *speicher) {
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
 	if (handle) {
-		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -885,7 +885,7 @@ uint32 datei::load_item(void *h, char *speicher) {
 
 uint32 datei::load_tmf(char *fname, tmf_header *th) {
 	FILE *handle;
-	uint32 size;
+	uint32 size = 0;
 	char *speicher;
 	int16 ok, i;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -954,7 +954,7 @@ uint32 datei::load_tmf(void *h, tmf_header *song) {
 	ch = (ChunkHead *) tmp;
 	speicher = (char *)song;
 	if (handle) {
-		fseek(handle, -sizeof(ChunkHead), SEEK_CUR);
+		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -1558,7 +1558,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 		} else {
 			if (!strncmp(Nph->id, "NGS", 3)) {
 				select_pool_item(handle, chunk_start);
-				fseek(handle, -(sizeof(ChunkHead)), SEEK_CUR);
+				fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
 				        && i < (chunk_start + chunk_anz); i++) {
 					if (!fread(&ch, sizeof(ChunkHead), 1, handle)) {
@@ -1767,7 +1767,7 @@ void datei::load_palette(void *h, char *palette) {
 				if (format != -1) {
 					for (i = 0; i < 768; i++)
 						palette[i] = header->palette[i];
-					fseek(handle, -sizeof(tbf_dateiheader), SEEK_CUR);
+					fseek(handle, -(int)sizeof(tbf_dateiheader), SEEK_CUR);
 				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index bbe5949372b..6bbf2660732 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -31,10 +31,6 @@
 extern int16 room_start_nr;
 
 void standard_init() {
-	int16 lw_err;
-	uint16 lw;
-	uint16 dummy = 3;
-
 	mem = new memory;
 	out = new mcga_grafik;
 	err = new fehler;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e050cdebf68..e89bc7587fd 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -715,7 +715,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 	int16 x;
 	int16 y;
 	int16 i;
-	int16 anz;
+	int16 anz = 0;
 	char *str_adr;
 	str_adr = 0;
 
@@ -1364,8 +1364,8 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 	int16 ret;
 	int16 anz;
 	int16 i;
-	int16 txt_nr;
-	int16 txt_mode;
+	int16 txt_nr = 0;
+	int16 txt_mode = 0;
 	int16 ok;
 	bool disp_flag;
 	bool action_flag;
@@ -1493,7 +1493,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 int16 is_mouse_person(int16 x, int16 y) {
 	int16 is_person;
 	int16 i;
-	int16 *xy;
+	int16 *xy = nullptr;
 	int16 check;
 	is_person = -1;
 	if (flags.ShowAtsInvTxt) {
@@ -1539,7 +1539,7 @@ void calc_mouse_person(int16 x, int16 y) {
 	int16 txt_nr;
 	int16 def_nr;
 	int16 dia_nr;
-	int16 mode;
+	int16 mode = 0;
 	int16 p_nr;
 	char ch_txt[MAX_PERSON][9] = {"Chewy", "Howard", "Nichelle"};
 	dia_nr = -1;
@@ -2059,23 +2059,23 @@ ChewyFont::ChewyFont(Common::String filename) {
 
 	_fontSurface.create(_dataWidth * _count, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
 
-	byte cur;
+	byte curr;
 	int bitIndex = 7;
 	byte *p;
 
-	cur = stream.readByte();
+	curr = stream.readByte();
 
 	for (uint n = 0; n < _count; n++) {
 		for (uint y = 0; y < _dataHeight; y++) {
 			p = (byte *)_fontSurface.getBasePtr(n * _dataWidth, y);
 
 			for (uint x = n * _dataWidth; x < n * _dataWidth + _dataWidth; x++) {
-				*p++ = (cur & (1 << bitIndex)) ? 0 : 0xFF;
+				*p++ = (curr & (1 << bitIndex)) ? 0 : 0xFF;
 
 				bitIndex--;
 				if (bitIndex < 0) {
 					bitIndex = 7;
-					cur = stream.readByte();
+					curr = stream.readByte();
 				}
 			}
 		}
@@ -2109,4 +2109,4 @@ void ChewyFont::setDeltaX(uint16 deltaX) {
 
 ::Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
 	return _font->getLine(texts);
-}
\ No newline at end of file
+}
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 27ef73ff93d..99cc1325b69 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -572,7 +572,7 @@ void mcga_grafik::set_fontadr(char *adr) {
 
 int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
                           const char *string, ...) {
-	int16 i, j, stelle, stellemax, mode;
+	int16 i, j, stelle, stellemax, mode = 0;
 	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
 	int16 ret = 0;
 	int16 delay_flag;
@@ -583,11 +583,11 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	uint16 vorzeichen = 0;
 	char x_mode = 0;
 	char eing = 0;
-	uint16 izahl;
-	uint16 *intzahl;
-	int16 *intzahl1;
-	uint32 *longzahl;
-	char *charstr;
+	uint16 izahl = 0;
+	uint16 *intzahl = nullptr;
+	int16 *intzahl1 = nullptr;
+	uint32 *longzahl = nullptr;
+	char *charstr = nullptr;
 	uint32 luzahl;
 	va_list parptr;
 	va_start(parptr, string);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 3d59e567cb4..3d501606a4b 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -95,7 +95,7 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 		id = file->get_id(header.id);
 		if (id == TAFDATEI) {
 			if (header.korrekt > 1) {
-				fseek(handle, (-((header.count - image_start)*sizeof(uint32))), SEEK_END);
+				fseek(handle, (-(int)((header.count - image_start)*sizeof(uint32))), SEEK_END);
 				if (!fread(&ptr, sizeof(uint32), 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
@@ -142,7 +142,7 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 								}
 							}
 							if (!modul) {
-								fseek(handle, (-(((header.count * 2) - image_start)*sizeof(uint32))), SEEK_END);
+								fseek(handle, (-(int)(((header.count * 2) - image_start)*sizeof(uint32))), SEEK_END);
 								if (!fread(ts_info->korrektur, image_anz * 4, 1, handle)) {
 									{
 										fcode = READFEHLER;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 090c2fdb467..e504aee5c11 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -475,16 +475,16 @@ void invent_menu() {
 int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 	int16 ende;
 	int16 txt_start;
-	int16 txt_anz;
+	int16 txt_anz = 0;
 	int16 maus_flag;
 	int16 i, k;
 	int16 ret;
-	int16 xoff;
-	int16 yoff;
-	int16 txt_zeilen;
+	int16 xoff = 0;
+	int16 yoff = 0;
+	int16 txt_zeilen = 0;
 	int16 rect;
-	char *txt_adr;
-	char *txt_name_adr;
+	char *txt_adr = nullptr;
+	char *txt_name_adr = nullptr;
 	char c[2] = {0};
 	ret = -1;
 	ende = 0;
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index caadf37f54f..1bcf370f640 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -521,9 +521,9 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 	int16 found_min;
 	int16 TmpKnPkt[MAX_KNOTEN_PKT];
 	int16 min_step_unerreicht;
-	int16 dir_unerreicht;
+	int16 dir_unerreicht = 0;
 	int16 KnPkt_unrreicht[MAX_KNOTEN_PKT];
-	int16 feld_unerreicht;
+	int16 feld_unerreicht = 0;
 	int16 knoten_felder[MAX_KNOTEN_PKT][6];
 
 	int16 ak_knoten;
@@ -669,7 +669,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 					found = 1;
 					if (mle.FNr == -1) {
 						mle.Steps = min_step_unerreicht;
-						mle.FNr = feld_unerreicht ;
+						mle.FNr = feld_unerreicht;
 						mle.Direction = dir_unerreicht;
 						for (i = 0; i < MAX_KNOTEN_PKT; i++)
 							mle.KnPkt[i] = KnPkt_unrreicht[i];
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index a9a79e16f12..92d53a83d39 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -69,24 +69,24 @@ typedef struct {
 } tbf_dateiheader;
 
 struct taf_dateiheader {
-	char id[4];
-	int16 mode;
-	int16 count;
-	uint32 allsize;
+	char id[4] = { 0 };
+	int16 mode = 0;
+	int16 count = 0;
+	uint32 allsize = 0;
 	char palette[768];
-	uint32 next;
-	int16 korrekt;
+	uint32 next = 0;
+	int16 korrekt = 0;
 
 	bool load(Common::ReadStream *src);
 };
 
-typedef struct {
-	int16 komp;
-	uint16 width;
-	uint16 height;
-	uint32 next;
-	uint32 image;
-} taf_imageheader;
+struct taf_imageheader {
+	int16 komp = 0;
+	uint16 width = 0;
+	uint16 height = 0;
+	uint32 next = 0;
+	uint32 image = 0;
+};
 
 typedef struct {
 	int16 anzahl;
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 72bb27e9f65..7b3fe4ef064 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -260,7 +260,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 			fcode = READFEHLER;
 		}
 		if (!modul) {
-			fseek((FILE *)roomhandle[R_TGPDATEI], -sizeof(tbf_dateiheader), SEEK_CUR);
+			fseek((FILE *)roomhandle[R_TGPDATEI], -(int)sizeof(tbf_dateiheader), SEEK_CUR);
 			Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), tb.entpsize + 4);
 			if (Rb->AkAblage == -1) {
 			} else if (Rb->AkAblage >= 1000) {
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 838a85d9f0f..7a4d39cee61 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -839,12 +839,13 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					break;
 
 				case TXT_MARK_WALK:
-					switch (txt_nr) {
+					action_ret = false;
+					/*switch (txt_nr) {
 					default:
 						action_ret = false;
 						break;
 
-					}
+					}*/
 					break;
 
 				case TXT_MARK_TALK:


Commit: a417d3e23a6768335e87d07102ebd1995cbee856
    https://github.com/scummvm/scummvm/commit/a417d3e23a6768335e87d07102ebd1995cbee856
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:41-08:00

Commit Message:
CHEWY: Convert char * pointers to byte *

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h
    engines/chewy/ngstypes.h
    engines/chewy/objekte.cpp
    engines/chewy/objekte.h
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index f7c0667402e..0594039b8bb 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -462,7 +462,7 @@ void ailclass::init_note_table(uint16 sfreq) {
 	}
 }
 
-void ailclass::play_voc(char *anf_adr, int16 kanal, int16 vol, int16 rep) {
+void ailclass::play_voc(byte *anf_adr, int16 kanal, int16 vol, int16 rep) {
 	warning("STUB: ailclass::play_voc()");
 
 #if 0
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index b97f3d27d19..9dc1b2a13bf 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -62,7 +62,7 @@ public:
 	void fade_in(uint16 delay);
 	void fade_out(uint16 delay);
 
-	void play_voc(char *anf_adr, int16 kanal, int16 vol,
+	void play_voc(byte *anf_adr, int16 kanal, int16 vol,
 	              int16 rep);
 	void play_raw(int16 kanal, char *voc, uint32 len,
 	              uint16 freqwert, int16 volume, int16 rep);
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 0bbb0cc5282..a112039b00b 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -87,7 +87,7 @@ char atds_id[4][4] = { "ATS",
                        "ADH",
                      };
 
-void atdsys::set_font(char *font_adr, int16 fvorx, int16 fhoehe) {
+void atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
 	atdsv.Font = font_adr;
 	atdsv.Fvorx = fvorx;
 	atdsv.Fhoehe = fhoehe;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 70993826566..395dd7b3479 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -107,7 +107,7 @@ typedef struct {
 } AdsBlock;
 
 typedef struct {
-	char *Font;
+	byte *Font;
 	int16 Fvorx;
 	int16 Fhoehe;
 	int16 Silent;
@@ -243,7 +243,7 @@ public:
 	atdsys();
 	~atdsys();
 
-	void set_font(char *font_adr, int16 fvorx, int16 fhoehe);
+	void set_font(byte *font_adr, int16 fvorx, int16 fhoehe);
 	void set_delay(int16 *delay, int16 silent);
 	void set_display(int16 mode);
 	void set_split_win(int16 nr, SplitStringInit *ssinit);
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 617f09f4292..59d07309f90 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -76,7 +76,7 @@ datei::datei() {
 datei::~datei() {
 }
 
-void datei::load_pcx(char *fname, char *speicher, char *palette) {
+void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 	FILE *handle;
 	pcx_header *header;
 	uint8 zeichen;
@@ -166,12 +166,12 @@ void datei::load_pcx(char *fname, char *speicher, char *palette) {
 	}
 }
 
-void datei::load_image(char *fname, char *sp, char *palette) {
+void datei::load_image(const char *fname, byte *sp, byte *palette) {
 	FILE *handle;
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
-	char *speicher;
+	byte *speicher;
 	int16 format;
 	header = (tbf_dateiheader *)tmp;
 	speicher = sp;
@@ -231,12 +231,12 @@ void datei::load_image(char *fname, char *sp, char *palette) {
 	}
 }
 
-void datei::load_image(void *h, char *sp, char *palette) {
+void datei::load_image(void *h, byte *sp, byte *palette) {
 	FILE *handle = (FILE *)h;
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
-	char *speicher;
+	byte *speicher;
 	int16 format;
 	ChunkHead ch;
 	header = (tbf_dateiheader *)tmp;
@@ -311,7 +311,7 @@ uint16 datei::select_pool_item(void *h, uint16 nr) {
 	return (nr);
 }
 
-void datei::load_tafmcga(const char *fname, char *sp, int16 nr) {
+void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 	FILE *handle;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
@@ -319,7 +319,7 @@ void datei::load_tafmcga(const char *fname, char *sp, int16 nr) {
 	int16 id, i;
 	uint16 sprcount = 0;
 	uint32 size = 0, next = 0, image = 0;
-	char *speicher;
+	byte *speicher;
 	speicher = sp;
 	header = (taf_dateiheader *)tmp;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -396,18 +396,18 @@ void datei::load_tafmcga(const char *fname, char *sp, int16 nr) {
 	}
 }
 
-void datei::load_tafmcga(void *h, int16 komp, uint32 size, char *speicher) {
+void datei::load_tafmcga(void *h, int16 komp, uint32 size, byte *speicher) {
 	read_tbf_image(h, komp, size, speicher);
 }
 
-void datei::load_full_taf(const char *fname, char *hi_sp, taf_info *tinfo) {
+void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 	FILE *handle;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	int16 komp, id, i;
 	uint16 sprcount, anzahl, *abmess;
 	uint32 size = 0, next = 0, image = 0;
-	char *speicher;
+	byte *speicher;
 	header = (taf_dateiheader *)tmp;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
@@ -470,11 +470,11 @@ void datei::load_full_taf(const char *fname, char *hi_sp, taf_info *tinfo) {
 	}
 }
 
-void datei::load_korrektur(const char *fname, char *sp) {
+void datei::load_korrektur(const char *fname, byte *sp) {
 	FILE *handle;
 	taf_dateiheader *header;
 	int16 id, i;
-	char *speicher;
+	byte *speicher;
 	header = (taf_dateiheader *)tmp;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
@@ -519,7 +519,7 @@ void datei::load_korrektur(const char *fname, char *sp) {
 	}
 }
 
-void datei::load_tff(const char *fname, char *speicher) {
+void datei::load_tff(const char *fname, byte *speicher) {
 	FILE *handle;
 	tff_header *tff;
 	uint32 size;
@@ -556,12 +556,12 @@ void datei::load_tff(const char *fname, char *speicher) {
 	}
 }
 
-void datei::read_tbf_image(void *h, int16 komp, uint32 size, char *sp) {
+void datei::read_tbf_image(void *h, int16 komp, uint32 size, byte *sp) {
 	FILE *handle = (FILE *)h;
 	uint32 pos;
 	char zeichen;
 	uint8 count, i;
-	char *speicher;
+	byte *speicher;
 	speicher = sp;
 	pos = 0;
 	if (komp == 1) {
@@ -581,7 +581,7 @@ void datei::read_tbf_image(void *h, int16 komp, uint32 size, char *sp) {
 }
 
 void datei::read_tpf_image(void *h, int16 komp, uint32 size,
-                           char *speicher) {
+                           byte *speicher) {
 	FILE *handle = (FILE *)h;
 	uint32 pos = 0;
 	char zeichen;
@@ -610,7 +610,7 @@ void datei::read_tpf_image(void *h, int16 komp, uint32 size,
 	}
 }
 
-void datei::load_dialog(char *fname, dialogue *dial, menue *men,
+void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
                         knopf *knpf) {
 	FILE *handle;
 	int16 i = 0, j = 0;
@@ -668,7 +668,7 @@ void datei::load_dialog(char *fname, dialogue *dial, menue *men,
 	}
 }
 
-void datei::load_sbi(char *fname, sbi_inst *speicher) {
+void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 	FILE *handle;
 	int16 i = 0;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -703,12 +703,12 @@ void datei::load_sbi(char *fname, sbi_inst *speicher) {
 	}
 }
 
-uint32 datei::load_voc(char *fname, char *speicher) {
+uint32 datei::load_voc(const char *fname, byte *speicher) {
 	FILE *handle;
 	int16 i = 0;
 	voc_header *header;
 	uint32 s;
-	char *sp = 0;
+	byte *sp = nullptr;
 	header = (voc_header *)tmp;
 	sp = speicher;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -756,7 +756,7 @@ uint32 datei::load_voc(char *fname, char *speicher) {
 	return (s);
 }
 
-uint32 datei::load_voc(void *h, char *speicher) {
+uint32 datei::load_voc(void *h, byte *speicher) {
 	FILE *handle = (FILE *)h;
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
@@ -781,7 +781,7 @@ uint32 datei::load_voc(void *h, char *speicher) {
 	return (ch->size);
 }
 
-void datei::load_vocinfo(char *fname, voc_header *speicher) {
+void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 	FILE *handle;
 	int16 i = 0;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -816,7 +816,7 @@ void datei::load_vocinfo(char *fname, voc_header *speicher) {
 	}
 }
 
-void datei::void_load(const char *fname, char *speicher, uint32 size) {
+void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	FILE *handle;
 	int16 i;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -837,7 +837,7 @@ void datei::void_load(const char *fname, char *speicher, uint32 size) {
 	}
 }
 
-uint32 datei::load_file(char *fname, char *speicher) {
+uint32 datei::load_file(const char *fname, byte *speicher) {
 	FILE *handle;
 	uint32 size = 0;
 	int16 i = 0;
@@ -863,7 +863,7 @@ uint32 datei::load_file(char *fname, char *speicher) {
 	return (size);
 }
 
-uint32 datei::load_item(void *h, char *speicher) {
+uint32 datei::load_item(void *h, byte *speicher) {
 	FILE *handle = (FILE *)h;
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
@@ -883,10 +883,10 @@ uint32 datei::load_item(void *h, char *speicher) {
 	return (ch->size);
 }
 
-uint32 datei::load_tmf(char *fname, tmf_header *th) {
+uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 	FILE *handle;
 	uint32 size = 0;
-	char *speicher;
+	byte *speicher;
 	int16 ok, i;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
@@ -899,7 +899,7 @@ uint32 datei::load_tmf(char *fname, tmf_header *th) {
 	filename[i + 2] = 'M';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	speicher = (char *)th;
+	speicher = (byte *)th;
 	correct_fname(filename);
 	handle = fopen(filename, "rb");
 	if (handle) {
@@ -933,7 +933,7 @@ uint32 datei::load_tmf(char *fname, tmf_header *th) {
 		modul = DATEI;
 	}
 	if (!modul) {
-		speicher = (char *)th;
+		speicher = (byte *)th;
 		speicher += sizeof(tmf_header);
 		speicher += ((uint32)th->pattern_anz) * 1024l;
 		for (i = 0; i < 31; i++) {
@@ -949,10 +949,10 @@ uint32 datei::load_tmf(char *fname, tmf_header *th) {
 uint32 datei::load_tmf(void *h, tmf_header *song) {
 	FILE *handle = (FILE *)h;
 	ChunkHead *ch;
-	char *speicher;
+	byte *speicher;
 	int16 i;
 	ch = (ChunkHead *) tmp;
-	speicher = (char *)song;
+	speicher = (byte *)song;
 	if (handle) {
 		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
@@ -966,7 +966,7 @@ uint32 datei::load_tmf(void *h, tmf_header *song) {
 					fcode = READFEHLER;
 				}
 				else {
-					speicher = (char *)song;
+					speicher = (byte *)song;
 					speicher += sizeof(tmf_header);
 					speicher += ((uint32)song->pattern_anz) * 1024l;
 					for (i = 0; i < 31; i++) {
@@ -986,11 +986,11 @@ uint32 datei::load_tmf(void *h, tmf_header *song) {
 	return (ch->size);
 }
 
-void datei::save_pcx(char *fname, char *speicher, char *palette) {
+void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 	FILE *handle;
 	pcx_header *header;
 
-	char *line_ptr, *sptr;
+	byte *line_ptr, *sptr;
 	uint16 i;
 	int16 curr_data;
 	int16 prev_data;
@@ -1088,7 +1088,7 @@ void datei::save_pcx(char *fname, char *speicher, char *palette) {
 	}
 }
 
-void datei::save_tafmcga(char *fname, char **spvekt, char *palette,
+void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
                          int16 komp, int16 *korrektur) {
 	FILE *handle;
 	taf_dateiheader *header;
@@ -1096,7 +1096,7 @@ void datei::save_tafmcga(char *fname, char **spvekt, char *palette,
 	uint16 i = 0;
 	uint16 sprcount = 0;
 	int16 *abmess;
-	char *speicher;
+	byte *speicher;
 	uint32 size = 0, allsize = 0, next = 0;
 	header = (taf_dateiheader *)tmp;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
@@ -1173,7 +1173,7 @@ void datei::save_tafmcga(char *fname, char **spvekt, char *palette,
 	}
 }
 
-void datei::save_tff(char *fname, char *speicher) {
+void datei::save_tff(const char *fname, byte *speicher) {
 	FILE *handle;
 	uint32 size;
 	uint16 i = 0;
@@ -1217,7 +1217,7 @@ void datei::save_tff(char *fname, char *speicher) {
 	}
 }
 
-void datei::write_tbf_image(void *h, int16 komp, uint32 size, char *speicher) {
+void datei::write_tbf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 	FILE *handle = (FILE *)h;
 	uint32 pos = 0;
 	int16 fehler;
@@ -1247,7 +1247,7 @@ void datei::write_tbf_image(void *h, int16 komp, uint32 size, char *speicher) {
 	}
 }
 
-void datei::save_dialog(char *fname, dialogue *dial) {
+void datei::save_dialog(const char *fname, dialogue *dial) {
 	FILE *handle;
 	menue *men;
 	knopf *knpf;
@@ -1300,7 +1300,7 @@ void datei::save_dialog(char *fname, dialogue *dial) {
 	}
 }
 
-void datei::save_tmf(char *fname, tmf_header *thead) {
+void datei::save_tmf(const char *fname, tmf_header *thead) {
 	uint16 i = 0;
 	char *sp;
 	sp = (char *)thead;
@@ -1349,7 +1349,7 @@ void datei::save_tmf(char *fname, tmf_header *thead) {
 	}
 }
 
-void datei::get_tdfanz(char *fname, int16 *menueanz, int16 *knopfanz) {
+void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 	FILE *handle;
 	menue men;
 	int16 i = 0;
@@ -1626,7 +1626,7 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 	return size;
 }
 
-void datei::load_palette(const char *fname, char *palette, int16 typ) {
+void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 	FILE *handle;
 	uint8 zeichen;
 	uint16 j = 0;
@@ -1754,7 +1754,7 @@ void datei::load_palette(const char *fname, char *palette, int16 typ) {
 	}
 }
 
-void datei::load_palette(void *h, char *palette) {
+void datei::load_palette(void *h, byte *palette) {
 	FILE *handle = (FILE *)h;
 	tbf_dateiheader *header;
 	uint16 i = 0;
@@ -1836,7 +1836,7 @@ void datei::correct_fname(char *fname) {
 	}
 }
 
-int16 datei::get_filename(char *fname, int16 maxlen) {
+int16 datei::get_filename(const char *fname, int16 maxlen) {
 	warning("STUB - get_filename");
 
 	int16 ret = 0;
@@ -1918,7 +1918,7 @@ void datei::cd(char *dir) {
 #endif
 }
 
-void datei::write_tpf_image(void *h, int16 komp, uint32 size, char *speicher) {
+void datei::write_tpf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 	FILE *handle = (FILE *)h;
 	uint32 pos = 0;
 	int16 fehler;
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 7d6b7343317..15f4004ff19 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -31,52 +31,52 @@ public:
 	datei();
 	~datei();
 
-	void load_pcx(char *fname, char *speicher, char *palette);
-	void load_image(char *fname, char *sp, char *palette);
-	void load_tafmcga(const char *fname, char *sp, int16 nr);
+	void load_pcx(const char *fname, byte *speicher, byte *palette);
+	void load_image(const char *fname, byte *sp, byte *palette);
+	void load_tafmcga(const char *fname, byte *sp, int16 nr);
 // FIXME: Were using FILE*
 	/**/
-	void load_image(void *handle, char *sp, char *palette);
+	void load_image(void *handle, byte *sp, byte *palette);
 	uint16 select_pool_item(void *handle, uint16 nr);
-	void load_tafmcga(void *handle, int16 komp, uint32 size, char *speicher);
-	void read_tpf_image(void *handle, int16 komp, uint32 size, char *speicher);
-	uint32 load_voc(void *handle, char *speicher);
-	uint32 load_item(void *handle, char *speicher);
+	void load_tafmcga(void *handle, int16 komp, uint32 size, byte *speicher);
+	void read_tpf_image(void *handle, int16 komp, uint32 size, byte *speicher);
+	uint32 load_voc(void *handle, byte *speicher);
+	uint32 load_item(void *handle, byte *speicher);
 	uint32 load_tmf(void *handle, tmf_header *song);
-	void write_tbf_image(void *handle, int16 komp, uint32 size, char *speicher);
-	void write_tpf_image(void *handle, int16 komp, uint32 size, char *speicher);
-	void load_palette(void *handle, char *palette);
+	void write_tbf_image(void *handle, int16 komp, uint32 size, byte *speicher);
+	void write_tpf_image(void *handle, int16 komp, uint32 size, byte *speicher);
+	void load_palette(void *handle, byte *palette);
 	/**/
-	void load_full_taf(const char *fname, char *hi_sp, taf_info *tinfo);
-	void load_korrektur(const char *fname, char *sp);
-	void load_tff(const char *fname, char *speicher);
-	void load_dialog(char *fname, dialogue *dial, menue *men, knopf *knpf);
-	void load_sbi(char *fname, sbi_inst *speicher);
-	uint32 load_voc(char *fname, char *speicher);
-	void load_vocinfo(char *fname, voc_header *speicher);
-	void void_load(const char *fname, char *speicher, uint32 size);
-	uint32 load_file(char *fname, char *speicher);
-	uint32 load_tmf(char *fname, tmf_header *th);
-	void save_pcx(char *fname, char *speicher, char *palette);
-	void save_tafmcga(char *fname, char **spvekt, char *palette, int16 komp, int16 *korrektur);
-	void save_tff(char *fname, char *speicher);
-	void save_dialog(char *fname, dialogue *dial);
-	void save_tmf(char *fname, tmf_header *thead);
-	void get_tdfanz(char *fname, int16 *menueanz, int16 *knopfanz);
+	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
+	void load_korrektur(const char *fname, byte *sp);
+	void load_tff(const char *fname, byte *speicher);
+	void load_dialog(const char *fname, dialogue *dial, menue *men, knopf *knpf);
+	void load_sbi(const char *fname, sbi_inst *speicher);
+	uint32 load_voc(const char *fname, byte *speicher);
+	void load_vocinfo(const char *fname, voc_header *speicher);
+	void void_load(const char *fname, byte *speicher, uint32 size);
+	uint32 load_file(const char *fname, byte *speicher);
+	uint32 load_tmf(const char *fname, tmf_header *th);
+	void save_pcx(const char *fname, byte *speicher, byte *palette);
+	void save_tafmcga(const char *fname, byte **spvekt, byte *palette, int16 komp, int16 *korrektur);
+	void save_tff(const char *fname, byte *speicher);
+	void save_dialog(const char *fname, dialogue *dial);
+	void save_tmf(const char *fname, tmf_header *thead);
+	void get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz);
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
-	void load_palette(const char *fname, char *palette, int16 typ);
+	void load_palette(const char *fname, byte *palette, int16 typ);
 	void imsize(const char *fname, uint32 *svekt);
 	void correct_fname(char *fname);
-	short get_filename(char *fname, int16 maxlen);
+	short get_filename(const char *fname, int16 maxlen);
 	void respfad(char *respath, char *resdir);
 	void res2dname(char *respath, char *fnme, char *dtname);
 	void cwd(char *buf, int16 buflen);
 	void cd(char *dir);
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
-	void read_tbf_image(void *h, int16 komp, uint32 size, char *sp);
+	void read_tbf_image(void *h, int16 komp, uint32 size, byte *sp);
 
 };
 #endif
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index efc482824f1..19c7bba092d 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -185,7 +185,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 			Tt->anzahl = anz;
 			Tt->korrektur = (int16 *)calloc((int32)Tt->anzahl * 4l, 1);
 			if (!modul) {
-				mem->file->load_korrektur(fname_, (char *)Tt->korrektur);
+				mem->file->load_korrektur(fname_, (byte *)Tt->korrektur);
 				Tt->palette = 0;
 				CurrentTaf = fopen(fname_, "rb");
 				if (CurrentTaf) {
@@ -251,7 +251,7 @@ void detail::load_taf_seq(void *h, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 		if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 			if (!Tt->image[spr_nr + i]) {
 				size = iheader.width * iheader.height ;
-				Tt->image[spr_nr + i] = (char *)calloc(size + 4l, 1);
+				Tt->image[spr_nr + i] = (byte *)calloc(size + 4l, 1);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
 				fseek(handle, iheader.image, SEEK_SET);
@@ -469,8 +469,8 @@ void detail::show_static_spr(int16 nr) {
 		rdi.Sinfo[nr].Hide = false;
 }
 
-char *detail::get_static_image(int16 det_nr) {
-	char *ret;
+byte *detail::get_static_image(int16 det_nr) {
+	byte *ret;
 	int16 index;
 	index = rdi.Sinfo[det_nr].SprNr;
 	if (index == -1)
@@ -512,8 +512,8 @@ void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 	rdi.Ainfo[ani_nr].end_ani = end;
 }
 
-char *detail::get_image(int16 spr_nr) {
-	char *ret;
+byte *detail::get_image(int16 spr_nr) {
+	byte *ret;
 	ret = rdi.dptr->image[spr_nr];
 	return(ret);
 }
@@ -666,7 +666,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end) {
 	int16 x, y;
 	int16 i;
-	char *simage;
+	byte *simage;
 	if (start > end) {
 		i = start;
 		start = end;
@@ -820,7 +820,7 @@ void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
 	*ky += (int16)tmpy;
 }
 
-void detail::set_sound_area(char *buffer, uint32 size) {
+void detail::set_sound_area(byte *buffer, uint32 size) {
 	SoundBuffer = buffer;
 	SoundBufferSize = size;
 }
@@ -828,7 +828,7 @@ void detail::set_sound_area(char *buffer, uint32 size) {
 void detail::load_room_sounds(void *tvp_handle) {
 	int16 i, break_flag;
 	int16 index;
-	char *workbuf;
+	byte *workbuf;
 	uint32 size;
 	uint32 allsize;
 	if (tvp_handle) {
@@ -1102,7 +1102,7 @@ int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y,
 	return (detail_nr);
 }
 
-void detail::set_taf_ani_mem(char *load_area) {
+void detail::set_taf_ani_mem(byte *load_area) {
 	taf_load_buffer = load_area;
 	direct_taf_ani = ON;
 }
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index fae63d73955..1d603ccd045 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -59,8 +59,7 @@ typedef struct {
 #define MAX_RDI_ROOM 100
 
 typedef struct {
-
-	char *Image;
+	byte *Image;
 	int16 ZEbene;
 	int16 X;
 	int16 Y;
@@ -122,14 +121,14 @@ typedef struct {
 	int16 StaticDetailAnz;
 	int16 AniDetailAnz;
 	taf_info *dptr;
-	ani_detail_info Ainfo [MAXDETAILS];
-	static_detail_info Sinfo [MAXDETAILS];
-	int16 mvect [MAX_M_ITEMS * 4];
-	int16 mtxt [MAX_M_ITEMS];
+	ani_detail_info Ainfo[MAXDETAILS];
+	static_detail_info Sinfo[MAXDETAILS];
+	int16 mvect[MAX_M_ITEMS * 4];
+	int16 mtxt[MAX_M_ITEMS];
 	RaumInfo Ri;
-	RaumAutoMov AutoMov [MAX_AUTO_MOV];
+	RaumAutoMov AutoMov[MAX_AUTO_MOV];
 	int16 tvp_index[MAXDETAILS * MAX_SOUNDS];
-	char *sample [MAXDETAILS * MAX_SOUNDS];
+	byte *sample[MAXDETAILS * MAX_SOUNDS];
 } room_detail_info;
 
 typedef struct {
@@ -171,7 +170,7 @@ public:
 	void save_detail(char *fname, int16 room_nr);
 #endif
 	void set_static_spr(int16 nr, int16 spr_nr);
-	char *get_static_image(int16 det_nr);
+	byte *get_static_image(int16 det_nr);
 
 	void set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag);
 	void set_detail_pos(int16 det_nr, int16 x, int16 y);
@@ -181,7 +180,7 @@ public:
 	void unfreeze_ani();
 	void get_ani_werte(int16 ani_nr, int16 *start, int16 *end);
 	void set_ani(int16 ani_nr, int16 start, int16 end);
-	char *get_image(int16 spr_nr);
+	byte *get_image(int16 spr_nr);
 	ani_detail_info *get_ani_detail(int16 ani_nr);
 	int16 *get_korrektur_tbl();
 	void init_taf(taf_info *dptr);
@@ -229,7 +228,7 @@ public:
 	int16 mouse_on_detail(int16 mouse_x, int16 mouse_y,
 	                      int16 scrx, int16 scry);
 
-	void set_sound_area(char *buffer, uint32 size);
+	void set_sound_area(byte *buffer, uint32 size);
 	// FIXME : was FILE*
 	void load_room_sounds(void *tvp_handle);
 	void get_sound_para(int16 nr, sound_def_blk *sdb_dest);
@@ -248,7 +247,7 @@ public:
 #ifdef DETEDIT
 	void shadow_room(int16 mode);
 #endif
-	void set_taf_ani_mem(char *load_area);
+	void set_taf_ani_mem(byte *load_area);
 	// FIXME : was FILE*
 	void load_sprite_pointer(void *handle);
 
@@ -272,13 +271,13 @@ private:
 	int16 ani_freezeflag;
 	int16 fulltaf;
 	char tafname[80];
-	char *taf_load_buffer;
+	byte *taf_load_buffer;
 	int16 direct_taf_ani;
 	// FIXME : was FILE*
 	void *CurrentTaf;
 	uint32 SpritePos[MAXSPRITE];
 
-	char *SoundBuffer;
+	byte *SoundBuffer;
 	uint32 SoundBufferSize;
 };
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 88ef74056b3..58a3288f65a 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -30,14 +30,12 @@ effect::effect() {
 effect::~effect() {
 }
 
-void effect::rnd_blende(char *rnd_speicher, char *sram_speicher,
-                        char *screen, char *palette, int16 col, int16 skip_line)
-
-{
+void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
+		byte *screen, byte *palette, int16 col, int16 skip_line) {
 	int16 *rnd_zeiger;
 	int16 i, x, y;
-	char *sp;
-	sp = (char *)calloc(8 * 8 + 4, 1);
+	byte *sp;
+	sp = (byte *)calloc(8 * 8 + 4, 1);
 	if (!modul) {
 		rnd_zeiger = (int16 *)rnd_speicher;
 		if (col < 256) {
@@ -68,13 +66,13 @@ void effect::rnd_blende(char *rnd_speicher, char *sram_speicher,
 	}
 }
 
-void effect::blende1(char *sram_speicher, char *screen,
-                     char *palette, int16 frames, uint8 mode, int16 col) {
+void effect::blende1(byte *sram_speicher, byte *screen,
+		byte *palette, int16 frames, uint8 mode, int16 col) {
 
 	int16 i;
 	int16 x, y, x1, y1;
-	char *sp;
-	sp = (char *)calloc(8 * 8 + 4, 1);
+	byte *sp;
+	sp = (byte *)calloc(8 * 8 + 4, 1);
 	if (!modul) {
 		i = 0;
 		if (col < 256) {
@@ -158,8 +156,8 @@ void effect::blende1(char *sram_speicher, char *screen,
 	}
 }
 
-void effect::spr_blende(char *workpage_, char *ablage_,
-                        char *palette, int16 frames, int16 col) {
+void effect::spr_blende(byte *workpage_, byte *ablage_,
+                        byte *palette, int16 frames, int16 col) {
 	int16 i;
 	int16 x, y;
 	int16 zoomx, zoomy;
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index da07271e80f..d3b634966b4 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -29,14 +29,14 @@ public:
 	effect();
 	~effect();
 
-	void blende1(char *sram_speicher, char *screen,
-	             char *palette, int16 frames, uint8 mode, int16 col);
+	void blende1(byte *sram_speicher, byte *screen,
+		byte *palette, int16 frames, uint8 mode, int16 col);
 
-	void rnd_blende(char *rnd_speicher, char *sram_speicher,
-	                char *screen, char *palette, int16 col, int16 skip_line);
+	void rnd_blende(byte *rnd_speicher, byte *sram_speicher,
+		byte *screen, byte *palette, int16 col, int16 skip_line);
 
-	void spr_blende(char *workpage, char *ablage,
-	                char *palette, int16 frames, int16 col);
+	void spr_blende(byte *workpage, byte *ablage,
+		byte *palette, int16 frames, int16 col);
 
 private:
 
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index d2f45d8b8a2..78870ca7c05 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -29,11 +29,11 @@
 #include "common/system.h"
 #include "chewy/flic.h"
 
-void decode_flc(char *vscr, char *dbuf) {
+void decode_flc(byte *vscr, byte *dbuf) {
 	warning("STUB: decode_flc()");
 }
 
-void decode_rle(char *vscr, char *dbuf, int br, int h) {
+void decode_rle(byte *vscr, byte *dbuf, int br, int h) {
 	warning("STUB: decode_rle()");
 }
 
@@ -47,7 +47,7 @@ flic::flic() {
 flic::~flic() {
 }
 
-void flic::play(char *fname, char *vscreen, char *load_p) {
+void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 	FILE *lhandle;
 
 	lhandle = fopen(fname, "rb");
@@ -61,7 +61,7 @@ void flic::play(char *fname, char *vscreen, char *load_p) {
 	}
 }
 
-void flic::play(void *h, char *vscreen, char *load_p) {
+void flic::play(void *h, byte *vscreen, byte *load_p) {
 	FILE *handle = (FILE *)h;
 	uint16 i;
 	size_t tmp_size;
@@ -116,7 +116,7 @@ void flic::play(void *h, char *vscreen, char *load_p) {
 
 void flic::decode_frame() {
 	uint16 i;
-	char *tmp_buf;
+	byte *tmp_buf;
 	bool update_flag;
 	tmp_buf = load_puffer;
 	update_flag = false;
@@ -186,7 +186,7 @@ void flic::decode_frame() {
 	}
 }
 
-void flic::col256_chunk(char *tmp) {
+void flic::col256_chunk(byte *tmp) {
 	short int i;
 	short int packets;
 	short int count;
@@ -226,7 +226,7 @@ void flic::col256_chunk(char *tmp) {
 	}
 }
 
-void flic::col64_chunk(char *tmp) {
+void flic::col64_chunk(byte *tmp) {
 	short int i;
 	short int packets;
 	short int count;
@@ -263,11 +263,11 @@ void flic::col64_chunk(char *tmp) {
 	}
 }
 
-void flic::delta_chunk_byte(char *tmp) {
+void flic::delta_chunk_byte(byte *tmp) {
 
 	short int *ipo;
-	char *abl;
-	char *tabl;
+	byte *abl;
+	byte *tabl;
 	short int i, j;
 	short int rest_height;
 	short signed int count;
@@ -296,7 +296,7 @@ void flic::delta_chunk_byte(char *tmp) {
 			mode_word = *ipo++;
 		} else
 			last_flag = false;
-		tmp = (char *)ipo;
+		tmp = (byte *)ipo;
 		if (mode_word) {
 			pcount = 0;
 			for (j = 0; (pcount < mode_word) && (j <= flic_header.width); ++pcount) {
@@ -414,7 +414,7 @@ void flic::decode_custom_frame(void *h) {
 	ChunkHead chead;
 	uint16 i, j;
 	tmf_header *th;
-	char *tmp;
+	byte *tmp;
 	musik_info mi;
 	long long_para;
 	th = (tmf_header *)Music;
@@ -692,7 +692,7 @@ void flic::decode_custom_frame(void *h) {
 
 void flic::decode_cframe() {
 	uint16 i;
-	char *tmp_buf;
+	byte *tmp_buf;
 	int16 update_flag;
 	tmp_buf = load_puffer;
 	update_flag = false;
@@ -767,7 +767,7 @@ void flic::decode_cframe() {
 }
 
 void flic::free_sound(int16 nr) {
-	char *fsound;
+	byte *fsound;
 	long fsize;
 	long copysize;
 	int16 i;
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 79d744a5b36..89a7a1969e6 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -71,8 +71,8 @@ enum CustomTypes {
 	CLEAR_SCREEN = 21
 };
 
-void decode_flc(char *vscr, char *dbuf);
-void decode_rle(char *vscr, char *dbuf, int br, int h);
+void decode_flc(byte *vscr, byte *dbuf);
+void decode_rle(byte *vscr, byte *dbuf, int br, int h);
 
 static int16(*custom_user)(int16) = 0;
 static int16(*flic_user)(int16) = 0;
@@ -81,9 +81,9 @@ class flic {
 public:
 	flic();
 	~flic();
-	void play(char *fname, char *vscreen, char *load_p);
+	void play(const char *fname, byte *vscreen, byte *load_p);
 
-	void play(void *handle, char *vscreen, char *load_p);
+	void play(void *handle, byte *vscreen, byte *load_p);
 	void set_flic_user_function(int16(*user_funktion)(int16 key));
 	void remove_flic_user_function();
 	void custom_play(CustomInfo *ci);
@@ -93,17 +93,17 @@ public:
 private:
 	void decode_frame();
 	void decode_cframe();
-	void col256_chunk(char *tmp);
-	void col64_chunk(char *tmp);
-	void delta_chunk_byte(char *tmp);
+	void col256_chunk(byte *tmp);
+	void col64_chunk(byte *tmp);
+	void delta_chunk_byte(byte *tmp);
 
 	void decode_custom_frame(void *handle);
 	void free_sound(int16 nr);
 
-	char *load_puffer;
-	char *virt_screen;
-	char *Music;
-	char *Sound;
+	byte *load_puffer;
+	byte *virt_screen;
+	byte *Music;
+	byte *Sound;
 	CustomInfo *Cinfo;
 	FlicHead flic_header;
 	CustomFlicHead custom_header;
@@ -112,9 +112,9 @@ private:
 	ChunkHead *chunk_header;
 	bool fade_flag;
 	bool cls_flag;
-	char fade_pal[768];
+	byte fade_pal[768];
 	int16 fade_delay;
-	char *sounds[50];
+	byte *sounds[50];
 	uint32 Ssize[50];
 	int16 CurrentFrame;
 };
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index a6b3471fcd8..7854ab4bd50 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -36,26 +36,26 @@
 		warning("STUB - missing destructor gedclass");
 	}
 
-	void gedclass::load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, char *speicher) {
+	void gedclass::load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 		warning("STUB - missing load_ged_pool");
 	}
 
 	//FIXME : was FILE*
-	void gedclass::load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, char *speicher) {
+	void gedclass::load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 		warning("STUB - missing load_ged_pool");
 	}
 
-	int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, char *speicher) {
+	int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
 		warning("STUB - missing ged_idx");
 		return 0;
 	}
 
-	int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, char *speicher) {
+	int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
 		warning("STUB - missing ged_idx");
 		return 0;
 	}
 
 	// FIXME : was FILE*
-	void gedclass::load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, char *speicher) {
+	void gedclass::load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher) {
 		warning("STUB - missing load_ged_chunk");
 	}
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 2e68f158ec6..3b9670ea172 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -31,17 +31,17 @@ public:
 	gedclass(int16(*user_func)(int16 idx_nr));
 	~gedclass();
 
-	void load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, char *speicher);
+	void load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
 
 	//FIXME : was FILE*
-	void load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, char *speicher);
-	int16 ged_idx(int16 x, int16 y, int16 x_anz, char *speicher);
-	int16 ged_idx(int16 g_idx, int16 x_anz, char *speicher);
+	void load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
+	int16 ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher);
+	int16 ged_idx(int16 g_idx, int16 x_anz, byte *speicher);
 
 private:
 
 	// FIXME : was FILE*
-	void load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, char *speicher);
+	void load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher);
 
 	GedPoolHeader ged_pool_header;
 	int16(*GedUserFunc)(int16 idx_nr);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 1702172cf4c..284a5fc0672 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -68,20 +68,20 @@ int16 FrameSpeedTmp;
 int16 frame_delay_count;
 int16 show_frame;
 
-char **ablage;
-char *workpage;
-char *workptr;
-char *cur_back;
-char **ged_mem;
-char *pal;
-char *spblende;
-
-char *screen0;
+byte **ablage;
+byte *workpage;
+byte *workptr;
+byte *cur_back;
+byte **ged_mem;
+byte *pal;
+byte *spblende;
+
+byte *screen0;
 int16 scr_width;
 int16 fx_blende;
 
-char *font6x8;
-char *font8x8;
+byte *font6x8;
+byte *font8x8;
 int16 fvorx6x8;
 int16 fvorx8x8;
 int16 fvory6x8;
@@ -113,7 +113,7 @@ int16 ani_invent_delay[3][2] = {
 };
 int16 ani_count[3] = {38, 39, 21};
 int16 invent_cur_mode;
-char *inv_spr[MAX_MOV_OBJ];
+byte *inv_spr[MAX_MOV_OBJ];
 
 int16 life_flag;
 int16 life_x;
@@ -342,4 +342,4 @@ int16 CurrentSong = -1;
 /* FILE */ void *music_handle;
 int16 EndOfPool;
 /* FILE */ void *speech_handle;
-char *SpeechBuf[2];
+byte *SpeechBuf[2];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1164097e04b..eb5871f76f4 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -68,20 +68,20 @@ extern int16 FrameSpeedTmp;
 
 extern int16 show_frame;
 
-extern char **ablage;
-extern char *workpage;
-extern char *workptr;
-extern char *cur_back;
-extern char **ged_mem;
-extern char *pal;
-extern char *spblende;
-
-extern char *screen0;
+extern byte **ablage;
+extern byte *workpage;
+extern byte *workptr;
+extern byte *cur_back;
+extern byte **ged_mem;
+extern byte *pal;
+extern byte *spblende;
+
+extern byte *screen0;
 extern int16 scr_width;
 extern int16 fx_blende;
 
-extern char *font6x8;
-extern char *font8x8;
+extern byte *font6x8;
+extern byte *font8x8;
 extern int16 fvorx6x8;
 extern int16 fvorx8x8;
 extern int16 fvory6x8;
@@ -119,7 +119,7 @@ extern int16 ani_invent_delay[2][2];
 extern int16 ani_count[2];
 extern int16 invent_cur_mode;
 extern int16 ak_invent;
-extern char *inv_spr[MAX_MOV_OBJ];
+extern byte *inv_spr[MAX_MOV_OBJ];
 
 extern int16 life_flag;
 extern int16 life_x;
@@ -224,7 +224,7 @@ extern void *music_handle;
 extern int16 EndOfPool;
 // FIXME: was FILE*
 extern void *speech_handle;
-extern char *SpeechBuf[2];
+extern byte *SpeechBuf[2];
 extern int16 CurrentSong;
 
 void cursor_wahl(int16 nr);
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 6bbf2660732..19c74165572 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -57,7 +57,7 @@ void standard_init() {
 	out->set_clip(0, 0, 320, 200);
 	out->set_writemode(0);
 	scr_width = 0;
-	screen0 = (char *) 0xa0000;
+	screen0 = (byte *) 0xa0000;
 	in->neuer_kb_handler(&kbinfo);
 
 	in->rectangle(0, 0, 320, 210);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e89bc7587fd..0e9119dea12 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -88,24 +88,24 @@ void game_main() {
 	}
 
 void alloc_buffers() {
-	workpage = (char *)calloc(64004l, 1);
+	workpage = (byte *)calloc(64004l, 1);
 	ERROR
-	pal = (char *)calloc(768l, 1);
+	pal = (byte *)calloc(768l, 1);
 	ERROR
-	cur_back = (char *)calloc(16 * 16 + 4, 1);
+	cur_back = (byte *)calloc(16 * 16 + 4, 1);
 	ERROR;
 	Ci.VirtScreen = workpage;
-	Ci.TempArea = (char *)calloc(64004l, 1);
+	Ci.TempArea = (byte *)calloc(64004l, 1);
 	ERROR;
 	det->set_taf_ani_mem(Ci.TempArea);
-	Ci.MusicSlot = (char *)calloc(MUSIC_SLOT_SIZE, 1);
+	Ci.MusicSlot = (byte *)calloc(MUSIC_SLOT_SIZE, 1);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
 	ERROR;
-	Ci.SoundSlot = (char *)calloc(SOUND_SLOT_SIZE, 1);
+	Ci.SoundSlot = (byte *)calloc(SOUND_SLOT_SIZE, 1);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
 	ERROR;
 	Ci.Fname = fname;
-	SpeechBuf[0] = (char *)calloc(SPEECH_HALF_BUF * 2, 1);
+	SpeechBuf[0] = (byte *)calloc(SPEECH_HALF_BUF * 2, 1);
 	ERROR
 	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
 }
@@ -1112,7 +1112,7 @@ void swap_if_l(int16 *x1, int16 *x2) {
 	}
 }
 
-void palcopy(char *dipal, char *sipal, int16 distart,
+void palcopy(byte *dipal, byte *sipal, int16 distart,
              int16 sistart, int16 anz) {
 	int16 i, j;
 	j = sistart;
@@ -1192,26 +1192,26 @@ void check_shad(int16 g_idx, int16 mode) {
 		switch (g_idx) {
 		case 4:
 			if (mode)
-				out->set_teilpalette((char *)pal_0, 1, 11);
-			palcopy(pal, (char *)pal_0, 0, 0, 12);
+				out->set_teilpalette((byte *)pal_0, 1, 11);
+			palcopy(pal, (byte *)pal_0, 0, 0, 12);
 			break;
 
 		case 1:
 			if (mode)
-				out->set_teilpalette((char *)pal_1, 1, 11);
-			palcopy(pal, (char *)pal_1, 0, 0, 12);
+				out->set_teilpalette((byte *)pal_1, 1, 11);
+			palcopy(pal, (byte *)pal_1, 0, 0, 12);
 			break;
 
 		case 2:
 			if (mode)
-				out->set_teilpalette((char *)pal_2, 1, 11);
-			palcopy(pal, (char *)pal_2, 0, 0, 12);
+				out->set_teilpalette((byte *)pal_2, 1, 11);
+			palcopy(pal, (byte *)pal_2, 0, 0, 12);
 			break;
 
 		case 3:
 			if (mode)
-				out->set_teilpalette((char *)pal_3, 1, 11);
-			palcopy(pal, (char *)pal_3, 0, 0, 12);
+				out->set_teilpalette((byte *)pal_3, 1, 11);
+			palcopy(pal, (byte *)pal_3, 0, 0, 12);
 			break;
 
 		}
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 99cc1325b69..e1cdf9f0ca8 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -55,7 +55,7 @@ char einfuegen = 0;
 int16 crlfx = 0, crlfy = 0;
 int16 r_gef = -1, r_end = false;
 int16 *rlist = 0;
-char pal_table[768];
+byte pal_table[768];
 bool mono = false;
 
 // Missing STUBs
@@ -66,36 +66,36 @@ void vflyback_start() { warning("STUB - vflyback_start"); }
 void vflyback_end() { warning("STUB - vflyback_end"); }
 void hflyback_start() { warning("STUB - hflyback_start"); }
 void hflyback_end() { warning("STUB - hflyback_end"); }
-void set_pointer(char *ptr) { warning("STUB - set_pointer"); }
-char *get_dispoff() { warning("STUB - get_dispoff"); return nullptr; }
-void setpalette(char *palette) { warning("STUB - setpalette"); }
-void save_palette(char *pal) { warning("STUB - save_palette"); }
+void set_pointer(byte *ptr) { warning("STUB - set_pointer"); }
+byte *get_dispoff() { warning("STUB - get_dispoff"); return nullptr; }
+void setpalette(byte *palette) { warning("STUB - setpalette"); }
+void save_palette(byte *pal) { warning("STUB - save_palette"); }
 void restore_palette() { warning("STUB - restore_palette"); }
 void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) { warning("STUB - rastercol"); }
-void set_palpart(char *palette, int16 startcol, int16 anz) { warning("STUB - set_palpart"); }
+void set_palpart(byte *palette, int16 startcol, int16 anz) { warning("STUB - set_palpart"); }
 void clear_mcga() { warning("STUB - clear_mcga"); }
 void setpixel_mcga(int16 x, int16 y, int16 farbe) { warning("STUB - setpixel_mcga"); }
 uint8 getpix(int16 x, int16 y) { warning("STUB - getpix"); return 0; }
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) { warning("STUB - line_mcga"); }
-void mem2mcga(char *ptr) { warning("STUB - mem2mcga"); }
-void mem2mcga_masked(char *ptr, int16 maske) { warning("STUB - mem2mcga_masked"); }
-void mcga2mem(char *ptr) { warning("STUB - mcga2mem"); }
-void mem2mem(char *ptr1, char *ptr2) { warning("STUB - mem2mem"); }
-void mem2mem_masked(char *ptr1, char *ptr2, int16 maske) { warning("STUB - mem2mem_masked"); }
-void map_spr_2screen(char *sptr, int16 x, int16 y) { warning("STUB - map_spr_2screen"); }
-void spr_save_mcga(char *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) { warning("STUB - spr_save_mcga"); }
-void spr_set_mcga(char *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - spr_set_mcga"); }
-void mspr_set_mcga(char *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - mspr_set_mcga"); }
-void setfont(char *adr, int16 breite, int16 hoehe, int16 first, int16 last) { warning("STUB - setfont"); }
+void mem2mcga(byte *ptr) { warning("STUB - mem2mcga"); }
+void mem2mcga_masked(byte *ptr, int16 maske) { warning("STUB - mem2mcga_masked"); }
+void mcga2mem(byte *ptr) { warning("STUB - mcga2mem"); }
+void mem2mem(byte *ptr1, byte *ptr2) { warning("STUB - mem2mem"); }
+void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) { warning("STUB - mem2mem_masked"); }
+void map_spr_2screen(byte *sptr, int16 x, int16 y) { warning("STUB - map_spr_2screen"); }
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) { warning("STUB - spr_save_mcga"); }
+void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - spr_set_mcga"); }
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - mspr_set_mcga"); }
+void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) { warning("STUB - setfont"); }
 void upd_scr() { warning("STUB - upd_scr"); }
 void vors() { warning("STUB - vors"); }
 
-void zoom_img(char *source, char *dest, int16 xdiff_, int16 ydiff_) { warning("STUB - zoom_img"); }
-void zoom_set(char *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) { warning("STUB - zoom_set"); }
+void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) { warning("STUB - zoom_img"); }
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) { warning("STUB - zoom_set"); }
 
 void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putcxy"); }
 void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putz"); }
-void init_svga(VesaInfo *vi_, char *virt_screen) { warning("STUB - init_svga"); }
+void init_svga(VesaInfo *vi_, byte *virt_screen) { warning("STUB - init_svga"); }
 
 
 
@@ -214,12 +214,12 @@ void mcga_grafik::skip_line(int16 lines) {
 	}
 }
 
-void mcga_grafik::setze_zeiger(char *ptr) {
+void mcga_grafik::setze_zeiger(byte *ptr) {
 	set_pointer(ptr);
 }
 
-char *mcga_grafik::get_zeiger() {
-	return ((char *)get_dispoff());
+byte *mcga_grafik::get_zeiger() {
+	return get_dispoff();
 }
 
 void mcga_grafik::set_bildbreite(int16 breite) {
@@ -232,7 +232,7 @@ void mcga_grafik::set_mono() {
 	mono = true;
 }
 
-void mcga_grafik::calc_mono(char *pal, int16 startcol, int16 anz) {
+void mcga_grafik::calc_mono(byte *pal, int16 startcol, int16 anz) {
 	int16 i, k;
 	uint8 r, g, b, grau;
 	k = startcol * 3;
@@ -248,7 +248,7 @@ void mcga_grafik::calc_mono(char *pal, int16 startcol, int16 anz) {
 	}
 }
 
-void mcga_grafik::set_palette(char *palette) {
+void mcga_grafik::set_palette(byte *palette) {
 	int16 i;
 	for (i = 0; i < 768; i++)
 		pal_table[i] = palette[i];
@@ -257,7 +257,7 @@ void mcga_grafik::set_palette(char *palette) {
 	setpalette(palette);
 }
 
-void mcga_grafik::palette_save(char *pal) {
+void mcga_grafik::palette_save(byte *pal) {
 	save_palette(pal);
 }
 
@@ -276,7 +276,7 @@ void mcga_grafik::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	rastercol(c, r, g, b);
 }
 
-void mcga_grafik::einblenden(char *palette, int16 frames) {
+void mcga_grafik::einblenden(byte *palette, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 r1, g1, b1;
@@ -305,7 +305,7 @@ void mcga_grafik::einblenden(char *palette, int16 frames) {
 	}
 }
 
-void mcga_grafik::aufhellen(char *palette, int16 startcol, int16 anz, int16 stufen, int16
+void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
                             frames) {
 	int16 i = 0, j, k;
 	int16 r, g, b;
@@ -382,7 +382,7 @@ void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frame
 	}
 }
 
-void mcga_grafik::set_teilpalette(char *palette, int16 startcol, int16 anz) {
+void mcga_grafik::set_teilpalette(byte *palette, int16 startcol, int16 anz) {
 	int16 i;
 	int16 k, endcol;
 	k = startcol * 3;
@@ -504,27 +504,27 @@ void mcga_grafik::y_shrumpf(char *source, char *dest, int16 faktor,
 }
 #endif
 
-void mcga_grafik::back2screen(char *ptr) {
+void mcga_grafik::back2screen(byte *ptr) {
 	mem2mcga(ptr);
 }
 
-void mcga_grafik::back2back(char *ptr1, char *ptr2) {
+void mcga_grafik::back2back(byte *ptr1, byte *ptr2) {
 	mem2mem(ptr1, ptr2);
 }
 
-void mcga_grafik::back2screen_maskiert(char *ptr, int16 maske) {
+void mcga_grafik::back2screen_maskiert(byte *ptr, int16 maske) {
 	mem2mcga_masked(ptr, maske);
 }
 
-void mcga_grafik::back2back_maskiert(char *ptr1, char *ptr2, int16 maske) {
+void mcga_grafik::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
 	mem2mem_masked(ptr1, ptr2, maske);
 }
 
-void mcga_grafik::screen2back(char *ptr) {
+void mcga_grafik::screen2back(byte *ptr) {
 	mcga2mem(ptr);
 }
 
-void mcga_grafik::sprite_save(char *sptr, int16 x,
+void mcga_grafik::sprite_save(byte *sptr, int16 x,
                               int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
 	if (breite < 4)breite = 4;
 	if (hoehe <= 0)hoehe = 1;
@@ -545,15 +545,15 @@ void mcga_grafik::sprite_save(char *sptr, int16 x,
 	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
 }
 
-void mcga_grafik::sprite_set(char *sptr, int16 x, int16 y, int16 scrwidth) {
+void mcga_grafik::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::blockcopy(char *sptr, int16 x, int16 y, int16 scrwidth) {
+void mcga_grafik::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	spr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::map_spr2screen(char *sptr, int16 x, int16 y) {
+void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
 	int16 br, h;
 	br = ((int16 *)sptr)[0];
 	h = ((int16 *)sptr)[1];
@@ -561,7 +561,7 @@ void mcga_grafik::map_spr2screen(char *sptr, int16 x, int16 y) {
 		map_spr_2screen(sptr, x, y);
 }
 
-void mcga_grafik::set_fontadr(char *adr) {
+void mcga_grafik::set_fontadr(byte *adr) {
 	tff_header *tff;
 	tff = (tff_header *) adr;
 	setfont(adr + sizeof(tff_header), (int16)tff->width, (int16)tff->height,
@@ -1574,18 +1574,18 @@ int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	return (diff);
 }
 
-void mcga_grafik::scale_image(char *source, char *dest, int16 xdiff_, int16 ydiff_) {
+void mcga_grafik::scale_image(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
 	zoom_img(source, dest, xdiff_, ydiff_);
 }
 
-void mcga_grafik::scale_set(char *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
 	if ((xdiff_) || (ydiff_))
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
 	else
 		mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::init(uint16 mode, char *info_blk, char *vscreen) {
+void mcga_grafik::init(uint16 mode, byte *info_blk, byte *vscreen) {
 	if (!get_vesa_info(mode, info_blk)) {
 		init_svga(&vi, vscreen);
 		//delay(250);
@@ -1597,7 +1597,7 @@ void mcga_grafik::update_screen() {
 		upd_scr();
 }
 
-int16 mcga_grafik::get_vesa_info(uint16 mode, char *iblk) {
+int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
 	int16 error = 0;
 #if 0
 	vesa_status_block *vsb;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index a90a9750169..fe5ce82d8b6 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -35,14 +35,14 @@ void vflyback_start();
 void vflyback_end();
 void hflyback_start();
 void hflyback_end();
-void set_pointer(char *ptr);
-char *get_dispoff();
+void set_pointer(byte *ptr);
+byte *get_dispoff();
 
-void setpalette(char *palette);
-void save_palette(char *pal);
+void setpalette(byte *palette);
+void save_palette(byte *pal);
 void restore_palette();
 void rastercol(int16 color, int16 rot, int16 gruen, int16 blau);
-void set_palpart(char *palette, int16 startcol, int16 anz);
+void set_palpart(byte *palette, int16 startcol, int16 anz);
 
 void clear_mcga();
 void setpixel_mcga(int16 x, int16 y, int16 farbe);
@@ -50,39 +50,39 @@ uint8 getpix(int16 x, int16 y);
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 
 #ifdef EFFEKTE
-void split_in(char *source);
-void fall_in(char *source);
-void over_in(char *source);
-void y_shrink(char *source, char *dest, int16 faktor, int16 zeile);
+void split_in(byte *source);
+void fall_in(byte *source);
+void over_in(byte *source);
+void y_shrink(byte *source, byte *dest, int16 faktor, int16 zeile);
 #endif
 
-void mem2mcga(char *ptr);
-void mem2mcga_masked(char *ptr, int16 maske);
-void mcga2mem(char *ptr);
-void mem2mem(char *ptr1, char *ptr2);
-void mem2mem_masked(char *ptr1, char *ptr2, int16 maske);
-void map_spr_2screen(char *sptr, int16 x, int16 y);
+void mem2mcga(byte *ptr);
+void mem2mcga_masked(byte *ptr, int16 maske);
+void mcga2mem(byte *ptr);
+void mem2mem(byte *ptr1, byte *ptr2);
+void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske);
+void map_spr_2screen(byte *sptr, int16 x, int16 y);
 
-void spr_save_mcga(char *sptr, int16 x, int16 y, int16 breite, int16 hoehe,
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe,
                    int16 scrwidth);
-void spr_set_mcga(char *sptr, int16 x, int16 y, int16 scrwidth);
-void mspr_set_mcga(char *sptr, int16 x, int16 y, int16 scrwidth);
-void zoom_img(char *source, char *dest, int16 xdiff,
+void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth);
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth);
+void zoom_img(byte *source, byte *dest, int16 xdiff,
               int16 ydiff);
-void zoom_set(char *source, int16 x, int16 y, int16 xdiff,
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
               int16 ydiff, int16 scrwidth);
 
 void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
             int16 scrwidth);
 void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
-void setfont(char *adr, int16 breite, int16 hoehe, int16 first,
+void setfont(byte *adr, int16 breite, int16 hoehe, int16 first,
              int16 last);
 void vors();
 void movecur(int16 x, int16 y);
 
 uint8 joystick();
 
-void init_svga(VesaInfo *vi, char *virt_screen);
+void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
 
 class mcga_grafik {
@@ -103,22 +103,22 @@ public:
 	void hsync_end();
 	void skip_line(int16 lines);
 	void skip_frame(int16 frames);
-	void setze_zeiger(char *ptr);
-	char *get_zeiger();
+	void setze_zeiger(byte *ptr);
+	byte *get_zeiger();
 	void set_bildbreite(int16 breite);
 
 	void set_mono();
-	void calc_mono(char *pal, int16 startcol, int16 anz);
-	void set_palette(char *palette);
-	void palette_save(char *pal);
+	void calc_mono(byte *pal, int16 startcol, int16 anz);
+	void set_palette(byte *palette);
+	void palette_save(byte *pal);
 	void rest_palette();
 	void raster_col(int16 c, int16 r, int16 g, int16 b);
-	void einblenden(char *palette, int16 frames);
-	void aufhellen(char *palette, int16 startcol, int16 anz, int16 stufen,
+	void einblenden(byte *palette, int16 frames);
+	void aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen,
 	               int16 frames);
 	void ausblenden(int16 frames);
 	void abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames);
-	void set_teilpalette(char *palette, int16 startcol, int16 anz);
+	void set_teilpalette(byte *palette, int16 startcol, int16 anz);
 
 	void cls();
 	void punkt(int16 xpos, int16 ypos, int16 farbn);
@@ -137,30 +137,30 @@ public:
 	void leftscroll();
 	void rightscroll();
 	void set_dispoff(int16 offset);
-	void seit_in(char *source);
-	void falling_in(char *source);
-	void ueberblend(char *source);
-	void y_shrumpf(char *source, char *dest, int16 faktor,
+	void seit_in(byte *source);
+	void falling_in(byte *source);
+	void ueberblend(byte *source);
+	void y_shrumpf(byte *source, byte *dest, int16 faktor,
 	               int16 zeile);
 #endif
 
-	void back2screen(char *ptr);
-	void back2screen_maskiert(char *ptr, int16 maske);
-	void screen2back(char *ptr);
-	void back2back(char *ptr1, char *ptr2);
-	void back2back_maskiert(char *ptr1, char *ptr2, int16 maske);
+	void back2screen(byte *ptr);
+	void back2screen_maskiert(byte *ptr, int16 maske);
+	void screen2back(byte *ptr);
+	void back2back(byte *ptr1, byte *ptr2);
+	void back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske);
 
-	void sprite_save(char *sptr, int16 x, int16 y, int16 breite,
+	void sprite_save(byte *sptr, int16 x, int16 y, int16 breite,
 	                 int16 hoehe, int16 scrwidth);
-	void blockcopy(char *sptr, int16 x, int16 y, int16 scrwidth);
-	void sprite_set(char *sptr, int16 x, int16 y, int16 scrwidth);
-	void scale_image(char *source, char *dest, int16 xdiff,
+	void blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	void sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	void scale_image(byte *source, byte *dest, int16 xdiff,
 	                 int16 ydiff);
-	void scale_set(char *sptr, int16 x, int16 y, int16 xdiff,
+	void scale_set(byte *sptr, int16 x, int16 y, int16 xdiff,
 	               int16 ydiff, int16 scrwidth);
-	void map_spr2screen(char *sptr, int16 x, int16 y);
+	void map_spr2screen(byte *sptr, int16 x, int16 y);
 
-	void set_fontadr(char *adr);
+	void set_fontadr(byte *adr);
 	void plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
 	                   char cursor);
 	int16 scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth, const char *string, ...);
@@ -179,8 +179,8 @@ public:
 	void move(int16 x, int16 y);
 	void get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth);
 
-	int16 get_vesa_info(uint16 mode, char *info_blk);
-	void init(uint16 mode, char *info_blk, char *vscreen);
+	int16 get_vesa_info(uint16 mode, byte *info_blk);
+	void init(uint16 mode, byte *info_blk, byte *vscreen);
 	void update_screen();
 private:
 	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 3d501606a4b..4d226d87fe5 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -43,7 +43,7 @@ taf_info *memory::taf_adr(const char *filename) {
 	uint32 size;
 	int16 anz_image = 0;
 	uint32 kgroesse;
-	char *tempptr, *tmp1;
+	byte *tempptr, *tmp1;
 	taf_info *tinfo = nullptr;
 	taf_dateiheader *tafheader;
 	tafheader = 0;
@@ -54,7 +54,7 @@ taf_info *memory::taf_adr(const char *filename) {
 		anz_image = tafheader->count;
 		kgroesse = ((uint32)anz_image) * 4l;
 
-		tmp1 = (char *)calloc(size + 768l + kgroesse, 1);
+		tmp1 = (byte *)calloc(size + 768l + kgroesse, 1);
 		if (!modul) {
 			tinfo = (taf_info *)tmp1;
 			tinfo->palette = tmp1 + size;
@@ -64,7 +64,7 @@ taf_info *memory::taf_adr(const char *filename) {
 				tempptr = tmp1 + (((uint32)sizeof(taf_info)) + kgroesse);
 				file ->load_full_taf(filename, tempptr, tinfo);
 				tinfo->korrektur = (int16 *)(tmp1 + (size + 768l));
-				file ->load_korrektur(filename, (char *)tinfo->korrektur);
+				file ->load_korrektur(filename, (byte *)tinfo->korrektur);
 			}
 			if (modul)
 				free(tmp1);
@@ -88,8 +88,8 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 	int16 i;
 	int16 *abmess;
 	int16 id;
-	char *tmp1;
-	char *sp_ptr;
+	byte *tmp1;
+	byte *sp_ptr;
 	fseek(handle, 0, SEEK_SET);
 	if (fread(&header, sizeof(taf_dateiheader), 1, handle)) {
 		id = file->get_id(header.id);
@@ -115,7 +115,7 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 						size += image_anz * 4l;
 						size += image_anz * sizeof(char *);
 						size += ((uint32)sizeof(taf_seq_info));
-						tmp1 = (char *)calloc(size + image_anz * 4l, 1);
+						tmp1 = (byte *)calloc(size + image_anz * 4l, 1);
 						if (!modul) {
 							ts_info = (taf_seq_info *)tmp1;
 							ts_info->anzahl = image_anz;
@@ -170,11 +170,11 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 	return (ts_info);
 }
 
-void memory::tff_adr(const char *filename, char **speicher) {
+void memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
 	if (!modul) {
-		*speicher = (char *)calloc(size, 1);
+		*speicher = (byte *)calloc(size, 1);
 		if (*speicher) {
 			file->load_tff(filename, *speicher);
 			if (modul) {
@@ -188,12 +188,12 @@ void memory::tff_adr(const char *filename, char **speicher) {
 	}
 }
 
-char *memory::void_adr(const char *filename) {
+byte *memory::void_adr(const char *filename) {
 	uint32 size = 0;
-	char *ptr = 0;
+	byte *ptr = 0;
 	size = file->size(filename, 200);
 	if (!modul) {
-		ptr = (char *)calloc(size, sizeof(long));
+		ptr = (byte *)calloc(size, sizeof(long));
 		if (!modul) {
 			*(uint32 *)ptr = size;
 			file->void_load(filename, ptr + sizeof(long), size);
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index 3274a2b3b68..9bd820fe893 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -36,8 +36,8 @@ public:
 	// FIXME: was using FILE
 	taf_seq_info *taf_seq_adr(void *handle, int16 image_start,
 	                          int16 image_anz);
-	void tff_adr(const char *filename, char **speicher);
-	char *void_adr(const char *filename);
+	void tff_adr(const char *filename, byte **speicher);
+	byte *void_adr(const char *filename);
 
 	datei *file;
 private:
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 1bcf370f640..54dd4d9f91b 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -94,7 +94,7 @@ void movclass::goto_xy(GotoPkt *gp) {
 }
 
 int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
-	char *speicher;
+	byte *speicher;
 	int16 i;
 	int16 ok;
 	int16 ret;
@@ -434,7 +434,7 @@ void movclass::get_mov_line() {
 	int16 count_vect;
 	int16 count;
 	int16 y_richtung;
-	char *speicher;
+	byte *speicher;
 	gml.GotoFeld = -1;
 	gml.MLineFeld = -1;
 	if (gpkt->Ebenen > 1) {
@@ -531,7 +531,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 	int16 tbl_dir;
 	int16 tbl_ptr;
 	int16 dir;
-	char *speicher;
+	byte *speicher;
 	for (i = 0; i < MAX_KNOTEN_PKT; i++)
 		TmpKnPkt[i] = -1;
 	if (gpkt->Ebenen > 1) {
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index b4fcaecb665..7735236a922 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -71,7 +71,7 @@ typedef struct {
 	int16 Sy;
 	int16 Dx;
 	int16 Dy;
-	char *Mem;
+	byte *Mem;
 	int16 Breite;
 	int16 Hoehe;
 	int16 Ebenen;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 92d53a83d39..ebc7425e88c 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -90,15 +90,15 @@ struct taf_imageheader {
 
 typedef struct {
 	int16 anzahl;
-	char *palette;
+	byte *palette;
 	int16 *korrektur;
-	char **image;
+	byte **image;
 } taf_info;
 
 typedef struct {
 	int16 anzahl;
 	int16 *korrektur;
-	char **image;
+	byte **image;
 } taf_seq_info;
 
 typedef struct {
@@ -261,7 +261,7 @@ typedef struct {
 	uint8 lied_len;
 	uint8 pattern_anz;
 	uint8 sequenz[128];
-	char *ipos[31];
+	byte *ipos[31];
 } tmf_header;
 
 typedef struct {
@@ -446,10 +446,10 @@ typedef struct {
 typedef struct {
 	int16 page_off_x;
 	int16 page_off_y;
-	char *cur_back;
+	byte *cur_back;
 	int16 xsize;
 	int16 ysize;
-	char **sprite;
+	byte **sprite;
 	bool no_back;
 } cur_blk;
 
@@ -523,10 +523,10 @@ typedef struct {
 	char *Fname;
 	// FIXME: Was FILE
 	void *Handle;
-	char *VirtScreen;
-	char *TempArea;
-	char *SoundSlot;
-	char *MusicSlot;
+	byte *VirtScreen;
+	byte *TempArea;
+	byte *SoundSlot;
+	byte *MusicSlot;
 	uint32 MaxSoundSize;
 	uint32 MaxMusicSize;
 } CustomInfo;
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 289abb84676..515563427d6 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -200,7 +200,7 @@ void objekt::sort() {
 	}
 }
 
-void objekt::free_inv_spr(char **inv_spr_adr) {
+void objekt::free_inv_spr(byte **inv_spr_adr) {
 	int16 i;
 	for (i = 0; i < MAX_MOV_OBJ; i++)
 		if (inv_spr_adr[i] != 0) {
diff --git a/engines/chewy/objekte.h b/engines/chewy/objekte.h
index d5686137599..23073efeedd 100644
--- a/engines/chewy/objekte.h
+++ b/engines/chewy/objekte.h
@@ -47,7 +47,7 @@ public:
 
 	void sort();
 
-	void free_inv_spr(char **inv_spr_adr);
+	void free_inv_spr(byte **inv_spr_adr);
 
 	int16 is_sib_mouse(int16 mouse_x, int16 mouse_y);
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 7b3fe4ef064..a2f723c895c 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -116,7 +116,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	}
 }
 
-void Room::load_taf(const char *filename, char **speicher, char *palette, int16 sprnr) {
+void Room::load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr) {
 	uint32 imagesize[MAXSPRITE] = {0};
 	if (palette != 0)
 		mem->file->load_palette(filename, palette, TAFDATEI);
@@ -124,7 +124,7 @@ void Room::load_taf(const char *filename, char **speicher, char *palette, int16
 		imagesize[sprnr] = 0l;
 		mem->file->imsize(filename, imagesize);
 		if (!modul) {
-			*speicher = (char *)calloc((imagesize[sprnr]) + 4l, 1);
+			*speicher = (byte *)calloc((imagesize[sprnr]) + 4l, 1);
 			if (!modul) {
 				mem->file->load_tafmcga(filename, *speicher, sprnr);
 			}
@@ -189,7 +189,7 @@ void Room::set_zoom(int16 zoom) {
 	room_info->ZoomFak = (uint8)zoom;
 }
 
-void Room::set_pal(char *src_pal, char *dest_pal) {
+void Room::set_pal(const byte *src_pal, byte *dest_pal) {
 	memcpy(dest_pal, src_pal, 768l);
 	dest_pal [767] = 63;
 	dest_pal [766] = 63;
@@ -204,7 +204,7 @@ void Room::set_ak_pal(RaumBlk *Rb) {
 }
 
 void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
-	char *tmp_inv_spr[MAX_MOV_OBJ];
+	byte *tmp_inv_spr[MAX_MOV_OBJ];
 	int16 i;
 
 	if (!modul) {
@@ -301,9 +301,9 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 void Room::init_ablage() {
 	int16 i;
 	LastAblageSave = 0;
-	Ablage[0] = (char *)calloc(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l), 1);
-	AblagePal[0] = (char *)calloc(MAX_ABLAGE * 768l, 1);
-	GedMem[0] = (char *)calloc(MAX_ABLAGE * GED_BLOCK_SIZE, 1);
+	Ablage[0] = (byte *)calloc(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l), 1);
+	AblagePal[0] = (byte *)calloc(MAX_ABLAGE * 768l, 1);
+	GedMem[0] = (byte *)calloc(MAX_ABLAGE * GED_BLOCK_SIZE, 1);
 	if (!modul) {
 		AkAblage = 0;
 		for (i = 0; i < MAX_ABLAGE; i++) {
@@ -327,8 +327,8 @@ void Room::free_ablage() {
 	AkAblage = -1;
 }
 
-char *Room::get_ablage(int16 nr) {
-	char *ret;
+byte *Room::get_ablage(int16 nr) {
+	byte *ret;
 	ret = false;
 	if (nr < MAX_ABLAGE && AkAblage != -1) {
 		ret = Ablage[nr];
@@ -336,8 +336,8 @@ char *Room::get_ablage(int16 nr) {
 	return (ret);
 }
 
-char **Room::get_ablage() {
-	char **ret;
+byte **Room::get_ablage() {
+	byte **ret;
 	ret = false;
 	if (AkAblage != -1) {
 		ret = &Ablage[0];
@@ -345,8 +345,8 @@ char **Room::get_ablage() {
 	return (ret);
 }
 
-char **Room::get_ged_mem() {
-	char **ret;
+byte **Room::get_ged_mem() {
+	byte **ret;
 	ret = false;
 	if (AkAblage != -1) {
 		ret = &GedMem[0];
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 5711003e74c..7b8497321a5 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -38,10 +38,10 @@
 #define R_SPEZTAF 3
 
 typedef struct {
-	char *LowPalMem;
+	byte *LowPalMem;
 	const char *InvFile;
 	const char *DetFile;
-	char **InvSprAdr;
+	byte **InvSprAdr;
 
 	RoomMovObjekt *Rmo;
 
@@ -49,7 +49,7 @@ typedef struct {
 
 	char RoomDir[9];
 	int16 AkAblage;
-	char **DetImage;
+	byte **DetImage;
 	int16 *DetKorrekt;
 	taf_info *Fti;
 	int16 AadLoad;
@@ -78,19 +78,18 @@ public:
 
 	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
 
-	void load_taf(const char *filename, char **speicher, char *palette, int16 sprnr);
+	void load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr);
 
-	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx,
-	               int16 mode);
+	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode);
 	void load_sound();
 	// FIXME: was FILE*
 	void *get_sound_handle();
 
-	char *get_ablage(int16 nr);
+	byte *get_ablage(int16 nr);
 
-	char **get_ablage();
+	byte **get_ablage();
 
-	char **get_ged_mem();
+	byte **get_ged_mem();
 
 	void set_timer_start(int16 timer_start);
 
@@ -104,7 +103,7 @@ public:
 
 	void set_zoom(int16 zoom);
 
-	void set_pal(char *src_pal, char *dest_pal);
+	void set_pal(const byte *src_pal, byte *dest_pal);
 
 	void set_ak_pal(RaumBlk *Rb);
 
@@ -138,11 +137,11 @@ private:
 	int16 AkAblage;
 	int16 LastAblageSave;
 
-	char *Ablage[MAX_ABLAGE];
-	char *AblagePal[MAX_ABLAGE];
+	byte *Ablage[MAX_ABLAGE];
+	byte *AblagePal[MAX_ABLAGE];
 	int16 AblageInfo[MAX_ABLAGE][2];
 
-	char *GedMem[MAX_ABLAGE];
+	byte *GedMem[MAX_ABLAGE];
 	// FIXME: was FILE*
 	void *roomhandle[MAX_ROOM_HANDLE];
 


Commit: 006ee720de581ee2dd969efcba391b97dfb510f4
    https://github.com/scummvm/scummvm/commit/006ee720de581ee2dd969efcba391b97dfb510f4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:42-08:00

Commit Message:
CHEWY: Added Chewy namespace back in

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/bitclass.h
    engines/chewy/ch_icm.cpp
    engines/chewy/ch_icm.h
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/debug.cpp
    engines/chewy/debug.h
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/detection.h
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/episode3.cpp
    engines/chewy/episode3.h
    engines/chewy/episode4.cpp
    engines/chewy/episode4.h
    engines/chewy/fehler.cpp
    engines/chewy/fehler.h
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/maus.cpp
    engines/chewy/maus.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/menus.cpp
    engines/chewy/metaengine.cpp
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h
    engines/chewy/ngsdefs.h
    engines/chewy/ngshext.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/objekt.h
    engines/chewy/objekte.cpp
    engines/chewy/objekte.h
    engines/chewy/r_event.cpp
    engines/chewy/resource.h
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/sound.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/text.cpp
    engines/chewy/text.h
    engines/chewy/timer.cpp
    engines/chewy/timer.h
    engines/chewy/types.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 0594039b8bb..997827861b5 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -29,6 +29,8 @@
 #include "chewy/ailclass.h"
 #include "chewy/ngshext.h"
 
+namespace Chewy {
+
 #define MAX_VOICES 8
 #define NORMAL_PLAYBACK 0
 #define PATTERN_PLAYBACK 1
@@ -902,3 +904,5 @@ void DecodeChannel(int16 ch) {
 	}
 #endif
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 9dc1b2a13bf..8a6cf614b7f 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -25,6 +25,8 @@
 
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 void mod_irq();
 void check_sample_end();
 void DecodePatternLine();
@@ -79,4 +81,7 @@ public:
 	void serve_db_samples();
 private:
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index de112fe6280..1c40cddbd94 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -23,6 +23,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 #define GITTER_BLITZEN 7
@@ -251,3 +253,5 @@ AniBlock ablock39[3] = {
 	{17, 1, ANI_VOR, ANI_WAIT, 0},
 	{15, 1, ANI_RUECK, ANI_WAIT, 0},
 };
+
+} // namespace Chewy
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index ba740690e09..9f24850d7c4 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_ANIDAT_H
 #define CHEWY_ANIDAT_H
 
+namespace Chewy {
+
 #define SIB_KABEL_R1 1
 #define SIB_MONOKEL 6
 #define SIB_GBUCH 7
@@ -188,4 +190,6 @@ extern AniBlock ablock38[2];
 
 extern AniBlock ablock39[3];
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index a112039b00b..73b064b8109 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -32,6 +32,9 @@
 #include "chewy/atds.h"
 #include "chewy/defines.h"
 #include "chewy/global.h"
+
+namespace Chewy {
+
 extern char *err_str;
 int16 mouse_push;
 
@@ -1363,3 +1366,5 @@ int16 atdsys::get_stereo_pos(int16 x) {
 
 	return ((int16)fx_);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 395dd7b3479..96297f07da9 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_ATDS_H
 #define CHEWY_ATDS_H
 
+namespace Chewy {
+
 #define ATDS_VOC_OFFSET 20
 
 #define AAD_MAX_PERSON 10
@@ -339,4 +341,7 @@ private:
 	int16 tmp_delay;
 	in_zeiger *inzeig;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/bitclass.h b/engines/chewy/bitclass.h
index da4a6c334e4..afee5d025f6 100644
--- a/engines/chewy/bitclass.h
+++ b/engines/chewy/bitclass.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_BITCLASS_H
 #define CHEWY_BITCLASS_H
 
+namespace Chewy {
+
 class bitclass {
 
 public:
@@ -37,4 +39,7 @@ public:
 	void set_bit(uint8 *value, int16 bit) { *value |= bit; }
 	void del_bit(uint8 *value, int16 bit) { *value &= ~bit;}
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index db0f8ae002d..6e2f41bdbb7 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -25,6 +25,9 @@
 
 #ifdef ICM
 #include "chewy/ch_icm.h"
+
+namespace Chewy {
+
 int16 maus_rect_first;
 int16 koordinate[4] = {0};
 int16 last_debug_ani;
@@ -1364,4 +1367,6 @@ void del_inv() {
 	in->neuer_kb_handler(&kbinfo);
 }
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ch_icm.h b/engines/chewy/ch_icm.h
index 6d32187c087..6a034526f1a 100644
--- a/engines/chewy/ch_icm.h
+++ b/engines/chewy/ch_icm.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_CHICM_H
 #define CHEWY_CHICM_H
 
+namespace Chewy {
+
 void set_person();
 
 void draw_ice_win();
@@ -59,4 +61,6 @@ void get_zoom_value();
 
 IibDateiHeader iib_datei_header;
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 88659f2ae8a..aed2f9f0a95 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -23,6 +23,8 @@
 #include "chewy/cursor.h"
 #include "common/textconsole.h"
 
+namespace Chewy {
+
 #define false false
 #define true true
 
@@ -204,3 +206,5 @@ void cursor::wait_taste(int16 maus_plot) {
 		if (maus_plot != false)
 			plot_cur();
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 013fd9a66f3..be8a1f1e9be 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -26,6 +26,8 @@
 #include "chewy/mcga.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 extern int16 scr_w;
 
 class cursor {
@@ -61,4 +63,7 @@ public:
 	uint8 maus_da;
 	bool sichtbar;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 59d07309f90..36fddc764b5 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -37,6 +37,8 @@
 #include "common/file.h"
 #include "chewy/datei.h"
 
+namespace Chewy {
+
 #define GRAFIK 1
 #define SPEICHER 2
 #define DATEI 3
@@ -1999,3 +2001,5 @@ void datei::fcopy(const char *d_fname, const char *s_fname) {
 		modul = DATEI;
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 15f4004ff19..60d13575007 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -26,6 +26,8 @@
 #include "chewy/chewy.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 class datei {
 public:
 	datei();
@@ -79,4 +81,7 @@ public:
 	void read_tbf_image(void *h, int16 komp, uint32 size, byte *sp);
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
index 2ca68e29927..4804e1a6ebb 100644
--- a/engines/chewy/debug.cpp
+++ b/engines/chewy/debug.cpp
@@ -24,6 +24,8 @@
 #include "chewy/global.h"
 #include "chewy/debug.h"
 
+namespace Chewy {
+
 void look_debug_action(int16 key_nr) {
 	int16 ende;
 #define TXT_MARK_NAME 0
@@ -209,3 +211,5 @@ void test_load(void *handle, taf_info *Tt, int16 anz) {
 	}
 #endif
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/debug.h b/engines/chewy/debug.h
index cc613f193d2..5c531b9a400 100644
--- a/engines/chewy/debug.h
+++ b/engines/chewy/debug.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_DEBUG_H
 #define CHEWY_DEBUG_H
 
+namespace Chewy {
+
 void get_room_nr();
 
 void room_info();
@@ -42,4 +44,6 @@ void get_phase(ObjMov *om);
 //FIXME: was using FILE *
 void test_load(void *handle, taf_info *Tt, int16 anz);
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 065ae15b953..30c8bda5af4 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_DEFINES_H
 #define CHEWY_DEFINES_H
 
+namespace Chewy {
+
 #define VERSION1 0
 #define VERSION2 2
 
@@ -487,4 +489,6 @@
 #define WAIT_TASTE_LOS while (in->get_switch_code() != 0);
 #define FILEMENUE 1
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 19c7bba092d..917e160c7d4 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -29,6 +29,8 @@
 #include "chewy/detail.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 detail::detail() {
 	char *tptr;
 	int16 i, size;
@@ -1162,3 +1164,5 @@ void detail::load_sprite_pointer(void *h) {
 		}
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 1d603ccd045..dcb2d67be4e 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -26,6 +26,8 @@
 #include "chewy/ngshext.h"
 #include "chewy/defines.h"
 
+namespace Chewy {
+
 #define SAVE_ROOM 0
 #define RESTORE_ROOM 1
 #define MAX_SOUNDS 3
@@ -281,4 +283,6 @@ private:
 	uint32 SoundBufferSize;
 };
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/detection.h b/engines/chewy/detection.h
index 9bbf4c48ee5..528f9817850 100644
--- a/engines/chewy/detection.h
+++ b/engines/chewy/detection.h
@@ -30,4 +30,4 @@ struct ChewyGameDescription {
 
 } // End of namespace Chewy
 
-#endif // CHEWY_DETECTION_H
+#endif
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 58a3288f65a..9da740a5231 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -25,6 +25,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 effect::effect() {
 }
 effect::~effect() {
@@ -199,3 +201,5 @@ void effect::spr_blende(byte *workpage_, byte *ablage_,
 	out->back2screen(workpage_ - 4);
 	free((char *)spr);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index d3b634966b4..29f320563c6 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_EFFECT_H
 #define CHEWY_EFFECT_H
 
+namespace Chewy {
+
 class effect {
 
 public:
@@ -41,4 +43,7 @@ public:
 private:
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index db62196b350..0ecf2caf14c 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -25,6 +25,8 @@
 #include "chewy/ani_dat.h"
 #include "chewy/episode1.h"
 
+namespace Chewy {
+
 #define VOR 0
 #define RUECK 1
 #define SCHLAUCH1 11
@@ -3491,3 +3493,5 @@ int16 r12_cut_serv(int16 frame) {
 		start_aad(106, 0);
 	return (0);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 587570bf72d..bda65952cc8 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_EPISODE1_H
 #define CHEWY_EPISODE1_H
 
+namespace Chewy {
+
 void switch_room(int16 nr);
 
 void r28_free_chewy_pump();
@@ -266,4 +268,6 @@ void r24_calc_hebel_spr();
 
 void r24_calc_animation(int16 kristall_nr);
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 3d2fac98ba5..075c202a575 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -25,6 +25,8 @@
 #include "chewy/ani_dat.h"
 #include "chewy/episode2.h"
 
+namespace Chewy {
+
 void calc_person_look() {
 	int16 i;
 	for (i = 1; i < MAX_PERSON; i++) {
@@ -2657,3 +2659,5 @@ void r44_look_news() {
 
 	show_person();
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index eced1c21836..129eb248394 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_EPISODE2_H
 #define CHEWY_EPISODE2_H
 
+namespace Chewy {
+
 void switch_room(int16 nr);
 void r23_cockpit();
 
@@ -227,4 +229,6 @@ void r43_catch_pg();
 
 void r44_look_news();
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 2835abcc7e8..a80eab8f0ab 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -25,6 +25,8 @@
 #include "chewy/ani_dat.h"
 #include "chewy/episode3.h"
 
+namespace Chewy {
+
 int16 r45_delay;
 int16 r50Wasser;
 int16 r56koch_flug;
@@ -3088,3 +3090,5 @@ void r65_atds_string_start(int16 dia_nr, int16 str_nr,
 			det->stop_detail(person_nr);
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
index 89f4739677a..0acb12167eb 100644
--- a/engines/chewy/episode3.h
+++ b/engines/chewy/episode3.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_EPISODE3_H
 #define CHEWY_EPISODE3_H
 
+namespace Chewy {
+
 void switch_room(int16 nr);
 
 void r45_entry(int16 eib_nr);
@@ -260,6 +262,8 @@ void r65_entry();
 
 void r65_exit();
 void r65_atds_string_start(int16 dia_nr, int16 str_nr,
-                           int16 person_nr, int16 mode);
+	int16 person_nr, int16 mode);
+
+} // namespace Chewy
 
 #endif
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 0b5f8320b32..2e07e5a1d5c 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -25,6 +25,8 @@
 #include "chewy/ani_dat.h"
 #include "chewy/episode4.h"
 
+namespace Chewy {
+
 int16 r68HohesC;
 
 void r66_entry(int16 eib_nr) {
@@ -592,3 +594,5 @@ int16 r69_use_bruecke() {
 	}
 	return (action_flag);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/episode4.h b/engines/chewy/episode4.h
index a3a87a41c99..0ffd0f5b4ce 100644
--- a/engines/chewy/episode4.h
+++ b/engines/chewy/episode4.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_EPISODE4_H
 #define CHEWY_EPISODE4_H
 
+namespace Chewy {
+
 void switch_room(int16 nr);
 
 void r66_entry(int16 eib_nr);
@@ -81,4 +83,6 @@ void r69_look_schild();
 
 int16 r69_use_bruecke();
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
index 47ba4f754f8..c156c9cbcee 100644
--- a/engines/chewy/fehler.cpp
+++ b/engines/chewy/fehler.cpp
@@ -31,6 +31,8 @@
 #include "chewy/fehler.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 fehler *err;
 
 fehler::fehler() {
@@ -117,3 +119,5 @@ void fehler::msg() {
 void fehler::set_user_msg(const char *msg) {
 	user_msg = msg;
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/fehler.h b/engines/chewy/fehler.h
index b749107fcbd..e8957f95d10 100644
--- a/engines/chewy/fehler.h
+++ b/engines/chewy/fehler.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_FEHLER_H
 #define CHEWY_FEHLER_H
 
+namespace Chewy {
+
 #define MAX_MODULE 6
 #define GERMAN 1
 #define ENGL 2
@@ -44,4 +46,6 @@ private:
 	const char *user_msg;
 };
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 7a88f7f9ec9..5900ab8fc00 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -32,6 +32,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 int16 file_icons[8 * 4] = { 14, 73, 32, 94,
                             14, 96, 32, 118,
                             36, 64, 310, 128,
@@ -704,3 +706,5 @@ void option_menue(taf_info *ti) {
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 	out->setze_zeiger(workptr);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 78870ca7c05..af5547e98c0 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -29,6 +29,8 @@
 #include "common/system.h"
 #include "chewy/flic.h"
 
+namespace Chewy {
+
 void decode_flc(byte *vscr, byte *dbuf) {
 	warning("STUB: decode_flc()");
 }
@@ -803,3 +805,5 @@ void flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
 void flic::remove_flic_user_function() {
 	flic_user = 0;
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 89a7a1969e6..20e2d003ef9 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -26,6 +26,8 @@
 #include "chewy/ngshext.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 #define taste error("aborted")
 
 #define FLI 0xAF11
@@ -118,4 +120,7 @@ private:
 	uint32 Ssize[50];
 	int16 CurrentFrame;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index 7854ab4bd50..ca6884fdccb 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -23,39 +23,43 @@
 #include "chewy/chewy.h"
 #include "chewy/gedclass.h"
 
-	gedclass::gedclass(int16(*user_func)(int16 idx_nr)) {
-		warning("STUB - missing constructor gedclass");
-
-		ged_pool_header.Anz = 0;
-		ged_pool_header.Id[0] = 0;
-
-		GedUserFunc = nullptr;
-	}
-
-	gedclass::~gedclass() {
-		warning("STUB - missing destructor gedclass");
-	}
-
-	void gedclass::load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
-		warning("STUB - missing load_ged_pool");
-	}
-
-	//FIXME : was FILE*
-	void gedclass::load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
-		warning("STUB - missing load_ged_pool");
-	}
-
-	int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
-		warning("STUB - missing ged_idx");
-		return 0;
-	}
-
-	int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
-		warning("STUB - missing ged_idx");
-		return 0;
-	}
-
-	// FIXME : was FILE*
-	void gedclass::load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher) {
-		warning("STUB - missing load_ged_chunk");
-	}
+namespace Chewy {
+
+gedclass::gedclass(int16(*user_func)(int16 idx_nr)) {
+	warning("STUB - missing constructor gedclass");
+
+	ged_pool_header.Anz = 0;
+	ged_pool_header.Id[0] = 0;
+
+	GedUserFunc = nullptr;
+}
+
+gedclass::~gedclass() {
+	warning("STUB - missing destructor gedclass");
+}
+
+void gedclass::load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+	warning("STUB - missing load_ged_pool");
+}
+
+//FIXME : was FILE*
+void gedclass::load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+	warning("STUB - missing load_ged_pool");
+}
+
+int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
+	warning("STUB - missing ged_idx");
+	return 0;
+}
+
+int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
+	warning("STUB - missing ged_idx");
+	return 0;
+}
+
+// FIXME : was FILE*
+void gedclass::load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher) {
+	warning("STUB - missing load_ged_chunk");
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 3b9670ea172..7334dd69df3 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -25,8 +25,9 @@
 
 #include "chewy/ngstypes.h"
 
-class gedclass {
+namespace Chewy {
 
+class gedclass {
 public:
 	gedclass(int16(*user_func)(int16 idx_nr));
 	~gedclass();
@@ -47,4 +48,7 @@ private:
 	int16(*GedUserFunc)(int16 idx_nr);
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 284a5fc0672..b5dc76f4fb5 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -24,7 +24,6 @@
 #include "chewy/types.h"
 #include "chewy/defines.h"
 #include "chewy/ngshext.h"
-
 #include "chewy/objekt.h"
 #include "chewy/text.h"
 #include "chewy/room.h"
@@ -38,6 +37,8 @@
 #include "chewy/bitclass.h"
 #include "chewy/ailclass.h"
 
+namespace Chewy {
+
 #define MAX_RAND_NO_USE 6
 uint8 rand_no_use[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
 int16 pfeil_ani;
@@ -343,3 +344,5 @@ int16 CurrentSong = -1;
 int16 EndOfPool;
 /* FILE */ void *speech_handle;
 byte *SpeechBuf[2];
+
+} // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index eb5871f76f4..ebdacecb3fa 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -36,6 +36,8 @@
 #include "chewy/effect.h"
 #include "chewy/ailclass.h"
 
+namespace Chewy {
+
 #define MAX_RAND_NO_USE 6
 
 extern uint8 rand_no_use[MAX_RAND_NO_USE];
@@ -499,4 +501,6 @@ void calc_person_ani();
 
 void load_room_music(int16 room_nr);
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 19c74165572..5da91dfca5a 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -28,6 +28,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 extern int16 room_start_nr;
 
 void standard_init() {
@@ -360,7 +362,7 @@ void error() {
 	err->msg();
 	tidy();
 
-	error("%s", msg.c_str());
+	::error("%s", msg.c_str());
 }
 
 void tidy() {
@@ -612,3 +614,5 @@ void sound_exit() {
 	}
 #endif
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 33d72c94b53..ac6fb6b85d5 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -28,8 +28,10 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
 #include "common/system.h"
-
 #include "chewy/io_game.h"
+
+namespace Chewy {
+
 extern int16 scr_w;
 
 io_game::io_game(mcga_grafik *iout, maus *iin, cursor *curp) {
@@ -729,3 +731,5 @@ void io_game::save_entry(int16 nr, char *fname) {
 		fclose(handle);
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 17a43c7635e..23715871b27 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -27,6 +27,8 @@
 #include "chewy/cursor.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 #ifdef ENGLISCH
 
 #define FSTRING1 "F1 Save\0"
@@ -112,4 +114,7 @@ private:
 	int16 switch_code;
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 7a80553d618..4f2b2c726e8 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -23,9 +23,12 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 #define NORMAL_PLAY 0
 #define SEQUENCE_PLAY 1
 #define PATTERN_PLAY 2
+
 void load_room_music(int16 room_nr) {
 	int16 ttp_index;
 	int16 volume;
@@ -212,3 +215,5 @@ void load_room_music(int16 room_nr) {
 		}
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 0e9119dea12..56aaa9710c6 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -26,6 +26,8 @@
 #include "chewy/main.h"
 #include "chewy/menus.h"
 
+namespace Chewy {
+
 #define AUSGANG_CHECK_PIX 8
 #define BLENDE1 1
 #define BLENDE2 2
@@ -2045,7 +2047,7 @@ ChewyFont::ChewyFont(Common::String filename) {
 	uint32 header = stream.readUint32BE();
 
 	if (header != headerFont)
-		error("Invalid resource - %s", filename.c_str());
+		::error("Invalid resource - %s", filename.c_str());
 
 	stream.skip(4);	// total memory
 	_count = stream.readUint16LE();
@@ -2110,3 +2112,5 @@ void ChewyFont::setDeltaX(uint16 deltaX) {
 ::Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
 	return _font->getLine(texts);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index aee03a93864..0e89ad72bb4 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -25,10 +25,11 @@
 
 #include "graphics/surface.h"
 #include "common/rect.h"
-
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 void game_main();
 void free_buffers();
 void plot_main_menu();
@@ -83,4 +84,6 @@ extern ChewyFont *_font6;
 extern ChewyFont *_font8;
 extern FontMgr *_fontMgr;
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 6f03c2fd34f..d627e727efe 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -23,6 +23,8 @@
 #include "chewy/maus.h"
 #include "common/textconsole.h"
 
+namespace Chewy {
+
 // FIXME. Externals
 uint8 mouse_show;
 uint8 mouse_links_los;
@@ -220,3 +222,5 @@ int16 maus::get_switch_code() {
 	}
 	return (switch_code);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index 8bf2bd2fcf2..070cee0f011 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -25,6 +25,8 @@
 
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 void set_new_kb_handler(kb_info *key);
 void set_old_kb_handler();
 void del_kb_puffer();
@@ -86,4 +88,7 @@ private:
 	kb_info *kb_info_blk;
 	in_zeiger inzeig;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index e1cdf9f0ca8..843b61ac649 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -23,6 +23,8 @@
 #include "chewy/chewy.h"
 #include "chewy/mcga.h"
 
+namespace Chewy {
+
 #define SETZEN 0
 #define UND 1
 #define ODER 2
@@ -1754,3 +1756,5 @@ int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
 #endif
 	return (error);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index fe5ce82d8b6..a2d6f64e8bc 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -26,6 +26,8 @@
 #include "chewy/maus.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 extern uint8 svga;
 
 void init_mcga();
@@ -193,4 +195,7 @@ private:
 	void itoa(int N, char *str, int base);
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 4d226d87fe5..ec5ccc5c9c4 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -29,6 +29,8 @@
 
 #include "chewy/memory.h"
 
+namespace Chewy {
+
 extern int16 modul;
 extern int16 fcode;
 uint32 imagesize[MAXSPRITE];
@@ -203,3 +205,5 @@ byte *memory::void_adr(const char *filename) {
 	}
 	return (ptr);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index 9bd820fe893..cc1fcc7f517 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -26,6 +26,8 @@
 #include "chewy/datei.h"
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 class memory {
 public:
 	memory();
@@ -44,4 +46,7 @@ private:
 
 	uint32 mem_avail;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index e504aee5c11..7c38fe9c904 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -24,6 +24,8 @@
 #include "chewy/global.h"
 #include "chewy/menus.h"
 
+namespace Chewy {
+
 void r44_look_news();
 void r58_look_cut_mag(int16 r_nr);
 
@@ -1030,3 +1032,5 @@ int16 del_invent_slot(int16 nr) {
 	}
 	return (ok);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/metaengine.cpp b/engines/chewy/metaengine.cpp
index 745f8da68f3..728940c1ae6 100644
--- a/engines/chewy/metaengine.cpp
+++ b/engines/chewy/metaengine.cpp
@@ -22,9 +22,7 @@
 #include "common/savefile.h"
 #include "common/system.h"
 #include "base/plugins.h"
-
 #include "engines/advancedDetector.h"
-
 #include "chewy/chewy.h"
 #include "chewy/detection.h"
 
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 54dd4d9f91b..c5f681ec82c 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -25,6 +25,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 #define LEFT_VECT -1
 #define RIGHT_VECT 1
 #define UP_VECT -gpkt->Breite
@@ -803,3 +805,5 @@ void movclass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 		om->Xyna[2][0] = 0;
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 7735236a922..67e68eea2ba 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_MOVCLASS_H
 #define CHEWY_MOVCLASS_H
 
+namespace Chewy {
+
 #define MAX_KNOTEN_PKT 15
 #define MOV_LINE_IDX 28
 #define MOV_LINE_KNOTEN 29
@@ -135,4 +137,7 @@ private:
 	GotoMovLine gml;
 	GotoPkt *gpkt;
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index cf01101849b..d7c32e6db84 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_NGSDEFS_H
 #define CHEWY_NGSDEFS_H
 
+namespace Chewy {
+
 #define MAXSPRITE 350
 #define NOSPEICHER 0
 #define MAXFONTBREITE 32
@@ -274,4 +276,6 @@
 #define I386dx 4
 #define I486 5
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 360d08b66f8..b0106ae5a8a 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -35,6 +35,8 @@
 #include "chewy/ailclass.h"
 #endif
 
+namespace Chewy {
+
 #define MAXPFAD 81
 
 class sblaster;
@@ -54,4 +56,6 @@ extern uint16 _stklen;
 extern int16 modul;
 extern int16 fcode;
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index fff1d7377b1..df38d925a8b 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -22,6 +22,8 @@
 
 #include "chewy/ngstypes.h"
 
+namespace Chewy {
+
 bool taf_dateiheader::load(Common::ReadStream *src) {
 	src->read(id, 4);
 	mode = src->readSint16LE();
@@ -33,3 +35,5 @@ bool taf_dateiheader::load(Common::ReadStream *src) {
 
 	return true;
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index ebc7425e88c..c0d3a5bc2bb 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -26,6 +26,8 @@
 #include "chewy/ngsdefs.h"
 #include "common/stream.h"
 
+namespace Chewy {
+
 typedef struct {
 	uint32 Len;
 	int16 StrAnz;
@@ -550,4 +552,7 @@ typedef struct {
 	uint16 sp;
 	uint16 ss;
 } real_regs;
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index 840b1f5f376..2133146603f 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_OBJEKT_H
 #define CHEWY_OBJEKT_H
 
+namespace Chewy {
+
 typedef struct {
 	int16 RoomNr;
 
@@ -137,4 +139,6 @@ typedef struct {
 #define OBJZU_KLEMMT 15
 #define SIB_GET_INV 16
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 515563427d6..e72aa55c214 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -30,6 +30,8 @@
 #include "chewy/ngshext.h"
 #include "chewy/objekte.h"
 
+namespace Chewy {
+
 int16 action_obj_tbl[] = {
 
 	30000, 5, 8, 13, 38,
@@ -574,3 +576,5 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 	}
 	return (ret);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/objekte.h b/engines/chewy/objekte.h
index 23073efeedd..c0111e1ed1c 100644
--- a/engines/chewy/objekte.h
+++ b/engines/chewy/objekte.h
@@ -25,6 +25,8 @@
 
 #include "chewy/objekt.h"
 
+namespace Chewy {
+
 #define ENDLOS_FLIP_FLOP 255
 
 #define LOAD_NEW_OBJ 1
@@ -110,4 +112,7 @@ private:
 	RoomExit *Re;
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 943f53cc4c6..de53d5f534e 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -30,16 +30,16 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 
 #include "common/system.h"
-
 #include "chewy/defines.h"
 #include "chewy/global.h"
-
 #include "chewy/ani_dat.h"
 #include "chewy/episode1.h"
 #include "chewy/episode2.h"
 #include "chewy/episode3.h"
 #include "chewy/episode4.h"
 
+namespace Chewy {
+
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 #define GITTER_BLITZEN 7
@@ -1718,3 +1718,5 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index 595ca62f25f..e4111c3382b 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -23,7 +23,6 @@
 #ifndef CHEWY_RESOURCE_H
 #define CHEWY_RESOURCE_H
 
-
 #include "common/scummsys.h"
 #include "common/file.h"
 #include "common/util.h"
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index a2f723c895c..38e81799d0b 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -31,6 +31,8 @@
 #include "chewy/room.h"
 #include "chewy/ngshext.h"
 
+namespace Chewy {
+
 Room::Room() {
 	int16 i;
 	room_timer.TimerAnz = 0;
@@ -462,3 +464,5 @@ void *Room::get_sound_handle() {
 		ret = 0;
 	return (ret);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 7b8497321a5..f7e9bae800b 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -25,6 +25,8 @@
 
 #include "chewy/objekt.h"
 
+namespace Chewy {
+
 #define MAX_ABLAGE 4
 
 #define ABLAGE_BLOCK_SIZE 64000l
@@ -146,4 +148,7 @@ private:
 	void *roomhandle[MAX_ROOM_HANDLE];
 
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 707678a1f3e..9a7075b1fbb 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -24,7 +24,6 @@
 #include "audio/mixer.h"
 #include "audio/decoders/raw.h"
 #include "common/system.h"
-
 #include "chewy/resource.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 99cd469f892..453d31fdb84 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -23,6 +23,8 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 
+namespace Chewy {
+
 #define ZOBJ_ANI_DETAIL 1
 #define ZOBJ_STATIC_DETAIL 2
 #define ZOBJ_INVENTAR 3
@@ -1142,3 +1144,5 @@ void calc_person_ani() {
 		}
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 7a4d39cee61..b16b3f5911f 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -21,15 +21,15 @@
  */
 
 #include "chewy/chewy.h"
-
 #include "chewy/defines.h"
 #include "chewy/global.h"
-
 #include "chewy/episode1.h"
 #include "chewy/episode2.h"
 #include "chewy/episode3.h"
 #include "chewy/episode4.h"
 
+namespace Chewy {
+
 int16 load_ads_dia(int16 dia_nr) {
 	int16 ret = false;
 
@@ -2123,3 +2123,5 @@ void calc_person_dia(int16 p_nr) {
 
 	}
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 02fea4eaf2a..9caef89e811 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -23,6 +23,8 @@
 #include "common/system.h"
 #include "chewy/text.h"
 
+namespace Chewy {
+
 text::text() {
 }
 text::~text() {
@@ -49,3 +51,5 @@ char *text::str_pos(char *txt_adr, int16 pos) {
 	}
 	return (ptr);
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index a4d72b55410..9b236e1bdad 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -23,8 +23,9 @@
 #ifndef CHEWY_TEXT_H
 #define CHEWY_TEXT_H
 
-class text {
+namespace Chewy {
 
+class text {
 public:
 	text();
 	~text();
@@ -32,6 +33,8 @@ public:
 	void crypt(char *txt, uint32 size);
 
 	char *str_pos(char *txt_adr, int16 pos);
-
 };
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 39afc93d253..efc6949874e 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -24,6 +24,8 @@
 #include "chewy/timer.h"
 #include "chewy/defines.h"
 
+namespace Chewy {
+
 static int16 timer_flag;
 static int16 timer_int;
 static int timer_count;
@@ -184,3 +186,5 @@ void timer::disable_timer() {
 void timer::enable_timer() {
 	timer_suspend = false;
 }
+
+} // namespace Chewy
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index dbe192bf321..a6e0554a5aa 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_TIMER_H
 #define CHEWY_TIMER_H
 
+namespace Chewy {
+
 #define SEC_1000_MODE 0
 #define SEC_100_MODE 1
 #define SEC_10_MODE 2
@@ -85,4 +87,6 @@ private:
 
 };
 
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 71a3bac9419..c128f038cc1 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -27,6 +27,8 @@
 #include "chewy/objekt.h"
 #include "chewy/detail.h"
 
+namespace Chewy {
+
 typedef struct {
 	uint8 Ats[ROOM_ATS_MAX * 3];
 	uint8 InvAts[MAX_MOV_OBJ * 3];
@@ -470,4 +472,6 @@ typedef struct {
 	uint16 CursorStatus : 1;
 } Flags;
 
+} // namespace Chewy
+
 #endif


Commit: 09dfd059324080012bf0ad2cf2114e830607f14c
    https://github.com/scummvm/scummvm/commit/09dfd059324080012bf0ad2cf2114e830607f14c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:43-08:00

Commit Message:
CHEWY: Convert typedef structs to structs

Changed paths:
    engines/chewy/atds.h
    engines/chewy/detail.h
    engines/chewy/movclass.h
    engines/chewy/ngstypes.h
    engines/chewy/objekt.h
    engines/chewy/room.h
    engines/chewy/sprite.cpp
    engines/chewy/timer.h
    engines/chewy/types.h


diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 96297f07da9..4c3c804e203 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -97,18 +97,18 @@ namespace Chewy {
 
 #define ADS_RESTART_BIT 4
 
-typedef struct {
+struct AdsDiaHeaders {
 	int16 Anz;
-} AdsDiaHeaders;
+};
 
-typedef struct {
+struct AdsBlock {
 	bool Show[ADS_MAX_BL_EIN];
 
 	uint8 Next[ADS_MAX_BL_EIN];
 	uint8 Steuer[ADS_MAX_BL_EIN];
-} AdsBlock;
+};
 
-typedef struct {
+struct AtdsVar {
 	byte *Font;
 	int16 Fvorx;
 	int16 Fhoehe;
@@ -124,7 +124,7 @@ typedef struct {
 	void *SpeechHandle;
 
 	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode);
-} AtdsVar;
+};
 
 #define IUID_IIB 0
 #define IUID_SIB 1
@@ -135,31 +135,31 @@ typedef struct {
 #define INV_USE_DEF 16
 #define INV_STRC_ANZ 30
 
-typedef struct {
+struct InvUse {
 	int16 ObjId;
 	int16 ObjNr;
 	int16 TxtNr;
-} InvUse;
+};
 
-typedef struct {
+struct AadInfo {
 	int16 X;
 	int16 Y;
 	int16 Color;
-} AadInfo;
+};
 
-typedef struct {
+struct AadTxtHeader {
 	int16 DiaNr;
 	int16 PerAnz;
 	int16 AMov;
 	int16 CurNr;
-} AadTxtHeader;
+};
 
-typedef struct {
+struct AadStrHeader {
 	int16 AkPerson;
 	int16 VocNr;
-} AadStrHeader;
+};
 
-typedef struct {
+struct AadVar {
 	int16 Dialog;
 
 	AadTxtHeader *TxtHeader;
@@ -169,16 +169,16 @@ typedef struct {
 	int16 StrNr;
 	int16 DelayCount;
 	int16 SilentCount;
-} AadVar;
+};
 
-typedef struct {
+struct AdsTxtHeader {
 	int16 DiaNr;
 	int16 PerAnz;
 	int16 AMov;
 	int16 CurNr;
-} AdsTxtHeader;
+};
 
-typedef struct {
+struct AdsVar {
 	int16 Dialog;
 	int16 AutoDia;
 	AdsTxtHeader *TxtHeader;
@@ -188,24 +188,24 @@ typedef struct {
 	int16 StrNr;
 	int16 DelayCount;
 	int16 SilentCount;
-} AdsVar;
+};
 
-typedef struct {
+struct AdsNextBlk {
 	int16 BlkNr;
 	int16 EndNr;
-} AdsNextBlk;
+};
 
-typedef struct {
+struct AtsTxtHeader {
 	int16 TxtNr;
 	int16 AMov;
 	int16 CurNr;
-} AtsTxtHeader;
+};
 
-typedef struct {
+struct AtsStrHeader {
 	int16 VocNr;
-} AtsStrHeader;
+};
 
-typedef struct {
+struct AtsVar {
 	bool Display;
 	AtsTxtHeader *TxtHeader;
 	AtsStrHeader *StrHeader;
@@ -215,18 +215,18 @@ typedef struct {
 	int16 TxtLen;
 	int16 Color;
 	int16 TxtMode;
-} AtsVar;
+};
 
-typedef struct {
+struct SplitStringRet {
 	char **StrPtr;
 	int16 *X;
 	int16 Y;
 	short Anz;
 	int16 Next;
 
-} SplitStringRet;
+};
 
-typedef struct {
+struct SplitStringInit {
 	char *Str;
 
 	int16 X;
@@ -237,7 +237,7 @@ typedef struct {
 
 	int16 Fvorx;
 	int16 FHoehe;
-} SplitStringInit;
+};
 
 class atdsys {
 
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index dcb2d67be4e..e08e6d7da34 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -34,7 +34,7 @@ namespace Chewy {
 
 #define MAX_AUTO_MOV 20
 
-typedef struct {
+struct RaumInfo {
 	uint8 RoomNr;
 	uint8 BildNr;
 
@@ -44,32 +44,31 @@ typedef struct {
 	char TafName[14];
 	uint8 ZoomFak;
 	uint8 Dummy;
+};
 
-} RaumInfo;
-
-typedef struct {
+struct RaumAutoMov {
 	int16 X;
 	int16 Y;
 	uint8 SprNr;
 
 	uint8 dummy;
-} RaumAutoMov;
+};
 
 #define MAXTAF 10
 #define MAXDETAILS 32
 #define MAX_M_ITEMS 50
 #define MAX_RDI_ROOM 100
 
-typedef struct {
+struct SprInfo {
 	byte *Image;
 	int16 ZEbene;
 	int16 X;
 	int16 Y;
 	int16 X1;
 	int16 Y1;
-} SprInfo;
+};
 
-typedef struct {
+struct sound_def_blk {
 	int16 sound_enable[MAX_SOUNDS];
 	int16 sound_index [MAX_SOUNDS];
 	int16 sound_start [MAX_SOUNDS];
@@ -77,9 +76,9 @@ typedef struct {
 	int16 volume [MAX_SOUNDS];
 	int16 repeats [MAX_SOUNDS];
 	int16 stereo [MAX_SOUNDS];
-} sound_def_blk;
+};
 
-typedef struct {
+struct ani_detail_info {
 	int16 x;
 	int16 y;
 
@@ -104,10 +103,9 @@ typedef struct {
 	int16 show_1_phase;
 
 	int16 phase_nr;
+};
 
-} ani_detail_info;
-
-typedef struct {
+struct static_detail_info {
 	int16 x;
 	int16 y;
 	int16 SprNr;
@@ -117,9 +115,9 @@ typedef struct {
 	bool Hide;
 
 	uint8 Dummy;
-} static_detail_info;
+};
 
-typedef struct {
+struct room_detail_info {
 	int16 StaticDetailAnz;
 	int16 AniDetailAnz;
 	taf_info *dptr;
@@ -131,15 +129,15 @@ typedef struct {
 	RaumAutoMov AutoMov[MAX_AUTO_MOV];
 	int16 tvp_index[MAXDETAILS * MAX_SOUNDS];
 	byte *sample[MAXDETAILS * MAX_SOUNDS];
-} room_detail_info;
+};
 
-typedef struct {
+struct RdiDateiHeader {
 	char Id[4];
 	int16 Anz;
-} RdiDateiHeader;
+};
 
 #define MAXPATH 255
-typedef struct {
+struct DeteditPrj {
 	char Id[7];
 	char IibFile[MAXPATH];
 	char SibFile[MAXPATH];
@@ -157,7 +155,7 @@ typedef struct {
 	char AdhFile[MAXPATH];
 	char TvpFile[MAXPATH];
 	char DummyFile[MAXPATH];
-} DeteditPrj;
+};
 
 class detail {
 public:
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 67e68eea2ba..5746fea33d4 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -34,7 +34,7 @@ namespace Chewy {
 #define MLE_DOWN 2
 #define MLE_LEFT 3
 
-typedef struct {
+struct MovInfo {
 	int16 XyzStart[3];
 	int16 XyzEnd[3];
 
@@ -47,10 +47,9 @@ typedef struct {
 	uint8 Id;
 
 	uint8 Mode;
+};
 
-} MovInfo;
-
-typedef struct {
+struct ObjMov {
 	int16 Xypos[3];
 	int16 Xyvo [3];
 	int16 Xyna [3][2];
@@ -66,9 +65,9 @@ typedef struct {
 	int16 Xzoom;
 	int16 Yzoom;
 	int16 StNr;
-} ObjMov;
+};
 
-typedef struct {
+struct GotoPkt {
 	int16 Sx;
 	int16 Sy;
 	int16 Dx;
@@ -79,23 +78,22 @@ typedef struct {
 	int16 Ebenen;
 	int16 AkMovEbene;
 	int16 Vorschub;
-} GotoPkt;
+};
 
-typedef struct {
+struct GotoMovLine {
 	int16 GotoFeld;
 
 	int16 MLineFeld;
-} GotoMovLine;
+};
 
-typedef struct {
+struct MovLineExit {
 	int16 Steps;
 	int16 Direction;
 	int16 FNr;
 	int16 KnPkt[MAX_KNOTEN_PKT];
+};
 
-} MovLineExit;
-
-typedef struct {
+struct AutoGoVar {
 	bool AutoGo;
 	bool Continue;
 
@@ -108,10 +106,9 @@ typedef struct {
 
 	int16 AkFeld;
 	int16 AkKnoten;
-} AutoGoVar;
+};
 
 class movclass {
-
 public:
 	movclass();
 	~movclass();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index c0d3a5bc2bb..291dafc7b25 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -28,18 +28,18 @@
 
 namespace Chewy {
 
-typedef struct {
+struct TxtChunk {
 	uint32 Len;
 	int16 StrAnz;
-} TxtChunk;
+};
 
-typedef struct {
+struct TcfHeader {
 	char Id[3];
 	uint8 Crypt;
 	int16 Anz;
-} TcfHeader;
+};
 
-typedef struct {
+struct pcx_header {
 	char id;
 	char version;
 	char komp;
@@ -58,9 +58,9 @@ typedef struct {
 	int16 screenx;
 	int16 screeny;
 	char dummy[54];
-} pcx_header;
+};
 
-typedef struct {
+struct tbf_dateiheader {
 	char id[4];
 	int16 mode;
 	int16 komp;
@@ -68,7 +68,7 @@ typedef struct {
 	uint16 width;
 	uint16 height;
 	char palette [768];
-} tbf_dateiheader;
+};
 
 struct taf_dateiheader {
 	char id[4] = { 0 };
@@ -90,26 +90,26 @@ struct taf_imageheader {
 	uint32 image = 0;
 };
 
-typedef struct {
+struct taf_info {
 	int16 anzahl;
 	byte *palette;
 	int16 *korrektur;
 	byte **image;
-} taf_info;
+};
 
-typedef struct {
+struct taf_seq_info {
 	int16 anzahl;
 	int16 *korrektur;
 	byte **image;
-} taf_seq_info;
+};
 
-typedef struct {
+struct NewPhead {
 	char id[4];
 	uint16 type;
 	uint16 PoolAnz;
-} NewPhead;
+};
 
-typedef struct {
+struct tff_header {
 	char id[4];
 	uint32 size;
 	int16 count;
@@ -117,13 +117,13 @@ typedef struct {
 	int16 last;
 	int16 width;
 	int16 height;
-} tff_header;
+};
 
 #define D_GR 16
 #define MAXMENUE 50
 #define MAXKNOPF 400
 
-typedef struct {
+struct knopf {
 	int16 typ;
 	int16 enable;
 	int16 x1;
@@ -141,9 +141,9 @@ typedef struct {
 
 	int16 textptr;
 
-} knopf;
+};
 
-typedef struct {
+struct menue {
 	int16 nr;
 	int16 disp;
 	int16 typ;
@@ -156,17 +156,17 @@ typedef struct {
 	int16 spritenr;
 	char *sprite;
 	char *spritesave;
-} menue;
+};
 
-typedef struct {
+struct dialogue {
 	char id[4];
 	int16 anzmenue;
 	menue *menueliste[MAXMENUE];
 	char menuetaf[D_GR];
 	char knopftaf[D_GR];
-} dialogue;
+};
 
-typedef struct {
+struct sbi_inst {
 	uint8 id[4];
 	uint8 name[32];
 	uint8 modmulti;
@@ -181,33 +181,33 @@ typedef struct {
 	uint8 carrw;
 	uint8 rv;
 	uint8 frei[5];
-} sbi_inst;
+};
 
-typedef struct {
+struct voc_header {
 	char id[0x14];
 	uint16 offset;
 	uint8 ver_low;
 	uint8 ver_high;
 	uint16 id_code;
-} voc_header;
+};
 
-typedef struct {
+struct maus_info {
 	int16 x;
 	int16 y;
 	int16 button;
-} maus_info;
+};
 
-typedef struct {
+struct kb_info {
 	char key_code;
 	byte scan_code;
-} kb_info;
+};
 
-typedef struct {
+struct in_zeiger {
 	maus_info *minfo;
 	kb_info *kbinfo;
-} in_zeiger;
+};
 
-typedef struct {
+struct sb_vars {
 	uint16 sbase;
 	int16 SbIrq;
 	int16 DmaKanal;
@@ -219,9 +219,9 @@ typedef struct {
 	uint8 DmaDisable;
 	uint8 IrqEnable;
 	uint8 IrqDisable;
-} sb_vars;
+};
 
-typedef struct {
+struct mod_inst {
 	char name[22];
 	uint16 laenge;
 	char finetune;
@@ -229,53 +229,53 @@ typedef struct {
 	char insvol;
 	int16 repstart;
 	int16 replen;
-} mod_inst;
+};
 
-typedef struct {
+struct mod_header {
 	char name[20];
 	mod_inst instrument[31];
 	char pattern_anz;
 	char dummy;
 	char sequenz[128];
 	char id[4];
-} mod_header;
+};
 
-typedef struct {
+struct mod15_header {
 	char name[20];
 	mod_inst instrument[15];
 	char pattern_anz;
 	char dummy;
 	char sequenz[128];
 	char id[4];
-} mod15_header;
+};
 
-typedef struct {
+struct tmf_inst {
 	uint8 finetune;
 	uint8 insvol;
 	uint32 repstart;
 	uint32 replen;
 	uint32 laenge;
-} tmf_inst;
+};
 
-typedef struct {
+struct tmf_header {
 	char id[4];
 	tmf_inst instrument[31];
 	uint8 lied_len;
 	uint8 pattern_anz;
 	uint8 sequenz[128];
 	byte *ipos[31];
-} tmf_header;
+};
 
-typedef struct {
+struct musik_info {
 	int16 musik_playing;
 	int16 play_mode;
 	int16 pattern_line;
 	int16 sequence_pos;
 	int16 cur_pattnr;
 	char *cur_pattern;
-} musik_info;
+};
 
-typedef struct {
+struct channel_info {
 	uint8 finetune;
 	uint8 volume;
 	uint32 repstart;
@@ -283,15 +283,15 @@ typedef struct {
 	uint32 len;
 	uint32 pointer;
 	uint32 pos;
-} channel_info;
+};
 
-typedef struct {
+struct himem_block {
 	uint8 install;
 	char version[5];
 	uint32 size;
-} himem_block;
+};
 
-typedef struct {
+struct VesaInfo {
 	int16 ModeNr;
 	int16 ModeAvail;
 	int16 WriteWin;
@@ -304,9 +304,9 @@ typedef struct {
 	uint32 ScreenSize;
 	uint32 CopyRest;
 	char dummy[10];
-} VesaInfo;
+};
 
-typedef struct {
+struct vesa_status_block {
 	uint8 id[4];
 	uint8 ver_low;
 	uint8 ver_high;
@@ -322,9 +322,9 @@ typedef struct {
 	char *ProductRev;
 	char dummy [222];
 	char OemData[256];
-} vesa_status_block;
+};
 
-typedef struct {
+struct vesa_modus_block {
 	uint16 mflag;
 
 	uint8 fw_flag;
@@ -347,9 +347,9 @@ typedef struct {
 	uint8 model;
 	uint8 blksize;
 	char dummy[100];
-} vesa_modus_block;
+};
 
-typedef struct {
+struct DetectInfo {
 	int16 Adlib;
 	int16 Port;
 	int16 Irq;
@@ -375,9 +375,9 @@ typedef struct {
 
 	int16 Fpu;
 	int16 Manuell;
-} DetectInfo;
+};
 
-typedef struct {
+struct iog_init {
 	char id[4];
 	char save_path[30];
 
@@ -392,10 +392,9 @@ typedef struct {
 	void (*save_funktion)(void *handle); // FIXME - (FILE *handle);
 	void (*load_funktion)(void *handle); // FIXME - (FILE *handle);
 	int16 delay;
+};
 
-} iog_init;
-
-typedef struct {
+struct iot_init {
 	int16 popx;
 	int16 popy;
 	char *m_col;
@@ -408,44 +407,42 @@ typedef struct {
 	int16(*save_funktion)(char *fname);
 	int16(*load_funktion)(char *fname);
 	int16 delay;
+};
 
-} iot_init;
-
-typedef struct {
+struct mem_info_blk {
 	uint32 size;
 	uint32 akt_size;
 	uint32 biggest_block;
 	uint32 start;
-} mem_info_blk;
+};
 
-typedef struct {
+struct far_taf_info {
 	int16 anzahl;
 	uint32 palette;
 	uint32 korrektur;
 	uint32 *image;
-} far_taf_info;
+};
 
-typedef struct {
+struct GedPoolHeader {
 	char Id[4];
 	int16 Anz;
-} GedPoolHeader;
+};
 
-typedef struct {
+struct GedChunkHeader {
 	uint32 Len;
 	int16 X;
 	int16 Y;
 	int16 Ebenen;
-} GedChunkHeader;
-
-typedef struct {
+};
 
+struct GedHeader {
 	char Id[4];
 	int16 X;
 	int16 Y;
 	uint32 Len;
-} GedHeader;
+};
 
-typedef struct {
+struct cur_blk {
 	int16 page_off_x;
 	int16 page_off_y;
 	byte *cur_back;
@@ -453,15 +450,15 @@ typedef struct {
 	int16 ysize;
 	byte **sprite;
 	bool no_back;
-} cur_blk;
+};
 
-typedef struct {
+struct cur_ani {
 	uint8 ani_anf;
 	uint8 ani_end;
 	int16 delay;
-} cur_ani;
+};
 
-typedef struct {
+struct fcur_blk {
 	int16 page_off_x;
 	int16 page_off_y;
 	uint32 cur_back;
@@ -469,9 +466,9 @@ typedef struct {
 	int16 ysize;
 	uint32 *sprite;
 	bool no_back;
-} fcur_blk;
+};
 
-typedef struct {
+struct FlicHead {
 	uint32 size;
 	uint16 type;
 	uint16 frames;
@@ -491,21 +488,21 @@ typedef struct {
 	uint32 oframe1;
 	uint32 oframe2;
 	uint8 reserved3[40];
-} FlicHead;
+};
 
-typedef struct {
+struct FrameHead {
 	uint32 size;
 	uint16 type;
 	uint16 chunks;
 	uint8 reserved[8];
-} FrameHead;
+};
 
-typedef struct {
+struct ChunkHead {
 	uint32 size;
 	uint16 type;
-} ChunkHead;
+};
 
-typedef struct {
+struct CustomFlicHead {
 	char id[4];
 	uint32 size;
 	uint16 frames;
@@ -513,15 +510,15 @@ typedef struct {
 	uint16 height;
 	uint32 speed;
 	uint32 oframe1;
-} CustomFlicHead;
+};
 
-typedef struct {
+struct CustomFrameHead {
 	uint32 size;
 	uint16 type;
 	uint16 chunks;
-} CustomFrameHead;
+};
 
-typedef struct {
+struct CustomInfo {
 	char *Fname;
 	// FIXME: Was FILE
 	void *Handle;
@@ -531,9 +528,9 @@ typedef struct {
 	byte *MusicSlot;
 	uint32 MaxSoundSize;
 	uint32 MaxMusicSize;
-} CustomInfo;
+};
 
-typedef struct {
+struct real_regs {
 	uint32 edi;
 	uint32 esi;
 	uint32 ebp;
@@ -551,7 +548,7 @@ typedef struct {
 	uint16 cs;
 	uint16 sp;
 	uint16 ss;
-} real_regs;
+};
 
 } // namespace Chewy
 
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index 2133146603f..0098bb33119 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -25,7 +25,7 @@
 
 namespace Chewy {
 
-typedef struct {
+struct RoomMovObjekt {
 	int16 RoomNr;
 
 	int16 X;
@@ -55,16 +55,15 @@ typedef struct {
 	uint8 HeldHide;
 
 	int16 ZEbene;
+};
 
-} RoomMovObjekt;
-
-typedef struct {
+struct IibDateiHeader {
 	char Id[4];
 	char Tafname[14];
 	uint32 Size;
-} IibDateiHeader;
+};
 
-typedef struct {
+struct RoomStaticInventar {
 	int16 RoomNr;
 
 	int16 X;
@@ -92,15 +91,14 @@ typedef struct {
 	int16 StaticAk;
 
 	int16 StaticOff;
+};
 
-} RoomStaticInventar;
-
-typedef struct {
+struct SibDateiHeader {
 	char Id[4];
 	int16 Anz;
-} SibDateiHeader;
+};
 
-typedef struct {
+struct RoomExit {
 	int16 RoomNr;
 	int16 X;
 	int16 Y;
@@ -115,12 +113,12 @@ typedef struct {
 	uint8 Attribut;
 
 	uint8 dummy;
-} RoomExit;
+};
 
-typedef struct {
+struct EibDateiHeader {
 	char Id[4];
 	int16 Anz;
-} EibDateiHeader;
+};
 
 #define OBJZU_AUF 0
 #define OBJZU_ZU 1
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index f7e9bae800b..5e68cd95b0a 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -39,7 +39,7 @@ namespace Chewy {
 #define R_GEPDATEI 2
 #define R_SPEZTAF 3
 
-typedef struct {
+struct RaumBlk {
 	byte *LowPalMem;
 	const char *InvFile;
 	const char *DetFile;
@@ -56,19 +56,18 @@ typedef struct {
 	taf_info *Fti;
 	int16 AadLoad;
 	int16 AtsLoad;
-} RaumBlk;
+};
 
-typedef struct {
+struct RaumTimer {
 	int16 TimerStart;
 	int16 TimerAnz;
 
 	uint8 ObjNr[MAX_ROOM_TIMER];
 
 	uint8 TimerNr[MAX_ROOM_TIMER];
-} RaumTimer;
+};
 
 class Room {
-
 public:
 	Room();
 	~Room();
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 453d31fdb84..b50997c094d 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -35,11 +35,11 @@ namespace Chewy {
 #define ZOBJ_NICHELLE 8
 #define MAX_ZOBJ 60
 
-typedef struct {
+struct ZObjSort {
 	uint8 ObjArt;
 	uint8 ObjNr;
 	int16 ObjZ;
-} ZObjSort;
+};
 
 int16 z_count;
 ZObjSort z_obj_sort[MAX_ZOBJ];
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index a6e0554a5aa..67cd42fc859 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -38,7 +38,7 @@ namespace Chewy {
 
 #define TIMER_UNFREEZE 3
 
-typedef struct {
+struct TimerBlk {
 	int16 TimeCount;
 
 	int16 TimeEnd;
@@ -48,11 +48,9 @@ typedef struct {
 	int16 TimeMode;
 
 	int16 TimeStatus;
-
-} TimerBlk;
+};
 
 class timer {
-
 public:
 	timer(int16 max_timer, TimerBlk *t);
 	~timer();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index c128f038cc1..66fc1ff57ce 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -29,7 +29,7 @@
 
 namespace Chewy {
 
-typedef struct {
+struct Spieler {
 	uint8 Ats[ROOM_ATS_MAX * 3];
 	uint8 InvAts[MAX_MOV_OBJ * 3];
 	uint8 InvUse[INV_USE_ATS_MAX * 3];
@@ -402,13 +402,14 @@ typedef struct {
 	bool SpeechSwitch;
 	uint8 FramesPerSecond;
 	bool DisplayText;
-} Spieler;
+};
 
-typedef struct {
+struct AutoMov {
 	int16 X;
 	int16 Y;
-} AutoMov;
-typedef struct {
+};
+
+struct MovPhasen {
 	int16 AtsText;
 	int16 Phase[4][2];
 
@@ -417,16 +418,15 @@ typedef struct {
 
 	uint8 ZoomFak;
 	uint8 Start;
+};
 
-} MovPhasen;
-
-typedef struct {
+struct MovLine {
 	int16 EndXyz[3];
 	uint8 PhNr;
 	uint8 Vorschub;
-} MovLine;
+};
 
-typedef struct {
+struct AniBlock {
 	int16 Nr;
 	uint8 Repeat;
 	uint8 Dir;
@@ -434,9 +434,9 @@ typedef struct {
 	uint8 Mode;
 
 	uint8 Dummy;
-} AniBlock;
+};
 
-typedef struct {
+struct Flags {
 	uint16 StopAutoObj : 1;
 	uint16 AniUserAction : 1;
 	uint16 AutoAniPlay : 1;
@@ -470,7 +470,7 @@ typedef struct {
 	uint16 NoShad : 1;
 	uint16 SavePersonRnr : 1;
 	uint16 CursorStatus : 1;
-} Flags;
+};
 
 } // namespace Chewy
 


Commit: e8dd2571788e05b64ee53ee863e5b4f6b62b8942
    https://github.com/scummvm/scummvm/commit/e8dd2571788e05b64ee53ee863e5b4f6b62b8942
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:44-08:00

Commit Message:
CHEWY: Adding load methods to ngstypes structures

Changed paths:
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index df38d925a8b..7df5ebdd41d 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -24,7 +24,42 @@
 
 namespace Chewy {
 
-bool taf_dateiheader::load(Common::ReadStream *src) {
+bool pcx_header::load(Common::SeekableReadStream *src) {
+	id = src->readByte();
+	version = src->readByte();
+	komp = src->readByte();
+	bpp = src->readByte();
+	xmin = src->readSint16LE();
+	ymin = src->readSint16LE();
+	xmax = src->readSint16LE();
+	ymax = src->readSint16LE();
+	hodpi = src->readSint16LE();
+	verdpi = src->readSint16LE();
+	src->read(lcmap, 16 * 3);
+	reserviert = src->readByte();
+	planes = src->readByte();
+	bpz = src->readSint16LE();
+	palinfo = src->readSint16LE();
+	screenx = src->readSint16LE();
+	screeny = src->readSint16LE();
+	src->read(dummy, 54);
+
+	return true;
+}
+
+bool tbf_dateiheader::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	mode = src->readSint16LE();
+	komp = src->readSint16LE();
+	entpsize = src->readUint32LE();
+	width = src->readUint16LE();
+	height = src->readUint16LE();
+	src->read(palette, 768);
+
+	return true;
+}
+
+bool taf_dateiheader::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	mode = src->readSint16LE();
 	count = src->readSint16LE();
@@ -36,4 +71,179 @@ bool taf_dateiheader::load(Common::ReadStream *src) {
 	return true;
 }
 
+bool taf_imageheader::load(Common::SeekableReadStream *src) {
+	komp = src->readSint16LE();
+	width = src->readUint16LE();
+	height = src->readUint16LE();
+	next = src->readUint32LE();
+	image = src->readUint32LE();
+
+	return true;
+}
+
+bool NewPhead::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	type = src->readUint16LE();
+	PoolAnz = src->readUint16LE();
+
+	return true;
+}
+
+bool tff_header::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	size = src->readUint32LE();
+	count = src->readSint16LE();
+	first = src->readSint16LE();
+	last = src->readSint16LE();
+	width = src->readSint16LE();
+	height = src->readSint16LE();
+
+	return true;
+}
+
+bool knopf::load(Common::SeekableReadStream *src) {
+	typ = src->readSint16LE();
+	enable = src->readSint16LE();
+	x1 = src->readSint16LE();
+	y1 = src->readSint16LE();
+	x2 = src->readSint16LE();
+	y2 = src->readSint16LE();
+	spritenr1 = src->readSint16LE();
+	spritenr2 = src->readSint16LE();
+	src->skip(4);
+	storlen = src->readSint16LE();
+	viewspr3 = src->readSint16LE();
+	textptr = src->readSint16LE();
+
+	return true;
+}
+
+bool menue::load(Common::SeekableReadStream *src) {
+	nr = src->readSint16LE();
+	disp = src->readSint16LE();
+	typ = src->readSint16LE();
+	x = src->readSint16LE();
+	y = src->readSint16LE();
+	width = src->readSint16LE();
+	height = src->readSint16LE();
+	anzknoepfe = src->readSint16LE();
+	src->skip(4 * MAXKNOPF);
+	spritenr = src->readSint16LE();
+	src->readUint32LE();
+	src->readUint32LE();
+
+	return true;
+}
+
+bool dialogue::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	anzmenue = src->readSint16LE();
+	src->skip(4 * MAXMENUE);
+	src->read(menuetaf, D_GR);
+	src->read(knopftaf, D_GR);
+
+	return true;
+}
+
+bool dialogue::save(Common::WriteStream *dest) {
+	dest->write(id, 4);
+	dest->writeSint16LE(anzmenue);
+	for (int i = 0; i < MAXMENUE; ++i)
+		dest->writeUint32LE(0);
+	dest->write(menuetaf, D_GR);
+	dest->write(knopftaf, D_GR);
+
+	return true;
+}
+
+bool sbi_inst::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	src->read(name, 32);
+	modmulti = src->readByte();
+	carrmulti = src->readByte();
+	modamp = src->readByte();
+	carramp = src->readByte();
+	modad = src->readByte();
+	carrad = src->readByte();
+	modsr = src->readByte();
+	carrsr = src->readByte();
+	modw = src->readByte();
+	carrw = src->readByte();
+	rv = src->readByte();
+	src->read(frei, 5);
+
+	return true;
+}
+
+bool voc_header::load(Common::SeekableReadStream *src) {
+	src->read(id, 0x14);
+	offset = src->readUint16LE();
+	ver_low = src->readByte();
+	ver_high = src->readByte();
+	id_code = src->readUint16LE();
+
+	return true;
+}
+
+bool mod_inst::load(Common::SeekableReadStream *src) {
+	src->read(name, 22);
+	laenge = src->readUint16LE();
+	finetune = src->readSByte();
+	insvol = src->readSByte();
+	repstart = src->readSint16LE();
+	replen = src->readSint16LE();
+
+	return true;
+}
+
+bool mod_header::load(Common::SeekableReadStream *src) {
+	src->read(name, 20);
+	for (int i = 0; i < 31; ++i) {
+		if (!instrument[i].load(src))
+			return false;
+	}
+
+	pattern_anz = src->readSByte();
+	dummy = src->readSByte();
+	src->read(sequenz, 128);
+	src->read(id, 4);
+
+	return true;
+}
+
+bool mod15_header::load(Common::SeekableReadStream *src) {
+	src->read(name, 20);
+	for (int i = 0; i < 15; ++i)
+		instrument[i].load(src);
+	pattern_anz = src->readSByte();
+	dummy = src->readSByte();
+	src->read(sequenz, 128);
+	src->read(id, 4);
+
+	return true;
+}
+
+bool tmf_inst::load(Common::SeekableReadStream *src) {
+	finetune = src->readByte();
+	insvol = src->readByte();
+	repstart = src->readUint32LE();
+	replen = src->readUint32LE();
+	laenge = src->readUint32LE();
+
+	return true;
+}
+
+bool tmf_header::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	for (int i = 0; i < 31; ++i)
+		instrument[i].load(src);
+
+	lied_len = src->readByte();
+	pattern_anz = src->readByte();
+	src->read(sequenz, 128);
+	src->skip(4 * 31);
+
+	return true;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 291dafc7b25..942b40aaca1 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -28,46 +28,39 @@
 
 namespace Chewy {
 
-struct TxtChunk {
-	uint32 Len;
-	int16 StrAnz;
-};
-
-struct TcfHeader {
-	char Id[3];
-	uint8 Crypt;
-	int16 Anz;
-};
-
 struct pcx_header {
-	char id;
-	char version;
-	char komp;
-	char bpp;
-	int16 xmin;
-	int16 ymin;
-	int16 xmax;
-	int16 ymax;
-	int16 hodpi;
-	int16 verdpi;
-	char lcmap[16 * 3];
-	char reserviert;
-	char planes;
-	int16 bpz;
-	int16 palinfo;
-	int16 screenx;
-	int16 screeny;
-	char dummy[54];
+	int8 id = 0;
+	int8 version = 0;
+	int8 komp = 0;
+	int8 bpp = 0;
+	int16 xmin = 0;
+	int16 ymin = 0;
+	int16 xmax = 0;
+	int16 ymax = 0;
+	int16 hodpi = 0;
+	int16 verdpi = 0;
+	int8 lcmap[16 * 3] = { 0 };
+	int8 reserviert = 0;
+	int8 planes = 0;
+	int16 bpz = 0;
+	int16 palinfo = 0;
+	int16 screenx = 0;
+	int16 screeny = 0;
+	byte dummy[54];
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct tbf_dateiheader {
-	char id[4];
-	int16 mode;
-	int16 komp;
-	uint32 entpsize;
-	uint16 width;
-	uint16 height;
-	char palette [768];
+	char id[4] = { 0 };
+	int16 mode = 0;
+	int16 komp = 0;
+	uint32 entpsize = 0;
+	uint16 width = 0;
+	uint16 height = 0;
+	char palette[768];
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct taf_dateiheader {
@@ -79,7 +72,7 @@ struct taf_dateiheader {
 	uint32 next = 0;
 	int16 korrekt = 0;
 
-	bool load(Common::ReadStream *src);
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct taf_imageheader {
@@ -88,35 +81,41 @@ struct taf_imageheader {
 	uint16 height = 0;
 	uint32 next = 0;
 	uint32 image = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct taf_info {
-	int16 anzahl;
-	byte *palette;
-	int16 *korrektur;
-	byte **image;
+	int16 anzahl = 0;
+	byte *palette = nullptr;
+	int16 *korrektur = nullptr;
+	byte **image = nullptr;
 };
 
 struct taf_seq_info {
-	int16 anzahl;
-	int16 *korrektur;
-	byte **image;
+	int16 anzahl = 0;
+	int16 *korrektur = nullptr;
+	byte **image = nullptr;
 };
 
 struct NewPhead {
-	char id[4];
-	uint16 type;
-	uint16 PoolAnz;
+	char id[4] = { 0 };
+	uint16 type = 0;
+	uint16 PoolAnz = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct tff_header {
-	char id[4];
-	uint32 size;
-	int16 count;
-	int16 first;
-	int16 last;
-	int16 width;
-	int16 height;
+	char id[4] = { 0 };
+	uint32 size = 0;
+	int16 count = 0;
+	int16 first = 0;
+	int16 last = 0;
+	int16 width = 0;
+	int16 height = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 #define D_GR 16
@@ -124,51 +123,53 @@ struct tff_header {
 #define MAXKNOPF 400
 
 struct knopf {
-	int16 typ;
-	int16 enable;
-	int16 x1;
-	int16 y1;
-	int16 x2;
-	int16 y2;
-	int16 spritenr1;
-
-	int16 spritenr2;
-
-	char *inhalt1;
-	int16 storlen;
-
-	int16 viewspr3;
-
-	int16 textptr;
-
+	int16 typ = 0;
+	int16 enable = 0;
+	int16 x1 = 0;
+	int16 y1 = 0;
+	int16 x2 = 0;
+	int16 y2 = 0;
+	int16 spritenr1 = 0;
+	int16 spritenr2 = 0;
+	char *inhalt1 = nullptr;
+	int16 storlen = 0;
+	int16 viewspr3 = 0;
+	int16 textptr = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct menue {
-	int16 nr;
-	int16 disp;
-	int16 typ;
-	int16 x;
-	int16 y;
-	int16 width;
-	int16 height;
-	int16 anzknoepfe;
-	knopf *knopfliste[MAXKNOPF];
-	int16 spritenr;
-	char *sprite;
-	char *spritesave;
+	int16 nr = 0;
+	int16 disp = 0;
+	int16 typ = 0;
+	int16 x = 0;
+	int16 y = 0;
+	int16 width = 0;
+	int16 height = 0;
+	int16 anzknoepfe = 0;
+	knopf *knopfliste[MAXKNOPF] = { nullptr };
+	int16 spritenr = 0;
+	char *sprite = nullptr;
+	char *spritesave = nullptr;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct dialogue {
-	char id[4];
-	int16 anzmenue;
-	menue *menueliste[MAXMENUE];
-	char menuetaf[D_GR];
-	char knopftaf[D_GR];
+	char id[4] = { 0 };
+	int16 anzmenue = 0;
+	menue *menueliste[MAXMENUE] = { nullptr };
+	char menuetaf[D_GR] = { '\0' };
+	char knopftaf[D_GR] = { '\0' };
+
+	bool load(Common::SeekableReadStream *src);
+	bool save(Common::WriteStream *dest);
 };
 
 struct sbi_inst {
-	uint8 id[4];
-	uint8 name[32];
+	char id[4];
+	char name[32];
 	uint8 modmulti;
 	uint8 carrmulti;
 	uint8 modamp;
@@ -181,6 +182,8 @@ struct sbi_inst {
 	uint8 carrw;
 	uint8 rv;
 	uint8 frei[5];
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct voc_header {
@@ -189,36 +192,24 @@ struct voc_header {
 	uint8 ver_low;
 	uint8 ver_high;
 	uint16 id_code;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct maus_info {
-	int16 x;
-	int16 y;
-	int16 button;
+	int16 x = 0;
+	int16 y = 0;
+	int16 button = 0;
 };
 
 struct kb_info {
-	char key_code;
-	byte scan_code;
+	char key_code = '\0';
+	byte scan_code = 0;
 };
 
 struct in_zeiger {
-	maus_info *minfo;
-	kb_info *kbinfo;
-};
-
-struct sb_vars {
-	uint16 sbase;
-	int16 SbIrq;
-	int16 DmaKanal;
-	uint16 DmaPageReg;
-	uint16 DmaAdrReg;
-	uint16 DmaLenReg;
-	uint8 DmaMode;
-	uint8 DmaEnable;
-	uint8 DmaDisable;
-	uint8 IrqEnable;
-	uint8 IrqDisable;
+	maus_info *minfo = nullptr;
+	kb_info *kbinfo = nullptr;
 };
 
 struct mod_inst {
@@ -229,15 +220,19 @@ struct mod_inst {
 	char insvol;
 	int16 repstart;
 	int16 replen;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct mod_header {
-	char name[20];
+	char name[20] = { 0 };
 	mod_inst instrument[31];
-	char pattern_anz;
-	char dummy;
-	char sequenz[128];
-	char id[4];
+	char pattern_anz = 0;
+	char dummy = 0;
+	char sequenz[128] = { 0 };
+	char id[4] = { 0 };
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct mod15_header {
@@ -247,6 +242,8 @@ struct mod15_header {
 	char dummy;
 	char sequenz[128];
 	char id[4];
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct tmf_inst {
@@ -255,299 +252,297 @@ struct tmf_inst {
 	uint32 repstart;
 	uint32 replen;
 	uint32 laenge;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct tmf_header {
-	char id[4];
+	char id[4] = { 0 };
 	tmf_inst instrument[31];
-	uint8 lied_len;
-	uint8 pattern_anz;
-	uint8 sequenz[128];
-	byte *ipos[31];
+	uint8 lied_len = 0;
+	uint8 pattern_anz = 0;
+	uint8 sequenz[128] = { 0 };
+	byte *ipos[31] = { nullptr };
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct musik_info {
-	int16 musik_playing;
-	int16 play_mode;
-	int16 pattern_line;
-	int16 sequence_pos;
-	int16 cur_pattnr;
-	char *cur_pattern;
+	int16 musik_playing = 0;
+	int16 play_mode = 0;
+	int16 pattern_line = 0;
+	int16 sequence_pos = 0;
+	int16 cur_pattnr = 0;
+	char *cur_pattern = nullptr;
 };
 
 struct channel_info {
-	uint8 finetune;
-	uint8 volume;
-	uint32 repstart;
-	uint32 replen;
-	uint32 len;
-	uint32 pointer;
-	uint32 pos;
-};
-
-struct himem_block {
-	uint8 install;
-	char version[5];
-	uint32 size;
+	uint8 finetune = 0;
+	uint8 volume = 0;
+	uint32 repstart = 0;
+	uint32 replen = 0;
+	uint32 len = 0;
+	uint32 pointer = 0;
+	uint32 pos = 0;
 };
 
 struct VesaInfo {
-	int16 ModeNr;
-	int16 ModeAvail;
-	int16 WriteWin;
-	uint32 WinSize;
-	int16 Page[20];
-	int16 PageAnz;
-	uint16 WriteSeg;
-	uint16 CallSeg;
-	uint16 CallOff;
-	uint32 ScreenSize;
-	uint32 CopyRest;
-	char dummy[10];
+	int16 ModeNr = 0;
+	int16 ModeAvail = 0;
+	int16 WriteWin = 0;
+	uint32 WinSize = 0;
+	int16 Page[20] = { 0 };
+	int16 PageAnz = 0;
+	uint16 WriteSeg = 0;
+	uint16 CallSeg = 0;
+	uint16 CallOff = 0;
+	uint32 ScreenSize = 0;
+	uint32 CopyRest = 0;
+	char dummy[10] = { 0 };
 };
 
 struct vesa_status_block {
-	uint8 id[4];
-	uint8 ver_low;
-	uint8 ver_high;
-	char *name;
-	uint32 lflag;
-	uint16 *codenrs;
+	uint8 id[4] = { 0 };
+	uint8 ver_low = 0;
+	uint8 ver_high = 0;
+	char *name = nullptr;
+	uint32 lflag = 0;
+	uint16 *codenrs = nullptr;
 
-	uint16 memory;
+	uint16 memory = 0;
 
-	char *SoftwareRev;
-	char *VendorName;
-	char *ProductName;
-	char *ProductRev;
-	char dummy [222];
-	char OemData[256];
+	char *SoftwareRev = nullptr;
+	char *VendorName = nullptr;
+	char *ProductName = nullptr;
+	char *ProductRev = nullptr;
+	char dummy[222] = { 0 };
+	char OemData[256] = { 0 };
 };
 
 struct vesa_modus_block {
-	uint16 mflag;
-
-	uint8 fw_flag;
-
-	uint8 fs_flag;
-
-	uint16 stepgr;
-	uint16 wsize;
-	uint16 fw_seg;
-	uint16 fs_seg;
-	void (*page_set)(int16 page);
-	uint16 scr_width;
-	uint16 x_charsize;
-	uint16 y_charsize;
-	uint8 x_charwidth;
-	uint8 y_charwidth;
-	uint8 planes;
-	uint8 bppix;
-	uint8 memblks;
-	uint8 model;
-	uint8 blksize;
-	char dummy[100];
+	uint16 mflag = 0;
+
+	uint8 fw_flag = 0;
+
+	uint8 fs_flag = 0;
+
+	uint16 stepgr = 0;
+	uint16 wsize = 0;
+	uint16 fw_seg = 0;
+	uint16 fs_seg = 0;
+	void (*page_set)(int16 page) = nullptr;
+	uint16 scr_width = 0;
+	uint16 x_charsize = 0;
+	uint16 y_charsize = 0;
+	uint8 x_charwidth = 0;
+	uint8 y_charwidth = 0;
+	uint8 planes = 0;
+	uint8 bppix = 0;
+	uint8 memblks = 0;
+	uint8 model = 0;
+	uint8 blksize = 0;
+	char dummy[100] = { 0 };
 };
 
 struct DetectInfo {
-	int16 Adlib;
-	int16 Port;
-	int16 Irq;
-	int16 Dma;
-	int16 SoundSource;
+	int16 Adlib = 0;
+	int16 Port = 0;
+	int16 Irq = 0;
+	int16 Dma = 0;
+	int16 SoundSource = 0;
 
-	int16 VideoRam;
-	int16 VgaDisplay;
+	int16 VideoRam = 0;
+	int16 VgaDisplay = 0;
 
-	int16 Ems;
-	int16 EmsVerV;
-	int16 EmsVerN;
-	int16 EmsPages;
-	int16 EmsFree;
-	char *EmsPage0;
-	char *EmsPage1;
-	char *EmsPage2;
-	char *EmsPage3;
-	int16 Joy;
+	int16 Ems = 0;
+	int16 EmsVerV = 0;
+	int16 EmsVerN = 0;
+	int16 EmsPages = 0;
+	int16 EmsFree = 0;
+	char *EmsPage0 = nullptr;
+	char *EmsPage1 = nullptr;
+	char *EmsPage2 = nullptr;
+	char *EmsPage3 = nullptr;
+	int16 Joy = 0;
 
-	int16 Himem;
-	int16 CpuId;
+	int16 Himem = 0;
+	int16 CpuId = 0;
 
-	int16 Fpu;
-	int16 Manuell;
+	int16 Fpu = 0;
+	int16 Manuell = 0;
 };
 
 struct iog_init {
-	char id[4];
-	char save_path[30];
+	char id[4] = { 0 };
+	char save_path[30] = { 0 };
 
-	int16 popx;
-	int16 popy;
-	char *m_col;
-	uint8 f1;
-	uint8 f2;
-	uint8 f3;
-	uint8 f4;
-	uint8 key_nr;
-	void (*save_funktion)(void *handle); // FIXME - (FILE *handle);
-	void (*load_funktion)(void *handle); // FIXME - (FILE *handle);
-	int16 delay;
+	int16 popx = 0;
+	int16 popy = 0;
+	char *m_col = nullptr;
+	uint8 f1 = 0;
+	uint8 f2 = 0;
+	uint8 f3 = 0;
+	uint8 f4 = 0;
+	uint8 key_nr = 0;
+	void (*save_funktion)(void *handle) = nullptr; // FIXME - (FILE *handle);
+	void (*load_funktion)(void *handle) = nullptr; // FIXME - (FILE *handle);
+	int16 delay = 0;
 };
 
 struct iot_init {
-	int16 popx;
-	int16 popy;
-	char *m_col;
-	char fname[81];
-	uint8 f1;
-	uint8 f2;
-	uint8 f3;
-	uint8 abbruch;
+	int16 popx = 0;
+	int16 popy = 0;
+	char *m_col = nullptr;
+	char fname[81] = { 0 };
+	uint8 f1 = 0;
+	uint8 f2 = 0;
+	uint8 f3 = 0;
+	uint8 abbruch = 0;
 
-	int16(*save_funktion)(char *fname);
-	int16(*load_funktion)(char *fname);
-	int16 delay;
+	int16(*save_funktion)(char *fname) = nullptr;
+	int16(*load_funktion)(char *fname) = nullptr;
+	int16 delay = 0;
 };
 
 struct mem_info_blk {
-	uint32 size;
-	uint32 akt_size;
-	uint32 biggest_block;
-	uint32 start;
+	uint32 size = 0;
+	uint32 akt_size = 0;
+	uint32 biggest_block = 0;
+	uint32 start = 0;
 };
 
 struct far_taf_info {
-	int16 anzahl;
-	uint32 palette;
-	uint32 korrektur;
-	uint32 *image;
+	int16 anzahl = 0;
+	uint32 palette = 0;
+	uint32 korrektur = 0;
+	uint32 *image = nullptr;
 };
 
 struct GedPoolHeader {
-	char Id[4];
-	int16 Anz;
+	char Id[4] = { 0 };
+	int16 Anz = 0;
 };
 
 struct GedChunkHeader {
-	uint32 Len;
-	int16 X;
-	int16 Y;
-	int16 Ebenen;
+	uint32 Len = 0;
+	int16 X = 0;
+	int16 Y = 0;
+	int16 Ebenen = 0;
 };
 
 struct GedHeader {
-	char Id[4];
-	int16 X;
-	int16 Y;
-	uint32 Len;
+	char Id[4] = { 0 };
+	int16 X = 0;
+	int16 Y = 0;
+	uint32 Len = 0;
 };
 
 struct cur_blk {
-	int16 page_off_x;
-	int16 page_off_y;
-	byte *cur_back;
-	int16 xsize;
-	int16 ysize;
-	byte **sprite;
-	bool no_back;
+	int16 page_off_x = 0;
+	int16 page_off_y = 0;
+	byte *cur_back = nullptr;
+	int16 xsize = 0;
+	int16 ysize = 0;
+	byte **sprite = nullptr;
+	bool no_back = false;
 };
 
 struct cur_ani {
-	uint8 ani_anf;
-	uint8 ani_end;
-	int16 delay;
+	uint8 ani_anf = 0;
+	uint8 ani_end = 0;
+	int16 delay = 0;
 };
 
 struct fcur_blk {
-	int16 page_off_x;
-	int16 page_off_y;
-	uint32 cur_back;
-	int16 xsize;
-	int16 ysize;
-	uint32 *sprite;
-	bool no_back;
+	int16 page_off_x = 0;
+	int16 page_off_y = 0;
+	uint32 cur_back = 0;
+	int16 xsize = 0;
+	int16 ysize = 0;
+	uint32 *sprite = nullptr;
+	bool no_back = false;
 };
 
 struct FlicHead {
-	uint32 size;
-	uint16 type;
-	uint16 frames;
-	uint16 width;
-	uint16 height;
-	uint16 depth;
-	uint16 flags;
-	uint32 speed;
-	uint16 reserved1;
-	uint32 created;
-	uint32 creator;
-	uint32 updated;
-	uint32 updater;
-	uint16 aspect_dx;
-	uint16 aspect_dy;
-	uint8 reserved2[38];
-	uint32 oframe1;
-	uint32 oframe2;
-	uint8 reserved3[40];
+	uint32 size = 0;
+	uint16 type = 0;
+	uint16 frames = 0;
+	uint16 width = 0;
+	uint16 height = 0;
+	uint16 depth = 0;
+	uint16 flags = 0;
+	uint32 speed = 0;
+	uint16 reserved1 = 0;
+	uint32 created = 0;
+	uint32 creator = 0;
+	uint32 updated = 0;
+	uint32 updater = 0;
+	uint16 aspect_dx = 0;
+	uint16 aspect_dy = 0;
+	uint8 reserved2[38] = { 0 };
+	uint32 oframe1 = 0;
+	uint32 oframe2 = 0;
+	uint8 reserved3[40] = { 0 };
 };
 
 struct FrameHead {
-	uint32 size;
-	uint16 type;
-	uint16 chunks;
-	uint8 reserved[8];
+	uint32 size = 0;
+	uint16 type = 0;
+	uint16 chunks = 0;
+	uint8 reserved[8] = { 0 };
 };
 
 struct ChunkHead {
-	uint32 size;
-	uint16 type;
+	uint32 size = 0;
+	uint16 type = 0;
 };
 
 struct CustomFlicHead {
-	char id[4];
-	uint32 size;
-	uint16 frames;
-	uint16 width;
-	uint16 height;
-	uint32 speed;
-	uint32 oframe1;
+	char id[4] = { 0 };
+	uint32 size = 0;
+	uint16 frames = 0;
+	uint16 width = 0;
+	uint16 height = 0;
+	uint32 speed = 0;
+	uint32 oframe1 = 0;
 };
 
 struct CustomFrameHead {
-	uint32 size;
-	uint16 type;
-	uint16 chunks;
+	uint32 size = 0;
+	uint16 type = 0;
+	uint16 chunks = 0;
 };
 
 struct CustomInfo {
-	char *Fname;
+	char *Fname = nullptr;
 	// FIXME: Was FILE
-	void *Handle;
-	byte *VirtScreen;
-	byte *TempArea;
-	byte *SoundSlot;
-	byte *MusicSlot;
-	uint32 MaxSoundSize;
-	uint32 MaxMusicSize;
+	void *Handle = nullptr;
+	byte *VirtScreen = 0;
+	byte *TempArea = 0;
+	byte *SoundSlot = 0;
+	byte *MusicSlot = 0;
+	uint32 MaxSoundSize = 0;
+	uint32 MaxMusicSize = 0;
 };
 
 struct real_regs {
-	uint32 edi;
-	uint32 esi;
-	uint32 ebp;
-	uint32 reserved;
-	uint32 ebx;
-	uint32 edx;
-	uint32 ecx;
-	uint32 eax;
-	uint16 flags;
-	uint16 es;
-	uint16 ds;
-	uint16 fs;
-	uint16 gs;
-	uint16 ip;
-	uint16 cs;
-	uint16 sp;
-	uint16 ss;
+	uint32 edi = 0;
+	uint32 esi = 0;
+	uint32 ebp = 0;
+	uint32 reserved = 0;
+	uint32 ebx = 0;
+	uint32 edx = 0;
+	uint32 ecx = 0;
+	uint32 eax = 0;
+	uint16 flags = 0;
+	uint16 es = 0;
+	uint16 ds = 0;
+	uint16 fs = 0;
+	uint16 gs = 0;
+	uint16 ip = 0;
+	uint16 cs = 0;
+	uint16 sp = 0;
+	uint16 ss = 0;
 };
 
 } // namespace Chewy


Commit: 598ab91667db133cd4c1ae9ce2c5fdcb5b70e644
    https://github.com/scummvm/scummvm/commit/598ab91667db133cd4c1ae9ce2c5fdcb5b70e644
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:45-08:00

Commit Message:
CHEWY: Create C file replacement methods to use ScummVM files

Changed paths:
  A engines/chewy/file.h
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/ch_icm.cpp
    engines/chewy/chewy.h
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/debug.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/fehler.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/memory.cpp
    engines/chewy/ngstypes.h
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 997827861b5..faead5dc72c 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -20,13 +20,9 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
-
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
+#include "chewy/file.h"
 #include "chewy/ngshext.h"
 
 namespace Chewy {
@@ -165,7 +161,7 @@ int16 StereoPos [8] = {63};
 char *Dbuffer [8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
 uint32 DbufferLen [8] = {0};
 uint32 DbSampleLen [8] = {0};
-FILE *DbufferHandles [8] = {0};
+Stream *DbufferHandles [8] = {0};
 
 ailclass::ailclass() {
 #if 0
@@ -608,17 +604,17 @@ void ailclass::start_db_voc(void *v, int16 kanal, int16 vol) {
 		memset(Dbuffer[kanal][0], 0, DbufferLen[kanal]);
 		memset(Dbuffer[kanal][1], 0, DbufferLen[kanal]);
 		do {
-			blockt = fgetc(voc);
+			blockt = chewy_fgetc(voc);
 			if (blockt > 7)
 				blockt = 8;
-			blocklen = (uint32) fgetc(voc);
-			blocklen += ((uint32)fgetc(voc)) << 8;
-			blocklen += ((uint32)fgetc(voc)) << 16;
+			blocklen = (uint32) chewy_fgetc(voc);
+			blocklen += ((uint32)chewy_fgetc(voc)) << 8;
+			blocklen += ((uint32)chewy_fgetc(voc)) << 16;
 			if (blockt != 1)
-				fseek(voc, blocklen, SEEK_CUR);
+				chewy_fseek(voc, blocklen, SEEK_CUR);
 		} while ((blockt != 1) && (blockt != 0));
 		if ((blockt == 1) && (!modul)) {
-			freq = fgetc(voc);
+			freq = chewy_fgetc(voc);
 			RealFrq = 1000000 / (256 - freq);
 			if (blocklen > DbufferLen[kanal]) {
 				DbufferHandles[kanal] = voc;
@@ -632,7 +628,7 @@ void ailclass::start_db_voc(void *v, int16 kanal, int16 vol) {
 				                       DbufferLen[kanal]);
 			} else {
 				DbSampleLen[kanal] = 0;
-				if (!fread(Dbuffer[kanal][0], blocklen, 1, voc)) {
+				if (!chewy_fread(Dbuffer[kanal][0], blocklen, 1, voc)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -669,7 +665,7 @@ void ailclass::serve_db_samples() {
 					len = DbSampleLen[i];
 					DbSampleLen[i] = 0;
 				}
-				if (!fread(Dbuffer[i][BufNr], len, 1, DbufferHandles[i])) {
+				if (!chewy_fread(Dbuffer[i][BufNr], len, 1, DbufferHandles[i])) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 73b064b8109..9efda02fac3 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -20,17 +20,10 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
-
 #include "chewy/ngshext.h"
 #include "chewy/atds.h"
 #include "chewy/defines.h"
+#include "chewy/file.h"
 #include "chewy/global.h"
 
 namespace Chewy {
@@ -281,9 +274,9 @@ void atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 	ssi[nr] = ssinit[0];
 }
 
-void *atdsys::pool_handle(const char *fname_, const char *fmode) {
-	FILE *handle;
-	handle = fopen(fname_, fmode);
+Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
+	Stream *handle;
+	handle = chewy_fopen(fname_, fmode);
 	if (handle) {
 		close_handle(ATDS_HANDLE);
 		atdshandle[ATDS_HANDLE] = handle;
@@ -295,11 +288,11 @@ void *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	return (handle);
 }
 
-void atdsys::set_speech_handle(void *speech_handle_) {
+void atdsys::set_speech_handle(Stream *speech_handle_) {
 	atdsv.SpeechHandle = speech_handle_;
 }
 
-void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chunk_start, int16 chunk_anz) {
+void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
 	char *tmp_adr;
 	ChunkHead Ch;
 	tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
@@ -312,16 +305,16 @@ void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chun
 			switch (mode) {
 			case INV_USE_DATEI:
 				mem->file->select_pool_item(atdshandle[mode], atdspooloff[mode]);
-				fseek((FILE *)atdshandle[mode], -(int)(sizeof(ChunkHead)), SEEK_CUR);
+				chewy_fseek(atdshandle[mode], -(int)(sizeof(ChunkHead)), SEEK_CUR);
 
-				if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[mode])) {
+				if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, atdshandle[mode])) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
 					inv_use_mem = (char *)calloc(Ch.size + 3l, 1);
 					if (!modul) {
 						if (Ch.size) {
-							if (!fread(inv_use_mem, Ch.size, 1, (FILE *)atdshandle[mode])) {
+							if (!chewy_fread(inv_use_mem, Ch.size, 1, atdshandle[mode])) {
 								fcode = READFEHLER;
 								modul = DATEI;
 							} else
@@ -341,13 +334,13 @@ void atdsys::set_handle(const char *fname_, int16 mode, void *handle, int16 chun
 }
 
 void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
-	FILE *handle;
+	Stream *handle;
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname_, 0, 20000);
 	if (!modul) {
-		handle = fopen(fname_, fmode);
+		handle = chewy_fopen(fname_, fmode);
 		if (handle) {
 			close_handle(mode);
 			atdshandle[mode] = handle;
@@ -372,7 +365,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 
 void atdsys::close_handle(int16 mode) {
 	if (atdshandle[mode])
-		fclose((FILE *)atdshandle[mode]);
+		chewy_fclose(atdshandle[mode]);
 	atdshandle[mode] = 0;
 	if (atdsmem[mode])
 		free(atdsmem[mode]);
@@ -391,20 +384,20 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 }
 
 void atdsys::load_atds(int16 chunk_nr, int16 mode) {
-	FILE *handle;
+	Stream *handle;
 	ChunkHead Ch;
 	char *txt_adr;
-	handle = (FILE *)atdshandle[mode];
+	handle = atdshandle[mode];
 	txt_adr = atdsmem[mode];
 	if (handle && txt_adr) {
 		mem->file->select_pool_item(handle, chunk_nr + atdspooloff[mode]);
-		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!fread(&Ch, sizeof(ChunkHead), 1, handle)) {
+		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+		if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (Ch.size) {
-				if (!fread(txt_adr, Ch.size, 1, handle)) {
+				if (!chewy_fread(txt_adr, Ch.size, 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else if (mode != ADH_DATEI)
@@ -425,14 +418,14 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	if (atdshandle[ADH_HANDLE]) {
 		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
 
-		fseek((FILE *)atdshandle[ADH_HANDLE], -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!fread(&Ch, sizeof(ChunkHead), 1, (FILE *)atdshandle[ADH_HANDLE])) {
+		chewy_fseek(atdshandle[ADH_HANDLE], -(int)sizeof(ChunkHead), SEEK_CUR);
+		if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, atdshandle[ADH_HANDLE])) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
-			fseek((FILE *)atdshandle[ADH_HANDLE], 0, SEEK_CUR);
+			chewy_fseek(atdshandle[ADH_HANDLE], 0, SEEK_CUR);
 			if (Ch.size) {
-				if (!fwrite(atdsmem[ADH_HANDLE], Ch.size, 1, (FILE *)atdshandle[ADH_HANDLE])) {
+				if (!chewy_fwrite(atdsmem[ADH_HANDLE], Ch.size, 1, atdshandle[ADH_HANDLE])) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
 				}
@@ -1331,10 +1324,10 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 			inv_block_nr = cur_inv + 1;
 			load_atds(inv_block_nr + atdspooloff[mode], INV_USE_DATEI);
 			if (atdshandle[INV_IDX_HANDLE]) {
-				fseek((FILE *)atdshandle[INV_IDX_HANDLE], sizeof(InvUse)*inv_block_nr
+				chewy_fseek(atdshandle[INV_IDX_HANDLE], sizeof(InvUse)*inv_block_nr
 				      *INV_STRC_ANZ, SEEK_SET);
 				if
-				(!fread(atdsmem[INV_IDX_HANDLE], sizeof(InvUse)*INV_STRC_ANZ, 1, (FILE *)atdshandle[INV_IDX_HANDLE])) {
+				(!chewy_fread(atdsmem[INV_IDX_HANDLE], sizeof(InvUse)*INV_STRC_ANZ, 1, atdshandle[INV_IDX_HANDLE])) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 4c3c804e203..1ef993bcc16 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_ATDS_H
 #define CHEWY_ATDS_H
 
+#include "chewy/file.h"
+
 namespace Chewy {
 
 #define ATDS_VOC_OFFSET 20
@@ -120,8 +122,7 @@ struct AtdsVar {
 
 	int16 VocNr;
 
-	//FIXME : Was using FILE*
-	void *SpeechHandle;
+	Stream *SpeechHandle;
 
 	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode);
 };
@@ -258,9 +259,9 @@ public:
 	void save_ads_header(int16 dia_nr);
 
 	// FIXME: was using FILE*
-	void *pool_handle(const char *fname, const char *fmode);
-	void set_speech_handle(void *speech_handle);
-	void set_handle(const char *fname, int16 mode, void *handle, int16 chunk_start, int16 chunk_anz);
+	Stream *pool_handle(const char *fname, const char *fmode);
+	void set_speech_handle(Stream *speech_handle);
+	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, const char *fmode, int16 mode);
 	void close_handle(int16 mode);
 	int16 atds_get_zeilen(char *str, int16 end_txt);
@@ -311,8 +312,7 @@ private:
 
 	int16 get_delay(int16 txt_len);
 
-	// FIXME : Was using FILE*
-	void *atdshandle[MAX_HANDLE];
+	Stream *atdshandle[MAX_HANDLE];
 	char *atdsmem[MAX_HANDLE];
 	int16 atdspooloff[MAX_HANDLE];
 	char *atsmem;
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index 6e2f41bdbb7..ddf4eea3417 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -1094,29 +1094,29 @@ int16 ja_nein() {
 }
 
 void save_iib(char *fname) {
-	FILE *handle;
+	Stream *handle;
 	modul = 0;
 	fcode = 0;
-	handle = fopen(fname, "rb+");
+	handle = chewy_fopen(fname, "rb+");
 	if (handle) {
-		if (!fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+		if (!chewy_fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
 			fcode = READFEHLER;
-			modul = DATEI;
+			moduchewy_freadATEI;
 		} else if (!strnicmp(iib_datei_header.Id, "IIB", 3)) {
-			fclose(handle);
-			handle = fopen(fname, "wb+");
+			chewy_fclose(handle);
+			handle = chewy_fopen(fname, "wb+");
 			if (handle) {
 				iib_datei_header.Size = (uint32)(sizeof(RoomMovObjekt) * MAX_MOV_OBJ);
-				if (!fwrite(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+				if (!chewy_fwrite(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
 					modul = DATEI;
 					fcode = WRITEFEHLER;
-				} else if (!fwrite(spieler.room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
+				} else if (!chewy_fwrite(spieler.room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
 					modul = DATEI;
 					fcode = WRITEFEHLER;
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 }
 
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 8b363021f63..79b8e21c4ad 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -28,7 +28,6 @@
 
 #include "common/scummsys.h"
 #include "common/error.h"
-#include "common/file.h"
 #include "common/random.h"
 #include "common/textconsole.h"
 #include "engines/engine.h"
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 36fddc764b5..15e1e6b6901 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -20,22 +20,9 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
-#define FORBIDDEN_SYMBOL_EXCEPTION_fputc
-#define FORBIDDEN_SYMBOL_EXCEPTION_ftell
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
-#define FORBIDDEN_SYMBOL_EXCEPTION_getch
-
-
 #include "common/debug.h"
-#include "common/file.h"
 #include "chewy/datei.h"
+#include "chewy/file.h"
 
 namespace Chewy {
 
@@ -79,7 +66,7 @@ datei::~datei() {
 }
 
 void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
-	FILE *handle;
+	Stream *handle;
 	pcx_header *header;
 	uint8 zeichen;
 	uint16 count, i = 0, j = 0, index;
@@ -96,24 +83,24 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".PCX\0");
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (fread(header, sizeof(pcx_header), 1, handle)) {
+		if (chewy_fread(header, sizeof(pcx_header), 1, handle)) {
 			if ((header->id == 10) && (header->version == 5) && (header->bpp == 8)) {
 				hoehe = (header->ymax - header->ymin) + 1;
 				breite = header->bpz * header->planes;
 
 				abmess[0] = breite;
 				abmess[1] = hoehe;
-				fseek(handle, 128L, SEEK_SET);
+				chewy_fseek(handle, 128L, SEEK_SET);
 				for (i = 0; i < hoehe; i++) {
 					index = 0;
 					while (index < breite) {
-						zeichen = fgetc(handle);
+						zeichen = chewy_fgetc(handle);
 						if (((zeichen & 0xc0) == 0xc0) && (header->komp)) {
 							count = zeichen & 0x3f;
 
-							zeichen = fgetc(handle);
+							zeichen = chewy_fgetc(handle);
 							for (j = 0; j < count; j++) {
 
 								speicher[index] = zeichen;
@@ -128,11 +115,11 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 					}
 					speicher += breite;
 				}
-				if (!(fseek(handle, -769L, SEEK_END))) {
-					zeichen = fgetc(handle);
+				if (!(chewy_fseek(handle, -769L, SEEK_END))) {
+					zeichen = chewy_fgetc(handle);
 					if (zeichen == 12) {
-						fseek(handle, -768L, SEEK_END);
-						if ((fread(palette, 768, 1, handle)) != 1) {
+						chewy_fseek(handle, -768L, SEEK_END);
+						if ((chewy_fread(palette, 768, 1, handle)) != 1) {
 							fcode = PALETTEFEHLER;
 							modul = DATEI;
 						} else {
@@ -160,7 +147,7 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -169,7 +156,7 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 }
 
 void datei::load_image(const char *fname, byte *sp, byte *palette) {
-	FILE *handle;
+	Stream *handle;
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
@@ -186,27 +173,27 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 	if (!strchr(filename, '.'))strcat(filename, ".TBF\0");
 	correct_fname(filename);
 	if ((speicher) && (palette)) {
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+			if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
 				format = get_id(header->id);
 				if (format != -1) {
 					for (i = 0; i < 768; i++)
 						palette[i] = header->palette[i];
-					fseek(handle, ((long)(sizeof(tbf_dateiheader) + 1)), SEEK_SET);
+					chewy_fseek(handle, ((long)(sizeof(tbf_dateiheader) + 1)), SEEK_SET);
 					switch (format) {
 					case TBFDATEI:
 						abmess[0] = header->width;
 						abmess[1] = header->height;
 						speicher += 4;
-						read_tbf_image((void *)handle, header->komp,
+						read_tbf_image(handle, header->komp,
 						               header->entpsize, speicher);
 						break;
 					case TPFDATEI:
 						abmess[0] = header->width;
 						abmess[1] = header->height;
 						speicher += 4;
-						read_tpf_image((void *)handle, header->komp,
+						read_tpf_image(handle, header->komp,
 						               header->entpsize, speicher);
 						break;
 					}
@@ -220,7 +207,7 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -233,8 +220,7 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 	}
 }
 
-void datei::load_image(void *h, byte *sp, byte *palette) {
-	FILE *handle = (FILE *)h;
+void datei::load_image(Stream *handle, byte *sp, byte *palette) {
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
@@ -245,7 +231,7 @@ void datei::load_image(void *h, byte *sp, byte *palette) {
 	speicher = sp;
 	abmess = (int16 *) speicher;
 	if ((speicher) && (palette) && (handle)) {
-		if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+		if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
 			format = get_id(header->id);
 			if (format != -1) {
 				for (i = 0; i < 768; i++)
@@ -255,14 +241,14 @@ void datei::load_image(void *h, byte *sp, byte *palette) {
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tbf_image((void *)handle, header->komp,
+					read_tbf_image(handle, header->komp,
 					               header->entpsize, speicher);
 					break;
 				case TPFDATEI:
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tpf_image((void *)handle, header->komp,
+					read_tpf_image(handle, header->komp,
 					               header->entpsize, speicher);
 					break;
 				}
@@ -282,31 +268,30 @@ void datei::load_image(void *h, byte *sp, byte *palette) {
 		modul = GRAFIK;
 	}
 	if (!modul)
-		fread(&ch, sizeof(ChunkHead), 1, handle);
+		chewy_fread(&ch, sizeof(ChunkHead), 1, handle);
 }
 
-uint16 datei::select_pool_item(void *h, uint16 nr) {
-	FILE *handle = (FILE *)h;
+uint16 datei::select_pool_item(Stream *handle, uint16 nr) {
 	uint32 tmp1;
 	NewPhead *ph;
 	ph = (NewPhead *)tmp;
 	if (handle) {
-		fseek(handle, 0, SEEK_SET);
-		if (!(fread(ph, sizeof(NewPhead), 1, handle))) {
+		chewy_fseek(handle, 0, SEEK_SET);
+		if (!(chewy_fread(ph, sizeof(NewPhead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
-			fseek(handle, 0, SEEK_SET);
+			chewy_fseek(handle, 0, SEEK_SET);
 		} else {
 			if (!strncmp(ph->id, "NGS", 3)) {
 				if (nr >= ph->PoolAnz)
 					nr = ph->PoolAnz - 1;
-				fseek(handle, -(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
-				if (!(fread(&tmp1, sizeof(uint32), 1, handle))) {
+				chewy_fseek(handle, -(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+				if (!(chewy_fread(&tmp1, sizeof(uint32), 1, handle))) {
 					modul = DATEI;
 					fcode = READFEHLER;
-					fseek(handle, 0, SEEK_SET);
+					chewy_fseek(handle, 0, SEEK_SET);
 				} else
-					fseek(handle, tmp1, SEEK_SET);
+					chewy_fseek(handle, tmp1, SEEK_SET);
 			}
 		}
 	}
@@ -314,7 +299,7 @@ uint16 datei::select_pool_item(void *h, uint16 nr) {
 }
 
 void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
-	FILE *handle;
+	Stream *handle;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	int16 *abmess, komp;
@@ -334,16 +319,16 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 	abmess = (int16 *) speicher;
 	speicher += 4;
 	if (abmess) {
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
 				id = get_id(header->id);
 				if (id == TAFDATEI) {
 					if (header->korrekt == 1) {
 						next = header->next;
 						while ((sprcount <= nr) && (nr <= header->count)) {
-							fseek(handle, next, SEEK_SET);
-							if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+							chewy_fseek(handle, next, SEEK_SET);
+							if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 								next = iheader.next;
 								image = iheader.image;
 							} else {
@@ -354,13 +339,13 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 						}
 					}
 					else {
-						fseek(handle, (-(int)((header->count - nr)*sizeof(uint32))), SEEK_END);
-						if (!fread(&next, sizeof(uint32), 1, handle)) {
+						chewy_fseek(handle, (-(int)((header->count - nr)*sizeof(uint32))), SEEK_END);
+						if (!chewy_fread(&next, sizeof(uint32), 1, handle)) {
 							fcode = READFEHLER;
 							modul = DATEI;
 						} else {
-							fseek(handle, next, SEEK_SET);
-							if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+							chewy_fseek(handle, next, SEEK_SET);
+							if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 								next = iheader.next;
 								image = iheader.image;
 							} else {
@@ -373,8 +358,8 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 					abmess[1] = iheader.height;
 					size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
 					komp = iheader.komp;
-					fseek(handle, image, SEEK_SET);
-					read_tbf_image((void *)handle, komp, size, speicher);
+					chewy_fseek(handle, image, SEEK_SET);
+					read_tbf_image(handle, komp, size, speicher);
 				}
 				else {
 					fcode = NOTTBF;
@@ -385,7 +370,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -398,12 +383,12 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 	}
 }
 
-void datei::load_tafmcga(void *h, int16 komp, uint32 size, byte *speicher) {
-	read_tbf_image(h, komp, size, speicher);
+void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher) {
+	read_tbf_image(handle, komp, size, speicher);
 }
 
 void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
-	FILE *handle;
+	Stream *handle;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	int16 komp, id, i;
@@ -421,17 +406,17 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 	correct_fname(filename);
 	speicher = hi_sp;
 	if (speicher) {
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->mode == 19)) {
 					next = header->next;
 					anzahl = header->count;
 					for (sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
 						tinfo->image[sprcount] = speicher;
-						fseek(handle, next, SEEK_SET);
-						if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+						chewy_fseek(handle, next, SEEK_SET);
+						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 							next = iheader.next;
 							image = iheader.image;
 						} else {
@@ -445,8 +430,8 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 						size = (uint32)((uint32)iheader.height) *
 						       ((uint32)iheader.width);
 						komp = iheader.komp;
-						fseek(handle, image, SEEK_SET);
-						read_tbf_image((void *)handle, komp, size, speicher);
+						chewy_fseek(handle, image, SEEK_SET);
+						read_tbf_image(handle, komp, size, speicher);
 						speicher += size;
 					}
 				}
@@ -459,7 +444,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -473,7 +458,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 }
 
 void datei::load_korrektur(const char *fname, byte *sp) {
-	FILE *handle;
+	Stream *handle;
 	taf_dateiheader *header;
 	int16 id, i;
 	byte *speicher;
@@ -488,13 +473,13 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 	correct_fname(filename);
 	speicher = sp;
 	if (speicher) {
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
-					fseek(handle, -((int)(header->count * sizeof(uint32))*header->korrekt), SEEK_END);
-					if (!fread(speicher, header->count * sizeof(uint32), 1, handle)) {
+					chewy_fseek(handle, -((int)(header->count * sizeof(uint32))*header->korrekt), SEEK_END);
+					if (!chewy_fread(speicher, header->count * sizeof(uint32), 1, handle)) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					}
@@ -508,7 +493,7 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -522,7 +507,7 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 }
 
 void datei::load_tff(const char *fname, byte *speicher) {
-	FILE *handle;
+	Stream *handle;
 	tff_header *tff;
 	uint32 size;
 	int16 i;
@@ -535,17 +520,17 @@ void datei::load_tff(const char *fname, byte *speicher) {
 			get_filename(filename, MAXPATH);
 		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
 		correct_fname(filename);
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (fread(speicher, sizeof(tff_header), 1, handle)) {
+			if (chewy_fread(speicher, sizeof(tff_header), 1, handle)) {
 				size = tff->size;
-				if (!(fread((speicher + sizeof(tff_header)),
+				if (!(chewy_fread((speicher + sizeof(tff_header)),
 				            (uint16)size, 1, handle))) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -558,8 +543,7 @@ void datei::load_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void datei::read_tbf_image(void *h, int16 komp, uint32 size, byte *sp) {
-	FILE *handle = (FILE *)h;
+void datei::read_tbf_image(Stream *handle, int16 komp, uint32 size, byte *sp) {
 	uint32 pos;
 	char zeichen;
 	uint8 count, i;
@@ -568,8 +552,8 @@ void datei::read_tbf_image(void *h, int16 komp, uint32 size, byte *sp) {
 	pos = 0;
 	if (komp == 1) {
 		for (pos = 0; pos < size;) {
-			count = fgetc(handle);
-			zeichen = fgetc(handle);
+			count = chewy_fgetc(handle);
+			zeichen = chewy_fgetc(handle);
 			for (i = 0; (i < count) && (pos < size); i++) {
 				speicher[pos] = zeichen;
 				++pos;
@@ -578,13 +562,12 @@ void datei::read_tbf_image(void *h, int16 komp, uint32 size, byte *sp) {
 	}
 	else {
 		for (pos = 0; pos < size; pos++)
-			*speicher++ = (uint8)fgetc(handle);
+			*speicher++ = (uint8)chewy_fgetc(handle);
 	}
 }
 
-void datei::read_tpf_image(void *h, int16 komp, uint32 size,
+void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size,
                            byte *speicher) {
-	FILE *handle = (FILE *)h;
 	uint32 pos = 0;
 	char zeichen;
 	uint8 count, i = 0;
@@ -592,8 +575,8 @@ void datei::read_tpf_image(void *h, int16 komp, uint32 size,
 	if (komp == 1) {
 		for (plane = 0; plane < 4; plane++) {
 			for (pos = (uint32)plane; pos < (size + plane);) {
-				count = fgetc(handle);
-				zeichen = fgetc(handle);
+				count = chewy_fgetc(handle);
+				zeichen = chewy_fgetc(handle);
 				for (i = 0; i < count && pos < (size + plane); i++) {
 					speicher[pos] = zeichen;
 					pos += 4;
@@ -604,7 +587,7 @@ void datei::read_tpf_image(void *h, int16 komp, uint32 size,
 	else {
 		for (plane = 0; plane < 4; plane++) {
 			for (pos = (uint32) plane; pos < size + plane;) {
-				zeichen = fgetc(handle);
+				zeichen = chewy_fgetc(handle);
 				speicher[pos] = zeichen;
 				pos += 4;
 			}
@@ -614,7 +597,7 @@ void datei::read_tpf_image(void *h, int16 komp, uint32 size,
 
 void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
                         knopf *knpf) {
-	FILE *handle;
+	Stream *handle;
 	int16 i = 0, j = 0;
 	knopf *lknpf;
 	menue *lmen;
@@ -634,22 +617,22 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (!(fread(dial, sizeof(dialogue), 1, handle))) {
+		if (!(chewy_fread(dial, sizeof(dialogue), 1, handle))) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
 		else {
 			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
-				if (!(fread(lmen, sizeof(menue), 1, handle))) {
+				if (!(chewy_fread(lmen, sizeof(menue), 1, handle))) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 				else {
 					dial->menueliste[i] = lmen;
 					for (j = 0; (j < lmen->anzknoepfe) && (!modul); j++) {
-						if (!(fread(lknpf, sizeof(knopf), 1, handle))) {
+						if (!(chewy_fread(lknpf, sizeof(knopf), 1, handle))) {
 							fcode = READFEHLER;
 							modul = DATEI;
 						}
@@ -662,7 +645,7 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -671,7 +654,7 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 }
 
 void datei::load_sbi(const char *fname, sbi_inst *speicher) {
-	FILE *handle;
+	Stream *handle;
 	int16 i = 0;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
@@ -687,13 +670,13 @@ void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 	filename[i + 3] = 'I';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (!(fread(speicher, sizeof(sbi_inst), 1, handle))) {
+		if (!(chewy_fread(speicher, sizeof(sbi_inst), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -706,7 +689,7 @@ void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 }
 
 uint32 datei::load_voc(const char *fname, byte *speicher) {
-	FILE *handle;
+	Stream *handle;
 	int16 i = 0;
 	voc_header *header;
 	uint32 s;
@@ -730,9 +713,9 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 	s = size(filename, VOCDATEI);
 
 	if (!modul) {
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
-			if (!(fread(header, sizeof(voc_header), 1, handle))) {
+			if (!(chewy_fread(header, sizeof(voc_header), 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -741,14 +724,14 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 					fcode = NOTVOC;
 				}
 				else {
-					fseek(handle, header->offset, SEEK_SET);
-					if (!(fread(sp, s, 1, handle))) {
+					chewy_fseek(handle, header->offset, SEEK_SET);
+					if (!(chewy_fread(sp, s, 1, handle))) {
 						modul = DATEI;
 						fcode = READFEHLER;
 					}
 				}
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -758,18 +741,17 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 	return (s);
 }
 
-uint32 datei::load_voc(void *h, byte *speicher) {
-	FILE *handle = (FILE *)h;
+uint32 datei::load_voc(Stream *handle, byte *speicher) {
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
 	if (handle) {
-		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (ch->type == VOCDATEI) {
-				if (!(fread(speicher, ch->size, 1, handle))) {
+				if (!(chewy_fread(speicher, ch->size, 1, handle))) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -784,7 +766,7 @@ uint32 datei::load_voc(void *h, byte *speicher) {
 }
 
 void datei::load_vocinfo(const char *fname, voc_header *speicher) {
-	FILE *handle;
+	Stream *handle;
 	int16 i = 0;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
@@ -800,13 +782,13 @@ void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 	filename[i + 3] = 'C';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (!(fread(speicher, sizeof(voc_header), 1, handle))) {
+		if (!(chewy_fread(speicher, sizeof(voc_header), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -819,19 +801,19 @@ void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 }
 
 void datei::void_load(const char *fname, byte *speicher, uint32 size) {
-	FILE *handle;
+	Stream *handle;
 	int16 i;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
 	filename[i] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (!(fread(speicher, (uint16)size, 1, handle))) {
+		if (!(chewy_fread(speicher, (uint16)size, 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -840,23 +822,23 @@ void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 }
 
 uint32 datei::load_file(const char *fname, byte *speicher) {
-	FILE *handle;
+	Stream *handle;
 	uint32 size = 0;
 	int16 i = 0;
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
 	filename[i] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		fseek(handle, 0l, SEEK_END);
-		size = ftell(handle);
-		fseek(handle, 0l, SEEK_SET);
-		if (!(fread(speicher, (size_t)size, 1, handle))) {
+		chewy_fseek(handle, 0l, SEEK_END);
+		size = chewy_ftell(handle);
+		chewy_fseek(handle, 0l, SEEK_SET);
+		if (!(chewy_fread(speicher, (size_t)size, 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -865,18 +847,17 @@ uint32 datei::load_file(const char *fname, byte *speicher) {
 	return (size);
 }
 
-uint32 datei::load_item(void *h, byte *speicher) {
-	FILE *handle = (FILE *)h;
+uint32 datei::load_item(Stream *handle, byte *speicher) {
 	ChunkHead *ch;
 	ch = (ChunkHead *) tmp;
 	if (handle) {
-		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
 		else {
-			if (!(fread(speicher, ch->size, 1, handle))) {
+			if (!(chewy_fread(speicher, ch->size, 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			}
@@ -886,7 +867,7 @@ uint32 datei::load_item(void *h, byte *speicher) {
 }
 
 uint32 datei::load_tmf(const char *fname, tmf_header *th) {
-	FILE *handle;
+	Stream *handle;
 	uint32 size = 0;
 	byte *speicher;
 	int16 ok, i;
@@ -903,12 +884,12 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 	filename[i + 4] = 0;
 	speicher = (byte *)th;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		fseek(handle, 0l, SEEK_END);
-		size = ftell(handle);
-		fseek(handle, 0l, SEEK_SET);
-		if (!(fread(th, sizeof(tmf_header), 1, handle))) {
+		chewy_fseek(handle, 0l, SEEK_END);
+		size = chewy_ftell(handle);
+		chewy_fseek(handle, 0l, SEEK_SET);
+		if (!(chewy_fread(th, sizeof(tmf_header), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
@@ -923,12 +904,12 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 			}
 		}
 		if (!modul) {
-			if (!(fread(speicher, size, 1, handle))) {
+			if (!(chewy_fread(speicher, size, 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -948,22 +929,21 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 	return (size + sizeof(tmf_header));
 }
 
-uint32 datei::load_tmf(void *h, tmf_header *song) {
-	FILE *handle = (FILE *)h;
+uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	ChunkHead *ch;
 	byte *speicher;
 	int16 i;
 	ch = (ChunkHead *) tmp;
 	speicher = (byte *)song;
 	if (handle) {
-		fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(fread(ch, sizeof(ChunkHead), 1, handle))) {
+		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
 		else {
 			if (ch->type == TMFDATEI) {
-				if (!(fread(speicher, ch->size, 1, handle))) {
+				if (!(chewy_fread(speicher, ch->size, 1, handle))) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -989,7 +969,7 @@ uint32 datei::load_tmf(void *h, tmf_header *song) {
 }
 
 void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
-	FILE *handle;
+	Stream *handle;
 	pcx_header *header;
 
 	byte *line_ptr, *sptr;
@@ -1036,10 +1016,10 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 	header->komp = 1;
 	header->reserviert = 0;
 	header->palinfo = 1;
-	handle = fopen(filename, "wb");
+	handle = chewy_fopen(filename, "wb");
 	if (handle) {
-		if (fwrite(header, sizeof(pcx_header), 1, handle)) {
-			fseek(handle, 128L, SEEK_SET);
+		if (chewy_fwrite(header, sizeof(pcx_header), 1, handle)) {
+			chewy_fseek(handle, 128L, SEEK_SET);
 			line_ptr = sptr;
 			for (i = 0; i < hoehe; i++) {
 				prev_data = *line_ptr++;
@@ -1053,16 +1033,16 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 						data_count++;
 						if (data_count == 0x3f) {
 							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-								fputc(0xc0 | data_count, handle);
-							fputc(prev_data, handle);
+								chewy_fputc(0xc0 | data_count, handle);
+							chewy_fputc(prev_data, handle);
 							data_count = 0;
 						}
 					}
 					else {
 						if (data_count > 0) {
 							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-								fputc(0xc0 | data_count, handle);
-							fputc(prev_data, handle);
+								chewy_fputc(0xc0 | data_count, handle);
+							chewy_fputc(prev_data, handle);
 						}
 						prev_data = curr_data;
 						data_count = 1;
@@ -1070,19 +1050,19 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 				}
 				if (data_count > 0) {
 					if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-						fputc(0xc0 | data_count, handle);
-					fputc(prev_data, handle);
+						chewy_fputc(0xc0 | data_count, handle);
+					chewy_fputc(prev_data, handle);
 				}
 			}
-			fputc(12, handle);
+			chewy_fputc(12, handle);
 			for (i = 0; i < 768; i++)
-				fputc(palette[i] << 2, handle);
+				chewy_fputc(palette[i] << 2, handle);
 		}
 		else {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -1092,7 +1072,7 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 
 void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
                          int16 komp, int16 *korrektur) {
-	FILE *handle;
+	Stream *handle;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	uint16 i = 0;
@@ -1115,21 +1095,21 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "wb");
+	handle = chewy_fopen(filename, "wb");
 	if (handle) {
 		strncpy(header->id, "TAF\0", 4);
 		header->mode = 19;
 		for (i = 0; i < 768; i++)
 			header->palette[i] = palette[i];
-		fseek(handle, sizeof(taf_dateiheader) + 1, SEEK_SET);
-		header->next = ftell(handle);
+		chewy_fseek(handle, sizeof(taf_dateiheader) + 1, SEEK_SET);
+		header->next = chewy_ftell(handle);
 		abmess = (int16 *) spvekt[sprcount];
 		speicher = spvekt[sprcount];
 		speicher += 4;
-		next = ftell(handle);
+		next = chewy_ftell(handle);
 		while ((abmess != 0) && (sprcount < MAXSPRITE)) {
-			fseek(handle, next + (sizeof(taf_imageheader) + 1), SEEK_SET);
-			iheader.image = ftell(handle);
+			chewy_fseek(handle, next + (sizeof(taf_imageheader) + 1), SEEK_SET);
+			iheader.image = chewy_ftell(handle);
 			iheader.komp = komp;
 			iheader.width = abmess[0];
 			iheader.height = abmess[1];
@@ -1137,9 +1117,9 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 			allsize += size;
 			write_tbf_image(handle, komp, size, speicher);
 			if (!modul) {
-				iheader.next = ftell(handle);
-				fseek(handle, next, SEEK_SET);
-				if (!fwrite(&iheader, sizeof(taf_imageheader), 1, handle)) {
+				iheader.next = chewy_ftell(handle);
+				chewy_fseek(handle, next, SEEK_SET);
+				if (!chewy_fwrite(&iheader, sizeof(taf_imageheader), 1, handle)) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
 				}
@@ -1156,18 +1136,18 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 			header->korrekt = 0;
 		else {
 			header->korrekt = 1;
-			fseek(handle, 0l, SEEK_END);
-			if (!fwrite(korrektur, 4 * sprcount, 1, handle)) {
+			chewy_fseek(handle, 0l, SEEK_END);
+			if (!chewy_fwrite(korrektur, 4 * sprcount, 1, handle)) {
 				fcode = WRITEFEHLER;
 				modul = DATEI;
 			}
 		}
-		fseek(handle, 0L, SEEK_SET);
-		if (!fwrite(header, sizeof(taf_dateiheader), 1, handle)) {
+		chewy_fseek(handle, 0L, SEEK_SET);
+		if (!chewy_fwrite(header, sizeof(taf_dateiheader), 1, handle)) {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -1176,7 +1156,7 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 }
 
 void datei::save_tff(const char *fname, byte *speicher) {
-	FILE *handle;
+	Stream *handle;
 	uint32 size;
 	uint16 i = 0;
 	tff_header *tff;
@@ -1197,16 +1177,16 @@ void datei::save_tff(const char *fname, byte *speicher) {
 		filename[i + 3] = 'F';
 		filename[i + 4] = 0;
 		correct_fname(filename);
-		handle = fopen(filename, "wb");
+		handle = chewy_fopen(filename, "wb");
 		if (handle) {
 			tff->size = (uint32)tff->count * ((uint32)(tff->width / 8) *
 			                                       (uint32)tff->height);
 			size = tff->size + sizeof(tff_header);
-			if (!(fwrite(speicher, (size_t)size, 1, handle))) {
+			if (!(chewy_fwrite(speicher, (size_t)size, 1, handle))) {
 				fcode = WRITEFEHLER;
 				modul = DATEI;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -1219,8 +1199,7 @@ void datei::save_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void datei::write_tbf_image(void *h, int16 komp, uint32 size, byte *speicher) {
-	FILE *handle = (FILE *)h;
+void datei::write_tbf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
 	uint32 pos = 0;
 	int16 fehler;
 	uint8 zeichen;
@@ -1233,8 +1212,8 @@ void datei::write_tbf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 				++pos;
 				++count;
 			}
-			fehler = fputc((int16)count, handle);
-			fehler = fputc((int16)zeichen, handle);
+			fehler = chewy_fputc((int16)count, handle);
+			fehler = chewy_fputc((int16)zeichen, handle);
 			if (fehler == EOF) {
 				fcode = WRITEFEHLER;
 				modul = DATEI;
@@ -1242,7 +1221,7 @@ void datei::write_tbf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 			}
 		}
 	} else {
-		if (!fwrite(speicher, size, 1, handle)) {
+		if (!chewy_fwrite(speicher, size, 1, handle)) {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
@@ -1250,7 +1229,7 @@ void datei::write_tbf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 }
 
 void datei::save_dialog(const char *fname, dialogue *dial) {
-	FILE *handle;
+	Stream *handle;
 	menue *men;
 	knopf *knpf;
 	int16 i = 0, j = 0;
@@ -1268,17 +1247,17 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "wb");
+	handle = chewy_fopen(filename, "wb");
 	if (handle) {
 		strncpy(dial->id, "TDF\0", 4);
-		if (!(fwrite(dial, sizeof(dialogue), 1, handle))) {
+		if (!(chewy_fwrite(dial, sizeof(dialogue), 1, handle))) {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
 		else {
 			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
 				men = dial->menueliste[i];
-				if (!(fwrite(men, sizeof(menue), 1, handle))) {
+				if (!(chewy_fwrite(men, sizeof(menue), 1, handle))) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
 				}
@@ -1286,7 +1265,7 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 					for (j = 0; (j < men->anzknoepfe) && (!modul); j++) {
 						knpf = men->knopfliste[j];
 						if (knpf != 0) {
-							if (!(fwrite(knpf, sizeof(knopf), 1, handle))) {
+							if (!(chewy_fwrite(knpf, sizeof(knopf), 1, handle))) {
 								fcode = WRITEFEHLER;
 								modul = DATEI;
 							}
@@ -1295,7 +1274,7 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -1321,11 +1300,11 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	FILE *handle = fopen(filename, "wb");
+	Stream *handle = chewy_fopen(filename, "wb");
 	if (handle) {
-		if ((fwrite(thead, sizeof(tmf_header), 1, handle))) {
+		if ((chewy_fwrite(thead, sizeof(tmf_header), 1, handle))) {
 			for (i = 0; (i < thead->pattern_anz) && (!modul); i++) {
-				if (!(fwrite(sp, 1024, 1, handle))) {
+				if (!(chewy_fwrite(sp, 1024, 1, handle))) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
 				}
@@ -1333,7 +1312,7 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 			}
 			for (i = 0; (i < 31) && (!modul); i++) {
 				if (thead->instrument[i].laenge) {
-					if (!(fwrite(thead->ipos[i], (size_t)thead->instrument[i].laenge, 1,
+					if (!(chewy_fwrite(thead->ipos[i], (size_t)thead->instrument[i].laenge, 1,
 					             handle))) {
 						fcode = WRITEFEHLER;
 						modul = DATEI;
@@ -1344,7 +1323,7 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -1352,7 +1331,7 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 }
 
 void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
-	FILE *handle;
+	Stream *handle;
 	menue men;
 	int16 i = 0;
 	dialogue dial;
@@ -1372,9 +1351,9 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	correct_fname(filename);
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (!(fread(&dial, sizeof(dialogue), 1, handle))) {
+		if (!(chewy_fread(&dial, sizeof(dialogue), 1, handle))) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
@@ -1382,18 +1361,18 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 			if ((!(strncmp(dial.id, "TDF", 3)))) {
 				*menueanz = dial.anzmenue;
 				for (i = 0; (i < dial.anzmenue) && (!modul); i++) {
-					if (!(fread(&men, sizeof(menue), 1, handle))) {
+					if (!(chewy_fread(&men, sizeof(menue), 1, handle))) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					}
 					else {
 						*knopfanz += men.anzknoepfe;
-						fseek(handle, (long)(men.anzknoepfe * sizeof(knopf)), SEEK_CUR);
+						chewy_fseek(handle, (long)(men.anzknoepfe * sizeof(knopf)), SEEK_CUR);
 					}
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -1402,7 +1381,7 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 }
 
 uint32 datei::size(const char *fname, int16 typ) {
-	FILE *handle;
+	Stream *handle;
 	tbf_dateiheader *tbfheader;
 	tff_header tff;
 	pcx_header *pcxheader;
@@ -1444,12 +1423,12 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 		}
 	}
-	handle = fopen(filename, "rb");
+	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		switch (typ) {
 		case TBFDATEI:
 		case TPFDATEI:
-			if (fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+			if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
 				id = get_id(tbfheader->id);
 				if ((id == TBFDATEI) || (id == TPFDATEI)) {
 					size = tbfheader->entpsize + 4;
@@ -1467,7 +1446,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		case PCXDATEI:
-			if (fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+			if (chewy_fread(pcxheader, sizeof(pcx_header), 1, handle)) {
 				if ((pcxheader->id == 10) && (pcxheader->version == 5)
 				        && (pcxheader->bpp == 8)) {
 					hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
@@ -1487,7 +1466,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		case TFFDATEI:
-			if (fread(&tff, sizeof(tff_header), 1, handle)) {
+			if (chewy_fread(&tff, sizeof(tff_header), 1, handle)) {
 				id = get_id(tff.id);
 				if (id == TFFDATEI)
 					size = tff.size + sizeof(tff_header);
@@ -1503,16 +1482,16 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		case VOCDATEI:
-			fseek(handle, 0, SEEK_END);
-			size = (uint32)ftell(handle);
+			chewy_fseek(handle, 0, SEEK_END);
+			size = (uint32)chewy_ftell(handle);
 			size -= sizeof(voc_header);
 			break;
 
 		case MODDATEI:
-			fseek(handle, 0, SEEK_END);
-			size = (uint32)ftell(handle);
+			chewy_fseek(handle, 0, SEEK_END);
+			size = (uint32)chewy_ftell(handle);
 			id = 0;
-			if (fread(mh, sizeof(mod_header), 1, handle)) {
+			if (chewy_fread(mh, sizeof(mod_header), 1, handle)) {
 				if (!strncmp(mh->id, "M.K.", 4))
 					id = 1;
 				if (!strncmp(mh->id, "M!K!", 4))
@@ -1530,11 +1509,11 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		default:
-			fseek(handle, 0, SEEK_END);
-			size = (uint32)ftell(handle);
+			chewy_fseek(handle, 0, SEEK_END);
+			size = (uint32)chewy_ftell(handle);
 			break;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 	else {
 		fcode = OPENFEHLER;
@@ -1545,37 +1524,37 @@ uint32 datei::size(const char *fname, int16 typ) {
 }
 
 uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
-	FILE *handle;
+	Stream *handle;
 	NewPhead *Nph;
 	ChunkHead ch;
 	int16 i;
 	uint32 size;
 	Nph = (NewPhead *)tmp;
 	size = 0;
-	handle = fopen(fname, "rb");
+	handle = chewy_fopen(fname, "rb");
 	if (handle) {
-		if (!(fread(Nph, sizeof(NewPhead), 1, handle))) {
+		if (!(chewy_fread(Nph, sizeof(NewPhead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (!strncmp(Nph->id, "NGS", 3)) {
 				select_pool_item(handle, chunk_start);
-				fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
 				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
 				        && i < (chunk_start + chunk_anz); i++) {
-					if (!fread(&ch, sizeof(ChunkHead), 1, handle)) {
+					if (!chewy_fread(&ch, sizeof(ChunkHead), 1, handle)) {
 						modul = DATEI;
 						fcode = READFEHLER;
 						size = 0;
 					} else {
 						if (ch.size > size)
 							size = ch.size;
-						fseek(handle, ch.size, SEEK_CUR);
+						chewy_fseek(handle, ch.size, SEEK_CUR);
 					}
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -1629,7 +1608,7 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 }
 
 void datei::load_palette(const char *fname, byte *palette, int16 typ) {
-	FILE *handle;
+	Stream *handle;
 	uint8 zeichen;
 	uint16 j = 0;
 	tbf_dateiheader *tbfheader;
@@ -1664,12 +1643,12 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 	}
 	if (!modul) {
 		correct_fname(filename);
-		handle = fopen(filename, "rb");
+		handle = chewy_fopen(filename, "rb");
 		if (handle) {
 			switch (typ) {
 			case TBFDATEI:
 			case TPFDATEI:
-				if (fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+				if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
 					id = get_id(tbfheader->id);
 					if (((id == TBFDATEI) || (id == TPFDATEI)) &&
 					        (tbfheader->mode == 19)) {
@@ -1688,14 +1667,14 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 				break;
 
 			case PCXDATEI:
-				if (fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+				if (chewy_fread(pcxheader, sizeof(pcx_header), 1, handle)) {
 					if ((pcxheader->id == 10) && (pcxheader->version == 5)
 					        && (pcxheader->bpp == 8)) {
-						if (!(fseek(handle, -769L, SEEK_END))) {
-							zeichen = fgetc(handle);
+						if (!(chewy_fseek(handle, -769L, SEEK_END))) {
+							zeichen = chewy_fgetc(handle);
 							if (zeichen == 12) {
-								fseek(handle, -768L, SEEK_END);
-								if ((fread(palette, 768, 1, handle)) != 1) {
+								chewy_fseek(handle, -768L, SEEK_END);
+								if ((chewy_fread(palette, 768, 1, handle)) != 1) {
 									fcode = PALETTEFEHLER;
 									modul = DATEI;
 								} else {
@@ -1726,7 +1705,7 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 				break;
 
 			case TAFDATEI:
-				if (fread(tafheader, sizeof(taf_dateiheader), 1, handle)) {
+				if (chewy_fread(tafheader, sizeof(taf_dateiheader), 1, handle)) {
 					id = get_id(tafheader->id);
 					if ((id == TAFDATEI) && (tafheader->mode == 19)) {
 						for (i = 0; i < 768; i++)
@@ -1747,7 +1726,7 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 				modul = DATEI;
 				fcode = NOTTBF;
 			}
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 		else {
 			fcode = OPENFEHLER;
@@ -1756,20 +1735,19 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 	}
 }
 
-void datei::load_palette(void *h, byte *palette) {
-	FILE *handle = (FILE *)h;
+void datei::load_palette(Stream *handle, byte *palette) {
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int format;
 	header = (tbf_dateiheader *)tmp;
 	if (palette) {
 		if (handle) {
-			if (fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+			if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
 				format = get_id(header->id);
 				if (format != -1) {
 					for (i = 0; i < 768; i++)
 						palette[i] = header->palette[i];
-					fseek(handle, -(int)sizeof(tbf_dateiheader), SEEK_CUR);
+					chewy_fseek(handle, -(int)sizeof(tbf_dateiheader), SEEK_CUR);
 				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
@@ -1802,15 +1780,15 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
 	correct_fname(filename);
-	FILE *handle = fopen(filename, "rb");
+	Stream *handle = chewy_fopen(filename, "rb");
 	if (handle) {
-		if (fread(header, sizeof(taf_dateiheader), 1, handle)) {
+		if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
 			id = get_id(header->id);
 			if ((id == TAFDATEI) && (header->mode == 19)) {
 				next = header->next;
 				while (sprcount < header->count) {
-					fseek(handle, next, SEEK_SET);
-					if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+					chewy_fseek(handle, next, SEEK_SET);
+					if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 						next = iheader.next;
 						svekt[sprcount] = ((uint32)iheader.width) * ((uint32)iheader.width);
 					}
@@ -1822,7 +1800,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 				}
 			}
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -1920,8 +1898,7 @@ void datei::cd(char *dir) {
 #endif
 }
 
-void datei::write_tpf_image(void *h, int16 komp, uint32 size, byte *speicher) {
-	FILE *handle = (FILE *)h;
+void datei::write_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
 	uint32 pos = 0;
 	int16 fehler;
 	uint8 zeichen;
@@ -1937,8 +1914,8 @@ void datei::write_tpf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 					pos += 4;
 					++count;
 				}
-				fehler = fputc(count, handle);
-				fehler = fputc(zeichen, handle);
+				fehler = chewy_fputc(count, handle);
+				fehler = chewy_fputc(zeichen, handle);
 				if (fehler == EOF) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
@@ -1952,7 +1929,7 @@ void datei::write_tpf_image(void *h, int16 komp, uint32 size, byte *speicher) {
 		while (plane <= 3) {
 			for (pos = plane; pos < (size); pos += 4) {
 				zeichen = speicher[pos];
-				fehler = fputc(zeichen, handle);
+				fehler = chewy_fputc(zeichen, handle);
 				if (fehler == EOF) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
@@ -1979,22 +1956,22 @@ int16 datei::get_id(char *id_code) {
 }
 
 void datei::fcopy(const char *d_fname, const char *s_fname) {
-	FILE *shandle;
-	FILE *dhandle;
+	Stream *shandle;
+	Stream *dhandle;
 	int16 ch;
-	shandle = fopen(s_fname, "rb");
+	shandle = chewy_fopen(s_fname, "rb");
 	if (shandle) {
-		dhandle = fopen(d_fname, "wb+");
+		dhandle = chewy_fopen(d_fname, "wb+");
 		if (shandle) {
-			while ((ch = fgetc(shandle)) != EOF)
-				fputc(ch, dhandle);
-			fclose(dhandle);
+			while ((ch = chewy_fgetc(shandle)) != EOF)
+				chewy_fputc(ch, dhandle);
+			chewy_fclose(dhandle);
 		}
 		else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-		fclose(shandle);
+		chewy_fclose(shandle);
 	}
 	else {
 		fcode = OPENFEHLER;
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 60d13575007..cd45f4946e6 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -24,6 +24,7 @@
 #define CHEWY_DATEI_H
 
 #include "chewy/chewy.h"
+#include "chewy/file.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -36,19 +37,18 @@ public:
 	void load_pcx(const char *fname, byte *speicher, byte *palette);
 	void load_image(const char *fname, byte *sp, byte *palette);
 	void load_tafmcga(const char *fname, byte *sp, int16 nr);
-// FIXME: Were using FILE*
-	/**/
-	void load_image(void *handle, byte *sp, byte *palette);
-	uint16 select_pool_item(void *handle, uint16 nr);
-	void load_tafmcga(void *handle, int16 komp, uint32 size, byte *speicher);
-	void read_tpf_image(void *handle, int16 komp, uint32 size, byte *speicher);
-	uint32 load_voc(void *handle, byte *speicher);
-	uint32 load_item(void *handle, byte *speicher);
-	uint32 load_tmf(void *handle, tmf_header *song);
-	void write_tbf_image(void *handle, int16 komp, uint32 size, byte *speicher);
-	void write_tpf_image(void *handle, int16 komp, uint32 size, byte *speicher);
-	void load_palette(void *handle, byte *palette);
-	/**/
+
+	void load_image(Stream *handle, byte *sp, byte *palette);
+	uint16 select_pool_item(Stream *handle, uint16 nr);
+	void load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher);
+	void read_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
+	uint32 load_voc(Stream *handle, byte *speicher);
+	uint32 load_item(Stream *handle, byte *speicher);
+	uint32 load_tmf(Stream *handle, tmf_header *song);
+	void write_tbf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
+	void write_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
+	void load_palette(Stream *handle, byte *palette);
+
 	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
 	void load_korrektur(const char *fname, byte *sp);
 	void load_tff(const char *fname, byte *speicher);
@@ -78,8 +78,7 @@ public:
 	void cd(char *dir);
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
-	void read_tbf_image(void *h, int16 komp, uint32 size, byte *sp);
-
+	void read_tbf_image(Stream *handle, int16 komp, uint32 size, byte *sp);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/debug.h b/engines/chewy/debug.h
index 5c531b9a400..818ad010587 100644
--- a/engines/chewy/debug.h
+++ b/engines/chewy/debug.h
@@ -41,7 +41,7 @@ void play_last_ani(int16 nr);
 
 void set_z_ebene();
 void get_phase(ObjMov *om);
-//FIXME: was using FILE *
+//FIXME: was using Stream *
 void test_load(void *handle, taf_info *Tt, int16 anz);
 
 } // namespace Chewy
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 917e160c7d4..dfb261885ec 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -20,13 +20,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/detail.h"
+#include "chewy/file.h"
 #include "chewy/global.h"
 
 namespace Chewy {
@@ -67,20 +62,20 @@ detail::detail() {
 
 detail::~detail() {
 	if (CurrentTaf)
-		fclose((FILE *)CurrentTaf);
+		chewy_fclose(CurrentTaf);
 	direct_taf_ani = OFF;
 }
 
 void detail::load_rdi(const char *fname_, int16 room_nr) {
-	FILE *handle;
+	Stream *handle;
 	taf_info *tmprdi;
 	tmprdi = rdi.dptr;
-	handle = fopen(fname_, "rb");
+	handle = chewy_fopen(fname_, "rb");
 	if (handle) {
-		if (fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, handle)) {
+		if (chewy_fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, handle)) {
 			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
-				fseek(handle, (long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
-				if (!fread(&rdi, sizeof(room_detail_info), 1, handle)) {
+				chewy_fseek(handle, (long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
+				if (!chewy_fread(&rdi, sizeof(room_detail_info), 1, handle)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -92,7 +87,7 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
@@ -189,7 +184,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 			if (!modul) {
 				mem->file->load_korrektur(fname_, (byte *)Tt->korrektur);
 				Tt->palette = 0;
-				CurrentTaf = fopen(fname_, "rb");
+				CurrentTaf = chewy_fopen(fname_, "rb");
 				if (CurrentTaf) {
 					load_sprite_pointer(CurrentTaf);
 				} else {
@@ -216,7 +211,7 @@ void detail::del_taf_tbl(taf_info *Tt) {
 	free((char *) Tt);
 
 	if (CurrentTaf) {
-		fclose((FILE *)CurrentTaf);
+		chewy_fclose(CurrentTaf);
 		CurrentTaf = 0;
 	}
 }
@@ -243,23 +238,23 @@ void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 }
 
 void detail::load_taf_seq(void *h, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	uint32 size;
 	taf_imageheader iheader;
 	int16 i;
 
-	fseek(handle, SpritePos[spr_nr], SEEK_SET);
+	chewy_fseek(handle, SpritePos[spr_nr], SEEK_SET);
 	for (i = 0; i < spr_anz && !modul; i++) {
-		if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+		if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 			if (!Tt->image[spr_nr + i]) {
 				size = iheader.width * iheader.height ;
 				Tt->image[spr_nr + i] = (byte *)calloc(size + 4l, 1);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
-				fseek(handle, iheader.image, SEEK_SET);
+				chewy_fseek(handle, iheader.image, SEEK_SET);
 				mem->file->load_tafmcga(handle, iheader.komp, size, Tt->image[spr_nr + i] + 4l);
 			}
-			fseek(handle, iheader.next, SEEK_SET);
+			chewy_fseek(handle, iheader.next, SEEK_SET);
 		} else {
 			fcode = READFEHLER;
 			modul = DATEI;
@@ -270,8 +265,8 @@ void detail::load_taf_seq(void *h, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 #ifdef ICM
 
 void detail::save_detail(char *fname, int16 room_nr) {
-	FILE *new_handle;
-	FILE *old_handle;
+	Stream *new_handle;
+	Stream *old_handle;
 	taf_info *tmprdi;
 	char tmp_name[MAXPATH + 1];
 	char *str;
@@ -294,22 +289,22 @@ void detail::save_detail(char *fname, int16 room_nr) {
 	mem->file->fcopy(tmp_name, fname);
 	remove("rdi.old\0");
 	mem->file->fcopy("rdi.old", fname);
-	old_handle = fopen("rdi.old", "rb");
+	old_handle = chewy_fopen("rdi.old", "rb");
 	if (old_handle) {
-		new_handle = fopen(fname, "wb");
+		new_handle = chewy_fopen(fname, "wb");
 		if (new_handle) {
 			strcpy(rdi_datei_header.Id, "RDI\0");
 			rdi_datei_header.Anz = MAX_RDI_ROOM;
-			if (fwrite(&rdi_datei_header, sizeof(RdiDateiHeader), 1, new_handle)) {
+			if (chewy_fwrite(&rdi_datei_header, sizeof(RdiDateiHeader), 1, new_handle)) {
 
-				fseek(old_handle, sizeof(RdiDateiHeader), SEEK_SET);
+				chewy_fseek(old_handle, sizeof(RdiDateiHeader), SEEK_SET);
 				for (i = 0; i < room_nr && !modul ; i++) {
-					if (fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
+					if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
 #ifdef KONVERT
 						konvert_format(&tmp_rdi, &tmp_rdi_new);
-						if (!fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+						if (!chewy_fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
 #else
-						if (!fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
+						if (!chewy_fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
 #endif
 						{
 							modul = DATEI;
@@ -323,21 +318,21 @@ void detail::save_detail(char *fname, int16 room_nr) {
 
 #ifdef KONVERT
 				konvert_format(&rdi, &rdi_new);
-				if (fwrite(&rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+				if (chewy_fwrite(&rdi_new, sizeof(room_detail_info_new), 1, new_handle))
 #else
-				if (fwrite(&rdi, sizeof(room_detail_info), 1, new_handle))
+				if (chewy_fwrite(&rdi, sizeof(room_detail_info), 1, new_handle))
 #endif
 				{
 
-					fseek(old_handle, sizeof(room_detail_info), SEEK_CUR);
+					chewy_fseek(old_handle, sizeof(room_detail_info), SEEK_CUR);
 
 					for (i = 0; i < MAX_RDI_ROOM - (room_nr + 1) && !modul ; i++) {
-						if (fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
+						if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
 #ifdef KONVERT
 							konvert_format(&tmp_rdi, &tmp_rdi_new);
-							if (!fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
+							if (!chewy_fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
 #else
-							if (!fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
+							if (!chewy_fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
 #endif
 							{
 								modul = DATEI;
@@ -356,12 +351,12 @@ void detail::save_detail(char *fname, int16 room_nr) {
 				modul = DATEI;
 				fcode = WRITEFEHLER;
 			}
-			fclose(new_handle);
+			chewy_fclose(new_handle);
 		} else {
 			modul = DATEI;
 			fcode = OPENFEHLER;
 		}
-		fclose(old_handle);
+		chewy_fclose(old_handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
@@ -827,7 +822,7 @@ void detail::set_sound_area(byte *buffer, uint32 size) {
 	SoundBufferSize = size;
 }
 
-void detail::load_room_sounds(void *tvp_handle) {
+void detail::load_room_sounds(Stream *tvp_handle) {
 	int16 i, break_flag;
 	int16 index;
 	byte *workbuf;
@@ -1113,13 +1108,13 @@ void detail::load_taf_ani_sprite(int16 nr) {
 	int32 size;
 	taf_imageheader iheader;
 	if (CurrentTaf) {
-		fseek((FILE *)CurrentTaf, SpritePos[nr], SEEK_SET);
+		chewy_fseek(CurrentTaf, SpritePos[nr], SEEK_SET);
 
-		if (fread(&iheader, sizeof(taf_imageheader), 1, (FILE *)CurrentTaf)) {
+		if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, CurrentTaf)) {
 			size = (int32)iheader.width * (int32)iheader.height;
 			((int16 *)taf_load_buffer)[0] = iheader.width;
 			((int16 *)taf_load_buffer)[1] = iheader.height;
-			fseek((FILE *)CurrentTaf, iheader.image, SEEK_SET);
+			chewy_fseek(CurrentTaf, iheader.image, SEEK_SET);
 			if (taf_load_buffer)
 				mem->file->load_tafmcga(CurrentTaf, iheader.komp, size, taf_load_buffer + 4l);
 			else {
@@ -1139,24 +1134,24 @@ void detail::load_taf_ani_sprite(int16 nr) {
 }
 
 void detail::load_sprite_pointer(void *h) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	uint16 anzahl;
 	taf_dateiheader header;
 	taf_imageheader iheader;
 	int16 i;
 	if (handle) {
-		fseek(handle, 0, SEEK_SET);
-		if (fread(&header, sizeof(taf_dateiheader), 1, handle)) {
+		chewy_fseek(handle, 0, SEEK_SET);
+		if (chewy_fread(&header, sizeof(taf_dateiheader), 1, handle)) {
 			anzahl = header.count;
-			fseek(handle, header.next, SEEK_SET);
+			chewy_fseek(handle, header.next, SEEK_SET);
 			SpritePos[0] = header.next;
 			for (i = 1; i < anzahl && !modul; i++) {
-				if (!fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+				if (!chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 				SpritePos[i] = iheader.next;
-				fseek(handle, iheader.next, SEEK_SET);
+				chewy_fseek(handle, iheader.next, SEEK_SET);
 			}
 		} else {
 			modul = DATEI;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index e08e6d7da34..e280a7cc2d8 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -23,6 +23,7 @@
 #ifndef CHEWY_DETAIL_H
 #define CHEWY_DETAIL_H
 
+#include "chewy/file.h"
 #include "chewy/ngshext.h"
 #include "chewy/defines.h"
 
@@ -229,8 +230,7 @@ public:
 	                      int16 scrx, int16 scry);
 
 	void set_sound_area(byte *buffer, uint32 size);
-	// FIXME : was FILE*
-	void load_room_sounds(void *tvp_handle);
+	void load_room_sounds(Stream *tvp_handle);
 	void get_sound_para(int16 nr, sound_def_blk *sdb_dest);
 	void set_sound_para(int16 nr, sound_def_blk *sdb_src);
 	void map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index);
@@ -273,8 +273,7 @@ private:
 	char tafname[80];
 	byte *taf_load_buffer;
 	int16 direct_taf_ani;
-	// FIXME : was FILE*
-	void *CurrentTaf;
+	Stream *CurrentTaf;
 	uint32 SpritePos[MAXSPRITE];
 
 	byte *SoundBuffer;
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
index c156c9cbcee..ee9183bdc7f 100644
--- a/engines/chewy/fehler.cpp
+++ b/engines/chewy/fehler.cpp
@@ -20,13 +20,6 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "common/system.h"
 #include "chewy/fehler.h"
 #include "chewy/ngstypes.h"
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 5900ab8fc00..0ce76995574 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -20,16 +20,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
-#define FORBIDDEN_SYMBOL_EXCEPTION_fputc
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/defines.h"
+#include "chewy/file.h"
 #include "chewy/global.h"
 
 namespace Chewy {
@@ -96,7 +88,7 @@ int16 call_fileio(int16 palette, int16 mode) {
 }
 
 void save(void *h) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	int16 spr_nr;
 	int16 i;
 	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
@@ -105,7 +97,7 @@ void save(void *h) {
 		spieler.Y[i] = spieler_vector[i].Xypos[1];
 		spieler.Phase[i] = person_end_phase[i];
 	}
-	if (!(fwrite(&spieler, sizeof(Spieler), 1, handle))) {
+	if (!(chewy_fwrite(&spieler, sizeof(Spieler), 1, handle))) {
 		fcode = WRITEFEHLER;
 		modul = DATEI;
 	} else {
@@ -115,11 +107,11 @@ void save(void *h) {
 }
 
 void load(void *h) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	exit_room(-1);
 
 	int16 i;
-	if (!(fread(&spieler, sizeof(Spieler), 1, handle))) {
+	if (!(chewy_fread(&spieler, sizeof(Spieler), 1, handle))) {
 		fcode = READFEHLER;
 		modul = DATEI;
 	} else {
@@ -159,14 +151,14 @@ void load(void *h) {
 }
 
 void append_adsh(void *sh) {
-	FILE *shandle = (FILE *)sh;
+	Stream *shandle = (Stream *)sh;
 	atds->close_handle(ADH_DATEI);
 	int16 ch;
-	FILE *handle = fopen(ADSH_TMP, "rb");
+	Stream *handle = chewy_fopen(ADSH_TMP, "rb");
 	if (handle) {
-		while ((ch = fgetc(handle)) != EOF)
-			fputc(ch, shandle);
-		fclose(handle);
+		while ((ch = chewy_fgetc(handle)) != EOF)
+			chewy_fputc(ch, shandle);
+		chewy_fclose(handle);
 		atds->open_handle(ADSH_TMP, "rb+", ADH_DATEI);
 		ERROR
 	} else {
@@ -176,14 +168,14 @@ void append_adsh(void *sh) {
 }
 
 void split_adsh(void *sh) {
-	FILE *shandle = (FILE *)sh;
+	Stream *shandle = (Stream *)sh;
 	atds->close_handle(ADH_DATEI);
 	int16 ch;
-	FILE *handle = fopen(ADSH_TMP, "wb+");
+	Stream *handle = chewy_fopen(ADSH_TMP, "wb+");
 	if (handle) {
-		while ((ch = fgetc(shandle)) != EOF)
-			fputc(ch, handle);
-		fclose(handle);
+		while ((ch = chewy_fgetc(shandle)) != EOF)
+			chewy_fputc(ch, handle);
+		chewy_fclose(handle);
 		atds->open_handle(ADSH_TMP, "rb+", ADH_DATEI);
 		ERROR
 	} else {
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
new file mode 100644
index 00000000000..1b28d394974
--- /dev/null
+++ b/engines/chewy/file.h
@@ -0,0 +1,85 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_FILE_H
+#define CHEWY_FILE_H
+
+#include "common/file.h"
+#include "common/textconsole.h"
+
+namespace Chewy {
+
+using Common::Stream;
+
+inline Stream *chewy_fopen(const char *fname, const char *mode) {
+	assert(!strcmp(mode, "rb"));
+	Common::File *f = new Common::File();
+	if (f->open(fname)) {
+		return f;
+	} else {
+		delete f;
+		return nullptr;
+	}
+}
+
+inline void chewy_fclose(Stream *&stream) {
+	delete stream;
+	stream = nullptr;
+}
+
+inline size_t chewy_fread(void *ptr, size_t size, size_t nmemb, Stream *stream) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+	return rs->read(ptr, size * nmemb) / size;
+}
+
+inline int chewy_fseek(Stream *stream, long int offset, int whence) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+	return rs->seek(offset, whence);
+}
+
+inline int chewy_fgetc(Stream *stream) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+	return rs->readByte();
+}
+
+inline size_t chewy_ftell(Stream *stream) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+	return rs->size();
+}
+
+inline size_t chewy_fwrite(void *ptr, size_t size, size_t nmemb, Stream *stream) {
+	::error("TODO: chewy_fwrite");
+	return 0;
+}
+
+inline int chewy_fputc(byte c, Stream *stream) {
+	::error("TODO: chewy_fputc");
+	return 0;
+}
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index af5547e98c0..370ecd95dc3 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -20,13 +20,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "common/system.h"
+#include "chewy/file.h"
 #include "chewy/flic.h"
 
 namespace Chewy {
@@ -50,12 +45,12 @@ flic::~flic() {
 }
 
 void flic::play(const char *fname, byte *vscreen, byte *load_p) {
-	FILE *lhandle;
+	Stream *lhandle;
 
-	lhandle = fopen(fname, "rb");
+	lhandle = chewy_fopen(fname, "rb");
 	if (lhandle) {
 		play(lhandle, vscreen, load_p);
-		fclose(lhandle);
+		chewy_fclose(lhandle);
 	}
 	else {
 		modul = DATEI;
@@ -64,7 +59,7 @@ void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 }
 
 void flic::play(void *h, byte *vscreen, byte *load_p) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	uint16 i;
 	size_t tmp_size;
 	char key;
@@ -73,7 +68,7 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 
 	load_puffer = load_p;
 	virt_screen = vscreen + 4;
-	if (fread(&flic_header, sizeof(FlicHead), 1, handle)) {
+	if (chewy_fread(&flic_header, sizeof(FlicHead), 1, handle)) {
 		if (flic_header.type == FLC) {
 
 			key = 0;
@@ -83,7 +78,7 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 			cls_flag = false;
 			CurrentFrame = 0;
 			for (i = 0; (i < flic_header.frames) && (!modul) && (key != 27); i++) {
-				if (!fread(&frame_header, sizeof(FrameHead), 1, handle)) {
+				if (!chewy_fread(&frame_header, sizeof(FrameHead), 1, handle)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -94,7 +89,7 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 						start /= 0.05f;
 						start += flic_header.speed;
 						if (tmp_size) {
-							if (!fread(load_puffer, tmp_size, 1, handle)) {
+							if (!chewy_fread(load_puffer, tmp_size, 1, handle)) {
 								modul = DATEI;
 								fcode = READFEHLER;
 							}
@@ -108,7 +103,7 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 						++CurrentFrame;
 					}
 					else
-						fseek(handle, frame_header.size - (long)sizeof(FrameHead),
+						chewy_fseek(handle, frame_header.size - (long)sizeof(FrameHead),
 						      SEEK_CUR);
 				}
 			}
@@ -347,11 +342,11 @@ void flic::custom_play(CustomInfo *ci) {
 	Sound = ci->SoundSlot;
 
 	if (ci->Fname != 0) {
-		ci->Handle = fopen(ci->Fname, "rb");
-		fseek((FILE *)ci->Handle, 0, SEEK_SET);
+		ci->Handle = chewy_fopen(ci->Fname, "rb");
+		chewy_fseek((Stream *)ci->Handle, 0, SEEK_SET);
 	}
 	if (ci->Handle) {
-		if (fread(&custom_header, sizeof(CustomFlicHead), 1, (FILE *)ci->Handle)) {
+		if (chewy_fread(&custom_header, sizeof(CustomFlicHead), 1, (Stream *)ci->Handle)) {
 			if (!scumm_strnicmp(custom_header.id, "CFO\0", 4)) {
 				key = 0;
 				trace_mode = false;
@@ -362,7 +357,7 @@ void flic::custom_play(CustomInfo *ci) {
 				CurrentFrame = 0;
 				for (i = 0; (i < custom_header.frames) && (!modul) && (key != 27); i++) {
 
-					if (!fread(&custom_frame, sizeof(CustomFrameHead), 1, (FILE *)ci->Handle)) {
+					if (!chewy_fread(&custom_frame, sizeof(CustomFrameHead), 1, (Stream *)ci->Handle)) {
 						modul = DATEI;
 						fcode = READFEHLER;
 					}
@@ -373,7 +368,7 @@ void flic::custom_play(CustomInfo *ci) {
 							start /= 0.05f;
 							start += (float)custom_header.speed;
 							if (custom_frame.size) {
-								if (!fread(load_puffer, custom_frame.size, 1, (FILE *)ci->Handle)) {
+								if (!chewy_fread(load_puffer, custom_frame.size, 1, (Stream *)ci->Handle)) {
 									modul = DATEI;
 									fcode = READFEHLER;
 								}
@@ -402,7 +397,7 @@ void flic::custom_play(CustomInfo *ci) {
 			}
 		}
 		if (ci->Fname != 0)
-			fclose((FILE *)ci->Handle);
+			chewy_fclose(ci->Handle);
 	}
 	else {
 		modul = DATEI;
@@ -411,7 +406,7 @@ void flic::custom_play(CustomInfo *ci) {
 }
 
 void flic::decode_custom_frame(void *h) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	uint16 para[10];
 	ChunkHead chead;
 	uint16 i, j;
@@ -422,14 +417,14 @@ void flic::decode_custom_frame(void *h) {
 	th = (tmf_header *)Music;
 
 	for (i = 0; (i < custom_frame.chunks) && (!modul); i++) {
-		if (!fread(&chead, sizeof(ChunkHead), 1, handle)) {
+		if (!chewy_fread(&chead, sizeof(ChunkHead), 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
 		switch (chead.type) {
 
 		case FADE_IN:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -440,7 +435,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case FADE_OUT:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -448,7 +443,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case LOAD_MUSIC:
-			if (!fread(Music, chead.size, 1, handle)) {
+			if (!chewy_fread(Music, chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -466,8 +461,8 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case LOAD_RAW:
-			if ((!fread(&para[0], 2, 1, handle)) ||
-			        (!fread(Sound, chead.size - 2, 1, handle))) {
+			if ((!chewy_fread(&para[0], 2, 1, handle)) ||
+			        (!chewy_fread(Sound, chead.size - 2, 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -478,8 +473,8 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case LOAD_VOC:
-			if ((!fread(&para[0], 2, 1, handle)) ||
-			        (!fread(Sound, chead.size - 2, 1, handle))) {
+			if ((!chewy_fread(&para[0], 2, 1, handle)) ||
+			        (!chewy_fread(Sound, chead.size - 2, 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -501,7 +496,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case PLAY_SEQ:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -520,7 +515,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case PLAY_PATTERN:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -557,7 +552,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_MVOL :
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -570,7 +565,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_LOOPMODE :
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -587,7 +582,7 @@ void flic::decode_custom_frame(void *h) {
 
 		case PLAY_VOC :
 
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -604,7 +599,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_SVOL :
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -616,7 +611,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_CVOL :
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -628,7 +623,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case FREE_EFFECT:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -636,7 +631,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case MFADE_IN:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -648,7 +643,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case MFADE_OUT:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -660,7 +655,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_STEREO:
-			if (!fread(&para[0], chead.size, 1, handle)) {
+			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -670,7 +665,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_SPEED :
-			if (!fread(&long_para, chead.size, 1, handle)) {
+			if (!chewy_fread(&long_para, chead.size, 1, handle)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index b5dc76f4fb5..e609b80290c 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -23,6 +23,7 @@
 #include "chewy/chewy.h"
 #include "chewy/types.h"
 #include "chewy/defines.h"
+#include "chewy/file.h"
 #include "chewy/ngshext.h"
 #include "chewy/objekt.h"
 #include "chewy/text.h"
@@ -190,7 +191,7 @@ AutoMov auto_mov[MAX_AUTO_MOV];
 
 int16 HowardMov;
 
-/* FILE */ void *spz_taf_handle;
+/* Stream */ void *spz_taf_handle;
 taf_seq_info *spz_tinfo;
 int16 SpzDelay;
 int16 spz_spr_nr[MAX_SPZ_PHASEN];
@@ -340,9 +341,9 @@ SplitStringInit ssi[AAD_MAX_PERSON] = {
 
 int16 frequenz;
 int16 CurrentSong = -1;
-/* FILE */ void *music_handle;
+Stream *music_handle;
 int16 EndOfPool;
-/* FILE */ void *speech_handle;
+Stream *speech_handle;
 byte *SpeechBuf[2];
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index ebdacecb3fa..b2fbc5ac94b 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -221,11 +221,9 @@ extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
 
 extern int16 frequenz;
-// FIXME: was FILE*
-extern void *music_handle;
+extern Stream *music_handle;
 extern int16 EndOfPool;
-// FIXME: was FILE*
-extern void *speech_handle;
+extern Stream *speech_handle;
 extern byte *SpeechBuf[2];
 extern int16 CurrentSong;
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 5da91dfca5a..91a2d3da2e5 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -20,12 +20,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/defines.h"
+#include "chewy/file.h"
 #include "chewy/global.h"
 
 namespace Chewy {
@@ -203,8 +199,8 @@ void init_room() {
 void init_atds() {
 	char tmp_path[MAXPFAD];
 	int16 i;
-	// FIXME: was FILE*
-	void *handle = atds->pool_handle(ATDS_TXT, "rb");
+
+	Stream *handle = atds->pool_handle(ATDS_TXT, "rb");
 	ERROR
 	atds->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
 	ERROR
@@ -268,13 +264,13 @@ void new_game() {
 	tmp = (char *)calloc(ROOM_ATS_MAX, 1);
 	ERROR
 
-	FILE *handle = fopen(ROOM_ATS_STEUER, "rb");
+	Stream *handle = chewy_fopen(ROOM_ATS_STEUER, "rb");
 	if (handle) {
-		if (!fread(tmp, ROOM_ATS_MAX, 1, handle)) {
+		if (!chewy_fread(tmp, ROOM_ATS_MAX, 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
@@ -286,13 +282,13 @@ void new_game() {
 
 	tmp = (char *)calloc(MAX_MOV_OBJ, 1);
 	ERROR
-	handle = fopen(INV_ATS_STEUER, "rb");
+	handle = chewy_fopen(INV_ATS_STEUER, "rb");
 	if (handle) {
-		if (!fread(tmp, MAX_MOV_OBJ, 1, handle)) {
+		if (!chewy_fread(tmp, MAX_MOV_OBJ, 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
@@ -337,16 +333,16 @@ void init_load() {
 }
 
 void get_detect(char *fname_) {
-	FILE *handle;
+	Stream *handle;
 	modul = 0;
 	fcode = 0;
-	handle = fopen(fname_, "rb");
+	handle = chewy_fopen(fname_, "rb");
 	if (handle) {
-		if (!fread(&detect, sizeof(DetectInfo), 1, handle)) {
+		if (!chewy_fread(&detect, sizeof(DetectInfo), 1, handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
@@ -491,14 +487,14 @@ void sound_init() {
 	warning("STUB - Installing sound files");
 #if 0
 	system("cd sound");
-	FILE *test_handle = fopen("SET.INT", "rb");
+	Stream *test_handle = chewy_fopen("SET.INT", "rb");
 	if (!test_handle) {
-		test_handle = fopen("SET.INT", "wb");
+		test_handle = chewy_fopen("SET.INT", "wb");
 		if (test_handle) {
-			fputc('N', test_handle);
-			fputc('G', test_handle);
-			fputc('S', test_handle);
-			fclose(test_handle);
+			chewy_fputc('N', test_handle);
+			chewy_fputc('G', test_handle);
+			chewy_fputc('S', test_handle);
+			chewy_fclose(test_handle);
 		} else {
 			modul = DATEI;
 			fcode = OPENFEHLER;
@@ -552,7 +548,7 @@ void sound_init() {
 			mouse_hot_y = 0;
 		}
 	} else
-		fclose(test_handle);
+		chewy_fclose(test_handle);
 	detect.SoundSource = ailsnd->init(frequenz);
 	ERROR
 	system("cd ..");
@@ -573,16 +569,16 @@ void sound_init() {
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
 		music_handle = room->get_sound_handle();
-		fseek(music_handle, 0, SEEK_SET);
+		chewy_fseek(music_handle, 0, SEEK_SET);
 		EndOfPool = 0;
 		NewPhead Nph;
-		if (!fread(&Nph, sizeof(NewPhead), 1, music_handle)) {
+		if (!chewy_fread(&Nph, sizeof(NewPhead), 1, music_handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else
 			EndOfPool = Nph.PoolAnz - 1;
 		ERROR
-		speech_handle = fopen(SPEECH_TVP, "rb");
+		speech_handle = chewy_fopen(SPEECH_TVP, "rb");
 		if (!speech_handle) {
 			modul = DATEI;
 			fcode = OPENFEHLER;
@@ -610,7 +606,7 @@ void sound_exit() {
 		ailsnd->exit_mix_mode();
 		ailsnd->exit1();
 		if (speech_handle)
-			fclose(speech_handle);
+			chewy_fclose(speech_handle);
 	}
 #endif
 }
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index ac6fb6b85d5..7879e1f3dc0 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -20,14 +20,8 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "common/system.h"
+#include "chewy/file.h"
 #include "chewy/io_game.h"
 
 namespace Chewy {
@@ -579,7 +573,7 @@ int16 io_game::get_files(char *fname) {
 	int16 ret = 0;
 	char path[80];
 	char str[4];
-	FILE *handle;
+	Stream *handle;
 	char name[USER_NAME + 3];
 	char tmp_id[9];
 	for (i = 0; i < 20; i++) {
@@ -595,15 +589,15 @@ int16 io_game::get_files(char *fname) {
 		f_ok = _dos_findfirst(path, _A_NORMAL, &f_info);
 		if (!f_ok) {
 			file_find_g[i][0] = 1;
-			handle = fopen(path, "rb");
+			handle = chewy_fopen(path, "rb");
 			if (handle) {
-				fread(&tmp_id, 4, 1, handle);
+				chewy_fread(&tmp_id, 4, 1, handle);
 				if (!strncmp(tmp_id, io->id, 3)) {
 					++ret;
-					fread(name, USER_NAME + 2, 1, handle);
+					chewy_fread(name, USER_NAME + 2, 1, handle);
 					strcpy(&file_find_g[i][1], name);
 				}
-				fclose(handle);
+				chewy_fclose(handle);
 			}
 		}
 	}
@@ -618,7 +612,7 @@ void io_game::save(int16 y, int16 nr, char *fname) {
 	char path[80];
 	int16 abfrage = 0;
 	int16 j;
-	FILE *handle;
+	Stream *handle;
 	if (nr + 1 < 10)
 		j = 2;
 	else
@@ -639,9 +633,9 @@ void io_game::save(int16 y, int16 nr, char *fname) {
 	}
 
 	else {
-		handle = fopen(path, "rb");
+		handle = chewy_fopen(path, "rb");
 		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
-		fclose(handle);
+		chewy_fclose(handle);
 		abfrage = out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[nr][1]);
 
 	}
@@ -653,19 +647,19 @@ void io_game::save(int16 y, int16 nr, char *fname) {
 	abfrage = 13;
 	if (abfrage == 13) {
 
-		handle = fopen(path, "wb+");
+		handle = chewy_fopen(path, "wb+");
 		if (handle) {
-			fwrite(io->id, sizeof(io->id), 1, handle);
-			fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
+			chewy_fwrite(io->id, sizeof(io->id), 1, handle);
+			chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
 
 			(*io->save_funktion)(handle);
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 	}
 }
 
 void io_game::load(int16 nr, char *fname) {
-	FILE *handle;
+	Stream *handle;
 	char str[4];
 	char path[80];
 	int16 j;
@@ -681,12 +675,12 @@ void io_game::load(int16 nr, char *fname) {
 		itoa(nr + 1, str + j, 10);
 		strcpy(path, fname);
 		strcat(path, str);
-		handle = fopen(path, "rb");
+		handle = chewy_fopen(path, "rb");
 		if (handle) {
-			fseek(handle, sizeof(io->id) + USER_NAME + 2, 0);
+			chewy_fseek(handle, sizeof(io->id) + USER_NAME + 2, 0);
 
 			(*io->load_funktion)(handle);
-			fclose(handle);
+			chewy_fclose(handle);
 		}
 	}
 }
@@ -713,7 +707,7 @@ void io_game::save_entry(int16 nr, char *fname) {
 	char str[4];
 	char path[80];
 	int16 j;
-	FILE *handle;
+	Stream *handle;
 	if (nr + 1 < 10)
 		j = 2;
 	else
@@ -722,13 +716,13 @@ void io_game::save_entry(int16 nr, char *fname) {
 	itoa(nr + 1, str + j, 10);
 	strcpy(path, fname);
 	strcat(path, str);
-	handle = fopen(path, "wb+");
+	handle = chewy_fopen(path, "wb+");
 	if (handle) {
-		fwrite(io->id, sizeof(io->id), 1, handle);
-		fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
+		chewy_fwrite(io->id, sizeof(io->id), 1, handle);
+		chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
 
 		(*io->save_funktion)(handle);
-		fclose(handle);
+		chewy_fclose(handle);
 	}
 }
 
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index ec5ccc5c9c4..25441738751 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -20,13 +20,6 @@
  *
  */
 
-// FIXME
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/memory.h"
 
 namespace Chewy {
@@ -81,7 +74,7 @@ taf_info *memory::taf_adr(const char *filename) {
 
 taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
                                   int16 image_anz) {
-	FILE *handle = (FILE *)h;
+	Stream *handle = (Stream *)h;
 	taf_dateiheader header;
 	taf_imageheader iheader;
 	taf_seq_info *ts_info = nullptr;
@@ -92,22 +85,22 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 	int16 id;
 	byte *tmp1;
 	byte *sp_ptr;
-	fseek(handle, 0, SEEK_SET);
-	if (fread(&header, sizeof(taf_dateiheader), 1, handle)) {
+	chewy_fseek(handle, 0, SEEK_SET);
+	if (chewy_fread(&header, sizeof(taf_dateiheader), 1, handle)) {
 		id = file->get_id(header.id);
 		if (id == TAFDATEI) {
 			if (header.korrekt > 1) {
-				fseek(handle, (-(int)((header.count - image_start)*sizeof(uint32))), SEEK_END);
-				if (!fread(&ptr, sizeof(uint32), 1, handle)) {
+				chewy_fseek(handle, (-(int)((header.count - image_start)*sizeof(uint32))), SEEK_END);
+				if (!chewy_fread(&ptr, sizeof(uint32), 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
-					fseek(handle, ptr, SEEK_SET);
+					chewy_fseek(handle, ptr, SEEK_SET);
 					size = 0;
 					for (i = 0; i < image_anz && !modul; i++) {
-						if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 							size += iheader.width * iheader.height ;
-							fseek(handle, iheader.next, SEEK_SET);
+							chewy_fseek(handle, iheader.next, SEEK_SET);
 						} else {
 							modul = DATEI;
 							fcode = READFEHLER;
@@ -122,11 +115,11 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 							ts_info = (taf_seq_info *)tmp1;
 							ts_info->anzahl = image_anz;
 							ts_info->korrektur = (int16 *)(tmp1 + size);
-							fseek(handle, ptr, SEEK_SET);
+							chewy_fseek(handle, ptr, SEEK_SET);
 							sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
 							                 + (image_anz * sizeof(char *)));
 							for (i = 0; i < image_anz && !modul; i++) {
-								if (fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+								if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
 									ts_info->image[i] = sp_ptr;
 									abmess = (int16 *)sp_ptr;
 									abmess[0] = iheader.width;
@@ -134,9 +127,9 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 									sp_ptr += 4;
 									size = (uint32)((uint32)iheader.height) *
 									       ((uint32)iheader.width);
-									fseek(handle, iheader.image, SEEK_SET);
+									chewy_fseek(handle, iheader.image, SEEK_SET);
 									file->load_tafmcga(handle, iheader.komp, size, sp_ptr);
-									fseek(handle, iheader.next, SEEK_SET);
+									chewy_fseek(handle, iheader.next, SEEK_SET);
 									sp_ptr += size;
 								} else {
 									modul = DATEI;
@@ -144,8 +137,8 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 								}
 							}
 							if (!modul) {
-								fseek(handle, (-(int)(((header.count * 2) - image_start)*sizeof(uint32))), SEEK_END);
-								if (!fread(ts_info->korrektur, image_anz * 4, 1, handle)) {
+								chewy_fseek(handle, (-(int)(((header.count * 2) - image_start)*sizeof(uint32))), SEEK_END);
+								if (!chewy_fread(ts_info->korrektur, image_anz * 4, 1, handle)) {
 									{
 										fcode = READFEHLER;
 										modul = DATEI;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 942b40aaca1..688f1a33b9f 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -24,6 +24,7 @@
 #define CHEWY_NGSTYPES_H
 
 #include "chewy/ngsdefs.h"
+#include "chewy/file.h"
 #include "common/stream.h"
 
 namespace Chewy {
@@ -384,8 +385,8 @@ struct iog_init {
 	uint8 f3 = 0;
 	uint8 f4 = 0;
 	uint8 key_nr = 0;
-	void (*save_funktion)(void *handle) = nullptr; // FIXME - (FILE *handle);
-	void (*load_funktion)(void *handle) = nullptr; // FIXME - (FILE *handle);
+	void (*save_funktion)(void *handle) = nullptr; // FIXME - (Stream *handle);
+	void (*load_funktion)(void *handle) = nullptr; // FIXME - (Stream *handle);
 	int16 delay = 0;
 };
 
@@ -515,8 +516,7 @@ struct CustomFrameHead {
 
 struct CustomInfo {
 	char *Fname = nullptr;
-	// FIXME: Was FILE
-	void *Handle = nullptr;
+	Stream *Handle = nullptr;
 	byte *VirtScreen = 0;
 	byte *TempArea = 0;
 	byte *SoundSlot = 0;
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index e72aa55c214..65cdfd46d81 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -20,11 +20,6 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/defines.h"
 #include "chewy/global.h"
 #include "chewy/ngshext.h"
@@ -95,16 +90,15 @@ objekt::~objekt() {
 }
 
 int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
-	FILE *handle;
-	handle = fopen(fname_, "rb");
+	Stream *handle;
+	handle = chewy_fopen(fname_, "rb");
 	if (handle) {
-
-		if (!fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+		if (!chewy_fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
-				if (!fread(rmo, (size_t)iib_datei_header.Size, 1, handle)) {
+				if (!chewy_fread(rmo, (size_t)iib_datei_header.Size, 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -116,7 +110,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -125,16 +119,16 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 }
 
 int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
-	FILE *handle;
-	handle = fopen(fname_, "rb");
+	Stream *handle;
+	handle = chewy_fopen(fname_, "rb");
 	if (handle) {
 
-		if (!fread(&sib_datei_header, sizeof(SibDateiHeader), 1, handle)) {
+		if (!chewy_fread(&sib_datei_header, sizeof(SibDateiHeader), 1, handle)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!fread(rsi, (size_t)(sib_datei_header.Anz * sizeof(RoomStaticInventar)), 1, handle)) {
+				if (!chewy_fread(rsi, (size_t)(sib_datei_header.Anz * sizeof(RoomStaticInventar)), 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -146,7 +140,7 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -155,16 +149,16 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 }
 
 int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
-	FILE *handle;
-	handle = fopen(fname_, "rb");
+	Stream *handle;
+	handle = chewy_fopen(fname_, "rb");
 	if (handle) {
 
-		if (!fread(&eib_datei_header, sizeof(EibDateiHeader), 1, handle)) {
+		if (!chewy_fread(&eib_datei_header, sizeof(EibDateiHeader), 1, handle)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!fread(RoomEx, (size_t)(eib_datei_header.Anz * sizeof(RoomExit)), 1, handle)) {
+				if (!chewy_fread(RoomEx, (size_t)(eib_datei_header.Anz * sizeof(RoomExit)), 1, handle)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -176,7 +170,7 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		fclose(handle);
+		chewy_fclose(handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index de53d5f534e..1ecc39e2b77 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -20,15 +20,6 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-//define FORBIDDEN_SYMBOL_EXCEPTION_fgetc
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fputc
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "common/system.h"
 #include "chewy/defines.h"
 #include "chewy/global.h"
@@ -1096,7 +1087,7 @@ void flic_cut(int16 nr, int16 mode) {
 	det->disable_room_sound();
 	ailsnd->end_sound();
 	g_system->delayMillis(1000); // delay(50);
-	Ci.Handle = (void *)fopen("CUT\\CUT.TAP\0", "rb");
+	Ci.Handle = chewy_fopen("CUT\\CUT.TAP\0", "rb");
 	Ci.Fname = 0;
 	if (Ci.Handle) {
 		switch (nr) {
@@ -1123,7 +1114,7 @@ void flic_cut(int16 nr, int16 mode) {
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
@@ -1132,7 +1123,7 @@ void flic_cut(int16 nr, int16 mode) {
 				out->cls();
 				flc->custom_play(&Ci);
 				if (!modul) {
-					fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+					chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 					out->cls();
 					flc->custom_play(&Ci);
 				}
@@ -1148,27 +1139,27 @@ void flic_cut(int16 nr, int16 mode) {
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				fseek((FILE *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
@@ -1236,7 +1227,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		}
-		fclose((FILE *)Ci.Handle);
+		chewy_fclose(Ci.Handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 38e81799d0b..41d294222e7 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -20,12 +20,6 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-#define FORBIDDEN_SYMBOL_EXCEPTION_fread
-#define FORBIDDEN_SYMBOL_EXCEPTION_fseek
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "chewy/defines.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
@@ -45,13 +39,13 @@ Room::~Room() {
 	int16 i;
 	for (i = 0; i < MAX_ROOM_HANDLE; i++)
 		if (roomhandle[i])
-			fclose((FILE *)roomhandle[i]);
+			chewy_fclose(roomhandle[i]);
 	free_ablage();
 }
 
 void *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
-	FILE *handle;
-	handle = fopen(fname1, fmode);
+	Stream *handle;
+	handle = chewy_fopen(fname1, fmode);
 	if (handle) {
 		close_handle(mode);
 		roomhandle[mode] = handle;
@@ -65,7 +59,7 @@ void *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
 
 void Room::close_handle(int16 mode) {
 	if (roomhandle[mode])
-		fclose((FILE *)roomhandle[mode]);
+		chewy_fclose(roomhandle[mode]);
 }
 
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
@@ -257,12 +251,12 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 	if (roomhandle[R_TGPDATEI]) {
 		mem->file->select_pool_item(roomhandle[R_TGPDATEI], nr);
 
-		if (!fread(&tb, sizeof(tbf_dateiheader), 1, (FILE *)roomhandle[R_TGPDATEI])) {
+		if (!chewy_fread(&tb, sizeof(tbf_dateiheader), 1, roomhandle[R_TGPDATEI])) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
 		if (!modul) {
-			fseek((FILE *)roomhandle[R_TGPDATEI], -(int)sizeof(tbf_dateiheader), SEEK_CUR);
+			chewy_fseek(roomhandle[R_TGPDATEI], -(int)sizeof(tbf_dateiheader), SEEK_CUR);
 			Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), tb.entpsize + 4);
 			if (Rb->AkAblage == -1) {
 			} else if (Rb->AkAblage >= 1000) {
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 5e68cd95b0a..611bf002ec9 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -143,9 +143,7 @@ private:
 	int16 AblageInfo[MAX_ABLAGE][2];
 
 	byte *GedMem[MAX_ABLAGE];
-	// FIXME: was FILE*
-	void *roomhandle[MAX_ROOM_HANDLE];
-
+	Stream *roomhandle[MAX_ROOM_HANDLE];
 };
 
 } // namespace Chewy


Commit: fb218ee72b5e307f28c0e7c0a0444e183c366105
    https://github.com/scummvm/scummvm/commit/fb218ee72b5e307f28c0e7c0a0444e183c366105
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:46-08:00

Commit Message:
CHEWY: Remove deprecated correct_fname method

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 15e1e6b6901..d52ff150320 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -82,7 +82,7 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 	if ((*filename) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".PCX\0");
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (chewy_fread(header, sizeof(pcx_header), 1, handle)) {
@@ -171,7 +171,7 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 	if ((*filename) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TBF\0");
-	correct_fname(filename);
+
 	if ((speicher) && (palette)) {
 		handle = chewy_fopen(filename, "rb");
 		if (handle) {
@@ -315,7 +315,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 	if ((*filename) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
-	correct_fname(filename);
+
 	abmess = (int16 *) speicher;
 	speicher += 4;
 	if (abmess) {
@@ -403,7 +403,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 	if ((filename[0]) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
-	correct_fname(filename);
+
 	speicher = hi_sp;
 	if (speicher) {
 		handle = chewy_fopen(filename, "rb");
@@ -470,7 +470,7 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 	if ((filename[0]) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
-	correct_fname(filename);
+
 	speicher = sp;
 	if (speicher) {
 		handle = chewy_fopen(filename, "rb");
@@ -519,7 +519,6 @@ void datei::load_tff(const char *fname, byte *speicher) {
 		if ((*filename) == 0)
 			get_filename(filename, MAXPATH);
 		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
-		correct_fname(filename);
 		handle = chewy_fopen(filename, "rb");
 		if (handle) {
 			if (chewy_fread(speicher, sizeof(tff_header), 1, handle)) {
@@ -616,7 +615,7 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 	filename[i + 2] = 'D';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (!(chewy_fread(dial, sizeof(dialogue), 1, handle))) {
@@ -669,7 +668,7 @@ void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 	filename[i + 2] = 'B';
 	filename[i + 3] = 'I';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (!(chewy_fread(speicher, sizeof(sbi_inst), 1, handle))) {
@@ -709,7 +708,7 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 	filename[i + 2] = 'O';
 	filename[i + 3] = 'C';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	s = size(filename, VOCDATEI);
 
 	if (!modul) {
@@ -781,7 +780,7 @@ void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 	filename[i + 2] = 'O';
 	filename[i + 3] = 'C';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (!(chewy_fread(speicher, sizeof(voc_header), 1, handle))) {
@@ -806,7 +805,7 @@ void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
 	filename[i] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (!(chewy_fread(speicher, (uint16)size, 1, handle))) {
@@ -828,7 +827,7 @@ uint32 datei::load_file(const char *fname, byte *speicher) {
 	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
 		filename[i] = fname[i];
 	filename[i] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		chewy_fseek(handle, 0l, SEEK_END);
@@ -883,7 +882,7 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
 	speicher = (byte *)th;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		chewy_fseek(handle, 0l, SEEK_END);
@@ -995,7 +994,6 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 	filename[i + 2] = 'C';
 	filename[i + 3] = 'X';
 	filename[i + 4] = 0;
-	correct_fname(filename);
 
 	breite = abmess[0];
 	hoehe = abmess[1];
@@ -1094,7 +1092,7 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 	filename[i + 2] = 'A';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "wb");
 	if (handle) {
 		strncpy(header->id, "TAF\0", 4);
@@ -1176,7 +1174,7 @@ void datei::save_tff(const char *fname, byte *speicher) {
 		filename[i + 2] = 'F';
 		filename[i + 3] = 'F';
 		filename[i + 4] = 0;
-		correct_fname(filename);
+
 		handle = chewy_fopen(filename, "wb");
 		if (handle) {
 			tff->size = (uint32)tff->count * ((uint32)(tff->width / 8) *
@@ -1246,7 +1244,7 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 	filename[i + 2] = 'D';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "wb");
 	if (handle) {
 		strncpy(dial->id, "TDF\0", 4);
@@ -1299,7 +1297,7 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 	filename[i + 2] = 'M';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	Stream *handle = chewy_fopen(filename, "wb");
 	if (handle) {
 		if ((chewy_fwrite(thead, sizeof(tmf_header), 1, handle))) {
@@ -1350,7 +1348,7 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 	filename[i + 2] = 'D';
 	filename[i + 3] = 'F';
 	filename[i + 4] = 0;
-	correct_fname(filename);
+
 	handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (!(chewy_fread(&dial, sizeof(dialogue), 1, handle))) {
@@ -1396,7 +1394,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 		filename[i] = fname[i];
 	filename[i] = 0;
 	i = 0;
-	correct_fname(filename);
+
 	if ((*filename) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.')) {
@@ -1642,7 +1640,6 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 		}
 	}
 	if (!modul) {
-		correct_fname(filename);
 		handle = chewy_fopen(filename, "rb");
 		if (handle) {
 			switch (typ) {
@@ -1779,7 +1776,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 	if ((*filename) == 0)
 		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
-	correct_fname(filename);
+
 	Stream *handle = chewy_fopen(filename, "rb");
 	if (handle) {
 		if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
@@ -1807,15 +1804,6 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 	}
 }
 
-void datei::correct_fname(char *fname) {
-	int16 i = 0;
-	while ((fname[i] != '.') && (fname[i] != 0)) {
-		if (fname[i] == '/')
-			fname[i] = '\\';
-		i++;
-	}
-}
-
 int16 datei::get_filename(const char *fname, int16 maxlen) {
 	warning("STUB - get_filename");
 
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index cd45f4946e6..6e6a41a7aba 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -70,7 +70,7 @@ public:
 	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
 	void load_palette(const char *fname, byte *palette, int16 typ);
 	void imsize(const char *fname, uint32 *svekt);
-	void correct_fname(char *fname);
+
 	short get_filename(const char *fname, int16 maxlen);
 	void respfad(char *respath, char *resdir);
 	void res2dname(char *respath, char *fnme, char *dtname);


Commit: ce023c14d2dd821485c4aa84d088c5216dc10990
    https://github.com/scummvm/scummvm/commit/ce023c14d2dd821485c4aa84d088c5216dc10990
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:48-08:00

Commit Message:
CHEWY: Converting palette & taf loading

Still seems to be an issue with taf_Info images being null

Changed paths:
    engines/chewy/datei.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index d52ff150320..31d5ca13853 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -388,35 +388,34 @@ void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher
 }
 
 void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
-	Stream *handle;
+	Common::File f;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
-	int16 komp, id, i;
+	int16 komp, id;
 	uint16 sprcount, anzahl, *abmess;
 	uint32 size = 0, next = 0, image = 0;
 	byte *speicher;
 	header = (taf_dateiheader *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	i = 0;
-	if ((filename[0]) == 0)
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	if (!strchr(filename, '.'))
+		strcat(filename, ".taf");
 
 	speicher = hi_sp;
 	if (speicher) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
+		if (f.open(filename)) {
+			if (header->load(&f)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->mode == 19)) {
 					next = header->next;
 					anzahl = header->count;
 					for (sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
 						tinfo->image[sprcount] = speicher;
-						chewy_fseek(handle, next, SEEK_SET);
-						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+						f.seek(next, SEEK_SET);
+						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, &f)) {
 							next = iheader.next;
 							image = iheader.image;
 						} else {
@@ -430,28 +429,26 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 						size = (uint32)((uint32)iheader.height) *
 						       ((uint32)iheader.width);
 						komp = iheader.komp;
-						chewy_fseek(handle, image, SEEK_SET);
-						read_tbf_image(handle, komp, size, speicher);
+
+						f.seek(image, SEEK_SET);
+						read_tbf_image(&f, komp, size, speicher);
 						speicher += size;
 					}
-				}
-				else {
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			chewy_fclose(handle);
-		}
-		else {
+
+			f.close();
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}
@@ -1606,72 +1603,71 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 }
 
 void datei::load_palette(const char *fname, byte *palette, int16 typ) {
-	Stream *handle;
+	Common::File f;
 	uint8 zeichen;
-	uint16 j = 0;
+	uint16 j = 0, i;
 	tbf_dateiheader *tbfheader;
 	taf_dateiheader *tafheader;
 	pcx_header *pcxheader;
-	uint i = 0;
 	int16 id;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
+
 	tbfheader = (tbf_dateiheader *)tmp;
-	pcxheader = (pcx_header *) tmp;
+	pcxheader = (pcx_header *)tmp;
 	tafheader = (taf_dateiheader *)tmp;
-	if ((*filename) == 0)
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
+
 	if (!strchr(filename, '.')) {
 		switch (typ) {
 		case TBFDATEI:
 		case TPFDATEI:
-			strcat(filename, ".TBF\0");
+			strcat(filename, ".tbf");
 			break;
 		case PCXDATEI:
-			strcat(filename, ".PCX\0");
+			strcat(filename, ".pcx");
 			break;
 		case TAFDATEI:
-			strcat(filename, ".TAF\0");
+			strcat(filename, ".taf");
 			break;
 		default:
 			modul = DATEI;
 			fcode = NOTTBF;
 		}
 	}
+
 	if (!modul) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
+		if (f.open(filename)) {
 			switch (typ) {
 			case TBFDATEI:
 			case TPFDATEI:
-				if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+				if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
 					id = get_id(tbfheader->id);
 					if (((id == TBFDATEI) || (id == TPFDATEI)) &&
 					        (tbfheader->mode == 19)) {
 						for (i = 0; i < 768; i++)
 							palette[i] = tbfheader->palette[i];
-					}
-					else {
+					} else {
 						fcode = NOTTBF;
 						modul = DATEI;
 					}
-				}
-				else {
+				} else {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 				break;
 
 			case PCXDATEI:
-				if (chewy_fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+				if (chewy_fread(pcxheader, sizeof(pcx_header), 1, &f)) {
 					if ((pcxheader->id == 10) && (pcxheader->version == 5)
 					        && (pcxheader->bpp == 8)) {
-						if (!(chewy_fseek(handle, -769L, SEEK_END))) {
-							zeichen = chewy_fgetc(handle);
+						if (!f.seek(-769L, SEEK_END)) {
+							zeichen = f.readByte();
 							if (zeichen == 12) {
-								chewy_fseek(handle, -768L, SEEK_END);
-								if ((chewy_fread(palette, 768, 1, handle)) != 1) {
+								f.seek(-768L, SEEK_END);
+								if ((chewy_fread(palette, 768, 1, &f)) != 1) {
 									fcode = PALETTEFEHLER;
 									modul = DATEI;
 								} else {
@@ -1683,37 +1679,32 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 										j += 3;
 									}
 								}
-							}
-							else {
+							} else {
 								fcode = PALETTEFEHLER;
 								modul = DATEI;
 							}
 						}
-					}
-					else {
+					} else {
 						fcode = NOTTBF;
 						modul = DATEI;
 					}
-				}
-				else {
+				} else {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 				break;
 
 			case TAFDATEI:
-				if (chewy_fread(tafheader, sizeof(taf_dateiheader), 1, handle)) {
+				if (tafheader->load(&f)) {
 					id = get_id(tafheader->id);
 					if ((id == TAFDATEI) && (tafheader->mode == 19)) {
 						for (i = 0; i < 768; i++)
 							palette[i] = tafheader->palette[i];
-					}
-					else {
+					} else {
 						fcode = NOTTBF;
 						modul = DATEI;
 					}
-				}
-				else {
+				} else {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
@@ -1723,9 +1714,9 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 				modul = DATEI;
 				fcode = NOTTBF;
 			}
-			chewy_fclose(handle);
-		}
-		else {
+
+			f.close();
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}


Commit: 1ec342053fc42cc72a23c8ed792e19a40b9e6cbb
    https://github.com/scummvm/scummvm/commit/1ec342053fc42cc72a23c8ed792e19a40b9e6cbb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:49-08:00

Commit Message:
CHEWY: Converting palette & taf loading

Still seems to be an issue with taf_Info images being null

Changed paths:
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 688f1a33b9f..59da588cd59 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -412,13 +412,6 @@ struct mem_info_blk {
 	uint32 start = 0;
 };
 
-struct far_taf_info {
-	int16 anzahl = 0;
-	uint32 palette = 0;
-	uint32 korrektur = 0;
-	uint32 *image = nullptr;
-};
-
 struct GedPoolHeader {
 	char Id[4] = { 0 };
 	int16 Anz = 0;


Commit: 8768d044a08d9de0a47356b6348c0b71ab3ae0b1
    https://github.com/scummvm/scummvm/commit/8768d044a08d9de0a47356b6348c0b71ab3ae0b1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:50-08:00

Commit Message:
CHEWY: Fix taf_info image field

Changed paths:
    engines/chewy/memory.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 25441738751..f5b3a028c08 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -47,7 +47,7 @@ taf_info *memory::taf_adr(const char *filename) {
 	kgroesse = 0l;
 	if (!modul) {
 		anz_image = tafheader->count;
-		kgroesse = ((uint32)anz_image) * 4l;
+		kgroesse = ((uint32)anz_image) * sizeof(byte *);
 
 		tmp1 = (byte *)calloc(size + 768l + kgroesse, 1);
 		if (!modul) {
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 59da588cd59..eaeb392c259 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -90,7 +90,7 @@ struct taf_info {
 	int16 anzahl = 0;
 	byte *palette = nullptr;
 	int16 *korrektur = nullptr;
-	byte **image = nullptr;
+	byte *image[1];		// variable size
 };
 
 struct taf_seq_info {


Commit: cf136f9e6d0dae9cb8c55b07d02fe0dbf1934e4e
    https://github.com/scummvm/scummvm/commit/cf136f9e6d0dae9cb8c55b07d02fe0dbf1934e4e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:51-08:00

Commit Message:
CHEWY: Cleanups for remainder of load_full_taf

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 31d5ca13853..859ed109824 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -415,7 +415,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 					for (sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
 						tinfo->image[sprcount] = speicher;
 						f.seek(next, SEEK_SET);
-						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, &f)) {
+						if (iheader.load(&f)) {
 							next = iheader.next;
 							image = iheader.image;
 						} else {
@@ -539,26 +539,30 @@ void datei::load_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void datei::read_tbf_image(Stream *handle, int16 komp, uint32 size, byte *sp) {
-	uint32 pos;
-	char zeichen;
+void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+
+	uint32 pos = 0;
+	uint8 value;
 	uint8 count, i;
 	byte *speicher;
 	speicher = sp;
-	pos = 0;
+
 	if (komp == 1) {
+		// Run length encoding using count/value pairs
 		for (pos = 0; pos < size;) {
-			count = chewy_fgetc(handle);
-			zeichen = chewy_fgetc(handle);
+			count = rs->readByte();
+			value = rs->readByte();
+
 			for (i = 0; (i < count) && (pos < size); i++) {
-				speicher[pos] = zeichen;
+				speicher[pos] = value;
 				++pos;
 			}
 		}
-	}
-	else {
-		for (pos = 0; pos < size; pos++)
-			*speicher++ = (uint8)chewy_fgetc(handle);
+	} else {
+		rs->read(speicher, size);
+		speicher += size;
 	}
 }
 
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 6e6a41a7aba..8e2287989a5 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -78,7 +78,7 @@ public:
 	void cd(char *dir);
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
-	void read_tbf_image(Stream *handle, int16 komp, uint32 size, byte *sp);
+	void read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp);
 };
 
 } // namespace Chewy


Commit: 6a29bc654bd5cff433dd7287416db3af14417eee
    https://github.com/scummvm/scummvm/commit/6a29bc654bd5cff433dd7287416db3af14417eee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:51-08:00

Commit Message:
CHEWY: Cleanup of load_korrektur

Changed paths:
    engines/chewy/datei.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 859ed109824..40489a28b3f 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -455,49 +455,44 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 }
 
 void datei::load_korrektur(const char *fname, byte *sp) {
-	Stream *handle;
-	taf_dateiheader *header;
-	int16 id, i;
+	Common::File f;
+	taf_dateiheader *header = (taf_dateiheader *)tmp;
+	int16 id;
 	byte *speicher;
-	header = (taf_dateiheader *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	i = 0;
-	if ((filename[0]) == 0)
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	if (!strchr(filename, '.'))
+		strcat(filename, ".taf");
 
 	speicher = sp;
 	if (speicher) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
+		if (f.open(filename)) {
+			if (header->load(&f)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
-					chewy_fseek(handle, -((int)(header->count * sizeof(uint32))*header->korrekt), SEEK_END);
-					if (!chewy_fread(speicher, header->count * sizeof(uint32), 1, handle)) {
+					f.seek(-((int)(header->count * sizeof(uint32)) * header->korrekt), SEEK_END);
+					if (!f.read(speicher, header->count * sizeof(uint32))) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					}
-				}
-				else {
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			chewy_fclose(handle);
-		}
-		else {
+
+			f.close();
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}


Commit: d7ff6e3a2a2c55195b00e9592b49111aaa6c8f0f
    https://github.com/scummvm/scummvm/commit/d7ff6e3a2a2c55195b00e9592b49111aaa6c8f0f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:51-08:00

Commit Message:
CHEWY: Cleanup of size method

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/memory.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 40489a28b3f..28600aac1ad 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -1375,7 +1375,7 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 }
 
 uint32 datei::size(const char *fname, int16 typ) {
-	Stream *handle;
+	Common::File f;
 	tbf_dateiheader *tbfheader;
 	tff_header tff;
 	pcx_header *pcxheader;
@@ -1386,81 +1386,76 @@ uint32 datei::size(const char *fname, int16 typ) {
 	tbfheader = (tbf_dateiheader *)tmp;
 	pcxheader = (pcx_header *) tmp;
 	mh = (mod_header *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	i = 0;
 
-	if ((*filename) == 0)
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
+
 	if (!strchr(filename, '.')) {
 		switch (typ) {
 		case TBFDATEI:
 		case TPFDATEI:
-			strcat(filename, ".TBF\0");
+			strcat(filename, ".tbf");
 			break;
 		case PCXDATEI:
-			strcat(filename, ".PCX\0");
+			strcat(filename, ".pcx");
 			break;
 		case TFFDATEI:
-			strcat(filename, ".TFF\0");
+			strcat(filename, ".tff");
 			break;
 		case VOCDATEI:
-			strcat(filename, ".VOC\0");
+			strcat(filename, ".voc");
 			break;
 		case MODDATEI:
-			strcat(filename, ".MOD\0");
+			strcat(filename, ".mod");
 			break;
 		case TMFDATEI:
-			strcat(filename, ".TMF\0");
+			strcat(filename, ".tmf");
 			typ = 300;
 			break;
 		}
 	}
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
+
+	if (f.open(filename)) {
 		switch (typ) {
 		case TBFDATEI:
 		case TPFDATEI:
-			if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, handle)) {
+			if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
 				id = get_id(tbfheader->id);
 				if ((id == TBFDATEI) || (id == TPFDATEI)) {
 					size = tbfheader->entpsize + 4;
-				}
-				else {
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 					size = 0;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
 			break;
 
 		case PCXDATEI:
-			if (chewy_fread(pcxheader, sizeof(pcx_header), 1, handle)) {
+			if (chewy_fread(pcxheader, sizeof(pcx_header), 1, &f)) {
 				if ((pcxheader->id == 10) && (pcxheader->version == 5)
 				        && (pcxheader->bpp == 8)) {
 					hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
 					breite = pcxheader->bpz * pcxheader->planes;
 					size = (uint32)((long)hoehe) * ((long)breite) + 4;
-				}
-				else {
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 					size = 0;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
 			break;
 
 		case TFFDATEI:
-			if (chewy_fread(&tff, sizeof(tff_header), 1, handle)) {
+			if (chewy_fread(&tff, sizeof(tff_header), 1, &f)) {
 				id = get_id(tff.id);
 				if (id == TFFDATEI)
 					size = tff.size + sizeof(tff_header);
@@ -1468,24 +1463,21 @@ uint32 datei::size(const char *fname, int16 typ) {
 					modul = DATEI;
 					fcode = NOTTBF;
 				}
-			}
-			else {
+			} else {
 				modul = DATEI;
 				fcode = READFEHLER;
 			}
 			break;
 
 		case VOCDATEI:
-			chewy_fseek(handle, 0, SEEK_END);
-			size = (uint32)chewy_ftell(handle);
-			size -= sizeof(voc_header);
+			size = (uint32)f.size() - sizeof(voc_header);
 			break;
 
 		case MODDATEI:
-			chewy_fseek(handle, 0, SEEK_END);
-			size = (uint32)chewy_ftell(handle);
+			size = (uint32)f.size();
 			id = 0;
-			if (chewy_fread(mh, sizeof(mod_header), 1, handle)) {
+
+			if (chewy_fread(mh, sizeof(mod_header), 1, &f)) {
 				if (!strncmp(mh->id, "M.K.", 4))
 					id = 1;
 				if (!strncmp(mh->id, "M!K!", 4))
@@ -1503,18 +1495,18 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		default:
-			chewy_fseek(handle, 0, SEEK_END);
-			size = (uint32)chewy_ftell(handle);
+			size = (uint32)f.size();
 			break;
 		}
-		chewy_fclose(handle);
-	}
-	else {
+
+		f.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 		size = 0;
 	}
-	return (size);
+
+	return size;
 }
 
 uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index f5b3a028c08..c9f2d3c9178 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -69,7 +69,8 @@ taf_info *memory::taf_adr(const char *filename) {
 			tinfo = 0;
 		}
 	}
-	return (tinfo);
+
+	return tinfo;
 }
 
 taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
@@ -187,6 +188,7 @@ byte *memory::void_adr(const char *filename) {
 	uint32 size = 0;
 	byte *ptr = 0;
 	size = file->size(filename, 200);
+
 	if (!modul) {
 		ptr = (byte *)calloc(size, sizeof(long));
 		if (!modul) {
@@ -196,7 +198,8 @@ byte *memory::void_adr(const char *filename) {
 				free(ptr);
 		}
 	}
-	return (ptr);
+
+	return ptr;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 41d294222e7..da99534ef85 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -54,7 +54,8 @@ void *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
 		fcode = OPENFEHLER;
 		err->set_user_msg(fname1);
 	}
-	return (roomhandle[mode]);
+
+	return roomhandle[mode];
 }
 
 void Room::close_handle(int16 mode) {


Commit: be8ff3bcb2cacea02e7f88a29c39bf344c9a2651
    https://github.com/scummvm/scummvm/commit/be8ff3bcb2cacea02e7f88a29c39bf344c9a2651
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:51-08:00

Commit Message:
CHEWY: Cleaned up file loading

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/memory.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 28600aac1ad..b0472bd94e1 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -796,50 +796,46 @@ void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 }
 
 void datei::void_load(const char *fname, byte *speicher, uint32 size) {
-	Stream *handle;
-	int16 i;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
+	Common::File f;
 
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (!(chewy_fread(speicher, (uint16)size, 1, handle))) {
+	strncpy(filename, fname, MAXPATH - 1);
+	filename[MAXPATH - 1] = '\0';
+
+	if (f.open(filename)) {
+		if (!f.read(speicher, size)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
-	}
-	else {
+
+		f.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
 }
 
 uint32 datei::load_file(const char *fname, byte *speicher) {
-	Stream *handle;
+	Common::File f;
 	uint32 size = 0;
-	int16 i = 0;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
 
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		chewy_fseek(handle, 0l, SEEK_END);
-		size = chewy_ftell(handle);
-		chewy_fseek(handle, 0l, SEEK_SET);
-		if (!(chewy_fread(speicher, (size_t)size, 1, handle))) {
+	strncpy(filename, fname, MAXPATH - 1);
+	filename[MAXPATH - 1] = '\0';
+
+	if (f.open(filename)) {
+		size = f.size();
+
+		if (!f.read(speicher, size)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
-	}
-	else {
+
+		f.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-	return (size);
+
+	return size;
 }
 
 uint32 datei::load_item(Stream *handle, byte *speicher) {
@@ -1382,7 +1378,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 	mod_header *mh;
 	uint16 hoehe, breite;
 	uint32 size = 0;
-	int16 id = 0, i;
+	int16 id = 0;
 	tbfheader = (tbf_dateiheader *)tmp;
 	pcxheader = (pcx_header *) tmp;
 	mh = (mod_header *)tmp;
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index c9f2d3c9178..3a1fa2d4b6a 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -190,10 +190,10 @@ byte *memory::void_adr(const char *filename) {
 	size = file->size(filename, 200);
 
 	if (!modul) {
-		ptr = (byte *)calloc(size, sizeof(long));
+		ptr = (byte *)calloc(size, sizeof(uint32));
 		if (!modul) {
 			*(uint32 *)ptr = size;
-			file->void_load(filename, ptr + sizeof(long), size);
+			file->void_load(filename, ptr + sizeof(uint32), size);
 			if (modul)
 				free(ptr);
 		}


Commit: 7482a64ed0b766a7c60ace91181bf59f2eadae7a
    https://github.com/scummvm/scummvm/commit/7482a64ed0b766a7c60ace91181bf59f2eadae7a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Fix initialization order

Verified doing some basic disassembly of the release executable

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/inits.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index dfb261885ec..24a27d600b7 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -67,15 +67,14 @@ detail::~detail() {
 }
 
 void detail::load_rdi(const char *fname_, int16 room_nr) {
-	Stream *handle;
-	taf_info *tmprdi;
-	tmprdi = rdi.dptr;
-	handle = chewy_fopen(fname_, "rb");
-	if (handle) {
-		if (chewy_fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, handle)) {
+	Common::File f;
+	taf_info *tmprdi = rdi.dptr;
+
+	if (fname_ && f.open(fname_)) {
+		if (chewy_fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, &f)) {
 			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
-				chewy_fseek(handle, (long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
-				if (!chewy_fread(&rdi, sizeof(room_detail_info), 1, handle)) {
+				f.seek((long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
+				if (!chewy_fread(&rdi, sizeof(room_detail_info), 1, &f)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -87,11 +86,13 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
+
 	rdi.dptr = tmprdi;
 }
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 91a2d3da2e5..75f0e2ec817 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -46,8 +46,6 @@ void standard_init() {
 	flc = new flic;
 	mov = new movclass;
 
-	init_load();
-
 	out->vsync_start();
 	out->init();
 	out->cls();
@@ -108,6 +106,7 @@ void standard_init() {
 
 	curblk.cur_back = cur_back;
 	sound_init();
+	init_load();
 }
 
 void var_init() {
@@ -177,7 +176,6 @@ void var_init() {
 }
 
 void init_room() {
-
 	room_blk.AkAblage = 0;
 	room_blk.LowPalMem = pal;
 	room_blk.InvFile = INVENTAR;
@@ -187,7 +185,7 @@ void init_room() {
 	room_blk.Rsi = spieler.room_s_obj;
 	room_blk.AadLoad = true;
 	room_blk.AtsLoad = true;
-	strcpy(room_blk.RoomDir, "room/\0");
+	strcpy(room_blk.RoomDir, "room/");
 
 	room->open_handle(&background[0], "rb", R_TGPDATEI);
 	ERROR
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index da99534ef85..60c368f4262 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -69,10 +69,12 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	int16 ret;
 	modul = 0;
 	fcode = 0;
+
 	clear_prog_ani();
 	det->load_rdi(Rb->DetFile, room_nr);
 	ERROR
 	load_sound();
+
 	if (player->SoundSwitch == false)
 		det->disable_room_sound();
 	if (!modul) {


Commit: a7fee5e2ecaa2720390c6462bdf2045919e10bb5
    https://github.com/scummvm/scummvm/commit/a7fee5e2ecaa2720390c6462bdf2045919e10bb5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Fixed first variation of objekt::load

Changed paths:
  A engines/chewy/objekt.cpp
    engines/chewy/module.mk
    engines/chewy/objekt.h
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 68236a32460..995fab1ef8d 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -31,6 +31,7 @@ MODULE_OBJS = \
 	metaengine.o \
 	movclass.o \
 	ngstypes.o \
+	objekt.o \
 	objekte.o \
 	r_event.o \
 	room.o \
diff --git a/engines/chewy/objekt.cpp b/engines/chewy/objekt.cpp
new file mode 100644
index 00000000000..1a26e814aed
--- /dev/null
+++ b/engines/chewy/objekt.cpp
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/objekt.h"
+
+namespace Chewy {
+
+bool RoomMovObjekt::load(Common::SeekableReadStream *src) {
+	RoomNr = src->readSint16LE();
+
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	XOff = src->readByte();
+	YOff = src->readByte();
+	TxtNr = src->readSint16LE();
+	NeuObj = src->readSint16LE();
+	ActionObj = src->readSint16LE();
+	ZustandAk = src->readByte();
+	ZustandOff = src->readByte();
+	ZustandFlipFlop = src->readByte();
+	AutoMov = src->readByte();
+	AniFlag = src->readByte();
+	Del = src->readByte();
+	Attribut = src->readByte();
+	HeldHide = src->readByte();
+	ZEbene = src->readSint16LE();
+
+	return true;
+}
+
+bool IibDateiHeader::load(Common::SeekableReadStream *src) {
+	src->read(Id, 4);
+	src->read(Tafname, 14);
+	Size = src->readUint32LE();
+
+	return true;
+}
+
+bool SibDateiHeader::load(Common::SeekableReadStream *src) {
+	src->read(Id, 4);
+	Anz = src->readUint16LE();
+
+	return true;
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index 0098bb33119..ce619fdae51 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_OBJEKT_H
 #define CHEWY_OBJEKT_H
 
+#include "common/stream.h"
+
 namespace Chewy {
 
 struct RoomMovObjekt {
@@ -33,34 +35,28 @@ struct RoomMovObjekt {
 	uint8 XOff;
 	uint8 YOff;
 	int16 TxtNr;
-
 	int16 NeuObj;
-
 	int16 ActionObj;
-
 	uint8 ZustandAk;
-
 	uint8 ZustandOff;
-
 	uint8 ZustandFlipFlop;
-
 	uint8 AutoMov;
-
 	uint8 AniFlag;
-
 	uint8 Del;
-
 	uint8 Attribut;
-
 	uint8 HeldHide;
-
 	int16 ZEbene;
+
+	bool load(Common::SeekableReadStream *src);
+	static size_t size() { return 24; }
 };
 
 struct IibDateiHeader {
 	char Id[4];
 	char Tafname[14];
 	uint32 Size;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct RoomStaticInventar {
@@ -96,6 +92,8 @@ struct RoomStaticInventar {
 struct SibDateiHeader {
 	char Id[4];
 	int16 Anz;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct RoomExit {
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 65cdfd46d81..78f12b4ecde 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -90,19 +90,27 @@ objekt::~objekt() {
 }
 
 int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
-	Stream *handle;
-	handle = chewy_fopen(fname_, "rb");
-	if (handle) {
-		if (!chewy_fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
+	Common::File f;
+	bool valid = true;
+
+	if (f.open(fname_)) {
+		if (!iib_datei_header.load(&f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
-				if (!chewy_fread(rmo, (size_t)iib_datei_header.Size, 1, handle)) {
+				assert(iib_datei_header.Size % RoomMovObjekt::size() == 0);
+
+				for (int i = 0; i < iib_datei_header.Size / RoomMovObjekt::size() && valid;
+						++i, ++rmo) {
+					valid = rmo->load(&f);
+				}
+
+				if (!valid) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
-					max_inventar_obj = (int16) iib_datei_header.Size / sizeof(RoomMovObjekt);
+					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObjekt::size();
 				}
 			} else
 				max_inventar_obj = 0;
@@ -110,25 +118,26 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-	return (max_inventar_obj);
+
+	return max_inventar_obj;
 }
 
 int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
-	Stream *handle;
-	handle = chewy_fopen(fname_, "rb");
-	if (handle) {
+	Common::File f;
 
-		if (!chewy_fread(&sib_datei_header, sizeof(SibDateiHeader), 1, handle)) {
+	if (f.open(fname_)) {
+		if (!chewy_fread(&sib_datei_header, sizeof(SibDateiHeader), 1, &f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!chewy_fread(rsi, (size_t)(sib_datei_header.Anz * sizeof(RoomStaticInventar)), 1, handle)) {
+				if (!chewy_fread(rsi, (size_t)(sib_datei_header.Anz * sizeof(RoomStaticInventar)), 1, &f)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -140,25 +149,26 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-	return (max_static_inventar);
+
+	return max_static_inventar;
 }
 
 int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
-	Stream *handle;
-	handle = chewy_fopen(fname_, "rb");
-	if (handle) {
+	Common::File f;
 
-		if (!chewy_fread(&eib_datei_header, sizeof(EibDateiHeader), 1, handle)) {
+	if (f.open(fname_)) {
+		if (!chewy_fread(&eib_datei_header, sizeof(EibDateiHeader), 1, &f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!chewy_fread(RoomEx, (size_t)(eib_datei_header.Anz * sizeof(RoomExit)), 1, handle)) {
+				if (!chewy_fread(RoomEx, (size_t)(eib_datei_header.Anz * sizeof(RoomExit)), 1, &f)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -170,12 +180,14 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-	return (max_exit);
+
+	return max_exit;
 }
 
 void objekt::sort() {


Commit: c8b4256d8161268f74f06c739dfa4f755dc8a31d
    https://github.com/scummvm/scummvm/commit/c8b4256d8161268f74f06c739dfa4f755dc8a31d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Increase some limits to match original

Changed paths:
    engines/chewy/defines.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 30c8bda5af4..4fab172be75 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -116,9 +116,9 @@ namespace Chewy {
 #define WIN_LOOK2 WIN_LOOK_X+4,WIN_LOOK_Y+4,3,3,60,0
 
 #define MAX_RAUM 70
-#define MAX_MOV_OBJ 100
+#define MAX_MOV_OBJ 140
 
-#define MAX_FEST_OBJ 100
+#define MAX_FEST_OBJ 140
 
 #define MAX_EXIT 150
 #define MAX_AUTO_MOV 20


Commit: 18ff18fec855046d4c618a01e50fa3ee4beeb40c
    https://github.com/scummvm/scummvm/commit/18ff18fec855046d4c618a01e50fa3ee4beeb40c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Fix other two objectk::load variants

Changed paths:
    engines/chewy/objekt.cpp
    engines/chewy/objekt.h
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/objekt.cpp b/engines/chewy/objekt.cpp
index 1a26e814aed..2c7de0a6a4d 100644
--- a/engines/chewy/objekt.cpp
+++ b/engines/chewy/objekt.cpp
@@ -55,6 +55,28 @@ bool IibDateiHeader::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool RoomStaticInventar::load(Common::SeekableReadStream *src) {
+	RoomNr = src->readSint16LE();
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	XOff = src->readByte();
+	YOff = src->readByte();
+	InvNr = src->readSint16LE();
+	TxtNr = src->readSint16LE();
+	HideSib = src->readByte();
+	Dummy = src->readByte();
+	ZustandAk = src->readByte();
+	ZustandOff = src->readByte();
+	ZustandFlipFlop = src->readByte();
+	AutoMov = src->readByte();
+	AniFlag = src->readByte();
+	HeldHide = src->readByte();
+	StaticAk = src->readSint16LE();
+	StaticOff = src->readSint16LE();
+
+	return true;
+}
+
 bool SibDateiHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	Anz = src->readUint16LE();
@@ -62,4 +84,26 @@ bool SibDateiHeader::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool RoomExit::load(Common::SeekableReadStream *src) {
+	RoomNr = src->readSint16LE();
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	XOff = src->readByte();
+	YOff = src->readByte();
+	Exit = src->readSint16LE();
+	ExitMov = src->readByte();
+	AutoMov = src->readByte();
+	Attribut = src->readByte();
+	dummy = src->readByte();
+
+	return true;
+}
+
+bool EibDateiHeader::load(Common::SeekableReadStream *src) {
+	src->read(Id, 4);
+	Anz = src->readSint16LE();
+
+	return true;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index ce619fdae51..e495294c3ab 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -61,32 +61,24 @@ struct IibDateiHeader {
 
 struct RoomStaticInventar {
 	int16 RoomNr;
-
 	int16 X;
 	int16 Y;
 	uint8 XOff;
 	uint8 YOff;
 	int16 InvNr;
-
 	int16 TxtNr;
 	uint8 HideSib;
-
 	uint8 Dummy;
 	uint8 ZustandAk;
-
 	uint8 ZustandOff;
-
 	uint8 ZustandFlipFlop;
-
 	uint8 AutoMov;
-
 	uint8 AniFlag;
-
 	uint8 HeldHide;
-
 	int16 StaticAk;
-
 	int16 StaticOff;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct SibDateiHeader {
@@ -103,19 +95,19 @@ struct RoomExit {
 	uint8 XOff;
 	uint8 YOff;
 	int16 Exit;
-
 	uint8 ExitMov;
-
 	uint8 AutoMov;
-
 	uint8 Attribut;
-
 	uint8 dummy;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct EibDateiHeader {
 	char Id[4];
 	int16 Anz;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 #define OBJZU_AUF 0
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 78f12b4ecde..ddddfd3c52b 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -130,14 +130,19 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 
 int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 	Common::File f;
+	bool valid = true;
 
 	if (f.open(fname_)) {
-		if (!chewy_fread(&sib_datei_header, sizeof(SibDateiHeader), 1, &f)) {
+		if (!sib_datei_header.load(&f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!chewy_fread(rsi, (size_t)(sib_datei_header.Anz * sizeof(RoomStaticInventar)), 1, &f)) {
+				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++rsi) {
+					valid = rsi->load(&f);
+				}
+
+				if (!valid) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
@@ -161,14 +166,19 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 
 int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 	Common::File f;
+	bool valid = true;
 
 	if (f.open(fname_)) {
-		if (!chewy_fread(&eib_datei_header, sizeof(EibDateiHeader), 1, &f)) {
+		if (!eib_datei_header.load(&f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
-				if (!chewy_fread(RoomEx, (size_t)(eib_datei_header.Anz * sizeof(RoomExit)), 1, &f)) {
+				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++RoomEx) {
+					valid = RoomEx->load(&f);
+				}
+
+				if (!valid) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {


Commit: e8e4bedd933a6b9e6ac271b5ec0e148651c17997
    https://github.com/scummvm/scummvm/commit/e8e4bedd933a6b9e6ac271b5ec0e148651c17997
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Cleanup of new_game method

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 75f0e2ec817..0f4369e234f 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -239,7 +239,7 @@ void init_atds() {
 
 void new_game() {
 	int16 i;
-	char *tmp;
+	byte *tmp;
 
 	memset(&spieler, 0, sizeof(Spieler));
 
@@ -259,39 +259,43 @@ void new_game() {
 	obj->load(EXIT_EIB, &spieler.room_e_obj[0]);
 	ERROR
 
-	tmp = (char *)calloc(ROOM_ATS_MAX, 1);
+	tmp = (byte *)calloc(ROOM_ATS_MAX, 1);
 	ERROR
 
-	Stream *handle = chewy_fopen(ROOM_ATS_STEUER, "rb");
-	if (handle) {
-		if (!chewy_fread(tmp, ROOM_ATS_MAX, 1, handle)) {
+	Common::File f;
+	if (f.open(ROOM_ATS_STEUER)) {
+		if (!f.read(tmp, ROOM_ATS_MAX)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
 	ERROR
+
 	for (i = 0; i < ROOM_ATS_MAX; i++)
 		spieler.Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
-	tmp = (char *)calloc(MAX_MOV_OBJ, 1);
+	tmp = (byte *)calloc(MAX_MOV_OBJ, 1);
 	ERROR
-	handle = chewy_fopen(INV_ATS_STEUER, "rb");
-	if (handle) {
-		if (!chewy_fread(tmp, MAX_MOV_OBJ, 1, handle)) {
+
+	if (f.open(INV_ATS_STEUER)) {
+		if (!f.read(tmp, MAX_MOV_OBJ)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
 	ERROR
+
 	for (i = 0; i < MAX_MOV_OBJ; i++)
 		spieler.InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);


Commit: 6052fedf4222b2c58a271e54728b9597f80d69d1
    https://github.com/scummvm/scummvm/commit/6052fedf4222b2c58a271e54728b9597f80d69d1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:52-08:00

Commit Message:
CHEWY: Cleanup and fixes for memory pool methods

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/objekt.h
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index b0472bd94e1..33971c8a00e 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -271,31 +271,31 @@ void datei::load_image(Stream *handle, byte *sp, byte *palette) {
 		chewy_fread(&ch, sizeof(ChunkHead), 1, handle);
 }
 
-uint16 datei::select_pool_item(Stream *handle, uint16 nr) {
+uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	uint32 tmp1;
 	NewPhead *ph;
 	ph = (NewPhead *)tmp;
-	if (handle) {
-		chewy_fseek(handle, 0, SEEK_SET);
-		if (!(chewy_fread(ph, sizeof(NewPhead), 1, handle))) {
+
+	if (rs) {
+		rs->seek(0, SEEK_SET);
+		if (!ph->load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
-			chewy_fseek(handle, 0, SEEK_SET);
+			rs->seek(0, SEEK_SET);
 		} else {
 			if (!strncmp(ph->id, "NGS", 3)) {
 				if (nr >= ph->PoolAnz)
 					nr = ph->PoolAnz - 1;
-				chewy_fseek(handle, -(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
-				if (!(chewy_fread(&tmp1, sizeof(uint32), 1, handle))) {
-					modul = DATEI;
-					fcode = READFEHLER;
-					chewy_fseek(handle, 0, SEEK_SET);
-				} else
-					chewy_fseek(handle, tmp1, SEEK_SET);
+
+				rs->seek(-(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+				tmp1 = rs->readUint32LE();
+				rs->seek(tmp1, SEEK_SET);
 			}
 		}
 	}
-	return (nr);
+
+	return nr;
 }
 
 void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
@@ -1506,42 +1506,46 @@ uint32 datei::size(const char *fname, int16 typ) {
 }
 
 uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
-	Stream *handle;
+	Common::File f;
 	NewPhead *Nph;
 	ChunkHead ch;
 	int16 i;
 	uint32 size;
 	Nph = (NewPhead *)tmp;
 	size = 0;
-	handle = chewy_fopen(fname, "rb");
-	if (handle) {
-		if (!(chewy_fread(Nph, sizeof(NewPhead), 1, handle))) {
+
+	if (f.open(fname)) {
+		if (!Nph->load(&f)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (!strncmp(Nph->id, "NGS", 3)) {
-				select_pool_item(handle, chunk_start);
-				chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
+				select_pool_item(&f, chunk_start);
+				f.seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+
 				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
 				        && i < (chunk_start + chunk_anz); i++) {
-					if (!chewy_fread(&ch, sizeof(ChunkHead), 1, handle)) {
+					if (!ch.load(&f)) {
 						modul = DATEI;
 						fcode = READFEHLER;
 						size = 0;
 					} else {
 						if (ch.size > size)
 							size = ch.size;
-						chewy_fseek(handle, ch.size, SEEK_CUR);
+
+						f.seek(ch.size, SEEK_CUR);
 					}
 				}
 			}
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-	return (size);
+
+	return size;
 }
 
 uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 7df5ebdd41d..f5427ffdab2 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -246,4 +246,11 @@ bool tmf_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool ChunkHead::load(Common::SeekableReadStream *src) {
+	size = src->readUint32LE();
+	type = src->readUint16LE();
+
+	return true;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index eaeb392c259..03a958118bc 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -489,6 +489,9 @@ struct FrameHead {
 struct ChunkHead {
 	uint32 size = 0;
 	uint16 type = 0;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() { return 6; }
 };
 
 struct CustomFlicHead {
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index e495294c3ab..0dd389db436 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -48,7 +48,7 @@ struct RoomMovObjekt {
 	int16 ZEbene;
 
 	bool load(Common::SeekableReadStream *src);
-	static size_t size() { return 24; }
+	static constexpr size_t SIZE() { return 24; }
 };
 
 struct IibDateiHeader {
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index ddddfd3c52b..beb4c8d0ce2 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -99,9 +99,9 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 			modul = DATEI;
 		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
-				assert(iib_datei_header.Size % RoomMovObjekt::size() == 0);
+				assert(iib_datei_header.Size % RoomMovObjekt::SIZE() == 0);
 
-				for (int i = 0; i < iib_datei_header.Size / RoomMovObjekt::size() && valid;
+				for (int i = 0; i < iib_datei_header.Size / RoomMovObjekt::SIZE() && valid;
 						++i, ++rmo) {
 					valid = rmo->load(&f);
 				}
@@ -110,7 +110,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
-					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObjekt::size();
+					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObjekt::SIZE();
 				}
 			} else
 				max_inventar_obj = 0;


Commit: 8f3cf5084d7507ffe86c5aa8b12e3c87a88fa663
    https://github.com/scummvm/scummvm/commit/8f3cf5084d7507ffe86c5aa8b12e3c87a88fa663
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:53-08:00

Commit Message:
CHEWY: Implement fcopy method

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/inits.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 33971c8a00e..344e66bdf4c 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -21,6 +21,8 @@
  */
 
 #include "common/debug.h"
+#include "common/system.h"
+#include "common/savefile.h"
 #include "chewy/datei.h"
 #include "chewy/file.h"
 
@@ -1926,24 +1928,21 @@ int16 datei::get_id(char *id_code) {
 }
 
 void datei::fcopy(const char *d_fname, const char *s_fname) {
-	Stream *shandle;
-	Stream *dhandle;
-	int16 ch;
-	shandle = chewy_fopen(s_fname, "rb");
-	if (shandle) {
-		dhandle = chewy_fopen(d_fname, "wb+");
-		if (shandle) {
-			while ((ch = chewy_fgetc(shandle)) != EOF)
-				chewy_fputc(ch, dhandle);
-			chewy_fclose(dhandle);
-		}
-		else {
+	Common::File src;
+	Common::OutSaveFile *dest;
+
+	if (src.open(s_fname)) {
+		dest = g_system->getSavefileManager()->openForSaving(d_fname);
+		if (dest) {
+			dest->writeStream(&src);
+			delete dest;
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-		chewy_fclose(shandle);
-	}
-	else {
+
+		src.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 0f4369e234f..f6b60cf4e2c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -214,7 +214,7 @@ void init_atds() {
 	atds->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
 	ERROR
 
-	strcpy(tmp_path + 2, ADSH_TMP);
+	strcpy(tmp_path, ADSH_TMP);
 
 	mem->file->fcopy(tmp_path, ADS_TXT_STEUER);
 	atds->open_handle(tmp_path, "rb+", ADH_DATEI);


Commit: 349cfff2b9025f9d3f7bf55e1ec8bc2bee158fdf
    https://github.com/scummvm/scummvm/commit/349cfff2b9025f9d3f7bf55e1ec8bc2bee158fdf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:53-08:00

Commit Message:
CHEWY: Open up the adsh.tmp file as a memory stream

Chewy opens it in read/write mode. Luckily, since it's
a designated temporary file, I can use a memory
read/write stream for the same effect

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/inits.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 9efda02fac3..8b2b0244405 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -334,17 +334,18 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 }
 
 void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
-	Stream *handle;
+	Stream *stream;
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname_, 0, 20000);
 	if (!modul) {
-		handle = chewy_fopen(fname_, fmode);
-		if (handle) {
+		stream = chewy_fopen(fname_, fmode);
+		if (stream) {
 			close_handle(mode);
-			atdshandle[mode] = handle;
+			atdshandle[mode] = stream;
 			atdsmem[mode] = tmp_adr;
+
 			switch (mode) {
 			case ADH_DATEI:
 				ads_block = (AdsBlock *)atdsmem[ADH_HANDLE];
@@ -354,6 +355,8 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 				atdsmem[INV_IDX_HANDLE] = (char *)calloc(INV_STRC_ANZ * sizeof(InvUse), 1);
 				break;
 
+			default:
+				break;
 			}
 		} else {
 			modul = DATEI;
@@ -363,6 +366,28 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 	}
 }
 
+void atdsys::open_handle(Common::SeekableReadStream *stream, int16 mode) {
+	assert(stream);
+	char *tmp_adr = (char *)malloc(stream->size());
+
+	close_handle(mode);
+	atdshandle[mode] = stream;
+	atdsmem[mode] = tmp_adr;
+
+	switch (mode) {
+	case ADH_DATEI:
+		ads_block = (AdsBlock *)atdsmem[ADH_HANDLE];
+		break;
+
+	case INV_IDX_DATEI:
+		atdsmem[INV_IDX_HANDLE] = (char *)calloc(INV_STRC_ANZ * sizeof(InvUse), 1);
+		break;
+
+	default:
+		break;
+	}
+}
+
 void atdsys::close_handle(int16 mode) {
 	if (atdshandle[mode])
 		chewy_fclose(atdshandle[mode]);
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 1ef993bcc16..5aac25e8ab8 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -263,6 +263,7 @@ public:
 	void set_speech_handle(Stream *speech_handle);
 	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, const char *fmode, int16 mode);
+	void open_handle(Common::SeekableReadStream *stream, int16 mode);
 	void close_handle(int16 mode);
 	int16 atds_get_zeilen(char *str, int16 end_txt);
 	void crypt(char *txt, uint32 size);
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index f6b60cf4e2c..62a3753552b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/memstream.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
@@ -194,8 +195,22 @@ void init_room() {
 	ERROR
 }
 
+void initAdshTmp() {
+	// Open the source
+	Common::File f;
+	if (!f.open(ADS_TXT_STEUER))
+		::error("File not found - %s", ADS_TXT_STEUER);
+
+	// Create a memory stream for read/write access
+	Common::MemoryReadWriteStream *stream =
+		new Common::MemoryReadWriteStream(DisposeAfterUse::YES);
+	stream->writeStream(&f);
+
+	// Add it to the stream manager
+	atds->open_handle(stream, ADH_DATEI);
+}
+
 void init_atds() {
-	char tmp_path[MAXPFAD];
 	int16 i;
 
 	Stream *handle = atds->pool_handle(ATDS_TXT, "rb");
@@ -214,10 +229,7 @@ void init_atds() {
 	atds->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
 	ERROR
 
-	strcpy(tmp_path, ADSH_TMP);
-
-	mem->file->fcopy(tmp_path, ADS_TXT_STEUER);
-	atds->open_handle(tmp_path, "rb+", ADH_DATEI);
+	initAdshTmp();
 	ERROR
 
 	atds->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);


Commit: 5629ceffdcc2873595bea3d6a14dc402b21e0904
    https://github.com/scummvm/scummvm/commit/5629ceffdcc2873595bea3d6a14dc402b21e0904
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:53-08:00

Commit Message:
CHEWY: Cleanup of set_handle

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 8b2b0244405..0b610f581da 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -293,28 +293,29 @@ void atdsys::set_speech_handle(Stream *speech_handle_) {
 }
 
 void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	char *tmp_adr;
 	ChunkHead Ch;
 	tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
 	if (!modul) {
-		if (handle) {
+		if (rs) {
 			close_handle(mode);
-			atdshandle[mode] = handle;
+			atdshandle[mode] = rs;
 			atdsmem[mode] = tmp_adr;
 			atdspooloff[mode] = chunk_start;
 			switch (mode) {
 			case INV_USE_DATEI:
-				mem->file->select_pool_item(atdshandle[mode], atdspooloff[mode]);
-				chewy_fseek(atdshandle[mode], -(int)(sizeof(ChunkHead)), SEEK_CUR);
+				mem->file->select_pool_item(rs, atdspooloff[mode]);
+				chewy_fseek(rs, -(int)(sizeof(ChunkHead)), SEEK_CUR);
 
-				if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, atdshandle[mode])) {
+				if (!Ch.load(rs)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
 					inv_use_mem = (char *)calloc(Ch.size + 3l, 1);
 					if (!modul) {
 						if (Ch.size) {
-							if (!chewy_fread(inv_use_mem, Ch.size, 1, atdshandle[mode])) {
+							if (!rs->read(inv_use_mem, Ch.size)) {
 								fcode = READFEHLER;
 								modul = DATEI;
 							} else


Commit: 4973182698e6e2630cc79cff16f47a0feb06903e
    https://github.com/scummvm/scummvm/commit/4973182698e6e2630cc79cff16f47a0feb06903e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:53-08:00

Commit Message:
CHEWY: Creating load method for room_detail_info

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 24a27d600b7..d4e4148b003 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -26,6 +26,113 @@
 
 namespace Chewy {
 
+bool RaumInfo::load(Common::SeekableReadStream *src) {
+	RoomNr = src->readByte();
+	BildNr = src->readByte();
+	AutoMovAnz = src->readByte();
+	TafLoad = src->readByte();
+	src->read(TafName, 14);
+	ZoomFak = src->readByte();
+	Dummy = src->readByte();
+
+	return true;
+}
+
+bool RaumAutoMov::load(Common::SeekableReadStream *src) {
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	SprNr = src->readByte();
+	dummy = src->readByte();
+
+	return true;
+}
+
+bool sound_def_blk::load(Common::SeekableReadStream *src) {
+	int i;
+
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		sound_enable[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		sound_index[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		sound_start[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		kanal[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		volume[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		repeats[i] = src->readSint16LE();
+	for (i = 0; i < MAX_SOUNDS; ++i)
+		stereo[i] = src->readSint16LE();
+
+	return true;
+}
+
+bool ani_detail_info::load(Common::SeekableReadStream *src) {
+	x = src->readSint16LE();
+	y = src->readSint16LE();
+	start_flag = src->readByte();
+	repeat = src->readByte();
+	start_ani = src->readSint16LE();
+	end_ani = src->readSint16LE();
+	ani_count = src->readSint16LE();
+	delay = src->readSint16LE();
+	delay_count = src->readSint16LE();
+	reverse = src->readSint16LE();
+	timer_start = src->readSint16LE();
+	z_ebene = src->readSint16LE();
+	load_flag = src->readByte();
+	zoom = src->readByte();
+	sfx.load(src);
+	show_1_phase = src->readSint16LE();
+	phase_nr = src->readSint16LE();
+
+	return true;
+}
+
+bool static_detail_info::load(Common::SeekableReadStream *src) {
+	x = src->readSint16LE();
+	y = src->readSint16LE();
+	SprNr = src->readSint16LE();
+	z_ebene = src->readByte();
+	Hide = src->readByte();
+	Dummy = src->readByte();
+
+	return true;
+}
+
+bool room_detail_info::load(Common::SeekableReadStream *src) {
+	int i;
+
+	StaticDetailAnz = src->readSint16LE();
+	AniDetailAnz = src->readSint16LE();
+	src->skip(4);	// dptr
+	for (i = 0; i < MAXDETAILS; ++i)
+		Ainfo[i].load(src);
+	for (i = 0; i < MAXDETAILS; ++i)
+		Sinfo[i].load(src);
+	for (i = 0; i < MAX_M_ITEMS * 4; ++i)
+		mvect[i] = src->readSint16LE();
+	for (i = 0; i < MAX_M_ITEMS; ++i)
+		mtxt[i] = src->readSint16LE();
+	Ri.load(src);
+	for (i = 0; i < MAX_AUTO_MOV; ++i)
+		AutoMov[i].load(src);
+	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; ++i)
+		tvp_index[i] = src->readSint16LE();
+	src->skip(4 * MAXDETAILS * MAX_SOUNDS); // sample
+
+	return true;
+}
+
+bool RdiDateiHeader::load(Common::SeekableReadStream *src) {
+	src->read(Id, 4);
+	Anz = src->readSint16LE();
+
+	return true;
+}
+
+
 detail::detail() {
 	char *tptr;
 	int16 i, size;
@@ -71,10 +178,11 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 	taf_info *tmprdi = rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
-		if (chewy_fread(&rdi_datei_header, sizeof(RdiDateiHeader), 1, &f)) {
+		warning("FIXME: RdiDateiHeader::load doesn't match original structure size yet");
+		if (rdi_datei_header.load(&f)) {
 			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
-				f.seek((long)room_nr * (long)sizeof(room_detail_info), SEEK_CUR);
-				if (!chewy_fread(&rdi, sizeof(room_detail_info), 1, &f)) {
+				f.seek(room_nr * (int64)room_detail_info::SIZE(), SEEK_CUR);
+				if (!rdi.load(&f)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index e280a7cc2d8..ad28bece3e0 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -38,21 +38,28 @@ namespace Chewy {
 struct RaumInfo {
 	uint8 RoomNr;
 	uint8 BildNr;
-
 	uint8 AutoMovAnz;
 	uint8 TafLoad;
-
 	char TafName[14];
 	uint8 ZoomFak;
 	uint8 Dummy;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 4 * 1 + 14 + 1 + 1;
+	}
 };
 
 struct RaumAutoMov {
 	int16 X;
 	int16 Y;
 	uint8 SprNr;
-
 	uint8 dummy;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 2 + 2 + 1 + 1;
+	}
 };
 
 #define MAXTAF 10
@@ -77,12 +84,16 @@ struct sound_def_blk {
 	int16 volume [MAX_SOUNDS];
 	int16 repeats [MAX_SOUNDS];
 	int16 stereo [MAX_SOUNDS];
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 7 * 2 * MAX_SOUNDS;
+	}
 };
 
 struct ani_detail_info {
 	int16 x;
 	int16 y;
-
 	uint8 start_flag;
 	uint8 repeat;
 	int16 start_ani;
@@ -91,50 +102,67 @@ struct ani_detail_info {
 	int16 delay;
 	int16 delay_count;
 	int16 reverse;
-
 	int16 timer_start;
-
 	int16 z_ebene;
-
 	uint8 load_flag;
-
 	uint8 zoom;
 	sound_def_blk sfx;
-
 	int16 show_1_phase;
-
 	int16 phase_nr;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 2 + 2 + 1 + 1 + 2 * 8 + 1 + 1 +
+			sound_def_blk::SIZE() + 2 + 2;
+	}
 };
 
 struct static_detail_info {
 	int16 x;
 	int16 y;
 	int16 SprNr;
-
 	short z_ebene;
-
 	bool Hide;
-
 	uint8 Dummy;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 2 + 2 + 2 + 1 + 1 + 1;
+	}
 };
 
 struct room_detail_info {
-	int16 StaticDetailAnz;
-	int16 AniDetailAnz;
-	taf_info *dptr;
+	int16 StaticDetailAnz = 0;
+	int16 AniDetailAnz = 0;
+	taf_info *dptr = nullptr;
 	ani_detail_info Ainfo[MAXDETAILS];
 	static_detail_info Sinfo[MAXDETAILS];
-	int16 mvect[MAX_M_ITEMS * 4];
-	int16 mtxt[MAX_M_ITEMS];
+	int16 mvect[MAX_M_ITEMS * 4] = { 0 };
+	int16 mtxt[MAX_M_ITEMS] = { 0 };
 	RaumInfo Ri;
 	RaumAutoMov AutoMov[MAX_AUTO_MOV];
-	int16 tvp_index[MAXDETAILS * MAX_SOUNDS];
-	byte *sample[MAXDETAILS * MAX_SOUNDS];
+	int16 tvp_index[MAXDETAILS * MAX_SOUNDS] = { 0 };
+	byte *sample[MAXDETAILS * MAX_SOUNDS] = { 0 };
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr size_t SIZE() {
+		return 2 + 2 + 4 +
+			(ani_detail_info::SIZE() * MAXDETAILS) +
+			(static_detail_info::SIZE() * MAXDETAILS) +
+			(2 * MAX_M_ITEMS * 4) +
+			(2 * MAX_M_ITEMS) +
+			RaumInfo::SIZE() +
+			(RaumAutoMov::SIZE() * MAX_AUTO_MOV) +
+			(2 * MAXDETAILS * MAX_SOUNDS) +
+			(4 * MAXDETAILS * MAX_SOUNDS);
+	}
 };
 
 struct RdiDateiHeader {
 	char Id[4];
 	int16 Anz;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 #define MAXPATH 255


Commit: 4a3d4a767e4bbb99a13c815e147e5ad724043c03
    https://github.com/scummvm/scummvm/commit/4a3d4a767e4bbb99a13c815e147e5ad724043c03
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:54-08:00

Commit Message:
CHEWY: Fix room_detail_info size and loading

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index d4e4148b003..defe4499a75 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -94,7 +94,7 @@ bool static_detail_info::load(Common::SeekableReadStream *src) {
 	x = src->readSint16LE();
 	y = src->readSint16LE();
 	SprNr = src->readSint16LE();
-	z_ebene = src->readByte();
+	z_ebene = src->readSint16LE();
 	Hide = src->readByte();
 	Dummy = src->readByte();
 
@@ -178,10 +178,10 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 	taf_info *tmprdi = rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
-		warning("FIXME: RdiDateiHeader::load doesn't match original structure size yet");
 		if (rdi_datei_header.load(&f)) {
 			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
 				f.seek(room_nr * (int64)room_detail_info::SIZE(), SEEK_CUR);
+
 				if (!rdi.load(&f)) {
 					modul = DATEI;
 					fcode = READFEHLER;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index ad28bece3e0..cae3f8a20bd 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -45,7 +45,7 @@ struct RaumInfo {
 	uint8 Dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
+	static const size_t SIZE() {
 		return 4 * 1 + 14 + 1 + 1;
 	}
 };
@@ -57,7 +57,7 @@ struct RaumAutoMov {
 	uint8 dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
+	static const size_t SIZE() {
 		return 2 + 2 + 1 + 1;
 	}
 };
@@ -78,15 +78,15 @@ struct SprInfo {
 
 struct sound_def_blk {
 	int16 sound_enable[MAX_SOUNDS];
-	int16 sound_index [MAX_SOUNDS];
-	int16 sound_start [MAX_SOUNDS];
-	int16 kanal [MAX_SOUNDS];
-	int16 volume [MAX_SOUNDS];
-	int16 repeats [MAX_SOUNDS];
-	int16 stereo [MAX_SOUNDS];
+	int16 sound_index[MAX_SOUNDS];
+	int16 sound_start[MAX_SOUNDS];
+	int16 kanal[MAX_SOUNDS];
+	int16 volume[MAX_SOUNDS];
+	int16 repeats[MAX_SOUNDS];
+	int16 stereo[MAX_SOUNDS];
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
+	static const size_t SIZE() {
 		return 7 * 2 * MAX_SOUNDS;
 	}
 };
@@ -111,7 +111,7 @@ struct ani_detail_info {
 	int16 phase_nr;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
+	static const size_t SIZE() {
 		return 2 + 2 + 1 + 1 + 2 * 8 + 1 + 1 +
 			sound_def_blk::SIZE() + 2 + 2;
 	}
@@ -121,13 +121,13 @@ struct static_detail_info {
 	int16 x;
 	int16 y;
 	int16 SprNr;
-	short z_ebene;
+	int16 z_ebene;
 	bool Hide;
 	uint8 Dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
-		return 2 + 2 + 2 + 1 + 1 + 1;
+	static const size_t SIZE() {
+		return 2 + 2 + 2 + 2 + 1 + 1;
 	}
 };
 
@@ -145,7 +145,7 @@ struct room_detail_info {
 	byte *sample[MAXDETAILS * MAX_SOUNDS] = { 0 };
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() {
+	static const size_t SIZE() {
 		return 2 + 2 + 4 +
 			(ani_detail_info::SIZE() * MAXDETAILS) +
 			(static_detail_info::SIZE() * MAXDETAILS) +


Commit: fa5d4e73da6758552745969291154346f0f0905b
    https://github.com/scummvm/scummvm/commit/fa5d4e73da6758552745969291154346f0f0905b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:54-08:00

Commit Message:
CHEWY: Fixed detail load_sprite_pointer method

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index defe4499a75..3de3bf69efe 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -208,7 +208,7 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 	if (strcmp(tafname, fname_)) {
 		if (rdi.dptr) {
 			if (fulltaf) {
-				free((char *)rdi.dptr);
+				free(rdi.dptr);
 				rdi.dptr = 0;
 				fulltaf = false;
 			} else {
@@ -305,7 +305,8 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 			}
 		}
 	}
-	return(Tt);
+
+	return Tt;
 }
 
 void detail::del_taf_tbl(taf_info *Tt) {
@@ -1242,25 +1243,28 @@ void detail::load_taf_ani_sprite(int16 nr) {
 	}
 }
 
-void detail::load_sprite_pointer(void *h) {
-	Stream *handle = (Stream *)h;
+void detail::load_sprite_pointer(Stream *stream) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	uint16 anzahl;
 	taf_dateiheader header;
 	taf_imageheader iheader;
 	int16 i;
-	if (handle) {
-		chewy_fseek(handle, 0, SEEK_SET);
-		if (chewy_fread(&header, sizeof(taf_dateiheader), 1, handle)) {
+
+	if (rs) {
+		rs->seek(0, SEEK_SET);
+
+		if (header.load(rs)) {
 			anzahl = header.count;
-			chewy_fseek(handle, header.next, SEEK_SET);
+			rs->seek(header.next, SEEK_SET);
 			SpritePos[0] = header.next;
+
 			for (i = 1; i < anzahl && !modul; i++) {
-				if (!chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+				if (!iheader.load(rs)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 				SpritePos[i] = iheader.next;
-				chewy_fseek(handle, iheader.next, SEEK_SET);
+				rs->seek(iheader.next, SEEK_SET);
 			}
 		} else {
 			modul = DATEI;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index cae3f8a20bd..88ec76821df 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -276,8 +276,7 @@ public:
 	void shadow_room(int16 mode);
 #endif
 	void set_taf_ani_mem(byte *load_area);
-	// FIXME : was FILE*
-	void load_sprite_pointer(void *handle);
+	void load_sprite_pointer(Stream *stream);
 
 private:
 	void load_taf_ani_sprite(int16 nr);


Commit: 77630f35cbb634b2a045cd201969d98e181891ed
    https://github.com/scummvm/scummvm/commit/77630f35cbb634b2a045cd201969d98e181891ed
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:54-08:00

Commit Message:
CHEWY: Update detail load_taf_seq method

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 3de3bf69efe..d5eeab45a88 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -228,7 +228,6 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 		if (!fulltaf)
 			load_taf_tbl(rdi.dptr);
 	}
-
 }
 
 void detail::del_dptr() {
@@ -246,14 +245,13 @@ void detail::del_dptr() {
 }
 
 void detail::load_taf_tbl(taf_info *fti) {
-
 	int16 i;
 	if (!fti) {
 		fti = rdi.dptr;
 	}
+
 	if (!modul) {
 		if (fti) {
-
 			if (CurrentTaf) {
 				for (i = 0; i < MAXDETAILS; i++) {
 					if (rdi.Sinfo[i].SprNr != -1)
@@ -347,24 +345,26 @@ void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 	}
 }
 
-void detail::load_taf_seq(void *h, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
-	Stream *handle = (Stream *)h;
+void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	uint32 size;
 	taf_imageheader iheader;
 	int16 i;
 
-	chewy_fseek(handle, SpritePos[spr_nr], SEEK_SET);
+	rs->seek(SpritePos[spr_nr], SEEK_SET);
 	for (i = 0; i < spr_anz && !modul; i++) {
-		if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+		if (iheader.load(rs)) {
 			if (!Tt->image[spr_nr + i]) {
 				size = iheader.width * iheader.height ;
 				Tt->image[spr_nr + i] = (byte *)calloc(size + 4l, 1);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
-				chewy_fseek(handle, iheader.image, SEEK_SET);
-				mem->file->load_tafmcga(handle, iheader.komp, size, Tt->image[spr_nr + i] + 4l);
+
+				rs->seek(iheader.image, SEEK_SET);
+				mem->file->load_tafmcga(rs, iheader.komp, size, Tt->image[spr_nr + i] + 4l);
 			}
-			chewy_fseek(handle, iheader.next, SEEK_SET);
+
+			rs->seek(iheader.next, SEEK_SET);
 		} else {
 			fcode = READFEHLER;
 			modul = DATEI;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 88ec76821df..fec4302e210 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -242,8 +242,7 @@ public:
 
 	void del_taf_tbl(int16 start, int16 anz, taf_info *Tt);
 
-	// FIXME : was FILE*
-	void load_taf_seq(void *handle, int16 spr_nr, int16 spr_anz,
+	void load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz,
 	                  taf_info *Tt);
 
 	void load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt);
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index beb4c8d0ce2..c1ad4ef8905 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -101,7 +101,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 			if (iib_datei_header.Size) {
 				assert(iib_datei_header.Size % RoomMovObjekt::SIZE() == 0);
 
-				for (int i = 0; i < iib_datei_header.Size / RoomMovObjekt::SIZE() && valid;
+				for (uint i = 0; i < iib_datei_header.Size / RoomMovObjekt::SIZE() && valid;
 						++i, ++rmo) {
 					valid = rmo->load(&f);
 				}


Commit: 7beae7f5912bea5dcd12e9d39029c6396edc202a
    https://github.com/scummvm/scummvm/commit/7beae7f5912bea5dcd12e9d39029c6396edc202a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:54-08:00

Commit Message:
CHEWY: Update load_image method

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 344e66bdf4c..c9d6fc34f41 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -222,7 +222,8 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 	}
 }
 
-void datei::load_image(Stream *handle, byte *sp, byte *palette) {
+void datei::load_image(Stream *stream, byte *sp, byte *palette) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
@@ -232,8 +233,9 @@ void datei::load_image(Stream *handle, byte *sp, byte *palette) {
 	header = (tbf_dateiheader *)tmp;
 	speicher = sp;
 	abmess = (int16 *) speicher;
-	if ((speicher) && (palette) && (handle)) {
-		if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+
+	if ((speicher) && (palette) && (rs)) {
+		if (header->load(rs)) {
 			format = get_id(header->id);
 			if (format != -1) {
 				for (i = 0; i < 768; i++)
@@ -243,14 +245,14 @@ void datei::load_image(Stream *handle, byte *sp, byte *palette) {
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tbf_image(handle, header->komp,
+					read_tbf_image(rs, header->komp,
 					               header->entpsize, speicher);
 					break;
 				case TPFDATEI:
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tpf_image(handle, header->komp,
+					read_tpf_image(rs, header->komp,
 					               header->entpsize, speicher);
 					break;
 				}
@@ -270,7 +272,7 @@ void datei::load_image(Stream *handle, byte *sp, byte *palette) {
 		modul = GRAFIK;
 	}
 	if (!modul)
-		chewy_fread(&ch, sizeof(ChunkHead), 1, handle);
+		ch.load(rs);
 }
 
 uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 8e2287989a5..1c0b68cb888 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -38,16 +38,16 @@ public:
 	void load_image(const char *fname, byte *sp, byte *palette);
 	void load_tafmcga(const char *fname, byte *sp, int16 nr);
 
-	void load_image(Stream *handle, byte *sp, byte *palette);
-	uint16 select_pool_item(Stream *handle, uint16 nr);
-	void load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher);
-	void read_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
-	uint32 load_voc(Stream *handle, byte *speicher);
-	uint32 load_item(Stream *handle, byte *speicher);
-	uint32 load_tmf(Stream *handle, tmf_header *song);
-	void write_tbf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
-	void write_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher);
-	void load_palette(Stream *handle, byte *palette);
+	void load_image(Stream *stream, byte *sp, byte *palette);
+	uint16 select_pool_item(Stream *stream, uint16 nr);
+	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
+	void read_tpf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
+	uint32 load_voc(Stream *stream, byte *speicher);
+	uint32 load_item(Stream *stream, byte *speicher);
+	uint32 load_tmf(Stream *stream, tmf_header *song);
+	void write_tbf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
+	void write_tpf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
+	void load_palette(Stream *stream, byte *palette);
 
 	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
 	void load_korrektur(const char *fname, byte *sp);
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index ca6884fdccb..08b9f4dfe7b 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -38,12 +38,11 @@ gedclass::~gedclass() {
 	warning("STUB - missing destructor gedclass");
 }
 
-void gedclass::load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 	warning("STUB - missing load_ged_pool");
 }
 
-//FIXME : was FILE*
-void gedclass::load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+void gedclass::load_ged_pool(Stream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 	warning("STUB - missing load_ged_pool");
 }
 
@@ -57,8 +56,7 @@ int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
 	return 0;
 }
 
-// FIXME : was FILE*
-void gedclass::load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher) {
+void gedclass::load_ged_chunk(GedChunkHeader *Gh, Stream *stream, int16 nr, byte *speicher) {
 	warning("STUB - missing load_ged_chunk");
 }
 
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 7334dd69df3..712e1f0ba59 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -32,21 +32,17 @@ public:
 	gedclass(int16(*user_func)(int16 idx_nr));
 	~gedclass();
 
-	void load_ged_pool(char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
+	void load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
 
-	//FIXME : was FILE*
-	void load_ged_pool(void *handle, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
+	void load_ged_pool(Stream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
 	int16 ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher);
 	int16 ged_idx(int16 g_idx, int16 x_anz, byte *speicher);
 
 private:
-
-	// FIXME : was FILE*
-	void load_ged_chunk(GedChunkHeader *Gh, void *handle, int16 nr, byte *speicher);
+	void load_ged_chunk(GedChunkHeader *Gh, Stream *stream, int16 nr, byte *speicher);
 
 	GedPoolHeader ged_pool_header;
 	int16(*GedUserFunc)(int16 idx_nr);
-
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 03a958118bc..d265e1d6cd3 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -62,6 +62,9 @@ struct tbf_dateiheader {
 	char palette[768];
 
 	bool load(Common::SeekableReadStream *src);
+	static const size_t SIZE() {
+		return 4 + 2 + 2 + 4 + 2 + 2 + 768;
+	}
 };
 
 struct taf_dateiheader {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 60c368f4262..d2832d39a01 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -245,35 +245,38 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 }
 
 int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
-	bool ret;
-	int16 *tmp;
-
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
+		roomhandle[R_TGPDATEI]);
 	tbf_dateiheader tb;
-	ret = false;
+	bool ret = false;
+	int16 *tmp;
 
-	if (roomhandle[R_TGPDATEI]) {
-		mem->file->select_pool_item(roomhandle[R_TGPDATEI], nr);
+	if (rs) {
+		mem->file->select_pool_item(rs, nr);
 
-		if (!chewy_fread(&tb, sizeof(tbf_dateiheader), 1, roomhandle[R_TGPDATEI])) {
+		if (!tb.load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
+
 		if (!modul) {
-			chewy_fseek(roomhandle[R_TGPDATEI], -(int)sizeof(tbf_dateiheader), SEEK_CUR);
+			rs->seek(-(int)tbf_dateiheader::SIZE(), SEEK_CUR);
 			Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), tb.entpsize + 4);
+
 			if (Rb->AkAblage == -1) {
 			} else if (Rb->AkAblage >= 1000) {
 				Rb->AkAblage -= 1000;
+
 			} else {
 				mem->file->
-				load_image(roomhandle[R_TGPDATEI], Ablage[Rb->AkAblage], AblagePal[Rb->AkAblage]);
+				load_image(rs, Ablage[Rb->AkAblage], AblagePal[Rb->AkAblage]);
 				if (!modul) {
 					set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), tb.entpsize);
 					ret = true;
-					if (mode == GED_LOAD) {
 
+					if (mode == GED_LOAD) {
 						ged->load_ged_pool(roomhandle[R_GEPDATEI], &GedInfo[Rb->AkAblage],
-						                    nr, GedMem[Rb->AkAblage]);
+						                   nr, GedMem[Rb->AkAblage]);
 						if (!modul) {
 							tmp = (int16 *)Ablage[Rb->AkAblage];
 							GedXAnz[Rb->AkAblage] = tmp[0] / GedInfo[Rb->AkAblage].X;
@@ -289,12 +292,12 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 				}
 			}
 		}
-
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
-	return (ret);
+
+	return ret;
 }
 
 void Room::init_ablage() {


Commit: 584e269a974832c5e5bfe428510364170011283a
    https://github.com/scummvm/scummvm/commit/584e269a974832c5e5bfe428510364170011283a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:54-08:00

Commit Message:
CHEWY: Minor cleanups

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index c9d6fc34f41..55df1ba8dbd 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -256,21 +256,19 @@ void datei::load_image(Stream *stream, byte *sp, byte *palette) {
 					               header->entpsize, speicher);
 					break;
 				}
-			}
-			else {
+			} else {
 				fcode = NOTTBF;
 				modul = DATEI;
 			}
-		}
-		else {
+		} else {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}
+
 	if (!modul)
 		ch.load(rs);
 }
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index d2832d39a01..5fb8803bf3c 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -250,6 +250,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 	tbf_dateiheader tb;
 	bool ret = false;
 	int16 *tmp;
+	ret = false;
 
 	if (rs) {
 		mem->file->select_pool_item(rs, nr);
@@ -268,8 +269,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 				Rb->AkAblage -= 1000;
 
 			} else {
-				mem->file->
-				load_image(rs, Ablage[Rb->AkAblage], AblagePal[Rb->AkAblage]);
+				mem->file->load_image(rs, Ablage[Rb->AkAblage], AblagePal[Rb->AkAblage]);
 				if (!modul) {
 					set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), tb.entpsize);
 					ret = true;


Commit: 0a22abac9ab19434802a8c28f1b29d48f6a49f97
    https://github.com/scummvm/scummvm/commit/0a22abac9ab19434802a8c28f1b29d48f6a49f97
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:55-08:00

Commit Message:
CHEWY: Implemented gedclass class

Changed paths:
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp


diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index 08b9f4dfe7b..45421bef699 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -20,44 +20,79 @@
  *
  */
 
+#include "common/file.h"
 #include "chewy/chewy.h"
 #include "chewy/gedclass.h"
+#include "chewy/fehler.h"
+#include "chewy/ngshext.h"
 
 namespace Chewy {
 
-gedclass::gedclass(int16(*user_func)(int16 idx_nr)) {
-	warning("STUB - missing constructor gedclass");
-
-	ged_pool_header.Anz = 0;
-	ged_pool_header.Id[0] = 0;
-
-	GedUserFunc = nullptr;
+void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+	Common::File f;
+	if (f.open(fname)) {
+		load_ged_pool(&f, Gh, ch_nr, speicher);
+	} else {
+		modul = 3;
+		fcode = 0;
+		err->set_user_msg("GED POOL");
+	}
 }
 
-gedclass::~gedclass() {
-	warning("STUB - missing destructor gedclass");
+void gedclass::load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+	if (stream) {
+		stream->seek(0, SEEK_SET);
+		if (_gedPoolHeader.load(stream)) {
+			load_ged_chunk(Gh, stream, ch_nr, speicher);
+		}
+	} else {
+		modul = 3;
+		fcode = 0;
+		err->set_user_msg("GED POOL");
+	}
 }
 
-void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
-	warning("STUB - missing load_ged_pool");
-}
+void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *stream, int16 nr, byte *speicher) {
+	if (stream) {
+		// Scan for the correct index entry
+		int i = 0;
+		do {
+			if (!Gh->load(stream)) {
+				modul = 3;
+				fcode = 1;
+			} else if (i != nr) {
+				// Skip over the entry's data
+				stream->seek(Gh->Len, SEEK_CUR);
+			}
+		} while (!modul && ++i <= nr);
 
-void gedclass::load_ged_pool(Stream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
-	warning("STUB - missing load_ged_pool");
+		if (!modul) {
+			if (stream->read(speicher, Gh->Len) != Gh->Len) {
+				modul = 3;
+				fcode = 1;
+			}
+		}
+	} else {
+		modul = 3;
+		fcode = 0;
+		err->set_user_msg("GED FILE");
+	}
 }
 
 int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
-	warning("STUB - missing ged_idx");
-	return 0;
+	int16 result = 0;
+	if (_gedUserFunc)
+		result = _gedUserFunc(speicher[((x / 8) * x_anz) + (y / 8)]);
+
+	return result;
 }
 
 int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
-	warning("STUB - missing ged_idx");
-	return 0;
-}
+	int16 result = 0;
+	if (_gedUserFunc)
+		result = _gedUserFunc(speicher[g_idx]);
 
-void gedclass::load_ged_chunk(GedChunkHeader *Gh, Stream *stream, int16 nr, byte *speicher) {
-	warning("STUB - missing load_ged_chunk");
+	return result;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 712e1f0ba59..50629e2d4b3 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -23,26 +23,29 @@
 #ifndef CHEWY_GEDCLASS_H
 #define CHEWY_GEDCLASS_H
 
+#include "common/stream.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
 
+typedef int16(*GedUserFunc)(int16 idx_nr);
+
 class gedclass {
 public:
-	gedclass(int16(*user_func)(int16 idx_nr));
-	~gedclass();
+	gedclass(GedUserFunc func) : _gedUserFunc(func) {
+	}
 
 	void load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
 
-	void load_ged_pool(Stream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
+	void load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
 	int16 ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher);
 	int16 ged_idx(int16 g_idx, int16 x_anz, byte *speicher);
 
 private:
-	void load_ged_chunk(GedChunkHeader *Gh, Stream *stream, int16 nr, byte *speicher);
+	void load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *stream, int16 nr, byte *speicher);
 
-	GedPoolHeader ged_pool_header;
-	int16(*GedUserFunc)(int16 idx_nr);
+	GedPoolHeader _gedPoolHeader;
+	GedUserFunc _gedUserFunc;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index f5427ffdab2..41913fa8b1c 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -246,6 +246,22 @@ bool tmf_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool GedPoolHeader::load(Common::SeekableReadStream *src) {
+	src->read(Id, 4);
+	Anz = src->readUint16LE();
+
+	return true;
+}
+
+bool GedChunkHeader::load(Common::SeekableReadStream *src) {
+	Len = src->readUint32LE();
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	Ebenen = src->readSint16LE();
+
+	return true;
+}
+
 bool ChunkHead::load(Common::SeekableReadStream *src) {
 	size = src->readUint32LE();
 	type = src->readUint16LE();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index d265e1d6cd3..eda5aa6b362 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -418,6 +418,8 @@ struct mem_info_blk {
 struct GedPoolHeader {
 	char Id[4] = { 0 };
 	int16 Anz = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct GedChunkHeader {
@@ -425,6 +427,8 @@ struct GedChunkHeader {
 	int16 X = 0;
 	int16 Y = 0;
 	int16 Ebenen = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct GedHeader {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 5fb8803bf3c..ed1c019c39b 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -275,7 +275,9 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 					ret = true;
 
 					if (mode == GED_LOAD) {
-						ged->load_ged_pool(roomhandle[R_GEPDATEI], &GedInfo[Rb->AkAblage],
+						Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
+							roomhandle[R_GEPDATEI]);
+						ged->load_ged_pool(gstream, &GedInfo[Rb->AkAblage],
 						                   nr, GedMem[Rb->AkAblage]);
 						if (!modul) {
 							tmp = (int16 *)Ablage[Rb->AkAblage];


Commit: 76b73a25e3d12e8198df428cef7817ef0de7686c
    https://github.com/scummvm/scummvm/commit/76b73a25e3d12e8198df428cef7817ef0de7686c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:55-08:00

Commit Message:
CHEWY: Cleanup of datei::imsize

Changed paths:
    engines/chewy/datei.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 55df1ba8dbd..ee8e5a48a11 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -1748,32 +1748,32 @@ void datei::load_palette(Stream *handle, byte *palette) {
 }
 
 void datei::imsize(const char *fname, uint32 *svekt) {
+	Common::File f;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	uint16 sprcount = 0;
 	uint32 next = 0;
-	int16 id, i;
+	int16 id;
 	header = (taf_dateiheader *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	if (!strchr(filename, '.'))
+		strcat(filename, ".taf");
 
-	Stream *handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
+	if (f.open(filename)) {
+		if (header->load(&f)) {
 			id = get_id(header->id);
 			if ((id == TAFDATEI) && (header->mode == 19)) {
 				next = header->next;
 				while (sprcount < header->count) {
-					chewy_fseek(handle, next, SEEK_SET);
-					if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+					f.seek(next, SEEK_SET);
+					if (iheader.load(&f)) {
 						next = iheader.next;
 						svekt[sprcount] = ((uint32)iheader.width) * ((uint32)iheader.width);
-					}
-					else {
+					} else {
 						fcode = READFEHLER;
 						modul = DATEI;
 					}
@@ -1781,7 +1781,8 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 				}
 			}
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;


Commit: 297716f3accaefaa4e0619bd25092dfabfc40397
    https://github.com/scummvm/scummvm/commit/297716f3accaefaa4e0619bd25092dfabfc40397
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:55-08:00

Commit Message:
CHEWY: Cleanup of datei::load_tafmcga

Changed paths:
    engines/chewy/datei.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index ee8e5a48a11..1bd76fe7687 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -301,36 +301,36 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 }
 
 void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
-	Stream *handle;
+	Common::File f;
 	taf_dateiheader *header;
 	taf_imageheader iheader;
 	int16 *abmess, komp;
-	int16 id, i;
+	int16 id;
 	uint16 sprcount = 0;
 	uint32 size = 0, next = 0, image = 0;
 	byte *speicher;
 	speicher = sp;
 	header = (taf_dateiheader *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
 		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".TAF\0");
+	if (!strchr(filename, '.'))
+		strcat(filename, ".taf");
 
 	abmess = (int16 *) speicher;
 	speicher += 4;
 	if (abmess) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (chewy_fread(header, sizeof(taf_dateiheader), 1, handle)) {
+		if (f.open(filename)) {
+			if (header->load(&f)) {
 				id = get_id(header->id);
 				if (id == TAFDATEI) {
 					if (header->korrekt == 1) {
 						next = header->next;
 						while ((sprcount <= nr) && (nr <= header->count)) {
-							chewy_fseek(handle, next, SEEK_SET);
-							if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
+							f.seek(next, SEEK_SET);
+							if (iheader.load(&f)) {
 								next = iheader.next;
 								image = iheader.image;
 							} else {
@@ -339,47 +339,42 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 							}
 							++sprcount;
 						}
-					}
-					else {
-						chewy_fseek(handle, (-(int)((header->count - nr)*sizeof(uint32))), SEEK_END);
-						if (!chewy_fread(&next, sizeof(uint32), 1, handle)) {
+					} else {
+						f.seek((-(int)((header->count - nr) * sizeof(uint32))), SEEK_END);
+						next = f.readUint32LE();
+						f.seek(next, SEEK_SET);
+
+						if (iheader.load(&f)) {
+							next = iheader.next;
+							image = iheader.image;
+						} else {
 							fcode = READFEHLER;
 							modul = DATEI;
-						} else {
-							chewy_fseek(handle, next, SEEK_SET);
-							if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
-								next = iheader.next;
-								image = iheader.image;
-							} else {
-								fcode = READFEHLER;
-								modul = DATEI;
-							}
 						}
 					}
+
 					abmess[0] = iheader.width;
 					abmess[1] = iheader.height;
 					size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
 					komp = iheader.komp;
-					chewy_fseek(handle, image, SEEK_SET);
-					read_tbf_image(handle, komp, size, speicher);
-				}
-				else {
+					f.seek(image, SEEK_SET);
+					read_tbf_image(&f, komp, size, speicher);
+
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			chewy_fclose(handle);
-		}
-		else {
+
+			f.close();
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}


Commit: f47b0118639efa483ca56fb2d13c2095f3a4facc
    https://github.com/scummvm/scummvm/commit/f47b0118639efa483ca56fb2d13c2095f3a4facc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:55-08:00

Commit Message:
CHEWY: Cleanup of atdsys::load_atds

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 0b610f581da..51c442e1cf9 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -410,20 +410,20 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 }
 
 void atdsys::load_atds(int16 chunk_nr, int16 mode) {
-	Stream *handle;
 	ChunkHead Ch;
-	char *txt_adr;
-	handle = atdshandle[mode];
-	txt_adr = atdsmem[mode];
-	if (handle && txt_adr) {
-		mem->file->select_pool_item(handle, chunk_nr + atdspooloff[mode]);
-		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, handle)) {
+	char *txt_adr = atdsmem[mode];
+	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(
+		atdshandle[mode]);
+
+	if (stream && txt_adr) {
+		mem->file->select_pool_item(stream, chunk_nr + atdspooloff[mode]);
+		stream->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+		if (!Ch.load(stream)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (Ch.size) {
-				if (!chewy_fread(txt_adr, Ch.size, 1, handle)) {
+				if (stream->read(txt_adr, Ch.size) != Ch.size) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else if (mode != ADH_DATEI)


Commit: b9fc77462bac7632ec354ce6ef34b5a903ffde69
    https://github.com/scummvm/scummvm/commit/b9fc77462bac7632ec354ce6ef34b5a903ffde69
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Further loading cleanup

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e609b80290c..fef3dd830fb 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -191,7 +191,7 @@ AutoMov auto_mov[MAX_AUTO_MOV];
 
 int16 HowardMov;
 
-/* Stream */ void *spz_taf_handle;
+Stream *spz_taf_handle;
 taf_seq_info *spz_tinfo;
 int16 SpzDelay;
 int16 spz_spr_nr[MAX_SPZ_PHASEN];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index b2fbc5ac94b..f679ed71e04 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -208,7 +208,7 @@ extern uint8 PersonSpr[MAX_PERSON][8];
 
 extern int16 SpzDelay;
 // FIXME: was FILE*
-extern void *spz_taf_handle;
+extern Stream *spz_taf_handle;
 extern taf_seq_info *spz_tinfo;
 extern int16 spz_spr_nr[MAX_SPZ_PHASEN];
 extern int16 spz_start;
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 3a1fa2d4b6a..2ab8ba87607 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/memstream.h"
 #include "chewy/memory.h"
 
 namespace Chewy {
@@ -73,9 +74,9 @@ taf_info *memory::taf_adr(const char *filename) {
 	return tinfo;
 }
 
-taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
+taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
                                   int16 image_anz) {
-	Stream *handle = (Stream *)h;
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	taf_dateiheader header;
 	taf_imageheader iheader;
 	taf_seq_info *ts_info = nullptr;
@@ -86,69 +87,73 @@ taf_seq_info *memory::taf_seq_adr(void *h, int16 image_start,
 	int16 id;
 	byte *tmp1;
 	byte *sp_ptr;
-	chewy_fseek(handle, 0, SEEK_SET);
-	if (chewy_fread(&header, sizeof(taf_dateiheader), 1, handle)) {
+
+	rs->seek(0, SEEK_SET);
+	if (header.load(rs)) {
 		id = file->get_id(header.id);
 		if (id == TAFDATEI) {
 			if (header.korrekt > 1) {
-				chewy_fseek(handle, (-(int)((header.count - image_start)*sizeof(uint32))), SEEK_END);
-				if (!chewy_fread(&ptr, sizeof(uint32), 1, handle)) {
-					fcode = READFEHLER;
-					modul = DATEI;
-				} else {
-					chewy_fseek(handle, ptr, SEEK_SET);
-					size = 0;
-					for (i = 0; i < image_anz && !modul; i++) {
-						if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
-							size += iheader.width * iheader.height ;
-							chewy_fseek(handle, iheader.next, SEEK_SET);
-						} else {
-							modul = DATEI;
-							fcode = READFEHLER;
-						}
+				rs->seek((-(int)((header.count - image_start) * sizeof(uint32))), SEEK_END);
+				ptr = rs->readUint32LE();
+
+				rs->seek(ptr, SEEK_SET);
+				size = 0;
+				for (i = 0; i < image_anz && !modul; i++) {
+					if (iheader.load(rs)) {
+						size += iheader.width * iheader.height;
+						rs->seek(iheader.next, SEEK_SET);
+
+					} else {
+						modul = DATEI;
+						fcode = READFEHLER;
 					}
+				}
+				if (!modul) {
+					size += image_anz * 4l;
+					size += image_anz * sizeof(char *);
+					size += ((uint32)sizeof(taf_seq_info));
+					tmp1 = (byte *)calloc(size + image_anz * 4l, 1);
 					if (!modul) {
-						size += image_anz * 4l;
-						size += image_anz * sizeof(char *);
-						size += ((uint32)sizeof(taf_seq_info));
-						tmp1 = (byte *)calloc(size + image_anz * 4l, 1);
-						if (!modul) {
-							ts_info = (taf_seq_info *)tmp1;
-							ts_info->anzahl = image_anz;
-							ts_info->korrektur = (int16 *)(tmp1 + size);
-							chewy_fseek(handle, ptr, SEEK_SET);
-							sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
-							                 + (image_anz * sizeof(char *)));
-							for (i = 0; i < image_anz && !modul; i++) {
-								if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, handle)) {
-									ts_info->image[i] = sp_ptr;
-									abmess = (int16 *)sp_ptr;
-									abmess[0] = iheader.width;
-									abmess[1] = iheader.height;
-									sp_ptr += 4;
-									size = (uint32)((uint32)iheader.height) *
-									       ((uint32)iheader.width);
-									chewy_fseek(handle, iheader.image, SEEK_SET);
-									file->load_tafmcga(handle, iheader.komp, size, sp_ptr);
-									chewy_fseek(handle, iheader.next, SEEK_SET);
-									sp_ptr += size;
-								} else {
-									modul = DATEI;
-									fcode = READFEHLER;
-								}
+						ts_info = (taf_seq_info *)tmp1;
+						ts_info->anzahl = image_anz;
+						ts_info->korrektur = (int16 *)(tmp1 + size);
+						rs->seek(ptr, SEEK_SET);
+						sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
+							+ (image_anz * sizeof(char *)));
+
+						for (i = 0; i < image_anz && !modul; i++) {
+							if (iheader.load(rs)) {
+								ts_info->image[i] = sp_ptr;
+								abmess = (int16 *)sp_ptr;
+								abmess[0] = iheader.width;
+								abmess[1] = iheader.height;
+								sp_ptr += 4;
+								size = (uint32)((uint32)iheader.height) *
+									    ((uint32)iheader.width);
+
+								rs->seek(iheader.image, SEEK_SET);
+								file->load_tafmcga(rs, iheader.komp, size, sp_ptr);
+								rs->seek(iheader.next, SEEK_SET);
+								sp_ptr += size;
+							} else {
+								modul = DATEI;
+								fcode = READFEHLER;
 							}
-							if (!modul) {
-								chewy_fseek(handle, (-(int)(((header.count * 2) - image_start)*sizeof(uint32))), SEEK_END);
-								if (!chewy_fread(ts_info->korrektur, image_anz * 4, 1, handle)) {
-									{
-										fcode = READFEHLER;
-										modul = DATEI;
-									}
-								}
+						}
+						if (!modul) {
+							rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
+
+							if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
+								fcode = READFEHLER;
+								modul = DATEI;
+							} else {
+								int16 *p = ts_info->korrektur;
+								for (i = 0; i < (int)image_anz * 2; ++i, ++p)
+									*p = rs->readSint16LE();
 							}
-							if (modul)
-								free(tmp1);
 						}
+						if (modul)
+							free(tmp1);
 					}
 				}
 			} else {
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index cc1fcc7f517..f5054b9be39 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -35,8 +35,7 @@ public:
 	void init();
 
 	taf_info *taf_adr(const char *filename);
-	// FIXME: was using FILE
-	taf_seq_info *taf_seq_adr(void *handle, int16 image_start,
+	taf_seq_info *taf_seq_adr(Stream *handle, int16 image_start,
 	                          int16 image_anz);
 	void tff_adr(const char *filename, byte **speicher);
 	byte *void_adr(const char *filename);
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index eda5aa6b362..6090c3e8a72 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -99,7 +99,7 @@ struct taf_info {
 struct taf_seq_info {
 	int16 anzahl = 0;
 	int16 *korrektur = nullptr;
-	byte **image = nullptr;
+	byte *image[1];		// variable size
 };
 
 struct NewPhead {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index ed1c019c39b..02624abe045 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -43,12 +43,12 @@ Room::~Room() {
 	free_ablage();
 }
 
-void *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
-	Stream *handle;
-	handle = chewy_fopen(fname1, fmode);
-	if (handle) {
+Stream *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
+	Stream *stream;
+	stream = chewy_fopen(fname1, fmode);
+	if (stream) {
 		close_handle(mode);
-		roomhandle[mode] = handle;
+		roomhandle[mode] = stream;
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 611bf002ec9..4a72a968681 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -72,8 +72,7 @@ public:
 	Room();
 	~Room();
 
-	// FIXME: was FILE*
-	void *open_handle(const char *fname, const char *fmode, int16 mode);
+	Stream *open_handle(const char *fname, const char *fmode, int16 mode);
 
 	void close_handle(int16 mode);
 


Commit: 66ba9cd104b9bf5d0fdc98609414226d2b96c32f
    https://github.com/scummvm/scummvm/commit/66ba9cd104b9bf5d0fdc98609414226d2b96c32f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Remove common/textconsole.h from chewy.h

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/timer.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 79b8e21c4ad..6d1e46f3514 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -29,7 +29,6 @@
 #include "common/scummsys.h"
 #include "common/error.h"
 #include "common/random.h"
-#include "common/textconsole.h"
 #include "engines/engine.h"
 
 namespace Chewy {
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index efc6949874e..e9f8a1e94ff 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/textconsole.h"
 #include "chewy/chewy.h"
 #include "chewy/timer.h"
 #include "chewy/defines.h"


Commit: 04536d72165620025a78897ab1fcc050a5167b36
    https://github.com/scummvm/scummvm/commit/04536d72165620025a78897ab1fcc050a5167b36
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Add screen surface to ChewyEngine

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/inits.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 169db7d53d3..02a60da42dd 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -30,11 +30,16 @@
 
 namespace Chewy {
 
+ChewyEngine *g_engine;
+
 ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
-	: Engine(syst),
-	  _gameDescription(gameDesc),
-	  _rnd("chewy") {
+		: Engine(syst),
+		_gameDescription(gameDesc),
+		_rnd("chewy"),
+		_screen(nullptr),
+		_sound(nullptr) {
 
+	g_engine = this;
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 
 	SearchMan.addSubDirectoryMatching(gameDataDir, "back");
@@ -47,10 +52,13 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 }
 
 ChewyEngine::~ChewyEngine() {
+	delete _screen;
 	delete _sound;
+	g_engine = nullptr;
 }
 
 void ChewyEngine::initialize() {
+	_screen = new Graphics::Screen();
 	_sound = new Sound(_mixer);
 }
 
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 6d1e46f3514..e908ae5a2f0 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -30,6 +30,7 @@
 #include "common/error.h"
 #include "common/random.h"
 #include "engines/engine.h"
+#include "graphics/screen.h"
 
 namespace Chewy {
 
@@ -37,6 +38,17 @@ struct ChewyGameDescription;
 class Sound;
 
 class ChewyEngine : public Engine {
+protected:
+	// Engine APIs
+	Common::Error run() override;
+	bool hasFeature(EngineFeature f) const override;
+
+	void initialize();
+	void shutdown();
+
+public:
+	Sound *_sound;
+	Graphics::Screen *_screen;
 public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
 	~ChewyEngine() override;
@@ -48,18 +60,10 @@ public:
 
 	const ChewyGameDescription *_gameDescription;
 	Common::RandomSource _rnd;
-
-protected:
-	// Engine APIs
-	Common::Error run() override;
-	bool hasFeature(EngineFeature f) const override;
-
-	void initialize();
-	void shutdown();
-
-	Sound *_sound;
 };
 
+extern ChewyEngine *g_engine;
+
 } // End of namespace Chewy
 
 #endif
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 62a3753552b..1c46a1bf974 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/memstream.h"
+#include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
@@ -54,7 +55,7 @@ void standard_init() {
 	out->set_clip(0, 0, 320, 200);
 	out->set_writemode(0);
 	scr_width = 0;
-	screen0 = (byte *) 0xa0000;
+	screen0 = (byte *)g_engine->_screen->getPixels();
 	in->neuer_kb_handler(&kbinfo);
 
 	in->rectangle(0, 0, 320, 210);


Commit: f29ed7a5e6897026ee693c03b4f2a20addb727bc
    https://github.com/scummvm/scummvm/commit/f29ed7a5e6897026ee693c03b4f2a20addb727bc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Split mcga_grafik class into it's own file

Changed paths:
  A engines/chewy/mcga_grafik.cpp
  A engines/chewy/mcga_grafik.h
    engines/chewy/atds.cpp
    engines/chewy/cursor.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/module.mk


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 51c442e1cf9..3889e766217 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -83,9 +83,9 @@ char atds_id[4][4] = { "ATS",
                        "ADH",
                      };
 
-void atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
+void atdsys::set_font(byte *font_adr, int16 fvorx_, int16 fhoehe) {
 	atdsv.Font = font_adr;
-	atdsv.Fvorx = fvorx;
+	atdsv.Fvorx = fvorx_;
 	atdsv.Fhoehe = fhoehe;
 }
 
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index be8a1f1e9be..c176e279d91 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -23,7 +23,7 @@
 #ifndef CHEWY_CURSOR_H
 #define CHEWY_CURSOR_H
 
-#include "chewy/mcga.h"
+#include "chewy/mcga_grafik.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -31,7 +31,6 @@ namespace Chewy {
 extern int16 scr_w;
 
 class cursor {
-
 public:
 	cursor();
 	cursor(mcga_grafik *out, maus *in, cur_blk *curblk);
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 843b61ac649..41d722a59fd 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -25,15 +25,6 @@
 
 namespace Chewy {
 
-#define SETZEN 0
-#define UND 1
-#define ODER 2
-#define XODER 3
-#define GRAFIK 1
-#define SPEICHER 2
-#define DATEI 3
-#define MAXSTRING 255
-
 #define WAIT asm { NOP; NOP;NOP;NOP;NOP;NOP;NOP;NOP;NOP;NOP;}
 int16 FuNr;
 real_regs rr;
@@ -41,7 +32,6 @@ real_regs *rp = &rr;
 maus_info *m_info;
 VesaInfo vi;
 
-
 int16 clipx1, clipx2, clipy1, clipy2;
 int16 gcurx, gcury, fvorx, fvory;
 int16 fontbr, fonth;
@@ -50,7 +40,7 @@ int16 fontfirst, fontlast;
 char writemode;
 
 char MausMode;
-char enter_key ;
+char enter_key;
 char escape_key;
 char einfuegen = 0;
 
@@ -59,1702 +49,78 @@ int16 r_gef = -1, r_end = false;
 int16 *rlist = 0;
 byte pal_table[768];
 bool mono = false;
-
-// Missing STUBs
 uint8 svga;
-void init_mcga() { warning ("STUB - init_mcga"); }
-void old_mode() { warning("STUB - old_mode"); }
-void vflyback_start() { warning("STUB - vflyback_start"); }
-void vflyback_end() { warning("STUB - vflyback_end"); }
-void hflyback_start() { warning("STUB - hflyback_start"); }
-void hflyback_end() { warning("STUB - hflyback_end"); }
-void set_pointer(byte *ptr) { warning("STUB - set_pointer"); }
-byte *get_dispoff() { warning("STUB - get_dispoff"); return nullptr; }
-void setpalette(byte *palette) { warning("STUB - setpalette"); }
-void save_palette(byte *pal) { warning("STUB - save_palette"); }
-void restore_palette() { warning("STUB - restore_palette"); }
-void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) { warning("STUB - rastercol"); }
-void set_palpart(byte *palette, int16 startcol, int16 anz) { warning("STUB - set_palpart"); }
-void clear_mcga() { warning("STUB - clear_mcga"); }
-void setpixel_mcga(int16 x, int16 y, int16 farbe) { warning("STUB - setpixel_mcga"); }
-uint8 getpix(int16 x, int16 y) { warning("STUB - getpix"); return 0; }
-void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) { warning("STUB - line_mcga"); }
-void mem2mcga(byte *ptr) { warning("STUB - mem2mcga"); }
-void mem2mcga_masked(byte *ptr, int16 maske) { warning("STUB - mem2mcga_masked"); }
-void mcga2mem(byte *ptr) { warning("STUB - mcga2mem"); }
-void mem2mem(byte *ptr1, byte *ptr2) { warning("STUB - mem2mem"); }
-void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) { warning("STUB - mem2mem_masked"); }
-void map_spr_2screen(byte *sptr, int16 x, int16 y) { warning("STUB - map_spr_2screen"); }
-void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) { warning("STUB - spr_save_mcga"); }
-void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - spr_set_mcga"); }
-void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - mspr_set_mcga"); }
-void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) { warning("STUB - setfont"); }
-void upd_scr() { warning("STUB - upd_scr"); }
-void vors() { warning("STUB - vors"); }
-
-void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) { warning("STUB - zoom_img"); }
-void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) { warning("STUB - zoom_set"); }
-
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putcxy"); }
-void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putz"); }
-void init_svga(VesaInfo *vi_, byte *virt_screen) { warning("STUB - init_svga"); }
-
-
-
-void mcga_grafik::ltoa(long N, char *str, int base) {
-	sprintf(str, "%ld", N);
-}
-
-void mcga_grafik::ultoa(uint32 N, char *str, int base) {
-	sprintf(str, "%u", N);
-}
-
-void mcga_grafik::itoa(int N, char *str, int base) {
-	sprintf(str, "%d", N);
-}
-
-bool kbhit() {
-	warning("STUB: kbhit()");
-
-	return false;
-}
-
-char getch() {
-	warning("STUB: getch()");
-
-	return ' ';
-}
-
-void putch(char c) {
-	warning("STUB: putch()");
-}
-
-mcga_grafik::mcga_grafik() {
-	int16 i;
-
-#if 0
-	char *enstr;
-
-	char a[] = {92, 85, 97, 59, 96, 83, 100, 83, 79, 90, 0}; // "NGS-REVEAL"
-	char b[] = {85, 96, 79, 94, 86, 87, 81, 97, 109, 82, 96, 87, 100, 83, 96, 109,
-		54, 81, 55, 109, 92, 83, 101, 109, 85, 83, 92, 83, 96, 79, 98, 87, 93, 92,
-		109, 97, 93, 84, 98, 101, 79, 96, 83, 0 }; // "GRAPHICS_DRIVER_(C)_NEW_GENERATION_SOFTWARE"
-	for (i = 0; a[i] != 0; i++)
-		a[i] -= 14;
-	for (i = 0; b[i] != 0; i++)
-		b[i] -= 14;
-	enstr = (char *)getenv(a);
-	if (enstr) {
-		printf(b);
-		printf("\n");
-		delay(800);
-	}
-#endif
-
-	for (i = 0; i < 360; i++) {
-		sinus[i] = sin(i * 3.14159265359 / 180);
-		cosinus[i] = cos(i * 3.14159265359 / 180);
-	}
-	scr_w = 0;
-	scr_h = 200;
-	mono = false;
-	MausMode = false;
-}
-mcga_grafik::~mcga_grafik() {
-}
-
-void mcga_grafik::init() {
-	scr_w = 320;
-	scr_h = 200;
-	init_mcga();
-}
-
-void mcga_grafik::set_writemode(char wm) {
-	writemode = wm;
-}
-
-void mcga_grafik::restore_mode() {
-	old_mode();
-}
-
-void mcga_grafik::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
-	clipx1 = x1;
-	clipx2 = x2;
-	clipy1 = y1;
-	clipy2 = y2;
-}
-
-void mcga_grafik::vsync_start() {
-	vflyback_start();
-}
-
-void mcga_grafik::vsync_end() {
-	vflyback_end();
-}
-
-void mcga_grafik::hsync_start() {
-	hflyback_start();
-}
-
-void mcga_grafik::hsync_end() {
-	hflyback_end();
-}
-
-void mcga_grafik::skip_frame(int16 frames) {
-	int16 i = 0;
-	for (i = 0; i < frames; i++) {
-		vflyback_start();
-		vflyback_end();
-	}
-}
-
-void mcga_grafik::skip_line(int16 lines) {
-	int16 i = 0;
-	for (i = 0; i < lines; i++) {
-		hflyback_start();
-		hflyback_end();
-	}
-}
-
-void mcga_grafik::setze_zeiger(byte *ptr) {
-	set_pointer(ptr);
-}
-
-byte *mcga_grafik::get_zeiger() {
-	return get_dispoff();
-}
-
-void mcga_grafik::set_bildbreite(int16 breite) {
-	scr_w = breite;
-	if (!scr_w)
-		scr_w = 320;
-}
-
-void mcga_grafik::set_mono() {
-	mono = true;
-}
-
-void mcga_grafik::calc_mono(byte *pal, int16 startcol, int16 anz) {
-	int16 i, k;
-	uint8 r, g, b, grau;
-	k = startcol * 3;
-	for (i = 0; i < anz; i++) {
-		r = pal[k];
-		g = pal[k + 1];
-		b = pal[k + 2];
-		grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
-		pal[k] = grau;
-		pal[k + 1] = grau;
-		pal[k + 2] = grau;
-		k += 3;
-	}
-}
-
-void mcga_grafik::set_palette(byte *palette) {
-	int16 i;
-	for (i = 0; i < 768; i++)
-		pal_table[i] = palette[i];
-	if (mono)
-		calc_mono(palette, 0, 256);
-	setpalette(palette);
-}
-
-void mcga_grafik::palette_save(byte *pal) {
-	save_palette(pal);
-}
-
-void mcga_grafik::rest_palette() {
-	restore_palette();
-}
-
-void mcga_grafik::raster_col(int16 c, int16 r, int16 g, int16 b) {
-	int16 index;
-	index = c * 3;
-	pal_table[index] = r;
-	pal_table[index + 1] = g;
-	pal_table[index + 2] = b;
-	if (mono)
-		calc_mono(pal_table, c, 1);
-	rastercol(c, r, g, b);
-}
-
-void mcga_grafik::einblenden(byte *palette, int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	int16 r1, g1, b1;
-	if (mono)
-		calc_mono(palette, 0, 256);
-	for (j = 63; j >= 0; j--) {
-		k = 0;
-		for (i = 0; i < 256; i++) {
-			r = palette[k];
-			g = palette[k + 1];
-			b = palette[k + 2];
-			r1 = r - j;
-			g1 = g - j;
-			b1 = b - j;
-			if ((r1 > 0) && (r1 <= r))
-				pal_table[k] = r1;
-			if ((g1 > 0) && (r1 <= r))
-				pal_table[k + 1] = g1;
-			if ((b1 > 0) && (r1 <= r))
-				pal_table[k + 2] = b1;
-			k += 3;
-		}
-		setpalette(pal_table);
-		if (frames)
-			skip_frame(frames);
-	}
-}
-
-void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
-                            frames) {
-	int16 i = 0, j, k;
-	int16 r, g, b;
-	int16 endcol = 0;
-	if (mono)
-		calc_mono(palette, startcol, anz);
-	endcol = startcol + anz;
-	for (j = stufen; j >= 0; j--) {
-		endcol = startcol + anz;
-		k = startcol * 3;
-		for (i = startcol; i < endcol; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
-			if ((r + 1) <= palette[k]) ++r;
-			if ((g + 1) <= palette[k + 1]) ++g;
-			if ((b + 1) <= palette[k + 2]) ++b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
-			k += 3;
-		}
-		set_palpart(pal_table, startcol, anz);
-		if (frames)
-			skip_frame(frames);
-	}
-}
-
-void mcga_grafik::ausblenden(int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	for (j = 0; j < 64; j++) {
-		k = 0;
-		for (i = 0; i < 256; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
-			if (r > 0) --r;
-			if (g > 0) --g;
-			if (b > 0) --b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
-			k += 3;
-		}
-		setpalette(pal_table);
-		if (frames)
-			skip_frame(frames);
-	}
-}
-
-void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	int16 endcol = 0;
-	endcol = startcol + anz;
-	for (j = 0; j < stufen; j++) {
-		k = startcol * 3;
-		for (i = startcol; i < endcol; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
-			if (r > 0) --r;
-			if (g > 0) --g;
-			if (b > 0) --b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
-			k += 3;
-		}
-		set_palpart(pal_table, startcol, anz);
-		if (frames)
-			skip_frame(frames);
-	}
-}
-
-void mcga_grafik::set_teilpalette(byte *palette, int16 startcol, int16 anz) {
-	int16 i;
-	int16 k, endcol;
-	k = startcol * 3;
-	endcol = startcol + anz;
-	for (i = startcol; i < endcol; i++) {
-		pal_table[k] = palette[k];
-		pal_table[k + 1] = palette[k + 1];
-		pal_table[k + 2] = palette[k + 2];
-		k += 3;
-	}
-	if (mono)
-		calc_mono(pal_table, startcol, anz);
-	set_palpart(pal_table, startcol, anz);
-}
-
-void mcga_grafik::cls() {
-	clear_mcga();
-}
-
-void mcga_grafik::punkt(int16 xpos, int16 ypos, int16 farbn) {
-	setpixel_mcga(xpos, ypos, farbn);
-}
-
-uint8 mcga_grafik::get_pixel(int16 xpos, int16 ypos) {
-	uint8 pix;
-	pix = getpix(xpos, ypos);
-	return (pix);
-}
-
-void mcga_grafik::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	line_mcga(x1, y1, x2, y2, farbe);
-}
-
-void mcga_grafik::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	line_mcga(x1, y1, x2, y1, farbe);
-	line_mcga(x1, y2 - 1, x2, y2 - 1, farbe);
-	line_mcga(x1, y1, x1, y2, farbe);
-	line_mcga(x2, y1, x2, y2, farbe);
-}
-
-void mcga_grafik::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	int16 h, i;
-	if (x2 == x1)x2++;
-	h = abs(y2 - y1);
-	if (h == 0)
-		h = 1;
-	for (i = 0; i < h; i++)
-		line_mcga(x1, y1 + i, x2, y1 + i, farbe);
-}
-
-void mcga_grafik::pop_box(int16 x, int16 y, int16 x1, int16 y1,
-                          int16 col1, int16 col2, int16 back_col) {
-	if (back_col < 255)
-		box_fill(x, y, x1, y1, back_col);
-	linie(x, y1, x1, y1, col2);
-	linie(x1, y, x1, y1, col2);
-	linie(x, y, x1, y, col1);
-	linie(x, y, x, y1 + 1, col1);
-}
-
-void mcga_grafik::kreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 a = 0, b = 0, alt = 0, diff;
-	int16 w, i;
-	for (w = 0; w <= 91; w++) {
-		a = (int16)(sinus[w] * ((float)r * 0.85));
-		if ((a - alt) > 1) {
-			diff = a - alt;
-			for (i = 0; i <= diff; i++) {
-				setpixel_mcga(x - b, (y - (alt + i)), farbe);
-				setpixel_mcga(x + b, (y - (alt + i)), farbe);
-				setpixel_mcga(x - b, (y + (alt + i)), farbe);
-				setpixel_mcga(x + b, (y + (alt + i)), farbe);
-			}
-		}
-		b = (int16)(cosinus[w] * (float)r);
-		setpixel_mcga(x - b, y - a, farbe);
-		setpixel_mcga(x + b, y - a, farbe);
-		setpixel_mcga(x - b, y + a, farbe);
-		setpixel_mcga(x + b, y + a, farbe);
-		alt = a;
-	}
-}
-
-void mcga_grafik::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 a = 0, b = 0, alt = 0, i = 0, diff;
-	int16 w;
-	for (w = 0; w <= 90; w++) {
-		a = (int16)(sinus[w] * ((float)r * 0.85));
-		if ((a - alt) > 1) {
-			diff = a - alt;
-			for (i = 0; i < diff; i++) {
-				line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
-				line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
-			}
-		}
-		b = (int16)(cosinus[w] * ((float)r));
-		line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
-		line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
-		alt = a;
-	}
-}
-
-#ifdef EFFEKTE
-void mcga_grafik::seit_in(char *source) {
-	split_in(source);
-}
-
-void mcga_grafik::falling_in(char *source) {
-	fall_in(source);
-}
-
-void mcga_grafik::ueberblend(char *source) {
-	over_in(source);
-}
-
-void mcga_grafik::y_shrumpf(char *source, char *dest, int16 faktor,
-                            int16 zeile) {
-	y_shrink(source, dest, faktor, zeile);
-}
-#endif
 
-void mcga_grafik::back2screen(byte *ptr) {
-	mem2mcga(ptr);
+void init_mcga() {
+	// No implementation needed
 }
 
-void mcga_grafik::back2back(byte *ptr1, byte *ptr2) {
-	mem2mem(ptr1, ptr2);
+void old_mode() {
+	// No implementation needed
 }
 
-void mcga_grafik::back2screen_maskiert(byte *ptr, int16 maske) {
-	mem2mcga_masked(ptr, maske);
-}
-
-void mcga_grafik::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
-	mem2mem_masked(ptr1, ptr2, maske);
-}
-
-void mcga_grafik::screen2back(byte *ptr) {
-	mcga2mem(ptr);
-}
-
-void mcga_grafik::sprite_save(byte *sptr, int16 x,
-                              int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
-	if (breite < 4)breite = 4;
-	if (hoehe <= 0)hoehe = 1;
-	if (x < clipx1) {
-		x = clipx1;
-		breite -= (clipx1 - x);
-	}
-	if ((x + breite) > clipx2 + 1)
-		breite = clipx2 - x;
-	if (y < clipy1) {
-		y = clipy1;
-		hoehe -= (clipy1 - y);
-	}
-	if ((y + hoehe) > clipy2 + 1)
-		hoehe = clipy2 - y;
-	if (breite < 1)breite = 0;
-	if (hoehe <= 0)hoehe = 0;
-	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
-}
-
-void mcga_grafik::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
-	mspr_set_mcga(sptr, x, y, scrwidth);
-}
-
-void mcga_grafik::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
-	spr_set_mcga(sptr, x, y, scrwidth);
-}
-
-void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
-	int16 br, h;
-	br = ((int16 *)sptr)[0];
-	h = ((int16 *)sptr)[1];
-	if ((br >= 320) || (h >= 200))
-		map_spr_2screen(sptr, x, y);
-}
-
-void mcga_grafik::set_fontadr(byte *adr) {
-	tff_header *tff;
-	tff = (tff_header *) adr;
-	setfont(adr + sizeof(tff_header), (int16)tff->width, (int16)tff->height,
-	        (int16)tff->first, (int16)tff->last);
-	fvorx = (int16)tff->width;
-	fvory = 0;
-}
-
-int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
-                          const char *string, ...) {
-	int16 i, j, stelle, stellemax, mode = 0;
-	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
-	int16 ret = 0;
-	int16 delay_flag;
-	char ende = 0, zeichen, zaehler, cursor_z;
-	char zstring[81], z1string[81];
-	char einfuege_cur = 0;
-	char char_anf = 0, char_end = 0;
-	uint16 vorzeichen = 0;
-	char x_mode = 0;
-	char eing = 0;
-	uint16 izahl = 0;
-	uint16 *intzahl = nullptr;
-	int16 *intzahl1 = nullptr;
-	uint32 *longzahl = nullptr;
-	char *charstr = nullptr;
-	uint32 luzahl;
-	va_list parptr;
-	va_start(parptr, string);
-	if ((x == -1) || (y == -1)) {
-		x = gcurx;
-		y = gcury;
-	} else {
-		gcurx = x;
-		gcury = y;
-	}
-	move(x, y);
-	i = 0;
-	while (!ende) {
-		zeichen = string[i];
-		++i;
-
-		if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
-			if (zeichen == '%') {
-
-				zeichen = string[i];
-				++i;
-				zaehler = 0;
-
-				if (zeichen == '[') {
-					char_anf = string[i];
-					++i;
-					++i;
-					char_end = string[i];
-					++i;
-					++i;
-					zeichen = string[i];
-					++i;
-				}
-
-				while ((zeichen >= '0') && (zeichen <= '9')) {
-					zaehler *= 10;
-					zaehler += (zeichen - 48);
-					if (zaehler > 80)
-						zaehler = 80;
-					zeichen = string[i];
-					++i;
-				}
-				if (einfuegen == 1) {
-					einfuege_cur = 125;
-					cursor_z = '_' + einfuege_cur;
-				} else {
-					einfuege_cur = 0;
-					cursor_z = '_';
-				}
-
-				switch (zeichen) {
-				case 'd':
-					vorzeichen = '-';
-				case 'u':
-					if ((char_anf == 0) && (char_end == 0)) {
-						char_anf = '0';
-						char_end = '9';
-					}
-					if (!zaehler)
-						zaehler = 4;
-					if (zeichen == 'd') {
-						mode = 4;
-						intzahl1 = va_arg(parptr, int16 *);
-						luzahl = intzahl1[0];
-					} else {
-						mode = 1;
-						intzahl = va_arg(parptr, uint16 *);
-						luzahl = intzahl[0];
-					}
-					if (luzahl != 0)
-						ltoa(luzahl, zstring, 10);
-					else {
-						zstring[0] = '0';
-						zstring[1] = 0 ;
-					}
-					break;
-				case 'l':
-					vorzeichen = '-';
-					if ((char_anf == 0) && (char_end == 0))
-						vorzeichen = '-';
-					{
-						char_anf = '0';
-						char_end = '9';
-					}
-					mode = 2;
-					if (!zaehler)
-						zaehler = 9;
-					longzahl = va_arg(parptr, uint32 *);
-					luzahl = longzahl[0];
-					if (luzahl != 0)
-						ultoa(luzahl, zstring, 10);
-					else {
-						zstring[0] = '0';
-						zstring[1] = 0 ;
-					}
-					break;
-				case 's':
-					if ((char_anf == 0) && (char_end == 0)) {
-						char_anf = ' ';
-						char_end = '\xdc';
-					}
-					mode = 3;
-					vorzeichen = 0xFF;
-					if (!zaehler)
-						zaehler = 81;
-					charstr = va_arg(parptr, char *);
-					strcpy(zstring, charstr);
-					break;
-				}
-				zeichen = string[i];
-				++i;
-				if (zeichen == 'x') {
-					x_mode = 1;
-					zeichen = string[i];
-					++i;
-				}
-				disp_stellemax = 0;
-
-				while ((zeichen >= '0') && (zeichen <= '9')) {
-					disp_stellemax *= 10;
-					disp_stellemax += (zeichen - 48);
-					if (disp_stellemax > 80)
-						disp_stellemax = 80;
-					zeichen = string[i];
-					++i;
-				}
-				if (!disp_stellemax)
-					disp_stellemax = zaehler;
-
-				stelle = 0;
-				disp_stelle = 0;
-				while (zstring[stelle] != 0) {
-					++stelle;
-				}
-				stellemax = stelle;
-				if (stelle > disp_stellemax) {
-					disp_stelle = stelle - disp_stellemax;
-					disp_akt = disp_stellemax;
-				} else {
-					disp_akt = stelle;
-					disp_stelle = 0;
-				}
-				for (j = stelle; j < j + 1; j++) {
-					while ((!kbhit()) || (eing != 0)) {
-
-						eing = 0;
-						move(x, y);
-						vsync_start();
-						for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
-							if (zstring[i] != 0) {
-								putz(zstring[i], fcol, bcol, scrwidth);
-								vors();
-							} else {
-								putz(zstring[i], fcol, bcol, scrwidth);
-								vors();
-								break;
-							}
-						}
-						if (svga == ON)
-							upd_scr();
-						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
-
-						{
-							skip_frame(1);
-							izahl = devices();
-							if (izahl == 13) {
-								eing = 2;
-								break;
-							} else if (izahl == 27) {
-								eing = 2;
-								break;
-							}
-						}
-						plot_scan_cur((x + (disp_akt)*fvorx), gcury, cur_col, 300, scrwidth, cursor_z);
-						if (svga == ON)
-							upd_scr();
-						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
-
-						{
-							skip_frame(1);
-							izahl = devices();
-							if (izahl == 13) {
-								eing = 2;
-								break;
-							} else if (izahl == 27) {
-								eing = 2;
-								break;
-							}
-						}
-						if (eing == 2)
-							break;
-					}
-					if (eing < 2)
-						izahl = (uint16)getch();
-					if (izahl == 13) {
-
-						ret = 13;
-						ende = 1;
-						break;
-					}
-					if (izahl == 27) {
-
-						ret = 27;
-						ende = 2;
-						break;
-					}
-
-					if (izahl == 8) {
-						eing = 1;
-						while (kbhit())
-							getch();
-						if (stelle > 0) {
-							strcpy(zstring + stelle - 1, zstring + stelle);
-							plot_scan_cur((x + disp_akt * fvorx), gcury, bcol, bcol, scrwidth, cursor_z);
-							if (svga == ON)
-								upd_scr();
-							--stelle;
-							--stellemax;
-							if (disp_stelle > 0)
-								--disp_stelle;
-							else if (disp_akt > 0) {
-								--disp_akt;
-							}
-						} else
-							putch(7);
-					}
-
-					if (izahl == 0) {
-						izahl = getch();
-
-						if (izahl == 75) {
-							while (kbhit())
-								getch();
-							eing = 1;
-							if (stelle <= 0) {
-								putch(7);
-								stelle = 0;
-
-							} else {
-								if (disp_akt > 0) {
-									--disp_akt;
-								} else {
-									if (disp_stelle > 0)
-										--disp_stelle;
-								}
-								--stelle;
-							}
-						}
-
-						if (izahl == 77) {
-							eing = 1;
-							while (kbhit())
-								getch();
-							++j;
-							if (stelle >= stellemax) {
-								stelle = stellemax;
-								putch(7);
-							} else {
-								if (disp_akt < disp_stellemax) {
-									++disp_akt;
-								} else {
-									if (disp_stelle <= (zaehler - disp_stellemax)) {
-										++disp_stelle;
-									}
-								}
-								++stelle;
-							}
-						}
-
-						if (izahl == 71) {
-							stelle = 0;
-							disp_akt = 0;
-							disp_stelle = 0;
-						}
-
-						if (izahl == 79) {
-							stelle = stellemax;
-							if (stellemax < disp_stellemax) {
-								disp_stelle = 0;
-								disp_akt = stellemax;
-							}
-							else {
-								disp_akt = disp_stellemax;
-								disp_stelle = stelle - disp_stellemax;
-							}
-						}
-
-						if ((izahl == 83) && (stelle < stellemax)) {
-							while (kbhit())
-								getch();
-							eing = 1;
-							strcpy(zstring + stelle, zstring + stelle + 1);
-							--stellemax;
-						}
-
-						if (izahl == 82) {
-							//delay(200);
-							if (!einfuegen) {
-								einfuegen = 1;
-								einfuege_cur = 125;
-								cursor_z = '_' + einfuege_cur;
-							} else {
-								einfuegen = 0;
-								einfuege_cur = 0;
-								cursor_z = '_';
-							}
-						}
-						izahl = 0;
-					}
-
-					if (izahl < char_anf || izahl > char_end) {
-						if (vorzeichen == izahl && !stelle);
-						else {
-							if (x_mode == 1) {
-								ende = 1;
-								ret = izahl;
-								break;
-							}
-							continue;
-						}
-					}
-					if ((stelle == stellemax) && (stellemax >= zaehler)) {
-						stellemax = zaehler;
-						putch(7);
-					} else {
-
-						if (disp_akt < disp_stellemax) {
-							++disp_akt;
-						} else {
-							if (disp_stelle <= (zaehler - disp_stellemax)) {
-								++disp_stelle;
-								disp_akt = disp_stellemax;
-							}
-						}
-						if (!einfuegen) {
-							zstring[stelle] = izahl;
-							zstring[stellemax + 1] = 0;
-							if (stelle == stellemax) {
-								++stelle;
-								++stellemax;
-							} else {
-								++stelle;
-							}
-						}
-						else {
-							strcpy(z1string, zstring);
-							strcpy(zstring + stelle + 1, z1string + stelle);
-							zstring[stelle] = izahl;
-							zstring[(int)zaehler] = 0;
-							if (stellemax < zaehler) {
-								++stelle;
-								++stellemax;
-							} else {
-								++stelle;
-							}
-						}
-					}
-					if (x_mode == 1) {
-						ende = 1;
-						ret = izahl;
-
-						break;
-					}
-				}
-			}
-
-		}
-	}
-
-	move(x, y);
-	for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
-		if (zstring[i] != 0) {
-			putz(zstring[i], fcol, bcol, scrwidth);
-			vors();
-		} else {
-			putz(zstring[i], fcol, bcol, scrwidth);
-			vors();
-			break;
-		}
-	}
-	switch (ende) {
-
-	case 1:
-		switch (mode) {
-		case 1:
-			intzahl[0] = atoi(zstring);
-			break;
-		case 2:
-			longzahl[0] = atol(zstring);
-			break;
-		case 3:
-			strcpy(charstr, zstring);
-			break;
-		case 4:
-			intzahl1[0] = atoi(zstring);
-			break;
-		}
-		break;
-
-	case 2:
-		break;
-	}
-	if (svga == ON)
-		upd_scr();
-	return (ret);
-}
-
-void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
-                                char cursor_z) {
-	move(x, y);
-	putz(cursor_z, fcol, bcol, scrwidth);
-}
-
-void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
-                          const char *string, ...) {
-	int16 i = 0, k = 0, l;
-	char zeichen, zstring[35];
-	int16 izahl;
-	int16 count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
-	char *tempptr;
-	va_list parptr;
-	va_start(parptr, string);
-	crlfx = x;
-	crlfy = y + (int16)fonth + 2;
-	gcurx = x;
-	gcury = y;
-	i = 0;
-	do {
-		zeichen = string[i];
-		++i;
-		if ((zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
-			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
-				break;
-
-			case 13:
-				gcurx = crlfx;
-				break;
-
-			case 127 :
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			default :
-				if (zeichen >= fontfirst)
-					putz(zeichen, forcol, backcol, scrwidth);
-				break;
-			}
-		}
-		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
-			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
-				vors();
-			}
-			else {
-				zeichen = string[i];
-				count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
-					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
-					++i;
-					zeichen = string[i];
-				}
-				++i;
-				switch (zeichen) {
-				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (zeichen == 'd') {
-						izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						luzahl = va_arg(parptr, uint32);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-					else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-					break;
-
-				}
-			}
-		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
-}
-
-void mcga_grafik::speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
-                                int16 scrwidth, char *string) {
-	int16 i = 0;
-	char zeichen;
-	gcurx = x;
-	gcury = y;
-	i = 0;
-	do {
-		zeichen = string[i];
-		++i;
-		if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
-			putz(zeichen, forcol, backcol, scrwidth);
-			vors();
-		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
-}
-
-void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *string, ...) {
-	int16 i = 0, k = 0, l;
-	char zeichen, zstring[35];
-	char *tempptr;
-	int16 izahl, count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
-	va_list parptr;
-	va_start(parptr, string);
-	crlfx = gcurx;
-	crlfy = gcury + fonth + 2;
-	i = 0;
-	do {
-		zeichen = string[i];
-		++i;
-		if ((zeichen > 0 && zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
-			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
-				break;
-
-			case 13:
-				gcurx = crlfx;
-				break;
-
-			case 127 :
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			default :
-				if (zeichen >= fontfirst) {
-					putz(zeichen, forcol, backcol, scrwidth);
-					vors();
-				}
-				break;
-			}
-		} else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 0)) {
-			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
-				vors();
-			} else {
-				zeichen = string[i];
-				count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
-					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
-					++i;
-					zeichen = string[i];
-				}
-				++i;
-				switch (zeichen) {
-				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (zeichen == 'd') {
-						izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						luzahl = va_arg(parptr, unsigned long);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					} else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-
-					break;
-
-				}
-			}
-		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
-}
-
-void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
-                           int16 scrwidth, char *string, ...) {
-	int16 i = 0, k = 0, l;
-	char zeichen, zstring[35];
-	char *tempptr;
-	int16 izahl, count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
-	va_list parptr;
-	va_start(parptr, string);
-	gcurx = x;
-	gcury = y;
-	crlfx = gcurx;
-	crlfy = y + fonth + 2;
-	for (i = 0; i < menge;) {
-		zeichen = string[i];
-		++i;
-		if ((zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
-			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
-				break;
-
-			case 13:
-				gcurx = crlfx;
-				break;
-
-			case 127 :
-				putz(32, forcol, backcol, scrwidth);
-				break;
-
-			default :
-				if (zeichen >= fontfirst)
-					putz(zeichen, forcol, backcol, scrwidth);
-				break;
-			}
-		}
-		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
-			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
-				vors();
-			}
-			else {
-				zeichen = string[i];
-				count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
-					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
-					++i;
-					zeichen = string[i];
-				}
-				++i;
-				switch (zeichen) {
-				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (zeichen == 'd') {
-						izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						luzahl = va_arg(parptr, uint32);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					} k
-					    = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-					else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-
-					break;
-
-				}
-			}
-		}
-	}
-}
-
-void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
-                              int16 scrwidth) {
-	crlfx = x;
-	crlfy = y + fonth + 2;
-	if ((zeichen < 32) || (zeichen == 127)) {
-		switch (zeichen) {
-		case 8:
-			x -= fvorx;
-			y -= fvory;
-			putcxy(x, y, 32, forcol, backcol, scrwidth);
-			break;
-
-		case 10:
-			gcury = crlfy;
-			gcurx = crlfx;
-			crlfx = gcurx;
-			crlfy = gcury + fonth + 2;
-			break;
-
-		case 13:
-			gcurx = crlfx;
-			gcury = crlfy;
-			break;
-
-		case 127:
-			putcxy(x, y, 32, forcol, backcol, scrwidth);
-			break;
-		}
-	}
-	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
-		putcxy(x, y, zeichen, forcol, backcol, scrwidth);
-		vors();
-	}
-}
+void vflyback_start() { warning("STUB - vflyback_start"); }
 
-void mcga_grafik::printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
-	crlfx = gcurx;
-	crlfy = gcury + fonth + 2;
-	if ((zeichen < 32) || (zeichen == 127)) {
-		switch (zeichen) {
-		case 8:
-			gcurx -= fvorx;
-			gcury -= fvory;
-			putz(32, forcol, backcol, scrwidth);
-			break;
+void vflyback_end() { warning("STUB - vflyback_end"); }
 
-		case 10:
-			gcury = crlfy;
-			gcurx = crlfx;
-			crlfx = gcurx;
-			crlfy = gcury + fonth + 2;
-			break;
+void hflyback_start() { warning("STUB - hflyback_start"); }
 
-		case 13:
-			gcurx = crlfx;
-			gcury = crlfy;
-			break;
+void hflyback_end() { warning("STUB - hflyback_end"); }
 
-		case 127:
-			putz(32, forcol, backcol, scrwidth);
-			break;
-		}
-	}
-	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
-		putz(zeichen, forcol, backcol, scrwidth);
-		vors();
-	}
-}
+void set_pointer(byte *ptr) { warning("STUB - set_pointer"); }
 
-void mcga_grafik::set_vorschub(int16 x, int16 y) {
-	if (fvorx != -255)
-		fvorx = x;
-	if (fvory != -255)
-		fvory = y;
-}
+byte *get_dispoff() { warning("STUB - get_dispoff"); return nullptr; }
 
-void mcga_grafik::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
-	*vorx = fvorx;
-	*vory = fvory;
-	*fntbr = fontbr;
-	*fnth = fonth;
-}
+void setpalette(byte *palette) { warning("STUB - setpalette"); }
 
-void mcga_grafik::vorschub() {
-	vors();
-}
+void save_palette(byte *pal) { warning("STUB - save_palette"); }
 
-void mcga_grafik::move(int16 x, int16 y) {
-	gcurx = x;
-	gcury = y;
-}
+void restore_palette() { warning("STUB - restore_palette"); }
 
-void mcga_grafik::init_mausmode(maus_info *minfo) {
-	MausMode = true;
-	m_info = minfo;
-}
+void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) { warning("STUB - rastercol"); }
 
-void mcga_grafik::exit_mausmode() {
-	MausMode = false;
-	m_info = 0;
-}
+void set_palpart(byte *palette, int16 startcol, int16 anz) { warning("STUB - set_palpart"); }
 
-int16 mcga_grafik::devices() {
-	int16 i;
-	i = 0;
-	if (MausMode != false) {
-		if (i > 1) {
-			i = 27;
-		} else if (i == 1)
-			i = 13;
-		else
-			i = 0;
-	}
-	return (i);
-}
+void clear_mcga() { warning("STUB - clear_mcga"); }
 
-int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
-	int16 k, diff;
-	k = 0;
-	while (zstring[k] != 0)
-		++k;
-	if (k >= stellen) {
-		while ((k) && (stellen)) {
-			--k;
-			--stellen;
-		}
-		diff = 0;
-	} else {
-		diff = stellen - k;
-		k = 0;
-	}
-	*pos = k;
-	return (diff);
-}
+void setpixel_mcga(int16 x, int16 y, int16 farbe) { warning("STUB - setpixel_mcga"); }
 
-void mcga_grafik::scale_image(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
-	zoom_img(source, dest, xdiff_, ydiff_);
-}
+uint8 getpix(int16 x, int16 y) { warning("STUB - getpix"); return 0; }
 
-void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
-	if ((xdiff_) || (ydiff_))
-		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
-	else
-		mspr_set_mcga(sptr, x, y, scrwidth);
-}
+void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) { warning("STUB - line_mcga"); }
 
-void mcga_grafik::init(uint16 mode, byte *info_blk, byte *vscreen) {
-	if (!get_vesa_info(mode, info_blk)) {
-		init_svga(&vi, vscreen);
-		//delay(250);
-	}
-}
+void mem2mcga(byte *ptr) { warning("STUB - mem2mcga"); }
 
-void mcga_grafik::update_screen() {
-	if (svga == ON)
-		upd_scr();
-}
+void mem2mcga_masked(byte *ptr, int16 maske) { warning("STUB - mem2mcga_masked"); }
 
-int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
-	int16 error = 0;
-#if 0
-	vesa_status_block *vsb;
-	vesa_modus_block *vmb ;
-	uint16 vsb_seg, vsb_off;
-	char *tmp;
-	uint16 *code_list;
-	dword screensize;
-	int16 i;
-	uint16 akt_page;
-	uint16 StepGr;
-	error = 0;
+void mcga2mem(byte *ptr) { warning("STUB - mcga2mem"); }
 
-	vsb = (vesa_status_block *) iblk;
-	vmb = (vesa_modus_block *) iblk;
-	rr.eax = 0x4f00;
-	rr.edi = (dword)vsb & 15;
-	rr.es = (uint16)(((dword)vsb) >> 4);
-	FuNr = 0x10;
-	r_int();
-	if ((rr.eax != 0x4f) && (strnicmp((char *)vsb->id, "VESA", 4)))
-		error = 1;
-	if (!error) {
-		printf("VESA Version : %d.%d \n", vsb->ver_high, vsb->ver_low);
-		vsb_seg = (uint16)(((dword)vsb->name) >> 16);
-		vsb_off = (uint16)(((dword)vsb->name) & 0xffff);
-		tmp = (char *)((dword)vsb_seg << 4) + ((dword)vsb_off);
-		printf("Hersteller : %s \n", tmp);
-		if (vsb->ver_high >= 1)
-			printf("SPEICHER : %u * 64k = %uk\n", vsb->memory, vsb->memory << 6);
-		else
-			error = 1;
-	}
+void mem2mem(byte *ptr1, byte *ptr2) { warning("STUB - mem2mem"); }
 
-	if (!error) {
-		vsb_seg = (uint16)(((dword)vsb->codenrs) >> 16);
-		vsb_off = (uint16)(((dword)vsb->codenrs) & 0xffff);
-		code_list = (uint16 *)(((dword)vsb_seg << 4) + ((dword)vsb_off));
-		while ((*code_list != mode) && (*code_list != 0xffff))
-			++code_list;
-		if (*code_list == 0xffff)
-			error = 1;
-	}
-	if (!error) {
-		printf("Mode %4x : ist verfügbar\n", mode);
+void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) { warning("STUB - mem2mem_masked"); }
 
-		memset(iblk, 0, sizeof(vesa_status_block));
-		rr.eax = 0x4f01;
-		rr.ecx = (dword) mode;
-		rr.edi = (dword)vmb & 15;
-		rr.es = (uint16)(((dword)vmb) >> 4);
-		FuNr = 0x10;
-		r_int();
-		if (rr.eax != 0x4f)
-			error = 1;
-		if (!error) {
-			vi.ModeNr = mode;
-			if (vmb->mflag & 1) {
-				if (vmb->mflag & 1)printf("Monitor kann Modus darstellen\n");
-				if (vmb->mflag & 2)printf("Optionale Infos geliefert\n");
-				if (vmb->mflag & 4)printf("BIOS-Textfunktionen möglich\n");
-				if (vmb->mflag & 0x8)printf("Farbmodus\n");
-				if (vmb->mflag & 0x10)printf("Grafikmodus\n");
-				if (vmb->fw_flag & 1) {
-					if (vmb->fw_flag & 4) {
-						vi.WriteWin = 0;
-						vi.WriteSeg = vmb->fw_seg;
-					}
-				}
+void map_spr_2screen(byte *sptr, int16 x, int16 y) { warning("STUB - map_spr_2screen"); }
 
-				if (vmb->fs_flag & 1) {
-					if (vmb->fs_flag & 4) {
-						vi.WriteWin = 1;
-						vi.WriteSeg = vmb->fs_seg;
-					}
-				}
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) { warning("STUB - spr_save_mcga"); }
 
-				switch (mode) {
-				case 0x100:
-					screensize = 640l * 400l;
-					scr_w = 640;
-					scr_h = 400;
-					break;
+void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - spr_set_mcga"); }
 
-				case 0x101:
-					screensize = 640l * 480l;
-					scr_w = 640;
-					scr_h = 480;
-					break;
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - mspr_set_mcga"); }
 
-				case 0x102:
-					screensize = (800l * 600l) >> 1;
-					scr_w = 800;
-					scr_h = 600;
-					break;
+void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) { warning("STUB - setfont"); }
 
-				case 0x103:
-					screensize = 800l * 600l;
-					scr_w = 800;
-					scr_h = 600;
-					break;
+void upd_scr() { warning("STUB - upd_scr"); }
 
-				case 0x104:
-					screensize = (1024l * 768l) >> 1;
-					scr_w = 1024;
-					scr_h = 768;
-					break;
+void vors() { warning("STUB - vors"); }
 
-				case 0x105:
-					screensize = 1024l * 768l;
-					scr_w = 1024;
-					scr_h = 768;
-					break;
+void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) { warning("STUB - zoom_img"); }
 
-				case 0x106:
-					screensize = (1280l * 1024l) >> 1;
-					scr_w = 1280;
-					scr_h = 1280;
-					break;
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) { warning("STUB - zoom_set"); }
 
-				case 0x107:
-					screensize = 1280l * 1024l;
-					scr_w = 1280;
-					scr_h = 1280;
-					break;
+void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putcxy"); }
 
-				}
-				akt_page = 0;
-				StepGr = vmb->wsize / vmb->stepgr;
-				if (StepGr == 0)
-					StepGr = 1;
-				vi.ScreenSize = screensize;
-				for (i = 0; (i < 20); i++) {
-					vi.Page[i] = akt_page;
-					akt_page += StepGr;
-				}
-				printf("Granularität = %d Kbyte\n", vmb->stepgr);
-				printf("Größe der Fenster = %d Kbyte\n", vmb->wsize);
-				printf("Segmentadresse erstes Fenster = %xh\n", vmb->fw_seg);
-				printf("Segmentadresse zweites Fenster = %xh\n", vmb->fs_seg);
-				printf("Zeiger auf Page-Select-Routine = %p\n", vmb->page_set);
-				vi.WinSize = ((dword)vmb->wsize) * 1024l;
-				vi.CallSeg = FP_SEG(vmb->page_set);
-				vi.CallOff = FP_OFF(vmb->page_set);
-				vi.PageAnz = vi.ScreenSize / vi.WinSize;
-				printf("Pages = %d\n", vi.PageAnz);
+void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putz"); }
 
-				vi.CopyRest = vi.ScreenSize % vi.WinSize;
-			}
-			else
-				vi.ModeAvail = FALSE;
-		}
-	}
-#endif
-	return (error);
-}
+void init_svga(VesaInfo *vi_, byte *virt_screen) { warning("STUB - init_svga"); }
 
 } // namespace Chewy
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index a2d6f64e8bc..17b46c8af9c 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -29,6 +29,31 @@
 namespace Chewy {
 
 extern uint8 svga;
+extern int16 FuNr;
+extern real_regs rr;
+extern real_regs *rp;
+extern maus_info *m_info;
+extern VesaInfo vi;
+
+extern int16 clipx1, clipx2, clipy1, clipy2;
+extern int16 gcurx, gcury, fvorx, fvory;
+extern int16 fontbr, fonth;
+extern int16 scr_w, scr_h;
+extern int16 fontfirst, fontlast;
+extern char writemode;
+
+extern char MausMode;
+extern char enter_key;
+extern char escape_key;
+extern char einfuegen;
+
+extern int16 crlfx, crlfy;
+extern int16 r_gef, r_end;
+extern int16 *rlist;
+extern byte pal_table[768];
+extern bool mono;
+extern uint8 svga;
+
 
 void init_mcga();
 void old_mode();
@@ -87,115 +112,6 @@ uint8 joystick();
 void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
 
-class mcga_grafik {
-public:
-	mcga_grafik();
-	~mcga_grafik();
-
-	void init();
-	void restore_mode();
-	void set_writemode(char wm);
-	void init_mausmode(maus_info *minfo);
-	void exit_mausmode();
-
-	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
-	void vsync_start();
-	void vsync_end();
-	void hsync_start();
-	void hsync_end();
-	void skip_line(int16 lines);
-	void skip_frame(int16 frames);
-	void setze_zeiger(byte *ptr);
-	byte *get_zeiger();
-	void set_bildbreite(int16 breite);
-
-	void set_mono();
-	void calc_mono(byte *pal, int16 startcol, int16 anz);
-	void set_palette(byte *palette);
-	void palette_save(byte *pal);
-	void rest_palette();
-	void raster_col(int16 c, int16 r, int16 g, int16 b);
-	void einblenden(byte *palette, int16 frames);
-	void aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen,
-	               int16 frames);
-	void ausblenden(int16 frames);
-	void abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames);
-	void set_teilpalette(byte *palette, int16 startcol, int16 anz);
-
-	void cls();
-	void punkt(int16 xpos, int16 ypos, int16 farbn);
-	uint8 get_pixel(int16 xpos, int16 ypos);
-	void linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
-	void box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
-	void box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
-	void pop_box(int16 x, int16 y, int16 x1, int16 y1,
-	             int16 col1, int16 col2, int16 back_col);
-	void kreis(int16 x, int16 y, int16 r, int16 farbe);
-	void fkreis(int16 x, int16 y, int16 r, int16 farbe);
-
-#ifdef EFFEKTE
-	void upscroll();
-	void downscroll();
-	void leftscroll();
-	void rightscroll();
-	void set_dispoff(int16 offset);
-	void seit_in(byte *source);
-	void falling_in(byte *source);
-	void ueberblend(byte *source);
-	void y_shrumpf(byte *source, byte *dest, int16 faktor,
-	               int16 zeile);
-#endif
-
-	void back2screen(byte *ptr);
-	void back2screen_maskiert(byte *ptr, int16 maske);
-	void screen2back(byte *ptr);
-	void back2back(byte *ptr1, byte *ptr2);
-	void back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske);
-
-	void sprite_save(byte *sptr, int16 x, int16 y, int16 breite,
-	                 int16 hoehe, int16 scrwidth);
-	void blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth);
-	void sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth);
-	void scale_image(byte *source, byte *dest, int16 xdiff,
-	                 int16 ydiff);
-	void scale_set(byte *sptr, int16 x, int16 y, int16 xdiff,
-	               int16 ydiff, int16 scrwidth);
-	void map_spr2screen(byte *sptr, int16 x, int16 y);
-
-	void set_fontadr(byte *adr);
-	void plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
-	                   char cursor);
-	int16 scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth, const char *string, ...);
-	void printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
-	             const char *format, ...);
-	void speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
-	                   int16 scrwidth, char *string);
-	void print(int16 forcol, int16 backcol, int16 scrwidth, char *format, ...);
-	void printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
-	              int16 scrwidth, char *format, ...);
-	void printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
-	                 int16 scrwidth);
-	void printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
-	void vorschub();
-	void set_vorschub(int16 x, int16 y);
-	void move(int16 x, int16 y);
-	void get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth);
-
-	int16 get_vesa_info(uint16 mode, byte *info_blk);
-	void init(uint16 mode, byte *info_blk, byte *vscreen);
-	void update_screen();
-private:
-	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
-	int16 devices();
-	float sinus[360];
-	float cosinus[360];
-
-	void ltoa(long N, char *str, int base);
-	void ultoa(uint32 N, char *str, int base);
-	void itoa(int N, char *str, int base);
-
-};
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
new file mode 100644
index 00000000000..540ee2d0885
--- /dev/null
+++ b/engines/chewy/mcga_grafik.cpp
@@ -0,0 +1,1696 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/chewy.h"
+#include "chewy/mcga_grafik.h"
+#include "chewy/mcga.h"
+
+namespace Chewy {
+
+#define SETZEN 0
+#define UND 1
+#define ODER 2
+#define XODER 3
+#define GRAFIK 1
+#define SPEICHER 2
+#define DATEI 3
+#define MAXSTRING 255
+
+void mcga_grafik::ltoa(long N, char *str, int base) {
+	sprintf(str, "%ld", N);
+}
+
+void mcga_grafik::ultoa(uint32 N, char *str, int base) {
+	sprintf(str, "%u", N);
+}
+
+void mcga_grafik::itoa(int N, char *str, int base) {
+	sprintf(str, "%d", N);
+}
+
+bool kbhit() {
+	warning("STUB: kbhit()");
+
+	return false;
+}
+
+char getch() {
+	warning("STUB: getch()");
+
+	return ' ';
+}
+
+void putch(char c) {
+	warning("STUB: putch()");
+}
+
+/*------------------------------------------------------*/
+
+mcga_grafik::mcga_grafik() {
+	int16 i;
+
+#if 0
+	char *enstr;
+
+	char a[] = {92, 85, 97, 59, 96, 83, 100, 83, 79, 90, 0}; // "NGS-REVEAL"
+	char b[] = {85, 96, 79, 94, 86, 87, 81, 97, 109, 82, 96, 87, 100, 83, 96, 109,
+		54, 81, 55, 109, 92, 83, 101, 109, 85, 83, 92, 83, 96, 79, 98, 87, 93, 92,
+		109, 97, 93, 84, 98, 101, 79, 96, 83, 0 }; // "GRAPHICS_DRIVER_(C)_NEW_GENERATION_SOFTWARE"
+	for (i = 0; a[i] != 0; i++)
+		a[i] -= 14;
+	for (i = 0; b[i] != 0; i++)
+		b[i] -= 14;
+	enstr = (char *)getenv(a);
+	if (enstr) {
+		printf(b);
+		printf("\n");
+		delay(800);
+	}
+#endif
+
+	for (i = 0; i < 360; i++) {
+		sinus[i] = sin(i * 3.14159265359 / 180);
+		cosinus[i] = cos(i * 3.14159265359 / 180);
+	}
+	scr_w = 0;
+	scr_h = 200;
+	mono = false;
+	MausMode = false;
+}
+mcga_grafik::~mcga_grafik() {
+}
+
+void mcga_grafik::init() {
+	scr_w = 320;
+	scr_h = 200;
+	init_mcga();
+}
+
+void mcga_grafik::set_writemode(char wm) {
+	writemode = wm;
+}
+
+void mcga_grafik::restore_mode() {
+	old_mode();
+}
+
+void mcga_grafik::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
+	clipx1 = x1;
+	clipx2 = x2;
+	clipy1 = y1;
+	clipy2 = y2;
+}
+
+void mcga_grafik::vsync_start() {
+	vflyback_start();
+}
+
+void mcga_grafik::vsync_end() {
+	vflyback_end();
+}
+
+void mcga_grafik::hsync_start() {
+	hflyback_start();
+}
+
+void mcga_grafik::hsync_end() {
+	hflyback_end();
+}
+
+void mcga_grafik::skip_frame(int16 frames) {
+	int16 i = 0;
+	for (i = 0; i < frames; i++) {
+		vflyback_start();
+		vflyback_end();
+	}
+}
+
+void mcga_grafik::skip_line(int16 lines) {
+	int16 i = 0;
+	for (i = 0; i < lines; i++) {
+		hflyback_start();
+		hflyback_end();
+	}
+}
+
+void mcga_grafik::setze_zeiger(byte *ptr) {
+	set_pointer(ptr);
+}
+
+byte *mcga_grafik::get_zeiger() {
+	return get_dispoff();
+}
+
+void mcga_grafik::set_bildbreite(int16 breite) {
+	scr_w = breite;
+	if (!scr_w)
+		scr_w = 320;
+}
+
+void mcga_grafik::set_mono() {
+	mono = true;
+}
+
+void mcga_grafik::calc_mono(byte *pal, int16 startcol, int16 anz) {
+	int16 i, k;
+	uint8 r, g, b, grau;
+	k = startcol * 3;
+	for (i = 0; i < anz; i++) {
+		r = pal[k];
+		g = pal[k + 1];
+		b = pal[k + 2];
+		grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
+		pal[k] = grau;
+		pal[k + 1] = grau;
+		pal[k + 2] = grau;
+		k += 3;
+	}
+}
+
+void mcga_grafik::set_palette(byte *palette) {
+	int16 i;
+	for (i = 0; i < 768; i++)
+		pal_table[i] = palette[i];
+	if (mono)
+		calc_mono(palette, 0, 256);
+	setpalette(palette);
+}
+
+void mcga_grafik::palette_save(byte *pal) {
+	save_palette(pal);
+}
+
+void mcga_grafik::rest_palette() {
+	restore_palette();
+}
+
+void mcga_grafik::raster_col(int16 c, int16 r, int16 g, int16 b) {
+	int16 index;
+	index = c * 3;
+	pal_table[index] = r;
+	pal_table[index + 1] = g;
+	pal_table[index + 2] = b;
+	if (mono)
+		calc_mono(pal_table, c, 1);
+	rastercol(c, r, g, b);
+}
+
+void mcga_grafik::einblenden(byte *palette, int16 frames) {
+	int16 i, j, k;
+	int16 r, g, b;
+	int16 r1, g1, b1;
+	if (mono)
+		calc_mono(palette, 0, 256);
+	for (j = 63; j >= 0; j--) {
+		k = 0;
+		for (i = 0; i < 256; i++) {
+			r = palette[k];
+			g = palette[k + 1];
+			b = palette[k + 2];
+			r1 = r - j;
+			g1 = g - j;
+			b1 = b - j;
+			if ((r1 > 0) && (r1 <= r))
+				pal_table[k] = r1;
+			if ((g1 > 0) && (r1 <= r))
+				pal_table[k + 1] = g1;
+			if ((b1 > 0) && (r1 <= r))
+				pal_table[k + 2] = b1;
+			k += 3;
+		}
+		setpalette(pal_table);
+		if (frames)
+			skip_frame(frames);
+	}
+}
+
+void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
+                            frames) {
+	int16 i = 0, j, k;
+	int16 r, g, b;
+	int16 endcol = 0;
+	if (mono)
+		calc_mono(palette, startcol, anz);
+	endcol = startcol + anz;
+	for (j = stufen; j >= 0; j--) {
+		endcol = startcol + anz;
+		k = startcol * 3;
+		for (i = startcol; i < endcol; i++) {
+			r = pal_table[k];
+			g = pal_table[k + 1];
+			b = pal_table[k + 2];
+			if ((r + 1) <= palette[k]) ++r;
+			if ((g + 1) <= palette[k + 1]) ++g;
+			if ((b + 1) <= palette[k + 2]) ++b;
+			pal_table[k] = r;
+			pal_table[k + 1] = g;
+			pal_table[k + 2] = b;
+			k += 3;
+		}
+		set_palpart(pal_table, startcol, anz);
+		if (frames)
+			skip_frame(frames);
+	}
+}
+
+void mcga_grafik::ausblenden(int16 frames) {
+	int16 i, j, k;
+	int16 r, g, b;
+	for (j = 0; j < 64; j++) {
+		k = 0;
+		for (i = 0; i < 256; i++) {
+			r = pal_table[k];
+			g = pal_table[k + 1];
+			b = pal_table[k + 2];
+			if (r > 0) --r;
+			if (g > 0) --g;
+			if (b > 0) --b;
+			pal_table[k] = r;
+			pal_table[k + 1] = g;
+			pal_table[k + 2] = b;
+			k += 3;
+		}
+		setpalette(pal_table);
+		if (frames)
+			skip_frame(frames);
+	}
+}
+
+void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
+	int16 i, j, k;
+	int16 r, g, b;
+	int16 endcol = 0;
+	endcol = startcol + anz;
+	for (j = 0; j < stufen; j++) {
+		k = startcol * 3;
+		for (i = startcol; i < endcol; i++) {
+			r = pal_table[k];
+			g = pal_table[k + 1];
+			b = pal_table[k + 2];
+			if (r > 0) --r;
+			if (g > 0) --g;
+			if (b > 0) --b;
+			pal_table[k] = r;
+			pal_table[k + 1] = g;
+			pal_table[k + 2] = b;
+			k += 3;
+		}
+		set_palpart(pal_table, startcol, anz);
+		if (frames)
+			skip_frame(frames);
+	}
+}
+
+void mcga_grafik::set_teilpalette(byte *palette, int16 startcol, int16 anz) {
+	int16 i;
+	int16 k, endcol;
+	k = startcol * 3;
+	endcol = startcol + anz;
+	for (i = startcol; i < endcol; i++) {
+		pal_table[k] = palette[k];
+		pal_table[k + 1] = palette[k + 1];
+		pal_table[k + 2] = palette[k + 2];
+		k += 3;
+	}
+	if (mono)
+		calc_mono(pal_table, startcol, anz);
+	set_palpart(pal_table, startcol, anz);
+}
+
+void mcga_grafik::cls() {
+	clear_mcga();
+}
+
+void mcga_grafik::punkt(int16 xpos, int16 ypos, int16 farbn) {
+	setpixel_mcga(xpos, ypos, farbn);
+}
+
+uint8 mcga_grafik::get_pixel(int16 xpos, int16 ypos) {
+	uint8 pix;
+	pix = getpix(xpos, ypos);
+	return (pix);
+}
+
+void mcga_grafik::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+	line_mcga(x1, y1, x2, y2, farbe);
+}
+
+void mcga_grafik::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+	line_mcga(x1, y1, x2, y1, farbe);
+	line_mcga(x1, y2 - 1, x2, y2 - 1, farbe);
+	line_mcga(x1, y1, x1, y2, farbe);
+	line_mcga(x2, y1, x2, y2, farbe);
+}
+
+void mcga_grafik::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+	int16 h, i;
+	if (x2 == x1)x2++;
+	h = abs(y2 - y1);
+	if (h == 0)
+		h = 1;
+	for (i = 0; i < h; i++)
+		line_mcga(x1, y1 + i, x2, y1 + i, farbe);
+}
+
+void mcga_grafik::pop_box(int16 x, int16 y, int16 x1, int16 y1,
+                          int16 col1, int16 col2, int16 back_col) {
+	if (back_col < 255)
+		box_fill(x, y, x1, y1, back_col);
+	linie(x, y1, x1, y1, col2);
+	linie(x1, y, x1, y1, col2);
+	linie(x, y, x1, y, col1);
+	linie(x, y, x, y1 + 1, col1);
+}
+
+void mcga_grafik::kreis(int16 x, int16 y, int16 r, int16 farbe) {
+	int16 a = 0, b = 0, alt = 0, diff;
+	int16 w, i;
+	for (w = 0; w <= 91; w++) {
+		a = (int16)(sinus[w] * ((float)r * 0.85));
+		if ((a - alt) > 1) {
+			diff = a - alt;
+			for (i = 0; i <= diff; i++) {
+				setpixel_mcga(x - b, (y - (alt + i)), farbe);
+				setpixel_mcga(x + b, (y - (alt + i)), farbe);
+				setpixel_mcga(x - b, (y + (alt + i)), farbe);
+				setpixel_mcga(x + b, (y + (alt + i)), farbe);
+			}
+		}
+		b = (int16)(cosinus[w] * (float)r);
+		setpixel_mcga(x - b, y - a, farbe);
+		setpixel_mcga(x + b, y - a, farbe);
+		setpixel_mcga(x - b, y + a, farbe);
+		setpixel_mcga(x + b, y + a, farbe);
+		alt = a;
+	}
+}
+
+void mcga_grafik::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
+	int16 a = 0, b = 0, alt = 0, i = 0, diff;
+	int16 w;
+	for (w = 0; w <= 90; w++) {
+		a = (int16)(sinus[w] * ((float)r * 0.85));
+		if ((a - alt) > 1) {
+			diff = a - alt;
+			for (i = 0; i < diff; i++) {
+				line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
+				line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
+			}
+		}
+		b = (int16)(cosinus[w] * ((float)r));
+		line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
+		line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
+		alt = a;
+	}
+}
+
+#ifdef EFFEKTE
+void mcga_grafik::seit_in(char *source) {
+	split_in(source);
+}
+
+void mcga_grafik::falling_in(char *source) {
+	fall_in(source);
+}
+
+void mcga_grafik::ueberblend(char *source) {
+	over_in(source);
+}
+
+void mcga_grafik::y_shrumpf(char *source, char *dest, int16 faktor,
+                            int16 zeile) {
+	y_shrink(source, dest, faktor, zeile);
+}
+#endif
+
+void mcga_grafik::back2screen(byte *ptr) {
+	mem2mcga(ptr);
+}
+
+void mcga_grafik::back2back(byte *ptr1, byte *ptr2) {
+	mem2mem(ptr1, ptr2);
+}
+
+void mcga_grafik::back2screen_maskiert(byte *ptr, int16 maske) {
+	mem2mcga_masked(ptr, maske);
+}
+
+void mcga_grafik::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
+	mem2mem_masked(ptr1, ptr2, maske);
+}
+
+void mcga_grafik::screen2back(byte *ptr) {
+	mcga2mem(ptr);
+}
+
+void mcga_grafik::sprite_save(byte *sptr, int16 x,
+                              int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
+	if (breite < 4)breite = 4;
+	if (hoehe <= 0)hoehe = 1;
+	if (x < clipx1) {
+		x = clipx1;
+		breite -= (clipx1 - x);
+	}
+	if ((x + breite) > clipx2 + 1)
+		breite = clipx2 - x;
+	if (y < clipy1) {
+		y = clipy1;
+		hoehe -= (clipy1 - y);
+	}
+	if ((y + hoehe) > clipy2 + 1)
+		hoehe = clipy2 - y;
+	if (breite < 1)breite = 0;
+	if (hoehe <= 0)hoehe = 0;
+	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
+}
+
+void mcga_grafik::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+	mspr_set_mcga(sptr, x, y, scrwidth);
+}
+
+void mcga_grafik::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+	spr_set_mcga(sptr, x, y, scrwidth);
+}
+
+void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
+	int16 br, h;
+	br = ((int16 *)sptr)[0];
+	h = ((int16 *)sptr)[1];
+	if ((br >= 320) || (h >= 200))
+		map_spr_2screen(sptr, x, y);
+}
+
+void mcga_grafik::set_fontadr(byte *adr) {
+	tff_header *tff;
+	tff = (tff_header *) adr;
+	setfont(adr + sizeof(tff_header), (int16)tff->width, (int16)tff->height,
+	        (int16)tff->first, (int16)tff->last);
+	fvorx = (int16)tff->width;
+	fvory = 0;
+}
+
+int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
+                          const char *string, ...) {
+	int16 i, j, stelle, stellemax, mode = 0;
+	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
+	int16 ret = 0;
+	int16 delay_flag;
+	char ende = 0, zeichen, zaehler, cursor_z;
+	char zstring[81], z1string[81];
+	char einfuege_cur = 0;
+	char char_anf = 0, char_end = 0;
+	uint16 vorzeichen = 0;
+	char x_mode = 0;
+	char eing = 0;
+	uint16 izahl = 0;
+	uint16 *intzahl = nullptr;
+	int16 *intzahl1 = nullptr;
+	uint32 *longzahl = nullptr;
+	char *charstr = nullptr;
+	uint32 luzahl;
+	va_list parptr;
+	va_start(parptr, string);
+	if ((x == -1) || (y == -1)) {
+		x = gcurx;
+		y = gcury;
+	} else {
+		gcurx = x;
+		gcury = y;
+	}
+	move(x, y);
+	i = 0;
+	while (!ende) {
+		zeichen = string[i];
+		++i;
+
+		if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+			if (zeichen == '%') {
+
+				zeichen = string[i];
+				++i;
+				zaehler = 0;
+
+				if (zeichen == '[') {
+					char_anf = string[i];
+					++i;
+					++i;
+					char_end = string[i];
+					++i;
+					++i;
+					zeichen = string[i];
+					++i;
+				}
+
+				while ((zeichen >= '0') && (zeichen <= '9')) {
+					zaehler *= 10;
+					zaehler += (zeichen - 48);
+					if (zaehler > 80)
+						zaehler = 80;
+					zeichen = string[i];
+					++i;
+				}
+				if (einfuegen == 1) {
+					einfuege_cur = 125;
+					cursor_z = '_' + einfuege_cur;
+				} else {
+					einfuege_cur = 0;
+					cursor_z = '_';
+				}
+
+				switch (zeichen) {
+				case 'd':
+					vorzeichen = '-';
+				case 'u':
+					if ((char_anf == 0) && (char_end == 0)) {
+						char_anf = '0';
+						char_end = '9';
+					}
+					if (!zaehler)
+						zaehler = 4;
+					if (zeichen == 'd') {
+						mode = 4;
+						intzahl1 = va_arg(parptr, int16 *);
+						luzahl = intzahl1[0];
+					} else {
+						mode = 1;
+						intzahl = va_arg(parptr, uint16 *);
+						luzahl = intzahl[0];
+					}
+					if (luzahl != 0)
+						ltoa(luzahl, zstring, 10);
+					else {
+						zstring[0] = '0';
+						zstring[1] = 0 ;
+					}
+					break;
+				case 'l':
+					vorzeichen = '-';
+					if ((char_anf == 0) && (char_end == 0))
+						vorzeichen = '-';
+					{
+						char_anf = '0';
+						char_end = '9';
+					}
+					mode = 2;
+					if (!zaehler)
+						zaehler = 9;
+					longzahl = va_arg(parptr, uint32 *);
+					luzahl = longzahl[0];
+					if (luzahl != 0)
+						ultoa(luzahl, zstring, 10);
+					else {
+						zstring[0] = '0';
+						zstring[1] = 0 ;
+					}
+					break;
+				case 's':
+					if ((char_anf == 0) && (char_end == 0)) {
+						char_anf = ' ';
+						char_end = '\xdc';
+					}
+					mode = 3;
+					vorzeichen = 0xFF;
+					if (!zaehler)
+						zaehler = 81;
+					charstr = va_arg(parptr, char *);
+					strcpy(zstring, charstr);
+					break;
+				}
+				zeichen = string[i];
+				++i;
+				if (zeichen == 'x') {
+					x_mode = 1;
+					zeichen = string[i];
+					++i;
+				}
+				disp_stellemax = 0;
+
+				while ((zeichen >= '0') && (zeichen <= '9')) {
+					disp_stellemax *= 10;
+					disp_stellemax += (zeichen - 48);
+					if (disp_stellemax > 80)
+						disp_stellemax = 80;
+					zeichen = string[i];
+					++i;
+				}
+				if (!disp_stellemax)
+					disp_stellemax = zaehler;
+
+				stelle = 0;
+				disp_stelle = 0;
+				while (zstring[stelle] != 0) {
+					++stelle;
+				}
+				stellemax = stelle;
+				if (stelle > disp_stellemax) {
+					disp_stelle = stelle - disp_stellemax;
+					disp_akt = disp_stellemax;
+				} else {
+					disp_akt = stelle;
+					disp_stelle = 0;
+				}
+				for (j = stelle; j < j + 1; j++) {
+					while ((!kbhit()) || (eing != 0)) {
+
+						eing = 0;
+						move(x, y);
+						vsync_start();
+						for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
+							if (zstring[i] != 0) {
+								putz(zstring[i], fcol, bcol, scrwidth);
+								vors();
+							} else {
+								putz(zstring[i], fcol, bcol, scrwidth);
+								vors();
+								break;
+							}
+						}
+						if (svga == ON)
+							upd_scr();
+						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
+
+						{
+							skip_frame(1);
+							izahl = devices();
+							if (izahl == 13) {
+								eing = 2;
+								break;
+							} else if (izahl == 27) {
+								eing = 2;
+								break;
+							}
+						}
+						plot_scan_cur((x + (disp_akt)*fvorx), gcury, cur_col, 300, scrwidth, cursor_z);
+						if (svga == ON)
+							upd_scr();
+						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
+
+						{
+							skip_frame(1);
+							izahl = devices();
+							if (izahl == 13) {
+								eing = 2;
+								break;
+							} else if (izahl == 27) {
+								eing = 2;
+								break;
+							}
+						}
+						if (eing == 2)
+							break;
+					}
+					if (eing < 2)
+						izahl = (uint16)getch();
+					if (izahl == 13) {
+
+						ret = 13;
+						ende = 1;
+						break;
+					}
+					if (izahl == 27) {
+
+						ret = 27;
+						ende = 2;
+						break;
+					}
+
+					if (izahl == 8) {
+						eing = 1;
+						while (kbhit())
+							getch();
+						if (stelle > 0) {
+							strcpy(zstring + stelle - 1, zstring + stelle);
+							plot_scan_cur((x + disp_akt * fvorx), gcury, bcol, bcol, scrwidth, cursor_z);
+							if (svga == ON)
+								upd_scr();
+							--stelle;
+							--stellemax;
+							if (disp_stelle > 0)
+								--disp_stelle;
+							else if (disp_akt > 0) {
+								--disp_akt;
+							}
+						} else
+							putch(7);
+					}
+
+					if (izahl == 0) {
+						izahl = getch();
+
+						if (izahl == 75) {
+							while (kbhit())
+								getch();
+							eing = 1;
+							if (stelle <= 0) {
+								putch(7);
+								stelle = 0;
+
+							} else {
+								if (disp_akt > 0) {
+									--disp_akt;
+								} else {
+									if (disp_stelle > 0)
+										--disp_stelle;
+								}
+								--stelle;
+							}
+						}
+
+						if (izahl == 77) {
+							eing = 1;
+							while (kbhit())
+								getch();
+							++j;
+							if (stelle >= stellemax) {
+								stelle = stellemax;
+								putch(7);
+							} else {
+								if (disp_akt < disp_stellemax) {
+									++disp_akt;
+								} else {
+									if (disp_stelle <= (zaehler - disp_stellemax)) {
+										++disp_stelle;
+									}
+								}
+								++stelle;
+							}
+						}
+
+						if (izahl == 71) {
+							stelle = 0;
+							disp_akt = 0;
+							disp_stelle = 0;
+						}
+
+						if (izahl == 79) {
+							stelle = stellemax;
+							if (stellemax < disp_stellemax) {
+								disp_stelle = 0;
+								disp_akt = stellemax;
+							}
+							else {
+								disp_akt = disp_stellemax;
+								disp_stelle = stelle - disp_stellemax;
+							}
+						}
+
+						if ((izahl == 83) && (stelle < stellemax)) {
+							while (kbhit())
+								getch();
+							eing = 1;
+							strcpy(zstring + stelle, zstring + stelle + 1);
+							--stellemax;
+						}
+
+						if (izahl == 82) {
+							//delay(200);
+							if (!einfuegen) {
+								einfuegen = 1;
+								einfuege_cur = 125;
+								cursor_z = '_' + einfuege_cur;
+							} else {
+								einfuegen = 0;
+								einfuege_cur = 0;
+								cursor_z = '_';
+							}
+						}
+						izahl = 0;
+					}
+
+					if (izahl < char_anf || izahl > char_end) {
+						if (vorzeichen == izahl && !stelle);
+						else {
+							if (x_mode == 1) {
+								ende = 1;
+								ret = izahl;
+								break;
+							}
+							continue;
+						}
+					}
+					if ((stelle == stellemax) && (stellemax >= zaehler)) {
+						stellemax = zaehler;
+						putch(7);
+					} else {
+
+						if (disp_akt < disp_stellemax) {
+							++disp_akt;
+						} else {
+							if (disp_stelle <= (zaehler - disp_stellemax)) {
+								++disp_stelle;
+								disp_akt = disp_stellemax;
+							}
+						}
+						if (!einfuegen) {
+							zstring[stelle] = izahl;
+							zstring[stellemax + 1] = 0;
+							if (stelle == stellemax) {
+								++stelle;
+								++stellemax;
+							} else {
+								++stelle;
+							}
+						}
+						else {
+							strcpy(z1string, zstring);
+							strcpy(zstring + stelle + 1, z1string + stelle);
+							zstring[stelle] = izahl;
+							zstring[(int)zaehler] = 0;
+							if (stellemax < zaehler) {
+								++stelle;
+								++stellemax;
+							} else {
+								++stelle;
+							}
+						}
+					}
+					if (x_mode == 1) {
+						ende = 1;
+						ret = izahl;
+
+						break;
+					}
+				}
+			}
+
+		}
+	}
+
+	move(x, y);
+	for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
+		if (zstring[i] != 0) {
+			putz(zstring[i], fcol, bcol, scrwidth);
+			vors();
+		} else {
+			putz(zstring[i], fcol, bcol, scrwidth);
+			vors();
+			break;
+		}
+	}
+	switch (ende) {
+
+	case 1:
+		switch (mode) {
+		case 1:
+			intzahl[0] = atoi(zstring);
+			break;
+		case 2:
+			longzahl[0] = atol(zstring);
+			break;
+		case 3:
+			strcpy(charstr, zstring);
+			break;
+		case 4:
+			intzahl1[0] = atoi(zstring);
+			break;
+		}
+		break;
+
+	case 2:
+		break;
+	}
+	if (svga == ON)
+		upd_scr();
+	return (ret);
+}
+
+void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
+                                char cursor_z) {
+	move(x, y);
+	putz(cursor_z, fcol, bcol, scrwidth);
+}
+
+void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
+                          const char *string, ...) {
+	int16 i = 0, k = 0, l;
+	char zeichen, zstring[35];
+	int16 izahl;
+	int16 count, diff;
+	uint16 uzahl;
+	long lzahl;
+	uint32 luzahl;
+	char *tempptr;
+	va_list parptr;
+	va_start(parptr, string);
+	crlfx = x;
+	crlfy = y + (int16)fonth + 2;
+	gcurx = x;
+	gcury = y;
+	i = 0;
+	do {
+		zeichen = string[i];
+		++i;
+		if ((zeichen < 32) || (zeichen == 127)) {
+			switch (zeichen) {
+			case 8:
+				gcurx -= fvorx;
+				gcury -= fvory;
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			case 10:
+				gcury = crlfy;
+				gcurx = crlfx;
+				crlfx = gcurx;
+				crlfy = gcury + fonth + 2;
+				break;
+
+			case 13:
+				gcurx = crlfx;
+				break;
+
+			case 127 :
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			default :
+				if (zeichen >= fontfirst)
+					putz(zeichen, forcol, backcol, scrwidth);
+				break;
+			}
+		}
+		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
+			if (zeichen != '%') {
+				putz(zeichen, forcol, backcol, scrwidth);
+				vors();
+			}
+			else {
+				zeichen = string[i];
+				count = 0;
+				if ((zeichen >= 0x30) && (zeichen <= 0x39))
+					count = atoi(string + i);
+				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
+					++i;
+					zeichen = string[i];
+				}
+				++i;
+				switch (zeichen) {
+				case '%':
+					putz(zeichen, forcol, backcol, scrwidth);
+					vors();
+					break;
+
+				case 'd':
+				case 'u':
+					if (zeichen == 'd') {
+						izahl = va_arg(parptr, int);
+						itoa(izahl, zstring, 10);
+					} else {
+						uzahl = va_arg(parptr, unsigned int);
+						itoa(uzahl, zstring, 10);
+					}
+					k = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 'l':
+					if (string[i] != 'u') {
+						lzahl = va_arg(parptr, long);
+						ltoa(lzahl, zstring, 10);
+					} else {
+						luzahl = va_arg(parptr, uint32);
+						ultoa(luzahl, zstring, 10);
+						++i;
+					}
+					k = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 's':
+					tempptr = va_arg(parptr, char *);
+					if (!count) {
+						while (*tempptr != 0) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					}
+					else {
+						for (l = 0; l < count; l++) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					}
+					break;
+
+				}
+			}
+		}
+	} while ((i < MAXSTRING) && (zeichen != 0));
+}
+
+void mcga_grafik::speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
+                                int16 scrwidth, char *string) {
+	int16 i = 0;
+	char zeichen;
+	gcurx = x;
+	gcury = y;
+	i = 0;
+	do {
+		zeichen = string[i];
+		++i;
+		if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
+			putz(zeichen, forcol, backcol, scrwidth);
+			vors();
+		}
+	} while ((i < MAXSTRING) && (zeichen != 0));
+}
+
+void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *string, ...) {
+	int16 i = 0, k = 0, l;
+	char zeichen, zstring[35];
+	char *tempptr;
+	int16 izahl, count, diff;
+	uint16 uzahl;
+	long lzahl;
+	uint32 luzahl;
+	va_list parptr;
+	va_start(parptr, string);
+	crlfx = gcurx;
+	crlfy = gcury + fonth + 2;
+	i = 0;
+	do {
+		zeichen = string[i];
+		++i;
+		if ((zeichen > 0 && zeichen < 32) || (zeichen == 127)) {
+			switch (zeichen) {
+			case 8:
+				gcurx -= fvorx;
+				gcury -= fvory;
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			case 10:
+				gcury = crlfy;
+				gcurx = crlfx;
+				crlfx = gcurx;
+				crlfy = gcury + fonth + 2;
+				break;
+
+			case 13:
+				gcurx = crlfx;
+				break;
+
+			case 127 :
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			default :
+				if (zeichen >= fontfirst) {
+					putz(zeichen, forcol, backcol, scrwidth);
+					vors();
+				}
+				break;
+			}
+		} else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 0)) {
+			if (zeichen != '%') {
+				putz(zeichen, forcol, backcol, scrwidth);
+				vors();
+			} else {
+				zeichen = string[i];
+				count = 0;
+				if ((zeichen >= 0x30) && (zeichen <= 0x39))
+					count = atoi(string + i);
+				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
+					++i;
+					zeichen = string[i];
+				}
+				++i;
+				switch (zeichen) {
+				case '%':
+					putz(zeichen, forcol, backcol, scrwidth);
+					vors();
+					break;
+
+				case 'd':
+				case 'u':
+					if (zeichen == 'd') {
+						izahl = va_arg(parptr, int);
+						itoa(izahl, zstring, 10);
+					} else {
+						uzahl = va_arg(parptr, unsigned int);
+						itoa(uzahl, zstring, 10);
+					}
+					k = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 'l':
+					if (string[i] != 'u') {
+						lzahl = va_arg(parptr, long);
+						ltoa(lzahl, zstring, 10);
+					} else {
+						luzahl = va_arg(parptr, unsigned long);
+						ultoa(luzahl, zstring, 10);
+						++i;
+					}
+					k = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 's':
+					tempptr = va_arg(parptr, char *);
+					if (!count) {
+						while (*tempptr != 0) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					} else {
+						for (l = 0; l < count; l++) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					}
+
+					break;
+
+				}
+			}
+		}
+	} while ((i < MAXSTRING) && (zeichen != 0));
+}
+
+void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
+                           int16 scrwidth, char *string, ...) {
+	int16 i = 0, k = 0, l;
+	char zeichen, zstring[35];
+	char *tempptr;
+	int16 izahl, count, diff;
+	uint16 uzahl;
+	long lzahl;
+	uint32 luzahl;
+	va_list parptr;
+	va_start(parptr, string);
+	gcurx = x;
+	gcury = y;
+	crlfx = gcurx;
+	crlfy = y + fonth + 2;
+	for (i = 0; i < menge;) {
+		zeichen = string[i];
+		++i;
+		if ((zeichen < 32) || (zeichen == 127)) {
+			switch (zeichen) {
+			case 8:
+				gcurx -= fvorx;
+				gcury -= fvory;
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			case 10:
+				gcury = crlfy;
+				gcurx = crlfx;
+				crlfx = gcurx;
+				crlfy = gcury + fonth + 2;
+				break;
+
+			case 13:
+				gcurx = crlfx;
+				break;
+
+			case 127 :
+				putz(32, forcol, backcol, scrwidth);
+				break;
+
+			default :
+				if (zeichen >= fontfirst)
+					putz(zeichen, forcol, backcol, scrwidth);
+				break;
+			}
+		}
+		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
+			if (zeichen != '%') {
+				putz(zeichen, forcol, backcol, scrwidth);
+				vors();
+			}
+			else {
+				zeichen = string[i];
+				count = 0;
+				if ((zeichen >= 0x30) && (zeichen <= 0x39))
+					count = atoi(string + i);
+				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
+					++i;
+					zeichen = string[i];
+				}
+				++i;
+				switch (zeichen) {
+				case '%':
+					putz(zeichen, forcol, backcol, scrwidth);
+					vors();
+					break;
+
+				case 'd':
+				case 'u':
+					if (zeichen == 'd') {
+						izahl = va_arg(parptr, int);
+						itoa(izahl, zstring, 10);
+					} else {
+						uzahl = va_arg(parptr, unsigned int);
+						itoa(uzahl, zstring, 10);
+					}
+					k = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 'l':
+					if (string[i] != 'u') {
+						lzahl = va_arg(parptr, long);
+						ltoa(lzahl, zstring, 10);
+					} else {
+						luzahl = va_arg(parptr, uint32);
+						ultoa(luzahl, zstring, 10);
+						++i;
+					} k
+					    = 0;
+					if (count) {
+						diff = check_stellen_anz(zstring, &k, count);
+						for (l = 0; l < diff; l++) {
+							putz(0x30, forcol, backcol, scrwidth);
+							vors();
+						}
+					}
+					while (zstring[k] != 0) {
+						putz(zstring[k], forcol, backcol, scrwidth);
+						vors();
+						++k;
+					}
+					break;
+
+				case 's':
+					tempptr = va_arg(parptr, char *);
+					if (!count) {
+						while (*tempptr != 0) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					}
+					else {
+						for (l = 0; l < count; l++) {
+							putz(*tempptr, forcol, backcol, scrwidth);
+							++tempptr;
+							vors();
+						}
+					}
+
+					break;
+
+				}
+			}
+		}
+	}
+}
+
+void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
+                              int16 scrwidth) {
+	crlfx = x;
+	crlfy = y + fonth + 2;
+	if ((zeichen < 32) || (zeichen == 127)) {
+		switch (zeichen) {
+		case 8:
+			x -= fvorx;
+			y -= fvory;
+			putcxy(x, y, 32, forcol, backcol, scrwidth);
+			break;
+
+		case 10:
+			gcury = crlfy;
+			gcurx = crlfx;
+			crlfx = gcurx;
+			crlfy = gcury + fonth + 2;
+			break;
+
+		case 13:
+			gcurx = crlfx;
+			gcury = crlfy;
+			break;
+
+		case 127:
+			putcxy(x, y, 32, forcol, backcol, scrwidth);
+			break;
+		}
+	}
+	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+		putcxy(x, y, zeichen, forcol, backcol, scrwidth);
+		vors();
+	}
+}
+
+void mcga_grafik::printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+	crlfx = gcurx;
+	crlfy = gcury + fonth + 2;
+	if ((zeichen < 32) || (zeichen == 127)) {
+		switch (zeichen) {
+		case 8:
+			gcurx -= fvorx;
+			gcury -= fvory;
+			putz(32, forcol, backcol, scrwidth);
+			break;
+
+		case 10:
+			gcury = crlfy;
+			gcurx = crlfx;
+			crlfx = gcurx;
+			crlfy = gcury + fonth + 2;
+			break;
+
+		case 13:
+			gcurx = crlfx;
+			gcury = crlfy;
+			break;
+
+		case 127:
+			putz(32, forcol, backcol, scrwidth);
+			break;
+		}
+	}
+	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+		putz(zeichen, forcol, backcol, scrwidth);
+		vors();
+	}
+}
+
+void mcga_grafik::set_vorschub(int16 x, int16 y) {
+	if (fvorx != -255)
+		fvorx = x;
+	if (fvory != -255)
+		fvory = y;
+}
+
+void mcga_grafik::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
+	*vorx = fvorx;
+	*vory = fvory;
+	*fntbr = fontbr;
+	*fnth = fonth;
+}
+
+void mcga_grafik::vorschub() {
+	vors();
+}
+
+void mcga_grafik::move(int16 x, int16 y) {
+	gcurx = x;
+	gcury = y;
+}
+
+void mcga_grafik::init_mausmode(maus_info *minfo) {
+	MausMode = true;
+	m_info = minfo;
+}
+
+void mcga_grafik::exit_mausmode() {
+	MausMode = false;
+	m_info = 0;
+}
+
+int16 mcga_grafik::devices() {
+	int16 i;
+	i = 0;
+	if (MausMode != false) {
+		if (i > 1) {
+			i = 27;
+		} else if (i == 1)
+			i = 13;
+		else
+			i = 0;
+	}
+	return (i);
+}
+
+int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
+	int16 k, diff;
+	k = 0;
+	while (zstring[k] != 0)
+		++k;
+	if (k >= stellen) {
+		while ((k) && (stellen)) {
+			--k;
+			--stellen;
+		}
+		diff = 0;
+	} else {
+		diff = stellen - k;
+		k = 0;
+	}
+	*pos = k;
+	return (diff);
+}
+
+void mcga_grafik::scale_image(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
+	zoom_img(source, dest, xdiff_, ydiff_);
+}
+
+void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+	if ((xdiff_) || (ydiff_))
+		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
+	else
+		mspr_set_mcga(sptr, x, y, scrwidth);
+}
+
+void mcga_grafik::init(uint16 mode, byte *info_blk, byte *vscreen) {
+	if (!get_vesa_info(mode, info_blk)) {
+		init_svga(&vi, vscreen);
+		//delay(250);
+	}
+}
+
+void mcga_grafik::update_screen() {
+	if (svga == ON)
+		upd_scr();
+}
+
+int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
+	int16 error = 0;
+#if 0
+	vesa_status_block *vsb;
+	vesa_modus_block *vmb ;
+	uint16 vsb_seg, vsb_off;
+	char *tmp;
+	uint16 *code_list;
+	dword screensize;
+	int16 i;
+	uint16 akt_page;
+	uint16 StepGr;
+	error = 0;
+
+	vsb = (vesa_status_block *) iblk;
+	vmb = (vesa_modus_block *) iblk;
+	rr.eax = 0x4f00;
+	rr.edi = (dword)vsb & 15;
+	rr.es = (uint16)(((dword)vsb) >> 4);
+	FuNr = 0x10;
+	r_int();
+	if ((rr.eax != 0x4f) && (strnicmp((char *)vsb->id, "VESA", 4)))
+		error = 1;
+	if (!error) {
+		printf("VESA Version : %d.%d \n", vsb->ver_high, vsb->ver_low);
+		vsb_seg = (uint16)(((dword)vsb->name) >> 16);
+		vsb_off = (uint16)(((dword)vsb->name) & 0xffff);
+		tmp = (char *)((dword)vsb_seg << 4) + ((dword)vsb_off);
+		printf("Hersteller : %s \n", tmp);
+		if (vsb->ver_high >= 1)
+			printf("SPEICHER : %u * 64k = %uk\n", vsb->memory, vsb->memory << 6);
+		else
+			error = 1;
+	}
+
+	if (!error) {
+		vsb_seg = (uint16)(((dword)vsb->codenrs) >> 16);
+		vsb_off = (uint16)(((dword)vsb->codenrs) & 0xffff);
+		code_list = (uint16 *)(((dword)vsb_seg << 4) + ((dword)vsb_off));
+		while ((*code_list != mode) && (*code_list != 0xffff))
+			++code_list;
+		if (*code_list == 0xffff)
+			error = 1;
+	}
+	if (!error) {
+		printf("Mode %4x : ist verfügbar\n", mode);
+
+		memset(iblk, 0, sizeof(vesa_status_block));
+		rr.eax = 0x4f01;
+		rr.ecx = (dword) mode;
+		rr.edi = (dword)vmb & 15;
+		rr.es = (uint16)(((dword)vmb) >> 4);
+		FuNr = 0x10;
+		r_int();
+		if (rr.eax != 0x4f)
+			error = 1;
+		if (!error) {
+			vi.ModeNr = mode;
+			if (vmb->mflag & 1) {
+				if (vmb->mflag & 1)printf("Monitor kann Modus darstellen\n");
+				if (vmb->mflag & 2)printf("Optionale Infos geliefert\n");
+				if (vmb->mflag & 4)printf("BIOS-Textfunktionen möglich\n");
+				if (vmb->mflag & 0x8)printf("Farbmodus\n");
+				if (vmb->mflag & 0x10)printf("Grafikmodus\n");
+				if (vmb->fw_flag & 1) {
+					if (vmb->fw_flag & 4) {
+						vi.WriteWin = 0;
+						vi.WriteSeg = vmb->fw_seg;
+					}
+				}
+
+				if (vmb->fs_flag & 1) {
+					if (vmb->fs_flag & 4) {
+						vi.WriteWin = 1;
+						vi.WriteSeg = vmb->fs_seg;
+					}
+				}
+
+				switch (mode) {
+				case 0x100:
+					screensize = 640l * 400l;
+					scr_w = 640;
+					scr_h = 400;
+					break;
+
+				case 0x101:
+					screensize = 640l * 480l;
+					scr_w = 640;
+					scr_h = 480;
+					break;
+
+				case 0x102:
+					screensize = (800l * 600l) >> 1;
+					scr_w = 800;
+					scr_h = 600;
+					break;
+
+				case 0x103:
+					screensize = 800l * 600l;
+					scr_w = 800;
+					scr_h = 600;
+					break;
+
+				case 0x104:
+					screensize = (1024l * 768l) >> 1;
+					scr_w = 1024;
+					scr_h = 768;
+					break;
+
+				case 0x105:
+					screensize = 1024l * 768l;
+					scr_w = 1024;
+					scr_h = 768;
+					break;
+
+				case 0x106:
+					screensize = (1280l * 1024l) >> 1;
+					scr_w = 1280;
+					scr_h = 1280;
+					break;
+
+				case 0x107:
+					screensize = 1280l * 1024l;
+					scr_w = 1280;
+					scr_h = 1280;
+					break;
+
+				}
+				akt_page = 0;
+				StepGr = vmb->wsize / vmb->stepgr;
+				if (StepGr == 0)
+					StepGr = 1;
+				vi.ScreenSize = screensize;
+				for (i = 0; (i < 20); i++) {
+					vi.Page[i] = akt_page;
+					akt_page += StepGr;
+				}
+				printf("Granularität = %d Kbyte\n", vmb->stepgr);
+				printf("Größe der Fenster = %d Kbyte\n", vmb->wsize);
+				printf("Segmentadresse erstes Fenster = %xh\n", vmb->fw_seg);
+				printf("Segmentadresse zweites Fenster = %xh\n", vmb->fs_seg);
+				printf("Zeiger auf Page-Select-Routine = %p\n", vmb->page_set);
+				vi.WinSize = ((dword)vmb->wsize) * 1024l;
+				vi.CallSeg = FP_SEG(vmb->page_set);
+				vi.CallOff = FP_OFF(vmb->page_set);
+				vi.PageAnz = vi.ScreenSize / vi.WinSize;
+				printf("Pages = %d\n", vi.PageAnz);
+
+				vi.CopyRest = vi.ScreenSize % vi.WinSize;
+			}
+			else
+				vi.ModeAvail = FALSE;
+		}
+	}
+#endif
+	return (error);
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
new file mode 100644
index 00000000000..241ebd690e1
--- /dev/null
+++ b/engines/chewy/mcga_grafik.h
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_MCGA_GRAFIK_H
+#define CHEWY_MCGA_GRAFIK_H
+
+#include "chewy/maus.h"
+#include "chewy/ngstypes.h"
+
+namespace Chewy {
+
+class mcga_grafik {
+public:
+	mcga_grafik();
+	~mcga_grafik();
+
+	void init();
+	void restore_mode();
+	void set_writemode(char wm);
+	void init_mausmode(maus_info *minfo);
+	void exit_mausmode();
+
+	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
+	void vsync_start();
+	void vsync_end();
+	void hsync_start();
+	void hsync_end();
+	void skip_line(int16 lines);
+	void skip_frame(int16 frames);
+	void setze_zeiger(byte *ptr);
+	byte *get_zeiger();
+	void set_bildbreite(int16 breite);
+
+	void set_mono();
+	void calc_mono(byte *pal, int16 startcol, int16 anz);
+	void set_palette(byte *palette);
+	void palette_save(byte *pal);
+	void rest_palette();
+	void raster_col(int16 c, int16 r, int16 g, int16 b);
+	void einblenden(byte *palette, int16 frames);
+	void aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen,
+	               int16 frames);
+	void ausblenden(int16 frames);
+	void abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames);
+	void set_teilpalette(byte *palette, int16 startcol, int16 anz);
+
+	void cls();
+	void punkt(int16 xpos, int16 ypos, int16 farbn);
+	uint8 get_pixel(int16 xpos, int16 ypos);
+	void linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
+	void box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
+	void box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
+	void pop_box(int16 x, int16 y, int16 x1, int16 y1,
+	             int16 col1, int16 col2, int16 back_col);
+	void kreis(int16 x, int16 y, int16 r, int16 farbe);
+	void fkreis(int16 x, int16 y, int16 r, int16 farbe);
+
+#ifdef EFFEKTE
+	void upscroll();
+	void downscroll();
+	void leftscroll();
+	void rightscroll();
+	void set_dispoff(int16 offset);
+	void seit_in(byte *source);
+	void falling_in(byte *source);
+	void ueberblend(byte *source);
+	void y_shrumpf(byte *source, byte *dest, int16 faktor,
+	               int16 zeile);
+#endif
+
+	void back2screen(byte *ptr);
+	void back2screen_maskiert(byte *ptr, int16 maske);
+	void screen2back(byte *ptr);
+	void back2back(byte *ptr1, byte *ptr2);
+	void back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske);
+
+	void sprite_save(byte *sptr, int16 x, int16 y, int16 breite,
+	                 int16 hoehe, int16 scrwidth);
+	void blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	void sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	void scale_image(byte *source, byte *dest, int16 xdiff,
+	                 int16 ydiff);
+	void scale_set(byte *sptr, int16 x, int16 y, int16 xdiff,
+	               int16 ydiff, int16 scrwidth);
+	void map_spr2screen(byte *sptr, int16 x, int16 y);
+
+	void set_fontadr(byte *adr);
+	void plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
+	                   char cursor);
+	int16 scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth, const char *string, ...);
+	void printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
+	             const char *format, ...);
+	void speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
+	                   int16 scrwidth, char *string);
+	void print(int16 forcol, int16 backcol, int16 scrwidth, char *format, ...);
+	void printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
+	              int16 scrwidth, char *format, ...);
+	void printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
+	                 int16 scrwidth);
+	void printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
+	void vorschub();
+	void set_vorschub(int16 x, int16 y);
+	void move(int16 x, int16 y);
+	void get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth);
+
+	int16 get_vesa_info(uint16 mode, byte *info_blk);
+	void init(uint16 mode, byte *info_blk, byte *vscreen);
+	void update_screen();
+private:
+	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
+	int16 devices();
+	float sinus[360];
+	float cosinus[360];
+
+	void ltoa(long N, char *str, int base);
+	void ultoa(uint32 N, char *str, int base);
+	void itoa(int N, char *str, int base);
+
+};
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 995fab1ef8d..bf5e156c9e5 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -26,6 +26,7 @@ MODULE_OBJS = \
 	io_game.o \
 	maus.o \
 	mcga.o \
+	mcga_grafik.o \
 	memory.o \
 	menus.o \
 	metaengine.o \


Commit: 02280116ab9cb00e5a194777c75add53a7e154c8
    https://github.com/scummvm/scummvm/commit/02280116ab9cb00e5a194777c75add53a7e154c8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Shift standalone methods into mcga.cpp

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 41d722a59fd..6df5fea8e63 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -59,68 +59,149 @@ void old_mode() {
 	// No implementation needed
 }
 
-void vflyback_start() { warning("STUB - vflyback_start"); }
+void vflyback_start() {
+	warning("STUB - vflyback_start");
+}
 
-void vflyback_end() { warning("STUB - vflyback_end"); }
+void vflyback_end() {
+	warning("STUB - vflyback_end");
+}
 
-void hflyback_start() { warning("STUB - hflyback_start"); }
+void hflyback_start() {
+	warning("STUB - hflyback_start");
+}
 
-void hflyback_end() { warning("STUB - hflyback_end"); }
+void hflyback_end() {
+	warning("STUB - hflyback_end");
+}
 
-void set_pointer(byte *ptr) { warning("STUB - set_pointer"); }
+void set_pointer(byte *ptr) {
+	warning("STUB - set_pointer");
+}
 
-byte *get_dispoff() { warning("STUB - get_dispoff"); return nullptr; }
+byte *get_dispoff() {
+	warning("STUB - get_dispoff");
+	return nullptr;
+}
 
-void setpalette(byte *palette) { warning("STUB - setpalette"); }
+void setpalette(byte *palette) {
+	warning("STUB - setpalette");
+}
 
-void save_palette(byte *pal) { warning("STUB - save_palette"); }
+void save_palette(byte *pal) {
+	warning("STUB - save_palette");
+}
 
-void restore_palette() { warning("STUB - restore_palette"); }
+void restore_palette() {
+	warning("STUB - restore_palette");
+}
 
-void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) { warning("STUB - rastercol"); }
+void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) {
+	warning("STUB - rastercol");
+}
 
-void set_palpart(byte *palette, int16 startcol, int16 anz) { warning("STUB - set_palpart"); }
+void set_palpart(byte *palette, int16 startcol, int16 anz) {
+	warning("STUB - set_palpart");
+}
 
-void clear_mcga() { warning("STUB - clear_mcga"); }
+void clear_mcga() {
+	warning("STUB - clear_mcga");
+}
 
-void setpixel_mcga(int16 x, int16 y, int16 farbe) { warning("STUB - setpixel_mcga"); }
+void setpixel_mcga(int16 x, int16 y, int16 farbe) {
+	warning("STUB - setpixel_mcga");
+}
 
-uint8 getpix(int16 x, int16 y) { warning("STUB - getpix"); return 0; }
+uint8 getpix(int16 x, int16 y) {
+	warning("STUB - getpix");
+	return 0;
+}
 
-void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) { warning("STUB - line_mcga"); }
+void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+	warning("STUB - line_mcga");
+}
 
-void mem2mcga(byte *ptr) { warning("STUB - mem2mcga"); }
+void mem2mcga(byte *ptr) {
+	warning("STUB - mem2mcga");
+}
 
-void mem2mcga_masked(byte *ptr, int16 maske) { warning("STUB - mem2mcga_masked"); }
+void mem2mcga_masked(byte *ptr, int16 maske) {
+	warning("STUB - mem2mcga_masked");
+}
 
-void mcga2mem(byte *ptr) { warning("STUB - mcga2mem"); }
+void mcga2mem(byte *ptr) {
+	warning("STUB - mcga2mem");
+}
 
-void mem2mem(byte *ptr1, byte *ptr2) { warning("STUB - mem2mem"); }
+void mem2mem(byte *ptr1, byte *ptr2) {
+	warning("STUB - mem2mem");
+}
 
-void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) { warning("STUB - mem2mem_masked"); }
+void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) {
+	warning("STUB - mem2mem_masked");
+}
 
-void map_spr_2screen(byte *sptr, int16 x, int16 y) { warning("STUB - map_spr_2screen"); }
+void map_spr_2screen(byte *sptr, int16 x, int16 y) {
+	warning("STUB - map_spr_2screen");
+}
 
-void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) { warning("STUB - spr_save_mcga"); }
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
+	warning("STUB - spr_save_mcga");
+}
 
-void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - spr_set_mcga"); }
+void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+	warning("STUB - spr_set_mcga");
+}
 
-void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) { warning("STUB - mspr_set_mcga"); }
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+	warning("STUB - mspr_set_mcga");}
 
-void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) { warning("STUB - setfont"); }
+void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) {
+	warning("STUB - setfont");
+}
 
-void upd_scr() { warning("STUB - upd_scr"); }
+void upd_scr() {
+	warning("STUB - upd_scr");
+}
 
-void vors() { warning("STUB - vors"); }
+void vors() {
+	warning("STUB - vors");
+}
 
-void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) { warning("STUB - zoom_img"); }
+void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
+	warning("STUB - zoom_img");
+}
 
-void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) { warning("STUB - zoom_set"); }
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+	warning("STUB - zoom_set");
+}
 
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putcxy"); }
+void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+	warning("STUB - putcxy");
+}
 
-void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) { warning("STUB - putz"); }
+void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+	warning("STUB - putz");
+}
 
-void init_svga(VesaInfo *vi_, byte *virt_screen) { warning("STUB - init_svga"); }
+void init_svga(VesaInfo *vi_, byte *virt_screen) {
+	warning("STUB - init_svga");
+}
+
+bool kbhit() {
+	warning("STUB: kbhit()");
+
+	return false;
+}
+
+char getch() {
+	warning("STUB: getch()");
+
+	return ' ';
+}
+
+void putch(char c) {
+	warning("STUB: putch()");
+}
 
 } // namespace Chewy
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 17b46c8af9c..842e7b72d7a 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -112,6 +112,10 @@ uint8 joystick();
 void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
 
+bool kbhit();
+char getch();
+void putch(char c);
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 540ee2d0885..85a90b8e0fe 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -35,36 +35,6 @@ namespace Chewy {
 #define DATEI 3
 #define MAXSTRING 255
 
-void mcga_grafik::ltoa(long N, char *str, int base) {
-	sprintf(str, "%ld", N);
-}
-
-void mcga_grafik::ultoa(uint32 N, char *str, int base) {
-	sprintf(str, "%u", N);
-}
-
-void mcga_grafik::itoa(int N, char *str, int base) {
-	sprintf(str, "%d", N);
-}
-
-bool kbhit() {
-	warning("STUB: kbhit()");
-
-	return false;
-}
-
-char getch() {
-	warning("STUB: getch()");
-
-	return ' ';
-}
-
-void putch(char c) {
-	warning("STUB: putch()");
-}
-
-/*------------------------------------------------------*/
-
 mcga_grafik::mcga_grafik() {
 	int16 i;
 
@@ -96,6 +66,7 @@ mcga_grafik::mcga_grafik() {
 	mono = false;
 	MausMode = false;
 }
+
 mcga_grafik::~mcga_grafik() {
 }
 
@@ -1693,4 +1664,16 @@ int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
 	return (error);
 }
 
+void mcga_grafik::ltoa(long N, char *str, int base) {
+	sprintf(str, "%ld", N);
+}
+
+void mcga_grafik::ultoa(uint32 N, char *str, int base) {
+	sprintf(str, "%u", N);
+}
+
+void mcga_grafik::itoa(int N, char *str, int base) {
+	sprintf(str, "%d", N);
+}
+
 } // namespace Chewy


Commit: d85b399064cdfb9824d9d1635a8da95826486d43
    https://github.com/scummvm/scummvm/commit/d85b399064cdfb9824d9d1635a8da95826486d43
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Implementing mcga methods

Changed paths:
    engines/chewy/inits.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 1c46a1bf974..5885835cac5 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -51,7 +51,7 @@ void standard_init() {
 	out->vsync_start();
 	out->init();
 	out->cls();
-	out->palette_save(0);
+	out->palette_save();
 	out->set_clip(0, 0, 320, 200);
 	out->set_writemode(0);
 	scr_width = 0;
@@ -539,7 +539,7 @@ void sound_init() {
 		out->vsync_start();
 		out->init();
 		out->cls();
-		out->palette_save(0);
+		out->palette_save();
 		out->set_clip(0, 0, 320, 200);
 		out->set_writemode(0);
 		detect.Nager = in->init();
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 6df5fea8e63..1272e86ffc8 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -20,12 +20,13 @@
  *
  */
 
+#include "common/system.h"
+#include "graphics/palette.h"
 #include "chewy/chewy.h"
 #include "chewy/mcga.h"
 
 namespace Chewy {
 
-#define WAIT asm { NOP; NOP;NOP;NOP;NOP;NOP;NOP;NOP;NOP;NOP;}
 int16 FuNr;
 real_regs rr;
 real_regs *rp = &rr;
@@ -47,12 +48,20 @@ char einfuegen = 0;
 int16 crlfx = 0, crlfy = 0;
 int16 r_gef = -1, r_end = false;
 int16 *rlist = 0;
-byte pal_table[768];
 bool mono = false;
 uint8 svga;
+byte *screenP;
+
+static byte saved_palette[PALETTE_SIZE];
 
 void init_mcga() {
-	// No implementation needed
+	crlfx = crlfy = 0;
+	r_gef = -1;
+	r_end = false;
+	rlist = 0;
+	mono = false;
+	svga = 0;
+	screenP = (byte *)g_engine->_screen->getPixels();
 }
 
 void old_mode() {
@@ -60,40 +69,43 @@ void old_mode() {
 }
 
 void vflyback_start() {
-	warning("STUB - vflyback_start");
+	// No implementation needed
 }
 
 void vflyback_end() {
-	warning("STUB - vflyback_end");
+	// No implementation needed
 }
 
 void hflyback_start() {
-	warning("STUB - hflyback_start");
+	// No implementation needed
 }
 
 void hflyback_end() {
-	warning("STUB - hflyback_end");
+	// No implementation needed
 }
 
 void set_pointer(byte *ptr) {
-	warning("STUB - set_pointer");
+	assert(ptr);
+	screenP = ptr;
 }
 
 byte *get_dispoff() {
-	warning("STUB - get_dispoff");
-	return nullptr;
+	return screenP;
 }
 
 void setpalette(byte *palette) {
-	warning("STUB - setpalette");
+	g_system->getPaletteManager()->setPalette(palette, 0, PALETTE_COUNT);
 }
 
-void save_palette(byte *pal) {
-	warning("STUB - save_palette");
+void save_palette(byte *palette) {
+	if (!palette)
+		palette = saved_palette;
+
+	g_system->getPaletteManager()->grabPalette(palette, 0, PALETTE_COUNT);
 }
 
 void restore_palette() {
-	warning("STUB - restore_palette");
+	setpalette(saved_palette);
 }
 
 void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) {
@@ -101,24 +113,24 @@ void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) {
 }
 
 void set_palpart(byte *palette, int16 startcol, int16 anz) {
-	warning("STUB - set_palpart");
+	g_system->getPaletteManager()->setPalette(palette, startcol, anz);
 }
 
 void clear_mcga() {
-	warning("STUB - clear_mcga");
+	g_engine->_screen->clear();
 }
 
 void setpixel_mcga(int16 x, int16 y, int16 farbe) {
-	warning("STUB - setpixel_mcga");
+	line_mcga(x, y, x, y, farbe);
 }
 
 uint8 getpix(int16 x, int16 y) {
-	warning("STUB - getpix");
-	return 0;
+	byte *pixel = (byte *)g_engine->_screen->getBasePtr(x, y);
+	return *pixel;
 }
 
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	warning("STUB - line_mcga");
+	g_engine->_screen->drawLine(x1, y1, x2, y2, farbe);
 }
 
 void mem2mcga(byte *ptr) {
@@ -161,7 +173,7 @@ void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) {
 }
 
 void upd_scr() {
-	warning("STUB - upd_scr");
+	g_engine->_screen->update();
 }
 
 void vors() {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 842e7b72d7a..bf82e46ea44 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -50,7 +50,6 @@ extern char einfuegen;
 extern int16 crlfx, crlfy;
 extern int16 r_gef, r_end;
 extern int16 *rlist;
-extern byte pal_table[768];
 extern bool mono;
 extern uint8 svga;
 
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 85a90b8e0fe..d99a5623398 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -35,6 +35,9 @@ namespace Chewy {
 #define DATEI 3
 #define MAXSTRING 255
 
+byte pal_table[PALETTE_SIZE];
+
+
 mcga_grafik::mcga_grafik() {
 	int16 i;
 
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 241ebd690e1..8b864ea5c13 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -23,11 +23,14 @@
 #ifndef CHEWY_MCGA_GRAFIK_H
 #define CHEWY_MCGA_GRAFIK_H
 
+#include "graphics/screen.h"
 #include "chewy/maus.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
 
+extern byte pal_table[PALETTE_SIZE];
+
 class mcga_grafik {
 public:
 	mcga_grafik();
@@ -53,7 +56,7 @@ public:
 	void set_mono();
 	void calc_mono(byte *pal, int16 startcol, int16 anz);
 	void set_palette(byte *palette);
-	void palette_save(byte *pal);
+	void palette_save(byte *pal = nullptr);
 	void rest_palette();
 	void raster_col(int16 c, int16 r, int16 g, int16 b);
 	void einblenden(byte *palette, int16 frames);


Commit: e869c55993b45a4453b3eaa000f4bfc6c62dfbfe
    https://github.com/scummvm/scummvm/commit/e869c55993b45a4453b3eaa000f4bfc6c62dfbfe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:56-08:00

Commit Message:
CHEWY: Move some variables from mcga to mcga_grafik

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 1272e86ffc8..19fe937a861 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -27,40 +27,10 @@
 
 namespace Chewy {
 
-int16 FuNr;
-real_regs rr;
-real_regs *rp = &rr;
-maus_info *m_info;
-VesaInfo vi;
-
-int16 clipx1, clipx2, clipy1, clipy2;
-int16 gcurx, gcury, fvorx, fvory;
-int16 fontbr, fonth;
-int16 scr_w, scr_h;
-int16 fontfirst, fontlast;
-char writemode;
-
-char MausMode;
-char enter_key;
-char escape_key;
-char einfuegen = 0;
-
-int16 crlfx = 0, crlfy = 0;
-int16 r_gef = -1, r_end = false;
-int16 *rlist = 0;
-bool mono = false;
-uint8 svga;
-byte *screenP;
-
 static byte saved_palette[PALETTE_SIZE];
+static byte *screenP;
 
 void init_mcga() {
-	crlfx = crlfy = 0;
-	r_gef = -1;
-	r_end = false;
-	rlist = 0;
-	mono = false;
-	svga = 0;
 	screenP = (byte *)g_engine->_screen->getPixels();
 }
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index bf82e46ea44..4c604f2b5f6 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -28,32 +28,6 @@
 
 namespace Chewy {
 
-extern uint8 svga;
-extern int16 FuNr;
-extern real_regs rr;
-extern real_regs *rp;
-extern maus_info *m_info;
-extern VesaInfo vi;
-
-extern int16 clipx1, clipx2, clipy1, clipy2;
-extern int16 gcurx, gcury, fvorx, fvory;
-extern int16 fontbr, fonth;
-extern int16 scr_w, scr_h;
-extern int16 fontfirst, fontlast;
-extern char writemode;
-
-extern char MausMode;
-extern char enter_key;
-extern char escape_key;
-extern char einfuegen;
-
-extern int16 crlfx, crlfy;
-extern int16 r_gef, r_end;
-extern int16 *rlist;
-extern bool mono;
-extern uint8 svga;
-
-
 void init_mcga();
 void old_mode();
 
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index d99a5623398..6fc3d9916fb 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -37,10 +37,40 @@ namespace Chewy {
 
 byte pal_table[PALETTE_SIZE];
 
+int16 FuNr;
+real_regs rr;
+real_regs *rp = &rr;
+maus_info *m_info;
+VesaInfo vi;
+
+int16 clipx1, clipx2, clipy1, clipy2;
+int16 gcurx, gcury, fvorx, fvory;
+int16 fontbr, fonth;
+int16 scr_w, scr_h;
+int16 fontfirst, fontlast;
+char writemode;
+
+char MausMode;
+char enter_key;
+char escape_key;
+char einfuegen = 0;
+
+int16 crlfx = 0, crlfy = 0;
+int16 r_gef = -1, r_end = false;
+int16 *rlist = 0;
+bool mono = false;
+uint8 svga;
 
 mcga_grafik::mcga_grafik() {
 	int16 i;
 
+	crlfx = crlfy = 0;
+	r_gef = -1;
+	r_end = false;
+	rlist = 0;
+	mono = false;
+	svga = 0;
+
 #if 0
 	char *enstr;
 
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 8b864ea5c13..87a1e987448 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -30,6 +30,30 @@
 namespace Chewy {
 
 extern byte pal_table[PALETTE_SIZE];
+extern uint8 svga;
+extern int16 FuNr;
+extern real_regs rr;
+extern real_regs *rp;
+extern maus_info *m_info;
+extern VesaInfo vi;
+
+extern int16 clipx1, clipx2, clipy1, clipy2;
+extern int16 gcurx, gcury, fvorx, fvory;
+extern int16 fontbr, fonth;
+extern int16 scr_w, scr_h;
+extern int16 fontfirst, fontlast;
+extern char writemode;
+
+extern char MausMode;
+extern char enter_key;
+extern char escape_key;
+extern char einfuegen;
+
+extern int16 crlfx, crlfy;
+extern int16 r_gef, r_end;
+extern int16 *rlist;
+extern bool mono;
+extern uint8 svga;
 
 class mcga_grafik {
 public:


Commit: 626fbbc48edca137ebe54cb595d72b2e00795a15
    https://github.com/scummvm/scummvm/commit/626fbbc48edca137ebe54cb595d72b2e00795a15
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:57-08:00

Commit Message:
CHEWY: More mcga method implementations

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 19fe937a861..8d8e5081e5c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -29,9 +29,13 @@ namespace Chewy {
 
 static byte saved_palette[PALETTE_SIZE];
 static byte *screenP;
+static bool screenHasDefault;
+static byte *screenDefaultP;
 
 void init_mcga() {
 	screenP = (byte *)g_engine->_screen->getPixels();
+	screenHasDefault = false;
+	screenDefaultP = nullptr;
 }
 
 void old_mode() {
@@ -55,8 +59,13 @@ void hflyback_end() {
 }
 
 void set_pointer(byte *ptr) {
-	assert(ptr);
-	screenP = ptr;
+	if (ptr) {
+		screenP = ptr;
+	} else if (screenHasDefault) {
+		screenP = screenDefaultP;
+	} else {
+		screenP = (byte *)g_engine->_screen->getPixels();
+	}
 }
 
 byte *get_dispoff() {
@@ -78,8 +87,9 @@ void restore_palette() {
 	setpalette(saved_palette);
 }
 
-void rastercol(int16 color, int16 rot, int16 gruen, int16 blau) {
-	warning("STUB - rastercol");
+void rastercol(int16 color, int16 r, int16 g, int16 b) {
+	const byte rgb[3] = { r, g, b };
+	g_system->getPaletteManager()->setPalette(&rgb[0], color, 1);
 }
 
 void set_palpart(byte *palette, int16 startcol, int16 anz) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 4c604f2b5f6..8e157dceb60 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -41,7 +41,7 @@ byte *get_dispoff();
 void setpalette(byte *palette);
 void save_palette(byte *pal);
 void restore_palette();
-void rastercol(int16 color, int16 rot, int16 gruen, int16 blau);
+void rastercol(int16 color, int16 r, int16 g, int16 b);
 void set_palpart(byte *palette, int16 startcol, int16 anz);
 
 void clear_mcga();


Commit: fb37d95f4e90c17acf6bbd12e4849d9a969ff376
    https://github.com/scummvm/scummvm/commit/fb37d95f4e90c17acf6bbd12e4849d9a969ff376
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:57-08:00

Commit Message:
CHEWY: Added mcga screen copying methods

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index e908ae5a2f0..8c029b4cd5f 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -34,6 +34,9 @@
 
 namespace Chewy {
 
+#define SCREEN_WIDTH 320
+#define SCREEN_HEIGHT 200
+
 struct ChewyGameDescription;
 class Sound;
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 8d8e5081e5c..208c924bac9 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -88,7 +88,11 @@ void restore_palette() {
 }
 
 void rastercol(int16 color, int16 r, int16 g, int16 b) {
-	const byte rgb[3] = { r, g, b };
+	byte rgb[3];
+	rgb[0] = r;
+	rgb[1] = g;
+	rgb[2] = b;
+
 	g_system->getPaletteManager()->setPalette(&rgb[0], color, 1);
 }
 
@@ -113,24 +117,42 @@ void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	g_engine->_screen->drawLine(x1, y1, x2, y2, farbe);
 }
 
-void mem2mcga(byte *ptr) {
-	warning("STUB - mem2mcga");
+void mem2mcga(const byte *ptr) {
+	byte *destP = (byte *)g_engine->_screen->getPixels();
+	Common::copy(ptr + 4, ptr + 4 + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
 }
 
-void mem2mcga_masked(byte *ptr, int16 maske) {
-	warning("STUB - mem2mcga_masked");
+void mem2mcga_masked(const byte *ptr, int16 maske) {
+	byte *destP = screenP;
+	byte pixel;
+
+	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr, ++destP) {
+		pixel = *ptr;
+		if (pixel != maske)
+			*destP = pixel;
+	}
 }
 
 void mcga2mem(byte *ptr) {
-	warning("STUB - mcga2mem");
+	const byte *srcP = screenP;
+	*((uint16 *)ptr) = SCREEN_WIDTH;
+	*((uint16 *)(ptr + 2)) = SCREEN_HEIGHT;
+
+	Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), ptr + 4);
 }
 
-void mem2mem(byte *ptr1, byte *ptr2) {
-	warning("STUB - mem2mem");
+void mem2mem(const byte *ptr1, byte *ptr2) {
+	Common::copy(ptr1, ptr1 + (SCREEN_WIDTH * SCREEN_HEIGHT), ptr2);
 }
 
-void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske) {
-	warning("STUB - mem2mem_masked");
+void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
+	byte pixel;
+
+	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr1, ++ptr2) {
+		pixel = *ptr1;
+		if (pixel != maske)
+			*ptr2 = pixel;
+	}
 }
 
 void map_spr_2screen(byte *sptr, int16 x, int16 y) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 8e157dceb60..023eaff8065 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -56,11 +56,11 @@ void over_in(byte *source);
 void y_shrink(byte *source, byte *dest, int16 faktor, int16 zeile);
 #endif
 
-void mem2mcga(byte *ptr);
-void mem2mcga_masked(byte *ptr, int16 maske);
+void mem2mcga(const byte *ptr);
+void mem2mcga_masked(const byte *ptr, int16 maske);
 void mcga2mem(byte *ptr);
-void mem2mem(byte *ptr1, byte *ptr2);
-void mem2mem_masked(byte *ptr1, byte *ptr2, int16 maske);
+void mem2mem(const byte *ptr1, byte *ptr2);
+void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske);
 void map_spr_2screen(byte *sptr, int16 x, int16 y);
 
 void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe,


Commit: 25e61f766d9ad10b3c2e067d7355e5382e3cab33
    https://github.com/scummvm/scummvm/commit/25e61f766d9ad10b3c2e067d7355e5382e3cab33
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:57-08:00

Commit Message:
CHEWY: Added mcga sprite methods

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 208c924bac9..62e67c02d3f 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -101,7 +101,10 @@ void set_palpart(byte *palette, int16 startcol, int16 anz) {
 }
 
 void clear_mcga() {
-	g_engine->_screen->clear();
+	if (screenP == (byte *)g_engine->_screen->getPixels())
+		g_engine->_screen->clear();
+	else
+		Common::fill(screenP, screenP + SCREEN_WIDTH * SCREEN_HEIGHT, 0);
 }
 
 void setpixel_mcga(int16 x, int16 y, int16 farbe) {
@@ -155,16 +158,64 @@ void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
 	}
 }
 
-void map_spr_2screen(byte *sptr, int16 x, int16 y) {
-	warning("STUB - map_spr_2screen");
+void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
+	int width = *((const int16 *)sptr);
+	sptr += y * width + x;
+	byte *destP = screenP;
+
+	for (int row = 0; row < SCREEN_HEIGHT;
+			++row, sptr += width, destP += SCREEN_WIDTH) {
+		Common::copy(sptr, sptr + SCREEN_WIDTH, destP);
+	}
 }
 
-void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
-	warning("STUB - spr_save_mcga");
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
+		int16 height, int16 scrwidth) {
+	int pitch;
+	byte *scrP;
+	*((int16 *)sptr) = width;
+	sptr += 2;
+	*((int16 *)sptr) = height;
+	sptr += 2;
+
+	if (scrwidth == 0) {
+		scrP = screenP + y * SCREEN_WIDTH + x;
+		pitch = SCREEN_WIDTH;
+	} else {
+		scrP = screenP + y * scrwidth + x;
+		pitch = scrwidth;
+	}
+
+	if (width >= 1 && height >= 1) {
+		for (int row = 0; row < height; ++row) {
+			Common::copy(scrP, scrP + width, sptr);
+			scrP += pitch;
+		}
+	}
 }
 
-void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) {
-	warning("STUB - spr_set_mcga");
+void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth) {
+	int pitch;
+	byte *scrP;
+	int width = *((const int16 *)sptr);
+	sptr += 2;
+	int height = *((const int16 *)sptr);
+	sptr += 2;
+
+	if (width >= 1 && height >= 1) {
+		if (scrwidth == 0) {
+			scrP = screenP + y * SCREEN_WIDTH + x;
+			pitch = SCREEN_WIDTH;
+		} else {
+			scrP = screenP + y * scrwidth + x;
+			pitch = scrwidth;
+		}
+
+		for (int row = 0; row < height; ++row) {
+			Common::copy(sptr, sptr + width, scrP);
+			scrP += pitch;
+		}
+	}
 }
 
 void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 023eaff8065..6ac6c5571f2 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -61,19 +61,18 @@ void mem2mcga_masked(const byte *ptr, int16 maske);
 void mcga2mem(byte *ptr);
 void mem2mem(const byte *ptr1, byte *ptr2);
 void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske);
-void map_spr_2screen(byte *sptr, int16 x, int16 y);
 
-void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe,
-                   int16 scrwidth);
-void spr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth);
+void map_spr_2screen(const byte *sptr, int16 x, int16 y);
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
+	int16 height, int16 scrwidth);
+void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth);
 void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth);
-void zoom_img(byte *source, byte *dest, int16 xdiff,
-              int16 ydiff);
+void zoom_img(byte *source, byte *dest, int16 xdiff, int16 ydiff);
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
-              int16 ydiff, int16 scrwidth);
+    int16 ydiff, int16 scrwidth);
 
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
-            int16 scrwidth);
+void putcxy(int16 x, int16 y, char zeichen, int16 forcol,
+	int16 backcol, int16 scrwidth);
 void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
 void setfont(byte *adr, int16 breite, int16 hoehe, int16 first,
              int16 last);


Commit: 81d2f77d63588c364cc7972255df612775bc937a
    https://github.com/scummvm/scummvm/commit/81d2f77d63588c364cc7972255df612775bc937a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: More sprite drawing code

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 62e67c02d3f..af8cf8172d4 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -24,6 +24,7 @@
 #include "graphics/palette.h"
 #include "chewy/chewy.h"
 #include "chewy/mcga.h"
+#include "chewy/mcga_grafik.h"
 
 namespace Chewy {
 
@@ -31,11 +32,18 @@ static byte saved_palette[PALETTE_SIZE];
 static byte *screenP;
 static bool screenHasDefault;
 static byte *screenDefaultP;
+static int spriteWidth;
+static byte *fontAddr;
+static size_t fontWidth, fontHeight;
+static int fontFirst, fontLast;
+static int fontX, fontY;
 
 void init_mcga() {
 	screenP = (byte *)g_engine->_screen->getPixels();
 	screenHasDefault = false;
 	screenDefaultP = nullptr;
+	spriteWidth = 0;
+	fontX = fontY = 0;
 }
 
 void old_mode() {
@@ -170,7 +178,7 @@ void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
 }
 
 void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
-		int16 height, int16 scrwidth) {
+		int16 height, int16 scrWidth) {
 	int pitch;
 	byte *scrP;
 	*((int16 *)sptr) = width;
@@ -178,12 +186,12 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
 	*((int16 *)sptr) = height;
 	sptr += 2;
 
-	if (scrwidth == 0) {
+	if (scrWidth == 0) {
 		scrP = screenP + y * SCREEN_WIDTH + x;
 		pitch = SCREEN_WIDTH;
 	} else {
-		scrP = screenP + y * scrwidth + x;
-		pitch = scrwidth;
+		scrP = screenP + y * scrWidth + x;
+		pitch = scrWidth;
 	}
 
 	if (width >= 1 && height >= 1) {
@@ -194,7 +202,7 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
 	}
 }
 
-void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth) {
 	int pitch;
 	byte *scrP;
 	int width = *((const int16 *)sptr);
@@ -203,12 +211,12 @@ void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	sptr += 2;
 
 	if (width >= 1 && height >= 1) {
-		if (scrwidth == 0) {
+		if (scrWidth == 0) {
 			scrP = screenP + y * SCREEN_WIDTH + x;
 			pitch = SCREEN_WIDTH;
 		} else {
-			scrP = screenP + y * scrwidth + x;
-			pitch = scrwidth;
+			scrP = screenP + y * scrWidth + x;
+			pitch = scrWidth;
 		}
 
 		for (int row = 0; row < height; ++row) {
@@ -218,34 +226,106 @@ void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	}
 }
 
-void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth) {
-	warning("STUB - mspr_set_mcga");}
+static bool mspr_set_mcga_clip(int x, int y, int pitch, int &width, int &height, const byte *&srcP, byte *&destP) {
+	if (y < clipy1) {
+		int yDiff = ABS(clipy1 - y);
+		height -= yDiff;
+		srcP += yDiff * width;
+		y = clipy1;
+	}
+	if (height < 1)
+		return false;
+
+	if (x < clipx1) {
+		int xDiff = ABS(clipx1 - x);
+		width -= xDiff;
+		srcP += xDiff;
+		x = clipx1;
+	}
+	if (width < 1)
+		return false;
+
+	int x2 = x + width;
+	if (x2 > clipx2) {
+		int xDiff = x2 - clipx2;
+		width -= xDiff;
+	}
+	if (width <= 1)
+		return false;
+
+	int y2 = y + height;
+	if (y2 > clipy2) {
+		int yDiff = y2 - clipy2;
+		height -= yDiff;
+	}
+	if (height < 1)
+		return false;
+
+	destP = screenP + pitch * y + x;
+	return true;
+}
+
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth) {
+	if (!sptr)
+		return;
+
+	byte *destP;
+	int width = *((const int16 *)sptr);
+	sptr += 2;
+	int height = *((const int16 *)sptr);
+	sptr += 2;
+	const byte *srcP = sptr;
+	spriteWidth = width;
+
+	if (!(height >= 1 && width >= 4))
+		return;
+
+	int pitch = scrWidth ? scrWidth : SCREEN_WIDTH;
+	if (!mspr_set_mcga_clip(x, y, pitch, width, height, srcP, destP))
+		return;
+	int destPitchRemainder = pitch - width;
+	int srcPitchRemainder = spriteWidth - width;
+
+	for (int row = 0; row < height; ++row,
+			srcP += srcPitchRemainder, destP += destPitchRemainder) {
+		for (int col = 0; col < width; ++col, ++srcP, ++destP) {
+			if (*srcP != 0)
+				*destP = *srcP;
+		}
+	}
+}
 
-void setfont(byte *adr, int16 breite, int16 hoehe, int16 first, int16 last) {
-	warning("STUB - setfont");
+void setfont(byte *addr, int16 width, int16 height, int16 first, int16 last) {
+	fontAddr = addr;
+	fontWidth = width;
+	fontHeight = height;
+	fontFirst = first;
+	fontLast = last;
 }
 
 void upd_scr() {
+	g_engine->_screen->markAllDirty();
 	g_engine->_screen->update();
 }
 
 void vors() {
-	warning("STUB - vors");
+	fontX = fvorx;
+	fontY = fvory;
 }
 
 void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
 	warning("STUB - zoom_img");
 }
 
-void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
 	warning("STUB - zoom_set");
 }
 
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrWidth) {
 	warning("STUB - putcxy");
 }
 
-void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
 	warning("STUB - putz");
 }
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 6ac6c5571f2..90ea6abad59 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -64,17 +64,17 @@ void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske);
 
 void map_spr_2screen(const byte *sptr, int16 x, int16 y);
 void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
-	int16 height, int16 scrwidth);
-void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrwidth);
-void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	int16 height, int16 scrWidth);
+void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth);
+void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth);
 void zoom_img(byte *source, byte *dest, int16 xdiff, int16 ydiff);
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
-    int16 ydiff, int16 scrwidth);
+    int16 ydiff, int16 scrWidth);
 
 void putcxy(int16 x, int16 y, char zeichen, int16 forcol,
-	int16 backcol, int16 scrwidth);
-void putz(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
-void setfont(byte *adr, int16 breite, int16 hoehe, int16 first,
+	int16 backcol, int16 scrWidth);
+void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth);
+void setfont(byte *addr, int16 width, int16 height, int16 first,
              int16 last);
 void vors();
 void movecur(int16 x, int16 y);


Commit: fba13ed0f706a6fa36ca8b0bd9727d64ef52d1ee
    https://github.com/scummvm/scummvm/commit/fba13ed0f706a6fa36ca8b0bd9727d64ef52d1ee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Added events manager class

Changed paths:
  A engines/chewy/events.cpp
  A engines/chewy/events.h
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/module.mk


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 02a60da42dd..87a931d4cdc 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -24,6 +24,7 @@
 #include "common/system.h"
 #include "engines/util.h"
 #include "chewy/chewy.h"
+#include "chewy/events.h"
 #include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
@@ -36,6 +37,7 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 		: Engine(syst),
 		_gameDescription(gameDesc),
 		_rnd("chewy"),
+		_events(nullptr),
 		_screen(nullptr),
 		_sound(nullptr) {
 
@@ -52,12 +54,14 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 }
 
 ChewyEngine::~ChewyEngine() {
+	delete _events;
 	delete _screen;
 	delete _sound;
 	g_engine = nullptr;
 }
 
 void ChewyEngine::initialize() {
+	_events = new EventsManager();
 	_screen = new Graphics::Screen();
 	_sound = new Sound(_mixer);
 }
@@ -71,12 +75,6 @@ Common::Error ChewyEngine::run() {
 
 	game_main();
 
-	// Run a dummy loop
-	while (!shouldQuit()) {
-		g_system->updateScreen();
-		g_system->delayMillis(10);
-	}
-
 	return Common::kNoError;
 }
 
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 8c029b4cd5f..501d61708eb 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -38,6 +38,7 @@ namespace Chewy {
 #define SCREEN_HEIGHT 200
 
 struct ChewyGameDescription;
+class EventsManager;
 class Sound;
 
 class ChewyEngine : public Engine {
@@ -50,6 +51,7 @@ protected:
 	void shutdown();
 
 public:
+	EventsManager *_events;
 	Sound *_sound;
 	Graphics::Screen *_screen;
 public:
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
new file mode 100644
index 00000000000..b52fe18ea99
--- /dev/null
+++ b/engines/chewy/events.cpp
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/system.h"
+#include "chewy/events.h"
+
+namespace Chewy {
+
+EventsManager *g_events;
+
+EventsManager::EventsManager() {
+	g_events = this;
+}
+
+EventsManager::~EventsManager() {
+	g_events = nullptr;
+}
+
+void EventsManager::pollEvents() {
+	Common::Event e;
+
+	while (g_system->getEventManager()->pollEvent(e)) {
+		switch (e.type) {
+		case Common::EVENT_QUIT:
+		case Common::EVENT_RETURN_TO_LAUNCHER:
+			return;
+
+		case Common::EVENT_KEYDOWN:
+			_keyEvents.push(e);
+			break;
+
+		default:
+			// Add other event types to the pending events queue. If the event is a
+			// mouse move and the prior one was also, then discard the prior one.
+			// This'll help prevent too many mouse move events accumulating
+			if (e.type == Common::EVENT_MOUSEMOVE && !_pendingEvents.empty() &&
+			        _pendingEvents.back().type == Common::EVENT_MOUSEMOVE)
+				_pendingEvents.back() = e;
+			else
+				_pendingEvents.push(e);
+			break;
+		}
+	}
+}
+
+Common::Event EventsManager::readEvent() {
+	pollEvents();
+	return _pendingEvents.empty() ? Common::Event() : _pendingEvents.pop();
+}
+
+void EventsManager::warpMouse(const Common::Point &newPos) {
+	g_system->warpMouse(newPos.x, newPos.y);
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
new file mode 100644
index 00000000000..e514ae6df54
--- /dev/null
+++ b/engines/chewy/events.h
@@ -0,0 +1,80 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_EVENTS_H
+#define CHEWY_EVENTS_H
+
+#include "common/array.h"
+#include "common/queue.h"
+#include "common/events.h"
+
+namespace Chewy {
+
+class EventsManager {
+private:
+	Common::Queue<Common::Event> _pendingEvents;
+	Common::Queue<Common::Event> _keyEvents;
+
+public:
+	EventsManager();
+	~EventsManager();
+
+	/**
+	 * Poll any pending events
+	 */
+	void pollEvents();
+
+	/**
+	 * Returns true if any unprocessed keyboard events are pending
+	 */
+	bool keyEventPending() const {
+		return !_keyEvents.empty();
+	}
+
+	/**
+	 * Returns the next pending unprocessed keyboard event
+	 */
+	Common::Event getPendingKeyEvent() {
+		return _keyEvents.pop();
+	}
+
+	/**
+	 * Returns the next event, if any
+	 */
+	Common::Event readEvent();
+
+	/**
+	 * Sets the mouse position
+	 */
+	void warpMouse(const Common::Point &newPos);
+
+	void clearEvents() {
+		_pendingEvents.clear();
+		_keyEvents.clear();
+	}
+};
+
+extern EventsManager *g_events;
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index bf5e156c9e5..65fc60313ff 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -15,6 +15,7 @@ MODULE_OBJS = \
 	episode2.o \
 	episode3.o \
 	episode4.o \
+	events.o \
 	fehler.o \
 	file.o \
 	flic.o \


Commit: a8eee11ce857688b5e5e4bce8290bfb2ef8f73fd
    https://github.com/scummvm/scummvm/commit/a8eee11ce857688b5e5e4bce8290bfb2ef8f73fd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Added a base class for the EventsManager

I've been doing a fairly common implementation of event
handling across multiple engines, so this is an attempt
to generalize it. Eventually I'd like to see it moved
out of Chewy entirely, and be available for use in other
engines.

Changed paths:
  A engines/chewy/events_base.cpp
  A engines/chewy/events_base.h
    engines/chewy/chewy.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/module.mk


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 87a931d4cdc..4d24bad3938 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -61,8 +61,8 @@ ChewyEngine::~ChewyEngine() {
 }
 
 void ChewyEngine::initialize() {
-	_events = new EventsManager();
 	_screen = new Graphics::Screen();
+	_events = new EventsManager(_screen);
 	_sound = new Sound(_mixer);
 }
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index b52fe18ea99..7b6dc8e339d 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -20,14 +20,14 @@
  *
  */
 
-#include "common/system.h"
 #include "chewy/events.h"
 
 namespace Chewy {
 
 EventsManager *g_events;
 
-EventsManager::EventsManager() {
+EventsManager::EventsManager(Graphics::Screen *screen) :
+		EventsBase(screen) {
 	g_events = this;
 }
 
@@ -35,40 +35,4 @@ EventsManager::~EventsManager() {
 	g_events = nullptr;
 }
 
-void EventsManager::pollEvents() {
-	Common::Event e;
-
-	while (g_system->getEventManager()->pollEvent(e)) {
-		switch (e.type) {
-		case Common::EVENT_QUIT:
-		case Common::EVENT_RETURN_TO_LAUNCHER:
-			return;
-
-		case Common::EVENT_KEYDOWN:
-			_keyEvents.push(e);
-			break;
-
-		default:
-			// Add other event types to the pending events queue. If the event is a
-			// mouse move and the prior one was also, then discard the prior one.
-			// This'll help prevent too many mouse move events accumulating
-			if (e.type == Common::EVENT_MOUSEMOVE && !_pendingEvents.empty() &&
-			        _pendingEvents.back().type == Common::EVENT_MOUSEMOVE)
-				_pendingEvents.back() = e;
-			else
-				_pendingEvents.push(e);
-			break;
-		}
-	}
-}
-
-Common::Event EventsManager::readEvent() {
-	pollEvents();
-	return _pendingEvents.empty() ? Common::Event() : _pendingEvents.pop();
-}
-
-void EventsManager::warpMouse(const Common::Point &newPos) {
-	g_system->warpMouse(newPos.x, newPos.y);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index e514ae6df54..8641dce256c 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -23,54 +23,16 @@
 #ifndef CHEWY_EVENTS_H
 #define CHEWY_EVENTS_H
 
-#include "common/array.h"
-#include "common/queue.h"
-#include "common/events.h"
+#include "chewy/events_base.h"
 
 namespace Chewy {
 
-class EventsManager {
+class EventsManager : public EventsBase {
 private:
-	Common::Queue<Common::Event> _pendingEvents;
-	Common::Queue<Common::Event> _keyEvents;
 
 public:
-	EventsManager();
-	~EventsManager();
-
-	/**
-	 * Poll any pending events
-	 */
-	void pollEvents();
-
-	/**
-	 * Returns true if any unprocessed keyboard events are pending
-	 */
-	bool keyEventPending() const {
-		return !_keyEvents.empty();
-	}
-
-	/**
-	 * Returns the next pending unprocessed keyboard event
-	 */
-	Common::Event getPendingKeyEvent() {
-		return _keyEvents.pop();
-	}
-
-	/**
-	 * Returns the next event, if any
-	 */
-	Common::Event readEvent();
-
-	/**
-	 * Sets the mouse position
-	 */
-	void warpMouse(const Common::Point &newPos);
-
-	void clearEvents() {
-		_pendingEvents.clear();
-		_keyEvents.clear();
-	}
+	EventsManager(Graphics::Screen *screen);
+	virtual ~EventsManager();
 };
 
 extern EventsManager *g_events;
diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
new file mode 100644
index 00000000000..25920c389a3
--- /dev/null
+++ b/engines/chewy/events_base.cpp
@@ -0,0 +1,135 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/system.h"
+#include "chewy/events_base.h"
+
+namespace Chewy {
+
+EventsBase *g_eventsBase;
+
+EventsBase::EventsBase(Graphics::Screen *screen, uint refreshRate) :
+		_screen(screen) {
+	g_eventsBase = this;
+	addTimer(updateScreen, refreshRate);
+}
+
+EventsBase::EventsBase(uint refreshRate) : _screen(nullptr) {
+	g_eventsBase = this;
+	addTimer(updateScreen, refreshRate);
+}
+
+EventsBase::~EventsBase() {
+	g_eventsBase = nullptr;
+}
+
+void EventsBase::checkTimers() {
+	uint32 currTime = g_system->getMillis();
+
+	for (TimerList::iterator it = _timers.begin(); it != _timers.end(); ++it) {
+		TimerRecord &rec = *it;
+		if (currTime >= rec._nextFrameTime) {
+			rec._proc();
+			rec._nextFrameTime = currTime + rec._interval;
+		}
+	}
+}
+
+void EventsBase::updateScreen() {
+	if (g_eventsBase->_screen)
+		g_eventsBase->_screen->update();
+	else
+		g_system->updateScreen();
+}
+
+void EventsBase::update() {
+	// Brief pause to prevent 100% CPU usage
+	g_system->delayMillis(10);
+
+	// Check for any timers that have to be triggered
+	checkTimers();
+
+	// Process events
+	processEvents();
+}
+
+#define MOUSE_MOVE \
+	if (moveEvent.type != Common::EVENT_INVALID) { \
+		handleEvent(moveEvent); \
+		moveEvent.type = Common::EVENT_INVALID; \
+	}
+
+void EventsBase::processEvents() {
+	Common::Event e;
+	Common::Event moveEvent;
+
+	while (g_system->getEventManager()->pollEvent(e)) {
+		switch (e.type) {
+		case Common::EVENT_QUIT:
+		case Common::EVENT_RETURN_TO_LAUNCHER:
+			return;
+
+		case Common::EVENT_KEYDOWN:
+			MOUSE_MOVE;
+			handleEvent(e);
+			break;
+
+		case Common::EVENT_KEYUP:
+			break;
+
+		default:
+			if (e.type == Common::EVENT_MOUSEMOVE) {
+				// Mouse move events get cached so the engine isn't
+				// spammed with multiple sequential move events
+				moveEvent = e;
+			} else {
+				MOUSE_MOVE;
+				handleEvent(e);
+			}
+			break;
+		}
+	}
+
+	MOUSE_MOVE;
+}
+
+#undef MOUSE_MOVE
+
+void EventsBase::handleEvent(const Common::Event &event) {
+	if (event.type == Common::EVENT_KEYDOWN) {
+		_pendingKeyEvents.push(event);
+	} else {
+		_pendingEvents.push(event);
+	}
+}
+
+void EventsBase::warpMouse(const Common::Point &newPos) {
+	g_system->warpMouse(newPos.x, newPos.y);
+}
+
+void EventsBase::clearEvents() {
+	processEvents();
+	_pendingEvents.clear();
+	_pendingKeyEvents.clear();
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/events_base.h b/engines/chewy/events_base.h
new file mode 100644
index 00000000000..e748c7aeaa7
--- /dev/null
+++ b/engines/chewy/events_base.h
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_EVENTS_BASE_H
+#define CHEWY_EVENTS_BASE_H
+
+#include "common/events.h"
+#include "common/queue.h"
+#include "graphics/screen.h"
+
+namespace Chewy {
+
+typedef void (*TimerProc)();
+
+class EventsBase {
+	struct TimerRecord {
+		TimerProc _proc;
+		uint32 _interval;
+		uint32 _nextFrameTime;
+		TimerRecord(TimerProc proc, uint32 interval) :
+			_proc(proc), _interval(interval), _nextFrameTime(0) {
+		}
+	};
+	typedef Common::List<TimerRecord> TimerList;
+private:
+	TimerList _timers;
+	Common::Queue<Common::Event> _pendingEvents;
+	Common::Queue<Common::Event> _pendingKeyEvents;
+private:
+	/**
+	 * Checks for timer expiries
+	 */
+	void checkTimers();
+
+	/**
+	 * Timer proc for regularly updating the screen
+	 */
+	static void updateScreen();
+protected:
+	/**
+	 * Adds a new timer method
+	 * @param proc		Timer method to execute
+	 * @param interval	Interval in milliseconds between calls
+	 */
+	void addTimer(TimerProc proc, uint interval) {
+		_timers.push_back(TimerRecord(proc, interval));
+	}
+
+	/**
+	 * Process any pending events
+	 */
+	void processEvents();
+
+	/**
+	 * Handles pending event
+	 */
+	virtual void handleEvent(const Common::Event &event);
+public:
+	Graphics::Screen *_screen;
+public:
+	/**
+	 * Constructor
+	 * @param 
+	 */
+	EventsBase(Graphics::Screen *screen, uint refreshRate = 1000 / 50);
+	EventsBase(uint refreshRate = 1000 / 50);
+	virtual ~EventsBase();
+
+	/**
+	 * Handles doing a brief delay, checking for timer updates,
+	 * and polling events
+	 */
+	void update();
+
+	/**
+	 * Returns true if any unprocessed keyboard events are pending
+	 */
+	bool keyEventPending() {
+		processEvents();
+		return !_pendingKeyEvents.empty();
+	}
+
+	/**
+	 * Returns true if any unprocessed event other than key events
+	 * are pending
+	 */
+	bool eventPending() {
+		processEvents();
+		return !_pendingEvents.empty();
+	}
+
+	/**
+	 * Returns the next pending unprocessed keyboard event
+	 */
+	Common::Event getPendingKeyEvent() {
+		processEvents();
+		return _pendingKeyEvents.empty() ? Common::Event() : _pendingKeyEvents.pop();
+	}
+
+	/**
+	 * Returns the next event, if any
+	 */
+	Common::Event getPendingEvent() {
+		processEvents();
+		return _pendingEvents.empty() ? Common::Event() : _pendingEvents.pop();
+	}
+
+	/**
+	 * Sets the mouse position
+	 */
+	void warpMouse(const Common::Point &newPos);
+
+	/**
+	 * Clear any pending events
+	 */
+	void clearEvents();
+};
+
+extern EventsBase *g_eventsBase;
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 65fc60313ff..65f75712748 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -16,6 +16,7 @@ MODULE_OBJS = \
 	episode3.o \
 	episode4.o \
 	events.o \
+	events_base.o \
 	fehler.o \
 	file.o \
 	flic.o \


Commit: 436b0cd454407d61968d638633e6579ec06eb074
    https://github.com/scummvm/scummvm/commit/436b0cd454407d61968d638633e6579ec06eb074
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Shift life_line timer to EventsManager

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 7b6dc8e339d..1c5f3b81159 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "chewy/events.h"
+#include "chewy/global.h"
 
 namespace Chewy {
 
@@ -29,10 +30,41 @@ EventsManager *g_events;
 EventsManager::EventsManager(Graphics::Screen *screen) :
 		EventsBase(screen) {
 	g_events = this;
+	init_life_handler();
 }
 
 EventsManager::~EventsManager() {
 	g_events = nullptr;
 }
 
+void EventsManager::init_life_handler() {
+	life_anz = false;
+	life_flag = false;
+	life_handler = true;
+
+	addTimer(life_line, (uint32)(1000 / 18.2));
+}
+
+void EventsManager::life_line() {
+	if (!life_flag) {
+		life_flag = true;
+		if (life_y > 190) {
+			life_y = 0;
+			out->cls();
+		}
+		int x = strlen(life_str);
+		out->printxy(life_x, life_y, 255, 0, scr_width, life_str);
+		for (int i = 0; i < life_anz; i++)
+			out->printchar('.', 255, 0, scr_width);
+		++life_anz;
+		if (life_anz > 50 - x) {
+			life_anz = 0;
+
+			out->box_fill(x * fvorx6x8, life_y, 319, life_y + 8, 0);
+
+		}
+		life_flag = false;
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 8641dce256c..93715e80e96 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -29,6 +29,8 @@ namespace Chewy {
 
 class EventsManager : public EventsBase {
 private:
+	void init_life_handler();
+	static void life_line();
 
 public:
 	EventsManager(Graphics::Screen *screen);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index fef3dd830fb..e39f9e33c95 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -117,7 +117,7 @@ int16 ani_count[3] = {38, 39, 21};
 int16 invent_cur_mode;
 byte *inv_spr[MAX_MOV_OBJ];
 
-int16 life_flag;
+bool life_flag;
 int16 life_x;
 int16 life_y;
 int16 life_anz;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index f679ed71e04..cdefb654c45 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -123,7 +123,7 @@ extern int16 invent_cur_mode;
 extern int16 ak_invent;
 extern byte *inv_spr[MAX_MOV_OBJ];
 
-extern int16 life_flag;
+extern bool life_flag;
 extern int16 life_x;
 extern int16 life_y;
 extern int16 life_anz;
@@ -317,12 +317,6 @@ void get_frame_speed(char *work_page, char *source);
 
 void set_speed();
 
-void init_life_handler();
-
-void remove_life_handler();
-
-void life_line();
-
 void new_game();
 void sound_init();
 void sound_exit();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 5885835cac5..fdb7354ec33 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -426,70 +426,6 @@ void set_speed() {
 	in->speed(spieler.MausSpeed, spieler.MausSpeed * 2);
 }
 
-void init_life_handler() {
-	life_anz = false;
-	life_flag = false;
-	life_handler = true;
-	warning("STUB - init_life_handler");
-#if 0
-	_disable();
-	old1chandler = _dos_getvect(0x1c);
-	_dos_setvect(0x1c, life_line);
-	_enable();
-#endif
-}
-
-void remove_life_handler() {
-	warning("STUB - remove_life_handler");
-	if (life_handler) {
-		life_handler = false;
-#if 0
-		_disable();
-		_dos_setvect(0x1c, old1chandler);
-		_enable();
-#endif
-	}
-}
-
-void life_line() {
-	warning("STUB - life_line");
-}
-#if 0
-#pragma aux asm_set_es_ds =\
-"push ax"\
-"push es"\
-"mov ax,ds"\
-"mov es,ax"
-#pragma aux asm_pop_es_ax =\
-"pop es"\
-"pop ax"
-void interrupt __far life_line(void) {
-	int16 i, x;
-	asm_set_es_ds();
-	old1chandler();
-	if (!life_flag) {
-		life_flag = TRUE;
-		if (life_y > 190) {
-			life_y = 0;
-			out->cls();
-		}
-		x = strlen(life_str);
-		out->printxy(life_x, life_y, 255, 0, scr_width, life_str);
-		for (i = 0; i < life_anz; i++)
-			out->printchar('.', 255, 0, scr_width);
-		++life_anz;
-		if (life_anz > 50 - x) {
-			life_anz = 0;
-
-			out->box_fill(x * fvorx6x8, life_y, 319, life_y + 8, 0);
-
-		}
-		life_flag = FALSE;
-	}
-	asm_pop_es_ax();
-}
-#endif
-
 #define GRAVIS 8
 #define RAP10 9
 void sound_init() {


Commit: 3def51a84141bcb5761d8b538e610761b5eb0466
    https://github.com/scummvm/scummvm/commit/3def51a84141bcb5761d8b538e610761b5eb0466
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Moved timer handler to EventsManager, life_line unused

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/global.cpp
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 1c5f3b81159..95f61ef7b97 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -22,6 +22,7 @@
 
 #include "chewy/events.h"
 #include "chewy/global.h"
+#include "chewy/timer.h"
 
 namespace Chewy {
 
@@ -30,40 +31,28 @@ EventsManager *g_events;
 EventsManager::EventsManager(Graphics::Screen *screen) :
 		EventsBase(screen) {
 	g_events = this;
-	init_life_handler();
+	init_timer_handler();
 }
 
 EventsManager::~EventsManager() {
 	g_events = nullptr;
 }
 
-void EventsManager::init_life_handler() {
-	life_anz = false;
-	life_flag = false;
-	life_handler = true;
 
-	addTimer(life_line, (uint32)(1000 / 18.2));
-}
-
-void EventsManager::life_line() {
-	if (!life_flag) {
-		life_flag = true;
-		if (life_y > 190) {
-			life_y = 0;
-			out->cls();
-		}
-		int x = strlen(life_str);
-		out->printxy(life_x, life_y, 255, 0, scr_width, life_str);
-		for (int i = 0; i < life_anz; i++)
-			out->printchar('.', 255, 0, scr_width);
-		++life_anz;
-		if (life_anz > 50 - x) {
-			life_anz = 0;
+void EventsManager::init_timer_handler() {
+	timer_int = true;
+	timer_flag = false;
+	timer_count = 0;
 
-			out->box_fill(x * fvorx6x8, life_y, 319, life_y + 8, 0);
+	addTimer(timer_handler, (uint32)(1000 / 18.2));
+}
 
-		}
-		life_flag = false;
+void EventsManager::timer_handler() {
+	if (timer_flag == false) {
+		timer_flag = true;
+		if (!timer_suspend)
+			++timer_count;
+		timer_flag = false;
 	}
 }
 
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 93715e80e96..ad3e12092e9 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -29,9 +29,8 @@ namespace Chewy {
 
 class EventsManager : public EventsBase {
 private:
-	void init_life_handler();
-	static void life_line();
-
+	void init_timer_handler();
+	static void timer_handler();
 public:
 	EventsManager(Graphics::Screen *screen);
 	virtual ~EventsManager();
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e39f9e33c95..65d745a5b66 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -124,8 +124,6 @@ int16 life_anz;
 char *life_str;
 int16 life_handler;
 
-void (*old1chandler)(void);
-
 void (*SetUpScreenFunc)(void);
 
 SprInfo spr_info[MAX_PROG_ANI];
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index e9f8a1e94ff..f79d585cfbe 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -27,24 +27,20 @@
 
 namespace Chewy {
 
-static int16 timer_flag;
-static int16 timer_int;
-static int timer_count;
-void timer_handler(void);
-void (* old1c)(void);
-static int16 timer_suspend;
+bool timer_flag;
+bool timer_int;
+int timer_count;
+bool timer_suspend;
 
 timer::timer(int16 max_t, TimerBlk *t) {
 	timer_blk = t;
 	timer_max = max_t;
 	timer_int = false;
 	timer_suspend = false;
-	init_timer_handler();
 	set_all_status(TIMER_STOP);
 }
 
 timer::~timer() {
-	remove_timer_handler();
 }
 
 float timer_freq[6] = {
@@ -143,43 +139,6 @@ void timer::set_all_status(int16 status) {
 	}
 }
 
-void timer::init_timer_handler() {
-	warning("STUB: init_timer_handler()");
-#if 0
-	if (!timer_int) {
-		timer_int = TRUE;
-		timer_flag = FALSE;
-		timer_count = 0;
-		_disable();
-		old1c = _dos_getvect(0x1c);
-		_dos_setvect(0x1c, timer_handler);
-		_enable();
-	}
-#endif
-}
-
-void timer::remove_timer_handler() {
-	warning("STUB: remove_timer_handler()");
-#if 0
-	if (timer_int) {
-		timer_int = FALSE;
-		_disable();
-		_dos_setvect(0x1c, old1c);
-		_enable();
-	}
-#endif
-}
-
-void timer_handler(void) {
-	old1c();
-	if (timer_flag == false) {
-		timer_flag = true;
-		if (!timer_suspend)
-			++timer_count;
-		timer_flag = false;
-	}
-}
-
 void timer::disable_timer() {
 	timer_suspend = true;
 }
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 67cd42fc859..3d59089fc67 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -38,6 +38,11 @@ namespace Chewy {
 
 #define TIMER_UNFREEZE 3
 
+extern bool timer_flag;
+extern bool timer_int;
+extern int timer_count;
+extern bool timer_suspend;
+
 struct TimerBlk {
 	int16 TimeCount;
 
@@ -74,11 +79,6 @@ public:
 	void enable_timer();
 
 private:
-
-	void init_timer_handler();
-
-	void remove_timer_handler();
-
 	TimerBlk *timer_blk;
 
 	int16 timer_max;


Commit: 0531bd59b3601a8edc54e2ef263cc2e08062e4de
    https://github.com/scummvm/scummvm/commit/0531bd59b3601a8edc54e2ef263cc2e08062e4de
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Minor mouse/rendering cleanup

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/maus.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 56aaa9710c6..3363ae8a368 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -22,9 +22,10 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_rand
 
-#include "chewy/ngshext.h"
 #include "chewy/main.h"
+#include "chewy/chewy.h"
 #include "chewy/menus.h"
+#include "chewy/ngshext.h"
 
 namespace Chewy {
 
@@ -711,6 +712,8 @@ void set_up_screen(int16 mode) {
 		            spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 		            ScrXy[0], ScrXy[1],
 		            &spieler.scrollx, &spieler.scrolly);
+
+	g_engine->_screen->update();
 }
 
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index d627e727efe..29fbf98099b 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -20,8 +20,9 @@
  *
  */
 
-#include "chewy/maus.h"
 #include "common/textconsole.h"
+#include "chewy/maus.h"
+#include "chewy/events.h"
 
 namespace Chewy {
 
@@ -113,24 +114,7 @@ void maus::speed(int16 x, int16 y) {
 }
 
 void maus::move_mouse(int16 x, int16 y) {
-	warning("STUB - mouse_mouse");
-#if 0
-	int16 tx;
-	int16 ty;
-	tx = x;
-	ty = y;
-#pragma aux asm_move = "push ax"\
-"push cx"\
-"push dx"\
-"mov cx,tx"\
-"mov dx,ty"\
-"mov ax,4"\
-"int 033h"\
-"pop dx"\
-"pop cx"\
-"pop ax"
-	asm_move();
-#endif
+	g_events->warpMouse(Common::Point(x, y));
 }
 
 void maus::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {


Commit: 62671f9bf2077ad5a58f4a40aa13269df58fab66
    https://github.com/scummvm/scummvm/commit/62671f9bf2077ad5a58f4a40aa13269df58fab66
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:58-08:00

Commit Message:
CHEWY: Properly translate palettes when setting them

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/video/cfo_decoder.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index af8cf8172d4..b2b6f321d6e 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -80,8 +80,20 @@ byte *get_dispoff() {
 	return screenP;
 }
 
-void setpalette(byte *palette) {
-	g_system->getPaletteManager()->setPalette(palette, 0, PALETTE_COUNT);
+#define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
+
+void setScummVMPalette(const byte *palette, uint start, uint count) {
+	byte pal[PALETTE_SIZE];
+	byte *dest = &pal[0];
+
+	for (uint i = 0; i < count * 3; ++i, ++palette, ++dest)
+		*dest = VGA_COLOR_TRANS(*palette);
+
+	g_system->getPaletteManager()->setPalette(pal, start, count);
+}
+
+void setpalette(const byte *palette) {
+	setScummVMPalette(palette, 0, PALETTE_COUNT);
 }
 
 void save_palette(byte *palette) {
@@ -101,11 +113,11 @@ void rastercol(int16 color, int16 r, int16 g, int16 b) {
 	rgb[1] = g;
 	rgb[2] = b;
 
-	g_system->getPaletteManager()->setPalette(&rgb[0], color, 1);
+	setScummVMPalette(&rgb[0], color, 1);
 }
 
 void set_palpart(byte *palette, int16 startcol, int16 anz) {
-	g_system->getPaletteManager()->setPalette(palette, startcol, anz);
+	setScummVMPalette(palette, startcol, anz);
 }
 
 void clear_mcga() {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 90ea6abad59..622ad843849 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -38,7 +38,8 @@ void hflyback_end();
 void set_pointer(byte *ptr);
 byte *get_dispoff();
 
-void setpalette(byte *palette);
+void setScummVMPalette(const byte *palette, uint start, uint count);
+void setpalette(const byte *palette);
 void save_palette(byte *pal);
 void restore_palette();
 void rastercol(int16 color, int16 r, int16 g, int16 b);
diff --git a/engines/chewy/video/cfo_decoder.cpp b/engines/chewy/video/cfo_decoder.cpp
index 6dda1f87269..44cd29f8d34 100644
--- a/engines/chewy/video/cfo_decoder.cpp
+++ b/engines/chewy/video/cfo_decoder.cpp
@@ -25,7 +25,7 @@
 #include "engines/engine.h"
 #include "graphics/palette.h"
 #include "video/flic_decoder.h"
-
+#include "chewy/mcga.h"
 #include "chewy/sound.h"
 #include "chewy/video/cfo_decoder.h"
 
@@ -310,7 +310,7 @@ void CfoDecoder::CfoVideoTrack::fadeOut() {
 				--_palette[i * 3 + 2];
 		}
 
-		g_system->getPaletteManager()->setPalette(_palette, 0, 256);
+		setScummVMPalette(_palette, 0, 256);
 		g_system->updateScreen();
 		g_system->delayMillis(10);
 	}


Commit: c3a5c09315905cc9a8a2dc80fb4323e59cab80b9
    https://github.com/scummvm/scummvm/commit/c3a5c09315905cc9a8a2dc80fb4323e59cab80b9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Start of MainMenu class, clean up load_tmf methods

Changed paths:
  A engines/chewy/main_menu.cpp
  A engines/chewy/main_menu.h
    engines/chewy/datei.cpp
    engines/chewy/main.cpp
    engines/chewy/module.mk
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 1bd76fe7687..adb38c0164c 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -42,28 +42,11 @@ uint8 tmp[10000]; // FIXME
 
 extern int16 modul;
 extern int16 fcode;
-int16 *ft ;
+int16 *ft;
+
 datei::datei() {
-#if 0
-	int16 i;
-	char *enstr;
-	char a[] = {129, 122, 134, 96, 133, 120, 137, 120, 116, 127, 0}; //"NGS-REVEAL"
-	char
-	b[] = {121, 124, 127, 120, 146, 128, 116, 129, 116, 122, 120, 133, 146, 91, 118, 92, 146,
-		129, 120, 138, 146, 122, 120, 129, 120, 133, 116, 135, 124, 130, 129, 146, 134, 130,
-		121, 135, 138, 116, 133, 120, 0 }; // "FILE_MANAGER_(C)_NEW_GENERATION_SOFTWARE"
-	for (i = 0; a[i] != 0; i++)
-		a[i] -= 51;
-	for (i = 0; b[i] != 0; i++)
-		b[i] -= 51;
-	enstr = (char *)getenv(a);
-	if (enstr) {
-		printf(b);
-		printf("\n");
-		delay(800);
-	}
-#endif
 }
+
 datei::~datei() {
 }
 
@@ -855,34 +838,25 @@ uint32 datei::load_item(Stream *handle, byte *speicher) {
 }
 
 uint32 datei::load_tmf(const char *fname, tmf_header *th) {
-	Stream *handle;
+	Common::File f;
 	uint32 size = 0;
-	byte *speicher;
+	byte *speicher = nullptr;
 	int16 ok, i;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'M';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
-	speicher = (byte *)th;
 
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		chewy_fseek(handle, 0l, SEEK_END);
-		size = chewy_ftell(handle);
-		chewy_fseek(handle, 0l, SEEK_SET);
-		if (!(chewy_fread(th, sizeof(tmf_header), 1, handle))) {
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!strchr(filename, '.'))
+		strcat(filename, ".tmf");
+
+	if (f.open(filename)) {
+		size = f.size();
+
+		if (!th->load(&f)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
-			size -= sizeof(tmf_header);
-			speicher += sizeof(tmf_header);
+			size -= tmf_header::SIZE();
+			speicher = (byte *)th + sizeof(tmf_header);
 			ok = 0;
 			if (!strncmp(th->id, "TMF", 3))
 				ok = 1;
@@ -892,17 +866,18 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 			}
 		}
 		if (!modul) {
-			if (!(chewy_fread(speicher, size, 1, handle))) {
+			if (f.read(speicher, size) != size) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			}
 		}
-		chewy_fclose(handle);
-	}
-	else {
+
+		f.close();
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
+
 	if (!modul) {
 		speicher = (byte *)th;
 		speicher += sizeof(tmf_header);
@@ -914,46 +889,48 @@ uint32 datei::load_tmf(const char *fname, tmf_header *th) {
 			}
 		}
 	}
-	return (size + sizeof(tmf_header));
+
+	return size + sizeof(tmf_header);
 }
 
 uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
-	ChunkHead *ch;
-	byte *speicher;
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
+	ChunkHead *ch = (ChunkHead *)tmp;
+	byte *speicher = nullptr;
+	uint32 size = 0;
 	int16 i;
-	ch = (ChunkHead *) tmp;
-	speicher = (byte *)song;
-	if (handle) {
-		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
+
+	if (rs) {
+		rs->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+		if (!ch->load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
-		}
-		else {
+		} else {
 			if (ch->type == TMFDATEI) {
-				if (!(chewy_fread(speicher, ch->size, 1, handle))) {
+				assert(ch->size > tmf_header::SIZE());
+
+				if (!song->load(rs)) {
 					modul = DATEI;
 					fcode = READFEHLER;
-				}
-				else {
-					speicher = (byte *)song;
-					speicher += sizeof(tmf_header);
+				} else {
+					size = ch->size + sizeof(tmf_header);
+					speicher = (byte *)song + sizeof(tmf_header);
 					speicher += ((uint32)song->pattern_anz) * 1024l;
-					for (i = 0; i < 31; i++) {
+					for (i = 0; i < 31; ++i) {
 						if (song->instrument[i].laenge) {
 							song->ipos[i] = speicher;
 							speicher += song->instrument[i].laenge;
 						}
 					}
 				}
-			}
-			else {
+			} else {
 				modul = DATEI;
 				fcode = NOTTBF;
 			}
 		}
 	}
-	return (ch->size);
+
+	return size;
 }
 
 void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 3363ae8a368..558f5ca79c7 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -24,8 +24,10 @@
 
 #include "chewy/main.h"
 #include "chewy/chewy.h"
+#include "chewy/events.h"
 #include "chewy/menus.h"
 #include "chewy/ngshext.h"
+#include "chewy/main_menu.h"
 
 namespace Chewy {
 
@@ -83,7 +85,7 @@ void game_main() {
 	cursor_wahl(CUR_WALK);
 	workptr = workpage + 4l;
 
-	test_menu();
+	MainMenu::execute();
 	remove(ADSH_TMP);
 	tidy();
 	out->rest_palette();
@@ -714,6 +716,7 @@ void set_up_screen(int16 mode) {
 		            &spieler.scrollx, &spieler.scrolly);
 
 	g_engine->_screen->update();
+	g_events->update();
 }
 
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
@@ -1253,6 +1256,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			gpkt.Ebenen = room->GedInfo[room_blk.AkAblage].Ebenen;
 			gpkt.AkMovEbene = ged_mov_ebene;
 			mov->goto_xy(&gpkt);
+
 			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
 			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 			spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
new file mode 100644
index 00000000000..5c922f05b56
--- /dev/null
+++ b/engines/chewy/main_menu.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/textconsole.h"
+#include "chewy/main_menu.h"
+#include "chewy/global.h"
+#include "chewy/ngshext.h"
+
+namespace Chewy {
+
+void MainMenu::execute() {
+	mem->file->select_pool_item(music_handle, EndOfPool - 17);
+	mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
+	if (!modul)
+		ailsnd->play_mod((tmf_header *)Ci.MusicSlot);
+
+	// TODO
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
new file mode 100644
index 00000000000..f5b08141c8e
--- /dev/null
+++ b/engines/chewy/main_menu.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_MAIN_MENU_H
+#define CHEWY_MAIN_MENU_H
+
+#include "chewy/events_base.h"
+
+namespace Chewy {
+
+class MainMenu {
+public:
+	static void execute();
+};
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 65f75712748..0c47e4dcde3 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -22,10 +22,11 @@ MODULE_OBJS = \
 	flic.o \
 	gedclass.o \
 	global.o \
-	main.o \
-	m_event.o \
 	inits.o \
 	io_game.o \
+	m_event.o \
+	main.o \
+	main_menu.o \
 	maus.o \
 	mcga.o \
 	mcga_grafik.o \
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 6090c3e8a72..49dd0ea42d2 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -269,6 +269,7 @@ struct tmf_header {
 	byte *ipos[31] = { nullptr };
 
 	bool load(Common::SeekableReadStream *src);
+	static const size_t SIZE() { return 0x284; }
 };
 
 struct musik_info {


Commit: f3b3b9aeecf121548d1c492c20e373088c7f9147
    https://github.com/scummvm/scummvm/commit/f3b3b9aeecf121548d1c492c20e373088c7f9147
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Added File methods for opening files and reading uint16 arrays

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/file.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 0ce76995574..5da71b2894a 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -36,6 +36,29 @@ int16 file_icons[8 * 4] = { 14, 73, 32, 94,
                             232, 143, 310, 193
                           };
 
+Common::File *File::open(const char *name) {
+	Common::File *f = new Common::File();
+	if (f->open(name)) {
+		return f;
+	} else {
+		delete f;
+		return nullptr;
+	}
+}
+
+bool File::readArray(Common::SeekableReadStream *src, uint16 *arr, size_t size) {
+	Common::SeekableReadStream *rs = src->readStream(size * 2);
+
+	bool result = (uint32)rs->size() == (size * 2);
+	if (result) {
+		for (; size > 0; --size, ++arr)
+			*arr = src->readUint16LE();
+	}
+
+	delete rs;
+	return result;
+}
+
 int16 call_fileio(int16 palette, int16 mode) {
 	short ret;
 	ret = 0;
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 1b28d394974..0a911514c76 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -30,15 +30,24 @@ namespace Chewy {
 
 using Common::Stream;
 
+class File {
+public:
+	/**
+	 * Opens up a file, returning it if successful,
+	 * or nullptr if not
+	 */
+	static Common::File *open(const char *name);
+
+	/**
+	 * Reads an array of uint16 values
+	 */
+	static bool readArray(Common::SeekableReadStream *src,
+		uint16 *arr, size_t size);
+};
+
 inline Stream *chewy_fopen(const char *fname, const char *mode) {
 	assert(!strcmp(mode, "rb"));
-	Common::File *f = new Common::File();
-	if (f->open(fname)) {
-		return f;
-	} else {
-		delete f;
-		return nullptr;
-	}
+	return File::open(fname);
 }
 
 inline void chewy_fclose(Stream *&stream) {
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 370ecd95dc3..4fbb73dda7c 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -382,11 +382,10 @@ void flic::custom_play(CustomInfo *ci) {
 							++CurrentFrame;
 						}
 						else if (custom_frame.type == CUSTOM) {
-							decode_custom_frame(ci->Handle);
+							decode_custom_frame(
+								dynamic_cast<Common::SeekableReadStream *>(ci->Handle));
 
-						} else
-
-						{
+						} else {
 							out->raster_col(255, 63, 63, 63);
 							out->printxy(0, 0, 255, 0, 0, "Unknown Frame Type");
 							taste;
@@ -405,8 +404,7 @@ void flic::custom_play(CustomInfo *ci) {
 	}
 }
 
-void flic::decode_custom_frame(void *h) {
-	Stream *handle = (Stream *)h;
+void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
 	ChunkHead chead;
 	uint16 i, j;
@@ -424,7 +422,7 @@ void flic::decode_custom_frame(void *h) {
 		switch (chead.type) {
 
 		case FADE_IN:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -435,7 +433,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case FADE_OUT:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -496,7 +494,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case PLAY_SEQ:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -515,7 +513,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case PLAY_PATTERN:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -552,7 +550,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_MVOL :
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -565,7 +563,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_LOOPMODE :
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -582,7 +580,7 @@ void flic::decode_custom_frame(void *h) {
 
 		case PLAY_VOC :
 
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -599,7 +597,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_SVOL :
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -611,7 +609,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_CVOL :
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -623,7 +621,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case FREE_EFFECT:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -631,7 +629,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case MFADE_IN:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -643,7 +641,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case MFADE_OUT:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
@@ -655,7 +653,7 @@ void flic::decode_custom_frame(void *h) {
 			break;
 
 		case SET_STEREO:
-			if (!chewy_fread(&para[0], chead.size, 1, handle)) {
+			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 20e2d003ef9..70fa2e580b7 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -99,7 +99,7 @@ private:
 	void col64_chunk(byte *tmp);
 	void delta_chunk_byte(byte *tmp);
 
-	void decode_custom_frame(void *handle);
+	void decode_custom_frame(Common::SeekableReadStream *handle);
 	void free_sound(int16 nr);
 
 	byte *load_puffer;


Commit: 7ac1c991ec48da9a46763d64cbd6b21d0e5795ff
    https://github.com/scummvm/scummvm/commit/7ac1c991ec48da9a46763d64cbd6b21d0e5795ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Cleanup of flic class

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 4fbb73dda7c..e3534ced41e 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -36,9 +36,7 @@ void decode_rle(byte *vscr, byte *dbuf, int br, int h) {
 
 
 flic::flic() {
-	int16 i;
-	for (i = 0; i < 50; i++)
-		sounds[i] = 0;
+	Common::fill(&sounds[0], &sounds[50], (byte *)nullptr);
 }
 
 flic::~flic() {
@@ -47,19 +45,18 @@ flic::~flic() {
 void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 	Stream *lhandle;
 
-	lhandle = chewy_fopen(fname, "rb");
+	lhandle = File::open(fname);
 	if (lhandle) {
 		play(lhandle, vscreen, load_p);
-		chewy_fclose(lhandle);
-	}
-	else {
+		delete lhandle;
+	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
 }
 
-void flic::play(void *h, byte *vscreen, byte *load_p) {
-	Stream *handle = (Stream *)h;
+void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	uint16 i;
 	size_t tmp_size;
 	char key;
@@ -68,7 +65,7 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 
 	load_puffer = load_p;
 	virt_screen = vscreen + 4;
-	if (chewy_fread(&flic_header, sizeof(FlicHead), 1, handle)) {
+	if (flic_header.load(rs)) {
 		if (flic_header.type == FLC) {
 
 			key = 0;
@@ -78,33 +75,32 @@ void flic::play(void *h, byte *vscreen, byte *load_p) {
 			cls_flag = false;
 			CurrentFrame = 0;
 			for (i = 0; (i < flic_header.frames) && (!modul) && (key != 27); i++) {
-				if (!chewy_fread(&frame_header, sizeof(FrameHead), 1, handle)) {
+				if (!frame_header.load(rs)) {
 					modul = DATEI;
 					fcode = READFEHLER;
-				}
-				else {
+				} else {
 					if (frame_header.type != PREFIX) {
 						tmp_size = ((size_t)frame_header.size) - sizeof(FrameHead);
 						start = (float) g_system->getMillis(); // clock()
 						start /= 0.05f;
 						start += flic_header.speed;
 						if (tmp_size) {
-							if (!chewy_fread(load_puffer, tmp_size, 1, handle)) {
+							if (rs->read(load_puffer, tmp_size) != tmp_size) {
 								modul = DATEI;
 								fcode = READFEHLER;
-							}
-							else
+							} else {
 								decode_frame();
+							}
 						}
+
 						do {
 							ende = (float)g_system->getMillis(); // clock()
 							ende /= 0.05f;
 						} while (ende <= start);
 						++CurrentFrame;
+					} else {
+						rs->seek(frame_header.size - (int)FrameHead::SIZE(), SEEK_CUR);
 					}
-					else
-						chewy_fseek(handle, frame_header.size - (long)sizeof(FrameHead),
-						      SEEK_CUR);
 				}
 			}
 		}
@@ -261,7 +257,6 @@ void flic::col64_chunk(byte *tmp) {
 }
 
 void flic::delta_chunk_byte(byte *tmp) {
-
 	short int *ipo;
 	byte *abl;
 	byte *tabl;
@@ -342,11 +337,12 @@ void flic::custom_play(CustomInfo *ci) {
 	Sound = ci->SoundSlot;
 
 	if (ci->Fname != 0) {
-		ci->Handle = chewy_fopen(ci->Fname, "rb");
-		chewy_fseek((Stream *)ci->Handle, 0, SEEK_SET);
+		ci->Handle = File::open(ci->Fname);
 	}
-	if (ci->Handle) {
-		if (chewy_fread(&custom_header, sizeof(CustomFlicHead), 1, (Stream *)ci->Handle)) {
+
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(ci->Handle);
+	if (rs) {
+		if (custom_header.load(rs)) {
 			if (!scumm_strnicmp(custom_header.id, "CFO\0", 4)) {
 				key = 0;
 				trace_mode = false;
@@ -357,22 +353,20 @@ void flic::custom_play(CustomInfo *ci) {
 				CurrentFrame = 0;
 				for (i = 0; (i < custom_header.frames) && (!modul) && (key != 27); i++) {
 
-					if (!chewy_fread(&custom_frame, sizeof(CustomFrameHead), 1, (Stream *)ci->Handle)) {
+					if (!custom_frame.load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
-					}
-					else {
+					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
 
 							start = (float) g_system->getMillis(); // clock()
 							start /= 0.05f;
 							start += (float)custom_header.speed;
 							if (custom_frame.size) {
-								if (!chewy_fread(load_puffer, custom_frame.size, 1, (Stream *)ci->Handle)) {
+								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									modul = DATEI;
 									fcode = READFEHLER;
-								}
-								else
+								} else
 									decode_cframe();
 							}
 							do {
@@ -397,8 +391,7 @@ void flic::custom_play(CustomInfo *ci) {
 		}
 		if (ci->Fname != 0)
 			chewy_fclose(ci->Handle);
-	}
-	else {
+	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
@@ -411,16 +404,15 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	tmf_header *th;
 	byte *tmp;
 	musik_info mi;
-	long long_para;
 	th = (tmf_header *)Music;
 
 	for (i = 0; (i < custom_frame.chunks) && (!modul); i++) {
-		if (!chewy_fread(&chead, sizeof(ChunkHead), 1, handle)) {
+		if (!chead.load(handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		switch (chead.type) {
 
+		switch (chead.type) {
 		case FADE_IN:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
@@ -441,7 +433,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case LOAD_MUSIC:
-			if (!chewy_fread(Music, chead.size, 1, handle)) {
+			if (handle->read(Music, chead.size) != chead.size) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -459,8 +451,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case LOAD_RAW:
-			if ((!chewy_fread(&para[0], 2, 1, handle)) ||
-			        (!chewy_fread(Sound, chead.size - 2, 1, handle))) {
+			if (!File::readArray(handle, &para[0], 1) ||
+			        handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -471,8 +463,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case LOAD_VOC:
-			if ((!chewy_fread(&para[0], 2, 1, handle)) ||
-			        (!chewy_fread(Sound, chead.size - 2, 1, handle))) {
+			if (!File::readArray(handle, &para[0], 1) ||
+				handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -663,11 +655,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case SET_SPEED :
-			if (!chewy_fread(&long_para, chead.size, 1, handle)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else
-				custom_header.speed = long_para;
+			custom_header.speed = handle->readUint32LE();
 			break;
 
 		case CLEAR_SCREEN:
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 70fa2e580b7..6d5cf39f9c0 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -85,7 +85,7 @@ public:
 	~flic();
 	void play(const char *fname, byte *vscreen, byte *load_p);
 
-	void play(void *handle, byte *vscreen, byte *load_p);
+	void play(Common::Stream *handle, byte *vscreen, byte *load_p);
 	void set_flic_user_function(int16(*user_funktion)(int16 key));
 	void remove_flic_user_function();
 	void custom_play(CustomInfo *ci);
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 41913fa8b1c..691c69dc1e4 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -262,6 +262,39 @@ bool GedChunkHeader::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool FlicHead::load(Common::SeekableReadStream *src) {
+	size = src->readUint32LE();
+	type = src->readUint16LE();
+	frames = src->readUint16LE();
+	width = src->readUint16LE();
+	height = src->readUint16LE();
+	depth = src->readUint16LE();
+	flags = src->readUint16LE();
+	speed = src->readUint32LE();
+	reserved1 = src->readUint16LE();
+	created = src->readUint32LE();
+	creator = src->readUint32LE();
+	updated = src->readUint32LE();
+	updater = src->readUint32LE();
+	aspect_dx = src->readUint16LE();
+	aspect_dy = src->readUint16LE();
+	src->read(reserved2, 38);
+	oframe1 = src->readUint32LE();
+	oframe2 = src->readUint32LE();
+	src->read(reserved3, 40);
+
+	return true;
+};
+
+bool FrameHead::load(Common::SeekableReadStream *src) {
+	size = src->readUint32LE();
+	type = src->readUint16LE();
+	chunks = src->readUint16LE();
+	src->read(reserved, 8);
+
+	return true;
+}
+
 bool ChunkHead::load(Common::SeekableReadStream *src) {
 	size = src->readUint32LE();
 	type = src->readUint16LE();
@@ -269,4 +302,24 @@ bool ChunkHead::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool CustomFlicHead::load(Common::SeekableReadStream *src) {
+	src->read(id, 4);
+	size = src->readUint32LE();
+	frames = src->readUint16LE();
+	width = src->readUint16LE();
+	height = src->readUint16LE();
+	speed = src->readUint32LE();
+	oframe1 = src->readUint32LE();
+
+	return true;
+}
+
+bool CustomFrameHead::load(Common::SeekableReadStream *src) {
+	size = src->readUint32LE();
+	type = src->readUint16LE();
+	chunks = src->readUint16LE();
+
+	return true;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 49dd0ea42d2..dedd9dee9c5 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -485,6 +485,8 @@ struct FlicHead {
 	uint32 oframe1 = 0;
 	uint32 oframe2 = 0;
 	uint8 reserved3[40] = { 0 };
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct FrameHead {
@@ -492,6 +494,9 @@ struct FrameHead {
 	uint16 type = 0;
 	uint16 chunks = 0;
 	uint8 reserved[8] = { 0 };
+
+	bool load(Common::SeekableReadStream *src);
+	static size_t SIZE() { return 16; }
 };
 
 struct ChunkHead {
@@ -510,12 +515,16 @@ struct CustomFlicHead {
 	uint16 height = 0;
 	uint32 speed = 0;
 	uint32 oframe1 = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct CustomFrameHead {
 	uint32 size = 0;
 	uint16 type = 0;
 	uint16 chunks = 0;
+
+	bool load(Common::SeekableReadStream *src);
 };
 
 struct CustomInfo {


Commit: 3dcdb41b9da5d70086349ce42445c6f86f38c994
    https://github.com/scummvm/scummvm/commit/3dcdb41b9da5d70086349ce42445c6f86f38c994
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Further flic class cleanup

Changed paths:
    engines/chewy/file.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 0a911514c76..fd913f905b7 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -23,6 +23,7 @@
 #ifndef CHEWY_FILE_H
 #define CHEWY_FILE_H
 
+#include "common/algorithm.h"
 #include "common/file.h"
 #include "common/textconsole.h"
 
@@ -45,6 +46,7 @@ public:
 		uint16 *arr, size_t size);
 };
 
+
 inline Stream *chewy_fopen(const char *fname, const char *mode) {
 	assert(!strcmp(mode, "rb"));
 	return File::open(fname);
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index e3534ced41e..fde541d055e 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/system.h"
+#include "common/memstream.h"
 #include "chewy/file.h"
 #include "chewy/flic.h"
 
@@ -111,58 +112,69 @@ void flic::decode_frame() {
 	uint16 i;
 	byte *tmp_buf;
 	bool update_flag;
+	ChunkHead chunk_header;
+
 	tmp_buf = load_puffer;
 	update_flag = false;
 	if (frame_header.chunks != 0) {
 		fade_flag = false;
 		for (i = 0; i < frame_header.chunks; i++) {
-			chunk_header = (ChunkHead *)tmp_buf;
-			tmp_buf += sizeof(ChunkHead);
-			chunk_header->size -= sizeof(ChunkHead);
-			switch (chunk_header->type) {
+			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
+			chunk_header.load(&rs);
+
+			tmp_buf += ChunkHead::SIZE();
+			chunk_header.size -= ChunkHead::SIZE();
+
+			switch (chunk_header.type) {
 			case COLOR_256:
 				col256_chunk(tmp_buf);
-
 				break;
-			case COLOR_64 :
-				col64_chunk(tmp_buf);
 
+			case COLOR_64:
+				col64_chunk(tmp_buf);
 				break;
-			case BYTE_RUN :
+
+			case BYTE_RUN:
 				decode_rle(virt_screen, tmp_buf,
 				           (int)flic_header.width,
 				           (int)flic_header.height);
 				update_flag = true;
 				break;
+
 			case DELTA_FLC:
 				decode_flc(virt_screen, tmp_buf);
 				update_flag = true;
 				break;
-			case DELTA_FLI:
 
+			case DELTA_FLI:
 				delta_chunk_byte(tmp_buf);
 
 				update_flag = true;
 				break;
-			case CLS :
+
+			case CLS:
 				out->setze_zeiger(virt_screen);
 				out->cls();
 				out->setze_zeiger(0);
 
 				update_flag = true;
 				break;
+
 			case UNPRESSED:
 				out->back2back(load_puffer, virt_screen);
 
 				update_flag = true;
 				break;
-			case PSTAMP :
+
+			case PSTAMP:
 				break;
-			default:
 
+			default:
 				update_flag = true;
+				break;
 			}
-			tmp_buf += chunk_header->size;
+
+			tmp_buf += chunk_header.size;
 		}
 		if (update_flag != false) {
 			if (flic_user) {
@@ -351,8 +363,8 @@ void flic::custom_play(CustomInfo *ci) {
 				fade_flag = false;
 				fade_delay = 0;
 				CurrentFrame = 0;
-				for (i = 0; (i < custom_header.frames) && (!modul) && (key != 27); i++) {
 
+				for (i = 0; (i < custom_header.frames) && (!modul) && (key != 27); i++) {
 					if (!custom_frame.load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
@@ -475,7 +487,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 			break;
 
-		case PLAY_MUSIC :
+		case PLAY_MUSIC:
 			if (!strncmp(th->id, "TMF\0", 4))
 #ifndef AIL
 				snd->play_mod(th);
@@ -531,7 +543,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 			break;
 
-		case WAIT_MSTOP :
+		case WAIT_MSTOP:
 			do {
 #ifndef AIL
 				snd->get_musik_info(&mi);
@@ -541,7 +553,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			} while (mi.musik_playing != 0);
 			break;
 
-		case SET_MVOL :
+		case SET_MVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -554,7 +566,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 			break;
 
-		case SET_LOOPMODE :
+		case SET_LOOPMODE:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -566,11 +578,11 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 			break;
 
-		case PLAY_RAW :
+		case PLAY_RAW:
 
 			break;
 
-		case PLAY_VOC :
+		case PLAY_VOC:
 
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
@@ -588,7 +600,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 			break;
 
-		case SET_SVOL :
+		case SET_SVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -600,7 +612,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 			break;
 
-		case SET_CVOL :
+		case SET_CVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -654,7 +666,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 			break;
 
-		case SET_SPEED :
+		case SET_SPEED:
 			custom_header.speed = handle->readUint32LE();
 			break;
 
@@ -667,70 +679,77 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		default:
 			out->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
-
 			break;
 		}
 	}
 }
 
 void flic::decode_cframe() {
+	ChunkHead chunk_header;
 	uint16 i;
 	byte *tmp_buf;
 	int16 update_flag;
 	tmp_buf = load_puffer;
 	update_flag = false;
-	if (custom_frame.chunks != 0) {
 
+	if (custom_frame.chunks != 0) {
 		for (i = 0; i < custom_frame.chunks; i++) {
-			chunk_header = (ChunkHead *)tmp_buf;
-			tmp_buf += sizeof(ChunkHead);
-			chunk_header->size -= sizeof(ChunkHead);
-			switch (chunk_header->type) {
+			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
+			chunk_header.load(&rs);
+
+			tmp_buf += ChunkHead::SIZE();
+			chunk_header.size -= ChunkHead::SIZE();
+
+			switch (chunk_header.type) {
 			case COLOR_256:
 				col256_chunk(tmp_buf);
-
 				break;
-			case COLOR_64 :
 
+			case COLOR_64:
 				break;
-			case BYTE_RUN :
+
+			case BYTE_RUN:
 				decode_rle(virt_screen, tmp_buf,
-				           custom_header.width,
-				           custom_header.height);
+				    custom_header.width, custom_header.height);
 				update_flag = true;
-
 				break;
+
 			case DELTA_FLC:
 				decode_flc(virt_screen, tmp_buf);
 				update_flag = true;
 
 				break;
 			case DELTA_FLI:
-
 				break;
-			case CLS :
+
+			case CLS:
 				out->setze_zeiger(virt_screen);
 				out->cls();
 				out->setze_zeiger(0);
 
 				update_flag = true;
 				break;
+
 			case UNPRESSED:
 				out->back2back(load_puffer, virt_screen);
 
 				update_flag = true;
 				break;
-			case PSTAMP :
+
+			case PSTAMP:
 				break;
-			default:
 
+			default:
 				out->raster_col(255, 63, 63, 63);
 				out->printxy(0, 0, 255, 0, 0, "Unknown CHUNK");
 
 				update_flag = true;
+				break;
 			}
-			tmp_buf += chunk_header->size;
+
+			tmp_buf += chunk_header.size;
 		}
+
 		if (update_flag != false) {
 			if (custom_user) {
 				out->back2back(virt_screen, load_puffer);
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 6d5cf39f9c0..0bf1af86b81 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -111,7 +111,6 @@ private:
 	CustomFlicHead custom_header;
 	CustomFrameHead custom_frame;
 	FrameHead frame_header;
-	ChunkHead *chunk_header;
 	bool fade_flag;
 	bool cls_flag;
 	byte fade_pal[768];
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 5c922f05b56..ae8324e5dae 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -33,6 +33,9 @@ void MainMenu::execute() {
 	if (!modul)
 		ailsnd->play_mod((tmf_header *)Ci.MusicSlot);
 
+	flic_cut(200, 0);
+	ailsnd->stop_mod();
+
 	// TODO
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1ecc39e2b77..60fe9cc8d4a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1087,8 +1087,9 @@ void flic_cut(int16 nr, int16 mode) {
 	det->disable_room_sound();
 	ailsnd->end_sound();
 	g_system->delayMillis(1000); // delay(50);
-	Ci.Handle = chewy_fopen("CUT\\CUT.TAP\0", "rb");
+	Ci.Handle = File::open("cut/cut.tap");
 	Ci.Fname = 0;
+
 	if (Ci.Handle) {
 		switch (nr) {
 		case FCUT_001:


Commit: fe6c1ceecb48969559997fd8d24eecd0f36285d8
    https://github.com/scummvm/scummvm/commit/fe6c1ceecb48969559997fd8d24eecd0f36285d8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Implemented decode_rle method

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index fde541d055e..e731f05902b 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -27,12 +27,41 @@
 
 namespace Chewy {
 
-void decode_flc(byte *vscr, byte *dbuf) {
+void decode_flc(byte *vscr, const byte *dbuf) {
 	warning("STUB: decode_flc()");
 }
 
-void decode_rle(byte *vscr, byte *dbuf, int br, int h) {
-	warning("STUB: decode_rle()");
+void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
+	int x;
+
+	for (; h > 0; --h, vscr += SCREEN_WIDTH) {
+		byte *dest = vscr;
+		++dbuf;		// Skip number of entries in line
+
+		for (x = 0; x < br; ) {
+			int8 len = (int8)*dbuf++;
+			if (len < 0) {
+				// Copy a number of bytes specified in lower 7 bits
+				len = -len;
+				if (len) {
+					Common::copy(dbuf, dbuf + len, dest);
+					dbuf += len;
+					dest += len;
+					x += len;
+				}
+			} else {
+				// Run length in the lower 7 bits of the next byte
+				byte v = *dbuf++;
+				if (len) {
+					Common::fill(dest, dest + len, v);
+					x += len;
+					dest += len;
+				}
+			}
+		}
+
+		assert(x == br);
+	}
 }
 
 
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 0bf1af86b81..48d862beda0 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -73,8 +73,8 @@ enum CustomTypes {
 	CLEAR_SCREEN = 21
 };
 
-void decode_flc(byte *vscr, byte *dbuf);
-void decode_rle(byte *vscr, byte *dbuf, int br, int h);
+extern void decode_flc(byte *vscr, const byte *dbuf);
+extern void decode_rle(byte *vscr, const byte *dbuf, int br, int h);
 
 static int16(*custom_user)(int16) = 0;
 static int16(*flic_user)(int16) = 0;


Commit: 8d5a394c510d3b7cc8a741a88fac6f76c46511eb
    https://github.com/scummvm/scummvm/commit/8d5a394c510d3b7cc8a741a88fac6f76c46511eb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Fixes for flic playback frame display

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 4d24bad3938..f87a5ec899c 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -32,6 +32,7 @@
 namespace Chewy {
 
 ChewyEngine *g_engine;
+Graphics::Screen *g_screen;
 
 ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 		: Engine(syst),
@@ -42,6 +43,7 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 		_sound(nullptr) {
 
 	g_engine = this;
+	g_screen = nullptr;
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 
 	SearchMan.addSubDirectoryMatching(gameDataDir, "back");
@@ -58,10 +60,11 @@ ChewyEngine::~ChewyEngine() {
 	delete _screen;
 	delete _sound;
 	g_engine = nullptr;
+	g_screen = nullptr;
 }
 
 void ChewyEngine::initialize() {
-	_screen = new Graphics::Screen();
+	g_screen = _screen = new Graphics::Screen();
 	_events = new EventsManager(_screen);
 	_sound = new Sound(_mixer);
 }
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 501d61708eb..e4d39ad21b2 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -68,6 +68,7 @@ public:
 };
 
 extern ChewyEngine *g_engine;
+extern Graphics::Screen *g_screen;
 
 } // End of namespace Chewy
 
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index e731f05902b..c28f32921e9 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -22,6 +22,8 @@
 
 #include "common/system.h"
 #include "common/memstream.h"
+#include "chewy/chewy.h"
+#include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/flic.h"
 
@@ -368,7 +370,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 void flic::custom_play(CustomInfo *ci) {
 	uint16 i;
 	char key;
-	float start, ende;
+	uint32 start, ende;
 	bool trace_mode;
 
 	Cinfo = ci;
@@ -399,10 +401,7 @@ void flic::custom_play(CustomInfo *ci) {
 						fcode = READFEHLER;
 					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
-
-							start = (float) g_system->getMillis(); // clock()
-							start /= 0.05f;
-							start += (float)custom_header.speed;
+							start = g_system->getMillis() + custom_header.speed;
 							if (custom_frame.size) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									modul = DATEI;
@@ -410,13 +409,18 @@ void flic::custom_play(CustomInfo *ci) {
 								} else
 									decode_cframe();
 							}
+
+							// Show the next frame
+							g_screen->update();
+
+							// Loop until the frame time expires
 							do {
-								ende = (float)g_system->getMillis(); // clock()
-								ende /= 0.05f;
+								ende = g_system->getMillis();
+								g_events->update();
 							} while (ende <= start);
 							++CurrentFrame;
-						}
-						else if (custom_frame.type == CUSTOM) {
+
+						} else if (custom_frame.type == CUSTOM) {
 							decode_custom_frame(
 								dynamic_cast<Common::SeekableReadStream *>(ci->Handle));
 
@@ -426,7 +430,6 @@ void flic::custom_play(CustomInfo *ci) {
 							taste;
 						}
 					}
-
 				}
 			}
 		}
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index fdb7354ec33..90bbbb2159b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -55,7 +55,7 @@ void standard_init() {
 	out->set_clip(0, 0, 320, 200);
 	out->set_writemode(0);
 	scr_width = 0;
-	screen0 = (byte *)g_engine->_screen->getPixels();
+	screen0 = (byte *)g_screen->getPixels();
 	in->neuer_kb_handler(&kbinfo);
 
 	in->rectangle(0, 0, 320, 210);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 558f5ca79c7..6d8e03d4556 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -715,7 +715,7 @@ void set_up_screen(int16 mode) {
 		            ScrXy[0], ScrXy[1],
 		            &spieler.scrollx, &spieler.scrolly);
 
-	g_engine->_screen->update();
+	g_screen->update();
 	g_events->update();
 }
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index b2b6f321d6e..9508598e78a 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -39,7 +39,7 @@ static int fontFirst, fontLast;
 static int fontX, fontY;
 
 void init_mcga() {
-	screenP = (byte *)g_engine->_screen->getPixels();
+	screenP = (byte *)g_screen->getPixels();
 	screenHasDefault = false;
 	screenDefaultP = nullptr;
 	spriteWidth = 0;
@@ -72,7 +72,7 @@ void set_pointer(byte *ptr) {
 	} else if (screenHasDefault) {
 		screenP = screenDefaultP;
 	} else {
-		screenP = (byte *)g_engine->_screen->getPixels();
+		screenP = (byte *)g_screen->getPixels();
 	}
 }
 
@@ -121,8 +121,8 @@ void set_palpart(byte *palette, int16 startcol, int16 anz) {
 }
 
 void clear_mcga() {
-	if (screenP == (byte *)g_engine->_screen->getPixels())
-		g_engine->_screen->clear();
+	if (screenP == (byte *)g_screen->getPixels())
+		g_screen->clear();
 	else
 		Common::fill(screenP, screenP + SCREEN_WIDTH * SCREEN_HEIGHT, 0);
 }
@@ -132,17 +132,18 @@ void setpixel_mcga(int16 x, int16 y, int16 farbe) {
 }
 
 uint8 getpix(int16 x, int16 y) {
-	byte *pixel = (byte *)g_engine->_screen->getBasePtr(x, y);
+	byte *pixel = (byte *)g_screen->getBasePtr(x, y);
 	return *pixel;
 }
 
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	g_engine->_screen->drawLine(x1, y1, x2, y2, farbe);
+	g_screen->drawLine(x1, y1, x2, y2, farbe);
 }
 
 void mem2mcga(const byte *ptr) {
-	byte *destP = (byte *)g_engine->_screen->getPixels();
+	byte *destP = (byte *)g_screen->getPixels();
 	Common::copy(ptr + 4, ptr + 4 + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
+	g_screen->markAllDirty();
 }
 
 void mem2mcga_masked(const byte *ptr, int16 maske) {
@@ -316,8 +317,8 @@ void setfont(byte *addr, int16 width, int16 height, int16 first, int16 last) {
 }
 
 void upd_scr() {
-	g_engine->_screen->markAllDirty();
-	g_engine->_screen->update();
+	g_screen->markAllDirty();
+	g_screen->update();
 }
 
 void vors() {


Commit: 910e18aad170bab8ffe4ba325ca44cb72cd64a7a
    https://github.com/scummvm/scummvm/commit/910e18aad170bab8ffe4ba325ca44cb72cd64a7a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:34:59-08:00

Commit Message:
CHEWY: Implemented decode_flc method

Changed paths:
    engines/chewy/flic.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index c28f32921e9..d8e3e208ac2 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -30,7 +30,35 @@
 namespace Chewy {
 
 void decode_flc(byte *vscr, const byte *dbuf) {
-	warning("STUB: decode_flc()");
+	Common::MemoryReadStream src(dbuf, 0xffffffff);
+	int h = src.readUint16LE();
+	int val, pair;
+	int8 b;
+
+	for (; h > 0; --h, vscr += SCREEN_WIDTH) {
+		// Get value, and handle any line skips if needed
+		for (val = src.readUint16LE(); val & 0x4000; val = src.readUint16LE()) {
+			vscr += (-val * SCREEN_WIDTH) & 0xffff;
+		}
+
+		// Iteration for pixels within the line
+		byte *dest = vscr;
+		for (; val > 0; --val) {
+			dest += src.readByte();
+			b = src.readSByte();
+
+			if (b < 0) {
+				b = -b;
+				pair = src.readUint16LE();
+				for (; b > 0; --b, dest += 2)
+					WRITE_LE_UINT16(dest, pair);
+
+			} else {
+				for (; b > 0; --b, dest += 2)
+					WRITE_LE_UINT16(dest, src.readUint16LE());
+			}
+		}
+	}
 }
 
 void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {


Commit: 2be255fa9ca0a0a5005fb4f1afb988ffd68a37a0
    https://github.com/scummvm/scummvm/commit/2be255fa9ca0a0a5005fb4f1afb988ffd68a37a0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:00-08:00

Commit Message:
CHEWY: Adding extra fields & flags to Spieler structure

Changed paths:
    engines/chewy/types.h


diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 66fc1ff57ce..f5206633b3c 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -80,228 +80,284 @@ struct Spieler {
 	int16 AadDelay;
 	int16 AadSilent;
 
-	uint16 R0SchleimWurf : 1;
-	uint16 R0KissenWurf : 1;
-	uint16 R0Monokel : 1;
-	uint16 R0GBuch : 1;
-	uint16 R2KabelBork : 1;
-	uint16 R2FussSchleim : 1;
-	uint16 R5Terminal : 1;
-	uint16 R5Tuer : 1;
-	uint16 R6BolaSchild : 1;
-	uint16 R6BolaOk : 1;
-	uint16 R6BolaBecher : 1;
-	uint16 R6DoorLeftF : 1;
-	uint16 R6DoorLeftB : 1;
-	uint16 R6DoorRightB : 1;
-	uint16 R7DoorRight : 1;
-	uint16 R7Hebel : 1;
-	uint16 R7SeilLeft : 1;
-	uint16 R7SeilOk : 1;
-	uint16 R7RHaken : 1;
-	uint16 R7BorkFlug : 1;
-	uint16 R7ChewyFlug : 1;
-	uint16 R8Folter : 1;
-	uint16 R8Stein : 1;
-	uint16 R8GTuer : 1;
-	uint16 R8Kohle : 1;
-	uint16 R8Abkuehlen : 1;
-	uint16 R8GipsWurf : 1;
-	uint16 R9Gitter : 1;
-	uint16 R9Surimy : 1;
-	uint16 R10Surimy : 1;
-	uint16 R10SurimyOk : 1;
-	uint16 R11CardOk : 1;
-	uint16 R11TerminalOk : 1;
-	uint16 R11DoorRightB : 1;
-	uint16 R11DoorRightF : 1;
-	uint16 R12Betreten : 1;
-	uint16 R12ChewyBork : 1;
-	uint16 R12Talisman : 1;
-	uint16 R12TalismanOk : 1;
-	uint16 R12RaumOk : 1;
-	uint16 R12BorkTalk : 1;
-	uint16 R12BorkInRohr : 1;
-	uint16 R12TransOn : 1;
-	uint16 R12KetteLinks : 1;
-	uint16 R13BorkOk : 1;
-	uint16 R13Band : 1;
-	uint16 R13Bandlauf : 1;
-	uint16 R13Surf : 1;
-	uint16 R14Feuer : 1;
-	uint16 R14Translator : 1;
-	uint16 R14FluxoFlex : 1;
-	uint16 R14GleiterAuf : 1;
-	uint16 R14Sicherung : 1;
-	uint16 R14Waffe : 1;
-	uint16 R16F5Exit : 1;
-	uint16 R17GitterWeg : 1;
-	uint16 R17Seil : 1;
-	uint16 R17HebelOk : 1;
-	uint16 R17EnergieOut : 1;
-	uint16 R17DoorKommand : 1;
-	uint16 R18DoorBruecke : 1;
-	uint16 R18CartFach : 1;
-	uint16 R18CartTerminal : 1;
-	uint16 R18CartSave : 1;
-	uint16 R18SurimyWurf : 1;
-	uint16 R18SondeMoni : 1;
-	uint16 R18MoniSwitch : 1;
-	uint16 R18Krone : 1;
-	uint16 R18FirstEntry : 1;
-	uint16 R18Gitter : 1;
-	uint16 R21Salto : 1;
-	uint16 R21GitterEnergie : 1;
-	uint16 R21GitterMuell : 1;
-	uint16 R21Hebel1 : 1;
-	uint16 R21Hebel2 : 1;
-	uint16 R21Hebel3 : 1;
-	uint16 R21Laser1Weg : 1;
-	uint16 R21Laser2Weg : 1;
-	uint16 R21Gang : 1;
-	uint16 R22Paint : 1;
-	uint16 R22ChewyPlatt : 1;
-	uint16 R22BorkPlatt : 1;
-	uint16 R22GetBork : 1;
-	uint16 R23FluxoFlex : 1;
-	uint16 R23Cartridge : 1;
-	uint16 R24FirstEntry : 1;
-	uint16 R25FirstEntry : 1;
-	uint16 R25GleiteLoesch : 1;
-	uint16 R25SurimyLauf : 1;
-	uint16 R25GleiterExit: 1;
-	uint16 R27SurimyOk : 1;
-	uint16 R28SurimyCar : 1;
-	uint16 R28ChewyPump : 1;
-	uint16 R28Briefkasten: 1;
-	uint16 R28EntryHaus : 1;
-	uint16 R28Manuskript : 1;
-
-	uint16 R28RKuerbis : 1;
-	uint16 R28ExitTown : 1;
-
-	uint16 R28PostCar : 1;
-	uint16 R29Pumpe : 1;
-	uint16 R29Schlauch1 : 1;
-	uint16 R29Schlauch2 : 1;
-	uint16 R29AutoSitz : 1;
-	uint16 R31PflanzeWeg : 1;
-	uint16 R31KoernerDa : 1;
-	uint16 R31Wasser : 1;
-	uint16 R31KlappeZu : 1;
-	uint16 R31SurFurz : 1;
-	uint16 R32HowardWeg : 1;
-	uint16 R32UseSchreib : 1;
-	uint16 R32PapierOk : 1;
-	uint16 R32Script : 1;
-	uint16 R33SchubFirst : 1;
-	uint16 R33Messer : 1;
-	uint16 R33MunterOk : 1;
-	uint16 R33MunterGet : 1;
-	uint16 R35TransCat : 1;
-	uint16 R35Falle : 1;
-	uint16 R35Schublade : 1;
-	uint16 R35CatEat : 1;
-	uint16 R37TransHahn : 1;
-	uint16 R37Gebiss : 1;
-	uint16 R37HundScham : 1;
-	uint16 R37Kloppe : 1;
-	uint16 R37Mes : 1;
-	uint16 R39TransMensch: 1;
-	uint16 R39TvOn : 1;
-	uint16 R39ScriptOk : 1;
-	uint16 R39HowardDa : 1;
-	uint16 R39HowardWach : 1;
-	uint16 R40TeilKarte : 1;
-	uint16 R40TrainMove : 1;
-
-	uint16 R40TrainOk : 1;
-	uint16 R40Geld : 1;
-	uint16 R40PoliceStart: 1;
-	uint16 R40PoliceWeg : 1;
-	uint16 R40PoliceAb : 1;
-	uint16 R40Wettbewerb : 1;
-	uint16 R40HoUse : 1;
-	uint16 R40HaendlerOk : 1;
-	uint16 R40DuengerMit : 1;
-	uint16 R40DuengerTele: 1;
-	uint16 R41FirstTalk : 1;
-	uint16 R41LolaOk : 1;
-	uint16 R41Einbruch : 1;
-	uint16 R41BruchInfo : 1;
-	uint16 R41KuerbisInfo: 1;
-	uint16 R41RepairInfo : 1;
-	uint16 R41HowardDiaOK: 1;
-	uint16 R42FirstEntry : 1;
-	uint16 R42BriefOk : 1;
-	uint16 R42HoToBeamter: 1;
-	uint16 R42MarkeOk : 1;
-	uint16 R42BriefMarke : 1;
-	uint16 R42BeamterWach: 1;
-	uint16 R43GetPgLady : 1;
-	uint16 R45TaxiOk : 1;
-	uint16 R45MagOk : 1;
-	uint16 R46GetLeder : 1;
-	uint16 R47SchlossOk : 1;
-	uint16 R48TaxiEntry : 1;
-	uint16 R49WegFrei : 1;
-	uint16 R49BoyWeg : 1;
-	uint16 R49BoyAni : 1;
-	uint16 R50Zigarre : 1;
-	uint16 R50KeyOK : 1;
-	uint16 R51FirstEntry : 1;
-	uint16 R51HotelRoom : 1;
-	uint16 R51KillerWeg : 1;
-	uint16 R52HotDogOk : 1;
-	uint16 R52TuerAuf : 1;
-	uint16 R52LichtAn : 1;
-	uint16 R52KakerJoke : 1;
-	uint16 R52KakerWeg : 1;
-	uint16 R53Kostuem : 1;
-	uint16 R53Visit : 1;
-	uint16 R54HotDogOk : 1;
-	uint16 R54FputzerWeg : 1;
-	uint16 R54LiftOk : 1;
-	uint16 R54Schild : 1;
-	uint16 R55SekWeg : 1;
-	uint16 R55Location : 1;
-
-	uint16 R55Entry : 1;
-	uint16 R55Job : 1;
-	uint16 R55ScriptWeg : 1;
-	uint16 R55EscScriptOk: 1;
-	uint16 R55RaumOk : 1;
-	uint16 R55R54First : 1;
-
-	uint16 R56GetTabak : 1;
-	uint16 R56AbfahrtOk : 1;
-	uint16 R56Kneipe : 1;
-	uint16 R56WhiskyMix : 1;
-	uint16 R57StudioAuf : 1;
-	uint16 R59PosterWeg : 1;
-	uint16 R62Flucht : 1;
-	uint16 R62FirstEntry : 1;
-	uint16 R62TShow : 1;
-	uint16 R62LauraVerwandlung: 1;
-	uint16 R63Feuer : 1;
-	uint16 R63FxMannWeg : 1;
-	uint16 R63Uhr : 1;
-	uint16 R64ManWeg : 1;
-	uint16 R67LiedOk : 1;
-	uint16 R67TuerOk : 1;
-	uint16 R67KommodeAuf : 1;
-	uint16 R67KostuemWeg : 1;
-	uint16 R67PapageiWeg : 1;
-	uint16 R68KarteDa : 1;
-	uint16 R68Papagei : 1;
-	uint16 R68DivaWeg : 1;
-	uint16 R68Lied : 1;
-	uint16 R68IndigoDia : 1;
-	uint16 R68Gutschein : 1;
+	byte R0SchleimWurf : 1;
+	byte R0KissenWurf : 1;
+	byte R0Monokel : 1;
+	byte R0GBuch : 1;
+	byte R2KabelBork : 1;
+	byte R2FussSchleim : 1;
+	byte R5Terminal : 1;
+	byte R5Tuer : 1;
+
+	byte R6BolaSchild : 1;
+	byte R6BolaOk : 1;
+	byte R6BolaBecher : 1;
+	byte R6DoorLeftF : 1;
+	byte R6DoorLeftB : 1;
+	byte R6DoorRightB : 1;
+	byte R7DoorRight : 1;
+	byte R7Hebel : 1;
+
+	byte R7SeilLeft : 1;
+	byte R7SeilOk : 1;
+	byte R7RHaken : 1;
+	byte R7BorkFlug : 1;
+	byte R7ChewyFlug : 1;
+	byte R8Folter : 1;
+	byte R8Stein : 1;
+	byte R8GTuer : 1;
+
+	byte R8Kohle : 1;
+	byte R8Abkuehlen : 1;
+	byte R8GipsWurf : 1;
+	byte R9Gitter : 1;
+	byte R9Surimy : 1;
+	byte R10Surimy : 1;
+	byte R10SurimyOk : 1;
+	byte R11CardOk : 1;
+
+	byte R11TerminalOk : 1;
+	byte R11DoorRightB : 1;
+	byte R11DoorRightF : 1;
+	byte R12Betreten : 1;
+	byte R12ChewyBork : 1;
+	byte R12Talisman : 1;
+	byte R12TalismanOk : 1;
+	byte R12RaumOk : 1;
+
+	byte R12BorkTalk : 1;
+	byte R12BorkInRohr : 1;
+	byte R12TransOn : 1;
+	byte R12KetteLinks : 1;
+	byte R13BorkOk : 1;
+	byte R13Band : 1;
+	byte R13Bandlauf : 1;
+	byte R13Surf : 1;
+
+	byte R14Feuer : 1;
+	byte R14Translator : 1;
+	byte R14FluxoFlex : 1;
+	byte R14GleiterAuf : 1;
+	byte R14Sicherung : 1;
+	byte R14Waffe : 1;
+	byte R16F5Exit : 1;
+	byte R17GitterWeg : 1;
+
+	byte R17Seil : 1;
+	byte R17HebelOk : 1;
+	byte R17EnergieOut : 1;
+	byte R17DoorKommand : 1;
+	byte R18DoorBruecke : 1;
+	byte R18CartFach : 1;
+	byte R18CartTerminal : 1;
+	byte R18CartSave : 1;
+
+	byte R18SurimyWurf : 1;
+	byte R18SondeMoni : 1;
+	byte R18MoniSwitch : 1;
+	byte R18Krone : 1;
+	byte R18FirstEntry : 1;
+	byte R18Gitter : 1;
+	byte R21Salto : 1;
+	byte R21GitterEnergie : 1;
+
+	byte R21GitterMuell : 1;
+	byte R21Hebel1 : 1;
+	byte R21Hebel2 : 1;
+	byte R21Hebel3 : 1;
+	byte R21Laser1Weg : 1;
+	byte R21Laser2Weg : 1;
+	byte R21Gang : 1;
+	byte R22Paint : 1;
+
+	byte R22ChewyPlatt : 1;
+	byte R22BorkPlatt : 1;
+	byte R22GetBork : 1;
+	byte R23FluxoFlex : 1;
+	byte R23Cartridge : 1;
+	byte R24FirstEntry : 1;
+	byte R25FirstEntry : 1;
+	byte R25GleiteLoesch : 1;
+
+	byte R25SurimyLauf : 1;
+	byte R25GleiterExit: 1;
+	byte R27SurimyOk : 1;
+	byte R28SurimyCar : 1;
+	byte R28ChewyPump : 1;
+	byte R28Briefkasten: 1;
+	byte R28EntryHaus : 1;
+	byte R28Manuskript : 1;
+
+	byte R28RKuerbis : 1;
+	byte R28ExitTown : 1;
+	byte R28PostCar : 1;
+	byte R29Pumpe : 1;
+	byte R29Schlauch1 : 1;
+	byte R29Schlauch2 : 1;
+	byte R29AutoSitz : 1;
+	byte R31PflanzeWeg : 1;
+
+	byte R31KoernerDa : 1;
+	byte R31Wasser : 1;
+	byte R31KlappeZu : 1;
+	byte R31SurFurz : 1;
+	byte R32HowardWeg : 1;
+	byte R32UseSchreib : 1;
+	byte R32PapierOk : 1;
+	byte R32Script : 1;
+
+	byte R33SchubFirst : 1;
+	byte R33Messer : 1;
+	byte R33MunterOk : 1;
+	byte R33MunterGet : 1;
+	byte R35TransCat : 1;
+	byte R35Falle : 1;
+	byte R35Schublade : 1;
+	byte R35CatEat : 1;
+
+	byte R37TransHahn : 1;
+	byte R37Gebiss : 1;
+	byte R37HundScham : 1;
+	byte R37Kloppe : 1;
+	byte R37Mes : 1;
+	byte R39TransMensch: 1;
+	byte R39TvOn : 1;
+	byte R39ScriptOk : 1;
+
+	byte R39HowardDa : 1;
+	byte R39HowardWach : 1;
+	byte R40TeilKarte : 1;
+	byte R40TrainMove : 1;
+	byte R40TrainOk : 1;
+	byte R40Geld : 1;
+	byte R40PoliceStart: 1;
+	byte R40PoliceWeg : 1;
+
+	byte R40PoliceAb : 1;
+	byte R40Wettbewerb : 1;
+	byte R40HoUse : 1;
+	byte R40HaendlerOk : 1;
+	byte R40DuengerMit : 1;
+	byte R40DuengerTele: 1;
+	byte R41FirstTalk : 1;
+	byte R41LolaOk : 1;
+
+	byte R41Einbruch : 1;
+	byte R41BruchInfo : 1;
+	byte R41KuerbisInfo: 1;
+	byte R41RepairInfo : 1;
+	byte R41HowardDiaOK: 1;
+	byte R42FirstEntry : 1;
+	byte R42BriefOk : 1;
+	byte R42HoToBeamter: 1;
+
+	byte R42MarkeOk : 1;
+	byte R42BriefMarke : 1;
+	byte R42BeamterWach: 1;
+	byte R43GetPgLady : 1;
+	byte R45TaxiOk : 1;
+	byte R45MagOk : 1;
+	byte R46GetLeder : 1;
+	byte R47SchlossOk : 1;
+
+	byte R48TaxiEntry : 1;
+	byte R49WegFrei : 1;
+	byte R49BoyWeg : 1;
+	byte R49BoyAni : 1;
+	byte R50Zigarre : 1;
+	byte R50KeyOK : 1;
+	byte R51FirstEntry : 1;
+	byte R51HotelRoom : 1;
+
+	byte R51KillerWeg : 1;
+	byte R52HotDogOk : 1;
+	byte R52TuerAuf : 1;
+	byte R52LichtAn : 1;
+	byte R52KakerJoke : 1;
+	byte R52KakerWeg : 1;
+	byte R53Kostuem : 1;
+	byte R53Visit : 1;
+
+	byte R54HotDogOk : 1;
+	byte R54FputzerWeg : 1;
+	byte R54LiftOk : 1;
+	byte R54Schild : 1;
+	byte R55SekWeg : 1;
+	byte R55Location : 1;
+	byte R55Entry : 1;
+	byte R55Job : 1;
+
+	byte R55ScriptWeg : 1;
+	byte R55EscScriptOk: 1;
+	byte R55RaumOk : 1;
+	byte R55R54First : 1;
+	byte R56GetTabak : 1;
+	byte R56AbfahrtOk : 1;
+	byte R56Kneipe : 1;
+	byte R56WhiskyMix : 1;
+
+	byte R57StudioAuf : 1;
+	byte R59PosterWeg : 1;
+	byte R62Flucht : 1;
+	byte R62FirstEntry : 1;
+	byte R62TShow : 1;
+	byte R62LauraVerwandlung: 1;
+	byte R63Feuer : 1;
+	byte R63FxMannWeg : 1;
+
+	byte R63Uhr : 1;
+	byte R64ManWeg : 1;
+	byte flags26_4 : 1;
+	byte flags26_8 : 1;
+	byte flags26_10 : 1;
+	byte flags26_20 : 1;
+	byte flags26_40 : 1;
+	byte R67LiedOk : 1;
+
+	byte R67KommodeAuf : 1;
+	byte R67KostuemWeg : 1;
+	byte R67PapageiWeg : 1;
+	byte R68KarteDa : 1;
+	byte R68Papagei : 1;
+	byte R68DivaWeg : 1;
+	byte R68Lied : 1;
+	byte R68IndigoDia : 1;
+
+	byte R68Gutschein : 1;
+	byte flags28_2 : 1;
+	byte flags28_4 : 1;
+	byte flags28_8 : 1;
+	byte flags28_10 : 1;
+	byte flags28_20 : 1;
+	byte flags28_40 : 1;
+	byte flags28_80 : 1;
+
+	byte flags29_1 : 1;
+	byte flags29_2 : 1;
+	byte flags29_4 : 1;
+	byte flags29_8 : 1;
+	byte flags29_10 : 1;
+	byte flags29_20 : 1;
+	byte flags29_40 : 1;
+	byte flags29_80 : 1;
+
+	byte flags30_1 : 1;
+	byte flags30_2 : 1;
+	byte flags30_4 : 1;
+	byte flags30_8 : 1;
+	byte flags30_10 : 1;
+	byte flags30_20 : 1;
+	byte flags30_40 : 1;
+	byte flags30_80 : 1;
+
+	byte flags31_1 : 1;
+	byte flags31_2 : 1;
+	byte flags31_4 : 1;
+	byte flags31_8 : 1;
+	byte flags31_10 : 1;
 
 	uint8 R0FueterLab;
 	uint8 R6RaumBetreten;
-
 	uint8 R6BolaJoke;
 	uint8 R7BellCount;
 	uint8 R11IdCardNr;
@@ -356,45 +412,70 @@ struct Spieler {
 
 	int16 R64Moni2Ani;
 
-	uint16 UDummy2 : 1;
-	uint16 UDummy3 : 1;
-	uint16 UDummy4 : 1;
-	uint16 UDummy5 : 1;
-	uint16 UDummy6 : 1;
-	uint16 UDummy7 : 1;
-	uint16 UDummy8 : 1;
-	uint16 UDummy9 : 1;
-	uint16 UDummy10 : 1;
-	uint16 UDummy11 : 1;
-	uint16 UDummy12 : 1;
-	uint16 UDummy13 : 1;
-	uint16 UDummy14 : 1;
-	uint16 UDummy15 : 1;
-	uint16 UDummy16 : 1;
-	uint16 UDummy17 : 1;
-	uint16 UDummy18 : 1;
-	uint16 UDummy19 : 1;
-	uint16 UDummy20 : 1;
-	uint8 BDummy1;
-	uint8 BDummy2;
-	uint8 BDummy3;
-	uint8 BDummy4;
-	uint8 BDummy5;
-	uint8 BDummy6;
-	uint8 BDummy7;
-	uint8 BDummy8;
-	uint8 BDummy9;
-	uint8 BDummy10;
-	int16 SDummy1;
-	int16 SDummy2;
-	int16 SDummy3;
-	int16 SDummy4;
-	int16 SDummy5;
-	int16 SDummy6;
-	int16 SDummy7;
-	int16 SDummy8;
-	int16 SDummy9;
-	int16 SDummy10;
+	// Further flags
+	uint8 flags32_1 : 1;
+	uint8 flags32_2 : 2;
+	uint8 flags32_3 : 3;
+	uint8 flags32_4 : 4;
+	uint8 flags32_5 : 5;
+	uint8 flags32_6 : 6;
+	uint8 flags32_7 : 7;
+	uint8 flags32_8 : 8;
+
+	uint8 flags33_1 : 1;
+	uint8 flags33_2 : 2;
+	uint8 flags33_3 : 3;
+	uint8 flags33_4 : 4;
+	uint8 flags33_5 : 5;
+	uint8 flags33_6 : 6;
+	uint8 flags33_7 : 7;
+	uint8 flags33_8 : 8;
+
+	uint8 flags34_1 : 1;
+	uint8 flags34_2 : 2;
+	uint8 flags34_3 : 3;
+	uint8 flags34_4 : 4;
+	uint8 flags34_5 : 5;
+	uint8 flags34_6 : 6;
+	uint8 flags34_7 : 7;
+	uint8 flags34_8 : 8;
+
+	uint8 flags35_1 : 1;
+	uint8 flags35_2 : 2;
+	uint8 flags35_3 : 3;
+	uint8 flags35_4 : 4;
+	uint8 flags35_5 : 5;
+	uint8 flags35_6 : 6;
+	uint8 flags35_7 : 7;
+	uint8 flags35_8 : 8;
+
+	uint8 flags36_1 : 1;
+	uint8 flags36_2 : 2;
+	uint8 flags36_3 : 3;
+	uint8 flags36_4 : 4;
+	uint8 flags36_5 : 5;
+	uint8 flags36_6 : 6;
+	uint8 flags36_7 : 7;
+	uint8 flags36_8 : 8;
+
+	uint8 flags37_1 : 1;
+	uint8 flags37_2 : 2;
+	uint8 flags37_3 : 3;
+	uint8 flags37_4 : 4;
+	uint8 flags37_5 : 5;
+	uint8 flags37_6 : 6;
+	uint8 flags37_7 : 7;
+	uint8 flags37_8 : 8;
+
+	uint8 flags38_1 : 1;
+	uint8 flags38_2 : 2;
+
+	uint8 mi[8];
+	int16 SVal1;
+	int16 SVal2;
+	int16 SVal3;
+	int16 SVal4;
+	int16 SVal5;
 	bool SoundSwitch;
 	uint8 SoundVol;
 	bool MusicSwitch;


Commit: 4fab30ef83f5974f7fc4e566431efe33922d5755
    https://github.com/scummvm/scummvm/commit/4fab30ef83f5974f7fc4e566431efe33922d5755
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:01-08:00

Commit Message:
CHEWY: Added effect::border method

Changed paths:
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/global.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h


diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 9da740a5231..b386e9c0b84 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -158,6 +158,26 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 	}
 }
 
+void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
+	if (mode) {
+		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
+			out->setze_zeiger(workpage_ + 4);
+			out->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
+			out->box_fill(x + 160, 0, x + 168, 200, farbe);
+			out->back2screen(workpage_);
+			out->skip_line(lines);
+		}
+	} else {
+		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
+			out->setze_zeiger(workpage_ + 4);
+			out->box_fill(x, 0, x + 8, 200, farbe);
+			out->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
+			out->back2screen(workpage_);
+			out->skip_line(lines);
+		}
+	}
+}
+
 void effect::spr_blende(byte *workpage_, byte *ablage_,
                         byte *palette, int16 frames, int16 col) {
 	int16 i;
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index 29f320563c6..8b7b75c2c7a 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -33,6 +33,7 @@ public:
 
 	void blende1(byte *sram_speicher, byte *screen,
 		byte *palette, int16 frames, uint8 mode, int16 col);
+	void border(byte *screen, int16 val1, uint8 mode, int16 farbe);
 
 	void rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 		byte *screen, byte *palette, int16 col, int16 skip_line);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 65d745a5b66..e092cba2aa9 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -124,7 +124,7 @@ int16 life_anz;
 char *life_str;
 int16 life_handler;
 
-void (*SetUpScreenFunc)(void);
+void (*SetUpScreenFunc)();
 
 SprInfo spr_info[MAX_PROG_ANI];
 DetectInfo detect;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index ae8324e5dae..551291709f2 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -27,7 +27,10 @@
 
 namespace Chewy {
 
+int MainMenu::_val1;
+
 void MainMenu::execute() {
+#ifdef TODO_REENABLE
 	mem->file->select_pool_item(music_handle, EndOfPool - 17);
 	mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 	if (!modul)
@@ -35,8 +38,50 @@ void MainMenu::execute() {
 
 	flic_cut(200, 0);
 	ailsnd->stop_mod();
+#endif
+
+	cur->move(152, 92);
+	minfo.x = 152;
+	minfo.y = 92;
+	spieler.inv_cur = 0;
+	menu_display = 0;
+	spieler.SVal5 = 1;
+
+	do {
+		ailsnd->stop_mod();
+		ailsnd->end_sound();
+		SetUpScreenFunc = screenFunc;
+
+		cursor_wahl(20);
+		_val1 = -1;
+		spieler.scrollx = spieler.scrolly = 0;
+		spieler.PersonRoomNr[0] = 98;
+		room->load_room(&room_blk, 98, &spieler);
+		ERROR
+
+		CurrentSong = -1;
+		load_room_music(98);
+		fx->border(workpage, 100, 0, 0);
+
+		out->set_palette(pal);
+		spieler.PersonHide[0] = 1;
+		show_cur();
+
+		do {
+			proc5();
+		} while (_val1 == -1);
 
+	} while (1);
+	 
 	// TODO
 }
 
+void MainMenu::screenFunc() {
+
+}
+
+void MainMenu::proc5() {
+
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index f5b08141c8e..f71e6a44991 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -28,6 +28,11 @@
 namespace Chewy {
 
 class MainMenu {
+private:
+	static int _val1;
+
+	static void screenFunc();
+	static void proc5();
 public:
 	static void execute();
 };


Commit: 12ca6ba57e28619e1b133ec644b43387310a069a
    https://github.com/scummvm/scummvm/commit/12ca6ba57e28619e1b133ec644b43387310a069a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:01-08:00

Commit Message:
CHEWY: Implementing more main menu code

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.h
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h
    engines/chewy/types.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e092cba2aa9..43d9f0f2dd0 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -339,6 +339,7 @@ SplitStringInit ssi[AAD_MAX_PERSON] = {
 
 int16 frequenz;
 int16 CurrentSong = -1;
+bool savegameFlag;
 Stream *music_handle;
 int16 EndOfPool;
 Stream *speech_handle;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index cdefb654c45..ef9cfbd9b0b 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -226,6 +226,7 @@ extern int16 EndOfPool;
 extern Stream *speech_handle;
 extern byte *SpeechBuf[2];
 extern int16 CurrentSong;
+extern bool savegameFlag;
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 90bbbb2159b..0d3c0f3bf08 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -175,6 +175,7 @@ void var_init() {
 	pfeil_delay = 0;
 	pfeil_ani = 0;
 	flags.CursorStatus = true;
+	savegameFlag = false;
 }
 
 void init_room() {
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 0e89ad72bb4..70874fe1b79 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -30,6 +30,9 @@
 
 namespace Chewy {
 
+extern int16 menu_flag;
+
+
 void game_main();
 void free_buffers();
 void plot_main_menu();
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 551291709f2..7f41a708d5f 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -23,6 +23,7 @@
 #include "common/textconsole.h"
 #include "chewy/main_menu.h"
 #include "chewy/global.h"
+#include "chewy/main.h"
 #include "chewy/ngshext.h"
 
 namespace Chewy {
@@ -68,7 +69,7 @@ void MainMenu::execute() {
 		show_cur();
 
 		do {
-			proc5();
+			animate();
 		} while (_val1 == -1);
 
 	} while (1);
@@ -77,11 +78,40 @@ void MainMenu::execute() {
 }
 
 void MainMenu::screenFunc() {
+	int vec = det->maus_vector(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
 
+	if (in->get_switch_code() == 28 || minfo.button == 1) {
+		_val1 = vec;
+	}
 }
 
-void MainMenu::proc5() {
-
+void MainMenu::animate() {
+	if (ani_timer->TimeFlag) {
+		uhr->reset_timer(0, 0);
+		spieler.DelaySpeed = FrameSpeed / spieler.FramesPerSecond;
+		spieler_vector->Delay = spieler.DelaySpeed + spz_delay[0];
+		FrameSpeed = 0;
+		det->set_global_delay(spieler.DelaySpeed);
+	}
+
+	++FrameSpeed;
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage],
+		spieler.scrollx, spieler.scrolly);
+
+	if (SetUpScreenFunc && !menu_display && !flags.InventMenu) {
+		SetUpScreenFunc();
+		out->setze_zeiger(workptr);
+	}
+
+	sprite_engine();
+	kb_mov(1);
+	calc_maus_txt(minfo.x, minfo.y, 1);
+	cur->plot_cur();
+	maus_links_click = 0;
+	menu_flag = 0;
+	out->setze_zeiger(nullptr);
+	out->back2screen(workpage);
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index f71e6a44991..34d4604b736 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -32,7 +32,7 @@ private:
 	static int _val1;
 
 	static void screenFunc();
-	static void proc5();
+	static void animate();
 public:
 	static void execute();
 };
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index f5206633b3c..205d90c5a4f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -526,6 +526,7 @@ struct Flags {
 	uint16 ChAutoMov : 1;
 	uint16 ChAutoMovXy : 1;
 	uint16 BreakAMov : 1;
+
 	uint16 AtsAction : 1;
 	uint16 AdsAction : 1;
 	uint16 AtsText : 1;
@@ -534,6 +535,7 @@ struct Flags {
 	uint16 MainInput : 1;
 	uint16 InventMenu : 1;
 	uint16 NoScroll : 1;
+
 	bool InitSound : true;
 	uint16 ExitMov : 1;
 	uint16 MausTxt : 1;
@@ -542,6 +544,7 @@ struct Flags {
 	uint16 ZoomMov : 1;
 	uint16 IcmEntry : 1;
 	uint16 SaveMenu : 1;
+
 	uint16 SpzAni : 1;
 	uint16 MausLinks : 1;
 	uint16 ChewyDontGo : 1;
@@ -550,6 +553,7 @@ struct Flags {
 	uint16 NoEndPosMovObj: 1;
 	uint16 NoShad : 1;
 	uint16 SavePersonRnr : 1;
+
 	uint16 CursorStatus : 1;
 };
 


Commit: 77577bc5c1d7d780d711053ff6bbeae9a082b69c
    https://github.com/scummvm/scummvm/commit/77577bc5c1d7d780d711053ff6bbeae9a082b69c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:01-08:00

Commit Message:
CHEWY: Main menu is now displaying

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index d5eeab45a88..832eac384ee 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -1215,18 +1215,21 @@ void detail::set_taf_ani_mem(byte *load_area) {
 }
 
 void detail::load_taf_ani_sprite(int16 nr) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(CurrentTaf);
 	int32 size;
 	taf_imageheader iheader;
-	if (CurrentTaf) {
-		chewy_fseek(CurrentTaf, SpritePos[nr], SEEK_SET);
 
-		if (chewy_fread(&iheader, sizeof(taf_imageheader), 1, CurrentTaf)) {
+	if (rs) {
+		rs->seek(SpritePos[nr]);
+
+		if (iheader.load(rs)) {
 			size = (int32)iheader.width * (int32)iheader.height;
 			((int16 *)taf_load_buffer)[0] = iheader.width;
 			((int16 *)taf_load_buffer)[1] = iheader.height;
-			chewy_fseek(CurrentTaf, iheader.image, SEEK_SET);
+
+			rs->seek(iheader.image);
 			if (taf_load_buffer)
-				mem->file->load_tafmcga(CurrentTaf, iheader.komp, size, taf_load_buffer + 4l);
+				mem->file->load_tafmcga(rs, iheader.komp, size, taf_load_buffer + 4l);
 			else {
 				modul = SPEICHER;
 				fcode = NOSPEICHER;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 7f41a708d5f..2ce4d9a08f9 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -22,16 +22,18 @@
 
 #include "common/textconsole.h"
 #include "chewy/main_menu.h"
+#include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/main.h"
 #include "chewy/ngshext.h"
 
 namespace Chewy {
 
-int MainMenu::_val1;
+int MainMenu::_selection;
 
 void MainMenu::execute() {
 #ifdef TODO_REENABLE
+	// TODO: Currently disabled so it doesn't keep playing on startup
 	mem->file->select_pool_item(music_handle, EndOfPool - 17);
 	mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 	if (!modul)
@@ -54,7 +56,7 @@ void MainMenu::execute() {
 		SetUpScreenFunc = screenFunc;
 
 		cursor_wahl(20);
-		_val1 = -1;
+		_selection = -1;
 		spieler.scrollx = spieler.scrolly = 0;
 		spieler.PersonRoomNr[0] = 98;
 		room->load_room(&room_blk, 98, &spieler);
@@ -70,7 +72,7 @@ void MainMenu::execute() {
 
 		do {
 			animate();
-		} while (_val1 == -1);
+		} while (_selection == -1);
 
 	} while (1);
 	 
@@ -81,7 +83,7 @@ void MainMenu::screenFunc() {
 	int vec = det->maus_vector(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
 
 	if (in->get_switch_code() == 28 || minfo.button == 1) {
-		_val1 = vec;
+		_selection = vec;
 	}
 }
 
@@ -112,6 +114,9 @@ void MainMenu::animate() {
 	menu_flag = 0;
 	out->setze_zeiger(nullptr);
 	out->back2screen(workpage);
+
+	g_screen->update();
+	g_events->update();
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 34d4604b736..e287f19eece 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -29,11 +29,22 @@ namespace Chewy {
 
 class MainMenu {
 private:
-	static int _val1;
+	static int _selection;
 
+	/**
+	 * Screen rendering function for the main menu
+	 */
 	static void screenFunc();
+
+	/**
+	 * Animates the contents of the main menu,
+	 * and checks for any option selection
+	 */
 	static void animate();
 public:
+	/**
+	 * Displays the menu
+	 */
 	static void execute();
 };
 


Commit: 7dc3106ec7035f70e1149e3ca2836072b9d118a6
    https://github.com/scummvm/scummvm/commit/7dc3106ec7035f70e1149e3ca2836072b9d118a6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:01-08:00

Commit Message:
CHEWY: Implemented mouse cursor show

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/cursor.cpp
    engines/chewy/detail.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index e4d39ad21b2..bc487c267c1 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -37,6 +37,8 @@ namespace Chewy {
 #define SCREEN_WIDTH 320
 #define SCREEN_HEIGHT 200
 
+#define SHOULD_QUIT g_engine->shouldQuit()
+
 struct ChewyGameDescription;
 class EventsManager;
 class Sound;
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index aed2f9f0a95..674d945bdef 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -20,8 +20,9 @@
  *
  */
 
-#include "chewy/cursor.h"
 #include "common/textconsole.h"
+#include "chewy/cursor.h"
+#include "chewy/events.h"
 
 namespace Chewy {
 
@@ -82,33 +83,17 @@ void cursor::plot_cur() {
 }
 
 void cursor::show_cur() {
-	warning("STUB - show_cur");
-#if 0
-	int16 x, y;
 	if ((maus_da) && (!sichtbar)) {
-		sichtbar = TRUE;
+		sichtbar = true;
 		mouse_aktiv = 1;
-		x = minfo->x;
-		y = minfo->y;
-#pragma aux asm_pos = \
-"push eax"\
-"push edx"\
-"push ecx"\
-"mov ax,3"\
-"int 033h"\
-"mov x,cx"\
-"mov y,dx"\
-"pop ecx"\
-"pop edx"\
-"pop eax"
-		asm_pos();
-		minfo->x = x;
-		minfo->y = y;
-		if (curblk->no_back != TRUE) {
 
+		minfo->x = g_events->_mousePos.x;
+		minfo->y = g_events->_mousePos.y;
+
+		if (!curblk->no_back) {
 			out->sprite_save(curblk->cur_back, (minfo->x + curblk->page_off_x),
-			                  (minfo->y + curblk->page_off_y), curblk->xsize,
-			                  curblk->ysize, scr_width);
+			    (minfo->y + curblk->page_off_y), curblk->xsize,
+			    curblk->ysize, scr_width);
 		}
 
 		cur_x_old = (minfo->x + curblk->page_off_x);
@@ -116,7 +101,6 @@ void cursor::show_cur() {
 		cur_move = 1;
 		plot_cur();
 	}
-#endif
 }
 
 void cursor::hide_cur() {
@@ -152,53 +136,31 @@ void cursor::move(int16 x, int16 y) {
 }
 
 void cursor::wait_taste_los(int16 maus_plot) {
-	warning("STUB - wait_taste_los");
-#if 0
 	int16 is_mouse, stay;
 	int16 switch_code;
 	is_mouse = 0;
 	if (maus_da) {
-
-#pragma aux check_mknopf = \
-"push ax"\
-"push bx"\
-"push cx"\
-"push dx"\
-"mov ax,3"\
-"int 033h"\
-"mov is_mouse,bx"\
-"pop dx"\
-"pop cx"\
-"pop bx"\
-"pop ax"
-		check_mknopf();
+		g_events->update();
+		is_mouse = g_events->_mouseButtons;
 	}
+
 	if (!is_mouse)
 		in->hot_key = 0;
 	stay = 1;
 	switch_code = 1;
+
 	while ((switch_code != 0) && (stay)) {
 		switch_code = in->get_switch_code();
 		if (is_mouse) {
 			switch_code = 2;
-#pragma aux check_mknopf2 = \
-"push ax"\
-"push bx"\
-"push cx"\
-"push dx"\
-"mov ax,3"\
-"int 033h"\
-"mov stay,bx"\
-"pop dx"\
-"pop cx"\
-"pop bx"\
-"pop ax"\
-check_mknopf2();
+
+			g_events->update();
+			stay = g_events->_mouseButtons;
 		}
-		if (maus_plot != FALSE)
+
+		if (maus_plot)
 			plot_cur();
 	}
-#endif
 }
 
 void cursor::wait_taste(int16 maus_plot) {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 832eac384ee..8449169b789 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -153,7 +153,7 @@ detail::detail() {
 	}
 
 #endif
-	global_delay = false;
+	global_delay = 0;
 	ani_freezeflag = false;
 	fulltaf = false;
 	rdi.dptr = 0;
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 95f61ef7b97..d9ad9275197 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -56,4 +56,35 @@ void EventsManager::timer_handler() {
 	}
 }
 
+void EventsManager::handleEvent(const Common::Event &event) {
+	if (event.type >= Common::EVENT_MOUSEMOVE &&
+		event.type <= Common::EVENT_MBUTTONUP)
+		_mousePos = event.mouse;
+
+	switch (event.type) {
+	case Common::EVENT_LBUTTONDOWN:
+		_mouseButtons |= 1;
+		break;
+	case Common::EVENT_LBUTTONUP:
+		_mouseButtons &= ~1;
+		break;
+	case Common::EVENT_RBUTTONDOWN:
+		_mouseButtons |= 2;
+		break;
+	case Common::EVENT_RBUTTONUP:
+		_mouseButtons &= ~2;
+		break;
+	case Common::EVENT_MBUTTONDOWN:
+		_mouseButtons |= 4;
+		break;
+	case Common::EVENT_MBUTTONUP:
+		_mouseButtons &= ~4;
+		break;
+	default:
+		break;
+	}
+
+	EventsBase::handleEvent(event);
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index ad3e12092e9..c8c7f4dd6e3 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -31,7 +31,12 @@ class EventsManager : public EventsBase {
 private:
 	void init_timer_handler();
 	static void timer_handler();
+protected:
+	void handleEvent(const Common::Event &event) override;
 public:
+	Common::Point _mousePos;
+	byte _mouseButtons = 0;
+
 	EventsManager(Graphics::Screen *screen);
 	virtual ~EventsManager();
 };
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 2ce4d9a08f9..7f4d3e9bc46 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -50,7 +50,7 @@ void MainMenu::execute() {
 	menu_display = 0;
 	spieler.SVal5 = 1;
 
-	do {
+	while (!SHOULD_QUIT) {
 		ailsnd->stop_mod();
 		ailsnd->end_sound();
 		SetUpScreenFunc = screenFunc;
@@ -72,9 +72,9 @@ void MainMenu::execute() {
 
 		do {
 			animate();
-		} while (_selection == -1);
+		} while (_selection == -1 && !SHOULD_QUIT);
 
-	} while (1);
+	}
 	 
 	// TODO
 }


Commit: 52df062e9f633438765702419332de7c1ad75c24
    https://github.com/scummvm/scummvm/commit/52df062e9f633438765702419332de7c1ad75c24
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:01-08:00

Commit Message:
CHEWY: Implement cursor movement

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/main_menu.cpp
    engines/chewy/maus.cpp
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 674d945bdef..5dea4883256 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -141,7 +141,7 @@ void cursor::wait_taste_los(int16 maus_plot) {
 	is_mouse = 0;
 	if (maus_da) {
 		g_events->update();
-		is_mouse = g_events->_mouseButtons;
+		is_mouse = minfo->button;
 	}
 
 	if (!is_mouse)
@@ -155,7 +155,7 @@ void cursor::wait_taste_los(int16 maus_plot) {
 			switch_code = 2;
 
 			g_events->update();
-			stay = g_events->_mouseButtons;
+			stay = minfo->button;
 		}
 
 		if (maus_plot)
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index d9ad9275197..6fe7c36bef5 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -59,32 +59,37 @@ void EventsManager::timer_handler() {
 void EventsManager::handleEvent(const Common::Event &event) {
 	if (event.type >= Common::EVENT_MOUSEMOVE &&
 		event.type <= Common::EVENT_MBUTTONUP)
-		_mousePos = event.mouse;
+		handleMouseEvent(event);
+	else if (event.type == Common::EVENT_KEYDOWN)
+		handleKbdEvent(event);
+}
+
+void EventsManager::handleMouseEvent(const Common::Event &event) {
+	_mousePos = event.mouse;
 
+	// Set mouse buttons
+	minfo.button = 0;
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
-		_mouseButtons |= 1;
-		break;
-	case Common::EVENT_LBUTTONUP:
-		_mouseButtons &= ~1;
+		minfo.button = 1;
 		break;
 	case Common::EVENT_RBUTTONDOWN:
-		_mouseButtons |= 2;
-		break;
-	case Common::EVENT_RBUTTONUP:
-		_mouseButtons &= ~2;
-		break;
-	case Common::EVENT_MBUTTONDOWN:
-		_mouseButtons |= 4;
-		break;
-	case Common::EVENT_MBUTTONUP:
-		_mouseButtons &= ~4;
+		minfo.button = 2;
 		break;
 	default:
 		break;
 	}
 
-	EventsBase::handleEvent(event);
+	// Set mouse position
+	if (cur_move != 1) {
+		cur_move = 1;
+		minfo.x = event.mouse.x;
+		minfo.y = event.mouse.y;
+	}
+}
+
+void EventsManager::handleKbdEvent(const Common::Event &event) {
+	// TODO
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index c8c7f4dd6e3..33c7b4ae234 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -31,11 +31,15 @@ class EventsManager : public EventsBase {
 private:
 	void init_timer_handler();
 	static void timer_handler();
+
+	void handleMouseEvent(const Common::Event &event);
+	void handleKbdEvent(const Common::Event &event);
 protected:
 	void handleEvent(const Common::Event &event) override;
 public:
 	Common::Point _mousePos;
-	byte _mouseButtons = 0;
+	bool _flag1 = false;
+	bool _flag2 = false;
 
 	EventsManager(Graphics::Screen *screen);
 	virtual ~EventsManager();
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 7f4d3e9bc46..3b00b7f6bc1 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -70,10 +70,14 @@ void MainMenu::execute() {
 		spieler.PersonHide[0] = 1;
 		show_cur();
 
+		// Wait for a selection to be made on the main menu
 		do {
 			animate();
-		} while (_selection == -1 && !SHOULD_QUIT);
+			if (SHOULD_QUIT)
+				return;
+		} while (_selection == -1);
 
+		warning("TODO: Main menu option selected");
 	}
 	 
 	// TODO
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 29fbf98099b..a19a5eaa621 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -58,7 +58,7 @@ void del_kb_puffer() {
 }
 
 void set_mouse_handler(maus_info *mpos) {
-	warning("STUB: set_mouse_handler()");
+	// No implementation in ScummVM
 }
 
 maus::maus() {
@@ -70,47 +70,12 @@ maus::~maus() {
 }
 
 int maus::init() {
-	warning("maus::init - STUB");
-#if 0
-	int16 tasten;
-	int16 err;
-#pragma aux asm_init = "push ax"\
-"mov ax,0"\
-"int 033h"\
-"mov err,ax"\
-"mov tasten,bx"\
-"pop ax"
-	asm_init();
-	if (err != -1) {
-		tasten = 0;
-		modul = MAUS;
-		fcode = 0;
-	}
-	maus_info_blk = false;
-	return (tasten);
-#endif
-	return 0;
+	// ScummVM supports three buttons
+	return 3;
 }
 
 void maus::speed(int16 x, int16 y) {
-	warning("STUB - maus::speed");
-#if 0
-	if (x <= 0)
-		x = 1;
-	if (y <= 0)
-		y = 1;
-#pragma aux asm_speed = "push ax"\
-"push cx"\
-"push dx"\
-"mov ax,0x0f"\
-"mov cx,x"\
-"mov dx,y"\
-"int 0x33"\
-"pop dx"\
-"pop cx"\
-"pop ax"
-	asm_speed();
-#endif
+	// Changing mouse speed isn't supported in ScummVM
 }
 
 void maus::move_mouse(int16 x, int16 y) {
@@ -118,26 +83,7 @@ void maus::move_mouse(int16 x, int16 y) {
 }
 
 void maus::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
-	int16 txmin, tymin, txmax, tymax;
-	txmin = xmin;
-	tymin = ymin;
-	txmax = xmax;
-	tymax = ymax;
-#pragma aux asm_rectangle = "push ax"\
-"push cx"\
-"push dx"\
-"mov ax,7"\
-"mov cx,txmin"\
-"mov dx,txmax"\
-"int 033h"\
-"mov ax,8"\
-"mov cx,tymin"\
-"mov dx,tymax"\
-"int 033h"\
-"pop dx"\
-"pop cx"\
-"pop ax"\
-asm_rectangle();
+	// Mouse clip rectangle isn't supported in ScummVM
 }
 
 int16 maus::maus_vector(int16 x, int16 y, int16 *tbl,
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 6fc3d9916fb..aa6f1b1baea 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -1480,7 +1480,7 @@ void mcga_grafik::init_mausmode(maus_info *minfo) {
 
 void mcga_grafik::exit_mausmode() {
 	MausMode = false;
-	m_info = 0;
+	m_info = nullptr;
 }
 
 int16 mcga_grafik::devices() {


Commit: ffd5d06a2fea39482d19adee4a6314b1896049cf
    https://github.com/scummvm/scummvm/commit/ffd5d06a2fea39482d19adee4a6314b1896049cf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Removal of ununused method declarations

Changed paths:
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 5aac25e8ab8..33de35e84fe 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -253,19 +253,16 @@ public:
 	SplitStringRet *split_string(SplitStringInit *ssi);
 	void calc_txt_win(SplitStringInit *ssi);
 	void str_null2leer(char *str_start, char *str_end);
-	void get_atds_id_ptr(int16 mode);
 	char *atds_adr(const char *fname, int16 chunk_start, int16 chunk_anz);
 	void load_atds(int16 chunk_nr, int16 mode);
 	void save_ads_header(int16 dia_nr);
 
-	// FIXME: was using FILE*
 	Stream *pool_handle(const char *fname, const char *fmode);
 	void set_speech_handle(Stream *speech_handle);
 	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, const char *fmode, int16 mode);
 	void open_handle(Common::SeekableReadStream *stream, int16 mode);
 	void close_handle(int16 mode);
-	int16 atds_get_zeilen(char *str, int16 end_txt);
 	void crypt(char *txt, uint32 size);
 	void init_ats_mode(int16 mode, uint8 *atsheader);
 	bool start_ats(int16 txt_nr, int16 txt_mode, int16 color,


Commit: 1a93c1286df3469b0c3ba0f50beb94de755ddda4
    https://github.com/scummvm/scummvm/commit/1a93c1286df3469b0c3ba0f50beb94de755ddda4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Implementing character draw routines

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 9508598e78a..17ffbd965d2 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -326,20 +326,46 @@ void vors() {
 	fontY = fvory;
 }
 
-void zoom_img(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
-	warning("STUB - zoom_img");
-}
-
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
 	warning("STUB - zoom_set");
 }
 
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol, int16 scrWidth) {
-	warning("STUB - putcxy");
+void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
+	size_t charSize = (fontWidth / 8) * fontHeight;
+	byte *charSrcP = fontAddr + (c - fontFirst) * charSize;
+
+	byte *destP;
+	int width;
+	if (scrWidth != 0) {
+		destP = screenP + (y * scrWidth) + x;
+	} else {
+		destP = screenP + (y * scrWidth) + x;
+		scrWidth = SCREEN_WIDTH;
+	}
+
+	for (int y = 0; y < fontHeight; ++y, destP += scrWidth) {
+		byte *destLineP = destP;
+
+		for (int byteCtr = 0, bits = *charSrcP++;
+			byteCtr < (fontWidth / 8);
+			bits = *charSrcP++) {
+			// Iterate through the 8 bits
+			for (int x = 0; x < 8; ++x, ++destLineP, bits <<= 1) {
+				if (bits & 0x80)
+					*destLineP = fgCol;
+				else
+					*destLineP = bgCol;
+			}
+		}
+	}
+
+	if (screenP == (byte *)g_screen->getPixels())
+		g_screen->addDirtyRect(Common::Rect(
+			x, y, x + fontWidth, y + fontHeight));
 }
 
 void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
-	warning("STUB - putz");
+	putcxy(gcurx, gcury, c, fgCol, bgCol, scrWidth);
 }
 
 void init_svga(VesaInfo *vi_, byte *virt_screen) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 622ad843849..93b008de70f 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -72,8 +72,7 @@ void zoom_img(byte *source, byte *dest, int16 xdiff, int16 ydiff);
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
     int16 ydiff, int16 scrWidth);
 
-void putcxy(int16 x, int16 y, char zeichen, int16 forcol,
-	int16 backcol, int16 scrWidth);
+void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth);
 void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth);
 void setfont(byte *addr, int16 width, int16 height, int16 first,
              int16 last);
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index aa6f1b1baea..47eab7448fe 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -1516,10 +1516,6 @@ int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	return (diff);
 }
 
-void mcga_grafik::scale_image(byte *source, byte *dest, int16 xdiff_, int16 ydiff_) {
-	zoom_img(source, dest, xdiff_, ydiff_);
-}
-
 void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
 	if ((xdiff_) || (ydiff_))
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 87a1e987448..68b79f273df 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -124,8 +124,6 @@ public:
 	                 int16 hoehe, int16 scrwidth);
 	void blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth);
 	void sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth);
-	void scale_image(byte *source, byte *dest, int16 xdiff,
-	                 int16 ydiff);
 	void scale_set(byte *sptr, int16 x, int16 y, int16 xdiff,
 	               int16 ydiff, int16 scrwidth);
 	void map_spr2screen(byte *sptr, int16 x, int16 y);


Commit: f017f1eeb2edb43b37f795404e82319d3ee65899
    https://github.com/scummvm/scummvm/commit/f017f1eeb2edb43b37f795404e82319d3ee65899
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Fixing atdsys block search, some header casts to use load functions

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/main_menu.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 3889e766217..6bc657a4815 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/memstream.h"
 #include "chewy/ngshext.h"
 #include "chewy/atds.h"
 #include "chewy/defines.h"
@@ -31,6 +32,17 @@ namespace Chewy {
 extern char *err_str;
 int16 mouse_push;
 
+void AtsTxtHeader::load(Common::SeekableReadStream *src) {
+	TxtNr = src->readSint16LE();
+	AMov = src->readSint16LE();
+	CurNr = src->readSint16LE();
+}
+
+void AtsStrHeader::load(Common::SeekableReadStream *src) {
+	VocNr = src->readSint16LE();
+}
+
+
 atdsys::atdsys() {
 	int16 i;
 	SplitStringInit init_ssi = { 0, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
@@ -544,7 +556,7 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 				atsv.Color = color;
 				mouse_push = true;
 			}
-			*voc_nr = atsv.StrHeader->VocNr - ATDS_VOC_OFFSET;
+			*voc_nr = atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
 			if ((atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
 				atsv.Display = false;
 			}
@@ -661,9 +673,9 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 		if (str_ != 0) {
 			ats_search_nr(txt_nr, &str_);
 			if (str_ != 0) {
-
 				ats_search_str(txt_anz, &lo_hi[ak_nybble],
 				               (uint8)ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
+
 				if (str_ != 0) {
 					status = 0;
 					lo_hi[1] <<= 4;
@@ -741,14 +753,13 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 		        str_[1] == (char)BLOCKENDE &&
 		        str_[2] == (char)BLOCKENDE) {
 			ende = 2;
-		} else if (*str_ == (char)STEUERBYTE) {
-			if (str_[1] == (char)txt_mode) {
+		} else if (str_[0] == (char)0xf2 && str_[1] == (char)0xfe) {
+			if (str_[2] == (char)txt_mode)
 				ende = 1;
-				++str_;
-			}
+			str_ += 3;
 		}
-		++str_;
 	}
+
 	if (ende == 2)
 		str_ = 0;
 	return (str_);
@@ -756,31 +767,39 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	char *start_str;
-	int16 *pos;
 	int16 ende;
 	int16 ende1;
 	start_str = *str_;
 	ende = 0;
+
 	while (!ende) {
-		pos = (int16 *)start_str;
-		if (*pos == txt_nr) {
+		if (READ_LE_UINT16(start_str) == txt_nr) {
 			ende = 1;
-			atsv.TxtHeader = (AtsTxtHeader *)pos;
-			*str_ = (char *)pos;
-			*str_ += sizeof(AtsTxtHeader);
-			if (atsv.TxtMode != TXT_MARK_NAME)
-				atsv.StrHeader = (AtsStrHeader *)str_;
-			*str_ += sizeof(AtsStrHeader);
+
+			Common::MemoryReadStream rs1((const byte *)start_str,
+				AtsTxtHeader::SIZE());
+			atsv.TxtHeader.load(&rs1);
+			*str_ = start_str + AtsTxtHeader::SIZE();
+
+			if (atsv.TxtMode != TXT_MARK_NAME) {
+				Common::MemoryReadStream rs2((const byte *)str,
+					AtsStrHeader::SIZE());
+				atsv.StrHeader.load(&rs2);
+			}
+
+			*str_ += AtsStrHeader::SIZE();
+
 		} else {
-			start_str += sizeof(AtsTxtHeader);
-			start_str += sizeof(AtsStrHeader);
+			start_str += AtsTxtHeader::SIZE();
+			start_str += AtsStrHeader::SIZE();
 			ende1 = 0;
+
 			while (!ende1) {
-				if (start_str[0] == ATDS_END) {
+				if (start_str[0] == (char)ATDS_END) {
 					if ((start_str[1] == (char)BLOCKENDE &&
 					        start_str[2] == (char)BLOCKENDE &&
 					        start_str[3] == (char)BLOCKENDE) ||
-					        start_str[1] == STEUERBYTE) {
+					        start_str[1] == (char)STEUERBYTE) {
 						ende = 1;
 						ende1 = 1;
 						*str_ = 0;
@@ -789,6 +808,7 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 
 					}
 				}
+
 				++start_str;
 			}
 		}
@@ -802,10 +822,11 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 	int16 count;
 	tmp_str = *str_;
 	start_str = *str_;
-	tmp_str += sizeof(AtsStrHeader);
+	tmp_str += AtsStrHeader::SIZE();
 	*anz = 0;
 	ende = 0;
 	count = 0;
+
 	while (!ende) {
 		if (count == *status) {
 			if (!*tmp_str) {
@@ -813,11 +834,15 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 			} else if (*tmp_str == ATDS_END_TEXT) {
 				ende = 1;
 				*str_ = start_str;
-				start_str -= sizeof(AtsStrHeader);
-				if (atsv.TxtMode != TXT_MARK_NAME)
-					atsv.StrHeader = (AtsStrHeader *)start_str;
-				if (tmp_str[1] != ATDS_END) {
+				start_str -= AtsStrHeader::SIZE();
+
+				if (atsv.TxtMode != TXT_MARK_NAME) {
+					Common::MemoryReadStream rs((const byte *)start_str,
+						AtsStrHeader::SIZE());
+					atsv.StrHeader.load(&rs);
+				}
 
+				if (tmp_str[1] != ATDS_END) {
 					if (!bit->is_bit(steuer, ATS_COUNT_BIT))
 						++*status;
 				} else {
@@ -833,13 +858,16 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 					*anz = 0;
 					*status = count;
 					*str_ = start_str;
-					start_str -= sizeof(AtsStrHeader);
-					if (atsv.TxtMode != TXT_MARK_NAME)
-						atsv.StrHeader = (AtsStrHeader *)start_str;
+					start_str -= AtsStrHeader::SIZE();
+					if (atsv.TxtMode != TXT_MARK_NAME) {
+						Common::MemoryReadStream rs((const byte *)start_str,
+							AtsStrHeader::SIZE());
+						atsv.StrHeader.load(&rs);
+					}
 				} else {
 					++count;
 
-					tmp_str += sizeof(AtsStrHeader);
+					tmp_str += AtsStrHeader::SIZE();
 					start_str = tmp_str + 1;
 				}
 			} else if (*tmp_str == ATDS_END ||
@@ -851,6 +879,7 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 				*str_ = 0;
 			}
 		}
+
 		++tmp_str;
 	}
 }
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 33de35e84fe..be69f3be7a3 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -197,19 +197,25 @@ struct AdsNextBlk {
 };
 
 struct AtsTxtHeader {
-	int16 TxtNr;
-	int16 AMov;
-	int16 CurNr;
+	int16 TxtNr = 0;
+	int16 AMov = 0;
+	int16 CurNr = 0;
+
+	void load(Common::SeekableReadStream *src);
+	static size_t SIZE() { return 6; }
 };
 
 struct AtsStrHeader {
-	int16 VocNr;
+	int16 VocNr = 0;
+
+	void load(Common::SeekableReadStream *src);
+	static size_t SIZE() { return 2; }
 };
 
 struct AtsVar {
 	bool Display;
-	AtsTxtHeader *TxtHeader;
-	AtsStrHeader *StrHeader;
+	AtsTxtHeader TxtHeader;
+	AtsStrHeader StrHeader;
 	char *Ptr;
 	int16 DelayCount;
 	int16 SilentCount;
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index e287f19eece..7a3037daada 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -27,6 +27,15 @@
 
 namespace Chewy {
 
+enum MainMenuSelection {
+	MM_START_GAME = 0,
+	MM_NOTHING = 1,
+	MM_LOAD_GAME = 2,
+	MM_CINEMA = 3,
+	MM_QUIT = 4,
+	MM_CREDITS = 5
+};
+
 class MainMenu {
 private:
 	static int _selection;
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 17ffbd965d2..d4833ffb43c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -335,7 +335,6 @@ void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth)
 	byte *charSrcP = fontAddr + (c - fontFirst) * charSize;
 
 	byte *destP;
-	int width;
 	if (scrWidth != 0) {
 		destP = screenP + (y * scrWidth) + x;
 	} else {
@@ -343,14 +342,14 @@ void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth)
 		scrWidth = SCREEN_WIDTH;
 	}
 
-	for (int y = 0; y < fontHeight; ++y, destP += scrWidth) {
+	for (size_t yp = 0; yp < fontHeight; ++yp, destP += scrWidth) {
 		byte *destLineP = destP;
 
-		for (int byteCtr = 0, bits = *charSrcP++;
-			byteCtr < (fontWidth / 8);
-			bits = *charSrcP++) {
+		for (size_t byteCtr = 0; byteCtr < (fontWidth / 8); ++byteCtr) {
+			byte bits = *charSrcP++;
+
 			// Iterate through the 8 bits
-			for (int x = 0; x < 8; ++x, ++destLineP, bits <<= 1) {
+			for (size_t xp = 0; xp < 8; ++xp, ++destLineP, bits <<= 1) {
 				if (bits & 0x80)
 					*destLineP = fgCol;
 				else
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 47eab7448fe..2fde57025e6 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -943,7 +943,7 @@ void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16
 	putz(cursor_z, fcol, bcol, scrwidth);
 }
 
-void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
+void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
                           const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
@@ -968,7 +968,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 			case 8:
 				gcurx -= fvorx;
 				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
@@ -983,18 +983,18 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 				break;
 
 			case 127 :
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			default :
 				if (zeichen >= fontfirst)
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 				break;
 			}
 		}
 		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
 			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
+				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
 			}
 			else {
@@ -1009,7 +1009,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 				++i;
 				switch (zeichen) {
 				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 					break;
 
@@ -1026,12 +1026,12 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1050,12 +1050,12 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1065,14 +1065,14 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 					tempptr = va_arg(parptr, char *);
 					if (!count) {
 						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
 					}
 					else {
 						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
@@ -1085,8 +1085,8 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 s
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void mcga_grafik::speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
-                                int16 scrwidth, char *string) {
+void mcga_grafik::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
+                                int16 scrwidth, const char *string) {
 	int16 i = 0;
 	char zeichen;
 	gcurx = x;
@@ -1096,13 +1096,14 @@ void mcga_grafik::speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
 		zeichen = string[i];
 		++i;
 		if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
-			putz(zeichen, forcol, backcol, scrwidth);
+			putz(zeichen, fgCol, bgCol, scrwidth);
 			vors();
 		}
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *string, ...) {
+void mcga_grafik::print(int16 fgCol, int16 bgCol, int16 scrwidth,
+		const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
 	char *tempptr;
@@ -1123,7 +1124,7 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 			case 8:
 				gcurx -= fvorx;
 				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
@@ -1138,19 +1139,19 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 				break;
 
 			case 127 :
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			default :
 				if (zeichen >= fontfirst) {
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 				}
 				break;
 			}
 		} else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 0)) {
 			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
+				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
 			} else {
 				zeichen = string[i];
@@ -1164,7 +1165,7 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 				++i;
 				switch (zeichen) {
 				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 					break;
 
@@ -1181,12 +1182,12 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1205,12 +1206,12 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1220,13 +1221,13 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 					tempptr = va_arg(parptr, char *);
 					if (!count) {
 						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
 					} else {
 						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
@@ -1240,8 +1241,8 @@ void mcga_grafik::print(int16 forcol, int16 backcol, int16 scrwidth, char *strin
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
-                           int16 scrwidth, char *string, ...) {
+void mcga_grafik::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
+                           int16 scrwidth, const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
 	char *tempptr;
@@ -1263,7 +1264,7 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 			case 8:
 				gcurx -= fvorx;
 				gcury -= fvory;
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
@@ -1278,18 +1279,18 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 				break;
 
 			case 127 :
-				putz(32, forcol, backcol, scrwidth);
+				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			default :
 				if (zeichen >= fontfirst)
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 				break;
 			}
 		}
 		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
 			if (zeichen != '%') {
-				putz(zeichen, forcol, backcol, scrwidth);
+				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
 			}
 			else {
@@ -1304,7 +1305,7 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 				++i;
 				switch (zeichen) {
 				case '%':
-					putz(zeichen, forcol, backcol, scrwidth);
+					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 					break;
 
@@ -1321,12 +1322,12 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1345,12 +1346,12 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 					if (count) {
 						diff = check_stellen_anz(zstring, &k, count);
 						for (l = 0; l < diff; l++) {
-							putz(0x30, forcol, backcol, scrwidth);
+							putz(0x30, fgCol, bgCol, scrwidth);
 							vors();
 						}
 					}
 					while (zstring[k] != 0) {
-						putz(zstring[k], forcol, backcol, scrwidth);
+						putz(zstring[k], fgCol, bgCol, scrwidth);
 						vors();
 						++k;
 					}
@@ -1360,14 +1361,14 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 					tempptr = va_arg(parptr, char *);
 					if (!count) {
 						while (*tempptr != 0) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
 					}
 					else {
 						for (l = 0; l < count; l++) {
-							putz(*tempptr, forcol, backcol, scrwidth);
+							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
 							vors();
 						}
@@ -1381,7 +1382,7 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16
 	}
 }
 
-void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
+void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
                               int16 scrwidth) {
 	crlfx = x;
 	crlfy = y + fonth + 2;
@@ -1390,7 +1391,7 @@ void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int1
 		case 8:
 			x -= fvorx;
 			y -= fvory;
-			putcxy(x, y, 32, forcol, backcol, scrwidth);
+			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
 
 		case 10:
@@ -1406,17 +1407,17 @@ void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int1
 			break;
 
 		case 127:
-			putcxy(x, y, 32, forcol, backcol, scrwidth);
+			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
 		}
 	}
 	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
-		putcxy(x, y, zeichen, forcol, backcol, scrwidth);
+		putcxy(x, y, zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}
 }
 
-void mcga_grafik::printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth) {
+void mcga_grafik::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
 	crlfx = gcurx;
 	crlfy = gcury + fonth + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
@@ -1424,7 +1425,7 @@ void mcga_grafik::printchar(char zeichen, int16 forcol, int16 backcol, int16 scr
 		case 8:
 			gcurx -= fvorx;
 			gcury -= fvory;
-			putz(32, forcol, backcol, scrwidth);
+			putz(32, fgCol, bgCol, scrwidth);
 			break;
 
 		case 10:
@@ -1440,12 +1441,12 @@ void mcga_grafik::printchar(char zeichen, int16 forcol, int16 backcol, int16 scr
 			break;
 
 		case 127:
-			putz(32, forcol, backcol, scrwidth);
+			putz(32, fgCol, bgCol, scrwidth);
 			break;
 		}
 	}
 	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
-		putz(zeichen, forcol, backcol, scrwidth);
+		putz(zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}
 }
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 68b79f273df..3b0d3509ebf 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -132,16 +132,16 @@ public:
 	void plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
 	                   char cursor);
 	int16 scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth, const char *string, ...);
-	void printxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 scrwidth,
-	             const char *format, ...);
-	void speed_printxy(int16 x, int16 y, int16 forcol, int16 backcol,
-	                   int16 scrwidth, char *string);
-	void print(int16 forcol, int16 backcol, int16 scrwidth, char *format, ...);
-	void printnxy(int16 x, int16 y, int16 forcol, int16 backcol, int16 menge,
-	              int16 scrwidth, char *format, ...);
-	void printcharxy(int16 x, int16 y, char zeichen, int16 forcol, int16 backcol,
-	                 int16 scrwidth);
-	void printchar(char zeichen, int16 forcol, int16 backcol, int16 scrwidth);
+	void printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
+	    const char *format, ...);
+	void speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
+	    int16 scrwidth, const char *string);
+	void print(int16 fgCol, int16 bgCol, int16 scrwidth, const char *format, ...);
+	void printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
+	    int16 scrwidth, const char *format, ...);
+	void printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
+	    int16 scrwidth);
+	void printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth);
 	void vorschub();
 	void set_vorschub(int16 x, int16 y);
 	void move(int16 x, int16 y);


Commit: c256d097737e6014406396fcfde5107c7873ee25
    https://github.com/scummvm/scummvm/commit/c256d097737e6014406396fcfde5107c7873ee25
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Change ats_search_str to match release

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 6bc657a4815..a2cf1a0a0a0 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -33,13 +33,13 @@ extern char *err_str;
 int16 mouse_push;
 
 void AtsTxtHeader::load(Common::SeekableReadStream *src) {
-	TxtNr = src->readSint16LE();
-	AMov = src->readSint16LE();
-	CurNr = src->readSint16LE();
+	TxtNr = src->readUint16LE();
+	AMov = src->readUint16LE();
+	CurNr = src->readUint16LE();
 }
 
 void AtsStrHeader::load(Common::SeekableReadStream *src) {
-	VocNr = src->readSint16LE();
+	VocNr = src->readUint16LE();
 }
 
 
@@ -662,8 +662,8 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 	set_ats_mem(mode);
 
 	atsv.TxtMode = txt_mode;
-	if (!get_steuer_bit(txt_nr, ATS_AKTIV_BIT, mode)) {
 
+	if (!get_steuer_bit(txt_nr, ATS_AKTIV_BIT, mode)) {
 		status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2];
 		ak_nybble = (atsv.TxtMode + 1) % 2;
 
@@ -686,7 +686,8 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 			}
 		}
 	}
-	return (str_);
+
+	return str_;
 }
 
 void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
@@ -767,49 +768,49 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	char *start_str;
-	int16 ende;
 	int16 ende1;
 	start_str = *str_;
-	ende = 0;
 
-	while (!ende) {
-		if (READ_LE_UINT16(start_str) == txt_nr) {
-			ende = 1;
+	bool done1 = false;
+	while (!done1) {
+		Common::MemoryReadStream rs1((const byte *)start_str,
+			AtsTxtHeader::SIZE());
+		atsv.TxtHeader.load(&rs1);
 
-			Common::MemoryReadStream rs1((const byte *)start_str,
-				AtsTxtHeader::SIZE());
-			atsv.TxtHeader.load(&rs1);
+		if (atsv.TxtHeader.TxtNr == 0xFEF0 &&
+				atsv.TxtHeader.AMov == txt_nr) {
+			// Found match
 			*str_ = start_str + AtsTxtHeader::SIZE();
 
-			if (atsv.TxtMode != TXT_MARK_NAME) {
-				Common::MemoryReadStream rs2((const byte *)str,
+			if (atsv.TxtMode) {
+				Common::MemoryReadStream rs2((const byte *)*str_,
 					AtsStrHeader::SIZE());
 				atsv.StrHeader.load(&rs2);
 			}
 
 			*str_ += AtsStrHeader::SIZE();
+			break;
+		}
 
-		} else {
-			start_str += AtsTxtHeader::SIZE();
-			start_str += AtsStrHeader::SIZE();
-			ende1 = 0;
-
-			while (!ende1) {
-				if (start_str[0] == (char)ATDS_END) {
-					if ((start_str[1] == (char)BLOCKENDE &&
-					        start_str[2] == (char)BLOCKENDE &&
-					        start_str[3] == (char)BLOCKENDE) ||
-					        start_str[1] == (char)STEUERBYTE) {
-						ende = 1;
-						ende1 = 1;
-						*str_ = 0;
+		start_str += AtsTxtHeader::SIZE() + AtsStrHeader::SIZE();
+
+		// Need to iterate over the following string to next entry
+		bool done2 = false;
+		for (; !done2; start_str++) {
+			if (*start_str == 13) {
+				// Reached end of line
+				if (READ_LE_UINT16(start_str + 1) == 0xFEF1)
+					start_str += 4;
+				else if (start_str[1] == 0xe) {
+					++start_str;
+					if (start_str[1] == 0xf && start_str[2] == 0xf &&
+							start_str[3] == 0xf) {
+						done1 = done2 = true;
+						*str_ = nullptr;
 					} else {
-						ende1 = 1;
-
+						done2 = true;
 					}
 				}
-
-				++start_str;
 			}
 		}
 	}
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index be69f3be7a3..9170f167752 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -196,20 +196,20 @@ struct AdsNextBlk {
 	int16 EndNr;
 };
 
-struct AtsTxtHeader {
-	int16 TxtNr = 0;
-	int16 AMov = 0;
-	int16 CurNr = 0;
+struct AtsStrHeader {
+	uint16 VocNr = 0;
 
 	void load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 6; }
+	static size_t SIZE() { return 4; }
 };
 
-struct AtsStrHeader {
-	int16 VocNr = 0;
+struct AtsTxtHeader {
+	uint16 TxtNr = 0;
+	uint16 AMov = 0;
+	uint16 CurNr = 0;
 
 	void load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 2; }
+	static size_t SIZE() { return 8; }
 };
 
 struct AtsVar {


Commit: 34faad99d6ec3f8c07470ca46f9bd43792535fe5
    https://github.com/scummvm/scummvm/commit/34faad99d6ec3f8c07470ca46f9bd43792535fe5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Fix ttf_header loading in set_fontadr

Changed paths:
    engines/chewy/mcga_grafik.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 2fde57025e6..32c59d0cfa9 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/memstream.h"
 #include "chewy/chewy.h"
 #include "chewy/mcga_grafik.h"
 #include "chewy/mcga.h"
@@ -504,11 +505,13 @@ void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
 }
 
 void mcga_grafik::set_fontadr(byte *adr) {
-	tff_header *tff;
-	tff = (tff_header *) adr;
-	setfont(adr + sizeof(tff_header), (int16)tff->width, (int16)tff->height,
-	        (int16)tff->first, (int16)tff->last);
-	fvorx = (int16)tff->width;
+	Common::MemoryReadStream rs(adr, tff_header::SIZE());
+	tff_header tff;
+	tff.load(&rs);
+
+	setfont(adr + tff_header::SIZE(), tff.width, tff.height,
+	        tff.first, tff.last);
+	fvorx = tff.width;
 	fvory = 0;
 }
 
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index dedd9dee9c5..53aee1dc08f 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -120,6 +120,7 @@ struct tff_header {
 	int16 height = 0;
 
 	bool load(Common::SeekableReadStream *src);
+	static size_t SIZE() { return 18; }
 };
 
 #define D_GR 16


Commit: d769ccfd04b0f621d6b338a47b2125c0b213bcf5
    https://github.com/scummvm/scummvm/commit/d769ccfd04b0f621d6b338a47b2125c0b213bcf5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Implement missing font loading

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/inits.cpp
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index adb38c0164c..72fcff7b889 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -479,36 +479,35 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 }
 
 void datei::load_tff(const char *fname, byte *speicher) {
-	Stream *handle;
+	Common::File f;
 	tff_header *tff;
 	uint32 size;
-	int16 i;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
+
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+
 	if (speicher) {
-		tff = (tff_header *)speicher;
-		if ((*filename) == 0)
+		if (*filename == 0)
 			get_filename(filename, MAXPATH);
-		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (chewy_fread(speicher, sizeof(tff_header), 1, handle)) {
+		if (!strchr(filename, '.'))
+			strcat(filename, ".tff");
+
+		if (f.open(filename)) {
+			tff = (tff_header *)speicher;
+			if (tff->load(&f)) {
 				size = tff->size;
-				if (!(chewy_fread((speicher + sizeof(tff_header)),
-				            (uint16)size, 1, handle))) {
+				if (f.read(speicher + sizeof(tff_header), size) != size) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				}
 			}
-			chewy_fclose(handle);
-		}
-		else {
+
+			f.close();
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}
@@ -1387,6 +1386,8 @@ uint32 datei::size(const char *fname, int16 typ) {
 		}
 	}
 
+	// SCUMMVM: Note to self, use sizeof(structures) for
+	// allocating size, not custom ::SIZE() functions
 	if (f.open(filename)) {
 		switch (typ) {
 		case TBFDATEI:
@@ -1425,11 +1426,11 @@ uint32 datei::size(const char *fname, int16 typ) {
 			break;
 
 		case TFFDATEI:
-			if (chewy_fread(&tff, sizeof(tff_header), 1, &f)) {
+			if (tff.load(&f)) {
 				id = get_id(tff.id);
-				if (id == TFFDATEI)
+				if (id == TFFDATEI) {
 					size = tff.size + sizeof(tff_header);
-				else {
+				} else {
 					modul = DATEI;
 					fcode = NOTTBF;
 				}
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 0d3c0f3bf08..8ccae883875 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -29,6 +29,7 @@
 namespace Chewy {
 
 extern int16 room_start_nr;
+static void font_load();
 
 void standard_init() {
 	mem = new memory;
@@ -90,6 +91,7 @@ void standard_init() {
 	pal [767] = 63;
 	out->einblenden(pal, 0);
 	room->set_timer_start(1);
+	font_load();
 
 	out->cls();
 	in->neuer_kb_handler(&kbinfo);
@@ -319,6 +321,32 @@ void new_game() {
 		spieler.InventSlot[i] = obj->spieler_invnr[i + 1];
 }
 
+static void font_load() {
+	int16 vorx;
+	int16 vory;
+	int16 fntbr;
+	int16 fnth;
+
+	// Load the 8x8 font
+	mem->tff_adr(FONT8x8, &font8x8);
+	ERROR
+	out->set_fontadr(font8x8);
+
+	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
+	fvorx8x8 = vorx;
+	fvory8x8 = vory;
+
+	// Load the 6x8 font
+	mem->tff_adr(FONT6x8, &font6x8);
+	ERROR
+	out->set_fontadr(font6x8);
+	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
+	fvorx6x8 = vorx - 2;
+	fvory6x8 = vory;
+	out->set_vorschub(fvorx6x8, vory);
+	atds->set_font(font8x8, fvorx8x8, 10);
+}
+
 void init_load() {
 	taf_dateiheader *tafheader;
 	AkChewyTaf = 0;
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 32c59d0cfa9..c006736b7b5 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -505,13 +505,11 @@ void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
 }
 
 void mcga_grafik::set_fontadr(byte *adr) {
-	Common::MemoryReadStream rs(adr, tff_header::SIZE());
-	tff_header tff;
-	tff.load(&rs);
+	tff_header *tff = (tff_header *)adr;
 
-	setfont(adr + tff_header::SIZE(), tff.width, tff.height,
-	        tff.first, tff.last);
-	fvorx = tff.width;
+	setfont(adr + sizeof(tff_header), tff->width, tff->height,
+	        tff->first, tff->last);
+	fvorx = tff->width;
 	fvory = 0;
 }
 


Commit: 5219ff6bbe203b75dd9ccd53f4988642eeb1734f
    https://github.com/scummvm/scummvm/commit/5219ff6bbe203b75dd9ccd53f4988642eeb1734f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:02-08:00

Commit Message:
CHEWY: Fixes for displaying on-screen text

Changed paths:
    engines/chewy/main_menu.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 7a3037daada..270462f72fb 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -29,7 +29,7 @@ namespace Chewy {
 
 enum MainMenuSelection {
 	MM_START_GAME = 0,
-	MM_NOTHING = 1,
+	MM_VIEW_INTRO = 1,
 	MM_LOAD_GAME = 2,
 	MM_CINEMA = 3,
 	MM_QUIT = 4,
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index d4833ffb43c..e4c03a432a2 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -35,15 +35,13 @@ static byte *screenDefaultP;
 static int spriteWidth;
 static byte *fontAddr;
 static size_t fontWidth, fontHeight;
-static int fontFirst, fontLast;
-static int fontX, fontY;
+int fontFirst, fontLast;
 
 void init_mcga() {
 	screenP = (byte *)g_screen->getPixels();
 	screenHasDefault = false;
 	screenDefaultP = nullptr;
 	spriteWidth = 0;
-	fontX = fontY = 0;
 }
 
 void old_mode() {
@@ -322,25 +320,21 @@ void upd_scr() {
 }
 
 void vors() {
-	fontX = fvorx;
-	fontY = fvory;
+	gcurx += fvorx;
+	gcury += fvory;
 }
 
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
 	warning("STUB - zoom_set");
 }
 
-void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
+void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
 	size_t charSize = (fontWidth / 8) * fontHeight;
 	byte *charSrcP = fontAddr + (c - fontFirst) * charSize;
 
-	byte *destP;
-	if (scrWidth != 0) {
-		destP = screenP + (y * scrWidth) + x;
-	} else {
-		destP = screenP + (y * scrWidth) + x;
+	if (scrWidth == 0)
 		scrWidth = SCREEN_WIDTH;
-	}
+	byte *destP = screenP + (y * scrWidth) + x;
 
 	for (size_t yp = 0; yp < fontHeight; ++yp, destP += scrWidth) {
 		byte *destLineP = destP;
@@ -352,7 +346,7 @@ void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth)
 			for (size_t xp = 0; xp < 8; ++xp, ++destLineP, bits <<= 1) {
 				if (bits & 0x80)
 					*destLineP = fgCol;
-				else
+				else if (bgCol <= 0xff)
 					*destLineP = bgCol;
 			}
 		}
@@ -363,7 +357,7 @@ void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth)
 			x, y, x + fontWidth, y + fontHeight));
 }
 
-void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
+void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
 	putcxy(gcurx, gcury, c, fgCol, bgCol, scrWidth);
 }
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 93b008de70f..03c7f8e7333 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -28,6 +28,8 @@
 
 namespace Chewy {
 
+extern int fontFirst, fontLast;
+
 void init_mcga();
 void old_mode();
 
@@ -72,8 +74,8 @@ void zoom_img(byte *source, byte *dest, int16 xdiff, int16 ydiff);
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
     int16 ydiff, int16 scrWidth);
 
-void putcxy(int16 x, int16 y, char c, int16 fgCol, int16 bgCol, int16 scrWidth);
-void putz(char c, int16 fgCol, int16 bgCol, int16 scrWidth);
+void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth);
+void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth);
 void setfont(byte *addr, int16 width, int16 height, int16 first,
              int16 last);
 void vors();
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index c006736b7b5..185329e2289 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -48,7 +48,6 @@ int16 clipx1, clipx2, clipy1, clipy2;
 int16 gcurx, gcury, fvorx, fvory;
 int16 fontbr, fonth;
 int16 scr_w, scr_h;
-int16 fontfirst, fontlast;
 char writemode;
 
 char MausMode;
@@ -547,7 +546,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 		zeichen = string[i];
 		++i;
 
-		if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+		if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
 			if (zeichen == '%') {
 
 				zeichen = string[i];
@@ -947,7 +946,8 @@ void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16
 void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
                           const char *string, ...) {
 	int16 i = 0, k = 0, l;
-	char zeichen, zstring[35];
+	char zstring[35];
+	unsigned char nextChar;
 	int16 izahl;
 	int16 count, diff;
 	uint16 uzahl;
@@ -961,11 +961,12 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 	gcurx = x;
 	gcury = y;
 	i = 0;
+
 	do {
-		zeichen = string[i];
+		nextChar = (unsigned char)string[i];
 		++i;
-		if ((zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
+		if ((nextChar < 32) || (nextChar == 127)) {
+			switch (nextChar) {
 			case 8:
 				gcurx -= fvorx;
 				gcury -= fvory;
@@ -988,35 +989,33 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 				break;
 
 			default :
-				if (zeichen >= fontfirst)
-					putz(zeichen, fgCol, bgCol, scrwidth);
+				if (nextChar >= fontFirst)
+					putz(nextChar, fgCol, bgCol, scrwidth);
 				break;
 			}
-		}
-		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
-			if (zeichen != '%') {
-				putz(zeichen, fgCol, bgCol, scrwidth);
+		} else if ((nextChar >= fontFirst) && (nextChar <= fontLast)) {
+			if (nextChar != '%') {
+				putz(nextChar, fgCol, bgCol, scrwidth);
 				vors();
-			}
-			else {
-				zeichen = string[i];
+			} else {
+				nextChar = string[i];
 				count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
+				if ((nextChar >= 0x30) && (nextChar <= 0x39))
 					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
+				while ((nextChar >= 0x30) && (nextChar <= 0x39)) {
 					++i;
-					zeichen = string[i];
+					nextChar = string[i];
 				}
 				++i;
-				switch (zeichen) {
+				switch (nextChar) {
 				case '%':
-					putz(zeichen, fgCol, bgCol, scrwidth);
+					putz(nextChar, fgCol, bgCol, scrwidth);
 					vors();
 					break;
 
 				case 'd':
 				case 'u':
-					if (zeichen == 'd') {
+					if (nextChar == 'd') {
 						izahl = va_arg(parptr, int);
 						itoa(izahl, zstring, 10);
 					} else {
@@ -1070,8 +1069,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 							++tempptr;
 							vors();
 						}
-					}
-					else {
+					} else {
 						for (l = 0; l < count; l++) {
 							putz(*tempptr, fgCol, bgCol, scrwidth);
 							++tempptr;
@@ -1083,7 +1081,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 				}
 			}
 		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
+	} while ((i < MAXSTRING) && (nextChar != 0));
 }
 
 void mcga_grafik::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
@@ -1096,7 +1094,7 @@ void mcga_grafik::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
 	do {
 		zeichen = string[i];
 		++i;
-		if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
+		if ((zeichen >= fontFirst) && (zeichen <= fontLast)) {
 			putz(zeichen, fgCol, bgCol, scrwidth);
 			vors();
 		}
@@ -1144,13 +1142,13 @@ void mcga_grafik::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 				break;
 
 			default :
-				if (zeichen >= fontfirst) {
+				if (zeichen >= fontFirst) {
 					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 				}
 				break;
 			}
-		} else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 0)) {
+		} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 0)) {
 			if (zeichen != '%') {
 				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
@@ -1284,12 +1282,12 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 men
 				break;
 
 			default :
-				if (zeichen >= fontfirst)
+				if (zeichen >= fontFirst)
 					putz(zeichen, fgCol, bgCol, scrwidth);
 				break;
 			}
 		}
-		else if ((zeichen >= fontfirst) && (zeichen <= fontlast)) {
+		else if ((zeichen >= fontFirst) && (zeichen <= fontLast)) {
 			if (zeichen != '%') {
 				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
@@ -1411,8 +1409,7 @@ void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16
 			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
 		}
-	}
-	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+	} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
 		putcxy(x, y, zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}
@@ -1445,8 +1442,7 @@ void mcga_grafik::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwid
 			putz(32, fgCol, bgCol, scrwidth);
 			break;
 		}
-	}
-	else if ((zeichen >= fontfirst) && (zeichen <= fontlast) && (zeichen != 127)) {
+	} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
 		putz(zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}


Commit: e5d7aeb6dfd13ce31f5d52e6dd4fed5c1ad5b55e
    https://github.com/scummvm/scummvm/commit/e5d7aeb6dfd13ce31f5d52e6dd4fed5c1ad5b55e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: Start implementing main menu options, flic parsing fix

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 5da71b2894a..c399d4cf4c9 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -52,7 +52,7 @@ bool File::readArray(Common::SeekableReadStream *src, uint16 *arr, size_t size)
 	bool result = (uint32)rs->size() == (size * 2);
 	if (result) {
 		for (; size > 0; --size, ++arr)
-			*arr = src->readUint16LE();
+			*arr = rs->readUint16LE();
 	}
 
 	delete rs;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index d8e3e208ac2..ff8c672bb71 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -374,8 +374,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 						++j;
 						--count;
 					}
-				}
-				else {
+				} else {
 					count = -count;
 					data = *(short int *)tmp;
 					tmp += 2;
@@ -544,7 +543,6 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				Ssize[para[0]] = chead.size - 2;
 				Sound += chead.size;
 			}
-
 			break;
 
 		case PLAY_MUSIC:
@@ -639,11 +637,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case PLAY_RAW:
-
 			break;
 
 		case PLAY_VOC:
-
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 3b00b7f6bc1..290d6015ec2 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -77,7 +77,17 @@ void MainMenu::execute() {
 				return;
 		} while (_selection == -1);
 
-		warning("TODO: Main menu option selected");
+		switch (_selection) {
+		case MM_VIEW_INTRO:
+			fx->border(workpage, 100, 0, 0);
+			out->setze_zeiger(workptr);
+			flags.NoPalAfterFlc = true;
+			flic_cut(135, 0);
+			break;
+
+		default:
+			break;
+		}
 	}
 	 
 	// TODO


Commit: a8fd1ce5a7cf6b2da8d0942be59b42d2c254b244
    https://github.com/scummvm/scummvm/commit/a8fd1ce5a7cf6b2da8d0942be59b42d2c254b244
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: Implement delay mehtod

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ch_icm.cpp
    engines/chewy/episode1.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index faead5dc72c..485ee934bc1 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -180,7 +180,7 @@ ailclass::ailclass() {
 	if (enstr) {
 		printf(b);
 		printf("\n");
-		delay(800);
+		g_events->delay(800);
 	}
 #endif
 	SoundEnable = false;
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index ddf4eea3417..a3432110396 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -253,7 +253,7 @@ void go_auto_mov() {
 			} else {
 				out->printxy(0, 0, 255, 0, scr_width, "Nr zu hoch !!\0");
 				BELL
-				delay(300);
+				g_events->delay(300);
 			}
 		}
 	}
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 0ecf2caf14c..ca4afcb64c8 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/episode1.h"
@@ -775,7 +776,7 @@ int16 r4_sonde_comp() {
 		}
 		set_up_screen(DO_SETUP);
 	}
-	warning("FIXME: delay(500)");
+	g_events->delay(500);
 
 	clear_prog_ani();
 	spieler.PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 6fe7c36bef5..9d04aa8f9e2 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/system.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/timer.h"
@@ -92,4 +93,14 @@ void EventsManager::handleKbdEvent(const Common::Event &event) {
 	// TODO
 }
 
+void EventsManager::delay(size_t time) {
+	uint32 expiryTime = g_system->getMillis() + time;
+	uint32 currTime;
+
+	do {
+		update();
+		currTime = g_system->getMillis();
+	} while (currTime >= expiryTime);
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 33c7b4ae234..bde3be2d86f 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -43,6 +43,8 @@ public:
 
 	EventsManager(Graphics::Screen *screen);
 	virtual ~EventsManager();
+
+	void delay(size_t time);
 };
 
 extern EventsManager *g_events;
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 7879e1f3dc0..548bd07d5de 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/system.h"
+#include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/io_game.h"
 
@@ -399,7 +400,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				}
 			} else
 				in->hot_key = auswahl + 58;
-			//delay(200);
+			g_events->delay(200);
 			kbinfo->key_code = 0;
 			break;
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 6d8e03d4556..d04951709ec 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -90,7 +90,7 @@ void game_main() {
 	tidy();
 	out->rest_palette();
 	out->restore_mode();
-	}
+}
 
 void alloc_buffers() {
 	workpage = (byte *)calloc(64004l, 1);
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 290d6015ec2..8e1c56c3d46 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -50,7 +50,8 @@ void MainMenu::execute() {
 	menu_display = 0;
 	spieler.SVal5 = 1;
 
-	while (!SHOULD_QUIT) {
+	bool done = false;
+	while (!done && !SHOULD_QUIT) {
 		ailsnd->stop_mod();
 		ailsnd->end_sound();
 		SetUpScreenFunc = screenFunc;
@@ -85,6 +86,21 @@ void MainMenu::execute() {
 			flic_cut(135, 0);
 			break;
 
+		case MM_QUIT:
+			out->setze_zeiger(nullptr);
+			out->cls();
+			done = true;
+			break;
+
+		case MM_CREDITS:
+			fx->border(workpage, 100, 0, 0);
+			flags.NoPalAfterFlc = true;
+			flc->set_custom_user_function(creditsFn);
+			flic_cut(159, 0);
+			flc->remove_custom_user_function();
+			fx->border(workpage, 100, 0, 0);
+			break;
+
 		default:
 			break;
 		}
@@ -133,4 +149,20 @@ void MainMenu::animate() {
 	g_events->update();
 }
 
+int16 MainMenu::creditsFn(int16 key) {
+	if (key == 32 || key == 72 || key == 92 ||
+			key == 128 || key == 165 || key == 185 ||
+			key == 211 || key == 248 || key == 266) {
+		for (int idx = 0; idx < 2000; ++idx) {
+			if (in->get_switch_code() == 1)
+				return -1;
+			g_events->update();
+		}
+		return 0;
+
+	} else {
+		return in->get_switch_code() == 1 ? -1 : 0;
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 270462f72fb..3873999d815 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -50,6 +50,8 @@ private:
 	 * and checks for any option selection
 	 */
 	static void animate();
+
+	static int16 creditsFn(int16 key);
 public:
 	/**
 	 * Displays the menu
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 185329e2289..042937e683a 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -22,6 +22,7 @@
 
 #include "common/memstream.h"
 #include "chewy/chewy.h"
+#include "chewy/events.h"
 #include "chewy/mcga_grafik.h"
 #include "chewy/mcga.h"
 
@@ -86,7 +87,7 @@ mcga_grafik::mcga_grafik() {
 	if (enstr) {
 		printf(b);
 		printf("\n");
-		delay(800);
+		g_events->delay(800);
 	}
 #endif
 
@@ -826,7 +827,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 						}
 
 						if (izahl == 82) {
-							//delay(200);
+							g_events->delay(200);
 							if (!einfuegen) {
 								einfuegen = 1;
 								einfuege_cur = 125;
@@ -1524,7 +1525,7 @@ void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 yd
 void mcga_grafik::init(uint16 mode, byte *info_blk, byte *vscreen) {
 	if (!get_vesa_info(mode, info_blk)) {
 		init_svga(&vi, vscreen);
-		//delay(250);
+		//g_events->delay(250);
 	}
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 60fe9cc8d4a..14efa5d2ecd 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -22,6 +22,7 @@
 
 #include "common/system.h"
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/episode1.h"
@@ -1086,7 +1087,7 @@ void flic_cut(int16 nr, int16 mode) {
 	out->setze_zeiger(0);
 	det->disable_room_sound();
 	ailsnd->end_sound();
-	g_system->delayMillis(1000); // delay(50);
+	g_events->delay(50);
 	Ci.Handle = File::open("cut/cut.tap");
 	Ci.Fname = 0;
 
@@ -1235,7 +1236,7 @@ void flic_cut(int16 nr, int16 mode) {
 	}
 	ERROR;
 	ailsnd->end_sound();
-	g_system->delayMillis(1000); // delay(50);
+	g_events->delay(50);
 	ailsnd->set_sound_mastervol(spieler.SoundVol);
 	ailsnd->set_music_mastervol(spieler.MusicVol);
 	load_room_music(spieler.PersonRoomNr[P_CHEWY]);


Commit: 7e09c6ff4a173ffb281f5b2f82deb7f16e900942
    https://github.com/scummvm/scummvm/commit/7e09c6ff4a173ffb281f5b2f82deb7f16e900942
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: More main menu implementation

Changed paths:
    engines/chewy/main.h
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h
    engines/chewy/types.h


diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 70874fe1b79..9f8c03f5a47 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -31,7 +31,8 @@
 namespace Chewy {
 
 extern int16 menu_flag;
-
+extern bool inv_disp_ok;
+extern int16 tmp_menu_item;
 
 void game_main();
 void free_buffers();
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 8e1c56c3d46..2b469a58c6c 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -30,6 +30,7 @@
 namespace Chewy {
 
 int MainMenu::_selection;
+int MainMenu::_personAni[3];
 
 void MainMenu::execute() {
 #ifdef TODO_REENABLE
@@ -48,7 +49,7 @@ void MainMenu::execute() {
 	minfo.y = 92;
 	spieler.inv_cur = 0;
 	menu_display = 0;
-	spieler.SVal5 = 1;
+	spieler.soundLoopMode = 1;
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
@@ -79,6 +80,11 @@ void MainMenu::execute() {
 		} while (_selection == -1);
 
 		switch (_selection) {
+		case MM_START_GAME:
+			startGame();
+			playGame();
+			break;
+
 		case MM_VIEW_INTRO:
 			fx->border(workpage, 100, 0, 0);
 			out->setze_zeiger(workptr);
@@ -86,6 +92,19 @@ void MainMenu::execute() {
 			flic_cut(135, 0);
 			break;
 
+		case MM_LOAD_GAME:
+			if (loadGame())
+				playGame();
+			break;
+
+		case MM_CINEMA:
+			cursor_wahl(4);
+			cur->move(152, 92);
+			minfo.x = 152;
+			minfo.y = 92;
+			cinema();
+			break;
+
 		case MM_QUIT:
 			out->setze_zeiger(nullptr);
 			out->cls();
@@ -105,8 +124,6 @@ void MainMenu::execute() {
 			break;
 		}
 	}
-	 
-	// TODO
 }
 
 void MainMenu::screenFunc() {
@@ -165,4 +182,117 @@ int16 MainMenu::creditsFn(int16 key) {
 	}
 }
 
+void MainMenu::startGame() {
+	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
+	atds->open_handle(ADSH_TMP, "rb+", 3);
+	ERROR
+
+	hide_cur();
+	animate();
+	exit_room(-1);
+
+	bool soundSwitch = spieler.SoundSwitch;
+	uint8 soundVol = spieler.SoundVol;
+	bool musicSwitch = spieler.MusicSwitch;
+	uint8 musicVol = spieler.MusicVol;
+	bool speechSwitch = spieler.SpeechSwitch;
+	uint8 framesPerSecond = spieler.FramesPerSecond;
+	bool displayText = spieler.DisplayText;
+	int sndLoopMode = spieler.soundLoopMode;
+
+	var_init();
+
+	spieler.SoundSwitch = soundSwitch;
+	spieler.SoundVol = soundVol;
+	spieler.MusicSwitch = musicSwitch;
+	spieler.MusicVol = musicVol;
+	spieler.SpeechSwitch = speechSwitch;
+	spieler.FramesPerSecond = framesPerSecond;
+	spieler.DisplayText = displayText;
+	spieler.soundLoopMode = sndLoopMode;
+
+	spieler.PersonRoomNr[0] = 0;
+	room->load_room(&room_blk, 0, &spieler);
+	ERROR
+
+	spieler_vector[P_CHEWY].Phase = 6;
+	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
+	set_person_pos(160, 80, 0, 1);
+	fx_blende = 3;
+	spieler.PersonHide[P_CHEWY] = 0;
+	menu_item = 0;
+	cursor_wahl(0);
+	enter_room(-1);
+	auto_obj = 0;
+}
+
+bool MainMenu::loadGame() {
+	flags.SaveMenu = true;
+	savePersonAni();
+	out->setze_zeiger(screen0);
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	cursor_wahl(4);
+	cur->move(152, 92);
+	minfo.x = 152;
+	minfo.y = 92;
+	savegameFlag = true;
+	int result = file_menue();
+
+	cursor_wahl((spieler.inv_cur && spieler.AkInvent != -1 &&
+		menu_item == 1) ? 8 : 0);
+	cur_display = true;
+	restorePersonAni();
+	flags.SaveMenu = false;
+
+	if (result == 0) {
+		fx_blende = 1;
+		return true;
+	} else {
+		return false;
+	}
+}
+
+void MainMenu::playGame() {
+	// unused1 = 0;
+	inv_disp_ok = false;
+	cur_display = true;
+	tmp_menu_item = 0;
+	maus_links_click = 0;
+	kbinfo.scan_code = 0;
+
+	flags.main_maus_flag = false;
+	flags.MainInput = true;
+	flags.ShowAtsInvTxt = true;
+	cur->show_cur();
+	spieler_vector->Count = 0;
+	uhr->reset_timer(0, 0);
+	ailsnd->set_loopmode(spieler.soundLoopMode);
+
+	while (!SHOULD_QUIT && !main_loop(1)) {
+	}
+
+	auto_obj = 0;
+}
+
+void MainMenu::savePersonAni() {
+	for (int i = 0; i < MAX_PERSON; ++i) {
+		_personAni[i] = PersonAni[i];
+		PersonAni[i] = -1;
+
+		delete PersonTaf[i];
+		PersonTaf[i] = nullptr;
+	}
+}
+
+void MainMenu::restorePersonAni() {
+	for (int i = 0; i < MAX_PERSON; ++i) {
+		load_person_ani(_personAni[i], i);
+	}
+}
+
+void MainMenu::cinema() {
+	warning("TODO: cinema dialog");
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 3873999d815..174c5866329 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -39,6 +39,7 @@ enum MainMenuSelection {
 class MainMenu {
 private:
 	static int _selection;
+	static int _personAni[3];
 
 	/**
 	 * Screen rendering function for the main menu
@@ -51,7 +52,40 @@ private:
 	 */
 	static void animate();
 
+	/**
+	 * Support function for controlling the credits flic playback
+	 */
 	static int16 creditsFn(int16 key);
+
+	/**
+	 * Starts a new game
+	 */
+	static void startGame();
+
+	/**
+	 * Starts a new game
+	 */
+	static bool loadGame();
+
+	/**
+	 * Plays the game
+	 */
+	static void playGame();
+
+	/**
+	 * Cinema dialog
+	 */
+	static void cinema();
+
+	/**
+	 * Saves the personAni array
+	 */
+	static void savePersonAni();
+
+	/**
+	 * Restores the personAni array
+	 */
+	static void restorePersonAni();
 public:
 	/**
 	 * Displays the menu
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 205d90c5a4f..ad2eaf99ad1 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -475,7 +475,7 @@ struct Spieler {
 	int16 SVal2;
 	int16 SVal3;
 	int16 SVal4;
-	int16 SVal5;
+	int16 soundLoopMode;
 	bool SoundSwitch;
 	uint8 SoundVol;
 	bool MusicSwitch;


Commit: 8849afe9a6dcd9f847989c2e84af46820a5ec379
    https://github.com/scummvm/scummvm/commit/8849afe9a6dcd9f847989c2e84af46820a5ec379
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: Adding a TempFiles class for better simulating temporary files

Changed paths:
  A engines/chewy/temp_file.cpp
  A engines/chewy/temp_file.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/datei.cpp
    engines/chewy/inits.cpp
    engines/chewy/module.mk


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index a2cf1a0a0a0..15fd4907d07 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -379,28 +379,6 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 	}
 }
 
-void atdsys::open_handle(Common::SeekableReadStream *stream, int16 mode) {
-	assert(stream);
-	char *tmp_adr = (char *)malloc(stream->size());
-
-	close_handle(mode);
-	atdshandle[mode] = stream;
-	atdsmem[mode] = tmp_adr;
-
-	switch (mode) {
-	case ADH_DATEI:
-		ads_block = (AdsBlock *)atdsmem[ADH_HANDLE];
-		break;
-
-	case INV_IDX_DATEI:
-		atdsmem[INV_IDX_HANDLE] = (char *)calloc(INV_STRC_ANZ * sizeof(InvUse), 1);
-		break;
-
-	default:
-		break;
-	}
-}
-
 void atdsys::close_handle(int16 mode) {
 	if (atdshandle[mode])
 		chewy_fclose(atdshandle[mode]);
@@ -768,7 +746,6 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	char *start_str;
-	int16 ende1;
 	start_str = *str_;
 
 	bool done1 = false;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 9170f167752..7a0181c31a8 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -267,7 +267,6 @@ public:
 	void set_speech_handle(Stream *speech_handle);
 	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, const char *fmode, int16 mode);
-	void open_handle(Common::SeekableReadStream *stream, int16 mode);
 	void close_handle(int16 mode);
 	void crypt(char *txt, uint32 size);
 	void init_ats_mode(int16 mode, uint8 *atsheader);
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index f87a5ec899c..b77bbcc1661 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -67,6 +67,9 @@ void ChewyEngine::initialize() {
 	g_screen = _screen = new Graphics::Screen();
 	_events = new EventsManager(_screen);
 	_sound = new Sound(_mixer);
+
+	_tempFiles.add(ADSH_TMP);
+	SearchMan.add("temp", &_tempFiles, 99, false);
 }
 
 Common::Error ChewyEngine::run() {
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index bc487c267c1..274c4e50e2e 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -28,9 +28,11 @@
 
 #include "common/scummsys.h"
 #include "common/error.h"
+#include "common/memstream.h"
 #include "common/random.h"
 #include "engines/engine.h"
 #include "graphics/screen.h"
+#include "chewy/temp_file.h"
 
 namespace Chewy {
 
@@ -53,6 +55,7 @@ protected:
 	void shutdown();
 
 public:
+	TempFileArchive _tempFiles;
 	EventsManager *_events;
 	Sound *_sound;
 	Graphics::Screen *_screen;
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 72fcff7b889..4884247c53e 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -24,6 +24,8 @@
 #include "common/system.h"
 #include "common/savefile.h"
 #include "chewy/datei.h"
+#include "chewy/chewy.h"
+#include "chewy/defines.h"
 #include "chewy/file.h"
 
 namespace Chewy {
@@ -1902,6 +1904,18 @@ int16 datei::get_id(char *id_code) {
 }
 
 void datei::fcopy(const char *d_fname, const char *s_fname) {
+	assert(!strcmp(d_fname, ADSH_TMP));
+
+	Common::File f;
+	if (f.open(s_fname)) {
+		Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
+		ws->writeStream(&f);
+		delete ws;
+	} else {
+		error("Could not find - %s", s_fname);
+	}
+
+#if 0
 	Common::File src;
 	Common::OutSaveFile *dest;
 
@@ -1920,6 +1934,7 @@ void datei::fcopy(const char *d_fname, const char *s_fname) {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
+#endif
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 8ccae883875..0e8409fceb1 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -199,21 +199,6 @@ void init_room() {
 	ERROR
 }
 
-void initAdshTmp() {
-	// Open the source
-	Common::File f;
-	if (!f.open(ADS_TXT_STEUER))
-		::error("File not found - %s", ADS_TXT_STEUER);
-
-	// Create a memory stream for read/write access
-	Common::MemoryReadWriteStream *stream =
-		new Common::MemoryReadWriteStream(DisposeAfterUse::YES);
-	stream->writeStream(&f);
-
-	// Add it to the stream manager
-	atds->open_handle(stream, ADH_DATEI);
-}
-
 void init_atds() {
 	int16 i;
 
@@ -233,9 +218,6 @@ void init_atds() {
 	atds->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
 	ERROR
 
-	initAdshTmp();
-	ERROR
-
 	atds->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
 	ERROR
 	atds->init_ats_mode(INV_USE_DATEI, spieler.InvUse);
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 0c47e4dcde3..164bed3a9dc 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -43,6 +43,7 @@ MODULE_OBJS = \
 	sound.o \
 	sprite.o \
 	t_event.o \
+	temp_file.o \
 	text.o \
 	timer.o \
 	video/cfo_decoder.o
diff --git a/engines/chewy/temp_file.cpp b/engines/chewy/temp_file.cpp
new file mode 100644
index 00000000000..923cb6e8f2c
--- /dev/null
+++ b/engines/chewy/temp_file.cpp
@@ -0,0 +1,121 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/temp_file.h"
+
+namespace Chewy {
+
+bool TempFileArchive::FileProxy::eos() const {
+	return _src->eos();
+}
+
+uint32 TempFileArchive::FileProxy::read(void *dataPtr, uint32 dataSize) {
+	return _src->read(dataPtr, dataSize);
+}
+
+int64 TempFileArchive::FileProxy::pos() const {
+	return _src->pos();
+}
+
+int64 TempFileArchive::FileProxy::size() const {
+	return _src->size();
+}
+
+bool TempFileArchive::FileProxy::seek(int64 offset, int whence) {
+	return _src->seek(offset, whence);
+}
+
+uint32 TempFileArchive::FileProxy::write(const void *dataPtr, uint32 dataSize) {
+	return _src->write(dataPtr, dataSize);
+}
+
+bool TempFileArchive::FileProxy::flush() {
+	return _src->flush();
+}
+
+void TempFileArchive::FileProxy::finalize() {
+	_src->finalize();
+}
+
+
+TempFileArchive::TempFileArchive() {
+}
+
+const TempFileArchive::Entry *TempFileArchive::getEntry(
+		const Common::String &name) const {
+	for (EntryList::const_iterator it = _files.begin(); it != _files.end(); ++it) {
+		const Entry &e = *it;
+		if (e._name.equalsIgnoreCase(name))
+			return &e;
+	}
+
+	return nullptr;
+}
+
+bool TempFileArchive::hasFile(const Common::Path &path) const {
+	return getEntry(path.toString()) != nullptr;
+}
+
+int TempFileArchive::listMembers(Common::ArchiveMemberList &list) const {
+	int count = 0;
+	for (EntryList::const_iterator it = _files.begin(); it != _files.end(); ++it) {
+		const Entry &e = *it;
+		list.push_back(Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(e._name, this)));
+		++count;
+	}
+
+	return count;
+}
+
+const Common::ArchiveMemberPtr TempFileArchive::getMember(const Common::Path &path) const {
+	Common::String name = path.toString();
+	if (getEntry(name))
+		return Common::ArchiveMemberPtr(
+			new Common::GenericArchiveMember(name, this));
+
+	return Common::ArchiveMemberPtr();
+}
+
+Common::SeekableReadStream *TempFileArchive::createReadStreamForMember(
+		const Common::Path &path) const {
+	const Entry *entry = getEntry(path.toString());
+	if (!entry)
+		return nullptr;
+
+	Common::MemoryReadWriteStream *stream =
+		const_cast<Common::MemoryReadWriteStream *>(&entry->_stream);
+	stream->seek(0, SEEK_SET);
+	return new FileProxy(stream);
+}
+
+Common::SeekableWriteStream *TempFileArchive::createWriteStreamForMember(const Common::Path &path) {
+	const Entry *entry = getEntry(path.toString());
+	if (!entry)
+		return nullptr;
+
+	Common::MemoryReadWriteStream *stream =
+		const_cast<Common::MemoryReadWriteStream *>(&entry->_stream);
+	stream->seek(0, SEEK_SET);
+	return new FileProxy(stream);
+}
+
+}
diff --git a/engines/chewy/temp_file.h b/engines/chewy/temp_file.h
new file mode 100644
index 00000000000..62249df8f7d
--- /dev/null
+++ b/engines/chewy/temp_file.h
@@ -0,0 +1,116 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_TEMP_FILE_H
+#define CHEWY_TEMP_FILE_H
+
+#include "common/archive.h"
+#include "common/list.h"
+#include "common/memstream.h"
+#include "common/str.h"
+
+namespace Chewy {
+
+class TempFileArchive : public Common::Archive {
+	struct Entry {
+		Common::String _name;
+		Common::MemoryReadWriteStream _stream;
+		Entry() : _stream(DisposeAfterUse::YES) {}
+		Entry(const Common::String &name) : _name(name),
+			_stream(DisposeAfterUse::YES) {}
+	};
+	typedef Common::List<Entry> EntryList;
+
+	class FileProxy : public Common::SeekableReadStream,
+		public Common::SeekableWriteStream {
+	private:
+		Common::MemoryReadWriteStream *_src;
+	public:
+		FileProxy(Common::MemoryReadWriteStream *src) : _src(src) {
+		}
+
+		bool eos() const override;
+		uint32 read(void *dataPtr, uint32 dataSize) override;
+		int64 pos() const override;
+		int64 size() const override;
+		bool seek(int64 offset, int whence = SEEK_SET) override;
+
+		uint32 write(const void *dataPtr, uint32 dataSize) override;
+		bool flush() override;
+		void finalize() override;
+	};
+private:
+	EntryList _files;
+
+	/**
+	 * Finds an entry
+	 */
+	const Entry *getEntry(const Common::String &name) const;
+public:
+	/**
+	 * Constructor
+	 */
+	TempFileArchive();
+
+	/**
+	 * Registers a temporary file by name.
+	 */
+	void add(const Common::String &name) {
+		_files.push_back(Entry(name));
+	}
+
+	/**
+	 * Check if a member with the given name is present in the Archive.
+	 * Patterns are not allowed, as this is meant to be a quick File::exists()
+	 * replacement.
+	 */
+	bool hasFile(const Common::Path &path) const override;
+
+	/**
+	 * Add all members of the Archive to list.
+	 * Must only append to list, and not remove elements from it.
+	 *
+	 * @return the number of names added to list
+	 */
+	int listMembers(Common::ArchiveMemberList &list) const override;
+
+	/**
+	 * Returns a ArchiveMember representation of the given file.
+	 */
+	const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override;
+
+	/**
+	 * Create a stream bound to a member with the specified name in the
+	 * archive. If no member with this name exists, 0 is returned.
+	 * @return the newly created input stream
+	 */
+	Common::SeekableReadStream *createReadStreamForMember(const Common::Path &path) const override;
+
+	/**
+	 * Creates a write stream
+	 */
+	Common::SeekableWriteStream *createWriteStreamForMember(const Common::Path &path);
+};
+
+} // End of namespace Chewy
+
+#endif


Commit: 03ec59bbc6065527e8e49586b9d6007c6cbd084e
    https://github.com/scummvm/scummvm/commit/03ec59bbc6065527e8e49586b9d6007c6cbd084e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
COMMON: Implement MemoryReadWriteStream::seek

Changed paths:
    common/memstream.h


diff --git a/common/memstream.h b/common/memstream.h
index 75d3bdd8722..17bbc30dd8e 100644
--- a/common/memstream.h
+++ b/common/memstream.h
@@ -342,9 +342,31 @@ public:
 		return dataSize;
 	}
 
+	bool seek(int64 offset, int whence) override {
+		switch (whence) {
+		case SEEK_END:
+			// SEEK_END works just like SEEK_SET, only 'reversed',
+			// i.e. from the end.
+			offset = size() + offset;
+			// Fall through
+		case SEEK_SET:
+			// Fall through
+		default:
+			_writePos = offset;
+			_readPos = offset;
+			break;
+		case SEEK_CUR:
+			// Not supported
+			return false;
+		}
+
+		// Post-Condition
+		_eos = (int64)_readPos >= size();
+		return true;
+	}
+
 	int64 pos() const override { return _pos - _length; }
 	int64 size() const override { return _size; }
-	bool seek(int64, int) override { return false; }
 	bool eos() const override { return _eos; }
 	void clearErr() override { _eos = false; }
 


Commit: 0606370aa4e95bebad110d7388131acd99d4dcb9
    https://github.com/scummvm/scummvm/commit/0606370aa4e95bebad110d7388131acd99d4dcb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: Fix incorrect atdsys stream closing

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 15fd4907d07..12057aa3eee 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -81,7 +81,7 @@ atdsys::~atdsys() {
 	int16 i;
 	for (i = 0; i < MAX_HANDLE; i++) {
 		if (atdshandle[i])
-			warning("FIXME : close handler");
+			chewy_fclose(atdshandle[i]);
 
 		free(atdsmem[i]);
 	}
@@ -290,7 +290,6 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	Stream *handle;
 	handle = chewy_fopen(fname_, fmode);
 	if (handle) {
-		close_handle(ATDS_HANDLE);
 		atdshandle[ATDS_HANDLE] = handle;
 	} else {
 		modul = DATEI;
@@ -311,7 +310,6 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 	tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
 	if (!modul) {
 		if (rs) {
-			close_handle(mode);
 			atdshandle[mode] = rs;
 			atdsmem[mode] = tmp_adr;
 			atdspooloff[mode] = chunk_start;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 2b469a58c6c..c218169c093 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -184,7 +184,7 @@ int16 MainMenu::creditsFn(int16 key) {
 
 void MainMenu::startGame() {
 	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
-	atds->open_handle(ADSH_TMP, "rb+", 3);
+	atds->open_handle(ADSH_TMP, "rb", 3);
 	ERROR
 
 	hide_cur();


Commit: c4a7b806dead8e68dbe1df0f34f2f16fadf4a2ad
    https://github.com/scummvm/scummvm/commit/c4a7b806dead8e68dbe1df0f34f2f16fadf4a2ad
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:03-08:00

Commit Message:
CHEWY: Add missing code to new_game

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/inits.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index ca4afcb64c8..4612e8fb22a 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -56,8 +56,10 @@ void load_chewy_taf(int16 taf_nr) {
 	taf_dateiheader *tafheader;
 	const char *fname_;
 	if (AkChewyTaf != taf_nr) {
-		if (chewy)
+		if (chewy) {
 			free((char *)chewy);
+			chewy = nullptr;
+		}
 		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
 		switch (taf_nr) {
 		case CHEWY_NORMAL:
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 0e8409fceb1..1afd10157c4 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -301,6 +301,9 @@ void new_game() {
 	obj->sort();
 	for (i = 0; i < obj->spieler_invnr[0]; i++)
 		spieler.InventSlot[i] = obj->spieler_invnr[i + 1];
+
+	AkChewyTaf = 0;
+	load_chewy_taf(1);
 }
 
 static void font_load() {


Commit: 41a4c720e4ad45e25357a759d5bfffd7ef1f1d70
    https://github.com/scummvm/scummvm/commit/41a4c720e4ad45e25357a759d5bfffd7ef1f1d70
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Shutdown fixes, cutscene breaks on should quit

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/main.cpp
    engines/chewy/maus.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 12057aa3eee..6e77badedb1 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -79,12 +79,9 @@ atdsys::atdsys() {
 
 atdsys::~atdsys() {
 	int16 i;
-	for (i = 0; i < MAX_HANDLE; i++) {
-		if (atdshandle[i])
-			chewy_fclose(atdshandle[i]);
+	for (i = 0; i < MAX_HANDLE; i++)
+		close_handle(i);
 
-		free(atdsmem[i]);
-	}
 	if (inv_use_mem)
 		free(inv_use_mem);
 }
@@ -378,12 +375,19 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 }
 
 void atdsys::close_handle(int16 mode) {
-	if (atdshandle[mode])
+	Stream *stream = atdshandle[mode];
+	if (stream) {
 		chewy_fclose(atdshandle[mode]);
-	atdshandle[mode] = 0;
+
+		for (int i = 0; i < MAX_HANDLE; ++i) {
+			if (atdshandle[i] == stream)
+				atdshandle[i] = nullptr;
+		}
+	}
+
 	if (atdsmem[mode])
 		free(atdsmem[mode]);
-	atdsmem[mode] = 0;
+	atdsmem[mode] = nullptr;
 }
 
 char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 7a0181c31a8..4428f4a05e0 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -247,7 +247,6 @@ struct SplitStringInit {
 };
 
 class atdsys {
-
 public:
 	atdsys();
 	~atdsys();
@@ -312,7 +311,6 @@ public:
 	int16 get_stereo_pos(int16 x);
 
 private:
-
 	int16 get_delay(int16 txt_len);
 
 	Stream *atdshandle[MAX_HANDLE];
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index d04951709ec..691c98a633a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1267,6 +1267,8 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			spieler_vector[p_nr].DelayCount = 0;
 			if (mov->auto_go_status()) {
 				while (mov->auto_go_status()) {
+					if (SHOULD_QUIT)
+						return 0;
 					if (in->get_switch_code() == ESC) {
 						if (flags.ExitMov || flags.BreakAMov) {
 							key = ESC;
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index a19a5eaa621..5107c34bb8a 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -133,7 +133,7 @@ int16 maus::get_switch_code() {
 	int16 switch_code;
 	switch_code = 0;
 
-	if (maus_info_blk != false) {
+	if (maus_info_blk) {
 		if (maus_info_blk->button == 2) {
 			switch_code = 1;
 		} else if (maus_info_blk->button == 1)
@@ -142,7 +142,7 @@ int16 maus::get_switch_code() {
 			switch_code = 254;
 	}
 
-	if (kb_info_blk != false)
+	if (kb_info_blk)
 		if (kb_info_blk->key_code != 0)
 			switch_code = (int16)kb_info_blk->key_code;
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index b50997c094d..e141835a10c 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -411,7 +411,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	talk_hide_static = -1;
 	set_ssi_xy();
 	atds->start_aad(dia_nr);
-	while (atds->aad_get_status() != -1) {
+	while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
 	maus_links_click = tmp_maus_links;


Commit: 63f0f346e3dec2b343c0817c2298c3e7bd749e8b
    https://github.com/scummvm/scummvm/commit/63f0f346e3dec2b343c0817c2298c3e7bd749e8b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/datei.cpp
    engines/chewy/detail.cpp
    engines/chewy/episode1.cpp
    engines/chewy/episode4.cpp
    engines/chewy/fehler.cpp
    engines/chewy/io_game.cpp
    engines/chewy/mcga_grafik.cpp
    engines/chewy/menus.cpp
    engines/chewy/timer.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 6e77badedb1..51da49cbe26 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -86,12 +86,6 @@ atdsys::~atdsys() {
 		free(inv_use_mem);
 }
 
-char atds_id[4][4] = { "ATS",
-                       "AAD",
-                       "ADS",
-                       "ADH",
-                     };
-
 void atdsys::set_font(byte *font_adr, int16 fvorx_, int16 fhoehe) {
 	atdsv.Font = font_adr;
 	atdsv.Fvorx = fvorx_;
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 4884247c53e..6363b173123 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -93,9 +93,7 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 								speicher[index] = zeichen;
 								++index;
 							}
-
-						}
-						else {
+						} else {
 							speicher[index] = zeichen;
 							index++;
 						}
@@ -118,25 +116,21 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 								j += 3;
 							}
 						}
-					}
-					else {
+					} else {
 						fcode = PALETTEFEHLER;
 						modul = DATEI;
 					}
 				}
-			}
-			else {
+			} else {
 				fcode = NOTPCX;
 				modul = DATEI;
 			}
-		}
-		else {
+		} else {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -184,24 +178,20 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 						               header->entpsize, speicher);
 						break;
 					}
-				}
-				else {
+				} else {
 					fcode = NOTTBF;
 					modul = DATEI;
 				}
-			}
-			else {
+			} else {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
 			chewy_fclose(handle);
-		}
-		else {
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}
@@ -559,8 +549,7 @@ void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size,
 				}
 			}
 		}
-	}
-	else {
+	} else {
 		for (plane = 0; plane < 4; plane++) {
 			for (pos = (uint32) plane; pos < size + plane;) {
 				zeichen = chewy_fgetc(handle);
@@ -598,21 +587,18 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 		if (!(chewy_fread(dial, sizeof(dialogue), 1, handle))) {
 			fcode = READFEHLER;
 			modul = DATEI;
-		}
-		else {
+		} else {
 			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
 				if (!(chewy_fread(lmen, sizeof(menue), 1, handle))) {
 					fcode = READFEHLER;
 					modul = DATEI;
-				}
-				else {
+				} else {
 					dial->menueliste[i] = lmen;
 					for (j = 0; (j < lmen->anzknoepfe) && (!modul); j++) {
 						if (!(chewy_fread(lknpf, sizeof(knopf), 1, handle))) {
 							fcode = READFEHLER;
 							modul = DATEI;
-						}
-						else {
+						} else {
 							lmen->knopfliste[j] = lknpf;
 							lknpf++;
 						}
@@ -622,8 +608,7 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 			}
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -653,8 +638,7 @@ void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 			fcode = READFEHLER;
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -698,8 +682,7 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 				if (strncmp(header->id, "Creative Voice File", 19)) {
 					modul = DATEI;
 					fcode = NOTVOC;
-				}
-				else {
+				} else {
 					chewy_fseek(handle, header->offset, SEEK_SET);
 					if (!(chewy_fread(sp, s, 1, handle))) {
 						modul = DATEI;
@@ -708,8 +691,7 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 				}
 			}
 			chewy_fclose(handle);
-		}
-		else {
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
@@ -731,8 +713,7 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
-			}
-			else {
+			} else {
 				modul = DATEI;
 				fcode = NOTVOC;
 			}
@@ -765,8 +746,7 @@ void datei::load_vocinfo(const char *fname, voc_header *speicher) {
 			fcode = READFEHLER;
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -827,8 +807,7 @@ uint32 datei::load_item(Stream *handle, byte *speicher) {
 		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
 			modul = DATEI;
 			fcode = READFEHLER;
-		}
-		else {
+		} else {
 			if (!(chewy_fread(speicher, ch->size, 1, handle))) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -1002,8 +981,7 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 							chewy_fputc(prev_data, handle);
 							data_count = 0;
 						}
-					}
-					else {
+					} else {
 						if (data_count > 0) {
 							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
 								chewy_fputc(0xc0 | data_count, handle);
@@ -1022,14 +1000,12 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 			chewy_fputc(12, handle);
 			for (i = 0; i < 768; i++)
 				chewy_fputc(palette[i] << 2, handle);
-		}
-		else {
+		} else {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -1113,8 +1089,7 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 			modul = DATEI;
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
@@ -1152,13 +1127,11 @@ void datei::save_tff(const char *fname, byte *speicher) {
 				modul = DATEI;
 			}
 			chewy_fclose(handle);
-		}
-		else {
+		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
 		}
-	}
-	else {
+	} else {
 		fcode = ZEIGERFEHLER;
 		modul = GRAFIK;
 	}
@@ -1218,15 +1191,13 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 		if (!(chewy_fwrite(dial, sizeof(dialogue), 1, handle))) {
 			fcode = WRITEFEHLER;
 			modul = DATEI;
-		}
-		else {
+		} else {
 			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
 				men = dial->menueliste[i];
 				if (!(chewy_fwrite(men, sizeof(menue), 1, handle))) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
-				}
-				else {
+				} else {
 					for (j = 0; (j < men->anzknoepfe) && (!modul); j++) {
 						knpf = men->knopfliste[j];
 						if (knpf != 0) {
@@ -1321,16 +1292,14 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 		if (!(chewy_fread(&dial, sizeof(dialogue), 1, handle))) {
 			fcode = READFEHLER;
 			modul = DATEI;
-		}
-		else {
+		} else {
 			if ((!(strncmp(dial.id, "TDF", 3)))) {
 				*menueanz = dial.anzmenue;
 				for (i = 0; (i < dial.anzmenue) && (!modul); i++) {
 					if (!(chewy_fread(&men, sizeof(menue), 1, handle))) {
 						fcode = READFEHLER;
 						modul = DATEI;
-					}
-					else {
+					} else {
 						*knopfanz += men.anzknoepfe;
 						chewy_fseek(handle, (long)(men.anzknoepfe * sizeof(knopf)), SEEK_CUR);
 					}
@@ -1338,8 +1307,7 @@ void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
 			}
 		}
 		chewy_fclose(handle);
-	}
-	else {
+	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 8449169b789..fd098d3e502 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -260,7 +260,6 @@ void detail::load_taf_tbl(taf_info *fti) {
 					        rdi.Ainfo[i].end_ani != -1 && !rdi.Ainfo[i].load_flag)
 						load_taf_seq(CurrentTaf, rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
 				}
-
 			} else {
 				modul = DATEI;
 				fcode = OPENFEHLER;
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 4612e8fb22a..1d676a58fa8 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -406,8 +406,7 @@ void r0_fuetter_start(int16 mode) {
 		det->disable_sound(KLAPPE_DETAIL, 1);
 		det->enable_sound(FUETTER_SCHLAUCH, 0);
 		det->disable_sound(FUETTER_SCHLAUCH, 2);
-	}
-	else {
+	} else {
 
 		det->disable_sound(KLAPPE_DETAIL, 0);
 		det->enable_sound(KLAPPE_DETAIL, 1);
@@ -1774,8 +1773,7 @@ void r12_entry() {
 		obj->calc_all_static_detail();
 		auto_move(5, P_CHEWY);
 		start_aad_wait(109, -1);
-	}
-	else {
+	} else {
 		if (spieler.R12Talisman == true && !spieler.R12BorkInRohr)
 			timer_nr[0] = room->set_timer(255, 20);
 		else if (spieler.R12BorkInRohr && !spieler.R12RaumOk)
@@ -1924,8 +1922,7 @@ int16 r12_use_terminal() {
 				atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
 				atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
 				start_aad(111, 0);
-			}
-			else {
+			} else {
 				spieler.R12TransOn = true;
 				uhr->reset_timer(timer_nr[1], 0);
 			}
@@ -2080,8 +2077,7 @@ void r13_jmp_band() {
 			start_detail_wait(8, 1, ANI_VOR);
 			spieler.PersonHide[P_CHEWY] = false;
 			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
-		}
-		else {
+		} else {
 			spieler.R13Surf = true;
 			maus_links_click = false;
 			auto_move(12, P_CHEWY);
@@ -2209,8 +2205,7 @@ int16 r14_use_gleiter() {
 			spieler.PersonHide[P_CHEWY] = false;
 			det->show_static_spr(6);
 			atds->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
-		}
-		else {
+		} else {
 			spieler.R23GleiterExit = 14;
 			r23_cockpit();
 		}
@@ -2491,8 +2486,7 @@ void r17_door_kommando(int16 mode) {
 				stop_person(P_CHEWY);
 				det->show_static_spr(7);
 			}
-		}
-		else {
+		} else {
 			r17_close_door();
 		}
 		flags.AutoAniPlay = false;
@@ -3382,8 +3376,7 @@ void r24_use_hebel(int16 txt_nr) {
 	        spieler.R24Hebel[txt_nr - 161] == 2) {
 		spieler.R24Hebel[txt_nr - 161] = 1;
 		spieler.R24HebelDir[txt_nr - 161] ^= 1;
-	}
-	else {
+	} else {
 		if (spieler.R24HebelDir[txt_nr - 161])
 			spieler.R24Hebel[txt_nr - 161] = 0;
 		else
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 2e07e5a1d5c..ce83c257ca1 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -394,8 +394,7 @@ void r68_calc_diva() {
 				det->start_detail(r68HohesC, 1, ANI_RUECK);
 				det->start_detail(18, 255, ANI_VOR);
 			}
-		}
-		else {
+		} else {
 			if (!spieler.R68Gutschein) {
 
 				if (!is_chewy_busy()) {
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
index ee9183bdc7f..ca6195c89a4 100644
--- a/engines/chewy/fehler.cpp
+++ b/engines/chewy/fehler.cpp
@@ -71,8 +71,7 @@ void fehler::msg() {
 			ok = false;
 			break;
 		}
-	}
-	else {
+	} else {
 		switch (modul) {
 		case 1:
 			warning("GRAPHICS ERROR:");
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 548bd07d5de..8b4b6f654e5 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -197,8 +197,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 							}
 						}
 					}
-				}
-				else {
+				} else {
 					if (j > 2) {
 						y -= io->popy + 8;
 						y /= 15;
@@ -631,9 +630,7 @@ void io_game::save(int16 y, int16 nr, char *fname) {
 	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.\0", nr + 1);
 	if (file_find_g[nr][0] == 0) {
 		abfrage = out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[nr][1]);
-	}
-
-	else {
+	} else {
 		handle = chewy_fopen(path, "rb");
 		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
 		chewy_fclose(handle);
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 042937e683a..ecb98c3e10b 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -811,8 +811,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 							if (stellemax < disp_stellemax) {
 								disp_stelle = 0;
 								disp_akt = stellemax;
-							}
-							else {
+							} else {
 								disp_akt = disp_stellemax;
 								disp_stelle = stelle - disp_stellemax;
 							}
@@ -874,8 +873,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 							} else {
 								++stelle;
 							}
-						}
-						else {
+						} else {
 							strcpy(z1string, zstring);
 							strcpy(zstring + stelle + 1, z1string + stelle);
 							zstring[stelle] = izahl;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 7c38fe9c904..2eeb99509a9 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -313,8 +313,7 @@ void invent_menu() {
 									del_invent_slot(spieler.InventSlot[k]);
 								}
 							}
-						}
-						else {
+						} else {
 							if (spieler.InventSlot[k] != -1)
 								obj_auswerten(spieler.InventSlot[k], INVENTAR_NORMAL);
 							else {
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index f79d585cfbe..2e6bff38fc7 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -132,8 +132,7 @@ void timer::set_all_status(int16 status) {
 			if (timer_blk[i].TimeStatus != TIMER_STOP)
 				timer_blk[i].TimeStatus = TIMER_START;
 		}
-	}
-	else {
+	} else {
 		for (i = 0; i < timer_max; i++)
 			timer_blk[i].TimeStatus = status;
 	}


Commit: 2ce77320d576688505a9a2f1d9f447345ffea78a
    https://github.com/scummvm/scummvm/commit/2ce77320d576688505a9a2f1d9f447345ffea78a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Setting up keyboard event handler

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/maus.cpp
    engines/chewy/maus.h


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 9d04aa8f9e2..e26921c24c8 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -90,7 +90,14 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 }
 
 void EventsManager::handleKbdEvent(const Common::Event &event) {
-	// TODO
+	if (_kbInfo) {
+		if (event.type == Common::EVENT_KEYDOWN) {
+			_kbInfo->key_code = event.kbd.ascii;
+			_kbInfo->scan_code = event.kbd.keycode;
+		} else {
+			_kbInfo->key_code = 0;
+		}
+	}
 }
 
 void EventsManager::delay(size_t time) {
@@ -103,4 +110,13 @@ void EventsManager::delay(size_t time) {
 	} while (currTime >= expiryTime);
 }
 
+void EventsManager::clearEvents() {
+	if (_kbInfo) {
+		_kbInfo->scan_code = 0;
+		_kbInfo->key_code = 0;
+	}
+
+	minfo.button = 0;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index bde3be2d86f..4197122e784 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -27,8 +27,12 @@
 
 namespace Chewy {
 
+struct kb_info;
+
 class EventsManager : public EventsBase {
 private:
+	kb_info *_kbInfo = nullptr;
+
 	void init_timer_handler();
 	static void timer_handler();
 
@@ -45,6 +49,12 @@ public:
 	virtual ~EventsManager();
 
 	void delay(size_t time);
+
+	void clearEvents();
+
+	void setKbdInfo(kb_info *kb_info) {
+		_kbInfo = kb_info;
+	}
 };
 
 extern EventsManager *g_events;
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 5107c34bb8a..00306c3e498 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -27,7 +27,6 @@
 namespace Chewy {
 
 // FIXME. Externals
-uint8 mouse_show;
 uint8 mouse_links_los;
 uint8 mouse_aktiv;
 
@@ -46,15 +45,15 @@ uint8 mouse_hot_y;
 
 
 void set_new_kb_handler(kb_info *key) {
-	warning("STUB: set_new_kb_handler()");
+	g_events->setKbdInfo(key);
 }
 
 void set_old_kb_handler() {
-	warning("STUB: set_old_kb_handler()");
+	g_events->setKbdInfo(nullptr);
 }
 
 void del_kb_puffer() {
-	warning("STUB: del_kb_puffer()");
+	g_events->clearEvents();
 }
 
 void set_mouse_handler(maus_info *mpos) {
@@ -106,7 +105,7 @@ void maus::neuer_kb_handler(kb_info *key) {
 
 void maus::alter_kb_handler() {
 	set_old_kb_handler();
-	kb_info_blk = false;
+	kb_info_blk = nullptr;
 	warning("STUB - maus::alter_kb_handler");
 #if 0
 	while (kbhit())
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index 070cee0f011..6fdf46fd443 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -36,7 +36,6 @@ void set_mouse_handler(maus_info *mpos);
 extern uint8 new_kb;
 
 extern uint8 mouse_on;
-extern uint8 mouse_show;
 extern int16 mouse_button;
 extern uint8 mouse_links;
 extern uint8 mouse_links_los;


Commit: 17a736e8485065e8087d6a4d343d82b9a70478d4
    https://github.com/scummvm/scummvm/commit/17a736e8485065e8087d6a4d343d82b9a70478d4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Setting up scancodes to use Common::KeyCode

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/debug.cpp
    engines/chewy/episode2.cpp
    engines/chewy/events.cpp
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/maus.cpp
    engines/chewy/menus.cpp
    engines/chewy/ngsdefs.h
    engines/chewy/ngstypes.h
    engines/chewy/r_event.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 51da49cbe26..585fb771ad5 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -563,8 +563,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 				if (atsv.SilentCount <= 0) {
 					mouse_push = true;
 					atsv.DelayCount = 0;
-					inzeig->kbinfo->scan_code = 0;
-					inzeig->kbinfo->key_code = 0;
+					inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+					inzeig->kbinfo->key_code = '\0';
 				}
 			}
 			break;
@@ -911,8 +911,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 				if (aadv.SilentCount <= 0) {
 					mouse_push = true;
 					aadv.DelayCount = 0;
-					inzeig->kbinfo->scan_code = 0;
-					inzeig->kbinfo->key_code = 0;
+					inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+					inzeig->kbinfo->key_code = '\0';
 				}
 			}
 			break;
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
index 4804e1a6ebb..0d35eda932b 100644
--- a/engines/chewy/debug.cpp
+++ b/engines/chewy/debug.cpp
@@ -174,7 +174,7 @@ void test_load(void *handle, taf_info *Tt, int16 anz) {
 
 					}
 					if (action) {
-						kbinfo.scan_code = 0;
+						kbinfo.scan_code = Common::KEYCODE_INVALID;
 						action = 0;
 						out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 						if (Tt->image[spr] != 0) {
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 075c202a575..f6ca4dfd067 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -578,7 +578,7 @@ void r29_schlitz_sitz() {
 		det->stop_detail(2);
 		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		spieler.PersonHide[P_CHEWY] = false;
-		kbinfo.scan_code = 0;
+		kbinfo.scan_code = Common::KEYCODE_INVALID;
 	}
 }
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index e26921c24c8..1c2dc315ce8 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -94,8 +94,10 @@ void EventsManager::handleKbdEvent(const Common::Event &event) {
 		if (event.type == Common::EVENT_KEYDOWN) {
 			_kbInfo->key_code = event.kbd.ascii;
 			_kbInfo->scan_code = event.kbd.keycode;
+			if (event.kbd.flags & Common::KBD_ALT)
+				_kbInfo->scan_code |= ALT;
 		} else {
-			_kbInfo->key_code = 0;
+			_kbInfo->key_code = '\0';
 		}
 	}
 }
@@ -112,8 +114,8 @@ void EventsManager::delay(size_t time) {
 
 void EventsManager::clearEvents() {
 	if (_kbInfo) {
-		_kbInfo->scan_code = 0;
-		_kbInfo->key_code = 0;
+		_kbInfo->scan_code = Common::KEYCODE_INVALID;
+		_kbInfo->key_code = '\0';
 	}
 
 	minfo.button = 0;
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 8b4b6f654e5..ab50095d449 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -113,8 +113,8 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	cur->show_cur();
 	switch_code = 1;
 	cur->wait_taste_los(true);
-	kbinfo->key_code = 0;
-	kbinfo->scan_code = 0;
+	kbinfo->key_code = '\0';
+	kbinfo->scan_code = Common::KEYCODE_INVALID;
 	switch ((int16)io->key_nr) {
 	case 0:
 		cur->hide_cur();
@@ -151,7 +151,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	while (ende == 0) {
 		if (mouse_f != 0) {
 			mouse_f = 0;
-			kbinfo->key_code = 0;
+			kbinfo->key_code = '\0';
 		}
 		cur->plot_cur();
 
@@ -341,8 +341,8 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING6);
 				cur->show_cur();
 				ende = 0;
-				kbinfo->key_code = 0;
-				kbinfo->scan_code = 0;
+				kbinfo->key_code = '\0';
+				kbinfo->scan_code = Common::KEYCODE_INVALID;
 				while (!ende) {
 					cur->plot_cur();
 					switch_code = in->get_switch_code();
@@ -400,7 +400,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 			} else
 				in->hot_key = auswahl + 58;
 			g_events->delay(200);
-			kbinfo->key_code = 0;
+			kbinfo->key_code = '\0';
 			break;
 
 		case 1:
@@ -411,7 +411,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				unmark_eintrag(cur_y, i);
 				cur->show_cur();
 				cur->wait_taste_los(true);
-				kbinfo->key_code = 0;
+				kbinfo->key_code = '\0';
 			} else {
 				ende = 1;
 				ret = IOG_BACK;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 691c98a633a..bda19f59d4a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -302,7 +302,7 @@ void test_menu() {
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	spieler_vector[P_CHEWY].Count = 0;
 	ende = false;
-	kbinfo.scan_code = false;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	flags.main_maus_flag = false;
 	tmp_menu_item = false;
 	maus_links_click = false;
@@ -393,7 +393,7 @@ int16 main_loop(int16 mode) {
 				get_display_xy(&spieler.DispZx, &spieler.DispZy, spieler.AkInvent);
 			}
 
-			kbinfo.key_code = 0;
+			kbinfo.key_code = '\0';
 			break;
 
 		case F6_KEY:
@@ -538,7 +538,7 @@ int16 main_loop(int16 mode) {
 			minfo.y = maus_old_y;
 		}
 	}
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	if (mode == DO_SETUP)
 		set_up_screen(DO_SETUP);
 #ifdef DEMO
@@ -910,7 +910,7 @@ void maus_action() {
 							} else {
 								menu_item = CUR_USE;
 								cursor_wahl(CUR_AK_INVENT);
-								kbinfo.scan_code = 0;
+								kbinfo.scan_code = Common::KEYCODE_INVALID;
 							}
 						} else if (!flags.MausLinks)
 							maus_links_click = true;
@@ -1709,7 +1709,7 @@ void get_user_key(int16 mode) {
 				get_display_xy(&spieler.DispZx, &spieler.DispZy, spieler.AkInvent);
 			}
 
-			kbinfo.key_code = 0;
+			kbinfo.key_code = '\0';
 			break;
 
 		}
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index c218169c093..9eda977750a 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -259,7 +259,7 @@ void MainMenu::playGame() {
 	cur_display = true;
 	tmp_menu_item = 0;
 	maus_links_click = 0;
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 
 	flags.main_maus_flag = false;
 	flags.MainInput = true;
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 00306c3e498..9ccf4997575 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -100,7 +100,7 @@ int16 maus::maus_vector(int16 x, int16 y, int16 *tbl,
 void maus::neuer_kb_handler(kb_info *key) {
 	set_new_kb_handler(key);
 	kb_info_blk = key;
-	kb_info_blk->key_code = 0;
+	kb_info_blk->key_code = '\0';
 }
 
 void maus::alter_kb_handler() {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 2eeb99509a9..058b9dd8bc5 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -241,7 +241,7 @@ void invent_menu() {
 	}
 	menu_flag1 = MENU_EINBLENDEN;
 	taste_flag = 28;
-	kbinfo.key_code = 0;
+	kbinfo.key_code = '\0';
 	maus_flag = 1;
 	for (i = 0; i < 3; i++) {
 		ani_invent_delay[i][0] = 30000;
@@ -257,7 +257,7 @@ void invent_menu() {
 		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 			if (!maus_flag) {
 				maus_flag = 1;
-				kbinfo.key_code = 0;
+				kbinfo.key_code = '\0';
 				k = in->maus_vector(minfo.x, minfo.y, (int16 *)hot_inventar, HOT_INVENT_ANZ);
 				if (in->hot_key == F1_KEY)
 					k = 0;
@@ -423,13 +423,13 @@ void invent_menu() {
 			case PAGE_UP:
 				if (spieler.InventY > 0)
 					--spieler.InventY;
-				kbinfo.key_code = 0;
+				kbinfo.key_code = '\0';
 				break;
 
 			case PAGE_DOWN:
 				if (spieler.InventY < (MAX_MOV_OBJ / 5) - 3)
 					++spieler.InventY;
-				kbinfo.key_code = 0;
+				kbinfo.key_code = '\0';
 				break;
 
 			}
@@ -582,7 +582,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 			break;
 
 		}
-		kbinfo.scan_code = 0;
+		kbinfo.scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		plot_inventar_menu();
 		out->set_fontadr(font8x8);
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index d7c32e6db84..5d394120244 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -23,6 +23,8 @@
 #ifndef CHEWY_NGSDEFS_H
 #define CHEWY_NGSDEFS_H
 
+#include "common/events.h"
+
 namespace Chewy {
 
 #define MAXSPRITE 350
@@ -168,80 +170,71 @@ namespace Chewy {
 #define HOCH 3
 #define RUNTER 4
 
-#define CURSOR_LEFT 75
-#define CURSOR_RIGHT 77
-#define CURSOR_UP 72
-#define CURSOR_DOWN 80
-#define PAGE_UP 73
-#define PAGE_DOWN 81
-#define POS1_KEY 71
-#define ENDE_KEY 79
-#define EINFG_KEY 82
-#define ENTF_KEY 83
-#define BS_KEY 14
-#define PAUSE_KEY 69
-#define PLUS 78
-#define MINUS 74
-#define ALT 100
-#define STRG 29
-#define TAB 15
-#define CAPS_LOCK 58
-#define NUM_LOCK 69
-#define SCROLL_LOCK 70
-#define PRINT_SCREEN 55
-#define SHIFT_LEFT 42
-#define SHIFT_RIGHT 54
-#define ESC 1
-#define ENTER 28
-#define SPACE 57
-#define A_KEY 30
-#define B_KEY 48
-#define C_KEY 46
-#define D_KEY 32
-#define E_KEY 18
-#define F_KEY 33
-#define G_KEY 34
-#define H_KEY 35
-#define I_KEY 23
-#define J_KEY 36
-#define K_KEY 37
-#define L_KEY 38
-#define M_KEY 50
-#define N_KEY 49
-#define O_KEY 24
-#define P_KEY 25
-#define Q_KEY 16
-#define R_KEY 19
-#define S_KEY 31
-#define T_KEY 20
-#define U_KEY 22
-#define V_KEY 47
-#define W_KEY 17
-#define X_KEY 45
-#define Y_KEY 44
-#define Z_KEY 21
-#define F1_KEY 59
-#define F2_KEY 60
-#define F3_KEY 61
-#define F4_KEY 62
-#define F5_KEY 63
-#define F6_KEY 64
-#define F7_KEY 65
-#define F8_KEY 66
-#define F9_KEY 67
-#define F10_KEY 68
-#define F11_KEY 87
-#define F12_KEY 88
-#define KEY_1 2
-#define KEY_2 3
-#define KEY_3 4
-#define KEY_4 5
-#define KEY_5 6
-#define KEY_6 7
-#define KEY_7 8
-#define KEY_8 9
-#define KEY_9 10
-#define KEY_0 11
+#define ALT 0x1000
+#define SHIFT_LEFT Common::KEYCODE_LSHIFT
+#define SHIFT_RIGHT Common::KEYCODE_RSHIFT
+#define CURSOR_LEFT Common::KEYCODE_LEFT
+#define CURSOR_RIGHT Common::KEYCODE_RIGHT
+#define CURSOR_UP Common::KEYCODE_UP
+#define CURSOR_DOWN Common::KEYCODE_DOWN
+#define PAGE_UP Common::KEYCODE_PAGEUP
+#define PAGE_DOWN Common::KEYCODE_PAGEDOWN
+#define BS_KEY Common::KEYCODE_BACKSPACE
+#define PAUSE_KEY Common::KEYCODE_PAUSE
+#define PLUS Common::KEYCODE_PLUS
+#define MINUS Common::KEYCODE_MINUS
+#define TAB Common::KEYCODE_TAB
+#define ESC Common::KEYCODE_ESCAPE
+#define ENTER Common::KEYCODE_RETURN
+#define SPACE Common::KEYCODE_SPACE
+#define A_KEY Common::KEYCODE_a
+#define B_KEY Common::KEYCODE_b
+#define C_KEY Common::KEYCODE_c
+#define D_KEY Common::KEYCODE_d
+#define E_KEY Common::KEYCODE_e
+#define F_KEY Common::KEYCODE_f
+#define G_KEY Common::KEYCODE_g
+#define H_KEY Common::KEYCODE_h
+#define I_KEY Common::KEYCODE_i
+#define J_KEY Common::KEYCODE_j
+#define K_KEY Common::KEYCODE_k
+#define L_KEY Common::KEYCODE_l
+#define M_KEY Common::KEYCODE_m
+#define N_KEY Common::KEYCODE_n
+#define O_KEY Common::KEYCODE_o
+#define P_KEY Common::KEYCODE_p
+#define Q_KEY Common::KEYCODE_q
+#define R_KEY Common::KEYCODE_r
+#define S_KEY Common::KEYCODE_s
+#define T_KEY Common::KEYCODE_t
+#define U_KEY Common::KEYCODE_u
+#define V_KEY Common::KEYCODE_v
+#define W_KEY Common::KEYCODE_w
+#define X_KEY Common::KEYCODE_x
+#define Y_KEY Common::KEYCODE_y
+#define Z_KEY Common::KEYCODE_z
+#define F1_KEY Common::KEYCODE_F1
+#define F2_KEY Common::KEYCODE_F2
+#define F3_KEY Common::KEYCODE_F3
+#define F4_KEY Common::KEYCODE_F4
+#define F5_KEY Common::KEYCODE_F5
+#define F6_KEY Common::KEYCODE_F6
+#define F7_KEY Common::KEYCODE_F7
+#define F8_KEY Common::KEYCODE_F8
+#define F9_KEY Common::KEYCODE_F9
+#define F10_KEY Common::KEYCODE_F10
+#define F11_KEY Common::KEYCODE_F11
+#define F12_KEY Common::KEYCODE_F12
+#define KEY_1 Common::KEYCODE_1
+#define KEY_2 Common::KEYCODE_2
+#define KEY_3 Common::KEYCODE_3
+#define KEY_4 Common::KEYCODE_4
+#define KEY_5 Common::KEYCODE_5
+#define KEY_6 Common::KEYCODE_6
+#define KEY_7 Common::KEYCODE_7
+#define KEY_8 Common::KEYCODE_8
+#define KEY_9 Common::KEYCODE_9
+#define KEY_0 Common::KEYCODE_0
 
 #define MAUS_LINKS 255
 #define MAUS_RECHTS 1
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 53aee1dc08f..9dc223acba2 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -209,7 +209,7 @@ struct maus_info {
 
 struct kb_info {
 	char key_code = '\0';
-	byte scan_code = 0;
+	int scan_code = Common::KEYCODE_INVALID;
 };
 
 struct in_zeiger {
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 14efa5d2ecd..3f9fea4d65a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -106,7 +106,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 	}
 
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 
 void timer_action(int16 t_nr) {
@@ -249,7 +249,7 @@ void timer_action(int16 t_nr) {
 		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, 0);
 		uhr->reset_timer(t_nr, 0);
 	}
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 
 void check_ged_action(int16 index) {
@@ -428,7 +428,7 @@ void check_ged_action(int16 index) {
 		}
 		flags.GedAction = false;
 	}
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 
 int16 ged_user_func(int16 idx_nr) {
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index e141835a10c..675b9114cbe 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -417,7 +417,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	maus_links_click = tmp_maus_links;
 	if (minfo.button)
 		flags.main_maus_flag = 1;
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	stop_spz();
 }
 
@@ -461,7 +461,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	}
 	if (minfo.button)
 		flags.main_maus_flag = 1;
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	maus_links_click = tmp_maus_links;
 	return (ret);
 }
@@ -481,7 +481,7 @@ void aad_wait(int16 str_nr) {
 	maus_links_click = tmp_maus_links;
 	if (minfo.button)
 		flags.main_maus_flag = 1;
-	kbinfo.scan_code = 0;
+	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 
 void start_aad(int16 dia_nr, int16 ssi_nr) {


Commit: ff05313cc2c5ad0d43c0cf8e15a8fbd8ee59827b
    https://github.com/scummvm/scummvm/commit/ff05313cc2c5ad0d43c0cf8e15a8fbd8ee59827b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Show intro first time game runs

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 1c2dc315ce8..6b50ea6038f 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -109,7 +109,7 @@ void EventsManager::delay(size_t time) {
 	do {
 		update();
 		currTime = g_system->getMillis();
-	} while (currTime >= expiryTime);
+	} while (currTime < expiryTime);
 }
 
 void EventsManager::clearEvents() {
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index ef9cfbd9b0b..c0a3061ff63 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -321,6 +321,8 @@ void set_speed();
 void new_game();
 void sound_init();
 void sound_exit();
+void show_intro();
+void test_intro();
 
 void init_atds();
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 1afd10157c4..d75f4a55852 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "common/memstream.h"
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
@@ -576,4 +577,19 @@ void sound_exit() {
 #endif
 }
 
+#define CSP_INT "csp.int"
+
+void show_intro() {
+	if (!ConfMan.getBool("shown_intro")) {
+		ConfMan.setBool("shown_intro", true);
+		flags.NoPalAfterFlc = true;
+		flic_cut(135, 0);
+	}
+}
+
+void test_intro() {
+	// No implementation
+}
+
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 9eda977750a..635f9ae69cf 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -44,6 +44,8 @@ void MainMenu::execute() {
 	ailsnd->stop_mod();
 #endif
 
+	show_intro();
+
 	cur->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;


Commit: 394b6d1b136b4cc97100277b77e82bcad70a1799
    https://github.com/scummvm/scummvm/commit/394b6d1b136b4cc97100277b77e82bcad70a1799
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Update room 0 methods

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 1d676a58fa8..311921759f6 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -120,21 +120,55 @@ void load_chewy_taf(int16 taf_nr) {
 }
 
 void r0_entry() {
-	set_person_pos(150, 100, P_CHEWY, P_RIGHT);
-	cur_hide_flag = false;
+	if (is_cur_inventar(0) || spieler.R0KissenWurf ||
+		obj->check_inventar(0))
+		det->hide_static_spr(6);
+
+	set_person_pos(150, 100, 0, 1);
+	cur_hide_flag = 0;
 	hide_cur();
-	spieler_vector[P_CHEWY].Delay = 5;
-	spieler.DelaySpeed = 5;
-	auto_move(1, P_CHEWY);
-	auto_move(7, P_CHEWY);
-	auto_move(1, P_CHEWY);
-	auto_move(7, P_CHEWY);
-	auto_move(9, P_CHEWY);
-	start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+	timer_nr[0] = room->set_timer(255, 3);
+
+	while (!ani_timer[timer_nr[0]].TimeFlag && !SHOULD_QUIT) {
+		set_up_screen(DO_SETUP);
+	}
+
+	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(2, -1);
 	show_cur();
 }
 
+void r0_action1() {
+	if (!spieler.inv_cur) {
+		hide_cur();
+		flags.AutoAniPlay = true;
+		auto_move(1, 0);
+		start_spz_wait(13, 1, 0, 0);
+		invent_2_slot(0);
+		menu_item = 0;
+		cursor_wahl(0);
+		atds->set_steuer_bit(174, 1, 1);
+		det->hide_static_spr(6);
+
+		flags.AutoAniPlay = false;
+	}
+}
+
+void r0_action2() {
+	if (!spieler.inv_cur) {
+		hide_cur();
+		auto_move(2, 0);
+		spieler.PersonHide[0] = 1;
+		start_detail_wait(3, 1, 0);
+		set_person_pos(222, 106, 0, 0);
+		spieler.PersonHide[0] = 0;
+		invent_2_slot(1);
+		menu_item = 0;
+		cursor_wahl(0);
+		atds->set_steuer_bit(175, 1, 1);
+	}
+}
+
 void r0_auge_start(int16 mode) {
 	ani_detail_info *adi;
 	int16 ende;
@@ -627,10 +661,10 @@ void r0_ch_kissen() {
 void r0_ani_klappe_delay() {
 	int16 i;
 	det->start_detail(KLAPPE_DETAIL, 1, VOR);
-	while (det->get_ani_status(KLAPPE_DETAIL)) {
+	while (det->get_ani_status(KLAPPE_DETAIL) && !SHOULD_QUIT) {
 		set_ani_screen();
-
 	}
+
 	flags.AniUserAction = true;
 	for (i = 0; i < 25; i++) {
 		clear_prog_ani();
@@ -675,6 +709,9 @@ void r0_fuett_ani() {
 			out->cls();
 			flic_cut(FCUT_001, CFO_MODE);
 
+			test_intro(1);
+			ERROR
+
 			spieler.PersonRoomNr[P_CHEWY] = 1;
 			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 			ERROR
@@ -685,10 +722,13 @@ void r0_fuett_ani() {
 			check_shad(4, 0);
 			fx_blende = 1;
 			set_up_screen(DO_SETUP);
-		} else
+		} else {
 			action = true;
-	} else
+		}
+	} else {
 		action = true;
+	}
+
 	if (action) {
 		r0_ch_fuetter();
 		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
@@ -701,6 +741,7 @@ void r0_fuett_ani() {
 #define HAND_CLICK 69
 #define RAHMEN_ROT 70
 #define RAHMEN_GELB 71
+
 int16 r4_sonde_comp() {
 	int16 ende;
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c0a3061ff63..7afd1da6a77 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -322,7 +322,7 @@ void new_game();
 void sound_init();
 void sound_exit();
 void show_intro();
-void test_intro();
+void test_intro(int testVal);
 
 void init_atds();
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index d75f4a55852..f2702d3f304 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -587,7 +587,7 @@ void show_intro() {
 	}
 }
 
-void test_intro() {
+void test_intro(int testVal) {
 	// No implementation
 }
 


Commit: bedbaa19adcc296188a057a5fa835a7c13941148
    https://github.com/scummvm/scummvm/commit/bedbaa19adcc296188a057a5fa835a7c13941148
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:04-08:00

Commit Message:
CHEWY: Remove redundant timer_flag

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 6b50ea6038f..e32ecfe6d17 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -42,19 +42,14 @@ EventsManager::~EventsManager() {
 
 void EventsManager::init_timer_handler() {
 	timer_int = true;
-	timer_flag = false;
 	timer_count = 0;
 
 	addTimer(timer_handler, (uint32)(1000 / 18.2));
 }
 
 void EventsManager::timer_handler() {
-	if (timer_flag == false) {
-		timer_flag = true;
-		if (!timer_suspend)
-			++timer_count;
-		timer_flag = false;
-	}
+	if (!timer_suspend)
+		++timer_count;
 }
 
 void EventsManager::handleEvent(const Common::Event &event) {
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 2e6bff38fc7..ba6fd39b03a 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -27,7 +27,6 @@
 
 namespace Chewy {
 
-bool timer_flag;
 bool timer_int;
 int timer_count;
 bool timer_suspend;
@@ -85,7 +84,7 @@ int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mod
 		ret = true;
 		timer_blk[timer_nr].TimeCount = 0;
 		timer_blk[timer_nr].TimeEnd = timer_end_wert;
-		timer_blk[timer_nr].TimeFlag = false;
+		timer_blk[timer_nr].TimeFlag = 0;
 		timer_blk[timer_nr].TimeLast = timer_count;
 		timer_blk[timer_nr].TimeMode = timer_mode;
 		timer_blk[timer_nr].TimeStatus = true;
@@ -97,7 +96,7 @@ int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mod
 void timer::reset_timer(int16 timer_nr, int16 timer_wert) {
 	if (timer_nr < timer_max) {
 		timer_blk[timer_nr].TimeCount = 0;
-		timer_blk[timer_nr].TimeFlag = false;
+		timer_blk[timer_nr].TimeFlag = 0;
 		timer_blk[timer_nr].TimeLast = timer_count;
 		if (timer_wert)
 			timer_blk[timer_nr].TimeEnd = timer_wert;
@@ -108,7 +107,7 @@ void timer::reset_all_timer() {
 	int16 i;
 	for (i = 0; i < timer_max; i++) {
 		timer_blk[i].TimeCount = 0;
-		timer_blk[i].TimeFlag = false;
+		timer_blk[i].TimeFlag = 0;
 		timer_blk[i].TimeLast = timer_count;
 	}
 }
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 3d59089fc67..d4b78129586 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -38,7 +38,6 @@ namespace Chewy {
 
 #define TIMER_UNFREEZE 3
 
-extern bool timer_flag;
 extern bool timer_int;
 extern int timer_count;
 extern bool timer_suspend;


Commit: 4bca85fab69154f39b7951627fc4614d2e3f6cc2
    https://github.com/scummvm/scummvm/commit/4bca85fab69154f39b7951627fc4614d2e3f6cc2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:05-08:00

Commit Message:
CHEWY: Add sound initialization, room sounds loading

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/datei.cpp
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/timer.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 485ee934bc1..ebcae55cfa7 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -158,7 +158,7 @@ char *Patterns[128];
 char *CurrentLine;
 int16 StereoPos [8] = {63};
 
-char *Dbuffer [8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
+byte *Dbuffer [8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
 uint32 DbufferLen [8] = {0};
 uint32 DbSampleLen [8] = {0};
 Stream *DbufferHandles [8] = {0};
@@ -579,15 +579,15 @@ void ailclass::end_sample(int16 kanal) {
 #endif
 }
 
-void ailclass::init_double_buffer(char *b1, char *b2, uint32 len, int16 kanal) {
+void ailclass::init_double_buffer(byte *b1, byte *b2, uint32 len, int16 kanal) {
 	kanal &= 3;
 	kanal += 4;
-	Dbuffer [kanal][0] = b1;
-	Dbuffer [kanal][1] = b2;
-	DbufferLen [kanal] = len;
+	Dbuffer[kanal][0] = b1;
+	Dbuffer[kanal][1] = b2;
+	DbufferLen[kanal] = len;
 }
 
-void ailclass::start_db_voc(void *v, int16 kanal, int16 vol) {
+void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
 	warning("STUB: ailclass::start_db_voc()");
 
 #if 0
@@ -901,4 +901,14 @@ void DecodeChannel(int16 ch) {
 #endif
 }
 
+void ailclass::switch_music(bool onOff) {
+	if (SoundEnable)
+		MusicSwitch = onOff;
+}
+
+void ailclass::switch_sound(bool onOff) {
+	if (SoundEnable)
+		SoundSwitch = onOff;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 8a6cf614b7f..a9fb76f948e 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -74,11 +74,13 @@ public:
 	void stop_sample(int16 kanal);
 	void continue_sample(int16 kanal);
 	void end_sample(int16 kanal);
-	void init_double_buffer(char *b1, char *b2,
+	void init_double_buffer(byte *b1, byte *b2,
 	                        uint32 len, int16 kanal);
-	// FIXME : was FILE*
-	void start_db_voc(void *voc, int16 kanal, int16 vol);
+
+	void start_db_voc(Stream *voc, int16 kanal, int16 vol);
 	void serve_db_samples();
+	void switch_music(bool onOff);
+	void switch_sound(bool onOff);
 private:
 };
 
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 6363b173123..a73a2900722 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -700,16 +700,18 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 }
 
 uint32 datei::load_voc(Stream *handle, byte *speicher) {
-	ChunkHead *ch;
-	ch = (ChunkHead *) tmp;
-	if (handle) {
-		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
+	ChunkHead *ch = (ChunkHead *)tmp;
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
+
+	if (rs) {
+		rs->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+
+		if (!ch->load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
 			if (ch->type == VOCDATEI) {
-				if (!(chewy_fread(speicher, ch->size, 1, handle))) {
+				if (rs->read(speicher, ch->size) != ch->size) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				}
@@ -719,7 +721,8 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 			}
 		}
 	}
-	return (ch->size);
+
+	return ch->size;
 }
 
 void datei::load_vocinfo(const char *fname, voc_header *speicher) {
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 4fab172be75..f277357e6e9 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -176,8 +176,8 @@ namespace Chewy {
 #define ADS_TXT_STEUER "txt/diah.adh"
 #define INV_USE_IDX "txt/inv_use.idx"
 
-#define DETAIL_TVP "SOUND\\DETAILS.TAP\0"
-#define SPEECH_TVP "SOUND\\SPEECH.TVP\0"
+#define DETAIL_TVP "sound/details.tap"
+#define SPEECH_TVP "sound/speech.tvp"
 
 #define ADSH_TMP "adsh.tmp"
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index fd098d3e502..25d30095ee5 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -937,13 +937,14 @@ void detail::load_room_sounds(Stream *tvp_handle) {
 	byte *workbuf;
 	uint32 size;
 	uint32 allsize;
+
 	if (tvp_handle) {
 		workbuf = SoundBuffer;
 		allsize = 0;
 		size = 0;
 		break_flag = false;
-		if (workbuf) {
 
+		if (workbuf) {
 			for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++)
 				rdi.sample[i] = NULL;
 
@@ -952,13 +953,15 @@ void detail::load_room_sounds(Stream *tvp_handle) {
 				if ((index != -1) && (rdi.sample[i] == NULL)) {
 					mem->file->select_pool_item(tvp_handle, index);
 					size = mem->file->load_voc(tvp_handle, workbuf);
-					if (!modul) {
 
+					if (!modul) {
 						rdi.sample[i] = workbuf;
 						workbuf += size;
 						allsize += size;
-					} else
+					} else {
 						break_flag = true;
+					}
+
 					if (allsize > SoundBufferSize) {
 						modul = SPEICHER;
 						fcode = NOSPEICHER;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index f2702d3f304..de17b8c42ce 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -443,84 +443,15 @@ void set_speed() {
 
 #define GRAVIS 8
 #define RAP10 9
+
 void sound_init() {
 	flags.InitSound = false;
 	spieler.SoundSwitch = false;
 	spieler.MusicSwitch = false;
 	frequenz = 22050;
 
-	ERROR
-	warning("STUB - Installing sound files");
-#if 0
-	system("cd sound");
-	Stream *test_handle = chewy_fopen("SET.INT", "rb");
-	if (!test_handle) {
-		test_handle = chewy_fopen("SET.INT", "wb");
-		if (test_handle) {
-			chewy_fputc('N', test_handle);
-			chewy_fputc('G', test_handle);
-			chewy_fputc('S', test_handle);
-			chewy_fclose(test_handle);
-		} else {
-			modul = DATEI;
-			fcode = OPENFEHLER;
-			err->set_user_msg("Set.Int schreiben.");
-		}
-		switch_2_cd();
-		ERROR
-		out->printxy(0, 0, 255, 0, scr_width, "Copying Sound-Files...");
-		char tmp_path[MAXPFAD] = {0};
-		strcpy(tmp_path, "copy sound\\*.dig \0");
-		strcat(tmp_path, HD_Lw);
-		system(tmp_path);
-		strcpy(tmp_path, "copy sound\\aildrvr.lst \0");
-		strcat(tmp_path, HD_Lw);
-		system(tmp_path);
-		strcpy(tmp_path, "copy sound\\setsound.exe \0");
-		strcat(tmp_path, HD_Lw);
-		system(tmp_path);
-		strcpy(tmp_path, "copy sound\\dos4gw.exe \0");
-		strcat(tmp_path, HD_Lw);
-		system(tmp_path);
-		switch_2_hd();
-		in->init();
-		in->alter_kb_handler();
-		out->restore_mode();
-		system("setsound.exe");
-		out->vsync_start();
-		out->init();
-		out->cls();
-		out->palette_save();
-		out->set_clip(0, 0, 320, 200);
-		out->set_writemode(0);
-		detect.Nager = in->init();
-		in->neuer_kb_handler(&kbinfo);
-		if (detect.Nager) {
-			in->rectangle(0, 0, 320, 210);
-			in->neuer_maushandler(&minfo);
-			out->init_mausmode(&minfo);
-			curblk.page_off_x = 0;
-			curblk.page_off_y = 0;
-			curblk.xsize = 16;
-			curblk.ysize = 16;
-
-			curblk.sprite = curtaf->image;
-			curblk.cur_back = cur_back;
-			curblk.no_back = TRUE;
-			curani.ani_anf = 0;
-			curani.ani_end = 0;
-			curani.delay = 0;
-			mouse_hot_x = 0;
-			mouse_hot_y = 0;
-		}
-	} else
-		chewy_fclose(test_handle);
 	detect.SoundSource = ailsnd->init(frequenz);
-	ERROR
-	system("cd ..");
 
-	switch_2_cd();
-	ERROR
 	if (detect.SoundSource) {
 		ailsnd->init_mix_mode();
 		spieler.MusicVol = 63;
@@ -529,52 +460,52 @@ void sound_init() {
 		ailsnd->set_sound_mastervol(spieler.SoundVol);
 		ailsnd->switch_music(1);
 		ailsnd->switch_sound(1);
-		flags.InitSound = TRUE;
+		flags.InitSound = true;
+
 		room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 		ERROR
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
 		music_handle = room->get_sound_handle();
-		chewy_fseek(music_handle, 0, SEEK_SET);
+		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
+		assert(rs);
+
+		rs->seek(0);
 		EndOfPool = 0;
 		NewPhead Nph;
-		if (!chewy_fread(&Nph, sizeof(NewPhead), 1, music_handle)) {
+		if (!Nph.load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
-		} else
+		} else {
 			EndOfPool = Nph.PoolAnz - 1;
+		}
 		ERROR
+		
 		speech_handle = chewy_fopen(SPEECH_TVP, "rb");
 		if (!speech_handle) {
 			modul = DATEI;
 			fcode = OPENFEHLER;
-			err->set_user_msg("SPEECH.TVP\0");
+			err->set_user_msg("speech.tvp");
 		} else {
 			ailsnd->init_double_buffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
 			atds->set_speech_handle(speech_handle);
-
 		}
-#endif
+
 		if (!modul) {
 			spieler.SoundSwitch = true;
 			spieler.MusicSwitch = true;
 			spieler.SpeechSwitch = true;
 		}
-#if 0
 	}
-#endif
 }
 
 void sound_exit() {
-	warning("STUB - sound_exit");
-#if 0
 	if (detect.SoundSource && flags.InitSound) {
 		ailsnd->exit_mix_mode();
 		ailsnd->exit1();
 		if (speech_handle)
 			chewy_fclose(speech_handle);
 	}
-#endif
 }
 
 #define CSP_INT "csp.int"
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index bda19f59d4a..57165989f44 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -580,9 +580,9 @@ void set_up_screen(int16 mode) {
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
 
 	sprite_engine();
-	if (menu_display == MENU_EINBLENDEN) {
-
-		plot_main_menu();
+	if (menu_display == MENU_EINBLENDEN || flags.InventMenu) {
+		if (!flags.InventMenu)
+			plot_main_menu();
 	} else {
 		kb_mov(1);
 		det->unfreeze_ani();
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 02624abe045..4a497651672 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -458,13 +458,9 @@ void Room::load_sound() {
 	}
 }
 
-void *Room::get_sound_handle() {
-	void *ret;
-	if ((!modul) && (flags.InitSound))
-		ret = roomhandle[R_VOCDATEI];
-	else
-		ret = 0;
-	return (ret);
+Stream *Room::get_sound_handle() {
+	return (modul || !flags.InitSound) ? nullptr :
+		roomhandle[R_VOCDATEI];
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 4a72a968681..e19bbdd2577 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -82,8 +82,8 @@ public:
 
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode);
 	void load_sound();
-	// FIXME: was FILE*
-	void *get_sound_handle();
+
+	Stream *get_sound_handle();
 
 	byte *get_ablage(int16 nr);
 
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index ba6fd39b03a..c02a784c241 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/system.h"
 #include "common/textconsole.h"
 #include "chewy/chewy.h"
 #include "chewy/timer.h"
@@ -51,7 +52,15 @@ float timer_freq[6] = {
 	65520.0f
 };
 
+static uint32 priorTime = 0;
+
 void timer::calc_timer() {
+	uint32 currTime = g_system->getMillis();
+	if ((currTime / 1000) != (priorTime / 1000)) {
+		priorTime = currTime;
+		warning("%d", timer_count);
+	}
+
 	int16 i;
 	int16 count;
 	int ak_time;


Commit: b031fb4498cb6ee5acf72ee26e614cd7c5172800
    https://github.com/scummvm/scummvm/commit/b031fb4498cb6ee5acf72ee26e614cd7c5172800
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:05-08:00

Commit Message:
CHEWY: Create class for room 0 methods

I'm still keeping them as static methods for now, but having a
class at least allows me to keep the bulk of the room's methods
private, providing better encapsulation

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 311921759f6..913c325c227 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -119,7 +119,7 @@ void load_chewy_taf(int16 taf_nr) {
 	}
 }
 
-void r0_entry() {
+void Room0::entry() {
 	if (is_cur_inventar(0) || spieler.R0KissenWurf ||
 		obj->check_inventar(0))
 		det->hide_static_spr(6);
@@ -138,7 +138,7 @@ void r0_entry() {
 	show_cur();
 }
 
-void r0_action1() {
+void Room0::action1() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		flags.AutoAniPlay = true;
@@ -154,7 +154,7 @@ void r0_action1() {
 	}
 }
 
-void r0_action2() {
+void Room0::action2() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
@@ -169,7 +169,7 @@ void r0_action2() {
 	}
 }
 
-void r0_auge_start(int16 mode) {
+void Room0::auge_start(int16 mode) {
 	ani_detail_info *adi;
 	int16 ende;
 
@@ -180,24 +180,24 @@ void r0_auge_start(int16 mode) {
 		adi->ani_count = 38;
 
 	if (!mode) {
-
-		r0_ani_klappe_delay();
+		ani_klappe_delay();
 	}
+
 	ende = 0;
 	flags.AniUserAction = true;
-	if (!mode) {
 
+	if (!mode) {
 		det->enable_sound(KLAPPE_DETAIL, 0);
 		det->disable_sound(KLAPPE_DETAIL, 1);
 		det->enable_sound(SCHLAUCH_DETAIL, 0);
 		det->disable_sound(SCHLAUCH_DETAIL, 2);
 	} else {
-
 		det->disable_sound(KLAPPE_DETAIL, 0);
 		det->enable_sound(KLAPPE_DETAIL, 1);
 		det->disable_sound(SCHLAUCH_DETAIL, 0);
 		det->enable_sound(SCHLAUCH_DETAIL, 2);
 	}
+
 	while (!ende) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
@@ -210,13 +210,15 @@ void r0_auge_start(int16 mode) {
 			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
+
 		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		r0_calc_auge_click(3);
+		calc_auge_click(3);
 		out->back2screen(workpage);
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -232,8 +234,10 @@ void r0_auge_start(int16 mode) {
 			}
 		}
 	}
+
 	clear_prog_ani();
 	flags.AniUserAction = false;
+
 	if (mode) {
 		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
 		while (det->get_ani_status(KLAPPE_DETAIL))
@@ -241,14 +245,14 @@ void r0_auge_start(int16 mode) {
 	}
 }
 
-void r0_auge_wait() {
+void Room0::auge_wait() {
 	ani_detail_info *adi;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
 	adi->delay_count = 15;
-
 	flags.AniUserAction = true;
+
 	while (adi->ani_count < 46) {
 		clear_prog_ani();
 
@@ -261,20 +265,22 @@ void r0_auge_wait() {
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		r0_calc_auge_click(2);
+		calc_auge_click(2);
 		out->back2screen(workpage);
-		if (adi->delay_count > 0)
+
+		if (adi->delay_count > 0) {
 			--adi->delay_count;
-		else {
+		} else {
 			adi->delay_count = adi->delay + spieler.DelaySpeed;
 			++adi->ani_count;
 		}
 	}
+
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
 
-void r0_calc_auge_click(int16 ani_nr) {
+void Room0::calc_auge_click(int16 ani_nr) {
 	int16 anz;
 	int16 x, y;
 	int16 i;
@@ -303,7 +309,7 @@ void r0_calc_auge_click(int16 ani_nr) {
 	}
 }
 
-void r0_auge_shoot() {
+void Room0::auge_shoot() {
 	ani_detail_info *adi;
 	int16 ende;
 
@@ -312,6 +318,7 @@ void r0_auge_shoot() {
 
 	ende = 0;
 	det->start_detail(CH_BLITZ, 1, VOR);
+
 	while (!ende) {
 		clear_prog_ani();
 		spieler.PersonHide[P_CHEWY] = true;
@@ -319,6 +326,7 @@ void r0_auge_shoot() {
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
+
 		if (adi->ani_count < 53) {
 			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
@@ -328,6 +336,7 @@ void r0_auge_shoot() {
 			if (!det->get_ani_status(CH_BLITZ))
 				ende = 1;
 		}
+
 		set_up_screen(DO_SETUP);
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -336,22 +345,23 @@ void r0_auge_shoot() {
 			++adi->ani_count;
 		}
 	}
+
 	det->start_detail(STERNE_STEHEN, 255, VOR);
 	clear_prog_ani();
 	spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 	spr_info[0].ZEbene = 190;
-	spr_info[1] =
-	    det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+	spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 	spr_info[1].ZEbene = 191;
 	spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
 	spr_info[2].ZEbene = 192;
+
 	wait_show_screen(30);
 	clear_prog_ani();
 	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 	spieler.PersonHide[P_CHEWY] = false;
 }
 
-void r0_auge_schleim_back() {
+void Room0::auge_schleim_back() {
 	ani_detail_info *adi;
 	int16 ende;
 
@@ -360,10 +370,12 @@ void r0_auge_schleim_back() {
 
 	ende = 0;
 	flags.AniUserAction = true;
+
 	while (!ende) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
+
 		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
 			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
@@ -372,6 +384,7 @@ void r0_auge_schleim_back() {
 			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
+
 		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
@@ -384,11 +397,12 @@ void r0_auge_schleim_back() {
 				ende = 1;
 		}
 	}
+
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
 
-void r0_ch_schleim_auge() {
+void Room0::ch_schleim_auge() {
 	ani_detail_info *adi;
 
 	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
@@ -409,6 +423,7 @@ void r0_ch_schleim_auge() {
 		spr_info[3] = det->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_up_screen(DO_SETUP);
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -416,14 +431,16 @@ void r0_ch_schleim_auge() {
 			++adi->ani_count;
 		}
 	}
+
 	if (adi->load_flag) {
 		det->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
 	}
+
 	clear_prog_ani();
 	spieler.PersonHide[P_CHEWY] = false;
 }
 
-void r0_fuetter_start(int16 mode) {
+void Room0::fuetter_start(int16 mode) {
 	ani_detail_info *adi;
 	int16 ende;
 
@@ -434,8 +451,7 @@ void r0_fuetter_start(int16 mode) {
 		adi->ani_count = 135;
 
 	if (!mode) {
-
-		r0_ani_klappe_delay();
+		ani_klappe_delay();
 		det->enable_sound(KLAPPE_DETAIL, 0);
 		det->disable_sound(KLAPPE_DETAIL, 1);
 		det->enable_sound(FUETTER_SCHLAUCH, 0);
@@ -447,9 +463,11 @@ void r0_fuetter_start(int16 mode) {
 		det->disable_sound(FUETTER_SCHLAUCH, 0);
 		det->enable_sound(FUETTER_SCHLAUCH, 2);
 	}
+
 	ende = 0;
 	if (spieler.R0SchleimWurf)
 		flags.AniUserAction = true;
+
 	while (!ende) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
@@ -461,7 +479,8 @@ void r0_fuetter_start(int16 mode) {
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
 		if (!mode)
-			r0_calc_kissen_click(1);
+			calc_kissen_click(1);
+
 		out->back2screen(workpage);
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -478,8 +497,10 @@ void r0_fuetter_start(int16 mode) {
 			}
 		}
 	}
+
 	clear_prog_ani();
 	flags.AniUserAction = false;
+
 	if (mode) {
 		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
 		while (det->get_ani_status(KLAPPE_DETAIL))
@@ -488,10 +509,8 @@ void r0_fuetter_start(int16 mode) {
 	}
 }
 
-void r0_kissen_wurf() {
-	int16 i;
-
-	for (i = 0; i < 30 && !spieler.R0KissenWurf; i++) {
+void Room0::kissen_wurf() {
+	for (int16 i = 0; i < 30 && !spieler.R0KissenWurf; i++) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
@@ -500,13 +519,14 @@ void r0_kissen_wurf() {
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		r0_calc_kissen_click(1);
+		calc_kissen_click(1);
 		out->back2screen(workpage);
 	}
+
 	clear_prog_ani();
 }
 
-void r0_calc_kissen_click(int16 ani_nr) {
+void Room0::calc_kissen_click(int16 ani_nr) {
 	int16 anz;
 	int16 x, y;
 	int16 i;
@@ -534,7 +554,7 @@ void r0_calc_kissen_click(int16 ani_nr) {
 	}
 }
 
-void r0_ch_fuetter() {
+void Room0::ch_fuetter() {
 	ani_detail_info *adi;
 	int16 i;
 	int16 ende;
@@ -568,9 +588,11 @@ void r0_ch_fuetter() {
 			spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			spr_info[3].ZEbene = 193;
 		}
+
 		spr_info[4] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[4].ZEbene = 194;
 		set_ani_screen();
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -591,6 +613,7 @@ void r0_ch_fuetter() {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
+
 		if (adi->ani_count > 138) {
 			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
@@ -599,9 +622,11 @@ void r0_ch_fuetter() {
 			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
+
 		spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
+
 		if (!det->get_ani_status(CH_NACH_FUETTERN))
 			ende = 1;
 		if (adi->delay_count > 0)
@@ -612,12 +637,13 @@ void r0_ch_fuetter() {
 				--adi->ani_count;
 		}
 	}
+
 	spieler.PersonHide[P_CHEWY] = false;
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
 
-void r0_ch_kissen() {
+void Room0::ch_kissen() {
 	ani_detail_info *adi;
 	int16 ende, mode;
 
@@ -628,6 +654,7 @@ void r0_ch_kissen() {
 	spieler.PersonHide[P_CHEWY] = true;
 	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
 	mode = 0;
+
 	while (!ende) {
 		clear_prog_ani();
 		if (!det->get_ani_status(CH_WIRFT_KISSEN)) {
@@ -635,6 +662,7 @@ void r0_ch_kissen() {
 			spieler.PersonHide[P_CHEWY] = false;
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
+
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
@@ -644,6 +672,7 @@ void r0_ch_kissen() {
 			spr_info[2].ZEbene = 192;
 		}
 		set_up_screen(DO_SETUP);
+
 		if (mode) {
 			if (adi->delay_count > 0)
 				--adi->delay_count;
@@ -655,10 +684,11 @@ void r0_ch_kissen() {
 			}
 		}
 	}
+
 	clear_prog_ani();
 }
 
-void r0_ani_klappe_delay() {
+void Room0::ani_klappe_delay() {
 	int16 i;
 	det->start_detail(KLAPPE_DETAIL, 1, VOR);
 	while (det->get_ani_status(KLAPPE_DETAIL) && !SHOULD_QUIT) {
@@ -672,38 +702,40 @@ void r0_ani_klappe_delay() {
 		spr_info[0].ZEbene = 190;
 		set_ani_screen();
 	}
+
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
 
-void r0_auge_ani() {
+void Room0::auge_ani() {
 	if (!spieler.R0SchleimWurf) {
-		r0_auge_start(0);
+		auge_start(0);
 		if (!spieler.R0SchleimWurf)
-			r0_auge_wait();
+			auge_wait();
 		if (spieler.R0SchleimWurf) {
 			start_aad(124);
-			r0_ch_schleim_auge();
-			r0_auge_schleim_back();
+			ch_schleim_auge();
+			auge_schleim_back();
 			auto_move(FUETTER_POS, P_CHEWY);
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		} else {
-			r0_auge_shoot();
+			auge_shoot();
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-			r0_auge_start(1);
+			auge_start(1);
 		}
 	}
 }
 
-void r0_fuett_ani() {
+void Room0::fuett_ani() {
 	int16 action;
 	action = false;
-	r0_fuetter_start(0);
+	fuetter_start(0);
+
 	if (spieler.R0SchleimWurf) {
-		r0_kissen_wurf();
+		kissen_wurf();
 		if (spieler.R0KissenWurf) {
-			r0_ch_kissen();
-			r0_fuetter_start(1);
+			ch_kissen();
+			fuetter_start(1);
 			auto_move(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
 			out->cls();
@@ -730,10 +762,10 @@ void r0_fuett_ani() {
 	}
 
 	if (action) {
-		r0_ch_fuetter();
+		ch_fuetter();
 		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
 		start_aad(55);
-		r0_fuetter_start(1);
+		fuetter_start(1);
 	}
 }
 
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index bda65952cc8..5e6bf41cab0 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -27,36 +27,39 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-void r28_free_chewy_pump();
+class Room0 {
+private:
+	static void auge_start(int16 mode);
 
-void r0_entry();
+	static void auge_wait();
 
-void r0_auge_ani();
+	static void auge_shoot();
 
-void r0_fuett_ani();
+	static void auge_schleim_back();
 
-void r0_auge_start(int16 mode);
+	static void ch_schleim_auge();
 
-void r0_auge_wait();
+	static void fuetter_start(int16 mode);
 
-void r0_auge_shoot();
+	static void ch_fuetter();
+	static void ch_kissen();
 
-void r0_auge_schleim_back();
+	static void kissen_wurf();
 
-void r0_ch_schleim_auge();
+	static void ani_klappe_delay();
 
-void r0_fuetter_start(int16 mode);
+	static void calc_auge_click(int16 ani_nr);
 
-void r0_ch_fuetter();
-void r0_ch_kissen();
+	static void calc_kissen_click(int16 ani_nr);
 
-void r0_kissen_wurf();
+	static void action1();
+	static void action2();
+public:
+	static void entry();
 
-void r0_ani_klappe_delay();
-
-void r0_calc_auge_click(int16 ani_nr);
-
-void r0_calc_kissen_click(int16 ani_nr);
+	static void auge_ani();
+	static void fuett_ani();
+};
 
 void r2_jump_out_r1(int16 nr);
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 3f9fea4d65a..81841c81648 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -132,7 +132,7 @@ void timer_action(int16 t_nr) {
 						start_aad_wait(43, -1);
 						++spieler.R0FueterLab;
 					}
-					r0_auge_ani();
+					Room0::auge_ani();
 					ok = true;
 				} else {
 					if (!spieler.R0KissenWurf) {
@@ -147,9 +147,11 @@ void timer_action(int16 t_nr) {
 						               145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 					}
 				}
+
 				if (!spieler.R0KissenWurf) {
-					r0_fuett_ani();
+					Room0::fuett_ani();
 				}
+
 				uhr->reset_timer(t_nr, 0);
 				flags.AutoAniPlay = false;
 			}
@@ -545,7 +547,7 @@ void enter_room(int16 eib_nr) {
 	switch (spieler.PersonRoomNr[P_CHEWY]) {
 
 	case 0:
-		r0_entry();
+		Room0::entry();
 		break;
 
 	case 3:


Commit: c30ce2d39f28514877cb8d89992ac4283ee8d961
    https://github.com/scummvm/scummvm/commit/c30ce2d39f28514877cb8d89992ac4283ee8d961
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:05-08:00

Commit Message:
CHEWY: Hooking up room 0 actions to ats_action

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 585fb771ad5..47fd1381cd6 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -902,6 +902,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 	char *start_ptr;
 	int16 vocx;
 	SplitStringInit tmp_ssi;
+
 	if (aadv.Dialog) {
 		switch (in->get_switch_code()) {
 		case ESC:
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 913c325c227..817fe79030b 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -138,7 +138,7 @@ void Room0::entry() {
 	show_cur();
 }
 
-void Room0::action1() {
+bool Room0::action1() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		flags.AutoAniPlay = true;
@@ -151,10 +151,13 @@ void Room0::action1() {
 		det->hide_static_spr(6);
 
 		flags.AutoAniPlay = false;
+		return true;
 	}
+
+	return false;
 }
 
-void Room0::action2() {
+bool Room0::action2() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
@@ -166,7 +169,11 @@ void Room0::action2() {
 		menu_item = 0;
 		cursor_wahl(0);
 		atds->set_steuer_bit(175, 1, 1);
+
+		return true;
 	}
+
+	return false;
 }
 
 void Room0::auge_start(int16 mode) {
@@ -1515,35 +1522,41 @@ void r8_start_verbrennen() {
 	show_cur();
 }
 
-void r8_gips_wurf() {
-	hide_cur();
-	det->load_taf_seq(116, 30, 0);
-	auto_move(2, P_CHEWY);
-	maus_links_click = 0;
-	spieler.PersonHide[P_CHEWY] = true;
-	del_inventar(GIPS_EIMER_INV);
-	start_detail_wait(4, 1, ANI_VOR);
-	spieler.PersonHide[P_CHEWY] = false;
-	start_detail_frame(5, 1, ANI_VOR, 16);
-	start_detail_wait(6, 1, ANI_VOR);
-	obj->show_sib(33);
-	det->show_static_spr(14);
-	wait_detail(5);
-	spieler.R8GipsWurf = true;
-	spieler.room_m_obj[MASKE_INV].ZEbene = 0;
-	obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
-	det->del_taf_tbl(116, 30, 0);
-	auto_move(8, P_CHEWY);
-	flags.AtsAction = false;
-	menu_item = CUR_USE;
-	look_invent_screen(INVENTAR_NORMAL, 178);
-	flags.AtsAction = true;
-	spieler.PersonHide[P_CHEWY] = true;
-	start_detail_wait(20, 1, ANI_VOR);
-	spieler.PersonHide[P_CHEWY] = false;
-	invent_2_slot(MASKE_INV);
-	cursor_wahl(menu_item);
-	show_cur();
+bool r8_gips_wurf() {
+	if (!is_cur_inventar(11)) {
+		hide_cur();
+		det->load_taf_seq(116, 30, 0);
+		auto_move(2, P_CHEWY);
+		maus_links_click = 0;
+		spieler.PersonHide[P_CHEWY] = true;
+		del_inventar(GIPS_EIMER_INV);
+		start_detail_wait(4, 1, ANI_VOR);
+		spieler.PersonHide[P_CHEWY] = false;
+		start_detail_frame(5, 1, ANI_VOR, 16);
+		start_detail_wait(6, 1, ANI_VOR);
+		obj->show_sib(33);
+		det->show_static_spr(14);
+		wait_detail(5);
+		spieler.R8GipsWurf = true;
+		spieler.room_m_obj[MASKE_INV].ZEbene = 0;
+		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
+		det->del_taf_tbl(116, 30, 0);
+		auto_move(8, P_CHEWY);
+		flags.AtsAction = false;
+		menu_item = CUR_USE;
+		look_invent_screen(INVENTAR_NORMAL, 178);
+		flags.AtsAction = true;
+		spieler.PersonHide[P_CHEWY] = true;
+		start_detail_wait(20, 1, ANI_VOR);
+		spieler.PersonHide[P_CHEWY] = false;
+		invent_2_slot(MASKE_INV);
+		cursor_wahl(menu_item);
+		show_cur();
+
+		return true;
+	}
+
+	return false;
 }
 
 void r8_open_gdoor() {
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 5e6bf41cab0..6cc4bc5669d 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -51,14 +51,13 @@ private:
 	static void calc_auge_click(int16 ani_nr);
 
 	static void calc_kissen_click(int16 ani_nr);
-
-	static void action1();
-	static void action2();
 public:
 	static void entry();
 
 	static void auge_ani();
 	static void fuett_ani();
+	static bool action1();
+	static bool action2();
 };
 
 void r2_jump_out_r1(int16 nr);
@@ -100,7 +99,7 @@ void r8_hole_kohle();
 
 void r8_start_verbrennen();
 
-void r8_gips_wurf();
+bool r8_gips_wurf();
 
 void r8_open_gdoor();
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b16b3f5911f..289fda5f4fd 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -76,9 +76,24 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 			flags.AtsAction = true;
 			if (mode == ATS_ACTION_NACH) {
 				switch (txt_mode) {
-
 				case TXT_MARK_LOOK:
 					switch (txt_nr) {
+					case 62:
+						action_ret = r39_use_howard();
+						break;
+
+					case 67:
+						action_ret = r8_gips_wurf();
+						break;
+
+					case 174:
+						action_ret = Room0::action1();
+						break;
+
+					case 175:
+						action_ret = Room0::action2();
+						break;
+
 					case 229:
 						auto_move(2, P_CHEWY);
 						r39_look_tv(1);
@@ -608,7 +623,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				case TXT_MARK_TALK:
 					switch (txt_nr) {
-
 					case 11:
 						auto_move(3, P_CHEWY);
 						det->stop_detail(5);
@@ -733,11 +747,9 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				default:
 					break;
-
 				}
 			} else if (mode == ATS_ACTION_VOR) {
 				switch (txt_mode) {
-
 				case TXT_MARK_LOOK:
 					switch (txt_nr) {
 					case 210:
@@ -761,7 +773,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				case TXT_MARK_USE:
 					switch (txt_nr) {
-
 					case 90:
 						atds->set_ats_str(90, TXT_MARK_USE, spieler.R13Band);
 						break;
@@ -883,9 +894,9 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				default:
 					break;
-
 				}
 			}
+
 			flags.AtsAction = false;
 		}
 	} else


Commit: 7c5984f99ca95b34803f03e9ce2a06722b0f7a36
    https://github.com/scummvm/scummvm/commit/7c5984f99ca95b34803f03e9ce2a06722b0f7a36
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:05-08:00

Commit Message:
CHEWY: Updating atdsys print methods

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 47fd1381cd6..28199eaf617 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -31,6 +31,8 @@ namespace Chewy {
 
 extern char *err_str;
 int16 mouse_push;
+int print_delay_count1;
+int print_delay_count2;		// TODO: seems to be unused
 
 void AtsTxtHeader::load(Common::SeekableReadStream *src) {
 	TxtNr = src->readUint16LE();
@@ -61,7 +63,7 @@ atdsys::atdsys() {
 	atdsv.Display = DISPLAY_TXT;
 	atdsv.DiaNr = -1;
 	atdsv.aad_str = 0;
-	atdsv.SpeechHandle = 0;
+	atdsv.SpeechHandle = nullptr;
 	atdsv.VocNr = -1;
 	ssret.Next = false;
 	ssr = &ssret;
@@ -290,8 +292,8 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	return (handle);
 }
 
-void atdsys::set_speech_handle(Stream *speech_handle_) {
-	atdsv.SpeechHandle = speech_handle_;
+void atdsys::set_speech_handle(Stream *stream) {
+	atdsv.SpeechHandle = stream;
 }
 
 void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
@@ -527,6 +529,8 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 				atsv.Display = false;
 			} else {
 				atsv.DelayCount = get_delay(atsv.TxtLen);
+				print_delay_count1 = atsv.DelayCount / 10;
+				print_delay_count2 = atsv.DelayCount;
 				atsv.Color = color;
 				mouse_push = true;
 			}
@@ -555,25 +559,29 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	char *start_ptr;
 	SplitStringInit tmp_ssi;
 	if (atsv.Display) {
-		switch (in->get_switch_code()) {
-		case ESC:
-		case ENTER:
-		case MAUS_LINKS:
-			if (mouse_push == false) {
-				if (atsv.SilentCount <= 0) {
-					mouse_push = true;
-					atsv.DelayCount = 0;
-					inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-					inzeig->kbinfo->key_code = '\0';
+		if (atdsv._field12) {
+			switch (in->get_switch_code()) {
+			case ESC:
+			case ENTER:
+			case MAUS_LINKS:
+				if (mouse_push == false) {
+					if (atsv.SilentCount <= 0 && atsv.DelayCount > print_delay_count1) {
+						mouse_push = true;
+						atsv.DelayCount = 0;
+						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+						inzeig->kbinfo->key_code = '\0';
+					}
 				}
-			}
-			break;
+				break;
 
-		default:
+			default:
+				mouse_push = false;
+				break;
+			}
+		} else {
 			mouse_push = false;
-			break;
-
 		}
+
 		if (atsv.SilentCount <= 0) {
 			tmp_ptr = atsv.Ptr;
 			out->set_fontadr(atdsv.Font);
@@ -588,8 +596,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
 			tmp_ssi = ats_ssi;
 			ssr = split_string(&tmp_ssi);
-			for (i = 0; i < ssr->Anz; i++) {
 
+			for (i = 0; i < ssr->Anz; i++) {
 				out->printxy(ssr->X[i],
 				              ssr->Y + (i * ats_ssi.FHoehe) + 1,
 				              0, 300, 0, ssr->StrPtr[i]);
@@ -608,6 +616,7 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 				              300, 0, ssr->StrPtr[i]);
 				tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
 			}
+
 			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
 			if (atsv.DelayCount <= 0) {
 				if (ssr->Next == false) {
@@ -618,6 +627,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 					while (*tmp_ptr++ != ATDS_END_TEXT)
 						++atsv.TxtLen;
 					atsv.DelayCount = get_delay(atsv.TxtLen);
+					print_delay_count1 = atsv.DelayCount / 10;
+					print_delay_count2 = atsv.DelayCount;
 					atsv.SilentCount = atdsv.Silent;
 				}
 			} else
@@ -862,7 +873,9 @@ int16 atdsys::start_aad(int16 dia_nr) {
 	int16 *pos;
 	int16 txt_len;
 
-	aadv.Dialog = false;
+	if (aadv.Dialog)
+		stop_aad();
+
 	if (atdsmem[AAD_HANDLE]) {
 		aadv.Ptr = atdsmem[AAD_HANDLE];
 		aad_search_dia(dia_nr, &aadv.Ptr);
@@ -876,6 +889,9 @@ int16 atdsys::start_aad(int16 dia_nr) {
 			aadv.Ptr += sizeof(AadStrHeader);
 			aad_get_zeilen(aadv.Ptr, &txt_len);
 			aadv.DelayCount = get_delay(txt_len);
+			print_delay_count1 = aadv.DelayCount / 10;
+			print_delay_count2 = aadv.DelayCount;
+
 			atdsv.DiaNr = dia_nr;
 			if (atdsv.aad_str != 0)
 				atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
@@ -884,7 +900,8 @@ int16 atdsys::start_aad(int16 dia_nr) {
 			atdsv.VocNr = -1;
 		}
 	}
-	return (aadv.Dialog);
+
+	return aadv.Dialog;
 }
 
 void atdsys::stop_aad() {
@@ -904,25 +921,29 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 	SplitStringInit tmp_ssi;
 
 	if (aadv.Dialog) {
-		switch (in->get_switch_code()) {
-		case ESC:
-		case ENTER:
-		case MAUS_LINKS:
-			if (mouse_push == false) {
-				if (aadv.SilentCount <= 0) {
-					mouse_push = true;
-					aadv.DelayCount = 0;
-					inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-					inzeig->kbinfo->key_code = '\0';
+		if (atdsv._field12) {
+			switch (in->get_switch_code()) {
+			case ESC:
+			case ENTER:
+			case MAUS_LINKS:
+				if (mouse_push == false) {
+					if (aadv.SilentCount <= 0 && aadv.DelayCount > print_delay_count1) {
+						mouse_push = true;
+						aadv.DelayCount = 0;
+						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+						inzeig->kbinfo->key_code = '\0';
+					}
 				}
-			}
-			break;
+				break;
 
-		default:
+			default:
+				mouse_push = false;
+				break;
+			}
+		} else {
 			mouse_push = false;
-			break;
-
 		}
+
 		if (aadv.SilentCount <= 0) {
 			tmp_ptr = aadv.Ptr;
 			out->set_fontadr(atdsv.Font);
@@ -1025,6 +1046,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 					}
 					aad_get_zeilen(aadv.Ptr, &txt_len);
 					aadv.DelayCount = get_delay(txt_len);
+					print_delay_count1 = aadv.DelayCount / 10;
+					print_delay_count2 = aadv.DelayCount;
 					aadv.SilentCount = atdsv.Silent;
 				}
 			} else {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 4428f4a05e0..f7dfb665292 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -111,20 +111,20 @@ struct AdsBlock {
 };
 
 struct AtdsVar {
-	byte *Font;
-	int16 Fvorx;
-	int16 Fhoehe;
-	int16 Silent;
-	int16 *Delay;
-	int16 DiaNr;
+	byte *Font = nullptr;
+	int16 Fvorx = 0;
+	int16 Fhoehe = 0;
+	int16 Silent = 0;
+	int16 *Delay = 0;
+	int16 DiaNr = 0;
 
-	uint8 Display;
-
-	int16 VocNr;
+	uint8 Display = 0;
+	int16 _field12 = 0;
+	int16 VocNr = 0;
 
-	Stream *SpeechHandle;
+	Stream *SpeechHandle = nullptr;
 
-	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode);
+	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) = nullptr;
 };
 
 #define IUID_IIB 0
@@ -309,6 +309,9 @@ public:
 	int16 check_item(int16 block_nr, int16 item_nr);
 	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
 	int16 get_stereo_pos(int16 x);
+	void set_unknown(int16 nr) {
+		atdsv._field12 = nr;
+	}
 
 private:
 	int16 get_delay(int16 txt_len);


Commit: 9791b38fc2ddc9664d9c442f0cd11e7a0c149d38
    https://github.com/scummvm/scummvm/commit/9791b38fc2ddc9664d9c442f0cd11e7a0c149d38
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:05-08:00

Commit Message:
CHEWY: Remove debug timer code

Changed paths:
    engines/chewy/timer.cpp


diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index c02a784c241..a198a7c282b 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -52,15 +52,7 @@ float timer_freq[6] = {
 	65520.0f
 };
 
-static uint32 priorTime = 0;
-
 void timer::calc_timer() {
-	uint32 currTime = g_system->getMillis();
-	if ((currTime / 1000) != (priorTime / 1000)) {
-		priorTime = currTime;
-		warning("%d", timer_count);
-	}
-
 	int16 i;
 	int16 count;
 	int ak_time;


Commit: 9cf8a5411aef0d4dfd39218d18f602a7f71f299c
    https://github.com/scummvm/scummvm/commit/9cf8a5411aef0d4dfd39218d18f602a7f71f299c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: Update timer_action

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/episode3.cpp
    engines/chewy/episode3.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index ebcae55cfa7..b65f6d1c9e3 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -23,6 +23,7 @@
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
 #include "chewy/file.h"
+#include "chewy/global.h"
 #include "chewy/ngshext.h"
 
 namespace Chewy {
@@ -911,4 +912,17 @@ void ailclass::switch_sound(bool onOff) {
 		SoundSwitch = onOff;
 }
 
+bool ailclass::isSpeechActive() const {
+	// TODO: Implement properly
+	return true;
+}
+
+void ailclass::waitForSpeechToFinish() {
+	if (flags.InitSound && spieler.SpeechSwitch) {
+		while (isSpeechActive() && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index a9fb76f948e..688b0cf775b 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -81,6 +81,8 @@ public:
 	void serve_db_samples();
 	void switch_music(bool onOff);
 	void switch_sound(bool onOff);
+	bool isSpeechActive() const;
+	void waitForSpeechToFinish();
 private:
 };
 
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index a80eab8f0ab..40233efb361 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -1178,6 +1178,10 @@ int16 r51_cut_serv(int16 frame) {
 	return (0);
 }
 
+void r51_timer_action(int16 t_nr, int16 obj_nr) {
+	// TODO
+}
+
 void r52_entry() {
 	SetUpScreenFunc = r52setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
index 0acb12167eb..b05c1427961 100644
--- a/engines/chewy/episode3.h
+++ b/engines/chewy/episode3.h
@@ -117,6 +117,7 @@ void r51_exit(int16 eib_nr);
 int16 r51_use_door(int16 txt_nr);
 void r51setup_func();
 int16 r51_cut_serv(int16 frame);
+void r51_timer_action(int16 t_nr, int16 obj_nr);
 
 void r52_entry();
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 43d9f0f2dd0..aaafca6954e 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -344,5 +344,6 @@ Stream *music_handle;
 int16 EndOfPool;
 Stream *speech_handle;
 byte *SpeechBuf[2];
+int timer_action_ctr;
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 7afd1da6a77..28e2de50b09 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -227,6 +227,7 @@ extern Stream *speech_handle;
 extern byte *SpeechBuf[2];
 extern int16 CurrentSong;
 extern bool savegameFlag;
+extern int timer_action_ctr;
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index de17b8c42ce..d24ffc64696 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -177,6 +177,7 @@ void var_init() {
 	SetUpScreenFunc = nullptr;
 	pfeil_delay = 0;
 	pfeil_ani = 0;
+	timer_action_ctr = 0;
 	flags.CursorStatus = true;
 	savegameFlag = false;
 }
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 81841c81648..7fddfa0cc7f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -115,47 +115,60 @@ void timer_action(int16 t_nr) {
 	int16 ok;
 	default_flag = false;
 	ani_nr = t_nr - room->room_timer.TimerStart;
-	switch (spieler.PersonRoomNr[P_CHEWY]) {
 
+	if (ailsnd->isSpeechActive())
+		return;
+
+	switch (spieler.PersonRoomNr[P_CHEWY]) {
 	case 0:
 		switch (ani_nr) {
 		case 1:
-			if (!flags.AutoAniPlay && !flags.AdsDialog) {
-				ok = false;
+			if (timer_action_ctr > 0) {
+				uhr->reset_timer(t_nr, 0);
+				--timer_action_ctr;
+			} else if (!is_chewy_busy()) {
+				if (!spieler.R0FueterLab)
+					timer_action_ctr = 2;
+
 				flags.AutoAniPlay = true;
 				if (!spieler.R0SchleimWurf) {
 					start_aad_wait(42, -1);
-					auto_move(BLITZ_POS, P_CHEWY);
-					set_person_spr(P_LEFT, P_CHEWY);
+					auto_move(5, 0);
+					set_person_spr(0, 0);
+
 					if (spieler.R0FueterLab < 3) {
-						start_spz(CH_TALK3, 255, 0, P_CHEWY);
-						start_aad_wait(43, -1);
-						++spieler.R0FueterLab;
+						start_spz(2, 255, false, 0);
+						if (spieler.R0FueterLab)
+							start_aad_wait(618, -1);
+						else
+							start_aad_wait(43, -1);
 					}
+
 					Room0::auge_ani();
-					ok = true;
-				} else {
-					if (!spieler.R0KissenWurf) {
-						start_aad_wait(42, -1);
-						start_spz(CH_TALK3, 255, 0, P_CHEWY);
-						if (spieler.R0FueterLab < 3) {
-							start_aad_wait(43, -1);
-							++spieler.R0FueterLab;
-						}
-						auto_move(FUETTER_POS, P_CHEWY);
-						set_person_pos(199 - CH_HOT_MOV_X,
-						               145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+				} else if (!spieler.R0KissenWurf) {
+					start_aad_wait(42, -1);
+					start_spz(2, 255, false, 0);
+
+					if (spieler.R0FueterLab < 3) {
+						start_aad_wait(43, -1);
+						++spieler.R0FueterLab;
 					}
+
+					auto_move(3, 0);
+					set_person_pos(191, 120, P_CHEWY, P_LEFT);
 				}
 
-				if (!spieler.R0KissenWurf) {
+				if (!spieler.R0KissenWurf)
 					Room0::fuett_ani();
-				}
 
 				uhr->reset_timer(t_nr, 0);
 				flags.AutoAniPlay = false;
 			}
 			break;
+
+		case 3:
+			break;
+
 		default:
 			default_flag = true;
 			break;
@@ -169,9 +182,10 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 12:
-		if (t_nr == timer_nr[0])
-			r12_init_bork();
-		else if (t_nr == timer_nr[1]) {
+		if (t_nr == timer_nr[0]) {
+			if (!is_chewy_busy())
+				r12_init_bork();
+		} else if (t_nr == timer_nr[1]) {
 			if (spieler.R12TransOn) {
 				spieler.R12TransOn = false;
 				start_aad_wait(30, -1);
@@ -184,6 +198,18 @@ void timer_action(int16 t_nr) {
 		case 0:
 			r14_eremit_feuer(t_nr, ani_nr);
 			break;
+		default:
+			break;
+		}
+		break;
+
+	case 17:
+		if (room->room_timer.ObjNr[ani_nr] == 2 ||
+				room->room_timer.ObjNr[ani_nr] == 3) {
+			if (spieler.R17EnergieOut)
+				uhr->reset_timer(t_nr, 0);
+			else
+				default_flag = true;
 		}
 		break;
 
@@ -207,7 +233,8 @@ void timer_action(int16 t_nr) {
 	case 40:
 		if (t_nr == timer_nr[0])
 			spieler.R40PoliceStart = true;
-		default_flag = true;
+		else
+			default_flag = true;
 		break;
 
 	case 48:
@@ -223,12 +250,18 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 50:
-		if (t_nr == timer_nr[0]) {
+		if (t_nr == timer_nr[0])
 			r50_calc_wasser();
-		}
 		default_flag = true;
 		break;
 
+	case 51:
+		if (spieler.flags32_5)
+			r51_timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
+		else
+			default_flag = true;
+		break;
+
 	case 56:
 		if (t_nr == timer_nr[0])
 			r56_start_flug();
@@ -237,20 +270,23 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 68:
-		if (t_nr == timer_nr[0]) {
+		if (t_nr == timer_nr[0])
 			r68_calc_diva();
-		}
-		default_flag = true;
+		else
+			default_flag = true;
 		break;
+
 	default:
 		default_flag = true;
 		break;
 
 	}
+
 	if (default_flag && flags.AutoAniPlay == false) {
 		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, 0);
 		uhr->reset_timer(t_nr, 0);
 	}
+
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 


Commit: 36b4b2c1b7d9896e6cfb071a84f331ce38712458
    https://github.com/scummvm/scummvm/commit/36b4b2c1b7d9896e6cfb071a84f331ce38712458
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: Implement Spieler synchronization for savegames

Changed paths:
  A engines/chewy/types.cpp
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/io_game.cpp
    engines/chewy/module.mk
    engines/chewy/ngstypes.h
    engines/chewy/objekt.cpp
    engines/chewy/objekt.h
    engines/chewy/r_event.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index c399d4cf4c9..a5e1535f5c9 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -110,8 +110,8 @@ int16 call_fileio(int16 palette, int16 mode) {
 	return (ret);
 }
 
-void save(void *h) {
-	Stream *handle = (Stream *)h;
+void save(Common::WriteStream *ws) {
+	Common::Serializer s(nullptr, ws);
 	int16 spr_nr;
 	int16 i;
 	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
@@ -120,30 +120,29 @@ void save(void *h) {
 		spieler.Y[i] = spieler_vector[i].Xypos[1];
 		spieler.Phase[i] = person_end_phase[i];
 	}
-	if (!(chewy_fwrite(&spieler, sizeof(Spieler), 1, handle))) {
+
+	if (!spieler.synchronize(s)) {
 		fcode = WRITEFEHLER;
 		modul = DATEI;
 	} else {
-		append_adsh(handle);
+		append_adsh(ws);
 		ERROR
 	}
 }
 
-void load(void *h) {
-	Stream *handle = (Stream *)h;
+void load(Common::SeekableReadStream *rs) {
 	exit_room(-1);
 
-	int16 i;
-	if (!(chewy_fread(&spieler, sizeof(Spieler), 1, handle))) {
+	Common::Serializer s(rs, nullptr);
+	if (!spieler.synchronize(s)) {
 		fcode = READFEHLER;
 		modul = DATEI;
 	} else {
 		flags.LoadGame = true;
-		split_adsh(handle);
+		split_adsh(rs);
 		ERROR
 
 		if (spieler.inv_cur == true && spieler.AkInvent != -1) {
-
 			menu_item = CUR_USE;
 		}
 
@@ -162,7 +161,7 @@ void load(void *h) {
 
 		set_speed();
 
-		for (i = 0; i < MAX_PERSON; i++) {
+		for (int i = 0; i < MAX_PERSON; i++) {
 			set_person_pos(spieler.X[i], spieler.Y[i], i, spieler.Phase[i]);
 		}
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 28e2de50b09..655c07e3e2d 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -331,11 +331,8 @@ void init_room();
 
 int16 call_fileio(int16 palette, int16 mode);
 
-// FIXME: was FILE*
-void save(void *handle);
-
-// FIXME: was FILE*
-void load(void *handle);
+void save(Common::WriteStream *ws);
+void load(Common::SeekableReadStream *in);
 
 // FIXME: was FILE*
 void append_adsh(void *shandle);
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index ab50095d449..a1569794568 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -607,7 +607,6 @@ int16 io_game::get_files(char *fname) {
 }
 
 void io_game::save(int16 y, int16 nr, char *fname) {
-
 	char str[4];
 	char path[80];
 	int16 abfrage = 0;
@@ -650,7 +649,7 @@ void io_game::save(int16 y, int16 nr, char *fname) {
 			chewy_fwrite(io->id, sizeof(io->id), 1, handle);
 			chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
 
-			(*io->save_funktion)(handle);
+			(*io->save_funktion)(dynamic_cast<Common::WriteStream *>(handle));
 			chewy_fclose(handle);
 		}
 	}
@@ -677,7 +676,7 @@ void io_game::load(int16 nr, char *fname) {
 		if (handle) {
 			chewy_fseek(handle, sizeof(io->id) + USER_NAME + 2, 0);
 
-			(*io->load_funktion)(handle);
+			(*io->load_funktion)(dynamic_cast<Common::SeekableReadStream *>(handle));
 			chewy_fclose(handle);
 		}
 	}
@@ -701,7 +700,6 @@ char *io_game::io_init(iog_init *iostruc) {
 }
 
 void io_game::save_entry(int16 nr, char *fname) {
-
 	char str[4];
 	char path[80];
 	int16 j;
@@ -719,7 +717,7 @@ void io_game::save_entry(int16 nr, char *fname) {
 		chewy_fwrite(io->id, sizeof(io->id), 1, handle);
 		chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
 
-		(*io->save_funktion)(handle);
+		(*io->save_funktion)(dynamic_cast<Common::WriteStream *>(handle));
 		chewy_fclose(handle);
 	}
 }
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 164bed3a9dc..78ce61c263d 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -46,6 +46,7 @@ MODULE_OBJS = \
 	temp_file.o \
 	text.o \
 	timer.o \
+	types.o \
 	video/cfo_decoder.o
 
 # This module can be built as a plugin
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 9dc223acba2..5a27e7a00e3 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -390,8 +390,8 @@ struct iog_init {
 	uint8 f3 = 0;
 	uint8 f4 = 0;
 	uint8 key_nr = 0;
-	void (*save_funktion)(void *handle) = nullptr; // FIXME - (Stream *handle);
-	void (*load_funktion)(void *handle) = nullptr; // FIXME - (Stream *handle);
+	void (*save_funktion)(Common::WriteStream *handle) = nullptr;
+	void (*load_funktion)(Common::SeekableReadStream *handle) = nullptr;
 	int16 delay = 0;
 };
 
diff --git a/engines/chewy/objekt.cpp b/engines/chewy/objekt.cpp
index 2c7de0a6a4d..b79c0ad6203 100644
--- a/engines/chewy/objekt.cpp
+++ b/engines/chewy/objekt.cpp
@@ -25,28 +25,32 @@
 namespace Chewy {
 
 bool RoomMovObjekt::load(Common::SeekableReadStream *src) {
-	RoomNr = src->readSint16LE();
-
-	X = src->readSint16LE();
-	Y = src->readSint16LE();
-	XOff = src->readByte();
-	YOff = src->readByte();
-	TxtNr = src->readSint16LE();
-	NeuObj = src->readSint16LE();
-	ActionObj = src->readSint16LE();
-	ZustandAk = src->readByte();
-	ZustandOff = src->readByte();
-	ZustandFlipFlop = src->readByte();
-	AutoMov = src->readByte();
-	AniFlag = src->readByte();
-	Del = src->readByte();
-	Attribut = src->readByte();
-	HeldHide = src->readByte();
-	ZEbene = src->readSint16LE();
-
+	Common::Serializer s(src, nullptr);
+	synchronize(s);
 	return true;
 }
 
+void RoomMovObjekt::synchronize(Common::Serializer &s) {	
+	s.syncAsSint16LE(RoomNr);
+
+	s.syncAsSint16LE(X);
+	s.syncAsSint16LE(Y);
+	s.syncAsByte(XOff);
+	s.syncAsByte(YOff);
+	s.syncAsSint16LE(TxtNr);
+	s.syncAsSint16LE(NeuObj);
+	s.syncAsSint16LE(ActionObj);
+	s.syncAsByte(ZustandAk);
+	s.syncAsByte(ZustandOff);
+	s.syncAsByte(ZustandFlipFlop);
+	s.syncAsByte(AutoMov);
+	s.syncAsByte(AniFlag);
+	s.syncAsByte(Del);
+	s.syncAsByte(Attribut);
+	s.syncAsByte(HeldHide);
+	s.syncAsSint16LE(ZEbene);
+}
+
 bool IibDateiHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	src->read(Tafname, 14);
@@ -56,27 +60,31 @@ bool IibDateiHeader::load(Common::SeekableReadStream *src) {
 }
 
 bool RoomStaticInventar::load(Common::SeekableReadStream *src) {
-	RoomNr = src->readSint16LE();
-	X = src->readSint16LE();
-	Y = src->readSint16LE();
-	XOff = src->readByte();
-	YOff = src->readByte();
-	InvNr = src->readSint16LE();
-	TxtNr = src->readSint16LE();
-	HideSib = src->readByte();
-	Dummy = src->readByte();
-	ZustandAk = src->readByte();
-	ZustandOff = src->readByte();
-	ZustandFlipFlop = src->readByte();
-	AutoMov = src->readByte();
-	AniFlag = src->readByte();
-	HeldHide = src->readByte();
-	StaticAk = src->readSint16LE();
-	StaticOff = src->readSint16LE();
-
+	Common::Serializer s(src, nullptr);
+	synchronize(s);
 	return true;
 }
 
+void RoomStaticInventar::synchronize(Common::Serializer &s) {
+	s.syncAsSint16LE(RoomNr);
+	s.syncAsSint16LE(X);
+	s.syncAsSint16LE(Y);
+	s.syncAsByte(XOff);
+	s.syncAsByte(YOff);
+	s.syncAsSint16LE(InvNr);
+	s.syncAsSint16LE(TxtNr);
+	s.syncAsByte(HideSib);
+	s.syncAsByte(Dummy);
+	s.syncAsByte(ZustandAk);
+	s.syncAsByte(ZustandOff);
+	s.syncAsByte(ZustandFlipFlop);
+	s.syncAsByte(AutoMov);
+	s.syncAsByte(AniFlag);
+	s.syncAsByte(HeldHide);
+	s.syncAsSint16LE(StaticAk);
+	s.syncAsSint16LE(StaticOff);
+}
+
 bool SibDateiHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	Anz = src->readUint16LE();
@@ -85,20 +93,24 @@ bool SibDateiHeader::load(Common::SeekableReadStream *src) {
 }
 
 bool RoomExit::load(Common::SeekableReadStream *src) {
-	RoomNr = src->readSint16LE();
-	X = src->readSint16LE();
-	Y = src->readSint16LE();
-	XOff = src->readByte();
-	YOff = src->readByte();
-	Exit = src->readSint16LE();
-	ExitMov = src->readByte();
-	AutoMov = src->readByte();
-	Attribut = src->readByte();
-	dummy = src->readByte();
-
+	Common::Serializer s(src, nullptr);
+	synchronize(s);
 	return true;
 }
 
+void RoomExit::synchronize(Common::Serializer &s) {
+	s.syncAsSint16LE(RoomNr);
+	s.syncAsSint16LE(X);
+	s.syncAsSint16LE(Y);
+	s.syncAsByte(XOff);
+	s.syncAsByte(YOff);
+	s.syncAsSint16LE(Exit);
+	s.syncAsByte(ExitMov);
+	s.syncAsByte(AutoMov);
+	s.syncAsByte(Attribut);
+	s.syncAsByte(dummy);
+}
+
 bool EibDateiHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	Anz = src->readSint16LE();
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index 0dd389db436..44972511cdf 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -23,6 +23,7 @@
 #ifndef CHEWY_OBJEKT_H
 #define CHEWY_OBJEKT_H
 
+#include "common/serializer.h"
 #include "common/stream.h"
 
 namespace Chewy {
@@ -47,6 +48,7 @@ struct RoomMovObjekt {
 	uint8 HeldHide;
 	int16 ZEbene;
 
+	void synchronize(Common::Serializer &s);
 	bool load(Common::SeekableReadStream *src);
 	static constexpr size_t SIZE() { return 24; }
 };
@@ -78,6 +80,7 @@ struct RoomStaticInventar {
 	int16 StaticAk;
 	int16 StaticOff;
 
+	void synchronize(Common::Serializer &s);
 	bool load(Common::SeekableReadStream *src);
 };
 
@@ -100,6 +103,7 @@ struct RoomExit {
 	uint8 Attribut;
 	uint8 dummy;
 
+	void synchronize(Common::Serializer &s);
 	bool load(Common::SeekableReadStream *src);
 };
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7fddfa0cc7f..3387a8189ae 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -112,7 +112,6 @@ void play_scene_ani(int16 nr, int16 mode) {
 void timer_action(int16 t_nr) {
 	int16 default_flag;
 	int16 ani_nr;
-	int16 ok;
 	default_flag = false;
 	ani_nr = t_nr - room->room_timer.TimerStart;
 
@@ -256,7 +255,7 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 51:
-		if (spieler.flags32_5)
+		if (spieler.flags32_10)
 			r51_timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
 		else
 			default_flag = true;
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
new file mode 100644
index 00000000000..2e6ad770aab
--- /dev/null
+++ b/engines/chewy/types.cpp
@@ -0,0 +1,143 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/types.h"
+
+namespace Chewy {
+
+static void syncArray(Common::Serializer &s, uint8 *arr, size_t count) {
+	for (size_t i = 0; i < count; ++i)
+		s.syncAsByte(arr[i]);
+}
+static void syncArray(Common::Serializer &s, int16 *arr, size_t count) {
+	for (size_t i = 0; i < count; ++i)
+		s.syncAsSint16LE(arr[i]);
+}
+
+bool Spieler::synchronize(Common::Serializer &s) {
+	// Sync the structure's bitflags
+	s.syncBytes((byte *)_flags, sizeof(SpielerFlags));
+
+	syncArray(s, Ats, ROOM_ATS_MAX * 3);
+	syncArray(s, InvAts, MAX_MOV_OBJ * 3);
+	syncArray(s, InvUse, INV_USE_ATS_MAX * 3);
+	syncArray(s, InvUseDef, 40 * 3);
+
+	s.syncAsSint16LE(MainMenuY);
+	s.syncAsSint16LE(InvDisp);
+	s.syncAsSint16LE(DispZx);
+	s.syncAsSint16LE(DispZy);
+	s.syncAsSint16LE(DispFlag);
+	s.syncAsSint16LE(InventY);
+	syncArray(s, InventSlot, MAX_MOV_OBJ);
+
+	s.syncAsSint16LE(AkInvent);
+	s.syncAsByte(inv_cur);
+	s.syncAsSint16LE(CurBreite);
+	s.syncAsSint16LE(CurHoehe);
+
+	for (int i = 0; i < MAX_MOV_OBJ; ++i)
+		room_m_obj[i].synchronize(s);
+	for (int i = 0; i < MAX_FEST_OBJ; ++i)
+		room_s_obj[i].synchronize(s);
+	for (int i = 0; i < MAX_EXIT; ++i)
+		room_e_obj[i].synchronize(s);
+
+	syncArray(s, X, MAX_PERSON);
+	syncArray(s, Y, MAX_PERSON);
+	syncArray(s, Phase, MAX_PERSON);
+	syncArray(s, PersonHide, MAX_PERSON);
+	syncArray(s, PersonRoomNr, MAX_PERSON);
+	syncArray(s, &ZoomXy[0][0], MAX_PERSON * 2);
+	s.syncAsSint16LE(ChewyAni);
+	syncArray(s, PersonGlobalDia, MAX_PERSON);
+	syncArray(s, PersonDia, MAX_PERSON);
+	syncArray(s, PersonDiaRoom, MAX_PERSON);
+	syncArray(s, PersonDiaTmpRoom, MAX_PERSON);
+
+	s.syncAsSint16LE(DiaAMov);
+	s.syncAsSint16LE(scrollx);
+	s.syncAsSint16LE(scrolly);
+	s.syncAsSint16LE(ScrollxStep);
+	s.syncAsSint16LE(ScrollyStep);
+	s.syncAsSint16LE(MausSpeed);
+	s.syncAsSint16LE(DelaySpeed);
+	s.syncAsSint16LE(AadDelay);
+	s.syncAsSint16LE(AadSilent);
+	s.syncAsByte(R0FueterLab);
+	s.syncAsByte(R6RaumBetreten);
+	s.syncAsByte(R6BolaJoke);
+	s.syncAsByte(R7BellCount);
+	s.syncAsByte(R11IdCardNr);
+	s.syncAsByte(R12BorkCount);
+	s.syncAsByte(R13MonitorStatus);
+	s.syncAsByte(R17Location);
+	s.syncAsSint16LE(R23GleiterExit);
+	syncArray(s, R24Hebel, 3);
+	syncArray(s, R24HebelDir, 3);
+	syncArray(s, R24KristallLast, 3);
+	s.syncAsByte(R25SurimyGo);
+	s.syncAsByte(R27HowardGed);
+	s.syncAsByte(R28PumpTxt1);
+	s.syncAsByte(R28PumpTxt);
+	s.syncAsByte(R31SurimyGo);
+	s.syncAsByte(R33SurimyGo);
+	s.syncAsByte(R33Munter[4]);
+	s.syncAsSint16LE(R39TvKanal);
+	s.syncAsByte(R39TvRecord);
+	s.syncAsByte(R39ClintNews);
+	s.syncAsByte(R40PoliceAniStatus);
+	s.syncAsByte(R41TrainCount);
+	s.syncAsByte(R47Schloss[3]);
+	syncArray(s, R48TaxiPerson, MAX_PERSON);
+	s.syncAsByte(R48Auswahl[5]);
+	s.syncAsByte(R49BoyAniCount);
+	s.syncAsByte(R51DoorCount);
+	s.syncAsByte(R54LiftCount);
+	s.syncAsByte(R54HowardVorne);
+	s.syncAsUint16LE(R55ExitDia);
+	s.syncAsSint16LE(R58TmpRoom);
+	s.syncAsSint16LE(R58TmpRoom1);
+	s.syncAsSint16LE(R58TmpSx);
+	s.syncAsSint16LE(R58TmpSy);
+	s.syncAsSint16LE(R58TmpX);
+	s.syncAsSint16LE(R58TmpY);
+	s.syncAsSint16LE(R64Moni1Ani);
+	s.syncAsSint16LE(R64Moni2Ani);
+	s.syncAsByte(mi[8]);
+	s.syncAsSint16LE(SVal1);
+	s.syncAsSint16LE(SVal2);
+	s.syncAsSint16LE(SVal3);
+	s.syncAsSint16LE(SVal4);
+	s.syncAsSint16LE(soundLoopMode);
+	s.syncAsByte(SoundSwitch);
+	s.syncAsByte(SoundVol);
+	s.syncAsByte(MusicSwitch);
+	s.syncAsByte(MusicVol);
+	s.syncAsByte(SpeechSwitch);
+	s.syncAsByte(FramesPerSecond);
+	s.syncAsByte(DisplayText);
+
+	return true;
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index ad2eaf99ad1..686b1e6145d 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -23,63 +23,14 @@
 #ifndef CHEWY_TYPES_H
 #define CHEWY_TYPES_H
 
+#include "common/serializer.h"
 #include "chewy/defines.h"
 #include "chewy/objekt.h"
 #include "chewy/detail.h"
 
 namespace Chewy {
 
-struct Spieler {
-	uint8 Ats[ROOM_ATS_MAX * 3];
-	uint8 InvAts[MAX_MOV_OBJ * 3];
-	uint8 InvUse[INV_USE_ATS_MAX * 3];
-	uint8 InvUseDef[40 * 3];
-
-	int16 MainMenuY;
-	int16 InvDisp;
-	int16 DispZx;
-	int16 DispZy;
-	int16 DispFlag;
-	int16 InventY;
-	int16 InventSlot[MAX_MOV_OBJ];
-
-	int16 AkInvent;
-	bool inv_cur;
-	int16 CurBreite;
-	int16 CurHoehe;
-
-	RoomMovObjekt room_m_obj[MAX_MOV_OBJ];
-	RoomStaticInventar room_s_obj[MAX_FEST_OBJ];
-	RoomExit room_e_obj[MAX_EXIT];
-
-	int16 X[MAX_PERSON];
-	int16 Y[MAX_PERSON];
-	int16 Phase[MAX_PERSON];
-	int16 PersonHide[MAX_PERSON];
-	int16 PersonRoomNr[MAX_PERSON];
-	int16 ZoomXy[MAX_PERSON][2];
-
-	int16 ChewyAni;
-
-	int16 PersonGlobalDia[MAX_PERSON];
-	int16 PersonDia[MAX_PERSON];
-
-	int16 PersonDiaRoom[MAX_PERSON];
-
-	int16 PersonDiaTmpRoom[MAX_PERSON];
-
-	int16 DiaAMov;
-
-	int16 scrollx;
-	int16 scrolly;
-	int16 ScrollxStep;
-	int16 ScrollyStep;
-
-	int16 MausSpeed;
-	int16 DelaySpeed;
-	int16 AadDelay;
-	int16 AadSilent;
-
+struct SpielerFlags {
 	byte R0SchleimWurf : 1;
 	byte R0KissenWurf : 1;
 	byte R0Monokel : 1;
@@ -180,11 +131,11 @@ struct Spieler {
 	byte R25GleiteLoesch : 1;
 
 	byte R25SurimyLauf : 1;
-	byte R25GleiterExit: 1;
+	byte R25GleiterExit : 1;
 	byte R27SurimyOk : 1;
 	byte R28SurimyCar : 1;
 	byte R28ChewyPump : 1;
-	byte R28Briefkasten: 1;
+	byte R28Briefkasten : 1;
 	byte R28EntryHaus : 1;
 	byte R28Manuskript : 1;
 
@@ -220,7 +171,7 @@ struct Spieler {
 	byte R37HundScham : 1;
 	byte R37Kloppe : 1;
 	byte R37Mes : 1;
-	byte R39TransMensch: 1;
+	byte R39TransMensch : 1;
 	byte R39TvOn : 1;
 	byte R39ScriptOk : 1;
 
@@ -230,7 +181,7 @@ struct Spieler {
 	byte R40TrainMove : 1;
 	byte R40TrainOk : 1;
 	byte R40Geld : 1;
-	byte R40PoliceStart: 1;
+	byte R40PoliceStart : 1;
 	byte R40PoliceWeg : 1;
 
 	byte R40PoliceAb : 1;
@@ -238,22 +189,22 @@ struct Spieler {
 	byte R40HoUse : 1;
 	byte R40HaendlerOk : 1;
 	byte R40DuengerMit : 1;
-	byte R40DuengerTele: 1;
+	byte R40DuengerTele : 1;
 	byte R41FirstTalk : 1;
 	byte R41LolaOk : 1;
 
 	byte R41Einbruch : 1;
 	byte R41BruchInfo : 1;
-	byte R41KuerbisInfo: 1;
+	byte R41KuerbisInfo : 1;
 	byte R41RepairInfo : 1;
-	byte R41HowardDiaOK: 1;
+	byte R41HowardDiaOK : 1;
 	byte R42FirstEntry : 1;
 	byte R42BriefOk : 1;
-	byte R42HoToBeamter: 1;
+	byte R42HoToBeamter : 1;
 
 	byte R42MarkeOk : 1;
 	byte R42BriefMarke : 1;
-	byte R42BeamterWach: 1;
+	byte R42BeamterWach : 1;
 	byte R43GetPgLady : 1;
 	byte R45TaxiOk : 1;
 	byte R45MagOk : 1;
@@ -288,7 +239,7 @@ struct Spieler {
 	byte R55Job : 1;
 
 	byte R55ScriptWeg : 1;
-	byte R55EscScriptOk: 1;
+	byte R55EscScriptOk : 1;
 	byte R55RaumOk : 1;
 	byte R55R54First : 1;
 	byte R56GetTabak : 1;
@@ -301,7 +252,7 @@ struct Spieler {
 	byte R62Flucht : 1;
 	byte R62FirstEntry : 1;
 	byte R62TShow : 1;
-	byte R62LauraVerwandlung: 1;
+	byte R62LauraVerwandlung : 1;
 	byte R63Feuer : 1;
 	byte R63FxMannWeg : 1;
 
@@ -356,6 +307,125 @@ struct Spieler {
 	byte flags31_8 : 1;
 	byte flags31_10 : 1;
 
+	// Further flags
+	uint8 flags32_1 : 1;
+	uint8 flags32_2 : 2;
+	uint8 flags32_4 : 3;
+	uint8 flags32_8 : 4;
+	uint8 flags32_10 : 5;
+	uint8 flags32_20 : 6;
+	uint8 flags32_40 : 7;
+	uint8 flags32_80 : 8;
+
+	uint8 flags33_1 : 1;
+	uint8 flags33_2 : 2;
+	uint8 flags33_4 : 3;
+	uint8 flags33_8 : 4;
+	uint8 flags33_10 : 5;
+	uint8 flags33_20 : 6;
+	uint8 flags33_40 : 7;
+	uint8 flags33_80 : 8;
+
+	uint8 flags34_1 : 1;
+	uint8 flags34_2 : 2;
+	uint8 flags34_4 : 3;
+	uint8 flags34_8 : 4;
+	uint8 flags34_10 : 5;
+	uint8 flags34_20 : 6;
+	uint8 flags34_40 : 7;
+	uint8 flags34_80 : 8;
+
+	uint8 flags35_1 : 1;
+	uint8 flags35_2 : 2;
+	uint8 flags35_4 : 3;
+	uint8 flags35_8 : 4;
+	uint8 flags35_10 : 5;
+	uint8 flags35_20 : 6;
+	uint8 flags35_40 : 7;
+	uint8 flags35_80 : 8;
+
+	uint8 flags36_1 : 1;
+	uint8 flags36_2 : 2;
+	uint8 flags36_4 : 3;
+	uint8 flags36_8 : 4;
+	uint8 flags36_10 : 5;
+	uint8 flags36_20 : 6;
+	uint8 flags36_40 : 7;
+	uint8 flags36_80 : 8;
+
+	uint8 flags37_1 : 1;
+	uint8 flags37_2 : 2;
+	uint8 flags37_4 : 3;
+	uint8 flags37_8 : 4;
+	uint8 flags37_10 : 5;
+	uint8 flags37_20 : 6;
+	uint8 flags37_40 : 7;
+	uint8 flags37_80 : 8;
+
+	uint8 flags38_1 : 1;
+	uint8 flags38_2 : 2;
+};
+
+struct Spieler : public SpielerFlags {
+	Spieler() : SpielerFlags(), _flags(this) {
+	}
+
+	/**
+	 * For loading or savign the structure data
+	 */
+	bool synchronize(Common::Serializer &s);
+
+	SpielerFlags *_flags;
+	uint8 Ats[ROOM_ATS_MAX * 3];
+	uint8 InvAts[MAX_MOV_OBJ * 3];
+	uint8 InvUse[INV_USE_ATS_MAX * 3];
+	uint8 InvUseDef[40 * 3];
+
+	int16 MainMenuY;
+	int16 InvDisp;
+	int16 DispZx;
+	int16 DispZy;
+	int16 DispFlag;
+	int16 InventY;
+	int16 InventSlot[MAX_MOV_OBJ];
+
+	int16 AkInvent;
+	bool inv_cur;
+	int16 CurBreite;
+	int16 CurHoehe;
+
+	RoomMovObjekt room_m_obj[MAX_MOV_OBJ];
+	RoomStaticInventar room_s_obj[MAX_FEST_OBJ];
+	RoomExit room_e_obj[MAX_EXIT];
+
+	int16 X[MAX_PERSON];
+	int16 Y[MAX_PERSON];
+	int16 Phase[MAX_PERSON];
+	int16 PersonHide[MAX_PERSON];
+	int16 PersonRoomNr[MAX_PERSON];
+	int16 ZoomXy[MAX_PERSON][2];
+
+	int16 ChewyAni;
+
+	int16 PersonGlobalDia[MAX_PERSON];
+	int16 PersonDia[MAX_PERSON];
+
+	int16 PersonDiaRoom[MAX_PERSON];
+
+	int16 PersonDiaTmpRoom[MAX_PERSON];
+
+	int16 DiaAMov;
+
+	int16 scrollx;
+	int16 scrolly;
+	int16 ScrollxStep;
+	int16 ScrollyStep;
+
+	int16 MausSpeed;
+	int16 DelaySpeed;
+	int16 AadDelay;
+	int16 AadSilent;
+
 	uint8 R0FueterLab;
 	uint8 R6RaumBetreten;
 	uint8 R6BolaJoke;
@@ -412,64 +482,6 @@ struct Spieler {
 
 	int16 R64Moni2Ani;
 
-	// Further flags
-	uint8 flags32_1 : 1;
-	uint8 flags32_2 : 2;
-	uint8 flags32_3 : 3;
-	uint8 flags32_4 : 4;
-	uint8 flags32_5 : 5;
-	uint8 flags32_6 : 6;
-	uint8 flags32_7 : 7;
-	uint8 flags32_8 : 8;
-
-	uint8 flags33_1 : 1;
-	uint8 flags33_2 : 2;
-	uint8 flags33_3 : 3;
-	uint8 flags33_4 : 4;
-	uint8 flags33_5 : 5;
-	uint8 flags33_6 : 6;
-	uint8 flags33_7 : 7;
-	uint8 flags33_8 : 8;
-
-	uint8 flags34_1 : 1;
-	uint8 flags34_2 : 2;
-	uint8 flags34_3 : 3;
-	uint8 flags34_4 : 4;
-	uint8 flags34_5 : 5;
-	uint8 flags34_6 : 6;
-	uint8 flags34_7 : 7;
-	uint8 flags34_8 : 8;
-
-	uint8 flags35_1 : 1;
-	uint8 flags35_2 : 2;
-	uint8 flags35_3 : 3;
-	uint8 flags35_4 : 4;
-	uint8 flags35_5 : 5;
-	uint8 flags35_6 : 6;
-	uint8 flags35_7 : 7;
-	uint8 flags35_8 : 8;
-
-	uint8 flags36_1 : 1;
-	uint8 flags36_2 : 2;
-	uint8 flags36_3 : 3;
-	uint8 flags36_4 : 4;
-	uint8 flags36_5 : 5;
-	uint8 flags36_6 : 6;
-	uint8 flags36_7 : 7;
-	uint8 flags36_8 : 8;
-
-	uint8 flags37_1 : 1;
-	uint8 flags37_2 : 2;
-	uint8 flags37_3 : 3;
-	uint8 flags37_4 : 4;
-	uint8 flags37_5 : 5;
-	uint8 flags37_6 : 6;
-	uint8 flags37_7 : 7;
-	uint8 flags37_8 : 8;
-
-	uint8 flags38_1 : 1;
-	uint8 flags38_2 : 2;
-
 	uint8 mi[8];
 	int16 SVal1;
 	int16 SVal2;


Commit: 264835e44a8e0cb627f484e3f92f10e3f9883250
    https://github.com/scummvm/scummvm/commit/264835e44a8e0cb627f484e3f92f10e3f9883250
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: Shifting saving/loading code into engine class

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index b77bbcc1661..22eb18780a5 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -84,4 +84,70 @@ Common::Error ChewyEngine::run() {
 	return Common::kNoError;
 }
 
+Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
+	exit_room(-1);
+
+	Common::Serializer s(stream, nullptr);
+	if (!spieler.synchronize(s)) {
+		fcode = READFEHLER;
+		modul = DATEI;
+	} else {
+		flags.LoadGame = true;
+		split_adsh(stream);
+		ERROR
+
+			if (spieler.inv_cur == true && spieler.AkInvent != -1) {
+				menu_item = CUR_USE;
+			}
+
+		if (spieler.AkInvent != -1)
+			spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
+		room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+		ERROR
+			load_chewy_taf(spieler.ChewyAni);
+
+		fx_blende = 1;
+		room->calc_invent(&room_blk, &spieler);
+
+		if (spieler.AkInvent != -1)
+			spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
+		obj->sort();
+
+		set_speed();
+
+		for (int i = 0; i < MAX_PERSON; i++) {
+			set_person_pos(spieler.X[i], spieler.Y[i], i, spieler.Phase[i]);
+		}
+
+		auto_obj = 0;
+
+		enter_room(-1);
+		flags.LoadGame = false;
+	}
+
+	return Common::kNoError;
+}
+
+Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAutosave) {
+	Common::Serializer s(nullptr, stream);
+	int16 spr_nr;
+	int16 i;
+	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+	for (i = 0; i < MAX_PERSON; i++) {
+		spieler.X[i] = spieler_vector[i].Xypos[0];
+		spieler.Y[i] = spieler_vector[i].Xypos[1];
+		spieler.Phase[i] = person_end_phase[i];
+	}
+
+	if (!spieler.synchronize(s)) {
+		fcode = WRITEFEHLER;
+		modul = DATEI;
+	} else {
+		append_adsh(stream);
+		ERROR
+	}
+
+	return Common::kNoError;
+}
+
 } // End of namespace Chewy
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 274c4e50e2e..e1b3c8c42d2 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -52,9 +52,11 @@ protected:
 	bool hasFeature(EngineFeature f) const override;
 
 	void initialize();
-	void shutdown();
+	void shutdown() {}
 
 public:
+	const ChewyGameDescription *_gameDescription;
+	Common::RandomSource _rnd;
 	TempFileArchive _tempFiles;
 	EventsManager *_events;
 	Sound *_sound;
@@ -63,13 +65,18 @@ public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
 	~ChewyEngine() override;
 
-	int getGameType() const;
 	uint32 getFeatures() const;
 	Common::Language getLanguage() const;
-	Common::Platform getPlatform() const;
 
-	const ChewyGameDescription *_gameDescription;
-	Common::RandomSource _rnd;
+	/**
+	 * Load savegame data
+	 */
+	Common::Error loadGameStream(Common::SeekableReadStream *stream) override;
+
+	/**
+	 * Save savegame data
+	 */
+	Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override;
 };
 
 extern ChewyEngine *g_engine;
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index a5e1535f5c9..4e8260ae339 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -110,68 +110,6 @@ int16 call_fileio(int16 palette, int16 mode) {
 	return (ret);
 }
 
-void save(Common::WriteStream *ws) {
-	Common::Serializer s(nullptr, ws);
-	int16 spr_nr;
-	int16 i;
-	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	for (i = 0; i < MAX_PERSON; i++) {
-		spieler.X[i] = spieler_vector[i].Xypos[0];
-		spieler.Y[i] = spieler_vector[i].Xypos[1];
-		spieler.Phase[i] = person_end_phase[i];
-	}
-
-	if (!spieler.synchronize(s)) {
-		fcode = WRITEFEHLER;
-		modul = DATEI;
-	} else {
-		append_adsh(ws);
-		ERROR
-	}
-}
-
-void load(Common::SeekableReadStream *rs) {
-	exit_room(-1);
-
-	Common::Serializer s(rs, nullptr);
-	if (!spieler.synchronize(s)) {
-		fcode = READFEHLER;
-		modul = DATEI;
-	} else {
-		flags.LoadGame = true;
-		split_adsh(rs);
-		ERROR
-
-		if (spieler.inv_cur == true && spieler.AkInvent != -1) {
-			menu_item = CUR_USE;
-		}
-
-		if (spieler.AkInvent != -1)
-			spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
-		room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
-		ERROR
-		load_chewy_taf(spieler.ChewyAni);
-
-		fx_blende = 1;
-		room->calc_invent(&room_blk, &spieler);
-
-		if (spieler.AkInvent != -1)
-			spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
-		obj->sort();
-
-		set_speed();
-
-		for (int i = 0; i < MAX_PERSON; i++) {
-			set_person_pos(spieler.X[i], spieler.Y[i], i, spieler.Phase[i]);
-		}
-
-		auto_obj = 0;
-
-		enter_room(-1);
-		flags.LoadGame = false;
-	}
-}
-
 void append_adsh(void *sh) {
 	Stream *shandle = (Stream *)sh;
 	atds->close_handle(ADH_DATEI);
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 655c07e3e2d..a65f2314cf0 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -331,9 +331,6 @@ void init_room();
 
 int16 call_fileio(int16 palette, int16 mode);
 
-void save(Common::WriteStream *ws);
-void load(Common::SeekableReadStream *in);
-
 // FIXME: was FILE*
 void append_adsh(void *shandle);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index d24ffc64696..ca354b53f37 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -83,8 +83,6 @@ void standard_init() {
 	iog = new io_game(out, in, cur);
 	strcpy(ioptr.id, "CHE\0");
 	strcpy(ioptr.save_path, SAVEDIR);
-	ioptr.save_funktion = &save;
-	ioptr.load_funktion = &load;
 	ioptr.delay = 8;
 	alloc_buffers();
 	pal [765] = 63;
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index a1569794568..930a73eaf60 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/system.h"
+#include "chewy/chewy.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/io_game.h"
@@ -606,79 +607,39 @@ int16 io_game::get_files(char *fname) {
 	return 0;
 }
 
-void io_game::save(int16 y, int16 nr, char *fname) {
-	char str[4];
-	char path[80];
-	int16 abfrage = 0;
-	int16 j;
-	Stream *handle;
-	if (nr + 1 < 10)
-		j = 2;
-	else
-		j = 1;
-	strcpy(str, "000");
-	itoa(nr + 1, str + j, 10);
-	strcpy(path, fname);
-	strcat(path, str);
+void io_game::save(int16 y, int16 slotNum, char *fname) {
 	cur->wait_taste_los(true);
 	in->alter_kb_handler();
 	cur->hide_cur();
 	out->pop_box
 	(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[1], io->m_col[0], io->m_col[4]);
-	// Eintrag löschen
-	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.\0", nr + 1);
-	if (file_find_g[nr][0] == 0) {
-		abfrage = out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[nr][1]);
+
+	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.\0", slotNum + 1);
+	if (file_find_g[slotNum][0] == 0) {
+		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
 	} else {
-		handle = chewy_fopen(path, "rb");
+		//handle = chewy_fopen(path, "rb");
 		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
-		chewy_fclose(handle);
-		abfrage = out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[nr][1]);
+		//chewy_fclose(handle);
+		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
 
 	}
 	in->neuer_kb_handler(kbinfo);
-	mark_eintrag(y, nr);
+	mark_eintrag(y, slotNum);
 	out->box_fill(io->popx + 167, io->popy + 70, io->popx + 244, io->popy + 100, io->m_col[5]);
 
 	cur->show_cur();
-	abfrage = 13;
-	if (abfrage == 13) {
-
-		handle = chewy_fopen(path, "wb+");
-		if (handle) {
-			chewy_fwrite(io->id, sizeof(io->id), 1, handle);
-			chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
 
-			(*io->save_funktion)(dynamic_cast<Common::WriteStream *>(handle));
-			chewy_fclose(handle);
-		}
-	}
+	Common::String desc(&file_find_g[slotNum][1]);
+	(void)g_engine->saveGameState(slotNum, desc);
 }
 
-void io_game::load(int16 nr, char *fname) {
-	Stream *handle;
-	char str[4];
-	char path[80];
-	int16 j;
+void io_game::load(int16 slotNum, char *fname) {
 	get_files(io->save_path);
 
 	cur->hide_cur();
-	if (file_find_g[nr][0] == 1) {
-		if (nr + 1 < 10)
-			j = 2;
-		else
-			j = 1;
-		strcpy(str, "000\0");
-		itoa(nr + 1, str + j, 10);
-		strcpy(path, fname);
-		strcat(path, str);
-		handle = chewy_fopen(path, "rb");
-		if (handle) {
-			chewy_fseek(handle, sizeof(io->id) + USER_NAME + 2, 0);
-
-			(*io->load_funktion)(dynamic_cast<Common::SeekableReadStream *>(handle));
-			chewy_fclose(handle);
-		}
+	if (file_find_g[slotNum][0] == 1) {
+		(void)g_engine->loadGameState(slotNum);
 	}
 }
 
@@ -699,27 +660,9 @@ char *io_game::io_init(iog_init *iostruc) {
 	return (&file_find_g[0][0]);
 }
 
-void io_game::save_entry(int16 nr, char *fname) {
-	char str[4];
-	char path[80];
-	int16 j;
-	Stream *handle;
-	if (nr + 1 < 10)
-		j = 2;
-	else
-		j = 1;
-	strcpy(str, "000");
-	itoa(nr + 1, str + j, 10);
-	strcpy(path, fname);
-	strcat(path, str);
-	handle = chewy_fopen(path, "wb+");
-	if (handle) {
-		chewy_fwrite(io->id, sizeof(io->id), 1, handle);
-		chewy_fwrite(&file_find_g[nr][1], USER_NAME + 2, 1, handle);
-
-		(*io->save_funktion)(dynamic_cast<Common::WriteStream *>(handle));
-		chewy_fclose(handle);
-	}
+void io_game::save_entry(int16 slotNum, char *fname) {
+	Common::String desc(&file_find_g[slotNum][1]);
+	g_engine->saveGameState(slotNum, desc);
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 5a27e7a00e3..253fa0adcd3 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -390,8 +390,6 @@ struct iog_init {
 	uint8 f3 = 0;
 	uint8 f4 = 0;
 	uint8 key_nr = 0;
-	void (*save_funktion)(Common::WriteStream *handle) = nullptr;
-	void (*load_funktion)(Common::SeekableReadStream *handle) = nullptr;
 	int16 delay = 0;
 };
 


Commit: c7a89d1c0a33efe3932d3638a19dfdcde90607e7
    https://github.com/scummvm/scummvm/commit/c7a89d1c0a33efe3932d3638a19dfdcde90607e7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: Only allow GMM saving/loading from main game loop

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/defines.h
    engines/chewy/global.h
    engines/chewy/main.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 22eb18780a5..b63f6e59c8b 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -37,10 +37,7 @@ Graphics::Screen *g_screen;
 ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 		: Engine(syst),
 		_gameDescription(gameDesc),
-		_rnd("chewy"),
-		_events(nullptr),
-		_screen(nullptr),
-		_sound(nullptr) {
+		_rnd("chewy") {
 
 	g_engine = this;
 	g_screen = nullptr;
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index e1b3c8c42d2..1c50331b086 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -49,6 +49,10 @@ class ChewyEngine : public Engine {
 protected:
 	// Engine APIs
 	Common::Error run() override;
+
+	/**
+	 * Returns engine features
+	 */
 	bool hasFeature(EngineFeature f) const override;
 
 	void initialize();
@@ -58,9 +62,10 @@ public:
 	const ChewyGameDescription *_gameDescription;
 	Common::RandomSource _rnd;
 	TempFileArchive _tempFiles;
-	EventsManager *_events;
-	Sound *_sound;
-	Graphics::Screen *_screen;
+	EventsManager *_events = nullptr;
+	Sound *_sound = nullptr;
+	Graphics::Screen *_screen = nullptr;
+	bool _canLoadSave = false;
 public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
 	~ChewyEngine() override;
@@ -68,6 +73,13 @@ public:
 	uint32 getFeatures() const;
 	Common::Language getLanguage() const;
 
+	bool canLoadGameStateCurrently() override {
+		return _canLoadSave;
+	}
+	bool canSaveGameStateCurrently() override {
+		return _canLoadSave;
+	}
+
 	/**
 	 * Load savegame data
 	 */
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index f277357e6e9..ae8db0393a1 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -43,9 +43,11 @@ namespace Chewy {
 #define SCREEN_WIDTH 320
 #define SCREEN_HEIGHT 200
 
-#define NO_SETUP 0
-
-#define DO_SETUP 1
+enum SetupScreenMode {
+	NO_SETUP = 0,
+	DO_SETUP = 1,
+	DO_MAIN_LOOP = 2
+};
 
 #define MIN_FAR_MEM 3000000
 #define MIN_LOW_MEM 100000
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index a65f2314cf0..9f780d08996 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -240,7 +240,7 @@ void free_buffers();
 
 int16 main_loop(int16 mode);
 
-void set_up_screen(int16 mode);
+void set_up_screen(SetupScreenMode mode);
 
 void kb_mov(int16 mode);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 57165989f44..889b6fdf49b 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -540,21 +540,25 @@ int16 main_loop(int16 mode) {
 	}
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	if (mode == DO_SETUP)
-		set_up_screen(DO_SETUP);
+		set_up_screen(DO_MAIN_LOOP);
 #ifdef DEMO
 	if (spieler.PersonRoomNr[P_CHEWY] > 24)
 		ende = 1;
 #endif
-	return (ende);
+	return ende;
 }
 
-void set_up_screen(int16 mode) {
+void set_up_screen(SetupScreenMode mode) {
 	int16 nr;
 	int16 tmp;
 	int16 i;
 	int16 *ScrXy;
 	int16 txt_nr;
 
+	bool isMainLoop = mode == DO_MAIN_LOOP;
+	if (isMainLoop)
+		mode = DO_SETUP;
+
 	if (flags.InitSound && spieler.SpeechSwitch)
 		ailsnd->serve_db_samples();
 	uhr->calc_timer();
@@ -716,7 +720,10 @@ void set_up_screen(int16 mode) {
 		            &spieler.scrollx, &spieler.scrolly);
 
 	g_screen->update();
+
+	g_engine->_canLoadSave = isMainLoop;
 	g_events->update();
+	g_engine->_canLoadSave = false;
 }
 
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {


Commit: b35bf9635d34f4ebbc2dc0ba949ccc4d446d5109
    https://github.com/scummvm/scummvm/commit/b35bf9635d34f4ebbc2dc0ba949ccc4d446d5109
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: ADSH footer isn't needed for ScummVM savegames

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/file.cpp
    engines/chewy/global.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index b63f6e59c8b..5f9c0c8634a 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -90,7 +90,6 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		modul = DATEI;
 	} else {
 		flags.LoadGame = true;
-		split_adsh(stream);
 		ERROR
 
 			if (spieler.inv_cur == true && spieler.AkInvent != -1) {
@@ -140,7 +139,6 @@ Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 		fcode = WRITEFEHLER;
 		modul = DATEI;
 	} else {
-		append_adsh(stream);
 		ERROR
 	}
 
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 4e8260ae339..52db2b94d73 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -110,40 +110,6 @@ int16 call_fileio(int16 palette, int16 mode) {
 	return (ret);
 }
 
-void append_adsh(void *sh) {
-	Stream *shandle = (Stream *)sh;
-	atds->close_handle(ADH_DATEI);
-	int16 ch;
-	Stream *handle = chewy_fopen(ADSH_TMP, "rb");
-	if (handle) {
-		while ((ch = chewy_fgetc(handle)) != EOF)
-			chewy_fputc(ch, shandle);
-		chewy_fclose(handle);
-		atds->open_handle(ADSH_TMP, "rb+", ADH_DATEI);
-		ERROR
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void split_adsh(void *sh) {
-	Stream *shandle = (Stream *)sh;
-	atds->close_handle(ADH_DATEI);
-	int16 ch;
-	Stream *handle = chewy_fopen(ADSH_TMP, "wb+");
-	if (handle) {
-		while ((ch = chewy_fgetc(shandle)) != EOF)
-			chewy_fputc(ch, handle);
-		chewy_fclose(handle);
-		atds->open_handle(ADSH_TMP, "rb+", ADH_DATEI);
-		ERROR
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
 int16 file_menue() {
 	int16 u_index;
 	int16 key = 0;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 9f780d08996..fe19a8edfd4 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -330,12 +330,6 @@ void init_atds();
 void init_room();
 
 int16 call_fileio(int16 palette, int16 mode);
-
-// FIXME: was FILE*
-void append_adsh(void *shandle);
-
-// FIXME: was FILE*
-void split_adsh(void *shandle);
 int16 file_menue();
 void option_menue(taf_info *ti);
 


Commit: 268d19618aa6732dccb1cf7c69cedbe184349697
    https://github.com/scummvm/scummvm/commit/268d19618aa6732dccb1cf7c69cedbe184349697
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:06-08:00

Commit Message:
CHEWY: Fixes for Spieler flags

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 5f9c0c8634a..1925794f8a4 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -88,19 +88,21 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 	if (!spieler.synchronize(s)) {
 		fcode = READFEHLER;
 		modul = DATEI;
+		return Common::kReadingFailed;
+
 	} else {
 		flags.LoadGame = true;
 		ERROR
 
-			if (spieler.inv_cur == true && spieler.AkInvent != -1) {
-				menu_item = CUR_USE;
-			}
+		if (spieler.inv_cur == true && spieler.AkInvent != -1) {
+			menu_item = CUR_USE;
+		}
 
 		if (spieler.AkInvent != -1)
 			spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
 		room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 		ERROR
-			load_chewy_taf(spieler.ChewyAni);
+		load_chewy_taf(spieler.ChewyAni);
 
 		fx_blende = 1;
 		room->calc_invent(&room_blk, &spieler);
@@ -119,9 +121,9 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 		enter_room(-1);
 		flags.LoadGame = false;
-	}
 
-	return Common::kNoError;
+		return Common::kNoError;
+	}
 }
 
 Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAutosave) {
@@ -135,14 +137,8 @@ Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 		spieler.Phase[i] = person_end_phase[i];
 	}
 
-	if (!spieler.synchronize(s)) {
-		fcode = WRITEFEHLER;
-		modul = DATEI;
-	} else {
-		ERROR
-	}
-
-	return Common::kNoError;
+	return spieler.synchronize(s) ? Common::kNoError :
+		Common::kWritingFailed;
 }
 
 } // End of namespace Chewy
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 2e6ad770aab..40398c5f1db 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -33,9 +33,14 @@ static void syncArray(Common::Serializer &s, int16 *arr, size_t count) {
 		s.syncAsSint16LE(arr[i]);
 }
 
+#define SPIELER_FLAGS_SIZE 38
+
 bool Spieler::synchronize(Common::Serializer &s) {
+	if (sizeof(SpielerFlags) != SPIELER_FLAGS_SIZE)
+		error("Invalid flags structure size");
+
 	// Sync the structure's bitflags
-	s.syncBytes((byte *)_flags, sizeof(SpielerFlags));
+	s.syncBytes((byte *)_flags, SPIELER_FLAGS_SIZE);
 
 	syncArray(s, Ats, ROOM_ATS_MAX * 3);
 	syncArray(s, InvAts, MAX_MOV_OBJ * 3);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 686b1e6145d..08f5273601e 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -30,6 +30,8 @@
 
 namespace Chewy {
 
+#include "common/pack-start.h"	// START STRUCT PACKING
+
 struct SpielerFlags {
 	byte R0SchleimWurf : 1;
 	byte R0KissenWurf : 1;
@@ -306,65 +308,68 @@ struct SpielerFlags {
 	byte flags31_4 : 1;
 	byte flags31_8 : 1;
 	byte flags31_10 : 1;
+	byte flags31_unused : 3;
 
 	// Further flags
 	uint8 flags32_1 : 1;
-	uint8 flags32_2 : 2;
-	uint8 flags32_4 : 3;
-	uint8 flags32_8 : 4;
-	uint8 flags32_10 : 5;
-	uint8 flags32_20 : 6;
-	uint8 flags32_40 : 7;
-	uint8 flags32_80 : 8;
+	uint8 flags32_2 : 1;
+	uint8 flags32_4 : 1;
+	uint8 flags32_8 : 1;
+	uint8 flags32_10 : 1;
+	uint8 flags32_20 : 1;
+	uint8 flags32_40 : 1;
+	uint8 flags32_80 : 1;
 
 	uint8 flags33_1 : 1;
-	uint8 flags33_2 : 2;
-	uint8 flags33_4 : 3;
-	uint8 flags33_8 : 4;
-	uint8 flags33_10 : 5;
-	uint8 flags33_20 : 6;
-	uint8 flags33_40 : 7;
-	uint8 flags33_80 : 8;
+	uint8 flags33_2 : 1;
+	uint8 flags33_4 : 1;
+	uint8 flags33_8 : 1;
+	uint8 flags33_10 : 1;
+	uint8 flags33_20 : 1;
+	uint8 flags33_40 : 1;
+	uint8 flags33_80 : 1;
 
 	uint8 flags34_1 : 1;
-	uint8 flags34_2 : 2;
-	uint8 flags34_4 : 3;
-	uint8 flags34_8 : 4;
-	uint8 flags34_10 : 5;
-	uint8 flags34_20 : 6;
-	uint8 flags34_40 : 7;
-	uint8 flags34_80 : 8;
+	uint8 flags34_2 : 1;
+	uint8 flags34_4 : 1;
+	uint8 flags34_8 : 1;
+	uint8 flags34_10 : 1;
+	uint8 flags34_20 : 1;
+	uint8 flags34_40 : 1;
+	uint8 flags34_80 : 1;
 
 	uint8 flags35_1 : 1;
-	uint8 flags35_2 : 2;
-	uint8 flags35_4 : 3;
-	uint8 flags35_8 : 4;
-	uint8 flags35_10 : 5;
-	uint8 flags35_20 : 6;
-	uint8 flags35_40 : 7;
-	uint8 flags35_80 : 8;
+	uint8 flags35_2 : 1;
+	uint8 flags35_4 : 1;
+	uint8 flags35_8 : 1;
+	uint8 flags35_10 : 1;
+	uint8 flags35_20 : 1;
+	uint8 flags35_40 : 1;
+	uint8 flags35_80 : 1;
 
 	uint8 flags36_1 : 1;
-	uint8 flags36_2 : 2;
-	uint8 flags36_4 : 3;
-	uint8 flags36_8 : 4;
-	uint8 flags36_10 : 5;
-	uint8 flags36_20 : 6;
-	uint8 flags36_40 : 7;
-	uint8 flags36_80 : 8;
+	uint8 flags36_2 : 1;
+	uint8 flags36_4 : 1;
+	uint8 flags36_8 : 1;
+	uint8 flags36_10 : 1;
+	uint8 flags36_20 : 1;
+	uint8 flags36_40 : 1;
+	uint8 flags36_80 : 1;
 
 	uint8 flags37_1 : 1;
-	uint8 flags37_2 : 2;
-	uint8 flags37_4 : 3;
-	uint8 flags37_8 : 4;
-	uint8 flags37_10 : 5;
-	uint8 flags37_20 : 6;
-	uint8 flags37_40 : 7;
-	uint8 flags37_80 : 8;
+	uint8 flags37_2 : 1;
+	uint8 flags37_4 : 1;
+	uint8 flags37_8 : 1;
+	uint8 flags37_10 : 1;
+	uint8 flags37_20 : 1;
+	uint8 flags37_40 : 1;
+	uint8 flags37_80 : 1;
 
 	uint8 flags38_1 : 1;
-	uint8 flags38_2 : 2;
-};
+	uint8 flags38_2 : 1;
+	uint8 flags38_unused : 6;
+} PACKED_STRUCT;
+#include "common/pack-end.h"	// END STRUCT PACKING
 
 struct Spieler : public SpielerFlags {
 	Spieler() : SpielerFlags(), _flags(this) {


Commit: ea96f96b4c52bb6f29de1a8435f715b625ad13c7
    https://github.com/scummvm/scummvm/commit/ea96f96b4c52bb6f29de1a8435f715b625ad13c7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Add missing set_display call

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index ca354b53f37..8c48338e114 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -33,22 +33,22 @@ extern int16 room_start_nr;
 static void font_load();
 
 void standard_init() {
-	mem = new memory;
-	out = new mcga_grafik;
-	err = new fehler;
-	in = new maus;
-	fx = new effect;
-	txt = new text;
-	bit = new bitclass;
+	mem = new memory();
+	out = new mcga_grafik();
+	err = new fehler();
+	in = new maus();
+	fx = new effect();
+	txt = new text();
+	bit = new bitclass();
 	ged = new gedclass(&ged_user_func);
-	room = new Room;
+	room = new Room();
 	obj = new objekt(&spieler);
 	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
-	det = new detail;
-	atds = new atdsys;
-	ailsnd = new ailclass;
-	flc = new flic;
-	mov = new movclass;
+	det = new detail();
+	atds = new atdsys();
+	ailsnd = new ailclass();
+	flc = new flic();
+	mov = new movclass();
 
 	out->vsync_start();
 	out->init();
@@ -479,7 +479,7 @@ void sound_init() {
 			EndOfPool = Nph.PoolAnz - 1;
 		}
 		ERROR
-		
+
 		speech_handle = chewy_fopen(SPEECH_TVP, "rb");
 		if (!speech_handle) {
 			modul = DATEI;
@@ -488,6 +488,9 @@ void sound_init() {
 		} else {
 			ailsnd->init_double_buffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
 			atds->set_speech_handle(speech_handle);
+
+			atds->set_display(DISPLAY_VOC);
+			spieler.DisplayText = false;
 		}
 
 		if (!modul) {


Commit: de9a09740c031bec772b90317e6b1b1a21fac01d
    https://github.com/scummvm/scummvm/commit/de9a09740c031bec772b90317e6b1b1a21fac01d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Hooking up speech playback

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index b65f6d1c9e3..c82fa383252 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -20,6 +20,9 @@
  *
  */
 
+#include "audio/audiostream.h"
+#include "audio/decoders/raw.h"
+#include "audio/decoders/voc.h"
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
 #include "chewy/file.h"
@@ -164,6 +167,30 @@ uint32 DbufferLen [8] = {0};
 uint32 DbSampleLen [8] = {0};
 Stream *DbufferHandles [8] = {0};
 
+ailScummVM::ailScummVM() {
+	_mixer = g_engine->_mixer;
+}
+
+void ailScummVM::playSpeech(Common::SeekableReadStream *src) {
+	Audio::AudioStream *audioStream =
+		Audio::makeVOCStream(src, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
+		&_speechHandle, audioStream);
+}
+
+bool ailScummVM::isSpeechActive() const {
+	return _mixer->isSoundHandleActive(_speechHandle);
+}
+
+void ailScummVM::waitForSpeechToFinish() {
+	if (flags.InitSound && spieler.SpeechSwitch) {
+		while (isSpeechActive() && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+	}
+}
+
+
 ailclass::ailclass() {
 #if 0
 	int16 i;
@@ -589,63 +616,16 @@ void ailclass::init_double_buffer(byte *b1, byte *b2, uint32 len, int16 kanal) {
 }
 
 void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
-	warning("STUB: ailclass::start_db_voc()");
+	Common::SeekableReadStream *src = dynamic_cast<Common::SeekableReadStream *>(v);
+	assert(src);
 
-#if 0
-	byte *vptr = 0;
-	byte blockt;
-	byte freq = 0;
-	dword blocklen;
-	uint16 RealFrq;
-	kanal &= 3;
-	kanal += 4;
-	vol = (vol << 1) & 127;
-	if ((SoundEnable) && (DbufferLen[kanal] != 0) && (voc != 0) &&
-	        (Dbuffer[kanal][0] != 0) && (Dbuffer[kanal][1] != 0)) {
-		memset(Dbuffer[kanal][0], 0, DbufferLen[kanal]);
-		memset(Dbuffer[kanal][1], 0, DbufferLen[kanal]);
-		do {
-			blockt = chewy_fgetc(voc);
-			if (blockt > 7)
-				blockt = 8;
-			blocklen = (uint32) chewy_fgetc(voc);
-			blocklen += ((uint32)chewy_fgetc(voc)) << 8;
-			blocklen += ((uint32)chewy_fgetc(voc)) << 16;
-			if (blockt != 1)
-				chewy_fseek(voc, blocklen, SEEK_CUR);
-		} while ((blockt != 1) && (blockt != 0));
-		if ((blockt == 1) && (!modul)) {
-			freq = chewy_fgetc(voc);
-			RealFrq = 1000000 / (256 - freq);
-			if (blocklen > DbufferLen[kanal]) {
-				DbufferHandles[kanal] = voc;
-				DbSampleLen[kanal] = blocklen;
-				AIL_init_sample(smp[kanal]);
-				AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
-				AIL_set_sample_playback_rate(smp[kanal], RealFrq);
-				AIL_set_sample_volume(smp[kanal], vol);
-				AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
-				AIL_load_sample_buffer(smp[kanal], 0, Dbuffer[kanal][0],
-				                       DbufferLen[kanal]);
-			} else {
-				DbSampleLen[kanal] = 0;
-				if (!chewy_fread(Dbuffer[kanal][0], blocklen, 1, voc)) {
-					modul = DATEI;
-					fcode = READFEHLER;
-				}
-				if (!modul) {
-					AIL_init_sample(smp[kanal]);
-					AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
-					AIL_set_sample_address(smp[kanal], Dbuffer[kanal][0], blocklen);
-					AIL_set_sample_playback_rate(smp[kanal], RealFrq);
-					AIL_set_sample_volume(smp[kanal], vol);
-					AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
-					AIL_start_sample(smp[kanal]);
-				}
-			}
-		}
-	}
-#endif
+	src->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+	ChunkHead ch;
+	if (!ch.load(src))
+		::error("Error loading speech");
+
+	Common::SeekableReadStream *rs = src->readStream(ch.size);
+	playSpeech(rs);
 }
 
 void ailclass::serve_db_samples() {
@@ -912,17 +892,4 @@ void ailclass::switch_sound(bool onOff) {
 		SoundSwitch = onOff;
 }
 
-bool ailclass::isSpeechActive() const {
-	// TODO: Implement properly
-	return true;
-}
-
-void ailclass::waitForSpeechToFinish() {
-	if (flags.InitSound && spieler.SpeechSwitch) {
-		while (isSpeechActive() && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-	}
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 688b0cf775b..5f4c6dfc521 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -23,6 +23,7 @@
 #ifndef CHEWY_AILCLASS_H
 #define CHEWY_AILCLASS_H
 
+#include "audio/mixer.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -32,7 +33,24 @@ void check_sample_end();
 void DecodePatternLine();
 void DecodeChannel(int16 ch);
 
-class ailclass {
+class ailScummVM {
+private:
+	Audio::Mixer *_mixer;
+	Audio::SoundHandle _speechHandle;
+public:
+	ailScummVM();
+
+	/**
+	 * Plays the speech from the passed stream, and frees
+	 * it afterwards
+	 */
+	void playSpeech(Common::SeekableReadStream *src);
+
+	bool isSpeechActive() const;
+	void waitForSpeechToFinish();
+};
+
+class ailclass : public ailScummVM {
 public:
 	ailclass();
 	~ailclass();
@@ -81,8 +99,6 @@ public:
 	void serve_db_samples();
 	void switch_music(bool onOff);
 	void switch_sound(bool onOff);
-	bool isSpeechActive() const;
-	void waitForSpeechToFinish();
 private:
 };
 


Commit: 9d8a35cdc0e428e8ae155211ed6a403c1ec04431
    https://github.com/scummvm/scummvm/commit/9d8a35cdc0e428e8ae155211ed6a403c1ec04431
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Further VOC playback implementation

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index c82fa383252..762ecaa4a50 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -171,15 +171,16 @@ ailScummVM::ailScummVM() {
 	_mixer = g_engine->_mixer;
 }
 
-void ailScummVM::playSpeech(Common::SeekableReadStream *src) {
+void ailScummVM::playSpeech(int channel, Common::SeekableReadStream *src) {
 	Audio::AudioStream *audioStream =
 		Audio::makeVOCStream(src, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
 	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
-		&_speechHandle, audioStream);
+		&_soundHandles[channel & 1], audioStream);
 }
 
-bool ailScummVM::isSpeechActive() const {
-	return _mixer->isSoundHandleActive(_speechHandle);
+bool ailScummVM::isSpeechActive(int channel) const {
+	return _mixer->isSoundHandleActive(
+		_soundHandles[channel & 1]);
 }
 
 void ailScummVM::waitForSpeechToFinish() {
@@ -625,7 +626,7 @@ void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
 		::error("Error loading speech");
 
 	Common::SeekableReadStream *rs = src->readStream(ch.size);
-	playSpeech(rs);
+	playSpeech(kanal, rs);
 }
 
 void ailclass::serve_db_samples() {
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 5f4c6dfc521..5270371789f 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -36,17 +36,25 @@ void DecodeChannel(int16 ch);
 class ailScummVM {
 private:
 	Audio::Mixer *_mixer;
-	Audio::SoundHandle _speechHandle;
+	Audio::SoundHandle _soundHandles[2];
 public:
 	ailScummVM();
 
 	/**
-	 * Plays the speech from the passed stream, and frees
-	 * it afterwards
+	 * Plays a VOC file from the passed stream, and takes
+	 * responsibility for freeing it when done
 	 */
-	void playSpeech(Common::SeekableReadStream *src);
+	void playSpeech(int channel, Common::SeekableReadStream *src);
 
-	bool isSpeechActive() const;
+	/**
+	 * Returns true if one of the two speech channels are
+	 * currently playing
+	 */
+	bool isSpeechActive(int channel = 0) const;
+
+	/**
+	 * Helper method to wait until any playing speech is finished
+	 */
 	void waitForSpeechToFinish();
 };
 


Commit: 7e81b864149c03e5c3674619a1c6828582beb5e5
    https://github.com/scummvm/scummvm/commit/7e81b864149c03e5c3674619a1c6828582beb5e5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Timer methods cleanup

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 817fe79030b..5c24c1cb0d2 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -121,7 +121,7 @@ void load_chewy_taf(int16 taf_nr) {
 
 void Room0::entry() {
 	if (is_cur_inventar(0) || spieler.R0KissenWurf ||
-		obj->check_inventar(0))
+			obj->check_inventar(0))
 		det->hide_static_spr(6);
 
 	set_person_pos(150, 100, 0, 1);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 4a497651672..9cef7f62670 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -137,28 +137,25 @@ void Room::set_timer_start(int16 timer_start) {
 
 void Room::add_timer_new_room() {
 	ani_detail_info *adi;
-	int16 i;
 	room_timer.TimerAnz = 0;
 
-	for (i = 0; i < MAXDETAILS && room_timer.TimerAnz < MAX_ROOM_TIMER; i++) {
+	for (int i = 0; i < MAXDETAILS && room_timer.TimerAnz < MAX_ROOM_TIMER; i++) {
 		adi = det->get_ani_detail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
-		}
-		else if (adi->start_flag) {
+		} else if (adi->start_flag || adi->repeat) {
 			det->start_detail(i, 0, ANI_VOR);
 		}
 	}
 }
 
 void Room::del_timer_old_room() {
-	int16 i;
-	for (i = 0; i < room_timer.TimerAnz; i++) {
+	for (int i = 0; i < room_timer.TimerAnz; i++) {
 		uhr->set_status(room_timer.TimerNr[i], TIMER_STOP);
 
 	}
-	room_timer.TimerAnz = 0;
 
+	room_timer.TimerAnz = 0;
 }
 
 int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
@@ -172,12 +169,12 @@ int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 		room_timer.TimerNr[room_timer.TimerAnz] = timer_nr_;
 		++room_timer.TimerAnz;
 	}
-	return (timer_nr_);
+
+	return timer_nr_;
 }
 
 void Room::set_timer_status(int16 ani_nr, int16 status) {
-	int16 i;
-	for (i = 0; i < room_timer.TimerAnz; i++) {
+	for (int i = 0; i < room_timer.TimerAnz; i++) {
 		if (room_timer.ObjNr[i] == ani_nr) {
 			uhr->set_status(room_timer.TimerNr[i], status);
 		}


Commit: 056a4768755c3ec97dddff8232ac0e7103a8611e
    https://github.com/scummvm/scummvm/commit/056a4768755c3ec97dddff8232ac0e7103a8611e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Add missing if check to Room0::entry

Changed paths:
    engines/chewy/episode1.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 5c24c1cb0d2..a4cbc0df661 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -124,18 +124,20 @@ void Room0::entry() {
 			obj->check_inventar(0))
 		det->hide_static_spr(6);
 
-	set_person_pos(150, 100, 0, 1);
-	cur_hide_flag = 0;
-	hide_cur();
-	timer_nr[0] = room->set_timer(255, 3);
+	if (!flags.LoadGame) {
+		set_person_pos(150, 100, 0, 1);
+		cur_hide_flag = 0;
+		hide_cur();
+		timer_nr[0] = room->set_timer(255, 3);
 
-	while (!ani_timer[timer_nr[0]].TimeFlag && !SHOULD_QUIT) {
-		set_up_screen(DO_SETUP);
-	}
+		while (!ani_timer[timer_nr[0]].TimeFlag && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
 
-	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-	start_aad_wait(2, -1);
-	show_cur();
+		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(2, -1);
+		show_cur();
+	}
 }
 
 bool Room0::action1() {


Commit: 21867e4b86988a8a53d6a01c070d957ef1169653
    https://github.com/scummvm/scummvm/commit/21867e4b86988a8a53d6a01c070d957ef1169653
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/ch_icm.cpp
    engines/chewy/datei.cpp
    engines/chewy/detail.cpp
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/episode4.cpp
    engines/chewy/file.cpp
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/maus.cpp
    engines/chewy/mcga_grafik.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/movclass.cpp
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/text.cpp
    engines/chewy/timer.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 762ecaa4a50..6ac3773fd53 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -253,13 +253,14 @@ int16 ailclass::init(uint16 freq) {
 		RealVoices = i;
 		SoundCard = SOUNDBLASTER;
 	}
-	return (SoundCard);
+
+	return SoundCard;
 #endif
 	return SOUNDBLASTER;
 }
 
 int16 ailclass::init(char *midi_drv_name) {
-	return (SoundCard);
+	return SoundCard;
 }
 
 void ailclass::exit1() {
@@ -463,7 +464,7 @@ void ailclass::get_channel_info(channel_info *ch, int16 kanal) {
 }
 
 int16 ailclass::music_playing() {
-	return (MusicStatus);
+	return MusicStatus;
 }
 
 int16 ailclass::get_sample_status(int16 kanal) {
@@ -474,7 +475,7 @@ int16 ailclass::get_sample_status(int16 kanal) {
 	kanal &= 3;
 	kanal += 4;
 	ret = AIL_sample_status(smp[kanal]);
-	return (ret);
+	return ret;
 #endif
 	return 0;
 }
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 28199eaf617..76932bda056 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -118,7 +118,7 @@ int16 atdsys::get_delay(int16 txt_len) {
 		txt_len = max_len;
 
 	ret = *atdsv.Delay * (txt_len + z_len);
-	return (ret);
+	return ret;
 }
 
 SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
@@ -246,7 +246,8 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 		ssret.Y = ssi_->Y + (ssi_->Zeilen - ssret.Anz) * ssi_->FHoehe;
 	else
 		ssret.Y = ssi_->Y;
-	return (&ssret);
+
+	return &ssret;
 }
 
 void atdsys::str_null2leer(char *str_start, char *str_end) {
@@ -289,7 +290,8 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 		fcode = OPENFEHLER;
 		err->set_user_msg(fname_);
 	}
-	return (handle);
+
+	return handle;
 }
 
 void atdsys::set_speech_handle(Stream *stream) {
@@ -394,7 +396,8 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	if (size) {
 		tmp_adr = (char *)calloc(size + 3l, 1);
 	}
-	return (tmp_adr);
+
+	return tmp_adr;
 }
 
 void atdsys::load_atds(int16 chunk_nr, int16 mode) {
@@ -542,7 +545,8 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 			atsv.Display = false;
 	} else
 		atsv.Display = false;
-	return (atsv.Display);
+
+	return atsv.Display;
 }
 
 void atdsys::stop_ats() {
@@ -550,7 +554,7 @@ void atdsys::stop_ats() {
 }
 
 int16 atdsys::ats_get_status() {
-	return (atsv.Display);
+	return atsv.Display;
 }
 
 void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
@@ -709,14 +713,15 @@ int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 	lo_hi[1] = status >> 4;
 	lo_hi[0] = status &= 15;
-	return ((int16)lo_hi[ak_nybble]);
+
+	return (int16)lo_hi[ak_nybble];
 }
 
 int16 atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	int16 ret;
 	set_ats_mem(mode);
 	ret = bit->is_bit(ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
-	return (ret);
+	return ret;
 }
 
 void atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
@@ -748,7 +753,8 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 
 	if (ende == 2)
 		str_ = 0;
-	return (str_);
+
+	return str_;
 }
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
@@ -1068,7 +1074,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 }
 
 int16 atdsys::aad_get_status() {
-	return (aadv.StrNr);
+	return aadv.StrNr;
 }
 
 int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
@@ -1082,7 +1088,8 @@ int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
 			++zeilen;
 	}
 	*txt_len = (str_ - ptr) - 1;
-	return (zeilen);
+
+	return zeilen;
 }
 
 void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
@@ -1149,7 +1156,7 @@ bool  atdsys::ads_start(int16 dia_nr) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void atdsys::stop_ads() {
@@ -1159,7 +1166,7 @@ void atdsys::stop_ads() {
 }
 
 int16 atdsys::ads_get_status() {
-	return (adsv.Dialog);
+	return adsv.Dialog;
 }
 
 int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
@@ -1174,7 +1181,7 @@ int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
 			ret = true;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
@@ -1202,7 +1209,8 @@ char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 			}
 		}
 	}
-	return (e_ptr);
+
+	return e_ptr;
 }
 
 AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
@@ -1221,7 +1229,8 @@ AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 			}
 		}
 	}
-	return (&adsnb);
+
+	return &adsnb;
 }
 
 AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
@@ -1253,7 +1262,8 @@ AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
 	}
 	ads_stack[ads_stack_ptr] = adsnb.BlkNr;
 	++ads_stack_ptr;
-	return (&adsnb);
+
+	return &adsnb;
 }
 
 int16 atdsys::return_block(AdsBlock *ab) {
@@ -1274,7 +1284,7 @@ int16 atdsys::return_block(AdsBlock *ab) {
 			--ads_stack_ptr;
 	}
 	++ads_stack_ptr;
-	return (ret);
+	return ret;
 }
 
 void atdsys::ads_search_block(int16 blk_nr, char **ptr) {
@@ -1339,7 +1349,8 @@ int16 atdsys::start_ads_auto_dia(char *item_adr) {
 	} else {
 		aadv.Dialog = false;
 	}
-	return (aadv.Dialog);
+
+	return aadv.Dialog;
 }
 
 void atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
@@ -1400,7 +1411,8 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 			}
 		}
 	}
-	return (txt_nr);
+
+	return txt_nr;
 }
 
 int16 atdsys::get_stereo_pos(int16 x) {
@@ -1410,7 +1422,7 @@ int16 atdsys::get_stereo_pos(int16 x) {
 	if ((fx_ - ((float)((int16)fx_))) > 0.5)
 		fx_ += 1.0;
 
-	return ((int16)fx_);
+	return (int16)fx_;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index a3432110396..1f16bd8edb4 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -1090,7 +1090,7 @@ int16 ja_nein() {
 
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void save_iib(char *fname) {
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index a73a2900722..4b1f9ba5f5a 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -696,7 +696,8 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 			modul = DATEI;
 		}
 	}
-	return (s);
+
+	return s;
 }
 
 uint32 datei::load_voc(Stream *handle, byte *speicher) {
@@ -817,7 +818,8 @@ uint32 datei::load_item(Stream *handle, byte *speicher) {
 			}
 		}
 	}
-	return (ch->size);
+
+	return ch->size;
 }
 
 uint32 datei::load_tmf(const char *fname, tmf_header *th) {
@@ -1779,7 +1781,7 @@ int16 datei::get_filename(const char *fname, int16 maxlen) {
 	if (z == 27)
 		ret = 0;
 #endif
-	return (ret);
+	return ret;
 }
 
 void datei::respfad(char *respath, char *resdir) {
@@ -1871,7 +1873,8 @@ int16 datei::get_id(char *id_code) {
 		id = TAFDATEI;
 	if (!(scumm_strnicmp(id_code, "TFF", 3)))
 		id = TFFDATEI;
-	return (id);
+
+	return id;
 }
 
 void datei::fcopy(const char *d_fname, const char *s_fname) {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 25d30095ee5..4e61a9656c4 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -583,7 +583,7 @@ byte *detail::get_static_image(int16 det_nr) {
 		ret = 0;
 	else
 		ret = rdi.dptr->image[index];
-	return(ret);
+	return ret;
 }
 
 void detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
@@ -621,19 +621,19 @@ void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 byte *detail::get_image(int16 spr_nr) {
 	byte *ret;
 	ret = rdi.dptr->image[spr_nr];
-	return(ret);
+	return ret;
 }
 
 ani_detail_info *detail::get_ani_detail(int16 ani_nr) {
 	ani_detail_info *ret;
 	ret = &rdi.Ainfo[ani_nr];
-	return(ret);
+	return ret;
 }
 
 int16 *detail::get_korrektur_tbl() {
 	int16 *ret;
 	ret = rdi.dptr->korrektur;
-	return(ret);
+	return ret;
 }
 
 void detail::init_taf(taf_info *dptr) {
@@ -643,11 +643,11 @@ void detail::init_taf(taf_info *dptr) {
 taf_info *detail::get_taf_info() {
 	taf_info *ret;
 	ret = rdi.dptr;
-	return(ret);
+	return ret;
 }
 
 room_detail_info *detail::get_room_detail_info() {
-	return(&rdi);
+	return &rdi;
 }
 
 void detail::freeze_ani() {
@@ -844,7 +844,8 @@ int16 detail::maus_vector(int16 x, int16 y) {
 				i = j / 4;
 		}
 	}
-	return (i);
+
+	return i;
 }
 
 int16 detail::get_ani_status(int16 det_nr) {
@@ -853,7 +854,7 @@ int16 detail::get_ani_status(int16 det_nr) {
 		ret = 1;
 	else
 		ret = 0;
-	return(ret);
+	return ret;
 }
 
 SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
@@ -900,7 +901,7 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
 		}
 	}
 
-	return (spr_info);
+	return spr_info;
 }
 
 void detail::set_global_delay(int16 delay) {
@@ -1208,7 +1209,8 @@ int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y,
 			}
 		}
 	}
-	return (detail_nr);
+
+	return detail_nr;
 }
 
 void detail::set_taf_ani_mem(byte *load_area) {
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index a4cbc0df661..5c44c00489a 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -875,7 +875,8 @@ int16 r4_sonde_comp() {
 	ERROR
 	fx_blende = 1;
 	atds->stop_aad();
-	return (cur_x);
+
+	return cur_x;
 }
 
 void switch_room(int16 nr) {
@@ -1812,7 +1813,8 @@ int16 r11_scanner() {
 			}
 		}
 	}
-	return (action_flag);
+
+	return action_flag;
 }
 
 void r11_get_card() {
@@ -2018,7 +2020,8 @@ int16 r12_use_terminal() {
 		else
 			start_aad(114, 0);
 	}
-	return (action_flag);
+
+	return action_flag;
 }
 
 int16 r12_use_linke_rohr() {
@@ -2034,7 +2037,7 @@ int16 r12_use_linke_rohr() {
 			atds->set_ats_str(117, TXT_MARK_LOOK, 0, ATS_DATEI);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r12_chewy_trans() {
@@ -2052,7 +2055,7 @@ int16 r12_chewy_trans() {
 			flags.AutoAniPlay = false;
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r13_entry() {
@@ -2232,7 +2235,7 @@ int16 r13_monitor_knopf() {
 			det->show_static_spr(11 - spieler.R13MonitorStatus);
 		atds->set_ats_str(96, TXT_MARK_LOOK, spieler.R13MonitorStatus, ATS_DATEI);
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r14_entry() {
@@ -2278,7 +2281,7 @@ int16 r14_use_schrott() {
 			invent_2_slot(BWAFFE_INV);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r14_use_gleiter() {
@@ -2298,7 +2301,7 @@ int16 r14_use_gleiter() {
 			r23_cockpit();
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r14_talk_eremit() {
@@ -2330,7 +2333,7 @@ int16 r14_use_schleim() {
 
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r14_feuer() {
@@ -2397,7 +2400,7 @@ int16 r16_use_gleiter() {
 		spieler.R23GleiterExit = 16;
 		r23_cockpit();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r17_entry() {
@@ -2465,7 +2468,7 @@ int16 r17_use_seil() {
 			}
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r17_plot_seil() {
@@ -2617,7 +2620,7 @@ int16 r17_energie_hebel() {
 			det->play_sound(15, 0);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r17_get_oel() {
@@ -2639,7 +2642,7 @@ int16 r17_get_oel() {
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
-	return (action_flag);
+	return action_flag;
 }
 
 int16 bork_spr [5] = {15, 16, 17, 24, 25};
@@ -2758,7 +2761,7 @@ int16 r18_sonden_moni() {
 			det->hide_static_spr(i + 10);
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r18_surimy_phasen[4][2] = {
@@ -2884,7 +2887,7 @@ int16 r18_calc_surimy() {
 
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r18_calc_schalter() {
@@ -2895,7 +2898,7 @@ int16 r18_calc_schalter() {
 
 		r18_monitor();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 short r18_use_cart_moni() {
@@ -2924,7 +2927,7 @@ short r18_use_cart_moni() {
 			}
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r18_go_cyberspace() {
@@ -2935,7 +2938,7 @@ int16 r18_go_cyberspace() {
 		cur_2_inventory();
 		switch_room(24);
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r19_entry() {
@@ -3179,7 +3182,7 @@ int16 r21_use_fenster() {
 			flags.AutoAniPlay = false;
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r22_entry() {
@@ -3206,7 +3209,7 @@ int16 r22_chewy_amboss() {
 		atds->set_ats_str(79, 1, ATS_DATEI);
 		flags.AutoAniPlay = false;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 #define R22_BORK_OBJ 0
@@ -3322,7 +3325,7 @@ int16 r22_malen() {
 		obj->calc_all_static_detail();
 		flags.AutoAniPlay = false;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r23_cockpit() {
@@ -3396,7 +3399,7 @@ int16 r23_start_gleiter() {
 			}
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r23_use_cartridge() {
@@ -3561,21 +3564,24 @@ int16 r6_cut_serv1(int16 frame) {
 	atds->print_aad(spieler.scrollx, spieler.scrolly);
 	if (frame == 44)
 		start_aad(108, 0);
-	return (0);
+
+	return 0;
 }
 
 int16 r6_cut_serv2(int16 frame) {
 	atds->print_aad(spieler.scrollx, spieler.scrolly);
 	if (frame == 31)
 		start_aad(107, 0);
-	return (0);
+
+	return 0;
 }
 
 int16 r12_cut_serv(int16 frame) {
 	atds->print_aad(spieler.scrollx, spieler.scrolly);
 	if (frame == 43)
 		start_aad(106, 0);
-	return (0);
+
+	return 0;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index f6ca4dfd067..379b2ac336f 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -101,7 +101,7 @@ int16 r25_gleiter_loesch() {
 			start_aad_wait(253, -1);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r25_use_gleiter() {
@@ -112,7 +112,7 @@ int16 r25_use_gleiter() {
 		spieler.R23GleiterExit = 25;
 		r23_cockpit();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 #define SURIMY_OBJ 0
@@ -476,7 +476,7 @@ int16 r28_use_breifkasten() {
 		invent_2_slot(MANUSKRIPT_INV);
 		spieler.R28Manuskript = true;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r28_cut_serv(int16 frame) {
@@ -485,7 +485,7 @@ int16 r28_cut_serv(int16 frame) {
 	} else {
 		det->plot_static_details(0, 0, 7, 7);
 	}
-	return (0);
+	return 0;
 }
 
 int16 r28_cut_serv2(int16 frame) {
@@ -496,7 +496,7 @@ int16 r28_cut_serv2(int16 frame) {
 			det->plot_static_details(0, 0, 7, 7);
 		}
 	}
-	return (0);
+	return 0;
 }
 
 void r29_entry() {
@@ -531,7 +531,7 @@ int16 r29_use_pumpe() {
 		} else if (!spieler.inv_cur)
 			start_aad_wait(62, -1);
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r29_get_schlauch() {
@@ -542,7 +542,7 @@ int16 r29_get_schlauch() {
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		new_invent_2_cur(PUMPE_INV);
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r29_use_schlauch() {
@@ -595,7 +595,7 @@ int16 r29_zaun_sprung() {
 		switch_room(37);
 		spieler.PersonHide[P_CHEWY] = false;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 #define SURIMY_OBJ 0
@@ -746,7 +746,7 @@ int16 r31_use_topf() {
 		action_flag = true;
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r32_entry() {
@@ -805,7 +805,7 @@ int16 r32_use_howard() {
 		action_flag = true;
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r32_use_schreibmaschine() {
@@ -879,7 +879,7 @@ int16 r32_get_script() {
 			start_aad_wait(91, -1);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r33_entry() {
@@ -941,7 +941,7 @@ int16 r33_use_schublade() {
 			invent_2_slot(MESSER_INV);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r33_use_maschine() {
@@ -1033,7 +1033,7 @@ int16 r33_calc_muntermacher() {
 		if (spieler.R33Munter[i] == false)
 			ret = false;
 	}
-	return (ret);
+	return ret;
 }
 
 int16 r33_get_munter() {
@@ -1051,7 +1051,7 @@ int16 r33_get_munter() {
 			start_aad_wait(72, -1);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r34_use_kuehlschrank() {
@@ -1106,7 +1106,7 @@ int16 r35_schublade() {
 		}
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r35_use_cat() {
@@ -1145,7 +1145,7 @@ int16 r35_use_cat() {
 		start_aad_wait(95, -1);
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r35_talk_cat() {
@@ -1232,7 +1232,7 @@ short r37_use_wippe() {
 			start_aad_wait(160, -1);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r37_cut_serv1(int16 frame) {
@@ -1253,7 +1253,7 @@ int16 r37_cut_serv1(int16 frame) {
 
 	det->plot_static_details(spieler.scrollx, spieler.scrolly, 7, 7);
 	det->plot_static_details(spieler.scrollx, spieler.scrolly, 14, 14);
-	return (0);
+	return 0;
 }
 
 int16 r37_cut_serv2(int16 frame) {
@@ -1263,7 +1263,7 @@ int16 r37_cut_serv2(int16 frame) {
 	det->show_static_spr(10);
 	for (i = 0; i < 4; i++)
 		det->plot_static_details(spieler.scrollx, spieler.scrolly, static_nr[i], static_nr[i]);
-	return (0);
+	return 0;
 }
 
 int16 r37_use_glas() {
@@ -1298,7 +1298,7 @@ int16 r37_use_glas() {
 			auto_move(4, P_CHEWY);
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r37_dog_bell() {
@@ -1515,7 +1515,7 @@ short r39_use_howard() {
 		}
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r39_talk_howard() {
@@ -1650,7 +1650,7 @@ int16 r39_use_tv() {
 		action_flag = true;
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r39_look_tv(int16 cls_mode) {
@@ -1966,7 +1966,8 @@ int16 r40_use_mr_pumpkin() {
 		}
 	}
 	show_cur();
-	return (action_ret);
+
+	return action_ret;
 }
 
 int16 r40_use_schalter(int16 aad_nr) {
@@ -2004,7 +2005,7 @@ int16 r40_use_schalter(int16 aad_nr) {
 			show_cur();
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r40_talk_police() {
@@ -2086,7 +2087,7 @@ int16 r40_use_haendler() {
 		spieler.R40HoUse = false;
 		flags.MausLinks = false;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r40_use_bmeister() {
@@ -2115,7 +2116,7 @@ int16 r40_use_bmeister() {
 
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r40_bmeister_dia(int16 aad_nr) {
@@ -2222,7 +2223,7 @@ int16 r40_use_tele() {
 				show_cur();
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r41_entry() {
@@ -2346,7 +2347,7 @@ int16 r41_use_kasse() {
 		start_aad_wait(133, -1);
 		r41_start_hoggy();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r41_use_lola() {
@@ -2366,7 +2367,7 @@ int16 r41_use_lola() {
 			show_cur();
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r41_use_brief() {
@@ -2390,7 +2391,7 @@ int16 r41_use_brief() {
 		spieler.R28PostCar = true;
 		spieler.R42BriefOk = true;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r41_sub_dia() {
@@ -2504,7 +2505,7 @@ int16 r42_use_psack() {
 		action_flag = true;
 		start_aad_wait(182, -1);
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r42_use_beamter() {
@@ -2522,7 +2523,7 @@ int16 r42_use_beamter() {
 		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 		flags.MausLinks = false;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r42_talk_beamter() {
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 40233efb361..45741ccd1b4 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -213,7 +213,7 @@ int16 r45_use_taxi() {
 	}
 
 	show_cur();
-	return (action_ret);
+	return action_ret;
 }
 
 void r45_talk_taxi(int16 aad_nr) {
@@ -268,7 +268,7 @@ int16 r45_use_boy() {
 	} else
 		start_aad_wait(259, -1);
 	show_cur();
-	return (action_ret);
+	return action_ret;
 }
 
 void r45_talk_boy() {
@@ -400,7 +400,7 @@ int16 r46_use_schloss() {
 		} else
 			start_aad_wait(252, -1);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r47_entry() {
@@ -445,7 +445,7 @@ int16 r47_use_knopf(int16 txt_nr) {
 		else
 			spieler.R47SchlossOk = false;
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r47_set_detail() {
@@ -715,7 +715,7 @@ int16 r49_use_boy() {
 		spieler.R49BoyWeg = true;
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r49_talk_boy() {
@@ -774,7 +774,7 @@ int16 r49_use_taxi() {
 		start_detail_wait(5, 1, ANI_VOR);
 		switch_room(48);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r49setup_func() {
@@ -899,7 +899,7 @@ int16 r50_use_gutschein() {
 		} else
 			start_aad_wait(276, -1);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r50_use_gum() {
@@ -944,7 +944,7 @@ int16 r50_use_gum() {
 		spieler.room_e_obj[84].Attribut = AUSGANG_OBEN;
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r50_talk_page() {
@@ -1170,12 +1170,12 @@ int16 r51_use_door(int16 txt_nr) {
 		}
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r51_cut_serv(int16 frame) {
 	det->plot_static_details(0, 0, 16, 16);
-	return (0);
+	return 0;
 }
 
 void r51_timer_action(int16 t_nr, int16 obj_nr) {
@@ -1245,7 +1245,7 @@ int16 r52_use_hot_dog() {
 		spieler.R52KakerWeg = true;
 	}
 	show_cur();
-	return (action_ret);
+	return action_ret;
 }
 
 void r52_plot_armee(int16 frame) {
@@ -1333,7 +1333,7 @@ int16 r53_use_man() {
 		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r54_entry(int16 eib_nr) {
@@ -1477,7 +1477,7 @@ int16 r54_use_schalter() {
 			start_aad_wait(297, -1);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r54_talk_verkauf() {
@@ -1551,12 +1551,12 @@ int16 r54_use_zelle() {
 		start_aad_wait(319, -1);
 	}
 	show_cur();
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r54_cut_serv(int16 frame) {
 	det->plot_static_details(176, 0, 9, 9);
-	return (0);
+	return 0;
 }
 
 int16 r54_use_azug() {
@@ -1597,7 +1597,7 @@ int16 r54_use_azug() {
 			start_aad_wait(314, -1);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r54_aufzug_ab() {
@@ -1650,7 +1650,7 @@ short r54_use_taxi() {
 		spieler.PersonHide[P_CHEWY] = true;
 		switch_room(48);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r55_entry() {
@@ -1757,7 +1757,7 @@ int16 r55_use_stapel1() {
 		} else
 			start_aad_wait(326, -1);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r55_use_stapel2() {
@@ -1766,7 +1766,7 @@ int16 r55_use_stapel2() {
 		action_ret = true;
 		start_aad_wait(327, -1);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r55_use_telefon() {
@@ -1843,7 +1843,7 @@ int16 r55_use_telefon() {
 			start_aad_wait(328, -1);
 		}
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r55_get_job() {
@@ -1955,13 +1955,13 @@ int16 r55_use_kammeraus() {
 			}
 		}
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r55_cut_serv(int16 frame) {
 	if (frame < 10)
 		det->plot_static_details(136, 0, 10, 10);
-	return (0);
+	return 0;
 }
 
 void r55_setup_func() {
@@ -2121,7 +2121,7 @@ int16 r56_use_taxi() {
 		show_cur();
 		switch_room(48);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r56_talk_man() {
@@ -2164,7 +2164,7 @@ int16 r56_use_man() {
 		det->set_static_ani(0, -1);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r56_use_kneipe() {
@@ -2210,7 +2210,7 @@ int16 r56_use_kneipe() {
 			show_cur();
 		}
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r56_start_flug() {
@@ -2351,7 +2351,7 @@ int16 r57_use_taxi() {
 		start_detail_wait(5, 1, ANI_VOR);
 		switch_room(48);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r57_use_pfoertner() {
@@ -2390,7 +2390,7 @@ int16 r57_use_pfoertner() {
 	show_cur();
 	room->set_timer_status(1, TIMER_START);
 	det->set_static_ani(1, -1);
-	return (action_ret);
+	return action_ret;
 }
 
 void r57_talk_pfoertner() {
@@ -2558,7 +2558,7 @@ int16 r62_use_laura() {
 		spieler.R62LauraVerwandlung = true;
 		switch_room(63);
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r63_entry() {
@@ -2736,7 +2736,7 @@ int16 r63_use_fx_man() {
 		atds->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r63_use_schalter() {
@@ -2770,7 +2770,7 @@ int16 r63_use_schalter() {
 			show_cur();
 		}
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r63_talk_girl() {
@@ -2810,7 +2810,7 @@ int16 r63_use_girl() {
 		start_aad_wait(367, -1);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 int16 r63_use_aschenbecher() {
@@ -2849,7 +2849,7 @@ int16 r63_use_aschenbecher() {
 			start_aad_wait(366, -1);
 		show_cur();
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void r64_entry() {
@@ -2888,7 +2888,7 @@ int16 r64_cut_sev(int16 frame) {
 	                spieler_vector[P_CHEWY].Xzoom,
 	                spieler_vector[P_CHEWY].Yzoom,
 	                scr_width);
-	return (0);
+	return 0;
 }
 
 void r64_chewy_entry() {
@@ -2994,7 +2994,7 @@ int16 r64_use_tasche() {
 		}
 	}
 	show_cur();
-	return (action_ret);
+	return action_ret;
 }
 
 void r65_entry() {
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index ce83c257ca1..2c1261b69ea 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -111,7 +111,7 @@ int16 r67_use_grammo() {
 		det->stop_detail(0);
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r67_look_brief() {
@@ -142,7 +142,7 @@ int16 r67_use_kommode() {
 		}
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r67_kostuem_aad(int16 aad_nr) {
@@ -197,7 +197,7 @@ int16 r67_talk_papagei() {
 			show_cur();
 		}
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r68_entry() {
@@ -343,7 +343,7 @@ int16 r68_use_indigo() {
 		start_aad_wait(393, -1);
 	}
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r68_talk_keeper() {
@@ -382,7 +382,7 @@ int16 r68_use_papagei() {
 		atds->set_ats_str(407, 1, ATS_DATEI);
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void r68_calc_diva() {
@@ -428,7 +428,7 @@ int16 r68_use_keeper() {
 		new_invent_2_cur(B_MARY_INV);
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 int16 r68_use_diva() {
@@ -458,7 +458,7 @@ int16 r68_use_diva() {
 	} else
 		action_flag = r68_use_papagei();
 	show_cur();
-	return (action_flag);
+	return action_flag;
 }
 
 void r68_kostuem_aad(int16 aad_nr) {
@@ -591,7 +591,7 @@ int16 r69_use_bruecke() {
 		}
 		show_cur();
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 52db2b94d73..32048b9882b 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -107,7 +107,7 @@ int16 call_fileio(int16 palette, int16 mode) {
 	ret = iog->io_menu(&ioptr);
 	cur->show_cur();
 	curblk.no_back = true;
-	return (ret);
+	return ret;
 }
 
 int16 file_menue() {
@@ -372,7 +372,7 @@ int16 file_menue() {
 	                        ged_mem[room_blk.AkAblage]);
 	check_shad(u_index, 1);
 
-	return (ret);
+	return ret;
 }
 
 int16 option_icons[9 * 4] = { 18, 61, 40, 76,
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 930a73eaf60..1e654aec751 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -434,7 +434,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	}
 	cur->wait_taste_los(true);
 	cur->hide_cur();
-	return (ret);
+	return ret;
 }
 
 void io_game::mark_eintrag(int16 y, int16 nr) {
@@ -602,7 +602,7 @@ int16 io_game::get_files(char *fname) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 #endif
 	return 0;
 }
@@ -657,7 +657,8 @@ char *io_game::io_init(iog_init *iostruc) {
 	for (i = 0; i < 20; i++)
 		file_find_g[i][0] = 0;
 	get_files(io->save_path);
-	return (&file_find_g[0][0]);
+
+	return &file_find_g[0][0];
 }
 
 void io_game::save_entry(int16 slotNum, char *fname) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 889b6fdf49b..ed9ef3f0cd9 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1320,7 +1320,8 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			flags.ChAutoMov = false;
 		}
 	}
-	return (move_status);
+
+	return move_status;
 }
 
 void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
@@ -1374,7 +1375,7 @@ int16 get_ani_richtung(int16 zustand) {
 		break;
 
 	}
-	return (ret);
+	return ret;
 }
 
 int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
@@ -1505,7 +1506,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 				ret = -1;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 int16 is_mouse_person(int16 x, int16 y) {
@@ -1550,7 +1551,8 @@ int16 is_mouse_person(int16 x, int16 y) {
 			}
 		}
 	}
-	return(is_person);
+
+	return is_person;
 }
 
 void calc_mouse_person(int16 x, int16 y) {
@@ -1675,7 +1677,8 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 			*auto_nr = i;
 		}
 	}
-	return(txt_nr);
+
+	return txt_nr;
 }
 
 void calc_ani_timer() {
@@ -1754,7 +1757,7 @@ bool is_cur_inventar(int16 nr) {
 	if (spieler.AkInvent == nr && spieler.inv_cur)
 		ret = true;
 
-	return(ret);
+	return ret;
 }
 
 void check_mouse_ausgang(int16 x, int16 y) {
@@ -2028,7 +2031,8 @@ int16 random(int16 start, int16 end) {
 		r_val += end;
 	else
 		r_val += start;
-	return (r_val);
+
+	return r_val;
 }
 #endif
 
@@ -2050,7 +2054,7 @@ int16 is_chewy_busy() {
 			}
 		}
 	}
-	return(ret);
+	return ret;
 }
 
 
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 9ccf4997575..7ff80cdf59e 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -94,7 +94,8 @@ int16 maus::maus_vector(int16 x, int16 y, int16 *tbl,
 		        (y >= tbl[j + 1]) && (y <= tbl[j + 3]))
 			i = j / 4;
 	}
-	return (i);
+
+	return i;
 }
 
 void maus::neuer_kb_handler(kb_info *key) {
@@ -125,7 +126,8 @@ void maus::neuer_maushandler(maus_info *mpos) {
 in_zeiger *maus::get_in_zeiger() {
 	inzeig.minfo = maus_info_blk;
 	inzeig.kbinfo = kb_info_blk;
-	return (&inzeig);
+
+	return &inzeig;
 }
 
 int16 maus::get_switch_code() {
@@ -149,7 +151,8 @@ int16 maus::get_switch_code() {
 		switch_code = (int16)hot_key;
 		hot_key = 0;
 	}
-	return (switch_code);
+
+	return switch_code;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index ecb98c3e10b..dd6f2aa36fe 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -352,7 +352,8 @@ void mcga_grafik::punkt(int16 xpos, int16 ypos, int16 farbn) {
 uint8 mcga_grafik::get_pixel(int16 xpos, int16 ypos) {
 	uint8 pix;
 	pix = getpix(xpos, ypos);
-	return (pix);
+
+	return pix;
 }
 
 void mcga_grafik::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
@@ -933,7 +934,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	}
 	if (svga == ON)
 		upd_scr();
-	return (ret);
+	return ret;
 }
 
 void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
@@ -1491,7 +1492,8 @@ int16 mcga_grafik::devices() {
 		else
 			i = 0;
 	}
-	return (i);
+
+	return i;
 }
 
 int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
@@ -1510,7 +1512,8 @@ int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 		k = 0;
 	}
 	*pos = k;
-	return (diff);
+
+	return diff;
 }
 
 void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
@@ -1687,7 +1690,7 @@ int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
 		}
 	}
 #endif
-	return (error);
+	return error;
 }
 
 void mcga_grafik::ltoa(long N, char *str, int base) {
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 2ab8ba87607..3271010791c 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -168,7 +168,8 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 		modul = DATEI;
 		fcode = READFEHLER;
 	}
-	return (ts_info);
+
+	return ts_info;
 }
 
 void memory::tff_adr(const char *filename, byte **speicher) {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 058b9dd8bc5..79d9a5182c9 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -626,7 +626,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		cur->plot_cur();
 		out->back2screen(workpage);
 	}
-	return (ret);
+	return ret;
 }
 
 void look_invent_screen(int16 txt_mode, int16 txt_nr) {
@@ -724,7 +724,8 @@ int16 calc_use_invent(int16 inv_nr) {
 
 		}
 	}
-	return (benutzt);
+
+	return benutzt;
 }
 
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
@@ -1029,7 +1030,8 @@ int16 del_invent_slot(int16 nr) {
 				ok = i;
 		}
 	}
-	return (ok);
+
+	return ok;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index c5f681ec82c..693847dddcb 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -189,7 +189,7 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void movclass::stop_auto_go() {
@@ -202,7 +202,7 @@ void movclass::continue_auto_go() {
 }
 
 bool movclass::auto_go_status() {
-	return (agv.AutoGo);
+	return agv.AutoGo;
 }
 
 void movclass::calc_xy() {
@@ -422,7 +422,8 @@ short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
 	}
 	if (abbruch == UNBEGEHBAR)
 		*dst_feld = get_feld_nr(om.Xypos[0], om.Xypos[1]);
-	return (steps);
+
+	return steps;
 }
 
 void movclass::get_mov_line() {
@@ -689,7 +690,8 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 int16 movclass::get_feld_nr(int16 x, int16 y) {
 	x >>= 3;
 	y >>= 3;
-	return (x + (y * gpkt->Breite));
+
+	return x + (y * gpkt->Breite);
 }
 
 void movclass::get_feld_xy(int16 fnr, int16 *x, int16 *y) {
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index c1ad4ef8905..2837801b80a 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -240,7 +240,7 @@ int16 objekt::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 				ret = i;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 int16 objekt::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
@@ -255,15 +255,15 @@ int16 objekt::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
 		        mouse_y <= (Rmo[mov_obj_room[i]].Y + Rmo[mov_obj_room[i]].YOff))
 			ret = mov_obj_room[i];
 	}
-	return (ret);
+	return ret;
 }
 
 int16 objekt::iib_txt_nr(int16 inv_nr) {
-	return (Rmo[inv_nr].TxtNr);
+	return Rmo[inv_nr].TxtNr;
 }
 
 int16 objekt::sib_txt_nr(int16 sib_nr) {
-	return (Rsi[sib_nr].TxtNr);
+	return Rsi[sib_nr].TxtNr;
 }
 
 int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
@@ -318,7 +318,7 @@ int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 				ret = OBJEKT_1;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 int16 objekt::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
@@ -361,7 +361,7 @@ int16 objekt::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 		if (!calc_rsi_flip_flop(test_obj_nr))
 			action_flag = NO_ACTION;
 	}
-	return (action_flag);
+	return action_flag;
 }
 
 void objekt::hide_sib(int16 nr) {
@@ -472,7 +472,7 @@ int16 objekt::calc_static_use(int16 nr) {
 		break;
 
 	}
-	return (ret);
+	return ret;
 }
 
 int16 objekt::calc_rsi_flip_flop(int16 nr) {
@@ -493,7 +493,7 @@ int16 objekt::calc_rsi_flip_flop(int16 nr) {
 		}
 	} else
 		ret = false;
-	return (ret);
+	return ret;
 }
 
 void objekt::set_rsi_flip_flop(int16 nr, int16 anz) {
@@ -513,7 +513,7 @@ int16 objekt::calc_rmo_flip_flop(int16 nr) {
 		}
 	} else
 		ret = false;
-	return (ret);
+	return ret;
 }
 
 int16 objekt::del_obj_use(int16 nr) {
@@ -528,7 +528,7 @@ int16 objekt::del_obj_use(int16 nr) {
 			--Rmo[nr].Del;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void objekt::add_inventar(int16 nr, RaumBlk *Rb) {
@@ -573,7 +573,7 @@ int16 objekt::check_inventar(int16 nr) {
 		if (spieler_invnr[i + 1] == nr)
 			ret = true;
 	}
-	return (ret);
+	return ret;
 }
 
 int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
@@ -590,7 +590,7 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 3387a8189ae..65832a96ab7 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -549,7 +549,8 @@ int16 ged_user_func(int16 idx_nr) {
 		break;
 
 	}
-	return (idx_nr);
+
+	return idx_nr;
 }
 
 void enter_room(int16 eib_nr) {
@@ -1314,7 +1315,8 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
 	}
 	if (sib_nr != -1)
 		obj->calc_rsi_flip_flop(sib_nr);
-	return ((uint16)flag);
+
+	return (uint16)flag;
 }
 
 int16 sib_event_no_inv(int16 sib_nr) {
@@ -1603,7 +1605,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	}
-	return (ret);
+	return ret;
 }
 
 void sib_event_inv(int16 sib_nr) {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 9cef7f62670..43fce4e2005 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -334,7 +334,7 @@ byte *Room::get_ablage(int16 nr) {
 	if (nr < MAX_ABLAGE && AkAblage != -1) {
 		ret = Ablage[nr];
 	}
-	return (ret);
+	return ret;
 }
 
 byte **Room::get_ablage() {
@@ -343,7 +343,7 @@ byte **Room::get_ablage() {
 	if (AkAblage != -1) {
 		ret = &Ablage[0];
 	}
-	return (ret);
+	return ret;
 }
 
 byte **Room::get_ged_mem() {
@@ -352,7 +352,7 @@ byte **Room::get_ged_mem() {
 	if (AkAblage != -1) {
 		ret = &GedMem[0];
 	}
-	return (ret);
+	return ret;
 }
 
 int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
@@ -401,7 +401,7 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
@@ -430,7 +430,7 @@ int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
 			ende = 1;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 675b9114cbe..cfe80e37221 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -250,7 +250,8 @@ int16 mouse_on_prog_ani() {
 			ani_nr = i;
 		}
 	}
-	return (ani_nr);
+
+	return ani_nr;
 }
 
 void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
@@ -463,7 +464,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	maus_links_click = tmp_maus_links;
-	return (ret);
+	return ret;
 }
 
 void aad_wait(int16 str_nr) {
@@ -628,7 +629,7 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 		        minfo.y <= auto_mov_vector[nr].Xypos[1] + yoff + Cxy[1] - spieler.scrolly)
 			ret = true;
 	}
-	return (ret);
+	return ret;
 }
 
 int16 auto_obj_status(int16 nr) {
@@ -638,7 +639,8 @@ int16 auto_obj_status(int16 nr) {
 		if (mov_phasen[nr].Repeat != -1)
 			status = true;
 	}
-	return (status);
+
+	return status;
 }
 
 void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y, ObjMov *om) {
@@ -1034,7 +1036,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		flags.MausLinks = true;
 		ret = true;
 	}
-	return (ret);
+	return ret;
 }
 
 void calc_person_spz_ani(ObjMov *om) {
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 289fda5f4fd..8035cbfc09a 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -53,7 +53,7 @@ int16 load_ads_dia(int16 dia_nr) {
 			talk_hide_static = -1;
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 void set_ssi_xy() {
@@ -901,7 +901,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 		}
 	} else
 		action_ret = false;
-	return (action_ret);
+	return action_ret;
 }
 
 void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
@@ -1963,7 +1963,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 			}
 		}
 	}
-	return (ret);
+	return ret;
 }
 
 int16 calc_person_txt(int16 p_nr) {
@@ -2022,8 +2022,11 @@ int16 calc_person_txt(int16 p_nr) {
 		}
 		break;
 
+	default:
+		break;
 	}
-	return (txt_nr);
+
+	return txt_nr;
 }
 
 int16 calc_person_click(int16 p_nr) {
@@ -2083,7 +2086,7 @@ int16 calc_person_click(int16 p_nr) {
 		break;
 
 	}
-	return (action_ret);
+	return action_ret;
 }
 
 void calc_person_dia(int16 p_nr) {
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 9caef89e811..76bbeb2b350 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -49,7 +49,8 @@ char *text::str_pos(char *txt_adr, int16 pos) {
 			++i;
 		++ptr;
 	}
-	return (ptr);
+
+	return ptr;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index a198a7c282b..73f6cf0af76 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -91,7 +91,7 @@ int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mod
 		timer_blk[timer_nr].TimeStatus = true;
 	} else
 		ret = -1;
-	return (ret);
+	return ret;
 }
 
 void timer::reset_timer(int16 timer_nr, int16 timer_wert) {


Commit: 3164ffa1c2fa143dddcb73aae06072d9ca178819
    https://github.com/scummvm/scummvm/commit/3164ffa1c2fa143dddcb73aae06072d9ca178819
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:07-08:00

Commit Message:
CHEWY: Fix room 0 start timer action

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 65832a96ab7..7d84d38466e 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -169,9 +169,7 @@ void timer_action(int16 t_nr) {
 			break;
 
 		default:
-			default_flag = true;
 			break;
-
 		}
 		break;
 


Commit: c4af3589959c51158e1d37e4a259b764ca56b3c5
    https://github.com/scummvm/scummvm/commit/c4af3589959c51158e1d37e4a259b764ca56b3c5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Fix speech playback

Changed paths:
    engines/chewy/ailclass.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 6ac3773fd53..c36fdf31009 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -22,7 +22,6 @@
 
 #include "audio/audiostream.h"
 #include "audio/decoders/raw.h"
-#include "audio/decoders/voc.h"
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
 #include "chewy/file.h"
@@ -173,9 +172,11 @@ ailScummVM::ailScummVM() {
 
 void ailScummVM::playSpeech(int channel, Common::SeekableReadStream *src) {
 	Audio::AudioStream *audioStream =
-		Audio::makeVOCStream(src, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+		Audio::makeRawStream(src, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
 	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
 		&_soundHandles[channel & 1], audioStream);
+
+	waitForSpeechToFinish();
 }
 
 bool ailScummVM::isSpeechActive(int channel) const {


Commit: 6d67d66b9e08acebcb3ac5a5170e167d6650de18
    https://github.com/scummvm/scummvm/commit/6d67d66b9e08acebcb3ac5a5170e167d6650de18
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Added SHOULD_QUIT checks to while loops

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/main.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 5c44c00489a..2a0acd6ed43 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -420,7 +420,7 @@ void Room0::ch_schleim_auge() {
 		det->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
 	}
 
-	while (adi->ani_count < adi->end_ani) {
+	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
 		spieler.PersonHide[P_CHEWY] = true;
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
@@ -1330,7 +1330,7 @@ void r6_bola_knopf() {
 		} else {
 			spieler.PersonHide[P_CHEWY] = true;
 			start_ani_block(3, ablock6);
-			while (det->get_ani_status(3)) {
+			while (det->get_ani_status(3) && !SHOULD_QUIT) {
 				if (!det->get_ani_status(14)) {
 					set_person_pos(220, 89, P_CHEWY, P_LEFT);
 					spieler.PersonHide[P_CHEWY] = false;
@@ -1507,7 +1507,7 @@ void r8_start_verbrennen() {
 		spieler.PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ablock12);
 		ende = 0;
-		while (!ende && det->get_ani_status(9)) {
+		while (!ende && det->get_ani_status(9) && !SHOULD_QUIT) {
 
 			set_up_screen(DO_SETUP);
 			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
@@ -3379,7 +3379,7 @@ int16 r23_start_gleiter() {
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
 					switch_room(spieler.R23GleiterExit);
 					start_spz(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
-					while (flags.SpzAni)
+					while (flags.SpzAni && !SHOULD_QUIT)
 						set_up_screen(DO_SETUP);
 					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 					spieler.DelaySpeed = 10;
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 379b2ac336f..4d9b8f89223 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -572,7 +572,7 @@ void r29_schlitz_sitz() {
 		start_aad(63);
 		start_ani_block(4, ablock26);
 		det->show_static_spr(9);
-		while (flags.AdsDialog) {
+		while (flags.AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 		det->stop_detail(2);
@@ -1136,7 +1136,7 @@ int16 r35_use_cat() {
 		obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
 		det->show_static_spr(7);
 		atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
-		while (det->get_ani_status(2)) {
+		while (det->get_ani_status(2) && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 		det->set_static_ani(0, -1);
@@ -1396,7 +1396,7 @@ void r37_use_hahn() {
 			del_inventar(GEBISS_INV);
 			flags.NoScroll = true;
 			auto_scroll(177, 0);
-			while (det->get_ani_status(9)) {
+			while (det->get_ani_status(9) && !SHOULD_QUIT) {
 				set_up_screen(DO_SETUP);
 			}
 			det->start_detail(4, 1, ANI_VOR);
@@ -1980,7 +1980,7 @@ int16 r40_use_schalter(int16 aad_nr) {
 			if (spieler.R40PoliceAniStatus != 255) {
 				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(204, -1);
-				while (spieler.R40PoliceAniStatus != 255)
+				while (spieler.R40PoliceAniStatus != 255 && !SHOULD_QUIT)
 					set_up_screen(DO_SETUP);
 			}
 			room->set_timer_status(255, TIMER_STOP);
@@ -2542,7 +2542,7 @@ void r42_talk_beamter() {
 void r42_dia_beamter(int16 str_end_nr) {
 	hide_cur();
 	if (str_end_nr != 4) {
-		while (atds->aad_get_status() != -1)
+		while (atds->aad_get_status() != -1 && !SHOULD_QUIT)
 			set_up_screen(DO_SETUP);
 		spieler.PersonHide[P_CHEWY] = true;
 		flags.NoDiaBox = true;
@@ -2561,13 +2561,13 @@ void r42_dia_beamter(int16 str_end_nr) {
 
 		}
 	} else {
-		while (atds->aad_get_status() < 2) {
+		while (atds->aad_get_status() < 2 && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 		det->stop_detail(0);
 		start_detail_wait(1, 1, ANI_VOR);
 		det->start_detail(2, 255, ANI_VOR);
-		while (atds->aad_get_status() != -1) {
+		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 		det->stop_detail(2);
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 45741ccd1b4..3d8dee32918 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -1612,7 +1612,7 @@ void r54_aufzug_ab() {
 	ay = -108;
 	delay = 0;
 	det->show_static_spr(12);
-	while (ch_y < 68) {
+	while (ch_y < 68 && !SHOULD_QUIT) {
 		det->set_static_pos(12, 125, ch_y, false, false);
 		det->set_static_pos(9, 122, ay, false, false);
 		if (!delay) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index ed9ef3f0cd9..5335b779a4a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -574,15 +574,14 @@ void set_up_screen(SetupScreenMode mode) {
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
 
-	if (SetUpScreenFunc) {
-		if (menu_display == 0) {
-			SetUpScreenFunc();
-			out->setze_zeiger(workptr);
-		}
-	}
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
 
+	if (SetUpScreenFunc && menu_display == 0 && !flags.InventMenu) {
+		SetUpScreenFunc();
+		out->setze_zeiger(workptr);
+	}
+
 	sprite_engine();
 	if (menu_display == MENU_EINBLENDEN || flags.InventMenu) {
 		if (!flags.InventMenu)
@@ -642,10 +641,14 @@ void set_up_screen(SetupScreenMode mode) {
 
 		calc_auto_go();
 
-		for (i = 0; i < MAX_PERSON; i++) {
-			mov_objekt(&spieler_vector[i], &spieler_mi[i]);
-			spieler_mi[i].XyzStart[0] = spieler_vector[i].Xypos[0];
-			spieler_mi[i].XyzStart[1] = spieler_vector[i].Xypos[1];
+		if (fx_blende) {
+
+		} else {
+			for (i = 0; i < MAX_PERSON; i++) {
+				mov_objekt(&spieler_vector[i], &spieler_mi[i]);
+				spieler_mi[i].XyzStart[0] = spieler_vector[i].Xypos[0];
+				spieler_mi[i].XyzStart[1] = spieler_vector[i].Xypos[1];
+			}
 		}
 
 		for (i = 0; i < auto_obj && !flags.StopAutoObj; i++)
@@ -1930,7 +1933,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 	spieler.scrolly >>= 1;
 	spieler.scrolly <<= 1;
 	ende = false;
-	while (!ende) {
+	while (!ende && !SHOULD_QUIT) {
 		if (scrx < spieler.scrollx)
 			spieler.scrollx -= spieler.ScrollxStep;
 		else if (scrx > spieler.scrollx)
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index cfe80e37221..343c5bb7070 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -351,7 +351,7 @@ void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
 	tmp_maus_links = maus_links_click;
 	maus_links_click = false;
 	det->start_detail(ani_nr, rep, mode);
-	while (det->get_ani_status(ani_nr)) {
+	while (det->get_ani_status(ani_nr) && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
 	maus_links_click = tmp_maus_links;
@@ -367,14 +367,14 @@ void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 		frame = adi->ani_count + frame;
 	else
 		frame = adi->ani_count - frame;
-	while (det->get_ani_status(ani_nr) && adi->ani_count != frame) {
+	while (det->get_ani_status(ani_nr) && adi->ani_count != frame && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
 	maus_links_click = tmp_maus_links;
 }
 
 void wait_detail(int16 det_nr) {
-	while (det->get_ani_status(det_nr))
+	while (det->get_ani_status(det_nr) && !SHOULD_QUIT)
 		set_up_screen(DO_SETUP);
 }
 
@@ -383,7 +383,7 @@ void wait_show_screen(int16 frames) {
 	maus_links_click = false;
 	if (spieler.DelaySpeed > 0)
 		frames *= spieler.DelaySpeed;
-	while (--frames > 0) {
+	while (--frames > 0 && !SHOULD_QUIT) {
 		if (flags.AniUserAction)
 			get_user_key(NO_SETUP);
 		set_up_screen(DO_SETUP);
@@ -441,7 +441,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 				atds_string_start(30000, 0, 0, AAD_STR_START);
 			ret = atds->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
 			if (ret) {
-				while (atds->ats_get_status() != false)
+				while (atds->ats_get_status() != false && !SHOULD_QUIT)
 					set_up_screen(DO_SETUP);
 			} else if (VocNr != -1) {
 				ret = true;
@@ -471,11 +471,11 @@ void aad_wait(int16 str_nr) {
 	tmp_maus_links = maus_links_click;
 	maus_links_click = false;
 	if (str_nr == -1) {
-		while (atds->aad_get_status() != -1) {
+		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 	} else {
-		while (atds->aad_get_status() < str_nr) {
+		while (atds->aad_get_status() < str_nr && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 	}
@@ -502,7 +502,7 @@ void start_ads_wait(int16 dia_nr) {
 		menu_item = CUR_TALK;
 		cursor_wahl(menu_item);
 		load_ads_dia(dia_nr);
-		while (flags.AdsDialog) {
+		while (flags.AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 	}
@@ -511,7 +511,7 @@ void start_ads_wait(int16 dia_nr) {
 void wait_auto_obj(int16 nr) {
 	tmp_maus_links = maus_links_click;
 	maus_links_click = false;
-	while (mov_phasen[nr].Repeat != -1) {
+	while (mov_phasen[nr].Repeat != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
 	maus_links_click = tmp_maus_links;
@@ -990,7 +990,7 @@ void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
 
 void start_spz_wait(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 	if (start_spz(ani_id, count, reverse, p_nr)) {
-		while (spz_count)
+		while (spz_count && !SHOULD_QUIT)
 			set_up_screen(DO_SETUP);
 	}
 }


Commit: 05efb84c4c986d3c6b51efb719e51c7a44f52912
    https://github.com/scummvm/scummvm/commit/05efb84c4c986d3c6b51efb719e51c7a44f52912
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Updates to set_up_screen

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 5335b779a4a..003d059daa9 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -32,9 +32,13 @@
 namespace Chewy {
 
 #define AUSGANG_CHECK_PIX 8
-#define BLENDE1 1
-#define BLENDE2 2
-#define BLENDE3 3
+enum {
+	BLENDE1 = 1,
+	BLENDE2 = 2,
+	BLENDE3 = 3,
+	BLENDE4 = 4
+};
+
 int16 menu_flag;
 char cur_no_flag;
 bool inv_disp_ok;
@@ -642,7 +646,12 @@ void set_up_screen(SetupScreenMode mode) {
 		calc_auto_go();
 
 		if (fx_blende) {
-
+			int16 idx = ged->ged_idx(
+				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
+				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+				room->GedXAnz[room_blk.AkAblage],
+				ged_mem[room_blk.AkAblage]);
+			check_shad(idx, 0);
 		} else {
 			for (i = 0; i < MAX_PERSON; i++) {
 				mov_objekt(&spieler_vector[i], &spieler_mi[i]);
@@ -707,6 +716,13 @@ void set_up_screen(SetupScreenMode mode) {
 			fx->rnd_blende(spblende, workptr, screen0, pal, 0, 10);
 			break;
 
+		case BLENDE4:
+			out->setze_zeiger(workptr);
+			out->cls();
+			out->setze_zeiger(nullptr);
+			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			break;
+
 		default:
 			out->back2screen(workpage);
 			break;
@@ -714,6 +730,7 @@ void set_up_screen(SetupScreenMode mode) {
 		}
 		fx_blende = 0;
 	}
+
 	cur_hide_flag = false;
 	ScrXy = (int16 *)ablage[room_blk.AkAblage];
 	if (!menu_display)


Commit: e5d10a655bedbcc2e9c3bbbcff5607ce56bb4544
    https://github.com/scummvm/scummvm/commit/e5d10a655bedbcc2e9c3bbbcff5607ce56bb4544
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Set BLENDE4 blend mode after showing file menu

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 003d059daa9..35a2bfafc49 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -407,8 +407,10 @@ int16 main_loop(int16 mode) {
 			out->set_fontadr(font6x8);
 			out->set_vorschub(fvorx6x8, fvory6x8);
 			cursor_wahl(CUR_SAVE);
-			if (file_menue() == 1)
+			if (file_menue() == 1) {
 				ende = 1;
+				fx_blende = BLENDE4;
+			}
 			if (spieler.inv_cur && spieler.AkInvent != -1 && menu_item == CUR_USE) {
 				cursor_wahl(CUR_AK_INVENT);
 			} else
@@ -474,8 +476,10 @@ int16 main_loop(int16 mode) {
 				out->setze_zeiger(screen0);
 				cursor_wahl(CUR_SAVE);
 				ret = file_menue();
-				if (ret == IOG_END)
+				if (ret == IOG_END) {
 					ende = 1;
+					fx_blende = BLENDE4;
+				}
 				out->setze_zeiger(workptr);
 
 				menu_item = tmp_menu_item;


Commit: cbb2574097cb5fbc9e1ee6a486655dba99c84d38
    https://github.com/scummvm/scummvm/commit/cbb2574097cb5fbc9e1ee6a486655dba99c84d38
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Change fx_blende to an enum

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/effect.h
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/file.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 1925794f8a4..589b3ddbaca 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -104,7 +104,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		ERROR
 		load_chewy_taf(spieler.ChewyAni);
 
-		fx_blende = 1;
+		fx_blend = BLEND1;
 		room->calc_invent(&room_blk, &spieler);
 
 		if (spieler.AkInvent != -1)
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index 8b7b75c2c7a..9d42c78d2a7 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -25,8 +25,15 @@
 
 namespace Chewy {
 
-class effect {
+enum BlendMode {
+	BLEND_NONE = 0,
+	BLEND1 = 1,
+	BLEND2 = 2,
+	BLEND3 = 3,
+	BLEND4 = 4
+};
 
+class effect {
 public:
 	effect();
 	~effect();
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 2a0acd6ed43..2759a97039f 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -761,7 +761,7 @@ void Room0::fuett_ani() {
 			spieler_vector[P_CHEWY].DelayCount = 0;
 
 			check_shad(4, 0);
-			fx_blende = 1;
+			fx_blend = BLEND1;
 			set_up_screen(DO_SETUP);
 		} else {
 			action = true;
@@ -873,14 +873,14 @@ int16 r4_sonde_comp() {
 	spieler.PersonRoomNr[P_CHEWY] = 3;
 	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 	ERROR
-	fx_blende = 1;
+	fx_blend = BLEND1;
 	atds->stop_aad();
 
 	return cur_x;
 }
 
 void switch_room(int16 nr) {
-	fx_blende = 1;
+	fx_blend = BLEND1;
 	exit_room(-1);
 	spieler.PersonRoomNr[P_CHEWY] = nr;
 	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
@@ -930,7 +930,7 @@ void r3_terminal() {
 			auto_obj = 0;
 			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 			ERROR
-			fx_blende = 1;
+			fx_blend = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
 			spieler.PersonHide[P_CHEWY] = false;
@@ -1689,7 +1689,7 @@ void r10_entry() {
 		spieler.R10Surimy = true;
 		flic_cut(FCUT_004, CFO_MODE);
 		start_aad(101, 0);
-		fx_blende = 0;
+		fx_blend = BLEND_NONE;
 		set_person_pos(1, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 	} else if (spieler.R10SurimyOk)
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 4d9b8f89223..5b171911415 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -61,7 +61,7 @@ void r25_entry() {
 		spieler.R25FirstEntry = true;
 		spieler.PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, FLC_MODE);
-		fx_blende = 0;
+		fx_blend = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		spieler.PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
@@ -142,11 +142,11 @@ void r25_xit_gleiter() {
 		auto_mov_obj[SURIMY_OBJ].Mode = 1;
 		init_auto_obj(SURIMY_OBJ, &r25_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 		              *)r25_surimy_mpkt);
-		fx_blende = 1;
+		fx_blend = BLEND1;
 		set_up_screen(DO_SETUP);
 		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(65, -1);
-		fx_blende = 0;
+		fx_blend = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
 		auto_obj = 0;
 	}
@@ -276,7 +276,7 @@ void r28_entry(int16 eib_nr) {
 
 					set_person_pos(480, 118, P_HOWARD, P_LEFT);
 					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
-					fx_blende = 0;
+					fx_blend = BLEND_NONE;
 					flags.ExitMov = false;
 					spieler_mi[P_HOWARD].Mode = true;
 					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
@@ -2133,7 +2133,7 @@ void r40_bmeister_dia(int16 aad_nr) {
 		start_aad_wait(aad_nr, -1);
 		flags.NoPalAfterFlc = true;
 		flic_cut(FCUT_062, FLC_MODE);
-		fx_blende = 3;
+		fx_blend = BLEND3;
 		start_aad_wait(375, -1);
 	} else
 		start_aad_wait(aad_nr, -1);
@@ -2649,7 +2649,7 @@ void r44_look_news() {
 	spieler.scrollx = 0;
 	spieler.scrolly = 0;
 	hide_person();
-	fx_blende = 1;
+	fx_blend = BLEND1;
 	spieler.PersonRoomNr[P_CHEWY] = 44;
 	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 	ERROR
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 3d8dee32918..f5802f302b5 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -1108,7 +1108,7 @@ int16 r51_use_door(int16 txt_nr) {
 					obj->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
 					det->hide_static_spr(1);
 
-					fx_blende = 3;
+					fx_blend = BLEND3;
 					set_up_screen(DO_SETUP);
 					start_aad_wait(291, -1);
 				}
@@ -2195,7 +2195,7 @@ int16 r56_use_kneipe() {
 				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
 				set_person_pos(50, 81, P_CHEWY, P_LEFT);
 
-				fx_blende = 3;
+				fx_blend = BLEND3;
 				start_aad_wait(308, -1);
 				SetUpScreenFunc = r56_setup_func;
 				flags.NoScroll = false;
@@ -2672,7 +2672,7 @@ void r63_bork_platt() {
 	out->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(FCUT_079, FLC_MODE);
-	fx_blende = 3;
+	fx_blend = BLEND3;
 	show_cur();
 	flags.MainInput = true;
 	spieler.R62Flucht = true;
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 32048b9882b..c0876af83ee 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -364,7 +364,7 @@ int16 file_menue() {
 	ERROR
 	room->load_tgp(spieler.PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
 	ERROR;
-	fx_blende = 1;
+	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);
 	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 	                        spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index aaafca6954e..766e8265fed 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -80,7 +80,7 @@ byte *spblende;
 
 byte *screen0;
 int16 scr_width;
-int16 fx_blende;
+BlendMode fx_blend;
 
 byte *font6x8;
 byte *font8x8;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index fe19a8edfd4..911ac20cc90 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -80,7 +80,7 @@ extern byte *spblende;
 
 extern byte *screen0;
 extern int16 scr_width;
-extern int16 fx_blende;
+extern BlendMode fx_blend;
 
 extern byte *font6x8;
 extern byte *font8x8;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 35a2bfafc49..bcfee846b58 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -32,12 +32,6 @@
 namespace Chewy {
 
 #define AUSGANG_CHECK_PIX 8
-enum {
-	BLENDE1 = 1,
-	BLENDE2 = 2,
-	BLENDE3 = 3,
-	BLENDE4 = 4
-};
 
 int16 menu_flag;
 char cur_no_flag;
@@ -312,7 +306,7 @@ void test_menu() {
 	maus_links_click = false;
 	spieler.PersonHide[P_CHEWY] = false;
 	txt_aus_click = false;
-	fx_blende = BLENDE3;
+	fx_blend = BLEND3;
 	auto_obj = 0;
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
@@ -409,7 +403,7 @@ int16 main_loop(int16 mode) {
 			cursor_wahl(CUR_SAVE);
 			if (file_menue() == 1) {
 				ende = 1;
-				fx_blende = BLENDE4;
+				fx_blend = BLEND4;
 			}
 			if (spieler.inv_cur && spieler.AkInvent != -1 && menu_item == CUR_USE) {
 				cursor_wahl(CUR_AK_INVENT);
@@ -478,7 +472,7 @@ int16 main_loop(int16 mode) {
 				ret = file_menue();
 				if (ret == IOG_END) {
 					ende = 1;
-					fx_blende = BLENDE4;
+					fx_blend = BLEND4;
 				}
 				out->setze_zeiger(workptr);
 
@@ -649,7 +643,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 		calc_auto_go();
 
-		if (fx_blende) {
+		if (fx_blend) {
 			int16 idx = ged->ged_idx(
 				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
@@ -707,20 +701,20 @@ void set_up_screen(SetupScreenMode mode) {
 	menu_flag = false;
 	if (mode == DO_SETUP) {
 		out->setze_zeiger(0);
-		switch (fx_blende) {
-		case BLENDE1:
+		switch (fx_blend) {
+		case BLEND1:
 			fx->blende1(workptr, screen0, pal, 150, 0, 0);
 			break;
 
-		case BLENDE2:
+		case BLEND2:
 			fx->blende1(workptr, screen0, pal, 150, 1, 0);
 			break;
 
-		case BLENDE3:
+		case BLEND3:
 			fx->rnd_blende(spblende, workptr, screen0, pal, 0, 10);
 			break;
 
-		case BLENDE4:
+		case BLEND4:
 			out->setze_zeiger(workptr);
 			out->cls();
 			out->setze_zeiger(nullptr);
@@ -730,9 +724,9 @@ void set_up_screen(SetupScreenMode mode) {
 		default:
 			out->back2screen(workpage);
 			break;
-
 		}
-		fx_blende = 0;
+
+		fx_blend = BLEND_NONE;
 	}
 
 	cur_hide_flag = false;
@@ -1860,7 +1854,7 @@ void calc_ausgang(int16 x, int16 y) {
 				check_shad(u_idx, 0);
 				set_person_spr(Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
-				fx_blende = BLENDE1;
+				fx_blend = BLEND1;
 				auto_obj = 0;
 				spieler_vector[P_CHEWY].Xzoom = 0;
 				spieler_vector[P_CHEWY].Yzoom = 0;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 635f9ae69cf..9547e8fc3f6 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -220,7 +220,7 @@ void MainMenu::startGame() {
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
 	set_person_pos(160, 80, 0, 1);
-	fx_blende = 3;
+	fx_blend = BLEND3;
 	spieler.PersonHide[P_CHEWY] = 0;
 	menu_item = 0;
 	cursor_wahl(0);
@@ -248,7 +248,7 @@ bool MainMenu::loadGame() {
 	flags.SaveMenu = false;
 
 	if (result == 0) {
-		fx_blende = 1;
+		fx_blend = BLEND1;
 		return true;
 	} else {
 		return false;


Commit: a7013366d0ecde8fe735f9ebb08d6ea9e7646092
    https://github.com/scummvm/scummvm/commit/a7013366d0ecde8fe735f9ebb08d6ea9e7646092
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:08-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/detail.cpp
    engines/chewy/menus.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 76932bda056..710d72fbf63 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -1012,7 +1012,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 					} else {
 						modul = DATEI;
 						fcode = OPENFEHLER;
-						err->set_user_msg("SPRACHAUSGABE.TVP\0");
+						err->set_user_msg("sprachausgabe.tvp");
 					}
 				}
 				for (i = 0; i < ssr->Anz; i++) {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 4e61a9656c4..6a88553ac17 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -407,7 +407,7 @@ void detail::save_detail(char *fname, int16 room_nr) {
 			if (chewy_fwrite(&rdi_datei_header, sizeof(RdiDateiHeader), 1, new_handle)) {
 
 				chewy_fseek(old_handle, sizeof(RdiDateiHeader), SEEK_SET);
-				for (i = 0; i < room_nr && !modul ; i++) {
+				for (i = 0; i < room_nr && !modul; i++) {
 					if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
 #ifdef KONVERT
 						konvert_format(&tmp_rdi, &tmp_rdi_new);
@@ -435,7 +435,7 @@ void detail::save_detail(char *fname, int16 room_nr) {
 
 					chewy_fseek(old_handle, sizeof(room_detail_info), SEEK_CUR);
 
-					for (i = 0; i < MAX_RDI_ROOM - (room_nr + 1) && !modul ; i++) {
+					for (i = 0; i < MAX_RDI_ROOM - (room_nr + 1) && !modul; i++) {
 						if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
 #ifdef KONVERT
 							konvert_format(&tmp_rdi, &tmp_rdi_new);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 79d9a5182c9..bf1fd52f4ab 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -126,7 +126,6 @@ void maus_mov_menu() {
 }
 
 void plot_inventar_menu() {
-
 	int16 i, j, k;
 	int16 *xy;
 	int16 x, y;
@@ -185,8 +184,8 @@ void plot_inventar_menu() {
 	}
 
 	y = WIN_INF_Y + 6 + 30;
-	for (j = 0; j < 3 ; j++) {
-		for (i = 0; i < 5 ; i++) {
+	for (j = 0; j < 3; j++) {
+		for (i = 0; i < 5; i++) {
 			if (spieler.InventSlot[(spieler.InventY + j) * 5 + i] != -1) {
 				xy = (int16 *)inv_spr[spieler.InventSlot[(spieler.InventY + j) * 5 + i]];
 				x1 = 40 - xy[0];
@@ -611,9 +610,9 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 			}
 		}
 		k = 0;
-		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen ; i++) {
+		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-			              scr_width, "%s\0", txt->str_pos(txt_adr, i));
+			              scr_width, "%s", txt->str_pos(txt_adr, i));
 			++k;
 		}
 		cur->plot_cur();
@@ -919,7 +918,7 @@ void ads_menu() {
 				cur_y_start = 190;
 			else
 				cur_y_start = 190 - (4 - ads_item_anz) * 10;
-			for (i = 0; i < ads_item_anz && i < 4 ; i++) {
+			for (i = 0; i < ads_item_anz && i < 4; i++) {
 				if (cur_y == i)
 					col = 255;
 				else
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 343c5bb7070..7ec6b958299 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -60,7 +60,7 @@ void sprite_engine() {
 	taf_seq_info *ts_info;
 	calc_z_ebene();
 	calc_person_ani();
-	for (i = 0; i < z_count ; i++) {
+	for (i = 0; i < z_count; i++) {
 		zmin = 3000;
 		for (j = 0; j < z_count; j++) {
 			if (z_obj_sort[j].ObjZ != 3000 && z_obj_sort[j].ObjZ < zmin) {
@@ -174,6 +174,8 @@ void sprite_engine() {
 			                auto_mov_vector[nr].Yzoom, scr_width);
 			break;
 
+		default:
+			break;
 		}
 		z_obj_sort[min_zeiger].ObjZ = 3000;
 	}
@@ -338,6 +340,8 @@ void set_person_spr(int16 nr, int16 p_nr) {
 		}
 		break;
 
+	default:
+		break;
 	}
 }
 
@@ -493,6 +497,8 @@ void start_aad(int16 dia_nr, int16 ssi_nr) {
 		atds->set_split_win(0, &ssi[0]);
 		break;
 
+	default:
+		break;
 	}
 	atds->start_aad(dia_nr);
 }
@@ -872,7 +878,6 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 			default:
 				new_auto_line(mi->Id);
 				break;
-
 			}
 		}
 	}
@@ -1117,31 +1122,28 @@ void calc_person_ani() {
 					} else {
 						switch (spieler_vector[p_nr].Phase) {
 						case CH_LEFT_NO:
-
 							ani_nr = (int16)p_ani[p_nr - 1][0];
 							break;
 
 						case CH_RIGHT_NO:
-
 							ani_nr = (int16)p_ani[p_nr - 1][1];
 							break;
 
 						case CH_UP:
-
 							ani_nr = (int16)p_ani[p_nr - 1][2];
 							break;
 
 						case CH_DOWN:
-
 							ani_nr = (int16)p_ani[p_nr - 1][3];
 							break;
-
 						}
 					}
 					load_person_ani(ani_nr, p_nr);
 				}
 				break;
 
+			default:
+				break;
 			}
 		}
 	}


Commit: b7e31a7e97079c45e3efe1e8df30a9b29eb1120c
    https://github.com/scummvm/scummvm/commit/b7e31a7e97079c45e3efe1e8df30a9b29eb1120c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Fix talk character animation

Changed paths:
    engines/chewy/defines.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index ae8db0393a1..f8c4712a5fc 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -233,7 +233,7 @@ enum SetupScreenMode {
 #define NI_HOT_Y 68
 #define NI_X_PIX 8
 
-#define CH_SPZ_OFFSET 222
+#define CH_SPZ_OFFSET 345
 #define MAX_SPZ_PHASEN 30
 
 #define CH_TALK1 0
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 766e8265fed..a8fdb17083b 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -200,50 +200,76 @@ int16 spz_p_nr;
 int16 spz_delay[MAX_PERSON];
 int16 spz_count;
 int16 spz_ani[MAX_PERSON];
-int16 spz_ani_ph[][2] = {
-	{0, 12},
-	{12, 6},
-	{18, 6},
-	{24, 6},
-	{30, 6},
-	{36, 6},
-	{42, 6},
-	{48, 5},
-	{53, 3},
-	{56, 14},
-	{70, 7},
-	{77, 6},
-	{83, 5},
-	{88, 8},
-	{96, 5},
-	{5, 7},
-	{24, 12},
-	{101, 19},
-	{120, 8},
-	{128, 3},
-	{128, 8},
-	{136, 8},
-	{120 + CH_SPZ_OFFSET, 8},
-	{128 + CH_SPZ_OFFSET, 3},
-	{128 + CH_SPZ_OFFSET, 8},
-	{136 + CH_SPZ_OFFSET, 8},
-	{144, 6},
-	{150, 5},
-	{155, 9},
-	{155, 3},
-	{164, 3},
-	{167, 8},
-	{175, 7},
-	{182, 10},
-	{192, 15},
-	{214, 8},
-	{207, 3},
-	{210, 4},
-	{214, 8},
-	{214 + CH_SPZ_OFFSET, 8},
-	{207 + CH_SPZ_OFFSET, 3},
-	{210 + CH_SPZ_OFFSET, 4},
-	{214 + CH_SPZ_OFFSET, 8},
+int16 SPZ_ANI_PH[][2] = {
+	{   0,   12 },
+	{  12,    6 },
+	{  18,    6 },
+	{  24,    6 },
+	{  30,    6 },
+	{  36,    6 },
+	{  42,    6 },
+	{  48,    5 },
+	{  53,    3 },
+	{  56,   14 },
+	{  70,    7 },
+	{  77,    6 },
+	{  83,    5 },
+	{  88,    8 },
+	{  96,    5 },
+	{   5,    7 },
+	{  24,   12 },
+	{ 101,   19 },
+	{ 120,    8 },
+	{ 128,    3 },
+	{ 128,    8 },
+	{ 136,    8 },
+	{ 465,    8 },
+	{ 473,    3 },
+	{ 473,    8 },
+	{ 481,    8 },
+	{ 144,    6 },
+	{ 150,    5 },
+	{ 155,    9 },
+	{ 155,    3 },
+	{ 164,    3 },
+	{ 167,    8 },
+	{ 175,    7 },
+	{ 182,   10 },
+	{ 192,   15 },
+	{ 214,    8 },
+	{ 207,    3 },
+	{ 210,    4 },
+	{ 214,    8 },
+	{ 559,    8 },
+	{ 552,    3 },
+	{ 555,    4 },
+	{ 559,    8 },
+	{ 222,    7 },
+	{ 229,    4 },
+	{ 233,    9 },
+	{ 242,    4 },
+	{ 270,    8 },
+	{ 246,    8 },
+	{ 297,    3 },
+	{ 297,    8 },
+	{ 262,    8 },
+	{ 591,    8 },
+	{ 642,    3 },
+	{ 642,    8 },
+	{ 254,    8 },
+	{ 288,    3 },
+	{ 288,    9 },
+	{ 607,    8 },
+	{ 599,    8 },
+	{ 633,    3 },
+	{ 633,    9 },
+	{ 305,   18 },
+	{ 278,   10 },
+	{ 323,    2 },
+	{ 325,    6 },
+	{ 331,    2 },
+	{ 333,    8 },
+	{ 341,    4 }
 };
 
 int16 AkChewyTaf;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 911ac20cc90..123fdb58ef7 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -215,7 +215,7 @@ extern int16 spz_start;
 extern int16 spz_akt_id;
 
 extern int16 spz_count;
-extern int16 spz_ani_ph[][2];
+extern int16 SPZ_ANI_PH[][2];
 extern int16 spz_delay[MAX_PERSON];
 extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 7ec6b958299..2a3a731a86b 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -60,6 +60,7 @@ void sprite_engine() {
 	taf_seq_info *ts_info;
 	calc_z_ebene();
 	calc_person_ani();
+
 	for (i = 0; i < z_count; i++) {
 		zmin = 3000;
 		for (j = 0; j < z_count; j++) {
@@ -69,6 +70,7 @@ void sprite_engine() {
 			}
 		}
 		nr = (int16)z_obj_sort[min_zeiger].ObjNr;
+
 		switch (z_obj_sort[min_zeiger].ObjArt) {
 		case ZOBJ_ANI_DETAIL:
 			if (Adi[nr].zoom) {
@@ -1010,26 +1012,28 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		flags.SpzAni = true;
 		spz_ani[p_nr] = true;
 		spz_p_nr = p_nr;
-		spr_start = spz_ani_ph[ani_id][0];
-		spr_anz = spz_ani_ph[ani_id][1];
+		spr_start = SPZ_ANI_PH[ani_id][0];
+		spr_anz = SPZ_ANI_PH[ani_id][1];
 		if (person_end_phase[p_nr] == P_RIGHT) {
 			ani_id += 100;
 			spr_start += CH_SPZ_OFFSET;
 		}
-		if (ani_id != spz_akt_id) {
 
+		if (ani_id != spz_akt_id) {
 			if (spz_tinfo)
 				free((char *)spz_tinfo);
 			spz_akt_id = ani_id;
 			spz_tinfo = mem->taf_seq_adr(spz_taf_handle, spr_start, spr_anz);
 			ERROR
 		}
+
 		for (i = 0; i < spr_anz; i++) {
 			if (!reverse)
 				spz_spr_nr[i] = i;
 			else
 				spz_spr_nr[i] = spr_anz - i - 1;
 		}
+
 		spz_start = spr_start;
 		spz_delay[p_nr] = SpzDelay;
 		spieler_vector[p_nr].Count = 0;
@@ -1079,8 +1083,8 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
 	int16 ani_start;
 	short ani_anz;
 	if (PersonAni[p_nr] != ani_id) {
-		ani_start = spz_ani_ph[ani_id][0];
-		ani_anz = spz_ani_ph[ani_id][1];
+		ani_start = SPZ_ANI_PH[ani_id][0];
+		ani_anz = SPZ_ANI_PH[ani_id][1];
 		PersonAni[p_nr] = ani_id;
 		if (PersonTaf[p_nr])
 			free((char *)PersonTaf[p_nr]);


Commit: 12e1bf8a0e9899685ef536d5d446e51c2a0fea33
    https://github.com/scummvm/scummvm/commit/12e1bf8a0e9899685ef536d5d446e51c2a0fea33
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Endian fix for loading sprite correction offsets

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/detail.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 4b1f9ba5f5a..a6a45a4b3cb 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -426,11 +426,10 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 	}
 }
 
-void datei::load_korrektur(const char *fname, byte *sp) {
+void datei::load_korrektur(const char *fname, int16 *sp) {
 	Common::File f;
 	taf_dateiheader *header = (taf_dateiheader *)tmp;
 	int16 id;
-	byte *speicher;
 
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
@@ -439,16 +438,18 @@ void datei::load_korrektur(const char *fname, byte *sp) {
 	if (!strchr(filename, '.'))
 		strcat(filename, ".taf");
 
-	speicher = sp;
-	if (speicher) {
+	if (sp) {
 		if (f.open(filename)) {
 			if (header->load(&f)) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
-					f.seek(-((int)(header->count * sizeof(uint32)) * header->korrekt), SEEK_END);
-					if (!f.read(speicher, header->count * sizeof(uint32))) {
+					f.seek(-((int)(header->count * sizeof(int16) * 2) * header->korrekt), SEEK_END);
+					if ((f.size() - f.pos() / 2) < (header->count * sizeof(int16) * 2)) {
 						fcode = READFEHLER;
 						modul = DATEI;
+					} else {
+						for (int i = 0; i < header->count; ++i)
+							*sp++ = f.readSint16LE();
 					}
 				} else {
 					fcode = NOTTBF;
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 1c0b68cb888..aa4d91071cd 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -50,7 +50,7 @@ public:
 	void load_palette(Stream *stream, byte *palette);
 
 	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
-	void load_korrektur(const char *fname, byte *sp);
+	void load_korrektur(const char *fname, int16 *sp);
 	void load_tff(const char *fname, byte *speicher);
 	void load_dialog(const char *fname, dialogue *dial, menue *men, knopf *knpf);
 	void load_sbi(const char *fname, sbi_inst *speicher);
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 6a88553ac17..15aa1040752 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -288,7 +288,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 			Tt->anzahl = anz;
 			Tt->korrektur = (int16 *)calloc((int32)Tt->anzahl * 4l, 1);
 			if (!modul) {
-				mem->file->load_korrektur(fname_, (byte *)Tt->korrektur);
+				mem->file->load_korrektur(fname_, Tt->korrektur);
 				Tt->palette = 0;
 				CurrentTaf = chewy_fopen(fname_, "rb");
 				if (CurrentTaf) {
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index e32ecfe6d17..b3c6c9f32b4 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -116,4 +116,9 @@ void EventsManager::clearEvents() {
 	minfo.button = 0;
 }
 
+void EventsManager::setMousePos(const Common::Point &pt) {
+	g_system->warpMouse(pt.x, pt.y);
+	_mousePos = pt;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 4197122e784..9e9347ebef1 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -55,6 +55,11 @@ public:
 	void setKbdInfo(kb_info *kb_info) {
 		_kbInfo = kb_info;
 	}
+
+	/**
+	 * Set the mouse position
+	 */
+	void setMousePos(const Common::Point &pt);
 };
 
 extern EventsManager *g_events;
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 3271010791c..703ec6f966a 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -60,7 +60,7 @@ taf_info *memory::taf_adr(const char *filename) {
 				tempptr = tmp1 + (((uint32)sizeof(taf_info)) + kgroesse);
 				file ->load_full_taf(filename, tempptr, tinfo);
 				tinfo->korrektur = (int16 *)(tmp1 + (size + 768l));
-				file ->load_korrektur(filename, (byte *)tinfo->korrektur);
+				file ->load_korrektur(filename, tinfo->korrektur);
 			}
 			if (modul)
 				free(tmp1);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index bf1fd52f4ab..5cba0525aef 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/menus.h"
 
@@ -58,29 +59,47 @@ void plot_main_menu() {
 	int16 i;
 	int16 zoomx, zoomy;
 	int16 *kor;
+
 	if (menu_item != tmp_menu) {
 		m_flip = 0;
 		tmp_menu = menu_item;
 	}
+
 	maus_mov_menu();
-	kor = (int16 *) menutaf->korrektur;
+	kor = (int16 *)menutaf->korrektur;
+
 	for (i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
-		if (i > 8) {
-			zoomx = -3;
-			zoomy = -3;
-		} else {
+		int deltaX = 0;
+
+		if (i <= 8) {
 			zoomx = 0;
 			zoomy = 0;
+		} else {
+			zoomx = -3;
+			zoomy = -3;
+
+			if (i == 11)
+				deltaX = 40;
+			else if (i == 12)
+				deltaX = -40;
 		}
-		out->scale_set(menutaf->image[i], MENU_X + kor[i * 2],
-		                spieler.MainMenuY + kor[i * 2 + 1], zoomx, zoomy, 0);
+
+		out->scale_set(menutaf->image[i], MENU_X + deltaX + kor[i * 2],
+		    spieler.MainMenuY + kor[i * 2 + 1], zoomx, zoomy, 0);
 	}
+
 	zoomx = 16;
 	zoomy = 16;
 	++m_flip;
 	if (m_flip < 12 * (spieler.DelaySpeed + 1)) {
+		int deltaX = 0;
+		if (menu_item == 4)
+			deltaX = -40;
+		else if (menu_item == 5)
+			deltaX = 40;
+
 		out->scale_set(menutaf->image[menu_item + 7],
-		                MENU_X + kor[(menu_item + 7) * 2] - 5,
+		                MENU_X + deltaX + kor[(menu_item + 7) * 2] - 5,
 		                spieler.MainMenuY + kor[(menu_item + 7) * 2 + 1] - 10, zoomx, zoomy, 0);
 	} else {
 		if (m_flip > 15 * (spieler.DelaySpeed + 1))
@@ -89,39 +108,12 @@ void plot_main_menu() {
 }
 
 void maus_mov_menu() {
-	warning("FIXME: maus_mov_menu - Get mouse coordinates");
-#if 0
-#pragma aux asm_get_mpos = \
-"push ax"\
-"push bx"\
-"push cx"\
-"push dx"\
-"mov ax,3"\
-"int 033h"\
-"mov maus_menu_x,cx"\
-"pop dx"\
-"pop cx"\
-"pop bx"\
-"pop ax"
-	asm_get_mpos();
-	if (maus_menu_x >= 200) {
-#pragma aux asm_set_pos =\
-"push ax"\
-"push bx"\
-"push cx"\
-"push dx"\
-"mov ax,4"\
-"mov cx,200 "\
-"mov maus_menu_x,cx"\
-"mov dx,0"\
-"int 033h"\
-"pop dx"\
-"pop cx"\
-"pop bx"\
-"pop ax"
-		asm_set_pos();
+	maus_menu_x = g_events->_mousePos.x;
+	if (maus_menu_x > 200) {
+		g_events->warpMouse(Common::Point(200, g_events->_mousePos.y));
+		maus_menu_x = 200;
 	}
-#endif
+
 	menu_item = (maus_menu_x / (MAUS_MENU_MAX_X / 5));
 }
 


Commit: dcf496fba98d933dd3fd43e29e83c7f867594db9
    https://github.com/scummvm/scummvm/commit/dcf496fba98d933dd3fd43e29e83c7f867594db9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Implementing zoom_set method

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index e4c03a432a2..3309479c74c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -324,10 +324,6 @@ void vors() {
 	gcury += fvory;
 }
 
-void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
-	warning("STUB - zoom_set");
-}
-
 void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
 	size_t charSize = (fontWidth / 8) * fontHeight;
 	byte *charSrcP = fontAddr + (c - fontFirst) * charSize;
@@ -381,4 +377,147 @@ void putch(char c) {
 	warning("STUB: putch()");
 }
 
+
+namespace Zoom {
+
+static int spriteHeight;
+static int spriteDeltaX1, spriteDeltaX2;
+static int spriteDeltaY1, spriteDeltaY2;
+static int spriteXVal1, spriteXVal2;
+static int spriteYVal1, spriteYVal2;
+
+static void setXVals() {
+	if (spriteDeltaX2 == 0) {
+		spriteXVal1 = 0;
+		spriteXVal2 = 1;
+	} else {
+		spriteXVal1 = spriteWidth / spriteDeltaX2;
+		spriteXVal2 = 1000 * (spriteWidth % spriteDeltaX2);
+		if (spriteDeltaX2)
+			spriteXVal2 /= spriteDeltaX2;
+	}
+}
+
+static void setYVals() {
+	if (spriteDeltaY2 == 0) {
+		spriteYVal1 = 0;
+		spriteYVal2 = 1;
+	} else {
+		spriteYVal1 = spriteHeight / spriteDeltaY2;
+		spriteYVal2 = 1000 * (spriteHeight % spriteDeltaY2);
+		if (spriteDeltaY2)
+			spriteYVal2 /= spriteDeltaY2;
+	}
+}
+
+void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
+	if (y < clipy1) {
+		int yCount = clipy1 - y;
+		spriteDeltaY2 -= yCount;
+
+		--yCount;
+		if (yCount >= 1) {
+			for (int yc = 0, countY = spriteYVal2; yc < yCount; ++yc) {
+				source += spriteWidth * spriteYVal1;
+				dest += SCREEN_WIDTH;
+
+				while (countY > 1000) {
+					countY -= 1000;
+					source += spriteWidth;
+				}
+			}
+		}
+	}
+
+	if (spriteDeltaY2 <= 0) {
+		source = nullptr;
+		return;
+	}
+
+	if (x < clipx1) {
+		int xCount = clipx1 - x;
+		spriteDeltaX2 -= xCount;
+
+		--xCount;
+		if (xCount >= 1) {
+			for (int xc = 0, countX = spriteXVal2; xc < xCount; ++xc) {
+				source += spriteXVal1;
+				while (countX >= 1000) {
+					countX -= 1000;
+					++source;
+				}
+			}
+		}
+	}
+
+	if (spriteDeltaX2 > 0) {
+		int x2 = x + spriteDeltaX2;
+		if (x2 >= clipx2) {
+			spriteDeltaX2 -= x2 - clipx2;
+		}
+
+		if (spriteDeltaY2 > 0) {
+			int y2 = y + spriteDeltaY2;
+			if (y2 >= clipy2) {
+				spriteDeltaY2 -= y2 - clipy2;
+			}
+			if (spriteDeltaY2 <= 0)
+				source = nullptr;
+		} else {
+			source = nullptr;
+		}
+	} else {
+		source = nullptr;
+	}
+}
+
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
+	spriteWidth = ((int16 *)source)[0];
+	spriteHeight = ((int16 *)source)[1];
+	source += 4;
+
+	setXVals();
+	setYVals();
+
+	byte *scrP;
+	if (scrWidth == 0) {
+		scrP = screenP + y * SCREEN_WIDTH + x;
+	} else {
+		scrP = screenP + y * scrWidth + x;
+	}
+
+	clip(source, scrP, x, y);
+
+	if (source) {
+		for (int yc = spriteDeltaY2, countY = spriteYVal2; yc > 0; --yc) {
+			for (int xc = spriteDeltaX2, countX = spriteXVal2; xc > 0; --xc) {
+				if (*source)
+					*scrP++ = *source;
+				source += spriteXVal1;
+				countX += spriteXVal2;
+				while (countX > 1000) {
+					countX -= 1000;
+					++source;
+				}
+			}
+
+			for (int ySkip = 0; ySkip < spriteYVal1; ++ySkip) {
+				source += spriteWidth;
+			}
+
+			scrP += SCREEN_WIDTH;
+			while (countY > 1000) {
+				countY -= 1000;
+				source += spriteWidth;
+			}
+		}
+	}
+}
+
+} // namespace Zoom
+
+void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
+	Zoom::zoom_set(source, x, y, xdiff_, ydiff_, scrWidth);
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index dd6f2aa36fe..92941ccfaec 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -1517,7 +1517,7 @@ int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 }
 
 void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
-	if ((xdiff_) || (ydiff_))
+	if (xdiff_ || ydiff_)
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
 	else
 		mspr_set_mcga(sptr, x, y, scrwidth);


Commit: 431ac4d685686dbd3daeb635d91afbccd0de0bf0
    https://github.com/scummvm/scummvm/commit/431ac4d685686dbd3daeb635d91afbccd0de0bf0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: zoom_set is rendering more properly

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 3309479c74c..4783520e1b7 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -471,11 +471,16 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 	}
 }
 
-void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrWidth) {
+void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 scrWidth) {
 	spriteWidth = ((int16 *)source)[0];
 	spriteHeight = ((int16 *)source)[1];
 	source += 4;
 
+	spriteDeltaX1 = xDiff;
+	spriteDeltaX2 = spriteWidth + xDiff;
+	spriteDeltaY1 = yDiff;
+	spriteDeltaY2 = spriteHeight + yDiff;
+
 	setXVals();
 	setYVals();
 
@@ -490,6 +495,7 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16
 
 	if (source) {
 		for (int yc = spriteDeltaY2, countY = spriteYVal2; yc > 0; --yc) {
+			byte *scrLine = scrP;
 			for (int xc = spriteDeltaX2, countX = spriteXVal2; xc > 0; --xc) {
 				if (*source)
 					*scrP++ = *source;
@@ -505,7 +511,7 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16
 				source += spriteWidth;
 			}
 
-			scrP += SCREEN_WIDTH;
+			scrP = scrLine + SCREEN_WIDTH;
 			while (countY > 1000) {
 				countY -= 1000;
 				source += spriteWidth;


Commit: 443766f348116fde2ac41d1da5242dd1d514a7ed
    https://github.com/scummvm/scummvm/commit/443766f348116fde2ac41d1da5242dd1d514a7ed
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Add support for mouse wheel to cycle cursors

Changed paths:
    engines/chewy/events.cpp


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index b3c6c9f32b4..9cd4457dd8f 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -62,6 +62,9 @@ void EventsManager::handleEvent(const Common::Event &event) {
 
 void EventsManager::handleMouseEvent(const Common::Event &event) {
 	_mousePos = event.mouse;
+	bool isWheelEnabled = !menu_display && !flags.InventMenu &&
+		g_engine->canSaveAutosaveCurrently() &&
+		menu_item >= CUR_WALK && menu_item <= CUR_TALK;
 
 	// Set mouse buttons
 	minfo.button = 0;
@@ -69,9 +72,37 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 	case Common::EVENT_LBUTTONDOWN:
 		minfo.button = 1;
 		break;
+
 	case Common::EVENT_RBUTTONDOWN:
 		minfo.button = 2;
 		break;
+
+	case Common::EVENT_WHEELUP:
+		// Cycle backwards through cursors
+		if (isWheelEnabled) {
+			if (--menu_item < 0)
+				menu_item = CUR_TALK;
+			cursor_wahl(menu_item);
+		}
+		return;
+
+	case Common::EVENT_WHEELDOWN:
+		// Cycle forwards through cursors
+		if (isWheelEnabled) {
+			if (++menu_item > CUR_TALK)
+				menu_item = CUR_WALK;
+			cursor_wahl(menu_item);
+		}
+		return;
+
+	case Common::EVENT_MBUTTONDOWN:
+		// Toggle between walk and look cursor
+		if (isWheelEnabled) {
+			menu_item = (menu_item == CUR_WALK) ? CUR_LOOK : CUR_WALK;
+			cursor_wahl(menu_item);
+		}
+		return;
+
 	default:
 		break;
 	}


Commit: cedbdda2402c88157a7f9acd6c4c1c8702ba4ebb
    https://github.com/scummvm/scummvm/commit/cedbdda2402c88157a7f9acd6c4c1c8702ba4ebb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Temporarily disable room 0 entry speech

Because I'm getting sick of hearing Chewy talk every
time I start up the game again

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 2759a97039f..368e7cf0322 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -133,9 +133,10 @@ void Room0::entry() {
 		while (!ani_timer[timer_nr[0]].TimeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
-
+#ifdef TODO_REENABLE
 		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(2, -1);
+#endif
 		show_cur();
 	}
 }
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 4783520e1b7..cabaa5a9d51 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -495,7 +495,9 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 sc
 
 	if (source) {
 		for (int yc = spriteDeltaY2, countY = spriteYVal2; yc > 0; --yc) {
+			byte *srcLine = source;
 			byte *scrLine = scrP;
+
 			for (int xc = spriteDeltaX2, countX = spriteXVal2; xc > 0; --xc) {
 				if (*source)
 					*scrP++ = *source;
@@ -507,11 +509,14 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 sc
 				}
 			}
 
+			source = srcLine;
+			scrP = scrLine + SCREEN_WIDTH;
+
 			for (int ySkip = 0; ySkip < spriteYVal1; ++ySkip) {
 				source += spriteWidth;
 			}
 
-			scrP = scrLine + SCREEN_WIDTH;
+			countY += spriteYVal2;
 			while (countY > 1000) {
 				countY -= 1000;
 				source += spriteWidth;


Commit: 2381c1ab769bf67514194674c16bbe4678c16a75
    https://github.com/scummvm/scummvm/commit/2381c1ab769bf67514194674c16bbe4678c16a75
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:09-08:00

Commit Message:
CHEWY: Further fix for action menu

Changed paths:
    engines/chewy/menus.cpp


diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 5cba0525aef..740f9986db0 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -56,9 +56,10 @@ int16 inv_rand_y;
 int16 show_invent_menu;
 
 void plot_main_menu() {
+	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
 	int16 i;
 	int16 zoomx, zoomy;
-	int16 *kor;
+	int16 *korrektur;
 
 	if (menu_item != tmp_menu) {
 		m_flip = 0;
@@ -66,7 +67,7 @@ void plot_main_menu() {
 	}
 
 	maus_mov_menu();
-	kor = (int16 *)menutaf->korrektur;
+	korrektur = (int16 *)menutaf->korrektur;
 
 	for (i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
@@ -84,8 +85,10 @@ void plot_main_menu() {
 				deltaX = -40;
 		}
 
-		out->scale_set(menutaf->image[i], MENU_X + deltaX + kor[i * 2],
-		    spieler.MainMenuY + kor[i * 2 + 1], zoomx, zoomy, 0);
+		out->scale_set(menutaf->image[i],
+			MENU_X + deltaX + korrektur[i * 2],
+		    spieler.MainMenuY + korrektur[i * 2 + 1],
+			zoomx, zoomy, 0);
 	}
 
 	zoomx = 16;
@@ -93,14 +96,16 @@ void plot_main_menu() {
 	++m_flip;
 	if (m_flip < 12 * (spieler.DelaySpeed + 1)) {
 		int deltaX = 0;
-		if (menu_item == 4)
+		if (menu_item == CUR_INVENT)
 			deltaX = -40;
-		else if (menu_item == 5)
+		else if (menu_item == CUR_SAVE)
 			deltaX = 40;
 
-		out->scale_set(menutaf->image[menu_item + 7],
-		                MENU_X + deltaX + kor[(menu_item + 7) * 2] - 5,
-		                spieler.MainMenuY + kor[(menu_item + 7) * 2 + 1] - 10, zoomx, zoomy, 0);
+		int img = IMAGES[menu_item];
+		out->scale_set(menutaf->image[img],
+		    MENU_X + deltaX + korrektur[img * 2] - 5,
+		    spieler.MainMenuY + korrektur[img * 2 + 1] - 10,
+			zoomx, zoomy, 0);
 	} else {
 		if (m_flip > 15 * (spieler.DelaySpeed + 1))
 			m_flip = 0;


Commit: cdc8bc4e58ac2df1edac69a1a6c6f7a57cd5f7e3
    https://github.com/scummvm/scummvm/commit/cdc8bc4e58ac2df1edac69a1a6c6f7a57cd5f7e3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Respect the ScummVM speech/subtitle setting

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/file.cpp
    engines/chewy/inits.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index c36fdf31009..19e7d1e615a 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -22,6 +22,7 @@
 
 #include "audio/audiostream.h"
 #include "audio/decoders/raw.h"
+#include "common/config-manager.h"
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
 #include "chewy/file.h"
@@ -192,6 +193,14 @@ void ailScummVM::waitForSpeechToFinish() {
 	}
 }
 
+bool ailScummVM::hasSubtitles() {
+	return ConfMan.getBool("subtitles");
+}
+
+bool ailScummVM::isSpeechMuted() {
+	return ConfMan.getBool("speech_mute");
+}
+
 
 ailclass::ailclass() {
 #if 0
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 5270371789f..0f32ab403ad 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -56,6 +56,16 @@ public:
 	 * Helper method to wait until any playing speech is finished
 	 */
 	void waitForSpeechToFinish();
+
+	/**
+	 * Returns true if subtitles are enabled
+	 */
+	bool hasSubtitles();
+
+	/**
+	 * Returns true if speech is muted
+	 */
+	bool isSpeechMuted();
 };
 
 class ailclass : public ailScummVM {
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 710d72fbf63..c8c3e9097d8 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -104,8 +104,19 @@ void atdsys::set_string_end_func
 	atdsv.aad_str = str_func;
 }
 
-void atdsys::set_display(int16 mode) {
-	atdsv.Display = mode;
+void atdsys::setHasSpeech(bool hasSpeech) {
+	_hasSpeech = hasSpeech;
+	updateSoundSettings();
+}
+
+void atdsys::updateSoundSettings() {
+	atdsv.Display = DISPLAY_TXT;
+
+	if (_hasSpeech) {
+		// TODO: In the future, properly implement DISPLAY_ALL
+		if (!ailsnd->isSpeechMuted())
+			atdsv.Display = DISPLAY_VOC;
+	}
 }
 
 int16 atdsys::get_delay(int16 txt_len) {
@@ -735,26 +746,25 @@ void atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 }
 
 char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
-	char *str_;
-	int16 ende;
-	str_ = txt_adr;
-	ende = 0;
-	while (!ende) {
-		if (str_[0] == (char)BLOCKENDE &&
-		        str_[1] == (char)BLOCKENDE &&
-		        str_[2] == (char)BLOCKENDE) {
+	char *strP = txt_adr;
+	int ende = 0;
+
+	for (; !ende; ++strP) {
+		if (strP[0] == (char)BLOCKENDE &&
+		        strP[1] == (char)BLOCKENDE &&
+		        strP[2] == (char)BLOCKENDE) {
 			ende = 2;
-		} else if (str_[0] == (char)0xf2 && str_[1] == (char)0xfe) {
-			if (str_[2] == (char)txt_mode)
+		} else if (strP[0] == (char)0xf2 && strP[1] == (char)0xfe) {
+			if (strP[2] == (char)txt_mode)
 				ende = 1;
-			str_ += 3;
+			strP += 2;
 		}
 	}
 
 	if (ende == 2)
-		str_ = 0;
+		strP = nullptr;
 
-	return str_;
+	return strP;
 }
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index f7dfb665292..fd4c602542b 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -253,7 +253,8 @@ public:
 
 	void set_font(byte *font_adr, int16 fvorx, int16 fhoehe);
 	void set_delay(int16 *delay, int16 silent);
-	void set_display(int16 mode);
+	void setHasSpeech(bool hasSpeech);
+	void updateSoundSettings();
 	void set_split_win(int16 nr, SplitStringInit *ssinit);
 	SplitStringRet *split_string(SplitStringInit *ssi);
 	void calc_txt_win(SplitStringInit *ssi);
@@ -344,6 +345,7 @@ private:
 	char *inv_use_mem;
 	int16 tmp_delay;
 	in_zeiger *inzeig;
+	bool _hasSpeech = false;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index c0876af83ee..a57a59f5498 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -533,12 +533,12 @@ void option_menue(taf_info *ti) {
 				if (spieler.DisplayText) {
 					if (flags.InitSound) {
 						spieler.DisplayText = false;
-						atds->set_display(DISPLAY_VOC);
+						atds->setHasSpeech(true);
 						spieler.SpeechSwitch = true;
 					}
 				} else {
 					spieler.DisplayText = true;
-					atds->set_display(DISPLAY_TXT);
+					atds->setHasSpeech(false);
 					spieler.SpeechSwitch = false;
 				}
 				break;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 8c48338e114..119473b69f0 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -489,7 +489,7 @@ void sound_init() {
 			ailsnd->init_double_buffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
 			atds->set_speech_handle(speech_handle);
 
-			atds->set_display(DISPLAY_VOC);
+			atds->setHasSpeech(true);
 			spieler.DisplayText = false;
 		}
 


Commit: edfa9309b2632eacfcef27789e2e2e916dacb85f
    https://github.com/scummvm/scummvm/commit/edfa9309b2632eacfcef27789e2e2e916dacb85f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Rename room 0 action1 to getPillow

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 368e7cf0322..f4a1e7e4238 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -141,7 +141,7 @@ void Room0::entry() {
 	}
 }
 
-bool Room0::action1() {
+bool Room0::getPillow() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		flags.AutoAniPlay = true;
@@ -154,6 +154,7 @@ bool Room0::action1() {
 		det->hide_static_spr(6);
 
 		flags.AutoAniPlay = false;
+		show_cur();
 		return true;
 	}
 
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 6cc4bc5669d..917d3ea4fbf 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -56,7 +56,7 @@ public:
 
 	static void auge_ani();
 	static void fuett_ani();
-	static bool action1();
+	static bool getPillow();
 	static bool action2();
 };
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 8035cbfc09a..0f1fb925956 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -87,7 +87,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 174:
-						action_ret = Room0::action1();
+						action_ret = Room0::getPillow();
 						break;
 
 					case 175:


Commit: 5c44229c0423626eea671d274bef98ffe6cfd0d0
    https://github.com/scummvm/scummvm/commit/5c44229c0423626eea671d274bef98ffe6cfd0d0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Fix finishing room 0 action2

Changed paths:
    engines/chewy/episode1.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index f4a1e7e4238..3bd6f5761dc 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -174,6 +174,8 @@ bool Room0::action2() {
 		cursor_wahl(0);
 		atds->set_steuer_bit(175, 1, 1);
 
+		flags.AutoAniPlay = false;
+		show_cur();
 		return true;
 	}
 


Commit: be163111ae76984850ffbf37dbf421cca76b0806
    https://github.com/scummvm/scummvm/commit/be163111ae76984850ffbf37dbf421cca76b0806
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Fix option_icons array values

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/maus.cpp
    engines/chewy/maus.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index a57a59f5498..5c9a319f750 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -124,7 +124,7 @@ int16 file_menue() {
 	int16 rect, line;
 	taf_info *ti;
 	ret = 0;
-	room->open_handle("BACK/GBOOK.TGP", "rb", R_TGPDATEI);
+	room->open_handle("back/gbook.tgp", "rb", R_TGPDATEI);
 	ERROR
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
 	ERROR;
@@ -375,16 +375,18 @@ int16 file_menue() {
 	return ret;
 }
 
-int16 option_icons[9 * 4] = { 18, 61, 40, 76,
-                              112, 61, 130, 76,
-                              82, 104, 144, 139,
-                              164, 93, 194, 115,
-                              198, 80, 206, 115,
-                              210, 55, 302, 138,
-                              126, 146, 210, 198,
-                              32, 104, 42, 136,
-                              52, 104, 62, 136
-                            };
+const int16 OPTION_ICONS[9 * 4] = {
+	 18,   61,   40,   76,
+	112,   61,  130,   76,
+	 82,  104,  144,  139,
+	164,   93,  194,  115,
+	198,   80,  206,  115,
+	210,   55,  302,  138,
+	126,  146,  210,  198,
+	 22,   92,   44,  136,
+	 50,   92,   72,  136
+};
+
 #define SURIMY_START 0
 #define SURIMY_END 7
 #define SCHNULLER 8
@@ -507,7 +509,7 @@ void option_menue(taf_info *ti) {
 		key = in->get_switch_code();
 		if ((minfo.button == 1) || (key == ENTER)) {
 			WAIT_TASTE_LOS
-			rect = in->maus_vector(minfo.x, minfo.y, option_icons, 9);
+			rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
 				if (spieler.FramesPerSecond > 6)
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 7ff80cdf59e..e079e4f25fe 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -85,7 +85,7 @@ void maus::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
 	// Mouse clip rectangle isn't supported in ScummVM
 }
 
-int16 maus::maus_vector(int16 x, int16 y, int16 *tbl,
+int16 maus::maus_vector(int16 x, int16 y, const int16 *tbl,
                             int16 anz) {
 	int16 i, j;
 	i = -1;
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index 6fdf46fd443..c6310687c81 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -77,7 +77,7 @@ public:
 	void neuer_maushandler(maus_info *mpos);
 	maus_info *maus_info_adr();
 
-	int16 maus_vector(int16 x, int16 y, int16 *tbl, int16 anz);
+	int16 maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
 	in_zeiger *get_in_zeiger();
 	int16 get_switch_code();


Commit: 786b5927ff3f189b319ca2e77d8f7b412ed0bc77
    https://github.com/scummvm/scummvm/commit/786b5927ff3f189b319ca2e77d8f7b412ed0bc77
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Don't reset mouse buttons on mouse move

Changed paths:
    engines/chewy/events.cpp


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 9cd4457dd8f..f0d20962f0c 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -66,8 +66,10 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 		g_engine->canSaveAutosaveCurrently() &&
 		menu_item >= CUR_WALK && menu_item <= CUR_TALK;
 
-	// Set mouse buttons
-	minfo.button = 0;
+	// Different event types handling
+	if (event.type != Common::EVENT_MOUSEMOVE)
+		minfo.button = 0;
+
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
 		minfo.button = 1;


Commit: 4e541a57fc879285aad1232ae142fac74fed00d1
    https://github.com/scummvm/scummvm/commit/4e541a57fc879285aad1232ae142fac74fed00d1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Rename room 0 action2 to pullSlime

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 3bd6f5761dc..ad2ef061c17 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -161,7 +161,7 @@ bool Room0::getPillow() {
 	return false;
 }
 
-bool Room0::action2() {
+bool Room0::pullSlime() {
 	if (!spieler.inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 917d3ea4fbf..08369ee0b60 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -57,7 +57,7 @@ public:
 	static void auge_ani();
 	static void fuett_ani();
 	static bool getPillow();
-	static bool action2();
+	static bool pullSlime();
 };
 
 void r2_jump_out_r1(int16 nr);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 0f1fb925956..0602285eee4 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -91,7 +91,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 175:
-						action_ret = Room0::action2();
+						action_ret = Room0::pullSlime();
 						break;
 
 					case 229:


Commit: 31f8c60cd9607ce16609404457ba280bb971fa7a
    https://github.com/scummvm/scummvm/commit/31f8c60cd9607ce16609404457ba280bb971fa7a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:10-08:00

Commit Message:
CHEWY: Save & Inventory cursors were swapped in release game

Changed paths:
    engines/chewy/defines.h
    engines/chewy/menus.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index f8c4712a5fc..43a85bf7248 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -69,8 +69,8 @@ enum SetupScreenMode {
 #define CUR_USE 1
 #define CUR_LOOK 2
 #define CUR_TALK 3
-#define CUR_INVENT 4
-#define CUR_SAVE 5
+#define CUR_SAVE 4
+#define CUR_INVENT 5
 #define CUR_NO_WALK 6
 #define CUR_NOPE 7
 #define CUR_AK_INVENT 8
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 740f9986db0..687a7b41eca 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -96,9 +96,9 @@ void plot_main_menu() {
 	++m_flip;
 	if (m_flip < 12 * (spieler.DelaySpeed + 1)) {
 		int deltaX = 0;
-		if (menu_item == CUR_INVENT)
+		if (menu_item == CUR_SAVE)
 			deltaX = -40;
-		else if (menu_item == CUR_SAVE)
+		else if (menu_item == CUR_INVENT)
 			deltaX = 40;
 
 		int img = IMAGES[menu_item];
@@ -246,8 +246,8 @@ void invent_menu() {
 	ret_look = -1;
 	menu_first = false;
 	show_invent_menu = 1;
-	while (show_invent_menu == 1) {
 
+	while (show_invent_menu == 1 && !SHOULD_QUIT) {
 		if (!minfo.button)
 			maus_flag = 0;
 		if (minfo.button == 1 || kbinfo.key_code == ENTER) {


Commit: 6d618f0811d287186781f04a0f58324fa92888d1
    https://github.com/scummvm/scummvm/commit/6d618f0811d287186781f04a0f58324fa92888d1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Updates to inventory menu

Changed paths:
    engines/chewy/defines.h
    engines/chewy/menus.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 43a85bf7248..d2e790cf4e9 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -105,7 +105,7 @@ enum SetupScreenMode {
 #define WIN_LOOK_X 30
 #define WIN_LOOK_Y 150
 #define PFEIL_UP 26
-#define HOT_INVENT_ANZ 8
+#define INVENTORY_HOTSPOTS_COUNT 8
 #define HOT_LOOK_ANZ 2
 #define MES_RAHMEN 1
 #define MES_NO_RAHMEN 2
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 687a7b41eca..13ab8c59d48 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -30,7 +30,7 @@ namespace Chewy {
 void r44_look_news();
 void r58_look_cut_mag(int16 r_nr);
 
-int16 hot_inventar[HOT_INVENT_ANZ][4] = {
+static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
 
 	{WIN_INF_X + 6, WIN_INF_Y + 10, WIN_INF_X + 6 + 30, WIN_INF_Y + 10 + 14},
 
@@ -54,6 +54,7 @@ int16 tmp_menu;
 int16 inv_rand_x;
 int16 inv_rand_y;
 int16 show_invent_menu;
+static int keyVal;
 
 void plot_main_menu() {
 	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
@@ -130,15 +131,17 @@ void plot_inventar_menu() {
 	out->setze_zeiger(workptr);
 	build_menu(WIN_INVENTAR);
 
-	for (j = 0; j < 3; j++)
+	for (j = 0; j < 3; j++) {
 		for (i = 0; i < 5; i++)
 			out->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
-			               WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
-	k = in->maus_vector(minfo.x, minfo.y, (int16 *)hot_inventar, HOT_INVENT_ANZ);
+			    WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
+	}
+
+	k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 	if (k != -1) {
 		if (k < 5)
-			out->box_fill(hot_inventar[k][0], hot_inventar[k][1],
-			               hot_inventar[k][2] + 1, hot_inventar[k][3] + 5, 41);
+			out->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
+			               INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
 		else {
 			x = (minfo.x - (WIN_INF_X)) / 54;
 			y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
@@ -201,15 +204,15 @@ void invent_menu() {
 	int16 menu_flag1;
 	int16 maus_flag;
 	int16 taste_flag;
-
 	int16 i, k;
-
 	int16 abfrage;
 	int16 tmp, tmp1;
 	int16 disp_tmp;
 	int16 ret_look;
 	int16 ani_tmp;
 	int16 menu_first;
+
+	keyVal = 0;
 	flags.InventMenu = true;
 	disp_tmp = spieler.DispFlag;
 	spieler.DispFlag = false;
@@ -235,14 +238,17 @@ void invent_menu() {
 		invent_cur_mode = CUR_USE;
 		cursor_wahl(CUR_USE);
 	}
+
 	menu_flag1 = MENU_EINBLENDEN;
 	taste_flag = 28;
 	kbinfo.key_code = '\0';
 	maus_flag = 1;
+
 	for (i = 0; i < 3; i++) {
 		ani_invent_delay[i][0] = 30000;
 		ani_count[i] = ani_invent_anf[i];
 	}
+
 	ret_look = -1;
 	menu_first = false;
 	show_invent_menu = 1;
@@ -250,21 +256,27 @@ void invent_menu() {
 	while (show_invent_menu == 1 && !SHOULD_QUIT) {
 		if (!minfo.button)
 			maus_flag = 0;
-		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+		if (minfo.button == 1 || kbinfo.key_code == ENTER || keyVal) {
 			if (!maus_flag) {
 				maus_flag = 1;
 				kbinfo.key_code = '\0';
-				k = in->maus_vector(minfo.x, minfo.y, (int16 *)hot_inventar, HOT_INVENT_ANZ);
-				if (in->hot_key == F1_KEY)
+
+				k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+				if (keyVal == F1_KEY)
 					k = 0;
-				else if (in->hot_key == F2_KEY)
+				else if (keyVal == F2_KEY)
 					k = 1;
+				else if (keyVal == ENTER)
+					k = 5;
+
+				keyVal = 0;
+
 				switch (k) {
 				case 0:
 					invent_cur_mode = CUR_USE;
 					menu_item = CUR_USE;
 					if (spieler.AkInvent == -1) {
-						cursor_wahl(invent_cur_mode);
+						cursor_wahl(CUR_USE);
 					} else {
 						cursor_wahl(CUR_AK_INVENT);
 					}
@@ -280,7 +292,7 @@ void invent_menu() {
 					} else {
 						invent_cur_mode = CUR_LOOK;
 						menu_item = CUR_LOOK;
-						cursor_wahl(invent_cur_mode);
+						cursor_wahl(CUR_LOOK);
 					}
 					break;
 
@@ -299,9 +311,7 @@ void invent_menu() {
 					k += spieler.InventY * 5;
 					if (invent_cur_mode == CUR_USE) {
 						if (spieler.AkInvent == -1) {
-
 							if (spieler.InventSlot[k] != -1) {
-
 								if (calc_use_invent(spieler.InventSlot[k]) == false) {
 									menu_item = CUR_USE;
 									spieler.AkInvent = spieler.InventSlot[k];
@@ -320,10 +330,7 @@ void invent_menu() {
 								cursor_wahl(invent_cur_mode);
 							}
 						}
-					}
-
-					else if (invent_cur_mode == CUR_LOOK) {
-
+					} else if (invent_cur_mode == CUR_LOOK) {
 						if (spieler.InventSlot[k] != -1) {
 							if (calc_use_invent(spieler.InventSlot[k]) == false) {
 								spieler.AkInvent = spieler.InventSlot[k];
@@ -336,6 +343,8 @@ void invent_menu() {
 					}
 					break;
 
+				default:
+					break;
 				}
 			}
 		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
@@ -346,33 +355,34 @@ void invent_menu() {
 		}
 
 		if (ret_look == 0) {
-
 			invent_cur_mode = CUR_USE;
 			menu_item = CUR_USE;
 			if (spieler.AkInvent == -1)
-				cursor_wahl(invent_cur_mode);
+				cursor_wahl(CUR_USE);
 			else
 				cursor_wahl(CUR_AK_INVENT);
-		}
-		else if (ret_look == 5) {
+		} else if (ret_look == 5) {
 			taste_flag = false;
 			maus_flag = 0;
 			minfo.button = 1;
+			keyVal = ENTER;
 		}
+
 		ret_look = -1;
 		abfrage = in->get_switch_code();
 		cur->hide_cur();
+
 		if (taste_flag) {
 			if (abfrage != taste_flag)
 				taste_flag = 0;
 		} else {
 			switch (abfrage) {
 			case F1_KEY:
-				in->hot_key = F1_KEY;
+				keyVal = F1_KEY;
 				break;
 
 			case F2_KEY:
-				in->hot_key = F2_KEY;
+				keyVal = F2_KEY;
 				break;
 
 			case ESC:
@@ -428,9 +438,12 @@ void invent_menu() {
 				kbinfo.key_code = '\0';
 				break;
 
+			default:
+				break;
 			}
 			menu_first = true;
 		}
+
 		if (show_invent_menu != 2) {
 			set_up_screen(NO_SETUP);
 			cur->move(minfo.x, minfo.y);
@@ -450,17 +463,20 @@ void invent_menu() {
 			menu_flag1 = false;
 			out->set_clip(0, 0, 320, 200);
 			out->back2screen(workpage);
-		} else
+		} else {
 			show_cur();
+		}
 	}
+
 	cur->move(maus_old_x, maus_old_y);
 	minfo.x = maus_old_x;
 	minfo.y = maus_old_y;
-	while (in->get_switch_code() == ESC) {
+	while (in->get_switch_code() == ESC && !SHOULD_QUIT) {
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
 		out->back2screen(workpage);
 	}
+
 	in->speed(tmp, tmp * 2);
 	flags.InventMenu = false;
 	flags.AutoAniPlay = ani_tmp;
@@ -516,7 +532,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		ende = 1;
 	while (!ende) {
 
-		rect = in->maus_vector(minfo.x, minfo.y, (int16 *)hot_inventar, HOT_INVENT_ANZ);
+		rect = in->maus_vector(minfo.x, minfo.y, (int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 		if (minfo.button) {
 			if (minfo.button == 2) {
 				if (!maus_flag)


Commit: 50634a53cd577c74474472aeccc7063bfe2d0b04
    https://github.com/scummvm/scummvm/commit/50634a53cd577c74474472aeccc7063bfe2d0b04
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Change the structure SIZE() methods to return int

Many times the methods are being used to seek backwards,
so having them return int saves explicit int casts so
the values can be negated without unsigned warnings

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/datei.cpp
    engines/chewy/detail.cpp
    engines/chewy/flic.cpp
    engines/chewy/ngstypes.h
    engines/chewy/objekt.h
    engines/chewy/room.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 19e7d1e615a..131492f4af2 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -631,7 +631,7 @@ void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
 	Common::SeekableReadStream *src = dynamic_cast<Common::SeekableReadStream *>(v);
 	assert(src);
 
-	src->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+	src->seek(-ChunkHead::SIZE(), SEEK_CUR);
 	ChunkHead ch;
 	if (!ch.load(src))
 		::error("Error loading speech");
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index c8c3e9097d8..437b3892d10 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -322,7 +322,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 			switch (mode) {
 			case INV_USE_DATEI:
 				mem->file->select_pool_item(rs, atdspooloff[mode]);
-				chewy_fseek(rs, -(int)(sizeof(ChunkHead)), SEEK_CUR);
+				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				if (!Ch.load(rs)) {
 					modul = DATEI;
@@ -419,7 +419,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 
 	if (stream && txt_adr) {
 		mem->file->select_pool_item(stream, chunk_nr + atdspooloff[mode]);
-		stream->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+		stream->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!Ch.load(stream)) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -446,7 +446,7 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	if (atdshandle[ADH_HANDLE]) {
 		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
 
-		chewy_fseek(atdshandle[ADH_HANDLE], -(int)sizeof(ChunkHead), SEEK_CUR);
+		chewy_fseek(atdshandle[ADH_HANDLE], -sizeof(ChunkHead), SEEK_CUR);
 		if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, atdshandle[ADH_HANDLE])) {
 			modul = DATEI;
 			fcode = READFEHLER;
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index a6a45a4b3cb..4065bd4fe48 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -706,7 +706,7 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 
 	if (rs) {
-		rs->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 		if (!ch->load(rs)) {
 			modul = DATEI;
@@ -887,7 +887,7 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	int16 i;
 
 	if (rs) {
-		rs->seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!ch->load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -1472,7 +1472,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 		} else {
 			if (!strncmp(Nph->id, "NGS", 3)) {
 				select_pool_item(&f, chunk_start);
-				f.seek(-(int)ChunkHead::SIZE(), SEEK_CUR);
+				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
 				        && i < (chunk_start + chunk_anz); i++) {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 15aa1040752..951c6284110 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -180,7 +180,7 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 	if (fname_ && f.open(fname_)) {
 		if (rdi_datei_header.load(&f)) {
 			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
-				f.seek(room_nr * (int64)room_detail_info::SIZE(), SEEK_CUR);
+				f.seek(room_nr * room_detail_info::SIZE(), SEEK_CUR);
 
 				if (!rdi.load(&f)) {
 					modul = DATEI;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index ff8c672bb71..2ec520d5a84 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -159,7 +159,7 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 						} while (ende <= start);
 						++CurrentFrame;
 					} else {
-						rs->seek(frame_header.size - (int)FrameHead::SIZE(), SEEK_CUR);
+						rs->seek((int)frame_header.size - FrameHead::SIZE(), SEEK_CUR);
 					}
 				}
 			}
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 253fa0adcd3..170ef227d50 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -503,7 +503,7 @@ struct ChunkHead {
 	uint16 type = 0;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() { return 6; }
+	static constexpr int SIZE() { return 6; }
 };
 
 struct CustomFlicHead {
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index 44972511cdf..5eeabcd8ea5 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -50,7 +50,7 @@ struct RoomMovObjekt {
 
 	void synchronize(Common::Serializer &s);
 	bool load(Common::SeekableReadStream *src);
-	static constexpr size_t SIZE() { return 24; }
+	static constexpr int SIZE() { return 24; }
 };
 
 struct IibDateiHeader {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 43fce4e2005..ea4dc91e1da 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -258,7 +258,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 		}
 
 		if (!modul) {
-			rs->seek(-(int)tbf_dateiheader::SIZE(), SEEK_CUR);
+			rs->seek(-tbf_dateiheader::SIZE(), SEEK_CUR);
 			Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), tb.entpsize + 4);
 
 			if (Rb->AkAblage == -1) {


Commit: de5c27661a8cfc70577b8f97dac64b7b2bd393ac
    https://github.com/scummvm/scummvm/commit/de5c27661a8cfc70577b8f97dac64b7b2bd393ac
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Refactoring reading

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/datei.cpp
    engines/chewy/detail.h
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 437b3892d10..a50bf2fc9fc 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -34,14 +34,23 @@ int16 mouse_push;
 int print_delay_count1;
 int print_delay_count2;		// TODO: seems to be unused
 
-void AtsTxtHeader::load(Common::SeekableReadStream *src) {
+bool AtsTxtHeader::load(Common::SeekableReadStream *src) {
 	TxtNr = src->readUint16LE();
 	AMov = src->readUint16LE();
 	CurNr = src->readUint16LE();
+	return true;
 }
 
-void AtsStrHeader::load(Common::SeekableReadStream *src) {
+bool InvUse::load(Common::SeekableReadStream *src) {
+	ObjId = src->readSint16LE();
+	ObjNr = src->readSint16LE();
+	TxtNr = src->readSint16LE();
+	return true;
+}
+
+bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 	VocNr = src->readUint16LE();
+	return true;
 }
 
 
@@ -446,12 +455,15 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	if (atdshandle[ADH_HANDLE]) {
 		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
 
-		chewy_fseek(atdshandle[ADH_HANDLE], -sizeof(ChunkHead), SEEK_CUR);
-		if (!chewy_fread(&Ch, sizeof(ChunkHead), 1, atdshandle[ADH_HANDLE])) {
+		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
+			atdshandle[ADH_HANDLE]);
+		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
+
+		if (!Ch.load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
-			chewy_fseek(atdshandle[ADH_HANDLE], 0, SEEK_CUR);
+			//chewy_fseek(atdshandle[ADH_HANDLE], 0, SEEK_CUR);
 			if (Ch.size) {
 				if (!chewy_fwrite(atdsmem[ADH_HANDLE], Ch.size, 1, atdshandle[ADH_HANDLE])) {
 					fcode = WRITEFEHLER;
@@ -1397,20 +1409,27 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 		if (inv_block_nr != cur_inv) {
 			inv_block_nr = cur_inv + 1;
 			load_atds(inv_block_nr + atdspooloff[mode], INV_USE_DATEI);
-			if (atdshandle[INV_IDX_HANDLE]) {
-				chewy_fseek(atdshandle[INV_IDX_HANDLE], sizeof(InvUse)*inv_block_nr
-				      *INV_STRC_ANZ, SEEK_SET);
-				if
-				(!chewy_fread(atdsmem[INV_IDX_HANDLE], sizeof(InvUse)*INV_STRC_ANZ, 1, atdshandle[INV_IDX_HANDLE])) {
-					modul = DATEI;
-					fcode = READFEHLER;
+
+			Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
+				atdshandle[INV_IDX_HANDLE]);
+			if (rs) {
+				rs->seek(InvUse::SIZE() * inv_block_nr
+				      * INV_STRC_ANZ, SEEK_SET);
+
+				iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
+				for (i = 0; i < INV_STRC_ANZ; ++i, ++iu) {
+					if (!iu->load(rs)) {
+						modul = DATEI;
+						fcode = READFEHLER;
+						break;
+					}
 				}
 			} else {
 				modul = DATEI;
 				fcode = OPENFEHLER;
 			}
 		}
-		iu = (InvUse *) atdsmem[INV_IDX_HANDLE];
+		iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
 		ok = false;
 		for (i = 0; i < INV_STRC_ANZ && !ok; i++) {
 			if (iu[i].ObjId == mode) {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index fd4c602542b..2e65b5fbb42 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -140,6 +140,9 @@ struct InvUse {
 	int16 ObjId;
 	int16 ObjNr;
 	int16 TxtNr;
+
+	bool load(Common::SeekableReadStream *src);
+	static constexpr int SIZE() { return 6; }
 };
 
 struct AadInfo {
@@ -199,8 +202,8 @@ struct AdsNextBlk {
 struct AtsStrHeader {
 	uint16 VocNr = 0;
 
-	void load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 4; }
+	bool load(Common::SeekableReadStream *src);
+	static constexpr int SIZE() { return 4; }
 };
 
 struct AtsTxtHeader {
@@ -208,8 +211,8 @@ struct AtsTxtHeader {
 	uint16 AMov = 0;
 	uint16 CurNr = 0;
 
-	void load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 8; }
+	bool load(Common::SeekableReadStream *src);
+	static constexpr int SIZE() { return 8; }
 };
 
 struct AtsVar {
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 4065bd4fe48..6c5bd4093c8 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -893,7 +893,7 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 			fcode = READFEHLER;
 		} else {
 			if (ch->type == TMFDATEI) {
-				assert(ch->size > tmf_header::SIZE());
+				assert(ch->size > (uint32)tmf_header::SIZE());
 
 				if (!song->load(rs)) {
 					modul = DATEI;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index fec4302e210..a4be7fea391 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -45,7 +45,7 @@ struct RaumInfo {
 	uint8 Dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 4 * 1 + 14 + 1 + 1;
 	}
 };
@@ -57,7 +57,7 @@ struct RaumAutoMov {
 	uint8 dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 2 + 2 + 1 + 1;
 	}
 };
@@ -86,7 +86,7 @@ struct sound_def_blk {
 	int16 stereo[MAX_SOUNDS];
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 7 * 2 * MAX_SOUNDS;
 	}
 };
@@ -111,7 +111,7 @@ struct ani_detail_info {
 	int16 phase_nr;
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 2 + 2 + 1 + 1 + 2 * 8 + 1 + 1 +
 			sound_def_blk::SIZE() + 2 + 2;
 	}
@@ -126,7 +126,7 @@ struct static_detail_info {
 	uint8 Dummy;
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 2 + 2 + 2 + 2 + 1 + 1;
 	}
 };
@@ -145,7 +145,7 @@ struct room_detail_info {
 	byte *sample[MAXDETAILS * MAX_SOUNDS] = { 0 };
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 2 + 2 + 4 +
 			(ani_detail_info::SIZE() * MAXDETAILS) +
 			(static_detail_info::SIZE() * MAXDETAILS) +
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 170ef227d50..c27a63d6dde 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -62,7 +62,7 @@ struct tbf_dateiheader {
 	char palette[768];
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() {
+	static constexpr int SIZE() {
 		return 4 + 2 + 2 + 4 + 2 + 2 + 768;
 	}
 };
@@ -120,7 +120,7 @@ struct tff_header {
 	int16 height = 0;
 
 	bool load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 18; }
+	static constexpr int SIZE() { return 18; }
 };
 
 #define D_GR 16
@@ -270,7 +270,7 @@ struct tmf_header {
 	byte *ipos[31] = { nullptr };
 
 	bool load(Common::SeekableReadStream *src);
-	static const size_t SIZE() { return 0x284; }
+	static const int SIZE() { return 0x284; }
 };
 
 struct musik_info {
@@ -495,7 +495,7 @@ struct FrameHead {
 	uint8 reserved[8] = { 0 };
 
 	bool load(Common::SeekableReadStream *src);
-	static size_t SIZE() { return 16; }
+	static constexpr int SIZE() { return 16; }
 };
 
 struct ChunkHead {


Commit: 5dcf70d5711cbdd98eca314dd9a0e9f084f75574
    https://github.com/scummvm/scummvm/commit/5dcf70d5711cbdd98eca314dd9a0e9f084f75574
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Converting more data loading

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 6c5bd4093c8..cedce19772b 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -52,8 +52,17 @@ datei::datei() {
 datei::~datei() {
 }
 
+void datei::assign_filename(const char *fname, const char *ext) {
+	strncpy(filename, fname, MAXPATH - 5);
+	filename[MAXPATH - 5] = '\0';
+	if (!filename[0])
+		get_filename(filename, MAXPATH);
+	if (!strchr(filename, '.'))
+		strcat(filename, ext);
+}
+
 void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
-	Stream *handle;
+	Common::File f;
 	pcx_header *header;
 	uint8 zeichen;
 	uint16 count, i = 0, j = 0, index;
@@ -63,31 +72,26 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 	header = (pcx_header *)tmp;
 	abmess = (int16 *)speicher;
 	speicher += 4;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".PCX\0");
 
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (chewy_fread(header, sizeof(pcx_header), 1, handle)) {
+	assign_filename(fname, ".pcx");
+
+	if (f.open(filename)) {
+		if (header->load(&f)) {
 			if ((header->id == 10) && (header->version == 5) && (header->bpp == 8)) {
 				hoehe = (header->ymax - header->ymin) + 1;
 				breite = header->bpz * header->planes;
 
 				abmess[0] = breite;
 				abmess[1] = hoehe;
-				chewy_fseek(handle, 128L, SEEK_SET);
+				f.seek(128L, SEEK_SET);
 				for (i = 0; i < hoehe; i++) {
 					index = 0;
 					while (index < breite) {
-						zeichen = chewy_fgetc(handle);
+						zeichen = f.readByte();
 						if (((zeichen & 0xc0) == 0xc0) && (header->komp)) {
 							count = zeichen & 0x3f;
 
-							zeichen = chewy_fgetc(handle);
+							zeichen = f.readByte();
 							for (j = 0; j < count; j++) {
 
 								speicher[index] = zeichen;
@@ -100,11 +104,11 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 					}
 					speicher += breite;
 				}
-				if (!(chewy_fseek(handle, -769L, SEEK_END))) {
-					zeichen = chewy_fgetc(handle);
+				if (!(f.seek(-769L, SEEK_END))) {
+					zeichen = f.readByte();
 					if (zeichen == 12) {
-						chewy_fseek(handle, -768L, SEEK_END);
-						if ((chewy_fread(palette, 768, 1, handle)) != 1) {
+						f.seek(-768L, SEEK_END);
+						if (f.read(palette, 768) != 768) {
 							fcode = PALETTEFEHLER;
 							modul = DATEI;
 						} else {
@@ -129,7 +133,8 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -137,45 +142,41 @@ void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
 }
 
 void datei::load_image(const char *fname, byte *sp, byte *palette) {
-	Stream *handle;
+	Common::File f;
 	tbf_dateiheader *header;
 	uint16 i = 0;
 	int16 *abmess;
 	byte *speicher;
 	int16 format;
 	header = (tbf_dateiheader *)tmp;
+
 	speicher = sp;
-	abmess = (int16 *) speicher;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))strcat(filename, ".TBF\0");
+	abmess = (int16 *)speicher;
+
+	assign_filename(fname, ".tbf");
 
 	if ((speicher) && (palette)) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
+		if (f.open(filename)) {
+			if (header->load(&f)) {
 				format = get_id(header->id);
 				if (format != -1) {
 					for (i = 0; i < 768; i++)
 						palette[i] = header->palette[i];
-					chewy_fseek(handle, ((long)(sizeof(tbf_dateiheader) + 1)), SEEK_SET);
+					f.seek(tbf_dateiheader::SIZE() + 1, SEEK_SET);
 					switch (format) {
 					case TBFDATEI:
 						abmess[0] = header->width;
 						abmess[1] = header->height;
 						speicher += 4;
-						read_tbf_image(handle, header->komp,
-						               header->entpsize, speicher);
+						read_tbf_image(&f, header->komp,
+						    header->entpsize, speicher);
 						break;
 					case TPFDATEI:
 						abmess[0] = header->width;
 						abmess[1] = header->height;
 						speicher += 4;
-						read_tpf_image(handle, header->komp,
-						               header->entpsize, speicher);
+						read_tpf_image(&f, header->komp,
+						    header->entpsize, speicher);
 						break;
 					}
 				} else {
@@ -186,7 +187,8 @@ void datei::load_image(const char *fname, byte *sp, byte *palette) {
 				fcode = READFEHLER;
 				modul = DATEI;
 			}
-			chewy_fclose(handle);
+
+			f.close();
 		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
@@ -287,12 +289,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 	speicher = sp;
 	header = (taf_dateiheader *)tmp;
 
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))
-		strcat(filename, ".taf");
+	assign_filename(fname, ".taf");
 
 	abmess = (int16 *) speicher;
 	speicher += 4;
@@ -369,12 +366,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 	byte *speicher;
 	header = (taf_dateiheader *)tmp;
 
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))
-		strcat(filename, ".taf");
+	assign_filename(fname, ".taf");
 
 	speicher = hi_sp;
 	if (speicher) {
@@ -431,12 +423,7 @@ void datei::load_korrektur(const char *fname, int16 *sp) {
 	taf_dateiheader *header = (taf_dateiheader *)tmp;
 	int16 id;
 
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))
-		strcat(filename, ".taf");
+	assign_filename(fname, ".taf");
 
 	if (sp) {
 		if (f.open(filename)) {
@@ -563,40 +550,28 @@ void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size,
 
 void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
                         knopf *knpf) {
-	Stream *handle;
+	Common::File f;
 	int16 i = 0, j = 0;
 	knopf *lknpf;
 	menue *lmen;
 	lknpf = knpf;
 	lmen = men;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'D';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
-
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (!(chewy_fread(dial, sizeof(dialogue), 1, handle))) {
+
+	assign_filename(fname, ".tdf");
+
+	if (f.open(filename)) {
+		if (!dial->load(&f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else {
 			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
-				if (!(chewy_fread(lmen, sizeof(menue), 1, handle))) {
+				if (!lmen->load(&f)) {
 					fcode = READFEHLER;
 					modul = DATEI;
 				} else {
 					dial->menueliste[i] = lmen;
 					for (j = 0; (j < lmen->anzknoepfe) && (!modul); j++) {
-						if (!(chewy_fread(lknpf, sizeof(knopf), 1, handle))) {
+						if (!lknpf->load(&f)) {
 							fcode = READFEHLER;
 							modul = DATEI;
 						} else {
@@ -608,7 +583,8 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 				}
 			}
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -616,29 +592,16 @@ void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
 }
 
 void datei::load_sbi(const char *fname, sbi_inst *speicher) {
-	Stream *handle;
-	int16 i = 0;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'S';
-	filename[i + 2] = 'B';
-	filename[i + 3] = 'I';
-	filename[i + 4] = 0;
-
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (!(chewy_fread(speicher, sizeof(sbi_inst), 1, handle))) {
+	Common::File f;
+
+	assign_filename(fname, ".sbi");
+
+	if (f.open(filename)) {
+		if (!speicher->load(&f)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -650,33 +613,20 @@ void datei::load_sbi(const char *fname, sbi_inst *speicher) {
 }
 
 uint32 datei::load_voc(const char *fname, byte *speicher) {
-	Stream *handle;
-	int16 i = 0;
+	Common::File f;
 	voc_header *header;
 	uint32 s;
 	byte *sp = nullptr;
 	header = (voc_header *)tmp;
 	sp = speicher;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'V';
-	filename[i + 2] = 'O';
-	filename[i + 3] = 'C';
-	filename[i + 4] = 0;
+
+	assign_filename(fname, ".voc");
 
 	s = size(filename, VOCDATEI);
 
 	if (!modul) {
-		handle = chewy_fopen(filename, "rb");
-		if (handle) {
-			if (!(chewy_fread(header, sizeof(voc_header), 1, handle))) {
+		if (f.open(filename)) {
+			if (!header->load(&f)) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
@@ -684,14 +634,15 @@ uint32 datei::load_voc(const char *fname, byte *speicher) {
 					modul = DATEI;
 					fcode = NOTVOC;
 				} else {
-					chewy_fseek(handle, header->offset, SEEK_SET);
-					if (!(chewy_fread(sp, s, 1, handle))) {
+					f.seek(header->offset, SEEK_SET);
+					if (f.read(sp, s) != s) {
 						modul = DATEI;
 						fcode = READFEHLER;
 					}
 				}
 			}
-			chewy_fclose(handle);
+
+			f.close();
 		} else {
 			fcode = OPENFEHLER;
 			modul = DATEI;
@@ -728,29 +679,17 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 }
 
 void datei::load_vocinfo(const char *fname, voc_header *speicher) {
-	Stream *handle;
-	int16 i = 0;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'V';
-	filename[i + 2] = 'O';
-	filename[i + 3] = 'C';
-	filename[i + 4] = 0;
-
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (!(chewy_fread(speicher, sizeof(voc_header), 1, handle))) {
+	Common::File f;
+
+	assign_filename(fname, ".voc");
+
+	if (f.open(filename)) {
+		if (!speicher->load(&f)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -935,17 +874,8 @@ void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
 	header = (pcx_header *)tmp;
 	abmess = (int16 *)speicher;
 	sptr = speicher + 4;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	for (i = 0; (filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)); i++);
-	filename[i] = '.';
-	filename[i + 1] = 'P';
-	filename[i + 2] = 'C';
-	filename[i + 3] = 'X';
-	filename[i + 4] = 0;
+
+	assign_filename(fname, ".pcx");
 
 	breite = abmess[0];
 	hoehe = abmess[1];
@@ -1028,19 +958,8 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 	byte *speicher;
 	uint32 size = 0, allsize = 0, next = 0;
 	header = (taf_dateiheader *)tmp;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'A';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
+
+	assign_filename(fname, ".taf");
 
 	handle = chewy_fopen(filename, "wb");
 	if (handle) {
@@ -1104,25 +1023,11 @@ void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
 void datei::save_tff(const char *fname, byte *speicher) {
 	Stream *handle;
 	uint32 size;
-	uint16 i = 0;
-	tff_header *tff;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if (speicher) {
-		tff = (tff_header *) speicher;
-		if ((*filename) == 0)
-			get_filename(filename, MAXPATH);
-		if (!strchr(filename, '.'))strcat(filename, ".TFF\0");
-		i = 0;
-		while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-			i++;
-		filename[i] = '.';
-		filename[i + 1] = 'T';
-		filename[i + 2] = 'F';
-		filename[i + 3] = 'F';
-		filename[i + 4] = 0;
+	tff_header *tff= (tff_header *)speicher;
 
+	assign_filename(fname, ".tff");
+
+	if (speicher) {
 		handle = chewy_fopen(filename, "wb");
 		if (handle) {
 			tff->size = (uint32)tff->count * ((uint32)(tff->width / 8) *
@@ -1177,19 +1082,8 @@ void datei::save_dialog(const char *fname, dialogue *dial) {
 	menue *men;
 	knopf *knpf;
 	int16 i = 0, j = 0;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'D';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
+
+	assign_filename(fname, ".tdf");
 
 	handle = chewy_fopen(filename, "wb");
 	if (handle) {
@@ -1228,19 +1122,8 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 	char *sp;
 	sp = (char *)thead;
 	sp += sizeof(tmf_header);
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'M';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
+
+	assign_filename(fname, ".tmf");
 
 	Stream *handle = chewy_fopen(filename, "wb");
 	if (handle) {
@@ -1273,46 +1156,35 @@ void datei::save_tmf(const char *fname, tmf_header *thead) {
 }
 
 void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
-	Stream *handle;
 	menue men;
 	int16 i = 0;
 	dialogue dial;
 	*menueanz = 0;
 	*knopfanz = 0;
-	for (i = 0; (i < MAXPATH) && (fname[i] != 0); i++)
-		filename[i] = fname[i];
-	filename[i] = 0;
-	if ((*filename) == 0)
-		get_filename(filename, MAXPATH);
-	i = 0;
-	while ((filename[i] != '.') && (filename[i] != 0) && (i < (MAXPATH - 5)))
-		i++;
-	filename[i] = '.';
-	filename[i + 1] = 'T';
-	filename[i + 2] = 'D';
-	filename[i + 3] = 'F';
-	filename[i + 4] = 0;
-
-	handle = chewy_fopen(filename, "rb");
-	if (handle) {
-		if (!(chewy_fread(&dial, sizeof(dialogue), 1, handle))) {
+
+	assign_filename(fname, ".tdf");
+
+	Common::File f;
+	if (f.open(filename)) {
+		if (!dial.load(&f)) {
 			fcode = READFEHLER;
 			modul = DATEI;
 		} else {
 			if ((!(strncmp(dial.id, "TDF", 3)))) {
 				*menueanz = dial.anzmenue;
 				for (i = 0; (i < dial.anzmenue) && (!modul); i++) {
-					if (!(chewy_fread(&men, sizeof(menue), 1, handle))) {
+					if (!men.load(&f)) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					} else {
 						*knopfanz += men.anzknoepfe;
-						chewy_fseek(handle, (long)(men.anzknoepfe * sizeof(knopf)), SEEK_CUR);
+						f.seek(men.anzknoepfe * knopf::SIZE(), SEEK_CUR);
 					}
 				}
 			}
 		}
-		chewy_fclose(handle);
+
+		f.close();
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
@@ -1507,14 +1379,7 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 	tdh = (taf_dateiheader *)tmp;
 	*tafheader = tdh;
 
-	strncpy(filename, fname, MAXPATH - 4);
-	filename[MAXPATH - 4] = '\0';
-
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
-
-	if (!strchr(filename, '.'))
-		strcat(filename, ".taf");
+	assign_filename(fname, ".taf");
 
 	if (tafFile.open(filename)) {
 		if (tdh->load(&tafFile)) {
@@ -1705,12 +1570,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 	int16 id;
 	header = (taf_dateiheader *)tmp;
 
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
-	if (!strchr(filename, '.'))
-		strcat(filename, ".taf");
+	assign_filename(fname, ".taf");
 
 	if (f.open(filename)) {
 		if (header->load(&f)) {
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index aa4d91071cd..d584fa25b1a 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -30,6 +30,8 @@
 namespace Chewy {
 
 class datei {
+private:
+	void assign_filename(const char *fname, const char *ext);
 public:
 	datei();
 	~datei();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index c27a63d6dde..d6239987dc4 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -142,6 +142,9 @@ struct knopf {
 	int16 textptr = 0;
 
 	bool load(Common::SeekableReadStream *src);
+	static constexpr int SIZE() {
+		return 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 2 + 2 + 2;
+	}
 };
 
 struct menue {
@@ -159,6 +162,10 @@ struct menue {
 	char *spritesave = nullptr;
 
 	bool load(Common::SeekableReadStream *src);
+	static constexpr int SIZE() {
+		return 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 +
+			4 * MAXKNOPF + 2 + 4 + 4;
+	}
 };
 
 struct dialogue {
@@ -170,6 +177,9 @@ struct dialogue {
 
 	bool load(Common::SeekableReadStream *src);
 	bool save(Common::WriteStream *dest);
+	static constexpr int SIZE() {
+		return 4 + 2 + 4 * MAXMENUE + D_GR + D_GR;
+	}
 };
 
 struct sbi_inst {


Commit: 276e83ffeed0ebdd45d1dee748540303037b2d10
    https://github.com/scummvm/scummvm/commit/276e83ffeed0ebdd45d1dee748540303037b2d10
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Fix drawing boxes and lines

Changed paths:
    engines/chewy/mcga.cpp
    graphics/managed_surface.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index cabaa5a9d51..30015d7be05 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -129,13 +129,24 @@ void setpixel_mcga(int16 x, int16 y, int16 farbe) {
 	line_mcga(x, y, x, y, farbe);
 }
 
+static Graphics::Surface getScreen() {
+	Graphics::Surface s;
+	s.format = Graphics::PixelFormat::createFormatCLUT8();
+	s.w = s.pitch = SCREEN_WIDTH;
+	s.h = SCREEN_HEIGHT;
+	s.setPixels(screenP);
+	return s;
+}
+
 uint8 getpix(int16 x, int16 y) {
-	byte *pixel = (byte *)g_screen->getBasePtr(x, y);
+	Graphics::Surface s = getScreen();
+	byte *pixel = (byte *)s.getBasePtr(x, y);
 	return *pixel;
 }
 
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	g_screen->drawLine(x1, y1, x2, y2, farbe);
+	Graphics::Surface s = getScreen();
+	s.drawLine(x1, y1, x2, y2, farbe);
 }
 
 void mem2mcga(const byte *ptr) {
diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h
index afa34a4c3b0..d48f6905df1 100644
--- a/graphics/managed_surface.h
+++ b/graphics/managed_surface.h
@@ -547,7 +547,7 @@ public:
 	 */
 	void drawLine(int x0, int y0, int x1, int y1, uint32 color) {
 		_innerSurface.drawLine(x0, y0, x1, y1, color);
-		addDirtyRect(Common::Rect(MIN(x0, x1), MIN(y0, y1), MAX(x0, x1), MAX(y0, y1)));
+		addDirtyRect(Common::Rect(MIN(x0, x1), MIN(y0, y1), MAX(x0, x1 + 1), MAX(y0, y1 + 1)));
 	}
 
 	/**


Commit: 62be47a6903d6ab32ed89c3c5af38274c90553da
    https://github.com/scummvm/scummvm/commit/62be47a6903d6ab32ed89c3c5af38274c90553da
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Don't keep creating temporary surfaces to wrap screenP

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 1c50331b086..a8333ff0a51 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -46,6 +46,19 @@ class EventsManager;
 class Sound;
 
 class ChewyEngine : public Engine {
+	class CurrentScreen : public Graphics::Surface {
+	public:
+		CurrentScreen() {
+			w = pitch = SCREEN_WIDTH;
+			h = SCREEN_HEIGHT;
+			format = Graphics::PixelFormat::createFormatCLUT8();
+		}
+		CurrentScreen &operator=(byte *p) {
+			setPixels(p);
+			return *this;
+		}
+		byte *getPixels() { return (byte *)Graphics::Surface::getPixels(); }
+	};
 protected:
 	// Engine APIs
 	Common::Error run() override;
@@ -66,6 +79,8 @@ public:
 	Sound *_sound = nullptr;
 	Graphics::Screen *_screen = nullptr;
 	bool _canLoadSave = false;
+	CurrentScreen _currentScreen;
+
 public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
 	~ChewyEngine() override;
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 30015d7be05..ee3edf5faa7 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -28,8 +28,10 @@
 
 namespace Chewy {
 
+#define SCREEN_S g_engine->_currentScreen
+#define SCREEN g_engine->_currentScreen.getPixels()
+
 static byte saved_palette[PALETTE_SIZE];
-static byte *screenP;
 static bool screenHasDefault;
 static byte *screenDefaultP;
 static int spriteWidth;
@@ -38,7 +40,7 @@ static size_t fontWidth, fontHeight;
 int fontFirst, fontLast;
 
 void init_mcga() {
-	screenP = (byte *)g_screen->getPixels();
+	g_engine->_currentScreen = (byte *)g_screen->getPixels();
 	screenHasDefault = false;
 	screenDefaultP = nullptr;
 	spriteWidth = 0;
@@ -66,16 +68,16 @@ void hflyback_end() {
 
 void set_pointer(byte *ptr) {
 	if (ptr) {
-		screenP = ptr;
+		g_engine->_currentScreen = ptr;
 	} else if (screenHasDefault) {
-		screenP = screenDefaultP;
+		g_engine->_currentScreen = screenDefaultP;
 	} else {
-		screenP = (byte *)g_screen->getPixels();
+		g_engine->_currentScreen = (byte *)g_screen->getPixels();
 	}
 }
 
 byte *get_dispoff() {
-	return screenP;
+	return SCREEN;
 }
 
 #define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
@@ -119,34 +121,22 @@ void set_palpart(byte *palette, int16 startcol, int16 anz) {
 }
 
 void clear_mcga() {
-	if (screenP == (byte *)g_screen->getPixels())
+	if (SCREEN == (byte *)g_screen->getPixels())
 		g_screen->clear();
 	else
-		Common::fill(screenP, screenP + SCREEN_WIDTH * SCREEN_HEIGHT, 0);
+		Common::fill(SCREEN, SCREEN + SCREEN_WIDTH * SCREEN_HEIGHT, 0);
 }
 
 void setpixel_mcga(int16 x, int16 y, int16 farbe) {
 	line_mcga(x, y, x, y, farbe);
 }
 
-static Graphics::Surface getScreen() {
-	Graphics::Surface s;
-	s.format = Graphics::PixelFormat::createFormatCLUT8();
-	s.w = s.pitch = SCREEN_WIDTH;
-	s.h = SCREEN_HEIGHT;
-	s.setPixels(screenP);
-	return s;
-}
-
 uint8 getpix(int16 x, int16 y) {
-	Graphics::Surface s = getScreen();
-	byte *pixel = (byte *)s.getBasePtr(x, y);
-	return *pixel;
+	return *(byte *)SCREEN_S.getBasePtr(x, y);
 }
 
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	Graphics::Surface s = getScreen();
-	s.drawLine(x1, y1, x2, y2, farbe);
+	return SCREEN_S.drawLine(x1, y1, x2, y2, farbe);
 }
 
 void mem2mcga(const byte *ptr) {
@@ -156,7 +146,7 @@ void mem2mcga(const byte *ptr) {
 }
 
 void mem2mcga_masked(const byte *ptr, int16 maske) {
-	byte *destP = screenP;
+	byte *destP = SCREEN;
 	byte pixel;
 
 	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr, ++destP) {
@@ -167,7 +157,7 @@ void mem2mcga_masked(const byte *ptr, int16 maske) {
 }
 
 void mcga2mem(byte *ptr) {
-	const byte *srcP = screenP;
+	const byte *srcP = SCREEN;
 	*((uint16 *)ptr) = SCREEN_WIDTH;
 	*((uint16 *)(ptr + 2)) = SCREEN_HEIGHT;
 
@@ -191,7 +181,7 @@ void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
 void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
 	int width = *((const int16 *)sptr);
 	sptr += y * width + x;
-	byte *destP = screenP;
+	byte *destP = SCREEN;
 
 	for (int row = 0; row < SCREEN_HEIGHT;
 			++row, sptr += width, destP += SCREEN_WIDTH) {
@@ -209,10 +199,10 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
 	sptr += 2;
 
 	if (scrWidth == 0) {
-		scrP = screenP + y * SCREEN_WIDTH + x;
+		scrP = SCREEN + y * SCREEN_WIDTH + x;
 		pitch = SCREEN_WIDTH;
 	} else {
-		scrP = screenP + y * scrWidth + x;
+		scrP = SCREEN + y * scrWidth + x;
 		pitch = scrWidth;
 	}
 
@@ -234,10 +224,10 @@ void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth) {
 
 	if (width >= 1 && height >= 1) {
 		if (scrWidth == 0) {
-			scrP = screenP + y * SCREEN_WIDTH + x;
+			scrP = SCREEN + y * SCREEN_WIDTH + x;
 			pitch = SCREEN_WIDTH;
 		} else {
-			scrP = screenP + y * scrWidth + x;
+			scrP = SCREEN + y * scrWidth + x;
 			pitch = scrWidth;
 		}
 
@@ -283,7 +273,7 @@ static bool mspr_set_mcga_clip(int x, int y, int pitch, int &width, int &height,
 	if (height < 1)
 		return false;
 
-	destP = screenP + pitch * y + x;
+	destP = SCREEN + pitch * y + x;
 	return true;
 }
 
@@ -341,7 +331,7 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 
 	if (scrWidth == 0)
 		scrWidth = SCREEN_WIDTH;
-	byte *destP = screenP + (y * scrWidth) + x;
+	byte *destP = SCREEN + (y * scrWidth) + x;
 
 	for (size_t yp = 0; yp < fontHeight; ++yp, destP += scrWidth) {
 		byte *destLineP = destP;
@@ -359,7 +349,7 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 		}
 	}
 
-	if (screenP == (byte *)g_screen->getPixels())
+	if (SCREEN == (byte *)g_screen->getPixels())
 		g_screen->addDirtyRect(Common::Rect(
 			x, y, x + fontWidth, y + fontHeight));
 }
@@ -497,9 +487,9 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 sc
 
 	byte *scrP;
 	if (scrWidth == 0) {
-		scrP = screenP + y * SCREEN_WIDTH + x;
+		scrP = SCREEN + y * SCREEN_WIDTH + x;
 	} else {
-		scrP = screenP + y * scrWidth + x;
+		scrP = SCREEN + y * scrWidth + x;
 	}
 
 	clip(source, scrP, x, y);


Commit: 382cc1a384fd65c9faa834b285d0ea25a72a1b1d
    https://github.com/scummvm/scummvm/commit/382cc1a384fd65c9faa834b285d0ea25a72a1b1d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:11-08:00

Commit Message:
CHEWY: Fix extern array sizes

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index a8fdb17083b..8c945c38d64 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "chewy/global.h"
 #include "chewy/chewy.h"
 #include "chewy/types.h"
 #include "chewy/defines.h"
@@ -113,7 +114,7 @@ int16 ani_invent_delay[3][2] = {
 	{10, 10},
 	{11, 11},
 };
-int16 ani_count[3] = {38, 39, 21};
+int16 ani_count[3] = { 38, 39, 21 };
 int16 invent_cur_mode;
 byte *inv_spr[MAX_MOV_OBJ];
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 123fdb58ef7..430848e14d7 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -115,10 +115,10 @@ extern int16 maus_old_x;
 extern int16 maus_old_y;
 extern int16 inventar_nr;
 
-extern int16 ani_invent_anf [2];
-extern int16 ani_invent_end [2];
-extern int16 ani_invent_delay[2][2];
-extern int16 ani_count[2];
+extern int16 ani_invent_anf[3];
+extern int16 ani_invent_end[3];
+extern int16 ani_invent_delay[3][2];
+extern int16 ani_count[3];
 extern int16 invent_cur_mode;
 extern int16 ak_invent;
 extern byte *inv_spr[MAX_MOV_OBJ];


Commit: 13dbb6cc84b2bb4549e3cdf693cdc4cd9f313048
    https://github.com/scummvm/scummvm/commit/13dbb6cc84b2bb4549e3cdf693cdc4cd9f313048
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Constifying some arrays

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 8c945c38d64..86f519a1e7f 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -42,7 +42,93 @@
 namespace Chewy {
 
 #define MAX_RAND_NO_USE 6
-uint8 rand_no_use[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
+
+const uint8 RAND_NO_USE[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
+
+const int16 ANI_INVENT_END[3] = { 7, 16, 24 };
+
+const int16 SPZ_ANI_PH[][2] = {
+	{   0,   12 },
+	{  12,    6 },
+	{  18,    6 },
+	{  24,    6 },
+	{  30,    6 },
+	{  36,    6 },
+	{  42,    6 },
+	{  48,    5 },
+	{  53,    3 },
+	{  56,   14 },
+	{  70,    7 },
+	{  77,    6 },
+	{  83,    5 },
+	{  88,    8 },
+	{  96,    5 },
+	{   5,    7 },
+	{  24,   12 },
+	{ 101,   19 },
+	{ 120,    8 },
+	{ 128,    3 },
+	{ 128,    8 },
+	{ 136,    8 },
+	{ 465,    8 },
+	{ 473,    3 },
+	{ 473,    8 },
+	{ 481,    8 },
+	{ 144,    6 },
+	{ 150,    5 },
+	{ 155,    9 },
+	{ 155,    3 },
+	{ 164,    3 },
+	{ 167,    8 },
+	{ 175,    7 },
+	{ 182,   10 },
+	{ 192,   15 },
+	{ 214,    8 },
+	{ 207,    3 },
+	{ 210,    4 },
+	{ 214,    8 },
+	{ 559,    8 },
+	{ 552,    3 },
+	{ 555,    4 },
+	{ 559,    8 },
+	{ 222,    7 },
+	{ 229,    4 },
+	{ 233,    9 },
+	{ 242,    4 },
+	{ 270,    8 },
+	{ 246,    8 },
+	{ 297,    3 },
+	{ 297,    8 },
+	{ 262,    8 },
+	{ 591,    8 },
+	{ 642,    3 },
+	{ 642,    8 },
+	{ 254,    8 },
+	{ 288,    3 },
+	{ 288,    9 },
+	{ 607,    8 },
+	{ 599,    8 },
+	{ 633,    3 },
+	{ 633,    9 },
+	{ 305,   18 },
+	{ 278,   10 },
+	{ 323,    2 },
+	{ 325,    6 },
+	{ 331,    2 },
+	{ 333,    8 },
+	{ 341,    4 }
+};
+
+
+int16 ani_invent_anf[3] = { 38, 39, 21 };
+int16 ani_invent_delay[3][2] = {
+	{12, 12},
+	{10, 10},
+	{11, 11},
+};
+int16 ani_count[3] = { 38, 39, 21 };
+
+
 int16 pfeil_ani;
 int16 pfeil_delay;
 int16 cur_hide_flag;
@@ -107,14 +193,6 @@ int16 maus_menu_x;
 int16 maus_old_x;
 int16 maus_old_y;
 int16 inventar_nr;
-int16 ani_invent_anf [3] = {38, 39, 21};
-int16 ani_invent_end [3] = {7, 16, 24};
-int16 ani_invent_delay[3][2] = {
-	{12, 12},
-	{10, 10},
-	{11, 11},
-};
-int16 ani_count[3] = { 38, 39, 21 };
 int16 invent_cur_mode;
 byte *inv_spr[MAX_MOV_OBJ];
 
@@ -180,10 +258,8 @@ atdsys *atds;
 flic *flc;
 movclass *mov;
 
-char background[] = { EPISODE1
-                    };
-char backged[] = { EPISODE1_GEP
-                 };
+char background[] = { EPISODE1 };
+char backged[] = { EPISODE1_GEP };
 char fname [80] = {0};
 
 AutoMov auto_mov[MAX_AUTO_MOV];
@@ -201,77 +277,6 @@ int16 spz_p_nr;
 int16 spz_delay[MAX_PERSON];
 int16 spz_count;
 int16 spz_ani[MAX_PERSON];
-int16 SPZ_ANI_PH[][2] = {
-	{   0,   12 },
-	{  12,    6 },
-	{  18,    6 },
-	{  24,    6 },
-	{  30,    6 },
-	{  36,    6 },
-	{  42,    6 },
-	{  48,    5 },
-	{  53,    3 },
-	{  56,   14 },
-	{  70,    7 },
-	{  77,    6 },
-	{  83,    5 },
-	{  88,    8 },
-	{  96,    5 },
-	{   5,    7 },
-	{  24,   12 },
-	{ 101,   19 },
-	{ 120,    8 },
-	{ 128,    3 },
-	{ 128,    8 },
-	{ 136,    8 },
-	{ 465,    8 },
-	{ 473,    3 },
-	{ 473,    8 },
-	{ 481,    8 },
-	{ 144,    6 },
-	{ 150,    5 },
-	{ 155,    9 },
-	{ 155,    3 },
-	{ 164,    3 },
-	{ 167,    8 },
-	{ 175,    7 },
-	{ 182,   10 },
-	{ 192,   15 },
-	{ 214,    8 },
-	{ 207,    3 },
-	{ 210,    4 },
-	{ 214,    8 },
-	{ 559,    8 },
-	{ 552,    3 },
-	{ 555,    4 },
-	{ 559,    8 },
-	{ 222,    7 },
-	{ 229,    4 },
-	{ 233,    9 },
-	{ 242,    4 },
-	{ 270,    8 },
-	{ 246,    8 },
-	{ 297,    3 },
-	{ 297,    8 },
-	{ 262,    8 },
-	{ 591,    8 },
-	{ 642,    3 },
-	{ 642,    8 },
-	{ 254,    8 },
-	{ 288,    3 },
-	{ 288,    9 },
-	{ 607,    8 },
-	{ 599,    8 },
-	{ 633,    3 },
-	{ 633,    9 },
-	{ 305,   18 },
-	{ 278,   10 },
-	{ 323,    2 },
-	{ 325,    6 },
-	{ 331,    2 },
-	{ 333,    8 },
-	{ 341,    4 }
-};
 
 int16 AkChewyTaf;
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 430848e14d7..13288ac77d8 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -40,7 +40,9 @@ namespace Chewy {
 
 #define MAX_RAND_NO_USE 6
 
-extern uint8 rand_no_use[MAX_RAND_NO_USE];
+extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
+extern const int16 ANI_INVENT_END[3];
+extern const int16 SPZ_ANI_PH[][2];
 
 extern int16 pfeil_ani;
 extern int16 pfeil_delay;
@@ -116,7 +118,6 @@ extern int16 maus_old_y;
 extern int16 inventar_nr;
 
 extern int16 ani_invent_anf[3];
-extern int16 ani_invent_end[3];
 extern int16 ani_invent_delay[3][2];
 extern int16 ani_count[3];
 extern int16 invent_cur_mode;
@@ -207,7 +208,6 @@ extern taf_seq_info *PersonTaf[MAX_PERSON];
 extern uint8 PersonSpr[MAX_PERSON][8];
 
 extern int16 SpzDelay;
-// FIXME: was FILE*
 extern Stream *spz_taf_handle;
 extern taf_seq_info *spz_tinfo;
 extern int16 spz_spr_nr[MAX_SPZ_PHASEN];
@@ -215,7 +215,6 @@ extern int16 spz_start;
 extern int16 spz_akt_id;
 
 extern int16 spz_count;
-extern int16 SPZ_ANI_PH[][2];
 extern int16 spz_delay[MAX_PERSON];
 extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index bcfee846b58..251076b4d7c 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1501,7 +1501,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 									set_person_spr(P_LEFT, P_CHEWY);
 							}
 							r_val = rand() % MAX_RAND_NO_USE;
-							action_flag = start_ats_wait(rand_no_use[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+							action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 						}
 					}
 					flags.MausTxt = false;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 13ab8c59d48..ca1aa0ab9ed 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -165,7 +165,7 @@ void plot_inventar_menu() {
 		if (ani_invent_delay[i][0] <= 0) {
 			ani_invent_delay[i][0] = ani_invent_delay[i][1];
 			++ani_count[i];
-			if (ani_count[i] > ani_invent_end[i]) {
+			if (ani_count[i] > ANI_INVENT_END[i]) {
 				ani_count[i] = ani_invent_anf[i];
 				ani_invent_delay[i][0] = 30000;
 			}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 0602285eee4..b9cb8ec1c93 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1959,7 +1959,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 			if (!ok) {
 				warning("FIXME - use of random");
 
-				ret = start_ats_wait(rand_no_use[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+				ret = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 			}
 		}
 	}


Commit: 6c54fa031b14f20c451bfd2b871fb658fb2c18e7
    https://github.com/scummvm/scummvm/commit/6c54fa031b14f20c451bfd2b871fb658fb2c18e7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Start of Globals class

Changed paths:
    engines/chewy/ch_icm.cpp
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/episode4.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/mcga.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index 1f16bd8edb4..8444c9d3da7 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -153,10 +153,10 @@ void get_zoom_value() {
 	in ->alter_kb_handler();
 	for (i = 0; i < 2; i++)
 		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-	tmp = zoom_horizont;
+	tmp = _G(zoom_horizont);
 	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
 	if (abfrage != 27) {
-		zoom_horizont = tmp;
+		_G(zoom_horizont) = tmp;
 	}
 	in ->neuer_kb_handler(&kbinfo);
 }
@@ -181,7 +181,7 @@ void room_info() {
 	value[0] = 0;
 	value[1] = room->GedInfo[room_blk.AkAblage].Ebenen;
 	value[2] = auto_obj;
-	value[3] = zoom_horizont;
+	value[3] = _G(zoom_horizont);
 	value[4] = (int16)room->room_info->ZoomFak;
 	value[5] = get_max_handle();
 	auto_menu(&x, &y, str_anz, 10, c, 0);
@@ -1274,10 +1274,10 @@ void set_person() {
 			auto_menu(&x, &y, 2, 10, c1, 0);
 			for (i = 0; i < 2; i++)
 				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c3, i));
-			tmp = zoom_horizont;
+			tmp = _G(zoom_horizont);
 			abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
 			if (abfrage != 27) {
-				zoom_horizont = tmp;
+				_G(zoom_horizont) = tmp;
 			}
 			in->neuer_kb_handler(&kbinfo);
 			break;
@@ -1309,7 +1309,7 @@ void set_person() {
 		if (info_flag) {
 			out->printxy(0, 0, 255, 300, scr_width, "Person x %d Person y %d", spieler_vector[p_nr].Xypos[0], spieler_vector[p_nr].Xypos[1]);
 			out->printxy(0, 10, 255, 300, scr_width, "Zoomx %d Zoomy %d", spieler.ZoomXy[p_nr][0], spieler.ZoomXy[p_nr][1]);
-			out->printxy(0, 20, 255, 300, scr_width, "ZoomHorizont %d", zoom_horizont);
+			out->printxy(0, 20, 255, 300, scr_width, "ZoomHorizont %d", _G(zoom_horizont));
 			out->printxy(0, 30, 255, 300, scr_width, "AK-Zoomx %d AK-Zoomy %d", spieler_vector[p_nr].Xzoom, spieler_vector[p_nr].Yzoom);
 
 		}
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 589b3ddbaca..4bdb15d0aeb 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -25,6 +25,7 @@
 #include "engines/util.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
+#include "chewy/global.h"
 #include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
@@ -54,6 +55,7 @@ ChewyEngine::ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc)
 
 ChewyEngine::~ChewyEngine() {
 	delete _events;
+	delete _globals;
 	delete _screen;
 	delete _sound;
 	g_engine = nullptr;
@@ -63,6 +65,7 @@ ChewyEngine::~ChewyEngine() {
 void ChewyEngine::initialize() {
 	g_screen = _screen = new Graphics::Screen();
 	_events = new EventsManager(_screen);
+	_globals = new Globals();
 	_sound = new Sound(_mixer);
 
 	_tempFiles.add(ADSH_TMP);
@@ -117,7 +120,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 			set_person_pos(spieler.X[i], spieler.Y[i], i, spieler.Phase[i]);
 		}
 
-		auto_obj = 0;
+		_G(auto_obj) = 0;
 
 		enter_room(-1);
 		flags.LoadGame = false;
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index a8333ff0a51..c9457c4c626 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -43,22 +43,10 @@ namespace Chewy {
 
 struct ChewyGameDescription;
 class EventsManager;
+class Globals;
 class Sound;
 
 class ChewyEngine : public Engine {
-	class CurrentScreen : public Graphics::Surface {
-	public:
-		CurrentScreen() {
-			w = pitch = SCREEN_WIDTH;
-			h = SCREEN_HEIGHT;
-			format = Graphics::PixelFormat::createFormatCLUT8();
-		}
-		CurrentScreen &operator=(byte *p) {
-			setPixels(p);
-			return *this;
-		}
-		byte *getPixels() { return (byte *)Graphics::Surface::getPixels(); }
-	};
 protected:
 	// Engine APIs
 	Common::Error run() override;
@@ -76,10 +64,10 @@ public:
 	Common::RandomSource _rnd;
 	TempFileArchive _tempFiles;
 	EventsManager *_events = nullptr;
+	Globals *_globals = nullptr;
 	Sound *_sound = nullptr;
 	Graphics::Screen *_screen = nullptr;
 	bool _canLoadSave = false;
-	CurrentScreen _currentScreen;
 
 public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index ad2ef061c17..9dc2ca113b2 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -126,11 +126,11 @@ void Room0::entry() {
 
 	if (!flags.LoadGame) {
 		set_person_pos(150, 100, 0, 1);
-		cur_hide_flag = 0;
+		_G(cur_hide_flag) = 0;
 		hide_cur();
-		timer_nr[0] = room->set_timer(255, 3);
+		_G(timer_nr)[0] = room->set_timer(255, 3);
 
-		while (!ani_timer[timer_nr[0]].TimeFlag && !SHOULD_QUIT) {
+		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 #ifdef TODO_REENABLE
@@ -805,9 +805,9 @@ int16 r4_sonde_comp() {
 
 	cur_2_inventory();
 	spieler.PersonHide[P_CHEWY] = true;
-	cur_display = false;
+	_G(cur_display) = false;
 	switch_room(4);
-	cur_display = true;
+	_G(cur_display) = true;
 	ende = 0;
 	curblk.sprite = room_blk.DetImage;
 	cur_x = 1;
@@ -817,7 +817,7 @@ int16 r4_sonde_comp() {
 	start_aad(46);
 	while (!ende) {
 		maus_action();
-		if (maus_links_click) {
+		if (_G(maus_links_click)) {
 			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)console, 3)) {
 			case 0:
 				if (cur_x > 0)
@@ -872,7 +872,7 @@ int16 r4_sonde_comp() {
 	set_person_pos(118 - CH_HOT_MOV_X,
 	               164 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 	spieler_vector[P_CHEWY].DelayCount = 0;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	minfo.button = 0;
 	spieler.PersonRoomNr[P_CHEWY] = 3;
 	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
@@ -896,7 +896,7 @@ void switch_room(int16 nr) {
 
 void r3_terminal() {
 	show_cur();
-	auto_obj = 0;
+	_G(auto_obj) = 0;
 	switch (r4_sonde_comp()) {
 	case 0:
 		r3_sonde_aufnahme();
@@ -931,7 +931,7 @@ void r3_terminal() {
 			start_ani_block(2, ablock1);
 			spieler.PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
-			auto_obj = 0;
+			_G(auto_obj) = 0;
 			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 			ERROR
 			fx_blend = BLEND1;
@@ -943,8 +943,8 @@ void r3_terminal() {
 		break;
 
 	case 1:
-		auto_obj = 1;
-		maus_links_click = 0;
+		_G(auto_obj) = 1;
+		_G(maus_links_click) = 0;
 		minfo.button = 0;
 		stop_person(P_CHEWY);
 		start_aad_wait(51, -1);
@@ -973,7 +973,7 @@ int16 sonde_phasen[4][2] = {
 void r3_init_sonde() {
 #define SONDE_OBJ 0
 #define SONDE_OBJ1 1
-	auto_obj = 1;
+	_G(auto_obj) = 1;
 	mov_phasen[SONDE_OBJ].AtsText = 24;
 	mov_phasen[SONDE_OBJ].Lines = 3;
 	mov_phasen[SONDE_OBJ].Repeat = 255;
@@ -1013,9 +1013,9 @@ void r3_sonde_knarre() {
 	rdi = det->get_room_detail_info();
 
 	det->load_taf_seq(162, 17, 0);
-	tmp = zoom_horizont;
-	zoom_horizont = 100;
-	auto_obj = 1;
+	tmp = _G(zoom_horizont);
+	_G(zoom_horizont) = 100;
+	_G(auto_obj) = 1;
 	mov_phasen[SONDE_OBJ].Lines = 3;
 	mov_phasen[SONDE_OBJ].Repeat = 1;
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
@@ -1093,7 +1093,7 @@ void r3_sonde_knarre() {
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 	det->del_taf_tbl(162, 17, 0);
-	zoom_horizont = tmp;
+	_G(zoom_horizont) = tmp;
 	r3_init_sonde();
 
 	show_cur();
@@ -1126,10 +1126,10 @@ void r3_sonde_aufnahme() {
 	flags.AniUserAction = false;
 	hide_cur();
 	rdi = det->get_room_detail_info();
-	tmp = zoom_horizont;
-	zoom_horizont = 100;
+	tmp = _G(zoom_horizont);
+	_G(zoom_horizont) = 100;
 	anistart = false;
-	auto_obj = 1;
+	_G(auto_obj) = 1;
 	mov_phasen[SONDE_OBJ].Lines = 2;
 	mov_phasen[SONDE_OBJ].Repeat = 1;
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
@@ -1149,7 +1149,7 @@ void r3_sonde_aufnahme() {
 	}
 
 	clear_prog_ani();
-	auto_obj = 2;
+	_G(auto_obj) = 2;
 
 	spr_nr = 140;
 	for (i = 0; i < 4; i++) {
@@ -1230,8 +1230,8 @@ void r3_sonde_aufnahme() {
 		}
 	}
 	flags.AniUserAction = false;
-	zoom_horizont = tmp;
-	auto_obj = 0;
+	_G(zoom_horizont) = tmp;
+	_G(auto_obj) = 0;
 }
 
 void r2_jump_out_r1(int16 nr) {
@@ -1266,9 +1266,9 @@ void r5_knopf() {
 }
 
 void r6_entry() {
-	zoom_horizont = 80;
+	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 2;
+	_G(zoom_mov_fak) = 2;
 	if (spieler.R6BolaSchild) {
 		if (spieler.R6RaumBetreten < 3) {
 			det->start_detail(7, 255, ANI_VOR);
@@ -1303,7 +1303,7 @@ MovLine r6_robo_mpkt[3] = {
 
 void r6_init_robo() {
 #define ROBO_OBJ 0
-	auto_obj = 1;
+	_G(auto_obj) = 1;
 	mov_phasen[ROBO_OBJ].AtsText = 44;
 	mov_phasen[ROBO_OBJ].Lines = 3;
 	mov_phasen[ROBO_OBJ].Repeat = 1;
@@ -1534,7 +1534,7 @@ bool r8_gips_wurf() {
 		hide_cur();
 		det->load_taf_seq(116, 30, 0);
 		auto_move(2, P_CHEWY);
-		maus_links_click = 0;
+		_G(maus_links_click) = 0;
 		spieler.PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
 		start_detail_wait(4, 1, ANI_VOR);
@@ -1660,7 +1660,7 @@ void r9_surimy() {
 
 void r9_surimy_ani() {
 	det->load_taf_seq(91, 8, 0);
-	auto_obj = 1;
+	_G(auto_obj) = 1;
 	mov_phasen[SURIMY_OBJ].AtsText = 0;
 	mov_phasen[SURIMY_OBJ].Lines = 2;
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -1715,9 +1715,9 @@ void r10_get_surimy() {
 }
 
 void r11_entry() {
-	zoom_horizont = 80;
+	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 2;
+	_G(zoom_mov_fak) = 2;
 
 	if (spieler.R12ChewyBork) {
 		if (!spieler.R11DoorRightB) {
@@ -1743,7 +1743,7 @@ void r11_entry() {
 		det->show_static_spr(8);
 		if (!flags.LoadGame)
 			auto_move(6, P_CHEWY);
-		timer_nr[0] = room->set_timer(255, 10);
+		_G(timer_nr)[0] = room->set_timer(255, 10);
 	}
 }
 
@@ -1752,7 +1752,7 @@ void r11_bork_zwinkert() {
 		flags.AutoAniPlay = true;
 		det->hide_static_spr(8);
 		start_ani_block(2, ablock18);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		det->show_static_spr(8);
 		flags.AutoAniPlay = false;
 	}
@@ -1850,8 +1850,8 @@ void r11_put_card() {
 
 void r12_entry() {
 	int16 i;
-	zoom_horizont = 150;
-	timer_nr[1] = room->set_timer(255, 20);
+	_G(zoom_horizont) = 150;
+	_G(timer_nr)[1] = room->set_timer(255, 20);
 	if (!spieler.R12Betreten) {
 		spieler.R12Betreten = true;
 		for (i = 7; i < 10; i++)
@@ -1869,7 +1869,7 @@ void r12_entry() {
 		start_aad_wait(109, -1);
 	} else {
 		if (spieler.R12Talisman == true && !spieler.R12BorkInRohr)
-			timer_nr[0] = room->set_timer(255, 20);
+			_G(timer_nr)[0] = room->set_timer(255, 20);
 		else if (spieler.R12BorkInRohr && !spieler.R12RaumOk)
 			det->show_static_spr(12);
 
@@ -1907,10 +1907,10 @@ void r12_init_bork() {
 	if (!auto_obj_status(R12_BORK_OBJ) &&
 	        !spieler.R12BorkTalk) {
 
-		if (!auto_obj)
+		if (!_G(auto_obj))
 			det->load_taf_seq(62, (85 - 62) + 1, 0);
 		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
-			auto_obj = 1;
+			_G(auto_obj) = 1;
 			mov_phasen[R12_BORK_OBJ].AtsText = 120;
 			mov_phasen[R12_BORK_OBJ].Lines = 5;
 			mov_phasen[R12_BORK_OBJ].Repeat = 1;
@@ -1927,7 +1927,7 @@ void r12_init_bork() {
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
 				if (spieler.R12BorkCount < 3) {
 					++spieler.R12BorkCount;
-					uhr->reset_timer(timer_nr[0], 0);
+					uhr->reset_timer(_G(timer_nr)[0], 0);
 					wait_show_screen(10);
 					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 					start_aad_wait(14, -1);
@@ -1938,7 +1938,7 @@ void r12_init_bork() {
 				r12_bork_ok();
 			}
 		}
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 	}
 }
 
@@ -2018,7 +2018,7 @@ int16 r12_use_terminal() {
 				start_aad(111, 0);
 			} else {
 				spieler.R12TransOn = true;
-				uhr->reset_timer(timer_nr[1], 0);
+				uhr->reset_timer(_G(timer_nr)[1], 0);
 			}
 		}
 		else
@@ -2123,7 +2123,7 @@ void r13_talk_bork() {
 		det->load_taf_seq(86, (97 - 86) + 1, 0);
 		spieler.PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(12);
-		auto_obj = 1;
+		_G(auto_obj) = 1;
 		mov_phasen[R13_BORK_OBJ].AtsText = 122;
 		mov_phasen[R13_BORK_OBJ].Lines = 3;
 		mov_phasen[R13_BORK_OBJ].Repeat = 1;
@@ -2140,7 +2140,7 @@ void r13_talk_bork() {
 		start_aad_wait(248, -1);
 		flic_cut(FCUT_014, CFO_MODE);
 		load_chewy_taf(CHEWY_NORMAL);
-		auto_obj = 0;
+		_G(auto_obj) = 0;
 		flags.NoScroll = false;
 		atds->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
@@ -2174,7 +2174,7 @@ void r13_jmp_band() {
 			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
 		} else {
 			spieler.R13Surf = true;
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			auto_move(12, P_CHEWY);
 			start_aad_wait(117, -1);
 			flags.NoScroll = true;
@@ -2244,7 +2244,7 @@ int16 r13_monitor_knopf() {
 
 void r14_entry() {
 	spieler.R23GleiterExit = 14;
-	zoom_horizont = 310;
+	_G(zoom_horizont) = 310;
 	if (!flags.LoadGame) {
 		if (spieler.R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
@@ -2384,7 +2384,7 @@ void r14_feuer() {
 }
 
 void r16_entry() {
-	zoom_horizont = 140;
+	_G(zoom_horizont) = 140;
 	if (!spieler.R16F5Exit) {
 		det->show_static_spr(4);
 		spieler.room_e_obj[32].Attribut = 255;
@@ -2415,20 +2415,20 @@ void r17_entry() {
 		det->show_static_spr(7);
 	if (spieler.R17Location == 1) {
 		flags.ZoomMov = true;
-		zoom_mov_fak = 3;
+		_G(zoom_mov_fak) = 3;
 		room->set_zoom(25);
-		zoom_horizont = 0;
+		_G(zoom_horizont) = 0;
 		spieler.scrollx = 0;
 		spieler.scrolly = 60;
 		set_person_pos(242, 146, P_CHEWY, P_LEFT);
 		r17_xit();
 	} else if (spieler.R17Location == 3) {
 		room->set_zoom(32);
-		zoom_horizont = 399;
+		_G(zoom_horizont) = 399;
 		r17_xit();
 	} else {
 		room->set_zoom(15);
-		zoom_horizont = 0;
+		_G(zoom_horizont) = 0;
 		spieler.room_e_obj[36].Attribut = 255;
 		spieler.room_e_obj[38].Attribut = 255;
 		if (spieler.R6DoorLeftF)
@@ -2507,11 +2507,11 @@ void r17_kletter_down() {
 	spieler.PersonHide[P_CHEWY] = true;
 	start_detail_wait(14, 1, ANI_VOR);
 	flags.ZoomMov = false;
-	zoom_mov_fak = 1;
+	_G(zoom_mov_fak) = 1;
 	spieler.ScrollyStep = 2;
 	room->set_zoom(32);
-	zoom_horizont = 399;
-	auto_obj = 1;
+	_G(zoom_horizont) = 399;
+	_G(auto_obj) = 1;
 	init_auto_obj(R17_CHEWY_OBJ, &r17_chewy_phasen[0][0], mov_phasen[R17_CHEWY_OBJ].Lines, (MovLine
 	              *)r17_chewy_mpkt);
 	set_person_pos(242, 350, P_CHEWY, P_LEFT);
@@ -2523,11 +2523,11 @@ void r17_kletter_up() {
 	spieler.PersonHide[P_CHEWY] = true;
 	start_detail_wait(11, 1, ANI_VOR);
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	spieler.ScrollyStep = 1;
 	room->set_zoom(25);
-	zoom_horizont = 0;
-	auto_obj = 1;
+	_G(zoom_horizont) = 0;
+	_G(auto_obj) = 1;
 	init_auto_obj(R17_CHEWY_OBJ, &r17_chewy_phasen[0][0], mov_phasen[R17_CHEWY_OBJ].Lines, (MovLine
 	              *)r17_chewy_mpkt1);
 	set_person_pos(243, 146, P_CHEWY, P_LEFT);
@@ -2562,7 +2562,7 @@ void r17_calc_seil() {
 					spieler.ScrollyStep = 1;
 					spieler.PersonHide[P_CHEWY] = false;
 					flags.AutoAniPlay = false;
-					auto_obj = 0;
+					_G(auto_obj) = 0;
 					r17_xit();
 				}
 			}
@@ -2688,8 +2688,8 @@ void r18_init_borks() {
 		det->show_static_spr(bork_spr[i]);
 	for (i = 0; i < 4; i++)
 		det->hide_static_spr(bork_spr1[i]);
-	timer_nr[0] = room->set_timer(255, 10);
-	timer_nr[1] = room->set_timer(255, 15);
+	_G(timer_nr)[0] = room->set_timer(255, 10);
+	_G(timer_nr)[1] = room->set_timer(255, 15);
 	spieler.scrollx = 276;
 	spieler.scrolly = 0;
 	flags.NoScroll = true;
@@ -2700,13 +2700,13 @@ void r18_timer_action(int16 t_nr) {
 	if (!spieler.R18SurimyWurf) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
-			if (t_nr == timer_nr[0]) {
+			if (t_nr == _G(timer_nr)[0]) {
 				det->hide_static_spr(16);
 				start_detail_wait(10, 1, ANI_VOR);
 				det->show_static_spr(16);
-				uhr->reset_timer(timer_nr[0], 10);
+				uhr->reset_timer(_G(timer_nr)[0], 10);
 			}
-			else if (t_nr == timer_nr[1]) {
+			else if (t_nr == _G(timer_nr)[1]) {
 				hide_cur();
 				det->hide_static_spr(17);
 				start_detail_wait(9, 1, ANI_VOR);
@@ -2724,7 +2724,7 @@ void r18_timer_action(int16 t_nr) {
 					r18_monitor();
 				}
 				show_cur();
-				uhr->reset_timer(timer_nr[1], 15);
+				uhr->reset_timer(_G(timer_nr)[1], 15);
 			}
 			flags.AutoAniPlay = false;
 		}
@@ -2805,7 +2805,7 @@ int16 r18_calc_surimy() {
 		spieler.R18SurimyWurf = true;
 		det->load_taf_seq(245, 294 - 245 + 1, 0);
 		det->load_taf_seq(116, 170 - 116 + 1, 0);
-		auto_obj = 1;
+		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -2824,7 +2824,7 @@ int16 r18_calc_surimy() {
 			stop_person(P_CHEWY);
 			spieler.PersonHide[P_CHEWY] = true;
 			start_detail_frame(17, 1, ANI_VOR, 12);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 
 			init_auto_obj(SURIMY_OBJ, &r18_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 			              *)r18_surimy_mpkt);
@@ -2881,7 +2881,7 @@ int16 r18_calc_surimy() {
 		flags.NoScroll = false;
 		auto_scroll(318, 0);
 		spieler.ScrollxStep = 2;
-		auto_obj = 0;
+		_G(auto_obj) = 0;
 
 		atds->set_ats_str(153, 1, ATS_DATEI);
 
@@ -2946,7 +2946,7 @@ int16 r18_go_cyberspace() {
 }
 
 void r19_entry() {
-	zoom_horizont = 250;
+	_G(zoom_horizont) = 250;
 	flags.NoScroll = true;
 	spieler.scrollx = 0;
 	spieler.scrolly = 24;
@@ -2956,7 +2956,7 @@ void r21_entry() {
 	load_chewy_taf(CHEWY_MINI);
 	r21_calc_laser();
 	r21_init_spinne();
-	timer_nr[2] = room->set_timer(255, 1);
+	_G(timer_nr)[2] = room->set_timer(255, 1);
 	flags.NoEndPosMovObj = true;
 	SetUpScreenFunc = r21setup_func;
 }
@@ -3020,7 +3020,7 @@ MovLine r21_energie_mpkt[2] = {
 
 void r21_init_spinne() {
 	det->load_taf_seq(42, (89 - 42) + 1, 0);
-	auto_obj = 2;
+	_G(auto_obj) = 2;
 
 	mov_phasen[R21_SPINNE1_OBJ].AtsText = 130;
 	mov_phasen[R21_SPINNE1_OBJ].Lines = 3;
@@ -3039,7 +3039,7 @@ void r21_init_spinne() {
 	auto_mov_vector[R21_SPINNE2_OBJ].Delay = spieler.DelaySpeed;
 	auto_mov_obj[R21_SPINNE2_OBJ].Mode = 1;
 	init_auto_obj(R21_SPINNE2_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE2_OBJ].Lines, (MovLine *)r21_spinne_mpkt1);
-	timer_nr[0] = room->set_timer(255, 21);
+	_G(timer_nr)[0] = room->set_timer(255, 21);
 	e_streifen = false;
 
 }
@@ -3047,13 +3047,13 @@ void r21_init_spinne() {
 void r21_restart_spinne2() {
 	mov_phasen[R21_SPINNE2_OBJ].Repeat = 1;
 	init_auto_obj(R21_SPINNE2_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE2_OBJ].Lines, (MovLine *)r21_spinne_mpkt1);
-	uhr->reset_timer(timer_nr[0], 0);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
 	e_streifen = false;
 
 }
 
 void r21_e_streifen() {
-	auto_obj = 3;
+	_G(auto_obj) = 3;
 	mov_phasen[R21_ENERGIE_OBJ].AtsText = 0;
 	mov_phasen[R21_ENERGIE_OBJ].Lines = 2;
 	mov_phasen[R21_ENERGIE_OBJ].Repeat = 1;
@@ -3157,7 +3157,7 @@ void r21_use_gitter_energie() {
 	spieler.R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
 	                           AUSGANG_UNTEN, AUSGANG_OBEN,
 	                           (int16)spieler.R21GitterEnergie);
-	auto_obj = 0;
+	_G(auto_obj) = 0;
 	spieler.R17Location = 1;
 	spieler.PersonHide[P_CHEWY] = true;
 	switch_room(17);
@@ -3247,7 +3247,7 @@ void r22_bork(int16 t_nr) {
 			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(10, -1);
 			auto_move(3, P_CHEWY);
-			auto_obj = 1;
+			_G(auto_obj) = 1;
 			mov_phasen[R22_BORK_OBJ].AtsText = 0;
 			mov_phasen[R22_BORK_OBJ].Lines = 2;
 			mov_phasen[R22_BORK_OBJ].Repeat = 1;
@@ -3335,7 +3335,7 @@ int16 r22_malen() {
 void r23_cockpit() {
 	spieler.scrollx = 0;
 	spieler.scrolly = 0;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	switch_room(23);
 	if (spieler.R23Cartridge)
 		det->show_static_spr(3);
@@ -3389,7 +3389,7 @@ int16 r23_start_gleiter() {
 					spieler.DelaySpeed = 10;
 					start_aad_wait(59, -1);
 					stop_person(P_CHEWY);
-					maus_links_click = false;
+					_G(maus_links_click) = false;
 				} else if (spieler.R23GleiterExit == 16) {
 					out->setze_zeiger(0);
 					out->cls();
@@ -3462,7 +3462,7 @@ void r24_exit() {
 	cursor_wahl(menu_item);
 	set_person_pos(263, 144, P_CHEWY, -1);
 	spieler.scrollx = 88;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	flags.MainInput = true;
 }
 
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 5b171911415..d59d32566d0 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -132,7 +132,7 @@ void r25_xit_gleiter() {
 	if (!spieler.R25SurimyLauf) {
 		spieler.R25SurimyLauf = true;
 		det->load_taf_seq(56, 8, 0);
-		auto_obj = 1;
+		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -148,13 +148,13 @@ void r25_xit_gleiter() {
 		start_aad_wait(65, -1);
 		fx_blend = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
-		auto_obj = 0;
+		_G(auto_obj) = 0;
 	}
 }
 
 void r27_entry() {
 	if (spieler.PersonRoomNr[P_HOWARD] == 27) {
-		timer_nr[0] = room->set_timer(0, 5);
+		_G(timer_nr)[0] = room->set_timer(0, 5);
 		det->set_static_ani(0, -1);
 		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
 	} else
@@ -204,9 +204,9 @@ void r27_howard_ged() {
 }
 
 void r28_entry(int16 eib_nr) {
-	zoom_horizont = 140;
+	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	spieler.ScrollxStep = 2;
 	if (spieler.R28RKuerbis)
 		det->show_static_spr(6);
@@ -622,7 +622,7 @@ void r31_surimy_go() {
 			hide_cur();
 			spieler.R31SurimyGo = 0;
 			det->load_taf_seq(39, 8, 0);
-			auto_obj = 1;
+			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
 			mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -635,7 +635,7 @@ void r31_surimy_go() {
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
-			auto_obj = 0;
+			_G(auto_obj) = 0;
 			show_cur();
 		} else
 			++spieler.R31SurimyGo;
@@ -899,7 +899,7 @@ void r33_surimy_go() {
 			hide_cur();
 			spieler.R33SurimyGo = 0;
 			det->load_taf_seq(39, 8, 0);
-			auto_obj = 1;
+			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
 			mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -912,7 +912,7 @@ void r33_surimy_go() {
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
-			auto_obj = 0;
+			_G(auto_obj) = 0;
 			show_cur();
 		} else
 			++spieler.R33SurimyGo;
@@ -1072,7 +1072,7 @@ void r34_xit_kuehlschrank() {
 	set_person_pos(54, 111, P_CHEWY, -1);
 	switch_room(33);
 	flags.ChewyDontGo = false;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 }
 
 void r35_entry() {
@@ -1169,19 +1169,19 @@ void r35_talk_cat() {
 }
 
 void r37_entry() {
-	zoom_horizont = 100;
+	_G(zoom_horizont) = 100;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = r37_setup_func;
 	if (!flags.LoadGame) {
 		spieler.scrollx = 124;
 		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
 	}
 	if (!spieler.R37Kloppe) {
-		timer_nr[1] = room->set_timer(7, 5);
+		_G(timer_nr)[1] = room->set_timer(7, 5);
 		det->set_static_ani(7, -1);
 		if (!spieler.R37HundScham) {
-			timer_nr[0] = room->set_timer(3, 4);
+			_G(timer_nr)[0] = room->set_timer(3, 4);
 			det->set_static_ani(3, -1);
 		}
 	}
@@ -1195,13 +1195,13 @@ void r37_entry() {
 }
 
 void r37_setup_func() {
-	if (maus_links_click &&
+	if (_G(maus_links_click) &&
 	        !spieler.R37Kloppe &&
 	        menu_item == CUR_WALK) {
 		if ((minfo.x + spieler.scrollx > 380 && minfo.y > 120) ||
 		        (minfo.x + spieler.scrollx > 482)) {
 			auto_move(7, P_CHEWY);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 		}
 	}
 }
@@ -1226,7 +1226,7 @@ short r37_use_wippe() {
 			spieler.scrollx = 269;
 			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
 			switch_room(29);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 		} else {
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(160, -1);
@@ -1707,7 +1707,7 @@ void r39_set_tv() {
 
 void r40_entry(int16 eib_nr) {
 
-	zoom_horizont = 130;
+	_G(zoom_horizont) = 130;
 	spieler.ScrollxStep = 2;
 	if (spieler.R40Geld) {
 		det->del_static_ani(6);
@@ -1718,7 +1718,7 @@ void r40_entry(int16 eib_nr) {
 		room->set_timer_status(4, TIMER_STOP);
 	}
 	if (spieler.R40PoliceWeg == false) {
-		timer_nr[0] = room->set_timer(255, 10);
+		_G(timer_nr)[0] = room->set_timer(255, 10);
 		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		det->hide_static_spr(15);
@@ -1774,7 +1774,7 @@ void r40_exit(int16 eib_nr) {
 				set_up_screen(DO_SETUP);
 				out->einblenden(pal, 0);
 				uhr->enable_timer();
-				maus_links_click = false;
+				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
 				r40_move_train(1);
 				flags.NoPalAfterFlc = true;
@@ -1918,7 +1918,7 @@ void r40_setup_func() {
 				det->show_static_spr(15);
 				spieler.R40PoliceAniStatus = 255;
 				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(timer_nr[0], 0);
+				uhr->reset_timer(_G(timer_nr)[0], 0);
 				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 			}
 			break;
@@ -2001,7 +2001,7 @@ int16 r40_use_schalter(int16 aad_nr) {
 			start_detail_wait(13, 1, ANI_VOR);
 			det->show_static_spr(15);
 			room->set_timer_status(255, TIMER_START);
-			uhr->reset_timer(timer_nr[0], 0);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
 			show_cur();
 		}
 	}
@@ -2017,7 +2017,7 @@ void r40_talk_police() {
 		auto_move(7, P_CHEWY);
 		start_aad_wait(203, -1);
 		room->set_timer_status(255, TIMER_START);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
 	}
 }
@@ -2217,7 +2217,7 @@ int16 r40_use_tele() {
 				}
 				spieler.R40PoliceAb = false;
 				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(timer_nr[0], timer_wert);
+				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
 			}
 			if (dia_nr1 != 223)
 				show_cur();
@@ -2242,7 +2242,7 @@ void r41_entry() {
 	}
 	if (spieler.R41Einbruch) {
 		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
-		timer_nr[0] = room->set_timer(7, 5);
+		_G(timer_nr)[0] = room->set_timer(7, 5);
 		det->set_static_ani(7, -1);
 		det->show_static_spr(6);
 		det->show_static_spr(7);
@@ -2414,7 +2414,7 @@ void r42_entry() {
 		SetUpScreenFunc = r42setup_func;
 		if (!flags.LoadGame) {
 			det->stop_detail(0);
-			timer_nr[0] = room->set_timer(8, 5);
+			_G(timer_nr)[0] = room->set_timer(8, 5);
 			det->set_static_ani(8, -1);
 			spieler.R42BeamterWach = true;
 			SetUpScreenFunc = r42setup_func;
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index f5802f302b5..58bb3b6cc8e 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -49,9 +49,9 @@ void r45_entry(int16 eib_nr) {
 	spieler.ScrollxStep = 2;
 	SetUpScreenFunc = r45_setup_func;
 	r45_delay = 0;
-	zoom_horizont = 150;
+	_G(zoom_horizont) = 150;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 4;
+	_G(zoom_mov_fak) = 4;
 	spieler.ZoomXy[P_HOWARD][0] = 80;
 	spieler.ZoomXy[P_HOWARD][1] = 70;
 	if (spieler.PersonRoomNr[P_HOWARD] == 46) {
@@ -68,7 +68,7 @@ void r45_entry(int16 eib_nr) {
 			ho_y = 129;
 
 			spieler.R48TaxiEntry = false;
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 		} else {
 			if (eib_nr == 72) {
 				ch_x = 259;
@@ -462,13 +462,13 @@ void r47_set_detail() {
 }
 
 void r48_entry() {
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	spieler.scrollx = 0;
 	spieler.scrolly = 0;
 	show_cur();
 	r48calc_pic();
 	SetUpScreenFunc = r48setup_func;
-	timer_nr[0] = room->set_timer(255, 20);
+	_G(timer_nr)[0] = room->set_timer(255, 20);
 
 }
 
@@ -502,7 +502,7 @@ void r48_frage() {
 		det->show_static_spr(6);
 		start_detail_wait(1, 1, ANI_RUECK);
 		det->hide_static_spr(6);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
 		flags.AutoAniPlay = false;
 	}
@@ -525,7 +525,7 @@ void r48setup_func() {
 			if (idx != -1) {
 				if (spieler.R48Auswahl[idx]) {
 					det->show_static_spr(1 + idx);
-					if (maus_links_click) {
+					if (_G(maus_links_click)) {
 						switch (idx) {
 						case 0:
 							r_nr = 45;
@@ -565,7 +565,7 @@ void r48setup_func() {
 							cursor_wahl(menu_item);
 							show_cur();
 							spieler.R48TaxiEntry = true;
-							maus_links_click = false;
+							_G(maus_links_click) = false;
 							set_up_screen(DO_SETUP);
 							for (i = 0; i < MAX_PERSON; i++) {
 								if (spieler.R48TaxiPerson[i]) {
@@ -586,13 +586,13 @@ void r48setup_func() {
 }
 
 void r49_entry(int16 eib_nr) {
-	zoom_horizont = 110;
+	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	spieler.ScrollxStep = 2;
 	SetUpScreenFunc = r49setup_func;
 	if (!spieler.R49BoyWeg)
-		timer_nr[0] = room->set_timer(255, 2);
+		_G(timer_nr)[0] = room->set_timer(255, 2);
 	else {
 		det->del_static_ani(0);
 		det->hide_static_spr(5);
@@ -606,7 +606,7 @@ void r49_entry(int16 eib_nr) {
 			spieler.R48TaxiEntry = false;
 			set_person_pos(527, 76, P_HOWARD, P_LEFT);
 			set_person_pos(491, 98, P_CHEWY, P_LEFT);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			spieler.scrollx = 320;
 			spieler.scrolly = 0;
 			det->start_detail(5, 1, ANI_VOR);
@@ -641,14 +641,14 @@ void r49_calc_boy_ani() {
 	}
 	det->set_static_ani(spieler.R49BoyAni, -1);
 	det->start_detail(spieler.R49BoyAni, 1, ANI_VOR);
-	uhr->reset_timer(timer_nr[0], 0);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
 }
 
 void r49_calc_boy() {
 	if (!spieler.R49WegFrei) {
 		hide_cur();
 		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
 		person_end_phase[P_CHEWY] = P_LEFT;
@@ -700,7 +700,7 @@ int16 r49_use_boy() {
 		auto_scroll(164, 0);
 		flic_cut(FCUT_067, FLC_MODE);
 		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		det->del_static_ani(spieler.R49BoyAni);
 		det->stop_detail(spieler.R49BoyAni);
 		flags.NoScroll = false;
@@ -728,7 +728,7 @@ void r49_talk_boy() {
 void r49_talk_boy(int16 aad_nr) {
 	if (!spieler.R49BoyWeg) {
 		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(timer_nr[0], 0);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
 		det->stop_detail(spieler.R49BoyAni);
 
 		det->set_static_ani(spieler.R49BoyAni, -1);
@@ -810,7 +810,7 @@ void r50_entry(int16 eib_nr) {
 	} else
 		det->start_detail(0, 255, ANI_VOR);
 	if (!spieler.R50KeyOK) {
-		timer_nr[0] = room->set_timer(1, 8);
+		_G(timer_nr)[0] = room->set_timer(1, 8);
 		r50Wasser = false;
 	} else
 		det->show_static_spr(4);
@@ -995,9 +995,9 @@ void r50setup_func() {
 
 void r51_entry() {
 	int16 i;
-	zoom_horizont = 140;
+	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 4;
+	_G(zoom_mov_fak) = 4;
 	for (i = 0; i < 2; i++)
 		det->start_detail(3 + i, 1, ANI_VOR);
 	if (spieler.PersonRoomNr[P_HOWARD] == 51) {
@@ -1289,7 +1289,7 @@ void r53_entry() {
 	atds->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 	start_detail_wait(0, 1, ANI_VOR);
 	det->set_static_ani(1, -1);
-	timer_nr[0] = room->set_timer(1, 7);
+	_G(timer_nr)[0] = room->set_timer(1, 7);
 	show_cur();
 }
 
@@ -1339,9 +1339,9 @@ int16 r53_use_man() {
 void r54_entry(int16 eib_nr) {
 	spieler.ScrollxStep = 2;
 	SetUpScreenFunc = r54_setup_func;
-	zoom_horizont = 106;
+	_G(zoom_horizont) = 106;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	spieler.ZoomXy[P_HOWARD][0] = 30;
 	spieler.ZoomXy[P_HOWARD][1] = 66;
 	if (spieler.R54FputzerWeg)
@@ -1355,7 +1355,7 @@ void r54_entry(int16 eib_nr) {
 				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
 			}
 			set_person_pos(300, 80, P_CHEWY, P_LEFT);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			spieler.scrollx = 134;
 			spieler.scrolly = 0;
 		} else if (spieler.R55Location) {
@@ -1400,7 +1400,7 @@ void r54_calc_auto_taxi() {
 		spieler.R54HowardVorne = false;
 		go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
 		spieler.PersonRoomNr[P_HOWARD] = r_nr;
-		maus_links_click = false;
+		_G(maus_links_click) = false;
 		show_cur();
 		spieler.R48TaxiEntry = true;
 		switch_room(r_nr);
@@ -1533,7 +1533,7 @@ int16 r54_use_zelle() {
 				del_inventar(spieler.AkInvent);
 				invent_2_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_JMANS);
-				zoom_horizont = 90;
+				_G(zoom_horizont) = 90;
 				set_person_pos(283, 93, P_CHEWY, P_LEFT);
 				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
 				start_aad_wait(315, -1);
@@ -1626,7 +1626,7 @@ void r54_aufzug_ab() {
 	det->hide_static_spr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	spieler.PersonHide[P_CHEWY] = false;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	stop_person(P_CHEWY);
 	spieler.R55Location = false;
 }
@@ -1656,9 +1656,9 @@ short r54_use_taxi() {
 void r55_entry() {
 	spieler.ScrollxStep = 2;
 	SetUpScreenFunc = r55_setup_func;
-	zoom_horizont = 140;
+	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	spieler.R55ExitDia = 0;
 	spieler.ZoomXy[P_HOWARD][0] = 20;
 	spieler.ZoomXy[P_HOWARD][1] = 22;
@@ -1671,7 +1671,7 @@ void r55_entry() {
 		det->start_detail(8, 255, ANI_VOR);
 		det->start_detail(9, 255, ANI_VOR);
 		spieler.R55Entry ^= 1;
-		timer_nr[0] = room->set_timer(19 + (int16)spieler.R55Entry, 10);
+		_G(timer_nr)[0] = room->set_timer(19 + (int16)spieler.R55Entry, 10);
 		det->set_static_ani(19 + (int16)spieler.R55Entry, -1);
 	}
 	spieler_mi[P_HOWARD].Mode = true;
@@ -1690,7 +1690,7 @@ void r55_entry() {
 			spieler.scrollx = 136;
 			set_person_pos(400, 82, P_CHEWY, P_RIGHT);
 			start_detail_wait(3, 1, ANI_VOR);
-			timer_nr[0] = room->set_timer(4, 10);
+			_G(timer_nr)[0] = room->set_timer(4, 10);
 			det->set_static_ani(4, -1);
 			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
@@ -2028,9 +2028,9 @@ void r55_talk_line() {
 void r56_entry() {
 	spieler.ScrollxStep = 2;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 4;
+	_G(zoom_mov_fak) = 4;
 	spieler_mi[P_HOWARD].Mode = true;
-	timer_nr[0] = room->set_timer(255, 25);
+	_G(timer_nr)[0] = room->set_timer(255, 25);
 	if (!flags.LoadGame) {
 		if (spieler.R48TaxiEntry) {
 			hide_cur();
@@ -2040,7 +2040,7 @@ void r56_entry() {
 			spieler.PersonHide[P_CHEWY] = true;
 			spieler.PersonHide[P_HOWARD] = true;
 			det->hide_static_spr(2);
-			zoom_horizont = 0;
+			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
 			start_detail_wait(7, 1, ANI_RUECK);
@@ -2060,13 +2060,13 @@ void r56_entry() {
 			spieler_mi[P_CHEWY].Mode = true;
 			auto_move(1, P_CHEWY);
 			spieler_mi[P_CHEWY].Mode = false;
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			show_cur();
 		} else if (spieler.R62Flucht) {
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			spieler.ZoomXy[P_HOWARD][0] = 40;
 			spieler.ZoomXy[P_HOWARD][1] = 86;
-			zoom_horizont = 114;
+			_G(zoom_horizont) = 114;
 			room->set_zoom(70);
 			spieler.R62Flucht = false;
 			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
@@ -2078,7 +2078,7 @@ void r56_entry() {
 			room->set_timer_status(0, TIMER_STOP);
 			det->del_static_ani(0);
 			det->set_static_ani(3, -1);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			atds->stop_aad();
 			start_aad_wait(306, -1);
 			flic_cut(FCUT_076, FLC_MODE);
@@ -2087,7 +2087,7 @@ void r56_entry() {
 	SetUpScreenFunc = r56_setup_func;
 	spieler.ZoomXy[P_HOWARD][0] = 40;
 	spieler.ZoomXy[P_HOWARD][1] = 86;
-	zoom_horizont = 114;
+	_G(zoom_horizont) = 114;
 	room->set_zoom(70);
 }
 
@@ -2104,7 +2104,7 @@ int16 r56_use_taxi() {
 		auto_move(1, P_CHEWY);
 		start_detail_wait(7, 1, ANI_RUECK);
 		det->start_detail(8, 1, ANI_VOR);
-		zoom_horizont = 0;
+		_G(zoom_horizont) = 0;
 		room->set_zoom(23);
 		spieler.ZoomXy[P_HOWARD][0] = 17;
 		spieler.ZoomXy[P_HOWARD][1] = 37;
@@ -2243,7 +2243,7 @@ void r56_setup_func() {
 		if (det->get_ani_status(10) == false) {
 			r56koch_flug = 0;
 
-			uhr->reset_timer(timer_nr[0], 0);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
 		}
 		break;
 
@@ -2280,9 +2280,9 @@ void r56_setup_func() {
 }
 
 void r57_entry() {
-	zoom_horizont = 180;
+	_G(zoom_horizont) = 180;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 4;
+	_G(zoom_mov_fak) = 4;
 	SetUpScreenFunc = r57_setup_func;
 	spieler.ZoomXy[P_HOWARD][0] = 46;
 	spieler.ZoomXy[P_HOWARD][1] = 86;
@@ -2298,7 +2298,7 @@ void r57_entry() {
 			set_person_pos(4, 144, P_HOWARD, P_LEFT);
 			set_person_pos(40, 160, P_CHEWY, P_RIGHT);
 			auto_move(2, P_CHEWY);
-			maus_links_click = false;
+			_G(maus_links_click) = false;
 			show_cur();
 		}
 	}
@@ -2475,7 +2475,7 @@ void r62_entry() {
 	spieler.room_e_obj[91].Attribut = 255;
 	if (!spieler.R62FirstEntry) {
 		spieler.R62TShow = false;
-		cur_hide_flag = false;
+		_G(cur_hide_flag) = false;
 		hide_cur();
 		spieler.R62FirstEntry = true;
 		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
@@ -2562,14 +2562,14 @@ int16 r62_use_laura() {
 }
 
 void r63_entry() {
-	zoom_horizont = 76;
+	_G(zoom_horizont) = 76;
 	spieler.ScrollxStep = 2;
 	r63Schalter = false;
 	r63RunDia = 0;
 	if (spieler.R63FxMannWeg)
 		det->del_static_ani(5);
 	if (!spieler.R63Uhr) {
-		cur_hide_flag = false;
+		_G(cur_hide_flag) = false;
 		hide_cur();
 		det->start_detail(12, 255, ANI_VOR);
 		det->start_detail(10, 255, ANI_VOR);
@@ -2817,7 +2817,7 @@ int16 r63_use_aschenbecher() {
 	int16 action_ret = false;
 	if (is_cur_inventar(ASCHE_INV)) {
 		action_ret = true;
-		cur_hide_flag = false;
+		_G(cur_hide_flag) = false;
 		hide_cur();
 		if (spieler.R63Uhr) {
 			if (spieler.R63FxMannWeg) {
@@ -2857,7 +2857,7 @@ void r64_entry() {
 	r62Delay = 0;
 	r64TalkAni = spieler.R64Moni1Ani;
 	if (!spieler.R64ManWeg) {
-		timer_nr[0] = room->set_timer(1, 10);
+		_G(timer_nr)[0] = room->set_timer(1, 10);
 		det->set_static_ani(1, -1);
 		r64_chewy_entry();
 		if (spieler.R63Feuer) {
@@ -3012,7 +3012,7 @@ void r65_entry() {
 	spieler_vector[P_HOWARD].Xypos[0] = 150;
 	spieler_vector[P_HOWARD].Xypos[1] = 10;
 	if (spieler.PersonDia[P_HOWARD] < 10000) {
-		cur_hide_flag = false;
+		_G(cur_hide_flag) = false;
 		hide_cur();
 		start_aad_wait(spieler.PersonDia[P_HOWARD], -1);
 		show_cur();
@@ -3031,7 +3031,7 @@ void r65_exit() {
 	set_person_pos(r65tmp_ho_x, r65tmp_ho_y, P_HOWARD, -1);
 	room_blk.AadLoad = true;
 	room_blk.AtsLoad = true;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	set_person_rnr();
 }
 
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 2c1261b69ea..7b8dec293ab 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -64,7 +64,7 @@ void r67_entry() {
 	if (spieler.R67KommodeAuf)
 		det->show_static_spr(9);
 	if (!spieler.R67PapageiWeg) {
-		timer_nr[0] = room->set_timer(1, 10);
+		_G(timer_nr)[0] = room->set_timer(1, 10);
 		det->set_static_ani(1, -1);
 	} else
 		det->show_static_spr(0);
@@ -210,7 +210,7 @@ void r68_entry() {
 		det->start_detail(21, 255, ANI_VOR);
 	}
 	if (!spieler.R68DivaWeg) {
-		timer_nr[0] = room->set_timer(255, 10);
+		_G(timer_nr)[0] = room->set_timer(255, 10);
 		det->set_static_ani(18, -1);
 	} else
 		det->hide_static_spr(3);
@@ -254,7 +254,7 @@ void r68_setup_func() {
 			r68HohesC = -1;
 			det->stop_detail(18);
 			det->show_static_spr(3);
-			uhr->reset_timer(timer_nr[0], 0);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
 		}
 		break;
 
@@ -318,7 +318,7 @@ int16 r68_use_indigo() {
 			auto_scroll(78, 0);
 			del_inventar(spieler.AkInvent);
 			r68_talk_indigo(394);
-			cur_hide_flag = false;
+			_G(cur_hide_flag) = false;
 			hide_cur();
 			room->set_timer_status(8, TIMER_STOP);
 			det->del_static_ani(8);
@@ -358,7 +358,7 @@ void r68_talk_keeper() {
 	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - spieler.scrolly;
 	atds->set_split_win(3, &ssi[3]);
 	start_ads_wait(20);
-	cur_hide_flag = false;
+	_G(cur_hide_flag) = false;
 	hide_cur();
 	det->del_static_ani(16);
 	start_detail_wait(15, 1, ANI_RUECK);
@@ -404,7 +404,7 @@ void r68_calc_diva() {
 					start_aad_wait(386, -1);
 					start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 					new_invent_2_cur(BAR_GUT_INV);
-					uhr->reset_timer(timer_nr[0], 0);
+					uhr->reset_timer(_G(timer_nr)[0], 0);
 					show_cur();
 				}
 			}
@@ -527,9 +527,9 @@ void r69_entry(int16 eib_nr) {
 	spieler.ZoomXy[P_HOWARD][1] = 90;
 	spieler.ZoomXy[P_NICHELLE][0] = 46;
 	spieler.ZoomXy[P_NICHELLE][1] = 90;
-	zoom_horizont = 110;
+	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
-	zoom_mov_fak = 3;
+	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = r69_setup_func;
 	spieler.DiaAMov = 2;
 	if (!flags.LoadGame) {
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 86f519a1e7f..68235ec7c87 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -120,31 +120,15 @@ const int16 SPZ_ANI_PH[][2] = {
 };
 
 
-int16 ani_invent_anf[3] = { 38, 39, 21 };
-int16 ani_invent_delay[3][2] = {
-	{12, 12},
-	{10, 10},
-	{11, 11},
-};
-int16 ani_count[3] = { 38, 39, 21 };
-
-
-int16 pfeil_ani;
-int16 pfeil_delay;
-int16 cur_hide_flag;
-
-int16 auto_p_nr;
-
-int16 timer_nr[MAX_TIMER_OBJ];
-
-int16 zoom_horizont;
-int16 zoom_mov_fak;
+Globals *g_globals = nullptr;
 
-int16 auto_obj;
-int16 ged_mov_ebene;
+Globals::Globals() {
+	g_globals = this;
+}
 
-bool cur_display;
-int16 maus_links_click;
+Globals::~Globals() {
+	g_globals = nullptr;
+}
 
 int16 person_tmp_hide[MAX_PERSON];
 int16 person_tmp_room[MAX_PERSON];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 13288ac77d8..a51cccc2e8c 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -44,24 +44,58 @@ extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
 extern const int16 ANI_INVENT_END[3];
 extern const int16 SPZ_ANI_PH[][2];
 
-extern int16 pfeil_ani;
-extern int16 pfeil_delay;
-extern int16 cur_hide_flag;
 
-extern int16 auto_p_nr;
-
-extern int16 timer_nr[MAX_TIMER_OBJ];
-
-extern int16 zoom_horizont;
-extern int16 zoom_mov_fak;
-
-extern int16 auto_obj;
-extern int16 ged_mov_ebene;
+class Globals {
+	class CurrentScreen : public Graphics::Surface {
+	public:
+		CurrentScreen() {
+			w = pitch = SCREEN_WIDTH;
+			h = SCREEN_HEIGHT;
+			format = Graphics::PixelFormat::createFormatCLUT8();
+		}
+		CurrentScreen &operator=(byte *p) {
+			setPixels(p);
+			return *this;
+		}
+		byte *getPixels() { return (byte *)Graphics::Surface::getPixels(); }
+	};
+
+public:
+	Globals();
+	~Globals();
+public:
+	int16 _ani_invent_anf[3] = { 38, 39, 21 };
+	int16 _ani_invent_delay[3][2] = {
+		{12, 12},
+		{10, 10},
+		{11, 11},
+	};
+	int16 _ani_count[3] = { 38, 39, 21 };
+	int16 _timer_nr[MAX_TIMER_OBJ] = { 0 };
+public:
+	CurrentScreen _currentScreen;
+
+	int16 _pfeil_ani = 0;
+	int16 _pfeil_delay = 0;
+	int16 _cur_hide_flag = 0;
+	int16 _auto_p_nr = 0;
+
+	int16 _zoom_horizont = 0;
+	int16 _zoom_mov_fak = 0;
+
+	int16 _auto_obj = 0;
+	int16 _ged_mov_ebene = 0;
+
+	bool _cur_display = false;
+	int16 _maus_links_click = 0;
+};
+
+extern Globals *g_globals;
+
+#define _G(FIELD) g_globals->_##FIELD
 
 extern int16 person_tmp_hide[MAX_PERSON];
 extern int16 person_tmp_room[MAX_PERSON];
-extern bool cur_display;
-extern int16 maus_links_click;
 
 extern char *err_str;
 extern uint32 ram_end;
@@ -117,9 +151,6 @@ extern int16 maus_old_x;
 extern int16 maus_old_y;
 extern int16 inventar_nr;
 
-extern int16 ani_invent_anf[3];
-extern int16 ani_invent_delay[3][2];
-extern int16 ani_count[3];
 extern int16 invent_cur_mode;
 extern int16 ak_invent;
 extern byte *inv_spr[MAX_MOV_OBJ];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 119473b69f0..6b0e4d38a9c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -99,7 +99,7 @@ void standard_init() {
 	ablage = room->get_ablage();
 	ged_mem = room->get_ged_mem();
 
-	zoom_horizont = 140;
+	_G(zoom_horizont) = 140;
 	pal [765] = 63;
 	pal [766] = 63;
 	pal [767] = 63;
@@ -119,10 +119,10 @@ void var_init() {
 	Adi = &Rdi->Ainfo[0];
 
 	life_handler = false;
-	auto_p_nr = 0;
+	_G(auto_p_nr) = 0;
 	menu_item = 0;
 	inventar_nr = 0;
-	ged_mov_ebene = 1;
+	_G(ged_mov_ebene) = 1;
 	new_game();
 	spieler.MainMenuY = MENU_Y;
 	spieler.DispFlag = true;
@@ -173,8 +173,8 @@ void var_init() {
 	spieler.DisplayText = true;
 	CurrentSong = -1;
 	SetUpScreenFunc = nullptr;
-	pfeil_delay = 0;
-	pfeil_ani = 0;
+	_G(pfeil_delay) = 0;
+	_G(pfeil_ani) = 0;
 	timer_action_ctr = 0;
 	flags.CursorStatus = true;
 	savegameFlag = false;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 251076b4d7c..6d8d483d73a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -267,8 +267,8 @@ void cursor_wahl(int16 nr) {
 }
 
 void hide_cur() {
-	if (!cur_hide_flag) {
-		cur_hide_flag = true;
+	if (!_G(cur_hide_flag)) {
+		_G(cur_hide_flag) = true;
 		flags.ShowAtsInvTxt = false;
 		cur->hide_cur();
 		flags.CursorStatus = false;
@@ -293,7 +293,7 @@ void test_menu() {
 	inv_disp_ok = false;
 	spieler.inv_cur = false;
 	menu_display = false;
-	cur_display = true;
+	_G(cur_display) = true;
 	cur->show_cur();
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[spieler_vector[P_CHEWY].Phase];
@@ -303,11 +303,11 @@ void test_menu() {
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	flags.main_maus_flag = false;
 	tmp_menu_item = false;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	spieler.PersonHide[P_CHEWY] = false;
 	txt_aus_click = false;
 	fx_blend = BLEND3;
-	auto_obj = 0;
+	_G(auto_obj) = 0;
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
 	enter_room(-1);
@@ -379,7 +379,7 @@ int16 main_loop(int16 mode) {
 			menu_exit();
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
-			cur_display = true;
+			_G(cur_display) = true;
 			if (spieler.AkInvent == -1) {
 				menu_item = tmp_menu_item;
 				cursor_wahl(menu_item);
@@ -409,7 +409,7 @@ int16 main_loop(int16 mode) {
 				cursor_wahl(CUR_AK_INVENT);
 			} else
 				cursor_wahl(menu_item);
-			cur_display = true;
+			_G(cur_display) = true;
 			flags.SaveMenu = false;
 			cur->show_cur();
 			out->setze_zeiger(workptr);
@@ -423,7 +423,7 @@ int16 main_loop(int16 mode) {
 				maus_old_y = minfo.y;
 				menu_display = MENU_EINBLENDEN;
 				maus_menu_x = (MAUS_MENU_MAX_X / 5) * (menu_item);
-				cur_display = false;
+				_G(cur_display) = false;
 				cur->move(maus_menu_x, 100);
 			} else {
 				menu_exit();
@@ -446,7 +446,7 @@ int16 main_loop(int16 mode) {
 				menu_exit();
 				menu_flag = MENU_AUSBLENDEN;
 				menu_display = 0;
-				cur_display = true;
+				_G(cur_display) = true;
 				if (spieler.AkInvent == -1) {
 					menu_item = tmp_menu_item;
 					cursor_wahl(menu_item);
@@ -482,7 +482,7 @@ int16 main_loop(int16 mode) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
 					cursor_wahl(tmp_menu_item);
-				cur_display = true;
+				_G(cur_display) = true;
 
 				flags.SaveMenu = false;
 				cur->show_cur();
@@ -493,7 +493,7 @@ int16 main_loop(int16 mode) {
 					menu_exit();
 					menu_flag = MENU_AUSBLENDEN;
 					menu_display = 0;
-					cur_display = true;
+					_G(cur_display) = true;
 					cur->move(maus_old_x, maus_old_y);
 					minfo.x = maus_old_x;
 					minfo.y = maus_old_y;
@@ -534,7 +534,7 @@ int16 main_loop(int16 mode) {
 			menu_exit();
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
-			cur_display = true;
+			_G(cur_display) = true;
 			cur->move(maus_old_x, maus_old_y);
 			minfo.x = maus_old_x;
 			minfo.y = maus_old_y;
@@ -607,7 +607,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 		if (flags.AdsDialog)
 			ads_menu();
-		if (maus_links_click) {
+		if (_G(maus_links_click)) {
 			if (menu_item == CUR_WALK) {
 				if (cur_ausgang_flag) {
 					calc_ausgang(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
@@ -625,7 +625,7 @@ void set_up_screen(SetupScreenMode mode) {
 						gpkt.Hoehe = room->GedYAnz[room_blk.AkAblage];
 						gpkt.Mem = ged_mem[room_blk.AkAblage];
 						gpkt.Ebenen = room->GedInfo[room_blk.AkAblage].Ebenen;
-						gpkt.AkMovEbene = ged_mov_ebene;
+						gpkt.AkMovEbene = _G(ged_mov_ebene);
 						mov->goto_xy(&gpkt);
 						spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
 						spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
@@ -635,7 +635,7 @@ void set_up_screen(SetupScreenMode mode) {
 						                     *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
 						get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 						spieler_vector[P_CHEWY].DelayCount = 0;
-						auto_p_nr = P_CHEWY;
+						_G(auto_p_nr) = P_CHEWY;
 					}
 				}
 			}
@@ -658,7 +658,7 @@ void set_up_screen(SetupScreenMode mode) {
 			}
 		}
 
-		for (i = 0; i < auto_obj && !flags.StopAutoObj; i++)
+		for (i = 0; i < _G(auto_obj) && !flags.StopAutoObj; i++)
 			mov_objekt(&auto_mov_vector[i], &auto_mov_obj[i]);
 
 		nr = obj->is_iib_mouse(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
@@ -677,27 +677,27 @@ void set_up_screen(SetupScreenMode mode) {
 					calc_mouse_person(minfo.x, minfo.y);
 			}
 		}
-		if (cur_display == true && mode == DO_SETUP) {
+		if (_G(cur_display) == true && mode == DO_SETUP) {
 			cur->plot_cur();
 
 			if ((spieler.inv_cur) && (flags.CursorStatus == true))
-				out->sprite_set(curtaf->image[pfeil_ani + 32], minfo.x, minfo.y,
+				out->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
 				                scr_width);
-			if (pfeil_delay == 0) {
-				pfeil_delay = spieler.DelaySpeed;
-				if (pfeil_ani < 4)
-					++pfeil_ani;
+			if (_G(pfeil_delay) == 0) {
+				_G(pfeil_delay) = spieler.DelaySpeed;
+				if (_G(pfeil_ani) < 4)
+					++_G(pfeil_ani);
 				else
-					pfeil_ani = 0;
+					_G(pfeil_ani) = 0;
 			} else
-				--pfeil_delay;
+				--_G(pfeil_delay);
 		}
 	}
 
 	atds->print_aad(spieler.scrollx, spieler.scrolly);
 	atds->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
 	                spieler_vector[P_CHEWY].Xypos[1], spieler.scrollx, spieler.scrolly);
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	menu_flag = false;
 	if (mode == DO_SETUP) {
 		out->setze_zeiger(0);
@@ -729,7 +729,7 @@ void set_up_screen(SetupScreenMode mode) {
 		fx_blend = BLEND_NONE;
 	}
 
-	cur_hide_flag = false;
+	_G(cur_hide_flag) = false;
 	ScrXy = (int16 *)ablage[room_blk.AkAblage];
 	if (!menu_display)
 		calc_scroll(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
@@ -775,7 +775,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 		}
 	}
 
-	if (maus_links_click) {
+	if (_G(maus_links_click)) {
 		if (menu_item != CUR_USE)
 			look_invent_screen(txt_mode, txt_nr);
 		else {
@@ -784,7 +784,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			} else {
 				if (txt_mode == INVENTAR_NORMAL) {
 					if (!flags.ChAutoMov) {
-						maus_links_click = false;
+						_G(maus_links_click) = false;
 						auto_move(spieler.room_m_obj[nr].AutoMov, P_CHEWY);
 						look_invent_screen(txt_mode, txt_nr);
 
@@ -938,9 +938,9 @@ void maus_action() {
 								kbinfo.scan_code = Common::KEYCODE_INVALID;
 							}
 						} else if (!flags.MausLinks)
-							maus_links_click = true;
+							_G(maus_links_click) = true;
 					} else if (!flags.MausLinks)
-						maus_links_click = true;
+						_G(maus_links_click) = true;
 				}
 			}
 			flags.main_maus_flag = 1;
@@ -966,7 +966,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			hide_cur();
 			if (flags.InventMenu == false) {
 				if (spieler.room_m_obj[spieler.AkInvent].AutoMov != 255) {
-					maus_links_click = 0;
+					_G(maus_links_click) = 0;
 					auto_move(spieler.room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
 				txt_nr = obj->iib_txt_nr(test_nr);
@@ -984,7 +984,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case INVENTAR_STATIC:
 		ret = obj->action_iib_sib(spieler.AkInvent, test_nr);
 		if (ret != NO_ACTION) {
-			maus_links_click = 0;
+			_G(maus_links_click) = 0;
 			hide_cur();
 			if (spieler.room_m_obj[spieler.AkInvent].AutoMov != 255) {
 				auto_move(spieler.room_s_obj[test_nr].AutoMov, P_CHEWY);
@@ -1021,7 +1021,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case STATIC_USE:
 		ret = obj->calc_static_use(test_nr);
 		if (ret == OBJEKT_1) {
-			maus_links_click = 0;
+			_G(maus_links_click) = 0;
 			hide_cur();
 			if (spieler.room_s_obj[test_nr].AutoMov != 255) {
 
@@ -1065,7 +1065,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				}
 			}
 		} else if (ret == SIB_GET_INV) {
-			maus_links_click = 0;
+			_G(maus_links_click) = 0;
 			hide_cur();
 			if (spieler.room_s_obj[test_nr].AutoMov != 255) {
 				auto_move(spieler.room_s_obj[test_nr].AutoMov, P_CHEWY);
@@ -1266,9 +1266,9 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			key = false;
 			move_status = true;
 			flags.ChAutoMov = true;
-			auto_p_nr = p_nr;
-			tmp = maus_links_click;
-			maus_links_click = false;
+			_G(auto_p_nr) = p_nr;
+			tmp = _G(maus_links_click);
+			_G(maus_links_click) = false;
 			gpkt.Dx = Rdi->AutoMov[mov_nr].X -
 			          spieler_mi[p_nr].HotMovX + spieler_mi[p_nr].HotX;
 			gpkt.Dy = Rdi->AutoMov[mov_nr].Y -
@@ -1279,7 +1279,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			gpkt.Hoehe = room->GedYAnz[room_blk.AkAblage];
 			gpkt.Mem = ged_mem[room_blk.AkAblage];
 			gpkt.Ebenen = room->GedInfo[room_blk.AkAblage].Ebenen;
-			gpkt.AkMovEbene = ged_mov_ebene;
+			gpkt.AkMovEbene = _G(ged_mov_ebene);
 			mov->goto_xy(&gpkt);
 
 			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
@@ -1333,8 +1333,8 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 					set_up_screen(DO_SETUP);
 				}
 			}
-			auto_p_nr = P_CHEWY;
-			maus_links_click = tmp;
+			_G(auto_p_nr) = P_CHEWY;
+			_G(maus_links_click) = tmp;
 			flags.ChAutoMov = false;
 		}
 	}
@@ -1349,8 +1349,8 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 	if (!flags.ChAutoMovXy) {
 		move_status = true;
 		flags.ChAutoMovXy = true;
-		tmp = maus_links_click;
-		maus_links_click = false;
+		tmp = _G(maus_links_click);
+		_G(maus_links_click) = false;
 		ende = 0;
 		spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
 		spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
@@ -1378,7 +1378,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 				set_up_screen(DO_SETUP);
 			}
 		}
-		maus_links_click = tmp;
+		_G(maus_links_click) = tmp;
 		flags.ChAutoMovXy = false;
 	}
 }
@@ -1434,7 +1434,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 			if (txt_nr != -1) {
 				ret = txt_nr;
-				if (maus_links_click && !flags.MausTxt) {
+				if (_G(maus_links_click) && !flags.MausTxt) {
 					ok = true;
 					flags.MausTxt = true;
 					switch (menu_item) {
@@ -1590,7 +1590,7 @@ void calc_mouse_person(int16 x, int16 y) {
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
 				print_shad(x, y, 255, 300, 0, scr_width, str_);
-				if (maus_links_click == 1) {
+				if (_G(maus_links_click) == 1) {
 					def_nr = -1;
 					txt_nr = -1;
 					if (!spieler.inv_cur) {
@@ -1688,7 +1688,7 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 	txt_nr = -1;
 	*auto_nr = -1;
 	ok = 0;
-	for (i = 0; i < auto_obj && !ok; i++) {
+	for (i = 0; i < _G(auto_obj) && !ok; i++) {
 		if (mouse_auto_obj(i, 0, 0)) {
 			ok = 1;
 			txt_nr = mov_phasen[i].AtsText;
@@ -1711,7 +1711,7 @@ void calc_ani_timer() {
 void get_user_key(int16 mode) {
 	flags.StopAutoObj = true;
 	maus_action();
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	if (!inv_disp_ok) {
 		switch (in->get_switch_code()) {
 		case F5_KEY:
@@ -1725,7 +1725,7 @@ void get_user_key(int16 mode) {
 			invent_menu();
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
-			cur_display = true;
+			_G(cur_display) = true;
 			if (spieler.AkInvent == -1) {
 				menu_item = tmp_menu_item;
 				cursor_wahl(menu_item);
@@ -1766,7 +1766,7 @@ void del_inventar(int16 nr) {
 	spieler.AkInvent = -1;
 	cursor_wahl(menu_item);
 	del_invent_slot(nr);
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 }
 
 bool is_cur_inventar(int16 nr) {
@@ -1823,7 +1823,7 @@ void calc_ausgang(int16 x, int16 y) {
 	int16 u_idx;
 	int16 *ScrXy;
 	if (!flags.ExitMov) {
-		maus_links_click = false;
+		_G(maus_links_click) = false;
 		nr = obj->is_exit(x, y);
 		if (nr != -1) {
 			flags.ExitMov = true;
@@ -1832,14 +1832,14 @@ void calc_ausgang(int16 x, int16 y) {
 				menu_item = CUR_DISK;
 				cursor_wahl(CUR_DISK);
 				set_up_screen(DO_SETUP);
-				cur_hide_flag = true;
+				_G(cur_hide_flag) = true;
 				exit_room(nr);
 				spieler.PersonRoomNr[P_CHEWY] = spieler.room_e_obj[nr].Exit;
 				room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
 				ERROR
 				set_person_pos(Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].X -
-				               spieler_mi[auto_p_nr].HotMovX,
-				               Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].Y - spieler_mi[auto_p_nr].HotMovY
+				               spieler_mi[_G(auto_p_nr)].HotMovX,
+				               Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
 				ScrXy = (int16 *)ablage[room_blk.AkAblage];
 				get_scroll_off(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
@@ -1855,7 +1855,7 @@ void calc_ausgang(int16 x, int16 y) {
 				set_person_spr(Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
 				fx_blend = BLEND1;
-				auto_obj = 0;
+				_G(auto_obj) = 0;
 				spieler_vector[P_CHEWY].Xzoom = 0;
 				spieler_vector[P_CHEWY].Yzoom = 0;
 				flags.ShowAtsInvTxt = true;
@@ -1941,8 +1941,8 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
 void auto_scroll(int16 scrx, int16 scry) {
 	int16 ende;
 	int16 tmp_maus_click;
-	tmp_maus_click = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_click = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	spieler.scrollx >>= 1;
 	spieler.scrollx <<= 1;
 	spieler.scrolly >>= 1;
@@ -1961,7 +1961,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 			ende = true;
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_click;
+	_G(maus_links_click) = tmp_maus_click;
 }
 
 void disable_timer() {
@@ -1978,22 +1978,22 @@ void calc_auto_go() {
 	int16 x_offset;
 	int16 y_offset;
 	x_offset =
-	    spieler_mi[auto_p_nr].HotMovX + (spieler_mi[auto_p_nr].HotX - spieler_mi[auto_p_nr].HotMovX - 1);
+	    spieler_mi[_G(auto_p_nr)].HotMovX + (spieler_mi[_G(auto_p_nr)].HotX - spieler_mi[_G(auto_p_nr)].HotMovX - 1);
 	y_offset =
-	    spieler_mi[auto_p_nr].HotMovY + (spieler_mi[auto_p_nr].HotY - spieler_mi[auto_p_nr].HotMovY - 2);
-	if (mov->calc_auto_go(spieler_mi[auto_p_nr].XyzStart[0] + x_offset,
-	                       spieler_mi[auto_p_nr].XyzStart[1] + y_offset,
-	                       &spieler_mi[auto_p_nr].XyzEnd[0],
-	                       &spieler_mi[auto_p_nr].XyzEnd[1]) != -1)
+	    spieler_mi[_G(auto_p_nr)].HotMovY + (spieler_mi[_G(auto_p_nr)].HotY - spieler_mi[_G(auto_p_nr)].HotMovY - 2);
+	if (mov->calc_auto_go(spieler_mi[_G(auto_p_nr)].XyzStart[0] + x_offset,
+	                       spieler_mi[_G(auto_p_nr)].XyzStart[1] + y_offset,
+	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[0],
+	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[1]) != -1)
 	{
-		spieler_mi[auto_p_nr].XyzStart[0] = spieler_vector[auto_p_nr].Xypos[0];
-		spieler_mi[auto_p_nr].XyzStart[1] = spieler_vector[auto_p_nr].Xypos[1];
-		spieler_mi[auto_p_nr].XyzEnd[0] -= x_offset;
-		spieler_mi[auto_p_nr].XyzEnd[1] -= y_offset;
+		spieler_mi[_G(auto_p_nr)].XyzStart[0] = spieler_vector[_G(auto_p_nr)].Xypos[0];
+		spieler_mi[_G(auto_p_nr)].XyzStart[1] = spieler_vector[_G(auto_p_nr)].Xypos[1];
+		spieler_mi[_G(auto_p_nr)].XyzEnd[0] -= x_offset;
+		spieler_mi[_G(auto_p_nr)].XyzEnd[1] -= y_offset;
 		mov->get_mov_vector((int16
-		                     *)spieler_mi[auto_p_nr].XyzStart, spieler_mi[auto_p_nr].Vorschub, &spieler_vector[auto_p_nr])
+		                     *)spieler_mi[_G(auto_p_nr)].XyzStart, spieler_mi[_G(auto_p_nr)].Vorschub, &spieler_vector[_G(auto_p_nr)])
 		;
-		get_phase(&spieler_vector[auto_p_nr], &spieler_mi[auto_p_nr]);
+		get_phase(&spieler_vector[_G(auto_p_nr)], &spieler_mi[_G(auto_p_nr)]);
 	}
 }
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 9547e8fc3f6..f0fd76a0f4a 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -159,7 +159,7 @@ void MainMenu::animate() {
 	kb_mov(1);
 	calc_maus_txt(minfo.x, minfo.y, 1);
 	cur->plot_cur();
-	maus_links_click = 0;
+	_G(maus_links_click) = 0;
 	menu_flag = 0;
 	out->setze_zeiger(nullptr);
 	out->back2screen(workpage);
@@ -225,7 +225,7 @@ void MainMenu::startGame() {
 	menu_item = 0;
 	cursor_wahl(0);
 	enter_room(-1);
-	auto_obj = 0;
+	_G(auto_obj) = 0;
 }
 
 bool MainMenu::loadGame() {
@@ -243,7 +243,7 @@ bool MainMenu::loadGame() {
 
 	cursor_wahl((spieler.inv_cur && spieler.AkInvent != -1 &&
 		menu_item == 1) ? 8 : 0);
-	cur_display = true;
+	_G(cur_display) = true;
 	restorePersonAni();
 	flags.SaveMenu = false;
 
@@ -258,9 +258,9 @@ bool MainMenu::loadGame() {
 void MainMenu::playGame() {
 	// unused1 = 0;
 	inv_disp_ok = false;
-	cur_display = true;
+	_G(cur_display) = true;
 	tmp_menu_item = 0;
-	maus_links_click = 0;
+	_G(maus_links_click) = 0;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 
 	flags.main_maus_flag = false;
@@ -274,7 +274,7 @@ void MainMenu::playGame() {
 	while (!SHOULD_QUIT && !main_loop(1)) {
 	}
 
-	auto_obj = 0;
+	_G(auto_obj) = 0;
 }
 
 void MainMenu::savePersonAni() {
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index ee3edf5faa7..b4cc4f7229c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -23,13 +23,14 @@
 #include "common/system.h"
 #include "graphics/palette.h"
 #include "chewy/chewy.h"
+#include "chewy/global.h"
 #include "chewy/mcga.h"
 #include "chewy/mcga_grafik.h"
 
 namespace Chewy {
 
-#define SCREEN_S g_engine->_currentScreen
-#define SCREEN g_engine->_currentScreen.getPixels()
+#define SCREEN_S _G(currentScreen)
+#define SCREEN _G(currentScreen).getPixels()
 
 static byte saved_palette[PALETTE_SIZE];
 static bool screenHasDefault;
@@ -40,7 +41,7 @@ static size_t fontWidth, fontHeight;
 int fontFirst, fontLast;
 
 void init_mcga() {
-	g_engine->_currentScreen = (byte *)g_screen->getPixels();
+	_G(currentScreen) = (byte *)g_screen->getPixels();
 	screenHasDefault = false;
 	screenDefaultP = nullptr;
 	spriteWidth = 0;
@@ -68,11 +69,11 @@ void hflyback_end() {
 
 void set_pointer(byte *ptr) {
 	if (ptr) {
-		g_engine->_currentScreen = ptr;
+		_G(currentScreen) = ptr;
 	} else if (screenHasDefault) {
-		g_engine->_currentScreen = screenDefaultP;
+		_G(currentScreen) = screenDefaultP;
 	} else {
-		g_engine->_currentScreen = (byte *)g_screen->getPixels();
+		_G(currentScreen) = (byte *)g_screen->getPixels();
 	}
 }
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index ca1aa0ab9ed..8e230539ae5 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -161,20 +161,20 @@ void plot_inventar_menu() {
 	}
 
 	for (i = 0; i < 2; i++) {
-		ani_invent_delay[i][0] -= 1;
-		if (ani_invent_delay[i][0] <= 0) {
-			ani_invent_delay[i][0] = ani_invent_delay[i][1];
-			++ani_count[i];
-			if (ani_count[i] > ANI_INVENT_END[i]) {
-				ani_count[i] = ani_invent_anf[i];
-				ani_invent_delay[i][0] = 30000;
+		_G(ani_invent_delay)[i][0] -= 1;
+		if (_G(ani_invent_delay)[i][0] <= 0) {
+			_G(ani_invent_delay)[i][0] = _G(ani_invent_delay)[i][1];
+			++_G(ani_count)[i];
+			if (_G(ani_count)[i] > ANI_INVENT_END[i]) {
+				_G(ani_count)[i] = _G(ani_invent_anf)[i];
+				_G(ani_invent_delay)[i][0] = 30000;
 			}
 		}
 		if (i == 2)
 			y = 3;
 		else
 			y = 0;
-		out->sprite_set(curtaf->image[ani_count[i]],
+		out->sprite_set(curtaf->image[_G(ani_count)[i]],
 		                 WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
 	}
 
@@ -245,8 +245,8 @@ void invent_menu() {
 	maus_flag = 1;
 
 	for (i = 0; i < 3; i++) {
-		ani_invent_delay[i][0] = 30000;
-		ani_count[i] = ani_invent_anf[i];
+		_G(ani_invent_delay)[i][0] = 30000;
+		_G(ani_count)[i] = _G(ani_invent_anf)[i];
 	}
 
 	ret_look = -1;
@@ -922,7 +922,7 @@ void ads_menu() {
 
 		if (atds->aad_get_status() == -1 && ads_push == false &&
 		        flags.NoDiaBox == false) {
-			cur_display = true;
+			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
 			out->set_fontadr(font6x8);
@@ -943,7 +943,7 @@ void ads_menu() {
 		case 255:
 		case ENTER:
 			if (cur_y < ads_item_anz && cur_y >= 0 && ads_push == false) {
-				cur_display = false;
+				_G(cur_display) = false;
 				ads_push = true;
 				minfo.y = 159;
 				an_blk = atds->ads_item_choice(ads_blk_nr, cur_y);
@@ -980,11 +980,11 @@ void ads_menu() {
 void stop_ads_dialog() {
 	aad_wait(-1);
 	spieler.DispFlag = ads_tmp_dsp;
-	cur_display = true;
+	_G(cur_display) = true;
 	flags.ShowAtsInvTxt = true;
 	flags.MainInput = true;
 	flags.AdsDialog = false;
-	maus_links_click = false;
+	_G(maus_links_click) = false;
 	atds->stop_ads();
 	if (minfo.button)
 		flags.main_maus_flag = 1;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7d84d38466e..c35c57bd6a5 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -174,15 +174,15 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 11:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r11_bork_zwinkert();
 		break;
 
 	case 12:
-		if (t_nr == timer_nr[0]) {
+		if (t_nr == _G(timer_nr)[0]) {
 			if (!is_chewy_busy())
 				r12_init_bork();
-		} else if (t_nr == timer_nr[1]) {
+		} else if (t_nr == _G(timer_nr)[1]) {
 			if (spieler.R12TransOn) {
 				spieler.R12TransOn = false;
 				start_aad_wait(30, -1);
@@ -215,9 +215,9 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 21:
-		if (t_nr == timer_nr[0]) {
+		if (t_nr == _G(timer_nr)[0]) {
 			r21_restart_spinne2();
-		} else if (t_nr == timer_nr[2])
+		} else if (t_nr == _G(timer_nr)[2])
 			r21_chewy_kolli();
 		break;
 
@@ -228,26 +228,26 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 40:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			spieler.R40PoliceStart = true;
 		else
 			default_flag = true;
 		break;
 
 	case 48:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r48_frage();
 		else
 			default_flag = true;
 		break;
 
 	case 49:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r49_calc_boy_ani();
 		break;
 
 	case 50:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r50_calc_wasser();
 		default_flag = true;
 		break;
@@ -260,14 +260,14 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 56:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r56_start_flug();
 		else
 			default_flag = true;
 		break;
 
 	case 68:
-		if (t_nr == timer_nr[0])
+		if (t_nr == _G(timer_nr)[0])
 			r68_calc_diva();
 		else
 			default_flag = true;
@@ -562,7 +562,7 @@ void enter_room(int16 eib_nr) {
 	atds->stop_ats();
 	spieler.DiaAMov = -1;
 
-	zoom_mov_fak = 1;
+	_G(zoom_mov_fak) = 1;
 	flags.ZoomMov = true;
 	for (i = 0; i < MAX_PERSON; i++) {
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
@@ -577,7 +577,7 @@ void enter_room(int16 eib_nr) {
 	flags.AutoAniPlay = false;
 	SetUpScreenFunc = false;
 	HowardMov = false;
-	cur_hide_flag = false;
+	_G(cur_hide_flag) = false;
 	switch (spieler.PersonRoomNr[P_CHEWY]) {
 
 	case 0:
@@ -869,7 +869,7 @@ void exit_room(int16 eib_nr) {
 		}
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
-		maus_links_click = false;
+		_G(maus_links_click) = false;
 		break;
 
 	case 24:
@@ -1436,7 +1436,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_TALISMAN_R12:
 		spieler.R12Talisman = true;
 		obj->hide_sib(SIB_TALISMAN_R12);
-		timer_nr[0] = room->set_timer(255, 20);
+		_G(timer_nr)[0] = room->set_timer(255, 20);
 		break;
 
 	case SIB_BANDKNOPF_R13:
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 2a3a731a86b..5c3e8ee8049 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -233,7 +233,7 @@ void calc_z_ebene() {
 		}
 	}
 
-	for (i = 0; i < auto_obj; i++) {
+	for (i = 0; i < _G(auto_obj); i++) {
 		if (auto_mov_vector[i].Xypos[2] < 200) {
 			z_obj_sort[z_count].ObjArt = ZOBJ_AUTO_OBJ;
 			z_obj_sort[z_count].ObjNr = i;
@@ -354,19 +354,19 @@ void stop_person(int16 p_nr) {
 }
 
 void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	det->start_detail(ani_nr, rep, mode);
 	while (det->get_ani_status(ani_nr) && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 }
 
 void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	ani_detail_info *adi;
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	det->start_detail(ani_nr, rep, mode);
 	adi = det->get_ani_detail(ani_nr);
 	if (mode == ANI_VOR)
@@ -376,7 +376,7 @@ void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	while (det->get_ani_status(ani_nr) && adi->ani_count != frame && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 }
 
 void wait_detail(int16 det_nr) {
@@ -385,8 +385,8 @@ void wait_detail(int16 det_nr) {
 }
 
 void wait_show_screen(int16 frames) {
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	if (spieler.DelaySpeed > 0)
 		frames *= spieler.DelaySpeed;
 	while (--frames > 0 && !SHOULD_QUIT) {
@@ -394,26 +394,26 @@ void wait_show_screen(int16 frames) {
 			get_user_key(NO_SETUP);
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 }
 
 void start_ani_block(int16 anz, AniBlock *ab) {
 	int16 i;
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	for (i = 0; i < anz; i++) {
 		if (ab[i].Mode == ANI_WAIT)
 			start_detail_wait(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 		else
 			det->start_detail(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 }
 
 void start_aad_wait(int16 dia_nr, int16 str_nr) {
 
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	talk_start_ani = -1;
 	talk_hide_static = -1;
 	set_ssi_xy();
@@ -421,7 +421,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -438,8 +438,8 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	int16 VocNr;
 	int16 vocx;
 	bool ret = false;
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	if (!flags.AtsText) {
 		flags.AtsText = true;
 		if (txt_nr != -1) {
@@ -469,13 +469,13 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 	return ret;
 }
 
 void aad_wait(int16 str_nr) {
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	if (str_nr == -1) {
 		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
@@ -485,7 +485,7 @@ void aad_wait(int16 str_nr) {
 			set_up_screen(DO_SETUP);
 		}
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -517,22 +517,22 @@ void start_ads_wait(int16 dia_nr) {
 }
 
 void wait_auto_obj(int16 nr) {
-	tmp_maus_links = maus_links_click;
-	maus_links_click = false;
+	tmp_maus_links = _G(maus_links_click);
+	_G(maus_links_click) = false;
 	while (mov_phasen[nr].Repeat != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	maus_links_click = tmp_maus_links;
+	_G(maus_links_click) = tmp_maus_links;
 }
 
 void stop_auto_obj(int16 nr) {
-	if (nr < auto_obj) {
+	if (nr < _G(auto_obj)) {
 		mov_phasen[nr].Start = false;
 	}
 }
 
 void continue_auto_obj(int16 nr, int16 repeat) {
-	if (nr < auto_obj) {
+	if (nr < _G(auto_obj)) {
 		mov_phasen[nr].Start = 1;
 		if (repeat)
 			mov_phasen[nr].Repeat = repeat;
@@ -572,7 +572,7 @@ void init_auto_obj(int16 auto_nr, int16 *phasen, int16 lines, MovLine *mline) {
 
 void new_auto_line(int16 nr) {
 
-	if (nr < auto_obj) {
+	if (nr < _G(auto_obj)) {
 		if (mov_phasen[nr].Repeat != -1 &&
 		        mov_phasen[nr].Start) {
 
@@ -643,7 +643,7 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 int16 auto_obj_status(int16 nr) {
 	int16 status;
 	status = false;
-	if (nr < auto_obj) {
+	if (nr < _G(auto_obj)) {
 		if (mov_phasen[nr].Repeat != -1)
 			status = true;
 	}
@@ -658,13 +658,13 @@ void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y, ObjMov *om) {
 	zoom_fak_x = -zoom_fak_x;
 	zoom_fak_y = (float)zoomfak_y / (float)100.0;
 	zoom_fak_y = -zoom_fak_y;
-	if (!zoom_horizont) {
+	if (!_G(zoom_horizont)) {
 		om->Xzoom = -zoomfak_x;
 		om->Yzoom = -zoomfak_y;
 	} else {
-		if (y < zoom_horizont) {
-			om->Xzoom = (zoom_horizont - y) * zoom_fak_x;
-			om->Yzoom = (zoom_horizont - y) * zoom_fak_y;
+		if (y < _G(zoom_horizont)) {
+			om->Xzoom = (_G(zoom_horizont) - y) * zoom_fak_x;
+			om->Yzoom = (_G(zoom_horizont) - y) * zoom_fak_y;
 		} else {
 			om->Xzoom = 0;
 			om->Yzoom = 0;
@@ -981,8 +981,8 @@ void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
 	tmp_vorschub = mi->Vorschub;
 	mi->Vorschub = CH_X_PIX;
 	if (flags.ZoomMov) {
-		if (om->Xzoom < 0 && zoom_mov_fak > 0) {
-			tmp = om->Xzoom / zoom_mov_fak;
+		if (om->Xzoom < 0 && _G(zoom_mov_fak) > 0) {
+			tmp = om->Xzoom / _G(zoom_mov_fak);
 			tmp = abs(tmp);
 			mi->Vorschub -= tmp;
 			if (mi->Vorschub < 2)
@@ -1117,7 +1117,7 @@ void calc_person_ani() {
 						PersonSpr[p_nr][i] = i;
 
 					if (!spieler_vector[p_nr].Count &&
-					        auto_p_nr != p_nr) {
+					        _G(auto_p_nr) != p_nr) {
 						ani_nr = (int16)p_ani[p_nr - 1][4] + (person_end_phase[p_nr] * 4);
 
 						spieler_vector[p_nr].PhAnz = 5;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b9cb8ec1c93..9e7ac1c0884 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2123,7 +2123,7 @@ void calc_person_dia(int16 p_nr) {
 				switch_room(65);
 			else if (p_nr == P_NICHELLE) {
 				if (spieler.PersonDia[P_NICHELLE] < 10000) {
-					cur_hide_flag = false;
+					_G(cur_hide_flag) = false;
 					hide_cur();
 					start_aad_wait(spieler.PersonDia[P_NICHELLE], -1);
 					show_cur();


Commit: d312df281318d28c7f4761fe29e4dc6587c9716e
    https://github.com/scummvm/scummvm/commit/d312df281318d28c7f4761fe29e4dc6587c9716e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Fix shadowed warning

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index b4cc4f7229c..dab967c914c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -84,13 +84,13 @@ byte *get_dispoff() {
 #define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
 
 void setScummVMPalette(const byte *palette, uint start, uint count) {
-	byte pal[PALETTE_SIZE];
-	byte *dest = &pal[0];
+	byte tempPal[PALETTE_SIZE];
+	byte *dest = &tempPal[0];
 
 	for (uint i = 0; i < count * 3; ++i, ++palette, ++dest)
 		*dest = VGA_COLOR_TRANS(*palette);
 
-	g_system->getPaletteManager()->setPalette(pal, start, count);
+	g_system->getPaletteManager()->setPalette(tempPal, start, count);
 }
 
 void setpalette(const byte *palette) {


Commit: 5936ed19b09692c78712fdbffc2de0156eed38ec
    https://github.com/scummvm/scummvm/commit/5936ed19b09692c78712fdbffc2de0156eed38ec
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Move Spieler instance to new Globals

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/ch_icm.cpp
    engines/chewy/chewy.cpp
    engines/chewy/effect.cpp
    engines/chewy/episode1.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode3.cpp
    engines/chewy/episode4.cpp
    engines/chewy/file.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/menus.cpp
    engines/chewy/objekt.h
    engines/chewy/r_event.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 131492f4af2..959e3667871 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -186,7 +186,7 @@ bool ailScummVM::isSpeechActive(int channel) const {
 }
 
 void ailScummVM::waitForSpeechToFinish() {
-	if (flags.InitSound && spieler.SpeechSwitch) {
+	if (flags.InitSound && _G(spieler).SpeechSwitch) {
 		while (isSpeechActive() && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index a50bf2fc9fc..bdd2ebb1bd2 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -1025,7 +1025,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 							ERROR
 
 							vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
-							       spieler.scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
+							       _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
 							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
 							ailsnd->start_db_voc(atdsv.SpeechHandle, 0, 63);
 							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index 8444c9d3da7..2f5976471bc 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -101,17 +101,17 @@ void get_room_nr() {
 		if (tmp <= MAX_RAUM) {
 			flags.IcmEntry = true;
 			exit_room(-1);
-			spieler.PersonRoomNr[P_CHEWY] = tmp;
-			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+			_G(spieler).PersonRoomNr[P_CHEWY] = tmp;
+			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			ERROR
 			out->set_palette(pal);
 
-			if (spieler.AkInvent != -1)
-				spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
+			if (_G(spieler).AkInvent != -1)
+				_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
 			obj->sort();
 
-			if (spieler.AkInvent != -1)
-				spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
+			if (_G(spieler).AkInvent != -1)
+				_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
 			auto_obj = 0;
 			enter_room(-1);
 			spieler_vector[P_CHEWY].Count = 0;
@@ -200,20 +200,20 @@ void plot_auto_mov(int16 mode) {
 
 	} else {
 		for (i = 0; i < room->room_info->AutoMovAnz; i++) {
-			out->box_fill(Rdi->AutoMov[i].X - spieler.scrollx,
-			               Rdi->AutoMov[i].Y - spieler.scrolly,
-			               Rdi->AutoMov[i].X + 10 - spieler.scrollx,
-			               Rdi->AutoMov[i].Y + 13 - spieler.scrolly, 255);
-			out->box(Rdi->AutoMov[i].X + 1 - spieler.scrollx,
-			          Rdi->AutoMov[i].Y + 1 - spieler.scrolly,
-			          Rdi->AutoMov[i].X + 9 - spieler.scrollx,
-			          Rdi->AutoMov[i].Y + 11 - spieler.scrolly, 0);
-			if (Rdi->AutoMov[i].X + 3 - spieler.scrollx > 0 &&
-			        Rdi->AutoMov[i].X + 3 - spieler.scrollx < (319 - 16) &&
-			        Rdi->AutoMov[i].Y + 3 - spieler.scrolly > 0 &&
-			        Rdi->AutoMov[i].Y + 3 - spieler.scrolly < (199 - 10))
-				out->printxy(Rdi->AutoMov[i].X + 3 - spieler.scrollx,
-				              Rdi->AutoMov[i].Y + 3 - spieler.scrolly, 0, 300, scr_width, "%d\0", i);
+			out->box_fill(Rdi->AutoMov[i].X - _G(spieler).scrollx,
+			               Rdi->AutoMov[i].Y - _G(spieler).scrolly,
+			               Rdi->AutoMov[i].X + 10 - _G(spieler).scrollx,
+			               Rdi->AutoMov[i].Y + 13 - _G(spieler).scrolly, 255);
+			out->box(Rdi->AutoMov[i].X + 1 - _G(spieler).scrollx,
+			          Rdi->AutoMov[i].Y + 1 - _G(spieler).scrolly,
+			          Rdi->AutoMov[i].X + 9 - _G(spieler).scrollx,
+			          Rdi->AutoMov[i].Y + 11 - _G(spieler).scrolly, 0);
+			if (Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx > 0 &&
+			        Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx < (319 - 16) &&
+			        Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly > 0 &&
+			        Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly < (199 - 10))
+				out->printxy(Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx,
+				              Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly, 0, 300, scr_width, "%d\0", i);
 		}
 	}
 	if (!mode) {
@@ -269,11 +269,11 @@ void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
 	ende = 0;
 	while (!ende) {
 		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		if (spr1 != 0)
-			out->sprite_set(spr1, x1 - spieler.scrollx, y1 - spieler.scrolly, 0);
+			out->sprite_set(spr1, x1 - _G(spieler).scrollx, y1 - _G(spieler).scrolly, 0);
 		if (spr2 != 0)
-			out->sprite_set(spr2, x2 - spieler.scrollx, y2 - spieler.scrolly, 0);
+			out->sprite_set(spr2, x2 - _G(spieler).scrollx, y2 - _G(spieler).scrolly, 0);
 		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
 		switch (in->get_switch_code()) {
 
@@ -287,27 +287,27 @@ void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
 
 			if (minfo.button == 1 && maus_rect_first == false) {
 				maus_rect_first = true;
-				koordinate[0] = minfo.x + spieler.scrollx;
-				koordinate[1] = minfo.y + spieler.scrolly;
+				koordinate[0] = minfo.x + _G(spieler).scrollx;
+				koordinate[1] = minfo.y + _G(spieler).scrolly;
 				ok = 0;
 				while (!ok) {
 					mouse_aktiv = 0;
 					cur_move = 0;
 					out->setze_zeiger(workptr);
 					calc_mouse_scroll(ScrXy[0], ScrXy[1]);
-					out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+					out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 					if (spr1 != 0)
-						out->sprite_set(spr1, x1 - spieler.scrollx, y1 - spieler.scrolly, 0);
+						out->sprite_set(spr1, x1 - _G(spieler).scrollx, y1 - _G(spieler).scrolly, 0);
 					if (spr2 != 0)
-						out->sprite_set(spr2, x2 - spieler.scrollx, y2 - spieler.scrolly, 0);
+						out->sprite_set(spr2, x2 - _G(spieler).scrollx, y2 - _G(spieler).scrolly, 0);
 					out->printxy(0, 0, 255, 0, 0, "X1 = %4d Y1 = %4d \0", koordinate[0], koordinate[1]);
 					out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
 					out->printxy(0, 20, 255, 0, 0, "X2 = %4d Y2 = %4d XOff %3d YOff %3d\0",
-					              minfo.x + spieler.scrollx, minfo.y + spieler.scrolly,
-					              (minfo.x + spieler.scrollx) - koordinate[0],
-					              (minfo.y + spieler.scrolly) - koordinate[1]);
+					              minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly,
+					              (minfo.x + _G(spieler).scrollx) - koordinate[0],
+					              (minfo.y + _G(spieler).scrolly) - koordinate[1]);
 					out->
-					box(koordinate[0] - spieler.scrollx, koordinate[1] - spieler.scrolly, minfo.x, minfo.y, 255);
+					box(koordinate[0] - _G(spieler).scrollx, koordinate[1] - _G(spieler).scrolly, minfo.x, minfo.y, 255);
 					out->back2screen(workpage);
 					if (minfo.button != 1)
 						ok = 1;
@@ -316,7 +316,7 @@ void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
 		}
 		maus_rect_first = false;
 		out->printxy(0, 0, 255, 0, 0, "X = %d Y = %d mit scroll
-		              Offset\0", minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+		              Offset\0", minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 		              out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
 		              plot_maus();
 		              out->setze_zeiger(screen0);
@@ -393,12 +393,12 @@ void get_auto_mov() {
 	ani_wahl = 0;
 	ScrXy = (int16 *)ablage[room_blk.AkAblage];
 	while (!ende) {
-		out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		if (minfo.button == 1) {
 			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
 			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
-			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
-			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
+			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
 			mov->get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_v
 			                    ector[P_CHEWY]);
 			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
@@ -427,23 +427,23 @@ void get_auto_mov() {
 			break;
 
 		case ALT+CURSOR_LEFT :
-			if (spieler.scrollx > 0)
-				--spieler.scrollx;
+			if (_G(spieler).scrollx > 0)
+				--_G(spieler).scrollx;
 			break;
 
 		case ALT+CURSOR_RIGHT:
-			if ((spieler.scrollx + 320) < ScrXy[0])
-				++spieler.scrollx;
+			if ((_G(spieler).scrollx + 320) < ScrXy[0])
+				++_G(spieler).scrollx;
 			break;
 
 		case ALT+CURSOR_UP :
-			if (spieler.scrolly > 0)
-				--spieler.scrolly;
+			if (_G(spieler).scrolly > 0)
+				--_G(spieler).scrolly;
 			break;
 
 		case ALT+CURSOR_DOWN :
-			if ((spieler.scrolly + 200) < ScrXy[1])
-				++spieler.scrolly;
+			if ((_G(spieler).scrolly + 200) < ScrXy[1])
+				++_G(spieler).scrolly;
 			break;
 
 		case PLUS:
@@ -516,16 +516,16 @@ void get_auto_mov() {
 				auto_nr = room->room_info->AutoMovAnz;
 				++room->room_info->AutoMovAnz;
 				Rdi->AutoMov[auto_nr].X =
-				    spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X + spieler.scrollx;
+				    spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X + _G(spieler).scrollx;
 				Rdi->AutoMov[auto_nr].Y =
-				    spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y + spieler.scrolly;
+				    spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y + _G(spieler).scrolly;
 			}
 			while (kbinfo.key_code != 0);
 			break;
 
 		case S_KEY + ALT:
 			save_flag = true;
-			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
 			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
 			while (kbinfo.key_code != 0);
 			while (kbinfo.key_code == 0);
@@ -563,7 +563,7 @@ void get_auto_mov() {
 			while (kbinfo.key_code != 0);
 			while (kbinfo.key_code == 0);
 			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 			break;
 
 		case F2_KEY:
@@ -601,22 +601,22 @@ void get_auto_mov() {
 		out->set_vorschub(fvorx6x8, fvory6x8);
 		plot_auto_mov(1);
 		if (auto_nr != -1)
-			out->box(Rdi->AutoMov[auto_nr].X - 2 - spieler.scrollx,
-			          Rdi->AutoMov[auto_nr].Y - 2 - spieler.scrolly,
-			          Rdi->AutoMov[auto_nr].X + 12 - spieler.scrollx,
-			          Rdi->AutoMov[auto_nr].Y + 14 - spieler.scrolly, 8);
+			out->box(Rdi->AutoMov[auto_nr].X - 2 - _G(spieler).scrollx,
+			          Rdi->AutoMov[auto_nr].Y - 2 - _G(spieler).scrolly,
+			          Rdi->AutoMov[auto_nr].X + 12 - _G(spieler).scrollx,
+			          Rdi->AutoMov[auto_nr].Y + 14 - _G(spieler).scrolly, 8);
 		if (det_nr != -1) {
 			if (Adi[det_nr].zoom) {
 
 				dy = adi->y;
 				calc_zoom(dy, (int16)room->room_info->ZoomFak,
-				          spieler.ZoomXy[P_HOWARD][0],
+				          _G(spieler).ZoomXy[P_HOWARD][0],
 				          &detmov);
 			} else {
 				detmov.Xzoom = 0;
 				detmov.Yzoom = 0;
 			}
-			out->scale_set(dptr->image[det_nr], Dx - spieler.scrollx, Dy - spieler.scrolly,
+			out->scale_set(dptr->image[det_nr], Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly,
 			                detmov.Xzoom, detmov.Yzoom, 0);
 		}
 		if (info_flag) {
@@ -641,7 +641,7 @@ void get_auto_mov() {
 		for (i = 0; i < str_anz1; i++)
 			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
 		if (ja_nein() == J_KEY) {
-			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
 			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
 		}
 	}
@@ -650,8 +650,8 @@ void get_auto_mov() {
 
 void get_scroll_val() {
 	out->setze_zeiger(0);
-	out->printxy(0, 0, 255, 300, scr_width, "SCROLL X = %3d ", spieler.scrollx);
-	out->printxy(0, 10, 255, 300, scr_width, "SCROLL Y = %3d ", spieler.scrolly);
+	out->printxy(0, 0, 255, 300, scr_width, "SCROLL X = %3d ", _G(spieler).scrollx);
+	out->printxy(0, 10, 255, 300, scr_width, "SCROLL Y = %3d ", _G(spieler).scrolly);
 	while (in->get_switch_code() != ESC);
 }
 
@@ -720,8 +720,8 @@ void set_z_ebene() {
 			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
 			Bewegungs
 			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
-			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
-			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
+			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
 			mov->
 			get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector
 			               [P_CHEWY]);
@@ -777,9 +777,9 @@ void set_z_ebene() {
 					++detail_nr;
 					det_nr = obj->mov_obj_room[detail_nr + 1];
 					image = inv_spr[det_nr];
-					Dx = spieler.room_m_obj[det_nr].X;
-					Dy = spieler.room_m_obj[det_nr].Y;
-					ly = spieler.room_m_obj[det_nr].ZEbene;
+					Dx = _G(spieler).room_m_obj[det_nr].X;
+					Dy = _G(spieler).room_m_obj[det_nr].Y;
+					ly = _G(spieler).room_m_obj[det_nr].ZEbene;
 				}
 			}
 			while (kbinfo.key_code != 0);
@@ -819,9 +819,9 @@ void set_z_ebene() {
 					--detail_nr;
 					det_nr = obj->mov_obj_room[detail_nr + 1];
 					image = inv_spr[det_nr];
-					Dx = spieler.room_m_obj[det_nr].X;
-					Dy = spieler.room_m_obj[det_nr].Y;
-					ly = spieler.room_m_obj[det_nr].ZEbene;
+					Dx = _G(spieler).room_m_obj[det_nr].X;
+					Dy = _G(spieler).room_m_obj[det_nr].Y;
+					ly = _G(spieler).room_m_obj[det_nr].ZEbene;
 				}
 			}
 			while (kbinfo.key_code != 0);
@@ -907,7 +907,7 @@ void set_z_ebene() {
 
 		case S_KEY + ALT:
 			save_flag = true;
-			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
 
 			save_iib(INVENTAR_IIB);
 			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
@@ -923,7 +923,7 @@ void set_z_ebene() {
 			} else if (detail_flag == STATIC_DETAIL) {
 				sdi->z_ebene = ly;
 			} else if (detail_flag == INVENT_DETAIL) {
-				spieler.room_m_obj[det_nr].ZEbene = ly;
+				_G(spieler).room_m_obj[det_nr].ZEbene = ly;
 			}
 			break;
 
@@ -937,7 +937,7 @@ void set_z_ebene() {
 			while (kbinfo.key_code != 0);
 			while (kbinfo.key_code == 0);
 			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 			break;
 
 		case F2_KEY:
@@ -1010,9 +1010,9 @@ void set_z_ebene() {
 				detail_nr = 0;
 				det_nr = obj->mov_obj_room[detail_nr + 1];
 				image = inv_spr[det_nr];
-				Dx = spieler.room_m_obj[det_nr].X;
-				Dy = spieler.room_m_obj[det_nr].Y;
-				ly = spieler.room_m_obj[det_nr].ZEbene;
+				Dx = _G(spieler).room_m_obj[det_nr].X;
+				Dy = _G(spieler).room_m_obj[det_nr].Y;
+				ly = _G(spieler).room_m_obj[det_nr].ZEbene;
 			} else {
 				out->setze_zeiger(0);
 				out->printxy(0, 190, 0, 255, scr_width, " Kein Inventar vorhanden ...\0");
@@ -1024,17 +1024,17 @@ void set_z_ebene() {
 		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
 		set_up_screen(NO_SETUP);
 		if (det_nr != -1 && plot_flag) {
-			out->scale_set(image, Dx - spieler.scrollx, Dy - spieler.scrolly,
+			out->scale_set(image, Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly,
 			                detmov.Xzoom, detmov.Yzoom, 0);
 
 			xy = (int16 *)image;
 			out->
-			box(Dx - spieler.scrollx, Dy - spieler.scrolly, Dx + xy[0] - spieler.scrollx, Dy + xy[1] - spieler.scro
+			box(Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly, Dx + xy[0] - _G(spieler).scrollx, Dy + xy[1] - _G(spieler).scro
 			    lly, 255);
 		}
 		out->set_fontadr(font6x8);
 		out->set_vorschub(fvorx6x8, fvory6x8);
-		out->linie(lx, ly - spieler.scrolly, lx + 320, ly - spieler.scrolly, 255);
+		out->linie(lx, ly - _G(spieler).scrolly, lx + 320, ly - _G(spieler).scrolly, 255);
 		if (info_flag) {
 			out->printxy(0, 0, 255, 300, scr_width, "CHEWY Z_EBENE %d LINIE Z_EBENE
 			              % d\0", spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y - abs(spieler_vector[P_CHEWY].Yzoom), l
@@ -1058,7 +1058,7 @@ void set_z_ebene() {
 		for (i = 0; i < str_anz1; i++)
 			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
 		if (ja_nein() == J_KEY) {
-			det->save_detail(DETAILTEST, spieler.PersonRoomNr[P_CHEWY]);
+			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
 			save_iib(INVENTAR_IIB);
 			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
 		}
@@ -1110,7 +1110,7 @@ void save_iib(char *fname) {
 				if (!chewy_fwrite(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
 					modul = DATEI;
 					fcode = WRITEFEHLER;
-				} else if (!chewy_fwrite(spieler.room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
+				} else if (!chewy_fwrite(_G(spieler).room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
 					modul = DATEI;
 					fcode = WRITEFEHLER;
 				}
@@ -1122,36 +1122,36 @@ void save_iib(char *fname) {
 
 void load_org() {
 	int16 i;
-	det->load_rdi(room_blk.DetFile, spieler.PersonRoomNr[P_CHEWY]);
-	obj->load(INVENTAR_IIB, &spieler.room_m_obj[0]);
+	det->load_rdi(room_blk.DetFile, _G(spieler).PersonRoomNr[P_CHEWY]);
+	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
 	ERROR
-	obj->load(INVENTAR_SIB, &spieler.room_s_obj[0]);
+	obj->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
 	ERROR
 	obj->sort();
 	for (i = 0; i < MAX_MOV_OBJ; i++) {
-		spieler.InventSlot[i] = -1;
+		_G(spieler).InventSlot[i] = -1;
 	}
 	for (i = 0; i < obj->spieler_invnr[0]; i++)
-		spieler.InventSlot[i] = obj->spieler_invnr[i + 1];
+		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
 	obj->calc_all_static_detail();
 }
 
 void calc_mouse_scroll(int16 scrx, int16 scry) {
 	if (minfo.x > 319 - (curblk.xsize + 20)) {
-		if ((spieler.scrollx + 320) < scrx)
-			++spieler.scrollx;
+		if ((_G(spieler).scrollx + 320) < scrx)
+			++_G(spieler).scrollx;
 	}
 	if (minfo.x < 10) {
-		if (spieler.scrollx > 0)
-			--spieler.scrollx;
+		if (_G(spieler).scrollx > 0)
+			--_G(spieler).scrollx;
 	}
 	if (minfo.y > 199 - (curblk.ysize + 10)) {
-		if ((spieler.scrolly + 200) < scry)
-			++spieler.scrolly;
+		if ((_G(spieler).scrolly + 200) < scry)
+			++_G(spieler).scrolly;
 	}
 	if (minfo.y < 10) {
-		if (spieler.scrolly > 0)
-			--spieler.scrolly;
+		if (_G(spieler).scrolly > 0)
+			--_G(spieler).scrolly;
 	}
 }
 
@@ -1188,14 +1188,14 @@ void set_person() {
 	SetUpScreenFunc = 0;
 	out->set_fontadr(font6x8);
 	out->set_vorschub(fvorx6x8, fvory6x8);
-	spieler.ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
-	spieler.ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
 	while (!ende) {
 		if (minfo.button == 1) {
 			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
 			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
-			spieler_mi[p_nr].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + spieler.scrollx;
-			spieler_mi[p_nr].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + spieler.scrolly;
+			spieler_mi[p_nr].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
+			spieler_mi[p_nr].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
 			mov->
 			get_mov_vector(spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]
 			              );
@@ -1218,7 +1218,7 @@ void set_person() {
 			while (kbinfo.key_code != 0);
 			while (kbinfo.key_code == 0);
 			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 			break;
 
 		case F2_KEY:
@@ -1250,23 +1250,23 @@ void set_person() {
 				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
 				if (abfrage != 27) {
 					room->set_zoom(tmp);
-					spieler.ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
-					spieler.ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
+					_G(spieler).ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
+					_G(spieler).ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
 				}
 			} else {
 				for (i = 0; i < 2; i++)
 					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-				tmp = spieler.ZoomXy[p_nr][0];
+				tmp = _G(spieler).ZoomXy[p_nr][0];
 				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
 				if (abfrage != 27) {
-					spieler.ZoomXy[p_nr][0] = tmp;
+					_G(spieler).ZoomXy[p_nr][0] = tmp;
 				}
 				for (i = 0; i < 2; i++)
 					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c2, i));
-				tmp = spieler.ZoomXy[p_nr][1];
+				tmp = _G(spieler).ZoomXy[p_nr][1];
 				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
 				if (abfrage != 27) {
-					spieler.ZoomXy[p_nr][1] = tmp;
+					_G(spieler).ZoomXy[p_nr][1] = tmp;
 				}
 			}
 			x = 160;
@@ -1308,7 +1308,7 @@ void set_person() {
 		out->set_vorschub(fvorx6x8, fvory6x8);
 		if (info_flag) {
 			out->printxy(0, 0, 255, 300, scr_width, "Person x %d Person y %d", spieler_vector[p_nr].Xypos[0], spieler_vector[p_nr].Xypos[1]);
-			out->printxy(0, 10, 255, 300, scr_width, "Zoomx %d Zoomy %d", spieler.ZoomXy[p_nr][0], spieler.ZoomXy[p_nr][1]);
+			out->printxy(0, 10, 255, 300, scr_width, "Zoomx %d Zoomy %d", _G(spieler).ZoomXy[p_nr][0], _G(spieler).ZoomXy[p_nr][1]);
 			out->printxy(0, 20, 255, 300, scr_width, "ZoomHorizont %d", _G(zoom_horizont));
 			out->printxy(0, 30, 255, 300, scr_width, "AK-Zoomx %d AK-Zoomy %d", spieler_vector[p_nr].Xzoom, spieler_vector[p_nr].Yzoom);
 
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 4bdb15d0aeb..7cce8a3fecc 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -88,7 +88,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 	exit_room(-1);
 
 	Common::Serializer s(stream, nullptr);
-	if (!spieler.synchronize(s)) {
+	if (!_G(spieler).synchronize(s)) {
 		fcode = READFEHLER;
 		modul = DATEI;
 		return Common::kReadingFailed;
@@ -97,27 +97,27 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		flags.LoadGame = true;
 		ERROR
 
-		if (spieler.inv_cur == true && spieler.AkInvent != -1) {
+		if (_G(spieler).inv_cur == true && _G(spieler).AkInvent != -1) {
 			menu_item = CUR_USE;
 		}
 
-		if (spieler.AkInvent != -1)
-			spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
-		room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+		if (_G(spieler).AkInvent != -1)
+			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
+		room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 		ERROR
-		load_chewy_taf(spieler.ChewyAni);
+		load_chewy_taf(_G(spieler).ChewyAni);
 
 		fx_blend = BLEND1;
-		room->calc_invent(&room_blk, &spieler);
+		room->calc_invent(&room_blk, &_G(spieler));
 
-		if (spieler.AkInvent != -1)
-			spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
+		if (_G(spieler).AkInvent != -1)
+			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
 		obj->sort();
 
 		set_speed();
 
 		for (int i = 0; i < MAX_PERSON; i++) {
-			set_person_pos(spieler.X[i], spieler.Y[i], i, spieler.Phase[i]);
+			set_person_pos(_G(spieler).X[i], _G(spieler).Y[i], i, _G(spieler).Phase[i]);
 		}
 
 		_G(auto_obj) = 0;
@@ -135,12 +135,12 @@ Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 	int16 i;
 	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 	for (i = 0; i < MAX_PERSON; i++) {
-		spieler.X[i] = spieler_vector[i].Xypos[0];
-		spieler.Y[i] = spieler_vector[i].Xypos[1];
-		spieler.Phase[i] = person_end_phase[i];
+		_G(spieler).X[i] = spieler_vector[i].Xypos[0];
+		_G(spieler).Y[i] = spieler_vector[i].Xypos[1];
+		_G(spieler).Phase[i] = person_end_phase[i];
 	}
 
-	return spieler.synchronize(s) ? Common::kNoError :
+	return _G(spieler).synchronize(s) ? Common::kNoError :
 		Common::kWritingFailed;
 }
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index b386e9c0b84..d4e9de73258 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -208,7 +208,7 @@ void effect::spr_blende(byte *workpage_, byte *ablage_,
 	out->setze_zeiger(workpage_);
 
 	for (i = 0; i < 8; i++) {
-		out->map_spr2screen(ablage_, spieler.scrollx, spieler.scrolly);
+		out->map_spr2screen(ablage_, _G(spieler).scrollx, _G(spieler).scrolly);
 		out->scale_set(spr->image[0], x - (zoomx / 2), y - (zoomy / 2), zoomx, zoomy, 0);
 		out->box_fill(0, 0, 320, y - (zoomy / 2), 12);
 		out->box_fill(0, 0, x - (zoomx / 2), 200, 12);
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 9dc2ca113b2..dd7a5bd9590 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -105,7 +105,7 @@ void load_chewy_taf(int16 taf_nr) {
 
 		}
 		if (fname_ != NULL) {
-			spieler.ChewyAni = taf_nr;
+			_G(spieler).ChewyAni = taf_nr;
 			AkChewyTaf = taf_nr;
 			chewy = mem->taf_adr(fname_);
 			ERROR
@@ -120,7 +120,7 @@ void load_chewy_taf(int16 taf_nr) {
 }
 
 void Room0::entry() {
-	if (is_cur_inventar(0) || spieler.R0KissenWurf ||
+	if (is_cur_inventar(0) || _G(spieler).R0KissenWurf ||
 			obj->check_inventar(0))
 		det->hide_static_spr(6);
 
@@ -142,7 +142,7 @@ void Room0::entry() {
 }
 
 bool Room0::getPillow() {
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		flags.AutoAniPlay = true;
 		auto_move(1, 0);
@@ -162,13 +162,13 @@ bool Room0::getPillow() {
 }
 
 bool Room0::pullSlime() {
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
-		spieler.PersonHide[0] = 1;
+		_G(spieler).PersonHide[0] = 1;
 		start_detail_wait(3, 1, 0);
 		set_person_pos(222, 106, 0, 0);
-		spieler.PersonHide[0] = 0;
+		_G(spieler).PersonHide[0] = 0;
 		invent_2_slot(1);
 		menu_item = 0;
 		cursor_wahl(0);
@@ -235,7 +235,7 @@ void Room0::auge_start(int16 mode) {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			if (!mode) {
 				++adi->ani_count;
 				if (adi->ani_count > 38)
@@ -284,7 +284,7 @@ void Room0::auge_wait() {
 		if (adi->delay_count > 0) {
 			--adi->delay_count;
 		} else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 		}
 	}
@@ -312,8 +312,8 @@ void Room0::calc_auge_click(int16 ani_nr) {
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 			if (is_cur_inventar(SCHLEIM_INV)) {
-				del_inventar(spieler.AkInvent);
-				spieler.R0SchleimWurf = 1;
+				del_inventar(_G(spieler).AkInvent);
+				_G(spieler).R0SchleimWurf = 1;
 			} else if (is_cur_inventar(KISSEN_INV)) {
 
 				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
@@ -334,7 +334,7 @@ void Room0::auge_shoot() {
 
 	while (!ende) {
 		clear_prog_ani();
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
@@ -354,7 +354,7 @@ void Room0::auge_shoot() {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 		}
 	}
@@ -371,7 +371,7 @@ void Room0::auge_shoot() {
 	wait_show_screen(30);
 	clear_prog_ani();
 	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
 void Room0::auge_schleim_back() {
@@ -404,7 +404,7 @@ void Room0::auge_schleim_back() {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 			if (adi->ani_count == 77)
 				ende = 1;
@@ -426,7 +426,7 @@ void Room0::ch_schleim_auge() {
 
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
@@ -440,7 +440,7 @@ void Room0::ch_schleim_auge() {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 		}
 	}
@@ -450,7 +450,7 @@ void Room0::ch_schleim_auge() {
 	}
 
 	clear_prog_ani();
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
 void Room0::fuetter_start(int16 mode) {
@@ -478,7 +478,7 @@ void Room0::fuetter_start(int16 mode) {
 	}
 
 	ende = 0;
-	if (spieler.R0SchleimWurf)
+	if (_G(spieler).R0SchleimWurf)
 		flags.AniUserAction = true;
 
 	while (!ende) {
@@ -498,7 +498,7 @@ void Room0::fuetter_start(int16 mode) {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			if (!mode) {
 				++adi->ani_count;
 				if (adi->ani_count > 135)
@@ -523,7 +523,7 @@ void Room0::fuetter_start(int16 mode) {
 }
 
 void Room0::kissen_wurf() {
-	for (int16 i = 0; i < 30 && !spieler.R0KissenWurf; i++) {
+	for (int16 i = 0; i < 30 && !_G(spieler).R0KissenWurf; i++) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
@@ -557,9 +557,9 @@ void Room0::calc_kissen_click(int16 ani_nr) {
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(KISSEN_INV) && spieler.R0SchleimWurf) {
-				del_inventar(spieler.AkInvent);
-				spieler.R0KissenWurf = 1;
+			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SchleimWurf) {
+				del_inventar(_G(spieler).AkInvent);
+				_G(spieler).R0KissenWurf = 1;
 			} else if (is_cur_inventar(SCHLEIM_INV)) {
 				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATEI);
 			}
@@ -578,15 +578,15 @@ void Room0::ch_fuetter() {
 	i = 152;
 	ende = 0;
 
-	if (spieler.R0SchleimWurf)
+	if (_G(spieler).R0SchleimWurf)
 		flags.AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		if (adi->ani_count == 136) {
-			spieler.PersonHide[P_CHEWY] = true;
-			if (!spieler.R0SchleimWurf)
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			if (!_G(spieler).R0SchleimWurf)
 				det->stop_detail(16);
 		}
 		if (adi->ani_count > 138) {
@@ -609,7 +609,7 @@ void Room0::ch_fuetter() {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			if (adi->ani_count > 141)
 				++i;
 			++adi->ani_count;
@@ -645,13 +645,13 @@ void Room0::ch_fuetter() {
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
-			adi->delay_count = adi->delay + spieler.DelaySpeed;
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			if (adi->ani_count > 135)
 				--adi->ani_count;
 		}
 	}
 
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
@@ -664,7 +664,7 @@ void Room0::ch_kissen() {
 	adi->ani_count = 161;
 
 	ende = 0;
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
 	mode = 0;
 
@@ -672,7 +672,7 @@ void Room0::ch_kissen() {
 		clear_prog_ani();
 		if (!det->get_ani_status(CH_WIRFT_KISSEN)) {
 			mode = 1;
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
@@ -690,7 +690,7 @@ void Room0::ch_kissen() {
 			if (adi->delay_count > 0)
 				--adi->delay_count;
 			else {
-				adi->delay_count = adi->delay + spieler.DelaySpeed;
+				adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 				--adi->ani_count;
 				if (adi->ani_count == 151)
 					ende = 1;
@@ -721,11 +721,11 @@ void Room0::ani_klappe_delay() {
 }
 
 void Room0::auge_ani() {
-	if (!spieler.R0SchleimWurf) {
+	if (!_G(spieler).R0SchleimWurf) {
 		auge_start(0);
-		if (!spieler.R0SchleimWurf)
+		if (!_G(spieler).R0SchleimWurf)
 			auge_wait();
-		if (spieler.R0SchleimWurf) {
+		if (_G(spieler).R0SchleimWurf) {
 			start_aad(124);
 			ch_schleim_auge();
 			auge_schleim_back();
@@ -744,9 +744,9 @@ void Room0::fuett_ani() {
 	action = false;
 	fuetter_start(0);
 
-	if (spieler.R0SchleimWurf) {
+	if (_G(spieler).R0SchleimWurf) {
 		kissen_wurf();
-		if (spieler.R0KissenWurf) {
+		if (_G(spieler).R0KissenWurf) {
 			ch_kissen();
 			fuetter_start(1);
 			auto_move(VERSTECK_POS, P_CHEWY);
@@ -757,8 +757,8 @@ void Room0::fuett_ani() {
 			test_intro(1);
 			ERROR
 
-			spieler.PersonRoomNr[P_CHEWY] = 1;
-			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
+			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			ERROR
 			set_person_pos(Rdi->AutoMov[4].X - CH_HOT_MOV_X,
 			               Rdi->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
@@ -804,7 +804,7 @@ int16 r4_sonde_comp() {
 	                      };
 
 	cur_2_inventory();
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(cur_display) = false;
 	switch_room(4);
 	_G(cur_display) = true;
@@ -856,8 +856,8 @@ int16 r4_sonde_comp() {
 			curani.ani_end = HAND_NORMAL;
 		}
 		cursor_wahl(CUR_USER);
-		spieler.CurHoehe = 16;
-		in->rectangle(0, 123, 320 - spieler.CurBreite, 194);
+		_G(spieler).CurHoehe = 16;
+		in->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
 		if (minfo.y < 124) {
 			minfo.y = 123;
 		}
@@ -866,7 +866,7 @@ int16 r4_sonde_comp() {
 	g_events->delay(500);
 
 	clear_prog_ani();
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = CUR_WALK;
 	cursor_wahl(menu_item);
 	set_person_pos(118 - CH_HOT_MOV_X,
@@ -874,8 +874,8 @@ int16 r4_sonde_comp() {
 	spieler_vector[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
 	minfo.button = 0;
-	spieler.PersonRoomNr[P_CHEWY] = 3;
-	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
 	fx_blend = BLEND1;
 	atds->stop_aad();
@@ -886,8 +886,8 @@ int16 r4_sonde_comp() {
 void switch_room(int16 nr) {
 	fx_blend = BLEND1;
 	exit_room(-1);
-	spieler.PersonRoomNr[P_CHEWY] = nr;
-	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
 
 	enter_room(-1);
@@ -905,15 +905,15 @@ void r3_terminal() {
 		spr_info[0].Y = 2;
 		spr_info[0].ZEbene = 0;
 
-		if (!spieler.R2KabelBork) {
+		if (!_G(spieler).R2KabelBork) {
 			det->stop_detail(5);
 			start_ani_block(2, ablock3);
-			if (spieler.R2FussSchleim) {
-				spieler.R2FussSchleim = 0;
+			if (_G(spieler).R2FussSchleim) {
+				_G(spieler).R2FussSchleim = 0;
 
-				spieler.room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
+				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(8, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
 			det->stop_detail(6);
@@ -921,23 +921,23 @@ void r3_terminal() {
 			switch_room(1);
 			start_ani_block(2, ablock0);
 			set_person_pos(92, 131, P_CHEWY, P_LEFT);
-			spieler.PersonHide[P_CHEWY] = false;
-		} else if (!spieler.R2FussSchleim) {
+			_G(spieler).PersonHide[P_CHEWY] = false;
+		} else if (!_G(spieler).R2FussSchleim) {
 			start_ani_block(2, ablock2);
 			r2_jump_out_r1(9);
 			start_aad_wait(45, -1);
 		} else {
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(2, ablock1);
-			spieler.PersonRoomNr[P_CHEWY] = 5;
+			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
-			room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			ERROR
 			fx_blend = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 		}
 		clear_prog_ani();
 		break;
@@ -979,7 +979,7 @@ void r3_init_sonde() {
 	mov_phasen[SONDE_OBJ].Repeat = 255;
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = 1;
 	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt);
 }
@@ -1020,7 +1020,7 @@ void r3_sonde_knarre() {
 	mov_phasen[SONDE_OBJ].Repeat = 1;
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = 1;
 	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
 	              *)sonde_mpkt1);
@@ -1033,7 +1033,7 @@ void r3_sonde_knarre() {
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			det->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
 		}
 		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
@@ -1070,7 +1070,7 @@ void r3_sonde_knarre() {
 		spr_info[1].ZEbene = 190;
 		++ende;
 		if (ende == 3)
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 		set_ani_screen();
 	}
 	start_aad_wait(53, -1);
@@ -1134,7 +1134,7 @@ void r3_sonde_aufnahme() {
 	mov_phasen[SONDE_OBJ].Repeat = 1;
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = 1;
 	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt1);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
@@ -1159,14 +1159,14 @@ void r3_sonde_aufnahme() {
 		mov_phasen [SONDE_OBJ].ZoomFak = 0;
 		auto_mov_obj [SONDE_OBJ].Id = AUTO_OBJ0;
 		auto_mov_obj [SONDE_OBJ].Mode = 1;
-		auto_mov_vector[SONDE_OBJ].Delay = spieler.DelaySpeed;
+		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 		init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, sonde_mpkt_[i]);
 		mov_phasen [SONDE_OBJ1].Lines = 2;
 		mov_phasen [SONDE_OBJ1].Repeat = 1;
 		mov_phasen [SONDE_OBJ1].ZoomFak = 0;
 		auto_mov_obj [SONDE_OBJ1].Id = AUTO_OBJ1;
 		auto_mov_obj [SONDE_OBJ1].Mode = 1;
-		auto_mov_vector[SONDE_OBJ1].Delay = spieler.DelaySpeed;
+		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
 		init_auto_obj(SONDE_OBJ1, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ1].Lines, sonde_mpkt_[i]);
 		mov_phasen [SONDE_OBJ1].Phase[0][0] = spr_nr;
 		mov_phasen [SONDE_OBJ1].Phase[0][1] = spr_nr;
@@ -1179,14 +1179,14 @@ void r3_sonde_aufnahme() {
 						if (is_cur_inventar(SPINAT_INV)) {
 							ssi[0].X = 120;
 							ssi[0].Y = 100;
-							if (spieler.PersonRoomNr[P_CHEWY] == 3)
+							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
 
 								start_aad(50);
 							else
 
 								start_aad(44);
-							del_inventar(spieler.AkInvent);
-							spieler.R2FussSchleim = 1;
+							del_inventar(_G(spieler).AkInvent);
+							_G(spieler).R2FussSchleim = 1;
 							mov_phasen[SONDE_OBJ1].Phase[0][0] = 142;
 							mov_phasen[SONDE_OBJ1].Phase[0][1] = 149;
 							auto_mov_vector[SONDE_OBJ1].PhAnz = 8;
@@ -1213,7 +1213,7 @@ void r3_sonde_aufnahme() {
 			start_aad(52);
 			flags.AniUserAction = true;
 			spr_nr = 141;
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			det->load_taf_seq(142, 8, 0);
 			break;
 
@@ -1235,12 +1235,12 @@ void r3_sonde_aufnahme() {
 }
 
 void r2_jump_out_r1(int16 nr) {
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(nr, 1, ANI_VOR);
 	set_up_screen(DO_SETUP);
 	det->stop_detail(6);
 	set_person_pos(32, 127, P_CHEWY, P_LEFT);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	clear_prog_ani();
 	switch_room(1);
 	check_shad(2, 1);
@@ -1248,18 +1248,18 @@ void r2_jump_out_r1(int16 nr) {
 
 void r5_knopf() {
 	int16 str_nr;
-	if (spieler.R5Terminal) {
-		if (spieler.R5Tuer == false) {
+	if (_G(spieler).R5Terminal) {
+		if (_G(spieler).R5Tuer == false) {
 			start_detail_wait(9, 1, ANI_VOR);
-			spieler.room_e_obj[6].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
 			str_nr = 1;
 		} else {
 			start_detail_wait(9, 1, ANI_RUECK);
-			spieler.room_e_obj[6].Attribut = 255;
+			_G(spieler).room_e_obj[6].Attribut = 255;
 			str_nr = 0;
 		}
 		atds->set_ats_str(29, str_nr, ATS_DATEI);
-		spieler.R5Tuer ^= 1;
+		_G(spieler).R5Tuer ^= 1;
 		obj->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else
 		start_aad_wait(1, -1);
@@ -1269,17 +1269,17 @@ void r6_entry() {
 	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
-	if (spieler.R6BolaSchild) {
-		if (spieler.R6RaumBetreten < 3) {
+	if (_G(spieler).R6BolaSchild) {
+		if (_G(spieler).R6RaumBetreten < 3) {
 			det->start_detail(7, 255, ANI_VOR);
 			atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
 			if (!flags.LoadGame)
-				++spieler.R6RaumBetreten;
-			if (spieler.R6RaumBetreten == 3) {
+				++_G(spieler).R6RaumBetreten;
+			if (_G(spieler).R6RaumBetreten == 3) {
 				det->stop_detail(7);
 				r6_init_robo();
 				wait_auto_obj(0);
-				spieler.R6BolaOk = true;
+				_G(spieler).R6BolaOk = true;
 				obj->show_sib(SIB_BOLA_KNOPF_R6);
 				obj->hide_sib(SIB_BOLA_R6);
 				atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
@@ -1309,7 +1309,7 @@ void r6_init_robo() {
 	mov_phasen[ROBO_OBJ].Repeat = 1;
 	mov_phasen[ROBO_OBJ].ZoomFak = 0;
 	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[ROBO_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[ROBO_OBJ].Mode = 1;
 	init_auto_obj(ROBO_OBJ, &r6_robo_phasen[0][0], mov_phasen[ROBO_OBJ].Lines, (MovLine
 	              *)r6_robo_mpkt);
@@ -1317,11 +1317,11 @@ void r6_init_robo() {
 
 void r6_bola_knopf() {
 	int16 tmp;
-	if (!spieler.R6BolaBecher) {
+	if (!_G(spieler).R6BolaBecher) {
 		det->hide_static_spr(0);
 		start_detail_wait(0, 1, ANI_VOR);
-		if (spieler.R6BolaOk) {
-			spieler.R6BolaBecher = true;
+		if (_G(spieler).R6BolaOk) {
+			_G(spieler).R6BolaBecher = true;
 			det->show_static_spr(0);
 			start_ani_block(2, ablock7);
 			obj->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
@@ -1332,18 +1332,18 @@ void r6_bola_knopf() {
 			obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 			obj->hide_sib(SIB_BOLA_KNOPF_R6);
 		} else {
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(3, ablock6);
 			while (det->get_ani_status(3) && !SHOULD_QUIT) {
 				if (!det->get_ani_status(14)) {
 					set_person_pos(220, 89, P_CHEWY, P_LEFT);
-					spieler.PersonHide[P_CHEWY] = false;
+					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 				set_up_screen(DO_SETUP);
 			}
 			det->show_static_spr(0);
-			++spieler.R6BolaJoke;
-			if (spieler.R6BolaJoke < 3)
+			++_G(spieler).R6BolaJoke;
+			if (_G(spieler).R6BolaJoke < 3)
 				tmp = 3;
 			else
 				tmp = 4;
@@ -1357,11 +1357,11 @@ void r7_haken(int16 sib_nr) {
 	int16 dia_nr;
 	del_inventar(8);
 
-	spieler.AkInvent = -1;
+	_G(spieler).AkInvent = -1;
 	menu_item = CUR_WALK;
 	cursor_wahl(menu_item);
-	if (spieler.R7RHaken) {
-		spieler.R7SeilOk = true;
+	if (_G(spieler).R7RHaken) {
+		_G(spieler).R7SeilOk = true;
 		if (sib_nr == SIB_LHAKEN_R7) {
 			obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 			obj->calc_rsi_flip_flop(SIB_RHAKEN_R7);
@@ -1370,7 +1370,7 @@ void r7_haken(int16 sib_nr) {
 		atds->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
 		dia_nr = 9;
 	} else {
-		spieler.R7SeilLeft = true;
+		_G(spieler).R7SeilLeft = true;
 		dia_nr = 48;
 	}
 	atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -1378,9 +1378,9 @@ void r7_haken(int16 sib_nr) {
 }
 
 void r7_klingel() {
-	if ((!spieler.R7BellCount) ||
-	        (spieler.R7BellCount >= 2 && spieler.R7SeilLeft != 0 && !spieler.R7SeilOk)) {
-		spieler.PersonHide[P_CHEWY] = true;
+	if ((!_G(spieler).R7BellCount) ||
+	        (_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft != 0 && !_G(spieler).R7SeilOk)) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(5, 0);
 		start_ani_block(3, ablock25);
 
@@ -1390,10 +1390,10 @@ void r7_klingel() {
 		det->hide_static_spr(7);
 		det->stop_detail(5);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
-	else if (spieler.R7BellCount == 1) {
-		spieler.PersonHide[P_CHEWY] = true;
+	else if (_G(spieler).R7BellCount == 1) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(6, 0);
 		start_ani_block(3, ablock25);
 		det->show_static_spr(7);
@@ -1401,16 +1401,16 @@ void r7_klingel() {
 		det->start_detail(13, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		det->stop_detail(5);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->start_detail(0, 255, ANI_VOR);
 		start_detail_wait(13, 1, ANI_VOR);
 		flic_cut(FCUT_002, CFO_MODE);
 		det->stop_detail(0);
-		spieler.scrollx = 0;
-		spieler.scrolly = 0;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
 		start_detail_frame(19, 1, ANI_VOR, 6);
 		start_detail_frame(9, 1, ANI_VOR, 4);
 		det->show_static_spr(9);
@@ -1419,11 +1419,11 @@ void r7_klingel() {
 		obj->show_sib(SIB_SCHLOTT_R7);
 		obj->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
 		set_person_pos(114, 138, P_CHEWY, -1);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
 		det->hide_static_spr(7);
-	} else if (!spieler.R7SeilOk) {
-		spieler.PersonHide[P_CHEWY] = true;
+	} else if (!_G(spieler).R7SeilOk) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
 		start_ani_block(3, ablock25);
 		det->show_static_spr(7);
@@ -1431,22 +1431,22 @@ void r7_klingel() {
 		det->start_detail(14, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		det->stop_detail(5);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->start_detail(0, 255, ANI_VOR);
 		wait_detail(14);
 		start_ani_block(4, ablock10);
 		det->hide_static_spr(7);
 		det->stop_detail(0);
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
 		det->del_taf_tbl(192, 74, 0);
-	} else if (spieler.R7SeilOk && !spieler.R7BorkFlug) {
-		spieler.R7BorkFlug = true;
-		spieler.PersonHide[P_CHEWY] = true;
+	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
+		_G(spieler).R7BorkFlug = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(8, 0);
 		start_detail_wait(1, 1, ANI_VOR);
 		obj->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
@@ -1454,16 +1454,16 @@ void r7_klingel() {
 		flags.NoPalAfterFlc = false;
 		flic_cut(FCUT_003, CFO_MODE);
 		set_person_pos(201, 117, P_CHEWY, P_LEFT);
-		spieler.scrollx = 0;
-		spieler.scrolly = 0;
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
-	++spieler.R7BellCount;
+	++_G(spieler).R7BellCount;
 }
 
 void r8_entry() {
-	spieler.R7ChewyFlug = true;
-	if (!spieler.R8Folter)
+	_G(spieler).R7ChewyFlug = true;
+	if (!_G(spieler).R8Folter)
 		r8_start_folter();
 	else
 		r8_stop_folter();
@@ -1484,20 +1484,20 @@ void r8_stop_folter() {
 
 	det->stop_detail(13);
 
-	spieler.R8Folter = true;
+	_G(spieler).R8Folter = true;
 	obj->hide_sib(SIB_FOLTER_R8);
 }
 
 void r8_hole_kohle() {
-	if (!spieler.R8Kohle) {
+	if (!_G(spieler).R8Kohle) {
 		hide_cur();
-		spieler.R8Kohle = true;
+		_G(spieler).R8Kohle = true;
 		auto_move(4, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(12, 1, ANI_VOR);
 		cur_2_inventory();
 		invent_2_slot(KOHLE_HEISS_INV);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		show_cur();
 	}
 }
@@ -1505,10 +1505,10 @@ void r8_hole_kohle() {
 void r8_start_verbrennen() {
 	int16 ende;
 	hide_cur();
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		auto_move(3, P_CHEWY);
 		start_aad(102, 0);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ablock12);
 		ende = 0;
 		while (!ende && det->get_ani_status(9) && !SHOULD_QUIT) {
@@ -1524,7 +1524,7 @@ void r8_start_verbrennen() {
 		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
 		start_ani_block(2, ablock13);
 		atds->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 	show_cur();
 }
@@ -1535,17 +1535,17 @@ bool r8_gips_wurf() {
 		det->load_taf_seq(116, 30, 0);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = 0;
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
 		start_detail_wait(4, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_detail_frame(5, 1, ANI_VOR, 16);
 		start_detail_wait(6, 1, ANI_VOR);
 		obj->show_sib(33);
 		det->show_static_spr(14);
 		wait_detail(5);
-		spieler.R8GipsWurf = true;
-		spieler.room_m_obj[MASKE_INV].ZEbene = 0;
+		_G(spieler).R8GipsWurf = true;
+		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
 		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
 		det->del_taf_tbl(116, 30, 0);
 		auto_move(8, P_CHEWY);
@@ -1553,9 +1553,9 @@ bool r8_gips_wurf() {
 		menu_item = CUR_USE;
 		look_invent_screen(INVENTAR_NORMAL, 178);
 		flags.AtsAction = true;
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(20, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
 		cursor_wahl(menu_item);
 		show_cur();
@@ -1567,18 +1567,18 @@ bool r8_gips_wurf() {
 }
 
 void r8_open_gdoor() {
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	det->show_static_spr(17);
 	set_up_screen(DO_SETUP);
 	start_detail_wait(7, 1, ANI_VOR);
 	det->show_static_spr(15);
 	det->hide_static_spr(17);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(204, 274, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
 	obj->hide_sib(31);
-	spieler.R8GTuer = true;
-	spieler.room_e_obj[15].Attribut = AUSGANG_UNTEN;
+	_G(spieler).R8GTuer = true;
+	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
 }
 
 void r8_talk_nimoy() {
@@ -1586,12 +1586,12 @@ void r8_talk_nimoy() {
 	auto_move(9, P_CHEWY);
 	flags.NoScroll = true;
 	auto_scroll(0, 120);
-	if (spieler.R8Folter) {
-		if (!spieler.R8GipsWurf)
+	if (_G(spieler).R8Folter) {
+		if (!_G(spieler).R8GipsWurf)
 			tmp = 1;
 		else
 			tmp = 2;
-		if (!spieler.R8GTuer)
+		if (!_G(spieler).R8GTuer)
 			load_ads_dia(tmp);
 		else
 			start_aad_wait(61, -1);
@@ -1601,20 +1601,20 @@ void r8_talk_nimoy() {
 }
 
 void r9_entry() {
-	spieler.R7ChewyFlug = false;
+	_G(spieler).R7ChewyFlug = false;
 
-	if (!spieler.R9Gitter) {
+	if (!_G(spieler).R9Gitter) {
 		set_person_pos(138, 91, P_CHEWY, P_LEFT);
 	} else
 		det->show_static_spr(5);
-	if (spieler.R9Surimy) {
+	if (_G(spieler).R9Surimy) {
 		det->hide_static_spr(4);
 		room->set_timer_status(7, TIMER_STOP);
 	}
 }
 
 void r9_gtuer() {
-	spieler.R9Gitter = true;
+	_G(spieler).R9Gitter = true;
 	det->show_static_spr(5);
 	start_detail_wait(6, 1, ANI_VOR);
 	set_person_pos(74, 93, P_CHEWY, P_LEFT);
@@ -1644,7 +1644,7 @@ MovLine r9_surimy_mpkt1[2] = {
 
 void r9_surimy() {
 	int16 tmp;
-	spieler.R9Surimy = true;
+	_G(spieler).R9Surimy = true;
 	tmp = spieler_vector[P_CHEWY].Count;
 	stop_person(P_CHEWY);
 	atds->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
@@ -1652,7 +1652,7 @@ void r9_surimy() {
 	room->set_timer_status(7, TIMER_STOP);
 	r9_surimy_ani();
 	start_aad_wait(56, -1);
-	spieler.room_e_obj[17].Attribut = AUSGANG_RECHTS;
+	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;
 	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 	mov->continue_auto_go();
@@ -1666,7 +1666,7 @@ void r9_surimy_ani() {
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
 	mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SURIMY_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SURIMY_OBJ].Mode = 1;
 	init_auto_obj(SURIMY_OBJ, &r9_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 	              *)r9_surimy_mpkt);
@@ -1685,18 +1685,18 @@ void r9_surimy_ani() {
 }
 
 void r10_entry() {
-	if (!spieler.R10Surimy) {
+	if (!_G(spieler).R10Surimy) {
 		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->setze_zeiger(0);
 		fx->blende1(workptr, screen0, pal, 150, 0, 0);
-		spieler.R10Surimy = true;
+		_G(spieler).R10Surimy = true;
 		flic_cut(FCUT_004, CFO_MODE);
 		start_aad(101, 0);
 		fx_blend = BLEND_NONE;
 		set_person_pos(1, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
-	} else if (spieler.R10SurimyOk)
+	} else if (_G(spieler).R10SurimyOk)
 		room->set_timer_status(3, TIMER_STOP);
 }
 
@@ -1706,12 +1706,12 @@ void r10_get_surimy() {
 	flc->set_custom_user_function(r6_cut_serv2);
 	flic_cut(FCUT_006, CFO_MODE);
 	flc->remove_custom_user_function();
-	spieler.R10SurimyOk = true;
+	_G(spieler).R10SurimyOk = true;
 	room->set_timer_status(3, TIMER_STOP);
 	atds->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
 	invent_2_slot(18);
 
-	del_inventar(spieler.AkInvent);
+	del_inventar(_G(spieler).AkInvent);
 }
 
 void r11_entry() {
@@ -1719,11 +1719,11 @@ void r11_entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 
-	if (spieler.R12ChewyBork) {
-		if (!spieler.R11DoorRightB) {
+	if (_G(spieler).R12ChewyBork) {
+		if (!_G(spieler).R11DoorRightB) {
 			obj->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
-			spieler.R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
-			                                       AUSGANG_OBEN, -1, (int16)spieler.R11DoorRightB);
+			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
+			                                       AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
 			obj->calc_all_static_detail();
 		}
 
@@ -1731,8 +1731,8 @@ void r11_entry() {
 		obj->hide_sib(SIB_SCHLITZ_R11);
 		obj->hide_sib(SIB_TKNOPF2_R11);
 		obj->hide_sib(SIB_TKNOPF3_R11);
-		spieler.room_e_obj[20].Attribut = 255;
-		spieler.room_e_obj[21].Attribut = 255;
+		_G(spieler).room_e_obj[20].Attribut = 255;
+		_G(spieler).room_e_obj[21].Attribut = 255;
 		atds->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
 		if (!flags.LoadGame) {
 			start_ani_block(2, ablock17);
@@ -1759,7 +1759,7 @@ void r11_bork_zwinkert() {
 }
 
 void r11_talk_debug() {
-	if (spieler.R12ChewyBork) {
+	if (_G(spieler).R12ChewyBork) {
 		flags.AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		start_ads_wait(5);
@@ -1769,7 +1769,7 @@ void r11_talk_debug() {
 }
 
 void r11_chewy_bo_use() {
-	if (spieler.R12ChewyBork) {
+	if (_G(spieler).R12ChewyBork) {
 		flags.AutoAniPlay = true;
 		stop_person(P_CHEWY);
 		det->hide_static_spr(8);
@@ -1784,9 +1784,9 @@ void r11_chewy_bo_use() {
 
 int16 r11_scanner() {
 	int16 action_flag = false;
-	if (!spieler.R12ChewyBork) {
+	if (!_G(spieler).R12ChewyBork) {
 		auto_move(7, P_CHEWY);
-		if (!spieler.R11CardOk) {
+		if (!_G(spieler).R11CardOk) {
 			action_flag = true;
 			start_aad_wait(13, -1);
 		} else {
@@ -1796,18 +1796,18 @@ int16 r11_scanner() {
 				start_aad(105, 0);
 				flic_cut(FCUT_011, CFO_MODE);
 				flc->remove_custom_user_function();
-				spieler.R11TerminalOk = true;
+				_G(spieler).R11TerminalOk = true;
 				cur_2_inventory();
 				menu_item = CUR_TALK;
 				cursor_wahl(menu_item);
 				start_aad_wait(12, -1);
 				load_ads_dia(3);
-			} else if (!spieler.inv_cur) {
-				if (!spieler.R11TerminalOk) {
+			} else if (!_G(spieler).inv_cur) {
+				if (!_G(spieler).R11TerminalOk) {
 					action_flag = true;
 					flic_cut(FCUT_010, CFO_MODE);
 					start_aad_wait(20, -1);
-				} else if (spieler.R11TerminalOk) {
+				} else if (_G(spieler).R11TerminalOk) {
 					action_flag = true;
 					start_aad_wait(12, -1);
 					menu_item = CUR_TALK;
@@ -1822,11 +1822,11 @@ int16 r11_scanner() {
 }
 
 void r11_get_card() {
-	if (spieler.R11CardOk) {
-		spieler.R11CardOk = false;
-		obj->add_inventar(spieler.R11IdCardNr, &room_blk);
+	if (_G(spieler).R11CardOk) {
+		_G(spieler).R11CardOk = false;
+		obj->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
 
-		spieler.AkInvent = spieler.R11IdCardNr;
+		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
 		cursor_wahl(CUR_AK_INVENT);
 		cursor_wahl(CUR_AK_INVENT);
 		det->stop_detail(0);
@@ -1837,13 +1837,13 @@ void r11_get_card() {
 
 void r11_put_card() {
 	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
-		spieler.R11IdCardNr = spieler.AkInvent;
-		del_inventar(spieler.R11IdCardNr);
+		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
+		del_inventar(_G(spieler).R11IdCardNr);
 		det->start_detail(0, 255, ANI_VOR);
 		atds->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
 		atds->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
-		spieler.R11CardOk = true;
-		if (!spieler.R11TerminalOk)
+		_G(spieler).R11CardOk = true;
+		if (!_G(spieler).R11TerminalOk)
 			start_aad_wait(16, -1);
 	}
 }
@@ -1852,8 +1852,8 @@ void r12_entry() {
 	int16 i;
 	_G(zoom_horizont) = 150;
 	_G(timer_nr)[1] = room->set_timer(255, 20);
-	if (!spieler.R12Betreten) {
-		spieler.R12Betreten = true;
+	if (!_G(spieler).R12Betreten) {
+		_G(spieler).R12Betreten = true;
 		for (i = 7; i < 10; i++)
 			det->show_static_spr(i);
 		flags.NoScroll = true;
@@ -1868,9 +1868,9 @@ void r12_entry() {
 		auto_move(5, P_CHEWY);
 		start_aad_wait(109, -1);
 	} else {
-		if (spieler.R12Talisman == true && !spieler.R12BorkInRohr)
+		if (_G(spieler).R12Talisman == true && !_G(spieler).R12BorkInRohr)
 			_G(timer_nr)[0] = room->set_timer(255, 20);
-		else if (spieler.R12BorkInRohr && !spieler.R12RaumOk)
+		else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
 			det->show_static_spr(12);
 
 	}
@@ -1905,7 +1905,7 @@ MovLine r12_bork_mpkt2[3] = {
 
 void r12_init_bork() {
 	if (!auto_obj_status(R12_BORK_OBJ) &&
-	        !spieler.R12BorkTalk) {
+	        !_G(spieler).R12BorkTalk) {
 
 		if (!_G(auto_obj))
 			det->load_taf_seq(62, (85 - 62) + 1, 0);
@@ -1916,17 +1916,17 @@ void r12_init_bork() {
 			mov_phasen[R12_BORK_OBJ].Repeat = 1;
 			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->room_info->ZoomFak + 20;
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[R12_BORK_OBJ].Delay = spieler.DelaySpeed;
+			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = 1;
 			init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
 			              *)r12_bork_mpkt);
-			if (!spieler.R12TalismanOk) {
+			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
 				auto_move(5, P_CHEWY);
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
-				if (spieler.R12BorkCount < 3) {
-					++spieler.R12BorkCount;
+				if (_G(spieler).R12BorkCount < 3) {
+					++_G(spieler).R12BorkCount;
 					uhr->reset_timer(_G(timer_nr)[0], 0);
 					wait_show_screen(10);
 					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
@@ -1943,7 +1943,7 @@ void r12_init_bork() {
 }
 
 void r12_talk_bork() {
-	if (!spieler.R12TalismanOk) {
+	if (!_G(spieler).R12TalismanOk) {
 
 		start_aad_wait(28, -1);
 
@@ -1956,13 +1956,13 @@ void r12_bork_ok() {
 	auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
 	auto_move(5, P_CHEWY);
 	auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
-	spieler.R12BorkTalk = true;
+	_G(spieler).R12BorkTalk = true;
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 2;
 	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
 	              *)r12_bork_mpkt1);
 	wait_auto_obj(R12_BORK_OBJ);
-	spieler.R12BorkInRohr = true;
+	_G(spieler).R12BorkInRohr = true;
 	det->set_detail_pos(3, 170, 145);
 	det->start_detail(3, 255, ANI_VOR);
 	start_aad_wait(57, -1);
@@ -1984,12 +1984,12 @@ void r12_bork_ok() {
 
 int16 r12_use_terminal() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		if (!spieler.R12ChewyBork) {
+		if (!_G(spieler).R12ChewyBork) {
 			auto_move(6, P_CHEWY);
 			start_aad_wait(110, -1);
-			if (spieler.R12BorkInRohr && !spieler.R12RaumOk) {
+			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
 				start_aad_wait(112, -1);
 				flags.NoScroll = true;
 				auto_scroll(46, 0);
@@ -2002,13 +2002,13 @@ int16 r12_use_terminal() {
 				menu_item = CUR_WALK;
 				cursor_wahl(menu_item);
 				set_person_pos(108, 90, P_CHEWY, -1);
-				spieler.R12ChewyBork = true;
-				spieler.R12RaumOk = true;
+				_G(spieler).R12ChewyBork = true;
+				_G(spieler).R12RaumOk = true;
 				auto_move(4, P_CHEWY);
 				start_aad_wait(113, 0);
-			} else if (spieler.R12TalismanOk && !spieler.R12RaumOk) {
-				spieler.R12TalismanOk = false;
-				spieler.R12KetteLinks = true;
+			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
+				_G(spieler).R12TalismanOk = false;
+				_G(spieler).R12KetteLinks = true;
 				uhr->disable_timer();
 				obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
 				obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
@@ -2017,7 +2017,7 @@ int16 r12_use_terminal() {
 				atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
 				start_aad(111, 0);
 			} else {
-				spieler.R12TransOn = true;
+				_G(spieler).R12TransOn = true;
 				uhr->reset_timer(_G(timer_nr)[1], 0);
 			}
 		}
@@ -2030,13 +2030,13 @@ int16 r12_use_terminal() {
 
 int16 r12_use_linke_rohr() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		if (!spieler.R12KetteLinks) {
+		if (!_G(spieler).R12KetteLinks) {
 			auto_move(7, P_CHEWY);
 			start_aad_wait(29, -1);
 		} else {
-			spieler.R12KetteLinks = false;
+			_G(spieler).R12KetteLinks = false;
 			uhr->enable_timer();
 			atds->set_ats_str(117, TXT_MARK_LOOK, 0, ATS_DATEI);
 		}
@@ -2046,16 +2046,16 @@ int16 r12_use_linke_rohr() {
 
 int16 r12_chewy_trans() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (spieler.R12TransOn) {
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R12TransOn) {
 			action_flag = true;
 			flags.AutoAniPlay = true;
 			auto_move(9, P_CHEWY);
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(2, ablock16);
 			set_person_pos(108, 82, P_CHEWY, P_RIGHT);
-			spieler.PersonHide[P_CHEWY] = false;
-			spieler.R12TransOn = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler).R12TransOn = false;
 			flags.AutoAniPlay = false;
 		}
 	}
@@ -2063,33 +2063,33 @@ int16 r12_chewy_trans() {
 }
 
 void r13_entry() {
-	if (!spieler.R12ChewyBork && !spieler.R13BorkOk) {
+	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
 		out->cls();
 		flic_cut(FCUT_013, CFO_MODE);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
 		start_aad_wait(27, -1);
 	} else {
-		if (spieler.R13MonitorStatus)
-			det->show_static_spr(11 - spieler.R13MonitorStatus);
+		if (_G(spieler).R13MonitorStatus)
+			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
 
-		if (!spieler.R13BorkOk) {
+		if (!_G(spieler).R13BorkOk) {
 			det->show_static_spr(12);
 			obj->hide_sib(SIB_BANDKNOPF_R13);
-			spieler.R13Bandlauf = 1;
+			_G(spieler).R13Bandlauf = 1;
 
-			atds->set_ats_str(94, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(97, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(93, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		}
 		if (spieler_vector[P_CHEWY].Xypos[0] > 290) {
-			spieler.R13Band = true;
+			_G(spieler).R13Band = true;
 			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-			spieler.room_e_obj[25].Attribut = 255;
+			_G(spieler).room_e_obj[25].Attribut = 255;
 		}
-		if (spieler.R21GitterMuell)
+		if (_G(spieler).R21GitterMuell)
 			det->hide_static_spr(6);
 	}
 }
@@ -2109,19 +2109,19 @@ MovLine r13_bork_mpkt[3] = {
 };
 
 void r13_talk_bork() {
-	if (!spieler.R13BorkOk) {
-		spieler.R13BorkOk = true;
-		spieler.R12ChewyBork = false;
+	if (!_G(spieler).R13BorkOk) {
+		_G(spieler).R13BorkOk = true;
+		_G(spieler).R12ChewyBork = false;
 		det->show_static_spr(13);
 		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 		det->
 		set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true)
 		;
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		det->stop_detail(9);
 		det->load_taf_seq(86, (97 - 86) + 1, 0);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(12);
 		_G(auto_obj) = 1;
 		mov_phasen[R13_BORK_OBJ].AtsText = 122;
@@ -2129,7 +2129,7 @@ void r13_talk_bork() {
 		mov_phasen[R13_BORK_OBJ].Repeat = 1;
 		mov_phasen[R13_BORK_OBJ].ZoomFak = 0;
 		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[R13_BORK_OBJ].Delay = spieler.DelaySpeed;
+		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[R13_BORK_OBJ].Mode = 1;
 		init_auto_obj(R13_BORK_OBJ, &r13_bork_phasen[0][0], mov_phasen[R13_BORK_OBJ].Lines, (MovLine *)r13_bork_mpkt);
 		auto_move(9, P_CHEWY);
@@ -2154,26 +2154,26 @@ void r13_talk_bork() {
 		obj->show_sib(SIB_SCHLITZ_R11);
 		obj->show_sib(SIB_TKNOPF2_R11);
 		obj->show_sib(SIB_TKNOPF3_R11);
-		if (spieler.R6DoorRightB)
-			spieler.room_e_obj[20].Attribut = AUSGANG_LINKS;
-		spieler.room_e_obj[21].Attribut = AUSGANG_OBEN;
+		if (_G(spieler).R6DoorRightB)
+			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
+		_G(spieler).room_e_obj[21].Attribut = AUSGANG_OBEN;
 	}
 }
 
 void r13_jmp_band() {
-	if (!spieler.R13Band && !spieler.R12ChewyBork) {
-		if (!spieler.R13Bandlauf) {
+	if (!_G(spieler).R13Band && !_G(spieler).R12ChewyBork) {
+		if (!_G(spieler).R13Bandlauf) {
 			obj->hide_sib(SIB_BANDKNOPF_R13);
-			spieler.room_e_obj[25].Attribut = 255;
+			_G(spieler).room_e_obj[25].Attribut = 255;
 			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-			spieler.R13Band = true;
+			_G(spieler).R13Band = true;
 			auto_move(3, P_CHEWY);
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(8, 1, ANI_VOR);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
 		} else {
-			spieler.R13Surf = true;
+			_G(spieler).R13Surf = true;
 			_G(maus_links_click) = false;
 			auto_move(12, P_CHEWY);
 			start_aad_wait(117, -1);
@@ -2183,22 +2183,22 @@ void r13_jmp_band() {
 			flags.NoScroll = false;
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
-			spieler.R13Bandlauf = 0;
+			_G(spieler).R13Bandlauf = 0;
 
-			atds->set_ats_str(94, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(97, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(93, TXT_MARK_LOOK, spieler.R13Bandlauf, ATS_DATEI);
+			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 			obj->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
 			obj->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
 			flic_cut(FCUT_018, CFO_MODE);
-			spieler.scrollx = 92;
-			spieler.scrolly = 120;
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).scrollx = 92;
+			_G(spieler).scrolly = 120;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			wait_show_screen(40);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 		}
 	}
 	else
@@ -2206,60 +2206,60 @@ void r13_jmp_band() {
 }
 
 void r13_jmp_boden() {
-	if (spieler.R13Band) {
-		if (!spieler.R13Surf)
+	if (_G(spieler).R13Band) {
+		if (!_G(spieler).R13Surf)
 			obj->show_sib(SIB_BANDKNOPF_R13);
-		spieler.room_e_obj[25].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 		atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.R13Band = false;
+		_G(spieler).R13Band = false;
 		auto_move(5, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(7, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		set_person_pos(176, 138, P_CHEWY, P_LEFT);
 	}
 }
 
 int16 r13_monitor_knopf() {
 	int16 action_flag = false;
-	if (!spieler.R13Band &&
-	        !spieler.R12ChewyBork &&
-	        !spieler.inv_cur) {
+	if (!_G(spieler).R13Band &&
+	        !_G(spieler).R12ChewyBork &&
+	        !_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(8, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(6, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
-		if (spieler.R13MonitorStatus)
-			det->hide_static_spr(11 - spieler.R13MonitorStatus);
-		++spieler.R13MonitorStatus;
-		if (spieler.R13MonitorStatus > 4)
-			spieler.R13MonitorStatus = 0;
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		if (_G(spieler).R13MonitorStatus)
+			det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
+		++_G(spieler).R13MonitorStatus;
+		if (_G(spieler).R13MonitorStatus > 4)
+			_G(spieler).R13MonitorStatus = 0;
 		else
-			det->show_static_spr(11 - spieler.R13MonitorStatus);
-		atds->set_ats_str(96, TXT_MARK_LOOK, spieler.R13MonitorStatus, ATS_DATEI);
+			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+		atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
 	}
 	return action_flag;
 }
 
 void r14_entry() {
-	spieler.R23GleiterExit = 14;
+	_G(spieler).R23GleiterExit = 14;
 	_G(zoom_horizont) = 310;
 	if (!flags.LoadGame) {
-		if (spieler.R14GleiterAuf) {
+		if (_G(spieler).R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
 			det->show_static_spr(6);
-			spieler.scrollx = 160;
-			spieler.scrolly = 120;
+			_G(spieler).scrollx = 160;
+			_G(spieler).scrolly = 120;
 		} else {
-			spieler.scrollx = 92;
-			spieler.scrolly = 17;
+			_G(spieler).scrollx = 92;
+			_G(spieler).scrolly = 17;
 		}
 	}
 }
 
 void r14_eremit_feuer(int16 t_nr, int16 ani_nr) {
-	if (!flags.AutoAniPlay && !spieler.R14Feuer) {
+	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
 		flags.AutoAniPlay = true;
 		det->hide_static_spr(9);
 		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, 0);
@@ -2272,15 +2272,15 @@ void r14_eremit_feuer(int16 t_nr, int16 ani_nr) {
 
 int16 r14_use_schrott() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		auto_move(3, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(12, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 
-		if (!spieler.R14Waffe) {
+		if (!_G(spieler).R14Waffe) {
 			action_flag = true;
-			spieler.R14Waffe = true;
+			_G(spieler).R14Waffe = true;
 			start_aad_wait(21, -1);
 			invent_2_slot(BWAFFE_INV);
 		}
@@ -2290,18 +2290,18 @@ int16 r14_use_schrott() {
 
 int16 r14_use_gleiter() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
-		if (!spieler.R14GleiterAuf) {
-			spieler.R14GleiterAuf = true;
-			spieler.PersonHide[P_CHEWY] = true;
+		if (!_G(spieler).R14GleiterAuf) {
+			_G(spieler).R14GleiterAuf = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(10, 1, ANI_VOR);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			det->show_static_spr(6);
 			atds->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
 		} else {
-			spieler.R23GleiterExit = 14;
+			_G(spieler).R23GleiterExit = 14;
 			r23_cockpit();
 		}
 	}
@@ -2309,9 +2309,9 @@ int16 r14_use_gleiter() {
 }
 
 void r14_talk_eremit() {
-	if (!spieler.R14Feuer) {
+	if (!_G(spieler).R14Feuer) {
 		auto_move(6, P_CHEWY);
-		if (spieler.R14Translator) {
+		if (_G(spieler).R14Translator) {
 			flags.AutoAniPlay = true;
 			load_ads_dia(0);
 		} else {
@@ -2324,14 +2324,14 @@ void r14_talk_eremit() {
 
 int16 r14_use_schleim() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		auto_move(2, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(11, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
-		if (!spieler.R14Sicherung) {
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		if (!_G(spieler).R14Sicherung) {
 			action_flag = true;
-			spieler.R14Sicherung = true;
+			_G(spieler).R14Sicherung = true;
 			start_aad_wait(22, -1);
 			invent_2_slot(SICHERUNG_INV);
 
@@ -2344,25 +2344,25 @@ void r14_feuer() {
 	int16 tmp;
 	int16 waffe;
 	waffe = false;
-	tmp = spieler.AkInvent;
-	spieler.R14Feuer = true;
+	tmp = _G(spieler).AkInvent;
+	_G(spieler).R14Feuer = true;
 	flags.AutoAniPlay = true;
 	hide_cur();
 	if (is_cur_inventar(BWAFFE_INV)) {
 		auto_move(5, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(8, 1, ANI_VOR, 11);
 		start_detail_wait(9, 1, ANI_VOR);
 		wait_detail(8);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		waffe = true;
 	} else {
 		auto_move(7, P_CHEWY);
 		det->hide_static_spr(9);
 		start_detail_frame(2, 1, ANI_VOR, 9);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(13, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_detail(2);
 		start_detail_wait(5, 1, ANI_VOR);
 		det->show_static_spr(9);
@@ -2378,30 +2378,30 @@ void r14_feuer() {
 	det->show_static_spr(9);
 	invent_2_slot(FLUXO_INV);
 	atds->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
-	spieler.R14FluxoFlex = true;
+	_G(spieler).R14FluxoFlex = true;
 	flags.AutoAniPlay = false;
 	show_cur();
 }
 
 void r16_entry() {
 	_G(zoom_horizont) = 140;
-	if (!spieler.R16F5Exit) {
+	if (!_G(spieler).R16F5Exit) {
 		det->show_static_spr(4);
-		spieler.room_e_obj[32].Attribut = 255;
+		_G(spieler).room_e_obj[32].Attribut = 255;
 		atds->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		det->hide_static_spr(4);
-		spieler.room_e_obj[32].Attribut = AUSGANG_LINKS;
+		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
 		atds->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 }
 
 int16 r16_use_gleiter() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(6, P_CHEWY);
-		spieler.R23GleiterExit = 16;
+		_G(spieler).R23GleiterExit = 16;
 		r23_cockpit();
 	}
 	return action_flag;
@@ -2409,64 +2409,64 @@ int16 r16_use_gleiter() {
 
 void r17_entry() {
 	r17_plot_seil();
-	if (spieler.R17GitterWeg)
+	if (_G(spieler).R17GitterWeg)
 		det->hide_static_spr(5);
-	if (spieler.R17DoorKommand)
+	if (_G(spieler).R17DoorKommand)
 		det->show_static_spr(7);
-	if (spieler.R17Location == 1) {
+	if (_G(spieler).R17Location == 1) {
 		flags.ZoomMov = true;
 		_G(zoom_mov_fak) = 3;
 		room->set_zoom(25);
 		_G(zoom_horizont) = 0;
-		spieler.scrollx = 0;
-		spieler.scrolly = 60;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 60;
 		set_person_pos(242, 146, P_CHEWY, P_LEFT);
 		r17_xit();
-	} else if (spieler.R17Location == 3) {
+	} else if (_G(spieler).R17Location == 3) {
 		room->set_zoom(32);
 		_G(zoom_horizont) = 399;
 		r17_xit();
 	} else {
 		room->set_zoom(15);
 		_G(zoom_horizont) = 0;
-		spieler.room_e_obj[36].Attribut = 255;
-		spieler.room_e_obj[38].Attribut = 255;
-		if (spieler.R6DoorLeftF)
-			spieler.room_e_obj[39].Attribut = AUSGANG_RECHTS;
+		_G(spieler).room_e_obj[36].Attribut = 255;
+		_G(spieler).room_e_obj[38].Attribut = 255;
+		if (_G(spieler).R6DoorLeftF)
+			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
 		else
-			spieler.room_e_obj[39].Attribut = 255;
-		if (spieler.R18DoorBruecke)
-			spieler.room_e_obj[35].Attribut = AUSGANG_LINKS;
+			_G(spieler).room_e_obj[39].Attribut = 255;
+		if (_G(spieler).R18DoorBruecke)
+			_G(spieler).room_e_obj[35].Attribut = AUSGANG_LINKS;
 		else
-			spieler.room_e_obj[35].Attribut = 255;
+			_G(spieler).room_e_obj[35].Attribut = 255;
 	}
 }
 
 void r17_xit() {
-	if (spieler.R17DoorKommand)
-		spieler.room_e_obj[36].Attribut = AUSGANG_OBEN;
+	if (_G(spieler).R17DoorKommand)
+		_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
 	else
-		spieler.room_e_obj[36].Attribut = 255;
-	spieler.room_e_obj[35].Attribut = 255;
-	spieler.room_e_obj[39].Attribut = 255;
-	spieler.room_e_obj[38].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[36].Attribut = 255;
+	_G(spieler).room_e_obj[35].Attribut = 255;
+	_G(spieler).room_e_obj[39].Attribut = 255;
+	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
 }
 
 int16 r17_use_seil() {
 	int16 action_flag = false;
 	if (!flags.AutoAniPlay) {
-		if (spieler.R17Location == 1) {
+		if (_G(spieler).R17Location == 1) {
 			if (is_cur_inventar(SEIL_INV)) {
 				action_flag = true;
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				flags.AutoAniPlay = true;
 				auto_move(5, P_CHEWY);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_detail_wait(10, 1, ANI_VOR);
-				spieler.R17Seil = true;
+				_G(spieler).R17Seil = true;
 				atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
 				r17_plot_seil();
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 				flags.AutoAniPlay = false;
 				start_aad(119, -1);
 			}
@@ -2477,7 +2477,7 @@ int16 r17_use_seil() {
 
 void r17_plot_seil() {
 	int16 i;
-	if (spieler.R17Seil) {
+	if (_G(spieler).R17Seil) {
 		for (i = 0; i < 3; i++)
 			det->show_static_spr(8 + i);
 	}
@@ -2504,11 +2504,11 @@ MovLine r17_chewy_mpkt1[2] = {
 void r17_kletter_down() {
 	auto_move(5, P_CHEWY);
 	det->load_taf_seq(177, 1, 0);
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(14, 1, ANI_VOR);
 	flags.ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
-	spieler.ScrollyStep = 2;
+	_G(spieler).ScrollyStep = 2;
 	room->set_zoom(32);
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
@@ -2520,11 +2520,11 @@ void r17_kletter_down() {
 void r17_kletter_up() {
 	auto_move(6, P_CHEWY);
 	det->load_taf_seq(141, 4, 0);
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(11, 1, ANI_VOR);
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler.ScrollyStep = 1;
+	_G(spieler).ScrollyStep = 1;
 	room->set_zoom(25);
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
@@ -2534,10 +2534,10 @@ void r17_kletter_up() {
 }
 
 void r17_calc_seil() {
-	if (spieler.R17Seil) {
-		if (spieler.R17Location != 2) {
+	if (_G(spieler).R17Seil) {
+		if (_G(spieler).R17Location != 2) {
 			if (!flags.AutoAniPlay) {
-				if (!spieler.inv_cur) {
+				if (!_G(spieler).inv_cur) {
 					r17_close_door();
 					flags.AutoAniPlay = true;
 					mov_phasen[R17_CHEWY_OBJ].AtsText = 0;
@@ -2545,22 +2545,22 @@ void r17_calc_seil() {
 					mov_phasen[R17_CHEWY_OBJ].Repeat = 1;
 					mov_phasen[R17_CHEWY_OBJ].ZoomFak = 0;
 					auto_mov_obj[R17_CHEWY_OBJ].Id = AUTO_OBJ0;
-					auto_mov_vector[R17_CHEWY_OBJ].Delay = spieler.DelaySpeed;
+					auto_mov_vector[R17_CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
 					auto_mov_obj[R17_CHEWY_OBJ].Mode = 1;
-					if (spieler.R17Location == 1) {
+					if (_G(spieler).R17Location == 1) {
 						r17_kletter_down();
-						spieler.R17Location = 3;
+						_G(spieler).R17Location = 3;
 					}
-					else if (spieler.R17Location == 3) {
+					else if (_G(spieler).R17Location == 3) {
 						r17_kletter_up();
-						spieler.R17Location = 1;
+						_G(spieler).R17Location = 1;
 					}
 					menu_item = CUR_WALK;
 					cursor_wahl(menu_item);
 					wait_auto_obj(R17_CHEWY_OBJ);
 					set_person_spr(P_LEFT, P_CHEWY);
-					spieler.ScrollyStep = 1;
-					spieler.PersonHide[P_CHEWY] = false;
+					_G(spieler).ScrollyStep = 1;
+					_G(spieler).PersonHide[P_CHEWY] = false;
 					flags.AutoAniPlay = false;
 					_G(auto_obj) = 0;
 					r17_xit();
@@ -2574,9 +2574,9 @@ void r17_door_kommando(int16 mode) {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
 		if (!mode) {
-			if (!spieler.R17DoorKommand) {
-				spieler.room_e_obj[36].Attribut = AUSGANG_OBEN;
-				spieler.R17DoorKommand = true;
+			if (!_G(spieler).R17DoorKommand) {
+				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
+				_G(spieler).R17DoorKommand = true;
 				start_detail_wait(4, 1, ANI_VOR);
 				stop_person(P_CHEWY);
 				det->show_static_spr(7);
@@ -2585,14 +2585,14 @@ void r17_door_kommando(int16 mode) {
 			r17_close_door();
 		}
 		flags.AutoAniPlay = false;
-		atds->set_ats_str(144, spieler.R17DoorKommand, ATS_DATEI);
+		atds->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
 	}
 }
 
 void r17_close_door() {
-	if (spieler.R17DoorKommand) {
-		spieler.room_e_obj[36].Attribut = 255;
-		spieler.R17DoorKommand = false;
+	if (_G(spieler).R17DoorKommand) {
+		_G(spieler).room_e_obj[36].Attribut = 255;
+		_G(spieler).R17DoorKommand = false;
 		det->hide_static_spr(7);
 		det->start_detail(4, 1, ANI_RUECK);
 	}
@@ -2602,22 +2602,22 @@ int16 r17_energie_hebel() {
 	int16 dia_nr;
 	int16 action_flag = false;
 	auto_move(7, P_CHEWY);
-	if (!spieler.R17HebelOk) {
+	if (!_G(spieler).R17HebelOk) {
 		action_flag = true;
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
-			spieler.R17HebelOk = true;
+			_G(spieler).R17HebelOk = true;
 			dia_nr = 38;
 		} else
 			dia_nr = 37;
 		start_aad_wait(dia_nr, -1);
 	}
-	else if (!spieler.inv_cur) {
+	else if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
-		spieler.R17EnergieOut ^= 1;
-		atds->set_ats_str(142, TXT_MARK_LOOK, spieler.R17EnergieOut, ATS_DATEI);
+		_G(spieler).R17EnergieOut ^= 1;
+		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
 		det->play_sound(12, 0);
-		if (spieler.R17EnergieOut)
+		if (_G(spieler).R17EnergieOut)
 			det->disable_sound(15, 0);
 		else {
 			det->enable_sound(15, 0);
@@ -2629,7 +2629,7 @@ int16 r17_energie_hebel() {
 
 int16 r17_get_oel() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
 		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
@@ -2638,10 +2638,10 @@ int16 r17_get_oel() {
 		action_flag = true;
 		r17_close_door();
 		auto_move(4, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(13, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
-		del_inventar(spieler.AkInvent);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		del_inventar(_G(spieler).AkInvent);
 		obj->add_inventar(BECHER_VOLL_INV, &room_blk);
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
@@ -2654,31 +2654,31 @@ int16 bork_spr1[4] = {20, 21, 18, 19};
 
 void r18_entry() {
 	int16 i;
-	spieler.R18MoniSwitch = 0;
-	spieler.R18CartTerminal = 0;
+	_G(spieler).R18MoniSwitch = 0;
+	_G(spieler).R18CartTerminal = 0;
 	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
-	spieler.ScrollxStep = 2;
-	if (spieler.R18CartTerminal)
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R18CartTerminal)
 		det->show_static_spr(23);
-	if (!spieler.R18SurimyWurf)
+	if (!_G(spieler).R18SurimyWurf)
 		r18_init_borks();
 	else {
 		for (i = 0; i < 5; i++)
 			det->hide_static_spr(bork_spr[i]);
-		for (i = 0; i < (4 - spieler.R18Krone); i++)
+		for (i = 0; i < (4 - _G(spieler).R18Krone); i++)
 			det->show_static_spr(bork_spr1[i]);
 	}
-	if (spieler.R16F5Exit)
+	if (_G(spieler).R16F5Exit)
 		det->hide_static_spr(19);
-	if (spieler.R17EnergieOut) {
+	if (_G(spieler).R17EnergieOut) {
 		det->stop_detail(0);
 		atds->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
 	} else {
 		atds->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
 	}
-	if (!spieler.R18FirstEntry && !spieler.R18Gitter) {
+	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
 		start_aad_wait(39, -1);
-		spieler.R18FirstEntry = true;
+		_G(spieler).R18FirstEntry = true;
 	}
 }
 
@@ -2690,14 +2690,14 @@ void r18_init_borks() {
 		det->hide_static_spr(bork_spr1[i]);
 	_G(timer_nr)[0] = room->set_timer(255, 10);
 	_G(timer_nr)[1] = room->set_timer(255, 15);
-	spieler.scrollx = 276;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 276;
+	_G(spieler).scrolly = 0;
 	flags.NoScroll = true;
 }
 
 void r18_timer_action(int16 t_nr) {
 
-	if (!spieler.R18SurimyWurf) {
+	if (!_G(spieler).R18SurimyWurf) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
 			if (t_nr == _G(timer_nr)[0]) {
@@ -2711,8 +2711,8 @@ void r18_timer_action(int16 t_nr) {
 				det->hide_static_spr(17);
 				start_detail_wait(9, 1, ANI_VOR);
 				det->show_static_spr(17);
-				if (!spieler.R18SondeMoni) {
-					spieler.R18SondeMoni = true;
+				if (!_G(spieler).R18SondeMoni) {
+					_G(spieler).R18SondeMoni = true;
 					start_detail_wait(2, 1, ANI_VOR);
 					det->show_static_spr(9);
 					start_detail_wait(4, 1, ANI_VOR);
@@ -2734,10 +2734,10 @@ void r18_timer_action(int16 t_nr) {
 void r18_monitor() {
 	int16 nr;
 	nr = 0;
-	spieler.R18MoniSwitch ^= 1;
-	if (spieler.R18MoniSwitch) {
+	_G(spieler).R18MoniSwitch ^= 1;
+	if (_G(spieler).R18MoniSwitch) {
 		start_ani_block(2, ablock21);
-		if (spieler.R17EnergieOut)
+		if (_G(spieler).R17EnergieOut)
 			nr = 2;
 		else
 			nr = 1;
@@ -2751,7 +2751,7 @@ void r18_monitor() {
 int16 r18_sonden_moni() {
 	int16 i;
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		hide_cur();
 		auto_move(8, P_CHEWY);
@@ -2801,8 +2801,8 @@ int16 r18_calc_surimy() {
 	if (is_cur_inventar(SURIMY_INV)) {
 		action_flag = true;
 		hide_cur();
-		del_inventar(spieler.AkInvent);
-		spieler.R18SurimyWurf = true;
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).R18SurimyWurf = true;
 		det->load_taf_seq(245, 294 - 245 + 1, 0);
 		det->load_taf_seq(116, 170 - 116 + 1, 0);
 		_G(auto_obj) = 1;
@@ -2811,7 +2811,7 @@ int16 r18_calc_surimy() {
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
 		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = spieler.DelaySpeed;
+		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[SURIMY_OBJ].Mode = 1;
 		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
@@ -2822,7 +2822,7 @@ int16 r18_calc_surimy() {
 		} else {
 			auto_move(1, P_CHEWY);
 			stop_person(P_CHEWY);
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_frame(17, 1, ANI_VOR, 12);
 			_G(maus_links_click) = false;
 
@@ -2830,7 +2830,7 @@ int16 r18_calc_surimy() {
 			              *)r18_surimy_mpkt);
 			wait_detail(17);
 		}
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_auto_obj(SURIMY_OBJ);
 
 		det->set_detail_pos(21, 392, 170);
@@ -2877,10 +2877,10 @@ int16 r18_calc_surimy() {
 		              *)r18_surimy_mpkt2);
 		auto_scroll(0, 0);
 		wait_auto_obj(SURIMY_OBJ);
-		spieler.ScrollxStep = 6;
+		_G(spieler).ScrollxStep = 6;
 		flags.NoScroll = false;
 		auto_scroll(318, 0);
-		spieler.ScrollxStep = 2;
+		_G(spieler).ScrollxStep = 2;
 		_G(auto_obj) = 0;
 
 		atds->set_ats_str(153, 1, ATS_DATEI);
@@ -2896,7 +2896,7 @@ int16 r18_calc_surimy() {
 
 int16 r18_calc_schalter() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur && !spieler.R18Gitter) {
+	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
 		auto_move(6, P_CHEWY);
 
@@ -2907,13 +2907,13 @@ int16 r18_calc_schalter() {
 
 short r18_use_cart_moni() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(9, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		spieler.R18CartTerminal ^= 1;
-		if (!spieler.R18CartTerminal) {
+		_G(spieler).R18CartTerminal ^= 1;
+		if (!_G(spieler).R18CartTerminal) {
 			atds->set_ats_str(157, TXT_MARK_LOOK, 0, ATS_DATEI);
 
 			atds->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
@@ -2924,8 +2924,8 @@ short r18_use_cart_moni() {
 			atds->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
 			start_detail_wait(20, 1, ANI_VOR);
 			det->show_static_spr(23);
-			if (spieler.R18CartFach) {
-				spieler.R18CartSave = true;
+			if (_G(spieler).R18CartFach) {
+				_G(spieler).R18CartSave = true;
 				atds->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
 				start_aad_wait(120, -1);
 			}
@@ -2936,7 +2936,7 @@ short r18_use_cart_moni() {
 
 int16 r18_go_cyberspace() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur && !spieler.R18Gitter) {
+	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
 		auto_move(7, P_CHEWY);
 		cur_2_inventory();
@@ -2948,8 +2948,8 @@ int16 r18_go_cyberspace() {
 void r19_entry() {
 	_G(zoom_horizont) = 250;
 	flags.NoScroll = true;
-	spieler.scrollx = 0;
-	spieler.scrolly = 24;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 24;
 }
 
 void r21_entry() {
@@ -2963,30 +2963,30 @@ void r21_entry() {
 
 void r21_calc_laser() {
 
-	if (spieler.R21Hebel1 && !spieler.R21Hebel2 && spieler.R21Hebel3) {
-		spieler.R21Laser1Weg = true;
+	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
+		_G(spieler).R21Laser1Weg = true;
 		det->stop_detail(3);
 		atds->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		spieler.R21Laser1Weg = false;
+		_G(spieler).R21Laser1Weg = false;
 		det->start_detail(3, 255, ANI_VOR);
 		atds->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
-	if (!spieler.R21Hebel1 && spieler.R21Hebel2 && !spieler.R21Hebel3) {
+	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
 		if (obj->check_inventar(SEIL_INV) == false) {
 			obj->show_sib(SIB_SEIL_R21);
 			atds->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		}
-		spieler.R21Laser2Weg = true;
+		_G(spieler).R21Laser2Weg = true;
 		det->stop_detail(4);
 		atds->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		obj->hide_sib(SIB_SEIL_R21);
 		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.R21Laser2Weg = false;
+		_G(spieler).R21Laser2Weg = false;
 		det->start_detail(4, 255, ANI_VOR);
 		atds->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
 	}
@@ -3027,7 +3027,7 @@ void r21_init_spinne() {
 	mov_phasen[R21_SPINNE1_OBJ].Repeat = 255;
 	mov_phasen[R21_SPINNE1_OBJ].ZoomFak = 0;
 	auto_mov_obj[R21_SPINNE1_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[R21_SPINNE1_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[R21_SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[R21_SPINNE1_OBJ].Mode = 1;
 	init_auto_obj(R21_SPINNE1_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE1_OBJ].Lines, (MovLine *)r21_spinne_mpkt);
 
@@ -3036,7 +3036,7 @@ void r21_init_spinne() {
 	mov_phasen[R21_SPINNE2_OBJ].Repeat = 1;
 	mov_phasen[R21_SPINNE2_OBJ].ZoomFak = 0;
 	auto_mov_obj[R21_SPINNE2_OBJ].Id = AUTO_OBJ1;
-	auto_mov_vector[R21_SPINNE2_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[R21_SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[R21_SPINNE2_OBJ].Mode = 1;
 	init_auto_obj(R21_SPINNE2_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE2_OBJ].Lines, (MovLine *)r21_spinne_mpkt1);
 	_G(timer_nr)[0] = room->set_timer(255, 21);
@@ -3059,7 +3059,7 @@ void r21_e_streifen() {
 	mov_phasen[R21_ENERGIE_OBJ].Repeat = 1;
 	mov_phasen[R21_ENERGIE_OBJ].ZoomFak = 0;
 	auto_mov_obj[R21_ENERGIE_OBJ].Id = AUTO_OBJ2;
-	auto_mov_vector[R21_ENERGIE_OBJ].Delay = spieler.DelaySpeed;
+	auto_mov_vector[R21_ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[R21_ENERGIE_OBJ].Mode = 1;
 	init_auto_obj(R21_ENERGIE_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_ENERGIE_OBJ].Lines, (MovLine *)r21_energie_mpkt);
 
@@ -3113,7 +3113,7 @@ void r21_chewy_kolli() {
 			tmp = spieler_vector[P_CHEWY].Count;
 			stop_person(P_CHEWY);
 			flags.AutoAniPlay = true;
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			if (spieler_vector[P_CHEWY].Xyvo[0] < 0)
 				ani_nr = 10;
 			else
@@ -3121,7 +3121,7 @@ void r21_chewy_kolli() {
 			det->
 			set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 			start_detail_wait(ani_nr, 1, ANI_VOR);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			flags.AutoAniPlay = false;
 			spieler_vector[P_CHEWY].Count = tmp;
 			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
@@ -3132,19 +3132,19 @@ void r21_chewy_kolli() {
 
 void r21_salto() {
 	int16 i;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
-			if (!spieler.R21Salto) {
+			if (!_G(spieler).R21Salto) {
 				if (!flags.AutoAniPlay) {
-					spieler.R21Salto = true;
+					_G(spieler).R21Salto = true;
 					flags.AutoAniPlay = true;
-					spieler.PersonHide[P_CHEWY] = true;
+					_G(spieler).PersonHide[P_CHEWY] = true;
 					for (i = 0; i < 3; i++)
 						det->
 						set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]
 						              );
 					start_ani_block(3, ablock19);
-					spieler.PersonHide[P_CHEWY] = false;
+					_G(spieler).PersonHide[P_CHEWY] = false;
 					start_aad_wait(36, -1);
 					flags.AutoAniPlay = false;
 				}
@@ -3154,35 +3154,35 @@ void r21_salto() {
 }
 
 void r21_use_gitter_energie() {
-	spieler.R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
+	_G(spieler).R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
 	                           AUSGANG_UNTEN, AUSGANG_OBEN,
-	                           (int16)spieler.R21GitterEnergie);
+	                           (int16)_G(spieler).R21GitterEnergie);
 	_G(auto_obj) = 0;
-	spieler.R17Location = 1;
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).R17Location = 1;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	switch_room(17);
 	det->hide_static_spr(5);
 	start_detail_wait(9, 1, ANI_VOR);
-	spieler.R17GitterWeg = true;
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).R17GitterWeg = true;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
 int16 r21_use_fenster() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (!flags.AutoAniPlay && spieler.R21Laser1Weg) {
+	if (!_G(spieler).inv_cur) {
+		if (!flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
 			action_flag = true;
 			flags.AutoAniPlay = true;
-			spieler.R18Gitter = true;
+			_G(spieler).R18Gitter = true;
 			auto_move(13, P_CHEWY);
 			set_person_pos(541, 66, P_CHEWY, P_LEFT);
 			switch_room(18);
-			if (!spieler.R18FirstEntry) {
+			if (!_G(spieler).R18FirstEntry) {
 				start_aad_wait(39, -1);
-				spieler.R18FirstEntry = true;
+				_G(spieler).R18FirstEntry = true;
 			}
-			spieler.room_e_obj[50].Attribut = AUSGANG_OBEN;
-			spieler.room_e_obj[41].Attribut = 255;
+			_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[41].Attribut = 255;
 			flags.AutoAniPlay = false;
 		}
 	}
@@ -3190,26 +3190,26 @@ int16 r21_use_fenster() {
 }
 
 void r22_entry() {
-	if (!spieler.R22BorkPlatt) {
+	if (!_G(spieler).R22BorkPlatt) {
 		det->load_taf_seq(36, (56 - 36) + 1, 0);
 		room->set_timer(255, 15);
-	} else if (spieler.R22ChewyPlatt && !spieler.R22GetBork)
+	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork)
 		det->show_static_spr(4);
 }
 
 int16 r22_chewy_amboss() {
 	int16 action_flag = false;
-	if (!spieler.R22ChewyPlatt && !spieler.inv_cur && !flags.AutoAniPlay) {
+	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
 		action_flag = true;
 		flags.AutoAniPlay = true;
 		auto_move(5, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(1, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		auto_move(2, P_CHEWY);
 		flags.NoPalAfterFlc = false;
 		flic_cut(FCUT_007, CFO_MODE);
-		spieler.R22ChewyPlatt = true;
+		_G(spieler).R22ChewyPlatt = true;
 		atds->set_ats_str(79, 1, ATS_DATEI);
 		flags.AutoAniPlay = false;
 	}
@@ -3242,7 +3242,7 @@ MovLine r22_bork_mpkt2[2] = {
 void r22_bork(int16 t_nr) {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
-		if (!spieler.R22BorkPlatt) {
+		if (!_G(spieler).R22BorkPlatt) {
 			hide_cur();
 			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(10, -1);
@@ -3253,12 +3253,12 @@ void r22_bork(int16 t_nr) {
 			mov_phasen[R22_BORK_OBJ].Repeat = 1;
 			mov_phasen[R22_BORK_OBJ].ZoomFak = 0;
 			auto_mov_obj[R22_BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[R22_BORK_OBJ].Delay = spieler.DelaySpeed;
+			auto_mov_vector[R22_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R22_BORK_OBJ].Mode = 1;
-			if (!spieler.R22Paint) {
+			if (!_G(spieler).R22Paint) {
 				r22_bork_walk1();
 			} else {
-				spieler.R22ChewyPlatt = true;
+				_G(spieler).R22ChewyPlatt = true;
 				r22_bork_walk2();
 			}
 			show_cur();
@@ -3291,24 +3291,24 @@ void r22_bork_walk2() {
 	flic_cut(FCUT_009, CFO_MODE);
 	det->show_static_spr(4);
 	atds->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
-	spieler.R22BorkPlatt = true;
+	_G(spieler).R22BorkPlatt = true;
 	atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 }
 
 void r22_get_bork() {
-	if (!spieler.R22GetBork && spieler.R22BorkPlatt) {
+	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
 		auto_move(4, P_CHEWY);
 		det->hide_static_spr(4);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ablock14);
 		set_person_pos(171, 120, P_CHEWY, P_LEFT);
 		start_aad_wait(11, -1);
 		det->stop_detail(3);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		atds->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
 		invent_2_slot(BORK_INV);
 
-		spieler.R22GetBork = true;
+		_G(spieler).R22GetBork = true;
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
 	}
@@ -3322,10 +3322,10 @@ int16 r22_malen() {
 		auto_move(8, P_CHEWY);
 		flic_cut(FCUT_008, CFO_MODE);
 		atds->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
-		spieler.R22Paint = true;
+		_G(spieler).R22Paint = true;
 		obj->calc_rsi_flip_flop(SIB_PAINT_R22);
 		obj->hide_sib(SIB_PAINT_R22);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		obj->calc_all_static_detail();
 		flags.AutoAniPlay = false;
 	}
@@ -3333,11 +3333,11 @@ int16 r22_malen() {
 }
 
 void r23_cockpit() {
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	_G(maus_links_click) = false;
 	switch_room(23);
-	if (spieler.R23Cartridge)
+	if (_G(spieler).R23Cartridge)
 		det->show_static_spr(3);
 	else
 		det->hide_static_spr(3);
@@ -3347,22 +3347,22 @@ int16 r23_start_gleiter() {
 	int16 i;
 	int16 start_ok;
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		start_ok = false;
-		if (!spieler.R23FluxoFlex)
+		if (!_G(spieler).R23FluxoFlex)
 			start_aad_wait(23, -1);
 		else {
 			start_ok = true;
-			if (spieler.R23GleiterExit == 16) {
-				if (!spieler.R16F5Exit) {
+			if (_G(spieler).R23GleiterExit == 16) {
+				if (!_G(spieler).R16F5Exit) {
 					start_ok = false;
 					start_aad_wait(35, -1);
-				} else if ((!spieler.R23Cartridge) || (!spieler.R18CartSave)) {
+				} else if ((!_G(spieler).R23Cartridge) || (!_G(spieler).R18CartSave)) {
 
 					start_ok = false;
 					start_aad_wait(41, -1);
-				} else if (!spieler.R17EnergieOut) {
+				} else if (!_G(spieler).R17EnergieOut) {
 
 					start_ok = false;
 					start_aad_wait(300, -1);
@@ -3374,29 +3374,29 @@ int16 r23_start_gleiter() {
 				wait_show_screen(30);
 				for (i = 0; i < 4; i++)
 					det->stop_detail(i);
-				if (spieler.R23GleiterExit == 14) {
+				if (_G(spieler).R23GleiterExit == 14) {
 					out->setze_zeiger(0);
 					out->cls();
 					flic_cut(FCUT_012, CFO_MODE);
 					out->cls();
-					spieler.R23GleiterExit = 16;
+					_G(spieler).R23GleiterExit = 16;
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
-					switch_room(spieler.R23GleiterExit);
+					switch_room(_G(spieler).R23GleiterExit);
 					start_spz(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
 					while (flags.SpzAni && !SHOULD_QUIT)
 						set_up_screen(DO_SETUP);
 					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
-					spieler.DelaySpeed = 10;
+					_G(spieler).DelaySpeed = 10;
 					start_aad_wait(59, -1);
 					stop_person(P_CHEWY);
 					_G(maus_links_click) = false;
-				} else if (spieler.R23GleiterExit == 16) {
+				} else if (_G(spieler).R23GleiterExit == 16) {
 					out->setze_zeiger(0);
 					out->cls();
 					flic_cut(FCUT_019, CFO_MODE);
-					spieler.R23GleiterExit = 25;
+					_G(spieler).R23GleiterExit = 25;
 
-					switch_room(spieler.R23GleiterExit);
+					switch_room(_G(spieler).R23GleiterExit);
 				}
 
 				show_cur();
@@ -3407,11 +3407,11 @@ int16 r23_start_gleiter() {
 }
 
 void r23_use_cartridge() {
-	del_inventar(spieler.AkInvent);
+	del_inventar(_G(spieler).AkInvent);
 	atds->set_ats_str(111, 1, ATS_DATEI);
 	atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-	spieler.R23Cartridge = true;
-	if (spieler.R18CartSave) {
+	_G(spieler).R23Cartridge = true;
+	if (_G(spieler).R18CartSave) {
 		start_detail_wait(4, 1, ANI_VOR);
 		det->show_static_spr(3);
 	}
@@ -3421,8 +3421,8 @@ void r23_use_cartridge() {
 void r23_get_cartridge() {
 	atds->set_ats_str(111, 0, ATS_DATEI);
 	atds->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-	if (spieler.R18CartSave) {
-		spieler.R23Cartridge = false;
+	if (_G(spieler).R18CartSave) {
+		_G(spieler).R23Cartridge = false;
 		det->hide_static_spr(3);
 	}
 }
@@ -3435,67 +3435,67 @@ uint8 kristall_spr[3][3] = { {14, 20, 13},
 void r24_entry() {
 	int16 i;
 	flags.MainInput = false;
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(0, 0, P_CHEWY, -1);
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	curblk.sprite = room_blk.DetImage;
 	curani.ani_anf = 7;
 	curani.ani_end = 10;
 	menu_item = CUR_USER;
 	cursor_wahl(CUR_USER);
-	if (spieler.R16F5Exit)
+	if (_G(spieler).R16F5Exit)
 		det->show_static_spr(10);
 	else
 		det->hide_static_spr(10);
 	r24_calc_hebel_spr();
 	r24_calc_animation(255);
 	for (i = 0; i < 3; i++) {
-		if (kristall_spr[i][spieler.R24Hebel[i]] == 20)
+		if (kristall_spr[i][_G(spieler).R24Hebel[i]] == 20)
 			det->start_detail(5 + i * 4, 255, ANI_RUECK);
 	}
 }
 
 void r24_exit() {
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = CUR_WALK;
 	cursor_wahl(menu_item);
 	set_person_pos(263, 144, P_CHEWY, -1);
-	spieler.scrollx = 88;
+	_G(spieler).scrollx = 88;
 	_G(maus_links_click) = false;
 	flags.MainInput = true;
 }
 
 void r24_use_hebel(int16 txt_nr) {
-	if (!spieler.R24Hebel[txt_nr - 161] ||
-	        spieler.R24Hebel[txt_nr - 161] == 2) {
-		spieler.R24Hebel[txt_nr - 161] = 1;
-		spieler.R24HebelDir[txt_nr - 161] ^= 1;
+	if (!_G(spieler).R24Hebel[txt_nr - 161] ||
+	        _G(spieler).R24Hebel[txt_nr - 161] == 2) {
+		_G(spieler).R24Hebel[txt_nr - 161] = 1;
+		_G(spieler).R24HebelDir[txt_nr - 161] ^= 1;
 	} else {
-		if (spieler.R24HebelDir[txt_nr - 161])
-			spieler.R24Hebel[txt_nr - 161] = 0;
+		if (_G(spieler).R24HebelDir[txt_nr - 161])
+			_G(spieler).R24Hebel[txt_nr - 161] = 0;
 		else
-			spieler.R24Hebel[txt_nr - 161] = 2;
+			_G(spieler).R24Hebel[txt_nr - 161] = 2;
 	}
 	r24_calc_hebel_spr();
 	r24_calc_animation(txt_nr - 161);
 
-	if (spieler.R24Hebel[0] == 1 &&
-	        spieler.R24Hebel[1] == 0 &&
-	        spieler.R24Hebel[2] == 2) {
-		spieler.R16F5Exit = true;
+	if (_G(spieler).R24Hebel[0] == 1 &&
+	        _G(spieler).R24Hebel[1] == 0 &&
+	        _G(spieler).R24Hebel[2] == 2) {
+		_G(spieler).R16F5Exit = true;
 		det->enable_sound(1, 0);
 		det->disable_sound(1, 1);
 		det->start_detail(1, 1, ANI_VOR);
 		det->show_static_spr(10);
 		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
 	}
-	else if (spieler.R16F5Exit) {
+	else if (_G(spieler).R16F5Exit) {
 		det->hide_static_spr(10);
 		det->enable_sound(1, 1);
 		det->disable_sound(1, 0);
 		det->start_detail(1, 1, ANI_RUECK);
-		spieler.R16F5Exit = false;
+		_G(spieler).R16F5Exit = false;
 		atds->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
 	}
 }
@@ -3503,20 +3503,20 @@ void r24_use_hebel(int16 txt_nr) {
 void r24_calc_hebel_spr() {
 	int16 i;
 	int16 j;
-	if (!spieler.R24FirstEntry) {
-		spieler.R24FirstEntry = true;
-		spieler.R24Hebel[0] = 2;
-		spieler.R24HebelDir[0] = 0;
-		spieler.R24Hebel[1] = 1;
-		spieler.R24HebelDir[1] = 0;
-		spieler.R24Hebel[2] = 0;
-		spieler.R24HebelDir[2] = 1;
+	if (!_G(spieler).R24FirstEntry) {
+		_G(spieler).R24FirstEntry = true;
+		_G(spieler).R24Hebel[0] = 2;
+		_G(spieler).R24HebelDir[0] = 0;
+		_G(spieler).R24Hebel[1] = 1;
+		_G(spieler).R24HebelDir[1] = 0;
+		_G(spieler).R24Hebel[2] = 0;
+		_G(spieler).R24HebelDir[2] = 1;
 	}
 	for (i = 0; i < 3; i++) {
 		for (j = 0; j < 3; j++)
 			det->hide_static_spr(1 + j + i * 3);
-		det->show_static_spr(1 + spieler.R24Hebel[i] + i * 3);
-		atds->set_ats_str(166 + i, TXT_MARK_NAME, spieler.R24Hebel[i], ATS_DATEI);
+		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
+		atds->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
 	}
 }
 
@@ -3526,23 +3526,23 @@ void r24_calc_animation(int16 kristall_nr) {
 	if (kristall_nr != 255) {
 		hide_cur();
 
-		if (kristall_spr[kristall_nr][spieler.R24Hebel[kristall_nr]] == 20) {
-			if (spieler.R24KristallLast[kristall_nr] == 13) {
+		if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
+			if (_G(spieler).R24KristallLast[kristall_nr] == 13) {
 				ani_nr = 7;
 			} else {
 				ani_nr = 8;
 			}
 			det->enable_sound(ani_nr + kristall_nr * 4, 0);
 			det->disable_sound(5 + ani_nr + kristall_nr * 4, 0);
-			det->hide_static_spr(spieler.R24KristallLast[kristall_nr] + kristall_nr * 2);
+			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
 			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
 		}
 
-		else if (spieler.R24KristallLast[kristall_nr] == 20) {
+		else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 
-			if (kristall_spr[kristall_nr][spieler.R24Hebel[kristall_nr]] == 13) {
+			if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
 				ani_nr = 7;
 			} else {
 				ani_nr = 8;
@@ -3559,13 +3559,13 @@ void r24_calc_animation(int16 kristall_nr) {
 	for (i = 0; i < 6; i++)
 		det->hide_static_spr(13 + i);
 	for (i = 0; i < 3; i++) {
-		det->show_static_spr(kristall_spr[i][spieler.R24Hebel[i]] + i * 2);
-		spieler.R24KristallLast[i] = kristall_spr[i][spieler.R24Hebel[i]];
+		det->show_static_spr(kristall_spr[i][_G(spieler).R24Hebel[i]] + i * 2);
+		_G(spieler).R24KristallLast[i] = kristall_spr[i][_G(spieler).R24Hebel[i]];
 	}
 }
 
 int16 r6_cut_serv1(int16 frame) {
-	atds->print_aad(spieler.scrollx, spieler.scrolly);
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (frame == 44)
 		start_aad(108, 0);
 
@@ -3573,7 +3573,7 @@ int16 r6_cut_serv1(int16 frame) {
 }
 
 int16 r6_cut_serv2(int16 frame) {
-	atds->print_aad(spieler.scrollx, spieler.scrolly);
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (frame == 31)
 		start_aad(107, 0);
 
@@ -3581,7 +3581,7 @@ int16 r6_cut_serv2(int16 frame) {
 }
 
 int16 r12_cut_serv(int16 frame) {
-	atds->print_aad(spieler.scrollx, spieler.scrolly);
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (frame == 43)
 		start_aad(106, 0);
 
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index d59d32566d0..f61bc308e18 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -41,38 +41,38 @@ void calc_person_look() {
 }
 
 void r25_entry() {
-	if (!spieler.R29Schlauch2) {
+	if (!_G(spieler).R29Schlauch2) {
 		det->hide_static_spr(0);
 		det->hide_static_spr(1);
 	}
-	if (!spieler.R25FirstEntry) {
+	if (!_G(spieler).R25FirstEntry) {
 		hide_cur();
 		if (obj->check_inventar(TRANSLATOR_INV)) {
 			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
 			atds->set_ats_str(113, 0, ATS_DATEI);
 
 			obj->del_inventar(TRANSLATOR_INV, &room_blk);
-			spieler.inv_cur = false;
+			_G(spieler).inv_cur = false;
 			menu_item = CUR_WALK;
-			spieler.AkInvent = -1;
+			_G(spieler).AkInvent = -1;
 			cursor_wahl(menu_item);
 			del_invent_slot(TRANSLATOR_INV);
 		}
-		spieler.R25FirstEntry = true;
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).R25FirstEntry = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, FLC_MODE);
 		fx_blend = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(64, -1);
 		show_cur();
-	} else if (spieler.R25GleiterExit) {
+	} else if (_G(spieler).R25GleiterExit) {
 		set_person_pos(127, 122, P_CHEWY, P_LEFT);
-		if (spieler.R25SurimyGo < 1) {
-			++spieler.R25SurimyGo;
+		if (_G(spieler).R25SurimyGo < 1) {
+			++_G(spieler).R25SurimyGo;
 		} else {
-			spieler.R25GleiterExit = false;
+			_G(spieler).R25GleiterExit = false;
 			r25_xit_gleiter();
 		}
 	}
@@ -80,22 +80,22 @@ void r25_entry() {
 
 int16 r25_gleiter_loesch() {
 	int16 action_flag = false;
-	if (!spieler.R25GleiteLoesch && spieler.R29Schlauch2) {
-		if (!spieler.inv_cur) {
+	if (!_G(spieler).R25GleiteLoesch && _G(spieler).R29Schlauch2) {
+		if (!_G(spieler).inv_cur) {
 			action_flag = true;
-			spieler.R25GleiteLoesch = true;
+			_G(spieler).R25GleiteLoesch = true;
 			auto_move(2, P_CHEWY);
 			flic_cut(FCUT_030, FLC_MODE);
 			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			atds->set_ats_str(219, 1, ATS_DATEI);
 			atds->set_ats_str(187, 1, ATS_DATEI);
 		}
-	} else if (spieler.R25GleiteLoesch) {
+	} else if (_G(spieler).R25GleiteLoesch) {
 		if (is_cur_inventar(MILCH_LEER_INV)) {
 			action_flag = true;
 			auto_move(2, P_CHEWY);
 			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			obj->add_inventar(MILCH_WAS_INV, &room_blk);
 			inventory_2_cur(MILCH_WAS_INV);
 			start_aad_wait(253, -1);
@@ -106,10 +106,10 @@ int16 r25_gleiter_loesch() {
 
 int16 r25_use_gleiter() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur && spieler.R25GleiteLoesch) {
+	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
-		spieler.R23GleiterExit = 25;
+		_G(spieler).R23GleiterExit = 25;
 		r23_cockpit();
 	}
 	return action_flag;
@@ -129,8 +129,8 @@ MovLine r25_surimy_mpkt[2] = {
 };
 
 void r25_xit_gleiter() {
-	if (!spieler.R25SurimyLauf) {
-		spieler.R25SurimyLauf = true;
+	if (!_G(spieler).R25SurimyLauf) {
+		_G(spieler).R25SurimyLauf = true;
 		det->load_taf_seq(56, 8, 0);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
@@ -138,7 +138,7 @@ void r25_xit_gleiter() {
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
 		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = spieler.DelaySpeed + 2;
+		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 		auto_mov_obj[SURIMY_OBJ].Mode = 1;
 		init_auto_obj(SURIMY_OBJ, &r25_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 		              *)r25_surimy_mpkt);
@@ -153,40 +153,40 @@ void r25_xit_gleiter() {
 }
 
 void r27_entry() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		_G(timer_nr)[0] = room->set_timer(0, 5);
 		det->set_static_ani(0, -1);
 		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
 	} else
 		atds->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
-	spieler.PersonHide[P_HOWARD] = true;
-	spieler.ScrollxStep = 2;
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler).ScrollxStep = 2;
 }
 
 void r27_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 	hide_cur();
-	if (spieler.PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
 			start_aad_wait(175, -1);
 			room->set_timer_status(0, TIMER_STOP);
 			det->del_static_ani(0);
 			start_detail_wait(2, 1, ANI_VOR);
-			spieler.PersonRoomNr[P_HOWARD] = 28;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
-		} else if ((spieler.R27HowardGed < 3) && (eib_nr != -1)) {
-			++spieler.R27HowardGed;
+		} else if ((_G(spieler).R27HowardGed < 3) && (eib_nr != -1)) {
+			++_G(spieler).R27HowardGed;
 			start_aad_wait(174, -1);
 		}
 	}
-	spieler.PersonHide[P_HOWARD] = false;
+	_G(spieler).PersonHide[P_HOWARD] = false;
 	show_cur();
 }
 
 void r27_get_surimy() {
 	obj->calc_all_static_detail();
 	auto_move(4, P_CHEWY);
-	if (spieler.PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		start_aad_wait(171, -1);
 	}
 	obj->hide_sib(SIB_SURIMY_R27);
@@ -198,8 +198,8 @@ void r27_talk_howard() {
 }
 
 void r27_howard_ged() {
-	if (spieler.R27HowardGed < 3) {
-		++spieler.R27HowardGed;
+	if (_G(spieler).R27HowardGed < 3) {
+		++_G(spieler).R27HowardGed;
 	}
 }
 
@@ -207,42 +207,42 @@ void r28_entry(int16 eib_nr) {
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler.ScrollxStep = 2;
-	if (spieler.R28RKuerbis)
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R28RKuerbis)
 		det->show_static_spr(6);
-	if (spieler.R28Briefkasten) {
+	if (_G(spieler).R28Briefkasten) {
 		det->show_static_spr(8);
 		det->show_static_spr(9);
 	} else
 		det->show_static_spr(7);
-	if (spieler.PersonRoomNr[P_HOWARD] == 28) {
-		spieler.ZoomXy[P_HOWARD][0] = 40;
-		spieler.ZoomXy[P_HOWARD][1] = 40;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 		hide_cur();
 		SetUpScreenFunc = r28setup_func;
-		if (spieler.R40Wettbewerb) {
+		if (_G(spieler).R40Wettbewerb) {
 
-			spieler.scrollx = 320;
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).scrollx = 320;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			r28_haendler();
-			spieler.R40Wettbewerb = false;
+			_G(spieler).R40Wettbewerb = false;
 		} else {
 			switch (eib_nr) {
 			case 55:
-				if (!spieler.R28EntryHaus) {
+				if (!_G(spieler).R28EntryHaus) {
 
-					spieler.R28EntryHaus = true;
+					_G(spieler).R28EntryHaus = true;
 					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
 					auto_move(3, P_HOWARD);
 					go_auto_xy(320, spieler_vector[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
 					start_aad_wait(176, -1);
-				} else if (spieler.R31SurFurz && !spieler.R28RKuerbis) {
-					spieler.R28RKuerbis = true;
-					spieler.ScrollxStep = 2;
+				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
+					_G(spieler).R28RKuerbis = true;
+					_G(spieler).ScrollxStep = 2;
 					auto_move(6, P_CHEWY);
 					wait_show_screen(10);
 					start_aad_wait(194, -1);
-					spieler.room_e_obj[62].Attribut = 255;
+					_G(spieler).room_e_obj[62].Attribut = 255;
 					atds->set_ats_str(208, 1, ATS_DATEI);
 					flags.NoScroll = true;
 					auto_scroll(0, 0);
@@ -251,27 +251,27 @@ void r28_entry(int16 eib_nr) {
 					flc->remove_flic_user_function();
 					det->show_static_spr(6);
 					flags.NoScroll = false;
-					if (!spieler.R40TeilKarte) {
+					if (!_G(spieler).R40TeilKarte) {
 						wait_show_screen(50);
 						start_aad_wait(195, -1);
 					} else {
 						r28_haendler();
 					}
-					spieler.ScrollxStep = 1;
+					_G(spieler).ScrollxStep = 1;
 				}
 				break;
 
 			case 70:
 			case 77:
-				if (spieler.R28PostCar) {
-					spieler.R28PostCar = false;
+				if (_G(spieler).R28PostCar) {
+					_G(spieler).R28PostCar = false;
 					out->setze_zeiger(0);
 					out->cls();
 					flic_cut(FCUT_063, FLC_MODE);
-					spieler.R28ChewyPump = false;
+					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
 					atds->set_ats_str(209, 0, ATS_DATEI);
-					spieler.room_e_obj[69].Attribut = 255;
+					_G(spieler).room_e_obj[69].Attribut = 255;
 					load_chewy_taf(CHEWY_NORMAL);
 
 					set_person_pos(480, 118, P_HOWARD, P_LEFT);
@@ -298,19 +298,19 @@ void r28_entry(int16 eib_nr) {
 }
 
 void r28_exit(int16 eib_nr) {
-	spieler.R28PostCar = false;
-	spieler.ScrollxStep = 1;
+	_G(spieler).R28PostCar = false;
+	_G(spieler).ScrollxStep = 1;
 	hide_cur();
-	if (spieler.PersonRoomNr[P_HOWARD] == 28) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
 		if (eib_nr == 69) {
 			SetUpScreenFunc = 0;
-			if (!spieler.R28ExitTown) {
+			if (!_G(spieler).R28ExitTown) {
 				start_aad_wait(178, -1);
-				spieler.R28ExitTown = true;
+				_G(spieler).R28ExitTown = true;
 			}
 			flags.ExitMov = false;
 			auto_move(6, P_HOWARD);
-			spieler.PersonRoomNr[P_HOWARD] = 40;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 		}
 	}
 	show_cur();
@@ -319,10 +319,10 @@ void r28_exit(int16 eib_nr) {
 void r28_haendler() {
 	hide_cur();
 	SetUpScreenFunc = 0;
-	spieler.R28ChewyPump = true;
+	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
 	atds->set_ats_str(209, 1, ATS_DATEI);
-	spieler.room_e_obj[69].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
 	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
 	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
@@ -359,11 +359,11 @@ void r28setup_func() {
 void r28_use_surimy() {
 	int16 dia_nr;
 	int16 ani_nr;
-	if (!spieler.R28SurimyCar) {
+	if (!_G(spieler).R28SurimyCar) {
 		hide_cur();
 		flags.NoScroll = true;
 		auto_scroll(0, 0);
-		spieler.R28SurimyCar = true;
+		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		flc->set_flic_user_function(r28_cut_serv2);
 		flic_cut(FCUT_055, FLC_MODE);
@@ -390,12 +390,12 @@ void r28_use_surimy() {
 void r28_set_pump() {
 	int16 tmp;
 	hide_cur();
-	if (spieler.PersonRoomNr[P_CHEWY] == 28) {
+	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
 			if (spieler_vector[P_CHEWY].Xypos[0] < 380)
 				auto_move(5, P_CHEWY);
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			if (person_end_phase[P_CHEWY] == P_RIGHT)
 				tmp = 1;
 			else
@@ -403,25 +403,25 @@ void r28_set_pump() {
 			del_inventar(K_MASKE_INV);
 			det->
 			set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			if (spieler.R28PumpTxt1 < 3) {
+			if (_G(spieler).R28PumpTxt1 < 3) {
 				start_aad(137);
-				++spieler.R28PumpTxt1;
+				++_G(spieler).R28PumpTxt1;
 			}
 			start_detail_wait(tmp, 1, ANI_VOR);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			load_chewy_taf(CHEWY_PUMPKIN);
-			spieler.R28ChewyPump = true;
-			if (spieler.R39TransMensch) {
-				spieler.room_e_obj[69].Attribut = AUSGANG_OBEN;
+			_G(spieler).R28ChewyPump = true;
+			if (_G(spieler).R39TransMensch) {
+				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 			} else
 				atds->set_ats_str(209, 1, ATS_DATEI);
-			if (spieler.PersonRoomNr[P_HOWARD] == 28 && spieler.R28PumpTxt < 3) {
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
 				stop_person(P_HOWARD);
 				SetUpScreenFunc = 0;
 				start_aad_wait(177, -1);
 				SetUpScreenFunc = r28setup_func;
-				++spieler.R28PumpTxt;
+				++_G(spieler).R28PumpTxt;
 			}
 			flags.AutoAniPlay = false;
 		}
@@ -433,11 +433,11 @@ void r28_set_pump() {
 
 void r28_get_pump() {
 	int16 tmp;
-	if (spieler.R28ChewyPump) {
+	if (_G(spieler).R28ChewyPump) {
 		hide_cur();
 		stop_person(P_CHEWY);
-		spieler.R28ChewyPump = false;
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).R28ChewyPump = false;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		if (person_end_phase[P_CHEWY] == P_RIGHT)
 			tmp = 1;
 		else
@@ -446,10 +446,10 @@ void r28_get_pump() {
 		start_detail_wait(tmp, 1, ANI_RUECK);
 		invent_2_slot(K_MASKE_INV);
 		atds->set_ats_str(209, 0, ATS_DATEI);
-		spieler.room_e_obj[69].Attribut = 255;
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).room_e_obj[69].Attribut = 255;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		load_chewy_taf(CHEWY_NORMAL);
-		if (spieler.R28PumpTxt1 < 3) {
+		if (_G(spieler).R28PumpTxt1 < 3) {
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(138, -1);
 		}
@@ -459,10 +459,10 @@ void r28_get_pump() {
 
 int16 r28_use_breifkasten() {
 	int16 action_flag = false;
-	if (spieler.R28Briefkasten && !spieler.inv_cur) {
+	if (_G(spieler).R28Briefkasten && !_G(spieler).inv_cur) {
 		action_flag = true;
 		hide_cur();
-		spieler.R28Briefkasten = false;
+		_G(spieler).R28Briefkasten = false;
 		auto_move(7, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		det->hide_static_spr(8);
@@ -474,13 +474,13 @@ int16 r28_use_breifkasten() {
 		atds->set_ats_str(206, 0, ATS_DATEI);
 		show_cur();
 		invent_2_slot(MANUSKRIPT_INV);
-		spieler.R28Manuskript = true;
+		_G(spieler).R28Manuskript = true;
 	}
 	return action_flag;
 }
 
 int16 r28_cut_serv(int16 frame) {
-	if (spieler.R28Briefkasten) {
+	if (_G(spieler).R28Briefkasten) {
 		det->plot_static_details(0, 0, 8, 9);
 	} else {
 		det->plot_static_details(0, 0, 7, 7);
@@ -490,7 +490,7 @@ int16 r28_cut_serv(int16 frame) {
 
 int16 r28_cut_serv2(int16 frame) {
 	if (frame < 23) {
-		if (spieler.R28Briefkasten) {
+		if (_G(spieler).R28Briefkasten) {
 			det->plot_static_details(0, 0, 8, 9);
 		} else {
 			det->plot_static_details(0, 0, 7, 7);
@@ -500,13 +500,13 @@ int16 r28_cut_serv2(int16 frame) {
 }
 
 void r29_entry() {
-	if (spieler.R29Schlauch1)
+	if (_G(spieler).R29Schlauch1)
 		det->show_static_spr(7);
-	else if (spieler.R29Schlauch2) {
+	else if (_G(spieler).R29Schlauch2) {
 		det->show_static_spr(8);
 		det->show_static_spr(10);
 	}
-	if (spieler.R29AutoSitz)
+	if (_G(spieler).R29AutoSitz)
 		det->show_static_spr(9);
 }
 
@@ -518,17 +518,17 @@ void r29_exit() {
 
 int16 r29_use_pumpe() {
 	int16 action_flag = false;
-	if (!spieler.R29Pumpe) {
+	if (!_G(spieler).R29Pumpe) {
 		action_flag = true;
 		if (is_cur_inventar(SCHLAUCH_INV)) {
-			spieler.R29Pumpe = true;
-			spieler.R29Schlauch1 = true;
+			_G(spieler).R29Pumpe = true;
+			_G(spieler).R29Schlauch1 = true;
 			auto_move(1, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			det->show_static_spr(7);
 			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
-		} else if (!spieler.inv_cur)
+		} else if (!_G(spieler).inv_cur)
 			start_aad_wait(62, -1);
 	}
 	return action_flag;
@@ -536,7 +536,7 @@ int16 r29_use_pumpe() {
 
 int16 r29_get_schlauch() {
 	int16 action_flag = false;
-	if (spieler.R29Schlauch1 && !spieler.inv_cur) {
+	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
@@ -550,24 +550,24 @@ void r29_use_schlauch() {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		det->hide_static_spr(7);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(4, 1, ANI_VOR);
 		det->show_static_spr(8);
 		det->show_static_spr(10);
 		atds->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->set_ats_str(218, 1, ATS_DATEI);
-		spieler.R29Schlauch1 = false;
-		spieler.R29Schlauch2 = true;
+		_G(spieler).R29Schlauch1 = false;
+		_G(spieler).R29Schlauch2 = true;
 		del_inventar(PUMPE_INV);
 		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 }
 
 void r29_schlitz_sitz() {
-	if (!spieler.R29AutoSitz) {
-		spieler.R29AutoSitz = true;
-		spieler.PersonHide[P_CHEWY] = true;
+	if (!_G(spieler).R29AutoSitz) {
+		_G(spieler).R29AutoSitz = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->hide_static_spr(4);
 		start_aad(63);
 		start_ani_block(4, ablock26);
@@ -577,23 +577,23 @@ void r29_schlitz_sitz() {
 		}
 		det->stop_detail(2);
 		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
 	}
 }
 
 int16 r29_zaun_sprung() {
 	int16 action_flag = false;
-	if (spieler.R29AutoSitz && !spieler.inv_cur) {
+	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(3, 1, ANI_VOR, 7);
 		det->hide_static_spr(9);
 		start_ani_block(5, ablock27);
 		set_up_screen(DO_SETUP);
 		switch_room(37);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 	return action_flag;
 }
@@ -617,10 +617,10 @@ void r31_entry() {
 }
 
 void r31_surimy_go() {
-	if (!spieler.R39ScriptOk) {
-		if (spieler.R31SurimyGo >= 3) {
+	if (!_G(spieler).R39ScriptOk) {
+		if (_G(spieler).R31SurimyGo >= 3) {
 			hide_cur();
-			spieler.R31SurimyGo = 0;
+			_G(spieler).R31SurimyGo = 0;
 			det->load_taf_seq(39, 8, 0);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
@@ -628,7 +628,7 @@ void r31_surimy_go() {
 			mov_phasen[SURIMY_OBJ].Repeat = 1;
 			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = spieler.DelaySpeed + 2;
+			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = 1;
 			init_auto_obj(SURIMY_OBJ, &surimy_taf19_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 			              *)r31_surimy_mpkt);
@@ -638,41 +638,41 @@ void r31_surimy_go() {
 			_G(auto_obj) = 0;
 			show_cur();
 		} else
-			++spieler.R31SurimyGo;
+			++_G(spieler).R31SurimyGo;
 	}
 }
 
 void r31_calc_luke() {
 	int16 i;
-	if (!spieler.R31KlappeZu) {
+	if (!_G(spieler).R31KlappeZu) {
 		for (i = 0; i < 3; i++)
 			det->show_static_spr(5 + i);
 		atds->set_ats_str(244, 1, ATS_DATEI);
 		atds->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.room_e_obj[75].Attribut = AUSGANG_UNTEN;
+		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
 	} else {
 		for (i = 0; i < 3; i++)
 			det->hide_static_spr(5 + i);
 		atds->set_ats_str(244, 0, ATS_DATEI);
 		atds->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.room_e_obj[75].Attribut = 255;
+		_G(spieler).room_e_obj[75].Attribut = 255;
 	}
 }
 
 void r31_open_luke() {
-	if (spieler.R31KlappeZu) {
+	if (_G(spieler).R31KlappeZu) {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-		spieler.R31KlappeZu = false;
+		_G(spieler).R31KlappeZu = false;
 		r31_calc_luke();
 	}
 }
 
 void r31_close_luke() {
-	if (!spieler.R31KlappeZu) {
+	if (!_G(spieler).R31KlappeZu) {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		spieler.R31KlappeZu = true;
+		_G(spieler).R31KlappeZu = true;
 		r31_calc_luke();
 	}
 }
@@ -683,24 +683,24 @@ int16 r31_use_topf() {
 	int16 action_flag = false;
 
 	hide_cur();
-	if (spieler.inv_cur) {
-		if (spieler.R31PflanzeWeg) {
+	if (_G(spieler).inv_cur) {
+		if (_G(spieler).R31PflanzeWeg) {
 			if (is_cur_inventar(K_KERNE_INV)) {
-				spieler.R31KoernerDa = true;
+				_G(spieler).R31KoernerDa = true;
 				auto_move(1, P_CHEWY);
 				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
 				atds->set_ats_str(242, 2, ATS_DATEI);
 			} else if (is_cur_inventar(MILCH_WAS_INV)) {
-				if (spieler.R31KoernerDa) {
-					spieler.R31Wasser = true;
+				if (_G(spieler).R31KoernerDa) {
+					_G(spieler).R31Wasser = true;
 					auto_move(1, P_CHEWY);
-					spieler.PersonHide[P_CHEWY] = true;
+					_G(spieler).PersonHide[P_CHEWY] = true;
 					start_ani_block(3, ablock30);
-					spieler.PersonHide[P_CHEWY] = false;
-					del_inventar(spieler.AkInvent);
+					_G(spieler).PersonHide[P_CHEWY] = false;
+					del_inventar(_G(spieler).AkInvent);
 					obj->add_inventar(MILCH_LEER_INV, &room_blk);
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
@@ -711,16 +711,16 @@ int16 r31_use_topf() {
 					dia_nr = 152;
 				}
 			} else if (is_cur_inventar(SURIMY_INV)) {
-				if (!spieler.R31SurFurz) {
-					if (spieler.R31Wasser) {
-						if (!spieler.R28SurimyCar) {
+				if (!_G(spieler).R31SurFurz) {
+					if (_G(spieler).R31Wasser) {
+						if (!_G(spieler).R28SurimyCar) {
 							ani_nr = CH_TALK5;
 							dia_nr = 180;
 						} else {
 							r31_close_luke();
 							auto_move(3, P_CHEWY);
 							flic_cut(FCUT_046, FLC_MODE);
-							spieler.R31SurFurz = true;
+							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
 							dia_nr = 156;
 							atds->set_ats_str(242, 4, ATS_DATEI);
@@ -750,9 +750,9 @@ int16 r31_use_topf() {
 }
 
 void r32_entry() {
-	if (spieler.R32HowardWeg)
+	if (_G(spieler).R32HowardWeg)
 		det->hide_static_spr(0);
-	if (!spieler.R32Script && spieler.R32UseSchreib) {
+	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
 		det->show_static_spr(5);
 	}
 }
@@ -763,7 +763,7 @@ int16 r32_use_howard() {
 	int16 action_flag = false;
 	hide_cur();
 	if (is_cur_inventar(TRICHTER_INV)) {
-		if (spieler.R33MunterGet) {
+		if (_G(spieler).R33MunterGet) {
 			auto_move(1, P_CHEWY);
 			cur_2_inventory();
 			obj->del_inventar(MUNTER_INV, &room_blk);
@@ -789,8 +789,8 @@ int16 r32_use_howard() {
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			ani_nr = CH_TALK3;
 			dia_nr = 164;
-			spieler.R32HowardWeg = true;
-			spieler.R39HowardDa = true;
+			_G(spieler).R32HowardWeg = true;
+			_G(spieler).R39HowardDa = true;
 		} else {
 			ani_nr = CH_TALK12;
 			dia_nr = 73;
@@ -813,27 +813,27 @@ void r32_use_schreibmaschine() {
 	int16 ani_nr = -1;
 
 	hide_cur();
-	if (spieler.R32HowardWeg) {
-		if (spieler.inv_cur) {
-			switch (spieler.AkInvent) {
+	if (_G(spieler).R32HowardWeg) {
+		if (_G(spieler).inv_cur) {
+			switch (_G(spieler).AkInvent) {
 			case PAPIER_INV:
 				auto_move(2, P_CHEWY);
-				spieler.R32PapierOk = true;
+				_G(spieler).R32PapierOk = true;
 				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
 				ani_nr = CH_TALK3;
 				dia_nr = 86;
 				break;
 
 			case CYB_KRONE_INV:
-				if (!spieler.R32UseSchreib) {
-					if (!spieler.R32PapierOk) {
+				if (!_G(spieler).R32UseSchreib) {
+					if (!_G(spieler).R32PapierOk) {
 						ani_nr = CH_TALK12;
 						dia_nr = 87;
 					} else {
 						auto_move(3, P_CHEWY);
-						spieler.R32UseSchreib = true;
+						_G(spieler).R32UseSchreib = true;
 						cur_2_inventory();
 						flic_cut(FCUT_044, FLC_MODE);
 						det->show_static_spr(5);
@@ -866,10 +866,10 @@ void r32_use_schreibmaschine() {
 
 int16 r32_get_script() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (!spieler.R32Script && spieler.R32UseSchreib) {
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
 			action_flag = true;
-			spieler.R32Script = true;
+			_G(spieler).R32Script = true;
 			auto_move(4, P_CHEWY);
 			invent_2_slot(MANUSKRIPT_INV);
 			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
@@ -883,7 +883,7 @@ int16 r32_get_script() {
 }
 
 void r33_entry() {
-	if (spieler.R33MunterGet)
+	if (_G(spieler).R33MunterGet)
 		det->hide_static_spr(3);
 	r33_surimy_go();
 }
@@ -894,10 +894,10 @@ MovLine r33_surimy_mpkt[2] = {
 };
 
 void r33_surimy_go() {
-	if (!spieler.R39ScriptOk) {
-		if (spieler.R33SurimyGo >= 4) {
+	if (!_G(spieler).R39ScriptOk) {
+		if (_G(spieler).R33SurimyGo >= 4) {
 			hide_cur();
-			spieler.R33SurimyGo = 0;
+			_G(spieler).R33SurimyGo = 0;
 			det->load_taf_seq(39, 8, 0);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
@@ -905,7 +905,7 @@ void r33_surimy_go() {
 			mov_phasen[SURIMY_OBJ].Repeat = 1;
 			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = spieler.DelaySpeed + 2;
+			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = 1;
 			init_auto_obj(SURIMY_OBJ, &surimy_taf19_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
 			              *)r33_surimy_mpkt);
@@ -915,13 +915,13 @@ void r33_surimy_go() {
 			_G(auto_obj) = 0;
 			show_cur();
 		} else
-			++spieler.R33SurimyGo;
+			++_G(spieler).R33SurimyGo;
 	}
 }
 
 void r33_look_schublade() {
-	if (!spieler.R33SchubFirst) {
-		spieler.R33SchubFirst = true;
+	if (!_G(spieler).R33SchubFirst) {
+		_G(spieler).R33SchubFirst = true;
 		auto_move(1, P_CHEWY);
 		atds->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
 		atds->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
@@ -930,10 +930,10 @@ void r33_look_schublade() {
 
 int16 r33_use_schublade() {
 	int16 action_flag = false;
-	if (spieler.R33SchubFirst && !spieler.inv_cur) {
-		if (!spieler.R33Messer) {
+	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur) {
+		if (!_G(spieler).R33Messer) {
 			action_flag = true;
-			spieler.R33Messer = true;
+			_G(spieler).R33Messer = true;
 			atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
 			atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
 			atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
@@ -952,25 +952,25 @@ void r33_use_maschine() {
 	action = true;
 	hocker = false;
 	hide_cur();
-	if (!spieler.R33MunterOk) {
+	if (!_G(spieler).R33MunterOk) {
 		auto_move(4, P_CHEWY);
-		if (spieler.inv_cur) {
-			switch (spieler.AkInvent) {
+		if (_G(spieler).inv_cur) {
+			switch (_G(spieler).AkInvent) {
 			case K_FLEISCH_INV:
-				spieler.R33Munter[1] = true;
+				_G(spieler).R33Munter[1] = true;
 				break;
 
 			case MILCH_INV:
-				spieler.R33Munter[3] = true;
+				_G(spieler).R33Munter[3] = true;
 				invent_2_slot(MILCH_LEER_INV);
 				break;
 
 			case KAFFEE_INV:
-				spieler.R33Munter[0] = true;
+				_G(spieler).R33Munter[0] = true;
 				break;
 
 			case EIER_INV:
-				spieler.R33Munter[2] = true;
+				_G(spieler).R33Munter[2] = true;
 				break;
 
 			default:
@@ -979,16 +979,16 @@ void r33_use_maschine() {
 
 			}
 			if (action) {
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_detail_wait(0, 1, ANI_VOR);
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 				set_person_pos(128, 65, P_CHEWY, P_LEFT);
 				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 				hocker = true;
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK12;
 				if (r33_calc_muntermacher()) {
-					spieler.R33MunterOk = true;
+					_G(spieler).R33MunterOk = true;
 					dia_nr = 69;
 				} else {
 					dia_nr = 67;
@@ -1003,21 +1003,21 @@ void r33_use_maschine() {
 		}
 		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
-		if (spieler.R33MunterOk) {
-			spieler.PersonHide[P_CHEWY] = true;
+		if (_G(spieler).R33MunterOk) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(2, 1, ANI_VOR);
 			flic_cut(FCUT_031, FLC_MODE);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(71, -1);
 			atds->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 		if (hocker) {
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(1, 1, ANI_VOR);
 			set_person_pos(64, 100, P_CHEWY, P_LEFT);
 		}
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
 		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(70, -1);
@@ -1030,7 +1030,7 @@ int16 r33_calc_muntermacher() {
 	int16 i;
 	ret = true;
 	for (i = 0; i < 4; i++) {
-		if (spieler.R33Munter[i] == false)
+		if (_G(spieler).R33Munter[i] == false)
 			ret = false;
 	}
 	return ret;
@@ -1038,10 +1038,10 @@ int16 r33_calc_muntermacher() {
 
 int16 r33_get_munter() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (!spieler.R33MunterGet && spieler.R33MunterOk) {
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
 			action_flag = true;
-			spieler.R33MunterGet = true;
+			_G(spieler).R33MunterGet = true;
 			auto_move(4, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			invent_2_slot(MUNTER_INV);
@@ -1059,7 +1059,7 @@ void r34_use_kuehlschrank() {
 		auto_move(3, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 	}
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	flags.ChewyDontGo = true;
 	if (!flags.LoadGame) {
 		switch_room(34);
@@ -1068,7 +1068,7 @@ void r34_use_kuehlschrank() {
 }
 
 void r34_xit_kuehlschrank() {
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(54, 111, P_CHEWY, -1);
 	switch_room(33);
 	flags.ChewyDontGo = false;
@@ -1076,32 +1076,32 @@ void r34_xit_kuehlschrank() {
 }
 
 void r35_entry() {
-	if (spieler.R35Schublade)
+	if (_G(spieler).R35Schublade)
 		det->show_static_spr(1);
 }
 
 int16 r35_schublade() {
 	int16 action_flag = false;
 	hide_cur();
-	if (!spieler.inv_cur) {
-		if (!spieler.R35Schublade) {
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R35Schublade) {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			det->show_static_spr(1);
-			spieler.R35Schublade = true;
+			_G(spieler).R35Schublade = true;
 			atds->set_ats_str(234, 1, ATS_DATEI);
-		} else if (!spieler.R35Falle) {
+		} else if (!_G(spieler).R35Falle) {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
-			spieler.R35Falle = true;
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).R35Falle = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(2, ablock28);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(33, 90, P_CHEWY, P_LEFT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(93, -1);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			atds->set_ats_str(234, 2, ATS_DATEI);
 		}
 	}
@@ -1115,7 +1115,7 @@ int16 r35_use_cat() {
 	if (is_cur_inventar(TRANSLATOR_INV)) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
-		spieler.R35TransCat = true;
+		_G(spieler).R35TransCat = true;
 		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 		flic_cut(FCUT_045, FLC_MODE);
 		start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
@@ -1124,9 +1124,9 @@ int16 r35_use_cat() {
 		action_flag = true;
 		disable_timer();
 		auto_move(4, P_CHEWY);
-		spieler.R35CatEat = true;
+		_G(spieler).R35CatEat = true;
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		det->stop_detail(0);
 		det->del_static_ani(0);
 		start_detail_wait(1, 1, ANI_VOR);
@@ -1151,16 +1151,16 @@ int16 r35_use_cat() {
 void r35_talk_cat() {
 	int16 dia_nr;
 	auto_move(4, P_CHEWY);
-	if (spieler.R35TransCat) {
-		if (!spieler.R35CatEat) {
+	if (_G(spieler).R35TransCat) {
+		if (!_G(spieler).R35CatEat) {
 			dia_nr = 7;
 		} else {
 			dia_nr = 8;
 		}
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(36);
 		start_ads_wait(dia_nr);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		switch_room(35);
 	} else {
 		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
@@ -1174,32 +1174,32 @@ void r37_entry() {
 	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = r37_setup_func;
 	if (!flags.LoadGame) {
-		spieler.scrollx = 124;
+		_G(spieler).scrollx = 124;
 		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
 	}
-	if (!spieler.R37Kloppe) {
+	if (!_G(spieler).R37Kloppe) {
 		_G(timer_nr)[1] = room->set_timer(7, 5);
 		det->set_static_ani(7, -1);
-		if (!spieler.R37HundScham) {
+		if (!_G(spieler).R37HundScham) {
 			_G(timer_nr)[0] = room->set_timer(3, 4);
 			det->set_static_ani(3, -1);
 		}
 	}
-	if (spieler.R37Gebiss) {
+	if (_G(spieler).R37Gebiss) {
 		det->hide_static_spr(9);
-		if (spieler.R37Kloppe) {
+		if (_G(spieler).R37Kloppe) {
 			det->hide_static_spr(8);
-		} else if (spieler.R37HundScham)
+		} else if (_G(spieler).R37HundScham)
 			det->show_static_spr(0);
 	}
 }
 
 void r37_setup_func() {
 	if (_G(maus_links_click) &&
-	        !spieler.R37Kloppe &&
+	        !_G(spieler).R37Kloppe &&
 	        menu_item == CUR_WALK) {
-		if ((minfo.x + spieler.scrollx > 380 && minfo.y > 120) ||
-		        (minfo.x + spieler.scrollx > 482)) {
+		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
+		        (minfo.x + _G(spieler).scrollx > 482)) {
 			auto_move(7, P_CHEWY);
 			_G(maus_links_click) = false;
 		}
@@ -1208,7 +1208,7 @@ void r37_setup_func() {
 
 short r37_use_wippe() {
 	int16 action_flag = false;
-	if (spieler.inv_cur) {
+	if (_G(spieler).inv_cur) {
 		action_flag = true;
 		if (is_cur_inventar(H_FUTTER_INV)) {
 			hide_cur();
@@ -1217,13 +1217,13 @@ short r37_use_wippe() {
 			auto_scroll(129, 0);
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(159, -1);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			flc->set_flic_user_function(r37_cut_serv1);
 			flic_cut(FCUT_047, FLC_MODE);
 			flc->remove_flic_user_function();
 			flags.NoScroll = false;
 			show_cur();
-			spieler.scrollx = 269;
+			_G(spieler).scrollx = 269;
 			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
 			switch_room(29);
 			_G(maus_links_click) = false;
@@ -1238,8 +1238,8 @@ short r37_use_wippe() {
 int16 r37_cut_serv1(int16 frame) {
 	int16 static_nr;
 	int16 static_nr1;
-	if (!spieler.R37Kloppe) {
-		if (!spieler.R37Gebiss) {
+	if (!_G(spieler).R37Kloppe) {
+		if (!_G(spieler).R37Gebiss) {
 			static_nr = 9;
 			static_nr1 = 11;
 			det->show_static_spr(11);
@@ -1247,12 +1247,12 @@ int16 r37_cut_serv1(int16 frame) {
 			static_nr = 8;
 			static_nr1 = 0;
 		}
-		det->plot_static_details(spieler.scrollx, spieler.scrolly, static_nr, static_nr);
-		det->plot_static_details(spieler.scrollx, spieler.scrolly, static_nr1, static_nr1);
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
 	}
 
-	det->plot_static_details(spieler.scrollx, spieler.scrolly, 7, 7);
-	det->plot_static_details(spieler.scrollx, spieler.scrolly, 14, 14);
+	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
+	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
 	return 0;
 }
 
@@ -1262,13 +1262,13 @@ int16 r37_cut_serv2(int16 frame) {
 	det->show_static_spr(12);
 	det->show_static_spr(10);
 	for (i = 0; i < 4; i++)
-		det->plot_static_details(spieler.scrollx, spieler.scrolly, static_nr[i], static_nr[i]);
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr[i], static_nr[i]);
 	return 0;
 }
 
 int16 r37_use_glas() {
 	int16 action_flag = false;
-	if (!spieler.R37Gebiss) {
+	if (!_G(spieler).R37Gebiss) {
 		if (is_cur_inventar(ANGEL2_INV)) {
 			action_flag = true;
 			flags.NoScroll = true;
@@ -1278,7 +1278,7 @@ int16 r37_use_glas() {
 			auto_scroll(146, 0);
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(147, -1);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			flc->set_flic_user_function(r37_cut_serv2);
 			flic_cut(FCUT_048, FLC_MODE);
 			flc->remove_flic_user_function();
@@ -1289,7 +1289,7 @@ int16 r37_use_glas() {
 			atds->set_ats_str(256, 1, ATS_DATEI);
 			atds->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
 			obj->show_sib(SIB_HFUTTER2_R37);
-			spieler.R37Gebiss = true;
+			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(146, -1);
 			show_cur();
@@ -1308,7 +1308,7 @@ void r37_dog_bell() {
 	hide_cur();
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
-		if (!spieler.R37Gebiss) {
+		if (!_G(spieler).R37Gebiss) {
 			stop_person(P_CHEWY);
 			flags.ChAutoMov = false;
 			set_person_spr(P_LEFT, P_CHEWY);
@@ -1320,20 +1320,20 @@ void r37_dog_bell() {
 			start_detail_wait(5, 1, ANI_VOR);
 			det->hide_static_spr(9);
 			start_detail_wait(6, 1, ANI_VOR);
-			spieler.PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
 			det->start_detail(11, 255, ANI_VOR);
 			flic_cut(FCUT_050, FLC_MODE);
 			start_detail_wait(6, 1, ANI_RUECK);
 			det->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
-			spieler.PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_CHEWY] = false;
 			det->show_static_spr(9);
 			start_ani_block(3, ablock31);
 			det->set_static_ani(3, -1);
 			enable_timer();
 			dia_nr = 149;
 			ani_nr = CH_TALK12;
-		} else if (!spieler.R37HundScham) {
+		} else if (!_G(spieler).R37HundScham) {
 			stop_person(P_CHEWY);
 			set_person_spr(P_LEFT, P_CHEWY);
 			flags.NoScroll = true;
@@ -1343,11 +1343,11 @@ void r37_dog_bell() {
 			det->stop_detail(3);
 			start_detail_wait(4, 1, ANI_VOR);
 			flic_cut(FCUT_051, FLC_MODE);
-			spieler.scrollx = 104;
+			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054, FLC_MODE);
 			flic_cut(FCUT_054, FLC_MODE);
 			det->show_static_spr(0);
-			spieler.R37HundScham = true;
+			_G(spieler).R37HundScham = true;
 			dia_nr = 148;
 			ani_nr = CH_TALK6;
 		}
@@ -1363,7 +1363,7 @@ void r37_dog_bell() {
 
 void r37_talk_hahn() {
 	auto_move(7, P_CHEWY);
-	if (!spieler.R37TransHahn) {
+	if (!_G(spieler).R37TransHahn) {
 		start_aad_wait(145, -1);
 	} else {
 		r37_hahn_dia();
@@ -1374,7 +1374,7 @@ void r37_use_hahn() {
 	if (is_cur_inventar(TRANSLATOR_INV)) {
 		hide_cur();
 		auto_move(7, P_CHEWY);
-		spieler.R37TransHahn = true;
+		_G(spieler).R37TransHahn = true;
 		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 		flic_cut(FCUT_052, FLC_MODE);
 		cur_2_inventory();
@@ -1382,9 +1382,9 @@ void r37_use_hahn() {
 		cursor_wahl(menu_item);
 		show_cur();
 		r37_hahn_dia();
-	} else if (spieler.R37TransHahn) {
+	} else if (_G(spieler).R37TransHahn) {
 		if (is_cur_inventar(GEBISS_INV)) {
-			spieler.R37Kloppe = true;
+			_G(spieler).R37Kloppe = true;
 			hide_cur();
 			auto_move(6, P_CHEWY);
 			load_room_music(256);
@@ -1405,7 +1405,7 @@ void r37_use_hahn() {
 			auto_move(8, P_CHEWY);
 			flic_cut(FCUT_053, FLC_MODE);
 			det->stop_detail(10);
-			spieler.scrollx = 320;
+			_G(spieler).scrollx = 320;
 			flags.NoScroll = false;
 			atds->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
 			atds->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
@@ -1417,7 +1417,7 @@ void r37_use_hahn() {
 			inventory_2_cur(EIER_INV);
 			show_cur();
 		}
-	} else if (spieler.inv_cur) {
+	} else if (_G(spieler).inv_cur) {
 		start_aad_wait(143, -1);
 	}
 }
@@ -1425,17 +1425,17 @@ void r37_use_hahn() {
 void r37_hahn_dia() {
 	int16 tmp_scrollx;
 	int16 tmp_scrolly;
-	spieler.PersonHide[P_CHEWY] = true;
-	tmp_scrollx = spieler.scrollx;
-	tmp_scrolly = spieler.scrolly;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	tmp_scrollx = _G(spieler).scrollx;
+	tmp_scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	switch_room(38);
 	start_ads_wait(9);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	flags.LoadGame = true;
-	spieler.scrollx = tmp_scrollx;
-	spieler.scrolly = tmp_scrolly;
+	_G(spieler).scrollx = tmp_scrollx;
+	_G(spieler).scrolly = tmp_scrolly;
 	switch_room(37);
 	flags.LoadGame = false;
 }
@@ -1450,10 +1450,10 @@ uint8 tv_flic[] = {
 };
 
 void r39_entry() {
-	if (!spieler.R41Einbruch) {
-		if (spieler.R39HowardDa) {
+	if (!_G(spieler).R41Einbruch) {
+		if (_G(spieler).R39HowardDa) {
 			det->show_static_spr(10);
-			if (!spieler.R39HowardWach)
+			if (!_G(spieler).R39HowardWach)
 				det->start_detail(1, 255, ANI_VOR);
 			else
 				det->set_static_ani(5, -1);
@@ -1469,20 +1469,20 @@ short r39_use_howard() {
 	int16 ani_nr = 0;
 	int16 action_flag = false;
 
-	if (!spieler.R39HowardWach) {
-		if (spieler.inv_cur) {
+	if (!_G(spieler).R39HowardWach) {
+		if (_G(spieler).inv_cur) {
 			if (is_cur_inventar(MANUSKRIPT_INV)) {
 				hide_cur();
-				spieler.R39HowardWach = true;
-				spieler.R39ScriptOk = true;
+				_G(spieler).R39HowardWach = true;
+				_G(spieler).R39ScriptOk = true;
 				auto_move(3, P_CHEWY);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->start_detail(6, 255, ANI_VOR);
 				start_aad_wait(170, -1);
 				det->stop_detail(6);
 				start_detail_wait(7, 1, ANI_VOR);
-				spieler.PersonHide[P_CHEWY] = false;
-				del_inventar(spieler.AkInvent);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				del_inventar(_G(spieler).AkInvent);
 				det->stop_detail(1);
 				start_ani_block(2, ablock33);
 				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
@@ -1493,10 +1493,10 @@ short r39_use_howard() {
 				atds->set_ats_str(62, 1, ATS_DATEI);
 				start_aad_wait(169, -1);
 				show_cur();
-				spieler.PersonGlobalDia[P_HOWARD] = 10012;
-				spieler.PersonDiaRoom[P_HOWARD] = true;;
+				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
 				calc_person_dia(P_HOWARD);
-				if (spieler.R41HowardDiaOK) {
+				if (_G(spieler).R41HowardDiaOK) {
 					r39_ok();
 				}
 				dia_nr = -1;
@@ -1519,12 +1519,12 @@ short r39_use_howard() {
 }
 
 void r39_talk_howard() {
-	if (spieler.R39HowardWach) {
+	if (_G(spieler).R39HowardWach) {
 		auto_move(3, P_CHEWY);
-		spieler.PersonGlobalDia[P_HOWARD] = 10012;
-		spieler.PersonDiaRoom[P_HOWARD] = true;;
+		_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
+		_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
 		calc_person_dia(P_HOWARD);
-		if (spieler.R41HowardDiaOK) {
+		if (_G(spieler).R41HowardDiaOK) {
 			r39_ok();
 		}
 	} else {
@@ -1534,10 +1534,10 @@ void r39_talk_howard() {
 }
 
 void r39_ok() {
-	spieler.R41Einbruch = true;
+	_G(spieler).R41Einbruch = true;
 
 	r43_night_small();
-	spieler.PersonRoomNr[P_HOWARD] = 27;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 27;
 	obj->show_sib(SIB_SURIMY_R27);
 	obj->show_sib(SIB_ZEITUNG_R27);
 	obj->calc_rsi_flip_flop(SIB_SURIMY_R27);
@@ -1559,42 +1559,42 @@ int16 r39_use_tv() {
 	cls_flag = false;
 	hide_cur();
 	if (is_cur_inventar(ZAPPER_INV)) {
-		spieler.R39TvOn = true;
-		if (spieler.R39TvKanal >= 5)
-			spieler.R39TvKanal = -1;
+		_G(spieler).R39TvOn = true;
+		if (_G(spieler).R39TvKanal >= 5)
+			_G(spieler).R39TvKanal = -1;
 		flags.NoPalAfterFlc = true;
 		out->setze_zeiger(0);
 		out->cls();
 		flic_cut(FCUT_042, FLC_MODE);
-		++spieler.R39TvKanal;
+		++_G(spieler).R39TvKanal;
 		flags.NoPalAfterFlc = true;
-		if (spieler.R39TvKanal == 2)
+		if (_G(spieler).R39TvKanal == 2)
 			flic_cut(FCUT_036, FLC_MODE);
-		else if (spieler.R39TvKanal == 5)
+		else if (_G(spieler).R39TvKanal == 5)
 			flic_cut(FCUT_033, FLC_MODE);
 		r39_look_tv(0);
 		r39_set_tv();
 		cls_flag = true;
-		if (!spieler.R39TransMensch) {
+		if (!_G(spieler).R39TransMensch) {
 			ani_nr = CH_TALK11;
 			dia_nr = 78;
 		} else {
-			if (!spieler.R39TvKanal && spieler.R39ClintNews < 3) {
+			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
 				dia_nr = 79;
 				ani_nr = -1;
 			} else {
-				dia_nr = 80 + spieler.R39TvKanal;
+				dia_nr = 80 + _G(spieler).R39TvKanal;
 				ani_nr = -1;
 			}
 		}
 	} else if (is_cur_inventar(TRANSLATOR_INV)) {
-		if (spieler.R39TvOn) {
+		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-			spieler.R39TransMensch = true;
+			_G(spieler).R39TransMensch = true;
 			flags.NoPalAfterFlc = true;
 			flic_cut(FCUT_041, FLC_MODE);
-			spieler.R39TvKanal = 0;
-			spieler.R39ClintNews = 0;
+			_G(spieler).R39TvKanal = 0;
+			_G(spieler).R39ClintNews = 0;
 			out->setze_zeiger(0);
 			out->cls();
 			out->set_palette(pal);
@@ -1616,20 +1616,20 @@ int16 r39_use_tv() {
 		}
 		r39_set_tv();
 	} else if (is_cur_inventar(RECORDER_INV)) {
-		if (spieler.R39TvOn) {
-			if (!spieler.R39TransMensch) {
+		if (_G(spieler).R39TvOn) {
+			if (!_G(spieler).R39TransMensch) {
 				ani_nr = CH_TALK12;
 				dia_nr = 97;
 			} else {
 				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(98, -1);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_ani_block(2, ablock29);
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
-				atds->set_ats_str(CASSETTE_INV, spieler.R39TvKanal + 1, INV_ATS_DATEI);
-				spieler.R39TvRecord = spieler.R39TvKanal + 1;
+				atds->set_ats_str(CASSETTE_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
+				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
 			}
 		} else {
 			ani_nr = CH_TALK11;
@@ -1656,16 +1656,16 @@ int16 r39_use_tv() {
 void r39_look_tv(int16 cls_mode) {
 	int16 flic_nr;
 	int16 dia_nr;
-	if (spieler.R39TvOn) {
-		if (!spieler.R39TvKanal && spieler.R39ClintNews < 3) {
+	if (_G(spieler).R39TvOn) {
+		if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
 			flic_nr = FCUT_038;
-			++spieler.R39ClintNews;
+			++_G(spieler).R39ClintNews;
 			dia_nr = 79;
 		} else {
-			flic_nr = tv_flic[spieler.R39TvKanal];
-			if (!spieler.R39TvKanal)
-				spieler.R39ClintNews = 0;
-			dia_nr = 80 + spieler.R39TvKanal;
+			flic_nr = tv_flic[_G(spieler).R39TvKanal];
+			if (!_G(spieler).R39TvKanal)
+				_G(spieler).R39ClintNews = 0;
+			dia_nr = 80 + _G(spieler).R39TvKanal;
 		}
 		if (cls_mode) {
 			out->setze_zeiger(0);
@@ -1680,7 +1680,7 @@ void r39_look_tv(int16 cls_mode) {
 			out->cls();
 			out->set_palette(pal);
 			flags.NoPalAfterFlc = false;
-			if (spieler.R39TransMensch)
+			if (_G(spieler).R39TransMensch)
 				start_aad_wait(dia_nr, -1);
 		}
 	}
@@ -1690,15 +1690,15 @@ void r39_set_tv() {
 	int16 i;
 	for (i = 0; i < 6; i++)
 		det->hide_static_spr(i + 4);
-	if (spieler.R39TvOn) {
-		if (spieler.R39TvKanal == 2)
+	if (_G(spieler).R39TvOn) {
+		if (_G(spieler).R39TvKanal == 2)
 			det->start_detail(0, 255, ANI_VOR);
 		else {
 			det->stop_detail(0);
-			det->show_static_spr(spieler.R39TvKanal + 4);
+			det->show_static_spr(_G(spieler).R39TvKanal + 4);
 		}
-		if (spieler.R39TransMensch) {
-			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + spieler.R39TvKanal, ATS_DATEI);
+		if (_G(spieler).R39TransMensch) {
+			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
 		} else {
 			atds->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
 		}
@@ -1708,27 +1708,27 @@ void r39_set_tv() {
 void r40_entry(int16 eib_nr) {
 
 	_G(zoom_horizont) = 130;
-	spieler.ScrollxStep = 2;
-	if (spieler.R40Geld) {
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R40Geld) {
 		det->del_static_ani(6);
 		room->set_timer_status(6, TIMER_STOP);
 	}
-	if (spieler.R40HaendlerOk) {
+	if (_G(spieler).R40HaendlerOk) {
 		det->del_static_ani(4);
 		room->set_timer_status(4, TIMER_STOP);
 	}
-	if (spieler.R40PoliceWeg == false) {
+	if (_G(spieler).R40PoliceWeg == false) {
 		_G(timer_nr)[0] = room->set_timer(255, 10);
 		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		det->hide_static_spr(15);
 	}
-	spieler.R40PoliceAniStatus = 255;
-	spieler.R40PoliceStart = 0;
+	_G(spieler).R40PoliceAniStatus = 255;
+	_G(spieler).R40PoliceStart = 0;
 	spieler_mi[P_HOWARD].Mode = true;
-	if (spieler.PersonRoomNr[P_HOWARD] == 40) {
-		spieler.ZoomXy[P_HOWARD][0] = 40;
-		spieler.ZoomXy[P_HOWARD][1] = 40;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 		if (!flags.LoadGame) {
 			switch (eib_nr) {
 			case 69:
@@ -1746,26 +1746,26 @@ void r40_entry(int16 eib_nr) {
 		}
 	}
 	SetUpScreenFunc = r40_setup_func;
-	if (spieler.R40TrainMove)
+	if (_G(spieler).R40TrainMove)
 		r40_move_train(0);
 }
 
 void r40_exit(int16 eib_nr) {
 	hide_cur();
-	spieler.ScrollxStep = 1;
-	spieler.R40PoliceAb = false;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).R40PoliceAb = false;
 	stop_spz();
 	SetUpScreenFunc = 0;
-	if (spieler.PersonRoomNr[P_HOWARD] == 40) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		if (eib_nr == 70 || eib_nr == 77) {
-			spieler.PersonRoomNr[P_HOWARD] = 28;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 		} else if (eib_nr == 72) {
 			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-			        spieler.R42BriefOk && spieler.R28Manuskript) ||
-			        (spieler.R40TrainOk)) {
-				spieler.R40TrainOk = true;
-				spieler.PersonRoomNr[P_HOWARD] = 45;
-				spieler.room_e_obj[72].Exit = 45;
+			        _G(spieler).R42BriefOk && _G(spieler).R28Manuskript) ||
+			        (_G(spieler).R40TrainOk)) {
+				_G(spieler).R40TrainOk = true;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
+				_G(spieler).room_e_obj[72].Exit = 45;
 				obj->hide_sib(SIB_MUENZE_R40);
 				uhr->disable_timer();
 				out->ausblenden(0);
@@ -1781,7 +1781,7 @@ void r40_exit(int16 eib_nr) {
 				flic_cut(FCUT_073, FLC_MODE);
 				show_person();
 			} else
-				spieler.PersonRoomNr[P_HOWARD] = 42;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
 		}
 	}
 	spieler_mi[P_HOWARD].Mode = false;
@@ -1792,7 +1792,7 @@ void r40_exit(int16 eib_nr) {
 void r40_move_train(int16 mode) {
 	int16 lx, ax;
 	int16 delay;
-	spieler.R40TrainMove = false;
+	_G(spieler).R40TrainMove = false;
 	hide_cur();
 	auto_move(9, P_CHEWY);
 	flags.NoScroll = true;
@@ -1803,18 +1803,18 @@ void r40_move_train(int16 mode) {
 	ax = lx - 190;
 	det->start_detail(7, 20, ANI_VOR);
 	det->show_static_spr(11);
-	if (mode && spieler.ChewyAni == CHEWY_PUMPKIN)
+	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
 		det->show_static_spr(12);
 	delay = 0;
 	while (ax < 560) {
 		det->set_detail_pos(7, lx, 46);
 		det->set_static_pos(11, ax, 62, false, false);
-		if (mode && spieler.ChewyAni == CHEWY_PUMPKIN)
+		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
 			det->set_static_pos(12, ax, 62, false, true);
 		if (!delay) {
 			lx += SPEED;
 			ax += SPEED;
-			delay = spieler.DelaySpeed / 2;
+			delay = _G(spieler).DelaySpeed / 2;
 		} else
 			--delay;
 		set_up_screen(DO_SETUP);
@@ -1840,7 +1840,7 @@ void r40_setup_func() {
 	int16 x, y;
 	int16 sp_x;
 
-	if (!spieler.R40HoUse && spieler.PersonRoomNr[P_HOWARD] == 40) {
+	if (!_G(spieler).R40HoUse && _G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = spieler_vector[P_HOWARD].Xypos[1];
@@ -1861,20 +1861,20 @@ void r40_setup_func() {
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
 	}
 
-	if (spieler.R40PoliceWeg == false) {
-		if (spieler.R40PoliceStart) {
-			spieler.R40PoliceStart = false;
-			spieler.R40PoliceAniStatus = POLICE_LEFT;
+	if (_G(spieler).R40PoliceWeg == false) {
+		if (_G(spieler).R40PoliceStart) {
+			_G(spieler).R40PoliceStart = false;
+			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
 			room->set_timer_status(255, TIMER_STOP);
 			det->hide_static_spr(15);
 			det->start_detail(POLICE_LEFT, 1, ANI_VOR);
 			atds->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 		}
-		switch (spieler.R40PoliceAniStatus) {
+		switch (_G(spieler).R40PoliceAniStatus) {
 		case POLICE_LEFT:
 			if (det->get_ani_status(POLICE_LEFT) == false) {
 				det->start_detail(POLICE_OFFEN, 1, ANI_VOR);
-				spieler.R40PoliceAniStatus = POLICE_OFFEN;
+				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
 			}
 			break;
 
@@ -1882,33 +1882,33 @@ void r40_setup_func() {
 			if (det->get_ani_status(POLICE_OFFEN) == false) {
 				det->show_static_spr(0);
 				det->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
-				spieler.R40PoliceAniStatus = POLICE_FLASCHE;
+				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
 			}
 			break;
 
 		case POLICE_FLASCHE:
 			if (det->get_ani_status(POLICE_FLASCHE) == false) {
 				det->hide_static_spr(0);
-				if (spieler.R40DuengerTele) {
+				if (_G(spieler).R40DuengerTele) {
 					hide_cur();
-					spieler.R40PoliceWeg = true;
+					_G(spieler).R40PoliceWeg = true;
 					det->start_detail(17, 255, ANI_VOR);
 					start_aad_wait(226, -1);
 					det->stop_detail(17);
-					spieler.R40HoUse = true;
+					_G(spieler).R40HoUse = true;
 					person_end_phase[P_CHEWY] = P_RIGHT;
 					start_detail_wait(10, 1, ANI_VOR);
 					person_end_phase[P_HOWARD] = P_RIGHT;
 					start_aad_wait(224, -1);
-					spieler.R40PoliceWeg = true;
+					_G(spieler).R40PoliceWeg = true;
 					show_cur();
 					flags.MausLinks = false;
 					flags.MainInput = true;
-					spieler.R40HoUse = false;
+					_G(spieler).R40HoUse = false;
 					atds->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
 				} else {
 					det->start_detail(POLICE_RIGHT, 1, ANI_VOR);
-					spieler.R40PoliceAniStatus = POLICE_RIGHT;
+					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
 				}
 			}
 			break;
@@ -1916,7 +1916,7 @@ void r40_setup_func() {
 		case POLICE_RIGHT:
 			if (det->get_ani_status(POLICE_RIGHT) == false) {
 				det->show_static_spr(15);
-				spieler.R40PoliceAniStatus = 255;
+				_G(spieler).R40PoliceAniStatus = 255;
 				room->set_timer_status(255, TIMER_START);
 				uhr->reset_timer(_G(timer_nr)[0], 0);
 				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
@@ -1930,27 +1930,27 @@ void r40_setup_func() {
 int16 r40_use_mr_pumpkin() {
 	int16 action_ret = false;
 	hide_cur();
-	if (spieler.inv_cur) {
-		switch (spieler.AkInvent) {
+	if (_G(spieler).inv_cur) {
+		switch (_G(spieler).AkInvent) {
 		case CENT_INV:
 			action_ret = true;
 			auto_move(5, P_CHEWY);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			start_detail_wait(15, 1, ANI_VOR);
 			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(200, -1);
 			break;
 
 		case CASSETTE_INV:
-			if (spieler.R39TvRecord == 6) {
+			if (_G(spieler).R39TvRecord == 6) {
 				action_ret = true;
-				if (spieler.R40PoliceWeg == false)
+				if (_G(spieler).R40PoliceWeg == false)
 					r40_use_schalter(227);
 				else {
 					hide_cur();
 					auto_move(8, P_CHEWY);
 					start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-					del_inventar(spieler.AkInvent);
+					del_inventar(_G(spieler).AkInvent);
 					out->ausblenden(1);
 					r43_catch_pg();
 					del_invent_slot(LIKOER_INV);
@@ -1960,7 +1960,7 @@ int16 r40_use_mr_pumpkin() {
 					start_aad_wait(236, -1);
 				}
 			} else
-				start_aad_wait(228 + spieler.R39TvRecord, -1);
+				start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
 			break;
 
 		}
@@ -1972,26 +1972,26 @@ int16 r40_use_mr_pumpkin() {
 
 int16 r40_use_schalter(int16 aad_nr) {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (spieler.R40PoliceWeg == false) {
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R40PoliceWeg == false) {
 			action_flag = true;
 			hide_cur();
 			auto_move(8, P_CHEWY);
-			if (spieler.R40PoliceAniStatus != 255) {
+			if (_G(spieler).R40PoliceAniStatus != 255) {
 				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(204, -1);
-				while (spieler.R40PoliceAniStatus != 255 && !SHOULD_QUIT)
+				while (_G(spieler).R40PoliceAniStatus != 255 && !SHOULD_QUIT)
 					set_up_screen(DO_SETUP);
 			}
 			room->set_timer_status(255, TIMER_STOP);
-			spieler.R40PoliceStart = false;
+			_G(spieler).R40PoliceStart = false;
 			stop_spz();
 			start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-			if (spieler.R40PoliceAb) {
-				spieler.R40PoliceAb = false;
+			if (_G(spieler).R40PoliceAb) {
+				_G(spieler).R40PoliceAb = false;
 				stop_spz();
 				go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
-				spieler.R40HoUse = false;
+				_G(spieler).R40HoUse = false;
 			}
 			det->hide_static_spr(15);
 			start_detail_wait(12, 1, ANI_VOR);
@@ -2009,10 +2009,10 @@ int16 r40_use_schalter(int16 aad_nr) {
 }
 
 void r40_talk_police() {
-	if (spieler.R40PoliceWeg == false &&
-	        spieler.R40PoliceAniStatus == 255) {
+	if (_G(spieler).R40PoliceWeg == false &&
+	        _G(spieler).R40PoliceAniStatus == 255) {
 		hide_cur();
-		spieler.R40PoliceStart = false;
+		_G(spieler).R40PoliceStart = false;
 		room->set_timer_status(255, TIMER_STOP);
 		auto_move(7, P_CHEWY);
 		start_aad_wait(203, -1);
@@ -2023,7 +2023,7 @@ void r40_talk_police() {
 }
 
 void r40_talk_handler() {
-	if (!spieler.R40HaendlerOk) {
+	if (!_G(spieler).R40HaendlerOk) {
 		hide_cur();
 		auto_move(6, P_CHEWY);
 		det->del_static_ani(4);
@@ -2039,14 +2039,14 @@ void r40_talk_handler() {
 
 int16 r40_use_haendler() {
 	int16 action_flag = false;
-	if (menu_item == CUR_HOWARD && !spieler.R40HaendlerOk) {
+	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
 		hide_cur();
 		invent_2_slot(DUENGER_INV);
-		spieler.R40HoUse = true;
-		spieler.R40HaendlerOk = true;
-		spieler.R40TeilKarte = true;
-		spieler.R40DuengerMit = true;
+		_G(spieler).R40HoUse = true;
+		_G(spieler).R40HaendlerOk = true;
+		_G(spieler).R40TeilKarte = true;
+		_G(spieler).R40DuengerMit = true;
 		atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
 		auto_move(10, P_CHEWY);
 		auto_move(11, P_HOWARD);
@@ -2061,7 +2061,7 @@ int16 r40_use_haendler() {
 		det->del_static_ani(3);
 		det->set_static_ani(5, -1);
 		start_aad_wait(213, -1);
-		if (spieler.R28RKuerbis) {
+		if (_G(spieler).R28RKuerbis) {
 			det->del_static_ani(5);
 			det->set_static_ani(3, -1);
 			start_aad_wait(211, -1);
@@ -2069,8 +2069,8 @@ int16 r40_use_haendler() {
 			out->set_teilpalette(pal, 255, 1);
 			start_aad_wait(212, -1);
 			out->ausblenden(0);
-			spieler.R40Wettbewerb = true;
-			spieler.PersonRoomNr[P_HOWARD] = 28;
+			_G(spieler).R40Wettbewerb = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			flags.NoScroll = false;
 			out->setze_zeiger(0);
 			out->cls();
@@ -2084,7 +2084,7 @@ int16 r40_use_haendler() {
 		cursor_wahl(menu_item);
 		show_cur();
 		flags.NoScroll = false;
-		spieler.R40HoUse = false;
+		_G(spieler).R40HoUse = false;
 		flags.MausLinks = false;
 	}
 	return action_flag;
@@ -2095,13 +2095,13 @@ int16 r40_use_bmeister() {
 	if (menu_item == CUR_HOWARD) {
 		action_flag = true;
 		hide_cur();
-		spieler.R40HoUse = true;
+		_G(spieler).R40HoUse = true;
 		auto_move(9, P_CHEWY);
 		auto_move(11, P_HOWARD);
 		start_aad_wait(214, -1);
 		r40_bmeister_dia(215);
 		start_aad_wait(216, -1);
-		spieler.R40HoUse = false;
+		_G(spieler).R40HoUse = false;
 		flags.NoScroll = false;
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
@@ -2109,7 +2109,7 @@ int16 r40_use_bmeister() {
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
 		hide_cur();
-		spieler.R40HoUse = true;
+		_G(spieler).R40HoUse = true;
 		new_invent_2_cur(HOTEL_INV);
 
 		r40_bmeister_dia(237);
@@ -2147,13 +2147,13 @@ void r40_bmeister_dia(int16 aad_nr) {
 
 void r40_use_police() {
 	if (menu_item == CUR_HOWARD) {
-		if (spieler.R40PoliceWeg == false &&
-		        spieler.R40PoliceAniStatus == 255) {
-			spieler.R40PoliceAb = true;
+		if (_G(spieler).R40PoliceWeg == false &&
+		        _G(spieler).R40PoliceAniStatus == 255) {
+			_G(spieler).R40PoliceAb = true;
 			hide_cur();
-			spieler.R40PoliceStart = false;
+			_G(spieler).R40PoliceStart = false;
 			room->set_timer_status(255, TIMER_STOP);
-			spieler.R40HoUse = true;
+			_G(spieler).R40HoUse = true;
 			auto_move(9, P_CHEWY);
 			auto_move(11, P_HOWARD);
 			start_aad_wait(217, -1);
@@ -2176,17 +2176,17 @@ int16 r40_use_tele() {
 	int16 dia_nr1 = -1;
 	int16 timer_wert;
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (spieler.R40PoliceWeg == false) {
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R40PoliceWeg == false) {
 			action_flag = true;
 			hide_cur();
-			if (!spieler.R40PoliceAb) {
+			if (!_G(spieler).R40PoliceAb) {
 				start_aad_wait(219, -1);
-				spieler.R40HoUse = false;
+				_G(spieler).R40HoUse = false;
 			} else {
 				auto_move(13, P_CHEWY);
 				det->show_static_spr(0);
-				if (!spieler.R40DuengerMit) {
+				if (!_G(spieler).R40DuengerMit) {
 					dia_nr = 220;
 					dia_nr1 = 222;
 				} else {
@@ -2198,24 +2198,24 @@ int16 r40_use_tele() {
 				det->hide_static_spr(0);
 				auto_move(9, P_CHEWY);
 				start_aad_wait(dia_nr1, -1);
-				spieler.R40HoUse = false;
+				_G(spieler).R40HoUse = false;
 				timer_wert = 0;
 				if (dia_nr1 == 223) {
 					if (is_cur_inventar(DUENGER_INV)) {
-						del_inventar(spieler.AkInvent);
+						del_inventar(_G(spieler).AkInvent);
 					} else {
 						obj->del_inventar(DUENGER_INV, &room_blk);
 						del_invent_slot(DUENGER_INV);
 					}
 					invent_2_slot(LIKOER_INV);
 					auto_move(1, P_CHEWY);
-					spieler.R40DuengerMit = false;
-					spieler.R40DuengerTele = true;
+					_G(spieler).R40DuengerMit = false;
+					_G(spieler).R40DuengerTele = true;
 					flags.MausLinks = true;
 					flags.MainInput = false;
 					timer_wert = 3;
 				}
-				spieler.R40PoliceAb = false;
+				_G(spieler).R40PoliceAb = false;
 				room->set_timer_status(255, TIMER_START);
 				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
 			}
@@ -2229,7 +2229,7 @@ int16 r40_use_tele() {
 void r41_entry() {
 	hide_cur();
 
-	if (!spieler.R41LolaOk) {
+	if (!_G(spieler).R41LolaOk) {
 		if (!flags.LoadGame) {
 			room->set_timer_status(0, TIMER_STOP);
 			det->del_static_ani(0);
@@ -2240,45 +2240,45 @@ void r41_entry() {
 		} else
 			det->start_detail(6, 255, ANI_VOR);
 	}
-	if (spieler.R41Einbruch) {
+	if (_G(spieler).R41Einbruch) {
 		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(timer_nr)[0] = room->set_timer(7, 5);
 		det->set_static_ani(7, -1);
 		det->show_static_spr(6);
 		det->show_static_spr(7);
 	}
-	spieler.PersonHide[P_HOWARD] = true;
+	_G(spieler).PersonHide[P_HOWARD] = true;
 	show_cur();
 }
 
 void r41_exit() {
-	spieler.PersonHide[P_HOWARD] = false;
-	if (spieler.PersonRoomNr[P_HOWARD] == 41)
-		spieler.PersonRoomNr[P_HOWARD] = 40;
-	if (!spieler.R41TrainCount) {
-		spieler.R41TrainCount = 3;
-		spieler.R40TrainMove = true;
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+	if (!_G(spieler).R41TrainCount) {
+		_G(spieler).R41TrainCount = 3;
+		_G(spieler).R40TrainMove = true;
 	}
-	--spieler.R41TrainCount;
+	--_G(spieler).R41TrainCount;
 }
 
 void r41_talk_hoggy1() {
 	r41_stop_hoggy();
 	auto_move(1, P_CHEWY);
-	if (!spieler.R41FirstTalk) {
+	if (!_G(spieler).R41FirstTalk) {
 		r41_first_talk();
-	} else if (!spieler.R41Einbruch) {
+	} else if (!_G(spieler).R41Einbruch) {
 		show_cur();
 		start_ads_wait(11);
 
-	} else if (spieler.R41Einbruch) {
-		if (!spieler.R41BruchInfo) {
-			spieler.R41BruchInfo = true;
+	} else if (_G(spieler).R41Einbruch) {
+		if (!_G(spieler).R41BruchInfo) {
+			_G(spieler).R41BruchInfo = true;
 			start_aad_wait(132, -1);
 			start_aad_wait(128, -1);
-		} else if (spieler.R31SurFurz &&
-		         !spieler.R41KuerbisInfo) {
-			spieler.R41KuerbisInfo = true;
+		} else if (_G(spieler).R31SurFurz &&
+		         !_G(spieler).R41KuerbisInfo) {
+			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
@@ -2292,12 +2292,12 @@ void r41_talk_hoggy1() {
 void r41_talk_hoggy2() {
 	r41_stop_hoggy();
 	auto_move(2, P_CHEWY);
-	if (!spieler.R41FirstTalk) {
+	if (!_G(spieler).R41FirstTalk) {
 		r41_first_talk();
-	} else if (spieler.R41BruchInfo) {
-		if (spieler.R31SurFurz &&
-		        !spieler.R41KuerbisInfo) {
-			spieler.R41KuerbisInfo = true;
+	} else if (_G(spieler).R41BruchInfo) {
+		if (_G(spieler).R31SurFurz &&
+		        !_G(spieler).R41KuerbisInfo) {
+			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
 
@@ -2311,7 +2311,7 @@ void r41_talk_hoggy2() {
 }
 
 void r41_first_talk() {
-	spieler.R41FirstTalk = true;
+	_G(spieler).R41FirstTalk = true;
 	start_aad_wait(134, -1);
 	atds->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
 	atds->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
@@ -2340,7 +2340,7 @@ void r41_stop_hoggy() {
 
 int16 r41_use_kasse() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		r41_stop_hoggy();
 		auto_move(1, P_CHEWY);
@@ -2352,11 +2352,11 @@ int16 r41_use_kasse() {
 
 int16 r41_use_lola() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
-		if (!spieler.R41LolaOk && spieler.R41RepairInfo) {
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
 			hide_cur();
 			action_flag = true;
-			spieler.R41LolaOk = true;
+			_G(spieler).R41LolaOk = true;
 			auto_move(4, P_CHEWY);
 			flic_cut(FCUT_057, FLC_MODE);
 			set_person_pos(127, 112, P_CHEWY, P_LEFT);
@@ -2381,15 +2381,15 @@ int16 r41_use_brief() {
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		auto_move(6, P_CHEWY);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		r41_stop_hoggy();
 		start_aad_wait(186, -1);
 		r41_start_hoggy();
 		atds->set_ats_str(206, 1, ATS_DATEI);
-		spieler.R28Briefkasten = true;
-		spieler.R40TrainMove = true;
-		spieler.R28PostCar = true;
-		spieler.R42BriefOk = true;
+		_G(spieler).R28Briefkasten = true;
+		_G(spieler).R40TrainMove = true;
+		_G(spieler).R28PostCar = true;
+		_G(spieler).R42BriefOk = true;
 	}
 	return action_flag;
 }
@@ -2397,7 +2397,7 @@ int16 r41_use_brief() {
 void r41_sub_dia() {
 	aad_wait(-1);
 	start_aad_wait(161, -1);
-	if (spieler.R41LolaOk) {
+	if (_G(spieler).R41LolaOk) {
 		start_aad_wait(163, -1);
 		atds->hide_item(11, 0, 2);
 		stop_ads_dialog();
@@ -2410,13 +2410,13 @@ void r41_sub_dia() {
 }
 
 void r42_entry() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 42) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
 		SetUpScreenFunc = r42setup_func;
 		if (!flags.LoadGame) {
 			det->stop_detail(0);
 			_G(timer_nr)[0] = room->set_timer(8, 5);
 			det->set_static_ani(8, -1);
-			spieler.R42BeamterWach = true;
+			_G(spieler).R42BeamterWach = true;
 			SetUpScreenFunc = r42setup_func;
 
 			set_person_pos(80, 43, P_HOWARD, P_LEFT);
@@ -2425,25 +2425,25 @@ void r42_entry() {
 			atds->set_ats_str(264, 1, ATS_DATEI);
 		}
 		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-		        !spieler.R42BriefOk)
+		        !_G(spieler).R42BriefOk)
 			start_aad_wait(302, -1);
 		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-		        spieler.R42BriefOk)
+		        _G(spieler).R42BriefOk)
 			start_aad_wait(301, -1);
 	}
 }
 
 void r42setup_func() {
-	if (!spieler.R42HoToBeamter)
+	if (!_G(spieler).R42HoToBeamter)
 		calc_person_look();
 }
 
 void r42_calc_xit() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 42) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
 		if (flags.ExitMov) {
 			atds->set_ats_str(264, 1, ATS_DATEI);
 			stop_spz();
-			spieler.R42HoToBeamter = false;
+			_G(spieler).R42HoToBeamter = false;
 
 		}
 	}
@@ -2452,55 +2452,55 @@ void r42_calc_xit() {
 void r42_get_kuerbis(int16 aad_nr) {
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(7, 1, ANI_RUECK);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(aad_nr, -1);
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(7, 1, ANI_VOR);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	show_cur();
 }
 
 int16 r42_use_psack() {
 	int16 action_flag = false;
-	if (!spieler.R42BeamterWach && !spieler.inv_cur) {
+	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
 		action_flag = true;
 		r42_get_kuerbis(136);
-	} else if (spieler.R42HoToBeamter &&
-	           !spieler.inv_cur &&
-	           !spieler.R42MarkeOk) {
+	} else if (_G(spieler).R42HoToBeamter &&
+	           !_G(spieler).inv_cur &&
+	           !_G(spieler).R42MarkeOk) {
 
 		action_flag = true;
 		auto_move(3, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(10, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_aad_wait(187, -1);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(9, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		new_invent_2_cur(BMARKE_INV);
 		start_aad_wait(181, -1);
-		spieler.R42MarkeOk = true;
+		_G(spieler).R42MarkeOk = true;
 		auto_move(4, P_CHEWY);
 		start_aad_wait(185, -1);
-		spieler.R42HoToBeamter = false;
+		_G(spieler).R42HoToBeamter = false;
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(10, 1, ANI_VOR);
-		spieler.PersonHide[P_CHEWY] = false;
-		del_inventar(spieler.AkInvent);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		del_inventar(_G(spieler).AkInvent);
 		start_aad_wait(183, -1);
 		obj->calc_rsi_flip_flop(SIB_BKASTEN_R28);
 		atds->set_ats_str(206, 1, ATS_DATEI);
-		spieler.R28Briefkasten = true;
-		spieler.R40TrainMove = true;
-		spieler.R28PostCar = true;
-		spieler.R42BriefOk = true;
+		_G(spieler).R28Briefkasten = true;
+		_G(spieler).R40TrainMove = true;
+		_G(spieler).R28PostCar = true;
+		_G(spieler).R42BriefOk = true;
 	} else if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
 		start_aad_wait(182, -1);
@@ -2516,7 +2516,7 @@ int16 r42_use_beamter() {
 		hide_cur();
 		auto_move(4, P_CHEWY);
 		start_aad_wait(184, -1);
-		spieler.R42HoToBeamter = true;
+		_G(spieler).R42HoToBeamter = true;
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
 		show_cur();
@@ -2529,9 +2529,9 @@ int16 r42_use_beamter() {
 void r42_talk_beamter() {
 	int16 dia_nr;
 	auto_move(1, P_CHEWY);
-	if (!spieler.R42BeamterWach) {
+	if (!_G(spieler).R42BeamterWach) {
 		dia_nr = 10;
-	} else if (!spieler.R42MarkeOk) {
+	} else if (!_G(spieler).R42MarkeOk) {
 		dia_nr = 13;
 	} else {
 		dia_nr = 14;
@@ -2544,7 +2544,7 @@ void r42_dia_beamter(int16 str_end_nr) {
 	if (str_end_nr != 4) {
 		while (atds->aad_get_status() != -1 && !SHOULD_QUIT)
 			set_up_screen(DO_SETUP);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		flags.NoDiaBox = true;
 		switch (str_end_nr) {
 		case 1:
@@ -2573,69 +2573,69 @@ void r42_dia_beamter(int16 str_end_nr) {
 		det->stop_detail(2);
 		det->start_detail(0, 255, ANI_VOR);
 	}
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	det->start_detail(6, 255, ANI_VOR);
 	start_aad_wait(135, -1);
 	det->stop_detail(6);
 	flags.NoDiaBox = false;
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	show_cur();
 }
 
 void r43_night_small() {
 	int16 i;
 	hide_person();
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stop_mod();
 	hide_cur();
 	flags.NoScroll = true;
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(188, -1);
 	auto_scroll(320, 0);
 	start_aad_wait(189, -1);
 	auto_scroll(0, 0);
 	start_aad_wait(190, -1);
-	spieler.ScrollxStep = 16;
+	_G(spieler).ScrollxStep = 16;
 	auto_scroll(192, 0);
 	for (i = 0; i < 3; i++) {
 		if (i)
-			spieler.ScrollxStep = 16 / i;
+			_G(spieler).ScrollxStep = 16 / i;
 		auto_scroll(128 + i * 16, 0);
 		auto_scroll(192, 0);
 	}
-	spieler.scrollx = 194;
+	_G(spieler).scrollx = 194;
 	start_aad_wait(191, -1);
 	load_room_music(255);
 	flic_cut(FCUT_058, FLC_MODE);
 	flags.NoScroll = false;
-	spieler.ScrollxStep = 1;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	show_cur();
 	show_person();
 }
 
 void r43_catch_pg() {
 	hide_person();
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stop_mod();
 	hide_cur();
 	flags.NoScroll = true;
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(234, -1);
 	auto_scroll(194, 0);
 	start_aad_wait(235, -1);
 	load_room_music(255);
-	spieler.R43GetPgLady = true;
+	_G(spieler).R43GetPgLady = true;
 	flic_cut(FCUT_058, FLC_MODE);
 	flags.NoScroll = false;
-	spieler.ScrollxStep = 1;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	show_cur();
 	show_person();
 }
@@ -2643,19 +2643,19 @@ void r43_catch_pg() {
 void r44_look_news() {
 	int16 tmpsx, tmpsy;
 	int16 tmproom;
-	tmproom = spieler.PersonRoomNr[P_CHEWY];
-	tmpsx = spieler.scrollx;
-	tmpsy = spieler.scrolly;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
+	tmpsx = _G(spieler).scrollx;
+	tmpsy = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	hide_person();
 	fx_blend = BLEND1;
-	spieler.PersonRoomNr[P_CHEWY] = 44;
-	room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
 	start_aad_wait(172, -1);
-	spieler.scrollx = tmpsx;
-	spieler.scrolly = tmpsy;
+	_G(spieler).scrollx = tmpsx;
+	_G(spieler).scrolly = tmpsy;
 	switch_room(tmproom);
 
 	show_person();
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 58bb3b6cc8e..d54dce598ca 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -46,28 +46,28 @@ int16 r65tmp_ho_y;
 void r45_entry(int16 eib_nr) {
 	int16 ch_x, ch_y;
 	int16 ho_x, ho_y;
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r45_setup_func;
 	r45_delay = 0;
 	_G(zoom_horizont) = 150;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
-	spieler.ZoomXy[P_HOWARD][0] = 80;
-	spieler.ZoomXy[P_HOWARD][1] = 70;
-	if (spieler.PersonRoomNr[P_HOWARD] == 46) {
+	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = true;
-		spieler.PersonRoomNr[P_HOWARD] = 45;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
 	}
 
 	spieler_mi[P_HOWARD].Mode = true;
 	if (!flags.LoadGame) {
-		if (spieler.R48TaxiEntry) {
+		if (_G(spieler).R48TaxiEntry) {
 			ch_x = 67;
 			ch_y = 146;
 			ho_x = 43;
 			ho_y = 129;
 
-			spieler.R48TaxiEntry = false;
+			_G(spieler).R48TaxiEntry = false;
 			_G(maus_links_click) = false;
 		} else {
 			if (eib_nr == 72) {
@@ -75,7 +75,7 @@ void r45_entry(int16 eib_nr) {
 				ch_y = 146;
 				ho_x = 304;
 				ho_y = 130;
-				spieler.scrollx = 130;
+				_G(spieler).scrollx = 130;
 			} else {
 				ch_x = 68;
 				ch_y = 132;
@@ -90,11 +90,11 @@ void r45_entry(int16 eib_nr) {
 }
 
 void r45_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
-	if (spieler.PersonRoomNr[P_HOWARD] == 45) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		spieler_mi[P_HOWARD].Mode = false;
 		if (eib_nr == 87) {
-			spieler.PersonRoomNr[P_HOWARD] = 40;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 		}
 	}
 	if (eib_nr == 87) {
@@ -125,7 +125,7 @@ void r45_setup_func() {
 
 	if (menu_display == 0) {
 		if (!r45_delay) {
-			r45_delay = spieler.DelaySpeed / 2;
+			r45_delay = _G(spieler).DelaySpeed / 2;
 			for (i = 0; i < R45_MAX_PERSON; i++) {
 				if (r45_pinfo[i][0] == 1) {
 					y = Adi[3 + i].y;
@@ -162,7 +162,7 @@ void r45_setup_func() {
 			}
 		} else
 			--r45_delay;
-		if (spieler.PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
 			calc_person_look();
 			x = spieler_vector[P_HOWARD].Xypos[0];
 			y = 64;
@@ -190,14 +190,14 @@ int16 r45_use_taxi() {
 	int16 action_ret = false;
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	if (!spieler.inv_cur) {
-		if (spieler.ChewyAni == CHEWY_PUMPKIN) {
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).ChewyAni == CHEWY_PUMPKIN) {
 			action_ret = true;
 			r45_talk_taxi(254);
-		} else if (!spieler.R45TaxiOk) {
+		} else if (!_G(spieler).R45TaxiOk) {
 			action_ret = true;
 			r45_talk_taxi(260);
-		} else if (spieler.R45TaxiOk) {
+		} else if (_G(spieler).R45TaxiOk) {
 			action_ret = true;
 			r45_taxi_mov();
 		}
@@ -205,7 +205,7 @@ int16 r45_use_taxi() {
 		action_ret = true;
 		del_inventar(RING_INV);
 		r45_talk_taxi(256);
-		spieler.R45TaxiOk = true;
+		_G(spieler).R45TaxiOk = true;
 		r45_taxi_mov();
 	} else if (is_cur_inventar(UHR_INV)) {
 		action_ret = true;
@@ -234,13 +234,13 @@ void r45_taxi_mov() {
 	det->del_static_ani(12);
 	det->show_static_spr(11);
 	auto_move(3, P_CHEWY);
-	spieler.PersonHide[P_CHEWY] = true;
-	spieler.R48TaxiPerson[P_CHEWY] = true;
-	if (spieler.PersonRoomNr[P_HOWARD] == 45) {
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		go_auto_xy(93, 127, P_HOWARD, ANI_WAIT);
-		spieler.PersonHide[P_HOWARD] = true;
-		spieler.R48TaxiPerson[P_HOWARD] = true;
-		spieler.PersonRoomNr[P_HOWARD] = 48;
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 	}
 	det->hide_static_spr(11);
 	start_detail_wait(15, 1, ANI_VOR);
@@ -252,7 +252,7 @@ int16 r45_use_boy() {
 	int16 action_ret = false;
 	hide_cur();
 	auto_move(2, P_CHEWY);
-	if (!spieler.R45MagOk) {
+	if (!_G(spieler).R45MagOk) {
 		if (is_cur_inventar(DOLLAR175_INV)) {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
@@ -263,7 +263,7 @@ int16 r45_use_boy() {
 			start_detail_wait(1, 1, ANI_VOR);
 			room->set_timer_status(0, TIMER_START);
 			det->set_static_ani(0, -1);
-			spieler.R45MagOk = true;
+			_G(spieler).R45MagOk = true;
 		}
 	} else
 		start_aad_wait(259, -1);
@@ -274,7 +274,7 @@ int16 r45_use_boy() {
 void r45_talk_boy() {
 	int16 aad_nr;
 	hide_cur();
-	if (!spieler.R45MagOk) {
+	if (!_G(spieler).R45MagOk) {
 		auto_move(2, P_CHEWY);
 		aad_nr = 257;
 	} else
@@ -284,8 +284,8 @@ void r45_talk_boy() {
 }
 
 void r46_entry(int16 eib_nr) {
-	if (spieler.PersonRoomNr[P_HOWARD] == 45) {
-		spieler.PersonRoomNr[P_HOWARD] = 46;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
 		SetUpScreenFunc = r46setup_func;
 		if (eib_nr == 79) {
 			set_person_pos(140, 90, P_HOWARD, P_LEFT);
@@ -293,16 +293,16 @@ void r46_entry(int16 eib_nr) {
 			set_person_spr(P_LEFT, P_CHEWY);
 		}
 	}
-	if (spieler.PersonRoomNr[P_HOWARD] == 46) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = true;
 		SetUpScreenFunc = r46setup_func;
 	}
-	if (spieler.R47SchlossOk && !spieler.R46GetLeder)
+	if (_G(spieler).R47SchlossOk && !_G(spieler).R46GetLeder)
 		r46_bodo();
 }
 
 void r46_exit() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 46) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -350,13 +350,13 @@ void r46_bodo() {
 	det->stop_detail(4);
 	start_detail_wait(6, 1, ANI_VOR);
 	det->show_static_spr(3);
-	spieler.PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065, FLC_MODE);
 	flic_cut(FCUT_066, FLC_MODE);
 	out->setze_zeiger(0);
 	out->cls();
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	det->hide_static_spr(0);
 	det->hide_static_spr(3);
 	load_chewy_taf(CHEWY_ROCKER);
@@ -364,7 +364,7 @@ void r46_bodo() {
 	start_aad_wait(243, -1);
 	invent_2_slot(UHR_INV);
 	invent_2_slot(RING_INV);
-	spieler.R46GetLeder = true;
+	_G(spieler).R46GetLeder = true;
 	show_cur();
 }
 
@@ -378,7 +378,7 @@ void r46_kloppe() {
 		out->setze_zeiger(0);
 		out->cls();
 		start_aad(244 + i, -1);
-		delay = spieler.DelaySpeed * 50;
+		delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
 		while (in->get_switch_code() == 0 && delay) {
 			out->skip_frame(1);
@@ -392,9 +392,9 @@ void r46_kloppe() {
 
 int16 r46_use_schloss() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		if (!spieler.R46GetLeder) {
+		if (!_G(spieler).R46GetLeder) {
 			auto_move(1, P_CHEWY);
 			switch_room(47);
 		} else
@@ -418,7 +418,7 @@ void r47_exit() {
 int16 r47_use_knopf(int16 txt_nr) {
 	int16 k_nr = 0;
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		switch (txt_nr) {
 		case 286:
@@ -434,16 +434,16 @@ int16 r47_use_knopf(int16 txt_nr) {
 			break;
 
 		}
-		++spieler.R47Schloss[k_nr];
-		if (spieler.R47Schloss[k_nr] > 9)
-			spieler.R47Schloss[k_nr] = 0;
-
-		if (spieler.R47Schloss[0] == 7 &&
-		        spieler.R47Schloss[1] == 6 &&
-		        spieler.R47Schloss[2] == 2)
-			spieler.R47SchlossOk = true;
+		++_G(spieler).R47Schloss[k_nr];
+		if (_G(spieler).R47Schloss[k_nr] > 9)
+			_G(spieler).R47Schloss[k_nr] = 0;
+
+		if (_G(spieler).R47Schloss[0] == 7 &&
+		        _G(spieler).R47Schloss[1] == 6 &&
+		        _G(spieler).R47Schloss[2] == 2)
+			_G(spieler).R47SchlossOk = true;
 		else
-			spieler.R47SchlossOk = false;
+			_G(spieler).R47SchlossOk = false;
 	}
 	return action_ret;
 }
@@ -453,9 +453,9 @@ void r47_set_detail() {
 	for (i = 0; i < 10; i++)
 		det->hide_static_spr(i);
 	for (i = 0; i < 3; i++) {
-		det->show_static_spr(spieler.R47Schloss[i]);
-		det->set_static_pos(spieler.R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
-		det->plot_static_details(0, 0, spieler.R47Schloss[i], spieler.R47Schloss[i]);
+		det->show_static_spr(_G(spieler).R47Schloss[i]);
+		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
+		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
 	}
 	for (i = 0; i < 10; i++)
 		det->hide_static_spr(i);
@@ -463,8 +463,8 @@ void r47_set_detail() {
 
 void r48_entry() {
 	_G(maus_links_click) = false;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	show_cur();
 	r48calc_pic();
 	SetUpScreenFunc = r48setup_func;
@@ -476,19 +476,19 @@ void r48calc_pic() {
 	int16 i;
 	for (i = 0; i < 2; i++) {
 		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
-		spieler.R48Auswahl[3 + i] = 0;
+		_G(spieler).R48Auswahl[3 + i] = 0;
 	}
-	spieler.R48Auswahl[0] = 1;
-	spieler.R48Auswahl[1] = 1;
-	spieler.R48Auswahl[2] = 1;
+	_G(spieler).R48Auswahl[0] = 1;
+	_G(spieler).R48Auswahl[1] = 1;
+	_G(spieler).R48Auswahl[2] = 1;
 
 	if (obj->check_inventar(VCARD_INV)) {
-		spieler.R48Auswahl[3] = 1;
+		_G(spieler).R48Auswahl[3] = 1;
 		atds->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
 		det->show_static_spr(4);
 	}
 	if (obj->check_inventar(KAPPE_INV)) {
-		spieler.R48Auswahl[4] = 1;
+		_G(spieler).R48Auswahl[4] = 1;
 		atds->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
 		det->show_static_spr(4);
 	}
@@ -523,7 +523,7 @@ void r48setup_func() {
 			cursor_wahl(CUR_ZEIGE);
 			idx = det->maus_vector(minfo.x, minfo.y);
 			if (idx != -1) {
-				if (spieler.R48Auswahl[idx]) {
+				if (_G(spieler).R48Auswahl[idx]) {
 					det->show_static_spr(1 + idx);
 					if (_G(maus_links_click)) {
 						switch (idx) {
@@ -564,17 +564,17 @@ void r48setup_func() {
 							menu_item = CUR_WALK;
 							cursor_wahl(menu_item);
 							show_cur();
-							spieler.R48TaxiEntry = true;
+							_G(spieler).R48TaxiEntry = true;
 							_G(maus_links_click) = false;
 							set_up_screen(DO_SETUP);
 							for (i = 0; i < MAX_PERSON; i++) {
-								if (spieler.R48TaxiPerson[i]) {
-									spieler.PersonHide[i] = false;
-									spieler.R48TaxiPerson[i] = false;
+								if (_G(spieler).R48TaxiPerson[i]) {
+									_G(spieler).PersonHide[i] = false;
+									_G(spieler).R48TaxiPerson[i] = false;
 								}
 							}
-							if (spieler.PersonRoomNr[P_HOWARD] == 48) {
-								spieler.PersonRoomNr[P_HOWARD] = r_nr;
+							if (_G(spieler).PersonRoomNr[P_HOWARD] == 48) {
+								_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
 							}
 							switch_room(r_nr);
 						}
@@ -589,26 +589,26 @@ void r49_entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r49setup_func;
-	if (!spieler.R49BoyWeg)
+	if (!_G(spieler).R49BoyWeg)
 		_G(timer_nr)[0] = room->set_timer(255, 2);
 	else {
 		det->del_static_ani(0);
 		det->hide_static_spr(5);
 	}
 
-	spieler.ZoomXy[P_HOWARD][0] = 30;
-	spieler.ZoomXy[P_HOWARD][1] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	spieler_mi[P_HOWARD].Mode = true;
 	if (!flags.LoadGame) {
-		if (spieler.R48TaxiEntry) {
-			spieler.R48TaxiEntry = false;
+		if (_G(spieler).R48TaxiEntry) {
+			_G(spieler).R48TaxiEntry = false;
 			set_person_pos(527, 76, P_HOWARD, P_LEFT);
 			set_person_pos(491, 98, P_CHEWY, P_LEFT);
 			_G(maus_links_click) = false;
-			spieler.scrollx = 320;
-			spieler.scrolly = 0;
+			_G(spieler).scrollx = 320;
+			_G(spieler).scrolly = 0;
 			det->start_detail(5, 1, ANI_VOR);
 		} else if (eib_nr == 83)
 			set_person_pos(377, 78, P_HOWARD, P_LEFT);
@@ -617,11 +617,11 @@ void r49_entry(int16 eib_nr) {
 }
 
 void r49_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
-	if (spieler.PersonRoomNr[P_HOWARD] == 49) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		spieler_mi[P_HOWARD].Mode = false;
 		if (eib_nr == 80)
-			spieler.PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		else if (eib_nr == 81) {
 			SetUpScreenFunc = 0;
 			start_aad_wait(268, -1);
@@ -630,31 +630,31 @@ void r49_exit(int16 eib_nr) {
 }
 
 void r49_calc_boy_ani() {
-	if (!spieler.R49BoyAniCount) {
-		spieler.R49BoyAniCount = 3;
-		spieler.R49BoyAni = 1;
+	if (!_G(spieler).R49BoyAniCount) {
+		_G(spieler).R49BoyAniCount = 3;
+		_G(spieler).R49BoyAni = 1;
 		det->del_static_ani(0);
 	} else {
-		--spieler.R49BoyAniCount;
-		spieler.R49BoyAni = 0;
+		--_G(spieler).R49BoyAniCount;
+		_G(spieler).R49BoyAni = 0;
 		det->del_static_ani(1);
 	}
-	det->set_static_ani(spieler.R49BoyAni, -1);
-	det->start_detail(spieler.R49BoyAni, 1, ANI_VOR);
+	det->set_static_ani(_G(spieler).R49BoyAni, -1);
+	det->start_detail(_G(spieler).R49BoyAni, 1, ANI_VOR);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 }
 
 void r49_calc_boy() {
-	if (!spieler.R49WegFrei) {
+	if (!_G(spieler).R49WegFrei) {
 		hide_cur();
 		room->set_timer_status(255, TIMER_STOP);
 		uhr->reset_timer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
 		person_end_phase[P_CHEWY] = P_LEFT;
-		det->stop_detail(spieler.R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni);
 
-		det->del_static_ani(spieler.R49BoyAni);
+		det->del_static_ani(_G(spieler).R49BoyAni);
 		det->set_static_ani(2, -1);
 		SetUpScreenFunc = 0;
 		start_aad_wait(262, -1);
@@ -667,7 +667,7 @@ void r49_calc_boy() {
 		start_detail_wait(3, 1, ANI_VOR);
 		start_detail_wait(4, 1, ANI_RUECK);
 		SetUpScreenFunc = r49setup_func;
-		det->set_static_ani(spieler.R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
 		room->set_timer_status(255, TIMER_START);
 		show_cur();
 	}
@@ -680,15 +680,15 @@ int16 r49_use_boy() {
 		action_ret = true;
 		hide_cur();
 		auto_move(3, P_CHEWY);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		r49_talk_boy(265);
-		spieler.R49WegFrei = true;
-		spieler.room_e_obj[80].Attribut = AUSGANG_OBEN;
+		_G(spieler).R49WegFrei = true;
+		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
 		show_cur();
 	} else if (is_cur_inventar(CIGAR_INV)) {
 		action_ret = true;
 		hide_cur();
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		r49_talk_boy(263);
 		SetUpScreenFunc = 0;
 		auto_move(5, P_CHEWY);
@@ -701,8 +701,8 @@ int16 r49_use_boy() {
 		flic_cut(FCUT_067, FLC_MODE);
 		room->set_timer_status(255, TIMER_STOP);
 		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->del_static_ani(spieler.R49BoyAni);
-		det->stop_detail(spieler.R49BoyAni);
+		det->del_static_ani(_G(spieler).R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni);
 		flags.NoScroll = false;
 
 		set_person_spr(P_RIGHT, P_CHEWY);
@@ -712,39 +712,39 @@ int16 r49_use_boy() {
 		inventory_2_cur(GUM_INV);
 		atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 		SetUpScreenFunc = r49setup_func;
-		spieler.R49BoyWeg = true;
+		_G(spieler).R49BoyWeg = true;
 		show_cur();
 	}
 	return action_ret;
 }
 
 void r49_talk_boy() {
-	if (!spieler.R49BoyWeg) {
+	if (!_G(spieler).R49BoyWeg) {
 		auto_move(3, P_CHEWY);
-		r49_talk_boy(266 + spieler.R49WegFrei);
+		r49_talk_boy(266 + _G(spieler).R49WegFrei);
 	}
 }
 
 void r49_talk_boy(int16 aad_nr) {
-	if (!spieler.R49BoyWeg) {
+	if (!_G(spieler).R49BoyWeg) {
 		room->set_timer_status(255, TIMER_STOP);
 		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->stop_detail(spieler.R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni);
 
-		det->set_static_ani(spieler.R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
 		det->set_static_ani(2, -1);
 		SetUpScreenFunc = 0;
 		stop_person(P_HOWARD);
 		start_aad_wait(aad_nr, -1);
 		SetUpScreenFunc = r49setup_func;
 		det->del_static_ani(2);
-		det->set_static_ani(spieler.R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
 		room->set_timer_status(255, TIMER_START);
 	}
 }
 
 void r49_look_hotel() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 49) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 
 		SetUpScreenFunc = 0;
 		stop_person(P_HOWARD);
@@ -755,20 +755,20 @@ void r49_look_hotel() {
 
 int16 r49_use_taxi() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
 		start_ani_block(2, ablock34);
 		det->show_static_spr(7);
 		auto_move(2, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
-		spieler.R48TaxiPerson[P_CHEWY] = true;
-		if (spieler.PersonRoomNr[P_HOWARD] == 49) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 			go_auto_xy(507, 74, P_HOWARD, ANI_WAIT);
 			go_auto_xy(490, 58, P_HOWARD, ANI_WAIT);
-			spieler.PersonHide[P_HOWARD] = true;
-			spieler.R48TaxiPerson[P_HOWARD] = true;
-			spieler.PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 		det->hide_static_spr(7);
 		start_detail_wait(5, 1, ANI_VOR);
@@ -780,7 +780,7 @@ int16 r49_use_taxi() {
 void r49setup_func() {
 	int16 x, y;
 	int16 ch_x;
-	if (spieler.PersonRoomNr[P_HOWARD] == 49) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = 64;
@@ -804,18 +804,18 @@ void r49setup_func() {
 }
 
 void r50_entry(int16 eib_nr) {
-	spieler.ScrollxStep = 2;
-	if (spieler.R50Zigarre) {
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R50Zigarre) {
 		r50_stop_cigar();
 	} else
 		det->start_detail(0, 255, ANI_VOR);
-	if (!spieler.R50KeyOK) {
+	if (!_G(spieler).R50KeyOK) {
 		_G(timer_nr)[0] = room->set_timer(1, 8);
 		r50Wasser = false;
 	} else
 		det->show_static_spr(4);
 	SetUpScreenFunc = r50setup_func;
-	if (spieler.PersonRoomNr[P_HOWARD] == 50) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		spieler_mi[P_HOWARD].Mode = true;
 		if (!flags.LoadGame) {
 			if (eib_nr == 85)
@@ -827,12 +827,12 @@ void r50_entry(int16 eib_nr) {
 }
 
 void r50_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
-	if (spieler.PersonRoomNr[P_HOWARD] == 50) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		if (eib_nr == 83)
-			spieler.PersonRoomNr[P_HOWARD] = 49;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 49;
 		else
-			spieler.PersonRoomNr[P_HOWARD] = 51;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -842,7 +842,7 @@ void r50_stop_cigar() {
 	det->del_static_ani(0);
 	atds->set_ats_str(328, 1, ATS_DATEI);
 	det->stop_detail(0);
-	spieler.R50Zigarre = true;
+	_G(spieler).R50Zigarre = true;
 }
 
 void r50_calc_wasser() {
@@ -868,7 +868,7 @@ void r50_go_page() {
 void r50_calc_treppe() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
-		if (!spieler.R50KeyOK) {
+		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			stop_person(P_CHEWY);
 			room->set_timer_status(1, TIMER_STOP);
@@ -887,13 +887,13 @@ int16 r50_use_gutschein() {
 	int16 action_ret = false;
 	if (is_cur_inventar(HOTEL_INV)) {
 		action_ret = true;
-		if (!spieler.R50KeyOK) {
+		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			room->set_timer_status(1, TIMER_STOP);
 			r50Wasser = false;
 			r50_stop_page();
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			start_ani_block(2, ablock36);
 			r50_aad_page(274, 8);
 		} else
@@ -907,7 +907,7 @@ int16 r50_use_gum() {
 	if (is_cur_inventar(GUM_INV)) {
 		action_ret = true;
 		hide_cur();
-		spieler.R50KeyOK = true;
+		_G(spieler).R50KeyOK = true;
 		room->set_timer_status(1, TIMER_STOP);
 		r50Wasser = false;
 		r50_stop_page();
@@ -919,7 +919,7 @@ int16 r50_use_gum() {
 		SetUpScreenFunc = 0;
 		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		hide_person();
 		start_detail_wait(2, 1, ANI_VOR);
 		det->show_static_spr(4);
@@ -941,7 +941,7 @@ int16 r50_use_gum() {
 		inventory_2_cur(KEY_INV);
 		atds->set_ats_str(323, 1, ATS_DATEI);
 		atds->set_ats_str(327, 1, ATS_DATEI);
-		spieler.room_e_obj[84].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
 		show_cur();
 	}
 	return action_ret;
@@ -957,7 +957,7 @@ void r50_aad_page(int16 aad_nr, int16 ani_nr) {
 	det->del_static_ani(ani_nr);
 	start_detail_wait(6, 1, ANI_RUECK);
 	r50_go_page();
-	if (!spieler.R50KeyOK)
+	if (!_G(spieler).R50KeyOK)
 		room->set_timer_status(1, TIMER_START);
 	show_cur();
 }
@@ -969,7 +969,7 @@ void r50setup_func() {
 		r50Wasser = false;
 		r50_go_page();
 	}
-	if (spieler.PersonRoomNr[P_HOWARD] == 50) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = 64;
@@ -1000,15 +1000,15 @@ void r51_entry() {
 	_G(zoom_mov_fak) = 4;
 	for (i = 0; i < 2; i++)
 		det->start_detail(3 + i, 1, ANI_VOR);
-	if (spieler.PersonRoomNr[P_HOWARD] == 51) {
-		spieler.ZoomXy[P_HOWARD][0] = 40;
-		spieler.ZoomXy[P_HOWARD][1] = 30;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 		if (!flags.LoadGame) {
 			set_person_pos(88, 93, P_HOWARD, P_RIGHT);
 		}
-		if (!spieler.R51FirstEntry) {
+		if (!_G(spieler).R51FirstEntry) {
 			hide_cur();
-			spieler.R51FirstEntry = true;
+			_G(spieler).R51FirstEntry = true;
 			set_person_spr(P_LEFT, P_CHEWY);
 			start_aad_wait(283, -1);
 			show_cur();
@@ -1019,11 +1019,11 @@ void r51_entry() {
 }
 
 void r51_exit(int16 eib_nr) {
-	if (spieler.PersonRoomNr[P_HOWARD] == 51) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		if (eib_nr == 85) {
-			spieler.PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		} else
-			spieler.PersonRoomNr[P_HOWARD] = 52;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -1031,7 +1031,7 @@ void r51_exit(int16 eib_nr) {
 void r51setup_func() {
 	int16 x, y;
 	int16 ch_y;
-	if (spieler.PersonRoomNr[P_HOWARD] == 51) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = 64;
@@ -1062,11 +1062,11 @@ int16 r51_use_door(int16 txt_nr) {
 			auto_move(8, P_CHEWY);
 			SetUpScreenFunc = 0;
 			det->show_static_spr(0);
-			if (!spieler.R51HotelRoom) {
+			if (!_G(spieler).R51HotelRoom) {
 				auto_move(11, P_HOWARD);
 				set_person_spr(P_LEFT, P_HOWARD);
-				spieler.R51HotelRoom = true;
-				spieler.room_e_obj[86].Attribut = AUSGANG_LINKS;
+				_G(spieler).R51HotelRoom = true;
+				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
 				start_aad_wait(285, -1);
 				atds->set_ats_str(329, 1, ATS_DATEI);
 				SetUpScreenFunc = r51setup_func;
@@ -1078,11 +1078,11 @@ int16 r51_use_door(int16 txt_nr) {
 
 		case 330:
 			auto_move(9, P_CHEWY);
-			if (!spieler.R51KillerWeg) {
+			if (!_G(spieler).R51KillerWeg) {
 				det->show_static_spr(1);
 				start_detail_wait(2, 1, ANI_VOR);
 				det->start_detail(5, 255, ANI_VOR);
-				if (!spieler.R52HotDogOk) {
+				if (!_G(spieler).R52HotDogOk) {
 					start_aad_wait(287, -1);
 					auto_move(12, P_CHEWY);
 					det->stop_detail(5);
@@ -1090,7 +1090,7 @@ int16 r51_use_door(int16 txt_nr) {
 					det->hide_static_spr(1);
 					start_aad_wait(284, -1);
 				} else {
-					spieler.R51KillerWeg = true;
+					_G(spieler).R51KillerWeg = true;
 					start_aad_wait(290, -1);
 					out->ausblenden(1);
 					out->setze_zeiger(0);
@@ -1127,7 +1127,7 @@ int16 r51_use_door(int16 txt_nr) {
 
 		case 333:
 			auto_move(4, P_CHEWY);
-			switch (spieler.R51DoorCount) {
+			switch (_G(spieler).R51DoorCount) {
 			case 0:
 				det->show_static_spr(3);
 				start_aad_wait(278, -1);
@@ -1137,7 +1137,7 @@ int16 r51_use_door(int16 txt_nr) {
 
 				det->show_static_spr(14);
 				start_aad_wait(279, -1);
-				++spieler.R51DoorCount;
+				++_G(spieler).R51DoorCount;
 				obj->show_sib(SIB_FLASCHE_R51);
 				obj->calc_rsi_flip_flop(SIB_FLASCHE_R51);
 				det->hide_static_spr(3);
@@ -1147,7 +1147,7 @@ int16 r51_use_door(int16 txt_nr) {
 				det->show_static_spr(3);
 				start_aad_wait(280, -1);
 				start_detail_wait(1, 1, ANI_VOR);
-				++spieler.R51DoorCount;
+				++_G(spieler).R51DoorCount;
 				obj->show_sib(SIB_KAPPE_R51);
 				obj->calc_rsi_flip_flop(SIB_KAPPE_R51);
 				det->hide_static_spr(3);
@@ -1156,7 +1156,7 @@ int16 r51_use_door(int16 txt_nr) {
 
 			default :
 				start_aad_wait(281, -1);
-				if (spieler.PersonRoomNr[P_HOWARD] == 51)
+				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
 					start_aad_wait(282, -1);
 				break;
 
@@ -1185,25 +1185,25 @@ void r51_timer_action(int16 t_nr, int16 obj_nr) {
 void r52_entry() {
 	SetUpScreenFunc = r52setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
-	if (spieler.R52HotDogOk && !spieler.R52KakerWeg)
+	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg)
 		r52_plot_armee(0);
-	if (spieler.R52KakerWeg)
+	if (_G(spieler).R52KakerWeg)
 		det->stop_detail(0);
 	if (!flags.LoadGame) {
 		det->show_static_spr(4);
-		spieler.R52TuerAuf = true;
+		_G(spieler).R52TuerAuf = true;
 		set_person_pos(20, 50, P_HOWARD, P_LEFT);
 		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
-		spieler.R52TuerAuf = false;
+		_G(spieler).R52TuerAuf = false;
 		det->hide_static_spr(4);
 		check_shad(2, 1);
 	}
 }
 
 void r52_exit() {
-	if (spieler.PersonRoomNr[P_HOWARD] == 52) {
-		spieler.PersonRoomNr[P_HOWARD] = 51;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 51;
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -1217,9 +1217,9 @@ int16 r52_use_hot_dog() {
 		auto_move(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
 		det->show_static_spr(0);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		auto_move(4, P_CHEWY);
-		spieler.R52HotDogOk = true;
+		_G(spieler).R52HotDogOk = true;
 		r52_plot_armee(20);
 		atds->set_ats_str(341, 1, ATS_DATEI);
 		auto_move(2, P_CHEWY);
@@ -1228,7 +1228,7 @@ int16 r52_use_hot_dog() {
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
 		auto_move(5, P_CHEWY);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(7, 1, ANI_VOR);
 		det->start_detail(8, 255, ANI_VOR);
 		for (i = 0; i < 5; i++) {
@@ -1238,11 +1238,11 @@ int16 r52_use_hot_dog() {
 		det->stop_detail(0);
 		det->stop_detail(8);
 		start_detail_wait(7, 1, ANI_RUECK);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(303, -1);
 		atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
-		spieler.R52KakerWeg = true;
+		_G(spieler).R52KakerWeg = true;
 	}
 	show_cur();
 	return action_ret;
@@ -1257,11 +1257,11 @@ void r52_plot_armee(int16 frame) {
 }
 
 void r52_kaker_platt() {
-	if (!spieler.R52KakerJoke &&
-	        spieler.R52HotDogOk &&
-	        !spieler.R52KakerWeg &&
+	if (!_G(spieler).R52KakerJoke &&
+	        _G(spieler).R52HotDogOk &&
+	        !_G(spieler).R52KakerWeg &&
 	        !flags.ExitMov) {
-		spieler.R52KakerJoke = true;
+		_G(spieler).R52KakerJoke = true;
 		stop_person(P_CHEWY);
 		start_aad_wait(289, -1);
 	}
@@ -1270,7 +1270,7 @@ void r52_kaker_platt() {
 void r52setup_func() {
 	int16 x, y;
 	int16 ch_y;
-	if (spieler.PersonRoomNr[P_HOWARD] == 52) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
 		x = 1;
 		ch_y = spieler_vector[P_CHEWY].Xypos[1];
@@ -1298,7 +1298,7 @@ void r53_man_go() {
 	det->del_static_ani(1);
 	start_detail_wait(5, 1, ANI_VOR);
 	atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-	if (!spieler.R53Visit)
+	if (!_G(spieler).R53Visit)
 		obj->show_sib(SIB_VISIT_R53);
 }
 
@@ -1309,7 +1309,7 @@ void r53_talk_man() {
 	det->del_static_ani(1);
 	start_detail_wait(2, 1, ANI_VOR);
 	det->set_static_ani(3, -1);
-	start_aad_wait(269 + (int16)spieler.R53Kostuem, -1);
+	start_aad_wait(269 + (int16)_G(spieler).R53Kostuem, -1);
 	det->del_static_ani(3);
 	start_detail_wait(4, 1, ANI_VOR);
 	r53_man_go();
@@ -1321,8 +1321,8 @@ int16 r53_use_man() {
 	if (is_cur_inventar(BESTELL_INV)) {
 		action_ret = true;
 		hide_cur();
-		spieler.R53Kostuem = true;
-		del_inventar(spieler.AkInvent);
+		_G(spieler).R53Kostuem = true;
+		del_inventar(_G(spieler).AkInvent);
 		auto_move(2, P_CHEWY);
 		start_aad_wait(271, -1);
 		room->set_timer_status(1, TIMER_STOP);
@@ -1337,51 +1337,51 @@ int16 r53_use_man() {
 }
 
 void r54_entry(int16 eib_nr) {
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r54_setup_func;
 	_G(zoom_horizont) = 106;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler.ZoomXy[P_HOWARD][0] = 30;
-	spieler.ZoomXy[P_HOWARD][1] = 66;
-	if (spieler.R54FputzerWeg)
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
+	if (_G(spieler).R54FputzerWeg)
 		det->show_static_spr(9);
 	spieler_mi[P_HOWARD].Mode = true;
 	if (!flags.LoadGame) {
-		if (spieler.R48TaxiEntry) {
-			spieler.R48TaxiEntry = false;
-			if (spieler.PersonRoomNr[P_HOWARD] == 54) {
-				spieler.R54HowardVorne = false;
+		if (_G(spieler).R48TaxiEntry) {
+			_G(spieler).R48TaxiEntry = false;
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+				_G(spieler).R54HowardVorne = false;
 				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
 			}
 			set_person_pos(300, 80, P_CHEWY, P_LEFT);
 			_G(maus_links_click) = false;
-			spieler.scrollx = 134;
-			spieler.scrolly = 0;
-		} else if (spieler.R55Location) {
+			_G(spieler).scrollx = 134;
+			_G(spieler).scrolly = 0;
+		} else if (_G(spieler).R55Location) {
 			r54_aufzug_ab();
-		} else if (eib_nr == 90 || spieler.R55ExitDia) {
-			if (spieler.PersonRoomNr[P_HOWARD] == 54) {
-				spieler.R54HowardVorne = false;
+		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+				_G(spieler).R54HowardVorne = false;
 				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
 			}
-			spieler.scrollx = 66;
+			_G(spieler).scrollx = 66;
 			set_person_pos(241, 85, P_CHEWY, P_LEFT);
 		}
-		if (spieler.R55ExitDia) {
-			start_aad_wait(spieler.R55ExitDia, -1);
+		if (_G(spieler).R55ExitDia) {
+			start_aad_wait(_G(spieler).R55ExitDia, -1);
 		}
-		if (spieler.R55R54First) {
-			spieler.R55R54First = false;
+		if (_G(spieler).R55R54First) {
+			_G(spieler).R55R54First = false;
 			r54_calc_auto_taxi();
 		}
 	}
 }
 
 void r54_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
-	if (eib_nr == 89 && spieler.PersonRoomNr[P_HOWARD] == 54) {
-		spieler.PersonRoomNr[P_HOWARD] = 55;
+	_G(spieler).ScrollxStep = 1;
+	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -1389,7 +1389,7 @@ void r54_exit(int16 eib_nr) {
 void r54_calc_auto_taxi() {
 	int16 r_nr;
 	r_nr = 0;
-	if (spieler.R56AbfahrtOk) {
+	if (_G(spieler).R56AbfahrtOk) {
 		r_nr = 57;
 	} else if (obj->check_inventar(KAPPE_INV)) {
 		r_nr = 56;
@@ -1397,12 +1397,12 @@ void r54_calc_auto_taxi() {
 	if (r_nr) {
 		hide_cur();
 		auto_move(7, P_CHEWY);
-		spieler.R54HowardVorne = false;
+		_G(spieler).R54HowardVorne = false;
 		go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
-		spieler.PersonRoomNr[P_HOWARD] = r_nr;
+		_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
 		_G(maus_links_click) = false;
 		show_cur();
-		spieler.R48TaxiEntry = true;
+		_G(spieler).R48TaxiEntry = true;
 		switch_room(r_nr);
 	}
 }
@@ -1410,11 +1410,11 @@ void r54_calc_auto_taxi() {
 void r54_setup_func() {
 	int16 x, y;
 	int16 ch_x;
-	if (spieler.PersonRoomNr[P_HOWARD] == 54) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 		calc_person_look();
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (spieler.R54HowardVorne != 255) {
-			if (spieler.R54HowardVorne) {
+		if (_G(spieler).R54HowardVorne != 255) {
+			if (_G(spieler).R54HowardVorne) {
 				if (ch_x < 218) {
 					x = 150;
 					y = 113;
@@ -1440,12 +1440,12 @@ void r54_setup_func() {
 int16 r54_use_schalter() {
 	int16 aad_nr;
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		action_ret = true;
-		if (!spieler.R54FputzerWeg) {
+		if (!_G(spieler).R54FputzerWeg) {
 			auto_move(1, P_CHEWY);
-			spieler.R54HowardVorne = 255;
+			_G(spieler).R54HowardVorne = 255;
 			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
 			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
 			start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
@@ -1453,10 +1453,10 @@ int16 r54_use_schalter() {
 			auto_move(2, P_CHEWY);
 			start_detail_wait(1, 1, ANI_VOR);
 			det->start_detail(3, 255, ANI_VOR);
-			start_aad_wait(292 + spieler.R54LiftCount, -1);
+			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
 			det->stop_detail(3);
-			++spieler.R54LiftCount;
-			if (spieler.R54LiftCount < 3) {
+			++_G(spieler).R54LiftCount;
+			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_VOR);
 				det->hide_static_spr(0);
 				start_detail_wait(1, 1, ANI_RUECK);
@@ -1466,13 +1466,13 @@ int16 r54_use_schalter() {
 				det->show_static_spr(9);
 				start_detail_wait(4, 1, ANI_VOR);
 				aad_nr = 296;
-				spieler.R54FputzerWeg = true;
+				_G(spieler).R54FputzerWeg = true;
 				atds->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_ats_str(349, 1, ATS_DATEI);
 				atds->set_ats_str(345, 1, ATS_DATEI);
 			}
 			start_aad_wait(aad_nr, -1);
-			spieler.R54HowardVorne = false;
+			_G(spieler).R54HowardVorne = false;
 		} else
 			start_aad_wait(297, -1);
 		show_cur();
@@ -1482,14 +1482,14 @@ int16 r54_use_schalter() {
 
 void r54_talk_verkauf() {
 	hide_cur();
-	if (!spieler.R54HotDogOk) {
-		if (spieler.AkInvent == DOLLAR175_INV)
+	if (!_G(spieler).R54HotDogOk) {
+		if (_G(spieler).AkInvent == DOLLAR175_INV)
 			del_inventar(DOLLAR175_INV);
 		else
 			del_invent_slot(DOLLAR175_INV);
-		spieler.R54HotDogOk = true;
+		_G(spieler).R54HotDogOk = true;
 		auto_move(3, P_CHEWY);
-		spieler.R54HowardVorne = true;
+		_G(spieler).R54HowardVorne = true;
 		start_aad_wait(299, -1);
 		room->set_timer_status(6, TIMER_STOP);
 		det->del_static_ani(6);
@@ -1516,21 +1516,21 @@ void r54_talk_verkauf() {
 int16 r54_use_zelle() {
 	int16 action_ret = false;
 	hide_cur();
-	if (spieler.inv_cur) {
+	if (_G(spieler).inv_cur) {
 		if (is_cur_inventar(JMKOST_INV)) {
 			action_ret = true;
-			if (!spieler.R54Schild) {
+			if (!_G(spieler).R54Schild) {
 				start_aad_wait(318, -1);
 			} else {
 				auto_move(5, P_CHEWY);
-				spieler.R54HowardVorne = true;
+				_G(spieler).R54HowardVorne = true;
 				SetUpScreenFunc = 0;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
 				flc->set_flic_user_function(r54_cut_serv);
 				flic_cut(FCUT_069, FLC_MODE);
 				flc->remove_flic_user_function();
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				invent_2_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_JMANS);
 				_G(zoom_horizont) = 90;
@@ -1547,7 +1547,7 @@ int16 r54_use_zelle() {
 	} else {
 		action_ret = true;
 		auto_move(6, P_CHEWY);
-		spieler.R54HowardVorne = true;
+		_G(spieler).R54HowardVorne = true;
 		start_aad_wait(319, -1);
 	}
 	show_cur();
@@ -1564,17 +1564,17 @@ int16 r54_use_azug() {
 	int16 ay;
 	int16 delay;
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
-		if (!spieler.R54LiftOk) {
-			if (spieler.R54FputzerWeg) {
+		if (!_G(spieler).R54LiftOk) {
+			if (_G(spieler).R54FputzerWeg) {
 				auto_move(8, P_CHEWY);
-				spieler.R54HowardVorne = false;
+				_G(spieler).R54HowardVorne = false;
 				start_aad_wait(298, -1);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->show_static_spr(12);
-				spieler.R55Location = true;
+				_G(spieler).R55Location = true;
 				SetUpScreenFunc = 0;
 				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
 				ch_y = 68;
@@ -1586,7 +1586,7 @@ int16 r54_use_azug() {
 					if (!delay) {
 						ch_y -= 3;
 						ay -= 3;
-						delay = spieler.DelaySpeed / 2;
+						delay = _G(spieler).DelaySpeed / 2;
 					} else
 						--delay;
 					set_up_screen(DO_SETUP);
@@ -1606,7 +1606,7 @@ void r54_aufzug_ab() {
 	int16 delay;
 	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
-	spieler.scrollx = 0;
+	_G(spieler).scrollx = 0;
 	SetUpScreenFunc = r54_setup_func;
 	ch_y = -40;
 	ay = -108;
@@ -1618,97 +1618,97 @@ void r54_aufzug_ab() {
 		if (!delay) {
 			ch_y += 3;
 			ay += 3;
-			delay = spieler.DelaySpeed / 2;
+			delay = _G(spieler).DelaySpeed / 2;
 		} else
 			--delay;
 		set_up_screen(DO_SETUP);
 	}
 	det->hide_static_spr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(maus_links_click) = false;
 	stop_person(P_CHEWY);
-	spieler.R55Location = false;
+	_G(spieler).R55Location = false;
 }
 
 short r54_use_taxi() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
 		auto_move(7, P_CHEWY);
-		spieler.R48TaxiPerson[P_CHEWY] = true;
-		if (spieler.PersonRoomNr[P_HOWARD] == 54) {
-			if (spieler.R54HowardVorne) {
-				spieler.R54HowardVorne = false;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+			if (_G(spieler).R54HowardVorne) {
+				_G(spieler).R54HowardVorne = false;
 				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
 			}
-			spieler.PersonHide[P_HOWARD] = true;
-			spieler.R48TaxiPerson[P_HOWARD] = true;
-			spieler.PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(48);
 	}
 	return action_ret;
 }
 
 void r55_entry() {
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r55_setup_func;
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler.R55ExitDia = 0;
-	spieler.ZoomXy[P_HOWARD][0] = 20;
-	spieler.ZoomXy[P_HOWARD][1] = 22;
-	if (!spieler.R54FputzerWeg)
+	_G(spieler).R55ExitDia = 0;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
+	if (!_G(spieler).R54FputzerWeg)
 		det->start_detail(6, 255, ANI_VOR);
 
-	if ((spieler.R55RaumOk) || (!spieler.R55RaumOk && spieler.R55ScriptWeg))
+	if ((_G(spieler).R55RaumOk) || (!_G(spieler).R55RaumOk && _G(spieler).R55ScriptWeg))
 		det->hide_static_spr(0);
-	if (!spieler.R55SekWeg) {
+	if (!_G(spieler).R55SekWeg) {
 		det->start_detail(8, 255, ANI_VOR);
 		det->start_detail(9, 255, ANI_VOR);
-		spieler.R55Entry ^= 1;
-		_G(timer_nr)[0] = room->set_timer(19 + (int16)spieler.R55Entry, 10);
-		det->set_static_ani(19 + (int16)spieler.R55Entry, -1);
+		_G(spieler).R55Entry ^= 1;
+		_G(timer_nr)[0] = room->set_timer(19 + (int16)_G(spieler).R55Entry, 10);
+		det->set_static_ani(19 + (int16)_G(spieler).R55Entry, -1);
 	}
 	spieler_mi[P_HOWARD].Mode = true;
-	if (spieler.R55Job) {
+	if (_G(spieler).R55Job) {
 		r55_rock2mans();
-		spieler.PersonRoomNr[P_HOWARD] = 54;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 	}
-	if (spieler.ChewyAni == CHEWY_JMANS) {
+	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
 		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
 		room->set_zoom(10);
 	}
-	if (spieler.R55EscScriptOk && !spieler.R55RaumOk)
+	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
 		det->show_static_spr(0);
 	if (!flags.LoadGame) {
-		if (spieler.R55Location) {
-			spieler.scrollx = 136;
+		if (_G(spieler).R55Location) {
+			_G(spieler).scrollx = 136;
 			set_person_pos(400, 82, P_CHEWY, P_RIGHT);
 			start_detail_wait(3, 1, ANI_VOR);
 			_G(timer_nr)[0] = room->set_timer(4, 10);
 			det->set_static_ani(4, -1);
 			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
-			spieler.scrollx = 0;
-			if (spieler.PersonRoomNr[P_HOWARD] == 55) {
+			_G(spieler).scrollx = 0;
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
 			}
 			det->show_static_spr(8);
 			auto_move(1, P_CHEWY);
 			hide_cur();
 			det->hide_static_spr(8);
-			if (spieler.R55SekWeg && !spieler.R55Job) {
+			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
 
 				set_person_spr(P_LEFT, P_CHEWY);
-				if (spieler.ChewyAni == CHEWY_ROCKER) {
+				if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 					r55_verleger_mov(0);
 					r55_talk_line();
-					spieler.R54Schild = true;
+					_G(spieler).R54Schild = true;
 				} else {
 					r55_verleger_mov(1);
 					r55_get_job();
@@ -1722,37 +1722,37 @@ void r55_entry() {
 void r55_exit(int16 eib_nr) {
 	if (eib_nr == 90) {
 		r55_mans2rock();
-		if (spieler.PersonRoomNr[P_HOWARD] == 55) {
-			spieler.PersonRoomNr[P_HOWARD] = 54;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 			spieler_mi[P_HOWARD].Mode = false;
 		}
 	}
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 }
 
 int16 r55_use_stapel1() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
-		if (!spieler.R55ScriptWeg) {
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R55ScriptWeg) {
 			action_ret = true;
-			spieler.R55ScriptWeg = true;
+			_G(spieler).R55ScriptWeg = true;
 			auto_move(4, P_CHEWY);
 			det->hide_static_spr(0);
 			auto_move(5, P_CHEWY);
 			det->show_static_spr(1);
 			atds->set_ats_str(354, 1, ATS_DATEI);
 			atds->set_ats_str(355, 1, ATS_DATEI);
-		} else if (spieler.R55EscScriptOk && !spieler.R55RaumOk) {
+		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
 			start_aad_wait(333, -1);
 		}
 	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
-		if (spieler.R55ScriptWeg) {
+		if (_G(spieler).R55ScriptWeg) {
 			auto_move(4, P_CHEWY);
-			spieler.R55EscScriptOk = true;
+			_G(spieler).R55EscScriptOk = true;
 			det->show_static_spr(0);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			atds->set_ats_str(354, 2, ATS_DATEI);
 		} else
 			start_aad_wait(326, -1);
@@ -1774,20 +1774,20 @@ int16 r55_use_telefon() {
 	int16 delay;
 	int16 tmp_delay;
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		if (spieler.R55EscScriptOk) {
-			if (!spieler.R55RaumOk) {
+		if (_G(spieler).R55EscScriptOk) {
+			if (!_G(spieler).R55RaumOk) {
 				hide_cur();
-				spieler.R55RaumOk = true;
+				_G(spieler).R55RaumOk = true;
 				auto_move(6, P_CHEWY);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_detail_wait(10, 1, ANI_VOR);
 				det->start_detail(11, 255, ANI_VOR);
 				start_aad_wait(329, -1);
 				det->stop_detail(11);
 				start_detail_wait(10, 1, ANI_RUECK);
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 				auto_move(7, P_CHEWY);
 				flags.NoScroll = true;
 				auto_scroll(0, 0);
@@ -1802,7 +1802,7 @@ int16 r55_use_telefon() {
 				det->hide_static_spr(8);
 				atds->set_ats_str(354, 1, ATS_DATEI);
 				flic_cut(FCUT_071, FLC_MODE);
-				spieler.PersonRoomNr[P_HOWARD] = 55;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
 				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
 				SetUpScreenFunc = 0;
@@ -1810,13 +1810,13 @@ int16 r55_use_telefon() {
 				start_aad_wait(334, -1);
 				start_aad_wait(335, -1);
 				start_aad_wait(336, -1);
-				tmp_delay = spieler.DelaySpeed;
+				tmp_delay = _G(spieler).DelaySpeed;
 				for (i = 0; i < 7; i++) {
 					delay = tmp_delay;
-					if (!spieler.scrollx)
-						spieler.scrollx = 8;
+					if (!_G(spieler).scrollx)
+						_G(spieler).scrollx = 8;
 					else
-						spieler.scrollx = 0;
+						_G(spieler).scrollx = 0;
 					while (delay) {
 						out->skip_frame(1);
 						--delay;
@@ -1829,12 +1829,12 @@ int16 r55_use_telefon() {
 				invent_2_slot(EINLAD_INV);
 				del_invent_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_ROCKER);
-				spieler.PersonRoomNr[P_HOWARD] = 54;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 				spieler_mi[P_HOWARD].Mode = false;
 				show_cur();
-				spieler.R55R54First = true;
-				spieler.R55ExitDia = 337;
-				spieler.room_e_obj[89].Attribut = 255;
+				_G(spieler).R55R54First = true;
+				_G(spieler).R55ExitDia = 337;
+				_G(spieler).room_e_obj[89].Attribut = 255;
 				switch_room(54);
 			} else {
 				start_aad_wait(332, -1);
@@ -1850,19 +1850,19 @@ void r55_get_job() {
 	int16 tmp_scrollx;
 	int16 tmp_scrolly;
 	int16 r_nr;
-	spieler.PersonHide[P_CHEWY] = true;
-	tmp_scrollx = spieler.scrollx;
-	tmp_scrolly = spieler.scrolly;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	tmp_scrollx = _G(spieler).scrollx;
+	tmp_scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	switch_room(61);
 	show_cur();
 	start_ads_wait(15);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	flags.LoadGame = true;
-	spieler.scrollx = tmp_scrollx;
-	spieler.scrolly = tmp_scrolly;
-	if (spieler.R55Job) {
+	_G(spieler).scrollx = tmp_scrollx;
+	_G(spieler).scrolly = tmp_scrolly;
+	if (_G(spieler).R55Job) {
 		r_nr = 55;
 		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
@@ -1871,7 +1871,7 @@ void r55_get_job() {
 		r_nr = 54;
 		r55_mans2rock();
 	}
-	spieler.PersonRoomNr[P_HOWARD] = r_nr;
+	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
 	spieler_mi[P_HOWARD].Mode = true;
 	if (r_nr == 54)
 		flags.LoadGame = false;
@@ -1882,8 +1882,8 @@ void r55_get_job() {
 }
 
 void r55_mans2rock() {
-	if (spieler.ChewyAni == CHEWY_JMANS) {
-		spieler.R55ExitDia = 317;
+	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
+		_G(spieler).R55ExitDia = 317;
 		load_chewy_taf(CHEWY_ROCKER);
 		del_invent_slot(LEDER_INV);
 		invent_2_slot(JMKOST_INV);
@@ -1891,7 +1891,7 @@ void r55_mans2rock() {
 }
 
 void r55_rock2mans() {
-	if (spieler.ChewyAni == CHEWY_ROCKER) {
+	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 		load_chewy_taf(CHEWY_JMANS);
 		del_invent_slot(JMKOST_INV);
 		invent_2_slot(LEDER_INV);
@@ -1903,7 +1903,7 @@ void r55_verleger_mov(int16 mode) {
 	det->show_static_spr(11);
 	start_detail_wait(13, 1, ANI_VOR);
 	start_detail_wait(14, 1, ANI_VOR);
-	if (spieler.ChewyAni == CHEWY_JMANS)
+	if (_G(spieler).ChewyAni == CHEWY_JMANS)
 		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
 	if (mode)
 		start_detail_wait(15, 1, ANI_VOR);
@@ -1911,25 +1911,25 @@ void r55_verleger_mov(int16 mode) {
 }
 
 void r55_strasse(int16 mode) {
-	if (!spieler.inv_cur || mode) {
+	if (!_G(spieler).inv_cur || mode) {
 		room->set_timer_status(4, TIMER_STOP);
 		det->del_static_ani(4);
 		det->stop_detail(4);
 		atds->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		start_detail_wait(3, 1, ANI_RUECK);
 
-		spieler.scrollx = 0;
+		_G(spieler).scrollx = 0;
 		switch_room(54);
 	}
 }
 
 int16 r55_use_kammeraus() {
 	int16 action_ret = false;
-	if (spieler.R55Location) {
+	if (_G(spieler).R55Location) {
 		if (is_cur_inventar(KILLER_INV)) {
 			action_ret = true;
-			if (spieler.R52KakerWeg) {
-				if (!spieler.R55SekWeg) {
+			if (_G(spieler).R52KakerWeg) {
+				if (!_G(spieler).R55SekWeg) {
 					hide_cur();
 					room->set_timer_status(4, TIMER_STOP);
 					det->del_static_ani(4);
@@ -1939,12 +1939,12 @@ int16 r55_use_kammeraus() {
 					flc->set_flic_user_function(r55_cut_serv);
 					flic_cut(FCUT_070, FLC_MODE);
 					flc->remove_flic_user_function();
-					room->set_timer_status(19 + (int16)spieler.R55Entry, TIMER_STOP);
-					det->stop_detail(19 + (int16)spieler.R55Entry);
-					det->del_static_ani(19 + (int16)spieler.R55Entry);
+					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
+					det->stop_detail(19 + (int16)_G(spieler).R55Entry);
+					det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
 					det->hide_static_spr(10);
-					spieler.R55ExitDia = 322;
-					spieler.R55SekWeg = true;
+					_G(spieler).R55ExitDia = 322;
+					_G(spieler).R55SekWeg = true;
 					atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
 					atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
 					r55_strasse(1);
@@ -1967,7 +1967,7 @@ int16 r55_cut_serv(int16 frame) {
 void r55_setup_func() {
 	int16 x, y;
 	int16 ch_x;
-	if (spieler.PersonRoomNr[P_HOWARD] == 55) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 		calc_person_look();
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
 		if (ch_x < 100) {
@@ -1989,27 +1989,27 @@ void r55_setup_func() {
 
 void r55_talk_line() {
 	int16 aad_nr = 0;
-	if (spieler.R55Location == 0) {
-		if (spieler.ChewyAni == CHEWY_ROCKER) {
+	if (_G(spieler).R55Location == 0) {
+		if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 			hide_cur();
-			if (!spieler.R55SekWeg) {
+			if (!_G(spieler).R55SekWeg) {
 				auto_move(2, P_CHEWY);
 				flags.NoScroll = true;
 				auto_scroll(136, 0);
 				aad_nr = 320;
-				spieler.R55ExitDia = 321;
-				room->set_timer_status(19 + (int16)spieler.R55Entry, TIMER_STOP);
-				det->stop_detail(19 + (int16)spieler.R55Entry);
-				det->del_static_ani(19 + (int16)spieler.R55Entry);
+				_G(spieler).R55ExitDia = 321;
+				room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
+				det->stop_detail(19 + (int16)_G(spieler).R55Entry);
+				det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
 				start_detail_wait(22, 1, ANI_VOR);
 				det->set_static_ani(21, -1);
-			} else if (!spieler.R55RaumOk) {
+			} else if (!_G(spieler).R55RaumOk) {
 				auto_move(3, P_CHEWY);
 				aad_nr = 323;
-				spieler.R55ExitDia = 324;
+				_G(spieler).R55ExitDia = 324;
 			}
 			start_aad_wait(aad_nr, -1);
-			if (spieler.R55SekWeg) {
+			if (_G(spieler).R55SekWeg) {
 				det->del_static_ani(16);
 				start_detail_wait(14, 1, ANI_VOR);
 			} else {
@@ -2017,7 +2017,7 @@ void r55_talk_line() {
 				start_detail_wait(22, 1, ANI_VOR);
 			}
 			flags.NoScroll = false;
-			spieler.PersonRoomNr[P_HOWARD] = 54;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 			spieler_mi[P_HOWARD].Mode = false;
 			switch_room(54);
 			show_cur();
@@ -2026,19 +2026,19 @@ void r55_talk_line() {
 }
 
 void r56_entry() {
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	spieler_mi[P_HOWARD].Mode = true;
 	_G(timer_nr)[0] = room->set_timer(255, 25);
 	if (!flags.LoadGame) {
-		if (spieler.R48TaxiEntry) {
+		if (_G(spieler).R48TaxiEntry) {
 			hide_cur();
-			spieler.R48TaxiEntry = false;
-			spieler.scrollx = 0;
-			spieler.scrolly = 0;
-			spieler.PersonHide[P_CHEWY] = true;
-			spieler.PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiEntry = false;
+			_G(spieler).scrollx = 0;
+			_G(spieler).scrolly = 0;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_HOWARD] = true;
 			det->hide_static_spr(2);
 			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
@@ -2047,32 +2047,32 @@ void r56_entry() {
 			start_detail_wait(8, 1, ANI_VOR);
 			start_detail_wait(7, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
-			if (!spieler.R56GetTabak) {
+			if (!_G(spieler).R56GetTabak) {
 				flic_cut(FCUT_074, FLC_MODE);
 				det->show_static_spr(2);
 			}
 			room->set_zoom(23);
-			spieler.ZoomXy[P_HOWARD][0] = 17;
-			spieler.ZoomXy[P_HOWARD][1] = 37;
-			spieler.PersonHide[P_CHEWY] = false;
-			spieler.PersonHide[P_HOWARD] = false;
+			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
+			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_HOWARD] = false;
 			SetUpScreenFunc = r56_setup_func;
 			spieler_mi[P_CHEWY].Mode = true;
 			auto_move(1, P_CHEWY);
 			spieler_mi[P_CHEWY].Mode = false;
 			_G(maus_links_click) = false;
 			show_cur();
-		} else if (spieler.R62Flucht) {
+		} else if (_G(spieler).R62Flucht) {
 			_G(maus_links_click) = false;
-			spieler.ZoomXy[P_HOWARD][0] = 40;
-			spieler.ZoomXy[P_HOWARD][1] = 86;
+			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 			_G(zoom_horizont) = 114;
 			room->set_zoom(70);
-			spieler.R62Flucht = false;
+			_G(spieler).R62Flucht = false;
 			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
 			set_person_pos(429, 146, P_CHEWY, P_LEFT);
-			spieler.scrollx = 262;
-			spieler.PersonHide[P_HOWARD] = false;
+			_G(spieler).scrollx = 262;
+			_G(spieler).PersonHide[P_HOWARD] = false;
 			det->show_static_spr(9);
 			det->show_static_spr(8);
 			room->set_timer_status(0, TIMER_STOP);
@@ -2085,20 +2085,20 @@ void r56_entry() {
 		}
 	}
 	SetUpScreenFunc = r56_setup_func;
-	spieler.ZoomXy[P_HOWARD][0] = 40;
-	spieler.ZoomXy[P_HOWARD][1] = 86;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(zoom_horizont) = 114;
 	room->set_zoom(70);
 }
 
 void r56_exit() {
 	spieler_mi[P_HOWARD].Mode = false;
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 }
 
 int16 r56_use_taxi() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
 		auto_move(1, P_CHEWY);
@@ -2106,17 +2106,17 @@ int16 r56_use_taxi() {
 		det->start_detail(8, 1, ANI_VOR);
 		_G(zoom_horizont) = 0;
 		room->set_zoom(23);
-		spieler.ZoomXy[P_HOWARD][0] = 17;
-		spieler.ZoomXy[P_HOWARD][1] = 37;
+		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(3, 42, P_CHEWY, ANI_WAIT);
 		spieler_mi[P_CHEWY].Mode = false;
-		spieler.PersonHide[P_CHEWY] = true;
-		spieler.R48TaxiPerson[P_CHEWY] = true;
-		if (spieler.PersonRoomNr[P_HOWARD] == 56) {
-			spieler.PersonHide[P_HOWARD] = true;
-			spieler.R48TaxiPerson[P_HOWARD] = true;
-			spieler.PersonRoomNr[P_HOWARD] = 48;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 		show_cur();
 		switch_room(48);
@@ -2126,9 +2126,9 @@ int16 r56_use_taxi() {
 
 void r56_talk_man() {
 	auto_move(3, P_CHEWY);
-	if (!spieler.R56AbfahrtOk) {
+	if (!_G(spieler).R56AbfahrtOk) {
 		start_ads_wait(16);
-	} else if (!spieler.R62Flucht) {
+	} else if (!_G(spieler).R62Flucht) {
 		start_aad_wait(343, -1);
 	}
 }
@@ -2143,7 +2143,7 @@ int16 r56_use_man() {
 		room->set_timer_status(0, TIMER_STOP);
 		det->del_static_ani(0);
 
-		if (!spieler.R56WhiskyMix) {
+		if (!_G(spieler).R56WhiskyMix) {
 			start_detail_wait(4, 1, ANI_VOR);
 
 			det->set_static_ani(5, -1);
@@ -2152,8 +2152,8 @@ int16 r56_use_man() {
 			room->set_timer_status(0, TIMER_START);
 			det->set_static_ani(0, -1);
 		} else {
-			del_inventar(spieler.AkInvent);
-			spieler.R56AbfahrtOk = true;
+			del_inventar(_G(spieler).AkInvent);
+			_G(spieler).R56AbfahrtOk = true;
 			start_detail_wait(6, 1, ANI_VOR);
 
 			det->set_static_ani(1, -1);
@@ -2169,17 +2169,17 @@ int16 r56_use_man() {
 
 int16 r56_use_kneipe() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
 			hide_cur();
 			action_ret = true;
-			if (!spieler.R56Kneipe) {
+			if (!_G(spieler).R56Kneipe) {
 				SetUpScreenFunc = 0;
 				auto_move(4, P_CHEWY);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				go_auto_xy(160, 58, P_HOWARD, ANI_WAIT);
-				spieler.PersonHide[P_HOWARD] = true;
-				spieler.R56Kneipe = true;
+				_G(spieler).PersonHide[P_HOWARD] = true;
+				_G(spieler).R56Kneipe = true;
 				flags.NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
@@ -2189,9 +2189,9 @@ int16 r56_use_kneipe() {
 				det->stop_detail(10);
 				out->ausblenden(0);
 				set_up_screen(DO_SETUP);
-				spieler.PersonHide[P_CHEWY] = false;
-				spieler.PersonHide[P_HOWARD] = false;
-				spieler.scrollx = 0;
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_HOWARD] = false;
+				_G(spieler).scrollx = 0;
 				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
 				set_person_pos(50, 81, P_CHEWY, P_LEFT);
 
@@ -2248,7 +2248,7 @@ void r56_setup_func() {
 		break;
 
 	}
-	if (spieler.PersonRoomNr[P_HOWARD] == 56) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
 		calc_person_look();
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
 		ch_y = spieler_vector[P_CHEWY].Xypos[1];
@@ -2269,8 +2269,8 @@ void r56_setup_func() {
 	}
 	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
 		if (menu_item == CUR_WALK) {
-			if (minfo.x + spieler.scrollx >= 157 &&
-			        minfo.x + spieler.scrollx <= 204 &&
+			if (minfo.x + _G(spieler).scrollx >= 157 &&
+			        minfo.x + _G(spieler).scrollx <= 204 &&
 			        minfo.y >= 28 && minfo.y <= 89) {
 				cursor_wahl(CUR_AUSGANG_OBEN);
 			} else
@@ -2284,17 +2284,17 @@ void r57_entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	SetUpScreenFunc = r57_setup_func;
-	spieler.ZoomXy[P_HOWARD][0] = 46;
-	spieler.ZoomXy[P_HOWARD][1] = 86;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	spieler_mi[P_HOWARD].Mode = true;
-	if (spieler.R57StudioAuf)
+	if (_G(spieler).R57StudioAuf)
 		det->hide_static_spr(4);
 	if (!flags.LoadGame) {
-		if (spieler.R48TaxiEntry) {
+		if (_G(spieler).R48TaxiEntry) {
 			hide_cur();
-			spieler.R48TaxiEntry = false;
-			spieler.scrollx = 0;
-			spieler.scrolly = 0;
+			_G(spieler).R48TaxiEntry = false;
+			_G(spieler).scrollx = 0;
+			_G(spieler).scrolly = 0;
 			set_person_pos(4, 144, P_HOWARD, P_LEFT);
 			set_person_pos(40, 160, P_CHEWY, P_RIGHT);
 			auto_move(2, P_CHEWY);
@@ -2305,17 +2305,17 @@ void r57_entry() {
 }
 
 void r57_exit(int16 eib_nr) {
-	if (spieler.PersonRoomNr[P_HOWARD] == 57) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 		spieler_mi[P_HOWARD].Mode = false;
 		if (eib_nr == 91)
-			spieler.PersonRoomNr[P_HOWARD] = 62;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 62;
 	}
 }
 
 void r57_setup_func() {
 	int16 x, y;
 	int16 ch_y;
-	if (spieler.PersonRoomNr[P_HOWARD] == 57) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 		calc_person_look();
 		ch_y = spieler_vector[P_CHEWY].Xypos[1];
 		if (ch_y < 145) {
@@ -2331,19 +2331,19 @@ void r57_setup_func() {
 
 int16 r57_use_taxi() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
 		auto_move(3, P_CHEWY);
 		det->show_static_spr(7);
 		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
-		spieler.PersonHide[P_CHEWY] = true;
-		spieler.R48TaxiPerson[P_CHEWY] = true;
-		if (spieler.PersonRoomNr[P_HOWARD] == 57) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
-			spieler.PersonHide[P_HOWARD] = true;
-			spieler.R48TaxiPerson[P_HOWARD] = true;
-			spieler.PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 		det->hide_static_spr(7);
 		room->set_timer_status(3, TIMER_STOP);
@@ -2372,12 +2372,12 @@ int16 r57_use_pfoertner() {
 		action_ret = true;
 		SetUpScreenFunc = 0;
 		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
-		if (spieler.R56AbfahrtOk) {
+		if (_G(spieler).R56AbfahrtOk) {
 			start_aad_wait(341, -1);
 			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
-			del_inventar(spieler.AkInvent);
-			spieler.R57StudioAuf = true;
-			spieler.room_e_obj[91].Attribut = AUSGANG_OBEN;
+			del_inventar(_G(spieler).AkInvent);
+			_G(spieler).R57StudioAuf = true;
+			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
 			det->hide_static_spr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
 			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
@@ -2400,7 +2400,7 @@ void r57_talk_pfoertner() {
 	room->set_timer_status(1, TIMER_STOP);
 	det->del_static_ani(1);
 	det->set_static_ani(3, -1);
-	if (!spieler.R57StudioAuf) {
+	if (!_G(spieler).R57StudioAuf) {
 		aad_nr = 338;
 	} else
 		aad_nr = 342;
@@ -2416,35 +2416,35 @@ void r58_entry() {
 
 void r58_exit() {
 	int16 tmp;
-	spieler.scrollx = spieler.R58TmpSx;
-	spieler.scrolly = spieler.R58TmpSy;
-	spieler_vector[P_CHEWY].Xypos[0] = spieler.R58TmpX;
-	spieler_vector[P_CHEWY].Xypos[1] = spieler.R58TmpY;
-	spieler_mi[P_CHEWY].XyzStart[0] = spieler.R58TmpX;
-	spieler_mi[P_CHEWY].XyzStart[1] = spieler.R58TmpY;
+	_G(spieler).scrollx = _G(spieler).R58TmpSx;
+	_G(spieler).scrolly = _G(spieler).R58TmpSy;
+	spieler_vector[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
+	spieler_vector[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
+	spieler_mi[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
+	spieler_mi[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
 	flags.MainInput = true;
 	flags.LoadGame = true;
 	show_person();
 	set_person_rnr();
-	tmp = spieler.R58TmpRoom1;
-	spieler.PersonRoomNr[P_CHEWY] = spieler.R58TmpRoom;
+	tmp = _G(spieler).R58TmpRoom1;
+	_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
 
 	switch_room(tmp);
 
 }
 
 void r58_look_cut_mag(int16 r_nr) {
-	spieler.R58TmpRoom = r_nr;
-	spieler.R58TmpRoom1 = spieler.PersonRoomNr[P_CHEWY];;
+	_G(spieler).R58TmpRoom = r_nr;
+	_G(spieler).R58TmpRoom1 = _G(spieler).PersonRoomNr[P_CHEWY];;
 
-	spieler.R58TmpSx = spieler.scrollx;
-	spieler.R58TmpSy = spieler.scrolly;
-	spieler.R58TmpX = spieler_vector[P_CHEWY].Xypos[0];
-	spieler.R58TmpY = spieler_vector[P_CHEWY].Xypos[1];
+	_G(spieler).R58TmpSx = _G(spieler).scrollx;
+	_G(spieler).R58TmpSy = _G(spieler).scrolly;
+	_G(spieler).R58TmpX = spieler_vector[P_CHEWY].Xypos[0];
+	_G(spieler).R58TmpY = spieler_vector[P_CHEWY].Xypos[1];
 	spieler_vector[P_CHEWY].Xypos[0] = 160;
 	spieler_vector[P_CHEWY].Xypos[1] = 100;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	flags.MainInput = false;
 	hide_person();
 	switch_room(r_nr);
@@ -2458,11 +2458,11 @@ void r58setup_func() {
 }
 
 void r59_look_poster() {
-	if (!spieler.R59PosterWeg) {
+	if (!_G(spieler).R59PosterWeg) {
 
 		atds->set_ats_str(302, 1, ATS_DATEI);
 		atds->set_ats_str(301, 1, ATS_DATEI);
-		spieler.R59PosterWeg = true;
+		_G(spieler).R59PosterWeg = true;
 		invent_2_slot(SPARK_INV);
 		switch_room(60);
 	}
@@ -2471,13 +2471,13 @@ void r59_look_poster() {
 void r62_entry() {
 	SetUpScreenFunc = r62_setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
-	spieler.R62LauraVerwandlung = 0;
-	spieler.room_e_obj[91].Attribut = 255;
-	if (!spieler.R62FirstEntry) {
-		spieler.R62TShow = false;
+	_G(spieler).R62LauraVerwandlung = 0;
+	_G(spieler).room_e_obj[91].Attribut = 255;
+	if (!_G(spieler).R62FirstEntry) {
+		_G(spieler).R62TShow = false;
 		_G(cur_hide_flag) = false;
 		hide_cur();
-		spieler.R62FirstEntry = true;
+		_G(spieler).R62FirstEntry = true;
 		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
 		det->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(345, -1);
@@ -2506,14 +2506,14 @@ void r62_entry() {
 		det->del_static_ani(5);
 		start_detail_wait(7, 1, ANI_VOR);
 		show_cur();
-		spieler.R64Moni1Ani = 3;
-		spieler.R64Moni2Ani = 4;
+		_G(spieler).R64Moni1Ani = 3;
+		_G(spieler).R64Moni2Ani = 4;
 		set_person_pos(187, 43, P_CHEWY, P_RIGHT);
-		spieler.R62TShow = true;
+		_G(spieler).R62TShow = true;
 		switch_room(64);
 	} else {
 		det->del_static_ani(0);
-		spieler.PersonHide[P_HOWARD] = true;
+		_G(spieler).PersonHide[P_HOWARD] = true;
 		det->set_static_ani(4, -1);
 		det->set_static_ani(8, -1);
 		r62Delay = 0;
@@ -2523,8 +2523,8 @@ void r62_entry() {
 }
 
 void r62_setup_func() {
-	if (r62Delay <= 0 && spieler.R62TShow) {
-		r62Delay = (spieler.DelaySpeed + 1) * 60;
+	if (r62Delay <= 0 && _G(spieler).R62TShow) {
+		r62Delay = (_G(spieler).DelaySpeed + 1) * 60;
 		det->stop_detail(r62TalkAni);
 		if (r62TalkAni == 4)
 			r62TalkAni = 8;
@@ -2545,17 +2545,17 @@ int16 r62_use_laura() {
 		SetUpScreenFunc = 0;
 		det->del_static_ani(8);
 		det->stop_detail(8);
-		spieler.PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->start_detail(2, 255, ANI_VOR);
 		det->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(399, -1);
-		spieler.PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077, FLC_MODE);
 		show_cur();
-		spieler.R64Moni1Ani = 0;
-		spieler.R64Moni2Ani = 0;
-		spieler.R62TShow = false;
-		spieler.R62LauraVerwandlung = true;
+		_G(spieler).R64Moni1Ani = 0;
+		_G(spieler).R64Moni2Ani = 0;
+		_G(spieler).R62TShow = false;
+		_G(spieler).R62LauraVerwandlung = true;
 		switch_room(63);
 	}
 	return action_ret;
@@ -2563,12 +2563,12 @@ int16 r62_use_laura() {
 
 void r63_entry() {
 	_G(zoom_horizont) = 76;
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	r63Schalter = false;
 	r63RunDia = 0;
-	if (spieler.R63FxMannWeg)
+	if (_G(spieler).R63FxMannWeg)
 		det->del_static_ani(5);
-	if (!spieler.R63Uhr) {
+	if (!_G(spieler).R63Uhr) {
 		_G(cur_hide_flag) = false;
 		hide_cur();
 		det->start_detail(12, 255, ANI_VOR);
@@ -2582,23 +2582,23 @@ void r63_entry() {
 		det->stop_detail(11);
 		det->start_detail(10, 255, ANI_VOR);
 		show_cur();
-	} else if (!spieler.R63Feuer) {
+	} else if (!_G(spieler).R63Feuer) {
 		det->show_static_spr(10);
 		det->show_static_spr(12);
-	} else if (spieler.R62LauraVerwandlung) {
+	} else if (_G(spieler).R62LauraVerwandlung) {
 		SetUpScreenFunc = r63_setup_func;
 		cur_2_inventory();
-		spieler.scrollx = 176;
+		_G(spieler).scrollx = 176;
 		set_person_pos(424, 78, P_CHEWY, P_LEFT);
-		spieler.PersonHide[P_CHEWY] = true;
-		spieler.room_e_obj[95].Attribut = 255;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).room_e_obj[95].Attribut = 255;
 		r63ChewyAni = 0;
 		det->start_detail(0, 1, ANI_VOR);
 	}
 }
 
 void r63_setup_func() {
-	if (spieler.R62LauraVerwandlung) {
+	if (_G(spieler).R62LauraVerwandlung) {
 		switch (r63ChewyAni) {
 		case 0:
 			if (det->get_ani_status(0) == false) {
@@ -2612,7 +2612,7 @@ void r63_setup_func() {
 
 		case 1:
 			if (det->get_ani_status(1) == false) {
-				spieler.ScrollxStep = 4;
+				_G(spieler).ScrollxStep = 4;
 				set_person_pos(0, 0, P_CHEWY, P_RIGHT);
 				det->start_detail(22, 1, ANI_VOR);
 				det->start_detail(2, 1, ANI_VOR);
@@ -2633,13 +2633,13 @@ void r63_setup_func() {
 				if (!flags.AutoAniPlay) {
 					flags.AutoAniPlay = true;
 
-					spieler.ScrollxStep = 16;
-					spieler.scrollx -= spieler.scrollx % 16;
+					_G(spieler).ScrollxStep = 16;
+					_G(spieler).scrollx -= _G(spieler).scrollx % 16;
 					flags.NoScroll = true;
 					auto_scroll(176, 0);
 					set_person_pos(424, 78, P_CHEWY, P_LEFT);
 					flags.NoScroll = false;
-					spieler.ScrollxStep = 4;
+					_G(spieler).ScrollxStep = 4;
 					if (!r63Schalter) {
 						det->start_detail(0, 1, ANI_VOR);
 						r63ChewyAni = 0;
@@ -2655,12 +2655,12 @@ void r63_setup_func() {
 }
 
 void r63_bork_platt() {
-	spieler.R62LauraVerwandlung = false;
+	_G(spieler).R62LauraVerwandlung = false;
 	r63Schalter = false;
-	spieler.room_e_obj[95].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
 	flic_cut(FCUT_081, FLC_MODE);
 	flic_cut(FCUT_082, FLC_MODE);
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	check_shad(4, 1);
 	spieler_mi[P_CHEWY].Mode = true;
 	auto_move(6, P_CHEWY);
@@ -2675,19 +2675,19 @@ void r63_bork_platt() {
 	fx_blend = BLEND3;
 	show_cur();
 	flags.MainInput = true;
-	spieler.R62Flucht = true;
-	spieler.PersonRoomNr[P_HOWARD] = 56;
+	_G(spieler).R62Flucht = true;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
 	switch_room(56);
 }
 
 void r63_talk_hunter() {
 	hide_cur();
 	auto_move(3, P_CHEWY);
-	if (spieler.R63Uhr)
+	if (_G(spieler).R63Uhr)
 		det->hide_static_spr(10);
 	det->start_detail(10, 255, ANI_VOR);
 	start_aad_wait(356, -1);
-	if (spieler.R63Uhr) {
+	if (_G(spieler).R63Uhr) {
 		det->show_static_spr(10);
 		det->stop_detail(10);
 	}
@@ -2697,13 +2697,13 @@ void r63_talk_hunter() {
 void r63_talk_regie() {
 	hide_cur();
 	auto_move(3, P_CHEWY);
-	if (spieler.R63Uhr)
+	if (_G(spieler).R63Uhr)
 		det->hide_static_spr(12);
 	det->stop_detail(18);
 	det->start_detail(19, 255, ANI_VOR);
 	start_aad_wait(357, -1);
 	det->stop_detail(19);
-	if (spieler.R63Uhr) {
+	if (_G(spieler).R63Uhr) {
 		det->show_static_spr(12);
 	} else {
 		det->start_detail(18, 255, ANI_VOR);
@@ -2724,7 +2724,7 @@ int16 r63_use_fx_man() {
 		action_ret = true;
 		hide_cur();
 		auto_move(1, P_CHEWY);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		start_aad_wait(359, -1);
 		det->del_static_ani(5);
 		start_detail_wait(6, 1, ANI_VOR);
@@ -2732,7 +2732,7 @@ int16 r63_use_fx_man() {
 		start_aad_wait(362, -1);
 		det->stop_detail(7);
 		start_detail_wait(8, 1, ANI_VOR);
-		spieler.R63FxMannWeg = true;
+		_G(spieler).R63FxMannWeg = true;
 		atds->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
@@ -2741,10 +2741,10 @@ int16 r63_use_fx_man() {
 
 int16 r63_use_schalter() {
 	int16 action_ret = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		if (spieler.R63FxMannWeg) {
-			if (spieler.R62LauraVerwandlung) {
+		if (_G(spieler).R63FxMannWeg) {
+			if (_G(spieler).R62LauraVerwandlung) {
 				r63Schalter = true;
 				hide_cur();
 				flags.MainInput = false;
@@ -2789,7 +2789,7 @@ int16 r63_use_girl() {
 		action_ret = true;
 		hide_cur();
 		auto_move(2, P_CHEWY);
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		det->stop_detail(12);
 		start_detail_wait(13, 1, ANI_VOR);
 		det->set_static_ani(14, -1);
@@ -2799,7 +2799,7 @@ int16 r63_use_girl() {
 		start_aad_wait(360, -1);
 		det->stop_detail(15);
 		start_detail_wait(16, 1, ANI_VOR);
-		spieler.R63Uhr = true;
+		_G(spieler).R63Uhr = true;
 		det->stop_detail(10);
 		det->stop_detail(18);
 		det->show_static_spr(10);
@@ -2819,14 +2819,14 @@ int16 r63_use_aschenbecher() {
 		action_ret = true;
 		_G(cur_hide_flag) = false;
 		hide_cur();
-		if (spieler.R63Uhr) {
-			if (spieler.R63FxMannWeg) {
+		if (_G(spieler).R63Uhr) {
+			if (_G(spieler).R63FxMannWeg) {
 				auto_move(5, P_CHEWY);
-				del_inventar(spieler.AkInvent);
+				del_inventar(_G(spieler).AkInvent);
 				flags.NoScroll = true;
 				auto_scroll(70, 0);
 				auto_move(1, P_CHEWY);
-				spieler.PersonHide[P_CHEWY] = true;
+				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->start_detail(20, 255, ANI_VOR);
 				det->start_detail(10, 255, ANI_VOR);
 				det->start_detail(18, 255, ANI_VOR);
@@ -2837,9 +2837,9 @@ int16 r63_use_aschenbecher() {
 				atds->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_ats_str(383, 1, ATS_DATEI);
-				spieler.R63Feuer = true;
-				spieler.PersonHide[P_CHEWY] = false;
-				spieler.scrollx = 0;
+				_G(spieler).R63Feuer = true;
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler).scrollx = 0;
 				set_person_pos(187, 42, P_CHEWY, P_RIGHT);
 				switch_room(64);
 				flags.NoScroll = false;
@@ -2855,20 +2855,20 @@ int16 r63_use_aschenbecher() {
 void r64_entry() {
 	SetUpScreenFunc = r64_setup_func;
 	r62Delay = 0;
-	r64TalkAni = spieler.R64Moni1Ani;
-	if (!spieler.R64ManWeg) {
+	r64TalkAni = _G(spieler).R64Moni1Ani;
+	if (!_G(spieler).R64ManWeg) {
 		_G(timer_nr)[0] = room->set_timer(1, 10);
 		det->set_static_ani(1, -1);
 		r64_chewy_entry();
-		if (spieler.R63Feuer) {
+		if (_G(spieler).R63Feuer) {
 			flc->set_flic_user_function(r64_cut_sev);
 			flic_cut(FCUT_078, FLC_MODE);
 			flc->remove_flic_user_function();
-			spieler.R64ManWeg = true;
+			_G(spieler).R64ManWeg = true;
 			det->del_static_ani(1);
 			room->set_timer_status(1, TIMER_STOP);
 			atds->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
-			spieler.R64Moni1Ani = 5;
+			_G(spieler).R64Moni1Ani = 5;
 			r64_calc_monitor();
 			start_aad_wait(354, -1);
 		}
@@ -2880,8 +2880,8 @@ int16 r64_cut_sev(int16 frame) {
 	int16 spr_nr;
 	int16 x, y;
 	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - spieler.scrollx;
-	y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - spieler.scrolly;
+	x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
+	y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak,
 	          (int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
 	out->scale_set(chewy->image[spr_nr], x, y,
@@ -2904,7 +2904,7 @@ void r64_chewy_entry() {
 
 void r64_calc_monitor() {
 	int16 str_nr = 0;
-	switch (spieler.R64Moni1Ani) {
+	switch (_G(spieler).R64Moni1Ani) {
 	case 3:
 		str_nr = 0;
 		det->set_static_ani(3, -1);
@@ -2921,7 +2921,7 @@ void r64_calc_monitor() {
 
 	}
 	atds->set_ats_str(373, str_nr, ATS_DATEI);
-	switch (spieler.R64Moni2Ani) {
+	switch (_G(spieler).R64Moni2Ani) {
 	case 4:
 		str_nr = 0;
 		det->set_static_ani(4, -1);
@@ -2936,14 +2936,14 @@ void r64_calc_monitor() {
 }
 
 void r64_setup_func() {
-	if (r62Delay <= 0 && spieler.R62TShow) {
-		r62Delay = (spieler.DelaySpeed + 1) * 60;
+	if (r62Delay <= 0 && _G(spieler).R62TShow) {
+		r62Delay = (_G(spieler).DelaySpeed + 1) * 60;
 		if (r64TalkAni == 3 || r64TalkAni == 4)
 			det->stop_detail(r64TalkAni);
 		if (r64TalkAni == 4)
-			r64TalkAni = spieler.R64Moni1Ani;
+			r64TalkAni = _G(spieler).R64Moni1Ani;
 		else
-			r64TalkAni = spieler.R64Moni2Ani;
+			r64TalkAni = _G(spieler).R64Moni2Ani;
 		if (r64TalkAni != 0)
 			det->start_detail(r64TalkAni, 255, ANI_VOR);
 	} else
@@ -2955,7 +2955,7 @@ void r64_talk_man() {
 }
 
 void r64_talk_man(int16 aad_nr) {
-	if (!spieler.R64ManWeg) {
+	if (!_G(spieler).R64ManWeg) {
 		hide_cur();
 		auto_move(4, P_CHEWY);
 		room->set_timer_status(1, TIMER_STOP);
@@ -2975,8 +2975,8 @@ int16 r64_use_tasche() {
 	int16 action_ret = false;
 	hide_cur();
 	aad_nr = -1;
-	if (!spieler.inv_cur) {
-		if (spieler.R64ManWeg) {
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R64ManWeg) {
 			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
 				auto_move(3, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
@@ -2999,10 +2999,10 @@ int16 r64_use_tasche() {
 
 void r65_entry() {
 	hide_person();
-	r65tmp_scrollx = spieler.scrollx;
-	r65tmp_scrolly = spieler.scrolly;
-	spieler.scrollx = 0;
-	spieler.scrolly = 0;
+	r65tmp_scrollx = _G(spieler).scrollx;
+	r65tmp_scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
 	r65tmp_ch_x = spieler_vector[P_CHEWY].Xypos[0];;
 	r65tmp_ch_y = spieler_vector[P_CHEWY].Xypos[1];;
 	r65tmp_ho_x = spieler_vector[P_HOWARD].Xypos[0];;
@@ -3011,22 +3011,22 @@ void r65_entry() {
 	spieler_vector[P_CHEWY].Xypos[1] = 80;
 	spieler_vector[P_HOWARD].Xypos[0] = 150;
 	spieler_vector[P_HOWARD].Xypos[1] = 10;
-	if (spieler.PersonDia[P_HOWARD] < 10000) {
+	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
 		_G(cur_hide_flag) = false;
 		hide_cur();
-		start_aad_wait(spieler.PersonDia[P_HOWARD], -1);
+		start_aad_wait(_G(spieler).PersonDia[P_HOWARD], -1);
 		show_cur();
 	} else {
-		start_ads_wait(spieler.PersonDia[P_HOWARD] - 10000);
+		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
 	}
 	flags.LoadGame = true;
 	show_person();
-	switch_room(spieler.PersonDiaTmpRoom[P_HOWARD]);
+	switch_room(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
 }
 
 void r65_exit() {
-	spieler.scrollx = r65tmp_scrollx;
-	spieler.scrolly = r65tmp_scrolly;
+	_G(spieler).scrollx = r65tmp_scrollx;
+	_G(spieler).scrolly = r65tmp_scrolly;
 	set_person_pos(r65tmp_ch_x, r65tmp_ch_y, P_CHEWY, -1);
 	set_person_pos(r65tmp_ho_x, r65tmp_ho_y, P_HOWARD, -1);
 	room_blk.AadLoad = true;
@@ -3038,11 +3038,11 @@ void r65_exit() {
 void r65_atds_string_start(int16 dia_nr, int16 str_nr,
                            int16 person_nr, int16 mode) {
 	int16 ani_nr;
-	if (!spieler.PersonDiaRoom[person_nr]) {
+	if (!_G(spieler).PersonDiaRoom[person_nr]) {
 		switch (person_nr) {
 		case 0:
 			if (mode == AAD_STR_START) {
-				switch (spieler.ChewyAni) {
+				switch (_G(spieler).ChewyAni) {
 				case CHEWY_NORMAL:
 					ani_nr = CH_TALK3;
 					break;
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 7b8dec293ab..40510b378f0 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -30,40 +30,40 @@ namespace Chewy {
 int16 r68HohesC;
 
 void r66_entry(int16 eib_nr) {
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 }
 
 void r66_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 	switch (eib_nr) {
 	case 98:
-		spieler.PersonRoomNr[P_HOWARD] = 69;
-		spieler.PersonRoomNr[P_NICHELLE] = 69;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 69;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
 		break;
 
 	case 99:
-		spieler.PersonRoomNr[P_HOWARD] = 68;
-		spieler.PersonRoomNr[P_NICHELLE] = 68;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 68;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 68;
 		break;
 
 	case 100:
-		spieler.PersonRoomNr[P_HOWARD] = 67;
-		spieler.PersonRoomNr[P_NICHELLE] = 67;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 67;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 67;
 		break;
 
 	}
 }
 
 void r67_entry() {
-	spieler.ScrollxStep = 2;
+	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r67_setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
-	spieler.DiaAMov = 7;
-	if (spieler.R67KommodeAuf)
+	_G(spieler).DiaAMov = 7;
+	if (_G(spieler).R67KommodeAuf)
 		det->show_static_spr(9);
-	if (!spieler.R67PapageiWeg) {
+	if (!_G(spieler).R67PapageiWeg) {
 		_G(timer_nr)[0] = room->set_timer(1, 10);
 		det->set_static_ani(1, -1);
 	} else
@@ -80,9 +80,9 @@ void r67_entry() {
 }
 
 void r67_exit() {
-	spieler.ScrollxStep = 1;
-	spieler.PersonRoomNr[P_HOWARD] = 66;
-	spieler.PersonRoomNr[P_NICHELLE] = 66;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 }
 
 void r67_setup_func() {
@@ -123,18 +123,18 @@ void r67_look_brief() {
 
 int16 r67_use_kommode() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		hide_cur();
-		if (!spieler.R67KommodeAuf) {
+		if (!_G(spieler).R67KommodeAuf) {
 			action_flag = true;
-			spieler.R67KommodeAuf = true;
+			_G(spieler).R67KommodeAuf = true;
 			auto_move(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			det->show_static_spr(9);
 			atds->set_ats_str(400, 1, ATS_DATEI);
-		} else if (!spieler.R67KostuemWeg) {
+		} else if (!_G(spieler).R67KostuemWeg) {
 			action_flag = true;
-			spieler.R67KostuemWeg = true;
+			_G(spieler).R67KostuemWeg = true;
 			auto_move(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			atds->set_ats_str(400, 2, ATS_DATEI);
@@ -147,8 +147,8 @@ int16 r67_use_kommode() {
 
 void r67_kostuem_aad(int16 aad_nr) {
 	hide_cur();
-	if (spieler.DiaAMov != -1) {
-		auto_move(spieler.DiaAMov, P_CHEWY);
+	if (_G(spieler).DiaAMov != -1) {
+		auto_move(_G(spieler).DiaAMov, P_CHEWY);
 	}
 	start_aad_wait(aad_nr, -1);
 	show_cur();
@@ -156,15 +156,15 @@ void r67_kostuem_aad(int16 aad_nr) {
 
 int16 r67_talk_papagei() {
 	int16 action_flag = false;
-	if (!spieler.R67PapageiWeg) {
-		if (!spieler.inv_cur) {
+	if (!_G(spieler).R67PapageiWeg) {
+		if (!_G(spieler).inv_cur) {
 			action_flag = true;
 			hide_cur();
 			room->set_timer_status(1, TIMER_STOP);
 			if (menu_item == CUR_HOWARD) {
 				show_cur();
 
-				ssi[2].X = 270 - spieler.scrollx;
+				ssi[2].X = 270 - _G(spieler).scrollx;
 				ssi[2].Y = 10;
 				atds->set_split_win(2, &ssi[2]);
 				start_ads_wait(19);
@@ -176,7 +176,7 @@ int16 r67_talk_papagei() {
 				auto_move(5, P_CHEWY);
 				show_cur();
 
-				ssi[2].X = 270 - spieler.scrollx;
+				ssi[2].X = 270 - _G(spieler).scrollx;
 				ssi[2].Y = 10;
 				atds->set_split_win(2, &ssi[2]);
 				start_ads_wait(18);
@@ -186,7 +186,7 @@ int16 r67_talk_papagei() {
 				action_flag = true;
 				auto_move(4, P_CHEWY);
 				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				spieler.R67PapageiWeg = true;
+				_G(spieler).R67PapageiWeg = true;
 				det->stop_detail(1);
 				det->del_static_ani(1);
 				det->show_static_spr(0);
@@ -201,15 +201,15 @@ int16 r67_talk_papagei() {
 }
 
 void r68_entry() {
-	spieler.ScrollxStep = 2;
-	spieler.DiaAMov = 1;
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).DiaAMov = 1;
 	SetUpScreenFunc = r68_setup_func;
 	r68HohesC = -1;
-	if (spieler.R68Papagei) {
+	if (_G(spieler).R68Papagei) {
 		det->show_static_spr(12);
 		det->start_detail(21, 255, ANI_VOR);
 	}
-	if (!spieler.R68DivaWeg) {
+	if (!_G(spieler).R68DivaWeg) {
 		_G(timer_nr)[0] = room->set_timer(255, 10);
 		det->set_static_ani(18, -1);
 	} else
@@ -224,9 +224,9 @@ void r68_entry() {
 }
 
 void r68_exit() {
-	spieler.ScrollxStep = 1;
-	spieler.PersonRoomNr[P_HOWARD] = 66;
-	spieler.PersonRoomNr[P_NICHELLE] = 66;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 }
 
 void r68_setup_func() {
@@ -294,8 +294,8 @@ void r68_talk_indigo(int16 aad_nr) {
 	det->del_static_ani(8);
 	if (aad_nr == -1) {
 		det->set_static_ani(9, -1);
-		start_aad_wait(384 + (int16)spieler.R68IndigoDia, -1);
-		spieler.R68IndigoDia ^= 1;
+		start_aad_wait(384 + (int16)_G(spieler).R68IndigoDia, -1);
+		_G(spieler).R68IndigoDia ^= 1;
 		det->del_static_ani(9);
 	} else {
 		det->set_static_ani(12, -1);
@@ -312,11 +312,11 @@ int16 r68_use_indigo() {
 	hide_cur();
 	if (is_cur_inventar(CLINT_500_INV)) {
 		action_flag = true;
-		if (spieler.R68Lied) {
+		if (_G(spieler).R68Lied) {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			auto_scroll(78, 0);
-			del_inventar(spieler.AkInvent);
+			del_inventar(_G(spieler).AkInvent);
 			r68_talk_indigo(394);
 			_G(cur_hide_flag) = false;
 			hide_cur();
@@ -334,7 +334,7 @@ int16 r68_use_indigo() {
 			room->set_timer_status(8, TIMER_START);
 			det->set_static_ani(8, -1);
 			new_invent_2_cur(KARTE_INV);
-			spieler.R68KarteDa = true;
+			_G(spieler).R68KarteDa = true;
 		} else {
 			r68_talk_indigo(397);
 		}
@@ -354,8 +354,8 @@ void r68_talk_keeper() {
 	start_detail_wait(15, 1, ANI_VOR);
 	det->set_static_ani(16, -1);
 	show_cur();
-	ssi[3].X = spieler_vector[P_CHEWY].Xypos[0] - spieler.scrollx + spieler_mi[P_CHEWY].HotX;;
-	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - spieler.scrolly;
+	ssi[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
+	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 	atds->set_split_win(3, &ssi[3]);
 	start_ads_wait(20);
 	_G(cur_hide_flag) = false;
@@ -372,8 +372,8 @@ int16 r68_use_papagei() {
 	if (is_cur_inventar(PAPAGEI_INV)) {
 		hide_cur();
 		action_flag = true;
-		spieler.R68Papagei = true;
-		del_inventar(spieler.AkInvent);
+		_G(spieler).R68Papagei = true;
+		del_inventar(_G(spieler).AkInvent);
 		auto_move(5, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		det->show_static_spr(12);
@@ -386,8 +386,8 @@ int16 r68_use_papagei() {
 }
 
 void r68_calc_diva() {
-	if (!spieler.R68DivaWeg) {
-		if (!spieler.R68Papagei) {
+	if (!_G(spieler).R68DivaWeg) {
+		if (!_G(spieler).R68Papagei) {
 			if (r68HohesC == -1) {
 				r68HohesC = 0;
 				det->hide_static_spr(3);
@@ -395,11 +395,11 @@ void r68_calc_diva() {
 				det->start_detail(18, 255, ANI_VOR);
 			}
 		} else {
-			if (!spieler.R68Gutschein) {
+			if (!_G(spieler).R68Gutschein) {
 
 				if (!is_chewy_busy()) {
 					hide_cur();
-					spieler.R68Gutschein = true;
+					_G(spieler).R68Gutschein = true;
 					auto_move(4, P_CHEWY);
 					start_aad_wait(386, -1);
 					start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
@@ -416,7 +416,7 @@ int16 r68_use_keeper() {
 	int16 action_flag = false;
 	if (is_cur_inventar(BAR_GUT_INV)) {
 		hide_cur();
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
@@ -435,17 +435,17 @@ int16 r68_use_diva() {
 	short action_flag = false;
 	hide_cur();
 	if (is_cur_inventar(B_MARY_INV)) {
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
 		auto_move(4, P_CHEWY);
 		start_detail_wait(4, 1, ANI_VOR);
-		spieler.R68Gutschein = false;
+		_G(spieler).R68Gutschein = false;
 	} else if (is_cur_inventar(B_MARY2_INV)) {
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
 		auto_move(4, P_CHEWY);
 		det->hide_static_spr(3);
-		spieler.R68DivaWeg = true;
+		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ablock38);
 		flic_cut(FCUT_083, FLC_MODE);
 		flic_cut(FCUT_083, FLC_MODE);
@@ -463,24 +463,24 @@ int16 r68_use_diva() {
 
 void r68_kostuem_aad(int16 aad_nr) {
 	hide_cur();
-	if (spieler.DiaAMov != -1) {
-		auto_move(spieler.DiaAMov, P_CHEWY);
+	if (_G(spieler).DiaAMov != -1) {
+		auto_move(_G(spieler).DiaAMov, P_CHEWY);
 	}
 	start_aad_wait(aad_nr, -1);
-	if (!spieler.R68DivaWeg)
+	if (!_G(spieler).R68DivaWeg)
 		start_aad_wait(388, -1);
-	else if (!spieler.R67LiedOk)
+	else if (!_G(spieler).R67LiedOk)
 		start_aad_wait(389, -1);
 	else {
 		SetUpScreenFunc = 0;
-		del_inventar(spieler.AkInvent);
+		del_inventar(_G(spieler).AkInvent);
 		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
-		spieler.PersonHide[P_NICHELLE] = true;
+		_G(spieler).PersonHide[P_NICHELLE] = true;
 		go_auto_xy(161, 59, P_HOWARD, ANI_GO);
 		auto_move(4, P_CHEWY);
 		start_aad_wait(390, -1);
 		start_detail_wait(22, 1, ANI_VOR);
-		spieler.PersonHide[P_HOWARD] = true;
+		_G(spieler).PersonHide[P_HOWARD] = true;
 		det->start_detail(27, 255, ANI_VOR);
 		start_detail_wait(23, 3, ANI_VOR);
 		det->start_detail(24, 255, ANI_VOR);
@@ -496,15 +496,15 @@ void r68_kostuem_aad(int16 aad_nr) {
 		start_aad_wait(395, -1);
 		det->stop_detail(14);
 		room->set_timer_status(8, TIMER_START);
-		spieler.PersonHide[P_HOWARD] = false;
+		_G(spieler).PersonHide[P_HOWARD] = false;
 		det->stop_detail(27);
 		det->set_static_ani(8, -1);
 		start_aad_wait(392, -1);
-		spieler.R68Lied = true;
+		_G(spieler).R68Lied = true;
 		det->stop_detail(24);
 		SetUpScreenFunc = r68_setup_func;
 		auto_move(1, P_CHEWY);
-		spieler.PersonHide[P_NICHELLE] = false;
+		_G(spieler).PersonHide[P_NICHELLE] = false;
 		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
 	}
 	show_cur();
@@ -522,16 +522,16 @@ void r68_talk_papagei() {
 }
 
 void r69_entry(int16 eib_nr) {
-	spieler.ScrollxStep = 2;
-	spieler.ZoomXy[P_HOWARD][0] = 46;
-	spieler.ZoomXy[P_HOWARD][1] = 90;
-	spieler.ZoomXy[P_NICHELLE][0] = 46;
-	spieler.ZoomXy[P_NICHELLE][1] = 90;
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 46;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 90;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = r69_setup_func;
-	spieler.DiaAMov = 2;
+	_G(spieler).DiaAMov = 2;
 	if (!flags.LoadGame) {
 		hide_cur();
 		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
@@ -543,11 +543,11 @@ void r69_entry(int16 eib_nr) {
 }
 
 void r69_exit(int16 eib_nr) {
-	spieler.ScrollxStep = 1;
+	_G(spieler).ScrollxStep = 1;
 	switch (eib_nr) {
 	case 97:
-		spieler.PersonRoomNr[P_HOWARD] = 66;
-		spieler.PersonRoomNr[P_NICHELLE] = 66;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 		break;
 
 	}
@@ -566,11 +566,11 @@ void r69_look_schild() {
 
 int16 r69_use_bruecke() {
 	int16 action_flag = false;
-	if (!spieler.inv_cur) {
+	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		action_flag = true;
 
-		if (!spieler.R68KarteDa) {
+		if (!_G(spieler).R68KarteDa) {
 			calc_person_dia(P_HOWARD);
 		} else {
 			auto_move(3, P_CHEWY);
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 5c9a319f750..648bc303cd2 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -362,7 +362,7 @@ int16 file_menue() {
 
 	room->open_handle(&background[0], "rb", R_TGPDATEI);
 	ERROR
-	room->load_tgp(spieler.PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
+	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
 	ERROR;
 	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);
@@ -434,7 +434,7 @@ void option_menue(taf_info *ti) {
 	tdisp_delay = 3;
 	tdisp_count = tdisp_delay;
 	FrameSpeed = 0;
-	delay_count = spieler.DelaySpeed;
+	delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
 	while (key != ESC) {
 		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
@@ -442,7 +442,7 @@ void option_menue(taf_info *ti) {
 		warning("akt_clock = clock() / CLK_TCK;");
 		if (akt_clock >= stop_clock) {
 			TmpFrame = FrameSpeed;
-			spieler.DelaySpeed = (FrameSpeed >> 1) / spieler.FramesPerSecond;
+			_G(spieler).DelaySpeed = (FrameSpeed >> 1) / _G(spieler).FramesPerSecond;
 
 			FrameSpeed = 0;
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
@@ -450,12 +450,12 @@ void option_menue(taf_info *ti) {
 
 		out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
 		                8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
-		bar_off = (spieler.FramesPerSecond - 6) * 16;
+		bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
 		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
-		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", spieler.FramesPerSecond << 1);
+		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
 
 		if (flags.InitSound) {
-			if (spieler.SoundSwitch) {
+			if (_G(spieler).SoundSwitch) {
 				out->sprite_set(ti->image[mund_ani],
 				                18 + ti->korrektur[mund_ani << 1],
 				                8 + ti->korrektur[(mund_ani << 1) + 1], 0);
@@ -472,12 +472,12 @@ void option_menue(taf_info *ti) {
 			}
 			out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
 			out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
-			out->box_fill(33, 136 - (spieler.SoundVol >> 1), 42, 136, 15);
+			out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
 
 			out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
 			out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
-			out->box_fill(53, 136 - (spieler.MusicVol >> 1), 62, 136, 31);
-			if (spieler.MusicSwitch) {
+			out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
+			if (_G(spieler).MusicSwitch) {
 				out->sprite_set(ti->image[MUSIC_ON1],
 				                18 + ti->korrektur[MUSIC_ON1 << 1],
 				                8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
@@ -489,7 +489,7 @@ void option_menue(taf_info *ti) {
 				                18 + ti->korrektur[MUSIC_OFF << 1],
 				                8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
 
-			if (spieler.DisplayText) {
+			if (_G(spieler).DisplayText) {
 				out->sprite_set(ti->image[tdisp_ani],
 				                18 + ti->korrektur[tdisp_ani << 1],
 				                8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
@@ -512,58 +512,58 @@ void option_menue(taf_info *ti) {
 			rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
-				if (spieler.FramesPerSecond > 6)
-					--spieler.FramesPerSecond;
+				if (_G(spieler).FramesPerSecond > 6)
+					--_G(spieler).FramesPerSecond;
 				break;
 			case 1:
-				if (spieler.FramesPerSecond < 10)
-					++spieler.FramesPerSecond;
+				if (_G(spieler).FramesPerSecond < 10)
+					++_G(spieler).FramesPerSecond;
 				break;
 			case 2:
-				if (spieler.SoundSwitch) {
-					spieler.SoundSwitch = false;
+				if (_G(spieler).SoundSwitch) {
+					_G(spieler).SoundSwitch = false;
 					det->disable_room_sound();
 				} else {
 					if (flags.InitSound) {
-						spieler.SoundSwitch = true;
+						_G(spieler).SoundSwitch = true;
 						det->enable_room_sound();
 					}
 				}
 				break;
 			case 3:
 			case 4:
-				if (spieler.DisplayText) {
+				if (_G(spieler).DisplayText) {
 					if (flags.InitSound) {
-						spieler.DisplayText = false;
+						_G(spieler).DisplayText = false;
 						atds->setHasSpeech(true);
-						spieler.SpeechSwitch = true;
+						_G(spieler).SpeechSwitch = true;
 					}
 				} else {
-					spieler.DisplayText = true;
+					_G(spieler).DisplayText = true;
 					atds->setHasSpeech(false);
-					spieler.SpeechSwitch = false;
+					_G(spieler).SpeechSwitch = false;
 				}
 				break;
 			case 5:
-				if (spieler.MusicSwitch) {
-					spieler.MusicSwitch = false;
+				if (_G(spieler).MusicSwitch) {
+					_G(spieler).MusicSwitch = false;
 					ailsnd->stop_mod();
 				} else  if (flags.InitSound) {
-					spieler.MusicSwitch = true;
+					_G(spieler).MusicSwitch = true;
 					CurrentSong = -1;
-					load_room_music(spieler.PersonRoomNr[P_CHEWY]);
+					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 				}
 				break;
 			case 6:
 				key = ESC;
 				break;
 			case 7:
-				spieler.SoundVol = (136 - minfo.y) << 1;
-				ailsnd->set_sound_mastervol(spieler.SoundVol);
+				_G(spieler).SoundVol = (136 - minfo.y) << 1;
+				ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
 				break;
 			case 8:
-				spieler.MusicVol = (136 - minfo.y) << 1;
-				ailsnd->set_music_mastervol(spieler.MusicVol);
+				_G(spieler).MusicVol = (136 - minfo.y) << 1;
+				ailsnd->set_music_mastervol(_G(spieler).MusicVol);
 				break;
 			}
 			minfo.button = 0;
@@ -613,7 +613,7 @@ void option_menue(taf_info *ti) {
 					tdisp_ani = TDISP_START;
 				tdisp_count = tdisp_delay;
 			}
-			delay_count = spieler.DelaySpeed;
+			delay_count = _G(spieler).DelaySpeed;
 		} else
 			--delay_count;
 	}
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 68235ec7c87..b7ceb6d4751 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -195,7 +195,6 @@ maus_info minfo;
 kb_info kbinfo;
 cur_blk curblk;
 cur_ani curani;
-Spieler spieler;
 iog_init ioptr;
 RaumBlk room_blk;
 ObjMov spieler_vector[MAX_PERSON];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index a51cccc2e8c..79f1c06fe13 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -74,6 +74,7 @@ public:
 	int16 _timer_nr[MAX_TIMER_OBJ] = { 0 };
 public:
 	CurrentScreen _currentScreen;
+	Spieler _spieler;
 
 	int16 _pfeil_ani = 0;
 	int16 _pfeil_delay = 0;
@@ -168,7 +169,6 @@ extern maus_info minfo;
 extern kb_info kbinfo;
 extern cur_blk curblk;
 extern cur_ani curani;
-extern Spieler spieler;
 extern iog_init ioptr;
 extern RaumBlk room_blk;
 extern ObjMov spieler_vector[MAX_PERSON];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 6b0e4d38a9c..df34f2cce97 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -42,7 +42,7 @@ void standard_init() {
 	bit = new bitclass();
 	ged = new gedclass(&ged_user_func);
 	room = new Room();
-	obj = new objekt(&spieler);
+	obj = new objekt(&_G(spieler));
 	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
 	det = new detail();
 	atds = new atdsys();
@@ -124,12 +124,12 @@ void var_init() {
 	inventar_nr = 0;
 	_G(ged_mov_ebene) = 1;
 	new_game();
-	spieler.MainMenuY = MENU_Y;
-	spieler.DispFlag = true;
-	spieler.AkInvent = -1;
-	spieler.MausSpeed = 6;
-	spieler.ScrollxStep = 1;
-	spieler.ScrollyStep = 1;
+	_G(spieler).MainMenuY = MENU_Y;
+	_G(spieler).DispFlag = true;
+	_G(spieler).AkInvent = -1;
+	_G(spieler).MausSpeed = 6;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).ScrollyStep = 1;
 
 	spieler_mi[P_CHEWY].HotX = CH_HOT_X;
 	spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
@@ -161,16 +161,16 @@ void var_init() {
 
 		ani_stand_flag[i] = false;
 		spz_delay[i] = 0;
-		spieler.PersonRoomNr[i] = -1;
-		spieler.PersonDia[i] = -1;
+		_G(spieler).PersonRoomNr[i] = -1;
+		_G(spieler).PersonDia[i] = -1;
 	}
-	spieler.PersonRoomNr[P_CHEWY] = room_start_nr;
+	_G(spieler).PersonRoomNr[P_CHEWY] = room_start_nr;
 
 	gpkt.Vorschub = spieler_mi[P_CHEWY].Vorschub;
 	init_room();
 	init_atds();
-	spieler.FramesPerSecond = 7;
-	spieler.DisplayText = true;
+	_G(spieler).FramesPerSecond = 7;
+	_G(spieler).DisplayText = true;
 	CurrentSong = -1;
 	SetUpScreenFunc = nullptr;
 	_G(pfeil_delay) = 0;
@@ -186,8 +186,8 @@ void init_room() {
 	room_blk.InvFile = INVENTAR;
 	room_blk.DetFile = DETAILTEST;
 	room_blk.InvSprAdr = &inv_spr[0];
-	room_blk.Rmo = spieler.room_m_obj;
-	room_blk.Rsi = spieler.room_s_obj;
+	room_blk.Rmo = _G(spieler).room_m_obj;
+	room_blk.Rsi = _G(spieler).room_s_obj;
 	room_blk.AadLoad = true;
 	room_blk.AtsLoad = true;
 	strcpy(room_blk.RoomDir, "room/");
@@ -206,11 +206,11 @@ void init_atds() {
 	ERROR
 	atds->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
 	ERROR
-	atds->init_ats_mode(ATS_DATEI, spieler.Ats);
+	atds->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
 
 	atds->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
 	ERROR
-	atds->init_ats_mode(INV_ATS_DATEI, spieler.InvAts);
+	atds->init_ats_mode(INV_ATS_DATEI, _G(spieler).InvAts);
 
 	atds->set_handle(ATDS_TXT, AAD_DATEI, handle, AAD_TAP_OFF, AAD_TAP_MAX);
 	ERROR
@@ -220,15 +220,15 @@ void init_atds() {
 
 	atds->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
 	ERROR
-	atds->init_ats_mode(INV_USE_DATEI, spieler.InvUse);
-	atds->init_ats_mode(INV_USE_DEF, spieler.InvUseDef);
+	atds->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
+	atds->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
 
 	atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
 	ERROR
-	spieler.AadSilent = 10;
-	spieler.DelaySpeed = 5;
-	spieler_vector[P_CHEWY].Delay = spieler.DelaySpeed;
-	atds->set_delay(&spieler.DelaySpeed, spieler.AadSilent);
+	_G(spieler).AadSilent = 10;
+	_G(spieler).DelaySpeed = 5;
+	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
+	atds->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
 	for (i = 0; i < AAD_MAX_PERSON; i++)
 		atds->set_split_win(i, &ssi[i]);
 	atds->set_string_end_func(&atds_string_start);
@@ -239,22 +239,22 @@ void new_game() {
 	int16 i;
 	byte *tmp;
 
-	memset(&spieler, 0, sizeof(Spieler));
+	_G(spieler).clear();
 
 	for (i = 0; i < MAX_MOV_OBJ; i++) {
-		spieler.room_m_obj[i].RoomNr = -1;
-		spieler.InventSlot[i] = -1;
+		_G(spieler).room_m_obj[i].RoomNr = -1;
+		_G(spieler).InventSlot[i] = -1;
 	}
 	for (i = 0; i < MAX_FEST_OBJ; i++)
-		spieler.room_s_obj[i].RoomNr = -1;
+		_G(spieler).room_s_obj[i].RoomNr = -1;
 	for (i = 0; i < MAX_EXIT; i++)
-		spieler.room_e_obj[i].RoomNr = -1;
+		_G(spieler).room_e_obj[i].RoomNr = -1;
 
-	obj->load(INVENTAR_IIB, &spieler.room_m_obj[0]);
+	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
 	ERROR
-	obj->load(INVENTAR_SIB, &spieler.room_s_obj[0]);
+	obj->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
 	ERROR
-	obj->load(EXIT_EIB, &spieler.room_e_obj[0]);
+	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 	ERROR
 
 	tmp = (byte *)calloc(ROOM_ATS_MAX, 1);
@@ -275,7 +275,7 @@ void new_game() {
 	ERROR
 
 	for (i = 0; i < ROOM_ATS_MAX; i++)
-		spieler.Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
+		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
 	tmp = (byte *)calloc(MAX_MOV_OBJ, 1);
@@ -295,12 +295,12 @@ void new_game() {
 	ERROR
 
 	for (i = 0; i < MAX_MOV_OBJ; i++)
-		spieler.InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
+		_G(spieler).InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
 	obj->sort();
 	for (i = 0; i < obj->spieler_invnr[0]; i++)
-		spieler.InventSlot[i] = obj->spieler_invnr[i + 1];
+		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
 
 	AkChewyTaf = 0;
 	load_chewy_taf(1);
@@ -356,7 +356,7 @@ void init_load() {
 	spblende = mem->void_adr("cut/blende.rnd");
 	ERROR
 
-	room->load_room(&room_blk, room_start_nr, &spieler);
+	room->load_room(&room_blk, room_start_nr, &_G(spieler));
 	ERROR
 	out->set_palette(pal);
 }
@@ -437,7 +437,7 @@ void tidy() {
 }
 
 void set_speed() {
-	in->speed(spieler.MausSpeed, spieler.MausSpeed * 2);
+	in->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
 }
 
 #define GRAVIS 8
@@ -445,18 +445,18 @@ void set_speed() {
 
 void sound_init() {
 	flags.InitSound = false;
-	spieler.SoundSwitch = false;
-	spieler.MusicSwitch = false;
+	_G(spieler).SoundSwitch = false;
+	_G(spieler).MusicSwitch = false;
 	frequenz = 22050;
 
 	detect.SoundSource = ailsnd->init(frequenz);
 
 	if (detect.SoundSource) {
 		ailsnd->init_mix_mode();
-		spieler.MusicVol = 63;
-		spieler.SoundVol = 63;
-		ailsnd->set_music_mastervol(spieler.MusicVol);
-		ailsnd->set_sound_mastervol(spieler.SoundVol);
+		_G(spieler).MusicVol = 63;
+		_G(spieler).SoundVol = 63;
+		ailsnd->set_music_mastervol(_G(spieler).MusicVol);
+		ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
 		ailsnd->switch_music(1);
 		ailsnd->switch_sound(1);
 		flags.InitSound = true;
@@ -490,13 +490,13 @@ void sound_init() {
 			atds->set_speech_handle(speech_handle);
 
 			atds->setHasSpeech(true);
-			spieler.DisplayText = false;
+			_G(spieler).DisplayText = false;
 		}
 
 		if (!modul) {
-			spieler.SoundSwitch = true;
-			spieler.MusicSwitch = true;
-			spieler.SpeechSwitch = true;
+			_G(spieler).SoundSwitch = true;
+			_G(spieler).MusicSwitch = true;
+			_G(spieler).SpeechSwitch = true;
 		}
 	}
 }
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 4f2b2c726e8..1fb8d9cee36 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -38,10 +38,10 @@ void load_room_music(int16 room_nr) {
 	int16 seq_end = 0;
 	int16 pattern = 0;
 	ttp_index = -1;
-	volume = spieler.MusicVol;
+	volume = _G(spieler).MusicVol;
 	lp_mode = 1;
 	play_mode = NORMAL_PLAY;
-	if (spieler.MusicSwitch && (music_handle)) {
+	if (_G(spieler).MusicSwitch && (music_handle)) {
 		switch (room_nr) {
 		case 0:
 			ttp_index = 0;
@@ -188,8 +188,8 @@ void load_room_music(int16 room_nr) {
 		if (ttp_index != -1) {
 			if (volume < 0)
 				volume = 0;
-			else if (volume > spieler.MusicVol)
-				volume = spieler.MusicVol;
+			else if (volume > _G(spieler).MusicVol)
+				volume = _G(spieler).MusicVol;
 			ailsnd->set_music_mastervol(volume);
 			ailsnd->set_loopmode(lp_mode);
 			if (ttp_index != CurrentSong) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 6d8d483d73a..8518c1121ab 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -143,7 +143,7 @@ void cursor_wahl(int16 nr) {
 		curblk.sprite = curtaf->image;
 		mouse_hot_x = 0;
 		mouse_hot_y = 0;
-		curani.delay = (1 + spieler.DelaySpeed) * 5;
+		curani.delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
 	case CUR_WALK:
@@ -197,10 +197,10 @@ void cursor_wahl(int16 nr) {
 		break;
 
 	case CUR_AK_INVENT:
-		curani.ani_anf = spieler.AkInvent;
-		curani.ani_end = spieler.AkInvent;
+		curani.ani_anf = _G(spieler).AkInvent;
+		curani.ani_end = _G(spieler).AkInvent;
 		curblk.sprite = &inv_spr[0];
-		spieler.inv_cur = true;
+		_G(spieler).inv_cur = true;
 		break;
 
 	case CUR_SAVE:
@@ -260,8 +260,8 @@ void cursor_wahl(int16 nr) {
 		cur_move = 1;
 		cur->set_cur_ani(&curani);
 		xy = (int16 *)curblk.sprite[curani.ani_anf];
-		spieler.CurBreite = xy[0];
-		spieler.CurHoehe = xy[1];
+		_G(spieler).CurBreite = xy[0];
+		_G(spieler).CurHoehe = xy[1];
 		in->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
 	}
 }
@@ -291,7 +291,7 @@ void test_menu() {
 	int16 ende;
 	menu_lauflicht = 0;
 	inv_disp_ok = false;
-	spieler.inv_cur = false;
+	_G(spieler).inv_cur = false;
 	menu_display = false;
 	_G(cur_display) = true;
 	cur->show_cur();
@@ -304,7 +304,7 @@ void test_menu() {
 	flags.main_maus_flag = false;
 	tmp_menu_item = false;
 	_G(maus_links_click) = false;
-	spieler.PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	txt_aus_click = false;
 	fx_blend = BLEND3;
 	_G(auto_obj) = 0;
@@ -337,7 +337,7 @@ int16 main_loop(int16 mode) {
 	if (flags.MainInput) {
 		switch (kbinfo.scan_code) {
 		case F1_KEY:
-			spieler.inv_cur = false;
+			_G(spieler).inv_cur = false;
 			menu_item = CUR_WALK;
 			cursor_wahl(menu_item);
 			if (menu_display == MENU_EINBLENDEN)
@@ -345,7 +345,7 @@ int16 main_loop(int16 mode) {
 			break;
 
 		case F2_KEY:
-			spieler.inv_cur = false;
+			_G(spieler).inv_cur = false;
 			menu_item = CUR_USE;
 			cursor_wahl(menu_item);
 			if (menu_display == MENU_EINBLENDEN)
@@ -353,7 +353,7 @@ int16 main_loop(int16 mode) {
 			break;
 
 		case F3_KEY:
-			spieler.inv_cur = false;
+			_G(spieler).inv_cur = false;
 			menu_item = CUR_LOOK;
 			cursor_wahl(menu_item);
 			if (menu_display == MENU_EINBLENDEN)
@@ -361,7 +361,7 @@ int16 main_loop(int16 mode) {
 			break;
 
 		case F4_KEY:
-			spieler.inv_cur = false;
+			_G(spieler).inv_cur = false;
 			menu_item = CUR_TALK;
 			cursor_wahl(menu_item);
 			if (menu_display == MENU_EINBLENDEN)
@@ -380,15 +380,15 @@ int16 main_loop(int16 mode) {
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
-			if (spieler.AkInvent == -1) {
+			if (_G(spieler).AkInvent == -1) {
 				menu_item = tmp_menu_item;
 				cursor_wahl(menu_item);
-				spieler.inv_cur = false;
+				_G(spieler).inv_cur = false;
 			} else {
 				menu_item = CUR_USE;
 				cursor_wahl(CUR_AK_INVENT);
 
-				get_display_xy(&spieler.DispZx, &spieler.DispZy, spieler.AkInvent);
+				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
 			kbinfo.key_code = '\0';
@@ -405,7 +405,7 @@ int16 main_loop(int16 mode) {
 				ende = 1;
 				fx_blend = BLEND4;
 			}
-			if (spieler.inv_cur && spieler.AkInvent != -1 && menu_item == CUR_USE) {
+			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 				cursor_wahl(CUR_AK_INVENT);
 			} else
 				cursor_wahl(menu_item);
@@ -429,7 +429,7 @@ int16 main_loop(int16 mode) {
 				menu_exit();
 				menu_item = tmp_menu_item;
 				menu_display = MENU_AUSBLENDEN;
-				if (spieler.inv_cur && spieler.AkInvent != -1 && menu_item == CUR_USE) {
+				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
 					cursor_wahl(menu_item);
@@ -447,14 +447,14 @@ int16 main_loop(int16 mode) {
 				menu_flag = MENU_AUSBLENDEN;
 				menu_display = 0;
 				_G(cur_display) = true;
-				if (spieler.AkInvent == -1) {
+				if (_G(spieler).AkInvent == -1) {
 					menu_item = tmp_menu_item;
 					cursor_wahl(menu_item);
-					spieler.inv_cur = false;
+					_G(spieler).inv_cur = false;
 				} else {
 					menu_item = CUR_USE;
 					cursor_wahl(CUR_AK_INVENT);
-					get_display_xy(&spieler.DispZx, &spieler.DispZy, spieler.AkInvent);
+					get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 				}
 				break;
 
@@ -478,7 +478,7 @@ int16 main_loop(int16 mode) {
 
 				menu_item = tmp_menu_item;
 				menu_display = MENU_AUSBLENDEN;
-				if (spieler.inv_cur && spieler.AkInvent != -1 && menu_item == CUR_USE) {
+				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
 					cursor_wahl(tmp_menu_item);
@@ -497,7 +497,7 @@ int16 main_loop(int16 mode) {
 					cur->move(maus_old_x, maus_old_y);
 					minfo.x = maus_old_x;
 					minfo.y = maus_old_y;
-					spieler.inv_cur = false;
+					_G(spieler).inv_cur = false;
 					cursor_wahl(menu_item);
 				}
 				break;
@@ -517,15 +517,15 @@ int16 main_loop(int16 mode) {
 			break;
 
 		case 41:
-			spieler.DispFlag ^= 1;
+			_G(spieler).DispFlag ^= 1;
 			break;
 
 		case TAB:
-			if (menu_display == 0 && spieler.DispFlag) {
-				if (spieler.InvDisp < 3)
-					++spieler.InvDisp;
+			if (menu_display == 0 && _G(spieler).DispFlag) {
+				if (_G(spieler).InvDisp < 3)
+					++_G(spieler).InvDisp;
 				else
-					spieler.InvDisp = 0;
+					_G(spieler).InvDisp = 0;
 			}
 			break;
 
@@ -544,7 +544,7 @@ int16 main_loop(int16 mode) {
 	if (mode == DO_SETUP)
 		set_up_screen(DO_MAIN_LOOP);
 #ifdef DEMO
-	if (spieler.PersonRoomNr[P_CHEWY] > 24)
+	if (_G(spieler).PersonRoomNr[P_CHEWY] > 24)
 		ende = 1;
 #endif
 	return ende;
@@ -561,20 +561,20 @@ void set_up_screen(SetupScreenMode mode) {
 	if (isMainLoop)
 		mode = DO_SETUP;
 
-	if (flags.InitSound && spieler.SpeechSwitch)
+	if (flags.InitSound && _G(spieler).SpeechSwitch)
 		ailsnd->serve_db_samples();
 	uhr->calc_timer();
 
 	if (ani_timer[0].TimeFlag) {
 		uhr->reset_timer(0, 0);
-		spieler.DelaySpeed = FrameSpeed / spieler.FramesPerSecond;
-		spieler_vector[P_CHEWY].Delay = spieler.DelaySpeed + spz_delay[P_CHEWY];
+		_G(spieler).DelaySpeed = FrameSpeed / _G(spieler).FramesPerSecond;
+		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + spz_delay[P_CHEWY];
 		FrameSpeed = 0;
-		det->set_global_delay(spieler.DelaySpeed);
+		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
 	++FrameSpeed;
 	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], spieler.scrollx, spieler.scrolly);
+	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
@@ -591,17 +591,17 @@ void set_up_screen(SetupScreenMode mode) {
 	} else {
 		kb_mov(1);
 		det->unfreeze_ani();
-		check_mouse_ausgang(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+		check_mouse_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 
 		if (!flags.SaveMenu)
 			calc_ani_timer();
 
-		if (spieler.AkInvent != -1 && spieler.DispFlag) {
-			build_menu(invent_display[spieler.InvDisp][0],
-			           invent_display[spieler.InvDisp][1], 3, 3, 60, 0);
-			out->sprite_set(inv_spr[spieler.AkInvent],
-			                 invent_display[spieler.InvDisp][0] + 1 + spieler.DispZx,
-			                 invent_display[spieler.InvDisp][1] + 1 + spieler.DispZy
+		if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
+			build_menu(invent_display[_G(spieler).InvDisp][0],
+			           invent_display[_G(spieler).InvDisp][1], 3, 3, 60, 0);
+			out->sprite_set(inv_spr[_G(spieler).AkInvent],
+			                 invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
+			                 invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
 			                 , scr_width);
 		}
 
@@ -610,13 +610,13 @@ void set_up_screen(SetupScreenMode mode) {
 		if (_G(maus_links_click)) {
 			if (menu_item == CUR_WALK) {
 				if (cur_ausgang_flag) {
-					calc_ausgang(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+					calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				} else {
 					if (!flags.ChewyDontGo) {
 						gpkt.Dx = minfo.x - spieler_mi[P_CHEWY].HotMovX +
-						          spieler.scrollx + spieler_mi[P_CHEWY].HotX;
+						          _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
 						gpkt.Dy = minfo.y - spieler_mi[P_CHEWY].HotMovY +
-						          spieler.scrolly + spieler_mi[P_CHEWY].HotY;
+						          _G(spieler).scrolly + spieler_mi[P_CHEWY].HotY;
 						gpkt.Sx = spieler_vector[P_CHEWY].Xypos[0] +
 						          spieler_mi[P_CHEWY].HotX;
 						gpkt.Sy = spieler_vector[P_CHEWY].Xypos[1] +
@@ -661,7 +661,7 @@ void set_up_screen(SetupScreenMode mode) {
 		for (i = 0; i < _G(auto_obj) && !flags.StopAutoObj; i++)
 			mov_objekt(&auto_mov_vector[i], &auto_mov_obj[i]);
 
-		nr = obj->is_iib_mouse(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+		nr = obj->is_iib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 		if (nr != -1) {
 			txt_nr = obj->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
@@ -669,7 +669,7 @@ void set_up_screen(SetupScreenMode mode) {
 			tmp = calc_maus_txt(minfo.x, minfo.y, mode);
 			if (tmp == -1 || tmp == 255) {
 
-				nr = obj->is_sib_mouse(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+				nr = obj->is_sib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				if (nr != -1) {
 					txt_nr = obj->sib_txt_nr(nr);
 					mous_obj_action(nr, mode, INVENTAR_STATIC, txt_nr);
@@ -680,11 +680,11 @@ void set_up_screen(SetupScreenMode mode) {
 		if (_G(cur_display) == true && mode == DO_SETUP) {
 			cur->plot_cur();
 
-			if ((spieler.inv_cur) && (flags.CursorStatus == true))
+			if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
 				out->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
 				                scr_width);
 			if (_G(pfeil_delay) == 0) {
-				_G(pfeil_delay) = spieler.DelaySpeed;
+				_G(pfeil_delay) = _G(spieler).DelaySpeed;
 				if (_G(pfeil_ani) < 4)
 					++_G(pfeil_ani);
 				else
@@ -694,9 +694,9 @@ void set_up_screen(SetupScreenMode mode) {
 		}
 	}
 
-	atds->print_aad(spieler.scrollx, spieler.scrolly);
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	atds->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
-	                spieler_vector[P_CHEWY].Xypos[1], spieler.scrollx, spieler.scrolly);
+	                spieler_vector[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(maus_links_click) = false;
 	menu_flag = false;
 	if (mode == DO_SETUP) {
@@ -735,7 +735,7 @@ void set_up_screen(SetupScreenMode mode) {
 		calc_scroll(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 		            spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 		            ScrXy[0], ScrXy[1],
-		            &spieler.scrollx, &spieler.scrolly);
+		            &_G(spieler).scrollx, &_G(spieler).scrolly);
 
 	g_screen->update();
 
@@ -779,34 +779,34 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 		if (menu_item != CUR_USE)
 			look_invent_screen(txt_mode, txt_nr);
 		else {
-			if (spieler.inv_cur) {
+			if (_G(spieler).inv_cur) {
 				obj_auswerten(nr, txt_mode);
 			} else {
 				if (txt_mode == INVENTAR_NORMAL) {
 					if (!flags.ChAutoMov) {
 						_G(maus_links_click) = false;
-						auto_move(spieler.room_m_obj[nr].AutoMov, P_CHEWY);
+						auto_move(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
 						look_invent_screen(txt_mode, txt_nr);
 
-						if (spieler.AkInvent != -1)
-							spieler.room_m_obj[spieler.AkInvent].RoomNr = -1;
-						if (spieler.room_m_obj[nr].AniFlag == 255) {
+						if (_G(spieler).AkInvent != -1)
+							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
+						if (_G(spieler).room_m_obj[nr].AniFlag == 255) {
 							invent_2_slot(nr);
 						} else {
-							spieler.PersonHide[P_CHEWY] = spieler.room_m_obj[nr].HeldHide;
-							play_scene_ani(spieler.room_m_obj[nr].AniFlag, ANI_VOR);
+							_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[nr].HeldHide;
+							play_scene_ani(_G(spieler).room_m_obj[nr].AniFlag, ANI_VOR);
 							invent_2_slot(nr);
 
-							spieler.PersonHide[P_CHEWY] = false;
+							_G(spieler).PersonHide[P_CHEWY] = false;
 						}
 
-						spieler.inv_cur = false;
+						_G(spieler).inv_cur = false;
 						menu_item = CUR_WALK;
 						cursor_wahl(menu_item);
 						spieler_vector[P_CHEWY].DelayCount = 0;
 
-						if (spieler.AkInvent != -1)
-							spieler.room_m_obj[spieler.AkInvent].RoomNr = 255;
+						if (_G(spieler).AkInvent != -1)
+							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
 
 					}
 				} else if (txt_mode == INVENTAR_STATIC) {
@@ -823,7 +823,7 @@ void kb_mov(int16 mode) {
 	while (!ende) {
 		switch (in->get_switch_code()) {
 		case CURSOR_RIGHT:
-			if (minfo.x < 320 - spieler.CurBreite)
+			if (minfo.x < 320 - _G(spieler).CurBreite)
 				minfo.x += 2;
 			break;
 
@@ -838,7 +838,7 @@ void kb_mov(int16 mode) {
 			break;
 
 		case CURSOR_DOWN:
-			if (minfo.y < 210 - spieler.CurHoehe)
+			if (minfo.y < 210 - _G(spieler).CurHoehe)
 				minfo.y += 2;
 			break;
 
@@ -881,15 +881,15 @@ void kb_cur_action(int16 key, int16 mode) {
 
 	case CURSOR_UP:
 		if (menu_display == MENU_EINBLENDEN) {
-			if (spieler.MainMenuY > 1)
-				spieler.MainMenuY -= 2;
+			if (_G(spieler).MainMenuY > 1)
+				_G(spieler).MainMenuY -= 2;
 		}
 		break;
 
 	case CURSOR_DOWN:
 		if (menu_display == MENU_EINBLENDEN) {
-			if (spieler.MainMenuY < 163)
-				spieler.MainMenuY += 2;
+			if (_G(spieler).MainMenuY < 163)
+				_G(spieler).MainMenuY += 2;
 		}
 		break;
 
@@ -901,16 +901,16 @@ void maus_action() {
 
 	x = minfo.x;
 	y = minfo.y;
-	if (x > invent_display[spieler.InvDisp][0] &&
-	        x < invent_display[spieler.InvDisp][0] + 48 &&
-	        y > invent_display[spieler.InvDisp][1] &&
-	        y < invent_display[spieler.InvDisp][1] + 48) {
-		if (!spieler.inv_cur && !inv_disp_ok && spieler.AkInvent != -1) {
+	if (x > invent_display[_G(spieler).InvDisp][0] &&
+	        x < invent_display[_G(spieler).InvDisp][0] + 48 &&
+	        y > invent_display[_G(spieler).InvDisp][1] &&
+	        y < invent_display[_G(spieler).InvDisp][1] + 48) {
+		if (!_G(spieler).inv_cur && !inv_disp_ok && _G(spieler).AkInvent != -1) {
 			cursor_wahl(CUR_USE);
 		}
 		inv_disp_ok = true;
 	} else {
-		if (!spieler.inv_cur && inv_disp_ok) {
+		if (!_G(spieler).inv_cur && inv_disp_ok) {
 			cursor_wahl(menu_item);
 		}
 		inv_disp_ok = false;
@@ -926,12 +926,12 @@ void maus_action() {
 				if (!flags.main_maus_flag) {
 					if (menu_display == MENU_EINBLENDEN)
 						kbinfo.scan_code = ENTER;
-					else if (spieler.AkInvent != -1) {
+					else if (_G(spieler).AkInvent != -1) {
 						if (inv_disp_ok) {
-							if (spieler.inv_cur) {
+							if (_G(spieler).inv_cur) {
 								menu_item = CUR_USE;
 								cursor_wahl(menu_item);
-								spieler.inv_cur = false;
+								_G(spieler).inv_cur = false;
 							} else {
 								menu_item = CUR_USE;
 								cursor_wahl(CUR_AK_INVENT);
@@ -956,25 +956,25 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	int16 txt_nr;
 	int16 sib_ret;
 	int16 action_flag;
-	tmp = spieler.AkInvent;
+	tmp = _G(spieler).AkInvent;
 	ret = NO_ACTION;
 	action_flag = false;
 	switch (mode) {
 	case INVENTAR_NORMAL:
-		ret = obj->action_iib_iib(spieler.AkInvent, test_nr);
+		ret = obj->action_iib_iib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			hide_cur();
 			if (flags.InventMenu == false) {
-				if (spieler.room_m_obj[spieler.AkInvent].AutoMov != 255) {
+				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 					_G(maus_links_click) = 0;
-					auto_move(spieler.room_m_obj[test_nr].AutoMov, P_CHEWY);
+					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
 				txt_nr = obj->iib_txt_nr(test_nr);
 				look_invent_screen(INVENTAR_NORMAL, txt_nr);
-				if (spieler.room_m_obj[test_nr].AniFlag != 255) {
-					spieler.PersonHide[P_CHEWY] = spieler.room_m_obj[test_nr].HeldHide;
-					play_scene_ani(spieler.room_m_obj[test_nr].AniFlag, ANI_VOR);
-					spieler.PersonHide[P_CHEWY] = false;
+				if (_G(spieler).room_m_obj[test_nr].AniFlag != 255) {
+					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[test_nr].HeldHide;
+					play_scene_ani(_G(spieler).room_m_obj[test_nr].AniFlag, ANI_VOR);
+					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 			}
 			show_cur();
@@ -982,19 +982,19 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		break;
 
 	case INVENTAR_STATIC:
-		ret = obj->action_iib_sib(spieler.AkInvent, test_nr);
+		ret = obj->action_iib_sib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			_G(maus_links_click) = 0;
 			hide_cur();
-			if (spieler.room_m_obj[spieler.AkInvent].AutoMov != 255) {
-				auto_move(spieler.room_s_obj[test_nr].AutoMov, P_CHEWY);
+			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
+				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
 			look_invent_screen(INVENTAR_STATIC, txt_nr);
-			if (spieler.room_s_obj[test_nr].AniFlag != 255) {
-				spieler.PersonHide[P_CHEWY] = spieler.room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)spieler.room_s_obj[test_nr].ZustandAk);
-				ani_nr = spieler.room_s_obj[test_nr].AniFlag;
+			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
+				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
@@ -1005,12 +1005,12 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 			menu_item_vorwahl = CUR_WALK;
 			show_cur();
 			sib_event_inv(test_nr);
-			if (!spieler.inv_cur) {
+			if (!_G(spieler).inv_cur) {
 				menu_item = menu_item_vorwahl;
 				cursor_wahl(menu_item);
 			}
@@ -1023,17 +1023,17 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		if (ret == OBJEKT_1) {
 			_G(maus_links_click) = 0;
 			hide_cur();
-			if (spieler.room_s_obj[test_nr].AutoMov != 255) {
+			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 
-				auto_move(spieler.room_s_obj[test_nr].AutoMov, P_CHEWY);
+				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
 			look_invent_screen(INVENTAR_STATIC, txt_nr);
-			if (spieler.room_s_obj[test_nr].AniFlag != 255) {
-				spieler.PersonHide[P_CHEWY] = spieler.room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)spieler.room_s_obj[test_nr].ZustandAk);
+			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
+				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
 
-				ani_nr = spieler.room_s_obj[test_nr].AniFlag;
+				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
@@ -1044,11 +1044,11 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 
-			if (spieler.room_s_obj[test_nr].InvNr != -1) {
-				invent_2_slot(spieler.room_s_obj[test_nr].InvNr);
+			if (_G(spieler).room_s_obj[test_nr].InvNr != -1) {
+				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
 				action_flag = true;
 			}
 			menu_item_vorwahl = CUR_WALK;
@@ -1057,7 +1057,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 			obj->calc_all_static_detail();
 
-			if (!spieler.inv_cur) {
+			if (!_G(spieler).inv_cur) {
 
 				if (sib_ret || action_flag) {
 					menu_item = menu_item_vorwahl;
@@ -1067,16 +1067,16 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		} else if (ret == SIB_GET_INV) {
 			_G(maus_links_click) = 0;
 			hide_cur();
-			if (spieler.room_s_obj[test_nr].AutoMov != 255) {
-				auto_move(spieler.room_s_obj[test_nr].AutoMov, P_CHEWY);
+			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
+				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
 			look_invent_screen(INVENTAR_STATIC, txt_nr);
-			if (spieler.room_s_obj[test_nr].AniFlag != 255) {
-				spieler.PersonHide[P_CHEWY] = spieler.room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)spieler.room_s_obj[test_nr].ZustandAk);
+			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
+				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
 
-				ani_nr = spieler.room_s_obj[test_nr].AniFlag;
+				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
@@ -1088,17 +1088,17 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				if (ani_nr != -1) {
 					play_scene_ani(ani_nr, tmp);
 				}
-				spieler.PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 
-			if (spieler.room_s_obj[test_nr].InvNr != -1)
-				invent_2_slot(spieler.room_s_obj[test_nr].InvNr);
+			if (_G(spieler).room_s_obj[test_nr].InvNr != -1)
+				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
 			obj->calc_rsi_flip_flop(test_nr);
 			menu_item_vorwahl = CUR_WALK;
 			show_cur();
 			sib_event_no_inv(test_nr);
 			obj->calc_all_static_detail();
-			if (!spieler.inv_cur) {
+			if (!_G(spieler).inv_cur) {
 				menu_item = menu_item_vorwahl;
 				cursor_wahl(menu_item);
 			}
@@ -1418,12 +1418,12 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 			inv_no_use_mode = AUTO_OBJ;
 			txt_nr = calc_mouse_mov_obj(&idx);
 			if (txt_nr == -1) {
-				idx = det->maus_vector(x + spieler.scrollx, y + spieler.scrolly);
+				idx = det->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
 				if (idx != -1) {
 					txt_nr = Rdi->mtxt[idx];
 					inv_no_use_mode = DETEDIT_REC;
 				} else {
-					idx = det->mouse_on_detail(minfo.x, minfo.y, spieler.scrollx, spieler.scrolly);
+					idx = det->mouse_on_detail(minfo.x, minfo.y, _G(spieler).scrollx, _G(spieler).scrolly);
 					if (idx != -1) {
 						inv_no_use_mode = DETAIL_OBJ;
 						txt_nr = 255;
@@ -1447,7 +1447,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					case CUR_USER:
 					case CUR_USE:
 						txt_mode = TXT_MARK_USE;
-						if (spieler.inv_cur)
+						if (_G(spieler).inv_cur)
 							ok = false;
 						break;
 
@@ -1463,7 +1463,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					action_ret = 0;
 					if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (menu_item != CUR_WALK) {
-							if (x + spieler.scrollx > spieler_vector[P_CHEWY].Xypos[0])
+							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
 								set_person_spr(P_LEFT, P_CHEWY);
@@ -1488,14 +1488,14 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 					if (!ok && !action_ret) {
 						if (inv_no_use_mode != -1 && !atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-							action_flag = calc_inv_no_use(idx + (spieler.PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
+							action_flag = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
 						}
 					}
 
 					if (ok && !action_ret && menu_item == CUR_USE && disp_flag) {
 						if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							if (menu_item != CUR_WALK) {
-								if (x + spieler.scrollx > spieler_vector[P_CHEWY].Xypos[0])
+								if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
 								else
 									set_person_spr(P_LEFT, P_CHEWY);
@@ -1549,8 +1549,8 @@ int16 is_mouse_person(int16 x, int16 y) {
 
 					case P_HOWARD:
 					case P_NICHELLE:
-						if (spieler.PersonRoomNr[i] !=
-						        spieler.PersonRoomNr[P_CHEWY])
+						if (_G(spieler).PersonRoomNr[i] !=
+						        _G(spieler).PersonRoomNr[P_CHEWY])
 							check = false;
 						xy = (int16 *)PersonTaf[i]->image[PersonSpr[i][spieler_vector[i].PhNr]];
 						break;
@@ -1559,10 +1559,10 @@ int16 is_mouse_person(int16 x, int16 y) {
 				} else
 					xy = (int16 *)spz_tinfo->image[spz_spr_nr[spieler_vector[i].PhNr]];
 				if (check) {
-					if (x + spieler.scrollx >= spieler_vector[i].Xypos[0] &&
-					        x + spieler.scrollx <= spieler_vector[i].Xypos[0] + xy[0] + spieler_vector[i].Xzoom &&
-					        y + spieler.scrolly >= spieler_vector[i].Xypos[1] &&
-					        y + spieler.scrolly <= spieler_vector[i].Xypos[1] + xy[1] + spieler_vector[i].Yzoom) {
+					if (x + _G(spieler).scrollx >= spieler_vector[i].Xypos[0] &&
+					        x + _G(spieler).scrollx <= spieler_vector[i].Xypos[0] + xy[0] + spieler_vector[i].Xzoom &&
+					        y + _G(spieler).scrolly >= spieler_vector[i].Xypos[1] &&
+					        y + _G(spieler).scrolly <= spieler_vector[i].Xypos[1] + xy[1] + spieler_vector[i].Yzoom) {
 						is_person = i;
 					}
 				}
@@ -1584,7 +1584,7 @@ void calc_mouse_person(int16 x, int16 y) {
 	if (flags.ShowAtsInvTxt && !flags.InventMenu) {
 		p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
-			if (!spieler.PersonHide[p_nr]) {
+			if (!_G(spieler).PersonHide[p_nr]) {
 				out->set_fontadr(font8x8);
 				out->set_vorschub(fvorx8x8, fvory8x8);
 				char *str_ = ch_txt[p_nr];
@@ -1593,7 +1593,7 @@ void calc_mouse_person(int16 x, int16 y) {
 				if (_G(maus_links_click) == 1) {
 					def_nr = -1;
 					txt_nr = -1;
-					if (!spieler.inv_cur) {
+					if (!_G(spieler).inv_cur) {
 						txt_nr = calc_person_txt(p_nr);
 						switch (menu_item) {
 						case CUR_LOOK:
@@ -1657,7 +1657,7 @@ void calc_mouse_person(int16 x, int16 y) {
 						if (dia_nr == -1) {
 							if (txt_nr != 30000) {
 								if (menu_item != CUR_WALK) {
-									if (x + spieler.scrollx > spieler_vector[P_CHEWY].Xypos[0])
+									if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 										set_person_spr(P_RIGHT, P_CHEWY);
 									else
 										set_person_spr(P_LEFT, P_CHEWY);
@@ -1668,7 +1668,7 @@ void calc_mouse_person(int16 x, int16 y) {
 						}
 					} else {
 						if (menu_item != CUR_WALK) {
-							if (x + spieler.scrollx > spieler_vector[P_CHEWY].Xypos[0])
+							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
 								set_person_spr(P_LEFT, P_CHEWY);
@@ -1726,15 +1726,15 @@ void get_user_key(int16 mode) {
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
-			if (spieler.AkInvent == -1) {
+			if (_G(spieler).AkInvent == -1) {
 				menu_item = tmp_menu_item;
 				cursor_wahl(menu_item);
-				spieler.inv_cur = false;
+				_G(spieler).inv_cur = false;
 			} else {
 				menu_item = CUR_USE;
 				cursor_wahl(CUR_AK_INVENT);
 
-				get_display_xy(&spieler.DispZx, &spieler.DispZy, spieler.AkInvent);
+				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
 			kbinfo.key_code = '\0';
@@ -1761,9 +1761,9 @@ void set_ani_screen() {
 
 void del_inventar(int16 nr) {
 	obj->del_inventar(nr, &room_blk);
-	spieler.inv_cur = false;
+	_G(spieler).inv_cur = false;
 	menu_item = CUR_WALK;
-	spieler.AkInvent = -1;
+	_G(spieler).AkInvent = -1;
 	cursor_wahl(menu_item);
 	del_invent_slot(nr);
 	_G(maus_links_click) = false;
@@ -1772,7 +1772,7 @@ void del_inventar(int16 nr) {
 bool is_cur_inventar(int16 nr) {
 	int16 ret = false;
 
-	if (spieler.AkInvent == nr && spieler.inv_cur)
+	if (_G(spieler).AkInvent == nr && _G(spieler).inv_cur)
 		ret = true;
 
 	return ret;
@@ -1785,7 +1785,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 	found = true;
 	if (menu_item == CUR_WALK) {
 		nr = obj->is_exit(x, y);
-		switch (spieler.room_e_obj[nr].Attribut) {
+		switch (_G(spieler).room_e_obj[nr].Attribut) {
 		case AUSGANG_LINKS:
 			cur_ausgang_flag = AUSGANG_LINKS;
 			cursor_wahl(CUR_AUSGANG_LINKS);
@@ -1827,32 +1827,32 @@ void calc_ausgang(int16 x, int16 y) {
 		nr = obj->is_exit(x, y);
 		if (nr != -1) {
 			flags.ExitMov = true;
-			if (auto_move(spieler.room_e_obj[nr].AutoMov, P_CHEWY) == true) {
+			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
 				flags.ShowAtsInvTxt = false;
 				menu_item = CUR_DISK;
 				cursor_wahl(CUR_DISK);
 				set_up_screen(DO_SETUP);
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
-				spieler.PersonRoomNr[P_CHEWY] = spieler.room_e_obj[nr].Exit;
-				room->load_room(&room_blk, spieler.PersonRoomNr[P_CHEWY], &spieler);
+				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
+				room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 				ERROR
-				set_person_pos(Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].X -
+				set_person_pos(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               spieler_mi[_G(auto_p_nr)].HotMovX,
-				               Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
+				               Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
 				ScrXy = (int16 *)ablage[room_blk.AkAblage];
 				get_scroll_off(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				               spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 				               ScrXy[0], ScrXy[1],
-				               &spieler.scrollx, &spieler.scrolly);
+				               &_G(spieler).scrollx, &_G(spieler).scrolly);
 
 				u_idx = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				                      spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 				                      room->GedXAnz[room_blk.AkAblage],
 				                      ged_mem[room_blk.AkAblage]);
 				check_shad(u_idx, 0);
-				set_person_spr(Rdi->AutoMov[spieler.room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
+				set_person_spr(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
 				fx_blend = BLEND1;
 				_G(auto_obj) = 0;
@@ -1911,26 +1911,26 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
 	if (!flags.NoScroll) {
 		if (!scroll_delay) {
 
-			if ((spieler.ScrollxStep * spieler.DelaySpeed) > CH_X_PIX)
-				scroll_delay = CH_X_PIX / spieler.ScrollxStep;
+			if ((_G(spieler).ScrollxStep * _G(spieler).DelaySpeed) > CH_X_PIX)
+				scroll_delay = CH_X_PIX / _G(spieler).ScrollxStep;
 
 			if (x - *sc_x < SCROLL_LEFT) {
-				if ((*sc_x - spieler.ScrollxStep) > 0) {
-					*sc_x -= spieler.ScrollxStep;
+				if ((*sc_x - _G(spieler).ScrollxStep) > 0) {
+					*sc_x -= _G(spieler).ScrollxStep;
 				}
 			} else if (x - *sc_x > SCROLL_RIGHT) {
-				if ((*sc_x + spieler.ScrollxStep) < pic_x - SCREEN_WIDTH) {
-					*sc_x += spieler.ScrollxStep;
+				if ((*sc_x + _G(spieler).ScrollxStep) < pic_x - SCREEN_WIDTH) {
+					*sc_x += _G(spieler).ScrollxStep;
 				}
 			}
 
 			if (y - *sc_y < SCROLL_UP) {
-				if ((*sc_y - spieler.ScrollyStep) > 0) {
-					*sc_y -= spieler.ScrollyStep;
+				if ((*sc_y - _G(spieler).ScrollyStep) > 0) {
+					*sc_y -= _G(spieler).ScrollyStep;
 				}
 			} else if (y - *sc_y > SCROLL_DOWN) {
-				if ((*sc_y + spieler.ScrollyStep) < pic_y - SCREEN_HEIGHT) {
-					*sc_y += spieler.ScrollyStep;
+				if ((*sc_y + _G(spieler).ScrollyStep) < pic_y - SCREEN_HEIGHT) {
+					*sc_y += _G(spieler).ScrollyStep;
 				}
 			}
 		} else
@@ -1943,21 +1943,21 @@ void auto_scroll(int16 scrx, int16 scry) {
 	int16 tmp_maus_click;
 	tmp_maus_click = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	spieler.scrollx >>= 1;
-	spieler.scrollx <<= 1;
-	spieler.scrolly >>= 1;
-	spieler.scrolly <<= 1;
+	_G(spieler).scrollx >>= 1;
+	_G(spieler).scrollx <<= 1;
+	_G(spieler).scrolly >>= 1;
+	_G(spieler).scrolly <<= 1;
 	ende = false;
 	while (!ende && !SHOULD_QUIT) {
-		if (scrx < spieler.scrollx)
-			spieler.scrollx -= spieler.ScrollxStep;
-		else if (scrx > spieler.scrollx)
-			spieler.scrollx += spieler.ScrollxStep;
-		if (scry < spieler.scrolly)
-			spieler.scrolly -= spieler.ScrollyStep;
-		else if (scry > spieler.scrolly)
-			spieler.scrolly += spieler.ScrollyStep;
-		if (scrx == spieler.scrollx && scry == spieler.scrolly)
+		if (scrx < _G(spieler).scrollx)
+			_G(spieler).scrollx -= _G(spieler).ScrollxStep;
+		else if (scrx > _G(spieler).scrollx)
+			_G(spieler).scrollx += _G(spieler).ScrollxStep;
+		if (scry < _G(spieler).scrolly)
+			_G(spieler).scrolly -= _G(spieler).ScrollyStep;
+		else if (scry > _G(spieler).scrolly)
+			_G(spieler).scrolly += _G(spieler).ScrollyStep;
+		if (scrx == _G(spieler).scrollx && scry == _G(spieler).scrolly)
 			ende = true;
 		set_up_screen(DO_SETUP);
 	}
@@ -2001,8 +2001,8 @@ void hide_person() {
 	int16 i;
 	for (i = 0; i < MAX_PERSON; i++) {
 
-		if (!spieler.PersonHide[i]) {
-			spieler.PersonHide[i] = true;
+		if (!_G(spieler).PersonHide[i]) {
+			_G(spieler).PersonHide[i] = true;
 			person_tmp_hide[i] = true;
 		} else
 			person_tmp_hide[i] = false;
@@ -2014,14 +2014,14 @@ void show_person() {
 	for (i = 0; i < MAX_PERSON; i++) {
 
 		if (person_tmp_hide[i])
-			spieler.PersonHide[i] = false;
+			_G(spieler).PersonHide[i] = false;
 	}
 }
 
 void save_person_rnr() {
 	int16 i;
 	for (i = 0; i < MAX_PERSON; i++)
-		person_tmp_room[i] = spieler.PersonRoomNr[i];
+		person_tmp_room[i] = _G(spieler).PersonRoomNr[i];
 	flags.SavePersonRnr = true;
 }
 
@@ -2029,7 +2029,7 @@ void set_person_rnr() {
 	int16 i;
 	if (flags.SavePersonRnr) {
 		for (i = 0; i < MAX_PERSON; i++)
-			spieler.PersonRoomNr[i] = person_tmp_room[i];
+			_G(spieler).PersonRoomNr[i] = person_tmp_room[i];
 		flags.SavePersonRnr = false;
 	}
 }
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index f0fd76a0f4a..c52234201c8 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -49,9 +49,9 @@ void MainMenu::execute() {
 	cur->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
-	spieler.inv_cur = 0;
+	_G(spieler).inv_cur = 0;
 	menu_display = 0;
-	spieler.soundLoopMode = 1;
+	_G(spieler).soundLoopMode = 1;
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
@@ -61,9 +61,9 @@ void MainMenu::execute() {
 
 		cursor_wahl(20);
 		_selection = -1;
-		spieler.scrollx = spieler.scrolly = 0;
-		spieler.PersonRoomNr[0] = 98;
-		room->load_room(&room_blk, 98, &spieler);
+		_G(spieler).scrollx = _G(spieler).scrolly = 0;
+		_G(spieler).PersonRoomNr[0] = 98;
+		room->load_room(&room_blk, 98, &_G(spieler));
 		ERROR
 
 		CurrentSong = -1;
@@ -71,7 +71,7 @@ void MainMenu::execute() {
 		fx->border(workpage, 100, 0, 0);
 
 		out->set_palette(pal);
-		spieler.PersonHide[0] = 1;
+		_G(spieler).PersonHide[0] = 1;
 		show_cur();
 
 		// Wait for a selection to be made on the main menu
@@ -129,7 +129,7 @@ void MainMenu::execute() {
 }
 
 void MainMenu::screenFunc() {
-	int vec = det->maus_vector(minfo.x + spieler.scrollx, minfo.y + spieler.scrolly);
+	int vec = det->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 
 	if (in->get_switch_code() == 28 || minfo.button == 1) {
 		_selection = vec;
@@ -139,16 +139,16 @@ void MainMenu::screenFunc() {
 void MainMenu::animate() {
 	if (ani_timer->TimeFlag) {
 		uhr->reset_timer(0, 0);
-		spieler.DelaySpeed = FrameSpeed / spieler.FramesPerSecond;
-		spieler_vector->Delay = spieler.DelaySpeed + spz_delay[0];
+		_G(spieler).DelaySpeed = FrameSpeed / _G(spieler).FramesPerSecond;
+		spieler_vector->Delay = _G(spieler).DelaySpeed + spz_delay[0];
 		FrameSpeed = 0;
-		det->set_global_delay(spieler.DelaySpeed);
+		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
 
 	++FrameSpeed;
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage],
-		spieler.scrollx, spieler.scrolly);
+		_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (SetUpScreenFunc && !menu_display && !flags.InventMenu) {
 		SetUpScreenFunc();
@@ -193,35 +193,35 @@ void MainMenu::startGame() {
 	animate();
 	exit_room(-1);
 
-	bool soundSwitch = spieler.SoundSwitch;
-	uint8 soundVol = spieler.SoundVol;
-	bool musicSwitch = spieler.MusicSwitch;
-	uint8 musicVol = spieler.MusicVol;
-	bool speechSwitch = spieler.SpeechSwitch;
-	uint8 framesPerSecond = spieler.FramesPerSecond;
-	bool displayText = spieler.DisplayText;
-	int sndLoopMode = spieler.soundLoopMode;
+	bool soundSwitch = _G(spieler).SoundSwitch;
+	uint8 soundVol = _G(spieler).SoundVol;
+	bool musicSwitch = _G(spieler).MusicSwitch;
+	uint8 musicVol = _G(spieler).MusicVol;
+	bool speechSwitch = _G(spieler).SpeechSwitch;
+	uint8 framesPerSecond = _G(spieler).FramesPerSecond;
+	bool displayText = _G(spieler).DisplayText;
+	int sndLoopMode = _G(spieler).soundLoopMode;
 
 	var_init();
 
-	spieler.SoundSwitch = soundSwitch;
-	spieler.SoundVol = soundVol;
-	spieler.MusicSwitch = musicSwitch;
-	spieler.MusicVol = musicVol;
-	spieler.SpeechSwitch = speechSwitch;
-	spieler.FramesPerSecond = framesPerSecond;
-	spieler.DisplayText = displayText;
-	spieler.soundLoopMode = sndLoopMode;
-
-	spieler.PersonRoomNr[0] = 0;
-	room->load_room(&room_blk, 0, &spieler);
+	_G(spieler).SoundSwitch = soundSwitch;
+	_G(spieler).SoundVol = soundVol;
+	_G(spieler).MusicSwitch = musicSwitch;
+	_G(spieler).MusicVol = musicVol;
+	_G(spieler).SpeechSwitch = speechSwitch;
+	_G(spieler).FramesPerSecond = framesPerSecond;
+	_G(spieler).DisplayText = displayText;
+	_G(spieler).soundLoopMode = sndLoopMode;
+
+	_G(spieler).PersonRoomNr[0] = 0;
+	room->load_room(&room_blk, 0, &_G(spieler));
 	ERROR
 
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
 	set_person_pos(160, 80, 0, 1);
 	fx_blend = BLEND3;
-	spieler.PersonHide[P_CHEWY] = 0;
+	_G(spieler).PersonHide[P_CHEWY] = 0;
 	menu_item = 0;
 	cursor_wahl(0);
 	enter_room(-1);
@@ -241,7 +241,7 @@ bool MainMenu::loadGame() {
 	savegameFlag = true;
 	int result = file_menue();
 
-	cursor_wahl((spieler.inv_cur && spieler.AkInvent != -1 &&
+	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
 		menu_item == 1) ? 8 : 0);
 	_G(cur_display) = true;
 	restorePersonAni();
@@ -269,7 +269,7 @@ void MainMenu::playGame() {
 	cur->show_cur();
 	spieler_vector->Count = 0;
 	uhr->reset_timer(0, 0);
-	ailsnd->set_loopmode(spieler.soundLoopMode);
+	ailsnd->set_loopmode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !main_loop(1)) {
 	}
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 8e230539ae5..f5f866d2d39 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -88,14 +88,14 @@ void plot_main_menu() {
 
 		out->scale_set(menutaf->image[i],
 			MENU_X + deltaX + korrektur[i * 2],
-		    spieler.MainMenuY + korrektur[i * 2 + 1],
+		    _G(spieler).MainMenuY + korrektur[i * 2 + 1],
 			zoomx, zoomy, 0);
 	}
 
 	zoomx = 16;
 	zoomy = 16;
 	++m_flip;
-	if (m_flip < 12 * (spieler.DelaySpeed + 1)) {
+	if (m_flip < 12 * (_G(spieler).DelaySpeed + 1)) {
 		int deltaX = 0;
 		if (menu_item == CUR_SAVE)
 			deltaX = -40;
@@ -105,10 +105,10 @@ void plot_main_menu() {
 		int img = IMAGES[menu_item];
 		out->scale_set(menutaf->image[img],
 		    MENU_X + deltaX + korrektur[img * 2] - 5,
-		    spieler.MainMenuY + korrektur[img * 2 + 1] - 10,
+		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
 			zoomx, zoomy, 0);
 	} else {
-		if (m_flip > 15 * (spieler.DelaySpeed + 1))
+		if (m_flip > 15 * (_G(spieler).DelaySpeed + 1))
 			m_flip = 0;
 	}
 }
@@ -146,8 +146,8 @@ void plot_inventar_menu() {
 			x = (minfo.x - (WIN_INF_X)) / 54;
 			y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
 			k = x + (y * 5);
-			k += spieler.InventY * 5;
-			if (k < (spieler.InventY + 3) * 5)
+			k += _G(spieler).InventY * 5;
+			if (k < (_G(spieler).InventY + 3) * 5)
 				out->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
 				               WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
 		}
@@ -186,13 +186,13 @@ void plot_inventar_menu() {
 	y = WIN_INF_Y + 6 + 30;
 	for (j = 0; j < 3; j++) {
 		for (i = 0; i < 5; i++) {
-			if (spieler.InventSlot[(spieler.InventY + j) * 5 + i] != -1) {
-				xy = (int16 *)inv_spr[spieler.InventSlot[(spieler.InventY + j) * 5 + i]];
+			if (_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i] != -1) {
+				xy = (int16 *)inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
 				x1 = 40 - xy[0];
 				x1 /= 2;
 				y1 = 24 - xy[1];
 				y1 /= 2;
-				out->sprite_set(inv_spr[spieler.InventSlot[(spieler.InventY + j) * 5 + i]],
+				out->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 				                 x1 + WIN_INF_X + 14 + i * 54,
 				                 y1 + y + 32 * j, scr_width);
 			}
@@ -214,13 +214,13 @@ void invent_menu() {
 
 	keyVal = 0;
 	flags.InventMenu = true;
-	disp_tmp = spieler.DispFlag;
-	spieler.DispFlag = false;
+	disp_tmp = _G(spieler).DispFlag;
+	_G(spieler).DispFlag = false;
 	ani_tmp = flags.AutoAniPlay;
 	flags.AutoAniPlay = true;
 	flags.StopAutoObj = true;
 	menu_display = 0;
-	tmp = spieler.MausSpeed;
+	tmp = _G(spieler).MausSpeed;
 	if (tmp > 3) {
 		tmp1 = tmp - 2;
 	} else
@@ -231,7 +231,7 @@ void invent_menu() {
 	minfo.y = 92;
 
 	invent_cur_mode = CUR_USE;
-	if (spieler.AkInvent != -1) {
+	if (_G(spieler).AkInvent != -1) {
 		cursor_wahl(CUR_AK_INVENT);
 
 	} else {
@@ -275,7 +275,7 @@ void invent_menu() {
 				case 0:
 					invent_cur_mode = CUR_USE;
 					menu_item = CUR_USE;
-					if (spieler.AkInvent == -1) {
+					if (_G(spieler).AkInvent == -1) {
 						cursor_wahl(CUR_USE);
 					} else {
 						cursor_wahl(CUR_AK_INVENT);
@@ -283,10 +283,10 @@ void invent_menu() {
 					break;
 
 				case 1:
-					if (spieler.AkInvent != -1) {
+					if (_G(spieler).AkInvent != -1) {
 						inv_rand_x = -1;
 						inv_rand_y = -1;
-						ret_look = look_invent(spieler.AkInvent, INV_ATS_MODE, -1);
+						ret_look = look_invent(_G(spieler).AkInvent, INV_ATS_MODE, -1);
 
 						taste_flag = ESC;
 					} else {
@@ -308,34 +308,34 @@ void invent_menu() {
 					inv_rand_x = (minfo.x - (WIN_INF_X)) / 54;
 					inv_rand_y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
 					k = inv_rand_x + (inv_rand_y * 5);
-					k += spieler.InventY * 5;
+					k += _G(spieler).InventY * 5;
 					if (invent_cur_mode == CUR_USE) {
-						if (spieler.AkInvent == -1) {
-							if (spieler.InventSlot[k] != -1) {
-								if (calc_use_invent(spieler.InventSlot[k]) == false) {
+						if (_G(spieler).AkInvent == -1) {
+							if (_G(spieler).InventSlot[k] != -1) {
+								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
 									menu_item = CUR_USE;
-									spieler.AkInvent = spieler.InventSlot[k];
+									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
 									cursor_wahl(CUR_AK_INVENT);
-									del_invent_slot(spieler.InventSlot[k]);
+									del_invent_slot(_G(spieler).InventSlot[k]);
 								}
 							}
 						} else {
-							if (spieler.InventSlot[k] != -1)
-								obj_auswerten(spieler.InventSlot[k], INVENTAR_NORMAL);
+							if (_G(spieler).InventSlot[k] != -1)
+								obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
 							else {
-								spieler.InventSlot[k] = spieler.AkInvent;
+								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;


Commit: 569f5ded9c49d637279e8d0e95d1ef4b53c8961e
    https://github.com/scummvm/scummvm/commit/569f5ded9c49d637279e8d0e95d1ef4b53c8961e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Fix GMM loading of savegames

Changed paths:
    engines/chewy/metaengine.cpp


diff --git a/engines/chewy/metaengine.cpp b/engines/chewy/metaengine.cpp
index 728940c1ae6..ceb0e5961fc 100644
--- a/engines/chewy/metaengine.cpp
+++ b/engines/chewy/metaengine.cpp
@@ -47,16 +47,15 @@ public:
 	bool hasFeature(MetaEngineFeature f) const override;
 	Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
 
-	SaveStateList listSaves(const char *target) const override;
 	int getMaximumSaveSlot() const override;
-	void removeSaveState(const char *target, int slot) const override;
-	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
 };
 
 bool ChewyMetaEngine::hasFeature(MetaEngineFeature f) const {
 	return
 		(f == kSupportsListSaves) ||
 		(f == kSupportsLoadingDuringStartup) ||
+		(f == kSavesUseExtendedFormat) ||
+		(f == kSimpleSavesNames) ||
 		(f == kSupportsDeleteSave) ||
 		(f == kSavesSupportMetaInfo) ||
 		(f == kSavesSupportThumbnail) ||
@@ -76,23 +75,10 @@ Common::Error ChewyMetaEngine::createInstance(OSystem *syst, Engine **engine, co
 	return Common::kNoError;
 }
 
-SaveStateList ChewyMetaEngine::listSaves(const char *target) const {
-	SaveStateList saveList;
-
-	return saveList;
-}
-
 int ChewyMetaEngine::getMaximumSaveSlot() const {
 	return 999;
 }
 
-void ChewyMetaEngine::removeSaveState(const char *target, int slot) const {
-}
-
-SaveStateDescriptor ChewyMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
-	return SaveStateDescriptor();
-}
-
 #if PLUGIN_ENABLED_DYNAMIC(CHEWY)
 	REGISTER_PLUGIN_DYNAMIC(CHEWY, PLUGIN_TYPE_ENGINE, ChewyMetaEngine);
 #else


Commit: 85bb040f4b98e2e8e8802dc34d70ce8fd8cb04d8
    https://github.com/scummvm/scummvm/commit/85bb040f4b98e2e8e8802dc34d70ce8fd8cb04d8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:12-08:00

Commit Message:
CHEWY: Refactor use of rand() function

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8518c1121ab..70c2e1c0af8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -20,8 +20,6 @@
  *
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_rand
-
 #include "chewy/main.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
@@ -1500,7 +1498,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 								else
 									set_person_spr(P_LEFT, P_CHEWY);
 							}
-							r_val = rand() % MAX_RAND_NO_USE;
+							r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
 							action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 						}
 					}


Commit: f834a50aafc9375e35fbd4d452d9b4cf2a8307a9
    https://github.com/scummvm/scummvm/commit/f834a50aafc9375e35fbd4d452d9b4cf2a8307a9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: Allow loading game on startup

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/main_menu.h


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 70c2e1c0af8..66d53f427da 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "chewy/main.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
@@ -81,7 +82,15 @@ void game_main() {
 	cursor_wahl(CUR_WALK);
 	workptr = workpage + 4l;
 
-	MainMenu::execute();
+	int saveSlot = ConfMan.getInt("save_slot");
+	if (saveSlot != -1) {
+		(void)g_engine->loadGameState(saveSlot);
+		MainMenu::playGame();
+		return;
+	} else {
+		MainMenu::execute();
+	}
+
 	remove(ADSH_TMP);
 	tidy();
 	out->rest_palette();
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 174c5866329..1e0f33ec21a 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -67,11 +67,6 @@ private:
 	 */
 	static bool loadGame();
 
-	/**
-	 * Plays the game
-	 */
-	static void playGame();
-
 	/**
 	 * Cinema dialog
 	 */
@@ -91,6 +86,11 @@ public:
 	 * Displays the menu
 	 */
 	static void execute();
+
+	/**
+	 * Plays the game
+	 */
+	static void playGame();
 };
 
 } // namespace Chewy


Commit: cfc9a018f7a866b80df5fb65b9b5e19439bc981f
    https://github.com/scummvm/scummvm/commit/cfc9a018f7a866b80df5fb65b9b5e19439bc981f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: Basic debugger added

Changed paths:
  A engines/chewy/debugger.cpp
  A engines/chewy/debugger.h
    engines/chewy/chewy.cpp
    engines/chewy/module.mk


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 7cce8a3fecc..c0b537613e7 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -24,6 +24,7 @@
 #include "common/system.h"
 #include "engines/util.h"
 #include "chewy/chewy.h"
+#include "chewy/debugger.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/main.h"
@@ -70,6 +71,7 @@ void ChewyEngine::initialize() {
 
 	_tempFiles.add(ADSH_TMP);
 	SearchMan.add("temp", &_tempFiles, 99, false);
+	setDebugger(new Debugger());
 }
 
 Common::Error ChewyEngine::run() {
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
new file mode 100644
index 00000000000..d7a71fee609
--- /dev/null
+++ b/engines/chewy/debugger.cpp
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/file.h"
+#include "chewy/debugger.h"
+#include "chewy/global.h"
+#include "chewy/ngshext.h"
+
+namespace Chewy {
+
+static int strToInt(const char *s) {
+	if (!*s)
+		// No string at all
+		return 0;
+	else if (toupper(s[strlen(s) - 1]) != 'H')
+		// Standard decimal string
+		return atoi(s);
+
+	// Hexadecimal string
+	uint tmp = 0;
+	int read = sscanf(s, "%xh", &tmp);
+	if (read < 1)
+		::error("strToInt failed on string \"%s\"", s);
+	return (int)tmp;
+}
+
+Debugger::Debugger() : GUI::Debugger() {
+	registerCmd("room", WRAP_METHOD(Debugger, Cmd_GotoRoom));
+}
+
+Debugger::~Debugger() {
+}
+
+bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
+	if (argc == 1) {
+		debugPrintf("%s [roomNum]\n", argv[0]);
+		return true;
+	} else {
+		int roomNum = strToInt(argv[1]);
+		exit_room(-1);
+		_G(spieler).PersonRoomNr[P_CHEWY] = roomNum;
+		room->load_room(&room_blk, roomNum, &_G(spieler));
+		fx_blend = BLEND1;
+		enter_room(-1);
+
+		return false;
+	}
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/debugger.h b/engines/chewy/debugger.h
new file mode 100644
index 00000000000..7fa9e84c03b
--- /dev/null
+++ b/engines/chewy/debugger.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_DEBUGGER_H
+#define CHEWY_DEBUGGER_H
+
+#include "gui/debugger.h"
+
+namespace Chewy {
+
+class Debugger : public GUI::Debugger {
+protected:
+	bool Cmd_GotoRoom(int argc, const char **argv);
+public:
+	Debugger();
+	~Debugger() override;
+};
+
+} // End of namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 78ce61c263d..1e0de646935 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -9,6 +9,7 @@ MODULE_OBJS = \
 	cursor.o \
 	datei.o \
 	debug.o \
+	debugger.o \
 	detail.o \
 	effect.o \
 	episode1.o \


Commit: ef0512a920513b67ebef40dff6d64f1560b0c61c
    https://github.com/scummvm/scummvm/commit/ef0512a920513b67ebef40dff6d64f1560b0c61c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: In-progress fleshing out ats_action

Changed paths:
  A engines/chewy/episode5.cpp
  A engines/chewy/episode5.h
    engines/chewy/module.mk
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
new file mode 100644
index 00000000000..5446a987ed9
--- /dev/null
+++ b/engines/chewy/episode5.cpp
@@ -0,0 +1,76 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/episode5.h"
+
+namespace Chewy {
+
+void r66_talk1() {
+}
+
+void r66_talk2() {
+}
+
+void r66_talk3() {
+}
+
+void r66_talk4() {
+}
+
+int r66_proc2() {
+	return 0;
+}
+
+void r76_talk1() {
+}
+
+void r76_talk2() {
+}
+
+void r81_proc1() {
+}
+
+void r82_talk1() {
+}
+
+void r82_talk2() {
+}
+
+void r82_talk3() {
+}
+
+void r84_talk1() {
+}
+
+void r84_talk2() {
+}
+
+void r89_talk1() {
+}
+
+void r94_talk1() {
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
new file mode 100644
index 00000000000..aa649a5a417
--- /dev/null
+++ b/engines/chewy/episode5.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_EPISODE5_H
+#define CHEWY_EPISODE5_H
+
+namespace Chewy {
+
+void r66_talk1();
+void r66_talk2();
+void r66_talk3();
+void r66_talk4();
+int r66_proc2();
+
+void r76_talk1();
+void r76_talk2();
+
+void r81_proc1();
+
+void r82_talk1();
+void r82_talk2();
+void r82_talk3();
+
+void r84_talk1();
+void r84_talk2();
+
+void r89_talk1();
+void r94_talk1();
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 1e0de646935..a3e8b546cc1 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -16,6 +16,7 @@ MODULE_OBJS = \
 	episode2.o \
 	episode3.o \
 	episode4.o \
+	episode5.o \
 	events.o \
 	events_base.o \
 	fehler.o \
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 59cf5d13132..cfc619a1532 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -27,6 +27,7 @@
 #include "chewy/episode2.h"
 #include "chewy/episode3.h"
 #include "chewy/episode4.h"
+#include "chewy/episode5.h"
 
 namespace Chewy {
 
@@ -78,22 +79,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				switch (txt_mode) {
 				case TXT_MARK_LOOK:
 					switch (txt_nr) {
-					case 62:
-						action_ret = r39_use_howard();
-						break;
-
-					case 67:
-						action_ret = r8_gips_wurf();
-						break;
-
-					case 174:
-						action_ret = Room0::getPillow();
-						break;
-
-					case 175:
-						action_ret = Room0::pullSlime();
-						break;
-
 					case 229:
 						auto_move(2, P_CHEWY);
 						r39_look_tv(1);
@@ -107,12 +92,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						switch_room(46);
 						break;
 
-					case 298:
-					case 307:
-					case 308:
-						r58_exit();
-						break;
-
 					case 299:
 						switch_room(59);
 						break;
@@ -121,10 +100,20 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r59_look_poster();
 						break;
 
+					case 298:
+					case 307:
+					case 308:
+						r58_exit();
+						break;
+
 					case 316:
 						r49_look_hotel();
 						break;
 
+					case 362:
+						r56_use_kneipe();
+						break;
+
 					case 402:
 						r69_look_schild();
 						break;
@@ -142,6 +131,53 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				case TXT_MARK_USE:
 					switch (txt_nr) {
+					case 94:
+						r13_jmp_band();
+						break;
+
+					case 95:
+						if (_G(spieler).R13Band)
+							start_aad_wait(116, -1);
+						break;
+
+					case 100:
+						r13_jmp_boden();
+						break;
+
+					case 114:
+						switch_room(_G(spieler).R23GleiterExit);
+						break;
+
+					case 227:
+						r34_xit_kuehlschrank();
+						break;
+
+					case 294:
+						switch_room(46);
+						break;
+
+					case 340:
+						r55_strasse(0);
+						break;
+
+					case 362:
+						r56_use_kneipe();
+						break;
+
+					case 403:
+					case 405:
+						action_ret = r69_use_bruecke();
+						break;
+
+					case 487:
+						r81_proc1();
+						break;
+
+
+/*
+
+
+
 					case 71:
 						if (is_cur_inventar(ZANGE_INV))
 							r8_hole_kohle();
@@ -226,10 +262,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r23_start_gleiter();
 						break;
 
-					case 114:
-						switch_room(_G(spieler).R23GleiterExit);
-						break;
-
 					case 117:
 						action_ret = r12_use_linke_rohr();
 						break;
@@ -339,10 +371,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r34_use_kuehlschrank();
 						break;
 
-					case 227:
-						r34_xit_kuehlschrank();
-						break;
-
 					case 221:
 						r33_use_maschine();
 						break;
@@ -409,10 +437,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r47_use_knopf(txt_nr);
 						break;
 
-					case 294:
-						switch_room(46);
-						break;
-
 					case 295:
 					case 386:
 						action_ret = r45_use_taxi();
@@ -451,10 +475,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r51_use_door(txt_nr);
 						break;
 
-					case 340:
-						r55_strasse(0);
-						break;
-
 					case 341:
 						action_ret = r52_use_hot_dog();
 						break;
@@ -546,11 +566,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r67_use_kommode();
 						break;
 
-					case 403:
-					case 405:
-						action_ret = r69_use_bruecke();
-						break;
-
 					case 406:
 						action_ret = r68_use_papagei();
 						break;
@@ -566,7 +581,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 414:
 						action_ret = r68_use_indigo();
 						break;
-
+*/
 					default:
 						action_ret = false;
 						break;
@@ -585,10 +600,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							start_aad_wait(116, -1);
 						break;
 
-					case 100:
-						r13_jmp_boden();
-						break;
-
 					case 114:
 						switch_room(_G(spieler).R23GleiterExit);
 						break;
@@ -630,6 +641,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r2_jump_out_r1(9);
 						break;
 
+					case 62:
+						r39_talk_howard();
+						break;
+
+					case 67:
+						r8_talk_nimoy();
+						break;
+
 					case 121:
 						r11_talk_debug();
 						break;
@@ -649,22 +668,26 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r37_talk_hahn();
 						break;
 
-					case 62:
-						r39_talk_howard();
+					case 265:
+						r41_talk_hoggy1();
 						break;
 
-					case 274:
-						r27_talk_howard();
+					case 266:
+						r41_talk_hoggy2();
 						break;
 
-					case 283:
-						r40_talk_handler();
+					case 274:
+						r27_talk_howard();
 						break;
 
 					case 275:
 						r40_talk_police();
 						break;
 
+					case 283:
+						r40_talk_handler();
+						break;
+
 					case 295:
 						r45_use_taxi();
 						break;
@@ -726,28 +749,89 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r67_talk_papagei();
 						break;
 
-					case 414:
-						r68_talk_indigo();
+					case 408:
+						r68_talk_papagei();
 						break;
 
 					case 410:
 						r68_talk_keeper();
 						break;
 
-					case 408:
-						r68_talk_papagei();
+					case 414:
+						r68_talk_indigo();
+						break;
+
+					case 419:
+						r66_talk1();
+						break;
+
+					case 420:
+						r66_talk2();
+						break;
+
+					case 421:
+						r66_talk3();
+						break;
+
+					case 425:
+						r66_talk4();
+						break;
+
+					case 447:
+					case 448:
+						r76_talk1();
+						break;
+
+					case 458:
+						r76_talk2();
+						break;
+
+					case 468:
+						r82_talk1();
+						break;
+
+					case 469:
+						r82_talk2();
+						break;
+
+					case 471:
+						r82_talk3();
+						break;
+
+					case 478:
+						r84_talk1();
+						break;
+
+					case 504:
+						r84_talk2();
+						break;
+
+					case 505:
+						start_aad_wait(482, -1);
+						break;
+
+					case 506:
+						start_aad_wait(483, -1);
+						break;
+
+					case 512:
+						r89_talk1();
+						break;
+
+					case 522:
+						r94_talk1();
 						break;
 
 					default:
 						action_ret = false;
 						break;
-
 					}
 					break;
 
 				default:
 					break;
 				}
+
 			} else if (mode == ATS_ACTION_VOR) {
 				switch (txt_mode) {
 				case TXT_MARK_LOOK:
@@ -756,18 +840,21 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r33_look_schublade();
 						break;
 
+					case 389:
+						r67_look_brief();
+						break;
+
 					case 391:
 						auto_move(2, P_CHEWY);
 						break;
 
-					case 389:
-						r67_look_brief();
+					case 431:
+						auto_move(3, P_CHEWY);
 						break;
 
 					default:
 						action_ret = false;
 						break;
-
 					}
 					break;
 
@@ -790,56 +877,21 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						auto_move(1, P_CHEWY);
 						break;
 
-					case 216:
-						action_ret = r29_use_pumpe();
-						break;
-
 					case 225:
 						action_ret = r33_get_munter();
 						break;
 
-					case 229:
-						r39_use_tv();
-						break;
-
-					case 230:
-						action_ret = r32_use_howard();
-						break;
-
-					case 256:
-						action_ret = r37_use_glas();
-						break;
-
-					case 266:
-						action_ret = r41_use_brief();
-						break;
-
-					case 263:
-						action_ret = r42_use_beamter();
-						break;
-
 					case 267:
-						action_ret = r41_use_lola();
-						break;
-
-					case 269:
-						action_ret = r41_use_kasse();
+						if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo)
+							atds->set_ats_str(267, 1, 1);
 						break;
 
 					case 283:
 						action_ret = r40_use_haendler();
 						break;
 
-					case 284:
-						action_ret = r40_use_bmeister();
-						break;
-
-					case 275:
-						r40_use_police();
-						break;
-
-					case 276:
-						action_ret = r40_use_tele();
+					case 423:
+						action_ret = r66_proc2();
 						break;
 
 					default:
@@ -851,20 +903,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				case TXT_MARK_WALK:
 					action_ret = false;
-					/*switch (txt_nr) {
-					default:
-						action_ret = false;
-						break;
-
-					}*/
 					break;
 
 				case TXT_MARK_TALK:
 					switch (txt_nr) {
-					case 67:
-						r8_talk_nimoy();
-						break;
-
 					case 104:
 						r14_talk_eremit();
 						break;
@@ -877,14 +919,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r42_talk_beamter();
 						break;
 
-					case 265:
-						r41_talk_hoggy1();
-						break;
-
-					case 266:
-						r41_talk_hoggy2();
-						break;
-
 					default:
 						action_ret = false;
 						break;
@@ -899,8 +933,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 			flags.AtsAction = false;
 		}
-	} else
+	} else {
 		action_ret = false;
+	}
+
 	return action_ret;
 }
 


Commit: 657a41ad3503fc395f6f7374d9f11fe4bc47311b
    https://github.com/scummvm/scummvm/commit/657a41ad3503fc395f6f7374d9f11fe4bc47311b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: Finished implementing ats_action

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index dd7a5bd9590..fb681a8f18d 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -2062,6 +2062,25 @@ int16 r12_chewy_trans() {
 	return action_flag;
 }
 
+int16 r12_proc1() {
+	bool result = false;
+
+	if (!_G(spieler).inv_cur) {
+		result = true;
+
+		if (_G(spieler).R12KetteLinks) {
+			_G(spieler).R12KetteLinks = false;
+			uhr->enable_timer();
+			atds->set_ats_str(117, 1, 0);
+		} else {
+			auto_move(7, 0);
+			start_aad_wait(29, -1);
+		}
+	}
+
+	return result;
+}
+
 void r13_entry() {
 	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
 		out->cls();
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 08369ee0b60..538b5bb9bfb 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -144,6 +144,8 @@ int16 r12_use_linke_rohr();
 
 int16 r12_chewy_trans();
 
+int16 r12_proc1();
+
 void r11_chewy_bo_use();
 
 void r12_bork_ok();
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index f61bc308e18..0a9cbdbffac 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -545,8 +545,11 @@ int16 r29_get_schlauch() {
 	return action_flag;
 }
 
-void r29_use_schlauch() {
+bool r29_use_schlauch() {
+	bool result = false;
+
 	if (is_cur_inventar(PUMPE_INV)) {
+		result = true;
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		det->hide_static_spr(7);
@@ -562,6 +565,8 @@ void r29_use_schlauch() {
 		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
+
+	return result;
 }
 
 void r29_schlitz_sitz() {
@@ -1054,17 +1059,26 @@ int16 r33_get_munter() {
 	return action_flag;
 }
 
-void r34_use_kuehlschrank() {
-	if (!flags.LoadGame) {
-		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-	}
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	flags.ChewyDontGo = true;
-	if (!flags.LoadGame) {
-		switch_room(34);
+bool r34_use_kuehlschrank() {
+	bool result = false;
+
+	if (!_G(spieler).inv_cur) {
+		result = true;
+
+		if (!flags.LoadGame) {
+			auto_move(3, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		}
+
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		flags.ChewyDontGo = true;
+		if (!flags.LoadGame) {
+			switch_room(34);
+		}
+		set_person_pos(160, 70, P_CHEWY, -1);
 	}
-	set_person_pos(160, 70, P_CHEWY, -1);
+
+	return result;
 }
 
 void r34_xit_kuehlschrank() {
@@ -2145,10 +2159,13 @@ void r40_bmeister_dia(int16 aad_nr) {
 	auto_move(9, P_CHEWY);
 }
 
-void r40_use_police() {
+bool r40_use_police() {
+	bool result = false;
+
 	if (menu_item == CUR_HOWARD) {
 		if (_G(spieler).R40PoliceWeg == false &&
 		        _G(spieler).R40PoliceAniStatus == 255) {
+			result = true;
 			_G(spieler).R40PoliceAb = true;
 			hide_cur();
 			_G(spieler).R40PoliceStart = false;
@@ -2167,8 +2184,11 @@ void r40_use_police() {
 			show_cur();
 			flags.MausLinks = false;
 		}
-	} else
+	} else {
 		start_aad_wait(225, -1);
+	}
+
+	return result;
 }
 
 int16 r40_use_tele() {
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index 129eb248394..83fa502cd75 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -72,7 +72,7 @@ int16 r29_use_pumpe();
 
 int16 r29_get_schlauch();
 
-void r29_use_schlauch();
+bool r29_use_schlauch();
 
 void r29_schlitz_sitz();
 
@@ -112,7 +112,7 @@ short r33_get_munter();
 
 void r33_surimy_go();
 
-void r34_use_kuehlschrank();
+bool r34_use_kuehlschrank();
 
 void r34_xit_kuehlschrank();
 
@@ -179,7 +179,7 @@ void r40_move_train(int16 mode);
 
 int16 r40_use_bmeister();
 
-void r40_use_police();
+bool r40_use_police();
 
 int16 r40_use_tele();
 
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index 5446a987ed9..f06ebbfc214 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -43,15 +43,59 @@ int r66_proc2() {
 	return 0;
 }
 
+int r66_proc7() {
+	return 0;
+}
+
+int r71_proc1() {
+	return 0;
+}
+
+int r71_proc6() {
+	return 0;
+}
+
+int r73_proc1() {
+	return 0;
+}
+
+int r73_proc2() {
+	return 0;
+}
+
+int r74_proc1() {
+	return 0;
+}
+
 void r76_talk1() {
 }
 
 void r76_talk2() {
 }
 
+int r76_proc6() {
+	return 0;
+}
+
+int r76_proc7() {
+	return 0;
+}
+
+int r77_proc1() {
+	return 0;
+}
+
+int r77_proc2() {
+	return 0;
+}
+
 void r81_proc1() {
 }
 
+int r81_proc2() {
+	return 0;
+}
+
 void r82_talk1() {
 }
 
@@ -61,16 +105,124 @@ void r82_talk2() {
 void r82_talk3() {
 }
 
+int r82_proc3() {
+	return 0;
+}
+
+int r82_proc6() {
+	return 0;
+}
+
+int r82_proc9() {
+	return 0;
+}
+
 void r84_talk1() {
 }
 
 void r84_talk2() {
 }
 
+int r84_proc4() {
+	return 0;
+}
+
+int r86_proc2() {
+	return 0;
+}
+
+int r87_proc2() {
+	return 0;
+}
+
+int r87_proc4() {
+	return 0;
+}
+
+int r88_proc1() {
+	return 0;
+}
+
+int r88_proc2() {
+	return 0;
+}
+
+int r88_proc3() {
+	return 0;
+}
+
 void r89_talk1() {
 }
 
+int r89_proc2() {
+	return 0;
+}
+
+int r89_proc3() {
+	return 0;
+}
+
+int r89_proc4() {
+	return 0;
+}
+
+int r89_proc5() {
+	return 0;
+}
+
+int r90_proc3() {
+	return 0;
+}
+
+int r90_proc4() {
+	return 0;
+}
+
+int r90_proc6() {
+	return 0;
+}
+
 void r94_talk1() {
 }
 
+int r94_proc3() {
+	return 0;
+}
+
+int r95_proc2() {
+	return 0;
+}
+
+int r97_proc5() {
+	return 0;
+}
+
+int r97_proc6() {
+	return 0;
+}
+
+int r97_proc7() {
+	return 0;
+}
+
+int r97_proc8() {
+	return 0;
+}
+
+int r97_proc9() {
+	return 0;
+}
+
+int r97_proc10() {
+	return 0;
+}
+
+int r97_proc11() {
+	return 0;
+}
+
+int r97_proc14() {
+	return 0;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index aa649a5a417..7a49aab85ab 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -30,21 +30,69 @@ void r66_talk2();
 void r66_talk3();
 void r66_talk4();
 int r66_proc2();
+int r66_proc7();
+
+int r71_proc1();
+int r71_proc6();
+
+int r73_proc1();
+int r73_proc2();
+
+int r74_proc1();
 
 void r76_talk1();
 void r76_talk2();
+int r76_proc6();
+int r76_proc7();
+
+int r77_proc1();
+int r77_proc2();
 
 void r81_proc1();
+int r81_proc2();
 
 void r82_talk1();
 void r82_talk2();
 void r82_talk3();
+int r82_proc3();
+int r82_proc6();
+int r82_proc9();
 
 void r84_talk1();
 void r84_talk2();
+int r84_proc4();
+int r86_proc2();
+
+int r87_proc2();
+int r87_proc4();
+
+int r88_proc1();
+int r88_proc2();
+int r88_proc3();
 
 void r89_talk1();
+int r89_proc2();
+int r89_proc3();
+int r89_proc4();
+int r89_proc5();
+
+int r90_proc3();
+int r90_proc4();
+int r90_proc6();
+
 void r94_talk1();
+int r94_proc3();
+
+int r95_proc2();
+
+int r97_proc5();
+int r97_proc6();
+int r97_proc7();
+int r97_proc8();
+int r97_proc9();
+int r97_proc10();
+int r97_proc11();
+int r97_proc14();
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index cfc619a1532..931dfb31adc 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -131,53 +131,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 				case TXT_MARK_USE:
 					switch (txt_nr) {
-					case 94:
-						r13_jmp_band();
-						break;
-
-					case 95:
-						if (_G(spieler).R13Band)
-							start_aad_wait(116, -1);
-						break;
-
-					case 100:
-						r13_jmp_boden();
-						break;
-
-					case 114:
-						switch_room(_G(spieler).R23GleiterExit);
-						break;
-
-					case 227:
-						r34_xit_kuehlschrank();
-						break;
-
-					case 294:
-						switch_room(46);
-						break;
-
-					case 340:
-						r55_strasse(0);
-						break;
-
-					case 362:
-						r56_use_kneipe();
-						break;
-
-					case 403:
-					case 405:
-						action_ret = r69_use_bruecke();
+					case 62:
+						action_ret = r39_use_howard();
 						break;
 
-					case 487:
-						r81_proc1();
+					case 67:
+						action_ret = r8_gips_wurf();
 						break;
 
-
-/*
-
-
-
 					case 71:
 						if (is_cur_inventar(ZANGE_INV))
 							r8_hole_kohle();
@@ -185,30 +146,26 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							r8_start_verbrennen();
 						break;
 
-					case 67:
-						if (is_cur_inventar(GIPS_EIMER_INV))
-							r8_gips_wurf();
-						action_ret = false;
-						break;
-
 					case 73:
 						if (!_G(spieler).R9Gitter) {
 							_G(spieler).PersonHide[P_CHEWY] = true;
 							start_detail_wait(5, 1, ANI_VOR);
 							_G(spieler).PersonHide[P_CHEWY] = false;
-						} else
+						} else {
 							action_ret = false;
+						}
 						break;
 
+
 					case 77:
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
-
 							auto_move(3, P_CHEWY);
 							flc->set_custom_user_function(r6_cut_serv1);
 							flic_cut(FCUT_005, CFO_MODE);
 							flc->remove_custom_user_function();
-						} else
+						} else {
 							action_ret = false;
+						}
 						break;
 
 					case 79:
@@ -216,7 +173,8 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 80:
-						auto_move(3, P_CHEWY);
+						if (_G(spieler).inv_cur)
+							auto_move(3, P_CHEWY);
 						break;
 
 					case 81:
@@ -231,8 +189,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r11_scanner();
 						break;
 
-						break;
-
 					case 92:
 						action_ret = r13_monitor_knopf();
 						break;
@@ -262,12 +218,16 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r23_start_gleiter();
 						break;
 
+					case 114:
+						switch_room(_G(spieler).R23GleiterExit);
+						break;
+
 					case 117:
-						action_ret = r12_use_linke_rohr();
+						action_ret = r12_chewy_trans();
 						break;
 
 					case 118:
-						action_ret = r12_chewy_trans();
+						action_ret = r12_proc1();
 						break;
 
 					case 119:
@@ -307,6 +267,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r18_calc_surimy();
 						break;
 
+					case 154:
+						action_ret = r18_use_cart_moni();
+						break;
+
 					case 158:
 						action_ret = r18_go_cyberspace();
 						break;
@@ -330,18 +294,26 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						switch_room(18);
 						break;
 
-					case 179:
-						action_ret = r18_sonden_moni();
+					case 174:
+						action_ret = Room0::getPillow();
 						break;
 
-					case 154:
-						action_ret = r18_use_cart_moni();
+					case 175:
+						action_ret = Room0::pullSlime();
+						break;
+
+					case 179:
+						action_ret = r18_sonden_moni();
 						break;
 
 					case 187:
 						action_ret = r25_use_gleiter();
 						break;
 
+					case 203:
+						action_ret = r32_get_script();
+						break;
+
 					case 206:
 						action_ret = r28_use_breifkasten();
 						break;
@@ -350,9 +322,16 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r33_use_schublade();
 						break;
 
+					case 212:
+						action_ret = r29_zaun_sprung();
+						break;
+
 					case 215:
-						action_ret = false;
-						r29_use_schlauch();
+						action_ret = r29_use_schlauch();
+						break;
+
+					case 216:
+						action_ret = r29_use_pumpe();
 						break;
 
 					case 218:
@@ -363,24 +342,28 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r25_gleiter_loesch();
 						break;
 
-					case 212:
-						action_ret = r29_zaun_sprung();
-						break;
-
 					case 220:
-						r34_use_kuehlschrank();
+						action_ret = r34_use_kuehlschrank();
 						break;
 
 					case 221:
 						r33_use_maschine();
 						break;
 
-					case 231:
-						r32_use_schreibmaschine();
+					case 227:
+						r34_xit_kuehlschrank();
 						break;
 
-					case 203:
-						action_ret = r32_get_script();
+					case 229:
+						action_ret = r39_use_tv();
+						break;
+
+					case 230:
+						action_ret = r32_use_howard();
+						break;
+
+					case 231:
+						r32_use_schreibmaschine();
 						break;
 
 					case 234:
@@ -391,6 +374,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r35_use_cat();
 						break;
 
+					case 242:
+						action_ret = r31_use_topf();
+						break;
+
 					case 244:
 						r31_open_luke();
 						break;
@@ -399,10 +386,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r31_close_luke();
 						break;
 
-					case 242:
-						action_ret = r31_use_topf();
-						break;
-
 					case 249:
 						action_ret = r37_use_wippe();
 						break;
@@ -411,37 +394,62 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						r37_use_hahn();
 						break;
 
+					case 256:
+						action_ret = r37_use_glas();
+						break;
+
+					case 263:
+						action_ret = r42_use_beamter();
+						break;
+
 					case 264:
 						action_ret = r42_use_psack();
 						break;
 
-					case 62:
-						action_ret = r39_use_howard();
+					case 266:
+						action_ret = r41_use_brief();
+						break;
+
+					case 267:
+						action_ret = r41_use_lola();
+						break;
+
+					case 269:
+						action_ret = r41_use_kasse();
+						break;
+
+					case 275:
+						action_ret = r40_use_police();
+						break;
+
+					case 276:
+						action_ret = r40_use_tele();
 						break;
 
 					case 278:
 						action_ret = r40_use_mr_pumpkin();
 						break;
 
-					case 279:
-						action_ret = r40_use_schalter(205);
+					case 284:
+						action_ret = r40_use_bmeister();
+						break;
+
+					case 286:
+					case 289:
+					case 290:
+					case 291:
+						r47_use_knopf(txt_nr);
 						break;
 
 					case 288:
 						action_ret = r46_use_schloss();
 						break;
 
-					case 286:
-					case 292:
-					case 293:
-						r47_use_knopf(txt_nr);
+					case 294:
+						switch_room(46);
 						break;
 
 					case 295:
-					case 386:
-						action_ret = r45_use_taxi();
-						break;
-
 					case 297:
 						action_ret = r45_use_boy();
 						break;
@@ -475,6 +483,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r51_use_door(txt_nr);
 						break;
 
+					case 340:
+						r55_strasse(0);
+						break;
+
 					case 341:
 						action_ret = r52_use_hot_dog();
 						break;
@@ -522,14 +534,18 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r57_use_taxi();
 						break;
 
-					case 367:
-						action_ret = r56_use_taxi();
+					case 362:
+						r56_use_kneipe();
 						break;
 
 					case 366:
 						action_ret = r56_use_man();
 						break;
 
+					case 367:
+						action_ret = r56_use_taxi();
+						break;
+
 					case 371:
 						action_ret = r62_use_laura();
 						break;
@@ -566,6 +582,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r67_use_kommode();
 						break;
 
+					case 403:
+					case 405:
+						action_ret = r69_use_bruecke();
+						break;
+
 					case 406:
 						action_ret = r68_use_papagei();
 						break;
@@ -581,7 +602,167 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 414:
 						action_ret = r68_use_indigo();
 						break;
-*/
+
+					case 425:
+						action_ret = r66_proc7();
+						break;
+
+					case 430:
+						action_ret = r73_proc1();
+						break;
+
+					case 433:
+						action_ret = r73_proc2();
+						break;
+
+					case 435:
+						action_ret = r74_proc1();
+						break;
+
+					case 442:
+						action_ret = r77_proc1();
+						break;
+
+					case 443:
+						action_ret = r71_proc6();
+						break;
+
+					case 450:
+						action_ret = r76_proc6();
+						break;
+
+					case 452:
+						action_ret = r76_proc7();
+						break;
+
+					case 463:
+						action_ret = r77_proc1();
+						break;
+
+					case 464:
+						action_ret = r77_proc2();
+						break;
+
+					case 467:
+					case 473:
+						action_ret = r82_proc9();
+						break;
+
+					case 468:
+						action_ret = r82_proc6();
+						break;
+
+					case 471:
+						action_ret = r82_proc3();
+						break;
+
+
+					case 481:
+					case 482:
+						action_ret = r84_proc4();
+						break;
+
+					case 487:
+						r81_proc1();
+						break;
+
+					case 490:
+						action_ret = r81_proc2();
+						break;
+
+					case 492:
+						action_ret = r88_proc2();
+						break;
+
+					case 493:
+						action_ret = r88_proc3();
+						break;
+
+					case 494:
+						action_ret = r88_proc1();
+						break;
+
+					case 495:
+						action_ret = r88_proc2();
+						break;
+
+					case 497:
+						action_ret = r86_proc2();
+						break;
+
+					case 501:
+					case 503:
+						action_ret = r87_proc2();
+						break;
+
+					case 502:
+						action_ret = r87_proc4();
+						break;
+
+					case 508:
+						action_ret = r89_proc2();
+						break;
+
+					case 509:
+						action_ret = r89_proc5();
+						break;
+
+					case 514:
+						action_ret = r89_proc4();
+						break;
+
+					case 517:
+						action_ret = r90_proc3();
+						break;
+
+					case 519:
+						action_ret = r90_proc4();
+						break;
+
+					case 520:
+						action_ret = r90_proc6();
+						break;
+
+					case 522:
+						action_ret = r94_proc3();
+						break;
+
+					case 525:
+						action_ret = r95_proc2();
+						break;
+
+					case 530:
+						action_ret = r97_proc8();
+						break;
+
+					case 531:
+						action_ret = r97_proc6();
+						break;
+
+					case 535:
+						action_ret = r97_proc11();
+						break;
+
+					case 538:
+						action_ret = r97_proc7();
+						break;
+
+					case 539:
+						action_ret = r97_proc9();
+						break;
+
+					case 541:
+						action_ret = r97_proc14();
+						break;
+
+					case 542:
+						action_ret = r97_proc5();
+						break;
+
+					case 543:
+						action_ret = r97_proc10();
+						break;
+
 					default:
 						action_ret = false;
 						break;
@@ -600,6 +781,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							start_aad_wait(116, -1);
 						break;
 
+					case 100:
+						r13_jmp_boden();
+						break;
+
 					case 114:
 						switch_room(_G(spieler).R23GleiterExit);
 						break;
@@ -625,6 +810,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = r69_use_bruecke();
 						break;
 
+					case 487:
+					case 489:
+						r81_proc1();
+						break;
+						
 					default:
 						action_ret = false;
 						break;


Commit: 568de6434cb04e002200af4bfbe6e7b28964d8d9
    https://github.com/scummvm/scummvm/commit/568de6434cb04e002200af4bfbe6e7b28964d8d9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: Add missing case from ads_ende

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 931dfb31adc..144675bcf31 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1133,10 +1133,8 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 	if (flags.AdsAction == false) {
 		flags.AdsAction = true;
-		switch (dia_nr) {
-
-			break;
 
+		switch (dia_nr) {
 		case 2:
 			if (blk_nr == 4 && str_end_nr == 0) {
 
@@ -1217,7 +1215,11 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 				}
 			}
 			break;
+
+		default:
+			break;
 		}
+
 		flags.AdsAction = false;
 	}
 }
@@ -1232,6 +1234,17 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 		auto_move(6, P_CHEWY);
 		break;
 
+	case 22:
+		if (str_end_nr == 1) {
+			det->del_static_ani(3);
+			start_detail_wait(5, 1, 0);
+			det->set_static_ani(3, -1);
+			start_aad_wait(456, -1);
+		}
+		break;
+
+	default:
+		break;
 	}
 }
 


Commit: 1e894a58a5a2a74e4480919fcde7abbca198096f
    https://github.com/scummvm/scummvm/commit/1e894a58a5a2a74e4480919fcde7abbca198096f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:13-08:00

Commit Message:
CHEWY: Added missing calc_inv_use_txt content

Changed paths:
    engines/chewy/global.h
    engines/chewy/menus.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 79f1c06fe13..cf2ea430137 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -392,6 +392,8 @@ void invent_2_slot(int16 nr);
 
 int16 del_invent_slot(int16 nr);
 
+void remove_inventory(int16 nr);
+
 void get_display_xy(int16 *x, int16 *y, int16 nr);
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz);
 void ads_menu();
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index f5f866d2d39..b05c3cc4190 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -1046,4 +1046,13 @@ int16 del_invent_slot(int16 nr) {
 	return ok;
 }
 
+void remove_inventory(int16 nr) {
+	if (nr == _G(spieler).AkInvent) {
+		del_inventar(nr);
+	} else {
+		obj->del_inventar(nr, &room_blk);
+		del_invent_slot(nr);
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 144675bcf31..799c0aab8d5 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1269,6 +1269,7 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 #define R67_PAPA2_DIA 10019
 #define R68_KEEPER_DIA 10020
 #define R13_BORK_DIA 33
+
 void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
 	int16 talk_stop_ani = -1;
 	int16 talk_show_static = -1;
@@ -1283,8 +1284,8 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	stop_ani = -1;
 	altes_format = false;
 	tmp = -1;
-	switch (dia_nr) {
 
+	switch (dia_nr) {
 	case 30000:
 	case 25:
 	case 34:
@@ -2061,10 +2062,17 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 }
 
 void calc_inv_use_txt(int16 test_nr) {
+	int scrollx, scrolly;
 	int16 ret;
+
 	switch (test_nr) {
 	case GBUCH_OPEN_INV:
 	case MONOKEL_INV:
+		scrollx = _G(spieler).scrollx;
+		scrolly = _G(spieler).scrolly;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
+
 		room->open_handle("BACK/GBOOK.TGP", "rb", R_TGPDATEI);
 		ERROR
 		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0);
@@ -2072,12 +2080,18 @@ void calc_inv_use_txt(int16 test_nr) {
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->back2screen(workpage);
+
+		::error("TODO: Proper ScummVM loops below");
 		while (in->get_switch_code() != ESC);
 		while (in->get_switch_code() != 0);
-		room->open_handle(&background[0], "rb", R_TGPDATEI);
+
+		room->open_handle(EPISODE1, "rb", R_TGPDATEI);
 		ERROR
 		room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
 		ERROR;
+
+		_G(spieler).scrollx = scrollx;
+		_G(spieler).scrolly = scrolly;
 		break;
 
 	case ANGEL_INV:
@@ -2099,12 +2113,17 @@ void calc_inv_use_txt(int16 test_nr) {
 		break;
 
 	case MESSER_INV:
-		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
-		cursor_wahl(menu_item);
-		invent_2_slot(K_MASKE_INV);
-		invent_2_slot(K_FLEISCH_INV);
-		invent_2_slot(K_KERNE_INV);
+		if (_G(spieler).AkInvent == 40) {
+			del_inventar(_G(spieler).AkInvent);
+			menu_item = CUR_USE;
+			cursor_wahl(menu_item);
+			invent_2_slot(K_MASKE_INV);
+			invent_2_slot(K_FLEISCH_INV);
+			invent_2_slot(K_KERNE_INV);
+		} else if (_G(spieler).AkInvent == 88) {
+			_G(spieler).flags26_10 = true;
+			start_aad_wait(_G(spieler).PersonRoomNr[0] + 350, -1);
+		}
 		break;
 
 	case BRIEF_INV:
@@ -2121,8 +2140,10 @@ void calc_inv_use_txt(int16 test_nr) {
 		del_inventar(_G(spieler).AkInvent);
 		menu_item = CUR_USE;
 		cursor_wahl(menu_item);
+		// fall through
+
 	case WOLLE_INV:
-		del_invent_slot(WOLLE_INV);
+		remove_inventory(WOLLE_INV);
 		atds->set_ats_str(FLASCHE_INV, 1, INV_ATS_DATEI);
 		_G(spieler).R56WhiskyMix = true;
 		break;
@@ -2137,6 +2158,41 @@ void calc_inv_use_txt(int16 test_nr) {
 		obj->change_inventar(test_nr, B_MARY2_INV, &room_blk);
 		break;
 
+	case 88:
+	case 13:
+		_G(spieler).flags26_10 = true;
+		flags.InventMenu = false;
+		start_spz(5, 255, 0, 0);
+		start_aad_wait(_G(spieler).PersonRoomNr[0] + 350, -1);
+		flags.InventMenu = true;
+		atds->set_ats_str(88, 1, 6);
+		break;
+
+	case 102:
+	case 104:
+		del_inventar(_G(spieler).AkInvent);
+		menu_item = CUR_USE;
+		cursor_wahl(CUR_USE);
+
+		ret = del_invent_slot(test_nr);
+		_G(spieler).InventSlot[ret] = 110;
+		obj->change_inventar(104, 110, &room_blk);
+		break;
+
+	case 105:
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(105, 0, 1, 6);
+		menu_item = CUR_USE;
+		cursor_wahl(CUR_USE);
+		break;
+
+	case 106:
+		del_invent_slot(106);
+		atds->set_ats_str(105, 0, 1, 6);
+		break;
+
+	default:
+		break;
 	}
 }
 


Commit: 10e78324cae31938cae4201be4c93bc3bde0c7f7
    https://github.com/scummvm/scummvm/commit/10e78324cae31938cae4201be4c93bc3bde0c7f7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to calc_inv_no_use

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/global.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index c9457c4c626..4633291e5d6 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -92,6 +92,10 @@ public:
 	 * Save savegame data
 	 */
 	Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override;
+
+	uint getRandomNumber(uint max) {
+		return _rnd.getRandomNumber(max);
+	}
 };
 
 extern ChewyEngine *g_engine;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index cf2ea430137..c6dfe4669a4 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -89,6 +89,8 @@ public:
 
 	bool _cur_display = false;
 	int16 _maus_links_click = 0;
+	Common::String _calc_inv_text_str1, _calc_inv_text_str2;
+	bool _calc_inv_text_set = false;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 799c0aab8d5..ee2e13b9134 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2196,6 +2196,30 @@ void calc_inv_use_txt(int16 test_nr) {
 	}
 }
 
+static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
+	int16 txt_anz;
+	const char *s;
+
+	s = atds->ats_get_txt(31, TXT_MARK_USE, &txt_anz, 16);
+	_G(calc_inv_text_str1) = Common::String::format("%s ", s);
+
+	atds->load_atds(cur_inv, INV_ATS_DATEI);
+	ERROR
+
+	s = atds->ats_get_txt(cur_inv, TXT_MARK_NAME, &txt_anz, 6);
+	_G(calc_inv_text_str1) += s;
+
+	s = atds->ats_get_txt(32, TXT_MARK_USE, &txt_anz, 16);
+	_G(calc_inv_text_str2) = Common::String::format("%s ", s);
+
+	atds->load_atds(test_nr, INV_ATS_DATEI);
+	ERROR
+
+	s = atds->ats_get_txt(test_nr, TXT_MARK_NAME, &txt_anz, 6);
+	_G(calc_inv_text_str2) += s;
+	_G(calc_inv_text_set) = true;
+}
+
 bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	int16 inv_mode;
 	int16 txt_nr = 0;
@@ -2203,6 +2227,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	int16 r_val = 0;
 	int16 ok;
 	ret = false;
+
 	switch (mode) {
 	case INVENTAR_NORMAL:
 		inv_mode = IUID_IIB;
@@ -2231,8 +2256,8 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	default:
 		inv_mode = -1;
 		break;
-
 	}
+
 	if (inv_mode != -1) {
 		txt_nr = atds->calc_inv_no_use(_G(spieler).AkInvent, test_nr, inv_mode);
 		ERROR
@@ -2252,12 +2277,18 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 			if (inv_mode == IUID_SPIELER)
 				ok = calc_person_click(test_nr);
 			if (!ok) {
-				warning("FIXME - use of random");
+				r_val = g_engine->getRandomNumber(5);
 
-				ret = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+				if (flags.InventMenu) {
+					calc_inv_get_text(_G(spieler).AkInvent, test_nr);
+					look_invent(-1, INV_USE_ATS_MODE, RAND_NO_USE[r_val] + 15000);
+				} else {
+					ret = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+				}
 			}
 		}
 	}
+
 	return ret;
 }
 


Commit: e007f9076ddbb784b1e5944dafecb4601cceeeff
    https://github.com/scummvm/scummvm/commit/e007f9076ddbb784b1e5944dafecb4601cceeeff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to calc_person_txt

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index ee2e13b9134..5ae73e1e283 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2294,6 +2294,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 
 int16 calc_person_txt(int16 p_nr) {
 	int16 txt_nr = -1;
+
 	switch (p_nr) {
 	case P_CHEWY:
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
@@ -2311,24 +2312,42 @@ int16 calc_person_txt(int16 p_nr) {
 		break;
 
 	case P_HOWARD:
-		if (menu_item == CUR_USE) {
+		switch (menu_item) {
+		case CUR_USE:
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 40:
+				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != 5) {
+					menu_item = CUR_HOWARD;
+					cursor_wahl(menu_item);
+					txt_nr = 30000;
+				}
+				break;
+
 			case 67:
+			case 71:
 				menu_item = CUR_HOWARD;
 				cursor_wahl(menu_item);
 				txt_nr = 30000;
 				break;
 
 			case 42:
-				if (!_G(spieler).R42MarkeOk) {
+				if (!_G(spieler).R42MarkeOk && !_G(spieler).R42HoToBeamter) {
 					menu_item = CUR_HOWARD;
 					cursor_wahl(menu_item);
 					txt_nr = 30000;
 				}
 				break;
 
+			default:
+				break;
 			}
+			break;
+
+		case CUR_LOOK:
+			return (_G(spieler).PersonRoomNr[P_CHEWY] == 89) ? 513 : -1;
+
+		default:
+			break;
 		}
 		break;
 
@@ -2336,6 +2355,7 @@ int16 calc_person_txt(int16 p_nr) {
 		if (menu_item == CUR_USE) {
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 67:
+			case 71:
 				menu_item = CUR_NICHELLE;
 				cursor_wahl(menu_item);
 				txt_nr = 30000;


Commit: 9cff82bce42478ec02c6f82cf25e0bab450e66b9
    https://github.com/scummvm/scummvm/commit/9cff82bce42478ec02c6f82cf25e0bab450e66b9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to calc_person_click

Changed paths:
    engines/chewy/episode3.cpp
    engines/chewy/episode3.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index d54dce598ca..43bda179241 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -718,6 +718,43 @@ int16 r49_use_boy() {
 	return action_ret;
 }
 
+void r49_use_boy_cigar() {
+	hide_cur();
+	del_inventar(_G(spieler).AkInvent);
+	r49_talk_boy(263);
+	SetUpScreenFunc = nullptr;
+	auto_move(5, 0);
+
+	int16 zoom = room->room_info->ZoomFak;
+	room->set_zoom(zoom);
+	go_auto_xy(416, 79, 1, 0);
+	set_person_spr(0, 1);
+	flags.NoScroll = true;
+
+	auto_scroll(164, 0);
+	flic_cut(67, 0);
+	test_intro(17);
+	ERROR
+
+	room->set_timer_status(255, 0);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
+	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
+	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+
+	flags.NoScroll = false;
+	set_person_spr(1, 0);
+	start_aad_wait(264, -1);
+	room->set_zoom(zoom);
+
+	obj->add_inventar(68, &room_blk);
+	inventory_2_cur(68);
+	atds->set_steuer_bit(318, 1, 1);
+
+	SetUpScreenFunc = r49setup_func;
+	_G(spieler).R49BoyWeg = true;
+	show_cur();
+}
+
 void r49_talk_boy() {
 	if (!_G(spieler).R49BoyWeg) {
 		auto_move(3, P_CHEWY);
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
index b05c1427961..91d704c2810 100644
--- a/engines/chewy/episode3.h
+++ b/engines/chewy/episode3.h
@@ -79,6 +79,7 @@ void r49_talk_boy(int16 aad_nr);
 void r49_look_hotel();
 
 int16 r49_use_boy();
+void r49_use_boy_cigar();
 
 void r49_entry(int16 eib_nr);
 
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index f06ebbfc214..4e475067289 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -170,6 +170,9 @@ int r89_proc5() {
 	return 0;
 }
 
+void r90_proc2() {
+}
+
 int r90_proc3() {
 	return 0;
 }
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 7a49aab85ab..0487184cddf 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -76,6 +76,7 @@ int r89_proc3();
 int r89_proc4();
 int r89_proc5();
 
+void r90_proc2();
 int r90_proc3();
 int r90_proc4();
 int r90_proc6();
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 5ae73e1e283..033120b4984 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2377,6 +2377,7 @@ int16 calc_person_txt(int16 p_nr) {
 
 int16 calc_person_click(int16 p_nr) {
 	int16 action_ret = false;
+
 	switch (p_nr) {
 	case P_CHEWY:
 		switch (_G(spieler).AkInvent) {
@@ -2385,6 +2386,18 @@ int16 calc_person_click(int16 p_nr) {
 			action_ret = true;
 			break;
 
+		case CIGAR_INV:
+			if (_G(spieler).PersonRoomNr[P_CHEWY] == 49) {
+				r49_use_boy_cigar();
+				action_ret = true;
+			}
+			break;
+
+		case 112:
+			r90_proc2();
+			action_ret = true;
+			break;
+
 		default:
 			action_ret = false;
 			break;
@@ -2404,7 +2417,6 @@ int16 calc_person_click(int16 p_nr) {
 		default:
 			action_ret = false;
 			break;
-
 		}
 		break;
 
@@ -2432,6 +2444,7 @@ int16 calc_person_click(int16 p_nr) {
 		break;
 
 	}
+
 	return action_ret;
 }
 


Commit: f38cd362aa2a073bc518b30625542f039ce4c83b
    https://github.com/scummvm/scummvm/commit/f38cd362aa2a073bc518b30625542f039ce4c83b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to calc_person_dia

Changed paths:
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/global.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index 4e475067289..b336a3a834e 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -55,6 +55,9 @@ int r71_proc6() {
 	return 0;
 }
 
+void r71_proc7() {
+}
+
 int r73_proc1() {
 	return 0;
 }
@@ -113,6 +116,9 @@ int r82_proc6() {
 	return 0;
 }
 
+void r82_proc8() {
+}
+
 int r82_proc9() {
 	return 0;
 }
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 0487184cddf..fafb8fe6f77 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -34,6 +34,7 @@ int r66_proc7();
 
 int r71_proc1();
 int r71_proc6();
+void r71_proc7();
 
 int r73_proc1();
 int r73_proc2();
@@ -56,6 +57,7 @@ void r82_talk2();
 void r82_talk3();
 int r82_proc3();
 int r82_proc6();
+void r82_proc8();
 int r82_proc9();
 
 void r84_talk1();
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c6dfe4669a4..b1ed70f712d 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -91,6 +91,7 @@ public:
 	int16 _maus_links_click = 0;
 	Common::String _calc_inv_text_str1, _calc_inv_text_str2;
 	bool _calc_inv_text_set = false;
+	bool _stopAutoMove[3] = { false };
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 033120b4984..a127600a857 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2449,51 +2449,254 @@ int16 calc_person_click(int16 p_nr) {
 }
 
 void calc_person_dia(int16 p_nr) {
-	int16 room_nr;
-	room_nr = false;
+	bool flag = false;
+	int16 room_nr = 0;
+	int i;
+
 	switch (p_nr) {
 	case P_HOWARD:
 	case P_NICHELLE:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-		case 69:
+		switch (_G(spieler).PersonRoomNr[P_CHEWY] - 28) {
+		case 0:
+			_G(spieler).PersonDia[p_nr] = (p_nr == P_HOWARD) ? 545 : 547;
+			break;
+
+		case 18:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 542;
+			break;
+
+		case 28:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 543;
+			break;
+
+		case 38:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 540;
+			break;
+
+		case 39:
+			_G(spieler).PersonDia[p_nr] = 501;
+			break;
+
+		case 40:
+			_G(spieler).PersonDia[p_nr] = 500;
+			break;
+
+		case 41:
+			_G(spieler).PersonDia[p_nr] = 492;
+			break;
+
+		case 42:
+			if (_G(spieler).flags32_10) {
+				_G(spieler).PersonDia[p_nr] = 465;
+				if (_G(spieler).flags30_80 && !_G(spieler).flags31_1)
+					_G(spieler).PersonDia[p_nr] = 466;
+			}
+			break;
+
+		case 43:
+			if (p_nr == P_HOWARD) {
+				_G(spieler).PersonDiaRoom[1] = 1;
+				_G(spieler).PersonDia[P_HOWARD] = 470;
+			} else {
+				_G(spieler).PersonDia[P_NICHELLE] = 536;
+			}
+			break;
+
+		case 45:
+			_G(spieler).PersonDia[p_nr] = _G(spieler).flags32_2 ? 469 : 467;
+			break;
+
+		case 46:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 535;
+			else
+				flag = true;
+			break;
+
+		case 47:
+			if (!_G(spieler).flags32_10)
+				_G(spieler).PersonDia[P_NICHELLE] = 536;
+			else if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[P_NICHELLE] = 534;
+			else
+				flag = true;
+			break;
+
+		case 51:
+			if (p_nr != P_NICHELLE)
+				flag = true;
+			else if (_G(spieler).flags30_10)
+				_G(spieler).PersonDia[p_nr] = 533;
+			else
+				r82_proc8();
+			break;
+
+		case 53:
+			if (!_G(spieler).flags30_2)
+				_G(spieler).PersonDia[p_nr] = 457;
+			else
+				flag = true;
+			break;
+
+		case 54:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 532;
+			else
+				flag = true;
+			break;
+
+		case 56:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 531;
+			else
+				flag = true;
+			break;
+
+		case 57:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 530;
+			else
+				flag = true;
+			break;
+
+		case 58:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 529;
+			else
+				flag = true;
+			break;
+
+		case 59:
+			if (p_nr == P_NICHELLE) {
+				if (!_G(spieler).flags28_4) {
+					r71_proc7();
+					_G(spieler).PersonDia[p_nr] = -1;
+				}
+			} else if (!_G(spieler).flags28_4) {
+				_G(spieler).PersonDia[p_nr] = 528;
+			} else {
+				flag = true;
+			}
+			break;
+
+		case 60:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 528;
+			else
+				flag = true;
+			break;
+
+		case 61:
 			_G(spieler).PersonDia[p_nr] = 381;
 			break;
 
+		case 62:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 527;
+			else
+				flag = true;
+			break;
+
+		case 63:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 526;
+			else
+				flag = true;
+			break;
+
+		case 66:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 525;
+			else
+				flag = true;
+			break;
+
+		case 67:
+			if (_G(spieler).flags32_10)
+				_G(spieler).PersonDia[p_nr] = 507;
+			else
+				flag = true;
+			break;
+
+		case 68:
+			if (_G(spieler).flags32_10)
+				_G(spieler).PersonDia[p_nr] = 497;
+			else
+				flag = true;
+			break;
+
+		case 69:
+			if (p_nr == P_HOWARD) {
+				if (_G(spieler).ChewyAni != 5)
+					_G(spieler).PersonDia[p_nr] = 565;
+				else
+					flag = true;
+			}			
+			break;
+
 		default:
-			_G(spieler).PersonDia[p_nr] = _G(spieler).PersonGlobalDia[p_nr];
-			room_nr = _G(spieler).PersonDiaRoom[p_nr];
+			flag = true;
 			break;
+		}
 
+		if (flag) {
+			_G(spieler).PersonDia[p_nr] = _G(spieler).PersonGlobalDia[p_nr];
+			room_nr = _G(spieler).PersonDiaRoom[p_nr];
 		}
+
 		atds->set_string_end_func(&r65_atds_string_start);
+
 		if (!room_nr) {
 			if (_G(spieler).DiaAMov != -1)
 				auto_move(_G(spieler).DiaAMov, P_CHEWY);
-			room_nr = _G(spieler).PersonDiaRoom[p_nr];
-			_G(spieler).PersonDiaRoom[p_nr] = false;
+
+			int16 tmp[3];
+			for (i = 0; i < 3; ++i) {
+				tmp[i] = _G(spieler).PersonDiaRoom[i];
+				_G(spieler).PersonDiaRoom[i] = 0;
+				_G(stopAutoMove)[i] = true;
+			}
+
 			start_aad_wait(_G(spieler).PersonDia[p_nr], -1);
-			_G(spieler).PersonDiaRoom[p_nr] = room_nr;
+
+			for (i = 0; i < 3; ++i) {
+				_G(spieler).PersonDiaRoom[i] = tmp[i];
+				_G(stopAutoMove)[i] = false;
+			}
+
+			show_cur();
 		} else {
 			room_blk.AadLoad = false;
 			room_blk.AtsLoad = false;
 			_G(spieler).PersonDiaTmpRoom[p_nr] = _G(spieler).PersonRoomNr[P_CHEWY];
 			save_person_rnr();
-			if (p_nr == P_HOWARD)
+
+			if (p_nr == P_HOWARD) {
+				_G(spieler).PersonDiaRoom[0] = 1;
 				switch_room(65);
-			else if (p_nr == P_NICHELLE) {
+				_G(spieler).PersonDiaRoom[0] = 0;
+
+			} else if (p_nr == P_NICHELLE) {
 				if (_G(spieler).PersonDia[P_NICHELLE] < 10000) {
 					_G(cur_hide_flag) = false;
 					hide_cur();
 					start_aad_wait(_G(spieler).PersonDia[P_NICHELLE], -1);
+					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE] != 0;
 					show_cur();
 				} else {
 					start_ads_wait(_G(spieler).PersonDia[P_NICHELLE] - 10000);
 				}
 			}
 		}
+
 		atds->set_string_end_func(&atds_string_start);
 		break;
 
+	default:
+		break;
 	}
 }
 


Commit: d592ee654aba93cd66e0fc4a781f880ec9bfa04b
    https://github.com/scummvm/scummvm/commit/d592ee654aba93cd66e0fc4a781f880ec9bfa04b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to go_auto_xy

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 66d53f427da..7cd4abb5fb8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1353,18 +1353,21 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 	int16 move_status;
 	int16 tmp;
 	int16 ende;
-	if (!flags.ChAutoMovXy) {
+
+	if (!_G(stopAutoMove)[p_nr] &&
+			_G(spieler).PersonRoomNr[p_nr] == _G(spieler).PersonRoomNr[P_CHEWY]) {
 		move_status = true;
-		flags.ChAutoMovXy = true;
 		tmp = _G(maus_links_click);
 		_G(maus_links_click) = false;
 		ende = 0;
+
 		spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
 		spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 		spieler_mi[p_nr].XyzEnd[0] = x;
 		spieler_mi[p_nr].XyzEnd[1] = y;
-		mov->get_mov_vector((int16
-		                     *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
+		mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
+			spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
+
 		if (spieler_vector[p_nr].Count)
 			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 		if (mode == ANI_WAIT) {
@@ -1385,8 +1388,8 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 				set_up_screen(DO_SETUP);
 			}
 		}
+
 		_G(maus_links_click) = tmp;
-		flags.ChAutoMovXy = false;
 	}
 }
 
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 3d790e24abc..a823a2e0f27 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -540,7 +540,7 @@ struct Flags {
 	uint16 StaticUseTxt : 1;
 	uint16 GedAction : 1;
 	uint16 ChAutoMov : 1;
-	uint16 ChAutoMovXy : 1;
+	uint16 ChAutoMovXy : 1;		// TODO: Check removal in favor of stopAutoMove
 	uint16 BreakAMov : 1;
 
 	uint16 AtsAction : 1;


Commit: 3308aeb9bd45d471af98738aa59cec268e435e4f
    https://github.com/scummvm/scummvm/commit/3308aeb9bd45d471af98738aa59cec268e435e4f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to play_scene_ani

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 303c3f53d9f..2554c6ffaac 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -34,6 +34,7 @@ namespace Chewy {
 
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
+#define ANI_5 5
 #define GITTER_BLITZEN 7
 
 void play_scene_ani(int16 nr, int16 mode) {
@@ -50,19 +51,22 @@ void play_scene_ani(int16 nr, int16 mode) {
 	r_nr = _G(spieler).PersonRoomNr[P_CHEWY] * 100 + nr;
 
 	switch (r_nr) {
-
 	case ROOM_2_3:
-		start_aad(49);
+		det->start_detail(ANI_5, 255, ANI_VOR);
+		start_spz(ANI_5, 255, 0, ANI_VOR);
+		start_aad_wait(49, -1);
+		det->stop_detail(ANI_5);
+
 		det->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
 		_G(spieler).R2KabelBork = 1;
 		del_inventar(_G(spieler).AkInvent);
+
 		atds->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
 		atds->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
 		atds->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
 		atds->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
 		atds->set_ats_str(11, 1, ATS_DATEI);
-
 		break;
 
 	case ROOM_8_17:
@@ -74,17 +78,15 @@ void play_scene_ani(int16 nr, int16 mode) {
 		del_inventar(_G(spieler).AkInvent);
 		break;
 
+	default:
+		break;
 	}
+
 	start_detail_wait(nr, 1, mode);
 
 	switch (r_nr) {
-
-	case ROOM_0_3:
-		start_detail_wait(STERNE_ANI, 2, ANI_VOR);
-		set_person_pos(222, 106, P_CHEWY, P_LEFT);
-		break;
-
 	case ROOM_2_3:
+		start_spz(16, 255, 0, P_CHEWY);
 		start_aad_wait(47, -1);
 		break;
 
@@ -94,7 +96,6 @@ void play_scene_ani(int16 nr, int16 mode) {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		atds->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
 		atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
-
 		break;
 
 	case ROOM_3_1:
@@ -104,6 +105,9 @@ void play_scene_ani(int16 nr, int16 mode) {
 	case ROOM_9_4:
 		r9_gtuer();
 		break;
+
+	default:
+		break;
 	}
 
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -292,6 +296,7 @@ void check_ged_action(int16 index) {
 	int16 flag;
 	index -= 50;
 	index /= 4;
+
 	if (!flags.GedAction) {
 		flags.GedAction = true;
 		flag = false;


Commit: 2503249cf16aab44155e3352020ba457e72f3615
    https://github.com/scummvm/scummvm/commit/2503249cf16aab44155e3352020ba457e72f3615
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:14-08:00

Commit Message:
CHEWY: Added changes to check_ged_action

Changed paths:
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index b336a3a834e..81c39cf156b 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -202,6 +202,15 @@ int r95_proc2() {
 	return 0;
 }
 
+void r97_proc2() {
+}
+
+void r97_proc3() {
+}
+
+void r97_proc4() {
+}
+
 int r97_proc5() {
 	return 0;
 }
@@ -230,8 +239,17 @@ int r97_proc11() {
 	return 0;
 }
 
+void r97_proc12() {
+}
+
+void r97_proc13() {
+}
+
 int r97_proc14() {
 	return 0;
 }
 
+void r97_proc15() {
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index fafb8fe6f77..25a9e27b246 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -88,6 +88,9 @@ int r94_proc3();
 
 int r95_proc2();
 
+void r97_proc2();
+void r97_proc3();
+void r97_proc4();
 int r97_proc5();
 int r97_proc6();
 int r97_proc7();
@@ -95,7 +98,10 @@ int r97_proc8();
 int r97_proc9();
 int r97_proc10();
 int r97_proc11();
+void r97_proc12();
+void r97_proc13();
 int r97_proc14();
+void r97_proc15();
 
 } // namespace Chewy
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2554c6ffaac..337fd96516f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -29,6 +29,7 @@
 #include "chewy/episode2.h"
 #include "chewy/episode3.h"
 #include "chewy/episode4.h"
+#include "chewy/episode5.h"
 
 namespace Chewy {
 
@@ -300,8 +301,8 @@ void check_ged_action(int16 index) {
 	if (!flags.GedAction) {
 		flags.GedAction = true;
 		flag = false;
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 
+		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 		case 1:
 			switch (index) {
 			case 0:
@@ -324,6 +325,8 @@ void check_ged_action(int16 index) {
 				}
 				break;
 
+			default:
+				break;
 			}
 			break;
 
@@ -332,7 +335,6 @@ void check_ged_action(int16 index) {
 			case 0:
 				det->stop_detail(5);
 				if (!_G(spieler).R2KabelBork) {
-
 					det->start_detail(6, 2, ANI_VOR);
 				} else {
 					start_ani_block(2, ablock4);
@@ -340,6 +342,8 @@ void check_ged_action(int16 index) {
 				r2_jump_out_r1(9);
 				break;
 
+			default:
+				break;
 			}
 			break;
 
@@ -355,12 +359,14 @@ void check_ged_action(int16 index) {
 					set_person_pos(180, 124, P_CHEWY, P_LEFT);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					_G(spieler).R7ChewyFlug = false;
-
 				}
 				break;
 
+			default:
+				break;
 			}
 			break;
+
 		case 9:
 			switch (index) {
 			case 0:
@@ -377,6 +383,8 @@ void check_ged_action(int16 index) {
 				r11_chewy_bo_use();
 				break;
 
+			default:
+				break;
 			}
 			break;
 
@@ -389,6 +397,8 @@ void check_ged_action(int16 index) {
 				}
 				break;
 
+			default:
+				break;
 			}
 			break;
 
@@ -402,6 +412,8 @@ void check_ged_action(int16 index) {
 				r17_door_kommando(1);
 				break;
 
+			default:
+				break;
 			}
 			break;
 
@@ -416,10 +428,8 @@ void check_ged_action(int16 index) {
 			break;
 
 		case 28:
-			if (!index) {
-
+			if (!index)
 				r28_get_pump();
-			}
 			break;
 
 		case 37:
@@ -465,9 +475,48 @@ void check_ged_action(int16 index) {
 			if (!index)
 				r55_talk_line();
 			break;
+
+		case 94:
+			if (!index && !_G(spieler).flags35_10)
+				switch_room(93);
+			break;
+
+		case 97:
+			switch (index) {
+			case 50:
+				r97_proc2();
+				break;
+			case 51:
+				r97_proc3();
+				break;
+			case 52:
+				r97_proc13();
+				break;
+			case 53:
+				r97_proc12();
+				break;
+			case 54:
+				r97_proc4();
+				break;
+			case 55:
+				if (_G(spieler).flags36_20)
+					auto_scroll(268, 0);
+				break;
+			case 56:
+				r97_proc15();
+				break;
+			default:
+				break;
+			}
+			break;
+
+		default:
+			break;
 		}
+
 		flags.GedAction = false;
 	}
+
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 }
 


Commit: a74d1a1a176de005996a62074dfeb968c12bdd9e
    https://github.com/scummvm/scummvm/commit/a74d1a1a176de005996a62074dfeb968c12bdd9e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Added changes to ged_user_func

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 337fd96516f..24f30d02da0 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -524,7 +524,6 @@ int16 ged_user_func(int16 idx_nr) {
 	switch (idx_nr) {
 	case 40:
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-
 		case 8:
 			if (_G(spieler).R8GTuer)
 				idx_nr = 0;
@@ -566,12 +565,44 @@ int16 ged_user_func(int16 idx_nr) {
 			else
 				idx_nr = 4;
 			break;
+
+		case 71:
+			if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
+				idx_nr = 0;
+			else
+				idx_nr = 4;
+			break;
+
+		case 76:
+			return idx_nr;
+
+		case 84:
+			if (!_G(spieler).flags31_1)
+				_G(spieler).flags31_4 = true;
+			break;
+
+		case 86:
+			if (!_G(spieler).flags32_2)
+				idx_nr = 0;
+			break;
+
+		case 94:
+			if (!_G(spieler).flags35_10)
+				idx_nr = 0;
+			break;
+
+		case 97:
+			if (!_G(spieler).flags35_80)
+				idx_nr = 0;
+			break;
+
+		default:
+			break;
 		}
 		break;
 
 	case 41:
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-
 		case 17:
 			if (_G(spieler).R17Location != 2)
 				idx_nr = 0;
@@ -585,10 +616,8 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 37:
-			if (!_G(spieler).R37Kloppe) {
-
+			if (!_G(spieler).flags37_1)
 				idx_nr = 0;
-			}
 			break;
 
 		case 52:
@@ -597,9 +626,25 @@ int16 ged_user_func(int16 idx_nr) {
 			else
 				idx_nr = 4;
 			break;
+
+		case 97:
+			if (!_G(spieler).flags36_20)
+				idx_nr = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 42:
+		if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
+
 		}
 		break;
 
+	default:
+		break;
 	}
 
 	return idx_nr;


Commit: d800fbc4713cf00c4c484a043456313d595cc989
    https://github.com/scummvm/scummvm/commit/d800fbc4713cf00c4c484a043456313d595cc989
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Added changes to enter_room

Changed paths:
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/episode4.cpp
    engines/chewy/episode4.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 0a9cbdbffac..346a8bb475d 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -152,6 +152,11 @@ void r25_xit_gleiter() {
 	}
 }
 
+void r26_entry() {
+	// TODO
+}
+
+
 void r27_entry() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		_G(timer_nr)[0] = room->set_timer(0, 5);
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index 83fa502cd75..e740dca7e2c 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -36,6 +36,8 @@ int16 r25_use_gleiter();
 
 void r25_xit_gleiter();
 
+void r26_entry();
+
 void r27_entry();
 
 void r27_get_surimy();
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 40510b378f0..67b5b1c07b3 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -56,6 +56,26 @@ void r66_exit(int16 eib_nr) {
 	}
 }
 
+void r66_talk1() {
+}
+
+void r66_talk2() {
+}
+
+void r66_talk3() {
+}
+
+void r66_talk4() {
+}
+
+int r66_proc2() {
+	return 0;
+}
+
+int r66_proc7() {
+	return 0;
+}
+
 void r67_entry() {
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = r67_setup_func;
diff --git a/engines/chewy/episode4.h b/engines/chewy/episode4.h
index 0ffd0f5b4ce..747d72d4b7c 100644
--- a/engines/chewy/episode4.h
+++ b/engines/chewy/episode4.h
@@ -28,8 +28,13 @@ namespace Chewy {
 void switch_room(int16 nr);
 
 void r66_entry(int16 eib_nr);
-
 void r66_exit(int16 eib_nr);
+void r66_talk1();
+void r66_talk2();
+void r66_talk3();
+void r66_talk4();
+int r66_proc2();
+int r66_proc7();
 
 void r67_entry();
 
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index 81c39cf156b..8675ede0aa6 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -27,35 +27,27 @@
 
 namespace Chewy {
 
-void r66_talk1() {
+void r70_entry() {
 }
 
-void r66_talk2() {
+void r71_entry() {
 }
 
-void r66_talk3() {
-}
-
-void r66_talk4() {
-}
-
-int r66_proc2() {
+int r71_proc1() {
 	return 0;
 }
 
-int r66_proc7() {
+int r71_proc6() {
 	return 0;
 }
 
-int r71_proc1() {
-	return 0;
+void r71_proc7() {
 }
 
-int r71_proc6() {
-	return 0;
+void r72_entry() {
 }
 
-void r71_proc7() {
+void r73_entry() {
 }
 
 int r73_proc1() {
@@ -66,10 +58,19 @@ int r73_proc2() {
 	return 0;
 }
 
+void r74_entry() {
+}
+
 int r74_proc1() {
 	return 0;
 }
 
+void r75_entry() {
+}
+
+void r76_entry() {
+}
+
 void r76_talk1() {
 }
 
@@ -84,6 +85,9 @@ int r76_proc7() {
 	return 0;
 }
 
+void r77_entry() {
+}
+
 int r77_proc1() {
 	return 0;
 }
@@ -92,6 +96,18 @@ int r77_proc2() {
 	return 0;
 }
 
+void r78_entry() {
+}
+
+void r79_entry() {
+}
+
+void r80_entry() {
+}
+
+void r81_entry() {
+}
+
 void r81_proc1() {
 }
 
@@ -99,6 +115,9 @@ int r81_proc2() {
 	return 0;
 }
 
+void r82_entry() {
+}
+
 void r82_talk1() {
 }
 
@@ -123,6 +142,12 @@ int r82_proc9() {
 	return 0;
 }
 
+void r83_entry() {
+}
+
+void r84_entry() {
+}
+
 void r84_talk1() {
 }
 
@@ -133,10 +158,19 @@ int r84_proc4() {
 	return 0;
 }
 
+void r85_entry(int16 eib_nr) {
+}
+
+void r86_entry(int16 eib_nr) {
+}
+
 int r86_proc2() {
 	return 0;
 }
 
+void r87_entry() {
+}
+
 int r87_proc2() {
 	return 0;
 }
@@ -145,6 +179,9 @@ int r87_proc4() {
 	return 0;
 }
 
+void r88_entry() {
+}
+
 int r88_proc1() {
 	return 0;
 }
@@ -157,6 +194,9 @@ int r88_proc3() {
 	return 0;
 }
 
+void r89_entry() {
+}
+
 void r89_talk1() {
 }
 
@@ -176,6 +216,9 @@ int r89_proc5() {
 	return 0;
 }
 
+void r90_entry(int16 eib_nr) {
+}
+
 void r90_proc2() {
 }
 
@@ -191,6 +234,18 @@ int r90_proc6() {
 	return 0;
 }
 
+void r91_entry() {
+}
+
+void r92_entry() {
+}
+
+void r93_entry() {
+}
+
+void r94_entry() {
+}
+
 void r94_talk1() {
 }
 
@@ -198,10 +253,19 @@ int r94_proc3() {
 	return 0;
 }
 
+void r95_entry(int16 eib_nr) {
+}
+
 int r95_proc2() {
 	return 0;
 }
 
+void r96_entry() {
+}
+
+void r97_entry() {
+}
+
 void r97_proc2() {
 }
 
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 25a9e27b246..20f4904d8d0 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -25,33 +25,45 @@
 
 namespace Chewy {
 
-void r66_talk1();
-void r66_talk2();
-void r66_talk3();
-void r66_talk4();
-int r66_proc2();
-int r66_proc7();
+void r70_entry();
 
+void r71_entry();
 int r71_proc1();
 int r71_proc6();
 void r71_proc7();
 
+void r72_entry();
+
+void r73_entry();
 int r73_proc1();
 int r73_proc2();
 
+void r74_entry();
 int r74_proc1();
 
+void r75_entry();
+
+void r76_entry();
 void r76_talk1();
 void r76_talk2();
 int r76_proc6();
 int r76_proc7();
 
+void r77_entry();
 int r77_proc1();
 int r77_proc2();
 
+void r78_entry();
+
+void r79_entry();
+
+void r80_entry();
+
+void r81_entry();
 void r81_proc1();
 int r81_proc2();
 
+void r82_entry();
 void r82_talk1();
 void r82_talk2();
 void r82_talk3();
@@ -60,34 +72,57 @@ int r82_proc6();
 void r82_proc8();
 int r82_proc9();
 
+void r83_entry();
+
+void r84_entry();
 void r84_talk1();
 void r84_talk2();
 int r84_proc4();
+
+void r85_entry(int16 eib_nr);
+
+void r86_entry(int16 eib_nr);
 int r86_proc2();
 
+void r87_entry();
+void r87_entry();
 int r87_proc2();
 int r87_proc4();
 
+void r88_entry();
 int r88_proc1();
 int r88_proc2();
 int r88_proc3();
 
+void r89_entry();
 void r89_talk1();
 int r89_proc2();
 int r89_proc3();
 int r89_proc4();
 int r89_proc5();
 
+void r90_entry(int16 eib_nr);
 void r90_proc2();
 int r90_proc3();
 int r90_proc4();
 int r90_proc6();
 
+void r91_entry();
+
+void r92_entry();
+
+void r93_entry();
+
+void r94_entry();
 void r94_talk1();
 int r94_proc3();
 
+void r95_entry(int16 eib_nr);
 int r95_proc2();
 
+void r96_entry();
+
+void r97_entry();
 void r97_proc2();
 void r97_proc3();
 void r97_proc4();
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 24f30d02da0..33821d22e7a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -660,15 +660,16 @@ void enter_room(int16 eib_nr) {
 	atds->stop_aad();
 	atds->stop_ats();
 	_G(spieler).DiaAMov = -1;
-
 	_G(zoom_mov_fak) = 1;
-	flags.ZoomMov = true;
+
 	for (i = 0; i < MAX_PERSON; i++) {
-		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
+		spieler_mi[i].Vorschub = 8;
 		_G(spieler).ZoomXy[i][0] = 0;
 		_G(spieler).ZoomXy[i][1] = 0;
 	}
+
 	flags.ZoomMov = false;
+	_G(spieler).ScrollxStep = 1;
 	_G(spieler).ZoomXy[P_CHEWY][ 0] = (int16)room->room_info->ZoomFak;
 	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)room->room_info->ZoomFak;
 
@@ -677,51 +678,40 @@ void enter_room(int16 eib_nr) {
 	SetUpScreenFunc = false;
 	HowardMov = false;
 	_G(cur_hide_flag) = false;
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 
+	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	case 0:
 		Room0::entry();
 		break;
 
-	case 3:
-		r3_init_sonde();
-		break;
-
-	case 6:
-		r6_entry();
-		break;
-
-	case 8:
-		r8_entry();
-		break;
-
-	case 9:
-		r9_entry();
-		break;
-
-	case 10:
-		r10_entry();
+	case 2:
+		if (!_G(spieler).R2KabelBork)
+			det->start_detail(5, 255, 0);
 		break;
 
-	case 11:
-		r11_entry();
+	case 3:
+		r3_init_sonde();
 		break;
 
-	case 12:
-		r12_entry();
+	case 5:
+		if (_G(spieler).R5Terminal)
+			det->start_detail(6, 255, 0);
 		break;
 
-	case 13:
-		r13_entry();
-		break;
+	case 6: r6_entry(); break;
 
-	case 14:
-		r14_entry();
+	case 7:
+		_G(spieler).ScrollxStep = 2;
 		break;
 
-	case 16:
-		r16_entry();
-		break;
+	case 8: r8_entry(); break;
+	case 9: r9_entry(); break;
+	case 10: r10_entry(); break;
+	case 11: r11_entry(); break;
+	case 12: r12_entry(); break;
+	case 13: r13_entry(); break;
+	case 14: r14_entry(); break;
+	case 16: r16_entry();break;
 
 	case 17:
 		r17_entry();
@@ -731,21 +721,10 @@ void enter_room(int16 eib_nr) {
 		}
 		break;
 
-	case 18:
-		r18_entry();
-		break;
-
-	case 19:
-		r19_entry();
-		break;
-
-	case 21:
-		r21_entry();
-		break;
-
-	case 22:
-		r22_entry();
-		break;
+	case 18: r18_entry(); break;
+	case 19: r19_entry(); break;
+	case 21: r21_entry(); break;
+	case 22: r22_entry(); break;
 
 	case 23:
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -758,114 +737,39 @@ void enter_room(int16 eib_nr) {
 			det->play_sound(17, 0);
 		break;
 
-	case 25:
-		r25_entry();
-		break;
-
-	case 27:
-		r27_entry();
-		break;
-
-	case 28:
-		r28_entry(eib_nr);
-		break;
-
-	case 29:
-		r29_entry();
-		break;
-
-	case 31:
-		r31_entry();
-		break;
-
-	case 32:
-		r32_entry();
-		break;
-
-	case 33:
-		r33_entry();
-		break;
+	case 25: r25_entry(); break;
+	case 26: r26_entry(); break;
+	case 27: r27_entry(); break;
+	case 28: r28_entry(eib_nr); break;
+	case 29: r29_entry(); break;
+	case 31: r31_entry(); break;
+	case 32: r32_entry(); break;
+	case 33: r33_entry(); break;
 
 	case 34:
 		if (flags.LoadGame)
 			r34_use_kuehlschrank();
 		break;
 
-	case 35:
-		r35_entry();
-		break;
-
-	case 37:
-		r37_entry();
-		break;
-
-	case 39:
-		r39_entry();
-		break;
-
-	case 40:
-		r40_entry(eib_nr);
-		break;
-
-	case 41:
-		r41_entry();
-		break;
-
-	case 42:
-		r42_entry();
-		break;
-
-	case 45:
-		r45_entry(eib_nr);
-		break;
-
-	case 46:
-		r46_entry(eib_nr);
-		break;
-
-	case 47:
-		r47_entry();
-		break;
-
-	case 48:
-		r48_entry();
-		break;
-
-	case 49:
-		r49_entry(eib_nr);
-		break;
-
-	case 50:
-		r50_entry(eib_nr);
-		break;
-
-	case 51:
-		r51_entry();
-		break;
-
-	case 52:
-		r52_entry();
-		break;
-
-	case 53:
-		r53_entry();
-		break;
-
-	case 54:
-		r54_entry(eib_nr);
-		break;
-
-	case 55:
-		r55_entry();
-		break;
-
-	case 56:
-		r56_entry();
-		break;
-
-	case 57:
-		r57_entry();
-		break;
+	case 35: r35_entry(); break;
+	case 37: r37_entry(); break;
+	case 39: r39_entry(); break;
+	case 40: r40_entry(eib_nr); break;
+	case 41: r41_entry(); break;
+	case 42: r42_entry(); break;
+	case 45: r45_entry(eib_nr); break;
+	case 46: r46_entry(eib_nr); break;
+	case 47: r47_entry(); break;
+	case 48: r48_entry(); break;
+	case 49: r49_entry(eib_nr); break;
+	case 50: r50_entry(eib_nr); break;
+	case 51: r51_entry(); break;
+	case 52: r52_entry(); break;
+	case 53: r53_entry(); break;
+	case 54: r54_entry(eib_nr); break;
+	case 55: r55_entry(); break;
+	case 56: r56_entry(); break;
+	case 57: r57_entry(); break;
 
 	case 58:
 	case 59:
@@ -873,38 +777,46 @@ void enter_room(int16 eib_nr) {
 		r58_entry();
 		break;
 
-	case 62:
-		r62_entry();
-		break;
-
-	case 63:
-		r63_entry();
-		break;
-
-	case 64:
-		r64_entry();
-		break;
-
-	case 65:
-		r65_entry();
-		break;
-
-	case 66:
-		r66_entry(eib_nr);
-		break;
-
-	case 67:
-		r67_entry();
-		break;
-
-	case 68:
-		r68_entry();
-		break;
-
-	case 69:
-		r69_entry(eib_nr);
+	case 62: r62_entry(); break;
+	case 63: r63_entry(); break;
+	case 64: r64_entry(); break;
+	case 65: r65_entry(); break;
+	case 66: r66_entry(eib_nr); break;
+	case 67: r67_entry(); break;
+	case 68: r68_entry(); break;
+	case 69: r69_entry(eib_nr); break;
+	case 70: r70_entry(); break;
+	case 71: r71_entry(); break;
+	case 72: r72_entry(); break;
+	case 73: r73_entry(); break;
+	case 74: r74_entry(); break;
+	case 75: r75_entry(); break;
+	case 76: r76_entry(); break;
+	case 77: r77_entry(); break;
+	case 78: r78_entry(); break;
+	case 79: r79_entry(); break;
+	case 80: r80_entry(); break;
+	case 81: r81_entry(); break;
+	case 82: r82_entry(); break;
+	case 83: r83_entry(); break;
+	case 84: r84_entry(); break;
+	case 85: r85_entry(eib_nr); break;
+	case 86: r86_entry(eib_nr); break;
+	case 87: r87_entry(); break;
+	case 88: r88_entry(); break;
+	case 89: r89_entry(); break;
+	case 90: r90_entry(eib_nr); break;
+	case 91: r91_entry(); break;
+	case 92: r92_entry(); break;
+	case 93: r93_entry(); break;
+	case 94: r94_entry(); break;
+	case 95: r95_entry(eib_nr); break;
+	case 96: r96_entry(); break;
+	case 97: r97_entry(); break;
+	default:
 		break;
 	}
+
 	flags.LoadGame = false;
 }
 


Commit: 4d20cd66db95ab12e6c2c193a7dcd8072ed2ccba
    https://github.com/scummvm/scummvm/commit/4d20cd66db95ab12e6c2c193a7dcd8072ed2ccba
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Added changes to exit_room

Changed paths:
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index fb681a8f18d..923773e2709 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -2113,6 +2113,10 @@ void r13_entry() {
 	}
 }
 
+void r13_exit() {
+	warning("TODO: r13_exit");
+}
+
 #define R13_BORK_OBJ 0
 int16 r13_bork_phasen[4][2] = {
 	{ 92, 97 },
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 538b5bb9bfb..74cd92ec8f2 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -154,6 +154,8 @@ int16 r12_cut_serv(int16 frame);
 
 void r13_entry();
 
+void r13_exit();
+
 void r13_talk_bork();
 
 void r13_jmp_band();
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index 8675ede0aa6..bc1a133b35c 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -30,9 +30,15 @@ namespace Chewy {
 void r70_entry() {
 }
 
+void r70_exit(int16 eib_nr) {
+}
+
 void r71_entry() {
 }
 
+void r71_exit(int16 eib_nr) {
+}
+
 int r71_proc1() {
 	return 0;
 }
@@ -47,9 +53,15 @@ void r71_proc7() {
 void r72_entry() {
 }
 
+void r72_exit(int16 eib_nr) {
+}
+
 void r73_entry() {
 }
 
+void r73_exit(int16 eib_nr) {
+}
+
 int r73_proc1() {
 	return 0;
 }
@@ -61,6 +73,9 @@ int r73_proc2() {
 void r74_entry() {
 }
 
+void r74_exit(int16 eib_nr) {
+}
+
 int r74_proc1() {
 	return 0;
 }
@@ -68,9 +83,15 @@ int r74_proc1() {
 void r75_entry() {
 }
 
+void r75_exit(int16 eib_nr) {
+}
+
 void r76_entry() {
 }
 
+void r76_exit() {
+}
+
 void r76_talk1() {
 }
 
@@ -88,6 +109,9 @@ int r76_proc7() {
 void r77_entry() {
 }
 
+void r77_exit() {
+}
+
 int r77_proc1() {
 	return 0;
 }
@@ -99,15 +123,24 @@ int r77_proc2() {
 void r78_entry() {
 }
 
+void r78_exit() {
+}
+
 void r79_entry() {
 }
 
+void r79_exit() {
+}
+
 void r80_entry() {
 }
 
 void r81_entry() {
 }
 
+void r81_exit(int16 eib_nr) {
+}
+
 void r81_proc1() {
 }
 
@@ -118,6 +151,9 @@ int r81_proc2() {
 void r82_entry() {
 }
 
+void r82_exit(int16 eib_nr) {
+}
+
 void r82_talk1() {
 }
 
@@ -148,6 +184,9 @@ void r83_entry() {
 void r84_entry() {
 }
 
+void r84_exit(int16 eib_nr) {
+}
+
 void r84_talk1() {
 }
 
@@ -161,9 +200,15 @@ int r84_proc4() {
 void r85_entry(int16 eib_nr) {
 }
 
+void r85_exit(int16 eib_nr) {
+}
+
 void r86_entry(int16 eib_nr) {
 }
 
+void r86_exit(int16 eib_nr) {
+}
+
 int r86_proc2() {
 	return 0;
 }
@@ -171,6 +216,9 @@ int r86_proc2() {
 void r87_entry() {
 }
 
+void r87_exit(int16 eib_nr) {
+}
+
 int r87_proc2() {
 	return 0;
 }
@@ -182,6 +230,9 @@ int r87_proc4() {
 void r88_entry() {
 }
 
+void r88_exit() {
+}
+
 int r88_proc1() {
 	return 0;
 }
@@ -197,6 +248,9 @@ int r88_proc3() {
 void r89_entry() {
 }
 
+void r89_exit() {
+}
+
 void r89_talk1() {
 }
 
@@ -219,6 +273,9 @@ int r89_proc5() {
 void r90_entry(int16 eib_nr) {
 }
 
+void r90_exit(int16 eib_nr) {
+}
+
 void r90_proc2() {
 }
 
@@ -237,15 +294,24 @@ int r90_proc6() {
 void r91_entry() {
 }
 
+void r91_exit(int16 eib_nr) {
+}
+
 void r92_entry() {
 }
 
 void r93_entry() {
 }
 
+void r93_exit() {
+}
+
 void r94_entry() {
 }
 
+void r94_exit() {
+}
+
 void r94_talk1() {
 }
 
@@ -256,6 +322,9 @@ int r94_proc3() {
 void r95_entry(int16 eib_nr) {
 }
 
+void r95_exit(int16 eib_nr) {
+}
+
 int r95_proc2() {
 	return 0;
 }
@@ -263,9 +332,15 @@ int r95_proc2() {
 void r96_entry() {
 }
 
+void r96_exit(int16 eib_nr) {
+}
+
 void r97_entry() {
 }
 
+void r97_exit() {
+}
+
 void r97_proc2() {
 }
 
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 20f4904d8d0..0599d033856 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -26,44 +26,56 @@
 namespace Chewy {
 
 void r70_entry();
+void r70_exit(int16 eib_nr);
 
 void r71_entry();
+void r71_exit(int16 eib_nr);
 int r71_proc1();
 int r71_proc6();
 void r71_proc7();
 
 void r72_entry();
+void r72_exit(int16 eib_nr);
 
 void r73_entry();
+void r73_exit(int16 eib_nr);
 int r73_proc1();
 int r73_proc2();
 
 void r74_entry();
+void r74_exit(int16 eib_nr);
 int r74_proc1();
 
 void r75_entry();
+void r75_exit(int16 eib_nr);
 
 void r76_entry();
+void r76_exit();
 void r76_talk1();
 void r76_talk2();
 int r76_proc6();
 int r76_proc7();
 
 void r77_entry();
+void r77_exit();
 int r77_proc1();
 int r77_proc2();
 
 void r78_entry();
+void r78_exit();
 
 void r79_entry();
+void r79_exit();
 
 void r80_entry();
 
 void r81_entry();
+void r81_exit(int16 eib_nr);
 void r81_proc1();
 int r81_proc2();
 
 void r82_entry();
+void r82_exit(int16 eib_nr);
 void r82_talk1();
 void r82_talk2();
 void r82_talk3();
@@ -75,26 +87,32 @@ int r82_proc9();
 void r83_entry();
 
 void r84_entry();
+void r84_exit(int16 eib_nr);
 void r84_talk1();
 void r84_talk2();
 int r84_proc4();
 
 void r85_entry(int16 eib_nr);
+void r85_exit(int16 eib_nr);
 
 void r86_entry(int16 eib_nr);
+void r86_exit(int16 eib_nr);
 int r86_proc2();
 
 void r87_entry();
+void r87_exit(int16 eib_nr);
 void r87_entry();
 int r87_proc2();
 int r87_proc4();
 
 void r88_entry();
+void r88_exit();
 int r88_proc1();
 int r88_proc2();
 int r88_proc3();
 
 void r89_entry();
+void r89_exit();
 void r89_talk1();
 int r89_proc2();
 int r89_proc3();
@@ -102,27 +120,34 @@ int r89_proc4();
 int r89_proc5();
 
 void r90_entry(int16 eib_nr);
+void r90_exit(int16 eib_nr);
 void r90_proc2();
 int r90_proc3();
 int r90_proc4();
 int r90_proc6();
 
 void r91_entry();
+void r91_exit(int16 eib_nr);
 
 void r92_entry();
 
 void r93_entry();
+void r93_exit();
 
 void r94_entry();
+void r94_exit();
 void r94_talk1();
 int r94_proc3();
 
 void r95_entry(int16 eib_nr);
+void r95_exit(int16 eib_nr);
 int r95_proc2();
 
 void r96_entry();
+void r96_exit(int16 eib_nr);
 
 void r97_entry();
+void r97_exit();
 void r97_proc2();
 void r97_proc3();
 void r97_proc4();
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 33821d22e7a..12b3a1eb2f2 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -828,7 +828,6 @@ void exit_room(int16 eib_nr) {
 	det->disable_room_sound();
 
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-
 	case 6:
 		if (eib_nr == 8)
 			_G(spieler).R17Location = 2;
@@ -883,70 +882,42 @@ void exit_room(int16 eib_nr) {
 		_G(maus_links_click) = false;
 		break;
 
-	case 24:
-		r24_exit();
-		break;
-
-	case 27:
-		r27_exit(eib_nr);
-		break;
-
-	case 28:
-		r28_exit(eib_nr);
-		break;
-
-	case 29:
-		r29_exit();
-		break;
+	case 24: r24_exit(); break;
+	case 27: r27_exit(eib_nr); break;
+	case 28: r28_exit(eib_nr); break;
+	case 29: r29_exit(); break;
 
 	case 34:
 		flags.ChewyDontGo = false;
 		break;
 
-	case 41:
-		r41_exit();
-		break;
+	case 41: r41_exit(); break;
+	case 42: r42_calc_xit(); break;
 
-	case 45:
-		r45_exit(eib_nr);
-		break;
+	case 45: r45_exit(eib_nr); break;
+	case 46: r46_exit(); break;
+	case 47: r47_exit(); break;
 
-	case 46:
-		r46_exit();
-		break;
+	case 49: r49_exit(eib_nr); break;
 
-	case 47:
-		r47_exit();
-		break;
+	case 52: r52_exit(); break;
+	case 54: r54_exit(eib_nr); break;
 
-	case 49:
-		r49_exit(eib_nr);
-		break;
-
-	case 52:
-		r52_exit();
-		break;
-
-	case 54:
-		r54_exit(eib_nr);
-		break;
-
-	case 56:
-		r56_exit();
-		break;
-
-	case 57:
-		r57_exit(eib_nr);
-		break;
+	case 56: r56_exit(); break;
+	case 57: r57_exit(eib_nr); break;
 
 	case 64:
 		if (_G(spieler).R64Moni1Ani == 5)
 			_G(spieler).R64Moni1Ani = 3;
 		break;
 
-	case 65:
-		r65_exit();
-		break;
+	case 65: r65_exit(); break;
+
+	case 76: r76_exit(); break;
+	case 77: r77_exit(); break;
+	case 78: r78_exit(); break;
+	case 79: r79_exit(); break;
+	case 88: r88_exit(); break;
 
 	default:
 		no_exit = true;
@@ -955,8 +926,8 @@ void exit_room(int16 eib_nr) {
 
 	x = -1;
 	y = -1;
-	switch (eib_nr) {
 
+	switch (eib_nr) {
 	case 0:
 	case 3:
 	case 18:
@@ -967,6 +938,15 @@ void exit_room(int16 eib_nr) {
 	case 70:
 	case 83:
 	case 93:
+	case 103:
+	case 105:
+	case 109:
+	case 111:
+	case 114:
+	case 115:
+	case 118:
+	case 120:
+	case 139:
 		x = -44;
 		y = spieler_vector[P_CHEWY].Xypos[1];
 		break;
@@ -979,19 +959,30 @@ void exit_room(int16 eib_nr) {
 	case 39:
 	case 49:
 	case 52:
+	case 104:
+	case 106:
+	case 108:
+	case 112:
+	case 117:
+	case 119:
+	case 123:
+	case 125:
+	case 135:
 		xy = (int16 *)ablage[room_blk.AkAblage];
 		x = xy[0] + 30;
 		y = spieler_vector[P_CHEWY].Xypos[1];
 		break;
 
 	case 10:
-	case 41:
 	case 15:
+	case 41:
 	case 58:
 	case 73:
 	case 77:
 	case 78:
 	case 92:
+	case 122:
+	case 131:
 		xy = (int16 *)ablage[room_blk.AkAblage];
 		x = spieler_vector[P_CHEWY].Xypos[0];
 		y = xy[1] + 3;
@@ -1010,7 +1001,7 @@ void exit_room(int16 eib_nr) {
 	case 40:
 	case 50:
 	case 65:
-	case 74:
+	case 126:
 		set_person_pos(spieler_vector[P_CHEWY].Xypos[0],
 		               spieler_vector[P_CHEWY].Xypos[1], P_CHEWY, P_RIGHT);
 		set_up_screen(DO_SETUP);
@@ -1037,17 +1028,17 @@ void exit_room(int16 eib_nr) {
 		y = 80;
 		break;
 
+	case 72:
+		x = spieler_vector[P_CHEWY].Xypos[0];
+		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
+		break;
+
 	case 75:
 		x = 160;
 		y = 200;
 		det->show_static_spr(4);
 		break;
 
-	case 72:
-		x = spieler_vector[P_CHEWY].Xypos[0];
-		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
-		break;
-
 	case 84:
 		x = spieler_vector[P_CHEWY].Xypos[0] - 70;
 		y = spieler_vector[P_CHEWY].Xypos[1] - 50;
@@ -1079,7 +1070,31 @@ void exit_room(int16 eib_nr) {
 		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
 		break;
 
+	case 127:
+		x = 196;
+		y = 133;
+		det->show_static_spr(0);
+		break;
+
+	case 132:
+		x = 505;
+		y = 62;
+		break;
+
+	case 140:
+		x = spieler_vector[P_CHEWY].Xypos[0] + 40;
+		y = spieler_vector[P_CHEWY].Xypos[1];
+		break;
+
+	case 141:
+		x = spieler_vector[P_CHEWY].Xypos[0] - 12;
+		y = spieler_vector[P_CHEWY].Xypos[1];
+		break;
+
+	default:
+		break;
 	}
+
 	if (x != -1 && y != -1) {
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(x, y, P_CHEWY, ANI_WAIT);
@@ -1088,7 +1103,6 @@ void exit_room(int16 eib_nr) {
 
 	if (no_exit) {
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-
 		case 40:
 			r40_exit(eib_nr);
 			break;
@@ -1098,33 +1112,34 @@ void exit_room(int16 eib_nr) {
 				_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 			break;
 
-		case 50:
-			r50_exit(eib_nr);
-			break;
-
-		case 51:
-			r51_exit(eib_nr);
-			break;
-
-		case 55:
-			r55_exit(eib_nr);
-			break;
-
-		case 66:
-			r66_exit(eib_nr);
-			break;
-
-		case 67:
-			r67_exit();
-			break;
-
-		case 68:
-			r68_exit();
-			break;
-
-		case 69:
-			r69_exit(eib_nr);
-			break;
+		case 50: r50_exit(eib_nr); break;
+		case 51: r51_exit(eib_nr); break;
+		case 55: r55_exit(eib_nr); break;
+		case 66: r66_exit(eib_nr); break;
+		case 67: r67_exit(); break;
+		case 68: r68_exit(); break;
+		case 69: r69_exit(eib_nr); break;
+		case 70: r70_exit(eib_nr); break;
+		case 71: r71_exit(eib_nr); break;
+		case 72: r72_exit(eib_nr); break;
+		case 73: r73_exit(eib_nr); break;
+		case 74: r74_exit(eib_nr); break;
+		case 75: r75_exit(eib_nr); break;
+		case 81: r81_exit(eib_nr); break;
+		case 82: r82_exit(eib_nr); break;
+		case 84: r84_exit(eib_nr); break;
+		case 85: r85_exit(eib_nr); break;
+		case 86: r86_exit(eib_nr); break;
+		case 87: r87_exit(eib_nr); break;
+		case 89: r89_exit(); break;
+		case 90: r90_exit(eib_nr); break;
+		case 91: r91_exit(eib_nr); break;
+		case 93: r93_exit(); break;
+		case 94: r94_exit(); break;
+		case 95: r95_exit(eib_nr); break;
+		case 96: r96_exit(eib_nr); break;
+		case 97: r97_exit(); break;
+		default: break;
 		}
 	}
 }


Commit: b3786f34644b6eae8ddb3cc24169d409a33f819e
    https://github.com/scummvm/scummvm/commit/b3786f34644b6eae8ddb3cc24169d409a33f819e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Added changes to sib_event_inv method

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 12b3a1eb2f2..efe0bba7cc6 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1633,144 +1633,143 @@ int16 sib_event_no_inv(int16 sib_nr) {
 }
 
 void sib_event_inv(int16 sib_nr) {
-	switch (sib_nr) {
+	int16 ret;
 
+	switch (sib_nr) {
 	case SIB_TERMINAL_R5:
-		if (!_G(spieler).R5Terminal) {
-			_G(spieler).R5Terminal = 1;
-			cur_2_inventory();
-			del_inventar(RED_CARD_INV);
-
-			start_aad(103, -1);
-			det->start_detail(6, 255, ANI_VOR);
-			atds->set_ats_str(27, TXT_MARK_LOOK, 1, ATS_DATEI);
-			atds->set_ats_str(30, TXT_MARK_LOOK, 1, ATS_DATEI);
-		}
+		r28_use_surimy();
 		break;
 
 	case SIB_TKNOPF1_R6:
-		_G(spieler).R6DoorLeftF = exit_flip_flop(4, 8, -1, 33, -1, -1,
-		                                     AUSGANG_LINKS, -1,
-		                                     (int16)_G(spieler).R6DoorLeftF);
+		r29_schlitz_sitz();
 		break;
 
 	case SIB_TKNOPF2_R6:
-		_G(spieler).R6DoorLeftB = exit_flip_flop(5, 9, 12, 35, 49, SIB_TKNOPF1_R7,
-		                                     AUSGANG_LINKS, AUSGANG_OBEN,
-		                                     (int16)_G(spieler).R6DoorLeftB);
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		start_spz_wait(13, 1, 0, 0);
+		_G(spieler).R18CartFach = true;
+		del_inventar(_G(spieler).AkInvent);
+		det->show_static_spr(7);
+		atds->set_ats_str(157, 1, 1);
+
+		if (_G(spieler).R18CartTerminal) {
+			start_aad_wait(121, -1);
+		} else {
+			_G(spieler).R18CartTerminal = true;
+			atds->set_ats_str(26, 1, 6);
+			start_aad_wait(120, -1);
+		}
+
+		show_cur();
 		break;
 
 	case SIB_TKNOPF3_R6:
-		_G(spieler).R6DoorRightB = exit_flip_flop(6, 11, 20, 37, 99, SIB_TKNOPF3_R11,
-		                                      AUSGANG_RECHTS, AUSGANG_LINKS,
-		                                      (int16)_G(spieler).R6DoorRightB);
+		ret = exit_flip_flop(-1, 46, 27, 132, 90, -1, 2, 2,
+			_G(spieler).R6BolaSchild ? 1 : 0);
+		_G(spieler).R21GitterMuell = ret & 1;
+		atds->set_ats_str(90, 2, 2);
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
+		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(spieler).R6BolaSchild = true;
-		det->show_static_spr(2);
-		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-		obj->hide_sib(SIB_BOLA_KNOPF_R6);
-		obj->show_sib(SIB_BOLA_R6);
+		atds->set_ats_str(118, 1, 1);
+		start_spz(5, 255, 0, 0);
+		start_aad_wait(115, 0);
+		if (_G(spieler).R12TransOn)
+			r12_use_linke_rohr();
 		break;
 
-	case SIB_RHAKEN_R7:
 	case SIB_LHAKEN_R7:
-		r7_haken(sib_nr);
+		r14_feuer();
+		break;
+
+	case SIB_RHAKEN_R7:
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(113, 0, 1);
 		break;
 
 	case SIB_GTUER:
-		r8_open_gdoor();
+		_G(spieler).R23FluxoFlex = true;
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(112, 1, 1);
 		break;
 
 	case SIB_SURIMY_R10:
-		r10_get_surimy();
+		r23_use_cartridge();
+		break;
+
+	case SIB_PAINT_R22:
+		ret = exit_flip_flop(6, 20, 11, 99, 37, 15, 1, 2,
+			(int16)_G(spieler).R6DoorRightB);
+		_G(spieler).R6DoorRightB = ret & 1;
 		break;
 
 	case SIB_SCHLITZ_R11:
-		r11_put_card();
+		ret = exit_flip_flop(5, 22, -1, 98, -1, -1,
+			AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
+		_G(spieler).R11DoorRightB = ret & 1;
 		break;
 
 	case SIB_TKNOPF1_R11:
-		_G(spieler).R11DoorRightF = exit_flip_flop(1, 23, -1, 87, -1, -1,
-		                                       AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightF);
+		ret = exit_flip_flop(1, 23, -1, 87, -1, -1,
+			AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightF);
+		_G(spieler).R11DoorRightB = false;
+		_G(spieler).R11TerminalOk |= ret & 1;
 		break;
 
 	case SIB_TKNOPF2_R11:
-		_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
-		                                       AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
+		r11_put_card();
 		break;
 
 	case SIB_TKNOPF3_R11:
-		_G(spieler).R6DoorRightB = exit_flip_flop(6, 20, 11, 99, 37, SIB_TKNOPF3_R6,
-		                                      AUSGANG_LINKS, AUSGANG_RECHTS,
-		                                      (int16)_G(spieler).R6DoorRightB);
-		break;
-
-	case SIB_ROEHRE_R12:
-		_G(spieler).R12TalismanOk = true;
-		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
-		start_aad(115, 0);
-		break;
-
-	case SIB_FEUER_R14:
-		r14_feuer();
-		break;
-
-	case SIB_CART_FACH_R18:
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R18CartFach = 1;
-		del_inventar(_G(spieler).AkInvent);
-		if (_G(spieler).R18CartTerminal == true) {
-			_G(spieler).R18CartSave = true;
-			start_aad_wait(120, -1);
-		} else
-			start_aad_wait(121, -1);
-		break;
-
-	case SIB_PAINT_R22:
 		disable_timer();
 		r22_malen();
 		enable_timer();
 		break;
 
-	case SIB_GITTER2_R21:
-		_G(spieler).R21GitterMuell = exit_flip_flop(-1, 46, 27, 132, 90, -1,
-		                                        AUSGANG_RECHTS, AUSGANG_RECHTS,
-		                                        (int16)_G(spieler).R21GitterMuell);
-		atds->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATEI);
-		break;
-
 	case SIB_CARTRIDGE_R23:
-		r23_use_cartridge();
-		if (_G(spieler).R18CartSave == true)
-			atds->set_ats_str(111, 2, ATS_DATEI);
-		else
-			atds->set_ats_str(111, 1, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		r10_get_surimy();
 		break;
 
 	case SIB_FLUXO_R23:
-		_G(spieler).R23FluxoFlex = true;
-		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(112, 1, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		r8_open_gdoor();
 		break;
 
-	case SIB_TRANSLATOR_23:
+	case SIB_FEUER_R14:
+	case SIB_TALISMAN_R12:
+		r7_haken(sib_nr);
+		break;
+
+	case SIB_ROEHRE_R12:
 		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(113, 0, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		_G(spieler).R6BolaSchild = true;
+		det->show_static_spr(2);
+		obj->calc_rsi_flip_flop(18);
+		obj->hide_sib(18);
+		obj->show_sib(21);
 		break;
 
-	case SIB_AUTO_R28:
-		r28_use_surimy();
+	case SIB_SEIL_R21:
+		ret = exit_flip_flop(6, 11, 20, 37, 99, 42, 2, 1,
+			(int16)_G(spieler).R6DoorRightB);
+		_G(spieler).R6DoorRightB = ret & 1;
+		break;
+
+	case SIB_CART_FACH_R18:
+		ret = exit_flip_flop(5, 9, 12, 35, 49, 22, 1, 3,
+			(int16)_G(spieler).R6DoorLeftB);
+		_G(spieler).R6DoorLeftB = ret & 1;
 		break;
 
 	case SIB_AUTO_SITZ:
-		r29_schlitz_sitz();
+		ret = exit_flip_flop(4, 8, -1, 33, -1, -1, 1, -1,
+			(int16)_G(spieler).R6DoorLeftF);
+		_G(spieler).R6DoorLeftF = ret & 1;
+		break;
+
+	default:
 		break;
 	}
 }


Commit: 3eddc2c2f3850fbd8dd4894d7035dfbf98dd4c94
    https://github.com/scummvm/scummvm/commit/3eddc2c2f3850fbd8dd4894d7035dfbf98dd4c94
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Added changes to sib_event_no_inv method

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index efe0bba7cc6..a54dd9cf192 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1346,7 +1346,11 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
 int16 sib_event_no_inv(int16 sib_nr) {
 	int16 ret;
 	ret = true;
+
 	switch (sib_nr) {
+	case SIB_KABEL_R1:
+		atds->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATEI);
+		break;
 
 	case SIB_MONOKEL:
 		_G(spieler).R0Monokel = true;
@@ -1362,10 +1366,6 @@ int16 sib_event_no_inv(int16 sib_nr) {
 			atds->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
-	case SIB_KABEL_R1:
-		atds->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATEI);
-		break;
-
 	case SIB_TERMINAL_R5:
 		if (_G(spieler).R5Terminal) {
 			_G(spieler).R5Terminal = 0;
@@ -1379,10 +1379,6 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		r5_knopf();
 		break;
 
-	case SIB_BOLA_KNOPF_R6:
-		r6_bola_knopf();
-		break;
-
 	case SIB_SEIL:
 		obj->hide_sib(SIB_SEIL);
 		break;
@@ -1391,21 +1387,29 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		atds->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATEI);
 		break;
 
+	case SIB_BOLA_KNOPF_R6:
+		r6_bola_knopf();
+		break;
+
 	case SIB_TKNOPF1_R7:
 		_G(spieler).R6DoorLeftB = exit_flip_flop(3, 12, 9, 49, 35, SIB_TKNOPF2_R6,
 		                                     AUSGANG_OBEN, AUSGANG_LINKS,
 		                                     (int16)_G(spieler).R6DoorLeftB);
 		break;
 
-	case SIB_TKNOPF2_R7:
-		_G(spieler).R7DoorRight = exit_flip_flop(4, 13, 14, 53, 68, SIB_TUER_R8,
-		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
-		                                     (int16)_G(spieler).R7DoorRight);
-		break;
-
 	case SIB_HEBEL_R7:
 		_G(spieler).R7Hebel ^= 1;
-		atds->set_ats_str(50, _G(spieler).R7Hebel, ATS_DATEI);
+
+		if (!_G(spieler).R7Hebel)
+			atds->set_ats_str(50, 0, ATS_DATEI);
+		else if (!_G(spieler).R7BorkFlag)
+			atds->set_ats_str(50, 1, ATS_DATEI);
+		else
+			atds->set_ats_str(50, 2, ATS_DATEI);
+		break;
+
+	case SIB_KLINGEL_R7:
+		r7_klingel();
 		break;
 
 	case SIB_GIPS_R7:
@@ -1414,8 +1418,10 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		obj->hide_sib(SIB_GIPS_R7);
 		break;
 
-	case SIB_KLINGEL_R7:
-		r7_klingel();
+	case SIB_TKNOPF2_R7:
+		_G(spieler).R7DoorRight = exit_flip_flop(4, 13, 14, 53, 68, SIB_TUER_R8,
+		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
+		                                     (int16)_G(spieler).R7DoorRight);
 		break;
 
 	case SIB_SCHLOTT_R7:
@@ -1442,7 +1448,6 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_FOLTER_R8:
 		r8_stop_folter();
-
 		break;
 
 	case SIB_TUER_R8:
@@ -1459,54 +1464,46 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		r11_get_card();
 		break;
 
-	case SIB_TALISMAN_R12:
-		_G(spieler).R12Talisman = true;
-		obj->hide_sib(SIB_TALISMAN_R12);
-		_G(timer_nr)[0] = room->set_timer(255, 20);
-		break;
-
 	case SIB_BANDKNOPF_R13:
 		_G(spieler).R13Bandlauf ^= 1;
 
-		atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		if (_G(spieler).R13Bandlauf) {
+			for (int i = 0; i < 5; ++i)
+				det->start_detail(i, 255, 0);
+		} else {
+			for (int i = 0; i < 5; ++i)
+				det->stop_detail(i);
+		}
 
+		atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
 		atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		break;
 
-	case SIB_GITTER_R16:
-		atds->set_ats_str(125, 1, ATS_DATEI);
-		_G(spieler).room_e_obj[33].Attribut = AUSGANG_OBEN;
+	case SIB_CARTRIDGE_R23:
+		r23_get_cartridge();
 		break;
 
-	case SIB_CART1_R18:
-		atds->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATEI);
+	case SIB_FLUXO_R23:
+		_G(spieler).R23FluxoFlex = false;
+		atds->set_ats_str(112, 0, ATS_DATEI);
+		menu_item_vorwahl = CUR_USE;
 		break;
 
-	case SIB_CART_FACH_R18:
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R18CartFach = 0;
-		cur_2_inventory();
+	case SIB_TRANSLATOR_23:
+		atds->set_ats_str(113, 1, ATS_DATEI);
+		menu_item_vorwahl = CUR_USE;
 		break;
 
-	case SIB_TUERKNOPF_R18:
-		if (_G(spieler).R18DoorBruecke) {
-			det->disable_sound(19, 0);
-			det->enable_sound(19, 1);
-		} else {
-			det->enable_sound(19, 0);
-			det->disable_sound(19, 1);
-		}
+	case SIB_TALISMAN_R12:
+		_G(spieler).R12Talisman = true;
+		obj->hide_sib(SIB_TALISMAN_R12);
+		_G(timer_nr)[0] = room->set_timer(255, 20);
+		break;
 
-		if (!_G(spieler).R6DoorLeftF) {
-			_G(spieler).R6DoorLeftF = exit_flip_flop(-1, 8, -1, 33, -1, SIB_TKNOPF1_R6,
-			                                     AUSGANG_LINKS, -1,
-			                                     (int16)_G(spieler).R6DoorLeftF);
-		}
-		_G(spieler).R18DoorBruecke = exit_flip_flop(19, 40, 35, 148, -1, -1,
-		                                        AUSGANG_OBEN, AUSGANG_LINKS,
-		                                        (int16)_G(spieler).R18DoorBruecke);
+	case SIB_GITTER_R16:
+		atds->set_ats_str(125, 1, ATS_DATEI);
+		_G(spieler).room_e_obj[33].Attribut = AUSGANG_OBEN;
 		break;
 
 	case SIB_SCHALTER1_R21:
@@ -1538,29 +1535,34 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		r21_use_gitter_energie();
 		break;
 
-	case SIB_CARTRIDGE_R23:
-		r23_get_cartridge();
-		break;
-
-	case SIB_FLUXO_R23:
-		_G(spieler).R23FluxoFlex = false;
-		atds->set_ats_str(112, 0, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+	case SIB_CART1_R18:
+		atds->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
-	case SIB_TRANSLATOR_23:
-		atds->set_ats_str(113, 1, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
-		break;
+	case SIB_TUERKNOPF_R18:
+		if (_G(spieler).R18DoorBruecke) {
+			det->disable_sound(19, 0);
+			det->enable_sound(19, 1);
+		} else {
+			det->enable_sound(19, 0);
+			det->disable_sound(19, 1);
+		}
 
-	case SIB_SURIMY_R27:
-		r27_get_surimy();
+		if (!_G(spieler).R6DoorLeftF) {
+			_G(spieler).R6DoorLeftF = exit_flip_flop(-1, 8, -1, 33, -1, SIB_TKNOPF1_R6,
+				AUSGANG_LINKS, -1,
+				(int16)_G(spieler).R6DoorLeftF);
+		}
+		_G(spieler).R18DoorBruecke = exit_flip_flop(19, 40, 35, 148, -1, -1,
+			AUSGANG_OBEN, AUSGANG_LINKS,
+			(int16)_G(spieler).R18DoorBruecke);
 		break;
 
-	case SIB_TOPF_R31:
-		obj->hide_sib(SIB_TOPF_R31);
-		atds->set_ats_str(242, 1, ATS_DATEI);
-		_G(spieler).R31PflanzeWeg = true;
+	case SIB_CART_FACH_R18:
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		_G(spieler).R18CartFach = 0;
+		cur_2_inventory();
+		atds->set_ats_str(157, 1, AAD_DATEI);
 		break;
 
 	case SIB_SCHLAUCH_R26:
@@ -1570,6 +1572,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_KAFFEE_R33:
 	case SIB_ZAPPER_R39:
 	case SIB_KNOCHEN_R35:
+	case SIB_RADIO_R35:
 	case SIB_KUERBIS_R37:
 	case SIB_ZEITUNG_R27:
 	case SIB_FLASCHE_R51:
@@ -1585,9 +1588,20 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		atds->set_ats_str(226, 1, ATS_DATEI);
 		break;
 
-	case SIB_RADIO_R35:
-		obj->hide_sib(sib_nr);
-		invent_2_slot(CASSETTE_INV);
+	case SIB_TOPF_R31:
+		obj->hide_sib(SIB_TOPF_R31);
+		atds->set_ats_str(242, 1, ATS_DATEI);
+		_G(spieler).R31PflanzeWeg = true;
+		break;
+
+	case SIB_HFUTTER1_R37:
+	case SIB_HFUTTER2_R37:
+		obj->hide_sib(74);
+		obj->hide_sib(75);
+		break;
+
+	case SIB_SURIMY_R27:
+		r27_get_surimy();
 		break;
 
 	case SIB_MUENZE_R40:
@@ -1599,6 +1613,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		start_aad_wait(201, -1);
 		break;
 
+	case SIB_VISIT_R53:
+		obj->hide_sib(sib_nr);
+		_G(spieler).R53Visit = true;
+		break;
+
 	case SIB_CIGAR_R50:
 		r50_stop_cigar();
 		break;
@@ -1609,11 +1628,6 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		check_shad(2 * (_G(spieler).R52LichtAn + 1), 1);
 		break;
 
-	case SIB_VISIT_R53:
-		obj->hide_sib(sib_nr);
-		_G(spieler).R53Visit = true;
-		break;
-
 	case SIB_KAUTABAK_R56:
 		obj->hide_sib(sib_nr);
 		_G(spieler).R56GetTabak = true;
@@ -1624,11 +1638,26 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		obj->hide_sib(sib_nr);
 		r64_talk_man(351);
 		break;
+
+	case 94:
+		det->show_static_spr(7);
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		start_aad_wait(406, -1);
+		if (_G(spieler).PersonRoomNr[1] == 66)
+			start_aad_wait(613, -1);
+		break;
+
+	case 100:
+		_G(spieler).Flags33_1 = true;
+		break;
+
 	default:
 		ret = false;
 		break;
 
 	}
+
 	return ret;
 }
 


Commit: 3702a38c3971e21e441635b3b84067b8b8c45114
    https://github.com/scummvm/scummvm/commit/3702a38c3971e21e441635b3b84067b8b8c45114
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:15-08:00

Commit Message:
CHEWY: Implementing flic_cut method

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/global.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 959e3667871..b1b780de134 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -904,4 +904,9 @@ void ailclass::switch_sound(bool onOff) {
 		SoundSwitch = onOff;
 }
 
+void serve_speech() {
+	if (flags.InitSound && _G(spieler).SpeechSwitch)
+		ailsnd->serve_db_samples();
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 0f32ab403ad..54b46c38f55 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -120,6 +120,8 @@ public:
 private:
 };
 
+extern void serve_speech();
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index f0d20962f0c..398f4c5471e 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -154,4 +154,8 @@ void EventsManager::setMousePos(const Common::Point &pt) {
 	_mousePos = pt;
 }
 
+void delay(size_t time) {
+	g_events->delay(time);
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 9e9347ebef1..9f352ecedfc 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -64,6 +64,8 @@ public:
 
 extern EventsManager *g_events;
 
+extern void delay(size_t time);
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 2ec520d5a84..0a9f5f312ed 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -394,8 +394,8 @@ void flic::delta_chunk_byte(byte *tmp) {
 	}
 }
 
-void flic::custom_play(CustomInfo *ci) {
-	uint16 i;
+int flic::custom_play(CustomInfo *ci) {
+	uint16 i, ret = 0;
 	char key;
 	uint32 start, ende;
 	bool trace_mode;
@@ -422,7 +422,7 @@ void flic::custom_play(CustomInfo *ci) {
 				fade_delay = 0;
 				CurrentFrame = 0;
 
-				for (i = 0; (i < custom_header.frames) && (!modul) && (key != 27); i++) {
+				for (i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0) && (key != 27); i++) {
 					if (!custom_frame.load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
@@ -433,8 +433,10 @@ void flic::custom_play(CustomInfo *ci) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									modul = DATEI;
 									fcode = READFEHLER;
-								} else
+								} else {
 									decode_cframe();
+									ret = modul ? -1 : 0;
+								}
 							}
 
 							// Show the next frame
@@ -466,6 +468,8 @@ void flic::custom_play(CustomInfo *ci) {
 		modul = DATEI;
 		fcode = OPENFEHLER;
 	}
+
+	return ret;
 }
 
 void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 48d862beda0..5b4217507bc 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -88,7 +88,7 @@ public:
 	void play(Common::Stream *handle, byte *vscreen, byte *load_p);
 	void set_flic_user_function(int16(*user_funktion)(int16 key));
 	void remove_flic_user_function();
-	void custom_play(CustomInfo *ci);
+	int custom_play(CustomInfo *ci);
 	void set_custom_user_function(int16(*user_funktion)(int16 key));
 	void remove_custom_user_function();
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index b1ed70f712d..b61045942f0 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -420,6 +420,8 @@ void exit_room(int16 eib_nr);
 
 void flic_cut(int16 nr, int16 mode);
 
+void print_rows(int16 id);
+
 int16 sib_event_no_inv(int16 sib_nr);
 
 void sib_event_inv(int16 sib_nr);
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index a54dd9cf192..6ccadc4057c 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -38,6 +38,8 @@ namespace Chewy {
 #define ANI_5 5
 #define GITTER_BLITZEN 7
 
+static int16 flic_val1, flic_val2;
+
 void play_scene_ani(int16 nr, int16 mode) {
 #define ROOM_1_1 101
 #define ROOM_1_2 102
@@ -1144,23 +1146,155 @@ void exit_room(int16 eib_nr) {
 	}
 }
 
+void print_rows(int16 id) {
+	int16 txt_anz, len;
+	char *txtStr, *s;
+
+	out->set_fontadr(font8x8);
+	out->set_vorschub(fvorx8x8, fvory8x8);
+	txtStr = atds->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
+	out->setze_zeiger(nullptr);
+
+	for (int i = 0; i < txt_anz; ++i) {
+		s = txt->str_pos(txtStr, i);
+		len = (strlen(s) * fvorx8x8) / 2;
+
+		out->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
+	}
+}
+
+int16 flic_user_function(int16 keys) {
+	int ret;
+
+	serve_speech();
+	if (atds->aad_get_status() != -1) {
+		switch (flic_val1) {
+		case 579:
+		case 584:
+		case 588:
+		case 591:
+			out->raster_col(254, 63, 12, 46);
+			break;
+		default:
+			break;
+		}
+	}
+
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	if (flic_val1 == 593 && keys == 35)
+		atds->stop_aad();
+	if (flic_val1 == 594 && keys == 18)
+		atds->stop_aad();
+
+	ret = in->get_switch_code() == 1 ? -1 : 0;
+	if (flic_val2 == 140 && keys == 15)
+		ret = -2;
+	if (flic_val2 == 144 && keys == 7)
+		ret = -2;
+	if (flic_val2 == 145 || flic_val2 == 142 ||
+			flic_val2 == 141 || flic_val2 == 146) {
+		if (atds->aad_get_status() == -1)
+			ret = -2;
+	}
+
+	return ret;
+}
+
+static void flic_proc1() {
+	const int16 VALS1[] = {
+		135,  145,  142,  140,  145,  144,  142,  134,  148,  138,
+		143,  142,  146,  154,  142,  139,  146,  156,  157,  147,
+		153,  152,  141,  137,  136,  151,  151,  149,  150
+	};
+	const byte VALS2[] = {
+		1,  1,  0,  0,  0,  0,  0,  1,  1,  1,
+		1,  0,  0,  1,  1,  1,  1,  1,  0,  1,
+		1,  1,  1,  1,  0,  1,  0,  1,  0
+	};
+	const int16 VALS3[] = {
+		579, 580, 581,  -1, 582, -1, 583, 584, -1, -1,
+		585, 586, 587, 588, 589, -1, 590, 591, -1, -1,
+		 -1,  -1, 592, 593, 594, -1,  -1,  -1, -1
+	};
+	const byte VALS4[] = {
+		0,  1,  1,  0,  1,  0,  1,  0,  0,  0,
+		1,  1,  1,  0,  1,  0,  1,  0,  0,  0,
+		0,  0,  1,  0,  0,  0,  0,  0,  0
+	};
+	int16 ret = 0;
+
+	atds->load_atds(98, AAD_DATEI);
+	flc->set_custom_user_function(flic_user_function);
+	load_room_music(258);
+
+	for (int i = 0; i < 29 && ret != -1; ++i) {
+		if (VALS1[i] == 148)
+			load_room_music(259);
+		else if (VALS1[i] == 143)
+			load_room_music(260);
+		if (VALS2[i]) {
+			out->setze_zeiger(nullptr);
+			out->cls();
+		}
+
+		flic_val1 = 0;
+		if (VALS3[i] != -1) {
+			start_aad(VALS3[i], -1);
+			flic_val1 = VALS3[i];
+		}
+
+		bool flag;
+		do {
+			flic_val2 = VALS1[i];
+			mem->file->select_pool_item(Ci.Handle, flic_val2);
+			ret = flc->custom_play(&Ci);
+
+			flag = VALS4[i] && atds->aad_get_status() != -1;
+		} while (flag && ret != -1 && ret != -2);
+
+		atds->stop_aad();
+	}
+
+	flc->remove_custom_user_function();
+	if (ret == -1) {
+		out->setze_zeiger(nullptr);
+		out->cls();
+		out->raster_col(254, 62, 35, 7);
+		start_aad(595);
+		atds->print_aad(254, 0);
+
+		if (flags.InitSound && _G(spieler).SpeechSwitch) {
+			while (ailsnd->isSpeechActive() && !SHOULD_QUIT) {
+				ailsnd->serve_db_samples();
+			}
+		} else {
+			delay(6000);
+		}
+	}
+
+	out->setze_zeiger(workptr);
+	out->cls();
+}
+
 void flic_cut(int16 nr, int16 mode) {
-	int16 i;
+	const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
+	const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
+	const int16 FLIC_CUT_133[] = {
+		133, 123, 125, 126, 124, 128, 129, 130, 131,
+		132, 133, 127, 158
+	};
+	int16 i, ret = 0;
+
 	out->setze_zeiger(0);
 	det->disable_room_sound();
 	ailsnd->end_sound();
 	g_events->delay(50);
-	Ci.Handle = File::open("cut/cut.tap");
+	Common::File *f = File::open("cut/cut.tap");
+	Ci.Handle = f;
 	Ci.Fname = 0;
 
 	if (Ci.Handle) {
 		switch (nr) {
-		case FCUT_001:
-			ailsnd->stop_mod();
-			CurrentSong = -1;
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-			break;
 		case FCUT_019:
 		case 19:
 		case 20:
@@ -1176,20 +1310,23 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			nr = FCUT_019;
 			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
-			}
-			if (!modul) {
-				mem->file->select_pool_item(Ci.Handle, 21);
+			ret = flc->custom_play(&Ci);
+			ailsnd->set_loopmode(1);
+
+			if (!modul && ret != -1) {
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
-				flc->custom_play(&Ci);
-				if (!modul) {
-					chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				ret = flc->custom_play(&Ci);
+
+				if (ret != -1) {
+					mem->file->select_pool_item(Ci.Handle, 21);
 					out->cls();
 					flc->custom_play(&Ci);
+					if (!modul) {
+						f->seek(ChunkHead::SIZE(), SEEK_CUR);
+						out->cls();
+						flc->custom_play(&Ci);
+					}
 				}
 			}
 			if (!modul) {
@@ -1203,27 +1340,27 @@ void flic_cut(int16 nr, int16 mode) {
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
 			if (!modul) {
-				chewy_fseek((Stream *)Ci.Handle, sizeof(ChunkHead), SEEK_CUR);
+				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				flc->custom_play(&Ci);
 			}
@@ -1232,6 +1369,128 @@ void flic_cut(int16 nr, int16 mode) {
 			out->ausblenden(1);
 			out->cls();
 			while (ailsnd->music_playing());
+			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
+			break;
+
+		case FCUT_065:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			load_room_music(256);
+			ailsnd->set_loopmode(1);
+			r46_kloppe();
+			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
+			CurrentSong = -1;
+			break;
+
+		case 95:
+			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+				mem->file->select_pool_item(Ci.Handle, nr);
+				flc->custom_play(&Ci);
+			}
+			break;
+
+		case 112:
+			ailsnd->set_music_mastervol(32);
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+			ailsnd->set_music_mastervol(5);
+			break;
+
+
+		case 133:
+		case 1123:
+			for (i = 0; i < 13 && i != -1 && !modul; ++i) {
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
+				ret = flc->custom_play(&Ci);
+				if (i == 0 || i == 1) {
+					out->setze_zeiger(nullptr);
+					out->cls();
+				}
+			}
+			break;
+
+		case 135:
+			flic_proc1();
+			break;
+
+		case 1003:
+			fx->border(workpage, 100, 0, 0);
+			print_rows(590);
+			mem->file->select_pool_item(Ci.Handle, 1);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				for (i = 0; i < 3 && ret != -1; ++i) {
+					fx->border(workpage, 100, 0, 0);
+					print_rows(591);
+					mem->file->select_pool_item(Ci.Handle, i + 3);
+					ret = flc->custom_play(&Ci);
+				}
+			}
+			break;
+
+		case 1012:
+			for (i = 0; i < 3 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 12);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+
+			if (ret == -1)
+				goto close;
+
+			out->cls();
+			mem->file->select_pool_item(Ci.Handle, 17);
+			fx->border(workpage, 100, 0, 0);
+			break;
+
+
+		case 1080:
+			for (i = 0; i < 8 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+
+			if (ret == -1)
+				goto close;
+			break;
+
+		case 1107:
+			mem->file->select_pool_item(Ci.Handle, 107);
+			ret = flc->custom_play(&Ci);
+			if (ret == -1)
+				goto close;
+
+			mem->file->select_pool_item(Ci.Handle, 109);
+			fx->border(workpage, 100, 0, 0);
+			break;
+
+		case 1113:
+			for (i = 0; i < 5 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
+				out->cls();
+				ret = flc->custom_play(&Ci);
+			}
+
+		case 1117:
+			if (mem->file->select_pool_item(Ci.Handle, 117) != -1) {
+				mem->file->select_pool_item(Ci.Handle, 119);
+				fx->border(workpage, 100, 0, 0);
+				flc->custom_play(&Ci);
+			}
+			break;
+
+
+
+
+		case FCUT_001:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
 			break;
 
 		case FCUT_053:
@@ -1277,10 +1536,6 @@ void flic_cut(int16 nr, int16 mode) {
 			while (ailsnd->music_playing());
 			break;
 
-		case FCUT_065:
-			r46_kloppe();
-			break;
-
 		default:
 			mem->file->select_pool_item(Ci.Handle, nr);
 			if (!mode)
@@ -1296,7 +1551,11 @@ void flic_cut(int16 nr, int16 mode) {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
+
+close:
+	delete Ci.Handle;
 	ERROR;
+
 	ailsnd->end_sound();
 	g_events->delay(50);
 	ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
@@ -1314,6 +1573,7 @@ void flic_cut(int16 nr, int16 mode) {
 	uhr->reset_timer(0, 0);
 	out->setze_zeiger(workptr);
 	flags.NoPalAfterFlc = false;
+
 }
 
 uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
@@ -1402,7 +1662,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (!_G(spieler).R7Hebel)
 			atds->set_ats_str(50, 0, ATS_DATEI);
-		else if (!_G(spieler).R7BorkFlag)
+		else if (!_G(spieler).R7BorkFlug)
 			atds->set_ats_str(50, 1, ATS_DATEI);
 		else
 			atds->set_ats_str(50, 2, ATS_DATEI);
@@ -1649,7 +1909,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case 100:
-		_G(spieler).Flags33_1 = true;
+		_G(spieler).flags33_1 = true;
 		break;
 
 	default:


Commit: 53c006cbf50a537dceb6d9888e3e8e0c657fefc5
    https://github.com/scummvm/scummvm/commit/53c006cbf50a537dceb6d9888e3e8e0c657fefc5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: Further work on flic_cut

Changed paths:
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index d4e9de73258..a317745c26f 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -178,48 +178,26 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	}
 }
 
-void effect::spr_blende(byte *workpage_, byte *ablage_,
-                        byte *palette, int16 frames, int16 col) {
-	int16 i;
-	int16 x, y;
-	int16 zoomx, zoomy;
-	taf_info *spr;
-
-	spr = mem->taf_adr("cut/ch_blend.taf");
-	ERROR
-	x = 128;
-	y = 68;
-	zoomx = 128 * 2;
-	zoomy = 168 * 2;
-	out->set_clip(0, 0, 320, 200);
-
-	for (i = 0; i < 8; i++) {
-		out->box_fill(0, 0, 320, y - (zoomy / 2), 12);
-		out->box_fill(0, 0, x - (zoomx / 2), 200, 12);
-		out->box_fill(0, 200 - (y - (zoomy / 2)), 320, 200, 12);
-		out->box_fill(320 - (x - (zoomx / 2)), 0, 320, 200, 12);
-		out->scale_set(spr->image[0], x - (zoomx / 2), y - (zoomy / 2), zoomx, zoomy, 0);
-		zoomx -= ((128 * 2) / 6);
-		zoomy -= ((68 * 2) / 6);
-	}
+void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
+	int i, y;
 
-	out->box_fill(128, 68, 128 + 64, 68 + 64, 12);
-	out->set_palette(palette);
-	out->setze_zeiger(workpage_);
-
-	for (i = 0; i < 8; i++) {
-		out->map_spr2screen(ablage_, _G(spieler).scrollx, _G(spieler).scrolly);
-		out->scale_set(spr->image[0], x - (zoomx / 2), y - (zoomy / 2), zoomx, zoomy, 0);
-		out->box_fill(0, 0, 320, y - (zoomy / 2), 12);
-		out->box_fill(0, 0, x - (zoomx / 2), 200, 12);
-		out->box_fill(0, 200 - (y - (zoomy / 2)), 320, 200, 12);
-		out->box_fill(320 - (x - (zoomx / 2)), 0, 320, 200, 12);
-		zoomx += ((128 * 2) / 6);
-		zoomy += ((68 * 2) / 6);
-		out->back2screen(workpage_ - 4);
+	if (mode) {
+		for (i = 0, y = 0; i < 20; ++i, y += 8) {
+			out->setze_zeiger(workpage_ + 4);
+			out->box_fill(0, 92 - y, 320, 92 - y + 8, col);
+			out->box_fill(0, 100 + y, 320, 108 + y, col);
+			out->back2screen(workpage_);
+			out->skip_line(lines);
+		}
+	} else {
+		for (i = 0; i < 20; ++i) {
+			out->setze_zeiger(workpage_ + 4);
+			out->box_fill(0, i, 320, i + 8, col);
+			out->box_fill(0, 192 - i, 320, 200 - i, col);
+			out->back2screen(workpage_);
+			out->skip_line(lines);
+		}
 	}
-	out->back2screen(workpage_ - 4);
-	free((char *)spr);
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index 9d42c78d2a7..a3763a0397d 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -45,11 +45,7 @@ public:
 	void rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 		byte *screen, byte *palette, int16 col, int16 skip_line);
 
-	void spr_blende(byte *workpage, byte *ablage,
-		byte *palette, int16 frames, int16 col);
-
-private:
-
+	void spr_blende(byte *workpage, int16 lines, bool mode, int16 col);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6ccadc4057c..ac697497d91 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1295,6 +1295,14 @@ void flic_cut(int16 nr, int16 mode) {
 
 	if (Ci.Handle) {
 		switch (nr) {
+		case FCUT_001:
+		case 1000:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+			break;
+
 		case FCUT_019:
 		case 19:
 		case 20:
@@ -1372,6 +1380,46 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
 			break;
 
+		case FCUT_054:
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+
+		case FCUT_058:
+			nr = FCUT_058;
+			mem->file->select_pool_item(Ci.Handle, nr);
+
+			flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+			if (!modul) {
+				mem->file->select_pool_item(Ci.Handle, FCUT_059);
+
+				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+			}
+			if (!_G(spieler).R43GetPgLady) {
+				if (!modul) {
+					mem->file->select_pool_item(Ci.Handle, FCUT_060);
+
+					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				}
+			} else {
+				if (!modul) {
+					mem->file->select_pool_item(Ci.Handle, FCUT_061);
+
+					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				}
+				if (!modul) {
+					mem->file->select_pool_item(Ci.Handle, FCUT_062);
+
+					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				}
+			}
+			ailsnd->fade_out(0);
+			out->ausblenden(1);
+			out->cls();
+			while (ailsnd->music_playing());
+			break;
+
 		case FCUT_065:
 			ailsnd->stop_mod();
 			CurrentSong = -1;
@@ -1382,6 +1430,13 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			break;
 
+		case FCUT_071:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
+			break;
+
 		case 95:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 				mem->file->select_pool_item(Ci.Handle, nr);
@@ -1398,6 +1453,12 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->set_music_mastervol(5);
 			break;
 
+		case 116:
+			for (i = 0; i < 6; ++i) {
+				mem->file->select_pool_item(Ci.Handle, nr);
+				flc->custom_play(&Ci);
+			}
+			break;
 
 		case 133:
 		case 1123:
@@ -1415,6 +1476,8 @@ void flic_cut(int16 nr, int16 mode) {
 			flic_proc1();
 			break;
 
+
+
 		case 1003:
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
@@ -1431,6 +1494,21 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			break;
 
+		case 1006:
+			for (i = 0; i < 3 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 6);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1009:
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 9);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
 		case 1012:
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				mem->file->select_pool_item(Ci.Handle, i + 12);
@@ -1458,6 +1536,17 @@ void flic_cut(int16 nr, int16 mode) {
 				goto close;
 			break;
 
+		case 1087:
+			mem->file->select_pool_item(Ci.Handle, 87);
+			ret = flc->custom_play(&Ci);
+
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 102);
+				fx->border(workpage, 100, 0, 0);
+				flc->custom_play(&Ci);
+			}
+			break;
+
 		case 1107:
 			mem->file->select_pool_item(Ci.Handle, 107);
 			ret = flc->custom_play(&Ci);
@@ -1468,6 +1557,24 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->border(workpage, 100, 0, 0);
 			break;
 
+		case 1110:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			load_room_music(257);
+			ailsnd->set_music_mastervol(20);
+			mem->file->select_pool_item(Ci.Handle, 110);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 112);
+				fx->spr_blende(workpage, 100, false, 0);
+				ailsnd->set_music_mastervol(63);
+				flc->custom_play(&Ci);
+			}
+
+			ailsnd->stop_mod();
+			break;
+
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
@@ -1485,14 +1592,6 @@ void flic_cut(int16 nr, int16 mode) {
 
 
 
-
-		case FCUT_001:
-			ailsnd->stop_mod();
-			CurrentSong = -1;
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-			break;
-
 		case FCUT_053:
 			for (i = 0; i < 3; i++) {
 				mem->file->select_pool_item(Ci.Handle, nr);
@@ -1501,40 +1600,6 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			break;
 
-		case FCUT_058:
-
-			nr = FCUT_058;
-			mem->file->select_pool_item(Ci.Handle, nr);
-
-			flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-			if (!modul) {
-				mem->file->select_pool_item(Ci.Handle, FCUT_059);
-
-				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-			}
-			if (!_G(spieler).R43GetPgLady) {
-				if (!modul) {
-					mem->file->select_pool_item(Ci.Handle, FCUT_060);
-
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-				}
-			} else {
-				if (!modul) {
-					mem->file->select_pool_item(Ci.Handle, FCUT_061);
-
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-				}
-				if (!modul) {
-					mem->file->select_pool_item(Ci.Handle, FCUT_062);
-
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-				}
-			}
-			ailsnd->fade_out(0);
-			out->ausblenden(1);
-			out->cls();
-			while (ailsnd->music_playing());
-			break;
 
 		default:
 			mem->file->select_pool_item(Ci.Handle, nr);


Commit: 7501ed62235a05a5e4c02779bc1a9668e1eaad93
    https://github.com/scummvm/scummvm/commit/7501ed62235a05a5e4c02779bc1a9668e1eaad93
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: More flic_cut implementation

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ac697497d91..cd0701055e9 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1276,13 +1276,27 @@ static void flic_proc1() {
 	out->cls();
 }
 
+#define PLAY_LOOP do { \
+		mem->file->select_pool_item(Ci.Handle, nr); \
+		ret = flc->custom_play(&Ci); \
+	} while (atds->aad_get_status() != -1 && ret != -1)
+
+
 void flic_cut(int16 nr, int16 mode) {
-	const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
-	const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	const int16 FLIC_CUT_133[] = {
 		133, 123, 125, 126, 124, 128, 129, 130, 131,
 		132, 133, 127, 158
 	};
+	const int16 FLIC_CUT_1045[] = {
+		30, 47, 41, 34, 45, 52, 53, 57, 64, 63, 62
+	};
+	const int16 FLIC_CUT_1074[] = { 73, 114, 74, 75 };
+	const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
+	const int16 FLIC_CUT_1093[] = {
+		93, 94, 95, 96, 97, 98, 99, 100, 92, 90, 91, 89
+	};
+	const int16 FLIC_CUT_1106[] = { 106, 105, 104 };
+	const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
 	out->setze_zeiger(0);
@@ -1380,6 +1394,28 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
 			break;
 
+		case FCUT_032:
+		case FCUT_035:
+		case FCUT_036:
+		case FCUT_037:
+		case FCUT_040:
+			PLAY_LOOP;
+			break;
+
+		case FCUT_034:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+
+			PLAY_LOOP;
+			break;
+
+		case FCUT_053:
+			for (i = 0; i < 3; ++i) {
+				mem->file->select_pool_item(Ci.Handle, nr);
+				flc->custom_play(&Ci);
+			}
+			break;
+
 		case FCUT_054:
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
@@ -1393,24 +1429,20 @@ void flic_cut(int16 nr, int16 mode) {
 			flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 			if (!modul) {
 				mem->file->select_pool_item(Ci.Handle, FCUT_059);
-
 				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 			}
 			if (!_G(spieler).R43GetPgLady) {
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_060);
-
 					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 				}
 			} else {
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_061);
-
 					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 				}
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_062);
-
 					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 				}
 			}
@@ -1437,6 +1469,14 @@ void flic_cut(int16 nr, int16 mode) {
 			flc->custom_play(&Ci);
 			break;
 
+		case 83:
+		case 1083:
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, 83);
+				ret = flc->custom_play(&Ci);
+			}
+
+
 		case 95:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 				mem->file->select_pool_item(Ci.Handle, nr);
@@ -1524,6 +1564,148 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->border(workpage, 100, 0, 0);
 			break;
 
+		case 1015:
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 15);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+
+		case 1045:
+			for (i = 0; i < 11 && ret != -1; ++i) {
+				fx->border(workpage, 100, 0, 0);
+				print_rows(594);
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
+				if (FLIC_CUT_1045[i] == 53) {
+					ailsnd->stop_mod();
+					CurrentSong = -1;
+					load_room_music(256);
+				}
+
+				ret = flc->custom_play(&Ci);
+
+				if (FLIC_CUT_1045[i] == 53) {
+					ailsnd->stop_mod();
+				}
+			}
+			break;
+
+		case 1031:
+			mem->file->select_pool_item(Ci.Handle, 31);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				fx->border(workpage, 100, 0, 0);
+				mem->file->select_pool_item(Ci.Handle, 43);
+				flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1048:
+			mem->file->select_pool_item(Ci.Handle, 50);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				fx->spr_blende(workpage, 100, false, 0);
+				mem->file->select_pool_item(Ci.Handle, 48);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 49);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				fx->spr_blende(workpage, 100, false, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				fx->spr_blende(workpage, 100, false, 0);
+				mem->file->select_pool_item(Ci.Handle, 54);
+			}
+			break;
+
+		case 1055:
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 55);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 46);
+				fx->border(workpage, 100, 0, 0);
+			}
+			break;
+
+		case 1058:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			load_room_music(255);
+			mem->file->select_pool_item(Ci.Handle, 58);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 59);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 60);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 61);
+				fx->spr_blende(workpage, 100, false, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 62);
+				fx->border(workpage, 100, 0, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1065:
+			ailsnd->stop_mod();
+			CurrentSong = -1;
+			load_room_music(256);
+
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 65);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1068:
+			mem->file->select_pool_item(Ci.Handle, 68);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				fx->border(workpage, 100, 0, 0);
+				mem->file->select_pool_item(Ci.Handle, 70);
+				flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1069:
+			mem->file->select_pool_item(Ci.Handle, 69);
+			ret = flc->custom_play(&Ci);
+
+			for (i = 0; i < 2 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, i + 71);
+				fx->spr_blende(workpage, 100, false, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1074:
+			for (i = 0; i < 4 && ret != -1; ++i) {
+				fx->border(workpage, 100, 0, 0);
+				print_rows(605);
+				mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
+				fx->spr_blende(workpage, 100, false, 0);
+				ret = flc->custom_play(&Ci);
+			}
+			break;
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
@@ -1547,6 +1729,43 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			break;
 
+		case 1088:
+			mem->file->select_pool_item(Ci.Handle, 88);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 86);
+				fx->spr_blende(workpage, 100, false, 0);
+				flc->custom_play(&Ci);
+				ailsnd->stop_mod();
+			}
+			break;
+
+		case 1093:
+			for (i = 0; i < 12 && ret != -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
+				switch (FLIC_CUT_1093[i]) {
+				case 90:
+				case 91:
+				case 92:
+					out->cls();
+					break;
+				default:
+					break;
+				}
+
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
+		case 1106:
+			for (i = 0; i < 3 && ret == -1; ++i) {
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
+				out->cls();
+				ret = flc->custom_play(&Ci);
+			}
+			break;
+
 		case 1107:
 			mem->file->select_pool_item(Ci.Handle, 107);
 			ret = flc->custom_play(&Ci);
@@ -1557,6 +1776,17 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->border(workpage, 100, 0, 0);
 			break;
 
+		case 1108:
+			mem->file->select_pool_item(Ci.Handle, 108);
+			ret = flc->custom_play(&Ci);
+
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 115);
+				fx->spr_blende(workpage, 100, false, 0);
+				flc->custom_play(&Ci);
+			}
+			break;
+
 		case 1110:
 			ailsnd->stop_mod();
 			CurrentSong = -1;
@@ -1590,26 +1820,21 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			break;
 
-
-
-		case FCUT_053:
-			for (i = 0; i < 3; i++) {
-				mem->file->select_pool_item(Ci.Handle, nr);
-
-				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-			}
-			break;
-
-
 		default:
-			mem->file->select_pool_item(Ci.Handle, nr);
-			if (!mode)
+			switch (mem->file->select_pool_item(Ci.Handle,
+				(nr < 1000) ? nr : nr - 1000)) {
+			case 0:
 				flc->custom_play(&Ci);
-			else if (mode == 1)
+				break;
+			case 1:
 				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				break;
+			default:
+				break;
+			}
+
 			ERROR;
 			break;
-
 		}
 		chewy_fclose(Ci.Handle);
 	} else {


Commit: 70b2375f01b2839dc4b86146ea78c2de0df50bdc
    https://github.com/scummvm/scummvm/commit/70b2375f01b2839dc4b86146ea78c2de0df50bdc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: Finished implementing flic_cut

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index cd0701055e9..0c3a91afb75 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1386,7 +1386,7 @@ void flic_cut(int16 nr, int16 mode) {
 				out->cls();
 				flc->custom_play(&Ci);
 			}
-			ERROR;
+			ERROR
 			ailsnd->fade_out(0);
 			out->ausblenden(1);
 			out->cls();
@@ -1516,8 +1516,6 @@ void flic_cut(int16 nr, int16 mode) {
 			flic_proc1();
 			break;
 
-
-
 		case 1003:
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
@@ -1556,12 +1554,11 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = flc->custom_play(&Ci);
 			}
 
-			if (ret == -1)
-				goto close;
-
-			out->cls();
-			mem->file->select_pool_item(Ci.Handle, 17);
-			fx->border(workpage, 100, 0, 0);
+			if (ret != -1) {
+				out->cls();
+				mem->file->select_pool_item(Ci.Handle, 17);
+				fx->border(workpage, 100, 0, 0);
+			}
 			break;
 
 		case 1015:
@@ -1713,9 +1710,6 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				ret = flc->custom_play(&Ci);
 			}
-
-			if (ret == -1)
-				goto close;
 			break;
 
 		case 1087:
@@ -1769,11 +1763,11 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1107:
 			mem->file->select_pool_item(Ci.Handle, 107);
 			ret = flc->custom_play(&Ci);
-			if (ret == -1)
-				goto close;
 
-			mem->file->select_pool_item(Ci.Handle, 109);
-			fx->border(workpage, 100, 0, 0);
+			if (ret != -1) {
+				mem->file->select_pool_item(Ci.Handle, 109);
+				fx->border(workpage, 100, 0, 0);
+			}
 			break;
 
 		case 1108:
@@ -1833,37 +1827,42 @@ void flic_cut(int16 nr, int16 mode) {
 				break;
 			}
 
-			ERROR;
+			ERROR
 			break;
 		}
+
 		chewy_fclose(Ci.Handle);
 	} else {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
 
-close:
-	delete Ci.Handle;
-	ERROR;
+	ERROR
 
 	ailsnd->end_sound();
 	g_events->delay(50);
 	ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
 	ailsnd->set_music_mastervol(_G(spieler).MusicVol);
-	load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
-	ERROR
-	room->load_sound();
-	ERROR
-	if (_G(spieler).SoundSwitch != false)
-		det->enable_room_sound();
+
+	if (nr < 1000 && nr != 135) {
+		load_room_music(_G(spieler).PersonRoomNr[0]);
+		ERROR
+		room->load_sound();
+		ERROR
+
+		if (_G(spieler).SpeechSwitch)
+			det->enable_room_sound();
+
+		uhr->reset_timer(0, 0);
+	}
+
 	if (!flags.NoPalAfterFlc)
 		out->set_palette(pal);
+
 	atds->stop_aad();
 	atds->stop_ats();
-	uhr->reset_timer(0, 0);
 	out->setze_zeiger(workptr);
 	flags.NoPalAfterFlc = false;
-
 }
 
 uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,


Commit: 6731756dde4e1624435cf64383b466111a807104
    https://github.com/scummvm/scummvm/commit/6731756dde4e1624435cf64383b466111a807104
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/movclass.cpp


diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 693847dddcb..6f8e8a7aa80 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -73,6 +73,7 @@ void movclass::goto_xy(GotoPkt *gp) {
 	ziel_feld = get_feld_nr(gpkt->Dx, gpkt->Dy);
 	tmp = ziel_feld;
 	anz = calc_go(start_feld, &ziel_feld);
+
 	if (tmp != ziel_feld) {
 		get_mov_line();
 		if (gml.MLineFeld != -1) {
@@ -101,6 +102,7 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 	int16 ok;
 	int16 ret;
 	ret = -1;
+
 	if (agv.AutoGo == true) {
 		speicher = gpkt->Mem;
 		speicher += (gpkt->Breite * gpkt->Hoehe) * gpkt->AkMovEbene;
@@ -189,6 +191,7 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 			}
 		}
 	}
+
 	return ret;
 }
 
@@ -218,18 +221,21 @@ void movclass::calc_xy() {
 	int16 xvector = 0;
 	int16 yvector = 0;
 	int16 tmp_feld;
+
 	if (!ged->ged_idx(gpkt->Dx, gpkt->Dy, gpkt->Breite, gpkt->Mem)) {
 		ende = 0;
 		count = 0;
 		min_x = -1;
 		min_y = -1;
-		while (!ende) {
 
+		while (!ende) {
 			min_steps = 30000;
 			x = gpkt->Dx - (count + 1) * 8;
 			y = gpkt->Dy - (count + 1) * 8;
+
 			for (seite = 0; seite < 4; seite++) {
 				anz = 2 + (count * 2);
+
 				switch (seite) {
 				case S_OBEN:
 					xvector = 8;
@@ -239,22 +245,22 @@ void movclass::calc_xy() {
 				case S_RECHTS:
 					xvector = 0;
 					yvector = 8;
-
 					break;
 
 				case S_UNTEN:
 					xvector = -8;
 					yvector = 0;
-
 					break;
 
 				case S_LINKS:
 					xvector = 0;
 					yvector = -8;
-
 					break;
 
+				default:
+					break;
 				}
+
 				for (i = 0; i < anz; i++) {
 					if (x >= 0 && x < gpkt->Breite * 8 &&
 					        y >= 0 && y < gpkt->Hoehe * 8) {
@@ -272,6 +278,7 @@ void movclass::calc_xy() {
 					y += yvector;
 				}
 			}
+
 			++count;
 			if (min_steps != 30000) {
 				ende = 1;
@@ -307,9 +314,9 @@ short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
 	mov_ok = 0;
 	steps = 0;
 	abbruch = 0;
+
 	while (!ende && !abbruch) {
 		if (om.Count > 0) {
-
 			--om.Count;
 			tmpx = om.Xyvo[0];
 			tmpy = om.Xyvo[1];


Commit: 65cd7c1da91aa90c251ca12c4d51583ad5e81b48
    https://github.com/scummvm/scummvm/commit/65cd7c1da91aa90c251ca12c4d51583ad5e81b48
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: gcc compilation fixes

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/ch_icm.cpp
    engines/chewy/chewy.cpp
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/temp_file.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index bdd2ebb1bd2..9f4115f7bee 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -79,7 +79,7 @@ atdsys::atdsys() {
 	for (i = 0; i < AAD_MAX_PERSON; i++)
 		ssi[i] = init_ssi;
 	inv_block_nr = -1;
-	inv_use_mem = false;
+	inv_use_mem = nullptr;
 	inzeig = in->get_in_zeiger();
 	for (i = 0; i < MAX_HANDLE; i++) {
 		atdshandle[i] = 0;
@@ -898,7 +898,6 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 }
 
 int16 atdsys::start_aad(int16 dia_nr) {
-	int16 *pos;
 	int16 txt_len;
 
 	if (aadv.Dialog)
@@ -908,8 +907,7 @@ int16 atdsys::start_aad(int16 dia_nr) {
 		aadv.Ptr = atdsmem[AAD_HANDLE];
 		aad_search_dia(dia_nr, &aadv.Ptr);
 		if (aadv.Ptr) {
-			pos = (int16 *)aadv.Ptr;
-			aadv.Person = (AadInfo *) aadv.Ptr;
+			aadv.Person = (AadInfo *)aadv.Ptr;
 			aadv.Ptr += aadv.TxtHeader->PerAnz * sizeof(AadInfo);
 			aadv.Dialog = true;
 			aadv.StrNr = 0;
@@ -938,7 +936,6 @@ void atdsys::stop_aad() {
 }
 
 void atdsys::print_aad(int16 scrx, int16 scry) {
-	int16 *pos;
 	int16 i;
 	int16 txt_len;
 	int16 tmp_person;
@@ -1062,7 +1059,6 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 
 						tmp_person = aadv.StrHeader->AkPerson;
 						tmp_str_nr = aadv.StrNr;
-						pos = (int16 *)aadv.Ptr;
 						aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
 						aadv.Ptr += sizeof(AadStrHeader);
 						if (atdsv.aad_str != 0) {
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index 2f5976471bc..a5e3bce45dc 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -315,9 +315,9 @@ void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
 			}
 		}
 		maus_rect_first = false;
-		out->printxy(0, 0, 255, 0, 0, "X = %d Y = %d mit scroll
-		              Offset\0", minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
-		              out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
+		out->printxy(0, 0, 255, 0, 0, "X = %d Y = %d mit scroll Offset",
+			minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+		out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset", minfo.x, minfo.y);
 		              plot_maus();
 		              out->setze_zeiger(screen0);
 		              out->back2screen(workpage);
@@ -620,16 +620,15 @@ void get_auto_mov() {
 			                detmov.Xzoom, detmov.Yzoom, 0);
 		}
 		if (info_flag) {
-			out->printxy(0, 0, 255, 300, scr_width, "MIT OFFSET x = %3d y =
-			              % 3d\0", spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X, spieler_vector[P_CHEWY].Xypos[1] + CH
-			              _HOT_MOV_Y);
-			out->printxy(0, 10, 255, 300, scr_width, "NORMAL x = %3d y =
-			              % 3d\0", spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			              out->printxy(0, 20, 255, 300, scr_width, "AUTOPUNKT x = %3d y =
-			                            % 3d\0", Rdi->AutoMov[auto_nr].X, Rdi->AutoMov[auto_nr].Y);
-			                            out->printxy(0, 30, 255, 300, scr_width, "DETAIL NUMMER %d\0", detail_nr);
+			out->printxy(0, 0, 255, 300, scr_width, "MIT OFFSET x = %3d y = %3d",
+				spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X, spieler_vector[P_CHEWY].Xypos[1] + CH
+			    _HOT_MOV_Y);
+			out->printxy(0, 10, 255, 300, scr_width, "NORMAL x = %3d y = %3d",
+				spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			out->printxy(0, 20, 255, 300, scr_width, "AUTOPUNKT x = %3d y = %3d", Rdi->AutoMov[auto_nr].X, Rdi->AutoMov[auto_nr].Y);
+			out->printxy(0, 30, 255, 300, scr_width, "DETAIL NUMMER %d", detail_nr);
 		}
-		              cur->plot_cur();
+		cur->plot_cur();
 		out->back2screen(workpage);
 	}
 	if (save_flag == false) {
@@ -1036,15 +1035,14 @@ void set_z_ebene() {
 		out->set_vorschub(fvorx6x8, fvory6x8);
 		out->linie(lx, ly - _G(spieler).scrolly, lx + 320, ly - _G(spieler).scrolly, 255);
 		if (info_flag) {
-			out->printxy(0, 0, 255, 300, scr_width, "CHEWY Z_EBENE %d LINIE Z_EBENE
-			              % d\0", spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y - abs(spieler_vector[P_CHEWY].Yzoom), l
-			              y);
+			out->printxy(0, 0, 255, 300, scr_width, "CHEWY Z_EBENE %d LINIE Z_EBENE %d",
+				spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y - abs(spieler_vector[P_CHEWY].Yzoom), l y);
 			if (detail_flag == ANI_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "ANI DETAIL NUMMER %d\0", detail_nr);
+				out->printxy(0, 10, 255, 300, scr_width, "ANI DETAIL NUMMER %d", detail_nr);
 			if (detail_flag == STATIC_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "STATIC DETAIL NUMMER %d\0", detail_nr);
+				out->printxy(0, 10, 255, 300, scr_width, "STATIC DETAIL NUMMER %d", detail_nr);
 			if (detail_flag == INVENT_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "INVENTAR NUMMER %d\0", detail_nr);
+				out->printxy(0, 10, 255, 300, scr_width, "INVENTAR NUMMER %d", detail_nr);
 		}
 		cur->plot_cur();
 		out->back2screen(workpage);
@@ -1063,7 +1061,6 @@ void set_z_ebene() {
 			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
 		}
 	}
-
 }
 
 int16 ja_nein() {
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index c0b537613e7..88808f4d72c 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -133,9 +133,9 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAutosave) {
 	Common::Serializer s(nullptr, stream);
-	int16 spr_nr;
+	//int16 spr_nr;
 	int16 i;
-	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+	//spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 	for (i = 0; i < MAX_PERSON; i++) {
 		_G(spieler).X[i] = spieler_vector[i].Xypos[0];
 		_G(spieler).Y[i] = spieler_vector[i].Xypos[1];
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 5dea4883256..76860b7b8aa 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -26,9 +26,6 @@
 
 namespace Chewy {
 
-#define false false
-#define true true
-
 cursor::cursor(mcga_grafik *iout, maus *iin, cur_blk *curblkp) {
 	out = iout;
 	in = iin;
@@ -41,7 +38,7 @@ cursor::cursor(mcga_grafik *iout, maus *iin, cur_blk *curblkp) {
 		maus_da = true;
 		minfo = inzeig->minfo;
 		sichtbar = false;
-		ani = false;
+		ani = nullptr;
 		cur_aufruf = false;
 		ani_count = false;
 	}
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index c176e279d91..d2bbc2d51f4 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -48,19 +48,19 @@ public:
 	void wait_taste_los(int16 maus_plot);
 	void wait_taste(int16 maus_plot);
 
-	mcga_grafik *out;
-	maus *in;
-	maus_info *minfo;
-	in_zeiger *inzeig;
-	cur_blk *curblk;
-	cur_ani *ani;
-	int scr_width;
-	int16 cur_x_old;
-	int16 cur_y_old;
-	int16 cur_aufruf;
-	int16 ani_count;
-	uint8 maus_da;
-	bool sichtbar;
+	mcga_grafik *out = nullptr;
+	maus *in = nullptr;
+	maus_info *minfo = nullptr;
+	in_zeiger *inzeig = nullptr;
+	cur_blk *curblk = nullptr;
+	cur_ani *ani = nullptr;
+	int scr_width = 0;
+	int16 cur_x_old = 0;
+	int16 cur_y_old = 0;
+	int16 cur_aufruf = 0;
+	int16 ani_count = 0;
+	uint8 maus_da = 0;
+	bool sichtbar = false;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 0a9f5f312ed..9b015aac030 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -29,6 +29,9 @@
 
 namespace Chewy {
 
+static int16(*custom_user)(int16) = 0;
+static int16(*flic_user)(int16) = 0;
+
 void decode_flc(byte *vscr, const byte *dbuf) {
 	Common::MemoryReadStream src(dbuf, 0xffffffff);
 	int h = src.readUint16LE();
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 5b4217507bc..b884d0b6acd 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -76,9 +76,6 @@ enum CustomTypes {
 extern void decode_flc(byte *vscr, const byte *dbuf);
 extern void decode_rle(byte *vscr, const byte *dbuf, int br, int h);
 
-static int16(*custom_user)(int16) = 0;
-static int16(*flic_user)(int16) = 0;
-
 class flic {
 public:
 	flic();
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 691c69dc1e4..cedb05cf239 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -284,7 +284,7 @@ bool FlicHead::load(Common::SeekableReadStream *src) {
 	src->read(reserved3, 40);
 
 	return true;
-};
+}
 
 bool FrameHead::load(Common::SeekableReadStream *src) {
 	size = src->readUint32LE();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index d6239987dc4..5807a7dc86e 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -280,7 +280,7 @@ struct tmf_header {
 	byte *ipos[31] = { nullptr };
 
 	bool load(Common::SeekableReadStream *src);
-	static const int SIZE() { return 0x284; }
+	static int SIZE() { return 0x284; }
 };
 
 struct musik_info {
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 0c3a91afb75..edce7a53ea8 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -677,7 +677,7 @@ void enter_room(int16 eib_nr) {
 
 	uhr->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
-	SetUpScreenFunc = false;
+	SetUpScreenFunc = nullptr;
 	HowardMov = false;
 	_G(cur_hide_flag) = false;
 
@@ -1807,7 +1807,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 
 		case 1117:
-			if (mem->file->select_pool_item(Ci.Handle, 117) != -1) {
+			if (mem->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
 				mem->file->select_pool_item(Ci.Handle, 119);
 				fx->border(workpage, 100, 0, 0);
 				flc->custom_play(&Ci);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index ea4dc91e1da..853b8f30067 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -66,7 +66,6 @@ void Room::close_handle(int16 mode) {
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	char tmp_str[MAXPATH];
 	room_detail_info *Rdi_;
-	int16 ret;
 	modul = 0;
 	fcode = 0;
 
@@ -91,7 +90,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		if (!modul) {
 			obj->calc_all_static_detail();
 			ERROR
-			ret = load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD);
+			load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD);
 			ERROR
 
 			set_pal(AblagePal[Rb->AkAblage], Rb->LowPalMem);
@@ -329,8 +328,8 @@ void Room::free_ablage() {
 }
 
 byte *Room::get_ablage(int16 nr) {
-	byte *ret;
-	ret = false;
+	byte *ret = nullptr;
+
 	if (nr < MAX_ABLAGE && AkAblage != -1) {
 		ret = Ablage[nr];
 	}
@@ -338,8 +337,8 @@ byte *Room::get_ablage(int16 nr) {
 }
 
 byte **Room::get_ablage() {
-	byte **ret;
-	ret = false;
+	byte **ret = nullptr;
+
 	if (AkAblage != -1) {
 		ret = &Ablage[0];
 	}
@@ -347,8 +346,8 @@ byte **Room::get_ablage() {
 }
 
 byte **Room::get_ged_mem() {
-	byte **ret;
-	ret = false;
+	byte **ret = nullptr;
+
 	if (AkAblage != -1) {
 		ret = &GedMem[0];
 	}
diff --git a/engines/chewy/temp_file.h b/engines/chewy/temp_file.h
index 62249df8f7d..16e618f0bea 100644
--- a/engines/chewy/temp_file.h
+++ b/engines/chewy/temp_file.h
@@ -26,6 +26,7 @@
 #include "common/archive.h"
 #include "common/list.h"
 #include "common/memstream.h"
+#include "common/path.h"
 #include "common/str.h"
 
 namespace Chewy {


Commit: 3deb7e23961ea97bd1e6235d9b119cbef70beb58
    https://github.com/scummvm/scummvm/commit/3deb7e23961ea97bd1e6235d9b119cbef70beb58
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:16-08:00

Commit Message:
CHEWY: Changing calloc calls to malloc

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/detail.cpp
    engines/chewy/effect.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/memory.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 9f4115f7bee..e215fae0926 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -337,7 +337,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
-					inv_use_mem = (char *)calloc(Ch.size + 3l, 1);
+					inv_use_mem = (char *)malloc(Ch.size + 3l);
 					if (!modul) {
 						if (Ch.size) {
 							if (!rs->read(inv_use_mem, Ch.size)) {
@@ -378,7 +378,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 				break;
 
 			case INV_IDX_DATEI:
-				atdsmem[INV_IDX_HANDLE] = (char *)calloc(INV_STRC_ANZ * sizeof(InvUse), 1);
+				atdsmem[INV_IDX_HANDLE] = (char *)malloc(INV_STRC_ANZ * sizeof(InvUse));
 				break;
 
 			default:
@@ -414,7 +414,7 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	tmp_adr = NULL;
 	size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
 	if (size) {
-		tmp_adr = (char *)calloc(size + 3l, 1);
+		tmp_adr = (char *)malloc(size + 3l);
 	}
 
 	return tmp_adr;
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 951c6284110..347fb908c14 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -282,11 +282,11 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 	mem->file->get_tafinfo(fname_, &tafheader);
 	if (!modul) {
 		anz = tafheader->count;
-		tmp = (char *)calloc((int32)anz * 4l + sizeof(taf_info), 1);
+		tmp = (char *)malloc((int32)anz * 4l + sizeof(taf_info));
 		if (!modul) {
 			Tt = (taf_info *)tmp;
 			Tt->anzahl = anz;
-			Tt->korrektur = (int16 *)calloc((int32)Tt->anzahl * 4l, 1);
+			Tt->korrektur = (int16 *)malloc((int32)Tt->anzahl * 4l);
 			if (!modul) {
 				mem->file->load_korrektur(fname_, Tt->korrektur);
 				Tt->palette = 0;
@@ -355,7 +355,7 @@ void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info
 		if (iheader.load(rs)) {
 			if (!Tt->image[spr_nr + i]) {
 				size = iheader.width * iheader.height ;
-				Tt->image[spr_nr + i] = (byte *)calloc(size + 4l, 1);
+				Tt->image[spr_nr + i] = (byte *)malloc(size + 4l);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index a317745c26f..fc4073e5305 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -37,7 +37,7 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 	int16 *rnd_zeiger;
 	int16 i, x, y;
 	byte *sp;
-	sp = (byte *)calloc(8 * 8 + 4, 1);
+	sp = (byte *)malloc(8 * 8 + 4);
 	if (!modul) {
 		rnd_zeiger = (int16 *)rnd_speicher;
 		if (col < 256) {
@@ -74,7 +74,7 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 	int16 i;
 	int16 x, y, x1, y1;
 	byte *sp;
-	sp = (byte *)calloc(8 * 8 + 4, 1);
+	sp = (byte *)malloc(8 * 8 + 4);
 	if (!modul) {
 		i = 0;
 		if (col < 256) {
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index df34f2cce97..d75cd240827 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -257,7 +257,7 @@ void new_game() {
 	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 	ERROR
 
-	tmp = (byte *)calloc(ROOM_ATS_MAX, 1);
+	tmp = (byte *)malloc(ROOM_ATS_MAX);
 	ERROR
 
 	Common::File f;
@@ -278,7 +278,7 @@ void new_game() {
 		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
-	tmp = (byte *)calloc(MAX_MOV_OBJ, 1);
+	tmp = (byte *)malloc(MAX_MOV_OBJ);
 	ERROR
 
 	if (f.open(INV_ATS_STEUER)) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 7cd4abb5fb8..bcb22fb05f3 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -98,24 +98,24 @@ void game_main() {
 }
 
 void alloc_buffers() {
-	workpage = (byte *)calloc(64004l, 1);
+	workpage = (byte *)malloc(64004l);
 	ERROR
-	pal = (byte *)calloc(768l, 1);
+	pal = (byte *)malloc(768l);
 	ERROR
-	cur_back = (byte *)calloc(16 * 16 + 4, 1);
+	cur_back = (byte *)malloc(16 * 16 + 4);
 	ERROR;
 	Ci.VirtScreen = workpage;
-	Ci.TempArea = (byte *)calloc(64004l, 1);
+	Ci.TempArea = (byte *)malloc(64004l);
 	ERROR;
 	det->set_taf_ani_mem(Ci.TempArea);
-	Ci.MusicSlot = (byte *)calloc(MUSIC_SLOT_SIZE, 1);
+	Ci.MusicSlot = (byte *)malloc(MUSIC_SLOT_SIZE);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
 	ERROR;
-	Ci.SoundSlot = (byte *)calloc(SOUND_SLOT_SIZE, 1);
+	Ci.SoundSlot = (byte *)malloc(SOUND_SLOT_SIZE);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
 	ERROR;
 	Ci.Fname = fname;
-	SpeechBuf[0] = (byte *)calloc(SPEECH_HALF_BUF * 2, 1);
+	SpeechBuf[0] = (byte *)malloc(SPEECH_HALF_BUF * 2);
 	ERROR
 	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
 }
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 703ec6f966a..9a68f86973f 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -112,7 +112,7 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 					size += image_anz * 4l;
 					size += image_anz * sizeof(char *);
 					size += ((uint32)sizeof(taf_seq_info));
-					tmp1 = (byte *)calloc(size + image_anz * 4l, 1);
+					tmp1 = (byte *)malloc(size + image_anz * 4l);
 					if (!modul) {
 						ts_info = (taf_seq_info *)tmp1;
 						ts_info->anzahl = image_anz;
@@ -176,7 +176,7 @@ void memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
 	if (!modul) {
-		*speicher = (byte *)calloc(size, 1);
+		*speicher = (byte *)malloc(size);
 		if (*speicher) {
 			file->load_tff(filename, *speicher);
 			if (modul) {
@@ -196,7 +196,7 @@ byte *memory::void_adr(const char *filename) {
 	size = file->size(filename, 200);
 
 	if (!modul) {
-		ptr = (byte *)calloc(size, sizeof(uint32));
+		ptr = (byte *)malloc(size * sizeof(uint32));
 		if (!modul) {
 			*(uint32 *)ptr = size;
 			file->void_load(filename, ptr + sizeof(uint32), size);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 853b8f30067..b52d8123a34 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -122,7 +122,7 @@ void Room::load_taf(const char *filename, byte **speicher, byte *palette, int16
 		imagesize[sprnr] = 0l;
 		mem->file->imsize(filename, imagesize);
 		if (!modul) {
-			*speicher = (byte *)calloc((imagesize[sprnr]) + 4l, 1);
+			*speicher = (byte *)malloc((imagesize[sprnr]) + 4l);
 			if (!modul) {
 				mem->file->load_tafmcga(filename, *speicher, sprnr);
 			}
@@ -301,9 +301,9 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 void Room::init_ablage() {
 	int16 i;
 	LastAblageSave = 0;
-	Ablage[0] = (byte *)calloc(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l), 1);
-	AblagePal[0] = (byte *)calloc(MAX_ABLAGE * 768l, 1);
-	GedMem[0] = (byte *)calloc(MAX_ABLAGE * GED_BLOCK_SIZE, 1);
+	Ablage[0] = (byte *)malloc(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
+	AblagePal[0] = (byte *)malloc(MAX_ABLAGE * 768l);
+	GedMem[0] = (byte *)malloc(MAX_ABLAGE * GED_BLOCK_SIZE);
 	if (!modul) {
 		AkAblage = 0;
 		for (i = 0; i < MAX_ABLAGE; i++) {


Commit: e9867bbfdedf522f8f34710435c18616e443d9ea
    https://github.com/scummvm/scummvm/commit/e9867bbfdedf522f8f34710435c18616e443d9ea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Fix gcc warnings

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/episode1.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/menus.cpp
    engines/chewy/movclass.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index cedce19772b..868e265f510 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -431,7 +431,7 @@ void datei::load_korrektur(const char *fname, int16 *sp) {
 				id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
 					f.seek(-((int)(header->count * sizeof(int16) * 2) * header->korrekt), SEEK_END);
-					if ((f.size() - f.pos() / 2) < (header->count * sizeof(int16) * 2)) {
+					if ((f.size() - f.pos() / 2) < (int16)(header->count * sizeof(int16) * 2)) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					} else {
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 923773e2709..ee157f610d2 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -1104,7 +1104,7 @@ void r3_sonde_aufnahme() {
 	int16 i;
 	int16 spr_nr;
 	int16 anistart;
-	room_detail_info *rdi;
+//	room_detail_info *rdi;
 
 	MovLine sonde_mpkt1[2] = {
 		{ { 237,  52, 160 }, 0, 2 },
@@ -1125,7 +1125,7 @@ void r3_sonde_aufnahme() {
 	};
 	flags.AniUserAction = false;
 	hide_cur();
-	rdi = det->get_room_detail_info();
+	/*rdi = */(void)det->get_room_detail_info();
 	tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	anistart = false;
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 648bc303cd2..4a42774851b 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -413,7 +413,7 @@ void option_menue(taf_info *ti) {
 	int16 tdisp_count;
 	int16 rect;
 	long akt_clock = 0, stop_clock = 0;
-	int16 TmpFrame;
+	//int16 TmpFrame;
 	int16 delay_count;
 	short bar_off;
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0);
@@ -441,7 +441,7 @@ void option_menue(taf_info *ti) {
 		++FrameSpeed;
 		warning("akt_clock = clock() / CLK_TCK;");
 		if (akt_clock >= stop_clock) {
-			TmpFrame = FrameSpeed;
+			//TmpFrame = FrameSpeed;
 			_G(spieler).DelaySpeed = (FrameSpeed >> 1) / _G(spieler).FramesPerSecond;
 
 			FrameSpeed = 0;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 9b015aac030..1366cc92846 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -124,7 +124,7 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	size_t tmp_size;
 	char key;
 	float start, ende;
-	bool trace_mode;
+	//bool trace_mode;
 
 	load_puffer = load_p;
 	virt_screen = vscreen + 4;
@@ -132,7 +132,7 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 		if (flic_header.type == FLC) {
 
 			key = 0;
-			trace_mode = false;
+			//trace_mode = false;
 			fade_flag = false;
 			fade_delay = 0;
 			cls_flag = false;
@@ -398,7 +398,8 @@ void flic::delta_chunk_byte(byte *tmp) {
 }
 
 int flic::custom_play(CustomInfo *ci) {
-	uint16 i, ret = 0;
+	uint16 i;
+	int16 ret = 0;
 	char key;
 	uint32 start, ende;
 	bool trace_mode;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index b05c3cc4190..680fccc9372 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -532,7 +532,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		ende = 1;
 	while (!ende) {
 
-		rect = in->maus_vector(minfo.x, minfo.y, (int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 		if (minfo.button) {
 			if (minfo.button == 2) {
 				if (!maus_flag)
@@ -642,16 +642,15 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 }
 
 void look_invent_screen(int16 txt_mode, int16 txt_nr) {
-	char *str_adr;
+	//char *str_adr;
 	int16 ok;
 	int16 m_mode = 0;
-	int16 action_flag;
+	//int16 action_flag;
 	if (!flags.AtsAction) {
-		str_adr = 0;
+		//str_adr = 0;
 		if (txt_nr != -1) {
 
 			switch (txt_mode) {
-
 			case INVENTAR_NORMAL:
 			case INVENTAR_STATIC:
 				ok = true;
@@ -679,10 +678,10 @@ void look_invent_screen(int16 txt_mode, int16 txt_nr) {
 
 				}
 
-				action_flag = 0 ;
+				//action_flag = 0;
 				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
-					action_flag = 1;
+					//action_flag = 1;
 				}
 				if (ok) {
 					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);
@@ -692,9 +691,10 @@ void look_invent_screen(int16 txt_mode, int16 txt_nr) {
 					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
 				if (menu_item == CUR_USE)
 					flags.StaticUseTxt = true;
-
 				break;
 
+			default:
+				break;
 			}
 		}
 	}
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 6f8e8a7aa80..afcf1dbd3f2 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -59,7 +59,7 @@ movclass::~movclass() {
 void movclass::goto_xy(GotoPkt *gp) {
 	int16 start_feld;
 	int16 ziel_feld;
-	int16 anz;
+	//int16 anz;
 	int16 tmp;
 	gpkt = gp;
 	agv.AutoGo = false;
@@ -72,7 +72,7 @@ void movclass::goto_xy(GotoPkt *gp) {
 	start_feld = get_feld_nr(gpkt->Sx, gpkt->Sy);
 	ziel_feld = get_feld_nr(gpkt->Dx, gpkt->Dy);
 	tmp = ziel_feld;
-	anz = calc_go(start_feld, &ziel_feld);
+	/*anz = */calc_go(start_feld, &ziel_feld);
 
 	if (tmp != ziel_feld) {
 		get_mov_line();
@@ -528,7 +528,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 
 	int16 ok;
 	int16 k;
-	int16 found_min;
+	//int16 found_min;
 	int16 TmpKnPkt[MAX_KNOTEN_PKT];
 	int16 min_step_unerreicht;
 	int16 dir_unerreicht = 0;
@@ -561,7 +561,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 		tbl_ptr = 0;
 		knoten_flag = 0;
 
-		found_min = 0;
+		//found_min = 0;
 		dir = 30000;
 		while (!found) {
 			tmp_feld = ziel_feld;
@@ -672,7 +672,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 					tbl_dir = -1;
 					tbl_ptr = 3;
 					dir = 30000;
-					found_min = 0;
+					//found_min = 0;
 					calc_feld = start_feld;
 					last_feld = start_feld;
 				} else {


Commit: f25d952802bea925a1689564a7ea377487acc40b
    https://github.com/scummvm/scummvm/commit/f25d952802bea925a1689564a7ea377487acc40b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Further gcc warning fix

Changed paths:
    engines/chewy/flic.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 1366cc92846..43a496f0d6e 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -402,7 +402,7 @@ int flic::custom_play(CustomInfo *ci) {
 	int16 ret = 0;
 	char key;
 	uint32 start, ende;
-	bool trace_mode;
+	//bool trace_mode;
 
 	Cinfo = ci;
 	load_puffer = ci->TempArea;
@@ -419,7 +419,7 @@ int flic::custom_play(CustomInfo *ci) {
 		if (custom_header.load(rs)) {
 			if (!scumm_strnicmp(custom_header.id, "CFO\0", 4)) {
 				key = 0;
-				trace_mode = false;
+				//trace_mode = false;
 
 				cls_flag = false;
 				fade_flag = false;


Commit: ddd0c298f49e7f1666fa7ad8a6d5f3eb238f921a
    https://github.com/scummvm/scummvm/commit/ddd0c298f49e7f1666fa7ad8a6d5f3eb238f921a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Change mallocs to a wrapper that initializes the memory

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/detail.cpp
    engines/chewy/effect.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/memory.cpp
    engines/chewy/room.cpp
    engines/chewy/sound.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index e215fae0926..5ca22860e07 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -337,7 +337,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
-					inv_use_mem = (char *)malloc(Ch.size + 3l);
+					inv_use_mem = (char *)MALLOC(Ch.size + 3l);
 					if (!modul) {
 						if (Ch.size) {
 							if (!rs->read(inv_use_mem, Ch.size)) {
@@ -378,7 +378,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 				break;
 
 			case INV_IDX_DATEI:
-				atdsmem[INV_IDX_HANDLE] = (char *)malloc(INV_STRC_ANZ * sizeof(InvUse));
+				atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
 				break;
 
 			default:
@@ -414,7 +414,7 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	tmp_adr = NULL;
 	size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
 	if (size) {
-		tmp_adr = (char *)malloc(size + 3l);
+		tmp_adr = (char *)MALLOC(size + 3l);
 	}
 
 	return tmp_adr;
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 347fb908c14..ffa2386489e 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -282,11 +282,11 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 	mem->file->get_tafinfo(fname_, &tafheader);
 	if (!modul) {
 		anz = tafheader->count;
-		tmp = (char *)malloc((int32)anz * 4l + sizeof(taf_info));
+		tmp = (char *)MALLOC((int32)anz * 4l + sizeof(taf_info));
 		if (!modul) {
 			Tt = (taf_info *)tmp;
 			Tt->anzahl = anz;
-			Tt->korrektur = (int16 *)malloc((int32)Tt->anzahl * 4l);
+			Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 4l);
 			if (!modul) {
 				mem->file->load_korrektur(fname_, Tt->korrektur);
 				Tt->palette = 0;
@@ -355,7 +355,7 @@ void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info
 		if (iheader.load(rs)) {
 			if (!Tt->image[spr_nr + i]) {
 				size = iheader.width * iheader.height ;
-				Tt->image[spr_nr + i] = (byte *)malloc(size + 4l);
+				Tt->image[spr_nr + i] = (byte *)MALLOC(size + 4l);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index fc4073e5305..dd23fc8fa8f 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -37,7 +37,7 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 	int16 *rnd_zeiger;
 	int16 i, x, y;
 	byte *sp;
-	sp = (byte *)malloc(8 * 8 + 4);
+	sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!modul) {
 		rnd_zeiger = (int16 *)rnd_speicher;
 		if (col < 256) {
@@ -74,7 +74,7 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 	int16 i;
 	int16 x, y, x1, y1;
 	byte *sp;
-	sp = (byte *)malloc(8 * 8 + 4);
+	sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!modul) {
 		i = 0;
 		if (col < 256) {
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index d75cd240827..c46c47ba3b7 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -257,7 +257,7 @@ void new_game() {
 	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 	ERROR
 
-	tmp = (byte *)malloc(ROOM_ATS_MAX);
+	tmp = (byte *)MALLOC(ROOM_ATS_MAX);
 	ERROR
 
 	Common::File f;
@@ -278,7 +278,7 @@ void new_game() {
 		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
-	tmp = (byte *)malloc(MAX_MOV_OBJ);
+	tmp = (byte *)MALLOC(MAX_MOV_OBJ);
 	ERROR
 
 	if (f.open(INV_ATS_STEUER)) {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index bcb22fb05f3..eed6a84de64 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -98,24 +98,24 @@ void game_main() {
 }
 
 void alloc_buffers() {
-	workpage = (byte *)malloc(64004l);
+	workpage = (byte *)MALLOC(64004l);
 	ERROR
-	pal = (byte *)malloc(768l);
+	pal = (byte *)MALLOC(768l);
 	ERROR
-	cur_back = (byte *)malloc(16 * 16 + 4);
+	cur_back = (byte *)MALLOC(16 * 16 + 4);
 	ERROR;
 	Ci.VirtScreen = workpage;
-	Ci.TempArea = (byte *)malloc(64004l);
+	Ci.TempArea = (byte *)MALLOC(64004l);
 	ERROR;
 	det->set_taf_ani_mem(Ci.TempArea);
-	Ci.MusicSlot = (byte *)malloc(MUSIC_SLOT_SIZE);
+	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
 	ERROR;
-	Ci.SoundSlot = (byte *)malloc(SOUND_SLOT_SIZE);
+	Ci.SoundSlot = (byte *)MALLOC(SOUND_SLOT_SIZE);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
 	ERROR;
 	Ci.Fname = fname;
-	SpeechBuf[0] = (byte *)malloc(SPEECH_HALF_BUF * 2);
+	SpeechBuf[0] = (byte *)MALLOC(SPEECH_HALF_BUF * 2);
 	ERROR
 	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
 }
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 9a68f86973f..939a5535b58 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -22,6 +22,7 @@
 
 #include "common/memstream.h"
 #include "chewy/memory.h"
+#include "chewy/types.h"
 
 namespace Chewy {
 
@@ -50,7 +51,7 @@ taf_info *memory::taf_adr(const char *filename) {
 		anz_image = tafheader->count;
 		kgroesse = ((uint32)anz_image) * sizeof(byte *);
 
-		tmp1 = (byte *)calloc(size + 768l + kgroesse, 1);
+		tmp1 = (byte *)MALLOC(size + 768l + kgroesse);
 		if (!modul) {
 			tinfo = (taf_info *)tmp1;
 			tinfo->palette = tmp1 + size;
@@ -112,7 +113,7 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 					size += image_anz * 4l;
 					size += image_anz * sizeof(char *);
 					size += ((uint32)sizeof(taf_seq_info));
-					tmp1 = (byte *)malloc(size + image_anz * 4l);
+					tmp1 = (byte *)MALLOC(size + image_anz * 4l);
 					if (!modul) {
 						ts_info = (taf_seq_info *)tmp1;
 						ts_info->anzahl = image_anz;
@@ -176,7 +177,7 @@ void memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
 	if (!modul) {
-		*speicher = (byte *)malloc(size);
+		*speicher = (byte *)MALLOC(size);
 		if (*speicher) {
 			file->load_tff(filename, *speicher);
 			if (modul) {
@@ -196,7 +197,7 @@ byte *memory::void_adr(const char *filename) {
 	size = file->size(filename, 200);
 
 	if (!modul) {
-		ptr = (byte *)malloc(size * sizeof(uint32));
+		ptr = (byte *)MALLOC(size * sizeof(uint32));
 		if (!modul) {
 			*(uint32 *)ptr = size;
 			file->void_load(filename, ptr + sizeof(uint32), size);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index b52d8123a34..46d346f25e5 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -122,7 +122,7 @@ void Room::load_taf(const char *filename, byte **speicher, byte *palette, int16
 		imagesize[sprnr] = 0l;
 		mem->file->imsize(filename, imagesize);
 		if (!modul) {
-			*speicher = (byte *)malloc((imagesize[sprnr]) + 4l);
+			*speicher = (byte *)MALLOC((imagesize[sprnr]) + 4l);
 			if (!modul) {
 				mem->file->load_tafmcga(filename, *speicher, sprnr);
 			}
@@ -301,9 +301,9 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 void Room::init_ablage() {
 	int16 i;
 	LastAblageSave = 0;
-	Ablage[0] = (byte *)malloc(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
-	AblagePal[0] = (byte *)malloc(MAX_ABLAGE * 768l);
-	GedMem[0] = (byte *)malloc(MAX_ABLAGE * GED_BLOCK_SIZE);
+	Ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
+	AblagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
+	GedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
 	if (!modul) {
 		AkAblage = 0;
 		for (i = 0; i < MAX_ABLAGE; i++) {
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 9a7075b1fbb..6d2647acec8 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -26,6 +26,7 @@
 #include "common/system.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
+#include "chewy/types.h"
 
 namespace Chewy {
 
@@ -42,7 +43,7 @@ Sound::~Sound() {
 
 void Sound::playSound(int num, bool loop, uint channel) {
 	SoundChunk *sound = _soundRes->getSound(num);
-	uint8 *data = (uint8 *)malloc(sound->size);
+	uint8 *data = (uint8 *)MALLOC(sound->size);
 	memcpy(data, sound->data, sound->size);
 
 	playSound(data, sound->size, loop, channel);
@@ -112,7 +113,7 @@ void Sound::playMusic(uint8 *data, uint32 size, bool loop, DisposeAfterUse::Flag
 
 	warning("The current music playing implementation is wrong");
 	modSize = size;
-	modData = (uint8 *)malloc(modSize);
+	modData = (uint8 *)MALLOC(modSize);
 	memcpy(modData, data, size);
 
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
@@ -146,7 +147,7 @@ void Sound::setMusicVolume(uint volume) {
 
 void Sound::playSpeech(int num) {
 	SoundChunk *sound = _speechRes->getSound(num);
-	uint8 *data = (uint8 *)malloc(sound->size);
+	uint8 *data = (uint8 *)MALLOC(sound->size);
 	memcpy(data, sound->data, sound->size);
 
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
@@ -190,7 +191,7 @@ void Sound::convertTMFToMod(uint8 *tmfData, uint32 tmfSize, uint8 *modData, uint
 	const int maxInstruments = 31;
 
 	modSize = tmfSize + 20 + maxInstruments * 22 + 4;
-	modData = (uint8 *)malloc(modSize);
+	modData = (uint8 *)MALLOC(modSize);
 	uint8 *tmfPtr = tmfData;
 	uint8 *modPtr = modData;
 
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 7968f548323..f7f6125e352 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "chewy/types.h"
+#include "common/algorithm.h"
 
 namespace Chewy {
 
@@ -156,4 +157,10 @@ bool Spieler::synchronize(Common::Serializer &s) {
 	return true;
 }
 
+void *MALLOC(size_t size) {
+	void *ret = malloc(size);
+	Common::fill((byte *)ret, (byte *)ret + size, 0);
+	return ret;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index a823a2e0f27..d753d8b0ead 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -573,6 +573,8 @@ struct Flags {
 	uint16 CursorStatus : 1;
 };
 
+extern void *MALLOC(size_t size);
+
 } // namespace Chewy
 
 #endif


Commit: 81991ab9e36ed01bdb1055bd2a1c797dec7c6f2c
    https://github.com/scummvm/scummvm/commit/81991ab9e36ed01bdb1055bd2a1c797dec7c6f2c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Fix dereferencing null pointer

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index c46c47ba3b7..d646b626972 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -68,6 +68,10 @@ void standard_init() {
 	curblk.xsize = 16;
 	curblk.ysize = 16;
 
+	// WORKAROUND: Moved from init_load because the original
+	// uses curtaf->image below before curtaf was initialized
+	curtaf = mem->taf_adr(CURSOR);
+
 	curblk.sprite = curtaf->image;
 	curblk.cur_back = cur_back;
 	curblk.no_back = true;
@@ -345,9 +349,6 @@ void init_load() {
 	spz_tinfo = 0;
 	set_spz_delay(3);
 
-	curtaf = mem->taf_adr(CURSOR);
-	ERROR
-
 	menutaf = mem->taf_adr(MENUTAF);
 	ERROR
 	mem->file->get_tafinfo(MENUTAF, &tafheader);


Commit: e2400e81fbb88ce049be521f9cb5e9a22071fd14
    https://github.com/scummvm/scummvm/commit/e2400e81fbb88ce049be521f9cb5e9a22071fd14
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Change structures from using variable length arrays

The original used a variable length array at the end of
structures. But since that trips up memory overrun checks,
I've changed them to being a raw pointer that points to
just after the structure instead.

Also changed some hardcoded values of 4 bytes for pointers
to be a proper sizeof(pointer)

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/memory.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index ffa2386489e..67ea63af25c 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -273,20 +273,22 @@ void detail::load_taf_tbl(taf_info *fti) {
 taf_info *detail::init_taf_tbl(const char *fname_) {
 	taf_dateiheader *tafheader;
 	taf_info *Tt;
-	char *tmp;
+	byte *tmp;
 	int16 anz;
-	int16 i;
 
 	Tt = 0;
 
 	mem->file->get_tafinfo(fname_, &tafheader);
 	if (!modul) {
 		anz = tafheader->count;
-		tmp = (char *)MALLOC((int32)anz * 4l + sizeof(taf_info));
+		tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
+
 		if (!modul) {
 			Tt = (taf_info *)tmp;
 			Tt->anzahl = anz;
 			Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 4l);
+			Tt->image = (byte **)(tmp + sizeof(taf_info));
+
 			if (!modul) {
 				mem->file->load_korrektur(fname_, Tt->korrektur);
 				Tt->palette = 0;
@@ -297,8 +299,6 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 					modul = DATEI;
 					fcode = OPENFEHLER;
 				}
-				for (i = 0; i < Tt->anzahl; i++)
-					Tt->image[i] = 0;
 			}
 		}
 	}
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 939a5535b58..6d65f5e8e71 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -51,9 +51,10 @@ taf_info *memory::taf_adr(const char *filename) {
 		anz_image = tafheader->count;
 		kgroesse = ((uint32)anz_image) * sizeof(byte *);
 
-		tmp1 = (byte *)MALLOC(size + 768l + kgroesse);
+		tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
 		if (!modul) {
 			tinfo = (taf_info *)tmp1;
+			tinfo->image = (byte **)(tmp1 + sizeof(taf_info));
 			tinfo->palette = tmp1 + size;
 			tinfo->anzahl = anz_image;
 			file->load_palette(filename, tinfo->palette, TAFDATEI);
@@ -110,13 +111,15 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 					}
 				}
 				if (!modul) {
-					size += image_anz * 4l;
+					size += image_anz * sizeof(byte *);
 					size += image_anz * sizeof(char *);
 					size += ((uint32)sizeof(taf_seq_info));
-					tmp1 = (byte *)MALLOC(size + image_anz * 4l);
+					tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
+
 					if (!modul) {
 						ts_info = (taf_seq_info *)tmp1;
 						ts_info->anzahl = image_anz;
+						ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
 						ts_info->korrektur = (int16 *)(tmp1 + size);
 						rs->seek(ptr, SEEK_SET);
 						sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 5807a7dc86e..b16413565b5 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -93,13 +93,13 @@ struct taf_info {
 	int16 anzahl = 0;
 	byte *palette = nullptr;
 	int16 *korrektur = nullptr;
-	byte *image[1];		// variable size
+	byte **image = nullptr;
 };
 
 struct taf_seq_info {
 	int16 anzahl = 0;
 	int16 *korrektur = nullptr;
-	byte *image[1];		// variable size
+	byte **image = nullptr;
 };
 
 struct NewPhead {


Commit: b772628e9c26181cf6a6e57e22d74d8b906b320a
    https://github.com/scummvm/scummvm/commit/b772628e9c26181cf6a6e57e22d74d8b906b320a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Further startup initialization

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/detail.cpp
    engines/chewy/maus.h
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index b1b780de134..02cf5345f5e 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -641,7 +641,7 @@ void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
 }
 
 void ailclass::serve_db_samples() {
-	warning("STUB: ailclass::serve_db_samples()");
+	debug(1, "STUB: ailclass::serve_db_samples()");
 
 #if 0
 	int16 i;
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 5ca22860e07..3cc337d71d3 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -337,7 +337,9 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
+					free(inv_use_mem);
 					inv_use_mem = (char *)MALLOC(Ch.size + 3l);
+
 					if (!modul) {
 						if (Ch.size) {
 							if (!rs->read(inv_use_mem, Ch.size)) {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 67ea63af25c..35e4abd167d 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -286,7 +286,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 		if (!modul) {
 			Tt = (taf_info *)tmp;
 			Tt->anzahl = anz;
-			Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 4l);
+			Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
 			Tt->image = (byte **)(tmp + sizeof(taf_info));
 
 			if (!modul) {
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index c6310687c81..85c04c57b4d 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -81,10 +81,11 @@ public:
 
 	in_zeiger *get_in_zeiger();
 	int16 get_switch_code();
-	int16 hot_key;
+
+	int16 hot_key = 0;
 private:
-	maus_info *maus_info_blk;
-	kb_info *kb_info_blk;
+	maus_info *maus_info_blk = nullptr;
+	kb_info *kb_info_blk = nullptr;
 	in_zeiger inzeig;
 };
 
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index afcf1dbd3f2..44acb207b78 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -718,6 +718,7 @@ void movclass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 	int16 tmp;
 	int16 absx, absy, absz;
 	int16 x, y, z, x1, y1, z1;
+
 	if (vorschub > 0) {
 		x = xyz[0];
 		y = xyz[1];
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 5746fea33d4..655dea10955 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -35,77 +35,76 @@ namespace Chewy {
 #define MLE_LEFT 3
 
 struct MovInfo {
-	int16 XyzStart[3];
-	int16 XyzEnd[3];
-
-	int16 HotX;
-	int16 HotY;
-	int16 HotMovX;
-	int16 HotMovY;
-	int16 Vorschub;
-	int16 Delay;
-	uint8 Id;
-
-	uint8 Mode;
+	int16 XyzStart[3] = { 0 };
+	int16 XyzEnd[3] = { 0 };
+
+	int16 HotX = 0;
+	int16 HotY = 0;
+	int16 HotMovX = 0;
+	int16 HotMovY = 0;
+	int16 Vorschub = 0;
+	int16 Delay = 0;
+	uint8 Id = 0;
+
+	uint8 Mode = 0;
 };
 
 struct ObjMov {
-	int16 Xypos[3];
-	int16 Xyvo [3];
-	int16 Xyna [3][2];
-	int16 Count;
+	int16 Xypos[3] = { 0 };
+	int16 Xyvo [3] = { 0 };
+	int16 Xyna [3][2] = { 0 };
+	int16 Count = 0;
 
-	int16 Delay;
+	int16 Delay = 0;
 
-	int16 DelayCount;
+	int16 DelayCount = 0;
 
-	int16 Phase;
-	int16 PhNr;
-	int16 PhAnz;
-	int16 Xzoom;
-	int16 Yzoom;
-	int16 StNr;
+	int16 Phase = 0;
+	int16 PhNr = 0;
+	int16 PhAnz = 0;
+	int16 Xzoom = 0;
+	int16 Yzoom = 0;
+	int16 StNr = 0;
 };
 
 struct GotoPkt {
-	int16 Sx;
-	int16 Sy;
-	int16 Dx;
-	int16 Dy;
-	byte *Mem;
-	int16 Breite;
-	int16 Hoehe;
-	int16 Ebenen;
-	int16 AkMovEbene;
-	int16 Vorschub;
+	int16 Sx = 0;
+	int16 Sy = 0;
+	int16 Dx = 0;
+	int16 Dy = 0;
+	byte *Mem = nullptr;
+	int16 Breite = 0;
+	int16 Hoehe = 0;
+	int16 Ebenen = 0;
+	int16 AkMovEbene = 0;
+	int16 Vorschub = 0;
 };
 
 struct GotoMovLine {
-	int16 GotoFeld;
-
-	int16 MLineFeld;
+	int16 GotoFeld = 0;
+	int16 MLineFeld = 0;
 };
 
 struct MovLineExit {
-	int16 Steps;
-	int16 Direction;
-	int16 FNr;
-	int16 KnPkt[MAX_KNOTEN_PKT];
+	int16 Steps = 0;
+	int16 Direction = 0;
+	int16 FNr = 0;
+	int16 KnPkt[MAX_KNOTEN_PKT] = { 0 };
 };
 
 struct AutoGoVar {
-	bool AutoGo;
-	bool Continue;
+	bool AutoGo = false;
+	bool Continue = false;
 
-	int16 PktAnz;
+	int16 PktAnz = 0;
 
-	int16 Start;
-	int16 X_End;
-	int16 Y_End;
-	int16 LastFeld;
+	int16 Start = 0;
+	int16 X_End = 0;
+	int16 Y_End = 0;
+	int16 LastFeld = 0;
 
-	int16 AkFeld;
-	int16 AkKnoten;
+	int16 AkFeld = 0;
+	int16 AkKnoten = 0;
 };
 
 class movclass {
@@ -127,12 +126,13 @@ private:
 	int16 calc_go(int16 src_feld, int16 *dst_feld);
 	void get_mov_line();
 	void calc_mov_line_xit(int16 start_feld);
-	int16 feld1knoten;
-	int16 plot_delay;
+
+	int16 feld1knoten = 0;
+	int16 plot_delay = 0;
 	AutoGoVar agv;
 	MovLineExit mle;
 	GotoMovLine gml;
-	GotoPkt *gpkt;
+	GotoPkt *gpkt = nullptr;
 };
 
 } // namespace Chewy


Commit: aff7ddf3e7c1fbc9966dc0cdfddee38d1c8ac023
    https://github.com/scummvm/scummvm/commit/aff7ddf3e7c1fbc9966dc0cdfddee38d1c8ac023
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:17-08:00

Commit Message:
CHEWY: Fix memory leak

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/inits.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 3cc337d71d3..466485d0663 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -81,6 +81,7 @@ atdsys::atdsys() {
 	inv_block_nr = -1;
 	inv_use_mem = nullptr;
 	inzeig = in->get_in_zeiger();
+
 	for (i = 0; i < MAX_HANDLE; i++) {
 		atdshandle[i] = 0;
 		atdsmem[i] = 0;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index d646b626972..70a165aa417 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -206,6 +206,15 @@ void init_room() {
 void init_atds() {
 	int16 i;
 
+	// Close any prior handles
+	atds->close_handle(AAD_DATEI);
+	atds->close_handle(ATS_DATEI);
+	atds->close_handle(ADS_DATEI);
+	atds->close_handle(INV_USE_DATEI);
+	atds->close_handle(INV_ATS_DATEI);
+	atds->close_handle(ATDS_HANDLE);
+
+	// New set up
 	Stream *handle = atds->pool_handle(ATDS_TXT, "rb");
 	ERROR
 	atds->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);


Commit: 00f202c4566eaf17e586f7ab93d79a6d4b31760b
    https://github.com/scummvm/scummvm/commit/00f202c4566eaf17e586f7ab93d79a6d4b31760b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Constifying source arrays in palette calls

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index eed6a84de64..207e1782ef2 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1152,7 +1152,7 @@ void swap_if_l(int16 *x1, int16 *x2) {
 	}
 }
 
-void palcopy(byte *dipal, byte *sipal, int16 distart,
+void palcopy(byte *dipal, const byte *sipal, int16 distart,
              int16 sistart, int16 anz) {
 	int16 i, j;
 	j = sistart;
@@ -1165,7 +1165,7 @@ void palcopy(byte *dipal, byte *sipal, int16 distart,
 }
 
 void check_shad(int16 g_idx, int16 mode) {
-	static uint8 pal_0[] = {
+	static const uint8 PAL_0[] = {
 		0, 0, 0,
 		39, 0, 26,
 		43, 0, 29,
@@ -1179,7 +1179,7 @@ void check_shad(int16 g_idx, int16 mode) {
 		63, 12, 46,
 		63, 24, 50
 	};
-	static uint8 pal_1[] = {
+	static const uint8 PAL_1[] = {
 		0, 0, 0,
 		34, 0, 21,
 		38, 0, 24,
@@ -1195,7 +1195,7 @@ void check_shad(int16 g_idx, int16 mode) {
 		58, 7, 41,
 		58, 19, 45
 	};
-	static uint8 pal_2[] = {
+	static const uint8 PAL_2[] = {
 		0, 0, 0,
 		26, 0, 13,
 		30, 0, 16,
@@ -1211,7 +1211,7 @@ void check_shad(int16 g_idx, int16 mode) {
 		50, 0, 33,
 		50, 11, 37
 	};
-	static uint8 pal_3[] = {
+	static const uint8 PAL_3[] = {
 		0, 0, 0,
 		21, 3, 8,
 		25, 3, 11,
@@ -1232,26 +1232,26 @@ void check_shad(int16 g_idx, int16 mode) {
 		switch (g_idx) {
 		case 4:
 			if (mode)
-				out->set_teilpalette((byte *)pal_0, 1, 11);
-			palcopy(pal, (byte *)pal_0, 0, 0, 12);
+				out->set_teilpalette(PAL_0, 1, 11);
+			palcopy(pal, PAL_0, 0, 0, 12);
 			break;
 
 		case 1:
 			if (mode)
-				out->set_teilpalette((byte *)pal_1, 1, 11);
-			palcopy(pal, (byte *)pal_1, 0, 0, 12);
+				out->set_teilpalette(PAL_1, 1, 11);
+			palcopy(pal, PAL_1, 0, 0, 12);
 			break;
 
 		case 2:
 			if (mode)
-				out->set_teilpalette((byte *)pal_2, 1, 11);
-			palcopy(pal, (byte *)pal_2, 0, 0, 12);
+				out->set_teilpalette(PAL_2, 1, 11);
+			palcopy(pal, PAL_2, 0, 0, 12);
 			break;
 
 		case 3:
 			if (mode)
-				out->set_teilpalette((byte *)pal_3, 1, 11);
-			palcopy(pal, (byte *)pal_3, 0, 0, 12);
+				out->set_teilpalette(PAL_3, 1, 11);
+			palcopy(pal, PAL_3, 0, 0, 12);
 			break;
 
 		}
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 9f8c03f5a47..3f654d6eeaf 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -39,7 +39,7 @@ void free_buffers();
 void plot_main_menu();
 void test_menu();
 void shading(int16 new_shad_nr);
-void palcopy(char *dipal, char *sipal, int16 distart,
+void palcopy(byte *dipal, const byte *sipal, int16 distart,
              int16 sistart, int16 anz);
 short calc_maus_txt(int16 x, int16 y, int16 mode);
 void calc_ani_timer();
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index dab967c914c..fac0427700c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -117,7 +117,7 @@ void rastercol(int16 color, int16 r, int16 g, int16 b) {
 	setScummVMPalette(&rgb[0], color, 1);
 }
 
-void set_palpart(byte *palette, int16 startcol, int16 anz) {
+void set_palpart(const byte *palette, int16 startcol, int16 anz) {
 	setScummVMPalette(palette, startcol, anz);
 }
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 03c7f8e7333..be376b19fae 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -45,7 +45,7 @@ void setpalette(const byte *palette);
 void save_palette(byte *pal);
 void restore_palette();
 void rastercol(int16 color, int16 r, int16 g, int16 b);
-void set_palpart(byte *palette, int16 startcol, int16 anz);
+void set_palpart(const byte *palette, int16 startcol, int16 anz);
 
 void clear_mcga();
 void setpixel_mcga(int16 x, int16 y, int16 farbe);
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 92941ccfaec..3377e32d437 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -325,7 +325,7 @@ void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frame
 	}
 }
 
-void mcga_grafik::set_teilpalette(byte *palette, int16 startcol, int16 anz) {
+void mcga_grafik::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
 	int16 i;
 	int16 k, endcol;
 	k = startcol * 3;
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 3b0d3509ebf..2a535f8b682 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -88,7 +88,7 @@ public:
 	               int16 frames);
 	void ausblenden(int16 frames);
 	void abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames);
-	void set_teilpalette(byte *palette, int16 startcol, int16 anz);
+	void set_teilpalette(const byte *palette, int16 startcol, int16 anz);
 
 	void cls();
 	void punkt(int16 xpos, int16 ypos, int16 farbn);


Commit: 90df5000e6be5dbdf6cc7bc5d51b43c225e53e17
    https://github.com/scummvm/scummvm/commit/90df5000e6be5dbdf6cc7bc5d51b43c225e53e17
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Fix updating palette for shadows handling

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index fac0427700c..b9a7c97a595 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -118,7 +118,7 @@ void rastercol(int16 color, int16 r, int16 g, int16 b) {
 }
 
 void set_palpart(const byte *palette, int16 startcol, int16 anz) {
-	setScummVMPalette(palette, startcol, anz);
+	setScummVMPalette(palette + startcol * 3, startcol, anz);
 }
 
 void clear_mcga() {


Commit: d7eda3abfe820e2a83cf39c40c9961a941bba5cc
    https://github.com/scummvm/scummvm/commit/d7eda3abfe820e2a83cf39c40c9961a941bba5cc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 207e1782ef2..141e59def16 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -638,8 +638,7 @@ void set_up_screen(SetupScreenMode mode) {
 						spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
 						spieler_mi[P_CHEWY].XyzEnd[0] = gpkt.Dx - spieler_mi[P_CHEWY].HotX;
 						spieler_mi[P_CHEWY].XyzEnd[1] = gpkt.Dy - spieler_mi[P_CHEWY].HotY;
-						mov->get_mov_vector((int16
-						                     *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
+						mov->get_mov_vector((int16 *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
 						get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 						spieler_vector[P_CHEWY].DelayCount = 0;
 						_G(auto_p_nr) = P_CHEWY;
@@ -696,8 +695,9 @@ void set_up_screen(SetupScreenMode mode) {
 					++_G(pfeil_ani);
 				else
 					_G(pfeil_ani) = 0;
-			} else
+			} else {
 				--_G(pfeil_delay);
+			}
 		}
 	}
 
@@ -1230,12 +1230,6 @@ void check_shad(int16 g_idx, int16 mode) {
 
 	if (flags.NoShad == false) {
 		switch (g_idx) {
-		case 4:
-			if (mode)
-				out->set_teilpalette(PAL_0, 1, 11);
-			palcopy(pal, PAL_0, 0, 0, 12);
-			break;
-
 		case 1:
 			if (mode)
 				out->set_teilpalette(PAL_1, 1, 11);
@@ -1254,6 +1248,14 @@ void check_shad(int16 g_idx, int16 mode) {
 			palcopy(pal, PAL_3, 0, 0, 12);
 			break;
 
+		case 4:
+			if (mode)
+				out->set_teilpalette(PAL_0, 1, 11);
+			palcopy(pal, PAL_0, 0, 0, 12);
+			break;
+
+		default:
+			break;
 		}
 	}
 }
@@ -2044,26 +2046,6 @@ void set_person_rnr() {
 	}
 }
 
-//FIXME - custom random
-#if 0
-int16 random(int16 start, int16 end) {
-	int16 r_val;
-	int16 step;
-	int16 anz;
-	++end;
-	anz = abs(start - end);
-	step = 32762 / anz;
-	r_val = rand();
-	r_val /= step;
-	if (start > end)
-		r_val += end;
-	else
-		r_val += start;
-
-	return r_val;
-}
-#endif
-
 int16 is_chewy_busy() {
 	int16 ret;
 	ret = true;
@@ -2082,6 +2064,7 @@ int16 is_chewy_busy() {
 			}
 		}
 	}
+
 	return ret;
 }
 


Commit: 647932d865468c6cec27cd7ecb7df457260730c2
    https://github.com/scummvm/scummvm/commit/647932d865468c6cec27cd7ecb7df457260730c2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Move vec_tbl to a field of movclass

Changed paths:
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h


diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 44acb207b78..d6ce5f32b20 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -49,10 +49,13 @@ namespace Chewy {
 #define MOV_X 1
 #define MOV_Y 2
 
-int16 vec_tbl[4] = { -40, 1, 40, -1};
-
 movclass::movclass() {
+	vec_tbl[0] = -40;
+	vec_tbl[1] = 1;
+	vec_tbl[2] = 40;
+	vec_tbl[3] = -1;
 }
+
 movclass::~movclass() {
 }
 
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 655dea10955..6f9d0bb0ed5 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -133,6 +133,7 @@ private:
 	MovLineExit mle;
 	GotoMovLine gml;
 	GotoPkt *gpkt = nullptr;
+	int16 vec_tbl[4];
 };
 
 } // namespace Chewy


Commit: 7447e9f360f979ab5ed3223ce588d33b88f23848
    https://github.com/scummvm/scummvm/commit/7447e9f360f979ab5ed3223ce588d33b88f23848
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Fix the array index formula for checking walkable areas

Damn this took a long time to figure out. The method wasn't
in the sources we were provided, so I manually reversed it.
Unfortunately, interleaving of operations in the method
resulting in me producing an incorrect formula that took
way too long to finally figure out.

Changed paths:
    engines/chewy/gedclass.cpp


diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index 45421bef699..d45dd9d0d0b 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -82,7 +82,7 @@ void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
 int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
 	int16 result = 0;
 	if (_gedUserFunc)
-		result = _gedUserFunc(speicher[((x / 8) * x_anz) + (y / 8)]);
+		result = _gedUserFunc(speicher[((y / 8) * x_anz) + (x / 8)]);
 
 	return result;
 }


Commit: 2d4bab1be041e4470dba208e4a98835cb628cc57
    https://github.com/scummvm/scummvm/commit/2d4bab1be041e4470dba208e4a98835cb628cc57
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:18-08:00

Commit Message:
CHEWY: Fix using monacle on book within inventory

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/events.cpp
    engines/chewy/events_base.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 4633291e5d6..bf3b5a83b99 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -40,6 +40,8 @@ namespace Chewy {
 #define SCREEN_HEIGHT 200
 
 #define SHOULD_QUIT g_engine->shouldQuit()
+#define SHOULD_QUIT_RETURN if (g_engine->shouldQuit()) return
+#define SHOULD_QUIT_RETURN0 if (g_engine->shouldQuit()) return 0
 
 struct ChewyGameDescription;
 class EventsManager;
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 398f4c5471e..3121a6384cc 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -56,7 +56,8 @@ void EventsManager::handleEvent(const Common::Event &event) {
 	if (event.type >= Common::EVENT_MOUSEMOVE &&
 		event.type <= Common::EVENT_MBUTTONUP)
 		handleMouseEvent(event);
-	else if (event.type == Common::EVENT_KEYDOWN)
+	else if (event.type == Common::EVENT_KEYDOWN ||
+			event.type == Common::EVENT_KEYUP)
 		handleKbdEvent(event);
 }
 
@@ -124,8 +125,9 @@ void EventsManager::handleKbdEvent(const Common::Event &event) {
 			_kbInfo->scan_code = event.kbd.keycode;
 			if (event.kbd.flags & Common::KBD_ALT)
 				_kbInfo->scan_code |= ALT;
-		} else {
-			_kbInfo->key_code = '\0';
+		} else if (event.type == Common::EVENT_KEYUP) {
+			if (event.kbd.ascii == _kbInfo->key_code)
+				_kbInfo->key_code = '\0';
 		}
 	}
 }
diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
index 25920c389a3..98fb7000b75 100644
--- a/engines/chewy/events_base.cpp
+++ b/engines/chewy/events_base.cpp
@@ -89,13 +89,11 @@ void EventsBase::processEvents() {
 			return;
 
 		case Common::EVENT_KEYDOWN:
+		case Common::EVENT_KEYUP:
 			MOUSE_MOVE;
 			handleEvent(e);
 			break;
 
-		case Common::EVENT_KEYUP:
-			break;
-
 		default:
 			if (e.type == Common::EVENT_MOUSEMOVE) {
 				// Mouse move events get cached so the engine isn't
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index a127600a857..67042fc2dcb 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -22,6 +22,7 @@
 
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/episode1.h"
 #include "chewy/episode2.h"
@@ -2081,9 +2082,14 @@ void calc_inv_use_txt(int16 test_nr) {
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->back2screen(workpage);
 
-		::error("TODO: Proper ScummVM loops below");
-		while (in->get_switch_code() != ESC);
-		while (in->get_switch_code() != 0);
+		while (in->get_switch_code() != ESC) {
+			g_events->update();
+			SHOULD_QUIT_RETURN;
+		}
+		while (in->get_switch_code() != 0) {
+			g_events->update();
+			SHOULD_QUIT_RETURN;
+		}
 
 		room->open_handle(EPISODE1, "rb", R_TGPDATEI);
 		ERROR


Commit: 78144eeae43c3c8bf5018d4872792f192d9bb078
    https://github.com/scummvm/scummvm/commit/78144eeae43c3c8bf5018d4872792f192d9bb078
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Split up Room0 class into it's own file

Changed paths:
  A engines/chewy/rooms/room0.cpp
  A engines/chewy/rooms/room0.h
  A engines/chewy/rooms/rooms.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index ee157f610d2..fc1bee8a2fd 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -25,31 +25,10 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/episode1.h"
+#include "chewy/rooms/rooms.h"
 
 namespace Chewy {
 
-#define VOR 0
-#define RUECK 1
-#define SCHLAUCH1 11
-#define SCHLAUCH2 38
-#define SCHLAUCH3 59
-#define KOPF1 39
-#define KOPF2 46
-#define KOPF3 48
-#define KLAPPE_SPRITE 5
-#define SCHLEIM_DETAIL 2
-#define CH_ZIEHT_SCHLEIM 3
-#define CH_BLITZ 8
-#define TUER_DETAIL 9
-#define KLAPPE_DETAIL 10
-#define SCHLAUCH_DETAIL 11
-#define CH_WIRFT_SCHLEIM 12
-#define CH_NACH_FUETTERN 13
-#define CH_WIRFT_KISSEN 14
-#define FUETTER_SCHLAUCH 15
-#define STERNE_STEHEN 16
-#define ANI_HIDE 0
-#define ANI_SHOW 1
 int16 e_streifen;
 
 void load_chewy_taf(int16 taf_nr) {
@@ -119,669 +98,6 @@ void load_chewy_taf(int16 taf_nr) {
 	}
 }
 
-void Room0::entry() {
-	if (is_cur_inventar(0) || _G(spieler).R0KissenWurf ||
-			obj->check_inventar(0))
-		det->hide_static_spr(6);
-
-	if (!flags.LoadGame) {
-		set_person_pos(150, 100, 0, 1);
-		_G(cur_hide_flag) = 0;
-		hide_cur();
-		_G(timer_nr)[0] = room->set_timer(255, 3);
-
-		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-#ifdef TODO_REENABLE
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(2, -1);
-#endif
-		show_cur();
-	}
-}
-
-bool Room0::getPillow() {
-	if (!_G(spieler).inv_cur) {
-		hide_cur();
-		flags.AutoAniPlay = true;
-		auto_move(1, 0);
-		start_spz_wait(13, 1, 0, 0);
-		invent_2_slot(0);
-		menu_item = 0;
-		cursor_wahl(0);
-		atds->set_steuer_bit(174, 1, 1);
-		det->hide_static_spr(6);
-
-		flags.AutoAniPlay = false;
-		show_cur();
-		return true;
-	}
-
-	return false;
-}
-
-bool Room0::pullSlime() {
-	if (!_G(spieler).inv_cur) {
-		hide_cur();
-		auto_move(2, 0);
-		_G(spieler).PersonHide[0] = 1;
-		start_detail_wait(3, 1, 0);
-		set_person_pos(222, 106, 0, 0);
-		_G(spieler).PersonHide[0] = 0;
-		invent_2_slot(1);
-		menu_item = 0;
-		cursor_wahl(0);
-		atds->set_steuer_bit(175, 1, 1);
-
-		flags.AutoAniPlay = false;
-		show_cur();
-		return true;
-	}
-
-	return false;
-}
-
-void Room0::auge_start(int16 mode) {
-	ani_detail_info *adi;
-	int16 ende;
-
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
-	if (!mode)
-		adi->ani_count = adi->start_ani;
-	else
-		adi->ani_count = 38;
-
-	if (!mode) {
-		ani_klappe_delay();
-	}
-
-	ende = 0;
-	flags.AniUserAction = true;
-
-	if (!mode) {
-		det->enable_sound(KLAPPE_DETAIL, 0);
-		det->disable_sound(KLAPPE_DETAIL, 1);
-		det->enable_sound(SCHLAUCH_DETAIL, 0);
-		det->disable_sound(SCHLAUCH_DETAIL, 2);
-	} else {
-		det->disable_sound(KLAPPE_DETAIL, 0);
-		det->enable_sound(KLAPPE_DETAIL, 1);
-		det->disable_sound(SCHLAUCH_DETAIL, 0);
-		det->enable_sound(SCHLAUCH_DETAIL, 2);
-	}
-
-	while (!ende) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
-		}
-		if (adi->ani_count == 38) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		}
-
-		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
-		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		calc_auge_click(3);
-		out->back2screen(workpage);
-
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			if (!mode) {
-				++adi->ani_count;
-				if (adi->ani_count > 38)
-					ende = 1;
-			} else {
-				--adi->ani_count;
-				if (adi->ani_count == adi->start_ani - 1)
-					ende = 1;
-			}
-		}
-	}
-
-	clear_prog_ani();
-	flags.AniUserAction = false;
-
-	if (mode) {
-		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
-		while (det->get_ani_status(KLAPPE_DETAIL))
-			set_ani_screen();
-	}
-}
-
-void Room0::auge_wait() {
-	ani_detail_info *adi;
-
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
-	adi->ani_count = 39;
-	adi->delay_count = 15;
-	flags.AniUserAction = true;
-
-	while (adi->ani_count < 46) {
-		clear_prog_ani();
-
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[2].ZEbene = 192;
-		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		calc_auge_click(2);
-		out->back2screen(workpage);
-
-		if (adi->delay_count > 0) {
-			--adi->delay_count;
-		} else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			++adi->ani_count;
-		}
-	}
-
-	flags.AniUserAction = false;
-	clear_prog_ani();
-}
-
-void Room0::calc_auge_click(int16 ani_nr) {
-	int16 anz;
-	int16 x, y;
-	int16 i;
-
-	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
-			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
-			if (str_ != 0) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
-				x = minfo.x;
-				y = minfo.y;
-				calc_txt_xy(&x, &y, str_, anz);
-				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
-			}
-		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(SCHLEIM_INV)) {
-				del_inventar(_G(spieler).AkInvent);
-				_G(spieler).R0SchleimWurf = 1;
-			} else if (is_cur_inventar(KISSEN_INV)) {
-
-				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
-			}
-		}
-	}
-}
-
-void Room0::auge_shoot() {
-	ani_detail_info *adi;
-	int16 ende;
-
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
-	adi->ani_count = 47;
-
-	ende = 0;
-	det->start_detail(CH_BLITZ, 1, VOR);
-
-	while (!ende) {
-		clear_prog_ani();
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-
-		if (adi->ani_count < 53) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		} else {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-			if (!det->get_ani_status(CH_BLITZ))
-				ende = 1;
-		}
-
-		set_up_screen(DO_SETUP);
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			++adi->ani_count;
-		}
-	}
-
-	det->start_detail(STERNE_STEHEN, 255, VOR);
-	clear_prog_ani();
-	spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-	spr_info[0].ZEbene = 190;
-	spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-	spr_info[1].ZEbene = 191;
-	spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-	spr_info[2].ZEbene = 192;
-
-	wait_show_screen(30);
-	clear_prog_ani();
-	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-}
-
-void Room0::auge_schleim_back() {
-	ani_detail_info *adi;
-	int16 ende;
-
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
-	adi->ani_count = 53;
-
-	ende = 0;
-	flags.AniUserAction = true;
-
-	while (!ende) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-
-		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
-		}
-		if (adi->ani_count == 61) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		}
-
-		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
-		set_ani_screen();
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			++adi->ani_count;
-			if (adi->ani_count == 77)
-				ende = 1;
-		}
-	}
-
-	flags.AniUserAction = false;
-	clear_prog_ani();
-}
-
-void Room0::ch_schleim_auge() {
-	ani_detail_info *adi;
-
-	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
-	adi->ani_count = adi->start_ani;
-	if (adi->load_flag) {
-		det->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
-	}
-
-	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
-		clear_prog_ani();
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-		spr_info[2].ZEbene = 192;
-		spr_info[3] = det->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
-		set_up_screen(DO_SETUP);
-
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			++adi->ani_count;
-		}
-	}
-
-	if (adi->load_flag) {
-		det->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
-	}
-
-	clear_prog_ani();
-	_G(spieler).PersonHide[P_CHEWY] = false;
-}
-
-void Room0::fuetter_start(int16 mode) {
-	ani_detail_info *adi;
-	int16 ende;
-
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
-	if (!mode)
-		adi->ani_count = adi->start_ani;
-	else
-		adi->ani_count = 135;
-
-	if (!mode) {
-		ani_klappe_delay();
-		det->enable_sound(KLAPPE_DETAIL, 0);
-		det->disable_sound(KLAPPE_DETAIL, 1);
-		det->enable_sound(FUETTER_SCHLAUCH, 0);
-		det->disable_sound(FUETTER_SCHLAUCH, 2);
-	} else {
-
-		det->disable_sound(KLAPPE_DETAIL, 0);
-		det->enable_sound(KLAPPE_DETAIL, 1);
-		det->disable_sound(FUETTER_SCHLAUCH, 0);
-		det->enable_sound(FUETTER_SCHLAUCH, 2);
-	}
-
-	ende = 0;
-	if (_G(spieler).R0SchleimWurf)
-		flags.AniUserAction = true;
-
-	while (!ende) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		if (flags.AniUserAction)
-			get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		if (!mode)
-			calc_kissen_click(1);
-
-		out->back2screen(workpage);
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			if (!mode) {
-				++adi->ani_count;
-				if (adi->ani_count > 135)
-					ende = 1;
-			} else {
-				--adi->ani_count;
-				if (adi->ani_count == adi->start_ani - 1)
-					ende = 1;
-			}
-		}
-	}
-
-	clear_prog_ani();
-	flags.AniUserAction = false;
-
-	if (mode) {
-		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
-		while (det->get_ani_status(KLAPPE_DETAIL))
-			set_ani_screen();
-
-	}
-}
-
-void Room0::kissen_wurf() {
-	for (int16 i = 0; i < 30 && !_G(spieler).R0KissenWurf; i++) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		calc_kissen_click(1);
-		out->back2screen(workpage);
-	}
-
-	clear_prog_ani();
-}
-
-void Room0::calc_kissen_click(int16 ani_nr) {
-	int16 anz;
-	int16 x, y;
-	int16 i;
-
-	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
-			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
-			if (str_ != 0) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
-				x = minfo.x;
-				y = minfo.y;
-				calc_txt_xy(&x, &y, str_, anz);
-				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
-			}
-		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SchleimWurf) {
-				del_inventar(_G(spieler).AkInvent);
-				_G(spieler).R0KissenWurf = 1;
-			} else if (is_cur_inventar(SCHLEIM_INV)) {
-				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATEI);
-			}
-		}
-	}
-}
-
-void Room0::ch_fuetter() {
-	ani_detail_info *adi;
-	int16 i;
-	int16 ende;
-
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
-	adi->ani_count = 136;
-
-	i = 152;
-	ende = 0;
-
-	if (_G(spieler).R0SchleimWurf)
-		flags.AniUserAction = true;
-	while (!ende) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		if (adi->ani_count == 136) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			if (!_G(spieler).R0SchleimWurf)
-				det->stop_detail(16);
-		}
-		if (adi->ani_count > 138) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
-		}
-		if (adi->ani_count > 141) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		}
-		if (adi->ani_count == 138) {
-			spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			spr_info[3].ZEbene = 193;
-		}
-
-		spr_info[4] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[4].ZEbene = 194;
-		set_ani_screen();
-
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			if (adi->ani_count > 141)
-				++i;
-			++adi->ani_count;
-			if (adi->ani_count == 152)
-				ende = 1;
-		}
-	}
-
-	adi->ani_count = 138;
-
-	ende = 0;
-	det->start_detail(CH_NACH_FUETTERN, 2, VOR);
-	while (!ende) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-
-		if (adi->ani_count > 138) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
-		}
-		if (adi->ani_count == 138) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		}
-
-		spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
-		set_ani_screen();
-
-		if (!det->get_ani_status(CH_NACH_FUETTERN))
-			ende = 1;
-		if (adi->delay_count > 0)
-			--adi->delay_count;
-		else {
-			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			if (adi->ani_count > 135)
-				--adi->ani_count;
-		}
-	}
-
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.AniUserAction = false;
-	clear_prog_ani();
-}
-
-void Room0::ch_kissen() {
-	ani_detail_info *adi;
-	int16 ende, mode;
-
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
-	adi->ani_count = 161;
-
-	ende = 0;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
-	mode = 0;
-
-	while (!ende) {
-		clear_prog_ani();
-		if (!det->get_ani_status(CH_WIRFT_KISSEN)) {
-			mode = 1;
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-		}
-
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		if (mode) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
-		}
-		set_up_screen(DO_SETUP);
-
-		if (mode) {
-			if (adi->delay_count > 0)
-				--adi->delay_count;
-			else {
-				adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-				--adi->ani_count;
-				if (adi->ani_count == 151)
-					ende = 1;
-			}
-		}
-	}
-
-	clear_prog_ani();
-}
-
-void Room0::ani_klappe_delay() {
-	int16 i;
-	det->start_detail(KLAPPE_DETAIL, 1, VOR);
-	while (det->get_ani_status(KLAPPE_DETAIL) && !SHOULD_QUIT) {
-		set_ani_screen();
-	}
-
-	flags.AniUserAction = true;
-	for (i = 0; i < 25; i++) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		set_ani_screen();
-	}
-
-	flags.AniUserAction = false;
-	clear_prog_ani();
-}
-
-void Room0::auge_ani() {
-	if (!_G(spieler).R0SchleimWurf) {
-		auge_start(0);
-		if (!_G(spieler).R0SchleimWurf)
-			auge_wait();
-		if (_G(spieler).R0SchleimWurf) {
-			start_aad(124);
-			ch_schleim_auge();
-			auge_schleim_back();
-			auto_move(FUETTER_POS, P_CHEWY);
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-		} else {
-			auge_shoot();
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-			auge_start(1);
-		}
-	}
-}
-
-void Room0::fuett_ani() {
-	int16 action;
-	action = false;
-	fuetter_start(0);
-
-	if (_G(spieler).R0SchleimWurf) {
-		kissen_wurf();
-		if (_G(spieler).R0KissenWurf) {
-			ch_kissen();
-			fuetter_start(1);
-			auto_move(VERSTECK_POS, P_CHEWY);
-			set_up_screen(DO_SETUP);
-			out->cls();
-			flic_cut(FCUT_001, CFO_MODE);
-
-			test_intro(1);
-			ERROR
-
-			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
-			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			ERROR
-			set_person_pos(Rdi->AutoMov[4].X - CH_HOT_MOV_X,
-			               Rdi->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
-			spieler_vector[P_CHEWY].DelayCount = 0;
-
-			check_shad(4, 0);
-			fx_blend = BLEND1;
-			set_up_screen(DO_SETUP);
-		} else {
-			action = true;
-		}
-	} else {
-		action = true;
-	}
-
-	if (action) {
-		ch_fuetter();
-		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
-		start_aad(55);
-		fuetter_start(1);
-	}
-}
-
 #define HAND_NORMAL 68
 #define HAND_CLICK 69
 #define RAHMEN_ROT 70
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 74cd92ec8f2..823ea3d9d0c 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -27,39 +27,6 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-class Room0 {
-private:
-	static void auge_start(int16 mode);
-
-	static void auge_wait();
-
-	static void auge_shoot();
-
-	static void auge_schleim_back();
-
-	static void ch_schleim_auge();
-
-	static void fuetter_start(int16 mode);
-
-	static void ch_fuetter();
-	static void ch_kissen();
-
-	static void kissen_wurf();
-
-	static void ani_klappe_delay();
-
-	static void calc_auge_click(int16 ani_nr);
-
-	static void calc_kissen_click(int16 ani_nr);
-public:
-	static void entry();
-
-	static void auge_ani();
-	static void fuett_ani();
-	static bool getPillow();
-	static bool pullSlime();
-};
-
 void r2_jump_out_r1(int16 nr);
 
 void r3_terminal();
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index a3e8b546cc1..a4b2db6aebb 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -49,7 +49,8 @@ MODULE_OBJS = \
 	text.o \
 	timer.o \
 	types.o \
-	video/cfo_decoder.o
+	video/cfo_decoder.o \
+	rooms/room0.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index edce7a53ea8..ec88dcc1551 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -25,6 +25,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
+#include "chewy/rooms/rooms.h"
 #include "chewy/episode1.h"
 #include "chewy/episode2.h"
 #include "chewy/episode3.h"
@@ -150,7 +151,7 @@ void timer_action(int16 t_nr) {
 							start_aad_wait(43, -1);
 					}
 
-					Room0::auge_ani();
+ 					Room0::eyeAnim();
 				} else if (!_G(spieler).R0KissenWurf) {
 					start_aad_wait(42, -1);
 					start_spz(2, 255, false, 0);
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
new file mode 100644
index 00000000000..3fef57d2386
--- /dev/null
+++ b/engines/chewy/rooms/room0.cpp
@@ -0,0 +1,718 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/room0.h"
+#include "chewy/rooms/rooms.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define KLAPPE_SPRITE 5
+#define SCHLEIM_DETAIL 2
+#define CH_ZIEHT_SCHLEIM 3
+#define CH_BLITZ 8
+#define TUER_DETAIL 9
+#define KLAPPE_DETAIL 10
+#define SCHLAUCH_DETAIL 11
+#define CH_WIRFT_SCHLEIM 12
+#define CH_NACH_FUETTERN 13
+#define CH_WIRFT_KISSEN 14
+#define FUETTER_SCHLAUCH 15
+#define STERNE_STEHEN 16
+#define VOR 0
+#define RUECK 1
+#define SCHLAUCH1 11
+#define SCHLAUCH2 38
+#define SCHLAUCH3 59
+#define KOPF1 39
+#define KOPF2 46
+#define KOPF3 48
+
+void Room0::entry() {
+	if (is_cur_inventar(0) || _G(spieler).R0KissenWurf ||
+			obj->check_inventar(0))
+		det->hide_static_spr(6);
+
+	if (!flags.LoadGame) {
+		set_person_pos(150, 100, 0, 1);
+		_G(cur_hide_flag) = 0;
+		hide_cur();
+		_G(timer_nr)[0] = room->set_timer(255, 3);
+
+		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+#ifdef TODO_REENABLE
+		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(2, -1);
+#endif
+		show_cur();
+	}
+}
+
+bool Room0::getPillow() {
+	if (!_G(spieler).inv_cur) {
+		hide_cur();
+		flags.AutoAniPlay = true;
+		auto_move(1, 0);
+		start_spz_wait(13, 1, 0, 0);
+		invent_2_slot(0);
+		menu_item = 0;
+		cursor_wahl(0);
+		atds->set_steuer_bit(174, 1, 1);
+		det->hide_static_spr(6);
+
+		flags.AutoAniPlay = false;
+		show_cur();
+		return true;
+	}
+
+	return false;
+}
+
+bool Room0::pullSlime() {
+	if (!_G(spieler).inv_cur) {
+		hide_cur();
+		auto_move(2, 0);
+		_G(spieler).PersonHide[0] = 1;
+		start_detail_wait(3, 1, 0);
+		set_person_pos(222, 106, 0, 0);
+		_G(spieler).PersonHide[0] = 0;
+		invent_2_slot(1);
+		menu_item = 0;
+		cursor_wahl(0);
+		atds->set_steuer_bit(175, 1, 1);
+
+		flags.AutoAniPlay = false;
+		show_cur();
+		return true;
+	}
+
+	return false;
+}
+
+void Room0::eyeStart(int16 mode) {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	if (!mode)
+		adi->ani_count = adi->start_ani;
+	else
+		adi->ani_count = 38;
+
+	if (!mode) {
+		ani_klappe_delay();
+	}
+
+	ende = 0;
+	flags.AniUserAction = true;
+
+	if (!mode) {
+		det->enable_sound(KLAPPE_DETAIL, 0);
+		det->disable_sound(KLAPPE_DETAIL, 1);
+		det->enable_sound(SCHLAUCH_DETAIL, 0);
+		det->disable_sound(SCHLAUCH_DETAIL, 2);
+	} else {
+		det->disable_sound(KLAPPE_DETAIL, 0);
+		det->enable_sound(KLAPPE_DETAIL, 1);
+		det->disable_sound(SCHLAUCH_DETAIL, 0);
+		det->enable_sound(SCHLAUCH_DETAIL, 2);
+	}
+
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count == 38) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+
+		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		calc_auge_click(3);
+		out->back2screen(workpage);
+
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			if (!mode) {
+				++adi->ani_count;
+				if (adi->ani_count > 38)
+					ende = 1;
+			} else {
+				--adi->ani_count;
+				if (adi->ani_count == adi->start_ani - 1)
+					ende = 1;
+			}
+		}
+	}
+
+	clear_prog_ani();
+	flags.AniUserAction = false;
+
+	if (mode) {
+		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
+		while (det->get_ani_status(KLAPPE_DETAIL))
+			set_ani_screen();
+	}
+}
+
+void Room0::auge_wait() {
+	ani_detail_info *adi;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 39;
+	adi->delay_count = 15;
+	flags.AniUserAction = true;
+
+	while (adi->ani_count < 46) {
+		clear_prog_ani();
+
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[2].ZEbene = 192;
+		get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		calc_auge_click(2);
+		out->back2screen(workpage);
+
+		if (adi->delay_count > 0) {
+			--adi->delay_count;
+		} else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			++adi->ani_count;
+		}
+	}
+
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void Room0::calc_auge_click(int16 ani_nr) {
+	int16 anz;
+	int16 x, y;
+	int16 i;
+
+	if (mouse_on_prog_ani() == ani_nr) {
+		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
+			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
+			if (str_ != 0) {
+				out->set_fontadr(font8x8);
+				out->set_vorschub(fvorx8x8, fvory8x8);
+				x = minfo.x;
+				y = minfo.y;
+				calc_txt_xy(&x, &y, str_, anz);
+				for (i = 0; i < anz; i++)
+					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+			}
+		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			if (is_cur_inventar(SCHLEIM_INV)) {
+				del_inventar(_G(spieler).AkInvent);
+				_G(spieler).R0SchleimWurf = 1;
+			} else if (is_cur_inventar(KISSEN_INV)) {
+
+				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
+			}
+		}
+	}
+}
+
+void Room0::auge_shoot() {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 47;
+
+	ende = 0;
+	det->start_detail(CH_BLITZ, 1, VOR);
+
+	while (!ende) {
+		clear_prog_ani();
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+
+		if (adi->ani_count < 53) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		} else {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+			if (!det->get_ani_status(CH_BLITZ))
+				ende = 1;
+		}
+
+		set_up_screen(DO_SETUP);
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			++adi->ani_count;
+		}
+	}
+
+	det->start_detail(STERNE_STEHEN, 255, VOR);
+	clear_prog_ani();
+	spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+	spr_info[0].ZEbene = 190;
+	spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+	spr_info[1].ZEbene = 191;
+	spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+	spr_info[2].ZEbene = 192;
+
+	wait_show_screen(30);
+	clear_prog_ani();
+	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+}
+
+void Room0::auge_schleim_back() {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi->ani_count = 53;
+
+	ende = 0;
+	flags.AniUserAction = true;
+
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+
+		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count == 61) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+
+		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		set_ani_screen();
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			++adi->ani_count;
+			if (adi->ani_count == 77)
+				ende = 1;
+		}
+	}
+
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void Room0::ch_schleim_auge() {
+	ani_detail_info *adi;
+
+	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
+	adi->ani_count = adi->start_ani;
+	if (adi->load_flag) {
+		det->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+	}
+
+	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
+		clear_prog_ani();
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+		spr_info[2].ZEbene = 192;
+		spr_info[3] = det->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		set_up_screen(DO_SETUP);
+
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			++adi->ani_count;
+		}
+	}
+
+	if (adi->load_flag) {
+		det->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+	}
+
+	clear_prog_ani();
+	_G(spieler).PersonHide[P_CHEWY] = false;
+}
+
+void Room0::fuetter_start(int16 mode) {
+	ani_detail_info *adi;
+	int16 ende;
+
+	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	if (!mode)
+		adi->ani_count = adi->start_ani;
+	else
+		adi->ani_count = 135;
+
+	if (!mode) {
+		ani_klappe_delay();
+		det->enable_sound(KLAPPE_DETAIL, 0);
+		det->disable_sound(KLAPPE_DETAIL, 1);
+		det->enable_sound(FUETTER_SCHLAUCH, 0);
+		det->disable_sound(FUETTER_SCHLAUCH, 2);
+	} else {
+
+		det->disable_sound(KLAPPE_DETAIL, 0);
+		det->enable_sound(KLAPPE_DETAIL, 1);
+		det->disable_sound(FUETTER_SCHLAUCH, 0);
+		det->enable_sound(FUETTER_SCHLAUCH, 2);
+	}
+
+	ende = 0;
+	if (_G(spieler).R0SchleimWurf)
+		flags.AniUserAction = true;
+
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		if (flags.AniUserAction)
+			get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		if (!mode)
+			calc_kissen_click(1);
+
+		out->back2screen(workpage);
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			if (!mode) {
+				++adi->ani_count;
+				if (adi->ani_count > 135)
+					ende = 1;
+			} else {
+				--adi->ani_count;
+				if (adi->ani_count == adi->start_ani - 1)
+					ende = 1;
+			}
+		}
+	}
+
+	clear_prog_ani();
+	flags.AniUserAction = false;
+
+	if (mode) {
+		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
+		while (det->get_ani_status(KLAPPE_DETAIL))
+			set_ani_screen();
+
+	}
+}
+
+void Room0::kissen_wurf() {
+	for (int16 i = 0; i < 30 && !_G(spieler).R0KissenWurf; i++) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		get_user_key(NO_SETUP);
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		calc_kissen_click(1);
+		out->back2screen(workpage);
+	}
+
+	clear_prog_ani();
+}
+
+void Room0::calc_kissen_click(int16 ani_nr) {
+	int16 anz;
+	int16 x, y;
+	int16 i;
+
+	if (mouse_on_prog_ani() == ani_nr) {
+		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
+			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
+			if (str_ != 0) {
+				out->set_fontadr(font8x8);
+				out->set_vorschub(fvorx8x8, fvory8x8);
+				x = minfo.x;
+				y = minfo.y;
+				calc_txt_xy(&x, &y, str_, anz);
+				for (i = 0; i < anz; i++)
+					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+			}
+		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SchleimWurf) {
+				del_inventar(_G(spieler).AkInvent);
+				_G(spieler).R0KissenWurf = 1;
+			} else if (is_cur_inventar(SCHLEIM_INV)) {
+				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATEI);
+			}
+		}
+	}
+}
+
+void Room0::ch_fuetter() {
+	ani_detail_info *adi;
+	int16 i;
+	int16 ende;
+
+	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	adi->ani_count = 136;
+
+	i = 152;
+	ende = 0;
+
+	if (_G(spieler).R0SchleimWurf)
+		flags.AniUserAction = true;
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		if (adi->ani_count == 136) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			if (!_G(spieler).R0SchleimWurf)
+				det->stop_detail(16);
+		}
+		if (adi->ani_count > 138) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count > 141) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+		if (adi->ani_count == 138) {
+			spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			spr_info[3].ZEbene = 193;
+		}
+
+		spr_info[4] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[4].ZEbene = 194;
+		set_ani_screen();
+
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			if (adi->ani_count > 141)
+				++i;
+			++adi->ani_count;
+			if (adi->ani_count == 152)
+				ende = 1;
+		}
+	}
+
+	adi->ani_count = 138;
+
+	ende = 0;
+	det->start_detail(CH_NACH_FUETTERN, 2, VOR);
+	while (!ende) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+
+		if (adi->ani_count > 138) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			spr_info[1].ZEbene = 191;
+		}
+		if (adi->ani_count == 138) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+
+		spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[3].ZEbene = 193;
+		set_ani_screen();
+
+		if (!det->get_ani_status(CH_NACH_FUETTERN))
+			ende = 1;
+		if (adi->delay_count > 0)
+			--adi->delay_count;
+		else {
+			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+			if (adi->ani_count > 135)
+				--adi->ani_count;
+		}
+	}
+
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void Room0::ch_kissen() {
+	ani_detail_info *adi;
+	int16 ende, mode;
+
+	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	adi->ani_count = 161;
+
+	ende = 0;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
+	mode = 0;
+
+	while (!ende) {
+		clear_prog_ani();
+		if (!det->get_ani_status(CH_WIRFT_KISSEN)) {
+			mode = 1;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+		}
+
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+		spr_info[1].ZEbene = 191;
+		if (mode) {
+			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+			spr_info[2].ZEbene = 192;
+		}
+		set_up_screen(DO_SETUP);
+
+		if (mode) {
+			if (adi->delay_count > 0)
+				--adi->delay_count;
+			else {
+				adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
+				--adi->ani_count;
+				if (adi->ani_count == 151)
+					ende = 1;
+			}
+		}
+	}
+
+	clear_prog_ani();
+}
+
+void Room0::ani_klappe_delay() {
+	int16 i;
+	det->start_detail(KLAPPE_DETAIL, 1, VOR);
+	while (det->get_ani_status(KLAPPE_DETAIL) && !SHOULD_QUIT) {
+		set_ani_screen();
+	}
+
+	flags.AniUserAction = true;
+	for (i = 0; i < 25; i++) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0].ZEbene = 190;
+		set_ani_screen();
+	}
+
+	flags.AniUserAction = false;
+	clear_prog_ani();
+}
+
+void Room0::eyeAnim() {
+	if (!_G(spieler).R0SchleimWurf) {
+		eyeStart(0);
+		if (!_G(spieler).R0SchleimWurf)
+			auge_wait();
+		if (_G(spieler).R0SchleimWurf) {
+			start_aad(124);
+			ch_schleim_auge();
+			auge_schleim_back();
+			auto_move(FUETTER_POS, P_CHEWY);
+			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+		} else {
+			auge_shoot();
+			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+			eyeStart(1);
+		}
+	}
+}
+
+void Room0::fuett_ani() {
+	int16 action;
+	action = false;
+	fuetter_start(0);
+
+	if (_G(spieler).R0SchleimWurf) {
+		kissen_wurf();
+		if (_G(spieler).R0KissenWurf) {
+			ch_kissen();
+			fuetter_start(1);
+			auto_move(VERSTECK_POS, P_CHEWY);
+			set_up_screen(DO_SETUP);
+			out->cls();
+			flic_cut(FCUT_001, CFO_MODE);
+
+			test_intro(1);
+			ERROR
+
+			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
+			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			ERROR
+			set_person_pos(Rdi->AutoMov[4].X - CH_HOT_MOV_X,
+			               Rdi->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
+			spieler_vector[P_CHEWY].DelayCount = 0;
+
+			check_shad(4, 0);
+			fx_blend = BLEND1;
+			set_up_screen(DO_SETUP);
+		} else {
+			action = true;
+		}
+	} else {
+		action = true;
+	}
+
+	if (action) {
+		ch_fuetter();
+		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
+		start_aad(55);
+		fuetter_start(1);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
new file mode 100644
index 00000000000..ee8f963abaa
--- /dev/null
+++ b/engines/chewy/rooms/room0.h
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM0_H
+#define CHEWY_ROOMS_ROOM0_H
+
+namespace Chewy {
+namespace Rooms {
+
+#include "chewy/ngsdefs.h"
+
+/**
+ * Prison Cell - Starting room
+ */
+class Room0 {
+private:
+	static void eyeStart(int16 mode);
+
+	static void auge_wait();
+
+	static void auge_shoot();
+
+	static void auge_schleim_back();
+
+	static void ch_schleim_auge();
+
+	static void fuetter_start(int16 mode);
+
+	static void ch_fuetter();
+	static void ch_kissen();
+
+	static void kissen_wurf();
+
+	static void ani_klappe_delay();
+
+	static void calc_auge_click(int16 ani_nr);
+
+	static void calc_kissen_click(int16 ani_nr);
+public:
+	static void entry();
+
+	static void eyeAnim();
+	static void fuett_ani();
+	static bool getPillow();
+	static bool pullSlime();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
new file mode 100644
index 00000000000..5b2f3861faf
--- /dev/null
+++ b/engines/chewy/rooms/rooms.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOMS_H
+#define CHEWY_ROOMS_ROOMS_H
+
+#include "chewy/rooms/room0.h"
+
+// TODO: Remove one room classes implemented and split up
+#include "chewy/episode1.h"
+#include "chewy/episode2.h"
+#include "chewy/episode3.h"
+#include "chewy/episode4.h"
+#include "chewy/episode5.h"
+
+#define ANI_HIDE 0
+#define ANI_SHOW 1
+
+namespace Chewy {
+
+using Chewy::Rooms::Room0;
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 67042fc2dcb..b8a70fa2b5f 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -24,11 +24,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/episode1.h"
-#include "chewy/episode2.h"
-#include "chewy/episode3.h"
-#include "chewy/episode4.h"
-#include "chewy/episode5.h"
+#include "chewy/rooms/rooms.h"
 
 namespace Chewy {
 


Commit: 4b4487c7c648693c640501dc876ee229891ba77c
    https://github.com/scummvm/scummvm/commit/4b4487c7c648693c640501dc876ee229891ba77c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Starting to cleanup eye animations

Changed paths:
    engines/chewy/events.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h
    engines/chewy/types.h


diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 9f352ecedfc..2de060e167c 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -66,6 +66,8 @@ extern EventsManager *g_events;
 
 extern void delay(size_t time);
 
+#define EVENTS_UPDATE g_events->update()
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ec88dcc1551..2ce84ac534d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -138,7 +138,7 @@ void timer_action(int16 t_nr) {
 					timer_action_ctr = 2;
 
 				flags.AutoAniPlay = true;
-				if (!_G(spieler).R0SchleimWurf) {
+				if (!_G(spieler).R0SlimeUsed) {
 					start_aad_wait(42, -1);
 					auto_move(5, 0);
 					set_person_spr(0, 0);
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 3fef57d2386..3b96b4380ad 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -114,24 +114,24 @@ bool Room0::pullSlime() {
 	return false;
 }
 
-void Room0::eyeStart(int16 mode) {
+void Room0::eyeStart(EyeMode mode) {
 	ani_detail_info *adi;
 	int16 ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
-	if (!mode)
+	if (mode == EYE_START)
 		adi->ani_count = adi->start_ani;
 	else
 		adi->ani_count = 38;
 
-	if (!mode) {
+	if (mode == EYE_START) {
 		ani_klappe_delay();
 	}
 
 	ende = 0;
 	flags.AniUserAction = true;
 
-	if (!mode) {
+	if (mode == EYE_START) {
 		det->enable_sound(KLAPPE_DETAIL, 0);
 		det->disable_sound(KLAPPE_DETAIL, 1);
 		det->enable_sound(SCHLAUCH_DETAIL, 0);
@@ -163,12 +163,14 @@ void Room0::eyeStart(int16 mode) {
 		cur->plot_cur();
 		calc_auge_click(3);
 		out->back2screen(workpage);
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
 			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
-			if (!mode) {
+			if (mode == EYE_START) {
 				++adi->ani_count;
 				if (adi->ani_count > 38)
 					ende = 1;
@@ -183,14 +185,17 @@ void Room0::eyeStart(int16 mode) {
 	clear_prog_ani();
 	flags.AniUserAction = false;
 
-	if (mode) {
+	if (mode == EYE_END) {
 		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
-		while (det->get_ani_status(KLAPPE_DETAIL))
+		while (det->get_ani_status(KLAPPE_DETAIL)) {
 			set_ani_screen();
+			EVENTS_UPDATE;
+			SHOULD_QUIT_RETURN;
+		}
 	}
 }
 
-void Room0::auge_wait() {
+void Room0::eyeWait() {
 	ani_detail_info *adi;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
@@ -219,6 +224,9 @@ void Room0::auge_wait() {
 			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 		}
+
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
 	}
 
 	flags.AniUserAction = false;
@@ -245,7 +253,7 @@ void Room0::calc_auge_click(int16 ani_nr) {
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 			if (is_cur_inventar(SCHLEIM_INV)) {
 				del_inventar(_G(spieler).AkInvent);
-				_G(spieler).R0SchleimWurf = 1;
+				_G(spieler).R0SlimeUsed = true;
 			} else if (is_cur_inventar(KISSEN_INV)) {
 
 				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
@@ -254,7 +262,7 @@ void Room0::calc_auge_click(int16 ani_nr) {
 	}
 }
 
-void Room0::auge_shoot() {
+void Room0::eyeShoot() {
 	ani_detail_info *adi;
 	int16 ende;
 
@@ -410,7 +418,7 @@ void Room0::fuetter_start(int16 mode) {
 	}
 
 	ende = 0;
-	if (_G(spieler).R0SchleimWurf)
+	if (_G(spieler).R0SlimeUsed)
 		flags.AniUserAction = true;
 
 	while (!ende) {
@@ -489,7 +497,7 @@ void Room0::calc_kissen_click(int16 ani_nr) {
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SchleimWurf) {
+			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SlimeUsed) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0KissenWurf = 1;
 			} else if (is_cur_inventar(SCHLEIM_INV)) {
@@ -510,7 +518,7 @@ void Room0::ch_fuetter() {
 	i = 152;
 	ende = 0;
 
-	if (_G(spieler).R0SchleimWurf)
+	if (_G(spieler).R0SlimeUsed)
 		flags.AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
@@ -518,7 +526,7 @@ void Room0::ch_fuetter() {
 		spr_info[0].ZEbene = 190;
 		if (adi->ani_count == 136) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			if (!_G(spieler).R0SchleimWurf)
+			if (!_G(spieler).R0SlimeUsed)
 				det->stop_detail(16);
 		}
 		if (adi->ani_count > 138) {
@@ -653,20 +661,22 @@ void Room0::ani_klappe_delay() {
 }
 
 void Room0::eyeAnim() {
-	if (!_G(spieler).R0SchleimWurf) {
-		eyeStart(0);
-		if (!_G(spieler).R0SchleimWurf)
-			auge_wait();
-		if (_G(spieler).R0SchleimWurf) {
+	if (!_G(spieler).R0SlimeUsed) {
+		// Start the eye animation
+		eyeStart(EYE_START);
+		if (!_G(spieler).R0SlimeUsed)
+			eyeWait();
+
+		if (_G(spieler).R0SlimeUsed) {
 			start_aad(124);
 			ch_schleim_auge();
 			auge_schleim_back();
 			auto_move(FUETTER_POS, P_CHEWY);
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		} else {
-			auge_shoot();
+			eyeShoot();
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-			eyeStart(1);
+			eyeStart(EYE_END);
 		}
 	}
 }
@@ -676,7 +686,7 @@ void Room0::fuett_ani() {
 	action = false;
 	fuetter_start(0);
 
-	if (_G(spieler).R0SchleimWurf) {
+	if (_G(spieler).R0SlimeUsed) {
 		kissen_wurf();
 		if (_G(spieler).R0KissenWurf) {
 			ch_kissen();
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index ee8f963abaa..dcfe16391e6 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -33,11 +33,21 @@ namespace Rooms {
  */
 class Room0 {
 private:
-	static void eyeStart(int16 mode);
-
-	static void auge_wait();
-
-	static void auge_shoot();
+	/**
+	 * Do the basic eye animation.
+	 */
+	enum EyeMode { EYE_START = 0, EYE_END = 1 };
+	static void eyeStart(EyeMode mode);
+
+	/**
+	 * Pause after the eye arrives
+	 */
+	static void eyeWait();
+
+	/**
+	 * Do the eye shooting animation
+	 */
+	static void eyeShoot();
 
 	static void auge_schleim_back();
 
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index d753d8b0ead..8148334986d 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -33,340 +33,340 @@ namespace Chewy {
 #include "common/pack-start.h"	// START STRUCT PACKING
 
 struct SpielerFlags {
-	byte R0SchleimWurf : 1;
-	byte R0KissenWurf : 1;
-	byte R0Monokel : 1;
-	byte R0GBuch : 1;
-	byte R2KabelBork : 1;
-	byte R2FussSchleim : 1;
-	byte R5Terminal : 1;
-	byte R5Tuer : 1;
-
-	byte R6BolaSchild : 1;
-	byte R6BolaOk : 1;
-	byte R6BolaBecher : 1;
-	byte R6DoorLeftF : 1;
-	byte R6DoorLeftB : 1;
-	byte R6DoorRightB : 1;
-	byte R7DoorRight : 1;
-	byte R7Hebel : 1;
-
-	byte R7SeilLeft : 1;
-	byte R7SeilOk : 1;
-	byte R7RHaken : 1;
-	byte R7BorkFlug : 1;
-	byte R7ChewyFlug : 1;
-	byte R8Folter : 1;
-	byte R8Stein : 1;
-	byte R8GTuer : 1;
-
-	byte R8Kohle : 1;
-	byte R8Abkuehlen : 1;
-	byte R8GipsWurf : 1;
-	byte R9Gitter : 1;
-	byte R9Surimy : 1;
-	byte R10Surimy : 1;
-	byte R10SurimyOk : 1;
-	byte R11CardOk : 1;
-
-	byte R11TerminalOk : 1;
-	byte R11DoorRightB : 1;
-	byte R11DoorRightF : 1;
-	byte R12Betreten : 1;
-	byte R12ChewyBork : 1;
-	byte R12Talisman : 1;
-	byte R12TalismanOk : 1;
-	byte R12RaumOk : 1;
-
-	byte R12BorkTalk : 1;
-	byte R12BorkInRohr : 1;
-	byte R12TransOn : 1;
-	byte R12KetteLinks : 1;
-	byte R13BorkOk : 1;
-	byte R13Band : 1;
-	byte R13Bandlauf : 1;
-	byte R13Surf : 1;
-
-	byte R14Feuer : 1;
-	byte R14Translator : 1;
-	byte R14FluxoFlex : 1;
-	byte R14GleiterAuf : 1;
-	byte R14Sicherung : 1;
-	byte R14Waffe : 1;
-	byte R16F5Exit : 1;
-	byte R17GitterWeg : 1;
-
-	byte R17Seil : 1;
-	byte R17HebelOk : 1;
-	byte R17EnergieOut : 1;
-	byte R17DoorKommand : 1;
-	byte R18DoorBruecke : 1;
-	byte R18CartFach : 1;
-	byte R18CartTerminal : 1;
-	byte R18CartSave : 1;
-
-	byte R18SurimyWurf : 1;
-	byte R18SondeMoni : 1;
-	byte R18MoniSwitch : 1;
-	byte R18Krone : 1;
-	byte R18FirstEntry : 1;
-	byte R18Gitter : 1;
-	byte R21Salto : 1;
-	byte R21GitterEnergie : 1;
-
-	byte R21GitterMuell : 1;
-	byte R21Hebel1 : 1;
-	byte R21Hebel2 : 1;
-	byte R21Hebel3 : 1;
-	byte R21Laser1Weg : 1;
-	byte R21Laser2Weg : 1;
-	byte R21Gang : 1;
-	byte R22Paint : 1;
-
-	byte R22ChewyPlatt : 1;
-	byte R22BorkPlatt : 1;
-	byte R22GetBork : 1;
-	byte R23FluxoFlex : 1;
-	byte R23Cartridge : 1;
-	byte R24FirstEntry : 1;
-	byte R25FirstEntry : 1;
-	byte R25GleiteLoesch : 1;
-
-	byte R25SurimyLauf : 1;
-	byte R25GleiterExit : 1;
-	byte R27SurimyOk : 1;
-	byte R28SurimyCar : 1;
-	byte R28ChewyPump : 1;
-	byte R28Briefkasten : 1;
-	byte R28EntryHaus : 1;
-	byte R28Manuskript : 1;
-
-	byte R28RKuerbis : 1;
-	byte R28ExitTown : 1;
-	byte R28PostCar : 1;
-	byte R29Pumpe : 1;
-	byte R29Schlauch1 : 1;
-	byte R29Schlauch2 : 1;
-	byte R29AutoSitz : 1;
-	byte R31PflanzeWeg : 1;
-
-	byte R31KoernerDa : 1;
-	byte R31Wasser : 1;
-	byte R31KlappeZu : 1;
-	byte R31SurFurz : 1;
-	byte R32HowardWeg : 1;
-	byte R32UseSchreib : 1;
-	byte R32PapierOk : 1;
-	byte R32Script : 1;
-
-	byte R33SchubFirst : 1;
-	byte R33Messer : 1;
-	byte R33MunterOk : 1;
-	byte R33MunterGet : 1;
-	byte R35TransCat : 1;
-	byte R35Falle : 1;
-	byte R35Schublade : 1;
-	byte R35CatEat : 1;
-
-	byte R37TransHahn : 1;
-	byte R37Gebiss : 1;
-	byte R37HundScham : 1;
-	byte R37Kloppe : 1;
-	byte R37Mes : 1;
-	byte R39TransMensch : 1;
-	byte R39TvOn : 1;
-	byte R39ScriptOk : 1;
-
-	byte R39HowardDa : 1;
-	byte R39HowardWach : 1;
-	byte R40TeilKarte : 1;
-	byte R40TrainMove : 1;
-	byte R40TrainOk : 1;
-	byte R40Geld : 1;
-	byte R40PoliceStart : 1;
-	byte R40PoliceWeg : 1;
-
-	byte R40PoliceAb : 1;
-	byte R40Wettbewerb : 1;
-	byte R40HoUse : 1;
-	byte R40HaendlerOk : 1;
-	byte R40DuengerMit : 1;
-	byte R40DuengerTele : 1;
-	byte R41FirstTalk : 1;
-	byte R41LolaOk : 1;
-
-	byte R41Einbruch : 1;
-	byte R41BruchInfo : 1;
-	byte R41KuerbisInfo : 1;
-	byte R41RepairInfo : 1;
-	byte R41HowardDiaOK : 1;
-	byte R42FirstEntry : 1;
-	byte R42BriefOk : 1;
-	byte R42HoToBeamter : 1;
-
-	byte R42MarkeOk : 1;
-	byte R42BriefMarke : 1;
-	byte R42BeamterWach : 1;
-	byte R43GetPgLady : 1;
-	byte R45TaxiOk : 1;
-	byte R45MagOk : 1;
-	byte R46GetLeder : 1;
-	byte R47SchlossOk : 1;
-
-	byte R48TaxiEntry : 1;
-	byte R49WegFrei : 1;
-	byte R49BoyWeg : 1;
-	byte R49BoyAni : 1;
-	byte R50Zigarre : 1;
-	byte R50KeyOK : 1;
-	byte R51FirstEntry : 1;
-	byte R51HotelRoom : 1;
-
-	byte R51KillerWeg : 1;
-	byte R52HotDogOk : 1;
-	byte R52TuerAuf : 1;
-	byte R52LichtAn : 1;
-	byte R52KakerJoke : 1;
-	byte R52KakerWeg : 1;
-	byte R53Kostuem : 1;
-	byte R53Visit : 1;
-
-	byte R54HotDogOk : 1;
-	byte R54FputzerWeg : 1;
-	byte R54LiftOk : 1;
-	byte R54Schild : 1;
-	byte R55SekWeg : 1;
-	byte R55Location : 1;
-	byte R55Entry : 1;
-	byte R55Job : 1;
-
-	byte R55ScriptWeg : 1;
-	byte R55EscScriptOk : 1;
-	byte R55RaumOk : 1;
-	byte R55R54First : 1;
-	byte R56GetTabak : 1;
-	byte R56AbfahrtOk : 1;
-	byte R56Kneipe : 1;
-	byte R56WhiskyMix : 1;
-
-	byte R57StudioAuf : 1;
-	byte R59PosterWeg : 1;
-	byte R62Flucht : 1;
-	byte R62FirstEntry : 1;
-	byte R62TShow : 1;
-	byte R62LauraVerwandlung : 1;
-	byte R63Feuer : 1;
-	byte R63FxMannWeg : 1;
-
-	byte R63Uhr : 1;
-	byte R64ManWeg : 1;
-	byte flags26_4 : 1;
-	byte flags26_8 : 1;
-	byte flags26_10 : 1;
-	byte flags26_20 : 1;
-	byte flags26_40 : 1;
-	byte R67LiedOk : 1;
-
-	byte R67KommodeAuf : 1;
-	byte R67KostuemWeg : 1;
-	byte R67PapageiWeg : 1;
-	byte R68KarteDa : 1;
-	byte R68Papagei : 1;
-	byte R68DivaWeg : 1;
-	byte R68Lied : 1;
-	byte R68IndigoDia : 1;
-
-	byte R68Gutschein : 1;
-	byte flags28_2 : 1;
-	byte flags28_4 : 1;
-	byte flags28_8 : 1;
-	byte flags28_10 : 1;
-	byte flags28_20 : 1;
-	byte flags28_40 : 1;
-	byte flags28_80 : 1;
-
-	byte flags29_1 : 1;
-	byte flags29_2 : 1;
-	byte flags29_4 : 1;
-	byte flags29_8 : 1;
-	byte flags29_10 : 1;
-	byte flags29_20 : 1;
-	byte flags29_40 : 1;
-	byte flags29_80 : 1;
-
-	byte flags30_1 : 1;
-	byte flags30_2 : 1;
-	byte flags30_4 : 1;
-	byte flags30_8 : 1;
-	byte flags30_10 : 1;
-	byte flags30_20 : 1;
-	byte flags30_40 : 1;
-	byte flags30_80 : 1;
-
-	byte flags31_1 : 1;
-	byte flags31_2 : 1;
-	byte flags31_4 : 1;
-	byte flags31_8 : 1;
-	byte flags31_10 : 1;
+	bool R0SlimeUsed : 1;
+	bool R0KissenWurf : 1;
+	bool R0Monokel : 1;
+	bool R0GBuch : 1;
+	bool R2KabelBork : 1;
+	bool R2FussSchleim : 1;
+	bool R5Terminal : 1;
+	bool R5Tuer : 1;
+
+	bool R6BolaSchild : 1;
+	bool R6BolaOk : 1;
+	bool R6BolaBecher : 1;
+	bool R6DoorLeftF : 1;
+	bool R6DoorLeftB : 1;
+	bool R6DoorRightB : 1;
+	bool R7DoorRight : 1;
+	bool R7Hebel : 1;
+
+	bool R7SeilLeft : 1;
+	bool R7SeilOk : 1;
+	bool R7RHaken : 1;
+	bool R7BorkFlug : 1;
+	bool R7ChewyFlug : 1;
+	bool R8Folter : 1;
+	bool R8Stein : 1;
+	bool R8GTuer : 1;
+
+	bool R8Kohle : 1;
+	bool R8Abkuehlen : 1;
+	bool R8GipsWurf : 1;
+	bool R9Gitter : 1;
+	bool R9Surimy : 1;
+	bool R10Surimy : 1;
+	bool R10SurimyOk : 1;
+	bool R11CardOk : 1;
+
+	bool R11TerminalOk : 1;
+	bool R11DoorRightB : 1;
+	bool R11DoorRightF : 1;
+	bool R12Betreten : 1;
+	bool R12ChewyBork : 1;
+	bool R12Talisman : 1;
+	bool R12TalismanOk : 1;
+	bool R12RaumOk : 1;
+
+	bool R12BorkTalk : 1;
+	bool R12BorkInRohr : 1;
+	bool R12TransOn : 1;
+	bool R12KetteLinks : 1;
+	bool R13BorkOk : 1;
+	bool R13Band : 1;
+	bool R13Bandlauf : 1;
+	bool R13Surf : 1;
+
+	bool R14Feuer : 1;
+	bool R14Translator : 1;
+	bool R14FluxoFlex : 1;
+	bool R14GleiterAuf : 1;
+	bool R14Sicherung : 1;
+	bool R14Waffe : 1;
+	bool R16F5Exit : 1;
+	bool R17GitterWeg : 1;
+
+	bool R17Seil : 1;
+	bool R17HebelOk : 1;
+	bool R17EnergieOut : 1;
+	bool R17DoorKommand : 1;
+	bool R18DoorBruecke : 1;
+	bool R18CartFach : 1;
+	bool R18CartTerminal : 1;
+	bool R18CartSave : 1;
+
+	bool R18SurimyWurf : 1;
+	bool R18SondeMoni : 1;
+	bool R18MoniSwitch : 1;
+	bool R18Krone : 1;
+	bool R18FirstEntry : 1;
+	bool R18Gitter : 1;
+	bool R21Salto : 1;
+	bool R21GitterEnergie : 1;
+
+	bool R21GitterMuell : 1;
+	bool R21Hebel1 : 1;
+	bool R21Hebel2 : 1;
+	bool R21Hebel3 : 1;
+	bool R21Laser1Weg : 1;
+	bool R21Laser2Weg : 1;
+	bool R21Gang : 1;
+	bool R22Paint : 1;
+
+	bool R22ChewyPlatt : 1;
+	bool R22BorkPlatt : 1;
+	bool R22GetBork : 1;
+	bool R23FluxoFlex : 1;
+	bool R23Cartridge : 1;
+	bool R24FirstEntry : 1;
+	bool R25FirstEntry : 1;
+	bool R25GleiteLoesch : 1;
+
+	bool R25SurimyLauf : 1;
+	bool R25GleiterExit : 1;
+	bool R27SurimyOk : 1;
+	bool R28SurimyCar : 1;
+	bool R28ChewyPump : 1;
+	bool R28Briefkasten : 1;
+	bool R28EntryHaus : 1;
+	bool R28Manuskript : 1;
+
+	bool R28RKuerbis : 1;
+	bool R28ExitTown : 1;
+	bool R28PostCar : 1;
+	bool R29Pumpe : 1;
+	bool R29Schlauch1 : 1;
+	bool R29Schlauch2 : 1;
+	bool R29AutoSitz : 1;
+	bool R31PflanzeWeg : 1;
+
+	bool R31KoernerDa : 1;
+	bool R31Wasser : 1;
+	bool R31KlappeZu : 1;
+	bool R31SurFurz : 1;
+	bool R32HowardWeg : 1;
+	bool R32UseSchreib : 1;
+	bool R32PapierOk : 1;
+	bool R32Script : 1;
+
+	bool R33SchubFirst : 1;
+	bool R33Messer : 1;
+	bool R33MunterOk : 1;
+	bool R33MunterGet : 1;
+	bool R35TransCat : 1;
+	bool R35Falle : 1;
+	bool R35Schublade : 1;
+	bool R35CatEat : 1;
+
+	bool R37TransHahn : 1;
+	bool R37Gebiss : 1;
+	bool R37HundScham : 1;
+	bool R37Kloppe : 1;
+	bool R37Mes : 1;
+	bool R39TransMensch : 1;
+	bool R39TvOn : 1;
+	bool R39ScriptOk : 1;
+
+	bool R39HowardDa : 1;
+	bool R39HowardWach : 1;
+	bool R40TeilKarte : 1;
+	bool R40TrainMove : 1;
+	bool R40TrainOk : 1;
+	bool R40Geld : 1;
+	bool R40PoliceStart : 1;
+	bool R40PoliceWeg : 1;
+
+	bool R40PoliceAb : 1;
+	bool R40Wettbewerb : 1;
+	bool R40HoUse : 1;
+	bool R40HaendlerOk : 1;
+	bool R40DuengerMit : 1;
+	bool R40DuengerTele : 1;
+	bool R41FirstTalk : 1;
+	bool R41LolaOk : 1;
+
+	bool R41Einbruch : 1;
+	bool R41BruchInfo : 1;
+	bool R41KuerbisInfo : 1;
+	bool R41RepairInfo : 1;
+	bool R41HowardDiaOK : 1;
+	bool R42FirstEntry : 1;
+	bool R42BriefOk : 1;
+	bool R42HoToBeamter : 1;
+
+	bool R42MarkeOk : 1;
+	bool R42BriefMarke : 1;
+	bool R42BeamterWach : 1;
+	bool R43GetPgLady : 1;
+	bool R45TaxiOk : 1;
+	bool R45MagOk : 1;
+	bool R46GetLeder : 1;
+	bool R47SchlossOk : 1;
+
+	bool R48TaxiEntry : 1;
+	bool R49WegFrei : 1;
+	bool R49BoyWeg : 1;
+	bool R49BoyAni : 1;
+	bool R50Zigarre : 1;
+	bool R50KeyOK : 1;
+	bool R51FirstEntry : 1;
+	bool R51HotelRoom : 1;
+
+	bool R51KillerWeg : 1;
+	bool R52HotDogOk : 1;
+	bool R52TuerAuf : 1;
+	bool R52LichtAn : 1;
+	bool R52KakerJoke : 1;
+	bool R52KakerWeg : 1;
+	bool R53Kostuem : 1;
+	bool R53Visit : 1;
+
+	bool R54HotDogOk : 1;
+	bool R54FputzerWeg : 1;
+	bool R54LiftOk : 1;
+	bool R54Schild : 1;
+	bool R55SekWeg : 1;
+	bool R55Location : 1;
+	bool R55Entry : 1;
+	bool R55Job : 1;
+
+	bool R55ScriptWeg : 1;
+	bool R55EscScriptOk : 1;
+	bool R55RaumOk : 1;
+	bool R55R54First : 1;
+	bool R56GetTabak : 1;
+	bool R56AbfahrtOk : 1;
+	bool R56Kneipe : 1;
+	bool R56WhiskyMix : 1;
+
+	bool R57StudioAuf : 1;
+	bool R59PosterWeg : 1;
+	bool R62Flucht : 1;
+	bool R62FirstEntry : 1;
+	bool R62TShow : 1;
+	bool R62LauraVerwandlung : 1;
+	bool R63Feuer : 1;
+	bool R63FxMannWeg : 1;
+
+	bool R63Uhr : 1;
+	bool R64ManWeg : 1;
+	bool flags26_4 : 1;
+	bool flags26_8 : 1;
+	bool flags26_10 : 1;
+	bool flags26_20 : 1;
+	bool flags26_40 : 1;
+	bool R67LiedOk : 1;
+
+	bool R67KommodeAuf : 1;
+	bool R67KostuemWeg : 1;
+	bool R67PapageiWeg : 1;
+	bool R68KarteDa : 1;
+	bool R68Papagei : 1;
+	bool R68DivaWeg : 1;
+	bool R68Lied : 1;
+	bool R68IndigoDia : 1;
+
+	bool R68Gutschein : 1;
+	bool flags28_2 : 1;
+	bool flags28_4 : 1;
+	bool flags28_8 : 1;
+	bool flags28_10 : 1;
+	bool flags28_20 : 1;
+	bool flags28_40 : 1;
+	bool flags28_80 : 1;
+
+	bool flags29_1 : 1;
+	bool flags29_2 : 1;
+	bool flags29_4 : 1;
+	bool flags29_8 : 1;
+	bool flags29_10 : 1;
+	bool flags29_20 : 1;
+	bool flags29_40 : 1;
+	bool flags29_80 : 1;
+
+	bool flags30_1 : 1;
+	bool flags30_2 : 1;
+	bool flags30_4 : 1;
+	bool flags30_8 : 1;
+	bool flags30_10 : 1;
+	bool flags30_20 : 1;
+	bool flags30_40 : 1;
+	bool flags30_80 : 1;
+
+	bool flags31_1 : 1;
+	bool flags31_2 : 1;
+	bool flags31_4 : 1;
+	bool flags31_8 : 1;
+	bool flags31_10 : 1;
 	byte flags31_unused : 3;
 
 	// Further flags
-	uint8 flags32_1 : 1;
-	uint8 flags32_2 : 1;
-	uint8 flags32_4 : 1;
-	uint8 flags32_8 : 1;
-	uint8 flags32_10 : 1;
-	uint8 flags32_20 : 1;
-	uint8 flags32_40 : 1;
-	uint8 flags32_80 : 1;
-
-	uint8 flags33_1 : 1;
-	uint8 flags33_2 : 1;
-	uint8 flags33_4 : 1;
-	uint8 flags33_8 : 1;
-	uint8 flags33_10 : 1;
-	uint8 flags33_20 : 1;
-	uint8 flags33_40 : 1;
-	uint8 flags33_80 : 1;
-
-	uint8 flags34_1 : 1;
-	uint8 flags34_2 : 1;
-	uint8 flags34_4 : 1;
-	uint8 flags34_8 : 1;
-	uint8 flags34_10 : 1;
-	uint8 flags34_20 : 1;
-	uint8 flags34_40 : 1;
-	uint8 flags34_80 : 1;
-
-	uint8 flags35_1 : 1;
-	uint8 flags35_2 : 1;
-	uint8 flags35_4 : 1;
-	uint8 flags35_8 : 1;
-	uint8 flags35_10 : 1;
-	uint8 flags35_20 : 1;
-	uint8 flags35_40 : 1;
-	uint8 flags35_80 : 1;
-
-	uint8 flags36_1 : 1;
-	uint8 flags36_2 : 1;
-	uint8 flags36_4 : 1;
-	uint8 flags36_8 : 1;
-	uint8 flags36_10 : 1;
-	uint8 flags36_20 : 1;
-	uint8 flags36_40 : 1;
-	uint8 flags36_80 : 1;
-
-	uint8 flags37_1 : 1;
-	uint8 flags37_2 : 1;
-	uint8 flags37_4 : 1;
-	uint8 flags37_8 : 1;
-	uint8 flags37_10 : 1;
-	uint8 flags37_20 : 1;
-	uint8 flags37_40 : 1;
-	uint8 flags37_80 : 1;
-
-	uint8 flags38_1 : 1;
-	uint8 flags38_2 : 1;
+	bool flags32_1 : 1;
+	bool flags32_2 : 1;
+	bool flags32_4 : 1;
+	bool flags32_8 : 1;
+	bool flags32_10 : 1;
+	bool flags32_20 : 1;
+	bool flags32_40 : 1;
+	bool flags32_80 : 1;
+
+	bool flags33_1 : 1;
+	bool flags33_2 : 1;
+	bool flags33_4 : 1;
+	bool flags33_8 : 1;
+	bool flags33_10 : 1;
+	bool flags33_20 : 1;
+	bool flags33_40 : 1;
+	bool flags33_80 : 1;
+
+	bool flags34_1 : 1;
+	bool flags34_2 : 1;
+	bool flags34_4 : 1;
+	bool flags34_8 : 1;
+	bool flags34_10 : 1;
+	bool flags34_20 : 1;
+	bool flags34_40 : 1;
+	bool flags34_80 : 1;
+
+	bool flags35_1 : 1;
+	bool flags35_2 : 1;
+	bool flags35_4 : 1;
+	bool flags35_8 : 1;
+	bool flags35_10 : 1;
+	bool flags35_20 : 1;
+	bool flags35_40 : 1;
+	bool flags35_80 : 1;
+
+	bool flags36_1 : 1;
+	bool flags36_2 : 1;
+	bool flags36_4 : 1;
+	bool flags36_8 : 1;
+	bool flags36_10 : 1;
+	bool flags36_20 : 1;
+	bool flags36_40 : 1;
+	bool flags36_80 : 1;
+
+	bool flags37_1 : 1;
+	bool flags37_2 : 1;
+	bool flags37_4 : 1;
+	bool flags37_8 : 1;
+	bool flags37_10 : 1;
+	bool flags37_20 : 1;
+	bool flags37_40 : 1;
+	bool flags37_80 : 1;
+
+	bool flags38_1 : 1;
+	bool flags38_2 : 1;
 	uint8 flags38_unused : 6;
 
 	SpielerFlags() { clear(); }


Commit: 81b17afa4d8bf092cfee4bbf47d9d72b825488d1
    https://github.com/scummvm/scummvm/commit/81b17afa4d8bf092cfee4bbf47d9d72b825488d1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Update headers to GPL3

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/bitclass.h
    engines/chewy/ch_icm.cpp
    engines/chewy/ch_icm.h
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/debug.cpp
    engines/chewy/debug.h
    engines/chewy/debugger.cpp
    engines/chewy/debugger.h
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/episode3.cpp
    engines/chewy/episode3.h
    engines/chewy/episode4.cpp
    engines/chewy/episode4.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/events_base.cpp
    engines/chewy/events_base.h
    engines/chewy/fehler.cpp
    engines/chewy/fehler.h
    engines/chewy/file.cpp
    engines/chewy/file.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h
    engines/chewy/maus.cpp
    engines/chewy/maus.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/menus.cpp
    engines/chewy/menus.h
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h
    engines/chewy/ngsdefs.h
    engines/chewy/ngshext.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/objekt.cpp
    engines/chewy/objekt.h
    engines/chewy/objekte.cpp
    engines/chewy/objekte.h
    engines/chewy/r_event.cpp
    engines/chewy/resource.cpp
    engines/chewy/resource.h
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h
    engines/chewy/rooms/rooms.h
    engines/chewy/sound.cpp
    engines/chewy/sound.h
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/temp_file.cpp
    engines/chewy/temp_file.h
    engines/chewy/text.cpp
    engines/chewy/text.h
    engines/chewy/timer.cpp
    engines/chewy/timer.h
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 02cf5345f5e..253d80d053f 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 54b46c38f55..5e54d5d0f5b 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index 1c40cddbd94..0dc717d1fda 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 9f24850d7c4..7642bb67722 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 466485d0663..8f39f5a23a2 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 2e65b5fbb42..645fc80333e 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/bitclass.h b/engines/chewy/bitclass.h
index afee5d025f6..3d1560ff0de 100644
--- a/engines/chewy/bitclass.h
+++ b/engines/chewy/bitclass.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index a5e3bce45dc..ebc4b4bce67 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ch_icm.h b/engines/chewy/ch_icm.h
index 6a034526f1a..3a9af55ee3a 100644
--- a/engines/chewy/ch_icm.h
+++ b/engines/chewy/ch_icm.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 76860b7b8aa..f9d7ccae229 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index d2bbc2d51f4..0d50275a677 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 868e265f510..fdcde239c6d 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index d584fa25b1a..a1a131cdb70 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
index 0d35eda932b..469d054e7bb 100644
--- a/engines/chewy/debug.cpp
+++ b/engines/chewy/debug.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/debug.h b/engines/chewy/debug.h
index 818ad010587..e0ca890b7eb 100644
--- a/engines/chewy/debug.h
+++ b/engines/chewy/debug.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index d7a71fee609..86749177e12 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/debugger.h b/engines/chewy/debugger.h
index 7fa9e84c03b..f1eb2515461 100644
--- a/engines/chewy/debugger.h
+++ b/engines/chewy/debugger.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index d2e790cf4e9..70103988df1 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 35e4abd167d..5376011e39a 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index a4be7fea391..d718853d384 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index dd23fc8fa8f..51d878f63fb 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index a3763a0397d..cceeb499c69 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index fc1bee8a2fd..f5b82fe337b 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 823ea3d9d0c..6ebb76f6419 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 346a8bb475d..7bbe4ad0284 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index e740dca7e2c..a44b634cb90 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 43bda179241..617248e34d3 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
index 91d704c2810..2b1912718a1 100644
--- a/engines/chewy/episode3.h
+++ b/engines/chewy/episode3.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index 67b5b1c07b3..ce5c2399aef 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode4.h b/engines/chewy/episode4.h
index 747d72d4b7c..6f29afed2c7 100644
--- a/engines/chewy/episode4.h
+++ b/engines/chewy/episode4.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index bc1a133b35c..34c98e77768 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 0599d033856..4962fb516fe 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 3121a6384cc..ed8677fdfc9 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 2de060e167c..bd0e49256e6 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
index 98fb7000b75..95b2e7d532e 100644
--- a/engines/chewy/events_base.cpp
+++ b/engines/chewy/events_base.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/events_base.h b/engines/chewy/events_base.h
index e748c7aeaa7..f5ff63e2062 100644
--- a/engines/chewy/events_base.h
+++ b/engines/chewy/events_base.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
index ca6195c89a4..0a8978b81cf 100644
--- a/engines/chewy/fehler.cpp
+++ b/engines/chewy/fehler.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/fehler.h b/engines/chewy/fehler.h
index e8957f95d10..0ba9696283f 100644
--- a/engines/chewy/fehler.h
+++ b/engines/chewy/fehler.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 4a42774851b..b247eec9931 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index fd913f905b7..955db586039 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 43a496f0d6e..e58b28047d2 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index b884d0b6acd..d03211b3816 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index d45dd9d0d0b..568807fb1b9 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 50629e2d4b3..41ed01320d6 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index b7ceb6d4751..e0a17b00d10 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index b61045942f0..bdf848b2f0b 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 70a165aa417..52694606472 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 1e654aec751..02cde7d1f71 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 23715871b27..5cd3451f8df 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 1fb8d9cee36..374e9571f52 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 141e59def16..0c7d0d82f29 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 3f654d6eeaf..7673cea8f6b 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index c52234201c8..191210dd49d 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 1e0f33ec21a..fa048ba11cc 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index e079e4f25fe..0f99ca0cb2a 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/maus.h b/engines/chewy/maus.h
index 85c04c57b4d..bd53efdce86 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/maus.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index b9a7c97a595..9f422ed1954 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index be376b19fae..ff2f86a56a0 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 3377e32d437..fe4e76d5b0b 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 2a535f8b682..8d886411f5a 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 6d65f5e8e71..c761d76fae6 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index f5054b9be39..4c5bf2d08b5 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 680fccc9372..acc29569149 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/menus.h b/engines/chewy/menus.h
index 7929a9b996d..57a1b1daaaf 100644
--- a/engines/chewy/menus.h
+++ b/engines/chewy/menus.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index d6ce5f32b20..07828ce859c 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 6f9d0bb0ed5..50e1176f496 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 5d394120244..089b54621d5 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index b0106ae5a8a..881e1889389 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index cedb05cf239..396900b2a1e 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index b16413565b5..081df762e68 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/objekt.cpp b/engines/chewy/objekt.cpp
index b79c0ad6203..a4074a18b17 100644
--- a/engines/chewy/objekt.cpp
+++ b/engines/chewy/objekt.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/objekt.h b/engines/chewy/objekt.h
index d40b5f97a69..a0f7c9ae746 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/objekt.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 2837801b80a..7a8c6155192 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/objekte.h b/engines/chewy/objekte.h
index c0111e1ed1c..dc1253d64ce 100644
--- a/engines/chewy/objekte.h
+++ b/engines/chewy/objekte.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2ce84ac534d..e74ec6af213 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
index 72431d83148..4b727a4e442 100644
--- a/engines/chewy/resource.cpp
+++ b/engines/chewy/resource.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index e4111c3382b..1b3777dc0df 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 46d346f25e5..872c64ae8a1 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index e19bbdd2577..3296f6e6940 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 3b96b4380ad..9ba9396a977 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index dcfe16391e6..23468652f99 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 5b2f3861faf..b158692d3ce 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 6d2647acec8..aaf8b3f3bfb 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index 9f85e36903f..1c4ff876b92 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 6ea11825f33..41d36fc7d39 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b8a70fa2b5f..ba958919286 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/temp_file.cpp b/engines/chewy/temp_file.cpp
index 923cb6e8f2c..1669064a8cc 100644
--- a/engines/chewy/temp_file.cpp
+++ b/engines/chewy/temp_file.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/temp_file.h b/engines/chewy/temp_file.h
index 16e618f0bea..71f5de45292 100644
--- a/engines/chewy/temp_file.h
+++ b/engines/chewy/temp_file.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 76bbeb2b350..002b8f56130 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index 9b236e1bdad..927a49fe426 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 73f6cf0af76..12bedfcd300 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index d4b78129586..15810591f25 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index f7f6125e352..6e86c5006ee 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 8148334986d..fef632381d6 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -4,10 +4,10 @@
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 


Commit: 2de8ff17f65d4d85e4c471771f3102ed3705f55e
    https://github.com/scummvm/scummvm/commit/2de8ff17f65d4d85e4c471771f3102ed3705f55e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Update credits.pl

Changed paths:
    engines/chewy/credits.pl


diff --git a/engines/chewy/credits.pl b/engines/chewy/credits.pl
index 18f469cbd49..c0d3cb922a6 100644
--- a/engines/chewy/credits.pl
+++ b/engines/chewy/credits.pl
@@ -1,3 +1,3 @@
 begin_section("Chewy");
-	add_person("Filippos Karapetis", "bluegr", "");
+	add_person("Paul Gilbert", "dreammaster", "");
 end_section();


Commit: 80f3a2670ba20ac74ee2ba11e0b67b3927abed07
    https://github.com/scummvm/scummvm/commit/80f3a2670ba20ac74ee2ba11e0b67b3927abed07
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Moved room 0 timer actions into Room0 class

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index e74ec6af213..7ebd0cbd4f4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -117,67 +117,15 @@ void play_scene_ani(int16 nr, int16 mode) {
 }
 
 void timer_action(int16 t_nr) {
-	int16 default_flag;
-	int16 ani_nr;
-	default_flag = false;
-	ani_nr = t_nr - room->room_timer.TimerStart;
+	int16 ani_nr = t_nr - room->room_timer.TimerStart;
+	bool default_flag = false;
 
 	if (ailsnd->isSpeechActive())
 		return;
 
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	case 0:
-		switch (ani_nr) {
-		case 1:
-			if (timer_action_ctr > 0) {
-				uhr->reset_timer(t_nr, 0);
-				--timer_action_ctr;
-			} else if (!is_chewy_busy()) {
-				if (!_G(spieler).R0FueterLab)
-					timer_action_ctr = 2;
-
-				flags.AutoAniPlay = true;
-				if (!_G(spieler).R0SlimeUsed) {
-					start_aad_wait(42, -1);
-					auto_move(5, 0);
-					set_person_spr(0, 0);
-
-					if (_G(spieler).R0FueterLab < 3) {
-						start_spz(2, 255, false, 0);
-						if (_G(spieler).R0FueterLab)
-							start_aad_wait(618, -1);
-						else
-							start_aad_wait(43, -1);
-					}
-
- 					Room0::eyeAnim();
-				} else if (!_G(spieler).R0KissenWurf) {
-					start_aad_wait(42, -1);
-					start_spz(2, 255, false, 0);
-
-					if (_G(spieler).R0FueterLab < 3) {
-						start_aad_wait(43, -1);
-						++_G(spieler).R0FueterLab;
-					}
-
-					auto_move(3, 0);
-					set_person_pos(191, 120, P_CHEWY, P_LEFT);
-				}
-
-				if (!_G(spieler).R0KissenWurf)
-					Room0::fuett_ani();
-
-				uhr->reset_timer(t_nr, 0);
-				flags.AutoAniPlay = false;
-			}
-			break;
-
-		case 3:
-			break;
-
-		default:
-			break;
-		}
+		Room0::timer(t_nr, ani_nr);
 		break;
 
 	case 11:
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 9ba9396a977..fccb98c1859 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -72,6 +72,59 @@ void Room0::entry() {
 	}
 }
 
+bool Room0::timer(int16 t_nr, int16 ani_nr) {
+	switch (ani_nr) {
+	case 1:
+		if (timer_action_ctr > 0) {
+			uhr->reset_timer(t_nr, 0);
+			--timer_action_ctr;
+		} else if (!is_chewy_busy()) {
+			if (!_G(spieler).R0FueterLab)
+				timer_action_ctr = 2;
+
+			flags.AutoAniPlay = true;
+			if (!_G(spieler).R0SlimeUsed) {
+				start_aad_wait(42, -1);
+				auto_move(5, 0);
+				set_person_spr(0, 0);
+
+				if (_G(spieler).R0FueterLab < 3) {
+					start_spz(2, 255, false, 0);
+					if (_G(spieler).R0FueterLab)
+						start_aad_wait(618, -1);
+					else
+						start_aad_wait(43, -1);
+				}
+
+				eyeAnim();
+			} else if (!_G(spieler).R0KissenWurf) {
+				start_aad_wait(42, -1);
+				start_spz(2, 255, false, 0);
+
+				if (_G(spieler).R0FueterLab < 3) {
+					start_aad_wait(43, -1);
+					++_G(spieler).R0FueterLab;
+				}
+
+				auto_move(3, 0);
+				set_person_pos(191, 120, P_CHEWY, P_LEFT);
+			}
+
+			if (!_G(spieler).R0KissenWurf)
+				fuett_ani();
+
+			uhr->reset_timer(t_nr, 0);
+			flags.AutoAniPlay = false;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	return false;
+}
+
 bool Room0::getPillow() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
@@ -113,6 +166,27 @@ bool Room0::pullSlime() {
 	return false;
 }
 
+void Room0::eyeAnim() {
+	if (!_G(spieler).R0SlimeUsed) {
+		// Start the eye animation
+		eyeStart(EYE_START);
+		if (!_G(spieler).R0SlimeUsed)
+			eyeWait();
+
+		if (_G(spieler).R0SlimeUsed) {
+			start_aad(124);
+			ch_schleim_auge();
+			auge_schleim_back();
+			auto_move(FUETTER_POS, P_CHEWY);
+			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+		} else {
+			eyeShoot();
+			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+			eyeStart(EYE_END);
+		}
+	}
+}
+
 void Room0::eyeStart(EyeMode mode) {
 	ani_detail_info *adi;
 	int16 ende;
@@ -659,27 +733,6 @@ void Room0::ani_klappe_delay() {
 	clear_prog_ani();
 }
 
-void Room0::eyeAnim() {
-	if (!_G(spieler).R0SlimeUsed) {
-		// Start the eye animation
-		eyeStart(EYE_START);
-		if (!_G(spieler).R0SlimeUsed)
-			eyeWait();
-
-		if (_G(spieler).R0SlimeUsed) {
-			start_aad(124);
-			ch_schleim_auge();
-			auge_schleim_back();
-			auto_move(FUETTER_POS, P_CHEWY);
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-		} else {
-			eyeShoot();
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-			eyeStart(EYE_END);
-		}
-	}
-}
-
 void Room0::fuett_ani() {
 	int16 action;
 	action = false;
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index 23468652f99..3840a90e2f7 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -66,6 +66,7 @@ private:
 	static void calc_kissen_click(int16 ani_nr);
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
 
 	static void eyeAnim();
 	static void fuett_ani();


Commit: 30ff675e462807a34943de58b8d000d76c36b17f
    https://github.com/scummvm/scummvm/commit/30ff675e462807a34943de58b8d000d76c36b17f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Clear mouse click when starting game from main menu

Changed paths:
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 191210dd49d..90d9ff1e943 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -82,6 +82,7 @@ void MainMenu::execute() {
 
 		switch (_selection) {
 		case MM_START_GAME:
+			g_events->clearEvents();
 			startGame();
 			playGame();
 			break;


Commit: 633d1af934e2820214c59158fb7bde9fb4224bf8
    https://github.com/scummvm/scummvm/commit/633d1af934e2820214c59158fb7bde9fb4224bf8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:19-08:00

Commit Message:
CHEWY: Change ende from int16 to bool in Room0

Changed paths:
    engines/chewy/rooms/room0.cpp


diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index fccb98c1859..6a382f91f03 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -189,7 +189,7 @@ void Room0::eyeAnim() {
 
 void Room0::eyeStart(EyeMode mode) {
 	ani_detail_info *adi;
-	int16 ende;
+	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
 	if (mode == EYE_START)
@@ -201,7 +201,7 @@ void Room0::eyeStart(EyeMode mode) {
 		ani_klappe_delay();
 	}
 
-	ende = 0;
+	ende = false;
 	flags.AniUserAction = true;
 
 	if (mode == EYE_START) {
@@ -246,11 +246,11 @@ void Room0::eyeStart(EyeMode mode) {
 			if (mode == EYE_START) {
 				++adi->ani_count;
 				if (adi->ani_count > 38)
-					ende = 1;
+					ende = true;
 			} else {
 				--adi->ani_count;
 				if (adi->ani_count == adi->start_ani - 1)
-					ende = 1;
+					ende = true;
 			}
 		}
 	}
@@ -337,12 +337,12 @@ void Room0::calc_auge_click(int16 ani_nr) {
 
 void Room0::eyeShoot() {
 	ani_detail_info *adi;
-	int16 ende;
+	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 47;
 
-	ende = 0;
+	ende = false;
 	det->start_detail(CH_BLITZ, 1, VOR);
 
 	while (!ende) {
@@ -360,7 +360,7 @@ void Room0::eyeShoot() {
 			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 			if (!det->get_ani_status(CH_BLITZ))
-				ende = 1;
+				ende = true;
 		}
 
 		set_up_screen(DO_SETUP);
@@ -389,12 +389,12 @@ void Room0::eyeShoot() {
 
 void Room0::auge_schleim_back() {
 	ani_detail_info *adi;
-	int16 ende;
+	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 53;
 
-	ende = 0;
+	ende = false;
 	flags.AniUserAction = true;
 
 	while (!ende) {
@@ -420,7 +420,7 @@ void Room0::auge_schleim_back() {
 			adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 			++adi->ani_count;
 			if (adi->ani_count == 77)
-				ende = 1;
+				ende = true;
 		}
 	}
 
@@ -468,7 +468,7 @@ void Room0::ch_schleim_auge() {
 
 void Room0::fuetter_start(int16 mode) {
 	ani_detail_info *adi;
-	int16 ende;
+	bool ende;
 
 	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
 	if (!mode)
@@ -490,7 +490,7 @@ void Room0::fuetter_start(int16 mode) {
 		det->enable_sound(FUETTER_SCHLAUCH, 2);
 	}
 
-	ende = 0;
+	ende = false;
 	if (_G(spieler).R0SlimeUsed)
 		flags.AniUserAction = true;
 
@@ -515,11 +515,11 @@ void Room0::fuetter_start(int16 mode) {
 			if (!mode) {
 				++adi->ani_count;
 				if (adi->ani_count > 135)
-					ende = 1;
+					ende = true;
 			} else {
 				--adi->ani_count;
 				if (adi->ani_count == adi->start_ani - 1)
-					ende = 1;
+					ende = true;
 			}
 		}
 	}
@@ -583,13 +583,13 @@ void Room0::calc_kissen_click(int16 ani_nr) {
 void Room0::ch_fuetter() {
 	ani_detail_info *adi;
 	int16 i;
-	int16 ende;
+	bool ende;
 
 	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 136;
 
 	i = 152;
-	ende = 0;
+	ende = false;
 
 	if (_G(spieler).R0SlimeUsed)
 		flags.AniUserAction = true;
@@ -627,13 +627,13 @@ void Room0::ch_fuetter() {
 				++i;
 			++adi->ani_count;
 			if (adi->ani_count == 152)
-				ende = 1;
+				ende = true;
 		}
 	}
 
 	adi->ani_count = 138;
 
-	ende = 0;
+	ende = false;
 	det->start_detail(CH_NACH_FUETTERN, 2, VOR);
 	while (!ende) {
 		clear_prog_ani();
@@ -654,7 +654,7 @@ void Room0::ch_fuetter() {
 		set_ani_screen();
 
 		if (!det->get_ani_status(CH_NACH_FUETTERN))
-			ende = 1;
+			ende = true;
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -671,12 +671,12 @@ void Room0::ch_fuetter() {
 
 void Room0::ch_kissen() {
 	ani_detail_info *adi;
-	int16 ende, mode;
+	bool ende, mode;
 
 	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 161;
 
-	ende = 0;
+	ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
 	mode = 0;
@@ -706,7 +706,7 @@ void Room0::ch_kissen() {
 				adi->delay_count = adi->delay + _G(spieler).DelaySpeed;
 				--adi->ani_count;
 				if (adi->ani_count == 151)
-					ende = 1;
+					ende = true;
 			}
 		}
 	}


Commit: 9ae2ed31195b3ade1f2e367d5b737b825f5faeb5
    https://github.com/scummvm/scummvm/commit/9ae2ed31195b3ade1f2e367d5b737b825f5faeb5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: More room 0 cleanups

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/main.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 5376011e39a..c20d6c94147 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -751,7 +751,6 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 							adiptr->ani_count = adiptr->start_ani;
 							if ((adiptr->start_flag != 255) && (adiptr->start_flag > 0)) {
 								--adiptr->start_flag;
-
 							}
 						}
 					}
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index d718853d384..d60521c1d01 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -67,12 +67,12 @@ struct RaumAutoMov {
 #define MAX_RDI_ROOM 100
 
 struct SprInfo {
-	byte *Image;
-	int16 ZEbene;
-	int16 X;
-	int16 Y;
-	int16 X1;
-	int16 Y1;
+	byte *Image = nullptr;
+	int16 ZEbene = 0;
+	int16 X = 0;
+	int16 Y = 0;
+	int16 X1 = 0;
+	int16 Y1 = 0;
 };
 
 struct sound_def_blk {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 0c7d0d82f29..17609417781 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -746,7 +746,7 @@ void set_up_screen(SetupScreenMode mode) {
 	g_screen->update();
 
 	g_engine->_canLoadSave = isMainLoop;
-	g_events->update();
+	EVENTS_UPDATE;
 	g_engine->_canLoadSave = false;
 }
 
@@ -1759,7 +1759,7 @@ void get_user_key(int16 mode) {
 void clear_prog_ani() {
 	int16 i;
 	for (i = 0; i < MAX_PROG_ANI; i++) {
-		spr_info[i].Image = 0;
+		spr_info[i].Image = nullptr;
 		spr_info[i].ZEbene = 255;
 	}
 }
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 6a382f91f03..fb6ee1633fd 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -29,12 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
-#define KLAPPE_SPRITE 5
+#define FLAP_SPRITE 5
 #define SCHLEIM_DETAIL 2
 #define CH_ZIEHT_SCHLEIM 3
 #define CH_BLITZ 8
 #define TUER_DETAIL 9
-#define KLAPPE_DETAIL 10
+#define FLAP_DETAIL 10
 #define SCHLAUCH_DETAIL 11
 #define CH_WIRFT_SCHLEIM 12
 #define CH_NACH_FUETTERN 13
@@ -198,27 +198,27 @@ void Room0::eyeStart(EyeMode mode) {
 		adi->ani_count = 38;
 
 	if (mode == EYE_START) {
-		ani_klappe_delay();
+		trapDoorOpen();
 	}
 
 	ende = false;
 	flags.AniUserAction = true;
 
 	if (mode == EYE_START) {
-		det->enable_sound(KLAPPE_DETAIL, 0);
-		det->disable_sound(KLAPPE_DETAIL, 1);
+		det->enable_sound(FLAP_DETAIL, 0);
+		det->disable_sound(FLAP_DETAIL, 1);
 		det->enable_sound(SCHLAUCH_DETAIL, 0);
 		det->disable_sound(SCHLAUCH_DETAIL, 2);
 	} else {
-		det->disable_sound(KLAPPE_DETAIL, 0);
-		det->enable_sound(KLAPPE_DETAIL, 1);
+		det->disable_sound(FLAP_DETAIL, 0);
+		det->enable_sound(FLAP_DETAIL, 1);
 		det->disable_sound(SCHLAUCH_DETAIL, 0);
 		det->enable_sound(SCHLAUCH_DETAIL, 2);
 	}
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
 			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
@@ -259,12 +259,7 @@ void Room0::eyeStart(EyeMode mode) {
 	flags.AniUserAction = false;
 
 	if (mode == EYE_END) {
-		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
-		while (det->get_ani_status(KLAPPE_DETAIL)) {
-			set_ani_screen();
-			EVENTS_UPDATE;
-			SHOULD_QUIT_RETURN;
-		}
+		trapDoorClose();
 	}
 }
 
@@ -279,7 +274,7 @@ void Room0::eyeWait() {
 	while (adi->ani_count < 46) {
 		clear_prog_ani();
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -348,7 +343,7 @@ void Room0::eyeShoot() {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -374,7 +369,7 @@ void Room0::eyeShoot() {
 
 	det->start_detail(STERNE_STEHEN, 255, VOR);
 	clear_prog_ani();
-	spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+	spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 	spr_info[0].ZEbene = 190;
 	spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 	spr_info[1].ZEbene = 191;
@@ -399,7 +394,7 @@ void Room0::auge_schleim_back() {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 
 		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
@@ -440,7 +435,7 @@ void Room0::ch_schleim_auge() {
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -477,15 +472,15 @@ void Room0::fuetter_start(int16 mode) {
 		adi->ani_count = 135;
 
 	if (!mode) {
-		ani_klappe_delay();
-		det->enable_sound(KLAPPE_DETAIL, 0);
-		det->disable_sound(KLAPPE_DETAIL, 1);
+		trapDoorOpen();
+		det->enable_sound(FLAP_DETAIL, 0);
+		det->disable_sound(FLAP_DETAIL, 1);
 		det->enable_sound(FUETTER_SCHLAUCH, 0);
 		det->disable_sound(FUETTER_SCHLAUCH, 2);
 	} else {
 
-		det->disable_sound(KLAPPE_DETAIL, 0);
-		det->enable_sound(KLAPPE_DETAIL, 1);
+		det->disable_sound(FLAP_DETAIL, 0);
+		det->enable_sound(FLAP_DETAIL, 1);
 		det->disable_sound(FUETTER_SCHLAUCH, 0);
 		det->enable_sound(FUETTER_SCHLAUCH, 2);
 	}
@@ -496,7 +491,7 @@ void Room0::fuetter_start(int16 mode) {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -528,8 +523,8 @@ void Room0::fuetter_start(int16 mode) {
 	flags.AniUserAction = false;
 
 	if (mode) {
-		det->start_detail(KLAPPE_DETAIL, 1, RUECK);
-		while (det->get_ani_status(KLAPPE_DETAIL))
+		det->start_detail(FLAP_DETAIL, 1, RUECK);
+		while (det->get_ani_status(FLAP_DETAIL))
 			set_ani_screen();
 
 	}
@@ -538,7 +533,7 @@ void Room0::fuetter_start(int16 mode) {
 void Room0::kissen_wurf() {
 	for (int16 i = 0; i < 30 && !_G(spieler).R0KissenWurf; i++) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -595,7 +590,7 @@ void Room0::ch_fuetter() {
 		flags.AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		if (adi->ani_count == 136) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -637,7 +632,7 @@ void Room0::ch_fuetter() {
 	det->start_detail(CH_NACH_FUETTERN, 2, VOR);
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 
 		if (adi->ani_count > 138) {
@@ -689,7 +684,7 @@ void Room0::ch_kissen() {
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
@@ -714,25 +709,38 @@ void Room0::ch_kissen() {
 	clear_prog_ani();
 }
 
-void Room0::ani_klappe_delay() {
+void Room0::trapDoorOpen() {
 	int16 i;
-	det->start_detail(KLAPPE_DETAIL, 1, VOR);
-	while (det->get_ani_status(KLAPPE_DETAIL) && !SHOULD_QUIT) {
+	det->start_detail(FLAP_DETAIL, 1, VOR);
+	while (det->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 	}
 
 	flags.AniUserAction = true;
 	for (i = 0; i < 25; i++) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, KLAPPE_DETAIL, KLAPPE_SPRITE, ANI_HIDE);
+		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
+
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 	}
 
 	flags.AniUserAction = false;
 	clear_prog_ani();
 }
 
+void Room0::trapDoorClose() {
+	det->start_detail(FLAP_DETAIL, 1, RUECK);
+
+	while (det->get_ani_status(FLAP_DETAIL)) {
+		set_ani_screen();
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
+	}
+}
+
 void Room0::fuett_ani() {
 	int16 action;
 	action = false;
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index 3840a90e2f7..e7786dd4436 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -59,7 +59,8 @@ private:
 
 	static void kissen_wurf();
 
-	static void ani_klappe_delay();
+	static void trapDoorOpen();
+	static void trapDoorClose();
 
 	static void calc_auge_click(int16 ani_nr);
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 41d36fc7d39..ad6e884f722 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -223,7 +223,6 @@ void calc_z_ebene() {
 	}
 
 	for (i = 0; i < MAX_PROG_ANI; i++) {
-
 		if (spr_info[i].ZEbene < 200) {
 			z_obj_sort[z_count].ObjArt = ZOBJ_PROGANI;
 			z_obj_sort[z_count].ObjNr = i;


Commit: c3a90f66723d3e38d26cc8c7d982010d68154ca1
    https://github.com/scummvm/scummvm/commit/c3a90f66723d3e38d26cc8c7d982010d68154ca1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Fix loading of animation frame offset corrections

Changed paths:
    engines/chewy/datei.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index fdcde239c6d..35f7b4e4ee3 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -434,7 +434,7 @@ void datei::load_korrektur(const char *fname, int16 *sp) {
 						fcode = READFEHLER;
 						modul = DATEI;
 					} else {
-						for (int i = 0; i < header->count; ++i)
+						for (int i = 0; i < header->count * 2; ++i)
 							*sp++ = f.readSint16LE();
 					}
 				} else {


Commit: 834c15c351a37a28a3290d8ff0a8e5595345c552
    https://github.com/scummvm/scummvm/commit/834c15c351a37a28a3290d8ff0a8e5595345c552
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Re-enable room 0 start sequence

Changed paths:
    engines/chewy/rooms/room0.cpp


diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index fb6ee1633fd..473d62155fa 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -64,10 +64,10 @@ void Room0::entry() {
 		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
-#ifdef TODO_REENABLE
+
 		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(2, -1);
-#endif
+
 		show_cur();
 	}
 }


Commit: 533a97f4af256b0404865bbffb3e22270b3ca3b9
    https://github.com/scummvm/scummvm/commit/533a97f4af256b0404865bbffb3e22270b3ca3b9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Room 0 method renamings

Changed paths:
    engines/chewy/defines.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h
    engines/chewy/types.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 70103988df1..510914e7523 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -287,8 +287,8 @@ enum SetupScreenMode {
 #define BLITZ_POS 5
 #define VERSTECK_POS 6
 
-#define KISSEN_INV 0
-#define SCHLEIM_INV 1
+#define PILLOW_INV 0
+#define SLIME_INV 1
 #define RED_CARD_INV 2
 #define KABEL_INV 3
 #define MONOKEL_INV 4
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 473d62155fa..05c2a627904 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -51,7 +51,7 @@ namespace Rooms {
 #define KOPF3 48
 
 void Room0::entry() {
-	if (is_cur_inventar(0) || _G(spieler).R0KissenWurf ||
+	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow ||
 			obj->check_inventar(0))
 		det->hide_static_spr(6);
 
@@ -97,7 +97,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 				}
 
 				eyeAnim();
-			} else if (!_G(spieler).R0KissenWurf) {
+			} else if (!_G(spieler).R0PillowThrow) {
 				start_aad_wait(42, -1);
 				start_spz(2, 255, false, 0);
 
@@ -110,8 +110,8 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 				set_person_pos(191, 120, P_CHEWY, P_LEFT);
 			}
 
-			if (!_G(spieler).R0KissenWurf)
-				fuett_ani();
+			if (!_G(spieler).R0PillowThrow)
+				feederAni();
 
 			uhr->reset_timer(t_nr, 0);
 			flags.AutoAniPlay = false;
@@ -175,8 +175,8 @@ void Room0::eyeAnim() {
 
 		if (_G(spieler).R0SlimeUsed) {
 			start_aad(124);
-			ch_schleim_auge();
-			auge_schleim_back();
+			checkSlimeEye();
+			eyeSlimeBack();
 			auto_move(FUETTER_POS, P_CHEWY);
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		} else {
@@ -234,7 +234,7 @@ void Room0::eyeStart(EyeMode mode) {
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		calc_auge_click(3);
+		calcEyeClick(3);
 		out->back2screen(workpage);
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
@@ -283,7 +283,7 @@ void Room0::eyeWait() {
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		calc_auge_click(2);
+		calcEyeClick(2);
 		out->back2screen(workpage);
 
 		if (adi->delay_count > 0) {
@@ -301,7 +301,7 @@ void Room0::eyeWait() {
 	clear_prog_ani();
 }
 
-void Room0::calc_auge_click(int16 ani_nr) {
+void Room0::calcEyeClick(int16 ani_nr) {
 	int16 anz;
 	int16 x, y;
 	int16 i;
@@ -319,10 +319,10 @@ void Room0::calc_auge_click(int16 ani_nr) {
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(SCHLEIM_INV)) {
+			if (is_cur_inventar(SLIME_INV)) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
-			} else if (is_cur_inventar(KISSEN_INV)) {
+			} else if (is_cur_inventar(PILLOW_INV)) {
 
 				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
 			}
@@ -382,7 +382,7 @@ void Room0::eyeShoot() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
-void Room0::auge_schleim_back() {
+void Room0::eyeSlimeBack() {
 	ani_detail_info *adi;
 	bool ende;
 
@@ -423,7 +423,7 @@ void Room0::auge_schleim_back() {
 	clear_prog_ani();
 }
 
-void Room0::ch_schleim_auge() {
+void Room0::checkSlimeEye() {
 	ani_detail_info *adi;
 
 	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
@@ -461,7 +461,7 @@ void Room0::ch_schleim_auge() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
-void Room0::fuetter_start(int16 mode) {
+void Room0::feederStart(int16 mode) {
 	ani_detail_info *adi;
 	bool ende;
 
@@ -478,7 +478,6 @@ void Room0::fuetter_start(int16 mode) {
 		det->enable_sound(FUETTER_SCHLAUCH, 0);
 		det->disable_sound(FUETTER_SCHLAUCH, 2);
 	} else {
-
 		det->disable_sound(FLAP_DETAIL, 0);
 		det->enable_sound(FLAP_DETAIL, 1);
 		det->disable_sound(FUETTER_SCHLAUCH, 0);
@@ -500,7 +499,7 @@ void Room0::fuetter_start(int16 mode) {
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
 		if (!mode)
-			calc_kissen_click(1);
+			calcPillowClick(1);
 
 		out->back2screen(workpage);
 		if (adi->delay_count > 0)
@@ -530,8 +529,8 @@ void Room0::fuetter_start(int16 mode) {
 	}
 }
 
-void Room0::kissen_wurf() {
-	for (int16 i = 0; i < 30 && !_G(spieler).R0KissenWurf; i++) {
+void Room0::pillowThrow() {
+	for (int16 i = 0; i < 30 && !_G(spieler).R0PillowThrow; i++) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
@@ -540,14 +539,14 @@ void Room0::kissen_wurf() {
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		cur->plot_cur();
-		calc_kissen_click(1);
+		calcPillowClick(1);
 		out->back2screen(workpage);
 	}
 
 	clear_prog_ani();
 }
 
-void Room0::calc_kissen_click(int16 ani_nr) {
+void Room0::calcPillowClick(int16 ani_nr) {
 	int16 anz;
 	int16 x, y;
 	int16 i;
@@ -565,17 +564,17 @@ void Room0::calc_kissen_click(int16 ani_nr) {
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			if (is_cur_inventar(KISSEN_INV) && _G(spieler).R0SlimeUsed) {
+			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
 				del_inventar(_G(spieler).AkInvent);
-				_G(spieler).R0KissenWurf = 1;
-			} else if (is_cur_inventar(SCHLEIM_INV)) {
+				_G(spieler).R0PillowThrow = true;
+			} else if (is_cur_inventar(SLIME_INV)) {
 				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATEI);
 			}
 		}
 	}
 }
 
-void Room0::ch_fuetter() {
+void Room0::checkFeed() {
 	ani_detail_info *adi;
 	int16 i;
 	bool ende;
@@ -664,7 +663,7 @@ void Room0::ch_fuetter() {
 	clear_prog_ani();
 }
 
-void Room0::ch_kissen() {
+void Room0::checkPillow() {
 	ani_detail_info *adi;
 	bool ende, mode;
 
@@ -741,16 +740,16 @@ void Room0::trapDoorClose() {
 	}
 }
 
-void Room0::fuett_ani() {
+void Room0::feederAni() {
 	int16 action;
 	action = false;
-	fuetter_start(0);
+	feederStart(0);
 
 	if (_G(spieler).R0SlimeUsed) {
-		kissen_wurf();
-		if (_G(spieler).R0KissenWurf) {
-			ch_kissen();
-			fuetter_start(1);
+		pillowThrow();
+		if (_G(spieler).R0PillowThrow) {
+			checkPillow();
+			feederStart(1);
 			auto_move(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
 			out->cls();
@@ -777,10 +776,10 @@ void Room0::fuett_ani() {
 	}
 
 	if (action) {
-		ch_fuetter();
+		checkFeed();
 		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
 		start_aad(55);
-		fuetter_start(1);
+		feederStart(1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index e7786dd4436..65b82fc1fc1 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -48,29 +48,29 @@ private:
 	 */
 	static void eyeShoot();
 
-	static void auge_schleim_back();
+	static void eyeSlimeBack();
 
-	static void ch_schleim_auge();
+	static void checkSlimeEye();
 
-	static void fuetter_start(int16 mode);
+	static void feederStart(int16 mode);
 
-	static void ch_fuetter();
-	static void ch_kissen();
+	static void checkFeed();
+	static void checkPillow();
 
-	static void kissen_wurf();
+	static void pillowThrow();
 
 	static void trapDoorOpen();
 	static void trapDoorClose();
 
-	static void calc_auge_click(int16 ani_nr);
+	static void calcEyeClick(int16 ani_nr);
 
-	static void calc_kissen_click(int16 ani_nr);
+	static void calcPillowClick(int16 ani_nr);
 public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
 
 	static void eyeAnim();
-	static void fuett_ani();
+	static void feederAni();
 	static bool getPillow();
 	static bool pullSlime();
 };
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index fef632381d6..e569a8af63f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -33,7 +33,7 @@ namespace Chewy {
 
 struct SpielerFlags {
 	bool R0SlimeUsed : 1;
-	bool R0KissenWurf : 1;
+	bool R0PillowThrow : 1;
 	bool R0Monokel : 1;
 	bool R0GBuch : 1;
 	bool R2KabelBork : 1;


Commit: 32f2bbaa9f618e8de84ae3934d31aed9eca42b7f
    https://github.com/scummvm/scummvm/commit/32f2bbaa9f618e8de84ae3934d31aed9eca42b7f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Adding quit checks to room 0 loops

Changed paths:
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room0.h


diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 05c2a627904..238634f515b 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -233,11 +233,11 @@ void Room0::eyeStart(EyeMode mode) {
 		spr_info[3].ZEbene = 193;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
+		SHOULD_QUIT_RETURN;
+
 		cur->plot_cur();
 		calcEyeClick(3);
 		out->back2screen(workpage);
-		EVENTS_UPDATE;
-		SHOULD_QUIT_RETURN;
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -359,6 +359,8 @@ void Room0::eyeShoot() {
 		}
 
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -409,6 +411,8 @@ void Room0::eyeSlimeBack() {
 		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -497,6 +501,8 @@ void Room0::feederStart(int16 mode) {
 		if (flags.AniUserAction)
 			get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
+		SHOULD_QUIT_RETURN;
+
 		cur->plot_cur();
 		if (!mode)
 			calcPillowClick(1);
@@ -529,7 +535,7 @@ void Room0::feederStart(int16 mode) {
 	}
 }
 
-void Room0::pillowThrow() {
+void Room0::feederExtend() {
 	for (int16 i = 0; i < 30 && !_G(spieler).R0PillowThrow; i++) {
 		clear_prog_ani();
 		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -612,6 +618,7 @@ void Room0::checkFeed() {
 		spr_info[4] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[4].ZEbene = 194;
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -646,6 +653,7 @@ void Room0::checkFeed() {
 		spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 
 		if (!det->get_ani_status(CH_NACH_FUETTERN))
 			ende = true;
@@ -692,6 +700,7 @@ void Room0::checkPillow() {
 			spr_info[2].ZEbene = 192;
 		}
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 
 		if (mode) {
 			if (adi->delay_count > 0)
@@ -746,7 +755,7 @@ void Room0::feederAni() {
 	feederStart(0);
 
 	if (_G(spieler).R0SlimeUsed) {
-		pillowThrow();
+		feederExtend();
 		if (_G(spieler).R0PillowThrow) {
 			checkPillow();
 			feederStart(1);
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room0.h
index 65b82fc1fc1..6b8223c3cfe 100644
--- a/engines/chewy/rooms/room0.h
+++ b/engines/chewy/rooms/room0.h
@@ -57,7 +57,7 @@ private:
 	static void checkFeed();
 	static void checkPillow();
 
-	static void pillowThrow();
+	static void feederExtend();
 
 	static void trapDoorOpen();
 	static void trapDoorClose();


Commit: cc3969d7a876f2c53e1425521b0a8e7167ffd47a
    https://github.com/scummvm/scummvm/commit/cc3969d7a876f2c53e1425521b0a8e7167ffd47a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Fix cursor freezing as feeder tube appears

Changed paths:
    engines/chewy/rooms/room0.cpp


diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 238634f515b..50cef4c9e3f 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -498,11 +498,13 @@ void Room0::feederStart(int16 mode) {
 		spr_info[0].ZEbene = 190;
 		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
+
 		if (flags.AniUserAction)
 			get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
+		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
 
+		set_up_screen(NO_SETUP);
 		cur->plot_cur();
 		if (!mode)
 			calcPillowClick(1);


Commit: a6b1b4ef97e4e0f77368909f98508116ed33a2b7
    https://github.com/scummvm/scummvm/commit/a6b1b4ef97e4e0f77368909f98508116ed33a2b7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:20-08:00

Commit Message:
CHEWY: Fix palette updates in cutscenes

Changed paths:
    engines/chewy/flic.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index e58b28047d2..986c9451131 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -253,28 +253,30 @@ void flic::decode_frame() {
 }
 
 void flic::col256_chunk(byte *tmp) {
-	short int i;
-	short int packets;
-	short int count;
-	char anz, col;
-	char r, g, b;
-	packets = *(short int *)tmp;
+	int i;
+	int packets;
+	int count;
+	byte anz, col;
+	byte r, g, b;
+	packets = *(int16 *)tmp;
 	tmp += 2;
+
 	out->vsync_start();
 	if (cls_flag == true)
 		out->cls();
 	else
 		cls_flag = true;
+
 	if (tmp[1] == 0) {
 		tmp += 2;
-		for (i = 0; i < 768; i++)
+		for (i = 0; i < PALETTE_SIZE; i++)
 			tmp[i] >>= 2;
 		if (fade_flag == false)
 			out->set_palette(tmp);
 		else {
-			memset(fade_pal, 0, 768);
+			memset(fade_pal, 0, PALETTE_SIZE);
 			out->set_palette(fade_pal);
-			memcpy(fade_pal, tmp, 768);
+			memcpy(fade_pal, tmp, PALETTE_SIZE);
 		}
 	} else {
 		col = 0;
@@ -293,25 +295,27 @@ void flic::col256_chunk(byte *tmp) {
 }
 
 void flic::col64_chunk(byte *tmp) {
-	short int i;
-	short int packets;
-	short int count;
-	char anz, col;
-	char r, g, b;
-	packets = *((short int *)tmp);
+	int i;
+	int packets;
+	int count;
+	byte anz, col;
+	byte r, g, b;
+	packets = *((int16 *)tmp);
 	tmp += 2;
+
 	out->vsync_start();
 	if (cls_flag == true)
 		out->cls();
 	else
 		cls_flag = true;
+
 	if (!tmp[1]) {
 		if (fade_flag == false)
 			out->set_palette(tmp + 2);
 		else {
-			memset(fade_pal, 0, 768);
+			memset(fade_pal, 0, PALETTE_SIZE);
 			out->set_palette(fade_pal);
-			memcpy(fade_pal, tmp + 2, 768);
+			memcpy(fade_pal, tmp + 2, PALETTE_SIZE);
 		}
 	} else {
 		col = 0;


Commit: 465f9fb731d54e02f3d7a63a7ec54fe6e061d2fd
    https://github.com/scummvm/scummvm/commit/465f9fb731d54e02f3d7a63a7ec54fe6e061d2fd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Add debugger item command

Changed paths:
    engines/chewy/debugger.cpp
    engines/chewy/debugger.h


diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 86749177e12..4d1fc17d664 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -44,6 +44,7 @@ static int strToInt(const char *s) {
 
 Debugger::Debugger() : GUI::Debugger() {
 	registerCmd("room", WRAP_METHOD(Debugger, Cmd_GotoRoom));
+	registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
 }
 
 Debugger::~Debugger() {
@@ -65,4 +66,16 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 	}
 }
 
+bool Debugger::Cmd_Item(int argc, const char **argv) {
+	if (argc == 1) {
+		debugPrintf("%s [itemNum]\n", argv[0]);
+	} else {
+		int itemNum = strToInt(argv[1]);
+		invent_2_slot(itemNum);
+		debugPrintf("Done.\n");
+	}
+
+	return true;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/debugger.h b/engines/chewy/debugger.h
index f1eb2515461..a681e06587d 100644
--- a/engines/chewy/debugger.h
+++ b/engines/chewy/debugger.h
@@ -29,6 +29,7 @@ namespace Chewy {
 class Debugger : public GUI::Debugger {
 protected:
 	bool Cmd_GotoRoom(int argc, const char **argv);
+	bool Cmd_Item(int argc, const char **argv);
 public:
 	Debugger();
 	~Debugger() override;


Commit: a0c46427888262c4db6c5a6b2c13a3119c669b3e
    https://github.com/scummvm/scummvm/commit/a0c46427888262c4db6c5a6b2c13a3119c669b3e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Added extra should quit checks

Changed paths:
    engines/chewy/ch_icm.cpp
    engines/chewy/debug.cpp
    engines/chewy/episode1.cpp
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp


diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index ebc4b4bce67..602f8251ab6 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -320,6 +320,7 @@ void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
 		              plot_maus();
 		              out->setze_zeiger(screen0);
 		              out->back2screen(workpage);
+		SHOULD_QUIT_RETURN;
 	}
 }
 
@@ -629,6 +630,7 @@ void get_auto_mov() {
 		}
 		cur->plot_cur();
 		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN;
 	}
 	if (save_flag == false) {
 		x = 160;
@@ -1045,6 +1047,7 @@ void set_z_ebene() {
 		}
 		cur->plot_cur();
 		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN;
 	}
 	if (save_flag == false) {
 		x = 160;
@@ -1084,7 +1087,10 @@ int16 ja_nein() {
 			ende = 1;
 			break;
 
+		default:
+			break;
 		}
+		SHOULD_QUIT_RETURN;
 	}
 	return ret;
 }
@@ -1311,6 +1317,7 @@ void set_person() {
 		}
 		cur->plot_cur();
 		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN;
 	}
 	SetUpScreenFunc = TmpSetUpScreenFunc;
 }
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
index 469d054e7bb..1d2c95507c3 100644
--- a/engines/chewy/debug.cpp
+++ b/engines/chewy/debug.cpp
@@ -46,8 +46,9 @@ void look_debug_action(int16 key_nr) {
 			case ALT + ENTER:
 //				look_icm_action();
 				break;
-
 			}
+
+			SHOULD_QUIT_RETURN;
 		}
 		break;
 
@@ -111,6 +112,8 @@ void test_load(void *handle, taf_info *Tt, int16 anz) {
 		out->printxy(0, 0, 255, 0, 0, "F1 Bereich laden\0");
 		out->printxy(0, 10, 255, 0, 0, "F2 Sprites anzeigen\0");
 		out->printxy(0, 20, 255, 0, 0, "F3 Bereich löschen\0");
+		SHOULD_QUIT_RETURN;
+
 		switch (in->get_switch_code()) {
 		case ESC :
 			ende = 1;
@@ -146,6 +149,8 @@ void test_load(void *handle, taf_info *Tt, int16 anz) {
 			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &spr);
 			in ->neuer_kb_handler(&kbinfo);
 			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			SHOULD_QUIT_RETURN;
+
 			if (abfrage != 27) {
 				ende1 = 0;
 				action = 1;
@@ -205,7 +210,6 @@ void test_load(void *handle, taf_info *Tt, int16 anz) {
 			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 			in ->neuer_kb_handler(&kbinfo);
 			break;
-
 		}
 	}
 #endif
diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index f5b82fe337b..032dd428007 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -177,6 +177,7 @@ int16 r4_sonde_comp() {
 			minfo.y = 123;
 		}
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN0;
 	}
 	g_events->delay(500);
 
@@ -371,6 +372,7 @@ void r3_sonde_knarre() {
 			ende = 1;
 		}
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 	}
 
 	clear_prog_ani();
@@ -826,9 +828,10 @@ void r8_start_verbrennen() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ablock12);
 		ende = 0;
-		while (!ende && det->get_ani_status(9) && !SHOULD_QUIT) {
-
+		while (!ende && det->get_ani_status(9)) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
+
 			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 				if (minfo.x > 146 && minfo.x < 208 &&
 				        minfo.y > 107 && minfo.y < 155)
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 02cde7d1f71..81420fe29b3 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -345,6 +345,8 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				kbinfo->scan_code = Common::KEYCODE_INVALID;
 				while (!ende) {
 					cur->plot_cur();
+					SHOULD_QUIT_RETURN0;
+
 					switch_code = in->get_switch_code();
 					if ((kbinfo->scan_code == 36) ||
 					        (kbinfo->scan_code == 44) ||
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 17609417781..339c3f7461a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -858,6 +858,7 @@ void kb_mov(int16 mode) {
 			ende = 1;
 		else
 			set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 	}
 }
 
@@ -1339,6 +1340,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 						ende = 1;
 					}
 					set_up_screen(DO_SETUP);
+					SHOULD_QUIT_RETURN0;
 				}
 			}
 			_G(auto_p_nr) = P_CHEWY;
@@ -1387,6 +1389,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 					ende = 1;
 				}
 				set_up_screen(DO_SETUP);
+				SHOULD_QUIT_RETURN;
 			}
 		}
 
@@ -1959,7 +1962,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 	_G(spieler).scrolly >>= 1;
 	_G(spieler).scrolly <<= 1;
 	ende = false;
-	while (!ende && !SHOULD_QUIT) {
+	while (!ende) {
 		if (scrx < _G(spieler).scrollx)
 			_G(spieler).scrollx -= _G(spieler).ScrollxStep;
 		else if (scrx > _G(spieler).scrollx)
@@ -1971,6 +1974,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 		if (scrx == _G(spieler).scrollx && scry == _G(spieler).scrolly)
 			ende = true;
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 	}
 	_G(maus_links_click) = tmp_maus_click;
 }
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index acc29569149..4638ec3d029 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -529,8 +529,8 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 	}
 	else
 		ende = 1;
-	while (!ende) {
 
+	while (!ende) {
 		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 		if (minfo.button) {
 			if (minfo.button == 2) {
@@ -630,13 +630,17 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		cur->plot_cur();
 
 		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN0;
 	}
+
 	while (in->get_switch_code() == ESC) {
 		set_up_screen(NO_SETUP);
 		plot_inventar_menu();
 		cur->plot_cur();
 		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN0;
 	}
+
 	return ret;
 }
 


Commit: 10faec434fc2f71080414036216149dfcdd6439f
    https://github.com/scummvm/scummvm/commit/10faec434fc2f71080414036216149dfcdd6439f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Move ANI defines to room.h

Changed paths:
    engines/chewy/room.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/rooms.h


diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 3296f6e6940..ba37b0d3d27 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -26,6 +26,9 @@
 
 namespace Chewy {
 
+#define ANI_HIDE 0
+#define ANI_SHOW 1
+
 #define MAX_ABLAGE 4
 
 #define ABLAGE_BLOCK_SIZE 64000l
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 50cef4c9e3f..797bc4cbce1 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -23,8 +23,8 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room0.h"
-#include "chewy/rooms/rooms.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index b158692d3ce..b74b4c07299 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -31,9 +31,6 @@
 #include "chewy/episode4.h"
 #include "chewy/episode5.h"
 
-#define ANI_HIDE 0
-#define ANI_SHOW 1
-
 namespace Chewy {
 
 using Chewy::Rooms::Room0;


Commit: 1dc023c837a3f4dac3826761ac3989ba021b70e2
    https://github.com/scummvm/scummvm/commit/1dc023c837a3f4dac3826761ac3989ba021b70e2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Added Room2 class

Changed paths:
  A engines/chewy/rooms/room2.cpp
  A engines/chewy/rooms/room2.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 032dd428007..36abc2a070f 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -240,7 +240,7 @@ void r3_terminal() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		} else if (!_G(spieler).R2FussSchleim) {
 			start_ani_block(2, ablock2);
-			r2_jump_out_r1(9);
+			Room2::jump_out_r1(9);
 			start_aad_wait(45, -1);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -551,18 +551,6 @@ void r3_sonde_aufnahme() {
 	_G(auto_obj) = 0;
 }
 
-void r2_jump_out_r1(int16 nr) {
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(nr, 1, ANI_VOR);
-	set_up_screen(DO_SETUP);
-	det->stop_detail(6);
-	set_person_pos(32, 127, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	clear_prog_ani();
-	switch_room(1);
-	check_shad(2, 1);
-}
-
 void r5_knopf() {
 	int16 str_nr;
 	if (_G(spieler).R5Terminal) {
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 6ebb76f6419..550ef230e7c 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -26,8 +26,6 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-void r2_jump_out_r1(int16 nr);
-
 void r3_terminal();
 
 void r3_init_sonde();
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index a4b2db6aebb..f8470da442b 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -50,7 +50,8 @@ MODULE_OBJS = \
 	timer.o \
 	types.o \
 	video/cfo_decoder.o \
-	rooms/room0.o
+	rooms/room0.o \
+	rooms/room2.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7ebd0cbd4f4..2ca6082b1df 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -289,7 +289,7 @@ void check_ged_action(int16 index) {
 				} else {
 					start_ani_block(2, ablock4);
 				}
-				r2_jump_out_r1(9);
+				Room2::jump_out_r1(9);
 				break;
 
 			default:
@@ -635,8 +635,7 @@ void enter_room(int16 eib_nr) {
 		break;
 
 	case 2:
-		if (!_G(spieler).R2KabelBork)
-			det->start_detail(5, 255, 0);
+		Room2::entry();
 		break;
 
 	case 3:
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
new file mode 100644
index 00000000000..210493cceeb
--- /dev/null
+++ b/engines/chewy/rooms/room2.cpp
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room2.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room2::entry() {
+	if (!_G(spieler).R2KabelBork)
+		det->start_detail(5, 255, 0);
+}
+
+void Room2::jump_out_r1(int16 nr) {
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(nr, 1, ANI_VOR);
+	set_up_screen(DO_SETUP);
+	det->stop_detail(6);
+	set_person_pos(32, 127, P_CHEWY, P_LEFT);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	clear_prog_ani();
+	switch_room(1);
+	check_shad(2, 1);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room2.h b/engines/chewy/rooms/room2.h
new file mode 100644
index 00000000000..3498250c17b
--- /dev/null
+++ b/engines/chewy/rooms/room2.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM2_H
+#define CHEWY_ROOMS_ROOM2_H
+
+namespace Chewy {
+namespace Rooms {
+
+#include "chewy/ngsdefs.h"
+
+class Room2 {
+public:
+	static void entry();
+	static void jump_out_r1(int16 nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index b74b4c07299..fb57e114bf2 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -23,6 +23,7 @@
 #define CHEWY_ROOMS_ROOMS_H
 
 #include "chewy/rooms/room0.h"
+#include "chewy/rooms/room2.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -34,6 +35,7 @@
 namespace Chewy {
 
 using Chewy::Rooms::Room0;
+using Chewy::Rooms::Room2;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index ba958919286..9e3a828212e 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -824,7 +824,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						auto_move(3, P_CHEWY);
 						det->stop_detail(5);
 						det->start_detail(6, 2, ANI_VOR);
-						r2_jump_out_r1(9);
+						Room2::jump_out_r1(9);
 						break;
 
 					case 62:


Commit: 05e4f0f527066ef517c78ee0e37b63d9b29be0bf
    https://github.com/scummvm/scummvm/commit/05e4f0f527066ef517c78ee0e37b63d9b29be0bf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Added Room3 and Room4 classes

Changed paths:
  A engines/chewy/rooms/room3.cpp
  A engines/chewy/rooms/room3.h
  A engines/chewy/rooms/room4.cpp
  A engines/chewy/rooms/room4.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 36abc2a070f..583e835fd3d 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -97,108 +97,6 @@ void load_chewy_taf(int16 taf_nr) {
 	}
 }
 
-#define HAND_NORMAL 68
-#define HAND_CLICK 69
-#define RAHMEN_ROT 70
-#define RAHMEN_GELB 71
-
-int16 r4_sonde_comp() {
-	int16 ende;
-
-	int16 spr_nr;
-	int16 cur_x;
-
-	int16 cur_pos[3][2] = { {  83, 106 },
-	                        { 136, 103 },
-	                        { 188, 101 }
-	                      };
-
-	int16 console[3][4] = { {  82, 158, 143, 199 },
-	                        { 150, 159, 194, 193 },
-	                        { 201, 154, 262, 193 }
-	                      };
-
-	cur_2_inventory();
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(cur_display) = false;
-	switch_room(4);
-	_G(cur_display) = true;
-	ende = 0;
-	curblk.sprite = room_blk.DetImage;
-	cur_x = 1;
-	spr_nr = RAHMEN_ROT;
-	cur->move(160, 160);
-
-	start_aad(46);
-	while (!ende) {
-		maus_action();
-		if (_G(maus_links_click)) {
-			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)console, 3)) {
-			case 0:
-				if (cur_x > 0)
-					--cur_x;
-				else
-					cur_x = 2;
-				det->play_sound(0, 1);
-				break;
-
-			case 1:
-				ende = 1;
-				spr_nr = RAHMEN_GELB;
-				det->play_sound(0, 0);
-				break;
-
-			case 2:
-				if (cur_x < 2)
-					++cur_x;
-				else
-					cur_x = 0;
-				det->play_sound(0, 2);
-				break;
-
-			}
-		}
-		spr_info[0].Image = room_blk.DetImage[spr_nr];
-
-		spr_info[0].ZEbene = 0;
-		spr_info[0].X = cur_pos[cur_x][0];
-		spr_info[0].Y = cur_pos[cur_x][1];
-		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-			curani.ani_anf = HAND_CLICK;
-			curani.ani_end = HAND_CLICK;
-		} else {
-			curani.ani_anf = HAND_NORMAL;
-			curani.ani_end = HAND_NORMAL;
-		}
-		cursor_wahl(CUR_USER);
-		_G(spieler).CurHoehe = 16;
-		in->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
-		if (minfo.y < 124) {
-			minfo.y = 123;
-		}
-		set_up_screen(DO_SETUP);
-		SHOULD_QUIT_RETURN0;
-	}
-	g_events->delay(500);
-
-	clear_prog_ani();
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
-	set_person_pos(118 - CH_HOT_MOV_X,
-	               164 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-	spieler_vector[P_CHEWY].DelayCount = 0;
-	_G(maus_links_click) = false;
-	minfo.button = 0;
-	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
-	fx_blend = BLEND1;
-	atds->stop_aad();
-
-	return cur_x;
-}
-
 void switch_room(int16 nr) {
 	fx_blend = BLEND1;
 	exit_room(-1);
@@ -210,347 +108,6 @@ void switch_room(int16 nr) {
 	set_up_screen(DO_SETUP);
 }
 
-void r3_terminal() {
-	show_cur();
-	_G(auto_obj) = 0;
-	switch (r4_sonde_comp()) {
-	case 0:
-		r3_sonde_aufnahme();
-		spr_info[0].Image = room_blk.DetImage[120];
-		spr_info[0].X = 250;
-		spr_info[0].Y = 2;
-		spr_info[0].ZEbene = 0;
-
-		if (!_G(spieler).R2KabelBork) {
-			det->stop_detail(5);
-			start_ani_block(2, ablock3);
-			if (_G(spieler).R2FussSchleim) {
-				_G(spieler).R2FussSchleim = 0;
-
-				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
-			}
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_VOR);
-			set_up_screen(DO_SETUP);
-			det->stop_detail(6);
-			clear_prog_ani();
-			switch_room(1);
-			start_ani_block(2, ablock0);
-			set_person_pos(92, 131, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-		} else if (!_G(spieler).R2FussSchleim) {
-			start_ani_block(2, ablock2);
-			Room2::jump_out_r1(9);
-			start_aad_wait(45, -1);
-		} else {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock1);
-			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
-			clear_prog_ani();
-			_G(auto_obj) = 0;
-			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			ERROR
-			fx_blend = BLEND1;
-			start_ani_block(3, ablock5);
-			set_person_pos(91, 107, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-		}
-		clear_prog_ani();
-		break;
-
-	case 1:
-		_G(auto_obj) = 1;
-		_G(maus_links_click) = 0;
-		minfo.button = 0;
-		stop_person(P_CHEWY);
-		start_aad_wait(51, -1);
-		set_up_screen(DO_SETUP);
-		break;
-
-	case 2:
-		r3_sonde_knarre();
-		break;
-
-	}
-}
-
-MovLine sonde_mpkt[3] = {
-	{ {  13, 45,  75 }, 1, 2 },
-	{ { 237, 52, 160 }, 1, 2 },
-	{ {   4, 83, 180 }, 0, 2 }
-};
-int16 sonde_phasen[4][2] = {
-	{ 120, 120 },
-	{ 118, 118 },
-	{ 141, 141 },
-	{ 119, 119 }
-};
-
-void r3_init_sonde() {
-#define SONDE_OBJ 0
-#define SONDE_OBJ1 1
-	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].AtsText = 24;
-	mov_phasen[SONDE_OBJ].Lines = 3;
-	mov_phasen[SONDE_OBJ].Repeat = 255;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
-	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt);
-}
-
-#define KOPF_SCHUSS 0
-#define SONDE_ANI 2
-#define SONDE_SHOOT 3
-#define SONDE_RET 4
-#define SONDE_RAUCH 5
-#define SONDE_REIN 6
-#define SONDE_GREIF 7
-#define SONDE_GREIF1 8
-
-#define SONDE_SPR_R 118
-#define SONDE_SPR_L 120
-
-void r3_sonde_knarre() {
-	MovLine sonde_mpkt1[3] = {
-		{ { 237,  52, 160 }, 0, 2 },
-		{ {  13,  45,  75 }, 0, 4 },
-		{ {   4, 100, 180 }, 1, 2 }
-	};
-	MovLine sonde_mpkt2[2] = {
-		{ {   4, 100, 180 }, 1, 3 },
-		{ {  13,  45,  75 }, 1, 3 }
-	};
-	room_detail_info *rdi;
-	int16 tmp;
-	int16 ende;
-	hide_cur();
-	rdi = det->get_room_detail_info();
-
-	det->load_taf_seq(162, 17, 0);
-	tmp = _G(zoom_horizont);
-	_G(zoom_horizont) = 100;
-	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].Lines = 3;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
-	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
-	              *)sonde_mpkt1);
-	flags.AniUserAction = false;
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
-		set_ani_screen();
-
-	det->start_detail(SONDE_SHOOT, 1, ANI_VOR);
-	ende = 0;
-	while (!ende) {
-		clear_prog_ani();
-		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
-		}
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 &&
-		        rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
-			spr_info[1].ZEbene = 190;
-		}
-		else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 &&
-		         det->get_ani_status(SONDE_RET) == 0) {
-
-			spr_info[2] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-			spr_info[2].ZEbene = 190;
-		}
-		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178) {
-			det->start_detail(SONDE_RET, 3, ANI_RUECK);
-		}
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28) {
-			ende = 1;
-		}
-		set_ani_screen();
-		SHOULD_QUIT_RETURN;
-	}
-
-	clear_prog_ani();
-	det->start_detail(SONDE_RAUCH, 3, ANI_VOR);
-	ende = 0;
-	while (det->get_ani_status(SONDE_RAUCH)) {
-
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
-
-		spr_info[1] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-		spr_info[1].ZEbene = 190;
-		++ende;
-		if (ende == 3)
-			_G(spieler).PersonHide[P_CHEWY] = false;
-		set_ani_screen();
-	}
-	start_aad_wait(53, -1);
-
-	clear_prog_ani();
-	det->start_detail(SONDE_REIN, 1, ANI_RUECK);
-	while (det->get_ani_status(SONDE_REIN)) {
-
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
-		set_ani_screen();
-	}
-	clear_prog_ani();
-
-	mov_phasen[SONDE_OBJ].Lines = 2;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 28;
-	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
-	              *)sonde_mpkt2);
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
-		set_ani_screen();
-	det->del_taf_tbl(162, 17, 0);
-	_G(zoom_horizont) = tmp;
-	r3_init_sonde();
-
-	show_cur();
-}
-
-void r3_sonde_aufnahme() {
-	int16 tmp;
-	int16 i;
-	int16 spr_nr;
-	int16 anistart;
-//	room_detail_info *rdi;
-
-	MovLine sonde_mpkt1[2] = {
-		{ { 237,  52, 160 }, 0, 2 },
-		{ { 144, 100, 180 }, 0, 2 }
-	};
-	MovLine sonde_mpkt_[4][2] = {
-		{ { { 144, 100, 180 }, 0, 2 },
-		  { { 110, 100, 180 }, 0, 2 } },
-
-		{ { { 110, 101, 180 }, 0, 3 },
-		  { { -55,  50, 180 }, 0, 3 } },
-
-		{ { { 310,  20, 180 }, 0, 3 },
-		  { { -55,  20, 180 }, 0, 3 } },
-
-		{ { { 310,   2, 180 }, 0, 3 },
-		  { { 250,   2, 180 }, 0, 3 } }
-	};
-	flags.AniUserAction = false;
-	hide_cur();
-	/*rdi = */(void)det->get_room_detail_info();
-	tmp = _G(zoom_horizont);
-	_G(zoom_horizont) = 100;
-	anistart = false;
-	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].Lines = 2;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
-	init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt1);
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
-		set_ani_screen();
-
-	det->start_detail(SONDE_GREIF, 1, ANI_VOR);
-	while (det->get_ani_status(SONDE_GREIF)) {
-		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
-		spr_info[0].ZEbene = 146;
-		set_ani_screen();
-	}
-
-	clear_prog_ani();
-	_G(auto_obj) = 2;
-
-	spr_nr = 140;
-	for (i = 0; i < 4; i++) {
-
-		mov_phasen [SONDE_OBJ].Lines = 2;
-		mov_phasen [SONDE_OBJ].Repeat = 1;
-		mov_phasen [SONDE_OBJ].ZoomFak = 0;
-		auto_mov_obj [SONDE_OBJ].Id = AUTO_OBJ0;
-		auto_mov_obj [SONDE_OBJ].Mode = 1;
-		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ].Lines, sonde_mpkt_[i]);
-		mov_phasen [SONDE_OBJ1].Lines = 2;
-		mov_phasen [SONDE_OBJ1].Repeat = 1;
-		mov_phasen [SONDE_OBJ1].ZoomFak = 0;
-		auto_mov_obj [SONDE_OBJ1].Id = AUTO_OBJ1;
-		auto_mov_obj [SONDE_OBJ1].Mode = 1;
-		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ1, &sonde_phasen[0][0], mov_phasen[SONDE_OBJ1].Lines, sonde_mpkt_[i]);
-		mov_phasen [SONDE_OBJ1].Phase[0][0] = spr_nr;
-		mov_phasen [SONDE_OBJ1].Phase[0][1] = spr_nr;
-		while (mov_phasen[SONDE_OBJ].Repeat != -1) {
-
-			if (i == 2 || i == 1) {
-
-				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
-					if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-						if (is_cur_inventar(SPINAT_INV)) {
-							ssi[0].X = 120;
-							ssi[0].Y = 100;
-							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
-
-								start_aad(50);
-							else
-
-								start_aad(44);
-							del_inventar(_G(spieler).AkInvent);
-							_G(spieler).R2FussSchleim = 1;
-							mov_phasen[SONDE_OBJ1].Phase[0][0] = 142;
-							mov_phasen[SONDE_OBJ1].Phase[0][1] = 149;
-							auto_mov_vector[SONDE_OBJ1].PhAnz = 8;
-							anistart = true;
-						}
-					}
-				}
-			}
-			set_ani_screen();
-			if (anistart) {
-				if (auto_mov_vector[SONDE_OBJ1].PhNr == 7) {
-					anistart = false;
-					spr_nr = 149;
-					mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
-					mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
-					auto_mov_vector[SONDE_OBJ1].PhAnz = 1;
-					auto_mov_vector[SONDE_OBJ1].PhNr = 0;
-				}
-			}
-		}
-		switch (i) {
-		case 0:
-			show_cur();
-			start_aad(52);
-			flags.AniUserAction = true;
-			spr_nr = 141;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->load_taf_seq(142, 8, 0);
-			break;
-
-		case 1:
-			switch_room(1);
-			break;
-
-		case 2:
-			det->del_taf_tbl(142, 7, 0);
-			flags.AniUserAction = false;
-			switch_room(2);
-			break;
-
-		}
-	}
-	flags.AniUserAction = false;
-	_G(zoom_horizont) = tmp;
-	_G(auto_obj) = 0;
-}
-
 void r5_knopf() {
 	int16 str_nr;
 	if (_G(spieler).R5Terminal) {
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 550ef230e7c..640d1f78efc 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -26,14 +26,6 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-void r3_terminal();
-
-void r3_init_sonde();
-
-void r3_sonde_knarre();
-
-void r3_sonde_aufnahme();
-
 int16 r4_sonde_comp();
 
 void r5_knopf();
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index f8470da442b..aa0a70d00ff 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -51,7 +51,9 @@ MODULE_OBJS = \
 	types.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \
-	rooms/room2.o
+	rooms/room2.o \
+	rooms/room3.o \
+	rooms/room4.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2ca6082b1df..ca776f4b1a5 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -102,7 +102,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 
 	case ROOM_3_1:
-		r3_terminal();
+		Room3::terminal();
 		break;
 
 	case ROOM_9_4:
@@ -639,7 +639,7 @@ void enter_room(int16 eib_nr) {
 		break;
 
 	case 3:
-		r3_init_sonde();
+		Room3::init_sonde();
 		break;
 
 	case 5:
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
new file mode 100644
index 00000000000..b3fdf73e398
--- /dev/null
+++ b/engines/chewy/rooms/room3.cpp
@@ -0,0 +1,375 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room2.h"
+#include "chewy/rooms/room3.h"
+#include "chewy/rooms/room4.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define KOPF_SCHUSS 0
+#define SONDE_ANI 2
+#define SONDE_SHOOT 3
+#define SONDE_RET 4
+#define SONDE_RAUCH 5
+#define SONDE_REIN 6
+#define SONDE_GREIF 7
+#define SONDE_GREIF1 8
+
+#define SONDE_SPR_R 118
+#define SONDE_SPR_L 120
+
+MovLine SONDE_MPKT[3] = {
+	{ {  13, 45,  75 }, 1, 2 },
+	{ { 237, 52, 160 }, 1, 2 },
+	{ {   4, 83, 180 }, 0, 2 }
+};
+int16 SONDE_PHASEN[4][2] = {
+	{ 120, 120 },
+	{ 118, 118 },
+	{ 141, 141 },
+	{ 119, 119 }
+};
+
+void Room3::terminal() {
+	show_cur();
+	_G(auto_obj) = 0;
+	switch (Room4::sonde_comp()) {
+	case 0:
+		sonde_aufnahme();
+		spr_info[0].Image = room_blk.DetImage[120];
+		spr_info[0].X = 250;
+		spr_info[0].Y = 2;
+		spr_info[0].ZEbene = 0;
+
+		if (!_G(spieler).R2KabelBork) {
+			det->stop_detail(5);
+			start_ani_block(2, ablock3);
+			if (_G(spieler).R2FussSchleim) {
+				_G(spieler).R2FussSchleim = 0;
+
+				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
+			}
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(8, 1, ANI_VOR);
+			set_up_screen(DO_SETUP);
+			det->stop_detail(6);
+			clear_prog_ani();
+			switch_room(1);
+			start_ani_block(2, ablock0);
+			set_person_pos(92, 131, P_CHEWY, P_LEFT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+		} else if (!_G(spieler).R2FussSchleim) {
+			start_ani_block(2, ablock2);
+			Room2::jump_out_r1(9);
+			start_aad_wait(45, -1);
+		} else {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_ani_block(2, ablock1);
+			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
+			clear_prog_ani();
+			_G(auto_obj) = 0;
+			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			ERROR
+				fx_blend = BLEND1;
+			start_ani_block(3, ablock5);
+			set_person_pos(91, 107, P_CHEWY, P_LEFT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+		}
+		clear_prog_ani();
+		break;
+
+	case 1:
+		_G(auto_obj) = 1;
+		_G(maus_links_click) = 0;
+		minfo.button = 0;
+		stop_person(P_CHEWY);
+		start_aad_wait(51, -1);
+		set_up_screen(DO_SETUP);
+		break;
+
+	case 2:
+		sonde_knarre();
+		break;
+
+	}
+}
+
+void Room3::init_sonde() {
+#define SONDE_OBJ 0
+#define SONDE_OBJ1 1
+	_G(auto_obj) = 1;
+	mov_phasen[SONDE_OBJ].AtsText = 24;
+	mov_phasen[SONDE_OBJ].Lines = 3;
+	mov_phasen[SONDE_OBJ].Repeat = 255;
+	mov_phasen[SONDE_OBJ].ZoomFak = 20;
+	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)SONDE_MPKT);
+}
+
+void Room3::sonde_knarre() {
+	MovLine sonde_mpkt1[3] = {
+		{ { 237,  52, 160 }, 0, 2 },
+		{ {  13,  45,  75 }, 0, 4 },
+		{ {   4, 100, 180 }, 1, 2 }
+	};
+	MovLine sonde_mpkt2[2] = {
+		{ {   4, 100, 180 }, 1, 3 },
+		{ {  13,  45,  75 }, 1, 3 }
+	};
+	room_detail_info *rdi;
+	int16 tmp;
+	int16 ende;
+	hide_cur();
+	rdi = det->get_room_detail_info();
+
+	det->load_taf_seq(162, 17, 0);
+	tmp = _G(zoom_horizont);
+	_G(zoom_horizont) = 100;
+	_G(auto_obj) = 1;
+	mov_phasen[SONDE_OBJ].Lines = 3;
+	mov_phasen[SONDE_OBJ].Repeat = 1;
+	mov_phasen[SONDE_OBJ].ZoomFak = 20;
+	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
+		*)sonde_mpkt1);
+	flags.AniUserAction = false;
+	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+		set_ani_screen();
+
+	det->start_detail(SONDE_SHOOT, 1, ANI_VOR);
+	ende = 0;
+	while (!ende) {
+		clear_prog_ani();
+		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			det->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
+		}
+		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0].ZEbene = 0;
+		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 &&
+			rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
+			spr_info[1] = det->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
+			spr_info[1].ZEbene = 190;
+		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 &&
+			det->get_ani_status(SONDE_RET) == 0) {
+
+			spr_info[2] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+			spr_info[2].ZEbene = 190;
+		}
+		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178) {
+			det->start_detail(SONDE_RET, 3, ANI_RUECK);
+		}
+		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28) {
+			ende = 1;
+		}
+		set_ani_screen();
+		SHOULD_QUIT_RETURN;
+	}
+
+	clear_prog_ani();
+	det->start_detail(SONDE_RAUCH, 3, ANI_VOR);
+	ende = 0;
+	while (det->get_ani_status(SONDE_RAUCH)) {
+
+		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0].ZEbene = 0;
+
+		spr_info[1] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+		spr_info[1].ZEbene = 190;
+		++ende;
+		if (ende == 3)
+			_G(spieler).PersonHide[P_CHEWY] = false;
+		set_ani_screen();
+	}
+	start_aad_wait(53, -1);
+
+	clear_prog_ani();
+	det->start_detail(SONDE_REIN, 1, ANI_RUECK);
+	while (det->get_ani_status(SONDE_REIN)) {
+
+		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0].ZEbene = 0;
+		set_ani_screen();
+	}
+	clear_prog_ani();
+
+	mov_phasen[SONDE_OBJ].Lines = 2;
+	mov_phasen[SONDE_OBJ].Repeat = 1;
+	mov_phasen[SONDE_OBJ].ZoomFak = 28;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
+		*)sonde_mpkt2);
+	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+		set_ani_screen();
+	det->del_taf_tbl(162, 17, 0);
+	_G(zoom_horizont) = tmp;
+	init_sonde();
+
+	show_cur();
+}
+
+void Room3::sonde_aufnahme() {
+	int16 tmp;
+	int16 i;
+	int16 spr_nr;
+	int16 anistart;
+	//	room_detail_info *rdi;
+
+	MovLine sonde_mpkt1[2] = {
+		{ { 237,  52, 160 }, 0, 2 },
+		{ { 144, 100, 180 }, 0, 2 }
+	};
+	MovLine sonde_mpkt_[4][2] = {
+		{ { { 144, 100, 180 }, 0, 2 },
+		  { { 110, 100, 180 }, 0, 2 } },
+
+		{ { { 110, 101, 180 }, 0, 3 },
+		  { { -55,  50, 180 }, 0, 3 } },
+
+		{ { { 310,  20, 180 }, 0, 3 },
+		  { { -55,  20, 180 }, 0, 3 } },
+
+		{ { { 310,   2, 180 }, 0, 3 },
+		  { { 250,   2, 180 }, 0, 3 } }
+	};
+	flags.AniUserAction = false;
+	hide_cur();
+	/*rdi = */(void)det->get_room_detail_info();
+	tmp = _G(zoom_horizont);
+	_G(zoom_horizont) = 100;
+	anistart = false;
+	_G(auto_obj) = 1;
+	mov_phasen[SONDE_OBJ].Lines = 2;
+	mov_phasen[SONDE_OBJ].Repeat = 1;
+	mov_phasen[SONDE_OBJ].ZoomFak = 20;
+	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt1);
+	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+		set_ani_screen();
+
+	det->start_detail(SONDE_GREIF, 1, ANI_VOR);
+	while (det->get_ani_status(SONDE_GREIF)) {
+		clear_prog_ani();
+		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
+		spr_info[0].ZEbene = 146;
+		set_ani_screen();
+	}
+
+	clear_prog_ani();
+	_G(auto_obj) = 2;
+
+	spr_nr = 140;
+	for (i = 0; i < 4; i++) {
+
+		mov_phasen[SONDE_OBJ].Lines = 2;
+		mov_phasen[SONDE_OBJ].Repeat = 1;
+		mov_phasen[SONDE_OBJ].ZoomFak = 0;
+		auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
+		auto_mov_obj[SONDE_OBJ].Mode = 1;
+		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, sonde_mpkt_[i]);
+		mov_phasen[SONDE_OBJ1].Lines = 2;
+		mov_phasen[SONDE_OBJ1].Repeat = 1;
+		mov_phasen[SONDE_OBJ1].ZoomFak = 0;
+		auto_mov_obj[SONDE_OBJ1].Id = AUTO_OBJ1;
+		auto_mov_obj[SONDE_OBJ1].Mode = 1;
+		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
+		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ1].Lines, sonde_mpkt_[i]);
+		mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
+		mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
+		while (mov_phasen[SONDE_OBJ].Repeat != -1) {
+
+			if (i == 2 || i == 1) {
+
+				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
+					if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+						if (is_cur_inventar(SPINAT_INV)) {
+							ssi[0].X = 120;
+							ssi[0].Y = 100;
+							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
+
+								start_aad(50);
+							else
+
+								start_aad(44);
+							del_inventar(_G(spieler).AkInvent);
+							_G(spieler).R2FussSchleim = 1;
+							mov_phasen[SONDE_OBJ1].Phase[0][0] = 142;
+							mov_phasen[SONDE_OBJ1].Phase[0][1] = 149;
+							auto_mov_vector[SONDE_OBJ1].PhAnz = 8;
+							anistart = true;
+						}
+					}
+				}
+			}
+			set_ani_screen();
+			if (anistart) {
+				if (auto_mov_vector[SONDE_OBJ1].PhNr == 7) {
+					anistart = false;
+					spr_nr = 149;
+					mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
+					mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
+					auto_mov_vector[SONDE_OBJ1].PhAnz = 1;
+					auto_mov_vector[SONDE_OBJ1].PhNr = 0;
+				}
+			}
+		}
+		switch (i) {
+		case 0:
+			show_cur();
+			start_aad(52);
+			flags.AniUserAction = true;
+			spr_nr = 141;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			det->load_taf_seq(142, 8, 0);
+			break;
+
+		case 1:
+			switch_room(1);
+			break;
+
+		case 2:
+			det->del_taf_tbl(142, 7, 0);
+			flags.AniUserAction = false;
+			switch_room(2);
+			break;
+
+		}
+	}
+	flags.AniUserAction = false;
+	_G(zoom_horizont) = tmp;
+	_G(auto_obj) = 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room3.h b/engines/chewy/rooms/room3.h
new file mode 100644
index 00000000000..478c886386f
--- /dev/null
+++ b/engines/chewy/rooms/room3.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM3_H
+#define CHEWY_ROOMS_ROOM3_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room3 {
+private:
+	static void sonde_knarre();
+	static void sonde_aufnahme();
+public:
+	static void init_sonde();
+	static void terminal();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
new file mode 100644
index 00000000000..40db986518f
--- /dev/null
+++ b/engines/chewy/rooms/room4.cpp
@@ -0,0 +1,135 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room4.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define HAND_NORMAL 68
+#define HAND_CLICK 69
+#define RAHMEN_ROT 70
+#define RAHMEN_GELB 71
+
+int16 Room4::sonde_comp() {
+	int16 ende;
+
+	int16 spr_nr;
+	int16 cur_x;
+
+	int16 cur_pos[3][2] = { {  83, 106 },
+							{ 136, 103 },
+							{ 188, 101 }
+	};
+
+	int16 console[3][4] = { {  82, 158, 143, 199 },
+							{ 150, 159, 194, 193 },
+							{ 201, 154, 262, 193 }
+	};
+
+	cur_2_inventory();
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(cur_display) = false;
+	switch_room(4);
+	_G(cur_display) = true;
+	ende = 0;
+	curblk.sprite = room_blk.DetImage;
+	cur_x = 1;
+	spr_nr = RAHMEN_ROT;
+	cur->move(160, 160);
+
+	start_aad(46);
+	while (!ende) {
+		maus_action();
+		if (_G(maus_links_click)) {
+			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)console, 3)) {
+			case 0:
+				if (cur_x > 0)
+					--cur_x;
+				else
+					cur_x = 2;
+				det->play_sound(0, 1);
+				break;
+
+			case 1:
+				ende = 1;
+				spr_nr = RAHMEN_GELB;
+				det->play_sound(0, 0);
+				break;
+
+			case 2:
+				if (cur_x < 2)
+					++cur_x;
+				else
+					cur_x = 0;
+				det->play_sound(0, 2);
+				break;
+
+			}
+		}
+		spr_info[0].Image = room_blk.DetImage[spr_nr];
+
+		spr_info[0].ZEbene = 0;
+		spr_info[0].X = cur_pos[cur_x][0];
+		spr_info[0].Y = cur_pos[cur_x][1];
+		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			curani.ani_anf = HAND_CLICK;
+			curani.ani_end = HAND_CLICK;
+		} else {
+			curani.ani_anf = HAND_NORMAL;
+			curani.ani_end = HAND_NORMAL;
+		}
+		cursor_wahl(CUR_USER);
+		_G(spieler).CurHoehe = 16;
+		in->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
+		if (minfo.y < 124) {
+			minfo.y = 123;
+		}
+		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN0;
+	}
+	g_events->delay(500);
+
+	clear_prog_ani();
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	menu_item = CUR_WALK;
+	cursor_wahl(menu_item);
+	set_person_pos(118 - CH_HOT_MOV_X,
+		164 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+	spieler_vector[P_CHEWY].DelayCount = 0;
+	_G(maus_links_click) = false;
+	minfo.button = 0;
+	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	ERROR
+		fx_blend = BLEND1;
+	atds->stop_aad();
+
+	return cur_x;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room4.h b/engines/chewy/rooms/room4.h
new file mode 100644
index 00000000000..82fd9b712d3
--- /dev/null
+++ b/engines/chewy/rooms/room4.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM4_H
+#define CHEWY_ROOMS_ROOM4_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room4 {
+public:
+	static int16 sonde_comp();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index fb57e114bf2..85c819776ea 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -24,6 +24,8 @@
 
 #include "chewy/rooms/room0.h"
 #include "chewy/rooms/room2.h"
+#include "chewy/rooms/room3.h"
+#include "chewy/rooms/room4.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -36,6 +38,8 @@ namespace Chewy {
 
 using Chewy::Rooms::Room0;
 using Chewy::Rooms::Room2;
+using Chewy::Rooms::Room3;
+using Chewy::Rooms::Room4;
 
 } // namespace Chewy
 


Commit: 5d41b246369e853f140ea46ec692061f8e0a6000
    https://github.com/scummvm/scummvm/commit/5d41b246369e853f140ea46ec692061f8e0a6000
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:21-08:00

Commit Message:
CHEWY: Split up episode1.cpp methods into Room classes

Changed paths:
  A engines/chewy/rooms/room10.cpp
  A engines/chewy/rooms/room10.h
  A engines/chewy/rooms/room11.cpp
  A engines/chewy/rooms/room11.h
  A engines/chewy/rooms/room12.cpp
  A engines/chewy/rooms/room12.h
  A engines/chewy/rooms/room13.cpp
  A engines/chewy/rooms/room13.h
  A engines/chewy/rooms/room14.cpp
  A engines/chewy/rooms/room14.h
  A engines/chewy/rooms/room16.cpp
  A engines/chewy/rooms/room16.h
  A engines/chewy/rooms/room17.cpp
  A engines/chewy/rooms/room17.h
  A engines/chewy/rooms/room18.cpp
  A engines/chewy/rooms/room18.h
  A engines/chewy/rooms/room19.cpp
  A engines/chewy/rooms/room19.h
  A engines/chewy/rooms/room21.cpp
  A engines/chewy/rooms/room21.h
  A engines/chewy/rooms/room22.cpp
  A engines/chewy/rooms/room22.h
  A engines/chewy/rooms/room23.cpp
  A engines/chewy/rooms/room23.h
  A engines/chewy/rooms/room24.cpp
  A engines/chewy/rooms/room24.h
  A engines/chewy/rooms/room5.cpp
  A engines/chewy/rooms/room5.h
  A engines/chewy/rooms/room6.cpp
  A engines/chewy/rooms/room6.h
  A engines/chewy/rooms/room7.cpp
  A engines/chewy/rooms/room7.h
  A engines/chewy/rooms/room8.cpp
  A engines/chewy/rooms/room8.h
  A engines/chewy/rooms/room9.cpp
  A engines/chewy/rooms/room9.h
  A engines/chewy/rooms/roomdefs.h
    engines/chewy/episode1.cpp
    engines/chewy/episode1.h
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/global.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
index 583e835fd3d..fc9427b52c3 100644
--- a/engines/chewy/episode1.cpp
+++ b/engines/chewy/episode1.cpp
@@ -108,2370 +108,4 @@ void switch_room(int16 nr) {
 	set_up_screen(DO_SETUP);
 }
 
-void r5_knopf() {
-	int16 str_nr;
-	if (_G(spieler).R5Terminal) {
-		if (_G(spieler).R5Tuer == false) {
-			start_detail_wait(9, 1, ANI_VOR);
-			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
-			str_nr = 1;
-		} else {
-			start_detail_wait(9, 1, ANI_RUECK);
-			_G(spieler).room_e_obj[6].Attribut = 255;
-			str_nr = 0;
-		}
-		atds->set_ats_str(29, str_nr, ATS_DATEI);
-		_G(spieler).R5Tuer ^= 1;
-		obj->calc_rsi_flip_flop(SIB_TUERE_R5);
-	} else
-		start_aad_wait(1, -1);
-}
-
-void r6_entry() {
-	_G(zoom_horizont) = 80;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 2;
-	if (_G(spieler).R6BolaSchild) {
-		if (_G(spieler).R6RaumBetreten < 3) {
-			det->start_detail(7, 255, ANI_VOR);
-			atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-			if (!flags.LoadGame)
-				++_G(spieler).R6RaumBetreten;
-			if (_G(spieler).R6RaumBetreten == 3) {
-				det->stop_detail(7);
-				r6_init_robo();
-				wait_auto_obj(0);
-				_G(spieler).R6BolaOk = true;
-				obj->show_sib(SIB_BOLA_KNOPF_R6);
-				obj->hide_sib(SIB_BOLA_R6);
-				atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-			}
-		}
-	}
-}
-
-int16 r6_robo_phasen[4][2] = {
-	{ 86, 86 },
-	{ 86, 86 },
-	{ 86, 86 },
-	{ 86, 86 }
-};
-
-MovLine r6_robo_mpkt[3] = {
-	{ { 168,  71, 180 }, 1,  1 },
-	{ { 180,  71, 100 }, 1,  2 },
-	{ {  60, 210, 110 }, 1, 16 }
-};
-
-void r6_init_robo() {
-#define ROBO_OBJ 0
-	_G(auto_obj) = 1;
-	mov_phasen[ROBO_OBJ].AtsText = 44;
-	mov_phasen[ROBO_OBJ].Lines = 3;
-	mov_phasen[ROBO_OBJ].Repeat = 1;
-	mov_phasen[ROBO_OBJ].ZoomFak = 0;
-	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[ROBO_OBJ].Mode = 1;
-	init_auto_obj(ROBO_OBJ, &r6_robo_phasen[0][0], mov_phasen[ROBO_OBJ].Lines, (MovLine
-	              *)r6_robo_mpkt);
-}
-
-void r6_bola_knopf() {
-	int16 tmp;
-	if (!_G(spieler).R6BolaBecher) {
-		det->hide_static_spr(0);
-		start_detail_wait(0, 1, ANI_VOR);
-		if (_G(spieler).R6BolaOk) {
-			_G(spieler).R6BolaBecher = true;
-			det->show_static_spr(0);
-			start_ani_block(2, ablock7);
-			obj->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
-			wait_detail(2);
-			obj->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
-			atds->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
-			obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-			obj->hide_sib(SIB_BOLA_KNOPF_R6);
-		} else {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(3, ablock6);
-			while (det->get_ani_status(3) && !SHOULD_QUIT) {
-				if (!det->get_ani_status(14)) {
-					set_person_pos(220, 89, P_CHEWY, P_LEFT);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-				}
-				set_up_screen(DO_SETUP);
-			}
-			det->show_static_spr(0);
-			++_G(spieler).R6BolaJoke;
-			if (_G(spieler).R6BolaJoke < 3)
-				tmp = 3;
-			else
-				tmp = 4;
-			start_aad_wait(tmp, -1);
-		}
-		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-	}
-}
-
-void r7_haken(int16 sib_nr) {
-	int16 dia_nr;
-	del_inventar(8);
-
-	_G(spieler).AkInvent = -1;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
-	if (_G(spieler).R7RHaken) {
-		_G(spieler).R7SeilOk = true;
-		if (sib_nr == SIB_LHAKEN_R7) {
-			obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
-			obj->calc_rsi_flip_flop(SIB_RHAKEN_R7);
-		}
-		atds->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
-		dia_nr = 9;
-	} else {
-		_G(spieler).R7SeilLeft = true;
-		dia_nr = 48;
-	}
-	atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
-	start_aad(dia_nr);
-}
-
-void r7_klingel() {
-	if ((!_G(spieler).R7BellCount) ||
-	        (_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft != 0 && !_G(spieler).R7SeilOk)) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad(5, 0);
-		start_ani_block(3, ablock25);
-
-		det->show_static_spr(7);
-		start_detail_wait(12, 1, ANI_VOR);
-		start_detail_wait(11, 1, ANI_VOR);
-		det->hide_static_spr(7);
-		det->stop_detail(5);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	}
-	else if (_G(spieler).R7BellCount == 1) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad(6, 0);
-		start_ani_block(3, ablock25);
-		det->show_static_spr(7);
-		start_detail_wait(10, 1, ANI_VOR);
-		det->start_detail(13, 1, ANI_VOR);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		det->stop_detail(5);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = true;
-		auto_move(6, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->start_detail(0, 255, ANI_VOR);
-		start_detail_wait(13, 1, ANI_VOR);
-		flic_cut(FCUT_002, CFO_MODE);
-		det->stop_detail(0);
-		_G(spieler).scrollx = 0;
-		_G(spieler).scrolly = 0;
-		start_detail_frame(19, 1, ANI_VOR, 6);
-		start_detail_frame(9, 1, ANI_VOR, 4);
-		det->show_static_spr(9);
-		wait_detail(9);
-		det->hide_static_spr(9);
-		obj->show_sib(SIB_SCHLOTT_R7);
-		obj->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
-		set_person_pos(114, 138, P_CHEWY, -1);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = false;
-		det->hide_static_spr(7);
-	} else if (!_G(spieler).R7SeilOk) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad(7, 0);
-		start_ani_block(3, ablock25);
-		det->show_static_spr(7);
-		det->load_taf_seq(192, 74, 0);
-		det->start_detail(14, 1, ANI_VOR);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		det->stop_detail(5);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = true;
-		auto_move(6, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->start_detail(0, 255, ANI_VOR);
-		wait_detail(14);
-		start_ani_block(4, ablock10);
-		det->hide_static_spr(7);
-		det->stop_detail(0);
-		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = false;
-		det->del_taf_tbl(192, 74, 0);
-	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
-		_G(spieler).R7BorkFlug = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad(8, 0);
-		start_detail_wait(1, 1, ANI_VOR);
-		obj->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
-		obj->hide_sib(SIB_KLINGEL_R7);
-		flags.NoPalAfterFlc = false;
-		flic_cut(FCUT_003, CFO_MODE);
-		set_person_pos(201, 117, P_CHEWY, P_LEFT);
-		_G(spieler).scrollx = 0;
-		_G(spieler).scrolly = 0;
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	}
-	++_G(spieler).R7BellCount;
-}
-
-void r8_entry() {
-	_G(spieler).R7ChewyFlug = true;
-	if (!_G(spieler).R8Folter)
-		r8_start_folter();
-	else
-		r8_stop_folter();
-	atds->set_ats_str(60, 0, ATS_DATEI);
-}
-
-void r8_start_folter() {
-	atds->set_ats_str(67, 1, ATS_DATEI);
-
-	det->stop_detail(19);
-
-	det->start_detail(13, 255, ANI_VOR);
-}
-
-void r8_stop_folter() {
-	atds->set_ats_str(67, 0, ATS_DATEI);
-	det->start_detail(19, 255, ANI_VOR);
-
-	det->stop_detail(13);
-
-	_G(spieler).R8Folter = true;
-	obj->hide_sib(SIB_FOLTER_R8);
-}
-
-void r8_hole_kohle() {
-	if (!_G(spieler).R8Kohle) {
-		hide_cur();
-		_G(spieler).R8Kohle = true;
-		auto_move(4, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_VOR);
-		cur_2_inventory();
-		invent_2_slot(KOHLE_HEISS_INV);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		show_cur();
-	}
-}
-
-void r8_start_verbrennen() {
-	int16 ende;
-	hide_cur();
-	if (!_G(spieler).inv_cur) {
-		auto_move(3, P_CHEWY);
-		start_aad(102, 0);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ablock12);
-		ende = 0;
-		while (!ende && det->get_ani_status(9)) {
-			set_up_screen(DO_SETUP);
-			SHOULD_QUIT_RETURN;
-
-			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
-				if (minfo.x > 146 && minfo.x < 208 &&
-				        minfo.y > 107 && minfo.y < 155)
-					ende = 1;
-			}
-		}
-		det->stop_detail(9);
-		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
-		start_ani_block(2, ablock13);
-		atds->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	}
-	show_cur();
-}
-
-bool r8_gips_wurf() {
-	if (!is_cur_inventar(11)) {
-		hide_cur();
-		det->load_taf_seq(116, 30, 0);
-		auto_move(2, P_CHEWY);
-		_G(maus_links_click) = 0;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		del_inventar(GIPS_EIMER_INV);
-		start_detail_wait(4, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_detail_frame(5, 1, ANI_VOR, 16);
-		start_detail_wait(6, 1, ANI_VOR);
-		obj->show_sib(33);
-		det->show_static_spr(14);
-		wait_detail(5);
-		_G(spieler).R8GipsWurf = true;
-		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
-		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
-		det->del_taf_tbl(116, 30, 0);
-		auto_move(8, P_CHEWY);
-		flags.AtsAction = false;
-		menu_item = CUR_USE;
-		look_invent_screen(INVENTAR_NORMAL, 178);
-		flags.AtsAction = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(20, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		invent_2_slot(MASKE_INV);
-		cursor_wahl(menu_item);
-		show_cur();
-
-		return true;
-	}
-
-	return false;
-}
-
-void r8_open_gdoor() {
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->show_static_spr(17);
-	set_up_screen(DO_SETUP);
-	start_detail_wait(7, 1, ANI_VOR);
-	det->show_static_spr(15);
-	det->hide_static_spr(17);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	set_person_pos(204, 274, P_CHEWY, P_LEFT);
-	atds->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
-	obj->hide_sib(31);
-	_G(spieler).R8GTuer = true;
-	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
-}
-
-void r8_talk_nimoy() {
-	int16 tmp;
-	auto_move(9, P_CHEWY);
-	flags.NoScroll = true;
-	auto_scroll(0, 120);
-	if (_G(spieler).R8Folter) {
-		if (!_G(spieler).R8GipsWurf)
-			tmp = 1;
-		else
-			tmp = 2;
-		if (!_G(spieler).R8GTuer)
-			load_ads_dia(tmp);
-		else
-			start_aad_wait(61, -1);
-	} else
-		load_ads_dia(6);
-	flags.NoScroll = false;
-}
-
-void r9_entry() {
-	_G(spieler).R7ChewyFlug = false;
-
-	if (!_G(spieler).R9Gitter) {
-		set_person_pos(138, 91, P_CHEWY, P_LEFT);
-	} else
-		det->show_static_spr(5);
-	if (_G(spieler).R9Surimy) {
-		det->hide_static_spr(4);
-		room->set_timer_status(7, TIMER_STOP);
-	}
-}
-
-void r9_gtuer() {
-	_G(spieler).R9Gitter = true;
-	det->show_static_spr(5);
-	start_detail_wait(6, 1, ANI_VOR);
-	set_person_pos(74, 93, P_CHEWY, P_LEFT);
-	atds->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATEI);
-	obj->show_sib(34);
-	atds->set_ats_str(73, 1, ATS_DATEI);
-}
-
-#define SURIMY_OBJ 0
-int16 r9_surimy_phasen[4][2] = {
-	{ 91, 98 },
-	{ 91, 98 },
-	{ 91, 98 },
-	{ 91, 98 }
-};
-
-MovLine r9_surimy_mpkt[2] = {
-	{ {  80, 170, 199 }, 2, 6 },
-	{ { 210, 162, 199 }, 2, 6 }
-};
-MovLine r9_surimy_mpkt1[2] = {
-	{ { 224, 158, 199 }, 2, 6 },
-	{ { 330, 162, 199 }, 2, 6 }
-};
-
-void r9_surimy() {
-	int16 tmp;
-	_G(spieler).R9Surimy = true;
-	tmp = spieler_vector[P_CHEWY].Count;
-	stop_person(P_CHEWY);
-	atds->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	det->hide_static_spr(4);
-	room->set_timer_status(7, TIMER_STOP);
-	r9_surimy_ani();
-	start_aad_wait(56, -1);
-	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
-	spieler_vector[P_CHEWY].Count = tmp;
-	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-	mov->continue_auto_go();
-}
-
-void r9_surimy_ani() {
-	det->load_taf_seq(91, 8, 0);
-	_G(auto_obj) = 1;
-	mov_phasen[SURIMY_OBJ].AtsText = 0;
-	mov_phasen[SURIMY_OBJ].Lines = 2;
-	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SURIMY_OBJ].Mode = 1;
-	init_auto_obj(SURIMY_OBJ, &r9_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-	              *)r9_surimy_mpkt);
-	wait_auto_obj(SURIMY_OBJ);
-	start_detail_frame(0, 1, ANI_VOR, 15);
-	det->start_detail(2, 1, ANI_VOR);
-	wait_detail(0);
-	start_detail_wait(1, 1, ANI_VOR);
-	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
-	det->hide_static_spr(4);
-	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	init_auto_obj(SURIMY_OBJ, &r9_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-	              *)r9_surimy_mpkt1);
-	wait_auto_obj(SURIMY_OBJ);
-	det->del_taf_tbl(91, 8, 0);
-}
-
-void r10_entry() {
-	if (!_G(spieler).R10Surimy) {
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		out->setze_zeiger(0);
-		fx->blende1(workptr, screen0, pal, 150, 0, 0);
-		_G(spieler).R10Surimy = true;
-		flic_cut(FCUT_004, CFO_MODE);
-		start_aad(101, 0);
-		fx_blend = BLEND_NONE;
-		set_person_pos(1, 130, P_CHEWY, P_RIGHT);
-		auto_move(2, P_CHEWY);
-	} else if (_G(spieler).R10SurimyOk)
-		room->set_timer_status(3, TIMER_STOP);
-}
-
-void r10_get_surimy() {
-	auto_move(4, P_CHEWY);
-	start_aad(104, 0);
-	flc->set_custom_user_function(r6_cut_serv2);
-	flic_cut(FCUT_006, CFO_MODE);
-	flc->remove_custom_user_function();
-	_G(spieler).R10SurimyOk = true;
-	room->set_timer_status(3, TIMER_STOP);
-	atds->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
-	invent_2_slot(18);
-
-	del_inventar(_G(spieler).AkInvent);
-}
-
-void r11_entry() {
-	_G(zoom_horizont) = 80;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 2;
-
-	if (_G(spieler).R12ChewyBork) {
-		if (!_G(spieler).R11DoorRightB) {
-			obj->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
-			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
-			                                       AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
-			obj->calc_all_static_detail();
-		}
-
-		obj->hide_sib(SIB_TKNOPF1_R11);
-		obj->hide_sib(SIB_SCHLITZ_R11);
-		obj->hide_sib(SIB_TKNOPF2_R11);
-		obj->hide_sib(SIB_TKNOPF3_R11);
-		_G(spieler).room_e_obj[20].Attribut = 255;
-		_G(spieler).room_e_obj[21].Attribut = 255;
-		atds->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
-		if (!flags.LoadGame) {
-			start_ani_block(2, ablock17);
-			auto_move(8, P_CHEWY);
-			start_aad_wait(31, -1);
-			det->stop_detail(9);
-		}
-		det->show_static_spr(8);
-		if (!flags.LoadGame)
-			auto_move(6, P_CHEWY);
-		_G(timer_nr)[0] = room->set_timer(255, 10);
-	}
-}
-
-void r11_bork_zwinkert() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		det->hide_static_spr(8);
-		start_ani_block(2, ablock18);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->show_static_spr(8);
-		flags.AutoAniPlay = false;
-	}
-}
-
-void r11_talk_debug() {
-	if (_G(spieler).R12ChewyBork) {
-		flags.AutoAniPlay = true;
-		auto_move(8, P_CHEWY);
-		start_ads_wait(5);
-		flags.AutoAniPlay = false;
-
-	}
-}
-
-void r11_chewy_bo_use() {
-	if (_G(spieler).R12ChewyBork) {
-		flags.AutoAniPlay = true;
-		stop_person(P_CHEWY);
-		det->hide_static_spr(8);
-		start_ani_block(2, ablock17);
-		start_aad_wait(32, -1);
-		det->stop_detail(9);
-		det->show_static_spr(8);
-		auto_move(6, P_CHEWY);
-		flags.AutoAniPlay = false;
-	}
-}
-
-int16 r11_scanner() {
-	int16 action_flag = false;
-	if (!_G(spieler).R12ChewyBork) {
-		auto_move(7, P_CHEWY);
-		if (!_G(spieler).R11CardOk) {
-			action_flag = true;
-			start_aad_wait(13, -1);
-		} else {
-			if (is_cur_inventar(BORK_INV)) {
-				action_flag = true;
-				flc->set_custom_user_function(r12_cut_serv);
-				start_aad(105, 0);
-				flic_cut(FCUT_011, CFO_MODE);
-				flc->remove_custom_user_function();
-				_G(spieler).R11TerminalOk = true;
-				cur_2_inventory();
-				menu_item = CUR_TALK;
-				cursor_wahl(menu_item);
-				start_aad_wait(12, -1);
-				load_ads_dia(3);
-			} else if (!_G(spieler).inv_cur) {
-				if (!_G(spieler).R11TerminalOk) {
-					action_flag = true;
-					flic_cut(FCUT_010, CFO_MODE);
-					start_aad_wait(20, -1);
-				} else if (_G(spieler).R11TerminalOk) {
-					action_flag = true;
-					start_aad_wait(12, -1);
-					menu_item = CUR_TALK;
-					cursor_wahl(menu_item);
-					load_ads_dia(3);
-				}
-			}
-		}
-	}
-
-	return action_flag;
-}
-
-void r11_get_card() {
-	if (_G(spieler).R11CardOk) {
-		_G(spieler).R11CardOk = false;
-		obj->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
-
-		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
-		cursor_wahl(CUR_AK_INVENT);
-		cursor_wahl(CUR_AK_INVENT);
-		det->stop_detail(0);
-		atds->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
-		atds->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
-	}
-}
-
-void r11_put_card() {
-	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
-		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
-		del_inventar(_G(spieler).R11IdCardNr);
-		det->start_detail(0, 255, ANI_VOR);
-		atds->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
-		atds->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
-		_G(spieler).R11CardOk = true;
-		if (!_G(spieler).R11TerminalOk)
-			start_aad_wait(16, -1);
-	}
-}
-
-void r12_entry() {
-	int16 i;
-	_G(zoom_horizont) = 150;
-	_G(timer_nr)[1] = room->set_timer(255, 20);
-	if (!_G(spieler).R12Betreten) {
-		_G(spieler).R12Betreten = true;
-		for (i = 7; i < 10; i++)
-			det->show_static_spr(i);
-		flags.NoScroll = true;
-		auto_scroll(60, 0);
-		flic_cut(FCUT_016, CFO_MODE);
-		flags.NoScroll = false;
-		for (i = 7; i < 10; i++)
-			det->hide_static_spr(i);
-		obj->show_sib(SIB_TALISMAN_R12);
-		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
-		obj->calc_all_static_detail();
-		auto_move(5, P_CHEWY);
-		start_aad_wait(109, -1);
-	} else {
-		if (_G(spieler).R12Talisman == true && !_G(spieler).R12BorkInRohr)
-			_G(timer_nr)[0] = room->set_timer(255, 20);
-		else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
-			det->show_static_spr(12);
-
-	}
-}
-
-#define R12_BORK_OBJ 0
-int16 r12_bork_phasen[4][2] = {
-	{ 74, 79 },
-	{ 80, 85 },
-	{ 62, 67 },
-	{ 68, 73 }
-};
-
-MovLine r12_bork_mpkt[5] = {
-	{ { 207, 220, 199 }, 2, 6 },
-	{ { 207, 145, 199 }, 2, 6 },
-	{ {  30, 145, 199 }, 0, 6 },
-	{ { 207, 145, 199 }, 1, 6 },
-	{ { 207, 220, 199 }, 3, 6 }
-};
-
-MovLine r12_bork_mpkt1[2] = {
-	{ { 207, 220, 199 }, 0, 6 },
-	{ { 170, 145, 199 }, 0, 6 }
-};
-
-MovLine r12_bork_mpkt2[3] = {
-	{ { 170, 145, 199 }, 1, 8 },
-	{ { 180, 145, 120 }, 1, 8 },
-	{ { 300,  80, 120 }, 1, 8 }
-};
-
-void r12_init_bork() {
-	if (!auto_obj_status(R12_BORK_OBJ) &&
-	        !_G(spieler).R12BorkTalk) {
-
-		if (!_G(auto_obj))
-			det->load_taf_seq(62, (85 - 62) + 1, 0);
-		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
-			_G(auto_obj) = 1;
-			mov_phasen[R12_BORK_OBJ].AtsText = 120;
-			mov_phasen[R12_BORK_OBJ].Lines = 5;
-			mov_phasen[R12_BORK_OBJ].Repeat = 1;
-			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->room_info->ZoomFak + 20;
-			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[R12_BORK_OBJ].Mode = 1;
-			init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-			              *)r12_bork_mpkt);
-			if (!_G(spieler).R12TalismanOk) {
-				hide_cur();
-				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
-				auto_move(5, P_CHEWY);
-				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
-				if (_G(spieler).R12BorkCount < 3) {
-					++_G(spieler).R12BorkCount;
-					uhr->reset_timer(_G(timer_nr)[0], 0);
-					wait_show_screen(10);
-					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-					start_aad_wait(14, -1);
-				}
-				wait_auto_obj(R12_BORK_OBJ);
-				show_cur();
-			} else {
-				r12_bork_ok();
-			}
-		}
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-	}
-}
-
-void r12_talk_bork() {
-	if (!_G(spieler).R12TalismanOk) {
-
-		start_aad_wait(28, -1);
-
-	}
-}
-
-void r12_bork_ok() {
-	hide_cur();
-	flags.MausLinks = true;
-	auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
-	auto_move(5, P_CHEWY);
-	auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
-	_G(spieler).R12BorkTalk = true;
-	mov_phasen[R12_BORK_OBJ].Repeat = 1;
-	mov_phasen[R12_BORK_OBJ].Lines = 2;
-	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-	              *)r12_bork_mpkt1);
-	wait_auto_obj(R12_BORK_OBJ);
-	_G(spieler).R12BorkInRohr = true;
-	det->set_detail_pos(3, 170, 145);
-	det->start_detail(3, 255, ANI_VOR);
-	start_aad_wait(57, -1);
-	det->stop_detail(3);
-	mov_phasen[R12_BORK_OBJ].Repeat = 1;
-	mov_phasen[R12_BORK_OBJ].Lines = 3;
-	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-	              *)r12_bork_mpkt2);
-	wait_auto_obj(R12_BORK_OBJ);
-	det->hide_static_spr(10);
-	start_detail_wait(4, 1, ANI_VOR);
-	talk_hide_static = -1;
-	det->show_static_spr(12);
-	atds->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
-	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
-	flags.MausLinks = false;
-	show_cur();
-}
-
-int16 r12_use_terminal() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		if (!_G(spieler).R12ChewyBork) {
-			auto_move(6, P_CHEWY);
-			start_aad_wait(110, -1);
-			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
-				start_aad_wait(112, -1);
-				flags.NoScroll = true;
-				auto_scroll(46, 0);
-				flic_cut(FCUT_017, CFO_MODE);
-
-				load_chewy_taf(CHEWY_BORK);
-				flags.NoScroll = false;
-				atds->set_ats_str(118, 0, ATS_DATEI);
-				det->hide_static_spr(12);
-				menu_item = CUR_WALK;
-				cursor_wahl(menu_item);
-				set_person_pos(108, 90, P_CHEWY, -1);
-				_G(spieler).R12ChewyBork = true;
-				_G(spieler).R12RaumOk = true;
-				auto_move(4, P_CHEWY);
-				start_aad_wait(113, 0);
-			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
-				_G(spieler).R12TalismanOk = false;
-				_G(spieler).R12KetteLinks = true;
-				uhr->disable_timer();
-				obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
-				obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
-				obj->calc_all_static_detail();
-				atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
-				atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
-				start_aad(111, 0);
-			} else {
-				_G(spieler).R12TransOn = true;
-				uhr->reset_timer(_G(timer_nr)[1], 0);
-			}
-		}
-		else
-			start_aad(114, 0);
-	}
-
-	return action_flag;
-}
-
-int16 r12_use_linke_rohr() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		if (!_G(spieler).R12KetteLinks) {
-			auto_move(7, P_CHEWY);
-			start_aad_wait(29, -1);
-		} else {
-			_G(spieler).R12KetteLinks = false;
-			uhr->enable_timer();
-			atds->set_ats_str(117, TXT_MARK_LOOK, 0, ATS_DATEI);
-		}
-	}
-	return action_flag;
-}
-
-int16 r12_chewy_trans() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R12TransOn) {
-			action_flag = true;
-			flags.AutoAniPlay = true;
-			auto_move(9, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock16);
-			set_person_pos(108, 82, P_CHEWY, P_RIGHT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(spieler).R12TransOn = false;
-			flags.AutoAniPlay = false;
-		}
-	}
-	return action_flag;
-}
-
-int16 r12_proc1() {
-	bool result = false;
-
-	if (!_G(spieler).inv_cur) {
-		result = true;
-
-		if (_G(spieler).R12KetteLinks) {
-			_G(spieler).R12KetteLinks = false;
-			uhr->enable_timer();
-			atds->set_ats_str(117, 1, 0);
-		} else {
-			auto_move(7, 0);
-			start_aad_wait(29, -1);
-		}
-	}
-
-	return result;
-}
-
-void r13_entry() {
-	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
-		out->cls();
-		flic_cut(FCUT_013, CFO_MODE);
-		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
-		switch_room(11);
-		start_aad_wait(27, -1);
-	} else {
-		if (_G(spieler).R13MonitorStatus)
-			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
-
-		if (!_G(spieler).R13BorkOk) {
-			det->show_static_spr(12);
-			obj->hide_sib(SIB_BANDKNOPF_R13);
-			_G(spieler).R13Bandlauf = 1;
-
-			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
-			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
-			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-		}
-		if (spieler_vector[P_CHEWY].Xypos[0] > 290) {
-			_G(spieler).R13Band = true;
-			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(spieler).room_e_obj[25].Attribut = 255;
-		}
-		if (_G(spieler).R21GitterMuell)
-			det->hide_static_spr(6);
-	}
-}
-
-void r13_exit() {
-	warning("TODO: r13_exit");
-}
-
-#define R13_BORK_OBJ 0
-int16 r13_bork_phasen[4][2] = {
-	{ 92, 97 },
-	{ 86, 91 },
-	{ 86, 91 },
-	{ 68, 73 }
-};
-
-MovLine r13_bork_mpkt[3] = {
-	{ { 168, 140, 162 }, 0, 6 },
-	{ {  50, 140, 162 }, 0, 6 },
-	{ {  50, 107, 130 }, 2, 6 }
-};
-
-void r13_talk_bork() {
-	if (!_G(spieler).R13BorkOk) {
-		_G(spieler).R13BorkOk = true;
-		_G(spieler).R12ChewyBork = false;
-		det->show_static_spr(13);
-		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		det->
-		set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true)
-		;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad_wait(33, -1);
-		det->stop_detail(9);
-		det->load_taf_seq(86, (97 - 86) + 1, 0);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		det->hide_static_spr(12);
-		_G(auto_obj) = 1;
-		mov_phasen[R13_BORK_OBJ].AtsText = 122;
-		mov_phasen[R13_BORK_OBJ].Lines = 3;
-		mov_phasen[R13_BORK_OBJ].Repeat = 1;
-		mov_phasen[R13_BORK_OBJ].ZoomFak = 0;
-		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[R13_BORK_OBJ].Mode = 1;
-		init_auto_obj(R13_BORK_OBJ, &r13_bork_phasen[0][0], mov_phasen[R13_BORK_OBJ].Lines, (MovLine *)r13_bork_mpkt);
-		auto_move(9, P_CHEWY);
-		wait_auto_obj(R13_BORK_OBJ);
-		auto_move(11, P_CHEWY);
-		flags.NoScroll = true;
-		auto_scroll(41, 0);
-		start_aad_wait(248, -1);
-		flic_cut(FCUT_014, CFO_MODE);
-		load_chewy_taf(CHEWY_NORMAL);
-		_G(auto_obj) = 0;
-		flags.NoScroll = false;
-		atds->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
-		obj->show_sib(SIB_BANDKNOPF_R13);
-		set_person_pos(153, 138, P_CHEWY, P_LEFT);
-
-		start_aad_wait(34, -1);
-		start_aad_wait(249, -1);
-
-		obj->show_sib(SIB_TKNOPF1_R11);
-		obj->show_sib(SIB_SCHLITZ_R11);
-		obj->show_sib(SIB_TKNOPF2_R11);
-		obj->show_sib(SIB_TKNOPF3_R11);
-		if (_G(spieler).R6DoorRightB)
-			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
-		_G(spieler).room_e_obj[21].Attribut = AUSGANG_OBEN;
-	}
-}
-
-void r13_jmp_band() {
-	if (!_G(spieler).R13Band && !_G(spieler).R12ChewyBork) {
-		if (!_G(spieler).R13Bandlauf) {
-			obj->hide_sib(SIB_BANDKNOPF_R13);
-			_G(spieler).room_e_obj[25].Attribut = 255;
-			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(spieler).R13Band = true;
-			auto_move(3, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
-		} else {
-			_G(spieler).R13Surf = true;
-			_G(maus_links_click) = false;
-			auto_move(12, P_CHEWY);
-			start_aad_wait(117, -1);
-			flags.NoScroll = true;
-			auto_scroll(76, 0);
-			flic_cut(FCUT_015, CFO_MODE);
-			flags.NoScroll = false;
-			set_person_pos(195, 226, P_CHEWY, P_LEFT);
-
-			_G(spieler).R13Bandlauf = 0;
-
-			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
-			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
-			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			obj->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
-			obj->hide_sib(SIB_BANDKNOPF_R13);
-			switch_room(14);
-			flic_cut(FCUT_018, CFO_MODE);
-			_G(spieler).scrollx = 92;
-			_G(spieler).scrolly = 120;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			wait_show_screen(40);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-		}
-	}
-	else
-		start_aad_wait(118, -1);
-}
-
-void r13_jmp_boden() {
-	if (_G(spieler).R13Band) {
-		if (!_G(spieler).R13Surf)
-			obj->show_sib(SIB_BANDKNOPF_R13);
-		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-		atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).R13Band = false;
-		auto_move(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		set_person_pos(176, 138, P_CHEWY, P_LEFT);
-	}
-}
-
-int16 r13_monitor_knopf() {
-	int16 action_flag = false;
-	if (!_G(spieler).R13Band &&
-	        !_G(spieler).R12ChewyBork &&
-	        !_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(8, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(6, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		if (_G(spieler).R13MonitorStatus)
-			det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
-		++_G(spieler).R13MonitorStatus;
-		if (_G(spieler).R13MonitorStatus > 4)
-			_G(spieler).R13MonitorStatus = 0;
-		else
-			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
-		atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
-	}
-	return action_flag;
-}
-
-void r14_entry() {
-	_G(spieler).R23GleiterExit = 14;
-	_G(zoom_horizont) = 310;
-	if (!flags.LoadGame) {
-		if (_G(spieler).R14GleiterAuf) {
-			set_person_pos(381, 264, P_CHEWY, P_LEFT);
-			det->show_static_spr(6);
-			_G(spieler).scrollx = 160;
-			_G(spieler).scrolly = 120;
-		} else {
-			_G(spieler).scrollx = 92;
-			_G(spieler).scrolly = 17;
-		}
-	}
-}
-
-void r14_eremit_feuer(int16 t_nr, int16 ani_nr) {
-	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
-		flags.AutoAniPlay = true;
-		det->hide_static_spr(9);
-		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, 0);
-		uhr->reset_timer(t_nr, 0);
-		det->show_static_spr(9);
-		det->start_detail(7, 1, ANI_VOR);
-		flags.AutoAniPlay = false;
-	}
-}
-
-int16 r14_use_schrott() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		auto_move(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-
-		if (!_G(spieler).R14Waffe) {
-			action_flag = true;
-			_G(spieler).R14Waffe = true;
-			start_aad_wait(21, -1);
-			invent_2_slot(BWAFFE_INV);
-		}
-	}
-	return action_flag;
-}
-
-int16 r14_use_gleiter() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		if (!_G(spieler).R14GleiterAuf) {
-			_G(spieler).R14GleiterAuf = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(10, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			det->show_static_spr(6);
-			atds->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
-		} else {
-			_G(spieler).R23GleiterExit = 14;
-			r23_cockpit();
-		}
-	}
-	return action_flag;
-}
-
-void r14_talk_eremit() {
-	if (!_G(spieler).R14Feuer) {
-		auto_move(6, P_CHEWY);
-		if (_G(spieler).R14Translator) {
-			flags.AutoAniPlay = true;
-			load_ads_dia(0);
-		} else {
-			flags.AutoAniPlay = true;
-			start_aad_wait(24, -1);
-			flags.AutoAniPlay = false;
-		}
-	}
-}
-
-int16 r14_use_schleim() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		auto_move(2, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(11, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		if (!_G(spieler).R14Sicherung) {
-			action_flag = true;
-			_G(spieler).R14Sicherung = true;
-			start_aad_wait(22, -1);
-			invent_2_slot(SICHERUNG_INV);
-
-		}
-	}
-	return action_flag;
-}
-
-void r14_feuer() {
-	int16 tmp;
-	int16 waffe;
-	waffe = false;
-	tmp = _G(spieler).AkInvent;
-	_G(spieler).R14Feuer = true;
-	flags.AutoAniPlay = true;
-	hide_cur();
-	if (is_cur_inventar(BWAFFE_INV)) {
-		auto_move(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(8, 1, ANI_VOR, 11);
-		start_detail_wait(9, 1, ANI_VOR);
-		wait_detail(8);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		waffe = true;
-	} else {
-		auto_move(7, P_CHEWY);
-		det->hide_static_spr(9);
-		start_detail_frame(2, 1, ANI_VOR, 9);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		wait_detail(2);
-		start_detail_wait(5, 1, ANI_VOR);
-		det->show_static_spr(9);
-	}
-	del_inventar(tmp);
-	det->start_detail(6, 255, ANI_VOR);
-	wait_show_screen(40);
-	if (waffe)
-		auto_move(7, P_CHEWY);
-	start_aad_wait(26, -1);
-	det->hide_static_spr(9);
-	start_detail_wait(3, 1, ANI_VOR);
-	det->show_static_spr(9);
-	invent_2_slot(FLUXO_INV);
-	atds->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
-	_G(spieler).R14FluxoFlex = true;
-	flags.AutoAniPlay = false;
-	show_cur();
-}
-
-void r16_entry() {
-	_G(zoom_horizont) = 140;
-	if (!_G(spieler).R16F5Exit) {
-		det->show_static_spr(4);
-		_G(spieler).room_e_obj[32].Attribut = 255;
-		atds->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
-	} else {
-		det->hide_static_spr(4);
-		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
-		atds->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
-	}
-}
-
-int16 r16_use_gleiter() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(6, P_CHEWY);
-		_G(spieler).R23GleiterExit = 16;
-		r23_cockpit();
-	}
-	return action_flag;
-}
-
-void r17_entry() {
-	r17_plot_seil();
-	if (_G(spieler).R17GitterWeg)
-		det->hide_static_spr(5);
-	if (_G(spieler).R17DoorKommand)
-		det->show_static_spr(7);
-	if (_G(spieler).R17Location == 1) {
-		flags.ZoomMov = true;
-		_G(zoom_mov_fak) = 3;
-		room->set_zoom(25);
-		_G(zoom_horizont) = 0;
-		_G(spieler).scrollx = 0;
-		_G(spieler).scrolly = 60;
-		set_person_pos(242, 146, P_CHEWY, P_LEFT);
-		r17_xit();
-	} else if (_G(spieler).R17Location == 3) {
-		room->set_zoom(32);
-		_G(zoom_horizont) = 399;
-		r17_xit();
-	} else {
-		room->set_zoom(15);
-		_G(zoom_horizont) = 0;
-		_G(spieler).room_e_obj[36].Attribut = 255;
-		_G(spieler).room_e_obj[38].Attribut = 255;
-		if (_G(spieler).R6DoorLeftF)
-			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
-		else
-			_G(spieler).room_e_obj[39].Attribut = 255;
-		if (_G(spieler).R18DoorBruecke)
-			_G(spieler).room_e_obj[35].Attribut = AUSGANG_LINKS;
-		else
-			_G(spieler).room_e_obj[35].Attribut = 255;
-	}
-}
-
-void r17_xit() {
-	if (_G(spieler).R17DoorKommand)
-		_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
-	else
-		_G(spieler).room_e_obj[36].Attribut = 255;
-	_G(spieler).room_e_obj[35].Attribut = 255;
-	_G(spieler).room_e_obj[39].Attribut = 255;
-	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
-}
-
-int16 r17_use_seil() {
-	int16 action_flag = false;
-	if (!flags.AutoAniPlay) {
-		if (_G(spieler).R17Location == 1) {
-			if (is_cur_inventar(SEIL_INV)) {
-				action_flag = true;
-				del_inventar(_G(spieler).AkInvent);
-				flags.AutoAniPlay = true;
-				auto_move(5, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(10, 1, ANI_VOR);
-				_G(spieler).R17Seil = true;
-				atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
-				r17_plot_seil();
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				flags.AutoAniPlay = false;
-				start_aad(119, -1);
-			}
-		}
-	}
-	return action_flag;
-}
-
-void r17_plot_seil() {
-	int16 i;
-	if (_G(spieler).R17Seil) {
-		for (i = 0; i < 3; i++)
-			det->show_static_spr(8 + i);
-	}
-}
-
-#define R17_CHEWY_OBJ 0
-int16 r17_chewy_phasen[4][2] = {
-	{ 0, 0 },
-	{ 0, 0 },
-	{ 141, 144 },
-	{ 177, 177 }
-};
-
-MovLine r17_chewy_mpkt[2] = {
-	{ { 241, 150, 0 }, 3, 8 },
-	{ { 241, 350, 0 }, 3, 8 }
-};
-
-MovLine r17_chewy_mpkt1[2] = {
-	{ { 243, 334, 0 }, 2, 6 },
-	{ { 243, 150, 0 }, 2, 6 }
-};
-
-void r17_kletter_down() {
-	auto_move(5, P_CHEWY);
-	det->load_taf_seq(177, 1, 0);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(14, 1, ANI_VOR);
-	flags.ZoomMov = false;
-	_G(zoom_mov_fak) = 1;
-	_G(spieler).ScrollyStep = 2;
-	room->set_zoom(32);
-	_G(zoom_horizont) = 399;
-	_G(auto_obj) = 1;
-	init_auto_obj(R17_CHEWY_OBJ, &r17_chewy_phasen[0][0], mov_phasen[R17_CHEWY_OBJ].Lines, (MovLine
-	              *)r17_chewy_mpkt);
-	set_person_pos(242, 350, P_CHEWY, P_LEFT);
-}
-
-void r17_kletter_up() {
-	auto_move(6, P_CHEWY);
-	det->load_taf_seq(141, 4, 0);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(11, 1, ANI_VOR);
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	_G(spieler).ScrollyStep = 1;
-	room->set_zoom(25);
-	_G(zoom_horizont) = 0;
-	_G(auto_obj) = 1;
-	init_auto_obj(R17_CHEWY_OBJ, &r17_chewy_phasen[0][0], mov_phasen[R17_CHEWY_OBJ].Lines, (MovLine
-	              *)r17_chewy_mpkt1);
-	set_person_pos(243, 146, P_CHEWY, P_LEFT);
-}
-
-void r17_calc_seil() {
-	if (_G(spieler).R17Seil) {
-		if (_G(spieler).R17Location != 2) {
-			if (!flags.AutoAniPlay) {
-				if (!_G(spieler).inv_cur) {
-					r17_close_door();
-					flags.AutoAniPlay = true;
-					mov_phasen[R17_CHEWY_OBJ].AtsText = 0;
-					mov_phasen[R17_CHEWY_OBJ].Lines = 2;
-					mov_phasen[R17_CHEWY_OBJ].Repeat = 1;
-					mov_phasen[R17_CHEWY_OBJ].ZoomFak = 0;
-					auto_mov_obj[R17_CHEWY_OBJ].Id = AUTO_OBJ0;
-					auto_mov_vector[R17_CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
-					auto_mov_obj[R17_CHEWY_OBJ].Mode = 1;
-					if (_G(spieler).R17Location == 1) {
-						r17_kletter_down();
-						_G(spieler).R17Location = 3;
-					}
-					else if (_G(spieler).R17Location == 3) {
-						r17_kletter_up();
-						_G(spieler).R17Location = 1;
-					}
-					menu_item = CUR_WALK;
-					cursor_wahl(menu_item);
-					wait_auto_obj(R17_CHEWY_OBJ);
-					set_person_spr(P_LEFT, P_CHEWY);
-					_G(spieler).ScrollyStep = 1;
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					flags.AutoAniPlay = false;
-					_G(auto_obj) = 0;
-					r17_xit();
-				}
-			}
-		}
-	}
-}
-
-void r17_door_kommando(int16 mode) {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		if (!mode) {
-			if (!_G(spieler).R17DoorKommand) {
-				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
-				_G(spieler).R17DoorKommand = true;
-				start_detail_wait(4, 1, ANI_VOR);
-				stop_person(P_CHEWY);
-				det->show_static_spr(7);
-			}
-		} else {
-			r17_close_door();
-		}
-		flags.AutoAniPlay = false;
-		atds->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
-	}
-}
-
-void r17_close_door() {
-	if (_G(spieler).R17DoorKommand) {
-		_G(spieler).room_e_obj[36].Attribut = 255;
-		_G(spieler).R17DoorKommand = false;
-		det->hide_static_spr(7);
-		det->start_detail(4, 1, ANI_RUECK);
-	}
-}
-
-int16 r17_energie_hebel() {
-	int16 dia_nr;
-	int16 action_flag = false;
-	auto_move(7, P_CHEWY);
-	if (!_G(spieler).R17HebelOk) {
-		action_flag = true;
-		if (is_cur_inventar(BECHER_VOLL_INV)) {
-			_G(spieler).R17HebelOk = true;
-			dia_nr = 38;
-		} else
-			dia_nr = 37;
-		start_aad_wait(dia_nr, -1);
-	}
-	else if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
-		_G(spieler).R17EnergieOut ^= 1;
-		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
-		det->play_sound(12, 0);
-		if (_G(spieler).R17EnergieOut)
-			det->disable_sound(15, 0);
-		else {
-			det->enable_sound(15, 0);
-			det->play_sound(15, 0);
-		}
-	}
-	return action_flag;
-}
-
-int16 r17_get_oel() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
-		start_aad_wait(60, -1);
-	} else if (is_cur_inventar(BECHER_LEER_INV)) {
-		action_flag = true;
-		r17_close_door();
-		auto_move(4, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		del_inventar(_G(spieler).AkInvent);
-		obj->add_inventar(BECHER_VOLL_INV, &room_blk);
-		inventory_2_cur(BECHER_VOLL_INV);
-	}
-
-	return action_flag;
-}
-
-int16 bork_spr [5] = {15, 16, 17, 24, 25};
-int16 bork_spr1[4] = {20, 21, 18, 19};
-
-void r18_entry() {
-	int16 i;
-	_G(spieler).R18MoniSwitch = 0;
-	_G(spieler).R18CartTerminal = 0;
-	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
-	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).R18CartTerminal)
-		det->show_static_spr(23);
-	if (!_G(spieler).R18SurimyWurf)
-		r18_init_borks();
-	else {
-		for (i = 0; i < 5; i++)
-			det->hide_static_spr(bork_spr[i]);
-		for (i = 0; i < (4 - _G(spieler).R18Krone); i++)
-			det->show_static_spr(bork_spr1[i]);
-	}
-	if (_G(spieler).R16F5Exit)
-		det->hide_static_spr(19);
-	if (_G(spieler).R17EnergieOut) {
-		det->stop_detail(0);
-		atds->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
-	} else {
-		atds->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
-	}
-	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
-		start_aad_wait(39, -1);
-		_G(spieler).R18FirstEntry = true;
-	}
-}
-
-void r18_init_borks() {
-	int16 i;
-	for (i = 0; i < 5; i++)
-		det->show_static_spr(bork_spr[i]);
-	for (i = 0; i < 4; i++)
-		det->hide_static_spr(bork_spr1[i]);
-	_G(timer_nr)[0] = room->set_timer(255, 10);
-	_G(timer_nr)[1] = room->set_timer(255, 15);
-	_G(spieler).scrollx = 276;
-	_G(spieler).scrolly = 0;
-	flags.NoScroll = true;
-}
-
-void r18_timer_action(int16 t_nr) {
-
-	if (!_G(spieler).R18SurimyWurf) {
-		if (!flags.AutoAniPlay) {
-			flags.AutoAniPlay = true;
-			if (t_nr == _G(timer_nr)[0]) {
-				det->hide_static_spr(16);
-				start_detail_wait(10, 1, ANI_VOR);
-				det->show_static_spr(16);
-				uhr->reset_timer(_G(timer_nr)[0], 10);
-			}
-			else if (t_nr == _G(timer_nr)[1]) {
-				hide_cur();
-				det->hide_static_spr(17);
-				start_detail_wait(9, 1, ANI_VOR);
-				det->show_static_spr(17);
-				if (!_G(spieler).R18SondeMoni) {
-					_G(spieler).R18SondeMoni = true;
-					start_detail_wait(2, 1, ANI_VOR);
-					det->show_static_spr(9);
-					start_detail_wait(4, 1, ANI_VOR);
-					det->show_static_spr(11);
-					wait_show_screen(50);
-					det->hide_static_spr(9);
-					det->hide_static_spr(11);
-				} else {
-					r18_monitor();
-				}
-				show_cur();
-				uhr->reset_timer(_G(timer_nr)[1], 15);
-			}
-			flags.AutoAniPlay = false;
-		}
-	}
-}
-
-void r18_monitor() {
-	int16 nr;
-	nr = 0;
-	_G(spieler).R18MoniSwitch ^= 1;
-	if (_G(spieler).R18MoniSwitch) {
-		start_ani_block(2, ablock21);
-		if (_G(spieler).R17EnergieOut)
-			nr = 2;
-		else
-			nr = 1;
-	} else {
-		det->stop_detail(23);
-		atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
-	}
-	atds->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
-}
-
-int16 r18_sonden_moni() {
-	int16 i;
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		hide_cur();
-		auto_move(8, P_CHEWY);
-		start_detail_wait(3, 1, ANI_VOR);
-		det->show_static_spr(10);
-		start_ani_block(3, ablock20);
-		for (i = 0; i < 3; i++)
-			det->show_static_spr(i + 12);
-		wait_show_screen(40);
-		for (i = 0; i < 5; i++)
-			det->hide_static_spr(i + 10);
-		show_cur();
-	}
-	return action_flag;
-}
-
-int16 r18_surimy_phasen[4][2] = {
-	{ 245, 252 },
-	{ 0, 0 },
-	{ 0, 0 },
-	{ 0, 0 }
-};
-
-MovLine r18_surimy_mpkt[2] = {
-	{ { 453, 170, 190 }, 0, 6 },
-	{ { 392, 170, 190 }, 0, 6 }
-};
-
-MovLine r18_surimy_mpkt1[2] = {
-	{ { 392, 170, 190 }, 0, 6 },
-	{ { 143, 170, 190 }, 0, 6 }
-};
-
-MovLine r18_surimy_mpkt2[2] = {
-	{ { 143, 170, 190 }, 0, 6 },
-	{ {   0, 170, 190 }, 0, 6 }
-};
-
-MovLine r18_surimy_mpkt3[2] = {
-	{ { 500, 100, 190 }, 0, 12 },
-	{ { 392, 170, 190 }, 0, 12 }
-};
-
-int16 r18_calc_surimy() {
-	int16 i;
-	int16 action_flag = false;
-	if (is_cur_inventar(SURIMY_INV)) {
-		action_flag = true;
-		hide_cur();
-		del_inventar(_G(spieler).AkInvent);
-		_G(spieler).R18SurimyWurf = true;
-		det->load_taf_seq(245, 294 - 245 + 1, 0);
-		det->load_taf_seq(116, 170 - 116 + 1, 0);
-		_G(auto_obj) = 1;
-		mov_phasen[SURIMY_OBJ].AtsText = 0;
-		mov_phasen[SURIMY_OBJ].Lines = 2;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[SURIMY_OBJ].Mode = 1;
-		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
-			start_detail_frame(18, 1, ANI_VOR, 8);
-
-			init_auto_obj(SURIMY_OBJ, &r18_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			              *)r18_surimy_mpkt3);
-			wait_detail(18);
-		} else {
-			auto_move(1, P_CHEWY);
-			stop_person(P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_frame(17, 1, ANI_VOR, 12);
-			_G(maus_links_click) = false;
-
-			init_auto_obj(SURIMY_OBJ, &r18_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			              *)r18_surimy_mpkt);
-			wait_detail(17);
-		}
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		wait_auto_obj(SURIMY_OBJ);
-
-		det->set_detail_pos(21, 392, 170);
-		det->set_detail_pos(22, 447, 154);
-		start_detail_frame(21, 1, ANI_VOR, 14);
-		det->start_detail(22, 1, ANI_VOR);
-		wait_detail(21);
-		det->set_static_pos(26, 392, 170, false, true);
-		det->show_static_spr(26);
-
-		det->hide_static_spr(24);
-		start_ani_block(2, ablock22);
-		det->show_static_spr(20);
-
-		for (i = 0; i < 3; i++)
-			det->hide_static_spr(i + 15);
-		start_ani_block(2, ablock23);
-		det->show_static_spr(18);
-		det->show_static_spr(19);
-
-		det->hide_static_spr(26);
-		flags.NoScroll = true;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &r18_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-		              *)r18_surimy_mpkt1);
-		auto_scroll(70, 0);
-		wait_auto_obj(SURIMY_OBJ);
-
-		det->set_detail_pos(21, 143, 170);
-		det->set_detail_pos(22, 198, 154);
-		start_detail_frame(21, 1, ANI_VOR, 14);
-		det->start_detail(22, 1, ANI_VOR);
-		wait_detail(21);
-		det->set_static_pos(26, 143, 170, false, true);
-		det->show_static_spr(26);
-
-		det->hide_static_spr(25);
-		start_ani_block(2, ablock24);
-		det->show_static_spr(21);
-
-		det->hide_static_spr(26);
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &r18_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-		              *)r18_surimy_mpkt2);
-		auto_scroll(0, 0);
-		wait_auto_obj(SURIMY_OBJ);
-		_G(spieler).ScrollxStep = 6;
-		flags.NoScroll = false;
-		auto_scroll(318, 0);
-		_G(spieler).ScrollxStep = 2;
-		_G(auto_obj) = 0;
-
-		atds->set_ats_str(153, 1, ATS_DATEI);
-
-		atds->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
-		for (i = 0; i < 3; i++)
-			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
-
-		show_cur();
-	}
-	return action_flag;
-}
-
-int16 r18_calc_schalter() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
-		action_flag = true;
-		auto_move(6, P_CHEWY);
-
-		r18_monitor();
-	}
-	return action_flag;
-}
-
-short r18_use_cart_moni() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(9, P_CHEWY);
-		set_person_spr(P_LEFT, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R18CartTerminal ^= 1;
-		if (!_G(spieler).R18CartTerminal) {
-			atds->set_ats_str(157, TXT_MARK_LOOK, 0, ATS_DATEI);
-
-			atds->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
-			det->hide_static_spr(23);
-			start_detail_wait(20, 1, ANI_RUECK);
-		} else {
-			atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
-			atds->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
-			start_detail_wait(20, 1, ANI_VOR);
-			det->show_static_spr(23);
-			if (_G(spieler).R18CartFach) {
-				_G(spieler).R18CartSave = true;
-				atds->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
-				start_aad_wait(120, -1);
-			}
-		}
-	}
-	return action_flag;
-}
-
-int16 r18_go_cyberspace() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
-		action_flag = true;
-		auto_move(7, P_CHEWY);
-		cur_2_inventory();
-		switch_room(24);
-	}
-	return action_flag;
-}
-
-void r19_entry() {
-	_G(zoom_horizont) = 250;
-	flags.NoScroll = true;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 24;
-}
-
-void r21_entry() {
-	load_chewy_taf(CHEWY_MINI);
-	r21_calc_laser();
-	r21_init_spinne();
-	_G(timer_nr)[2] = room->set_timer(255, 1);
-	flags.NoEndPosMovObj = true;
-	SetUpScreenFunc = r21setup_func;
-}
-
-void r21_calc_laser() {
-
-	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
-		_G(spieler).R21Laser1Weg = true;
-		det->stop_detail(3);
-		atds->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
-	} else {
-		_G(spieler).R21Laser1Weg = false;
-		det->start_detail(3, 255, ANI_VOR);
-		atds->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
-	}
-
-	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
-		if (obj->check_inventar(SEIL_INV) == false) {
-			obj->show_sib(SIB_SEIL_R21);
-			atds->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
-		}
-		_G(spieler).R21Laser2Weg = true;
-		det->stop_detail(4);
-		atds->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
-	} else {
-		obj->hide_sib(SIB_SEIL_R21);
-		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).R21Laser2Weg = false;
-		det->start_detail(4, 255, ANI_VOR);
-		atds->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
-	}
-}
-
-#define R21_SPINNE1_OBJ 0
-#define R21_SPINNE2_OBJ 1
-#define R21_ENERGIE_OBJ 2
-int16 r21_spinne_phasen[4][2] = {
-	{ 58, 65 },
-	{ 50, 57 },
-	{ 42, 49 },
-	{ 66, 89 }
-};
-
-MovLine r21_spinne_mpkt[3] = {
-	{ { 550, 275, 0 }, 0, 2 },
-	{ { 396, 275, 0 }, 0, 2 },
-	{ { 530, 275, 0 }, 1, 2 }
-};
-
-MovLine r21_spinne_mpkt1[2] = {
-	{ { 104,  50, 0 }, 3, 3 },
-	{ { 104, 430, 0 }, 3, 3 }
-};
-
-MovLine r21_energie_mpkt[2] = {
-	{ { 115, 140, 0 }, 2, 1 },
-	{ { 115, 190, 0 }, 2, 1 }
-};
-
-void r21_init_spinne() {
-	det->load_taf_seq(42, (89 - 42) + 1, 0);
-	_G(auto_obj) = 2;
-
-	mov_phasen[R21_SPINNE1_OBJ].AtsText = 130;
-	mov_phasen[R21_SPINNE1_OBJ].Lines = 3;
-	mov_phasen[R21_SPINNE1_OBJ].Repeat = 255;
-	mov_phasen[R21_SPINNE1_OBJ].ZoomFak = 0;
-	auto_mov_obj[R21_SPINNE1_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[R21_SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[R21_SPINNE1_OBJ].Mode = 1;
-	init_auto_obj(R21_SPINNE1_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE1_OBJ].Lines, (MovLine *)r21_spinne_mpkt);
-
-	mov_phasen[R21_SPINNE2_OBJ].AtsText = 130;
-	mov_phasen[R21_SPINNE2_OBJ].Lines = 2;
-	mov_phasen[R21_SPINNE2_OBJ].Repeat = 1;
-	mov_phasen[R21_SPINNE2_OBJ].ZoomFak = 0;
-	auto_mov_obj[R21_SPINNE2_OBJ].Id = AUTO_OBJ1;
-	auto_mov_vector[R21_SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[R21_SPINNE2_OBJ].Mode = 1;
-	init_auto_obj(R21_SPINNE2_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE2_OBJ].Lines, (MovLine *)r21_spinne_mpkt1);
-	_G(timer_nr)[0] = room->set_timer(255, 21);
-	e_streifen = false;
-
-}
-
-void r21_restart_spinne2() {
-	mov_phasen[R21_SPINNE2_OBJ].Repeat = 1;
-	init_auto_obj(R21_SPINNE2_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_SPINNE2_OBJ].Lines, (MovLine *)r21_spinne_mpkt1);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
-	e_streifen = false;
-
-}
-
-void r21_e_streifen() {
-	_G(auto_obj) = 3;
-	mov_phasen[R21_ENERGIE_OBJ].AtsText = 0;
-	mov_phasen[R21_ENERGIE_OBJ].Lines = 2;
-	mov_phasen[R21_ENERGIE_OBJ].Repeat = 1;
-	mov_phasen[R21_ENERGIE_OBJ].ZoomFak = 0;
-	auto_mov_obj[R21_ENERGIE_OBJ].Id = AUTO_OBJ2;
-	auto_mov_vector[R21_ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[R21_ENERGIE_OBJ].Mode = 1;
-	init_auto_obj(R21_ENERGIE_OBJ, &r21_spinne_phasen[0][0], mov_phasen[R21_ENERGIE_OBJ].Lines, (MovLine *)r21_energie_mpkt);
-
-}
-
-void r21setup_func() {
-	if (auto_mov_vector[R21_SPINNE2_OBJ].Xypos[1] >= 190) {
-		if (!e_streifen) {
-			e_streifen = true;
-			r21_e_streifen();
-		}
-	}
-}
-
-void r21_chewy_kolli() {
-	int16 spr_nr;
-	int16 *Cxy;
-	int16 xoff;
-	int16 yoff;
-	int16 *xy;
-	int16 kolli;
-	int16 i;
-	int16 ani_nr;
-	int16 tmp;
-	kolli = false;
-
-	for (i = 0; i < 3 && !kolli; i++) {
-		spr_nr = mov_phasen[i].Phase[auto_mov_vector[i].Phase][0] +
-		         auto_mov_vector[i].PhNr;
-		xy = (int16 *)room_blk.DetImage[spr_nr];
-		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
-		xoff = xy[0];
-		yoff = xy[1];
-		if (i == 2)
-			xoff += 10;
-		xoff += auto_mov_vector[i].Xzoom;
-		yoff += auto_mov_vector[i].Yzoom;
-		if ((!i && spieler_vector[P_CHEWY].Xypos[0] < 516) ||
-		        (i == 1 && spieler_vector[P_CHEWY].Xypos[1] > 70) ||
-		        (i == 2)) {
-			if (spieler_vector[P_CHEWY].Xypos[0] + 12 >= auto_mov_vector[i].Xypos[0] + Cxy[0] &&
-			        spieler_vector[P_CHEWY].Xypos[0] + 12 <= auto_mov_vector[i].Xypos[0] + xoff + Cxy[0] &&
-			        spieler_vector[P_CHEWY].Xypos[1] + 12 >= auto_mov_vector[i].Xypos[1] + Cxy[1] &&
-			        spieler_vector[P_CHEWY].Xypos[1] + 12 <= auto_mov_vector[i].Xypos[1] + yoff + Cxy[1] &&
-			        mov_phasen[i].Start == 1)
-				kolli = true;
-		}
-	}
-	if (kolli) {
-		if (!flags.AutoAniPlay) {
-			tmp = spieler_vector[P_CHEWY].Count;
-			stop_person(P_CHEWY);
-			flags.AutoAniPlay = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			if (spieler_vector[P_CHEWY].Xyvo[0] < 0)
-				ani_nr = 10;
-			else
-				ani_nr = 11;
-			det->
-			set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			start_detail_wait(ani_nr, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			flags.AutoAniPlay = false;
-			spieler_vector[P_CHEWY].Count = tmp;
-			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-			mov->continue_auto_go();
-		}
-	}
-}
-
-void r21_salto() {
-	int16 i;
-	if (!_G(spieler).inv_cur) {
-		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
-			if (!_G(spieler).R21Salto) {
-				if (!flags.AutoAniPlay) {
-					_G(spieler).R21Salto = true;
-					flags.AutoAniPlay = true;
-					_G(spieler).PersonHide[P_CHEWY] = true;
-					for (i = 0; i < 3; i++)
-						det->
-						set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]
-						              );
-					start_ani_block(3, ablock19);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					start_aad_wait(36, -1);
-					flags.AutoAniPlay = false;
-				}
-			}
-		}
-	}
-}
-
-void r21_use_gitter_energie() {
-	_G(spieler).R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
-	                           AUSGANG_UNTEN, AUSGANG_OBEN,
-	                           (int16)_G(spieler).R21GitterEnergie);
-	_G(auto_obj) = 0;
-	_G(spieler).R17Location = 1;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	switch_room(17);
-	det->hide_static_spr(5);
-	start_detail_wait(9, 1, ANI_VOR);
-	_G(spieler).R17GitterWeg = true;
-	_G(spieler).PersonHide[P_CHEWY] = false;
-}
-
-int16 r21_use_fenster() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (!flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
-			action_flag = true;
-			flags.AutoAniPlay = true;
-			_G(spieler).R18Gitter = true;
-			auto_move(13, P_CHEWY);
-			set_person_pos(541, 66, P_CHEWY, P_LEFT);
-			switch_room(18);
-			if (!_G(spieler).R18FirstEntry) {
-				start_aad_wait(39, -1);
-				_G(spieler).R18FirstEntry = true;
-			}
-			_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
-			_G(spieler).room_e_obj[41].Attribut = 255;
-			flags.AutoAniPlay = false;
-		}
-	}
-	return action_flag;
-}
-
-void r22_entry() {
-	if (!_G(spieler).R22BorkPlatt) {
-		det->load_taf_seq(36, (56 - 36) + 1, 0);
-		room->set_timer(255, 15);
-	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork)
-		det->show_static_spr(4);
-}
-
-int16 r22_chewy_amboss() {
-	int16 action_flag = false;
-	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
-		action_flag = true;
-		flags.AutoAniPlay = true;
-		auto_move(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(1, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		auto_move(2, P_CHEWY);
-		flags.NoPalAfterFlc = false;
-		flic_cut(FCUT_007, CFO_MODE);
-		_G(spieler).R22ChewyPlatt = true;
-		atds->set_ats_str(79, 1, ATS_DATEI);
-		flags.AutoAniPlay = false;
-	}
-	return action_flag;
-}
-
-#define R22_BORK_OBJ 0
-int16 r22_bork_phasen[4][2] = {
-	{ 51, 56 },
-	{ 36, 41 },
-	{ 36, 41 },
-	{ 36, 41 }
-};
-
-MovLine r22_bork_mpkt[2] = {
-	{ {-30, 125, 170} , 1, 6 },
-	{ { 155, 125, 170 }, 1, 6 },
-};
-
-MovLine r22_bork_mpkt1[2] = {
-	{ { 155, 125, 170}, 2, 6 },
-	{ { -30, 125, 170}, 0, 6 }
-};
-
-MovLine r22_bork_mpkt2[2] = {
-	{ { -30, 125, 170 }, 1, 6 },
-	{ {  90, 125, 170 }, 1, 6 }
-};
-
-void r22_bork(int16 t_nr) {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		if (!_G(spieler).R22BorkPlatt) {
-			hide_cur();
-			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(10, -1);
-			auto_move(3, P_CHEWY);
-			_G(auto_obj) = 1;
-			mov_phasen[R22_BORK_OBJ].AtsText = 0;
-			mov_phasen[R22_BORK_OBJ].Lines = 2;
-			mov_phasen[R22_BORK_OBJ].Repeat = 1;
-			mov_phasen[R22_BORK_OBJ].ZoomFak = 0;
-			auto_mov_obj[R22_BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[R22_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[R22_BORK_OBJ].Mode = 1;
-			if (!_G(spieler).R22Paint) {
-				r22_bork_walk1();
-			} else {
-				_G(spieler).R22ChewyPlatt = true;
-				r22_bork_walk2();
-			}
-			show_cur();
-		}
-		uhr->reset_timer(t_nr, 0);
-		flags.AutoAniPlay = false;
-	}
-}
-
-void r22_bork_walk1() {
-
-	init_auto_obj(R22_BORK_OBJ, &r22_bork_phasen[0][0], mov_phasen[R22_BORK_OBJ].Lines, (MovLine
-	              *)r22_bork_mpkt);
-	wait_auto_obj(R22_BORK_OBJ);
-
-	start_detail_wait(2, 1, ANI_VOR);
-
-	mov_phasen[R22_BORK_OBJ ].Repeat = 1;
-	init_auto_obj(R22_BORK_OBJ, &r22_bork_phasen[0][0], mov_phasen[R22_BORK_OBJ].Lines, (MovLine
-	              *)r22_bork_mpkt1);
-	wait_auto_obj(R22_BORK_OBJ);
-}
-
-void r22_bork_walk2() {
-
-	init_auto_obj(R22_BORK_OBJ, &r22_bork_phasen[0][0], mov_phasen[R22_BORK_OBJ].Lines, (MovLine
-	              *)r22_bork_mpkt2);
-	wait_auto_obj(R22_BORK_OBJ);
-
-	flic_cut(FCUT_009, CFO_MODE);
-	det->show_static_spr(4);
-	atds->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(spieler).R22BorkPlatt = true;
-	atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
-}
-
-void r22_get_bork() {
-	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
-		auto_move(4, P_CHEWY);
-		det->hide_static_spr(4);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ablock14);
-		set_person_pos(171, 120, P_CHEWY, P_LEFT);
-		start_aad_wait(11, -1);
-		det->stop_detail(3);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		atds->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
-		invent_2_slot(BORK_INV);
-
-		_G(spieler).R22GetBork = true;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
-	}
-}
-
-int16 r22_malen() {
-	int16 action_flag = false;
-	if (!flags.AutoAniPlay && is_cur_inventar(17)) {
-		action_flag = true;
-		flags.AutoAniPlay = true;
-		auto_move(8, P_CHEWY);
-		flic_cut(FCUT_008, CFO_MODE);
-		atds->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
-		_G(spieler).R22Paint = true;
-		obj->calc_rsi_flip_flop(SIB_PAINT_R22);
-		obj->hide_sib(SIB_PAINT_R22);
-		del_inventar(_G(spieler).AkInvent);
-		obj->calc_all_static_detail();
-		flags.AutoAniPlay = false;
-	}
-	return action_flag;
-}
-
-void r23_cockpit() {
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	_G(maus_links_click) = false;
-	switch_room(23);
-	if (_G(spieler).R23Cartridge)
-		det->show_static_spr(3);
-	else
-		det->hide_static_spr(3);
-}
-
-int16 r23_start_gleiter() {
-	int16 i;
-	int16 start_ok;
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		start_ok = false;
-		if (!_G(spieler).R23FluxoFlex)
-			start_aad_wait(23, -1);
-		else {
-			start_ok = true;
-			if (_G(spieler).R23GleiterExit == 16) {
-				if (!_G(spieler).R16F5Exit) {
-					start_ok = false;
-					start_aad_wait(35, -1);
-				} else if ((!_G(spieler).R23Cartridge) || (!_G(spieler).R18CartSave)) {
-
-					start_ok = false;
-					start_aad_wait(41, -1);
-				} else if (!_G(spieler).R17EnergieOut) {
-
-					start_ok = false;
-					start_aad_wait(300, -1);
-				}
-			}
-			if (start_ok) {
-				hide_cur();
-				start_ani_block(4, ablock15);
-				wait_show_screen(30);
-				for (i = 0; i < 4; i++)
-					det->stop_detail(i);
-				if (_G(spieler).R23GleiterExit == 14) {
-					out->setze_zeiger(0);
-					out->cls();
-					flic_cut(FCUT_012, CFO_MODE);
-					out->cls();
-					_G(spieler).R23GleiterExit = 16;
-					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
-					switch_room(_G(spieler).R23GleiterExit);
-					start_spz(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
-					while (flags.SpzAni && !SHOULD_QUIT)
-						set_up_screen(DO_SETUP);
-					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
-					_G(spieler).DelaySpeed = 10;
-					start_aad_wait(59, -1);
-					stop_person(P_CHEWY);
-					_G(maus_links_click) = false;
-				} else if (_G(spieler).R23GleiterExit == 16) {
-					out->setze_zeiger(0);
-					out->cls();
-					flic_cut(FCUT_019, CFO_MODE);
-					_G(spieler).R23GleiterExit = 25;
-
-					switch_room(_G(spieler).R23GleiterExit);
-				}
-
-				show_cur();
-			}
-		}
-	}
-	return action_flag;
-}
-
-void r23_use_cartridge() {
-	del_inventar(_G(spieler).AkInvent);
-	atds->set_ats_str(111, 1, ATS_DATEI);
-	atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(spieler).R23Cartridge = true;
-	if (_G(spieler).R18CartSave) {
-		start_detail_wait(4, 1, ANI_VOR);
-		det->show_static_spr(3);
-	}
-	menu_item_vorwahl = CUR_USE;
-}
-
-void r23_get_cartridge() {
-	atds->set_ats_str(111, 0, ATS_DATEI);
-	atds->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-	if (_G(spieler).R18CartSave) {
-		_G(spieler).R23Cartridge = false;
-		det->hide_static_spr(3);
-	}
-}
-
-uint8 kristall_spr[3][3] = { {14, 20, 13},
-	{20, 13, 14},
-	{13, 14, 20},
-};
-
-void r24_entry() {
-	int16 i;
-	flags.MainInput = false;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	set_person_pos(0, 0, P_CHEWY, -1);
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	curblk.sprite = room_blk.DetImage;
-	curani.ani_anf = 7;
-	curani.ani_end = 10;
-	menu_item = CUR_USER;
-	cursor_wahl(CUR_USER);
-	if (_G(spieler).R16F5Exit)
-		det->show_static_spr(10);
-	else
-		det->hide_static_spr(10);
-	r24_calc_hebel_spr();
-	r24_calc_animation(255);
-	for (i = 0; i < 3; i++) {
-		if (kristall_spr[i][_G(spieler).R24Hebel[i]] == 20)
-			det->start_detail(5 + i * 4, 255, ANI_RUECK);
-	}
-}
-
-void r24_exit() {
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
-	set_person_pos(263, 144, P_CHEWY, -1);
-	_G(spieler).scrollx = 88;
-	_G(maus_links_click) = false;
-	flags.MainInput = true;
-}
-
-void r24_use_hebel(int16 txt_nr) {
-	if (!_G(spieler).R24Hebel[txt_nr - 161] ||
-	        _G(spieler).R24Hebel[txt_nr - 161] == 2) {
-		_G(spieler).R24Hebel[txt_nr - 161] = 1;
-		_G(spieler).R24HebelDir[txt_nr - 161] ^= 1;
-	} else {
-		if (_G(spieler).R24HebelDir[txt_nr - 161])
-			_G(spieler).R24Hebel[txt_nr - 161] = 0;
-		else
-			_G(spieler).R24Hebel[txt_nr - 161] = 2;
-	}
-	r24_calc_hebel_spr();
-	r24_calc_animation(txt_nr - 161);
-
-	if (_G(spieler).R24Hebel[0] == 1 &&
-	        _G(spieler).R24Hebel[1] == 0 &&
-	        _G(spieler).R24Hebel[2] == 2) {
-		_G(spieler).R16F5Exit = true;
-		det->enable_sound(1, 0);
-		det->disable_sound(1, 1);
-		det->start_detail(1, 1, ANI_VOR);
-		det->show_static_spr(10);
-		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
-	}
-	else if (_G(spieler).R16F5Exit) {
-		det->hide_static_spr(10);
-		det->enable_sound(1, 1);
-		det->disable_sound(1, 0);
-		det->start_detail(1, 1, ANI_RUECK);
-		_G(spieler).R16F5Exit = false;
-		atds->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
-	}
-}
-
-void r24_calc_hebel_spr() {
-	int16 i;
-	int16 j;
-	if (!_G(spieler).R24FirstEntry) {
-		_G(spieler).R24FirstEntry = true;
-		_G(spieler).R24Hebel[0] = 2;
-		_G(spieler).R24HebelDir[0] = 0;
-		_G(spieler).R24Hebel[1] = 1;
-		_G(spieler).R24HebelDir[1] = 0;
-		_G(spieler).R24Hebel[2] = 0;
-		_G(spieler).R24HebelDir[2] = 1;
-	}
-	for (i = 0; i < 3; i++) {
-		for (j = 0; j < 3; j++)
-			det->hide_static_spr(1 + j + i * 3);
-		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
-		atds->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
-	}
-}
-
-void r24_calc_animation(int16 kristall_nr) {
-	int16 i;
-	int16 ani_nr;
-	if (kristall_nr != 255) {
-		hide_cur();
-
-		if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
-			if (_G(spieler).R24KristallLast[kristall_nr] == 13) {
-				ani_nr = 7;
-			} else {
-				ani_nr = 8;
-			}
-			det->enable_sound(ani_nr + kristall_nr * 4, 0);
-			det->disable_sound(5 + ani_nr + kristall_nr * 4, 0);
-			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
-			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
-		}
-
-		else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
-
-			if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
-				ani_nr = 7;
-			} else {
-				ani_nr = 8;
-			}
-			det->disable_sound(ani_nr + kristall_nr * 4, 0);
-			det->enable_sound(5 + ani_nr + kristall_nr * 4, 0);
-			det->stop_detail(5 + kristall_nr * 4);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
-		}
-		show_cur();
-	}
-
-	for (i = 0; i < 6; i++)
-		det->hide_static_spr(13 + i);
-	for (i = 0; i < 3; i++) {
-		det->show_static_spr(kristall_spr[i][_G(spieler).R24Hebel[i]] + i * 2);
-		_G(spieler).R24KristallLast[i] = kristall_spr[i][_G(spieler).R24Hebel[i]];
-	}
-}
-
-int16 r6_cut_serv1(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 44)
-		start_aad(108, 0);
-
-	return 0;
-}
-
-int16 r6_cut_serv2(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 31)
-		start_aad(107, 0);
-
-	return 0;
-}
-
-int16 r12_cut_serv(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 43)
-		start_aad(106, 0);
-
-	return 0;
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
index 640d1f78efc..12e79127692 100644
--- a/engines/chewy/episode1.h
+++ b/engines/chewy/episode1.h
@@ -26,210 +26,6 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-int16 r4_sonde_comp();
-
-void r5_knopf();
-
-void r6_entry();
-
-void r6_init_robo();
-
-void r6_init_robo1();
-
-void r6_bola_knopf();
-
-int16 r6_cut_serv1(int16 frame);
-int16 r6_cut_serv2(int16 frame);
-
-void r7_haken(int16 sib_nr);
-
-void r7_klingel();
-
-void r8_entry();
-
-void r8_start_folter();
-
-void r8_stop_folter();
-
-void r8_hole_kohle();
-
-void r8_start_verbrennen();
-
-bool r8_gips_wurf();
-
-void r8_open_gdoor();
-
-void r8_talk_nimoy();
-
-void r9_entry();
-
-void r9_gtuer();
-
-void r9_surimy();
-
-void r9_surimy_ani();
-
-void r10_entry();
-void r10_get_surimy();
-
-void r11_entry();
-
-int16 r11_scanner();
-
-void r11_terminal();
-
-void r11_bork_zwinkert();
-
-void r11_talk_debug();
-
-void r11_get_card();
-
-void r11_put_card();
-
-void r12_entry();
-
-void r12_init_bork();
-
-void r12_talk_bork();
-
-void r12_bork_talk_not_ok();
-
-int16 r12_use_terminal();
-
-int16 r12_use_linke_rohr();
-
-int16 r12_chewy_trans();
-
-int16 r12_proc1();
-
-void r11_chewy_bo_use();
-
-void r12_bork_ok();
-
-int16 r12_cut_serv(int16 frame);
-
-void r13_entry();
-
-void r13_exit();
-
-void r13_talk_bork();
-
-void r13_jmp_band();
-
-void r13_jmp_boden();
-
-int16 r13_monitor_knopf();
-
-void r14_entry();
-
-void r14_eremit_feuer(int16 t_nr, int16 ani_nr);
-
-int16 r14_use_schrott();
-
-int16 r14_use_schleim();
-
-int16 r14_use_gleiter();
-
-void r14_talk_eremit();
-
-void r14_feuer();
-
-void r16_entry();
-
-int16 r16_use_gleiter();
-
-void r17_entry();
-
-void r17_xit();
-
-void r17_calc_seil();
-
-void r17_plot_seil();
-
-int16 r17_use_seil();
-
-void r17_kletter_down();
-
-void r17_kletter_up();
-
-void r17_door_kommando(int16 mode);
-
-void r17_close_door();
-
-int16 r17_energie_hebel();
-
-int16 r17_get_oel();
-
-void r18_entry();
-
-void r18_init_borks();
-
-void r18_timer_action(int16 t_nr);
-
-int16 r18_calc_surimy();
-
-int16 r18_calc_schalter();
-
-void r18_monitor();
-
-int16 r18_go_cyberspace();
-
-int16 r18_sonden_moni();
-int16 r18_use_cart_moni();
-
-void r19_entry();
-
-void r21_entry();
-
-void r21_calc_laser();
-
-void r21_init_spinne();
-
-void r21_restart_spinne2();
-
-void r21_e_streifen();
-
-void r21_chewy_kolli();
-
-void r21_salto();
-
-void r21_use_gitter_energie();
-
-int16 r21_use_fenster();
-void r21setup_func();
-
-void r22_entry();
-
-void r22_bork(int16 t_nr);
-
-int16 r22_chewy_amboss();
-
-void r22_bork_walk1();
-
-void r22_bork_walk2();
-
-void r22_get_bork();
-
-int16 r22_malen();
-
-void r23_cockpit();
-
-int16 r23_start_gleiter();
-
-void r23_use_cartridge();
-
-void r23_get_cartridge();
-
-void r24_entry();
-
-void r24_exit();
-
-void r24_use_hebel(int16 txt_nr);
-
-void r24_calc_hebel_spr();
-
-void r24_calc_animation(int16 kristall_nr);
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 7bbe4ad0284..47dfab4802f 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -23,6 +23,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/episode2.h"
+#include "chewy/rooms/rooms.h"
 
 namespace Chewy {
 
@@ -109,7 +110,7 @@ int16 r25_use_gleiter() {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
 		_G(spieler).R23GleiterExit = 25;
-		r23_cockpit();
+		Room23::cockpit();
 	}
 	return action_flag;
 }
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index a44b634cb90..b6ee08f46a1 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -25,7 +25,6 @@
 namespace Chewy {
 
 void switch_room(int16 nr);
-void r23_cockpit();
 
 void r25_entry();
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index bdf848b2f0b..7b232f15463 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -91,6 +91,7 @@ public:
 	Common::String _calc_inv_text_str1, _calc_inv_text_str2;
 	bool _calc_inv_text_set = false;
 	bool _stopAutoMove[3] = { false };
+	bool _e_streifen = false;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index aa0a70d00ff..12b8ec9fc9d 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -53,7 +53,25 @@ MODULE_OBJS = \
 	rooms/room0.o \
 	rooms/room2.o \
 	rooms/room3.o \
-	rooms/room4.o
+	rooms/room4.o \
+	rooms/room5.o \
+	rooms/room6.o \
+	rooms/room7.o \
+	rooms/room8.o \
+	rooms/room9.o \
+	rooms/room10.o \
+	rooms/room11.o \
+	rooms/room12.o \
+	rooms/room13.o \
+	rooms/room14.o \
+	rooms/room16.o \
+	rooms/room17.o \
+	rooms/room18.o \
+	rooms/room19.o \
+	rooms/room21.o \
+	rooms/room22.o \
+	rooms/room23.o \
+	rooms/room24.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ca776f4b1a5..184f0fbbd9d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -106,7 +106,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 
 	case ROOM_9_4:
-		r9_gtuer();
+		Room9::gtuer();
 		break;
 
 	default:
@@ -130,13 +130,13 @@ void timer_action(int16 t_nr) {
 
 	case 11:
 		if (t_nr == _G(timer_nr)[0])
-			r11_bork_zwinkert();
+			Room11::bork_zwinkert();
 		break;
 
 	case 12:
 		if (t_nr == _G(timer_nr)[0]) {
 			if (!is_chewy_busy())
-				r12_init_bork();
+				Room12::init_bork();
 		} else if (t_nr == _G(timer_nr)[1]) {
 			if (_G(spieler).R12TransOn) {
 				_G(spieler).R12TransOn = false;
@@ -148,7 +148,7 @@ void timer_action(int16 t_nr) {
 	case 14:
 		switch (ani_nr) {
 		case 0:
-			r14_eremit_feuer(t_nr, ani_nr);
+			Room14::eremit_feuer(t_nr, ani_nr);
 			break;
 		default:
 			break;
@@ -166,19 +166,19 @@ void timer_action(int16 t_nr) {
 		break;
 
 	case 18:
-		r18_timer_action(t_nr);
+		Room18::timer_action(t_nr);
 		break;
 
 	case 21:
 		if (t_nr == _G(timer_nr)[0]) {
-			r21_restart_spinne2();
+			Room21::restart_spinne2();
 		} else if (t_nr == _G(timer_nr)[2])
-			r21_chewy_kolli();
+			Room21::chewy_kolli();
 		break;
 
 	case 22:
 		if (!ani_nr && !flags.ExitMov) {
-			r22_bork(t_nr);
+			Room22::bork(t_nr);
 		}
 		break;
 
@@ -321,7 +321,7 @@ void check_ged_action(int16 index) {
 			switch (index) {
 			case 0:
 				if (!_G(spieler).R9Surimy)
-					r9_surimy();
+					Room9::surimy();
 				break;
 
 			}
@@ -330,7 +330,7 @@ void check_ged_action(int16 index) {
 		case 11:
 			switch (index) {
 			case 0:
-				r11_chewy_bo_use();
+				Room11::chewy_bo_use();
 				break;
 
 			default:
@@ -343,7 +343,7 @@ void check_ged_action(int16 index) {
 			case 2:
 				if (_G(spieler).R12ChewyBork) {
 					stop_person(P_CHEWY);
-					r13_talk_bork();
+					Room13::talk_bork();
 				}
 				break;
 
@@ -355,11 +355,11 @@ void check_ged_action(int16 index) {
 		case 17:
 			switch (index) {
 			case 0:
-				r17_door_kommando(0);
+				Room17::door_kommando(0);
 				break;
 
 			case 1:
-				r17_door_kommando(1);
+				Room17::door_kommando(1);
 				break;
 
 			default:
@@ -629,51 +629,35 @@ void enter_room(int16 eib_nr) {
 	HowardMov = false;
 	_G(cur_hide_flag) = false;
 
+#define ENTRY(NUM) case NUM: Room##NUM::entry(); break
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-	case 0:
-		Room0::entry();
-		break;
-
-	case 2:
-		Room2::entry();
-		break;
-
-	case 3:
-		Room3::init_sonde();
-		break;
-
-	case 5:
-		if (_G(spieler).R5Terminal)
-			det->start_detail(6, 255, 0);
-		break;
-
-	case 6: r6_entry(); break;
-
-	case 7:
-		_G(spieler).ScrollxStep = 2;
-		break;
-
-	case 8: r8_entry(); break;
-	case 9: r9_entry(); break;
-	case 10: r10_entry(); break;
-	case 11: r11_entry(); break;
-	case 12: r12_entry(); break;
-	case 13: r13_entry(); break;
-	case 14: r14_entry(); break;
-	case 16: r16_entry();break;
+	ENTRY(0);
+	ENTRY(2);
+	case 3: Room3::init_sonde(); break;
+	ENTRY(5);
+	ENTRY(6);
+	ENTRY(7);
+	ENTRY(8);
+	ENTRY(9);
+	ENTRY(10);
+	ENTRY(11);
+	ENTRY(12);
+	ENTRY(13);
+	ENTRY(14);
+	ENTRY(16);
 
 	case 17:
-		r17_entry();
+		Room17::entry();
 		if (_G(spieler).SoundSwitch) {
 			if (!_G(spieler).R17EnergieOut)
 				det->play_sound(15, 0);
 		}
 		break;
 
-	case 18: r18_entry(); break;
-	case 19: r19_entry(); break;
-	case 21: r21_entry(); break;
-	case 22: r22_entry(); break;
+	ENTRY(18);
+	ENTRY(19);
+	ENTRY(21);
+	ENTRY(22);
 
 	case 23:
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -681,7 +665,7 @@ void enter_room(int16 eib_nr) {
 		break;
 
 	case 24:
-		r24_entry();
+		Room24::entry();
 		if (_G(spieler).SoundSwitch)
 			det->play_sound(17, 0);
 		break;
@@ -765,6 +749,7 @@ void enter_room(int16 eib_nr) {
 	default:
 		break;
 	}
+#undef ENTRY
 
 	flags.LoadGame = false;
 }
@@ -831,7 +816,7 @@ void exit_room(int16 eib_nr) {
 		_G(maus_links_click) = false;
 		break;
 
-	case 24: r24_exit(); break;
+	case 24: Room24::xit(); break;
 	case 27: r27_exit(eib_nr); break;
 	case 28: r28_exit(eib_nr); break;
 	case 29: r29_exit(); break;
@@ -1872,7 +1857,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_KNOPF_R5:
-		r5_knopf();
+		Room5::knopf();
 		break;
 
 	case SIB_SEIL:
@@ -1884,7 +1869,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
-		r6_bola_knopf();
+		Room6::bola_knopf();
 		break;
 
 	case SIB_TKNOPF1_R7:
@@ -1905,7 +1890,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_KLINGEL_R7:
-		r7_klingel();
+		Room7::klingel();
 		break;
 
 	case SIB_GIPS_R7:
@@ -1943,7 +1928,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_FOLTER_R8:
-		r8_stop_folter();
+		Room8::stop_folter();
 		break;
 
 	case SIB_TUER_R8:
@@ -1957,7 +1942,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SCHLITZ_R11:
-		r11_get_card();
+		Room11::get_card();
 		break;
 
 	case SIB_BANDKNOPF_R13:
@@ -1977,7 +1962,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_CARTRIDGE_R23:
-		r23_get_cartridge();
+		Room23::get_cartridge();
 		break;
 
 	case SIB_FLUXO_R23:
@@ -2005,21 +1990,21 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_SCHALTER1_R21:
 		det->start_detail(0, 1, _G(spieler).R21Hebel1);
 		_G(spieler).R21Hebel1 ^= 1;
-		r21_calc_laser();
+		Room21::calc_laser();
 		atds->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATEI);
 		break;
 
 	case SIB_SCHALTER2_R21:
 		det->start_detail(1, 1, _G(spieler).R21Hebel2);
 		_G(spieler).R21Hebel2 ^= 1;
-		r21_calc_laser();
+		Room21::calc_laser();
 		atds->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATEI);
 		break;
 
 	case SIB_SCHALTER3_R21:
 		det->start_detail(2, 1, _G(spieler).R21Hebel3);
 		_G(spieler).R21Hebel3 ^= 1;
-		r21_calc_laser();
+		Room21::calc_laser();
 		atds->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATEI);
 		break;
 
@@ -2028,7 +2013,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_GITTER1_R21:
-		r21_use_gitter_energie();
+		Room21::use_gitter_energie();
 		break;
 
 	case SIB_CART1_R18:
@@ -2203,11 +2188,11 @@ void sib_event_inv(int16 sib_nr) {
 		start_spz(5, 255, 0, 0);
 		start_aad_wait(115, 0);
 		if (_G(spieler).R12TransOn)
-			r12_use_linke_rohr();
+			Room12::use_linke_rohr();
 		break;
 
 	case SIB_LHAKEN_R7:
-		r14_feuer();
+		Room14::feuer();
 		break;
 
 	case SIB_RHAKEN_R7:
@@ -2222,7 +2207,7 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SURIMY_R10:
-		r23_use_cartridge();
+		Room23::use_cartridge();
 		break;
 
 	case SIB_PAINT_R22:
@@ -2245,26 +2230,26 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 
 	case SIB_TKNOPF2_R11:
-		r11_put_card();
+		Room11::put_card();
 		break;
 
 	case SIB_TKNOPF3_R11:
 		disable_timer();
-		r22_malen();
+		Room22::malen();
 		enable_timer();
 		break;
 
 	case SIB_CARTRIDGE_R23:
-		r10_get_surimy();
+		Room10::get_surimy();
 		break;
 
 	case SIB_FLUXO_R23:
-		r8_open_gdoor();
+		Room8::open_gdoor();
 		break;
 
 	case SIB_FEUER_R14:
 	case SIB_TALISMAN_R12:
-		r7_haken(sib_nr);
+		Room7::haken(sib_nr);
 		break;
 
 	case SIB_ROEHRE_R12:
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index ba37b0d3d27..3296f6e6940 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -26,9 +26,6 @@
 
 namespace Chewy {
 
-#define ANI_HIDE 0
-#define ANI_SHOW 1
-
 #define MAX_ABLAGE 4
 
 #define ABLAGE_BLOCK_SIZE 64000l
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 797bc4cbce1..3681adc4f23 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/room.h"
+#include "chewy/rooms/roomdefs.h"
 #include "chewy/rooms/room0.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
new file mode 100644
index 00000000000..99c6358544d
--- /dev/null
+++ b/engines/chewy/rooms/room10.cpp
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room6.h"
+#include "chewy/rooms/room10.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room10::entry() {
+	if (!_G(spieler).R10Surimy) {
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		out->setze_zeiger(0);
+		fx->blende1(workptr, screen0, pal, 150, 0, 0);
+		_G(spieler).R10Surimy = true;
+		flic_cut(FCUT_004, CFO_MODE);
+		start_aad(101, 0);
+		fx_blend = BLEND_NONE;
+		set_person_pos(1, 130, P_CHEWY, P_RIGHT);
+		auto_move(2, P_CHEWY);
+	} else if (_G(spieler).R10SurimyOk)
+		room->set_timer_status(3, TIMER_STOP);
+}
+
+void Room10::get_surimy() {
+	auto_move(4, P_CHEWY);
+	start_aad(104, 0);
+	flc->set_custom_user_function(Room6::cut_serv2);
+	flic_cut(FCUT_006, CFO_MODE);
+	flc->remove_custom_user_function();
+	_G(spieler).R10SurimyOk = true;
+	room->set_timer_status(3, TIMER_STOP);
+	atds->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
+	invent_2_slot(18);
+
+	del_inventar(_G(spieler).AkInvent);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room10.h b/engines/chewy/rooms/room10.h
new file mode 100644
index 00000000000..f93c83f8868
--- /dev/null
+++ b/engines/chewy/rooms/room10.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM10_H
+#define CHEWY_ROOMS_ROOM10_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room10 {
+public:
+	static void entry();
+	static void get_surimy();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
new file mode 100644
index 00000000000..80e46f97b79
--- /dev/null
+++ b/engines/chewy/rooms/room11.cpp
@@ -0,0 +1,168 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room11.h"
+#include "chewy/rooms/room12.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room11::entry() {
+	_G(zoom_horizont) = 80;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 2;
+
+	if (_G(spieler).R12ChewyBork) {
+		if (!_G(spieler).R11DoorRightB) {
+			obj->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
+			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
+				AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
+			obj->calc_all_static_detail();
+		}
+
+		obj->hide_sib(SIB_TKNOPF1_R11);
+		obj->hide_sib(SIB_SCHLITZ_R11);
+		obj->hide_sib(SIB_TKNOPF2_R11);
+		obj->hide_sib(SIB_TKNOPF3_R11);
+		_G(spieler).room_e_obj[20].Attribut = 255;
+		_G(spieler).room_e_obj[21].Attribut = 255;
+		atds->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+		if (!flags.LoadGame) {
+			start_ani_block(2, ablock17);
+			auto_move(8, P_CHEWY);
+			start_aad_wait(31, -1);
+			det->stop_detail(9);
+		}
+		det->show_static_spr(8);
+		if (!flags.LoadGame)
+			auto_move(6, P_CHEWY);
+		_G(timer_nr)[0] = room->set_timer(255, 10);
+	}
+}
+
+void Room11::bork_zwinkert() {
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		det->hide_static_spr(8);
+		start_ani_block(2, ablock18);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		det->show_static_spr(8);
+		flags.AutoAniPlay = false;
+	}
+}
+
+void Room11::talk_debug() {
+	if (_G(spieler).R12ChewyBork) {
+		flags.AutoAniPlay = true;
+		auto_move(8, P_CHEWY);
+		start_ads_wait(5);
+		flags.AutoAniPlay = false;
+
+	}
+}
+
+void Room11::chewy_bo_use() {
+	if (_G(spieler).R12ChewyBork) {
+		flags.AutoAniPlay = true;
+		stop_person(P_CHEWY);
+		det->hide_static_spr(8);
+		start_ani_block(2, ablock17);
+		start_aad_wait(32, -1);
+		det->stop_detail(9);
+		det->show_static_spr(8);
+		auto_move(6, P_CHEWY);
+		flags.AutoAniPlay = false;
+	}
+}
+
+int16 Room11::scanner() {
+	int16 action_flag = false;
+	if (!_G(spieler).R12ChewyBork) {
+		auto_move(7, P_CHEWY);
+		if (!_G(spieler).R11CardOk) {
+			action_flag = true;
+			start_aad_wait(13, -1);
+		} else {
+			if (is_cur_inventar(BORK_INV)) {
+				action_flag = true;
+				flc->set_custom_user_function(Room12::cut_serv);
+				start_aad(105, 0);
+				flic_cut(FCUT_011, CFO_MODE);
+				flc->remove_custom_user_function();
+				_G(spieler).R11TerminalOk = true;
+				cur_2_inventory();
+				menu_item = CUR_TALK;
+				cursor_wahl(menu_item);
+				start_aad_wait(12, -1);
+				load_ads_dia(3);
+			} else if (!_G(spieler).inv_cur) {
+				if (!_G(spieler).R11TerminalOk) {
+					action_flag = true;
+					flic_cut(FCUT_010, CFO_MODE);
+					start_aad_wait(20, -1);
+				} else if (_G(spieler).R11TerminalOk) {
+					action_flag = true;
+					start_aad_wait(12, -1);
+					menu_item = CUR_TALK;
+					cursor_wahl(menu_item);
+					load_ads_dia(3);
+				}
+			}
+		}
+	}
+
+	return action_flag;
+}
+
+void Room11::get_card() {
+	if (_G(spieler).R11CardOk) {
+		_G(spieler).R11CardOk = false;
+		obj->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
+
+		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
+		cursor_wahl(CUR_AK_INVENT);
+		cursor_wahl(CUR_AK_INVENT);
+		det->stop_detail(0);
+		atds->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
+		atds->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
+	}
+}
+
+void Room11::put_card() {
+	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
+		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
+		del_inventar(_G(spieler).R11IdCardNr);
+		det->start_detail(0, 255, ANI_VOR);
+		atds->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
+		atds->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(spieler).R11CardOk = true;
+		if (!_G(spieler).R11TerminalOk)
+			start_aad_wait(16, -1);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
new file mode 100644
index 00000000000..83185707eba
--- /dev/null
+++ b/engines/chewy/rooms/room11.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM11_H
+#define CHEWY_ROOMS_ROOM11_H
+
+#include "chewy/ngsdefs.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room11 {
+public:
+	static void entry();
+	static void get_card();
+	static void put_card();
+	static int16 scanner();
+	static void bork_zwinkert();
+	static void chewy_bo_use();
+	static void talk_debug();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
new file mode 100644
index 00000000000..4cc92559c1e
--- /dev/null
+++ b/engines/chewy/rooms/room12.cpp
@@ -0,0 +1,274 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room12.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define R12_BORK_OBJ 0
+
+int16 r12_bork_phasen[4][2] = {
+	{ 74, 79 },
+	{ 80, 85 },
+	{ 62, 67 },
+	{ 68, 73 }
+};
+
+MovLine r12_bork_mpkt[5] = {
+	{ { 207, 220, 199 }, 2, 6 },
+	{ { 207, 145, 199 }, 2, 6 },
+	{ {  30, 145, 199 }, 0, 6 },
+	{ { 207, 145, 199 }, 1, 6 },
+	{ { 207, 220, 199 }, 3, 6 }
+};
+
+MovLine r12_bork_mpkt1[2] = {
+	{ { 207, 220, 199 }, 0, 6 },
+	{ { 170, 145, 199 }, 0, 6 }
+};
+
+MovLine r12_bork_mpkt2[3] = {
+	{ { 170, 145, 199 }, 1, 8 },
+	{ { 180, 145, 120 }, 1, 8 },
+	{ { 300,  80, 120 }, 1, 8 }
+};
+
+void Room12::entry() {
+	int16 i;
+	_G(zoom_horizont) = 150;
+	_G(timer_nr)[1] = room->set_timer(255, 20);
+	if (!_G(spieler).R12Betreten) {
+		_G(spieler).R12Betreten = true;
+		for (i = 7; i < 10; i++)
+			det->show_static_spr(i);
+		flags.NoScroll = true;
+		auto_scroll(60, 0);
+		flic_cut(FCUT_016, CFO_MODE);
+		flags.NoScroll = false;
+		for (i = 7; i < 10; i++)
+			det->hide_static_spr(i);
+		obj->show_sib(SIB_TALISMAN_R12);
+		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
+		obj->calc_all_static_detail();
+		auto_move(5, P_CHEWY);
+		start_aad_wait(109, -1);
+	} else {
+		if (_G(spieler).R12Talisman == true && !_G(spieler).R12BorkInRohr)
+			_G(timer_nr)[0] = room->set_timer(255, 20);
+		else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
+			det->show_static_spr(12);
+
+	}
+}
+
+void Room12::init_bork() {
+	if (!auto_obj_status(R12_BORK_OBJ) &&
+		!_G(spieler).R12BorkTalk) {
+
+		if (!_G(auto_obj))
+			det->load_taf_seq(62, (85 - 62) + 1, 0);
+		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
+			_G(auto_obj) = 1;
+			mov_phasen[R12_BORK_OBJ].AtsText = 120;
+			mov_phasen[R12_BORK_OBJ].Lines = 5;
+			mov_phasen[R12_BORK_OBJ].Repeat = 1;
+			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->room_info->ZoomFak + 20;
+			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
+			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+			auto_mov_obj[R12_BORK_OBJ].Mode = 1;
+			init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
+				*)r12_bork_mpkt);
+			if (!_G(spieler).R12TalismanOk) {
+				hide_cur();
+				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
+				auto_move(5, P_CHEWY);
+				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
+				if (_G(spieler).R12BorkCount < 3) {
+					++_G(spieler).R12BorkCount;
+					uhr->reset_timer(_G(timer_nr)[0], 0);
+					wait_show_screen(10);
+					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+					start_aad_wait(14, -1);
+				}
+				wait_auto_obj(R12_BORK_OBJ);
+				show_cur();
+			} else {
+				bork_ok();
+			}
+		}
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+	}
+}
+
+void Room12::talk_bork() {
+	if (!_G(spieler).R12TalismanOk) {
+
+		start_aad_wait(28, -1);
+
+	}
+}
+
+void Room12::bork_ok() {
+	hide_cur();
+	flags.MausLinks = true;
+	auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
+	auto_move(5, P_CHEWY);
+	auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
+	_G(spieler).R12BorkTalk = true;
+	mov_phasen[R12_BORK_OBJ].Repeat = 1;
+	mov_phasen[R12_BORK_OBJ].Lines = 2;
+	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
+		*)r12_bork_mpkt1);
+	wait_auto_obj(R12_BORK_OBJ);
+	_G(spieler).R12BorkInRohr = true;
+	det->set_detail_pos(3, 170, 145);
+	det->start_detail(3, 255, ANI_VOR);
+	start_aad_wait(57, -1);
+	det->stop_detail(3);
+	mov_phasen[R12_BORK_OBJ].Repeat = 1;
+	mov_phasen[R12_BORK_OBJ].Lines = 3;
+	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
+		*)r12_bork_mpkt2);
+	wait_auto_obj(R12_BORK_OBJ);
+	det->hide_static_spr(10);
+	start_detail_wait(4, 1, ANI_VOR);
+	talk_hide_static = -1;
+	det->show_static_spr(12);
+	atds->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
+	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+	flags.MausLinks = false;
+	show_cur();
+}
+
+int16 Room12::use_terminal() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		if (!_G(spieler).R12ChewyBork) {
+			auto_move(6, P_CHEWY);
+			start_aad_wait(110, -1);
+			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
+				start_aad_wait(112, -1);
+				flags.NoScroll = true;
+				auto_scroll(46, 0);
+				flic_cut(FCUT_017, CFO_MODE);
+
+				load_chewy_taf(CHEWY_BORK);
+				flags.NoScroll = false;
+				atds->set_ats_str(118, 0, ATS_DATEI);
+				det->hide_static_spr(12);
+				menu_item = CUR_WALK;
+				cursor_wahl(menu_item);
+				set_person_pos(108, 90, P_CHEWY, -1);
+				_G(spieler).R12ChewyBork = true;
+				_G(spieler).R12RaumOk = true;
+				auto_move(4, P_CHEWY);
+				start_aad_wait(113, 0);
+			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
+				_G(spieler).R12TalismanOk = false;
+				_G(spieler).R12KetteLinks = true;
+				uhr->disable_timer();
+				obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
+				obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+				obj->calc_all_static_detail();
+				atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
+				atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
+				start_aad(111, 0);
+			} else {
+				_G(spieler).R12TransOn = true;
+				uhr->reset_timer(_G(timer_nr)[1], 0);
+			}
+		} else
+			start_aad(114, 0);
+	}
+
+	return action_flag;
+}
+
+int16 Room12::use_linke_rohr() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		if (!_G(spieler).R12KetteLinks) {
+			auto_move(7, P_CHEWY);
+			start_aad_wait(29, -1);
+		} else {
+			_G(spieler).R12KetteLinks = false;
+			uhr->enable_timer();
+			atds->set_ats_str(117, TXT_MARK_LOOK, 0, ATS_DATEI);
+		}
+	}
+	return action_flag;
+}
+
+int16 Room12::chewy_trans() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R12TransOn) {
+			action_flag = true;
+			flags.AutoAniPlay = true;
+			auto_move(9, P_CHEWY);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_ani_block(2, ablock16);
+			set_person_pos(108, 82, P_CHEWY, P_RIGHT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler).R12TransOn = false;
+			flags.AutoAniPlay = false;
+		}
+	}
+	return action_flag;
+}
+
+int16 Room12::proc1() {
+	bool result = false;
+
+	if (!_G(spieler).inv_cur) {
+		result = true;
+
+		if (_G(spieler).R12KetteLinks) {
+			_G(spieler).R12KetteLinks = false;
+			uhr->enable_timer();
+			atds->set_ats_str(117, 1, 0);
+		} else {
+			auto_move(7, 0);
+			start_aad_wait(29, -1);
+		}
+	}
+
+	return result;
+}
+
+int16 Room12::cut_serv(int16 frame) {
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	if (frame == 43)
+		start_aad(106, 0);
+
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room12.h b/engines/chewy/rooms/room12.h
new file mode 100644
index 00000000000..72b273b8058
--- /dev/null
+++ b/engines/chewy/rooms/room12.h
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM12_H
+#define CHEWY_ROOMS_ROOM12_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room12 {
+private:
+	static void bork_ok();
+
+public:
+	static void entry();
+	static int16 cut_serv(int16 frame);
+	static int16 use_linke_rohr();
+	static int16 chewy_trans();
+	static int16 proc1();
+	static int16 use_terminal();
+	static void init_bork();
+	static void talk_bork();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
new file mode 100644
index 00000000000..5d8854d8234
--- /dev/null
+++ b/engines/chewy/rooms/room13.cpp
@@ -0,0 +1,213 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room13.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define R13_BORK_OBJ 0
+
+int16 r13_bork_phasen[4][2] = {
+	{ 92, 97 },
+	{ 86, 91 },
+	{ 86, 91 },
+	{ 68, 73 }
+};
+
+MovLine r13_bork_mpkt[3] = {
+	{ { 168, 140, 162 }, 0, 6 },
+	{ {  50, 140, 162 }, 0, 6 },
+	{ {  50, 107, 130 }, 2, 6 }
+};
+
+void Room13::entry() {
+	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
+		out->cls();
+		flic_cut(FCUT_013, CFO_MODE);
+		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
+		switch_room(11);
+		start_aad_wait(27, -1);
+	} else {
+		if (_G(spieler).R13MonitorStatus)
+			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+
+		if (!_G(spieler).R13BorkOk) {
+			det->show_static_spr(12);
+			obj->hide_sib(SIB_BANDKNOPF_R13);
+			_G(spieler).R13Bandlauf = 1;
+
+			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+
+			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+
+			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		}
+		if (spieler_vector[P_CHEWY].Xypos[0] > 290) {
+			_G(spieler).R13Band = true;
+			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(spieler).room_e_obj[25].Attribut = 255;
+		}
+		if (_G(spieler).R21GitterMuell)
+			det->hide_static_spr(6);
+	}
+}
+
+void Room13::talk_bork() {
+	if (!_G(spieler).R13BorkOk) {
+		_G(spieler).R13BorkOk = true;
+		_G(spieler).R12ChewyBork = false;
+		det->show_static_spr(13);
+		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		det->
+			set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true)
+			;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_aad_wait(33, -1);
+		det->stop_detail(9);
+		det->load_taf_seq(86, (97 - 86) + 1, 0);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		det->hide_static_spr(12);
+		_G(auto_obj) = 1;
+		mov_phasen[R13_BORK_OBJ].AtsText = 122;
+		mov_phasen[R13_BORK_OBJ].Lines = 3;
+		mov_phasen[R13_BORK_OBJ].Repeat = 1;
+		mov_phasen[R13_BORK_OBJ].ZoomFak = 0;
+		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
+		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+		auto_mov_obj[R13_BORK_OBJ].Mode = 1;
+		init_auto_obj(R13_BORK_OBJ, &r13_bork_phasen[0][0], mov_phasen[R13_BORK_OBJ].Lines, (MovLine *)r13_bork_mpkt);
+		auto_move(9, P_CHEWY);
+		wait_auto_obj(R13_BORK_OBJ);
+		auto_move(11, P_CHEWY);
+		flags.NoScroll = true;
+		auto_scroll(41, 0);
+		start_aad_wait(248, -1);
+		flic_cut(FCUT_014, CFO_MODE);
+		load_chewy_taf(CHEWY_NORMAL);
+		_G(auto_obj) = 0;
+		flags.NoScroll = false;
+		atds->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
+		obj->show_sib(SIB_BANDKNOPF_R13);
+		set_person_pos(153, 138, P_CHEWY, P_LEFT);
+
+		start_aad_wait(34, -1);
+		start_aad_wait(249, -1);
+
+		obj->show_sib(SIB_TKNOPF1_R11);
+		obj->show_sib(SIB_SCHLITZ_R11);
+		obj->show_sib(SIB_TKNOPF2_R11);
+		obj->show_sib(SIB_TKNOPF3_R11);
+		if (_G(spieler).R6DoorRightB)
+			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
+		_G(spieler).room_e_obj[21].Attribut = AUSGANG_OBEN;
+	}
+}
+
+void Room13::jmp_band() {
+	if (!_G(spieler).R13Band && !_G(spieler).R12ChewyBork) {
+		if (!_G(spieler).R13Bandlauf) {
+			obj->hide_sib(SIB_BANDKNOPF_R13);
+			_G(spieler).room_e_obj[25].Attribut = 255;
+			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(spieler).R13Band = true;
+			auto_move(3, P_CHEWY);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(8, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
+		} else {
+			_G(spieler).R13Surf = true;
+			_G(maus_links_click) = false;
+			auto_move(12, P_CHEWY);
+			start_aad_wait(117, -1);
+			flags.NoScroll = true;
+			auto_scroll(76, 0);
+			flic_cut(FCUT_015, CFO_MODE);
+			flags.NoScroll = false;
+			set_person_pos(195, 226, P_CHEWY, P_LEFT);
+
+			_G(spieler).R13Bandlauf = 0;
+
+			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+
+			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+
+			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			obj->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
+			obj->hide_sib(SIB_BANDKNOPF_R13);
+			switch_room(14);
+			flic_cut(FCUT_018, CFO_MODE);
+			_G(spieler).scrollx = 92;
+			_G(spieler).scrolly = 120;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			wait_show_screen(40);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+		}
+	} else
+		start_aad_wait(118, -1);
+}
+
+void Room13::jmp_boden() {
+	if (_G(spieler).R13Band) {
+		if (!_G(spieler).R13Surf)
+			obj->show_sib(SIB_BANDKNOPF_R13);
+		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
+		atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).R13Band = false;
+		auto_move(5, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(7, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		set_person_pos(176, 138, P_CHEWY, P_LEFT);
+	}
+}
+
+int16 Room13::monitor_knopf() {
+	int16 action_flag = false;
+	if (!_G(spieler).R13Band &&
+		!_G(spieler).R12ChewyBork &&
+		!_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(8, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(6, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		if (_G(spieler).R13MonitorStatus)
+			det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
+		++_G(spieler).R13MonitorStatus;
+		if (_G(spieler).R13MonitorStatus > 4)
+			_G(spieler).R13MonitorStatus = 0;
+		else
+			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+		atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room13.h b/engines/chewy/rooms/room13.h
new file mode 100644
index 00000000000..5d4b8898066
--- /dev/null
+++ b/engines/chewy/rooms/room13.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM13_H
+#define CHEWY_ROOMS_ROOM13_H
+
+#include "chewy/ngsdefs.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room13 {
+public:
+	static void entry();
+	static void talk_bork();
+	static int16 monitor_knopf();
+	static void jmp_band();
+	static void jmp_boden();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
new file mode 100644
index 00000000000..56af44c8371
--- /dev/null
+++ b/engines/chewy/rooms/room14.cpp
@@ -0,0 +1,175 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/roomdefs.h"
+#include "chewy/rooms/room14.h"
+#include "chewy/rooms/room23.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room14::entry() {
+	_G(spieler).R23GleiterExit = 14;
+	_G(zoom_horizont) = 310;
+	if (!flags.LoadGame) {
+		if (_G(spieler).R14GleiterAuf) {
+			set_person_pos(381, 264, P_CHEWY, P_LEFT);
+			det->show_static_spr(6);
+			_G(spieler).scrollx = 160;
+			_G(spieler).scrolly = 120;
+		} else {
+			_G(spieler).scrollx = 92;
+			_G(spieler).scrolly = 17;
+		}
+	}
+}
+
+void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
+	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
+		flags.AutoAniPlay = true;
+		det->hide_static_spr(9);
+		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, 0);
+		uhr->reset_timer(t_nr, 0);
+		det->show_static_spr(9);
+		det->start_detail(7, 1, ANI_VOR);
+		flags.AutoAniPlay = false;
+	}
+}
+
+int16 Room14::use_schrott() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		auto_move(3, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(12, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+
+		if (!_G(spieler).R14Waffe) {
+			action_flag = true;
+			_G(spieler).R14Waffe = true;
+			start_aad_wait(21, -1);
+			invent_2_slot(BWAFFE_INV);
+		}
+	}
+	return action_flag;
+}
+
+int16 Room14::use_gleiter() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(4, P_CHEWY);
+		if (!_G(spieler).R14GleiterAuf) {
+			_G(spieler).R14GleiterAuf = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(10, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			det->show_static_spr(6);
+			atds->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
+		} else {
+			_G(spieler).R23GleiterExit = 14;
+			Room23::cockpit();
+		}
+	}
+	return action_flag;
+}
+
+void Room14::talk_eremit() {
+	if (!_G(spieler).R14Feuer) {
+		auto_move(6, P_CHEWY);
+		if (_G(spieler).R14Translator) {
+			flags.AutoAniPlay = true;
+			load_ads_dia(0);
+		} else {
+			flags.AutoAniPlay = true;
+			start_aad_wait(24, -1);
+			flags.AutoAniPlay = false;
+		}
+	}
+}
+
+int16 Room14::use_schleim() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		auto_move(2, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(11, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		if (!_G(spieler).R14Sicherung) {
+			action_flag = true;
+			_G(spieler).R14Sicherung = true;
+			start_aad_wait(22, -1);
+			invent_2_slot(SICHERUNG_INV);
+
+		}
+	}
+	return action_flag;
+}
+
+void Room14::feuer() {
+	int16 tmp;
+	int16 waffe;
+	waffe = false;
+	tmp = _G(spieler).AkInvent;
+	_G(spieler).R14Feuer = true;
+	flags.AutoAniPlay = true;
+	hide_cur();
+	if (is_cur_inventar(BWAFFE_INV)) {
+		auto_move(5, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_frame(8, 1, ANI_VOR, 11);
+		start_detail_wait(9, 1, ANI_VOR);
+		wait_detail(8);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		waffe = true;
+	} else {
+		auto_move(7, P_CHEWY);
+		det->hide_static_spr(9);
+		start_detail_frame(2, 1, ANI_VOR, 9);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(13, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		wait_detail(2);
+		start_detail_wait(5, 1, ANI_VOR);
+		det->show_static_spr(9);
+	}
+	del_inventar(tmp);
+	det->start_detail(6, 255, ANI_VOR);
+	wait_show_screen(40);
+	if (waffe)
+		auto_move(7, P_CHEWY);
+	start_aad_wait(26, -1);
+	det->hide_static_spr(9);
+	start_detail_wait(3, 1, ANI_VOR);
+	det->show_static_spr(9);
+	invent_2_slot(FLUXO_INV);
+	atds->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(spieler).R14FluxoFlex = true;
+	flags.AutoAniPlay = false;
+	show_cur();
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room14.h b/engines/chewy/rooms/room14.h
new file mode 100644
index 00000000000..fb9bca8962d
--- /dev/null
+++ b/engines/chewy/rooms/room14.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM14_H
+#define CHEWY_ROOMS_ROOM14_H
+
+#include "chewy/ngsdefs.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room14 {
+public:
+	static void entry();
+	static void feuer();
+	static int16 use_schrott();
+	static int16 use_gleiter();
+	static int16 use_schleim();
+	static void eremit_feuer(int16 t_nr, int16 ani_nr);
+	static void talk_eremit();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
new file mode 100644
index 00000000000..bfc8b314645
--- /dev/null
+++ b/engines/chewy/rooms/room16.cpp
@@ -0,0 +1,58 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room16.h"
+#include "chewy/rooms/room23.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room16::entry() {
+	_G(zoom_horizont) = 140;
+	if (!_G(spieler).R16F5Exit) {
+		det->show_static_spr(4);
+		_G(spieler).room_e_obj[32].Attribut = 255;
+		atds->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		det->hide_static_spr(4);
+		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
+		atds->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+}
+
+int16 Room16::use_gleiter() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(6, P_CHEWY);
+		_G(spieler).R23GleiterExit = 16;
+		Room23::cockpit();
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room16.h b/engines/chewy/rooms/room16.h
new file mode 100644
index 00000000000..0da6524bb2a
--- /dev/null
+++ b/engines/chewy/rooms/room16.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM16_H
+#define CHEWY_ROOMS_ROOM16_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room16 {
+public:
+	static void entry();
+	static int16 use_gleiter();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
new file mode 100644
index 00000000000..686524dd226
--- /dev/null
+++ b/engines/chewy/rooms/room17.cpp
@@ -0,0 +1,274 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room17.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define CHEWY_OBJ 0
+
+static int16 chewy_phasen[4][2] = {
+	{ 0, 0 },
+	{ 0, 0 },
+	{ 141, 144 },
+	{ 177, 177 }
+};
+
+static MovLine chewy_mpkt[2] = {
+	{ { 241, 150, 0 }, 3, 8 },
+	{ { 241, 350, 0 }, 3, 8 }
+};
+
+static MovLine chewy_mpkt1[2] = {
+	{ { 243, 334, 0 }, 2, 6 },
+	{ { 243, 150, 0 }, 2, 6 }
+};
+
+void Room17::entry() {
+	plot_seil();
+	if (_G(spieler).R17GitterWeg)
+		det->hide_static_spr(5);
+	if (_G(spieler).R17DoorKommand)
+		det->show_static_spr(7);
+	if (_G(spieler).R17Location == 1) {
+		flags.ZoomMov = true;
+		_G(zoom_mov_fak) = 3;
+		room->set_zoom(25);
+		_G(zoom_horizont) = 0;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 60;
+		set_person_pos(242, 146, P_CHEWY, P_LEFT);
+		xit();
+	} else if (_G(spieler).R17Location == 3) {
+		room->set_zoom(32);
+		_G(zoom_horizont) = 399;
+		xit();
+	} else {
+		room->set_zoom(15);
+		_G(zoom_horizont) = 0;
+		_G(spieler).room_e_obj[36].Attribut = 255;
+		_G(spieler).room_e_obj[38].Attribut = 255;
+		if (_G(spieler).R6DoorLeftF)
+			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
+		else
+			_G(spieler).room_e_obj[39].Attribut = 255;
+		if (_G(spieler).R18DoorBruecke)
+			_G(spieler).room_e_obj[35].Attribut = AUSGANG_LINKS;
+		else
+			_G(spieler).room_e_obj[35].Attribut = 255;
+	}
+}
+
+void Room17::xit() {
+	if (_G(spieler).R17DoorKommand)
+		_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
+	else
+		_G(spieler).room_e_obj[36].Attribut = 255;
+	_G(spieler).room_e_obj[35].Attribut = 255;
+	_G(spieler).room_e_obj[39].Attribut = 255;
+	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
+}
+
+int16 Room17::use_seil() {
+	int16 action_flag = false;
+	if (!flags.AutoAniPlay) {
+		if (_G(spieler).R17Location == 1) {
+			if (is_cur_inventar(SEIL_INV)) {
+				action_flag = true;
+				del_inventar(_G(spieler).AkInvent);
+				flags.AutoAniPlay = true;
+				auto_move(5, P_CHEWY);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				start_detail_wait(10, 1, ANI_VOR);
+				_G(spieler).R17Seil = true;
+				atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
+				plot_seil();
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				flags.AutoAniPlay = false;
+				start_aad(119, -1);
+			}
+		}
+	}
+	return action_flag;
+}
+
+void Room17::plot_seil() {
+	int16 i;
+	if (_G(spieler).R17Seil) {
+		for (i = 0; i < 3; i++)
+			det->show_static_spr(8 + i);
+	}
+}
+
+void Room17::kletter_down() {
+	auto_move(5, P_CHEWY);
+	det->load_taf_seq(177, 1, 0);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(14, 1, ANI_VOR);
+	flags.ZoomMov = false;
+	_G(zoom_mov_fak) = 1;
+	_G(spieler).ScrollyStep = 2;
+	room->set_zoom(32);
+	_G(zoom_horizont) = 399;
+	_G(auto_obj) = 1;
+	init_auto_obj(CHEWY_OBJ, &chewy_phasen[0][0], mov_phasen[CHEWY_OBJ].Lines, (MovLine
+		*)chewy_mpkt);
+	set_person_pos(242, 350, P_CHEWY, P_LEFT);
+}
+
+void Room17::kletter_up() {
+	auto_move(6, P_CHEWY);
+	det->load_taf_seq(141, 4, 0);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(11, 1, ANI_VOR);
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).ScrollyStep = 1;
+	room->set_zoom(25);
+	_G(zoom_horizont) = 0;
+	_G(auto_obj) = 1;
+	init_auto_obj(CHEWY_OBJ, &chewy_phasen[0][0], mov_phasen[CHEWY_OBJ].Lines, (MovLine
+		*)chewy_mpkt1);
+	set_person_pos(243, 146, P_CHEWY, P_LEFT);
+}
+
+void Room17::calc_seil() {
+	if (_G(spieler).R17Seil) {
+		if (_G(spieler).R17Location != 2) {
+			if (!flags.AutoAniPlay) {
+				if (!_G(spieler).inv_cur) {
+					close_door();
+					flags.AutoAniPlay = true;
+					mov_phasen[CHEWY_OBJ].AtsText = 0;
+					mov_phasen[CHEWY_OBJ].Lines = 2;
+					mov_phasen[CHEWY_OBJ].Repeat = 1;
+					mov_phasen[CHEWY_OBJ].ZoomFak = 0;
+					auto_mov_obj[CHEWY_OBJ].Id = AUTO_OBJ0;
+					auto_mov_vector[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
+					auto_mov_obj[CHEWY_OBJ].Mode = 1;
+					if (_G(spieler).R17Location == 1) {
+						kletter_down();
+						_G(spieler).R17Location = 3;
+					} else if (_G(spieler).R17Location == 3) {
+						kletter_up();
+						_G(spieler).R17Location = 1;
+					}
+					menu_item = CUR_WALK;
+					cursor_wahl(menu_item);
+					wait_auto_obj(CHEWY_OBJ);
+					set_person_spr(P_LEFT, P_CHEWY);
+					_G(spieler).ScrollyStep = 1;
+					_G(spieler).PersonHide[P_CHEWY] = false;
+					flags.AutoAniPlay = false;
+					_G(auto_obj) = 0;
+					xit();
+				}
+			}
+		}
+	}
+}
+
+void Room17::door_kommando(int16 mode) {
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		if (!mode) {
+			if (!_G(spieler).R17DoorKommand) {
+				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
+				_G(spieler).R17DoorKommand = true;
+				start_detail_wait(4, 1, ANI_VOR);
+				stop_person(P_CHEWY);
+				det->show_static_spr(7);
+			}
+		} else {
+			close_door();
+		}
+		flags.AutoAniPlay = false;
+		atds->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
+	}
+}
+
+void Room17::close_door() {
+	if (_G(spieler).R17DoorKommand) {
+		_G(spieler).room_e_obj[36].Attribut = 255;
+		_G(spieler).R17DoorKommand = false;
+		det->hide_static_spr(7);
+		det->start_detail(4, 1, ANI_RUECK);
+	}
+}
+
+int16 Room17::energie_hebel() {
+	int16 dia_nr;
+	int16 action_flag = false;
+	auto_move(7, P_CHEWY);
+	if (!_G(spieler).R17HebelOk) {
+		action_flag = true;
+		if (is_cur_inventar(BECHER_VOLL_INV)) {
+			_G(spieler).R17HebelOk = true;
+			dia_nr = 38;
+		} else
+			dia_nr = 37;
+		start_aad_wait(dia_nr, -1);
+	} else if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
+		_G(spieler).R17EnergieOut ^= 1;
+		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
+		det->play_sound(12, 0);
+		if (_G(spieler).R17EnergieOut)
+			det->disable_sound(15, 0);
+		else {
+			det->enable_sound(15, 0);
+			det->play_sound(15, 0);
+		}
+	}
+	return action_flag;
+}
+
+int16 Room17::get_oel() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(4, P_CHEWY);
+		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
+		start_aad_wait(60, -1);
+	} else if (is_cur_inventar(BECHER_LEER_INV)) {
+		action_flag = true;
+		close_door();
+		auto_move(4, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(13, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		del_inventar(_G(spieler).AkInvent);
+		obj->add_inventar(BECHER_VOLL_INV, &room_blk);
+		inventory_2_cur(BECHER_VOLL_INV);
+	}
+
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room17.h b/engines/chewy/rooms/room17.h
new file mode 100644
index 00000000000..27eb84f49b8
--- /dev/null
+++ b/engines/chewy/rooms/room17.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM17_H
+#define CHEWY_ROOMS_ROOM17_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room17 {
+private:
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_seil();
+	static void plot_seil();
+	static void kletter_down();
+	static void kletter_up();
+	static void calc_seil();
+	static void door_kommando(int16 mode);
+	static void close_door();
+	static int16 energie_hebel();
+	static int16 get_oel();
+
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
new file mode 100644
index 00000000000..7314fd02937
--- /dev/null
+++ b/engines/chewy/rooms/room18.cpp
@@ -0,0 +1,327 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/roomdefs.h"
+#include "chewy/rooms/room18.h"
+
+namespace Chewy {
+namespace Rooms {
+
+static int16 bork_spr[5] = { 15, 16, 17, 24, 25 };
+static int16 bork_spr1[4] = { 20, 21, 18, 19 };
+
+static int16 surimy_phasen[4][2] = {
+	{ 245, 252 },
+	{ 0, 0 },
+	{ 0, 0 },
+	{ 0, 0 }
+};
+
+static MovLine surimy_mpkt[2] = {
+	{ { 453, 170, 190 }, 0, 6 },
+	{ { 392, 170, 190 }, 0, 6 }
+};
+
+static MovLine surimy_mpkt1[2] = {
+	{ { 392, 170, 190 }, 0, 6 },
+	{ { 143, 170, 190 }, 0, 6 }
+};
+
+static MovLine surimy_mpkt2[2] = {
+	{ { 143, 170, 190 }, 0, 6 },
+	{ {   0, 170, 190 }, 0, 6 }
+};
+
+static MovLine surimy_mpkt3[2] = {
+	{ { 500, 100, 190 }, 0, 12 },
+	{ { 392, 170, 190 }, 0, 12 }
+};
+
+void Room18::entry() {
+	int16 i;
+	_G(spieler).R18MoniSwitch = 0;
+	_G(spieler).R18CartTerminal = 0;
+	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R18CartTerminal)
+		det->show_static_spr(23);
+	if (!_G(spieler).R18SurimyWurf)
+		init_borks();
+	else {
+		for (i = 0; i < 5; i++)
+			det->hide_static_spr(bork_spr[i]);
+		for (i = 0; i < (4 - _G(spieler).R18Krone); i++)
+			det->show_static_spr(bork_spr1[i]);
+	}
+	if (_G(spieler).R16F5Exit)
+		det->hide_static_spr(19);
+	if (_G(spieler).R17EnergieOut) {
+		det->stop_detail(0);
+		atds->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
+	} else {
+		atds->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
+	}
+	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
+		start_aad_wait(39, -1);
+		_G(spieler).R18FirstEntry = true;
+	}
+}
+
+void Room18::init_borks() {
+	int16 i;
+	for (i = 0; i < 5; i++)
+		det->show_static_spr(bork_spr[i]);
+	for (i = 0; i < 4; i++)
+		det->hide_static_spr(bork_spr1[i]);
+	_G(timer_nr)[0] = room->set_timer(255, 10);
+	_G(timer_nr)[1] = room->set_timer(255, 15);
+	_G(spieler).scrollx = 276;
+	_G(spieler).scrolly = 0;
+	flags.NoScroll = true;
+}
+
+void Room18::timer_action(int16 t_nr) {
+	if (!_G(spieler).R18SurimyWurf) {
+		if (!flags.AutoAniPlay) {
+			flags.AutoAniPlay = true;
+			if (t_nr == _G(timer_nr)[0]) {
+				det->hide_static_spr(16);
+				start_detail_wait(10, 1, ANI_VOR);
+				det->show_static_spr(16);
+				uhr->reset_timer(_G(timer_nr)[0], 10);
+			} else if (t_nr == _G(timer_nr)[1]) {
+				hide_cur();
+				det->hide_static_spr(17);
+				start_detail_wait(9, 1, ANI_VOR);
+				det->show_static_spr(17);
+				if (!_G(spieler).R18SondeMoni) {
+					_G(spieler).R18SondeMoni = true;
+					start_detail_wait(2, 1, ANI_VOR);
+					det->show_static_spr(9);
+					start_detail_wait(4, 1, ANI_VOR);
+					det->show_static_spr(11);
+					wait_show_screen(50);
+					det->hide_static_spr(9);
+					det->hide_static_spr(11);
+				} else {
+					monitor();
+				}
+				show_cur();
+				uhr->reset_timer(_G(timer_nr)[1], 15);
+			}
+			flags.AutoAniPlay = false;
+		}
+	}
+}
+
+void Room18::monitor() {
+	int16 nr;
+	nr = 0;
+	_G(spieler).R18MoniSwitch ^= 1;
+	if (_G(spieler).R18MoniSwitch) {
+		start_ani_block(2, ablock21);
+		if (_G(spieler).R17EnergieOut)
+			nr = 2;
+		else
+			nr = 1;
+	} else {
+		det->stop_detail(23);
+		atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+	}
+	atds->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
+}
+
+int16 Room18::sonden_moni() {
+	int16 i;
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		hide_cur();
+		auto_move(8, P_CHEWY);
+		start_detail_wait(3, 1, ANI_VOR);
+		det->show_static_spr(10);
+		start_ani_block(3, ablock20);
+		for (i = 0; i < 3; i++)
+			det->show_static_spr(i + 12);
+		wait_show_screen(40);
+		for (i = 0; i < 5; i++)
+			det->hide_static_spr(i + 10);
+		show_cur();
+	}
+	return action_flag;
+}
+
+int16 Room18::calc_surimy() {
+	int16 i;
+	int16 action_flag = false;
+	if (is_cur_inventar(SURIMY_INV)) {
+		action_flag = true;
+		hide_cur();
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).R18SurimyWurf = true;
+		det->load_taf_seq(245, 294 - 245 + 1, 0);
+		det->load_taf_seq(116, 170 - 116 + 1, 0);
+		_G(auto_obj) = 1;
+		mov_phasen[SURIMY_OBJ].AtsText = 0;
+		mov_phasen[SURIMY_OBJ].Lines = 2;
+		mov_phasen[SURIMY_OBJ].Repeat = 1;
+		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
+		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
+		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
+		auto_mov_obj[SURIMY_OBJ].Mode = 1;
+		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
+			start_detail_frame(18, 1, ANI_VOR, 8);
+
+			init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+				*)surimy_mpkt3);
+			wait_detail(18);
+		} else {
+			auto_move(1, P_CHEWY);
+			stop_person(P_CHEWY);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_frame(17, 1, ANI_VOR, 12);
+			_G(maus_links_click) = false;
+
+			init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+				*)surimy_mpkt);
+			wait_detail(17);
+		}
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		wait_auto_obj(SURIMY_OBJ);
+
+		det->set_detail_pos(21, 392, 170);
+		det->set_detail_pos(22, 447, 154);
+		start_detail_frame(21, 1, ANI_VOR, 14);
+		det->start_detail(22, 1, ANI_VOR);
+		wait_detail(21);
+		det->set_static_pos(26, 392, 170, false, true);
+		det->show_static_spr(26);
+
+		det->hide_static_spr(24);
+		start_ani_block(2, ablock22);
+		det->show_static_spr(20);
+
+		for (i = 0; i < 3; i++)
+			det->hide_static_spr(i + 15);
+		start_ani_block(2, ablock23);
+		det->show_static_spr(18);
+		det->show_static_spr(19);
+
+		det->hide_static_spr(26);
+		flags.NoScroll = true;
+		mov_phasen[SURIMY_OBJ].Repeat = 1;
+		init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+			*)surimy_mpkt1);
+		auto_scroll(70, 0);
+		wait_auto_obj(SURIMY_OBJ);
+
+		det->set_detail_pos(21, 143, 170);
+		det->set_detail_pos(22, 198, 154);
+		start_detail_frame(21, 1, ANI_VOR, 14);
+		det->start_detail(22, 1, ANI_VOR);
+		wait_detail(21);
+		det->set_static_pos(26, 143, 170, false, true);
+		det->show_static_spr(26);
+
+		det->hide_static_spr(25);
+		start_ani_block(2, ablock24);
+		det->show_static_spr(21);
+
+		det->hide_static_spr(26);
+		mov_phasen[SURIMY_OBJ].Repeat = 1;
+		init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+			*)surimy_mpkt2);
+		auto_scroll(0, 0);
+		wait_auto_obj(SURIMY_OBJ);
+		_G(spieler).ScrollxStep = 6;
+		flags.NoScroll = false;
+		auto_scroll(318, 0);
+		_G(spieler).ScrollxStep = 2;
+		_G(auto_obj) = 0;
+
+		atds->set_ats_str(153, 1, ATS_DATEI);
+
+		atds->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
+		for (i = 0; i < 3; i++)
+			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
+
+		show_cur();
+	}
+	return action_flag;
+}
+
+int16 Room18::calc_schalter() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
+		action_flag = true;
+		auto_move(6, P_CHEWY);
+
+		monitor();
+	}
+	return action_flag;
+}
+
+short Room18::use_cart_moni() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(9, P_CHEWY);
+		set_person_spr(P_LEFT, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		_G(spieler).R18CartTerminal ^= 1;
+		if (!_G(spieler).R18CartTerminal) {
+			atds->set_ats_str(157, TXT_MARK_LOOK, 0, ATS_DATEI);
+
+			atds->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
+			det->hide_static_spr(23);
+			start_detail_wait(20, 1, ANI_RUECK);
+		} else {
+			atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
+			atds->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
+			start_detail_wait(20, 1, ANI_VOR);
+			det->show_static_spr(23);
+			if (_G(spieler).R18CartFach) {
+				_G(spieler).R18CartSave = true;
+				atds->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
+				start_aad_wait(120, -1);
+			}
+		}
+	}
+	return action_flag;
+}
+
+int16 Room18::go_cyberspace() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
+		action_flag = true;
+		auto_move(7, P_CHEWY);
+		cur_2_inventory();
+		switch_room(24);
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room18.h b/engines/chewy/rooms/room18.h
new file mode 100644
index 00000000000..357afe7f754
--- /dev/null
+++ b/engines/chewy/rooms/room18.h
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM18_H
+#define CHEWY_ROOMS_ROOM18_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room18 {
+private:
+	static void init_borks();
+	static void monitor();
+
+public:
+	static void entry();
+	static void timer_action(int16 t_nr);
+	static int16 calc_surimy();
+	static int16 calc_schalter();
+	static short use_cart_moni();
+	static int16 go_cyberspace();
+	static int16 sonden_moni();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room19.cpp b/engines/chewy/rooms/room19.cpp
new file mode 100644
index 00000000000..8241b5b71b8
--- /dev/null
+++ b/engines/chewy/rooms/room19.cpp
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room19.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room19::entry() {
+	_G(zoom_horizont) = 250;
+	flags.NoScroll = true;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 24;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room19.h b/engines/chewy/rooms/room19.h
new file mode 100644
index 00000000000..b207d111a3c
--- /dev/null
+++ b/engines/chewy/rooms/room19.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM19_H
+#define CHEWY_ROOMS_ROOM19_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room19 {
+public:
+	static void entry();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
new file mode 100644
index 00000000000..0987e9c0618
--- /dev/null
+++ b/engines/chewy/rooms/room21.cpp
@@ -0,0 +1,269 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room21.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define SPINNE1_OBJ 0
+#define SPINNE2_OBJ 1
+#define ENERGIE_OBJ 2
+
+static int16 spinne_phasen[4][2] = {
+	{ 58, 65 },
+	{ 50, 57 },
+	{ 42, 49 },
+	{ 66, 89 }
+};
+
+static MovLine spinne_mpkt[3] = {
+	{ { 550, 275, 0 }, 0, 2 },
+	{ { 396, 275, 0 }, 0, 2 },
+	{ { 530, 275, 0 }, 1, 2 }
+};
+
+static MovLine spinne_mpkt1[2] = {
+	{ { 104,  50, 0 }, 3, 3 },
+	{ { 104, 430, 0 }, 3, 3 }
+};
+
+static MovLine energie_mpkt[2] = {
+	{ { 115, 140, 0 }, 2, 1 },
+	{ { 115, 190, 0 }, 2, 1 }
+};
+
+void Room21::entry() {
+	load_chewy_taf(CHEWY_MINI);
+	calc_laser();
+	init_spinne();
+	_G(timer_nr)[2] = room->set_timer(255, 1);
+	flags.NoEndPosMovObj = true;
+	SetUpScreenFunc = r21setup_func;
+}
+
+void Room21::calc_laser() {
+	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
+		_G(spieler).R21Laser1Weg = true;
+		det->stop_detail(3);
+		atds->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		_G(spieler).R21Laser1Weg = false;
+		det->start_detail(3, 255, ANI_VOR);
+		atds->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
+		if (obj->check_inventar(SEIL_INV) == false) {
+			obj->show_sib(SIB_SEIL_R21);
+			atds->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		}
+		_G(spieler).R21Laser2Weg = true;
+		det->stop_detail(4);
+		atds->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		obj->hide_sib(SIB_SEIL_R21);
+		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).R21Laser2Weg = false;
+		det->start_detail(4, 255, ANI_VOR);
+		atds->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+}
+
+void Room21::init_spinne() {
+	det->load_taf_seq(42, (89 - 42) + 1, 0);
+	_G(auto_obj) = 2;
+
+	mov_phasen[SPINNE1_OBJ].AtsText = 130;
+	mov_phasen[SPINNE1_OBJ].Lines = 3;
+	mov_phasen[SPINNE1_OBJ].Repeat = 255;
+	mov_phasen[SPINNE1_OBJ].ZoomFak = 0;
+	auto_mov_obj[SPINNE1_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SPINNE1_OBJ].Mode = 1;
+	init_auto_obj(SPINNE1_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE1_OBJ].Lines, (MovLine *)spinne_mpkt);
+
+	mov_phasen[SPINNE2_OBJ].AtsText = 130;
+	mov_phasen[SPINNE2_OBJ].Lines = 2;
+	mov_phasen[SPINNE2_OBJ].Repeat = 1;
+	mov_phasen[SPINNE2_OBJ].ZoomFak = 0;
+	auto_mov_obj[SPINNE2_OBJ].Id = AUTO_OBJ1;
+	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SPINNE2_OBJ].Mode = 1;
+	init_auto_obj(SPINNE2_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE2_OBJ].Lines, (MovLine *)spinne_mpkt1);
+	_G(timer_nr)[0] = room->set_timer(255, 21);
+	_G(e_streifen) = false;
+}
+
+void Room21::restart_spinne2() {
+	mov_phasen[SPINNE2_OBJ].Repeat = 1;
+	init_auto_obj(SPINNE2_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE2_OBJ].Lines, (MovLine *)spinne_mpkt1);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
+	_G(e_streifen) = false;
+
+}
+
+void Room21::e_streifen() {
+	_G(auto_obj) = 3;
+	mov_phasen[ENERGIE_OBJ].AtsText = 0;
+	mov_phasen[ENERGIE_OBJ].Lines = 2;
+	mov_phasen[ENERGIE_OBJ].Repeat = 1;
+	mov_phasen[ENERGIE_OBJ].ZoomFak = 0;
+	auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
+	auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[ENERGIE_OBJ].Mode = 1;
+	init_auto_obj(ENERGIE_OBJ, &spinne_phasen[0][0], mov_phasen[ENERGIE_OBJ].Lines, (MovLine *)energie_mpkt);
+
+}
+
+void Room21::r21setup_func() {
+	if (auto_mov_vector[SPINNE2_OBJ].Xypos[1] >= 190) {
+		if (!_G(e_streifen)) {
+			_G(e_streifen) = true;
+			e_streifen();
+		}
+	}
+}
+
+void Room21::chewy_kolli() {
+	int16 spr_nr;
+	int16 *Cxy;
+	int16 xoff;
+	int16 yoff;
+	int16 *xy;
+	int16 kolli;
+	int16 i;
+	int16 ani_nr;
+	int16 tmp;
+	kolli = false;
+
+	for (i = 0; i < 3 && !kolli; i++) {
+		spr_nr = mov_phasen[i].Phase[auto_mov_vector[i].Phase][0] +
+			auto_mov_vector[i].PhNr;
+		xy = (int16 *)room_blk.DetImage[spr_nr];
+		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
+		xoff = xy[0];
+		yoff = xy[1];
+		if (i == 2)
+			xoff += 10;
+		xoff += auto_mov_vector[i].Xzoom;
+		yoff += auto_mov_vector[i].Yzoom;
+		if ((!i && spieler_vector[P_CHEWY].Xypos[0] < 516) ||
+			(i == 1 && spieler_vector[P_CHEWY].Xypos[1] > 70) ||
+			(i == 2)) {
+			if (spieler_vector[P_CHEWY].Xypos[0] + 12 >= auto_mov_vector[i].Xypos[0] + Cxy[0] &&
+				spieler_vector[P_CHEWY].Xypos[0] + 12 <= auto_mov_vector[i].Xypos[0] + xoff + Cxy[0] &&
+				spieler_vector[P_CHEWY].Xypos[1] + 12 >= auto_mov_vector[i].Xypos[1] + Cxy[1] &&
+				spieler_vector[P_CHEWY].Xypos[1] + 12 <= auto_mov_vector[i].Xypos[1] + yoff + Cxy[1] &&
+				mov_phasen[i].Start == 1)
+				kolli = true;
+		}
+	}
+	if (kolli) {
+		if (!flags.AutoAniPlay) {
+			tmp = spieler_vector[P_CHEWY].Count;
+			stop_person(P_CHEWY);
+			flags.AutoAniPlay = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			if (spieler_vector[P_CHEWY].Xyvo[0] < 0)
+				ani_nr = 10;
+			else
+				ani_nr = 11;
+			det->
+				set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			start_detail_wait(ani_nr, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			flags.AutoAniPlay = false;
+			spieler_vector[P_CHEWY].Count = tmp;
+			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+			mov->continue_auto_go();
+		}
+	}
+}
+
+void Room21::salto() {
+	int16 i;
+	if (!_G(spieler).inv_cur) {
+		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
+			if (!_G(spieler).R21Salto) {
+				if (!flags.AutoAniPlay) {
+					_G(spieler).R21Salto = true;
+					flags.AutoAniPlay = true;
+					_G(spieler).PersonHide[P_CHEWY] = true;
+					for (i = 0; i < 3; i++)
+						det->
+						set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]
+						);
+					start_ani_block(3, ablock19);
+					_G(spieler).PersonHide[P_CHEWY] = false;
+					start_aad_wait(36, -1);
+					flags.AutoAniPlay = false;
+				}
+			}
+		}
+	}
+}
+
+void Room21::use_gitter_energie() {
+	_G(spieler).R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
+		AUSGANG_UNTEN, AUSGANG_OBEN,
+		(int16)_G(spieler).R21GitterEnergie);
+	_G(auto_obj) = 0;
+	_G(spieler).R17Location = 1;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	switch_room(17);
+	det->hide_static_spr(5);
+	start_detail_wait(9, 1, ANI_VOR);
+	_G(spieler).R17GitterWeg = true;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+}
+
+int16 Room21::use_fenster() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (!flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
+			action_flag = true;
+			flags.AutoAniPlay = true;
+			_G(spieler).R18Gitter = true;
+			auto_move(13, P_CHEWY);
+			set_person_pos(541, 66, P_CHEWY, P_LEFT);
+			switch_room(18);
+			if (!_G(spieler).R18FirstEntry) {
+				start_aad_wait(39, -1);
+				_G(spieler).R18FirstEntry = true;
+			}
+			_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[41].Attribut = 255;
+			flags.AutoAniPlay = false;
+		}
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room21.h b/engines/chewy/rooms/room21.h
new file mode 100644
index 00000000000..651b2dffd0a
--- /dev/null
+++ b/engines/chewy/rooms/room21.h
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM21_H
+#define CHEWY_ROOMS_ROOM21_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room21 {
+private:
+	static void init_spinne();
+	static void e_streifen();
+	static void r21setup_func();
+
+public:
+	static void entry();
+	static void chewy_kolli();
+	static void restart_spinne2();
+	static void calc_laser();
+	static void use_gitter_energie();
+	static int16 use_fenster();
+	static void salto();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
new file mode 100644
index 00000000000..58d62981808
--- /dev/null
+++ b/engines/chewy/rooms/room22.cpp
@@ -0,0 +1,175 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room22.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define BORK_OBJ 0
+
+static int16 bork_phasen[4][2] = {
+	{ 51, 56 },
+	{ 36, 41 },
+	{ 36, 41 },
+	{ 36, 41 }
+};
+
+static MovLine bork_mpkt[2] = {
+	{ {-30, 125, 170} , 1, 6 },
+	{ { 155, 125, 170 }, 1, 6 },
+};
+
+static MovLine bork_mpkt1[2] = {
+	{ { 155, 125, 170}, 2, 6 },
+	{ { -30, 125, 170}, 0, 6 }
+};
+
+static MovLine bork_mpkt2[2] = {
+	{ { -30, 125, 170 }, 1, 6 },
+	{ {  90, 125, 170 }, 1, 6 }
+};
+
+void Room22::entry() {
+	if (!_G(spieler).R22BorkPlatt) {
+		det->load_taf_seq(36, (56 - 36) + 1, 0);
+		room->set_timer(255, 15);
+	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork)
+		det->show_static_spr(4);
+}
+
+int16 Room22::chewy_amboss() {
+	int16 action_flag = false;
+	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
+		action_flag = true;
+		flags.AutoAniPlay = true;
+		auto_move(5, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(1, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		auto_move(2, P_CHEWY);
+		flags.NoPalAfterFlc = false;
+		flic_cut(FCUT_007, CFO_MODE);
+		_G(spieler).R22ChewyPlatt = true;
+		atds->set_ats_str(79, 1, ATS_DATEI);
+		flags.AutoAniPlay = false;
+	}
+	return action_flag;
+}
+
+void Room22::bork(int16 t_nr) {
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		if (!_G(spieler).R22BorkPlatt) {
+			hide_cur();
+			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(10, -1);
+			auto_move(3, P_CHEWY);
+			_G(auto_obj) = 1;
+			mov_phasen[BORK_OBJ].AtsText = 0;
+			mov_phasen[BORK_OBJ].Lines = 2;
+			mov_phasen[BORK_OBJ].Repeat = 1;
+			mov_phasen[BORK_OBJ].ZoomFak = 0;
+			auto_mov_obj[BORK_OBJ].Id = AUTO_OBJ0;
+			auto_mov_vector[BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+			auto_mov_obj[BORK_OBJ].Mode = 1;
+			if (!_G(spieler).R22Paint) {
+				bork_walk1();
+			} else {
+				_G(spieler).R22ChewyPlatt = true;
+				bork_walk2();
+			}
+			show_cur();
+		}
+		uhr->reset_timer(t_nr, 0);
+		flags.AutoAniPlay = false;
+	}
+}
+
+void Room22::bork_walk1() {
+	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
+		*)bork_mpkt);
+	wait_auto_obj(BORK_OBJ);
+
+	start_detail_wait(2, 1, ANI_VOR);
+
+	mov_phasen[BORK_OBJ].Repeat = 1;
+	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
+		*)bork_mpkt1);
+	wait_auto_obj(BORK_OBJ);
+}
+
+void Room22::bork_walk2() {
+	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
+		*)bork_mpkt2);
+	wait_auto_obj(BORK_OBJ);
+
+	flic_cut(FCUT_009, CFO_MODE);
+	det->show_static_spr(4);
+	atds->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(spieler).R22BorkPlatt = true;
+	atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+}
+
+void Room22::get_bork() {
+	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
+		auto_move(4, P_CHEWY);
+		det->hide_static_spr(4);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_ani_block(2, ablock14);
+		set_person_pos(171, 120, P_CHEWY, P_LEFT);
+		start_aad_wait(11, -1);
+		det->stop_detail(3);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		atds->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+		invent_2_slot(BORK_INV);
+
+		_G(spieler).R22GetBork = true;
+		menu_item = CUR_WALK;
+		cursor_wahl(menu_item);
+	}
+}
+
+int16 Room22::malen() {
+	int16 action_flag = false;
+	if (!flags.AutoAniPlay && is_cur_inventar(17)) {
+		action_flag = true;
+		flags.AutoAniPlay = true;
+		auto_move(8, P_CHEWY);
+		flic_cut(FCUT_008, CFO_MODE);
+		atds->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(spieler).R22Paint = true;
+		obj->calc_rsi_flip_flop(SIB_PAINT_R22);
+		obj->hide_sib(SIB_PAINT_R22);
+		del_inventar(_G(spieler).AkInvent);
+		obj->calc_all_static_detail();
+		flags.AutoAniPlay = false;
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room22.h b/engines/chewy/rooms/room22.h
new file mode 100644
index 00000000000..be1cc829067
--- /dev/null
+++ b/engines/chewy/rooms/room22.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM22_H
+#define CHEWY_ROOMS_ROOM22_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room22 {
+private:
+	static void bork_walk1();
+	static void bork_walk2();
+
+public:
+	static void entry();
+	static int16 chewy_amboss();
+	static int16 malen();
+	static void get_bork();
+	static void bork(int16 t_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
new file mode 100644
index 00000000000..9a4afedd546
--- /dev/null
+++ b/engines/chewy/rooms/room23.cpp
@@ -0,0 +1,128 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room23.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room23::cockpit() {
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	_G(maus_links_click) = false;
+	switch_room(23);
+	if (_G(spieler).R23Cartridge)
+		det->show_static_spr(3);
+	else
+		det->hide_static_spr(3);
+}
+
+int16 Room23::start_gleiter() {
+	int16 i;
+	int16 start_ok;
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		start_ok = false;
+		if (!_G(spieler).R23FluxoFlex)
+			start_aad_wait(23, -1);
+		else {
+			start_ok = true;
+			if (_G(spieler).R23GleiterExit == 16) {
+				if (!_G(spieler).R16F5Exit) {
+					start_ok = false;
+					start_aad_wait(35, -1);
+				} else if ((!_G(spieler).R23Cartridge) || (!_G(spieler).R18CartSave)) {
+
+					start_ok = false;
+					start_aad_wait(41, -1);
+				} else if (!_G(spieler).R17EnergieOut) {
+
+					start_ok = false;
+					start_aad_wait(300, -1);
+				}
+			}
+			if (start_ok) {
+				hide_cur();
+				start_ani_block(4, ablock15);
+				wait_show_screen(30);
+				for (i = 0; i < 4; i++)
+					det->stop_detail(i);
+				if (_G(spieler).R23GleiterExit == 14) {
+					out->setze_zeiger(0);
+					out->cls();
+					flic_cut(FCUT_012, CFO_MODE);
+					out->cls();
+					_G(spieler).R23GleiterExit = 16;
+					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
+					switch_room(_G(spieler).R23GleiterExit);
+					start_spz(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
+					while (flags.SpzAni && !SHOULD_QUIT)
+						set_up_screen(DO_SETUP);
+					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
+					_G(spieler).DelaySpeed = 10;
+					start_aad_wait(59, -1);
+					stop_person(P_CHEWY);
+					_G(maus_links_click) = false;
+				} else if (_G(spieler).R23GleiterExit == 16) {
+					out->setze_zeiger(0);
+					out->cls();
+					flic_cut(FCUT_019, CFO_MODE);
+					_G(spieler).R23GleiterExit = 25;
+
+					switch_room(_G(spieler).R23GleiterExit);
+				}
+
+				show_cur();
+			}
+		}
+	}
+	return action_flag;
+}
+
+void Room23::use_cartridge() {
+	del_inventar(_G(spieler).AkInvent);
+	atds->set_ats_str(111, 1, ATS_DATEI);
+	atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(spieler).R23Cartridge = true;
+	if (_G(spieler).R18CartSave) {
+		start_detail_wait(4, 1, ANI_VOR);
+		det->show_static_spr(3);
+	}
+	menu_item_vorwahl = CUR_USE;
+}
+
+void Room23::get_cartridge() {
+	atds->set_ats_str(111, 0, ATS_DATEI);
+	atds->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+	if (_G(spieler).R18CartSave) {
+		_G(spieler).R23Cartridge = false;
+		det->hide_static_spr(3);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room23.h b/engines/chewy/rooms/room23.h
new file mode 100644
index 00000000000..d07d2356d61
--- /dev/null
+++ b/engines/chewy/rooms/room23.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM23_H
+#define CHEWY_ROOMS_ROOM23_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room23 {
+public:
+	static void cockpit();
+	static void get_cartridge();
+	static void use_cartridge();
+	static int16 start_gleiter();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
new file mode 100644
index 00000000000..c0b3b1daf8b
--- /dev/null
+++ b/engines/chewy/rooms/room24.cpp
@@ -0,0 +1,169 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room24.h"
+
+namespace Chewy {
+namespace Rooms {
+
+uint8 kristall_spr[3][3] = { {14, 20, 13},
+	{20, 13, 14},
+	{13, 14, 20},
+};
+
+void Room24::entry() {
+	int16 i;
+	flags.MainInput = false;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	set_person_pos(0, 0, P_CHEWY, -1);
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	curblk.sprite = room_blk.DetImage;
+	curani.ani_anf = 7;
+	curani.ani_end = 10;
+	menu_item = CUR_USER;
+	cursor_wahl(CUR_USER);
+	if (_G(spieler).R16F5Exit)
+		det->show_static_spr(10);
+	else
+		det->hide_static_spr(10);
+	calc_hebel_spr();
+	calc_animation(255);
+	for (i = 0; i < 3; i++) {
+		if (kristall_spr[i][_G(spieler).R24Hebel[i]] == 20)
+			det->start_detail(5 + i * 4, 255, ANI_RUECK);
+	}
+}
+
+void Room24::xit() {
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	menu_item = CUR_WALK;
+	cursor_wahl(menu_item);
+	set_person_pos(263, 144, P_CHEWY, -1);
+	_G(spieler).scrollx = 88;
+	_G(maus_links_click) = false;
+	flags.MainInput = true;
+}
+
+void Room24::use_hebel(int16 txt_nr) {
+	if (!_G(spieler).R24Hebel[txt_nr - 161] ||
+		_G(spieler).R24Hebel[txt_nr - 161] == 2) {
+		_G(spieler).R24Hebel[txt_nr - 161] = 1;
+		_G(spieler).R24HebelDir[txt_nr - 161] ^= 1;
+	} else {
+		if (_G(spieler).R24HebelDir[txt_nr - 161])
+			_G(spieler).R24Hebel[txt_nr - 161] = 0;
+		else
+			_G(spieler).R24Hebel[txt_nr - 161] = 2;
+	}
+	calc_hebel_spr();
+	calc_animation(txt_nr - 161);
+
+	if (_G(spieler).R24Hebel[0] == 1 &&
+		_G(spieler).R24Hebel[1] == 0 &&
+		_G(spieler).R24Hebel[2] == 2) {
+		_G(spieler).R16F5Exit = true;
+		det->enable_sound(1, 0);
+		det->disable_sound(1, 1);
+		det->start_detail(1, 1, ANI_VOR);
+		det->show_static_spr(10);
+		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
+	} else if (_G(spieler).R16F5Exit) {
+		det->hide_static_spr(10);
+		det->enable_sound(1, 1);
+		det->disable_sound(1, 0);
+		det->start_detail(1, 1, ANI_RUECK);
+		_G(spieler).R16F5Exit = false;
+		atds->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
+	}
+}
+
+void Room24::calc_hebel_spr() {
+	int16 i;
+	int16 j;
+	if (!_G(spieler).R24FirstEntry) {
+		_G(spieler).R24FirstEntry = true;
+		_G(spieler).R24Hebel[0] = 2;
+		_G(spieler).R24HebelDir[0] = 0;
+		_G(spieler).R24Hebel[1] = 1;
+		_G(spieler).R24HebelDir[1] = 0;
+		_G(spieler).R24Hebel[2] = 0;
+		_G(spieler).R24HebelDir[2] = 1;
+	}
+	for (i = 0; i < 3; i++) {
+		for (j = 0; j < 3; j++)
+			det->hide_static_spr(1 + j + i * 3);
+		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
+		atds->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
+	}
+}
+
+void Room24::calc_animation(int16 kristall_nr) {
+	int16 i;
+	int16 ani_nr;
+	if (kristall_nr != 255) {
+		hide_cur();
+
+		if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
+			if (_G(spieler).R24KristallLast[kristall_nr] == 13) {
+				ani_nr = 7;
+			} else {
+				ani_nr = 8;
+			}
+			det->enable_sound(ani_nr + kristall_nr * 4, 0);
+			det->disable_sound(5 + ani_nr + kristall_nr * 4, 0);
+			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
+			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
+			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
+			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
+		}
+
+		else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
+
+			if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
+				ani_nr = 7;
+			} else {
+				ani_nr = 8;
+			}
+			det->disable_sound(ani_nr + kristall_nr * 4, 0);
+			det->enable_sound(5 + ani_nr + kristall_nr * 4, 0);
+			det->stop_detail(5 + kristall_nr * 4);
+			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
+			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
+		}
+		show_cur();
+	}
+
+	for (i = 0; i < 6; i++)
+		det->hide_static_spr(13 + i);
+	for (i = 0; i < 3; i++) {
+		det->show_static_spr(kristall_spr[i][_G(spieler).R24Hebel[i]] + i * 2);
+		_G(spieler).R24KristallLast[i] = kristall_spr[i][_G(spieler).R24Hebel[i]];
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room24.h b/engines/chewy/rooms/room24.h
new file mode 100644
index 00000000000..9b41e207bf2
--- /dev/null
+++ b/engines/chewy/rooms/room24.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM24_H
+#define CHEWY_ROOMS_ROOM24_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room24 {
+private:
+	static void calc_hebel_spr();
+	static void calc_animation(int16 kristall_nr);
+
+public:
+	static void entry();
+	static void xit();
+	static void use_hebel(int16 txt_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index b3fdf73e398..6836259afd9 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/room.h"
+#include "chewy/rooms/roomdefs.h"
 #include "chewy/rooms/room2.h"
 #include "chewy/rooms/room3.h"
 #include "chewy/rooms/room4.h"
@@ -43,12 +43,12 @@ namespace Rooms {
 #define SONDE_SPR_R 118
 #define SONDE_SPR_L 120
 
-MovLine SONDE_MPKT[3] = {
+static MovLine SONDE_MPKT[3] = {
 	{ {  13, 45,  75 }, 1, 2 },
 	{ { 237, 52, 160 }, 1, 2 },
 	{ {   4, 83, 180 }, 0, 2 }
 };
-int16 SONDE_PHASEN[4][2] = {
+static int16 SONDE_PHASEN[4][2] = {
 	{ 120, 120 },
 	{ 118, 118 },
 	{ 141, 141 },
diff --git a/engines/chewy/rooms/room5.cpp b/engines/chewy/rooms/room5.cpp
new file mode 100644
index 00000000000..e08bbb63d18
--- /dev/null
+++ b/engines/chewy/rooms/room5.cpp
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room5.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room5::entry() {
+	if (_G(spieler).R5Terminal)
+		det->start_detail(6, 255, 0);
+}
+
+void Room5::knopf() {
+	int16 str_nr;
+	if (_G(spieler).R5Terminal) {
+		if (_G(spieler).R5Tuer == false) {
+			start_detail_wait(9, 1, ANI_VOR);
+			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
+			str_nr = 1;
+		} else {
+			start_detail_wait(9, 1, ANI_RUECK);
+			_G(spieler).room_e_obj[6].Attribut = 255;
+			str_nr = 0;
+		}
+		atds->set_ats_str(29, str_nr, ATS_DATEI);
+		_G(spieler).R5Tuer ^= 1;
+		obj->calc_rsi_flip_flop(SIB_TUERE_R5);
+	} else
+		start_aad_wait(1, -1);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room5.h b/engines/chewy/rooms/room5.h
new file mode 100644
index 00000000000..55e19d89f0b
--- /dev/null
+++ b/engines/chewy/rooms/room5.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM5_H
+#define CHEWY_ROOMS_ROOM5_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room5 {
+public:
+	static void entry();
+	static void knopf();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
new file mode 100644
index 00000000000..25088c7d755
--- /dev/null
+++ b/engines/chewy/rooms/room6.cpp
@@ -0,0 +1,137 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room6.h"
+
+namespace Chewy {
+namespace Rooms {
+
+static int16 R6_ROBO_PHASEN[4][2] = {
+	{ 86, 86 },
+	{ 86, 86 },
+	{ 86, 86 },
+	{ 86, 86 }
+};
+
+static MovLine R6_ROBO_MPKT[3] = {
+	{ { 168,  71, 180 }, 1,  1 },
+	{ { 180,  71, 100 }, 1,  2 },
+	{ {  60, 210, 110 }, 1, 16 }
+};
+
+void Room6::entry() {
+	_G(zoom_horizont) = 80;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 2;
+	if (_G(spieler).R6BolaSchild) {
+		if (_G(spieler).R6RaumBetreten < 3) {
+			det->start_detail(7, 255, ANI_VOR);
+			atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+			if (!flags.LoadGame)
+				++_G(spieler).R6RaumBetreten;
+			if (_G(spieler).R6RaumBetreten == 3) {
+				det->stop_detail(7);
+				init_robo();
+				wait_auto_obj(0);
+				_G(spieler).R6BolaOk = true;
+				obj->show_sib(SIB_BOLA_KNOPF_R6);
+				obj->hide_sib(SIB_BOLA_R6);
+				atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+			}
+		}
+	}
+}
+
+void Room6::init_robo() {
+#define ROBO_OBJ 0
+	_G(auto_obj) = 1;
+	mov_phasen[ROBO_OBJ].AtsText = 44;
+	mov_phasen[ROBO_OBJ].Lines = 3;
+	mov_phasen[ROBO_OBJ].Repeat = 1;
+	mov_phasen[ROBO_OBJ].ZoomFak = 0;
+	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[ROBO_OBJ].Mode = 1;
+	init_auto_obj(ROBO_OBJ, &R6_ROBO_PHASEN[0][0], mov_phasen[ROBO_OBJ].Lines, (MovLine
+		*)R6_ROBO_MPKT);
+}
+
+void Room6::bola_knopf() {
+	int16 tmp;
+	if (!_G(spieler).R6BolaBecher) {
+		det->hide_static_spr(0);
+		start_detail_wait(0, 1, ANI_VOR);
+		if (_G(spieler).R6BolaOk) {
+			_G(spieler).R6BolaBecher = true;
+			det->show_static_spr(0);
+			start_ani_block(2, ablock7);
+			obj->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
+			wait_detail(2);
+			obj->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
+			atds->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATEI);
+			atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+			obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+			obj->hide_sib(SIB_BOLA_KNOPF_R6);
+		} else {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_ani_block(3, ablock6);
+			while (det->get_ani_status(3) && !SHOULD_QUIT) {
+				if (!det->get_ani_status(14)) {
+					set_person_pos(220, 89, P_CHEWY, P_LEFT);
+					_G(spieler).PersonHide[P_CHEWY] = false;
+				}
+				set_up_screen(DO_SETUP);
+			}
+			det->show_static_spr(0);
+			++_G(spieler).R6BolaJoke;
+			if (_G(spieler).R6BolaJoke < 3)
+				tmp = 3;
+			else
+				tmp = 4;
+			start_aad_wait(tmp, -1);
+		}
+		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+	}
+}
+
+int16 Room6::cut_serv1(int16 frame) {
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	if (frame == 44)
+		start_aad(108, 0);
+
+	return 0;
+}
+
+int16 Room6::cut_serv2(int16 frame) {
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	if (frame == 31)
+		start_aad(107, 0);
+
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room6.h b/engines/chewy/rooms/room6.h
new file mode 100644
index 00000000000..a256dbe8800
--- /dev/null
+++ b/engines/chewy/rooms/room6.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM6_H
+#define CHEWY_ROOMS_ROOM6_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room6 {
+private:
+	static void init_robo();
+
+public:
+	static void entry();
+	static int16 cut_serv1(int16 frame);
+	static int16 cut_serv2(int16 frame);
+	static void bola_knopf();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
new file mode 100644
index 00000000000..1a93c5acb64
--- /dev/null
+++ b/engines/chewy/rooms/room7.cpp
@@ -0,0 +1,144 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room7.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room7::entry() {
+	_G(spieler).ScrollxStep = 2;
+}
+
+void Room7::haken(int16 sib_nr) {
+	int16 dia_nr;
+	del_inventar(8);
+
+	_G(spieler).AkInvent = -1;
+	menu_item = CUR_WALK;
+	cursor_wahl(menu_item);
+	if (_G(spieler).R7RHaken) {
+		_G(spieler).R7SeilOk = true;
+		if (sib_nr == SIB_LHAKEN_R7) {
+			obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
+			obj->calc_rsi_flip_flop(SIB_RHAKEN_R7);
+		}
+		atds->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
+		dia_nr = 9;
+	} else {
+		_G(spieler).R7SeilLeft = true;
+		dia_nr = 48;
+	}
+	atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
+	start_aad(dia_nr);
+}
+
+void Room7::klingel() {
+	if ((!_G(spieler).R7BellCount) ||
+		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft != 0 && !_G(spieler).R7SeilOk)) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_aad(5, 0);
+		start_ani_block(3, ablock25);
+
+		det->show_static_spr(7);
+		start_detail_wait(12, 1, ANI_VOR);
+		start_detail_wait(11, 1, ANI_VOR);
+		det->hide_static_spr(7);
+		det->stop_detail(5);
+		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	} else if (_G(spieler).R7BellCount == 1) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_aad(6, 0);
+		start_ani_block(3, ablock25);
+		det->show_static_spr(7);
+		start_detail_wait(10, 1, ANI_VOR);
+		det->start_detail(13, 1, ANI_VOR);
+		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		det->stop_detail(5);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.NoScroll = true;
+		auto_move(6, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		det->start_detail(0, 255, ANI_VOR);
+		start_detail_wait(13, 1, ANI_VOR);
+		flic_cut(FCUT_002, CFO_MODE);
+		det->stop_detail(0);
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
+		start_detail_frame(19, 1, ANI_VOR, 6);
+		start_detail_frame(9, 1, ANI_VOR, 4);
+		det->show_static_spr(9);
+		wait_detail(9);
+		det->hide_static_spr(9);
+		obj->show_sib(SIB_SCHLOTT_R7);
+		obj->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
+		set_person_pos(114, 138, P_CHEWY, -1);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.NoScroll = false;
+		det->hide_static_spr(7);
+	} else if (!_G(spieler).R7SeilOk) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_aad(7, 0);
+		start_ani_block(3, ablock25);
+		det->show_static_spr(7);
+		det->load_taf_seq(192, 74, 0);
+		det->start_detail(14, 1, ANI_VOR);
+		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		det->stop_detail(5);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.NoScroll = true;
+		auto_move(6, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		det->start_detail(0, 255, ANI_VOR);
+		wait_detail(14);
+		start_ani_block(4, ablock10);
+		det->hide_static_spr(7);
+		det->stop_detail(0);
+		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.NoScroll = false;
+		det->del_taf_tbl(192, 74, 0);
+	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
+		_G(spieler).R7BorkFlug = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_aad(8, 0);
+		start_detail_wait(1, 1, ANI_VOR);
+		obj->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
+		obj->hide_sib(SIB_KLINGEL_R7);
+		flags.NoPalAfterFlc = false;
+		flic_cut(FCUT_003, CFO_MODE);
+		set_person_pos(201, 117, P_CHEWY, P_LEFT);
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	}
+	++_G(spieler).R7BellCount;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room7.h b/engines/chewy/rooms/room7.h
new file mode 100644
index 00000000000..714bd5986c8
--- /dev/null
+++ b/engines/chewy/rooms/room7.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM7_H
+#define CHEWY_ROOMS_ROOM7_H
+
+#include "chewy/ngsdefs.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room7 {
+public:
+	static void entry();
+	static void haken(int16 sib_nr);
+	static void klingel();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
new file mode 100644
index 00000000000..d8000b1b121
--- /dev/null
+++ b/engines/chewy/rooms/room8.cpp
@@ -0,0 +1,173 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room8.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room8::entry() {
+	_G(spieler).R7ChewyFlug = true;
+	if (!_G(spieler).R8Folter)
+		start_folter();
+	else
+		stop_folter();
+	atds->set_ats_str(60, 0, ATS_DATEI);
+}
+
+void Room8::start_folter() {
+	atds->set_ats_str(67, 1, ATS_DATEI);
+
+	det->stop_detail(19);
+
+	det->start_detail(13, 255, ANI_VOR);
+}
+
+void Room8::stop_folter() {
+	atds->set_ats_str(67, 0, ATS_DATEI);
+	det->start_detail(19, 255, ANI_VOR);
+
+	det->stop_detail(13);
+
+	_G(spieler).R8Folter = true;
+	obj->hide_sib(SIB_FOLTER_R8);
+}
+
+void Room8::hole_kohle() {
+	if (!_G(spieler).R8Kohle) {
+		hide_cur();
+		_G(spieler).R8Kohle = true;
+		auto_move(4, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(12, 1, ANI_VOR);
+		cur_2_inventory();
+		invent_2_slot(KOHLE_HEISS_INV);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		show_cur();
+	}
+}
+
+void Room8::start_verbrennen() {
+	int16 ende;
+	hide_cur();
+	if (!_G(spieler).inv_cur) {
+		auto_move(3, P_CHEWY);
+		start_aad(102, 0);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_ani_block(2, ablock12);
+		ende = 0;
+		while (!ende && det->get_ani_status(9)) {
+			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
+
+			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+				if (minfo.x > 146 && minfo.x < 208 &&
+					minfo.y > 107 && minfo.y < 155)
+					ende = 1;
+			}
+		}
+		det->stop_detail(9);
+		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
+		start_ani_block(2, ablock13);
+		atds->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	}
+	show_cur();
+}
+
+bool Room8::gips_wurf() {
+	if (!is_cur_inventar(11)) {
+		hide_cur();
+		det->load_taf_seq(116, 30, 0);
+		auto_move(2, P_CHEWY);
+		_G(maus_links_click) = 0;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		del_inventar(GIPS_EIMER_INV);
+		start_detail_wait(4, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		start_detail_frame(5, 1, ANI_VOR, 16);
+		start_detail_wait(6, 1, ANI_VOR);
+		obj->show_sib(33);
+		det->show_static_spr(14);
+		wait_detail(5);
+		_G(spieler).R8GipsWurf = true;
+		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
+		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
+		det->del_taf_tbl(116, 30, 0);
+		auto_move(8, P_CHEWY);
+		flags.AtsAction = false;
+		menu_item = CUR_USE;
+		look_invent_screen(INVENTAR_NORMAL, 178);
+		flags.AtsAction = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(20, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		invent_2_slot(MASKE_INV);
+		cursor_wahl(menu_item);
+		show_cur();
+
+		return true;
+	}
+
+	return false;
+}
+
+void Room8::open_gdoor() {
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	det->show_static_spr(17);
+	set_up_screen(DO_SETUP);
+	start_detail_wait(7, 1, ANI_VOR);
+	det->show_static_spr(15);
+	det->hide_static_spr(17);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	set_person_pos(204, 274, P_CHEWY, P_LEFT);
+	atds->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
+	obj->hide_sib(31);
+	_G(spieler).R8GTuer = true;
+	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
+}
+
+void Room8::talk_nimoy() {
+	int16 tmp;
+	auto_move(9, P_CHEWY);
+	flags.NoScroll = true;
+	auto_scroll(0, 120);
+	if (_G(spieler).R8Folter) {
+		if (!_G(spieler).R8GipsWurf)
+			tmp = 1;
+		else
+			tmp = 2;
+		if (!_G(spieler).R8GTuer)
+			load_ads_dia(tmp);
+		else
+			start_aad_wait(61, -1);
+	} else
+		load_ads_dia(6);
+	flags.NoScroll = false;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room8.h b/engines/chewy/rooms/room8.h
new file mode 100644
index 00000000000..c9927a42593
--- /dev/null
+++ b/engines/chewy/rooms/room8.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM8_H
+#define CHEWY_ROOMS_ROOM8_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room8 {
+public:
+	static void entry();
+	static bool gips_wurf();
+	static void hole_kohle();
+	static void start_verbrennen();
+	static void talk_nimoy();
+	static void start_folter();
+	static void stop_folter();
+	static void open_gdoor();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
new file mode 100644
index 00000000000..5f7f9c8d8ab
--- /dev/null
+++ b/engines/chewy/rooms/room9.cpp
@@ -0,0 +1,119 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room9.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define SURIMY_OBJ 0
+
+static int16 surimy_phasen[4][2] = {
+	{ 91, 98 },
+	{ 91, 98 },
+	{ 91, 98 },
+	{ 91, 98 }
+};
+
+static MovLine surimy_mpkt[2] = {
+	{ {  80, 170, 199 }, 2, 6 },
+	{ { 210, 162, 199 }, 2, 6 }
+};
+
+static MovLine surimy_mpkt1[2] = {
+	{ { 224, 158, 199 }, 2, 6 },
+	{ { 330, 162, 199 }, 2, 6 }
+};
+
+void Room9::entry() {
+	_G(spieler).R7ChewyFlug = false;
+
+	if (!_G(spieler).R9Gitter) {
+		set_person_pos(138, 91, P_CHEWY, P_LEFT);
+	} else
+		det->show_static_spr(5);
+	if (_G(spieler).R9Surimy) {
+		det->hide_static_spr(4);
+		room->set_timer_status(7, TIMER_STOP);
+	}
+}
+
+void Room9::gtuer() {
+	_G(spieler).R9Gitter = true;
+	det->show_static_spr(5);
+	start_detail_wait(6, 1, ANI_VOR);
+	set_person_pos(74, 93, P_CHEWY, P_LEFT);
+	atds->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATEI);
+	obj->show_sib(34);
+	atds->set_ats_str(73, 1, ATS_DATEI);
+}
+
+void Room9::surimy() {
+	int16 tmp;
+	_G(spieler).R9Surimy = true;
+	tmp = spieler_vector[P_CHEWY].Count;
+	stop_person(P_CHEWY);
+	atds->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
+	det->hide_static_spr(4);
+	room->set_timer_status(7, TIMER_STOP);
+	surimy_ani();
+	start_aad_wait(56, -1);
+	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
+	spieler_vector[P_CHEWY].Count = tmp;
+	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+	mov->continue_auto_go();
+}
+
+void Room9::surimy_ani() {
+	det->load_taf_seq(91, 8, 0);
+	_G(auto_obj) = 1;
+	mov_phasen[SURIMY_OBJ].AtsText = 0;
+	mov_phasen[SURIMY_OBJ].Lines = 2;
+	mov_phasen[SURIMY_OBJ].Repeat = 1;
+	mov_phasen[SURIMY_OBJ].ZoomFak = 0;
+	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
+	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
+	auto_mov_obj[SURIMY_OBJ].Mode = 1;
+	init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+		*)surimy_mpkt);
+	wait_auto_obj(SURIMY_OBJ);
+	start_detail_frame(0, 1, ANI_VOR, 15);
+	det->start_detail(2, 1, ANI_VOR);
+	wait_detail(0);
+	start_detail_wait(1, 1, ANI_VOR);
+	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
+	det->hide_static_spr(4);
+	mov_phasen[SURIMY_OBJ].Repeat = 1;
+	init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
+		*)surimy_mpkt1);
+	wait_auto_obj(SURIMY_OBJ);
+	det->del_taf_tbl(91, 8, 0);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room9.h b/engines/chewy/rooms/room9.h
new file mode 100644
index 00000000000..07c91f75ed8
--- /dev/null
+++ b/engines/chewy/rooms/room9.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM9_H
+#define CHEWY_ROOMS_ROOM9_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room9 {
+private:
+	static void surimy_ani();
+public:
+	static void entry();
+	static void gtuer();
+	static void surimy();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/roomdefs.h b/engines/chewy/rooms/roomdefs.h
new file mode 100644
index 00000000000..faed7d6ed4a
--- /dev/null
+++ b/engines/chewy/rooms/roomdefs.h
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOMDEFS_H
+#define CHEWY_ROOMS_ROOMDEFS_H
+
+namespace Chewy {
+
+#define ANI_HIDE 0
+#define ANI_SHOW 1
+
+#define SURIMY_OBJ 0
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 85c819776ea..13e851860d2 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -26,6 +26,24 @@
 #include "chewy/rooms/room2.h"
 #include "chewy/rooms/room3.h"
 #include "chewy/rooms/room4.h"
+#include "chewy/rooms/room5.h"
+#include "chewy/rooms/room6.h"
+#include "chewy/rooms/room7.h"
+#include "chewy/rooms/room8.h"
+#include "chewy/rooms/room9.h"
+#include "chewy/rooms/room10.h"
+#include "chewy/rooms/room11.h"
+#include "chewy/rooms/room12.h"
+#include "chewy/rooms/room13.h"
+#include "chewy/rooms/room14.h"
+#include "chewy/rooms/room16.h"
+#include "chewy/rooms/room17.h"
+#include "chewy/rooms/room18.h"
+#include "chewy/rooms/room19.h"
+#include "chewy/rooms/room21.h"
+#include "chewy/rooms/room22.h"
+#include "chewy/rooms/room23.h"
+#include "chewy/rooms/room24.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -40,6 +58,24 @@ using Chewy::Rooms::Room0;
 using Chewy::Rooms::Room2;
 using Chewy::Rooms::Room3;
 using Chewy::Rooms::Room4;
+using Chewy::Rooms::Room5;
+using Chewy::Rooms::Room6;
+using Chewy::Rooms::Room7;
+using Chewy::Rooms::Room8;
+using Chewy::Rooms::Room9;
+using Chewy::Rooms::Room10;
+using Chewy::Rooms::Room11;
+using Chewy::Rooms::Room12;
+using Chewy::Rooms::Room13;
+using Chewy::Rooms::Room14;
+using Chewy::Rooms::Room16;
+using Chewy::Rooms::Room17;
+using Chewy::Rooms::Room18;
+using Chewy::Rooms::Room19;
+using Chewy::Rooms::Room21;
+using Chewy::Rooms::Room22;
+using Chewy::Rooms::Room23;
+using Chewy::Rooms::Room24;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 9e3a828212e..25ccd58a220 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -132,14 +132,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 67:
-						action_ret = r8_gips_wurf();
+						action_ret = Room8::gips_wurf();
 						break;
 
 					case 71:
 						if (is_cur_inventar(ZANGE_INV))
-							r8_hole_kohle();
+							Room8::hole_kohle();
 						else if (!_G(spieler).inv_cur)
-							r8_start_verbrennen();
+							Room8::start_verbrennen();
 						break;
 
 					case 73:
@@ -156,7 +156,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 77:
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
 							auto_move(3, P_CHEWY);
-							flc->set_custom_user_function(r6_cut_serv1);
+							flc->set_custom_user_function(Room6::cut_serv1);
 							flic_cut(FCUT_005, CFO_MODE);
 							flc->remove_custom_user_function();
 						} else {
@@ -165,7 +165,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 79:
-						action_ret = r22_chewy_amboss();
+						action_ret = Room22::chewy_amboss();
 						break;
 
 					case 80:
@@ -174,19 +174,19 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 81:
-						r22_get_bork();
+						Room22::get_bork();
 						break;
 
 					case 82:
-						action_ret = r22_malen();
+						action_ret = Room22::malen();
 						break;
 
 					case 84:
-						action_ret = r11_scanner();
+						action_ret = Room11::scanner();
 						break;
 
 					case 92:
-						action_ret = r13_monitor_knopf();
+						action_ret = Room13::monitor_knopf();
 						break;
 
 					case 104:
@@ -199,19 +199,19 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 107:
-						action_ret = r14_use_gleiter();
+						action_ret = Room14::use_gleiter();
 						break;
 
 					case 108:
-						action_ret = r14_use_schrott();
+						action_ret = Room14::use_schrott();
 						break;
 
 					case 109:
-						action_ret = r14_use_schleim();
+						action_ret = Room14::use_schleim();
 						break;
 
 					case 110:
-						action_ret = r23_start_gleiter();
+						action_ret = Room23::start_gleiter();
 						break;
 
 					case 114:
@@ -219,66 +219,66 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 117:
-						action_ret = r12_chewy_trans();
+						action_ret = Room12::chewy_trans();
 						break;
 
 					case 118:
-						action_ret = r12_proc1();
+						action_ret = Room12::proc1();
 						break;
 
 					case 119:
-						action_ret = r12_use_terminal();
+						action_ret = Room12::use_terminal();
 						break;
 
 					case 123:
-						action_ret = r16_use_gleiter();
+						action_ret = Room16::use_gleiter();
 						break;
 
 					case 133:
-						action_ret = r21_use_fenster();
+						action_ret = Room21::use_fenster();
 						break;
 
 					case 134:
-						r21_salto();
+						Room21::salto();
 						break;
 
 					case 137:
-						action_ret = r17_use_seil();
+						action_ret = Room17::use_seil();
 						break;
 
 					case 139:
-						r17_calc_seil();
+						Room17::calc_seil();
 						break;
 
 					case 142:
-						action_ret = r17_energie_hebel();
+						action_ret = Room17::energie_hebel();
 						break;
 
 					case 146:
-						action_ret = r17_get_oel();
+						action_ret = Room17::get_oel();
 						break;
 
 					case 149:
 					case 153:
-						action_ret = r18_calc_surimy();
+						action_ret = Room18::calc_surimy();
 						break;
 
 					case 154:
-						action_ret = r18_use_cart_moni();
+						action_ret = Room18::use_cart_moni();
 						break;
 
 					case 158:
-						action_ret = r18_go_cyberspace();
+						action_ret = Room18::go_cyberspace();
 						break;
 
 					case 159:
-						action_ret = r18_calc_schalter();
+						action_ret = Room18::calc_schalter();
 						break;
 
 					case 161:
 					case 162:
 					case 163:
-						r24_use_hebel(txt_nr);
+						Room24::use_hebel(txt_nr);
 						break;
 
 					case 165:
@@ -299,7 +299,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 179:
-						action_ret = r18_sonden_moni();
+						action_ret = Room18::sonden_moni();
 						break;
 
 					case 187:
@@ -769,7 +769,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_WALK:
 					switch (txt_nr) {
 					case 94:
-						r13_jmp_band();
+						Room13::jmp_band();
 						break;
 
 					case 95:
@@ -778,7 +778,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 100:
-						r13_jmp_boden();
+						Room13::jmp_boden();
 						break;
 
 					case 114:
@@ -832,17 +832,17 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 67:
-						r8_talk_nimoy();
+						Room8::talk_nimoy();
 						break;
 
 					case 121:
-						r11_talk_debug();
+						Room11::talk_debug();
 						break;
 
 					case 122:
 						if (!_G(spieler).R13BorkOk) {
 							auto_move(10, P_CHEWY);
-							r13_talk_bork();
+							Room13::talk_bork();
 						}
 						break;
 
@@ -1094,11 +1094,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_TALK:
 					switch (txt_nr) {
 					case 104:
-						r14_talk_eremit();
+						Room14::talk_eremit();
 						break;
 
 					case 120:
-						r12_talk_bork();
+						Room12::talk_bork();
 						break;
 
 					case 263:


Commit: 116c09843062f3ead3402a38937dd31d502404cc
    https://github.com/scummvm/scummvm/commit/116c09843062f3ead3402a38937dd31d502404cc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Update some static arrays for release

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 339c3f7461a..8d958b3ce34 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -966,6 +966,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	tmp = _G(spieler).AkInvent;
 	ret = NO_ACTION;
 	action_flag = false;
+
 	switch (mode) {
 	case INVENTAR_NORMAL:
 		ret = obj->action_iib_iib(_G(spieler).AkInvent, test_nr);
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 7a8c6155192..b833c75b89a 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -26,54 +26,35 @@
 
 namespace Chewy {
 
-int16 action_obj_tbl[] = {
-
-	30000, 5, 8, 13, 38,
-
-	30001, 28, 29,
-
-	30002, 31, 35, 56,
-
-	30003, 38, 39, 11, 15, 13, 41, 42,
-
-	30004, 43, 61,
-
-	30005, 67, 5040,
-
-	30006, 77,
-	32000,
+static const int16 ACTION_OBJ_TBL[] = {
+	30000,    5,    8,   13,   38,   41,
+	30001,   28,   29,
+	30002,   31,   35,   56, 5088,
+	30003,   38,   39,   11,   15,   13,   41,   42,
+	30004,   43,   61,
+	30005,   67, 5040, 5088,
+	30006,   77,
+	30007,    4,
+	30008, 5004,
+	32000
 };
 
-int16 sib_zustand_tbl[] = {
-
-	30000, 46, 0,
-
-	30001, 6,
-
-	30002, 7,
-
-	30003, 8,
-
-	30004, 12, 13,
-
-	30005, 2, 3,
-
-	30006, 1, 40, 41, 42, 43, 44,
-
-	30007, 41, 45, 46, 47, 48,
-
-	30008, 7, 60, 23,
-
-	30009, 40, 41, 42, 43, 44, 45, 46, 47, 48,
-
-	30010, 4, 5,
-
-	30011, 8, 9,
-
-	30012, 7, 10,
-
-	30013, 3, 5, 6,
-	32000,
+static const int16 SIB_ZUSTAND_TBL[] = {
+	30000,   46,    0,
+	30001,    6,
+	30002,    7,
+	30003,    8,
+	30004,   12,   13,
+	30005,    2,    3,
+	30006,    1,
+	30007,   41,   45,   46,   47,   48,
+	30008,    7,   60,   23,
+	30009,   40,   41,   42,   43,   44,   45,   46,   47,   48,
+	30010,    4,    5,
+	30011,    8,    9,
+	30012,    7,   10,
+	30013,    3,    5,    6,
+	32000
 };
 
 objekt::objekt(Spieler *sp) {
@@ -276,27 +257,28 @@ int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 	tmp1 = maus_obj_nr;
 	tmp2 = test_obj_nr;
 	action_flag = 0;
+
 	for (j = 0; j < 2 && !action_flag; j++) {
 		if (j) {
 			tmp1 = test_obj_nr;
 			tmp2 = maus_obj_nr;
 		}
-		if (Rmo[tmp1].ActionObj != -1) {
 
+		if (Rmo[tmp1].ActionObj != -1) {
 			if (Rmo[tmp1].ActionObj < 30000 &&
 			        Rmo[tmp1].ActionObj == tmp2) {
 				action_flag = 1;
 			} else if (Rmo[tmp1].ActionObj >= 30000) {
 				i = 0;
-				while (action_obj_tbl[i] != Rmo[tmp1].ActionObj &&
-				        action_obj_tbl[i] != 32000) {
+				while (ACTION_OBJ_TBL[i] != Rmo[tmp1].ActionObj &&
+				        ACTION_OBJ_TBL[i] != 32000) {
 					++i;
 				}
-				if (action_obj_tbl[i] != 32000) {
+				if (ACTION_OBJ_TBL[i] != 32000) {
 					++i;
 					ok = 0;
-					while (action_obj_tbl[i] < 30000 && !ok) {
-						if (action_obj_tbl[i] == tmp2 + 5000) {
+					while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
+						if (ACTION_OBJ_TBL[i] == tmp2 + 5000) {
 							ok = 1;
 							action_flag = 1;
 						}
@@ -306,8 +288,8 @@ int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 			}
 		}
 	}
-	if (action_flag == 1) {
 
+	if (action_flag == 1) {
 		if (!calc_rmo_flip_flop(tmp2)) {
 			action_flag = NO_ACTION;
 		} else {
@@ -317,32 +299,31 @@ int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 				ret = OBJEKT_1;
 		}
 	}
+
 	return ret;
 }
 
 int16 objekt::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
-
 	int16 action_flag;
-
 	int16 i;
 	int16 ok;
 	action_flag = NO_ACTION;
-	if (Rmo[maus_obj_nr].ActionObj != -1) {
 
+	if (Rmo[maus_obj_nr].ActionObj != -1) {
 		if (Rmo[maus_obj_nr].ActionObj < 30000 &&
 		        Rmo[maus_obj_nr].ActionObj == test_obj_nr) {
 			action_flag = OBJEKT_2;
 		} else if (Rmo[maus_obj_nr].ActionObj >= 30000) {
 			i = 0;
-			while (action_obj_tbl[i] != Rmo[maus_obj_nr].ActionObj &&
-			        action_obj_tbl[i] != 32000) {
+			while (ACTION_OBJ_TBL[i] != Rmo[maus_obj_nr].ActionObj &&
+			        ACTION_OBJ_TBL[i] != 32000) {
 				++i;
 			}
-			if (action_obj_tbl[i] != 32000) {
+			if (ACTION_OBJ_TBL[i] != 32000) {
 				++i;
 				ok = 0;
-				while (action_obj_tbl[i] < 30000 && !ok) {
-					if (action_obj_tbl[i] == test_obj_nr) {
+				while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
+					if (ACTION_OBJ_TBL[i] == test_obj_nr) {
 						ok = 1;
 						action_flag = OBJEKT_2;
 					}
@@ -383,19 +364,19 @@ void objekt::calc_static_detail(int16 det_nr) {
 	int16 i;
 	int16 n;
 	ani_detail_info *adi;
-	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[0]) {
 
+	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[0]) {
 		nr = Rsi[det_nr].StaticAk;
 		if (nr != -1) {
 			if (nr >= 30000) {
 				i = 0;
-				while (sib_zustand_tbl[i] != nr && sib_zustand_tbl[i] != 32000) {
+				while (SIB_ZUSTAND_TBL[i] != nr && SIB_ZUSTAND_TBL[i] != 32000) {
 					++i;
 				}
-				if (sib_zustand_tbl[i] != 32000) {
+				if (SIB_ZUSTAND_TBL[i] != 32000) {
 					++i;
-					while (sib_zustand_tbl[i] < 30000) {
-						nr = sib_zustand_tbl[i];
+					while (SIB_ZUSTAND_TBL[i] < 30000) {
+						nr = SIB_ZUSTAND_TBL[i];
 
 						if (nr >= 40) {
 							n = nr - 40;
@@ -424,13 +405,13 @@ void objekt::calc_static_detail(int16 det_nr) {
 		if (nr != -1) {
 			if (nr >= 30000) {
 				i = 0;
-				while (sib_zustand_tbl[i] != nr && sib_zustand_tbl[i] != 32000) {
+				while (SIB_ZUSTAND_TBL[i] != nr && SIB_ZUSTAND_TBL[i] != 32000) {
 					++i;
 				}
-				if (sib_zustand_tbl[i] != 32000) {
+				if (SIB_ZUSTAND_TBL[i] != 32000) {
 					++i;
-					while (sib_zustand_tbl[i] < 30000) {
-						nr = sib_zustand_tbl[i];
+					while (SIB_ZUSTAND_TBL[i] < 30000) {
+						nr = SIB_ZUSTAND_TBL[i];
 
 						if (nr >= 40)
 							det->stop_detail(nr - 40);


Commit: 2564539e713448956d6559478a52a498d7a4db11
    https://github.com/scummvm/scummvm/commit/2564539e713448956d6559478a52a498d7a4db11
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Move room 2 cutscene into Room2 class

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room2.cpp
    engines/chewy/rooms/room2.h
    engines/chewy/rooms/room3.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 184f0fbbd9d..ad12bc6f1c1 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -35,8 +35,6 @@ namespace Chewy {
 
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
-#define ANI_5 5
-#define GITTER_BLITZEN 7
 
 static int16 flic_val1, flic_val2;
 
@@ -55,21 +53,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 
 	switch (r_nr) {
 	case ROOM_2_3:
-		det->start_detail(ANI_5, 255, ANI_VOR);
-		start_spz(ANI_5, 255, 0, ANI_VOR);
-		start_aad_wait(49, -1);
-		det->stop_detail(ANI_5);
-
-		det->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
-		_G(spieler).R2KabelBork = 1;
-		del_inventar(_G(spieler).AkInvent);
-
-		atds->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
-		atds->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
-		atds->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
-		atds->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
-		atds->set_ats_str(11, 1, ATS_DATEI);
+		Room2::electrifyWalkway1();
 		break;
 
 	case ROOM_8_17:
@@ -89,8 +73,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 
 	switch (r_nr) {
 	case ROOM_2_3:
-		start_spz(16, 255, 0, P_CHEWY);
-		start_aad_wait(47, -1);
+		Room2::electrifyWalkway2();
 		break;
 
 	case ROOM_1_1:
@@ -256,7 +239,7 @@ void check_ged_action(int16 index) {
 		case 1:
 			switch (index) {
 			case 0:
-				if (!_G(spieler).R2KabelBork) {
+				if (!_G(spieler).R2ElectrocutedBork) {
 					if (_G(spieler).AkInvent == KABEL_INV) {
 						flag = 1;
 						del_inventar(_G(spieler).AkInvent);
@@ -284,7 +267,7 @@ void check_ged_action(int16 index) {
 			switch (index) {
 			case 0:
 				det->stop_detail(5);
-				if (!_G(spieler).R2KabelBork) {
+				if (!_G(spieler).R2ElectrocutedBork) {
 					det->start_detail(6, 2, ANI_VOR);
 				} else {
 					start_ani_block(2, ablock4);
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
index 210493cceeb..a40435ebb22 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room2.cpp
@@ -29,8 +29,11 @@
 namespace Chewy {
 namespace Rooms {
 
+#define ANI_5 5
+#define GITTER_BLITZEN 7
+
 void Room2::entry() {
-	if (!_G(spieler).R2KabelBork)
+	if (!_G(spieler).R2ElectrocutedBork)
 		det->start_detail(5, 255, 0);
 }
 
@@ -46,5 +49,28 @@ void Room2::jump_out_r1(int16 nr) {
 	check_shad(2, 1);
 }
 
+void Room2::electrifyWalkway1() {
+	det->start_detail(ANI_5, 255, ANI_VOR);
+	start_spz(ANI_5, 255, 0, ANI_VOR);
+	start_aad_wait(49, -1);
+	det->stop_detail(ANI_5);
+
+	det->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
+	_G(spieler).R2ElectrocutedBork = true;
+	del_inventar(_G(spieler).AkInvent);
+
+	atds->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
+	atds->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
+	atds->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
+	atds->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
+	atds->set_ats_str(11, 1, ATS_DATEI);
+}
+
+void Room2::electrifyWalkway2() {
+	start_spz(16, 255, 0, P_CHEWY);
+	start_aad_wait(47, -1);
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room2.h b/engines/chewy/rooms/room2.h
index 3498250c17b..e072b49a63d 100644
--- a/engines/chewy/rooms/room2.h
+++ b/engines/chewy/rooms/room2.h
@@ -31,6 +31,8 @@ class Room2 {
 public:
 	static void entry();
 	static void jump_out_r1(int16 nr);
+	static void electrifyWalkway1();
+	static void electrifyWalkway2();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 6836259afd9..cceb874a5fb 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -66,7 +66,7 @@ void Room3::terminal() {
 		spr_info[0].Y = 2;
 		spr_info[0].ZEbene = 0;
 
-		if (!_G(spieler).R2KabelBork) {
+		if (!_G(spieler).R2ElectrocutedBork) {
 			det->stop_detail(5);
 			start_ani_block(2, ablock3);
 			if (_G(spieler).R2FussSchleim) {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index e569a8af63f..1c4daa98e83 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -36,7 +36,7 @@ struct SpielerFlags {
 	bool R0PillowThrow : 1;
 	bool R0Monokel : 1;
 	bool R0GBuch : 1;
-	bool R2KabelBork : 1;
+	bool R2ElectrocutedBork : 1;
 	bool R2FussSchleim : 1;
 	bool R5Terminal : 1;
 	bool R5Tuer : 1;


Commit: 81b502ff7ec1cfcd7489d5a6d03dedc91c570c79
    https://github.com/scummvm/scummvm/commit/81b502ff7ec1cfcd7489d5a6d03dedc91c570c79
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Move room 1 specific code to a new Room1 class

Changed paths:
  A engines/chewy/rooms/room1.cpp
  A engines/chewy/rooms/room1.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h


diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 12b8ec9fc9d..3f7a6e766b7 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -51,6 +51,7 @@ MODULE_OBJS = \
 	types.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \
+	rooms/room1.o \
 	rooms/room2.o \
 	rooms/room3.o \
 	rooms/room4.o \
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ad12bc6f1c1..bcaaf595617 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -47,9 +47,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 #define ROOM_8_17 817
 #define ROOM_9_4 904
 #define ROOM_18_20 1820
-	int16 r_nr;
-	int16 tmp;
-	r_nr = _G(spieler).PersonRoomNr[P_CHEWY] * 100 + nr;
+	int16 r_nr = _G(spieler).PersonRoomNr[P_CHEWY] * 100 + nr;
 
 	switch (r_nr) {
 	case ROOM_2_3:
@@ -72,16 +70,12 @@ void play_scene_ani(int16 nr, int16 mode) {
 	start_detail_wait(nr, 1, mode);
 
 	switch (r_nr) {
-	case ROOM_2_3:
-		Room2::electrifyWalkway2();
+	case ROOM_1_1:
+		Room1::gottenCard();
 		break;
 
-	case ROOM_1_1:
-		det->hide_static_spr(2);
-		start_detail_wait(4, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		atds->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
-		atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
+	case ROOM_2_3:
+		Room2::electrifyWalkway2();
 		break;
 
 	case ROOM_3_1:
diff --git a/engines/chewy/rooms/room1.cpp b/engines/chewy/rooms/room1.cpp
new file mode 100644
index 00000000000..b1cc2d9fde7
--- /dev/null
+++ b/engines/chewy/rooms/room1.cpp
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room1.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room1::gottenCard() {
+	int16 tmp;
+
+	det->hide_static_spr(2);
+	start_detail_wait(4, 1, ANI_VOR);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	atds->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
+	atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room1.h b/engines/chewy/rooms/room1.h
new file mode 100644
index 00000000000..cf35664a0fd
--- /dev/null
+++ b/engines/chewy/rooms/room1.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM1_H
+#define CHEWY_ROOMS_ROOM1_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room1 {
+public:
+	static void gottenCard();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 13e851860d2..3bff04a70b6 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -23,6 +23,7 @@
 #define CHEWY_ROOMS_ROOMS_H
 
 #include "chewy/rooms/room0.h"
+#include "chewy/rooms/room1.h"
 #include "chewy/rooms/room2.h"
 #include "chewy/rooms/room3.h"
 #include "chewy/rooms/room4.h"
@@ -55,6 +56,7 @@
 namespace Chewy {
 
 using Chewy::Rooms::Room0;
+using Chewy::Rooms::Room1;
 using Chewy::Rooms::Room2;
 using Chewy::Rooms::Room3;
 using Chewy::Rooms::Room4;


Commit: dbc8459a85ca466c5dc95ad0e64ac1cefc172149
    https://github.com/scummvm/scummvm/commit/dbc8459a85ca466c5dc95ad0e64ac1cefc172149
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Make various room data arrays static const

Changed paths:
    engines/chewy/global.h
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room9.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 7b232f15463..1af98039793 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -483,8 +483,8 @@ void stop_auto_obj(int16 nr);
 void continue_auto_obj(int16 nr, int16 repeat);
 
 void new_auto_line(int16 nr);
-void init_auto_obj(int16 auto_nr, int16 *phasen, int16 lines,
-                   MovLine *pkt);
+void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines,
+                   const MovLine *pkt);
 
 int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff);
 
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 4cc92559c1e..a2e0b47b787 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -31,14 +31,14 @@ namespace Rooms {
 
 #define R12_BORK_OBJ 0
 
-int16 r12_bork_phasen[4][2] = {
+static const int16 R12_BORK_PHASEN[4][2] = {
 	{ 74, 79 },
 	{ 80, 85 },
 	{ 62, 67 },
 	{ 68, 73 }
 };
 
-MovLine r12_bork_mpkt[5] = {
+static const MovLine R12_BORK_MPKT[5] = {
 	{ { 207, 220, 199 }, 2, 6 },
 	{ { 207, 145, 199 }, 2, 6 },
 	{ {  30, 145, 199 }, 0, 6 },
@@ -46,12 +46,12 @@ MovLine r12_bork_mpkt[5] = {
 	{ { 207, 220, 199 }, 3, 6 }
 };
 
-MovLine r12_bork_mpkt1[2] = {
+static const MovLine R12_BORK_MPKT1[2] = {
 	{ { 207, 220, 199 }, 0, 6 },
 	{ { 170, 145, 199 }, 0, 6 }
 };
 
-MovLine r12_bork_mpkt2[3] = {
+static const MovLine R12_BORK_MPKT2[3] = {
 	{ { 170, 145, 199 }, 1, 8 },
 	{ { 180, 145, 120 }, 1, 8 },
 	{ { 300,  80, 120 }, 1, 8 }
@@ -100,8 +100,8 @@ void Room12::init_bork() {
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = 1;
-			init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-				*)r12_bork_mpkt);
+			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
+				(const MovLine *)R12_BORK_MPKT);
 			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
@@ -141,8 +141,8 @@ void Room12::bork_ok() {
 	_G(spieler).R12BorkTalk = true;
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 2;
-	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-		*)r12_bork_mpkt1);
+	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
+		(const MovLine *)R12_BORK_MPKT1);
 	wait_auto_obj(R12_BORK_OBJ);
 	_G(spieler).R12BorkInRohr = true;
 	det->set_detail_pos(3, 170, 145);
@@ -151,8 +151,8 @@ void Room12::bork_ok() {
 	det->stop_detail(3);
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 3;
-	init_auto_obj(R12_BORK_OBJ, &r12_bork_phasen[0][0], mov_phasen[R12_BORK_OBJ].Lines, (MovLine
-		*)r12_bork_mpkt2);
+	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
+		(const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
 	det->hide_static_spr(10);
 	start_detail_wait(4, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 5d8854d8234..327f30f73c3 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -31,14 +31,14 @@ namespace Rooms {
 
 #define R13_BORK_OBJ 0
 
-int16 r13_bork_phasen[4][2] = {
+static const int16 R13_BORK_PHASEN[4][2] = {
 	{ 92, 97 },
 	{ 86, 91 },
 	{ 86, 91 },
 	{ 68, 73 }
 };
 
-MovLine r13_bork_mpkt[3] = {
+static const MovLine R13_BORK_MPKT[3] = {
 	{ { 168, 140, 162 }, 0, 6 },
 	{ {  50, 140, 162 }, 0, 6 },
 	{ {  50, 107, 130 }, 2, 6 }
@@ -99,7 +99,8 @@ void Room13::talk_bork() {
 		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[R13_BORK_OBJ].Mode = 1;
-		init_auto_obj(R13_BORK_OBJ, &r13_bork_phasen[0][0], mov_phasen[R13_BORK_OBJ].Lines, (MovLine *)r13_bork_mpkt);
+		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], mov_phasen[R13_BORK_OBJ].Lines,
+			(const MovLine *)R13_BORK_MPKT);
 		auto_move(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
 		auto_move(11, P_CHEWY);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 686524dd226..a18175572b9 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -29,21 +29,22 @@
 namespace Chewy {
 namespace Rooms {
 
+#undef CHEWY_OBJ
 #define CHEWY_OBJ 0
 
-static int16 chewy_phasen[4][2] = {
+static const int16 CHEWY_PHASEN[4][2] = {
 	{ 0, 0 },
 	{ 0, 0 },
 	{ 141, 144 },
 	{ 177, 177 }
 };
 
-static MovLine chewy_mpkt[2] = {
+static const MovLine CHEWY_MPKT[2] = {
 	{ { 241, 150, 0 }, 3, 8 },
 	{ { 241, 350, 0 }, 3, 8 }
 };
 
-static MovLine chewy_mpkt1[2] = {
+static const MovLine CHEWY_MPKT1[2] = {
 	{ { 243, 334, 0 }, 2, 6 },
 	{ { 243, 150, 0 }, 2, 6 }
 };
@@ -135,8 +136,8 @@ void Room17::kletter_down() {
 	room->set_zoom(32);
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &chewy_phasen[0][0], mov_phasen[CHEWY_OBJ].Lines, (MovLine
-		*)chewy_mpkt);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines,
+		(const MovLine *)CHEWY_MPKT);
 	set_person_pos(242, 350, P_CHEWY, P_LEFT);
 }
 
@@ -151,8 +152,8 @@ void Room17::kletter_up() {
 	room->set_zoom(25);
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &chewy_phasen[0][0], mov_phasen[CHEWY_OBJ].Lines, (MovLine
-		*)chewy_mpkt1);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines,
+		(const MovLine *)CHEWY_MPKT1);
 	set_person_pos(243, 146, P_CHEWY, P_LEFT);
 }
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 7314fd02937..69db5c1b02c 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -29,32 +29,32 @@
 namespace Chewy {
 namespace Rooms {
 
-static int16 bork_spr[5] = { 15, 16, 17, 24, 25 };
-static int16 bork_spr1[4] = { 20, 21, 18, 19 };
+static const int16 BORK_SPR[5] = { 15, 16, 17, 24, 25 };
+static const int16 BORK_SPR1[4] = { 20, 21, 18, 19 };
 
-static int16 surimy_phasen[4][2] = {
+static const int16 SURIMY_PHASEN[4][2] = {
 	{ 245, 252 },
 	{ 0, 0 },
 	{ 0, 0 },
 	{ 0, 0 }
 };
 
-static MovLine surimy_mpkt[2] = {
+static const MovLine SURIMY_MPKT[2] = {
 	{ { 453, 170, 190 }, 0, 6 },
 	{ { 392, 170, 190 }, 0, 6 }
 };
 
-static MovLine surimy_mpkt1[2] = {
+static const MovLine SURIMY_MPKT1[2] = {
 	{ { 392, 170, 190 }, 0, 6 },
 	{ { 143, 170, 190 }, 0, 6 }
 };
 
-static MovLine surimy_mpkt2[2] = {
+static const MovLine SURIMY_MPKT2[2] = {
 	{ { 143, 170, 190 }, 0, 6 },
 	{ {   0, 170, 190 }, 0, 6 }
 };
 
-static MovLine surimy_mpkt3[2] = {
+static const MovLine SURIMY_MPKT3[2] = {
 	{ { 500, 100, 190 }, 0, 12 },
 	{ { 392, 170, 190 }, 0, 12 }
 };
@@ -71,9 +71,9 @@ void Room18::entry() {
 		init_borks();
 	else {
 		for (i = 0; i < 5; i++)
-			det->hide_static_spr(bork_spr[i]);
+			det->hide_static_spr(BORK_SPR[i]);
 		for (i = 0; i < (4 - _G(spieler).R18Krone); i++)
-			det->show_static_spr(bork_spr1[i]);
+			det->show_static_spr(BORK_SPR1[i]);
 	}
 	if (_G(spieler).R16F5Exit)
 		det->hide_static_spr(19);
@@ -92,9 +92,9 @@ void Room18::entry() {
 void Room18::init_borks() {
 	int16 i;
 	for (i = 0; i < 5; i++)
-		det->show_static_spr(bork_spr[i]);
+		det->show_static_spr(BORK_SPR[i]);
 	for (i = 0; i < 4; i++)
-		det->hide_static_spr(bork_spr1[i]);
+		det->hide_static_spr(BORK_SPR1[i]);
 	_G(timer_nr)[0] = room->set_timer(255, 10);
 	_G(timer_nr)[1] = room->set_timer(255, 15);
 	_G(spieler).scrollx = 276;
@@ -194,8 +194,8 @@ int16 Room18::calc_surimy() {
 		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
 
-			init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-				*)surimy_mpkt3);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+				(const MovLine *)SURIMY_MPKT3);
 			wait_detail(18);
 		} else {
 			auto_move(1, P_CHEWY);
@@ -204,8 +204,8 @@ int16 Room18::calc_surimy() {
 			start_detail_frame(17, 1, ANI_VOR, 12);
 			_G(maus_links_click) = false;
 
-			init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-				*)surimy_mpkt);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+				(const MovLine *)SURIMY_MPKT);
 			wait_detail(17);
 		}
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -232,8 +232,8 @@ int16 Room18::calc_surimy() {
 		det->hide_static_spr(26);
 		flags.NoScroll = true;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			*)surimy_mpkt1);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+			(const MovLine *)SURIMY_MPKT1);
 		auto_scroll(70, 0);
 		wait_auto_obj(SURIMY_OBJ);
 
@@ -251,8 +251,8 @@ int16 Room18::calc_surimy() {
 
 		det->hide_static_spr(26);
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			*)surimy_mpkt2);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+			(const MovLine *)SURIMY_MPKT2);
 		auto_scroll(0, 0);
 		wait_auto_obj(SURIMY_OBJ);
 		_G(spieler).ScrollxStep = 6;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 0987e9c0618..58fc9b62ed3 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -33,25 +33,25 @@ namespace Rooms {
 #define SPINNE2_OBJ 1
 #define ENERGIE_OBJ 2
 
-static int16 spinne_phasen[4][2] = {
+static const int16 SPINNE_PHASEN[4][2] = {
 	{ 58, 65 },
 	{ 50, 57 },
 	{ 42, 49 },
 	{ 66, 89 }
 };
 
-static MovLine spinne_mpkt[3] = {
+static const MovLine SPINNE_MPKT[3] = {
 	{ { 550, 275, 0 }, 0, 2 },
 	{ { 396, 275, 0 }, 0, 2 },
 	{ { 530, 275, 0 }, 1, 2 }
 };
 
-static MovLine spinne_mpkt1[2] = {
+static const MovLine SPINNE_MPKT1[2] = {
 	{ { 104,  50, 0 }, 3, 3 },
 	{ { 104, 430, 0 }, 3, 3 }
 };
 
-static MovLine energie_mpkt[2] = {
+static const MovLine SPINNE_MPKT2[2] = {
 	{ { 115, 140, 0 }, 2, 1 },
 	{ { 115, 190, 0 }, 2, 1 }
 };
@@ -106,7 +106,7 @@ void Room21::init_spinne() {
 	auto_mov_obj[SPINNE1_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SPINNE1_OBJ].Mode = 1;
-	init_auto_obj(SPINNE1_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE1_OBJ].Lines, (MovLine *)spinne_mpkt);
+	init_auto_obj(SPINNE1_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE1_OBJ].Lines, (const MovLine *)SPINNE_MPKT);
 
 	mov_phasen[SPINNE2_OBJ].AtsText = 130;
 	mov_phasen[SPINNE2_OBJ].Lines = 2;
@@ -115,17 +115,16 @@ void Room21::init_spinne() {
 	auto_mov_obj[SPINNE2_OBJ].Id = AUTO_OBJ1;
 	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SPINNE2_OBJ].Mode = 1;
-	init_auto_obj(SPINNE2_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE2_OBJ].Lines, (MovLine *)spinne_mpkt1);
+	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
 	_G(timer_nr)[0] = room->set_timer(255, 21);
 	_G(e_streifen) = false;
 }
 
 void Room21::restart_spinne2() {
 	mov_phasen[SPINNE2_OBJ].Repeat = 1;
-	init_auto_obj(SPINNE2_OBJ, &spinne_phasen[0][0], mov_phasen[SPINNE2_OBJ].Lines, (MovLine *)spinne_mpkt1);
+	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 	_G(e_streifen) = false;
-
 }
 
 void Room21::e_streifen() {
@@ -137,8 +136,7 @@ void Room21::e_streifen() {
 	auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
 	auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[ENERGIE_OBJ].Mode = 1;
-	init_auto_obj(ENERGIE_OBJ, &spinne_phasen[0][0], mov_phasen[ENERGIE_OBJ].Lines, (MovLine *)energie_mpkt);
-
+	init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[ENERGIE_OBJ].Lines, (const MovLine *)SPINNE_MPKT2);
 }
 
 void Room21::r21setup_func() {
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 58d62981808..6657ebdb0dd 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -31,24 +31,24 @@ namespace Rooms {
 
 #define BORK_OBJ 0
 
-static int16 bork_phasen[4][2] = {
+static const int16 BORK_PHASEN[4][2] = {
 	{ 51, 56 },
 	{ 36, 41 },
 	{ 36, 41 },
 	{ 36, 41 }
 };
 
-static MovLine bork_mpkt[2] = {
-	{ {-30, 125, 170} , 1, 6 },
+static const MovLine BORK_MPKT[2] = {
+	{ { -30, 125, 170} , 1, 6 },
 	{ { 155, 125, 170 }, 1, 6 },
 };
 
-static MovLine bork_mpkt1[2] = {
+static const MovLine BORK_MPKT1[2] = {
 	{ { 155, 125, 170}, 2, 6 },
 	{ { -30, 125, 170}, 0, 6 }
 };
 
-static MovLine bork_mpkt2[2] = {
+static const MovLine BORK_MPKT2[2] = {
 	{ { -30, 125, 170 }, 1, 6 },
 	{ {  90, 125, 170 }, 1, 6 }
 };
@@ -110,21 +110,21 @@ void Room22::bork(int16 t_nr) {
 }
 
 void Room22::bork_walk1() {
-	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
-		*)bork_mpkt);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
+		(const MovLine *)BORK_MPKT);
 	wait_auto_obj(BORK_OBJ);
 
 	start_detail_wait(2, 1, ANI_VOR);
 
 	mov_phasen[BORK_OBJ].Repeat = 1;
-	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
-		*)bork_mpkt1);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
+		(const MovLine *)BORK_MPKT1);
 	wait_auto_obj(BORK_OBJ);
 }
 
 void Room22::bork_walk2() {
-	init_auto_obj(BORK_OBJ, &bork_phasen[0][0], mov_phasen[BORK_OBJ].Lines, (MovLine
-		*)bork_mpkt2);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
+		(const MovLine *)BORK_MPKT2);
 	wait_auto_obj(BORK_OBJ);
 
 	flic_cut(FCUT_009, CFO_MODE);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index c0b3b1daf8b..7ef5825309b 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -29,9 +29,10 @@
 namespace Chewy {
 namespace Rooms {
 
-uint8 kristall_spr[3][3] = { {14, 20, 13},
-	{20, 13, 14},
-	{13, 14, 20},
+static const uint8 KRISTALL_SPR[3][3] = {
+	{ 14, 20, 13 },
+	{ 20, 13, 14 },
+	{ 13, 14, 20 },
 };
 
 void Room24::entry() {
@@ -53,7 +54,7 @@ void Room24::entry() {
 	calc_hebel_spr();
 	calc_animation(255);
 	for (i = 0; i < 3; i++) {
-		if (kristall_spr[i][_G(spieler).R24Hebel[i]] == 20)
+		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
 			det->start_detail(5 + i * 4, 255, ANI_RUECK);
 	}
 }
@@ -127,7 +128,7 @@ void Room24::calc_animation(int16 kristall_nr) {
 	if (kristall_nr != 255) {
 		hide_cur();
 
-		if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
+		if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
 			if (_G(spieler).R24KristallLast[kristall_nr] == 13) {
 				ani_nr = 7;
 			} else {
@@ -143,7 +144,7 @@ void Room24::calc_animation(int16 kristall_nr) {
 
 		else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 
-			if (kristall_spr[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
+			if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
 				ani_nr = 7;
 			} else {
 				ani_nr = 8;
@@ -160,8 +161,8 @@ void Room24::calc_animation(int16 kristall_nr) {
 	for (i = 0; i < 6; i++)
 		det->hide_static_spr(13 + i);
 	for (i = 0; i < 3; i++) {
-		det->show_static_spr(kristall_spr[i][_G(spieler).R24Hebel[i]] + i * 2);
-		_G(spieler).R24KristallLast[i] = kristall_spr[i][_G(spieler).R24Hebel[i]];
+		det->show_static_spr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
+		_G(spieler).R24KristallLast[i] = KRISTALL_SPR[i][_G(spieler).R24Hebel[i]];
 	}
 }
 
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index cceb874a5fb..ff123b71444 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -43,12 +43,12 @@ namespace Rooms {
 #define SONDE_SPR_R 118
 #define SONDE_SPR_L 120
 
-static MovLine SONDE_MPKT[3] = {
+static const MovLine SONDE_MPKT[3] = {
 	{ {  13, 45,  75 }, 1, 2 },
 	{ { 237, 52, 160 }, 1, 2 },
 	{ {   4, 83, 180 }, 0, 2 }
 };
-static int16 SONDE_PHASEN[4][2] = {
+static const int16 SONDE_PHASEN[4][2] = {
 	{ 120, 120 },
 	{ 118, 118 },
 	{ 141, 141 },
@@ -130,7 +130,7 @@ void Room3::init_sonde() {
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = 1;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)SONDE_MPKT);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT);
 }
 
 void Room3::sonde_knarre() {
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 40db986518f..9f2582cdf0d 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -40,14 +40,15 @@ int16 Room4::sonde_comp() {
 	int16 spr_nr;
 	int16 cur_x;
 
-	int16 cur_pos[3][2] = { {  83, 106 },
-							{ 136, 103 },
-							{ 188, 101 }
+	static const int16 CUR_POS[3][2] = {
+		{  83, 106 },
+		{ 136, 103 },
+		{ 188, 101 }
 	};
-
-	int16 console[3][4] = { {  82, 158, 143, 199 },
-							{ 150, 159, 194, 193 },
-							{ 201, 154, 262, 193 }
+	static const int16 CONSOLE[3][4] = {
+		{  82, 158, 143, 199 },
+		{ 150, 159, 194, 193 },
+		{ 201, 154, 262, 193 }
 	};
 
 	cur_2_inventory();
@@ -65,7 +66,7 @@ int16 Room4::sonde_comp() {
 	while (!ende) {
 		maus_action();
 		if (_G(maus_links_click)) {
-			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)console, 3)) {
+			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)CONSOLE, 3)) {
 			case 0:
 				if (cur_x > 0)
 					--cur_x;
@@ -93,8 +94,8 @@ int16 Room4::sonde_comp() {
 		spr_info[0].Image = room_blk.DetImage[spr_nr];
 
 		spr_info[0].ZEbene = 0;
-		spr_info[0].X = cur_pos[cur_x][0];
-		spr_info[0].Y = cur_pos[cur_x][1];
+		spr_info[0].X = CUR_POS[cur_x][0];
+		spr_info[0].Y = CUR_POS[cur_x][1];
 		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 			curani.ani_anf = HAND_CLICK;
 			curani.ani_end = HAND_CLICK;
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 25088c7d755..b858efae321 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -29,14 +29,14 @@
 namespace Chewy {
 namespace Rooms {
 
-static int16 R6_ROBO_PHASEN[4][2] = {
+static const int16 R6_ROBO_PHASEN[4][2] = {
 	{ 86, 86 },
 	{ 86, 86 },
 	{ 86, 86 },
 	{ 86, 86 }
 };
 
-static MovLine R6_ROBO_MPKT[3] = {
+static const MovLine R6_ROBO_MPKT[3] = {
 	{ { 168,  71, 180 }, 1,  1 },
 	{ { 180,  71, 100 }, 1,  2 },
 	{ {  60, 210, 110 }, 1, 16 }
@@ -75,8 +75,8 @@ void Room6::init_robo() {
 	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[ROBO_OBJ].Mode = 1;
-	init_auto_obj(ROBO_OBJ, &R6_ROBO_PHASEN[0][0], mov_phasen[ROBO_OBJ].Lines, (MovLine
-		*)R6_ROBO_MPKT);
+	init_auto_obj(ROBO_OBJ, &R6_ROBO_PHASEN[0][0], mov_phasen[ROBO_OBJ].Lines,
+		(const MovLine *)R6_ROBO_MPKT);
 }
 
 void Room6::bola_knopf() {
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 5f7f9c8d8ab..4df7e4a41b6 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -31,19 +31,19 @@ namespace Rooms {
 
 #define SURIMY_OBJ 0
 
-static int16 surimy_phasen[4][2] = {
+static const int16 SURIMY_PHASEN[4][2] = {
 	{ 91, 98 },
 	{ 91, 98 },
 	{ 91, 98 },
 	{ 91, 98 }
 };
 
-static MovLine surimy_mpkt[2] = {
+static const MovLine SURIMY_MPKT[2] = {
 	{ {  80, 170, 199 }, 2, 6 },
 	{ { 210, 162, 199 }, 2, 6 }
 };
 
-static MovLine surimy_mpkt1[2] = {
+static const MovLine SURIMY_MPKT1[2] = {
 	{ { 224, 158, 199 }, 2, 6 },
 	{ { 330, 162, 199 }, 2, 6 }
 };
@@ -99,8 +99,8 @@ void Room9::surimy_ani() {
 	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SURIMY_OBJ].Mode = 1;
-	init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-		*)surimy_mpkt);
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+		(const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
 	start_detail_frame(0, 1, ANI_VOR, 15);
 	det->start_detail(2, 1, ANI_VOR);
@@ -109,8 +109,8 @@ void Room9::surimy_ani() {
 	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
 	det->hide_static_spr(4);
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	init_auto_obj(SURIMY_OBJ, &surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-		*)surimy_mpkt1);
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+		(const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
 	det->del_taf_tbl(91, 8, 0);
 }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index ad6e884f722..25e8b405d21 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -537,10 +537,11 @@ void continue_auto_obj(int16 nr, int16 repeat) {
 	}
 }
 
-void init_auto_obj(int16 auto_nr, int16 *phasen, int16 lines, MovLine *mline) {
+void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLine *mline) {
 	int16 i;
 	int16 *tmp;
-	MovLine *tmp1, *tmp2;
+	MovLine *tmp1;
+	const MovLine *tmp2;
 	tmp2 = mline;
 	tmp = (int16 *)mov_phasen[auto_nr].Phase;
 	for (i = 0; i < 8; i++)


Commit: 4046eefed4e8b3cadb2f30ad7314dd941bc8f6e9
    https://github.com/scummvm/scummvm/commit/4046eefed4e8b3cadb2f30ad7314dd941bc8f6e9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Split episode2.cpp into separate room classes

Changed paths:
  A engines/chewy/rooms/room25.cpp
  A engines/chewy/rooms/room25.h
  A engines/chewy/rooms/room26.cpp
  A engines/chewy/rooms/room26.h
  A engines/chewy/rooms/room27.cpp
  A engines/chewy/rooms/room27.h
  A engines/chewy/rooms/room28.cpp
  A engines/chewy/rooms/room28.h
  A engines/chewy/rooms/room29.cpp
  A engines/chewy/rooms/room29.h
  A engines/chewy/rooms/room31.cpp
  A engines/chewy/rooms/room31.h
  A engines/chewy/rooms/room32.cpp
  A engines/chewy/rooms/room32.h
  A engines/chewy/rooms/room33.cpp
  A engines/chewy/rooms/room33.h
  A engines/chewy/rooms/room34.cpp
  A engines/chewy/rooms/room34.h
  A engines/chewy/rooms/room35.cpp
  A engines/chewy/rooms/room35.h
  A engines/chewy/rooms/room37.cpp
  A engines/chewy/rooms/room37.h
  A engines/chewy/rooms/room39.cpp
  A engines/chewy/rooms/room39.h
  A engines/chewy/rooms/room40.cpp
  A engines/chewy/rooms/room40.h
  A engines/chewy/rooms/room41.cpp
  A engines/chewy/rooms/room41.h
  A engines/chewy/rooms/room42.cpp
  A engines/chewy/rooms/room42.h
  A engines/chewy/rooms/room43.cpp
  A engines/chewy/rooms/room43.h
  A engines/chewy/rooms/room44.cpp
  A engines/chewy/rooms/room44.h
  A engines/chewy/rooms/roomdefs.cpp
    engines/chewy/episode2.cpp
    engines/chewy/episode2.h
    engines/chewy/menus.cpp
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/roomdefs.h
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
index 47dfab4802f..3eb14c9a552 100644
--- a/engines/chewy/episode2.cpp
+++ b/engines/chewy/episode2.cpp
@@ -40,2650 +40,4 @@ void calc_person_look() {
 	}
 }
 
-void r25_entry() {
-	if (!_G(spieler).R29Schlauch2) {
-		det->hide_static_spr(0);
-		det->hide_static_spr(1);
-	}
-	if (!_G(spieler).R25FirstEntry) {
-		hide_cur();
-		if (obj->check_inventar(TRANSLATOR_INV)) {
-			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
-			atds->set_ats_str(113, 0, ATS_DATEI);
-
-			obj->del_inventar(TRANSLATOR_INV, &room_blk);
-			_G(spieler).inv_cur = false;
-			menu_item = CUR_WALK;
-			_G(spieler).AkInvent = -1;
-			cursor_wahl(menu_item);
-			del_invent_slot(TRANSLATOR_INV);
-		}
-		_G(spieler).R25FirstEntry = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		flic_cut(FCUT_029, FLC_MODE);
-		fx_blend = BLEND_NONE;
-		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(64, -1);
-		show_cur();
-	} else if (_G(spieler).R25GleiterExit) {
-		set_person_pos(127, 122, P_CHEWY, P_LEFT);
-		if (_G(spieler).R25SurimyGo < 1) {
-			++_G(spieler).R25SurimyGo;
-		} else {
-			_G(spieler).R25GleiterExit = false;
-			r25_xit_gleiter();
-		}
-	}
-}
-
-int16 r25_gleiter_loesch() {
-	int16 action_flag = false;
-	if (!_G(spieler).R25GleiteLoesch && _G(spieler).R29Schlauch2) {
-		if (!_G(spieler).inv_cur) {
-			action_flag = true;
-			_G(spieler).R25GleiteLoesch = true;
-			auto_move(2, P_CHEWY);
-			flic_cut(FCUT_030, FLC_MODE);
-			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
-			atds->set_ats_str(219, 1, ATS_DATEI);
-			atds->set_ats_str(187, 1, ATS_DATEI);
-		}
-	} else if (_G(spieler).R25GleiteLoesch) {
-		if (is_cur_inventar(MILCH_LEER_INV)) {
-			action_flag = true;
-			auto_move(2, P_CHEWY);
-			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-			del_inventar(_G(spieler).AkInvent);
-			obj->add_inventar(MILCH_WAS_INV, &room_blk);
-			inventory_2_cur(MILCH_WAS_INV);
-			start_aad_wait(253, -1);
-		}
-	}
-	return action_flag;
-}
-
-int16 r25_use_gleiter() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
-		action_flag = true;
-		auto_move(3, P_CHEWY);
-		_G(spieler).R23GleiterExit = 25;
-		Room23::cockpit();
-	}
-	return action_flag;
-}
-
-#define SURIMY_OBJ 0
-int16 r25_surimy_phasen[4][2] = {
-	{ 56, 63 },
-	{ 0, 0 },
-	{ 0, 0 },
-	{ 0, 0 }
-};
-
-MovLine r25_surimy_mpkt[2] = {
-	{ { 100, 150, 150 }, 0, 6 },
-	{ { -20, 150, 150 }, 0, 6 }
-};
-
-void r25_xit_gleiter() {
-	if (!_G(spieler).R25SurimyLauf) {
-		_G(spieler).R25SurimyLauf = true;
-		det->load_taf_seq(56, 8, 0);
-		_G(auto_obj) = 1;
-		mov_phasen[SURIMY_OBJ].AtsText = 0;
-		mov_phasen[SURIMY_OBJ].Lines = 2;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-		auto_mov_obj[SURIMY_OBJ].Mode = 1;
-		init_auto_obj(SURIMY_OBJ, &r25_surimy_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-		              *)r25_surimy_mpkt);
-		fx_blend = BLEND1;
-		set_up_screen(DO_SETUP);
-		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(65, -1);
-		fx_blend = BLEND_NONE;
-		wait_auto_obj(SURIMY_OBJ);
-		_G(auto_obj) = 0;
-	}
-}
-
-void r26_entry() {
-	// TODO
-}
-
-
-void r27_entry() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		_G(timer_nr)[0] = room->set_timer(0, 5);
-		det->set_static_ani(0, -1);
-		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
-	} else
-		atds->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(spieler).PersonHide[P_HOWARD] = true;
-	_G(spieler).ScrollxStep = 2;
-}
-
-void r27_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	hide_cur();
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		if (eib_nr == 55) {
-			start_aad_wait(175, -1);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
-			start_detail_wait(2, 1, ANI_VOR);
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
-		} else if ((_G(spieler).R27HowardGed < 3) && (eib_nr != -1)) {
-			++_G(spieler).R27HowardGed;
-			start_aad_wait(174, -1);
-		}
-	}
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	show_cur();
-}
-
-void r27_get_surimy() {
-	obj->calc_all_static_detail();
-	auto_move(4, P_CHEWY);
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		start_aad_wait(171, -1);
-	}
-	obj->hide_sib(SIB_SURIMY_R27);
-}
-
-void r27_talk_howard() {
-	auto_move(4, P_CHEWY);
-	start_aad_wait(173, -1);
-}
-
-void r27_howard_ged() {
-	if (_G(spieler).R27HowardGed < 3) {
-		++_G(spieler).R27HowardGed;
-	}
-}
-
-void r28_entry(int16 eib_nr) {
-	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).R28RKuerbis)
-		det->show_static_spr(6);
-	if (_G(spieler).R28Briefkasten) {
-		det->show_static_spr(8);
-		det->show_static_spr(9);
-	} else
-		det->show_static_spr(7);
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
-		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
-		hide_cur();
-		SetUpScreenFunc = r28setup_func;
-		if (_G(spieler).R40Wettbewerb) {
-
-			_G(spieler).scrollx = 320;
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			r28_haendler();
-			_G(spieler).R40Wettbewerb = false;
-		} else {
-			switch (eib_nr) {
-			case 55:
-				if (!_G(spieler).R28EntryHaus) {
-
-					_G(spieler).R28EntryHaus = true;
-					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
-					auto_move(3, P_HOWARD);
-					go_auto_xy(320, spieler_vector[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
-					start_aad_wait(176, -1);
-				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
-					_G(spieler).R28RKuerbis = true;
-					_G(spieler).ScrollxStep = 2;
-					auto_move(6, P_CHEWY);
-					wait_show_screen(10);
-					start_aad_wait(194, -1);
-					_G(spieler).room_e_obj[62].Attribut = 255;
-					atds->set_ats_str(208, 1, ATS_DATEI);
-					flags.NoScroll = true;
-					auto_scroll(0, 0);
-					flc->set_flic_user_function(r28_cut_serv);
-					flic_cut(FCUT_064, FLC_MODE);
-					flc->remove_flic_user_function();
-					det->show_static_spr(6);
-					flags.NoScroll = false;
-					if (!_G(spieler).R40TeilKarte) {
-						wait_show_screen(50);
-						start_aad_wait(195, -1);
-					} else {
-						r28_haendler();
-					}
-					_G(spieler).ScrollxStep = 1;
-				}
-				break;
-
-			case 70:
-			case 77:
-				if (_G(spieler).R28PostCar) {
-					_G(spieler).R28PostCar = false;
-					out->setze_zeiger(0);
-					out->cls();
-					flic_cut(FCUT_063, FLC_MODE);
-					_G(spieler).R28ChewyPump = false;
-					invent_2_slot(K_MASKE_INV);
-					atds->set_ats_str(209, 0, ATS_DATEI);
-					_G(spieler).room_e_obj[69].Attribut = 255;
-					load_chewy_taf(CHEWY_NORMAL);
-
-					set_person_pos(480, 118, P_HOWARD, P_LEFT);
-					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
-					fx_blend = BLEND_NONE;
-					flags.ExitMov = false;
-					spieler_mi[P_HOWARD].Mode = true;
-					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
-					spieler_mi[P_HOWARD].Mode = false;
-					set_person_pos(440, 146, P_CHEWY, P_LEFT);
-					start_aad_wait(193, -1);
-				} else {
-					set_person_pos(480, 100, P_HOWARD, P_LEFT);
-					go_auto_xy(420, 113, P_HOWARD, ANI_GO);
-					flags.ExitMov = false;
-					auto_move(6, P_CHEWY);
-				}
-				break;
-
-			}
-		}
-		show_cur();
-	}
-}
-
-void r28_exit(int16 eib_nr) {
-	_G(spieler).R28PostCar = false;
-	_G(spieler).ScrollxStep = 1;
-	hide_cur();
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
-		if (eib_nr == 69) {
-			SetUpScreenFunc = 0;
-			if (!_G(spieler).R28ExitTown) {
-				start_aad_wait(178, -1);
-				_G(spieler).R28ExitTown = true;
-			}
-			flags.ExitMov = false;
-			auto_move(6, P_HOWARD);
-			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
-		}
-	}
-	show_cur();
-}
-
-void r28_haendler() {
-	hide_cur();
-	SetUpScreenFunc = 0;
-	_G(spieler).R28ChewyPump = true;
-	del_inventar(K_MASKE_INV);
-	atds->set_ats_str(209, 1, ATS_DATEI);
-	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
-	load_chewy_taf(CHEWY_PUMPKIN);
-	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
-	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
-	det->set_static_ani(2, -1);
-	wait_show_screen(50);
-	start_aad_wait(196, -1);
-	det->del_static_ani(2);
-	det->set_static_ani(3, -1);
-	start_aad_wait(197, -1);
-	det->del_static_ani(3);
-	det->set_static_ani(4, -1);
-	start_aad_wait(198, -1);
-	SetUpScreenFunc = r28setup_func;
-	auto_move(4, P_CHEWY);
-	hide_cur();
-	auto_move(3, P_CHEWY);
-	set_person_spr(P_RIGHT, P_CHEWY);
-	det->del_static_ani(4);
-	wait_show_screen(28);
-	start_aad_wait(199, -1);
-	invent_2_slot(DOLLAR175_INV);
-}
-
-void r28setup_func() {
-	int16 x;
-	calc_person_look();
-	if (spieler_vector[P_CHEWY].Xypos[0] > 350)
-		x = 420;
-	else
-		x = 320;
-	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
-}
-
-void r28_use_surimy() {
-	int16 dia_nr;
-	int16 ani_nr;
-	if (!_G(spieler).R28SurimyCar) {
-		hide_cur();
-		flags.NoScroll = true;
-		auto_scroll(0, 0);
-		_G(spieler).R28SurimyCar = true;
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-		flc->set_flic_user_function(r28_cut_serv2);
-		flic_cut(FCUT_055, FLC_MODE);
-		flc->remove_flic_user_function();
-		flc->set_flic_user_function(r28_cut_serv);
-		flic_cut(FCUT_056, FLC_MODE);
-		flc->remove_flic_user_function();
-		ani_nr = CH_TALK3;
-		dia_nr = 140;
-		atds->set_ats_str(205, 1, ATS_DATEI);
-		atds->set_ats_str(222, 1, ATS_DATEI);
-	} else {
-		ani_nr = CH_TALK5;
-		dia_nr = 139;
-		obj->calc_rsi_flip_flop(SIB_AUTO_R28);
-	}
-	obj->calc_all_static_detail();
-	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-	start_aad_wait(dia_nr, -1);
-	flags.NoScroll = false;
-	show_cur();
-}
-
-void r28_set_pump() {
-	int16 tmp;
-	hide_cur();
-	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
-		if (!flags.AutoAniPlay) {
-			flags.AutoAniPlay = true;
-			if (spieler_vector[P_CHEWY].Xypos[0] < 380)
-				auto_move(5, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			if (person_end_phase[P_CHEWY] == P_RIGHT)
-				tmp = 1;
-			else
-				tmp = 0;
-			del_inventar(K_MASKE_INV);
-			det->
-			set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			if (_G(spieler).R28PumpTxt1 < 3) {
-				start_aad(137);
-				++_G(spieler).R28PumpTxt1;
-			}
-			start_detail_wait(tmp, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-
-			load_chewy_taf(CHEWY_PUMPKIN);
-			_G(spieler).R28ChewyPump = true;
-			if (_G(spieler).R39TransMensch) {
-				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
-			} else
-				atds->set_ats_str(209, 1, ATS_DATEI);
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
-				stop_person(P_HOWARD);
-				SetUpScreenFunc = 0;
-				start_aad_wait(177, -1);
-				SetUpScreenFunc = r28setup_func;
-				++_G(spieler).R28PumpTxt;
-			}
-			flags.AutoAniPlay = false;
-		}
-	} else {
-		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
-	}
-	show_cur();
-}
-
-void r28_get_pump() {
-	int16 tmp;
-	if (_G(spieler).R28ChewyPump) {
-		hide_cur();
-		stop_person(P_CHEWY);
-		_G(spieler).R28ChewyPump = false;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		if (person_end_phase[P_CHEWY] == P_RIGHT)
-			tmp = 1;
-		else
-			tmp = 0;
-		det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		start_detail_wait(tmp, 1, ANI_RUECK);
-		invent_2_slot(K_MASKE_INV);
-		atds->set_ats_str(209, 0, ATS_DATEI);
-		_G(spieler).room_e_obj[69].Attribut = 255;
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		load_chewy_taf(CHEWY_NORMAL);
-		if (_G(spieler).R28PumpTxt1 < 3) {
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(138, -1);
-		}
-		show_cur();
-	}
-}
-
-int16 r28_use_breifkasten() {
-	int16 action_flag = false;
-	if (_G(spieler).R28Briefkasten && !_G(spieler).inv_cur) {
-		action_flag = true;
-		hide_cur();
-		_G(spieler).R28Briefkasten = false;
-		auto_move(7, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		det->hide_static_spr(8);
-		det->hide_static_spr(9);
-		det->show_static_spr(7);
-		auto_move(8, P_CHEWY);
-		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		start_aad_wait(179, -1);
-		atds->set_ats_str(206, 0, ATS_DATEI);
-		show_cur();
-		invent_2_slot(MANUSKRIPT_INV);
-		_G(spieler).R28Manuskript = true;
-	}
-	return action_flag;
-}
-
-int16 r28_cut_serv(int16 frame) {
-	if (_G(spieler).R28Briefkasten) {
-		det->plot_static_details(0, 0, 8, 9);
-	} else {
-		det->plot_static_details(0, 0, 7, 7);
-	}
-	return 0;
-}
-
-int16 r28_cut_serv2(int16 frame) {
-	if (frame < 23) {
-		if (_G(spieler).R28Briefkasten) {
-			det->plot_static_details(0, 0, 8, 9);
-		} else {
-			det->plot_static_details(0, 0, 7, 7);
-		}
-	}
-	return 0;
-}
-
-void r29_entry() {
-	if (_G(spieler).R29Schlauch1)
-		det->show_static_spr(7);
-	else if (_G(spieler).R29Schlauch2) {
-		det->show_static_spr(8);
-		det->show_static_spr(10);
-	}
-	if (_G(spieler).R29AutoSitz)
-		det->show_static_spr(9);
-}
-
-void r29_exit() {
-	if (obj->check_inventar(PUMPE_INV)) {
-		del_inventar(PUMPE_INV);
-	}
-}
-
-int16 r29_use_pumpe() {
-	int16 action_flag = false;
-	if (!_G(spieler).R29Pumpe) {
-		action_flag = true;
-		if (is_cur_inventar(SCHLAUCH_INV)) {
-			_G(spieler).R29Pumpe = true;
-			_G(spieler).R29Schlauch1 = true;
-			auto_move(1, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			det->show_static_spr(7);
-			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
-			del_inventar(SCHLAUCH_INV);
-		} else if (!_G(spieler).inv_cur)
-			start_aad_wait(62, -1);
-	}
-	return action_flag;
-}
-
-int16 r29_get_schlauch() {
-	int16 action_flag = false;
-	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-		new_invent_2_cur(PUMPE_INV);
-	}
-	return action_flag;
-}
-
-bool r29_use_schlauch() {
-	bool result = false;
-
-	if (is_cur_inventar(PUMPE_INV)) {
-		result = true;
-		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-		det->hide_static_spr(7);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(4, 1, ANI_VOR);
-		det->show_static_spr(8);
-		det->show_static_spr(10);
-		atds->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(218, 1, ATS_DATEI);
-		_G(spieler).R29Schlauch1 = false;
-		_G(spieler).R29Schlauch2 = true;
-		del_inventar(PUMPE_INV);
-		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	}
-
-	return result;
-}
-
-void r29_schlitz_sitz() {
-	if (!_G(spieler).R29AutoSitz) {
-		_G(spieler).R29AutoSitz = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->hide_static_spr(4);
-		start_aad(63);
-		start_ani_block(4, ablock26);
-		det->show_static_spr(9);
-		while (flags.AdsDialog && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-		det->stop_detail(2);
-		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		kbinfo.scan_code = Common::KEYCODE_INVALID;
-	}
-}
-
-int16 r29_zaun_sprung() {
-	int16 action_flag = false;
-	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
-		action_flag = true;
-		auto_move(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(3, 1, ANI_VOR, 7);
-		det->hide_static_spr(9);
-		start_ani_block(5, ablock27);
-		set_up_screen(DO_SETUP);
-		switch_room(37);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	}
-	return action_flag;
-}
-
-#define SURIMY_OBJ 0
-int16 surimy_taf19_phasen[4][2] = {
-	{ 0, 0 },
-	{ 39, 46 },
-	{ 0, 0 },
-	{ 0, 0 }
-};
-
-MovLine r31_surimy_mpkt[2] = {
-	{ {  79, 152, 150 }, 1, 6 },
-	{ { 273, 220, 150 }, 1, 6 }
-};
-
-void r31_entry() {
-	r31_calc_luke();
-	r31_surimy_go();
-}
-
-void r31_surimy_go() {
-	if (!_G(spieler).R39ScriptOk) {
-		if (_G(spieler).R31SurimyGo >= 3) {
-			hide_cur();
-			_G(spieler).R31SurimyGo = 0;
-			det->load_taf_seq(39, 8, 0);
-			_G(auto_obj) = 1;
-			mov_phasen[SURIMY_OBJ].AtsText = 0;
-			mov_phasen[SURIMY_OBJ].Lines = 2;
-			mov_phasen[SURIMY_OBJ].Repeat = 1;
-			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = 1;
-			init_auto_obj(SURIMY_OBJ, &surimy_taf19_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			              *)r31_surimy_mpkt);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(157, -1);
-			wait_auto_obj(SURIMY_OBJ);
-			_G(auto_obj) = 0;
-			show_cur();
-		} else
-			++_G(spieler).R31SurimyGo;
-	}
-}
-
-void r31_calc_luke() {
-	int16 i;
-	if (!_G(spieler).R31KlappeZu) {
-		for (i = 0; i < 3; i++)
-			det->show_static_spr(5 + i);
-		atds->set_ats_str(244, 1, ATS_DATEI);
-		atds->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
-	} else {
-		for (i = 0; i < 3; i++)
-			det->hide_static_spr(5 + i);
-		atds->set_ats_str(244, 0, ATS_DATEI);
-		atds->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).room_e_obj[75].Attribut = 255;
-	}
-}
-
-void r31_open_luke() {
-	if (_G(spieler).R31KlappeZu) {
-		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R31KlappeZu = false;
-		r31_calc_luke();
-	}
-}
-
-void r31_close_luke() {
-	if (!_G(spieler).R31KlappeZu) {
-		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R31KlappeZu = true;
-		r31_calc_luke();
-	}
-}
-
-int16 r31_use_topf() {
-	int16 dia_nr = -1;
-	int16 ani_nr = 0;
-	int16 action_flag = false;
-
-	hide_cur();
-	if (_G(spieler).inv_cur) {
-		if (_G(spieler).R31PflanzeWeg) {
-			if (is_cur_inventar(K_KERNE_INV)) {
-				_G(spieler).R31KoernerDa = true;
-				auto_move(1, P_CHEWY);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
-				ani_nr = CH_TALK3;
-				dia_nr = 150;
-				atds->set_ats_str(242, 2, ATS_DATEI);
-			} else if (is_cur_inventar(MILCH_WAS_INV)) {
-				if (_G(spieler).R31KoernerDa) {
-					_G(spieler).R31Wasser = true;
-					auto_move(1, P_CHEWY);
-					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_ani_block(3, ablock30);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					del_inventar(_G(spieler).AkInvent);
-					obj->add_inventar(MILCH_LEER_INV, &room_blk);
-					inventory_2_cur(MILCH_LEER_INV);
-					ani_nr = CH_TALK6;
-					dia_nr = 151;
-					atds->set_ats_str(242, 3, ATS_DATEI);
-				} else {
-					ani_nr = CH_TALK5;
-					dia_nr = 152;
-				}
-			} else if (is_cur_inventar(SURIMY_INV)) {
-				if (!_G(spieler).R31SurFurz) {
-					if (_G(spieler).R31Wasser) {
-						if (!_G(spieler).R28SurimyCar) {
-							ani_nr = CH_TALK5;
-							dia_nr = 180;
-						} else {
-							r31_close_luke();
-							auto_move(3, P_CHEWY);
-							flic_cut(FCUT_046, FLC_MODE);
-							_G(spieler).R31SurFurz = true;
-							ani_nr = CH_TALK6;
-							dia_nr = 156;
-							atds->set_ats_str(242, 4, ATS_DATEI);
-							cur_2_inventory();
-						}
-					} else {
-						ani_nr = CH_TALK5;
-						dia_nr = 155;
-					}
-				}
-			} else {
-				ani_nr = CH_TALK5;
-				dia_nr = 153;
-			}
-		} else {
-			ani_nr = CH_TALK5;
-			dia_nr = 154;
-		}
-	}
-	if (dia_nr != -1) {
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
-		action_flag = true;
-	}
-	show_cur();
-	return action_flag;
-}
-
-void r32_entry() {
-	if (_G(spieler).R32HowardWeg)
-		det->hide_static_spr(0);
-	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
-		det->show_static_spr(5);
-	}
-}
-
-int16 r32_use_howard() {
-	int16 dia_nr = 0;
-	int16 ani_nr = 0;
-	int16 action_flag = false;
-	hide_cur();
-	if (is_cur_inventar(TRICHTER_INV)) {
-		if (_G(spieler).R33MunterGet) {
-			auto_move(1, P_CHEWY);
-			cur_2_inventory();
-			obj->del_inventar(MUNTER_INV, &room_blk);
-			del_invent_slot(MUNTER_INV);
-			flic_cut(FCUT_043, FLC_MODE);
-			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
-			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(75, -1);
-			wait_show_screen(5);
-			auto_move(5, P_CHEWY);
-			wait_show_screen(10);
-			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(125, -1);
-			wait_show_screen(10);
-			det->hide_static_spr(0);
-			start_detail_frame(0, 1, ANI_VOR, 9);
-			start_detail_wait(1, 1, ANI_RUECK);
-			det->show_static_spr(7);
-			det->show_static_spr(6);
-			wait_show_screen(20);
-			det->hide_static_spr(7);
-			start_detail_wait(1, 1, ANI_VOR);
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			ani_nr = CH_TALK3;
-			dia_nr = 164;
-			_G(spieler).R32HowardWeg = true;
-			_G(spieler).R39HowardDa = true;
-		} else {
-			ani_nr = CH_TALK12;
-			dia_nr = 73;
-		}
-	} else if (is_cur_inventar(MUNTER_INV)) {
-		ani_nr = CH_TALK12;
-		dia_nr = 74;
-	}
-	if (dia_nr) {
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
-		action_flag = true;
-	}
-	show_cur();
-	return action_flag;
-}
-
-void r32_use_schreibmaschine() {
-	int16 dia_nr = -1;
-	int16 ani_nr = -1;
-
-	hide_cur();
-	if (_G(spieler).R32HowardWeg) {
-		if (_G(spieler).inv_cur) {
-			switch (_G(spieler).AkInvent) {
-			case PAPIER_INV:
-				auto_move(2, P_CHEWY);
-				_G(spieler).R32PapierOk = true;
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
-				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
-				ani_nr = CH_TALK3;
-				dia_nr = 86;
-				break;
-
-			case CYB_KRONE_INV:
-				if (!_G(spieler).R32UseSchreib) {
-					if (!_G(spieler).R32PapierOk) {
-						ani_nr = CH_TALK12;
-						dia_nr = 87;
-					} else {
-						auto_move(3, P_CHEWY);
-						_G(spieler).R32UseSchreib = true;
-						cur_2_inventory();
-						flic_cut(FCUT_044, FLC_MODE);
-						det->show_static_spr(5);
-						atds->set_ats_str(203, 1, ATS_DATEI);
-						ani_nr = CH_TALK3;
-						dia_nr = 88;
-						atds->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATEI);
-					}
-				}
-				break;
-
-			default:
-				ani_nr = CH_TALK12;
-				dia_nr = 90;
-				break;
-
-			}
-		} else {
-			ani_nr = CH_TALK12;
-			dia_nr = 89;
-		}
-	} else {
-		ani_nr = CH_TALK12;
-		dia_nr = 92;
-	}
-	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-	start_aad_wait(dia_nr, -1);
-	show_cur();
-}
-
-int16 r32_get_script() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
-			action_flag = true;
-			_G(spieler).R32Script = true;
-			auto_move(4, P_CHEWY);
-			invent_2_slot(MANUSKRIPT_INV);
-			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
-			det->hide_static_spr(5);
-			atds->set_ats_str(203, 0, ATS_DATEI);
-			start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
-			start_aad_wait(91, -1);
-		}
-	}
-	return action_flag;
-}
-
-void r33_entry() {
-	if (_G(spieler).R33MunterGet)
-		det->hide_static_spr(3);
-	r33_surimy_go();
-}
-
-MovLine r33_surimy_mpkt[2] = {
-	{ {  65, 115, 150 }, 1, 6 },
-	{ { 300, 151, 150 }, 1, 6 }
-};
-
-void r33_surimy_go() {
-	if (!_G(spieler).R39ScriptOk) {
-		if (_G(spieler).R33SurimyGo >= 4) {
-			hide_cur();
-			_G(spieler).R33SurimyGo = 0;
-			det->load_taf_seq(39, 8, 0);
-			_G(auto_obj) = 1;
-			mov_phasen[SURIMY_OBJ].AtsText = 0;
-			mov_phasen[SURIMY_OBJ].Lines = 2;
-			mov_phasen[SURIMY_OBJ].Repeat = 1;
-			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = 1;
-			init_auto_obj(SURIMY_OBJ, &surimy_taf19_phasen[0][0], mov_phasen[SURIMY_OBJ].Lines, (MovLine
-			              *)r33_surimy_mpkt);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(158, -1);
-			wait_auto_obj(SURIMY_OBJ);
-			_G(auto_obj) = 0;
-			show_cur();
-		} else
-			++_G(spieler).R33SurimyGo;
-	}
-}
-
-void r33_look_schublade() {
-	if (!_G(spieler).R33SchubFirst) {
-		_G(spieler).R33SchubFirst = true;
-		auto_move(1, P_CHEWY);
-		atds->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
-		atds->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
-	}
-}
-
-int16 r33_use_schublade() {
-	int16 action_flag = false;
-	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur) {
-		if (!_G(spieler).R33Messer) {
-			action_flag = true;
-			_G(spieler).R33Messer = true;
-			atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
-			atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
-			atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
-			start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			invent_2_slot(MESSER_INV);
-		}
-	}
-	return action_flag;
-}
-
-void r33_use_maschine() {
-	int16 action;
-	int16 dia_nr;
-	int16 ani_nr;
-	int16 hocker;
-	action = true;
-	hocker = false;
-	hide_cur();
-	if (!_G(spieler).R33MunterOk) {
-		auto_move(4, P_CHEWY);
-		if (_G(spieler).inv_cur) {
-			switch (_G(spieler).AkInvent) {
-			case K_FLEISCH_INV:
-				_G(spieler).R33Munter[1] = true;
-				break;
-
-			case MILCH_INV:
-				_G(spieler).R33Munter[3] = true;
-				invent_2_slot(MILCH_LEER_INV);
-				break;
-
-			case KAFFEE_INV:
-				_G(spieler).R33Munter[0] = true;
-				break;
-
-			case EIER_INV:
-				_G(spieler).R33Munter[2] = true;
-				break;
-
-			default:
-				action = false;
-				break;
-
-			}
-			if (action) {
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(0, 1, ANI_VOR);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				set_person_pos(128, 65, P_CHEWY, P_LEFT);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				hocker = true;
-				del_inventar(_G(spieler).AkInvent);
-				ani_nr = CH_TALK12;
-				if (r33_calc_muntermacher()) {
-					_G(spieler).R33MunterOk = true;
-					dia_nr = 69;
-				} else {
-					dia_nr = 67;
-				}
-			} else {
-				ani_nr = CH_TALK4;
-				dia_nr = 68;
-			}
-		} else {
-			ani_nr = CH_TALK12;
-			dia_nr = 66;
-		}
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
-		if (_G(spieler).R33MunterOk) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(2, 1, ANI_VOR);
-			flic_cut(FCUT_031, FLC_MODE);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(71, -1);
-			atds->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
-		}
-		if (hocker) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(1, 1, ANI_VOR);
-			set_person_pos(64, 100, P_CHEWY, P_LEFT);
-		}
-		_G(spieler).PersonHide[P_CHEWY] = false;
-	} else {
-		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(70, -1);
-	}
-	show_cur();
-}
-
-int16 r33_calc_muntermacher() {
-	int16 ret;
-	int16 i;
-	ret = true;
-	for (i = 0; i < 4; i++) {
-		if (_G(spieler).R33Munter[i] == false)
-			ret = false;
-	}
-	return ret;
-}
-
-int16 r33_get_munter() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
-			action_flag = true;
-			_G(spieler).R33MunterGet = true;
-			auto_move(4, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			invent_2_slot(MUNTER_INV);
-			atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
-			det->hide_static_spr(3);
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(72, -1);
-		}
-	}
-	return action_flag;
-}
-
-bool r34_use_kuehlschrank() {
-	bool result = false;
-
-	if (!_G(spieler).inv_cur) {
-		result = true;
-
-		if (!flags.LoadGame) {
-			auto_move(3, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		}
-
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		flags.ChewyDontGo = true;
-		if (!flags.LoadGame) {
-			switch_room(34);
-		}
-		set_person_pos(160, 70, P_CHEWY, -1);
-	}
-
-	return result;
-}
-
-void r34_xit_kuehlschrank() {
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	set_person_pos(54, 111, P_CHEWY, -1);
-	switch_room(33);
-	flags.ChewyDontGo = false;
-	_G(maus_links_click) = false;
-}
-
-void r35_entry() {
-	if (_G(spieler).R35Schublade)
-		det->show_static_spr(1);
-}
-
-int16 r35_schublade() {
-	int16 action_flag = false;
-	hide_cur();
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R35Schublade) {
-			action_flag = true;
-			auto_move(3, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			det->show_static_spr(1);
-			_G(spieler).R35Schublade = true;
-			atds->set_ats_str(234, 1, ATS_DATEI);
-		} else if (!_G(spieler).R35Falle) {
-			action_flag = true;
-			auto_move(3, P_CHEWY);
-			_G(spieler).R35Falle = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock28);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(33, 90, P_CHEWY, P_LEFT);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(93, -1);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			atds->set_ats_str(234, 2, ATS_DATEI);
-		}
-	}
-	show_cur();
-	return action_flag;
-}
-
-int16 r35_use_cat() {
-	int16 action_flag = false;
-	hide_cur();
-	if (is_cur_inventar(TRANSLATOR_INV)) {
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		_G(spieler).R35TransCat = true;
-		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-		flic_cut(FCUT_045, FLC_MODE);
-		start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-		start_aad_wait(94, -1);
-	} else if (is_cur_inventar(PUTENKEULE_INV)) {
-		action_flag = true;
-		disable_timer();
-		auto_move(4, P_CHEWY);
-		_G(spieler).R35CatEat = true;
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		det->stop_detail(0);
-		det->del_static_ani(0);
-		start_detail_wait(1, 1, ANI_VOR);
-		det->start_detail(2, 1, ANI_VOR);
-		start_detail_wait(3, 1, ANI_VOR);
-		obj->show_sib(SIB_KNOCHEN_R35);
-		obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
-		det->show_static_spr(7);
-		atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
-		while (det->get_ani_status(2) && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-		det->set_static_ani(0, -1);
-		enable_timer();
-		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(95, -1);
-	}
-	show_cur();
-	return action_flag;
-}
-
-void r35_talk_cat() {
-	int16 dia_nr;
-	auto_move(4, P_CHEWY);
-	if (_G(spieler).R35TransCat) {
-		if (!_G(spieler).R35CatEat) {
-			dia_nr = 7;
-		} else {
-			dia_nr = 8;
-		}
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		switch_room(36);
-		start_ads_wait(dia_nr);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		switch_room(35);
-	} else {
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(96, -1);
-	}
-}
-
-void r37_entry() {
-	_G(zoom_horizont) = 100;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = r37_setup_func;
-	if (!flags.LoadGame) {
-		_G(spieler).scrollx = 124;
-		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
-	}
-	if (!_G(spieler).R37Kloppe) {
-		_G(timer_nr)[1] = room->set_timer(7, 5);
-		det->set_static_ani(7, -1);
-		if (!_G(spieler).R37HundScham) {
-			_G(timer_nr)[0] = room->set_timer(3, 4);
-			det->set_static_ani(3, -1);
-		}
-	}
-	if (_G(spieler).R37Gebiss) {
-		det->hide_static_spr(9);
-		if (_G(spieler).R37Kloppe) {
-			det->hide_static_spr(8);
-		} else if (_G(spieler).R37HundScham)
-			det->show_static_spr(0);
-	}
-}
-
-void r37_setup_func() {
-	if (_G(maus_links_click) &&
-	        !_G(spieler).R37Kloppe &&
-	        menu_item == CUR_WALK) {
-		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
-		        (minfo.x + _G(spieler).scrollx > 482)) {
-			auto_move(7, P_CHEWY);
-			_G(maus_links_click) = false;
-		}
-	}
-}
-
-short r37_use_wippe() {
-	int16 action_flag = false;
-	if (_G(spieler).inv_cur) {
-		action_flag = true;
-		if (is_cur_inventar(H_FUTTER_INV)) {
-			hide_cur();
-			auto_move(0, P_CHEWY);
-			flags.NoScroll = true;
-			auto_scroll(129, 0);
-			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(159, -1);
-			del_inventar(_G(spieler).AkInvent);
-			flc->set_flic_user_function(r37_cut_serv1);
-			flic_cut(FCUT_047, FLC_MODE);
-			flc->remove_flic_user_function();
-			flags.NoScroll = false;
-			show_cur();
-			_G(spieler).scrollx = 269;
-			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
-			switch_room(29);
-			_G(maus_links_click) = false;
-		} else {
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(160, -1);
-		}
-	}
-	return action_flag;
-}
-
-int16 r37_cut_serv1(int16 frame) {
-	int16 static_nr;
-	int16 static_nr1;
-	if (!_G(spieler).R37Kloppe) {
-		if (!_G(spieler).R37Gebiss) {
-			static_nr = 9;
-			static_nr1 = 11;
-			det->show_static_spr(11);
-		} else {
-			static_nr = 8;
-			static_nr1 = 0;
-		}
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
-	}
-
-	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
-	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
-	return 0;
-}
-
-int16 r37_cut_serv2(int16 frame) {
-	int16 static_nr[] = {7, 14, 12, 10};
-	short i;
-	det->show_static_spr(12);
-	det->show_static_spr(10);
-	for (i = 0; i < 4; i++)
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr[i], static_nr[i]);
-	return 0;
-}
-
-int16 r37_use_glas() {
-	int16 action_flag = false;
-	if (!_G(spieler).R37Gebiss) {
-		if (is_cur_inventar(ANGEL2_INV)) {
-			action_flag = true;
-			flags.NoScroll = true;
-			hide_cur();
-			auto_move(5, P_CHEWY);
-			flags.NoScroll = true;
-			auto_scroll(146, 0);
-			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(147, -1);
-			del_inventar(_G(spieler).AkInvent);
-			flc->set_flic_user_function(r37_cut_serv2);
-			flic_cut(FCUT_048, FLC_MODE);
-			flc->remove_flic_user_function();
-			flic_cut(FCUT_049, FLC_MODE);
-			invent_2_slot(GEBISS_INV);
-			det->hide_static_spr(9);
-			atds->set_ats_str(250, 1, ATS_DATEI);
-			atds->set_ats_str(256, 1, ATS_DATEI);
-			atds->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
-			obj->show_sib(SIB_HFUTTER2_R37);
-			_G(spieler).R37Gebiss = true;
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(146, -1);
-			show_cur();
-			flags.NoScroll = false;
-		} else {
-			auto_move(4, P_CHEWY);
-		}
-	}
-	return action_flag;
-}
-
-void r37_dog_bell() {
-	int16 dia_nr = -1;
-	int16 ani_nr = 0;
-
-	hide_cur();
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		if (!_G(spieler).R37Gebiss) {
-			stop_person(P_CHEWY);
-			flags.ChAutoMov = false;
-			set_person_spr(P_LEFT, P_CHEWY);
-			flags.NoScroll = true;
-			auto_scroll(178, 0);
-			disable_timer();
-			det->stop_detail(3);
-			det->del_static_ani(3);
-			start_detail_wait(5, 1, ANI_VOR);
-			det->hide_static_spr(9);
-			start_detail_wait(6, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->start_detail(11, 255, ANI_VOR);
-			flic_cut(FCUT_050, FLC_MODE);
-			start_detail_wait(6, 1, ANI_RUECK);
-			det->stop_detail(11);
-			set_person_pos(326, 85, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			det->show_static_spr(9);
-			start_ani_block(3, ablock31);
-			det->set_static_ani(3, -1);
-			enable_timer();
-			dia_nr = 149;
-			ani_nr = CH_TALK12;
-		} else if (!_G(spieler).R37HundScham) {
-			stop_person(P_CHEWY);
-			set_person_spr(P_LEFT, P_CHEWY);
-			flags.NoScroll = true;
-			auto_scroll(178, 0);
-			room->set_timer_status(3, TIMER_STOP);
-			det->del_static_ani(3);
-			det->stop_detail(3);
-			start_detail_wait(4, 1, ANI_VOR);
-			flic_cut(FCUT_051, FLC_MODE);
-			_G(spieler).scrollx = 104;
-			flic_cut(FCUT_054, FLC_MODE);
-			flic_cut(FCUT_054, FLC_MODE);
-			det->show_static_spr(0);
-			_G(spieler).R37HundScham = true;
-			dia_nr = 148;
-			ani_nr = CH_TALK6;
-		}
-		flags.AutoAniPlay = false;
-		if (dia_nr != -1) {
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(dia_nr, -1);
-		}
-	}
-	flags.NoScroll = false;
-	show_cur();
-}
-
-void r37_talk_hahn() {
-	auto_move(7, P_CHEWY);
-	if (!_G(spieler).R37TransHahn) {
-		start_aad_wait(145, -1);
-	} else {
-		r37_hahn_dia();
-	}
-}
-
-void r37_use_hahn() {
-	if (is_cur_inventar(TRANSLATOR_INV)) {
-		hide_cur();
-		auto_move(7, P_CHEWY);
-		_G(spieler).R37TransHahn = true;
-		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-		flic_cut(FCUT_052, FLC_MODE);
-		cur_2_inventory();
-		menu_item = CUR_TALK;
-		cursor_wahl(menu_item);
-		show_cur();
-		r37_hahn_dia();
-	} else if (_G(spieler).R37TransHahn) {
-		if (is_cur_inventar(GEBISS_INV)) {
-			_G(spieler).R37Kloppe = true;
-			hide_cur();
-			auto_move(6, P_CHEWY);
-			load_room_music(256);
-			room->set_timer_status(7, TIMER_STOP);
-			det->stop_detail(7);
-			det->del_static_ani(7);
-			det->start_detail(9, 1, ANI_VOR);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			del_inventar(GEBISS_INV);
-			flags.NoScroll = true;
-			auto_scroll(177, 0);
-			while (det->get_ani_status(9) && !SHOULD_QUIT) {
-				set_up_screen(DO_SETUP);
-			}
-			det->start_detail(4, 1, ANI_VOR);
-			det->hide_static_spr(0);
-			det->start_detail(10, 10, ANI_VOR);
-			auto_move(8, P_CHEWY);
-			flic_cut(FCUT_053, FLC_MODE);
-			det->stop_detail(10);
-			_G(spieler).scrollx = 320;
-			flags.NoScroll = false;
-			atds->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
-			det->hide_static_spr(8);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(141, -1);
-			obj->add_inventar(EIER_INV, &room_blk);
-			inventory_2_cur(EIER_INV);
-			show_cur();
-		}
-	} else if (_G(spieler).inv_cur) {
-		start_aad_wait(143, -1);
-	}
-}
-
-void r37_hahn_dia() {
-	int16 tmp_scrollx;
-	int16 tmp_scrolly;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	tmp_scrollx = _G(spieler).scrollx;
-	tmp_scrolly = _G(spieler).scrolly;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	switch_room(38);
-	start_ads_wait(9);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.LoadGame = true;
-	_G(spieler).scrollx = tmp_scrollx;
-	_G(spieler).scrolly = tmp_scrolly;
-	switch_room(37);
-	flags.LoadGame = false;
-}
-
-uint8 tv_flic[] = {
-	FCUT_039,
-	FCUT_040,
-	FCUT_035,
-	FCUT_032,
-	FCUT_037,
-	FCUT_034
-};
-
-void r39_entry() {
-	if (!_G(spieler).R41Einbruch) {
-		if (_G(spieler).R39HowardDa) {
-			det->show_static_spr(10);
-			if (!_G(spieler).R39HowardWach)
-				det->start_detail(1, 255, ANI_VOR);
-			else
-				det->set_static_ani(5, -1);
-			atds->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
-		}
-	} else
-		atds->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
-	r39_set_tv();
-}
-
-short r39_use_howard() {
-	int16 dia_nr = -1;
-	int16 ani_nr = 0;
-	int16 action_flag = false;
-
-	if (!_G(spieler).R39HowardWach) {
-		if (_G(spieler).inv_cur) {
-			if (is_cur_inventar(MANUSKRIPT_INV)) {
-				hide_cur();
-				_G(spieler).R39HowardWach = true;
-				_G(spieler).R39ScriptOk = true;
-				auto_move(3, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->start_detail(6, 255, ANI_VOR);
-				start_aad_wait(170, -1);
-				det->stop_detail(6);
-				start_detail_wait(7, 1, ANI_VOR);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				del_inventar(_G(spieler).AkInvent);
-				det->stop_detail(1);
-				start_ani_block(2, ablock33);
-				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
-				start_aad_wait(167, -1);
-				det->stop_detail(3);
-				start_detail_wait(4, 1, ANI_VOR);
-				det->set_static_ani(5, -1);
-				atds->set_ats_str(62, 1, ATS_DATEI);
-				start_aad_wait(169, -1);
-				show_cur();
-				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
-				_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
-				calc_person_dia(P_HOWARD);
-				if (_G(spieler).R41HowardDiaOK) {
-					r39_ok();
-				}
-				dia_nr = -1;
-			} else {
-				ani_nr = CH_TALK11;
-				dia_nr = 166;
-			}
-		} else {
-			ani_nr = CH_TALK5;
-			dia_nr = 165;
-		}
-		if (dia_nr != -1) {
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(dia_nr, -1);
-			action_flag = true;
-		}
-		show_cur();
-	}
-	return action_flag;
-}
-
-void r39_talk_howard() {
-	if (_G(spieler).R39HowardWach) {
-		auto_move(3, P_CHEWY);
-		_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
-		_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
-		calc_person_dia(P_HOWARD);
-		if (_G(spieler).R41HowardDiaOK) {
-			r39_ok();
-		}
-	} else {
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(168, -1);
-	}
-}
-
-void r39_ok() {
-	_G(spieler).R41Einbruch = true;
-
-	r43_night_small();
-	_G(spieler).PersonRoomNr[P_HOWARD] = 27;
-	obj->show_sib(SIB_SURIMY_R27);
-	obj->show_sib(SIB_ZEITUNG_R27);
-	obj->calc_rsi_flip_flop(SIB_SURIMY_R27);
-	obj->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
-	invent_2_slot(BRIEF_INV);
-	switch_room(27);
-	start_aad_wait(192, -1);
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
-}
-
-int16 r39_use_tv() {
-	int16 cls_flag;
-	int16 dia_nr = -1;
-	int16 ani_nr = -1;
-	int16 action_flag = false;
-
-	auto_move(2, P_CHEWY);
-	cls_flag = false;
-	hide_cur();
-	if (is_cur_inventar(ZAPPER_INV)) {
-		_G(spieler).R39TvOn = true;
-		if (_G(spieler).R39TvKanal >= 5)
-			_G(spieler).R39TvKanal = -1;
-		flags.NoPalAfterFlc = true;
-		out->setze_zeiger(0);
-		out->cls();
-		flic_cut(FCUT_042, FLC_MODE);
-		++_G(spieler).R39TvKanal;
-		flags.NoPalAfterFlc = true;
-		if (_G(spieler).R39TvKanal == 2)
-			flic_cut(FCUT_036, FLC_MODE);
-		else if (_G(spieler).R39TvKanal == 5)
-			flic_cut(FCUT_033, FLC_MODE);
-		r39_look_tv(0);
-		r39_set_tv();
-		cls_flag = true;
-		if (!_G(spieler).R39TransMensch) {
-			ani_nr = CH_TALK11;
-			dia_nr = 78;
-		} else {
-			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
-				dia_nr = 79;
-				ani_nr = -1;
-			} else {
-				dia_nr = 80 + _G(spieler).R39TvKanal;
-				ani_nr = -1;
-			}
-		}
-	} else if (is_cur_inventar(TRANSLATOR_INV)) {
-		if (_G(spieler).R39TvOn) {
-			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-			_G(spieler).R39TransMensch = true;
-			flags.NoPalAfterFlc = true;
-			flic_cut(FCUT_041, FLC_MODE);
-			_G(spieler).R39TvKanal = 0;
-			_G(spieler).R39ClintNews = 0;
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			flags.NoPalAfterFlc = true;
-			flic_cut(tv_flic[0], FLC_MODE);
-			out->cls();
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			r39_set_tv();
-			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(80, -1);
-
-			ani_nr = CH_TRANS;
-			dia_nr = 77;
-		} else {
-			ani_nr = CH_TALK11;
-			dia_nr = 76;
-		}
-		r39_set_tv();
-	} else if (is_cur_inventar(RECORDER_INV)) {
-		if (_G(spieler).R39TvOn) {
-			if (!_G(spieler).R39TransMensch) {
-				ani_nr = CH_TALK12;
-				dia_nr = 97;
-			} else {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-				start_aad_wait(98, -1);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_ani_block(2, ablock29);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				ani_nr = CH_TALK5;
-				dia_nr = 99;
-				atds->set_ats_str(CASSETTE_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
-				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
-			}
-		} else {
-			ani_nr = CH_TALK11;
-			dia_nr = 76;
-		}
-	}
-	if (cls_flag) {
-		out->cls();
-		out->setze_zeiger(0);
-		out->cls();
-		out->set_palette(pal);
-		flags.NoPalAfterFlc = false;
-	}
-	if (dia_nr != -1) {
-		if (ani_nr != -1)
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
-		action_flag = true;
-	}
-	show_cur();
-	return action_flag;
-}
-
-void r39_look_tv(int16 cls_mode) {
-	int16 flic_nr;
-	int16 dia_nr;
-	if (_G(spieler).R39TvOn) {
-		if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
-			flic_nr = FCUT_038;
-			++_G(spieler).R39ClintNews;
-			dia_nr = 79;
-		} else {
-			flic_nr = tv_flic[_G(spieler).R39TvKanal];
-			if (!_G(spieler).R39TvKanal)
-				_G(spieler).R39ClintNews = 0;
-			dia_nr = 80 + _G(spieler).R39TvKanal;
-		}
-		if (cls_mode) {
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			flags.NoPalAfterFlc = true;
-		}
-		flic_cut(flic_nr, FLC_MODE);
-		if (cls_mode) {
-			out->cls();
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			flags.NoPalAfterFlc = false;
-			if (_G(spieler).R39TransMensch)
-				start_aad_wait(dia_nr, -1);
-		}
-	}
-}
-
-void r39_set_tv() {
-	int16 i;
-	for (i = 0; i < 6; i++)
-		det->hide_static_spr(i + 4);
-	if (_G(spieler).R39TvOn) {
-		if (_G(spieler).R39TvKanal == 2)
-			det->start_detail(0, 255, ANI_VOR);
-		else {
-			det->stop_detail(0);
-			det->show_static_spr(_G(spieler).R39TvKanal + 4);
-		}
-		if (_G(spieler).R39TransMensch) {
-			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
-		} else {
-			atds->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
-		}
-	}
-}
-
-void r40_entry(int16 eib_nr) {
-
-	_G(zoom_horizont) = 130;
-	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).R40Geld) {
-		det->del_static_ani(6);
-		room->set_timer_status(6, TIMER_STOP);
-	}
-	if (_G(spieler).R40HaendlerOk) {
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
-	}
-	if (_G(spieler).R40PoliceWeg == false) {
-		_G(timer_nr)[0] = room->set_timer(255, 10);
-		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
-	} else {
-		det->hide_static_spr(15);
-	}
-	_G(spieler).R40PoliceAniStatus = 255;
-	_G(spieler).R40PoliceStart = 0;
-	spieler_mi[P_HOWARD].Mode = true;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
-		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
-		if (!flags.LoadGame) {
-			switch (eib_nr) {
-			case 69:
-				set_person_pos(30, 105, P_HOWARD, P_RIGHT);
-				go_auto_xy(158, 99, P_HOWARD, ANI_GO);
-				break;
-
-			case 73:
-			case 74:
-			case 87:
-				set_person_pos(158, 93, P_HOWARD, P_LEFT);
-				break;
-
-			}
-		}
-	}
-	SetUpScreenFunc = r40_setup_func;
-	if (_G(spieler).R40TrainMove)
-		r40_move_train(0);
-}
-
-void r40_exit(int16 eib_nr) {
-	hide_cur();
-	_G(spieler).ScrollxStep = 1;
-	_G(spieler).R40PoliceAb = false;
-	stop_spz();
-	SetUpScreenFunc = 0;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
-		if (eib_nr == 70 || eib_nr == 77) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-		} else if (eib_nr == 72) {
-			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-			        _G(spieler).R42BriefOk && _G(spieler).R28Manuskript) ||
-			        (_G(spieler).R40TrainOk)) {
-				_G(spieler).R40TrainOk = true;
-				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
-				_G(spieler).room_e_obj[72].Exit = 45;
-				obj->hide_sib(SIB_MUENZE_R40);
-				uhr->disable_timer();
-				out->ausblenden(0);
-				hide_person();
-
-				set_up_screen(DO_SETUP);
-				out->einblenden(pal, 0);
-				uhr->enable_timer();
-				_G(maus_links_click) = false;
-				start_aad_wait(238, -1);
-				r40_move_train(1);
-				flags.NoPalAfterFlc = true;
-				flic_cut(FCUT_073, FLC_MODE);
-				show_person();
-			} else
-				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
-		}
-	}
-	spieler_mi[P_HOWARD].Mode = false;
-	show_cur();
-}
-
-#define SPEED 3
-void r40_move_train(int16 mode) {
-	int16 lx, ax;
-	int16 delay;
-	_G(spieler).R40TrainMove = false;
-	hide_cur();
-	auto_move(9, P_CHEWY);
-	flags.NoScroll = true;
-	auto_scroll(232, 0);
-	if (!mode)
-		start_aad_wait(206, -1);
-	lx = -40;
-	ax = lx - 190;
-	det->start_detail(7, 20, ANI_VOR);
-	det->show_static_spr(11);
-	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-		det->show_static_spr(12);
-	delay = 0;
-	while (ax < 560) {
-		det->set_detail_pos(7, lx, 46);
-		det->set_static_pos(11, ax, 62, false, false);
-		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-			det->set_static_pos(12, ax, 62, false, true);
-		if (!delay) {
-			lx += SPEED;
-			ax += SPEED;
-			delay = _G(spieler).DelaySpeed / 2;
-		} else
-			--delay;
-		set_up_screen(DO_SETUP);
-	}
-	det->stop_detail(7);
-	det->hide_static_spr(11);
-	det->hide_static_spr(12);
-	if (!mode)
-		start_aad_wait(207, -1);
-	if (!mode)
-		auto_scroll(180, 0);
-	flags.NoScroll = false;
-	show_cur();
-}
-
-#define POLICE_LEFT 8
-#define POLICE_OFFEN 9
-#define POLICE_WUERG 10
-#define POLICE_RIGHT 11
-#define POLICE_FLASCHE 16
-
-void r40_setup_func() {
-	int16 x, y;
-	int16 sp_x;
-
-	if (!_G(spieler).R40HoUse && _G(spieler).PersonRoomNr[P_HOWARD] == 40) {
-		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = spieler_vector[P_HOWARD].Xypos[1];
-		sp_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (sp_x > 170 && sp_x < 255) {
-			x = 248;
-			y = 97;
-		} else if (sp_x > 255 && sp_x < 350) {
-			x = 310;
-			y = 90;
-		} else if (sp_x > 350) {
-			x = 428;
-			y = 90;
-		} else if (sp_x < 170) {
-			x = 165;
-			y = 99;
-		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-
-	if (_G(spieler).R40PoliceWeg == false) {
-		if (_G(spieler).R40PoliceStart) {
-			_G(spieler).R40PoliceStart = false;
-			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
-			room->set_timer_status(255, TIMER_STOP);
-			det->hide_static_spr(15);
-			det->start_detail(POLICE_LEFT, 1, ANI_VOR);
-			atds->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
-		}
-		switch (_G(spieler).R40PoliceAniStatus) {
-		case POLICE_LEFT:
-			if (det->get_ani_status(POLICE_LEFT) == false) {
-				det->start_detail(POLICE_OFFEN, 1, ANI_VOR);
-				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
-			}
-			break;
-
-		case POLICE_OFFEN:
-			if (det->get_ani_status(POLICE_OFFEN) == false) {
-				det->show_static_spr(0);
-				det->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
-				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
-			}
-			break;
-
-		case POLICE_FLASCHE:
-			if (det->get_ani_status(POLICE_FLASCHE) == false) {
-				det->hide_static_spr(0);
-				if (_G(spieler).R40DuengerTele) {
-					hide_cur();
-					_G(spieler).R40PoliceWeg = true;
-					det->start_detail(17, 255, ANI_VOR);
-					start_aad_wait(226, -1);
-					det->stop_detail(17);
-					_G(spieler).R40HoUse = true;
-					person_end_phase[P_CHEWY] = P_RIGHT;
-					start_detail_wait(10, 1, ANI_VOR);
-					person_end_phase[P_HOWARD] = P_RIGHT;
-					start_aad_wait(224, -1);
-					_G(spieler).R40PoliceWeg = true;
-					show_cur();
-					flags.MausLinks = false;
-					flags.MainInput = true;
-					_G(spieler).R40HoUse = false;
-					atds->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
-				} else {
-					det->start_detail(POLICE_RIGHT, 1, ANI_VOR);
-					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
-				}
-			}
-			break;
-
-		case POLICE_RIGHT:
-			if (det->get_ani_status(POLICE_RIGHT) == false) {
-				det->show_static_spr(15);
-				_G(spieler).R40PoliceAniStatus = 255;
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], 0);
-				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
-			}
-			break;
-
-		}
-	}
-}
-
-int16 r40_use_mr_pumpkin() {
-	int16 action_ret = false;
-	hide_cur();
-	if (_G(spieler).inv_cur) {
-		switch (_G(spieler).AkInvent) {
-		case CENT_INV:
-			action_ret = true;
-			auto_move(5, P_CHEWY);
-			del_inventar(_G(spieler).AkInvent);
-			start_detail_wait(15, 1, ANI_VOR);
-			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(200, -1);
-			break;
-
-		case CASSETTE_INV:
-			if (_G(spieler).R39TvRecord == 6) {
-				action_ret = true;
-				if (_G(spieler).R40PoliceWeg == false)
-					r40_use_schalter(227);
-				else {
-					hide_cur();
-					auto_move(8, P_CHEWY);
-					start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-					del_inventar(_G(spieler).AkInvent);
-					out->ausblenden(1);
-					r43_catch_pg();
-					del_invent_slot(LIKOER_INV);
-					obj->add_inventar(LIKOER2_INV, &room_blk);
-					inventory_2_cur(LIKOER2_INV);
-					switch_room(40);
-					start_aad_wait(236, -1);
-				}
-			} else
-				start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
-			break;
-
-		}
-	}
-	show_cur();
-
-	return action_ret;
-}
-
-int16 r40_use_schalter(int16 aad_nr) {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R40PoliceWeg == false) {
-			action_flag = true;
-			hide_cur();
-			auto_move(8, P_CHEWY);
-			if (_G(spieler).R40PoliceAniStatus != 255) {
-				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
-				start_aad_wait(204, -1);
-				while (_G(spieler).R40PoliceAniStatus != 255 && !SHOULD_QUIT)
-					set_up_screen(DO_SETUP);
-			}
-			room->set_timer_status(255, TIMER_STOP);
-			_G(spieler).R40PoliceStart = false;
-			stop_spz();
-			start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-			if (_G(spieler).R40PoliceAb) {
-				_G(spieler).R40PoliceAb = false;
-				stop_spz();
-				go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
-				_G(spieler).R40HoUse = false;
-			}
-			det->hide_static_spr(15);
-			start_detail_wait(12, 1, ANI_VOR);
-			det->set_static_ani(14, -1);
-			start_aad_wait(aad_nr, -1);
-			det->del_static_ani(14);
-			start_detail_wait(13, 1, ANI_VOR);
-			det->show_static_spr(15);
-			room->set_timer_status(255, TIMER_START);
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-			show_cur();
-		}
-	}
-	return action_flag;
-}
-
-void r40_talk_police() {
-	if (_G(spieler).R40PoliceWeg == false &&
-	        _G(spieler).R40PoliceAniStatus == 255) {
-		hide_cur();
-		_G(spieler).R40PoliceStart = false;
-		room->set_timer_status(255, TIMER_STOP);
-		auto_move(7, P_CHEWY);
-		start_aad_wait(203, -1);
-		room->set_timer_status(255, TIMER_START);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		show_cur();
-	}
-}
-
-void r40_talk_handler() {
-	if (!_G(spieler).R40HaendlerOk) {
-		hide_cur();
-		auto_move(6, P_CHEWY);
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
-		det->set_static_ani(3, -1);
-		start_aad_wait(202, -1);
-		det->set_static_ani(4, -1);
-		det->del_static_ani(3);
-		room->set_timer_status(4, TIMER_START);
-		show_cur();
-	}
-}
-
-int16 r40_use_haendler() {
-	int16 action_flag = false;
-	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
-		action_flag = true;
-		hide_cur();
-		invent_2_slot(DUENGER_INV);
-		_G(spieler).R40HoUse = true;
-		_G(spieler).R40HaendlerOk = true;
-		_G(spieler).R40TeilKarte = true;
-		_G(spieler).R40DuengerMit = true;
-		atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
-		auto_move(10, P_CHEWY);
-		auto_move(11, P_HOWARD);
-		start_aad_wait(208, -1);
-		auto_move(6, P_HOWARD);
-		flags.NoScroll = true;
-		auto_scroll(270, 0);
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
-		det->set_static_ani(3, -1);
-		start_aad_wait(209, -1);
-		det->del_static_ani(3);
-		det->set_static_ani(5, -1);
-		start_aad_wait(213, -1);
-		if (_G(spieler).R28RKuerbis) {
-			det->del_static_ani(5);
-			det->set_static_ani(3, -1);
-			start_aad_wait(211, -1);
-			out->ausblenden(0);
-			out->set_teilpalette(pal, 255, 1);
-			start_aad_wait(212, -1);
-			out->ausblenden(0);
-			_G(spieler).R40Wettbewerb = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-			flags.NoScroll = false;
-			out->setze_zeiger(0);
-			out->cls();
-			switch_room(28);
-			SetUpScreenFunc = r28setup_func;
-		} else {
-			auto_move(11, P_HOWARD);
-			start_aad_wait(210, -1);
-		}
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
-		show_cur();
-		flags.NoScroll = false;
-		_G(spieler).R40HoUse = false;
-		flags.MausLinks = false;
-	}
-	return action_flag;
-}
-
-int16 r40_use_bmeister() {
-	short action_flag = false;
-	if (menu_item == CUR_HOWARD) {
-		action_flag = true;
-		hide_cur();
-		_G(spieler).R40HoUse = true;
-		auto_move(9, P_CHEWY);
-		auto_move(11, P_HOWARD);
-		start_aad_wait(214, -1);
-		r40_bmeister_dia(215);
-		start_aad_wait(216, -1);
-		_G(spieler).R40HoUse = false;
-		flags.NoScroll = false;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
-		show_cur();
-	} else if (is_cur_inventar(LIKOER2_INV)) {
-		action_flag = true;
-		hide_cur();
-		_G(spieler).R40HoUse = true;
-		new_invent_2_cur(HOTEL_INV);
-
-		r40_bmeister_dia(237);
-
-		show_cur();
-	}
-	return action_flag;
-}
-
-void r40_bmeister_dia(int16 aad_nr) {
-	auto_move(7, P_CHEWY);
-	auto_move(12, P_HOWARD);
-	flags.NoScroll = true;
-	auto_scroll(206, 0);
-	det->del_static_ani(0);
-	room->set_timer_status(0, TIMER_STOP);
-	det->stop_detail(0);
-	start_detail_wait(1, 1, ANI_VOR);
-	det->set_static_ani(2, -1);
-	if (aad_nr == 237) {
-		start_aad_wait(aad_nr, -1);
-		flags.NoPalAfterFlc = true;
-		flic_cut(FCUT_062, FLC_MODE);
-		fx_blend = BLEND3;
-		start_aad_wait(375, -1);
-	} else
-		start_aad_wait(aad_nr, -1);
-	flags.NoPalAfterFlc = false;
-	room->set_timer_status(0, TIMER_START);
-	det->set_static_ani(0, -1);
-	det->del_static_ani(2);
-	auto_move(11, P_HOWARD);
-	auto_move(9, P_CHEWY);
-}
-
-bool r40_use_police() {
-	bool result = false;
-
-	if (menu_item == CUR_HOWARD) {
-		if (_G(spieler).R40PoliceWeg == false &&
-		        _G(spieler).R40PoliceAniStatus == 255) {
-			result = true;
-			_G(spieler).R40PoliceAb = true;
-			hide_cur();
-			_G(spieler).R40PoliceStart = false;
-			room->set_timer_status(255, TIMER_STOP);
-			_G(spieler).R40HoUse = true;
-			auto_move(9, P_CHEWY);
-			auto_move(11, P_HOWARD);
-			start_aad_wait(217, -1);
-			auto_move(8, P_CHEWY);
-			go_auto_xy(300, 120, P_HOWARD, ANI_WAIT);
-			person_end_phase[P_HOWARD] = P_RIGHT;
-			start_aad_wait(218, -1);
-			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-			menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
-			show_cur();
-			flags.MausLinks = false;
-		}
-	} else {
-		start_aad_wait(225, -1);
-	}
-
-	return result;
-}
-
-int16 r40_use_tele() {
-	int16 dia_nr = -1;
-	int16 dia_nr1 = -1;
-	int16 timer_wert;
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R40PoliceWeg == false) {
-			action_flag = true;
-			hide_cur();
-			if (!_G(spieler).R40PoliceAb) {
-				start_aad_wait(219, -1);
-				_G(spieler).R40HoUse = false;
-			} else {
-				auto_move(13, P_CHEWY);
-				det->show_static_spr(0);
-				if (!_G(spieler).R40DuengerMit) {
-					dia_nr = 220;
-					dia_nr1 = 222;
-				} else {
-					dia_nr = 221;
-					dia_nr1 = 223;
-				}
-				start_aad_wait(dia_nr, -1);
-				auto_move(11, P_HOWARD);
-				det->hide_static_spr(0);
-				auto_move(9, P_CHEWY);
-				start_aad_wait(dia_nr1, -1);
-				_G(spieler).R40HoUse = false;
-				timer_wert = 0;
-				if (dia_nr1 == 223) {
-					if (is_cur_inventar(DUENGER_INV)) {
-						del_inventar(_G(spieler).AkInvent);
-					} else {
-						obj->del_inventar(DUENGER_INV, &room_blk);
-						del_invent_slot(DUENGER_INV);
-					}
-					invent_2_slot(LIKOER_INV);
-					auto_move(1, P_CHEWY);
-					_G(spieler).R40DuengerMit = false;
-					_G(spieler).R40DuengerTele = true;
-					flags.MausLinks = true;
-					flags.MainInput = false;
-					timer_wert = 3;
-				}
-				_G(spieler).R40PoliceAb = false;
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
-			}
-			if (dia_nr1 != 223)
-				show_cur();
-		}
-	}
-	return action_flag;
-}
-
-void r41_entry() {
-	hide_cur();
-
-	if (!_G(spieler).R41LolaOk) {
-		if (!flags.LoadGame) {
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
-			start_ani_block(2, ablock32);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
-			start_aad_wait(127, -1);
-		} else
-			det->start_detail(6, 255, ANI_VOR);
-	}
-	if (_G(spieler).R41Einbruch) {
-		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(timer_nr)[0] = room->set_timer(7, 5);
-		det->set_static_ani(7, -1);
-		det->show_static_spr(6);
-		det->show_static_spr(7);
-	}
-	_G(spieler).PersonHide[P_HOWARD] = true;
-	show_cur();
-}
-
-void r41_exit() {
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
-	if (!_G(spieler).R41TrainCount) {
-		_G(spieler).R41TrainCount = 3;
-		_G(spieler).R40TrainMove = true;
-	}
-	--_G(spieler).R41TrainCount;
-}
-
-void r41_talk_hoggy1() {
-	r41_stop_hoggy();
-	auto_move(1, P_CHEWY);
-	if (!_G(spieler).R41FirstTalk) {
-		r41_first_talk();
-	} else if (!_G(spieler).R41Einbruch) {
-		show_cur();
-		start_ads_wait(11);
-
-	} else if (_G(spieler).R41Einbruch) {
-		if (!_G(spieler).R41BruchInfo) {
-			_G(spieler).R41BruchInfo = true;
-			start_aad_wait(132, -1);
-			start_aad_wait(128, -1);
-		} else if (_G(spieler).R31SurFurz &&
-		         !_G(spieler).R41KuerbisInfo) {
-			_G(spieler).R41KuerbisInfo = true;
-			start_aad_wait(131, -1);
-			auto_move(5, P_CHEWY);
-			new_invent_2_cur(TICKET_INV);
-		} else
-			start_aad_wait(130, -1);
-	} else
-		start_aad_wait(130, -1);
-	r41_start_hoggy();
-}
-
-void r41_talk_hoggy2() {
-	r41_stop_hoggy();
-	auto_move(2, P_CHEWY);
-	if (!_G(spieler).R41FirstTalk) {
-		r41_first_talk();
-	} else if (_G(spieler).R41BruchInfo) {
-		if (_G(spieler).R31SurFurz &&
-		        !_G(spieler).R41KuerbisInfo) {
-			_G(spieler).R41KuerbisInfo = true;
-			start_aad_wait(131, -1);
-			auto_move(5, P_CHEWY);
-
-			new_invent_2_cur(TICKET_INV);
-		} else
-			start_aad_wait(129, -1);
-	} else {
-		start_aad_wait(129, -1);
-	}
-	r41_start_hoggy();
-}
-
-void r41_first_talk() {
-	_G(spieler).R41FirstTalk = true;
-	start_aad_wait(134, -1);
-	atds->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
-	atds->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
-}
-
-void r41_start_hoggy() {
-	int16 i;
-	show_cur();
-	for (i = 0; i < 2; i++) {
-		room->set_timer_status(i, TIMER_START);
-		det->set_static_ani(i, -1);
-		det->del_static_ani(i + 3);
-	}
-}
-
-void r41_stop_hoggy() {
-	int16 i;
-	hide_cur();
-	for (i = 0; i < 2; i++) {
-		room->set_timer_status(i, TIMER_STOP);
-		det->del_static_ani(i);
-		det->stop_detail(i);
-		det->set_static_ani(i + 3, -1);
-	}
-}
-
-int16 r41_use_kasse() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		r41_stop_hoggy();
-		auto_move(1, P_CHEWY);
-		start_aad_wait(133, -1);
-		r41_start_hoggy();
-	}
-	return action_flag;
-}
-
-int16 r41_use_lola() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
-			hide_cur();
-			action_flag = true;
-			_G(spieler).R41LolaOk = true;
-			auto_move(4, P_CHEWY);
-			flic_cut(FCUT_057, FLC_MODE);
-			set_person_pos(127, 112, P_CHEWY, P_LEFT);
-			det->stop_detail(6);
-
-			atds->set_ats_str(267, 1, ATS_DATEI);
-			atds->hide_item(11, 0, 3);
-			show_cur();
-		}
-	}
-	return action_flag;
-}
-
-int16 r41_use_brief() {
-	int16 action_flag = false;
-	if (is_cur_inventar(BRIEF_INV)) {
-		action_flag = true;
-		r41_stop_hoggy();
-		auto_move(6, P_CHEWY);
-		start_aad_wait(126, -1);
-		r41_start_hoggy();
-	} else if (is_cur_inventar(BRIEF2_INV)) {
-		action_flag = true;
-		auto_move(6, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		r41_stop_hoggy();
-		start_aad_wait(186, -1);
-		r41_start_hoggy();
-		atds->set_ats_str(206, 1, ATS_DATEI);
-		_G(spieler).R28Briefkasten = true;
-		_G(spieler).R40TrainMove = true;
-		_G(spieler).R28PostCar = true;
-		_G(spieler).R42BriefOk = true;
-	}
-	return action_flag;
-}
-
-void r41_sub_dia() {
-	aad_wait(-1);
-	start_aad_wait(161, -1);
-	if (_G(spieler).R41LolaOk) {
-		start_aad_wait(163, -1);
-		atds->hide_item(11, 0, 2);
-		stop_ads_dialog();
-		auto_move(5, P_CHEWY);
-		new_invent_2_cur(PAPIER_INV);
-	} else {
-		start_aad_wait(162, -1);
-
-	}
-}
-
-void r42_entry() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		SetUpScreenFunc = r42setup_func;
-		if (!flags.LoadGame) {
-			det->stop_detail(0);
-			_G(timer_nr)[0] = room->set_timer(8, 5);
-			det->set_static_ani(8, -1);
-			_G(spieler).R42BeamterWach = true;
-			SetUpScreenFunc = r42setup_func;
-
-			set_person_pos(80, 43, P_HOWARD, P_LEFT);
-
-			atds->set_ats_str(263, 1, ATS_DATEI);
-			atds->set_ats_str(264, 1, ATS_DATEI);
-		}
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-		        !_G(spieler).R42BriefOk)
-			start_aad_wait(302, -1);
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-		        _G(spieler).R42BriefOk)
-			start_aad_wait(301, -1);
-	}
-}
-
-void r42setup_func() {
-	if (!_G(spieler).R42HoToBeamter)
-		calc_person_look();
-}
-
-void r42_calc_xit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		if (flags.ExitMov) {
-			atds->set_ats_str(264, 1, ATS_DATEI);
-			stop_spz();
-			_G(spieler).R42HoToBeamter = false;
-
-		}
-	}
-}
-
-void r42_get_kuerbis(int16 aad_nr) {
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_RUECK);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
-	start_aad_wait(aad_nr, -1);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_VOR);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	show_cur();
-}
-
-int16 r42_use_psack() {
-	int16 action_flag = false;
-	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
-		action_flag = true;
-		r42_get_kuerbis(136);
-	} else if (_G(spieler).R42HoToBeamter &&
-	           !_G(spieler).inv_cur &&
-	           !_G(spieler).R42MarkeOk) {
-
-		action_flag = true;
-		auto_move(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_aad_wait(187, -1);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(9, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		new_invent_2_cur(BMARKE_INV);
-		start_aad_wait(181, -1);
-		_G(spieler).R42MarkeOk = true;
-		auto_move(4, P_CHEWY);
-		start_aad_wait(185, -1);
-		_G(spieler).R42HoToBeamter = false;
-	} else if (is_cur_inventar(BRIEF2_INV)) {
-		action_flag = true;
-		auto_move(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		del_inventar(_G(spieler).AkInvent);
-		start_aad_wait(183, -1);
-		obj->calc_rsi_flip_flop(SIB_BKASTEN_R28);
-		atds->set_ats_str(206, 1, ATS_DATEI);
-		_G(spieler).R28Briefkasten = true;
-		_G(spieler).R40TrainMove = true;
-		_G(spieler).R28PostCar = true;
-		_G(spieler).R42BriefOk = true;
-	} else if (is_cur_inventar(BRIEF_INV)) {
-		action_flag = true;
-		start_aad_wait(182, -1);
-	}
-	return action_flag;
-}
-
-int16 r42_use_beamter() {
-	int16 action_flag = false;
-	if (menu_item == CUR_HOWARD) {
-		action_flag = true;
-		atds->set_ats_str(264, 2, ATS_DATEI);
-		hide_cur();
-		auto_move(4, P_CHEWY);
-		start_aad_wait(184, -1);
-		_G(spieler).R42HoToBeamter = true;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
-		show_cur();
-		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-		flags.MausLinks = false;
-	}
-	return action_flag;
-}
-
-void r42_talk_beamter() {
-	int16 dia_nr;
-	auto_move(1, P_CHEWY);
-	if (!_G(spieler).R42BeamterWach) {
-		dia_nr = 10;
-	} else if (!_G(spieler).R42MarkeOk) {
-		dia_nr = 13;
-	} else {
-		dia_nr = 14;
-	}
-	start_ads_wait(dia_nr);
-}
-
-void r42_dia_beamter(int16 str_end_nr) {
-	hide_cur();
-	if (str_end_nr != 4) {
-		while (atds->aad_get_status() != -1 && !SHOULD_QUIT)
-			set_up_screen(DO_SETUP);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		flags.NoDiaBox = true;
-		switch (str_end_nr) {
-		case 1:
-			start_detail_wait(3, 4, ANI_VOR);
-			break;
-
-		case 2:
-			start_detail_wait(4, 4, ANI_VOR);
-			break;
-
-		case 3:
-			start_detail_wait(5, 2, ANI_VOR);
-			break;
-
-		}
-	} else {
-		while (atds->aad_get_status() < 2 && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-		det->stop_detail(0);
-		start_detail_wait(1, 1, ANI_VOR);
-		det->start_detail(2, 255, ANI_VOR);
-		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-		det->stop_detail(2);
-		det->start_detail(0, 255, ANI_VOR);
-	}
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->start_detail(6, 255, ANI_VOR);
-	start_aad_wait(135, -1);
-	det->stop_detail(6);
-	flags.NoDiaBox = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	show_cur();
-}
-
-void r43_night_small() {
-	int16 i;
-	hide_person();
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	switch_room(43);
-	ailsnd->stop_mod();
-	hide_cur();
-	flags.NoScroll = true;
-	_G(spieler).ScrollxStep = 1;
-	start_aad_wait(188, -1);
-	auto_scroll(320, 0);
-	start_aad_wait(189, -1);
-	auto_scroll(0, 0);
-	start_aad_wait(190, -1);
-	_G(spieler).ScrollxStep = 16;
-	auto_scroll(192, 0);
-	for (i = 0; i < 3; i++) {
-		if (i)
-			_G(spieler).ScrollxStep = 16 / i;
-		auto_scroll(128 + i * 16, 0);
-		auto_scroll(192, 0);
-	}
-	_G(spieler).scrollx = 194;
-	start_aad_wait(191, -1);
-	load_room_music(255);
-	flic_cut(FCUT_058, FLC_MODE);
-	flags.NoScroll = false;
-	_G(spieler).ScrollxStep = 1;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	show_cur();
-	show_person();
-}
-
-void r43_catch_pg() {
-	hide_person();
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	switch_room(43);
-	ailsnd->stop_mod();
-	hide_cur();
-	flags.NoScroll = true;
-	_G(spieler).ScrollxStep = 1;
-	start_aad_wait(234, -1);
-	auto_scroll(194, 0);
-	start_aad_wait(235, -1);
-	load_room_music(255);
-	_G(spieler).R43GetPgLady = true;
-	flic_cut(FCUT_058, FLC_MODE);
-	flags.NoScroll = false;
-	_G(spieler).ScrollxStep = 1;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	show_cur();
-	show_person();
-}
-
-void r44_look_news() {
-	int16 tmpsx, tmpsy;
-	int16 tmproom;
-	tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
-	tmpsx = _G(spieler).scrollx;
-	tmpsy = _G(spieler).scrolly;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	hide_person();
-	fx_blend = BLEND1;
-	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
-	start_aad_wait(172, -1);
-	_G(spieler).scrollx = tmpsx;
-	_G(spieler).scrolly = tmpsy;
-	switch_room(tmproom);
-
-	show_person();
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
index b6ee08f46a1..d79d61e4bd7 100644
--- a/engines/chewy/episode2.h
+++ b/engines/chewy/episode2.h
@@ -26,209 +26,6 @@ namespace Chewy {
 
 void switch_room(int16 nr);
 
-void r25_entry();
-
-int16 r25_gleiter_loesch();
-
-int16 r25_use_gleiter();
-
-void r25_xit_gleiter();
-
-void r26_entry();
-
-void r27_entry();
-
-void r27_get_surimy();
-
-void r27_talk_howard();
-
-void r27_exit(int16 eib_nr);
-
-void r28_entry(int16 eib_nr);
-
-void r28_use_surimy();
-
-void r28_set_pump();
-
-void r28_get_pump();
-
-void r28setup_func();
-
-void r28_exit(int16 eib_nr);
-
-int16 r28_use_breifkasten();
-
-void r28_haendler();
-
-int16 r28_cut_serv(int16 frame);
-
-int16 r28_cut_serv2(int16 frame);
-
-void r29_entry();
-
-void r29_exit();
-
-int16 r29_use_pumpe();
-
-int16 r29_get_schlauch();
-
-bool r29_use_schlauch();
-
-void r29_schlitz_sitz();
-
-int16 r29_zaun_sprung();
-
-void r31_entry();
-
-void r31_calc_luke();
-
-void r31_open_luke();
-
-void r31_close_luke();
-
-int16 r31_use_topf();
-
-void r31_surimy_go();
-
-void r32_entry();
-
-int16 r32_use_howard();
-
-void r32_use_schreibmaschine();
-
-int16 r32_get_script();
-
-void r33_entry();
-
-void r33_look_schublade();
-
-int16 r33_use_schublade();
-
-void r33_use_maschine();
-
-int16 r33_calc_muntermacher();
-
-short r33_get_munter();
-
-void r33_surimy_go();
-
-bool r34_use_kuehlschrank();
-
-void r34_xit_kuehlschrank();
-
-void r35_entry();
-
-int16 r35_schublade();
-
-int16 r35_use_cat();
-
-void r35_talk_cat();
-
-void r37_entry();
-
-int16 r37_use_wippe();
-
-int16 r37_cut_serv1(int16 frame);
-
-int16 r37_cut_serv2(int16 frame);
-
-void r37_dog_bell();
-
-int16 r37_use_glas();
-
-void r37_talk_hahn();
-
-void r37_use_hahn();
-
-void r37_hahn_dia();
-void r37_setup_func();
-
-int16 r39_use_tv();
-
-void r39_look_tv(int16 cls_mode);
-
-void r39_set_tv();
-
-void r39_entry();
-
-void r39_entry();
-
-int16 r39_use_howard();
-
-void r39_talk_howard();
-
-void r39_ok();
-
-void r40_entry(int16 eib_nr);
-
-void r40_exit(int16 eib_nr);
-
-int16 r40_use_mr_pumpkin();
-
-void r40_talk_handler();
-
-int16 r40_use_haendler();
-
-void r40_talk_police();
-
-int16 r40_use_schalter(int16 aad_nr);
-
-void r40_setup_func();
-
-void r40_move_train(int16 mode);
-
-int16 r40_use_bmeister();
-
-bool r40_use_police();
-
-int16 r40_use_tele();
-
-void r41_entry();
-
-void r41_exit();
-
-void r41_talk_hoggy1();
-
-void r41_talk_hoggy2();
-
-void r41_first_talk();
-
-int16 r41_use_kasse();
-
-void r41_start_hoggy();
-
-void r41_stop_hoggy();
-
-int16 r41_use_lola();
-
-int16 r41_use_brief();
-
-void r41_sub_dia();
-
-void r40_bmeister_dia(int16 aad_nr);
-
-void r42_entry();
-
-int16 r42_use_psack();
-
-void r42_talk_beamter();
-
-void r42_dia_beamter(int16 str_end_nr);
-
-void r42_calc_xit();
-
-int16 r42_use_beamter();
-
-void r42setup_func();
-
-void r42_get_kuerbis(int16 aad_nr);
-
-void r43_night_small();
-
-void r43_catch_pg();
-
-void r44_look_news();
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 4638ec3d029..5cfc7bd992e 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -23,10 +23,10 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/menus.h"
+#include "chewy/rooms/room44.h"
 
 namespace Chewy {
 
-void r44_look_news();
 void r58_look_cut_mag(int16 r_nr);
 
 static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
@@ -710,7 +710,7 @@ int16 calc_use_invent(int16 inv_nr) {
 	if (menu_item == CUR_LOOK) {
 		switch (inv_nr) {
 		case ZEITUNG_INV:
-			r44_look_news();
+			Rooms::Room44::look_news();
 			break;
 
 		case CUTMAG_INV:
@@ -727,8 +727,7 @@ int16 calc_use_invent(int16 inv_nr) {
 			break;
 
 		}
-	}
-	else if (menu_item == CUR_USE) {
+	} else if (menu_item == CUR_USE) {
 		switch (inv_nr) {
 		case GBUCH_INV:
 			ret = del_invent_slot(GBUCH_INV);
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 3f7a6e766b7..65cd68e1248 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -50,6 +50,7 @@ MODULE_OBJS = \
 	timer.o \
 	types.o \
 	video/cfo_decoder.o \
+	rooms/roomdefs.o \
 	rooms/room0.o \
 	rooms/room1.o \
 	rooms/room2.o \
@@ -72,7 +73,25 @@ MODULE_OBJS = \
 	rooms/room21.o \
 	rooms/room22.o \
 	rooms/room23.o \
-	rooms/room24.o
+	rooms/room24.o \
+	rooms/room25.o \
+	rooms/room26.o \
+	rooms/room27.o \
+	rooms/room28.o \
+	rooms/room29.o \
+	rooms/room30.o \
+	rooms/room31.o \
+	rooms/room32.o \
+	rooms/room33.o \
+	rooms/room34.o \
+	rooms/room35.o \
+	rooms/room37.o \
+	rooms/room39.o \
+	rooms/room40.o \
+	rooms/room41.o \
+	rooms/room42.o \
+	rooms/room43.o \
+	rooms/room44.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index bcaaf595617..8636a1d1602 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -356,12 +356,12 @@ void check_ged_action(int16 index) {
 
 		case 28:
 			if (!index)
-				r28_get_pump();
+				Room28::get_pump();
 			break;
 
 		case 37:
 			if (!index) {
-				r37_dog_bell();
+				Room37::dog_bell();
 			} else if (index == 1) {
 				if (_G(spieler).R37Kloppe && !_G(spieler).R37Mes) {
 					stop_person(P_CHEWY);
@@ -374,7 +374,7 @@ void check_ged_action(int16 index) {
 
 		case 42:
 			if (!index)
-				r42_calc_xit();
+				Room42::calc_xit();
 			break;
 
 		case 45:
@@ -607,6 +607,8 @@ void enter_room(int16 eib_nr) {
 	_G(cur_hide_flag) = false;
 
 #define ENTRY(NUM) case NUM: Room##NUM::entry(); break
+#define ENTRY_NR(NUM) case NUM: Room##NUM::entry(eib_nr); break
+
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	ENTRY(0);
 	ENTRY(2);
@@ -647,26 +649,26 @@ void enter_room(int16 eib_nr) {
 			det->play_sound(17, 0);
 		break;
 
-	case 25: r25_entry(); break;
-	case 26: r26_entry(); break;
-	case 27: r27_entry(); break;
-	case 28: r28_entry(eib_nr); break;
-	case 29: r29_entry(); break;
-	case 31: r31_entry(); break;
-	case 32: r32_entry(); break;
-	case 33: r33_entry(); break;
+	ENTRY(25);
+	ENTRY(26);
+	ENTRY(27);
+	ENTRY_NR(28);
+	ENTRY(29);
+	ENTRY(31);
+	ENTRY(32);
+	ENTRY(33);
 
 	case 34:
 		if (flags.LoadGame)
-			r34_use_kuehlschrank();
+			Room34::use_kuehlschrank();
 		break;
 
-	case 35: r35_entry(); break;
-	case 37: r37_entry(); break;
-	case 39: r39_entry(); break;
-	case 40: r40_entry(eib_nr); break;
-	case 41: r41_entry(); break;
-	case 42: r42_entry(); break;
+	ENTRY(35);
+	ENTRY(37);
+	ENTRY(39);
+	ENTRY_NR(40);
+	ENTRY(41);
+	ENTRY(42);
 	case 45: r45_entry(eib_nr); break;
 	case 46: r46_entry(eib_nr); break;
 	case 47: r47_entry(); break;
@@ -794,16 +796,16 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 24: Room24::xit(); break;
-	case 27: r27_exit(eib_nr); break;
-	case 28: r28_exit(eib_nr); break;
-	case 29: r29_exit(); break;
+	case 27: Room27::xit(eib_nr); break;
+	case 28: Room28::xit(eib_nr); break;
+	case 29: Room29::xit(); break;
 
 	case 34:
 		flags.ChewyDontGo = false;
 		break;
 
-	case 41: r41_exit(); break;
-	case 42: r42_calc_xit(); break;
+	case 41: Room41::xit(); break;
+	case 42: Room42::calc_xit(); break;
 
 	case 45: r45_exit(eib_nr); break;
 	case 46: r46_exit(); break;
@@ -1015,7 +1017,7 @@ void exit_room(int16 eib_nr) {
 	if (no_exit) {
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 		case 40:
-			r40_exit(eib_nr);
+			Room40::xit(eib_nr);
 			break;
 
 		case 42:
@@ -2059,7 +2061,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SURIMY_R27:
-		r27_get_surimy();
+		Room27::get_surimy();
 		break;
 
 	case SIB_MUENZE_R40:
@@ -2124,11 +2126,11 @@ void sib_event_inv(int16 sib_nr) {
 
 	switch (sib_nr) {
 	case SIB_TERMINAL_R5:
-		r28_use_surimy();
+		Room28::use_surimy();
 		break;
 
 	case SIB_TKNOPF1_R6:
-		r29_schlitz_sitz();
+		Room29::schlitz_sitz();
 		break;
 
 	case SIB_TKNOPF2_R6:
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
new file mode 100644
index 00000000000..9185fe9c6dd
--- /dev/null
+++ b/engines/chewy/rooms/room25.cpp
@@ -0,0 +1,148 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room23.h"
+#include "chewy/rooms/room25.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#undef SURIMY_OBJ
+#define SURIMY_OBJ 0
+
+static const int16 SURIMY_PHASEN[4][2] = {
+	{ 56, 63 },
+	{ 0, 0 },
+	{ 0, 0 },
+	{ 0, 0 }
+};
+
+static const MovLine SURIMY_MPKT[2] = {
+	{ { 100, 150, 150 }, 0, 6 },
+	{ { -20, 150, 150 }, 0, 6 }
+};
+
+void Room25::entry() {
+	if (!_G(spieler).R29Schlauch2) {
+		det->hide_static_spr(0);
+		det->hide_static_spr(1);
+	}
+	if (!_G(spieler).R25FirstEntry) {
+		hide_cur();
+		if (obj->check_inventar(TRANSLATOR_INV)) {
+			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
+			atds->set_ats_str(113, 0, ATS_DATEI);
+
+			obj->del_inventar(TRANSLATOR_INV, &room_blk);
+			_G(spieler).inv_cur = false;
+			menu_item = CUR_WALK;
+			_G(spieler).AkInvent = -1;
+			cursor_wahl(menu_item);
+			del_invent_slot(TRANSLATOR_INV);
+		}
+		_G(spieler).R25FirstEntry = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		flic_cut(FCUT_029, FLC_MODE);
+		fx_blend = BLEND_NONE;
+		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(64, -1);
+		show_cur();
+	} else if (_G(spieler).R25GleiterExit) {
+		set_person_pos(127, 122, P_CHEWY, P_LEFT);
+		if (_G(spieler).R25SurimyGo < 1) {
+			++_G(spieler).R25SurimyGo;
+		} else {
+			_G(spieler).R25GleiterExit = false;
+			xit_gleiter();
+		}
+	}
+}
+
+int16 Room25::gleiter_loesch() {
+	int16 action_flag = false;
+	if (!_G(spieler).R25GleiteLoesch && _G(spieler).R29Schlauch2) {
+		if (!_G(spieler).inv_cur) {
+			action_flag = true;
+			_G(spieler).R25GleiteLoesch = true;
+			auto_move(2, P_CHEWY);
+			flic_cut(FCUT_030, FLC_MODE);
+			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
+			atds->set_ats_str(219, 1, ATS_DATEI);
+			atds->set_ats_str(187, 1, ATS_DATEI);
+		}
+	} else if (_G(spieler).R25GleiteLoesch) {
+		if (is_cur_inventar(MILCH_LEER_INV)) {
+			action_flag = true;
+			auto_move(2, P_CHEWY);
+			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+			del_inventar(_G(spieler).AkInvent);
+			obj->add_inventar(MILCH_WAS_INV, &room_blk);
+			inventory_2_cur(MILCH_WAS_INV);
+			start_aad_wait(253, -1);
+		}
+	}
+	return action_flag;
+}
+
+int16 Room25::use_gleiter() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
+		action_flag = true;
+		auto_move(3, P_CHEWY);
+		_G(spieler).R23GleiterExit = 25;
+		Room23::cockpit();
+	}
+	return action_flag;
+}
+
+void Room25::xit_gleiter() {
+	if (!_G(spieler).R25SurimyLauf) {
+		_G(spieler).R25SurimyLauf = true;
+		det->load_taf_seq(56, 8, 0);
+		_G(auto_obj) = 1;
+		mov_phasen[SURIMY_OBJ].AtsText = 0;
+		mov_phasen[SURIMY_OBJ].Lines = 2;
+		mov_phasen[SURIMY_OBJ].Repeat = 1;
+		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
+		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
+		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+		auto_mov_obj[SURIMY_OBJ].Mode = 1;
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+			(const MovLine *)SURIMY_MPKT);
+		fx_blend = BLEND1;
+		set_up_screen(DO_SETUP);
+		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(65, -1);
+		fx_blend = BLEND_NONE;
+		wait_auto_obj(SURIMY_OBJ);
+		_G(auto_obj) = 0;
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room25.h b/engines/chewy/rooms/room25.h
new file mode 100644
index 00000000000..0b7c6a9b8b7
--- /dev/null
+++ b/engines/chewy/rooms/room25.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM25_H
+#define CHEWY_ROOMS_ROOM25_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room25 {
+private:
+	static void xit_gleiter();
+
+public:
+	static void entry();
+	static int16 gleiter_loesch();
+	static int16 use_gleiter();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room26.cpp b/engines/chewy/rooms/room26.cpp
new file mode 100644
index 00000000000..10f92ea760e
--- /dev/null
+++ b/engines/chewy/rooms/room26.cpp
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/room26.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room26::entry() {
+	if (_G(spieler).R25GleiteLoesch) {
+		det->disable_sound(0, 0);
+	} else {
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room26.h b/engines/chewy/rooms/room26.h
new file mode 100644
index 00000000000..a2936d09ce1
--- /dev/null
+++ b/engines/chewy/rooms/room26.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM26_H
+#define CHEWY_ROOMS_ROOM26_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room26 {
+public:
+	static void entry();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
new file mode 100644
index 00000000000..d382c2a42a2
--- /dev/null
+++ b/engines/chewy/rooms/room27.cpp
@@ -0,0 +1,83 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/room27.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room27::entry() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+		_G(timer_nr)[0] = room->set_timer(0, 5);
+		det->set_static_ani(0, -1);
+		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+	} else
+		atds->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler).ScrollxStep = 2;
+}
+
+void Room27::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	hide_cur();
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+		if (eib_nr == 55) {
+			start_aad_wait(175, -1);
+			room->set_timer_status(0, TIMER_STOP);
+			det->del_static_ani(0);
+			start_detail_wait(2, 1, ANI_VOR);
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
+		} else if ((_G(spieler).R27HowardGed < 3) && (eib_nr != -1)) {
+			++_G(spieler).R27HowardGed;
+			start_aad_wait(174, -1);
+		}
+	}
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	show_cur();
+}
+
+void Room27::get_surimy() {
+	obj->calc_all_static_detail();
+	auto_move(4, P_CHEWY);
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+		start_aad_wait(171, -1);
+	}
+	obj->hide_sib(SIB_SURIMY_R27);
+}
+
+void Room27::talk_howard() {
+	auto_move(4, P_CHEWY);
+	start_aad_wait(173, -1);
+}
+
+void Room27::howard_ged() {
+	if (_G(spieler).R27HowardGed < 3) {
+		++_G(spieler).R27HowardGed;
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room27.h b/engines/chewy/rooms/room27.h
new file mode 100644
index 00000000000..0aa572e2d42
--- /dev/null
+++ b/engines/chewy/rooms/room27.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM27_H
+#define CHEWY_ROOMS_ROOM27_H
+
+#include "chewy/room.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room27 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static void get_surimy();
+	static void talk_howard();
+	static void howard_ged();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
new file mode 100644
index 00000000000..fa373a3a142
--- /dev/null
+++ b/engines/chewy/rooms/room28.cpp
@@ -0,0 +1,328 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/room28.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room28::entry(int16 eib_nr) {
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R28RKuerbis)
+		det->show_static_spr(6);
+	if (_G(spieler).R28Briefkasten) {
+		det->show_static_spr(8);
+		det->show_static_spr(9);
+	} else
+		det->show_static_spr(7);
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
+		hide_cur();
+		SetUpScreenFunc = setup_func;
+		if (_G(spieler).R40Wettbewerb) {
+
+			_G(spieler).scrollx = 320;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			haendler();
+			_G(spieler).R40Wettbewerb = false;
+		} else {
+			switch (eib_nr) {
+			case 55:
+				if (!_G(spieler).R28EntryHaus) {
+
+					_G(spieler).R28EntryHaus = true;
+					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
+					auto_move(3, P_HOWARD);
+					go_auto_xy(320, spieler_vector[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
+					start_aad_wait(176, -1);
+				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
+					_G(spieler).R28RKuerbis = true;
+					_G(spieler).ScrollxStep = 2;
+					auto_move(6, P_CHEWY);
+					wait_show_screen(10);
+					start_aad_wait(194, -1);
+					_G(spieler).room_e_obj[62].Attribut = 255;
+					atds->set_ats_str(208, 1, ATS_DATEI);
+					flags.NoScroll = true;
+					auto_scroll(0, 0);
+					flc->set_flic_user_function(cut_serv);
+					flic_cut(FCUT_064, FLC_MODE);
+					flc->remove_flic_user_function();
+					det->show_static_spr(6);
+					flags.NoScroll = false;
+					if (!_G(spieler).R40TeilKarte) {
+						wait_show_screen(50);
+						start_aad_wait(195, -1);
+					} else {
+						haendler();
+					}
+					_G(spieler).ScrollxStep = 1;
+				}
+				break;
+
+			case 70:
+			case 77:
+				if (_G(spieler).R28PostCar) {
+					_G(spieler).R28PostCar = false;
+					out->setze_zeiger(0);
+					out->cls();
+					flic_cut(FCUT_063, FLC_MODE);
+					_G(spieler).R28ChewyPump = false;
+					invent_2_slot(K_MASKE_INV);
+					atds->set_ats_str(209, 0, ATS_DATEI);
+					_G(spieler).room_e_obj[69].Attribut = 255;
+					load_chewy_taf(CHEWY_NORMAL);
+
+					set_person_pos(480, 118, P_HOWARD, P_LEFT);
+					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
+					fx_blend = BLEND_NONE;
+					flags.ExitMov = false;
+					spieler_mi[P_HOWARD].Mode = true;
+					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
+					spieler_mi[P_HOWARD].Mode = false;
+					set_person_pos(440, 146, P_CHEWY, P_LEFT);
+					start_aad_wait(193, -1);
+				} else {
+					set_person_pos(480, 100, P_HOWARD, P_LEFT);
+					go_auto_xy(420, 113, P_HOWARD, ANI_GO);
+					flags.ExitMov = false;
+					auto_move(6, P_CHEWY);
+				}
+				break;
+
+			}
+		}
+		show_cur();
+	}
+}
+
+void Room28::xit(int16 eib_nr) {
+	_G(spieler).R28PostCar = false;
+	_G(spieler).ScrollxStep = 1;
+	hide_cur();
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
+		if (eib_nr == 69) {
+			SetUpScreenFunc = 0;
+			if (!_G(spieler).R28ExitTown) {
+				start_aad_wait(178, -1);
+				_G(spieler).R28ExitTown = true;
+			}
+			flags.ExitMov = false;
+			auto_move(6, P_HOWARD);
+			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+		}
+	}
+	show_cur();
+}
+
+void Room28::haendler() {
+	hide_cur();
+	SetUpScreenFunc = 0;
+	_G(spieler).R28ChewyPump = true;
+	del_inventar(K_MASKE_INV);
+	atds->set_ats_str(209, 1, ATS_DATEI);
+	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
+	load_chewy_taf(CHEWY_PUMPKIN);
+	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
+	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
+	det->set_static_ani(2, -1);
+	wait_show_screen(50);
+	start_aad_wait(196, -1);
+	det->del_static_ani(2);
+	det->set_static_ani(3, -1);
+	start_aad_wait(197, -1);
+	det->del_static_ani(3);
+	det->set_static_ani(4, -1);
+	start_aad_wait(198, -1);
+	SetUpScreenFunc = setup_func;
+	auto_move(4, P_CHEWY);
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	set_person_spr(P_RIGHT, P_CHEWY);
+	det->del_static_ani(4);
+	wait_show_screen(28);
+	start_aad_wait(199, -1);
+	invent_2_slot(DOLLAR175_INV);
+}
+
+void Room28::setup_func() {
+	int16 x;
+	calc_person_look();
+	if (spieler_vector[P_CHEWY].Xypos[0] > 350)
+		x = 420;
+	else
+		x = 320;
+	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
+}
+
+void Room28::use_surimy() {
+	int16 dia_nr;
+	int16 ani_nr;
+	if (!_G(spieler).R28SurimyCar) {
+		hide_cur();
+		flags.NoScroll = true;
+		auto_scroll(0, 0);
+		_G(spieler).R28SurimyCar = true;
+		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		flc->set_flic_user_function(cut_serv2);
+		flic_cut(FCUT_055, FLC_MODE);
+		flc->remove_flic_user_function();
+		flc->set_flic_user_function(cut_serv);
+		flic_cut(FCUT_056, FLC_MODE);
+		flc->remove_flic_user_function();
+		ani_nr = CH_TALK3;
+		dia_nr = 140;
+		atds->set_ats_str(205, 1, ATS_DATEI);
+		atds->set_ats_str(222, 1, ATS_DATEI);
+	} else {
+		ani_nr = CH_TALK5;
+		dia_nr = 139;
+		obj->calc_rsi_flip_flop(SIB_AUTO_R28);
+	}
+	obj->calc_all_static_detail();
+	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+	start_aad_wait(dia_nr, -1);
+	flags.NoScroll = false;
+	show_cur();
+}
+
+void Room28::set_pump() {
+	int16 tmp;
+	hide_cur();
+	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
+		if (!flags.AutoAniPlay) {
+			flags.AutoAniPlay = true;
+			if (spieler_vector[P_CHEWY].Xypos[0] < 380)
+				auto_move(5, P_CHEWY);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			if (person_end_phase[P_CHEWY] == P_RIGHT)
+				tmp = 1;
+			else
+				tmp = 0;
+			del_inventar(K_MASKE_INV);
+			det->
+				set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			if (_G(spieler).R28PumpTxt1 < 3) {
+				start_aad(137);
+				++_G(spieler).R28PumpTxt1;
+			}
+			start_detail_wait(tmp, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+
+			load_chewy_taf(CHEWY_PUMPKIN);
+			_G(spieler).R28ChewyPump = true;
+			if (_G(spieler).R39TransMensch) {
+				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
+			} else
+				atds->set_ats_str(209, 1, ATS_DATEI);
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
+				stop_person(P_HOWARD);
+				SetUpScreenFunc = 0;
+				start_aad_wait(177, -1);
+				SetUpScreenFunc = setup_func;
+				++_G(spieler).R28PumpTxt;
+			}
+			flags.AutoAniPlay = false;
+		}
+	} else {
+		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
+	}
+	show_cur();
+}
+
+void Room28::get_pump() {
+	int16 tmp;
+	if (_G(spieler).R28ChewyPump) {
+		hide_cur();
+		stop_person(P_CHEWY);
+		_G(spieler).R28ChewyPump = false;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		if (person_end_phase[P_CHEWY] == P_RIGHT)
+			tmp = 1;
+		else
+			tmp = 0;
+		det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		start_detail_wait(tmp, 1, ANI_RUECK);
+		invent_2_slot(K_MASKE_INV);
+		atds->set_ats_str(209, 0, ATS_DATEI);
+		_G(spieler).room_e_obj[69].Attribut = 255;
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		load_chewy_taf(CHEWY_NORMAL);
+		if (_G(spieler).R28PumpTxt1 < 3) {
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(138, -1);
+		}
+		show_cur();
+	}
+}
+
+int16 Room28::use_breifkasten() {
+	int16 action_flag = false;
+	if (_G(spieler).R28Briefkasten && !_G(spieler).inv_cur) {
+		action_flag = true;
+		hide_cur();
+		_G(spieler).R28Briefkasten = false;
+		auto_move(7, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		det->hide_static_spr(8);
+		det->hide_static_spr(9);
+		det->show_static_spr(7);
+		auto_move(8, P_CHEWY);
+		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_aad_wait(179, -1);
+		atds->set_ats_str(206, 0, ATS_DATEI);
+		show_cur();
+		invent_2_slot(MANUSKRIPT_INV);
+		_G(spieler).R28Manuskript = true;
+	}
+	return action_flag;
+}
+
+int16 Room28::cut_serv(int16 frame) {
+	if (_G(spieler).R28Briefkasten) {
+		det->plot_static_details(0, 0, 8, 9);
+	} else {
+		det->plot_static_details(0, 0, 7, 7);
+	}
+	return 0;
+}
+
+int16 Room28::cut_serv2(int16 frame) {
+	if (frame < 23) {
+		if (_G(spieler).R28Briefkasten) {
+			det->plot_static_details(0, 0, 8, 9);
+		} else {
+			det->plot_static_details(0, 0, 7, 7);
+		}
+	}
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room28.h b/engines/chewy/rooms/room28.h
new file mode 100644
index 00000000000..5c352c7e904
--- /dev/null
+++ b/engines/chewy/rooms/room28.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM28_H
+#define CHEWY_ROOMS_ROOM28_H
+
+#include "chewy/room.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room28 {
+private:
+	static void haendler();
+	static void setup_func();
+	static int16 cut_serv(int16 frame);
+	static int16 cut_serv2(int16 frame);
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void use_surimy();
+	static void set_pump();
+	static void get_pump();
+	static int16 use_breifkasten();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
new file mode 100644
index 00000000000..5a3bdaa04ef
--- /dev/null
+++ b/engines/chewy/rooms/room29.cpp
@@ -0,0 +1,136 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/room29.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room29::entry() {
+	if (_G(spieler).R29Schlauch1)
+		det->show_static_spr(7);
+	else if (_G(spieler).R29Schlauch2) {
+		det->show_static_spr(8);
+		det->show_static_spr(10);
+	}
+	if (_G(spieler).R29AutoSitz)
+		det->show_static_spr(9);
+}
+
+void Room29::xit() {
+	if (obj->check_inventar(PUMPE_INV)) {
+		del_inventar(PUMPE_INV);
+	}
+}
+
+int16 Room29::use_pumpe() {
+	int16 action_flag = false;
+	if (!_G(spieler).R29Pumpe) {
+		action_flag = true;
+		if (is_cur_inventar(SCHLAUCH_INV)) {
+			_G(spieler).R29Pumpe = true;
+			_G(spieler).R29Schlauch1 = true;
+			auto_move(1, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			det->show_static_spr(7);
+			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
+			del_inventar(SCHLAUCH_INV);
+		} else if (!_G(spieler).inv_cur)
+			start_aad_wait(62, -1);
+	}
+	return action_flag;
+}
+
+int16 Room29::get_schlauch() {
+	int16 action_flag = false;
+	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(2, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		new_invent_2_cur(PUMPE_INV);
+	}
+	return action_flag;
+}
+
+bool Room29::use_schlauch() {
+	bool result = false;
+
+	if (is_cur_inventar(PUMPE_INV)) {
+		result = true;
+		auto_move(2, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		det->hide_static_spr(7);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(4, 1, ANI_VOR);
+		det->show_static_spr(8);
+		det->show_static_spr(10);
+		atds->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(218, 1, ATS_DATEI);
+		_G(spieler).R29Schlauch1 = false;
+		_G(spieler).R29Schlauch2 = true;
+		del_inventar(PUMPE_INV);
+		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	}
+
+	return result;
+}
+
+void Room29::schlitz_sitz() {
+	if (!_G(spieler).R29AutoSitz) {
+		_G(spieler).R29AutoSitz = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		det->hide_static_spr(4);
+		start_aad(63);
+		start_ani_block(4, ablock26);
+		det->show_static_spr(9);
+		while (flags.AdsDialog && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+		det->stop_detail(2);
+		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		kbinfo.scan_code = Common::KEYCODE_INVALID;
+	}
+}
+
+int16 Room29::zaun_sprung() {
+	int16 action_flag = false;
+	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
+		action_flag = true;
+		auto_move(3, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_frame(3, 1, ANI_VOR, 7);
+		det->hide_static_spr(9);
+		start_ani_block(5, ablock27);
+		set_up_screen(DO_SETUP);
+		switch_room(37);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room29.h b/engines/chewy/rooms/room29.h
new file mode 100644
index 00000000000..aeb941b7c82
--- /dev/null
+++ b/engines/chewy/rooms/room29.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM29_H
+#define CHEWY_ROOMS_ROOM29_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room29 {
+public:
+	static void entry();
+	static void xit();
+	static int16 use_pumpe();
+	static int16 get_schlauch();
+	static bool use_schlauch();
+	static void schlitz_sitz();
+	static int16 zaun_sprung();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
new file mode 100644
index 00000000000..952b5291c44
--- /dev/null
+++ b/engines/chewy/rooms/room31.cpp
@@ -0,0 +1,179 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/rooms/roomdefs.h"
+#include "chewy/rooms/room31.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#undef SURIMY_OBJ
+#define SURIMY_OBJ 0
+
+static const MovLine SURIMY_MPKT[2] = {
+	{ {  79, 152, 150 }, 1, 6 },
+	{ { 273, 220, 150 }, 1, 6 }
+};
+
+void Room31::entry() {
+	calc_luke();
+	surimy_go();
+}
+
+void Room31::surimy_go() {
+	if (!_G(spieler).R39ScriptOk) {
+		if (_G(spieler).R31SurimyGo >= 3) {
+			hide_cur();
+			_G(spieler).R31SurimyGo = 0;
+			det->load_taf_seq(39, 8, 0);
+			_G(auto_obj) = 1;
+			mov_phasen[SURIMY_OBJ].AtsText = 0;
+			mov_phasen[SURIMY_OBJ].Lines = 2;
+			mov_phasen[SURIMY_OBJ].Repeat = 1;
+			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
+			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
+			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+			auto_mov_obj[SURIMY_OBJ].Mode = 1;
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+				(const MovLine *)SURIMY_MPKT);
+			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(157, -1);
+			wait_auto_obj(SURIMY_OBJ);
+			_G(auto_obj) = 0;
+			show_cur();
+		} else
+			++_G(spieler).R31SurimyGo;
+	}
+}
+
+void Room31::calc_luke() {
+	int16 i;
+	if (!_G(spieler).R31KlappeZu) {
+		for (i = 0; i < 3; i++)
+			det->show_static_spr(5 + i);
+		atds->set_ats_str(244, 1, ATS_DATEI);
+		atds->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
+	} else {
+		for (i = 0; i < 3; i++)
+			det->hide_static_spr(5 + i);
+		atds->set_ats_str(244, 0, ATS_DATEI);
+		atds->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).room_e_obj[75].Attribut = 255;
+	}
+}
+
+void Room31::open_luke() {
+	if (_G(spieler).R31KlappeZu) {
+		auto_move(2, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		_G(spieler).R31KlappeZu = false;
+		calc_luke();
+	}
+}
+
+void Room31::close_luke() {
+	if (!_G(spieler).R31KlappeZu) {
+		auto_move(2, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		_G(spieler).R31KlappeZu = true;
+		calc_luke();
+	}
+}
+
+int16 Room31::use_topf() {
+	int16 dia_nr = -1;
+	int16 ani_nr = 0;
+	int16 action_flag = false;
+
+	hide_cur();
+	if (_G(spieler).inv_cur) {
+		if (_G(spieler).R31PflanzeWeg) {
+			if (is_cur_inventar(K_KERNE_INV)) {
+				_G(spieler).R31KoernerDa = true;
+				auto_move(1, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				del_inventar(_G(spieler).AkInvent);
+				ani_nr = CH_TALK3;
+				dia_nr = 150;
+				atds->set_ats_str(242, 2, ATS_DATEI);
+			} else if (is_cur_inventar(MILCH_WAS_INV)) {
+				if (_G(spieler).R31KoernerDa) {
+					_G(spieler).R31Wasser = true;
+					auto_move(1, P_CHEWY);
+					_G(spieler).PersonHide[P_CHEWY] = true;
+					start_ani_block(3, ablock30);
+					_G(spieler).PersonHide[P_CHEWY] = false;
+					del_inventar(_G(spieler).AkInvent);
+					obj->add_inventar(MILCH_LEER_INV, &room_blk);
+					inventory_2_cur(MILCH_LEER_INV);
+					ani_nr = CH_TALK6;
+					dia_nr = 151;
+					atds->set_ats_str(242, 3, ATS_DATEI);
+				} else {
+					ani_nr = CH_TALK5;
+					dia_nr = 152;
+				}
+			} else if (is_cur_inventar(SURIMY_INV)) {
+				if (!_G(spieler).R31SurFurz) {
+					if (_G(spieler).R31Wasser) {
+						if (!_G(spieler).R28SurimyCar) {
+							ani_nr = CH_TALK5;
+							dia_nr = 180;
+						} else {
+							close_luke();
+							auto_move(3, P_CHEWY);
+							flic_cut(FCUT_046, FLC_MODE);
+							_G(spieler).R31SurFurz = true;
+							ani_nr = CH_TALK6;
+							dia_nr = 156;
+							atds->set_ats_str(242, 4, ATS_DATEI);
+							cur_2_inventory();
+						}
+					} else {
+						ani_nr = CH_TALK5;
+						dia_nr = 155;
+					}
+				}
+			} else {
+				ani_nr = CH_TALK5;
+				dia_nr = 153;
+			}
+		} else {
+			ani_nr = CH_TALK5;
+			dia_nr = 154;
+		}
+	}
+	if (dia_nr != -1) {
+		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(dia_nr, -1);
+		action_flag = true;
+	}
+	show_cur();
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room31.h b/engines/chewy/rooms/room31.h
new file mode 100644
index 00000000000..69394a60545
--- /dev/null
+++ b/engines/chewy/rooms/room31.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM31_H
+#define CHEWY_ROOMS_ROOM31_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room31 {
+private:
+	static void surimy_go();
+	static void calc_luke();
+
+public:
+	static void entry();
+	static void open_luke();
+	static void close_luke();
+	static int16 use_topf();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
new file mode 100644
index 00000000000..71ce06ebc6c
--- /dev/null
+++ b/engines/chewy/rooms/room32.cpp
@@ -0,0 +1,166 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room32.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room32::entry() {
+	if (_G(spieler).R32HowardWeg)
+		det->hide_static_spr(0);
+	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
+		det->show_static_spr(5);
+	}
+}
+
+int16 Room32::use_howard() {
+	int16 dia_nr = 0;
+	int16 ani_nr = 0;
+	int16 action_flag = false;
+	hide_cur();
+	if (is_cur_inventar(TRICHTER_INV)) {
+		if (_G(spieler).R33MunterGet) {
+			auto_move(1, P_CHEWY);
+			cur_2_inventory();
+			obj->del_inventar(MUNTER_INV, &room_blk);
+			del_invent_slot(MUNTER_INV);
+			flic_cut(FCUT_043, FLC_MODE);
+			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
+			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(75, -1);
+			wait_show_screen(5);
+			auto_move(5, P_CHEWY);
+			wait_show_screen(10);
+			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(125, -1);
+			wait_show_screen(10);
+			det->hide_static_spr(0);
+			start_detail_frame(0, 1, ANI_VOR, 9);
+			start_detail_wait(1, 1, ANI_RUECK);
+			det->show_static_spr(7);
+			det->show_static_spr(6);
+			wait_show_screen(20);
+			det->hide_static_spr(7);
+			start_detail_wait(1, 1, ANI_VOR);
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			ani_nr = CH_TALK3;
+			dia_nr = 164;
+			_G(spieler).R32HowardWeg = true;
+			_G(spieler).R39HowardDa = true;
+		} else {
+			ani_nr = CH_TALK12;
+			dia_nr = 73;
+		}
+	} else if (is_cur_inventar(MUNTER_INV)) {
+		ani_nr = CH_TALK12;
+		dia_nr = 74;
+	}
+	if (dia_nr) {
+		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(dia_nr, -1);
+		action_flag = true;
+	}
+	show_cur();
+	return action_flag;
+}
+
+void Room32::use_schreibmaschine() {
+	int16 dia_nr = -1;
+	int16 ani_nr = -1;
+
+	hide_cur();
+	if (_G(spieler).R32HowardWeg) {
+		if (_G(spieler).inv_cur) {
+			switch (_G(spieler).AkInvent) {
+			case PAPIER_INV:
+				auto_move(2, P_CHEWY);
+				_G(spieler).R32PapierOk = true;
+				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				del_inventar(_G(spieler).AkInvent);
+				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
+				ani_nr = CH_TALK3;
+				dia_nr = 86;
+				break;
+
+			case CYB_KRONE_INV:
+				if (!_G(spieler).R32UseSchreib) {
+					if (!_G(spieler).R32PapierOk) {
+						ani_nr = CH_TALK12;
+						dia_nr = 87;
+					} else {
+						auto_move(3, P_CHEWY);
+						_G(spieler).R32UseSchreib = true;
+						cur_2_inventory();
+						flic_cut(FCUT_044, FLC_MODE);
+						det->show_static_spr(5);
+						atds->set_ats_str(203, 1, ATS_DATEI);
+						ani_nr = CH_TALK3;
+						dia_nr = 88;
+						atds->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATEI);
+					}
+				}
+				break;
+
+			default:
+				ani_nr = CH_TALK12;
+				dia_nr = 90;
+				break;
+
+			}
+		} else {
+			ani_nr = CH_TALK12;
+			dia_nr = 89;
+		}
+	} else {
+		ani_nr = CH_TALK12;
+		dia_nr = 92;
+	}
+	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+	start_aad_wait(dia_nr, -1);
+	show_cur();
+}
+
+int16 Room32::get_script() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
+			action_flag = true;
+			_G(spieler).R32Script = true;
+			auto_move(4, P_CHEWY);
+			invent_2_slot(MANUSKRIPT_INV);
+			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+			det->hide_static_spr(5);
+			atds->set_ats_str(203, 0, ATS_DATEI);
+			start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
+			start_aad_wait(91, -1);
+		}
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room32.h b/engines/chewy/rooms/room32.h
new file mode 100644
index 00000000000..bdae837d961
--- /dev/null
+++ b/engines/chewy/rooms/room32.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM32_H
+#define CHEWY_ROOMS_ROOM32_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room32 {
+public:
+	static void entry();
+	static int16 get_script();
+	static void use_schreibmaschine();
+	static int16 use_howard();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
new file mode 100644
index 00000000000..de0eaea2e50
--- /dev/null
+++ b/engines/chewy/rooms/room33.cpp
@@ -0,0 +1,209 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/roomdefs.h"
+#include "chewy/rooms/room33.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#undef SURIMY_OBJ
+#define SURIMY_OBJ 0
+
+static const MovLine SURIMY_MPKT[2] = {
+	{ {  65, 115, 150 }, 1, 6 },
+	{ { 300, 151, 150 }, 1, 6 }
+};
+
+void Room33::entry() {
+	if (_G(spieler).R33MunterGet)
+		det->hide_static_spr(3);
+	surimy_go();
+}
+
+void Room33::surimy_go() {
+	if (!_G(spieler).R39ScriptOk) {
+		if (_G(spieler).R33SurimyGo >= 4) {
+			hide_cur();
+			_G(spieler).R33SurimyGo = 0;
+			det->load_taf_seq(39, 8, 0);
+			_G(auto_obj) = 1;
+			mov_phasen[SURIMY_OBJ].AtsText = 0;
+			mov_phasen[SURIMY_OBJ].Lines = 2;
+			mov_phasen[SURIMY_OBJ].Repeat = 1;
+			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
+			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
+			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+			auto_mov_obj[SURIMY_OBJ].Mode = 1;
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
+				(const MovLine *)SURIMY_MPKT);
+			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(158, -1);
+			wait_auto_obj(SURIMY_OBJ);
+			_G(auto_obj) = 0;
+			show_cur();
+		} else
+			++_G(spieler).R33SurimyGo;
+	}
+}
+
+void Room33::look_schublade() {
+	if (!_G(spieler).R33SchubFirst) {
+		_G(spieler).R33SchubFirst = true;
+		auto_move(1, P_CHEWY);
+		atds->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
+		atds->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
+	}
+}
+
+int16 Room33::use_schublade() {
+	int16 action_flag = false;
+	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur) {
+		if (!_G(spieler).R33Messer) {
+			action_flag = true;
+			_G(spieler).R33Messer = true;
+			atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
+			atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
+			atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
+			start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			invent_2_slot(MESSER_INV);
+		}
+	}
+	return action_flag;
+}
+
+void Room33::use_maschine() {
+	int16 action;
+	int16 dia_nr;
+	int16 ani_nr;
+	int16 hocker;
+	action = true;
+	hocker = false;
+	hide_cur();
+	if (!_G(spieler).R33MunterOk) {
+		auto_move(4, P_CHEWY);
+		if (_G(spieler).inv_cur) {
+			switch (_G(spieler).AkInvent) {
+			case K_FLEISCH_INV:
+				_G(spieler).R33Munter[1] = true;
+				break;
+
+			case MILCH_INV:
+				_G(spieler).R33Munter[3] = true;
+				invent_2_slot(MILCH_LEER_INV);
+				break;
+
+			case KAFFEE_INV:
+				_G(spieler).R33Munter[0] = true;
+				break;
+
+			case EIER_INV:
+				_G(spieler).R33Munter[2] = true;
+				break;
+
+			default:
+				action = false;
+				break;
+
+			}
+			if (action) {
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				start_detail_wait(0, 1, ANI_VOR);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				set_person_pos(128, 65, P_CHEWY, P_LEFT);
+				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				hocker = true;
+				del_inventar(_G(spieler).AkInvent);
+				ani_nr = CH_TALK12;
+				if (calc_muntermacher()) {
+					_G(spieler).R33MunterOk = true;
+					dia_nr = 69;
+				} else {
+					dia_nr = 67;
+				}
+			} else {
+				ani_nr = CH_TALK4;
+				dia_nr = 68;
+			}
+		} else {
+			ani_nr = CH_TALK12;
+			dia_nr = 66;
+		}
+		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(dia_nr, -1);
+		if (_G(spieler).R33MunterOk) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(2, 1, ANI_VOR);
+			flic_cut(FCUT_031, FLC_MODE);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(71, -1);
+			atds->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+		}
+		if (hocker) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(1, 1, ANI_VOR);
+			set_person_pos(64, 100, P_CHEWY, P_LEFT);
+		}
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	} else {
+		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(70, -1);
+	}
+	show_cur();
+}
+
+int16 Room33::calc_muntermacher() {
+	int16 ret;
+	int16 i;
+	ret = true;
+	for (i = 0; i < 4; i++) {
+		if (_G(spieler).R33Munter[i] == false)
+			ret = false;
+	}
+	return ret;
+}
+
+int16 Room33::get_munter() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
+			action_flag = true;
+			_G(spieler).R33MunterGet = true;
+			auto_move(4, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			invent_2_slot(MUNTER_INV);
+			atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+			det->hide_static_spr(3);
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(72, -1);
+		}
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room33.h b/engines/chewy/rooms/room33.h
new file mode 100644
index 00000000000..4b0c50a5eac
--- /dev/null
+++ b/engines/chewy/rooms/room33.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM33_H
+#define CHEWY_ROOMS_ROOM33_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room33 {
+private:
+	static void surimy_go();
+	static int16 calc_muntermacher();
+
+public:
+	static void entry();
+	static void look_schublade();
+	static int16 use_schublade();
+	static void use_maschine();
+	static int16 get_munter();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
new file mode 100644
index 00000000000..629caead316
--- /dev/null
+++ b/engines/chewy/rooms/room34.cpp
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room34.h"
+
+namespace Chewy {
+namespace Rooms {
+
+bool Room34::use_kuehlschrank() {
+	bool result = false;
+
+	if (!_G(spieler).inv_cur) {
+		result = true;
+
+		if (!flags.LoadGame) {
+			auto_move(3, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		}
+
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		flags.ChewyDontGo = true;
+		if (!flags.LoadGame) {
+			switch_room(34);
+		}
+		set_person_pos(160, 70, P_CHEWY, -1);
+	}
+
+	return result;
+}
+
+void Room34::xit_kuehlschrank() {
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	set_person_pos(54, 111, P_CHEWY, -1);
+	switch_room(33);
+	flags.ChewyDontGo = false;
+	_G(maus_links_click) = false;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room34.h b/engines/chewy/rooms/room34.h
new file mode 100644
index 00000000000..4d5b53744cc
--- /dev/null
+++ b/engines/chewy/rooms/room34.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM34_H
+#define CHEWY_ROOMS_ROOM34_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room34 {
+public:
+	static bool use_kuehlschrank();
+	static void xit_kuehlschrank();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
new file mode 100644
index 00000000000..68a1ca86492
--- /dev/null
+++ b/engines/chewy/rooms/room35.cpp
@@ -0,0 +1,126 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room35.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room35::entry() {
+	if (_G(spieler).R35Schublade)
+		det->show_static_spr(1);
+}
+
+int16 Room35::schublade() {
+	int16 action_flag = false;
+	hide_cur();
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R35Schublade) {
+			action_flag = true;
+			auto_move(3, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			det->show_static_spr(1);
+			_G(spieler).R35Schublade = true;
+			atds->set_ats_str(234, 1, ATS_DATEI);
+		} else if (!_G(spieler).R35Falle) {
+			action_flag = true;
+			auto_move(3, P_CHEWY);
+			_G(spieler).R35Falle = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_ani_block(2, ablock28);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			set_person_pos(33, 90, P_CHEWY, P_LEFT);
+			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(93, -1);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			atds->set_ats_str(234, 2, ATS_DATEI);
+		}
+	}
+	show_cur();
+	return action_flag;
+}
+
+int16 Room35::use_cat() {
+	int16 action_flag = false;
+	hide_cur();
+	if (is_cur_inventar(TRANSLATOR_INV)) {
+		action_flag = true;
+		auto_move(4, P_CHEWY);
+		_G(spieler).R35TransCat = true;
+		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+		flic_cut(FCUT_045, FLC_MODE);
+		start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+		start_aad_wait(94, -1);
+	} else if (is_cur_inventar(PUTENKEULE_INV)) {
+		action_flag = true;
+		disable_timer();
+		auto_move(4, P_CHEWY);
+		_G(spieler).R35CatEat = true;
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		det->stop_detail(0);
+		det->del_static_ani(0);
+		start_detail_wait(1, 1, ANI_VOR);
+		det->start_detail(2, 1, ANI_VOR);
+		start_detail_wait(3, 1, ANI_VOR);
+		obj->show_sib(SIB_KNOCHEN_R35);
+		obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
+		det->show_static_spr(7);
+		atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
+		while (det->get_ani_status(2) && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+		det->set_static_ani(0, -1);
+		enable_timer();
+		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(95, -1);
+	}
+	show_cur();
+	return action_flag;
+}
+
+void Room35::talk_cat() {
+	int16 dia_nr;
+	auto_move(4, P_CHEWY);
+	if (_G(spieler).R35TransCat) {
+		if (!_G(spieler).R35CatEat) {
+			dia_nr = 7;
+		} else {
+			dia_nr = 8;
+		}
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		switch_room(36);
+		start_ads_wait(dia_nr);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		switch_room(35);
+	} else {
+		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(96, -1);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room35.h b/engines/chewy/rooms/room35.h
new file mode 100644
index 00000000000..47f948cbca7
--- /dev/null
+++ b/engines/chewy/rooms/room35.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM35_H
+#define CHEWY_ROOMS_ROOM35_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room35 {
+public:
+	static void entry();
+	static int16 schublade();
+	static int16 use_cat();
+	static void talk_cat();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
new file mode 100644
index 00000000000..ddada2c88e7
--- /dev/null
+++ b/engines/chewy/rooms/room37.cpp
@@ -0,0 +1,305 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room37.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room37::entry() {
+	_G(zoom_horizont) = 100;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = setup_func;
+	if (!flags.LoadGame) {
+		_G(spieler).scrollx = 124;
+		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
+	}
+	if (!_G(spieler).R37Kloppe) {
+		_G(timer_nr)[1] = room->set_timer(7, 5);
+		det->set_static_ani(7, -1);
+		if (!_G(spieler).R37HundScham) {
+			_G(timer_nr)[0] = room->set_timer(3, 4);
+			det->set_static_ani(3, -1);
+		}
+	}
+	if (_G(spieler).R37Gebiss) {
+		det->hide_static_spr(9);
+		if (_G(spieler).R37Kloppe) {
+			det->hide_static_spr(8);
+		} else if (_G(spieler).R37HundScham)
+			det->show_static_spr(0);
+	}
+}
+
+void Room37::setup_func() {
+	if (_G(maus_links_click) &&
+		!_G(spieler).R37Kloppe &&
+		menu_item == CUR_WALK) {
+		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
+			(minfo.x + _G(spieler).scrollx > 482)) {
+			auto_move(7, P_CHEWY);
+			_G(maus_links_click) = false;
+		}
+	}
+}
+
+short Room37::use_wippe() {
+	int16 action_flag = false;
+	if (_G(spieler).inv_cur) {
+		action_flag = true;
+		if (is_cur_inventar(H_FUTTER_INV)) {
+			hide_cur();
+			auto_move(0, P_CHEWY);
+			flags.NoScroll = true;
+			auto_scroll(129, 0);
+			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(159, -1);
+			del_inventar(_G(spieler).AkInvent);
+			flc->set_flic_user_function(cut_serv1);
+			flic_cut(FCUT_047, FLC_MODE);
+			flc->remove_flic_user_function();
+			flags.NoScroll = false;
+			show_cur();
+			_G(spieler).scrollx = 269;
+			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
+			switch_room(29);
+			_G(maus_links_click) = false;
+		} else {
+			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(160, -1);
+		}
+	}
+	return action_flag;
+}
+
+int16 Room37::cut_serv1(int16 frame) {
+	int16 static_nr;
+	int16 static_nr1;
+	if (!_G(spieler).R37Kloppe) {
+		if (!_G(spieler).R37Gebiss) {
+			static_nr = 9;
+			static_nr1 = 11;
+			det->show_static_spr(11);
+		} else {
+			static_nr = 8;
+			static_nr1 = 0;
+		}
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
+	}
+
+	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
+	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
+	return 0;
+}
+
+int16 Room37::cut_serv2(int16 frame) {
+	int16 static_nr[] = { 7, 14, 12, 10 };
+	short i;
+	det->show_static_spr(12);
+	det->show_static_spr(10);
+	for (i = 0; i < 4; i++)
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr[i], static_nr[i]);
+	return 0;
+}
+
+int16 Room37::use_glas() {
+	int16 action_flag = false;
+	if (!_G(spieler).R37Gebiss) {
+		if (is_cur_inventar(ANGEL2_INV)) {
+			action_flag = true;
+			flags.NoScroll = true;
+			hide_cur();
+			auto_move(5, P_CHEWY);
+			flags.NoScroll = true;
+			auto_scroll(146, 0);
+			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(147, -1);
+			del_inventar(_G(spieler).AkInvent);
+			flc->set_flic_user_function(cut_serv2);
+			flic_cut(FCUT_048, FLC_MODE);
+			flc->remove_flic_user_function();
+			flic_cut(FCUT_049, FLC_MODE);
+			invent_2_slot(GEBISS_INV);
+			det->hide_static_spr(9);
+			atds->set_ats_str(250, 1, ATS_DATEI);
+			atds->set_ats_str(256, 1, ATS_DATEI);
+			atds->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
+			obj->show_sib(SIB_HFUTTER2_R37);
+			_G(spieler).R37Gebiss = true;
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(146, -1);
+			show_cur();
+			flags.NoScroll = false;
+		} else {
+			auto_move(4, P_CHEWY);
+		}
+	}
+	return action_flag;
+}
+
+void Room37::dog_bell() {
+	int16 dia_nr = -1;
+	int16 ani_nr = 0;
+
+	hide_cur();
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		if (!_G(spieler).R37Gebiss) {
+			stop_person(P_CHEWY);
+			flags.ChAutoMov = false;
+			set_person_spr(P_LEFT, P_CHEWY);
+			flags.NoScroll = true;
+			auto_scroll(178, 0);
+			disable_timer();
+			det->stop_detail(3);
+			det->del_static_ani(3);
+			start_detail_wait(5, 1, ANI_VOR);
+			det->hide_static_spr(9);
+			start_detail_wait(6, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			det->start_detail(11, 255, ANI_VOR);
+			flic_cut(FCUT_050, FLC_MODE);
+			start_detail_wait(6, 1, ANI_RUECK);
+			det->stop_detail(11);
+			set_person_pos(326, 85, P_CHEWY, P_LEFT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			det->show_static_spr(9);
+			start_ani_block(3, ablock31);
+			det->set_static_ani(3, -1);
+			enable_timer();
+			dia_nr = 149;
+			ani_nr = CH_TALK12;
+		} else if (!_G(spieler).R37HundScham) {
+			stop_person(P_CHEWY);
+			set_person_spr(P_LEFT, P_CHEWY);
+			flags.NoScroll = true;
+			auto_scroll(178, 0);
+			room->set_timer_status(3, TIMER_STOP);
+			det->del_static_ani(3);
+			det->stop_detail(3);
+			start_detail_wait(4, 1, ANI_VOR);
+			flic_cut(FCUT_051, FLC_MODE);
+			_G(spieler).scrollx = 104;
+			flic_cut(FCUT_054, FLC_MODE);
+			flic_cut(FCUT_054, FLC_MODE);
+			det->show_static_spr(0);
+			_G(spieler).R37HundScham = true;
+			dia_nr = 148;
+			ani_nr = CH_TALK6;
+		}
+		flags.AutoAniPlay = false;
+		if (dia_nr != -1) {
+			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(dia_nr, -1);
+		}
+	}
+	flags.NoScroll = false;
+	show_cur();
+}
+
+void Room37::talk_hahn() {
+	auto_move(7, P_CHEWY);
+	if (!_G(spieler).R37TransHahn) {
+		start_aad_wait(145, -1);
+	} else {
+		hahn_dia();
+	}
+}
+
+void Room37::use_hahn() {
+	if (is_cur_inventar(TRANSLATOR_INV)) {
+		hide_cur();
+		auto_move(7, P_CHEWY);
+		_G(spieler).R37TransHahn = true;
+		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+		flic_cut(FCUT_052, FLC_MODE);
+		cur_2_inventory();
+		menu_item = CUR_TALK;
+		cursor_wahl(menu_item);
+		show_cur();
+		hahn_dia();
+	} else if (_G(spieler).R37TransHahn) {
+		if (is_cur_inventar(GEBISS_INV)) {
+			_G(spieler).R37Kloppe = true;
+			hide_cur();
+			auto_move(6, P_CHEWY);
+			load_room_music(256);
+			room->set_timer_status(7, TIMER_STOP);
+			det->stop_detail(7);
+			det->del_static_ani(7);
+			det->start_detail(9, 1, ANI_VOR);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			del_inventar(GEBISS_INV);
+			flags.NoScroll = true;
+			auto_scroll(177, 0);
+			while (det->get_ani_status(9) && !SHOULD_QUIT) {
+				set_up_screen(DO_SETUP);
+			}
+			det->start_detail(4, 1, ANI_VOR);
+			det->hide_static_spr(0);
+			det->start_detail(10, 10, ANI_VOR);
+			auto_move(8, P_CHEWY);
+			flic_cut(FCUT_053, FLC_MODE);
+			det->stop_detail(10);
+			_G(spieler).scrollx = 320;
+			flags.NoScroll = false;
+			atds->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
+			atds->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
+			atds->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
+			det->hide_static_spr(8);
+			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(141, -1);
+			obj->add_inventar(EIER_INV, &room_blk);
+			inventory_2_cur(EIER_INV);
+			show_cur();
+		}
+	} else if (_G(spieler).inv_cur) {
+		start_aad_wait(143, -1);
+	}
+}
+
+void Room37::hahn_dia() {
+	int16 tmp_scrollx;
+	int16 tmp_scrolly;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	tmp_scrollx = _G(spieler).scrollx;
+	tmp_scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	switch_room(38);
+	start_ads_wait(9);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	flags.LoadGame = true;
+	_G(spieler).scrollx = tmp_scrollx;
+	_G(spieler).scrolly = tmp_scrolly;
+	switch_room(37);
+	flags.LoadGame = false;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room37.h b/engines/chewy/rooms/room37.h
new file mode 100644
index 00000000000..31b4da7a0a3
--- /dev/null
+++ b/engines/chewy/rooms/room37.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM37_H
+#define CHEWY_ROOMS_ROOM37_H
+
+#include "common/scummsys.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room37 {
+private:
+	static void setup_func();
+	static int16 cut_serv1(int16 frame);
+	static int16 cut_serv2(int16 frame);
+	static void hahn_dia();
+
+public:
+	static void entry();
+	static short use_wippe();
+	static int16 use_glas();
+	static void dog_bell();
+	static void talk_hahn();
+	static void use_hahn();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
new file mode 100644
index 00000000000..b0e8ee73b38
--- /dev/null
+++ b/engines/chewy/rooms/room39.cpp
@@ -0,0 +1,299 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room39.h"
+#include "chewy/rooms/room43.h"
+
+namespace Chewy {
+namespace Rooms {
+
+static const uint8 TV_FLIC[] = {
+	FCUT_039,
+	FCUT_040,
+	FCUT_035,
+	FCUT_032,
+	FCUT_037,
+	FCUT_034
+};
+
+void Room39::entry() {
+	if (!_G(spieler).R41Einbruch) {
+		if (_G(spieler).R39HowardDa) {
+			det->show_static_spr(10);
+			if (!_G(spieler).R39HowardWach)
+				det->start_detail(1, 255, ANI_VOR);
+			else
+				det->set_static_ani(5, -1);
+			atds->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+		}
+	} else
+		atds->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+	set_tv();
+}
+
+short Room39::use_howard() {
+	int16 dia_nr = -1;
+	int16 ani_nr = 0;
+	int16 action_flag = false;
+
+	if (!_G(spieler).R39HowardWach) {
+		if (_G(spieler).inv_cur) {
+			if (is_cur_inventar(MANUSKRIPT_INV)) {
+				hide_cur();
+				_G(spieler).R39HowardWach = true;
+				_G(spieler).R39ScriptOk = true;
+				auto_move(3, P_CHEWY);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				det->start_detail(6, 255, ANI_VOR);
+				start_aad_wait(170, -1);
+				det->stop_detail(6);
+				start_detail_wait(7, 1, ANI_VOR);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				del_inventar(_G(spieler).AkInvent);
+				det->stop_detail(1);
+				start_ani_block(2, ablock33);
+				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+				start_aad_wait(167, -1);
+				det->stop_detail(3);
+				start_detail_wait(4, 1, ANI_VOR);
+				det->set_static_ani(5, -1);
+				atds->set_ats_str(62, 1, ATS_DATEI);
+				start_aad_wait(169, -1);
+				show_cur();
+				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
+				calc_person_dia(P_HOWARD);
+				if (_G(spieler).R41HowardDiaOK) {
+					ok();
+				}
+				dia_nr = -1;
+			} else {
+				ani_nr = CH_TALK11;
+				dia_nr = 166;
+			}
+		} else {
+			ani_nr = CH_TALK5;
+			dia_nr = 165;
+		}
+		if (dia_nr != -1) {
+			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(dia_nr, -1);
+			action_flag = true;
+		}
+		show_cur();
+	}
+	return action_flag;
+}
+
+void Room39::talk_howard() {
+	if (_G(spieler).R39HowardWach) {
+		auto_move(3, P_CHEWY);
+		_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
+		_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
+		calc_person_dia(P_HOWARD);
+		if (_G(spieler).R41HowardDiaOK) {
+			ok();
+		}
+	} else {
+		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(168, -1);
+	}
+}
+
+void Room39::ok() {
+	_G(spieler).R41Einbruch = true;
+
+	Room43::night_small();
+	_G(spieler).PersonRoomNr[P_HOWARD] = 27;
+	obj->show_sib(SIB_SURIMY_R27);
+	obj->show_sib(SIB_ZEITUNG_R27);
+	obj->calc_rsi_flip_flop(SIB_SURIMY_R27);
+	obj->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
+	invent_2_slot(BRIEF_INV);
+	switch_room(27);
+	start_aad_wait(192, -1);
+	menu_item = CUR_WALK;
+	cursor_wahl(menu_item);
+}
+
+int16 Room39::use_tv() {
+	int16 cls_flag;
+	int16 dia_nr = -1;
+	int16 ani_nr = -1;
+	int16 action_flag = false;
+
+	auto_move(2, P_CHEWY);
+	cls_flag = false;
+	hide_cur();
+	if (is_cur_inventar(ZAPPER_INV)) {
+		_G(spieler).R39TvOn = true;
+		if (_G(spieler).R39TvKanal >= 5)
+			_G(spieler).R39TvKanal = -1;
+		flags.NoPalAfterFlc = true;
+		out->setze_zeiger(0);
+		out->cls();
+		flic_cut(FCUT_042, FLC_MODE);
+		++_G(spieler).R39TvKanal;
+		flags.NoPalAfterFlc = true;
+		if (_G(spieler).R39TvKanal == 2)
+			flic_cut(FCUT_036, FLC_MODE);
+		else if (_G(spieler).R39TvKanal == 5)
+			flic_cut(FCUT_033, FLC_MODE);
+		look_tv(0);
+		set_tv();
+		cls_flag = true;
+		if (!_G(spieler).R39TransMensch) {
+			ani_nr = CH_TALK11;
+			dia_nr = 78;
+		} else {
+			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
+				dia_nr = 79;
+				ani_nr = -1;
+			} else {
+				dia_nr = 80 + _G(spieler).R39TvKanal;
+				ani_nr = -1;
+			}
+		}
+	} else if (is_cur_inventar(TRANSLATOR_INV)) {
+		if (_G(spieler).R39TvOn) {
+			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			_G(spieler).R39TransMensch = true;
+			flags.NoPalAfterFlc = true;
+			flic_cut(FCUT_041, FLC_MODE);
+			_G(spieler).R39TvKanal = 0;
+			_G(spieler).R39ClintNews = 0;
+			out->setze_zeiger(0);
+			out->cls();
+			out->set_palette(pal);
+			flags.NoPalAfterFlc = true;
+			flic_cut(TV_FLIC[0], FLC_MODE);
+			out->cls();
+			out->setze_zeiger(0);
+			out->cls();
+			out->set_palette(pal);
+			set_tv();
+			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(80, -1);
+
+			ani_nr = CH_TRANS;
+			dia_nr = 77;
+		} else {
+			ani_nr = CH_TALK11;
+			dia_nr = 76;
+		}
+		set_tv();
+	} else if (is_cur_inventar(RECORDER_INV)) {
+		if (_G(spieler).R39TvOn) {
+			if (!_G(spieler).R39TransMensch) {
+				ani_nr = CH_TALK12;
+				dia_nr = 97;
+			} else {
+				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_aad_wait(98, -1);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				start_ani_block(2, ablock29);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				ani_nr = CH_TALK5;
+				dia_nr = 99;
+				atds->set_ats_str(CASSETTE_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
+				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
+			}
+		} else {
+			ani_nr = CH_TALK11;
+			dia_nr = 76;
+		}
+	}
+	if (cls_flag) {
+		out->cls();
+		out->setze_zeiger(0);
+		out->cls();
+		out->set_palette(pal);
+		flags.NoPalAfterFlc = false;
+	}
+	if (dia_nr != -1) {
+		if (ani_nr != -1)
+			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(dia_nr, -1);
+		action_flag = true;
+	}
+	show_cur();
+	return action_flag;
+}
+
+void Room39::look_tv(int16 cls_mode) {
+	int16 flic_nr;
+	int16 dia_nr;
+	if (_G(spieler).R39TvOn) {
+		if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
+			flic_nr = FCUT_038;
+			++_G(spieler).R39ClintNews;
+			dia_nr = 79;
+		} else {
+			flic_nr = TV_FLIC[_G(spieler).R39TvKanal];
+			if (!_G(spieler).R39TvKanal)
+				_G(spieler).R39ClintNews = 0;
+			dia_nr = 80 + _G(spieler).R39TvKanal;
+		}
+		if (cls_mode) {
+			out->setze_zeiger(0);
+			out->cls();
+			out->set_palette(pal);
+			flags.NoPalAfterFlc = true;
+		}
+		flic_cut(flic_nr, FLC_MODE);
+		if (cls_mode) {
+			out->cls();
+			out->setze_zeiger(0);
+			out->cls();
+			out->set_palette(pal);
+			flags.NoPalAfterFlc = false;
+			if (_G(spieler).R39TransMensch)
+				start_aad_wait(dia_nr, -1);
+		}
+	}
+}
+
+void Room39::set_tv() {
+	int16 i;
+	for (i = 0; i < 6; i++)
+		det->hide_static_spr(i + 4);
+	if (_G(spieler).R39TvOn) {
+		if (_G(spieler).R39TvKanal == 2)
+			det->start_detail(0, 255, ANI_VOR);
+		else {
+			det->stop_detail(0);
+			det->show_static_spr(_G(spieler).R39TvKanal + 4);
+		}
+		if (_G(spieler).R39TransMensch) {
+			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
+		} else {
+			atds->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
+		}
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
new file mode 100644
index 00000000000..92224ec0f1f
--- /dev/null
+++ b/engines/chewy/rooms/room39.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM39_H
+#define CHEWY_ROOMS_ROOM39_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room39 {
+private:
+	static void ok();
+	static void set_tv();
+
+public:
+	static void entry();
+	static int16 use_tv();
+	static short use_howard();
+	static void talk_howard();
+	static void look_tv(int16 cls_mode);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
new file mode 100644
index 00000000000..9bb5a92d62f
--- /dev/null
+++ b/engines/chewy/rooms/room40.cpp
@@ -0,0 +1,560 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room40.h"
+#include "chewy/rooms/room43.h"
+
+namespace Chewy {
+namespace Rooms {
+
+#define SPEED 3
+#define POLICE_LEFT 8
+#define POLICE_OFFEN 9
+#define POLICE_WUERG 10
+#define POLICE_RIGHT 11
+#define POLICE_FLASCHE 16
+
+void Room40::entry(int16 eib_nr) {
+	_G(zoom_horizont) = 130;
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R40Geld) {
+		det->del_static_ani(6);
+		room->set_timer_status(6, TIMER_STOP);
+	}
+	if (_G(spieler).R40HaendlerOk) {
+		det->del_static_ani(4);
+		room->set_timer_status(4, TIMER_STOP);
+	}
+	if (_G(spieler).R40PoliceWeg == false) {
+		_G(timer_nr)[0] = room->set_timer(255, 10);
+		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		det->hide_static_spr(15);
+	}
+	_G(spieler).R40PoliceAniStatus = 255;
+	_G(spieler).R40PoliceStart = 0;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
+		if (!flags.LoadGame) {
+			switch (eib_nr) {
+			case 69:
+				set_person_pos(30, 105, P_HOWARD, P_RIGHT);
+				go_auto_xy(158, 99, P_HOWARD, ANI_GO);
+				break;
+
+			case 73:
+			case 74:
+			case 87:
+				set_person_pos(158, 93, P_HOWARD, P_LEFT);
+				break;
+
+			}
+		}
+	}
+	SetUpScreenFunc = setup_func;
+	if (_G(spieler).R40TrainMove)
+		move_train(0);
+}
+
+void Room40::xit(int16 eib_nr) {
+	hide_cur();
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).R40PoliceAb = false;
+	stop_spz();
+	SetUpScreenFunc = 0;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+		if (eib_nr == 70 || eib_nr == 77) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+		} else if (eib_nr == 72) {
+			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
+				_G(spieler).R42BriefOk && _G(spieler).R28Manuskript) ||
+				(_G(spieler).R40TrainOk)) {
+				_G(spieler).R40TrainOk = true;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
+				_G(spieler).room_e_obj[72].Exit = 45;
+				obj->hide_sib(SIB_MUENZE_R40);
+				uhr->disable_timer();
+				out->ausblenden(0);
+				hide_person();
+
+				set_up_screen(DO_SETUP);
+				out->einblenden(pal, 0);
+				uhr->enable_timer();
+				_G(maus_links_click) = false;
+				start_aad_wait(238, -1);
+				move_train(1);
+				flags.NoPalAfterFlc = true;
+				flic_cut(FCUT_073, FLC_MODE);
+				show_person();
+			} else
+				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
+		}
+	}
+	spieler_mi[P_HOWARD].Mode = false;
+	show_cur();
+}
+
+void Room40::move_train(int16 mode) {
+	int16 lx, ax;
+	int16 delay;
+	_G(spieler).R40TrainMove = false;
+	hide_cur();
+	auto_move(9, P_CHEWY);
+	flags.NoScroll = true;
+	auto_scroll(232, 0);
+	if (!mode)
+		start_aad_wait(206, -1);
+	lx = -40;
+	ax = lx - 190;
+	det->start_detail(7, 20, ANI_VOR);
+	det->show_static_spr(11);
+	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
+		det->show_static_spr(12);
+	delay = 0;
+	while (ax < 560) {
+		det->set_detail_pos(7, lx, 46);
+		det->set_static_pos(11, ax, 62, false, false);
+		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
+			det->set_static_pos(12, ax, 62, false, true);
+		if (!delay) {
+			lx += SPEED;
+			ax += SPEED;
+			delay = _G(spieler).DelaySpeed / 2;
+		} else
+			--delay;
+		set_up_screen(DO_SETUP);
+	}
+	det->stop_detail(7);
+	det->hide_static_spr(11);
+	det->hide_static_spr(12);
+	if (!mode)
+		start_aad_wait(207, -1);
+	if (!mode)
+		auto_scroll(180, 0);
+	flags.NoScroll = false;
+	show_cur();
+}
+
+void Room40::setup_func() {
+	int16 x, y;
+	int16 sp_x;
+
+	if (!_G(spieler).R40HoUse && _G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+		calc_person_look();
+		x = spieler_vector[P_HOWARD].Xypos[0];
+		y = spieler_vector[P_HOWARD].Xypos[1];
+		sp_x = spieler_vector[P_CHEWY].Xypos[0];
+		if (sp_x > 170 && sp_x < 255) {
+			x = 248;
+			y = 97;
+		} else if (sp_x > 255 && sp_x < 350) {
+			x = 310;
+			y = 90;
+		} else if (sp_x > 350) {
+			x = 428;
+			y = 90;
+		} else if (sp_x < 170) {
+			x = 165;
+			y = 99;
+		}
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+
+	if (_G(spieler).R40PoliceWeg == false) {
+		if (_G(spieler).R40PoliceStart) {
+			_G(spieler).R40PoliceStart = false;
+			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
+			room->set_timer_status(255, TIMER_STOP);
+			det->hide_static_spr(15);
+			det->start_detail(POLICE_LEFT, 1, ANI_VOR);
+			atds->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+		}
+		switch (_G(spieler).R40PoliceAniStatus) {
+		case POLICE_LEFT:
+			if (det->get_ani_status(POLICE_LEFT) == false) {
+				det->start_detail(POLICE_OFFEN, 1, ANI_VOR);
+				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
+			}
+			break;
+
+		case POLICE_OFFEN:
+			if (det->get_ani_status(POLICE_OFFEN) == false) {
+				det->show_static_spr(0);
+				det->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
+				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
+			}
+			break;
+
+		case POLICE_FLASCHE:
+			if (det->get_ani_status(POLICE_FLASCHE) == false) {
+				det->hide_static_spr(0);
+				if (_G(spieler).R40DuengerTele) {
+					hide_cur();
+					_G(spieler).R40PoliceWeg = true;
+					det->start_detail(17, 255, ANI_VOR);
+					start_aad_wait(226, -1);
+					det->stop_detail(17);
+					_G(spieler).R40HoUse = true;
+					person_end_phase[P_CHEWY] = P_RIGHT;
+					start_detail_wait(10, 1, ANI_VOR);
+					person_end_phase[P_HOWARD] = P_RIGHT;
+					start_aad_wait(224, -1);
+					_G(spieler).R40PoliceWeg = true;
+					show_cur();
+					flags.MausLinks = false;
+					flags.MainInput = true;
+					_G(spieler).R40HoUse = false;
+					atds->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
+				} else {
+					det->start_detail(POLICE_RIGHT, 1, ANI_VOR);
+					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
+				}
+			}
+			break;
+
+		case POLICE_RIGHT:
+			if (det->get_ani_status(POLICE_RIGHT) == false) {
+				det->show_static_spr(15);
+				_G(spieler).R40PoliceAniStatus = 255;
+				room->set_timer_status(255, TIMER_START);
+				uhr->reset_timer(_G(timer_nr)[0], 0);
+				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+			}
+			break;
+
+		}
+	}
+}
+
+int16 Room40::use_mr_pumpkin() {
+	int16 action_ret = false;
+	hide_cur();
+	if (_G(spieler).inv_cur) {
+		switch (_G(spieler).AkInvent) {
+		case CENT_INV:
+			action_ret = true;
+			auto_move(5, P_CHEWY);
+			del_inventar(_G(spieler).AkInvent);
+			start_detail_wait(15, 1, ANI_VOR);
+			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(200, -1);
+			break;
+
+		case CASSETTE_INV:
+			if (_G(spieler).R39TvRecord == 6) {
+				action_ret = true;
+				if (_G(spieler).R40PoliceWeg == false)
+					use_schalter(227);
+				else {
+					hide_cur();
+					auto_move(8, P_CHEWY);
+					start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+					del_inventar(_G(spieler).AkInvent);
+					out->ausblenden(1);
+					Room43::catch_pg();
+					del_invent_slot(LIKOER_INV);
+					obj->add_inventar(LIKOER2_INV, &room_blk);
+					inventory_2_cur(LIKOER2_INV);
+					switch_room(40);
+					start_aad_wait(236, -1);
+				}
+			} else
+				start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
+			break;
+
+		}
+	}
+	show_cur();
+
+	return action_ret;
+}
+
+int16 Room40::use_schalter(int16 aad_nr) {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R40PoliceWeg == false) {
+			action_flag = true;
+			hide_cur();
+			auto_move(8, P_CHEWY);
+			if (_G(spieler).R40PoliceAniStatus != 255) {
+				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+				start_aad_wait(204, -1);
+				while (_G(spieler).R40PoliceAniStatus != 255 && !SHOULD_QUIT)
+					set_up_screen(DO_SETUP);
+			}
+			room->set_timer_status(255, TIMER_STOP);
+			_G(spieler).R40PoliceStart = false;
+			stop_spz();
+			start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+			if (_G(spieler).R40PoliceAb) {
+				_G(spieler).R40PoliceAb = false;
+				stop_spz();
+				go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
+				_G(spieler).R40HoUse = false;
+			}
+			det->hide_static_spr(15);
+			start_detail_wait(12, 1, ANI_VOR);
+			det->set_static_ani(14, -1);
+			start_aad_wait(aad_nr, -1);
+			det->del_static_ani(14);
+			start_detail_wait(13, 1, ANI_VOR);
+			det->show_static_spr(15);
+			room->set_timer_status(255, TIMER_START);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
+			show_cur();
+		}
+	}
+	return action_flag;
+}
+
+void Room40::talk_police() {
+	if (_G(spieler).R40PoliceWeg == false &&
+		_G(spieler).R40PoliceAniStatus == 255) {
+		hide_cur();
+		_G(spieler).R40PoliceStart = false;
+		room->set_timer_status(255, TIMER_STOP);
+		auto_move(7, P_CHEWY);
+		start_aad_wait(203, -1);
+		room->set_timer_status(255, TIMER_START);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		show_cur();
+	}
+}
+
+void Room40::talk_handler() {
+	if (!_G(spieler).R40HaendlerOk) {
+		hide_cur();
+		auto_move(6, P_CHEWY);
+		det->del_static_ani(4);
+		room->set_timer_status(4, TIMER_STOP);
+		det->set_static_ani(3, -1);
+		start_aad_wait(202, -1);
+		det->set_static_ani(4, -1);
+		det->del_static_ani(3);
+		room->set_timer_status(4, TIMER_START);
+		show_cur();
+	}
+}
+
+int16 Room40::use_haendler() {
+	int16 action_flag = false;
+	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
+		action_flag = true;
+		hide_cur();
+		invent_2_slot(DUENGER_INV);
+		_G(spieler).R40HoUse = true;
+		_G(spieler).R40HaendlerOk = true;
+		_G(spieler).R40TeilKarte = true;
+		_G(spieler).R40DuengerMit = true;
+		atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
+		auto_move(10, P_CHEWY);
+		auto_move(11, P_HOWARD);
+		start_aad_wait(208, -1);
+		auto_move(6, P_HOWARD);
+		flags.NoScroll = true;
+		auto_scroll(270, 0);
+		det->del_static_ani(4);
+		room->set_timer_status(4, TIMER_STOP);
+		det->set_static_ani(3, -1);
+		start_aad_wait(209, -1);
+		det->del_static_ani(3);
+		det->set_static_ani(5, -1);
+		start_aad_wait(213, -1);
+		if (_G(spieler).R28RKuerbis) {
+			det->del_static_ani(5);
+			det->set_static_ani(3, -1);
+			start_aad_wait(211, -1);
+			out->ausblenden(0);
+			out->set_teilpalette(pal, 255, 1);
+			start_aad_wait(212, -1);
+			out->ausblenden(0);
+			_G(spieler).R40Wettbewerb = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+			flags.NoScroll = false;
+			out->setze_zeiger(0);
+			out->cls();
+			switch_room(28);
+			SetUpScreenFunc = setup_func;
+		} else {
+			auto_move(11, P_HOWARD);
+			start_aad_wait(210, -1);
+		}
+		menu_item = CUR_WALK;
+		cursor_wahl(menu_item);
+		show_cur();
+		flags.NoScroll = false;
+		_G(spieler).R40HoUse = false;
+		flags.MausLinks = false;
+	}
+	return action_flag;
+}
+
+int16 Room40::use_bmeister() {
+	short action_flag = false;
+	if (menu_item == CUR_HOWARD) {
+		action_flag = true;
+		hide_cur();
+		_G(spieler).R40HoUse = true;
+		auto_move(9, P_CHEWY);
+		auto_move(11, P_HOWARD);
+		start_aad_wait(214, -1);
+		bmeister_dia(215);
+		start_aad_wait(216, -1);
+		_G(spieler).R40HoUse = false;
+		flags.NoScroll = false;
+		menu_item = CUR_WALK;
+		cursor_wahl(menu_item);
+		show_cur();
+	} else if (is_cur_inventar(LIKOER2_INV)) {
+		action_flag = true;
+		hide_cur();
+		_G(spieler).R40HoUse = true;
+		new_invent_2_cur(HOTEL_INV);
+
+		bmeister_dia(237);
+
+		show_cur();
+	}
+	return action_flag;
+}
+
+void Room40::bmeister_dia(int16 aad_nr) {
+	auto_move(7, P_CHEWY);
+	auto_move(12, P_HOWARD);
+	flags.NoScroll = true;
+	auto_scroll(206, 0);
+	det->del_static_ani(0);
+	room->set_timer_status(0, TIMER_STOP);
+	det->stop_detail(0);
+	start_detail_wait(1, 1, ANI_VOR);
+	det->set_static_ani(2, -1);
+	if (aad_nr == 237) {
+		start_aad_wait(aad_nr, -1);
+		flags.NoPalAfterFlc = true;
+		flic_cut(FCUT_062, FLC_MODE);
+		fx_blend = BLEND3;
+		start_aad_wait(375, -1);
+	} else
+		start_aad_wait(aad_nr, -1);
+	flags.NoPalAfterFlc = false;
+	room->set_timer_status(0, TIMER_START);
+	det->set_static_ani(0, -1);
+	det->del_static_ani(2);
+	auto_move(11, P_HOWARD);
+	auto_move(9, P_CHEWY);
+}
+
+bool Room40::use_police() {
+	bool result = false;
+
+	if (menu_item == CUR_HOWARD) {
+		if (_G(spieler).R40PoliceWeg == false &&
+			_G(spieler).R40PoliceAniStatus == 255) {
+			result = true;
+			_G(spieler).R40PoliceAb = true;
+			hide_cur();
+			_G(spieler).R40PoliceStart = false;
+			room->set_timer_status(255, TIMER_STOP);
+			_G(spieler).R40HoUse = true;
+			auto_move(9, P_CHEWY);
+			auto_move(11, P_HOWARD);
+			start_aad_wait(217, -1);
+			auto_move(8, P_CHEWY);
+			go_auto_xy(300, 120, P_HOWARD, ANI_WAIT);
+			person_end_phase[P_HOWARD] = P_RIGHT;
+			start_aad_wait(218, -1);
+			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+			menu_item = CUR_WALK;
+			cursor_wahl(menu_item);
+			show_cur();
+			flags.MausLinks = false;
+		}
+	} else {
+		start_aad_wait(225, -1);
+	}
+
+	return result;
+}
+
+int16 Room40::use_tele() {
+	int16 dia_nr = -1;
+	int16 dia_nr1 = -1;
+	int16 timer_wert;
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R40PoliceWeg == false) {
+			action_flag = true;
+			hide_cur();
+			if (!_G(spieler).R40PoliceAb) {
+				start_aad_wait(219, -1);
+				_G(spieler).R40HoUse = false;
+			} else {
+				auto_move(13, P_CHEWY);
+				det->show_static_spr(0);
+				if (!_G(spieler).R40DuengerMit) {
+					dia_nr = 220;
+					dia_nr1 = 222;
+				} else {
+					dia_nr = 221;
+					dia_nr1 = 223;
+				}
+				start_aad_wait(dia_nr, -1);
+				auto_move(11, P_HOWARD);
+				det->hide_static_spr(0);
+				auto_move(9, P_CHEWY);
+				start_aad_wait(dia_nr1, -1);
+				_G(spieler).R40HoUse = false;
+				timer_wert = 0;
+				if (dia_nr1 == 223) {
+					if (is_cur_inventar(DUENGER_INV)) {
+						del_inventar(_G(spieler).AkInvent);
+					} else {
+						obj->del_inventar(DUENGER_INV, &room_blk);
+						del_invent_slot(DUENGER_INV);
+					}
+					invent_2_slot(LIKOER_INV);
+					auto_move(1, P_CHEWY);
+					_G(spieler).R40DuengerMit = false;
+					_G(spieler).R40DuengerTele = true;
+					flags.MausLinks = true;
+					flags.MainInput = false;
+					timer_wert = 3;
+				}
+				_G(spieler).R40PoliceAb = false;
+				room->set_timer_status(255, TIMER_START);
+				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
+			}
+			if (dia_nr1 != 223)
+				show_cur();
+		}
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room40.h b/engines/chewy/rooms/room40.h
new file mode 100644
index 00000000000..5439c034331
--- /dev/null
+++ b/engines/chewy/rooms/room40.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM40_H
+#define CHEWY_ROOMS_ROOM40_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room40 {
+private:
+	static void move_train(int16 mode);
+	static void setup_func();
+	static int16 use_schalter(int16 aad_nr);
+	static void bmeister_dia(int16 aad_nr);
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static int16 use_mr_pumpkin();
+	static void talk_police();
+	static void talk_handler();
+	static int16 use_haendler();
+	static int16 use_bmeister();
+	static bool use_police();
+	static int16 use_tele();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
new file mode 100644
index 00000000000..7dfd8f25426
--- /dev/null
+++ b/engines/chewy/rooms/room41.cpp
@@ -0,0 +1,216 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room41.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room41::entry() {
+	hide_cur();
+
+	if (!_G(spieler).R41LolaOk) {
+		if (!flags.LoadGame) {
+			room->set_timer_status(0, TIMER_STOP);
+			det->del_static_ani(0);
+			start_ani_block(2, ablock32);
+			room->set_timer_status(0, TIMER_START);
+			det->set_static_ani(0, -1);
+			start_aad_wait(127, -1);
+		} else
+			det->start_detail(6, 255, ANI_VOR);
+	}
+	if (_G(spieler).R41Einbruch) {
+		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(timer_nr)[0] = room->set_timer(7, 5);
+		det->set_static_ani(7, -1);
+		det->show_static_spr(6);
+		det->show_static_spr(7);
+	}
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	show_cur();
+}
+
+void Room41::xit() {
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+	if (!_G(spieler).R41TrainCount) {
+		_G(spieler).R41TrainCount = 3;
+		_G(spieler).R40TrainMove = true;
+	}
+	--_G(spieler).R41TrainCount;
+}
+
+void Room41::talk_hoggy1() {
+	stop_hoggy();
+	auto_move(1, P_CHEWY);
+	if (!_G(spieler).R41FirstTalk) {
+		first_talk();
+	} else if (!_G(spieler).R41Einbruch) {
+		show_cur();
+		start_ads_wait(11);
+
+	} else if (_G(spieler).R41Einbruch) {
+		if (!_G(spieler).R41BruchInfo) {
+			_G(spieler).R41BruchInfo = true;
+			start_aad_wait(132, -1);
+			start_aad_wait(128, -1);
+		} else if (_G(spieler).R31SurFurz &&
+			!_G(spieler).R41KuerbisInfo) {
+			_G(spieler).R41KuerbisInfo = true;
+			start_aad_wait(131, -1);
+			auto_move(5, P_CHEWY);
+			new_invent_2_cur(TICKET_INV);
+		} else
+			start_aad_wait(130, -1);
+	} else
+		start_aad_wait(130, -1);
+	start_hoggy();
+}
+
+void Room41::talk_hoggy2() {
+	stop_hoggy();
+	auto_move(2, P_CHEWY);
+	if (!_G(spieler).R41FirstTalk) {
+		first_talk();
+	} else if (_G(spieler).R41BruchInfo) {
+		if (_G(spieler).R31SurFurz &&
+			!_G(spieler).R41KuerbisInfo) {
+			_G(spieler).R41KuerbisInfo = true;
+			start_aad_wait(131, -1);
+			auto_move(5, P_CHEWY);
+
+			new_invent_2_cur(TICKET_INV);
+		} else
+			start_aad_wait(129, -1);
+	} else {
+		start_aad_wait(129, -1);
+	}
+	start_hoggy();
+}
+
+void Room41::first_talk() {
+	_G(spieler).R41FirstTalk = true;
+	start_aad_wait(134, -1);
+	atds->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
+	atds->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
+}
+
+void Room41::start_hoggy() {
+	int16 i;
+	show_cur();
+	for (i = 0; i < 2; i++) {
+		room->set_timer_status(i, TIMER_START);
+		det->set_static_ani(i, -1);
+		det->del_static_ani(i + 3);
+	}
+}
+
+void Room41::stop_hoggy() {
+	int16 i;
+	hide_cur();
+	for (i = 0; i < 2; i++) {
+		room->set_timer_status(i, TIMER_STOP);
+		det->del_static_ani(i);
+		det->stop_detail(i);
+		det->set_static_ani(i + 3, -1);
+	}
+}
+
+int16 Room41::use_kasse() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		action_flag = true;
+		stop_hoggy();
+		auto_move(1, P_CHEWY);
+		start_aad_wait(133, -1);
+		start_hoggy();
+	}
+	return action_flag;
+}
+
+int16 Room41::use_lola() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
+			hide_cur();
+			action_flag = true;
+			_G(spieler).R41LolaOk = true;
+			auto_move(4, P_CHEWY);
+			flic_cut(FCUT_057, FLC_MODE);
+			set_person_pos(127, 112, P_CHEWY, P_LEFT);
+			det->stop_detail(6);
+
+			atds->set_ats_str(267, 1, ATS_DATEI);
+			atds->hide_item(11, 0, 3);
+			show_cur();
+		}
+	}
+	return action_flag;
+}
+
+int16 Room41::use_brief() {
+	int16 action_flag = false;
+	if (is_cur_inventar(BRIEF_INV)) {
+		action_flag = true;
+		stop_hoggy();
+		auto_move(6, P_CHEWY);
+		start_aad_wait(126, -1);
+		start_hoggy();
+	} else if (is_cur_inventar(BRIEF2_INV)) {
+		action_flag = true;
+		auto_move(6, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		stop_hoggy();
+		start_aad_wait(186, -1);
+		start_hoggy();
+		atds->set_ats_str(206, 1, ATS_DATEI);
+		_G(spieler).R28Briefkasten = true;
+		_G(spieler).R40TrainMove = true;
+		_G(spieler).R28PostCar = true;
+		_G(spieler).R42BriefOk = true;
+	}
+	return action_flag;
+}
+
+void Room41::sub_dia() {
+	aad_wait(-1);
+	start_aad_wait(161, -1);
+	if (_G(spieler).R41LolaOk) {
+		start_aad_wait(163, -1);
+		atds->hide_item(11, 0, 2);
+		stop_ads_dialog();
+		auto_move(5, P_CHEWY);
+		new_invent_2_cur(PAPIER_INV);
+	} else {
+		start_aad_wait(162, -1);
+
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room41.h b/engines/chewy/rooms/room41.h
new file mode 100644
index 00000000000..e561db7e7b3
--- /dev/null
+++ b/engines/chewy/rooms/room41.h
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM41_H
+#define CHEWY_ROOMS_ROOM41_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room41 {
+private:
+	static void first_talk();
+	static void start_hoggy();
+	static void stop_hoggy();
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_brief();
+	static int16 use_lola();
+	static int16 use_kasse();
+	static void talk_hoggy1();
+	static void talk_hoggy2();
+	static void sub_dia();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
new file mode 100644
index 00000000000..cc2ead84849
--- /dev/null
+++ b/engines/chewy/rooms/room42.cpp
@@ -0,0 +1,206 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room42.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room42::entry() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
+		SetUpScreenFunc = setup_func;
+		if (!flags.LoadGame) {
+			det->stop_detail(0);
+			_G(timer_nr)[0] = room->set_timer(8, 5);
+			det->set_static_ani(8, -1);
+			_G(spieler).R42BeamterWach = true;
+			SetUpScreenFunc = setup_func;
+
+			set_person_pos(80, 43, P_HOWARD, P_LEFT);
+
+			atds->set_ats_str(263, 1, ATS_DATEI);
+			atds->set_ats_str(264, 1, ATS_DATEI);
+		}
+		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
+			!_G(spieler).R42BriefOk)
+			start_aad_wait(302, -1);
+		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
+			_G(spieler).R42BriefOk)
+			start_aad_wait(301, -1);
+	}
+}
+
+void Room42::setup_func() {
+	if (!_G(spieler).R42HoToBeamter)
+		calc_person_look();
+}
+
+void Room42::calc_xit() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
+		if (flags.ExitMov) {
+			atds->set_ats_str(264, 1, ATS_DATEI);
+			stop_spz();
+			_G(spieler).R42HoToBeamter = false;
+
+		}
+	}
+}
+
+void Room42::get_kuerbis(int16 aad_nr) {
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(7, 1, ANI_RUECK);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+	start_aad_wait(aad_nr, -1);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(7, 1, ANI_VOR);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	show_cur();
+}
+
+int16 Room42::use_psack() {
+	int16 action_flag = false;
+	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
+		action_flag = true;
+		get_kuerbis(136);
+	} else if (_G(spieler).R42HoToBeamter &&
+		!_G(spieler).inv_cur &&
+		!_G(spieler).R42MarkeOk) {
+
+		action_flag = true;
+		auto_move(3, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(10, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		start_aad_wait(187, -1);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(9, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		new_invent_2_cur(BMARKE_INV);
+		start_aad_wait(181, -1);
+		_G(spieler).R42MarkeOk = true;
+		auto_move(4, P_CHEWY);
+		start_aad_wait(185, -1);
+		_G(spieler).R42HoToBeamter = false;
+	} else if (is_cur_inventar(BRIEF2_INV)) {
+		action_flag = true;
+		auto_move(3, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(10, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		del_inventar(_G(spieler).AkInvent);
+		start_aad_wait(183, -1);
+		obj->calc_rsi_flip_flop(SIB_BKASTEN_R28);
+		atds->set_ats_str(206, 1, ATS_DATEI);
+		_G(spieler).R28Briefkasten = true;
+		_G(spieler).R40TrainMove = true;
+		_G(spieler).R28PostCar = true;
+		_G(spieler).R42BriefOk = true;
+	} else if (is_cur_inventar(BRIEF_INV)) {
+		action_flag = true;
+		start_aad_wait(182, -1);
+	}
+	return action_flag;
+}
+
+int16 Room42::use_beamter() {
+	int16 action_flag = false;
+	if (menu_item == CUR_HOWARD) {
+		action_flag = true;
+		atds->set_ats_str(264, 2, ATS_DATEI);
+		hide_cur();
+		auto_move(4, P_CHEWY);
+		start_aad_wait(184, -1);
+		_G(spieler).R42HoToBeamter = true;
+		menu_item = CUR_WALK;
+		cursor_wahl(menu_item);
+		show_cur();
+		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+		flags.MausLinks = false;
+	}
+	return action_flag;
+}
+
+void Room42::talk_beamter() {
+	int16 dia_nr;
+	auto_move(1, P_CHEWY);
+	if (!_G(spieler).R42BeamterWach) {
+		dia_nr = 10;
+	} else if (!_G(spieler).R42MarkeOk) {
+		dia_nr = 13;
+	} else {
+		dia_nr = 14;
+	}
+	start_ads_wait(dia_nr);
+}
+
+void Room42::dia_beamter(int16 str_end_nr) {
+	hide_cur();
+	if (str_end_nr != 4) {
+		while (atds->aad_get_status() != -1 && !SHOULD_QUIT)
+			set_up_screen(DO_SETUP);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		flags.NoDiaBox = true;
+		switch (str_end_nr) {
+		case 1:
+			start_detail_wait(3, 4, ANI_VOR);
+			break;
+
+		case 2:
+			start_detail_wait(4, 4, ANI_VOR);
+			break;
+
+		case 3:
+			start_detail_wait(5, 2, ANI_VOR);
+			break;
+
+		}
+	} else {
+		while (atds->aad_get_status() < 2 && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+		det->stop_detail(0);
+		start_detail_wait(1, 1, ANI_VOR);
+		det->start_detail(2, 255, ANI_VOR);
+		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+		det->stop_detail(2);
+		det->start_detail(0, 255, ANI_VOR);
+	}
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	det->start_detail(6, 255, ANI_VOR);
+	start_aad_wait(135, -1);
+	det->stop_detail(6);
+	flags.NoDiaBox = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	show_cur();
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room42.h b/engines/chewy/rooms/room42.h
new file mode 100644
index 00000000000..fbbc07e4e51
--- /dev/null
+++ b/engines/chewy/rooms/room42.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM42_H
+#define CHEWY_ROOMS_ROOM42_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room42 {
+private:
+	static void setup_func();
+	static void get_kuerbis(int16 aad_nr);
+
+public:
+	static void entry();
+	static void calc_xit();
+	static void talk_beamter();
+	static int16 use_psack();
+	static int16 use_beamter();
+	static void dia_beamter(int16 str_end_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
new file mode 100644
index 00000000000..f452aaf2bec
--- /dev/null
+++ b/engines/chewy/rooms/room43.cpp
@@ -0,0 +1,91 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room43.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room43::night_small() {
+	int16 i;
+	hide_person();
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	switch_room(43);
+	ailsnd->stop_mod();
+	hide_cur();
+	flags.NoScroll = true;
+	_G(spieler).ScrollxStep = 1;
+	start_aad_wait(188, -1);
+	auto_scroll(320, 0);
+	start_aad_wait(189, -1);
+	auto_scroll(0, 0);
+	start_aad_wait(190, -1);
+	_G(spieler).ScrollxStep = 16;
+	auto_scroll(192, 0);
+	for (i = 0; i < 3; i++) {
+		if (i)
+			_G(spieler).ScrollxStep = 16 / i;
+		auto_scroll(128 + i * 16, 0);
+		auto_scroll(192, 0);
+	}
+	_G(spieler).scrollx = 194;
+	start_aad_wait(191, -1);
+	load_room_music(255);
+	flic_cut(FCUT_058, FLC_MODE);
+	flags.NoScroll = false;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	show_cur();
+	show_person();
+}
+
+void Room43::catch_pg() {
+	hide_person();
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	switch_room(43);
+	ailsnd->stop_mod();
+	hide_cur();
+	flags.NoScroll = true;
+	_G(spieler).ScrollxStep = 1;
+	start_aad_wait(234, -1);
+	auto_scroll(194, 0);
+	start_aad_wait(235, -1);
+	load_room_music(255);
+	_G(spieler).R43GetPgLady = true;
+	flic_cut(FCUT_058, FLC_MODE);
+	flags.NoScroll = false;
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	show_cur();
+	show_person();
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room43.h b/engines/chewy/rooms/room43.h
new file mode 100644
index 00000000000..a481f4459cc
--- /dev/null
+++ b/engines/chewy/rooms/room43.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM43_H
+#define CHEWY_ROOMS_ROOM43_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room43 {
+public:
+	static void night_small();
+	static void catch_pg();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
new file mode 100644
index 00000000000..ebc4d91e75b
--- /dev/null
+++ b/engines/chewy/rooms/room44.cpp
@@ -0,0 +1,54 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room44.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room44::look_news() {
+	int16 tmpsx, tmpsy;
+	int16 tmproom;
+	tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
+	tmpsx = _G(spieler).scrollx;
+	tmpsy = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	hide_person();
+	fx_blend = BLEND1;
+	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	ERROR
+		start_aad_wait(172, -1);
+	_G(spieler).scrollx = tmpsx;
+	_G(spieler).scrolly = tmpsy;
+	switch_room(tmproom);
+
+	show_person();
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room44.h b/engines/chewy/rooms/room44.h
new file mode 100644
index 00000000000..bad7ba00187
--- /dev/null
+++ b/engines/chewy/rooms/room44.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM44_H
+#define CHEWY_ROOMS_ROOM44_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room44 {
+public:
+	static void look_news();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/roomdefs.cpp b/engines/chewy/rooms/roomdefs.cpp
new file mode 100644
index 00000000000..e67a53ac02b
--- /dev/null
+++ b/engines/chewy/rooms/roomdefs.cpp
@@ -0,0 +1,33 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/rooms/roomdefs.h"
+
+namespace Chewy {
+
+const int16 SURIMY_TAF19_PHASEN[4][2] = {
+	{ 0, 0 },
+	{ 39, 46 },
+	{ 0, 0 },
+	{ 0, 0 }
+};
+
+} // namespace Chewy
diff --git a/engines/chewy/rooms/roomdefs.h b/engines/chewy/rooms/roomdefs.h
index faed7d6ed4a..d2a00277c53 100644
--- a/engines/chewy/rooms/roomdefs.h
+++ b/engines/chewy/rooms/roomdefs.h
@@ -22,6 +22,8 @@
 #ifndef CHEWY_ROOMS_ROOMDEFS_H
 #define CHEWY_ROOMS_ROOMDEFS_H
 
+#include "common/scummsys.h"
+
 namespace Chewy {
 
 #define ANI_HIDE 0
@@ -29,6 +31,8 @@ namespace Chewy {
 
 #define SURIMY_OBJ 0
 
+extern const int16 SURIMY_TAF19_PHASEN[4][2];
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 3bff04a70b6..7edb19d598d 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -45,6 +45,23 @@
 #include "chewy/rooms/room22.h"
 #include "chewy/rooms/room23.h"
 #include "chewy/rooms/room24.h"
+#include "chewy/rooms/room25.h"
+#include "chewy/rooms/room26.h"
+#include "chewy/rooms/room27.h"
+#include "chewy/rooms/room28.h"
+#include "chewy/rooms/room29.h"
+#include "chewy/rooms/room31.h"
+#include "chewy/rooms/room32.h"
+#include "chewy/rooms/room33.h"
+#include "chewy/rooms/room34.h"
+#include "chewy/rooms/room35.h"
+#include "chewy/rooms/room37.h"
+#include "chewy/rooms/room39.h"
+#include "chewy/rooms/room40.h"
+#include "chewy/rooms/room41.h"
+#include "chewy/rooms/room42.h"
+#include "chewy/rooms/room43.h"
+#include "chewy/rooms/room44.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -78,6 +95,23 @@ using Chewy::Rooms::Room21;
 using Chewy::Rooms::Room22;
 using Chewy::Rooms::Room23;
 using Chewy::Rooms::Room24;
+using Chewy::Rooms::Room25;
+using Chewy::Rooms::Room26;
+using Chewy::Rooms::Room27;
+using Chewy::Rooms::Room28;
+using Chewy::Rooms::Room29;
+using Chewy::Rooms::Room31;
+using Chewy::Rooms::Room32;
+using Chewy::Rooms::Room33;
+using Chewy::Rooms::Room34;
+using Chewy::Rooms::Room35;
+using Chewy::Rooms::Room37;
+using Chewy::Rooms::Room39;
+using Chewy::Rooms::Room40;
+using Chewy::Rooms::Room41;
+using Chewy::Rooms::Room42;
+using Chewy::Rooms::Room43;
+using Chewy::Rooms::Room44;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 25ccd58a220..e244fad95ae 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -77,7 +77,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					switch (txt_nr) {
 					case 229:
 						auto_move(2, P_CHEWY);
-						r39_look_tv(1);
+						Room39::look_tv(1);
 						break;
 
 					case 268:
@@ -128,7 +128,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_USE:
 					switch (txt_nr) {
 					case 62:
-						action_ret = r39_use_howard();
+						action_ret = Room39::use_howard();
 						break;
 
 					case 67:
@@ -303,131 +303,131 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 187:
-						action_ret = r25_use_gleiter();
+						action_ret = Room25::use_gleiter();
 						break;
 
 					case 203:
-						action_ret = r32_get_script();
+						action_ret = Room32::get_script();
 						break;
 
 					case 206:
-						action_ret = r28_use_breifkasten();
+						action_ret = Room28::use_breifkasten();
 						break;
 
 					case 210:
-						action_ret = r33_use_schublade();
+						action_ret = Room33::use_schublade();
 						break;
 
 					case 212:
-						action_ret = r29_zaun_sprung();
+						action_ret = Room29::zaun_sprung();
 						break;
 
 					case 215:
-						action_ret = r29_use_schlauch();
+						action_ret = Room29::use_schlauch();
 						break;
 
 					case 216:
-						action_ret = r29_use_pumpe();
+						action_ret = Room29::use_pumpe();
 						break;
 
 					case 218:
-						action_ret = r29_get_schlauch();
+						action_ret = Room29::get_schlauch();
 						break;
 
 					case 219:
-						action_ret = r25_gleiter_loesch();
+						action_ret = Room25::gleiter_loesch();
 						break;
 
 					case 220:
-						action_ret = r34_use_kuehlschrank();
+						action_ret = Room34::use_kuehlschrank();
 						break;
 
 					case 221:
-						r33_use_maschine();
+						Room33::use_maschine();
 						break;
 
 					case 227:
-						r34_xit_kuehlschrank();
+						Room34::xit_kuehlschrank();
 						break;
 
 					case 229:
-						action_ret = r39_use_tv();
+						action_ret = Room39::use_tv();
 						break;
 
 					case 230:
-						action_ret = r32_use_howard();
+						action_ret = Room32::use_howard();
 						break;
 
 					case 231:
-						r32_use_schreibmaschine();
+						Room32::use_schreibmaschine();
 						break;
 
 					case 234:
-						action_ret = r35_schublade();
+						action_ret = Room35::schublade();
 						break;
 
 					case 235:
-						action_ret = r35_use_cat();
+						action_ret = Room35::use_cat();
 						break;
 
 					case 242:
-						action_ret = r31_use_topf();
+						action_ret = Room31::use_topf();
 						break;
 
 					case 244:
-						r31_open_luke();
+						Room31::open_luke();
 						break;
 
 					case 245:
-						r31_close_luke();
+						Room31::close_luke();
 						break;
 
 					case 249:
-						action_ret = r37_use_wippe();
+						action_ret = Room37::use_wippe();
 						break;
 
 					case 251:
-						r37_use_hahn();
+						Room37::use_hahn();
 						break;
 
 					case 256:
-						action_ret = r37_use_glas();
+						action_ret = Room37::use_glas();
 						break;
 
 					case 263:
-						action_ret = r42_use_beamter();
+						action_ret = Room42::use_beamter();
 						break;
 
 					case 264:
-						action_ret = r42_use_psack();
+						action_ret = Room42::use_psack();
 						break;
 
 					case 266:
-						action_ret = r41_use_brief();
+						action_ret = Room41::use_brief();
 						break;
 
 					case 267:
-						action_ret = r41_use_lola();
+						action_ret = Room41::use_lola();
 						break;
 
 					case 269:
-						action_ret = r41_use_kasse();
+						action_ret = Room41::use_kasse();
 						break;
 
 					case 275:
-						action_ret = r40_use_police();
+						action_ret = Room40::use_police();
 						break;
 
 					case 276:
-						action_ret = r40_use_tele();
+						action_ret = Room40::use_tele();
 						break;
 
 					case 278:
-						action_ret = r40_use_mr_pumpkin();
+						action_ret = Room40::use_mr_pumpkin();
 						break;
 
 					case 284:
-						action_ret = r40_use_bmeister();
+						action_ret = Room40::use_bmeister();
 						break;
 
 					case 286:
@@ -786,7 +786,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 227:
-						r34_xit_kuehlschrank();
+						Room34::xit_kuehlschrank();
 						break;
 
 					case 294:
@@ -828,7 +828,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 62:
-						r39_talk_howard();
+						Room39::talk_howard();
 						break;
 
 					case 67:
@@ -847,31 +847,31 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 235:
-						r35_talk_cat();
+						Room35::talk_cat();
 						break;
 
 					case 251:
-						r37_talk_hahn();
+						Room37::talk_hahn();
 						break;
 
 					case 265:
-						r41_talk_hoggy1();
+						Room41::talk_hoggy1();
 						break;
 
 					case 266:
-						r41_talk_hoggy2();
+						Room41::talk_hoggy2();
 						break;
 
 					case 274:
-						r27_talk_howard();
+						Room27::talk_howard();
 						break;
 
 					case 275:
-						r40_talk_police();
+						Room40::talk_police();
 						break;
 
 					case 283:
-						r40_talk_handler();
+						Room40::talk_handler();
 						break;
 
 					case 295:
@@ -1023,7 +1023,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_LOOK:
 					switch (txt_nr) {
 					case 210:
-						r33_look_schublade();
+						Room33::look_schublade();
 						break;
 
 					case 389:
@@ -1064,7 +1064,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 225:
-						action_ret = r33_get_munter();
+						action_ret = Room33::get_munter();
 						break;
 
 					case 267:
@@ -1073,7 +1073,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 283:
-						action_ret = r40_use_haendler();
+						action_ret = Room40::use_haendler();
 						break;
 
 					case 423:
@@ -1083,7 +1083,6 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					default:
 						action_ret = false;
 						break;
-
 					}
 					break;
 
@@ -1102,7 +1101,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 263:
-						r42_talk_beamter();
+						Room42::talk_beamter();
 						break;
 
 					default:
@@ -1148,12 +1147,12 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 			break;
 
 		case 10:
-			r42_dia_beamter(str_end_nr);
+			Room42::dia_beamter(str_end_nr);
 			break;
 
 		case 11:
 			if (blk_nr == 3) {
-				r41_sub_dia();
+				Room41::sub_dia();
 			} else if (blk_nr == 0 && str_end_nr == 3) {
 				_G(spieler).R41RepairInfo = true;
 				stop_ads_dialog();
@@ -2383,7 +2382,7 @@ int16 calc_person_click(int16 p_nr) {
 	case P_CHEWY:
 		switch (_G(spieler).AkInvent) {
 		case K_MASKE_INV:
-			r28_set_pump();
+			Room28::set_pump();
 			action_ret = true;
 			break;
 


Commit: 367e8ae795b44462acfe33bdb965089efaa9aadf
    https://github.com/scummvm/scummvm/commit/367e8ae795b44462acfe33bdb965089efaa9aadf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Split episode3.cpp into separate room classes

Changed paths:
  A engines/chewy/rooms/room45.cpp
  A engines/chewy/rooms/room45.h
  A engines/chewy/rooms/room46.cpp
  A engines/chewy/rooms/room46.h
  A engines/chewy/rooms/room47.cpp
  A engines/chewy/rooms/room47.h
  A engines/chewy/rooms/room48.cpp
  A engines/chewy/rooms/room48.h
  A engines/chewy/rooms/room49.cpp
  A engines/chewy/rooms/room49.h
  A engines/chewy/rooms/room50.cpp
  A engines/chewy/rooms/room50.h
  A engines/chewy/rooms/room51.cpp
  A engines/chewy/rooms/room51.h
  A engines/chewy/rooms/room52.cpp
  A engines/chewy/rooms/room52.h
  A engines/chewy/rooms/room53.cpp
  A engines/chewy/rooms/room53.h
  A engines/chewy/rooms/room54.cpp
  A engines/chewy/rooms/room54.h
  A engines/chewy/rooms/room55.cpp
  A engines/chewy/rooms/room55.h
  A engines/chewy/rooms/room56.cpp
  A engines/chewy/rooms/room56.h
  A engines/chewy/rooms/room57.cpp
  A engines/chewy/rooms/room57.h
  A engines/chewy/rooms/room58.cpp
  A engines/chewy/rooms/room58.h
  A engines/chewy/rooms/room59.cpp
  A engines/chewy/rooms/room59.h
  A engines/chewy/rooms/room62.cpp
  A engines/chewy/rooms/room62.h
  A engines/chewy/rooms/room63.cpp
  A engines/chewy/rooms/room63.h
  A engines/chewy/rooms/room64.cpp
  A engines/chewy/rooms/room64.h
  A engines/chewy/rooms/room65.cpp
  A engines/chewy/rooms/room65.h
    engines/chewy/episode3.cpp
    engines/chewy/episode3.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/menus.cpp
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
index 617248e34d3..8b92ed1911a 100644
--- a/engines/chewy/episode3.cpp
+++ b/engines/chewy/episode3.cpp
@@ -26,3109 +26,4 @@
 
 namespace Chewy {
 
-int16 r45_delay;
-int16 r50Wasser;
-int16 r56koch_flug;
-int16 r62Delay;
-int16 r62TalkAni;
-int16 r64TalkAni;
-int16 r63ChewyAni;
-int16 r63Schalter;
-int16 r63RunDia;
-int16 r65tmp_scrollx;
-int16 r65tmp_scrolly;
-int16 r65tmp_ch_x;
-int16 r65tmp_ch_y;
-int16 r65tmp_ho_x;
-int16 r65tmp_ho_y;
-
-void r45_entry(int16 eib_nr) {
-	int16 ch_x, ch_y;
-	int16 ho_x, ho_y;
-	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = r45_setup_func;
-	r45_delay = 0;
-	_G(zoom_horizont) = 150;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 4;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
-	}
-
-	spieler_mi[P_HOWARD].Mode = true;
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			ch_x = 67;
-			ch_y = 146;
-			ho_x = 43;
-			ho_y = 129;
-
-			_G(spieler).R48TaxiEntry = false;
-			_G(maus_links_click) = false;
-		} else {
-			if (eib_nr == 72) {
-				ch_x = 259;
-				ch_y = 146;
-				ho_x = 304;
-				ho_y = 130;
-				_G(spieler).scrollx = 130;
-			} else {
-				ch_x = 68;
-				ch_y = 132;
-				ho_x = 45;
-				ho_y = 124;
-			}
-		}
-		set_person_pos(ch_x, ch_y, P_CHEWY, P_LEFT);
-		set_person_pos(ho_x, ho_y, P_HOWARD, P_LEFT);
-	}
-
-}
-
-void r45_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		spieler_mi[P_HOWARD].Mode = false;
-		if (eib_nr == 87) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
-		}
-	}
-	if (eib_nr == 87) {
-		flags.NoPalAfterFlc = true;
-		flic_cut(FCUT_073, FLC_MODE);
-	}
-}
-
-#define R45_MAX_PERSON 9
-
-int16 r45_pinfo[R45_MAX_PERSON][4] = {
-	{0, 4, 1490, 1500},
-	{0, 1, 180, 190},
-	{0, 1, 40, 60},
-	{0, 1, 40, 150},
-	{0, 1, 40, 230},
-	{0, 1, 40, 340},
-	{0, 1, 49, 50},
-	{0, 1, 5, 90},
-	{0, 1, 7, 190},
-};
-
-void r45_setup_func() {
-	int16 i;
-	int16 x;
-	int16 y;
-	int16 ch_x;
-
-	if (menu_display == 0) {
-		if (!r45_delay) {
-			r45_delay = _G(spieler).DelaySpeed / 2;
-			for (i = 0; i < R45_MAX_PERSON; i++) {
-				if (r45_pinfo[i][0] == 1) {
-					y = Adi[3 + i].y;
-					x = Adi[3 + i].x;
-					if (i < 6) {
-						x -= r45_pinfo[i][1];
-						if (x < -30) {
-							r45_pinfo[i][0] = 0;
-							det->stop_detail(3 + i);
-						}
-					} else {
-						x += r45_pinfo[i][1];
-						if (x > 540) {
-							r45_pinfo[i][0] = 0;
-							det->stop_detail(3 + i);
-						}
-					}
-					det->set_detail_pos(3 + i, x, y);
-				} else {
-					++r45_pinfo[i][2];
-					if (r45_pinfo[i][2] >= r45_pinfo[i][3]) {
-						r45_pinfo[i][2] = 0;
-						r45_pinfo[i][0] = 1;
-						y = Adi[3 + i].y;
-						if (i < 6) {
-							x = 500;
-						} else {
-							x = 0;
-						}
-						det->set_detail_pos(3 + i, x, y);
-						det->start_detail(3 + i, 255, ANI_VOR);
-					}
-				}
-			}
-		} else
-			--r45_delay;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
-			calc_person_look();
-			x = spieler_vector[P_HOWARD].Xypos[0];
-			y = 64;
-			ch_x = spieler_vector[P_CHEWY].Xypos[0];
-			if (ch_x < 95) {
-				x = 18;
-				y = 130;
-			} else if (ch_x > 240) {
-				x = 304;
-				y = 130;
-			} else {
-				x = 176;
-				y = 130;
-			}
-			if (HowardMov && flags.ExitMov) {
-				x = 56;
-				y = 122;
-			}
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
-		}
-	}
-}
-
-int16 r45_use_taxi() {
-	int16 action_ret = false;
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).ChewyAni == CHEWY_PUMPKIN) {
-			action_ret = true;
-			r45_talk_taxi(254);
-		} else if (!_G(spieler).R45TaxiOk) {
-			action_ret = true;
-			r45_talk_taxi(260);
-		} else if (_G(spieler).R45TaxiOk) {
-			action_ret = true;
-			r45_taxi_mov();
-		}
-	} else if (is_cur_inventar(RING_INV)) {
-		action_ret = true;
-		del_inventar(RING_INV);
-		r45_talk_taxi(256);
-		_G(spieler).R45TaxiOk = true;
-		r45_taxi_mov();
-	} else if (is_cur_inventar(UHR_INV)) {
-		action_ret = true;
-		r45_talk_taxi(400);
-	}
-
-	show_cur();
-	return action_ret;
-}
-
-void r45_talk_taxi(int16 aad_nr) {
-	room->set_timer_status(12, TIMER_STOP);
-	det->del_static_ani(12);
-	start_detail_wait(13, 1, ANI_VOR);
-	det->set_static_ani(14, -1);
-	start_aad_wait(aad_nr, -1);
-	det->del_static_ani(14);
-	start_detail_wait(13, 1, ANI_RUECK);
-	det->set_static_ani(12, -1);
-	room->set_timer_status(12, TIMER_START);
-}
-
-void r45_taxi_mov() {
-	HowardMov = 2;
-	room->set_timer_status(12, TIMER_STOP);
-	det->del_static_ani(12);
-	det->show_static_spr(11);
-	auto_move(3, P_CHEWY);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		go_auto_xy(93, 127, P_HOWARD, ANI_WAIT);
-		_G(spieler).PersonHide[P_HOWARD] = true;
-		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
-	}
-	det->hide_static_spr(11);
-	start_detail_wait(15, 1, ANI_VOR);
-
-	switch_room(48);
-}
-
-int16 r45_use_boy() {
-	int16 action_ret = false;
-	hide_cur();
-	auto_move(2, P_CHEWY);
-	if (!_G(spieler).R45MagOk) {
-		if (is_cur_inventar(DOLLAR175_INV)) {
-			action_ret = true;
-			new_invent_2_cur(CUTMAG_INV);
-			atds->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATEI);
-			start_aad_wait(258, -1);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
-			start_detail_wait(1, 1, ANI_VOR);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
-			_G(spieler).R45MagOk = true;
-		}
-	} else
-		start_aad_wait(259, -1);
-	show_cur();
-	return action_ret;
-}
-
-void r45_talk_boy() {
-	int16 aad_nr;
-	hide_cur();
-	if (!_G(spieler).R45MagOk) {
-		auto_move(2, P_CHEWY);
-		aad_nr = 257;
-	} else
-		aad_nr = 259;
-	start_aad_wait(aad_nr, -1);
-	show_cur();
-}
-
-void r46_entry(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
-		SetUpScreenFunc = r46setup_func;
-		if (eib_nr == 79) {
-			set_person_pos(140, 90, P_HOWARD, P_LEFT);
-			auto_move(3, P_CHEWY);
-			set_person_spr(P_LEFT, P_CHEWY);
-		}
-	}
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = true;
-		SetUpScreenFunc = r46setup_func;
-	}
-	if (_G(spieler).R47SchlossOk && !_G(spieler).R46GetLeder)
-		r46_bodo();
-}
-
-void r46_exit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = false;
-	}
-}
-
-void r46setup_func() {
-	int16 x;
-	int16 y;
-	int16 ch_x;
-	calc_person_look();
-	x = spieler_vector[P_HOWARD].Xypos[0];
-	y = 64;
-	ch_x = spieler_vector[P_CHEWY].Xypos[0];
-	if (ch_x > 160) {
-		x = 260;
-	} else
-		x = 120;
-	if (HowardMov && flags.ExitMov) {
-		x = 160;
-		y = 200;
-	}
-	go_auto_xy(x, y, P_HOWARD, ANI_GO);
-}
-
-void r46_bodo() {
-	hide_cur();
-	det->show_static_spr(0);
-	person_end_phase[P_CHEWY] = P_RIGHT;
-	start_aad_wait(240, -1);
-	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(42, 76, P_CHEWY, ANI_WAIT);
-	start_aad_wait(250, -1);
-	auto_move(1, P_CHEWY);
-	set_person_spr(P_RIGHT, P_CHEWY);
-	start_aad_wait(251, -1);
-	auto_move(2, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
-	start_detail_wait(0, 1, ANI_VOR);
-	det->start_detail(5, 255, ANI_VOR);
-	start_aad_wait(241, -1);
-	det->stop_detail(5);
-	start_detail_wait(2, 1, ANI_VOR);
-	start_detail_wait(3, 1, ANI_VOR);
-	det->start_detail(4, 255, ANI_VOR);
-	start_aad_wait(242, -1);
-	det->stop_detail(4);
-	start_detail_wait(6, 1, ANI_VOR);
-	det->show_static_spr(3);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(1, 1, ANI_VOR);
-	flic_cut(FCUT_065, FLC_MODE);
-	flic_cut(FCUT_066, FLC_MODE);
-	out->setze_zeiger(0);
-	out->cls();
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	det->hide_static_spr(0);
-	det->hide_static_spr(3);
-	load_chewy_taf(CHEWY_ROCKER);
-	set_person_pos(213, 118, P_CHEWY, P_RIGHT);
-	start_aad_wait(243, -1);
-	invent_2_slot(UHR_INV);
-	invent_2_slot(RING_INV);
-	_G(spieler).R46GetLeder = true;
-	show_cur();
-}
-
-void r46_kloppe() {
-	int16 i;
-	int16 delay;
-	for (i = 0; i < 4; i++) {
-		mem->file->select_pool_item(Ci.Handle, FCUT_065);
-
-		flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-		out->setze_zeiger(0);
-		out->cls();
-		start_aad(244 + i, -1);
-		delay = _G(spieler).DelaySpeed * 50;
-		atds->print_aad(0, 0);
-		while (in->get_switch_code() == 0 && delay) {
-			out->skip_frame(1);
-			--delay;
-		}
-	}
-	ailsnd->fade_out(0);
-	out->cls();
-	while (ailsnd->music_playing());
-}
-
-int16 r46_use_schloss() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		if (!_G(spieler).R46GetLeder) {
-			auto_move(1, P_CHEWY);
-			switch_room(47);
-		} else
-			start_aad_wait(252, -1);
-	}
-	return action_ret;
-}
-
-void r47_entry() {
-	hide_person();
-	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
-	SetUpScreenFunc = r47_set_detail;
-}
-
-void r47_exit() {
-	show_person();
-	set_person_pos(114, 102, P_CHEWY, P_LEFT);
-	spieler_mi[P_HOWARD].Mode = true;
-}
-
-int16 r47_use_knopf(int16 txt_nr) {
-	int16 k_nr = 0;
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		switch (txt_nr) {
-		case 286:
-			k_nr = 0;
-			break;
-
-		case 292:
-			k_nr = 1;
-			break;
-
-		case 293:
-			k_nr = 2;
-			break;
-
-		}
-		++_G(spieler).R47Schloss[k_nr];
-		if (_G(spieler).R47Schloss[k_nr] > 9)
-			_G(spieler).R47Schloss[k_nr] = 0;
-
-		if (_G(spieler).R47Schloss[0] == 7 &&
-		        _G(spieler).R47Schloss[1] == 6 &&
-		        _G(spieler).R47Schloss[2] == 2)
-			_G(spieler).R47SchlossOk = true;
-		else
-			_G(spieler).R47SchlossOk = false;
-	}
-	return action_ret;
-}
-
-void r47_set_detail() {
-	int16 i;
-	for (i = 0; i < 10; i++)
-		det->hide_static_spr(i);
-	for (i = 0; i < 3; i++) {
-		det->show_static_spr(_G(spieler).R47Schloss[i]);
-		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
-		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
-	}
-	for (i = 0; i < 10; i++)
-		det->hide_static_spr(i);
-}
-
-void r48_entry() {
-	_G(maus_links_click) = false;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	show_cur();
-	r48calc_pic();
-	SetUpScreenFunc = r48setup_func;
-	_G(timer_nr)[0] = room->set_timer(255, 20);
-
-}
-
-void r48calc_pic() {
-	int16 i;
-	for (i = 0; i < 2; i++) {
-		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(spieler).R48Auswahl[3 + i] = 0;
-	}
-	_G(spieler).R48Auswahl[0] = 1;
-	_G(spieler).R48Auswahl[1] = 1;
-	_G(spieler).R48Auswahl[2] = 1;
-
-	if (obj->check_inventar(VCARD_INV)) {
-		_G(spieler).R48Auswahl[3] = 1;
-		atds->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
-		det->show_static_spr(4);
-	}
-	if (obj->check_inventar(KAPPE_INV)) {
-		_G(spieler).R48Auswahl[4] = 1;
-		atds->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
-		det->show_static_spr(4);
-	}
-}
-
-void r48_frage() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		hide_cur();
-		start_detail_wait(1, 1, ANI_VOR);
-		det->show_static_spr(6);
-		start_detail_wait(1, 1, ANI_RUECK);
-		det->hide_static_spr(6);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		show_cur();
-		flags.AutoAniPlay = false;
-	}
-}
-
-void r48setup_func() {
-	int16 idx;
-	int16 r_nr;
-	int16 i;
-	for (i = 0; i < 5; i++)
-		det->hide_static_spr(1 + i);
-	if (flags.ShowAtsInvTxt) {
-		if (menu_display == 0) {
-			if (menu_item != CUR_USE) {
-				menu_item = CUR_USE;
-			}
-			cur_2_inventory();
-			cursor_wahl(CUR_ZEIGE);
-			idx = det->maus_vector(minfo.x, minfo.y);
-			if (idx != -1) {
-				if (_G(spieler).R48Auswahl[idx]) {
-					det->show_static_spr(1 + idx);
-					if (_G(maus_links_click)) {
-						switch (idx) {
-						case 0:
-							r_nr = 45;
-							break;
-
-						case 1:
-							r_nr = 49;
-							break;
-
-						case 2:
-							r_nr = 54;
-							break;
-
-						case 3:
-							r_nr = 57;
-							break;
-
-						case 4:
-							r_nr = 56;
-							break;
-
-						default:
-							r_nr = -1;
-							break;
-
-						}
-						if (r_nr != -1) {
-							SetUpScreenFunc = 0;
-							det->hide_static_spr(1 + idx);
-							hide_cur();
-							room->set_timer_status(255, TIMER_STOP);
-							room->set_timer_status(0, TIMER_STOP);
-							det->stop_detail(0);
-							det->del_static_ani(0);
-							start_detail_wait(2, 1, ANI_VOR);
-							menu_item = CUR_WALK;
-							cursor_wahl(menu_item);
-							show_cur();
-							_G(spieler).R48TaxiEntry = true;
-							_G(maus_links_click) = false;
-							set_up_screen(DO_SETUP);
-							for (i = 0; i < MAX_PERSON; i++) {
-								if (_G(spieler).R48TaxiPerson[i]) {
-									_G(spieler).PersonHide[i] = false;
-									_G(spieler).R48TaxiPerson[i] = false;
-								}
-							}
-							if (_G(spieler).PersonRoomNr[P_HOWARD] == 48) {
-								_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
-							}
-							switch_room(r_nr);
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-void r49_entry(int16 eib_nr) {
-	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = r49setup_func;
-	if (!_G(spieler).R49BoyWeg)
-		_G(timer_nr)[0] = room->set_timer(255, 2);
-	else {
-		det->del_static_ani(0);
-		det->hide_static_spr(5);
-	}
-
-	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
-	spieler_mi[P_HOWARD].Mode = true;
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			_G(spieler).R48TaxiEntry = false;
-			set_person_pos(527, 76, P_HOWARD, P_LEFT);
-			set_person_pos(491, 98, P_CHEWY, P_LEFT);
-			_G(maus_links_click) = false;
-			_G(spieler).scrollx = 320;
-			_G(spieler).scrolly = 0;
-			det->start_detail(5, 1, ANI_VOR);
-		} else if (eib_nr == 83)
-			set_person_pos(377, 78, P_HOWARD, P_LEFT);
-	}
-
-}
-
-void r49_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-		spieler_mi[P_HOWARD].Mode = false;
-		if (eib_nr == 80)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
-		else if (eib_nr == 81) {
-			SetUpScreenFunc = 0;
-			start_aad_wait(268, -1);
-		}
-	}
-}
-
-void r49_calc_boy_ani() {
-	if (!_G(spieler).R49BoyAniCount) {
-		_G(spieler).R49BoyAniCount = 3;
-		_G(spieler).R49BoyAni = 1;
-		det->del_static_ani(0);
-	} else {
-		--_G(spieler).R49BoyAniCount;
-		_G(spieler).R49BoyAni = 0;
-		det->del_static_ani(1);
-	}
-	det->set_static_ani(_G(spieler).R49BoyAni, -1);
-	det->start_detail(_G(spieler).R49BoyAni, 1, ANI_VOR);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
-}
-
-void r49_calc_boy() {
-	if (!_G(spieler).R49WegFrei) {
-		hide_cur();
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		stop_person(P_CHEWY);
-		stop_person(P_HOWARD);
-		person_end_phase[P_CHEWY] = P_LEFT;
-		det->stop_detail(_G(spieler).R49BoyAni);
-
-		det->del_static_ani(_G(spieler).R49BoyAni);
-		det->set_static_ani(2, -1);
-		SetUpScreenFunc = 0;
-		start_aad_wait(262, -1);
-		SetUpScreenFunc = r49setup_func;
-		SetUpScreenFunc = 0;
-		auto_move(3, P_CHEWY);
-		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
-		det->del_static_ani(2);
-		start_detail_wait(3, 1, ANI_VOR);
-		start_detail_wait(4, 1, ANI_RUECK);
-		SetUpScreenFunc = r49setup_func;
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
-		room->set_timer_status(255, TIMER_START);
-		show_cur();
-	}
-}
-
-int16 r49_use_boy() {
-	int16 tmp;
-	int16 action_ret = false;
-	if (is_cur_inventar(SPARK_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(3, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		r49_talk_boy(265);
-		_G(spieler).R49WegFrei = true;
-		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
-		show_cur();
-	} else if (is_cur_inventar(CIGAR_INV)) {
-		action_ret = true;
-		hide_cur();
-		del_inventar(_G(spieler).AkInvent);
-		r49_talk_boy(263);
-		SetUpScreenFunc = 0;
-		auto_move(5, P_CHEWY);
-		tmp = room->room_info->ZoomFak;
-		room->set_zoom(0);
-		go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
-		flags.NoScroll = true;
-		auto_scroll(164, 0);
-		flic_cut(FCUT_067, FLC_MODE);
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->del_static_ani(_G(spieler).R49BoyAni);
-		det->stop_detail(_G(spieler).R49BoyAni);
-		flags.NoScroll = false;
-
-		set_person_spr(P_RIGHT, P_CHEWY);
-		start_aad_wait(264, -1);
-		room->set_zoom(tmp);
-		obj->add_inventar(GUM_INV, &room_blk);
-		inventory_2_cur(GUM_INV);
-		atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
-		SetUpScreenFunc = r49setup_func;
-		_G(spieler).R49BoyWeg = true;
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r49_use_boy_cigar() {
-	hide_cur();
-	del_inventar(_G(spieler).AkInvent);
-	r49_talk_boy(263);
-	SetUpScreenFunc = nullptr;
-	auto_move(5, 0);
-
-	int16 zoom = room->room_info->ZoomFak;
-	room->set_zoom(zoom);
-	go_auto_xy(416, 79, 1, 0);
-	set_person_spr(0, 1);
-	flags.NoScroll = true;
-
-	auto_scroll(164, 0);
-	flic_cut(67, 0);
-	test_intro(17);
-	ERROR
-
-	room->set_timer_status(255, 0);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
-	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
-	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
-
-	flags.NoScroll = false;
-	set_person_spr(1, 0);
-	start_aad_wait(264, -1);
-	room->set_zoom(zoom);
-
-	obj->add_inventar(68, &room_blk);
-	inventory_2_cur(68);
-	atds->set_steuer_bit(318, 1, 1);
-
-	SetUpScreenFunc = r49setup_func;
-	_G(spieler).R49BoyWeg = true;
-	show_cur();
-}
-
-void r49_talk_boy() {
-	if (!_G(spieler).R49BoyWeg) {
-		auto_move(3, P_CHEWY);
-		r49_talk_boy(266 + _G(spieler).R49WegFrei);
-	}
-}
-
-void r49_talk_boy(int16 aad_nr) {
-	if (!_G(spieler).R49BoyWeg) {
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->stop_detail(_G(spieler).R49BoyAni);
-
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
-		det->set_static_ani(2, -1);
-		SetUpScreenFunc = 0;
-		stop_person(P_HOWARD);
-		start_aad_wait(aad_nr, -1);
-		SetUpScreenFunc = r49setup_func;
-		det->del_static_ani(2);
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
-		room->set_timer_status(255, TIMER_START);
-	}
-}
-
-void r49_look_hotel() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-
-		SetUpScreenFunc = 0;
-		stop_person(P_HOWARD);
-		start_aad_wait(261, -1);
-		SetUpScreenFunc = r49setup_func;
-	}
-}
-
-int16 r49_use_taxi() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		hide_cur();
-		start_ani_block(2, ablock34);
-		det->show_static_spr(7);
-		auto_move(2, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-			go_auto_xy(507, 74, P_HOWARD, ANI_WAIT);
-			go_auto_xy(490, 58, P_HOWARD, ANI_WAIT);
-			_G(spieler).PersonHide[P_HOWARD] = true;
-			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
-		}
-		det->hide_static_spr(7);
-		start_detail_wait(5, 1, ANI_VOR);
-		switch_room(48);
-	}
-	return action_ret;
-}
-
-void r49setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (ch_x < 130) {
-			x = 40;
-			y = 97;
-		} else if (ch_x < 312) {
-			x = 221;
-			y = 94;
-		} else if (ch_x < 445) {
-			x = 342;
-			y = 93;
-		} else {
-			x = 536;
-			y = 90;
-		}
-
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-void r50_entry(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).R50Zigarre) {
-		r50_stop_cigar();
-	} else
-		det->start_detail(0, 255, ANI_VOR);
-	if (!_G(spieler).R50KeyOK) {
-		_G(timer_nr)[0] = room->set_timer(1, 8);
-		r50Wasser = false;
-	} else
-		det->show_static_spr(4);
-	SetUpScreenFunc = r50setup_func;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
-		spieler_mi[P_HOWARD].Mode = true;
-		if (!flags.LoadGame) {
-			if (eib_nr == 85)
-				set_person_pos(298, 56, P_HOWARD, P_RIGHT);
-			else
-				set_person_pos(1, 64, P_HOWARD, P_RIGHT);
-		}
-	}
-}
-
-void r50_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
-		if (eib_nr == 83)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 49;
-		else
-			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
-		spieler_mi[P_HOWARD].Mode = false;
-	}
-}
-
-void r50_stop_cigar() {
-	room->set_timer_status(0, TIMER_STOP);
-	det->del_static_ani(0);
-	atds->set_ats_str(328, 1, ATS_DATEI);
-	det->stop_detail(0);
-	_G(spieler).R50Zigarre = true;
-}
-
-void r50_calc_wasser() {
-	if (!r50Wasser) {
-		r50_stop_page();
-		det->start_detail(4, 1, ANI_VOR);
-		r50Wasser = true;
-	}
-}
-
-void r50_stop_page() {
-	room->set_timer_status(3, TIMER_STOP);
-	det->del_static_ani(3);
-	det->stop_detail(3);
-	det->stop_detail(4);
-}
-
-void r50_go_page() {
-	det->set_static_ani(3, -1);
-	room->set_timer_status(3, TIMER_START);
-}
-
-void r50_calc_treppe() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
-		if (!_G(spieler).R50KeyOK) {
-			hide_cur();
-			stop_person(P_CHEWY);
-			room->set_timer_status(1, TIMER_STOP);
-			r50Wasser = false;
-			r50_stop_page();
-			det->set_static_ani(5, -1);
-			start_aad_wait(272, -1);
-			auto_move(3, P_CHEWY);
-			r50_aad_page(273, 5);
-		}
-		flags.AutoAniPlay = false;
-	}
-}
-
-int16 r50_use_gutschein() {
-	int16 action_ret = false;
-	if (is_cur_inventar(HOTEL_INV)) {
-		action_ret = true;
-		if (!_G(spieler).R50KeyOK) {
-			hide_cur();
-			auto_move(3, P_CHEWY);
-			room->set_timer_status(1, TIMER_STOP);
-			r50Wasser = false;
-			r50_stop_page();
-			del_inventar(_G(spieler).AkInvent);
-			start_ani_block(2, ablock36);
-			r50_aad_page(274, 8);
-		} else
-			start_aad_wait(276, -1);
-	}
-	return action_ret;
-}
-
-int16 r50_use_gum() {
-	int16 action_ret = false;
-	if (is_cur_inventar(GUM_INV)) {
-		action_ret = true;
-		hide_cur();
-		_G(spieler).R50KeyOK = true;
-		room->set_timer_status(1, TIMER_STOP);
-		r50Wasser = false;
-		r50_stop_page();
-		start_detail_wait(6, 1, ANI_VOR);
-		det->set_static_ani(5, -1);
-		auto_move(3, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
-		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
-		SetUpScreenFunc = 0;
-		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
-		del_inventar(_G(spieler).AkInvent);
-		hide_person();
-		start_detail_wait(2, 1, ANI_VOR);
-		det->show_static_spr(4);
-		start_detail_wait(2, 1, ANI_RUECK);
-		show_person();
-		set_person_spr(P_LEFT, P_CHEWY);
-		start_aad_wait(275, -1);
-		det->del_static_ani(5);
-		start_detail_wait(9, 1, ANI_VOR);
-		det->del_static_ani(5);
-		det->set_static_ani(10, -1);
-		start_aad_wait(277, -1);
-		SetUpScreenFunc = r50setup_func;
-		auto_move(3, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
-		det->del_static_ani(10);
-		r50_go_page();
-		obj->add_inventar(KEY_INV, &room_blk);
-		inventory_2_cur(KEY_INV);
-		atds->set_ats_str(323, 1, ATS_DATEI);
-		atds->set_ats_str(327, 1, ATS_DATEI);
-		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r50_talk_page() {
-	start_aad_wait(276, -1);
-}
-
-void r50_aad_page(int16 aad_nr, int16 ani_nr) {
-	det->set_static_ani(ani_nr, -1);
-	start_aad_wait(aad_nr, -1);
-	det->del_static_ani(ani_nr);
-	start_detail_wait(6, 1, ANI_RUECK);
-	r50_go_page();
-	if (!_G(spieler).R50KeyOK)
-		room->set_timer_status(1, TIMER_START);
-	show_cur();
-}
-
-void r50setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	if (r50Wasser && !det->get_ani_status(4)) {
-		r50Wasser = false;
-		r50_go_page();
-	}
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
-		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (ch_x < 72) {
-			x = 1;
-			y = 64;
-		} else if (ch_x < 275 && spieler_vector[P_CHEWY].Xypos[1] > 72) {
-			x = 143;
-			y = 57;
-		} else {
-			x = 162;
-			y = 115;
-		}
-		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = 0;
-			HowardMov = 0;
-			auto_move(4, P_HOWARD);
-		} else
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-void r51_entry() {
-	int16 i;
-	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 4;
-	for (i = 0; i < 2; i++)
-		det->start_detail(3 + i, 1, ANI_VOR);
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
-		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-		_G(spieler).ZoomXy[P_HOWARD][1] = 30;
-		if (!flags.LoadGame) {
-			set_person_pos(88, 93, P_HOWARD, P_RIGHT);
-		}
-		if (!_G(spieler).R51FirstEntry) {
-			hide_cur();
-			_G(spieler).R51FirstEntry = true;
-			set_person_spr(P_LEFT, P_CHEWY);
-			start_aad_wait(283, -1);
-			show_cur();
-		}
-		SetUpScreenFunc = r51setup_func;
-		spieler_mi[P_HOWARD].Mode = true;
-	}
-}
-
-void r51_exit(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
-		if (eib_nr == 85) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
-		} else
-			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
-		spieler_mi[P_HOWARD].Mode = false;
-	}
-}
-
-void r51setup_func() {
-	int16 x, y;
-	int16 ch_y;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
-		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
-		if (ch_y < 129) {
-			x = 56;
-			y = 106;
-		} else {
-			x = 31;
-			y = 118;
-		}
-		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = 0;
-			HowardMov = 0;
-			auto_move(9, P_HOWARD);
-		} else
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-int16 r51_use_door(int16 txt_nr) {
-	int16 action_ret = false;
-	if (is_cur_inventar(KEY_INV)) {
-		hide_cur();
-		action_ret = true;
-		switch (txt_nr) {
-		case 329:
-			auto_move(8, P_CHEWY);
-			SetUpScreenFunc = 0;
-			det->show_static_spr(0);
-			if (!_G(spieler).R51HotelRoom) {
-				auto_move(11, P_HOWARD);
-				set_person_spr(P_LEFT, P_HOWARD);
-				_G(spieler).R51HotelRoom = true;
-				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
-				start_aad_wait(285, -1);
-				atds->set_ats_str(329, 1, ATS_DATEI);
-				SetUpScreenFunc = r51setup_func;
-			} else {
-				show_cur();
-				switch_room(52);
-			}
-			break;
-
-		case 330:
-			auto_move(9, P_CHEWY);
-			if (!_G(spieler).R51KillerWeg) {
-				det->show_static_spr(1);
-				start_detail_wait(2, 1, ANI_VOR);
-				det->start_detail(5, 255, ANI_VOR);
-				if (!_G(spieler).R52HotDogOk) {
-					start_aad_wait(287, -1);
-					auto_move(12, P_CHEWY);
-					det->stop_detail(5);
-					start_ani_block(5, ablock37);
-					det->hide_static_spr(1);
-					start_aad_wait(284, -1);
-				} else {
-					_G(spieler).R51KillerWeg = true;
-					start_aad_wait(290, -1);
-					out->ausblenden(1);
-					out->setze_zeiger(0);
-					out->cls();
-					out->einblenden(pal, 0);
-					flags.NoPalAfterFlc = true;
-					flc->set_flic_user_function(r51_cut_serv);
-					det->show_static_spr(16);
-					flic_cut(FCUT_068, FLC_MODE);
-					flc->remove_flic_user_function();
-					det->hide_static_spr(16);
-					flags.NoPalAfterFlc = false;
-					det->stop_detail(5);
-					obj->show_sib(SIB_AUSRUEST_R52);
-					obj->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
-					det->hide_static_spr(1);
-
-					fx_blend = BLEND3;
-					set_up_screen(DO_SETUP);
-					start_aad_wait(291, -1);
-				}
-			} else
-				start_aad_wait(401, -1);
-			break;
-
-		case 331:
-			auto_move(10, P_CHEWY);
-			break;
-
-		case 332:
-			auto_move(6, P_CHEWY);
-			start_aad_wait(286, -1);
-			break;
-
-		case 333:
-			auto_move(4, P_CHEWY);
-			switch (_G(spieler).R51DoorCount) {
-			case 0:
-				det->show_static_spr(3);
-				start_aad_wait(278, -1);
-				start_detail_frame(0, 1, ANI_VOR, 3);
-				start_spz(HO_BRILL_JMP, 1, ANI_VOR, P_HOWARD);
-				wait_detail(0);
-
-				det->show_static_spr(14);
-				start_aad_wait(279, -1);
-				++_G(spieler).R51DoorCount;
-				obj->show_sib(SIB_FLASCHE_R51);
-				obj->calc_rsi_flip_flop(SIB_FLASCHE_R51);
-				det->hide_static_spr(3);
-				break;
-
-			case 1:
-				det->show_static_spr(3);
-				start_aad_wait(280, -1);
-				start_detail_wait(1, 1, ANI_VOR);
-				++_G(spieler).R51DoorCount;
-				obj->show_sib(SIB_KAPPE_R51);
-				obj->calc_rsi_flip_flop(SIB_KAPPE_R51);
-				det->hide_static_spr(3);
-				det->show_static_spr(15);
-				break;
-
-			default :
-				start_aad_wait(281, -1);
-				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
-					start_aad_wait(282, -1);
-				break;
-
-			}
-			break;
-
-		case 334:
-			auto_move(7, P_CHEWY);
-			break;
-
-		}
-		show_cur();
-	}
-	return action_ret;
-}
-
-int16 r51_cut_serv(int16 frame) {
-	det->plot_static_details(0, 0, 16, 16);
-	return 0;
-}
-
-void r51_timer_action(int16 t_nr, int16 obj_nr) {
-	// TODO
-}
-
-void r52_entry() {
-	SetUpScreenFunc = r52setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg)
-		r52_plot_armee(0);
-	if (_G(spieler).R52KakerWeg)
-		det->stop_detail(0);
-	if (!flags.LoadGame) {
-		det->show_static_spr(4);
-		_G(spieler).R52TuerAuf = true;
-		set_person_pos(20, 50, P_HOWARD, P_LEFT);
-		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
-		auto_move(2, P_CHEWY);
-		_G(spieler).R52TuerAuf = false;
-		det->hide_static_spr(4);
-		check_shad(2, 1);
-	}
-}
-
-void r52_exit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 51;
-		spieler_mi[P_HOWARD].Mode = false;
-	}
-}
-
-int16 r52_use_hot_dog() {
-	int16 i;
-	int16 action_ret = false;
-	hide_cur();
-	if (is_cur_inventar(BURGER_INV)) {
-		action_ret = true;
-		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
-		det->show_static_spr(0);
-		del_inventar(_G(spieler).AkInvent);
-		auto_move(4, P_CHEWY);
-		_G(spieler).R52HotDogOk = true;
-		r52_plot_armee(20);
-		atds->set_ats_str(341, 1, ATS_DATEI);
-		auto_move(2, P_CHEWY);
-		set_person_spr(P_LEFT, P_CHEWY);
-		start_aad_wait(288, -1);
-	} else if (is_cur_inventar(KILLER_INV)) {
-		action_ret = true;
-		auto_move(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_VOR);
-		det->start_detail(8, 255, ANI_VOR);
-		for (i = 0; i < 5; i++) {
-			wait_show_screen(20);
-			det->stop_detail(2 + i);
-		}
-		det->stop_detail(0);
-		det->stop_detail(8);
-		start_detail_wait(7, 1, ANI_RUECK);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
-		start_aad_wait(303, -1);
-		atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
-		_G(spieler).R52KakerWeg = true;
-	}
-	show_cur();
-	return action_ret;
-}
-
-void r52_plot_armee(int16 frame) {
-	int16 i;
-	for (i = 0; i < 5; i++) {
-		wait_show_screen(frame);
-		det->start_detail(2 + i, 255, ANI_VOR);
-	}
-}
-
-void r52_kaker_platt() {
-	if (!_G(spieler).R52KakerJoke &&
-	        _G(spieler).R52HotDogOk &&
-	        !_G(spieler).R52KakerWeg &&
-	        !flags.ExitMov) {
-		_G(spieler).R52KakerJoke = true;
-		stop_person(P_CHEWY);
-		start_aad_wait(289, -1);
-	}
-}
-
-void r52setup_func() {
-	int16 x, y;
-	int16 ch_y;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
-		calc_person_look();
-		x = 1;
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
-		if (ch_y < 97) {
-			y = 44;
-		} else {
-			y = 87;
-		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-void r53_entry() {
-	hide_cur();
-	obj->hide_sib(SIB_VISIT_R53);
-	atds->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-	start_detail_wait(0, 1, ANI_VOR);
-	det->set_static_ani(1, -1);
-	_G(timer_nr)[0] = room->set_timer(1, 7);
-	show_cur();
-}
-
-void r53_man_go() {
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	start_detail_wait(5, 1, ANI_VOR);
-	atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-	if (!_G(spieler).R53Visit)
-		obj->show_sib(SIB_VISIT_R53);
-}
-
-void r53_talk_man() {
-	hide_cur();
-	auto_move(2, P_CHEWY);
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	start_detail_wait(2, 1, ANI_VOR);
-	det->set_static_ani(3, -1);
-	start_aad_wait(269 + (int16)_G(spieler).R53Kostuem, -1);
-	det->del_static_ani(3);
-	start_detail_wait(4, 1, ANI_VOR);
-	r53_man_go();
-	show_cur();
-}
-
-int16 r53_use_man() {
-	int16 action_ret = false;
-	if (is_cur_inventar(BESTELL_INV)) {
-		action_ret = true;
-		hide_cur();
-		_G(spieler).R53Kostuem = true;
-		del_inventar(_G(spieler).AkInvent);
-		auto_move(2, P_CHEWY);
-		start_aad_wait(271, -1);
-		room->set_timer_status(1, TIMER_STOP);
-		det->del_static_ani(1);
-		start_ani_block(7, ablock35);
-		obj->add_inventar(JMKOST_INV, &room_blk);
-		inventory_2_cur(JMKOST_INV);
-		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r54_entry(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = r54_setup_func;
-	_G(zoom_horizont) = 106;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
-	if (_G(spieler).R54FputzerWeg)
-		det->show_static_spr(9);
-	spieler_mi[P_HOWARD].Mode = true;
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			_G(spieler).R48TaxiEntry = false;
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-				_G(spieler).R54HowardVorne = false;
-				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
-			}
-			set_person_pos(300, 80, P_CHEWY, P_LEFT);
-			_G(maus_links_click) = false;
-			_G(spieler).scrollx = 134;
-			_G(spieler).scrolly = 0;
-		} else if (_G(spieler).R55Location) {
-			r54_aufzug_ab();
-		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-				_G(spieler).R54HowardVorne = false;
-				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
-			}
-			_G(spieler).scrollx = 66;
-			set_person_pos(241, 85, P_CHEWY, P_LEFT);
-		}
-		if (_G(spieler).R55ExitDia) {
-			start_aad_wait(_G(spieler).R55ExitDia, -1);
-		}
-		if (_G(spieler).R55R54First) {
-			_G(spieler).R55R54First = false;
-			r54_calc_auto_taxi();
-		}
-	}
-}
-
-void r54_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
-		spieler_mi[P_HOWARD].Mode = false;
-	}
-}
-
-void r54_calc_auto_taxi() {
-	int16 r_nr;
-	r_nr = 0;
-	if (_G(spieler).R56AbfahrtOk) {
-		r_nr = 57;
-	} else if (obj->check_inventar(KAPPE_INV)) {
-		r_nr = 56;
-	}
-	if (r_nr) {
-		hide_cur();
-		auto_move(7, P_CHEWY);
-		_G(spieler).R54HowardVorne = false;
-		go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
-		_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
-		_G(maus_links_click) = false;
-		show_cur();
-		_G(spieler).R48TaxiEntry = true;
-		switch_room(r_nr);
-	}
-}
-
-void r54_setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (_G(spieler).R54HowardVorne != 255) {
-			if (_G(spieler).R54HowardVorne) {
-				if (ch_x < 218) {
-					x = 150;
-					y = 113;
-				} else {
-					x = 287;
-					y = 115;
-				}
-			} else {
-				y = 61;
-				if (ch_x < 167) {
-					x = 122;
-				} else if (ch_x < 251) {
-					x = 212;
-				} else {
-					x = 290;
-				}
-			}
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
-		}
-	}
-}
-
-int16 r54_use_schalter() {
-	int16 aad_nr;
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		hide_cur();
-		action_ret = true;
-		if (!_G(spieler).R54FputzerWeg) {
-			auto_move(1, P_CHEWY);
-			_G(spieler).R54HowardVorne = 255;
-			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
-			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
-			start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
-			det->show_static_spr(0);
-			auto_move(2, P_CHEWY);
-			start_detail_wait(1, 1, ANI_VOR);
-			det->start_detail(3, 255, ANI_VOR);
-			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
-			det->stop_detail(3);
-			++_G(spieler).R54LiftCount;
-			if (_G(spieler).R54LiftCount < 3) {
-				start_detail_wait(2, 1, ANI_VOR);
-				det->hide_static_spr(0);
-				start_detail_wait(1, 1, ANI_RUECK);
-				aad_nr = 295;
-			} else {
-				start_detail_wait(5, 1, ANI_VOR);
-				det->show_static_spr(9);
-				start_detail_wait(4, 1, ANI_VOR);
-				aad_nr = 296;
-				_G(spieler).R54FputzerWeg = true;
-				atds->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_ats_str(349, 1, ATS_DATEI);
-				atds->set_ats_str(345, 1, ATS_DATEI);
-			}
-			start_aad_wait(aad_nr, -1);
-			_G(spieler).R54HowardVorne = false;
-		} else
-			start_aad_wait(297, -1);
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r54_talk_verkauf() {
-	hide_cur();
-	if (!_G(spieler).R54HotDogOk) {
-		if (_G(spieler).AkInvent == DOLLAR175_INV)
-			del_inventar(DOLLAR175_INV);
-		else
-			del_invent_slot(DOLLAR175_INV);
-		_G(spieler).R54HotDogOk = true;
-		auto_move(3, P_CHEWY);
-		_G(spieler).R54HowardVorne = true;
-		start_aad_wait(299, -1);
-		room->set_timer_status(6, TIMER_STOP);
-		det->del_static_ani(6);
-		start_detail_wait(7, 1, ANI_VOR);
-		det->start_detail(8, 255, ANI_VOR);
-		start_aad_wait(310, -1);
-		det->stop_detail(8);
-		start_detail_wait(9, 1, ANI_VOR);
-		start_detail_wait(10, 1, ANI_VOR);
-		det->start_detail(11, 255, ANI_VOR);
-		start_aad_wait(311, -1);
-		det->stop_detail(11);
-		room->set_timer_status(6, TIMER_START);
-		det->set_static_ani(6, -1);
-		auto_move(4, P_CHEWY);
-		start_aad_wait(312, -1);
-		obj->add_inventar(BURGER_INV, &room_blk);
-		inventory_2_cur(BURGER_INV);
-	} else
-		start_aad_wait(313, -1);
-	show_cur();
-}
-
-int16 r54_use_zelle() {
-	int16 action_ret = false;
-	hide_cur();
-	if (_G(spieler).inv_cur) {
-		if (is_cur_inventar(JMKOST_INV)) {
-			action_ret = true;
-			if (!_G(spieler).R54Schild) {
-				start_aad_wait(318, -1);
-			} else {
-				auto_move(5, P_CHEWY);
-				_G(spieler).R54HowardVorne = true;
-				SetUpScreenFunc = 0;
-				auto_scroll(176, 0);
-				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
-				flc->set_flic_user_function(r54_cut_serv);
-				flic_cut(FCUT_069, FLC_MODE);
-				flc->remove_flic_user_function();
-				del_inventar(_G(spieler).AkInvent);
-				invent_2_slot(LEDER_INV);
-				load_chewy_taf(CHEWY_JMANS);
-				_G(zoom_horizont) = 90;
-				set_person_pos(283, 93, P_CHEWY, P_LEFT);
-				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
-				start_aad_wait(315, -1);
-				go_auto_xy(241, 74, P_CHEWY, ANI_WAIT);
-				start_aad_wait(316, -1);
-
-				spieler_mi[P_HOWARD].Mode = true;
-				switch_room(55);
-			}
-		}
-	} else {
-		action_ret = true;
-		auto_move(6, P_CHEWY);
-		_G(spieler).R54HowardVorne = true;
-		start_aad_wait(319, -1);
-	}
-	show_cur();
-	return action_ret;
-}
-
-int16 r54_cut_serv(int16 frame) {
-	det->plot_static_details(176, 0, 9, 9);
-	return 0;
-}
-
-int16 r54_use_azug() {
-	int16 ch_y;
-	int16 ay;
-	int16 delay;
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		hide_cur();
-		if (!_G(spieler).R54LiftOk) {
-			if (_G(spieler).R54FputzerWeg) {
-				auto_move(8, P_CHEWY);
-				_G(spieler).R54HowardVorne = false;
-				start_aad_wait(298, -1);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->show_static_spr(12);
-				_G(spieler).R55Location = true;
-				SetUpScreenFunc = 0;
-				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
-				ch_y = 68;
-				ay = 0;
-				delay = 0;
-				while (ch_y > -48) {
-					det->set_static_pos(12, 125, ch_y, false, false);
-					det->set_static_pos(9, 122, ay, false, false);
-					if (!delay) {
-						ch_y -= 3;
-						ay -= 3;
-						delay = _G(spieler).DelaySpeed / 2;
-					} else
-						--delay;
-					set_up_screen(DO_SETUP);
-				}
-				switch_room(55);
-			}
-		} else
-			start_aad_wait(314, -1);
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r54_aufzug_ab() {
-	int16 ch_y;
-	int16 ay;
-	int16 delay;
-	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
-	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
-	_G(spieler).scrollx = 0;
-	SetUpScreenFunc = r54_setup_func;
-	ch_y = -40;
-	ay = -108;
-	delay = 0;
-	det->show_static_spr(12);
-	while (ch_y < 68 && !SHOULD_QUIT) {
-		det->set_static_pos(12, 125, ch_y, false, false);
-		det->set_static_pos(9, 122, ay, false, false);
-		if (!delay) {
-			ch_y += 3;
-			ay += 3;
-			delay = _G(spieler).DelaySpeed / 2;
-		} else
-			--delay;
-		set_up_screen(DO_SETUP);
-	}
-	det->hide_static_spr(12);
-	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(maus_links_click) = false;
-	stop_person(P_CHEWY);
-	_G(spieler).R55Location = false;
-}
-
-short r54_use_taxi() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		hide_cur();
-		auto_move(7, P_CHEWY);
-		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-			if (_G(spieler).R54HowardVorne) {
-				_G(spieler).R54HowardVorne = false;
-				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
-			}
-			_G(spieler).PersonHide[P_HOWARD] = true;
-			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
-		}
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		switch_room(48);
-	}
-	return action_ret;
-}
-
-void r55_entry() {
-	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = r55_setup_func;
-	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	_G(spieler).R55ExitDia = 0;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
-	if (!_G(spieler).R54FputzerWeg)
-		det->start_detail(6, 255, ANI_VOR);
-
-	if ((_G(spieler).R55RaumOk) || (!_G(spieler).R55RaumOk && _G(spieler).R55ScriptWeg))
-		det->hide_static_spr(0);
-	if (!_G(spieler).R55SekWeg) {
-		det->start_detail(8, 255, ANI_VOR);
-		det->start_detail(9, 255, ANI_VOR);
-		_G(spieler).R55Entry ^= 1;
-		_G(timer_nr)[0] = room->set_timer(19 + (int16)_G(spieler).R55Entry, 10);
-		det->set_static_ani(19 + (int16)_G(spieler).R55Entry, -1);
-	}
-	spieler_mi[P_HOWARD].Mode = true;
-	if (_G(spieler).R55Job) {
-		r55_rock2mans();
-		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-	}
-	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
-		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
-		room->set_zoom(10);
-	}
-	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
-		det->show_static_spr(0);
-	if (!flags.LoadGame) {
-		if (_G(spieler).R55Location) {
-			_G(spieler).scrollx = 136;
-			set_person_pos(400, 82, P_CHEWY, P_RIGHT);
-			start_detail_wait(3, 1, ANI_VOR);
-			_G(timer_nr)[0] = room->set_timer(4, 10);
-			det->set_static_ani(4, -1);
-			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
-		} else {
-			_G(spieler).scrollx = 0;
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
-				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
-			}
-			det->show_static_spr(8);
-			auto_move(1, P_CHEWY);
-			hide_cur();
-			det->hide_static_spr(8);
-			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
-
-				set_person_spr(P_LEFT, P_CHEWY);
-				if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-					r55_verleger_mov(0);
-					r55_talk_line();
-					_G(spieler).R54Schild = true;
-				} else {
-					r55_verleger_mov(1);
-					r55_get_job();
-				}
-			}
-			show_cur();
-		}
-	}
-}
-
-void r55_exit(int16 eib_nr) {
-	if (eib_nr == 90) {
-		r55_mans2rock();
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-			spieler_mi[P_HOWARD].Mode = false;
-		}
-	}
-	_G(spieler).ScrollxStep = 1;
-}
-
-int16 r55_use_stapel1() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R55ScriptWeg) {
-			action_ret = true;
-			_G(spieler).R55ScriptWeg = true;
-			auto_move(4, P_CHEWY);
-			det->hide_static_spr(0);
-			auto_move(5, P_CHEWY);
-			det->show_static_spr(1);
-			atds->set_ats_str(354, 1, ATS_DATEI);
-			atds->set_ats_str(355, 1, ATS_DATEI);
-		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
-			action_ret = true;
-			start_aad_wait(333, -1);
-		}
-	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
-		action_ret = true;
-		if (_G(spieler).R55ScriptWeg) {
-			auto_move(4, P_CHEWY);
-			_G(spieler).R55EscScriptOk = true;
-			det->show_static_spr(0);
-			del_inventar(_G(spieler).AkInvent);
-			atds->set_ats_str(354, 2, ATS_DATEI);
-		} else
-			start_aad_wait(326, -1);
-	}
-	return action_ret;
-}
-
-int16 r55_use_stapel2() {
-	int16 action_ret = false;
-	if (is_cur_inventar(MANUSKRIPT_INV)) {
-		action_ret = true;
-		start_aad_wait(327, -1);
-	}
-	return action_ret;
-}
-
-int16 r55_use_telefon() {
-	int16 i;
-	int16 delay;
-	int16 tmp_delay;
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		if (_G(spieler).R55EscScriptOk) {
-			if (!_G(spieler).R55RaumOk) {
-				hide_cur();
-				_G(spieler).R55RaumOk = true;
-				auto_move(6, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(10, 1, ANI_VOR);
-				det->start_detail(11, 255, ANI_VOR);
-				start_aad_wait(329, -1);
-				det->stop_detail(11);
-				start_detail_wait(10, 1, ANI_RUECK);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				auto_move(7, P_CHEWY);
-				flags.NoScroll = true;
-				auto_scroll(0, 0);
-				start_aad_wait(330, -1);
-				det->show_static_spr(8);
-				start_detail_wait(0, 1, ANI_VOR);
-				det->start_detail(1, 255, ANI_VOR);
-				start_aad_wait(331, -1);
-				det->stop_detail(1);
-				start_detail_wait(2, 1, ANI_VOR);
-				det->hide_static_spr(0);
-				det->hide_static_spr(8);
-				atds->set_ats_str(354, 1, ATS_DATEI);
-				flic_cut(FCUT_071, FLC_MODE);
-				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
-				set_person_pos(178, 75, P_CHEWY, P_LEFT);
-				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
-				SetUpScreenFunc = 0;
-				det->set_static_ani(18, -1);
-				start_aad_wait(334, -1);
-				start_aad_wait(335, -1);
-				start_aad_wait(336, -1);
-				tmp_delay = _G(spieler).DelaySpeed;
-				for (i = 0; i < 7; i++) {
-					delay = tmp_delay;
-					if (!_G(spieler).scrollx)
-						_G(spieler).scrollx = 8;
-					else
-						_G(spieler).scrollx = 0;
-					while (delay) {
-						out->skip_frame(1);
-						--delay;
-					}
-					set_up_screen(DO_SETUP);
-				}
-				flic_cut(FCUT_072, FLC_MODE);
-				flags.NoScroll = false;
-				invent_2_slot(SACKGELD_INV);
-				invent_2_slot(EINLAD_INV);
-				del_invent_slot(LEDER_INV);
-				load_chewy_taf(CHEWY_ROCKER);
-				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-				spieler_mi[P_HOWARD].Mode = false;
-				show_cur();
-				_G(spieler).R55R54First = true;
-				_G(spieler).R55ExitDia = 337;
-				_G(spieler).room_e_obj[89].Attribut = 255;
-				switch_room(54);
-			} else {
-				start_aad_wait(332, -1);
-			}
-		} else {
-			start_aad_wait(328, -1);
-		}
-	}
-	return action_ret;
-}
-
-void r55_get_job() {
-	int16 tmp_scrollx;
-	int16 tmp_scrolly;
-	int16 r_nr;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	tmp_scrollx = _G(spieler).scrollx;
-	tmp_scrolly = _G(spieler).scrolly;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	switch_room(61);
-	show_cur();
-	start_ads_wait(15);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.LoadGame = true;
-	_G(spieler).scrollx = tmp_scrollx;
-	_G(spieler).scrolly = tmp_scrolly;
-	if (_G(spieler).R55Job) {
-		r_nr = 55;
-		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATEI);
-	} else {
-		r_nr = 54;
-		r55_mans2rock();
-	}
-	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
-	spieler_mi[P_HOWARD].Mode = true;
-	if (r_nr == 54)
-		flags.LoadGame = false;
-	set_person_pos(118, 96, P_CHEWY, P_LEFT);
-	switch_room(r_nr);
-	flags.LoadGame = false;
-
-}
-
-void r55_mans2rock() {
-	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
-		_G(spieler).R55ExitDia = 317;
-		load_chewy_taf(CHEWY_ROCKER);
-		del_invent_slot(LEDER_INV);
-		invent_2_slot(JMKOST_INV);
-	}
-}
-
-void r55_rock2mans() {
-	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-		load_chewy_taf(CHEWY_JMANS);
-		del_invent_slot(JMKOST_INV);
-		invent_2_slot(LEDER_INV);
-	}
-}
-
-void r55_verleger_mov(int16 mode) {
-	start_detail_wait(7, 1, ANI_VOR);
-	det->show_static_spr(11);
-	start_detail_wait(13, 1, ANI_VOR);
-	start_detail_wait(14, 1, ANI_VOR);
-	if (_G(spieler).ChewyAni == CHEWY_JMANS)
-		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
-	if (mode)
-		start_detail_wait(15, 1, ANI_VOR);
-	det->set_static_ani(16, -1);
-}
-
-void r55_strasse(int16 mode) {
-	if (!_G(spieler).inv_cur || mode) {
-		room->set_timer_status(4, TIMER_STOP);
-		det->del_static_ani(4);
-		det->stop_detail(4);
-		atds->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
-		start_detail_wait(3, 1, ANI_RUECK);
-
-		_G(spieler).scrollx = 0;
-		switch_room(54);
-	}
-}
-
-int16 r55_use_kammeraus() {
-	int16 action_ret = false;
-	if (_G(spieler).R55Location) {
-		if (is_cur_inventar(KILLER_INV)) {
-			action_ret = true;
-			if (_G(spieler).R52KakerWeg) {
-				if (!_G(spieler).R55SekWeg) {
-					hide_cur();
-					room->set_timer_status(4, TIMER_STOP);
-					det->del_static_ani(4);
-					det->stop_detail(4);
-					start_detail_wait(5, 1, ANI_VOR);
-					det->show_static_spr(10);
-					flc->set_flic_user_function(r55_cut_serv);
-					flic_cut(FCUT_070, FLC_MODE);
-					flc->remove_flic_user_function();
-					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
-					det->stop_detail(19 + (int16)_G(spieler).R55Entry);
-					det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
-					det->hide_static_spr(10);
-					_G(spieler).R55ExitDia = 322;
-					_G(spieler).R55SekWeg = true;
-					atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
-					atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
-					r55_strasse(1);
-					show_cur();
-				}
-			} else {
-				start_aad_wait(325, -1);
-			}
-		}
-	}
-	return action_ret;
-}
-
-int16 r55_cut_serv(int16 frame) {
-	if (frame < 10)
-		det->plot_static_details(136, 0, 10, 10);
-	return 0;
-}
-
-void r55_setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
-		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		if (ch_x < 100) {
-			x = 62;
-			y = 101;
-		} else if (ch_x < 187) {
-			x = 139;
-			y = 119;
-		} else if (ch_x < 276) {
-			x = 235;
-			y = 119;
-		} else {
-			x = 318;
-			y = 110;
-		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-void r55_talk_line() {
-	int16 aad_nr = 0;
-	if (_G(spieler).R55Location == 0) {
-		if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-			hide_cur();
-			if (!_G(spieler).R55SekWeg) {
-				auto_move(2, P_CHEWY);
-				flags.NoScroll = true;
-				auto_scroll(136, 0);
-				aad_nr = 320;
-				_G(spieler).R55ExitDia = 321;
-				room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
-				det->stop_detail(19 + (int16)_G(spieler).R55Entry);
-				det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
-				start_detail_wait(22, 1, ANI_VOR);
-				det->set_static_ani(21, -1);
-			} else if (!_G(spieler).R55RaumOk) {
-				auto_move(3, P_CHEWY);
-				aad_nr = 323;
-				_G(spieler).R55ExitDia = 324;
-			}
-			start_aad_wait(aad_nr, -1);
-			if (_G(spieler).R55SekWeg) {
-				det->del_static_ani(16);
-				start_detail_wait(14, 1, ANI_VOR);
-			} else {
-				det->del_static_ani(21);
-				start_detail_wait(22, 1, ANI_VOR);
-			}
-			flags.NoScroll = false;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-			spieler_mi[P_HOWARD].Mode = false;
-			switch_room(54);
-			show_cur();
-		}
-	}
-}
-
-void r56_entry() {
-	_G(spieler).ScrollxStep = 2;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 4;
-	spieler_mi[P_HOWARD].Mode = true;
-	_G(timer_nr)[0] = room->set_timer(255, 25);
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			hide_cur();
-			_G(spieler).R48TaxiEntry = false;
-			_G(spieler).scrollx = 0;
-			_G(spieler).scrolly = 0;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(spieler).PersonHide[P_HOWARD] = true;
-			det->hide_static_spr(2);
-			_G(zoom_horizont) = 0;
-			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
-			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
-			start_detail_wait(7, 1, ANI_RUECK);
-			start_detail_wait(8, 1, ANI_VOR);
-			start_detail_wait(7, 1, ANI_VOR);
-			set_up_screen(DO_SETUP);
-			if (!_G(spieler).R56GetTabak) {
-				flic_cut(FCUT_074, FLC_MODE);
-				det->show_static_spr(2);
-			}
-			room->set_zoom(23);
-			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
-			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(spieler).PersonHide[P_HOWARD] = false;
-			SetUpScreenFunc = r56_setup_func;
-			spieler_mi[P_CHEWY].Mode = true;
-			auto_move(1, P_CHEWY);
-			spieler_mi[P_CHEWY].Mode = false;
-			_G(maus_links_click) = false;
-			show_cur();
-		} else if (_G(spieler).R62Flucht) {
-			_G(maus_links_click) = false;
-			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
-			_G(zoom_horizont) = 114;
-			room->set_zoom(70);
-			_G(spieler).R62Flucht = false;
-			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
-			set_person_pos(429, 146, P_CHEWY, P_LEFT);
-			_G(spieler).scrollx = 262;
-			_G(spieler).PersonHide[P_HOWARD] = false;
-			det->show_static_spr(9);
-			det->show_static_spr(8);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
-			det->set_static_ani(3, -1);
-			_G(maus_links_click) = false;
-			atds->stop_aad();
-			start_aad_wait(306, -1);
-			flic_cut(FCUT_076, FLC_MODE);
-		}
-	}
-	SetUpScreenFunc = r56_setup_func;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
-	_G(zoom_horizont) = 114;
-	room->set_zoom(70);
-}
-
-void r56_exit() {
-	spieler_mi[P_HOWARD].Mode = false;
-	_G(spieler).ScrollxStep = 1;
-}
-
-int16 r56_use_taxi() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		hide_cur();
-		auto_move(1, P_CHEWY);
-		start_detail_wait(7, 1, ANI_RUECK);
-		det->start_detail(8, 1, ANI_VOR);
-		_G(zoom_horizont) = 0;
-		room->set_zoom(23);
-		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
-		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
-		spieler_mi[P_CHEWY].Mode = true;
-		go_auto_xy(3, 42, P_CHEWY, ANI_WAIT);
-		spieler_mi[P_CHEWY].Mode = false;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
-			_G(spieler).PersonHide[P_HOWARD] = true;
-			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
-		}
-		show_cur();
-		switch_room(48);
-	}
-	return action_ret;
-}
-
-void r56_talk_man() {
-	auto_move(3, P_CHEWY);
-	if (!_G(spieler).R56AbfahrtOk) {
-		start_ads_wait(16);
-	} else if (!_G(spieler).R62Flucht) {
-		start_aad_wait(343, -1);
-	}
-}
-
-int16 r56_use_man() {
-	int16 action_ret = false;
-	if (is_cur_inventar(FLASCHE_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
-		room->set_timer_status(0, TIMER_STOP);
-		det->del_static_ani(0);
-
-		if (!_G(spieler).R56WhiskyMix) {
-			start_detail_wait(4, 1, ANI_VOR);
-
-			det->set_static_ani(5, -1);
-			start_aad_wait(304, -1);
-			det->del_static_ani(5);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
-		} else {
-			del_inventar(_G(spieler).AkInvent);
-			_G(spieler).R56AbfahrtOk = true;
-			start_detail_wait(6, 1, ANI_VOR);
-
-			det->set_static_ani(1, -1);
-			start_aad_wait(305, -1);
-			det->del_static_ani(1);
-		}
-		room->set_timer_status(0, TIMER_START);
-		det->set_static_ani(0, -1);
-		show_cur();
-	}
-	return action_ret;
-}
-
-int16 r56_use_kneipe() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
-			hide_cur();
-			action_ret = true;
-			if (!_G(spieler).R56Kneipe) {
-				SetUpScreenFunc = 0;
-				auto_move(4, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				go_auto_xy(160, 58, P_HOWARD, ANI_WAIT);
-				_G(spieler).PersonHide[P_HOWARD] = true;
-				_G(spieler).R56Kneipe = true;
-				flags.NoScroll = true;
-				auto_scroll(0, 0);
-				start_detail_wait(12, 3, ANI_VOR);
-				flic_cut(FCUT_075, FLC_MODE);
-				det->start_detail(10, 6, ANI_VOR);
-				start_aad_wait(307, -1);
-				det->stop_detail(10);
-				out->ausblenden(0);
-				set_up_screen(DO_SETUP);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				_G(spieler).PersonHide[P_HOWARD] = false;
-				_G(spieler).scrollx = 0;
-				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
-				set_person_pos(50, 81, P_CHEWY, P_LEFT);
-
-				fx_blend = BLEND3;
-				start_aad_wait(308, -1);
-				SetUpScreenFunc = r56_setup_func;
-				flags.NoScroll = false;
-
-				if (obj->check_inventar(SACKGELD_INV)) {
-					del_invent_slot(SACKGELD_INV);
-					start_aad_wait(309, -1);
-				}
-			} else {
-				start_aad_wait(344, -1);
-			}
-			show_cur();
-		}
-	}
-	return action_ret;
-}
-
-void r56_start_flug() {
-	if (!r56koch_flug) {
-		r56koch_flug = 12;
-		det->start_detail(r56koch_flug, 1, ANI_VOR);
-	}
-}
-
-void r56_setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	int16 ch_y;
-	switch (r56koch_flug) {
-	case 12:
-		if (det->get_ani_status(12) == false) {
-			det->start_detail(11, 1, ANI_VOR);
-			r56koch_flug = 11;
-		}
-		break;
-
-	case 11:
-		if (det->get_ani_status(11) == false) {
-			det->start_detail(10, 1, ANI_VOR);
-			r56koch_flug = 10;
-		}
-		break;
-
-	case 10:
-		if (det->get_ani_status(10) == false) {
-			r56koch_flug = 0;
-
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-		}
-		break;
-
-	}
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
-		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
-		if (ch_x < 196) {
-			x = 23;
-			y = 70;
-		} else if (ch_x < 283) {
-			x = 115;
-			y = 61;
-		} else if (ch_y < 115) {
-			x = 254;
-			y = 66;
-		} else {
-			x = 308;
-			y = 97;
-		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
-		if (menu_item == CUR_WALK) {
-			if (minfo.x + _G(spieler).scrollx >= 157 &&
-			        minfo.x + _G(spieler).scrollx <= 204 &&
-			        minfo.y >= 28 && minfo.y <= 89) {
-				cursor_wahl(CUR_AUSGANG_OBEN);
-			} else
-				cursor_wahl(CUR_WALK);
-		}
-	}
-}
-
-void r57_entry() {
-	_G(zoom_horizont) = 180;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 4;
-	SetUpScreenFunc = r57_setup_func;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
-	spieler_mi[P_HOWARD].Mode = true;
-	if (_G(spieler).R57StudioAuf)
-		det->hide_static_spr(4);
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			hide_cur();
-			_G(spieler).R48TaxiEntry = false;
-			_G(spieler).scrollx = 0;
-			_G(spieler).scrolly = 0;
-			set_person_pos(4, 144, P_HOWARD, P_LEFT);
-			set_person_pos(40, 160, P_CHEWY, P_RIGHT);
-			auto_move(2, P_CHEWY);
-			_G(maus_links_click) = false;
-			show_cur();
-		}
-	}
-}
-
-void r57_exit(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
-		spieler_mi[P_HOWARD].Mode = false;
-		if (eib_nr == 91)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 62;
-	}
-}
-
-void r57_setup_func() {
-	int16 x, y;
-	int16 ch_y;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
-		calc_person_look();
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
-		if (ch_y < 145) {
-			x = 176;
-			y = 126;
-		} else {
-			x = 176;
-			y = 142;
-		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	}
-}
-
-int16 r57_use_taxi() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		hide_cur();
-		auto_move(3, P_CHEWY);
-		det->show_static_spr(7);
-		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
-			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
-			_G(spieler).PersonHide[P_HOWARD] = true;
-			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
-		}
-		det->hide_static_spr(7);
-		room->set_timer_status(3, TIMER_STOP);
-		det->del_static_ani(3);
-		start_detail_wait(5, 1, ANI_VOR);
-		switch_room(48);
-	}
-	return action_ret;
-}
-
-int16 r57_use_pfoertner() {
-	int16 action_ret = false;
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	det->set_static_ani(3, -1);
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	if (is_cur_inventar(CUTMAG_INV)) {
-		action_ret = true;
-		start_aad_wait(339, -1);
-		new_invent_2_cur(BESTELL_INV);
-	} else if (is_cur_inventar(JMKOST_INV)) {
-		action_ret = true;
-		start_aad_wait(340, -1);
-	} else if (is_cur_inventar(EINLAD_INV)) {
-		action_ret = true;
-		SetUpScreenFunc = 0;
-		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
-		if (_G(spieler).R56AbfahrtOk) {
-			start_aad_wait(341, -1);
-			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
-			del_inventar(_G(spieler).AkInvent);
-			_G(spieler).R57StudioAuf = true;
-			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
-			det->hide_static_spr(4);
-			start_detail_wait(6, 1, ANI_WAIT);
-			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
-		} else {
-			start_aad_wait(349, -1);
-			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
-		}
-		SetUpScreenFunc = r57_setup_func;
-	}
-	show_cur();
-	room->set_timer_status(1, TIMER_START);
-	det->set_static_ani(1, -1);
-	return action_ret;
-}
-
-void r57_talk_pfoertner() {
-	int16 aad_nr;
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	det->set_static_ani(3, -1);
-	if (!_G(spieler).R57StudioAuf) {
-		aad_nr = 338;
-	} else
-		aad_nr = 342;
-	start_aad_wait(aad_nr, -1);
-	room->set_timer_status(1, TIMER_START);
-	det->set_static_ani(1, -1);
-	show_cur();
-}
-
-void r58_entry() {
-	SetUpScreenFunc = r58setup_func;
-}
-
-void r58_exit() {
-	int16 tmp;
-	_G(spieler).scrollx = _G(spieler).R58TmpSx;
-	_G(spieler).scrolly = _G(spieler).R58TmpSy;
-	spieler_vector[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
-	spieler_vector[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
-	spieler_mi[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
-	spieler_mi[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
-	flags.MainInput = true;
-	flags.LoadGame = true;
-	show_person();
-	set_person_rnr();
-	tmp = _G(spieler).R58TmpRoom1;
-	_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
-
-	switch_room(tmp);
-
-}
-
-void r58_look_cut_mag(int16 r_nr) {
-	_G(spieler).R58TmpRoom = r_nr;
-	_G(spieler).R58TmpRoom1 = _G(spieler).PersonRoomNr[P_CHEWY];;
-
-	_G(spieler).R58TmpSx = _G(spieler).scrollx;
-	_G(spieler).R58TmpSy = _G(spieler).scrolly;
-	_G(spieler).R58TmpX = spieler_vector[P_CHEWY].Xypos[0];
-	_G(spieler).R58TmpY = spieler_vector[P_CHEWY].Xypos[1];
-	spieler_vector[P_CHEWY].Xypos[0] = 160;
-	spieler_vector[P_CHEWY].Xypos[1] = 100;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	flags.MainInput = false;
-	hide_person();
-	switch_room(r_nr);
-}
-
-void r58setup_func() {
-	if (menu_item != CUR_LOOK) {
-		menu_item = CUR_LOOK;
-		cursor_wahl(menu_item);
-	}
-}
-
-void r59_look_poster() {
-	if (!_G(spieler).R59PosterWeg) {
-
-		atds->set_ats_str(302, 1, ATS_DATEI);
-		atds->set_ats_str(301, 1, ATS_DATEI);
-		_G(spieler).R59PosterWeg = true;
-		invent_2_slot(SPARK_INV);
-		switch_room(60);
-	}
-}
-
-void r62_entry() {
-	SetUpScreenFunc = r62_setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	_G(spieler).R62LauraVerwandlung = 0;
-	_G(spieler).room_e_obj[91].Attribut = 255;
-	if (!_G(spieler).R62FirstEntry) {
-		_G(spieler).R62TShow = false;
-		_G(cur_hide_flag) = false;
-		hide_cur();
-		_G(spieler).R62FirstEntry = true;
-		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
-		det->start_detail(6, 255, ANI_VOR);
-		start_aad_wait(345, -1);
-		det->stop_detail(6);
-		det->set_static_ani(5, -1);
-		go_auto_xy(199, 59, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
-		det->del_static_ani(5);
-		det->start_detail(5, 255, ANI_VOR);
-		start_aad_wait(346, -1);
-		det->stop_detail(5);
-		det->start_detail(6, 255, ANI_VOR);
-		start_aad_wait(347, -1);
-		det->stop_detail(6);
-		start_detail_wait(7, 1, ANI_VOR);
-		det->set_static_ani(5, -1);
-		det->start_detail(0, 255, ANI_VOR);
-		start_aad_wait(348, -1);
-		det->stop_detail(0);
-		det->del_static_ani(0);
-		det->start_detail(1, 1, ANI_VOR);
-		auto_move(0, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
-		go_auto_xy(160, 240, P_CHEWY, ANI_WAIT);
-		spieler_mi[P_CHEWY].Mode = false;
-		det->del_static_ani(5);
-		start_detail_wait(7, 1, ANI_VOR);
-		show_cur();
-		_G(spieler).R64Moni1Ani = 3;
-		_G(spieler).R64Moni2Ani = 4;
-		set_person_pos(187, 43, P_CHEWY, P_RIGHT);
-		_G(spieler).R62TShow = true;
-		switch_room(64);
-	} else {
-		det->del_static_ani(0);
-		_G(spieler).PersonHide[P_HOWARD] = true;
-		det->set_static_ani(4, -1);
-		det->set_static_ani(8, -1);
-		r62Delay = 0;
-		r62TalkAni = 8;
-
-	}
-}
-
-void r62_setup_func() {
-	if (r62Delay <= 0 && _G(spieler).R62TShow) {
-		r62Delay = (_G(spieler).DelaySpeed + 1) * 60;
-		det->stop_detail(r62TalkAni);
-		if (r62TalkAni == 4)
-			r62TalkAni = 8;
-		else
-			r62TalkAni = 4;
-		det->start_detail(r62TalkAni, 255, ANI_VOR);
-	} else
-		--r62Delay;
-}
-
-int16 r62_use_laura() {
-	int16 action_ret = false;
-	if (is_cur_inventar(GERAET_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(2, P_CHEWY);
-		auto_scroll(0, 0);
-		SetUpScreenFunc = 0;
-		det->del_static_ani(8);
-		det->stop_detail(8);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->start_detail(2, 255, ANI_VOR);
-		det->start_detail(6, 255, ANI_VOR);
-		start_aad_wait(399, -1);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		flic_cut(FCUT_077, FLC_MODE);
-		show_cur();
-		_G(spieler).R64Moni1Ani = 0;
-		_G(spieler).R64Moni2Ani = 0;
-		_G(spieler).R62TShow = false;
-		_G(spieler).R62LauraVerwandlung = true;
-		switch_room(63);
-	}
-	return action_ret;
-}
-
-void r63_entry() {
-	_G(zoom_horizont) = 76;
-	_G(spieler).ScrollxStep = 2;
-	r63Schalter = false;
-	r63RunDia = 0;
-	if (_G(spieler).R63FxMannWeg)
-		det->del_static_ani(5);
-	if (!_G(spieler).R63Uhr) {
-		_G(cur_hide_flag) = false;
-		hide_cur();
-		det->start_detail(12, 255, ANI_VOR);
-		det->start_detail(10, 255, ANI_VOR);
-		det->start_detail(18, 255, ANI_VOR);
-		auto_move(4, P_CHEWY);
-		det->stop_detail(10);
-		det->start_detail(11, 255, ANI_VOR);
-		auto_scroll(58, 0);
-		start_aad_wait(355, -1);
-		det->stop_detail(11);
-		det->start_detail(10, 255, ANI_VOR);
-		show_cur();
-	} else if (!_G(spieler).R63Feuer) {
-		det->show_static_spr(10);
-		det->show_static_spr(12);
-	} else if (_G(spieler).R62LauraVerwandlung) {
-		SetUpScreenFunc = r63_setup_func;
-		cur_2_inventory();
-		_G(spieler).scrollx = 176;
-		set_person_pos(424, 78, P_CHEWY, P_LEFT);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(spieler).room_e_obj[95].Attribut = 255;
-		r63ChewyAni = 0;
-		det->start_detail(0, 1, ANI_VOR);
-	}
-}
-
-void r63_setup_func() {
-	if (_G(spieler).R62LauraVerwandlung) {
-		switch (r63ChewyAni) {
-		case 0:
-			if (det->get_ani_status(0) == false) {
-				if (r63RunDia < 4)
-					++r63RunDia;
-				start_aad(370 + r63RunDia);
-				det->start_detail(1, 1, ANI_VOR);
-				r63ChewyAni = 1;
-			}
-			break;
-
-		case 1:
-			if (det->get_ani_status(1) == false) {
-				_G(spieler).ScrollxStep = 4;
-				set_person_pos(0, 0, P_CHEWY, P_RIGHT);
-				det->start_detail(22, 1, ANI_VOR);
-				det->start_detail(2, 1, ANI_VOR);
-				atds->stop_aad();
-				r63ChewyAni = 2;
-			}
-			break;
-
-		case 2:
-			if (det->get_ani_status(2) == false) {
-				det->start_detail(3, 1, ANI_VOR);
-				r63ChewyAni = 3;
-			}
-			break;
-
-		case 3:
-			if (det->get_ani_status(3) == false) {
-				if (!flags.AutoAniPlay) {
-					flags.AutoAniPlay = true;
-
-					_G(spieler).ScrollxStep = 16;
-					_G(spieler).scrollx -= _G(spieler).scrollx % 16;
-					flags.NoScroll = true;
-					auto_scroll(176, 0);
-					set_person_pos(424, 78, P_CHEWY, P_LEFT);
-					flags.NoScroll = false;
-					_G(spieler).ScrollxStep = 4;
-					if (!r63Schalter) {
-						det->start_detail(0, 1, ANI_VOR);
-						r63ChewyAni = 0;
-					} else
-						r63_bork_platt();
-					flags.AutoAniPlay = false;
-				}
-			}
-			break;
-
-		}
-	}
-}
-
-void r63_bork_platt() {
-	_G(spieler).R62LauraVerwandlung = false;
-	r63Schalter = false;
-	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
-	flic_cut(FCUT_081, FLC_MODE);
-	flic_cut(FCUT_082, FLC_MODE);
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	check_shad(4, 1);
-	spieler_mi[P_CHEWY].Mode = true;
-	auto_move(6, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
-	start_aad_wait(370, -1);
-	start_detail_wait(4, 1, ANI_VOR);
-	det->show_static_spr(13);
-	start_aad_wait(361, -1);
-	out->cls();
-	flags.NoPalAfterFlc = true;
-	flic_cut(FCUT_079, FLC_MODE);
-	fx_blend = BLEND3;
-	show_cur();
-	flags.MainInput = true;
-	_G(spieler).R62Flucht = true;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
-	switch_room(56);
-}
-
-void r63_talk_hunter() {
-	hide_cur();
-	auto_move(3, P_CHEWY);
-	if (_G(spieler).R63Uhr)
-		det->hide_static_spr(10);
-	det->start_detail(10, 255, ANI_VOR);
-	start_aad_wait(356, -1);
-	if (_G(spieler).R63Uhr) {
-		det->show_static_spr(10);
-		det->stop_detail(10);
-	}
-	show_cur();
-}
-
-void r63_talk_regie() {
-	hide_cur();
-	auto_move(3, P_CHEWY);
-	if (_G(spieler).R63Uhr)
-		det->hide_static_spr(12);
-	det->stop_detail(18);
-	det->start_detail(19, 255, ANI_VOR);
-	start_aad_wait(357, -1);
-	det->stop_detail(19);
-	if (_G(spieler).R63Uhr) {
-		det->show_static_spr(12);
-	} else {
-		det->start_detail(18, 255, ANI_VOR);
-	}
-	show_cur();
-}
-
-void r63_talk_fx_man() {
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	start_aad_wait(358, -1);
-	show_cur();
-}
-
-int16 r63_use_fx_man() {
-	int16 action_ret = false;
-	if (is_cur_inventar(MASKE_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(1, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		start_aad_wait(359, -1);
-		det->del_static_ani(5);
-		start_detail_wait(6, 1, ANI_VOR);
-		det->start_detail(7, 255, ANI_VOR);
-		start_aad_wait(362, -1);
-		det->stop_detail(7);
-		start_detail_wait(8, 1, ANI_VOR);
-		_G(spieler).R63FxMannWeg = true;
-		atds->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
-		show_cur();
-	}
-	return action_ret;
-}
-
-int16 r63_use_schalter() {
-	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		action_ret = true;
-		if (_G(spieler).R63FxMannWeg) {
-			if (_G(spieler).R62LauraVerwandlung) {
-				r63Schalter = true;
-				hide_cur();
-				flags.MainInput = false;
-			} else {
-				hide_cur();
-				auto_move(1, P_CHEWY);
-				start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
-				det->show_static_spr(2);
-				set_person_spr(P_LEFT, P_CHEWY);
-				start_detail_wait(21, 1, ANI_VOR);
-				det->show_static_spr(14);
-				wait_show_screen(18);
-				det->hide_static_spr(14);
-				start_detail_wait(24, 1, ANI_VOR);
-				det->hide_static_spr(2);
-				start_aad_wait(364, -1);
-				atds->set_ats_str(385, 1, ATS_DATEI);
-				show_cur();
-			}
-		} else {
-			hide_cur();
-			start_aad_wait(363, -1);
-			show_cur();
-		}
-	}
-	return action_ret;
-}
-
-void r63_talk_girl() {
-	auto_move(2, P_CHEWY);
-	det->stop_detail(12);
-	start_detail_wait(13, 1, ANI_VOR);
-	det->set_static_ani(14, -1);
-	start_ads_wait(17);
-	det->del_static_ani(14);
-	det->start_detail(12, 255, ANI_VOR);
-}
-
-int16 r63_use_girl() {
-	int16 action_ret = false;
-	if (is_cur_inventar(UHR_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(2, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		det->stop_detail(12);
-		start_detail_wait(13, 1, ANI_VOR);
-		det->set_static_ani(14, -1);
-		start_aad_wait(365, -1);
-		det->del_static_ani(14);
-		det->start_detail(15, 255, ANI_VOR);
-		start_aad_wait(360, -1);
-		det->stop_detail(15);
-		start_detail_wait(16, 1, ANI_VOR);
-		_G(spieler).R63Uhr = true;
-		det->stop_detail(10);
-		det->stop_detail(18);
-		det->show_static_spr(10);
-		det->show_static_spr(12);
-		atds->set_ats_str(381, 1, ATS_DATEI);
-		atds->set_ats_str(382, 1, ATS_DATEI);
-		atds->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
-		start_aad_wait(367, -1);
-		show_cur();
-	}
-	return action_ret;
-}
-
-int16 r63_use_aschenbecher() {
-	int16 action_ret = false;
-	if (is_cur_inventar(ASCHE_INV)) {
-		action_ret = true;
-		_G(cur_hide_flag) = false;
-		hide_cur();
-		if (_G(spieler).R63Uhr) {
-			if (_G(spieler).R63FxMannWeg) {
-				auto_move(5, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
-				flags.NoScroll = true;
-				auto_scroll(70, 0);
-				auto_move(1, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->start_detail(20, 255, ANI_VOR);
-				det->start_detail(10, 255, ANI_VOR);
-				det->start_detail(18, 255, ANI_VOR);
-				det->hide_static_spr(10);
-				det->hide_static_spr(12);
-				start_aad_wait(368, -1);
-				flic_cut(FCUT_080, FLC_MODE);
-				atds->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_ats_str(383, 1, ATS_DATEI);
-				_G(spieler).R63Feuer = true;
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				_G(spieler).scrollx = 0;
-				set_person_pos(187, 42, P_CHEWY, P_RIGHT);
-				switch_room(64);
-				flags.NoScroll = false;
-			} else
-				start_aad_wait(369, -1);
-		} else
-			start_aad_wait(366, -1);
-		show_cur();
-	}
-	return action_ret;
-}
-
-void r64_entry() {
-	SetUpScreenFunc = r64_setup_func;
-	r62Delay = 0;
-	r64TalkAni = _G(spieler).R64Moni1Ani;
-	if (!_G(spieler).R64ManWeg) {
-		_G(timer_nr)[0] = room->set_timer(1, 10);
-		det->set_static_ani(1, -1);
-		r64_chewy_entry();
-		if (_G(spieler).R63Feuer) {
-			flc->set_flic_user_function(r64_cut_sev);
-			flic_cut(FCUT_078, FLC_MODE);
-			flc->remove_flic_user_function();
-			_G(spieler).R64ManWeg = true;
-			det->del_static_ani(1);
-			room->set_timer_status(1, TIMER_STOP);
-			atds->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(spieler).R64Moni1Ani = 5;
-			r64_calc_monitor();
-			start_aad_wait(354, -1);
-		}
-	} else
-		r64_chewy_entry();
-}
-
-int16 r64_cut_sev(int16 frame) {
-	int16 spr_nr;
-	int16 x, y;
-	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
-	y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
-	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak,
-	          (int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
-	out->scale_set(chewy->image[spr_nr], x, y,
-	                spieler_vector[P_CHEWY].Xzoom,
-	                spieler_vector[P_CHEWY].Yzoom,
-	                scr_width);
-	return 0;
-}
-
-void r64_chewy_entry() {
-	r64_calc_monitor();
-	if (!flags.LoadGame) {
-		hide_cur();
-		det->show_static_spr(3);
-		auto_move(2, P_CHEWY);
-		det->hide_static_spr(3);
-		show_cur();
-	}
-}
-
-void r64_calc_monitor() {
-	int16 str_nr = 0;
-	switch (_G(spieler).R64Moni1Ani) {
-	case 3:
-		str_nr = 0;
-		det->set_static_ani(3, -1);
-		break;
-
-	case 5:
-		str_nr = 1;
-		det->start_detail(5, 255, ANI_VOR);
-		break;
-
-	case 0:
-		str_nr = 2;
-		break;
-
-	}
-	atds->set_ats_str(373, str_nr, ATS_DATEI);
-	switch (_G(spieler).R64Moni2Ani) {
-	case 4:
-		str_nr = 0;
-		det->set_static_ani(4, -1);
-		break;
-
-	case 0:
-		str_nr = 1;
-		break;
-
-	}
-	atds->set_ats_str(374, str_nr, ATS_DATEI);
-}
-
-void r64_setup_func() {
-	if (r62Delay <= 0 && _G(spieler).R62TShow) {
-		r62Delay = (_G(spieler).DelaySpeed + 1) * 60;
-		if (r64TalkAni == 3 || r64TalkAni == 4)
-			det->stop_detail(r64TalkAni);
-		if (r64TalkAni == 4)
-			r64TalkAni = _G(spieler).R64Moni1Ani;
-		else
-			r64TalkAni = _G(spieler).R64Moni2Ani;
-		if (r64TalkAni != 0)
-			det->start_detail(r64TalkAni, 255, ANI_VOR);
-	} else
-		--r62Delay;
-}
-
-void r64_talk_man() {
-	r64_talk_man(350);
-}
-
-void r64_talk_man(int16 aad_nr) {
-	if (!_G(spieler).R64ManWeg) {
-		hide_cur();
-		auto_move(4, P_CHEWY);
-		room->set_timer_status(1, TIMER_STOP);
-		det->del_static_ani(1);
-		det->stop_detail(1);
-		det->set_static_ani(2, -1);
-		start_aad_wait(aad_nr, -1);
-		det->del_static_ani(2);
-		room->set_timer_status(1, TIMER_START);
-		det->set_static_ani(1, -1);
-		show_cur();
-	}
-}
-
-int16 r64_use_tasche() {
-	int16 aad_nr;
-	int16 action_ret = false;
-	hide_cur();
-	aad_nr = -1;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R64ManWeg) {
-			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
-				auto_move(3, P_CHEWY);
-				start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
-				aad_nr = 353;
-				new_invent_2_cur(GERAET_INV);
-				atds->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
-			}
-		} else {
-			auto_move(3, P_CHEWY);
-			aad_nr = 352;
-		}
-		if (aad_nr != -1) {
-			start_aad_wait(aad_nr, -1);
-			action_ret = true;
-		}
-	}
-	show_cur();
-	return action_ret;
-}
-
-void r65_entry() {
-	hide_person();
-	r65tmp_scrollx = _G(spieler).scrollx;
-	r65tmp_scrolly = _G(spieler).scrolly;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	r65tmp_ch_x = spieler_vector[P_CHEWY].Xypos[0];;
-	r65tmp_ch_y = spieler_vector[P_CHEWY].Xypos[1];;
-	r65tmp_ho_x = spieler_vector[P_HOWARD].Xypos[0];;
-	r65tmp_ho_y = spieler_vector[P_HOWARD].Xypos[1];;
-	spieler_vector[P_CHEWY].Xypos[0] = 10;
-	spieler_vector[P_CHEWY].Xypos[1] = 80;
-	spieler_vector[P_HOWARD].Xypos[0] = 150;
-	spieler_vector[P_HOWARD].Xypos[1] = 10;
-	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
-		_G(cur_hide_flag) = false;
-		hide_cur();
-		start_aad_wait(_G(spieler).PersonDia[P_HOWARD], -1);
-		show_cur();
-	} else {
-		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
-	}
-	flags.LoadGame = true;
-	show_person();
-	switch_room(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
-}
-
-void r65_exit() {
-	_G(spieler).scrollx = r65tmp_scrollx;
-	_G(spieler).scrolly = r65tmp_scrolly;
-	set_person_pos(r65tmp_ch_x, r65tmp_ch_y, P_CHEWY, -1);
-	set_person_pos(r65tmp_ho_x, r65tmp_ho_y, P_HOWARD, -1);
-	room_blk.AadLoad = true;
-	room_blk.AtsLoad = true;
-	_G(maus_links_click) = false;
-	set_person_rnr();
-}
-
-void r65_atds_string_start(int16 dia_nr, int16 str_nr,
-                           int16 person_nr, int16 mode) {
-	int16 ani_nr;
-	if (!_G(spieler).PersonDiaRoom[person_nr]) {
-		switch (person_nr) {
-		case 0:
-			if (mode == AAD_STR_START) {
-				switch (_G(spieler).ChewyAni) {
-				case CHEWY_NORMAL:
-					ani_nr = CH_TALK3;
-					break;
-
-				case CHEWY_PUMPKIN:
-					ani_nr = CH_PUMP_TALK;
-					break;
-
-				case CHEWY_ROCKER:
-					ani_nr = CH_ROCK_TALK1;
-					break;
-
-				case CHEWY_JMANS:
-					ani_nr = CH_JM_TALK;
-					break;
-
-				default:
-					ani_nr = -1;
-					break;
-
-				}
-				if (ani_nr != -1)
-					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-			} else {
-				stop_spz();
-			}
-			break;
-
-		case 1:
-			if (mode == AAD_STR_START) {
-				start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-			} else {
-				stop_spz();
-			}
-			break;
-
-		case 3:
-			if (mode == AAD_STR_START) {
-				start_spz(NI_TALK_L, 255, ANI_VOR, P_NICHELLE);
-			} else {
-				stop_spz();
-			}
-			break;
-
-		}
-	} else if (mode == AAD_STR_START) {
-		det->start_detail(person_nr, 255, ANI_VOR);
-	} else {
-			det->stop_detail(person_nr);
-	}
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
index 2b1912718a1..e77a074c17d 100644
--- a/engines/chewy/episode3.h
+++ b/engines/chewy/episode3.h
@@ -24,247 +24,6 @@
 
 namespace Chewy {
 
-void switch_room(int16 nr);
-
-void r45_entry(int16 eib_nr);
-
-void r45_exit(int16 eib_nr);
-
-void r45_setup_func();
-
-int16 r45_use_taxi();
-
-void r45_talk_taxi(int16 aad_nr);
-
-void r45_taxi_mov();
-
-void r45_talk_boy();
-
-int16 r45_use_boy();
-
-void r46_entry(int16 eib_nr);
-
-void r46_bodo();
-
-int16 r46_use_schloss();
-
-void r46_kloppe();
-
-void r46_exit();
-
-void r46setup_func();
-
-void r47_entry();
-
-void r47_exit();
-
-int16 r47_use_knopf(int16 txt_nr);
-
-void r47_set_detail();
-
-void r48_entry();
-
-void r48calc_pic();
-
-void r48_frage();
-void r48setup_func();
-
-void r49_calc_boy();
-
-void r49_talk_boy();
-
-void r49_talk_boy(int16 aad_nr);
-
-void r49_look_hotel();
-
-int16 r49_use_boy();
-void r49_use_boy_cigar();
-
-void r49_entry(int16 eib_nr);
-
-void r49_exit(int16 eib_nr);
-void r49setup_func();
-
-int16 r49_use_taxi();
-
-void r49_calc_boy_ani();
-
-void r50_entry(int16 eib_nr);
-
-void r50_exit(int16 eib_nr);
-
-void r50_stop_cigar();
-
-void r50_calc_wasser();
-
-void r50_calc_treppe();
-
-int16 r50_use_gutschein();
-
-int16 r50_use_gum();
-
-void r50_aad_page(int16 aad_nr, int16 ani_nr);
-
-void r50_stop_page();
-void r50setup_func();
-
-void r50_talk_page();
-
-void r51_entry();
-
-void r51_exit(int16 eib_nr);
-
-int16 r51_use_door(int16 txt_nr);
-void r51setup_func();
-int16 r51_cut_serv(int16 frame);
-void r51_timer_action(int16 t_nr, int16 obj_nr);
-
-void r52_entry();
-
-void r52_exit();
-void r52setup_func();
-
-int16 r52_use_hot_dog();
-
-void r52_plot_armee(int16 frame);
-
-void r52_kaker_platt();
-
-void r53_entry();
-
-void r53_man_go();
-
-void r53_talk_man();
-
-int16 r53_use_man();
-
-void r54_entry(int16 eib_nr);
-
-void r54_exit(int16 eib_nr);
-void r54_setup_func();
-
-int16 r54_use_schalter();
-
-void r54_talk_verkauf();
-
-int16 r54_use_zelle();
-
-int16 r54_use_azug();
-
-int16 r54_use_taxi();
-
-void r54_aufzug_ab();
-int16 r54_cut_serv(int16 frame);
-
-void r54_calc_auto_taxi();
-
-void r55_entry();
-
-void r55_exit(int16 eib_nr);
-void r55_setup_func();
-
-void r55_strasse(int16 mode);
-
-void r55_talk_line();
-
-int16 r55_use_kammeraus();
-int16 r55_cut_serv(int16 frame);
-
-void r55_verleger_mov(int16 mode);
-
-void r55_get_job();
-
-void r55_mans2rock();
-
-void r55_rock2mans();
-
-int16 r55_use_stapel1();
-
-int16 r55_use_stapel2();
-
-int16 r55_use_telefon();
-
-void r56_entry();
-
-void r56_exit();
-void r56_setup_func();
-
-int16 r56_use_taxi();
-
-void r56_talk_man();
-
-int16 r56_use_man();
-
-int16 r56_use_kneipe();
-
-void r56_start_flug();
-
-void r57_entry();
-
-void r57_exit(int16 eib_nr);
-void r57_setup_func();
-
-int16 r57_use_taxi();
-
-int16 r57_use_pfoertner();
-
-void r57_talk_pfoertner();
-
-void r58_entry();
-
-void r58_exit();
-
-void r58_look_cut_mag(int16 r_nr);
-void r58setup_func();
-
-void r59_look_poster();
-
-void r62_entry();
-void r62_setup_func();
-
-int16 r62_use_laura();
-
-void r63_entry();
-
-void r63_talk_hunter();
-
-void r63_talk_regie();
-
-void r63_talk_fx_man();
-
-int16 r63_use_fx_man();
-
-int16 r63_use_schalter();
-
-void r63_talk_girl();
-
-int16 r63_use_girl();
-
-int16 r63_use_aschenbecher();
-
-void r63_bork_platt();
-void r63_setup_func();
-
-void r64_entry();
-
-void r64_chewy_entry();
-
-void r64_calc_monitor();
-void r64_setup_func();
-
-void r64_talk_man();
-
-void r64_talk_man(int16 aad_nr);
-
-int16 r64_use_tasche();
-int16 r64_cut_sev(int16 frame);
-
-void r65_entry();
-
-void r65_exit();
-void r65_atds_string_start(int16 dia_nr, int16 str_nr,
-	int16 person_nr, int16 mode);
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e0a17b00d10..f889c9fd441 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -123,6 +123,20 @@ Globals *g_globals = nullptr;
 
 Globals::Globals() {
 	g_globals = this;
+
+	static const int16 R45_PINFO[R45_MAX_PERSON][4] = {
+		{ 0, 4, 1490, 1500 },
+		{ 0, 1, 180, 190 },
+		{ 0, 1, 40, 60 },
+		{ 0, 1, 40, 150 },
+		{ 0, 1, 40, 230 },
+		{ 0, 1, 40, 340 },
+		{ 0, 1, 49, 50 },
+		{ 0, 1, 5, 90 },
+		{ 0, 1, 7, 190 }
+	};
+	Common::copy(&R45_PINFO[0][0], &R45_PINFO[0][0] + R45_MAX_PERSON * 4,
+		&_r45_pinfo[0][0]);
 }
 
 Globals::~Globals() {
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1af98039793..4cad72e5520 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -38,6 +38,7 @@
 namespace Chewy {
 
 #define MAX_RAND_NO_USE 6
+#define R45_MAX_PERSON 9
 
 extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
 extern const int16 ANI_INVENT_END[3];
@@ -92,6 +93,22 @@ public:
 	bool _calc_inv_text_set = false;
 	bool _stopAutoMove[3] = { false };
 	bool _e_streifen = false;
+	int16 _r45_delay = 0;
+	int16 _r45_pinfo[R45_MAX_PERSON][4];
+	bool _r50Wasser = false;
+	int16 _r56koch_flug = 0;
+	int16 _r62Delay = 0;
+	int16 _r62TalkAni = 0;
+	int16 _r64TalkAni = 0;
+	int16 _r63ChewyAni = 0;
+	int16 _r63Schalter = 0;
+	int16 _r63RunDia = 0;
+	int16 _r65tmp_scrollx = 0;
+	int16 _r65tmp_scrolly = 0;
+	int16 _r65tmp_ch_x = 0;
+	int16 _r65tmp_ch_y = 0;
+	int16 _r65tmp_ho_x = 0;
+	int16 _r65tmp_ho_y = 0;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 5cfc7bd992e..2446cadb44c 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -24,11 +24,10 @@
 #include "chewy/global.h"
 #include "chewy/menus.h"
 #include "chewy/rooms/room44.h"
+#include "chewy/rooms/room58.h"
 
 namespace Chewy {
 
-void r58_look_cut_mag(int16 r_nr);
-
 static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
 
 	{WIN_INF_X + 6, WIN_INF_Y + 10, WIN_INF_X + 6 + 30, WIN_INF_Y + 10 + 14},
@@ -716,14 +715,14 @@ int16 calc_use_invent(int16 inv_nr) {
 		case CUTMAG_INV:
 			show_invent_menu = 2;
 			benutzt = true;
-			r58_look_cut_mag(58);
+			Rooms::Room58::look_cut_mag(58);
 			break;
 
 		case SPARK_INV:
 			show_invent_menu = 2;
 			benutzt = true;
 			save_person_rnr();
-			r58_look_cut_mag(60);
+			Rooms::Room58::look_cut_mag(60);
 			break;
 
 		}
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 65cd68e1248..dface742617 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -91,7 +91,26 @@ MODULE_OBJS = \
 	rooms/room41.o \
 	rooms/room42.o \
 	rooms/room43.o \
-	rooms/room44.o
+	rooms/room44.o \
+	rooms/room45.o \
+	rooms/room46.o \
+	rooms/room47.o \
+	rooms/room48.o \
+	rooms/room49.o \
+	rooms/room50.o \
+	rooms/room51.o \
+	rooms/room52.o \
+	rooms/room53.o \
+	rooms/room54.o \
+	rooms/room55.o \
+	rooms/room56.o \
+	rooms/room57.o \
+	rooms/room58.o \
+	rooms/room59.o \
+	rooms/room62.o \
+	rooms/room63.o \
+	rooms/room64.o \
+	rooms/room65.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8636a1d1602..254f5343e0b 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -168,32 +168,32 @@ void timer_action(int16 t_nr) {
 
 	case 48:
 		if (t_nr == _G(timer_nr)[0])
-			r48_frage();
+			Room48::frage();
 		else
 			default_flag = true;
 		break;
 
 	case 49:
 		if (t_nr == _G(timer_nr)[0])
-			r49_calc_boy_ani();
+			Room49::calc_boy_ani();
 		break;
 
 	case 50:
 		if (t_nr == _G(timer_nr)[0])
-			r50_calc_wasser();
+			Room50::calc_wasser();
 		default_flag = true;
 		break;
 
 	case 51:
 		if (_G(spieler).flags32_10)
-			r51_timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
+			Room51::timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
 		else
 			default_flag = true;
 		break;
 
 	case 56:
 		if (t_nr == _G(timer_nr)[0])
-			r56_start_flug();
+			Room56::start_flug();
 		else
 			default_flag = true;
 		break;
@@ -385,22 +385,22 @@ void check_ged_action(int16 index) {
 
 		case 49:
 			if (!index)
-				r49_calc_boy();
+				Room49::calc_boy();
 			break;
 
 		case 50:
 			if (!index)
-				r50_calc_treppe();
+				Room50::calc_treppe();
 			break;
 
 		case 52:
 			if (index == 1)
-				r52_kaker_platt();
+				Room52::kaker_platt();
 			break;
 
 		case 55:
 			if (!index)
-				r55_talk_line();
+				Room55::talk_line();
 			break;
 
 		case 94:
@@ -669,30 +669,31 @@ void enter_room(int16 eib_nr) {
 	ENTRY_NR(40);
 	ENTRY(41);
 	ENTRY(42);
-	case 45: r45_entry(eib_nr); break;
-	case 46: r46_entry(eib_nr); break;
-	case 47: r47_entry(); break;
-	case 48: r48_entry(); break;
-	case 49: r49_entry(eib_nr); break;
-	case 50: r50_entry(eib_nr); break;
-	case 51: r51_entry(); break;
-	case 52: r52_entry(); break;
-	case 53: r53_entry(); break;
-	case 54: r54_entry(eib_nr); break;
-	case 55: r55_entry(); break;
-	case 56: r56_entry(); break;
-	case 57: r57_entry(); break;
+	ENTRY_NR(45);
+	ENTRY_NR(46);
+	ENTRY(47);
+	ENTRY(48);
+	ENTRY_NR(49);
+	ENTRY_NR(50);
+	ENTRY(51);
+	ENTRY(52);
+	ENTRY(53);
+	ENTRY_NR(54);
+	ENTRY(55);
+	ENTRY(56);
+	ENTRY(57);
 
 	case 58:
 	case 59:
 	case 60:
-		r58_entry();
+		Room58::entry();
 		break;
 
-	case 62: r62_entry(); break;
-	case 63: r63_entry(); break;
-	case 64: r64_entry(); break;
-	case 65: r65_entry(); break;
+	ENTRY(62);
+	ENTRY(63);
+	ENTRY(64);
+	ENTRY(65);
+
 	case 66: r66_entry(eib_nr); break;
 	case 67: r67_entry(); break;
 	case 68: r68_entry(); break;
@@ -806,26 +807,21 @@ void exit_room(int16 eib_nr) {
 
 	case 41: Room41::xit(); break;
 	case 42: Room42::calc_xit(); break;
-
-	case 45: r45_exit(eib_nr); break;
-	case 46: r46_exit(); break;
-	case 47: r47_exit(); break;
-
-	case 49: r49_exit(eib_nr); break;
-
-	case 52: r52_exit(); break;
-	case 54: r54_exit(eib_nr); break;
-
-	case 56: r56_exit(); break;
-	case 57: r57_exit(eib_nr); break;
+	case 45: Room45::xit(eib_nr); break;
+	case 46: Room46::xit(); break;
+	case 47: Room47::xit(); break;
+	case 49: Room49::xit(eib_nr); break;
+	case 52: Room52::xit(); break;
+	case 54: Room54::xit(eib_nr); break;
+	case 56: Room56::xit(); break;
+	case 57: Room57::xit(eib_nr); break;
 
 	case 64:
 		if (_G(spieler).R64Moni1Ani == 5)
 			_G(spieler).R64Moni1Ani = 3;
 		break;
 
-	case 65: r65_exit(); break;
-
+	case 65: Room65::xit(); break;
 	case 76: r76_exit(); break;
 	case 77: r77_exit(); break;
 	case 78: r78_exit(); break;
@@ -1025,9 +1021,9 @@ void exit_room(int16 eib_nr) {
 				_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 			break;
 
-		case 50: r50_exit(eib_nr); break;
-		case 51: r51_exit(eib_nr); break;
-		case 55: r55_exit(eib_nr); break;
+		case 50: Room50::xit(eib_nr); break;
+		case 51: Room51::xit(eib_nr); break;
+		case 55: Room55::xit(eib_nr); break;
 		case 66: r66_exit(eib_nr); break;
 		case 67: r67_exit(); break;
 		case 68: r68_exit(); break;
@@ -1368,7 +1364,7 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			load_room_music(256);
 			ailsnd->set_loopmode(1);
-			r46_kloppe();
+			Room46::kloppe();
 			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
 			CurrentSong = -1;
 			break;
@@ -2079,7 +2075,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_CIGAR_R50:
-		r50_stop_cigar();
+		Room50::stop_cigar();
 		break;
 
 	case SIB_LAMPE_R52:
@@ -2096,7 +2092,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_ASCHE_R64:
 		det->stop_detail(0);
 		obj->hide_sib(sib_nr);
-		r64_talk_man(351);
+		Room64::talk_man(351);
 		break;
 
 	case 94:
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
new file mode 100644
index 00000000000..e0fb2dd9220
--- /dev/null
+++ b/engines/chewy/rooms/room45.cpp
@@ -0,0 +1,260 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room45.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room45::entry(int16 eib_nr) {
+	int16 ch_x, ch_y;
+	int16 ho_x, ho_y;
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(r45_delay) = 0;
+	_G(zoom_horizont) = 150;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 4;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+		spieler_mi[P_HOWARD].Mode = true;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
+	}
+
+	spieler_mi[P_HOWARD].Mode = true;
+	if (!flags.LoadGame) {
+		if (_G(spieler).R48TaxiEntry) {
+			ch_x = 67;
+			ch_y = 146;
+			ho_x = 43;
+			ho_y = 129;
+
+			_G(spieler).R48TaxiEntry = false;
+			_G(maus_links_click) = false;
+		} else {
+			if (eib_nr == 72) {
+				ch_x = 259;
+				ch_y = 146;
+				ho_x = 304;
+				ho_y = 130;
+				_G(spieler).scrollx = 130;
+			} else {
+				ch_x = 68;
+				ch_y = 132;
+				ho_x = 45;
+				ho_y = 124;
+			}
+		}
+		set_person_pos(ch_x, ch_y, P_CHEWY, P_LEFT);
+		set_person_pos(ho_x, ho_y, P_HOWARD, P_LEFT);
+	}
+
+}
+
+void Room45::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+		spieler_mi[P_HOWARD].Mode = false;
+		if (eib_nr == 87) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+		}
+	}
+	if (eib_nr == 87) {
+		flags.NoPalAfterFlc = true;
+		flic_cut(FCUT_073, FLC_MODE);
+	}
+}
+
+void Room45::setup_func() {
+	int16 i;
+	int16 x;
+	int16 y;
+	int16 ch_x;
+
+	if (menu_display == 0) {
+		if (!_G(r45_delay)) {
+			_G(r45_delay) = _G(spieler).DelaySpeed / 2;
+			for (i = 0; i < MAX_PERSON; i++) {
+				if (_G(r45_pinfo)[i][0] == 1) {
+					y = Adi[3 + i].y;
+					x = Adi[3 + i].x;
+					if (i < 6) {
+						x -= _G(r45_pinfo)[i][1];
+						if (x < -30) {
+							_G(r45_pinfo)[i][0] = 0;
+							det->stop_detail(3 + i);
+						}
+					} else {
+						x += _G(r45_pinfo)[i][1];
+						if (x > 540) {
+							_G(r45_pinfo)[i][0] = 0;
+							det->stop_detail(3 + i);
+						}
+					}
+					det->set_detail_pos(3 + i, x, y);
+				} else {
+					++_G(r45_pinfo)[i][2];
+					if (_G(r45_pinfo)[i][2] >= _G(r45_pinfo)[i][3]) {
+						_G(r45_pinfo)[i][2] = 0;
+						_G(r45_pinfo)[i][0] = 1;
+						y = Adi[3 + i].y;
+						if (i < 6) {
+							x = 500;
+						} else {
+							x = 0;
+						}
+						det->set_detail_pos(3 + i, x, y);
+						det->start_detail(3 + i, 255, ANI_VOR);
+					}
+				}
+			}
+		} else
+			--_G(r45_delay);
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
+			calc_person_look();
+			x = spieler_vector[P_HOWARD].Xypos[0];
+			y = 64;
+			ch_x = spieler_vector[P_CHEWY].Xypos[0];
+			if (ch_x < 95) {
+				x = 18;
+				y = 130;
+			} else if (ch_x > 240) {
+				x = 304;
+				y = 130;
+			} else {
+				x = 176;
+				y = 130;
+			}
+			if (HowardMov && flags.ExitMov) {
+				x = 56;
+				y = 122;
+			}
+			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		}
+	}
+}
+
+int16 Room45::use_taxi() {
+	int16 action_ret = false;
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).ChewyAni == CHEWY_PUMPKIN) {
+			action_ret = true;
+			talk_taxi(254);
+		} else if (!_G(spieler).R45TaxiOk) {
+			action_ret = true;
+			talk_taxi(260);
+		} else if (_G(spieler).R45TaxiOk) {
+			action_ret = true;
+			taxi_mov();
+		}
+	} else if (is_cur_inventar(RING_INV)) {
+		action_ret = true;
+		del_inventar(RING_INV);
+		talk_taxi(256);
+		_G(spieler).R45TaxiOk = true;
+		taxi_mov();
+	} else if (is_cur_inventar(UHR_INV)) {
+		action_ret = true;
+		talk_taxi(400);
+	}
+
+	show_cur();
+	return action_ret;
+}
+
+void Room45::talk_taxi(int16 aad_nr) {
+	room->set_timer_status(12, TIMER_STOP);
+	det->del_static_ani(12);
+	start_detail_wait(13, 1, ANI_VOR);
+	det->set_static_ani(14, -1);
+	start_aad_wait(aad_nr, -1);
+	det->del_static_ani(14);
+	start_detail_wait(13, 1, ANI_RUECK);
+	det->set_static_ani(12, -1);
+	room->set_timer_status(12, TIMER_START);
+}
+
+void Room45::taxi_mov() {
+	HowardMov = 2;
+	room->set_timer_status(12, TIMER_STOP);
+	det->del_static_ani(12);
+	det->show_static_spr(11);
+	auto_move(3, P_CHEWY);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+		go_auto_xy(93, 127, P_HOWARD, ANI_WAIT);
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+	}
+	det->hide_static_spr(11);
+	start_detail_wait(15, 1, ANI_VOR);
+
+	switch_room(48);
+}
+
+int16 Room45::use_boy() {
+	int16 action_ret = false;
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	if (!_G(spieler).R45MagOk) {
+		if (is_cur_inventar(DOLLAR175_INV)) {
+			action_ret = true;
+			new_invent_2_cur(CUTMAG_INV);
+			atds->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATEI);
+			start_aad_wait(258, -1);
+			room->set_timer_status(0, TIMER_STOP);
+			det->del_static_ani(0);
+			start_detail_wait(1, 1, ANI_VOR);
+			room->set_timer_status(0, TIMER_START);
+			det->set_static_ani(0, -1);
+			_G(spieler).R45MagOk = true;
+		}
+	} else
+		start_aad_wait(259, -1);
+	show_cur();
+	return action_ret;
+}
+
+void Room45::talk_boy() {
+	int16 aad_nr;
+	hide_cur();
+	if (!_G(spieler).R45MagOk) {
+		auto_move(2, P_CHEWY);
+		aad_nr = 257;
+	} else
+		aad_nr = 259;
+	start_aad_wait(aad_nr, -1);
+	show_cur();
+}
+
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room45.h b/engines/chewy/rooms/room45.h
new file mode 100644
index 00000000000..df7b3c28ad3
--- /dev/null
+++ b/engines/chewy/rooms/room45.h
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM45_H
+#define CHEWY_ROOMS_ROOM45_H
+
+#include "common/scummsys.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room45 {
+private:
+	static void setup_func();
+	static void talk_taxi(int16 aad_nr);
+	static void taxi_mov();
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void talk_boy();
+	static int16 use_boy();
+	static int16 use_taxi();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
new file mode 100644
index 00000000000..8bd0eaef693
--- /dev/null
+++ b/engines/chewy/rooms/room46.cpp
@@ -0,0 +1,153 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room46.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room46::entry(int16 eib_nr) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
+		SetUpScreenFunc = setup_func;
+		if (eib_nr == 79) {
+			set_person_pos(140, 90, P_HOWARD, P_LEFT);
+			auto_move(3, P_CHEWY);
+			set_person_spr(P_LEFT, P_CHEWY);
+		}
+	}
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+		spieler_mi[P_HOWARD].Mode = true;
+		SetUpScreenFunc = setup_func;
+	}
+	if (_G(spieler).R47SchlossOk && !_G(spieler).R46GetLeder)
+		bodo();
+}
+
+void Room46::xit() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+		spieler_mi[P_HOWARD].Mode = false;
+	}
+}
+
+void Room46::setup_func() {
+	int16 x;
+	int16 y;
+	int16 ch_x;
+	calc_person_look();
+	x = spieler_vector[P_HOWARD].Xypos[0];
+	y = 64;
+	ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	if (ch_x > 160) {
+		x = 260;
+	} else
+		x = 120;
+	if (HowardMov && flags.ExitMov) {
+		x = 160;
+		y = 200;
+	}
+	go_auto_xy(x, y, P_HOWARD, ANI_GO);
+}
+
+void Room46::bodo() {
+	hide_cur();
+	det->show_static_spr(0);
+	person_end_phase[P_CHEWY] = P_RIGHT;
+	start_aad_wait(240, -1);
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(42, 76, P_CHEWY, ANI_WAIT);
+	start_aad_wait(250, -1);
+	auto_move(1, P_CHEWY);
+	set_person_spr(P_RIGHT, P_CHEWY);
+	start_aad_wait(251, -1);
+	auto_move(2, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = false;
+	start_detail_wait(0, 1, ANI_VOR);
+	det->start_detail(5, 255, ANI_VOR);
+	start_aad_wait(241, -1);
+	det->stop_detail(5);
+	start_detail_wait(2, 1, ANI_VOR);
+	start_detail_wait(3, 1, ANI_VOR);
+	det->start_detail(4, 255, ANI_VOR);
+	start_aad_wait(242, -1);
+	det->stop_detail(4);
+	start_detail_wait(6, 1, ANI_VOR);
+	det->show_static_spr(3);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	start_detail_wait(1, 1, ANI_VOR);
+	flic_cut(FCUT_065, FLC_MODE);
+	flic_cut(FCUT_066, FLC_MODE);
+	out->setze_zeiger(0);
+	out->cls();
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	det->hide_static_spr(0);
+	det->hide_static_spr(3);
+	load_chewy_taf(CHEWY_ROCKER);
+	set_person_pos(213, 118, P_CHEWY, P_RIGHT);
+	start_aad_wait(243, -1);
+	invent_2_slot(UHR_INV);
+	invent_2_slot(RING_INV);
+	_G(spieler).R46GetLeder = true;
+	show_cur();
+}
+
+void Room46::kloppe() {
+	int16 i;
+	int16 delay;
+	for (i = 0; i < 4; i++) {
+		mem->file->select_pool_item(Ci.Handle, FCUT_065);
+
+		flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+		out->setze_zeiger(0);
+		out->cls();
+		start_aad(244 + i, -1);
+		delay = _G(spieler).DelaySpeed * 50;
+		atds->print_aad(0, 0);
+		while (in->get_switch_code() == 0 && delay) {
+			out->skip_frame(1);
+			--delay;
+		}
+	}
+	ailsnd->fade_out(0);
+	out->cls();
+	while (ailsnd->music_playing());
+}
+
+int16 Room46::use_schloss() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		if (!_G(spieler).R46GetLeder) {
+			auto_move(1, P_CHEWY);
+			switch_room(47);
+		} else
+			start_aad_wait(252, -1);
+	}
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room46.h b/engines/chewy/rooms/room46.h
new file mode 100644
index 00000000000..fce84efb08b
--- /dev/null
+++ b/engines/chewy/rooms/room46.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM46_H
+#define CHEWY_ROOMS_ROOM46_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room46 {
+private:
+	static void setup_func();
+	static void bodo();
+public:
+	static void entry(int16 eib_nr);
+	static void xit();
+	static void kloppe();
+	static int16 use_schloss();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
new file mode 100644
index 00000000000..f940669af1a
--- /dev/null
+++ b/engines/chewy/rooms/room47.cpp
@@ -0,0 +1,91 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room47.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room47::entry() {
+	hide_person();
+	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
+	SetUpScreenFunc = set_detail;
+}
+
+void Room47::xit() {
+	show_person();
+	set_person_pos(114, 102, P_CHEWY, P_LEFT);
+	spieler_mi[P_HOWARD].Mode = true;
+}
+
+int16 Room47::use_knopf(int16 txt_nr) {
+	int16 k_nr = 0;
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		switch (txt_nr) {
+		case 286:
+			k_nr = 0;
+			break;
+
+		case 292:
+			k_nr = 1;
+			break;
+
+		case 293:
+			k_nr = 2;
+			break;
+
+		}
+		++_G(spieler).R47Schloss[k_nr];
+		if (_G(spieler).R47Schloss[k_nr] > 9)
+			_G(spieler).R47Schloss[k_nr] = 0;
+
+		if (_G(spieler).R47Schloss[0] == 7 &&
+			_G(spieler).R47Schloss[1] == 6 &&
+			_G(spieler).R47Schloss[2] == 2)
+			_G(spieler).R47SchlossOk = true;
+		else
+			_G(spieler).R47SchlossOk = false;
+	}
+	return action_ret;
+}
+
+void Room47::set_detail() {
+	int16 i;
+	for (i = 0; i < 10; i++)
+		det->hide_static_spr(i);
+	for (i = 0; i < 3; i++) {
+		det->show_static_spr(_G(spieler).R47Schloss[i]);
+		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
+		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
+	}
+	for (i = 0; i < 10; i++)
+		det->hide_static_spr(i);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room47.h b/engines/chewy/rooms/room47.h
new file mode 100644
index 00000000000..8745f1da271
--- /dev/null
+++ b/engines/chewy/rooms/room47.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM47_H
+#define CHEWY_ROOMS_ROOM47_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room47 {
+private:
+	static void set_detail();
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_knopf(int16 txt_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
new file mode 100644
index 00000000000..4081cd613ac
--- /dev/null
+++ b/engines/chewy/rooms/room48.cpp
@@ -0,0 +1,157 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room48.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room48::entry() {
+	_G(maus_links_click) = false;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	show_cur();
+	calc_pic();
+	SetUpScreenFunc = setup_func;
+	_G(timer_nr)[0] = room->set_timer(255, 20);
+
+}
+
+void Room48::calc_pic() {
+	int16 i;
+	for (i = 0; i < 2; i++) {
+		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).R48Auswahl[3 + i] = 0;
+	}
+	_G(spieler).R48Auswahl[0] = 1;
+	_G(spieler).R48Auswahl[1] = 1;
+	_G(spieler).R48Auswahl[2] = 1;
+
+	if (obj->check_inventar(VCARD_INV)) {
+		_G(spieler).R48Auswahl[3] = 1;
+		atds->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
+		det->show_static_spr(4);
+	}
+	if (obj->check_inventar(KAPPE_INV)) {
+		_G(spieler).R48Auswahl[4] = 1;
+		atds->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
+		det->show_static_spr(4);
+	}
+}
+
+void Room48::frage() {
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		hide_cur();
+		start_detail_wait(1, 1, ANI_VOR);
+		det->show_static_spr(6);
+		start_detail_wait(1, 1, ANI_RUECK);
+		det->hide_static_spr(6);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		show_cur();
+		flags.AutoAniPlay = false;
+	}
+}
+
+void Room48::setup_func() {
+	int16 idx;
+	int16 r_nr;
+	int16 i;
+	for (i = 0; i < 5; i++)
+		det->hide_static_spr(1 + i);
+	if (flags.ShowAtsInvTxt) {
+		if (menu_display == 0) {
+			if (menu_item != CUR_USE) {
+				menu_item = CUR_USE;
+			}
+			cur_2_inventory();
+			cursor_wahl(CUR_ZEIGE);
+			idx = det->maus_vector(minfo.x, minfo.y);
+			if (idx != -1) {
+				if (_G(spieler).R48Auswahl[idx]) {
+					det->show_static_spr(1 + idx);
+					if (_G(maus_links_click)) {
+						switch (idx) {
+						case 0:
+							r_nr = 45;
+							break;
+
+						case 1:
+							r_nr = 49;
+							break;
+
+						case 2:
+							r_nr = 54;
+							break;
+
+						case 3:
+							r_nr = 57;
+							break;
+
+						case 4:
+							r_nr = 56;
+							break;
+
+						default:
+							r_nr = -1;
+							break;
+
+						}
+						if (r_nr != -1) {
+							SetUpScreenFunc = 0;
+							det->hide_static_spr(1 + idx);
+							hide_cur();
+							room->set_timer_status(255, TIMER_STOP);
+							room->set_timer_status(0, TIMER_STOP);
+							det->stop_detail(0);
+							det->del_static_ani(0);
+							start_detail_wait(2, 1, ANI_VOR);
+							menu_item = CUR_WALK;
+							cursor_wahl(menu_item);
+							show_cur();
+							_G(spieler).R48TaxiEntry = true;
+							_G(maus_links_click) = false;
+							set_up_screen(DO_SETUP);
+							for (i = 0; i < MAX_PERSON; i++) {
+								if (_G(spieler).R48TaxiPerson[i]) {
+									_G(spieler).PersonHide[i] = false;
+									_G(spieler).R48TaxiPerson[i] = false;
+								}
+							}
+							if (_G(spieler).PersonRoomNr[P_HOWARD] == 48) {
+								_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
+							}
+							switch_room(r_nr);
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room48.h b/engines/chewy/rooms/room48.h
new file mode 100644
index 00000000000..0e52a39598a
--- /dev/null
+++ b/engines/chewy/rooms/room48.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM38_H
+#define CHEWY_ROOMS_ROOM48_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room48 {
+private:
+	static void calc_pic();
+	static void setup_func();
+public:
+	static void entry();
+	static void frage();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
new file mode 100644
index 00000000000..67b7b99cae8
--- /dev/null
+++ b/engines/chewy/rooms/room49.cpp
@@ -0,0 +1,288 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room49.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room49::entry(int16 eib_nr) {
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	if (!_G(spieler).R49BoyWeg)
+		_G(timer_nr)[0] = room->set_timer(255, 2);
+	else {
+		det->del_static_ani(0);
+		det->hide_static_spr(5);
+	}
+
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (!flags.LoadGame) {
+		if (_G(spieler).R48TaxiEntry) {
+			_G(spieler).R48TaxiEntry = false;
+			set_person_pos(527, 76, P_HOWARD, P_LEFT);
+			set_person_pos(491, 98, P_CHEWY, P_LEFT);
+			_G(maus_links_click) = false;
+			_G(spieler).scrollx = 320;
+			_G(spieler).scrolly = 0;
+			det->start_detail(5, 1, ANI_VOR);
+		} else if (eib_nr == 83)
+			set_person_pos(377, 78, P_HOWARD, P_LEFT);
+	}
+
+}
+
+void Room49::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+		spieler_mi[P_HOWARD].Mode = false;
+		if (eib_nr == 80)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+		else if (eib_nr == 81) {
+			SetUpScreenFunc = 0;
+			start_aad_wait(268, -1);
+		}
+	}
+}
+
+void Room49::calc_boy_ani() {
+	if (!_G(spieler).R49BoyAniCount) {
+		_G(spieler).R49BoyAniCount = 3;
+		_G(spieler).R49BoyAni = 1;
+		det->del_static_ani(0);
+	} else {
+		--_G(spieler).R49BoyAniCount;
+		_G(spieler).R49BoyAni = 0;
+		det->del_static_ani(1);
+	}
+	det->set_static_ani(_G(spieler).R49BoyAni, -1);
+	det->start_detail(_G(spieler).R49BoyAni, 1, ANI_VOR);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
+}
+
+void Room49::calc_boy() {
+	if (!_G(spieler).R49WegFrei) {
+		hide_cur();
+		room->set_timer_status(255, TIMER_STOP);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		stop_person(P_CHEWY);
+		stop_person(P_HOWARD);
+		person_end_phase[P_CHEWY] = P_LEFT;
+		det->stop_detail(_G(spieler).R49BoyAni);
+
+		det->del_static_ani(_G(spieler).R49BoyAni);
+		det->set_static_ani(2, -1);
+		SetUpScreenFunc = 0;
+		start_aad_wait(262, -1);
+		SetUpScreenFunc = setup_func;
+		SetUpScreenFunc = 0;
+		auto_move(3, P_CHEWY);
+		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
+		set_person_spr(P_LEFT, P_HOWARD);
+		det->del_static_ani(2);
+		start_detail_wait(3, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_RUECK);
+		SetUpScreenFunc = setup_func;
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		room->set_timer_status(255, TIMER_START);
+		show_cur();
+	}
+}
+
+int16 Room49::use_boy() {
+	int16 tmp;
+	int16 action_ret = false;
+	if (is_cur_inventar(SPARK_INV)) {
+		action_ret = true;
+		hide_cur();
+		auto_move(3, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		talk_boy(265);
+		_G(spieler).R49WegFrei = true;
+		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
+		show_cur();
+	} else if (is_cur_inventar(CIGAR_INV)) {
+		action_ret = true;
+		hide_cur();
+		del_inventar(_G(spieler).AkInvent);
+		talk_boy(263);
+		SetUpScreenFunc = 0;
+		auto_move(5, P_CHEWY);
+		tmp = room->room_info->ZoomFak;
+		room->set_zoom(0);
+		go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
+		set_person_spr(P_LEFT, P_HOWARD);
+		flags.NoScroll = true;
+		auto_scroll(164, 0);
+		flic_cut(FCUT_067, FLC_MODE);
+		room->set_timer_status(255, TIMER_STOP);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		det->del_static_ani(_G(spieler).R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni);
+		flags.NoScroll = false;
+
+		set_person_spr(P_RIGHT, P_CHEWY);
+		start_aad_wait(264, -1);
+		room->set_zoom(tmp);
+		obj->add_inventar(GUM_INV, &room_blk);
+		inventory_2_cur(GUM_INV);
+		atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
+		SetUpScreenFunc = setup_func;
+		_G(spieler).R49BoyWeg = true;
+		show_cur();
+	}
+	return action_ret;
+}
+
+void Room49::use_boy_cigar() {
+	hide_cur();
+	del_inventar(_G(spieler).AkInvent);
+	talk_boy(263);
+	SetUpScreenFunc = nullptr;
+	auto_move(5, 0);
+
+	int16 zoom = room->room_info->ZoomFak;
+	room->set_zoom(zoom);
+	go_auto_xy(416, 79, 1, 0);
+	set_person_spr(0, 1);
+	flags.NoScroll = true;
+
+	auto_scroll(164, 0);
+	flic_cut(67, 0);
+	test_intro(17);
+	ERROR
+
+		room->set_timer_status(255, 0);
+	uhr->reset_timer(_G(timer_nr)[0], 0);
+	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
+	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+
+	flags.NoScroll = false;
+	set_person_spr(1, 0);
+	start_aad_wait(264, -1);
+	room->set_zoom(zoom);
+
+	obj->add_inventar(68, &room_blk);
+	inventory_2_cur(68);
+	atds->set_steuer_bit(318, 1, 1);
+
+	SetUpScreenFunc = setup_func;
+	_G(spieler).R49BoyWeg = true;
+	show_cur();
+}
+
+void Room49::talk_boy() {
+	if (!_G(spieler).R49BoyWeg) {
+		auto_move(3, P_CHEWY);
+		talk_boy(266 + _G(spieler).R49WegFrei);
+	}
+}
+
+void Room49::talk_boy(int16 aad_nr) {
+	if (!_G(spieler).R49BoyWeg) {
+		room->set_timer_status(255, TIMER_STOP);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		det->stop_detail(_G(spieler).R49BoyAni);
+
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		det->set_static_ani(2, -1);
+		SetUpScreenFunc = 0;
+		stop_person(P_HOWARD);
+		start_aad_wait(aad_nr, -1);
+		SetUpScreenFunc = setup_func;
+		det->del_static_ani(2);
+		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		room->set_timer_status(255, TIMER_START);
+	}
+}
+
+void Room49::look_hotel() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+
+		SetUpScreenFunc = 0;
+		stop_person(P_HOWARD);
+		start_aad_wait(261, -1);
+		SetUpScreenFunc = setup_func;
+	}
+}
+
+int16 Room49::use_taxi() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		hide_cur();
+		start_ani_block(2, ablock34);
+		det->show_static_spr(7);
+		auto_move(2, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+			go_auto_xy(507, 74, P_HOWARD, ANI_WAIT);
+			go_auto_xy(490, 58, P_HOWARD, ANI_WAIT);
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+		}
+		det->hide_static_spr(7);
+		start_detail_wait(5, 1, ANI_VOR);
+		switch_room(48);
+	}
+	return action_ret;
+}
+
+void Room49::setup_func() {
+	int16 x, y;
+	int16 ch_x;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+		calc_person_look();
+		x = spieler_vector[P_HOWARD].Xypos[0];
+		y = 64;
+		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		if (ch_x < 130) {
+			x = 40;
+			y = 97;
+		} else if (ch_x < 312) {
+			x = 221;
+			y = 94;
+		} else if (ch_x < 445) {
+			x = 342;
+			y = 93;
+		} else {
+			x = 536;
+			y = 90;
+		}
+
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room49.h b/engines/chewy/rooms/room49.h
new file mode 100644
index 00000000000..eb3324dda71
--- /dev/null
+++ b/engines/chewy/rooms/room49.h
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM49_H
+#define CHEWY_ROOMS_ROOM49_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room49 {
+private:
+	static void talk_boy(int16 aad_nr);
+	static void setup_func();
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void calc_boy_ani();
+	static void calc_boy();
+	static int16 use_boy();
+	static void use_boy_cigar();
+	static void look_hotel();
+	static int16 use_taxi();
+	static void talk_boy();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
new file mode 100644
index 00000000000..694b4230bcc
--- /dev/null
+++ b/engines/chewy/rooms/room50.cpp
@@ -0,0 +1,223 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room50.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room50::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).R50Zigarre) {
+		stop_cigar();
+	} else
+		det->start_detail(0, 255, ANI_VOR);
+	if (!_G(spieler).R50KeyOK) {
+		_G(timer_nr)[0] = room->set_timer(1, 8);
+		_G(r50Wasser) = false;
+	} else
+		det->show_static_spr(4);
+	SetUpScreenFunc = setup_func;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+		spieler_mi[P_HOWARD].Mode = true;
+		if (!flags.LoadGame) {
+			if (eib_nr == 85)
+				set_person_pos(298, 56, P_HOWARD, P_RIGHT);
+			else
+				set_person_pos(1, 64, P_HOWARD, P_RIGHT);
+		}
+	}
+}
+
+void Room50::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+		if (eib_nr == 83)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 49;
+		else
+			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
+		spieler_mi[P_HOWARD].Mode = false;
+	}
+}
+
+void Room50::stop_cigar() {
+	room->set_timer_status(0, TIMER_STOP);
+	det->del_static_ani(0);
+	atds->set_ats_str(328, 1, ATS_DATEI);
+	det->stop_detail(0);
+	_G(spieler).R50Zigarre = true;
+}
+
+void Room50::calc_wasser() {
+	if (!_G(r50Wasser)) {
+		stop_page();
+		det->start_detail(4, 1, ANI_VOR);
+		_G(r50Wasser) = true;
+	}
+}
+
+void Room50::stop_page() {
+	room->set_timer_status(3, TIMER_STOP);
+	det->del_static_ani(3);
+	det->stop_detail(3);
+	det->stop_detail(4);
+}
+
+void Room50::go_page() {
+	det->set_static_ani(3, -1);
+	room->set_timer_status(3, TIMER_START);
+}
+
+void Room50::calc_treppe() {
+	if (!flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+		if (!_G(spieler).R50KeyOK) {
+			hide_cur();
+			stop_person(P_CHEWY);
+			room->set_timer_status(1, TIMER_STOP);
+			_G(r50Wasser) = false;
+			stop_page();
+			det->set_static_ani(5, -1);
+			start_aad_wait(272, -1);
+			auto_move(3, P_CHEWY);
+			aad_page(273, 5);
+		}
+		flags.AutoAniPlay = false;
+	}
+}
+
+int16 Room50::use_gutschein() {
+	int16 action_ret = false;
+	if (is_cur_inventar(HOTEL_INV)) {
+		action_ret = true;
+		if (!_G(spieler).R50KeyOK) {
+			hide_cur();
+			auto_move(3, P_CHEWY);
+			room->set_timer_status(1, TIMER_STOP);
+			_G(r50Wasser) = false;
+			stop_page();
+			del_inventar(_G(spieler).AkInvent);
+			start_ani_block(2, ablock36);
+			aad_page(274, 8);
+		} else
+			start_aad_wait(276, -1);
+	}
+	return action_ret;
+}
+
+int16 Room50::use_gum() {
+	int16 action_ret = false;
+	if (is_cur_inventar(GUM_INV)) {
+		action_ret = true;
+		hide_cur();
+		_G(spieler).R50KeyOK = true;
+		room->set_timer_status(1, TIMER_STOP);
+		_G(r50Wasser) = false;
+		stop_page();
+		start_detail_wait(6, 1, ANI_VOR);
+		det->set_static_ani(5, -1);
+		auto_move(3, P_CHEWY);
+		spieler_mi[P_CHEWY].Mode = true;
+		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
+		SetUpScreenFunc = 0;
+		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
+		set_person_spr(P_LEFT, P_HOWARD);
+		del_inventar(_G(spieler).AkInvent);
+		hide_person();
+		start_detail_wait(2, 1, ANI_VOR);
+		det->show_static_spr(4);
+		start_detail_wait(2, 1, ANI_RUECK);
+		show_person();
+		set_person_spr(P_LEFT, P_CHEWY);
+		start_aad_wait(275, -1);
+		det->del_static_ani(5);
+		start_detail_wait(9, 1, ANI_VOR);
+		det->del_static_ani(5);
+		det->set_static_ani(10, -1);
+		start_aad_wait(277, -1);
+		SetUpScreenFunc = setup_func;
+		auto_move(3, P_CHEWY);
+		spieler_mi[P_CHEWY].Mode = true;
+		det->del_static_ani(10);
+		go_page();
+		obj->add_inventar(KEY_INV, &room_blk);
+		inventory_2_cur(KEY_INV);
+		atds->set_ats_str(323, 1, ATS_DATEI);
+		atds->set_ats_str(327, 1, ATS_DATEI);
+		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
+		show_cur();
+	}
+	return action_ret;
+}
+
+void Room50::talk_page() {
+	start_aad_wait(276, -1);
+}
+
+void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
+	det->set_static_ani(ani_nr, -1);
+	start_aad_wait(aad_nr, -1);
+	det->del_static_ani(ani_nr);
+	start_detail_wait(6, 1, ANI_RUECK);
+	go_page();
+	if (!_G(spieler).R50KeyOK)
+		room->set_timer_status(1, TIMER_START);
+	show_cur();
+}
+
+void Room50::setup_func() {
+	int16 x, y;
+	int16 ch_x;
+	if (_G(r50Wasser) && !det->get_ani_status(4)) {
+		_G(r50Wasser) = false;
+		go_page();
+	}
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+		calc_person_look();
+		x = spieler_vector[P_HOWARD].Xypos[0];
+		y = 64;
+		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		if (ch_x < 72) {
+			x = 1;
+			y = 64;
+		} else if (ch_x < 275 && spieler_vector[P_CHEWY].Xypos[1] > 72) {
+			x = 143;
+			y = 57;
+		} else {
+			x = 162;
+			y = 115;
+		}
+		if (HowardMov && flags.ExitMov) {
+			SetUpScreenFunc = 0;
+			HowardMov = 0;
+			auto_move(4, P_HOWARD);
+		} else
+			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room50.h b/engines/chewy/rooms/room50.h
new file mode 100644
index 00000000000..c5397b10b08
--- /dev/null
+++ b/engines/chewy/rooms/room50.h
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM50_H
+#define CHEWY_ROOMS_ROOM50_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room50 {
+private:
+	static void stop_page();
+	static void go_page();
+	static void aad_page(int16 aad_nr, int16 ani_nr);
+	static void setup_func();
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void calc_wasser();
+	static void calc_treppe();
+	static int16 use_gutschein();
+	static int16 use_gum();
+	static void talk_page();
+	static void stop_cigar();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
new file mode 100644
index 00000000000..bd58dae95dd
--- /dev/null
+++ b/engines/chewy/rooms/room51.cpp
@@ -0,0 +1,222 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room51.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room51::entry() {
+	int16 i;
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 4;
+	for (i = 0; i < 2; i++)
+		det->start_detail(3 + i, 1, ANI_VOR);
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 30;
+		if (!flags.LoadGame) {
+			set_person_pos(88, 93, P_HOWARD, P_RIGHT);
+		}
+		if (!_G(spieler).R51FirstEntry) {
+			hide_cur();
+			_G(spieler).R51FirstEntry = true;
+			set_person_spr(P_LEFT, P_CHEWY);
+			start_aad_wait(283, -1);
+			show_cur();
+		}
+		SetUpScreenFunc = setup_func;
+		spieler_mi[P_HOWARD].Mode = true;
+	}
+}
+
+void Room51::xit(int16 eib_nr) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+		if (eib_nr == 85) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+		} else
+			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
+		spieler_mi[P_HOWARD].Mode = false;
+	}
+}
+
+void Room51::setup_func() {
+	int16 x, y;
+	int16 ch_y;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+		calc_person_look();
+		x = spieler_vector[P_HOWARD].Xypos[0];
+		y = 64;
+		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		if (ch_y < 129) {
+			x = 56;
+			y = 106;
+		} else {
+			x = 31;
+			y = 118;
+		}
+		if (HowardMov && flags.ExitMov) {
+			SetUpScreenFunc = 0;
+			HowardMov = 0;
+			auto_move(9, P_HOWARD);
+		} else
+			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+int16 Room51::use_door(int16 txt_nr) {
+	int16 action_ret = false;
+	if (is_cur_inventar(KEY_INV)) {
+		hide_cur();
+		action_ret = true;
+		switch (txt_nr) {
+		case 329:
+			auto_move(8, P_CHEWY);
+			SetUpScreenFunc = 0;
+			det->show_static_spr(0);
+			if (!_G(spieler).R51HotelRoom) {
+				auto_move(11, P_HOWARD);
+				set_person_spr(P_LEFT, P_HOWARD);
+				_G(spieler).R51HotelRoom = true;
+				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
+				start_aad_wait(285, -1);
+				atds->set_ats_str(329, 1, ATS_DATEI);
+				SetUpScreenFunc = setup_func;
+			} else {
+				show_cur();
+				switch_room(52);
+			}
+			break;
+
+		case 330:
+			auto_move(9, P_CHEWY);
+			if (!_G(spieler).R51KillerWeg) {
+				det->show_static_spr(1);
+				start_detail_wait(2, 1, ANI_VOR);
+				det->start_detail(5, 255, ANI_VOR);
+				if (!_G(spieler).R52HotDogOk) {
+					start_aad_wait(287, -1);
+					auto_move(12, P_CHEWY);
+					det->stop_detail(5);
+					start_ani_block(5, ablock37);
+					det->hide_static_spr(1);
+					start_aad_wait(284, -1);
+				} else {
+					_G(spieler).R51KillerWeg = true;
+					start_aad_wait(290, -1);
+					out->ausblenden(1);
+					out->setze_zeiger(0);
+					out->cls();
+					out->einblenden(pal, 0);
+					flags.NoPalAfterFlc = true;
+					flc->set_flic_user_function(cut_serv);
+					det->show_static_spr(16);
+					flic_cut(FCUT_068, FLC_MODE);
+					flc->remove_flic_user_function();
+					det->hide_static_spr(16);
+					flags.NoPalAfterFlc = false;
+					det->stop_detail(5);
+					obj->show_sib(SIB_AUSRUEST_R52);
+					obj->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
+					det->hide_static_spr(1);
+
+					fx_blend = BLEND3;
+					set_up_screen(DO_SETUP);
+					start_aad_wait(291, -1);
+				}
+			} else
+				start_aad_wait(401, -1);
+			break;
+
+		case 331:
+			auto_move(10, P_CHEWY);
+			break;
+
+		case 332:
+			auto_move(6, P_CHEWY);
+			start_aad_wait(286, -1);
+			break;
+
+		case 333:
+			auto_move(4, P_CHEWY);
+			switch (_G(spieler).R51DoorCount) {
+			case 0:
+				det->show_static_spr(3);
+				start_aad_wait(278, -1);
+				start_detail_frame(0, 1, ANI_VOR, 3);
+				start_spz(HO_BRILL_JMP, 1, ANI_VOR, P_HOWARD);
+				wait_detail(0);
+
+				det->show_static_spr(14);
+				start_aad_wait(279, -1);
+				++_G(spieler).R51DoorCount;
+				obj->show_sib(SIB_FLASCHE_R51);
+				obj->calc_rsi_flip_flop(SIB_FLASCHE_R51);
+				det->hide_static_spr(3);
+				break;
+
+			case 1:
+				det->show_static_spr(3);
+				start_aad_wait(280, -1);
+				start_detail_wait(1, 1, ANI_VOR);
+				++_G(spieler).R51DoorCount;
+				obj->show_sib(SIB_KAPPE_R51);
+				obj->calc_rsi_flip_flop(SIB_KAPPE_R51);
+				det->hide_static_spr(3);
+				det->show_static_spr(15);
+				break;
+
+			default:
+				start_aad_wait(281, -1);
+				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
+					start_aad_wait(282, -1);
+				break;
+
+			}
+			break;
+
+		case 334:
+			auto_move(7, P_CHEWY);
+			break;
+
+		}
+		show_cur();
+	}
+	return action_ret;
+}
+
+int16 Room51::cut_serv(int16 frame) {
+	det->plot_static_details(0, 0, 16, 16);
+	return 0;
+}
+
+void Room51::timer_action(int16 t_nr, int16 obj_nr) {
+	::error("TODO");
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room51.h b/engines/chewy/rooms/room51.h
new file mode 100644
index 00000000000..60e66b9d94f
--- /dev/null
+++ b/engines/chewy/rooms/room51.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM51_H
+#define CHEWY_ROOMS_ROOM51_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room51 {
+private:
+	static void setup_func();
+	static int16 cut_serv(int16 frame);
+
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int16 use_door(int16 txt_nr);
+	static void timer_action(int16 t_nr, int16 obj_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
new file mode 100644
index 00000000000..3b3831f9592
--- /dev/null
+++ b/engines/chewy/rooms/room52.cpp
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room52.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room52::entry() {
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg)
+		plot_armee(0);
+	if (_G(spieler).R52KakerWeg)
+		det->stop_detail(0);
+	if (!flags.LoadGame) {
+		det->show_static_spr(4);
+		_G(spieler).R52TuerAuf = true;
+		set_person_pos(20, 50, P_HOWARD, P_LEFT);
+		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
+		auto_move(2, P_CHEWY);
+		_G(spieler).R52TuerAuf = false;
+		det->hide_static_spr(4);
+		check_shad(2, 1);
+	}
+}
+
+void Room52::xit() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 51;
+		spieler_mi[P_HOWARD].Mode = false;
+	}
+}
+
+int16 Room52::use_hot_dog() {
+	int16 i;
+	int16 action_ret = false;
+	hide_cur();
+	if (is_cur_inventar(BURGER_INV)) {
+		action_ret = true;
+		auto_move(3, P_CHEWY);
+		start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
+		det->show_static_spr(0);
+		del_inventar(_G(spieler).AkInvent);
+		auto_move(4, P_CHEWY);
+		_G(spieler).R52HotDogOk = true;
+		plot_armee(20);
+		atds->set_ats_str(341, 1, ATS_DATEI);
+		auto_move(2, P_CHEWY);
+		set_person_spr(P_LEFT, P_CHEWY);
+		start_aad_wait(288, -1);
+	} else if (is_cur_inventar(KILLER_INV)) {
+		action_ret = true;
+		auto_move(5, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(7, 1, ANI_VOR);
+		det->start_detail(8, 255, ANI_VOR);
+		for (i = 0; i < 5; i++) {
+			wait_show_screen(20);
+			det->stop_detail(2 + i);
+		}
+		det->stop_detail(0);
+		det->stop_detail(8);
+		start_detail_wait(7, 1, ANI_RUECK);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
+		start_aad_wait(303, -1);
+		atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
+		_G(spieler).R52KakerWeg = true;
+	}
+	show_cur();
+	return action_ret;
+}
+
+void Room52::plot_armee(int16 frame) {
+	int16 i;
+	for (i = 0; i < 5; i++) {
+		wait_show_screen(frame);
+		det->start_detail(2 + i, 255, ANI_VOR);
+	}
+}
+
+void Room52::kaker_platt() {
+	if (!_G(spieler).R52KakerJoke &&
+		_G(spieler).R52HotDogOk &&
+		!_G(spieler).R52KakerWeg &&
+		!flags.ExitMov) {
+		_G(spieler).R52KakerJoke = true;
+		stop_person(P_CHEWY);
+		start_aad_wait(289, -1);
+	}
+}
+
+void Room52::setup_func() {
+	int16 x, y;
+	int16 ch_y;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
+		calc_person_look();
+		x = 1;
+		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		if (ch_y < 97) {
+			y = 44;
+		} else {
+			y = 87;
+		}
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room52.h b/engines/chewy/rooms/room52.h
new file mode 100644
index 00000000000..3b93992fdc5
--- /dev/null
+++ b/engines/chewy/rooms/room52.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM52_H
+#define CHEWY_ROOMS_ROOM52_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room52 {
+private:
+	static void plot_armee(int16 frame);
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_hot_dog();
+	static void kaker_platt();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
new file mode 100644
index 00000000000..480a7a7c167
--- /dev/null
+++ b/engines/chewy/rooms/room53.cpp
@@ -0,0 +1,86 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room53.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room53::entry() {
+	hide_cur();
+	obj->hide_sib(SIB_VISIT_R53);
+	atds->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	start_detail_wait(0, 1, ANI_VOR);
+	det->set_static_ani(1, -1);
+	_G(timer_nr)[0] = room->set_timer(1, 7);
+	show_cur();
+}
+
+void Room53::man_go() {
+	room->set_timer_status(1, TIMER_STOP);
+	det->del_static_ani(1);
+	start_detail_wait(5, 1, ANI_VOR);
+	atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	if (!_G(spieler).R53Visit)
+		obj->show_sib(SIB_VISIT_R53);
+}
+
+void Room53::talk_man() {
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	room->set_timer_status(1, TIMER_STOP);
+	det->del_static_ani(1);
+	start_detail_wait(2, 1, ANI_VOR);
+	det->set_static_ani(3, -1);
+	start_aad_wait(269 + (int16)_G(spieler).R53Kostuem, -1);
+	det->del_static_ani(3);
+	start_detail_wait(4, 1, ANI_VOR);
+	man_go();
+	show_cur();
+}
+
+int16 Room53::use_man() {
+	int16 action_ret = false;
+	if (is_cur_inventar(BESTELL_INV)) {
+		action_ret = true;
+		hide_cur();
+		_G(spieler).R53Kostuem = true;
+		del_inventar(_G(spieler).AkInvent);
+		auto_move(2, P_CHEWY);
+		start_aad_wait(271, -1);
+		room->set_timer_status(1, TIMER_STOP);
+		det->del_static_ani(1);
+		start_ani_block(7, ablock35);
+		obj->add_inventar(JMKOST_INV, &room_blk);
+		inventory_2_cur(JMKOST_INV);
+		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+		show_cur();
+	}
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room53.h b/engines/chewy/rooms/room53.h
new file mode 100644
index 00000000000..6f0d39ae5f3
--- /dev/null
+++ b/engines/chewy/rooms/room53.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM53_H
+#define CHEWY_ROOMS_ROOM53_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room53 {
+private:
+	static void man_go();
+
+public:
+	static void entry();
+	static void talk_man();
+	static int16 use_man();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
new file mode 100644
index 00000000000..533891195c4
--- /dev/null
+++ b/engines/chewy/rooms/room54.cpp
@@ -0,0 +1,350 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room54.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room54::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(zoom_horizont) = 106;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
+	if (_G(spieler).R54FputzerWeg)
+		det->show_static_spr(9);
+	spieler_mi[P_HOWARD].Mode = true;
+	if (!flags.LoadGame) {
+		if (_G(spieler).R48TaxiEntry) {
+			_G(spieler).R48TaxiEntry = false;
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+				_G(spieler).R54HowardVorne = false;
+				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
+			}
+			set_person_pos(300, 80, P_CHEWY, P_LEFT);
+			_G(maus_links_click) = false;
+			_G(spieler).scrollx = 134;
+			_G(spieler).scrolly = 0;
+		} else if (_G(spieler).R55Location) {
+			aufzug_ab();
+		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+				_G(spieler).R54HowardVorne = false;
+				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
+			}
+			_G(spieler).scrollx = 66;
+			set_person_pos(241, 85, P_CHEWY, P_LEFT);
+		}
+		if (_G(spieler).R55ExitDia) {
+			start_aad_wait(_G(spieler).R55ExitDia, -1);
+		}
+		if (_G(spieler).R55R54First) {
+			_G(spieler).R55R54First = false;
+			calc_auto_taxi();
+		}
+	}
+}
+
+void Room54::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
+		spieler_mi[P_HOWARD].Mode = false;
+	}
+}
+
+void Room54::calc_auto_taxi() {
+	int16 r_nr;
+	r_nr = 0;
+	if (_G(spieler).R56AbfahrtOk) {
+		r_nr = 57;
+	} else if (obj->check_inventar(KAPPE_INV)) {
+		r_nr = 56;
+	}
+	if (r_nr) {
+		hide_cur();
+		auto_move(7, P_CHEWY);
+		_G(spieler).R54HowardVorne = false;
+		go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
+		_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
+		_G(maus_links_click) = false;
+		show_cur();
+		_G(spieler).R48TaxiEntry = true;
+		switch_room(r_nr);
+	}
+}
+
+void Room54::setup_func() {
+	int16 x, y;
+	int16 ch_x;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+		calc_person_look();
+		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		if (_G(spieler).R54HowardVorne != 255) {
+			if (_G(spieler).R54HowardVorne) {
+				if (ch_x < 218) {
+					x = 150;
+					y = 113;
+				} else {
+					x = 287;
+					y = 115;
+				}
+			} else {
+				y = 61;
+				if (ch_x < 167) {
+					x = 122;
+				} else if (ch_x < 251) {
+					x = 212;
+				} else {
+					x = 290;
+				}
+			}
+			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		}
+	}
+}
+
+int16 Room54::use_schalter() {
+	int16 aad_nr;
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		hide_cur();
+		action_ret = true;
+		if (!_G(spieler).R54FputzerWeg) {
+			auto_move(1, P_CHEWY);
+			_G(spieler).R54HowardVorne = 255;
+			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
+			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
+			start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+			det->show_static_spr(0);
+			auto_move(2, P_CHEWY);
+			start_detail_wait(1, 1, ANI_VOR);
+			det->start_detail(3, 255, ANI_VOR);
+			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
+			det->stop_detail(3);
+			++_G(spieler).R54LiftCount;
+			if (_G(spieler).R54LiftCount < 3) {
+				start_detail_wait(2, 1, ANI_VOR);
+				det->hide_static_spr(0);
+				start_detail_wait(1, 1, ANI_RUECK);
+				aad_nr = 295;
+			} else {
+				start_detail_wait(5, 1, ANI_VOR);
+				det->show_static_spr(9);
+				start_detail_wait(4, 1, ANI_VOR);
+				aad_nr = 296;
+				_G(spieler).R54FputzerWeg = true;
+				atds->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
+				atds->set_ats_str(349, 1, ATS_DATEI);
+				atds->set_ats_str(345, 1, ATS_DATEI);
+			}
+			start_aad_wait(aad_nr, -1);
+			_G(spieler).R54HowardVorne = false;
+		} else
+			start_aad_wait(297, -1);
+		show_cur();
+	}
+	return action_ret;
+}
+
+void Room54::talk_verkauf() {
+	hide_cur();
+	if (!_G(spieler).R54HotDogOk) {
+		if (_G(spieler).AkInvent == DOLLAR175_INV)
+			del_inventar(DOLLAR175_INV);
+		else
+			del_invent_slot(DOLLAR175_INV);
+		_G(spieler).R54HotDogOk = true;
+		auto_move(3, P_CHEWY);
+		_G(spieler).R54HowardVorne = true;
+		start_aad_wait(299, -1);
+		room->set_timer_status(6, TIMER_STOP);
+		det->del_static_ani(6);
+		start_detail_wait(7, 1, ANI_VOR);
+		det->start_detail(8, 255, ANI_VOR);
+		start_aad_wait(310, -1);
+		det->stop_detail(8);
+		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_VOR);
+		det->start_detail(11, 255, ANI_VOR);
+		start_aad_wait(311, -1);
+		det->stop_detail(11);
+		room->set_timer_status(6, TIMER_START);
+		det->set_static_ani(6, -1);
+		auto_move(4, P_CHEWY);
+		start_aad_wait(312, -1);
+		obj->add_inventar(BURGER_INV, &room_blk);
+		inventory_2_cur(BURGER_INV);
+	} else
+		start_aad_wait(313, -1);
+	show_cur();
+}
+
+int16 Room54::use_zelle() {
+	int16 action_ret = false;
+	hide_cur();
+	if (_G(spieler).inv_cur) {
+		if (is_cur_inventar(JMKOST_INV)) {
+			action_ret = true;
+			if (!_G(spieler).R54Schild) {
+				start_aad_wait(318, -1);
+			} else {
+				auto_move(5, P_CHEWY);
+				_G(spieler).R54HowardVorne = true;
+				SetUpScreenFunc = 0;
+				auto_scroll(176, 0);
+				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
+				flc->set_flic_user_function(cut_serv);
+				flic_cut(FCUT_069, FLC_MODE);
+				flc->remove_flic_user_function();
+				del_inventar(_G(spieler).AkInvent);
+				invent_2_slot(LEDER_INV);
+				load_chewy_taf(CHEWY_JMANS);
+				_G(zoom_horizont) = 90;
+				set_person_pos(283, 93, P_CHEWY, P_LEFT);
+				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
+				start_aad_wait(315, -1);
+				go_auto_xy(241, 74, P_CHEWY, ANI_WAIT);
+				start_aad_wait(316, -1);
+
+				spieler_mi[P_HOWARD].Mode = true;
+				switch_room(55);
+			}
+		}
+	} else {
+		action_ret = true;
+		auto_move(6, P_CHEWY);
+		_G(spieler).R54HowardVorne = true;
+		start_aad_wait(319, -1);
+	}
+	show_cur();
+	return action_ret;
+}
+
+int16 Room54::cut_serv(int16 frame) {
+	det->plot_static_details(176, 0, 9, 9);
+	return 0;
+}
+
+int16 Room54::use_azug() {
+	int16 ch_y;
+	int16 ay;
+	int16 delay;
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		hide_cur();
+		if (!_G(spieler).R54LiftOk) {
+			if (_G(spieler).R54FputzerWeg) {
+				auto_move(8, P_CHEWY);
+				_G(spieler).R54HowardVorne = false;
+				start_aad_wait(298, -1);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				det->show_static_spr(12);
+				_G(spieler).R55Location = true;
+				SetUpScreenFunc = 0;
+				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
+				ch_y = 68;
+				ay = 0;
+				delay = 0;
+				while (ch_y > -48) {
+					det->set_static_pos(12, 125, ch_y, false, false);
+					det->set_static_pos(9, 122, ay, false, false);
+					if (!delay) {
+						ch_y -= 3;
+						ay -= 3;
+						delay = _G(spieler).DelaySpeed / 2;
+					} else
+						--delay;
+					set_up_screen(DO_SETUP);
+				}
+				switch_room(55);
+			}
+		} else
+			start_aad_wait(314, -1);
+		show_cur();
+	}
+	return action_ret;
+}
+
+void Room54::aufzug_ab() {
+	int16 ch_y;
+	int16 ay;
+	int16 delay;
+	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
+	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
+	_G(spieler).scrollx = 0;
+	SetUpScreenFunc = setup_func;
+	ch_y = -40;
+	ay = -108;
+	delay = 0;
+	det->show_static_spr(12);
+	while (ch_y < 68 && !SHOULD_QUIT) {
+		det->set_static_pos(12, 125, ch_y, false, false);
+		det->set_static_pos(9, 122, ay, false, false);
+		if (!delay) {
+			ch_y += 3;
+			ay += 3;
+			delay = _G(spieler).DelaySpeed / 2;
+		} else
+			--delay;
+		set_up_screen(DO_SETUP);
+	}
+	det->hide_static_spr(12);
+	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(maus_links_click) = false;
+	stop_person(P_CHEWY);
+	_G(spieler).R55Location = false;
+}
+
+short Room54::use_taxi() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		hide_cur();
+		auto_move(7, P_CHEWY);
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+			if (_G(spieler).R54HowardVorne) {
+				_G(spieler).R54HowardVorne = false;
+				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
+			}
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+		}
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		switch_room(48);
+	}
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room54.h b/engines/chewy/rooms/room54.h
new file mode 100644
index 00000000000..c98762afa31
--- /dev/null
+++ b/engines/chewy/rooms/room54.h
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM54_H
+#define CHEWY_ROOMS_ROOM54_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room54 {
+private:
+	static void setup_func();
+	static void calc_auto_taxi();
+	static int16 cut_serv(int16 frame);
+	static void aufzug_ab();
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static int16 use_schalter();
+	static void talk_verkauf();
+	static int16 use_zelle();
+	static short use_taxi();
+	static int16 use_azug();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
new file mode 100644
index 00000000000..7a7a3c8d41d
--- /dev/null
+++ b/engines/chewy/rooms/room55.cpp
@@ -0,0 +1,405 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room55.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room55::entry() {
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).R55ExitDia = 0;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
+	if (!_G(spieler).R54FputzerWeg)
+		det->start_detail(6, 255, ANI_VOR);
+
+	if ((_G(spieler).R55RaumOk) || (!_G(spieler).R55RaumOk && _G(spieler).R55ScriptWeg))
+		det->hide_static_spr(0);
+	if (!_G(spieler).R55SekWeg) {
+		det->start_detail(8, 255, ANI_VOR);
+		det->start_detail(9, 255, ANI_VOR);
+		_G(spieler).R55Entry ^= 1;
+		_G(timer_nr)[0] = room->set_timer(19 + (int16)_G(spieler).R55Entry, 10);
+		det->set_static_ani(19 + (int16)_G(spieler).R55Entry, -1);
+	}
+	spieler_mi[P_HOWARD].Mode = true;
+	if (_G(spieler).R55Job) {
+		rock2mans();
+		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+	}
+	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
+		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
+		room->set_zoom(10);
+	}
+	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
+		det->show_static_spr(0);
+	if (!flags.LoadGame) {
+		if (_G(spieler).R55Location) {
+			_G(spieler).scrollx = 136;
+			set_person_pos(400, 82, P_CHEWY, P_RIGHT);
+			start_detail_wait(3, 1, ANI_VOR);
+			_G(timer_nr)[0] = room->set_timer(4, 10);
+			det->set_static_ani(4, -1);
+			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+		} else {
+			_G(spieler).scrollx = 0;
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
+			}
+			det->show_static_spr(8);
+			auto_move(1, P_CHEWY);
+			hide_cur();
+			det->hide_static_spr(8);
+			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
+
+				set_person_spr(P_LEFT, P_CHEWY);
+				if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
+					verleger_mov(0);
+					talk_line();
+					_G(spieler).R54Schild = true;
+				} else {
+					verleger_mov(1);
+					get_job();
+				}
+			}
+			show_cur();
+		}
+	}
+}
+
+void Room55::xit(int16 eib_nr) {
+	if (eib_nr == 90) {
+		mans2rock();
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+			spieler_mi[P_HOWARD].Mode = false;
+		}
+	}
+	_G(spieler).ScrollxStep = 1;
+}
+
+int16 Room55::use_stapel1() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		if (!_G(spieler).R55ScriptWeg) {
+			action_ret = true;
+			_G(spieler).R55ScriptWeg = true;
+			auto_move(4, P_CHEWY);
+			det->hide_static_spr(0);
+			auto_move(5, P_CHEWY);
+			det->show_static_spr(1);
+			atds->set_ats_str(354, 1, ATS_DATEI);
+			atds->set_ats_str(355, 1, ATS_DATEI);
+		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
+			action_ret = true;
+			start_aad_wait(333, -1);
+		}
+	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
+		action_ret = true;
+		if (_G(spieler).R55ScriptWeg) {
+			auto_move(4, P_CHEWY);
+			_G(spieler).R55EscScriptOk = true;
+			det->show_static_spr(0);
+			del_inventar(_G(spieler).AkInvent);
+			atds->set_ats_str(354, 2, ATS_DATEI);
+		} else
+			start_aad_wait(326, -1);
+	}
+	return action_ret;
+}
+
+int16 Room55::use_stapel2() {
+	int16 action_ret = false;
+	if (is_cur_inventar(MANUSKRIPT_INV)) {
+		action_ret = true;
+		start_aad_wait(327, -1);
+	}
+	return action_ret;
+}
+
+int16 Room55::use_telefon() {
+	int16 i;
+	int16 delay;
+	int16 tmp_delay;
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		if (_G(spieler).R55EscScriptOk) {
+			if (!_G(spieler).R55RaumOk) {
+				hide_cur();
+				_G(spieler).R55RaumOk = true;
+				auto_move(6, P_CHEWY);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				start_detail_wait(10, 1, ANI_VOR);
+				det->start_detail(11, 255, ANI_VOR);
+				start_aad_wait(329, -1);
+				det->stop_detail(11);
+				start_detail_wait(10, 1, ANI_RUECK);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				auto_move(7, P_CHEWY);
+				flags.NoScroll = true;
+				auto_scroll(0, 0);
+				start_aad_wait(330, -1);
+				det->show_static_spr(8);
+				start_detail_wait(0, 1, ANI_VOR);
+				det->start_detail(1, 255, ANI_VOR);
+				start_aad_wait(331, -1);
+				det->stop_detail(1);
+				start_detail_wait(2, 1, ANI_VOR);
+				det->hide_static_spr(0);
+				det->hide_static_spr(8);
+				atds->set_ats_str(354, 1, ATS_DATEI);
+				flic_cut(FCUT_071, FLC_MODE);
+				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
+				set_person_pos(178, 75, P_CHEWY, P_LEFT);
+				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
+				SetUpScreenFunc = 0;
+				det->set_static_ani(18, -1);
+				start_aad_wait(334, -1);
+				start_aad_wait(335, -1);
+				start_aad_wait(336, -1);
+				tmp_delay = _G(spieler).DelaySpeed;
+				for (i = 0; i < 7; i++) {
+					delay = tmp_delay;
+					if (!_G(spieler).scrollx)
+						_G(spieler).scrollx = 8;
+					else
+						_G(spieler).scrollx = 0;
+					while (delay) {
+						out->skip_frame(1);
+						--delay;
+					}
+					set_up_screen(DO_SETUP);
+				}
+				flic_cut(FCUT_072, FLC_MODE);
+				flags.NoScroll = false;
+				invent_2_slot(SACKGELD_INV);
+				invent_2_slot(EINLAD_INV);
+				del_invent_slot(LEDER_INV);
+				load_chewy_taf(CHEWY_ROCKER);
+				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+				spieler_mi[P_HOWARD].Mode = false;
+				show_cur();
+				_G(spieler).R55R54First = true;
+				_G(spieler).R55ExitDia = 337;
+				_G(spieler).room_e_obj[89].Attribut = 255;
+				switch_room(54);
+			} else {
+				start_aad_wait(332, -1);
+			}
+		} else {
+			start_aad_wait(328, -1);
+		}
+	}
+	return action_ret;
+}
+
+void Room55::get_job() {
+	int16 tmp_scrollx;
+	int16 tmp_scrolly;
+	int16 r_nr;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	tmp_scrollx = _G(spieler).scrollx;
+	tmp_scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	switch_room(61);
+	show_cur();
+	start_ads_wait(15);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	flags.LoadGame = true;
+	_G(spieler).scrollx = tmp_scrollx;
+	_G(spieler).scrolly = tmp_scrolly;
+	if (_G(spieler).R55Job) {
+		r_nr = 55;
+		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		r_nr = 54;
+		mans2rock();
+	}
+	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (r_nr == 54)
+		flags.LoadGame = false;
+	set_person_pos(118, 96, P_CHEWY, P_LEFT);
+	switch_room(r_nr);
+	flags.LoadGame = false;
+
+}
+
+void Room55::mans2rock() {
+	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
+		_G(spieler).R55ExitDia = 317;
+		load_chewy_taf(CHEWY_ROCKER);
+		del_invent_slot(LEDER_INV);
+		invent_2_slot(JMKOST_INV);
+	}
+}
+
+void Room55::rock2mans() {
+	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
+		load_chewy_taf(CHEWY_JMANS);
+		del_invent_slot(JMKOST_INV);
+		invent_2_slot(LEDER_INV);
+	}
+}
+
+void Room55::verleger_mov(int16 mode) {
+	start_detail_wait(7, 1, ANI_VOR);
+	det->show_static_spr(11);
+	start_detail_wait(13, 1, ANI_VOR);
+	start_detail_wait(14, 1, ANI_VOR);
+	if (_G(spieler).ChewyAni == CHEWY_JMANS)
+		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
+	if (mode)
+		start_detail_wait(15, 1, ANI_VOR);
+	det->set_static_ani(16, -1);
+}
+
+void Room55::strasse(int16 mode) {
+	if (!_G(spieler).inv_cur || mode) {
+		room->set_timer_status(4, TIMER_STOP);
+		det->del_static_ani(4);
+		det->stop_detail(4);
+		atds->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+		start_detail_wait(3, 1, ANI_RUECK);
+
+		_G(spieler).scrollx = 0;
+		switch_room(54);
+	}
+}
+
+int16 Room55::use_kammeraus() {
+	int16 action_ret = false;
+	if (_G(spieler).R55Location) {
+		if (is_cur_inventar(KILLER_INV)) {
+			action_ret = true;
+			if (_G(spieler).R52KakerWeg) {
+				if (!_G(spieler).R55SekWeg) {
+					hide_cur();
+					room->set_timer_status(4, TIMER_STOP);
+					det->del_static_ani(4);
+					det->stop_detail(4);
+					start_detail_wait(5, 1, ANI_VOR);
+					det->show_static_spr(10);
+					flc->set_flic_user_function(cut_serv);
+					flic_cut(FCUT_070, FLC_MODE);
+					flc->remove_flic_user_function();
+					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
+					det->stop_detail(19 + (int16)_G(spieler).R55Entry);
+					det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
+					det->hide_static_spr(10);
+					_G(spieler).R55ExitDia = 322;
+					_G(spieler).R55SekWeg = true;
+					atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
+					atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
+					strasse(1);
+					show_cur();
+				}
+			} else {
+				start_aad_wait(325, -1);
+			}
+		}
+	}
+	return action_ret;
+}
+
+int16 Room55::cut_serv(int16 frame) {
+	if (frame < 10)
+		det->plot_static_details(136, 0, 10, 10);
+	return 0;
+}
+
+void Room55::setup_func() {
+	int16 x, y;
+	int16 ch_x;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+		calc_person_look();
+		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		if (ch_x < 100) {
+			x = 62;
+			y = 101;
+		} else if (ch_x < 187) {
+			x = 139;
+			y = 119;
+		} else if (ch_x < 276) {
+			x = 235;
+			y = 119;
+		} else {
+			x = 318;
+			y = 110;
+		}
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+void Room55::talk_line() {
+	int16 aad_nr = 0;
+	if (_G(spieler).R55Location == 0) {
+		if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
+			hide_cur();
+			if (!_G(spieler).R55SekWeg) {
+				auto_move(2, P_CHEWY);
+				flags.NoScroll = true;
+				auto_scroll(136, 0);
+				aad_nr = 320;
+				_G(spieler).R55ExitDia = 321;
+				room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
+				det->stop_detail(19 + (int16)_G(spieler).R55Entry);
+				det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
+				start_detail_wait(22, 1, ANI_VOR);
+				det->set_static_ani(21, -1);
+			} else if (!_G(spieler).R55RaumOk) {
+				auto_move(3, P_CHEWY);
+				aad_nr = 323;
+				_G(spieler).R55ExitDia = 324;
+			}
+			start_aad_wait(aad_nr, -1);
+			if (_G(spieler).R55SekWeg) {
+				det->del_static_ani(16);
+				start_detail_wait(14, 1, ANI_VOR);
+			} else {
+				det->del_static_ani(21);
+				start_detail_wait(22, 1, ANI_VOR);
+			}
+			flags.NoScroll = false;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+			spieler_mi[P_HOWARD].Mode = false;
+			switch_room(54);
+			show_cur();
+		}
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room55.h b/engines/chewy/rooms/room55.h
new file mode 100644
index 00000000000..87603558c56
--- /dev/null
+++ b/engines/chewy/rooms/room55.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM55_H
+#define CHEWY_ROOMS_ROOM55_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room55 {
+private:
+	static void get_job();
+	static void verleger_mov(int16 mode);
+	static void mans2rock();
+	static void rock2mans();
+	static int16 cut_serv(int16 frame);
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int16 use_stapel1();
+	static int16 use_stapel2();
+	static int16 use_telefon();
+	static int16 use_kammeraus();
+	static void strasse(int16 mode);
+	static void talk_line();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
new file mode 100644
index 00000000000..4d94b1595dc
--- /dev/null
+++ b/engines/chewy/rooms/room56.cpp
@@ -0,0 +1,287 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room56.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room56::entry() {
+	_G(spieler).ScrollxStep = 2;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 4;
+	spieler_mi[P_HOWARD].Mode = true;
+	_G(timer_nr)[0] = room->set_timer(255, 25);
+	if (!flags.LoadGame) {
+		if (_G(spieler).R48TaxiEntry) {
+			hide_cur();
+			_G(spieler).R48TaxiEntry = false;
+			_G(spieler).scrollx = 0;
+			_G(spieler).scrolly = 0;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			det->hide_static_spr(2);
+			_G(zoom_horizont) = 0;
+			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
+			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
+			start_detail_wait(7, 1, ANI_RUECK);
+			start_detail_wait(8, 1, ANI_VOR);
+			start_detail_wait(7, 1, ANI_VOR);
+			set_up_screen(DO_SETUP);
+			if (!_G(spieler).R56GetTabak) {
+				flic_cut(FCUT_074, FLC_MODE);
+				det->show_static_spr(2);
+			}
+			room->set_zoom(23);
+			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
+			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler).PersonHide[P_HOWARD] = false;
+			SetUpScreenFunc = setup_func;
+			spieler_mi[P_CHEWY].Mode = true;
+			auto_move(1, P_CHEWY);
+			spieler_mi[P_CHEWY].Mode = false;
+			_G(maus_links_click) = false;
+			show_cur();
+		} else if (_G(spieler).R62Flucht) {
+			_G(maus_links_click) = false;
+			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
+			_G(zoom_horizont) = 114;
+			room->set_zoom(70);
+			_G(spieler).R62Flucht = false;
+			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
+			set_person_pos(429, 146, P_CHEWY, P_LEFT);
+			_G(spieler).scrollx = 262;
+			_G(spieler).PersonHide[P_HOWARD] = false;
+			det->show_static_spr(9);
+			det->show_static_spr(8);
+			room->set_timer_status(0, TIMER_STOP);
+			det->del_static_ani(0);
+			det->set_static_ani(3, -1);
+			_G(maus_links_click) = false;
+			atds->stop_aad();
+			start_aad_wait(306, -1);
+			flic_cut(FCUT_076, FLC_MODE);
+		}
+	}
+	SetUpScreenFunc = setup_func;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
+	_G(zoom_horizont) = 114;
+	room->set_zoom(70);
+}
+
+void Room56::xit() {
+	spieler_mi[P_HOWARD].Mode = false;
+	_G(spieler).ScrollxStep = 1;
+}
+
+int16 Room56::use_taxi() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		hide_cur();
+		auto_move(1, P_CHEWY);
+		start_detail_wait(7, 1, ANI_RUECK);
+		det->start_detail(8, 1, ANI_VOR);
+		_G(zoom_horizont) = 0;
+		room->set_zoom(23);
+		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
+		spieler_mi[P_CHEWY].Mode = true;
+		go_auto_xy(3, 42, P_CHEWY, ANI_WAIT);
+		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+		}
+		show_cur();
+		switch_room(48);
+	}
+	return action_ret;
+}
+
+void Room56::talk_man() {
+	auto_move(3, P_CHEWY);
+	if (!_G(spieler).R56AbfahrtOk) {
+		start_ads_wait(16);
+	} else if (!_G(spieler).R62Flucht) {
+		start_aad_wait(343, -1);
+	}
+}
+
+int16 Room56::use_man() {
+	int16 action_ret = false;
+	if (is_cur_inventar(FLASCHE_INV)) {
+		action_ret = true;
+		hide_cur();
+		auto_move(3, P_CHEWY);
+		start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+		room->set_timer_status(0, TIMER_STOP);
+		det->del_static_ani(0);
+
+		if (!_G(spieler).R56WhiskyMix) {
+			start_detail_wait(4, 1, ANI_VOR);
+
+			det->set_static_ani(5, -1);
+			start_aad_wait(304, -1);
+			det->del_static_ani(5);
+			room->set_timer_status(0, TIMER_START);
+			det->set_static_ani(0, -1);
+		} else {
+			del_inventar(_G(spieler).AkInvent);
+			_G(spieler).R56AbfahrtOk = true;
+			start_detail_wait(6, 1, ANI_VOR);
+
+			det->set_static_ani(1, -1);
+			start_aad_wait(305, -1);
+			det->del_static_ani(1);
+		}
+		room->set_timer_status(0, TIMER_START);
+		det->set_static_ani(0, -1);
+		show_cur();
+	}
+	return action_ret;
+}
+
+int16 Room56::use_kneipe() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
+			hide_cur();
+			action_ret = true;
+			if (!_G(spieler).R56Kneipe) {
+				SetUpScreenFunc = 0;
+				auto_move(4, P_CHEWY);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				go_auto_xy(160, 58, P_HOWARD, ANI_WAIT);
+				_G(spieler).PersonHide[P_HOWARD] = true;
+				_G(spieler).R56Kneipe = true;
+				flags.NoScroll = true;
+				auto_scroll(0, 0);
+				start_detail_wait(12, 3, ANI_VOR);
+				flic_cut(FCUT_075, FLC_MODE);
+				det->start_detail(10, 6, ANI_VOR);
+				start_aad_wait(307, -1);
+				det->stop_detail(10);
+				out->ausblenden(0);
+				set_up_screen(DO_SETUP);
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler).PersonHide[P_HOWARD] = false;
+				_G(spieler).scrollx = 0;
+				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
+				set_person_pos(50, 81, P_CHEWY, P_LEFT);
+
+				fx_blend = BLEND3;
+				start_aad_wait(308, -1);
+				SetUpScreenFunc = setup_func;
+				flags.NoScroll = false;
+
+				if (obj->check_inventar(SACKGELD_INV)) {
+					del_invent_slot(SACKGELD_INV);
+					start_aad_wait(309, -1);
+				}
+			} else {
+				start_aad_wait(344, -1);
+			}
+			show_cur();
+		}
+	}
+	return action_ret;
+}
+
+void Room56::start_flug() {
+	if (!_G(r56koch_flug)) {
+		_G(r56koch_flug) = 12;
+		det->start_detail(_G(r56koch_flug), 1, ANI_VOR);
+	}
+}
+
+void Room56::setup_func() {
+	int16 x, y;
+	int16 ch_x;
+	int16 ch_y;
+	switch (_G(r56koch_flug)) {
+	case 12:
+		if (det->get_ani_status(12) == false) {
+			det->start_detail(11, 1, ANI_VOR);
+			_G(r56koch_flug) = 11;
+		}
+		break;
+
+	case 11:
+		if (det->get_ani_status(11) == false) {
+			det->start_detail(10, 1, ANI_VOR);
+			_G(r56koch_flug) = 10;
+		}
+		break;
+
+	case 10:
+		if (det->get_ani_status(10) == false) {
+			_G(r56koch_flug) = 0;
+
+			uhr->reset_timer(_G(timer_nr)[0], 0);
+		}
+		break;
+
+	}
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
+		calc_person_look();
+		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		if (ch_x < 196) {
+			x = 23;
+			y = 70;
+		} else if (ch_x < 283) {
+			x = 115;
+			y = 61;
+		} else if (ch_y < 115) {
+			x = 254;
+			y = 66;
+		} else {
+			x = 308;
+			y = 97;
+		}
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
+		if (menu_item == CUR_WALK) {
+			if (minfo.x + _G(spieler).scrollx >= 157 &&
+				minfo.x + _G(spieler).scrollx <= 204 &&
+				minfo.y >= 28 && minfo.y <= 89) {
+				cursor_wahl(CUR_AUSGANG_OBEN);
+			} else
+				cursor_wahl(CUR_WALK);
+		}
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room56.h b/engines/chewy/rooms/room56.h
new file mode 100644
index 00000000000..cace6ab9033
--- /dev/null
+++ b/engines/chewy/rooms/room56.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM56_H
+#define CHEWY_ROOMS_ROOM56_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room56 {
+private:
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_taxi();
+	static void talk_man();
+	static int16 use_man();
+	static int16 use_kneipe();
+	static void start_flug();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
new file mode 100644
index 00000000000..cf6b0a53645
--- /dev/null
+++ b/engines/chewy/rooms/room57.cpp
@@ -0,0 +1,164 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room57.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room57::entry() {
+	_G(zoom_horizont) = 180;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 4;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (_G(spieler).R57StudioAuf)
+		det->hide_static_spr(4);
+	if (!flags.LoadGame) {
+		if (_G(spieler).R48TaxiEntry) {
+			hide_cur();
+			_G(spieler).R48TaxiEntry = false;
+			_G(spieler).scrollx = 0;
+			_G(spieler).scrolly = 0;
+			set_person_pos(4, 144, P_HOWARD, P_LEFT);
+			set_person_pos(40, 160, P_CHEWY, P_RIGHT);
+			auto_move(2, P_CHEWY);
+			_G(maus_links_click) = false;
+			show_cur();
+		}
+	}
+}
+
+void Room57::xit(int16 eib_nr) {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+		spieler_mi[P_HOWARD].Mode = false;
+		if (eib_nr == 91)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 62;
+	}
+}
+
+void Room57::setup_func() {
+	int16 x, y;
+	int16 ch_y;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+		calc_person_look();
+		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		if (ch_y < 145) {
+			x = 176;
+			y = 126;
+		} else {
+			x = 176;
+			y = 142;
+		}
+		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	}
+}
+
+int16 Room57::use_taxi() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		hide_cur();
+		auto_move(3, P_CHEWY);
+		det->show_static_spr(7);
+		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+		}
+		det->hide_static_spr(7);
+		room->set_timer_status(3, TIMER_STOP);
+		det->del_static_ani(3);
+		start_detail_wait(5, 1, ANI_VOR);
+		switch_room(48);
+	}
+	return action_ret;
+}
+
+int16 Room57::use_pfoertner() {
+	int16 action_ret = false;
+	room->set_timer_status(1, TIMER_STOP);
+	det->del_static_ani(1);
+	det->set_static_ani(3, -1);
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	if (is_cur_inventar(CUTMAG_INV)) {
+		action_ret = true;
+		start_aad_wait(339, -1);
+		new_invent_2_cur(BESTELL_INV);
+	} else if (is_cur_inventar(JMKOST_INV)) {
+		action_ret = true;
+		start_aad_wait(340, -1);
+	} else if (is_cur_inventar(EINLAD_INV)) {
+		action_ret = true;
+		SetUpScreenFunc = 0;
+		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
+		if (_G(spieler).R56AbfahrtOk) {
+			start_aad_wait(341, -1);
+			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
+			del_inventar(_G(spieler).AkInvent);
+			_G(spieler).R57StudioAuf = true;
+			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
+			det->hide_static_spr(4);
+			start_detail_wait(6, 1, ANI_WAIT);
+			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
+		} else {
+			start_aad_wait(349, -1);
+			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
+		}
+		SetUpScreenFunc = setup_func;
+	}
+	show_cur();
+	room->set_timer_status(1, TIMER_START);
+	det->set_static_ani(1, -1);
+	return action_ret;
+}
+
+void Room57::talk_pfoertner() {
+	int16 aad_nr;
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	room->set_timer_status(1, TIMER_STOP);
+	det->del_static_ani(1);
+	det->set_static_ani(3, -1);
+	if (!_G(spieler).R57StudioAuf) {
+		aad_nr = 338;
+	} else
+		aad_nr = 342;
+	start_aad_wait(aad_nr, -1);
+	room->set_timer_status(1, TIMER_START);
+	det->set_static_ani(1, -1);
+	show_cur();
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room57.h b/engines/chewy/rooms/room57.h
new file mode 100644
index 00000000000..a41f8d6061c
--- /dev/null
+++ b/engines/chewy/rooms/room57.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM57_H
+#define CHEWY_ROOMS_ROOM57_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room57 {
+private:
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int16 use_taxi();
+	static int16 use_pfoertner();
+	static void talk_pfoertner();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
new file mode 100644
index 00000000000..dd82901a47e
--- /dev/null
+++ b/engines/chewy/rooms/room58.cpp
@@ -0,0 +1,80 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room58.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room58::entry() {
+	SetUpScreenFunc = setup_func;
+}
+
+void Room58::xit() {
+	int16 tmp;
+	_G(spieler).scrollx = _G(spieler).R58TmpSx;
+	_G(spieler).scrolly = _G(spieler).R58TmpSy;
+	spieler_vector[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
+	spieler_vector[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
+	spieler_mi[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
+	spieler_mi[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
+	flags.MainInput = true;
+	flags.LoadGame = true;
+	show_person();
+	set_person_rnr();
+	tmp = _G(spieler).R58TmpRoom1;
+	_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
+
+	switch_room(tmp);
+
+}
+
+void Room58::look_cut_mag(int16 r_nr) {
+	_G(spieler).R58TmpRoom = r_nr;
+	_G(spieler).R58TmpRoom1 = _G(spieler).PersonRoomNr[P_CHEWY];;
+
+	_G(spieler).R58TmpSx = _G(spieler).scrollx;
+	_G(spieler).R58TmpSy = _G(spieler).scrolly;
+	_G(spieler).R58TmpX = spieler_vector[P_CHEWY].Xypos[0];
+	_G(spieler).R58TmpY = spieler_vector[P_CHEWY].Xypos[1];
+	spieler_vector[P_CHEWY].Xypos[0] = 160;
+	spieler_vector[P_CHEWY].Xypos[1] = 100;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	flags.MainInput = false;
+	hide_person();
+	switch_room(r_nr);
+}
+
+void Room58::setup_func() {
+	if (menu_item != CUR_LOOK) {
+		menu_item = CUR_LOOK;
+		cursor_wahl(menu_item);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room58.h b/engines/chewy/rooms/room58.h
new file mode 100644
index 00000000000..f6fce890653
--- /dev/null
+++ b/engines/chewy/rooms/room58.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM58_H
+#define CHEWY_ROOMS_ROOM58_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room58 {
+private:
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit();
+	static void look_cut_mag(int16 r_nr);
+
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
new file mode 100644
index 00000000000..d51d5251e56
--- /dev/null
+++ b/engines/chewy/rooms/room59.cpp
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room59.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room59::look_poster() {
+	if (!_G(spieler).R59PosterWeg) {
+
+		atds->set_ats_str(302, 1, ATS_DATEI);
+		atds->set_ats_str(301, 1, ATS_DATEI);
+		_G(spieler).R59PosterWeg = true;
+		invent_2_slot(SPARK_INV);
+		switch_room(60);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room59.h b/engines/chewy/rooms/room59.h
new file mode 100644
index 00000000000..36d7b30359f
--- /dev/null
+++ b/engines/chewy/rooms/room59.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM59_H
+#define CHEWY_ROOMS_ROOM59_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room59 {
+public:
+	static void look_poster();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
new file mode 100644
index 00000000000..308b3b953c0
--- /dev/null
+++ b/engines/chewy/rooms/room62.cpp
@@ -0,0 +1,126 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room62.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room62::entry() {
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler).R62LauraVerwandlung = 0;
+	_G(spieler).room_e_obj[91].Attribut = 255;
+	if (!_G(spieler).R62FirstEntry) {
+		_G(spieler).R62TShow = false;
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		_G(spieler).R62FirstEntry = true;
+		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
+		det->start_detail(6, 255, ANI_VOR);
+		start_aad_wait(345, -1);
+		det->stop_detail(6);
+		det->set_static_ani(5, -1);
+		go_auto_xy(199, 59, P_HOWARD, ANI_WAIT);
+		set_person_spr(P_LEFT, P_HOWARD);
+		det->del_static_ani(5);
+		det->start_detail(5, 255, ANI_VOR);
+		start_aad_wait(346, -1);
+		det->stop_detail(5);
+		det->start_detail(6, 255, ANI_VOR);
+		start_aad_wait(347, -1);
+		det->stop_detail(6);
+		start_detail_wait(7, 1, ANI_VOR);
+		det->set_static_ani(5, -1);
+		det->start_detail(0, 255, ANI_VOR);
+		start_aad_wait(348, -1);
+		det->stop_detail(0);
+		det->del_static_ani(0);
+		det->start_detail(1, 1, ANI_VOR);
+		auto_move(0, P_CHEWY);
+		spieler_mi[P_CHEWY].Mode = true;
+		go_auto_xy(160, 240, P_CHEWY, ANI_WAIT);
+		spieler_mi[P_CHEWY].Mode = false;
+		det->del_static_ani(5);
+		start_detail_wait(7, 1, ANI_VOR);
+		show_cur();
+		_G(spieler).R64Moni1Ani = 3;
+		_G(spieler).R64Moni2Ani = 4;
+		set_person_pos(187, 43, P_CHEWY, P_RIGHT);
+		_G(spieler).R62TShow = true;
+		switch_room(64);
+	} else {
+		det->del_static_ani(0);
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		det->set_static_ani(4, -1);
+		det->set_static_ani(8, -1);
+		_G(r62Delay) = 0;
+		_G(r62TalkAni) = 8;
+
+	}
+}
+
+void Room62::setup_func() {
+	if (_G(r62Delay) <= 0 && _G(spieler).R62TShow) {
+		_G(r62Delay) = (_G(spieler).DelaySpeed + 1) * 60;
+		det->stop_detail(_G(r62TalkAni));
+		if (_G(r62TalkAni) == 4)
+			_G(r62TalkAni) = 8;
+		else
+			_G(r62TalkAni) = 4;
+		det->start_detail(_G(r62TalkAni), 255, ANI_VOR);
+	} else
+		--_G(r62Delay);
+}
+
+int16 Room62::use_laura() {
+	int16 action_ret = false;
+	if (is_cur_inventar(GERAET_INV)) {
+		action_ret = true;
+		hide_cur();
+		auto_move(2, P_CHEWY);
+		auto_scroll(0, 0);
+		SetUpScreenFunc = 0;
+		det->del_static_ani(8);
+		det->stop_detail(8);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		det->start_detail(2, 255, ANI_VOR);
+		det->start_detail(6, 255, ANI_VOR);
+		start_aad_wait(399, -1);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flic_cut(FCUT_077, FLC_MODE);
+		show_cur();
+		_G(spieler).R64Moni1Ani = 0;
+		_G(spieler).R64Moni2Ani = 0;
+		_G(spieler).R62TShow = false;
+		_G(spieler).R62LauraVerwandlung = true;
+		switch_room(63);
+	}
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room62.h b/engines/chewy/rooms/room62.h
new file mode 100644
index 00000000000..da405b40a6b
--- /dev/null
+++ b/engines/chewy/rooms/room62.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM62_H
+#define CHEWY_ROOMS_ROOM62_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room62 {
+private:
+	static void setup_func();
+
+public:
+	static void entry();
+	static int16 use_laura();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
new file mode 100644
index 00000000000..6f5b3e74dcd
--- /dev/null
+++ b/engines/chewy/rooms/room63.cpp
@@ -0,0 +1,324 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room63.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room63::entry() {
+	_G(zoom_horizont) = 76;
+	_G(spieler).ScrollxStep = 2;
+	_G(r63Schalter) = false;
+	_G(r63RunDia) = 0;
+	if (_G(spieler).R63FxMannWeg)
+		det->del_static_ani(5);
+	if (!_G(spieler).R63Uhr) {
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		det->start_detail(12, 255, ANI_VOR);
+		det->start_detail(10, 255, ANI_VOR);
+		det->start_detail(18, 255, ANI_VOR);
+		auto_move(4, P_CHEWY);
+		det->stop_detail(10);
+		det->start_detail(11, 255, ANI_VOR);
+		auto_scroll(58, 0);
+		start_aad_wait(355, -1);
+		det->stop_detail(11);
+		det->start_detail(10, 255, ANI_VOR);
+		show_cur();
+	} else if (!_G(spieler).R63Feuer) {
+		det->show_static_spr(10);
+		det->show_static_spr(12);
+	} else if (_G(spieler).R62LauraVerwandlung) {
+		SetUpScreenFunc = setup_func;
+		cur_2_inventory();
+		_G(spieler).scrollx = 176;
+		set_person_pos(424, 78, P_CHEWY, P_LEFT);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).room_e_obj[95].Attribut = 255;
+		_G(r63ChewyAni) = 0;
+		det->start_detail(0, 1, ANI_VOR);
+	}
+}
+
+void Room63::setup_func() {
+	if (_G(spieler).R62LauraVerwandlung) {
+		switch (_G(r63ChewyAni)) {
+		case 0:
+			if (det->get_ani_status(0) == false) {
+				if (_G(r63RunDia) < 4)
+					++_G(r63RunDia);
+				start_aad(370 + _G(r63RunDia));
+				det->start_detail(1, 1, ANI_VOR);
+				_G(r63ChewyAni) = 1;
+			}
+			break;
+
+		case 1:
+			if (det->get_ani_status(1) == false) {
+				_G(spieler).ScrollxStep = 4;
+				set_person_pos(0, 0, P_CHEWY, P_RIGHT);
+				det->start_detail(22, 1, ANI_VOR);
+				det->start_detail(2, 1, ANI_VOR);
+				atds->stop_aad();
+				_G(r63ChewyAni) = 2;
+			}
+			break;
+
+		case 2:
+			if (det->get_ani_status(2) == false) {
+				det->start_detail(3, 1, ANI_VOR);
+				_G(r63ChewyAni) = 3;
+			}
+			break;
+
+		case 3:
+			if (det->get_ani_status(3) == false) {
+				if (!flags.AutoAniPlay) {
+					flags.AutoAniPlay = true;
+
+					_G(spieler).ScrollxStep = 16;
+					_G(spieler).scrollx -= _G(spieler).scrollx % 16;
+					flags.NoScroll = true;
+					auto_scroll(176, 0);
+					set_person_pos(424, 78, P_CHEWY, P_LEFT);
+					flags.NoScroll = false;
+					_G(spieler).ScrollxStep = 4;
+					if (!_G(r63Schalter)) {
+						det->start_detail(0, 1, ANI_VOR);
+						_G(r63ChewyAni) = 0;
+					} else
+						bork_platt();
+					flags.AutoAniPlay = false;
+				}
+			}
+			break;
+
+		}
+	}
+}
+
+void Room63::bork_platt() {
+	_G(spieler).R62LauraVerwandlung = false;
+	_G(r63Schalter) = false;
+	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
+	flic_cut(FCUT_081, FLC_MODE);
+	flic_cut(FCUT_082, FLC_MODE);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	check_shad(4, 1);
+	spieler_mi[P_CHEWY].Mode = true;
+	auto_move(6, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = false;
+	start_aad_wait(370, -1);
+	start_detail_wait(4, 1, ANI_VOR);
+	det->show_static_spr(13);
+	start_aad_wait(361, -1);
+	out->cls();
+	flags.NoPalAfterFlc = true;
+	flic_cut(FCUT_079, FLC_MODE);
+	fx_blend = BLEND3;
+	show_cur();
+	flags.MainInput = true;
+	_G(spieler).R62Flucht = true;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
+	switch_room(56);
+}
+
+void Room63::talk_hunter() {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	if (_G(spieler).R63Uhr)
+		det->hide_static_spr(10);
+	det->start_detail(10, 255, ANI_VOR);
+	start_aad_wait(356, -1);
+	if (_G(spieler).R63Uhr) {
+		det->show_static_spr(10);
+		det->stop_detail(10);
+	}
+	show_cur();
+}
+
+void Room63::talk_regie() {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	if (_G(spieler).R63Uhr)
+		det->hide_static_spr(12);
+	det->stop_detail(18);
+	det->start_detail(19, 255, ANI_VOR);
+	start_aad_wait(357, -1);
+	det->stop_detail(19);
+	if (_G(spieler).R63Uhr) {
+		det->show_static_spr(12);
+	} else {
+		det->start_detail(18, 255, ANI_VOR);
+	}
+	show_cur();
+}
+
+void Room63::talk_fx_man() {
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	start_aad_wait(358, -1);
+	show_cur();
+}
+
+int16 Room63::use_fx_man() {
+	int16 action_ret = false;
+	if (is_cur_inventar(MASKE_INV)) {
+		action_ret = true;
+		hide_cur();
+		auto_move(1, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		start_aad_wait(359, -1);
+		det->del_static_ani(5);
+		start_detail_wait(6, 1, ANI_VOR);
+		det->start_detail(7, 255, ANI_VOR);
+		start_aad_wait(362, -1);
+		det->stop_detail(7);
+		start_detail_wait(8, 1, ANI_VOR);
+		_G(spieler).R63FxMannWeg = true;
+		atds->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
+		show_cur();
+	}
+	return action_ret;
+}
+
+int16 Room63::use_schalter() {
+	int16 action_ret = false;
+	if (!_G(spieler).inv_cur) {
+		action_ret = true;
+		if (_G(spieler).R63FxMannWeg) {
+			if (_G(spieler).R62LauraVerwandlung) {
+				_G(r63Schalter) = true;
+				hide_cur();
+				flags.MainInput = false;
+			} else {
+				hide_cur();
+				auto_move(1, P_CHEWY);
+				start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+				det->show_static_spr(2);
+				set_person_spr(P_LEFT, P_CHEWY);
+				start_detail_wait(21, 1, ANI_VOR);
+				det->show_static_spr(14);
+				wait_show_screen(18);
+				det->hide_static_spr(14);
+				start_detail_wait(24, 1, ANI_VOR);
+				det->hide_static_spr(2);
+				start_aad_wait(364, -1);
+				atds->set_ats_str(385, 1, ATS_DATEI);
+				show_cur();
+			}
+		} else {
+			hide_cur();
+			start_aad_wait(363, -1);
+			show_cur();
+		}
+	}
+	return action_ret;
+}
+
+void Room63::talk_girl() {
+	auto_move(2, P_CHEWY);
+	det->stop_detail(12);
+	start_detail_wait(13, 1, ANI_VOR);
+	det->set_static_ani(14, -1);
+	start_ads_wait(17);
+	det->del_static_ani(14);
+	det->start_detail(12, 255, ANI_VOR);
+}
+
+int16 Room63::use_girl() {
+	int16 action_ret = false;
+	if (is_cur_inventar(UHR_INV)) {
+		action_ret = true;
+		hide_cur();
+		auto_move(2, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		det->stop_detail(12);
+		start_detail_wait(13, 1, ANI_VOR);
+		det->set_static_ani(14, -1);
+		start_aad_wait(365, -1);
+		det->del_static_ani(14);
+		det->start_detail(15, 255, ANI_VOR);
+		start_aad_wait(360, -1);
+		det->stop_detail(15);
+		start_detail_wait(16, 1, ANI_VOR);
+		_G(spieler).R63Uhr = true;
+		det->stop_detail(10);
+		det->stop_detail(18);
+		det->show_static_spr(10);
+		det->show_static_spr(12);
+		atds->set_ats_str(381, 1, ATS_DATEI);
+		atds->set_ats_str(382, 1, ATS_DATEI);
+		atds->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
+		start_aad_wait(367, -1);
+		show_cur();
+	}
+	return action_ret;
+}
+
+int16 Room63::use_aschenbecher() {
+	int16 action_ret = false;
+	if (is_cur_inventar(ASCHE_INV)) {
+		action_ret = true;
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		if (_G(spieler).R63Uhr) {
+			if (_G(spieler).R63FxMannWeg) {
+				auto_move(5, P_CHEWY);
+				del_inventar(_G(spieler).AkInvent);
+				flags.NoScroll = true;
+				auto_scroll(70, 0);
+				auto_move(1, P_CHEWY);
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				det->start_detail(20, 255, ANI_VOR);
+				det->start_detail(10, 255, ANI_VOR);
+				det->start_detail(18, 255, ANI_VOR);
+				det->hide_static_spr(10);
+				det->hide_static_spr(12);
+				start_aad_wait(368, -1);
+				flic_cut(FCUT_080, FLC_MODE);
+				atds->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
+				atds->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
+				atds->set_ats_str(383, 1, ATS_DATEI);
+				_G(spieler).R63Feuer = true;
+				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler).scrollx = 0;
+				set_person_pos(187, 42, P_CHEWY, P_RIGHT);
+				switch_room(64);
+				flags.NoScroll = false;
+			} else
+				start_aad_wait(369, -1);
+		} else
+			start_aad_wait(366, -1);
+		show_cur();
+	}
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room63.h b/engines/chewy/rooms/room63.h
new file mode 100644
index 00000000000..55a5c801510
--- /dev/null
+++ b/engines/chewy/rooms/room63.h
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM63_H
+#define CHEWY_ROOMS_ROOM63_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room63 {
+private:
+	static void setup_func();
+	static void bork_platt();
+
+public:
+	static void entry();
+	static void talk_hunter();
+	static void talk_regie();
+	static void talk_fx_man();
+	static int16 use_fx_man();
+	static int16 use_schalter();
+	static void talk_girl();
+	static int16 use_girl();
+	static int16 use_aschenbecher();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
new file mode 100644
index 00000000000..2b78c2e835b
--- /dev/null
+++ b/engines/chewy/rooms/room64.cpp
@@ -0,0 +1,178 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room64.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room64::entry() {
+	SetUpScreenFunc = setup_func;
+	_G(r62Delay) = 0;
+	_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
+	if (!_G(spieler).R64ManWeg) {
+		_G(timer_nr)[0] = room->set_timer(1, 10);
+		det->set_static_ani(1, -1);
+		chewy_entry();
+		if (_G(spieler).R63Feuer) {
+			flc->set_flic_user_function(cut_sev);
+			flic_cut(FCUT_078, FLC_MODE);
+			flc->remove_flic_user_function();
+			_G(spieler).R64ManWeg = true;
+			det->del_static_ani(1);
+			room->set_timer_status(1, TIMER_STOP);
+			atds->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(spieler).R64Moni1Ani = 5;
+			calc_monitor();
+			start_aad_wait(354, -1);
+		}
+	} else
+		chewy_entry();
+}
+
+int16 Room64::cut_sev(int16 frame) {
+	int16 spr_nr;
+	int16 x, y;
+	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+	x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
+	y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
+	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak,
+		(int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
+	out->scale_set(chewy->image[spr_nr], x, y,
+		spieler_vector[P_CHEWY].Xzoom,
+		spieler_vector[P_CHEWY].Yzoom,
+		scr_width);
+	return 0;
+}
+
+void Room64::chewy_entry() {
+	calc_monitor();
+	if (!flags.LoadGame) {
+		hide_cur();
+		det->show_static_spr(3);
+		auto_move(2, P_CHEWY);
+		det->hide_static_spr(3);
+		show_cur();
+	}
+}
+
+void Room64::calc_monitor() {
+	int16 str_nr = 0;
+	switch (_G(spieler).R64Moni1Ani) {
+	case 3:
+		str_nr = 0;
+		det->set_static_ani(3, -1);
+		break;
+
+	case 5:
+		str_nr = 1;
+		det->start_detail(5, 255, ANI_VOR);
+		break;
+
+	case 0:
+		str_nr = 2;
+		break;
+
+	}
+	atds->set_ats_str(373, str_nr, ATS_DATEI);
+	switch (_G(spieler).R64Moni2Ani) {
+	case 4:
+		str_nr = 0;
+		det->set_static_ani(4, -1);
+		break;
+
+	case 0:
+		str_nr = 1;
+		break;
+
+	}
+	atds->set_ats_str(374, str_nr, ATS_DATEI);
+}
+
+void Room64::setup_func() {
+	if (_G(r62Delay) <= 0 && _G(spieler).R62TShow) {
+		_G(r62Delay) = (_G(spieler).DelaySpeed + 1) * 60;
+		if (_G(r64TalkAni) == 3 || _G(r64TalkAni) == 4)
+			det->stop_detail(_G(r64TalkAni));
+		if (_G(r64TalkAni) == 4)
+			_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
+		else
+			_G(r64TalkAni) = _G(spieler).R64Moni2Ani;
+		if (_G(r64TalkAni) != 0)
+			det->start_detail(_G(r64TalkAni), 255, ANI_VOR);
+	} else
+		--_G(r62Delay);
+}
+
+void Room64::talk_man() {
+	talk_man(350);
+}
+
+void Room64::talk_man(int16 aad_nr) {
+	if (!_G(spieler).R64ManWeg) {
+		hide_cur();
+		auto_move(4, P_CHEWY);
+		room->set_timer_status(1, TIMER_STOP);
+		det->del_static_ani(1);
+		det->stop_detail(1);
+		det->set_static_ani(2, -1);
+		start_aad_wait(aad_nr, -1);
+		det->del_static_ani(2);
+		room->set_timer_status(1, TIMER_START);
+		det->set_static_ani(1, -1);
+		show_cur();
+	}
+}
+
+int16 Room64::use_tasche() {
+	int16 aad_nr;
+	int16 action_ret = false;
+	hide_cur();
+	aad_nr = -1;
+	if (!_G(spieler).inv_cur) {
+		if (_G(spieler).R64ManWeg) {
+			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
+				auto_move(3, P_CHEWY);
+				start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
+				aad_nr = 353;
+				new_invent_2_cur(GERAET_INV);
+				atds->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
+			}
+		} else {
+			auto_move(3, P_CHEWY);
+			aad_nr = 352;
+		}
+		if (aad_nr != -1) {
+			start_aad_wait(aad_nr, -1);
+			action_ret = true;
+		}
+	}
+	show_cur();
+	return action_ret;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room64.h b/engines/chewy/rooms/room64.h
new file mode 100644
index 00000000000..32c51ab73b7
--- /dev/null
+++ b/engines/chewy/rooms/room64.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM64_H
+#define CHEWY_ROOMS_ROOM64_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room64 {
+private:
+	static int16 cut_sev(int16 frame);
+	static void chewy_entry();
+	static void calc_monitor();
+	static void setup_func();
+
+public:
+	static void entry();
+	static int16 use_tasche();
+	static void talk_man();
+	static void talk_man(int16 aad_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
new file mode 100644
index 00000000000..33f2b711c43
--- /dev/null
+++ b/engines/chewy/rooms/room65.cpp
@@ -0,0 +1,131 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room65.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room65::entry() {
+	hide_person();
+	_G(r65tmp_scrollx) = _G(spieler).scrollx;
+	_G(r65tmp_scrolly) = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	_G(r65tmp_ch_x) = spieler_vector[P_CHEWY].Xypos[0];;
+	_G(r65tmp_ch_y) = spieler_vector[P_CHEWY].Xypos[1];;
+	_G(r65tmp_ho_x) = spieler_vector[P_HOWARD].Xypos[0];;
+	_G(r65tmp_ho_y) = spieler_vector[P_HOWARD].Xypos[1];;
+	spieler_vector[P_CHEWY].Xypos[0] = 10;
+	spieler_vector[P_CHEWY].Xypos[1] = 80;
+	spieler_vector[P_HOWARD].Xypos[0] = 150;
+	spieler_vector[P_HOWARD].Xypos[1] = 10;
+	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		start_aad_wait(_G(spieler).PersonDia[P_HOWARD], -1);
+		show_cur();
+	} else {
+		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
+	}
+	flags.LoadGame = true;
+	show_person();
+	switch_room(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
+}
+
+void Room65::xit() {
+	_G(spieler).scrollx = _G(r65tmp_scrollx);
+	_G(spieler).scrolly = _G(r65tmp_scrolly);
+	set_person_pos(_G(r65tmp_ch_x), _G(r65tmp_ch_y), P_CHEWY, -1);
+	set_person_pos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
+	room_blk.AadLoad = true;
+	room_blk.AtsLoad = true;
+	_G(maus_links_click) = false;
+	set_person_rnr();
+}
+
+void Room65::atds_string_start(int16 dia_nr, int16 str_nr,
+	int16 person_nr, int16 mode) {
+	int16 ani_nr;
+	if (!_G(spieler).PersonDiaRoom[person_nr]) {
+		switch (person_nr) {
+		case 0:
+			if (mode == AAD_STR_START) {
+				switch (_G(spieler).ChewyAni) {
+				case CHEWY_NORMAL:
+					ani_nr = CH_TALK3;
+					break;
+
+				case CHEWY_PUMPKIN:
+					ani_nr = CH_PUMP_TALK;
+					break;
+
+				case CHEWY_ROCKER:
+					ani_nr = CH_ROCK_TALK1;
+					break;
+
+				case CHEWY_JMANS:
+					ani_nr = CH_JM_TALK;
+					break;
+
+				default:
+					ani_nr = -1;
+					break;
+
+				}
+				if (ani_nr != -1)
+					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case 1:
+			if (mode == AAD_STR_START) {
+				start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case 3:
+			if (mode == AAD_STR_START) {
+				start_spz(NI_TALK_L, 255, ANI_VOR, P_NICHELLE);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		}
+	} else if (mode == AAD_STR_START) {
+		det->start_detail(person_nr, 255, ANI_VOR);
+	} else {
+		det->stop_detail(person_nr);
+	}
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room65.h b/engines/chewy/rooms/room65.h
new file mode 100644
index 00000000000..d30f4527cdf
--- /dev/null
+++ b/engines/chewy/rooms/room65.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM65_H
+#define CHEWY_ROOMS_ROOM65_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room65 {
+public:
+	static void entry();
+	static void xit();
+	static void atds_string_start(int16 dia_nr, int16 str_nr,
+		int16 person_nr, int16 mode);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 7edb19d598d..f17cfc2263b 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -62,6 +62,25 @@
 #include "chewy/rooms/room42.h"
 #include "chewy/rooms/room43.h"
 #include "chewy/rooms/room44.h"
+#include "chewy/rooms/room45.h"
+#include "chewy/rooms/room46.h"
+#include "chewy/rooms/room47.h"
+#include "chewy/rooms/room48.h"
+#include "chewy/rooms/room49.h"
+#include "chewy/rooms/room50.h"
+#include "chewy/rooms/room51.h"
+#include "chewy/rooms/room52.h"
+#include "chewy/rooms/room53.h"
+#include "chewy/rooms/room54.h"
+#include "chewy/rooms/room55.h"
+#include "chewy/rooms/room56.h"
+#include "chewy/rooms/room57.h"
+#include "chewy/rooms/room58.h"
+#include "chewy/rooms/room59.h"
+#include "chewy/rooms/room62.h"
+#include "chewy/rooms/room63.h"
+#include "chewy/rooms/room64.h"
+#include "chewy/rooms/room65.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -112,6 +131,25 @@ using Chewy::Rooms::Room41;
 using Chewy::Rooms::Room42;
 using Chewy::Rooms::Room43;
 using Chewy::Rooms::Room44;
+using Chewy::Rooms::Room45;
+using Chewy::Rooms::Room46;
+using Chewy::Rooms::Room47;
+using Chewy::Rooms::Room48;
+using Chewy::Rooms::Room49;
+using Chewy::Rooms::Room50;
+using Chewy::Rooms::Room51;
+using Chewy::Rooms::Room52;
+using Chewy::Rooms::Room53;
+using Chewy::Rooms::Room54;
+using Chewy::Rooms::Room55;
+using Chewy::Rooms::Room56;
+using Chewy::Rooms::Room57;
+using Chewy::Rooms::Room58;
+using Chewy::Rooms::Room59;
+using Chewy::Rooms::Room62;
+using Chewy::Rooms::Room63;
+using Chewy::Rooms::Room64;
+using Chewy::Rooms::Room65;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index e244fad95ae..c1c0e52bb3c 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -93,21 +93,21 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 302:
-						r59_look_poster();
+						Room59::look_poster();
 						break;
 
 					case 298:
 					case 307:
 					case 308:
-						r58_exit();
+						Room58::xit();
 						break;
 
 					case 316:
-						r49_look_hotel();
+						Room49::look_hotel();
 						break;
 
 					case 362:
-						r56_use_kneipe();
+						Room56::use_kneipe();
 						break;
 
 					case 402:
@@ -434,11 +434,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 289:
 					case 290:
 					case 291:
-						r47_use_knopf(txt_nr);
+						Room47::use_knopf(txt_nr);
 						break;
 
 					case 288:
-						action_ret = r46_use_schloss();
+						action_ret = Room46::use_schloss();
 						break;
 
 					case 294:
@@ -447,27 +447,27 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 295:
 					case 297:
-						action_ret = r45_use_boy();
+						action_ret = Room45::use_boy();
 						break;
 
 					case 315:
-						action_ret = r49_use_taxi();
+						action_ret = Room49::use_taxi();
 						break;
 
 					case 318:
-						action_ret = r49_use_boy();
+						action_ret = Room49::use_boy();
 						break;
 
 					case 319:
-						action_ret = r53_use_man();
+						action_ret = Room53::use_man();
 						break;
 
 					case 323:
-						action_ret = r50_use_gutschein();
+						action_ret = Room50::use_gutschein();
 						break;
 
 					case 327:
-						action_ret = r50_use_gum();
+						action_ret = Room50::use_gum();
 						break;
 
 					case 329:
@@ -476,94 +476,94 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 332:
 					case 333:
 					case 334:
-						action_ret = r51_use_door(txt_nr);
+						action_ret = Room51::use_door(txt_nr);
 						break;
 
 					case 340:
-						r55_strasse(0);
+						Room55::strasse(0);
 						break;
 
 					case 341:
-						action_ret = r52_use_hot_dog();
+						action_ret = Room52::use_hot_dog();
 						break;
 
 					case 343:
-						action_ret = r54_use_zelle();
+						action_ret = Room54::use_zelle();
 						break;
 
 					case 344:
-						action_ret = r57_use_pfoertner();
+						action_ret = Room57::use_pfoertner();
 						break;
 
 					case 345:
-						action_ret = r54_use_azug();
+						action_ret = Room54::use_azug();
 						break;
 
 					case 346:
-						action_ret = r54_use_schalter();
+						action_ret = Room54::use_schalter();
 						break;
 
 					case 347:
 					case 387:
-						action_ret = r54_use_taxi();
+						action_ret = Room54::use_taxi();
 						break;
 
 					case 351:
 					case 352:
-						action_ret = r55_use_kammeraus();
+						action_ret = Room55::use_kammeraus();
 						break;
 
 					case 354:
-						action_ret = r55_use_stapel1();
+						action_ret = Room55::use_stapel1();
 						break;
 
 					case 355:
-						action_ret = r55_use_stapel2();
+						action_ret = Room55::use_stapel2();
 						break;
 
 					case 357:
-						action_ret = r55_use_telefon();
+						action_ret = Room55::use_telefon();
 						break;
 
 					case 360:
 					case 388:
-						action_ret = r57_use_taxi();
+						action_ret = Room57::use_taxi();
 						break;
 
 					case 362:
-						r56_use_kneipe();
+						Room56::use_kneipe();
 						break;
 
 					case 366:
-						action_ret = r56_use_man();
+						action_ret = Room56::use_man();
 						break;
 
 					case 367:
-						action_ret = r56_use_taxi();
+						action_ret = Room56::use_taxi();
 						break;
 
 					case 371:
-						action_ret = r62_use_laura();
+						action_ret = Room62::use_laura();
 						break;
 
 					case 375:
-						action_ret = r64_use_tasche();
+						action_ret = Room64::use_tasche();
 						break;
 
 					case 380:
-						action_ret = r63_use_girl();
+						action_ret = Room63::use_girl();
 						break;
 
 					case 383:
-						action_ret = r63_use_aschenbecher();
+						action_ret = Room63::use_aschenbecher();
 						break;
 
 					case 384:
-						action_ret = r63_use_fx_man();
+						action_ret = Room63::use_fx_man();
 						break;
 
 					case 385:
-						action_ret = r63_use_schalter();
+						action_ret = Room63::use_schalter();
 						break;
 
 					case 394:
@@ -794,11 +794,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 340:
-						r55_strasse(0);
+						Room55::strasse(0);
 						break;
 
 					case 362:
-						action_ret = r56_use_kneipe();
+						action_ret = Room56::use_kneipe();
 						break;
 
 					case 403:
@@ -875,60 +875,60 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 295:
-						r45_use_taxi();
+						Room45::use_taxi();
 						break;
 
 					case 297:
-						r45_talk_boy();
+						Room45::talk_boy();
 						break;
 
 					case 318:
-						r49_talk_boy();
+						Room49::talk_boy();
 						break;
 
 					case 319:
-						r53_talk_man();
+						Room53::talk_man();
 						break;
 
 					case 323:
-						r50_talk_page();
+						Room50::talk_page();
 						break;
 
 					case 344:
-						r57_talk_pfoertner();
+						Room57::talk_pfoertner();
 						break;
 
 					case 348:
-						r54_talk_verkauf();
+						Room54::talk_verkauf();
 						break;
 
 					case 352:
 					case 358:
-						r55_talk_line();
+						Room55::talk_line();
 						break;
 
 					case 366:
-						r56_talk_man();
+						Room56::talk_man();
 						break;
 
 					case 376:
-						r64_talk_man();
+						Room64::talk_man();
 						break;
 
 					case 380:
-						r63_talk_girl();
+						Room63::talk_girl();
 						break;
 
 					case 381:
-						r63_talk_hunter();
+						Room63::talk_hunter();
 						break;
 
 					case 382:
-						r63_talk_regie();
+						Room63::talk_regie();
 						break;
 
 					case 384:
-						r63_talk_fx_man();
+						Room63::talk_fx_man();
 						break;
 
 					case 394:
@@ -2388,7 +2388,7 @@ int16 calc_person_click(int16 p_nr) {
 
 		case CIGAR_INV:
 			if (_G(spieler).PersonRoomNr[P_CHEWY] == 49) {
-				r49_use_boy_cigar();
+				Room49::use_boy_cigar();
 				action_ret = true;
 			}
 			break;
@@ -2647,7 +2647,7 @@ void calc_person_dia(int16 p_nr) {
 			room_nr = _G(spieler).PersonDiaRoom[p_nr];
 		}
 
-		atds->set_string_end_func(&r65_atds_string_start);
+		atds->set_string_end_func(&Room65::atds_string_start);
 
 		if (!room_nr) {
 			if (_G(spieler).DiaAMov != -1)


Commit: 19f2d98f6f64b4c90a25bb2270dc67b27b916aeb
    https://github.com/scummvm/scummvm/commit/19f2d98f6f64b4c90a25bb2270dc67b27b916aeb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:22-08:00

Commit Message:
CHEWY: Split episode4.cpp into separate room classes

Changed paths:
    engines/chewy/episode4.cpp
    engines/chewy/episode4.h
    engines/chewy/global.h
    engines/chewy/menus.cpp
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
index ce5c2399aef..20d66593959 100644
--- a/engines/chewy/episode4.cpp
+++ b/engines/chewy/episode4.cpp
@@ -26,591 +26,4 @@
 
 namespace Chewy {
 
-int16 r68HohesC;
-
-void r66_entry(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
-}
-
-void r66_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	switch (eib_nr) {
-	case 98:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 69;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
-		break;
-
-	case 99:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 68;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 68;
-		break;
-
-	case 100:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 67;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 67;
-		break;
-
-	}
-}
-
-void r66_talk1() {
-}
-
-void r66_talk2() {
-}
-
-void r66_talk3() {
-}
-
-void r66_talk4() {
-}
-
-int r66_proc2() {
-	return 0;
-}
-
-int r66_proc7() {
-	return 0;
-}
-
-void r67_entry() {
-	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = r67_setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	_G(spieler).DiaAMov = 7;
-	if (_G(spieler).R67KommodeAuf)
-		det->show_static_spr(9);
-	if (!_G(spieler).R67PapageiWeg) {
-		_G(timer_nr)[0] = room->set_timer(1, 10);
-		det->set_static_ani(1, -1);
-	} else
-		det->show_static_spr(0);
-	if (!flags.LoadGame) {
-		hide_cur();
-		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
-		set_person_pos(12, 100, P_HOWARD, P_RIGHT);
-		set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
-		go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
-		auto_move(7, P_CHEWY);
-		show_cur();
-	}
-}
-
-void r67_exit() {
-	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
-}
-
-void r67_setup_func() {
-	int16 x, y;
-	calc_person_look();
-	y = 117;
-	if (spieler_vector[P_CHEWY].Xypos[0] > 320) {
-		x = 178;
-	} else {
-		x = 137;
-	}
-	go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
-}
-
-int16 r67_use_grammo() {
-	int16 action_flag = false;
-	if (is_cur_inventar(SCHALL_INV)) {
-		hide_cur();
-		action_flag = true;
-		auto_move(6, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		det->start_detail(0, 255, ANI_VOR);
-		start_aad_wait(376, -1);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		det->stop_detail(0);
-		show_cur();
-	}
-	return action_flag;
-}
-
-void r67_look_brief() {
-	hide_cur();
-	auto_move(3, P_CHEWY);
-	start_aad_wait(379, -1);
-	show_cur();
-}
-
-int16 r67_use_kommode() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		hide_cur();
-		if (!_G(spieler).R67KommodeAuf) {
-			action_flag = true;
-			_G(spieler).R67KommodeAuf = true;
-			auto_move(6, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			det->show_static_spr(9);
-			atds->set_ats_str(400, 1, ATS_DATEI);
-		} else if (!_G(spieler).R67KostuemWeg) {
-			action_flag = true;
-			_G(spieler).R67KostuemWeg = true;
-			auto_move(6, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			atds->set_ats_str(400, 2, ATS_DATEI);
-			new_invent_2_cur(GALA_INV);
-		}
-		show_cur();
-	}
-	return action_flag;
-}
-
-void r67_kostuem_aad(int16 aad_nr) {
-	hide_cur();
-	if (_G(spieler).DiaAMov != -1) {
-		auto_move(_G(spieler).DiaAMov, P_CHEWY);
-	}
-	start_aad_wait(aad_nr, -1);
-	show_cur();
-}
-
-int16 r67_talk_papagei() {
-	int16 action_flag = false;
-	if (!_G(spieler).R67PapageiWeg) {
-		if (!_G(spieler).inv_cur) {
-			action_flag = true;
-			hide_cur();
-			room->set_timer_status(1, TIMER_STOP);
-			if (menu_item == CUR_HOWARD) {
-				show_cur();
-
-				ssi[2].X = 270 - _G(spieler).scrollx;
-				ssi[2].Y = 10;
-				atds->set_split_win(2, &ssi[2]);
-				start_ads_wait(19);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_NICHELLE) {
-				start_aad_wait(380, -1);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_TALK) {
-				auto_move(5, P_CHEWY);
-				show_cur();
-
-				ssi[2].X = 270 - _G(spieler).scrollx;
-				ssi[2].Y = 10;
-				atds->set_split_win(2, &ssi[2]);
-				start_ads_wait(18);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_USE) {
-				hide_cur();
-				action_flag = true;
-				auto_move(4, P_CHEWY);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-				_G(spieler).R67PapageiWeg = true;
-				det->stop_detail(1);
-				det->del_static_ani(1);
-				det->show_static_spr(0);
-				invent_2_slot(PAPAGEI_INV);
-				show_cur();
-				atds->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
-			}
-			show_cur();
-		}
-	}
-	return action_flag;
-}
-
-void r68_entry() {
-	_G(spieler).ScrollxStep = 2;
-	_G(spieler).DiaAMov = 1;
-	SetUpScreenFunc = r68_setup_func;
-	r68HohesC = -1;
-	if (_G(spieler).R68Papagei) {
-		det->show_static_spr(12);
-		det->start_detail(21, 255, ANI_VOR);
-	}
-	if (!_G(spieler).R68DivaWeg) {
-		_G(timer_nr)[0] = room->set_timer(255, 10);
-		det->set_static_ani(18, -1);
-	} else
-		det->hide_static_spr(3);
-	if (!flags.LoadGame) {
-		hide_cur();
-		set_person_pos(524, 51, P_HOWARD, P_LEFT);
-		set_person_pos(550, 54, P_NICHELLE, P_LEFT);
-		auto_move(7, P_CHEWY);
-		show_cur();
-	}
-}
-
-void r68_exit() {
-	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
-}
-
-void r68_setup_func() {
-	int16 ho_x, ho_y;
-	int16 ni_x, ni_y;
-	int16 ch_x;
-
-	switch (r68HohesC) {
-	case 0:
-		if (det->get_ani_status(r68HohesC) == false) {
-			r68HohesC = 1;
-			det->start_detail(r68HohesC, 1, ANI_VOR);
-		}
-		break;
-
-	case 1:
-		if (det->get_ani_status(r68HohesC) == false) {
-			r68HohesC = 2;
-			det->start_detail(r68HohesC, 3, ANI_VOR);
-		}
-		break;
-
-	case 2:
-		if (det->get_ani_status(r68HohesC) == false) {
-			r68HohesC = -1;
-			det->stop_detail(18);
-			det->show_static_spr(3);
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-		}
-		break;
-
-	}
-	calc_person_look();
-	ho_x = spieler_vector[P_HOWARD].Xypos[0];
-	ni_x = spieler_vector[P_NICHELLE].Xypos[0];
-	ho_y = 75;
-	ni_y = 75;
-	ch_x = spieler_vector[P_CHEWY].Xypos[0];
-	if (ch_x < 130) {
-		ho_x = 223;
-		ni_x = 260;
-	} else {
-		ho_x = 320;
-		ni_x = 350;
-	}
-	go_auto_xy(ho_x, ho_y, P_HOWARD, ANI_GO);
-	go_auto_xy(ni_x, ni_y, P_NICHELLE, ANI_GO);
-}
-
-void r68_look_kaktus() {
-	hide_cur();
-	auto_move(6, P_CHEWY);
-	start_aad_wait(383, -1);
-	show_cur();
-}
-
-void r68_talk_indigo() {
-	r68_talk_indigo(-1);
-}
-
-void r68_talk_indigo(int16 aad_nr) {
-	hide_cur();
-	auto_move(3, P_CHEWY);
-	room->set_timer_status(8, TIMER_STOP);
-	det->del_static_ani(8);
-	if (aad_nr == -1) {
-		det->set_static_ani(9, -1);
-		start_aad_wait(384 + (int16)_G(spieler).R68IndigoDia, -1);
-		_G(spieler).R68IndigoDia ^= 1;
-		det->del_static_ani(9);
-	} else {
-		det->set_static_ani(12, -1);
-		start_aad_wait(aad_nr, -1);
-		det->del_static_ani(12);
-	}
-	room->set_timer_status(8, TIMER_START);
-	det->set_static_ani(8, -1);
-	show_cur();
-}
-
-int16 r68_use_indigo() {
-	int16 action_flag = false;
-	hide_cur();
-	if (is_cur_inventar(CLINT_500_INV)) {
-		action_flag = true;
-		if (_G(spieler).R68Lied) {
-			hide_cur();
-			auto_move(3, P_CHEWY);
-			auto_scroll(78, 0);
-			del_inventar(_G(spieler).AkInvent);
-			r68_talk_indigo(394);
-			_G(cur_hide_flag) = false;
-			hide_cur();
-			room->set_timer_status(8, TIMER_STOP);
-			det->del_static_ani(8);
-			det->stop_detail(8);
-			start_detail_wait(13, 3, ANI_VOR);
-			start_detail_wait(25, 1, ANI_VOR);
-			det->set_static_ani(12, -1);
-			r68_talk_indigo(398);
-			room->set_timer_status(8, TIMER_STOP);
-			det->del_static_ani(8);
-			det->stop_detail(8);
-			start_detail_wait(26, 1, ANI_VOR);
-			room->set_timer_status(8, TIMER_START);
-			det->set_static_ani(8, -1);
-			new_invent_2_cur(KARTE_INV);
-			_G(spieler).R68KarteDa = true;
-		} else {
-			r68_talk_indigo(397);
-		}
-	} else if (is_cur_inventar(CLINT_1500_INV) || is_cur_inventar(CLINT_3000_INV)) {
-		action_flag = true;
-		start_aad_wait(393, -1);
-	}
-	show_cur();
-	return action_flag;
-}
-
-void r68_talk_keeper() {
-	hide_cur();
-	auto_move(2, P_CHEWY);
-	room->set_timer_status(20, TIMER_STOP);
-	det->del_static_ani(20);
-	start_detail_wait(15, 1, ANI_VOR);
-	det->set_static_ani(16, -1);
-	show_cur();
-	ssi[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
-	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
-	atds->set_split_win(3, &ssi[3]);
-	start_ads_wait(20);
-	_G(cur_hide_flag) = false;
-	hide_cur();
-	det->del_static_ani(16);
-	start_detail_wait(15, 1, ANI_RUECK);
-	room->set_timer_status(20, TIMER_START);
-	det->set_static_ani(20, -1);
-	show_cur();
-}
-
-int16 r68_use_papagei() {
-	int16 action_flag = false;
-	if (is_cur_inventar(PAPAGEI_INV)) {
-		hide_cur();
-		action_flag = true;
-		_G(spieler).R68Papagei = true;
-		del_inventar(_G(spieler).AkInvent);
-		auto_move(5, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		det->show_static_spr(12);
-		det->start_detail(21, 255, ANI_VOR);
-		atds->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(407, 1, ATS_DATEI);
-		show_cur();
-	}
-	return action_flag;
-}
-
-void r68_calc_diva() {
-	if (!_G(spieler).R68DivaWeg) {
-		if (!_G(spieler).R68Papagei) {
-			if (r68HohesC == -1) {
-				r68HohesC = 0;
-				det->hide_static_spr(3);
-				det->start_detail(r68HohesC, 1, ANI_RUECK);
-				det->start_detail(18, 255, ANI_VOR);
-			}
-		} else {
-			if (!_G(spieler).R68Gutschein) {
-
-				if (!is_chewy_busy()) {
-					hide_cur();
-					_G(spieler).R68Gutschein = true;
-					auto_move(4, P_CHEWY);
-					start_aad_wait(386, -1);
-					start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-					new_invent_2_cur(BAR_GUT_INV);
-					uhr->reset_timer(_G(timer_nr)[0], 0);
-					show_cur();
-				}
-			}
-		}
-	}
-}
-
-int16 r68_use_keeper() {
-	int16 action_flag = false;
-	if (is_cur_inventar(BAR_GUT_INV)) {
-		hide_cur();
-		del_inventar(_G(spieler).AkInvent);
-		action_flag = true;
-		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		room->set_timer_status(20, TIMER_STOP);
-		det->del_static_ani(20);
-		start_ani_block(3, ablock39);
-		room->set_timer_status(20, TIMER_START);
-		det->set_static_ani(20, -1);
-		new_invent_2_cur(B_MARY_INV);
-		show_cur();
-	}
-	return action_flag;
-}
-
-int16 r68_use_diva() {
-	short action_flag = false;
-	hide_cur();
-	if (is_cur_inventar(B_MARY_INV)) {
-		del_inventar(_G(spieler).AkInvent);
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		start_detail_wait(4, 1, ANI_VOR);
-		_G(spieler).R68Gutschein = false;
-	} else if (is_cur_inventar(B_MARY2_INV)) {
-		del_inventar(_G(spieler).AkInvent);
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		det->hide_static_spr(3);
-		_G(spieler).R68DivaWeg = true;
-		start_ani_block(2, ablock38);
-		flic_cut(FCUT_083, FLC_MODE);
-		flic_cut(FCUT_083, FLC_MODE);
-		det->del_static_ani(18);
-		start_detail_wait(7, 1, ANI_VOR);
-		atds->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATEI);
-		set_person_spr(P_RIGHT, P_CHEWY);
-		start_aad_wait(402, -1);
-	} else
-		action_flag = r68_use_papagei();
-	show_cur();
-	return action_flag;
-}
-
-void r68_kostuem_aad(int16 aad_nr) {
-	hide_cur();
-	if (_G(spieler).DiaAMov != -1) {
-		auto_move(_G(spieler).DiaAMov, P_CHEWY);
-	}
-	start_aad_wait(aad_nr, -1);
-	if (!_G(spieler).R68DivaWeg)
-		start_aad_wait(388, -1);
-	else if (!_G(spieler).R67LiedOk)
-		start_aad_wait(389, -1);
-	else {
-		SetUpScreenFunc = 0;
-		del_inventar(_G(spieler).AkInvent);
-		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
-		_G(spieler).PersonHide[P_NICHELLE] = true;
-		go_auto_xy(161, 59, P_HOWARD, ANI_GO);
-		auto_move(4, P_CHEWY);
-		start_aad_wait(390, -1);
-		start_detail_wait(22, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_HOWARD] = true;
-		det->start_detail(27, 255, ANI_VOR);
-		start_detail_wait(23, 3, ANI_VOR);
-		det->start_detail(24, 255, ANI_VOR);
-		set_person_pos(26, 40, P_NICHELLE, P_RIGHT);
-		start_aad_wait(391, -1);
-		room->set_timer_status(8, TIMER_STOP);
-		det->del_static_ani(8);
-		start_detail_wait(10, 1, ANI_VOR);
-		det->start_detail(11, 255, ANI_VOR);
-		start_aad_wait(396, -1);
-		det->stop_detail(11);
-		det->start_detail(14, 255, ANI_VOR);
-		start_aad_wait(395, -1);
-		det->stop_detail(14);
-		room->set_timer_status(8, TIMER_START);
-		_G(spieler).PersonHide[P_HOWARD] = false;
-		det->stop_detail(27);
-		det->set_static_ani(8, -1);
-		start_aad_wait(392, -1);
-		_G(spieler).R68Lied = true;
-		det->stop_detail(24);
-		SetUpScreenFunc = r68_setup_func;
-		auto_move(1, P_CHEWY);
-		_G(spieler).PersonHide[P_NICHELLE] = false;
-		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
-	}
-	show_cur();
-}
-
-void r68_talk_papagei() {
-	hide_cur();
-	auto_move(5, P_CHEWY);
-	show_cur();
-
-	ssi[2].X = 60;
-	ssi[2].Y = 80;
-	atds->set_split_win(2, &ssi[2]);
-	start_ads_wait(18);
-}
-
-void r69_entry(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 2;
-	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
-	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
-	_G(spieler).ZoomXy[P_NICHELLE][0] = 46;
-	_G(spieler).ZoomXy[P_NICHELLE][1] = 90;
-	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
-	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = r69_setup_func;
-	_G(spieler).DiaAMov = 2;
-	if (!flags.LoadGame) {
-		hide_cur();
-		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
-		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
-		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
-		go_auto_xy(351, 97, P_HOWARD, ANI_WAIT);
-		show_cur();
-	}
-}
-
-void r69_exit(int16 eib_nr) {
-	_G(spieler).ScrollxStep = 1;
-	switch (eib_nr) {
-	case 97:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
-		break;
-
-	}
-}
-
-void r69_setup_func() {
-	calc_person_look();
-}
-
-void r69_look_schild() {
-	hide_cur();
-	auto_move(1, P_CHEWY);
-	start_aad_wait(382, -1);
-	show_cur();
-}
-
-int16 r69_use_bruecke() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		hide_cur();
-		action_flag = true;
-
-		if (!_G(spieler).R68KarteDa) {
-			calc_person_dia(P_HOWARD);
-		} else {
-			auto_move(3, P_CHEWY);
-			spieler_mi[P_CHEWY].Mode = true;
-			go_auto_xy(253, 103, P_CHEWY, ANI_WAIT);
-			go_auto_xy(141, 103, P_CHEWY, ANI_WAIT);
-			go_auto_xy(82, 95, P_CHEWY, ANI_WAIT);
-			go_auto_xy(46, 83, P_CHEWY, ANI_WAIT);
-			go_auto_xy(255, 84, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(258, 86, P_HOWARD, ANI_GO);
-			go_auto_xy(147, 84, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(140, 86, P_HOWARD, ANI_GO);
-			go_auto_xy(94, 77, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(94, 82, P_HOWARD, ANI_GO);
-			go_auto_xy(59, 68, P_NICHELLE, ANI_WAIT);
-			spieler_mi[P_CHEWY].Mode = false;
-			switch_room(66);
-		}
-		show_cur();
-	}
-	return action_flag;
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/episode4.h b/engines/chewy/episode4.h
index 6f29afed2c7..071afece82c 100644
--- a/engines/chewy/episode4.h
+++ b/engines/chewy/episode4.h
@@ -24,69 +24,6 @@
 
 namespace Chewy {
 
-void switch_room(int16 nr);
-
-void r66_entry(int16 eib_nr);
-void r66_exit(int16 eib_nr);
-void r66_talk1();
-void r66_talk2();
-void r66_talk3();
-void r66_talk4();
-int r66_proc2();
-int r66_proc7();
-
-void r67_entry();
-
-void r67_exit();
-
-void r67_setup_func();
-
-int16 r67_use_grammo();
-
-void r67_look_brief();
-
-int16 r67_use_kommode();
-
-void r67_kostuem_aad(int16 aad_nr);
-
-int16 r67_talk_papagei();
-
-void r68_entry();
-
-void r68_exit();
-void r68_setup_func();
-
-void r68_look_kaktus();
-
-void r68_talk_indigo();
-
-void r68_talk_indigo(int16 aad_nr);
-
-int16 r68_use_indigo();
-
-void r68_talk_keeper();
-
-int16 r68_use_papagei();
-
-void r68_calc_diva();
-
-int16 r68_use_keeper();
-
-int16 r68_use_diva();
-
-void r68_kostuem_aad(int16 aad_nr);
-
-void r68_talk_papagei();
-
-void r69_entry(int16 eib_nr);
-
-void r69_exit(int16 eib_nr);
-void r69_setup_func();
-
-void r69_look_schild();
-
-int16 r69_use_bruecke();
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 4cad72e5520..ac1b83b1a28 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -109,6 +109,7 @@ public:
 	int16 _r65tmp_ch_y = 0;
 	int16 _r65tmp_ho_x = 0;
 	int16 _r65tmp_ho_y = 0;
+	int16 _r68HohesC = 0;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 2446cadb44c..0c51ee9f7b2 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -29,22 +29,14 @@
 namespace Chewy {
 
 static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
-
 	{WIN_INF_X + 6, WIN_INF_Y + 10, WIN_INF_X + 6 + 30, WIN_INF_Y + 10 + 14},
-
 	{WIN_INF_X + 6 + 32, WIN_INF_Y + 10, WIN_INF_X + 6 + 62, WIN_INF_Y + 10 + 14},
-
 	{ -1, -1, -1, -1},
-
 	{WIN_INF_X + 198, WIN_INF_Y + 10, WIN_INF_X + 198 + 30, WIN_INF_Y + 10 + 14},
-
 	{WIN_INF_X + 198 + 40, WIN_INF_Y + 10, WIN_INF_X + 198 + 70, WIN_INF_Y + 10 + 14},
-
 	{WIN_INF_X + 6, WIN_INF_Y + 4 + 26, WIN_INF_X + 268, WIN_INF_Y + 4 + 26 + 90},
-
 	{WIN_INF_X + 242, WIN_INF_Y + 136, WIN_INF_X + 292, WIN_INF_Y + 136 + 14},
-
-	{WIN_INF_X + 242, WIN_INF_Y + 156, WIN_INF_X + 292, WIN_INF_Y + 156 + 14},
+	{WIN_INF_X + 242, WIN_INF_Y + 156, WIN_INF_X + 292, WIN_INF_Y + 156 + 14}
 };
 
 char m_flip = 0;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index dface742617..a79463da299 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -110,7 +110,11 @@ MODULE_OBJS = \
 	rooms/room62.o \
 	rooms/room63.o \
 	rooms/room64.o \
-	rooms/room65.o
+	rooms/room65.o \
+	rooms/room66.o \
+	rooms/room67.o \
+	rooms/room68.o \
+	rooms/room69.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 254f5343e0b..8016d77e5ff 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -200,7 +200,7 @@ void timer_action(int16 t_nr) {
 
 	case 68:
 		if (t_nr == _G(timer_nr)[0])
-			r68_calc_diva();
+			Room68::calc_diva();
 		else
 			default_flag = true;
 		break;
@@ -693,11 +693,11 @@ void enter_room(int16 eib_nr) {
 	ENTRY(63);
 	ENTRY(64);
 	ENTRY(65);
+	ENTRY_NR(66);
+	ENTRY(67);
+	ENTRY(68);
+	ENTRY_NR(69);
 
-	case 66: r66_entry(eib_nr); break;
-	case 67: r67_entry(); break;
-	case 68: r68_entry(); break;
-	case 69: r69_entry(eib_nr); break;
 	case 70: r70_entry(); break;
 	case 71: r71_entry(); break;
 	case 72: r72_entry(); break;
@@ -1024,10 +1024,10 @@ void exit_room(int16 eib_nr) {
 		case 50: Room50::xit(eib_nr); break;
 		case 51: Room51::xit(eib_nr); break;
 		case 55: Room55::xit(eib_nr); break;
-		case 66: r66_exit(eib_nr); break;
-		case 67: r67_exit(); break;
-		case 68: r68_exit(); break;
-		case 69: r69_exit(eib_nr); break;
+		case 66: Room66::xit(eib_nr); break;
+		case 67: Room67::xit(); break;
+		case 68: Room68::xit(); break;
+		case 69: Room69::xit(eib_nr); break;
 		case 70: r70_exit(eib_nr); break;
 		case 71: r71_exit(eib_nr); break;
 		case 72: r72_exit(eib_nr); break;
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index f17cfc2263b..c828c1e7965 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -81,6 +81,10 @@
 #include "chewy/rooms/room63.h"
 #include "chewy/rooms/room64.h"
 #include "chewy/rooms/room65.h"
+#include "chewy/rooms/room66.h"
+#include "chewy/rooms/room67.h"
+#include "chewy/rooms/room68.h"
+#include "chewy/rooms/room69.h"
 
 // TODO: Remove one room classes implemented and split up
 #include "chewy/episode1.h"
@@ -150,6 +154,10 @@ using Chewy::Rooms::Room62;
 using Chewy::Rooms::Room63;
 using Chewy::Rooms::Room64;
 using Chewy::Rooms::Room65;
+using Chewy::Rooms::Room66;
+using Chewy::Rooms::Room67;
+using Chewy::Rooms::Room68;
+using Chewy::Rooms::Room69;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index c1c0e52bb3c..090f28bd09a 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -111,11 +111,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 402:
-						r69_look_schild();
+						Room69::look_schild();
 						break;
 
 					case 416:
-						r68_look_kaktus();
+						Room68::look_kaktus();
 						break;
 
 					default:
@@ -567,40 +567,40 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 394:
-						action_ret = r67_talk_papagei();
+						action_ret = Room67::talk_papagei();
 						break;
 
 					case 399:
-						action_ret = r67_use_grammo();
+						action_ret = Room67::use_grammo();
 						break;
 
 					case 400:
-						action_ret = r67_use_kommode();
+						action_ret = Room67::use_kommode();
 						break;
 
 					case 403:
 					case 405:
-						action_ret = r69_use_bruecke();
+						action_ret = Room69::use_bruecke();
 						break;
 
 					case 406:
-						action_ret = r68_use_papagei();
+						action_ret = Room68::use_papagei();
 						break;
 
 					case 407:
-						action_ret = r68_use_diva();
+						action_ret = Room68::use_diva();
 						break;
 
 					case 410:
-						action_ret = r68_use_keeper();
+						action_ret = Room68::use_keeper();
 						break;
 
 					case 414:
-						action_ret = r68_use_indigo();
+						action_ret = Room68::use_indigo();
 						break;
 
 					case 425:
-						action_ret = r66_proc7();
+						action_ret = Room66::proc7();
 						break;
 
 					case 430:
@@ -803,7 +803,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 403:
 					case 405:
-						action_ret = r69_use_bruecke();
+						action_ret = Room69::use_bruecke();
 						break;
 
 					case 487:
@@ -932,35 +932,35 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 394:
-						action_ret = r67_talk_papagei();
+						action_ret = Room67::talk_papagei();
 						break;
 
 					case 408:
-						r68_talk_papagei();
+						Room68::talk_papagei();
 						break;
 
 					case 410:
-						r68_talk_keeper();
+						Room68::talk_keeper();
 						break;
 
 					case 414:
-						r68_talk_indigo();
+						Room68::talk_indigo();
 						break;
 
 					case 419:
-						r66_talk1();
+						Room66::talk1();
 						break;
 
 					case 420:
-						r66_talk2();
+						Room66::talk2();
 						break;
 
 					case 421:
-						r66_talk3();
+						Room66::talk3();
 						break;
 
 					case 425:
-						r66_talk4();
+						Room66::talk4();
 						break;
 
 					case 447:
@@ -1027,7 +1027,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 389:
-						r67_look_brief();
+						Room67::look_brief();
 						break;
 
 					case 391:
@@ -1077,7 +1077,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 423:
-						action_ret = r66_proc2();
+						action_ret = Room66::proc2();
 						break;
 
 					default:
@@ -1699,7 +1699,6 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R63_GIRL_DIA:
 	case R67_PAPA1_DIA:
 	case R67_PAPA2_DIA:
-
 		switch (person_nr) {
 		case 2:
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
@@ -2409,7 +2408,7 @@ int16 calc_person_click(int16 p_nr) {
 		switch (_G(spieler).AkInvent) {
 		case GALA_INV:
 			if (_G(spieler).PersonRoomNr[P_CHEWY] == 67) {
-				r67_kostuem_aad(378);
+				Room67::kostuem_aad(378);
 				action_ret = true;
 			}
 			break;
@@ -2424,10 +2423,10 @@ int16 calc_person_click(int16 p_nr) {
 		switch (_G(spieler).AkInvent) {
 		case GALA_INV:
 			if (_G(spieler).PersonRoomNr[P_CHEWY] == 67) {
-				r67_kostuem_aad(377);
+				Room67::kostuem_aad(377);
 				action_ret = true;
 			} else if (_G(spieler).PersonRoomNr[P_CHEWY] == 68) {
-				r68_kostuem_aad(387);
+				Room68::kostuem_aad(387);
 				action_ret = true;
 			}
 			break;


Commit: d151497b53c7038e9aac8d58990b4c29287114f8
    https://github.com/scummvm/scummvm/commit/d151497b53c7038e9aac8d58990b4c29287114f8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:23-08:00

Commit Message:
CHEWY: Split episode5.cpp into separate room classes

Changed paths:
  A engines/chewy/rooms/room66.cpp
  A engines/chewy/rooms/room66.h
  A engines/chewy/rooms/room67.cpp
  A engines/chewy/rooms/room67.h
  A engines/chewy/rooms/room68.cpp
  A engines/chewy/rooms/room68.h
  A engines/chewy/rooms/room69.cpp
  A engines/chewy/rooms/room69.h
  A engines/chewy/rooms/room70.cpp
  A engines/chewy/rooms/room70.h
  A engines/chewy/rooms/room71.cpp
  A engines/chewy/rooms/room71.h
  A engines/chewy/rooms/room72.cpp
  A engines/chewy/rooms/room72.h
  A engines/chewy/rooms/room73.cpp
  A engines/chewy/rooms/room73.h
  A engines/chewy/rooms/room74.cpp
  A engines/chewy/rooms/room74.h
  A engines/chewy/rooms/room75.cpp
  A engines/chewy/rooms/room75.h
  A engines/chewy/rooms/room76.cpp
  A engines/chewy/rooms/room76.h
  A engines/chewy/rooms/room77.cpp
  A engines/chewy/rooms/room77.h
  A engines/chewy/rooms/room78.cpp
  A engines/chewy/rooms/room78.h
  A engines/chewy/rooms/room79.cpp
  A engines/chewy/rooms/room79.h
  A engines/chewy/rooms/room80.cpp
  A engines/chewy/rooms/room80.h
  A engines/chewy/rooms/room81.cpp
  A engines/chewy/rooms/room81.h
  A engines/chewy/rooms/room82.cpp
  A engines/chewy/rooms/room82.h
  A engines/chewy/rooms/room83.cpp
  A engines/chewy/rooms/room83.h
  A engines/chewy/rooms/room84.cpp
  A engines/chewy/rooms/room84.h
  A engines/chewy/rooms/room85.cpp
  A engines/chewy/rooms/room85.h
  A engines/chewy/rooms/room86.cpp
  A engines/chewy/rooms/room86.h
  A engines/chewy/rooms/room87.cpp
  A engines/chewy/rooms/room87.h
  A engines/chewy/rooms/room88.cpp
  A engines/chewy/rooms/room88.h
  A engines/chewy/rooms/room89.cpp
  A engines/chewy/rooms/room89.h
  A engines/chewy/rooms/room90.cpp
  A engines/chewy/rooms/room90.h
  A engines/chewy/rooms/room91.cpp
  A engines/chewy/rooms/room91.h
  A engines/chewy/rooms/room92.cpp
  A engines/chewy/rooms/room92.h
  A engines/chewy/rooms/room93.cpp
  A engines/chewy/rooms/room93.h
  A engines/chewy/rooms/room94.cpp
  A engines/chewy/rooms/room94.h
  A engines/chewy/rooms/room95.cpp
  A engines/chewy/rooms/room95.h
  A engines/chewy/rooms/room96.cpp
  A engines/chewy/rooms/room96.h
  A engines/chewy/rooms/room97.cpp
  A engines/chewy/rooms/room97.h
    engines/chewy/episode5.cpp
    engines/chewy/episode5.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/rooms.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
index 34c98e77768..b6533a11640 100644
--- a/engines/chewy/episode5.cpp
+++ b/engines/chewy/episode5.cpp
@@ -26,368 +26,4 @@
 
 namespace Chewy {
 
-void r70_entry() {
-}
-
-void r70_exit(int16 eib_nr) {
-}
-
-void r71_entry() {
-}
-
-void r71_exit(int16 eib_nr) {
-}
-
-int r71_proc1() {
-	return 0;
-}
-
-int r71_proc6() {
-	return 0;
-}
-
-void r71_proc7() {
-}
-
-void r72_entry() {
-}
-
-void r72_exit(int16 eib_nr) {
-}
-
-void r73_entry() {
-}
-
-void r73_exit(int16 eib_nr) {
-}
-
-int r73_proc1() {
-	return 0;
-}
-
-int r73_proc2() {
-	return 0;
-}
-
-void r74_entry() {
-}
-
-void r74_exit(int16 eib_nr) {
-}
-
-int r74_proc1() {
-	return 0;
-}
-
-void r75_entry() {
-}
-
-void r75_exit(int16 eib_nr) {
-}
-
-void r76_entry() {
-}
-
-void r76_exit() {
-}
-
-void r76_talk1() {
-}
-
-void r76_talk2() {
-}
-
-int r76_proc6() {
-	return 0;
-}
-
-int r76_proc7() {
-	return 0;
-}
-
-void r77_entry() {
-}
-
-void r77_exit() {
-}
-
-int r77_proc1() {
-	return 0;
-}
-
-int r77_proc2() {
-	return 0;
-}
-
-void r78_entry() {
-}
-
-void r78_exit() {
-}
-
-void r79_entry() {
-}
-
-void r79_exit() {
-}
-
-void r80_entry() {
-}
-
-void r81_entry() {
-}
-
-void r81_exit(int16 eib_nr) {
-}
-
-void r81_proc1() {
-}
-
-int r81_proc2() {
-	return 0;
-}
-
-void r82_entry() {
-}
-
-void r82_exit(int16 eib_nr) {
-}
-
-void r82_talk1() {
-}
-
-void r82_talk2() {
-}
-
-void r82_talk3() {
-}
-
-int r82_proc3() {
-	return 0;
-}
-
-int r82_proc6() {
-	return 0;
-}
-
-void r82_proc8() {
-}
-
-int r82_proc9() {
-	return 0;
-}
-
-void r83_entry() {
-}
-
-void r84_entry() {
-}
-
-void r84_exit(int16 eib_nr) {
-}
-
-void r84_talk1() {
-}
-
-void r84_talk2() {
-}
-
-int r84_proc4() {
-	return 0;
-}
-
-void r85_entry(int16 eib_nr) {
-}
-
-void r85_exit(int16 eib_nr) {
-}
-
-void r86_entry(int16 eib_nr) {
-}
-
-void r86_exit(int16 eib_nr) {
-}
-
-int r86_proc2() {
-	return 0;
-}
-
-void r87_entry() {
-}
-
-void r87_exit(int16 eib_nr) {
-}
-
-int r87_proc2() {
-	return 0;
-}
-
-int r87_proc4() {
-	return 0;
-}
-
-void r88_entry() {
-}
-
-void r88_exit() {
-}
-
-int r88_proc1() {
-	return 0;
-}
-
-int r88_proc2() {
-	return 0;
-}
-
-int r88_proc3() {
-	return 0;
-}
-
-void r89_entry() {
-}
-
-void r89_exit() {
-}
-
-void r89_talk1() {
-}
-
-int r89_proc2() {
-	return 0;
-}
-
-int r89_proc3() {
-	return 0;
-}
-
-int r89_proc4() {
-	return 0;
-}
-
-int r89_proc5() {
-	return 0;
-}
-
-void r90_entry(int16 eib_nr) {
-}
-
-void r90_exit(int16 eib_nr) {
-}
-
-void r90_proc2() {
-}
-
-int r90_proc3() {
-	return 0;
-}
-
-int r90_proc4() {
-	return 0;
-}
-
-int r90_proc6() {
-	return 0;
-}
-
-void r91_entry() {
-}
-
-void r91_exit(int16 eib_nr) {
-}
-
-void r92_entry() {
-}
-
-void r93_entry() {
-}
-
-void r93_exit() {
-}
-
-void r94_entry() {
-}
-
-void r94_exit() {
-}
-
-void r94_talk1() {
-}
-
-int r94_proc3() {
-	return 0;
-}
-
-void r95_entry(int16 eib_nr) {
-}
-
-void r95_exit(int16 eib_nr) {
-}
-
-int r95_proc2() {
-	return 0;
-}
-
-void r96_entry() {
-}
-
-void r96_exit(int16 eib_nr) {
-}
-
-void r97_entry() {
-}
-
-void r97_exit() {
-}
-
-void r97_proc2() {
-}
-
-void r97_proc3() {
-}
-
-void r97_proc4() {
-}
-
-int r97_proc5() {
-	return 0;
-}
-
-int r97_proc6() {
-	return 0;
-}
-
-int r97_proc7() {
-	return 0;
-}
-
-int r97_proc8() {
-	return 0;
-}
-
-int r97_proc9() {
-	return 0;
-}
-
-int r97_proc10() {
-	return 0;
-}
-
-int r97_proc11() {
-	return 0;
-}
-
-void r97_proc12() {
-}
-
-void r97_proc13() {
-}
-
-int r97_proc14() {
-	return 0;
-}
-
-void r97_proc15() {
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
index 4962fb516fe..ffb07cfb188 100644
--- a/engines/chewy/episode5.h
+++ b/engines/chewy/episode5.h
@@ -24,143 +24,6 @@
 
 namespace Chewy {
 
-void r70_entry();
-void r70_exit(int16 eib_nr);
-
-void r71_entry();
-void r71_exit(int16 eib_nr);
-int r71_proc1();
-int r71_proc6();
-void r71_proc7();
-
-void r72_entry();
-void r72_exit(int16 eib_nr);
-
-void r73_entry();
-void r73_exit(int16 eib_nr);
-int r73_proc1();
-int r73_proc2();
-
-void r74_entry();
-void r74_exit(int16 eib_nr);
-int r74_proc1();
-
-void r75_entry();
-void r75_exit(int16 eib_nr);
-
-void r76_entry();
-void r76_exit();
-void r76_talk1();
-void r76_talk2();
-int r76_proc6();
-int r76_proc7();
-
-void r77_entry();
-void r77_exit();
-int r77_proc1();
-int r77_proc2();
-
-void r78_entry();
-void r78_exit();
-
-void r79_entry();
-void r79_exit();
-
-void r80_entry();
-
-void r81_entry();
-void r81_exit(int16 eib_nr);
-void r81_proc1();
-int r81_proc2();
-
-void r82_entry();
-void r82_exit(int16 eib_nr);
-void r82_talk1();
-void r82_talk2();
-void r82_talk3();
-int r82_proc3();
-int r82_proc6();
-void r82_proc8();
-int r82_proc9();
-
-void r83_entry();
-
-void r84_entry();
-void r84_exit(int16 eib_nr);
-void r84_talk1();
-void r84_talk2();
-int r84_proc4();
-
-void r85_entry(int16 eib_nr);
-void r85_exit(int16 eib_nr);
-
-void r86_entry(int16 eib_nr);
-void r86_exit(int16 eib_nr);
-int r86_proc2();
-
-void r87_entry();
-void r87_exit(int16 eib_nr);
-void r87_entry();
-int r87_proc2();
-int r87_proc4();
-
-void r88_entry();
-void r88_exit();
-int r88_proc1();
-int r88_proc2();
-int r88_proc3();
-
-void r89_entry();
-void r89_exit();
-void r89_talk1();
-int r89_proc2();
-int r89_proc3();
-int r89_proc4();
-int r89_proc5();
-
-void r90_entry(int16 eib_nr);
-void r90_exit(int16 eib_nr);
-void r90_proc2();
-int r90_proc3();
-int r90_proc4();
-int r90_proc6();
-
-void r91_entry();
-void r91_exit(int16 eib_nr);
-
-void r92_entry();
-
-void r93_entry();
-void r93_exit();
-
-void r94_entry();
-void r94_exit();
-void r94_talk1();
-int r94_proc3();
-
-void r95_entry(int16 eib_nr);
-void r95_exit(int16 eib_nr);
-int r95_proc2();
-
-void r96_entry();
-void r96_exit(int16 eib_nr);
-
-void r97_entry();
-void r97_exit();
-void r97_proc2();
-void r97_proc3();
-void r97_proc4();
-int r97_proc5();
-int r97_proc6();
-int r97_proc7();
-int r97_proc8();
-int r97_proc9();
-int r97_proc10();
-int r97_proc11();
-void r97_proc12();
-void r97_proc13();
-int r97_proc14();
-void r97_proc15();
 
 } // namespace Chewy
 
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index a79463da299..691d5b29fe7 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -114,7 +114,35 @@ MODULE_OBJS = \
 	rooms/room66.o \
 	rooms/room67.o \
 	rooms/room68.o \
-	rooms/room69.o
+	rooms/room69.o \
+	rooms/room70.o \
+	rooms/room71.o \
+	rooms/room72.o \
+	rooms/room73.o \
+	rooms/room74.o \
+	rooms/room75.o \
+	rooms/room76.o \
+	rooms/room77.o \
+	rooms/room78.o \
+	rooms/room79.o \
+	rooms/room80.o \
+	rooms/room81.o \
+	rooms/room82.o \
+	rooms/room83.o \
+	rooms/room84.o \
+	rooms/room85.o \
+	rooms/room86.o \
+	rooms/room87.o \
+	rooms/room88.o \
+	rooms/room89.o \
+	rooms/room90.o \
+	rooms/room91.o \
+	rooms/room92.o \
+	rooms/room93.o \
+	rooms/room94.o \
+	rooms/room95.o \
+	rooms/room96.o \
+	rooms/room97.o
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_CHEWY), DYNAMIC_PLUGIN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8016d77e5ff..2739c228162 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -411,26 +411,26 @@ void check_ged_action(int16 index) {
 		case 97:
 			switch (index) {
 			case 50:
-				r97_proc2();
+				Room97::proc2();
 				break;
 			case 51:
-				r97_proc3();
+				Room97::proc3();
 				break;
 			case 52:
-				r97_proc13();
+				Room97::proc13();
 				break;
 			case 53:
-				r97_proc12();
+				Room97::proc12();
 				break;
 			case 54:
-				r97_proc4();
+				Room97::proc4();
 				break;
 			case 55:
 				if (_G(spieler).flags36_20)
 					auto_scroll(268, 0);
 				break;
 			case 56:
-				r97_proc15();
+				Room97::proc15();
 				break;
 			default:
 				break;
@@ -697,35 +697,35 @@ void enter_room(int16 eib_nr) {
 	ENTRY(67);
 	ENTRY(68);
 	ENTRY_NR(69);
+	ENTRY(70);
+	ENTRY(71);
+	ENTRY(72);
+	ENTRY(73);
+	ENTRY(74);
+	ENTRY(75);
+	ENTRY(76);
+	ENTRY(77);
+	ENTRY(78);
+	ENTRY(79);
+	ENTRY(80);
+	ENTRY(81);
+	ENTRY(82);
+	ENTRY(83);
+	ENTRY(84);
+	ENTRY_NR(85);
+	ENTRY_NR(86);
+	ENTRY(87);
+	ENTRY(88);
+	ENTRY(89);
+	ENTRY_NR(90);
+	ENTRY(91);
+	ENTRY(92);
+	ENTRY(93);
+	ENTRY(94);
+	ENTRY_NR(95);
+	ENTRY(96);
+	ENTRY(97);
 
-	case 70: r70_entry(); break;
-	case 71: r71_entry(); break;
-	case 72: r72_entry(); break;
-	case 73: r73_entry(); break;
-	case 74: r74_entry(); break;
-	case 75: r75_entry(); break;
-	case 76: r76_entry(); break;
-	case 77: r77_entry(); break;
-	case 78: r78_entry(); break;
-	case 79: r79_entry(); break;
-	case 80: r80_entry(); break;
-	case 81: r81_entry(); break;
-	case 82: r82_entry(); break;
-	case 83: r83_entry(); break;
-	case 84: r84_entry(); break;
-	case 85: r85_entry(eib_nr); break;
-	case 86: r86_entry(eib_nr); break;
-	case 87: r87_entry(); break;
-	case 88: r88_entry(); break;
-	case 89: r89_entry(); break;
-	case 90: r90_entry(eib_nr); break;
-	case 91: r91_entry(); break;
-	case 92: r92_entry(); break;
-	case 93: r93_entry(); break;
-	case 94: r94_entry(); break;
-	case 95: r95_entry(eib_nr); break;
-	case 96: r96_entry(); break;
-	case 97: r97_entry(); break;
 	default:
 		break;
 	}
@@ -822,11 +822,11 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 65: Room65::xit(); break;
-	case 76: r76_exit(); break;
-	case 77: r77_exit(); break;
-	case 78: r78_exit(); break;
-	case 79: r79_exit(); break;
-	case 88: r88_exit(); break;
+	case 76: Room76::xit(); break;
+	case 77: Room77::xit(); break;
+	case 78: Room78::xit(); break;
+	case 79: Room79::xit(); break;
+	case 88: Room88::xit(); break;
 
 	default:
 		no_exit = true;
@@ -1028,26 +1028,26 @@ void exit_room(int16 eib_nr) {
 		case 67: Room67::xit(); break;
 		case 68: Room68::xit(); break;
 		case 69: Room69::xit(eib_nr); break;
-		case 70: r70_exit(eib_nr); break;
-		case 71: r71_exit(eib_nr); break;
-		case 72: r72_exit(eib_nr); break;
-		case 73: r73_exit(eib_nr); break;
-		case 74: r74_exit(eib_nr); break;
-		case 75: r75_exit(eib_nr); break;
-		case 81: r81_exit(eib_nr); break;
-		case 82: r82_exit(eib_nr); break;
-		case 84: r84_exit(eib_nr); break;
-		case 85: r85_exit(eib_nr); break;
-		case 86: r86_exit(eib_nr); break;
-		case 87: r87_exit(eib_nr); break;
-		case 89: r89_exit(); break;
-		case 90: r90_exit(eib_nr); break;
-		case 91: r91_exit(eib_nr); break;
-		case 93: r93_exit(); break;
-		case 94: r94_exit(); break;
-		case 95: r95_exit(eib_nr); break;
-		case 96: r96_exit(eib_nr); break;
-		case 97: r97_exit(); break;
+		case 70: Room70::xit(eib_nr); break;
+		case 71: Room71::xit(eib_nr); break;
+		case 72: Room72::xit(eib_nr); break;
+		case 73: Room73::xit(eib_nr); break;
+		case 74: Room74::xit(eib_nr); break;
+		case 75: Room75::xit(eib_nr); break;
+		case 81: Room81::xit(eib_nr); break;
+		case 82: Room82::xit(eib_nr); break;
+		case 84: Room84::xit(eib_nr); break;
+		case 85: Room85::xit(eib_nr); break;
+		case 86: Room86::xit(eib_nr); break;
+		case 87: Room87::xit(eib_nr); break;
+		case 89: Room89::xit(); break;
+		case 90: Room90::xit(eib_nr); break;
+		case 91: Room91::xit(eib_nr); break;
+		case 93: Room93::xit(); break;
+		case 94: Room94::xit(); break;
+		case 95: Room95::xit(eib_nr); break;
+		case 96: Room96::xit(eib_nr); break;
+		case 97: Room97::xit(); break;
 		default: break;
 		}
 	}
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
new file mode 100644
index 00000000000..73136af16ee
--- /dev/null
+++ b/engines/chewy/rooms/room66.cpp
@@ -0,0 +1,80 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room66.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room66::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+}
+
+void Room66::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	switch (eib_nr) {
+	case 98:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 69;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
+		break;
+
+	case 99:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 68;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 68;
+		break;
+
+	case 100:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 67;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 67;
+		break;
+
+	}
+}
+
+void Room66::talk1() {
+}
+
+void Room66::talk2() {
+}
+
+void Room66::talk3() {
+}
+
+void Room66::talk4() {
+}
+
+int Room66::proc2() {
+	return 0;
+}
+
+int Room66::proc7() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room66.h b/engines/chewy/rooms/room66.h
new file mode 100644
index 00000000000..a55bb4c779c
--- /dev/null
+++ b/engines/chewy/rooms/room66.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM66_H
+#define CHEWY_ROOMS_ROOM66_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room66 {
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void talk1();
+	static void talk2();
+	static void talk3();
+	static void talk4();
+	static int proc7();
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
new file mode 100644
index 00000000000..e0ad0ed08ce
--- /dev/null
+++ b/engines/chewy/rooms/room67.cpp
@@ -0,0 +1,177 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room67.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room67::entry() {
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler).DiaAMov = 7;
+	if (_G(spieler).R67KommodeAuf)
+		det->show_static_spr(9);
+	if (!_G(spieler).R67PapageiWeg) {
+		_G(timer_nr)[0] = room->set_timer(1, 10);
+		det->set_static_ani(1, -1);
+	} else
+		det->show_static_spr(0);
+	if (!flags.LoadGame) {
+		hide_cur();
+		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
+		set_person_pos(12, 100, P_HOWARD, P_RIGHT);
+		set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
+		go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+		auto_move(7, P_CHEWY);
+		show_cur();
+	}
+}
+
+void Room67::xit() {
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+}
+
+void Room67::setup_func() {
+	int16 x, y;
+	calc_person_look();
+	y = 117;
+	if (spieler_vector[P_CHEWY].Xypos[0] > 320) {
+		x = 178;
+	} else {
+		x = 137;
+	}
+	go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+}
+
+int16 Room67::use_grammo() {
+	int16 action_flag = false;
+	if (is_cur_inventar(SCHALL_INV)) {
+		hide_cur();
+		action_flag = true;
+		auto_move(6, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		det->start_detail(0, 255, ANI_VOR);
+		start_aad_wait(376, -1);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		det->stop_detail(0);
+		show_cur();
+	}
+	return action_flag;
+}
+
+void Room67::look_brief() {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	start_aad_wait(379, -1);
+	show_cur();
+}
+
+int16 Room67::use_kommode() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		hide_cur();
+		if (!_G(spieler).R67KommodeAuf) {
+			action_flag = true;
+			_G(spieler).R67KommodeAuf = true;
+			auto_move(6, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			det->show_static_spr(9);
+			atds->set_ats_str(400, 1, ATS_DATEI);
+		} else if (!_G(spieler).R67KostuemWeg) {
+			action_flag = true;
+			_G(spieler).R67KostuemWeg = true;
+			auto_move(6, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			atds->set_ats_str(400, 2, ATS_DATEI);
+			new_invent_2_cur(GALA_INV);
+		}
+		show_cur();
+	}
+	return action_flag;
+}
+
+void Room67::kostuem_aad(int16 aad_nr) {
+	hide_cur();
+	if (_G(spieler).DiaAMov != -1) {
+		auto_move(_G(spieler).DiaAMov, P_CHEWY);
+	}
+	start_aad_wait(aad_nr, -1);
+	show_cur();
+}
+
+int16 Room67::talk_papagei() {
+	int16 action_flag = false;
+	if (!_G(spieler).R67PapageiWeg) {
+		if (!_G(spieler).inv_cur) {
+			action_flag = true;
+			hide_cur();
+			room->set_timer_status(1, TIMER_STOP);
+			if (menu_item == CUR_HOWARD) {
+				show_cur();
+
+				ssi[2].X = 270 - _G(spieler).scrollx;
+				ssi[2].Y = 10;
+				atds->set_split_win(2, &ssi[2]);
+				start_ads_wait(19);
+				room->set_timer_status(1, TIMER_START);
+			} else if (menu_item == CUR_NICHELLE) {
+				start_aad_wait(380, -1);
+				room->set_timer_status(1, TIMER_START);
+			} else if (menu_item == CUR_TALK) {
+				auto_move(5, P_CHEWY);
+				show_cur();
+
+				ssi[2].X = 270 - _G(spieler).scrollx;
+				ssi[2].Y = 10;
+				atds->set_split_win(2, &ssi[2]);
+				start_ads_wait(18);
+				room->set_timer_status(1, TIMER_START);
+			} else if (menu_item == CUR_USE) {
+				hide_cur();
+				action_flag = true;
+				auto_move(4, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				_G(spieler).R67PapageiWeg = true;
+				det->stop_detail(1);
+				det->del_static_ani(1);
+				det->show_static_spr(0);
+				invent_2_slot(PAPAGEI_INV);
+				show_cur();
+				atds->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
+			}
+			show_cur();
+		}
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room67.h b/engines/chewy/rooms/room67.h
new file mode 100644
index 00000000000..92aeca7bb38
--- /dev/null
+++ b/engines/chewy/rooms/room67.h
@@ -0,0 +1,45 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM67_H
+#define CHEWY_ROOMS_ROOM67_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room67 {
+private:
+	static void setup_func();
+
+public:
+	static void entry();
+	static void xit();
+	static int16 use_grammo();
+	static void look_brief();
+	static int16 use_kommode();
+	static void kostuem_aad(int16 aad_nr);
+	static int16 talk_papagei();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
new file mode 100644
index 00000000000..ee1a24afc06
--- /dev/null
+++ b/engines/chewy/rooms/room68.cpp
@@ -0,0 +1,354 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room68.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room68::entry() {
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).DiaAMov = 1;
+	SetUpScreenFunc = setup_func;
+	_G(r68HohesC) = -1;
+	if (_G(spieler).R68Papagei) {
+		det->show_static_spr(12);
+		det->start_detail(21, 255, ANI_VOR);
+	}
+	if (!_G(spieler).R68DivaWeg) {
+		_G(timer_nr)[0] = room->set_timer(255, 10);
+		det->set_static_ani(18, -1);
+	} else
+		det->hide_static_spr(3);
+	if (!flags.LoadGame) {
+		hide_cur();
+		set_person_pos(524, 51, P_HOWARD, P_LEFT);
+		set_person_pos(550, 54, P_NICHELLE, P_LEFT);
+		auto_move(7, P_CHEWY);
+		show_cur();
+	}
+}
+
+void Room68::xit() {
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+}
+
+void Room68::setup_func() {
+	int16 ho_x, ho_y;
+	int16 ni_x, ni_y;
+	int16 ch_x;
+
+	switch (_G(r68HohesC)) {
+	case 0:
+		if (det->get_ani_status(_G(r68HohesC)) == false) {
+			_G(r68HohesC) = 1;
+			det->start_detail(_G(r68HohesC), 1, ANI_VOR);
+		}
+		break;
+
+	case 1:
+		if (det->get_ani_status(_G(r68HohesC)) == false) {
+			_G(r68HohesC) = 2;
+			det->start_detail(_G(r68HohesC), 3, ANI_VOR);
+		}
+		break;
+
+	case 2:
+		if (det->get_ani_status(_G(r68HohesC)) == false) {
+			_G(r68HohesC) = -1;
+			det->stop_detail(18);
+			det->show_static_spr(3);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
+		}
+		break;
+
+	}
+	calc_person_look();
+	ho_x = spieler_vector[P_HOWARD].Xypos[0];
+	ni_x = spieler_vector[P_NICHELLE].Xypos[0];
+	ho_y = 75;
+	ni_y = 75;
+	ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	if (ch_x < 130) {
+		ho_x = 223;
+		ni_x = 260;
+	} else {
+		ho_x = 320;
+		ni_x = 350;
+	}
+	go_auto_xy(ho_x, ho_y, P_HOWARD, ANI_GO);
+	go_auto_xy(ni_x, ni_y, P_NICHELLE, ANI_GO);
+}
+
+void Room68::look_kaktus() {
+	hide_cur();
+	auto_move(6, P_CHEWY);
+	start_aad_wait(383, -1);
+	show_cur();
+}
+
+void Room68::talk_indigo() {
+	talk_indigo(-1);
+}
+
+void Room68::talk_indigo(int16 aad_nr) {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	room->set_timer_status(8, TIMER_STOP);
+	det->del_static_ani(8);
+	if (aad_nr == -1) {
+		det->set_static_ani(9, -1);
+		start_aad_wait(384 + (int16)_G(spieler).R68IndigoDia, -1);
+		_G(spieler).R68IndigoDia ^= 1;
+		det->del_static_ani(9);
+	} else {
+		det->set_static_ani(12, -1);
+		start_aad_wait(aad_nr, -1);
+		det->del_static_ani(12);
+	}
+	room->set_timer_status(8, TIMER_START);
+	det->set_static_ani(8, -1);
+	show_cur();
+}
+
+int16 Room68::use_indigo() {
+	int16 action_flag = false;
+	hide_cur();
+	if (is_cur_inventar(CLINT_500_INV)) {
+		action_flag = true;
+		if (_G(spieler).R68Lied) {
+			hide_cur();
+			auto_move(3, P_CHEWY);
+			auto_scroll(78, 0);
+			del_inventar(_G(spieler).AkInvent);
+			talk_indigo(394);
+			_G(cur_hide_flag) = false;
+			hide_cur();
+			room->set_timer_status(8, TIMER_STOP);
+			det->del_static_ani(8);
+			det->stop_detail(8);
+			start_detail_wait(13, 3, ANI_VOR);
+			start_detail_wait(25, 1, ANI_VOR);
+			det->set_static_ani(12, -1);
+			talk_indigo(398);
+			room->set_timer_status(8, TIMER_STOP);
+			det->del_static_ani(8);
+			det->stop_detail(8);
+			start_detail_wait(26, 1, ANI_VOR);
+			room->set_timer_status(8, TIMER_START);
+			det->set_static_ani(8, -1);
+			new_invent_2_cur(KARTE_INV);
+			_G(spieler).R68KarteDa = true;
+		} else {
+			talk_indigo(397);
+		}
+	} else if (is_cur_inventar(CLINT_1500_INV) || is_cur_inventar(CLINT_3000_INV)) {
+		action_flag = true;
+		start_aad_wait(393, -1);
+	}
+	show_cur();
+	return action_flag;
+}
+
+void Room68::talk_keeper() {
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	room->set_timer_status(20, TIMER_STOP);
+	det->del_static_ani(20);
+	start_detail_wait(15, 1, ANI_VOR);
+	det->set_static_ani(16, -1);
+	show_cur();
+	ssi[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
+	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
+	atds->set_split_win(3, &ssi[3]);
+	start_ads_wait(20);
+	_G(cur_hide_flag) = false;
+	hide_cur();
+	det->del_static_ani(16);
+	start_detail_wait(15, 1, ANI_RUECK);
+	room->set_timer_status(20, TIMER_START);
+	det->set_static_ani(20, -1);
+	show_cur();
+}
+
+int16 Room68::use_papagei() {
+	int16 action_flag = false;
+	if (is_cur_inventar(PAPAGEI_INV)) {
+		hide_cur();
+		action_flag = true;
+		_G(spieler).R68Papagei = true;
+		del_inventar(_G(spieler).AkInvent);
+		auto_move(5, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		det->show_static_spr(12);
+		det->start_detail(21, 255, ANI_VOR);
+		atds->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(407, 1, ATS_DATEI);
+		show_cur();
+	}
+	return action_flag;
+}
+
+void Room68::calc_diva() {
+	if (!_G(spieler).R68DivaWeg) {
+		if (!_G(spieler).R68Papagei) {
+			if (_G(r68HohesC) == -1) {
+				_G(r68HohesC) = 0;
+				det->hide_static_spr(3);
+				det->start_detail(_G(r68HohesC), 1, ANI_RUECK);
+				det->start_detail(18, 255, ANI_VOR);
+			}
+		} else {
+			if (!_G(spieler).R68Gutschein) {
+
+				if (!is_chewy_busy()) {
+					hide_cur();
+					_G(spieler).R68Gutschein = true;
+					auto_move(4, P_CHEWY);
+					start_aad_wait(386, -1);
+					start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+					new_invent_2_cur(BAR_GUT_INV);
+					uhr->reset_timer(_G(timer_nr)[0], 0);
+					show_cur();
+				}
+			}
+		}
+	}
+}
+
+int16 Room68::use_keeper() {
+	int16 action_flag = false;
+	if (is_cur_inventar(BAR_GUT_INV)) {
+		hide_cur();
+		del_inventar(_G(spieler).AkInvent);
+		action_flag = true;
+		auto_move(2, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		room->set_timer_status(20, TIMER_STOP);
+		det->del_static_ani(20);
+		start_ani_block(3, ablock39);
+		room->set_timer_status(20, TIMER_START);
+		det->set_static_ani(20, -1);
+		new_invent_2_cur(B_MARY_INV);
+		show_cur();
+	}
+	return action_flag;
+}
+
+int16 Room68::use_diva() {
+	short action_flag = false;
+	hide_cur();
+	if (is_cur_inventar(B_MARY_INV)) {
+		del_inventar(_G(spieler).AkInvent);
+		action_flag = true;
+		auto_move(4, P_CHEWY);
+		start_detail_wait(4, 1, ANI_VOR);
+		_G(spieler).R68Gutschein = false;
+	} else if (is_cur_inventar(B_MARY2_INV)) {
+		del_inventar(_G(spieler).AkInvent);
+		action_flag = true;
+		auto_move(4, P_CHEWY);
+		det->hide_static_spr(3);
+		_G(spieler).R68DivaWeg = true;
+		start_ani_block(2, ablock38);
+		flic_cut(FCUT_083, FLC_MODE);
+		flic_cut(FCUT_083, FLC_MODE);
+		det->del_static_ani(18);
+		start_detail_wait(7, 1, ANI_VOR);
+		atds->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATEI);
+		set_person_spr(P_RIGHT, P_CHEWY);
+		start_aad_wait(402, -1);
+	} else
+		action_flag = use_papagei();
+	show_cur();
+	return action_flag;
+}
+
+void Room68::kostuem_aad(int16 aad_nr) {
+	hide_cur();
+	if (_G(spieler).DiaAMov != -1) {
+		auto_move(_G(spieler).DiaAMov, P_CHEWY);
+	}
+	start_aad_wait(aad_nr, -1);
+	if (!_G(spieler).R68DivaWeg)
+		start_aad_wait(388, -1);
+	else if (!_G(spieler).R67LiedOk)
+		start_aad_wait(389, -1);
+	else {
+		SetUpScreenFunc = 0;
+		del_inventar(_G(spieler).AkInvent);
+		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
+		_G(spieler).PersonHide[P_NICHELLE] = true;
+		go_auto_xy(161, 59, P_HOWARD, ANI_GO);
+		auto_move(4, P_CHEWY);
+		start_aad_wait(390, -1);
+		start_detail_wait(22, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		det->start_detail(27, 255, ANI_VOR);
+		start_detail_wait(23, 3, ANI_VOR);
+		det->start_detail(24, 255, ANI_VOR);
+		set_person_pos(26, 40, P_NICHELLE, P_RIGHT);
+		start_aad_wait(391, -1);
+		room->set_timer_status(8, TIMER_STOP);
+		det->del_static_ani(8);
+		start_detail_wait(10, 1, ANI_VOR);
+		det->start_detail(11, 255, ANI_VOR);
+		start_aad_wait(396, -1);
+		det->stop_detail(11);
+		det->start_detail(14, 255, ANI_VOR);
+		start_aad_wait(395, -1);
+		det->stop_detail(14);
+		room->set_timer_status(8, TIMER_START);
+		_G(spieler).PersonHide[P_HOWARD] = false;
+		det->stop_detail(27);
+		det->set_static_ani(8, -1);
+		start_aad_wait(392, -1);
+		_G(spieler).R68Lied = true;
+		det->stop_detail(24);
+		SetUpScreenFunc = setup_func;
+		auto_move(1, P_CHEWY);
+		_G(spieler).PersonHide[P_NICHELLE] = false;
+		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
+	}
+	show_cur();
+}
+
+void Room68::talk_papagei() {
+	hide_cur();
+	auto_move(5, P_CHEWY);
+	show_cur();
+
+	ssi[2].X = 60;
+	ssi[2].Y = 80;
+	atds->set_split_win(2, &ssi[2]);
+	start_ads_wait(18);
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room68.h b/engines/chewy/rooms/room68.h
new file mode 100644
index 00000000000..5c38f966559
--- /dev/null
+++ b/engines/chewy/rooms/room68.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM68_H
+#define CHEWY_ROOMS_ROOM68_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room68 {
+private:
+	static void setup_func();
+	static void talk_indigo(int16 aad_nr);
+
+public:
+	static void entry();
+	static void xit();
+	static void look_kaktus();
+	static int16 use_indigo();
+	static void talk_keeper();
+	static void kostuem_aad(int16 aad_nr);
+	static void talk_papagei();
+	static int16 use_diva();
+	static int16 use_keeper();
+	static void calc_diva();
+	static int16 use_papagei();
+	static void talk_indigo();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
new file mode 100644
index 00000000000..1858a7af70c
--- /dev/null
+++ b/engines/chewy/rooms/room69.cpp
@@ -0,0 +1,106 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room69.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room69::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 46;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 90;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).DiaAMov = 2;
+	if (!flags.LoadGame) {
+		hide_cur();
+		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
+		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
+		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
+		go_auto_xy(351, 97, P_HOWARD, ANI_WAIT);
+		show_cur();
+	}
+}
+
+void Room69::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	switch (eib_nr) {
+	case 97:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+		break;
+
+	}
+}
+
+void Room69::setup_func() {
+	calc_person_look();
+}
+
+void Room69::look_schild() {
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	start_aad_wait(382, -1);
+	show_cur();
+}
+
+int16 Room69::use_bruecke() {
+	int16 action_flag = false;
+	if (!_G(spieler).inv_cur) {
+		hide_cur();
+		action_flag = true;
+
+		if (!_G(spieler).R68KarteDa) {
+			calc_person_dia(P_HOWARD);
+		} else {
+			auto_move(3, P_CHEWY);
+			spieler_mi[P_CHEWY].Mode = true;
+			go_auto_xy(253, 103, P_CHEWY, ANI_WAIT);
+			go_auto_xy(141, 103, P_CHEWY, ANI_WAIT);
+			go_auto_xy(82, 95, P_CHEWY, ANI_WAIT);
+			go_auto_xy(46, 83, P_CHEWY, ANI_WAIT);
+			go_auto_xy(255, 84, P_NICHELLE, ANI_WAIT);
+			go_auto_xy(258, 86, P_HOWARD, ANI_GO);
+			go_auto_xy(147, 84, P_NICHELLE, ANI_WAIT);
+			go_auto_xy(140, 86, P_HOWARD, ANI_GO);
+			go_auto_xy(94, 77, P_NICHELLE, ANI_WAIT);
+			go_auto_xy(94, 82, P_HOWARD, ANI_GO);
+			go_auto_xy(59, 68, P_NICHELLE, ANI_WAIT);
+			spieler_mi[P_CHEWY].Mode = false;
+			switch_room(66);
+		}
+		show_cur();
+	}
+	return action_flag;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room69.h b/engines/chewy/rooms/room69.h
new file mode 100644
index 00000000000..d6d00a23be9
--- /dev/null
+++ b/engines/chewy/rooms/room69.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM69_H
+#define CHEWY_ROOMS_ROOM69_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room69 {
+private:
+	static void setup_func();
+
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void look_schild();
+	static int16 use_bruecke();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
new file mode 100644
index 00000000000..7aae49c99a7
--- /dev/null
+++ b/engines/chewy/rooms/room70.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room70.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room70::entry() {
+}
+
+void Room70::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room70.h b/engines/chewy/rooms/room70.h
new file mode 100644
index 00000000000..811545b5c7e
--- /dev/null
+++ b/engines/chewy/rooms/room70.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM70_H
+#define CHEWY_ROOMS_ROOM70_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room70 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
new file mode 100644
index 00000000000..7c1b21cf9d7
--- /dev/null
+++ b/engines/chewy/rooms/room71.cpp
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room71.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room71::entry() {
+}
+
+void Room71::xit(int16 eib_nr) {
+}
+
+int Room71::proc1() {
+	return 0;
+}
+
+int Room71::proc6() {
+	return 0;
+}
+
+void Room71::proc7() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room71.h b/engines/chewy/rooms/room71.h
new file mode 100644
index 00000000000..4738209afc4
--- /dev/null
+++ b/engines/chewy/rooms/room71.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM71_H
+#define CHEWY_ROOMS_ROOM71_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room71 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int proc1();
+	static int proc6();
+	static void proc7();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
new file mode 100644
index 00000000000..6fc9f368ed9
--- /dev/null
+++ b/engines/chewy/rooms/room72.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room72.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room72::entry() {
+}
+
+void Room72::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room72.h b/engines/chewy/rooms/room72.h
new file mode 100644
index 00000000000..339748d12af
--- /dev/null
+++ b/engines/chewy/rooms/room72.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM72_H
+#define CHEWY_ROOMS_ROOM72_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room72 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
new file mode 100644
index 00000000000..7ec86ee0188
--- /dev/null
+++ b/engines/chewy/rooms/room73.cpp
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room73.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room73::entry() {
+}
+
+void Room73::xit(int16 eib_nr) {
+}
+
+int Room73::proc1() {
+	return 0;
+}
+
+int Room73::proc2() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room73.h b/engines/chewy/rooms/room73.h
new file mode 100644
index 00000000000..23aab00569f
--- /dev/null
+++ b/engines/chewy/rooms/room73.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM73_H
+#define CHEWY_ROOMS_ROOM73_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room73 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int proc1();
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
new file mode 100644
index 00000000000..d2d0fce33bc
--- /dev/null
+++ b/engines/chewy/rooms/room74.cpp
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room74.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room74::entry() {
+}
+
+void Room74::xit(int16 eib_nr) {
+}
+
+int Room74::proc1() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room74.h b/engines/chewy/rooms/room74.h
new file mode 100644
index 00000000000..46625c1cb1e
--- /dev/null
+++ b/engines/chewy/rooms/room74.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM74_H
+#define CHEWY_ROOMS_ROOM74_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room74 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int proc1();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
new file mode 100644
index 00000000000..281c8388d01
--- /dev/null
+++ b/engines/chewy/rooms/room75.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room75.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room75::entry() {
+}
+
+void Room75::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room75.h b/engines/chewy/rooms/room75.h
new file mode 100644
index 00000000000..aed26b2ed3b
--- /dev/null
+++ b/engines/chewy/rooms/room75.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM75_H
+#define CHEWY_ROOMS_ROOM75_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room75 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
new file mode 100644
index 00000000000..c969cfbeb57
--- /dev/null
+++ b/engines/chewy/rooms/room76.cpp
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room76.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room76::entry() {
+}
+
+void Room76::xit() {
+}
+
+void Room76::talk1() {
+}
+
+void Room76::talk2() {
+}
+
+int Room76::proc6() {
+	return 0;
+}
+
+int Room76::proc7() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room76.h b/engines/chewy/rooms/room76.h
new file mode 100644
index 00000000000..c041c4c3ae0
--- /dev/null
+++ b/engines/chewy/rooms/room76.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM76_H
+#define CHEWY_ROOMS_ROOM76_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room76 {
+public:
+	static void entry();
+	static void xit();
+	static void talk1();
+	static void talk2();
+	static int proc6();
+	static int proc7();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
new file mode 100644
index 00000000000..2b9b4607d12
--- /dev/null
+++ b/engines/chewy/rooms/room77.cpp
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room77.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room77::entry() {
+}
+
+void Room77::xit() {
+}
+
+int Room77::proc1() {
+	return 0;
+}
+
+int Room77::proc2() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room77.h b/engines/chewy/rooms/room77.h
new file mode 100644
index 00000000000..d82ff1fdfbc
--- /dev/null
+++ b/engines/chewy/rooms/room77.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM77_H
+#define CHEWY_ROOMS_ROOM77_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room77 {
+public:
+	static void entry();
+	static void xit();
+	static int proc1();
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
new file mode 100644
index 00000000000..97ed49aeb92
--- /dev/null
+++ b/engines/chewy/rooms/room78.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room78.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room78::entry() {
+}
+
+void Room78::xit() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room78.h b/engines/chewy/rooms/room78.h
new file mode 100644
index 00000000000..f1b3e437975
--- /dev/null
+++ b/engines/chewy/rooms/room78.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM78_H
+#define CHEWY_ROOMS_ROOM78_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room78 {
+public:
+	static void entry();
+	static void xit();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
new file mode 100644
index 00000000000..4d7e15844d3
--- /dev/null
+++ b/engines/chewy/rooms/room79.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room79.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room79::entry() {
+}
+
+void Room79::xit() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room79.h b/engines/chewy/rooms/room79.h
new file mode 100644
index 00000000000..3514237d159
--- /dev/null
+++ b/engines/chewy/rooms/room79.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM79_H
+#define CHEWY_ROOMS_ROOM79_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room79 {
+public:
+	static void entry();
+	static void xit();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
new file mode 100644
index 00000000000..734a7ba6cc4
--- /dev/null
+++ b/engines/chewy/rooms/room80.cpp
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room80.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room80::entry() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room80.h b/engines/chewy/rooms/room80.h
new file mode 100644
index 00000000000..527d2d32f77
--- /dev/null
+++ b/engines/chewy/rooms/room80.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM80_H
+#define CHEWY_ROOMS_ROOM80_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room80 {
+public:
+	static void entry();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
new file mode 100644
index 00000000000..c17cae13b1e
--- /dev/null
+++ b/engines/chewy/rooms/room81.cpp
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room81.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room81::entry() {
+}
+
+void Room81::xit(int16 eib_nr) {
+}
+
+void Room81::proc1() {
+}
+
+int Room81::proc2() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room81.h b/engines/chewy/rooms/room81.h
new file mode 100644
index 00000000000..3bf901bb7f7
--- /dev/null
+++ b/engines/chewy/rooms/room81.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM81_H
+#define CHEWY_ROOMS_ROOM81_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room81 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static void proc1();
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
new file mode 100644
index 00000000000..e1720297ed5
--- /dev/null
+++ b/engines/chewy/rooms/room82.cpp
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room82.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room82::entry() {
+}
+
+void Room82::xit(int16 eib_nr) {
+}
+
+void Room82::talk1() {
+}
+
+void Room82::talk2() {
+}
+
+void Room82::talk3() {
+}
+
+int Room82::proc3() {
+	return 0;
+}
+
+int Room82::proc6() {
+	return 0;
+}
+
+void Room82::proc8() {
+}
+
+int Room82::proc9() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room82.h b/engines/chewy/rooms/room82.h
new file mode 100644
index 00000000000..96c3c3acd17
--- /dev/null
+++ b/engines/chewy/rooms/room82.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM82_H
+#define CHEWY_ROOMS_ROOM82_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room82 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static void talk1();
+	static void talk2();
+	static void talk3();
+	static int proc3();
+	static int proc6();
+	static void proc8();
+	static int proc9();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room83.cpp b/engines/chewy/rooms/room83.cpp
new file mode 100644
index 00000000000..715826a7ec4
--- /dev/null
+++ b/engines/chewy/rooms/room83.cpp
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room83.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room83::entry() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room83.h b/engines/chewy/rooms/room83.h
new file mode 100644
index 00000000000..30f95731541
--- /dev/null
+++ b/engines/chewy/rooms/room83.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM83_H
+#define CHEWY_ROOMS_ROOM83_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room83 {
+public:
+	static void entry();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
new file mode 100644
index 00000000000..9b8a265cd66
--- /dev/null
+++ b/engines/chewy/rooms/room84.cpp
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room84.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room84::entry() {
+}
+
+void Room84::xit(int16 eib_nr) {
+}
+
+void Room84::talk1() {
+}
+
+void Room84::talk2() {
+}
+
+int Room84::proc4() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room84.h b/engines/chewy/rooms/room84.h
new file mode 100644
index 00000000000..108e71373c1
--- /dev/null
+++ b/engines/chewy/rooms/room84.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM84_H
+#define CHEWY_ROOMS_ROOM84_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room84 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static void talk1();
+	static void talk2();
+	static int proc4();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
new file mode 100644
index 00000000000..216b146fe64
--- /dev/null
+++ b/engines/chewy/rooms/room85.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room85.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room85::entry(int16 eib_nr) {
+}
+
+void Room85::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room85.h b/engines/chewy/rooms/room85.h
new file mode 100644
index 00000000000..e837c9d0ef5
--- /dev/null
+++ b/engines/chewy/rooms/room85.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM85_H
+#define CHEWY_ROOMS_ROOM85_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room85 {
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
new file mode 100644
index 00000000000..fa51c67f047
--- /dev/null
+++ b/engines/chewy/rooms/room86.cpp
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room86.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room86::entry(int16 eib_nr) {
+}
+
+void Room86::xit(int16 eib_nr) {
+}
+
+int Room86::proc2() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room86.h b/engines/chewy/rooms/room86.h
new file mode 100644
index 00000000000..cbb1c99e1dc
--- /dev/null
+++ b/engines/chewy/rooms/room86.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM86_H
+#define CHEWY_ROOMS_ROOM86_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room86 {
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
new file mode 100644
index 00000000000..33d9af9183f
--- /dev/null
+++ b/engines/chewy/rooms/room87.cpp
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room87.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room87::entry() {
+}
+
+void Room87::xit(int16 eib_nr) {
+}
+
+int Room87::proc2() {
+	return 0;
+}
+
+int Room87::proc4() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room87.h b/engines/chewy/rooms/room87.h
new file mode 100644
index 00000000000..deb52ea8aa7
--- /dev/null
+++ b/engines/chewy/rooms/room87.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM87_H
+#define CHEWY_ROOMS_ROOM87_H
+
+#include "common/scummsys.h"
+
+namespace Chewy {
+namespace Rooms {
+
+class Room87 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+	static int proc2();
+	static int proc4();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
new file mode 100644
index 00000000000..2994fbfe5f3
--- /dev/null
+++ b/engines/chewy/rooms/room88.cpp
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room88.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room88::entry() {
+}
+
+void Room88::xit() {
+}
+
+int Room88::proc1() {
+	return 0;
+}
+
+int Room88::proc2() {
+	return 0;
+}
+
+int Room88::proc3() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room88.h b/engines/chewy/rooms/room88.h
new file mode 100644
index 00000000000..a967e9931dd
--- /dev/null
+++ b/engines/chewy/rooms/room88.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM88_H
+#define CHEWY_ROOMS_ROOM88_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room88 {
+public:
+	static void entry();
+	static void xit();
+	static int proc1();
+	static int proc2();
+	static int proc3();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
new file mode 100644
index 00000000000..55bde1abfd5
--- /dev/null
+++ b/engines/chewy/rooms/room89.cpp
@@ -0,0 +1,58 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room89.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room89::entry() {
+}
+
+void Room89::xit() {
+}
+
+void Room89::talk1() {
+}
+
+int Room89::proc2() {
+	return 0;
+}
+
+int Room89::proc3() {
+	return 0;
+}
+
+int Room89::proc4() {
+	return 0;
+}
+
+int Room89::proc5() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room89.h b/engines/chewy/rooms/room89.h
new file mode 100644
index 00000000000..8e500c9ce18
--- /dev/null
+++ b/engines/chewy/rooms/room89.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM89_H
+#define CHEWY_ROOMS_ROOM89_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room89 {
+public:
+	static void entry();
+	static void xit();
+	static void talk1();
+	static int proc2();
+	static int proc3();
+	static int proc4();
+	static int proc5();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
new file mode 100644
index 00000000000..76edf3b163a
--- /dev/null
+++ b/engines/chewy/rooms/room90.cpp
@@ -0,0 +1,54 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room90.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room90::entry(int16 eib_nr) {
+}
+
+void Room90::xit(int16 eib_nr) {
+}
+
+void Room90::proc2() {
+}
+
+int Room90::proc3() {
+	return 0;
+}
+
+int Room90::proc4() {
+	return 0;
+}
+
+int Room90::proc6() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room90.h b/engines/chewy/rooms/room90.h
new file mode 100644
index 00000000000..3ee1974cdda
--- /dev/null
+++ b/engines/chewy/rooms/room90.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM90_H
+#define CHEWY_ROOMS_ROOM90_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room90 {
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static void proc2();
+	static int proc3();
+	static int proc4();
+	static int proc6();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
new file mode 100644
index 00000000000..4f9a6b21c73
--- /dev/null
+++ b/engines/chewy/rooms/room91.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room91.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room91::entry() {
+}
+
+void Room91::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room91.h b/engines/chewy/rooms/room91.h
new file mode 100644
index 00000000000..982d3919f09
--- /dev/null
+++ b/engines/chewy/rooms/room91.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM91_H
+#define CHEWY_ROOMS_ROOM91_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room91 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
new file mode 100644
index 00000000000..3bfda28b708
--- /dev/null
+++ b/engines/chewy/rooms/room92.cpp
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room92.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room92::entry() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room92.h b/engines/chewy/rooms/room92.h
new file mode 100644
index 00000000000..6daa266ab42
--- /dev/null
+++ b/engines/chewy/rooms/room92.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM92_H
+#define CHEWY_ROOMS_ROOM92_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room92 {
+public:
+	static void entry();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
new file mode 100644
index 00000000000..f78bdb3dc1d
--- /dev/null
+++ b/engines/chewy/rooms/room93.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room93.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room93::entry() {
+}
+
+void Room93::xit() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room93.h b/engines/chewy/rooms/room93.h
new file mode 100644
index 00000000000..6d71c43039f
--- /dev/null
+++ b/engines/chewy/rooms/room93.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM93_H
+#define CHEWY_ROOMS_ROOM93_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room93 {
+public:
+	static void entry();
+	static void xit();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
new file mode 100644
index 00000000000..e60f5c42b2b
--- /dev/null
+++ b/engines/chewy/rooms/room94.cpp
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room94.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room94::entry() {
+}
+
+void Room94::xit() {
+}
+
+void Room94::talk1() {
+}
+
+int Room94::proc3() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room94.h b/engines/chewy/rooms/room94.h
new file mode 100644
index 00000000000..49dad9d62cb
--- /dev/null
+++ b/engines/chewy/rooms/room94.h
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM94_H
+#define CHEWY_ROOMS_ROOM94_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room94 {
+public:
+	static void entry();
+	static void xit();
+	static void talk1();
+	static int proc3();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
new file mode 100644
index 00000000000..8fb83e53108
--- /dev/null
+++ b/engines/chewy/rooms/room95.cpp
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room95.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room95::entry(int16 eib_nr) {
+}
+
+void Room95::xit(int16 eib_nr) {
+}
+
+int Room95::proc2() {
+	return 0;
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room95.h b/engines/chewy/rooms/room95.h
new file mode 100644
index 00000000000..5a6aa41127d
--- /dev/null
+++ b/engines/chewy/rooms/room95.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM95_H
+#define CHEWY_ROOMS_ROOM95_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room95 {
+public:
+	static void entry(int16 eib_nr);
+	static void xit(int16 eib_nr);
+	static int proc2();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
new file mode 100644
index 00000000000..467db055f41
--- /dev/null
+++ b/engines/chewy/rooms/room96.cpp
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room96.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room96::entry() {
+}
+
+void Room96::xit(int16 eib_nr) {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room96.h b/engines/chewy/rooms/room96.h
new file mode 100644
index 00000000000..f4f40a0e363
--- /dev/null
+++ b/engines/chewy/rooms/room96.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM96_H
+#define CHEWY_ROOMS_ROOM96_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room96 {
+public:
+	static void entry();
+	static void xit(int16 eib_nr);
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
new file mode 100644
index 00000000000..c0df5ed5e9f
--- /dev/null
+++ b/engines/chewy/rooms/room97.cpp
@@ -0,0 +1,89 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
+#include "chewy/room.h"
+#include "chewy/rooms/room97.h"
+
+namespace Chewy {
+namespace Rooms {
+
+void Room97::entry() {
+}
+
+void Room97::xit() {
+}
+
+void Room97::proc2() {
+}
+
+void Room97::proc3() {
+}
+
+void Room97::proc4() {
+}
+
+int Room97::proc5() {
+	return 0;
+}
+
+int Room97::proc6() {
+	return 0;
+}
+
+int Room97::proc7() {
+	return 0;
+}
+
+int Room97::proc8() {
+	return 0;
+}
+
+int Room97::proc9() {
+	return 0;
+}
+
+int Room97::proc10() {
+	return 0;
+}
+
+int Room97::proc11() {
+	return 0;
+}
+
+void Room97::proc12() {
+}
+
+void Room97::proc13() {
+}
+
+int Room97::proc14() {
+	return 0;
+}
+
+void Room97::proc15() {
+}
+
+} // namespace Rooms
+} // namespace Chewy
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
new file mode 100644
index 00000000000..d14f097d517
--- /dev/null
+++ b/engines/chewy/rooms/room97.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_ROOMS_ROOM97_H
+#define CHEWY_ROOMS_ROOM97_H
+
+namespace Chewy {
+namespace Rooms {
+
+class Room97 {
+public:
+	static void entry();
+	static void xit();
+	static void proc2();
+	static void proc3();
+	static void proc4();
+	static int proc5();
+	static int proc6();
+	static int proc7();
+	static int proc8();
+	static int proc9();
+	static int proc10();
+	static int proc11();
+	static void proc12();
+	static void proc13();
+	static int proc14();
+	static void proc15();
+};
+
+} // namespace Rooms
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index c828c1e7965..1667bfeb1a7 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -85,13 +85,34 @@
 #include "chewy/rooms/room67.h"
 #include "chewy/rooms/room68.h"
 #include "chewy/rooms/room69.h"
-
-// TODO: Remove one room classes implemented and split up
-#include "chewy/episode1.h"
-#include "chewy/episode2.h"
-#include "chewy/episode3.h"
-#include "chewy/episode4.h"
-#include "chewy/episode5.h"
+#include "chewy/rooms/room70.h"
+#include "chewy/rooms/room71.h"
+#include "chewy/rooms/room72.h"
+#include "chewy/rooms/room73.h"
+#include "chewy/rooms/room74.h"
+#include "chewy/rooms/room75.h"
+#include "chewy/rooms/room76.h"
+#include "chewy/rooms/room77.h"
+#include "chewy/rooms/room78.h"
+#include "chewy/rooms/room79.h"
+#include "chewy/rooms/room80.h"
+#include "chewy/rooms/room81.h"
+#include "chewy/rooms/room82.h"
+#include "chewy/rooms/room83.h"
+#include "chewy/rooms/room84.h"
+#include "chewy/rooms/room85.h"
+#include "chewy/rooms/room86.h"
+#include "chewy/rooms/room87.h"
+#include "chewy/rooms/room88.h"
+#include "chewy/rooms/room89.h"
+#include "chewy/rooms/room90.h"
+#include "chewy/rooms/room91.h"
+#include "chewy/rooms/room92.h"
+#include "chewy/rooms/room93.h"
+#include "chewy/rooms/room94.h"
+#include "chewy/rooms/room95.h"
+#include "chewy/rooms/room96.h"
+#include "chewy/rooms/room97.h"
 
 namespace Chewy {
 
@@ -158,6 +179,34 @@ using Chewy::Rooms::Room66;
 using Chewy::Rooms::Room67;
 using Chewy::Rooms::Room68;
 using Chewy::Rooms::Room69;
+using Chewy::Rooms::Room70;
+using Chewy::Rooms::Room71;
+using Chewy::Rooms::Room72;
+using Chewy::Rooms::Room73;
+using Chewy::Rooms::Room74;
+using Chewy::Rooms::Room75;
+using Chewy::Rooms::Room76;
+using Chewy::Rooms::Room77;
+using Chewy::Rooms::Room78;
+using Chewy::Rooms::Room79;
+using Chewy::Rooms::Room80;
+using Chewy::Rooms::Room81;
+using Chewy::Rooms::Room82;
+using Chewy::Rooms::Room83;
+using Chewy::Rooms::Room84;
+using Chewy::Rooms::Room85;
+using Chewy::Rooms::Room86;
+using Chewy::Rooms::Room87;
+using Chewy::Rooms::Room88;
+using Chewy::Rooms::Room89;
+using Chewy::Rooms::Room90;
+using Chewy::Rooms::Room91;
+using Chewy::Rooms::Room92;
+using Chewy::Rooms::Room93;
+using Chewy::Rooms::Room94;
+using Chewy::Rooms::Room95;
+using Chewy::Rooms::Room96;
+using Chewy::Rooms::Room97;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 090f28bd09a..68002df52ca 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -604,159 +604,159 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 430:
-						action_ret = r73_proc1();
+						action_ret = Room73::proc1();
 						break;
 
 					case 433:
-						action_ret = r73_proc2();
+						action_ret = Room73::proc2();
 						break;
 
 					case 435:
-						action_ret = r74_proc1();
+						action_ret = Room74::proc1();
 						break;
 
 					case 442:
-						action_ret = r77_proc1();
+						action_ret = Room77::proc1();
 						break;
 
 					case 443:
-						action_ret = r71_proc6();
+						action_ret = Room71::proc6();
 						break;
 
 					case 450:
-						action_ret = r76_proc6();
+						action_ret = Room76::proc6();
 						break;
 
 					case 452:
-						action_ret = r76_proc7();
+						action_ret = Room76::proc7();
 						break;
 
 					case 463:
-						action_ret = r77_proc1();
+						action_ret = Room77::proc1();
 						break;
 
 					case 464:
-						action_ret = r77_proc2();
+						action_ret = Room77::proc2();
 						break;
 
 					case 467:
 					case 473:
-						action_ret = r82_proc9();
+						action_ret = Room82::proc9();
 						break;
 
 					case 468:
-						action_ret = r82_proc6();
+						action_ret = Room82::proc6();
 						break;
 
 					case 471:
-						action_ret = r82_proc3();
+						action_ret = Room82::proc3();
 						break;
 
 
 					case 481:
 					case 482:
-						action_ret = r84_proc4();
+						action_ret = Room84::proc4();
 						break;
 
 					case 487:
-						r81_proc1();
+						Room81::proc1();
 						break;
 
 					case 490:
-						action_ret = r81_proc2();
+						action_ret = Room81::proc2();
 						break;
 
 					case 492:
-						action_ret = r88_proc2();
+						action_ret = Room88::proc2();
 						break;
 
 					case 493:
-						action_ret = r88_proc3();
+						action_ret = Room88::proc3();
 						break;
 
 					case 494:
-						action_ret = r88_proc1();
+						action_ret = Room88::proc1();
 						break;
 
 					case 495:
-						action_ret = r88_proc2();
+						action_ret = Room88::proc2();
 						break;
 
 					case 497:
-						action_ret = r86_proc2();
+						action_ret = Room86::proc2();
 						break;
 
 					case 501:
 					case 503:
-						action_ret = r87_proc2();
+						action_ret = Room87::proc2();
 						break;
 
 					case 502:
-						action_ret = r87_proc4();
+						action_ret = Room87::proc4();
 						break;
 
 					case 508:
-						action_ret = r89_proc2();
+						action_ret = Room89::proc2();
 						break;
 
 					case 509:
-						action_ret = r89_proc5();
+						action_ret = Room89::proc5();
 						break;
 
 					case 514:
-						action_ret = r89_proc4();
+						action_ret = Room89::proc4();
 						break;
 
 					case 517:
-						action_ret = r90_proc3();
+						action_ret = Room90::proc3();
 						break;
 
 					case 519:
-						action_ret = r90_proc4();
+						action_ret = Room90::proc4();
 						break;
 
 					case 520:
-						action_ret = r90_proc6();
+						action_ret = Room90::proc6();
 						break;
 
 					case 522:
-						action_ret = r94_proc3();
+						action_ret = Room94::proc3();
 						break;
 
 					case 525:
-						action_ret = r95_proc2();
+						action_ret = Room95::proc2();
 						break;
 
 					case 530:
-						action_ret = r97_proc8();
+						action_ret = Room97::proc8();
 						break;
 
 					case 531:
-						action_ret = r97_proc6();
+						action_ret = Room97::proc6();
 						break;
 
 					case 535:
-						action_ret = r97_proc11();
+						action_ret = Room97::proc11();
 						break;
 
 					case 538:
-						action_ret = r97_proc7();
+						action_ret = Room97::proc7();
 						break;
 
 					case 539:
-						action_ret = r97_proc9();
+						action_ret = Room97::proc9();
 						break;
 
 					case 541:
-						action_ret = r97_proc14();
+						action_ret = Room97::proc14();
 						break;
 
 					case 542:
-						action_ret = r97_proc5();
+						action_ret = Room97::proc5();
 						break;
 
 					case 543:
-						action_ret = r97_proc10();
+						action_ret = Room97::proc10();
 						break;
 
 					default:
@@ -808,7 +808,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 487:
 					case 489:
-						r81_proc1();
+						Room81::proc1();
 						break;
 						
 					default:
@@ -965,31 +965,31 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 447:
 					case 448:
-						r76_talk1();
+						Room76::talk1();
 						break;
 
 					case 458:
-						r76_talk2();
+						Room76::talk2();
 						break;
 
 					case 468:
-						r82_talk1();
+						Room82::talk1();
 						break;
 
 					case 469:
-						r82_talk2();
+						Room82::talk2();
 						break;
 
 					case 471:
-						r82_talk3();
+						Room82::talk3();
 						break;
 
 					case 478:
-						r84_talk1();
+						Room84::talk1();
 						break;
 
 					case 504:
-						r84_talk2();
+						Room84::talk2();
 						break;
 
 					case 505:
@@ -1001,11 +1001,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 512:
-						r89_talk1();
+						Room89::talk1();
 						break;
 
 					case 522:
-						r94_talk1();
+						Room94::talk1();
 						break;
 
 					default:
@@ -2393,7 +2393,7 @@ int16 calc_person_click(int16 p_nr) {
 			break;
 
 		case 112:
-			r90_proc2();
+			Room90::proc2();
 			action_ret = true;
 			break;
 
@@ -2530,7 +2530,7 @@ void calc_person_dia(int16 p_nr) {
 			else if (_G(spieler).flags30_10)
 				_G(spieler).PersonDia[p_nr] = 533;
 			else
-				r82_proc8();
+				Room82::proc8();
 			break;
 
 		case 53:
@@ -2571,7 +2571,7 @@ void calc_person_dia(int16 p_nr) {
 		case 59:
 			if (p_nr == P_NICHELLE) {
 				if (!_G(spieler).flags28_4) {
-					r71_proc7();
+					Room71::proc7();
 					_G(spieler).PersonDia[p_nr] = -1;
 				}
 			} else if (!_G(spieler).flags28_4) {


Commit: f3797cb5583e5b74017fc5fcb7dff326c2b4291e
    https://github.com/scummvm/scummvm/commit/f3797cb5583e5b74017fc5fcb7dff326c2b4291e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:23-08:00

Commit Message:
CHEWY: Remove deprecated episode files

Changed paths:
  R engines/chewy/episode1.cpp
  R engines/chewy/episode1.h
  R engines/chewy/episode2.cpp
  R engines/chewy/episode2.h
  R engines/chewy/episode3.cpp
  R engines/chewy/episode3.h
  R engines/chewy/episode4.cpp
  R engines/chewy/episode4.h
  R engines/chewy/episode5.cpp
  R engines/chewy/episode5.h
    engines/chewy/global.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/roomdefs.cpp


diff --git a/engines/chewy/episode1.cpp b/engines/chewy/episode1.cpp
deleted file mode 100644
index fc9427b52c3..00000000000
--- a/engines/chewy/episode1.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/events.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/episode1.h"
-#include "chewy/rooms/rooms.h"
-
-namespace Chewy {
-
-int16 e_streifen;
-
-void load_chewy_taf(int16 taf_nr) {
-	taf_dateiheader *tafheader;
-	const char *fname_;
-	if (AkChewyTaf != taf_nr) {
-		if (chewy) {
-			free((char *)chewy);
-			chewy = nullptr;
-		}
-		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
-		switch (taf_nr) {
-		case CHEWY_NORMAL:
-			fname_ = CHEWY_TAF;
-			chewy_ph_anz = chewy_phasen_anz;
-			chewy_ph = (uint8 *)chewy_phasen;
-			break;
-
-		case CHEWY_BORK:
-			fname_ = CHEWY_BO_TAF;
-			chewy_ph_anz = chewy_bo_phasen_anz;
-			chewy_ph = (uint8 *)chewy_bo_phasen;
-			break;
-
-		case CHEWY_MINI:
-			fname_ = CHEWY_MI_TAF;
-			chewy_ph_anz = chewy_mi_phasen_anz;
-			chewy_ph = (uint8 *)chewy_mi_phasen;
-			break;
-
-		case CHEWY_PUMPKIN:
-			fname_ = CHEWY_PUMP_TAF;
-			chewy_ph_anz = chewy_mi_phasen_anz;
-			chewy_ph = (uint8 *)chewy_mi_phasen;
-			break;
-
-		case CHEWY_ROCKER:
-			fname_ = CHEWY_ROCK_TAF;
-			chewy_ph_anz = chewy_ro_phasen_anz;
-			chewy_ph = (uint8 *)chewy_ro_phasen;
-			break;
-
-		case CHEWY_JMANS:
-			fname_ = CHEWY_JMAN_TAF;
-			chewy_ph_anz = chewy_ro_phasen_anz;
-			chewy_ph = (uint8 *)chewy_jm_phasen;
-			spieler_mi[P_CHEWY].HotY = 68;
-			break;
-
-		default:
-			fname_ = NULL;
-			break;
-
-		}
-		if (fname_ != NULL) {
-			_G(spieler).ChewyAni = taf_nr;
-			AkChewyTaf = taf_nr;
-			chewy = mem->taf_adr(fname_);
-			ERROR
-			mem->file->get_tafinfo(fname_, &tafheader);
-			if (!modul) {
-				chewy_kor = chewy->korrektur;
-			} else {
-				error();
-			}
-		}
-	}
-}
-
-void switch_room(int16 nr) {
-	fx_blend = BLEND1;
-	exit_room(-1);
-	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
-
-	enter_room(-1);
-	set_up_screen(DO_SETUP);
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/episode1.h b/engines/chewy/episode1.h
deleted file mode 100644
index 12e79127692..00000000000
--- a/engines/chewy/episode1.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EPISODE1_H
-#define CHEWY_EPISODE1_H
-
-namespace Chewy {
-
-void switch_room(int16 nr);
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/episode2.cpp b/engines/chewy/episode2.cpp
deleted file mode 100644
index 3eb14c9a552..00000000000
--- a/engines/chewy/episode2.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/episode2.h"
-#include "chewy/rooms/rooms.h"
-
-namespace Chewy {
-
-void calc_person_look() {
-	int16 i;
-	for (i = 1; i < MAX_PERSON; i++) {
-		if (spieler_mi[i].Id != NO_MOV_OBJ) {
-
-			if (spieler_vector[i].Xypos[0] > spieler_vector[P_CHEWY].Xypos[0])
-				person_end_phase[i] = P_LEFT;
-			else
-				person_end_phase[i] = P_RIGHT;
-		}
-	}
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/episode2.h b/engines/chewy/episode2.h
deleted file mode 100644
index d79d61e4bd7..00000000000
--- a/engines/chewy/episode2.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EPISODE2_H
-#define CHEWY_EPISODE2_H
-
-namespace Chewy {
-
-void switch_room(int16 nr);
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/episode3.cpp b/engines/chewy/episode3.cpp
deleted file mode 100644
index 8b92ed1911a..00000000000
--- a/engines/chewy/episode3.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/episode3.h"
-
-namespace Chewy {
-
-} // namespace Chewy
diff --git a/engines/chewy/episode3.h b/engines/chewy/episode3.h
deleted file mode 100644
index e77a074c17d..00000000000
--- a/engines/chewy/episode3.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EPISODE3_H
-#define CHEWY_EPISODE3_H
-
-namespace Chewy {
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/episode4.cpp b/engines/chewy/episode4.cpp
deleted file mode 100644
index 20d66593959..00000000000
--- a/engines/chewy/episode4.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/episode4.h"
-
-namespace Chewy {
-
-} // namespace Chewy
diff --git a/engines/chewy/episode4.h b/engines/chewy/episode4.h
deleted file mode 100644
index 071afece82c..00000000000
--- a/engines/chewy/episode4.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EPISODE4_H
-#define CHEWY_EPISODE4_H
-
-namespace Chewy {
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/episode5.cpp b/engines/chewy/episode5.cpp
deleted file mode 100644
index b6533a11640..00000000000
--- a/engines/chewy/episode5.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/episode5.h"
-
-namespace Chewy {
-
-} // namespace Chewy
diff --git a/engines/chewy/episode5.h b/engines/chewy/episode5.h
deleted file mode 100644
index ffb07cfb188..00000000000
--- a/engines/chewy/episode5.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_EPISODE5_H
-#define CHEWY_EPISODE5_H
-
-namespace Chewy {
-
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index ac1b83b1a28..90f1b21da65 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -421,9 +421,6 @@ void ads_menu();
 
 void stop_ads_dialog();
 
-void calc_person_look();
-void switch_room(int16 nr);
-
 void play_scene_ani(int16 nr, int16 mode);
 
 void timer_action(int16 t_nr);
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 691d5b29fe7..c25a3b02b42 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -12,11 +12,6 @@ MODULE_OBJS = \
 	debugger.o \
 	detail.o \
 	effect.o \
-	episode1.o \
-	episode2.o \
-	episode3.o \
-	episode4.o \
-	episode5.o \
 	events.o \
 	events_base.o \
 	fehler.o \
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2739c228162..7c06234f806 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -25,11 +25,6 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/rooms.h"
-#include "chewy/episode1.h"
-#include "chewy/episode2.h"
-#include "chewy/episode3.h"
-#include "chewy/episode4.h"
-#include "chewy/episode5.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 872c64ae8a1..1e22c925375 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -458,4 +458,97 @@ Stream *Room::get_sound_handle() {
 		roomhandle[R_VOCDATEI];
 }
 
+
+void load_chewy_taf(int16 taf_nr) {
+	taf_dateiheader *tafheader;
+	const char *fname_;
+	if (AkChewyTaf != taf_nr) {
+		if (chewy) {
+			free((char *)chewy);
+			chewy = nullptr;
+		}
+		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
+		switch (taf_nr) {
+		case CHEWY_NORMAL:
+			fname_ = CHEWY_TAF;
+			chewy_ph_anz = chewy_phasen_anz;
+			chewy_ph = (uint8 *)chewy_phasen;
+			break;
+
+		case CHEWY_BORK:
+			fname_ = CHEWY_BO_TAF;
+			chewy_ph_anz = chewy_bo_phasen_anz;
+			chewy_ph = (uint8 *)chewy_bo_phasen;
+			break;
+
+		case CHEWY_MINI:
+			fname_ = CHEWY_MI_TAF;
+			chewy_ph_anz = chewy_mi_phasen_anz;
+			chewy_ph = (uint8 *)chewy_mi_phasen;
+			break;
+
+		case CHEWY_PUMPKIN:
+			fname_ = CHEWY_PUMP_TAF;
+			chewy_ph_anz = chewy_mi_phasen_anz;
+			chewy_ph = (uint8 *)chewy_mi_phasen;
+			break;
+
+		case CHEWY_ROCKER:
+			fname_ = CHEWY_ROCK_TAF;
+			chewy_ph_anz = chewy_ro_phasen_anz;
+			chewy_ph = (uint8 *)chewy_ro_phasen;
+			break;
+
+		case CHEWY_JMANS:
+			fname_ = CHEWY_JMAN_TAF;
+			chewy_ph_anz = chewy_ro_phasen_anz;
+			chewy_ph = (uint8 *)chewy_jm_phasen;
+			spieler_mi[P_CHEWY].HotY = 68;
+			break;
+
+		default:
+			fname_ = NULL;
+			break;
+
+		}
+		if (fname_ != NULL) {
+			_G(spieler).ChewyAni = taf_nr;
+			AkChewyTaf = taf_nr;
+			chewy = mem->taf_adr(fname_);
+			ERROR
+
+				mem->file->get_tafinfo(fname_, &tafheader);
+			if (!modul) {
+				chewy_kor = chewy->korrektur;
+			} else {
+				error();
+			}
+		}
+	}
+}
+
+void switch_room(int16 nr) {
+	fx_blend = BLEND1;
+	exit_room(-1);
+	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
+	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	ERROR
+
+		enter_room(-1);
+	set_up_screen(DO_SETUP);
+}
+
+void calc_person_look() {
+	int16 i;
+	for (i = 1; i < MAX_PERSON; i++) {
+		if (spieler_mi[i].Id != NO_MOV_OBJ) {
+
+			if (spieler_vector[i].Xypos[0] > spieler_vector[P_CHEWY].Xypos[0])
+				person_end_phase[i] = P_LEFT;
+			else
+				person_end_phase[i] = P_RIGHT;
+		}
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 3296f6e6940..5fe97209cb1 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -144,6 +144,10 @@ private:
 	Stream *roomhandle[MAX_ROOM_HANDLE];
 };
 
+extern void load_chewy_taf(int16 taf_nr);
+extern void switch_room(int16 nr);
+extern void calc_person_look();
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/rooms/roomdefs.cpp b/engines/chewy/rooms/roomdefs.cpp
index e67a53ac02b..dad0e114e64 100644
--- a/engines/chewy/rooms/roomdefs.cpp
+++ b/engines/chewy/rooms/roomdefs.cpp
@@ -20,6 +20,10 @@
  */
 
 #include "chewy/rooms/roomdefs.h"
+#include "chewy/defines.h"
+#include "chewy/events.h"
+#include "chewy/global.h"
+#include "chewy/ani_dat.h"
 
 namespace Chewy {
 


Commit: 2bba407db09b5a5edae6dba6c4d6117ed6d71939
    https://github.com/scummvm/scummvm/commit/2bba407db09b5a5edae6dba6c4d6117ed6d71939
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:23-08:00

Commit Message:
CHEWY: Merge roomdefs into room

Changed paths:
  R engines/chewy/rooms/roomdefs.cpp
  R engines/chewy/rooms/roomdefs.h
    engines/chewy/module.mk
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room33.cpp


diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index c25a3b02b42..0e6c31f14f6 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -45,7 +45,6 @@ MODULE_OBJS = \
 	timer.o \
 	types.o \
 	video/cfo_decoder.o \
-	rooms/roomdefs.o \
 	rooms/room0.o \
 	rooms/room1.o \
 	rooms/room2.o \
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 1e22c925375..cddb7c66f8d 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -26,6 +26,13 @@
 
 namespace Chewy {
 
+const int16 SURIMY_TAF19_PHASEN[4][2] = {
+	{ 0, 0 },
+	{ 39, 46 },
+	{ 0, 0 },
+	{ 0, 0 }
+};
+
 Room::Room() {
 	int16 i;
 	room_timer.TimerAnz = 0;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 5fe97209cb1..7aaf383315f 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -26,6 +26,12 @@
 
 namespace Chewy {
 
+#define ANI_HIDE 0
+#define ANI_SHOW 1
+#define SURIMY_OBJ 0
+
+extern const int16 SURIMY_TAF19_PHASEN[4][2];
+
 #define MAX_ABLAGE 4
 
 #define ABLAGE_BLOCK_SIZE 64000l
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 3681adc4f23..797bc4cbce1 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room0.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 56af44c8371..08751aee5a9 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room14.h"
 #include "chewy/rooms/room23.h"
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 69db5c1b02c..6b2d84c1e7f 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room18.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index ff123b71444..4a3e5972d8c 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room2.h"
 #include "chewy/rooms/room3.h"
 #include "chewy/rooms/room4.h"
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 952b5291c44..1cc1b817b3e 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room31.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index de0eaea2e50..ec17e58a20f 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/roomdefs.h"
+#include "chewy/room.h"
 #include "chewy/rooms/room33.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/roomdefs.cpp b/engines/chewy/rooms/roomdefs.cpp
deleted file mode 100644
index dad0e114e64..00000000000
--- a/engines/chewy/rooms/roomdefs.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/rooms/roomdefs.h"
-#include "chewy/defines.h"
-#include "chewy/events.h"
-#include "chewy/global.h"
-#include "chewy/ani_dat.h"
-
-namespace Chewy {
-
-const int16 SURIMY_TAF19_PHASEN[4][2] = {
-	{ 0, 0 },
-	{ 39, 46 },
-	{ 0, 0 },
-	{ 0, 0 }
-};
-
-} // namespace Chewy
diff --git a/engines/chewy/rooms/roomdefs.h b/engines/chewy/rooms/roomdefs.h
deleted file mode 100644
index d2a00277c53..00000000000
--- a/engines/chewy/rooms/roomdefs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_ROOMS_ROOMDEFS_H
-#define CHEWY_ROOMS_ROOMDEFS_H
-
-#include "common/scummsys.h"
-
-namespace Chewy {
-
-#define ANI_HIDE 0
-#define ANI_SHOW 1
-
-#define SURIMY_OBJ 0
-
-extern const int16 SURIMY_TAF19_PHASEN[4][2];
-
-} // namespace Chewy
-
-#endif


Commit: af6d8fcc32c87a253b0c701033f9c17727f66a6d
    https://github.com/scummvm/scummvm/commit/af6d8fcc32c87a253b0c701033f9c17727f66a6d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:23-08:00

Commit Message:
CHEWY: Add further credits

Changed paths:
    engines/chewy/credits.pl


diff --git a/engines/chewy/credits.pl b/engines/chewy/credits.pl
index c0d3cb922a6..12801d74e27 100644
--- a/engines/chewy/credits.pl
+++ b/engines/chewy/credits.pl
@@ -1,3 +1,5 @@
 begin_section("Chewy");
 	add_person("Paul Gilbert", "dreammaster", "");
+	add_person("Eugene Sandulenko", "sev", "");
+	add_person("Arnaud Boutonné", "Strangerke", "");
 end_section();


Commit: ed2fb0e96f8b93de855f8c6bdd8ca0d53374ac28
    https://github.com/scummvm/scummvm/commit/ed2fb0e96f8b93de855f8c6bdd8ca0d53374ac28
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:23-08:00

Commit Message:
CHEWY: Added event handling to stop File Menu from freezing

Changed paths:
    engines/chewy/defines.h
    engines/chewy/file.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 510914e7523..0ab5f14ecb1 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -487,7 +487,9 @@ enum SetupScreenMode {
 #define AUSGANG_RECHTS 2
 #define AUSGANG_OBEN 3
 #define AUSGANG_UNTEN 4
-#define WAIT_TASTE_LOS while (in->get_switch_code() != 0);
+#define WAIT_TASTE_LOS while (in->get_switch_code() != 0 \
+	&& !SHOULD_QUIT) { g_events->update(); }
+
 #define FILEMENUE 1
 
 } // namespace Chewy
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index b247eec9931..8b46a8fb853 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -20,20 +20,50 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
 
 namespace Chewy {
 
-int16 file_icons[8 * 4] = { 14, 73, 32, 94,
-                            14, 96, 32, 118,
-                            36, 64, 310, 128,
-                            16, 143, 76, 193,
-                            78, 143, 130, 193,
-                            132, 143, 178, 193,
-                            180, 143, 228, 193,
-                            232, 143, 310, 193
-                          };
+#define SURIMY_START 0
+#define SURIMY_END 7
+#define SCHNULLER 8
+#define SCHNULL_BAND 22
+#define MUND_START 9
+#define MUND_END 11
+#define SCHNULL_OFF 23
+#define TDISP_START 12
+#define TDISP_END 19
+#define TDISP_EIN 20
+#define TDISP_AUS 21
+#define MUSIC_OFF 24
+#define MUSIC_ON1 25
+#define MUSIC_ON2 26
+#define EXIT 27
+
+const int16 OPTION_ICONS[9 * 4] = {
+	 18,   61,   40,   76,
+	112,   61,  130,   76,
+	 82,  104,  144,  139,
+	164,   93,  194,  115,
+	198,   80,  206,  115,
+	210,   55,  302,  138,
+	126,  146,  210,  198,
+	 22,   92,   44,  136,
+	 50,   92,   72,  136
+};
+
+static const int16 FILE_ICONS[8 * 4] = {
+	14, 73, 32, 94,
+	14, 96, 32, 118,
+	36, 64, 310, 128,
+	16, 143, 76, 193,
+	78, 143, 130, 193,
+	132, 143, 178, 193,
+	180, 143, 228, 193,
+	232, 143, 310, 193
+};
 
 Common::File *File::open(const char *name) {
 	Common::File *f = new Common::File();
@@ -167,8 +197,7 @@ int16 file_menue() {
 			if (mode[2] || mode [3] || mode[8]) {
 				tmp = fnames + (text_off * 40);
 				for (i = 0; i < 6; i++) {
-					if (tmp != 0)
-					{
+					if (tmp != 0) {
 						if (i != active_slot) {
 							out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
 							out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
@@ -219,7 +248,7 @@ int16 file_menue() {
 			}
 			if ((minfo.button == 1) || (key == ENTER)) {
 				WAIT_TASTE_LOS
-				rect = in->maus_vector(minfo.x, minfo.y, file_icons, 8);
+				rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
 				key = 0;
 				switch (rect) {
 				case 0:
@@ -355,9 +384,12 @@ int16 file_menue() {
 			}
 			cur->plot_cur();
 			out->back2screen(workpage);
+
+			EVENTS_UPDATE;
+			SHOULD_QUIT_RETURN0;
 		}
 	}
-	free((char *)ti);
+	free(ti);
 
 	room->open_handle(&background[0], "rb", R_TGPDATEI);
 	ERROR
@@ -374,33 +406,6 @@ int16 file_menue() {
 	return ret;
 }
 
-const int16 OPTION_ICONS[9 * 4] = {
-	 18,   61,   40,   76,
-	112,   61,  130,   76,
-	 82,  104,  144,  139,
-	164,   93,  194,  115,
-	198,   80,  206,  115,
-	210,   55,  302,  138,
-	126,  146,  210,  198,
-	 22,   92,   44,  136,
-	 50,   92,   72,  136
-};
-
-#define SURIMY_START 0
-#define SURIMY_END 7
-#define SCHNULLER 8
-#define SCHNULL_BAND 22
-#define MUND_START 9
-#define MUND_END 11
-#define SCHNULL_OFF 23
-#define TDISP_START 12
-#define TDISP_END 19
-#define TDISP_EIN 20
-#define TDISP_AUS 21
-#define MUSIC_OFF 24
-#define MUSIC_ON1 25
-#define MUSIC_ON2 26
-#define EXIT 27
 void option_menue(taf_info *ti) {
 	int16 key;
 	int16 surimy_ani;
@@ -588,6 +593,8 @@ void option_menue(taf_info *ti) {
 
 		cur->plot_cur();
 		out->back2screen(workpage);
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
 
 		if (!delay_count) {
 			if (surimy_ani < SURIMY_END)
@@ -616,6 +623,7 @@ void option_menue(taf_info *ti) {
 		} else
 			--delay_count;
 	}
+
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
 	ERROR;
 	out->setze_zeiger(workptr);


Commit: 5497f41b0c40eada5aa4eb732fd9d982218a92d7
    https://github.com/scummvm/scummvm/commit/5497f41b0c40eada5aa4eb732fd9d982218a92d7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Implement getch to allow quitting via File Menu

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/file.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index ed8677fdfc9..4c9cdd3fd06 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -159,4 +159,35 @@ void delay(size_t time) {
 	g_events->delay(time);
 }
 
+bool kbhit() {
+	return g_events->_kbInfo && g_events->_kbInfo->key_code != 0;
+}
+
+char getch() {
+	if (g_events->_kbInfo && g_events->_kbInfo->key_code) {
+		char c = g_events->_kbInfo->key_code;
+		g_events->_kbInfo->key_code = 0;
+		g_events->_kbInfo->scan_code = 0;
+
+		return c;
+	}
+
+	Common::Event e;
+	while (!SHOULD_QUIT) {
+		g_system->delayMillis(10);
+		g_events->update();
+
+		while (!g_system->getEventManager()->pollEvent(e) && !SHOULD_QUIT) {
+			if (e.type == Common::EVENT_KEYDOWN)
+				return e.kbd.ascii;
+		}
+	}
+
+	return 0;
+}
+
+void putch(char c) {
+	warning("STUB: putch()");
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index bd0e49256e6..a18120635a2 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -30,8 +30,6 @@ struct kb_info;
 
 class EventsManager : public EventsBase {
 private:
-	kb_info *_kbInfo = nullptr;
-
 	void init_timer_handler();
 	static void timer_handler();
 
@@ -40,6 +38,7 @@ private:
 protected:
 	void handleEvent(const Common::Event &event) override;
 public:
+	kb_info *_kbInfo = nullptr;
 	Common::Point _mousePos;
 	bool _flag1 = false;
 	bool _flag2 = false;
@@ -65,6 +64,10 @@ extern EventsManager *g_events;
 
 extern void delay(size_t time);
 
+extern bool kbhit();
+extern char getch();
+extern void putch(char c);
+
 #define EVENTS_UPDATE g_events->update()
 
 } // namespace Chewy
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 8b46a8fb853..8b60f990b33 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -233,7 +233,8 @@ int16 file_menue() {
 #endif
 				out->back2screen(workpage);
 				in->alter_kb_handler();
-				warning("FIXME: key = getch();");
+
+				key = getch();
 				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
 					ret = 1;
 					key = ESC;
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 9f422ed1954..0501bbc298d 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -362,23 +362,6 @@ void init_svga(VesaInfo *vi_, byte *virt_screen) {
 	warning("STUB - init_svga");
 }
 
-bool kbhit() {
-	warning("STUB: kbhit()");
-
-	return false;
-}
-
-char getch() {
-	warning("STUB: getch()");
-
-	return ' ';
-}
-
-void putch(char c) {
-	warning("STUB: putch()");
-}
-
-
 namespace Zoom {
 
 static int spriteHeight;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index ff2f86a56a0..955d59b8a2b 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -85,10 +85,6 @@ uint8 joystick();
 void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
 
-bool kbhit();
-char getch();
-void putch(char c);
-
 } // namespace Chewy
 
 #endif


Commit: 6fb3f94bd02ed57d1248e3e4f7b06ca3c0322974
    https://github.com/scummvm/scummvm/commit/6fb3f94bd02ed57d1248e3e4f7b06ca3c0322974
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Implement loading of savegame list in in-game file menu

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/file.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 88808f4d72c..3b453a4b372 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -146,4 +146,8 @@ Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 		Common::kWritingFailed;
 }
 
+SaveStateList ChewyEngine::listSaves() {
+	return getMetaEngine()->listSaves(_targetName.c_str());
+}
+
 } // End of namespace Chewy
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index bf3b5a83b99..6e7417414f3 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -95,6 +95,8 @@ public:
 	 */
 	Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override;
 
+	SaveStateList listSaves();
+
 	uint getRandomNumber(uint max) {
 		return _rnd.getRandomNumber(max);
 	}
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 8b60f990b33..6047dc1cab6 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -237,7 +237,7 @@ int16 file_menue() {
 				key = getch();
 				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
 					ret = 1;
-					key = ESC;
+ 					key = ESC;
 				} else
 					key = 0;
 				in->neuer_kb_handler(&kbinfo);
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 81420fe29b3..05397864dab 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -118,7 +118,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	switch ((int16)io->key_nr) {
 	case 0:
 		cur->hide_cur();
-		get_files(io->save_path);
+		get_savegame_files();
 		i = 0;
 		cur_y = io->popy + 8;
 		scroll_flag = 0;
@@ -298,7 +298,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				out->pop_box(io->popx + 163, io->popy + 6, io->popx + 241, io->popy + 18, io->m_col[1], io->m_col[0], io->m_col[3]);
 				out->printxy(io->popx + 167, io->popy + 9, io->m_col[2], 300, scr_width, FSTRING1);
 
-				get_files(io->save_path);
+				get_savegame_files();
 				i = 0;
 				cur_y = io->popy + 8;
 				scroll_flag = 0;
@@ -317,7 +317,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				out->pop_box(io->popx + 163, io->popy + 6 + 1 * 16, io->popx + 241, io->popy + 18 + 1 * 16, io->m_col[1], io->m_col[0], io->m_col[3]);
 				out->printxy(io->popx + 167, io->popy + 25, io->m_col[2], 300, scr_width, FSTRING2);
 
-				get_files(io->save_path);
+				get_savegame_files();
 				i = 0;
 				cur_y = io->popy + 8;
 				scroll_flag = 0;
@@ -382,7 +382,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					io_flag = 0;
 					save(cur_y, i, io->save_path);
 					cur->hide_cur();
-					get_files(io->save_path);
+					get_savegame_files();
 					mark_eintrag(cur_y, i);
 					schalter_aus();
 
@@ -565,47 +565,25 @@ void io_game::itoa(int N, char *str, int base) {
 	sprintf(str, "%d", N);
 }
 
-int16 io_game::get_files(char *fname) {
-	warning("STUB: io_game::get_files()");
+int16 io_game::get_savegame_files() {
+	SaveStateList saveList = g_engine->listSaves();
+	int ret = 0;
 
-#if 0
-	struct find_t f_info;
-	int16 f_ok;
-	int16 i, j;
-	int16 ret = 0;
-	char path[80];
-	char str[4];
-	Stream *handle;
-	char name[USER_NAME + 3];
-	char tmp_id[9];
-	for (i = 0; i < 20; i++) {
+	for (int i = 0; i < 20; i++) {
 		file_find_g[i][0] = 0;
-		if (i + 1 < 10)
-			j = 2;
-		else
-			j = 1;
-		strcpy(str, "000\0");
-		itoa(i + 1, str + j, 10);
-		strcpy(path, fname);
-		strcat(path, str);
-		f_ok = _dos_findfirst(path, _A_NORMAL, &f_info);
-		if (!f_ok) {
-			file_find_g[i][0] = 1;
-			handle = chewy_fopen(path, "rb");
-			if (handle) {
-				chewy_fread(&tmp_id, 4, 1, handle);
-				if (!strncmp(tmp_id, io->id, 3)) {
-					++ret;
-					chewy_fread(name, USER_NAME + 2, 1, handle);
-					strcpy(&file_find_g[i][1], name);
-				}
-				chewy_fclose(handle);
+
+		for (int j = 0; j < saveList.size(); ++j) {
+			if (saveList[j].getSaveSlot() == i) {
+				Common::String name = saveList[j].getDescription();
+				strncpy(&file_find_g[i][1], name.c_str(), USER_NAME + 3);
+				file_find_g[i][USER_NAME + 3] = '\0';
+				++ret;
+				break;
 			}
 		}
 	}
+
 	return ret;
-#endif
-	return 0;
 }
 
 void io_game::save(int16 y, int16 slotNum, char *fname) {
@@ -636,7 +614,7 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 }
 
 void io_game::load(int16 slotNum, char *fname) {
-	get_files(io->save_path);
+	get_savegame_files();
 
 	cur->hide_cur();
 	if (file_find_g[slotNum][0] == 1) {
@@ -657,7 +635,7 @@ char *io_game::io_init(iog_init *iostruc) {
 	io = iostruc;
 	for (i = 0; i < 20; i++)
 		file_find_g[i][0] = 0;
-	get_files(io->save_path);
+	get_savegame_files();
 
 	return &file_find_g[0][0];
 }
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 5cd3451f8df..a8f3cb37fb3 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -95,7 +95,7 @@ private:
 	void unmark_eintrag(int16 y, int16 nr);
 	void plot_dir_liste(int16 cur_y, int16 start);
 	void schalter_aus();
-	int16 get_files(char *fname);
+	int16 get_savegame_files();
 	void get_switch_code();
 
 	void itoa(int N, char *str, int base);


Commit: c38a71dd1eb8afdb3c270cfc5aab58a7b66e77ff
    https://github.com/scummvm/scummvm/commit/c38a71dd1eb8afdb3c270cfc5aab58a7b66e77ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Janitorial cleanup of array square bracket usage

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/ch_icm.cpp
    engines/chewy/debugger.cpp
    engines/chewy/detail.cpp
    engines/chewy/file.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/movclass.h
    engines/chewy/room.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 253d80d053f..8b458e0ab7d 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -150,8 +150,8 @@ int16 FineSpeedV;
 int16 FineSpeedN;
 int16 FineSpeedS;
 tmf_inst Instrument[4] = {{ 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }};
-uint16 InsFreq [4] = {0};
-char *Sample [4] = {0};
+uint16 InsFreq[4] = {0};
+char *Sample[4] = {0};
 
 tmf_header *ActiveSong;
 int16 SeqPointer;
@@ -159,12 +159,12 @@ int16 PatPointer;
 int16 PatLine;
 char *Patterns[128];
 char *CurrentLine;
-int16 StereoPos [8] = {63};
+int16 StereoPos[8] = {63};
 
-byte *Dbuffer [8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
-uint32 DbufferLen [8] = {0};
-uint32 DbSampleLen [8] = {0};
-Stream *DbufferHandles [8] = {0};
+byte *Dbuffer[8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
+uint32 DbufferLen[8] = {0};
+uint32 DbSampleLen[8] = {0};
+Stream *DbufferHandles[8] = {0};
 
 ailScummVM::ailScummVM() {
 	_mixer = g_engine->_mixer;
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 8f39f5a23a2..22ad238bd4f 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -1222,7 +1222,7 @@ char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 					tmp_adr += sizeof(AadStrHeader);
 					if (ads_block[block_nr].Show[(int16)nr] == true) {
 						e_ptr[*anzahl] = tmp_adr;
-						e_nr [*anzahl] = (int16)nr;
+						e_nr[*anzahl] = (int16)nr;
 						++(*anzahl);
 					}
 				}
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 645fc80333e..0d4ed21c763 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -342,7 +342,7 @@ private:
 	SplitStringInit ats_ssi;
 
 	char *split_ptr[MAX_STR_SPLIT];
-	int16 split_x [MAX_STR_SPLIT];
+	int16 split_x[MAX_STR_SPLIT];
 	int16 inv_block_nr;
 	char *inv_use_mem;
 	int16 tmp_delay;
diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
index 602f8251ab6..2521642fcbc 100644
--- a/engines/chewy/ch_icm.cpp
+++ b/engines/chewy/ch_icm.cpp
@@ -723,8 +723,8 @@ void set_z_ebene() {
 			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
 			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
 			mov->
-			get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector
-			               [P_CHEWY]);
+			get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub,
+				&spieler_vector[P_CHEWY]);
 			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 			spieler_vector[P_CHEWY].DelayCount = 0;
 		}
@@ -1338,7 +1338,7 @@ void get_inv() {
 	tmp = 0;
 	for (i = 0; i < 2; i++)
 		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " % [0 - 9]3d\0", &tmp);
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " %[0 - 9]3d\0", &tmp);
 	if (abfrage != 27)
 	{
 		invent_2_slot(tmp);
@@ -1362,7 +1362,7 @@ void del_inv() {
 	tmp = 0;
 	for (i = 0; i < 2; i++)
 		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " % [0 - 9]3d\0", &tmp);
+	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " %[0 - 9]3d\0", &tmp);
 	if (abfrage != 27)
 	{
 		del_invent_slot(tmp);
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 4d1fc17d664..2ea189bec46 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -52,7 +52,7 @@ Debugger::~Debugger() {
 
 bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 	if (argc == 1) {
-		debugPrintf("%s [roomNum]\n", argv[0]);
+		debugPrintf("%s <roomNum>\n", argv[0]);
 		return true;
 	} else {
 		int roomNum = strToInt(argv[1]);
@@ -68,7 +68,7 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 
 bool Debugger::Cmd_Item(int argc, const char **argv) {
 	if (argc == 1) {
-		debugPrintf("%s [itemNum]\n", argv[0]);
+		debugPrintf("%s <itemNum>\n", argv[0]);
 	} else {
 		int itemNum = strToInt(argv[1]);
 		invent_2_slot(itemNum);
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index c20d6c94147..488ccd40c5b 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -509,22 +509,22 @@ void detail::konvert_format(room_detail_info *rdi_a,
 
 	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
 		rdi_n->tvp_index[i] = rdi_a->tvp_index[i];
-		rdi_n->sample [i] = rdi_a->sample [i];
+		rdi_n->sample[i] = rdi_a->sample[i];
 		for (j = 0; j < MAX_SOUNDS; j++) {
 			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_enable[j] =
 			    rdi_a->Ainfo[i / 3].sfx.sound_enable[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_index [j] =
-			    rdi_a->Ainfo[i / 3].sfx.sound_index [j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_start [j] =
-			    rdi_a->Ainfo[i / 3].sfx.sound_start [j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.kanal [j] =
-			    rdi_a->Ainfo[i / 3].sfx.kanal [j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.volume [j] =
-			    rdi_a->Ainfo[i / 3].sfx.volume [j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.repeats [j] =
-			    rdi_a->Ainfo[i / 3].sfx.repeats [j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.stereo [j] =
-			    rdi_a->Ainfo[i / 3].sfx.stereo [j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_index[j] =
+			    rdi_a->Ainfo[i / 3].sfx.sound_index[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_start[j] =
+			    rdi_a->Ainfo[i / 3].sfx.sound_start[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.kanal[j] =
+			    rdi_a->Ainfo[i / 3].sfx.kanal[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.volume[j] =
+			    rdi_a->Ainfo[i / 3].sfx.volume[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.repeats[j] =
+			    rdi_a->Ainfo[i / 3].sfx.repeats[j];
+			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.stereo[j] =
+			    rdi_a->Ainfo[i / 3].sfx.stereo[j];
 		}
 	}
 
@@ -1103,12 +1103,12 @@ void detail::clear_detail_sound(int16 nr) {
 	sdb = &rdi.Ainfo[nr].sfx;
 	for (i = 0; i < MAX_SOUNDS; i++) {
 		sdb->sound_enable[i] = 0;
-		sdb->sound_index [i] = -1;
-		sdb->sound_start [i] = 0;
-		sdb->kanal [i] = 0;
-		sdb->volume [i] = 0;
-		sdb->repeats [i] = 0;
-		sdb->stereo [i] = 0;
+		sdb->sound_index[i] = -1;
+		sdb->sound_start[i] = 0;
+		sdb->kanal[i] = 0;
+		sdb->volume[i] = 0;
+		sdb->repeats[i] = 0;
+		sdb->stereo[i] = 0;
 	}
 	remove_unused_samples();
 }
@@ -1133,17 +1133,17 @@ void detail::clear_room_sound() {
 		sdb = &rdi.Ainfo[j].sfx;
 		for (i = 0; i < MAX_SOUNDS; i++) {
 			sdb->sound_enable[i] = 0;
-			sdb->sound_index [i] = -1;
-			sdb->sound_start [i] = 0;
-			sdb->kanal [i] = 0;
-			sdb->volume [i] = 0;
-			sdb->repeats [i] = 0;
-			sdb->stereo [i] = 0;
+			sdb->sound_index[i] = -1;
+			sdb->sound_start[i] = 0;
+			sdb->kanal[i] = 0;
+			sdb->volume[i] = 0;
+			sdb->repeats[i] = 0;
+			sdb->stereo[i] = 0;
 		}
 	}
 	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
 		rdi.tvp_index[i] = -1;
-		rdi.sample [i] = NULL;
+		rdi.sample[i] = NULL;
 	}
 }
 #ifdef DETEDIT
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 6047dc1cab6..c80f504793e 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -180,7 +180,7 @@ int16 file_menue() {
 		}
 		for (i = 0; i < 8; i++)
 			mode[i] = 0;
-		mode [8] = 1;
+		mode[8] = 1;
 		text_off = 0;
 		active_slot = 0;
 		while (key != ESC) {
@@ -194,7 +194,7 @@ int16 file_menue() {
 					                76 + ti->korrektur[(i << 1) + 1], 0);
 			}
 			key = in->get_switch_code();
-			if (mode[2] || mode [3] || mode[8]) {
+			if (mode[2] || mode[3] || mode[8]) {
 				tmp = fnames + (text_off * 40);
 				for (i = 0; i < 6; i++) {
 					if (tmp != 0) {
@@ -285,36 +285,37 @@ int16 file_menue() {
 				}
 				minfo.button = 0;
 			}
+
 			switch (key) {
 			case F1_KEY:
-				mode [2] = 1;
-				mode [3] = 0;
-				mode [8] = 0;
+				mode[2] = 1;
+				mode[3] = 0;
+				mode[8] = 0;
 
 				break;
 
 			case F2_KEY:
-				mode [2] = 0;
-				mode [3] = 1;
-				mode [8] = 0;
+				mode[2] = 0;
+				mode[3] = 1;
+				mode[8] = 0;
 
 				break;
 
 			case F3_KEY:
-				mode [4] = 10;
+				mode[4] = 10;
 				break;
 
 			case F4_KEY:
-				mode [5] = 10;
+				mode[5] = 10;
 				break;
 
 			case F5_KEY:
-				mode [6] = 10;
+				mode[6] = 10;
 				break;
 
 			case CURSOR_UP+ALT:
 				WAIT_TASTE_LOS
-				if (mode [2] || mode [3]) {
+				if (mode[2] || mode[3]) {
 					mode[0] = 10;
 					if (active_slot > 0)
 						--active_slot;
@@ -324,7 +325,7 @@ int16 file_menue() {
 				break;
 
 			case CURSOR_DOWN+ALT:
-				if (mode [2] || mode [3]) {
+				if (mode[2] || mode[3]) {
 					mode[1] = 10;
 					if (active_slot < 5)
 						++active_slot;
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index f889c9fd441..980f86e1868 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -256,7 +256,7 @@ movclass *mov;
 
 char background[] = { EPISODE1 };
 char backged[] = { EPISODE1_GEP };
-char fname [80] = {0};
+char fname[80] = {0};
 
 AutoMov auto_mov[MAX_AUTO_MOV];
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 90f1b21da65..8b99d80ae6c 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -238,8 +238,8 @@ extern movclass *mov;
 extern ailclass *ailsnd;
 
 extern char background[];
-extern char backged [];
-extern char fname [80];
+extern char backged[];
+extern char fname[80];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
 extern int16 HowardMov;
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 52694606472..64da265bbe9 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -88,9 +88,9 @@ void standard_init() {
 	strcpy(ioptr.save_path, SAVEDIR);
 	ioptr.delay = 8;
 	alloc_buffers();
-	pal [765] = 63;
-	pal [766] = 63;
-	pal [767] = 63;
+	pal[765] = 63;
+	pal[766] = 63;
+	pal[767] = 63;
 	out->einblenden(pal, 0);
 	room->set_timer_start(1);
 	font_load();
@@ -103,9 +103,9 @@ void standard_init() {
 	ged_mem = room->get_ged_mem();
 
 	_G(zoom_horizont) = 140;
-	pal [765] = 63;
-	pal [766] = 63;
-	pal [767] = 63;
+	pal[765] = 63;
+	pal[766] = 63;
+	pal[767] = 63;
 	out->einblenden(pal, 0);
 	out->cls();
 	uhr->set_new_timer(0, 5, SEC_10_MODE);
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 05397864dab..487908015ac 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -38,7 +38,7 @@ io_game::io_game(mcga_grafik *iout, maus *iin, cursor *curp) {
 io_game::~io_game() {
 }
 
-char file_find_g [20][USER_NAME + 4];
+char file_find_g[20][USER_NAME + 4];
 
 short file_xy_g[7][4] = {
 	{140, 6, 156, 51},
@@ -62,7 +62,7 @@ char auf_tbl_g[3][3] = { {FSTRING8 },
 	{FSTRING9 },
 	{FSTRING10},
 };
-char ab_tbl_g [4][3] = { {FSTRING11},
+char ab_tbl_g[4][3] = { {FSTRING11},
 	{FSTRING12},
 	{FSTRING13},
 	{FSTRING14},
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 50e1176f496..21af455a23c 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -50,8 +50,8 @@ struct MovInfo {
 
 struct ObjMov {
 	int16 Xypos[3] = { 0 };
-	int16 Xyvo [3] = { 0 };
-	int16 Xyna [3][2] = { 0 };
+	int16 Xyvo[3] = { 0 };
+	int16 Xyna[3][2] = { 0 };
 	int16 Count = 0;
 
 	int16 Delay = 0;
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index cddb7c66f8d..c4676b25f6b 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -192,12 +192,12 @@ void Room::set_zoom(int16 zoom) {
 
 void Room::set_pal(const byte *src_pal, byte *dest_pal) {
 	memcpy(dest_pal, src_pal, 768l);
-	dest_pal [767] = 63;
-	dest_pal [766] = 63;
-	dest_pal [765] = 63;
-	dest_pal [0] = 0;
-	dest_pal [1] = 0;
-	dest_pal [2] = 0;
+	dest_pal[767] = 63;
+	dest_pal[766] = 63;
+	dest_pal[765] = 63;
+	dest_pal[0] = 0;
+	dest_pal[1] = 0;
+	dest_pal[2] = 0;
 }
 
 void Room::set_ak_pal(RaumBlk *Rb) {


Commit: 32edbec7c45c9dcdb5d093e75354c16728a6c1cb
    https://github.com/scummvm/scummvm/commit/32edbec7c45c9dcdb5d093e75354c16728a6c1cb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Fix loading games from in-game file menu

Changed paths:
    engines/chewy/io_game.cpp


diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 487908015ac..dc0b33a8ecf 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -575,6 +575,7 @@ int16 io_game::get_savegame_files() {
 		for (int j = 0; j < saveList.size(); ++j) {
 			if (saveList[j].getSaveSlot() == i) {
 				Common::String name = saveList[j].getDescription();
+				file_find_g[i][0] = 1;
 				strncpy(&file_find_g[i][1], name.c_str(), USER_NAME + 3);
 				file_find_g[i][USER_NAME + 3] = '\0';
 				++ret;


Commit: 9d8f37500d3cedfeb8ffbea36e1b41509a0fbf36
    https://github.com/scummvm/scummvm/commit/9d8f37500d3cedfeb8ffbea36e1b41509a0fbf36
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Fix compiler warning

Changed paths:
    engines/chewy/io_game.cpp


diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index dc0b33a8ecf..8d94e019860 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -572,7 +572,7 @@ int16 io_game::get_savegame_files() {
 	for (int i = 0; i < 20; i++) {
 		file_find_g[i][0] = 0;
 
-		for (int j = 0; j < saveList.size(); ++j) {
+		for (uint j = 0; j < saveList.size(); ++j) {
 			if (saveList[j].getSaveSlot() == i) {
 				Common::String name = saveList[j].getDescription();
 				file_find_g[i][0] = 1;


Commit: b54c5b9c2a6da0c2ad6683549c3dc468ae3c57dd
    https://github.com/scummvm/scummvm/commit/b54c5b9c2a6da0c2ad6683549c3dc468ae3c57dd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:24-08:00

Commit Message:
CHEWY: Cleanups whilst investigating mid-cutscene interaction enablement

Changed paths:
    engines/chewy/events_base.cpp
    engines/chewy/main.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room3.h


diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
index 95b2e7d532e..6f351bc0715 100644
--- a/engines/chewy/events_base.cpp
+++ b/engines/chewy/events_base.cpp
@@ -101,6 +101,7 @@ void EventsBase::processEvents() {
 			} else {
 				MOUSE_MOVE;
 				handleEvent(e);
+				return;
 			}
 			break;
 		}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8d958b3ce34..8e856498de0 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1727,6 +1727,7 @@ void get_user_key(int16 mode) {
 	flags.StopAutoObj = true;
 	maus_action();
 	_G(maus_links_click) = false;
+
 	if (!inv_disp_ok) {
 		switch (in->get_switch_code()) {
 		case F5_KEY:
@@ -1755,8 +1756,11 @@ void get_user_key(int16 mode) {
 			kbinfo.key_code = '\0';
 			break;
 
+		default:
+			break;
 		}
 	}
+
 	flags.StopAutoObj = false;
 }
 
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 4a3e5972d8c..0d525642c39 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -60,7 +60,7 @@ void Room3::terminal() {
 	_G(auto_obj) = 0;
 	switch (Room4::sonde_comp()) {
 	case 0:
-		sonde_aufnahme();
+		probeTransfer();
 		spr_info[0].Image = room_blk.DetImage[120];
 		spr_info[0].X = 250;
 		spr_info[0].Y = 2;
@@ -236,18 +236,17 @@ void Room3::sonde_knarre() {
 	show_cur();
 }
 
-void Room3::sonde_aufnahme() {
+void Room3::probeTransfer() {
 	int16 tmp;
 	int16 i;
 	int16 spr_nr;
 	int16 anistart;
-	//	room_detail_info *rdi;
 
-	MovLine sonde_mpkt1[2] = {
+	static const MovLine SONDE_MPKT1[2] = {
 		{ { 237,  52, 160 }, 0, 2 },
 		{ { 144, 100, 180 }, 0, 2 }
 	};
-	MovLine sonde_mpkt_[4][2] = {
+	static const MovLine SONDE_MPKT_[4][2] = {
 		{ { { 144, 100, 180 }, 0, 2 },
 		  { { 110, 100, 180 }, 0, 2 } },
 
@@ -260,6 +259,7 @@ void Room3::sonde_aufnahme() {
 		{ { { 310,   2, 180 }, 0, 3 },
 		  { { 250,   2, 180 }, 0, 3 } }
 	};
+
 	flags.AniUserAction = false;
 	hide_cur();
 	/*rdi = */(void)det->get_room_detail_info();
@@ -273,7 +273,8 @@ void Room3::sonde_aufnahme() {
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = 1;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine *)sonde_mpkt1);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines,
+		(const MovLine *)SONDE_MPKT1);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
@@ -283,34 +284,35 @@ void Room3::sonde_aufnahme() {
 		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
 		spr_info[0].ZEbene = 146;
 		set_ani_screen();
+
+		SHOULD_QUIT_RETURN;
 	}
 
 	clear_prog_ani();
 	_G(auto_obj) = 2;
 
 	spr_nr = 140;
-	for (i = 0; i < 4; i++) {
-
+	for (i = 0; i < 4 && !SHOULD_QUIT; i++) {
 		mov_phasen[SONDE_OBJ].Lines = 2;
 		mov_phasen[SONDE_OBJ].Repeat = 1;
 		mov_phasen[SONDE_OBJ].ZoomFak = 0;
 		auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 		auto_mov_obj[SONDE_OBJ].Mode = 1;
 		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, sonde_mpkt_[i]);
+		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, SONDE_MPKT_[i]);
 		mov_phasen[SONDE_OBJ1].Lines = 2;
 		mov_phasen[SONDE_OBJ1].Repeat = 1;
 		mov_phasen[SONDE_OBJ1].ZoomFak = 0;
 		auto_mov_obj[SONDE_OBJ1].Id = AUTO_OBJ1;
 		auto_mov_obj[SONDE_OBJ1].Mode = 1;
 		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ1].Lines, sonde_mpkt_[i]);
+		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ1].Lines, SONDE_MPKT_[i]);
 		mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
 		mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
 		while (mov_phasen[SONDE_OBJ].Repeat != -1) {
+			SHOULD_QUIT_RETURN;
 
 			if (i == 2 || i == 1) {
-
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
 					if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 						if (is_cur_inventar(SPINAT_INV)) {
@@ -333,6 +335,7 @@ void Room3::sonde_aufnahme() {
 				}
 			}
 			set_ani_screen();
+
 			if (anistart) {
 				if (auto_mov_vector[SONDE_OBJ1].PhNr == 7) {
 					anistart = false;
@@ -344,6 +347,7 @@ void Room3::sonde_aufnahme() {
 				}
 			}
 		}
+
 		switch (i) {
 		case 0:
 			show_cur();
@@ -364,8 +368,11 @@ void Room3::sonde_aufnahme() {
 			switch_room(2);
 			break;
 
+		default:
+			break;
 		}
 	}
+
 	flags.AniUserAction = false;
 	_G(zoom_horizont) = tmp;
 	_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room3.h b/engines/chewy/rooms/room3.h
index 478c886386f..fbea69c5e5a 100644
--- a/engines/chewy/rooms/room3.h
+++ b/engines/chewy/rooms/room3.h
@@ -28,7 +28,7 @@ namespace Rooms {
 class Room3 {
 private:
 	static void sonde_knarre();
-	static void sonde_aufnahme();
+	static void probeTransfer();
 public:
 	static void init_sonde();
 	static void terminal();


Commit: 689ccc89f17fffc512add3326769501db8d52ea6
    https://github.com/scummvm/scummvm/commit/689ccc89f17fffc512add3326769501db8d52ea6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Further add to credits

Changed paths:
    engines/chewy/credits.pl


diff --git a/engines/chewy/credits.pl b/engines/chewy/credits.pl
index 12801d74e27..5b46558c4e4 100644
--- a/engines/chewy/credits.pl
+++ b/engines/chewy/credits.pl
@@ -2,4 +2,5 @@ begin_section("Chewy");
 	add_person("Paul Gilbert", "dreammaster", "");
 	add_person("Eugene Sandulenko", "sev", "");
 	add_person("Arnaud Boutonné", "Strangerke", "");
+	add_person("Filippos Karapetis", "bluegr", "");
 end_section();


Commit: 1ec8c82c79891ccbd8525c6bfd2db23bf79dfde5
    https://github.com/scummvm/scummvm/commit/1ec8c82c79891ccbd8525c6bfd2db23bf79dfde5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Create room entry methods for code from enter_room

Changed paths:
    engines/chewy/maus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room23.h
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room3.h
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room34.h


diff --git a/engines/chewy/maus.cpp b/engines/chewy/maus.cpp
index 0f99ca0cb2a..2879b5cb1de 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/maus.cpp
@@ -135,7 +135,7 @@ int16 maus::get_switch_code() {
 
 	if (maus_info_blk) {
 		if (maus_info_blk->button == 2) {
-			switch_code = 1;
+			switch_code = ESC;
 		} else if (maus_info_blk->button == 1)
 			switch_code = 255;
 		else if (maus_info_blk->button == 4)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7c06234f806..06f1da9bdff 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -607,7 +607,7 @@ void enter_room(int16 eib_nr) {
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	ENTRY(0);
 	ENTRY(2);
-	case 3: Room3::init_sonde(); break;
+	ENTRY(3);
 	ENTRY(5);
 	ENTRY(6);
 	ENTRY(7);
@@ -632,11 +632,7 @@ void enter_room(int16 eib_nr) {
 	ENTRY(19);
 	ENTRY(21);
 	ENTRY(22);
-
-	case 23:
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		set_person_pos(135, 69, P_CHEWY, -1);
-		break;
+	ENTRY(23);
 
 	case 24:
 		Room24::entry();
@@ -652,12 +648,7 @@ void enter_room(int16 eib_nr) {
 	ENTRY(31);
 	ENTRY(32);
 	ENTRY(33);
-
-	case 34:
-		if (flags.LoadGame)
-			Room34::use_kuehlschrank();
-		break;
-
+	ENTRY(34);
 	ENTRY(35);
 	ENTRY(37);
 	ENTRY(39);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 9a4afedd546..e96f543fa26 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -29,6 +29,11 @@
 namespace Chewy {
 namespace Rooms {
 
+void Room23::entry() {
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	set_person_pos(135, 69, P_CHEWY, -1);
+}
+
 void Room23::cockpit() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
diff --git a/engines/chewy/rooms/room23.h b/engines/chewy/rooms/room23.h
index d07d2356d61..004d5e6f9b9 100644
--- a/engines/chewy/rooms/room23.h
+++ b/engines/chewy/rooms/room23.h
@@ -27,6 +27,7 @@ namespace Rooms {
 
 class Room23 {
 public:
+	static void entry();
 	static void cockpit();
 	static void get_cartridge();
 	static void use_cartridge();
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 0d525642c39..ddf3543cb03 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -55,6 +55,10 @@ static const int16 SONDE_PHASEN[4][2] = {
 	{ 119, 119 }
 };
 
+void Room3::entry() {
+	init_sonde();
+}
+
 void Room3::terminal() {
 	show_cur();
 	_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room3.h b/engines/chewy/rooms/room3.h
index fbea69c5e5a..ec6bf21fb47 100644
--- a/engines/chewy/rooms/room3.h
+++ b/engines/chewy/rooms/room3.h
@@ -29,8 +29,9 @@ class Room3 {
 private:
 	static void sonde_knarre();
 	static void probeTransfer();
-public:
 	static void init_sonde();
+public:
+	static void entry();
 	static void terminal();
 };
 
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 629caead316..94edbbc94c8 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -29,6 +29,11 @@
 namespace Chewy {
 namespace Rooms {
 
+void Room34::entry() {
+	if (flags.LoadGame)
+		use_kuehlschrank();
+}
+
 bool Room34::use_kuehlschrank() {
 	bool result = false;
 
diff --git a/engines/chewy/rooms/room34.h b/engines/chewy/rooms/room34.h
index 4d5b53744cc..c887236cdf3 100644
--- a/engines/chewy/rooms/room34.h
+++ b/engines/chewy/rooms/room34.h
@@ -27,6 +27,7 @@ namespace Rooms {
 
 class Room34 {
 public:
+	static void entry();
 	static bool use_kuehlschrank();
 	static void xit_kuehlschrank();
 };


Commit: f51dceab6d2e18c4640750341e74ef549bc92360
    https://github.com/scummvm/scummvm/commit/f51dceab6d2e18c4640750341e74ef549bc92360
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Move room-specific code in timer_action to individual Room classes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room12.h
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room14.h
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room17.h
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room18.h
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room21.h
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room22.h
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room40.h
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room48.h
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room49.h
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room50.h
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room51.h
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room56.h
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room68.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 06f1da9bdff..76b91c63c72 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -95,116 +95,29 @@ void timer_action(int16 t_nr) {
 	if (ailsnd->isSpeechActive())
 		return;
 
+#define TIMER(NUM) case NUM: Room##NUM::timer(t_nr, ani_nr)
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-	case 0:
-		Room0::timer(t_nr, ani_nr);
-		break;
-
-	case 11:
-		if (t_nr == _G(timer_nr)[0])
-			Room11::bork_zwinkert();
-		break;
-
-	case 12:
-		if (t_nr == _G(timer_nr)[0]) {
-			if (!is_chewy_busy())
-				Room12::init_bork();
-		} else if (t_nr == _G(timer_nr)[1]) {
-			if (_G(spieler).R12TransOn) {
-				_G(spieler).R12TransOn = false;
-				start_aad_wait(30, -1);
-			}
-		}
-		break;
-
-	case 14:
-		switch (ani_nr) {
-		case 0:
-			Room14::eremit_feuer(t_nr, ani_nr);
-			break;
-		default:
-			break;
-		}
-		break;
-
-	case 17:
-		if (room->room_timer.ObjNr[ani_nr] == 2 ||
-				room->room_timer.ObjNr[ani_nr] == 3) {
-			if (_G(spieler).R17EnergieOut)
-				uhr->reset_timer(t_nr, 0);
-			else
-				default_flag = true;
-		}
-		break;
-
-	case 18:
-		Room18::timer_action(t_nr);
-		break;
-
-	case 21:
-		if (t_nr == _G(timer_nr)[0]) {
-			Room21::restart_spinne2();
-		} else if (t_nr == _G(timer_nr)[2])
-			Room21::chewy_kolli();
-		break;
-
-	case 22:
-		if (!ani_nr && !flags.ExitMov) {
-			Room22::bork(t_nr);
-		}
-		break;
-
-	case 40:
-		if (t_nr == _G(timer_nr)[0])
-			_G(spieler).R40PoliceStart = true;
-		else
-			default_flag = true;
-		break;
-
-	case 48:
-		if (t_nr == _G(timer_nr)[0])
-			Room48::frage();
-		else
-			default_flag = true;
-		break;
-
-	case 49:
-		if (t_nr == _G(timer_nr)[0])
-			Room49::calc_boy_ani();
-		break;
-
-	case 50:
-		if (t_nr == _G(timer_nr)[0])
-			Room50::calc_wasser();
-		default_flag = true;
-		break;
-
-	case 51:
-		if (_G(spieler).flags32_10)
-			Room51::timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
-		else
-			default_flag = true;
-		break;
-
-	case 56:
-		if (t_nr == _G(timer_nr)[0])
-			Room56::start_flug();
-		else
-			default_flag = true;
-		break;
-
-	case 68:
-		if (t_nr == _G(timer_nr)[0])
-			Room68::calc_diva();
-		else
-			default_flag = true;
-		break;
+	TIMER(0);
+	TIMER(11);
+	TIMER(12);
+	TIMER(14);
+	TIMER(17);
+	TIMER(18);
+	TIMER(21);
+	TIMER(22);
+	TIMER(40);
+	TIMER(48);
+	TIMER(49);
+	TIMER(50);
+	TIMER(51);
+	TIMER(56);
+	TIMER(68);
 
 	default:
 		default_flag = true;
 		break;
-
 	}
+	#undef TIMER
 
 	if (default_flag && flags.AutoAniPlay == false) {
 		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, 0);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 80e46f97b79..c8579be07d3 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -63,6 +63,13 @@ void Room11::entry() {
 	}
 }
 
+bool Room11::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		bork_zwinkert();
+
+	return false;
+}
+
 void Room11::bork_zwinkert() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index 83185707eba..f352a058df1 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -28,12 +28,15 @@ namespace Chewy {
 namespace Rooms {
 
 class Room11 {
+private:
+	static void bork_zwinkert();
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void get_card();
 	static void put_card();
 	static int16 scanner();
-	static void bork_zwinkert();
 	static void chewy_bo_use();
 	static void talk_debug();
 };
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index a2e0b47b787..b7d64d2b985 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -85,6 +85,20 @@ void Room12::entry() {
 	}
 }
 
+bool Room12::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0]) {
+		if (!is_chewy_busy())
+			init_bork();
+	} else if (t_nr == _G(timer_nr)[1]) {
+		if (_G(spieler).R12TransOn) {
+			_G(spieler).R12TransOn = false;
+			start_aad_wait(30, -1);
+		}
+	}
+
+	return false;
+}
+
 void Room12::init_bork() {
 	if (!auto_obj_status(R12_BORK_OBJ) &&
 		!_G(spieler).R12BorkTalk) {
diff --git a/engines/chewy/rooms/room12.h b/engines/chewy/rooms/room12.h
index 72b273b8058..df2b6be56f6 100644
--- a/engines/chewy/rooms/room12.h
+++ b/engines/chewy/rooms/room12.h
@@ -28,15 +28,17 @@ namespace Rooms {
 class Room12 {
 private:
 	static void bork_ok();
+	static void init_bork();
 
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 cut_serv(int16 frame);
 	static int16 use_linke_rohr();
 	static int16 chewy_trans();
 	static int16 proc1();
 	static int16 use_terminal();
-	static void init_bork();
 	static void talk_bork();
 };
 
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 08751aee5a9..7e0ec614e6a 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -46,6 +46,18 @@ void Room14::entry() {
 	}
 }
 
+bool Room14::timer(int16 t_nr, int16 ani_nr) {
+	switch (ani_nr) {
+	case 0:
+		eremit_feuer(t_nr, ani_nr);
+		break;
+	default:
+		break;
+	}
+
+	return false;
+}
+
 void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
 		flags.AutoAniPlay = true;
diff --git a/engines/chewy/rooms/room14.h b/engines/chewy/rooms/room14.h
index fb9bca8962d..2145ee54cc8 100644
--- a/engines/chewy/rooms/room14.h
+++ b/engines/chewy/rooms/room14.h
@@ -28,13 +28,17 @@ namespace Chewy {
 namespace Rooms {
 
 class Room14 {
+private:
+	static void eremit_feuer(int16 t_nr, int16 ani_nr);
+
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void feuer();
 	static int16 use_schrott();
 	static int16 use_gleiter();
 	static int16 use_schleim();
-	static void eremit_feuer(int16 t_nr, int16 ani_nr);
 	static void talk_eremit();
 };
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index a18175572b9..70c097cc072 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -94,6 +94,18 @@ void Room17::xit() {
 	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
 }
 
+bool Room17::timer(int16 t_nr, int16 ani_nr) {
+	if (room->room_timer.ObjNr[ani_nr] == 2 ||
+		room->room_timer.ObjNr[ani_nr] == 3) {
+		if (_G(spieler).R17EnergieOut)
+			uhr->reset_timer(t_nr, 0);
+		else
+			return true;
+	}
+
+	return false;
+}
+
 int16 Room17::use_seil() {
 	int16 action_flag = false;
 	if (!flags.AutoAniPlay) {
diff --git a/engines/chewy/rooms/room17.h b/engines/chewy/rooms/room17.h
index 27eb84f49b8..841711778c6 100644
--- a/engines/chewy/rooms/room17.h
+++ b/engines/chewy/rooms/room17.h
@@ -26,11 +26,11 @@ namespace Chewy {
 namespace Rooms {
 
 class Room17 {
-private:
-
 public:
 	static void entry();
 	static void xit();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 use_seil();
 	static void plot_seil();
 	static void kletter_down();
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 6b2d84c1e7f..5ed4063e1b1 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -89,20 +89,7 @@ void Room18::entry() {
 	}
 }
 
-void Room18::init_borks() {
-	int16 i;
-	for (i = 0; i < 5; i++)
-		det->show_static_spr(BORK_SPR[i]);
-	for (i = 0; i < 4; i++)
-		det->hide_static_spr(BORK_SPR1[i]);
-	_G(timer_nr)[0] = room->set_timer(255, 10);
-	_G(timer_nr)[1] = room->set_timer(255, 15);
-	_G(spieler).scrollx = 276;
-	_G(spieler).scrolly = 0;
-	flags.NoScroll = true;
-}
-
-void Room18::timer_action(int16 t_nr) {
+bool Room18::timer(int16 t_nr, int16 ani_nr) {
 	if (!_G(spieler).R18SurimyWurf) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
@@ -134,6 +121,21 @@ void Room18::timer_action(int16 t_nr) {
 			flags.AutoAniPlay = false;
 		}
 	}
+
+	return false;
+}
+
+void Room18::init_borks() {
+	int16 i;
+	for (i = 0; i < 5; i++)
+		det->show_static_spr(BORK_SPR[i]);
+	for (i = 0; i < 4; i++)
+		det->hide_static_spr(BORK_SPR1[i]);
+	_G(timer_nr)[0] = room->set_timer(255, 10);
+	_G(timer_nr)[1] = room->set_timer(255, 15);
+	_G(spieler).scrollx = 276;
+	_G(spieler).scrolly = 0;
+	flags.NoScroll = true;
 }
 
 void Room18::monitor() {
diff --git a/engines/chewy/rooms/room18.h b/engines/chewy/rooms/room18.h
index 357afe7f754..a264478365b 100644
--- a/engines/chewy/rooms/room18.h
+++ b/engines/chewy/rooms/room18.h
@@ -32,7 +32,8 @@ private:
 
 public:
 	static void entry();
-	static void timer_action(int16 t_nr);
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 calc_surimy();
 	static int16 calc_schalter();
 	static short use_cart_moni();
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 58fc9b62ed3..81c58649154 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -65,6 +65,15 @@ void Room21::entry() {
 	SetUpScreenFunc = r21setup_func;
 }
 
+bool Room21::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0]) {
+		restart_spinne2();
+	} else if (t_nr == _G(timer_nr)[2])
+		chewy_kolli();
+
+	return false;
+}
+
 void Room21::calc_laser() {
 	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
 		_G(spieler).R21Laser1Weg = true;
diff --git a/engines/chewy/rooms/room21.h b/engines/chewy/rooms/room21.h
index 651b2dffd0a..7809aec1e75 100644
--- a/engines/chewy/rooms/room21.h
+++ b/engines/chewy/rooms/room21.h
@@ -30,11 +30,13 @@ private:
 	static void init_spinne();
 	static void e_streifen();
 	static void r21setup_func();
+	static void chewy_kolli();
+	static void restart_spinne2();
 
 public:
 	static void entry();
-	static void chewy_kolli();
-	static void restart_spinne2();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void calc_laser();
 	static void use_gitter_energie();
 	static int16 use_fenster();
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 6657ebdb0dd..e1f08a7e03c 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -61,6 +61,14 @@ void Room22::entry() {
 		det->show_static_spr(4);
 }
 
+bool Room22::timer(int16 t_nr, int16 ani_nr) {
+	if (!ani_nr && !flags.ExitMov) {
+		bork(t_nr);
+	}
+
+	return false;
+}
+
 int16 Room22::chewy_amboss() {
 	int16 action_flag = false;
 	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
diff --git a/engines/chewy/rooms/room22.h b/engines/chewy/rooms/room22.h
index be1cc829067..d3ce2742385 100644
--- a/engines/chewy/rooms/room22.h
+++ b/engines/chewy/rooms/room22.h
@@ -29,13 +29,15 @@ class Room22 {
 private:
 	static void bork_walk1();
 	static void bork_walk2();
+	static void bork(int16 t_nr);
 
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 chewy_amboss();
 	static int16 malen();
 	static void get_bork();
-	static void bork(int16 t_nr);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 9bb5a92d62f..3700919a312 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -119,6 +119,15 @@ void Room40::xit(int16 eib_nr) {
 	show_cur();
 }
 
+bool Room40::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		_G(spieler).R40PoliceStart = true;
+	else
+		return true;
+
+	return false;
+}
+
 void Room40::move_train(int16 mode) {
 	int16 lx, ax;
 	int16 delay;
diff --git a/engines/chewy/rooms/room40.h b/engines/chewy/rooms/room40.h
index 5439c034331..96f328125c0 100644
--- a/engines/chewy/rooms/room40.h
+++ b/engines/chewy/rooms/room40.h
@@ -35,6 +35,8 @@ private:
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 use_mr_pumpkin();
 	static void talk_police();
 	static void talk_handler();
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 4081cd613ac..f214234d2a4 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -40,6 +40,15 @@ void Room48::entry() {
 
 }
 
+bool Room48::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		Room48::frage();
+	else
+		return true;
+
+	return false;
+}
+
 void Room48::calc_pic() {
 	int16 i;
 	for (i = 0; i < 2; i++) {
diff --git a/engines/chewy/rooms/room48.h b/engines/chewy/rooms/room48.h
index 0e52a39598a..3988a51e552 100644
--- a/engines/chewy/rooms/room48.h
+++ b/engines/chewy/rooms/room48.h
@@ -31,6 +31,8 @@ private:
 	static void setup_func();
 public:
 	static void entry();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void frage();
 };
 
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 67b7b99cae8..77bb404600c 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -73,6 +73,13 @@ void Room49::xit(int16 eib_nr) {
 	}
 }
 
+bool Room49::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		calc_boy_ani();
+
+	return false;
+}
+
 void Room49::calc_boy_ani() {
 	if (!_G(spieler).R49BoyAniCount) {
 		_G(spieler).R49BoyAniCount = 3;
diff --git a/engines/chewy/rooms/room49.h b/engines/chewy/rooms/room49.h
index eb3324dda71..6083e1acdf3 100644
--- a/engines/chewy/rooms/room49.h
+++ b/engines/chewy/rooms/room49.h
@@ -29,11 +29,13 @@ class Room49 {
 private:
 	static void talk_boy(int16 aad_nr);
 	static void setup_func();
+	static void calc_boy_ani();
 
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
-	static void calc_boy_ani();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void calc_boy();
 	static int16 use_boy();
 	static void use_boy_cigar();
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 694b4230bcc..51edca9f3f6 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -63,6 +63,13 @@ void Room50::xit(int16 eib_nr) {
 	}
 }
 
+bool Room50::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		calc_wasser();
+
+	return true;
+}
+
 void Room50::stop_cigar() {
 	room->set_timer_status(0, TIMER_STOP);
 	det->del_static_ani(0);
diff --git a/engines/chewy/rooms/room50.h b/engines/chewy/rooms/room50.h
index c5397b10b08..314fcdfed75 100644
--- a/engines/chewy/rooms/room50.h
+++ b/engines/chewy/rooms/room50.h
@@ -31,11 +31,13 @@ private:
 	static void go_page();
 	static void aad_page(int16 aad_nr, int16 ani_nr);
 	static void setup_func();
+	static void calc_wasser();
 
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
-	static void calc_wasser();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void calc_treppe();
 	static int16 use_gutschein();
 	static int16 use_gum();
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index bd58dae95dd..423a85cbb00 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -64,6 +64,15 @@ void Room51::xit(int16 eib_nr) {
 	}
 }
 
+bool Room51::timer(int16 t_nr, int16 ani_nr) {
+	if (_G(spieler).flags32_10)
+		timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
+	else
+		return true;
+
+	return false;
+}
+
 void Room51::setup_func() {
 	int16 x, y;
 	int16 ch_y;
diff --git a/engines/chewy/rooms/room51.h b/engines/chewy/rooms/room51.h
index 60e66b9d94f..69a8346e96f 100644
--- a/engines/chewy/rooms/room51.h
+++ b/engines/chewy/rooms/room51.h
@@ -29,12 +29,14 @@ class Room51 {
 private:
 	static void setup_func();
 	static int16 cut_serv(int16 frame);
+	static void timer_action(int16 t_nr, int16 obj_nr);
 
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 use_door(int16 txt_nr);
-	static void timer_action(int16 t_nr, int16 obj_nr);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 4d94b1595dc..016ddcf17d0 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -100,6 +100,15 @@ void Room56::xit() {
 	_G(spieler).ScrollxStep = 1;
 }
 
+bool Room56::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		start_flug();
+	else
+		return true;
+
+	return false;
+}
+
 int16 Room56::use_taxi() {
 	int16 action_ret = false;
 	if (!_G(spieler).inv_cur) {
diff --git a/engines/chewy/rooms/room56.h b/engines/chewy/rooms/room56.h
index cace6ab9033..58e19ef4c02 100644
--- a/engines/chewy/rooms/room56.h
+++ b/engines/chewy/rooms/room56.h
@@ -28,15 +28,17 @@ namespace Rooms {
 class Room56 {
 private:
 	static void setup_func();
+	static void start_flug();
 
 public:
 	static void entry();
 	static void xit();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static int16 use_taxi();
 	static void talk_man();
 	static int16 use_man();
 	static int16 use_kneipe();
-	static void start_flug();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index ee1a24afc06..c1663450c72 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -58,6 +58,15 @@ void Room68::xit() {
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 }
 
+bool Room68::timer(int16 t_nr, int16 ani_nr) {
+	if (t_nr == _G(timer_nr)[0])
+		Room68::calc_diva();
+	else
+		return true;
+
+	return false;
+}
+
 void Room68::setup_func() {
 	int16 ho_x, ho_y;
 	int16 ni_x, ni_y;
diff --git a/engines/chewy/rooms/room68.h b/engines/chewy/rooms/room68.h
index 5c38f966559..17fb5efaf68 100644
--- a/engines/chewy/rooms/room68.h
+++ b/engines/chewy/rooms/room68.h
@@ -33,6 +33,8 @@ private:
 public:
 	static void entry();
 	static void xit();
+	static bool timer(int16 t_nr, int16 ani_nr);
+
 	static void look_kaktus();
 	static int16 use_indigo();
 	static void talk_keeper();


Commit: 2c2110e663b6e79359f6ec32a247cb3c0bbae3e9
    https://github.com/scummvm/scummvm/commit/2c2110e663b6e79359f6ec32a247cb3c0bbae3e9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Room 5 fixes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room5.cpp
    engines/chewy/rooms/room5.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 76b91c63c72..1e2fe49a0a6 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -117,7 +117,7 @@ void timer_action(int16 t_nr) {
 		default_flag = true;
 		break;
 	}
-	#undef TIMER
+#undef TIMER
 
 	if (default_flag && flags.AutoAniPlay == false) {
 		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, 0);
@@ -629,6 +629,7 @@ void enter_room(int16 eib_nr) {
 		break;
 	}
 #undef ENTRY
+#undef ENTRY_NR
 
 	flags.LoadGame = false;
 }
@@ -1731,7 +1732,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_KNOPF_R5:
-		Room5::knopf();
+		Room5::pushButton();
 		break;
 
 	case SIB_SEIL:
@@ -2021,7 +2022,15 @@ void sib_event_inv(int16 sib_nr) {
 
 	switch (sib_nr) {
 	case SIB_TERMINAL_R5:
-		Room28::use_surimy();
+		if (!_G(spieler).R5Terminal) {
+			_G(spieler).R5Terminal = true;
+			cur_2_inventory();
+			del_inventar(RED_CARD_INV);
+			start_aad(103, -1);
+			det->start_detail(6, 255, 0);
+			atds->set_ats_str(27, 1, 1);
+			atds->set_ats_str(30, 1, 1);
+		}
 		break;
 
 	case SIB_TKNOPF1_R6:
@@ -2153,6 +2162,10 @@ void sib_event_inv(int16 sib_nr) {
 		_G(spieler).R6DoorLeftF = ret & 1;
 		break;
 
+	case SIB_AUTO_R28:
+		Room28::use_surimy();
+		break;
+
 	default:
 		break;
 	}
diff --git a/engines/chewy/rooms/room5.cpp b/engines/chewy/rooms/room5.cpp
index e08bbb63d18..6d57d683bf1 100644
--- a/engines/chewy/rooms/room5.cpp
+++ b/engines/chewy/rooms/room5.cpp
@@ -34,7 +34,7 @@ void Room5::entry() {
 		det->start_detail(6, 255, 0);
 }
 
-void Room5::knopf() {
+void Room5::pushButton() {
 	int16 str_nr;
 	if (_G(spieler).R5Terminal) {
 		if (_G(spieler).R5Tuer == false) {
@@ -49,8 +49,9 @@ void Room5::knopf() {
 		atds->set_ats_str(29, str_nr, ATS_DATEI);
 		_G(spieler).R5Tuer ^= 1;
 		obj->calc_rsi_flip_flop(SIB_TUERE_R5);
-	} else
+	} else {
 		start_aad_wait(1, -1);
+	}
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room5.h b/engines/chewy/rooms/room5.h
index 55e19d89f0b..89e7077496b 100644
--- a/engines/chewy/rooms/room5.h
+++ b/engines/chewy/rooms/room5.h
@@ -28,7 +28,7 @@ namespace Rooms {
 class Room5 {
 public:
 	static void entry();
-	static void knopf();
+	static void pushButton();
 };
 
 } // namespace Rooms


Commit: 35abb49d910bdff856588cb33d8cb70ea348b337
    https://github.com/scummvm/scummvm/commit/35abb49d910bdff856588cb33d8cb70ea348b337
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Cleanup of PersonHide as numeric

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 90d9ff1e943..a6f99887c49 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -70,7 +70,7 @@ void MainMenu::execute() {
 		fx->border(workpage, 100, 0, 0);
 
 		out->set_palette(pal);
-		_G(spieler).PersonHide[0] = 1;
+		_G(spieler).PersonHide[0] = true;
 		show_cur();
 
 		// Wait for a selection to be made on the main menu
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1e2fe49a0a6..c7f977e2beb 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -2065,6 +2065,7 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
+		// Used Out of Order sign on vending machine
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(118, 1, 1);
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 797bc4cbce1..44e087c9b9a 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -149,10 +149,10 @@ bool Room0::pullSlime() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
-		_G(spieler).PersonHide[0] = 1;
+		_G(spieler).PersonHide[0] = true;
 		start_detail_wait(3, 1, 0);
 		set_person_pos(222, 106, 0, 0);
-		_G(spieler).PersonHide[0] = 0;
+		_G(spieler).PersonHide[0] = false;
 		invent_2_slot(1);
 		menu_item = 0;
 		cursor_wahl(0);


Commit: 72a3bc49d62b66b2d7e069e315cf403213452b88
    https://github.com/scummvm/scummvm/commit/72a3bc49d62b66b2d7e069e315cf403213452b88
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:25-08:00

Commit Message:
CHEWY: Room 6 fixes

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8e856498de0..1c98bdf697b 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1018,6 +1018,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			menu_item_vorwahl = CUR_WALK;
 			show_cur();
 			sib_event_inv(test_nr);
+
 			if (!_G(spieler).inv_cur) {
 				menu_item = menu_item_vorwahl;
 				cursor_wahl(menu_item);
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index b833c75b89a..ee0047a89e3 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -397,8 +397,9 @@ void objekt::calc_static_detail(int16 det_nr) {
 					det->start_detail(n, 0, ANI_VOR);
 				else
 					det->start_detail(n, 1, 0);
-			} else
+			} else {
 				det->show_static_spr(nr);
+			}
 		}
 
 		nr = Rsi[det_nr].StaticOff;
@@ -471,8 +472,10 @@ int16 objekt::calc_rsi_flip_flop(int16 nr) {
 		if (Rsi[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
 			--Rsi[nr].ZustandFlipFlop;
 		}
-	} else
+	} else {
 		ret = false;
+	}
+
 	return ret;
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c7f977e2beb..8b2d3dd61a9 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -2034,45 +2034,27 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 
 	case SIB_TKNOPF1_R6:
-		Room29::schlitz_sitz();
+		_G(spieler).R6DoorLeftF = exit_flip_flop(4, 8, -1, 33, -1, -1,
+			AUSGANG_LINKS, -1, _G(spieler).R6DoorLeftF);
 		break;
 
 	case SIB_TKNOPF2_R6:
-		_G(cur_hide_flag) = false;
-		hide_cur();
-		start_spz_wait(13, 1, 0, 0);
-		_G(spieler).R18CartFach = true;
-		del_inventar(_G(spieler).AkInvent);
-		det->show_static_spr(7);
-		atds->set_ats_str(157, 1, 1);
-
-		if (_G(spieler).R18CartTerminal) {
-			start_aad_wait(121, -1);
-		} else {
-			_G(spieler).R18CartTerminal = true;
-			atds->set_ats_str(26, 1, 6);
-			start_aad_wait(120, -1);
-		}
-
-		show_cur();
+		_G(spieler).R6DoorLeftB = exit_flip_flop(5, 9, 12, 35, 49, SIB_TKNOPF1_R7,
+			AUSGANG_LINKS, AUSGANG_OBEN, _G(spieler).R6DoorLeftB);
 		break;
 
 	case SIB_TKNOPF3_R6:
-		ret = exit_flip_flop(-1, 46, 27, 132, 90, -1, 2, 2,
-			_G(spieler).R6BolaSchild ? 1 : 0);
-		_G(spieler).R21GitterMuell = ret & 1;
-		atds->set_ats_str(90, 2, 2);
+		_G(spieler).R6DoorRightB = exit_flip_flop(6, 11, 20, 37, 99, SIB_TKNOPF3_R11,
+			AUSGANG_RECHTS, AUSGANG_LINKS, _G(spieler).R6DoorRightB);
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
-		// Used Out of Order sign on vending machine
-		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(118, 1, 1);
-		start_spz(5, 255, 0, 0);
-		start_aad_wait(115, 0);
-		if (_G(spieler).R12TransOn)
-			Room12::use_linke_rohr();
+		_G(spieler).R6BolaSchild = true;
+		det->show_static_spr(2);
+		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+		obj->hide_sib(SIB_BOLA_KNOPF_R6);
+		obj->show_sib(SIB_BOLA_R6);
 		break;
 
 	case SIB_LHAKEN_R7:


Commit: 2d92e881b1a7c3a6705fc7361d09283e330ede3a
    https://github.com/scummvm/scummvm/commit/2d92e881b1a7c3a6705fc7361d09283e330ede3a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:26-08:00

Commit Message:
CHEWY: Fix changed total count before vending machine in room 6

Changed paths:
    engines/chewy/rooms/room6.cpp


diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index b858efae321..3ae712b877f 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -46,13 +46,16 @@ void Room6::entry() {
 	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
+
 	if (_G(spieler).R6BolaSchild) {
-		if (_G(spieler).R6RaumBetreten < 3) {
+		if (_G(spieler).R6RaumBetreten < 2) {
 			det->start_detail(7, 255, ANI_VOR);
 			atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
 			if (!flags.LoadGame)
 				++_G(spieler).R6RaumBetreten;
-			if (_G(spieler).R6RaumBetreten == 3) {
+
+			if (_G(spieler).R6RaumBetreten == 2) {
+				hide_cur();
 				det->stop_detail(7);
 				init_robo();
 				wait_auto_obj(0);
@@ -60,6 +63,7 @@ void Room6::entry() {
 				obj->show_sib(SIB_BOLA_KNOPF_R6);
 				obj->hide_sib(SIB_BOLA_R6);
 				atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+				show_cur();
 			}
 		}
 	}


Commit: 43a8e31f717d46530b33d847a4588b6b5c81200b
    https://github.com/scummvm/scummvm/commit/43a8e31f717d46530b33d847a4588b6b5c81200b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:26-08:00

Commit Message:
CHEWY: Fix drawing zoomed sprites

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 0501bbc298d..2f549cae628 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -484,7 +484,9 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 sc
 
 			for (int xc = spriteDeltaX2, countX = spriteXVal2; xc > 0; --xc) {
 				if (*source)
-					*scrP++ = *source;
+					*scrP = *source;
+
+				++scrP;
 				source += spriteXVal1;
 				countX += spriteXVal2;
 				while (countX > 1000) {


Commit: eccadf13b78d46f68099155b235a143d551d2540
    https://github.com/scummvm/scummvm/commit/eccadf13b78d46f68099155b235a143d551d2540
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:26-08:00

Commit Message:
CHEWY: Fixed sib_event_inv switch cases

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8b2d3dd61a9..c7ee1b1bafd 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -2058,91 +2058,97 @@ void sib_event_inv(int16 sib_nr) {
 		break;
 
 	case SIB_LHAKEN_R7:
-		Room14::feuer();
-		break;
-
 	case SIB_RHAKEN_R7:
-		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(113, 0, 1);
+		Room7::haken(sib_nr);
 		break;
 
 	case SIB_GTUER:
-		_G(spieler).R23FluxoFlex = true;
-		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(112, 1, 1);
+		Room8::open_gdoor();
 		break;
 
 	case SIB_SURIMY_R10:
-		Room23::use_cartridge();
+		Room10::get_surimy();
 		break;
 
 	case SIB_PAINT_R22:
-		ret = exit_flip_flop(6, 20, 11, 99, 37, 15, 1, 2,
-			(int16)_G(spieler).R6DoorRightB);
-		_G(spieler).R6DoorRightB = ret & 1;
+		disable_timer();
+		Room22::malen();
+		enable_timer();
 		break;
 
 	case SIB_SCHLITZ_R11:
-		ret = exit_flip_flop(5, 22, -1, 98, -1, -1,
-			AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
-		_G(spieler).R11DoorRightB = ret & 1;
+		Room11::put_card();
 		break;
 
 	case SIB_TKNOPF1_R11:
-		ret = exit_flip_flop(1, 23, -1, 87, -1, -1,
-			AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightF);
-		_G(spieler).R11DoorRightB = false;
-		_G(spieler).R11TerminalOk |= ret & 1;
+		_G(spieler).R11DoorRightF = exit_flip_flop(1, 23, -1, 87, -1, -1,
+			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightF);
 		break;
 
 	case SIB_TKNOPF2_R11:
-		Room11::put_card();
+		_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
+			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightB);
 		break;
 
 	case SIB_TKNOPF3_R11:
-		disable_timer();
-		Room22::malen();
-		enable_timer();
+		_G(spieler).R6DoorRightB = exit_flip_flop(6, 20, 11, 99, 37, SIB_TKNOPF3_R6,
+			AUSGANG_LINKS, AUSGANG_RECHTS, _G(spieler).R6DoorRightB);
 		break;
 
 	case SIB_CARTRIDGE_R23:
-		Room10::get_surimy();
+		Room23::use_cartridge();
+		menu_item_vorwahl = CUR_USE;
 		break;
 
 	case SIB_FLUXO_R23:
-		Room8::open_gdoor();
+		_G(spieler).R23FluxoFlex = true;
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(112, 1, ATS_DATEI);
+		menu_item_vorwahl = CUR_USE;
+		break;
+
+	case SIB_TRANSLATOR_23:
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(113, 0, ATS_DATEI);
+		menu_item_vorwahl = CUR_USE;
 		break;
 
 	case SIB_FEUER_R14:
-	case SIB_TALISMAN_R12:
-		Room7::haken(sib_nr);
+		Room14::feuer();
 		break;
 
 	case SIB_ROEHRE_R12:
+		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(spieler).R6BolaSchild = true;
-		det->show_static_spr(2);
-		obj->calc_rsi_flip_flop(18);
-		obj->hide_sib(18);
-		obj->show_sib(21);
+		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
+		start_aad(115, 0);
 		break;
 
-	case SIB_SEIL_R21:
-		ret = exit_flip_flop(6, 11, 20, 37, 99, 42, 2, 1,
-			(int16)_G(spieler).R6DoorRightB);
-		_G(spieler).R6DoorRightB = ret & 1;
+	case SIB_GITTER2_R21:
+		_G(spieler).R21GitterMuell = exit_flip_flop(-1, 46, 27, 132, 90, -1,
+			AUSGANG_RECHTS, AUSGANG_RECHTS, _G(spieler).R21GitterMuell);
+		atds->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATEI);
 		break;
 
 	case SIB_CART_FACH_R18:
-		ret = exit_flip_flop(5, 9, 12, 35, 49, 22, 1, 3,
-			(int16)_G(spieler).R6DoorLeftB);
-		_G(spieler).R6DoorLeftB = ret & 1;
+		_G(cur_hide_flag) = false;
+		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		_G(spieler).R18CartFach = 1;
+		del_inventar(_G(spieler).AkInvent);
+		det->show_static_spr(7);
+		atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
+
+		if (_G(spieler).R18CartTerminal) {
+			_G(spieler).R18CartSave = true;
+			atds->set_ats_str(26, 1, 6);
+			start_aad_wait(120, -1);
+		} else {
+			start_aad_wait(121, -1);
+		}
 		break;
 
 	case SIB_AUTO_SITZ:
-		ret = exit_flip_flop(4, 8, -1, 33, -1, -1, 1, -1,
-			(int16)_G(spieler).R6DoorLeftF);
-		_G(spieler).R6DoorLeftF = ret & 1;
+		Room29::schlitz_sitz();
 		break;
 
 	case SIB_AUTO_R28:


Commit: bec6ffccc6f1cc0c7fcd63a3eafc65fd038f38fd
    https://github.com/scummvm/scummvm/commit/bec6ffccc6f1cc0c7fcd63a3eafc65fd038f38fd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:27-08:00

Commit Message:
CHEWY: Move ablock25 to a const array in room7.cpp

Changed paths:
    engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/global.h
    engines/chewy/rooms/room7.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index 0dc717d1fda..de8a20fabf0 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -71,12 +71,6 @@ AniBlock ablock7[2] = {
 	{ 2, 1, ANI_VOR, ANI_GO, 0},
 };
 
-AniBlock ablock25[3] = {
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 5, 255, ANI_VOR, ANI_GO, 0},
-	{ 4, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
 AniBlock ablock8[3] = {
 	{ 10, 1, ANI_VOR, ANI_WAIT, 0},
 	{ 12, 1, ANI_VOR, ANI_WAIT, 0},
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 7642bb67722..1fb8247b9c7 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -127,8 +127,6 @@ extern AniBlock ablock6[3];
 
 extern AniBlock ablock7[2];
 
-extern AniBlock ablock25[3];
-
 extern AniBlock ablock8[3];
 
 extern AniBlock ablock9[3];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 8b99d80ae6c..4fb3f7eb539 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -466,7 +466,7 @@ void sprite_engine();
 
 void calc_z_ebene();
 
-void start_ani_block(int16 anz, AniBlock *ab);
+void start_ani_block(int16 anz, const AniBlock *ab);
 
 void start_detail_wait(int16 ani_nr, int16 rep, int16 mode);
 
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index 1a93c5acb64..b83709ec58e 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK25[3] = {
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 5, 255, ANI_VOR, ANI_GO, 0},
+	{ 4, 1, ANI_VOR, ANI_WAIT, 0},
+};
+
 void Room7::entry() {
 	_G(spieler).ScrollxStep = 2;
 }
@@ -62,7 +68,7 @@ void Room7::klingel() {
 		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft != 0 && !_G(spieler).R7SeilOk)) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(5, 0);
-		start_ani_block(3, ablock25);
+		start_ani_block(3, ABLOCK25);
 
 		det->show_static_spr(7);
 		start_detail_wait(12, 1, ANI_VOR);
@@ -74,7 +80,7 @@ void Room7::klingel() {
 	} else if (_G(spieler).R7BellCount == 1) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(6, 0);
-		start_ani_block(3, ablock25);
+		start_ani_block(3, ABLOCK25);
 		det->show_static_spr(7);
 		start_detail_wait(10, 1, ANI_VOR);
 		det->start_detail(13, 1, ANI_VOR);
@@ -104,7 +110,7 @@ void Room7::klingel() {
 	} else if (!_G(spieler).R7SeilOk) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
-		start_ani_block(3, ablock25);
+		start_ani_block(3, ABLOCK25);
 		det->show_static_spr(7);
 		det->load_taf_seq(192, 74, 0);
 		det->start_detail(14, 1, ANI_VOR);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 25e8b405d21..af65df45135 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -395,7 +395,7 @@ void wait_show_screen(int16 frames) {
 	_G(maus_links_click) = tmp_maus_links;
 }
 
-void start_ani_block(int16 anz, AniBlock *ab) {
+void start_ani_block(int16 anz, const AniBlock *ab) {
 	int16 i;
 	tmp_maus_links = _G(maus_links_click);
 	_G(maus_links_click) = false;


Commit: b2696fa0aef9ca15d553b228ec19d941aa4d2e20
    https://github.com/scummvm/scummvm/commit/b2696fa0aef9ca15d553b228ec19d941aa4d2e20
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:27-08:00

Commit Message:
CHEWY: Fix playback of flic animations

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 986c9451131..2db8db25e39 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -127,9 +127,9 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 
 	load_puffer = load_p;
 	virt_screen = vscreen + 4;
+
 	if (flic_header.load(rs)) {
 		if (flic_header.type == FLC) {
-
 			key = 0;
 			//trace_mode = false;
 			fade_flag = false;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c7ee1b1bafd..237dd990eab 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1090,20 +1090,20 @@ static void flic_proc1() {
 
 
 void flic_cut(int16 nr, int16 mode) {
-	const int16 FLIC_CUT_133[] = {
+	static const int16 FLIC_CUT_133[] = {
 		133, 123, 125, 126, 124, 128, 129, 130, 131,
 		132, 133, 127, 158
 	};
-	const int16 FLIC_CUT_1045[] = {
+	static const int16 FLIC_CUT_1045[] = {
 		30, 47, 41, 34, 45, 52, 53, 57, 64, 63, 62
 	};
-	const int16 FLIC_CUT_1074[] = { 73, 114, 74, 75 };
-	const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
-	const int16 FLIC_CUT_1093[] = {
+	static const int16 FLIC_CUT_1074[] = { 73, 114, 74, 75 };
+	static const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
+	static const int16 FLIC_CUT_1093[] = {
 		93, 94, 95, 96, 97, 98, 99, 100, 92, 90, 91, 89
 	};
-	const int16 FLIC_CUT_1106[] = { 106, 105, 104 };
-	const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
+	static const int16 FLIC_CUT_1106[] = { 106, 105, 104 };
+	static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
 	out->setze_zeiger(0);
@@ -1622,8 +1622,10 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		default:
-			switch (mem->file->select_pool_item(Ci.Handle,
-				(nr < 1000) ? nr : nr - 1000)) {
+			mem->file->select_pool_item(Ci.Handle,
+				(nr < 1000) ? nr : nr - 1000);
+
+			switch (mode) {
 			case 0:
 				flc->custom_play(&Ci);
 				break;
@@ -2018,8 +2020,6 @@ int16 sib_event_no_inv(int16 sib_nr) {
 }
 
 void sib_event_inv(int16 sib_nr) {
-	int16 ret;
-
 	switch (sib_nr) {
 	case SIB_TERMINAL_R5:
 		if (!_G(spieler).R5Terminal) {


Commit: 84b1e2bd9243e0d818a934903bb892d5fa882337
    https://github.com/scummvm/scummvm/commit/84b1e2bd9243e0d818a934903bb892d5fa882337
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:27-08:00

Commit Message:
CHEWY: Fixes for room 8

Changed paths:
    engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/rooms/room8.cpp


diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index de8a20fabf0..28222596113 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -91,16 +91,6 @@ AniBlock ablock10[4] = {
 	{ 18, 1, ANI_VOR, ANI_WAIT, 0},
 };
 
-AniBlock ablock12[2] = {
-	{8, 1, ANI_VOR, ANI_WAIT, 0},
-	{9, 2, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock13[2] = {
-	{10, 1, ANI_VOR, ANI_WAIT, 0},
-	{11, 255, ANI_VOR, ANI_GO, 0},
-};
-
 AniBlock ablock17[2] = {
 	{8, 1, ANI_VOR, ANI_WAIT, 0},
 	{9, 255, ANI_VOR, ANI_GO, 0},
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 1fb8247b9c7..5605c94a8ac 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -133,10 +133,6 @@ extern AniBlock ablock9[3];
 
 extern AniBlock ablock10[4];
 
-extern AniBlock ablock12[2];
-
-extern AniBlock ablock13[2];
-
 extern AniBlock ablock17[2];
 
 extern AniBlock ablock18[2];
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index d8000b1b121..84c01b19103 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -29,6 +29,16 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK12[2] = {
+	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 9, 2, ANI_VOR, ANI_GO, 0 },
+};
+
+static const AniBlock ABLOCK13[2] = {
+	{10, 1, ANI_VOR, ANI_WAIT, 0},
+	{11, 255, ANI_VOR, ANI_GO, 0},
+};
+
 void Room8::entry() {
 	_G(spieler).R7ChewyFlug = true;
 	if (!_G(spieler).R8Folter)
@@ -40,9 +50,7 @@ void Room8::entry() {
 
 void Room8::start_folter() {
 	atds->set_ats_str(67, 1, ATS_DATEI);
-
 	det->stop_detail(19);
-
 	det->start_detail(13, 255, ANI_VOR);
 }
 
@@ -57,7 +65,9 @@ void Room8::stop_folter() {
 }
 
 void Room8::hole_kohle() {
-	if (!_G(spieler).R8Kohle) {
+	if (_G(spieler).R8Kohle) {
+		start_aad_wait(604, -1);
+	} else {
 		hide_cur();
 		_G(spieler).R8Kohle = true;
 		auto_move(4, P_CHEWY);
@@ -71,43 +81,47 @@ void Room8::hole_kohle() {
 }
 
 void Room8::start_verbrennen() {
-	int16 ende;
 	hide_cur();
+
 	if (!_G(spieler).inv_cur) {
 		auto_move(3, P_CHEWY);
 		start_aad(102, 0);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ablock12);
-		ende = 0;
-		while (!ende && det->get_ani_status(9)) {
+		start_ani_block(2, ABLOCK12);
+
+		while (det->get_ani_status(9)) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
 			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
 				if (minfo.x > 146 && minfo.x < 208 &&
 					minfo.y > 107 && minfo.y < 155)
-					ende = 1;
+					break;
 			}
 		}
+
 		det->stop_detail(9);
 		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
-		start_ani_block(2, ablock13);
+		start_ani_block(2, ABLOCK13);
 		atds->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
+
 	show_cur();
 }
 
 bool Room8::gips_wurf() {
-	if (!is_cur_inventar(11)) {
+	if (!is_cur_inventar(GIPS_EIMER_INV)) {
 		hide_cur();
 		det->load_taf_seq(116, 30, 0);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = 0;
+
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
 		start_detail_wait(4, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+
 		start_detail_frame(5, 1, ANI_VOR, 16);
 		start_detail_wait(6, 1, ANI_VOR);
 		obj->show_sib(33);


Commit: 48d63328f6244e0141187fc0e78a249ded35a03e
    https://github.com/scummvm/scummvm/commit/48d63328f6244e0141187fc0e78a249ded35a03e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:27-08:00

Commit Message:
CHEWY: Fix special strings that suppress display

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 22ad238bd4f..f45354e4a41 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -552,8 +552,8 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 			atsv.TxtLen = 0;
 			while (*ptr++ != ATDS_END_TEXT)
 				++atsv.TxtLen;
-			if (*atsv.Ptr == '\xb0') { // FIXME. CHECK THE ACTUAL CODE
-
+			if ((byte)*atsv.Ptr == 248) {
+				// Special code for no message to display
 				atsv.Display = false;
 			} else {
 				atsv.DelayCount = get_delay(atsv.TxtLen);


Commit: 39093215d0e567e4dd2f9850c2a0ec6dabbea5d8
    https://github.com/scummvm/scummvm/commit/39093215d0e567e4dd2f9850c2a0ec6dabbea5d8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:27-08:00

Commit Message:
CHEWY: Cleanup look_invent_screen method

Changed paths:
    engines/chewy/menus.cpp


diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 0c51ee9f7b2..e69a9e25f7a 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -636,14 +636,11 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 }
 
 void look_invent_screen(int16 txt_mode, int16 txt_nr) {
-	//char *str_adr;
 	int16 ok;
 	int16 m_mode = 0;
-	//int16 action_flag;
+
 	if (!flags.AtsAction) {
-		//str_adr = 0;
 		if (txt_nr != -1) {
-
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
 			case INVENTAR_STATIC:
@@ -672,10 +669,8 @@ void look_invent_screen(int16 txt_mode, int16 txt_nr) {
 
 				}
 
-				//action_flag = 0;
 				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
-					//action_flag = 1;
 				}
 				if (ok) {
 					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);


Commit: 06b8291cd5b348a526cf067c30a6bf7df651a379
    https://github.com/scummvm/scummvm/commit/06b8291cd5b348a526cf067c30a6bf7df651a379
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:28-08:00

Commit Message:
CHEWY: fix a compilation error on VS2019

Changed paths:
    engines/chewy/cursor.cpp


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index f9d7ccae229..7d58bfabc8f 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -65,7 +65,7 @@ void cursor::plot_cur() {
 		}
 
 		cur_aufruf -= 1;
-		if ((cur_aufruf <= 0) && (ani != false)) {
+		if ((cur_aufruf <= 0) && (ani != nullptr)) {
 			cur_aufruf = ani->delay;
 			++ani_count;
 			if (ani_count > ani->ani_end)


Commit: 271963714a66c54aa2901a84eda3e8d68b7f6b75
    https://github.com/scummvm/scummvm/commit/271963714a66c54aa2901a84eda3e8d68b7f6b75
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:28-08:00

Commit Message:
CHEWY: Extra initialization of atds fields

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index f45354e4a41..d1a89cbc7fe 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -80,12 +80,6 @@ atdsys::atdsys() {
 	inv_block_nr = -1;
 	inv_use_mem = nullptr;
 	inzeig = in->get_in_zeiger();
-
-	for (i = 0; i < MAX_HANDLE; i++) {
-		atdshandle[i] = 0;
-		atdsmem[i] = 0;
-		atdspooloff[i] = 0;
-	}
 }
 
 atdsys::~atdsys() {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 0d4ed21c763..241a2a7911b 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -319,34 +319,34 @@ public:
 private:
 	int16 get_delay(int16 txt_len);
 
-	Stream *atdshandle[MAX_HANDLE];
-	char *atdsmem[MAX_HANDLE];
-	int16 atdspooloff[MAX_HANDLE];
-	char *atsmem;
-	uint8 *ats_sheader;
+	Stream *atdshandle[MAX_HANDLE] = { nullptr };
+	char *atdsmem[MAX_HANDLE] = { nullptr };
+	int16 atdspooloff[MAX_HANDLE] = { 0 };
+	char *atsmem = nullptr;
+	uint8 *ats_sheader = nullptr;
 	uint8 *ats_st_header[4];
-	char *atds_id_ptr;
+	char *atds_id_ptr = nullptr;
 	AadVar aadv;
 	AtsVar atsv;
 	AdsVar adsv;
 	AtdsVar atdsv;
-	char *e_ptr[ADS_MAX_BL_EIN];
-	int16 e_nr[ADS_MAX_BL_EIN];
-	AdsBlock *ads_block;
+	char *e_ptr[ADS_MAX_BL_EIN] = { nullptr };
+	int16 e_nr[ADS_MAX_BL_EIN] = { 0 };
+	AdsBlock *ads_block = nullptr;
 	AdsNextBlk adsnb;
-	uint8 ads_stack[ADS_STACK_SIZE];
+	uint8 ads_stack[ADS_STACK_SIZE] = { 0 };
 	int16 ads_stack_ptr;
 	SplitStringRet ssret;
-	SplitStringRet *ssr;
+	SplitStringRet *ssr = nullptr;
 	SplitStringInit ssi[AAD_MAX_PERSON];
 	SplitStringInit ats_ssi;
 
-	char *split_ptr[MAX_STR_SPLIT];
-	int16 split_x[MAX_STR_SPLIT];
+	char *split_ptr[MAX_STR_SPLIT] = { nullptr };
+	int16 split_x[MAX_STR_SPLIT] = { 0 };
 	int16 inv_block_nr;
-	char *inv_use_mem;
+	char *inv_use_mem = nullptr;
 	int16 tmp_delay;
-	in_zeiger *inzeig;
+	in_zeiger *inzeig = nullptr;
 	bool _hasSpeech = false;
 };
 


Commit: 6532dc7e7dec4b6c3b80b48dff144192f6aba02b
    https://github.com/scummvm/scummvm/commit/6532dc7e7dec4b6c3b80b48dff144192f6aba02b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:28-08:00

Commit Message:
CHEWY: Fix timer_action switch block

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 237dd990eab..8bea4e99c4f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -95,7 +95,7 @@ void timer_action(int16 t_nr) {
 	if (ailsnd->isSpeechActive())
 		return;
 
-#define TIMER(NUM) case NUM: Room##NUM::timer(t_nr, ani_nr)
+#define TIMER(NUM) case NUM: Room##NUM::timer(t_nr, ani_nr); break;
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	TIMER(0);
 	TIMER(11);


Commit: 3506f54a31ecf102346da6aba5467787760bcdff
    https://github.com/scummvm/scummvm/commit/3506f54a31ecf102346da6aba5467787760bcdff
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:28-08:00

Commit Message:
CHEWY: Fix some little things noticed while progressing on the implementation of room 97

Changed paths:
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room9.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/rooms/room97.h
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 64da265bbe9..190ed69e222 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -160,7 +160,7 @@ void var_init() {
 	for (i = 0; i < MAX_PERSON; i++) {
 		PersonAni[i] = -1;
 		PersonTaf[i] = 0;
-		spieler_mi[i].Mode = 0;
+		spieler_mi[i].Mode = false;
 
 		ani_stand_flag[i] = false;
 		spz_delay[i] = 0;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index a6f99887c49..3f9b42542e4 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -61,7 +61,7 @@ void MainMenu::execute() {
 		cursor_wahl(20);
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
-		_G(spieler).PersonRoomNr[0] = 98;
+		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
 		room->load_room(&room_blk, 98, &_G(spieler));
 		ERROR
 
@@ -70,7 +70,7 @@ void MainMenu::execute() {
 		fx->border(workpage, 100, 0, 0);
 
 		out->set_palette(pal);
-		_G(spieler).PersonHide[0] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		show_cur();
 
 		// Wait for a selection to be made on the main menu
@@ -213,7 +213,7 @@ void MainMenu::startGame() {
 	_G(spieler).DisplayText = displayText;
 	_G(spieler).soundLoopMode = sndLoopMode;
 
-	_G(spieler).PersonRoomNr[0] = 0;
+	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
 	room->load_room(&room_blk, 0, &_G(spieler));
 	ERROR
 
@@ -221,7 +221,7 @@ void MainMenu::startGame() {
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
 	set_person_pos(160, 80, 0, 1);
 	fx_blend = BLEND3;
-	_G(spieler).PersonHide[P_CHEWY] = 0;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = 0;
 	cursor_wahl(0);
 	enter_room(-1);
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index ee0047a89e3..e9b2d5643f5 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -190,7 +190,7 @@ void objekt::sort() {
 			if (Rmo[i].RoomNr == 255) {
 				++spieler_invnr[0];
 				spieler_invnr[spieler_invnr[0]] = i;
-			} else if (Rmo[i].RoomNr == Player->PersonRoomNr[0]) {
+			} else if (Rmo[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 				++mov_obj_room[0];
 				mov_obj_room[mov_obj_room[0]] = i;
 			}
@@ -212,7 +212,7 @@ int16 objekt::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 ret;
 	ret = -1;
 	for (i = 0; i < max_static_inventar && ret == -1; i++) {
-		if (Rsi[i].RoomNr == Player->PersonRoomNr[0] && Rsi[i].HideSib == false) {
+		if (Rsi[i].RoomNr == Player->PersonRoomNr[P_CHEWY] && Rsi[i].HideSib == false) {
 			if (mouse_x >= Rsi[i].X &&
 			        mouse_x <= (Rsi[i].X + Rsi[i].XOff) &&
 			        mouse_y >= Rsi[i].Y &&
@@ -365,7 +365,7 @@ void objekt::calc_static_detail(int16 det_nr) {
 	int16 n;
 	ani_detail_info *adi;
 
-	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[0]) {
+	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 		nr = Rsi[det_nr].StaticAk;
 		if (nr != -1) {
 			if (nr >= 30000) {
@@ -540,7 +540,7 @@ void objekt::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
 
 	++mov_obj_room[0];
 	mov_obj_room[mov_obj_room[0]] = nr;
-	Player->room_m_obj[nr].RoomNr = Player->PersonRoomNr[0];
+	Player->room_m_obj[nr].RoomNr = Player->PersonRoomNr[P_CHEWY];
 	Player->room_m_obj[nr].X = x;
 	Player->room_m_obj[nr].Y = y;
 	Player->room_m_obj[nr].AutoMov = automov;
@@ -564,7 +564,7 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 i;
 	ret = -1;
 	for (i = 0; i < max_exit && ret == -1; i++) {
-		if (Re[i].RoomNr == Player->PersonRoomNr[0]) {
+		if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 			if (mouse_x >= Re[i].X &&
 			        mouse_x <= (Re[i].X + Re[i].XOff) &&
 			        mouse_y >= Re[i].Y &&
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8bea4e99c4f..c392cff8294 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -505,7 +505,7 @@ void enter_room(int16 eib_nr) {
 
 	flags.ZoomMov = false;
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).ZoomXy[P_CHEWY][ 0] = (int16)room->room_info->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)room->room_info->ZoomFak;
 	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)room->room_info->ZoomFak;
 
 	uhr->reset_timer(0, 0);
@@ -2002,7 +2002,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(cur_hide_flag) = false;
 		hide_cur();
 		start_aad_wait(406, -1);
-		if (_G(spieler).PersonRoomNr[1] == 66)
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
 			start_aad_wait(613, -1);
 		break;
 
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 44e087c9b9a..e615ad5d384 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -149,10 +149,10 @@ bool Room0::pullSlime() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		auto_move(2, 0);
-		_G(spieler).PersonHide[0] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(3, 1, 0);
 		set_person_pos(222, 106, 0, 0);
-		_G(spieler).PersonHide[0] = false;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
 		menu_item = 0;
 		cursor_wahl(0);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index b7d64d2b985..2eff0c6307b 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -113,7 +113,7 @@ void Room12::init_bork() {
 			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->room_info->ZoomFak + 20;
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[R12_BORK_OBJ].Mode = 1;
+			auto_mov_obj[R12_BORK_OBJ].Mode = true;
 			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
 				(const MovLine *)R12_BORK_MPKT);
 			if (!_G(spieler).R12TalismanOk) {
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 327f30f73c3..995fff0439b 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -98,7 +98,7 @@ void Room13::talk_bork() {
 		mov_phasen[R13_BORK_OBJ].ZoomFak = 0;
 		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[R13_BORK_OBJ].Mode = 1;
+		auto_mov_obj[R13_BORK_OBJ].Mode = true;
 		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], mov_phasen[R13_BORK_OBJ].Lines,
 			(const MovLine *)R13_BORK_MPKT);
 		auto_move(9, P_CHEWY);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 70c097cc072..f6bae531cf1 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -182,7 +182,7 @@ void Room17::calc_seil() {
 					mov_phasen[CHEWY_OBJ].ZoomFak = 0;
 					auto_mov_obj[CHEWY_OBJ].Id = AUTO_OBJ0;
 					auto_mov_vector[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
-					auto_mov_obj[CHEWY_OBJ].Mode = 1;
+					auto_mov_obj[CHEWY_OBJ].Mode = true;
 					if (_G(spieler).R17Location == 1) {
 						kletter_down();
 						_G(spieler).R17Location = 3;
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 5ed4063e1b1..afeedbf28cd 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -192,7 +192,7 @@ int16 Room18::calc_surimy() {
 		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[SURIMY_OBJ].Mode = 1;
+		auto_mov_obj[SURIMY_OBJ].Mode = true;
 		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
 
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 81c58649154..e4320920778 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -114,7 +114,7 @@ void Room21::init_spinne() {
 	mov_phasen[SPINNE1_OBJ].ZoomFak = 0;
 	auto_mov_obj[SPINNE1_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SPINNE1_OBJ].Mode = 1;
+	auto_mov_obj[SPINNE1_OBJ].Mode = true;
 	init_auto_obj(SPINNE1_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE1_OBJ].Lines, (const MovLine *)SPINNE_MPKT);
 
 	mov_phasen[SPINNE2_OBJ].AtsText = 130;
@@ -123,7 +123,7 @@ void Room21::init_spinne() {
 	mov_phasen[SPINNE2_OBJ].ZoomFak = 0;
 	auto_mov_obj[SPINNE2_OBJ].Id = AUTO_OBJ1;
 	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SPINNE2_OBJ].Mode = 1;
+	auto_mov_obj[SPINNE2_OBJ].Mode = true;
 	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
 	_G(timer_nr)[0] = room->set_timer(255, 21);
 	_G(e_streifen) = false;
@@ -144,7 +144,7 @@ void Room21::e_streifen() {
 	mov_phasen[ENERGIE_OBJ].ZoomFak = 0;
 	auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
 	auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[ENERGIE_OBJ].Mode = 1;
+	auto_mov_obj[ENERGIE_OBJ].Mode = true;
 	init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[ENERGIE_OBJ].Lines, (const MovLine *)SPINNE_MPKT2);
 }
 
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index e1f08a7e03c..dee2070048d 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -103,7 +103,7 @@ void Room22::bork(int16 t_nr) {
 			mov_phasen[BORK_OBJ].ZoomFak = 0;
 			auto_mov_obj[BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[BORK_OBJ].Mode = 1;
+			auto_mov_obj[BORK_OBJ].Mode = true;
 			if (!_G(spieler).R22Paint) {
 				bork_walk1();
 			} else {
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 9185fe9c6dd..6fba05edfd1 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -131,7 +131,7 @@ void Room25::xit_gleiter() {
 		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-		auto_mov_obj[SURIMY_OBJ].Mode = 1;
+		auto_mov_obj[SURIMY_OBJ].Mode = true;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
 			(const MovLine *)SURIMY_MPKT);
 		fx_blend = BLEND1;
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index ddf3543cb03..1173fbd3ead 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -133,7 +133,7 @@ void Room3::init_sonde() {
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	auto_mov_obj[SONDE_OBJ].Mode = true;
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT);
 }
 
@@ -162,7 +162,7 @@ void Room3::sonde_knarre() {
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	auto_mov_obj[SONDE_OBJ].Mode = true;
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
 		*)sonde_mpkt1);
 	flags.AniUserAction = false;
@@ -276,7 +276,7 @@ void Room3::probeTransfer() {
 	mov_phasen[SONDE_OBJ].ZoomFak = 20;
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = 1;
+	auto_mov_obj[SONDE_OBJ].Mode = true;
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines,
 		(const MovLine *)SONDE_MPKT1);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
@@ -301,14 +301,14 @@ void Room3::probeTransfer() {
 		mov_phasen[SONDE_OBJ].Repeat = 1;
 		mov_phasen[SONDE_OBJ].ZoomFak = 0;
 		auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-		auto_mov_obj[SONDE_OBJ].Mode = 1;
+		auto_mov_obj[SONDE_OBJ].Mode = true;
 		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, SONDE_MPKT_[i]);
 		mov_phasen[SONDE_OBJ1].Lines = 2;
 		mov_phasen[SONDE_OBJ1].Repeat = 1;
 		mov_phasen[SONDE_OBJ1].ZoomFak = 0;
 		auto_mov_obj[SONDE_OBJ1].Id = AUTO_OBJ1;
-		auto_mov_obj[SONDE_OBJ1].Mode = 1;
+		auto_mov_obj[SONDE_OBJ1].Mode = true;
 		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
 		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ1].Lines, SONDE_MPKT_[i]);
 		mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 1cc1b817b3e..76eecb823a5 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -55,7 +55,7 @@ void Room31::surimy_go() {
 			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = 1;
+			auto_mov_obj[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
 				(const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index ec17e58a20f..a6d81de4511 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -57,7 +57,7 @@ void Room33::surimy_go() {
 			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = 1;
+			auto_mov_obj[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
 				(const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 3ae712b877f..5be6c11e868 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -78,7 +78,7 @@ void Room6::init_robo() {
 	mov_phasen[ROBO_OBJ].ZoomFak = 0;
 	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[ROBO_OBJ].Mode = 1;
+	auto_mov_obj[ROBO_OBJ].Mode = true;
 	init_auto_obj(ROBO_OBJ, &R6_ROBO_PHASEN[0][0], mov_phasen[ROBO_OBJ].Lines,
 		(const MovLine *)R6_ROBO_MPKT);
 }
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 4df7e4a41b6..1e0b6e6c9a8 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -98,7 +98,7 @@ void Room9::surimy_ani() {
 	mov_phasen[SURIMY_OBJ].ZoomFak = 0;
 	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SURIMY_OBJ].Mode = 1;
+	auto_mov_obj[SURIMY_OBJ].Mode = true;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
 		(const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index c0df5ed5e9f..a86327fab5a 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -30,15 +30,126 @@ namespace Chewy {
 namespace Rooms {
 
 void Room97::entry() {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	SetUpScreenFunc = setup_func;
+	_G(zoom_horizont) = 0;
+
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 24;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 43;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 42;
+
+	r97_bool18DB32 = false;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 97;
+	_G(zoom_mov_fak) = 0;
+	_G(spieler).ScrollxStep = 2;
+	det->hide_static_spr(14);
+
+	if (_G(spieler).flags36_4)
+		det->show_static_spr(17);
+
+	if (_G(spieler).flags36_10) {
+		det->start_detail(11, 255, ANI_VOR);
+		det->stop_detail(5);
+		det->start_detail(6, 255, ANI_VOR);
+		det->start_detail(12, 255, ANI_VOR);
+	}
+
+	if (_G(spieler).flags36_40) {
+		det->start_detail(14, 255, ANI_VOR);
+		det->show_static_spr(13);
+		atds->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		atds->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (_G(spieler).flags36_20) {
+		det->set_detail_pos(27, 272, 110);
+		for (int i = 0; i < 2; ++i) {
+			det->stop_detail(23 + i);
+			det->start_detail(27 + i, 255, ANI_VOR);
+		}
+		det->disable_sound(26, 0);
+		det->disable_sound(27, 0);
+		det->disable_sound(28, 0);
+	}
+
+	if (_G(spieler).flags37_1)
+		det->show_static_spr(19);
+
+	if (_G(spieler).flags37_4)
+		det->show_static_spr(20);
+
+	r97_word18DB2E = 0;
+	r97_word18DB34 = 332;
+	r97_word18DB36 = 110;
+	r97_word18DB38 = 132;
+
+	if (!flags.ExitMov) {
+		hide_cur();
+		out->setze_zeiger(nullptr);
+		out->cls();
+
+		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
+		_G(spieler).SVal2 = 0;
+		_G(spieler).flags35_4 = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(19, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		show_cur();
+		switch_room(89);
+	} else {
+		_G(spieler).scrollx = 800;
+		set_person_pos(1067, 98, 0, 0);
+		set_person_pos(1092, 83, 1, 0);
+		set_person_pos(130, 29, 2, 1);
+	}
 }
 
 void Room97::xit() {
+	_G(spieler).ScrollxStep = 1;
+}
+
+void Room97::setup_func() {
+	warning("STUB Room97::setup_func");
 }
 
 void Room97::proc2() {
+	if (flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	stop_person(P_CHEWY);
+	hide_cur();
+	Sdi[6].z_ebene = 6;
+	Sdi[18].z_ebene = 6;
+	_G(spieler).flags36_1 = false;
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(455, 59, P_CHEWY, ANI_VOR);
+	go_auto_xy(496, 99, P_CHEWY, ANI_VOR);
+	go_auto_xy(530, 99, P_CHEWY, ANI_VOR);
+	go_auto_xy(572, 139, P_CHEWY, ANI_VOR);
+	go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+	spieler_mi[P_CHEWY].Mode = false;
+	Sdi[6].z_ebene = 166;
+	Sdi[18].z_ebene = 157;
+	show_cur();
+	flags.AutoAniPlay = false;
 }
 
 void Room97::proc3() {
+	if (flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	hide_cur();
+	stop_person(P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = true;
+	
+	
 }
 
 void Room97::proc4() {
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
index d14f097d517..bd46a86fe8e 100644
--- a/engines/chewy/rooms/room97.h
+++ b/engines/chewy/rooms/room97.h
@@ -26,9 +26,17 @@ namespace Chewy {
 namespace Rooms {
 
 class Room97 {
+private:
+	static bool r97_bool18DB32;
+	static int r97_word18DB2E;
+	static int r97_word18DB34;
+	static int r97_word18DB36;
+	static int r97_word18DB38;
+
 public:
 	static void entry();
 	static void xit();
+	static void setup_func();
 	static void proc2();
 	static void proc3();
 	static void proc4();
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index af65df45135..b5c60ff6413 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -450,8 +450,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			} else if (VocNr != -1) {
 				ret = true;
 				mem->file->select_pool_item(speech_handle, VocNr);
-				vocx = spieler_vector[0].Xypos[0] -
-				       _G(spieler).scrollx + spieler_mi[0].HotX;
+				vocx = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
 				ailsnd->set_stereo_pos(0, atds->get_stereo_pos(vocx));
 				ailsnd->start_db_voc(speech_handle, 0, 63);
 				ailsnd->set_stereo_pos(0, atds->get_stereo_pos(vocx));
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 68002df52ca..6895fee7064 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2121,7 +2121,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			invent_2_slot(K_KERNE_INV);
 		} else if (_G(spieler).AkInvent == 88) {
 			_G(spieler).flags26_10 = true;
-			start_aad_wait(_G(spieler).PersonRoomNr[0] + 350, -1);
+			start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		}
 		break;
 
@@ -2162,7 +2162,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).flags26_10 = true;
 		flags.InventMenu = false;
 		start_spz(5, 255, 0, 0);
-		start_aad_wait(_G(spieler).PersonRoomNr[0] + 350, -1);
+		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		flags.InventMenu = true;
 		atds->set_ats_str(88, 1, 6);
 		break;


Commit: 9b394584a042bcdc49905def4f6ad6383423bd76
    https://github.com/scummvm/scummvm/commit/9b394584a042bcdc49905def4f6ad6383423bd76
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:28-08:00

Commit Message:
CHEWY: use constant in some uses of start_spz

Changed paths:
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room2.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index e615ad5d384..940d32b2332 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -89,7 +89,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 				set_person_spr(0, 0);
 
 				if (_G(spieler).R0FueterLab < 3) {
-					start_spz(2, 255, false, 0);
+					start_spz(CH_TALK3, 255, false, P_CHEWY);
 					if (_G(spieler).R0FueterLab)
 						start_aad_wait(618, -1);
 					else
@@ -99,7 +99,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 				eyeAnim();
 			} else if (!_G(spieler).R0PillowThrow) {
 				start_aad_wait(42, -1);
-				start_spz(2, 255, false, 0);
+				start_spz(CH_TALK3, 255, false, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
 					start_aad_wait(43, -1);
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
index a40435ebb22..8501f7888c2 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room2.cpp
@@ -51,7 +51,7 @@ void Room2::jump_out_r1(int16 nr) {
 
 void Room2::electrifyWalkway1() {
 	det->start_detail(ANI_5, 255, ANI_VOR);
-	start_spz(ANI_5, 255, 0, ANI_VOR);
+	start_spz(ANI_5, 255, false, ANI_VOR);
 	start_aad_wait(49, -1);
 	det->stop_detail(ANI_5);
 
@@ -68,7 +68,7 @@ void Room2::electrifyWalkway1() {
 }
 
 void Room2::electrifyWalkway2() {
-	start_spz(16, 255, 0, P_CHEWY);
+	start_spz(CH_TALK12, 255, 0, P_CHEWY);
 	start_aad_wait(47, -1);
 }
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 6895fee7064..c291cb3b6b6 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2161,7 +2161,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case 13:
 		_G(spieler).flags26_10 = true;
 		flags.InventMenu = false;
-		start_spz(5, 255, 0, 0);
+		start_spz(5, 255, false, P_CHEWY);
 		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		flags.InventMenu = true;
 		atds->set_ats_str(88, 1, 6);


Commit: 31834e9267a99041ca7b376443d6c958198732ca
    https://github.com/scummvm/scummvm/commit/31834e9267a99041ca7b376443d6c958198732ca
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Some more progress in room 97, recheck parameters of start_detail_wait and set_person_pos

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 3f9b42542e4..b6976222bbd 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -219,7 +219,7 @@ void MainMenu::startGame() {
 
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
-	set_person_pos(160, 80, 0, 1);
+	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	fx_blend = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = 0;
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 940d32b2332..5a3c3b52ceb 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -56,7 +56,7 @@ void Room0::entry() {
 		det->hide_static_spr(6);
 
 	if (!flags.LoadGame) {
-		set_person_pos(150, 100, 0, 1);
+		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
 		_G(cur_hide_flag) = 0;
 		hide_cur();
 		_G(timer_nr)[0] = room->set_timer(255, 3);
@@ -150,8 +150,8 @@ bool Room0::pullSlime() {
 		hide_cur();
 		auto_move(2, 0);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(3, 1, 0);
-		set_person_pos(222, 106, 0, 0);
+		start_detail_wait(3, 1, ANI_VOR);
+		set_person_pos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
 		menu_item = 0;
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 7e0ec614e6a..a312b0f6e7b 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -62,7 +62,7 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
 		flags.AutoAniPlay = true;
 		det->hide_static_spr(9);
-		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, 0);
+		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, ANI_VOR);
 		uhr->reset_timer(t_nr, 0);
 		det->show_static_spr(9);
 		det->start_detail(7, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 77bb404600c..1409aff7362 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -178,7 +178,7 @@ void Room49::use_boy_cigar() {
 
 	int16 zoom = room->room_info->ZoomFak;
 	room->set_zoom(zoom);
-	go_auto_xy(416, 79, 1, 0);
+	go_auto_xy(416, 79, P_HOWARD, ANI_VOR);
 	set_person_spr(0, 1);
 	flags.NoScroll = true;
 
@@ -187,7 +187,7 @@ void Room49::use_boy_cigar() {
 	test_intro(17);
 	ERROR
 
-		room->set_timer_status(255, 0);
+	room->set_timer_status(255, 0);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index a86327fab5a..a4c92f41961 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -103,9 +103,9 @@ void Room97::entry() {
 		switch_room(89);
 	} else {
 		_G(spieler).scrollx = 800;
-		set_person_pos(1067, 98, 0, 0);
-		set_person_pos(1092, 83, 1, 0);
-		set_person_pos(130, 29, 2, 1);
+		set_person_pos(1067, 98, P_CHEWY, P_LEFT);
+		set_person_pos(1092, 83, P_HOWARD, P_LEFT);
+		set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
 	}
 }
 
@@ -149,7 +149,18 @@ void Room97::proc3() {
 	stop_person(P_CHEWY);
 	spieler_mi[P_CHEWY].Mode = true;
 	
-	
+	if (!_G(spieler).flags36_20) {
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
+		start_aad_wait(557, -1);
+		go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+	} else if (!_G(spieler).flags36_40) {
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
+		start_aad_wait(567, -1);
+		go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+	} else {
+		
+	}
+	show_cur();
 }
 
 void Room97::proc4() {
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index c291cb3b6b6..5e4d573cb0b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1232,7 +1232,7 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 	case 22:
 		if (str_end_nr == 1) {
 			det->del_static_ani(3);
-			start_detail_wait(5, 1, 0);
+			start_detail_wait(5, 1, ANI_VOR);
 			det->set_static_ani(3, -1);
 			start_aad_wait(456, -1);
 		}


Commit: 8dc3e50c8a5ce36e21ef6f34d6897481a1dfc9c3
    https://github.com/scummvm/scummvm/commit/8dc3e50c8a5ce36e21ef6f34d6897481a1dfc9c3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Implement room 97 proc3 & 4, use enum in some calls of auto_move

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c392cff8294..34b248235ce 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -511,7 +511,7 @@ void enter_room(int16 eib_nr) {
 	uhr->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
 	SetUpScreenFunc = nullptr;
-	HowardMov = false;
+	HowardMov = 0;
 	_G(cur_hide_flag) = false;
 
 #define ENTRY(NUM) case NUM: Room##NUM::entry(); break
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 5a3c3b52ceb..f89f67baff8 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -85,7 +85,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			flags.AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
 				start_aad_wait(42, -1);
-				auto_move(5, 0);
+				auto_move(5, P_CHEWY);
 				set_person_spr(0, 0);
 
 				if (_G(spieler).R0FueterLab < 3) {
@@ -106,7 +106,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 					++_G(spieler).R0FueterLab;
 				}
 
-				auto_move(3, 0);
+				auto_move(3, P_CHEWY);
 				set_person_pos(191, 120, P_CHEWY, P_LEFT);
 			}
 
@@ -129,7 +129,7 @@ bool Room0::getPillow() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		flags.AutoAniPlay = true;
-		auto_move(1, 0);
+		auto_move(1, P_CHEWY);
 		start_spz_wait(13, 1, 0, 0);
 		invent_2_slot(0);
 		menu_item = 0;
@@ -148,7 +148,7 @@ bool Room0::getPillow() {
 bool Room0::pullSlime() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
-		auto_move(2, 0);
+		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(3, 1, ANI_VOR);
 		set_person_pos(222, 106, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 2eff0c6307b..38210f63691 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -268,7 +268,7 @@ int16 Room12::proc1() {
 			uhr->enable_timer();
 			atds->set_ats_str(117, 1, 0);
 		} else {
-			auto_move(7, 0);
+			auto_move(7, P_CHEWY);
 			start_aad_wait(29, -1);
 		}
 	}
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 1409aff7362..c33b43106bb 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -174,7 +174,7 @@ void Room49::use_boy_cigar() {
 	del_inventar(_G(spieler).AkInvent);
 	talk_boy(263);
 	SetUpScreenFunc = nullptr;
-	auto_move(5, 0);
+	auto_move(5, P_CHEWY);
 
 	int16 zoom = room->room_info->ZoomFak;
 	room->set_zoom(zoom);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index a4c92f41961..491c0fbeb8a 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -125,7 +125,7 @@ void Room97::proc2() {
 	stop_person(P_CHEWY);
 	hide_cur();
 	Sdi[6].z_ebene = 6;
-	Sdi[18].z_ebene = 6;
+	Sdi[24].z_ebene = 6;
 	_G(spieler).flags36_1 = false;
 	spieler_mi[P_CHEWY].Mode = true;
 	go_auto_xy(455, 59, P_CHEWY, ANI_VOR);
@@ -158,12 +158,82 @@ void Room97::proc3() {
 		start_aad_wait(567, -1);
 		go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
 	} else {
-		
+		_G(spieler).flags36_1 = true;
+		HowardMov = 1;
+		go_auto_xy(572, 139, P_CHEWY, ANI_VOR);
+		Sdi[6].z_ebene = 6;
+		Sdi[24].z_ebene = 6;
+
+		go_auto_xy(530, 99, P_CHEWY, ANI_VOR);
+		go_auto_xy(496, 99, P_CHEWY, ANI_VOR);
+		go_auto_xy(455, 59, P_CHEWY, ANI_VOR);
+		go_auto_xy(440, 52, P_CHEWY, ANI_VOR);
+		if (!_G(spieler).flags36_80) {
+			go_auto_xy(572, 122, P_HOWARD, ANI_VOR);
+			go_auto_xy(526, 83, P_HOWARD, ANI_VOR);
+			go_auto_xy(500, 83, P_HOWARD, ANI_VOR);
+		}
+
+		auto_move(6, P_CHEWY);
+		if (!_G(spieler).flags36_80) {
+			go_auto_xy(442, 35, P_HOWARD, ANI_VOR);
+			go_auto_xy(497, 31, P_HOWARD, ANI_VOR);
+			start_aad_wait(562, -1);
+		}
+		spieler_mi[P_CHEWY].Mode = false;
+		Sdi[6].z_ebene = 166;
+		Sdi[24].z_ebene = 157;
+		_G(spieler).flags36_80 = true;
 	}
 	show_cur();
+	flags.AutoAniPlay = false;
 }
 
 void Room97::proc4() {
+	if (flags.AutoAniPlay)
+		return;
+
+	if (!_G(spieler).flags35_80) {
+		flags.AutoAniPlay = true;
+		hide_cur();
+		spieler_mi[P_CHEWY].Mode = true;
+		stop_person(P_CHEWY);
+		det->enable_sound(9, 0);
+		det->disable_sound(9, 1);
+		start_detail_wait(9, 1, ANI_VOR);
+		det->show_static_spr(21);
+
+		while (spieler_vector[P_HOWARD].Xypos[0] > 996)
+			set_up_screen(DO_SETUP);
+
+		det->show_static_spr(2);
+		HowardMov = 1;
+		
+		go_auto_xy(967, 111, P_CHEWY, ANI_VOR);
+		go_auto_xy(1008, 93, P_CHEWY, ANI_VOR);
+		go_auto_xy(1037, 99, P_CHEWY, ANI_VOR);
+
+		go_auto_xy(995, 77, P_HOWARD, ANI_VOR);
+		go_auto_xy(1047, 87, P_HOWARD, ANI_VOR);
+
+		start_detail_wait(29, 1, ANI_VOR);
+		det->hide_static_spr(21);
+		det->enable_sound(9, 1);
+		det->disable_sound(9, 0);
+		start_detail_wait(9, 0, ANI_RUECK);
+
+		go_auto_xy(1008, 93, P_CHEWY, ANI_VOR);
+		go_auto_xy(967, 111, P_CHEWY, ANI_VOR);
+		go_auto_xy(995, 82, P_HOWARD, ANI_VOR);
+		det->hide_static_spr(2);
+		spieler_mi[P_CHEWY].Mode = ANI_VOR;
+		start_spz(4, 255, false, P_CHEWY);
+		start_aad_wait(553, -1);
+		HowardMov = 0;
+		show_cur();
+	}
+		
+	flags.AutoAniPlay = false;
 }
 
 int Room97::proc5() {


Commit: 109d8f49aaf43c8f081f865b39e72ca77da14d75
    https://github.com/scummvm/scummvm/commit/109d8f49aaf43c8f081f865b39e72ca77da14d75
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Implementing loading and saving dialogue data to savegames

This also fixes some issues with creating the temporary file
copy of diah.adh that holds the dialogue state

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/datei.cpp
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/temp_file.cpp
    engines/chewy/temp_file.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 3b453a4b372..37bd3b72791 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -69,7 +69,7 @@ void ChewyEngine::initialize() {
 	_globals = new Globals();
 	_sound = new Sound(_mixer);
 
-	_tempFiles.add(ADSH_TMP);
+	_tempFiles.add(ADSH_TMP, 5710);
 	SearchMan.add("temp", &_tempFiles, 99, false);
 	setDebugger(new Debugger());
 }
@@ -86,6 +86,8 @@ Common::Error ChewyEngine::run() {
 	return Common::kNoError;
 }
 
+#define SCUMMVM_TAG MKTAG('S', 'C', 'V', 'M')
+
 Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 	exit_room(-1);
 
@@ -96,8 +98,13 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		return Common::kReadingFailed;
 
 	} else {
+		Common::SeekableWriteStream *adh = _tempFiles.createWriteStreamForMember(ADSH_TMP);
+		if (stream->readUint32BE() != SCUMMVM_TAG ||
+			stream->readUint32LE() != adh->size())
+			return Common::kReadingFailed;
+		adh->writeStream(stream, adh->size());
+
 		flags.LoadGame = true;
-		ERROR
 
 		if (_G(spieler).inv_cur == true && _G(spieler).AkInvent != -1) {
 			menu_item = CUR_USE;
@@ -133,17 +140,22 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAutosave) {
 	Common::Serializer s(nullptr, stream);
-	//int16 spr_nr;
-	int16 i;
-	//spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	for (i = 0; i < MAX_PERSON; i++) {
+
+	for (int i = 0; i < MAX_PERSON; i++) {
 		_G(spieler).X[i] = spieler_vector[i].Xypos[0];
 		_G(spieler).Y[i] = spieler_vector[i].Xypos[1];
 		_G(spieler).Phase[i] = person_end_phase[i];
 	}
 
-	return _G(spieler).synchronize(s) ? Common::kNoError :
-		Common::kWritingFailed;
+	if (!_G(spieler).synchronize(s))
+		return Common::kWritingFailed;
+
+	Common::SeekableReadStream *rs = _tempFiles.createReadStreamForMember(ADSH_TMP);
+	stream->writeUint32BE(SCUMMVM_TAG);
+	stream->writeUint32LE(rs->size());
+	stream->writeStream(rs);
+
+	return Common::kNoError;
 }
 
 SaveStateList ChewyEngine::listSaves() {
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 35f7b4e4ee3..1016cc7e314 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -1748,27 +1748,6 @@ void datei::fcopy(const char *d_fname, const char *s_fname) {
 	} else {
 		error("Could not find - %s", s_fname);
 	}
-
-#if 0
-	Common::File src;
-	Common::OutSaveFile *dest;
-
-	if (src.open(s_fname)) {
-		dest = g_system->getSavefileManager()->openForSaving(d_fname);
-		if (dest) {
-			dest->writeStream(&src);
-			delete dest;
-		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
-		}
-
-		src.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-#endif
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 190ed69e222..40e139e616d 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -237,6 +237,11 @@ void init_atds() {
 
 	atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
 	ERROR
+
+	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
+	atds->open_handle(ADSH_TMP, "rb", 3);
+	ERROR
+
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
 	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index b6976222bbd..b3526f7b4e7 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -185,10 +185,6 @@ int16 MainMenu::creditsFn(int16 key) {
 }
 
 void MainMenu::startGame() {
-	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
-	atds->open_handle(ADSH_TMP, "rb", 3);
-	ERROR
-
 	hide_cur();
 	animate();
 	exit_room(-1);
diff --git a/engines/chewy/temp_file.cpp b/engines/chewy/temp_file.cpp
index 1669064a8cc..8a68ebf9340 100644
--- a/engines/chewy/temp_file.cpp
+++ b/engines/chewy/temp_file.cpp
@@ -20,39 +20,77 @@
  */
 
 #include "chewy/temp_file.h"
+#include "common/file.h"
 
 namespace Chewy {
 
+TempFileArchive::Entry::Entry(const Common::String &name) :
+		_name(name), _data(nullptr), _size(0) {
+}
+
+TempFileArchive::Entry::~Entry() {
+	delete[] _data;
+}
+
+void TempFileArchive::Entry::allocate(size_t maxSize) {
+	_data = new byte[maxSize];
+	_size = maxSize;
+}
+
 bool TempFileArchive::FileProxy::eos() const {
-	return _src->eos();
+	return _pos >= _size;
 }
 
 uint32 TempFileArchive::FileProxy::read(void *dataPtr, uint32 dataSize) {
-	return _src->read(dataPtr, dataSize);
+	int bytesRemaining = MIN(_size - _pos, (int32)dataSize);
+	Common::copy(_ptr + _pos, _ptr + _pos + bytesRemaining, (byte *)dataPtr);
+	_pos += bytesRemaining;
+	assert(_pos >= 0 && _pos <= 0xffff);
+
+	return bytesRemaining;
+}
+
+uint32 TempFileArchive::FileProxy::write(const void *dataPtr, uint32 dataSize) {
+	assert((int32)(_pos + dataSize) <= _size);
+	Common::copy((const byte *)dataPtr, (const byte *)dataPtr + dataSize, _ptr + _pos);
+	_pos += dataSize;
+	assert(_pos >= 0 && _pos <= 0xffff);
+
+	return dataSize;
 }
 
 int64 TempFileArchive::FileProxy::pos() const {
-	return _src->pos();
+	return _pos;
 }
 
 int64 TempFileArchive::FileProxy::size() const {
-	return _src->size();
+	return _size;
 }
 
 bool TempFileArchive::FileProxy::seek(int64 offset, int whence) {
-	return _src->seek(offset, whence);
-}
+	switch (whence) {
+	case SEEK_END:
+		offset = size() + offset;
+		// Fall through
+	case SEEK_SET:
+		// Fall through
+	default:
+		_pos = offset;
+		break;
+	case SEEK_CUR:
+		_pos += offset;
+		break;
+	}
 
-uint32 TempFileArchive::FileProxy::write(const void *dataPtr, uint32 dataSize) {
-	return _src->write(dataPtr, dataSize);
+	assert(_pos >= 0 && _pos <= 0xffff);
+	return true;
 }
 
 bool TempFileArchive::FileProxy::flush() {
-	return _src->flush();
+	return true;
 }
 
 void TempFileArchive::FileProxy::finalize() {
-	_src->finalize();
 }
 
 
@@ -100,10 +138,7 @@ Common::SeekableReadStream *TempFileArchive::createReadStreamForMember(
 	if (!entry)
 		return nullptr;
 
-	Common::MemoryReadWriteStream *stream =
-		const_cast<Common::MemoryReadWriteStream *>(&entry->_stream);
-	stream->seek(0, SEEK_SET);
-	return new FileProxy(stream);
+	return new FileProxy(entry->_data, entry->_size);
 }
 
 Common::SeekableWriteStream *TempFileArchive::createWriteStreamForMember(const Common::Path &path) {
@@ -111,10 +146,7 @@ Common::SeekableWriteStream *TempFileArchive::createWriteStreamForMember(const C
 	if (!entry)
 		return nullptr;
 
-	Common::MemoryReadWriteStream *stream =
-		const_cast<Common::MemoryReadWriteStream *>(&entry->_stream);
-	stream->seek(0, SEEK_SET);
-	return new FileProxy(stream);
+	return new FileProxy(entry->_data, entry->_size);
 }
 
-}
+} // namespace Chewy
diff --git a/engines/chewy/temp_file.h b/engines/chewy/temp_file.h
index 71f5de45292..b8bc1cfc8b9 100644
--- a/engines/chewy/temp_file.h
+++ b/engines/chewy/temp_file.h
@@ -33,20 +33,24 @@ namespace Chewy {
 class TempFileArchive : public Common::Archive {
 	struct Entry {
 		Common::String _name;
-		Common::MemoryReadWriteStream _stream;
-		Entry() : _stream(DisposeAfterUse::YES) {}
-		Entry(const Common::String &name) : _name(name),
-			_stream(DisposeAfterUse::YES) {}
+		byte *_data;
+		size_t _size;
+		Entry() : _data(nullptr), _size(0) {}
+		Entry(const Common::String &name);
+		~Entry();
+
+		void allocate(size_t maxSize);
 	};
 	typedef Common::List<Entry> EntryList;
 
 	class FileProxy : public Common::SeekableReadStream,
 		public Common::SeekableWriteStream {
 	private:
-		Common::MemoryReadWriteStream *_src;
+		byte *_ptr;
+		int32 _pos, _size;
 	public:
-		FileProxy(Common::MemoryReadWriteStream *src) : _src(src) {
-		}
+		FileProxy(byte *ptr, size_t ptrSize) :
+			_ptr(ptr), _size(ptrSize), _pos(0) {}
 
 		bool eos() const override;
 		uint32 read(void *dataPtr, uint32 dataSize) override;
@@ -74,8 +78,9 @@ public:
 	/**
 	 * Registers a temporary file by name.
 	 */
-	void add(const Common::String &name) {
+	void add(const Common::String &name, size_t maxSize) {
 		_files.push_back(Entry(name));
+		_files.back().allocate(maxSize);
 	}
 
 	/**


Commit: 39698fa76d162a784c00fbd01837fd0e77cb6795
    https://github.com/scummvm/scummvm/commit/39698fa76d162a784c00fbd01837fd0e77cb6795
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Room 97 compilation fix

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 491c0fbeb8a..9bfdf8d156d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+bool Room97::r97_bool18DB32;
+int Room97::r97_word18DB2E;
+int Room97::r97_word18DB34;
+int Room97::r97_word18DB36;
+int Room97::r97_word18DB38;
+
 void Room97::entry() {
 	det->enable_sound(0, 0);
 	det->play_sound(0, 0);


Commit: 54038a387204dc3a6f5583e5d1ec48078a5e6bb9
    https://github.com/scummvm/scummvm/commit/54038a387204dc3a6f5583e5d1ec48078a5e6bb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Fix writing dialogue state updates after talk finishes

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/menus.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index d1a89cbc7fe..52625992645 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -450,21 +450,24 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	ChunkHead Ch;
 	if (atdshandle[ADH_HANDLE]) {
 		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
-
 		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
 			atdshandle[ADH_HANDLE]);
+
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 		if (!Ch.load(rs)) {
 			modul = DATEI;
 			fcode = READFEHLER;
 		} else {
-			//chewy_fseek(atdshandle[ADH_HANDLE], 0, SEEK_CUR);
 			if (Ch.size) {
-				if (!chewy_fwrite(atdsmem[ADH_HANDLE], Ch.size, 1, atdshandle[ADH_HANDLE])) {
+				Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
+				ws->seek(rs->pos());
+				if (ws->write(atdsmem[ADH_HANDLE], Ch.size) != Ch.size) {
 					fcode = WRITEFEHLER;
 					modul = DATEI;
 				}
+
+				delete ws;
 			}
 		}
 	} else {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index e69a9e25f7a..c82c2c5444a 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -894,8 +894,8 @@ void ads_menu() {
 	int16 cur_y_start;
 	int16 col;
 	AdsNextBlk *an_blk;
-	if (flags.AdsDialog) {
 
+	if (flags.AdsDialog) {
 		flags.ShowAtsInvTxt = false;
 		flags.MainInput = false;
 		if (ads_item_anz > 4)
@@ -927,6 +927,7 @@ void ads_menu() {
 				out->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
 			}
 		}
+
 		switch (in->get_switch_code()) {
 		case 255:
 		case ENTER:
@@ -960,7 +961,6 @@ void ads_menu() {
 		default:
 			ads_push = false;
 			break;
-
 		}
 	}
 }


Commit: 932541bf9015f33ed5da4d53b337fde58b26f7a5
    https://github.com/scummvm/scummvm/commit/932541bf9015f33ed5da4d53b337fde58b26f7a5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: Fix using bucket in room 8

Changed paths:
    engines/chewy/rooms/room8.cpp


diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index 84c01b19103..0d8bd9f0ea0 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -111,7 +111,7 @@ void Room8::start_verbrennen() {
 }
 
 bool Room8::gips_wurf() {
-	if (!is_cur_inventar(GIPS_EIMER_INV)) {
+	if (is_cur_inventar(GIPS_EIMER_INV)) {
 		hide_cur();
 		det->load_taf_seq(116, 30, 0);
 		auto_move(2, P_CHEWY);


Commit: 6b6a0b74eee13ec0f337bf7fd23f2dde882fe3a7
    https://github.com/scummvm/scummvm/commit/6b6a0b74eee13ec0f337bf7fd23f2dde882fe3a7
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:29-08:00

Commit Message:
CHEWY: For implementation consistency, move R97 variables to spieler

Changed paths:
    engines/chewy/rooms/room97.cpp
    engines/chewy/rooms/room97.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 9bfdf8d156d..f39a5de309d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -29,12 +29,6 @@
 namespace Chewy {
 namespace Rooms {
 
-bool Room97::r97_bool18DB32;
-int Room97::r97_word18DB2E;
-int Room97::r97_word18DB34;
-int Room97::r97_word18DB36;
-int Room97::r97_word18DB38;
-
 void Room97::entry() {
 	det->enable_sound(0, 0);
 	det->play_sound(0, 0);
@@ -48,7 +42,7 @@ void Room97::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 42;
 
-	r97_bool18DB32 = false;
+	_G(spieler).r97_bool18DB32 = false;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 97;
 	_G(zoom_mov_fak) = 0;
 	_G(spieler).ScrollxStep = 2;
@@ -89,10 +83,10 @@ void Room97::entry() {
 	if (_G(spieler).flags37_4)
 		det->show_static_spr(20);
 
-	r97_word18DB2E = 0;
-	r97_word18DB34 = 332;
-	r97_word18DB36 = 110;
-	r97_word18DB38 = 132;
+	_G(spieler).r97_word18DB2E = 0;
+	_G(spieler).r97_word18DB34 = 332;
+	_G(spieler).r97_word18DB36 = 110;
+	_G(spieler).r97_word18DB38 = 132;
 
 	if (!flags.ExitMov) {
 		hide_cur();
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
index bd46a86fe8e..7c02be57225 100644
--- a/engines/chewy/rooms/room97.h
+++ b/engines/chewy/rooms/room97.h
@@ -26,13 +26,6 @@ namespace Chewy {
 namespace Rooms {
 
 class Room97 {
-private:
-	static bool r97_bool18DB32;
-	static int r97_word18DB2E;
-	static int r97_word18DB34;
-	static int r97_word18DB36;
-	static int r97_word18DB38;
-
 public:
 	static void entry();
 	static void xit();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 1c4daa98e83..84221363523 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -498,6 +498,12 @@ struct Spieler : public SpielerFlags {
 	bool SpeechSwitch = false;
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
+
+	bool r97_bool18DB32 = false;
+	int r97_word18DB2E = 0;
+	int r97_word18DB34 = 0;
+	int r97_word18DB36 = 0;
+	int r97_word18DB38 = 0;
 };
 
 struct AutoMov {


Commit: f62bd8337fab0d501b9ff377a31e6e7f0e016598
    https://github.com/scummvm/scummvm/commit/f62bd8337fab0d501b9ff377a31e6e7f0e016598
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Implement room 97 proc 5 and 6, use some enum values in some other function calls

Changed paths:
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 40e139e616d..e715f532e4a 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -530,7 +530,7 @@ void show_intro() {
 	if (!ConfMan.getBool("shown_intro")) {
 		ConfMan.setBool("shown_intro", true);
 		flags.NoPalAfterFlc = true;
-		flic_cut(135, 0);
+		flic_cut(135, CFO_MODE);
 	}
 }
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index b3526f7b4e7..33c3cd3ec87 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -91,7 +91,7 @@ void MainMenu::execute() {
 			fx->border(workpage, 100, 0, 0);
 			out->setze_zeiger(workptr);
 			flags.NoPalAfterFlc = true;
-			flic_cut(135, 0);
+			flic_cut(135, CFO_MODE);
 			break;
 
 		case MM_LOAD_GAME:
@@ -117,7 +117,7 @@ void MainMenu::execute() {
 			fx->border(workpage, 100, 0, 0);
 			flags.NoPalAfterFlc = true;
 			flc->set_custom_user_function(creditsFn);
-			flic_cut(159, 0);
+			flic_cut(159, CFO_MODE);
 			flc->remove_custom_user_function();
 			fx->border(workpage, 100, 0, 0);
 			break;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 34b248235ce..eb3a613cce3 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -2133,7 +2133,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_CART_FACH_R18:
 		_G(cur_hide_flag) = false;
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		_G(spieler).R18CartFach = 1;
+		_G(spieler).R18CartFach = true;
 		del_inventar(_G(spieler).AkInvent);
 		det->show_static_spr(7);
 		atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index f89f67baff8..eadf68494f3 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -86,7 +86,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			if (!_G(spieler).R0SlimeUsed) {
 				start_aad_wait(42, -1);
 				auto_move(5, P_CHEWY);
-				set_person_spr(0, 0);
+				set_person_spr(P_LEFT, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
 					start_spz(CH_TALK3, 255, false, P_CHEWY);
@@ -130,11 +130,11 @@ bool Room0::getPillow() {
 		hide_cur();
 		flags.AutoAniPlay = true;
 		auto_move(1, P_CHEWY);
-		start_spz_wait(13, 1, 0, 0);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
 		menu_item = 0;
 		cursor_wahl(0);
-		atds->set_steuer_bit(174, 1, 1);
+		atds->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
 		det->hide_static_spr(6);
 
 		flags.AutoAniPlay = false;
@@ -156,7 +156,7 @@ bool Room0::pullSlime() {
 		invent_2_slot(1);
 		menu_item = 0;
 		cursor_wahl(0);
-		atds->set_steuer_bit(175, 1, 1);
+		atds->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
 		flags.AutoAniPlay = false;
 		show_cur();
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index c33b43106bb..beb68a1579b 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -179,11 +179,11 @@ void Room49::use_boy_cigar() {
 	int16 zoom = room->room_info->ZoomFak;
 	room->set_zoom(zoom);
 	go_auto_xy(416, 79, P_HOWARD, ANI_VOR);
-	set_person_spr(0, 1);
+	set_person_spr(P_LEFT, P_HOWARD);
 	flags.NoScroll = true;
 
 	auto_scroll(164, 0);
-	flic_cut(67, 0);
+	flic_cut(67, CFO_MODE);
 	test_intro(17);
 	ERROR
 
@@ -193,13 +193,13 @@ void Room49::use_boy_cigar() {
 	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
 	flags.NoScroll = false;
-	set_person_spr(1, 0);
+	set_person_spr(P_RIGHT, P_CHEWY);
 	start_aad_wait(264, -1);
 	room->set_zoom(zoom);
 
 	obj->add_inventar(68, &room_blk);
 	inventory_2_cur(68);
-	atds->set_steuer_bit(318, 1, 1);
+	atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
 	SetUpScreenFunc = setup_func;
 	_G(spieler).R49BoyWeg = true;
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index f39a5de309d..ce40c67bf9d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -226,7 +226,7 @@ void Room97::proc4() {
 		go_auto_xy(967, 111, P_CHEWY, ANI_VOR);
 		go_auto_xy(995, 82, P_HOWARD, ANI_VOR);
 		det->hide_static_spr(2);
-		spieler_mi[P_CHEWY].Mode = ANI_VOR;
+		spieler_mi[P_CHEWY].Mode = false;
 		start_spz(4, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
 		HowardMov = 0;
@@ -237,11 +237,66 @@ void Room97::proc4() {
 }
 
 int Room97::proc5() {
-	return 0;
+	if (!is_cur_inventar(114))
+		return 0;
+
+	hide_cur();
+	auto_move(0, P_CHEWY);
+	auto_scroll(800, 0);
+	
+	while (spieler_vector[P_HOWARD].Xypos[0] < 1080)
+		set_up_screen(DO_SETUP);
+
+	flic_cut(122, CFO_MODE);
+
+	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+	start_detail_wait(0, 1, ANI_VOR);
+	det->show_static_spr(13);
+	start_detail_wait(13, 1, ANI_VOR);
+	det->start_detail(14, 255, false);
+	start_aad_wait(555, -1);
+	_G(spieler).flags36_40 = true;
+	atds->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(535, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	
+	show_cur();
+	return 1;
 }
 
 int Room97::proc6() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(298, 120, P_CHEWY, ANI_VOR);
+	set_person_spr(P_LEFT, P_CHEWY);
+	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+	det->hide_static_spr(15);
+	start_detail_wait(1, 1, ANI_VOR);
+	det->show_static_spr(28);
+	auto_move(1, P_CHEWY);
+	det->hide_static_spr(18);
+	start_detail_wait(15, 1, ANI_VOR);
+	det->show_static_spr(17);
+	start_spz(4, 255, false, P_CHEWY);
+	start_aad_wait(558, -1);
+	det->hide_static_spr(28);
+	det->stop_detail(5);
+	det->show_static_spr(15);
+	_G(spieler).flags36_2 = true;
+	atds->del_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_steuer_bit(531, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_ats_str(530, 1, ATS_DATEI);
+	atds->set_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
+	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler).flags36_8 = true;
+
+	show_cur();
+	return 1;
 }
 
 int Room97::proc7() {


Commit: ecf76678db34a6142dd62d08435c0abceffe8c2c
    https://github.com/scummvm/scummvm/commit/ecf76678db34a6142dd62d08435c0abceffe8c2c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Implement room 97 proc 7 to 10, use enums in various places where cursors are involved

Changed paths:
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index e715f532e4a..f5e567d587b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -123,7 +123,7 @@ void var_init() {
 
 	life_handler = false;
 	_G(auto_p_nr) = 0;
-	menu_item = 0;
+	menu_item = CUR_WALK;
 	inventar_nr = 0;
 	_G(ged_mov_ebene) = 1;
 	new_game();
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 1c98bdf697b..d3efd7df0be 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -869,7 +869,7 @@ void kb_cur_action(int16 key, int16 mode) {
 			if (menu_item < 5)
 				++menu_item;
 			else
-				menu_item = 0;
+				menu_item = CUR_WALK;
 			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
 			cur->move(maus_menu_x, 100);
 		}
@@ -880,7 +880,7 @@ void kb_cur_action(int16 key, int16 mode) {
 			if (menu_item > 0)
 				--menu_item;
 			else
-				menu_item = 5;
+				menu_item = CUR_INVENT;
 			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
 			cur->move(maus_menu_x, 100);
 		}
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 33c3cd3ec87..8a889885bc5 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -58,7 +58,7 @@ void MainMenu::execute() {
 		ailsnd->end_sound();
 		SetUpScreenFunc = screenFunc;
 
-		cursor_wahl(20);
+		cursor_wahl(CUR_ZEIGE);
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
@@ -100,7 +100,7 @@ void MainMenu::execute() {
 			break;
 
 		case MM_CINEMA:
-			cursor_wahl(4);
+			cursor_wahl(CUR_SAVE);
 			cur->move(152, 92);
 			minfo.x = 152;
 			minfo.y = 92;
@@ -218,8 +218,8 @@ void MainMenu::startGame() {
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	fx_blend = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = 0;
-	cursor_wahl(0);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
 	enter_room(-1);
 	_G(auto_obj) = 0;
 }
@@ -230,7 +230,7 @@ bool MainMenu::loadGame() {
 	out->setze_zeiger(screen0);
 	out->set_fontadr(font6x8);
 	out->set_vorschub(fvorx6x8, fvory6x8);
-	cursor_wahl(4);
+	cursor_wahl(CUR_SAVE);
 	cur->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
@@ -238,7 +238,7 @@ bool MainMenu::loadGame() {
 	int result = file_menue();
 
 	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
-		menu_item == 1) ? 8 : 0);
+		menu_item == CUR_USE) ? 8 : 0);
 	_G(cur_display) = true;
 	restorePersonAni();
 	flags.SaveMenu = false;
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index eadf68494f3..f958cb8bc79 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -132,8 +132,8 @@ bool Room0::getPillow() {
 		auto_move(1, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
-		menu_item = 0;
-		cursor_wahl(0);
+		menu_item = CUR_WALK;
+		cursor_wahl(CUR_WALK);
 		atds->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
 		det->hide_static_spr(6);
 
@@ -154,8 +154,8 @@ bool Room0::pullSlime() {
 		set_person_pos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
-		menu_item = 0;
-		cursor_wahl(0);
+		menu_item = CUR_WALK;
+		cursor_wahl(CUR_WALK);
 		atds->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
 		flags.AutoAniPlay = false;
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index ce40c67bf9d..3e4e778031e 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -300,19 +300,132 @@ int Room97::proc6() {
 }
 
 int Room97::proc7() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	det->hide_static_spr(17);
+	start_detail_wait(22, 1, ANI_VOR);
+	atds->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_ats_str(530, 2, ATS_DATEI);
+	new_invent_2_cur(SLIME_INV);
+	_G(spieler).flags36_4 = true;
+	set_person_pos(304, 102, 0, P_RIGHT);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	auto_move(1, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = false;
+
+	show_cur();
+	return 1;
 }
 
 int Room97::proc8() {
-	return 0;
+	if (!is_cur_inventar(94))
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	int diaNr = -1;
+	if (!_G(spieler).flags36_2)
+		diaNr = 559;
+	else if (!_G(spieler).flags36_4)
+		diaNr = 560;
+	else {
+		start_spz_wait(14, 1, false, P_CHEWY);
+		det->start_detail(11, 255, false);
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).flags36_10 = true;
+		_G(spieler).flags36_8 = false;
+		det->start_detail(12, 255, false);
+		atds->set_ats_str(530, 3, ATS_DATEI);
+		atds->del_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(532, 1, ATS_DATEI);
+		det->start_detail(6, 255, false);
+		det->hide_static_spr(14);
+		auto_move(3, P_CHEWY);
+		auto_scroll(406, 0);
+		wait_show_screen(40);
+		det->stop_detail(24);
+		det->enable_sound(26, 0);
+		det->play_sound(26, 0);
+		start_detail_wait(25, 1, ANI_VOR);
+		det->start_detail(26, 255, false);
+		det->stop_detail(23);
+		det->start_detail(27, 255, false);
+		wait_show_screen(80);
+		auto_move(4, P_CHEWY);
+		auto_scroll(646, 0);
+		start_aad_wait(566, -1);
+		wait_show_screen(60);
+		start_aad_wait(567, -1);
+		det->stop_detail(26);
+		det->stop_detail(27);
+		_G(spieler).flags36_20 = true;
+		det->start_detail(28, 255, false);
+		det->set_detail_pos(27, 272, 110);
+		det->start_detail(27, 255, false);
+		atds->set_steuer_bit(533, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(534, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (diaNr != -1) {
+		start_spz(4, 255, false, P_CHEWY);
+		start_aad_wait(diaNr, -1);
+	}
+
+	show_cur();
+	return 1;
 }
 
 int Room97::proc9() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(5, P_CHEWY);
+	
+	if (!_G(spieler).flags36_20) {
+		start_spz(4, 255, false, P_CHEWY);
+		start_aad_wait(556, -1);
+	} else {
+		start_spz_wait(13, 1, false, P_CHEWY);
+		start_detail_wait(0, 1, ANI_VOR);
+		det->show_static_spr(13);
+		start_detail_wait(13, 1, ANI_VOR);
+		det->start_detail(14, 255, false);
+		start_aad_wait(555, -1);
+		_G(spieler).flags36_40 = true;
+		atds->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(535, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	show_cur();
+	return 1;
 }
 
 int Room97::proc10() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(8, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->enable_sound(7, 0);
+	det->disable_sound(7, 1);
+	start_detail_wait(7, 1, ANI_VOR);
+	det->show_static_spr(19);
+	_G(spieler).flags37_1 = true;
+	atds->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+
+	show_cur();
+	return 1;
 }
 
 int Room97::proc11() {


Commit: f6ca439746b4e77183e886ccbaebfe4e46d7ea94
    https://github.com/scummvm/scummvm/commit/f6ca439746b4e77183e886ccbaebfe4e46d7ea94
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Implement room 97 proc 11 to 15

Changed paths:
    engines/chewy/rooms/room97.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 3e4e778031e..4a7fee3de1c 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -429,20 +429,128 @@ int Room97::proc10() {
 }
 
 int Room97::proc11() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+
+	if (!_G(spieler).flags37_2) {
+		start_spz(4, 255, false, P_CHEWY);
+		start_aad_wait(569, -1);
+	} else {
+		auto_move(9, P_CHEWY);
+		start_aad_wait(570, -1);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		auto_move(7, P_CHEWY);
+		start_spz(5, 255, false, P_CHEWY);
+		start_aad_wait(571, -1);
+		det->enable_sound(4, 0);
+		det->play_sound(4, 0);
+		det->start_detail(4, 1, false);
+		auto_move(12, P_CHEWY);
+		start_spz_wait(64, 1, false, P_CHEWY);
+		start_spz(65, 255, false, P_CHEWY);
+		start_aad_wait(561, -1);
+		_G(spieler).SVal1 = 97;
+		_G(spieler).SVal2 = 523;
+		cur_2_inventory();
+		_G(spieler).flags37_8 = true;
+		switch_room(92);
+		show_cur(); // probably useless, but present in the original
+	}
+
+	show_cur();
+	return 1;
 }
 
 void Room97::proc12() {
+	if (!_G(spieler).flags37_1) {
+		stop_person(P_CHEWY);
+		set_person_pos(491, 42, P_CHEWY, P_RIGHT);
+		return;
+	}
+
+	if (flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	hide_cur();
+	stop_person(P_CHEWY);
+	det->show_static_spr(26);
+	go_auto_xy(481, 39, P_CHEWY, ANI_VOR);
+	_G(spieler).PersonHide[0] = true;
+	set_person_pos(327, 42, P_CHEWY, P_LEFT);
+	wait_show_screen(50);
+	set_person_pos(347, 42, P_CHEWY, P_LEFT);
+	_G(spieler).PersonHide[0] = false;
+	det->hide_static_spr(26);
+	spieler_mi[P_CHEWY].Mode = false;
+	show_cur();
+	flags.AutoAniPlay = false;
 }
 
 void Room97::proc13() {
+	if (!_G(spieler).flags37_1 || flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	hide_cur();
+	stop_person(P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = true;
+	det->show_static_spr(26);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	set_person_pos(508, 41, P_CHEWY, P_LEFT);
+	wait_show_screen(50);
+	set_person_pos(488, 41, P_CHEWY, P_LEFT);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	auto_move(6, P_CHEWY);
+	det->hide_static_spr(26);
+	spieler_mi[P_CHEWY].Mode = false;
+	show_cur();
+	flags.AutoAniPlay = false;
 }
 
 int Room97::proc14() {
-	return 0;
+	if (!is_cur_inventar(SLIME_INV))
+		return 0;
+
+	_G(spieler).r97_bool18DB30 = true;
+	hide_cur();
+	del_inventar(_G(spieler).AkInvent);
+	menu_item = CUR_USE;
+	cursor_wahl(CUR_USE);
+	
+	return 1;
 }
 
 void Room97::proc15() {
+	if (_G(spieler).flags37_4 || flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	stop_person(P_CHEWY);
+	menu_item = CUR_USE;
+	cursor_wahl(CUR_USE);
+	set_person_pos(294, 42, P_CHEWY, P_LEFT);
+	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
+	
+	mov     edi, 1
+
+	while (true) {
+		if (det->get_ani_detail(16) == nullptr) {
+			start_detail_wait(17, 1, ANI_VOR);
+			det->start_detail(16, 1, true);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(20, 1, false);
+			set_person_pos(318, 42, P_CHEWY, P_LEFT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			break;
+		}
+	}
+
+	atds->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
+	show_cur();
+	flags.AutoAniPlay = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 84221363523..f9f7a8df22f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -499,6 +499,7 @@ struct Spieler : public SpielerFlags {
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
 
+	bool r97_bool18DB30 = false;
 	bool r97_bool18DB32 = false;
 	int r97_word18DB2E = 0;
 	int r97_word18DB34 = 0;


Commit: 6bf43bf31066f15b15f69601872b3147505ddf2b
    https://github.com/scummvm/scummvm/commit/6bf43bf31066f15b15f69601872b3147505ddf2b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Add release changes to calc_maus_txt

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index d3efd7df0be..7e32e4fa574 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1429,30 +1429,27 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 	action_flag = false;
 	ret = -1;
 	inv_no_use_mode = -1;
+
 	if (mode == DO_SETUP) {
 		if (flags.ShowAtsInvTxt) {
 			inv_no_use_mode = AUTO_OBJ;
 			txt_nr = calc_mouse_mov_obj(&idx);
+
 			if (txt_nr == -1) {
 				idx = det->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
 				if (idx != -1) {
 					txt_nr = Rdi->mtxt[idx];
 					inv_no_use_mode = DETEDIT_REC;
-				} else {
-					idx = det->mouse_on_detail(minfo.x, minfo.y, _G(spieler).scrollx, _G(spieler).scrolly);
-					if (idx != -1) {
-						inv_no_use_mode = DETAIL_OBJ;
-						txt_nr = 255;
-					}
 				}
-			} else
-				inv_no_use_mode = AUTO_OBJ;
+			}
 
 			if (txt_nr != -1) {
-				ret = txt_nr;
+				ret = -1;
+
 				if (_G(maus_links_click) && !flags.MausTxt) {
 					ok = true;
 					flags.MausTxt = true;
+
 					switch (menu_item) {
 					case CUR_LOOK:
 						txt_mode = TXT_MARK_LOOK;
@@ -1474,11 +1471,11 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					case CUR_TALK:
 						txt_mode = TXT_MARK_TALK;
 						break;
-
 					}
+
 					action_ret = 0;
 					if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-						if (menu_item != CUR_WALK) {
+						if (menu_item != CUR_WALK && menu_item != CUR_USE) {
 							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
@@ -1489,26 +1486,30 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_VOR);
 					}
-
+					
 					if (ok && !atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (start_ats_wait(txt_nr, txt_mode, 14, ATS_DATEI))
 							disp_flag = false;
 					} else {
 						ret = -1;
 					}
-
+					
 					if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_NACH);
 						action_flag = true;
+						if (action_ret)
+							ret = 1;
 					}
-
+					
 					if (!ok && !action_ret) {
 						if (inv_no_use_mode != -1 && !atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							action_flag = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
+							if (action_flag)
+								ret = txt_nr;
 						}
 					}
-
-					if (ok && !action_ret && menu_item == CUR_USE && disp_flag) {
+					
+					if (ok && !action_ret && txt_mode == TXT_MARK_USE && disp_flag) {
 						if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							if (menu_item != CUR_WALK) {
 								if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
@@ -1518,12 +1519,16 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 							}
 							r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
 							action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+							if (action_flag)
+								ret = txt_nr;
 						}
 					}
+
 					flags.MausTxt = false;
 				} else {
 					ret = -1;
 				}
+
 				if (disp_flag && !action_flag) {
 					char *str_ = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
@@ -1535,11 +1540,12 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 							print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 					}
 				}
-			}
-			else
+			} else {
 				ret = -1;
+			}
 		}
 	}
+
 	return ret;
 }
 


Commit: a04d401e7464302aa8fb5add749540afa19ecc08
    https://github.com/scummvm/scummvm/commit/a04d401e7464302aa8fb5add749540afa19ecc08
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Add stop check to atdsys::start_ats

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 52625992645..197a1bfbd2d 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -542,6 +542,9 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 	*voc_nr = -1;
 	set_ats_mem(mode);
 	if (atsmem) {
+		if (atsv.Display)
+			stop_ats();
+
 		atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
 		if (atsv.Ptr) {
 			atsv.Display = true;
@@ -1424,6 +1427,7 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 				fcode = OPENFEHLER;
 			}
 		}
+
 		iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
 		ok = false;
 		for (i = 0; i < INV_STRC_ANZ && !ok; i++) {


Commit: fa1241bc9d5ffba669738c44e436e72296ec7b9c
    https://github.com/scummvm/scummvm/commit/fa1241bc9d5ffba669738c44e436e72296ec7b9c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:30-08:00

Commit Message:
CHEWY: Room 97 compilation fix

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 4a7fee3de1c..2f13be9aebd 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -534,7 +534,7 @@ void Room97::proc15() {
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
 	
-	mov     edi, 1
+//	mov     edi, 1
 
 	while (true) {
 		if (det->get_ani_detail(16) == nullptr) {


Commit: 37ca369e9daa9a01ca7bb321d0e5465c171c19a0
    https://github.com/scummvm/scummvm/commit/37ca369e9daa9a01ca7bb321d0e5465c171c19a0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:31-08:00

Commit Message:
CHEWY: Fix TAP_OFF constants for release game

Changed paths:
    engines/chewy/defines.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 0ab5f14ecb1..f06331d854b 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -30,8 +30,8 @@ namespace Chewy {
 #define ADS_TAP_MAX 500
 #define ATS_TAP_MAX 100
 #define AAD_TAP_MAX 100
-#define INV_TAP_MAX 100
-#define USE_TAP_MAX 100
+#define INV_TAP_MAX 140
+#define USE_TAP_MAX 140
 
 #define ADS_TAP_OFF 0
 #define ATS_TAP_OFF ADS_TAP_MAX


Commit: 31ba5c39edabd07d500f99a91fb52ea78abf027b
    https://github.com/scummvm/scummvm/commit/31ba5c39edabd07d500f99a91fb52ea78abf027b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:31-08:00

Commit Message:
CHEWY: Finish the implementation of room 97

Changed paths:
    engines/chewy/rooms/room97.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 2f13be9aebd..6ac5cb0f52f 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -114,7 +114,101 @@ void Room97::xit() {
 }
 
 void Room97::setup_func() {
-	warning("STUB Room97::setup_func");
+	spieler_mi[P_CHEWY].Vorschub = 4;
+	spieler_mi[P_HOWARD].Vorschub = 6;
+	spieler_mi[P_NICHELLE].Vorschub = 4;
+
+	if (_G(spieler).flags35_80 && spieler_vector->Xypos[P_CHEWY] > 830)
+		set_person_pos(830, 98, P_CHEWY, P_RIGHT);
+
+	if (_G(spieler).r97_word18DB2E)
+		--_G(spieler).r97_word18DB2E;
+	else {
+		_G(spieler).r97_word18DB2E = _G(spieler).DelaySpeed / 2;
+		if (_G(spieler).r97_word18DB34 != 710)
+			_G(spieler).r97_word18DB34 += 2;
+		else if (_G(spieler).r97_word18DB36 < 200) {
+			_G(spieler).r97_word18DB36 += 2;
+			_G(spieler).r97_word18DB38 += 2;
+		} else {
+			if (!_G(spieler).flags36_8) {
+				_G(spieler).r97_word18DB34 = 332;
+				_G(spieler).r97_word18DB36 = _G(spieler).flags36_10 ? 106 : 110;
+			}
+			_G(spieler).r97_bool18DB3A = true;
+		}
+
+		if (_G(spieler).r97_bool18DB3A) {
+			if (_G(spieler).r97_word18DB38 <= 132)
+				_G(spieler).r97_bool18DB3A = false;
+			else
+				_G(spieler).r97_word18DB38 -= 2;
+		}
+
+		det->set_static_pos(16, 699, _G(spieler).r97_word18DB38, false, false);
+		if (_G(spieler).flags36_10) {
+			det->set_detail_pos(12, _G(spieler).r97_word18DB34, _G(spieler).r97_word18DB36);
+		} else {
+			det->set_static_pos(14, _G(spieler).r97_word18DB34, _G(spieler).r97_word18DB36, false, false);
+		}
+	}
+
+	if (!_G(spieler).flags37_1 && menu_item == CUR_WALK) {
+		if (_G(spieler).scrollx + minfo.x >= 487 && _G(spieler).scrollx + minfo.x <= 522 && minfo.y >= 23 && minfo.y <= 59)
+			cursor_wahl(CUR_AUSGANG_OBEN);
+		else
+			cursor_wahl(CUR_WALK);
+	}
+
+	calc_person_look();
+
+	const int chewyPosX = spieler_vector[P_CHEWY].Xypos[0];
+	if (!_G(spieler).flags36_80) {
+		int destX, destY;
+
+		if (chewyPosX > 980) {
+			destX = 1000;
+			destY = 91;
+		} else if (chewyPosX > 880) {
+			destX = 994;
+			destY = 98;
+		} else if (chewyPosX > 780) {
+			destX = 824;
+			destY = 80;
+		} else if (chewyPosX > 650) {
+			destX = 758;
+			destY = 121;
+		} else if (chewyPosX > 420) {
+			destX = 590;
+			destY = 111;
+		} else {
+			destX = 412;
+			destY = 112;
+		}
+
+		if (HowardMov != 1)
+			go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
+	}
+
+	if (!_G(spieler).r97_bool18DB32)
+		return;
+
+	int destX = -1;
+	int destY = -1;
+	const int nichellePosX = spieler_vector[P_NICHELLE].Xypos[0];
+	if (chewyPosX > 250 && nichellePosX < 232) {
+		destX = 232;
+		destY = 27;
+	} else if (nichellePosX >= 249) {
+		destX = 370;
+		destY = 20;
+	} else if (nichellePosX >= 232) {
+		destX = 249;
+		destY = 20;
+	}	
+	
+	if (destX != -1)
+		go_auto_xy(destX, destY, P_NICHELLE, ANI_GO);
 }
 
 void Room97::proc2() {
@@ -534,18 +628,55 @@ void Room97::proc15() {
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
 	
-//	mov     edi, 1
-
-	while (true) {
-		if (det->get_ani_detail(16) == nullptr) {
-			start_detail_wait(17, 1, ANI_VOR);
-			det->start_detail(16, 1, true);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(20, 1, false);
-			set_person_pos(318, 42, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			break;
+	while (det->get_ani_detail(16) != nullptr) {
+		get_user_key(NO_SETUP);
+		if (minfo.button == 1 || in->get_switch_code() == 28) {
+			if (_G(spieler).inv_cur != CUR_WALK)
+				_G(maus_links_click) = true;
 		}
+		set_up_screen(DO_SETUP);
+	}
+
+	hide_cur();
+	if (_G(spieler).r97_bool18DB30) {
+		start_detail_wait(17, 1, ANI_VOR);
+		det->start_detail(16, 1, true);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(20, 1, false);
+		set_person_pos(318, 42, P_CHEWY, P_LEFT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	} else {
+		_G(spieler).flags37_4 = true;
+		del_inventar(_G(spieler).AkInvent);
+		det->show_static_spr(27);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(21, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		det->hide_static_spr(27);
+		start_detail_wait(18, 1, ANI_VOR);
+		det->enable_sound(8, 0);
+		det->disable_sound(8, 1);
+		start_detail_wait(8, 1, ANI_VOR);
+		det->show_static_spr(20);
+		auto_move(10, P_CHEWY);
+		auto_scroll(60, 0);
+		start_aad_wait(544, -1);
+		_G(spieler).r97_bool18DB32 = true;
+		auto_move(11, P_CHEWY);
+		_G(spieler).r97_bool18DB32 = false;
+		flags.AutoAniPlay = false;
+		proc13();
+		flags.AutoAniPlay = true;
+		auto_move(7, P_CHEWY);
+
+		while (_G(spieler).scrollx < 368)
+			set_up_screen(DO_SETUP);
+
+		det->show_static_spr(26);
+		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
+		go_auto_xy(477, 29, P_NICHELLE, ANI_VOR);
+		det->hide_static_spr(26);
+		_G(spieler).flags37_2 = true;
 	}
 
 	atds->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index f9f7a8df22f..3315ba85309 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -499,12 +499,13 @@ struct Spieler : public SpielerFlags {
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
 
+	int r97_word18DB2E = 0;
 	bool r97_bool18DB30 = false;
 	bool r97_bool18DB32 = false;
-	int r97_word18DB2E = 0;
 	int r97_word18DB34 = 0;
 	int r97_word18DB36 = 0;
 	int r97_word18DB38 = 0;
+	bool r97_bool18DB3A = false;
 };
 
 struct AutoMov {


Commit: aaf0f7a1adf1970836f190d9bb621334a2a6c987
    https://github.com/scummvm/scummvm/commit/aaf0f7a1adf1970836f190d9bb621334a2a6c987
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:31-08:00

Commit Message:
CHEWY: Remove useless include in room97

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 6ac5cb0f52f..3e8fd95c80f 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room97.h"
 


Commit: 4e916c18f985d904dbf52640ddae693eac3a70ba
    https://github.com/scummvm/scummvm/commit/4e916c18f985d904dbf52640ddae693eac3a70ba
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:31-08:00

Commit Message:
CHEWY: Implement Room 96

Changed paths:
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room96.h


diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 467db055f41..5afef99a75f 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room96.h"
 
@@ -30,9 +29,48 @@ namespace Chewy {
 namespace Rooms {
 
 void Room96::entry() {
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 1;
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 50;
+	spieler_mi[P_HOWARD].Mode = true;
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_CHEWY].Mode = true;
+
+	if (flags.LoadGame)
+		return;
+
+	hide_cur();
+	set_person_pos(93, 62, P_HOWARD, P_RIGHT);
+	set_person_pos(116, 74, P_CHEWY, P_RIGHT);
+	auto_move(1, P_CHEWY);
+	show_cur();
 }
 
 void Room96::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (eib_nr == 141)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 95;
+}
+
+void Room96::setup_func() {
+	calc_person_look();
+	int destX, destY = 62;
+	
+	if (spieler_vector[P_CHEWY].Xypos[0] >= 120)
+		destX = 121;
+	else
+		destX = 93;
+
+	if (HowardMov == 1) {
+		destX = 49;
+		destY = 60;
+	}
+
+	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room96.h b/engines/chewy/rooms/room96.h
index f4f40a0e363..ffd7da4c875 100644
--- a/engines/chewy/rooms/room96.h
+++ b/engines/chewy/rooms/room96.h
@@ -29,6 +29,7 @@ class Room96 {
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static void setup_func();
 };
 
 } // namespace Rooms


Commit: 3c21841ffca7bdaede98d79e56d4474df91d6072
    https://github.com/scummvm/scummvm/commit/3c21841ffca7bdaede98d79e56d4474df91d6072
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:31-08:00

Commit Message:
CHEWY: Implement room 95

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/menus.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room95.h


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 8a889885bc5..b1c45aa0329 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -48,7 +48,7 @@ void MainMenu::execute() {
 	cur->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
-	_G(spieler).inv_cur = 0;
+	_G(spieler).inv_cur = false;
 	menu_display = 0;
 	_G(spieler).soundLoopMode = 1;
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index c82c2c5444a..c4230751ed8 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -985,7 +985,7 @@ void cur_2_inventory() {
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
 	}
-	_G(spieler).inv_cur = 0;
+	_G(spieler).inv_cur = false;
 }
 
 void inventory_2_cur(int16 nr) {
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 8fb83e53108..7cdbee4e5a5 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room95.h"
 
@@ -30,13 +29,98 @@ namespace Chewy {
 namespace Rooms {
 
 void Room95::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	SetUpScreenFunc = setup_func;	
+	_G(zoom_horizont) = 140;
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
+	spieler_mi[P_HOWARD].Mode = 1;
+
+	if (_G(spieler).flags35_20)
+		det->show_static_spr(10);
+
+	if (flags.LoadGame)
+		return;
+
+	hide_cur();
+	if (eib_nr == 138) {
+		set_person_pos(-20, 120, P_HOWARD, ANI_GO);
+		auto_move(2, P_CHEWY);
+	} else {
+		set_person_pos(473, 83, P_HOWARD, P_RIGHT);
+	}
+
+	show_cur();
 }
 
 void Room95::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (eib_nr == 139)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+	else if (eib_nr == 140)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 96;
+}
+
+void Room95::setup_func() {
+	calc_person_look();
+	int posX = spieler_vector[P_CHEWY].Xypos[0];
+	int destX;
+	int destY = 120;
+	
+	if (posX < 130)
+		destX = 40;
+	else if (posX < 312)
+		destX = 221;
+	else if (posX < 445)
+		destX = 342;
+	else
+		destX = 536;
+
+	if (HowardMov == 1) {
+		destX = 473;
+		destY = 83;
+	}
+
+	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 int Room95::proc2() {
-	return 0;
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	if (is_cur_inventar(113)) {
+		del_inventar(_G(spieler).AkInvent);
+
+		start_spz_wait(14, 1, false, P_CHEWY);
+		_G(spieler).flags35_20 = true;
+		det->show_static_spr(10);
+
+		show_cur();
+		return 1;
+	}
+
+	if (_G(spieler).inv_cur) {
+		show_cur();
+		return 0;
+	}
+
+	if (_G(spieler).flags35_20) {
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(133, CFO_MODE);
+		test_intro(33);
+		ERROR
+		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
+		switch_room(97);
+	} else {
+		start_spz(0, 255, false, P_CHEWY);
+		start_aad_wait(548, -1);
+	}
+
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room95.h b/engines/chewy/rooms/room95.h
index 5a6aa41127d..e800efaa9fa 100644
--- a/engines/chewy/rooms/room95.h
+++ b/engines/chewy/rooms/room95.h
@@ -29,6 +29,7 @@ class Room95 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static int proc2();
 };
 


Commit: 195460a70a0501f79d684a024ab0a4e1f01c5d06
    https://github.com/scummvm/scummvm/commit/195460a70a0501f79d684a024ab0a4e1f01c5d06
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:32-08:00

Commit Message:
CHEWY: Room 9 logic changes

Changed paths:
    engines/chewy/rooms/room9.cpp


diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 1e0b6e6c9a8..8711c43765d 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -75,6 +75,7 @@ void Room9::gtuer() {
 
 void Room9::surimy() {
 	int16 tmp;
+	hide_cur();
 	_G(spieler).R9Surimy = true;
 	tmp = spieler_vector[P_CHEWY].Count;
 	stop_person(P_CHEWY);
@@ -82,11 +83,13 @@ void Room9::surimy() {
 	det->hide_static_spr(4);
 	room->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
+	start_spz(15, 255, 0, 0);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;
 	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 	mov->continue_auto_go();
+	show_cur();
 }
 
 void Room9::surimy_ani() {


Commit: e0337085702a3a1fa41ea719cff78872bd1b7abe
    https://github.com/scummvm/scummvm/commit/e0337085702a3a1fa41ea719cff78872bd1b7abe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:32-08:00

Commit Message:
CHEWY: Room 10 logic fixes

Changed paths:
    engines/chewy/rooms/room10.cpp


diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 99c6358544d..0686b4b6a8e 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -37,16 +37,22 @@ void Room10::entry() {
 		out->setze_zeiger(0);
 		fx->blende1(workptr, screen0, pal, 150, 0, 0);
 		_G(spieler).R10Surimy = true;
-		flic_cut(FCUT_004, CFO_MODE);
-		start_aad(101, 0);
 		fx_blend = BLEND_NONE;
-		set_person_pos(1, 130, P_CHEWY, P_RIGHT);
+		flic_cut(FCUT_004, CFO_MODE);
+		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
-	} else if (_G(spieler).R10SurimyOk)
+		hide_cur();
+		start_spz(5, 255, 0, 0);
+		start_aad_wait(101, 0);
+		show_cur();
+
+	} else if (_G(spieler).R10SurimyOk) {
 		room->set_timer_status(3, TIMER_STOP);
+	}
 }
 
 void Room10::get_surimy() {
+	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
 	flc->set_custom_user_function(Room6::cut_serv2);
@@ -58,6 +64,7 @@ void Room10::get_surimy() {
 	invent_2_slot(18);
 
 	del_inventar(_G(spieler).AkInvent);
+	show_cur();
 }
 
 } // namespace Rooms


Commit: 86fe2ac6badbbfd33c8dfa92e7337b0cefce4025
    https://github.com/scummvm/scummvm/commit/86fe2ac6badbbfd33c8dfa92e7337b0cefce4025
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:32-08:00

Commit Message:
CHEWY: Room 22 logic fixes

Changed paths:
    engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/rooms/room22.cpp


diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
index 28222596113..4056f81beef 100644
--- a/engines/chewy/ani_dat.cpp
+++ b/engines/chewy/ani_dat.cpp
@@ -138,11 +138,6 @@ AniBlock ablock19[3] = {
 	{14, 1, ANI_VOR, ANI_WAIT, 0},
 };
 
-AniBlock ablock14[2] = {
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{3, 255, ANI_VOR, ANI_GO, 0},
-};
-
 AniBlock ablock15[4] = {
 	{0, 2, ANI_VOR, ANI_GO, 0},
 	{1, 255, ANI_VOR, ANI_GO, 0},
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 5605c94a8ac..b45061855e8 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -151,8 +151,6 @@ extern AniBlock ablock24[2];
 
 extern AniBlock ablock19[3];
 
-extern AniBlock ablock14[2];
-
 extern AniBlock ablock15[4];
 
 extern AniBlock ablock26[4];
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index dee2070048d..85dee31aad1 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -53,12 +53,19 @@ static const MovLine BORK_MPKT2[2] = {
 	{ {  90, 125, 170 }, 1, 6 }
 };
 
+AniBlock ABLOCK14[2] = {
+	{0, 1, ANI_VOR, ANI_WAIT, 0},
+	{3, 255, ANI_VOR, ANI_GO, 0},
+};
+
+
 void Room22::entry() {
 	if (!_G(spieler).R22BorkPlatt) {
 		det->load_taf_seq(36, (56 - 36) + 1, 0);
 		room->set_timer(255, 15);
-	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork)
+	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork) {
 		det->show_static_spr(4);
+	}
 }
 
 bool Room22::timer(int16 t_nr, int16 ani_nr) {
@@ -74,6 +81,8 @@ int16 Room22::chewy_amboss() {
 	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
 		action_flag = true;
 		flags.AutoAniPlay = true;
+		hide_cur();
+
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(1, 1, ANI_VOR);
@@ -84,13 +93,16 @@ int16 Room22::chewy_amboss() {
 		_G(spieler).R22ChewyPlatt = true;
 		atds->set_ats_str(79, 1, ATS_DATEI);
 		flags.AutoAniPlay = false;
+
+		show_cur();
 	}
 	return action_flag;
 }
 
 void Room22::bork(int16 t_nr) {
-	if (!flags.AutoAniPlay) {
+	if (!flags.AutoAniPlay && !is_chewy_busy()) {
 		flags.AutoAniPlay = true;
+
 		if (!_G(spieler).R22BorkPlatt) {
 			hide_cur();
 			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
@@ -104,14 +116,21 @@ void Room22::bork(int16 t_nr) {
 			auto_mov_obj[BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[BORK_OBJ].Mode = true;
+
 			if (!_G(spieler).R22Paint) {
 				bork_walk1();
 			} else {
-				_G(spieler).R22ChewyPlatt = true;
+				if (!_G(spieler).R22ChewyPlatt) {
+					atds->set_steuer_bit(79, 1, 1);
+					_G(spieler).R22ChewyPlatt = true;
+				}
+
 				bork_walk2();
 			}
+
 			show_cur();
 		}
+
 		uhr->reset_timer(t_nr, 0);
 		flags.AutoAniPlay = false;
 	}
@@ -147,7 +166,7 @@ void Room22::get_bork() {
 		auto_move(4, P_CHEWY);
 		det->hide_static_spr(4);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ablock14);
+		start_ani_block(2, ABLOCK14);
 		set_person_pos(171, 120, P_CHEWY, P_LEFT);
 		start_aad_wait(11, -1);
 		det->stop_detail(3);
@@ -163,6 +182,7 @@ void Room22::get_bork() {
 
 int16 Room22::malen() {
 	int16 action_flag = false;
+
 	if (!flags.AutoAniPlay && is_cur_inventar(17)) {
 		action_flag = true;
 		flags.AutoAniPlay = true;
@@ -175,7 +195,13 @@ int16 Room22::malen() {
 		del_inventar(_G(spieler).AkInvent);
 		obj->calc_all_static_detail();
 		flags.AutoAniPlay = false;
+
+		if (!_G(spieler).R22ChewyPlatt) {
+			_G(spieler).R22ChewyPlatt = true;
+			atds->set_steuer_bit(79, 1, 1);
+		}
 	}
+
 	return action_flag;
 }
 


Commit: 61ae48aca11804378e2ebf1f587cb1569b6270c0
    https://github.com/scummvm/scummvm/commit/61ae48aca11804378e2ebf1f587cb1569b6270c0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:32-08:00

Commit Message:
CHEWY: Room 11 logic fixes

Changed paths:
    engines/chewy/rooms/room11.cpp


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index c8579be07d3..0babf2e78af 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -30,6 +30,17 @@
 namespace Chewy {
 namespace Rooms {
 
+AniBlock ABLOCK17[2] = {
+	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 9, 255, ANI_VOR, ANI_GO, 0 },
+};
+
+AniBlock ABLOCK18[2] = {
+	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 1, ANI_RUECK, ANI_WAIT, 0 },
+};
+
+
 void Room11::entry() {
 	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
@@ -50,8 +61,9 @@ void Room11::entry() {
 		_G(spieler).room_e_obj[20].Attribut = 255;
 		_G(spieler).room_e_obj[21].Attribut = 255;
 		atds->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+
 		if (!flags.LoadGame) {
-			start_ani_block(2, ablock17);
+			start_ani_block(2, ABLOCK17);
 			auto_move(8, P_CHEWY);
 			start_aad_wait(31, -1);
 			det->stop_detail(9);
@@ -74,7 +86,7 @@ void Room11::bork_zwinkert() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
 		det->hide_static_spr(8);
-		start_ani_block(2, ablock18);
+		start_ani_block(2, ABLOCK18);
 		uhr->reset_timer(_G(timer_nr)[0], 0);
 		det->show_static_spr(8);
 		flags.AutoAniPlay = false;
@@ -86,35 +98,45 @@ void Room11::talk_debug() {
 		flags.AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		start_ads_wait(5);
-		flags.AutoAniPlay = false;
+		menu_item = CUR_WALK;
+		cursor_wahl(CUR_WALK);
 
+		flags.AutoAniPlay = false;
 	}
 }
 
 void Room11::chewy_bo_use() {
 	if (_G(spieler).R12ChewyBork) {
+		hide_cur();
 		flags.AutoAniPlay = true;
+
 		stop_person(P_CHEWY);
 		det->hide_static_spr(8);
-		start_ani_block(2, ablock17);
+		start_ani_block(2, ABLOCK17);
 		start_aad_wait(32, -1);
 		det->stop_detail(9);
 		det->show_static_spr(8);
 		auto_move(6, P_CHEWY);
+
 		flags.AutoAniPlay = false;
+		show_cur();
 	}
 }
 
 int16 Room11::scanner() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).R12ChewyBork) {
 		auto_move(7, P_CHEWY);
+
 		if (!_G(spieler).R11CardOk) {
 			action_flag = true;
 			start_aad_wait(13, -1);
 		} else {
 			if (is_cur_inventar(BORK_INV)) {
+				hide_cur();
 				action_flag = true;
+
 				flc->set_custom_user_function(Room12::cut_serv);
 				start_aad(105, 0);
 				flic_cut(FCUT_011, CFO_MODE);
@@ -125,12 +147,13 @@ int16 Room11::scanner() {
 				cursor_wahl(menu_item);
 				start_aad_wait(12, -1);
 				load_ads_dia(3);
+				show_cur();
 			} else if (!_G(spieler).inv_cur) {
 				if (!_G(spieler).R11TerminalOk) {
 					action_flag = true;
 					flic_cut(FCUT_010, CFO_MODE);
 					start_aad_wait(20, -1);
-				} else if (_G(spieler).R11TerminalOk) {
+				} else {
 					action_flag = true;
 					start_aad_wait(12, -1);
 					menu_item = CUR_TALK;
@@ -166,6 +189,7 @@ void Room11::put_card() {
 		atds->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
 		atds->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R11CardOk = true;
+
 		if (!_G(spieler).R11TerminalOk)
 			start_aad_wait(16, -1);
 	}


Commit: 73023392be0eec08b097d642285999f06d0a00d0
    https://github.com/scummvm/scummvm/commit/73023392be0eec08b097d642285999f06d0a00d0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:32-08:00

Commit Message:
CHEWY: Move ablock static arrays to the room files that use them

Changed paths:
  R engines/chewy/ani_dat.cpp
    engines/chewy/ani_dat.h
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room2.cpp
    engines/chewy/rooms/room2.h
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room7.cpp


diff --git a/engines/chewy/ani_dat.cpp b/engines/chewy/ani_dat.cpp
deleted file mode 100644
index 4056f81beef..00000000000
--- a/engines/chewy/ani_dat.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-
-namespace Chewy {
-
-#define STERNE_ANI 17
-#define TUER_ZU_ANI 3
-#define GITTER_BLITZEN 7
-
-AniBlock ablock0[5] = {
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 7, 3, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock1[2] = {
-	{10, 1, ANI_VOR, ANI_WAIT, 0},
-	{13, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock2[2] = {
-	{12, 1, ANI_VOR, ANI_WAIT, 0},
-	{GITTER_BLITZEN, 1, ANI_VOR, ANI_GO, 0}
-};
-
-AniBlock ablock3[2] = {
-	{ 4, 2, ANI_VOR, ANI_GO, 0},
-	{11, 255, ANI_VOR, ANI_GO, 0}
-};
-
-AniBlock ablock4[2] = {
-	{GITTER_BLITZEN, 3, ANI_VOR, ANI_WAIT, 0},
-	{GITTER_BLITZEN, 12, ANI_VOR, ANI_GO, 0}
-};
-
-AniBlock ablock5[3] = {
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 8, 9, ANI_VOR, ANI_GO, 0},
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
-
-};
-
-AniBlock ablock6[3] = {
-	{ 3, 1, ANI_VOR, ANI_GO, 0 },
-	{13, 1, ANI_VOR, ANI_WAIT, 0},
-	{14, 4, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock7[2] = {
-	{ 1, 2, ANI_VOR, ANI_WAIT, 0},
-	{ 2, 1, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock8[3] = {
-	{ 10, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 12, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 11, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock9[3] = {
-	{ 10, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 13, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 11, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock10[4] = {
-
-	{ 15, 2, ANI_VOR, ANI_WAIT, 0},
-	{ 16, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 17, 2, ANI_VOR, ANI_WAIT, 0},
-	{ 18, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock17[2] = {
-	{8, 1, ANI_VOR, ANI_WAIT, 0},
-	{9, 255, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock18[2] = {
-	{7, 1, ANI_VOR, ANI_WAIT, 0},
-	{7, 1, ANI_RUECK, ANI_WAIT, 0},
-};
-
-AniBlock ablock16[2] = {
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{1, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock20[3] = {
-	{5, 3, ANI_VOR, ANI_GO, 0},
-	{6, 3, ANI_VOR, ANI_GO, 0},
-	{7, 3, ANI_VOR, ANI_WAIT, 0}
-};
-
-AniBlock ablock21[2] = {
-	{8, 1, ANI_VOR, ANI_WAIT, 0},
-	{23, 255, ANI_RUECK, ANI_GO, 0},
-};
-
-AniBlock ablock22[2] = {
-	{13, 1, ANI_VOR, ANI_WAIT, 0},
-	{14, 13, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock23[2] = {
-	{11, 1, ANI_VOR, ANI_WAIT, 0},
-	{12, 1, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock24[2] = {
-	{15, 1, ANI_VOR, ANI_WAIT, 0},
-	{16, 7, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock19[3] = {
-	{12, 1, ANI_VOR, ANI_WAIT, 0},
-	{13, 4, ANI_VOR, ANI_WAIT, 0},
-	{14, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock15[4] = {
-	{0, 2, ANI_VOR, ANI_GO, 0},
-	{1, 255, ANI_VOR, ANI_GO, 0},
-	{2, 255, ANI_VOR, ANI_GO, 0},
-	{3, 255, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock26[4] = {
-	{2, 255, ANI_VOR, ANI_GO, 0},
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{0, 1, ANI_RUECK, ANI_WAIT, 0},
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock27[5] = {
-	{0, 1, ANI_RUECK, ANI_WAIT, 0},
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{0, 1, ANI_RUECK, ANI_WAIT, 0},
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{0, 1, ANI_RUECK, ANI_WAIT, 0},
-};
-
-AniBlock ablock30[3] = {
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{1, 4, ANI_VOR, ANI_WAIT, 0},
-	{2, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock28[2] = {
-	{4, 1, ANI_VOR, ANI_WAIT, 0},
-	{5, 3, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock31[3] = {
-	{0, 1, ANI_VOR, ANI_GO, 0},
-	{1, 2, ANI_VOR, ANI_GO, 0},
-	{5, 1, ANI_RUECK, ANI_WAIT, 0},
-};
-
-AniBlock ablock29[2] = {
-	{8, 1, ANI_VOR, ANI_WAIT, 0},
-	{9, 4, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock33[2] = {
-	{2, 1, ANI_VOR, ANI_WAIT, 0},
-	{3, 255, ANI_VOR, ANI_GO, 0},
-};
-
-AniBlock ablock32[2] = {
-
-	{6, 255, ANI_VOR, ANI_GO, 0},
-	{2, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock34[2] = {
-	{7, 1, ANI_VOR, ANI_WAIT, 0},
-	{6, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock36[2] = {
-	{6, 1, ANI_VOR, ANI_WAIT, 0},
-	{7, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock37[5] = {
-	{6, 1, ANI_VOR, ANI_WAIT, 0},
-	{7, 3, ANI_VOR, ANI_WAIT, 0},
-	{6, 1, ANI_RUECK, ANI_WAIT, 0},
-	{5, 1, ANI_RUECK, ANI_WAIT, 0},
-	{2, 1, ANI_RUECK, ANI_WAIT, 0},
-};
-
-AniBlock ablock35[7] = {
-	{2, 1, ANI_VOR, ANI_WAIT, 0},
-	{7, 1, ANI_VOR, ANI_WAIT, 0},
-	{8, 3, ANI_VOR, ANI_WAIT, 0},
-	{4, 1, ANI_VOR, ANI_WAIT, 0},
-	{5, 1, ANI_VOR, ANI_WAIT, 0},
-	{9, 1, ANI_VOR, ANI_WAIT, 0},
-	{5, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock38[2] = {
-	{5, 1, ANI_VOR, ANI_WAIT, 0},
-	{6, 1, ANI_VOR, ANI_WAIT, 0},
-};
-
-AniBlock ablock39[3] = {
-	{15, 1, ANI_VOR, ANI_WAIT, 0},
-	{17, 1, ANI_VOR, ANI_WAIT, 0},
-	{15, 1, ANI_RUECK, ANI_WAIT, 0},
-};
-
-} // namespace Chewy
diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index b45061855e8..40bacf5328f 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -111,76 +111,6 @@ namespace Chewy {
 #define SIB_ARTEFAKT 92
 #define SIB_AUSRUEST_R52 93
 
-extern AniBlock ablock0[5];
-
-extern AniBlock ablock1[2];
-
-extern AniBlock ablock2[2];
-
-extern AniBlock ablock3[2];
-
-extern AniBlock ablock4[2];
-
-extern AniBlock ablock5[5];
-
-extern AniBlock ablock6[3];
-
-extern AniBlock ablock7[2];
-
-extern AniBlock ablock8[3];
-
-extern AniBlock ablock9[3];
-
-extern AniBlock ablock10[4];
-
-extern AniBlock ablock17[2];
-
-extern AniBlock ablock18[2];
-
-extern AniBlock ablock16[2];
-
-extern AniBlock ablock20[3];
-
-extern AniBlock ablock21[2];
-
-extern AniBlock ablock22[2];
-
-extern AniBlock ablock23[2];
-
-extern AniBlock ablock24[2];
-
-extern AniBlock ablock19[3];
-
-extern AniBlock ablock15[4];
-
-extern AniBlock ablock26[4];
-
-extern AniBlock ablock27[5];
-
-extern AniBlock ablock30[3];
-
-extern AniBlock ablock28[2];
-
-extern AniBlock ablock31[3];
-
-extern AniBlock ablock29[2];
-
-extern AniBlock ablock33[2];
-
-extern AniBlock ablock32[2];
-
-extern AniBlock ablock34[2];
-
-extern AniBlock ablock36[2];
-
-extern AniBlock ablock37[5];
-
-extern AniBlock ablock35[7];
-
-extern AniBlock ablock38[2];
-
-extern AniBlock ablock39[3];
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 0e6c31f14f6..4c821e6da86 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -2,7 +2,6 @@ MODULE := engines/chewy
 
 MODULE_OBJS = \
 	ailclass.o \
-	ani_dat.o \
 	atds.o \
 	ch_icm.o \
 	chewy.o \
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index eb3a613cce3..6d079cc817f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -166,20 +166,7 @@ void check_ged_action(int16 index) {
 			break;
 
 		case 2:
-			switch (index) {
-			case 0:
-				det->stop_detail(5);
-				if (!_G(spieler).R2ElectrocutedBork) {
-					det->start_detail(6, 2, ANI_VOR);
-				} else {
-					start_ani_block(2, ablock4);
-				}
-				Room2::jump_out_r1(9);
-				break;
-
-			default:
-				break;
-			}
+			Room2::gedAction(index);
 			break;
 
 		case 7:
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 38210f63691..8c722552d99 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -57,6 +57,12 @@ static const MovLine R12_BORK_MPKT2[3] = {
 	{ { 300,  80, 120 }, 1, 8 }
 };
 
+static const AniBlock ABLOCK16[2] = {
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room12::entry() {
 	int16 i;
 	_G(zoom_horizont) = 150;
@@ -247,7 +253,7 @@ int16 Room12::chewy_trans() {
 			flags.AutoAniPlay = true;
 			auto_move(9, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock16);
+			start_ani_block(2, ABLOCK16);
 			set_person_pos(108, 82, P_CHEWY, P_RIGHT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(spieler).R12TransOn = false;
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index afeedbf28cd..d66a00b04b7 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -59,6 +59,34 @@ static const MovLine SURIMY_MPKT3[2] = {
 	{ { 392, 170, 190 }, 0, 12 }
 };
 
+static const AniBlock ABLOCK20[3] = {
+	{ 5, 3, ANI_VOR, ANI_GO, 0 },
+	{ 6, 3, ANI_VOR, ANI_GO, 0 },
+	{ 7, 3, ANI_VOR, ANI_WAIT, 0 }
+};
+
+
+static const AniBlock ABLOCK21[2] = {
+	{  8, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 23, 255, ANI_RUECK, ANI_GO, 0 },
+};
+
+static const AniBlock ABLOCK22[2] = {
+	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 14, 13, ANI_VOR, ANI_GO, 0 },
+};
+
+static const AniBlock ABLOCK23[2] = {
+	{ 11, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 12, 1, ANI_VOR, ANI_GO, 0 },
+};
+
+static const AniBlock ABLOCK24[2] = {
+	{ 15, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 16, 7, ANI_VOR, ANI_GO, 0 },
+};
+
+
 void Room18::entry() {
 	int16 i;
 	_G(spieler).R18MoniSwitch = 0;
@@ -143,7 +171,7 @@ void Room18::monitor() {
 	nr = 0;
 	_G(spieler).R18MoniSwitch ^= 1;
 	if (_G(spieler).R18MoniSwitch) {
-		start_ani_block(2, ablock21);
+		start_ani_block(2, ABLOCK21);
 		if (_G(spieler).R17EnergieOut)
 			nr = 2;
 		else
@@ -164,7 +192,7 @@ int16 Room18::sonden_moni() {
 		auto_move(8, P_CHEWY);
 		start_detail_wait(3, 1, ANI_VOR);
 		det->show_static_spr(10);
-		start_ani_block(3, ablock20);
+		start_ani_block(3, ABLOCK20);
 		for (i = 0; i < 3; i++)
 			det->show_static_spr(i + 12);
 		wait_show_screen(40);
@@ -222,12 +250,12 @@ int16 Room18::calc_surimy() {
 		det->show_static_spr(26);
 
 		det->hide_static_spr(24);
-		start_ani_block(2, ablock22);
+		start_ani_block(2, ABLOCK22);
 		det->show_static_spr(20);
 
 		for (i = 0; i < 3; i++)
 			det->hide_static_spr(i + 15);
-		start_ani_block(2, ablock23);
+		start_ani_block(2, ABLOCK23);
 		det->show_static_spr(18);
 		det->show_static_spr(19);
 
@@ -248,7 +276,7 @@ int16 Room18::calc_surimy() {
 		det->show_static_spr(26);
 
 		det->hide_static_spr(25);
-		start_ani_block(2, ablock24);
+		start_ani_block(2, ABLOCK24);
 		det->show_static_spr(21);
 
 		det->hide_static_spr(26);
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
index 8501f7888c2..ba24c199c6b 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room2.cpp
@@ -32,6 +32,12 @@ namespace Rooms {
 #define ANI_5 5
 #define GITTER_BLITZEN 7
 
+static const AniBlock ABLOCK4[2] = {
+	{ GITTER_BLITZEN, 3, ANI_VOR, ANI_WAIT, 0 },
+	{ GITTER_BLITZEN, 12, ANI_VOR, ANI_GO, 0 }
+};
+
+
 void Room2::entry() {
 	if (!_G(spieler).R2ElectrocutedBork)
 		det->start_detail(5, 255, 0);
@@ -72,5 +78,22 @@ void Room2::electrifyWalkway2() {
 	start_aad_wait(47, -1);
 }
 
+void Room2::gedAction(int index) {
+	switch (index) {
+	case 0:
+		det->stop_detail(5);
+		if (!_G(spieler).R2ElectrocutedBork) {
+			det->start_detail(6, 2, ANI_VOR);
+		} else {
+			start_ani_block(2, ABLOCK4);
+		}
+		jump_out_r1(9);
+		break;
+
+	default:
+		break;
+	}
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room2.h b/engines/chewy/rooms/room2.h
index e072b49a63d..e77ee00e748 100644
--- a/engines/chewy/rooms/room2.h
+++ b/engines/chewy/rooms/room2.h
@@ -33,6 +33,7 @@ public:
 	static void jump_out_r1(int16 nr);
 	static void electrifyWalkway1();
 	static void electrifyWalkway2();
+	static void gedAction(int index);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index e4320920778..438cbc5c9fd 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -56,6 +56,12 @@ static const MovLine SPINNE_MPKT2[2] = {
 	{ { 115, 190, 0 }, 2, 1 }
 };
 
+static const AniBlock ABLOCK19[3] = {
+	{ 12, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 13, 4, ANI_VOR, ANI_WAIT, 0 },
+	{ 14, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
 void Room21::entry() {
 	load_chewy_taf(CHEWY_MINI);
 	calc_laser();
@@ -226,7 +232,7 @@ void Room21::salto() {
 						det->
 						set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]
 						);
-					start_ani_block(3, ablock19);
+					start_ani_block(3, ABLOCK19);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					start_aad_wait(36, -1);
 					flags.AutoAniPlay = false;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index e96f543fa26..555686b2f4c 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -29,6 +29,14 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK15[4] = {
+	{ 0, 2, ANI_VOR, ANI_GO, 0 },
+	{ 1, 255, ANI_VOR, ANI_GO, 0 },
+	{ 2, 255, ANI_VOR, ANI_GO, 0 },
+	{ 3, 255, ANI_VOR, ANI_GO, 0 },
+};
+
+
 void Room23::entry() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(135, 69, P_CHEWY, -1);
@@ -72,7 +80,7 @@ int16 Room23::start_gleiter() {
 			}
 			if (start_ok) {
 				hide_cur();
-				start_ani_block(4, ablock15);
+				start_ani_block(4, ABLOCK15);
 				wait_show_screen(30);
 				for (i = 0; i < 4; i++)
 					det->stop_detail(i);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 5a3bdaa04ef..07640eca083 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -28,6 +28,22 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK26[4] = {
+	{ 2, 255, ANI_VOR, ANI_GO, 0 },
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+static const AniBlock ABLOCK27[5] = {
+	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
+};
+
+
 void Room29::entry() {
 	if (_G(spieler).R29Schlauch1)
 		det->show_static_spr(7);
@@ -104,7 +120,7 @@ void Room29::schlitz_sitz() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->hide_static_spr(4);
 		start_aad(63);
-		start_ani_block(4, ablock26);
+		start_ani_block(4, ABLOCK26);
 		det->show_static_spr(9);
 		while (flags.AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
@@ -124,7 +140,7 @@ int16 Room29::zaun_sprung() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(3, 1, ANI_VOR, 7);
 		det->hide_static_spr(9);
-		start_ani_block(5, ablock27);
+		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
 		switch_room(37);
 		_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 1173fbd3ead..8079dab6ac3 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -43,11 +43,14 @@ namespace Rooms {
 #define SONDE_SPR_R 118
 #define SONDE_SPR_L 120
 
+#define GITTER_BLITZEN 7
+
 static const MovLine SONDE_MPKT[3] = {
 	{ {  13, 45,  75 }, 1, 2 },
 	{ { 237, 52, 160 }, 1, 2 },
 	{ {   4, 83, 180 }, 0, 2 }
 };
+
 static const int16 SONDE_PHASEN[4][2] = {
 	{ 120, 120 },
 	{ 118, 118 },
@@ -55,6 +58,35 @@ static const int16 SONDE_PHASEN[4][2] = {
 	{ 119, 119 }
 };
 
+static const AniBlock ABLOCK0[5] = {
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 3, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
+static const AniBlock ABLOCK1[2] = {
+	{ 10, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+static const AniBlock ABLOCK2[2] = {
+	{ 12, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ GITTER_BLITZEN, 1, ANI_VOR, ANI_GO, 0 }
+};
+
+static const AniBlock ABLOCK3[2] = {
+	{  4, 2, ANI_VOR, ANI_GO, 0 },
+	{ 11, 255, ANI_VOR, ANI_GO, 0 }
+};
+
+static const AniBlock ablock5[3] = {
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 8, 9, ANI_VOR, ANI_GO, 0 },
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
+
+};
+
+
 void Room3::entry() {
 	init_sonde();
 }
@@ -72,7 +104,7 @@ void Room3::terminal() {
 
 		if (!_G(spieler).R2ElectrocutedBork) {
 			det->stop_detail(5);
-			start_ani_block(2, ablock3);
+			start_ani_block(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
 				_G(spieler).R2FussSchleim = 0;
 
@@ -84,16 +116,16 @@ void Room3::terminal() {
 			det->stop_detail(6);
 			clear_prog_ani();
 			switch_room(1);
-			start_ani_block(2, ablock0);
+			start_ani_block(2, ABLOCK0);
 			set_person_pos(92, 131, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		} else if (!_G(spieler).R2FussSchleim) {
-			start_ani_block(2, ablock2);
+			start_ani_block(2, ABLOCK2);
 			Room2::jump_out_r1(9);
 			start_aad_wait(45, -1);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock1);
+			start_ani_block(2, ABLOCK1);
 			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 76eecb823a5..b5d0d70b6ab 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -37,6 +37,13 @@ static const MovLine SURIMY_MPKT[2] = {
 	{ { 273, 220, 150 }, 1, 6 }
 };
 
+static const AniBlock ABLOCK30[3] = {
+	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 1, 4, ANI_VOR, ANI_WAIT, 0 },
+	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room31::entry() {
 	calc_luke();
 	surimy_go();
@@ -124,7 +131,7 @@ int16 Room31::use_topf() {
 					_G(spieler).R31Wasser = true;
 					auto_move(1, P_CHEWY);
 					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_ani_block(3, ablock30);
+					start_ani_block(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					del_inventar(_G(spieler).AkInvent);
 					obj->add_inventar(MILCH_LEER_INV, &room_blk);
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 68a1ca86492..7cc34244e62 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK28[2] = {
+	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 5, 3, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room35::entry() {
 	if (_G(spieler).R35Schublade)
 		det->show_static_spr(1);
@@ -50,7 +56,7 @@ int16 Room35::schublade() {
 			auto_move(3, P_CHEWY);
 			_G(spieler).R35Falle = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ablock28);
+			start_ani_block(2, ABLOCK28);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(33, 90, P_CHEWY, P_LEFT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index ddada2c88e7..92ab29a54af 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -29,6 +29,13 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK31[3] = {
+	{ 0, 1, ANI_VOR, ANI_GO, 0 },
+	{ 1, 2, ANI_VOR, ANI_GO, 0 },
+	{ 5, 1, ANI_RUECK, ANI_WAIT, 0 },
+};
+
+
 void Room37::entry() {
 	_G(zoom_horizont) = 100;
 	flags.ZoomMov = true;
@@ -189,7 +196,7 @@ void Room37::dog_bell() {
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			det->show_static_spr(9);
-			start_ani_block(3, ablock31);
+			start_ani_block(3, ABLOCK31);
 			det->set_static_ani(3, -1);
 			enable_timer();
 			dia_nr = 149;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index b0e8ee73b38..ffafb3365c0 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -39,6 +39,18 @@ static const uint8 TV_FLIC[] = {
 	FCUT_034
 };
 
+static const AniBlock ABLOCK33[2] = {
+	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 3, 255, ANI_VOR, ANI_GO, 0 },
+};
+
+
+static const AniBlock ABLOCK29[2] = {
+	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 9, 4, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room39::entry() {
 	if (!_G(spieler).R41Einbruch) {
 		if (_G(spieler).R39HowardDa) {
@@ -74,7 +86,7 @@ short Room39::use_howard() {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				del_inventar(_G(spieler).AkInvent);
 				det->stop_detail(1);
-				start_ani_block(2, ablock33);
+				start_ani_block(2, ABLOCK33);
 				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(167, -1);
 				det->stop_detail(3);
@@ -214,7 +226,7 @@ int16 Room39::use_tv() {
 				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(98, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_ani_block(2, ablock29);
+				start_ani_block(2, ABLOCK29);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 7dfd8f25426..5109e453003 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK32[2] = {
+	{ 6, 255, ANI_VOR, ANI_GO, 0 },
+	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room41::entry() {
 	hide_cur();
 
@@ -36,7 +42,7 @@ void Room41::entry() {
 		if (!flags.LoadGame) {
 			room->set_timer_status(0, TIMER_STOP);
 			det->del_static_ani(0);
-			start_ani_block(2, ablock32);
+			start_ani_block(2, ABLOCK32);
 			room->set_timer_status(0, TIMER_START);
 			det->set_static_ani(0, -1);
 			start_aad_wait(127, -1);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index beb68a1579b..0fe3afced18 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK34[2] = {
+	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room49::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
@@ -246,7 +252,7 @@ int16 Room49::use_taxi() {
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
-		start_ani_block(2, ablock34);
+		start_ani_block(2, ABLOCK34);
 		det->show_static_spr(7);
 		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 51edca9f3f6..798b1d15292 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -29,6 +29,12 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK36[2] = {
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room50::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	if (_G(spieler).R50Zigarre) {
@@ -127,7 +133,7 @@ int16 Room50::use_gutschein() {
 			_G(r50Wasser) = false;
 			stop_page();
 			del_inventar(_G(spieler).AkInvent);
-			start_ani_block(2, ablock36);
+			start_ani_block(2, ABLOCK36);
 			aad_page(274, 8);
 		} else
 			start_aad_wait(276, -1);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 423a85cbb00..a923ce5a321 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -29,6 +29,15 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK37[5] = {
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 3, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 5, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 2, 1, ANI_RUECK, ANI_WAIT, 0 },
+};
+
+
 void Room51::entry() {
 	int16 i;
 	_G(zoom_horizont) = 140;
@@ -131,7 +140,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					start_aad_wait(287, -1);
 					auto_move(12, P_CHEWY);
 					det->stop_detail(5);
-					start_ani_block(5, ablock37);
+					start_ani_block(5, ABLOCK37);
 					det->hide_static_spr(1);
 					start_aad_wait(284, -1);
 				} else {
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 480a7a7c167..7f0bf54fc37 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -29,6 +29,17 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK35[7] = {
+	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 8, 3, ANI_VOR, ANI_WAIT, 0 },
+	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 9, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+
 void Room53::entry() {
 	hide_cur();
 	obj->hide_sib(SIB_VISIT_R53);
@@ -73,7 +84,7 @@ int16 Room53::use_man() {
 		start_aad_wait(271, -1);
 		room->set_timer_status(1, TIMER_STOP);
 		det->del_static_ani(1);
-		start_ani_block(7, ablock35);
+		start_ani_block(7, ABLOCK35);
 		obj->add_inventar(JMKOST_INV, &room_blk);
 		inventory_2_cur(JMKOST_INV);
 		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 5be6c11e868..6324e5a85b8 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -42,6 +42,18 @@ static const MovLine R6_ROBO_MPKT[3] = {
 	{ {  60, 210, 110 }, 1, 16 }
 };
 
+static const AniBlock ABLOCK6[3] = {
+	{  3, 1, ANI_VOR, ANI_GO, 0 },
+	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 14, 4, ANI_VOR, ANI_GO, 0 },
+};
+
+static const AniBlock ABLOCK7[2] = {
+	{ 1, 2, ANI_VOR, ANI_WAIT, 0 },
+	{ 2, 1, ANI_VOR, ANI_GO, 0 },
+};
+
+
 void Room6::entry() {
 	_G(zoom_horizont) = 80;
 	flags.ZoomMov = true;
@@ -91,7 +103,7 @@ void Room6::bola_knopf() {
 		if (_G(spieler).R6BolaOk) {
 			_G(spieler).R6BolaBecher = true;
 			det->show_static_spr(0);
-			start_ani_block(2, ablock7);
+			start_ani_block(2, ABLOCK7);
 			obj->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
 			wait_detail(2);
 			obj->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
@@ -101,7 +113,7 @@ void Room6::bola_knopf() {
 			obj->hide_sib(SIB_BOLA_KNOPF_R6);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(3, ablock6);
+			start_ani_block(3, ABLOCK6);
 			while (det->get_ani_status(3) && !SHOULD_QUIT) {
 				if (!det->get_ani_status(14)) {
 					set_person_pos(220, 89, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index c1663450c72..286c830dfa8 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -29,6 +29,18 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK38[2] = {
+	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
+static const AniBlock ABLOCK39[3] = {
+	{ 15, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 17, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 15, 1, ANI_RUECK, ANI_WAIT, 0 },
+};
+
+
 void Room68::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).DiaAMov = 1;
@@ -260,7 +272,7 @@ int16 Room68::use_keeper() {
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		room->set_timer_status(20, TIMER_STOP);
 		det->del_static_ani(20);
-		start_ani_block(3, ablock39);
+		start_ani_block(3, ABLOCK39);
 		room->set_timer_status(20, TIMER_START);
 		det->set_static_ani(20, -1);
 		new_invent_2_cur(B_MARY_INV);
@@ -284,7 +296,7 @@ int16 Room68::use_diva() {
 		auto_move(4, P_CHEWY);
 		det->hide_static_spr(3);
 		_G(spieler).R68DivaWeg = true;
-		start_ani_block(2, ablock38);
+		start_ani_block(2, ABLOCK38);
 		flic_cut(FCUT_083, FLC_MODE);
 		flic_cut(FCUT_083, FLC_MODE);
 		det->del_static_ani(18);
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index b83709ec58e..242fb0e2030 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -29,12 +29,20 @@
 namespace Chewy {
 namespace Rooms {
 
+static const AniBlock ABLOCK10[4] = {
+	{ 15, 2, ANI_VOR, ANI_WAIT, 0 },
+	{ 16, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 17, 2, ANI_VOR, ANI_WAIT, 0 },
+	{ 18, 1, ANI_VOR, ANI_WAIT, 0 },
+};
+
 static const AniBlock ABLOCK25[3] = {
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0},
-	{ 5, 255, ANI_VOR, ANI_GO, 0},
-	{ 4, 1, ANI_VOR, ANI_WAIT, 0},
+	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 5, 255, ANI_VOR, ANI_GO, 0 },
+	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
 };
 
+
 void Room7::entry() {
 	_G(spieler).ScrollxStep = 2;
 }
@@ -122,7 +130,7 @@ void Room7::klingel() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->start_detail(0, 255, ANI_VOR);
 		wait_detail(14);
-		start_ani_block(4, ablock10);
+		start_ani_block(4, ABLOCK10);
 		det->hide_static_spr(7);
 		det->stop_detail(0);
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);


Commit: 9b27647ed17d0457069ca6a6e529130d09bdb1b0
    https://github.com/scummvm/scummvm/commit/9b27647ed17d0457069ca6a6e529130d09bdb1b0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:33-08:00

Commit Message:
CHEWY: Move room-specific check_ged_action code to Room classes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room1.cpp
    engines/chewy/rooms/room1.h
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room13.h
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room17.h
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room18.h
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room28.h
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room37.h
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room42.h
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room49.h
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room50.h
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room52.h
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room55.h
    engines/chewy/rooms/room7.cpp
    engines/chewy/rooms/room7.h
    engines/chewy/rooms/room9.cpp
    engines/chewy/rooms/room9.h
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room94.h
    engines/chewy/rooms/room97.cpp
    engines/chewy/rooms/room97.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6d079cc817f..b6bfb7e36e2 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -128,149 +128,25 @@ void timer_action(int16 t_nr) {
 }
 
 void check_ged_action(int16 index) {
-#define KABELABDECKUNG 1
-	int16 flag;
 	index -= 50;
 	index /= 4;
 
 	if (!flags.GedAction) {
 		flags.GedAction = true;
-		flag = false;
 
+#define GED_ACTION(NUM) case NUM: Room##NUM::gedAction(NUM); break;
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-		case 1:
-			switch (index) {
-			case 0:
-				if (!_G(spieler).R2ElectrocutedBork) {
-					if (_G(spieler).AkInvent == KABEL_INV) {
-						flag = 1;
-						del_inventar(_G(spieler).AkInvent);
-					} else if (obj->check_inventar(KABEL_INV)) {
-						flag = 1;
-						obj->del_obj_use(KABEL_INV);
-						del_invent_slot(KABEL_INV);
-					}
-					if (flag) {
-						start_aad_wait(54, -1);
-						atds->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
-						_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
-						obj->calc_rsi_flip_flop(KABELABDECKUNG);
-						obj->calc_all_static_detail();
-					}
-				}
-				break;
-
-			default:
-				break;
-			}
-			break;
-
-		case 2:
-			Room2::gedAction(index);
-			break;
-
-		case 7:
-			switch (index) {
-			case 0:
-				if (_G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
-					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_detail_wait(20, 1, ANI_VOR);
-					det->show_static_spr(10);
-					wait_show_screen(20 * _G(spieler).DelaySpeed);
-					det->hide_static_spr(10);
-					set_person_pos(180, 124, P_CHEWY, P_LEFT);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					_G(spieler).R7ChewyFlug = false;
-				}
-				break;
-
-			default:
-				break;
-			}
-			break;
-
-		case 9:
-			switch (index) {
-			case 0:
-				if (!_G(spieler).R9Surimy)
-					Room9::surimy();
-				break;
-
-			}
-			break;
-
-		case 11:
-			switch (index) {
-			case 0:
-				Room11::chewy_bo_use();
-				break;
-
-			default:
-				break;
-			}
-			break;
-
-		case 13:
-			switch (index) {
-			case 2:
-				if (_G(spieler).R12ChewyBork) {
-					stop_person(P_CHEWY);
-					Room13::talk_bork();
-				}
-				break;
-
-			default:
-				break;
-			}
-			break;
-
-		case 17:
-			switch (index) {
-			case 0:
-				Room17::door_kommando(0);
-				break;
-
-			case 1:
-				Room17::door_kommando(1);
-				break;
-
-			default:
-				break;
-			}
-			break;
-
-		case 18:
-			if (!index) {
-				if (!_G(spieler).R18SurimyWurf) {
-					stop_person(P_CHEWY);
-					auto_move(1, P_CHEWY);
-					start_aad(40, 0);
-				}
-			}
-			break;
-
-		case 28:
-			if (!index)
-				Room28::get_pump();
-			break;
-
-		case 37:
-			if (!index) {
-				Room37::dog_bell();
-			} else if (index == 1) {
-				if (_G(spieler).R37Kloppe && !_G(spieler).R37Mes) {
-					stop_person(P_CHEWY);
-					_G(spieler).R37Mes = true;
-					start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
-					start_aad_wait(142, -1);
-				}
-			}
-			break;
-
-		case 42:
-			if (!index)
-				Room42::calc_xit();
-			break;
+		GED_ACTION(1);
+		GED_ACTION(2);
+		GED_ACTION(7);
+		GED_ACTION(9);
+		GED_ACTION(11);
+		GED_ACTION(13);
+		GED_ACTION(17);
+		GED_ACTION(18);
+		GED_ACTION(28);
+		GED_ACTION(37);
+		GED_ACTION(42);
 
 		case 45:
 		case 46:
@@ -278,63 +154,17 @@ void check_ged_action(int16 index) {
 				HowardMov = 1;
 			break;
 
-		case 49:
-			if (!index)
-				Room49::calc_boy();
-			break;
-
-		case 50:
-			if (!index)
-				Room50::calc_treppe();
-			break;
-
-		case 52:
-			if (index == 1)
-				Room52::kaker_platt();
-			break;
-
-		case 55:
-			if (!index)
-				Room55::talk_line();
-			break;
-
-		case 94:
-			if (!index && !_G(spieler).flags35_10)
-				switch_room(93);
-			break;
-
-		case 97:
-			switch (index) {
-			case 50:
-				Room97::proc2();
-				break;
-			case 51:
-				Room97::proc3();
-				break;
-			case 52:
-				Room97::proc13();
-				break;
-			case 53:
-				Room97::proc12();
-				break;
-			case 54:
-				Room97::proc4();
-				break;
-			case 55:
-				if (_G(spieler).flags36_20)
-					auto_scroll(268, 0);
-				break;
-			case 56:
-				Room97::proc15();
-				break;
-			default:
-				break;
-			}
-			break;
+		GED_ACTION(49);
+		GED_ACTION(50);
+		GED_ACTION(52);
+		GED_ACTION(55);
+		GED_ACTION(94);
+		GED_ACTION(97);
 
 		default:
 			break;
 		}
+#undef GED_ACTION
 
 		flags.GedAction = false;
 	}
diff --git a/engines/chewy/rooms/room1.cpp b/engines/chewy/rooms/room1.cpp
index b1cc2d9fde7..8ec140291ce 100644
--- a/engines/chewy/rooms/room1.cpp
+++ b/engines/chewy/rooms/room1.cpp
@@ -39,5 +39,36 @@ void Room1::gottenCard() {
 	atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
 }
 
+void Room1::gedAction(int index) {
+	#define KABELABDECKUNG 1
+	bool flag = false;
+
+	switch (index) {
+	case 0:
+		if (!_G(spieler).R2ElectrocutedBork) {
+			if (_G(spieler).AkInvent == KABEL_INV) {
+				flag = true;
+				del_inventar(_G(spieler).AkInvent);
+			} else if (obj->check_inventar(KABEL_INV)) {
+				flag = true;
+				obj->del_obj_use(KABEL_INV);
+				del_invent_slot(KABEL_INV);
+			}
+
+			if (flag) {
+				start_aad_wait(54, -1);
+				atds->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
+				_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
+				obj->calc_rsi_flip_flop(KABELABDECKUNG);
+				obj->calc_all_static_detail();
+			}
+		}
+		break;
+
+	default:
+		break;
+	}
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room1.h b/engines/chewy/rooms/room1.h
index cf35664a0fd..e5c20a402fa 100644
--- a/engines/chewy/rooms/room1.h
+++ b/engines/chewy/rooms/room1.h
@@ -28,6 +28,7 @@ namespace Rooms {
 class Room1 {
 public:
 	static void gottenCard();
+	static void gedAction(int index);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 0babf2e78af..f37f98f9955 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -82,6 +82,17 @@ bool Room11::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
+void Room11::gedAction(int index) {
+	switch (index) {
+	case 0:
+		chewy_bo_use();
+		break;
+
+	default:
+		break;
+	}
+}
+
 void Room11::bork_zwinkert() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index f352a058df1..c751026ac85 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -30,14 +30,15 @@ namespace Rooms {
 class Room11 {
 private:
 	static void bork_zwinkert();
+	static void chewy_bo_use();
 public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static void gedAction(int index);
 
 	static void get_card();
 	static void put_card();
 	static int16 scanner();
-	static void chewy_bo_use();
 	static void talk_debug();
 };
 
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 995fff0439b..d2943ba8339 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -76,6 +76,20 @@ void Room13::entry() {
 	}
 }
 
+void Room13::gedAction(int index) {
+	switch (index) {
+	case 2:
+		if (_G(spieler).R12ChewyBork) {
+			stop_person(P_CHEWY);
+			talk_bork();
+		}
+		break;
+
+	default:
+		break;
+	}
+}
+
 void Room13::talk_bork() {
 	if (!_G(spieler).R13BorkOk) {
 		_G(spieler).R13BorkOk = true;
diff --git a/engines/chewy/rooms/room13.h b/engines/chewy/rooms/room13.h
index 5d4b8898066..74435e33664 100644
--- a/engines/chewy/rooms/room13.h
+++ b/engines/chewy/rooms/room13.h
@@ -30,10 +30,12 @@ namespace Rooms {
 class Room13 {
 public:
 	static void entry();
-	static void talk_bork();
+	static void gedAction(int index);
+
 	static int16 monitor_knopf();
 	static void jmp_band();
 	static void jmp_boden();
+	static void talk_bork();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index f6bae531cf1..c429cac136d 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -106,6 +106,21 @@ bool Room17::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
+void Room17::gedAction(int index) {
+	switch (index) {
+	case 0:
+		door_kommando(0);
+		break;
+
+	case 1:
+		door_kommando(1);
+		break;
+
+	default:
+		break;
+	}
+}
+
 int16 Room17::use_seil() {
 	int16 action_flag = false;
 	if (!flags.AutoAniPlay) {
diff --git a/engines/chewy/rooms/room17.h b/engines/chewy/rooms/room17.h
index 841711778c6..7e060727612 100644
--- a/engines/chewy/rooms/room17.h
+++ b/engines/chewy/rooms/room17.h
@@ -26,17 +26,20 @@ namespace Chewy {
 namespace Rooms {
 
 class Room17 {
+private:
+	static void door_kommando(int16 mode);
+
 public:
 	static void entry();
 	static void xit();
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static void gedAction(int index);
 
 	static int16 use_seil();
 	static void plot_seil();
 	static void kletter_down();
 	static void kletter_up();
 	static void calc_seil();
-	static void door_kommando(int16 mode);
 	static void close_door();
 	static int16 energie_hebel();
 	static int16 get_oel();
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index d66a00b04b7..6488074c6c6 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -153,6 +153,14 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
+void Room18::gedAction(int index) {
+	if (!index && !_G(spieler).R18SurimyWurf) {
+		stop_person(P_CHEWY);
+		auto_move(1, P_CHEWY);
+		start_aad(40, 0);
+	}
+}
+
 void Room18::init_borks() {
 	int16 i;
 	for (i = 0; i < 5; i++)
diff --git a/engines/chewy/rooms/room18.h b/engines/chewy/rooms/room18.h
index a264478365b..27287cd766d 100644
--- a/engines/chewy/rooms/room18.h
+++ b/engines/chewy/rooms/room18.h
@@ -33,6 +33,7 @@ private:
 public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static void gedAction(int index);
 
 	static int16 calc_surimy();
 	static int16 calc_schalter();
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index fa373a3a142..4c0d7818f7d 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -141,6 +141,11 @@ void Room28::xit(int16 eib_nr) {
 	show_cur();
 }
 
+void Room28::gedAction(int index) {
+	if (!index)
+		get_pump();
+}
+
 void Room28::haendler() {
 	hide_cur();
 	SetUpScreenFunc = 0;
diff --git a/engines/chewy/rooms/room28.h b/engines/chewy/rooms/room28.h
index 5c352c7e904..569f08933e5 100644
--- a/engines/chewy/rooms/room28.h
+++ b/engines/chewy/rooms/room28.h
@@ -33,13 +33,15 @@ private:
 	static void setup_func();
 	static int16 cut_serv(int16 frame);
 	static int16 cut_serv2(int16 frame);
+	static void get_pump();
 
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void gedAction(int index);
+
 	static void use_surimy();
 	static void set_pump();
-	static void get_pump();
 	static int16 use_breifkasten();
 };
 
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 92ab29a54af..8564227eef4 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -62,6 +62,20 @@ void Room37::entry() {
 	}
 }
 
+void Room37::gedAction(int index) {
+	if (!index) {
+		dog_bell();
+
+	} else if (index == 1) {
+		if (_G(spieler).R37Kloppe && !_G(spieler).R37Mes) {
+			stop_person(P_CHEWY);
+			_G(spieler).R37Mes = true;
+			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(142, -1);
+		}
+	}
+}
+
 void Room37::setup_func() {
 	if (_G(maus_links_click) &&
 		!_G(spieler).R37Kloppe &&
diff --git a/engines/chewy/rooms/room37.h b/engines/chewy/rooms/room37.h
index 31b4da7a0a3..777d8858dae 100644
--- a/engines/chewy/rooms/room37.h
+++ b/engines/chewy/rooms/room37.h
@@ -33,12 +33,14 @@ private:
 	static int16 cut_serv1(int16 frame);
 	static int16 cut_serv2(int16 frame);
 	static void hahn_dia();
+	static void dog_bell();
 
 public:
 	static void entry();
+	static void gedAction(int index);
+
 	static short use_wippe();
 	static int16 use_glas();
-	static void dog_bell();
 	static void talk_hahn();
 	static void use_hahn();
 };
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index cc2ead84849..b343f4bf4d6 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -53,6 +53,11 @@ void Room42::entry() {
 	}
 }
 
+void Room42::gedAction(int index) {
+	if (!index)
+		calc_xit();
+}
+
 void Room42::setup_func() {
 	if (!_G(spieler).R42HoToBeamter)
 		calc_person_look();
diff --git a/engines/chewy/rooms/room42.h b/engines/chewy/rooms/room42.h
index fbbc07e4e51..d89b5459d8d 100644
--- a/engines/chewy/rooms/room42.h
+++ b/engines/chewy/rooms/room42.h
@@ -32,11 +32,13 @@ private:
 
 public:
 	static void entry();
-	static void calc_xit();
+	static void gedAction(int index);
+
 	static void talk_beamter();
 	static int16 use_psack();
 	static int16 use_beamter();
 	static void dia_beamter(int16 str_end_nr);
+	static void calc_xit();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 0fe3afced18..85919c23ae6 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -86,6 +86,11 @@ bool Room49::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
+void Room49::gedAction(int index) {
+	if (!index)
+		calc_boy();
+}
+
 void Room49::calc_boy_ani() {
 	if (!_G(spieler).R49BoyAniCount) {
 		_G(spieler).R49BoyAniCount = 3;
diff --git a/engines/chewy/rooms/room49.h b/engines/chewy/rooms/room49.h
index 6083e1acdf3..13767e97788 100644
--- a/engines/chewy/rooms/room49.h
+++ b/engines/chewy/rooms/room49.h
@@ -30,13 +30,14 @@ private:
 	static void talk_boy(int16 aad_nr);
 	static void setup_func();
 	static void calc_boy_ani();
+	static void calc_boy();
 
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static void gedAction(int index);
 
-	static void calc_boy();
 	static int16 use_boy();
 	static void use_boy_cigar();
 	static void look_hotel();
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 798b1d15292..4f12849168c 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -76,6 +76,11 @@ bool Room50::timer(int16 t_nr, int16 ani_nr) {
 	return true;
 }
 
+void Room50::gedAction(int index) {
+	if (!index)
+		calc_treppe();
+}
+
 void Room50::stop_cigar() {
 	room->set_timer_status(0, TIMER_STOP);
 	det->del_static_ani(0);
diff --git a/engines/chewy/rooms/room50.h b/engines/chewy/rooms/room50.h
index 314fcdfed75..ba609d0ba39 100644
--- a/engines/chewy/rooms/room50.h
+++ b/engines/chewy/rooms/room50.h
@@ -32,13 +32,14 @@ private:
 	static void aad_page(int16 aad_nr, int16 ani_nr);
 	static void setup_func();
 	static void calc_wasser();
+	static void calc_treppe();
 
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static void gedAction(int index);
 
-	static void calc_treppe();
 	static int16 use_gutschein();
 	static int16 use_gum();
 	static void talk_page();
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 3b3831f9592..da717e70c3e 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -55,6 +55,11 @@ void Room52::xit() {
 	}
 }
 
+void Room52::gedAction(int index) {
+	if (index == 1)
+		kaker_platt();
+}
+
 int16 Room52::use_hot_dog() {
 	int16 i;
 	int16 action_ret = false;
diff --git a/engines/chewy/rooms/room52.h b/engines/chewy/rooms/room52.h
index 3b93992fdc5..0992f79d2ed 100644
--- a/engines/chewy/rooms/room52.h
+++ b/engines/chewy/rooms/room52.h
@@ -29,12 +29,14 @@ class Room52 {
 private:
 	static void plot_armee(int16 frame);
 	static void setup_func();
+	static void kaker_platt();
 
 public:
 	static void entry();
 	static void xit();
+	static void gedAction(int index);
+
 	static int16 use_hot_dog();
-	static void kaker_platt();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 7a7a3c8d41d..293e1e4ac87 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -106,6 +106,11 @@ void Room55::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 }
 
+void Room55::gedAction(int index) {
+	if (!index)
+		talk_line();
+}
+
 int16 Room55::use_stapel1() {
 	int16 action_ret = false;
 	if (!_G(spieler).inv_cur) {
diff --git a/engines/chewy/rooms/room55.h b/engines/chewy/rooms/room55.h
index 87603558c56..6325c43cda1 100644
--- a/engines/chewy/rooms/room55.h
+++ b/engines/chewy/rooms/room55.h
@@ -37,6 +37,8 @@ private:
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static void gedAction(int index);
+
 	static int16 use_stapel1();
 	static int16 use_stapel2();
 	static int16 use_telefon();
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index 242fb0e2030..ab590049145 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -154,5 +154,25 @@ void Room7::klingel() {
 	++_G(spieler).R7BellCount;
 }
 
+void Room7::gedAction(int index) {
+	switch (index) {
+	case 0:
+		if (_G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(20, 1, ANI_VOR);
+			det->show_static_spr(10);
+			wait_show_screen(20 * _G(spieler).DelaySpeed);
+			det->hide_static_spr(10);
+			set_person_pos(180, 124, P_CHEWY, P_LEFT);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler).R7ChewyFlug = false;
+		}
+		break;
+
+	default:
+		break;
+	}
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room7.h b/engines/chewy/rooms/room7.h
index 714bd5986c8..cbf20d354f0 100644
--- a/engines/chewy/rooms/room7.h
+++ b/engines/chewy/rooms/room7.h
@@ -32,6 +32,7 @@ public:
 	static void entry();
 	static void haken(int16 sib_nr);
 	static void klingel();
+	static void gedAction(int index);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 8711c43765d..5b4aa84543d 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -118,5 +118,17 @@ void Room9::surimy_ani() {
 	det->del_taf_tbl(91, 8, 0);
 }
 
+void Room9::gedAction(int index) {
+	switch (index) {
+	case 0:
+		if (!_G(spieler).R9Surimy)
+			Room9::surimy();
+		break;
+
+	default:
+		break;
+	}
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room9.h b/engines/chewy/rooms/room9.h
index 07c91f75ed8..489c1c24072 100644
--- a/engines/chewy/rooms/room9.h
+++ b/engines/chewy/rooms/room9.h
@@ -30,6 +30,8 @@ private:
 	static void surimy_ani();
 public:
 	static void entry();
+	static void gedAction(int index);
+
 	static void gtuer();
 	static void surimy();
 };
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index e60f5c42b2b..5dab751f284 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -35,6 +35,11 @@ void Room94::entry() {
 void Room94::xit() {
 }
 
+void Room94::gedAction(int index) {
+	if (!index && !_G(spieler).flags35_10)
+		switch_room(93);
+}
+
 void Room94::talk1() {
 }
 
diff --git a/engines/chewy/rooms/room94.h b/engines/chewy/rooms/room94.h
index 49dad9d62cb..de7f80eefbd 100644
--- a/engines/chewy/rooms/room94.h
+++ b/engines/chewy/rooms/room94.h
@@ -29,6 +29,8 @@ class Room94 {
 public:
 	static void entry();
 	static void xit();
+	static void gedAction(int index);
+
 	static void talk1();
 	static int proc3();
 };
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 3e8fd95c80f..8d815a54097 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -112,6 +112,35 @@ void Room97::xit() {
 	_G(spieler).ScrollxStep = 1;
 }
 
+void Room97::gedAction(int index) {
+	switch (index) {
+	case 50:
+		proc2();
+		break;
+	case 51:
+		proc3();
+		break;
+	case 52:
+		proc13();
+		break;
+	case 53:
+		proc12();
+		break;
+	case 54:
+		proc4();
+		break;
+	case 55:
+		if (_G(spieler).flags36_20)
+			auto_scroll(268, 0);
+		break;
+	case 56:
+		proc15();
+		break;
+	default:
+		break;
+	}
+}
+
 void Room97::setup_func() {
 	spieler_mi[P_CHEWY].Vorschub = 4;
 	spieler_mi[P_HOWARD].Vorschub = 6;
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
index 7c02be57225..f389b6a561d 100644
--- a/engines/chewy/rooms/room97.h
+++ b/engines/chewy/rooms/room97.h
@@ -26,13 +26,20 @@ namespace Chewy {
 namespace Rooms {
 
 class Room97 {
-public:
-	static void entry();
-	static void xit();
+private:
 	static void setup_func();
 	static void proc2();
 	static void proc3();
 	static void proc4();
+	static void proc12();
+	static void proc13();
+	static void proc15();
+
+public:
+	static void entry();
+	static void xit();
+	static void gedAction(int index);
+
 	static int proc5();
 	static int proc6();
 	static int proc7();
@@ -40,10 +47,7 @@ public:
 	static int proc9();
 	static int proc10();
 	static int proc11();
-	static void proc12();
-	static void proc13();
 	static int proc14();
-	static void proc15();
 };
 
 } // namespace Rooms


Commit: 47287f10b0793cd44df6385b6666d5b3d744bce1
    https://github.com/scummvm/scummvm/commit/47287f10b0793cd44df6385b6666d5b3d744bce1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:33-08:00

Commit Message:
CHEWY: Room 12 logic fixes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room12.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index b6bfb7e36e2..2b2d371606c 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1938,7 +1938,11 @@ void sib_event_inv(int16 sib_nr) {
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
-		start_aad(115, 0);
+		start_spz(5, 255, 0, 0);
+		start_aad_wait(115, 0);
+
+		if (_G(spieler).R12TransOn)
+			Room12::use_linke_rohr();
 		break;
 
 	case SIB_GITTER2_R21:
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 8c722552d99..c1198fef03c 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -67,27 +67,34 @@ void Room12::entry() {
 	int16 i;
 	_G(zoom_horizont) = 150;
 	_G(timer_nr)[1] = room->set_timer(255, 20);
+
 	if (!_G(spieler).R12Betreten) {
 		_G(spieler).R12Betreten = true;
+		hide_cur();
+
 		for (i = 7; i < 10; i++)
 			det->show_static_spr(i);
+
 		flags.NoScroll = true;
 		auto_scroll(60, 0);
 		flic_cut(FCUT_016, CFO_MODE);
 		flags.NoScroll = false;
+
 		for (i = 7; i < 10; i++)
 			det->hide_static_spr(i);
+
 		obj->show_sib(SIB_TALISMAN_R12);
 		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
 		obj->calc_all_static_detail();
 		auto_move(5, P_CHEWY);
 		start_aad_wait(109, -1);
+		show_cur();
+
 	} else {
 		if (_G(spieler).R12Talisman == true && !_G(spieler).R12BorkInRohr)
 			_G(timer_nr)[0] = room->set_timer(255, 20);
 		else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
 			det->show_static_spr(12);
-
 	}
 }
 
@@ -122,11 +129,13 @@ void Room12::init_bork() {
 			auto_mov_obj[R12_BORK_OBJ].Mode = true;
 			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
 				(const MovLine *)R12_BORK_MPKT);
+
 			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
 				auto_move(5, P_CHEWY);
 				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
+
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
 					uhr->reset_timer(_G(timer_nr)[0], 0);
@@ -134,21 +143,21 @@ void Room12::init_bork() {
 					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 					start_aad_wait(14, -1);
 				}
+
 				wait_auto_obj(R12_BORK_OBJ);
 				show_cur();
 			} else {
 				bork_ok();
 			}
 		}
+
 		uhr->reset_timer(_G(timer_nr)[0], 0);
 	}
 }
 
 void Room12::talk_bork() {
 	if (!_G(spieler).R12TalismanOk) {
-
 		start_aad_wait(28, -1);
-
 	}
 }
 
@@ -159,16 +168,19 @@ void Room12::bork_ok() {
 	auto_move(5, P_CHEWY);
 	auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
 	_G(spieler).R12BorkTalk = true;
+
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 2;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
 		(const MovLine *)R12_BORK_MPKT1);
 	wait_auto_obj(R12_BORK_OBJ);
+
 	_G(spieler).R12BorkInRohr = true;
 	det->set_detail_pos(3, 170, 145);
 	det->start_detail(3, 255, ANI_VOR);
 	start_aad_wait(57, -1);
 	det->stop_detail(3);
+
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 3;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
@@ -180,6 +192,7 @@ void Room12::bork_ok() {
 	det->show_static_spr(12);
 	atds->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
 	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+
 	flags.MausLinks = false;
 	show_cur();
 }
@@ -188,10 +201,13 @@ int16 Room12::use_terminal() {
 	int16 action_flag = false;
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
+
 		if (!_G(spieler).R12ChewyBork) {
 			auto_move(6, P_CHEWY);
 			start_aad_wait(110, -1);
+
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
+				start_spz(4, 255, 0, 0);
 				start_aad_wait(112, -1);
 				flags.NoScroll = true;
 				auto_scroll(46, 0);
@@ -207,42 +223,34 @@ int16 Room12::use_terminal() {
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
 				auto_move(4, P_CHEWY);
+				start_spz(68, 255, 0, 0);
 				start_aad_wait(113, 0);
+
 			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
-				_G(spieler).R12TalismanOk = false;
-				_G(spieler).R12KetteLinks = true;
-				uhr->disable_timer();
-				obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
-				obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
-				obj->calc_all_static_detail();
-				atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
-				atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
-				start_aad(111, 0);
+				use_linke_rohr();
+
 			} else {
 				_G(spieler).R12TransOn = true;
 				uhr->reset_timer(_G(timer_nr)[1], 0);
 			}
-		} else
+		} else {
 			start_aad(114, 0);
+		}
 	}
 
 	return action_flag;
 }
 
-int16 Room12::use_linke_rohr() {
-	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-		if (!_G(spieler).R12KetteLinks) {
-			auto_move(7, P_CHEWY);
-			start_aad_wait(29, -1);
-		} else {
-			_G(spieler).R12KetteLinks = false;
-			uhr->enable_timer();
-			atds->set_ats_str(117, TXT_MARK_LOOK, 0, ATS_DATEI);
-		}
-	}
-	return action_flag;
+void Room12::use_linke_rohr() {
+	_G(spieler).R12TalismanOk = false;
+	_G(spieler).R12KetteLinks = true;
+	uhr->disable_timer();
+	obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
+	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+	obj->calc_all_static_detail();
+	atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
+	atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
+	start_aad(111, 0);
 }
 
 int16 Room12::chewy_trans() {
@@ -263,7 +271,7 @@ int16 Room12::chewy_trans() {
 	return action_flag;
 }
 
-int16 Room12::proc1() {
+int16 Room12::useTransformerTube() {
 	bool result = false;
 
 	if (!_G(spieler).inv_cur) {
diff --git a/engines/chewy/rooms/room12.h b/engines/chewy/rooms/room12.h
index df2b6be56f6..4dc6167b26f 100644
--- a/engines/chewy/rooms/room12.h
+++ b/engines/chewy/rooms/room12.h
@@ -35,9 +35,9 @@ public:
 	static bool timer(int16 t_nr, int16 ani_nr);
 
 	static int16 cut_serv(int16 frame);
-	static int16 use_linke_rohr();
+	static void use_linke_rohr();
 	static int16 chewy_trans();
-	static int16 proc1();
+	static int16 useTransformerTube();
 	static int16 use_terminal();
 	static void talk_bork();
 };
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 5e4d573cb0b..1baf1e75a98 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -223,7 +223,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 118:
-						action_ret = Room12::proc1();
+						action_ret = Room12::useTransformerTube();
 						break;
 
 					case 119:


Commit: edd29fc4cb02e03752a5c0844b13fffda4f883a7
    https://github.com/scummvm/scummvm/commit/edd29fc4cb02e03752a5c0844b13fffda4f883a7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:33-08:00

Commit Message:
CHEWY: Room 13 logic fixes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room13.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2b2d371606c..467db07f782 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -468,6 +468,9 @@ void exit_room(int16 eib_nr) {
 		atds->set_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
+	case 13:
+		Room13::xit();
+
 	case 18:
 		if (eib_nr == 40)
 			_G(spieler).R17Location = 2;
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index d2943ba8339..d92668c0c75 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -50,6 +50,7 @@ void Room13::entry() {
 		flic_cut(FCUT_013, CFO_MODE);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
+		start_spz(16, 255, 0, 0);
 		start_aad_wait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
@@ -66,16 +67,23 @@ void Room13::entry() {
 
 			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		}
-		if (spieler_vector[P_CHEWY].Xypos[0] > 290) {
-			_G(spieler).R13Band = true;
-			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(spieler).room_e_obj[25].Attribut = 255;
+
+		if (_G(spieler).R13Band) {
+			_G(spieler).room_e_obj[25].Attribut = 3;
+			atds->set_steuer_bit(100, 1, 1);
 		}
+
 		if (_G(spieler).R21GitterMuell)
 			det->hide_static_spr(6);
 	}
 }
 
+void Room13::xit() {
+	_G(spieler).room_e_obj[25].Attribut = 3;
+	atds->set_steuer_bit(100, 1, 1);
+	_G(spieler).R13Band = false;
+}
+
 void Room13::gedAction(int index) {
 	switch (index) {
 	case 2:
@@ -96,9 +104,7 @@ void Room13::talk_bork() {
 		_G(spieler).R12ChewyBork = false;
 		det->show_static_spr(13);
 		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		det->
-			set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true)
-			;
+		det->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		det->stop_detail(9);
@@ -106,6 +112,7 @@ void Room13::talk_bork() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(12);
 		_G(auto_obj) = 1;
+
 		mov_phasen[R13_BORK_OBJ].AtsText = 122;
 		mov_phasen[R13_BORK_OBJ].Lines = 3;
 		mov_phasen[R13_BORK_OBJ].Repeat = 1;
@@ -120,11 +127,14 @@ void Room13::talk_bork() {
 		auto_move(11, P_CHEWY);
 		flags.NoScroll = true;
 		auto_scroll(41, 0);
+
+		start_spz(68, 255, 0, 0);
 		start_aad_wait(248, -1);
 		flic_cut(FCUT_014, CFO_MODE);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
 		flags.NoScroll = false;
+
 		atds->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
 		obj->show_sib(SIB_BANDKNOPF_R13);
@@ -137,6 +147,7 @@ void Room13::talk_bork() {
 		obj->show_sib(SIB_SCHLITZ_R11);
 		obj->show_sib(SIB_TKNOPF2_R11);
 		obj->show_sib(SIB_TKNOPF3_R11);
+
 		if (_G(spieler).R6DoorRightB)
 			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
 		_G(spieler).room_e_obj[21].Attribut = AUSGANG_OBEN;
@@ -155,6 +166,7 @@ void Room13::jmp_band() {
 			start_detail_wait(8, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
+
 		} else {
 			_G(spieler).R13Surf = true;
 			_G(maus_links_click) = false;
@@ -167,15 +179,13 @@ void Room13::jmp_band() {
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
 			_G(spieler).R13Bandlauf = 0;
-
 			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
 			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-
 			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 			obj->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
 			obj->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
+
 			flic_cut(FCUT_018, CFO_MODE);
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
@@ -191,6 +201,7 @@ void Room13::jmp_boden() {
 	if (_G(spieler).R13Band) {
 		if (!_G(spieler).R13Surf)
 			obj->show_sib(SIB_BANDKNOPF_R13);
+
 		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 		atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R13Band = false;
@@ -204,23 +215,32 @@ void Room13::jmp_boden() {
 
 int16 Room13::monitor_knopf() {
 	int16 action_flag = false;
-	if (!_G(spieler).R13Band &&
-		!_G(spieler).R12ChewyBork &&
-		!_G(spieler).inv_cur) {
+
+	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		auto_move(8, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(6, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		if (_G(spieler).R13MonitorStatus)
-			det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
-		++_G(spieler).R13MonitorStatus;
-		if (_G(spieler).R13MonitorStatus > 4)
-			_G(spieler).R13MonitorStatus = 0;
-		else
-			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
-		atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
+
+		if (_G(spieler).R13Band) {
+			start_aad_wait(620, -1);
+
+		} else if (!_G(spieler).R12ChewyBork) {
+			auto_move(8, P_CHEWY);
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(6, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+
+			if (_G(spieler).R13MonitorStatus)
+				det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
+
+			++_G(spieler).R13MonitorStatus;
+			if (_G(spieler).R13MonitorStatus > 4)
+				_G(spieler).R13MonitorStatus = 0;
+			else
+				det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+
+			atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
+		}
 	}
+
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room13.h b/engines/chewy/rooms/room13.h
index 74435e33664..c51b456a29f 100644
--- a/engines/chewy/rooms/room13.h
+++ b/engines/chewy/rooms/room13.h
@@ -30,6 +30,7 @@ namespace Rooms {
 class Room13 {
 public:
 	static void entry();
+	static void xit();
 	static void gedAction(int index);
 
 	static int16 monitor_knopf();


Commit: 8bd5f104f664a20e759de024608c7a2880fda28e
    https://github.com/scummvm/scummvm/commit/8bd5f104f664a20e759de024608c7a2880fda28e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:33-08:00

Commit Message:
CHEWY: Implement room 94

Changed paths:
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room66.h
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room94.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 73136af16ee..e0005ae2f1d 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -76,5 +76,8 @@ int Room66::proc7() {
 	return 0;
 }
 
+void Room66::proc8(int eax, int edx, int ebx, int ecx) {
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room66.h b/engines/chewy/rooms/room66.h
index a55bb4c779c..13e26f91291 100644
--- a/engines/chewy/rooms/room66.h
+++ b/engines/chewy/rooms/room66.h
@@ -33,8 +33,9 @@ public:
 	static void talk2();
 	static void talk3();
 	static void talk4();
-	static int proc7();
 	static int proc2();
+	static int proc7();
+	static void proc8(int eax, int edx, int ebx, int ecx);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 5dab751f284..6eac58a834c 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -22,17 +22,99 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room94.h"
 
+#include "room66.h"
+
 namespace Chewy {
 namespace Rooms {
 
 void Room94::entry() {
+	_G(spieler).flags33_80 = true;
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 2;
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 34;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 48;
+	spieler_mi[P_HOWARD].Mode = true;
+	if (_G(spieler).flags35_10) {
+		room->set_timer_status(3, TIMER_STOP);
+		det->del_static_ani(3);
+	}
+
+	if (flags.LoadGame)
+		return;
+
+	if (_G(spieler).flags35_8) {
+		_G(zoom_horizont) = 140;
+		_G(spieler).flags35_8 = false;
+		_G(spieler).scrollx = 0;
+		set_person_pos(156, 149, P_CHEWY, P_RIGHT);
+		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flic_cut(120, CFO_MODE);
+		test_intro(30);
+		ERROR
+		fx_blend = BLEND_NONE;
+		Room66::proc8(2, 3, 0, 539);
+		_G(spieler).r93_word18DB2C = _G(spieler).scrollx;
+		switch_room(93);
+		return;
+	}
+
+	if (_G(spieler).flags35_40) {
+		set_person_pos(373, 122, P_CHEWY, P_LEFT);
+		set_person_pos(393, 94, P_HOWARD, P_LEFT);
+		_G(spieler).flags35_40 = false;
+		_G(spieler).scrollx = 150;
+		if (_G(spieler).flags37_40) {
+			_G(spieler).flags37_40 = true;
+			flags.NoScroll = true;
+			out->setze_zeiger(nullptr);
+			out->cls();
+			flic_cut(121, CFO_MODE);
+			test_intro(32);
+			ERROR
+
+			fx_blend = BLEND_NONE;
+			SetUpScreenFunc = nullptr;
+			Room66::proc8(2, 3, 0, 551);
+			SetUpScreenFunc = setup_func;
+			flags.NoScroll = false;
+		}
+	} else {
+		hide_cur();
+		_G(spieler).scrollx = 120;
+		set_person_pos(255, 86, P_HOWARD, P_LEFT);
+		auto_move(3, P_CHEWY);
+		show_cur();
+	}
 }
 
 void Room94::xit() {
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 95;
+}
+
+void Room94::setup_func() {
+	calc_person_look();
+	int destX, destY = 122;
+
+	if (spieler_vector[P_CHEWY].Xypos[0] >= 370)
+		destX = 399;
+	else
+		destX = 255;
+
+	if (flags.ExitMov) {
+		destX = 255;
+		destY = 86;
+	}
+	
+	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 void Room94::gedAction(int index) {
@@ -41,10 +123,45 @@ void Room94::gedAction(int index) {
 }
 
 void Room94::talk1() {
+	hide_cur();
+	Room66::proc8(3, 3, 2, 552);
+	show_cur();
 }
 
 int Room94::proc3() {
-	return 0;
+	if (is_cur_inventar(62))
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	auto_scroll(216, 0);
+	del_inventar(_G(spieler).AkInvent);
+	out->setze_zeiger(nullptr);
+	out->cls();
+	flags.NoPalAfterFlc = true;
+	flic_cut(62, CFO_MODE);
+	fx_blend = BLEND3;
+	det->start_detail(5, 255, false);
+	start_aad_wait(541, -1);
+	det->stop_detail(5);
+	det->show_static_spr(5);
+	Room66::proc8(3, 3, 2, 617);
+	hide_cur();
+	det->hide_static_spr(5);
+	det->start_detail(5, 255, false);
+	start_aad_wait(622, -1);
+	det->stop_detail(5);
+	det->start_detail(6, 1, false);	
+	room->set_timer_status(3, TIMER_STOP);
+	det->del_static_ani(3);
+	start_detail_wait(4, 1, ANI_VOR);
+	_G(spieler).flags35_10 = true;
+	_G(spieler).room_e_obj[138].Attribut = AUSGANG_OBEN;
+	atds->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATEI);
+	new_invent_2_cur(114);
+	
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room94.h b/engines/chewy/rooms/room94.h
index de7f80eefbd..c819e54d6f6 100644
--- a/engines/chewy/rooms/room94.h
+++ b/engines/chewy/rooms/room94.h
@@ -30,6 +30,7 @@ public:
 	static void entry();
 	static void xit();
 	static void gedAction(int index);
+	static void setup_func();
 
 	static void talk1();
 	static int proc3();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 3315ba85309..dadda435dd1 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -499,6 +499,9 @@ struct Spieler : public SpielerFlags {
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
 
+	// ---- //
+	int r93_word18DB2C = 0;
+	// ---- //
 	int r97_word18DB2E = 0;
 	bool r97_bool18DB30 = false;
 	bool r97_bool18DB32 = false;


Commit: 936a520e120fec9863351651ed3d16c29e16106c
    https://github.com/scummvm/scummvm/commit/936a520e120fec9863351651ed3d16c29e16106c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Room 14 logic fixes

Changed paths:
    engines/chewy/rooms/room14.cpp


diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index a312b0f6e7b..e294685734e 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -33,6 +33,11 @@ namespace Rooms {
 void Room14::entry() {
 	_G(spieler).R23GleiterExit = 14;
 	_G(zoom_horizont) = 310;
+	_G(spieler).ScrollxStep = 2;
+
+	if (!_G(spieler).R14Feuer)
+		obj->hide_sib(46);
+
 	if (!flags.LoadGame) {
 		if (_G(spieler).R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
@@ -72,6 +77,7 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 
 int16 Room14::use_schrott() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -90,9 +96,11 @@ int16 Room14::use_schrott() {
 
 int16 Room14::use_gleiter() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
+
 		if (!_G(spieler).R14GleiterAuf) {
 			_G(spieler).R14GleiterAuf = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -105,18 +113,23 @@ int16 Room14::use_gleiter() {
 			Room23::cockpit();
 		}
 	}
+
 	return action_flag;
 }
 
-void Room14::talk_eremit() {
+void Room14::talk_eremit()  {
 	if (!_G(spieler).R14Feuer) {
 		auto_move(6, P_CHEWY);
+
 		if (_G(spieler).R14Translator) {
 			flags.AutoAniPlay = true;
 			load_ads_dia(0);
+			obj->show_sib(46);
 		} else {
 			flags.AutoAniPlay = true;
+			hide_cur();
 			start_aad_wait(24, -1);
+			show_cur();
 			flags.AutoAniPlay = false;
 		}
 	}
@@ -124,30 +137,35 @@ void Room14::talk_eremit() {
 
 int16 Room14::use_schleim() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(11, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+
 		if (!_G(spieler).R14Sicherung) {
 			action_flag = true;
 			_G(spieler).R14Sicherung = true;
 			start_aad_wait(22, -1);
 			invent_2_slot(SICHERUNG_INV);
-
 		}
 	}
+
 	return action_flag;
 }
 
 void Room14::feuer() {
 	int16 tmp;
 	int16 waffe;
+
 	waffe = false;
 	tmp = _G(spieler).AkInvent;
 	_G(spieler).R14Feuer = true;
+	_G(cur_hide_flag) = false;
 	flags.AutoAniPlay = true;
 	hide_cur();
+
 	if (is_cur_inventar(BWAFFE_INV)) {
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -167,11 +185,14 @@ void Room14::feuer() {
 		start_detail_wait(5, 1, ANI_VOR);
 		det->show_static_spr(9);
 	}
+
 	del_inventar(tmp);
 	det->start_detail(6, 255, ANI_VOR);
 	wait_show_screen(40);
+
 	if (waffe)
 		auto_move(7, P_CHEWY);
+
 	start_aad_wait(26, -1);
 	det->hide_static_spr(9);
 	start_detail_wait(3, 1, ANI_VOR);


Commit: 4211ee5a79c3f4012aa54f53667176cfb68d7258
    https://github.com/scummvm/scummvm/commit/4211ee5a79c3f4012aa54f53667176cfb68d7258
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Implement Room 93

Changed paths:
    engines/chewy/rooms/room93.cpp


diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index f78bdb3dc1d..08576947d9e 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room93.h"
 
@@ -30,9 +29,47 @@ namespace Chewy {
 namespace Rooms {
 
 void Room93::entry() {
+	if (flags.LoadGame)
+		return;
+
+	_G(spieler).scrollx = 0;
+	hide_person();
+	start_detail_wait(3, 0, ANI_GO);
+	det->set_static_ani(0, -1);
+	start_aad_wait(616, -1);
+	det->del_static_ani(0);
+	start_detail_wait(3, 1, ANI_VOR);
+	det->set_static_ani(1, -1);
+	start_ads_wait(27);
+
+	if (!_G(spieler).flags37_40) {
+		det->del_static_ani(1);
+		hide_cur();
+		start_detail_wait(3, 1, ANI_GO);
+		det->set_static_ani(0, -1);
+		start_aad_wait(549, -1);
+		det->del_static_ani(0);
+		start_detail_wait(3, 1, ANI_VOR);
+		start_detail_wait(6, 1, ANI_VOR);
+		det->set_static_ani(7, -1);
+		start_aad_wait(550, -1);
+		det->del_static_ani(7);
+		start_detail_wait(6, 1, ANI_GO);
+		start_detail_wait(2, 1, ANI_VOR);
+		set_up_screen(DO_SETUP);
+		show_cur();
+	}
+
+	_G(spieler).flags35_40 = true;
+	show_person();
+	switch_room(94);
 }
 
 void Room93::xit() {
+	_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+	_G(spieler).scrollx = _G(spieler).r93_word18DB2C;
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
 }
 
 } // namespace Rooms


Commit: 606322e91b8694efc6de6667ae8e35201d7c2388
    https://github.com/scummvm/scummvm/commit/606322e91b8694efc6de6667ae8e35201d7c2388
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Implement Room 92

Changed paths:
    engines/chewy/rooms/room92.cpp


diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 3bfda28b708..57762f56513 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room92.h"
 
@@ -30,6 +29,63 @@ namespace Chewy {
 namespace Rooms {
 
 void Room92::entry() {
+	const int oldScrollX = _G(spieler.scrollx);
+	_G(spieler).scrollx = 0;
+	cur_2_inventory();
+	hide_cur();
+	hide_person();
+	start_aad_wait(_G(spieler).SVal2, -1);
+	switch (_G(spieler).SVal2) {
+	case 487:
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(103, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		_G(spieler).scrollx = oldScrollX;
+		show_person();
+		switch_room(_G(spieler).SVal1);
+		break;
+	case 488:
+		flags.StaticUseTxt = true;
+		flic_cut(106, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(105, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(104, CFO_MODE);
+		test_intro(27);
+		ERROR
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(103, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
+		_G(spieler).flags33_8 = true;
+		show_person();
+		switch_room(46);
+		break;
+	case 538:
+		flags.StaticUseTxt = true;
+		flic_cut(106, CFO_MODE);
+		show_person();
+		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+		_G(spieler).flags35_8 = true;
+		switch_room(94);
+		break;
+	default:
+		show_person();
+		_G(spieler).scrollx = oldScrollX;
+		switch_room(_G(spieler).SVal1);
+		break;
+	}
+	_G(spieler).SVal2 = 5000;
 }
 
 } // namespace Rooms


Commit: 6189a361c628938d364b1b7b0e1a9de763bee1c1
    https://github.com/scummvm/scummvm/commit/6189a361c628938d364b1b7b0e1a9de763bee1c1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Implement room 91

Changed paths:
    engines/chewy/defines.h
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room91.h
    engines/chewy/rooms/room95.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index f06331d854b..662f6452b44 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -86,6 +86,7 @@ enum SetupScreenMode {
 #define CUR_HOWARD 19
 #define CUR_ZEIGE 20
 #define CUR_NICHELLE 21
+#define CUR_22 22
 #define AUSGANG_LINKS_SPR 26
 #define AUSGANG_RECHTS_SPR 27
 #define AUSGANG_OBEN_SPR 28
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 4f9a6b21c73..0ba7c164eb7 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -30,9 +30,115 @@ namespace Chewy {
 namespace Rooms {
 
 void Room91::entry() {
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).r91_word18DB2A = 0;
+	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
+	spieler_mi[P_HOWARD].Mode = true;
+
+	if (flags.LoadGame)
+		return;
+
+	_G(spieler).scrollx = 320;
+	hide_cur();
+	_G(spieler).scrollx = 320;
+
+	if (_G(spieler).flags34_1) {
+		set_person_pos(499, 106, P_CHEWY, P_RIGHT);
+		set_person_pos(536, 90, P_HOWARD, P_RIGHT);
+		if (!_G(spieler).flags34_2) {
+			_G(spieler).flags34_2 = true;
+			start_aad_wait(503, -1);
+		}
+	} else {
+		flags.MainInput = false;
+		flags.NoScroll = false;
+		flags.NoScroll = true; // CHECKME: clearly, this has to be double checked. Maybe I didn't understand properly the NOT?
+		_G(spieler).flags34_1 = true;
+		set_person_pos(326, 99, P_CHEWY, P_RIGHT);
+		set_person_pos(312, 75, P_HOWARD, P_RIGHT);
+		_G(spieler).SVal3 = 0;
+		_G(spieler).flags34_4 = true;
+		start_aad_wait(502, -1);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		det->start_detail(0, 255, false);
+
+		for (int i = 0; i < 3; ++i) {
+			_G(timer_nr)[i] = room->set_timer(5 + i, 3 + (2 * i));
+		}
+		det->start_detail(5, 2, false);
+	}
+
+	show_cur();
 }
 
 void Room91::xit(int16 eib_nr) {
+	flags.MainInput = true;
+	_G(spieler).ScrollxStep = 1;
+
+	if (eib_nr == 136)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
+
+	_G(spieler).flags34_4 = false;
+	flags.NoScroll = false;
+}
+
+void Room91::setup_func() {
+	if (!_G(spieler).flags34_4) {
+		calc_person_look();
+		const int xyPos = spieler_vector[0].Xypos[0];
+		if (xyPos < 130)
+			go_auto_xy(40, 97, P_HOWARD, ANI_GO);
+		else if (xyPos < 312)
+			go_auto_xy(221, 94, P_HOWARD, ANI_GO);
+		else if (xyPos < 445)
+			go_auto_xy(342, 93, P_HOWARD, ANI_GO);
+		else
+			go_auto_xy(536, 90, P_HOWARD, ANI_GO);
+	} else {
+		if (menu_display)
+			return;
+		
+		menu_item = CUR_USE;
+		cur_2_inventory();
+		cursor_wahl(CUR_22);
+
+		if (_G(maus_links_click) == 0 || _G(spieler).r91_word18DB2A)
+			return;
+
+		const int old_r91_word18DB2A = _G(spieler).r91_word18DB2A;
+		_G(maus_links_click) = old_r91_word18DB2A;
+		_G(spieler).r91_word18DB2A = 1;
+		const int aniNr = 1 + (minfo.y <= 100 ? 1 : 0);
+		hide_cur();
+		det->stop_detail(0);
+		start_detail_wait(aniNr, 1, ANI_VOR);
+		_G(spieler).r91_word18DB2A = old_r91_word18DB2A;
+		det->start_detail(0, 255, false);
+		det->start_detail(aniNr + 2, 1, false);
+		det->start_detail(7, 1, false);
+		start_spz_wait(62, 1, false, P_HOWARD);
+		_G(spieler).SVal3 += 1;
+		show_cur();
+		if (_G(spieler).SVal3 == 4) {
+			det->stop_detail(0);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			hide_cur();
+			auto_move(1, P_CHEWY);
+			stop_spz();
+			start_aad_wait(505, -1);
+			_G(spieler).PersonHide[P_HOWARD] = true;
+			start_detail_wait(9, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_HOWARD] = false;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler).flags34_4 = false;
+			show_cur();
+			switch_room(50);
+		}
+	}
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room91.h b/engines/chewy/rooms/room91.h
index 982d3919f09..e5b390b484a 100644
--- a/engines/chewy/rooms/room91.h
+++ b/engines/chewy/rooms/room91.h
@@ -29,6 +29,7 @@ class Room91 {
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static void setup_func();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 7cdbee4e5a5..e1a6da9b6cf 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -35,7 +35,7 @@ void Room95::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 140;
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
-	spieler_mi[P_HOWARD].Mode = 1;
+	spieler_mi[P_HOWARD].Mode = true;
 
 	if (_G(spieler).flags35_20)
 		det->show_static_spr(10);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index dadda435dd1..f50a28afd33 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -499,6 +499,8 @@ struct Spieler : public SpielerFlags {
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
 
+	// ---- //
+	int r91_word18DB2A = 0;
 	// ---- //
 	int r93_word18DB2C = 0;
 	// ---- //


Commit: 5356ee19767132765de20bee113710d330fe6aed
    https://github.com/scummvm/scummvm/commit/5356ee19767132765de20bee113710d330fe6aed
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Room 16 logic fixes

Changed paths:
    engines/chewy/rooms/room16.cpp


diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index bfc8b314645..d25f98d3214 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -32,6 +32,7 @@ namespace Rooms {
 
 void Room16::entry() {
 	_G(zoom_horizont) = 140;
+
 	if (!_G(spieler).R16F5Exit) {
 		det->show_static_spr(4);
 		_G(spieler).room_e_obj[32].Attribut = 255;
@@ -45,12 +46,14 @@ void Room16::entry() {
 
 int16 Room16::use_gleiter() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).R23GleiterExit = 16;
 		Room23::cockpit();
 	}
+
 	return action_flag;
 }
 


Commit: f41256a82d9b5a98b00b0f2c752c5138beedc1ce
    https://github.com/scummvm/scummvm/commit/f41256a82d9b5a98b00b0f2c752c5138beedc1ce
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:34-08:00

Commit Message:
CHEWY: Room 17 logic fixes

Changed paths:
    engines/chewy/rooms/room17.cpp


diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index c429cac136d..5403a0502b2 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -50,11 +50,19 @@ static const MovLine CHEWY_MPKT1[2] = {
 };
 
 void Room17::entry() {
+	if (!_G(spieler).R17EnergieOut) {
+		det->start_detail(1, 255, 0);
+		for (int i = 0; i < 3; ++i)
+			det->start_detail(i, 255, 0);
+	}
+
 	plot_seil();
+
 	if (_G(spieler).R17GitterWeg)
 		det->hide_static_spr(5);
 	if (_G(spieler).R17DoorKommand)
 		det->show_static_spr(7);
+
 	if (_G(spieler).R17Location == 1) {
 		flags.ZoomMov = true;
 		_G(zoom_mov_fak) = 3;
@@ -73,6 +81,7 @@ void Room17::entry() {
 		_G(zoom_horizont) = 0;
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).room_e_obj[38].Attribut = 255;
+
 		if (_G(spieler).R6DoorLeftF)
 			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
 		else
@@ -89,6 +98,7 @@ void Room17::xit() {
 		_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
 	else
 		_G(spieler).room_e_obj[36].Attribut = 255;
+
 	_G(spieler).room_e_obj[35].Attribut = 255;
 	_G(spieler).room_e_obj[39].Attribut = 255;
 	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
@@ -123,10 +133,13 @@ void Room17::gedAction(int index) {
 
 int16 Room17::use_seil() {
 	int16 action_flag = false;
+
 	if (!flags.AutoAniPlay) {
 		if (_G(spieler).R17Location == 1) {
 			if (is_cur_inventar(SEIL_INV)) {
 				action_flag = true;
+				hide_cur();
+
 				del_inventar(_G(spieler).AkInvent);
 				flags.AutoAniPlay = true;
 				auto_move(5, P_CHEWY);
@@ -137,10 +150,14 @@ int16 Room17::use_seil() {
 				plot_seil();
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				flags.AutoAniPlay = false;
-				start_aad(119, -1);
+				start_spz(5, 255, 0, 0);
+				start_aad_wait(119, -1);
+
+				show_cur();
 			}
 		}
 	}
+
 	return action_flag;
 }
 
@@ -161,6 +178,7 @@ void Room17::kletter_down() {
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
 	room->set_zoom(32);
+	spieler_mi->Vorschub = 8;
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
 	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines,
@@ -186,36 +204,38 @@ void Room17::kletter_up() {
 
 void Room17::calc_seil() {
 	if (_G(spieler).R17Seil) {
-		if (_G(spieler).R17Location != 2) {
-			if (!flags.AutoAniPlay) {
-				if (!_G(spieler).inv_cur) {
-					close_door();
-					flags.AutoAniPlay = true;
-					mov_phasen[CHEWY_OBJ].AtsText = 0;
-					mov_phasen[CHEWY_OBJ].Lines = 2;
-					mov_phasen[CHEWY_OBJ].Repeat = 1;
-					mov_phasen[CHEWY_OBJ].ZoomFak = 0;
-					auto_mov_obj[CHEWY_OBJ].Id = AUTO_OBJ0;
-					auto_mov_vector[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
-					auto_mov_obj[CHEWY_OBJ].Mode = true;
-					if (_G(spieler).R17Location == 1) {
-						kletter_down();
-						_G(spieler).R17Location = 3;
-					} else if (_G(spieler).R17Location == 3) {
-						kletter_up();
-						_G(spieler).R17Location = 1;
-					}
-					menu_item = CUR_WALK;
-					cursor_wahl(menu_item);
-					wait_auto_obj(CHEWY_OBJ);
-					set_person_spr(P_LEFT, P_CHEWY);
-					_G(spieler).ScrollyStep = 1;
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					flags.AutoAniPlay = false;
-					_G(auto_obj) = 0;
-					xit();
-				}
+		if (_G(spieler).R17Location == 2) {
+			start_aad_wait(619, -1);
+		} else if (!flags.AutoAniPlay && !_G(spieler).inv_cur) {
+			close_door();
+			flags.AutoAniPlay = true;
+			mov_phasen[CHEWY_OBJ].AtsText = 0;
+			mov_phasen[CHEWY_OBJ].Lines = 2;
+			mov_phasen[CHEWY_OBJ].Repeat = 1;
+			mov_phasen[CHEWY_OBJ].ZoomFak = 0;
+			auto_mov_obj[CHEWY_OBJ].Id = AUTO_OBJ0;
+			auto_mov_vector[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
+			auto_mov_obj[CHEWY_OBJ].Mode = true;
+			hide_cur();
+
+			if (_G(spieler).R17Location == 1) {
+				kletter_down();
+				_G(spieler).R17Location = 3;
+			} else if (_G(spieler).R17Location == 3) {
+				kletter_up();
+				_G(spieler).R17Location = 1;
 			}
+
+			menu_item = CUR_WALK;
+			cursor_wahl(menu_item);
+			wait_auto_obj(CHEWY_OBJ);
+			show_cur();
+			set_person_spr(P_LEFT, P_CHEWY);
+			_G(spieler).ScrollyStep = 1;
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			flags.AutoAniPlay = false;
+			_G(auto_obj) = 0;
+			xit();
 		}
 	}
 }
@@ -223,6 +243,7 @@ void Room17::calc_seil() {
 void Room17::door_kommando(int16 mode) {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
+
 		if (!mode) {
 			if (!_G(spieler).R17DoorKommand) {
 				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
@@ -234,6 +255,7 @@ void Room17::door_kommando(int16 mode) {
 		} else {
 			close_door();
 		}
+
 		flags.AutoAniPlay = false;
 		atds->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
 	}
@@ -243,45 +265,68 @@ void Room17::close_door() {
 	if (_G(spieler).R17DoorKommand) {
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).R17DoorKommand = false;
+		atds->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, 1);
 		det->hide_static_spr(7);
 		det->start_detail(4, 1, ANI_RUECK);
 	}
 }
 
 int16 Room17::energie_hebel() {
-	int16 dia_nr;
 	int16 action_flag = false;
+
+	hide_cur();
 	auto_move(7, P_CHEWY);
+
 	if (!_G(spieler).R17HebelOk) {
 		action_flag = true;
+
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
+			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
-			dia_nr = 38;
-		} else
-			dia_nr = 37;
-		start_aad_wait(dia_nr, -1);
+			start_aad_wait(38, -1);
+		} else {
+			start_aad_wait(37, -1);
+		}
+
 	} else if (!_G(spieler).inv_cur) {
 		action_flag = true;
+
 		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
 		_G(spieler).R17EnergieOut ^= 1;
 		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
 		det->play_sound(12, 0);
-		if (_G(spieler).R17EnergieOut)
+
+		if (!_G(spieler).R17EnergieOut) {
+			det->start_detail(1, 255, 0);
+
+			for (int i = 0; i < 3; ++i)
+				det->start_detail(i + 6, 255, 0);
+		}
+
+		atds->set_ats_str(142, 1, _G(spieler).R17EnergieOut ? 1 : 0);
+		atds->set_ats_str(140, 1, _G(spieler).R17EnergieOut ? 1 : 0);
+		det->play_sound(12, 0);
+
+		if (_G(spieler).R17EnergieOut) {
 			det->disable_sound(15, 0);
-		else {
+		} else {
 			det->enable_sound(15, 0);
 			det->play_sound(15, 0);
 		}
 	}
+
+	show_cur();
 	return action_flag;
 }
 
 int16 Room17::get_oel() {
 	int16 action_flag = false;
+	hide_cur();
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
-		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_EKEL, 3, ANI_VOR, P_CHEWY);
 		start_aad_wait(60, -1);
 	} else if (is_cur_inventar(BECHER_LEER_INV)) {
 		action_flag = true;
@@ -295,6 +340,7 @@ int16 Room17::get_oel() {
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
+	show_cur();
 	return action_flag;
 }
 


Commit: 9973c7e8125be6e2077239097d45a1345ff49b66
    https://github.com/scummvm/scummvm/commit/9973c7e8125be6e2077239097d45a1345ff49b66
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:35-08:00

Commit Message:
CHEWY: Room 18 logic fixes

Changed paths:
    engines/chewy/rooms/room18.cpp


diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 6488074c6c6..37b9708f413 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -89,20 +89,22 @@ static const AniBlock ABLOCK24[2] = {
 
 void Room18::entry() {
 	int16 i;
-	_G(spieler).R18MoniSwitch = 0;
-	_G(spieler).R18CartTerminal = 0;
+
+	_G(spieler).R18MoniSwitch = false;
 	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
 	_G(spieler).ScrollxStep = 2;
+
 	if (_G(spieler).R18CartTerminal)
 		det->show_static_spr(23);
-	if (!_G(spieler).R18SurimyWurf)
+	if (!_G(spieler).R18SurimyWurf) {
 		init_borks();
-	else {
+	} else {
 		for (i = 0; i < 5; i++)
 			det->hide_static_spr(BORK_SPR[i]);
-		for (i = 0; i < (4 - _G(spieler).R18Krone); i++)
+		for (i = 0; i < (4 - _G(spieler).R18Krone ? 1 : 0); i++)
 			det->show_static_spr(BORK_SPR1[i]);
 	}
+
 	if (_G(spieler).R16F5Exit)
 		det->hide_static_spr(19);
 	if (_G(spieler).R17EnergieOut) {
@@ -111,16 +113,20 @@ void Room18::entry() {
 	} else {
 		atds->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
 	}
+
 	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
 		start_aad_wait(39, -1);
 		_G(spieler).R18FirstEntry = true;
 	}
+	if (_G(spieler).R18Gitter)
+		_G(spieler).scrolly = 0;
 }
 
 bool Room18::timer(int16 t_nr, int16 ani_nr) {
 	if (!_G(spieler).R18SurimyWurf) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
+
 			if (t_nr == _G(timer_nr)[0]) {
 				det->hide_static_spr(16);
 				start_detail_wait(10, 1, ANI_VOR);
@@ -131,6 +137,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 				det->hide_static_spr(17);
 				start_detail_wait(9, 1, ANI_VOR);
 				det->show_static_spr(17);
+
 				if (!_G(spieler).R18SondeMoni) {
 					_G(spieler).R18SondeMoni = true;
 					start_detail_wait(2, 1, ANI_VOR);
@@ -143,9 +150,11 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 				} else {
 					monitor();
 				}
+
 				show_cur();
 				uhr->reset_timer(_G(timer_nr)[1], 15);
 			}
+
 			flags.AutoAniPlay = false;
 		}
 	}
@@ -163,10 +172,12 @@ void Room18::gedAction(int index) {
 
 void Room18::init_borks() {
 	int16 i;
+
 	for (i = 0; i < 5; i++)
 		det->show_static_spr(BORK_SPR[i]);
 	for (i = 0; i < 4; i++)
 		det->hide_static_spr(BORK_SPR1[i]);
+
 	_G(timer_nr)[0] = room->set_timer(255, 10);
 	_G(timer_nr)[1] = room->set_timer(255, 15);
 	_G(spieler).scrollx = 276;
@@ -178,6 +189,7 @@ void Room18::monitor() {
 	int16 nr;
 	nr = 0;
 	_G(spieler).R18MoniSwitch ^= 1;
+
 	if (_G(spieler).R18MoniSwitch) {
 		start_ani_block(2, ABLOCK21);
 		if (_G(spieler).R17EnergieOut)
@@ -188,24 +200,31 @@ void Room18::monitor() {
 		det->stop_detail(23);
 		atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
 	}
+
 	atds->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
 }
 
 int16 Room18::sonden_moni() {
 	int16 i;
 	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
+
+	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
+
 		hide_cur();
 		auto_move(8, P_CHEWY);
 		start_detail_wait(3, 1, ANI_VOR);
 		det->show_static_spr(10);
 		start_ani_block(3, ABLOCK20);
+
 		for (i = 0; i < 3; i++)
 			det->show_static_spr(i + 12);
+
 		wait_show_screen(40);
+
 		for (i = 0; i < 5; i++)
 			det->hide_static_spr(i + 10);
+
 		show_cur();
 	}
 	return action_flag;
@@ -214,8 +233,10 @@ int16 Room18::sonden_moni() {
 int16 Room18::calc_surimy() {
 	int16 i;
 	int16 action_flag = false;
+
 	if (is_cur_inventar(SURIMY_INV)) {
 		action_flag = true;
+
 		hide_cur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
@@ -229,6 +250,7 @@ int16 Room18::calc_surimy() {
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[SURIMY_OBJ].Mode = true;
+
 		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
 
@@ -246,6 +268,7 @@ int16 Room18::calc_surimy() {
 				(const MovLine *)SURIMY_MPKT);
 			wait_detail(17);
 		}
+
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_auto_obj(SURIMY_OBJ);
 
@@ -263,11 +286,12 @@ int16 Room18::calc_surimy() {
 
 		for (i = 0; i < 3; i++)
 			det->hide_static_spr(i + 15);
+
 		start_ani_block(2, ABLOCK23);
 		det->show_static_spr(18);
 		det->show_static_spr(19);
-
 		det->hide_static_spr(26);
+
 		flags.NoScroll = true;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
@@ -300,46 +324,55 @@ int16 Room18::calc_surimy() {
 		_G(auto_obj) = 0;
 
 		atds->set_ats_str(153, 1, ATS_DATEI);
-
 		atds->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
+
 		for (i = 0; i < 3; i++)
 			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
 
+		atds->del_steuer_bit(179, 0, 1);
 		show_cur();
+		det->del_taf_tbl(245, 50, 0);
 	}
+
 	return action_flag;
 }
 
 int16 Room18::calc_schalter() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
-		auto_move(6, P_CHEWY);
 
+		hide_cur();
+		auto_move(6, P_CHEWY);
 		monitor();
+		show_cur();
 	}
+
 	return action_flag;
 }
 
 short Room18::use_cart_moni() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
+
+		hide_cur();
 		auto_move(9, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		_G(spieler).R18CartTerminal ^= 1;
-		if (!_G(spieler).R18CartTerminal) {
-			atds->set_ats_str(157, TXT_MARK_LOOK, 0, ATS_DATEI);
 
+		if (!_G(spieler).R18CartTerminal) {
 			atds->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
 			det->hide_static_spr(23);
 			start_detail_wait(20, 1, ANI_RUECK);
 		} else {
-			atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
 			atds->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
 			start_detail_wait(20, 1, ANI_VOR);
 			det->show_static_spr(23);
+
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
 				atds->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
@@ -352,12 +385,18 @@ short Room18::use_cart_moni() {
 
 int16 Room18::go_cyberspace() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
+
+		hide_cur();
 		auto_move(7, P_CHEWY);
 		cur_2_inventory();
+		show_cur();
+
 		switch_room(24);
 	}
+
 	return action_flag;
 }
 


Commit: d05326b884255fecb7b79906580aacafe1340a2b
    https://github.com/scummvm/scummvm/commit/d05326b884255fecb7b79906580aacafe1340a2b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:35-08:00

Commit Message:
CHEWY: Room 21 logic fixes

Changed paths:
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room21.h


diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 438cbc5c9fd..538e94001b2 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -63,12 +63,14 @@ static const AniBlock ABLOCK19[3] = {
 };
 
 void Room21::entry() {
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ScrollyStep = 2;
 	load_chewy_taf(CHEWY_MINI);
 	calc_laser();
 	init_spinne();
 	_G(timer_nr)[2] = room->set_timer(255, 1);
 	flags.NoEndPosMovObj = true;
-	SetUpScreenFunc = r21setup_func;
+	SetUpScreenFunc = setup_func;
 }
 
 bool Room21::timer(int16 t_nr, int16 ani_nr) {
@@ -94,13 +96,15 @@ void Room21::calc_laser() {
 	}
 
 	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
-		if (obj->check_inventar(SEIL_INV) == false) {
+		if (!obj->check_inventar(SEIL_INV) && !_G(spieler).R17Seil) {
 			obj->show_sib(SIB_SEIL_R21);
 			atds->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		}
+
 		_G(spieler).R21Laser2Weg = true;
 		det->stop_detail(4);
 		atds->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+
 	} else {
 		obj->hide_sib(SIB_SEIL_R21);
 		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
@@ -154,7 +158,7 @@ void Room21::e_streifen() {
 	init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[ENERGIE_OBJ].Lines, (const MovLine *)SPINNE_MPKT2);
 }
 
-void Room21::r21setup_func() {
+void Room21::setup_func() {
 	if (auto_mov_vector[SPINNE2_OBJ].Xypos[1] >= 190) {
 		if (!_G(e_streifen)) {
 			_G(e_streifen) = true;
@@ -186,6 +190,7 @@ void Room21::chewy_kolli() {
 			xoff += 10;
 		xoff += auto_mov_vector[i].Xzoom;
 		yoff += auto_mov_vector[i].Yzoom;
+
 		if ((!i && spieler_vector[P_CHEWY].Xypos[0] < 516) ||
 			(i == 1 && spieler_vector[P_CHEWY].Xypos[1] > 70) ||
 			(i == 2)) {
@@ -197,6 +202,7 @@ void Room21::chewy_kolli() {
 				kolli = true;
 		}
 	}
+
 	if (kolli) {
 		if (!flags.AutoAniPlay) {
 			tmp = spieler_vector[P_CHEWY].Count;
@@ -207,8 +213,8 @@ void Room21::chewy_kolli() {
 				ani_nr = 10;
 			else
 				ani_nr = 11;
-			det->
-				set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+
+			det->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 			start_detail_wait(ani_nr, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			flags.AutoAniPlay = false;
@@ -221,6 +227,7 @@ void Room21::chewy_kolli() {
 
 void Room21::salto() {
 	int16 i;
+
 	if (!_G(spieler).inv_cur) {
 		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
 			if (!_G(spieler).R21Salto) {
@@ -228,10 +235,12 @@ void Room21::salto() {
 					_G(spieler).R21Salto = true;
 					flags.AutoAniPlay = true;
 					_G(spieler).PersonHide[P_CHEWY] = true;
-					for (i = 0; i < 3; i++)
-						det->
-						set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]
-						);
+
+					for (i = 0; i < 3; i++) {
+						det->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
+							spieler_vector[P_CHEWY].Xypos[1]);
+					}
+
 					start_ani_block(3, ABLOCK19);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					start_aad_wait(36, -1);
@@ -249,6 +258,7 @@ void Room21::use_gitter_energie() {
 	_G(auto_obj) = 0;
 	_G(spieler).R17Location = 1;
 	_G(spieler).PersonHide[P_CHEWY] = true;
+
 	switch_room(17);
 	det->hide_static_spr(5);
 	start_detail_wait(9, 1, ANI_VOR);
@@ -258,6 +268,7 @@ void Room21::use_gitter_energie() {
 
 int16 Room21::use_fenster() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (!flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
 			action_flag = true;
@@ -266,15 +277,18 @@ int16 Room21::use_fenster() {
 			auto_move(13, P_CHEWY);
 			set_person_pos(541, 66, P_CHEWY, P_LEFT);
 			switch_room(18);
+
 			if (!_G(spieler).R18FirstEntry) {
 				start_aad_wait(39, -1);
 				_G(spieler).R18FirstEntry = true;
 			}
+
 			_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
 			_G(spieler).room_e_obj[41].Attribut = 255;
 			flags.AutoAniPlay = false;
 		}
 	}
+
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room21.h b/engines/chewy/rooms/room21.h
index 7809aec1e75..592f79ec1d8 100644
--- a/engines/chewy/rooms/room21.h
+++ b/engines/chewy/rooms/room21.h
@@ -29,7 +29,7 @@ class Room21 {
 private:
 	static void init_spinne();
 	static void e_streifen();
-	static void r21setup_func();
+	static void setup_func();
 	static void chewy_kolli();
 	static void restart_spinne2();
 


Commit: d241e66cf4a0b77e61117eccdf743efb293baeb7
    https://github.com/scummvm/scummvm/commit/d241e66cf4a0b77e61117eccdf743efb293baeb7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:35-08:00

Commit Message:
CHEWY: Room 23 logic fixes

Changed paths:
    engines/chewy/rooms/room23.cpp


diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 555686b2f4c..22069782124 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -47,6 +47,7 @@ void Room23::cockpit() {
 	_G(spieler).scrolly = 0;
 	_G(maus_links_click) = false;
 	switch_room(23);
+
 	if (_G(spieler).R23Cartridge)
 		det->show_static_spr(3);
 	else
@@ -57,6 +58,7 @@ int16 Room23::start_gleiter() {
 	int16 i;
 	int16 start_ok;
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		start_ok = false;
@@ -64,26 +66,28 @@ int16 Room23::start_gleiter() {
 			start_aad_wait(23, -1);
 		else {
 			start_ok = true;
+
 			if (_G(spieler).R23GleiterExit == 16) {
 				if (!_G(spieler).R16F5Exit) {
 					start_ok = false;
 					start_aad_wait(35, -1);
 				} else if ((!_G(spieler).R23Cartridge) || (!_G(spieler).R18CartSave)) {
-
 					start_ok = false;
 					start_aad_wait(41, -1);
 				} else if (!_G(spieler).R17EnergieOut) {
-
 					start_ok = false;
 					start_aad_wait(300, -1);
 				}
 			}
+
 			if (start_ok) {
 				hide_cur();
 				start_ani_block(4, ABLOCK15);
 				wait_show_screen(30);
+
 				for (i = 0; i < 4; i++)
 					det->stop_detail(i);
+
 				if (_G(spieler).R23GleiterExit == 14) {
 					out->setze_zeiger(0);
 					out->cls();
@@ -91,21 +95,28 @@ int16 Room23::start_gleiter() {
 					out->cls();
 					_G(spieler).R23GleiterExit = 16;
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
+
 					switch_room(_G(spieler).R23GleiterExit);
-					start_spz(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
-					while (flags.SpzAni && !SHOULD_QUIT)
-						set_up_screen(DO_SETUP);
+					start_spz_wait(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
 					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
+
 					_G(spieler).DelaySpeed = 10;
 					start_aad_wait(59, -1);
 					stop_person(P_CHEWY);
 					_G(maus_links_click) = false;
+
 				} else if (_G(spieler).R23GleiterExit == 16) {
 					out->setze_zeiger(0);
 					out->cls();
 					flic_cut(FCUT_019, CFO_MODE);
 					_G(spieler).R23GleiterExit = 25;
 
+					cur_2_inventory();
+					remove_inventory(5);
+					remove_inventory(6);
+					remove_inventory(4);
+					remove_inventory(15);
+					remove_inventory(16);
 					switch_room(_G(spieler).R23GleiterExit);
 				}
 
@@ -113,28 +124,32 @@ int16 Room23::start_gleiter() {
 			}
 		}
 	}
+
 	return action_flag;
 }
 
 void Room23::use_cartridge() {
 	del_inventar(_G(spieler).AkInvent);
-	atds->set_ats_str(111, 1, ATS_DATEI);
-	atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R23Cartridge = true;
+
 	if (_G(spieler).R18CartSave) {
+		atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(111, 1, ATS_DATEI);
 		start_detail_wait(4, 1, ANI_VOR);
 		det->show_static_spr(3);
+	} else {
+		atds->set_ats_str(111, 1, ATS_DATEI);
 	}
+
 	menu_item_vorwahl = CUR_USE;
 }
 
 void Room23::get_cartridge() {
 	atds->set_ats_str(111, 0, ATS_DATEI);
 	atds->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-	if (_G(spieler).R18CartSave) {
-		_G(spieler).R23Cartridge = false;
-		det->hide_static_spr(3);
-	}
+
+	_G(spieler).R23Cartridge = false;
+	det->hide_static_spr(3);
 }
 
 } // namespace Rooms


Commit: 20062f6e65603e299ea13a7db66259350579b903
    https://github.com/scummvm/scummvm/commit/20062f6e65603e299ea13a7db66259350579b903
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:35-08:00

Commit Message:
CHEWY: Room 6 logic fixes

Changed paths:
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room7.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 6324e5a85b8..2f84636aedd 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -134,11 +134,7 @@ void Room6::bola_knopf() {
 }
 
 int16 Room6::cut_serv1(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 44)
-		start_aad(108, 0);
-
-	return 0;
+	return (frame == 40) ? -1 : 0;
 }
 
 int16 Room6::cut_serv2(int16 frame) {
@@ -146,6 +142,7 @@ int16 Room6::cut_serv2(int16 frame) {
 	if (frame == 31)
 		start_aad(107, 0);
 
+	serve_speech();
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index ab590049145..92d2c249e52 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -49,11 +49,12 @@ void Room7::entry() {
 
 void Room7::haken(int16 sib_nr) {
 	int16 dia_nr;
-	del_inventar(8);
 
+	del_inventar(8);
 	_G(spieler).AkInvent = -1;
 	menu_item = CUR_WALK;
 	cursor_wahl(menu_item);
+
 	if (_G(spieler).R7RHaken) {
 		_G(spieler).R7SeilOk = true;
 		if (sib_nr == SIB_LHAKEN_R7) {
@@ -67,8 +68,10 @@ void Room7::haken(int16 sib_nr) {
 		_G(spieler).R7SeilLeft = true;
 		dia_nr = 48;
 	}
+
+	obj->calc_all_static_detail();
 	atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
-	start_aad(dia_nr);
+	start_aad_wait(dia_nr, -1);
 }
 
 void Room7::klingel() {
@@ -94,16 +97,20 @@ void Room7::klingel() {
 		det->start_detail(13, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		det->stop_detail(5);
+
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
+
 		det->start_detail(0, 255, ANI_VOR);
 		start_detail_wait(13, 1, ANI_VOR);
 		flic_cut(FCUT_002, CFO_MODE);
 		det->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
+		set_person_pos(114, 138, 0, -1);
+
 		start_detail_frame(19, 1, ANI_VOR, 6);
 		start_detail_frame(9, 1, ANI_VOR, 4);
 		det->show_static_spr(9);
@@ -111,10 +118,11 @@ void Room7::klingel() {
 		det->hide_static_spr(9);
 		obj->show_sib(SIB_SCHLOTT_R7);
 		obj->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
-		set_person_pos(114, 138, P_CHEWY, -1);
+
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
 		det->hide_static_spr(7);
+
 	} else if (!_G(spieler).R7SeilOk) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
@@ -125,6 +133,7 @@ void Room7::klingel() {
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		det->stop_detail(5);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -137,6 +146,7 @@ void Room7::klingel() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
 		det->del_taf_tbl(192, 74, 0);
+
 	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
 		_G(spieler).R7BorkFlug = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -151,6 +161,7 @@ void Room7::klingel() {
 		_G(spieler).scrolly = 0;
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
+
 	++_G(spieler).R7BellCount;
 }
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 1baf1e75a98..7e1beeb1015 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -155,10 +155,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 77:
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
+							hide_cur();
 							auto_move(3, P_CHEWY);
 							flc->set_custom_user_function(Room6::cut_serv1);
 							flic_cut(FCUT_005, CFO_MODE);
 							flc->remove_custom_user_function();
+							start_spz(4, -1, 0, 0);
+							start_aad_wait(108, 0);
+							show_cur();
 						} else {
 							action_ret = false;
 						}


Commit: b99ba267f8ba8b3dfe413ca6b6ad489d07e6efc7
    https://github.com/scummvm/scummvm/commit/b99ba267f8ba8b3dfe413ca6b6ad489d07e6efc7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:35-08:00

Commit Message:
CHEWY: Room 24 logic fixes

Changed paths:
    engines/chewy/rooms/room24.cpp


diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 7ef5825309b..ef0f4a0278b 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -35,8 +35,10 @@ static const uint8 KRISTALL_SPR[3][3] = {
 	{ 13, 14, 20 },
 };
 
+
 void Room24::entry() {
 	int16 i;
+
 	flags.MainInput = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(0, 0, P_CHEWY, -1);
@@ -47,12 +49,15 @@ void Room24::entry() {
 	curani.ani_end = 10;
 	menu_item = CUR_USER;
 	cursor_wahl(CUR_USER);
+
 	if (_G(spieler).R16F5Exit)
 		det->show_static_spr(10);
 	else
 		det->hide_static_spr(10);
+
 	calc_hebel_spr();
 	calc_animation(255);
+
 	for (i = 0; i < 3; i++) {
 		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
 			det->start_detail(5 + i * 4, 255, ANI_RUECK);
@@ -84,14 +89,15 @@ void Room24::use_hebel(int16 txt_nr) {
 	calc_animation(txt_nr - 161);
 
 	if (_G(spieler).R24Hebel[0] == 1 &&
-		_G(spieler).R24Hebel[1] == 0 &&
-		_G(spieler).R24Hebel[2] == 2) {
+			_G(spieler).R24Hebel[1] == 0 &&
+			_G(spieler).R24Hebel[2] == 2) {
 		_G(spieler).R16F5Exit = true;
 		det->enable_sound(1, 0);
 		det->disable_sound(1, 1);
 		det->start_detail(1, 1, ANI_VOR);
 		det->show_static_spr(10);
 		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
+
 	} else if (_G(spieler).R16F5Exit) {
 		det->hide_static_spr(10);
 		det->enable_sound(1, 1);
@@ -105,6 +111,7 @@ void Room24::use_hebel(int16 txt_nr) {
 void Room24::calc_hebel_spr() {
 	int16 i;
 	int16 j;
+
 	if (!_G(spieler).R24FirstEntry) {
 		_G(spieler).R24FirstEntry = true;
 		_G(spieler).R24Hebel[0] = 2;
@@ -114,9 +121,11 @@ void Room24::calc_hebel_spr() {
 		_G(spieler).R24Hebel[2] = 0;
 		_G(spieler).R24HebelDir[2] = 1;
 	}
+
 	for (i = 0; i < 3; i++) {
 		for (j = 0; j < 3; j++)
 			det->hide_static_spr(1 + j + i * 3);
+
 		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
 		atds->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
 	}
@@ -125,6 +134,7 @@ void Room24::calc_hebel_spr() {
 void Room24::calc_animation(int16 kristall_nr) {
 	int16 i;
 	int16 ani_nr;
+
 	if (kristall_nr != 255) {
 		hide_cur();
 
@@ -134,27 +144,28 @@ void Room24::calc_animation(int16 kristall_nr) {
 			} else {
 				ani_nr = 8;
 			}
+
 			det->enable_sound(ani_nr + kristall_nr * 4, 0);
 			det->disable_sound(5 + ani_nr + kristall_nr * 4, 0);
 			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
 			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
-		}
-
-		else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 
+		} else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 			if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
 				ani_nr = 7;
 			} else {
 				ani_nr = 8;
 			}
+
 			det->disable_sound(ani_nr + kristall_nr * 4, 0);
 			det->enable_sound(5 + ani_nr + kristall_nr * 4, 0);
 			det->stop_detail(5 + kristall_nr * 4);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
 		}
+
 		show_cur();
 	}
 


Commit: 40810f055d3c7196f1bc7bd48d3e60f690a45a69
    https://github.com/scummvm/scummvm/commit/40810f055d3c7196f1bc7bd48d3e60f690a45a69
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 11 & 12 script fixes

Changed paths:
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/rooms/room12.cpp


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index f37f98f9955..0169b5ef92a 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -162,7 +162,9 @@ int16 Room11::scanner() {
 			} else if (!_G(spieler).inv_cur) {
 				if (!_G(spieler).R11TerminalOk) {
 					action_flag = true;
+					flc->set_custom_user_function(cut_serv);
 					flic_cut(FCUT_010, CFO_MODE);
+					flc->remove_custom_user_function();
 					start_aad_wait(20, -1);
 				} else {
 					action_flag = true;
@@ -206,5 +208,16 @@ void Room11::put_card() {
 	}
 }
 
+int16 Room11::cut_serv(int16 frame) {
+	if (_G(spieler).R11DoorRightF)
+		det->plot_static_details(0, 0, 0, 0);
+	if (_G(spieler).R11DoorRightB)
+		det->plot_static_details(0, 0, 6, 6);
+	if (_G(spieler).R45MagOk)
+		det->plot_static_details(0, 0, 7, 7);
+
+	return 0;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index c751026ac85..07e775e8943 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -31,6 +31,8 @@ class Room11 {
 private:
 	static void bork_zwinkert();
 	static void chewy_bo_use();
+	static int16 cut_serv(int16 frame);
+
 public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index c1198fef03c..e31da9002cf 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -291,10 +291,19 @@ int16 Room12::useTransformerTube() {
 }
 
 int16 Room12::cut_serv(int16 frame) {
+	if (_G(spieler).R11DoorRightF)
+		det->plot_static_details(0, 0, 0, 0);
+	if (_G(spieler).R11DoorRightB)
+		det->plot_static_details(0, 0, 6, 6);
+	if (_G(spieler).R6DoorRightB)
+		det->plot_static_details(0, 0, 7, 7);
+
 	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+
 	if (frame == 43)
 		start_aad(106, 0);
 
+	serve_speech();
 	return 0;
 }
 


Commit: f386e90ea8bf6a404b52d6eb1e20559aaf4e989a
    https://github.com/scummvm/scummvm/commit/f386e90ea8bf6a404b52d6eb1e20559aaf4e989a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 25 logic fixes

Changed paths:
    engines/chewy/rooms/room25.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 6fba05edfd1..30c72ae98d9 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -45,13 +45,24 @@ static const MovLine SURIMY_MPKT[2] = {
 	{ { -20, 150, 150 }, 0, 6 }
 };
 
+
 void Room25::entry() {
+	if (!_G(spieler).R25GleiteLoesch) {
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
+
+		for (int i = 0; i < 9; ++i)
+			det->start_detail(i, 255, 0);
+	}
+
 	if (!_G(spieler).R29Schlauch2) {
 		det->hide_static_spr(0);
 		det->hide_static_spr(1);
 	}
+
 	if (!_G(spieler).R25FirstEntry) {
 		hide_cur();
+
 		if (obj->check_inventar(TRANSLATOR_INV)) {
 			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
 			atds->set_ats_str(113, 0, ATS_DATEI);
@@ -61,30 +72,38 @@ void Room25::entry() {
 			menu_item = CUR_WALK;
 			_G(spieler).AkInvent = -1;
 			cursor_wahl(menu_item);
-			del_invent_slot(TRANSLATOR_INV);
 		}
+
 		_G(spieler).R25FirstEntry = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, FLC_MODE);
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
 		fx_blend = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(64, -1);
 		show_cur();
+
 	} else if (_G(spieler).R25GleiterExit) {
-		set_person_pos(127, 122, P_CHEWY, P_LEFT);
-		if (_G(spieler).R25SurimyGo < 1) {
-			++_G(spieler).R25SurimyGo;
-		} else {
-			_G(spieler).R25GleiterExit = false;
-			xit_gleiter();
+		if (!flags.LoadGame) {
+			set_person_pos(127, 122, 0, 0);
+
+			if (!_G(spieler).R25SurimyGo) {
+				_G(spieler).R25SurimyGo = 1;
+				xit_gleiter();
+			}
 		}
 	}
+
+	_G(spieler).R25GleiterExit = false;
 }
 
 int16 Room25::gleiter_loesch() {
 	int16 action_flag = false;
+	hide_cur();
+
 	if (!_G(spieler).R25GleiteLoesch && _G(spieler).R29Schlauch2) {
 		if (!_G(spieler).inv_cur) {
 			action_flag = true;
@@ -94,26 +113,39 @@ int16 Room25::gleiter_loesch() {
 			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			atds->set_ats_str(219, 1, ATS_DATEI);
 			atds->set_ats_str(187, 1, ATS_DATEI);
+			det->disable_sound(0, 0);
+
+			for (int i = 0; i < 9; ++i)
+				det->stop_detail(i);
 		}
+
 	} else if (_G(spieler).R25GleiteLoesch) {
 		if (is_cur_inventar(MILCH_LEER_INV)) {
 			action_flag = true;
 			auto_move(2, P_CHEWY);
-			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait((_G(spieler).ChewyAni == 5) ? 28 : 14,
+				1, ANI_VOR, P_CHEWY);
+
 			del_inventar(_G(spieler).AkInvent);
 			obj->add_inventar(MILCH_WAS_INV, &room_blk);
 			inventory_2_cur(MILCH_WAS_INV);
 			start_aad_wait(253, -1);
 		}
 	}
+
+	show_cur();
 	return action_flag;
 }
 
 int16 Room25::use_gleiter() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
 		action_flag = true;
+		hide_cur();
 		auto_move(3, P_CHEWY);
+		show_cur();
+
 		_G(spieler).R23GleiterExit = 25;
 		Room23::cockpit();
 	}
@@ -122,6 +154,7 @@ int16 Room25::use_gleiter() {
 
 void Room25::xit_gleiter() {
 	if (!_G(spieler).R25SurimyLauf) {
+		hide_cur();
 		_G(spieler).R25SurimyLauf = true;
 		det->load_taf_seq(56, 8, 0);
 		_G(auto_obj) = 1;
@@ -136,11 +169,14 @@ void Room25::xit_gleiter() {
 			(const MovLine *)SURIMY_MPKT);
 		fx_blend = BLEND1;
 		set_up_screen(DO_SETUP);
+
 		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(65, -1);
 		fx_blend = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
 		_G(auto_obj) = 0;
+
+		show_cur();
 	}
 }
 


Commit: 0c52563100926d05c19758738feda51b9538cdcf
    https://github.com/scummvm/scummvm/commit/0c52563100926d05c19758738feda51b9538cdcf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 27 logic fixes

Changed paths:
    engines/chewy/rooms/room27.cpp


diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index d382c2a42a2..8516999fa79 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -33,8 +33,10 @@ void Room27::entry() {
 		_G(timer_nr)[0] = room->set_timer(0, 5);
 		det->set_static_ani(0, -1);
 		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
-	} else
+	} else {
 		atds->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	_G(spieler).ScrollxStep = 2;
 }
@@ -42,6 +44,7 @@ void Room27::entry() {
 void Room27::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	hide_cur();
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
 			start_aad_wait(175, -1);
@@ -55,22 +58,29 @@ void Room27::xit(int16 eib_nr) {
 			start_aad_wait(174, -1);
 		}
 	}
+
 	_G(spieler).PersonHide[P_HOWARD] = false;
 	show_cur();
 }
 
 void Room27::get_surimy() {
 	obj->calc_all_static_detail();
+	hide_cur();
 	auto_move(4, P_CHEWY);
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		start_aad_wait(171, -1);
 	}
+
+	show_cur();
 	obj->hide_sib(SIB_SURIMY_R27);
 }
 
 void Room27::talk_howard() {
+	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad_wait(173, -1);
+	show_cur();
 }
 
 void Room27::howard_ged() {


Commit: f4edc4e5f30919faa485fc5eb8973d2be6ee6001
    https://github.com/scummvm/scummvm/commit/f4edc4e5f30919faa485fc5eb8973d2be6ee6001
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 28 logic fixes

Changed paths:
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room28.h


diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 4c0d7818f7d..4fefc14ab63 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -33,20 +33,23 @@ void Room28::entry(int16 eib_nr) {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
+
 	if (_G(spieler).R28RKuerbis)
 		det->show_static_spr(6);
 	if (_G(spieler).R28Briefkasten) {
 		det->show_static_spr(8);
 		det->show_static_spr(9);
-	} else
+	} else {
 		det->show_static_spr(7);
+	}
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 		hide_cur();
 		SetUpScreenFunc = setup_func;
-		if (_G(spieler).R40Wettbewerb) {
 
+		if (_G(spieler).R40Wettbewerb) {
 			_G(spieler).scrollx = 320;
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			haendler();
@@ -55,7 +58,6 @@ void Room28::entry(int16 eib_nr) {
 			switch (eib_nr) {
 			case 55:
 				if (!_G(spieler).R28EntryHaus) {
-
 					_G(spieler).R28EntryHaus = true;
 					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
 					auto_move(3, P_HOWARD);
@@ -70,19 +72,30 @@ void Room28::entry(int16 eib_nr) {
 					_G(spieler).room_e_obj[62].Attribut = 255;
 					atds->set_ats_str(208, 1, ATS_DATEI);
 					flags.NoScroll = true;
+
 					auto_scroll(0, 0);
-					flc->set_flic_user_function(cut_serv);
+					flc->set_flic_user_function(cut_serv1);
 					flic_cut(FCUT_064, FLC_MODE);
 					flc->remove_flic_user_function();
 					det->show_static_spr(6);
-					flags.NoScroll = false;
+
 					if (!_G(spieler).R40TeilKarte) {
+						out->ausblenden(0);
+						out->set_teilpalette(pal, 255, 1);
+						start_aad_wait(607, -1);
+						fx_blend = BLEND3;
+					}
+
+					flags.NoScroll = false;
+
+					if (_G(spieler).R40TeilKarte) {
 						wait_show_screen(50);
 						start_aad_wait(195, -1);
 					} else {
 						haendler();
 					}
-					_G(spieler).ScrollxStep = 1;
+
+					_G(spieler).ScrollxStep = 2;
 				}
 				break;
 
@@ -116,8 +129,11 @@ void Room28::entry(int16 eib_nr) {
 				}
 				break;
 
+			default:
+				break;
 			}
 		}
+
 		show_cur();
 	}
 }
@@ -126,18 +142,21 @@ void Room28::xit(int16 eib_nr) {
 	_G(spieler).R28PostCar = false;
 	_G(spieler).ScrollxStep = 1;
 	hide_cur();
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
 		if (eib_nr == 69) {
-			SetUpScreenFunc = 0;
+			SetUpScreenFunc = nullptr;
 			if (!_G(spieler).R28ExitTown) {
 				start_aad_wait(178, -1);
 				_G(spieler).R28ExitTown = true;
 			}
+
 			flags.ExitMov = false;
 			auto_move(6, P_HOWARD);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 		}
 	}
+
 	show_cur();
 }
 
@@ -148,16 +167,22 @@ void Room28::gedAction(int index) {
 
 void Room28::haendler() {
 	hide_cur();
-	SetUpScreenFunc = 0;
+	SetUpScreenFunc = nullptr;
 	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
 	atds->set_ats_str(209, 1, ATS_DATEI);
 	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
+
 	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
 	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
 	det->set_static_ani(2, -1);
-	wait_show_screen(50);
+
+	while (_G(spieler).scrollx < SCREEN_WIDTH) {
+		SHOULD_QUIT_RETURN;
+		set_up_screen(DO_SETUP);
+	}
+
 	start_aad_wait(196, -1);
 	det->del_static_ani(2);
 	det->set_static_ani(3, -1);
@@ -179,16 +204,15 @@ void Room28::haendler() {
 void Room28::setup_func() {
 	int16 x;
 	calc_person_look();
-	if (spieler_vector[P_CHEWY].Xypos[0] > 350)
-		x = 420;
-	else
-		x = 320;
+
+	x = (spieler_vector[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
 	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
 }
 
 void Room28::use_surimy() {
 	int16 dia_nr;
 	int16 ani_nr;
+
 	if (!_G(spieler).R28SurimyCar) {
 		hide_cur();
 		flags.NoScroll = true;
@@ -198,18 +222,20 @@ void Room28::use_surimy() {
 		flc->set_flic_user_function(cut_serv2);
 		flic_cut(FCUT_055, FLC_MODE);
 		flc->remove_flic_user_function();
-		flc->set_flic_user_function(cut_serv);
+		flc->set_flic_user_function(cut_serv1);
 		flic_cut(FCUT_056, FLC_MODE);
 		flc->remove_flic_user_function();
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
 		atds->set_ats_str(205, 1, ATS_DATEI);
 		atds->set_ats_str(222, 1, ATS_DATEI);
+
 	} else {
 		ani_nr = CH_TALK5;
 		dia_nr = 139;
 		obj->calc_rsi_flip_flop(SIB_AUTO_R28);
 	}
+
 	obj->calc_all_static_detail();
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
@@ -220,75 +246,88 @@ void Room28::use_surimy() {
 void Room28::set_pump() {
 	int16 tmp;
 	hide_cur();
+
 	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
 			if (spieler_vector[P_CHEWY].Xypos[0] < 380)
 				auto_move(5, P_CHEWY);
+
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			if (person_end_phase[P_CHEWY] == P_RIGHT)
-				tmp = 1;
-			else
-				tmp = 0;
+			tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
 			del_inventar(K_MASKE_INV);
-			det->
-				set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+
 			if (_G(spieler).R28PumpTxt1 < 3) {
 				start_aad(137);
 				++_G(spieler).R28PumpTxt1;
 			}
+
 			start_detail_wait(tmp, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			load_chewy_taf(CHEWY_PUMPKIN);
 			_G(spieler).R28ChewyPump = true;
+
 			if (_G(spieler).R39TransMensch) {
 				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
-			} else
+			} else {
 				atds->set_ats_str(209, 1, ATS_DATEI);
+			}
+
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
 				stop_person(P_HOWARD);
-				SetUpScreenFunc = 0;
+				SetUpScreenFunc = nullptr;
+
+				if (flags.InitSound && _G(spieler).SpeechSwitch) {
+					while (ailsnd->isSpeechActive() && !SHOULD_QUIT)
+						set_up_screen(DO_SETUP);
+				}
+
 				start_aad_wait(177, -1);
 				SetUpScreenFunc = setup_func;
 				++_G(spieler).R28PumpTxt;
 			}
+
 			flags.AutoAniPlay = false;
 		}
 	} else {
 		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
 	}
+
 	show_cur();
 }
 
 void Room28::get_pump() {
 	int16 tmp;
+
 	if (_G(spieler).R28ChewyPump) {
 		hide_cur();
 		stop_person(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		if (person_end_phase[P_CHEWY] == P_RIGHT)
-			tmp = 1;
-		else
-			tmp = 0;
+		tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
 		det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 		start_detail_wait(tmp, 1, ANI_RUECK);
+
 		invent_2_slot(K_MASKE_INV);
 		atds->set_ats_str(209, 0, ATS_DATEI);
 		_G(spieler).room_e_obj[69].Attribut = 255;
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		load_chewy_taf(CHEWY_NORMAL);
+
 		if (_G(spieler).R28PumpTxt1 < 3) {
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(138, -1);
 		}
+
 		show_cur();
 	}
 }
 
 int16 Room28::use_breifkasten() {
 	int16 action_flag = false;
+
 	if (_G(spieler).R28Briefkasten && !_G(spieler).inv_cur) {
 		action_flag = true;
 		hide_cur();
@@ -306,10 +345,11 @@ int16 Room28::use_breifkasten() {
 		invent_2_slot(MANUSKRIPT_INV);
 		_G(spieler).R28Manuskript = true;
 	}
+
 	return action_flag;
 }
 
-int16 Room28::cut_serv(int16 frame) {
+int16 Room28::cut_serv1(int16 frame) {
 	if (_G(spieler).R28Briefkasten) {
 		det->plot_static_details(0, 0, 8, 9);
 	} else {
@@ -326,6 +366,7 @@ int16 Room28::cut_serv2(int16 frame) {
 			det->plot_static_details(0, 0, 7, 7);
 		}
 	}
+
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room28.h b/engines/chewy/rooms/room28.h
index 569f08933e5..07d3f27b65e 100644
--- a/engines/chewy/rooms/room28.h
+++ b/engines/chewy/rooms/room28.h
@@ -31,7 +31,7 @@ class Room28 {
 private:
 	static void haendler();
 	static void setup_func();
-	static int16 cut_serv(int16 frame);
+	static int16 cut_serv1(int16 frame);
 	static int16 cut_serv2(int16 frame);
 	static void get_pump();
 


Commit: 8d980ebea7162fb3ac93a85207a9874aaa5d447c
    https://github.com/scummvm/scummvm/commit/8d980ebea7162fb3ac93a85207a9874aaa5d447c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 29 logic fixes

Changed paths:
    engines/chewy/rooms/room29.cpp


diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 07640eca083..c1c17d262e0 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -45,14 +45,23 @@ static const AniBlock ABLOCK27[5] = {
 
 
 void Room29::entry() {
-	if (_G(spieler).R29Schlauch1)
+	if (_G(spieler).R29Schlauch1) {
 		det->show_static_spr(7);
-	else if (_G(spieler).R29Schlauch2) {
+	} else if (_G(spieler).R29Schlauch2) {
 		det->show_static_spr(8);
 		det->show_static_spr(10);
 	}
-	if (_G(spieler).R29AutoSitz)
+
+	if (_G(spieler).R29AutoSitz) {
 		det->show_static_spr(9);
+
+		if (_G(spieler).ChewyAni == 5)
+			atds->set_steuer_bit(212, 1, 1);
+		else
+			det->show_static_spr(9);
+	}
+
+	_G(spieler).ScrollxStep = 2;
 }
 
 void Room29::xit() {
@@ -63,8 +72,11 @@ void Room29::xit() {
 
 int16 Room29::use_pumpe() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).R29Pumpe) {
 		action_flag = true;
+		hide_cur();
+
 		if (is_cur_inventar(SCHLAUCH_INV)) {
 			_G(spieler).R29Pumpe = true;
 			_G(spieler).R29Schlauch1 = true;
@@ -73,9 +85,13 @@ int16 Room29::use_pumpe() {
 			det->show_static_spr(7);
 			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
-		} else if (!_G(spieler).inv_cur)
+		} else if (!_G(spieler).inv_cur) {
 			start_aad_wait(62, -1);
+		}
+
+		show_cur();
 	}
+
 	return action_flag;
 }
 
@@ -95,6 +111,8 @@ bool Room29::use_schlauch() {
 
 	if (is_cur_inventar(PUMPE_INV)) {
 		result = true;
+		hide_cur();
+
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		det->hide_static_spr(7);
@@ -104,11 +122,13 @@ bool Room29::use_schlauch() {
 		det->show_static_spr(10);
 		atds->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->set_ats_str(218, 1, ATS_DATEI);
+
 		_G(spieler).R29Schlauch1 = false;
 		_G(spieler).R29Schlauch2 = true;
 		del_inventar(PUMPE_INV);
 		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+		show_cur();
 	}
 
 	return result;
@@ -116,24 +136,30 @@ bool Room29::use_schlauch() {
 
 void Room29::schlitz_sitz() {
 	if (!_G(spieler).R29AutoSitz) {
+		hide_cur();
 		_G(spieler).R29AutoSitz = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->hide_static_spr(4);
-		start_aad(63);
+		det->show_static_spr(11);
 		start_ani_block(4, ABLOCK26);
 		det->show_static_spr(9);
-		while (flags.AdsDialog && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
+		det->hide_static_spr(11);
+		det->start_detail(2, 255, 0);
+		start_aad_wait(63, -1);
+
 		det->stop_detail(2);
 		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(maus_links_click) = false;
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
+
+		show_cur();
 	}
 }
 
 int16 Room29::zaun_sprung() {
 	int16 action_flag = false;
+
 	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
@@ -142,9 +168,11 @@ int16 Room29::zaun_sprung() {
 		det->hide_static_spr(9);
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
+
 		switch_room(37);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
+
 	return action_flag;
 }
 


Commit: f513e5802c2fe46ff4a3635b36db176e5e22ee18
    https://github.com/scummvm/scummvm/commit/f513e5802c2fe46ff4a3635b36db176e5e22ee18
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 31 logic fixes

Changed paths:
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room31.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index b5d0d70b6ab..2f978f206d6 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -29,9 +29,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#undef SURIMY_OBJ
-#define SURIMY_OBJ 0
-
 static const MovLine SURIMY_MPKT[2] = {
 	{ {  79, 152, 150 }, 1, 6 },
 	{ { 273, 220, 150 }, 1, 6 }
@@ -50,7 +47,7 @@ void Room31::entry() {
 }
 
 void Room31::surimy_go() {
-	if (!_G(spieler).R39ScriptOk) {
+	if (!_G(spieler).R39ScriptOk && _G(spieler).R25SurimyLauf) {
 		if (_G(spieler).R31SurimyGo >= 3) {
 			hide_cur();
 			_G(spieler).R31SurimyGo = 0;
@@ -70,22 +67,27 @@ void Room31::surimy_go() {
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			show_cur();
-		} else
+		} else {
 			++_G(spieler).R31SurimyGo;
+		}
 	}
 }
 
 void Room31::calc_luke() {
 	int16 i;
+
 	if (!_G(spieler).R31KlappeZu) {
 		for (i = 0; i < 3; i++)
 			det->show_static_spr(5 + i);
+
 		atds->set_ats_str(244, 1, ATS_DATEI);
 		atds->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
+
 	} else {
 		for (i = 0; i < 3; i++)
 			det->hide_static_spr(5 + i);
+
 		atds->set_ats_str(244, 0, ATS_DATEI);
 		atds->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).room_e_obj[75].Attribut = 255;
@@ -93,20 +95,26 @@ void Room31::calc_luke() {
 }
 
 void Room31::open_luke() {
-	if (_G(spieler).R31KlappeZu) {
+	if (!_G(spieler).inv_cur && _G(spieler).R31KlappeZu) {
+		hide_cur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
 		_G(spieler).R31KlappeZu = false;
+		det->play_sound(3, 0);
 		calc_luke();
+		show_cur();
 	}
 }
 
-void Room31::close_luke() {
-	if (!_G(spieler).R31KlappeZu) {
+void Room31::proc1() {
+	if (!_G(spieler).inv_cur && !_G(spieler).R31KlappeZu) {
+		hide_cur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
+		det->play_sound(3, 0);
 		calc_luke();
+		show_cur();
 	}
 }
 
@@ -126,6 +134,7 @@ int16 Room31::use_topf() {
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
 				atds->set_ats_str(242, 2, ATS_DATEI);
+
 			} else if (is_cur_inventar(MILCH_WAS_INV)) {
 				if (_G(spieler).R31KoernerDa) {
 					_G(spieler).R31Wasser = true;
@@ -178,9 +187,23 @@ int16 Room31::use_topf() {
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
+
 	show_cur();
 	return action_flag;
 }
 
+void Room31::close_luke() {
+	if (!_G(spieler).R31KlappeZu) {
+		hide_cur();
+		auto_move(2, 0);
+		start_spz_wait(13, 1, 0, 0);
+		_G(spieler).R31KlappeZu = true;
+		det->play_sound(3, 0);
+		det->play_sound(3, 1);
+		calc_luke();
+		show_cur();
+	}
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room31.h b/engines/chewy/rooms/room31.h
index 69394a60545..d15683dcab0 100644
--- a/engines/chewy/rooms/room31.h
+++ b/engines/chewy/rooms/room31.h
@@ -29,11 +29,12 @@ class Room31 {
 private:
 	static void surimy_go();
 	static void calc_luke();
+	static void close_luke();
 
 public:
 	static void entry();
 	static void open_luke();
-	static void close_luke();
+	static void proc1();
 	static int16 use_topf();
 };
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 7e1beeb1015..4e0e440bbd4 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -383,7 +383,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 245:
-						Room31::close_luke();
+						Room31::proc1();
 						break;
 
 					case 249:


Commit: 6166f273b19f92d1ed79a2f1f2ff0caa97a36c5d
    https://github.com/scummvm/scummvm/commit/6166f273b19f92d1ed79a2f1f2ff0caa97a36c5d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:36-08:00

Commit Message:
CHEWY: Room 32 logic fixes

Changed paths:
    engines/chewy/rooms/room32.cpp


diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 71ce06ebc6c..2f7d64caf18 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -42,12 +42,12 @@ int16 Room32::use_howard() {
 	int16 ani_nr = 0;
 	int16 action_flag = false;
 	hide_cur();
+
 	if (is_cur_inventar(TRICHTER_INV)) {
 		if (_G(spieler).R33MunterGet) {
 			auto_move(1, P_CHEWY);
 			cur_2_inventory();
-			obj->del_inventar(MUNTER_INV, &room_blk);
-			del_invent_slot(MUNTER_INV);
+			remove_inventory(MUNTER_INV);
 			flic_cut(FCUT_043, FLC_MODE);
 			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
@@ -58,6 +58,7 @@ int16 Room32::use_howard() {
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(125, -1);
 			wait_show_screen(10);
+
 			det->hide_static_spr(0);
 			start_detail_frame(0, 1, ANI_VOR, 9);
 			start_detail_wait(1, 1, ANI_RUECK);
@@ -71,6 +72,7 @@ int16 Room32::use_howard() {
 			dia_nr = 164;
 			_G(spieler).R32HowardWeg = true;
 			_G(spieler).R39HowardDa = true;
+			remove_inventory(TRICHTER_INV);
 		} else {
 			ani_nr = CH_TALK12;
 			dia_nr = 73;
@@ -79,11 +81,13 @@ int16 Room32::use_howard() {
 		ani_nr = CH_TALK12;
 		dia_nr = 74;
 	}
+
 	if (dia_nr) {
 		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
+
 	show_cur();
 	return action_flag;
 }
@@ -139,6 +143,7 @@ void Room32::use_schreibmaschine() {
 		ani_nr = CH_TALK12;
 		dia_nr = 92;
 	}
+
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
 	show_cur();
@@ -146,6 +151,7 @@ void Room32::use_schreibmaschine() {
 
 int16 Room32::get_script() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
 			action_flag = true;
@@ -159,6 +165,7 @@ int16 Room32::get_script() {
 			start_aad_wait(91, -1);
 		}
 	}
+
 	return action_flag;
 }
 


Commit: 79902c154e0ed712dbf133fe8c8cc8cc86ab647b
    https://github.com/scummvm/scummvm/commit/79902c154e0ed712dbf133fe8c8cc8cc86ab647b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 33 logic fixes

Changed paths:
    engines/chewy/rooms/room33.cpp


diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index a6d81de4511..71d18d7fbcc 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -38,6 +38,7 @@ static const MovLine SURIMY_MPKT[2] = {
 	{ { 300, 151, 150 }, 1, 6 }
 };
 
+
 void Room33::entry() {
 	if (_G(spieler).R33MunterGet)
 		det->hide_static_spr(3);
@@ -45,7 +46,7 @@ void Room33::entry() {
 }
 
 void Room33::surimy_go() {
-	if (!_G(spieler).R39ScriptOk) {
+	if (!_G(spieler).R39ScriptOk && _G(spieler).R25SurimyLauf) {
 		if (_G(spieler).R33SurimyGo >= 4) {
 			hide_cur();
 			_G(spieler).R33SurimyGo = 0;
@@ -65,33 +66,41 @@ void Room33::surimy_go() {
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			show_cur();
-		} else
+		} else {
 			++_G(spieler).R33SurimyGo;
+		}
 	}
 }
 
 void Room33::look_schublade() {
 	if (!_G(spieler).R33SchubFirst) {
 		_G(spieler).R33SchubFirst = true;
+		hide_cur();
 		auto_move(1, P_CHEWY);
 		atds->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
 		atds->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
+		show_cur();
 	}
 }
 
 int16 Room33::use_schublade() {
 	int16 action_flag = false;
+
 	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur) {
 		if (!_G(spieler).R33Messer) {
 			action_flag = true;
 			_G(spieler).R33Messer = true;
+
+			hide_cur();
 			atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
 			atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
 			atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
 			start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 			invent_2_slot(MESSER_INV);
+			show_cur();
 		}
 	}
+
 	return action_flag;
 }
 
@@ -103,8 +112,10 @@ void Room33::use_maschine() {
 	action = true;
 	hocker = false;
 	hide_cur();
+
 	if (!_G(spieler).R33MunterOk) {
 		auto_move(4, P_CHEWY);
+
 		if (_G(spieler).inv_cur) {
 			switch (_G(spieler).AkInvent) {
 			case K_FLEISCH_INV:
@@ -129,6 +140,7 @@ void Room33::use_maschine() {
 				break;
 
 			}
+
 			if (action) {
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_detail_wait(0, 1, ANI_VOR);
@@ -138,6 +150,7 @@ void Room33::use_maschine() {
 				hocker = true;
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK12;
+
 				if (calc_muntermacher()) {
 					_G(spieler).R33MunterOk = true;
 					dia_nr = 69;
@@ -152,8 +165,10 @@ void Room33::use_maschine() {
 			ani_nr = CH_TALK12;
 			dia_nr = 66;
 		}
+
 		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
+
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(2, 1, ANI_VOR);
@@ -163,16 +178,18 @@ void Room33::use_maschine() {
 			start_aad_wait(71, -1);
 			atds->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 		}
+
 		if (hocker) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(1, 1, ANI_VOR);
 			set_person_pos(64, 100, P_CHEWY, P_LEFT);
 		}
+
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
-		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(70, -1);
 	}
+
 	show_cur();
 }
 
@@ -180,18 +197,22 @@ int16 Room33::calc_muntermacher() {
 	int16 ret;
 	int16 i;
 	ret = true;
+
 	for (i = 0; i < 4; i++) {
 		if (_G(spieler).R33Munter[i] == false)
 			ret = false;
 	}
+
 	return ret;
 }
 
 int16 Room33::get_munter() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
 			action_flag = true;
+			hide_cur();
 			_G(spieler).R33MunterGet = true;
 			auto_move(4, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
@@ -200,8 +221,10 @@ int16 Room33::get_munter() {
 			det->hide_static_spr(3);
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(72, -1);
+			show_cur();
 		}
 	}
+
 	return action_flag;
 }
 


Commit: 44b633884ab6247a13afe2a6454437014aa6c1fa
    https://github.com/scummvm/scummvm/commit/44b633884ab6247a13afe2a6454437014aa6c1fa
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Implement room 90

Changed paths:
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room90.h
    engines/chewy/rooms/room91.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 76edf3b163a..1627da3329e 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room90.h"
 
@@ -30,24 +29,316 @@ namespace Chewy {
 namespace Rooms {
 
 void Room90::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler).r90_word18DB28 = 0;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
+	_G(zoom_horizont) = 150;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 4;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 60;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
+
+	if (!flags.LoadGame) {
+		switch (eib_nr) {
+		case 78:
+		case 136:
+			_G(spieler).scrollx = 0;
+			set_person_pos(32, 137, P_CHEWY, P_RIGHT);
+			set_person_pos(20, 121, P_HOWARD, P_RIGHT);
+			break;
+		case 137:
+			_G(spieler).scrollx = 176;
+			set_person_pos(411, 146, P_CHEWY, P_RIGHT);
+			set_person_pos(440, 132, P_HOWARD, P_RIGHT);
+			break;
+		default:
+			break;
+		}
+	}
+
+	hide_cur();
+	HowardMov = 1;
+
+	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
+		det->set_detail_pos(12, 329, 15);
+		det->start_detail(12, 255, false);
+		det->enable_sound(12, 0);
+		det->play_sound(12, 0);
+	}
+
+	if (_G(spieler).flags33_40 && !_G(spieler).flags34_10) {
+		det->show_static_spr(4);
+		det->show_static_spr(5);
+	}
+
+	if (!_G(spieler).flags33_10) {
+		flags.ZoomMov = false;
+		start_aad_wait(498, -1);
+		go_auto_xy(-20, 121, P_HOWARD, ANI_GO);
+		auto_move(1, P_CHEWY);
+		start_detail_frame(2, 1, ANI_VOR, 3);
+		det->start_detail(0, 1, false);
+		start_detail_wait(1, 1, ANI_VOR);
+		_G(spieler).flags33_10 = true;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
+		switch_room(91);
+	} else if (!_G(spieler).flags33_20) {
+		start_aad_wait(-1, 499);
+		_G(spieler).flags33_20 = true;
+	} else if (_G(spieler).flags34_20) {
+		set_person_pos(411, 146, P_CHEWY, P_RIGHT);
+		set_person_pos(440, 132, P_HOWARD, P_RIGHT);
+		_G(spieler).scrollx = 176;
+		_G(spieler).flags34_20 = false;
+		start_aad_wait(520, -1);
+	}
+
+	HowardMov = 0;
+	show_cur();
 }
 
 void Room90::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (eib_nr == 134)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
+	else if (eib_nr == 135)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 56;
+}
+
+void Room90::setup_func() {
+	if (menu_item != CUR_WALK)
+		return;
+
+	if (_G(spieler).r90_word18DB28)
+		--_G(spieler).r90_word18DB28;
+	else {
+		_G(spieler).r90_word18DB28 = _G(spieler).DelaySpeed - 1;
+		for (int i = 0; i < 8; ++i) {
+			if (_G(spieler).r90_Array187030[i][0] == 1) {
+				int destY = Adi[i + 4].y;
+				int destX = Adi[i + 4].x;
+				if (i >= 5) {
+					destX += _G(spieler).r90_Array187030[i][1];
+					if (destX > 540) {
+						_G(spieler).r90_Array187030[i][0] = 0;
+						det->stop_detail(i + 4);
+					}
+				} else {
+					destX -= _G(spieler).r90_Array187030[i][1];
+					if (destX < -30) {
+						_G(spieler).r90_Array187030[i][0] = 0;
+						det->stop_detail(i + 4);
+					}
+				}
+				det->set_detail_pos(i + 4, destX, destY);
+			} else {
+				++_G(spieler).r90_Array187030[i][2];
+				if (_G(spieler).r90_Array187030[i][2] < _G(spieler).r90_Array187030[i][3])
+					continue;
+				_G(spieler).r90_Array187030[i][2] = 0;
+				_G(spieler).r90_Array187030[i][0] = 1;
+				int destX;
+				if (i >= 6)
+					destX = 0;
+				else
+					destX = 500;
+
+				det->set_detail_pos(i + 4, destX, Adi[i + 4].y);
+				
+				if (!_G(spieler).flags34_40)
+					det->start_detail(i + 4, 255, false);
+			}
+		}
+	}
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || HowardMov)
+		return;
+
+	calc_person_look();
+	int xyPos = spieler_vector[P_CHEWY].Xypos[0];
+	int destX;
+
+	if (xyPos > 400)
+		destX = 440;
+	else if (xyPos > 240)
+		destX = 304;
+	else if (xyPos > 95)
+		destX = 176;
+	else
+		destX = 18;
+
+	if (HowardMov == 2)
+		destX = 18;
+
+	go_auto_xy(destX, 132, P_HOWARD, ANI_GO);
 }
 
 void Room90::proc2() {
+	if (_G(spieler).flags33_80 || flags.AutoAniPlay)
+		return;
+
+	flags.AutoAniPlay = true;
+	int diaNr = -1;
+
+	switch (_G(spieler).PersonRoomNr[0]) {
+	case 46:
+		diaNr = 496;
+		break;
+	case 56:
+		diaNr = 506;
+		break;
+	case 90:
+		diaNr = 509;
+		break;
+	case 91:
+		diaNr = 508;
+		break;
+	case 94:
+		diaNr = 572;
+		break;
+	case 95:
+		diaNr = 573;
+		break;
+	case 96:
+		diaNr = 574;
+		break;
+	case 97:
+		diaNr = 575;
+		break;
+	default:
+		break;
+	}
+
+	if (diaNr != -1) {
+		set_up_screen(DO_SETUP);
+		if (_G(spieler).ChewyAni == 7) {
+			start_spz_wait(66, 1, false, P_CHEWY);
+			start_spz(67, 255, false, P_CHEWY);
+		} else {
+			start_spz_wait(64, 1, false, P_CHEWY);
+			start_spz(65, 255, false, P_CHEWY);
+		}
+
+		hide_cur();
+		start_aad_wait(-1, diaNr);
+		show_cur();
+	}
+	flags.AutoAniPlay = false;
 }
 
 int Room90::proc3() {
-	return 0;
-}
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	start_aad_wait(515, -1);
+	start_spz_wait(14, 1, false, P_CHEWY);
+	start_spz_wait(43, 1, false, P_CHEWY);
+	load_chewy_taf(7);
+
+	while (spieler_vector[1].Xypos[0] != 176)
+		set_up_screen(DO_SETUP);
+
+	start_spz_wait(47, 1, false, P_HOWARD);
+	_G(spieler).mi[1] = 2;
+	start_aad_wait(516, -1);
+	_G(spieler).flags34_40 = true;
+	_G(spieler).flags34_100 = true;
+	auto_move(4, P_CHEWY);
+	auto_scroll(176, 0);
+	det->set_detail_pos(12, 495, 15);
+	det->start_detail(12, 255, false);
+	det->enable_sound(12, 0);
+	det->play_sound(12, 0);
+
+	int destX = 495;
+
+	while (destX > 329) {
+		destX -= 2;
+		det->set_detail_pos(12, destX, 15);
+		set_up_screen(DO_SETUP);
+	}
+
+	start_aad_wait(517, -1);
+	_G(spieler).flags35_1 = false;
+	atds->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
+	show_cur();
+
+	return 1;
+}	
 
 int Room90::proc4() {
+	if (!is_cur_inventar(111))
+		return 0;
+
+	hide_cur();
+	del_inventar(_G(spieler).AkInvent);
+	HowardMov = 2;
+	flags.ZoomMov = false;
+	auto_move(5, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(232, 142, P_CHEWY, ANI_VOR);
+	flags.NoScroll = true;
+	auto_scroll(176, 0);
+	start_detail_wait(13, 1, ANI_VOR);
+	flc->set_custom_user_function(Room90::proc5);
+	flags.NoPalAfterFlc = true;
+	flic_cut(107, CFO_MODE);
+	flc->remove_custom_user_function();
+	_G(spieler).scrollx = 0;
+	set_person_pos(76, 145, P_CHEWY, P_LEFT);
+	_G(maus_links_click) = false;
+	det->show_static_spr(4);
+	det->show_static_spr(5);
+	set_up_screen(NO_SETUP);
+	fx_blend = BLEND3;
+	spieler_mi[P_CHEWY].Mode = false;
+	flags.NoScroll = false;
+	HowardMov = 0;
+	_G(spieler).flags33_40 = true;
+	det->stop_detail(12);
+	atds->set_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
+	flags.ZoomMov = true;
+
+	show_cur();
+	return 1;
+}
+
+int16 Room90::proc5(int16 key) {
+	det->plot_static_details(_G(spieler).scrollx, 0, 3, 3);
+	
 	return 0;
 }
 
 int Room90::proc6() {
-	return 0;
+	if (!is_cur_inventar(18))
+		return 0;
+
+	_G(spieler).flags34_10 = true;
+	hide_cur();
+	cur_2_inventory();
+	auto_move(6, P_CHEWY);
+	_G(maus_links_click) = 0;
+	out->setze_zeiger(nullptr);
+	out->cls();
+	flic_cut(109, CFO_MODE);
+	test_intro(29);
+	ERROR
+
+	det->hide_static_spr(4);
+	det->hide_static_spr(5);
+	_G(spieler).scrollx = 176;
+	start_spz(45, 255, false, P_CHEWY);
+	start_aad_wait(519, -1);
+	atds->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
+
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room90.h b/engines/chewy/rooms/room90.h
index 3ee1974cdda..104d4e9444b 100644
--- a/engines/chewy/rooms/room90.h
+++ b/engines/chewy/rooms/room90.h
@@ -29,9 +29,11 @@ class Room90 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static void proc2();
 	static int proc3();
 	static int proc4();
+	static int16 proc5(int16 key);
 	static int proc6();
 };
 
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 0ba7c164eb7..c8f31bf66c2 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room91.h"
 
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index f50a28afd33..3035fffe175 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -336,6 +336,7 @@ struct SpielerFlags {
 	bool flags34_20 : 1;
 	bool flags34_40 : 1;
 	bool flags34_80 : 1;
+	bool flags34_100 : 1; // CHECKME : used in room 90 but illogical
 
 	bool flags35_1 : 1;
 	bool flags35_2 : 1;
@@ -484,8 +485,34 @@ struct Spieler : public SpielerFlags {
 	int16 R64Moni1Ani = 0;
 
 	int16 R64Moni2Ani = 0;
+	// ---- //
+	int r90_word18DB28 = 0;
+	int r90_Array187030[8][4] = {
+		{0, 1, 180, 190},
+		{0, 1,  60,  60},
+		{0, 1, 140, 150},
+		{0, 1, 140, 230},
+		{0, 1,  40, 340},
+		{0, 1,  49,  50},
+		{0, 1,  88,  90},
+		{0, 1, 170, 190}
+	};
+	
+	// ---- //
+	int r91_word18DB2A = 0;
+	// ---- //
+	int r93_word18DB2C = 0;
+	// ---- //
+	int r97_word18DB2E = 0;
+	bool r97_bool18DB30 = false;
+	bool r97_bool18DB32 = false;
+	int r97_word18DB34 = 0;
+	int r97_word18DB36 = 0;
+	int r97_word18DB38 = 0;
+	bool r97_bool18DB3A = false;
+	// --- //
 
-	uint8 mi[8] = { 0 };
+	uint8 mi[8] = {0};
 	int16 SVal1 = 0;
 	int16 SVal2 = 0;
 	int16 SVal3 = 0;
@@ -498,19 +525,6 @@ struct Spieler : public SpielerFlags {
 	bool SpeechSwitch = false;
 	uint8 FramesPerSecond = 0;
 	bool DisplayText = false;
-
-	// ---- //
-	int r91_word18DB2A = 0;
-	// ---- //
-	int r93_word18DB2C = 0;
-	// ---- //
-	int r97_word18DB2E = 0;
-	bool r97_bool18DB30 = false;
-	bool r97_bool18DB32 = false;
-	int r97_word18DB34 = 0;
-	int r97_word18DB36 = 0;
-	int r97_word18DB38 = 0;
-	bool r97_bool18DB3A = false;
 };
 
 struct AutoMov {


Commit: ee185555483802ef985464df33df481338770637
    https://github.com/scummvm/scummvm/commit/ee185555483802ef985464df33df481338770637
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 33 logic fixes

Changed paths:
    engines/chewy/rooms/room34.cpp


diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 94edbbc94c8..95d66a90a0e 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -41,15 +41,21 @@ bool Room34::use_kuehlschrank() {
 		result = true;
 
 		if (!flags.LoadGame) {
+			hide_cur();
 			auto_move(3, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			_G(maus_links_click) = false;
+			start_spz_wait((_G(spieler).ChewyAni == 5) ? CH_ROCK_GET2 : CH_LGET_O,
+				1, ANI_VOR, P_CHEWY);
+			hide_cur();
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flags.ChewyDontGo = true;
+
 		if (!flags.LoadGame) {
 			switch_room(34);
 		}
+
 		set_person_pos(160, 70, P_CHEWY, -1);
 	}
 


Commit: ff6029e3fc33c75fcf4c70da9169efc5139852a3
    https://github.com/scummvm/scummvm/commit/ff6029e3fc33c75fcf4c70da9169efc5139852a3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 35 logic fixes

Changed paths:
    engines/chewy/rooms/room35.cpp


diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 7cc34244e62..f8d8a95c685 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -43,6 +43,7 @@ void Room35::entry() {
 int16 Room35::schublade() {
 	int16 action_flag = false;
 	hide_cur();
+
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R35Schublade) {
 			action_flag = true;
@@ -65,6 +66,7 @@ int16 Room35::schublade() {
 			atds->set_ats_str(234, 2, ATS_DATEI);
 		}
 	}
+
 	show_cur();
 	return action_flag;
 }
@@ -72,60 +74,73 @@ int16 Room35::schublade() {
 int16 Room35::use_cat() {
 	int16 action_flag = false;
 	hide_cur();
-	if (is_cur_inventar(TRANSLATOR_INV)) {
-		action_flag = true;
-		auto_move(4, P_CHEWY);
-		_G(spieler).R35TransCat = true;
-		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-		flic_cut(FCUT_045, FLC_MODE);
-		start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
-		start_aad_wait(94, -1);
-	} else if (is_cur_inventar(PUTENKEULE_INV)) {
-		action_flag = true;
-		disable_timer();
-		auto_move(4, P_CHEWY);
-		_G(spieler).R35CatEat = true;
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
-		det->stop_detail(0);
-		det->del_static_ani(0);
-		start_detail_wait(1, 1, ANI_VOR);
-		det->start_detail(2, 1, ANI_VOR);
-		start_detail_wait(3, 1, ANI_VOR);
-		obj->show_sib(SIB_KNOCHEN_R35);
-		obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
-		det->show_static_spr(7);
-		atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
-		while (det->get_ani_status(2) && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+
+	if (_G(spieler).ChewyAni != 5) {
+		if (is_cur_inventar(TRANSLATOR_INV)) {
+			action_flag = true;
+			auto_move(4, P_CHEWY);
+			_G(spieler).R35TransCat = true;
+			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			flic_cut(FCUT_045, FLC_MODE);
+			start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			start_aad_wait(94, -1);
+		} else if (is_cur_inventar(PUTENKEULE_INV)) {
+			action_flag = true;
+			disable_timer();
+			auto_move(4, P_CHEWY);
+			_G(spieler).R35CatEat = true;
+			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			del_inventar(_G(spieler).AkInvent);
+			det->stop_detail(0);
+			det->del_static_ani(0);
+			start_detail_wait(1, 1, ANI_VOR);
+			det->start_detail(2, 1, ANI_VOR);
+			start_detail_wait(3, 1, ANI_VOR);
+			obj->show_sib(SIB_KNOCHEN_R35);
+			obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
+			det->show_static_spr(7);
+			atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
+
+			while (det->get_ani_status(2) && !SHOULD_QUIT) {
+				set_up_screen(DO_SETUP);
+			}
+
+			det->set_static_ani(0, -1);
+			enable_timer();
+			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(95, -1);
 		}
-		det->set_static_ani(0, -1);
-		enable_timer();
-		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-		start_aad_wait(95, -1);
 	}
+
 	show_cur();
 	return action_flag;
 }
 
 void Room35::talk_cat() {
 	int16 dia_nr;
+	hide_cur();
 	auto_move(4, P_CHEWY);
+
 	if (_G(spieler).R35TransCat) {
 		if (!_G(spieler).R35CatEat) {
 			dia_nr = 7;
 		} else {
 			dia_nr = 8;
 		}
+
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(36);
+		show_cur();
 		start_ads_wait(dia_nr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		switch_room(35);
+
 	} else {
 		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(96, -1);
 	}
+
+	show_cur();
 }
 
 } // namespace Rooms


Commit: 4e9c1e8964c0ea4ae7d572a6ea60d40774716832
    https://github.com/scummvm/scummvm/commit/4e9c1e8964c0ea4ae7d572a6ea60d40774716832
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 37 logic fixes

Changed paths:
    engines/chewy/rooms/room37.cpp


diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 8564227eef4..629cf090ffa 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -41,24 +41,32 @@ void Room37::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = setup_func;
+	obj->show_sib(74);
+	obj->show_sib(75);
+
 	if (!flags.LoadGame) {
 		_G(spieler).scrollx = 124;
 		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
 	}
+
 	if (!_G(spieler).R37Kloppe) {
 		_G(timer_nr)[1] = room->set_timer(7, 5);
 		det->set_static_ani(7, -1);
+
 		if (!_G(spieler).R37HundScham) {
 			_G(timer_nr)[0] = room->set_timer(3, 4);
 			det->set_static_ani(3, -1);
 		}
 	}
+
 	if (_G(spieler).R37Gebiss) {
 		det->hide_static_spr(9);
+
 		if (_G(spieler).R37Kloppe) {
 			det->hide_static_spr(8);
-		} else if (_G(spieler).R37HundScham)
+		} else if (_G(spieler).R37HundScham) {
 			det->show_static_spr(0);
+		}
 	}
 }
 
@@ -78,8 +86,8 @@ void Room37::gedAction(int index) {
 
 void Room37::setup_func() {
 	if (_G(maus_links_click) &&
-		!_G(spieler).R37Kloppe &&
-		menu_item == CUR_WALK) {
+			!_G(spieler).R37Kloppe &&
+			menu_item == CUR_WALK) {
 		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
 			(minfo.x + _G(spieler).scrollx > 482)) {
 			auto_move(7, P_CHEWY);
@@ -90,8 +98,10 @@ void Room37::setup_func() {
 
 short Room37::use_wippe() {
 	int16 action_flag = false;
+
 	if (_G(spieler).inv_cur) {
 		action_flag = true;
+
 		if (is_cur_inventar(H_FUTTER_INV)) {
 			hide_cur();
 			auto_move(0, P_CHEWY);
@@ -109,17 +119,20 @@ short Room37::use_wippe() {
 			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
 			switch_room(29);
 			_G(maus_links_click) = false;
+
 		} else {
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(160, -1);
 		}
 	}
+
 	return action_flag;
 }
 
 int16 Room37::cut_serv1(int16 frame) {
 	int16 static_nr;
 	int16 static_nr1;
+
 	if (!_G(spieler).R37Kloppe) {
 		if (!_G(spieler).R37Gebiss) {
 			static_nr = 9;
@@ -129,6 +142,7 @@ int16 Room37::cut_serv1(int16 frame) {
 			static_nr = 8;
 			static_nr1 = 0;
 		}
+
 		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
 		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
 	}
@@ -139,17 +153,20 @@ int16 Room37::cut_serv1(int16 frame) {
 }
 
 int16 Room37::cut_serv2(int16 frame) {
-	int16 static_nr[] = { 7, 14, 12, 10 };
+	static const int16 STATIC_NR[] = { 7, 14, 12, 10 };
 	short i;
+
 	det->show_static_spr(12);
 	det->show_static_spr(10);
 	for (i = 0; i < 4; i++)
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr[i], static_nr[i]);
+		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, STATIC_NR[i], STATIC_NR[i]);
+
 	return 0;
 }
 
 int16 Room37::use_glas() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).R37Gebiss) {
 		if (is_cur_inventar(ANGEL2_INV)) {
 			action_flag = true;
@@ -176,20 +193,23 @@ int16 Room37::use_glas() {
 			start_aad_wait(146, -1);
 			show_cur();
 			flags.NoScroll = false;
+			det->play_sound(3, 0);
 		} else {
 			auto_move(4, P_CHEWY);
 		}
 	}
+
 	return action_flag;
 }
 
 void Room37::dog_bell() {
 	int16 dia_nr = -1;
 	int16 ani_nr = 0;
-
 	hide_cur();
+
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
+
 		if (!_G(spieler).R37Gebiss) {
 			stop_person(P_CHEWY);
 			flags.ChAutoMov = false;
@@ -212,9 +232,12 @@ void Room37::dog_bell() {
 			det->show_static_spr(9);
 			start_ani_block(3, ABLOCK31);
 			det->set_static_ani(3, -1);
+			det->enable_sound(3, 0);
+			det->play_sound(3, 0);
 			enable_timer();
 			dia_nr = 149;
 			ani_nr = CH_TALK12;
+
 		} else if (!_G(spieler).R37HundScham) {
 			stop_person(P_CHEWY);
 			set_person_spr(P_LEFT, P_CHEWY);
@@ -227,26 +250,35 @@ void Room37::dog_bell() {
 			flic_cut(FCUT_051, FLC_MODE);
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054, FLC_MODE);
-			flic_cut(FCUT_054, FLC_MODE);
 			det->show_static_spr(0);
+
 			_G(spieler).R37HundScham = true;
 			dia_nr = 148;
 			ani_nr = CH_TALK6;
 		}
+
 		flags.AutoAniPlay = false;
+
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(dia_nr, -1);
 		}
 	}
+
 	flags.NoScroll = false;
 	show_cur();
 }
 
 void Room37::talk_hahn() {
+	hide_cur();
 	auto_move(7, P_CHEWY);
+	show_cur();
+
 	if (!_G(spieler).R37TransHahn) {
+		_G(cur_hide_flag) = 0;
+		hide_cur();
 		start_aad_wait(145, -1);
+		show_cur();
 	} else {
 		hahn_dia();
 	}
@@ -264,6 +296,7 @@ void Room37::use_hahn() {
 		cursor_wahl(menu_item);
 		show_cur();
 		hahn_dia();
+
 	} else if (_G(spieler).R37TransHahn) {
 		if (is_cur_inventar(GEBISS_INV)) {
 			_G(spieler).R37Kloppe = true;
@@ -278,9 +311,12 @@ void Room37::use_hahn() {
 			del_inventar(GEBISS_INV);
 			flags.NoScroll = true;
 			auto_scroll(177, 0);
-			while (det->get_ani_status(9) && !SHOULD_QUIT) {
+
+			while (det->get_ani_status(9)) {
 				set_up_screen(DO_SETUP);
+				SHOULD_QUIT_RETURN;
 			}
+
 			det->start_detail(4, 1, ANI_VOR);
 			det->hide_static_spr(0);
 			det->start_detail(10, 10, ANI_VOR);
@@ -307,6 +343,7 @@ void Room37::use_hahn() {
 void Room37::hahn_dia() {
 	int16 tmp_scrollx;
 	int16 tmp_scrolly;
+
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	tmp_scrollx = _G(spieler).scrollx;
 	tmp_scrolly = _G(spieler).scrolly;


Commit: 241969d5f2ba285cac5fb9428baa09a644fef1a4
    https://github.com/scummvm/scummvm/commit/241969d5f2ba285cac5fb9428baa09a644fef1a4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 39 logic fixes

Changed paths:
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room39.h


diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index ffafb3365c0..944389cf743 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -50,6 +50,7 @@ static const AniBlock ABLOCK29[2] = {
 	{ 9, 4, ANI_VOR, ANI_WAIT, 0 },
 };
 
+bool Room39::_flag;
 
 void Room39::entry() {
 	if (!_G(spieler).R41Einbruch) {
@@ -59,10 +60,13 @@ void Room39::entry() {
 				det->start_detail(1, 255, ANI_VOR);
 			else
 				det->set_static_ani(5, -1);
+
 			atds->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
 		}
-	} else
+	} else {
 		atds->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
 	set_tv();
 }
 
@@ -84,6 +88,7 @@ short Room39::use_howard() {
 				det->stop_detail(6);
 				start_detail_wait(7, 1, ANI_VOR);
 				_G(spieler).PersonHide[P_CHEWY] = false;
+
 				del_inventar(_G(spieler).AkInvent);
 				det->stop_detail(1);
 				start_ani_block(2, ABLOCK33);
@@ -95,12 +100,15 @@ short Room39::use_howard() {
 				atds->set_ats_str(62, 1, ATS_DATEI);
 				start_aad_wait(169, -1);
 				show_cur();
+
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
 				_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
 				calc_person_dia(P_HOWARD);
+
 				if (_G(spieler).R41HowardDiaOK) {
 					ok();
 				}
+
 				dia_nr = -1;
 			} else {
 				ani_nr = CH_TALK11;
@@ -110,13 +118,16 @@ short Room39::use_howard() {
 			ani_nr = CH_TALK5;
 			dia_nr = 165;
 		}
+
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(dia_nr, -1);
 			action_flag = true;
 		}
+
 		show_cur();
 	}
+
 	return action_flag;
 }
 
@@ -124,8 +135,9 @@ void Room39::talk_howard() {
 	if (_G(spieler).R39HowardWach) {
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
-		_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
+		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 		calc_person_dia(P_HOWARD);
+
 		if (_G(spieler).R41HowardDiaOK) {
 			ok();
 		}
@@ -145,6 +157,7 @@ void Room39::ok() {
 	obj->calc_rsi_flip_flop(SIB_SURIMY_R27);
 	obj->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
 	invent_2_slot(BRIEF_INV);
+
 	switch_room(27);
 	start_aad_wait(192, -1);
 	menu_item = CUR_WALK;
@@ -160,23 +173,28 @@ int16 Room39::use_tv() {
 	auto_move(2, P_CHEWY);
 	cls_flag = false;
 	hide_cur();
+
 	if (is_cur_inventar(ZAPPER_INV)) {
 		_G(spieler).R39TvOn = true;
 		if (_G(spieler).R39TvKanal >= 5)
 			_G(spieler).R39TvKanal = -1;
+
 		flags.NoPalAfterFlc = true;
 		out->setze_zeiger(0);
 		out->cls();
 		flic_cut(FCUT_042, FLC_MODE);
 		++_G(spieler).R39TvKanal;
 		flags.NoPalAfterFlc = true;
+
 		if (_G(spieler).R39TvKanal == 2)
 			flic_cut(FCUT_036, FLC_MODE);
 		else if (_G(spieler).R39TvKanal == 5)
 			flic_cut(FCUT_033, FLC_MODE);
+
 		look_tv(0);
 		set_tv();
 		cls_flag = true;
+
 		if (!_G(spieler).R39TransMensch) {
 			ani_nr = CH_TALK11;
 			dia_nr = 78;
@@ -189,7 +207,7 @@ int16 Room39::use_tv() {
 				ani_nr = -1;
 			}
 		}
-	} else if (is_cur_inventar(TRANSLATOR_INV)) {
+	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != 5) {
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
@@ -202,6 +220,7 @@ int16 Room39::use_tv() {
 			out->set_palette(pal);
 			flags.NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], FLC_MODE);
+
 			out->cls();
 			out->setze_zeiger(0);
 			out->cls();
@@ -216,9 +235,11 @@ int16 Room39::use_tv() {
 			ani_nr = CH_TALK11;
 			dia_nr = 76;
 		}
+
 		set_tv();
+
 	} else if (is_cur_inventar(RECORDER_INV)) {
-		if (_G(spieler).R39TvOn) {
+		if (_G(spieler).R39TvOn && _G(spieler).ChewyAni != 5) {
 			if (!_G(spieler).R39TransMensch) {
 				ani_nr = CH_TALK12;
 				dia_nr = 97;
@@ -238,6 +259,7 @@ int16 Room39::use_tv() {
 			dia_nr = 76;
 		}
 	}
+
 	if (cls_flag) {
 		out->cls();
 		out->setze_zeiger(0);
@@ -245,12 +267,14 @@ int16 Room39::use_tv() {
 		out->set_palette(pal);
 		flags.NoPalAfterFlc = false;
 	}
+
 	if (dia_nr != -1) {
 		if (ani_nr != -1)
 			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
+
 	show_cur();
 	return action_flag;
 }
@@ -258,47 +282,71 @@ int16 Room39::use_tv() {
 void Room39::look_tv(int16 cls_mode) {
 	int16 flic_nr;
 	int16 dia_nr;
+
+	_flag = false;
+
 	if (_G(spieler).R39TvOn) {
-		if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
-			flic_nr = FCUT_038;
-			++_G(spieler).R39ClintNews;
-			dia_nr = 79;
-		} else {
-			flic_nr = TV_FLIC[_G(spieler).R39TvKanal];
-			if (!_G(spieler).R39TvKanal)
-				_G(spieler).R39ClintNews = 0;
-			dia_nr = 80 + _G(spieler).R39TvKanal;
-		}
-		if (cls_mode) {
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			flags.NoPalAfterFlc = true;
-		}
-		flic_cut(flic_nr, FLC_MODE);
-		if (cls_mode) {
-			out->cls();
-			out->setze_zeiger(0);
-			out->cls();
-			out->set_palette(pal);
-			flags.NoPalAfterFlc = false;
-			if (_G(spieler).R39TransMensch)
-				start_aad_wait(dia_nr, -1);
+		if (!flags.AutoAniPlay) {
+			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
+				flic_nr = FCUT_038;
+				++_G(spieler).R39ClintNews;
+				dia_nr = 79;
+			} else {
+				flic_nr = TV_FLIC[_G(spieler).R39TvKanal];
+				if (!_G(spieler).R39TvKanal)
+					_G(spieler).R39ClintNews = 0;
+				dia_nr = 80 + _G(spieler).R39TvKanal;
+			}
+
+			if (cls_mode) {
+				out->setze_zeiger(0);
+				out->cls();
+				out->set_palette(pal);
+				flags.NoPalAfterFlc = true;
+			}
+
+			if (_G(spieler).R39TransMensch) {
+				if (dia_nr != 85)
+					start_aad(dia_nr, -1);
+				else
+					_flag = true;
+			}
+
+			flc->set_custom_user_function(setup_func);
+			flic_cut(flic_nr, FLC_MODE);
+			flc->remove_custom_user_function();
+
+			if (cls_mode) {
+				out->cls();
+				out->setze_zeiger(0);
+				out->cls();
+				out->set_palette(pal);
+				flags.NoPalAfterFlc = false;
+
+				if (_G(spieler).R39TransMensch && dia_nr == 85)
+					start_aad_wait(dia_nr, -1);
+			}
 		}
+
+		_G(maus_links_click) = 0;
+		flags.AutoAniPlay = false;
 	}
 }
 
 void Room39::set_tv() {
 	int16 i;
+
 	for (i = 0; i < 6; i++)
 		det->hide_static_spr(i + 4);
+
 	if (_G(spieler).R39TvOn) {
-		if (_G(spieler).R39TvKanal == 2)
+		if (_G(spieler).R39TvKanal == 2) {
 			det->start_detail(0, 255, ANI_VOR);
-		else {
+		} else {
 			det->stop_detail(0);
 			det->show_static_spr(_G(spieler).R39TvKanal + 4);
 		}
+
 		if (_G(spieler).R39TransMensch) {
 			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
 		} else {
@@ -307,5 +355,41 @@ void Room39::set_tv() {
 	}
 }
 
+int16 Room39::setup_func(int16 frame) {
+	int16 action_ret = in->get_switch_code() == 1 ? -1 : 0;
+
+	if (_flag) {
+		if (frame == 121)
+			start_aad(599, -1);
+
+		switch (frame) {
+		case 247:
+			start_aad(600, -1);
+			break;
+		case 267:
+			start_aad(601, 0);
+			break;
+		case 297:
+			in->hot_key = 1;
+			break;
+		case 171:
+		case 266:
+		case 370:
+			atds->stop_aad();
+			break;
+		default:
+			break;
+		}
+	}
+
+	serve_speech();
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+
+	if (!_flag && atds->aad_get_status() == -1)
+		action_ret = -1;
+
+	return action_ret;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
index 92224ec0f1f..77f1aa57f58 100644
--- a/engines/chewy/rooms/room39.h
+++ b/engines/chewy/rooms/room39.h
@@ -27,6 +27,9 @@ namespace Rooms {
 
 class Room39 {
 private:
+	static bool _flag;
+
+	static int16 setup_func(int16 frame);
 	static void ok();
 	static void set_tv();
 


Commit: 3dcddd489757251f72d87fce9fb8715413d10613
    https://github.com/scummvm/scummvm/commit/3dcddd489757251f72d87fce9fb8715413d10613
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:37-08:00

Commit Message:
CHEWY: Room 40 logic fixes

Changed paths:
    engines/chewy/rooms/room40.cpp


diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 3700919a312..fbae1fe5e6f 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -38,28 +38,38 @@ namespace Rooms {
 #define POLICE_FLASCHE 16
 
 void Room40::entry(int16 eib_nr) {
+	_G(spieler).R40HoUse = false;
 	_G(zoom_horizont) = 130;
 	_G(spieler).ScrollxStep = 2;
+
 	if (_G(spieler).R40Geld) {
 		det->del_static_ani(6);
 		room->set_timer_status(6, TIMER_STOP);
 	}
+
 	if (_G(spieler).R40HaendlerOk) {
 		det->del_static_ani(4);
 		room->set_timer_status(4, TIMER_STOP);
 	}
+
 	if (_G(spieler).R40PoliceWeg == false) {
 		_G(timer_nr)[0] = room->set_timer(255, 10);
 		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		det->hide_static_spr(15);
 	}
+
 	_G(spieler).R40PoliceAniStatus = 255;
-	_G(spieler).R40PoliceStart = 0;
+	_G(spieler).R40PoliceStart = false;
 	spieler_mi[P_HOWARD].Mode = true;
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
+
 		if (!flags.LoadGame) {
 			switch (eib_nr) {
 			case 69:
@@ -76,6 +86,7 @@ void Room40::entry(int16 eib_nr) {
 			}
 		}
 	}
+
 	SetUpScreenFunc = setup_func;
 	if (_G(spieler).R40TrainMove)
 		move_train(0);
@@ -86,10 +97,12 @@ void Room40::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).R40PoliceAb = false;
 	stop_spz();
-	SetUpScreenFunc = 0;
+	SetUpScreenFunc = nullptr;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		if (eib_nr == 70 || eib_nr == 77) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+
 		} else if (eib_nr == 72) {
 			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
 				_G(spieler).R42BriefOk && _G(spieler).R28Manuskript) ||
@@ -98,23 +111,36 @@ void Room40::xit(int16 eib_nr) {
 				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
 				_G(spieler).room_e_obj[72].Exit = 45;
 				obj->hide_sib(SIB_MUENZE_R40);
+
 				uhr->disable_timer();
 				out->ausblenden(0);
 				hide_person();
-
 				set_up_screen(DO_SETUP);
 				out->einblenden(pal, 0);
 				uhr->enable_timer();
+
 				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
 				move_train(1);
 				flags.NoPalAfterFlc = true;
 				flic_cut(FCUT_073, FLC_MODE);
+
+				if (_G(spieler).ChewyAni != 5)
+					_G(spieler).PersonGlobalDia[1] = 10023;
+
+				cur_2_inventory();
+				remove_inventory(57);
+				_G(spieler).PersonDiaRoom[1] = 1;
 				show_person();
-			} else
+
+			} else {
 				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
+			}
+		} else {
+			_G(spieler).PersonRoomNr[1] = 41;
 		}
 	}
+
 	spieler_mi[P_HOWARD].Mode = false;
 	show_cur();
 }
@@ -131,40 +157,56 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 void Room40::move_train(int16 mode) {
 	int16 lx, ax;
 	int16 delay;
+
 	_G(spieler).R40TrainMove = false;
 	hide_cur();
 	auto_move(9, P_CHEWY);
 	flags.NoScroll = true;
 	auto_scroll(232, 0);
+
 	if (!mode)
 		start_aad_wait(206, -1);
+
 	lx = -40;
 	ax = lx - 190;
+
 	det->start_detail(7, 20, ANI_VOR);
 	det->show_static_spr(11);
+
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
 		det->show_static_spr(12);
+
+	det->enable_sound(7, 0);
 	delay = 0;
+
 	while (ax < 560) {
 		det->set_detail_pos(7, lx, 46);
 		det->set_static_pos(11, ax, 62, false, false);
+
 		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
 			det->set_static_pos(12, ax, 62, false, true);
+
 		if (!delay) {
 			lx += SPEED;
 			ax += SPEED;
 			delay = _G(spieler).DelaySpeed / 2;
-		} else
+		} else {
 			--delay;
+		}
+
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 	}
+
 	det->stop_detail(7);
 	det->hide_static_spr(11);
 	det->hide_static_spr(12);
+
 	if (!mode)
 		start_aad_wait(207, -1);
 	if (!mode)
 		auto_scroll(180, 0);
+
 	flags.NoScroll = false;
 	show_cur();
 }
@@ -178,6 +220,7 @@ void Room40::setup_func() {
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = spieler_vector[P_HOWARD].Xypos[1];
 		sp_x = spieler_vector[P_CHEWY].Xypos[0];
+
 		if (sp_x > 170 && sp_x < 255) {
 			x = 248;
 			y = 97;
@@ -191,6 +234,7 @@ void Room40::setup_func() {
 			x = 165;
 			y = 99;
 		}
+
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
 	}
 
@@ -199,10 +243,12 @@ void Room40::setup_func() {
 			_G(spieler).R40PoliceStart = false;
 			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
 			room->set_timer_status(255, TIMER_STOP);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
 			det->hide_static_spr(15);
 			det->start_detail(POLICE_LEFT, 1, ANI_VOR);
 			atds->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 		}
+
 		switch (_G(spieler).R40PoliceAniStatus) {
 		case POLICE_LEFT:
 			if (det->get_ani_status(POLICE_LEFT) == false) {
@@ -235,10 +281,12 @@ void Room40::setup_func() {
 					start_aad_wait(224, -1);
 					_G(spieler).R40PoliceWeg = true;
 					show_cur();
+
 					flags.MausLinks = false;
 					flags.MainInput = true;
 					_G(spieler).R40HoUse = false;
 					atds->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
+
 				} else {
 					det->start_detail(POLICE_RIGHT, 1, ANI_VOR);
 					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
@@ -256,94 +304,119 @@ void Room40::setup_func() {
 			}
 			break;
 
+		default:
+			break;
 		}
 	}
 }
 
 int16 Room40::use_mr_pumpkin() {
 	int16 action_ret = false;
-	hide_cur();
-	if (_G(spieler).inv_cur) {
-		switch (_G(spieler).AkInvent) {
-		case CENT_INV:
-			action_ret = true;
-			auto_move(5, P_CHEWY);
-			del_inventar(_G(spieler).AkInvent);
-			start_detail_wait(15, 1, ANI_VOR);
-			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(200, -1);
-			break;
 
-		case CASSETTE_INV:
-			if (_G(spieler).R39TvRecord == 6) {
+	if (menu_item != CUR_HOWARD) {
+		hide_cur();
+
+		if (!_G(spieler).inv_cur) {
+			action_ret = use_schalter(205);
+
+		} else {
+			switch (_G(spieler).AkInvent) {
+			case CENT_INV:
 				action_ret = true;
-				if (_G(spieler).R40PoliceWeg == false)
-					use_schalter(227);
-				else {
-					hide_cur();
-					auto_move(8, P_CHEWY);
-					start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-					del_inventar(_G(spieler).AkInvent);
-					out->ausblenden(1);
-					Room43::catch_pg();
-					del_invent_slot(LIKOER_INV);
-					obj->add_inventar(LIKOER2_INV, &room_blk);
-					inventory_2_cur(LIKOER2_INV);
-					switch_room(40);
-					start_aad_wait(236, -1);
+				auto_move(5, P_CHEWY);
+				del_inventar(_G(spieler).AkInvent);
+				start_detail_wait(15, 1, ANI_VOR);
+				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+				start_aad_wait(200, -1);
+				break;
+
+			case RECORDER_INV:
+				if (_G(spieler).R39TvRecord == 6) {
+					action_ret = true;
+					if (_G(spieler).R40PoliceWeg == false)
+						use_schalter(227);
+					else {
+						hide_cur();
+						auto_move(8, P_CHEWY);
+						start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+						del_inventar(_G(spieler).AkInvent);
+						out->ausblenden(1);
+						Room43::catch_pg();
+						remove_inventory(LIKOER_INV);
+						obj->add_inventar(LIKOER2_INV, &room_blk);
+						inventory_2_cur(LIKOER2_INV);
+						switch_room(40);
+						start_aad_wait(236, -1);
+					}
+				} else {
+					start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
 				}
-			} else
-				start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
-			break;
+				break;
 
+			default:
+				break;
+			}
 		}
+
+		show_cur();
 	}
-	show_cur();
 
 	return action_ret;
 }
 
 int16 Room40::use_schalter(int16 aad_nr) {
 	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R40PoliceWeg == false) {
-			action_flag = true;
-			hide_cur();
-			auto_move(8, P_CHEWY);
-			if (_G(spieler).R40PoliceAniStatus != 255) {
-				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
-				start_aad_wait(204, -1);
-				while (_G(spieler).R40PoliceAniStatus != 255 && !SHOULD_QUIT)
-					set_up_screen(DO_SETUP);
-			}
-			room->set_timer_status(255, TIMER_STOP);
-			_G(spieler).R40PoliceStart = false;
-			stop_spz();
-			start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
-			if (_G(spieler).R40PoliceAb) {
-				_G(spieler).R40PoliceAb = false;
+
+	if (menu_item != CUR_HOWARD) {
+		if (!_G(spieler).inv_cur) {
+			if (_G(spieler).R40PoliceWeg == false) {
+				action_flag = true;
+
+				hide_cur();
+				auto_move(8, P_CHEWY);
+
+				if (_G(spieler).R40PoliceAniStatus != 255) {
+					start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+					start_aad_wait(204, -1);
+
+					while (_G(spieler).R40PoliceAniStatus != 255) {
+						set_up_screen(DO_SETUP);
+						SHOULD_QUIT_RETURN0;
+					}
+				}
+
+				room->set_timer_status(255, TIMER_STOP);
+				_G(spieler).R40PoliceStart = false;
 				stop_spz();
-				go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
-				_G(spieler).R40HoUse = false;
+				start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+
+				if (_G(spieler).R40PoliceAb) {
+					_G(spieler).R40PoliceAb = false;
+					stop_spz();
+					go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
+					_G(spieler).R40HoUse = false;
+				}
+
+				det->hide_static_spr(15);
+				start_detail_wait(12, 1, ANI_VOR);
+				det->set_static_ani(14, -1);
+				start_aad_wait(aad_nr, -1);
+				det->del_static_ani(14);
+				start_detail_wait(13, 1, ANI_VOR);
+				det->show_static_spr(15);
+				room->set_timer_status(255, TIMER_START);
+				uhr->reset_timer(_G(timer_nr)[0], 0);
+				show_cur();
 			}
-			det->hide_static_spr(15);
-			start_detail_wait(12, 1, ANI_VOR);
-			det->set_static_ani(14, -1);
-			start_aad_wait(aad_nr, -1);
-			det->del_static_ani(14);
-			start_detail_wait(13, 1, ANI_VOR);
-			det->show_static_spr(15);
-			room->set_timer_status(255, TIMER_START);
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-			show_cur();
 		}
 	}
+
 	return action_flag;
 }
 
 void Room40::talk_police() {
 	if (_G(spieler).R40PoliceWeg == false &&
-		_G(spieler).R40PoliceAniStatus == 255) {
+			_G(spieler).R40PoliceAniStatus == 255) {
 		hide_cur();
 		_G(spieler).R40PoliceStart = false;
 		room->set_timer_status(255, TIMER_STOP);
@@ -372,6 +445,7 @@ void Room40::talk_handler() {
 
 int16 Room40::use_haendler() {
 	int16 action_flag = false;
+
 	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
 		hide_cur();
@@ -386,6 +460,7 @@ int16 Room40::use_haendler() {
 		start_aad_wait(208, -1);
 		auto_move(6, P_HOWARD);
 		flags.NoScroll = true;
+
 		auto_scroll(270, 0);
 		det->del_static_ani(4);
 		room->set_timer_status(4, TIMER_STOP);
@@ -394,6 +469,7 @@ int16 Room40::use_haendler() {
 		det->del_static_ani(3);
 		det->set_static_ani(5, -1);
 		start_aad_wait(213, -1);
+
 		if (_G(spieler).R28RKuerbis) {
 			det->del_static_ani(5);
 			det->set_static_ani(3, -1);
@@ -409,22 +485,26 @@ int16 Room40::use_haendler() {
 			out->cls();
 			switch_room(28);
 			SetUpScreenFunc = setup_func;
+
 		} else {
 			auto_move(11, P_HOWARD);
 			start_aad_wait(210, -1);
 		}
+
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
 		show_cur();
 		flags.NoScroll = false;
-		_G(spieler).R40HoUse = false;
 		flags.MausLinks = false;
+		_G(spieler).R40HoUse = false;
 	}
+
 	return action_flag;
 }
 
 int16 Room40::use_bmeister() {
 	short action_flag = false;
+
 	if (menu_item == CUR_HOWARD) {
 		action_flag = true;
 		hide_cur();
@@ -439,16 +519,18 @@ int16 Room40::use_bmeister() {
 		menu_item = CUR_WALK;
 		cursor_wahl(menu_item);
 		show_cur();
+
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
 		hide_cur();
 		_G(spieler).R40HoUse = true;
 		new_invent_2_cur(HOTEL_INV);
-
 		bmeister_dia(237);
-
+		_G(spieler).flags37_80 = true;
+		flags.NoScroll = false;
 		show_cur();
 	}
+
 	return action_flag;
 }
 
@@ -462,14 +544,17 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	det->stop_detail(0);
 	start_detail_wait(1, 1, ANI_VOR);
 	det->set_static_ani(2, -1);
+
 	if (aad_nr == 237) {
 		start_aad_wait(aad_nr, -1);
 		flags.NoPalAfterFlc = true;
 		flic_cut(FCUT_062, FLC_MODE);
 		fx_blend = BLEND3;
 		start_aad_wait(375, -1);
-	} else
+	} else {
 		start_aad_wait(aad_nr, -1);
+	}
+
 	flags.NoPalAfterFlc = false;
 	room->set_timer_status(0, TIMER_START);
 	det->set_static_ani(0, -1);
@@ -483,7 +568,7 @@ bool Room40::use_police() {
 
 	if (menu_item == CUR_HOWARD) {
 		if (_G(spieler).R40PoliceWeg == false &&
-			_G(spieler).R40PoliceAniStatus == 255) {
+				_G(spieler).R40PoliceAniStatus == 255) {
 			result = true;
 			_G(spieler).R40PoliceAb = true;
 			hide_cur();
@@ -515,16 +600,20 @@ int16 Room40::use_tele() {
 	int16 dia_nr1 = -1;
 	int16 timer_wert;
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R40PoliceWeg == false) {
 			action_flag = true;
 			hide_cur();
+
 			if (!_G(spieler).R40PoliceAb) {
 				start_aad_wait(219, -1);
 				_G(spieler).R40HoUse = false;
+
 			} else {
 				auto_move(13, P_CHEWY);
 				det->show_static_spr(0);
+
 				if (!_G(spieler).R40DuengerMit) {
 					dia_nr = 220;
 					dia_nr1 = 222;
@@ -532,6 +621,7 @@ int16 Room40::use_tele() {
 					dia_nr = 221;
 					dia_nr1 = 223;
 				}
+
 				start_aad_wait(dia_nr, -1);
 				auto_move(11, P_HOWARD);
 				det->hide_static_spr(0);
@@ -539,6 +629,7 @@ int16 Room40::use_tele() {
 				start_aad_wait(dia_nr1, -1);
 				_G(spieler).R40HoUse = false;
 				timer_wert = 0;
+
 				if (dia_nr1 == 223) {
 					if (is_cur_inventar(DUENGER_INV)) {
 						del_inventar(_G(spieler).AkInvent);
@@ -546,6 +637,7 @@ int16 Room40::use_tele() {
 						obj->del_inventar(DUENGER_INV, &room_blk);
 						del_invent_slot(DUENGER_INV);
 					}
+
 					invent_2_slot(LIKOER_INV);
 					auto_move(1, P_CHEWY);
 					_G(spieler).R40DuengerMit = false;
@@ -554,14 +646,17 @@ int16 Room40::use_tele() {
 					flags.MainInput = false;
 					timer_wert = 3;
 				}
+
 				_G(spieler).R40PoliceAb = false;
 				room->set_timer_status(255, TIMER_START);
 				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
 			}
+
 			if (dia_nr1 != 223)
 				show_cur();
 		}
 	}
+
 	return action_flag;
 }
 


Commit: 9f79211f4992750456e6c94bc1d96b3e33ac6efe
    https://github.com/scummvm/scummvm/commit/9f79211f4992750456e6c94bc1d96b3e33ac6efe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 41 logic fixes

Changed paths:
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room41.h


diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 5109e453003..09515110494 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -39,6 +39,8 @@ void Room41::entry() {
 	hide_cur();
 
 	if (!_G(spieler).R41LolaOk) {
+		det->play_sound(6, 0);
+
 		if (!flags.LoadGame) {
 			room->set_timer_status(0, TIMER_STOP);
 			det->del_static_ani(0);
@@ -46,36 +48,55 @@ void Room41::entry() {
 			room->set_timer_status(0, TIMER_START);
 			det->set_static_ani(0, -1);
 			start_aad_wait(127, -1);
-		} else
+		} else {
 			det->start_detail(6, 255, ANI_VOR);
+		}
 	}
+
 	if (_G(spieler).R41Einbruch) {
 		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(timer_nr)[0] = room->set_timer(7, 5);
-		det->set_static_ani(7, -1);
 		det->show_static_spr(6);
 		det->show_static_spr(7);
 	}
-	_G(spieler).PersonHide[P_HOWARD] = true;
+
+	if (_G(spieler).ChewyAni == 5) {
+		atds->set_steuer_bit(269, 1, 1);
+	}
+
+	if (!flags.LoadGame)
+		set_person_pos(241, 113, 1, 1);
+
+	SetUpScreenFunc = setup_func;
 	show_cur();
 }
 
 void Room41::xit() {
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
-	if (!_G(spieler).R41TrainCount) {
+	if (_G(spieler).R41TrainCount == 0) {
 		_G(spieler).R41TrainCount = 3;
 		_G(spieler).R40TrainMove = true;
 	}
-	--_G(spieler).R41TrainCount;
+
+	_G(spieler).R41TrainCount--;
+}
+
+void Room41::setup_func() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
+		calc_person_look();
+		if (spieler_vector->Xypos[P_HOWARD] == 160) {
+			go_auto_xy(258, 75, 1, 1);
+		} else {
+			go_auto_xy(246, 120, 1, 1);
+		}
+	}
 }
 
 void Room41::talk_hoggy1() {
 	stop_hoggy();
 	auto_move(1, P_CHEWY);
+
 	if (!_G(spieler).R41FirstTalk) {
 		first_talk();
+
 	} else if (!_G(spieler).R41Einbruch) {
 		show_cur();
 		start_ads_wait(11);
@@ -91,31 +112,38 @@ void Room41::talk_hoggy1() {
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
-		} else
+		} else {
 			start_aad_wait(130, -1);
-	} else
+		}
+	} else {
 		start_aad_wait(130, -1);
+	}
+
 	start_hoggy();
 }
 
 void Room41::talk_hoggy2() {
 	stop_hoggy();
 	auto_move(2, P_CHEWY);
+
 	if (!_G(spieler).R41FirstTalk) {
 		first_talk();
+
 	} else if (_G(spieler).R41BruchInfo) {
 		if (_G(spieler).R31SurFurz &&
 			!_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
-
 			new_invent_2_cur(TICKET_INV);
-		} else
+
+		} else {
 			start_aad_wait(129, -1);
+		}
 	} else {
 		start_aad_wait(129, -1);
 	}
+
 	start_hoggy();
 }
 
@@ -129,6 +157,7 @@ void Room41::first_talk() {
 void Room41::start_hoggy() {
 	int16 i;
 	show_cur();
+
 	for (i = 0; i < 2; i++) {
 		room->set_timer_status(i, TIMER_START);
 		det->set_static_ani(i, -1);
@@ -139,6 +168,7 @@ void Room41::start_hoggy() {
 void Room41::stop_hoggy() {
 	int16 i;
 	hide_cur();
+
 	for (i = 0; i < 2; i++) {
 		room->set_timer_status(i, TIMER_STOP);
 		det->del_static_ani(i);
@@ -149,6 +179,7 @@ void Room41::stop_hoggy() {
 
 int16 Room41::use_kasse() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		stop_hoggy();
@@ -156,37 +187,44 @@ int16 Room41::use_kasse() {
 		start_aad_wait(133, -1);
 		start_hoggy();
 	}
+
 	return action_flag;
 }
 
 int16 Room41::use_lola() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
 			hide_cur();
 			action_flag = true;
 			_G(spieler).R41LolaOk = true;
 			auto_move(4, P_CHEWY);
+			det->disable_sound(6, 0);
 			flic_cut(FCUT_057, FLC_MODE);
 			set_person_pos(127, 112, P_CHEWY, P_LEFT);
 			det->stop_detail(6);
 
+			atds->del_steuer_bit(267, 1, 1);
 			atds->set_ats_str(267, 1, ATS_DATEI);
 			atds->hide_item(11, 0, 3);
 			show_cur();
 		}
 	}
+
 	return action_flag;
 }
 
 int16 Room41::use_brief() {
 	int16 action_flag = false;
+
 	if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
 		stop_hoggy();
 		auto_move(6, P_CHEWY);
 		start_aad_wait(126, -1);
 		start_hoggy();
+
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		auto_move(6, P_CHEWY);
@@ -200,21 +238,24 @@ int16 Room41::use_brief() {
 		_G(spieler).R28PostCar = true;
 		_G(spieler).R42BriefOk = true;
 	}
+
+	show_cur();
 	return action_flag;
 }
 
 void Room41::sub_dia() {
 	aad_wait(-1);
 	start_aad_wait(161, -1);
+
 	if (_G(spieler).R41LolaOk) {
 		start_aad_wait(163, -1);
 		atds->hide_item(11, 0, 2);
 		stop_ads_dialog();
 		auto_move(5, P_CHEWY);
 		new_invent_2_cur(PAPIER_INV);
+
 	} else {
 		start_aad_wait(162, -1);
-
 	}
 }
 
diff --git a/engines/chewy/rooms/room41.h b/engines/chewy/rooms/room41.h
index e561db7e7b3..318c4c8cfc2 100644
--- a/engines/chewy/rooms/room41.h
+++ b/engines/chewy/rooms/room41.h
@@ -30,6 +30,7 @@ private:
 	static void first_talk();
 	static void start_hoggy();
 	static void stop_hoggy();
+	static void setup_func();
 
 public:
 	static void entry();


Commit: 71aff3ff5fcbc47e20bca6aac27b9aefba821133
    https://github.com/scummvm/scummvm/commit/71aff3ff5fcbc47e20bca6aac27b9aefba821133
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 42 logic fixes

Changed paths:
    engines/chewy/rooms/room42.cpp


diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index b343f4bf4d6..c5fb6ae2d55 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -30,25 +30,34 @@ namespace Chewy {
 namespace Rooms {
 
 void Room42::entry() {
+	if (!_G(spieler).R42BeamterWach) {
+		det->play_sound(0, 0);
+		det->start_detail(0, 255, 0);
+	}
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
 		SetUpScreenFunc = setup_func;
+
 		if (!flags.LoadGame) {
 			det->stop_detail(0);
 			_G(timer_nr)[0] = room->set_timer(8, 5);
 			det->set_static_ani(8, -1);
 			_G(spieler).R42BeamterWach = true;
+			det->disable_sound(0, 0);
+
 			SetUpScreenFunc = setup_func;
 
 			set_person_pos(80, 43, P_HOWARD, P_LEFT);
-
 			atds->set_ats_str(263, 1, ATS_DATEI);
 			atds->set_ats_str(264, 1, ATS_DATEI);
 		}
+
 		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-			!_G(spieler).R42BriefOk)
+				!_G(spieler).R42BriefOk)
 			start_aad_wait(302, -1);
+
 		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-			_G(spieler).R42BriefOk)
+				_G(spieler).R42BriefOk)
 			start_aad_wait(301, -1);
 	}
 }
@@ -65,12 +74,10 @@ void Room42::setup_func() {
 
 void Room42::calc_xit() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		if (flags.ExitMov) {
-			atds->set_ats_str(264, 1, ATS_DATEI);
-			stop_spz();
-			_G(spieler).R42HoToBeamter = false;
-
-		}
+		atds->set_ats_str(264, 1, ATS_DATEI);
+		stop_spz();
+		_G(spieler).R42HoToBeamter = false;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 	}
 }
 
@@ -82,6 +89,7 @@ void Room42::get_kuerbis(int16 aad_nr) {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(aad_nr, -1);
+
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(7, 1, ANI_VOR);
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -90,13 +98,14 @@ void Room42::get_kuerbis(int16 aad_nr) {
 
 int16 Room42::use_psack() {
 	int16 action_flag = false;
+
 	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
 		action_flag = true;
 		get_kuerbis(136);
-	} else if (_G(spieler).R42HoToBeamter &&
-		!_G(spieler).inv_cur &&
-		!_G(spieler).R42MarkeOk) {
 
+	} else if (_G(spieler).R42HoToBeamter &&
+			!_G(spieler).inv_cur &&
+			!_G(spieler).R42MarkeOk) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -112,6 +121,7 @@ int16 Room42::use_psack() {
 		auto_move(4, P_CHEWY);
 		start_aad_wait(185, -1);
 		_G(spieler).R42HoToBeamter = false;
+
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
@@ -126,15 +136,18 @@ int16 Room42::use_psack() {
 		_G(spieler).R40TrainMove = true;
 		_G(spieler).R28PostCar = true;
 		_G(spieler).R42BriefOk = true;
+
 	} else if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
 		start_aad_wait(182, -1);
 	}
+
 	return action_flag;
 }
 
 int16 Room42::use_beamter() {
 	int16 action_flag = false;
+
 	if (menu_item == CUR_HOWARD) {
 		action_flag = true;
 		atds->set_ats_str(264, 2, ATS_DATEI);
@@ -148,12 +161,14 @@ int16 Room42::use_beamter() {
 		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 		flags.MausLinks = false;
 	}
+
 	return action_flag;
 }
 
 void Room42::talk_beamter() {
 	int16 dia_nr;
 	auto_move(1, P_CHEWY);
+
 	if (!_G(spieler).R42BeamterWach) {
 		dia_nr = 10;
 	} else if (!_G(spieler).R42MarkeOk) {
@@ -161,22 +176,29 @@ void Room42::talk_beamter() {
 	} else {
 		dia_nr = 14;
 	}
+
 	start_ads_wait(dia_nr);
 }
 
 void Room42::dia_beamter(int16 str_end_nr) {
 	hide_cur();
+
 	if (str_end_nr != 4) {
-		while (atds->aad_get_status() != -1 && !SHOULD_QUIT)
+		while (atds->aad_get_status() != -1) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
+		}
+
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flags.NoDiaBox = true;
+
 		switch (str_end_nr) {
 		case 1:
 			start_detail_wait(3, 4, ANI_VOR);
 			break;
 
 		case 2:
+			det->play_sound(4, 0);
 			start_detail_wait(4, 4, ANI_VOR);
 			break;
 
@@ -184,20 +206,31 @@ void Room42::dia_beamter(int16 str_end_nr) {
 			start_detail_wait(5, 2, ANI_VOR);
 			break;
 
+		default:
+			break;
 		}
 	} else {
-		while (atds->aad_get_status() < 2 && !SHOULD_QUIT) {
+		while (atds->aad_get_status() < 2) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
 		}
+
 		det->stop_detail(0);
+		det->disable_sound(0, 0);
 		start_detail_wait(1, 1, ANI_VOR);
 		det->start_detail(2, 255, ANI_VOR);
-		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+
+		while (atds->aad_get_status() != -1) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
 		}
+
 		det->stop_detail(2);
 		det->start_detail(0, 255, ANI_VOR);
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
 	}
+
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	det->start_detail(6, 255, ANI_VOR);
 	start_aad_wait(135, -1);


Commit: cfe28c91bb5ba196a3edfb16885f59d05e7183a1
    https://github.com/scummvm/scummvm/commit/cfe28c91bb5ba196a3edfb16885f59d05e7183a1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 43 logic fixes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room43.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 467db07f782..df5b091e30a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1066,7 +1066,10 @@ void flic_cut(int16 nr, int16 mode) {
 			} else {
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_061);
+					start_aad(623, -1);
+					flc->set_custom_user_function(Room43::setup_func);
 					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+					flc->remove_custom_user_function();
 				}
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_062);
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index f452aaf2bec..c946bdf5bc8 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -31,11 +31,13 @@ namespace Rooms {
 
 void Room43::night_small() {
 	int16 i;
+
 	hide_person();
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stop_mod();
+	det->play_sound(0, 0);
 	hide_cur();
 	flags.NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
@@ -46,16 +48,18 @@ void Room43::night_small() {
 	start_aad_wait(190, -1);
 	_G(spieler).ScrollxStep = 16;
 	auto_scroll(192, 0);
+
 	for (i = 0; i < 3; i++) {
 		if (i)
 			_G(spieler).ScrollxStep = 16 / i;
 		auto_scroll(128 + i * 16, 0);
 		auto_scroll(192, 0);
 	}
+
 	_G(spieler).scrollx = 194;
 	start_aad_wait(191, -1);
-	load_room_music(255);
 	flic_cut(FCUT_058, FLC_MODE);
+	det->disable_sound(0, 0);
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
@@ -70,15 +74,17 @@ void Room43::catch_pg() {
 	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stop_mod();
+	det->play_sound(0, 0);
 	hide_cur();
 	flags.NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(234, -1);
 	auto_scroll(194, 0);
 	start_aad_wait(235, -1);
-	load_room_music(255);
 	_G(spieler).R43GetPgLady = true;
 	flic_cut(FCUT_058, FLC_MODE);
+
+	det->disable_sound(0, 0);
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
@@ -87,5 +93,12 @@ void Room43::catch_pg() {
 	show_person();
 }
 
+int16 Room43::setup_func(int16 frame) {
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	serve_speech();
+
+	return 0;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room43.h b/engines/chewy/rooms/room43.h
index a481f4459cc..14805bc0c4c 100644
--- a/engines/chewy/rooms/room43.h
+++ b/engines/chewy/rooms/room43.h
@@ -29,6 +29,7 @@ class Room43 {
 public:
 	static void night_small();
 	static void catch_pg();
+	static int16 setup_func(int16 frame);
 };
 
 } // namespace Rooms


Commit: b63c280eb1ff54442d96a9abfe7f55f4b86cc65c
    https://github.com/scummvm/scummvm/commit/b63c280eb1ff54442d96a9abfe7f55f4b86cc65c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 44 logic fixes

Changed paths:
    engines/chewy/rooms/room44.cpp


diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index ebc4d91e75b..a80e3815458 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -32,6 +32,7 @@ namespace Rooms {
 void Room44::look_news() {
 	int16 tmpsx, tmpsy;
 	int16 tmproom;
+
 	tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
 	tmpsx = _G(spieler).scrollx;
 	tmpsy = _G(spieler).scrolly;
@@ -42,11 +43,11 @@ void Room44::look_news() {
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
-		start_aad_wait(172, -1);
+
+	start_aad_wait(172, -1);
 	_G(spieler).scrollx = tmpsx;
 	_G(spieler).scrolly = tmpsy;
 	switch_room(tmproom);
-
 	show_person();
 }
 


Commit: 2159c58da91fd539c31376d6c92cabd18e920d0a
    https://github.com/scummvm/scummvm/commit/2159c58da91fd539c31376d6c92cabd18e920d0a
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Implement Room 89, fix a couple of small things in room 90 & 94

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/main_menu.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room89.h
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index c80f504793e..24fcc733540 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -636,4 +636,7 @@ void option_menue(taf_info *ti) {
 	out->setze_zeiger(workptr);
 }
 
+void gbook() {
+	warning("STUB - gbook()");
+}
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 4fb3f7eb539..b72bbefbe1f 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -383,6 +383,7 @@ void init_room();
 int16 call_fileio(int16 palette, int16 mode);
 int16 file_menue();
 void option_menue(taf_info *ti);
+void gbook();
 
 void look_debug_action(int16 key_nr);
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index b1c45aa0329..9da921c0dd2 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -120,6 +120,7 @@ void MainMenu::execute() {
 			flic_cut(159, CFO_MODE);
 			flc->remove_custom_user_function();
 			fx->border(workpage, 100, 0, 0);
+			gbook();
 			break;
 
 		default:
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 55bde1abfd5..b49e0151bd1 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -22,36 +22,212 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room89.h"
+#include "chewy/rooms/room66.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room89::entry() {
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	SetUpScreenFunc = setup_func;
+	_G(timer_nr)[0] = room->set_timer(2, 10);
+	if (_G(spieler).flags33_4) {
+		det->show_static_spr(5);
+		if (!_G(spieler).flags32_80)
+			det->show_static_spr(6);
+	}
+
+	if (flags.LoadGame) {
+		_G(spieler).SVal2 = 0;
+		return;
+	}
+
+	if (_G(spieler).scrollx != 5000) {
+		_G(spieler).scrollx = 0;
+		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
+		set_person_pos(93, 98, P_CHEWY, P_RIGHT);
+	}
+
+	if (_G(spieler).flags35_2) {
+		hide_cur();
+		_G(spieler).flags35_2 = false;
+		_G(spieler).SVal1 = 89;
+		_G(spieler).SVal2 = 537;
+		switch_room(92);
+		start_aad_wait(490, -1);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(103, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(118, CFO_MODE);
+		_G(spieler).SVal1 = 89;
+		_G(spieler).SVal2 = 538;
+		switch_room(92);
+		show_cur();
+	} else if (_G(spieler).flags35_4) {
+		hide_cur();
+		set_person_pos(138, 82, P_CHEWY, P_RIGHT);
+		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
+		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
+		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(117, CFO_MODE);
+		test_intro(35);
+		ERROR
+
+		fx_blend = BLEND3;
+		Room66::proc8(-1, 2, 3, 563);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(119, CFO_MODE);
+
+		int edi = -20;
+		int var24 = 0;
+		out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		for (int esi = 0; esi < 100; ++esi) {
+			edi -= 3;
+			var24 -= 2;
+			out->setze_zeiger(workptr);
+			out->cls();
+			out->scale_set(Ci.TempArea, abs(edi) / 2, abs(var24) / 2, edi, var24, scr_width);
+			out->setze_zeiger(nullptr);
+			out->back2screen(workpage);
+			g_events->delay(30);
+		}
+
+		out->setze_zeiger(workptr);
+		out->cls();
+		out->printxy(70, 80, 15, 0, 0, "Thank you for playing");
+		out->printxy(70, 100, 15, 0, 0, "  CHEWY ESC from F5");
+		out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		edi = -300;
+		int var30 = -200;
+
+		for (int esi = 0; esi < 100; ++esi) {
+			edi += 3;
+			var30 += 2;
+			out->setze_zeiger(workptr);
+			out->cls();
+			out->scale_set(Ci.TempArea, abs(edi) / 2, abs(var30) / 2, edi, var30, scr_width);
+			out->setze_zeiger(nullptr);
+			out->back2screen(workpage);
+			g_events->delay(30);
+		}
+
+		g_events->delay(3000);
+		out->ausblenden(2);
+		out->setze_zeiger(workptr);
+		out->cls();
+		out->setze_zeiger(nullptr);
+		out->cls();
+
+		gbook();
+		
+		_G(spieler).SVal4 = 1;
+		out->ausblenden(2);
+		out->setze_zeiger(nullptr);
+		out->cls();
+	}
+
+	_G(spieler).SVal2 = 0;
 }
 
 void Room89::xit() {
+	_G(spieler).ScrollxStep = 1;
+}
+
+void Room89::setup_func() {
+	calc_person_look();
+	int destX;
+	
+	if (spieler_vector[P_CHEWY].Xypos[0] >= 230)
+		destX = 318;
+	else
+		destX = 116;
+
+	go_auto_xy(destX, 114, P_HOWARD, ANI_GO);
 }
 
 void Room89::talk1() {
+	Room66::proc8(1, 2, 3, 485);
 }
 
 int Room89::proc2() {
-	return 0;
-}
+	if (_G(spieler).inv_cur || _G(spieler.flags33_2))
+		return 0;
+
+	hide_cur();
+	_G(spieler).flags33_2 = true;
+	_G(spieler).SVal1 = 89;
+	_G(spieler).SVal2 = 489;
+	switch_room(92);
+	start_aad_wait(490, -1);
+	out->setze_zeiger(nullptr);
+	out->cls();
+	flags.NoPalAfterFlc = true;
+	flic_cut(102, CFO_MODE);
+	test_intro(26);
+	ERROR
 
-int Room89::proc3() {
-	return 0;
+	_G(spieler).SVal1 = 89;
+	_G(spieler).SVal2 = 487;
+	switch_room(92);
+	show_cur();
+
+	return 1;
 }
 
 int Room89::proc4() {
-	return 0;
+	if (_G(spieler).inv_cur || _G(spieler).flags32_80)
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+
+	if (_G(spieler).flags33_4) {
+		atds->set_ats_str(514, 2, ATS_DATEI);
+		_G(spieler).flags32_80 = true;
+		det->hide_static_spr(6);
+		new_invent_2_cur(111);
+		start_spz(5, 255, false, P_CHEWY);
+		start_aad_wait(491, -1);
+	} else {
+		det->show_static_spr(5);
+		det->show_static_spr(6);
+		_G(spieler).flags33_4 = true;
+		atds->set_ats_str(514, 1, P_HOWARD);
+	}
+
+	show_cur();
+	return 1;
 }
 
 int Room89::proc5() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	if (!_G(spieler).flags32_80 || !_G(spieler).flags33_1 || !_G(spieler).flags33_2)
+		Room66::proc8(-1, 2, 3, 493);
+	else {
+		hide_cur();
+		Room66::proc8(-1, 2, 3, 486);
+		_G(spieler).SVal1 = 89;
+		_G(spieler).SVal2 = 488;
+		switch_room(92);
+		show_cur();
+	}
+	
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room89.h b/engines/chewy/rooms/room89.h
index 8e500c9ce18..36d60369661 100644
--- a/engines/chewy/rooms/room89.h
+++ b/engines/chewy/rooms/room89.h
@@ -29,9 +29,9 @@ class Room89 {
 public:
 	static void entry();
 	static void xit();
+	static void setup_func();
 	static void talk1();
 	static int proc2();
-	static int proc3();
 	static int proc4();
 	static int proc5();
 };
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 1627da3329e..68560717e17 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -246,7 +246,7 @@ int Room90::proc3() {
 	_G(spieler).mi[1] = 2;
 	start_aad_wait(516, -1);
 	_G(spieler).flags34_40 = true;
-	_G(spieler).flags34_100 = true;
+	_G(spieler).flags35_1 = true;
 	auto_move(4, P_CHEWY);
 	auto_scroll(176, 0);
 	det->set_detail_pos(12, 495, 15);
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 6eac58a834c..51381b9b96c 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -24,8 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room94.h"
-
-#include "room66.h"
+#include "chewy/rooms/room66.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 3035fffe175..7adb3594663 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -336,7 +336,6 @@ struct SpielerFlags {
 	bool flags34_20 : 1;
 	bool flags34_40 : 1;
 	bool flags34_80 : 1;
-	bool flags34_100 : 1; // CHECKME : used in room 90 but illogical
 
 	bool flags35_1 : 1;
 	bool flags35_2 : 1;


Commit: 159b881abd7cfee863c980948a1404cb19d03db3
    https://github.com/scummvm/scummvm/commit/159b881abd7cfee863c980948a1404cb19d03db3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 45 logic fixes

Changed paths:
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room45.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 30c72ae98d9..0ede825b11c 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -123,7 +123,7 @@ int16 Room25::gleiter_loesch() {
 		if (is_cur_inventar(MILCH_LEER_INV)) {
 			action_flag = true;
 			auto_move(2, P_CHEWY);
-			start_spz_wait((_G(spieler).ChewyAni == 5) ? 28 : 14,
+			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14,
 				1, ANI_VOR, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index c1c17d262e0..0fa10db28b0 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -55,7 +55,7 @@ void Room29::entry() {
 	if (_G(spieler).R29AutoSitz) {
 		det->show_static_spr(9);
 
-		if (_G(spieler).ChewyAni == 5)
+		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
 			atds->set_steuer_bit(212, 1, 1);
 		else
 			det->show_static_spr(9);
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 95d66a90a0e..95ce8e8ce11 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -44,7 +44,7 @@ bool Room34::use_kuehlschrank() {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			_G(maus_links_click) = false;
-			start_spz_wait((_G(spieler).ChewyAni == 5) ? CH_ROCK_GET2 : CH_LGET_O,
+			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O,
 				1, ANI_VOR, P_CHEWY);
 			hide_cur();
 		}
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 09515110494..c49904e687b 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -59,7 +59,7 @@ void Room41::entry() {
 		det->show_static_spr(7);
 	}
 
-	if (_G(spieler).ChewyAni == 5) {
+	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 		atds->set_steuer_bit(269, 1, 1);
 	}
 
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index e0fb2dd9220..ece222cfb28 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -32,6 +32,7 @@ namespace Rooms {
 void Room45::entry(int16 eib_nr) {
 	int16 ch_x, ch_y;
 	int16 ho_x, ho_y;
+
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
 	_G(r45_delay) = 0;
@@ -40,6 +41,7 @@ void Room45::entry(int16 eib_nr) {
 	_G(zoom_mov_fak) = 4;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
@@ -69,16 +71,18 @@ void Room45::entry(int16 eib_nr) {
 				ho_y = 124;
 			}
 		}
+
 		set_person_pos(ch_x, ch_y, P_CHEWY, P_LEFT);
 		set_person_pos(ho_x, ho_y, P_HOWARD, P_LEFT);
 	}
-
 }
 
 void Room45::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		spieler_mi[P_HOWARD].Mode = false;
+
 		if (eib_nr == 87) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 		}
@@ -98,10 +102,12 @@ void Room45::setup_func() {
 	if (menu_display == 0) {
 		if (!_G(r45_delay)) {
 			_G(r45_delay) = _G(spieler).DelaySpeed / 2;
+
 			for (i = 0; i < MAX_PERSON; i++) {
 				if (_G(r45_pinfo)[i][0] == 1) {
 					y = Adi[3 + i].y;
 					x = Adi[3 + i].x;
+
 					if (i < 6) {
 						x -= _G(r45_pinfo)[i][1];
 						if (x < -30) {
@@ -118,6 +124,7 @@ void Room45::setup_func() {
 					det->set_detail_pos(3 + i, x, y);
 				} else {
 					++_G(r45_pinfo)[i][2];
+
 					if (_G(r45_pinfo)[i][2] >= _G(r45_pinfo)[i][3]) {
 						_G(r45_pinfo)[i][2] = 0;
 						_G(r45_pinfo)[i][0] = 1;
@@ -132,13 +139,16 @@ void Room45::setup_func() {
 					}
 				}
 			}
-		} else
+		} else {
 			--_G(r45_delay);
+		}
+
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
 			calc_person_look();
 			x = spieler_vector[P_HOWARD].Xypos[0];
 			y = 64;
 			ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 			if (ch_x < 95) {
 				x = 18;
 				y = 130;
@@ -149,10 +159,12 @@ void Room45::setup_func() {
 				x = 176;
 				y = 130;
 			}
+
 			if (HowardMov && flags.ExitMov) {
 				x = 56;
 				y = 122;
 			}
+
 			go_auto_xy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
@@ -162,6 +174,7 @@ int16 Room45::use_taxi() {
 	int16 action_ret = false;
 	hide_cur();
 	auto_move(1, P_CHEWY);
+
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).ChewyAni == CHEWY_PUMPKIN) {
 			action_ret = true;
@@ -204,19 +217,25 @@ void Room45::taxi_mov() {
 	HowardMov = 2;
 	room->set_timer_status(12, TIMER_STOP);
 	det->del_static_ani(12);
+	det->enable_sound(15, 1);
 	det->show_static_spr(11);
 	auto_move(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		go_auto_xy(93, 127, P_HOWARD, ANI_WAIT);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 	}
+
 	det->hide_static_spr(11);
+	det->enable_sound(15, 2);
+	det->play_sound(15, 2);
+	det->enable_sound(15, 0);
 	start_detail_wait(15, 1, ANI_VOR);
-
+	det->disable_sound(15, 0);
 	switch_room(48);
 }
 
@@ -224,6 +243,7 @@ int16 Room45::use_boy() {
 	int16 action_ret = false;
 	hide_cur();
 	auto_move(2, P_CHEWY);
+
 	if (!_G(spieler).R45MagOk) {
 		if (is_cur_inventar(DOLLAR175_INV)) {
 			action_ret = true;
@@ -237,8 +257,10 @@ int16 Room45::use_boy() {
 			det->set_static_ani(0, -1);
 			_G(spieler).R45MagOk = true;
 		}
-	} else
+	} else {
 		start_aad_wait(259, -1);
+	}
+
 	show_cur();
 	return action_ret;
 }
@@ -246,15 +268,17 @@ int16 Room45::use_boy() {
 void Room45::talk_boy() {
 	int16 aad_nr;
 	hide_cur();
+
 	if (!_G(spieler).R45MagOk) {
 		auto_move(2, P_CHEWY);
 		aad_nr = 257;
-	} else
+	} else {
 		aad_nr = 259;
+	}
+
 	start_aad_wait(aad_nr, -1);
 	show_cur();
 }
 
-
 } // namespace Rooms
 } // namespace Chewy


Commit: 4ae97c61874788516be5765e3398ec5aca5fcf50
    https://github.com/scummvm/scummvm/commit/4ae97c61874788516be5765e3398ec5aca5fcf50
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:38-08:00

Commit Message:
CHEWY: Room 46 logic fixes

Changed paths:
    engines/chewy/rooms/room46.cpp


diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 8bd0eaef693..eba0db25ade 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -33,16 +33,39 @@ void Room46::entry(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
 		SetUpScreenFunc = setup_func;
+
 		if (eib_nr == 79) {
 			set_person_pos(140, 90, P_HOWARD, P_LEFT);
 			auto_move(3, P_CHEWY);
 			set_person_spr(P_LEFT, P_CHEWY);
 		}
 	}
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = true;
 		SetUpScreenFunc = setup_func;
+
+		if (_G(spieler).flags33_8) {
+			_G(maus_links_click) = 0;
+			hide_cur();
+			set_person_pos(175, 73, 1, 0);
+			set_person_pos(147, 109, 0, 0);
+			_G(spieler).flags33_8 = false;
+			_G(spieler).SVal1 = 46;
+			wait_show_screen(10);
+
+			start_spz_wait(64, 1, 0, 0);
+			start_spz(65, 255, 0, 0);
+			start_aad_wait(494, -1);
+			_G(spieler).SVal2 = 504;
+			switch_room(92);
+			start_spz(65, 255, 0, 0);
+			start_aad_wait(495, -1);
+			_G(spieler).room_e_obj[78].Exit = 90;
+			show_cur();
+		}
 	}
+
 	if (_G(spieler).R47SchlossOk && !_G(spieler).R46GetLeder)
 		bodo();
 }
@@ -57,18 +80,23 @@ void Room46::setup_func() {
 	int16 x;
 	int16 y;
 	int16 ch_x;
+
 	calc_person_look();
 	x = spieler_vector[P_HOWARD].Xypos[0];
 	y = 64;
 	ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 	if (ch_x > 160) {
 		x = 260;
-	} else
+	} else {
 		x = 120;
+	}
+
 	if (HowardMov && flags.ExitMov) {
 		x = 160;
 		y = 200;
 	}
+
 	go_auto_xy(x, y, P_HOWARD, ANI_GO);
 }
 
@@ -84,25 +112,33 @@ void Room46::bodo() {
 	set_person_spr(P_RIGHT, P_CHEWY);
 	start_aad_wait(251, -1);
 	auto_move(2, P_CHEWY);
+
 	spieler_mi[P_CHEWY].Mode = false;
 	start_detail_wait(0, 1, ANI_VOR);
 	det->start_detail(5, 255, ANI_VOR);
 	start_aad_wait(241, -1);
 	det->stop_detail(5);
+	det->show_static_spr(5);
+	start_aad_wait(609, -1);
+	det->hide_static_spr(5);
 	start_detail_wait(2, 1, ANI_VOR);
 	start_detail_wait(3, 1, ANI_VOR);
 	det->start_detail(4, 255, ANI_VOR);
 	start_aad_wait(242, -1);
 	det->stop_detail(4);
-	start_detail_wait(6, 1, ANI_VOR);
+
+	det->show_static_spr(6);
+	start_aad_wait(610, -1);
+	det->hide_static_spr(6);
+	start_detail_wait(6, 1, 0);
 	det->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(1, 1, ANI_VOR);
-	flic_cut(FCUT_065, FLC_MODE);
-	flic_cut(FCUT_066, FLC_MODE);
-	out->setze_zeiger(0);
+	start_detail_wait(0, 1, 0);
+	flic_cut(FCUT_065, CFO_MODE);
+	out->setze_zeiger(nullptr);
 	out->cls();
 	_G(spieler).PersonHide[P_CHEWY] = false;
+
 	det->hide_static_spr(0);
 	det->hide_static_spr(3);
 	load_chewy_taf(CHEWY_ROCKER);
@@ -117,35 +153,48 @@ void Room46::bodo() {
 void Room46::kloppe() {
 	int16 i;
 	int16 delay;
+
 	for (i = 0; i < 4; i++) {
 		mem->file->select_pool_item(Ci.Handle, FCUT_065);
 
 		flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
-		out->setze_zeiger(0);
+		out->setze_zeiger(nullptr);
 		out->cls();
 		start_aad(244 + i, -1);
 		delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
+
 		while (in->get_switch_code() == 0 && delay) {
 			out->skip_frame(1);
 			--delay;
+			SHOULD_QUIT_RETURN;
 		}
 	}
+
+	mem->file->select_pool_item(Ci.Handle, 66);
+	flc->custom_play(&Ci);
 	ailsnd->fade_out(0);
 	out->cls();
-	while (ailsnd->music_playing());
+
+	while (ailsnd->music_playing() && !SHOULD_QUIT) {
+		EVENTS_UPDATE;
+	}
 }
 
 int16 Room46::use_schloss() {
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
+
 		if (!_G(spieler).R46GetLeder) {
 			auto_move(1, P_CHEWY);
 			switch_room(47);
-		} else
+		} else {
 			start_aad_wait(252, -1);
+		}
 	}
+
 	return action_ret;
 }
 


Commit: e001ed7e2211a1d5bdf9ecddbb1538285f5970de
    https://github.com/scummvm/scummvm/commit/e001ed7e2211a1d5bdf9ecddbb1538285f5970de
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Room 47 logic fixes

Changed paths:
    engines/chewy/rooms/room47.cpp


diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index f940669af1a..78c94bc4584 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -33,9 +33,11 @@ void Room47::entry() {
 	hide_person();
 	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
 	SetUpScreenFunc = set_detail;
+	flags.MainInput = false;
 }
 
 void Room47::xit() {
+	flags.MainInput = true;
 	show_person();
 	set_person_pos(114, 102, P_CHEWY, P_LEFT);
 	spieler_mi[P_HOWARD].Mode = true;
@@ -44,8 +46,10 @@ void Room47::xit() {
 int16 Room47::use_knopf(int16 txt_nr) {
 	int16 k_nr = 0;
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
+
 		switch (txt_nr) {
 		case 286:
 			k_nr = 0;
@@ -59,30 +63,40 @@ int16 Room47::use_knopf(int16 txt_nr) {
 			k_nr = 2;
 			break;
 
+		default:
+			break;
 		}
+
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
 		++_G(spieler).R47Schloss[k_nr];
+
 		if (_G(spieler).R47Schloss[k_nr] > 9)
 			_G(spieler).R47Schloss[k_nr] = 0;
 
 		if (_G(spieler).R47Schloss[0] == 7 &&
-			_G(spieler).R47Schloss[1] == 6 &&
-			_G(spieler).R47Schloss[2] == 2)
+				_G(spieler).R47Schloss[1] == 6 &&
+				_G(spieler).R47Schloss[2] == 2)
 			_G(spieler).R47SchlossOk = true;
 		else
 			_G(spieler).R47SchlossOk = false;
 	}
+
 	return action_ret;
 }
 
 void Room47::set_detail() {
 	int16 i;
+
 	for (i = 0; i < 10; i++)
 		det->hide_static_spr(i);
+
 	for (i = 0; i < 3; i++) {
 		det->show_static_spr(_G(spieler).R47Schloss[i]);
 		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
 		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
 	}
+
 	for (i = 0; i < 10; i++)
 		det->hide_static_spr(i);
 }


Commit: aed9bbf6bd534847b35f3362d4e820edbe22e6b5
    https://github.com/scummvm/scummvm/commit/aed9bbf6bd534847b35f3362d4e820edbe22e6b5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Room 48 logic fixes

Changed paths:
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room48.h


diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index f214234d2a4..7156d7af273 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -37,12 +37,11 @@ void Room48::entry() {
 	calc_pic();
 	SetUpScreenFunc = setup_func;
 	_G(timer_nr)[0] = room->set_timer(255, 20);
-
 }
 
 bool Room48::timer(int16 t_nr, int16 ani_nr) {
 	if (t_nr == _G(timer_nr)[0])
-		Room48::frage();
+		frage();
 	else
 		return true;
 
@@ -51,10 +50,12 @@ bool Room48::timer(int16 t_nr, int16 ani_nr) {
 
 void Room48::calc_pic() {
 	int16 i;
+
 	for (i = 0; i < 2; i++) {
 		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R48Auswahl[3 + i] = 0;
 	}
+
 	_G(spieler).R48Auswahl[0] = 1;
 	_G(spieler).R48Auswahl[1] = 1;
 	_G(spieler).R48Auswahl[2] = 1;
@@ -64,6 +65,7 @@ void Room48::calc_pic() {
 		atds->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
 		det->show_static_spr(4);
 	}
+
 	if (obj->check_inventar(KAPPE_INV)) {
 		_G(spieler).R48Auswahl[4] = 1;
 		atds->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
@@ -89,19 +91,24 @@ void Room48::setup_func() {
 	int16 idx;
 	int16 r_nr;
 	int16 i;
+
 	for (i = 0; i < 5; i++)
 		det->hide_static_spr(1 + i);
+
 	if (flags.ShowAtsInvTxt) {
 		if (menu_display == 0) {
 			if (menu_item != CUR_USE) {
 				menu_item = CUR_USE;
 			}
+
 			cur_2_inventory();
 			cursor_wahl(CUR_ZEIGE);
 			idx = det->maus_vector(minfo.x, minfo.y);
+
 			if (idx != -1) {
 				if (_G(spieler).R48Auswahl[idx]) {
 					det->show_static_spr(1 + idx);
+
 					if (_G(maus_links_click)) {
 						switch (idx) {
 						case 0:
@@ -127,10 +134,10 @@ void Room48::setup_func() {
 						default:
 							r_nr = -1;
 							break;
-
 						}
+
 						if (r_nr != -1) {
-							SetUpScreenFunc = 0;
+							SetUpScreenFunc = nullptr;
 							det->hide_static_spr(1 + idx);
 							hide_cur();
 							room->set_timer_status(255, TIMER_STOP);
@@ -138,18 +145,21 @@ void Room48::setup_func() {
 							det->stop_detail(0);
 							det->del_static_ani(0);
 							start_detail_wait(2, 1, ANI_VOR);
+							det->disable_sound(2);
 							menu_item = CUR_WALK;
 							cursor_wahl(menu_item);
 							show_cur();
 							_G(spieler).R48TaxiEntry = true;
 							_G(maus_links_click) = false;
 							set_up_screen(DO_SETUP);
+
 							for (i = 0; i < MAX_PERSON; i++) {
 								if (_G(spieler).R48TaxiPerson[i]) {
 									_G(spieler).PersonHide[i] = false;
 									_G(spieler).R48TaxiPerson[i] = false;
 								}
 							}
+
 							if (_G(spieler).PersonRoomNr[P_HOWARD] == 48) {
 								_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
 							}
diff --git a/engines/chewy/rooms/room48.h b/engines/chewy/rooms/room48.h
index 3988a51e552..46be3720e97 100644
--- a/engines/chewy/rooms/room48.h
+++ b/engines/chewy/rooms/room48.h
@@ -29,11 +29,11 @@ class Room48 {
 private:
 	static void calc_pic();
 	static void setup_func();
+	static void frage();
+
 public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
-
-	static void frage();
 };
 
 } // namespace Rooms


Commit: bacf5410a4914b9891138942993714384baa9cfc
    https://github.com/scummvm/scummvm/commit/bacf5410a4914b9891138942993714384baa9cfc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Room 49 logic fixes

Changed paths:
    engines/chewy/rooms/room49.cpp


diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 85919c23ae6..8e9168985ea 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -41,16 +41,20 @@ void Room49::entry(int16 eib_nr) {
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
-	if (!_G(spieler).R49BoyWeg)
+
+	if (!_G(spieler).R49BoyWeg) {
 		_G(timer_nr)[0] = room->set_timer(255, 2);
-	else {
+	} else {
 		det->del_static_ani(0);
 		det->hide_static_spr(5);
+		det->del_static_ani(0);
+		det->del_static_ani(1);
 	}
 
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	spieler_mi[P_HOWARD].Mode = true;
+
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
@@ -60,20 +64,21 @@ void Room49::entry(int16 eib_nr) {
 			_G(spieler).scrollx = 320;
 			_G(spieler).scrolly = 0;
 			det->start_detail(5, 1, ANI_VOR);
-		} else if (eib_nr == 83)
+		} else if (eib_nr == 83) {
 			set_person_pos(377, 78, P_HOWARD, P_LEFT);
+		}
 	}
-
 }
 
 void Room49::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		spieler_mi[P_HOWARD].Mode = false;
-		if (eib_nr == 80)
+		if (eib_nr == 80) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
-		else if (eib_nr == 81) {
-			SetUpScreenFunc = 0;
+		} else if (eib_nr == 81) {
+			SetUpScreenFunc = nullptr;
 			start_aad_wait(268, -1);
 		}
 	}
@@ -94,13 +99,14 @@ void Room49::gedAction(int index) {
 void Room49::calc_boy_ani() {
 	if (!_G(spieler).R49BoyAniCount) {
 		_G(spieler).R49BoyAniCount = 3;
-		_G(spieler).R49BoyAni = 1;
+		_G(spieler).R49BoyAni = true;
 		det->del_static_ani(0);
 	} else {
 		--_G(spieler).R49BoyAniCount;
-		_G(spieler).R49BoyAni = 0;
+		_G(spieler).R49BoyAni = false;
 		det->del_static_ani(1);
 	}
+
 	det->set_static_ani(_G(spieler).R49BoyAni, -1);
 	det->start_detail(_G(spieler).R49BoyAni, 1, ANI_VOR);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
@@ -115,19 +121,26 @@ void Room49::calc_boy() {
 		stop_person(P_HOWARD);
 		person_end_phase[P_CHEWY] = P_LEFT;
 		det->stop_detail(_G(spieler).R49BoyAni);
-
 		det->del_static_ani(_G(spieler).R49BoyAni);
 		det->set_static_ani(2, -1);
-		SetUpScreenFunc = 0;
+
+		SetUpScreenFunc = nullptr;
 		start_aad_wait(262, -1);
+
 		SetUpScreenFunc = setup_func;
-		SetUpScreenFunc = 0;
 		auto_move(3, P_CHEWY);
 		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
 		det->del_static_ani(2);
 		start_detail_wait(3, 1, ANI_VOR);
-		start_detail_wait(4, 1, ANI_RUECK);
+
+		det->show_static_spr(9);
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		start_detail_wait(8, 1, 0);
+		_G(spieler).PersonHide[P_HOWARD] = false;
+		det->hide_static_spr(9);
+		start_detail_wait(4, 1, ANI_GO);
+
 		SetUpScreenFunc = setup_func;
 		det->set_static_ani(_G(spieler).R49BoyAni, -1);
 		room->set_timer_status(255, TIMER_START);
@@ -147,36 +160,12 @@ int16 Room49::use_boy() {
 		_G(spieler).R49WegFrei = true;
 		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
 		show_cur();
+
 	} else if (is_cur_inventar(CIGAR_INV)) {
 		action_ret = true;
-		hide_cur();
-		del_inventar(_G(spieler).AkInvent);
-		talk_boy(263);
-		SetUpScreenFunc = 0;
-		auto_move(5, P_CHEWY);
-		tmp = room->room_info->ZoomFak;
-		room->set_zoom(0);
-		go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
-		flags.NoScroll = true;
-		auto_scroll(164, 0);
-		flic_cut(FCUT_067, FLC_MODE);
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->del_static_ani(_G(spieler).R49BoyAni);
-		det->stop_detail(_G(spieler).R49BoyAni);
-		flags.NoScroll = false;
-
-		set_person_spr(P_RIGHT, P_CHEWY);
-		start_aad_wait(264, -1);
-		room->set_zoom(tmp);
-		obj->add_inventar(GUM_INV, &room_blk);
-		inventory_2_cur(GUM_INV);
-		atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
-		SetUpScreenFunc = setup_func;
-		_G(spieler).R49BoyWeg = true;
-		show_cur();
+		use_boy_cigar();
 	}
+
 	return action_ret;
 }
 
@@ -232,7 +221,7 @@ void Room49::talk_boy(int16 aad_nr) {
 
 		det->set_static_ani(_G(spieler).R49BoyAni, -1);
 		det->set_static_ani(2, -1);
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(aad_nr, -1);
 		SetUpScreenFunc = setup_func;
@@ -244,8 +233,7 @@ void Room49::talk_boy(int16 aad_nr) {
 
 void Room49::look_hotel() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(261, -1);
 		SetUpScreenFunc = setup_func;
@@ -254,6 +242,7 @@ void Room49::look_hotel() {
 
 int16 Room49::use_taxi() {
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
@@ -262,6 +251,7 @@ int16 Room49::use_taxi() {
 		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 			go_auto_xy(507, 74, P_HOWARD, ANI_WAIT);
 			go_auto_xy(490, 58, P_HOWARD, ANI_WAIT);
@@ -269,10 +259,13 @@ int16 Room49::use_taxi() {
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
+
 		det->hide_static_spr(7);
 		start_detail_wait(5, 1, ANI_VOR);
+		det->disable_sound(5, 0);
 		switch_room(48);
 	}
+
 	return action_ret;
 }
 


Commit: 9d7df51250fbbc56da9f6b2567e43e4349e4b3f0
    https://github.com/scummvm/scummvm/commit/9d7df51250fbbc56da9f6b2567e43e4349e4b3f0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Room 50 logic fixes

Changed paths:
    engines/chewy/global.h
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room50.h


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index b72bbefbe1f..a1d6570e153 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -95,7 +95,6 @@ public:
 	bool _e_streifen = false;
 	int16 _r45_delay = 0;
 	int16 _r45_pinfo[R45_MAX_PERSON][4];
-	bool _r50Wasser = false;
 	int16 _r56koch_flug = 0;
 	int16 _r62Delay = 0;
 	int16 _r62TalkAni = 0;
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 7156d7af273..10539e01184 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -145,7 +145,7 @@ void Room48::setup_func() {
 							det->stop_detail(0);
 							det->del_static_ani(0);
 							start_detail_wait(2, 1, ANI_VOR);
-							det->disable_sound(2);
+							det->disable_sound(2, 0);
 							menu_item = CUR_WALK;
 							cursor_wahl(menu_item);
 							show_cur();
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 8e9168985ea..f92a781afc7 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -272,11 +272,13 @@ int16 Room49::use_taxi() {
 void Room49::setup_func() {
 	int16 x, y;
 	int16 ch_x;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = 64;
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 		if (ch_x < 130) {
 			x = 40;
 			y = 97;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 4f12849168c..64a9fbb4a5f 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -34,37 +34,64 @@ static const AniBlock ABLOCK36[2] = {
 	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
 };
 
+bool Room50::_wasser;
+
 
 void Room50::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).R50Zigarre) {
-		stop_cigar();
-	} else
-		det->start_detail(0, 255, ANI_VOR);
-	if (!_G(spieler).R50KeyOK) {
-		_G(timer_nr)[0] = room->set_timer(1, 8);
-		_G(r50Wasser) = false;
-	} else
-		det->show_static_spr(4);
-	SetUpScreenFunc = setup_func;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
-		spieler_mi[P_HOWARD].Mode = true;
-		if (!flags.LoadGame) {
-			if (eib_nr == 85)
-				set_person_pos(298, 56, P_HOWARD, P_RIGHT);
-			else
-				set_person_pos(1, 64, P_HOWARD, P_RIGHT);
+
+	if (_G(spieler).flags32_10) {
+		hide_cur();
+		stop_page();
+		_G(maus_links_click) = 0;
+		set_person_pos(0, 64, 0, 1);
+		set_person_pos(92, 123, 0, 0);
+		start_aad_wait(510, -1);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(108, 0);
+		show_cur();
+		switch_room(51);
+
+	} else {
+		if (_G(spieler).R50Zigarre) {
+			stop_cigar();
+		} else {
+			det->start_detail(0, 255, ANI_VOR);
+		}
+
+		if (!_G(spieler).R50KeyOK) {
+			_G(timer_nr)[0] = room->set_timer(1, 8);
+			_wasser = false;
+		} else {
+			det->show_static_spr(4);
+		}
+
+		SetUpScreenFunc = setup_func;
+
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+			spieler_mi[P_HOWARD].Mode = true;
+
+			if (!flags.LoadGame) {
+				if (eib_nr == 85)
+					set_person_pos(298, 56, P_HOWARD, P_RIGHT);
+				else
+					set_person_pos(1, 64, P_HOWARD, P_RIGHT);
+			}
 		}
 	}
 }
 
 void Room50::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		if (eib_nr == 83)
 			_G(spieler).PersonRoomNr[P_HOWARD] = 49;
 		else
 			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
+
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -90,10 +117,10 @@ void Room50::stop_cigar() {
 }
 
 void Room50::calc_wasser() {
-	if (!_G(r50Wasser)) {
+	if (!_wasser) {
 		stop_page();
 		det->start_detail(4, 1, ANI_VOR);
-		_G(r50Wasser) = true;
+		_wasser = true;
 	}
 }
 
@@ -112,48 +139,56 @@ void Room50::go_page() {
 void Room50::calc_treppe() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
+
 		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			stop_person(P_CHEWY);
 			room->set_timer_status(1, TIMER_STOP);
-			_G(r50Wasser) = false;
+			_wasser = false;
+			flags.NoScroll = true;
+			auto_scroll(40, 0);
 			stop_page();
 			det->set_static_ani(5, -1);
 			start_aad_wait(272, -1);
 			auto_move(3, P_CHEWY);
 			aad_page(273, 5);
 		}
+
 		flags.AutoAniPlay = false;
 	}
 }
 
 int16 Room50::use_gutschein() {
 	int16 action_ret = false;
+
 	if (is_cur_inventar(HOTEL_INV)) {
 		action_ret = true;
 		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			room->set_timer_status(1, TIMER_STOP);
-			_G(r50Wasser) = false;
+			_wasser = false;
 			stop_page();
 			del_inventar(_G(spieler).AkInvent);
 			start_ani_block(2, ABLOCK36);
 			aad_page(274, 8);
-		} else
+		} else {
 			start_aad_wait(276, -1);
+		}
 	}
+
 	return action_ret;
 }
 
 int16 Room50::use_gum() {
 	int16 action_ret = false;
+
 	if (is_cur_inventar(GUM_INV)) {
 		action_ret = true;
 		hide_cur();
 		_G(spieler).R50KeyOK = true;
 		room->set_timer_status(1, TIMER_STOP);
-		_G(r50Wasser) = false;
+		_wasser = false;
 		stop_page();
 		start_detail_wait(6, 1, ANI_VOR);
 		det->set_static_ani(5, -1);
@@ -162,6 +197,7 @@ int16 Room50::use_gum() {
 		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
 		SetUpScreenFunc = 0;
 		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
+
 		set_person_spr(P_LEFT, P_HOWARD);
 		del_inventar(_G(spieler).AkInvent);
 		hide_person();
@@ -181,6 +217,7 @@ int16 Room50::use_gum() {
 		spieler_mi[P_CHEWY].Mode = true;
 		det->del_static_ani(10);
 		go_page();
+
 		obj->add_inventar(KEY_INV, &room_blk);
 		inventory_2_cur(KEY_INV);
 		atds->set_ats_str(323, 1, ATS_DATEI);
@@ -188,6 +225,7 @@ int16 Room50::use_gum() {
 		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
 		show_cur();
 	}
+
 	return action_ret;
 }
 
@@ -201,23 +239,28 @@ void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 	det->del_static_ani(ani_nr);
 	start_detail_wait(6, 1, ANI_RUECK);
 	go_page();
+
 	if (!_G(spieler).R50KeyOK)
 		room->set_timer_status(1, TIMER_START);
+
 	show_cur();
 }
 
 void Room50::setup_func() {
 	int16 x, y;
 	int16 ch_x;
-	if (_G(r50Wasser) && !det->get_ani_status(4)) {
-		_G(r50Wasser) = false;
+
+	if (_wasser && !det->get_ani_status(4)) {
+		_wasser = false;
 		go_page();
 	}
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		calc_person_look();
 		x = spieler_vector[P_HOWARD].Xypos[0];
 		y = 64;
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 		if (ch_x < 72) {
 			x = 1;
 			y = 64;
@@ -228,12 +271,14 @@ void Room50::setup_func() {
 			x = 162;
 			y = 115;
 		}
+
 		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = 0;
+			SetUpScreenFunc = nullptr;
 			HowardMov = 0;
 			auto_move(4, P_HOWARD);
-		} else
+		} else {
 			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		}
 	}
 }
 
diff --git a/engines/chewy/rooms/room50.h b/engines/chewy/rooms/room50.h
index ba609d0ba39..588b391df72 100644
--- a/engines/chewy/rooms/room50.h
+++ b/engines/chewy/rooms/room50.h
@@ -27,6 +27,8 @@ namespace Rooms {
 
 class Room50 {
 private:
+	static bool _wasser;
+
 	static void stop_page();
 	static void go_page();
 	static void aad_page(int16 aad_nr, int16 ani_nr);


Commit: 430bd3a93df1c909d167d2c549c6b361feed9939
    https://github.com/scummvm/scummvm/commit/430bd3a93df1c909d167d2c549c6b361feed9939
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Implement Room 88

Changed paths:
    engines/chewy/rooms/room88.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 2994fbfe5f3..2428efd7b29 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room88.h"
 
@@ -30,21 +29,125 @@ namespace Chewy {
 namespace Rooms {
 
 void Room88::entry() {
+	_G(spieler).scrollx = 0;
+	set_person_pos(163, 122, P_CHEWY, P_LEFT);
+	set_person_pos(59, 107, P_HOWARD, P_RIGHT);
+	set_person_pos(91, 110, P_NICHELLE, P_RIGHT);
+	
+	det->show_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
+	if (_G(spieler).R88Val1 == 0)
+		_G(spieler).R88Val1 = 82;
+
+	SetUpScreenFunc = calc_person_look;
+
+	if (_G(spieler).flags32_10) {
+		det->start_detail(4, 255, false);
+		atds->del_steuer_bit(505, ATS_AKTIV_BIT, ATS_DATEI);
+	}
 }
 
 void Room88::xit() {
+	_G(spieler).flags31_8 = true;
+	_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).R88Val1;
+
+	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 88)
+		_G(spieler).PersonRoomNr[P_NICHELLE] = _G(spieler).PersonRoomNr[P_HOWARD];
 }
 
 int Room88::proc1() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(0, P_CHEWY);
+	switch_room(_G(spieler).R88Val1);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+	show_cur();
+	
+	return 1;
 }
 
 int Room88::proc2() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->show_static_spr(0);
+	start_detail_wait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_VOR);
+	det->hide_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
+	_G(spieler).flags31_10 = false;
+	det->show_static_spr(1 + (!_G(spieler).flags30_10 ? 1 : 0));
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->hide_static_spr(0);
+	
+	show_cur();
+	return 1;
 }
 
 int Room88::proc3() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+
+	if (!_G(spieler).flags30_80 || _G(spieler).flags31_1) {
+		hide_cur();
+		if (_G(spieler).flags32_10) {
+			start_aad_wait(480, -1);
+			out->setze_zeiger(nullptr);
+			out->cls();
+			flags.NoPalAfterFlc = true;
+			flic_cut(87, CFO_MODE);
+			out->setze_zeiger(nullptr);
+			out->cls();
+			_G(spieler).flags32_40 = true;
+			switch_room(84);
+		} else {
+			start_aad_wait(465, -1);
+		}
+	} else {
+		start_aad_wait(466, -1);
+		start_spz_wait(13, 1, false, P_CHEWY);
+
+		int edi = 1 + (_G(spieler).flags31_10 ? 1 : 0);
+
+		for (int i = 0; i < 3; ++i) {
+			start_detail_wait(edi, 1, ANI_VOR);
+			start_detail_wait(edi, 1, ANI_GO);
+		}
+
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(88, CFO_MODE);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).flags32_1 = true;
+		out->raster_col(0, 0, 0, 0);
+		switch_room(80);
+		hide_cur();
+		start_detail_wait(1, 1, ANI_VOR);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(86, CFO_MODE);
+		test_intro(24);
+		ERROR
+
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 88;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
+		switch_room(88);
+		_G(spieler).R88Val1 = 84;
+		_G(spieler).flags31_1 = true;
+		_G(spieler).flags32_1 = false;
+	}
+
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7adb3594663..9f93971b8e5 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -484,6 +484,9 @@ struct Spieler : public SpielerFlags {
 	int16 R64Moni1Ani = 0;
 
 	int16 R64Moni2Ani = 0;
+
+	// ---- //
+	int16 R88Val1 = 0;
 	// ---- //
 	int r90_word18DB28 = 0;
 	int r90_Array187030[8][4] = {


Commit: dccae5438dbcc0df1bd824c5dfd3093c282d6ffd
    https://github.com/scummvm/scummvm/commit/dccae5438dbcc0df1bd824c5dfd3093c282d6ffd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: pending change forgotten in Room 88

Changed paths:
    engines/chewy/rooms/room88.cpp


diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 2428efd7b29..e062bc87dd1 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -113,11 +113,11 @@ int Room88::proc3() {
 		start_aad_wait(466, -1);
 		start_spz_wait(13, 1, false, P_CHEWY);
 
-		int edi = 1 + (_G(spieler).flags31_10 ? 1 : 0);
+		const int aniNr = 1 + (_G(spieler).flags31_10 ? 1 : 0);
 
 		for (int i = 0; i < 3; ++i) {
-			start_detail_wait(edi, 1, ANI_VOR);
-			start_detail_wait(edi, 1, ANI_GO);
+			start_detail_wait(aniNr, 1, ANI_VOR);
+			start_detail_wait(aniNr, 1, ANI_GO);
 		}
 
 		out->setze_zeiger(nullptr);


Commit: 47a3fd8d3ed307a9a8416dacd105de7fbed1d1c8
    https://github.com/scummvm/scummvm/commit/47a3fd8d3ed307a9a8416dacd105de7fbed1d1c8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:39-08:00

Commit Message:
CHEWY: Implement Room 87

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room87.h
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 37bd3b72791..46fda7f059a 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -106,7 +106,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 		flags.LoadGame = true;
 
-		if (_G(spieler).inv_cur == true && _G(spieler).AkInvent != -1) {
+		if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1) {
 			menu_item = CUR_USE;
 		}
 
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 33d9af9183f..9f75a1c3a86 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room87.h"
 
@@ -30,17 +29,159 @@ namespace Chewy {
 namespace Rooms {
 
 void Room87::entry() {
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 18;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 28;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 18;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 28;
+	_G(zoom_horizont) = 176;
+	if (_G(spieler).flags32_4)
+		det->show_static_spr(3);
+
+	if (_G(spieler).flags32_8)
+		det->show_static_spr(4);
+
+	if (flags.LoadGame)
+		return;
+
+	set_person_pos(11, 70, P_HOWARD, P_RIGHT);
+	set_person_pos(-3, 81, P_NICHELLE, P_RIGHT);
+	auto_move(2, P_CHEWY);
+}
+
+void Room87::setup_func() {
+	calc_person_look();
+	int howDestX = 0;
+	int howDestY = 0;
+	int nicDestX = 0;
+	int nicDestY = 0;
+
+	
+	if (spieler_vector[P_CHEWY].Xypos[0] > 186) {
+		howDestX = 103;
+		howDestY = 128;
+		nicDestX = 134;
+		nicDestY = 123;
+	} else if (spieler_vector[P_CHEWY].Xypos[0] > 20) {
+		howDestX = 27;
+		howDestY = 98;
+		nicDestX = -2;
+		nicDestY = 110;
+	}
+
+	if (HowardMov == 1) {
+		howDestX = 11;
+		howDestY = 70;
+		nicDestX = -3;
+		nicDestY = 81;
+	}
+
+	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 void Room87::xit(int16 eib_nr) {
+	if (eib_nr != 129)
+		return;
+
+	spieler_mi[P_CHEWY].Mode = true;
+	_G(zoom_horizont) = 0;
+	room->set_zoom(25);
+	HowardMov = 1;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 2;
+	go_auto_xy(20, 56, P_CHEWY, ANI_VOR);
+	go_auto_xy(31, 56, P_CHEWY, ANI_VOR);
+	go_auto_xy(9, 53, P_CHEWY, ANI_VOR);
+	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 87)
+		_G(spieler).PersonRoomNr[P_HOWARD] = 86;
+
+	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 87)
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 86;
 }
 
-int Room87::proc2() {
+int Room87::proc2(int16 txt_nr) {
+	if (!is_cur_inventar(107) && !is_cur_inventar(108))
+		return 0;
+
+	hide_cur();
+
+	int diaNr = 0;
+	int movNr;
+	if (txt_nr == 501) {
+		movNr = 3;
+		if (_G(spieler).flags32_4)
+			diaNr = 473;
+		else
+			_G(spieler).flags32_4 = true;
+	} else {
+		movNr = 4;
+		if (_G(spieler).flags32_8)
+			diaNr = 473;
+		else
+			_G(spieler).flags32_8 = true;
+	}
+
+	if (diaNr) {
+		start_spz(0, 255, false, P_CHEWY);
+		start_aad_wait(diaNr, -1);
+	} else {
+		auto_move(movNr, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		start_spz_wait(14, 1, false, P_CHEWY);
+		atds->set_ats_str(txt_nr, 1, ATS_DATEI);
+		det->show_static_spr(movNr);
+		if (_G(spieler).flags32_4 && _G(spieler).flags32_8)
+			atds->del_steuer_bit(502, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+	show_cur();
+	return 1;
+}
+
+int16 Room87::proc3(int16 key) {
+	return key < 12 ? 0 : -1;
+}
+
+int16 Room87::proc5(int16 key) {
+	serve_speech();
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	return 0;
 }
 
 int Room87::proc4() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	flic_cut(93, CFO_MODE);
+	flc->set_custom_user_function(proc3);
+	flic_cut(94, CFO_MODE);
+	flc->remove_custom_user_function();
+	flc->set_custom_user_function(proc5);
+	start_aad(472);
+	flic_cut(95, CFO_MODE);
+	flc->remove_custom_user_function();
+	flic_cut(96, CFO_MODE);
+	det->hide_static_spr(2);
+	det->start_detail(2, 255, false);
+	start_aad_wait(471, -1);
+	flic_cut(97, CFO_MODE);
+	flic_cut(98, CFO_MODE);
+	flic_cut(99, CFO_MODE);
+	flic_cut(100, CFO_MODE);
+	_G(spieler).PersonGlobalDia[P_HOWARD] = -1;
+	_G(spieler).PersonDiaRoom[P_HOWARD] = 0;
+	_G(spieler).flags32_10 = true;
+
+	switch_room(86);
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room87.h b/engines/chewy/rooms/room87.h
index deb52ea8aa7..6455a84464f 100644
--- a/engines/chewy/rooms/room87.h
+++ b/engines/chewy/rooms/room87.h
@@ -31,7 +31,10 @@ class Room87 {
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
-	static int proc2();
+	static void setup_func();
+	static int proc2(int16 txt_nr);
+	static int16 proc3(int16 key);
+	static int16 proc5(int16 key);
 	static int proc4();
 };
 
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 8d815a54097..8874afc5fec 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -659,7 +659,7 @@ void Room97::proc15() {
 	while (det->get_ani_detail(16) != nullptr) {
 		get_user_key(NO_SETUP);
 		if (minfo.button == 1 || in->get_switch_code() == 28) {
-			if (_G(spieler).inv_cur != CUR_WALK)
+			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
 		set_up_screen(DO_SETUP);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 4e0e440bbd4..16eb5311d78 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -692,7 +692,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 501:
 					case 503:
-						action_ret = Room87::proc2();
+						action_ret = Room87::proc2(txt_nr);
 						break;
 
 					case 502:


Commit: f0ebc30ccb5e9908d770cb47321c89f1d52b73c6
    https://github.com/scummvm/scummvm/commit/f0ebc30ccb5e9908d770cb47321c89f1d52b73c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Room 51 logic fixes

Changed paths:
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room51.h
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room65.h


diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index a923ce5a321..bcd0dcc6e37 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room51.h"
+#include "chewy/rooms/room65.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -37,38 +38,86 @@ static const AniBlock ABLOCK37[5] = {
 	{ 2, 1, ANI_RUECK, ANI_WAIT, 0 },
 };
 
+bool Room51::_flag;
+bool Room51::_arr[2];
+int16 Room51::_tmpx;
+int16 Room51::_tmpy;
+int Room51::_index;
+
 
 void Room51::entry() {
 	int16 i;
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
-	for (i = 0; i < 2; i++)
-		det->start_detail(3 + i, 1, ANI_VOR);
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
-		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
-		_G(spieler).ZoomXy[P_HOWARD][1] = 30;
-		if (!flags.LoadGame) {
-			set_person_pos(88, 93, P_HOWARD, P_RIGHT);
+
+	if (_G(spieler).flags32_10) {
+		atds->set_unknown(0);
+		_G(spieler).PersonHide[P_CHEWY] = 1;
+		_G(spieler).PersonHide[P_HOWARD] = 1;
+		_G(maus_links_click) = 0;
+		_G(spieler).scrollx = 0;
+		set_person_pos(34, 120, 1, 1);
+		set_person_pos(234, 69, 0, 0);
+		SetUpScreenFunc = setup_func;
+		det->show_static_spr(17);
+		hide_cur();
+
+		for (i = 0; i < 2; ++i) {
+			_arr[0] = false;
+			_G(timer_nr)[i] = room->set_timer(i + 9, i * 2 + 6);
 		}
-		if (!_G(spieler).R51FirstEntry) {
-			hide_cur();
-			_G(spieler).R51FirstEntry = true;
-			set_person_spr(P_LEFT, P_CHEWY);
-			start_aad_wait(283, -1);
-			show_cur();
+
+		flags.MainInput = false;
+		_flag = false;
+
+	} else {
+		det->hide_static_spr(17);
+
+		for (i = 0; i < 2; i++)
+			det->start_detail(3 + i, 1, ANI_VOR);
+
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
+			_G(spieler).ZoomXy[P_HOWARD][1] = 30;
+
+			if (!flags.LoadGame) {
+				set_person_pos(88, 93, P_HOWARD, P_RIGHT);
+			}
+
+			if (!_G(spieler).R51FirstEntry) {
+				hide_cur();
+				_G(spieler).R51FirstEntry = true;
+				set_person_spr(P_LEFT, P_CHEWY);
+				start_aad_wait(283, -1);
+				show_cur();
+			}
+
+			SetUpScreenFunc = setup_func;
+			spieler_mi[P_HOWARD].Mode = true;
 		}
-		SetUpScreenFunc = setup_func;
-		spieler_mi[P_HOWARD].Mode = true;
 	}
 }
 
 void Room51::xit(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+	atds->set_unknown(1);
+
+	if (_G(spieler).flags32_10) {
+		flags.MainInput = true;
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler).PersonHide[P_HOWARD] = false;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
+		menu_item = CUR_WALK;
+		cursor_wahl(menu_item);
+		show_cur();
+
+	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		if (eib_nr == 85) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
-		} else
+		} else {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
+		}
+
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
@@ -85,11 +134,58 @@ bool Room51::timer(int16 t_nr, int16 ani_nr) {
 void Room51::setup_func() {
 	int16 x, y;
 	int16 ch_y;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+
+	if (_G(spieler).flags32_10) {
+		_tmpx = minfo.x;
+		_tmpy = minfo.y;
+		if (_tmpx > 215)
+			_tmpx = 215;
+		if (_tmpy < 81)
+			_tmpy = 81;
+
+		det->set_static_pos(17, _tmpx, _tmpy, false, false);
+
+		if ((minfo.button == 1 || in->get_switch_code() == 28) && !_flag) {
+			_flag = true;
+			det->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
+			start_detail_wait(8, 1, 0);
+			_flag = false;
+			++_index;
+
+			switch (_index) {
+			case 2:
+				start_aad_wait(512, -1);
+				_index = 1000;
+				break;
+
+			case 1006:
+				start_aad_wait(513, -1);
+				_index = 2000;
+				break;
+
+			case 2003:
+				start_aad_wait(615, -1);
+				_index = 10000;
+				break;
+
+			case 10012:
+				start_aad_wait(514, -1);
+				wait_show_screen(5);
+				out->setze_zeiger(nullptr);
+				out->cls();
+				flic_cut(115, 0);
+				switch_room(91);
+				break;
+
+			default:
+				break;
+			}
+		}
+
+	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
 		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+
 		if (ch_y < 129) {
 			x = 56;
 			y = 106;
@@ -97,25 +193,30 @@ void Room51::setup_func() {
 			x = 31;
 			y = 118;
 		}
+
 		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = 0;
+			SetUpScreenFunc = nullptr;
 			HowardMov = 0;
 			auto_move(9, P_HOWARD);
-		} else
+		} else {
 			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		}
 	}
 }
 
 int16 Room51::use_door(int16 txt_nr) {
 	int16 action_ret = false;
+
 	if (is_cur_inventar(KEY_INV)) {
 		hide_cur();
 		action_ret = true;
+
 		switch (txt_nr) {
 		case 329:
 			auto_move(8, P_CHEWY);
-			SetUpScreenFunc = 0;
+			SetUpScreenFunc = nullptr;
 			det->show_static_spr(0);
+
 			if (!_G(spieler).R51HotelRoom) {
 				auto_move(11, P_HOWARD);
 				set_person_spr(P_LEFT, P_HOWARD);
@@ -124,6 +225,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				start_aad_wait(285, -1);
 				atds->set_ats_str(329, 1, ATS_DATEI);
 				SetUpScreenFunc = setup_func;
+
 			} else {
 				show_cur();
 				switch_room(52);
@@ -132,22 +234,28 @@ int16 Room51::use_door(int16 txt_nr) {
 
 		case 330:
 			auto_move(9, P_CHEWY);
+
 			if (!_G(spieler).R51KillerWeg) {
+				det->enable_sound(2, 0);
+				det->play_sound(2, 0);
 				det->show_static_spr(1);
 				start_detail_wait(2, 1, ANI_VOR);
 				det->start_detail(5, 255, ANI_VOR);
+
 				if (!_G(spieler).R52HotDogOk) {
 					start_aad_wait(287, -1);
 					auto_move(12, P_CHEWY);
 					det->stop_detail(5);
 					start_ani_block(5, ABLOCK37);
 					det->hide_static_spr(1);
+					det->disable_sound(2, 0);
 					start_aad_wait(284, -1);
 				} else {
 					_G(spieler).R51KillerWeg = true;
 					start_aad_wait(290, -1);
+					det->disable_sound(2, 0);
 					out->ausblenden(1);
-					out->setze_zeiger(0);
+					out->setze_zeiger(nullptr);
 					out->cls();
 					out->einblenden(pal, 0);
 					flags.NoPalAfterFlc = true;
@@ -155,6 +263,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					det->show_static_spr(16);
 					flic_cut(FCUT_068, FLC_MODE);
 					flc->remove_flic_user_function();
+
 					det->hide_static_spr(16);
 					flags.NoPalAfterFlc = false;
 					det->stop_detail(5);
@@ -166,12 +275,22 @@ int16 Room51::use_door(int16 txt_nr) {
 					set_up_screen(DO_SETUP);
 					start_aad_wait(291, -1);
 				}
-			} else
+			} else {
 				start_aad_wait(401, -1);
+			}
 			break;
 
 		case 331:
-			auto_move(10, P_CHEWY);
+		case 334:
+			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
+			out->setze_zeiger(nullptr);
+			out->cls();
+			flags.NoPalAfterFlc = true;
+			flic_cut(114, 0);
+			set_person_pos(115, 114, 0, 0);
+			fx_blend = BLEND3;
+			set_up_screen(NO_SETUP);
+			start_aad_wait(564, -1);
 			break;
 
 		case 332:
@@ -181,6 +300,7 @@ int16 Room51::use_door(int16 txt_nr) {
 
 		case 333:
 			auto_move(4, P_CHEWY);
+
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
 				det->show_static_spr(3);
@@ -213,17 +333,16 @@ int16 Room51::use_door(int16 txt_nr) {
 				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
 					start_aad_wait(282, -1);
 				break;
-
 			}
 			break;
 
-		case 334:
-			auto_move(7, P_CHEWY);
+		default:
 			break;
-
 		}
+
 		show_cur();
 	}
+
 	return action_ret;
 }
 
@@ -233,7 +352,18 @@ int16 Room51::cut_serv(int16 frame) {
 }
 
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
-	::error("TODO");
+	if (obj_nr == 9 || obj_nr == 10) {
+		assert(t_nr < 2);
+		if (!Room65::_scrollY[t_nr]) {
+			det->start_detail(t_nr, 1, 0);
+			Room65::_scrollY[t_nr] = 1;
+		} else if (!det->get_ani_status(t_nr)) {
+			det->start_detail(t_nr, 1, 1);
+			det->start_detail(t_nr + 2, 1, 0);
+			uhr->reset_timer(obj_nr, 0);
+			Room65::_scrollY[t_nr] = 0;
+		}
+	}
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room51.h b/engines/chewy/rooms/room51.h
index 69a8346e96f..382782250c5 100644
--- a/engines/chewy/rooms/room51.h
+++ b/engines/chewy/rooms/room51.h
@@ -27,6 +27,11 @@ namespace Rooms {
 
 class Room51 {
 private:
+	static bool _flag;
+	static bool _arr[2];
+	static int16 _tmpx, _tmpy;
+	static int _index;
+
 	static void setup_func();
 	static int16 cut_serv(int16 frame);
 	static void timer_action(int16 t_nr, int16 obj_nr);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 33f2b711c43..fc309d13653 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -29,6 +29,9 @@
 namespace Chewy {
 namespace Rooms {
 
+int16 Room65::_scrollX;
+int16 Room65::_scrollY[2];
+
 void Room65::entry() {
 	hide_person();
 	_G(r65tmp_scrollx) = _G(spieler).scrollx;
diff --git a/engines/chewy/rooms/room65.h b/engines/chewy/rooms/room65.h
index d30f4527cdf..84034ba4500 100644
--- a/engines/chewy/rooms/room65.h
+++ b/engines/chewy/rooms/room65.h
@@ -26,6 +26,10 @@ namespace Chewy {
 namespace Rooms {
 
 class Room65 {
+public:
+	static int16 _scrollX;
+	static int16 _scrollY[2];
+
 public:
 	static void entry();
 	static void xit();


Commit: f0e1e620958f309b3a2b8d29159c790fd8ec63bc
    https://github.com/scummvm/scummvm/commit/f0e1e620958f309b3a2b8d29159c790fd8ec63bc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Room 52 logic fixes

Changed paths:
    engines/chewy/rooms/room52.cpp


diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index da717e70c3e..6e26c33af71 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -32,10 +32,18 @@ namespace Rooms {
 void Room52::entry() {
 	SetUpScreenFunc = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
-	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg)
+
+	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg) {
 		plot_armee(0);
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
+	} else {
+		det->disable_sound(0, 0);
+	}
+
 	if (_G(spieler).R52KakerWeg)
 		det->stop_detail(0);
+
 	if (!flags.LoadGame) {
 		det->show_static_spr(4);
 		_G(spieler).R52TuerAuf = true;
@@ -64,6 +72,7 @@ int16 Room52::use_hot_dog() {
 	int16 i;
 	int16 action_ret = false;
 	hide_cur();
+
 	if (is_cur_inventar(BURGER_INV)) {
 		action_ret = true;
 		auto_move(3, P_CHEWY);
@@ -73,29 +82,39 @@ int16 Room52::use_hot_dog() {
 		auto_move(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
 		plot_armee(20);
+		det->enable_sound(0, 0);
+		det->play_sound(0, 0);
 		atds->set_ats_str(341, 1, ATS_DATEI);
 		auto_move(2, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(288, -1);
+
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(7, 1, ANI_VOR);
+		det->enable_sound(7, 0);
+		det->play_sound(7, 0);
 		det->start_detail(8, 255, ANI_VOR);
+
 		for (i = 0; i < 5; i++) {
 			wait_show_screen(20);
 			det->stop_detail(2 + i);
 		}
+
+		det->disable_sound(0, 0);
 		det->stop_detail(0);
 		det->stop_detail(8);
 		start_detail_wait(7, 1, ANI_RUECK);
+		det->disable_sound(7, 0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(303, -1);
 		atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
 		_G(spieler).R52KakerWeg = true;
 	}
+
 	show_cur();
 	return action_ret;
 }
@@ -109,28 +128,31 @@ void Room52::plot_armee(int16 frame) {
 }
 
 void Room52::kaker_platt() {
-	if (!_G(spieler).R52KakerJoke &&
-		_G(spieler).R52HotDogOk &&
-		!_G(spieler).R52KakerWeg &&
-		!flags.ExitMov) {
+	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk &&
+			!_G(spieler).R52KakerWeg && !flags.ExitMov) {
 		_G(spieler).R52KakerJoke = true;
 		stop_person(P_CHEWY);
+		hide_cur();
 		start_aad_wait(289, -1);
+		show_cur();
 	}
 }
 
 void Room52::setup_func() {
 	int16 x, y;
 	int16 ch_y;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
 		x = 1;
 		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+
 		if (ch_y < 97) {
 			y = 44;
 		} else {
 			y = 87;
 		}
+
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
 	}
 }


Commit: b773a5e396bda437dedf55a310dc670d66191935
    https://github.com/scummvm/scummvm/commit/b773a5e396bda437dedf55a310dc670d66191935
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Room 53 logic fixes

Changed paths:
    engines/chewy/rooms/room53.cpp


diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 7f0bf54fc37..db7734f87b4 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -75,6 +75,7 @@ void Room53::talk_man() {
 
 int16 Room53::use_man() {
 	int16 action_ret = false;
+
 	if (is_cur_inventar(BESTELL_INV)) {
 		action_ret = true;
 		hide_cur();
@@ -90,6 +91,7 @@ int16 Room53::use_man() {
 		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
+
 	return action_ret;
 }
 


Commit: 128b4e88b9e4be3f1ea74ce3f7bd3d9e1baa3181
    https://github.com/scummvm/scummvm/commit/128b4e88b9e4be3f1ea74ce3f7bd3d9e1baa3181
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Room 54 logic fixes

Changed paths:
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room54.h


diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 533891195c4..3e5d8d59c18 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -37,75 +37,68 @@ void Room54::entry(int16 eib_nr) {
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
+
 	if (_G(spieler).R54FputzerWeg)
 		det->show_static_spr(9);
+
 	spieler_mi[P_HOWARD].Mode = true;
+
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
+
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = false;
 				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
 			}
+
 			set_person_pos(300, 80, P_CHEWY, P_LEFT);
 			_G(maus_links_click) = false;
 			_G(spieler).scrollx = 134;
 			_G(spieler).scrolly = 0;
+
 		} else if (_G(spieler).R55Location) {
 			aufzug_ab();
+
 		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = false;
 				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
 			}
+
 			_G(spieler).scrollx = 66;
 			set_person_pos(241, 85, P_CHEWY, P_LEFT);
 		}
+
 		if (_G(spieler).R55ExitDia) {
 			start_aad_wait(_G(spieler).R55ExitDia, -1);
+			show_cur();
+			_G(spieler).R55ExitDia = false;
 		}
+
 		if (_G(spieler).R55R54First) {
 			_G(spieler).R55R54First = false;
-			calc_auto_taxi();
 		}
 	}
 }
 
 void Room54::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
+
 	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 		spieler_mi[P_HOWARD].Mode = false;
 	}
 }
 
-void Room54::calc_auto_taxi() {
-	int16 r_nr;
-	r_nr = 0;
-	if (_G(spieler).R56AbfahrtOk) {
-		r_nr = 57;
-	} else if (obj->check_inventar(KAPPE_INV)) {
-		r_nr = 56;
-	}
-	if (r_nr) {
-		hide_cur();
-		auto_move(7, P_CHEWY);
-		_G(spieler).R54HowardVorne = false;
-		go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
-		_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
-		_G(maus_links_click) = false;
-		show_cur();
-		_G(spieler).R48TaxiEntry = true;
-		switch_room(r_nr);
-	}
-}
-
 void Room54::setup_func() {
 	int16 x, y;
 	int16 ch_x;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 		calc_person_look();
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 		if (_G(spieler).R54HowardVorne != 255) {
 			if (_G(spieler).R54HowardVorne) {
 				if (ch_x < 218) {
@@ -125,7 +118,9 @@ void Room54::setup_func() {
 					x = 290;
 				}
 			}
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+
+			if (!flags.SaveMenu)
+				go_auto_xy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
 }
@@ -133,9 +128,11 @@ void Room54::setup_func() {
 int16 Room54::use_schalter() {
 	int16 aad_nr;
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		action_ret = true;
+
 		if (!_G(spieler).R54FputzerWeg) {
 			auto_move(1, P_CHEWY);
 			_G(spieler).R54HowardVorne = 255;
@@ -144,16 +141,26 @@ int16 Room54::use_schalter() {
 			start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
 			det->show_static_spr(0);
 			auto_move(2, P_CHEWY);
+			det->enable_sound(1, 0);
+			det->enable_sound(0, 1);
+			det->disable_sound(1, 2);
+
 			start_detail_wait(1, 1, ANI_VOR);
 			det->start_detail(3, 255, ANI_VOR);
 			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
 			det->stop_detail(3);
 			++_G(spieler).R54LiftCount;
+
 			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_VOR);
 				det->hide_static_spr(0);
+				det->disable_sound(1, 0);
+				det->disable_sound(0, 1);
+				det->enable_sound(1, 2);
 				start_detail_wait(1, 1, ANI_RUECK);
+				det->disable_sound(1, 2);
 				aad_nr = 295;
+
 			} else {
 				start_detail_wait(5, 1, ANI_VOR);
 				det->show_static_spr(9);
@@ -162,24 +169,31 @@ int16 Room54::use_schalter() {
 				_G(spieler).R54FputzerWeg = true;
 				atds->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_ats_str(349, 1, ATS_DATEI);
-				atds->set_ats_str(345, 1, ATS_DATEI);
+				atds->set_ats_str(351, 1, ATS_DATEI);
 			}
+
 			start_aad_wait(aad_nr, -1);
 			_G(spieler).R54HowardVorne = false;
-		} else
+
+		} else {
 			start_aad_wait(297, -1);
+		}
+
 		show_cur();
 	}
+
 	return action_ret;
 }
 
 void Room54::talk_verkauf() {
 	hide_cur();
+
 	if (!_G(spieler).R54HotDogOk) {
 		if (_G(spieler).AkInvent == DOLLAR175_INV)
 			del_inventar(DOLLAR175_INV);
 		else
 			del_invent_slot(DOLLAR175_INV);
+
 		_G(spieler).R54HotDogOk = true;
 		auto_move(3, P_CHEWY);
 		_G(spieler).R54HowardVorne = true;
@@ -189,6 +203,7 @@ void Room54::talk_verkauf() {
 		start_detail_wait(7, 1, ANI_VOR);
 		det->start_detail(8, 255, ANI_VOR);
 		start_aad_wait(310, -1);
+
 		det->stop_detail(8);
 		start_detail_wait(9, 1, ANI_VOR);
 		start_detail_wait(10, 1, ANI_VOR);
@@ -198,35 +213,43 @@ void Room54::talk_verkauf() {
 		room->set_timer_status(6, TIMER_START);
 		det->set_static_ani(6, -1);
 		auto_move(4, P_CHEWY);
-		start_aad_wait(312, -1);
+
+		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
 		obj->add_inventar(BURGER_INV, &room_blk);
 		inventory_2_cur(BURGER_INV);
-	} else
+
+	} else {
 		start_aad_wait(313, -1);
+	}
+
 	show_cur();
 }
 
 int16 Room54::use_zelle() {
 	int16 action_ret = false;
 	hide_cur();
+
 	if (_G(spieler).inv_cur) {
 		if (is_cur_inventar(JMKOST_INV)) {
 			action_ret = true;
+
 			if (!_G(spieler).R54Schild) {
 				start_aad_wait(318, -1);
 			} else {
 				auto_move(5, P_CHEWY);
 				_G(spieler).R54HowardVorne = true;
-				SetUpScreenFunc = 0;
+				SetUpScreenFunc = nullptr;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
 				flc->set_flic_user_function(cut_serv);
 				flic_cut(FCUT_069, FLC_MODE);
 				flc->remove_flic_user_function();
+
 				del_inventar(_G(spieler).AkInvent);
 				invent_2_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_JMANS);
 				_G(zoom_horizont) = 90;
+
 				set_person_pos(283, 93, P_CHEWY, P_LEFT);
 				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
 				start_aad_wait(315, -1);
@@ -243,6 +266,7 @@ int16 Room54::use_zelle() {
 		_G(spieler).R54HowardVorne = true;
 		start_aad_wait(319, -1);
 	}
+
 	show_cur();
 	return action_ret;
 }
@@ -257,9 +281,11 @@ int16 Room54::use_azug() {
 	int16 ay;
 	int16 delay;
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
+
 		if (!_G(spieler).R54LiftOk) {
 			if (_G(spieler).R54FputzerWeg) {
 				auto_move(8, P_CHEWY);
@@ -268,28 +294,40 @@ int16 Room54::use_azug() {
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->show_static_spr(12);
 				_G(spieler).R55Location = true;
-				SetUpScreenFunc = 0;
+				SetUpScreenFunc = nullptr;
 				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
+				det->enable_sound(1, 0);
+				det->play_sound(1, 0);
+
 				ch_y = 68;
 				ay = 0;
 				delay = 0;
+
 				while (ch_y > -48) {
 					det->set_static_pos(12, 125, ch_y, false, false);
 					det->set_static_pos(9, 122, ay, false, false);
+
 					if (!delay) {
 						ch_y -= 3;
 						ay -= 3;
 						delay = _G(spieler).DelaySpeed / 2;
-					} else
+					} else {
 						--delay;
+					}
+
 					set_up_screen(DO_SETUP);
+					SHOULD_QUIT_RETURN0;
 				}
+
 				switch_room(55);
 			}
-		} else
+		} else {
 			start_aad_wait(314, -1);
+		}
+
 		show_cur();
 	}
+
 	return action_ret;
 }
 
@@ -297,25 +335,36 @@ void Room54::aufzug_ab() {
 	int16 ch_y;
 	int16 ay;
 	int16 delay;
+
 	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
 	SetUpScreenFunc = setup_func;
+	det->show_static_spr(12);
+	det->enable_sound(1, 0);
+	det->play_sound(1, 0);
+
 	ch_y = -40;
 	ay = -108;
 	delay = 0;
-	det->show_static_spr(12);
-	while (ch_y < 68 && !SHOULD_QUIT) {
+
+	while (ch_y < 68) {
 		det->set_static_pos(12, 125, ch_y, false, false);
 		det->set_static_pos(9, 122, ay, false, false);
+
 		if (!delay) {
 			ch_y += 3;
 			ay += 3;
 			delay = _G(spieler).DelaySpeed / 2;
-		} else
+		} else {
 			--delay;
+		}
+
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 	}
+
+	det->disable_sound(1, 0);
 	det->hide_static_spr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -326,23 +375,28 @@ void Room54::aufzug_ab() {
 
 short Room54::use_taxi() {
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hide_cur();
 		auto_move(7, P_CHEWY);
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
+
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 			if (_G(spieler).R54HowardVorne) {
 				_G(spieler).R54HowardVorne = false;
 				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
 			}
+
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
+
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(48);
 	}
+
 	return action_ret;
 }
 
diff --git a/engines/chewy/rooms/room54.h b/engines/chewy/rooms/room54.h
index c98762afa31..8f21fd47e82 100644
--- a/engines/chewy/rooms/room54.h
+++ b/engines/chewy/rooms/room54.h
@@ -28,7 +28,6 @@ namespace Rooms {
 class Room54 {
 private:
 	static void setup_func();
-	static void calc_auto_taxi();
 	static int16 cut_serv(int16 frame);
 	static void aufzug_ab();
 


Commit: 17d0e33e75a1c47228388720792efa884f1ef66e
    https://github.com/scummvm/scummvm/commit/17d0e33e75a1c47228388720792efa884f1ef66e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Room 55 logic fixes

Changed paths:
    engines/chewy/rooms/room55.cpp


diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 293e1e4ac87..675b398d4ce 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -38,11 +38,16 @@ void Room55::entry() {
 	_G(spieler).R55ExitDia = 0;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
+
 	if (!_G(spieler).R54FputzerWeg)
 		det->start_detail(6, 255, ANI_VOR);
 
+	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
+		det->hide_static_spr(6);
+
 	if ((_G(spieler).R55RaumOk) || (!_G(spieler).R55RaumOk && _G(spieler).R55ScriptWeg))
 		det->hide_static_spr(0);
+
 	if (!_G(spieler).R55SekWeg) {
 		det->start_detail(8, 255, ANI_VOR);
 		det->start_detail(9, 255, ANI_VOR);
@@ -50,7 +55,9 @@ void Room55::entry() {
 		_G(timer_nr)[0] = room->set_timer(19 + (int16)_G(spieler).R55Entry, 10);
 		det->set_static_ani(19 + (int16)_G(spieler).R55Entry, -1);
 	}
+
 	spieler_mi[P_HOWARD].Mode = true;
+
 	if (_G(spieler).R55Job) {
 		rock2mans();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
@@ -61,26 +68,30 @@ void Room55::entry() {
 	}
 	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
 		det->show_static_spr(0);
+
 	if (!flags.LoadGame) {
 		if (_G(spieler).R55Location) {
 			_G(spieler).scrollx = 136;
-			set_person_pos(400, 82, P_CHEWY, P_RIGHT);
+			set_person_pos(404, 66, P_CHEWY, P_RIGHT);
 			start_detail_wait(3, 1, ANI_VOR);
-			_G(timer_nr)[0] = room->set_timer(4, 10);
-			det->set_static_ani(4, -1);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(zoom_horizont) = 1;
 			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			_G(spieler).scrollx = 0;
+
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
 			}
+
 			det->show_static_spr(8);
 			auto_move(1, P_CHEWY);
 			hide_cur();
 			det->hide_static_spr(8);
-			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
 
+			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
 				set_person_spr(P_LEFT, P_CHEWY);
+
 				if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 					verleger_mov(0);
 					talk_line();
@@ -90,6 +101,7 @@ void Room55::entry() {
 					get_job();
 				}
 			}
+
 			show_cur();
 		}
 	}
@@ -98,11 +110,13 @@ void Room55::entry() {
 void Room55::xit(int16 eib_nr) {
 	if (eib_nr == 90) {
 		mans2rock();
+
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 			spieler_mi[P_HOWARD].Mode = false;
 		}
 	}
+
 	_G(spieler).ScrollxStep = 1;
 }
 
@@ -113,6 +127,7 @@ void Room55::gedAction(int index) {
 
 int16 Room55::use_stapel1() {
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R55ScriptWeg) {
 			action_ret = true;
@@ -123,30 +138,39 @@ int16 Room55::use_stapel1() {
 			det->show_static_spr(1);
 			atds->set_ats_str(354, 1, ATS_DATEI);
 			atds->set_ats_str(355, 1, ATS_DATEI);
+
 		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
 			start_aad_wait(333, -1);
 		}
+
 	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
+
 		if (_G(spieler).R55ScriptWeg) {
 			auto_move(4, P_CHEWY);
 			_G(spieler).R55EscScriptOk = true;
 			det->show_static_spr(0);
 			del_inventar(_G(spieler).AkInvent);
 			atds->set_ats_str(354, 2, ATS_DATEI);
-		} else
+		} else {
 			start_aad_wait(326, -1);
+		}
 	}
+
 	return action_ret;
 }
 
 int16 Room55::use_stapel2() {
 	int16 action_ret = false;
+
 	if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
+		hide_cur();
 		start_aad_wait(327, -1);
+		show_cur();
 	}
+
 	return action_ret;
 }
 
@@ -155,6 +179,7 @@ int16 Room55::use_telefon() {
 	int16 delay;
 	int16 tmp_delay;
 	int16 action_ret = false;
+
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		if (_G(spieler).R55EscScriptOk) {
@@ -168,6 +193,7 @@ int16 Room55::use_telefon() {
 				start_aad_wait(329, -1);
 				det->stop_detail(11);
 				start_detail_wait(10, 1, ANI_RUECK);
+
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				auto_move(7, P_CHEWY);
 				flags.NoScroll = true;
@@ -178,12 +204,17 @@ int16 Room55::use_telefon() {
 				det->start_detail(1, 255, ANI_VOR);
 				start_aad_wait(331, -1);
 				det->stop_detail(1);
+
+				det->show_static_spr(16);
+				start_aad_wait(608, -1);
+				det->hide_static_spr(16);
 				start_detail_wait(2, 1, ANI_VOR);
 				det->hide_static_spr(0);
 				det->hide_static_spr(8);
 				atds->set_ats_str(354, 1, ATS_DATEI);
 				flic_cut(FCUT_071, FLC_MODE);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
+
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
 				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
 				SetUpScreenFunc = 0;
@@ -192,6 +223,7 @@ int16 Room55::use_telefon() {
 				start_aad_wait(335, -1);
 				start_aad_wait(336, -1);
 				tmp_delay = _G(spieler).DelaySpeed;
+
 				for (i = 0; i < 7; i++) {
 					delay = tmp_delay;
 					if (!_G(spieler).scrollx)
@@ -202,8 +234,11 @@ int16 Room55::use_telefon() {
 						out->skip_frame(1);
 						--delay;
 					}
+
 					set_up_screen(DO_SETUP);
+					SHOULD_QUIT_RETURN0;
 				}
+
 				flic_cut(FCUT_072, FLC_MODE);
 				flags.NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
@@ -216,6 +251,9 @@ int16 Room55::use_telefon() {
 				_G(spieler).R55R54First = true;
 				_G(spieler).R55ExitDia = 337;
 				_G(spieler).room_e_obj[89].Attribut = 255;
+				_G(spieler).PersonGlobalDia[P_HOWARD] = 10024;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
+
 				switch_room(54);
 			} else {
 				start_aad_wait(332, -1);
@@ -224,6 +262,7 @@ int16 Room55::use_telefon() {
 			start_aad_wait(328, -1);
 		}
 	}
+
 	return action_ret;
 }
 
@@ -231,18 +270,21 @@ void Room55::get_job() {
 	int16 tmp_scrollx;
 	int16 tmp_scrolly;
 	int16 r_nr;
+
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	tmp_scrollx = _G(spieler).scrollx;
 	tmp_scrolly = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(61);
+
 	show_cur();
 	start_ads_wait(15);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	flags.LoadGame = true;
 	_G(spieler).scrollx = tmp_scrollx;
 	_G(spieler).scrolly = tmp_scrolly;
+
 	if (_G(spieler).R55Job) {
 		r_nr = 55;
 		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
@@ -252,14 +294,16 @@ void Room55::get_job() {
 		r_nr = 54;
 		mans2rock();
 	}
+
 	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
 	spieler_mi[P_HOWARD].Mode = true;
+
 	if (r_nr == 54)
 		flags.LoadGame = false;
+
 	set_person_pos(118, 96, P_CHEWY, P_LEFT);
 	switch_room(r_nr);
 	flags.LoadGame = false;
-
 }
 
 void Room55::mans2rock() {
@@ -284,10 +328,12 @@ void Room55::verleger_mov(int16 mode) {
 	det->show_static_spr(11);
 	start_detail_wait(13, 1, ANI_VOR);
 	start_detail_wait(14, 1, ANI_VOR);
+
 	if (_G(spieler).ChewyAni == CHEWY_JMANS)
 		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
 	if (mode)
 		start_detail_wait(15, 1, ANI_VOR);
+
 	det->set_static_ani(16, -1);
 }
 
@@ -306,20 +352,21 @@ void Room55::strasse(int16 mode) {
 
 int16 Room55::use_kammeraus() {
 	int16 action_ret = false;
+
 	if (_G(spieler).R55Location) {
 		if (is_cur_inventar(KILLER_INV)) {
 			action_ret = true;
+
 			if (_G(spieler).R52KakerWeg) {
 				if (!_G(spieler).R55SekWeg) {
 					hide_cur();
-					room->set_timer_status(4, TIMER_STOP);
-					det->del_static_ani(4);
-					det->stop_detail(4);
+					_G(spieler).PersonHide[P_CHEWY] = true;
 					start_detail_wait(5, 1, ANI_VOR);
 					det->show_static_spr(10);
 					flc->set_flic_user_function(cut_serv);
 					flic_cut(FCUT_070, FLC_MODE);
 					flc->remove_flic_user_function();
+
 					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
 					det->stop_detail(19 + (int16)_G(spieler).R55Entry);
 					det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
@@ -328,6 +375,9 @@ int16 Room55::use_kammeraus() {
 					_G(spieler).R55SekWeg = true;
 					atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
 					atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
+					del_inventar(_G(spieler).AkInvent);
+					atds->set_steuer_bit(345, 1, 1);
+					atds->set_steuer_bit(346, 1, 1);
 					strasse(1);
 					show_cur();
 				}
@@ -336,21 +386,25 @@ int16 Room55::use_kammeraus() {
 			}
 		}
 	}
+
 	return action_ret;
 }
 
 int16 Room55::cut_serv(int16 frame) {
-	if (frame < 10)
+	if (frame < 29 )
 		det->plot_static_details(136, 0, 10, 10);
+
 	return 0;
 }
 
 void Room55::setup_func() {
 	int16 x, y;
 	int16 ch_x;
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 		calc_person_look();
 		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+
 		if (ch_x < 100) {
 			x = 62;
 			y = 101;
@@ -364,15 +418,18 @@ void Room55::setup_func() {
 			x = 318;
 			y = 110;
 		}
+
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
 	}
 }
 
 void Room55::talk_line() {
 	int16 aad_nr = 0;
+
 	if (_G(spieler).R55Location == 0) {
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 			hide_cur();
+
 			if (!_G(spieler).R55SekWeg) {
 				auto_move(2, P_CHEWY);
 				flags.NoScroll = true;
@@ -384,12 +441,15 @@ void Room55::talk_line() {
 				det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
 				start_detail_wait(22, 1, ANI_VOR);
 				det->set_static_ani(21, -1);
+
 			} else if (!_G(spieler).R55RaumOk) {
 				auto_move(3, P_CHEWY);
 				aad_nr = 323;
 				_G(spieler).R55ExitDia = 324;
 			}
+
 			start_aad_wait(aad_nr, -1);
+
 			if (_G(spieler).R55SekWeg) {
 				det->del_static_ani(16);
 				start_detail_wait(14, 1, ANI_VOR);
@@ -397,6 +457,7 @@ void Room55::talk_line() {
 				det->del_static_ani(21);
 				start_detail_wait(22, 1, ANI_VOR);
 			}
+
 			flags.NoScroll = false;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 			spieler_mi[P_HOWARD].Mode = false;


Commit: d84603386715241491a2a82bc7174e86af22111f
    https://github.com/scummvm/scummvm/commit/d84603386715241491a2a82bc7174e86af22111f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: gcc compilation fixes

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/mcga_grafik.cpp
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room49.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 197a1bfbd2d..c02fbcb496c 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -156,12 +156,14 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 	tmp_count = 0;
 	ende = 0;
 	start_adr = str_adr;
+
 	while (!ende) {
 		switch (*str_adr) {
 		case 0:
 			if (str_adr[1] != ATDS_END_TEXT) {
 				str_adr[0] = ' ';
 			}
+			// Fall through
 		case 0x20:
 			if (count < zeichen_anz && *str_adr == 0) {
 
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index fe4e76d5b0b..1a934c3252d 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -584,6 +584,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 				switch (zeichen) {
 				case 'd':
 					vorzeichen = '-';
+					// Fall through
 				case 'u':
 					if ((char_anf == 0) && (char_end == 0)) {
 						char_anf = '0';
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 4c821e6da86..fda9b26f9da 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -72,7 +72,6 @@ MODULE_OBJS = \
 	rooms/room27.o \
 	rooms/room28.o \
 	rooms/room29.o \
-	rooms/room30.o \
 	rooms/room31.o \
 	rooms/room32.o \
 	rooms/room33.o \
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index df5b091e30a..cbdf81edb55 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -470,6 +470,7 @@ void exit_room(int16 eib_nr) {
 
 	case 13:
 		Room13::xit();
+		break;
 
 	case 18:
 		if (eib_nr == 40)
@@ -1048,6 +1049,7 @@ void flic_cut(int16 nr, int16 mode) {
 			flc->custom_play(&Ci);
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+			break;
 
 		case FCUT_058:
 			nr = FCUT_058;
@@ -1197,6 +1199,7 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				ret = flc->custom_play(&Ci);
 			}
+			break;
 
 		case 1045:
 			for (i = 0; i < 11 && ret != -1; ++i) {
@@ -1435,6 +1438,7 @@ void flic_cut(int16 nr, int16 mode) {
 				out->cls();
 				ret = flc->custom_play(&Ci);
 			}
+			break;
 
 		case 1117:
 			if (mem->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 9f2582cdf0d..7b84d10a2e4 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -66,7 +66,7 @@ int16 Room4::sonde_comp() {
 	while (!ende) {
 		maus_action();
 		if (_G(maus_links_click)) {
-			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, (int16 *)CONSOLE, 3)) {
+			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
 				if (cur_x > 0)
 					--cur_x;
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index f92a781afc7..3e04b8250d5 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -149,8 +149,8 @@ void Room49::calc_boy() {
 }
 
 int16 Room49::use_boy() {
-	int16 tmp;
 	int16 action_ret = false;
+
 	if (is_cur_inventar(SPARK_INV)) {
 		action_ret = true;
 		hide_cur();


Commit: 528f82d9b03652755096774d4b07fc2f83ddb9ab
    https://github.com/scummvm/scummvm/commit/528f82d9b03652755096774d4b07fc2f83ddb9ab
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:40-08:00

Commit Message:
CHEWY: Fix logic bug in Room 17

Changed paths:
    engines/chewy/rooms/room17.cpp


diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 5403a0502b2..859db9ab5f5 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -265,7 +265,7 @@ void Room17::close_door() {
 	if (_G(spieler).R17DoorKommand) {
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).R17DoorKommand = false;
-		atds->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, 1);
+		atds->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
 		det->hide_static_spr(7);
 		det->start_detail(4, 1, ANI_RUECK);
 	}
@@ -303,8 +303,8 @@ int16 Room17::energie_hebel() {
 				det->start_detail(i + 6, 255, 0);
 		}
 
-		atds->set_ats_str(142, 1, _G(spieler).R17EnergieOut ? 1 : 0);
-		atds->set_ats_str(140, 1, _G(spieler).R17EnergieOut ? 1 : 0);
+		atds->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
+		atds->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
 		det->play_sound(12, 0);
 
 		if (_G(spieler).R17EnergieOut) {


Commit: 194f3feeb48039fd373720257a69fa47257f4e2b
    https://github.com/scummvm/scummvm/commit/194f3feeb48039fd373720257a69fa47257f4e2b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: Implement room 86, check more calls to set_ats_str()

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room86.h
    engines/chewy/rooms/room89.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index cbdf81edb55..7229156f598 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1855,8 +1855,8 @@ void sib_event_inv(int16 sib_nr) {
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
 			det->start_detail(6, 255, 0);
-			atds->set_ats_str(27, 1, 1);
-			atds->set_ats_str(30, 1, 1);
+			atds->set_ats_str(27, 1, ATS_DATEI);
+			atds->set_ats_str(30, 1, ATS_DATEI);
 		}
 		break;
 
@@ -1971,7 +1971,7 @@ void sib_event_inv(int16 sib_nr) {
 
 		if (_G(spieler).R18CartTerminal) {
 			_G(spieler).R18CartSave = true;
-			atds->set_ats_str(26, 1, 6);
+			atds->set_ats_str(26, 1, INV_ATS_DATEI);
 			start_aad_wait(120, -1);
 		} else {
 			start_aad_wait(121, -1);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index e31da9002cf..2a5ca259f58 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -280,7 +280,7 @@ int16 Room12::useTransformerTube() {
 		if (_G(spieler).R12KetteLinks) {
 			_G(spieler).R12KetteLinks = false;
 			uhr->enable_timer();
-			atds->set_ats_str(117, 1, 0);
+			atds->set_ats_str(117, 1, AAD_DATEI);
 		} else {
 			auto_move(7, P_CHEWY);
 			start_aad_wait(29, -1);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index fa51c67f047..f7a20240331 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room86.h"
 
@@ -30,13 +29,174 @@ namespace Chewy {
 namespace Rooms {
 
 void Room86::entry(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 20;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 20;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 24;
+	_G(zoom_horizont) = 110;
+	_G(spieler).DiaAMov = 0;
+	if (_G(spieler).flags32_2) {
+		det->start_detail(0, 255, false);
+		det->set_static_pos(0, 352, 107, false, false);
+		det->show_static_spr(0);
+	}
+
+	if (flags.LoadGame)
+		return;
+
+	if (eib_nr == 127) {
+		set_person_pos(82, 56, P_HOWARD, P_RIGHT);
+		set_person_pos(134, 56, P_NICHELLE, P_LEFT);
+		return;
+	}
+
+	if (!_G(spieler).flags32_10) {
+		set_person_pos(260, 66, P_CHEWY, P_RIGHT);
+		set_person_pos(298, 44, P_HOWARD, P_LEFT);
+		set_person_pos(320, 42, P_NICHELLE, P_LEFT);
+		_G(spieler).scrollx = 164;
+	} else {
+		spieler_mi[P_CHEWY].Vorschub = 16;
+		hide_cur();
+		flags.ZoomMov = false;
+		_G(spieler).scrollx = 246;
+		_G(spieler).ScrollxStep = 8;
+		set_person_pos(443, 66, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonRoomNr[P_HOWARD] = 84;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 0;
+		auto_move(2, P_CHEWY);
+		flags.NoScroll = true;
+		_G(spieler.ScrollxStep = 2);
+		auto_scroll(30, 0);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		flags.NoScroll = false;
+		spieler_mi[P_CHEWY].Vorschub = 8;
+		det->stop_detail(0);
+		det->show_static_spr(4);
+		det->show_static_spr(5);
+		invent_2_slot(94);
+		auto_move(4, P_CHEWY);
+		flags.NoScroll = true;
+		auto_scroll(246, 0);
+		proc3(false);
+		flic_cut(92, CFO_MODE);
+		flags.NoScroll = false;
+		auto_move(0, P_CHEWY);
+		_G(spieler).flags32_20 = true;
+		switch_room(85);
+		show_cur();
+	}
 }
 
 void Room86::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	switch (eib_nr) {
+	case 128:
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 86)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 85;
+		
+		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 86)
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 85;
+		break;
+	case 132:
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 86)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 87;
+
+		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 86)
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 87;
+		break;
+	default:
+		break;
+	}
+}
+
+void Room86::setup_func() {
+	calc_person_look();
+
+	int nicDestX;
+	int howDestY = 56;
+	int howDestX;
+	int nicDestY = 56;
+
+	int xyPos = spieler_vector[P_CHEWY].Xypos[0];	
+	if (xyPos > 390) {
+		howDestX = 298;
+		howDestY = 44;
+		nicDestX = 320;
+		nicDestY = 42;
+	} else if (xyPos > 250) {
+		howDestX = 216;
+		nicDestX = 240;
+	} else {
+		howDestX = 82;
+		nicDestX = 134;
+	}
+
+	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 int Room86::proc2() {
-	return 0;
+	if (!is_cur_inventar(94))
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->start_detail(0, 255, false);
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	del_inventar(_G(spieler).AkInvent);
+	auto_move(3, P_CHEWY);
+	proc3(true);
+	atds->del_steuer_bit(499, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_ats_str(497, 1, ATS_DATEI);
+	atds->set_ats_str(498, 1, ATS_DATEI);
+	_G(spieler).flags32_2 = true;
+	_G(spieler).room_e_obj[132].Attribut = 2;
+	start_spz(16, 255, false, P_CHEWY);
+	start_aad_wait(468, -1);
+
+	show_cur();
+	return 1;
+}
+
+void Room86::proc3(bool cond) {
+	int destY, deltaY;
+
+	if (cond) {
+		destY = 199;
+		deltaY = -2;
+	} else {
+		destY = 104;
+		deltaY = 2;
+	}
+
+	if (flags.NoScroll)
+		auto_scroll(196, 0);
+
+	det->set_static_pos(0, 352, destY, false, false);
+	det->show_static_spr(0);
+	det->enable_sound(0, 1);
+	det->enable_sound(0, 2);
+	det->play_sound(0, 1);
+	det->play_sound(0, 2);
+
+	for (int i = 0; i < 48; ++i) {
+		set_up_screen(NO_SETUP);
+		det->set_static_pos(0, 352, destY, false, false);
+		destY += deltaY;
+		out->setze_zeiger(nullptr);
+		out->back2screen(workpage);
+	}
+
+	det->disable_sound(0, 1);
+	det->disable_sound(0, 2);
+	flags.NoScroll = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room86.h b/engines/chewy/rooms/room86.h
index cbb1c99e1dc..ba663652ef9 100644
--- a/engines/chewy/rooms/room86.h
+++ b/engines/chewy/rooms/room86.h
@@ -29,7 +29,9 @@ class Room86 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static int proc2();
+	static void proc3(bool cond);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index b49e0151bd1..3e5c0b6570c 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -205,7 +205,7 @@ int Room89::proc4() {
 		det->show_static_spr(5);
 		det->show_static_spr(6);
 		_G(spieler).flags33_4 = true;
-		atds->set_ats_str(514, 1, P_HOWARD);
+		atds->set_ats_str(514, 1, ATS_DATEI);
 	}
 
 	show_cur();
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 16eb5311d78..80b9de66890 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1073,7 +1073,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 267:
 						if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo)
-							atds->set_ats_str(267, 1, 1);
+							atds->set_ats_str(267, 1, ATS_DATEI);
 						break;
 
 					case 283:
@@ -2168,7 +2168,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		start_spz(5, 255, false, P_CHEWY);
 		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		flags.InventMenu = true;
-		atds->set_ats_str(88, 1, 6);
+		atds->set_ats_str(88, 1, INV_ATS_DATEI);
 		break;
 
 	case 102:


Commit: 08b9b36f97ddaf4e9c98c2c26c4f76c7b92cede4
    https://github.com/scummvm/scummvm/commit/08b9b36f97ddaf4e9c98c2c26c4f76c7b92cede4
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: Implement Room 85

Changed paths:
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room85.h


diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 216b146fe64..f6020628e3a 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -22,17 +22,151 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room85.h"
+#include "chewy/rooms/room87.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room85::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	det->enable_sound(0, 1);
+	det->play_sound(0, 1);
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 22;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 37;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 22;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 38;
+
+	_G(zoom_horizont) = 0;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 1;
+
+	if (_G(spieler).flags32_10) {
+		det->show_static_spr(4);
+		atds->del_steuer_bit(495, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (flags.LoadGame)
+		return;
+
+	if (_G(spieler).flags30_1 || eib_nr == 124) {
+		hide_cur();
+		set_person_pos(278, 157, P_CHEWY, P_RIGHT);
+		set_person_pos(296, 142, P_HOWARD, P_RIGHT);
+		set_person_pos(322, 142, P_NICHELLE, P_RIGHT);
+		_G(spieler).flags30_1 = false;
+		_G(maus_links_click) = 0;
+		_G(spieler).scrollx = 78;
+		if (_G(spieler).flags32_40) {
+			atds->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATEI);
+			det->start_detail(1, 255, false);
+			set_person_pos(195, 146, P_CHEWY, P_RIGHT);
+			set_person_pos(186, 142, P_HOWARD, P_RIGHT);
+		}
+		show_cur();
+	} else if (!_G(spieler.flags32_20)) {
+		set_person_pos(148, 152, P_CHEWY, P_RIGHT);
+		set_person_pos(98, 142, P_HOWARD, P_RIGHT);
+		set_person_pos(128, 142, P_NICHELLE, P_RIGHT);
+		_G(spieler).scrollx = 0;
+	} else {
+		hide_cur();
+		_G(spieler).scrollx = 0;
+		set_person_pos(133, 152, P_CHEWY, P_RIGHT);
+		_G(spieler).room_e_obj[127].Attribut = 255;
+		det->show_static_spr(5);
+		det->show_static_spr(6);
+		start_aad_wait(474, -1);
+		flic_cut(90, CFO_MODE);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(91, CFO_MODE);
+		det->hide_static_spr(6);
+		_G(spieler).scrollx = 25;
+		fx_blend = BLEND3;
+		start_aad_wait(475, -1);
+		start_aad(476, -1);
+		flc->set_custom_user_function(Room87::proc5);
+		flic_cut(89, CFO_MODE);
+		test_intro(25);
+		ERROR
+
+		flc->remove_custom_user_function();
+		switch_room(84);
+		show_cur();
+	}
 }
 
 void Room85::xit(int16 eib_nr) {
+	switch (eib_nr) {
+	case 126:
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 85)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 84;
+		
+		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 85)
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 84;
+		break;
+	case 127:
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 85)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 86;
+
+		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 85)
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 86;
+		break;
+	default:
+		break;
+	}
+}
+
+void Room85::setup_func() {
+	calc_person_look();
+
+	const int xyPos = spieler_vector[P_CHEWY].Xypos[0];
+	int howDestX, nicDestX;
+	
+	if (xyPos > 255) {
+		howDestX = 296;
+		nicDestX = 322;
+	} else if (xyPos > 150) {
+		howDestX = 186;
+		nicDestX = 212;
+	} else {
+		howDestX = 98;
+		nicDestX = 128;
+	}
+
+	if (HowardMov == 1) {
+		howDestX = 98;
+		nicDestX = 128;
+	}
+
+	go_auto_xy(howDestX, 142, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, 142, P_NICHELLE, ANI_GO);
+}
+
+int Room85::proc2() {
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	auto_move(2, P_CHEWY);
+	det->stop_detail(1);
+	start_detail_wait(2, 1, ANI_VOR);
+	_G(spieler).PersonRoomNr[P_HOWARD] = 89;
+	cur_2_inventory();
+	remove_inventory(109);
+	remove_inventory(98);
+	remove_inventory(87);
+	remove_inventory(89);
+	
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room85.h b/engines/chewy/rooms/room85.h
index e837c9d0ef5..433dadefa4e 100644
--- a/engines/chewy/rooms/room85.h
+++ b/engines/chewy/rooms/room85.h
@@ -29,6 +29,8 @@ class Room85 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
+	static int proc2();
 };
 
 } // namespace Rooms


Commit: 48c0b14f8d18703b2ac0b8b71ebe345c80d3c517
    https://github.com/scummvm/scummvm/commit/48c0b14f8d18703b2ac0b8b71ebe345c80d3c517
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: Fix at_action to actually use Room85::proc2

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 80b9de66890..b2f8c140f22 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -683,7 +683,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 495:
-						action_ret = Room88::proc2();
+						action_ret = Room85::proc2();
 						break;
 
 					case 497:


Commit: 8f47ecae0f6522ade5a87fafdbb7578690a57840
    https://github.com/scummvm/scummvm/commit/8f47ecae0f6522ade5a87fafdbb7578690a57840
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: enforce the use of constant on room_e_obj.Attribut; fix a boolean parameter in room9

Changed paths:
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room9.cpp


diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index d92668c0c75..762c199e5ba 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -69,7 +69,7 @@ void Room13::entry() {
 		}
 
 		if (_G(spieler).R13Band) {
-			_G(spieler).room_e_obj[25].Attribut = 3;
+			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 			atds->set_steuer_bit(100, 1, 1);
 		}
 
@@ -79,7 +79,7 @@ void Room13::entry() {
 }
 
 void Room13::xit() {
-	_G(spieler).room_e_obj[25].Attribut = 3;
+	_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 	atds->set_steuer_bit(100, 1, 1);
 	_G(spieler).R13Band = false;
 }
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index f7a20240331..00d115c3b8d 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -157,7 +157,7 @@ int Room86::proc2() {
 	atds->set_ats_str(497, 1, ATS_DATEI);
 	atds->set_ats_str(498, 1, ATS_DATEI);
 	_G(spieler).flags32_2 = true;
-	_G(spieler).room_e_obj[132].Attribut = 2;
+	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
 	start_spz(16, 255, false, P_CHEWY);
 	start_aad_wait(468, -1);
 
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 5b4aa84543d..0536dca685f 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -83,7 +83,7 @@ void Room9::surimy() {
 	det->hide_static_spr(4);
 	room->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
-	start_spz(15, 255, 0, 0);
+	start_spz(15, 255, false, 0);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;


Commit: 40da94cf034057db2989df5329c41d0de16bcaff
    https://github.com/scummvm/scummvm/commit/40da94cf034057db2989df5329c41d0de16bcaff
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: Implement room84, check the initializations of SetUpScreenFunc

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room84.h
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7229156f598..bdb70caa6fd 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -492,7 +492,7 @@ void exit_room(int16 eib_nr) {
 		if (eib_nr == 47)
 			_G(spieler).R17Location = 1;
 		flags.NoEndPosMovObj = false;
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		load_chewy_taf(CHEWY_NORMAL);
 
 		break;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 64a9fbb4a5f..3c8fbca4f09 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -195,7 +195,7 @@ int16 Room50::use_gum() {
 		auto_move(3, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
 
 		set_person_spr(P_LEFT, P_HOWARD);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 675b398d4ce..6d10e07f6f8 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -217,7 +217,7 @@ int16 Room55::use_telefon() {
 
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
 				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
-				SetUpScreenFunc = 0;
+				SetUpScreenFunc = nullptr;
 				det->set_static_ani(18, -1);
 				start_aad_wait(334, -1);
 				start_aad_wait(335, -1);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 016ddcf17d0..3c064e49137 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -187,7 +187,7 @@ int16 Room56::use_kneipe() {
 			hide_cur();
 			action_ret = true;
 			if (!_G(spieler).R56Kneipe) {
-				SetUpScreenFunc = 0;
+				SetUpScreenFunc = nullptr;
 				auto_move(4, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				go_auto_xy(160, 58, P_HOWARD, ANI_WAIT);
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index cf6b0a53645..9fa6a7c596f 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -120,7 +120,7 @@ int16 Room57::use_pfoertner() {
 		start_aad_wait(340, -1);
 	} else if (is_cur_inventar(EINLAD_INV)) {
 		action_ret = true;
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
 		if (_G(spieler).R56AbfahrtOk) {
 			start_aad_wait(341, -1);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 308b3b953c0..587319139d9 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -103,7 +103,7 @@ int16 Room62::use_laura() {
 		hide_cur();
 		auto_move(2, P_CHEWY);
 		auto_scroll(0, 0);
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		det->del_static_ani(8);
 		det->stop_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 286c830dfa8..3213ea9af2a 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -322,7 +322,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 	else if (!_G(spieler).R67LiedOk)
 		start_aad_wait(389, -1);
 	else {
-		SetUpScreenFunc = 0;
+		SetUpScreenFunc = nullptr;
 		del_inventar(_G(spieler).AkInvent);
 		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
 		_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 9b8a265cd66..f1f921a740d 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room84.h"
 
@@ -30,19 +29,178 @@ namespace Chewy {
 namespace Rooms {
 
 void Room84::entry() {
+	_G(spieler).ScrollxStep = 2;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).flags31_4 = false;
+	_G(spieler).r84_bool18DB1C = false;
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+
+	if (_G(spieler).flags31_1) {
+		det->del_static_ani(3);
+		det->stop_detail(0);
+		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+		atds->set_steuer_bit(478, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(479, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(485, 1, ATS_DATEI);	
+	}
+
+	if (_G(spieler).flags32_10) {
+		det->start_detail(7, 255, false);
+		atds->del_steuer_bit(504, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(spieler).room_e_obj[124].Attribut = 255;
+		atds->set_ats_str(485, 2, ATS_DATEI);
+	}
+
+	if (_G(spieler).R88Val1 == 84) {
+		det->show_static_spr(7);
+		atds->del_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (_G(spieler).flags32_40) {
+		atds->set_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(485, 1, ATS_DATEI);		
+		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+	}
+
+	if (flags.LoadGame) {
+		; // Nothing. It avoids a deeper level of if, and we need the setupfunc at the end
+	} else if (_G(spieler).flags30_1 || _G(spieler).flags31_8) {
+		set_person_pos(569, 135, P_CHEWY, P_LEFT);
+		set_person_pos(489, 113, P_HOWARD, P_RIGHT);
+		set_person_pos(523, 110, P_NICHELLE, P_RIGHT);
+		_G(spieler).flags30_8 = false;
+		_G(spieler).flags31_1 = false;
+		_G(maus_links_click) = 0;
+		_G(spieler).scrollx = 319;
+		if (_G(spieler).flags32_10) {
+			set_person_pos(347, 130, P_CHEWY, P_RIGHT);
+			set_person_pos(408, 113, P_HOWARD, P_LEFT);
+			_G(spieler).scrollx = 250;
+			if (_G(spieler).flags32_40) {
+				start_aad_wait(481, -1);
+				_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+			}
+		}
+	} else if (_G(spieler).flags32_20) {
+		hide_cur();
+		set_person_pos(347, 130, P_CHEWY, P_RIGHT);
+		set_person_pos(408, 113, P_HOWARD, P_LEFT);
+		_G(spieler).scrollx = 250;
+		_G(spieler).flags32_20 = false;
+		_G(spieler).room_e_obj[124].Attribut = 255;
+		_G(spieler).room_e_obj[125].Attribut = 255;
+		atds->set_ats_str(485, 2, ATS_DATEI);
+		start_aad_wait(477, -1);
+		show_cur();
+	} else {
+		set_person_pos(263, 136, P_CHEWY, P_LEFT);
+		set_person_pos(238, 113, P_HOWARD, P_RIGHT);
+		set_person_pos(294, 110, P_NICHELLE, P_RIGHT);
+		_G(spieler).flags30_1 = false;
+		_G(spieler).scrollx = 156;
+	}
+	
+	SetUpScreenFunc = setup_func;
 }
 
 void Room84::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (eib_nr == 125) {
+		_G(spieler).R79Val1 = 1;
+		_G(spieler).R79Val2 = 1;
+		_G(spieler).R79Val3 = 1;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+	} else {
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 84)
+			_G(spieler).PersonRoomNr[P_HOWARD] = 85;
+		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 84)
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 85;
+	}
+}
+
+void Room84::setup_func() {
+	calc_person_look();
+	if (_G(spieler).flags31_4 && !_G(spieler).r84_bool18DB1C) {
+		_G(spieler).r84_bool18DB1C = true;
+		_G(spieler).flags30_80 = true;
+		hide_cur();
+		auto_move(4, P_CHEWY);
+		flags.NoScroll = true;
+		set_person_spr(0, P_CHEWY);
+		auto_scroll(150, 0);
+		det->del_static_ani(3);
+		det->set_static_ani(4, -1);
+		start_aad_wait(455, -1);
+		det->del_static_ani(4);
+		start_spz(62, 1, false, P_HOWARD);
+		start_detail_wait(5, 1, ANI_VOR);
+		det->set_static_ani(3, -1);
+		start_aad_wait(456, -1);
+		flags.NoScroll = false;
+		show_cur();
+	}
+
+	int posX = spieler_vector[P_CHEWY].Xypos[0];
+	int howDestX, nicDestX;
+	if (posX > 610) {
+		howDestX = nicDestX = 610;
+	} else if (posX < 280) {
+		howDestX = 238;
+		nicDestX = 294;
+	} else if (posX < 380) {
+		howDestX = 408;
+		nicDestX = 454;
+	} else {
+		howDestX = 489;
+		nicDestX = 523;
+	}
+
+	go_auto_xy(howDestX, 113, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
 void Room84::talk1() {
+	auto_move(4, P_CHEWY);
+	flags.NoScroll = true;
+	set_person_spr(0, P_CHEWY);
+	auto_scroll(150, 0);
+	start_ads_wait(22);
+	flags.NoScroll = false;
 }
 
 void Room84::talk2() {
+	start_aad_wait(478, -1);
 }
 
 int Room84::proc4() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(5, P_CHEWY);
+
+	if (_G(spieler).flags32_10) {
+		det->stop_detail(7);
+		start_detail_wait(8, 1, ANI_VOR);
+	} else {
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
+	}
+
+	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
+	switch_room(88);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+	show_cur();
+
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room84.h b/engines/chewy/rooms/room84.h
index 108e71373c1..4a7e001b2ab 100644
--- a/engines/chewy/rooms/room84.h
+++ b/engines/chewy/rooms/room84.h
@@ -29,6 +29,7 @@ class Room84 {
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static void talk1();
 	static void talk2();
 	static int proc4();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 9f93971b8e5..f15bfcb2306 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -485,6 +485,12 @@ struct Spieler : public SpielerFlags {
 
 	int16 R64Moni2Ani = 0;
 
+	// ---- //
+	int16 R79Val1 = 0;
+	int16 R79Val2 = 0;
+	int16 R79Val3 = 0;
+	// ---- //
+	int16 r84_bool18DB1C = false;
 	// ---- //
 	int16 R88Val1 = 0;
 	// ---- //


Commit: 9a550bf3fd1544a90e093bc968e3adb397d30ad9
    https://github.com/scummvm/scummvm/commit/9a550bf3fd1544a90e093bc968e3adb397d30ad9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:41-08:00

Commit Message:
CHEWY: Make Resharper happy about Room84

Changed paths:
    engines/chewy/rooms/room84.cpp


diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index f1f921a740d..992132f2937 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -70,7 +70,7 @@ void Room84::entry() {
 	}
 
 	if (flags.LoadGame) {
-		; // Nothing. It avoids a deeper level of if, and we need the setupfunc at the end
+		; // Nothing. It avoids a deeper level of if, and we need the SetUpScreenFunc at the end
 	} else if (_G(spieler).flags30_1 || _G(spieler).flags31_8) {
 		set_person_pos(569, 135, P_CHEWY, P_LEFT);
 		set_person_pos(489, 113, P_HOWARD, P_RIGHT);
@@ -148,7 +148,7 @@ void Room84::setup_func() {
 		show_cur();
 	}
 
-	int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
 	int howDestX, nicDestX;
 	if (posX > 610) {
 		howDestX = nicDestX = 610;


Commit: a6912052bae5c94c321088a7637f18160fbe0c5a
    https://github.com/scummvm/scummvm/commit/a6912052bae5c94c321088a7637f18160fbe0c5a
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Smallest room ever - Room 83

Changed paths:
    engines/chewy/rooms/room83.cpp


diff --git a/engines/chewy/rooms/room83.cpp b/engines/chewy/rooms/room83.cpp
index 715826a7ec4..e6e5bdc5b65 100644
--- a/engines/chewy/rooms/room83.cpp
+++ b/engines/chewy/rooms/room83.cpp
@@ -19,17 +19,15 @@
  *
  */
 
-#include "chewy/defines.h"
-#include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room83.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room83::entry() {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
 }
 
 } // namespace Rooms


Commit: 0fa633c64a7314bb3f3ce077cdbd1aea164305b3
    https://github.com/scummvm/scummvm/commit/0fa633c64a7314bb3f3ce077cdbd1aea164305b3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Implement room 82, enforce the use of constants with start_detail_wait and set_timer_status

Changed paths:
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room82.h


diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index eba0db25ade..0299b35dc79 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -130,10 +130,10 @@ void Room46::bodo() {
 	det->show_static_spr(6);
 	start_aad_wait(610, -1);
 	det->hide_static_spr(6);
-	start_detail_wait(6, 1, 0);
+	start_detail_wait(6, 1, ANI_VOR);
 	det->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(0, 1, 0);
+	start_detail_wait(0, 1, ANI_VOR);
 	flic_cut(FCUT_065, CFO_MODE);
 	out->setze_zeiger(nullptr);
 	out->cls();
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 3e04b8250d5..54bc9e657ca 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -136,7 +136,7 @@ void Room49::calc_boy() {
 
 		det->show_static_spr(9);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		start_detail_wait(8, 1, 0);
+		start_detail_wait(8, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		det->hide_static_spr(9);
 		start_detail_wait(4, 1, ANI_GO);
@@ -187,7 +187,7 @@ void Room49::use_boy_cigar() {
 	test_intro(17);
 	ERROR
 
-	room->set_timer_status(255, 0);
+	room->set_timer_status(255, TIMER_STOP);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index bcd0dcc6e37..94bc0246981 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -53,8 +53,8 @@ void Room51::entry() {
 
 	if (_G(spieler).flags32_10) {
 		atds->set_unknown(0);
-		_G(spieler).PersonHide[P_CHEWY] = 1;
-		_G(spieler).PersonHide[P_HOWARD] = 1;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = 0;
 		_G(spieler).scrollx = 0;
 		set_person_pos(34, 120, 1, 1);
@@ -148,7 +148,7 @@ void Room51::setup_func() {
 		if ((minfo.button == 1 || in->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			det->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
-			start_detail_wait(8, 1, 0);
+			start_detail_wait(8, 1, ANI_VOR);
 			_flag = false;
 			++_index;
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index e1720297ed5..760684552f2 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -22,41 +22,235 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
+
 #include "chewy/rooms/room82.h"
+#include "chewy/rooms/room66.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room82::entry() {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+
+	if (_G(spieler).flags31_1) {
+		det->show_static_spr(6);
+		atds->set_steuer_bit(473, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(467, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (_G(spieler).flags37_20)
+		det->show_static_spr(7);
+
+	if (flags.LoadGame) {
+		SetUpScreenFunc = setup_func;
+		return;
+	}
+
+	if (_G(spieler).flags30_1) {
+		set_person_pos(635, 144, P_CHEWY, P_LEFT);
+		set_person_pos(592, 115, P_HOWARD, P_RIGHT);
+		set_person_pos(543, 11, P_NICHELLE, P_RIGHT);
+		_G(spieler).flags30_1 = false;
+		_G(spieler).scrollx = 479;
+	} else if (_G(spieler).flags31_8) {
+		set_person_pos(130, 138, P_CHEWY, P_LEFT);
+		set_person_pos(104, 111, P_HOWARD, P_RIGHT);
+		set_person_pos(153, 110, P_NICHELLE, P_RIGHT);
+		_G(spieler).flags31_8 = false;
+		_G(spieler).scrollx = 0;
+	}
+
+	if (_G(spieler).flags30_8) {
+		SetUpScreenFunc = setup_func;
+		proc4();
+	}
+
+	_G(maus_links_click) = 0;
+	SetUpScreenFunc = setup_func;
 }
 
 void Room82::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (eib_nr == 122) {
+		_G(spieler).R79Val1 = 1;
+		_G(spieler).R79Val2 = 1;
+		_G(spieler).R79Val3 = 1;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+	}
+}
+
+void Room82::setup_func() {
+	calc_person_look();
+
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	int howDestX, nicDestX;
+	
+	if (posX < 200) {
+		howDestX = 104;
+		nicDestX = 150;
+	} else if (posX < 387) {
+		howDestX = 280;
+		nicDestX = 379;
+	} else {
+		howDestX = 592;
+		nicDestX = 543;
+	}
+
+	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
 void Room82::talk1() {
+	if (_G(spieler).flags30_40)
+		return;
+
+	int edi, esi; //TODO: Rename those variables when Room66 is reversed
+	if (!_G(spieler).flags30_10) {
+		edi = 446;
+		esi = 8;
+	} else if (!_G(spieler).flags30_20) {
+		edi = 454;
+		esi = 7;
+	} else {
+		edi = 449;
+		esi = 7;
+
+		_G(spieler).flags30_40 = true;
+		atds->set_ats_str(473, 1, ATS_DATEI);
+		atds->set_ats_str(467, 1, ATS_DATEI);		
+	}
+
+	Room66::proc8(2, 7, esi, edi);
 }
 
 void Room82::talk2() {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	start_aad_wait(453, -1);
+	show_cur();
 }
 
 void Room82::talk3() {
+	Room66::proc8(4, 0, 1, 452);
 }
 
 int Room82::proc3() {
-	return 0;
+	if (!is_cur_inventar(101))
+		return 0;
+
+	hide_cur();
+	auto_move(4, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	room->set_timer_status(0, TIMER_STOP);
+	det->del_static_ani(0);
+	start_detail_wait(2, 1, ANI_VOR);
+	start_detail_wait(3, 1, ANI_VOR);
+	det->set_static_ani(0, -1);
+	start_spz_wait(13, 1, false, P_CHEWY);
+
+	del_inventar(_G(spieler).AkInvent);
+	new_invent_2_cur(104);
+	show_cur();
+
+	return 1;
+}
+
+void Room82::proc4() {
+	hide_cur();
+	_G(spieler).flags30_8 = true;
+	auto_move(5, P_CHEWY);
+	flags.NoScroll = true;
+	auto_scroll(270, 0);
+	room->set_timer_status(7, TIMER_STOP);
+	det->del_static_ani(7);
+	det->set_static_ani(8, -1);
+	room->set_timer_status(4, TIMER_STOP);
+	det->del_static_ani(4);
+	det->set_static_ani(5, 3);
+	start_aad_wait(445, -1);
+	det->del_static_ani(5);
+	det->set_static_ani(4, -1);
+	room->set_timer_status(4, TIMER_START);
+	det->del_static_ani(8);
+	det->set_static_ani(7, -1);
+	room->set_timer_status(7, TIMER_START);
+	flags.NoScroll = false;
+
+	show_cur();
 }
 
 int Room82::proc6() {
-	return 0;
+	if (!is_cur_inventar(105) && !is_cur_inventar(106))
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+
+	if (_G(spieler).flags30_10) {
+		start_aad_wait(450, -1);
+		out->ausblenden(0);
+		out->set_teilpalette(pal, 255, 1);
+		atds->set_unknown(0);
+		start_aad_wait(598, -1);
+		atds->set_unknown(1);
+		det->show_static_spr(7);
+		fx_blend = BLEND3;
+		set_up_screen(DO_SETUP);
+		Room66::proc8(2, 7, 7, 451);
+		_G(spieler).flags30_20 = true;
+		_G(spieler).flags37_20 = true;
+		del_inventar(_G(spieler).AkInvent);
+		remove_inventory(105);
+		remove_inventory(106);
+	} else {
+		start_spz(16, 255, false, P_CHEWY);
+		start_aad_wait(276, -1);
+	}
+
+	show_cur();
+	return 1;
 }
 
 void Room82::proc8() {
+	hide_cur();
+	_G(spieler).flags30_10 = true;
+	start_aad_wait(447, -1);
+	auto_move(6, P_CHEWY);
+
+	while (spieler_vector[2].Count != 0)
+		set_up_screen(DO_SETUP);
+
+	_G(spieler).PersonHide[P_NICHELLE] = true;
+	det->start_detail(10, 255, false);
+	start_aad_wait(625, -1);
+	det->stop_detail(10);
+	_G(spieler).PersonHide[P_NICHELLE] = false;
+	start_aad_wait(448, -1);
+	det->del_static_ani(4);
+	start_detail_wait(6, 2, ANI_VOR);
+	det->set_static_ani(4, -1);
+	show_cur();
 }
 
 int Room82::proc9() {
-	return 0;
+	if (_G(spieler).inv_cur || !_G(spieler).flags30_40)
+		return 0;
+
+	auto_move(7, P_CHEWY);
+	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
+	switch_room(88);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room82.h b/engines/chewy/rooms/room82.h
index 96c3c3acd17..9f74437778a 100644
--- a/engines/chewy/rooms/room82.h
+++ b/engines/chewy/rooms/room82.h
@@ -29,10 +29,12 @@ class Room82 {
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static void talk1();
 	static void talk2();
 	static void talk3();
 	static int proc3();
+	static void proc4();
 	static int proc6();
 	static void proc8();
 	static int proc9();


Commit: dab2e9735f37a42047ad7f9ab01780c48dd7deeb
    https://github.com/scummvm/scummvm/commit/dab2e9735f37a42047ad7f9ab01780c48dd7deeb
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Implement room 81, fix the use of some boolean vs 0/1, use some more constants

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room2.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room7.cpp
    engines/chewy/rooms/room8.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room81.h
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room9.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 7e32e4fa574..fd387b0d0a3 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -974,7 +974,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			hide_cur();
 			if (flags.InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
-					_G(maus_links_click) = 0;
+					_G(maus_links_click) = false;
 					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
 				txt_nr = obj->iib_txt_nr(test_nr);
@@ -992,7 +992,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case INVENTAR_STATIC:
 		ret = obj->action_iib_sib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
-			_G(maus_links_click) = 0;
+			_G(maus_links_click) = false;
 			hide_cur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
@@ -1030,7 +1030,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case STATIC_USE:
 		ret = obj->calc_static_use(test_nr);
 		if (ret == OBJEKT_1) {
-			_G(maus_links_click) = 0;
+			_G(maus_links_click) = false;
 			hide_cur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 
@@ -1074,7 +1074,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				}
 			}
 		} else if (ret == SIB_GET_INV) {
-			_G(maus_links_click) = 0;
+			_G(maus_links_click) = false;
 			hide_cur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 9da921c0dd2..634720b4aab 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -160,7 +160,7 @@ void MainMenu::animate() {
 	kb_mov(1);
 	calc_maus_txt(minfo.x, minfo.y, 1);
 	cur->plot_cur();
-	_G(maus_links_click) = 0;
+	_G(maus_links_click) = false;
 	menu_flag = 0;
 	out->setze_zeiger(nullptr);
 	out->back2screen(workpage);
@@ -257,7 +257,7 @@ void MainMenu::playGame() {
 	inv_disp_ok = false;
 	_G(cur_display) = true;
 	tmp_menu_item = 0;
-	_G(maus_links_click) = 0;
+	_G(maus_links_click) = false;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 
 	flags.main_maus_flag = false;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index bdb70caa6fd..34a1a147f6f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1948,7 +1948,7 @@ void sib_event_inv(int16 sib_nr) {
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
-		start_spz(5, 255, 0, 0);
+		start_spz(5, 255, false, P_CHEWY);
 		start_aad_wait(115, 0);
 
 		if (_G(spieler).R12TransOn)
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 0686b4b6a8e..24a89211bcc 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -42,7 +42,7 @@ void Room10::entry() {
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		hide_cur();
-		start_spz(5, 255, 0, 0);
+		start_spz(5, 255, false, P_CHEWY);
 		start_aad_wait(101, 0);
 		show_cur();
 
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 2a5ca259f58..aef6824a941 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -207,7 +207,7 @@ int16 Room12::use_terminal() {
 			start_aad_wait(110, -1);
 
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
-				start_spz(4, 255, 0, 0);
+				start_spz(4, 255, false, P_CHEWY);
 				start_aad_wait(112, -1);
 				flags.NoScroll = true;
 				auto_scroll(46, 0);
@@ -223,7 +223,7 @@ int16 Room12::use_terminal() {
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
 				auto_move(4, P_CHEWY);
-				start_spz(68, 255, 0, 0);
+				start_spz(68, 255, false, P_CHEWY);
 				start_aad_wait(113, 0);
 
 			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 762c199e5ba..2281b18eec1 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -50,7 +50,7 @@ void Room13::entry() {
 		flic_cut(FCUT_013, CFO_MODE);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
-		start_spz(16, 255, 0, 0);
+		start_spz(16, 255, false, P_CHEWY);
 		start_aad_wait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
@@ -128,7 +128,7 @@ void Room13::talk_bork() {
 		flags.NoScroll = true;
 		auto_scroll(41, 0);
 
-		start_spz(68, 255, 0, 0);
+		start_spz(68, 255, false, P_CHEWY);
 		start_aad_wait(248, -1);
 		flic_cut(FCUT_014, CFO_MODE);
 		load_chewy_taf(CHEWY_NORMAL);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 859db9ab5f5..06cf3054e18 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -150,7 +150,7 @@ int16 Room17::use_seil() {
 				plot_seil();
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				flags.AutoAniPlay = false;
-				start_spz(5, 255, 0, 0);
+				start_spz(5, 255, false, P_CHEWY);
 				start_aad_wait(119, -1);
 
 				show_cur();
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
index ba24c199c6b..5edbdc6e65e 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room2.cpp
@@ -74,7 +74,7 @@ void Room2::electrifyWalkway1() {
 }
 
 void Room2::electrifyWalkway2() {
-	start_spz(CH_TALK12, 255, 0, P_CHEWY);
+	start_spz(CH_TALK12, 255, false, P_CHEWY);
 	start_aad_wait(47, -1);
 }
 
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 0ede825b11c..ea10af9b336 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -88,7 +88,7 @@ void Room25::entry() {
 
 	} else if (_G(spieler).R25GleiterExit) {
 		if (!flags.LoadGame) {
-			set_person_pos(127, 122, 0, 0);
+			set_person_pos(127, 122, P_CHEWY, P_LEFT);
 
 			if (!_G(spieler).R25SurimyGo) {
 				_G(spieler).R25SurimyGo = 1;
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 8079dab6ac3..339b91b9860 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -141,7 +141,7 @@ void Room3::terminal() {
 
 	case 1:
 		_G(auto_obj) = 1;
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		minfo.button = 0;
 		stop_person(P_CHEWY);
 		start_aad_wait(51, -1);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 2f978f206d6..0d11d0c2bd6 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -195,7 +195,7 @@ int16 Room31::use_topf() {
 void Room31::close_luke() {
 	if (!_G(spieler).R31KlappeZu) {
 		hide_cur();
-		auto_move(2, 0);
+		auto_move(2, P_CHEWY);
 		start_spz_wait(13, 1, 0, 0);
 		_G(spieler).R31KlappeZu = true;
 		det->play_sound(3, 0);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 944389cf743..496741484b7 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -328,7 +328,7 @@ void Room39::look_tv(int16 cls_mode) {
 			}
 		}
 
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		flags.AutoAniPlay = false;
 	}
 }
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index c49904e687b..b8e97f46e93 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -64,7 +64,7 @@ void Room41::entry() {
 	}
 
 	if (!flags.LoadGame)
-		set_person_pos(241, 113, 1, 1);
+		set_person_pos(241, 113, P_HOWARD, P_RIGHT);
 
 	SetUpScreenFunc = setup_func;
 	show_cur();
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 0299b35dc79..2dc63021ea2 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -46,20 +46,20 @@ void Room46::entry(int16 eib_nr) {
 		SetUpScreenFunc = setup_func;
 
 		if (_G(spieler).flags33_8) {
-			_G(maus_links_click) = 0;
+			_G(maus_links_click) = false;
 			hide_cur();
-			set_person_pos(175, 73, 1, 0);
-			set_person_pos(147, 109, 0, 0);
+			set_person_pos(175, 73, P_HOWARD, P_LEFT);
+			set_person_pos(147, 109, P_CHEWY, P_LEFT);
 			_G(spieler).flags33_8 = false;
 			_G(spieler).SVal1 = 46;
 			wait_show_screen(10);
 
-			start_spz_wait(64, 1, 0, 0);
-			start_spz(65, 255, 0, 0);
+			start_spz_wait(64, 1, false, P_CHEWY);
+			start_spz(65, 255, false, P_CHEWY);
 			start_aad_wait(494, -1);
 			_G(spieler).SVal2 = 504;
 			switch_room(92);
-			start_spz(65, 255, 0, 0);
+			start_spz(65, 255, false, P_CHEWY);
 			start_aad_wait(495, -1);
 			_G(spieler).room_e_obj[78].Exit = 90;
 			show_cur();
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 3c8fbca4f09..2900d5d33c1 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -43,7 +43,7 @@ void Room50::entry(int16 eib_nr) {
 	if (_G(spieler).flags32_10) {
 		hide_cur();
 		stop_page();
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		set_person_pos(0, 64, 0, 1);
 		set_person_pos(92, 123, 0, 0);
 		start_aad_wait(510, -1);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 94bc0246981..30138804c35 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -55,10 +55,10 @@ void Room51::entry() {
 		atds->set_unknown(0);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 0;
-		set_person_pos(34, 120, 1, 1);
-		set_person_pos(234, 69, 0, 0);
+		set_person_pos(34, 120, P_HOWARD, P_HOWARD);
+		set_person_pos(234, 69, P_CHEWY, P_LEFT);
 		SetUpScreenFunc = setup_func;
 		det->show_static_spr(17);
 		hide_cur();
@@ -287,7 +287,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			out->cls();
 			flags.NoPalAfterFlc = true;
 			flic_cut(114, 0);
-			set_person_pos(115, 114, 0, 0);
+			set_person_pos(115, 114, P_CHEWY, P_LEFT);
 			fx_blend = BLEND3;
 			set_up_screen(NO_SETUP);
 			start_aad_wait(564, -1);
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index 92d2c249e52..f78f63340b9 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -109,7 +109,7 @@ void Room7::klingel() {
 		det->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
-		set_person_pos(114, 138, 0, -1);
+		set_person_pos(114, 138, P_CHEWY, -1);
 
 		start_detail_frame(19, 1, ANI_VOR, 6);
 		start_detail_frame(9, 1, ANI_VOR, 4);
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index 0d8bd9f0ea0..2ac24f520ca 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -115,7 +115,7 @@ bool Room8::gips_wurf() {
 		hide_cur();
 		det->load_taf_seq(116, 30, 0);
 		auto_move(2, P_CHEWY);
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index c17cae13b1e..4db69eecbae 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -22,24 +22,132 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room81.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room81::entry() {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(zoom_horizont) = 140;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	_G(spieler).DiaAMov = 0;
+	if (_G(spieler).R88Val1 == 84) {
+		det->show_static_spr(0);
+		atds->del_steuer_bit(488, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	proc3();
+
+	if (flags.LoadGame || !_G(spieler).flags30_1)
+		return;
+
+	set_person_pos(155, 146, P_CHEWY, P_LEFT);
+	set_person_pos(103, 115, P_HOWARD, P_RIGHT);
+	set_person_pos(62, 112, P_NICHELLE, P_RIGHT);
+	_G(spieler).flags30_1 = false;
+	_G(maus_links_click) = false;
+	_G(spieler).scrollx = 0;
 }
 
 void Room81::xit(int16 eib_nr) {
+	_G(spieler).R79Val1 = 1;
+	_G(spieler).R79Val2 = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+	_G(spieler).R79Val3 = 1;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
 }
 
 void Room81::proc1() {
+	int diaNr = -1;
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	if (!_G(spieler).flags30_2)
+		diaNr = 458;
+	else if (_G(spieler).flags30_4)
+		diaNr = 460;
+	else {
+		spieler_mi[P_CHEWY].Mode = true;
+		go_auto_xy(222, 97, P_CHEWY, ANI_VOR);
+		go_auto_xy(100, 96, P_CHEWY, ANI_VOR);
+		go_auto_xy(171, 93, P_CHEWY, ANI_VOR);
+		go_auto_xy(143, 62, P_CHEWY, ANI_VOR);
+		go_auto_xy(112, 60, P_CHEWY, ANI_VOR);
+		start_aad_wait(461, -1);
+		go_auto_xy(143, 62, P_CHEWY, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(0, 1, ANI_VOR);
+		det->start_detail(1, 255, false);
+		start_aad_wait(459, -1);
+		det->stop_detail(1);
+		start_detail_wait(0, 1, ANI_GO);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		go_auto_xy(171, 93, P_CHEWY, ANI_VOR);
+		go_auto_xy(100, 96, P_CHEWY, ANI_VOR);
+		go_auto_xy(222, 97, P_CHEWY, ANI_VOR);
+		auto_move(1, P_CHEWY);
+		spieler_mi[P_CHEWY].Mode = false;
+		invent_2_slot(109);
+		_G(spieler).flags30_2 = true;
+		_G(spieler).flags31_4 = true;
+	}
+	
+	if (diaNr != -1) {
+		start_spz(16, 255, false, P_CHEWY);
+		start_aad_wait(diaNr, -1);
+	}
+
+	show_cur();
 }
 
 int Room81::proc2() {
-	return 0;
+	int retVal = 0;
+	int diaNr = -1;
+	int aniId = -1;
+
+	hide_cur();
+	if (is_cur_inventar(110)) {
+		auto_move(1, P_CHEWY);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		aniId = 5;
+		diaNr = 462;
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).flags30_2 = true;
+	} else if (is_cur_inventar(104)) {
+		aniId = 4;
+		diaNr = 463;
+	} else if (is_cur_inventar(102)) {
+		aniId = 4;
+		diaNr = 464;
+	}
+
+	if (diaNr != -1) {
+		retVal = 1;
+		start_spz(aniId, 255, false, P_CHEWY);
+		start_aad_wait(diaNr, -1);
+		proc3();
+	}
+
+	show_cur();
+	return retVal;
+}
+
+void Room81::proc3() {
+	if (!_G(spieler).flags30_2) {
+		det->start_detail(2, 255, false);
+		return;
+	}
+
+	for (int i = 0; i < 3; ++i)
+		det->start_detail(3 + i, 255, false);
+
+	det->stop_detail(2);
+	atds->del_steuer_bit(486, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_steuer_bit(490, ATS_AKTIV_BIT, ATS_DATEI);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room81.h b/engines/chewy/rooms/room81.h
index 3bf901bb7f7..f63e3c7c074 100644
--- a/engines/chewy/rooms/room81.h
+++ b/engines/chewy/rooms/room81.h
@@ -31,6 +31,7 @@ public:
 	static void xit(int16 eib_nr);
 	static void proc1();
 	static int proc2();
+	static void proc3();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 760684552f2..c0e3220a21d 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -70,7 +70,7 @@ void Room82::entry() {
 		proc4();
 	}
 
-	_G(maus_links_click) = 0;
+	_G(maus_links_click) = false;
 	SetUpScreenFunc = setup_func;
 }
 
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 992132f2937..2501b3b1312 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -77,7 +77,7 @@ void Room84::entry() {
 		set_person_pos(523, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_8 = false;
 		_G(spieler).flags31_1 = false;
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 319;
 		if (_G(spieler).flags32_10) {
 			set_person_pos(347, 130, P_CHEWY, P_RIGHT);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index f6020628e3a..b028f488863 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -61,7 +61,7 @@ void Room85::entry(int16 eib_nr) {
 		set_person_pos(296, 142, P_HOWARD, P_RIGHT);
 		set_person_pos(322, 142, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
-		_G(maus_links_click) = 0;
+		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 78;
 		if (_G(spieler).flags32_40) {
 			atds->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 0536dca685f..91833b74dd5 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -83,7 +83,7 @@ void Room9::surimy() {
 	det->hide_static_spr(4);
 	room->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
-	start_spz(15, 255, false, 0);
+	start_spz(15, 255, false, P_CHEWY);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 68560717e17..d6a425883f3 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -323,7 +323,7 @@ int Room90::proc6() {
 	hide_cur();
 	cur_2_inventory();
 	auto_move(6, P_CHEWY);
-	_G(maus_links_click) = 0;
+	_G(maus_links_click) = false;
 	out->setze_zeiger(nullptr);
 	out->cls();
 	flic_cut(109, CFO_MODE);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 8874afc5fec..7b425502def 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -435,7 +435,7 @@ int Room97::proc7() {
 	atds->set_ats_str(530, 2, ATS_DATEI);
 	new_invent_2_cur(SLIME_INV);
 	_G(spieler).flags36_4 = true;
-	set_person_pos(304, 102, 0, P_RIGHT);
+	set_person_pos(304, 102, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	auto_move(1, P_CHEWY);
 	spieler_mi[P_CHEWY].Mode = false;
@@ -600,11 +600,11 @@ void Room97::proc12() {
 	stop_person(P_CHEWY);
 	det->show_static_spr(26);
 	go_auto_xy(481, 39, P_CHEWY, ANI_VOR);
-	_G(spieler).PersonHide[0] = true;
+	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(327, 42, P_CHEWY, P_LEFT);
 	wait_show_screen(50);
 	set_person_pos(347, 42, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[0] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
 	det->hide_static_spr(26);
 	spieler_mi[P_CHEWY].Mode = false;
 	show_cur();
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b2f8c140f22..34798c8a145 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -160,7 +160,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							flc->set_custom_user_function(Room6::cut_serv1);
 							flic_cut(FCUT_005, CFO_MODE);
 							flc->remove_custom_user_function();
-							start_spz(4, -1, 0, 0);
+							start_spz(4, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
 							show_cur();
 						} else {


Commit: 1f8750903702b614386560ef6832dfb6332aaa54
    https://github.com/scummvm/scummvm/commit/1f8750903702b614386560ef6832dfb6332aaa54
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Fix logic bug in room 50

Changed paths:
    engines/chewy/rooms/room50.cpp


diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 2900d5d33c1..6ad57b8e6db 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room50.h"
 
@@ -44,8 +43,8 @@ void Room50::entry(int16 eib_nr) {
 		hide_cur();
 		stop_page();
 		_G(maus_links_click) = false;
-		set_person_pos(0, 64, 0, 1);
-		set_person_pos(92, 123, 0, 0);
+		set_person_pos(0, 64, P_HOWARD, P_RIGHT);
+		set_person_pos(92, 123, P_CHEWY, P_LEFT);
 		start_aad_wait(510, -1);
 		out->setze_zeiger(nullptr);
 		out->cls();


Commit: 4972ef9795170634c26f7ed62f4d8954d4523bab
    https://github.com/scummvm/scummvm/commit/4972ef9795170634c26f7ed62f4d8954d4523bab
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Implement Room 80

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room80.h
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index fd387b0d0a3..602e47c1093 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -298,7 +298,7 @@ void test_menu() {
 	menu_lauflicht = 0;
 	inv_disp_ok = false;
 	_G(spieler).inv_cur = false;
-	menu_display = false;
+	menu_display = 0;
 	_G(cur_display) = true;
 	cur->show_cur();
 	spieler_vector[P_CHEWY].Phase = 6;
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 734a7ba6cc4..70c19a0d4e5 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -30,6 +30,113 @@ namespace Chewy {
 namespace Rooms {
 
 void Room80::entry() {
+	_G(maus_links_click) = false;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	det->enable_sound(0, 0);
+	det->enable_sound(0, 1);
+	det->enable_sound(0, 2);
+	det->play_sound(0, 0);
+	det->play_sound(0, 1);
+	det->play_sound(0, 2);
+
+	if (_G(spieler).flags31_2) {
+		atds->del_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		atds->set_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (_G(spieler).flags32_1) {
+		_G(spieler).scrollx = 39;
+		return;
+	}
+
+	set_person_pos(37, 10, P_CHEWY, P_RIGHT);
+	set_person_pos(22, -1, P_HOWARD, P_RIGHT);
+	set_person_pos(6, 2, P_NICHELLE, P_RIGHT);
+	_G(spieler).scrollx = 10;
+	flags.NoScroll = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 40;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 24;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 40;
+	_G(zoom_horizont) = 0;
+
+	if (_G(spieler).R88Val1 == 84)
+		det->show_static_spr(3);
+	else
+		det->show_static_spr(4);
+
+	SetUpScreenFunc = setup_func;
+}
+
+void Room80::setup_func() {
+	for (int i = 0; i < 3; ++i)
+		det->hide_static_spr(i);
+
+	if (_G(spieler).flags32_1 || !flags.ShowAtsInvTxt || menu_display)
+		return;
+
+	if (menu_item != CUR_USE)
+		menu_item = CUR_USE;
+
+	cur_2_inventory();
+	cursor_wahl(CUR_ZEIGE);
+	int vec = det->maus_vector(_G(spieler).scrollx + minfo.x, minfo.y);
+	if (vec == -1)
+		return;
+
+	if (vec != 0 && vec != 2) {
+		if (vec != 1 || !_G(spieler).flags31_2)
+			return;
+	}
+
+	det->show_static_spr(vec);
+	if (!_G(maus_links_click))
+		return;
+
+	int nextRoom;
+	switch (vec) {
+	case 0:
+		nextRoom = 82;
+		break;
+	case 1:
+		if (_G(spieler).flags31_1)
+			nextRoom = 85;
+		else
+			nextRoom = 84;
+		break;
+	case 2:
+		nextRoom = 82;
+		break;
+	default:
+		nextRoom = -1;
+		break;
+	}
+
+	if (nextRoom == -1)
+		return;
+
+	SetUpScreenFunc = nullptr;
+	det->hide_static_spr(vec);
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+	_G(spieler).flags30_1 = true;
+	_G(maus_links_click) = false;
+	set_up_screen(DO_SETUP);
+	
+	for (int i = P_CHEWY; i <= P_NICHELLE; ++i) {
+		if (_G(spieler).R79Val[i] != 0) {
+			_G(spieler).PersonHide[i] = false;
+			_G(spieler).R79Val[i] = 0;
+		}
+	}
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 80)
+		_G(spieler).PersonRoomNr[P_HOWARD] = nextRoom;
+
+	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 80)
+		_G(spieler).PersonRoomNr[P_NICHELLE] = nextRoom;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room80.h b/engines/chewy/rooms/room80.h
index 527d2d32f77..95457070549 100644
--- a/engines/chewy/rooms/room80.h
+++ b/engines/chewy/rooms/room80.h
@@ -28,6 +28,7 @@ namespace Rooms {
 class Room80 {
 public:
 	static void entry();
+	static void setup_func();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 4db69eecbae..b04b992510d 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -55,10 +55,10 @@ void Room81::entry() {
 }
 
 void Room81::xit(int16 eib_nr) {
-	_G(spieler).R79Val1 = 1;
-	_G(spieler).R79Val2 = 1;
+	_G(spieler).R79Val[P_CHEWY] = 1;
+	_G(spieler).R79Val[P_HOWARD] = 1;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 80;
-	_G(spieler).R79Val3 = 1;
+	_G(spieler).R79Val[P_NICHELLE] = 1;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
 }
 
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 2501b3b1312..57432514a9b 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -113,9 +113,9 @@ void Room84::entry() {
 void Room84::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	if (eib_nr == 125) {
-		_G(spieler).R79Val1 = 1;
-		_G(spieler).R79Val2 = 1;
-		_G(spieler).R79Val3 = 1;
+		_G(spieler).R79Val[P_CHEWY] = 1;
+		_G(spieler).R79Val[P_HOWARD] = 1;
+		_G(spieler).R79Val[P_NICHELLE] = 1;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
 	} else {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index f15bfcb2306..23e0cfc812f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -486,9 +486,7 @@ struct Spieler : public SpielerFlags {
 	int16 R64Moni2Ani = 0;
 
 	// ---- //
-	int16 R79Val1 = 0;
-	int16 R79Val2 = 0;
-	int16 R79Val3 = 0;
+	int16 R79Val[3] = {0, 0, 0};
 	// ---- //
 	int16 r84_bool18DB1C = false;
 	// ---- //


Commit: 230f755cb23720737805768acf3afbc2e500d6d7
    https://github.com/scummvm/scummvm/commit/230f755cb23720737805768acf3afbc2e500d6d7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Compilation fix

Changed paths:
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index c0e3220a21d..8b01fbd42c4 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -78,9 +78,9 @@ void Room82::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (eib_nr == 122) {
-		_G(spieler).R79Val1 = 1;
-		_G(spieler).R79Val2 = 1;
-		_G(spieler).R79Val3 = 1;
+		_G(spieler).R79Val[0] = 1;
+		_G(spieler).R79Val[1] = 1;
+		_G(spieler).R79Val[2] = 1;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
 	}


Commit: 950da68adff39cd58a0bb53a60022888abdd0a0a
    https://github.com/scummvm/scummvm/commit/950da68adff39cd58a0bb53a60022888abdd0a0a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:42-08:00

Commit Message:
CHEWY: Fix invalid memory writes identified by Valgrind

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/detail.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 1016cc7e314..237cf112c0f 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -1580,7 +1580,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 					f.seek(next, SEEK_SET);
 					if (iheader.load(&f)) {
 						next = iheader.next;
-						svekt[sprcount] = ((uint32)iheader.width) * ((uint32)iheader.width);
+						svekt[sprcount] = (uint32)iheader.width * (uint32)iheader.height;
 					} else {
 						fcode = READFEHLER;
 						modul = DATEI;
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 488ccd40c5b..c4089dd4a55 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -808,10 +808,11 @@ void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 }
 
 void detail::stop_detail(int16 nr) {
-	ani_detail_info *adiptr;
-	adiptr = &rdi.Ainfo[nr];
-	adiptr->start_flag = 0;
-
+	if (nr >= 0 && nr < 32) {
+		ani_detail_info *adiptr;
+		adiptr = &rdi.Ainfo[nr];
+		adiptr->start_flag = 0;
+	}
 }
 
 void detail::set_ani_delay(int16 nr, int16 del) {


Commit: 3aa70299361ecab04d3811c538e9daef446a5ba4
    https://github.com/scummvm/scummvm/commit/3aa70299361ecab04d3811c538e9daef446a5ba4
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Fix some Resharper and CppCheck warnings

Changed paths:
    engines/chewy/effect.cpp
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room1.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room7.cpp
    engines/chewy/rooms/room8.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room9.cpp


diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 51d878f63fb..9706556b8a7 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -21,7 +21,6 @@
 
 #include "chewy/ngshext.h"
 #include "chewy/effect.h"
-#include "chewy/defines.h"
 #include "chewy/global.h"
 
 namespace Chewy {
@@ -31,17 +30,14 @@ effect::effect() {
 effect::~effect() {
 }
 
-void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
-		byte *screen, byte *palette, int16 col, int16 skip_line) {
-	int16 *rnd_zeiger;
-	int16 i, x, y;
-	byte *sp;
-	sp = (byte *)MALLOC(8 * 8 + 4);
+void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
+	byte *sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!modul) {
-		rnd_zeiger = (int16 *)rnd_speicher;
+		int16 *rnd_zeiger = (int16 *)rnd_speicher;
 		if (col < 256) {
-			for (i = 0; i < 1002; i++) {
-				y = (rnd_zeiger[i] / 40) * 8;
+			for (int16 i = 0; i < 1002; i++) {
+				int16 x;
+				int16 y = (rnd_zeiger[i] / 40) * 8;
 				if (rnd_zeiger[i] > 39)
 					x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 				else
@@ -51,8 +47,9 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 			}
 			out->set_palette(palette);
 		}
-		for (i = 0; i < 1000; i++) {
-			y = (rnd_zeiger[i] / 40) * 8;
+		for (int16 i = 0; i < 1000; i++) {
+			int16 x;
+			int16 y = (rnd_zeiger[i] / 40) * 8;
 			if (rnd_zeiger[i] > 39)
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
@@ -67,33 +64,29 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher,
 	}
 }
 
-void effect::blende1(byte *sram_speicher, byte *screen,
-		byte *palette, int16 frames, uint8 mode, int16 col) {
-
-	int16 i;
-	int16 x, y, x1, y1;
-	byte *sp;
-	sp = (byte *)MALLOC(8 * 8 + 4);
+void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
+	byte *sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!modul) {
-		i = 0;
+		int16 i = 0;
 		if (col < 256) {
 			for (i = 0; i < 13; i++) {
+				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++)
 					out->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
 				for (y = i; y < 24 - i; y++)
 					out->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
 				for (x1 = 39 - i; x1 > i; x1--)
 					out->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
-				for (y1 = 24 - i; y1 >= i; y1--)
+				for (int16 y1 = 24 - i; y1 >= i; y1--)
 					out->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
 				out->skip_line(frames);
 			}
 			out->set_palette(palette);
 		}
-		switch ((int16)mode) {
-
+		switch (mode) {
 		case 0:
 			for (i = 13; i >= 0; i--) {
+				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
 					out->setze_zeiger(sram_speicher);
 					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
@@ -112,7 +105,7 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 					out->setze_zeiger(screen);
 					out->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
-				for (y1 = 24 - i; y1 > i; y1--) {
+				for (int16 y1 = 24 - i; y1 > i; y1--) {
 					out->setze_zeiger(sram_speicher);
 					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
 					out->setze_zeiger(screen);
@@ -124,6 +117,7 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 
 		case 1:
 			for (i = 0; i < 13; i++) {
+				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
 					out->setze_zeiger(sram_speicher);
 					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
@@ -142,7 +136,7 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 					out->setze_zeiger(screen);
 					out->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
-				for (y1 = 24 - i; y1 > i; y1--) {
+				for (int16 y1 = 24 - i; y1 > i; y1--) {
 					out->setze_zeiger(sram_speicher);
 					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
 					out->setze_zeiger(screen);
@@ -152,6 +146,8 @@ void effect::blende1(byte *sram_speicher, byte *screen,
 			}
 			break;
 
+		default:
+			break;
 		}
 		free(sp);
 	}
@@ -178,10 +174,8 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 }
 
 void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
-	int i, y;
-
 	if (mode) {
-		for (i = 0, y = 0; i < 20; ++i, y += 8) {
+		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
 			out->setze_zeiger(workpage_ + 4);
 			out->box_fill(0, 92 - y, 320, 92 - y + 8, col);
 			out->box_fill(0, 100 + y, 320, 108 + y, col);
@@ -189,7 +183,7 @@ void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
 			out->skip_line(lines);
 		}
 	} else {
-		for (i = 0; i < 20; ++i) {
+		for (int i = 0; i < 20; ++i) {
 			out->setze_zeiger(workpage_ + 4);
 			out->box_fill(0, i, 320, i + 8, col);
 			out->box_fill(0, 192 - i, 320, 200 - i, col);
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 2db8db25e39..5a62c1a4dff 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -216,7 +216,7 @@ void flic::decode_frame() {
 			case CLS:
 				out->setze_zeiger(virt_screen);
 				out->cls();
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 
 				update_flag = true;
 				break;
@@ -241,7 +241,7 @@ void flic::decode_frame() {
 			if (flic_user) {
 				out->setze_zeiger(virt_screen);
 				flic_user(CurrentFrame);
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 			}
 			out->back2screen(virt_screen - 4);
 			if (fade_flag != false) {
@@ -740,7 +740,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 		case CLEAR_SCREEN:
 			out->setze_zeiger(virt_screen);
 			out->cls();
-			out->setze_zeiger(0);
+			out->setze_zeiger(nullptr);
 			out->cls();
 			break;
 
@@ -792,7 +792,7 @@ void flic::decode_cframe() {
 			case CLS:
 				out->setze_zeiger(virt_screen);
 				out->cls();
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 
 				update_flag = true;
 				break;
@@ -822,7 +822,7 @@ void flic::decode_cframe() {
 				out->back2back(virt_screen, load_puffer);
 				out->setze_zeiger(virt_screen);
 				custom_user(CurrentFrame);
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 				out->back2screen(virt_screen - 4);
 				out->back2back(load_puffer, virt_screen);
 			} else
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index f5e567d587b..2863d8279b6 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -116,7 +116,6 @@ void standard_init() {
 }
 
 void var_init() {
-	int16 i;
 	Rdi = det->get_room_detail_info();
 	Sdi = &Rdi->Sinfo[0];
 	Adi = &Rdi->Ainfo[0];
@@ -157,7 +156,7 @@ void var_init() {
 
 	spieler_mi[P_NICHELLE].Mode = true;
 
-	for (i = 0; i < MAX_PERSON; i++) {
+	for (int16 i = 0; i < MAX_PERSON; i++) {
 		PersonAni[i] = -1;
 		PersonTaf[i] = 0;
 		spieler_mi[i].Mode = false;
@@ -203,8 +202,6 @@ void init_room() {
 }
 
 void init_atds() {
-	int16 i;
-
 	// Close any prior handles
 	atds->close_handle(AAD_DATEI);
 	atds->close_handle(ATS_DATEI);
@@ -246,25 +243,22 @@ void init_atds() {
 	_G(spieler).DelaySpeed = 5;
 	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
 	atds->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
-	for (i = 0; i < AAD_MAX_PERSON; i++)
+	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
 		atds->set_split_win(i, &ssi[i]);
 	atds->set_string_end_func(&atds_string_start);
 	ERROR
 }
 
 void new_game() {
-	int16 i;
-	byte *tmp;
-
 	_G(spieler).clear();
 
-	for (i = 0; i < MAX_MOV_OBJ; i++) {
+	for (int16 i = 0; i < MAX_MOV_OBJ; i++) {
 		_G(spieler).room_m_obj[i].RoomNr = -1;
 		_G(spieler).InventSlot[i] = -1;
 	}
-	for (i = 0; i < MAX_FEST_OBJ; i++)
+	for (int16 i = 0; i < MAX_FEST_OBJ; i++)
 		_G(spieler).room_s_obj[i].RoomNr = -1;
-	for (i = 0; i < MAX_EXIT; i++)
+	for (int16 i = 0; i < MAX_EXIT; i++)
 		_G(spieler).room_e_obj[i].RoomNr = -1;
 
 	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
@@ -274,7 +268,7 @@ void new_game() {
 	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 	ERROR
 
-	tmp = (byte *)MALLOC(ROOM_ATS_MAX);
+	byte *tmp = (byte *)MALLOC(ROOM_ATS_MAX);
 	ERROR
 
 	Common::File f;
@@ -291,7 +285,7 @@ void new_game() {
 	}
 	ERROR
 
-	for (i = 0; i < ROOM_ATS_MAX; i++)
+	for (int16 i = 0; i < ROOM_ATS_MAX; i++)
 		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
@@ -311,12 +305,12 @@ void new_game() {
 	}
 	ERROR
 
-	for (i = 0; i < MAX_MOV_OBJ; i++)
+	for (int16 i = 0; i < MAX_MOV_OBJ; i++)
 		_G(spieler).InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
 	obj->sort();
-	for (i = 0; i < obj->spieler_invnr[0]; i++)
+	for (int16 i = 0; i < obj->spieler_invnr[0]; i++)
 		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
 
 	AkChewyTaf = 0;
@@ -359,7 +353,7 @@ void init_load() {
 	ERROR
 
 	spz_akt_id = -1;
-	spz_tinfo = 0;
+	spz_tinfo = nullptr;
 	set_spz_delay(3);
 
 	menutaf = mem->taf_adr(MENUTAF);
@@ -376,10 +370,9 @@ void init_load() {
 }
 
 void get_detect(char *fname_) {
-	Stream *handle;
 	modul = 0;
 	fcode = 0;
-	handle = chewy_fopen(fname_, "rb");
+	Stream *handle = chewy_fopen(fname_, "rb");
 	if (handle) {
 		if (!chewy_fread(&detect, sizeof(DetectInfo), 1, handle)) {
 			modul = DATEI;
@@ -471,8 +464,8 @@ void sound_init() {
 		_G(spieler).SoundVol = 63;
 		ailsnd->set_music_mastervol(_G(spieler).MusicVol);
 		ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
-		ailsnd->switch_music(1);
-		ailsnd->switch_sound(1);
+		ailsnd->switch_music(true);
+		ailsnd->switch_sound(true);
 		flags.InitSound = true;
 
 		room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 602e47c1093..4b61bbc652f 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -706,7 +706,7 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(maus_links_click) = false;
 	menu_flag = false;
 	if (mode == DO_SETUP) {
-		out->setze_zeiger(0);
+		out->setze_zeiger(nullptr);
 		switch (fx_blend) {
 		case BLEND1:
 			fx->blende1(workptr, screen0, pal, 150, 0, 0);
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 2f549cae628..f897dc1cc68 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -147,10 +147,9 @@ void mem2mcga(const byte *ptr) {
 
 void mem2mcga_masked(const byte *ptr, int16 maske) {
 	byte *destP = SCREEN;
-	byte pixel;
 
 	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr, ++destP) {
-		pixel = *ptr;
+		byte pixel = *ptr;
 		if (pixel != maske)
 			*destP = pixel;
 	}
@@ -169,17 +168,15 @@ void mem2mem(const byte *ptr1, byte *ptr2) {
 }
 
 void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
-	byte pixel;
-
 	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr1, ++ptr2) {
-		pixel = *ptr1;
+		byte pixel = *ptr1;
 		if (pixel != maske)
 			*ptr2 = pixel;
 	}
 }
 
 void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
-	int width = *((const int16 *)sptr);
+	const int width = *((const int16 *)sptr);
 	sptr += y * width + x;
 	byte *destP = SCREEN;
 
@@ -189,15 +186,14 @@ void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
 	}
 }
 
-void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
-		int16 height, int16 scrWidth) {
-	int pitch;
-	byte *scrP;
+void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width, int16 height, int16 scrWidth) {
 	*((int16 *)sptr) = width;
 	sptr += 2;
 	*((int16 *)sptr) = height;
 	sptr += 2;
 
+	int pitch;
+	byte *scrP;
 	if (scrWidth == 0) {
 		scrP = SCREEN + y * SCREEN_WIDTH + x;
 		pitch = SCREEN_WIDTH;
@@ -215,14 +211,14 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
 }
 
 void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth) {
-	int pitch;
-	byte *scrP;
-	int width = *((const int16 *)sptr);
+	const int width = *((const int16 *)sptr);
 	sptr += 2;
-	int height = *((const int16 *)sptr);
+	const int height = *((const int16 *)sptr);
 	sptr += 2;
 
 	if (width >= 1 && height >= 1) {
+		int pitch;
+		byte *scrP;
 		if (scrWidth == 0) {
 			scrP = SCREEN + y * SCREEN_WIDTH + x;
 			pitch = SCREEN_WIDTH;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index c4230751ed8..3b4cf612e8c 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -445,7 +445,7 @@ void invent_menu() {
 			}
 			if (menu_flag1 == false)
 				cur->plot_cur();
-			out->setze_zeiger(0);
+			out->setze_zeiger(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
 				fx->blende1(workptr, screen0, 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 34a1a147f6f..9d8ee811ff1 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -927,7 +927,7 @@ void flic_cut(int16 nr, int16 mode) {
 	static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
-	out->setze_zeiger(0);
+	out->setze_zeiger(nullptr);
 	det->disable_room_sound();
 	ailsnd->end_sound();
 	g_events->delay(50);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index c4676b25f6b..ba57b20cc95 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -34,24 +34,21 @@ const int16 SURIMY_TAF19_PHASEN[4][2] = {
 };
 
 Room::Room() {
-	int16 i;
 	room_timer.TimerAnz = 0;
 	room_timer.TimerStart = 0;
 	init_ablage();
-	for (i = 0; i < MAX_ROOM_HANDLE; i++)
+	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
 		roomhandle[i] = 0;
 }
 Room::~Room() {
-	int16 i;
-	for (i = 0; i < MAX_ROOM_HANDLE; i++)
+	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
 		if (roomhandle[i])
 			chewy_fclose(roomhandle[i]);
 	free_ablage();
 }
 
 Stream *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
-	Stream *stream;
-	stream = chewy_fopen(fname1, fmode);
+	Stream *stream = chewy_fopen(fname1, fmode);
 	if (stream) {
 		close_handle(mode);
 		roomhandle[mode] = stream;
@@ -70,8 +67,6 @@ void Room::close_handle(int16 mode) {
 }
 
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
-	char tmp_str[MAXPATH];
-	room_detail_info *Rdi_;
 	modul = 0;
 	fcode = 0;
 
@@ -83,9 +78,10 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	if (player->SoundSwitch == false)
 		det->disable_room_sound();
 	if (!modul) {
-		Rdi_ = det->get_room_detail_info();
+		room_detail_info *Rdi_ = det->get_room_detail_info();
 		room_info = &Rdi_->Ri;
 		if (room_info->TafLoad != 255) {
+			char tmp_str[MAXPATH];
 			strcpy(tmp_str, Rb->RoomDir);
 			strcat(tmp_str, room_info->TafName);
 			det->load_rdi_taf(tmp_str, room_info->TafLoad);
@@ -122,7 +118,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 void Room::load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr) {
 	uint32 imagesize[MAXSPRITE] = {0};
-	if (palette != 0)
+	if (palette != nullptr)
 		mem->file->load_palette(filename, palette, TAFDATEI);
 	if (!modul) {
 		imagesize[sprnr] = 0l;
@@ -141,11 +137,10 @@ void Room::set_timer_start(int16 timer_start) {
 }
 
 void Room::add_timer_new_room() {
-	ani_detail_info *adi;
 	room_timer.TimerAnz = 0;
 
 	for (int i = 0; i < MAXDETAILS && room_timer.TimerAnz < MAX_ROOM_TIMER; i++) {
-		adi = det->get_ani_detail(i);
+		ani_detail_info *adi = det->get_ani_detail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
@@ -164,11 +159,9 @@ void Room::del_timer_old_room() {
 }
 
 int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
-	int16 timer_nr_;
-	int16 ret;
 
-	timer_nr_ = room_timer.TimerStart + room_timer.TimerAnz;
-	ret = uhr->set_new_timer(timer_nr_, timer_end, SEC_MODE);
+	int16 timer_nr_ = room_timer.TimerStart + room_timer.TimerAnz;
+	int16 ret = uhr->set_new_timer(timer_nr_, timer_end, SEC_MODE);
 	if (ret != -1) {
 		room_timer.ObjNr[room_timer.TimerAnz] = ani_nr;
 		room_timer.TimerNr[room_timer.TimerAnz] = timer_nr_;
@@ -206,53 +199,48 @@ void Room::set_ak_pal(RaumBlk *Rb) {
 
 void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 	byte *tmp_inv_spr[MAX_MOV_OBJ];
-	int16 i;
 
 	if (!modul) {
 		obj->sort();
 		memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
 		memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
 
-		for (i = 1; i < obj->mov_obj_room[0] + 1; i++) {
+		for (int16 i = 1; i < obj->mov_obj_room[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->mov_obj_room[i]]) {
 
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->mov_obj_room[i]],
-				         0, (int16)obj->mov_obj_room[i]);
+				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->mov_obj_room[i]], nullptr, (int16)obj->mov_obj_room[i]);
 			} else {
 				Rb->InvSprAdr[obj->mov_obj_room[i]] = tmp_inv_spr[obj->mov_obj_room[i]];
-				tmp_inv_spr[obj->mov_obj_room[i]] = 0;
+				tmp_inv_spr[obj->mov_obj_room[i]] = nullptr;
 			}
 		}
 
-		for (i = 1; i < obj->spieler_invnr[0] + 1; i++) {
+		for (int16 i = 1; i < obj->spieler_invnr[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->spieler_invnr[i]]) {
 
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->spieler_invnr[i]],
-				         0, (int16)obj->spieler_invnr[i]);
+				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->spieler_invnr[i]], nullptr, (int16)obj->spieler_invnr[i]);
 			} else {
 				Rb->InvSprAdr[obj->spieler_invnr[i]] = tmp_inv_spr[obj->spieler_invnr[i]];
 				tmp_inv_spr[obj->spieler_invnr[i]] = 0;
 			}
 		}
 
-		for (i = 0; i < MAX_MOV_OBJ; i++)
+		for (int16 i = 0; i < MAX_MOV_OBJ; i++) {
 			if (tmp_inv_spr[i] != 0)
 				free(tmp_inv_spr[i]);
+		}
+
 		if (player->AkInvent != -1) {
-			if (Rb->InvSprAdr[player->AkInvent] == NULL)
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[player->AkInvent],
-				         0, (int16)player->AkInvent);
+			if (Rb->InvSprAdr[player->AkInvent] == nullptr)
+				load_taf(Rb->InvFile, &Rb->InvSprAdr[player->AkInvent], nullptr, (int16)player->AkInvent);
 		}
 	}
 }
 
 int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
-		roomhandle[R_TGPDATEI]);
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(roomhandle[R_TGPDATEI]);
 	tbf_dateiheader tb;
 	bool ret = false;
-	int16 *tmp;
-	ret = false;
 
 	if (rs) {
 		mem->file->select_pool_item(rs, nr);
@@ -282,7 +270,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 						ged->load_ged_pool(gstream, &GedInfo[Rb->AkAblage],
 						                   nr, GedMem[Rb->AkAblage]);
 						if (!modul) {
-							tmp = (int16 *)Ablage[Rb->AkAblage];
+							int16 *tmp = (int16 *)Ablage[Rb->AkAblage];
 							GedXAnz[Rb->AkAblage] = tmp[0] / GedInfo[Rb->AkAblage].X;
 							GedYAnz[Rb->AkAblage] = tmp[1] / GedInfo[Rb->AkAblage].Y;
 						} else {
@@ -305,14 +293,13 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 }
 
 void Room::init_ablage() {
-	int16 i;
 	LastAblageSave = 0;
 	Ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
 	AblagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
 	GedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
 	if (!modul) {
 		AkAblage = 0;
-		for (i = 0; i < MAX_ABLAGE; i++) {
+		for (int16 i = 0; i < MAX_ABLAGE; i++) {
 			Ablage[i] = Ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
 			AblageInfo[i][0] = -1;
 			AblageInfo[i][1] = -1;
@@ -361,17 +348,13 @@ byte **Room::get_ged_mem() {
 }
 
 int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
-	int16 ende;
-	uint32 ablage_bedarf;
-	int16 ret;
-	int16 i, j;
-	ret = -1;
-	ablage_bedarf = pic_size / ABLAGE_BLOCK_SIZE;
+	int16 ret = -1;
+	uint32 ablage_bedarf = pic_size / ABLAGE_BLOCK_SIZE;
 	if (pic_size % ABLAGE_BLOCK_SIZE > 4)
 		++ablage_bedarf;
-	ende = 0;
+	int16 ende = 0;
 
-	for (i = 0; i < MAX_ABLAGE && !ende; i++) {
+	for (int16 i = 0; i < MAX_ABLAGE && !ende; i++) {
 		if (AblageInfo[i][0] == pic_nr &&
 		        AblageInfo[i][1] != 255) {
 			ende = 1;
@@ -380,7 +363,7 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 	}
 
 	if (!ende) {
-		for (i = 0; i < MAX_ABLAGE && !ende; i++) {
+		for (int16 i = 0; i < MAX_ABLAGE && !ende; i++) {
 			ret = get_ablage_g1((int16)ablage_bedarf, i);
 			ende = 1;
 		}
@@ -399,8 +382,8 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 				} else
 					ende = 1;
 			}
-			i = AblageInfo[LastAblageSave][1];
-			for (j = LastAblageSave; j < LastAblageSave + i; j++) {
+			int16 i = AblageInfo[LastAblageSave][1];
+			for (int16 j = LastAblageSave; j < LastAblageSave + i; j++) {
 				AblageInfo[j][0] = -1;
 				AblageInfo[j][1] = -1;
 			}
@@ -410,11 +393,9 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 }
 
 int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
-	int16 ende;
 	short ret = 0;
-	int16 count;
-	ende = 0;
-	count = 0;
+	int16 ende = 0;
+	int16 count = 0;
 	LastAblageSave = ak_pos;
 	while (!ende) {
 		if (LastAblageSave >= MAX_ABLAGE)
@@ -422,12 +403,10 @@ int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
 		if (ablage_bedarf == 1) {
 			ende = 1;
 			ret = LastAblageSave;
-		}
-		else if (ablage_bedarf <= MAX_ABLAGE - LastAblageSave) {
+		} else if (ablage_bedarf <= MAX_ABLAGE - LastAblageSave) {
 			ende = 1;
 			ret = LastAblageSave;
-		}
-		else
+		} else
 			++LastAblageSave;
 		++count;
 		if (count > MAX_ABLAGE) {
@@ -439,14 +418,11 @@ int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
 }
 
 void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
-	uint32 ablage_bedarf;
-	int16 i;
-	int16 j;
-	ablage_bedarf = (pic_size / ABLAGE_BLOCK_SIZE);
+	uint32 ablage_bedarf = (pic_size / ABLAGE_BLOCK_SIZE);
 	if (pic_size % ABLAGE_BLOCK_SIZE > 4)
 		++ablage_bedarf;
-	j = (int16)ablage_bedarf;
-	for (i = ablagenr; i < j + ablagenr; i++) {
+	int16 j = (int16)ablage_bedarf;
+	for (int16 i = ablagenr; i < j + ablagenr; i++) {
 		AblageInfo[i][0] = bildnr;
 		AblageInfo[i][1] = (int16)ablage_bedarf;
 		ablage_bedarf = 255;
@@ -455,7 +431,7 @@ void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
 }
 
 void Room::load_sound() {
-	if ((!modul) && (flags.InitSound)) {
+	if (!modul && flags.InitSound) {
 		det->load_room_sounds(roomhandle[R_VOCDATEI]);
 	}
 }
@@ -467,14 +443,14 @@ Stream *Room::get_sound_handle() {
 
 
 void load_chewy_taf(int16 taf_nr) {
-	taf_dateiheader *tafheader;
-	const char *fname_;
 	if (AkChewyTaf != taf_nr) {
 		if (chewy) {
 			free((char *)chewy);
 			chewy = nullptr;
 		}
 		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
+
+		const char *fname_;
 		switch (taf_nr) {
 		case CHEWY_NORMAL:
 			fname_ = CHEWY_TAF;
@@ -524,7 +500,8 @@ void load_chewy_taf(int16 taf_nr) {
 			chewy = mem->taf_adr(fname_);
 			ERROR
 
-				mem->file->get_tafinfo(fname_, &tafheader);
+			taf_dateiheader *tafheader;
+			mem->file->get_tafinfo(fname_, &tafheader);
 			if (!modul) {
 				chewy_kor = chewy->korrektur;
 			} else {
@@ -546,8 +523,7 @@ void switch_room(int16 nr) {
 }
 
 void calc_person_look() {
-	int16 i;
-	for (i = 1; i < MAX_PERSON; i++) {
+	for (int16 i = 1; i < MAX_PERSON; i++) {
 		if (spieler_mi[i].Id != NO_MOV_OBJ) {
 
 			if (spieler_vector[i].Xypos[0] > spieler_vector[P_CHEWY].Xypos[0])
diff --git a/engines/chewy/rooms/room1.cpp b/engines/chewy/rooms/room1.cpp
index 8ec140291ce..2530869e61f 100644
--- a/engines/chewy/rooms/room1.cpp
+++ b/engines/chewy/rooms/room1.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room1.h"
 
@@ -30,22 +29,21 @@ namespace Chewy {
 namespace Rooms {
 
 void Room1::gottenCard() {
-	int16 tmp;
-
 	det->hide_static_spr(2);
 	start_detail_wait(4, 1, ANI_VOR);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	atds->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
+	int16 tmp;
 	atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
 }
 
 void Room1::gedAction(int index) {
 	#define KABELABDECKUNG 1
-	bool flag = false;
 
 	switch (index) {
 	case 0:
 		if (!_G(spieler).R2ElectrocutedBork) {
+			bool flag = false;
 			if (_G(spieler).AkInvent == KABEL_INV) {
 				flag = true;
 				del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 24a89211bcc..919cfdf2e65 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room6.h"
 #include "chewy/rooms/room10.h"
@@ -34,7 +33,7 @@ void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		out->setze_zeiger(0);
+		out->setze_zeiger(nullptr);
 		fx->blende1(workptr, screen0, pal, 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		fx_blend = BLEND_NONE;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index aef6824a941..0ecb387b8c6 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -117,7 +117,7 @@ void Room12::init_bork() {
 		!_G(spieler).R12BorkTalk) {
 
 		if (!_G(auto_obj))
-			det->load_taf_seq(62, (85 - 62) + 1, 0);
+			det->load_taf_seq(62, (85 - 62) + 1, nullptr);
 		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
 			_G(auto_obj) = 1;
 			mov_phasen[R12_BORK_OBJ].AtsText = 120;
@@ -127,8 +127,7 @@ void Room12::init_bork() {
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = true;
-			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
-				(const MovLine *)R12_BORK_MPKT);
+			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines, (const MovLine *)R12_BORK_MPKT);
 
 			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
@@ -171,8 +170,7 @@ void Room12::bork_ok() {
 
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 2;
-	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
-		(const MovLine *)R12_BORK_MPKT1);
+	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines, (const MovLine *)R12_BORK_MPKT1);
 	wait_auto_obj(R12_BORK_OBJ);
 
 	_G(spieler).R12BorkInRohr = true;
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 2281b18eec1..60e9d1fd2cd 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -59,7 +59,7 @@ void Room13::entry() {
 		if (!_G(spieler).R13BorkOk) {
 			det->show_static_spr(12);
 			obj->hide_sib(SIB_BANDKNOPF_R13);
-			_G(spieler).R13Bandlauf = 1;
+			_G(spieler).R13Bandlauf = true;
 
 			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
@@ -104,11 +104,11 @@ void Room13::talk_bork() {
 		_G(spieler).R12ChewyBork = false;
 		det->show_static_spr(13);
 		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		det->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], 0, true);
+		det->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		det->stop_detail(9);
-		det->load_taf_seq(86, (97 - 86) + 1, 0);
+		det->load_taf_seq(86, (97 - 86) + 1, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(12);
 		_G(auto_obj) = 1;
@@ -120,8 +120,7 @@ void Room13::talk_bork() {
 		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[R13_BORK_OBJ].Mode = true;
-		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], mov_phasen[R13_BORK_OBJ].Lines,
-			(const MovLine *)R13_BORK_MPKT);
+		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], mov_phasen[R13_BORK_OBJ].Lines, (const MovLine *)R13_BORK_MPKT);
 		auto_move(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
 		auto_move(11, P_CHEWY);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 06cf3054e18..e482024de6b 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -162,16 +162,15 @@ int16 Room17::use_seil() {
 }
 
 void Room17::plot_seil() {
-	int16 i;
 	if (_G(spieler).R17Seil) {
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			det->show_static_spr(8 + i);
 	}
 }
 
 void Room17::kletter_down() {
 	auto_move(5, P_CHEWY);
-	det->load_taf_seq(177, 1, 0);
+	det->load_taf_seq(177, 1, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(14, 1, ANI_VOR);
 	flags.ZoomMov = false;
@@ -181,14 +180,13 @@ void Room17::kletter_down() {
 	spieler_mi->Vorschub = 8;
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines,
-		(const MovLine *)CHEWY_MPKT);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT);
 	set_person_pos(242, 350, P_CHEWY, P_LEFT);
 }
 
 void Room17::kletter_up() {
 	auto_move(6, P_CHEWY);
-	det->load_taf_seq(141, 4, 0);
+	det->load_taf_seq(141, 4, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(11, 1, ANI_VOR);
 	flags.ZoomMov = true;
@@ -197,8 +195,7 @@ void Room17::kletter_up() {
 	room->set_zoom(25);
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines,
-		(const MovLine *)CHEWY_MPKT1);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT1);
 	set_person_pos(243, 146, P_CHEWY, P_LEFT);
 }
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 37b9708f413..0563d1ef03e 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room18.h"
 
@@ -88,8 +87,6 @@ static const AniBlock ABLOCK24[2] = {
 
 
 void Room18::entry() {
-	int16 i;
-
 	_G(spieler).R18MoniSwitch = false;
 	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
 	_G(spieler).ScrollxStep = 2;
@@ -99,9 +96,9 @@ void Room18::entry() {
 	if (!_G(spieler).R18SurimyWurf) {
 		init_borks();
 	} else {
-		for (i = 0; i < 5; i++)
+		for (int16 i = 0; i < 5; i++)
 			det->hide_static_spr(BORK_SPR[i]);
-		for (i = 0; i < (4 - _G(spieler).R18Krone ? 1 : 0); i++)
+		for (int16 i = 0; i < (4 - (_G(spieler).R18Krone ? 1 : 0)); i++)
 			det->show_static_spr(BORK_SPR1[i]);
 	}
 
@@ -171,11 +168,9 @@ void Room18::gedAction(int index) {
 }
 
 void Room18::init_borks() {
-	int16 i;
-
-	for (i = 0; i < 5; i++)
+	for (int16 i = 0; i < 5; i++)
 		det->show_static_spr(BORK_SPR[i]);
-	for (i = 0; i < 4; i++)
+	for (int16 i = 0; i < 4; i++)
 		det->hide_static_spr(BORK_SPR1[i]);
 
 	_G(timer_nr)[0] = room->set_timer(255, 10);
@@ -186,10 +181,9 @@ void Room18::init_borks() {
 }
 
 void Room18::monitor() {
-	int16 nr;
-	nr = 0;
 	_G(spieler).R18MoniSwitch ^= 1;
 
+	int16 nr = 0;
 	if (_G(spieler).R18MoniSwitch) {
 		start_ani_block(2, ABLOCK21);
 		if (_G(spieler).R17EnergieOut)
@@ -205,7 +199,6 @@ void Room18::monitor() {
 }
 
 int16 Room18::sonden_moni() {
-	int16 i;
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
@@ -217,12 +210,12 @@ int16 Room18::sonden_moni() {
 		det->show_static_spr(10);
 		start_ani_block(3, ABLOCK20);
 
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			det->show_static_spr(i + 12);
 
 		wait_show_screen(40);
 
-		for (i = 0; i < 5; i++)
+		for (int16 i = 0; i < 5; i++)
 			det->hide_static_spr(i + 10);
 
 		show_cur();
@@ -231,7 +224,6 @@ int16 Room18::sonden_moni() {
 }
 
 int16 Room18::calc_surimy() {
-	int16 i;
 	int16 action_flag = false;
 
 	if (is_cur_inventar(SURIMY_INV)) {
@@ -240,8 +232,8 @@ int16 Room18::calc_surimy() {
 		hide_cur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
-		det->load_taf_seq(245, 294 - 245 + 1, 0);
-		det->load_taf_seq(116, 170 - 116 + 1, 0);
+		det->load_taf_seq(245, 294 - 245 + 1, nullptr);
+		det->load_taf_seq(116, 170 - 116 + 1, nullptr);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -254,8 +246,7 @@ int16 Room18::calc_surimy() {
 		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
 
-			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-				(const MovLine *)SURIMY_MPKT3);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT3);
 			wait_detail(18);
 		} else {
 			auto_move(1, P_CHEWY);
@@ -264,8 +255,7 @@ int16 Room18::calc_surimy() {
 			start_detail_frame(17, 1, ANI_VOR, 12);
 			_G(maus_links_click) = false;
 
-			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-				(const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 			wait_detail(17);
 		}
 
@@ -284,7 +274,7 @@ int16 Room18::calc_surimy() {
 		start_ani_block(2, ABLOCK22);
 		det->show_static_spr(20);
 
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			det->hide_static_spr(i + 15);
 
 		start_ani_block(2, ABLOCK23);
@@ -294,8 +284,7 @@ int16 Room18::calc_surimy() {
 
 		flags.NoScroll = true;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-			(const MovLine *)SURIMY_MPKT1);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 		auto_scroll(70, 0);
 		wait_auto_obj(SURIMY_OBJ);
 
@@ -313,8 +302,7 @@ int16 Room18::calc_surimy() {
 
 		det->hide_static_spr(26);
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-			(const MovLine *)SURIMY_MPKT2);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT2);
 		auto_scroll(0, 0);
 		wait_auto_obj(SURIMY_OBJ);
 		_G(spieler).ScrollxStep = 6;
@@ -326,7 +314,7 @@ int16 Room18::calc_surimy() {
 		atds->set_ats_str(153, 1, ATS_DATEI);
 		atds->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
 
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
 
 		atds->del_steuer_bit(179, 0, 1);
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 538e94001b2..3e31ce06044 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -115,7 +115,7 @@ void Room21::calc_laser() {
 }
 
 void Room21::init_spinne() {
-	det->load_taf_seq(42, (89 - 42) + 1, 0);
+	det->load_taf_seq(42, (89 - 42) + 1, nullptr);
 	_G(auto_obj) = 2;
 
 	mov_phasen[SPINNE1_OBJ].AtsText = 130;
@@ -168,24 +168,14 @@ void Room21::setup_func() {
 }
 
 void Room21::chewy_kolli() {
-	int16 spr_nr;
-	int16 *Cxy;
-	int16 xoff;
-	int16 yoff;
-	int16 *xy;
-	int16 kolli;
-	int16 i;
-	int16 ani_nr;
-	int16 tmp;
-	kolli = false;
-
-	for (i = 0; i < 3 && !kolli; i++) {
-		spr_nr = mov_phasen[i].Phase[auto_mov_vector[i].Phase][0] +
-			auto_mov_vector[i].PhNr;
-		xy = (int16 *)room_blk.DetImage[spr_nr];
-		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
-		xoff = xy[0];
-		yoff = xy[1];
+	int16 kolli = false;
+
+	for (int16 i = 0; i < 3 && !kolli; i++) {
+		int16 spr_nr = mov_phasen[i].Phase[auto_mov_vector[i].Phase][0] + auto_mov_vector[i].PhNr;
+		int16 *xy = (int16 *)room_blk.DetImage[spr_nr];
+		int16 *Cxy = room_blk.DetKorrekt + (spr_nr << 1);
+		int16 xoff = xy[0];
+		int16 yoff = xy[1];
 		if (i == 2)
 			xoff += 10;
 		xoff += auto_mov_vector[i].Xzoom;
@@ -205,10 +195,11 @@ void Room21::chewy_kolli() {
 
 	if (kolli) {
 		if (!flags.AutoAniPlay) {
-			tmp = spieler_vector[P_CHEWY].Count;
+			const int16 tmp = spieler_vector[P_CHEWY].Count;
 			stop_person(P_CHEWY);
 			flags.AutoAniPlay = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
+			int16 ani_nr;
 			if (spieler_vector[P_CHEWY].Xyvo[0] < 0)
 				ani_nr = 10;
 			else
@@ -226,8 +217,6 @@ void Room21::chewy_kolli() {
 }
 
 void Room21::salto() {
-	int16 i;
-
 	if (!_G(spieler).inv_cur) {
 		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
 			if (!_G(spieler).R21Salto) {
@@ -236,7 +225,7 @@ void Room21::salto() {
 					flags.AutoAniPlay = true;
 					_G(spieler).PersonHide[P_CHEWY] = true;
 
-					for (i = 0; i < 3; i++) {
+					for (int16 i = 0; i < 3; i++) {
 						det->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
 							spieler_vector[P_CHEWY].Xypos[1]);
 					}
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 85dee31aad1..78895590cf3 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -61,7 +61,7 @@ AniBlock ABLOCK14[2] = {
 
 void Room22::entry() {
 	if (!_G(spieler).R22BorkPlatt) {
-		det->load_taf_seq(36, (56 - 36) + 1, 0);
+		det->load_taf_seq(36, (56 - 36) + 1, nullptr);
 		room->set_timer(255, 15);
 	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork) {
 		det->show_static_spr(4);
@@ -137,21 +137,18 @@ void Room22::bork(int16 t_nr) {
 }
 
 void Room22::bork_walk1() {
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
-		(const MovLine *)BORK_MPKT);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT);
 	wait_auto_obj(BORK_OBJ);
 
 	start_detail_wait(2, 1, ANI_VOR);
 
 	mov_phasen[BORK_OBJ].Repeat = 1;
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
-		(const MovLine *)BORK_MPKT1);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT1);
 	wait_auto_obj(BORK_OBJ);
 }
 
 void Room22::bork_walk2() {
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines,
-		(const MovLine *)BORK_MPKT2);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT2);
 	wait_auto_obj(BORK_OBJ);
 
 	flic_cut(FCUT_009, CFO_MODE);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 22069782124..b8f9cb066c7 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room23.h"
 
@@ -55,17 +54,14 @@ void Room23::cockpit() {
 }
 
 int16 Room23::start_gleiter() {
-	int16 i;
-	int16 start_ok;
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		start_ok = false;
 		if (!_G(spieler).R23FluxoFlex)
 			start_aad_wait(23, -1);
 		else {
-			start_ok = true;
+			bool start_ok = true;
 
 			if (_G(spieler).R23GleiterExit == 16) {
 				if (!_G(spieler).R16F5Exit) {
@@ -85,11 +81,11 @@ int16 Room23::start_gleiter() {
 				start_ani_block(4, ABLOCK15);
 				wait_show_screen(30);
 
-				for (i = 0; i < 4; i++)
+				for (int16 i = 0; i < 4; i++)
 					det->stop_detail(i);
 
 				if (_G(spieler).R23GleiterExit == 14) {
-					out->setze_zeiger(0);
+					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_012, CFO_MODE);
 					out->cls();
@@ -106,7 +102,7 @@ int16 Room23::start_gleiter() {
 					_G(maus_links_click) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
-					out->setze_zeiger(0);
+					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_019, CFO_MODE);
 					_G(spieler).R23GleiterExit = 25;
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index ea10af9b336..e75047aeb08 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -23,7 +23,6 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room23.h"
 #include "chewy/rooms/room25.h"
 
@@ -156,7 +155,7 @@ void Room25::xit_gleiter() {
 	if (!_G(spieler).R25SurimyLauf) {
 		hide_cur();
 		_G(spieler).R25SurimyLauf = true;
-		det->load_taf_seq(56, 8, 0);
+		det->load_taf_seq(56, 8, nullptr);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -165,8 +164,7 @@ void Room25::xit_gleiter() {
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 		auto_mov_obj[SURIMY_OBJ].Mode = true;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-			(const MovLine *)SURIMY_MPKT);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 		fx_blend = BLEND1;
 		set_up_screen(DO_SETUP);
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 4fefc14ab63..2fdc56a7aba 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -103,7 +103,7 @@ void Room28::entry(int16 eib_nr) {
 			case 77:
 				if (_G(spieler).R28PostCar) {
 					_G(spieler).R28PostCar = false;
-					out->setze_zeiger(0);
+					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_063, FLC_MODE);
 					_G(spieler).R28ChewyPump = false;
@@ -202,10 +202,9 @@ void Room28::haendler() {
 }
 
 void Room28::setup_func() {
-	int16 x;
 	calc_person_look();
 
-	x = (spieler_vector[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
+	int16 x = (spieler_vector[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
 	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
 }
 
@@ -244,7 +243,6 @@ void Room28::use_surimy() {
 }
 
 void Room28::set_pump() {
-	int16 tmp;
 	hide_cur();
 
 	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
@@ -254,7 +252,7 @@ void Room28::set_pump() {
 				auto_move(5, P_CHEWY);
 
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
+			int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
 			del_inventar(K_MASKE_INV);
 			det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 
@@ -299,14 +297,13 @@ void Room28::set_pump() {
 }
 
 void Room28::get_pump() {
-	int16 tmp;
 
 	if (_G(spieler).R28ChewyPump) {
 		hide_cur();
 		stop_person(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
+		int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
 		det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 		start_detail_wait(tmp, 1, ANI_RUECK);
 
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 339b91b9860..5609825744f 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room2.h"
 #include "chewy/rooms/room3.h"
@@ -106,7 +105,7 @@ void Room3::terminal() {
 			det->stop_detail(5);
 			start_ani_block(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
-				_G(spieler).R2FussSchleim = 0;
+				_G(spieler).R2FussSchleim = false;
 
 				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
@@ -131,7 +130,8 @@ void Room3::terminal() {
 			_G(auto_obj) = 0;
 			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			ERROR
-				fx_blend = BLEND1;
+
+			fx_blend = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
@@ -152,6 +152,8 @@ void Room3::terminal() {
 		sonde_knarre();
 		break;
 
+	default:
+		break;
 	}
 }
 
@@ -179,14 +181,11 @@ void Room3::sonde_knarre() {
 		{ {   4, 100, 180 }, 1, 3 },
 		{ {  13,  45,  75 }, 1, 3 }
 	};
-	room_detail_info *rdi;
-	int16 tmp;
-	int16 ende;
 	hide_cur();
-	rdi = det->get_room_detail_info();
+	room_detail_info *rdi = det->get_room_detail_info();
 
-	det->load_taf_seq(162, 17, 0);
-	tmp = _G(zoom_horizont);
+	det->load_taf_seq(162, 17, nullptr);
+	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	_G(auto_obj) = 1;
 	mov_phasen[SONDE_OBJ].Lines = 3;
@@ -195,14 +194,13 @@ void Room3::sonde_knarre() {
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
-		*)sonde_mpkt1);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt1);
 	flags.AniUserAction = false;
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
 	det->start_detail(SONDE_SHOOT, 1, ANI_VOR);
-	ende = 0;
+	int16 ende = 0;
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
@@ -261,8 +259,7 @@ void Room3::sonde_knarre() {
 	mov_phasen[SONDE_OBJ].Lines = 2;
 	mov_phasen[SONDE_OBJ].Repeat = 1;
 	mov_phasen[SONDE_OBJ].ZoomFak = 28;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine
-		*)sonde_mpkt2);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt2);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 	det->del_taf_tbl(162, 17, 0);
@@ -273,11 +270,6 @@ void Room3::sonde_knarre() {
 }
 
 void Room3::probeTransfer() {
-	int16 tmp;
-	int16 i;
-	int16 spr_nr;
-	int16 anistart;
-
 	static const MovLine SONDE_MPKT1[2] = {
 		{ { 237,  52, 160 }, 0, 2 },
 		{ { 144, 100, 180 }, 0, 2 }
@@ -299,9 +291,9 @@ void Room3::probeTransfer() {
 	flags.AniUserAction = false;
 	hide_cur();
 	/*rdi = */(void)det->get_room_detail_info();
-	tmp = _G(zoom_horizont);
+	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
-	anistart = false;
+	int16 anistart = false;
 	_G(auto_obj) = 1;
 	mov_phasen[SONDE_OBJ].Lines = 2;
 	mov_phasen[SONDE_OBJ].Repeat = 1;
@@ -309,8 +301,7 @@ void Room3::probeTransfer() {
 	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines,
-		(const MovLine *)SONDE_MPKT1);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT1);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
@@ -327,8 +318,8 @@ void Room3::probeTransfer() {
 	clear_prog_ani();
 	_G(auto_obj) = 2;
 
-	spr_nr = 140;
-	for (i = 0; i < 4 && !SHOULD_QUIT; i++) {
+	int16 spr_nr = 140;
+	for (int16 i = 0; i < 4 && !SHOULD_QUIT; i++) {
 		mov_phasen[SONDE_OBJ].Lines = 2;
 		mov_phasen[SONDE_OBJ].Repeat = 1;
 		mov_phasen[SONDE_OBJ].ZoomFak = 0;
@@ -391,7 +382,7 @@ void Room3::probeTransfer() {
 			flags.AniUserAction = true;
 			spr_nr = 141;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->load_taf_seq(142, 8, 0);
+			det->load_taf_seq(142, 8, nullptr);
 			break;
 
 		case 1:
@@ -399,7 +390,7 @@ void Room3::probeTransfer() {
 			break;
 
 		case 2:
-			det->del_taf_tbl(142, 7, 0);
+			det->del_taf_tbl(142, 7, nullptr);
 			flags.AniUserAction = false;
 			switch_room(2);
 			break;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 0d11d0c2bd6..c74539f650c 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room31.h"
 
@@ -51,7 +50,7 @@ void Room31::surimy_go() {
 		if (_G(spieler).R31SurimyGo >= 3) {
 			hide_cur();
 			_G(spieler).R31SurimyGo = 0;
-			det->load_taf_seq(39, 8, 0);
+			det->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -60,8 +59,7 @@ void Room31::surimy_go() {
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = true;
-			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-				(const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
@@ -74,10 +72,8 @@ void Room31::surimy_go() {
 }
 
 void Room31::calc_luke() {
-	int16 i;
-
 	if (!_G(spieler).R31KlappeZu) {
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			det->show_static_spr(5 + i);
 
 		atds->set_ats_str(244, 1, ATS_DATEI);
@@ -85,7 +81,7 @@ void Room31::calc_luke() {
 		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
 
 	} else {
-		for (i = 0; i < 3; i++)
+		for (int16 i = 0; i < 3; i++)
 			det->hide_static_spr(5 + i);
 
 		atds->set_ats_str(244, 0, ATS_DATEI);
@@ -196,7 +192,7 @@ void Room31::close_luke() {
 	if (!_G(spieler).R31KlappeZu) {
 		hide_cur();
 		auto_move(2, P_CHEWY);
-		start_spz_wait(13, 1, 0, 0);
+		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		det->play_sound(3, 0);
 		det->play_sound(3, 1);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 71d18d7fbcc..eba7d58dff7 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room33.h"
 
@@ -50,7 +48,7 @@ void Room33::surimy_go() {
 		if (_G(spieler).R33SurimyGo >= 4) {
 			hide_cur();
 			_G(spieler).R33SurimyGo = 0;
-			det->load_taf_seq(39, 8, 0);
+			det->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -59,8 +57,7 @@ void Room33::surimy_go() {
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = true;
-			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-				(const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
@@ -105,12 +102,10 @@ int16 Room33::use_schublade() {
 }
 
 void Room33::use_maschine() {
-	int16 action;
 	int16 dia_nr;
 	int16 ani_nr;
-	int16 hocker;
-	action = true;
-	hocker = false;
+	int16 action = true;
+	int16 hocker = false;
 	hide_cur();
 
 	if (!_G(spieler).R33MunterOk) {
@@ -194,11 +189,9 @@ void Room33::use_maschine() {
 }
 
 int16 Room33::calc_muntermacher() {
-	int16 ret;
-	int16 i;
-	ret = true;
+	int16 ret = true;
 
-	for (i = 0; i < 4; i++) {
+	for (int16 i = 0; i < 4; i++) {
 		if (_G(spieler).R33Munter[i] == false)
 			ret = false;
 	}
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 496741484b7..c26e8ca97da 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -71,11 +71,11 @@ void Room39::entry() {
 }
 
 short Room39::use_howard() {
-	int16 dia_nr = -1;
 	int16 ani_nr = 0;
 	int16 action_flag = false;
 
 	if (!_G(spieler).R39HowardWach) {
+		int16 dia_nr;
 		if (_G(spieler).inv_cur) {
 			if (is_cur_inventar(MANUSKRIPT_INV)) {
 				hide_cur();
@@ -165,13 +165,12 @@ void Room39::ok() {
 }
 
 int16 Room39::use_tv() {
-	int16 cls_flag;
 	int16 dia_nr = -1;
 	int16 ani_nr = -1;
 	int16 action_flag = false;
 
 	auto_move(2, P_CHEWY);
-	cls_flag = false;
+	int16 cls_flag = false;
 	hide_cur();
 
 	if (is_cur_inventar(ZAPPER_INV)) {
@@ -180,7 +179,7 @@ int16 Room39::use_tv() {
 			_G(spieler).R39TvKanal = -1;
 
 		flags.NoPalAfterFlc = true;
-		out->setze_zeiger(0);
+		out->setze_zeiger(nullptr);
 		out->cls();
 		flic_cut(FCUT_042, FLC_MODE);
 		++_G(spieler).R39TvKanal;
@@ -215,14 +214,14 @@ int16 Room39::use_tv() {
 			flic_cut(FCUT_041, FLC_MODE);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
-			out->setze_zeiger(0);
+			out->setze_zeiger(nullptr);
 			out->cls();
 			out->set_palette(pal);
 			flags.NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], FLC_MODE);
 
 			out->cls();
-			out->setze_zeiger(0);
+			out->setze_zeiger(nullptr);
 			out->cls();
 			out->set_palette(pal);
 			set_tv();
@@ -262,7 +261,7 @@ int16 Room39::use_tv() {
 
 	if (cls_flag) {
 		out->cls();
-		out->setze_zeiger(0);
+		out->setze_zeiger(nullptr);
 		out->cls();
 		out->set_palette(pal);
 		flags.NoPalAfterFlc = false;
@@ -280,13 +279,12 @@ int16 Room39::use_tv() {
 }
 
 void Room39::look_tv(int16 cls_mode) {
-	int16 flic_nr;
-	int16 dia_nr;
-
 	_flag = false;
 
 	if (_G(spieler).R39TvOn) {
 		if (!flags.AutoAniPlay) {
+			int16 flic_nr;
+			int16 dia_nr;
 			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
 				flic_nr = FCUT_038;
 				++_G(spieler).R39ClintNews;
@@ -299,7 +297,7 @@ void Room39::look_tv(int16 cls_mode) {
 			}
 
 			if (cls_mode) {
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 				out->cls();
 				out->set_palette(pal);
 				flags.NoPalAfterFlc = true;
@@ -318,7 +316,7 @@ void Room39::look_tv(int16 cls_mode) {
 
 			if (cls_mode) {
 				out->cls();
-				out->setze_zeiger(0);
+				out->setze_zeiger(nullptr);
 				out->cls();
 				out->set_palette(pal);
 				flags.NoPalAfterFlc = false;
@@ -334,9 +332,7 @@ void Room39::look_tv(int16 cls_mode) {
 }
 
 void Room39::set_tv() {
-	int16 i;
-
-	for (i = 0; i < 6; i++)
+	for (int16 i = 0; i < 6; i++)
 		det->hide_static_spr(i + 4);
 
 	if (_G(spieler).R39TvOn) {
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 7b84d10a2e4..3d599925746 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room4.h"
 
@@ -35,11 +34,6 @@ namespace Rooms {
 #define RAHMEN_GELB 71
 
 int16 Room4::sonde_comp() {
-	int16 ende;
-
-	int16 spr_nr;
-	int16 cur_x;
-
 	static const int16 CUR_POS[3][2] = {
 		{  83, 106 },
 		{ 136, 103 },
@@ -56,10 +50,10 @@ int16 Room4::sonde_comp() {
 	_G(cur_display) = false;
 	switch_room(4);
 	_G(cur_display) = true;
-	ende = 0;
+	int16 ende = 0;
 	curblk.sprite = room_blk.DetImage;
-	cur_x = 1;
-	spr_nr = RAHMEN_ROT;
+	int16 cur_x = 1;
+	int16 spr_nr = RAHMEN_ROT;
 	cur->move(160, 160);
 
 	start_aad(46);
@@ -89,6 +83,8 @@ int16 Room4::sonde_comp() {
 				det->play_sound(0, 2);
 				break;
 
+			default:
+				break;
 			}
 		}
 		spr_info[0].Image = room_blk.DetImage[spr_nr];
@@ -126,7 +122,8 @@ int16 Room4::sonde_comp() {
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
-		fx_blend = BLEND1;
+	
+	fx_blend = BLEND1;
 	atds->stop_aad();
 
 	return cur_x;
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index fbae1fe5e6f..94592c011ed 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -82,7 +82,8 @@ void Room40::entry(int16 eib_nr) {
 			case 87:
 				set_person_pos(158, 93, P_HOWARD, P_LEFT);
 				break;
-
+			default:
+				break;
 			}
 		}
 	}
@@ -155,9 +156,6 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 }
 
 void Room40::move_train(int16 mode) {
-	int16 lx, ax;
-	int16 delay;
-
 	_G(spieler).R40TrainMove = false;
 	hide_cur();
 	auto_move(9, P_CHEWY);
@@ -167,8 +165,8 @@ void Room40::move_train(int16 mode) {
 	if (!mode)
 		start_aad_wait(206, -1);
 
-	lx = -40;
-	ax = lx - 190;
+	int16 lx = -40;
+	int16 ax = lx - 190;
 
 	det->start_detail(7, 20, ANI_VOR);
 	det->show_static_spr(11);
@@ -177,7 +175,7 @@ void Room40::move_train(int16 mode) {
 		det->show_static_spr(12);
 
 	det->enable_sound(7, 0);
-	delay = 0;
+	int16 delay = 0;
 
 	while (ax < 560) {
 		det->set_detail_pos(7, lx, 46);
@@ -212,15 +210,11 @@ void Room40::move_train(int16 mode) {
 }
 
 void Room40::setup_func() {
-	int16 x, y;
-	int16 sp_x;
-
 	if (!_G(spieler).R40HoUse && _G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = spieler_vector[P_HOWARD].Xypos[1];
-		sp_x = spieler_vector[P_CHEWY].Xypos[0];
 
+		int16 x, y;
+		const int16 sp_x = spieler_vector[P_CHEWY].Xypos[0];
 		if (sp_x > 170 && sp_x < 255) {
 			x = 248;
 			y = 97;
@@ -233,6 +227,9 @@ void Room40::setup_func() {
 		} else if (sp_x < 170) {
 			x = 165;
 			y = 99;
+		} else {
+			x = spieler_vector[P_HOWARD].Xypos[0];
+			y = spieler_vector[P_HOWARD].Xypos[1];
 		}
 
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
@@ -415,8 +412,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 }
 
 void Room40::talk_police() {
-	if (_G(spieler).R40PoliceWeg == false &&
-			_G(spieler).R40PoliceAniStatus == 255) {
+	if (_G(spieler).R40PoliceWeg == false && _G(spieler).R40PoliceAniStatus == 255) {
 		hide_cur();
 		_G(spieler).R40PoliceStart = false;
 		room->set_timer_status(255, TIMER_STOP);
@@ -481,7 +477,7 @@ int16 Room40::use_haendler() {
 			_G(spieler).R40Wettbewerb = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			flags.NoScroll = false;
-			out->setze_zeiger(0);
+			out->setze_zeiger(nullptr);
 			out->cls();
 			switch_room(28);
 			SetUpScreenFunc = setup_func;
@@ -567,8 +563,7 @@ bool Room40::use_police() {
 	bool result = false;
 
 	if (menu_item == CUR_HOWARD) {
-		if (_G(spieler).R40PoliceWeg == false &&
-				_G(spieler).R40PoliceAniStatus == 255) {
+		if (_G(spieler).R40PoliceWeg == false && _G(spieler).R40PoliceAniStatus == 255) {
 			result = true;
 			_G(spieler).R40PoliceAb = true;
 			hide_cur();
@@ -596,9 +591,6 @@ bool Room40::use_police() {
 }
 
 int16 Room40::use_tele() {
-	int16 dia_nr = -1;
-	int16 dia_nr1 = -1;
-	int16 timer_wert;
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur) {
@@ -606,6 +598,7 @@ int16 Room40::use_tele() {
 			action_flag = true;
 			hide_cur();
 
+			int16 dia_nr1 = -1;
 			if (!_G(spieler).R40PoliceAb) {
 				start_aad_wait(219, -1);
 				_G(spieler).R40HoUse = false;
@@ -614,6 +607,7 @@ int16 Room40::use_tele() {
 				auto_move(13, P_CHEWY);
 				det->show_static_spr(0);
 
+				int16 dia_nr;
 				if (!_G(spieler).R40DuengerMit) {
 					dia_nr = 220;
 					dia_nr1 = 222;
@@ -628,7 +622,7 @@ int16 Room40::use_tele() {
 				auto_move(9, P_CHEWY);
 				start_aad_wait(dia_nr1, -1);
 				_G(spieler).R40HoUse = false;
-				timer_wert = 0;
+				int16 timer_wert = 0;
 
 				if (dia_nr1 == 223) {
 					if (is_cur_inventar(DUENGER_INV)) {
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index ece222cfb28..1838327e60f 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room45.h"
 
@@ -30,9 +29,6 @@ namespace Chewy {
 namespace Rooms {
 
 void Room45::entry(int16 eib_nr) {
-	int16 ch_x, ch_y;
-	int16 ho_x, ho_y;
-
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
 	_G(r45_delay) = 0;
@@ -49,6 +45,8 @@ void Room45::entry(int16 eib_nr) {
 
 	spieler_mi[P_HOWARD].Mode = true;
 	if (!flags.LoadGame) {
+		int16 ch_x, ch_y;
+		int16 ho_x, ho_y;
 		if (_G(spieler).R48TaxiEntry) {
 			ch_x = 67;
 			ch_y = 146;
@@ -94,16 +92,14 @@ void Room45::xit(int16 eib_nr) {
 }
 
 void Room45::setup_func() {
-	int16 i;
 	int16 x;
 	int16 y;
-	int16 ch_x;
 
 	if (menu_display == 0) {
 		if (!_G(r45_delay)) {
 			_G(r45_delay) = _G(spieler).DelaySpeed / 2;
 
-			for (i = 0; i < MAX_PERSON; i++) {
+			for (int16 i = 0; i < MAX_PERSON; i++) {
 				if (_G(r45_pinfo)[i][0] == 1) {
 					y = Adi[3 + i].y;
 					x = Adi[3 + i].x;
@@ -145,9 +141,7 @@ void Room45::setup_func() {
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
 			calc_person_look();
-			x = spieler_vector[P_HOWARD].Xypos[0];
-			y = 64;
-			ch_x = spieler_vector[P_CHEWY].Xypos[0];
+			const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
 			if (ch_x < 95) {
 				x = 18;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 2dc63021ea2..8f3a4a1499f 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room46.h"
 
@@ -77,15 +76,11 @@ void Room46::xit() {
 }
 
 void Room46::setup_func() {
-	int16 x;
-	int16 y;
-	int16 ch_x;
-
 	calc_person_look();
-	x = spieler_vector[P_HOWARD].Xypos[0];
-	y = 64;
-	ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	int16 y = 64;
+	const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
+	int16 x;
 	if (ch_x > 160) {
 		x = 260;
 	} else {
@@ -151,17 +146,14 @@ void Room46::bodo() {
 }
 
 void Room46::kloppe() {
-	int16 i;
-	int16 delay;
-
-	for (i = 0; i < 4; i++) {
+	for (int16 i = 0; i < 4; i++) {
 		mem->file->select_pool_item(Ci.Handle, FCUT_065);
 
 		flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 		out->setze_zeiger(nullptr);
 		out->cls();
 		start_aad(244 + i, -1);
-		delay = _G(spieler).DelaySpeed * 50;
+		int16 delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
 
 		while (in->get_switch_code() == 0 && delay) {
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 78c94bc4584..e4c1f8b2392 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room47.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 10539e01184..27698d9c201 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room48.h"
 
@@ -49,9 +48,7 @@ bool Room48::timer(int16 t_nr, int16 ani_nr) {
 }
 
 void Room48::calc_pic() {
-	int16 i;
-
-	for (i = 0; i < 2; i++) {
+	for (int16 i = 0; i < 2; i++) {
 		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R48Auswahl[3 + i] = 0;
 	}
@@ -88,28 +85,22 @@ void Room48::frage() {
 }
 
 void Room48::setup_func() {
-	int16 idx;
-	int16 r_nr;
-	int16 i;
-
-	for (i = 0; i < 5; i++)
+	for (int16 i = 0; i < 5; i++)
 		det->hide_static_spr(1 + i);
 
 	if (flags.ShowAtsInvTxt) {
 		if (menu_display == 0) {
-			if (menu_item != CUR_USE) {
-				menu_item = CUR_USE;
-			}
-
+			menu_item = CUR_USE;
 			cur_2_inventory();
 			cursor_wahl(CUR_ZEIGE);
-			idx = det->maus_vector(minfo.x, minfo.y);
+			const int16 idx = det->maus_vector(minfo.x, minfo.y);
 
 			if (idx != -1) {
 				if (_G(spieler).R48Auswahl[idx]) {
 					det->show_static_spr(1 + idx);
 
 					if (_G(maus_links_click)) {
+						int16 r_nr;
 						switch (idx) {
 						case 0:
 							r_nr = 45;
@@ -153,7 +144,7 @@ void Room48::setup_func() {
 							_G(maus_links_click) = false;
 							set_up_screen(DO_SETUP);
 
-							for (i = 0; i < MAX_PERSON; i++) {
+							for (int16 i = 0; i < MAX_PERSON; i++) {
 								if (_G(spieler).R48TaxiPerson[i]) {
 									_G(spieler).PersonHide[i] = false;
 									_G(spieler).R48TaxiPerson[i] = false;
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 54bc9e657ca..3476c3c8738 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room49.h"
 
@@ -176,7 +175,7 @@ void Room49::use_boy_cigar() {
 	SetUpScreenFunc = nullptr;
 	auto_move(5, P_CHEWY);
 
-	int16 zoom = room->room_info->ZoomFak;
+	const int16 zoom = room->room_info->ZoomFak;
 	room->set_zoom(zoom);
 	go_auto_xy(416, 79, P_HOWARD, ANI_VOR);
 	set_person_spr(P_LEFT, P_HOWARD);
@@ -270,15 +269,11 @@ int16 Room49::use_taxi() {
 }
 
 void Room49::setup_func() {
-	int16 x, y;
-	int16 ch_x;
-
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
+		int16 x, y;
 		if (ch_x < 130) {
 			x = 40;
 			y = 97;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 6ad57b8e6db..1609aeebf3b 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -246,9 +246,6 @@ void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 }
 
 void Room50::setup_func() {
-	int16 x, y;
-	int16 ch_x;
-
 	if (_wasser && !det->get_ani_status(4)) {
 		_wasser = false;
 		go_page();
@@ -256,10 +253,9 @@ void Room50::setup_func() {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		calc_person_look();
-		x = spieler_vector[P_HOWARD].Xypos[0];
-		y = 64;
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
+		int16 x, y;
 		if (ch_x < 72) {
 			x = 1;
 			y = 64;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 3213ea9af2a..9be2dfdc311 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room68.h"
 
@@ -80,10 +79,6 @@ bool Room68::timer(int16 t_nr, int16 ani_nr) {
 }
 
 void Room68::setup_func() {
-	int16 ho_x, ho_y;
-	int16 ni_x, ni_y;
-	int16 ch_x;
-
 	switch (_G(r68HohesC)) {
 	case 0:
 		if (det->get_ani_status(_G(r68HohesC)) == false) {
@@ -108,13 +103,15 @@ void Room68::setup_func() {
 		}
 		break;
 
+	default:
+		break;
 	}
 	calc_person_look();
-	ho_x = spieler_vector[P_HOWARD].Xypos[0];
-	ni_x = spieler_vector[P_NICHELLE].Xypos[0];
-	ho_y = 75;
-	ni_y = 75;
-	ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	int16 ho_y = 75;
+	int16 ni_y = 75;
+	int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	int16 ho_x, ni_x;
+
 	if (ch_x < 130) {
 		ho_x = 223;
 		ni_x = 260;
@@ -282,17 +279,17 @@ int16 Room68::use_keeper() {
 }
 
 int16 Room68::use_diva() {
-	short action_flag = false;
+	int16 action_flag;
 	hide_cur();
 	if (is_cur_inventar(B_MARY_INV)) {
 		del_inventar(_G(spieler).AkInvent);
-		action_flag = true;
+		action_flag = 1;
 		auto_move(4, P_CHEWY);
 		start_detail_wait(4, 1, ANI_VOR);
 		_G(spieler).R68Gutschein = false;
 	} else if (is_cur_inventar(B_MARY2_INV)) {
 		del_inventar(_G(spieler).AkInvent);
-		action_flag = true;
+		action_flag = 1;
 		auto_move(4, P_CHEWY);
 		det->hide_static_spr(3);
 		_G(spieler).R68DivaWeg = true;
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index f78f63340b9..860465f685a 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -23,7 +23,6 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room7.h"
 
 namespace Chewy {
@@ -128,7 +127,7 @@ void Room7::klingel() {
 		start_aad(7, 0);
 		start_ani_block(3, ABLOCK25);
 		det->show_static_spr(7);
-		det->load_taf_seq(192, 74, 0);
+		det->load_taf_seq(192, 74, nullptr);
 		det->start_detail(14, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		det->stop_detail(5);
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index 2ac24f520ca..53f86f788c8 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -113,7 +113,7 @@ void Room8::start_verbrennen() {
 bool Room8::gips_wurf() {
 	if (is_cur_inventar(GIPS_EIMER_INV)) {
 		hide_cur();
-		det->load_taf_seq(116, 30, 0);
+		det->load_taf_seq(116, 30, nullptr);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = false;
 
@@ -165,11 +165,11 @@ void Room8::open_gdoor() {
 }
 
 void Room8::talk_nimoy() {
-	int16 tmp;
 	auto_move(9, P_CHEWY);
 	flags.NoScroll = true;
 	auto_scroll(0, 120);
 	if (_G(spieler).R8Folter) {
+		int16 tmp;
 		if (!_G(spieler).R8GipsWurf)
 			tmp = 1;
 		else
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 70c19a0d4e5..f58eb0a0a1e 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room80.h"
 
 namespace Chewy {
@@ -77,9 +75,7 @@ void Room80::setup_func() {
 	if (_G(spieler).flags32_1 || !flags.ShowAtsInvTxt || menu_display)
 		return;
 
-	if (menu_item != CUR_USE)
-		menu_item = CUR_USE;
-
+	menu_item = CUR_USE;
 	cur_2_inventory();
 	cursor_wahl(CUR_ZEIGE);
 	int vec = det->maus_vector(_G(spieler).scrollx + minfo.x, minfo.y);
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 91833b74dd5..51c5f63f150 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room9.h"
 
@@ -74,10 +73,9 @@ void Room9::gtuer() {
 }
 
 void Room9::surimy() {
-	int16 tmp;
 	hide_cur();
 	_G(spieler).R9Surimy = true;
-	tmp = spieler_vector[P_CHEWY].Count;
+	const int16 tmp = spieler_vector[P_CHEWY].Count;
 	stop_person(P_CHEWY);
 	atds->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
 	det->hide_static_spr(4);
@@ -93,7 +91,7 @@ void Room9::surimy() {
 }
 
 void Room9::surimy_ani() {
-	det->load_taf_seq(91, 8, 0);
+	det->load_taf_seq(91, 8, nullptr);
 	_G(auto_obj) = 1;
 	mov_phasen[SURIMY_OBJ].AtsText = 0;
 	mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -102,8 +100,7 @@ void Room9::surimy_ani() {
 	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SURIMY_OBJ].Mode = true;
-	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-		(const MovLine *)SURIMY_MPKT);
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
 	start_detail_frame(0, 1, ANI_VOR, 15);
 	det->start_detail(2, 1, ANI_VOR);
@@ -112,8 +109,7 @@ void Room9::surimy_ani() {
 	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
 	det->hide_static_spr(4);
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines,
-		(const MovLine *)SURIMY_MPKT1);
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
 	det->del_taf_tbl(91, 8, 0);
 }
@@ -122,7 +118,7 @@ void Room9::gedAction(int index) {
 	switch (index) {
 	case 0:
 		if (!_G(spieler).R9Surimy)
-			Room9::surimy();
+			surimy();
 		break;
 
 	default:


Commit: 06e226cd9bdab975ac335b7e37cbed6c9da56b07
    https://github.com/scummvm/scummvm/commit/06e226cd9bdab975ac335b7e37cbed6c9da56b07
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Implement room 79

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room79.h
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 634720b4aab..1454912e770 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -264,7 +264,7 @@ void MainMenu::playGame() {
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
 	cur->show_cur();
-	spieler_vector->Count = 0;
+	spieler_vector[P_CHEWY].Count = 0;
 	uhr->reset_timer(0, 0);
 	ailsnd->set_loopmode(_G(spieler).soundLoopMode);
 
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 94592c011ed..e46bd9b32e6 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -131,7 +131,7 @@ void Room40::xit(int16 eib_nr) {
 
 				cur_2_inventory();
 				remove_inventory(57);
-				_G(spieler).PersonDiaRoom[1] = 1;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 				show_person();
 
 			} else {
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 6d10e07f6f8..12e8a1f4d80 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -252,7 +252,7 @@ int16 Room55::use_telefon() {
 				_G(spieler).R55ExitDia = 337;
 				_G(spieler).room_e_obj[89].Attribut = 255;
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10024;
-				_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 
 				switch_room(54);
 			} else {
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 4d7e15844d3..70ed1d3dd4e 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room79.h"
 
@@ -30,9 +29,69 @@ namespace Chewy {
 namespace Rooms {
 
 void Room79::entry() {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 79;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 79;
+	if (!flags.LoadGame) {
+		set_person_pos(459, 114, P_CHEWY, P_LEFT);
+		set_person_pos(568, 65, P_HOWARD, P_LEFT);
+		set_person_pos(534, 75, P_NICHELLE, P_LEFT);
+		_G(spieler).scrollx = 300;
+		hide_cur();
+		start_aad_wait(484, -1);
+		_G(spieler).PersonGlobalDia[P_HOWARD] = 10026;
+		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
+		show_cur();
+	}
+
+	SetUpScreenFunc = setup_func;
 }
 
 void Room79::xit() {
+	_G(spieler).R79Val[P_CHEWY] = 1;
+	_G(spieler).R79Val[P_HOWARD] = 1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+	_G(spieler).R79Val[P_NICHELLE] = 1;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+}
+
+void Room79::setup_func() {
+	calc_person_look();
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+
+	int howDestX, howDestY, nicDestX, nicDestY;
+
+	if (posX < 160) {
+		howDestX = 228;
+		howDestY = 102;
+		nicDestX = 191;
+		nicDestY = 97;
+	} else if (posX < 280) {
+		howDestX = 346;
+		howDestY = 98;
+		nicDestX = 307;
+		nicDestY = 100;
+	} else if (posX < 390) {
+		howDestX = 463;
+		howDestY = 96;
+		nicDestX = 424;
+		nicDestY = 94;
+	} else {
+		howDestX = 568;
+		howDestY = 65;
+		nicDestX = 534;
+		nicDestY = 75;
+	}
+
+	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room79.h b/engines/chewy/rooms/room79.h
index 3514237d159..1bf1ee13fc1 100644
--- a/engines/chewy/rooms/room79.h
+++ b/engines/chewy/rooms/room79.h
@@ -29,6 +29,7 @@ class Room79 {
 public:
 	static void entry();
 	static void xit();
+	static void setup_func();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 8b01fbd42c4..d59df22102b 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -78,9 +78,9 @@ void Room82::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (eib_nr == 122) {
-		_G(spieler).R79Val[0] = 1;
-		_G(spieler).R79Val[1] = 1;
-		_G(spieler).R79Val[2] = 1;
+		_G(spieler).R79Val[P_CHEWY] = 1;
+		_G(spieler).R79Val[P_HOWARD] = 1;
+		_G(spieler).R79Val[P_NICHELLE] = 1;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
 	}
@@ -224,7 +224,7 @@ void Room82::proc8() {
 	start_aad_wait(447, -1);
 	auto_move(6, P_CHEWY);
 
-	while (spieler_vector[2].Count != 0)
+	while (spieler_vector[P_NICHELLE].Count != 0)
 		set_up_screen(DO_SETUP);
 
 	_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 9f75a1c3a86..e2aadcd05fe 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -176,7 +176,7 @@ int Room87::proc4() {
 	flic_cut(99, CFO_MODE);
 	flic_cut(100, CFO_MODE);
 	_G(spieler).PersonGlobalDia[P_HOWARD] = -1;
-	_G(spieler).PersonDiaRoom[P_HOWARD] = 0;
+	_G(spieler).PersonDiaRoom[P_HOWARD] = false;
 	_G(spieler).flags32_10 = true;
 
 	switch_room(86);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index d6a425883f3..0a20fe7c359 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -239,7 +239,7 @@ int Room90::proc3() {
 	start_spz_wait(43, 1, false, P_CHEWY);
 	load_chewy_taf(7);
 
-	while (spieler_vector[1].Xypos[0] != 176)
+	while (spieler_vector[P_HOWARD].Xypos[0] != 176)
 		set_up_screen(DO_SETUP);
 
 	start_spz_wait(47, 1, false, P_HOWARD);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 34798c8a145..a08452ecf26 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2501,7 +2501,7 @@ void calc_person_dia(int16 p_nr) {
 
 		case 43:
 			if (p_nr == P_HOWARD) {
-				_G(spieler).PersonDiaRoom[1] = 1;
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 				_G(spieler).PersonDia[P_HOWARD] = 470;
 			} else {
 				_G(spieler).PersonDia[P_NICHELLE] = 536;
@@ -2659,7 +2659,7 @@ void calc_person_dia(int16 p_nr) {
 			int16 tmp[3];
 			for (i = 0; i < 3; ++i) {
 				tmp[i] = _G(spieler).PersonDiaRoom[i];
-				_G(spieler).PersonDiaRoom[i] = 0;
+				_G(spieler).PersonDiaRoom[i] = false;
 				_G(stopAutoMove)[i] = true;
 			}
 
@@ -2678,16 +2678,16 @@ void calc_person_dia(int16 p_nr) {
 			save_person_rnr();
 
 			if (p_nr == P_HOWARD) {
-				_G(spieler).PersonDiaRoom[0] = 1;
+				_G(spieler).PersonDiaRoom[P_CHEWY] = true;
 				switch_room(65);
-				_G(spieler).PersonDiaRoom[0] = 0;
+				_G(spieler).PersonDiaRoom[P_CHEWY] = false;
 
 			} else if (p_nr == P_NICHELLE) {
 				if (_G(spieler).PersonDia[P_NICHELLE] < 10000) {
 					_G(cur_hide_flag) = false;
 					hide_cur();
 					start_aad_wait(_G(spieler).PersonDia[P_NICHELLE], -1);
-					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE] != 0;
+					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE];
 					show_cur();
 				} else {
 					start_ads_wait(_G(spieler).PersonDia[P_NICHELLE] - 10000);


Commit: 25b3350f9f920fdba8a9519ebcc7e8c1a4cde41c
    https://github.com/scummvm/scummvm/commit/25b3350f9f920fdba8a9519ebcc7e8c1a4cde41c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Implement room 78

Changed paths:
    engines/chewy/rooms/room78.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 97ed49aeb92..7388f11d04d 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -30,9 +30,109 @@ namespace Chewy {
 namespace Rooms {
 
 void Room78::entry() {
+	_G(spieler).r76_word18DB1A = -1;
+	det->enable_sound(0, 1);
+	det->play_sound(0, 1);
+	hide_cur();
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonHide[P_CHEWY] = 1;
+	_G(spieler).PersonHide[P_HOWARD] = 1;
+	_G(spieler).PersonHide[P_NICHELLE] = 1;
+	_G(spieler).scrollx = 320;
+	set_person_pos(0, 0, P_CHEWY, P_RIGHT);
+
+	int delay = 0;
+	int destRoom;
+
+	if (_G(spieler).flags29_80) {
+		det->start_detail(3, 255, false);
+
+		int destX = 592;
+		while (destX > 0) {
+			det->set_detail_pos(3, destX, 77);
+			if (delay)
+				--delay;
+			else {
+				delay = _G(spieler).DelaySpeed / 2;
+				destX -= 4;
+			}
+			set_up_screen(DO_SETUP);
+		}
+		flags.NoPalAfterFlc = true;
+		flic_cut(101, CFO_MODE);
+		destRoom = 79;
+	} else {
+		det->start_detail(0, 255, false);
+		det->start_detail(4, 255, false);
+		int det0DestX = 608;
+		int det4DestX = 570;
+		bool exitLoopFlag = false;
+		bool flag1 = false;
+		bool flag2 = false;
+
+		while (exitLoopFlag == 0) {
+			det->set_detail_pos(0, det0DestX, 93);
+			det->set_detail_pos(4, det4DestX, 57);
+			
+			if (delay)
+				--delay;
+			else {
+				det0DestX -= 4;
+				if (det0DestX <= 276 && flag1 == 0) {
+					if (_G(spieler).flags29_20) {
+						if (det0DestX > 0)
+							flag1 = true;
+					} else {
+						flag1 = true;
+						det->stop_detail(0);
+						det->start_detail(1, 1, false);
+					}
+				}
+
+				det4DestX -= 4;
+				
+				if (det4DestX <= 222 && flag2 == 0) {
+					if (_G(spieler).flags29_10) {
+						flag2 = true;
+						det->stop_detail(4);
+						if (flag1 == 0) {
+							det->start_detail(5, 1, false);
+						} else {
+							start_detail_wait(5, 1, CFO_MODE);
+						}
+					} else {
+						if (det4DestX <= 0)
+							flag2 = true;
+					}
+				}
+
+				delay = _G(spieler).DelaySpeed / 3;
+			}
+
+			if (flag1 && flag2)
+				exitLoopFlag = true;
+
+			set_up_screen(DO_SETUP);
+		}
+
+		if (_G(spieler).flags29_10 && _G(spieler).flags29_20) {
+			_G(spieler).r76_word18DB1A = 1;
+			destRoom = 77;
+		} else {
+			_G(spieler).r76_word18DB1A = 0;
+			destRoom = 76;
+		}		
+	}
+
+	switch_room(destRoom);
+	show_cur();
 }
 
 void Room78::xit() {
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).PersonHide[P_CHEWY] = 0;
+	_G(spieler).PersonHide[P_HOWARD] = 0;
+	_G(spieler).PersonHide[P_NICHELLE] = 0;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 23e0cfc812f..813473d8b9b 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -485,6 +485,8 @@ struct Spieler : public SpielerFlags {
 
 	int16 R64Moni2Ani = 0;
 
+	// ---- //
+	int16 r76_word18DB1A = 0;
 	// ---- //
 	int16 R79Val[3] = {0, 0, 0};
 	// ---- //


Commit: 307752334930601b5e6eebb5e3086bf267f98729
    https://github.com/scummvm/scummvm/commit/307752334930601b5e6eebb5e3086bf267f98729
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Implement Room 77

Changed paths:
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp


diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 2b9b4607d12..917fd6a2aa6 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -22,25 +22,100 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room77.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room77::entry() {
+	det->enable_sound(0, 0);
+	det->enable_sound(0, 1);
+	det->play_sound(0, 0);
+	det->play_sound(0, 1);
+	_G(spieler).ScrollxStep = 2;
+	if (_G(spieler).r76_word18DB1A == 1) {
+		_G(spieler).flags29_4 = true;
+		atds->set_ats_str(452, 1, ATS_DATEI);
+	}
+
+	if (_G(spieler).flags29_4) {
+		det->set_static_ani(0, -1);
+
+		for (int i = 0; i < 3; ++i) {
+			det->show_static_spr(2 + i);
+			atds->del_steuer_bit(460 + i, ATS_AKTIV_BIT, ATS_DATEI);
+		}
+	}
+
+	if (_G(spieler).r76_word18DB1A == 1) {
+		_G(spieler).r76_word18DB1A = -1;
+		hide_cur();
+		_G(spieler).scrollx = 62;
+		set_person_pos(158, 127, P_CHEWY, P_RIGHT);
+		start_aad_wait(440, -1);
+		show_cur();
+	}
 }
 
 void Room77::xit() {
+	_G(spieler).ScrollxStep = 1;
 }
 
 int Room77::proc1() {
-	return 0;
+	if (_G(spieler).flags29_4 || !is_cur_inventar(103))
+		return 0;
+
+	hide_cur();
+	auto_move(1, P_CHEWY);
+	int diaNr, aniId;
+	if (_G(spieler).flags29_8) {
+		start_spz_wait(14, 1, false, P_CHEWY);
+		atds->set_ats_str(463, 1, ATS_DATEI);
+		_G(spieler).flags29_10 = true;
+		_G(spieler).flags29_40 = true;
+		diaNr = 441;
+		aniId = 6;
+	} else {
+		diaNr = 439;
+		aniId = 4;
+	}
+
+	cur_2_inventory();
+	start_spz(aniId, 255, false, P_CHEWY);
+	start_aad_wait(diaNr, -1);
+	show_cur();
+	if (_G(spieler).flags29_10)
+		remove_inventory(103);
+
+	return 1;
 }
 
 int Room77::proc2() {
-	return 0;
+	if (_G(spieler).flags29_4 || !is_cur_inventar(100))
+		return 0;
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+
+	int diaNr, aniId;
+	if (_G(spieler).flags29_8) {
+		start_spz_wait(14, 1, false, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		atds->set_ats_str(464, 1, 1);
+		_G(spieler).flags29_20 = true;
+		_G(spieler).flags29_40 = true;
+		diaNr = 442;
+		aniId = 6;
+	} else {
+		diaNr = 439;
+		aniId = 4;
+	}
+
+	start_spz(aniId, 255, false, P_CHEWY);
+	start_aad_wait(diaNr, -1);
+
+	show_cur();
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 7388f11d04d..ebcbd6c5183 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room78.h"
 


Commit: b8ec7a24379113f81e9c885fabc36f32020a3d60
    https://github.com/scummvm/scummvm/commit/b8ec7a24379113f81e9c885fabc36f32020a3d60
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Implement Room 76

Changed paths:
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room76.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index c969cfbeb57..760bd7698b4 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room76.h"
 
@@ -30,23 +29,189 @@ namespace Chewy {
 namespace Rooms {
 
 void Room76::entry() {
+	det->enable_sound(0,0);
+	det->enable_sound(0, 1);
+	det->play_sound(0, 0);
+	det->play_sound(0, 1);
+	_G(spieler).ScrollxStep = 2;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).r76_word18DB1E = 0;
+	set_person_pos(308, 84, P_NICHELLE, P_RIGHT);
+	set_person_pos(365, 84, P_HOWARD, P_RIGHT);
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler).PersonHide[P_NICHELLE] = true;
+	if (_G(spieler).flags29_4) {
+		atds->del_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->del_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
+	} else {
+		det->del_static_ani(2);
+		for (int i = 0; i < 3; ++i)
+			det->hide_static_spr(8 + i);
+
+		atds->set_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
+	}
+
+	if (flags.LoadGame)
+		return;
+
+	if (!_G(spieler).flags29_2) {
+		hide_cur();
+		flags.NoScroll = true;
+		_G(spieler).scrollx = 122;
+		_G(spieler).flags29_2 = true;
+		set_person_pos(128, 135, P_HOWARD, P_RIGHT);
+		proc3(420);
+		proc5();
+	} else if (!_G(spieler).r76_word18DB1A) {
+		hide_cur();
+		flags.NoScroll = true;
+		_G(spieler).scrollx = 122;
+		_G(spieler).r76_word18DB1A = -1;
+		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
+		proc3(422);
+		flags.NoScroll = false;
+	}
 }
 
 void Room76::xit() {
+	_G(spieler).ScrollxStep = 1;
+	_G(spieler).r76_word18DB1A = -1;
+}
+
+void Room76::setup_func() {
+	if (_G(spieler).r76_word18DB1E != 1 || _G(spieler).scrollx < 300)
+		return;
+
+	_G(spieler).r76_word18DB1E = 0;
+	det->start_detail(11, 1, false);
+	det->start_detail(12, 1, false);
 }
 
 void Room76::talk1() {
+	hide_cur();
+	auto_move(4, P_CHEWY);
+	auto_scroll(172, 0);
+	const int diaNr = 425 + (_G(spieler).flags32_4 ? 1 : 0);
+	start_aad_wait(diaNr, -1);
+	show_cur();
 }
 
 void Room76::talk2() {
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	int diaNr;
+	if (!_G(spieler).flags29_8)
+		diaNr = 423;
+	else if (!_G(spieler).flags29_40)
+		diaNr = 438;
+	else
+		diaNr = 421;
+
+	proc3(diaNr);
+	if (diaNr == 421)
+		proc5();
+
+	show_cur();
+}
+
+void Room76::proc3(int diaNr) {
+	start_aad_wait(diaNr, -1);
+	det->del_static_ani(2);
+	start_detail_wait(3, 1, ANI_VOR);
+	start_detail_wait(4, 2, ANI_VOR);
+	det->set_static_ani(2, -1);
+}
+
+void Room76::proc5() {
+	_G(spieler).r76_word18DB1E = 1;
+	det->del_static_ani(2);
+	det->start_detail(6, 1, false);
+	flags.NoScroll = false;
+	wait_show_screen(15);
+	auto_move(5, P_CHEWY);
+	det->hide_static_spr(10);
+	det->start_detail(13, 1, false);
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(669, 127, P_CHEWY, ANI_VOR);
+	wait_show_screen(20);
+	spieler_mi[P_CHEWY].Mode = false;
+	show_cur();
+	set_person_pos(30, 150, P_CHEWY, P_RIGHT);
+	switch_room(78);
 }
 
 int Room76::proc6() {
-	return 0;
+	int retVal = 0;
+
+	if (is_cur_inventar(93)) {
+		hide_cur();
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).flags29_8 = true;
+		retVal = 1;
+		auto_move(3, P_CHEWY);
+		proc3(424);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		det->del_static_ani(2);
+		start_detail_wait(5, 1, ANI_VOR);
+		det->set_static_ani(2, -1);
+		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_VOR);
+		show_cur();
+	} else if (is_cur_inventar(94)) {
+		hide_cur();
+		retVal = 1;
+		set_person_spr(1, P_CHEWY);
+		start_aad_wait(436, 1);
+		show_cur();
+	}
+
+	return retVal;
 }
 
 int Room76::proc7() {
-	return 0;
+	if (!is_cur_inventar(96))
+		return 0;
+	
+	if (_G(spieler).flags29_4) {
+		hide_cur();
+		auto_move(6, P_CHEWY);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		del_inventar(_G(spieler).AkInvent);
+		invent_2_slot(106);
+		invent_2_slot(105);
+		start_aad_wait(444, -1);
+		out->ausblenden(0);
+		out->set_teilpalette(pal, 255, 1);
+		start_aad_wait(443, -1);
+		_G(spieler).scrollx = 0;
+		fx_blend = BLEND3;
+		out->setze_zeiger(nullptr);
+		out->cls();
+		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
+		det->set_static_ani(2, -1);
+
+		for (int i = 0; i < 3; ++i)
+			det->show_static_spr(8 + i);
+
+		start_aad_wait(427, -1);
+		show_cur();
+		start_ads_wait(21);
+		hide_cur();
+		start_aad_wait(428, -1);
+		show_cur();
+		_G(spieler).flags29_80 = true;
+		switch_room(78);
+	} else {
+			hide_cur();
+			start_spz(16, 255, false, P_CHEWY);
+			start_aad_wait(577, -1);
+			show_cur();
+	}
+
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room76.h b/engines/chewy/rooms/room76.h
index c041c4c3ae0..44936f89c96 100644
--- a/engines/chewy/rooms/room76.h
+++ b/engines/chewy/rooms/room76.h
@@ -29,8 +29,11 @@ class Room76 {
 public:
 	static void entry();
 	static void xit();
+	static void setup_func();
 	static void talk1();
 	static void talk2();
+	static void proc3(int diaNr);
+	static void proc5();
 	static int proc6();
 	static int proc7();
 };
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 813473d8b9b..67dc5ef56aa 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -487,6 +487,7 @@ struct Spieler : public SpielerFlags {
 
 	// ---- //
 	int16 r76_word18DB1A = 0;
+	int16 r76_word18DB1E = 0;
 	// ---- //
 	int16 R79Val[3] = {0, 0, 0};
 	// ---- //


Commit: 26a40b421404aa3de293613f69316385df42ae21
    https://github.com/scummvm/scummvm/commit/26a40b421404aa3de293613f69316385df42ae21
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:43-08:00

Commit Message:
CHEWY: Fix signature of entry() for rooms 70 to 75

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room70.h
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room71.h
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room72.h
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room73.h
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room74.h
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room75.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 9d8ee811ff1..be4b5755675 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -413,12 +413,12 @@ void enter_room(int16 eib_nr) {
 	ENTRY(67);
 	ENTRY(68);
 	ENTRY_NR(69);
-	ENTRY(70);
-	ENTRY(71);
-	ENTRY(72);
-	ENTRY(73);
-	ENTRY(74);
-	ENTRY(75);
+	ENTRY_NR(70);
+	ENTRY_NR(71);
+	ENTRY_NR(72);
+	ENTRY_NR(73);
+	ENTRY_NR(74);
+	ENTRY_NR(75);
 	ENTRY(76);
 	ENTRY(77);
 	ENTRY(78);
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 7aae49c99a7..0595da99e39 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room70::entry() {
+void Room70::entry(int16 eib_nr) {
 }
 
 void Room70::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room70.h b/engines/chewy/rooms/room70.h
index 811545b5c7e..02977f0f6e5 100644
--- a/engines/chewy/rooms/room70.h
+++ b/engines/chewy/rooms/room70.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room70 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 };
 
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 7c1b21cf9d7..8bf570b4390 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room71::entry() {
+void Room71::entry(int16 eib_nr) {
 }
 
 void Room71::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room71.h b/engines/chewy/rooms/room71.h
index 4738209afc4..6f031471ee7 100644
--- a/engines/chewy/rooms/room71.h
+++ b/engines/chewy/rooms/room71.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room71 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static int proc1();
 	static int proc6();
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 6fc9f368ed9..427eb8d738a 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room72::entry() {
+void Room72::entry(int16 eib_nr) {
 }
 
 void Room72::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room72.h b/engines/chewy/rooms/room72.h
index 339748d12af..0768b28b608 100644
--- a/engines/chewy/rooms/room72.h
+++ b/engines/chewy/rooms/room72.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room72 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 };
 
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 7ec86ee0188..2bf40bb03da 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room73::entry() {
+void Room73::entry(int16 eib_nr) {
 }
 
 void Room73::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room73.h b/engines/chewy/rooms/room73.h
index 23aab00569f..77946f80910 100644
--- a/engines/chewy/rooms/room73.h
+++ b/engines/chewy/rooms/room73.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room73 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static int proc1();
 	static int proc2();
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index d2d0fce33bc..25db5c2af03 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room74::entry() {
+void Room74::entry(int16 eib_nr) {
 }
 
 void Room74::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room74.h b/engines/chewy/rooms/room74.h
index 46625c1cb1e..1e8a24fd408 100644
--- a/engines/chewy/rooms/room74.h
+++ b/engines/chewy/rooms/room74.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room74 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static int proc1();
 };
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 281c8388d01..377f6cd2ede 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -29,7 +29,7 @@
 namespace Chewy {
 namespace Rooms {
 
-void Room75::entry() {
+void Room75::entry(int16 eib_nr) {
 }
 
 void Room75::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room75.h b/engines/chewy/rooms/room75.h
index aed26b2ed3b..db545a0b912 100644
--- a/engines/chewy/rooms/room75.h
+++ b/engines/chewy/rooms/room75.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room75 {
 public:
-	static void entry();
+	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 };
 


Commit: 2dd8cfa445eedee543623fdb513ee2e43a4fcbb4
    https://github.com/scummvm/scummvm/commit/2dd8cfa445eedee543623fdb513ee2e43a4fcbb4
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:44-08:00

Commit Message:
CHEWY: Implement Room 75 + partial implementation of Room 70

Changed paths:
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room70.h
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room75.h


diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 0595da99e39..2dad0ae2442 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -35,5 +35,50 @@ void Room70::entry(int16 eib_nr) {
 void Room70::xit(int16 eib_nr) {
 }
 
+void Room70::setup_func() {
+	calc_person_look();
+
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+
+	int howDestX, nicDestX;
+	if (posX > 40) {
+		howDestX = 52;
+		nicDestX = 100;
+	} else if (posX < 230) {
+		howDestX = 83;
+		nicDestX = 163;
+	} else if (posX < 445) {
+		howDestX = 261;
+		nicDestX = 329;
+	} else {
+		howDestX = 493;
+		nicDestX = 543;
+	}
+
+	go_auto_xy(howDestX, 111, P_HOWARD, P_RIGHT);
+	go_auto_xy(nicDestX, 110, P_NICHELLE, P_RIGHT);	
+}
+
+void Room70::proc1() {
+	_G(cur_hide_flag) = 0;
+	hide_cur();
+	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
+	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
+	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
+	go_auto_xy(266, 113, P_HOWARD, ANI_VOR);
+	show_cur();
+}
+
+void Room70::proc2() {
+	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
+	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
+	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
+}
+
+void Room70::proc3() {
+	set_person_pos(587, 114, P_CHEWY, P_LEFT);
+	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
+	set_person_pos(561, 112, P_HOWARD, P_LEFT);
+}
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room70.h b/engines/chewy/rooms/room70.h
index 02977f0f6e5..8bee95e297e 100644
--- a/engines/chewy/rooms/room70.h
+++ b/engines/chewy/rooms/room70.h
@@ -29,6 +29,10 @@ class Room70 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
+	static void proc1();
+	static void proc2();
+	static void proc3();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 377f6cd2ede..368f3b8b04f 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -22,17 +22,75 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room75.h"
+#include "chewy/rooms/room70.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room75::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = Room70::setup_func;
+
+	if (flags.LoadGame)
+		return;
+
+	switch (eib_nr) {
+	case 103:
+		_G(spieler.scrollx = 188);
+		proc1();
+		break;		
+	case 104:
+		Room70::proc3();
+		break;
+	case 111:
+		Room70::proc2();
+		break;
+	default:
+		break;
+	}
 }
 
 void Room75::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 75)
+		return;
+
+	switch (eib_nr) {
+	case 115:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 73;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 73;
+		break;
+	case 116:
+	case 117:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 70;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
+		break;
+	default:
+		break;
+	}
+}
+
+void Room75::proc1() {
+	_G(cur_hide_flag) = 0;
+	hide_cur();
+	set_person_pos(363, 110, P_CHEWY, P_LEFT);
+	set_person_pos(322, 85, P_NICHELLE, P_RIGHT);
+	set_person_pos(317, 96, P_HOWARD, P_RIGHT);
+	go_auto_xy(318, 110, P_NICHELLE, ANI_VOR);
+	show_cur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room75.h b/engines/chewy/rooms/room75.h
index db545a0b912..1977baf07a3 100644
--- a/engines/chewy/rooms/room75.h
+++ b/engines/chewy/rooms/room75.h
@@ -29,6 +29,7 @@ class Room75 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void proc1();
 };
 
 } // namespace Rooms


Commit: 25ef3ca14a861f7c8b74b2e9599163b8a9ccf933
    https://github.com/scummvm/scummvm/commit/25ef3ca14a861f7c8b74b2e9599163b8a9ccf933
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:44-08:00

Commit Message:
CHEWY: Implement Room 74

Changed paths:
    engines/chewy/rooms/room74.cpp


diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 25db5c2af03..c85752fbf42 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -22,21 +22,95 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
+#include "chewy/rooms/room70.h"
 #include "chewy/rooms/room74.h"
+#include "chewy/rooms/room75.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room74::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = Room70::setup_func;
+
+	if (_G(spieler).flags29_1)
+		det->start_detail(0, 255, false);
+
+	if (flags.LoadGame)
+		return;
+
+	switch (eib_nr) {
+	case 105:
+		Room70::proc2();
+		break;
+	case 108:
+		_G(spieler).scrollx = 188;
+		Room75::proc1();
+		break;
+	case 109:
+		Room70::proc3();
+		break;
+	default:
+		break;
+	}
+	
 }
 
 void Room74::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 74)
+		return;
+
+	switch (eib_nr) {
+	case 112:
+	case 113:
+		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 72;
+		break;
+
+	case 114:
+		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 71;
+		break;
+
+	default:
+		break;
+	}
 }
 
 int Room74::proc1() {
-	return 0;
+	int retVal = 0;
+	hide_cur();
+	if (is_cur_inventar(99)) {
+		retVal = 1;
+		_G(spieler).flags28_80 = true;
+		auto_move(4, P_CHEWY);
+		_G(spieler).PersonHide[P_HOWARD] = true;
+		start_detail_wait(1, 1, ANI_VOR);
+		set_person_pos(272, 116, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = 0;
+		det->start_detail(0, 255, false);
+		_G(spieler).flags29_1 = true;
+		atds->set_ats_str(435, 1, ATS_DATEI);
+	} else if (!_G(spieler).inv_cur && _G(spieler).flags28_80) {
+		atds->set_steuer_bit(435, ATS_AKTIV_BIT, ATS_DATEI);
+		auto_move(5, P_CHEWY);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		new_invent_2_cur(100);
+	}
+
+	show_cur();
+	return retVal;
 }
 
 } // namespace Rooms


Commit: a88068be796e90e343bbf6752e2ea293b87fd090
    https://github.com/scummvm/scummvm/commit/a88068be796e90e343bbf6752e2ea293b87fd090
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:44-08:00

Commit Message:
CHEWY: Implement Room 73

Changed paths:
    engines/chewy/rooms/room73.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 2bf40bb03da..1432a29aa18 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -22,25 +22,95 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
+#include "chewy/rooms/room70.h"
 #include "chewy/rooms/room73.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room73::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = Room70::setup_func;
+	if (_G(spieler).flags28_20)
+		det->show_static_spr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
+
+	if (flags.LoadGame)
+		return;
+
+	switch (eib_nr) {
+	case 106:
+		Room70::proc1();
+		break;
+	case 115:
+		Room70::proc2();
+	default:
+		break;
+	}
 }
 
 void Room73::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 73)
+		return;
+
+	switch (eib_nr) {
+	case 110:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 71;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 71;
+		break;
+	case 111:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 75;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 75;
+		break;
+	default:
+		break;
+	}
 }
 
 int Room73::proc1() {
-	return 0;
+	if (_G(spieler).inv_cur && !_G(spieler).flags28_20)
+		return 0;
+
+	hide_cur();
+	_G(spieler).flags28_20 = true;
+	auto_move(3, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	atds->del_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_ats_str(430, 1, ATS_DATEI);
+	det->show_static_spr(3);
+	show_cur();
+
+	return 1;	
 }
 
 int Room73::proc2() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	_G(spieler).flags28_40 = true;
+	auto_move(4, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->hide_static_spr(3);
+	det->hide_static_spr(4);
+	atds->set_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
+	new_invent_2_cur(99);
+	show_cur();
+
+	return 1;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 67dc5ef56aa..04e2b6e9766 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -248,6 +248,7 @@ struct SpielerFlags {
 	bool R56Kneipe : 1;
 	bool R56WhiskyMix : 1;
 
+	// flags 25
 	bool R57StudioAuf : 1;
 	bool R59PosterWeg : 1;
 	bool R62Flucht : 1;


Commit: 4e37d76f25914ab47d3e226562b7fc1156bd69f9
    https://github.com/scummvm/scummvm/commit/4e37d76f25914ab47d3e226562b7fc1156bd69f9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:44-08:00

Commit Message:
CHEWY: Implement Room 72

Changed paths:
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room72.h
    engines/chewy/rooms/room78.cpp


diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 427eb8d738a..0c1640f8adb 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room72.h"
 
@@ -30,9 +29,77 @@ namespace Chewy {
 namespace Rooms {
 
 void Room72::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	
+	if (_G(spieler).flags28_10) {
+		_G(zoom_horizont) = 110;
+		det->hide_static_spr(0);
+	} else {
+		_G(spieler).ZoomXy[P_HOWARD][0] = 20;
+		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
+		_G(spieler).ZoomXy[P_NICHELLE][0] = 20;
+		_G(spieler).ZoomXy[P_NICHELLE][1] = 40;
+		_G(zoom_horizont) = 140;
+		spieler_mi[P_CHEWY].Mode = true;
+		hide_cur();
+	}
+
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+
+	if (flags.LoadGame || _G(spieler).flags28_10)
+		return;
+
+	switch (eib_nr) {
+	case 112:
+		set_person_pos(50, 129, P_CHEWY, P_RIGHT);
+		set_person_pos(15, 103, P_HOWARD, P_RIGHT);
+		set_person_pos(-15, 102, P_NICHELLE, P_RIGHT);
+		go_auto_xy(185, 130, P_CHEWY, ANI_GO);
+		go_auto_xy(147, 103, P_HOWARD, ANI_GO);
+		go_auto_xy(120, 104, P_NICHELLE, ANI_VOR);
+		proc1(84);
+		test_intro(23);
+		ERROR
+		break;
+	case 113:
+		set_person_pos(213, 129, P_CHEWY, P_LEFT);
+		set_person_pos(262, 103, P_HOWARD, P_LEFT);
+		set_person_pos(293, 102, P_NICHELLE, P_LEFT);
+		go_auto_xy(120, 130, P_CHEWY, ANI_GO);
+		go_auto_xy(154, 102, P_HOWARD, ANI_GO);
+		go_auto_xy(186, 102, P_NICHELLE, ANI_VOR);
+		proc1(85);
+		test_intro(23);
+		ERROR
+		break;
+	default:
+		break;
+	}
 }
 
 void Room72::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+}
+
+void Room72::proc1(int16 flicNr) {
+	atds->set_steuer_bit(389, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(spieler).flags28_10 = true;
+	wait_show_screen(7);
+	start_aad_wait(437, -1);
+	flic_cut(flicNr, CFO_MODE);
+	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
+	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	det->hide_static_spr(0);
+	set_up_screen(DO_SETUP);
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	spieler_mi[P_CHEWY].Mode = false;
+	show_cur();
+	switch_room(76);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room72.h b/engines/chewy/rooms/room72.h
index 0768b28b608..950bd20cebb 100644
--- a/engines/chewy/rooms/room72.h
+++ b/engines/chewy/rooms/room72.h
@@ -29,6 +29,7 @@ class Room72 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void proc1(int16 flicNr);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index ebcbd6c5183..57bc256e04a 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -34,9 +34,9 @@ void Room78::entry() {
 	det->play_sound(0, 1);
 	hide_cur();
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonHide[P_CHEWY] = 1;
-	_G(spieler).PersonHide[P_HOWARD] = 1;
-	_G(spieler).PersonHide[P_NICHELLE] = 1;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(spieler).scrollx = 320;
 	set_person_pos(0, 0, P_CHEWY, P_RIGHT);
 
@@ -129,9 +129,9 @@ void Room78::entry() {
 
 void Room78::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonHide[P_CHEWY] = 0;
-	_G(spieler).PersonHide[P_HOWARD] = 0;
-	_G(spieler).PersonHide[P_NICHELLE] = 0;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	_G(spieler).PersonHide[P_NICHELLE] = false;
 }
 
 } // namespace Rooms


Commit: f5a4c9a7cb597d7b17ef4d8c2fb91aa19dd516b3
    https://github.com/scummvm/scummvm/commit/f5a4c9a7cb597d7b17ef4d8c2fb91aa19dd516b3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:45-08:00

Commit Message:
CHEWY: Finish the implementation of Room 70

Changed paths:
    engines/chewy/rooms/room70.cpp


diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 2dad0ae2442..8718cf3113b 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room70.h"
 
@@ -30,6 +29,35 @@ namespace Chewy {
 namespace Rooms {
 
 void Room70::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).ScrollxStep = 2;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(zoom_horizont) = 110;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	SetUpScreenFunc = setup_func;
+
+	if (flags.LoadGame)
+		return;
+
+	switch (eib_nr) {
+	case 116:
+		proc2();
+		break;
+	case 117:
+		proc3();
+		break;
+	default:
+		_G(spieler).scrollx = 62;
+		proc1();
+		break;
+	}
 }
 
 void Room70::xit(int16 eib_nr) {


Commit: 7d376524b5dd2b99119555ffd6bb8b446676b689
    https://github.com/scummvm/scummvm/commit/7d376524b5dd2b99119555ffd6bb8b446676b689
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Beginnings of changes to ads_string_start

Frankly, the method is a huge monstrosity in the IDB, so there's
little hope of reversing it from scratch to include all the
changes that occured in the production release. As such, for now,
I'll be focusing on identifying places that set local variables
like talk_ani that weren't present in the prior source we were
given, and at least adding these changes to the existing code
we have.

In any case, this method only controls special animations that
occur when certain specific speech texts happen. So it's not
all that major an issue if the default animation is used.

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index a08452ecf26..24268ea9c8f 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1363,27 +1363,22 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		}
 		break;
 
+	case 61:
+	case R14_EREMIT_DIA:
 	case R8_NIMOYANER1_DIA:
 	case R8_NIMOYANER2_DIA:
-		altes_format = true;
-		switch (person_nr) {
-		case 0:
+		if (person_nr <= P_CHEWY) {
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			} else {
 				stop_spz();
 			}
-			break;
-
-		case 1:
+		} else if (person_nr == P_HOWARD) {
 			if (mode == AAD_STR_START) {
-				talk_start_ani = 15;
+				talk_ani = 15;
 			} else {
-				talk_stop_ani = 15;
-				talk_start_ani = -1;
+				det->stop_detail(15);
 			}
-			break;
-
 		}
 		break;
 
@@ -1425,8 +1420,8 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		}
 		break;
 
-	case R14_EREMIT_DIA:
 	case 24:
+	case 26:
 		altes_format = true;
 		switch (person_nr) {
 		case 0:
@@ -2015,8 +2010,6 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		}
 		break;
 
-		break;
-
 	case R68_KEEPER_DIA:
 		switch (person_nr) {
 		case 0:
@@ -2047,7 +2040,11 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 		}
 		break;
+
+	default:
+		break;
 	}
+
 	if (altes_format) {
 		det->start_detail(talk_start_ani, 255, ANI_VOR);
 		det->stop_detail(talk_stop_ani);


Commit: 766e351cfd56c362addfa83e5fe24c675c2a8717
    https://github.com/scummvm/scummvm/commit/766e351cfd56c362addfa83e5fe24c675c2a8717
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Changes for a large switch in atds_string_start

Changed paths:
    engines/chewy/defines.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 662f6452b44..9a73f1c5afa 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -188,6 +188,7 @@ enum SetupScreenMode {
 #define P_CHEWY 0
 #define P_HOWARD 1
 #define P_NICHELLE 2
+#define P_3 3
 
 #define CHEWY_NORMAL 1
 #define CHEWY_BORK 2
@@ -195,6 +196,7 @@ enum SetupScreenMode {
 #define CHEWY_PUMPKIN 4
 #define CHEWY_ROCKER 5
 #define CHEWY_JMANS 6
+#define CHEWY_ANI7 7
 
 #define P_LEFT 0
 #define P_RIGHT 1
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 24268ea9c8f..916e6e2e9f6 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1269,10 +1269,24 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 #define R68_KEEPER_DIA 10020
 #define R13_BORK_DIA 33
 
+#define START_STOP_TMP \
+	if (mode == AAD_STR_START) { \
+		talk_ani = tmp; \
+	} else { \
+		det->stop_detail(tmp); \
+	}
+
+#define START_STOP(NUM) \
+	if (mode == AAD_STR_START) \
+		talk_ani = NUM; \
+	else \
+		det->stop_detail(NUM) \
+
+
 void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
 	int16 talk_stop_ani = -1;
 	int16 talk_show_static = -1;
-	int16 tmp;
+	int16 tmp = -1;
 	int16 anz;
 	int16 i;
 	int16 altes_format;
@@ -1374,11 +1388,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				stop_spz();
 			}
 		} else if (person_nr == P_HOWARD) {
-			if (mode == AAD_STR_START) {
-				talk_ani = 15;
-			} else {
-				det->stop_detail(15);
-			}
+			START_STOP(15);
 		}
 		break;
 
@@ -1699,26 +1709,76 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R67_PAPA1_DIA:
 	case R67_PAPA2_DIA:
 		switch (person_nr) {
-		case 2:
-			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-			case 42:
-				if (mode == AAD_STR_START) {
-					room->set_timer_status(8, TIMER_STOP);
-					det->del_static_ani(8);
-					talk_ani = 2;
-				} else {
-					room->set_timer_status(8, TIMER_START);
-					det->stop_detail(2);
-					det->set_static_ani(8, -1);
+		case P_CHEWY:
+			if (mode == AAD_STR_START) {
+				switch (_G(spieler).ChewyAni) {
+				case CHEWY_NORMAL:
+					ani_nr = CH_TALK3;
+					break;
+
+				case CHEWY_BORK:
+					ani_nr = 68;
+					break;
+
+				case CHEWY_PUMPKIN:
+					ani_nr = CH_PUMP_TALK;
+					break;
+
+				case CHEWY_ROCKER:
+					ani_nr = CH_ROCK_TALK1;
+					break;
+
+				case CHEWY_JMANS:
+					ani_nr = CH_JM_TALK;
+					break;
+
+				case CHEWY_ANI7:
+					ani_nr = 46;
+					break;
+
+				default:
+					ani_nr = -1;
+					break;
+
 				}
-				break;
+				if (ani_nr != -1)
+					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 
-			case 28:
-				if (mode == AAD_STR_START) {
-					talk_ani = dia_nr - 194;
-				} else {
-					det->stop_detail(dia_nr - 194);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case P_HOWARD:
+			if (mode == AAD_STR_START) {
+				switch (_G(spieler).mi[1]) {
+				case 2:
+					start_spz(50, 255, ANI_VOR, P_HOWARD);
+					break;
+				case 3:
+					start_spz(57, 255, ANI_VOR, P_HOWARD);
+					break;
+				default:
+					start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+					break;
 				}
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case P_3:
+			if (mode == AAD_STR_START) {
+				det->stop_detail(2);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case P_NICHELLE:
+			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+			case 28:
+				START_STOP(dia_nr - 194);
 				break;
 
 			case 40:
@@ -1726,40 +1786,38 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				case 202:
 				case 209:
 				case 211:
-					if (mode == AAD_STR_START) {
-						talk_ani = 3;
-					} else {
-						det->stop_detail(3);
-					}
+					START_STOP(3);
 					break;
 
 				case 213:
-					if (mode == AAD_STR_START) {
-						talk_ani = 5;
-					} else {
-						det->stop_detail(5);
-					}
+					START_STOP(5);
 					break;
 
 				case 205:
 				case 227:
-					if (mode == AAD_STR_START) {
-						talk_ani = 14;
-					} else {
-						det->stop_detail(14);
-					}
+					START_STOP(14);
 					break;
 
 				case 215:
 				case 237:
 				case 375:
-					if (mode == AAD_STR_START) {
-						talk_ani = 2;
-					} else {
-						det->stop_detail(2);
-					}
+					START_STOP(2);
 					break;
 
+				default:
+					break;
+				}
+				break;
+
+			case 42:
+				if (mode == AAD_STR_START) {
+					room->set_timer_status(8, TIMER_STOP);
+					det->del_static_ani(8);
+					talk_ani = 2;
+				} else {
+					room->set_timer_status(8, TIMER_START);
+					det->stop_detail(2);
+					det->set_static_ani(8, -1);
 				}
 				break;
 
@@ -1783,33 +1841,17 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				case 260:
 				case 256:
 				case 400:
-					if (mode == AAD_STR_START) {
-
-						talk_ani = 14;
-					} else {
-
-						det->stop_detail(14);
-
-					}
+					START_STOP(14);
 					break;
 
+				default:
+					break;
 				}
 				break;
 
 			case 49:
-				if (mode == AAD_STR_START) {
-					talk_ani = 2;
-				} else {
-					det->stop_detail(2);
-				}
-				break;
-
-			case 53:
-				if (mode == AAD_STR_START) {
-					talk_ani = 3;
-				} else {
-					det->stop_detail(3);
-				}
+			case 64:
+				START_STOP(2);
 				break;
 
 			case 50:
@@ -1828,12 +1870,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					tmp = 10;
 					break;
 
+				default:
+					break;
 				}
-				if (mode == AAD_STR_START) {
-					talk_ani = tmp;
-				} else {
-					det->stop_detail(tmp);
-				}
+
+				START_STOP_TMP
+				break;
+
+			case 53:
+				START_STOP(3);
 				break;
 
 			case 55:
@@ -1850,20 +1895,11 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					tmp = 21;
 					break;
 
+				default:
+					break;
 				}
-				if (mode == AAD_STR_START) {
-					talk_ani = tmp;
-				} else {
-					det->stop_detail(tmp);
-				}
-				break;
 
-			case 57:
-				if (mode == AAD_STR_START) {
-					talk_ani = 1;
-				} else {
-					det->stop_detail(1);
-				}
+				START_STOP_TMP
 				break;
 
 			case 56:
@@ -1882,12 +1918,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					tmp = 3;
 					break;
 
+				default:
+					break;
 				}
-				if (mode == AAD_STR_START) {
-					talk_ani = tmp;
-				} else {
-					det->stop_detail(tmp);
-				}
+
+				START_STOP_TMP
+				break;
+
+			case 57:
+				START_STOP(1);
 				break;
 
 			case 63:
@@ -1901,27 +1940,20 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					tmp = 14;
 					break;
 
+				default:
+					break;
 				}
-				if (mode == AAD_STR_START) {
-					talk_ani = tmp;
-				} else {
-					det->stop_detail(tmp);
-				}
-				break;
 
-			case 64:
-				if (mode == AAD_STR_START) {
-					talk_ani = 2;
-				} else {
-					det->stop_detail(2);
-				}
+				START_STOP_TMP
 				break;
 
 			case 67:
 				if (mode == AAD_STR_START) {
-					talk_ani = 1;
+					if (dia_nr != 376)
+						talk_ani = 1;
 				} else {
-					det->stop_detail(1);
+					if (dia_nr != 376)
+						det->stop_detail(1);
 				}
 				break;
 
@@ -1942,63 +1974,129 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					tmp = 3;
 					break;
 
+				default:
+					break;
+				}
+
+				START_STOP_TMP
+				break;
+
+			case 82:
+				switch (dia_nr) {
+				case 446:
+					tmp = 8;
+					break;
+				case 447:
+				case 448:
+				case 449:
+				case 450:
+				case 451:
+				case 454:
+					tmp = 7;
+					break;
+				case 452:
+					tmp = 2;
+					break;
+				case 453:
+					tmp = 4;
+					break;
+				default:
+					break;
+				}
+
+				START_STOP_TMP
+				break;
+
+			case 84:
+				if (dia_nr == 477 || dia_nr == 478 || dia_nr == 481) {
+					if (mode == AAD_STR_START) {
+						talk_ani = 6;
+						stop_ani = 7;
+					} else {
+						talk_ani = 7;
+						stop_ani = 6;
+					}
+				
+					START_STOP_TMP
 				}
+				break;
+
+			case 85:
 				if (mode == AAD_STR_START) {
-					talk_ani = tmp;
+					talk_ani = 0;
 				} else {
-					det->stop_detail(tmp);
+					talk_ani = 1;
+					stop_ani = 0;
 				}
 				break;
 
-			}
-			break;
+			case 87:
+				if (mode == AAD_STR_START) {
+					talk_ani = 1;
+					stop_ani = 2;
+				} else {
+					talk_ani = 2;
+					stop_ani = 1;
+				}
+				break;
 
-		case 1:
-			if (mode == AAD_STR_START) {
-				start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-			} else {
-				stop_spz();
-			}
-			break;
+			case 88:
+				if (mode == AAD_STR_START) {
+					talk_ani = 3;
+					stop_ani = 4;
+				} else {
+					talk_ani = 4;
+					stop_ani = 3;
+				}
+				break;
 
-		case 3:
-			if (mode == AAD_STR_START) {
-				start_spz(NI_TALK_L, 255, ANI_VOR, P_NICHELLE);
-			} else {
-				stop_spz();
-			}
-			break;
+			case 89:
+				START_STOP(3);
+				break;
 
-		case 0:
-			if (mode == AAD_STR_START) {
-				switch (_G(spieler).ChewyAni) {
-				case CHEWY_NORMAL:
-					ani_nr = CH_TALK3;
+			case 93:
+				switch (dia_nr) {
+				case 549:
+				case 616:
+					START_STOP(0);
 					break;
 
-				case CHEWY_PUMPKIN:
-					ani_nr = CH_PUMP_TALK;
+				case 550:
+					START_STOP(7);
 					break;
 
-				case CHEWY_ROCKER:
-					ani_nr = CH_ROCK_TALK1;
+				case 10027:
+					START_STOP(1);
+					break;
+				
+				default:
 					break;
+				}
+				break;
 
-				case CHEWY_JMANS:
-					ani_nr = CH_JM_TALK;
+			case 94:
+				switch (dia_nr) {
+				case 539:
+				case 551:
+					START_STOP(0);
 					break;
 
-				default:
-					ani_nr = -1;
+				case 552:
+					START_STOP(2);
 					break;
 
+				default:
+					break;
 				}
-				if (ani_nr != -1)
-					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-			} else {
-				stop_spz();
+				break;
+
+			default:
+				break;
 			}
 			break;
+
+		default:
+			break;
 		}
 		break;
 
@@ -2021,11 +2119,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			break;
 
 		case 2:
-			if (mode == AAD_STR_START) {
-				talk_ani = 16;
-			} else {
-				det->stop_detail(16);
-			}
+			START_STOP(16);
 			break;
 
 		case 3:


Commit: be7e66a1d1410dda4930c0b5635e7cb13fd0df07
    https://github.com/scummvm/scummvm/commit/be7e66a1d1410dda4930c0b5635e7cb13fd0df07
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Add a few ChewyAni checks to atds_string_start

Changed paths:
    engines/chewy/defines.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 9a73f1c5afa..e0f85cac67b 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -189,6 +189,7 @@ enum SetupScreenMode {
 #define P_HOWARD 1
 #define P_NICHELLE 2
 #define P_3 3
+#define P_4 4
 
 #define CHEWY_NORMAL 1
 #define CHEWY_BORK 2
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 916e6e2e9f6..1e8f2087c5b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1342,6 +1342,14 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				ani_nr = CH_TALK3;
 				break;
 
+			case CHEWY_BORK:
+				ani_nr = 68;
+				break;
+
+			case CHEWY_PUMPKIN:
+				ani_nr = CH_PUMP_TALK;
+				break;
+
 			case CHEWY_ROCKER:
 				ani_nr = CH_ROCK_TALK1;
 				break;
@@ -1350,17 +1358,18 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				ani_nr = CH_JM_TALK;
 				break;
 
-			case CHEWY_PUMPKIN:
-				ani_nr = CH_PUMP_TALK;
+			case CHEWY_ANI7:
+				ani_nr = 46;
 				break;
 
 			default:
 				ani_nr = -1;
 				break;
-
 			}
+
 			if (ani_nr != -1)
 				start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+
 		} else {
 			stop_spz();
 		}
@@ -1539,9 +1548,24 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case 186:
 	case R41_HOOGY_DIA:
 		switch (person_nr) {
-		case 1:
-		case 2:
-		case 4:
+		case P_CHEWY:
+			if (mode == AAD_STR_START) {
+				if (_G(spieler).R28ChewyPump)
+					ani_nr = CH_PUMP_TALK;
+				else if (_G(spieler).ChewyAni == 5)
+					ani_nr = CH_ROCK_TALK1;
+				else
+					ani_nr = CH_TALK3;
+
+				start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			} else {
+				stop_spz();
+			}
+			break;
+
+		case P_HOWARD:
+		case P_NICHELLE:
+		case P_4:
 			if (person_nr == 4) {
 				anz = 2;
 				tmp = 3;
@@ -1558,18 +1582,6 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				++tmp;
 			}
 			break;
-
-		case 0:
-			if (mode == AAD_STR_START) {
-				if (_G(spieler).R28ChewyPump)
-					ani_nr = CH_PUMP_TALK;
-				else
-					ani_nr = CH_TALK3;
-				start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
-			} else {
-				stop_spz();
-			}
-			break;
 		}
 		break;
 


Commit: f3755b3788c3e0dc65f9988ebebe286be49eab46
    https://github.com/scummvm/scummvm/commit/f3755b3788c3e0dc65f9988ebebe286be49eab46
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Add semicolons to START_STOP_TMP usage

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 1e8f2087c5b..f2f9a049dde 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1270,11 +1270,10 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 #define R13_BORK_DIA 33
 
 #define START_STOP_TMP \
-	if (mode == AAD_STR_START) { \
+	if (mode == AAD_STR_START) \
 		talk_ani = tmp; \
-	} else { \
-		det->stop_detail(tmp); \
-	}
+	else \
+		det->stop_detail(tmp)
 
 #define START_STOP(NUM) \
 	if (mode == AAD_STR_START) \
@@ -1886,7 +1885,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 53:
@@ -1911,7 +1910,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 56:
@@ -1934,7 +1933,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 57:
@@ -1956,7 +1955,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 67:
@@ -1990,7 +1989,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 82:
@@ -2016,7 +2015,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 					break;
 				}
 
-				START_STOP_TMP
+				START_STOP_TMP;
 				break;
 
 			case 84:
@@ -2029,7 +2028,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 						stop_ani = 6;
 					}
 				
-					START_STOP_TMP
+					START_STOP_TMP;
 				}
 				break;
 
@@ -2162,6 +2161,9 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	}
 }
 
+#undef START_STOP
+#undef START_STOP_TMP
+
 void calc_inv_use_txt(int16 test_nr) {
 	int scrollx, scrolly;
 	int16 ret;


Commit: ee322661025a163a43d539352c1268e403fcd517
    https://github.com/scummvm/scummvm/commit/ee322661025a163a43d539352c1268e403fcd517
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Implement Room 71

Changed paths:
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room71.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 8bf570b4390..873dd3ceb82 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room71.h"
 
@@ -30,20 +29,271 @@ namespace Chewy {
 namespace Rooms {
 
 void Room71::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->enable_sound(0, 1);
+	det->play_sound(0, 0);
+	det->play_sound(0, 1);
+	_G(spieler).ScrollxStep = 2;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 8;
+	_G(spieler).ZoomXy[P_HOWARD][1] = 16;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 8;
+	_G(spieler).ZoomXy[P_NICHELLE][1] = 16;
+	_G(zoom_horizont) = 0;
+	_G(spieler).r71_word18DB16 = 0;
+	_G(spieler).r71_word18DB18 = 0;
+	SetUpScreenFunc = setup_func;
+	_G(spieler).DiaAMov = 4;
+	if (!_G(spieler).flags28_2 && !_G(spieler).flags28_4) {
+		_G(timer_nr)[0] = room->set_timer(0, 10);
+		det->set_static_ani(0, -1);
+	} else if (_G(spieler).flags28_2) {
+		det->start_detail(2, 255, false);
+		det->show_static_spr(8);
+		det->hide_static_spr(2);
+		det->hide_static_spr(3);
+	} else if (_G(spieler).flags28_4) {
+		det->show_static_spr(5);
+		det->hide_static_spr(3);
+	}
+
+	if (flags.LoadGame)
+		return;
+
+	switch (eib_nr) {
+	case 110:
+		set_person_pos(500, 67, P_CHEWY, P_LEFT);
+		set_person_pos(568, 31, P_NICHELLE, P_LEFT);
+		set_person_pos(538, 35, P_HOWARD, P_LEFT);
+		break;
+	case 114:
+		set_person_pos(70, 48, P_CHEWY, P_RIGHT);
+		set_person_pos(165, 16, P_NICHELLE, P_RIGHT);
+		set_person_pos(120, 18, P_HOWARD, P_RIGHT);
+		break;
+	default:
+		break;
+	}
 }
 
 void Room71::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 71)
+		return;
+
+	switch (eib_nr) {
+	case 105:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 74;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 74;
+		break;
+	case 106:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 73;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 73;
+	default:
+		break;
+	}
+}
+
+void Room71::setup_func() {
+	calc_person_look();
+
+	if (_G(spieler).r71_word18DB16) {
+		if (_G(spieler).r71_word18DB18)
+			--_G(spieler).r71_word18DB18;
+		else {
+			_G(spieler).r71_word18DB18 = (_G(spieler).DelaySpeed + 1) / 2;
+			if (_G(spieler).r71_word18DB16 == 1) {
+				det->set_static_pos(3, 244 + g_engine->_rnd.getRandomNumber(4), -1 * g_engine->_rnd.getRandomNumber(4), false, false);				
+			} else {
+				det->set_static_pos(5, 198 + g_engine->_rnd.getRandomNumber(3), -1 * g_engine->_rnd.getRandomNumber(3), false, false);
+			}
+		}
+	} else {
+		const int posX = spieler_vector[P_CHEWY].Xypos[0];
+		int howDestX, howDestY, nicDestX, nicDestY;
+		if (posX < 40) {
+			howDestX = 82;
+			howDestY = 18;
+			nicDestX = 127;
+			nicDestY = 19;
+		} else if (posX < 190) {
+			howDestX = 229;
+			howDestY = 22;
+			nicDestX = 268;
+			nicDestY = 22;
+		} else if (posX < 290) {
+			howDestX = 329;
+			howDestY = 26;
+			nicDestX = 368;
+			nicDestY = 29;
+		} else if (posX < 420) {
+			howDestX = 434;
+			howDestY = 36;
+			nicDestX = 477;
+			nicDestY = 32;
+		} else {
+			howDestX = 538;
+			howDestY = 35;
+			nicDestX = 568;
+			nicDestY = 31;
+		}
+
+		go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
+		go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
+	}
 }
 
 int Room71::proc1() {
-	return 0;
+	if (_G(spieler).inv_cur) {
+		flags.NoScroll = false;
+		return 0;
+	}
+
+	hide_cur();
+	auto_move(2, P_CHEWY);
+	flags.NoScroll = true;
+	auto_scroll(256, 0);
+	_G(spieler).r71_word18DB18 = 0;
+	if (menu_item == CUR_HOWARD) {
+		proc4();
+		if (_G(spieler).flags28_4) {
+			if (_G(spieler).R71Val2)
+				proc2();
+			else
+				_G(spieler).R71Val1 = 1;
+		}
+	} else if (menu_item == CUR_NICHELLE) {
+		proc3();
+		if (_G(spieler).flags28_4) {
+			if (_G(spieler).R71Val1)
+				proc2();
+			else
+				_G(spieler).R71Val2 = 1;
+		}
+	} else {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		proc5(3);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+	}
+
+	if (!_G(spieler).flags28_2)
+		start_aad_wait(432, -1);
+
+	show_cur();
+	flags.NoScroll = false;
+	return 1;
+}
+
+void Room71::proc2() {
+	start_aad_wait(432, -1);
+	start_aad_wait(433, -1);
+	SetUpScreenFunc = nullptr;
+	go_auto_xy(518, 35, P_HOWARD, ANI_GO);
+	go_auto_xy(568, 36, P_NICHELLE, ANI_VOR);
+	SetUpScreenFunc = setup_func;
+	flags.NoScroll = true;
+	auto_scroll(284, 0);
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	proc5(5);
+	det->hide_static_spr(2);
+	det->start_detail(5, 255, false);
+	auto_scroll(160, 0);
+	det->hide_static_spr(5);
+	start_detail_wait(1, 1, ANI_VOR);
+	det->start_detail(2, 255, false);
+	det->stop_detail(5);
+	det->show_static_spr(8);
+	atds->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_steuer_bit(446, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler).flags28_2 = true;
+	flags.NoScroll = false;
+	menu_item = CUR_WALK;
+	cursor_wahl(CUR_WALK);
+	start_aad_wait(434, -1);
+}
+
+void Room71::proc3() {
+	start_aad_wait(431, -1);
+	SetUpScreenFunc = nullptr;
+	go_auto_xy(510, 34, P_NICHELLE, ANI_VOR);
+	SetUpScreenFunc = setup_func;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_NICHELLE] = true;
+	proc5(6);
+	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+}
+
+void Room71::proc4() {
+	start_aad_wait(430, -1);
+	SetUpScreenFunc = nullptr;
+	go_auto_xy(518, 35, P_HOWARD, ANI_VOR);
+	SetUpScreenFunc = setup_func;
+	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler).PersonHide[P_HOWARD] = true;
+	proc5(4);
+	_G(spieler).PersonHide[P_HOWARD] = false;
+	_G(spieler).PersonHide[P_CHEWY] = false;
+}
+
+void Room71::proc5(int16 val) {
+	_G(spieler).r71_word18DB16 = 1 + (_G(spieler).flags28_4 ? 1 : 0);
+	det->hide_static_spr(2);
+	start_detail_wait(val, 5, ANI_VOR);
+	det->show_static_spr(2);
+	_G(spieler).r71_word18DB16 = 0;
 }
 
 int Room71::proc6() {
-	return 0;
+	if (_G(spieler).inv_cur)
+		return 0;
+
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	start_spz_wait(13, 1, false, P_CHEWY);
+	det->hide_static_spr(3);
+	det->show_static_spr(4);
+	spieler_mi[P_CHEWY].Mode = true;
+	go_auto_xy(244, 44, P_CHEWY, ANI_VOR);
+	start_spz_wait(14, 1, false, P_CHEWY);
+	det->hide_static_spr(4);
+	det->show_static_spr(5);
+	_G(spieler).flags28_4 = true;
+	room->set_timer_status(0, TIMER_STOP);
+	det->del_static_ani(0);
+	atds->set_steuer_bit(443, ATS_AKTIV_BIT, ATS_DATEI);
+	auto_move(3, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = false;
+	
+	show_cur();
+	return 1;
 }
 
 void Room71::proc7() {
+	hide_cur();
+	auto_move(4, P_CHEWY);
+	start_aad_wait(429, -1);
+	SetUpScreenFunc = nullptr;
+	set_person_spr(0, P_CHEWY);
+	go_auto_xy(323, 28, P_NICHELLE, ANI_VOR);
+	flags.NoScroll = true;
+	auto_scroll(200, 0);
+	_G(spieler).PersonHide[P_NICHELLE] = true;
+	det->start_detail(7, 255, false);
+	start_aad_wait(624, -1);
+	det->stop_detail(7);
+	_G(spieler).PersonHide[P_NICHELLE] = false;
+	SetUpScreenFunc = setup_func;
+	flags.NoScroll = false;
+	start_aad_wait(432, -1);
+
+	show_cur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room71.h b/engines/chewy/rooms/room71.h
index 6f031471ee7..4b354c36987 100644
--- a/engines/chewy/rooms/room71.h
+++ b/engines/chewy/rooms/room71.h
@@ -29,7 +29,12 @@ class Room71 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
 	static int proc1();
+	static void proc2();
+	static void proc3();
+	static void proc4();
+	static void proc5(int16 val);
 	static int proc6();
 	static void proc7();
 };
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 04e2b6e9766..e5296af1f2d 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -486,6 +486,11 @@ struct Spieler : public SpielerFlags {
 
 	int16 R64Moni2Ani = 0;
 
+	// ---- //
+	int16 r71_word18DB16 = 0;
+	int16 r71_word18DB18 = 0;
+	int16 R71Val1 = 0;
+	int16 R71Val2 = 0;
 	// ---- //
 	int16 r76_word18DB1A = 0;
 	int16 r76_word18DB1E = 0;


Commit: c18d9fc30e379b08de6e43b164b7a012d1c127b9
    https://github.com/scummvm/scummvm/commit/c18d9fc30e379b08de6e43b164b7a012d1c127b9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Partial rewrite of Room 69, check go_auto_xy calls and fix the constant used

Changed paths:
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room69.h
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index b8e97f46e93..141ae1ef361 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -83,9 +83,9 @@ void Room41::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
 		if (spieler_vector->Xypos[P_HOWARD] == 160) {
-			go_auto_xy(258, 75, 1, 1);
+			go_auto_xy(258, 75, P_HOWARD, ANI_GO);
 		} else {
-			go_auto_xy(246, 120, 1, 1);
+			go_auto_xy(246, 120, P_HOWARD, ANI_GO);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 3476c3c8738..8899dfc5965 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -177,7 +177,7 @@ void Room49::use_boy_cigar() {
 
 	const int16 zoom = room->room_info->ZoomFak;
 	room->set_zoom(zoom);
-	go_auto_xy(416, 79, P_HOWARD, ANI_VOR);
+	go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
 	flags.NoScroll = true;
 
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 1858a7af70c..0e5dabd6750 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room69.h"
 
@@ -30,18 +29,30 @@ namespace Chewy {
 namespace Rooms {
 
 void Room69::entry(int16 eib_nr) {
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 46;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 90;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	SetUpScreenFunc = setup_func;
 	_G(spieler).DiaAMov = 2;
-	if (!flags.LoadGame) {
-		hide_cur();
+	if (flags.LoadGame)
+		return;
+
+	_G(cur_hide_flag) = false;
+	hide_cur();
+
+	if (eib_nr == 102)
+		proc1();
+	else {
 		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
 		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
 		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
@@ -52,12 +63,10 @@ void Room69::entry(int16 eib_nr) {
 
 void Room69::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
-	switch (eib_nr) {
-	case 97:
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 69 && eib_nr == 97) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
-		break;
-
 	}
 }
 
@@ -85,22 +94,53 @@ int16 Room69::use_bruecke() {
 			spieler_mi[P_CHEWY].Mode = true;
 			go_auto_xy(253, 103, P_CHEWY, ANI_WAIT);
 			go_auto_xy(141, 103, P_CHEWY, ANI_WAIT);
+
+			if (_G(spieler).PersonRoomNr[P_NICHELLE] == 69)
+				go_auto_xy(255, 84, 2, ANI_GO);
+			
 			go_auto_xy(82, 95, P_CHEWY, ANI_WAIT);
 			go_auto_xy(46, 83, P_CHEWY, ANI_WAIT);
-			go_auto_xy(255, 84, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(258, 86, P_HOWARD, ANI_GO);
-			go_auto_xy(147, 84, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(140, 86, P_HOWARD, ANI_GO);
-			go_auto_xy(94, 77, P_NICHELLE, ANI_WAIT);
-			go_auto_xy(94, 82, P_HOWARD, ANI_GO);
-			go_auto_xy(59, 68, P_NICHELLE, ANI_WAIT);
+
+			if (_G(spieler).PersonRoomNr[P_HOWARD] == 69) {
+				go_auto_xy(258, 86, P_HOWARD, ANI_GO);
+				go_auto_xy(147, 84, P_NICHELLE, ANI_WAIT);
+				go_auto_xy(140, 86, P_HOWARD, ANI_GO);
+				go_auto_xy(94, 77, P_NICHELLE, ANI_WAIT);
+				go_auto_xy(94, 82, P_HOWARD, ANI_GO);
+				go_auto_xy(59, 68, P_NICHELLE, ANI_WAIT);
+				_G(spieler).PersonRoomNr[P_HOWARD] = 70;
+				_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
+			}
+
 			spieler_mi[P_CHEWY].Mode = false;
-			switch_room(66);
+			switch_room(70);
 		}
 		show_cur();
 	}
 	return action_flag;
 }
 
+void Room69::proc1() {
+	_G(spieler).scrollx = 0;
+	spieler_mi[P_CHEWY].Mode = true;
+	set_person_pos(46, 83, P_CHEWY, P_RIGHT);
+	set_person_pos(59, 68, P_NICHELLE, P_RIGHT);
+	set_person_pos(94, 82, P_HOWARD, P_RIGHT);
+	go_auto_xy(59, 68, P_NICHELLE, ANI_GO);
+	go_auto_xy(94, 82, P_HOWARD, ANI_WAIT);
+	go_auto_xy(94, 77, P_NICHELLE, ANI_GO);
+	go_auto_xy(140, 86, P_HOWARD, ANI_WAIT);
+	go_auto_xy(82, 95, P_CHEWY, _G(spieler).PersonRoomNr[P_HOWARD] == 69 ? ANI_GO : ANI_WAIT);
+	go_auto_xy(147, 84, P_NICHELLE, ANI_GO);
+	go_auto_xy(278, 86, P_HOWARD, ANI_WAIT);
+	go_auto_xy(255, 84, P_NICHELLE, ANI_WAIT);
+	go_auto_xy(237, 101, P_NICHELLE, ANI_GO);
+	go_auto_xy(351, 97, P_HOWARD, ANI_GO);
+	go_auto_xy(141, 109, P_CHEWY, ANI_GO);
+	go_auto_xy(253, 106, P_CHEWY, ANI_WAIT);
+	auto_move(3, P_CHEWY);
+	spieler_mi[P_CHEWY].Mode = false;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room69.h b/engines/chewy/rooms/room69.h
index d6d00a23be9..bfa04eb95b7 100644
--- a/engines/chewy/rooms/room69.h
+++ b/engines/chewy/rooms/room69.h
@@ -32,6 +32,7 @@ private:
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void proc1();
 	static void look_schild();
 	static int16 use_bruecke();
 };
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 8718cf3113b..bcdcf2181d1 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -83,8 +83,8 @@ void Room70::setup_func() {
 		nicDestX = 543;
 	}
 
-	go_auto_xy(howDestX, 111, P_HOWARD, P_RIGHT);
-	go_auto_xy(nicDestX, 110, P_NICHELLE, P_RIGHT);	
+	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);	
 }
 
 void Room70::proc1() {
@@ -93,7 +93,7 @@ void Room70::proc1() {
 	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
 	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
-	go_auto_xy(266, 113, P_HOWARD, ANI_VOR);
+	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
 	show_cur();
 }
 
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 873dd3ceb82..d491aae222f 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -190,7 +190,7 @@ void Room71::proc2() {
 	start_aad_wait(433, -1);
 	SetUpScreenFunc = nullptr;
 	go_auto_xy(518, 35, P_HOWARD, ANI_GO);
-	go_auto_xy(568, 36, P_NICHELLE, ANI_VOR);
+	go_auto_xy(568, 36, P_NICHELLE, ANI_WAIT);
 	SetUpScreenFunc = setup_func;
 	flags.NoScroll = true;
 	auto_scroll(284, 0);
@@ -221,7 +221,7 @@ void Room71::proc2() {
 void Room71::proc3() {
 	start_aad_wait(431, -1);
 	SetUpScreenFunc = nullptr;
-	go_auto_xy(510, 34, P_NICHELLE, ANI_VOR);
+	go_auto_xy(510, 34, P_NICHELLE, ANI_WAIT);
 	SetUpScreenFunc = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
@@ -233,7 +233,7 @@ void Room71::proc3() {
 void Room71::proc4() {
 	start_aad_wait(430, -1);
 	SetUpScreenFunc = nullptr;
-	go_auto_xy(518, 35, P_HOWARD, ANI_VOR);
+	go_auto_xy(518, 35, P_HOWARD, ANI_WAIT);
 	SetUpScreenFunc = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_HOWARD] = true;
@@ -260,7 +260,7 @@ int Room71::proc6() {
 	det->hide_static_spr(3);
 	det->show_static_spr(4);
 	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(244, 44, P_CHEWY, ANI_VOR);
+	go_auto_xy(244, 44, P_CHEWY, ANI_WAIT);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	det->hide_static_spr(4);
 	det->show_static_spr(5);
@@ -281,7 +281,7 @@ void Room71::proc7() {
 	start_aad_wait(429, -1);
 	SetUpScreenFunc = nullptr;
 	set_person_spr(0, P_CHEWY);
-	go_auto_xy(323, 28, P_NICHELLE, ANI_VOR);
+	go_auto_xy(323, 28, P_NICHELLE, ANI_WAIT);
 	flags.NoScroll = true;
 	auto_scroll(200, 0);
 	_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 0c1640f8adb..fec4de73e2e 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -60,7 +60,7 @@ void Room72::entry(int16 eib_nr) {
 		set_person_pos(-15, 102, P_NICHELLE, P_RIGHT);
 		go_auto_xy(185, 130, P_CHEWY, ANI_GO);
 		go_auto_xy(147, 103, P_HOWARD, ANI_GO);
-		go_auto_xy(120, 104, P_NICHELLE, ANI_VOR);
+		go_auto_xy(120, 104, P_NICHELLE, ANI_WAIT);
 		proc1(84);
 		test_intro(23);
 		ERROR
@@ -71,7 +71,7 @@ void Room72::entry(int16 eib_nr) {
 		set_person_pos(293, 102, P_NICHELLE, P_LEFT);
 		go_auto_xy(120, 130, P_CHEWY, ANI_GO);
 		go_auto_xy(154, 102, P_HOWARD, ANI_GO);
-		go_auto_xy(186, 102, P_NICHELLE, ANI_VOR);
+		go_auto_xy(186, 102, P_NICHELLE, ANI_WAIT);
 		proc1(85);
 		test_intro(23);
 		ERROR
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 368f3b8b04f..87eb4810957 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -89,7 +89,7 @@ void Room75::proc1() {
 	set_person_pos(363, 110, P_CHEWY, P_LEFT);
 	set_person_pos(322, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(317, 96, P_HOWARD, P_RIGHT);
-	go_auto_xy(318, 110, P_NICHELLE, ANI_VOR);
+	go_auto_xy(318, 110, P_NICHELLE, ANI_WAIT);
 	show_cur();
 }
 
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 760bd7698b4..9f918b8d345 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -135,7 +135,7 @@ void Room76::proc5() {
 	det->hide_static_spr(10);
 	det->start_detail(13, 1, false);
 	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(669, 127, P_CHEWY, ANI_VOR);
+	go_auto_xy(669, 127, P_CHEWY, ANI_WAIT);
 	wait_show_screen(20);
 	spieler_mi[P_CHEWY].Mode = false;
 	show_cur();
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index b04b992510d..8c4012ec41e 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -72,13 +72,13 @@ void Room81::proc1() {
 		diaNr = 460;
 	else {
 		spieler_mi[P_CHEWY].Mode = true;
-		go_auto_xy(222, 97, P_CHEWY, ANI_VOR);
-		go_auto_xy(100, 96, P_CHEWY, ANI_VOR);
-		go_auto_xy(171, 93, P_CHEWY, ANI_VOR);
-		go_auto_xy(143, 62, P_CHEWY, ANI_VOR);
-		go_auto_xy(112, 60, P_CHEWY, ANI_VOR);
+		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
+		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
+		go_auto_xy(171, 93, P_CHEWY, ANI_WAIT);
+		go_auto_xy(143, 62, P_CHEWY, ANI_WAIT);
+		go_auto_xy(112, 60, P_CHEWY, ANI_WAIT);
 		start_aad_wait(461, -1);
-		go_auto_xy(143, 62, P_CHEWY, ANI_VOR);
+		go_auto_xy(143, 62, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(0, 1, ANI_VOR);
 		det->start_detail(1, 255, false);
@@ -86,9 +86,9 @@ void Room81::proc1() {
 		det->stop_detail(1);
 		start_detail_wait(0, 1, ANI_GO);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		go_auto_xy(171, 93, P_CHEWY, ANI_VOR);
-		go_auto_xy(100, 96, P_CHEWY, ANI_VOR);
-		go_auto_xy(222, 97, P_CHEWY, ANI_VOR);
+		go_auto_xy(171, 93, P_CHEWY, ANI_WAIT);
+		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
+		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
 		auto_move(1, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = false;
 		invent_2_slot(109);
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index e2aadcd05fe..e2d5db21c80 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -93,9 +93,9 @@ void Room87::xit(int16 eib_nr) {
 	HowardMov = 1;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
-	go_auto_xy(20, 56, P_CHEWY, ANI_VOR);
-	go_auto_xy(31, 56, P_CHEWY, ANI_VOR);
-	go_auto_xy(9, 53, P_CHEWY, ANI_VOR);
+	go_auto_xy(20, 56, P_CHEWY, ANI_WAIT);
+	go_auto_xy(31, 56, P_CHEWY, ANI_WAIT);
+	go_auto_xy(9, 53, P_CHEWY, ANI_WAIT);
 	spieler_mi[P_CHEWY].Mode = false;
 	_G(spieler).ScrollxStep = 1;
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 87)
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 0a20fe7c359..bd27d3ba488 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -281,7 +281,7 @@ int Room90::proc4() {
 	flags.ZoomMov = false;
 	auto_move(5, P_CHEWY);
 	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(232, 142, P_CHEWY, ANI_VOR);
+	go_auto_xy(232, 142, P_CHEWY, ANI_WAIT);
 	flags.NoScroll = true;
 	auto_scroll(176, 0);
 	start_detail_wait(13, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 7b425502def..ba3a52c61d7 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -250,11 +250,11 @@ void Room97::proc2() {
 	Sdi[24].z_ebene = 6;
 	_G(spieler).flags36_1 = false;
 	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(455, 59, P_CHEWY, ANI_VOR);
-	go_auto_xy(496, 99, P_CHEWY, ANI_VOR);
-	go_auto_xy(530, 99, P_CHEWY, ANI_VOR);
-	go_auto_xy(572, 139, P_CHEWY, ANI_VOR);
-	go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+	go_auto_xy(455, 59, P_CHEWY, ANI_WAIT);
+	go_auto_xy(496, 99, P_CHEWY, ANI_WAIT);
+	go_auto_xy(530, 99, P_CHEWY, ANI_WAIT);
+	go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
+	go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	spieler_mi[P_CHEWY].Mode = false;
 	Sdi[6].z_ebene = 166;
 	Sdi[18].z_ebene = 157;
@@ -274,32 +274,32 @@ void Room97::proc3() {
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(557, -1);
-		go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	} else if (!_G(spieler).flags36_40) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(567, -1);
-		go_auto_xy(588, 129, P_CHEWY, ANI_VOR);
+		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
 		HowardMov = 1;
-		go_auto_xy(572, 139, P_CHEWY, ANI_VOR);
+		go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
 		Sdi[6].z_ebene = 6;
 		Sdi[24].z_ebene = 6;
 
-		go_auto_xy(530, 99, P_CHEWY, ANI_VOR);
-		go_auto_xy(496, 99, P_CHEWY, ANI_VOR);
-		go_auto_xy(455, 59, P_CHEWY, ANI_VOR);
-		go_auto_xy(440, 52, P_CHEWY, ANI_VOR);
+		go_auto_xy(530, 99, P_CHEWY, ANI_WAIT);
+		go_auto_xy(496, 99, P_CHEWY, ANI_WAIT);
+		go_auto_xy(455, 59, P_CHEWY, ANI_WAIT);
+		go_auto_xy(440, 52, P_CHEWY, ANI_WAIT);
 		if (!_G(spieler).flags36_80) {
-			go_auto_xy(572, 122, P_HOWARD, ANI_VOR);
-			go_auto_xy(526, 83, P_HOWARD, ANI_VOR);
-			go_auto_xy(500, 83, P_HOWARD, ANI_VOR);
+			go_auto_xy(572, 122, P_HOWARD, ANI_WAIT);
+			go_auto_xy(526, 83, P_HOWARD, ANI_WAIT);
+			go_auto_xy(500, 83, P_HOWARD, ANI_WAIT);
 		}
 
 		auto_move(6, P_CHEWY);
 		if (!_G(spieler).flags36_80) {
-			go_auto_xy(442, 35, P_HOWARD, ANI_VOR);
-			go_auto_xy(497, 31, P_HOWARD, ANI_VOR);
+			go_auto_xy(442, 35, P_HOWARD, ANI_WAIT);
+			go_auto_xy(497, 31, P_HOWARD, ANI_WAIT);
 			start_aad_wait(562, -1);
 		}
 		spieler_mi[P_CHEWY].Mode = false;
@@ -331,12 +331,12 @@ void Room97::proc4() {
 		det->show_static_spr(2);
 		HowardMov = 1;
 		
-		go_auto_xy(967, 111, P_CHEWY, ANI_VOR);
-		go_auto_xy(1008, 93, P_CHEWY, ANI_VOR);
-		go_auto_xy(1037, 99, P_CHEWY, ANI_VOR);
+		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
+		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
+		go_auto_xy(1037, 99, P_CHEWY, ANI_WAIT);
 
-		go_auto_xy(995, 77, P_HOWARD, ANI_VOR);
-		go_auto_xy(1047, 87, P_HOWARD, ANI_VOR);
+		go_auto_xy(995, 77, P_HOWARD, ANI_WAIT);
+		go_auto_xy(1047, 87, P_HOWARD, ANI_WAIT);
 
 		start_detail_wait(29, 1, ANI_VOR);
 		det->hide_static_spr(21);
@@ -344,9 +344,9 @@ void Room97::proc4() {
 		det->disable_sound(9, 0);
 		start_detail_wait(9, 0, ANI_RUECK);
 
-		go_auto_xy(1008, 93, P_CHEWY, ANI_VOR);
-		go_auto_xy(967, 111, P_CHEWY, ANI_VOR);
-		go_auto_xy(995, 82, P_HOWARD, ANI_VOR);
+		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
+		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
+		go_auto_xy(995, 82, P_HOWARD, ANI_WAIT);
 		det->hide_static_spr(2);
 		spieler_mi[P_CHEWY].Mode = false;
 		start_spz(4, 255, false, P_CHEWY);
@@ -394,7 +394,7 @@ int Room97::proc6() {
 	hide_cur();
 	auto_move(1, P_CHEWY);
 	spieler_mi[P_CHEWY].Mode = true;
-	go_auto_xy(298, 120, P_CHEWY, ANI_VOR);
+	go_auto_xy(298, 120, P_CHEWY, ANI_WAIT);
 	set_person_spr(P_LEFT, P_CHEWY);
 	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 	det->hide_static_spr(15);
@@ -599,7 +599,7 @@ void Room97::proc12() {
 	hide_cur();
 	stop_person(P_CHEWY);
 	det->show_static_spr(26);
-	go_auto_xy(481, 39, P_CHEWY, ANI_VOR);
+	go_auto_xy(481, 39, P_CHEWY, ANI_WAIT);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(327, 42, P_CHEWY, P_LEFT);
 	wait_show_screen(50);
@@ -702,7 +702,7 @@ void Room97::proc15() {
 
 		det->show_static_spr(26);
 		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
-		go_auto_xy(477, 29, P_NICHELLE, ANI_VOR);
+		go_auto_xy(477, 29, P_NICHELLE, ANI_WAIT);
 		det->hide_static_spr(26);
 		_G(spieler).flags37_2 = true;
 	}


Commit: 2f2a2268011d1c71ab213b102e08b36d71424412
    https://github.com/scummvm/scummvm/commit/2f2a2268011d1c71ab213b102e08b36d71424412
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:46-08:00

Commit Message:
CHEWY: Fix logic in Room 68, check use of booleans and constants in start_spz_wait

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room2.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room5.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room84.cpp


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 980f86e1868..2ce5eff1f6b 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -368,6 +368,7 @@ SplitStringInit ssi[AAD_MAX_PERSON] = {
 int16 frequenz;
 int16 CurrentSong = -1;
 bool savegameFlag;
+Stream *voc_handle;
 Stream *music_handle;
 int16 EndOfPool;
 Stream *speech_handle;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index a1d6570e153..6a0d738f2dc 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -271,6 +271,7 @@ extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
 
 extern int16 frequenz;
+extern Stream *voc_handle;
 extern Stream *music_handle;
 extern int16 EndOfPool;
 extern Stream *speech_handle;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 2863d8279b6..84b708b8f39 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -468,7 +468,7 @@ void sound_init() {
 		ailsnd->switch_sound(true);
 		flags.InitSound = true;
 
-		room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+		voc_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 		ERROR
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 4b61bbc652f..da3e896b752 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1005,7 +1005,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
-					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
+					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
@@ -1045,7 +1045,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
-					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
+					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
@@ -1088,7 +1088,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
-					start_spz_wait(ani_nr - 150, 1, ANI_VOR, P_CHEWY);
+					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index e9b2d5643f5..370b8d7cddb 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -384,7 +384,7 @@ void objekt::calc_static_detail(int16 det_nr) {
 							if (adi->repeat)
 								det->start_detail(n, 0, ANI_VOR);
 							else
-								det->start_detail(n, 1, 0);
+								det->start_detail(n, 1, ANI_VOR);
 						} else
 							det->show_static_spr(nr);
 						++i;
@@ -396,7 +396,7 @@ void objekt::calc_static_detail(int16 det_nr) {
 				if (adi->repeat)
 					det->start_detail(n, 0, ANI_VOR);
 				else
-					det->start_detail(n, 1, 0);
+					det->start_detail(n, 1, ANI_VOR);
 			} else {
 				det->show_static_spr(nr);
 			}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index be4b5755675..2a45e2958a8 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -120,7 +120,7 @@ void timer_action(int16 t_nr) {
 #undef TIMER
 
 	if (default_flag && flags.AutoAniPlay == false) {
-		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, 0);
+		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, ANI_VOR);
 		uhr->reset_timer(t_nr, 0);
 	}
 
@@ -1654,7 +1654,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				det->start_detail(i, 255, 0);
+				det->start_detail(i, 255, ANI_VOR);
 		} else {
 			for (int i = 0; i < 5; ++i)
 				det->stop_detail(i);
@@ -1744,7 +1744,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_CART_FACH_R18:
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = 0;
 		cur_2_inventory();
 		atds->set_ats_str(157, 1, AAD_DATEI);
@@ -1854,7 +1854,7 @@ void sib_event_inv(int16 sib_nr) {
 			cur_2_inventory();
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
-			det->start_detail(6, 255, 0);
+			det->start_detail(6, 255, ANI_VOR);
 			atds->set_ats_str(27, 1, ATS_DATEI);
 			atds->set_ats_str(30, 1, ATS_DATEI);
 		}
@@ -1963,7 +1963,7 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_CART_FACH_R18:
 		_G(cur_hide_flag) = false;
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = true;
 		del_inventar(_G(spieler).AkInvent);
 		det->show_static_spr(7);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index e482024de6b..e42fa94a326 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -51,9 +51,9 @@ static const MovLine CHEWY_MPKT1[2] = {
 
 void Room17::entry() {
 	if (!_G(spieler).R17EnergieOut) {
-		det->start_detail(1, 255, 0);
+		det->start_detail(1, 255, ANI_VOR);
 		for (int i = 0; i < 3; ++i)
-			det->start_detail(i, 255, 0);
+			det->start_detail(i, 255, ANI_VOR);
 	}
 
 	plot_seil();
@@ -294,10 +294,10 @@ int16 Room17::energie_hebel() {
 		det->play_sound(12, 0);
 
 		if (!_G(spieler).R17EnergieOut) {
-			det->start_detail(1, 255, 0);
+			det->start_detail(1, 255, ANI_VOR);
 
 			for (int i = 0; i < 3; ++i)
-				det->start_detail(i + 6, 255, 0);
+				det->start_detail(i + 6, 255, ANI_VOR);
 		}
 
 		atds->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
@@ -323,7 +323,7 @@ int16 Room17::get_oel() {
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(4, P_CHEWY);
-		start_spz_wait(CH_EKEL, 3, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_EKEL, 3, false, P_CHEWY);
 		start_aad_wait(60, -1);
 	} else if (is_cur_inventar(BECHER_LEER_INV)) {
 		action_flag = true;
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 0563d1ef03e..f0ebf292a3e 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -349,7 +349,7 @@ short Room18::use_cart_moni() {
 		hide_cur();
 		auto_move(9, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartTerminal ^= 1;
 
 		if (!_G(spieler).R18CartTerminal) {
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room2.cpp
index 5edbdc6e65e..f1fe28beb5a 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room2.cpp
@@ -40,7 +40,7 @@ static const AniBlock ABLOCK4[2] = {
 
 void Room2::entry() {
 	if (!_G(spieler).R2ElectrocutedBork)
-		det->start_detail(5, 255, 0);
+		det->start_detail(5, 255, ANI_VOR);
 }
 
 void Room2::jump_out_r1(int16 nr) {
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index b8f9cb066c7..9a8db086170 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -93,7 +93,7 @@ int16 Room23::start_gleiter() {
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
 
 					switch_room(_G(spieler).R23GleiterExit);
-					start_spz_wait(CH_WONDER1, 1, ANI_VOR, P_CHEWY);
+					start_spz_wait(CH_WONDER1, 1, false, P_CHEWY);
 					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 
 					_G(spieler).DelaySpeed = 10;
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index e75047aeb08..363b7aa487e 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -51,7 +51,7 @@ void Room25::entry() {
 		det->play_sound(0, 0);
 
 		for (int i = 0; i < 9; ++i)
-			det->start_detail(i, 255, 0);
+			det->start_detail(i, 255, ANI_VOR);
 	}
 
 	if (!_G(spieler).R29Schlauch2) {
@@ -122,8 +122,7 @@ int16 Room25::gleiter_loesch() {
 		if (is_cur_inventar(MILCH_LEER_INV)) {
 			action_flag = true;
 			auto_move(2, P_CHEWY);
-			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14,
-				1, ANI_VOR, P_CHEWY);
+			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
 			obj->add_inventar(MILCH_WAS_INV, &room_blk);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 2fdc56a7aba..001f536e4d9 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -217,7 +217,7 @@ void Room28::use_surimy() {
 		flags.NoScroll = true;
 		auto_scroll(0, 0);
 		_G(spieler).R28SurimyCar = true;
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		flc->set_flic_user_function(cut_serv2);
 		flic_cut(FCUT_055, FLC_MODE);
 		flc->remove_flic_user_function();
@@ -330,7 +330,7 @@ int16 Room28::use_breifkasten() {
 		hide_cur();
 		_G(spieler).R28Briefkasten = false;
 		auto_move(7, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->hide_static_spr(8);
 		det->hide_static_spr(9);
 		det->show_static_spr(7);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 0fa10db28b0..2eb3af22733 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -81,7 +81,7 @@ int16 Room29::use_pumpe() {
 			_G(spieler).R29Pumpe = true;
 			_G(spieler).R29Schlauch1 = true;
 			auto_move(1, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			det->show_static_spr(7);
 			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
@@ -100,7 +100,7 @@ int16 Room29::get_schlauch() {
 	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
 		action_flag = true;
 		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		new_invent_2_cur(PUMPE_INV);
 	}
 	return action_flag;
@@ -114,7 +114,7 @@ bool Room29::use_schlauch() {
 		hide_cur();
 
 		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		det->hide_static_spr(7);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(4, 1, ANI_VOR);
@@ -144,7 +144,7 @@ void Room29::schlitz_sitz() {
 		start_ani_block(4, ABLOCK26);
 		det->show_static_spr(9);
 		det->hide_static_spr(11);
-		det->start_detail(2, 255, 0);
+		det->start_detail(2, 255, ANI_VOR);
 		start_aad_wait(63, -1);
 
 		det->stop_detail(2);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index c74539f650c..ad3ebbaf5a3 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -94,7 +94,7 @@ void Room31::open_luke() {
 	if (!_G(spieler).inv_cur && _G(spieler).R31KlappeZu) {
 		hide_cur();
 		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = false;
 		det->play_sound(3, 0);
 		calc_luke();
@@ -106,7 +106,7 @@ void Room31::proc1() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R31KlappeZu) {
 		hide_cur();
 		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		det->play_sound(3, 0);
 		calc_luke();
@@ -125,7 +125,7 @@ int16 Room31::use_topf() {
 			if (is_cur_inventar(K_KERNE_INV)) {
 				_G(spieler).R31KoernerDa = true;
 				auto_move(1, P_CHEWY);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 2f7d64caf18..4c0e40aa7d7 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -103,7 +103,7 @@ void Room32::use_schreibmaschine() {
 			case PAPIER_INV:
 				auto_move(2, P_CHEWY);
 				_G(spieler).R32PapierOk = true;
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
 				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
 				ani_nr = CH_TALK3;
@@ -158,7 +158,7 @@ int16 Room32::get_script() {
 			_G(spieler).R32Script = true;
 			auto_move(4, P_CHEWY);
 			invent_2_slot(MANUSKRIPT_INV);
-			start_spz_wait(CH_LGET_U, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 			det->hide_static_spr(5);
 			atds->set_ats_str(203, 0, ATS_DATEI);
 			start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index eba7d58dff7..d657de283cd 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -141,7 +141,7 @@ void Room33::use_maschine() {
 				start_detail_wait(0, 1, ANI_VOR);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				set_person_pos(128, 65, P_CHEWY, P_LEFT);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				hocker = true;
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK12;
@@ -208,7 +208,7 @@ int16 Room33::get_munter() {
 			hide_cur();
 			_G(spieler).R33MunterGet = true;
 			auto_move(4, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			invent_2_slot(MUNTER_INV);
 			atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 			det->hide_static_spr(3);
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 95ce8e8ce11..6920aa9c6a7 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -44,8 +44,7 @@ bool Room34::use_kuehlschrank() {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			_G(maus_links_click) = false;
-			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O,
-				1, ANI_VOR, P_CHEWY);
+			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O, 1, false, P_CHEWY);
 			hide_cur();
 		}
 
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index f8d8a95c685..4efb5d1ac81 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -48,7 +48,7 @@ int16 Room35::schublade() {
 		if (!_G(spieler).R35Schublade) {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			det->show_static_spr(1);
 			_G(spieler).R35Schublade = true;
 			atds->set_ats_str(234, 1, ATS_DATEI);
@@ -80,7 +80,7 @@ int16 Room35::use_cat() {
 			action_flag = true;
 			auto_move(4, P_CHEWY);
 			_G(spieler).R35TransCat = true;
-			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			flic_cut(FCUT_045, FLC_MODE);
 			start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 			start_aad_wait(94, -1);
@@ -89,7 +89,7 @@ int16 Room35::use_cat() {
 			disable_timer();
 			auto_move(4, P_CHEWY);
 			_G(spieler).R35CatEat = true;
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(_G(spieler).AkInvent);
 			det->stop_detail(0);
 			det->del_static_ani(0);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 629cf090ffa..7d2f4a7ea27 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -289,7 +289,7 @@ void Room37::use_hahn() {
 		hide_cur();
 		auto_move(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
-		start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 		flic_cut(FCUT_052, FLC_MODE);
 		cur_2_inventory();
 		menu_item = CUR_TALK;
@@ -307,7 +307,7 @@ void Room37::use_hahn() {
 			det->stop_detail(7);
 			det->del_static_ani(7);
 			det->start_detail(9, 1, ANI_VOR);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(GEBISS_INV);
 			flags.NoScroll = true;
 			auto_scroll(177, 0);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index c26e8ca97da..97b70aab144 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -208,7 +208,7 @@ int16 Room39::use_tv() {
 		}
 	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != 5) {
 		if (_G(spieler).R39TvOn) {
-			start_spz_wait(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
 			flags.NoPalAfterFlc = true;
 			flic_cut(FCUT_041, FLC_MODE);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index e46bd9b32e6..e00ced353d0 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -335,7 +335,7 @@ int16 Room40::use_mr_pumpkin() {
 					else {
 						hide_cur();
 						auto_move(8, P_CHEWY);
-						start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+						start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
 						del_inventar(_G(spieler).AkInvent);
 						out->ausblenden(1);
 						Room43::catch_pg();
@@ -385,7 +385,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 				room->set_timer_status(255, TIMER_STOP);
 				_G(spieler).R40PoliceStart = false;
 				stop_spz();
-				start_spz_wait(CH_PUMP_GET1, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
 
 				if (_G(spieler).R40PoliceAb) {
 					_G(spieler).R40PoliceAb = false;
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index c5fb6ae2d55..9a27f7041d5 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -32,7 +32,7 @@ namespace Rooms {
 void Room42::entry() {
 	if (!_G(spieler).R42BeamterWach) {
 		det->play_sound(0, 0);
-		det->start_detail(0, 255, 0);
+		det->start_detail(0, 255, ANI_VOR);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
diff --git a/engines/chewy/rooms/room5.cpp b/engines/chewy/rooms/room5.cpp
index 6d57d683bf1..983811bdfad 100644
--- a/engines/chewy/rooms/room5.cpp
+++ b/engines/chewy/rooms/room5.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room5::entry() {
 	if (_G(spieler).R5Terminal)
-		det->start_detail(6, 255, 0);
+		det->start_detail(6, 255, ANI_VOR);
 }
 
 void Room5::pushButton() {
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 30138804c35..44ea22b8570 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -355,11 +355,11 @@ void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
 		assert(t_nr < 2);
 		if (!Room65::_scrollY[t_nr]) {
-			det->start_detail(t_nr, 1, 0);
+			det->start_detail(t_nr, 1, ANI_VOR);
 			Room65::_scrollY[t_nr] = 1;
 		} else if (!det->get_ani_status(t_nr)) {
-			det->start_detail(t_nr, 1, 1);
-			det->start_detail(t_nr + 2, 1, 0);
+			det->start_detail(t_nr, 1, ANI_GO);
+			det->start_detail(t_nr + 2, 1, ANI_VOR);
 			uhr->reset_timer(obj_nr, 0);
 			Room65::_scrollY[t_nr] = 0;
 		}
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 6e26c33af71..440c505e952 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -76,7 +76,7 @@ int16 Room52::use_hot_dog() {
 	if (is_cur_inventar(BURGER_INV)) {
 		action_ret = true;
 		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 		det->show_static_spr(0);
 		del_inventar(_G(spieler).AkInvent);
 		auto_move(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 3e5d8d59c18..d2dc525bf1a 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -138,7 +138,7 @@ int16 Room54::use_schalter() {
 			_G(spieler).R54HowardVorne = 255;
 			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
 			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
-			start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 			det->show_static_spr(0);
 			auto_move(2, P_CHEWY);
 			det->enable_sound(1, 0);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 3c064e49137..89e8da1b44d 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -152,7 +152,7 @@ int16 Room56::use_man() {
 		action_ret = true;
 		hide_cur();
 		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 		room->set_timer_status(0, TIMER_STOP);
 		det->del_static_ani(0);
 
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 6f5b3e74dcd..5edc4648032 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -219,7 +219,7 @@ int16 Room63::use_schalter() {
 			} else {
 				hide_cur();
 				auto_move(1, P_CHEWY);
-				start_spz_wait(CH_ROCK_GET2, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 				det->show_static_spr(2);
 				set_person_spr(P_LEFT, P_CHEWY);
 				start_detail_wait(21, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 2b78c2e835b..3d7c20baadf 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -156,7 +156,7 @@ int16 Room64::use_tasche() {
 		if (_G(spieler).R64ManWeg) {
 			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
 				auto_move(3, P_CHEWY);
-				start_spz_wait(CH_ROCK_GET1, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				aad_nr = 353;
 				new_invent_2_cur(GERAET_INV);
 				atds->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index e0ad0ed08ce..9a3c8cf53a9 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -77,10 +77,10 @@ int16 Room67::use_grammo() {
 		hide_cur();
 		action_flag = true;
 		auto_move(6, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->start_detail(0, 255, ANI_VOR);
 		start_aad_wait(376, -1);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->stop_detail(0);
 		show_cur();
 	}
@@ -102,14 +102,14 @@ int16 Room67::use_kommode() {
 			action_flag = true;
 			_G(spieler).R67KommodeAuf = true;
 			auto_move(6, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			det->show_static_spr(9);
 			atds->set_ats_str(400, 1, ATS_DATEI);
 		} else if (!_G(spieler).R67KostuemWeg) {
 			action_flag = true;
 			_G(spieler).R67KostuemWeg = true;
 			auto_move(6, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			atds->set_ats_str(400, 2, ATS_DATEI);
 			new_invent_2_cur(GALA_INV);
 		}
@@ -158,7 +158,7 @@ int16 Room67::talk_papagei() {
 				hide_cur();
 				action_flag = true;
 				auto_move(4, P_CHEWY);
-				start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				_G(spieler).R67PapageiWeg = true;
 				det->stop_detail(1);
 				det->del_static_ani(1);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 9be2dfdc311..429610467df 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -45,19 +45,26 @@ void Room68::entry() {
 	_G(spieler).DiaAMov = 1;
 	SetUpScreenFunc = setup_func;
 	_G(r68HohesC) = -1;
+	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
+	
 	if (_G(spieler).R68Papagei) {
 		det->show_static_spr(12);
 		det->start_detail(21, 255, ANI_VOR);
 	}
+
 	if (!_G(spieler).R68DivaWeg) {
 		_G(timer_nr)[0] = room->set_timer(255, 10);
 		det->set_static_ani(18, -1);
 	} else
 		det->hide_static_spr(3);
+	
 	if (!flags.LoadGame) {
 		hide_cur();
-		set_person_pos(524, 51, P_HOWARD, P_LEFT);
-		set_person_pos(550, 54, P_NICHELLE, P_LEFT);
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
+			set_person_pos(524, 51, P_HOWARD, P_LEFT);
+			set_person_pos(550, 54, P_NICHELLE, P_LEFT);
+		}
 		auto_move(7, P_CHEWY);
 		show_cur();
 	}
@@ -65,13 +72,15 @@ void Room68::entry() {
 
 void Room68::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	}
 }
 
 bool Room68::timer(int16 t_nr, int16 ani_nr) {
 	if (t_nr == _G(timer_nr)[0])
-		Room68::calc_diva();
+		calc_diva();
 	else
 		return true;
 
@@ -90,6 +99,19 @@ void Room68::setup_func() {
 	case 1:
 		if (det->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = 2;
+			if (_G(spieler).SpeechSwitch && flags.InitSound) {
+				det->enable_sound(2, 0);
+				det->play_sound(_G(r68HohesC), 0);
+				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
+
+				while (ailsnd->get_sample_status(1) == 4)
+					set_up_screen(DO_SETUP);
+				det->stop_detail(_G(r68HohesC));
+			} else {
+				det->start_detail(_G(r68HohesC), 3, ANI_VOR);
+			}
+			
+			
 			det->start_detail(_G(r68HohesC), 3, ANI_VOR);
 		}
 		break;
@@ -174,6 +196,8 @@ int16 Room68::use_indigo() {
 			start_detail_wait(25, 1, ANI_VOR);
 			det->set_static_ani(12, -1);
 			talk_indigo(398);
+			_G(cur_hide_flag) = false;
+			hide_cur();
 			room->set_timer_status(8, TIMER_STOP);
 			det->del_static_ani(8);
 			det->stop_detail(8);
@@ -222,7 +246,7 @@ int16 Room68::use_papagei() {
 		_G(spieler).R68Papagei = true;
 		del_inventar(_G(spieler).AkInvent);
 		auto_move(5, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->show_static_spr(12);
 		det->start_detail(21, 255, ANI_VOR);
 		atds->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
@@ -236,25 +260,21 @@ void Room68::calc_diva() {
 	if (!_G(spieler).R68DivaWeg) {
 		if (!_G(spieler).R68Papagei) {
 			if (_G(r68HohesC) == -1) {
+				uhr->reset_timer(_G(timer_nr)[0], 0);
 				_G(r68HohesC) = 0;
 				det->hide_static_spr(3);
 				det->start_detail(_G(r68HohesC), 1, ANI_RUECK);
 				det->start_detail(18, 255, ANI_VOR);
 			}
-		} else {
-			if (!_G(spieler).R68Gutschein) {
-
-				if (!is_chewy_busy()) {
-					hide_cur();
-					_G(spieler).R68Gutschein = true;
-					auto_move(4, P_CHEWY);
-					start_aad_wait(386, -1);
-					start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-					new_invent_2_cur(BAR_GUT_INV);
-					uhr->reset_timer(_G(timer_nr)[0], 0);
-					show_cur();
-				}
-			}
+		} else if (!_G(spieler).R68Gutschein && !is_chewy_busy()) {
+			hide_cur();
+			_G(spieler).R68Gutschein = true;
+			auto_move(4, P_CHEWY);
+			start_aad_wait(386, -1);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+			new_invent_2_cur(BAR_GUT_INV);
+			uhr->reset_timer(_G(timer_nr)[0], 0);
+			show_cur();
 		}
 	}
 }
@@ -266,7 +286,7 @@ int16 Room68::use_keeper() {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
 		auto_move(2, P_CHEWY);
-		start_spz_wait(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		room->set_timer_status(20, TIMER_STOP);
 		det->del_static_ani(20);
 		start_ani_block(3, ABLOCK39);
@@ -285,8 +305,11 @@ int16 Room68::use_diva() {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
 		auto_move(4, P_CHEWY);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		det->hide_static_spr(3);
 		start_detail_wait(4, 1, ANI_VOR);
 		_G(spieler).R68Gutschein = false;
+		det->show_static_spr(3);
 	} else if (is_cur_inventar(B_MARY2_INV)) {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
@@ -295,7 +318,9 @@ int16 Room68::use_diva() {
 		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ABLOCK38);
 		flic_cut(FCUT_083, FLC_MODE);
-		flic_cut(FCUT_083, FLC_MODE);
+		det->del_static_ani(18);
+		test_intro(22);
+		ERROR
 		det->del_static_ani(18);
 		start_detail_wait(7, 1, ANI_VOR);
 		atds->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
@@ -319,6 +344,9 @@ void Room68::kostuem_aad(int16 aad_nr) {
 	else if (!_G(spieler).R67LiedOk)
 		start_aad_wait(389, -1);
 	else {
+		if (_G(spieler).DisplayText == 0)
+			ailsnd->fade_out(5);
+		
 		SetUpScreenFunc = nullptr;
 		del_inventar(_G(spieler).AkInvent);
 		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
@@ -329,30 +357,73 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		start_detail_wait(22, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		det->start_detail(27, 255, ANI_VOR);
-		start_detail_wait(23, 3, ANI_VOR);
+		if (_G(spieler).DisplayText)
+			start_detail_wait(23, 3, ANI_VOR);
+		else {
+			det->start_detail(23, 255, ANI_VOR);
+			ailsnd->init_double_buffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
+			Stream *voc_handle = nullptr; // TODO : should be the voc_handle initialized in sound_init()
+			mem->file->select_pool_item(voc_handle, 109);
+			ERROR
+			ailsnd->start_db_voc(voc_handle, 1, 30);
+			wait_show_screen(2);
+
+			while (!ailsnd->isSpeechActive(1))
+				set_up_screen(DO_SETUP);
+
+			det->stop_detail(23);
+		}
+
+		if (_G(spieler).DisplayText) {
+			mem->file->select_pool_item(voc_handle, 108);
+			ERROR
+			ailsnd->start_db_voc(voc_handle, 1, 30);			
+		}
+		
 		det->start_detail(24, 255, ANI_VOR);
 		set_person_pos(26, 40, P_NICHELLE, P_RIGHT);
-		start_aad_wait(391, -1);
+		if (_G(spieler).DisplayText) {
+			start_aad_wait(391, -1);
+		} else {
+			wait_show_screen(100);
+			start_aad_wait(602, -1);
+			wait_show_screen(100);
+		}
+
 		room->set_timer_status(8, TIMER_STOP);
 		det->del_static_ani(8);
 		start_detail_wait(10, 1, ANI_VOR);
 		det->start_detail(11, 255, ANI_VOR);
 		start_aad_wait(396, -1);
 		det->stop_detail(11);
+		det->set_static_ani(12, -1);
+		start_aad_wait(611, -1);
+		det->del_static_ani(12);
 		det->start_detail(14, 255, ANI_VOR);
 		start_aad_wait(395, -1);
 		det->stop_detail(14);
 		room->set_timer_status(8, TIMER_START);
-		_G(spieler).PersonHide[P_HOWARD] = false;
-		det->stop_detail(27);
 		det->set_static_ani(8, -1);
 		start_aad_wait(392, -1);
-		_G(spieler).R68Lied = true;
+
+		while (ailsnd->isSpeechActive(1))
+			set_up_screen(DO_SETUP);
+		
+		_G(spieler).PersonHide[P_HOWARD] = false;
+		det->stop_detail(27);
 		det->stop_detail(24);
-		SetUpScreenFunc = setup_func;
+		det->show_static_spr(13);
+		_G(spieler).R68Lied = true;
 		auto_move(1, P_CHEWY);
+		auto_scroll(216, 0);
+		det->hide_static_spr(13);
 		_G(spieler).PersonHide[P_NICHELLE] = false;
 		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
+
+		if (_G(spieler).DisplayText) {
+			CurrentSong = -1;
+			load_room_music(_G(spieler).PersonRoomNr[0]);
+		}
 	}
 	show_cur();
 }
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index d491aae222f..13ecee3faed 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -49,7 +49,7 @@ void Room71::entry(int16 eib_nr) {
 		_G(timer_nr)[0] = room->set_timer(0, 10);
 		det->set_static_ani(0, -1);
 	} else if (_G(spieler).flags28_2) {
-		det->start_detail(2, 255, false);
+		det->start_detail(2, 255, ANI_VOR);
 		det->show_static_spr(8);
 		det->hide_static_spr(2);
 		det->hide_static_spr(3);
@@ -280,7 +280,7 @@ void Room71::proc7() {
 	auto_move(4, P_CHEWY);
 	start_aad_wait(429, -1);
 	SetUpScreenFunc = nullptr;
-	set_person_spr(0, P_CHEWY);
+	set_person_spr(P_LEFT, P_CHEWY);
 	go_auto_xy(323, 28, P_NICHELLE, ANI_WAIT);
 	flags.NoScroll = true;
 	auto_scroll(200, 0);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 9f918b8d345..6d0bcb18a0e 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -163,7 +163,7 @@ int Room76::proc6() {
 	} else if (is_cur_inventar(94)) {
 		hide_cur();
 		retVal = 1;
-		set_person_spr(1, P_CHEWY);
+		set_person_spr(P_RIGHT, P_CHEWY);
 		start_aad_wait(436, 1);
 		show_cur();
 	}
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 57432514a9b..0c8d2372b56 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -134,7 +134,7 @@ void Room84::setup_func() {
 		hide_cur();
 		auto_move(4, P_CHEWY);
 		flags.NoScroll = true;
-		set_person_spr(0, P_CHEWY);
+		set_person_spr(P_LEFT, P_CHEWY);
 		auto_scroll(150, 0);
 		det->del_static_ani(3);
 		det->set_static_ani(4, -1);
@@ -170,7 +170,7 @@ void Room84::setup_func() {
 void Room84::talk1() {
 	auto_move(4, P_CHEWY);
 	flags.NoScroll = true;
-	set_person_spr(0, P_CHEWY);
+	set_person_spr(P_LEFT, P_CHEWY);
 	auto_scroll(150, 0);
 	start_ads_wait(22);
 	flags.NoScroll = false;


Commit: c4df14c8d2407fe423ef754156a95826810e2466
    https://github.com/scummvm/scummvm/commit/c4df14c8d2407fe423ef754156a95826810e2466
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Fix some differences in the logic of Room67

Changed paths:
    engines/chewy/rooms/room67.cpp


diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 9a3c8cf53a9..119cde0c9dc 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room67.h"
 
@@ -33,6 +32,7 @@ void Room67::entry() {
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
+	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).DiaAMov = 7;
 	if (_G(spieler).R67KommodeAuf)
 		det->show_static_spr(9);
@@ -44,9 +44,11 @@ void Room67::entry() {
 	if (!flags.LoadGame) {
 		hide_cur();
 		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
-		set_person_pos(12, 100, P_HOWARD, P_RIGHT);
-		set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
-		go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
+			set_person_pos(12, 100, P_HOWARD, P_RIGHT);
+			set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
+			go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+		}
 		auto_move(7, P_CHEWY);
 		show_cur();
 	}
@@ -54,14 +56,17 @@ void Room67::entry() {
 
 void Room67::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
+		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	}
 }
 
 void Room67::setup_func() {
-	int16 x, y;
 	calc_person_look();
-	y = 117;
+	const int16 y = 117;
+	int16 x;
 	if (spieler_vector[P_CHEWY].Xypos[0] > 320) {
 		x = 178;
 	} else {
@@ -79,7 +84,11 @@ int16 Room67::use_grammo() {
 		auto_move(6, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->start_detail(0, 255, ANI_VOR);
-		start_aad_wait(376, -1);
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67)
+			start_aad_wait(376, -1);
+		else
+			start_aad_wait(614, -1);
+
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		det->stop_detail(0);
 		show_cur();
@@ -129,46 +138,43 @@ void Room67::kostuem_aad(int16 aad_nr) {
 
 int16 Room67::talk_papagei() {
 	int16 action_flag = false;
-	if (!_G(spieler).R67PapageiWeg) {
-		if (!_G(spieler).inv_cur) {
-			action_flag = true;
-			hide_cur();
-			room->set_timer_status(1, TIMER_STOP);
-			if (menu_item == CUR_HOWARD) {
-				show_cur();
+	if (!_G(spieler).R67PapageiWeg && !_G(spieler).inv_cur) {
+		action_flag = true;
+		hide_cur();
+		room->set_timer_status(1, TIMER_STOP);
+		if (menu_item == CUR_HOWARD) {
+			show_cur();
 
-				ssi[2].X = 270 - _G(spieler).scrollx;
-				ssi[2].Y = 10;
-				atds->set_split_win(2, &ssi[2]);
-				start_ads_wait(19);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_NICHELLE) {
-				start_aad_wait(380, -1);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_TALK) {
-				auto_move(5, P_CHEWY);
-				show_cur();
+			ssi[2].X = 270 - _G(spieler).scrollx;
+			ssi[2].Y = 10;
+			atds->set_split_win(2, &ssi[2]);
+			start_ads_wait(19);
+			room->set_timer_status(1, TIMER_START);
+		} else if (menu_item == CUR_NICHELLE) {
+			start_aad_wait(380, -1);
+			room->set_timer_status(1, TIMER_START);
+		} else if (menu_item == CUR_TALK) {
+			auto_move(5, P_CHEWY);
+			show_cur();
 
-				ssi[2].X = 270 - _G(spieler).scrollx;
-				ssi[2].Y = 10;
-				atds->set_split_win(2, &ssi[2]);
-				start_ads_wait(18);
-				room->set_timer_status(1, TIMER_START);
-			} else if (menu_item == CUR_USE) {
-				hide_cur();
-				action_flag = true;
-				auto_move(4, P_CHEWY);
-				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-				_G(spieler).R67PapageiWeg = true;
-				det->stop_detail(1);
-				det->del_static_ani(1);
-				det->show_static_spr(0);
-				invent_2_slot(PAPAGEI_INV);
-				show_cur();
-				atds->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
-			}
+			ssi[2].X = 270 - _G(spieler).scrollx;
+			ssi[2].Y = 10;
+			atds->set_split_win(2, &ssi[2]);
+			start_ads_wait(18);
+			room->set_timer_status(1, TIMER_START);
+		} else if (menu_item == CUR_USE) {
+			hide_cur();
+			auto_move(4, P_CHEWY);
+			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+			_G(spieler).R67PapageiWeg = true;
+			det->stop_detail(1);
+			det->del_static_ani(1);
+			det->show_static_spr(0);
+			invent_2_slot(PAPAGEI_INV);
 			show_cur();
+			atds->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
 		}
+		show_cur();
 	}
 	return action_flag;
 }


Commit: 91a05eae684076054d462fde1ceebc2c227d9f17
    https://github.com/scummvm/scummvm/commit/91a05eae684076054d462fde1ceebc2c227d9f17
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Fix crash in mouse_auto_obj in room 18

Changed paths:
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index b5c60ff6413..8e59e4f0f74 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -622,11 +622,11 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
 
 		if (!xoff) {
-			xoff = xy[0];
+			xoff = xy ? xy[0] : 0;
 			xoff += auto_mov_vector[nr].Xzoom;
 		}
 		if (!yoff) {
-			yoff = xy[1];
+			yoff = xy ? xy[1] : 0;
 			yoff += auto_mov_vector[nr].Yzoom;
 		}
 		if (minfo.x >= auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx &&


Commit: 59048c75d16965a96d68baf1f19f0a2807d595d2
    https://github.com/scummvm/scummvm/commit/59048c75d16965a96d68baf1f19f0a2807d595d2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Fix exiting room 17 via closed door

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 2a45e2958a8..26a808a0084 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -134,7 +134,7 @@ void check_ged_action(int16 index) {
 	if (!flags.GedAction) {
 		flags.GedAction = true;
 
-#define GED_ACTION(NUM) case NUM: Room##NUM::gedAction(NUM); break;
+#define GED_ACTION(NUM) case NUM: Room##NUM::gedAction(index); break;
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 		GED_ACTION(1);
 		GED_ACTION(2);


Commit: 27f765e25f972792063aa1d89bc909897859a99e
    https://github.com/scummvm/scummvm/commit/27f765e25f972792063aa1d89bc909897859a99e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Show cursor after using room 18 monitor

Changed paths:
    engines/chewy/rooms/room18.cpp


diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index f0ebf292a3e..d9c212b52b6 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -367,7 +367,10 @@ short Room18::use_cart_moni() {
 				start_aad_wait(120, -1);
 			}
 		}
+
+		show_cur();
 	}
+
 	return action_flag;
 }
 


Commit: a9907d5ed873fd6f36e95b815c8cbdc58ce456b3
    https://github.com/scummvm/scummvm/commit/a9907d5ed873fd6f36e95b815c8cbdc58ce456b3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Remove redundant SURIMY_OBJ defines

Changed paths:
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room9.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 363b7aa487e..7ff42f7262d 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -29,9 +29,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#undef SURIMY_OBJ
-#define SURIMY_OBJ 0
-
 static const int16 SURIMY_PHASEN[4][2] = {
 	{ 56, 63 },
 	{ 0, 0 },
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index d657de283cd..f7834e023d0 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -28,9 +28,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#undef SURIMY_OBJ
-#define SURIMY_OBJ 0
-
 static const MovLine SURIMY_MPKT[2] = {
 	{ {  65, 115, 150 }, 1, 6 },
 	{ { 300, 151, 150 }, 1, 6 }
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 51c5f63f150..89f736d932a 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -28,8 +28,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#define SURIMY_OBJ 0
-
 static const int16 SURIMY_PHASEN[4][2] = {
 	{ 91, 98 },
 	{ 91, 98 },


Commit: fc6061f473e5f1dd3b92e999b0931a4d97f463f2
    https://github.com/scummvm/scummvm/commit/fc6061f473e5f1dd3b92e999b0931a4d97f463f2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Fix re-enabling cursor after opening fridge

Changed paths:
    engines/chewy/rooms/room34.cpp


diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 6920aa9c6a7..27def3f23ee 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -45,7 +45,7 @@ bool Room34::use_kuehlschrank() {
 			auto_move(3, P_CHEWY);
 			_G(maus_links_click) = false;
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O, 1, false, P_CHEWY);
-			hide_cur();
+			show_cur();
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = true;


Commit: b9e5737344ee015d4335188f2773d3869412bb8f
    https://github.com/scummvm/scummvm/commit/b9e5737344ee015d4335188f2773d3869412bb8f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:47-08:00

Commit Message:
CHEWY: Fix animation putting out glider flames

Changed paths:
    engines/chewy/rooms/room25.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 7ff42f7262d..917ff93d34d 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -105,7 +105,7 @@ int16 Room25::gleiter_loesch() {
 			action_flag = true;
 			_G(spieler).R25GleiteLoesch = true;
 			auto_move(2, P_CHEWY);
-			flic_cut(FCUT_030, FLC_MODE);
+			flic_cut(FCUT_030, CFO_MODE);
 			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			atds->set_ats_str(219, 1, ATS_DATEI);
 			atds->set_ats_str(187, 1, ATS_DATEI);


Commit: 324cf75b3996f877acc895366e8a3e3f7594f42c
    https://github.com/scummvm/scummvm/commit/324cf75b3996f877acc895366e8a3e3f7594f42c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Fix flic play custom user function returns

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/rooms/room39.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 5a62c1a4dff..7da978f3bdc 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -117,26 +117,24 @@ void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 	}
 }
 
-void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
+int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	uint16 i;
 	size_t tmp_size;
-	char key;
 	float start, ende;
-	//bool trace_mode;
+	int16 ret = 0;
 
 	load_puffer = load_p;
 	virt_screen = vscreen + 4;
 
 	if (flic_header.load(rs)) {
 		if (flic_header.type == FLC) {
-			key = 0;
 			//trace_mode = false;
 			fade_flag = false;
 			fade_delay = 0;
 			cls_flag = false;
 			CurrentFrame = 0;
-			for (i = 0; (i < flic_header.frames) && (!modul) && (key != 27); i++) {
+			for (i = 0; (i < flic_header.frames) && (!modul) && (ret >= 0); i++) {
 				if (!frame_header.load(rs)) {
 					modul = DATEI;
 					fcode = READFEHLER;
@@ -151,7 +149,7 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 								modul = DATEI;
 								fcode = READFEHLER;
 							} else {
-								decode_frame();
+								ret = decode_frame();
 							}
 						}
 
@@ -167,13 +165,16 @@ void flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 			}
 		}
 	}
+
+	return ret;
 }
 
-void flic::decode_frame() {
+int16 flic::decode_frame() {
 	uint16 i;
 	byte *tmp_buf;
 	bool update_flag;
 	ChunkHead chunk_header;
+	int16 action_ret = 0;
 
 	tmp_buf = load_puffer;
 	update_flag = false;
@@ -240,7 +241,7 @@ void flic::decode_frame() {
 		if (update_flag != false) {
 			if (flic_user) {
 				out->setze_zeiger(virt_screen);
-				flic_user(CurrentFrame);
+				action_ret = flic_user(CurrentFrame);
 				out->setze_zeiger(nullptr);
 			}
 			out->back2screen(virt_screen - 4);
@@ -250,6 +251,8 @@ void flic::decode_frame() {
 			}
 		}
 	}
+
+	return action_ret;
 }
 
 void flic::col256_chunk(byte *tmp) {
@@ -400,12 +403,10 @@ void flic::delta_chunk_byte(byte *tmp) {
 	}
 }
 
-int flic::custom_play(CustomInfo *ci) {
+int16 flic::custom_play(CustomInfo *ci) {
 	uint16 i;
 	int16 ret = 0;
-	char key;
 	uint32 start, ende;
-	//bool trace_mode;
 
 	Cinfo = ci;
 	load_puffer = ci->TempArea;
@@ -421,15 +422,12 @@ int flic::custom_play(CustomInfo *ci) {
 	if (rs) {
 		if (custom_header.load(rs)) {
 			if (!scumm_strnicmp(custom_header.id, "CFO\0", 4)) {
-				key = 0;
-				//trace_mode = false;
-
 				cls_flag = false;
 				fade_flag = false;
 				fade_delay = 0;
 				CurrentFrame = 0;
 
-				for (i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0) && (key != 27); i++) {
+				for (i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0); i++) {
 					if (!custom_frame.load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
@@ -441,8 +439,7 @@ int flic::custom_play(CustomInfo *ci) {
 									modul = DATEI;
 									fcode = READFEHLER;
 								} else {
-									decode_cframe();
-									ret = modul ? -1 : 0;
+									ret = decode_cframe();
 								}
 							}
 
@@ -751,13 +748,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	}
 }
 
-void flic::decode_cframe() {
+int16 flic::decode_cframe() {
 	ChunkHead chunk_header;
 	uint16 i;
 	byte *tmp_buf;
 	int16 update_flag;
 	tmp_buf = load_puffer;
 	update_flag = false;
+	int16 action_ret = 0;
 
 	if (custom_frame.chunks != 0) {
 		for (i = 0; i < custom_frame.chunks; i++) {
@@ -821,7 +819,7 @@ void flic::decode_cframe() {
 			if (custom_user) {
 				out->back2back(virt_screen, load_puffer);
 				out->setze_zeiger(virt_screen);
-				custom_user(CurrentFrame);
+				action_ret = custom_user(CurrentFrame);
 				out->setze_zeiger(nullptr);
 				out->back2screen(virt_screen - 4);
 				out->back2back(load_puffer, virt_screen);
@@ -833,6 +831,8 @@ void flic::decode_cframe() {
 			}
 		}
 	}
+
+	return action_ret;
 }
 
 void flic::free_sound(int16 nr) {
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index d03211b3816..bd0f3aa7052 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -81,16 +81,16 @@ public:
 	~flic();
 	void play(const char *fname, byte *vscreen, byte *load_p);
 
-	void play(Common::Stream *handle, byte *vscreen, byte *load_p);
+	int16 play(Common::Stream *handle, byte *vscreen, byte *load_p);
 	void set_flic_user_function(int16(*user_funktion)(int16 key));
 	void remove_flic_user_function();
-	int custom_play(CustomInfo *ci);
+	int16 custom_play(CustomInfo *ci);
 	void set_custom_user_function(int16(*user_funktion)(int16 key));
 	void remove_custom_user_function();
 
 private:
-	void decode_frame();
-	void decode_cframe();
+	int16 decode_frame();
+	int16 decode_cframe();
 	void col256_chunk(byte *tmp);
 	void col64_chunk(byte *tmp);
 	void delta_chunk_byte(byte *tmp);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 97b70aab144..21e5a49aeb3 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -181,14 +181,14 @@ int16 Room39::use_tv() {
 		flags.NoPalAfterFlc = true;
 		out->setze_zeiger(nullptr);
 		out->cls();
-		flic_cut(FCUT_042, FLC_MODE);
+		flic_cut(FCUT_042, CFO_MODE);
 		++_G(spieler).R39TvKanal;
 		flags.NoPalAfterFlc = true;
 
 		if (_G(spieler).R39TvKanal == 2)
-			flic_cut(FCUT_036, FLC_MODE);
+			flic_cut(FCUT_036, CFO_MODE);
 		else if (_G(spieler).R39TvKanal == 5)
-			flic_cut(FCUT_033, FLC_MODE);
+			flic_cut(FCUT_033, CFO_MODE);
 
 		look_tv(0);
 		set_tv();
@@ -206,6 +206,8 @@ int16 Room39::use_tv() {
 				ani_nr = -1;
 			}
 		}
+
+		action_flag = true;
 	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != 5) {
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
@@ -311,7 +313,7 @@ void Room39::look_tv(int16 cls_mode) {
 			}
 
 			flc->set_custom_user_function(setup_func);
-			flic_cut(flic_nr, FLC_MODE);
+			flic_cut(flic_nr, CFO_MODE);
 			flc->remove_custom_user_function();
 
 			if (cls_mode) {
@@ -352,7 +354,7 @@ void Room39::set_tv() {
 }
 
 int16 Room39::setup_func(int16 frame) {
-	int16 action_ret = in->get_switch_code() == 1 ? -1 : 0;
+	int16 action_ret = in->get_switch_code() == ESC ? -1 : 0;
 
 	if (_flag) {
 		if (frame == 121)


Commit: 9df3217af265495a553ac9d3682f1f294967159e
    https://github.com/scummvm/scummvm/commit/9df3217af265495a553ac9d3682f1f294967159e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Change some get_switch_code result comparisons to use ESC

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 1454912e770..74f4d41f5a5 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -174,14 +174,14 @@ int16 MainMenu::creditsFn(int16 key) {
 			key == 128 || key == 165 || key == 185 ||
 			key == 211 || key == 248 || key == 266) {
 		for (int idx = 0; idx < 2000; ++idx) {
-			if (in->get_switch_code() == 1)
+			if (in->get_switch_code() == ESC)
 				return -1;
 			g_events->update();
 		}
 		return 0;
 
 	} else {
-		return in->get_switch_code() == 1 ? -1 : 0;
+		return in->get_switch_code() == ESC ? -1 : 0;
 	}
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 26a808a0084..1b32fb51efb 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -814,7 +814,7 @@ int16 flic_user_function(int16 keys) {
 	if (flic_val1 == 594 && keys == 18)
 		atds->stop_aad();
 
-	ret = in->get_switch_code() == 1 ? -1 : 0;
+	ret = in->get_switch_code() == ESC ? -1 : 0;
 	if (flic_val2 == 140 && keys == 15)
 		ret = -2;
 	if (flic_val2 == 144 && keys == 7)


Commit: 727b3eab53ac0b90f5d4219fcfd1ed34b56676c3
    https://github.com/scummvm/scummvm/commit/727b3eab53ac0b90f5d4219fcfd1ed34b56676c3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Fix mode parameters in a lot of flic_cut calls

Changed paths:
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room68.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 917ff93d34d..5e41011425d 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -72,7 +72,7 @@ void Room25::entry() {
 
 		_G(spieler).R25FirstEntry = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		flic_cut(FCUT_029, FLC_MODE);
+		flic_cut(FCUT_029, CFO_MODE);
 		det->enable_sound(0, 0);
 		det->play_sound(0, 0);
 		fx_blend = BLEND_NONE;
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 001f536e4d9..28deea3aafe 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -75,7 +75,7 @@ void Room28::entry(int16 eib_nr) {
 
 					auto_scroll(0, 0);
 					flc->set_flic_user_function(cut_serv1);
-					flic_cut(FCUT_064, FLC_MODE);
+					flic_cut(FCUT_064, CFO_MODE);
 					flc->remove_flic_user_function();
 					det->show_static_spr(6);
 
@@ -105,7 +105,7 @@ void Room28::entry(int16 eib_nr) {
 					_G(spieler).R28PostCar = false;
 					out->setze_zeiger(nullptr);
 					out->cls();
-					flic_cut(FCUT_063, FLC_MODE);
+					flic_cut(FCUT_063, CFO_MODE);
 					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
 					atds->set_ats_str(209, 0, ATS_DATEI);
@@ -219,10 +219,10 @@ void Room28::use_surimy() {
 		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		flc->set_flic_user_function(cut_serv2);
-		flic_cut(FCUT_055, FLC_MODE);
+		flic_cut(FCUT_055, CFO_MODE);
 		flc->remove_flic_user_function();
 		flc->set_flic_user_function(cut_serv1);
-		flic_cut(FCUT_056, FLC_MODE);
+		flic_cut(FCUT_056, CFO_MODE);
 		flc->remove_flic_user_function();
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index ad3ebbaf5a3..6e346b07a94 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -157,7 +157,7 @@ int16 Room31::use_topf() {
 						} else {
 							close_luke();
 							auto_move(3, P_CHEWY);
-							flic_cut(FCUT_046, FLC_MODE);
+							flic_cut(FCUT_046, CFO_MODE);
 							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
 							dia_nr = 156;
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 4c0e40aa7d7..c1a25fa8597 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -48,7 +48,7 @@ int16 Room32::use_howard() {
 			auto_move(1, P_CHEWY);
 			cur_2_inventory();
 			remove_inventory(MUNTER_INV);
-			flic_cut(FCUT_043, FLC_MODE);
+			flic_cut(FCUT_043, CFO_MODE);
 			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(75, -1);
@@ -119,7 +119,7 @@ void Room32::use_schreibmaschine() {
 						auto_move(3, P_CHEWY);
 						_G(spieler).R32UseSchreib = true;
 						cur_2_inventory();
-						flic_cut(FCUT_044, FLC_MODE);
+						flic_cut(FCUT_044, CFO_MODE);
 						det->show_static_spr(5);
 						atds->set_ats_str(203, 1, ATS_DATEI);
 						ani_nr = CH_TALK3;
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index f7834e023d0..7eeaae56988 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -164,7 +164,7 @@ void Room33::use_maschine() {
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(2, 1, ANI_VOR);
-			flic_cut(FCUT_031, FLC_MODE);
+			flic_cut(FCUT_031, CFO_MODE);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(71, -1);
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 4efb5d1ac81..0b4884b3175 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -81,7 +81,7 @@ int16 Room35::use_cat() {
 			auto_move(4, P_CHEWY);
 			_G(spieler).R35TransCat = true;
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
-			flic_cut(FCUT_045, FLC_MODE);
+			flic_cut(FCUT_045, CFO_MODE);
 			start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 			start_aad_wait(94, -1);
 		} else if (is_cur_inventar(PUTENKEULE_INV)) {
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 7d2f4a7ea27..e1df65240a4 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -111,7 +111,7 @@ short Room37::use_wippe() {
 			start_aad_wait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flc->set_flic_user_function(cut_serv1);
-			flic_cut(FCUT_047, FLC_MODE);
+			flic_cut(FCUT_047, CFO_MODE);
 			flc->remove_flic_user_function();
 			flags.NoScroll = false;
 			show_cur();
@@ -179,9 +179,9 @@ int16 Room37::use_glas() {
 			start_aad_wait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flc->set_flic_user_function(cut_serv2);
-			flic_cut(FCUT_048, FLC_MODE);
+			flic_cut(FCUT_048, CFO_MODE);
 			flc->remove_flic_user_function();
-			flic_cut(FCUT_049, FLC_MODE);
+			flic_cut(FCUT_049, CFO_MODE);
 			invent_2_slot(GEBISS_INV);
 			det->hide_static_spr(9);
 			atds->set_ats_str(250, 1, ATS_DATEI);
@@ -224,7 +224,7 @@ void Room37::dog_bell() {
 			start_detail_wait(6, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			det->start_detail(11, 255, ANI_VOR);
-			flic_cut(FCUT_050, FLC_MODE);
+			flic_cut(FCUT_050, CFO_MODE);
 			start_detail_wait(6, 1, ANI_RUECK);
 			det->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
@@ -247,9 +247,9 @@ void Room37::dog_bell() {
 			det->del_static_ani(3);
 			det->stop_detail(3);
 			start_detail_wait(4, 1, ANI_VOR);
-			flic_cut(FCUT_051, FLC_MODE);
+			flic_cut(FCUT_051, CFO_MODE);
 			_G(spieler).scrollx = 104;
-			flic_cut(FCUT_054, FLC_MODE);
+			flic_cut(FCUT_054, CFO_MODE);
 			det->show_static_spr(0);
 
 			_G(spieler).R37HundScham = true;
@@ -290,7 +290,7 @@ void Room37::use_hahn() {
 		auto_move(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
 		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
-		flic_cut(FCUT_052, FLC_MODE);
+		flic_cut(FCUT_052, CFO_MODE);
 		cur_2_inventory();
 		menu_item = CUR_TALK;
 		cursor_wahl(menu_item);
@@ -321,7 +321,7 @@ void Room37::use_hahn() {
 			det->hide_static_spr(0);
 			det->start_detail(10, 10, ANI_VOR);
 			auto_move(8, P_CHEWY);
-			flic_cut(FCUT_053, FLC_MODE);
+			flic_cut(FCUT_053, CFO_MODE);
 			det->stop_detail(10);
 			_G(spieler).scrollx = 320;
 			flags.NoScroll = false;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 21e5a49aeb3..d95184b77c4 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -213,14 +213,14 @@ int16 Room39::use_tv() {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
 			flags.NoPalAfterFlc = true;
-			flic_cut(FCUT_041, FLC_MODE);
+			flic_cut(FCUT_041, CFO_MODE);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
 			out->setze_zeiger(nullptr);
 			out->cls();
 			out->set_palette(pal);
 			flags.NoPalAfterFlc = true;
-			flic_cut(TV_FLIC[0], FLC_MODE);
+			flic_cut(TV_FLIC[0], CFO_MODE);
 
 			out->cls();
 			out->setze_zeiger(nullptr);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index e00ced353d0..7d6bd9fdc3e 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -124,7 +124,7 @@ void Room40::xit(int16 eib_nr) {
 				start_aad_wait(238, -1);
 				move_train(1);
 				flags.NoPalAfterFlc = true;
-				flic_cut(FCUT_073, FLC_MODE);
+				flic_cut(FCUT_073, CFO_MODE);
 
 				if (_G(spieler).ChewyAni != 5)
 					_G(spieler).PersonGlobalDia[1] = 10023;
@@ -544,7 +544,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	if (aad_nr == 237) {
 		start_aad_wait(aad_nr, -1);
 		flags.NoPalAfterFlc = true;
-		flic_cut(FCUT_062, FLC_MODE);
+		flic_cut(FCUT_062, CFO_MODE);
 		fx_blend = BLEND3;
 		start_aad_wait(375, -1);
 	} else {
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 141ae1ef361..1855dc151bc 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -201,7 +201,7 @@ int16 Room41::use_lola() {
 			_G(spieler).R41LolaOk = true;
 			auto_move(4, P_CHEWY);
 			det->disable_sound(6, 0);
-			flic_cut(FCUT_057, FLC_MODE);
+			flic_cut(FCUT_057, CFO_MODE);
 			set_person_pos(127, 112, P_CHEWY, P_LEFT);
 			det->stop_detail(6);
 
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index c946bdf5bc8..4fe34f40555 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -58,7 +58,7 @@ void Room43::night_small() {
 
 	_G(spieler).scrollx = 194;
 	start_aad_wait(191, -1);
-	flic_cut(FCUT_058, FLC_MODE);
+	flic_cut(FCUT_058, CFO_MODE);
 	det->disable_sound(0, 0);
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
@@ -82,7 +82,7 @@ void Room43::catch_pg() {
 	auto_scroll(194, 0);
 	start_aad_wait(235, -1);
 	_G(spieler).R43GetPgLady = true;
-	flic_cut(FCUT_058, FLC_MODE);
+	flic_cut(FCUT_058, CFO_MODE);
 
 	det->disable_sound(0, 0);
 	flags.NoScroll = false;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 1838327e60f..ed86a175bc4 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -85,9 +85,10 @@ void Room45::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 		}
 	}
+
 	if (eib_nr == 87) {
 		flags.NoPalAfterFlc = true;
-		flic_cut(FCUT_073, FLC_MODE);
+		flic_cut(FCUT_073, CFO_MODE);
 	}
 }
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 44ea22b8570..237d5b6b856 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -261,7 +261,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					flags.NoPalAfterFlc = true;
 					flc->set_flic_user_function(cut_serv);
 					det->show_static_spr(16);
-					flic_cut(FCUT_068, FLC_MODE);
+					flic_cut(FCUT_068, CFO_MODE);
 					flc->remove_flic_user_function();
 
 					det->hide_static_spr(16);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index d2dc525bf1a..f68315cbf8b 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -242,7 +242,7 @@ int16 Room54::use_zelle() {
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
 				flc->set_flic_user_function(cut_serv);
-				flic_cut(FCUT_069, FLC_MODE);
+				flic_cut(FCUT_069, CFO_MODE);
 				flc->remove_flic_user_function();
 
 				del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 12e8a1f4d80..f4acc222fa5 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -212,7 +212,7 @@ int16 Room55::use_telefon() {
 				det->hide_static_spr(0);
 				det->hide_static_spr(8);
 				atds->set_ats_str(354, 1, ATS_DATEI);
-				flic_cut(FCUT_071, FLC_MODE);
+				flic_cut(FCUT_071, CFO_MODE);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
@@ -239,7 +239,7 @@ int16 Room55::use_telefon() {
 					SHOULD_QUIT_RETURN0;
 				}
 
-				flic_cut(FCUT_072, FLC_MODE);
+				flic_cut(FCUT_072, CFO_MODE);
 				flags.NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
 				invent_2_slot(EINLAD_INV);
@@ -364,7 +364,7 @@ int16 Room55::use_kammeraus() {
 					start_detail_wait(5, 1, ANI_VOR);
 					det->show_static_spr(10);
 					flc->set_flic_user_function(cut_serv);
-					flic_cut(FCUT_070, FLC_MODE);
+					flic_cut(FCUT_070, CFO_MODE);
 					flc->remove_flic_user_function();
 
 					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 89e8da1b44d..c544d5d3c67 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -51,10 +51,12 @@ void Room56::entry() {
 			start_detail_wait(8, 1, ANI_VOR);
 			start_detail_wait(7, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
+
 			if (!_G(spieler).R56GetTabak) {
-				flic_cut(FCUT_074, FLC_MODE);
+				flic_cut(FCUT_074, CFO_MODE);
 				det->show_static_spr(2);
 			}
+
 			room->set_zoom(23);
 			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
@@ -85,7 +87,7 @@ void Room56::entry() {
 			_G(maus_links_click) = false;
 			atds->stop_aad();
 			start_aad_wait(306, -1);
-			flic_cut(FCUT_076, FLC_MODE);
+			flic_cut(FCUT_076, CFO_MODE);
 		}
 	}
 	SetUpScreenFunc = setup_func;
@@ -196,7 +198,7 @@ int16 Room56::use_kneipe() {
 				flags.NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
-				flic_cut(FCUT_075, FLC_MODE);
+				flic_cut(FCUT_075, CFO_MODE);
 				det->start_detail(10, 6, ANI_VOR);
 				start_aad_wait(307, -1);
 				det->stop_detail(10);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 587319139d9..3ed44f19a4e 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -111,7 +111,7 @@ int16 Room62::use_laura() {
 		det->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flic_cut(FCUT_077, FLC_MODE);
+		flic_cut(FCUT_077, CFO_MODE);
 		show_cur();
 		_G(spieler).R64Moni1Ani = 0;
 		_G(spieler).R64Moni2Ani = 0;
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 5edc4648032..7325f5ea8db 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -126,8 +126,8 @@ void Room63::bork_platt() {
 	_G(spieler).R62LauraVerwandlung = false;
 	_G(r63Schalter) = false;
 	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
-	flic_cut(FCUT_081, FLC_MODE);
-	flic_cut(FCUT_082, FLC_MODE);
+	flic_cut(FCUT_081, CFO_MODE);
+	flic_cut(FCUT_082, CFO_MODE);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	check_shad(4, 1);
 	spieler_mi[P_CHEWY].Mode = true;
@@ -139,7 +139,7 @@ void Room63::bork_platt() {
 	start_aad_wait(361, -1);
 	out->cls();
 	flags.NoPalAfterFlc = true;
-	flic_cut(FCUT_079, FLC_MODE);
+	flic_cut(FCUT_079, CFO_MODE);
 	fx_blend = BLEND3;
 	show_cur();
 	flags.MainInput = true;
@@ -301,7 +301,7 @@ int16 Room63::use_aschenbecher() {
 				det->hide_static_spr(10);
 				det->hide_static_spr(12);
 				start_aad_wait(368, -1);
-				flic_cut(FCUT_080, FLC_MODE);
+				flic_cut(FCUT_080, CFO_MODE);
 				atds->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
 				atds->set_ats_str(383, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 3d7c20baadf..f360da719b2 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -39,7 +39,7 @@ void Room64::entry() {
 		chewy_entry();
 		if (_G(spieler).R63Feuer) {
 			flc->set_flic_user_function(cut_sev);
-			flic_cut(FCUT_078, FLC_MODE);
+			flic_cut(FCUT_078, CFO_MODE);
 			flc->remove_flic_user_function();
 			_G(spieler).R64ManWeg = true;
 			det->del_static_ani(1);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 429610467df..a786333130b 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -317,7 +317,7 @@ int16 Room68::use_diva() {
 		det->hide_static_spr(3);
 		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ABLOCK38);
-		flic_cut(FCUT_083, FLC_MODE);
+		flic_cut(FCUT_083, CFO_MODE);
 		det->del_static_ani(18);
 		test_intro(22);
 		ERROR
@@ -338,7 +338,9 @@ void Room68::kostuem_aad(int16 aad_nr) {
 	if (_G(spieler).DiaAMov != -1) {
 		auto_move(_G(spieler).DiaAMov, P_CHEWY);
 	}
+
 	start_aad_wait(aad_nr, -1);
+
 	if (!_G(spieler).R68DivaWeg)
 		start_aad_wait(388, -1);
 	else if (!_G(spieler).R67LiedOk)
@@ -357,11 +359,14 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		start_detail_wait(22, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		det->start_detail(27, 255, ANI_VOR);
+
 		if (_G(spieler).DisplayText)
 			start_detail_wait(23, 3, ANI_VOR);
 		else {
 			det->start_detail(23, 255, ANI_VOR);
 			ailsnd->init_double_buffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
+			::error("TODO: voc_handle");
+#if 0
 			Stream *voc_handle = nullptr; // TODO : should be the voc_handle initialized in sound_init()
 			mem->file->select_pool_item(voc_handle, 109);
 			ERROR
@@ -370,7 +375,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 
 			while (!ailsnd->isSpeechActive(1))
 				set_up_screen(DO_SETUP);
-
+#endif
 			det->stop_detail(23);
 		}
 


Commit: 2d6ef96d94e0e49c9770c872520b330e0b21c745
    https://github.com/scummvm/scummvm/commit/2d6ef96d94e0e49c9770c872520b330e0b21c745
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Implement Room 66

Changed paths:
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room66.h
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index e0005ae2f1d..2697537f02d 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room66.h"
 
 namespace Chewy {
@@ -33,10 +31,68 @@ void Room66::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
+	_G(spieler).ZoomXy[P_HOWARD][0] = 50;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 36;
+	_G(spieler).ZoomXy[P_NICHELLE][0] = 50;
+	_G(zoom_horizont) = 130;
+	flags.ZoomMov = true;
+	_G(zoom_mov_fak) = 3;
+	if (!_G(spieler).flags26_4) {
+		det->show_static_spr(4);
+		det->show_static_spr(8);
+		_G(cur_hide_flag) = false;
+		hide_cur();
+		_G(spieler).flags26_4 = true;
+		_G(spieler).scrollx = 476;
+		set_person_pos(598, 101, P_CHEWY, P_RIGHT);
+		set_person_pos(644, 82, P_NICHELLE, P_LEFT);
+		set_person_pos(623, 81, P_HOWARD, P_LEFT);
+		start_aad_wait(413, -1);
+		auto_move(9, P_CHEWY);
+		SetUpScreenFunc = setup_func;
+		start_aad_wait(403, -1);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(0, 1, ANI_VOR);
+		det->show_static_spr(14);
+		wait_show_screen(15);
+		det->hide_static_spr(14);
+		start_detail_wait(1, 1, ANI_VOR);
+		load_chewy_taf(1);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		start_spz(16, 255, false, P_CHEWY);
+		start_aad_wait(404, -1);
+		start_aad_wait(415, -1);
+		show_cur();
+	} else if (!flags.LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
+		switch (eib_nr) {
+		case 96:
+			set_person_pos(488, 114, P_HOWARD, P_RIGHT);
+			set_person_pos(520, 114, P_NICHELLE, P_RIGHT);
+			break;
+		case 97:
+			set_person_pos(22, 114, P_HOWARD, P_RIGHT);
+			set_person_pos(50, 114, P_NICHELLE, P_RIGHT);
+			break;
+		case 101:
+			set_person_pos(150, 114, P_HOWARD, P_RIGHT);
+			set_person_pos(182, 114, P_NICHELLE, P_RIGHT);
+			break;
+		default:
+			break;
+		}
+		
+	}
+	SetUpScreenFunc = setup_func;
 }
 
 void Room66::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
+	atds->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATEI);
+	atds->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATEI);
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 66)
+		return;
+
 	switch (eib_nr) {
 	case 98:
 		_G(spieler).PersonRoomNr[P_HOWARD] = 69;
@@ -53,30 +109,112 @@ void Room66::xit(int16 eib_nr) {
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 67;
 		break;
 
+	default:
+		break;
 	}
 }
 
+void Room66::setup_func() {
+	calc_person_look();
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+
+	int edx, esi;
+	if (posX < 30) {
+		edx = 57;
+		esi = 97;
+	} else if (posX < 260){
+		edx = 170;
+		esi = 263;
+	} else if (posX < 370) {
+		edx = 314;
+		esi = 398;
+	} else if (posX < 500) {
+		edx = 517;
+		esi = 556;
+	} else {
+		edx = 607;
+		esi = 690;
+	}
+
+	go_auto_xy(edx, 114, P_HOWARD, ANI_GO);
+	go_auto_xy(esi, 114, P_NICHELLE, ANI_GO);
+
+	if (posX >= 500 || _G(spieler).flags26_8)
+		return;
+
+	_G(spieler).flags26_8 = true;
+	det->start_detail(9, 5, false);
+	start_aad_wait(405, -1);
+}
+
 void Room66::talk1() {
+	hide_cur();
+	auto_move(5, P_CHEWY);
+	start_aad_wait(407, -1);
+	show_cur();
 }
 
 void Room66::talk2() {
+	proc8(6, 10, 11, 408);
 }
 
 void Room66::talk3() {
+	proc8(8, 6, 7, 409);
 }
 
 void Room66::talk4() {
+	proc8(7, 2, 3, _G(spieler).flags26_20 ? 414 : 410);
 }
 
 int Room66::proc2() {
+	hide_cur();
+	auto_move(0, P_CHEWY);
+	_G(spieler).flags26_40 = true;
+	_G(spieler).room_e_obj[100].Attribut = 3;
+	atds->set_ats_str(423, 1, ANI_GO);
+	show_cur();
+	
 	return 0;
 }
 
 int Room66::proc7() {
-	return 0;
+	if (!is_cur_inventar(88))
+		return 0;
+
+	hide_cur();
+	auto_move(7, P_CHEWY);
+	if (_G(spieler).flags26_10) {
+		del_inventar(_G(spieler).AkInvent);
+		invent_2_slot(92);
+		invent_2_slot(93);
+		invent_2_slot(94);
+		_G(spieler).flags26_20 = true;
+	}
+
+	proc8(7, 2, 3, 411 + (_G(spieler).R68Papagei ? 1 : 0));
+	_G(cur_hide_flag) = 0;
+	hide_cur();
+	if (_G(spieler).flags26_20)
+		start_detail_wait(4, 1, ANI_VOR);
+	show_cur();
+
+	return 1;
 }
 
-void Room66::proc8(int eax, int edx, int ebx, int ecx) {
+void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, int transitionDiaNr) {
+	hide_cur();
+
+	if (chewyAutoMovNr != -1)
+		auto_move(chewyAutoMovNr, P_CHEWY);
+
+	room->set_timer_status(restartAniNr, TIMER_STOP);
+	det->del_static_ani(restartAniNr);
+	det->set_static_ani(transitionAniNr, -1);
+	start_aad_wait(transitionDiaNr, -1);
+	det->del_static_ani(transitionAniNr);
+	det->set_static_ani(restartAniNr, -1);
+	room->set_timer_status(restartAniNr, TIMER_START);
+	show_cur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room66.h b/engines/chewy/rooms/room66.h
index 13e26f91291..18b3b3d496f 100644
--- a/engines/chewy/rooms/room66.h
+++ b/engines/chewy/rooms/room66.h
@@ -29,13 +29,15 @@ class Room66 {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
+	static void setup_func();
+
 	static void talk1();
 	static void talk2();
 	static void talk3();
 	static void talk4();
 	static int proc2();
 	static int proc7();
-	static void proc8(int eax, int edx, int ebx, int ecx);
+	static void proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, int transitionDiaNr);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index d59df22102b..8ed24052f4d 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -111,23 +111,23 @@ void Room82::talk1() {
 	if (_G(spieler).flags30_40)
 		return;
 
-	int edi, esi; //TODO: Rename those variables when Room66 is reversed
+	int transitionDiaNr, transitionAniNr;
 	if (!_G(spieler).flags30_10) {
-		edi = 446;
-		esi = 8;
+		transitionDiaNr = 446;
+		transitionAniNr = 8;
 	} else if (!_G(spieler).flags30_20) {
-		edi = 454;
-		esi = 7;
+		transitionDiaNr = 454;
+		transitionAniNr = 7;
 	} else {
-		edi = 449;
-		esi = 7;
+		transitionDiaNr = 449;
+		transitionAniNr = 7;
 
 		_G(spieler).flags30_40 = true;
 		atds->set_ats_str(473, 1, ATS_DATEI);
 		atds->set_ats_str(467, 1, ATS_DATEI);		
 	}
 
-	Room66::proc8(2, 7, esi, edi);
+	Room66::proc8(2, 7, transitionAniNr, transitionDiaNr);
 }
 
 void Room82::talk2() {


Commit: a294f0641a16f28ef891b82f8b87fc83d82bf8fc
    https://github.com/scummvm/scummvm/commit/a294f0641a16f28ef891b82f8b87fc83d82bf8fc
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Fix logic of room 65

Changed paths:
    engines/chewy/rooms/room65.cpp


diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index fc309d13653..3ade50e4b8e 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room65.h"
 
@@ -62,18 +61,17 @@ void Room65::entry() {
 void Room65::xit() {
 	_G(spieler).scrollx = _G(r65tmp_scrollx);
 	_G(spieler).scrolly = _G(r65tmp_scrolly);
+	set_person_rnr();
 	set_person_pos(_G(r65tmp_ch_x), _G(r65tmp_ch_y), P_CHEWY, -1);
 	set_person_pos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
 	room_blk.AadLoad = true;
 	room_blk.AtsLoad = true;
 	_G(maus_links_click) = false;
-	set_person_rnr();
 }
 
-void Room65::atds_string_start(int16 dia_nr, int16 str_nr,
-	int16 person_nr, int16 mode) {
-	int16 ani_nr;
+void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
 	if (!_G(spieler).PersonDiaRoom[person_nr]) {
+		int16 ani_nr;
 		switch (person_nr) {
 		case 0:
 			if (mode == AAD_STR_START) {
@@ -94,6 +92,10 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr,
 					ani_nr = CH_JM_TALK;
 					break;
 
+				case CHEWY_ANI7:
+					ani_nr = 46;
+					break;
+
 				default:
 					ani_nr = -1;
 					break;
@@ -108,7 +110,17 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr,
 
 		case 1:
 			if (mode == AAD_STR_START) {
-				start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+				switch (_G(spieler).mi[1]) {
+				case 2:
+					start_spz(50, 255, ANI_VOR, P_HOWARD);
+					break;
+				case 3:
+					start_spz(57, 255, ANI_VOR, P_HOWARD);
+					break;
+				default:
+					start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+					break;
+				}
 			} else {
 				stop_spz();
 			}
@@ -122,6 +134,8 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr,
 			}
 			break;
 
+		default:
+			break;
 		}
 	} else if (mode == AAD_STR_START) {
 		det->start_detail(person_nr, 255, ANI_VOR);


Commit: efe7313a8d7962909aa43b7f55b205eb5d702190
    https://github.com/scummvm/scummvm/commit/efe7313a8d7962909aa43b7f55b205eb5d702190
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Fix logic of Room 64

Changed paths:
    engines/chewy/rooms/room64.cpp


diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index f360da719b2..ece0a6001d6 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room64.h"
 
@@ -33,6 +32,10 @@ void Room64::entry() {
 	SetUpScreenFunc = setup_func;
 	_G(r62Delay) = 0;
 	_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
+
+	if (_G(spieler).flags38_1)
+		det->start_detail(0, 255, false);
+	
 	if (!_G(spieler).R64ManWeg) {
 		_G(timer_nr)[0] = room->set_timer(1, 10);
 		det->set_static_ani(1, -1);
@@ -47,24 +50,21 @@ void Room64::entry() {
 			atds->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
+			hide_cur();
 			start_aad_wait(354, -1);
+			show_cur();
 		}
 	} else
 		chewy_entry();
 }
 
 int16 Room64::cut_sev(int16 frame) {
-	int16 spr_nr;
-	int16 x, y;
-	spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
-	y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
-	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak,
-		(int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
-	out->scale_set(chewy->image[spr_nr], x, y,
-		spieler_vector[P_CHEWY].Xzoom,
-		spieler_vector[P_CHEWY].Yzoom,
-		scr_width);
+	const int16 spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
+	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
+	
+	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak, (int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
+	out->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
 	return 0;
 }
 
@@ -82,6 +82,10 @@ void Room64::chewy_entry() {
 void Room64::calc_monitor() {
 	int16 str_nr = 0;
 	switch (_G(spieler).R64Moni1Ani) {
+	case 0:
+		str_nr = 2;
+		break;
+
 	case 3:
 		str_nr = 0;
 		det->set_static_ani(3, -1);
@@ -92,22 +96,23 @@ void Room64::calc_monitor() {
 		det->start_detail(5, 255, ANI_VOR);
 		break;
 
-	case 0:
-		str_nr = 2;
+	default:
 		break;
-
 	}
+
 	atds->set_ats_str(373, str_nr, ATS_DATEI);
 	switch (_G(spieler).R64Moni2Ani) {
+	case 0:
+		str_nr = 1;
+		break;
+
 	case 4:
 		str_nr = 0;
 		det->set_static_ani(4, -1);
 		break;
 
-	case 0:
-		str_nr = 1;
+	default:
 		break;
-
 	}
 	atds->set_ats_str(374, str_nr, ATS_DATEI);
 }
@@ -117,10 +122,12 @@ void Room64::setup_func() {
 		_G(r62Delay) = (_G(spieler).DelaySpeed + 1) * 60;
 		if (_G(r64TalkAni) == 3 || _G(r64TalkAni) == 4)
 			det->stop_detail(_G(r64TalkAni));
+		
 		if (_G(r64TalkAni) == 4)
 			_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
 		else
 			_G(r64TalkAni) = _G(spieler).R64Moni2Ani;
+
 		if (_G(r64TalkAni) != 0)
 			det->start_detail(_G(r64TalkAni), 255, ANI_VOR);
 	} else
@@ -148,27 +155,33 @@ void Room64::talk_man(int16 aad_nr) {
 }
 
 int16 Room64::use_tasche() {
-	int16 aad_nr;
 	int16 action_ret = false;
 	hide_cur();
-	aad_nr = -1;
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R64ManWeg) {
 			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
 				auto_move(3, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
-				aad_nr = 353;
 				new_invent_2_cur(GERAET_INV);
 				atds->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
+				start_aad_wait(353, -1);
+			} else {
+				show_cur();
+				return 0;
 			}
 		} else {
 			auto_move(3, P_CHEWY);
-			aad_nr = 352;
-		}
-		if (aad_nr != -1) {
-			start_aad_wait(aad_nr, -1);
-			action_ret = true;
+			room->set_timer_status(1, TIMER_STOP);
+			det->del_static_ani(1);
+			det->stop_detail(1);
+			det->start_detail(6, 255, false);
+			start_aad_wait(352, -1);
+			det->stop_detail(6);
+			room->set_timer_status(0, TIMER_START);
+			det->set_static_ani(1, -1);
 		}
+		
+		action_ret = true;
 	}
 	show_cur();
 	return action_ret;


Commit: dd1b2250dfc0fcef58635fb07c5c97494ec733ca
    https://github.com/scummvm/scummvm/commit/dd1b2250dfc0fcef58635fb07c5c97494ec733ca
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:48-08:00

Commit Message:
CHEWY: Review logic of Room 62

Changed paths:
    engines/chewy/rooms/room62.cpp


diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 3ed44f19a4e..2a5d34719ff 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room62.h"
 
@@ -45,7 +44,7 @@ void Room62::entry() {
 		det->stop_detail(6);
 		det->set_static_ani(5, -1);
 		go_auto_xy(199, 59, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
+		set_person_spr(0, P_HOWARD);
 		det->del_static_ani(5);
 		det->start_detail(5, 255, ANI_VOR);
 		start_aad_wait(346, -1);


Commit: 728c4f054519357a5b3413e1b4298dce1879a667
    https://github.com/scummvm/scummvm/commit/728c4f054519357a5b3413e1b4298dce1879a667
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:49-08:00

Commit Message:
CHEWY: Fix logic in room 63

Changed paths:
    engines/chewy/rooms/room63.cpp


diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 7325f5ea8db..63daed08029 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room63.h"
 
@@ -54,6 +53,7 @@ void Room63::entry() {
 		det->show_static_spr(10);
 		det->show_static_spr(12);
 	} else if (_G(spieler).R62LauraVerwandlung) {
+		atds->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
 		SetUpScreenFunc = setup_func;
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
@@ -66,59 +66,66 @@ void Room63::entry() {
 }
 
 void Room63::setup_func() {
-	if (_G(spieler).R62LauraVerwandlung) {
-		switch (_G(r63ChewyAni)) {
-		case 0:
-			if (det->get_ani_status(0) == false) {
-				if (_G(r63RunDia) < 4)
-					++_G(r63RunDia);
-				start_aad(370 + _G(r63RunDia));
-				det->start_detail(1, 1, ANI_VOR);
-				_G(r63ChewyAni) = 1;
-			}
-			break;
+	if (!_G(spieler).R62LauraVerwandlung)
+		return;
 
-		case 1:
-			if (det->get_ani_status(1) == false) {
-				_G(spieler).ScrollxStep = 4;
-				set_person_pos(0, 0, P_CHEWY, P_RIGHT);
-				det->start_detail(22, 1, ANI_VOR);
-				det->start_detail(2, 1, ANI_VOR);
-				atds->stop_aad();
-				_G(r63ChewyAni) = 2;
-			}
-			break;
+	cur_2_inventory();
+	menu_item = CUR_USE;
+	cursor_wahl(CUR_USE);
+	
+	switch (_G(r63ChewyAni)) {
+	case 0:
+		if (det->get_ani_status(0) == false) {
+			if (_G(r63RunDia) < 4)
+				++_G(r63RunDia);
+			start_aad(370 + _G(r63RunDia));
+			det->start_detail(1, 1, ANI_VOR);
+			_G(r63ChewyAni) = 1;
+		}
+		break;
 
-		case 2:
-			if (det->get_ani_status(2) == false) {
-				det->start_detail(3, 1, ANI_VOR);
-				_G(r63ChewyAni) = 3;
-			}
-			break;
+	case 1:
+		if (det->get_ani_status(1) == false) {
+			_G(spieler).ScrollxStep = 4;
+			set_person_pos(0, 0, P_CHEWY, P_RIGHT);
+			det->start_detail(22, 1, ANI_VOR);
+			det->start_detail(2, 1, ANI_VOR);
+			atds->stop_aad();
+			_G(r63ChewyAni) = 2;
+		}
+		break;
 
-		case 3:
-			if (det->get_ani_status(3) == false) {
-				if (!flags.AutoAniPlay) {
-					flags.AutoAniPlay = true;
+	case 2:
+		if (det->get_ani_status(2) == false) {
+			det->start_detail(3, 1, ANI_VOR);
+			_G(r63ChewyAni) = 3;
+		}
+		break;
 
-					_G(spieler).ScrollxStep = 16;
-					_G(spieler).scrollx -= _G(spieler).scrollx % 16;
-					flags.NoScroll = true;
-					auto_scroll(176, 0);
-					set_person_pos(424, 78, P_CHEWY, P_LEFT);
-					flags.NoScroll = false;
-					_G(spieler).ScrollxStep = 4;
-					if (!_G(r63Schalter)) {
-						det->start_detail(0, 1, ANI_VOR);
-						_G(r63ChewyAni) = 0;
-					} else
-						bork_platt();
-					flags.AutoAniPlay = false;
-				}
-			}
-			break;
+	case 3:
+		if (det->get_ani_status(3) == false) {
+			if (!flags.AutoAniPlay) {
+				flags.AutoAniPlay = true;
+				flags.NoScroll = true;
 
+				_G(spieler).ScrollxStep = 16;
+				_G(spieler).scrollx -= _G(spieler).scrollx % 16;
+				auto_scroll(176, 0);
+				set_person_pos(424, 78, P_CHEWY, P_LEFT);
+				flags.NoScroll = false;
+				_G(spieler).ScrollxStep = 4;
+				if (!_G(r63Schalter)) {
+					det->start_detail(0, 1, ANI_VOR);
+					_G(r63ChewyAni) = 0;
+				} else
+					bork_platt();
+				flags.AutoAniPlay = false;
+			}
 		}
+		break;
+
+	default:
+		break;
 	}
 }
 
@@ -193,6 +200,7 @@ int16 Room63::use_fx_man() {
 		hide_cur();
 		auto_move(1, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
+		remove_inventory(34);
 		start_aad_wait(359, -1);
 		det->del_static_ani(5);
 		start_detail_wait(6, 1, ANI_VOR);
@@ -227,6 +235,7 @@ int16 Room63::use_schalter() {
 				wait_show_screen(18);
 				det->hide_static_spr(14);
 				start_detail_wait(24, 1, ANI_VOR);
+				det->show_static_spr(1);
 				det->hide_static_spr(2);
 				start_aad_wait(364, -1);
 				atds->set_ats_str(385, 1, ATS_DATEI);
@@ -315,6 +324,7 @@ int16 Room63::use_aschenbecher() {
 				start_aad_wait(369, -1);
 		} else
 			start_aad_wait(366, -1);
+		
 		show_cur();
 	}
 	return action_ret;


Commit: 1bbc1713bbddd05452a85097b6fdd6121e157622
    https://github.com/scummvm/scummvm/commit/1bbc1713bbddd05452a85097b6fdd6121e157622
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:49-08:00

Commit Message:
CHEWY: Review logic of Room 59

Changed paths:
    engines/chewy/rooms/room59.cpp


diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
index d51d5251e56..a35e4a2dc1c 100644
--- a/engines/chewy/rooms/room59.cpp
+++ b/engines/chewy/rooms/room59.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room59.h"
 
@@ -31,7 +30,6 @@ namespace Rooms {
 
 void Room59::look_poster() {
 	if (!_G(spieler).R59PosterWeg) {
-
 		atds->set_ats_str(302, 1, ATS_DATEI);
 		atds->set_ats_str(301, 1, ATS_DATEI);
 		_G(spieler).R59PosterWeg = true;


Commit: 18d4fe09863fa7445ca9d80e10f93f4f45452897
    https://github.com/scummvm/scummvm/commit/18d4fe09863fa7445ca9d80e10f93f4f45452897
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:49-08:00

Commit Message:
CHEWY: review logic of Room 58

Changed paths:
    engines/chewy/rooms/room58.cpp


diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index dd82901a47e..156b7034f74 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room58.h"
 
@@ -34,7 +33,6 @@ void Room58::entry() {
 }
 
 void Room58::xit() {
-	int16 tmp;
 	_G(spieler).scrollx = _G(spieler).R58TmpSx;
 	_G(spieler).scrolly = _G(spieler).R58TmpSy;
 	spieler_vector[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
@@ -45,11 +43,10 @@ void Room58::xit() {
 	flags.LoadGame = true;
 	show_person();
 	set_person_rnr();
-	tmp = _G(spieler).R58TmpRoom1;
+	const int16 tmp = _G(spieler).R58TmpRoom1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
 
 	switch_room(tmp);
-
 }
 
 void Room58::look_cut_mag(int16 r_nr) {


Commit: 1390d3aafdb76b70a859054595e9a5439f5eb8c5
    https://github.com/scummvm/scummvm/commit/1390d3aafdb76b70a859054595e9a5439f5eb8c5
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:49-08:00

Commit Message:
CHEWY: Fix logic in Room 57

Changed paths:
    engines/chewy/rooms/room57.cpp


diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 9fa6a7c596f..cf5c4ed1c19 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room57.h"
 
@@ -39,18 +38,17 @@ void Room57::entry() {
 	spieler_mi[P_HOWARD].Mode = true;
 	if (_G(spieler).R57StudioAuf)
 		det->hide_static_spr(4);
-	if (!flags.LoadGame) {
-		if (_G(spieler).R48TaxiEntry) {
-			hide_cur();
-			_G(spieler).R48TaxiEntry = false;
-			_G(spieler).scrollx = 0;
-			_G(spieler).scrolly = 0;
-			set_person_pos(4, 144, P_HOWARD, P_LEFT);
-			set_person_pos(40, 160, P_CHEWY, P_RIGHT);
-			auto_move(2, P_CHEWY);
-			_G(maus_links_click) = false;
-			show_cur();
-		}
+	
+	if (!flags.LoadGame &&_G(spieler).R48TaxiEntry) {
+		hide_cur();
+		_G(spieler).R48TaxiEntry = false;
+		_G(spieler).scrollx = 0;
+		_G(spieler).scrolly = 0;
+		set_person_pos(4, 144, P_HOWARD, P_LEFT);
+		set_person_pos(40, 160, P_CHEWY, P_RIGHT);
+		auto_move(2, P_CHEWY);
+		_G(maus_links_click) = false;
+		show_cur();
 	}
 }
 
@@ -63,11 +61,10 @@ void Room57::xit(int16 eib_nr) {
 }
 
 void Room57::setup_func() {
-	int16 x, y;
-	int16 ch_y;
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 		calc_person_look();
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		int16 x, y;
 		if (ch_y < 145) {
 			x = 176;
 			y = 126;
@@ -85,20 +82,26 @@ int16 Room57::use_taxi() {
 		action_ret = true;
 		hide_cur();
 		auto_move(3, P_CHEWY);
+		det->enable_sound(3, 0);
+		det->play_sound(3, 0);
 		det->show_static_spr(7);
 		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+			SetUpScreenFunc = nullptr;
 			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 		det->hide_static_spr(7);
+		det->enable_sound(3, 1);
+		det->play_sound(3, 1);
 		room->set_timer_status(3, TIMER_STOP);
 		det->del_static_ani(3);
 		start_detail_wait(5, 1, ANI_VOR);
+		det->disable_sound(5, 0);
 		switch_room(48);
 	}
 	return action_ret;
@@ -113,8 +116,13 @@ int16 Room57::use_pfoertner() {
 	auto_move(1, P_CHEWY);
 	if (is_cur_inventar(CUTMAG_INV)) {
 		action_ret = true;
-		start_aad_wait(339, -1);
-		new_invent_2_cur(BESTELL_INV);
+		if (_G(spieler).flags37_10)
+			start_aad_wait(596, -1);
+		else {
+			_G(spieler).flags37_10 = true;
+			start_aad_wait(339, -1);
+			new_invent_2_cur(BESTELL_INV);
+		}
 	} else if (is_cur_inventar(JMKOST_INV)) {
 		action_ret = true;
 		start_aad_wait(340, -1);
@@ -130,6 +138,7 @@ int16 Room57::use_pfoertner() {
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
 			det->hide_static_spr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
+			det->disable_sound(6, 0);
 			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			start_aad_wait(349, -1);
@@ -144,12 +153,12 @@ int16 Room57::use_pfoertner() {
 }
 
 void Room57::talk_pfoertner() {
-	int16 aad_nr;
 	hide_cur();
 	auto_move(1, P_CHEWY);
 	room->set_timer_status(1, TIMER_STOP);
 	det->del_static_ani(1);
 	det->set_static_ani(3, -1);
+	int16 aad_nr;
 	if (!_G(spieler).R57StudioAuf) {
 		aad_nr = 338;
 	} else


Commit: 42f318b4aa8aef897b1de6b039371cd862cba82c
    https://github.com/scummvm/scummvm/commit/42f318b4aa8aef897b1de6b039371cd862cba82c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:50-08:00

Commit Message:
CHEWY: Partial rewrite of logic of Room 56

Changed paths:
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room56.h


diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index c544d5d3c67..e367af5dae0 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room56.h"
 
@@ -33,8 +32,16 @@ void Room56::entry() {
 	_G(spieler).ScrollxStep = 2;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
+	int esi = 0; //TODO: rename this variable
 	spieler_mi[P_HOWARD].Mode = true;
-	_G(timer_nr)[0] = room->set_timer(255, 25);
+	if (_G(spieler).flags32_10) {
+		det->show_static_spr(10);
+		room->set_timer_status(0, TIMER_STOP);
+		det->del_static_ani(0);
+		det->start_detail(13, 255, ANI_VOR);
+	} else
+		_G(timer_nr)[0] = room->set_timer(255, 25);
+
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			hide_cur();
@@ -47,8 +54,12 @@ void Room56::entry() {
 			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
+			det->disable_sound(7, 0);
+			det->enable_sound(7, 1);
 			start_detail_wait(7, 1, ANI_RUECK);
 			start_detail_wait(8, 1, ANI_VOR);
+			det->disable_sound(7, 1);
+			det->enable_sound(7, 0);
 			start_detail_wait(7, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
 
@@ -68,7 +79,7 @@ void Room56::entry() {
 			spieler_mi[P_CHEWY].Mode = false;
 			_G(maus_links_click) = false;
 			show_cur();
-		} else if (_G(spieler).R62Flucht) {
+		} else if (_G(spieler).R62Flucht && !_G(spieler).flags32_10) {
 			_G(maus_links_click) = false;
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
@@ -86,8 +97,55 @@ void Room56::entry() {
 			det->set_static_ani(3, -1);
 			_G(maus_links_click) = false;
 			atds->stop_aad();
+			hide_cur();
 			start_aad_wait(306, -1);
+			show_cur();
 			flic_cut(FCUT_076, CFO_MODE);
+			esi = 1;
+			cur_2_inventory();
+			remove_inventory(56);
+			remove_inventory(66);
+			remove_inventory(49);
+			remove_inventory(65);
+			remove_inventory(77);
+			remove_inventory(82);
+		} else if (_G(spieler).flags32_10) {
+			if (!_G(spieler).flags34_8) {
+				_G(spieler).flags34_8 = true;
+				esi = 2;
+			} else if (_G(spieler).flags34_40) {
+				atds->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
+				atds->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATEI);
+				atds->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(spieler).room_e_obj[137].Attribut = 3;
+				if (_G(spieler).flags33_80) {
+					out->setze_zeiger(nullptr);
+					out->cls();
+					flic_cut(113, CFO_MODE);
+					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
+					load_chewy_taf(1);
+					_G(spieler).mi[P_HOWARD] = 0;
+					_G(spieler).SVal2 = 0;
+					_G(spieler).flags35_2 = true;
+					esi = 3;
+				} else {
+					hide_cur();
+					_G(spieler).scrollx = _G(spieler).scrolly = 0;
+					_G(zoom_horizont) = 0;
+					set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
+					set_person_pos(3, 42, P_CHEWY, P_RIGHT);
+					room->set_zoom(23);
+					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
+					_G(spieler).ZoomXy[P_HOWARD][0] = 37;
+					SetUpScreenFunc = setup_func;
+					spieler_mi[P_CHEWY].Mode = true;
+					auto_move(1, P_CHEWY);
+					spieler_mi[P_CHEWY].Mode = false;
+				}
+				show_cur();
+			} else {
+				esi = 2;
+			}
 		}
 	}
 	SetUpScreenFunc = setup_func;
@@ -95,6 +153,41 @@ void Room56::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(zoom_horizont) = 114;
 	room->set_zoom(70);
+
+	switch(esi) {
+	case 1:
+		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
+		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+		_G(spieler).R88Val1 = 82;
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flic_cut(116, CFO_MODE);
+		test_intro(21);
+		ERROR
+		out->setze_zeiger(nullptr);
+		out->cls();
+		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
+		_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
+		switch_room(66);
+		break;
+	case 2:
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flic_cut(110, CFO_MODE);
+		_G(spieler).flags34_20 = true;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
+		switch_room(90);
+		break;
+	case 3:
+		switch_room(89);
+		break;
+	default:
+		break;
+	}
+
+	det->enable_sound(9, 0);
+	det->play_sound(9, 0);
 }
 
 void Room56::xit() {
@@ -117,6 +210,8 @@ int16 Room56::use_taxi() {
 		action_ret = true;
 		hide_cur();
 		auto_move(1, P_CHEWY);
+		det->disable_sound(7, 0);
+		det->enable_sound(7, 1);
 		start_detail_wait(7, 1, ANI_RUECK);
 		det->start_detail(8, 1, ANI_VOR);
 		_G(zoom_horizont) = 0;
@@ -144,64 +239,73 @@ void Room56::talk_man() {
 	if (!_G(spieler).R56AbfahrtOk) {
 		start_ads_wait(16);
 	} else if (!_G(spieler).R62Flucht) {
+		hide_cur();
 		start_aad_wait(343, -1);
+		show_cur();
 	}
 }
 
 int16 Room56::use_man() {
 	int16 action_ret = false;
-	if (is_cur_inventar(FLASCHE_INV)) {
-		action_ret = true;
-		hide_cur();
-		auto_move(3, P_CHEWY);
-		start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-		room->set_timer_status(0, TIMER_STOP);
-		det->del_static_ani(0);
-
-		if (!_G(spieler).R56WhiskyMix) {
-			start_detail_wait(4, 1, ANI_VOR);
+	if (_G(spieler).flags32_10 || !is_cur_inventar(FLASCHE_INV))
+		return action_ret;
+	
+	action_ret = true;
+	hide_cur();
+	auto_move(3, P_CHEWY);
+	start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
+	room->set_timer_status(0, TIMER_STOP);
+	det->del_static_ani(0);
 
-			det->set_static_ani(5, -1);
-			start_aad_wait(304, -1);
-			det->del_static_ani(5);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
-		} else {
-			del_inventar(_G(spieler).AkInvent);
-			_G(spieler).R56AbfahrtOk = true;
-			start_detail_wait(6, 1, ANI_VOR);
+	if (!_G(spieler).R56WhiskyMix) {
+		start_detail_wait(4, 1, ANI_VOR);
 
-			det->set_static_ani(1, -1);
-			start_aad_wait(305, -1);
-			det->del_static_ani(1);
-		}
+		det->set_static_ani(5, -1);
+		start_aad_wait(304, -1);
+		det->del_static_ani(5);
 		room->set_timer_status(0, TIMER_START);
 		det->set_static_ani(0, -1);
-		show_cur();
+	} else {
+		del_inventar(_G(spieler).AkInvent);
+		_G(spieler).R56AbfahrtOk = true;
+		start_detail_wait(6, 1, ANI_VOR);
+
+		det->set_static_ani(1, -1);
+		start_aad_wait(305, -1);
+		det->del_static_ani(1);
 	}
+	room->set_timer_status(0, TIMER_START);
+	det->set_static_ani(0, -1);
+
+	show_cur();
 	return action_ret;
 }
 
 int16 Room56::use_kneipe() {
 	int16 action_ret = false;
-	if (!_G(spieler).inv_cur) {
-		if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
-			hide_cur();
+	if (!_G(spieler).flags32_10) {
+		if (menu_item == CUR_WALK && !_G(spieler).inv_cur && atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
 			action_ret = true;
-			if (!_G(spieler).R56Kneipe) {
+			hide_cur();
+			if (_G(spieler).R56Kneipe) {
+				start_aad_wait(344, -1);
+			} else {
 				SetUpScreenFunc = nullptr;
 				auto_move(4, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				go_auto_xy(160, 58, P_HOWARD, ANI_WAIT);
+				go_auto_xy(160, 58, P_HOWARD, ANI_VOR);
 				_G(spieler).PersonHide[P_HOWARD] = true;
 				_G(spieler).R56Kneipe = true;
 				flags.NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
-				flic_cut(FCUT_075, CFO_MODE);
+				flic_cut(75, CFO_MODE);
+				det->disable_sound(10, 0);
+				det->play_sound(9, 0);
 				det->start_detail(10, 6, ANI_VOR);
 				start_aad_wait(307, -1);
 				det->stop_detail(10);
+				det->enable_sound(10, 0);
 				out->ausblenden(0);
 				set_up_screen(DO_SETUP);
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -209,88 +313,140 @@ int16 Room56::use_kneipe() {
 				_G(spieler).scrollx = 0;
 				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
 				set_person_pos(50, 81, P_CHEWY, P_LEFT);
-
 				fx_blend = BLEND3;
 				start_aad_wait(308, -1);
+
 				SetUpScreenFunc = setup_func;
 				flags.NoScroll = false;
-
 				if (obj->check_inventar(SACKGELD_INV)) {
-					del_invent_slot(SACKGELD_INV);
+					remove_inventory(SACKGELD_INV);
 					start_aad_wait(309, -1);
 				}
-			} else {
-				start_aad_wait(344, -1);
 			}
 			show_cur();
 		}
+	} else if (is_cur_inventar(18)) {
+		hide_cur();
+		if (_G(spieler).flags34_10) {
+			_G(spieler).flags33_80 = true;
+			auto_move(4, P_CHEWY);
+			flic_cut(111, CFO_MODE);
+			fx_blend = BLEND3;
+			start_aad_wait(522, -1);
+			start_spz_wait(66, 1, false, P_CHEWY);
+			start_spz(67, 255, false, P_CHEWY);
+			start_aad_wait(524, -1);
+			_G(spieler).SVal1 = 56;
+			_G(spieler).SVal2 = 523;
+			cur_2_inventory();
+			switch_room(92);
+		} else {
+			start_aad_wait(518, -1);
+		}
+		show_cur();
+	} else if (menu_item == 0 || menu_item == 2 || (menu_item == 1 && !_G(spieler).inv_cur)){
+		hide_cur();
+		action_ret = 1;
+		_G(maus_links_click) = false;
+		auto_move(4, P_CHEWY);
+		start_aad_wait(521, -1);
+		out->setze_zeiger(nullptr);
+		out->cls();
+		flags.NoPalAfterFlc = true;
+		flc->set_custom_user_function(proc1);
+		flic_cut(112, CFO_MODE);
+		flc->remove_custom_user_function();
+		test_intro(31);
+		ERROR
+
+		set_up_screen(NO_SETUP);
+		fx_blend = BLEND3;
+		show_cur();
+		det->enable_sound(9, 0);
+		det->play_sound(9, 0);
 	}
 	return action_ret;
 }
 
+int16 Room56::proc1(int16 key) {
+	int16 retVal = 0;
+
+	if (in->get_switch_code() == 1)
+		retVal = -1;
+
+	return retVal;
+}
+
 void Room56::start_flug() {
-	if (!_G(r56koch_flug)) {
+	if (!_G(spieler).flags32_10 && !_G(r56koch_flug)) {
 		_G(r56koch_flug) = 12;
 		det->start_detail(_G(r56koch_flug), 1, ANI_VOR);
 	}
 }
 
 void Room56::setup_func() {
-	int16 x, y;
-	int16 ch_x;
-	int16 ch_y;
-	switch (_G(r56koch_flug)) {
-	case 12:
-		if (det->get_ani_status(12) == false) {
-			det->start_detail(11, 1, ANI_VOR);
-			_G(r56koch_flug) = 11;
-		}
-		break;
+	++spieler_mi[P_HOWARD].Vorschub;
+	if (spieler_mi[P_HOWARD].Vorschub > 8)
+		spieler_mi[P_HOWARD].Vorschub = 8;
 
-	case 11:
-		if (det->get_ani_status(11) == false) {
-			det->start_detail(10, 1, ANI_VOR);
-			_G(r56koch_flug) = 10;
-		}
-		break;
+	if (!_G(spieler).flags32_10) {
+		switch (_G(r56koch_flug)) {
+		case 10:
+			if (det->get_ani_status(10) == false) {
+				_G(r56koch_flug) = 0;
 
-	case 10:
-		if (det->get_ani_status(10) == false) {
-			_G(r56koch_flug) = 0;
+				uhr->reset_timer(_G(timer_nr)[0], 0);
+			}
+			break;
 
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-		}
-		break;
+		case 11:
+			if (det->get_ani_status(11) == false) {
+				det->start_detail(10, 1, ANI_VOR);
+				_G(r56koch_flug) = 10;
+			}
+			break;
+
+		case 12:
+			if (det->get_ani_status(12) == false) {
+				det->start_detail(11, 1, ANI_VOR);
+				_G(r56koch_flug) = 11;
+			}
+			break;
 
+		default:
+			break;
+		}
 	}
+
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
 		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		int16 x, y;
 		if (ch_x < 196) {
 			x = 23;
 			y = 70;
 		} else if (ch_x < 283) {
-			x = 115;
-			y = 61;
-		} else if (ch_y < 115) {
+			x = 119;
+			y = 62;
+		} else if (ch_y < 120) {
 			x = 254;
-			y = 66;
+			y = 65;
 		} else {
 			x = 308;
 			y = 97;
 		}
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
 	}
-	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI)) {
-		if (menu_item == CUR_WALK) {
-			if (minfo.x + _G(spieler).scrollx >= 157 &&
-				minfo.x + _G(spieler).scrollx <= 204 &&
-				minfo.y >= 28 && minfo.y <= 89) {
-				cursor_wahl(CUR_AUSGANG_OBEN);
-			} else
-				cursor_wahl(CUR_WALK);
-		}
+
+	if (_G(spieler).flags32_10)
+		return;
+	
+	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && menu_item == CUR_WALK) {
+		if (minfo.x + _G(spieler).scrollx >= 157 && minfo.x + _G(spieler).scrollx <= 204 && minfo.y >= 28 && minfo.y <= 89)
+			cursor_wahl(CUR_AUSGANG_OBEN);
+		else
+			cursor_wahl(CUR_WALK);
 	}
 }
 
diff --git a/engines/chewy/rooms/room56.h b/engines/chewy/rooms/room56.h
index 58e19ef4c02..779e19bb782 100644
--- a/engines/chewy/rooms/room56.h
+++ b/engines/chewy/rooms/room56.h
@@ -39,6 +39,8 @@ public:
 	static void talk_man();
 	static int16 use_man();
 	static int16 use_kneipe();
+
+	static int16 proc1(int16 key);
 };
 
 } // namespace Rooms


Commit: 8c55d3afe152092a53e4b356489af747e1591588
    https://github.com/scummvm/scummvm/commit/8c55d3afe152092a53e4b356489af747e1591588
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:50-08:00

Commit Message:
CHEWY: Extra should quit check in flic playback

Changed paths:
    engines/chewy/flic.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 7da978f3bdc..43d165e18fb 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -450,6 +450,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 							do {
 								ende = g_system->getMillis();
 								g_events->update();
+								SHOULD_QUIT_RETURN0;
 							} while (ende <= start);
 							++CurrentFrame;
 


Commit: 29dd009eecf88816ebe4c6eb0d3dde5d7767d64c
    https://github.com/scummvm/scummvm/commit/29dd009eecf88816ebe4c6eb0d3dde5d7767d64c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:50-08:00

Commit Message:
CHEWY: Fix movement to chicken coop

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/movclass.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room37.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index da3e896b752..1e3dd6d6c70 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1297,10 +1297,11 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 			spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
 			spieler_mi[p_nr].XyzEnd[1] = gpkt.Dy - spieler_mi[p_nr].HotY;
-			mov->get_mov_vector((int16
-			                     *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
+			mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
+				spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 			spieler_vector[p_nr].DelayCount = 0;
+
 			if (mov->auto_go_status()) {
 				while (mov->auto_go_status()) {
 					if (SHOULD_QUIT)
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 07828ce859c..947ce1c1b1d 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -71,6 +71,7 @@ void movclass::goto_xy(GotoPkt *gp) {
 	plot_delay = 20;
 	calc_xy();
 	plot_delay = 0;
+
 	start_feld = get_feld_nr(gpkt->Sx, gpkt->Sy);
 	ziel_feld = get_feld_nr(gpkt->Dx, gpkt->Dy);
 	tmp = ziel_feld;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1b32fb51efb..6338af25554 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -268,7 +268,7 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 37:
-			if (!_G(spieler).flags37_1)
+			if (!_G(spieler).R37Kloppe)
 				idx_nr = 0;
 			break;
 
@@ -291,7 +291,8 @@ int16 ged_user_func(int16 idx_nr) {
 
 	case 42:
 		if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
-
+			if (!_G(spieler).flags37_1)
+				idx_nr = 0;
 		}
 		break;
 
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index e1df65240a4..3830e741973 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -85,11 +85,12 @@ void Room37::gedAction(int index) {
 }
 
 void Room37::setup_func() {
-	if (_G(maus_links_click) &&
-			!_G(spieler).R37Kloppe &&
+	if (_G(maus_links_click) && !_G(spieler).R37Kloppe &&
 			menu_item == CUR_WALK) {
 		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
 			(minfo.x + _G(spieler).scrollx > 482)) {
+			// Don't allow moving into chicken coop area
+			// until the rooster has left
 			auto_move(7, P_CHEWY);
 			_G(maus_links_click) = false;
 		}
@@ -323,6 +324,7 @@ void Room37::use_hahn() {
 			auto_move(8, P_CHEWY);
 			flic_cut(FCUT_053, CFO_MODE);
 			det->stop_detail(10);
+
 			_G(spieler).scrollx = 320;
 			flags.NoScroll = false;
 			atds->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);


Commit: 1259e198060427443990a3053003b0f54a1b5579
    https://github.com/scummvm/scummvm/commit/1259e198060427443990a3053003b0f54a1b5579
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:50-08:00

Commit Message:
CHEWY: Added some ATDS struct load methods

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index c02fbcb496c..4c7a60bd762 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -47,6 +47,25 @@ bool InvUse::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
+bool AadInfo::load(const void *src) {
+	Common::MemoryReadStream rs((const byte *)src, 6);
+
+	X = rs.readSint16LE();
+	Y = rs.readSint16LE();
+	Color = rs.readSint16LE();
+	return true;
+}
+
+bool AadTxtHeader::load(const void *src) {
+	Common::MemoryReadStream rs((const byte *)src, 8);
+
+	DiaNr = rs.readSint16LE();
+	PerAnz = rs.readSint16LE();
+	AMov = rs.readSint16LE();
+	CurNr = rs.readSint16LE();
+	return true;
+}
+
 bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 	VocNr = src->readUint16LE();
 	return true;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 241a2a7911b..e63ab423903 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -148,6 +148,9 @@ struct AadInfo {
 	int16 X;
 	int16 Y;
 	int16 Color;
+
+	bool load(const void *src);
+	static constexpr int SIZE() { return 6; }
 };
 
 struct AadTxtHeader {
@@ -155,6 +158,9 @@ struct AadTxtHeader {
 	int16 PerAnz;
 	int16 AMov;
 	int16 CurNr;
+
+	bool load(const void *src);
+	static constexpr int SIZE() { return 8; }
 };
 
 struct AadStrHeader {
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 8e59e4f0f74..a76c91a25c4 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -427,7 +427,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 }
 
 void start_aad(int16 dia_nr) {
-
+	ailsnd->waitForSpeechToFinish();
 	set_ssi_xy();
 	atds->start_aad(dia_nr);
 }


Commit: c058c67a9edc2acb75991bba5f32e400ab568114
    https://github.com/scummvm/scummvm/commit/c058c67a9edc2acb75991bba5f32e400ab568114
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:50-08:00

Commit Message:
CHEWY: Updates to atdsys::aad_search_dia

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 4c7a60bd762..1c829c0eb8a 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -1135,18 +1135,19 @@ int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
 
 void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 	char *start_ptr;
-	int16 *pos;
+	uint16 *pos;
 	int16 ende;
 	int16 ende1;
 	start_ptr = *ptr;
 	ende = 0;
+
 	if (start_ptr[0] == (char)BLOCKENDE &&
 	        start_ptr[1] == (char)BLOCKENDE &&
 	        start_ptr[2] == (char)BLOCKENDE) {
 		*ptr = 0;
 	} else {
 		while (!ende) {
-			pos = (int16 *)start_ptr;
+			pos = (uint16 *)start_ptr;
 			if (pos[0] == dia_nr) {
 				ende = 1;
 				aadv.TxtHeader = (AadTxtHeader *)start_ptr;
@@ -1154,18 +1155,22 @@ void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 			} else {
 				start_ptr += sizeof(AadTxtHeader) + pos[1] * sizeof(AadInfo);
 				ende1 = 0;
-				while (!ende1) {
-					if (*start_ptr == ATDS_END) {
+				for (; !ende1; ++start_ptr) {
+					if (*start_ptr != ATDS_END_TEXT)
+						continue;
+					if (start_ptr[1] == ATDS_END) {
+						++start_ptr;
+
 						if (start_ptr[1] == (char)BLOCKENDE &&
 						        start_ptr[2] == (char)BLOCKENDE &&
 						        start_ptr[3] == (char)BLOCKENDE) {
 							ende = 1;
 							ende1 = 1;
 							*ptr = 0;
-						} else
+						} else {
 							ende1 = 1;
+						}
 					}
-					++start_ptr;
 				}
 			}
 		}


Commit: e9392c51bfde18ccdaa6715b10c7e9164afe2e09
    https://github.com/scummvm/scummvm/commit/e9392c51bfde18ccdaa6715b10c7e9164afe2e09
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Fix logic in Room 55, enforce the use of chewy ani constants in various places

Changed paths:
    engines/chewy/inits.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 84b708b8f39..425ecbb4e08 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -314,7 +314,7 @@ void new_game() {
 		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
 
 	AkChewyTaf = 0;
-	load_chewy_taf(1);
+	load_chewy_taf(CHEWY_NORMAL);
 }
 
 static void font_load() {
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 0b4884b3175..45e27d78841 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -75,7 +75,7 @@ int16 Room35::use_cat() {
 	int16 action_flag = false;
 	hide_cur();
 
-	if (_G(spieler).ChewyAni != 5) {
+	if (_G(spieler).ChewyAni != CHEWY_ROCKER) {
 		if (is_cur_inventar(TRANSLATOR_INV)) {
 			action_flag = true;
 			auto_move(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index d95184b77c4..20a27629f85 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -208,7 +208,7 @@ int16 Room39::use_tv() {
 		}
 
 		action_flag = true;
-	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != 5) {
+	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 7d6bd9fdc3e..2b6f67b9b09 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -126,7 +126,7 @@ void Room40::xit(int16 eib_nr) {
 				flags.NoPalAfterFlc = true;
 				flic_cut(FCUT_073, CFO_MODE);
 
-				if (_G(spieler).ChewyAni != 5)
+				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
 					_G(spieler).PersonGlobalDia[1] = 10023;
 
 				cur_2_inventory();
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index f4acc222fa5..27b5ba0514a 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room55.h"
 
@@ -45,15 +44,16 @@ void Room55::entry() {
 	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
 		det->hide_static_spr(6);
 
-	if ((_G(spieler).R55RaumOk) || (!_G(spieler).R55RaumOk && _G(spieler).R55ScriptWeg))
+	if (_G(spieler).R55RaumOk || _G(spieler).R55ScriptWeg)
 		det->hide_static_spr(0);
 
 	if (!_G(spieler).R55SekWeg) {
 		det->start_detail(8, 255, ANI_VOR);
 		det->start_detail(9, 255, ANI_VOR);
 		_G(spieler).R55Entry ^= 1;
-		_G(timer_nr)[0] = room->set_timer(19 + (int16)_G(spieler).R55Entry, 10);
-		det->set_static_ani(19 + (int16)_G(spieler).R55Entry, -1);
+		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
+		_G(timer_nr)[0] = room->set_timer(aniNr, 10);
+		det->set_static_ani(aniNr, -1);
 	}
 
 	spieler_mi[P_HOWARD].Mode = true;
@@ -62,10 +62,12 @@ void Room55::entry() {
 		rock2mans();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 	}
+
 	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
 		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
 		room->set_zoom(10);
 	}
+
 	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
 		det->show_static_spr(0);
 
@@ -127,7 +129,8 @@ void Room55::gedAction(int index) {
 
 int16 Room55::use_stapel1() {
 	int16 action_ret = false;
-
+	hide_cur();
+	
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R55ScriptWeg) {
 			action_ret = true;
@@ -143,7 +146,6 @@ int16 Room55::use_stapel1() {
 			action_ret = true;
 			start_aad_wait(333, -1);
 		}
-
 	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
 
@@ -157,6 +159,7 @@ int16 Room55::use_stapel1() {
 			start_aad_wait(326, -1);
 		}
 	}
+	show_cur();
 
 	return action_ret;
 }
@@ -175,9 +178,6 @@ int16 Room55::use_stapel2() {
 }
 
 int16 Room55::use_telefon() {
-	int16 i;
-	int16 delay;
-	int16 tmp_delay;
 	int16 action_ret = false;
 
 	if (!_G(spieler).inv_cur) {
@@ -222,10 +222,10 @@ int16 Room55::use_telefon() {
 				start_aad_wait(334, -1);
 				start_aad_wait(335, -1);
 				start_aad_wait(336, -1);
-				tmp_delay = _G(spieler).DelaySpeed;
+				const int16 tmp_delay = _G(spieler).DelaySpeed;
 
-				for (i = 0; i < 7; i++) {
-					delay = tmp_delay;
+				for (int16 i = 0; i < 7; i++) {
+					int16 delay = tmp_delay;
 					if (!_G(spieler).scrollx)
 						_G(spieler).scrollx = 8;
 					else
@@ -240,6 +240,9 @@ int16 Room55::use_telefon() {
 				}
 
 				flic_cut(FCUT_072, CFO_MODE);
+				test_intro(19);
+				ERROR
+				
 				flags.NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
 				invent_2_slot(EINLAD_INV);
@@ -256,10 +259,14 @@ int16 Room55::use_telefon() {
 
 				switch_room(54);
 			} else {
+				hide_cur();
 				start_aad_wait(332, -1);
+				show_cur();
 			}
 		} else {
+			hide_cur();
 			start_aad_wait(328, -1);
+			show_cur();
 		}
 	}
 
@@ -267,13 +274,9 @@ int16 Room55::use_telefon() {
 }
 
 void Room55::get_job() {
-	int16 tmp_scrollx;
-	int16 tmp_scrolly;
-	int16 r_nr;
-
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	tmp_scrollx = _G(spieler).scrollx;
-	tmp_scrolly = _G(spieler).scrolly;
+	const int16 oldScrollx = _G(spieler).scrollx;
+	const int16 oldScrolly = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(61);
@@ -282,9 +285,10 @@ void Room55::get_job() {
 	start_ads_wait(15);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	flags.LoadGame = true;
-	_G(spieler).scrollx = tmp_scrollx;
-	_G(spieler).scrolly = tmp_scrolly;
+	_G(spieler).scrollx = oldScrollx;
+	_G(spieler).scrolly = oldScrolly;
 
+	int16 r_nr;
 	if (_G(spieler).R55Job) {
 		r_nr = 55;
 		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
@@ -310,7 +314,7 @@ void Room55::mans2rock() {
 	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
 		_G(spieler).R55ExitDia = 317;
 		load_chewy_taf(CHEWY_ROCKER);
-		del_invent_slot(LEDER_INV);
+		remove_inventory(LEDER_INV);
 		invent_2_slot(JMKOST_INV);
 	}
 }
@@ -318,7 +322,7 @@ void Room55::mans2rock() {
 void Room55::rock2mans() {
 	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 		load_chewy_taf(CHEWY_JMANS);
-		del_invent_slot(JMKOST_INV);
+		remove_inventory(JMKOST_INV);
 		invent_2_slot(LEDER_INV);
 	}
 }
@@ -331,6 +335,7 @@ void Room55::verleger_mov(int16 mode) {
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS)
 		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
+	
 	if (mode)
 		start_detail_wait(15, 1, ANI_VOR);
 
@@ -339,6 +344,7 @@ void Room55::verleger_mov(int16 mode) {
 
 void Room55::strasse(int16 mode) {
 	if (!_G(spieler).inv_cur || mode) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		room->set_timer_status(4, TIMER_STOP);
 		det->del_static_ani(4);
 		det->stop_detail(4);
@@ -353,37 +359,36 @@ void Room55::strasse(int16 mode) {
 int16 Room55::use_kammeraus() {
 	int16 action_ret = false;
 
-	if (_G(spieler).R55Location) {
-		if (is_cur_inventar(KILLER_INV)) {
-			action_ret = true;
+	if (_G(spieler).R55Location && is_cur_inventar(KILLER_INV)) {
+		action_ret = true;
 
-			if (_G(spieler).R52KakerWeg) {
-				if (!_G(spieler).R55SekWeg) {
-					hide_cur();
-					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_detail_wait(5, 1, ANI_VOR);
-					det->show_static_spr(10);
-					flc->set_flic_user_function(cut_serv);
-					flic_cut(FCUT_070, CFO_MODE);
-					flc->remove_flic_user_function();
-
-					room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
-					det->stop_detail(19 + (int16)_G(spieler).R55Entry);
-					det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
-					det->hide_static_spr(10);
-					_G(spieler).R55ExitDia = 322;
-					_G(spieler).R55SekWeg = true;
-					atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
-					atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
-					del_inventar(_G(spieler).AkInvent);
-					atds->set_steuer_bit(345, 1, 1);
-					atds->set_steuer_bit(346, 1, 1);
-					strasse(1);
-					show_cur();
-				}
-			} else {
-				start_aad_wait(325, -1);
-			}
+		if (!_G(spieler).R52KakerWeg)
+			start_aad_wait(325, -1);
+		else if (!_G(spieler).R55SekWeg) {
+			hide_cur();
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(5, 1, ANI_VOR);
+			det->show_static_spr(10);
+			flc->set_flic_user_function(cut_serv);
+			flic_cut(FCUT_070, CFO_MODE);
+			test_intro(18);
+			ERROR
+			
+			flc->remove_flic_user_function();
+			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
+			room->set_timer_status(19 + aniNr, TIMER_STOP);
+			det->stop_detail(19 + aniNr);
+			det->del_static_ani(19 + aniNr);
+			det->hide_static_spr(10);
+			_G(spieler).R55ExitDia = 322;
+			_G(spieler).R55SekWeg = true;
+			atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
+			atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
+			del_inventar(_G(spieler).AkInvent);
+			atds->set_steuer_bit(345, 1, 1);
+			atds->set_steuer_bit(346, 1, 1);
+			strasse(1);
+			show_cur();
 		}
 	}
 
@@ -398,13 +403,11 @@ int16 Room55::cut_serv(int16 frame) {
 }
 
 void Room55::setup_func() {
-	int16 x, y;
-	int16 ch_x;
-
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
+		int16 x, y;
 		if (ch_x < 100) {
 			x = 62;
 			y = 101;
@@ -424,47 +427,45 @@ void Room55::setup_func() {
 }
 
 void Room55::talk_line() {
-	int16 aad_nr = 0;
+	if (_G(spieler).R55Location != 0 || _G(spieler).ChewyAni != CHEWY_ROCKER)
+		return;
+	
+	hide_cur();
 
-	if (_G(spieler).R55Location == 0) {
-		if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-			hide_cur();
-
-			if (!_G(spieler).R55SekWeg) {
-				auto_move(2, P_CHEWY);
-				flags.NoScroll = true;
-				auto_scroll(136, 0);
-				aad_nr = 320;
-				_G(spieler).R55ExitDia = 321;
-				room->set_timer_status(19 + (int16)_G(spieler).R55Entry, TIMER_STOP);
-				det->stop_detail(19 + (int16)_G(spieler).R55Entry);
-				det->del_static_ani(19 + (int16)_G(spieler).R55Entry);
-				start_detail_wait(22, 1, ANI_VOR);
-				det->set_static_ani(21, -1);
-
-			} else if (!_G(spieler).R55RaumOk) {
-				auto_move(3, P_CHEWY);
-				aad_nr = 323;
-				_G(spieler).R55ExitDia = 324;
-			}
+	int16 aad_nr = 0;
+	if (!_G(spieler).R55SekWeg) {
+		auto_move(2, P_CHEWY);
+		flags.NoScroll = true;
+		auto_scroll(136, 0);
+		aad_nr = 320;
+		_G(spieler).R55ExitDia = 321;
+		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
+		room->set_timer_status(19 + aniNr, TIMER_STOP);
+		det->stop_detail(19 + aniNr);
+		det->del_static_ani(19 + aniNr);
+		start_detail_wait(22, 1, ANI_VOR);
+		det->set_static_ani(21, -1);
+	} else if (!_G(spieler).R55RaumOk) {
+		auto_move(3, P_CHEWY);
+		aad_nr = 323;
+		_G(spieler).R55ExitDia = 324;
+	}
 
-			start_aad_wait(aad_nr, -1);
+	start_aad_wait(aad_nr, -1);
 
-			if (_G(spieler).R55SekWeg) {
-				det->del_static_ani(16);
-				start_detail_wait(14, 1, ANI_VOR);
-			} else {
-				det->del_static_ani(21);
-				start_detail_wait(22, 1, ANI_VOR);
-			}
-
-			flags.NoScroll = false;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-			spieler_mi[P_HOWARD].Mode = false;
-			switch_room(54);
-			show_cur();
-		}
+	if (_G(spieler).R55SekWeg) {
+		det->del_static_ani(16);
+		start_detail_wait(14, 1, ANI_VOR);
+	} else {
+		det->del_static_ani(21);
+		start_detail_wait(22, 1, ANI_VOR);
 	}
+
+	flags.NoScroll = false;
+	_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+	spieler_mi[P_HOWARD].Mode = false;
+	switch_room(54);
+	show_cur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index e367af5dae0..be0b16110d2 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -123,7 +123,7 @@ void Room56::entry() {
 					out->cls();
 					flic_cut(113, CFO_MODE);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
-					load_chewy_taf(1);
+					load_chewy_taf(CHEWY_NORMAL);
 					_G(spieler).mi[P_HOWARD] = 0;
 					_G(spieler).SVal2 = 0;
 					_G(spieler).flags35_2 = true;
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 2697537f02d..e0892b5853c 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -58,7 +58,7 @@ void Room66::entry(int16 eib_nr) {
 		wait_show_screen(15);
 		det->hide_static_spr(14);
 		start_detail_wait(1, 1, ANI_VOR);
-		load_chewy_taf(1);
+		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(16, 255, false, P_CHEWY);
 		start_aad_wait(404, -1);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index bd27d3ba488..cae7752fdfe 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -213,7 +213,7 @@ void Room90::proc2() {
 
 	if (diaNr != -1) {
 		set_up_screen(DO_SETUP);
-		if (_G(spieler).ChewyAni == 7) {
+		if (_G(spieler).ChewyAni == CHEWY_ANI7) {
 			start_spz_wait(66, 1, false, P_CHEWY);
 			start_spz(67, 255, false, P_CHEWY);
 		} else {
@@ -237,7 +237,7 @@ int Room90::proc3() {
 	start_aad_wait(515, -1);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	start_spz_wait(43, 1, false, P_CHEWY);
-	load_chewy_taf(7);
+	load_chewy_taf(CHEWY_ANI7);
 
 	while (spieler_vector[P_HOWARD].Xypos[0] != 176)
 		set_up_screen(DO_SETUP);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index f2f9a049dde..936845cf846 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1551,7 +1551,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			if (mode == AAD_STR_START) {
 				if (_G(spieler).R28ChewyPump)
 					ani_nr = CH_PUMP_TALK;
-				else if (_G(spieler).ChewyAni == 5)
+				else if (_G(spieler).ChewyAni == CHEWY_ROCKER)
 					ani_nr = CH_ROCK_TALK1;
 				else
 					ani_nr = CH_TALK3;
@@ -2424,7 +2424,7 @@ int16 calc_person_txt(int16 p_nr) {
 		case CUR_USE:
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 40:
-				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != 5) {
+				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 					menu_item = CUR_HOWARD;
 					cursor_wahl(menu_item);
 					txt_nr = 30000;
@@ -2738,7 +2738,7 @@ void calc_person_dia(int16 p_nr) {
 
 		case 69:
 			if (p_nr == P_HOWARD) {
-				if (_G(spieler).ChewyAni != 5)
+				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
 					_G(spieler).PersonDia[p_nr] = 565;
 				else
 					flag = true;


Commit: 8cb1e46ce13d63a84f828cf994aeda92d8848e2c
    https://github.com/scummvm/scummvm/commit/8cb1e46ce13d63a84f828cf994aeda92d8848e2c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Fix logic in room 54

Changed paths:
    engines/chewy/rooms/room54.cpp


diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index f68315cbf8b..74c91e2bdcc 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room54.h"
 
@@ -48,7 +47,7 @@ void Room54::entry(int16 eib_nr) {
 			_G(spieler).R48TaxiEntry = false;
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-				_G(spieler).R54HowardVorne = false;
+				_G(spieler).R54HowardVorne = 0;
 				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
 			}
 
@@ -62,7 +61,7 @@ void Room54::entry(int16 eib_nr) {
 
 		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-				_G(spieler).R54HowardVorne = false;
+				_G(spieler).R54HowardVorne = 0;
 				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
 			}
 
@@ -92,14 +91,12 @@ void Room54::xit(int16 eib_nr) {
 }
 
 void Room54::setup_func() {
-	int16 x, y;
-	int16 ch_x;
-
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 		calc_person_look();
-		ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
 		if (_G(spieler).R54HowardVorne != 255) {
+			const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+			int16 x, y;
 			if (_G(spieler).R54HowardVorne) {
 				if (ch_x < 218) {
 					x = 150;
@@ -126,7 +123,6 @@ void Room54::setup_func() {
 }
 
 int16 Room54::use_schalter() {
-	int16 aad_nr;
 	int16 action_ret = false;
 
 	if (!_G(spieler).inv_cur) {
@@ -151,6 +147,7 @@ int16 Room54::use_schalter() {
 			det->stop_detail(3);
 			++_G(spieler).R54LiftCount;
 
+			int16 aad_nr;
 			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_VOR);
 				det->hide_static_spr(0);
@@ -173,7 +170,7 @@ int16 Room54::use_schalter() {
 			}
 
 			start_aad_wait(aad_nr, -1);
-			_G(spieler).R54HowardVorne = false;
+			_G(spieler).R54HowardVorne = 0;
 
 		} else {
 			start_aad_wait(297, -1);
@@ -189,14 +186,16 @@ void Room54::talk_verkauf() {
 	hide_cur();
 
 	if (!_G(spieler).R54HotDogOk) {
-		if (_G(spieler).AkInvent == DOLLAR175_INV)
-			del_inventar(DOLLAR175_INV);
-		else
-			del_invent_slot(DOLLAR175_INV);
+		if (_G(spieler).R45MagOk) {
+			if (_G(spieler).AkInvent == DOLLAR175_INV)
+				del_inventar(DOLLAR175_INV);
+			else
+				remove_inventory(DOLLAR175_INV);
+		}
 
 		_G(spieler).R54HotDogOk = true;
 		auto_move(3, P_CHEWY);
-		_G(spieler).R54HowardVorne = true;
+		_G(spieler).R54HowardVorne = 1;
 		start_aad_wait(299, -1);
 		room->set_timer_status(6, TIMER_STOP);
 		det->del_static_ani(6);
@@ -217,7 +216,6 @@ void Room54::talk_verkauf() {
 		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
 		obj->add_inventar(BURGER_INV, &room_blk);
 		inventory_2_cur(BURGER_INV);
-
 	} else {
 		start_aad_wait(313, -1);
 	}
@@ -237,7 +235,7 @@ int16 Room54::use_zelle() {
 				start_aad_wait(318, -1);
 			} else {
 				auto_move(5, P_CHEWY);
-				_G(spieler).R54HowardVorne = true;
+				_G(spieler).R54HowardVorne = 1;
 				SetUpScreenFunc = nullptr;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
@@ -263,7 +261,7 @@ int16 Room54::use_zelle() {
 	} else {
 		action_ret = true;
 		auto_move(6, P_CHEWY);
-		_G(spieler).R54HowardVorne = true;
+		_G(spieler).R54HowardVorne = 1;
 		start_aad_wait(319, -1);
 	}
 
@@ -277,9 +275,6 @@ int16 Room54::cut_serv(int16 frame) {
 }
 
 int16 Room54::use_azug() {
-	int16 ch_y;
-	int16 ay;
-	int16 delay;
 	int16 action_ret = false;
 
 	if (!_G(spieler).inv_cur) {
@@ -289,7 +284,7 @@ int16 Room54::use_azug() {
 		if (!_G(spieler).R54LiftOk) {
 			if (_G(spieler).R54FputzerWeg) {
 				auto_move(8, P_CHEWY);
-				_G(spieler).R54HowardVorne = false;
+				_G(spieler).R54HowardVorne = 0;
 				start_aad_wait(298, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->show_static_spr(12);
@@ -299,9 +294,9 @@ int16 Room54::use_azug() {
 				det->enable_sound(1, 0);
 				det->play_sound(1, 0);
 
-				ch_y = 68;
-				ay = 0;
-				delay = 0;
+				int16 ch_y = 68;
+				int16 ay = 0;
+				int16 delay = 0;
 
 				while (ch_y > -48) {
 					det->set_static_pos(12, 125, ch_y, false, false);
@@ -332,10 +327,6 @@ int16 Room54::use_azug() {
 }
 
 void Room54::aufzug_ab() {
-	int16 ch_y;
-	int16 ay;
-	int16 delay;
-
 	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
@@ -344,9 +335,9 @@ void Room54::aufzug_ab() {
 	det->enable_sound(1, 0);
 	det->play_sound(1, 0);
 
-	ch_y = -40;
-	ay = -108;
-	delay = 0;
+	int16 ch_y = -40;
+	int16 ay = -108;
+	int16 delay = 0;
 
 	while (ch_y < 68) {
 		det->set_static_pos(12, 125, ch_y, false, false);
@@ -384,7 +375,7 @@ short Room54::use_taxi() {
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 			if (_G(spieler).R54HowardVorne) {
-				_G(spieler).R54HowardVorne = false;
+				_G(spieler).R54HowardVorne = 0;
 				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
 			}
 


Commit: 10eb66f09e4aaa017736e07634c3a5f9fdc44acd
    https://github.com/scummvm/scummvm/commit/10eb66f09e4aaa017736e07634c3a5f9fdc44acd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Fix some syncArray's in Spieler::synchronize

Changed paths:
    engines/chewy/types.cpp


diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 6e86c5006ee..ce8acb774f1 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -117,15 +117,15 @@ bool Spieler::synchronize(Common::Serializer &s) {
 	s.syncAsByte(R28PumpTxt);
 	s.syncAsByte(R31SurimyGo);
 	s.syncAsByte(R33SurimyGo);
-	s.syncAsByte(R33Munter[4]);
+	syncArray(s, R33Munter, 4);
 	s.syncAsSint16LE(R39TvKanal);
 	s.syncAsByte(R39TvRecord);
 	s.syncAsByte(R39ClintNews);
 	s.syncAsByte(R40PoliceAniStatus);
 	s.syncAsByte(R41TrainCount);
-	s.syncAsByte(R47Schloss[3]);
+	syncArray(s, R47Schloss, 3);
 	syncArray(s, R48TaxiPerson, MAX_PERSON);
-	s.syncAsByte(R48Auswahl[5]);
+	syncArray(s, R48Auswahl, 5);
 	s.syncAsByte(R49BoyAniCount);
 	s.syncAsByte(R51DoorCount);
 	s.syncAsByte(R54LiftCount);
@@ -139,7 +139,7 @@ bool Spieler::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(R58TmpY);
 	s.syncAsSint16LE(R64Moni1Ani);
 	s.syncAsSint16LE(R64Moni2Ani);
-	s.syncAsByte(mi[8]);
+	syncArray(s, mi, 8);
 	s.syncAsSint16LE(SVal1);
 	s.syncAsSint16LE(SVal2);
 	s.syncAsSint16LE(SVal3);


Commit: b85b66aaded8cef9234ba259c549da4b22d23991
    https://github.com/scummvm/scummvm/commit/b85b66aaded8cef9234ba259c549da4b22d23991
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Check logic in Room 53

Changed paths:
    engines/chewy/rooms/room53.cpp


diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index db7734f87b4..3be397854ad 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -66,7 +66,7 @@ void Room53::talk_man() {
 	det->del_static_ani(1);
 	start_detail_wait(2, 1, ANI_VOR);
 	det->set_static_ani(3, -1);
-	start_aad_wait(269 + (int16)_G(spieler).R53Kostuem, -1);
+	start_aad_wait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
 	det->del_static_ani(3);
 	start_detail_wait(4, 1, ANI_VOR);
 	man_go();


Commit: bebbfcb084caa1a2864e1dbb4cdab61eb255c68d
    https://github.com/scummvm/scummvm/commit/bebbfcb084caa1a2864e1dbb4cdab61eb255c68d
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Review logic of Room 52

Changed paths:
    engines/chewy/rooms/room52.cpp


diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 440c505e952..465c8d9b51f 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room52.h"
 
@@ -69,7 +68,6 @@ void Room52::gedAction(int index) {
 }
 
 int16 Room52::use_hot_dog() {
-	int16 i;
 	int16 action_ret = false;
 	hide_cur();
 
@@ -98,7 +96,7 @@ int16 Room52::use_hot_dog() {
 		det->play_sound(7, 0);
 		det->start_detail(8, 255, ANI_VOR);
 
-		for (i = 0; i < 5; i++) {
+		for (int16 i = 0; i < 5; i++) {
 			wait_show_screen(20);
 			det->stop_detail(2 + i);
 		}
@@ -120,16 +118,14 @@ int16 Room52::use_hot_dog() {
 }
 
 void Room52::plot_armee(int16 frame) {
-	int16 i;
-	for (i = 0; i < 5; i++) {
+	for (int16 i = 0; i < 5; i++) {
 		wait_show_screen(frame);
 		det->start_detail(2 + i, 255, ANI_VOR);
 	}
 }
 
 void Room52::kaker_platt() {
-	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk &&
-			!_G(spieler).R52KakerWeg && !flags.ExitMov) {
+	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg && !flags.ExitMov) {
 		_G(spieler).R52KakerJoke = true;
 		stop_person(P_CHEWY);
 		hide_cur();
@@ -139,21 +135,10 @@ void Room52::kaker_platt() {
 }
 
 void Room52::setup_func() {
-	int16 x, y;
-	int16 ch_y;
-
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
-		x = 1;
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
-
-		if (ch_y < 97) {
-			y = 44;
-		} else {
-			y = 87;
-		}
-
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		const int16 y = (spieler_vector[P_CHEWY].Xypos[1] < 97) ? 44 : 87;
+		go_auto_xy(1, y, P_HOWARD, ANI_GO);
 	}
 }
 


Commit: 00df78810fec8eb8548593255f461739aa8445c2
    https://github.com/scummvm/scummvm/commit/00df78810fec8eb8548593255f461739aa8445c2
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Small changes in the logic of Room 51

Changed paths:
    engines/chewy/rooms/room51.cpp


diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 237d5b6b856..7b549c3101f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -46,7 +46,6 @@ int Room51::_index;
 
 
 void Room51::entry() {
-	int16 i;
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
@@ -57,13 +56,14 @@ void Room51::entry() {
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 0;
-		set_person_pos(34, 120, P_HOWARD, P_HOWARD);
+		set_person_pos(34, 120, P_HOWARD, P_RIGHT);
 		set_person_pos(234, 69, P_CHEWY, P_LEFT);
 		SetUpScreenFunc = setup_func;
 		det->show_static_spr(17);
+		_index = 0;
 		hide_cur();
 
-		for (i = 0; i < 2; ++i) {
+		for (int i = 0; i < 2; ++i) {
 			_arr[0] = false;
 			_G(timer_nr)[i] = room->set_timer(i + 9, i * 2 + 6);
 		}
@@ -74,7 +74,7 @@ void Room51::entry() {
 	} else {
 		det->hide_static_spr(17);
 
-		for (i = 0; i < 2; i++)
+		for (int i = 0; i < 2; i++)
 			det->start_detail(3 + i, 1, ANI_VOR);
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
@@ -132,9 +132,6 @@ bool Room51::timer(int16 t_nr, int16 ani_nr) {
 }
 
 void Room51::setup_func() {
-	int16 x, y;
-	int16 ch_y;
-
 	if (_G(spieler).flags32_10) {
 		_tmpx = minfo.x;
 		_tmpy = minfo.y;
@@ -171,9 +168,13 @@ void Room51::setup_func() {
 			case 10012:
 				start_aad_wait(514, -1);
 				wait_show_screen(5);
+				flags.NoPalAfterFlc = true;
 				out->setze_zeiger(nullptr);
 				out->cls();
 				flic_cut(115, 0);
+				test_intro(28);
+				ERROR
+				
 				switch_room(91);
 				break;
 
@@ -181,11 +182,11 @@ void Room51::setup_func() {
 				break;
 			}
 		}
-
 	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		calc_person_look();
-		ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
 
+		int16 x, y;
 		if (ch_y < 129) {
 			x = 56;
 			y = 106;
@@ -287,7 +288,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			out->cls();
 			flags.NoPalAfterFlc = true;
 			flic_cut(114, 0);
-			set_person_pos(115, 114, P_CHEWY, P_LEFT);
+			set_person_pos(115, 144, P_CHEWY, P_LEFT);
 			fx_blend = BLEND3;
 			set_up_screen(NO_SETUP);
 			start_aad_wait(564, -1);
@@ -353,7 +354,7 @@ int16 Room51::cut_serv(int16 frame) {
 
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
-		assert(t_nr < 2);
+		assert(t_nr >= 0 && t_nr < 2);
 		if (!Room65::_scrollY[t_nr]) {
 			det->start_detail(t_nr, 1, ANI_VOR);
 			Room65::_scrollY[t_nr] = 1;


Commit: 0592e4ffdc54f1acbc2ff030b0c9e1333edc2e90
    https://github.com/scummvm/scummvm/commit/0592e4ffdc54f1acbc2ff030b0c9e1333edc2e90
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:51-08:00

Commit Message:
CHEWY: Fix glitch in logic of Room 50

Changed paths:
    engines/chewy/rooms/room50.cpp


diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 1609aeebf3b..a62d5e3d06e 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -151,6 +151,7 @@ void Room50::calc_treppe() {
 			start_aad_wait(272, -1);
 			auto_move(3, P_CHEWY);
 			aad_page(273, 5);
+			flags.NoScroll = false;
 		}
 
 		flags.AutoAniPlay = false;


Commit: 005964d21adcae5732597ecb7406d7ac0ccf57e6
    https://github.com/scummvm/scummvm/commit/005964d21adcae5732597ecb7406d7ac0ccf57e6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: Fix cutscene where pumpkin is grown

Changed paths:
    engines/chewy/rooms/room28.cpp


diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 28deea3aafe..03bbbf4c968 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -89,10 +89,10 @@ void Room28::entry(int16 eib_nr) {
 					flags.NoScroll = false;
 
 					if (_G(spieler).R40TeilKarte) {
+						haendler();
+					} else {
 						wait_show_screen(50);
 						start_aad_wait(195, -1);
-					} else {
-						haendler();
 					}
 
 					_G(spieler).ScrollxStep = 2;


Commit: 4889453c715b1a0c0aa60ae844f1ee3ad95513fd
    https://github.com/scummvm/scummvm/commit/4889453c715b1a0c0aa60ae844f1ee3ad95513fd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: Fight night-time city cutscene

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6338af25554..d6464a52d21 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1053,30 +1053,31 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_058:
+			load_room_music(255);
 			nr = FCUT_058;
 			mem->file->select_pool_item(Ci.Handle, nr);
+			flc->custom_play(&Ci);
 
-			flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 			if (!modul) {
 				mem->file->select_pool_item(Ci.Handle, FCUT_059);
-				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				flc->custom_play(&Ci);
 			}
 			if (!_G(spieler).R43GetPgLady) {
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_060);
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+					flc->custom_play(&Ci);
 				}
 			} else {
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_061);
 					start_aad(623, -1);
 					flc->set_custom_user_function(Room43::setup_func);
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+					flc->custom_play(&Ci);
 					flc->remove_custom_user_function();
 				}
 				if (!modul) {
 					mem->file->select_pool_item(Ci.Handle, FCUT_062);
-					flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+					flc->custom_play(&Ci);
 				}
 			}
 			ailsnd->fade_out(0);


Commit: bae1b1f47638d5e6d53116560f43edd525abca26
    https://github.com/scummvm/scummvm/commit/bae1b1f47638d5e6d53116560f43edd525abca26
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: Fix city train animation

Changed paths:
    engines/chewy/types.h


diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index e5296af1f2d..064076ccfa8 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -462,8 +462,8 @@ struct Spieler : public SpielerFlags {
 	uint8 R39TvRecord = 0;
 	uint8 R39ClintNews = 0;
 
-	uint8 R40PoliceAniStatus;
-	uint8 R41TrainCount;
+	uint8 R40PoliceAniStatus = 0;
+	uint8 R41TrainCount = 0;
 
 	uint8 R47Schloss[3] = { 0 };
 	uint8 R48TaxiPerson[MAX_PERSON] = { 0 };


Commit: 0f4d1c3a592f70f36a6c0d273e89c85dfd449daf
    https://github.com/scummvm/scummvm/commit/0f4d1c3a592f70f36a6c0d273e89c85dfd449daf
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: Some renaming in ailclass, start cleaning atds

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/atds.cpp
    engines/chewy/detail.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 8b458e0ab7d..8d1eed12011 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -268,7 +268,7 @@ int16 ailclass::init(uint16 freq) {
 	return SOUNDBLASTER;
 }
 
-int16 ailclass::init(char *midi_drv_name) {
+int16 ailclass::init(char *midiDrvName) {
 	return SoundCard;
 }
 
@@ -278,37 +278,37 @@ void ailclass::exit1() {
 	SoundCard = NONE;
 }
 
-void ailclass::set_music_mastervol(int16 vol) {
+void ailclass::setMusicMasterVol(int16 vol) {
 	vol <<= 1;
 	if (vol > 120)
 		vol = 120;
 	MusicMasterVol = vol;
 }
 
-void ailclass::set_sound_mastervol(int16 vol) {
+void ailclass::setSoundMasterVol(int16 vol) {
 	vol <<= 1;
 	if (vol > 120)
 		vol = 120;
 	SoundMasterVol = vol;
 }
 
-void ailclass::set_channelvol(uint8 channel, uint8 vol) {
+void ailclass::setChannelVol(uint8 channel, uint8 vol) {
 	channel &= 3;
 	channel += 4;
 
-	warning("STUB: ailclass::set_channelvol()");
+	warning("STUB: ailclass::setChannelVol()");
 #if 0
 	if (SoundEnable)
 		AIL_set_sample_volume(smp[channel], vol);
 #endif
 }
 
-void ailclass::set_stereo_pos(int16 channel, int16 pos) {
+void ailclass::setStereoPos(int16 channel, int16 pos) {
 	channel &= 7;
 	channel += 4;
 	pos &= 127;
 
-	warning("STUB: ailclass::set_stereo_pos()");
+	warning("STUB: ailclass::setStereoPos()");
 #if 0
 	if (SoundEnable) {
 		StereoPos[channel] = pos;
@@ -317,15 +317,15 @@ void ailclass::set_stereo_pos(int16 channel, int16 pos) {
 #endif
 }
 
-void ailclass::disable_sound() {
+void ailclass::disableSound() {
 	SoundEnable = false;
 }
 
-void ailclass::init_mix_mode() {
-	warning("STUB: ailclass::init_mix_mode()");
+void ailclass::initMixMode() {
+	warning("STUB: ailclass::initMixMode()");
 
 	if (SoundEnable) {
-		init_note_table(GlobalFrequency);
+		initNoteTable(GlobalFrequency);
 #if 0
 		TimerHandle = AIL_register_timer(mod_irq);
 		if (TimerHandle != -1) {
@@ -334,7 +334,8 @@ void ailclass::init_mix_mode() {
 			TimerEnabled = true;
 		} else
 #endif
-			TimerEnabled = false;
+
+		TimerEnabled = false;
 		StereoPos[0] = 7;
 		StereoPos[1] = 120;
 		StereoPos[2] = 30;
@@ -342,8 +343,8 @@ void ailclass::init_mix_mode() {
 	}
 }
 
-void ailclass::exit_mix_mode() {
-	warning("STUB: ailclass::exit_mix_mode()");
+void ailclass::exitMixMode() {
+	warning("STUB: ailclass::exitMixMode()");
 
 #if 0
 	if (SoundEnable) {
@@ -355,7 +356,7 @@ void ailclass::exit_mix_mode() {
 #endif
 }
 
-void ailclass::play_mod(tmf_header *th) {
+void ailclass::playMod(tmf_header *th) {
 	char *tmp;
 	int16 i;
 	ActiveSong = th;
@@ -380,8 +381,8 @@ void ailclass::play_mod(tmf_header *th) {
 	}
 }
 
-void ailclass::stop_mod() {
-	warning("STUB: ailclass::stop_mod()");
+void ailclass::stopMod() {
+	warning("STUB: ailclass::stopMod()");
 
 #if 0
 	int16 i;
@@ -395,17 +396,17 @@ void ailclass::stop_mod() {
 #endif
 }
 
-void ailclass::continue_music() {
+void ailclass::continueMusic() {
 	if (SoundEnable)
 		if (!strncmp(ActiveSong->id, "TMF", 3))
 			MusicStatus = ON;
 }
 
-void ailclass::play_sequence(int16 startpos, int16 endpos) {
+void ailclass::playSequence(int16 startPos, int16 endPos) {
 	if (SoundEnable) {
 		if (!strncmp(ActiveSong->id, "TMF", 3)) {
-			StartPos = startpos;
-			EndPos = endpos;
+			StartPos = startPos;
+			EndPos = endPos;
 			SeqPointer = StartPos;
 			PatLine = 0;
 			PatPointer = ActiveSong->sequenz[SeqPointer];
@@ -415,27 +416,27 @@ void ailclass::play_sequence(int16 startpos, int16 endpos) {
 	}
 }
 
-void ailclass::play_pattern(int16 pattnr) {
+void ailclass::playPattern(int16 pattern) {
 	if (SoundEnable) {
 		if (!strncmp(ActiveSong->id, "TMF", 3)) {
 			StartPos = 0;
 			EndPos = 0;
 			SeqPointer = 0;
 			PatLine = 0;
-			PatPointer = pattnr;
+			PatPointer = pattern;
 			CurrentLine = Patterns[PatPointer];
 			MusicStatus = ON;
 		}
 	}
 }
 
-void ailclass::set_loopmode(int16 mode) {
+void ailclass::setLoopMode(int16 mode) {
 	mode &= 1;
 	if (SoundEnable)
 		LoopEnable = mode;
 }
 
-void ailclass::fade_in(uint16 delay) {
+void ailclass::fadeIn(uint16 delay) {
 	FadeVol = MusicMasterVol;
 	MusicMasterVol = 0;
 	FadeStart = delay;
@@ -443,14 +444,14 @@ void ailclass::fade_in(uint16 delay) {
 	MusicFade = FADE_IN;
 }
 
-void ailclass::fade_out(uint16 delay) {
+void ailclass::fadeOut(uint16 delay) {
 	FadeStart = delay;
 	FadeCounter = 0;
 	MusicFade = FADE_OUT;
 	FadeVol = MusicMasterVol;
 }
 
-void ailclass::get_musik_info(musik_info *mi) {
+void ailclass::getMusicInfo(musik_info *mi) {
 	mi->musik_playing = MusicStatus;
 	mi->play_mode = 0;
 	mi->pattern_line = PatLine;
@@ -458,38 +459,38 @@ void ailclass::get_musik_info(musik_info *mi) {
 	mi->cur_pattnr = PatPointer;
 }
 
-void ailclass::get_channel_info(channel_info *ch, int16 kanal) {
-	warning("STUB: ailclass::get_channel_info()");
+void ailclass::getChannelInfo(channel_info *ch, int16 channel) {
+	warning("STUB: ailclass::getChannelInfo()");
 
 #if 0
-	ch->finetune = Instrument[kanal].finetune;
-	ch->volume = Instrument[kanal].insvol;
-	ch->repstart = Instrument[kanal].repstart;
-	ch->replen = Instrument[kanal].replen;
-	ch->len = Instrument[kanal].laenge;
-	ch->pointer = (dword)Sample[kanal];
-	ch->pos = AIL_sample_position(smp[kanal]);
+	ch->finetune = Instrument[channel].finetune;
+	ch->volume = Instrument[channel].insvol;
+	ch->repstart = Instrument[channel].repstart;
+	ch->replen = Instrument[channel].replen;
+	ch->len = Instrument[channel].laenge;
+	ch->pointer = (dword)Sample[channel];
+	ch->pos = AIL_sample_position(smp[channel]);
 #endif
 }
 
-int16 ailclass::music_playing() {
+int16 ailclass::musicPlaying() {
 	return MusicStatus;
 }
 
-int16 ailclass::get_sample_status(int16 kanal) {
-	warning("STUB: ailclass::get_sample_status()");
+int16 ailclass::getSampleStatus(int16 channel) {
+	warning("STUB: ailclass::getSampleStatus()");
 
 #if 0
 	int16 ret;
-	kanal &= 3;
-	kanal += 4;
-	ret = AIL_sample_status(smp[kanal]);
+	channel &= 3;
+	channel += 4;
+	ret = AIL_sample_status(smp[channel]);
 	return ret;
 #endif
 	return 0;
 }
 
-void ailclass::init_note_table(uint16 sfreq) {
+void ailclass::initNoteTable(uint16 sfreq) {
 	float TimerFreq;
 	TimerFreq = 7093789.2f;
 	for (int j = 0; j < 16; j++) {
@@ -499,8 +500,8 @@ void ailclass::init_note_table(uint16 sfreq) {
 	}
 }
 
-void ailclass::play_voc(byte *anf_adr, int16 kanal, int16 vol, int16 rep) {
-	warning("STUB: ailclass::play_voc()");
+void ailclass::playVoc(byte *anf_adr, int16 channel, int16 vol, int16 rep) {
+	warning("STUB: ailclass::playVoc()");
 
 #if 0
 	byte *vptr = 0;
@@ -511,8 +512,8 @@ void ailclass::play_voc(byte *anf_adr, int16 kanal, int16 vol, int16 rep) {
 	if (SoundEnable) {
 		vptr = (byte *)anf_adr;
 		vol = (vol << 1) & 127;
-		kanal &= 3;
-		kanal += 4;
+		channel &= 3;
+		channel += 4;
 		while (*vptr != 0) {
 			blockt = *vptr++;
 			if (blockt > 7)
@@ -523,14 +524,14 @@ void ailclass::play_voc(byte *anf_adr, int16 kanal, int16 vol, int16 rep) {
 			if (blockt == 1) {
 				freq = vptr[0];
 				RealFrq = 1000000 / (256 - freq);
-				AIL_init_sample(smp[kanal]);
-				AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
-				AIL_set_sample_address(smp[kanal], vptr + 2, blocklen);
-				AIL_set_sample_playback_rate(smp[kanal], RealFrq);
-				AIL_set_sample_volume(smp[kanal], vol);
-				AIL_set_sample_loop_count(smp[kanal], rep);
-				AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
-				AIL_start_sample(smp[kanal]);
+				AIL_init_sample(smp[channel]);
+				AIL_set_sample_type(smp[channel], DIG_F_MONO_8, 0);
+				AIL_set_sample_address(smp[channel], vptr + 2, blocklen);
+				AIL_set_sample_playback_rate(smp[channel], RealFrq);
+				AIL_set_sample_volume(smp[channel], vol);
+				AIL_set_sample_loop_count(smp[channel], rep);
+				AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
+				AIL_start_sample(smp[channel]);
 			}
 			vptr += blocklen;
 		}
@@ -538,28 +539,27 @@ void ailclass::play_voc(byte *anf_adr, int16 kanal, int16 vol, int16 rep) {
 #endif
 }
 
-void ailclass::play_raw(int16 kanal, char *sp, uint32 len,
-                        uint16 freqwert, int16 volume, int16 rep) {
-	warning("STUB: ailclass::play_raw()");
+void ailclass::playRaw(int16 channel, char *sp, uint32 len, uint16 frequency, int16 volume, int16 rep) {
+	warning("STUB: ailclass::playRaw()");
 
 #if 0
-	kanal &= 3;
-	kanal += 4;
+	channel &= 3;
+	channel += 4;
 	if (SoundEnable) {
-		AIL_init_sample(smp[kanal]);
-		AIL_set_sample_type(smp[kanal], DIG_F_MONO_8, 0);
-		AIL_set_sample_address(smp[kanal], sp, len);
-		AIL_set_sample_playback_rate(smp[kanal], freqwert);
-		AIL_set_sample_volume(smp[kanal], volume);
-		AIL_set_sample_loop_count(smp[kanal], rep);
-		AIL_set_sample_pan(smp[kanal], (byte)StereoPos[kanal]);
-		AIL_start_sample(smp[kanal]);
+		AIL_init_sample(smp[channel]);
+		AIL_set_sample_type(smp[channel], DIG_F_MONO_8, 0);
+		AIL_set_sample_address(smp[channel], sp, len);
+		AIL_set_sample_playback_rate(smp[channel], frequency);
+		AIL_set_sample_volume(smp[channel], volume);
+		AIL_set_sample_loop_count(smp[channel], rep);
+		AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
+		AIL_start_sample(smp[channel]);
 	}
 #endif
 }
 
-void ailclass::stop_sound() {
-	warning("STUB: ailclass::stop_sound()");
+void ailclass::stopSound() {
+	warning("STUB: ailclass::stopSound()");
 
 #if 0
 	int16 i;
@@ -568,8 +568,8 @@ void ailclass::stop_sound() {
 #endif
 }
 
-void ailclass::continue_sound() {
-	warning("STUB: ailclass::continue_sound()");
+void ailclass::continueSound() {
+	warning("STUB: ailclass::continueSound()");
 
 #if 0
 	int16 i;
@@ -578,8 +578,8 @@ void ailclass::continue_sound() {
 #endif
 }
 
-void ailclass::end_sound() {
-	warning("STUB: ailclass::end_sound()");
+void ailclass::endSound() {
+	warning("STUB: ailclass::endSound()");
 
 #if 0
 	int16 i;
@@ -588,45 +588,45 @@ void ailclass::end_sound() {
 #endif
 }
 
-void ailclass::stop_sample(int16 kanal) {
-	warning("STUB: ailclass::stop_sample()");
+void ailclass::stopSample(int16 channel) {
+	warning("STUB: ailclass::stopSample()");
 
 #if 0
-	kanal &= 3;
-	kanal += 4;
-	AIL_stop_sample(smp[kanal]);
+	channel &= 3;
+	channel += 4;
+	AIL_stop_sample(smp[channel]);
 #endif
 }
 
-void ailclass::continue_sample(int16 kanal) {
-	warning("STUB: ailclass::continue_sample()");
+void ailclass::continueSample(int16 channel) {
+	warning("STUB: ailclass::continueSample()");
 
 #if 0
-	kanal &= 3;
-	kanal += 4;
-	AIL_resume_sample(smp[kanal]);
+	channel &= 3;
+	channel += 4;
+	AIL_resume_sample(smp[channel]);
 #endif
 }
 
-void ailclass::end_sample(int16 kanal) {
-	warning("STUB: ailclass::end_sample()");
+void ailclass::endSample(int16 channel) {
+	warning("STUB: ailclass::endSample()");
 
 #if 0
-	kanal &= 3;
-	kanal += 4;
-	AIL_end_sample(smp[kanal]);
+	channel &= 3;
+	channel += 4;
+	AIL_end_sample(smp[channel]);
 #endif
 }
 
-void ailclass::init_double_buffer(byte *b1, byte *b2, uint32 len, int16 kanal) {
-	kanal &= 3;
-	kanal += 4;
-	Dbuffer[kanal][0] = b1;
-	Dbuffer[kanal][1] = b2;
-	DbufferLen[kanal] = len;
+void ailclass::initDoubleBuffer(byte *b1, byte *b2, uint32 len, int16 channel) {
+	channel &= 3;
+	channel += 4;
+	Dbuffer[channel][0] = b1;
+	Dbuffer[channel][1] = b2;
+	DbufferLen[channel] = len;
 }
 
-void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
+void ailclass::startDbVoc(Stream *v, int16 channel, int16 vol) {
 	Common::SeekableReadStream *src = dynamic_cast<Common::SeekableReadStream *>(v);
 	assert(src);
 
@@ -636,11 +636,11 @@ void ailclass::start_db_voc(Stream *v, int16 kanal, int16 vol) {
 		::error("Error loading speech");
 
 	Common::SeekableReadStream *rs = src->readStream(ch.size);
-	playSpeech(kanal, rs);
+	playSpeech(channel, rs);
 }
 
-void ailclass::serve_db_samples() {
-	debug(1, "STUB: ailclass::serve_db_samples()");
+void ailclass::serveDbSamples() {
+	debug(1, "STUB: ailclass::serveDbSamples()");
 
 #if 0
 	int16 i;
@@ -678,7 +678,7 @@ void mod_irq() {
 	if (!InInterrupt) {
 		++InInterrupt;
 		if (MusicSwitch && (MusicStatus == ON)) {
-			check_sample_end();
+			checkSampleEnd();
 			if (PatternCount <= 0) {
 				PatternCount = CurrentTempo;
 				DecodePatternLine();
@@ -718,8 +718,8 @@ void mod_irq() {
 	--InInterrupt;
 }
 
-void check_sample_end() {
-	warning("STUB: ailclass::check_sample_end()");
+void checkSampleEnd() {
+	warning("STUB: ailclass::checkSampleEnd()");
 
 #if 0
 	int16 i;
@@ -893,19 +893,19 @@ void DecodeChannel(int16 ch) {
 #endif
 }
 
-void ailclass::switch_music(bool onOff) {
+void ailclass::switchMusic(bool onOff) {
 	if (SoundEnable)
 		MusicSwitch = onOff;
 }
 
-void ailclass::switch_sound(bool onOff) {
+void ailclass::switchSound(bool onOff) {
 	if (SoundEnable)
 		SoundSwitch = onOff;
 }
 
 void serve_speech() {
 	if (flags.InitSound && _G(spieler).SpeechSwitch)
-		ailsnd->serve_db_samples();
+		ailsnd->serveDbSamples();
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 5e54d5d0f5b..c769f233433 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -28,7 +28,7 @@
 namespace Chewy {
 
 void mod_irq();
-void check_sample_end();
+void checkSampleEnd();
 void DecodePatternLine();
 void DecodeChannel(int16 ch);
 
@@ -73,50 +73,46 @@ public:
 	~ailclass();
 
 	int16 init(uint16 freq);
-	int16 init(char *midi_drv_name);
+	int16 init(char *midiDrvName);
 	void exit1();
 
-	void set_music_mastervol(int16 vol);
-	void set_sound_mastervol(int16 vol);
-	void set_stereo_pos(int16 channel, int16 pos);
-	void set_channelvol(uint8 channel, uint8 vol);
-	void disable_sound();
-
-	void get_musik_info(musik_info *mi);
-	void get_channel_info(channel_info *mi, int16 kanal);
-	int16 music_playing();
-	int16 get_sample_status(int16 kanal);
-
-	void init_note_table(uint16 sfreq);
-	void init_mix_mode();
-	void exit_mix_mode();
-	void play_mod(tmf_header *th);
-	void stop_mod();
-	void continue_music();
-	void play_sequence(int16 startpos, int16 endpos);
-	void play_pattern(int16 pattnr);
-	void set_loopmode(int16 mode);
-	void fade_in(uint16 delay);
-	void fade_out(uint16 delay);
-
-	void play_voc(byte *anf_adr, int16 kanal, int16 vol,
-	              int16 rep);
-	void play_raw(int16 kanal, char *voc, uint32 len,
-	              uint16 freqwert, int16 volume, int16 rep);
-	void end_sound();
-	void stop_sound();
-	void continue_sound();
-	void stop_sample(int16 kanal);
-	void continue_sample(int16 kanal);
-	void end_sample(int16 kanal);
-	void init_double_buffer(byte *b1, byte *b2,
-	                        uint32 len, int16 kanal);
-
-	void start_db_voc(Stream *voc, int16 kanal, int16 vol);
-	void serve_db_samples();
-	void switch_music(bool onOff);
-	void switch_sound(bool onOff);
-private:
+	void setMusicMasterVol(int16 vol);
+	void setSoundMasterVol(int16 vol);
+	void setStereoPos(int16 channel, int16 pos);
+	void setChannelVol(uint8 channel, uint8 vol);
+	void disableSound();
+
+	void getMusicInfo(musik_info *mi);
+	void getChannelInfo(channel_info *mi, int16 channel);
+	int16 musicPlaying();
+	int16 getSampleStatus(int16 channel);
+
+	void initNoteTable(uint16 sfreq);
+	void initMixMode();
+	void exitMixMode();
+	void playMod(tmf_header *th);
+	void stopMod();
+	void continueMusic();
+	void playSequence(int16 startPos, int16 endPos);
+	void playPattern(int16 pattern);
+	void setLoopMode(int16 mode);
+	void fadeIn(uint16 delay);
+	void fadeOut(uint16 delay);
+
+	void playVoc(byte *anf_adr, int16 channel, int16 vol, int16 rep);
+	void playRaw(int16 channel, char *voc, uint32 len, uint16 frequency, int16 volume, int16 rep);
+	void endSound();
+	void stopSound();
+	void continueSound();
+	void stopSample(int16 channel);
+	void continueSample(int16 channel);
+	void endSample(int16 channel);
+	void initDoubleBuffer(byte *b1, byte *b2, uint32 len, int16 channel);
+
+	void startDbVoc(Stream *voc, int16 channel, int16 vol);
+	void serveDbSamples();
+	void switchMusic(bool onOff);
+	void switchSound(bool onOff);
 };
 
 extern void serve_speech();
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 1c829c0eb8a..1e9ae8a7365 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -31,7 +31,6 @@ namespace Chewy {
 extern char *err_str;
 int16 mouse_push;
 int print_delay_count1;
-int print_delay_count2;		// TODO: seems to be unused
 
 bool AtsTxtHeader::load(Common::SeekableReadStream *src) {
 	TxtNr = src->readUint16LE();
@@ -74,7 +73,7 @@ bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 
 atdsys::atdsys() {
 	int16 i;
-	SplitStringInit init_ssi = { 0, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
+	SplitStringInit init_ssi = { nullptr, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
 	aadv.Dialog = false;
 	aadv.StrNr = -1;
 	aadv.SilentCount = false;
@@ -579,7 +578,6 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
 			} else {
 				atsv.DelayCount = get_delay(atsv.TxtLen);
 				print_delay_count1 = atsv.DelayCount / 10;
-				print_delay_count2 = atsv.DelayCount;
 				atsv.Color = color;
 				mouse_push = true;
 			}
@@ -678,7 +676,6 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 						++atsv.TxtLen;
 					atsv.DelayCount = get_delay(atsv.TxtLen);
 					print_delay_count1 = atsv.DelayCount / 10;
-					print_delay_count2 = atsv.DelayCount;
 					atsv.SilentCount = atdsv.Silent;
 				}
 			} else
@@ -939,7 +936,6 @@ int16 atdsys::start_aad(int16 dia_nr) {
 			aad_get_zeilen(aadv.Ptr, &txt_len);
 			aadv.DelayCount = get_delay(txt_len);
 			print_delay_count1 = aadv.DelayCount / 10;
-			print_delay_count2 = aadv.DelayCount;
 
 			atdsv.DiaNr = dia_nr;
 			if (atdsv.aad_str != 0)
@@ -1046,9 +1042,9 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 
 							vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
 							       _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
-							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
-							ailsnd->start_db_voc(atdsv.SpeechHandle, 0, 63);
-							ailsnd->set_stereo_pos(0, get_stereo_pos(vocx));
+							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
+							ailsnd->startDbVoc(atdsv.SpeechHandle, 0, 63);
+							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
 							aadv.DelayCount = 1;
 						}
 					} else {
@@ -1094,7 +1090,6 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 					aad_get_zeilen(aadv.Ptr, &txt_len);
 					aadv.DelayCount = get_delay(txt_len);
 					print_delay_count1 = aadv.DelayCount / 10;
-					print_delay_count2 = aadv.DelayCount;
 					aadv.SilentCount = atdsv.Silent;
 				}
 			} else {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index c4089dd4a55..9e6e53bf64f 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -709,13 +709,13 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 					if ((adiptr->sfx.sound_start[k] == adiptr->ani_count) &&
 					        (!adiptr->delay_count)) {
 #ifdef AIL
-						ailsnd->set_stereo_pos(adiptr->sfx.kanal[k],
+						ailsnd->setStereoPos(adiptr->sfx.kanal[k],
 						                       adiptr->sfx.stereo[k]);
-						ailsnd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+						ailsnd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
 						                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
 #else
 #if 0
-						snd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+						snd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
 						              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
 #endif
 						warning("STUB: detail::plot_ani_details()");
@@ -885,14 +885,14 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
 		        (rdi.sample[sound_effect])) {
 			if (adiptr->sfx.sound_start[k] == spr_nr) {
 #ifdef AIL
-				ailsnd->set_stereo_pos(adiptr->sfx.kanal[k],
+				ailsnd->setStereoPos(adiptr->sfx.kanal[k],
 				                       adiptr->sfx.stereo[k]);
-				ailsnd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+				ailsnd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
 				                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
 #else
 				warning("STUB: detail::plot_detail_sprite()");
 #if 0
-				snd->play_voc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
+				snd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
 				              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
 #endif
 #endif
@@ -1031,7 +1031,7 @@ void detail::disable_sound(int16 nr, int16 sslot) {
 	sound_def_blk *sdb;
 	sdb = &rdi.Ainfo[nr].sfx;
 	sdb->sound_enable[sslot] = 0;
-	ailsnd->end_sample(sdb->kanal[sslot]);
+	ailsnd->endSample(sdb->kanal[sslot]);
 }
 
 void detail::enable_sound(int16 nr, int16 sslot) {
@@ -1048,11 +1048,11 @@ void detail::play_sound(int16 nr, int16 sslot) {
 	if ((sdb->sound_enable[sslot] != FALSE) && (sdb->sound_index[sslot] != -1) &&
 	        (rdi.sample[sdb->sound_index[sslot]])) {
 #ifdef AIL
-		ailsnd->set_stereo_pos(sdb->kanal[sslot], sdb->stereo[sslot]);
-		ailsnd->play_voc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
+		ailsnd->setStereoPos(sdb->kanal[sslot], sdb->stereo[sslot]);
+		ailsnd->playVoc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
 		                 sdb->volume[sslot], sdb->repeats[sslot]);
 #else
-		snd->play_voc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
+		snd->playVoc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
 		              sdb->volume[sslot], sdb->repeats[sslot]);
 #endif
 	}
@@ -1086,11 +1086,11 @@ void detail::play_detail_sound(int16 nr) {
 		if ((sdb->sound_enable[k] != FALSE) && (sdb->sound_index[k] != -1) &&
 		        (rdi.sample[sdb->sound_index[k]])) {
 #ifdef AIL
-			ailsnd->set_stereo_pos(sdb->kanal[k], sdb->stereo[k]);
-			ailsnd->play_voc(rdi.sample[sdb->sound_index[k]], sdb->kanal[k],
+			ailsnd->setStereoPos(sdb->kanal[k], sdb->stereo[k]);
+			ailsnd->playVoc(rdi.sample[sdb->sound_index[k]], sdb->kanal[k],
 			                 sdb->volume[k], sdb->repeats[k]);
 #else
-			snd->play_voc(rdi.sample[sound_effect], sdb->kanal[k],
+			snd->playVoc(rdi.sample[sound_effect], sdb->kanal[k],
 			              sdb->volume[k], sdb->repeats[k]);
 #endif
 		}
@@ -1118,7 +1118,7 @@ void detail::disable_room_sound() {
 	int16 i;
 	for (i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
-	ailsnd->end_sound();
+	ailsnd->endSound();
 }
 
 void detail::enable_room_sound() {
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 24fcc733540..a6b06e0a270 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -553,7 +553,7 @@ void option_menue(taf_info *ti) {
 			case 5:
 				if (_G(spieler).MusicSwitch) {
 					_G(spieler).MusicSwitch = false;
-					ailsnd->stop_mod();
+					ailsnd->stopMod();
 				} else  if (flags.InitSound) {
 					_G(spieler).MusicSwitch = true;
 					CurrentSong = -1;
@@ -565,11 +565,11 @@ void option_menue(taf_info *ti) {
 				break;
 			case 7:
 				_G(spieler).SoundVol = (136 - minfo.y) << 1;
-				ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
+				ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
 				break;
 			case 8:
 				_G(spieler).MusicVol = (136 - minfo.y) << 1;
-				ailsnd->set_music_mastervol(_G(spieler).MusicVol);
+				ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
 				break;
 			}
 			minfo.button = 0;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 43d165e18fb..d1a80f781ae 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -557,9 +557,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 		case PLAY_MUSIC:
 			if (!strncmp(th->id, "TMF\0", 4))
 #ifndef AIL
-				snd->play_mod(th);
+				snd->playMod(th);
 #else
-				ailsnd->play_mod(th);
+				ailsnd->playMod(th);
 #endif
 
 			break;
@@ -571,13 +571,13 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			} else {
 				if (!strncmp(th->id, "TMF\0", 4)) {
 #ifndef AIL
-					snd->play_mod(th);
-					snd->stop_mod();
-					snd->play_sequence(para[0], para[1]);
+					snd->playMod(th);
+					snd->stopMod();
+					snd->playSequence(para[0], para[1]);
 #else
-					ailsnd->play_mod(th);
-					ailsnd->stop_mod();
-					ailsnd->play_sequence(para[0], para[1]);
+					ailsnd->playMod(th);
+					ailsnd->stopMod();
+					ailsnd->playSequence(para[0], para[1]);
 #endif
 				}
 			}
@@ -590,13 +590,13 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			} else {
 				if (!strncmp(th->id, "TMF\0", 4)) {
 #ifndef AIL
-					snd->play_mod(th);
-					snd->stop_mod();
-					snd->play_pattern(para[0]);
+					snd->playMod(th);
+					snd->stopMod();
+					snd->playPattern(para[0]);
 #else
-					ailsnd->play_mod(th);
-					ailsnd->stop_mod();
-					ailsnd->play_pattern(para[0]);
+					ailsnd->playMod(th);
+					ailsnd->stopMod();
+					ailsnd->playPattern(para[0]);
 #endif
 				}
 			}
@@ -604,18 +604,18 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case STOP_MUSIC:
 #ifndef AIL
-			snd->stop_mod();
+			snd->stopMod();
 #else
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 #endif
 			break;
 
 		case WAIT_MSTOP:
 			do {
 #ifndef AIL
-				snd->get_musik_info(&mi);
+				snd->getMusicInfo(&mi);
 #else
-				ailsnd->get_musik_info(&mi);
+				ailsnd->getMusicInfo(&mi);
 #endif
 			} while (mi.musik_playing != 0);
 			break;
@@ -626,9 +626,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->set_music_mastervol(para[0]);
+				snd->setMusicMasterVol(para[0]);
 #else
-				ailsnd->set_music_mastervol(para[0]);
+				ailsnd->setMusicMasterVol(para[0]);
 #endif
 
 			break;
@@ -639,9 +639,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->set_loopmode(para[0]);
+				snd->setLoopMode(para[0]);
 #else
-				ailsnd->set_loopmode(para[0]);
+				ailsnd->setLoopMode(para[0]);
 #endif
 			break;
 
@@ -654,13 +654,13 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->play_voc(sounds[para[0]], para[1], para[2], para[3]);
+				snd->playVoc(sounds[para[0]], para[1], para[2], para[3]);
 #else
 				if (para[3] == 255)
 					para[3] = 0;
 				else
 					para[3] += 1;
-			ailsnd->play_voc(sounds[para[0]], para[1], para[2], para[3]);
+			ailsnd->playVoc(sounds[para[0]], para[1], para[2], para[3]);
 #endif
 
 			break;
@@ -671,9 +671,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->set_sound_mastervol(para[0]);
+				snd->setSoundMasterVol(para[0]);
 #else
-				ailsnd->set_sound_mastervol(para[0]);
+				ailsnd->setSoundMasterVol(para[0]);
 #endif
 			break;
 
@@ -683,9 +683,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->set_channelvol((byte)para[0], (byte)para[1]);
+				snd->setChannelVol((byte)para[0], (byte)para[1]);
 #else
-				ailsnd->set_channelvol((byte)para[0], (byte)para[1]);
+				ailsnd->setChannelVol((byte)para[0], (byte)para[1]);
 #endif
 			break;
 
@@ -703,9 +703,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->fade_in(para[0]);
+				snd->fadeIn(para[0]);
 #else
-				ailsnd->fade_in(para[0]);
+				ailsnd->fadeIn(para[0]);
 #endif
 			break;
 
@@ -715,9 +715,9 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifndef AIL
-				snd->fade_out(para[0]);
+				snd->fadeOut(para[0]);
 #else
-				ailsnd->fade_out(para[0]);
+				ailsnd->fadeOut(para[0]);
 #endif
 			break;
 
@@ -727,7 +727,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fcode = READFEHLER;
 			} else
 #ifdef AIL
-				ailsnd->set_stereo_pos(para[0], para[1]);
+				ailsnd->setStereoPos(para[0], para[1]);
 #endif
 			break;
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 425ecbb4e08..58ed1e10445 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -459,13 +459,13 @@ void sound_init() {
 	detect.SoundSource = ailsnd->init(frequenz);
 
 	if (detect.SoundSource) {
-		ailsnd->init_mix_mode();
+		ailsnd->initMixMode();
 		_G(spieler).MusicVol = 63;
 		_G(spieler).SoundVol = 63;
-		ailsnd->set_music_mastervol(_G(spieler).MusicVol);
-		ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
-		ailsnd->switch_music(true);
-		ailsnd->switch_sound(true);
+		ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
+		ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+		ailsnd->switchMusic(true);
+		ailsnd->switchSound(true);
 		flags.InitSound = true;
 
 		voc_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
@@ -493,7 +493,7 @@ void sound_init() {
 			fcode = OPENFEHLER;
 			err->set_user_msg("speech.tvp");
 		} else {
-			ailsnd->init_double_buffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
+			ailsnd->initDoubleBuffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
 			atds->set_speech_handle(speech_handle);
 
 			atds->setHasSpeech(true);
@@ -510,7 +510,7 @@ void sound_init() {
 
 void sound_exit() {
 	if (detect.SoundSource && flags.InitSound) {
-		ailsnd->exit_mix_mode();
+		ailsnd->exitMixMode();
 		ailsnd->exit1();
 		if (speech_handle)
 			chewy_fclose(speech_handle);
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 374e9571f52..ac21da31be5 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -181,7 +181,7 @@ void load_room_music(int16 room_nr) {
 		default:
 			ttp_index = -1;
 			CurrentSong = -1;
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			break;
 		}
 		if (ttp_index != -1) {
@@ -189,25 +189,25 @@ void load_room_music(int16 room_nr) {
 				volume = 0;
 			else if (volume > _G(spieler).MusicVol)
 				volume = _G(spieler).MusicVol;
-			ailsnd->set_music_mastervol(volume);
-			ailsnd->set_loopmode(lp_mode);
+			ailsnd->setMusicMasterVol(volume);
+			ailsnd->setLoopMode(lp_mode);
 			if (ttp_index != CurrentSong) {
-				ailsnd->stop_mod();
-				while (ailsnd->music_playing());
+				ailsnd->stopMod();
+				while (ailsnd->musicPlaying());
 				memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
 				mem->file->select_pool_item(music_handle, EndOfPool - ttp_index);
 				mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 				CurrentSong = ttp_index;
 				if (!modul) {
 					if (play_mode == NORMAL_PLAY)
-						ailsnd->play_mod((tmf_header *)Ci.MusicSlot);
+						ailsnd->playMod((tmf_header *)Ci.MusicSlot);
 					else {
-						ailsnd->play_mod((tmf_header *)Ci.MusicSlot);
-						ailsnd->stop_mod();
+						ailsnd->playMod((tmf_header *)Ci.MusicSlot);
+						ailsnd->stopMod();
 						if (play_mode == SEQUENCE_PLAY)
-							ailsnd->play_sequence(seq_start, seq_end);
+							ailsnd->playSequence(seq_start, seq_end);
 						else if (play_mode == PATTERN_PLAY)
-							ailsnd->play_pattern(pattern);
+							ailsnd->playPattern(pattern);
 					}
 				}
 			}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 1e3dd6d6c70..522c3ebc23b 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -568,7 +568,7 @@ void set_up_screen(SetupScreenMode mode) {
 		mode = DO_SETUP;
 
 	if (flags.InitSound && _G(spieler).SpeechSwitch)
-		ailsnd->serve_db_samples();
+		ailsnd->serveDbSamples();
 	uhr->calc_timer();
 
 	if (ani_timer[0].TimeFlag) {
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 74f4d41f5a5..7c6f78d4b4a 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -37,10 +37,10 @@ void MainMenu::execute() {
 	mem->file->select_pool_item(music_handle, EndOfPool - 17);
 	mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 	if (!modul)
-		ailsnd->play_mod((tmf_header *)Ci.MusicSlot);
+		ailsnd->playMod((tmf_header *)Ci.MusicSlot);
 
 	flic_cut(200, 0);
-	ailsnd->stop_mod();
+	ailsnd->stopMod();
 #endif
 
 	show_intro();
@@ -54,8 +54,8 @@ void MainMenu::execute() {
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
-		ailsnd->stop_mod();
-		ailsnd->end_sound();
+		ailsnd->stopMod();
+		ailsnd->endSound();
 		SetUpScreenFunc = screenFunc;
 
 		cursor_wahl(CUR_ZEIGE);
@@ -266,7 +266,7 @@ void MainMenu::playGame() {
 	cur->show_cur();
 	spieler_vector[P_CHEWY].Count = 0;
 	uhr->reset_timer(0, 0);
-	ailsnd->set_loopmode(_G(spieler).soundLoopMode);
+	ailsnd->setLoopMode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !main_loop(1)) {
 	}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index d6464a52d21..cb33529240a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -894,7 +894,7 @@ static void flic_proc1() {
 
 		if (flags.InitSound && _G(spieler).SpeechSwitch) {
 			while (ailsnd->isSpeechActive() && !SHOULD_QUIT) {
-				ailsnd->serve_db_samples();
+				ailsnd->serveDbSamples();
 			}
 		} else {
 			delay(6000);
@@ -930,7 +930,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	out->setze_zeiger(nullptr);
 	det->disable_room_sound();
-	ailsnd->end_sound();
+	ailsnd->endSound();
 	g_events->delay(50);
 	Common::File *f = File::open("cut/cut.tap");
 	Ci.Handle = f;
@@ -940,7 +940,7 @@ void flic_cut(int16 nr, int16 mode) {
 		switch (nr) {
 		case FCUT_001:
 		case 1000:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
@@ -957,12 +957,12 @@ void flic_cut(int16 nr, int16 mode) {
 		case 26:
 		case 27:
 		case 28:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			nr = FCUT_019;
 			mem->file->select_pool_item(Ci.Handle, nr);
 			ret = flc->custom_play(&Ci);
-			ailsnd->set_loopmode(1);
+			ailsnd->setLoopMode(1);
 
 			if (!modul && ret != -1) {
 				f->seek(ChunkHead::SIZE(), SEEK_CUR);
@@ -1016,11 +1016,11 @@ void flic_cut(int16 nr, int16 mode) {
 				flc->custom_play(&Ci);
 			}
 			ERROR
-			ailsnd->fade_out(0);
+			ailsnd->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
-			while (ailsnd->music_playing());
-			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
+			while (ailsnd->musicPlaying());
+			ailsnd->setLoopMode(_G(spieler).soundLoopMode);
 			break;
 
 		case FCUT_032:
@@ -1032,7 +1032,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_034:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 
 			PLAY_LOOP;
@@ -1080,24 +1080,24 @@ void flic_cut(int16 nr, int16 mode) {
 					flc->custom_play(&Ci);
 				}
 			}
-			ailsnd->fade_out(0);
+			ailsnd->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
-			while (ailsnd->music_playing());
+			while (ailsnd->musicPlaying());
 			break;
 
 		case FCUT_065:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
-			ailsnd->set_loopmode(1);
+			ailsnd->setLoopMode(1);
 			Room46::kloppe();
-			ailsnd->set_loopmode(_G(spieler).soundLoopMode);
+			ailsnd->setLoopMode(_G(spieler).soundLoopMode);
 			CurrentSong = -1;
 			break;
 
 		case FCUT_071:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
@@ -1119,12 +1119,12 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 112:
-			ailsnd->set_music_mastervol(32);
+			ailsnd->setMusicMasterVol(32);
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
-			ailsnd->set_music_mastervol(5);
+			ailsnd->setMusicMasterVol(5);
 			break;
 
 		case 116:
@@ -1209,7 +1209,7 @@ void flic_cut(int16 nr, int16 mode) {
 				print_rows(594);
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				if (FLIC_CUT_1045[i] == 53) {
-					ailsnd->stop_mod();
+					ailsnd->stopMod();
 					CurrentSong = -1;
 					load_room_music(256);
 				}
@@ -1217,7 +1217,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = flc->custom_play(&Ci);
 
 				if (FLIC_CUT_1045[i] == 53) {
-					ailsnd->stop_mod();
+					ailsnd->stopMod();
 				}
 			}
 			break;
@@ -1270,7 +1270,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1058:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
 			mem->file->select_pool_item(Ci.Handle, 58);
@@ -1297,7 +1297,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1065:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
 
@@ -1366,7 +1366,7 @@ void flic_cut(int16 nr, int16 mode) {
 				mem->file->select_pool_item(Ci.Handle, 86);
 				fx->spr_blende(workpage, 100, false, 0);
 				flc->custom_play(&Ci);
-				ailsnd->stop_mod();
+				ailsnd->stopMod();
 			}
 			break;
 
@@ -1417,21 +1417,21 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1110:
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			CurrentSong = -1;
 			load_room_music(257);
-			ailsnd->set_music_mastervol(20);
+			ailsnd->setMusicMasterVol(20);
 			mem->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
 
 			if (ret != -1) {
 				mem->file->select_pool_item(Ci.Handle, 112);
 				fx->spr_blende(workpage, 100, false, 0);
-				ailsnd->set_music_mastervol(63);
+				ailsnd->setMusicMasterVol(63);
 				flc->custom_play(&Ci);
 			}
 
-			ailsnd->stop_mod();
+			ailsnd->stopMod();
 			break;
 
 		case 1113:
@@ -1477,10 +1477,10 @@ void flic_cut(int16 nr, int16 mode) {
 
 	ERROR
 
-	ailsnd->end_sound();
+	ailsnd->endSound();
 	g_events->delay(50);
-	ailsnd->set_sound_mastervol(_G(spieler).SoundVol);
-	ailsnd->set_music_mastervol(_G(spieler).MusicVol);
+	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+	ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 4fe34f40555..092c532ddca 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -36,7 +36,7 @@ void Room43::night_small() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	ailsnd->stop_mod();
+	ailsnd->stopMod();
 	det->play_sound(0, 0);
 	hide_cur();
 	flags.NoScroll = true;
@@ -73,7 +73,7 @@ void Room43::catch_pg() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	ailsnd->stop_mod();
+	ailsnd->stopMod();
 	det->play_sound(0, 0);
 	hide_cur();
 	flags.NoScroll = true;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 8f3a4a1499f..efa602aeee8 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -165,10 +165,10 @@ void Room46::kloppe() {
 
 	mem->file->select_pool_item(Ci.Handle, 66);
 	flc->custom_play(&Ci);
-	ailsnd->fade_out(0);
+	ailsnd->fadeOut(0);
 	out->cls();
 
-	while (ailsnd->music_playing() && !SHOULD_QUIT) {
+	while (ailsnd->musicPlaying() && !SHOULD_QUIT) {
 		EVENTS_UPDATE;
 	}
 }
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index a786333130b..08993374fc8 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -104,7 +104,7 @@ void Room68::setup_func() {
 				det->play_sound(_G(r68HohesC), 0);
 				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
 
-				while (ailsnd->get_sample_status(1) == 4)
+				while (ailsnd->getSampleStatus(1) == 4)
 					set_up_screen(DO_SETUP);
 				det->stop_detail(_G(r68HohesC));
 			} else {
@@ -347,7 +347,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		start_aad_wait(389, -1);
 	else {
 		if (_G(spieler).DisplayText == 0)
-			ailsnd->fade_out(5);
+			ailsnd->fadeOut(5);
 		
 		SetUpScreenFunc = nullptr;
 		del_inventar(_G(spieler).AkInvent);
@@ -364,13 +364,13 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			start_detail_wait(23, 3, ANI_VOR);
 		else {
 			det->start_detail(23, 255, ANI_VOR);
-			ailsnd->init_double_buffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
+			ailsnd->initDoubleBuffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
 			::error("TODO: voc_handle");
 #if 0
 			Stream *voc_handle = nullptr; // TODO : should be the voc_handle initialized in sound_init()
 			mem->file->select_pool_item(voc_handle, 109);
 			ERROR
-			ailsnd->start_db_voc(voc_handle, 1, 30);
+			ailsnd->startDbVoc(voc_handle, 1, 30);
 			wait_show_screen(2);
 
 			while (!ailsnd->isSpeechActive(1))
@@ -382,7 +382,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		if (_G(spieler).DisplayText) {
 			mem->file->select_pool_item(voc_handle, 108);
 			ERROR
-			ailsnd->start_db_voc(voc_handle, 1, 30);			
+			ailsnd->startDbVoc(voc_handle, 1, 30);			
 		}
 		
 		det->start_detail(24, 255, ANI_VOR);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index a76c91a25c4..c227412e2c3 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -451,9 +451,9 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 				ret = true;
 				mem->file->select_pool_item(speech_handle, VocNr);
 				vocx = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
-				ailsnd->set_stereo_pos(0, atds->get_stereo_pos(vocx));
-				ailsnd->start_db_voc(speech_handle, 0, 63);
-				ailsnd->set_stereo_pos(0, atds->get_stereo_pos(vocx));
+				ailsnd->setStereoPos(0, atds->get_stereo_pos(vocx));
+				ailsnd->startDbVoc(speech_handle, 0, 63);
+				ailsnd->setStereoPos(0, atds->get_stereo_pos(vocx));
 				warning("FIXME - unknown constant SMP_PLAYING");
 
 				set_up_screen(DO_SETUP);


Commit: 26922a37dd90dded92a7e0018fb7a6237bc41918
    https://github.com/scummvm/scummvm/commit/26922a37dd90dded92a7e0018fb7a6237bc41918
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: Remove ch_icm (unused)

Changed paths:
  R engines/chewy/ch_icm.cpp
  R engines/chewy/ch_icm.h
    engines/chewy/module.mk


diff --git a/engines/chewy/ch_icm.cpp b/engines/chewy/ch_icm.cpp
deleted file mode 100644
index 2521642fcbc..00000000000
--- a/engines/chewy/ch_icm.cpp
+++ /dev/null
@@ -1,1375 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-
-#ifdef ICM
-#include "chewy/ch_icm.h"
-
-namespace Chewy {
-
-int16 maus_rect_first;
-int16 koordinate[4] = {0};
-int16 last_debug_ani;
-int16 p_nr = P_CHEWY;
-void grab();
-void get_inv();
-void del_inv();
-char no_sav[] = {"Es wurde noch nicht gespeichert\0"
-                 "Speichern Ja/Nein ??\0"
-                };
-
-void draw_ice_win() {
-	int16 x;
-	int16 y;
-	int16 i;
-	int16 str_anz;
-
-	char c[] = {" Inline I.C.M Adventure Engine \0"
-	            "F1 ..... Einen neuen Raum anwählen\0"
-	            "F2 ..... Raum Info\0"
-	            "F3 ..... Zoom Werte eingeben\0"
-	            "F4 ..... Gehe zu Auto Mov Punkt\0"
-	            "F5 ..... Rechteck festlegen\0"
-	            "F6 ..... Auto Move Punkt ermitteln\0"
-	            "F7 ..... Scroll Werte anzeigen\0"
-	            "F8 ..... Letzte Animation(F7) abspielen\0"
-	            "F9 ..... Z Ebene eingeben\0"
-	            "F10 ..... Person setzen\0"
-	            "F11 ..... NeoGrab\0"
-	            "F12 ..... Inventar holen\0"
-	            "ALT + F12 Inventar löschen\0"
-	           };
-
-	x = 160;
-	y = 100;
-	str_anz = 14;
-	auto_menu(&x, &y, str_anz, 10, c, 0);
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	for (i = 0; i < str_anz; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-}
-
-void grab() {
-	set_up_screen(DO_SETUP);
-	in ->alter_kb_handler();
-	while (getch() != 'a');
-	in ->neuer_kb_handler(&kbinfo);
-}
-
-void get_room_nr() {
-	short tmp;
-	int16 abfrage;
-	int16 x;
-	int16 y;
-	int16 i;
-	char c[] = {"Bitte Raum Nr eingeben zulässig 0 bis %d\0"
-	            "Ihre Wahl : \0"
-	           };
-	x = 160;
-	y = 100;
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	auto_menu(&x, &y, 2, 10, c, 0);
-	in ->alter_kb_handler();
-	tmp = 0;
-	for (i = 0; i < 2; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i), MAX_RAUM);
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-	if (abfrage != 27) {
-		if (tmp <= MAX_RAUM) {
-			flags.IcmEntry = true;
-			exit_room(-1);
-			_G(spieler).PersonRoomNr[P_CHEWY] = tmp;
-			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			ERROR
-			out->set_palette(pal);
-
-			if (_G(spieler).AkInvent != -1)
-				_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
-			obj->sort();
-
-			if (_G(spieler).AkInvent != -1)
-				_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
-			auto_obj = 0;
-			enter_room(-1);
-			spieler_vector[P_CHEWY].Count = 0;
-			flags.IcmEntry = false;
-		} else
-			BELL
-		}
-	in ->neuer_kb_handler(&kbinfo);
-}
-
-void get_zoom_value() {
-	int16 tmp;
-	int16 abfrage;
-	int16 x;
-	int16 y;
-	int16 i;
-	char c[] = {"Bitte Zoom Faktor eingeben \0"
-	            "Ihre Wahl : \0"
-	           };
-	char c1[] = {"Bitte Zoom Horizont eingeben \0"
-	             "Ihre Wahl : \0"
-	            };
-	x = 160;
-	y = 100;
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	auto_menu(&x, &y, 2, 10, c, 0);
-	in ->alter_kb_handler();
-	for (i = 0; i < 2; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-	tmp = room->room_info->ZoomFak;
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-	if (abfrage != 27) {
-		room->set_zoom(tmp);
-	}
-	x = 160;
-	y = 100;
-	auto_menu(&x, &y, 2, 10, c1, 0);
-	in ->alter_kb_handler();
-	for (i = 0; i < 2; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-	tmp = _G(zoom_horizont);
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-	if (abfrage != 27) {
-		_G(zoom_horizont) = tmp;
-	}
-	in ->neuer_kb_handler(&kbinfo);
-}
-
-void room_info() {
-	int16 str_anz;
-	int16 x, y;
-	int16 i;
-	int16 value[255];
-	char c[] = {" Allgemeine Raum Info \0"
-	            "Ged Seiten Anzahl : %d\0"
-	            "Auto Objekte : %d\0"
-	            "Zoom Horizont : %d\0"
-	            "Zoom Faktor : %d\0"
-	            "Freie Handles : %d\0"
-	           };
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	x = 160;
-	y = 100;
-	str_anz = 6;
-	value[0] = 0;
-	value[1] = room->GedInfo[room_blk.AkAblage].Ebenen;
-	value[2] = auto_obj;
-	value[3] = _G(zoom_horizont);
-	value[4] = (int16)room->room_info->ZoomFak;
-	value[5] = get_max_handle();
-	auto_menu(&x, &y, str_anz, 10, c, 0);
-	for (i = 0; i < str_anz; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i), value[i]);
-	while (kbinfo.key_code != ESC && kbinfo.key_code != ENTER);
-	while (kbinfo.key_code != 0);
-}
-
-void plot_auto_mov(int16 mode) {
-	int16 i;
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	if (!room->room_info->AutoMovAnz) {
-		out->printxy(0, 0, 255, 0, scr_width, "Kein Auto Mov Punkt vorhanden!!\0");
-
-	} else {
-		for (i = 0; i < room->room_info->AutoMovAnz; i++) {
-			out->box_fill(Rdi->AutoMov[i].X - _G(spieler).scrollx,
-			               Rdi->AutoMov[i].Y - _G(spieler).scrolly,
-			               Rdi->AutoMov[i].X + 10 - _G(spieler).scrollx,
-			               Rdi->AutoMov[i].Y + 13 - _G(spieler).scrolly, 255);
-			out->box(Rdi->AutoMov[i].X + 1 - _G(spieler).scrollx,
-			          Rdi->AutoMov[i].Y + 1 - _G(spieler).scrolly,
-			          Rdi->AutoMov[i].X + 9 - _G(spieler).scrollx,
-			          Rdi->AutoMov[i].Y + 11 - _G(spieler).scrolly, 0);
-			if (Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx > 0 &&
-			        Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx < (319 - 16) &&
-			        Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly > 0 &&
-			        Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly < (199 - 10))
-				out->printxy(Rdi->AutoMov[i].X + 3 - _G(spieler).scrollx,
-				              Rdi->AutoMov[i].Y + 3 - _G(spieler).scrolly, 0, 300, scr_width, "%d\0", i);
-		}
-	}
-	if (!mode) {
-		while (kbinfo.key_code != ESC && kbinfo.key_code != ENTER);
-		while (kbinfo.key_code != 0);
-	}
-}
-
-void go_auto_mov() {
-	int16 tmp;
-	int16 str_anz;
-	int16 i;
-	int16 x, y;
-	int16 abfrage;
-	char c[] = {"Welchen Punkt ansteuern ??\0"
-	            "Ihre Wahl : \0"
-	           };
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	if (!room->room_info->AutoMovAnz) {
-		out->printxy(0, 0, 255, 0, scr_width, "Kein Auto Mov Punkt vorhanden!!\0");
-		BELL
-	} else {
-		str_anz = 2;
-		x = 160;
-		y = 100;
-		auto_menu(&x, &y, str_anz, 10, c, 0);
-		in ->alter_kb_handler();
-		tmp = 0;
-		for (i = 0; i < str_anz; i++)
-			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-		abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]2d\0", &tmp);
-		in ->neuer_kb_handler(&kbinfo);
-		if (abfrage != 27) {
-			if (tmp < room->room_info->AutoMovAnz) {
-				auto_move(tmp, P_CHEWY);
-			} else {
-				out->printxy(0, 0, 255, 0, scr_width, "Nr zu hoch !!\0");
-				BELL
-				g_events->delay(300);
-			}
-		}
-	}
-}
-
-void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2) {
-	int16 ende;
-	int16 ok;
-	int16 *ScrXy;
-	in->rectangle(0, 0, 319, 199);
-	maus_rect_first = false;
-	ScrXy = (int16 *)ablage[room_blk.AkAblage];
-	ende = 0;
-	while (!ende) {
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		if (spr1 != 0)
-			out->sprite_set(spr1, x1 - _G(spieler).scrollx, y1 - _G(spieler).scrolly, 0);
-		if (spr2 != 0)
-			out->sprite_set(spr2, x2 - _G(spieler).scrollx, y2 - _G(spieler).scrolly, 0);
-		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
-		switch (in->get_switch_code()) {
-
-		case ESC:
-			ende = 1;
-			while (kbinfo.key_code != 0);
-			break;
-
-		}
-		if (minfo.button) {
-
-			if (minfo.button == 1 && maus_rect_first == false) {
-				maus_rect_first = true;
-				koordinate[0] = minfo.x + _G(spieler).scrollx;
-				koordinate[1] = minfo.y + _G(spieler).scrolly;
-				ok = 0;
-				while (!ok) {
-					mouse_aktiv = 0;
-					cur_move = 0;
-					out->setze_zeiger(workptr);
-					calc_mouse_scroll(ScrXy[0], ScrXy[1]);
-					out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-					if (spr1 != 0)
-						out->sprite_set(spr1, x1 - _G(spieler).scrollx, y1 - _G(spieler).scrolly, 0);
-					if (spr2 != 0)
-						out->sprite_set(spr2, x2 - _G(spieler).scrollx, y2 - _G(spieler).scrolly, 0);
-					out->printxy(0, 0, 255, 0, 0, "X1 = %4d Y1 = %4d \0", koordinate[0], koordinate[1]);
-					out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset\0", minfo.x, minfo.y);
-					out->printxy(0, 20, 255, 0, 0, "X2 = %4d Y2 = %4d XOff %3d YOff %3d\0",
-					              minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly,
-					              (minfo.x + _G(spieler).scrollx) - koordinate[0],
-					              (minfo.y + _G(spieler).scrolly) - koordinate[1]);
-					out->
-					box(koordinate[0] - _G(spieler).scrollx, koordinate[1] - _G(spieler).scrolly, minfo.x, minfo.y, 255);
-					out->back2screen(workpage);
-					if (minfo.button != 1)
-						ok = 1;
-				}
-			}
-		}
-		maus_rect_first = false;
-		out->printxy(0, 0, 255, 0, 0, "X = %d Y = %d mit scroll Offset",
-			minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
-		out->printxy(0, 10, 255, 0, 0, "X = %d Y = %d ohne scroll Offset", minfo.x, minfo.y);
-		              plot_maus();
-		              out->setze_zeiger(screen0);
-		              out->back2screen(workpage);
-		SHOULD_QUIT_RETURN;
-	}
-}
-
-void plot_maus() {
-	mouse_aktiv = 0;
-	cur_move = 0;
-	out->linie(0, minfo.y, 320, minfo.y, 255);
-	out->linie(minfo.x, 0, minfo.x, 205, 255);
-}
-
-void get_auto_mov() {
-	ani_detail_info *adi;
-	taf_info *dptr;
-	int16 x, y;
-	int16 str_anz, str_anz1, str_anz2;
-	int16 tmp;
-	int16 i;
-	int16 ende;
-	int16 abfrage;
-	int16 *Cxy;
-	int16 Dx, Dy;
-	int16 det_nr;
-	int16 auto_nr;
-	int16 info_flag;
-	short detail_nr;
-	int16 save_flag;
-	int16 ani_wahl;
-	int16 *ScrXy;
-
-	ObjMov detmov;
-	int16 dy;
-	char c[] = {"Detail Nummer eingeben\0"
-	            "Werte zwischen 0 - 31 sind zulässig\0"
-	            "Ihre Wahl : \0"
-	           };
-	char c1[] = {" HELP AUTO MOV PUNKT\0"
-	             "PLUS + MINUS Detail weiterblättern\0"
-	             "TAB Chewy Flip/Flop\0"
-	             "R Rechteck aufziehen\0"
-	             "PAGE_UP/DOWN AutoMov Umschalten\0"
-	             "ENTER AutoMov festsetzen\0"
-	             "Alt+S AutoMov speichern\0"
-	             "N AutoMov neuanlegen\0"
-	             "I Info AN/AUS\0"
-	             "F2 gehezu AutoMov Punkt\0"
-	             "F3 neues Detail wählen\0"
-	             "F4 End Sprite Nummer eingeben\0"
-	            };
-	char c2[] = {"End-Sprite Nummer eingeben wenn Held\0"
-	             "Punkt erreicht hat \0"
-	             "Ihre Wahl : \0"
-	            };
-	save_flag = true;
-	Rdi = det->get_room_detail_info();
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	str_anz = 3;
-	str_anz1 = 12;
-	str_anz2 = 3;
-	det_nr = -1;
-	detail_nr = -1;
-	if (!room->room_info->AutoMovAnz)
-		auto_nr = -1;
-	else
-		auto_nr = 0;
-	info_flag = true;
-
-	ende = 0;
-	load_org();
-	ani_wahl = 0;
-	ScrXy = (int16 *)ablage[room_blk.AkAblage];
-	while (!ende) {
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		if (minfo.button == 1) {
-			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
-			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
-			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
-			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
-			mov->get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_v
-			                    ector[P_CHEWY]);
-			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-			holen
-			spieler_vector[P_CHEWY].DelayCount = 0;
-		}
-		switch (in->get_switch_code()) {
-		case ESC :
-			ende = 1;
-			break;
-
-		case CURSOR_UP:
-			spieler_vector[P_CHEWY].Xypos[1] -= 1;
-			break;
-
-		case CURSOR_DOWN:
-			spieler_vector[P_CHEWY].Xypos[1] += 1;
-			break;
-
-		case CURSOR_LEFT:
-			spieler_vector[P_CHEWY].Xypos[0] -= 1;
-			break;
-
-		case CURSOR_RIGHT:
-			spieler_vector[P_CHEWY].Xypos[0] += 1;
-			break;
-
-		case ALT+CURSOR_LEFT :
-			if (_G(spieler).scrollx > 0)
-				--_G(spieler).scrollx;
-			break;
-
-		case ALT+CURSOR_RIGHT:
-			if ((_G(spieler).scrollx + 320) < ScrXy[0])
-				++_G(spieler).scrollx;
-			break;
-
-		case ALT+CURSOR_UP :
-			if (_G(spieler).scrolly > 0)
-				--_G(spieler).scrolly;
-			break;
-
-		case ALT+CURSOR_DOWN :
-			if ((_G(spieler).scrolly + 200) < ScrXy[1])
-				++_G(spieler).scrolly;
-			break;
-
-		case PLUS:
-			if (ani_wahl != 0) {
-				if (det_nr < adi->end_ani)
-					++det_nr;
-				else
-					det_nr = adi->start_ani;
-				Cxy = dptr->korrektur + (det_nr << 1);
-				Dx = adi->x + Cxy[0];
-				Dy = adi->y + Cxy[1];
-				while (kbinfo.key_code != 0);
-			}
-			break;
-
-		case MINUS:
-			if (ani_wahl != 0) {
-				if (det_nr > adi->start_ani)
-					--det_nr;
-				else
-					det_nr = adi->end_ani;
-				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-				Dx = adi->x + Cxy[0];
-				Dy = adi->y + Cxy[1];
-				while (kbinfo.key_code != 0);
-			}
-			break;
-
-		case R_KEY:
-			if (det_nr != -1)
-				get_rect(dptr->image[det_nr], Dx, Dy,
-				         chewy->image[spieler_vector[P_CHEWY].Phase * 8],
-				         spieler_vector[P_CHEWY].Xypos[0],
-				         spieler_vector[P_CHEWY].Xypos[1]);
-			else
-				get_rect(0, 0, 0, chewy->image[spieler_vector[P_CHEWY].Phase * 8],
-				         spieler_vector[P_CHEWY].Xypos[0],
-				         spieler_vector[P_CHEWY].Xypos[1]);
-			break;
-
-		case I_KEY:
-			info_flag ^= 1;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case TAB:
-			if (person_end_phase[P_CHEWY] == P_LEFT)
-				person_end_phase[P_CHEWY] = P_RIGHT;
-			else
-				person_end_phase[P_CHEWY] = P_LEFT;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case PAGE_UP:
-
-			if (auto_nr < (int16)room->room_info->AutoMovAnz - 1)
-				++auto_nr;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case PAGE_DOWN:
-
-			if (auto_nr > 0)
-				--auto_nr;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case N_KEY:
-			if (room->room_info->AutoMovAnz < MAX_AUTO_MOV) {
-				auto_nr = room->room_info->AutoMovAnz;
-				++room->room_info->AutoMovAnz;
-				Rdi->AutoMov[auto_nr].X =
-				    spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X + _G(spieler).scrollx;
-				Rdi->AutoMov[auto_nr].Y =
-				    spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y + _G(spieler).scrolly;
-			}
-			while (kbinfo.key_code != 0);
-			break;
-
-		case S_KEY + ALT:
-			save_flag = true;
-			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
-			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
-			while (kbinfo.key_code != 0);
-			while (kbinfo.key_code == 0);
-			while (kbinfo.key_code != 0);
-			break;
-
-		case ENTER:
-			save_flag = false;
-			Rdi->AutoMov[auto_nr].X = spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X;
-			Rdi->AutoMov[auto_nr].Y = spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y;
-		case F4_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz2, 10, c2, 0);
-			in ->alter_kb_handler();
-			for (i = 0; i < str_anz2; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c2, i));
-			tmp = (int16)Rdi->AutoMov[auto_nr].SprNr;
-			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			in ->neuer_kb_handler(&kbinfo);
-			if (abfrage != 27) {
-				save_flag = false;
-				Rdi->AutoMov[auto_nr].SprNr = (uint8) tmp;
-			}
-			break;
-
-		case F1_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz1, 10, c1, 0);
-			for (i = 0; i < str_anz1; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-			out->back2screen(workpage);
-			while (kbinfo.key_code != 0);
-			while (kbinfo.key_code == 0);
-			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-			break;
-
-		case F2_KEY:
-			out->setze_zeiger(0);
-			go_auto_mov();
-			break;
-
-		case F3_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			in ->alter_kb_handler();
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			tmp = 0;
-			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			in ->neuer_kb_handler(&kbinfo);
-			if (abfrage != 27) {
-				ani_wahl = 1;
-				adi = det->get_ani_detail(tmp);
-				det_nr = adi->start_ani;
-				dptr = det->get_taf_info();
-				detail_nr = tmp;
-				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-				Dx = adi->x + Cxy[0];
-				Dy = adi->y + Cxy[1];
-			}
-			break;
-
-		}
-		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
-		set_up_screen(NO_SETUP);
-		out->set_fontadr(font6x8);
-		out->set_vorschub(fvorx6x8, fvory6x8);
-		plot_auto_mov(1);
-		if (auto_nr != -1)
-			out->box(Rdi->AutoMov[auto_nr].X - 2 - _G(spieler).scrollx,
-			          Rdi->AutoMov[auto_nr].Y - 2 - _G(spieler).scrolly,
-			          Rdi->AutoMov[auto_nr].X + 12 - _G(spieler).scrollx,
-			          Rdi->AutoMov[auto_nr].Y + 14 - _G(spieler).scrolly, 8);
-		if (det_nr != -1) {
-			if (Adi[det_nr].zoom) {
-
-				dy = adi->y;
-				calc_zoom(dy, (int16)room->room_info->ZoomFak,
-				          _G(spieler).ZoomXy[P_HOWARD][0],
-				          &detmov);
-			} else {
-				detmov.Xzoom = 0;
-				detmov.Yzoom = 0;
-			}
-			out->scale_set(dptr->image[det_nr], Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly,
-			                detmov.Xzoom, detmov.Yzoom, 0);
-		}
-		if (info_flag) {
-			out->printxy(0, 0, 255, 300, scr_width, "MIT OFFSET x = %3d y = %3d",
-				spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_MOV_X, spieler_vector[P_CHEWY].Xypos[1] + CH
-			    _HOT_MOV_Y);
-			out->printxy(0, 10, 255, 300, scr_width, "NORMAL x = %3d y = %3d",
-				spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			out->printxy(0, 20, 255, 300, scr_width, "AUTOPUNKT x = %3d y = %3d", Rdi->AutoMov[auto_nr].X, Rdi->AutoMov[auto_nr].Y);
-			out->printxy(0, 30, 255, 300, scr_width, "DETAIL NUMMER %d", detail_nr);
-		}
-		cur->plot_cur();
-		out->back2screen(workpage);
-		SHOULD_QUIT_RETURN;
-	}
-	if (save_flag == false) {
-		x = 160;
-		y = 100;
-		str_anz1 = 2;
-		out->setze_zeiger(0);
-		auto_menu(&x, &y, str_anz1, 10, no_sav, 0);
-		for (i = 0; i < str_anz1; i++)
-			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
-		if (ja_nein() == J_KEY) {
-			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
-			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
-		}
-	}
-
-}
-
-void get_scroll_val() {
-	out->setze_zeiger(0);
-	out->printxy(0, 0, 255, 300, scr_width, "SCROLL X = %3d ", _G(spieler).scrollx);
-	out->printxy(0, 10, 255, 300, scr_width, "SCROLL Y = %3d ", _G(spieler).scrolly);
-	while (in->get_switch_code() != ESC);
-}
-
-void play_last_ani(int16 nr) {
-}
-
-void set_z_ebene() {
-#define ANI_DETAIL 1
-#define STATIC_DETAIL 2
-#define INVENT_DETAIL 3
-	static_detail_info *sdi;
-	ani_detail_info *adi;
-	taf_info *dptr;
-	int16 ende;
-	int16 x, y;
-	int16 lx, ly;
-	int16 str_anz, str_anz1;
-	int16 info_flag;
-	int16 i;
-	int16 tmp;
-	int16 abfrage;
-	int16 det_nr;
-	int16 detail_nr;
-	int16 *Cxy;
-	int16 Dx, Dy;
-	int16 *xy;
-	int16 detail_flag;
-	int16 plot_flag;
-	short save_flag;
-	int16 *ScrXy;
-	int16 dy;
-	char *image;
-	ObjMov detmov;
-	char c[] = {"Detail Nummer eingeben\0"
-	            "Werte zwischen 0 - 32 sind zulässig\0"
-	            "Ihre Wahl : \0"
-	           };
-	char c1[] = {" HELP Z-EBENE\0"
-	             "I Info AN/AUS\0"
-	             "P Detail nicht zeichnen\0"
-	             "TAB Chewy Flip/Flop\0"
-	             "CURSOR + ALT Z-Linie verschieben\0"
-	             "F2 neues Ani Detail wählen\0"
-	             "F3 neues Static Detail wählen\0"
-	             "F4 Inventar wählen\0"
-	             "PLUS + MINUS Ani Detail weiterblättern\0"
-	             "Alt+S Z-Ebenen speichern\0"
-	             "ENTER Z-Ebene festsetzen\0"
-	            };
-	save_flag = true;
-	str_anz1 = 11;
-	str_anz = 3;
-	ende = 0;
-	lx = 0;
-	ly = 1;
-	det_nr = -1;
-	detail_nr = -1;
-	detail_flag = false;
-
-	info_flag = true;
-	plot_flag = true;
-	load_org();
-	ScrXy = (int16 *)ablage[room_blk.AkAblage];
-	while (!ende) {
-		if (minfo.button == 1) {
-			spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
-			Bewegungs
-			spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
-			spieler_mi[P_CHEWY].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
-			spieler_mi[P_CHEWY].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
-			mov->
-			get_mov_vector(spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub,
-				&spieler_vector[P_CHEWY]);
-			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-			spieler_vector[P_CHEWY].DelayCount = 0;
-		}
-		switch (in->get_switch_code()) {
-		case I_KEY:
-			info_flag ^= 1;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case P_KEY:
-			plot_flag ^= 1;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case ESC :
-			ende = 1;
-			break;
-
-		case PAGE_UP:
-			if (detail_flag == STATIC_DETAIL) {
-				if (detail_nr < MAXDETAILS - 1) {
-					++detail_nr;
-					sdi = &Rdi->Sinfo[detail_nr];
-					det_nr = sdi->SprNr;
-					if (det_nr != -1) {
-						ly = sdi->z_ebene;
-						dptr = det->get_taf_info();
-						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-						Dx = sdi->x;
-						Dy = sdi->y;
-						image = dptr->image[det_nr];
-					}
-				}
-			} else if (detail_flag == ANI_DETAIL) {
-				if (detail_nr < MAXDETAILS - 1) {
-					++detail_nr;
-					adi = &Rdi->Ainfo[detail_nr];
-					det_nr = adi->start_ani;
-					if (det_nr != -1) {
-						ly = adi->z_ebene;
-						dptr = det->get_taf_info();
-						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-						Dx = adi->x + Cxy[0];
-						Dy = adi->y + Cxy[1];
-						image = dptr->image[det_nr];
-					}
-				}
-			} else if (detail_flag == INVENT_DETAIL) {
-				if (detail_nr < obj->mov_obj_room[0] - 1) {
-					++detail_nr;
-					det_nr = obj->mov_obj_room[detail_nr + 1];
-					image = inv_spr[det_nr];
-					Dx = _G(spieler).room_m_obj[det_nr].X;
-					Dy = _G(spieler).room_m_obj[det_nr].Y;
-					ly = _G(spieler).room_m_obj[det_nr].ZEbene;
-				}
-			}
-			while (kbinfo.key_code != 0);
-			break;
-
-		case PAGE_DOWN:
-			if (detail_flag == STATIC_DETAIL) {
-				if (detail_nr > 0) {
-					--detail_nr;
-					sdi = &Rdi->Sinfo[detail_nr];
-					det_nr = sdi->SprNr;
-					if (det_nr != -1) {
-						ly = sdi->z_ebene;
-						dptr = det->get_taf_info();
-						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-						Dx = sdi->x;
-						Dy = sdi->y;
-						image = dptr->image[det_nr];
-					}
-				}
-			} else if (detail_flag == ANI_DETAIL) {
-				if (detail_nr > 0) {
-					--detail_nr;
-					adi = &Rdi->Ainfo[detail_nr];
-					det_nr = adi->start_ani;
-					if (det_nr != -1) {
-						ly = adi->z_ebene;
-						dptr = det->get_taf_info();
-						Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-						Dx = adi->x + Cxy[0];
-						Dy = adi->y + Cxy[1];
-						image = dptr->image[det_nr];
-					}
-				}
-			} else if (detail_flag == INVENT_DETAIL) {
-				if (detail_nr > 0) {
-					--detail_nr;
-					det_nr = obj->mov_obj_room[detail_nr + 1];
-					image = inv_spr[det_nr];
-					Dx = _G(spieler).room_m_obj[det_nr].X;
-					Dy = _G(spieler).room_m_obj[det_nr].Y;
-					ly = _G(spieler).room_m_obj[det_nr].ZEbene;
-				}
-			}
-			while (kbinfo.key_code != 0);
-			break;
-
-		case CURSOR_UP:
-			spieler_vector[P_CHEWY].Xypos[1] -= 1;
-			break;
-
-		case CURSOR_DOWN:
-			spieler_vector[P_CHEWY].Xypos[1] += 1;
-			break;
-
-		case CURSOR_LEFT:
-			spieler_vector[P_CHEWY].Xypos[0] -= 1;
-			break;
-
-		case CURSOR_RIGHT:
-			spieler_vector[P_CHEWY].Xypos[0] += 1;
-			break;
-
-		case CURSOR_UP + ALT:
-			if (ly > 0)
-				--ly;
-			break;
-
-		case CURSOR_DOWN + ALT:
-
-			++ly;
-			break;
-
-		case TAB:
-			if (person_end_phase[P_CHEWY] == P_LEFT)
-				person_end_phase[P_CHEWY] = P_RIGHT;
-			else
-				person_end_phase[P_CHEWY] = P_LEFT;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case PLUS:
-			if (detail_flag == ANI_DETAIL) {
-				if (det_nr < adi->end_ani)
-					++det_nr;
-				else
-					det_nr = adi->start_ani;
-				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-				Dx = adi->x + Cxy[0];
-				Dy = adi->y + Cxy[1];
-				image = dptr->image[det_nr];
-				if (adi->zoom) {
-					dy = adi->y;
-					calc_zoom(dy, (int16)room->room_info->ZoomFak,
-					          (int16)room->room_info->ZoomFak, &detmov);
-				} else {
-					detmov.Xzoom = 0;
-					detmov.Yzoom = 0;
-				}
-				while (kbinfo.key_code != 0);
-			}
-			break;
-
-		case MINUS:
-			if (detail_flag == ANI_DETAIL) {
-				if (det_nr > adi->start_ani)
-					--det_nr;
-				else
-					det_nr = adi->end_ani;
-				Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-				Dx = adi->x + Cxy[0];
-				Dy = adi->y + Cxy[1];
-				image = dptr->image[det_nr];
-				if (adi->zoom) {
-					dy = adi->y;
-					calc_zoom(dy, (int16)room->room_info->ZoomFak,
-					          (int16)room->room_info->ZoomFak, &detmov);
-				} else {
-					detmov.Xzoom = 0;
-					detmov.Yzoom = 0;
-				}
-				while (kbinfo.key_code != 0);
-			}
-			break;
-
-		case S_KEY + ALT:
-			save_flag = true;
-			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
-
-			save_iib(INVENTAR_IIB);
-			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
-			while (kbinfo.key_code != 0);
-			while (kbinfo.key_code == 0);
-			while (kbinfo.key_code != 0);
-			break;
-
-		case ENTER:
-			save_flag = false;
-			if (detail_flag == ANI_DETAIL) {
-				adi->z_ebene = ly;
-			} else if (detail_flag == STATIC_DETAIL) {
-				sdi->z_ebene = ly;
-			} else if (detail_flag == INVENT_DETAIL) {
-				_G(spieler).room_m_obj[det_nr].ZEbene = ly;
-			}
-			break;
-
-		case F1_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz1, 10, c1, 0);
-			for (i = 0; i < str_anz1; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-			out->back2screen(workpage);
-			while (kbinfo.key_code != 0);
-			while (kbinfo.key_code == 0);
-			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-			break;
-
-		case F2_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			in ->alter_kb_handler();
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			tmp = 0;
-			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			in ->neuer_kb_handler(&kbinfo);
-			if (abfrage != 27) {
-				detail_nr = tmp;
-				detail_flag = ANI_DETAIL;
-				adi = det->get_ani_detail(tmp);
-				det_nr = adi->start_ani;
-				if (det_nr != -1) {
-					ly = adi->z_ebene;
-					dptr = det->get_taf_info();
-					Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-					Dx = adi->x + Cxy[0];
-					Dy = adi->y + Cxy[1];
-					image = dptr->image[det_nr];
-					if (adi->zoom) {
-						dy = adi->y ;
-						calc_zoom(dy, (int16)room->room_info->ZoomFak,
-						          (int16)room->room_info->ZoomFak, &detmov);
-					} else {
-						detmov.Xzoom = 0;
-						detmov.Yzoom = 0;
-					}
-				}
-			}
-			break;
-
-		case F3_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			in ->alter_kb_handler();
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			tmp = 0;
-			abfrage = out->scanxy(x + 72, y + 20, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			in ->neuer_kb_handler(&kbinfo);
-			if (abfrage != 27) {
-				detail_flag = STATIC_DETAIL;
-				detail_nr = tmp;
-				sdi = &Rdi->Sinfo[tmp];
-				det_nr = sdi->SprNr;
-				if (det_nr != -1) {
-					detmov.Xzoom = 0;
-					detmov.Yzoom = 0;
-					ly = sdi->z_ebene;
-					dptr = det->get_taf_info();
-					Cxy = (int16 *)dptr->korrektur + (det_nr << 1);
-					Dx = sdi->x;
-					Dy = sdi->y;
-					image = dptr->image[det_nr];
-				}
-			}
-			break;
-
-		case F4_KEY:
-			if (obj->mov_obj_room[0] != 0) {
-				detail_flag = INVENT_DETAIL;
-				detail_nr = 0;
-				det_nr = obj->mov_obj_room[detail_nr + 1];
-				image = inv_spr[det_nr];
-				Dx = _G(spieler).room_m_obj[det_nr].X;
-				Dy = _G(spieler).room_m_obj[det_nr].Y;
-				ly = _G(spieler).room_m_obj[det_nr].ZEbene;
-			} else {
-				out->setze_zeiger(0);
-				out->printxy(0, 190, 0, 255, scr_width, " Kein Inventar vorhanden ...\0");
-				while (kbinfo.key_code != 0);
-			}
-			break;
-
-		}
-		calc_mouse_scroll(ScrXy[0], ScrXy[1]);
-		set_up_screen(NO_SETUP);
-		if (det_nr != -1 && plot_flag) {
-			out->scale_set(image, Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly,
-			                detmov.Xzoom, detmov.Yzoom, 0);
-
-			xy = (int16 *)image;
-			out->
-			box(Dx - _G(spieler).scrollx, Dy - _G(spieler).scrolly, Dx + xy[0] - _G(spieler).scrollx, Dy + xy[1] - _G(spieler).scro
-			    lly, 255);
-		}
-		out->set_fontadr(font6x8);
-		out->set_vorschub(fvorx6x8, fvory6x8);
-		out->linie(lx, ly - _G(spieler).scrolly, lx + 320, ly - _G(spieler).scrolly, 255);
-		if (info_flag) {
-			out->printxy(0, 0, 255, 300, scr_width, "CHEWY Z_EBENE %d LINIE Z_EBENE %d",
-				spieler_vector[P_CHEWY].Xypos[1] + CH_HOT_MOV_Y - abs(spieler_vector[P_CHEWY].Yzoom), l y);
-			if (detail_flag == ANI_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "ANI DETAIL NUMMER %d", detail_nr);
-			if (detail_flag == STATIC_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "STATIC DETAIL NUMMER %d", detail_nr);
-			if (detail_flag == INVENT_DETAIL)
-				out->printxy(0, 10, 255, 300, scr_width, "INVENTAR NUMMER %d", detail_nr);
-		}
-		cur->plot_cur();
-		out->back2screen(workpage);
-		SHOULD_QUIT_RETURN;
-	}
-	if (save_flag == false) {
-		x = 160;
-		y = 100;
-		str_anz1 = 2;
-		out->setze_zeiger(0);
-		auto_menu(&x, &y, str_anz1, 10, no_sav, 0);
-		for (i = 0; i < str_anz1; i++)
-			out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(no_sav, i));
-		if (ja_nein() == J_KEY) {
-			det->save_detail(DETAILTEST, _G(spieler).PersonRoomNr[P_CHEWY]);
-			save_iib(INVENTAR_IIB);
-			out->printxy(0, 190, 0, 255, scr_width, " Save ...\0");
-		}
-	}
-}
-
-int16 ja_nein() {
-	int16 ende;
-	int16 ret;
-	ende = 0;
-	while (in->get_switch_code());
-	while (!ende) {
-		switch (in->get_switch_code()) {
-		case ESC:
-			ret = false;
-			ende = 1;
-			break;
-
-		case J_KEY:
-			ret = kbinfo.scan_code;
-			ende = 1;
-			break;
-
-		case N_KEY:
-			ret = kbinfo.scan_code;
-			ende = 1;
-			break;
-
-		default:
-			break;
-		}
-		SHOULD_QUIT_RETURN;
-	}
-	return ret;
-}
-
-void save_iib(char *fname) {
-	Stream *handle;
-	modul = 0;
-	fcode = 0;
-	handle = chewy_fopen(fname, "rb+");
-	if (handle) {
-		if (!chewy_fread(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
-			fcode = READFEHLER;
-			moduchewy_freadATEI;
-		} else if (!strnicmp(iib_datei_header.Id, "IIB", 3)) {
-			chewy_fclose(handle);
-			handle = chewy_fopen(fname, "wb+");
-			if (handle) {
-				iib_datei_header.Size = (uint32)(sizeof(RoomMovObjekt) * MAX_MOV_OBJ);
-				if (!chewy_fwrite(&iib_datei_header, sizeof(IibDateiHeader), 1, handle)) {
-					modul = DATEI;
-					fcode = WRITEFEHLER;
-				} else if (!chewy_fwrite(_G(spieler).room_m_obj, sizeof(RoomMovObjekt)*MAX_MOV_OBJ, 1, handle)) {
-					modul = DATEI;
-					fcode = WRITEFEHLER;
-				}
-			}
-		}
-		chewy_fclose(handle);
-	}
-}
-
-void load_org() {
-	int16 i;
-	det->load_rdi(room_blk.DetFile, _G(spieler).PersonRoomNr[P_CHEWY]);
-	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
-	ERROR
-	obj->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
-	ERROR
-	obj->sort();
-	for (i = 0; i < MAX_MOV_OBJ; i++) {
-		_G(spieler).InventSlot[i] = -1;
-	}
-	for (i = 0; i < obj->spieler_invnr[0]; i++)
-		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
-	obj->calc_all_static_detail();
-}
-
-void calc_mouse_scroll(int16 scrx, int16 scry) {
-	if (minfo.x > 319 - (curblk.xsize + 20)) {
-		if ((_G(spieler).scrollx + 320) < scrx)
-			++_G(spieler).scrollx;
-	}
-	if (minfo.x < 10) {
-		if (_G(spieler).scrollx > 0)
-			--_G(spieler).scrollx;
-	}
-	if (minfo.y > 199 - (curblk.ysize + 10)) {
-		if ((_G(spieler).scrolly + 200) < scry)
-			++_G(spieler).scrolly;
-	}
-	if (minfo.y < 10) {
-		if (_G(spieler).scrolly > 0)
-			--_G(spieler).scrolly;
-	}
-}
-
-void set_person() {
-	int16 ende;
-	int16 x, y;
-	int16 str_anz;
-	int16 tmp;
-	int16 info_flag;
-	int16 i;
-	int16 abfrage;
-	void (*TmpSetUpScreenFunc)(void);
-	char c[] = {" HELP PERSON setzen\0"
-	            "F2 Person wählen\0"
-	            "F3 Zoomwerte eingeben\0"
-	            "I Info AN/AUS\0"
-	           };
-	char c1[] = {"Bitte Zoom Faktor eingeben \0"
-	             "X Zoom : \0"
-	            };
-	char c2[] = {"Bitte Zoom Faktor eingeben \0"
-	             "Y Zoom : \0"
-	            };
-	char c3[] = {"Bitte Zoom Horizont eingeben \0"
-	             "Ihre Wahl : \0"
-	            };
-	char c4[] = {"Person Nummer eingeben\0"
-	             "Ihre Wahl : \0"
-	            };
-	str_anz = 4;
-	ende = 0;
-	info_flag = true;
-	TmpSetUpScreenFunc = SetUpScreenFunc;
-	SetUpScreenFunc = 0;
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	_G(spieler).ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
-	_G(spieler).ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
-	while (!ende) {
-		if (minfo.button == 1) {
-			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
-			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
-			spieler_mi[p_nr].XyzEnd[0] = minfo.x - CH_HOT_MOV_X + _G(spieler).scrollx;
-			spieler_mi[p_nr].XyzEnd[1] = minfo.y - CH_HOT_MOV_Y + _G(spieler).scrolly;
-			mov->
-			get_mov_vector(spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]
-			              );
-			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
-			spieler_vector[p_nr].DelayCount = 0;
-		}
-		switch (in->get_switch_code()) {
-		case I_KEY:
-			info_flag ^= 1;
-			while (kbinfo.key_code != 0);
-			break;
-
-		case F1_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			out->back2screen(workpage);
-			while (kbinfo.key_code != 0);
-			while (kbinfo.key_code == 0);
-			while (kbinfo.key_code != 0);
-			out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-			break;
-
-		case F2_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, 2, 10, c, 0);
-			in ->alter_kb_handler();
-			tmp = p_nr;
-			for (i = 0; i < 2; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c4, i));
-			abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			if (abfrage != 27) {
-				p_nr = tmp;
-			}
-			in->neuer_kb_handler(&kbinfo);
-			break;
-
-		case F3_KEY:
-			out->setze_zeiger(0);
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, 2, 10, c, 0);
-			in ->alter_kb_handler();
-			if (p_nr == P_CHEWY) {
-				for (i = 0; i < 2; i++)
-					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-				tmp = room->room_info->ZoomFak;
-				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-				if (abfrage != 27) {
-					room->set_zoom(tmp);
-					_G(spieler).ZoomXy[P_CHEWY][0] = room->room_info->ZoomFak;
-					_G(spieler).ZoomXy[P_CHEWY][1] = room->room_info->ZoomFak;
-				}
-			} else {
-				for (i = 0; i < 2; i++)
-					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c1, i));
-				tmp = _G(spieler).ZoomXy[p_nr][0];
-				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-				if (abfrage != 27) {
-					_G(spieler).ZoomXy[p_nr][0] = tmp;
-				}
-				for (i = 0; i < 2; i++)
-					out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c2, i));
-				tmp = _G(spieler).ZoomXy[p_nr][1];
-				abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-				if (abfrage != 27) {
-					_G(spieler).ZoomXy[p_nr][1] = tmp;
-				}
-			}
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, 2, 10, c1, 0);
-			for (i = 0; i < 2; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c3, i));
-			tmp = _G(zoom_horizont);
-			abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp);
-			if (abfrage != 27) {
-				_G(zoom_horizont) = tmp;
-			}
-			in->neuer_kb_handler(&kbinfo);
-			break;
-
-		case ESC:
-			ende = 1;
-			break;
-
-		case CURSOR_UP:
-			spieler_vector[p_nr].Xypos[1] -= 1;
-			break;
-
-		case CURSOR_DOWN:
-			spieler_vector[p_nr].Xypos[1] += 1;
-			break;
-
-		case CURSOR_LEFT:
-			spieler_vector[p_nr].Xypos[0] -= 1;
-			break;
-
-		case CURSOR_RIGHT:
-			spieler_vector[p_nr].Xypos[0] += 1;
-			break;
-
-		}
-		set_up_screen(NO_SETUP);
-		out->set_fontadr(font6x8);
-		out->set_vorschub(fvorx6x8, fvory6x8);
-		if (info_flag) {
-			out->printxy(0, 0, 255, 300, scr_width, "Person x %d Person y %d", spieler_vector[p_nr].Xypos[0], spieler_vector[p_nr].Xypos[1]);
-			out->printxy(0, 10, 255, 300, scr_width, "Zoomx %d Zoomy %d", _G(spieler).ZoomXy[p_nr][0], _G(spieler).ZoomXy[p_nr][1]);
-			out->printxy(0, 20, 255, 300, scr_width, "ZoomHorizont %d", _G(zoom_horizont));
-			out->printxy(0, 30, 255, 300, scr_width, "AK-Zoomx %d AK-Zoomy %d", spieler_vector[p_nr].Xzoom, spieler_vector[p_nr].Yzoom);
-
-		}
-		cur->plot_cur();
-		out->back2screen(workpage);
-		SHOULD_QUIT_RETURN;
-	}
-	SetUpScreenFunc = TmpSetUpScreenFunc;
-}
-
-void get_inv() {
-	int16 x, y;
-	int16 abfrage;
-	int16 i;
-	int16 tmp;
-	char c[] = {" INVENTAR holen n\0"
-	            "Ihre Wahl :\0"
-	           };
-	out->setze_zeiger(0);
-	x = 160;
-	y = 100;
-	auto_menu(&x, &y, 2, 10, c, 0);
-	in ->alter_kb_handler();
-	tmp = 0;
-	for (i = 0; i < 2; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " %[0 - 9]3d\0", &tmp);
-	if (abfrage != 27)
-	{
-		invent_2_slot(tmp);
-	}
-	in->neuer_kb_handler(&kbinfo);
-}
-
-void del_inv() {
-	int16 x, y;
-	int16 abfrage;
-	int16 i;
-	int16 tmp;
-	char c[] = {" INVENTAR löschen n\0"
-	            "Ihre Wahl :\0"
-	           };
-	out->setze_zeiger(0);
-	x = 160;
-	y = 100;
-	auto_menu(&x, &y, 2, 10, c, 0);
-	in ->alter_kb_handler();
-	tmp = 0;
-	for (i = 0; i < 2; i++)
-		out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-	abfrage = out->scanxy(x + 72, y + 10, 14, 60, 6, scr_width, " %[0 - 9]3d\0", &tmp);
-	if (abfrage != 27)
-	{
-		del_invent_slot(tmp);
-	}
-	in->neuer_kb_handler(&kbinfo);
-}
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/ch_icm.h b/engines/chewy/ch_icm.h
deleted file mode 100644
index 3a9af55ee3a..00000000000
--- a/engines/chewy/ch_icm.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_CHICM_H
-#define CHEWY_CHICM_H
-
-namespace Chewy {
-
-void set_person();
-
-void draw_ice_win();
-
-void get_room_nr();
-
-void room_info();
-
-void plot_auto_mov(int16 mode);
-
-void go_auto_mov();
-
-void get_rect(char *spr1, int16 x1, int16 y1, char *spr2, int16 x2, int16 y2);
-void plot_maus();
-void plot_rect();
-
-void get_auto_mov();
-void start_detail();
-void play_last_ani(int16 nr);
-
-void set_z_ebene();
-void get_phase(ObjMov *om, MovInfo *mi);
-
-void save_iib(char *fname);
-
-int16 ja_nein();
-
-void load_org();
-
-void calc_mouse_scroll(int16 scrx, int16 scry);
-void get_scroll_val();
-
-void get_zoom_value();
-
-IibDateiHeader iib_datei_header;
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index fda9b26f9da..261e4746101 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -3,7 +3,6 @@ MODULE := engines/chewy
 MODULE_OBJS = \
 	ailclass.o \
 	atds.o \
-	ch_icm.o \
 	chewy.o \
 	cursor.o \
 	datei.o \


Commit: b70f984db4f8aa8dbc53fe72c626fca832c0c232
    https://github.com/scummvm/scummvm/commit/b70f984db4f8aa8dbc53fe72c626fca832c0c232
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:52-08:00

Commit Message:
CHEWY: rename source file maus -> mouse

Changed paths:
  A engines/chewy/mouse.cpp
  A engines/chewy/mouse.h
  R engines/chewy/maus.cpp
  R engines/chewy/maus.h
    engines/chewy/cursor.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.h
    engines/chewy/module.mk
    engines/chewy/ngshext.h


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 7d58bfabc8f..8c754426b3b 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -49,7 +49,7 @@ cursor::~cursor() {
 void cursor::plot_cur() {
 	if (maus_da && sichtbar) {
 		if (cur_move == 1) {
-			mouse_aktiv = 1;
+			mouse_active = 1;
 			cur_move = 0;
 			if (!curblk->no_back) {
 
@@ -74,14 +74,14 @@ void cursor::plot_cur() {
 
 		out->sprite_set(curblk->sprite[ani_count], cur_x_old, cur_y_old,
 		                 scr_width);
-		mouse_aktiv = 0;
+		mouse_active = 0;
 	}
 }
 
 void cursor::show_cur() {
 	if ((maus_da) && (!sichtbar)) {
 		sichtbar = true;
-		mouse_aktiv = 1;
+		mouse_active = 1;
 
 		minfo->x = g_events->_mousePos.x;
 		minfo->y = g_events->_mousePos.y;
@@ -116,7 +116,7 @@ void cursor::set_cur_ani(cur_ani *ani1) {
 
 void cursor::move(int16 x, int16 y) {
 	if (maus_da) {
-		mouse_aktiv = 1;
+		mouse_active = 1;
 
 		minfo->x = x;
 		minfo->y = y;
@@ -127,7 +127,7 @@ void cursor::move(int16 x, int16 y) {
 			cur_move = 1;
 		else
 			cur_move = 0;
-		mouse_aktiv = 0;
+		mouse_active = 0;
 	}
 }
 
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 955d59b8a2b..326eb8d7095 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -22,7 +22,7 @@
 #ifndef CHEWY_MCGA_H
 #define CHEWY_MCGA_H
 
-#include "chewy/maus.h"
+#include "chewy/mouse.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index 8d886411f5a..e8b3f01e6d4 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -23,7 +23,7 @@
 #define CHEWY_MCGA_GRAFIK_H
 
 #include "graphics/screen.h"
-#include "chewy/maus.h"
+#include "chewy/mouse.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 261e4746101..e6f4bf52c1c 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -22,7 +22,7 @@ MODULE_OBJS = \
 	m_event.o \
 	main.o \
 	main_menu.o \
-	maus.o \
+	mouse.o \
 	mcga.o \
 	mcga_grafik.o \
 	memory.o \
diff --git a/engines/chewy/maus.cpp b/engines/chewy/mouse.cpp
similarity index 98%
rename from engines/chewy/maus.cpp
rename to engines/chewy/mouse.cpp
index 2879b5cb1de..0a3e470d385 100644
--- a/engines/chewy/maus.cpp
+++ b/engines/chewy/mouse.cpp
@@ -20,14 +20,14 @@
  */
 
 #include "common/textconsole.h"
-#include "chewy/maus.h"
+#include "chewy/mouse.h"
 #include "chewy/events.h"
 
 namespace Chewy {
 
 // FIXME. Externals
 uint8 mouse_links_los;
-uint8 mouse_aktiv;
+uint8 mouse_active;
 
 uint8 jflag;
 int16 xdiff;
diff --git a/engines/chewy/maus.h b/engines/chewy/mouse.h
similarity index 96%
rename from engines/chewy/maus.h
rename to engines/chewy/mouse.h
index bd53efdce86..882845eb6e8 100644
--- a/engines/chewy/maus.h
+++ b/engines/chewy/mouse.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_MAUS_H
-#define CHEWY_MAUS_H
+#ifndef CHEWY_MOUSE_H
+#define CHEWY_MOUSE_H
 
 #include "chewy/ngstypes.h"
 
@@ -38,7 +38,7 @@ extern uint8 mouse_on;
 extern int16 mouse_button;
 extern uint8 mouse_links;
 extern uint8 mouse_links_los;
-extern uint8 mouse_aktiv;
+extern uint8 mouse_active;
 extern uint8 cur_move;
 extern uint8 mouse_hor;
 extern uint8 mouse_ver;
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 881e1889389..63910ca1f96 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -25,7 +25,7 @@
 #include "chewy/memory.h"
 #include "chewy/mcga.h"
 #include "chewy/fehler.h"
-#include "chewy/maus.h"
+#include "chewy/mouse.h"
 
 #include "chewy/io_game.h"
 #include "chewy/cursor.h"


Commit: c545c36c438202cb01768e67c9f4ee2e5541e0c2
    https://github.com/scummvm/scummvm/commit/c545c36c438202cb01768e67c9f4ee2e5541e0c2
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:53-08:00

Commit Message:
CHEWY: mouse - remove some unused extern, reduce some variable scopes, turn some uint8 to boolean

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/cursor.cpp
    engines/chewy/events.cpp
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 1e9ae8a7365..5205968e9d6 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -28,7 +28,6 @@
 
 namespace Chewy {
 
-extern char *err_str;
 int16 mouse_push;
 int print_delay_count1;
 
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 8c754426b3b..2a30e31c6b6 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -19,7 +19,6 @@
  *
  */
 
-#include "common/textconsole.h"
 #include "chewy/cursor.h"
 #include "chewy/events.h"
 
@@ -48,9 +47,9 @@ cursor::~cursor() {
 
 void cursor::plot_cur() {
 	if (maus_da && sichtbar) {
-		if (cur_move == 1) {
-			mouse_active = 1;
-			cur_move = 0;
+		if (cur_move) {
+			mouse_active = true;
+			cur_move = false;
 			if (!curblk->no_back) {
 
 				out->blockcopy(curblk->cur_back, cur_x_old, cur_y_old, scr_width);
@@ -74,14 +73,14 @@ void cursor::plot_cur() {
 
 		out->sprite_set(curblk->sprite[ani_count], cur_x_old, cur_y_old,
 		                 scr_width);
-		mouse_active = 0;
+		mouse_active = false;
 	}
 }
 
 void cursor::show_cur() {
 	if ((maus_da) && (!sichtbar)) {
 		sichtbar = true;
-		mouse_active = 1;
+		mouse_active = true;
 
 		minfo->x = g_events->_mousePos.x;
 		minfo->y = g_events->_mousePos.y;
@@ -94,7 +93,7 @@ void cursor::show_cur() {
 
 		cur_x_old = (minfo->x + curblk->page_off_x);
 		cur_y_old = (minfo->y + curblk->page_off_y);
-		cur_move = 1;
+		cur_move = true;
 		plot_cur();
 	}
 }
@@ -116,18 +115,18 @@ void cursor::set_cur_ani(cur_ani *ani1) {
 
 void cursor::move(int16 x, int16 y) {
 	if (maus_da) {
-		mouse_active = 1;
+		mouse_active = true;
 
 		minfo->x = x;
 		minfo->y = y;
 		cur_x_old = (minfo->x + curblk->page_off_x);
 		cur_y_old = (minfo->y + curblk->page_off_y);
 		in->move_mouse(x, y);
-		if (sichtbar == true)
-			cur_move = 1;
+		if (sichtbar)
+			cur_move = true;
 		else
-			cur_move = 0;
-		mouse_active = 0;
+			cur_move = false;
+		mouse_active = false;
 	}
 }
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 4c9cdd3fd06..0b6963ed69b 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -110,8 +110,8 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 	}
 
 	// Set mouse position
-	if (cur_move != 1) {
-		cur_move = 1;
+	if (!cur_move) {
+		cur_move = true;
 		minfo.x = event.mouse.x;
 		minfo.y = event.mouse.y;
 	}
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 58ed1e10445..7f2be108840 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -77,9 +77,7 @@ void standard_init() {
 	curani.ani_anf = 0;
 	curani.ani_end = 0;
 	curani.delay = 0;
-	mouse_hot_x = 0;
-	mouse_hot_y = 0;
-
+	
 	cur = new cursor(out, in, &curblk);
 	cur->set_cur_ani(&curani);
 
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 8d94e019860..395eb1e8813 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -173,8 +173,8 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					if (y < (max_scroll)) {
 
 						if (y + scroll_flag != i) {
-							mouse_links_los = 0;
-							cur_move = 1;
+							mouse_links_los = false;
+							cur_move = true;
 							cur->hide_cur();
 
 							if (io_flag != 0)
@@ -186,15 +186,13 @@ int16 io_game::io_menu(iog_init *iostruc) {
 							if (io_flag != 0)
 								mark_eintrag(cur_y, i);
 							cur->show_cur();
-						} else {
-							if (mouse_links_los == 1) {
-								mouse_links_los = 0;
-								dklick_end = g_system->getMillis(); //clock();
-								if ((dklick_end - dklick_start) / 1000 < d_klick)
-									kbinfo->key_code = 28;
-								else
-									dklick_start = g_system->getMillis(); //clock();
-							}
+						} else if (mouse_links_los) {
+							mouse_links_los = false;
+							dklick_end = g_system->getMillis(); //clock();
+							if ((dklick_end - dklick_start) / 1000 < d_klick)
+								kbinfo->key_code = 28;
+							else
+								dklick_start = g_system->getMillis(); //clock();
 						}
 					}
 				} else {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 522c3ebc23b..e2563627f1a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -142,13 +142,9 @@ void free_buffers() {
 }
 
 void cursor_wahl(int16 nr) {
-	int16 ok;
-	int16 *xy;
-	ok = true;
+	int16 ok = true;
 	if (nr != CUR_USER) {
 		curblk.sprite = curtaf->image;
-		mouse_hot_x = 0;
-		mouse_hot_y = 0;
 		curani.delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
@@ -263,9 +259,9 @@ void cursor_wahl(int16 nr) {
 	}
 
 	if (ok) {
-		cur_move = 1;
+		cur_move = true;
 		cur->set_cur_ani(&curani);
-		xy = (int16 *)curblk.sprite[curani.ani_anf];
+		int16 *xy = (int16 *)curblk.sprite[curani.ani_anf];
 		_G(spieler).CurBreite = xy[0];
 		_G(spieler).CurHoehe = xy[1];
 		in->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 0a3e470d385..286cf4a20a4 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -26,21 +26,11 @@
 namespace Chewy {
 
 // FIXME. Externals
-uint8 mouse_links_los;
-uint8 mouse_active;
-
-uint8 jflag;
-int16 xdiff;
-int16 ydiff;
-int16 eck1x;
-int16 eck1y;
-int16 eck2x;
-int16 eck2y;
+bool mouse_links_los;
+bool mouse_active;
 // end of externals
 
-uint8 cur_move;
-uint8 mouse_hot_x;
-uint8 mouse_hot_y;
+bool cur_move;
 
 
 void set_new_kb_handler(kb_info *key) {
@@ -51,10 +41,6 @@ void set_old_kb_handler() {
 	g_events->setKbdInfo(nullptr);
 }
 
-void del_kb_puffer() {
-	g_events->clearEvents();
-}
-
 void set_mouse_handler(maus_info *mpos) {
 	// No implementation in ScummVM
 }
@@ -84,13 +70,10 @@ void maus::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
 	// Mouse clip rectangle isn't supported in ScummVM
 }
 
-int16 maus::maus_vector(int16 x, int16 y, const int16 *tbl,
-                            int16 anz) {
-	int16 i, j;
-	i = -1;
-	for (j = 0; (j < anz * 4) && (i == -1); j += 4) {
-		if ((x >= tbl[j]) && (x <= tbl[j + 2]) &&
-		        (y >= tbl[j + 1]) && (y <= tbl[j + 3]))
+int16 maus::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
+	int16 i = -1;
+	for (int16 j = 0; (j < anz * 4) && (i == -1); j += 4) {
+		if ((x >= tbl[j]) && (x <= tbl[j + 2]) && (y >= tbl[j + 1]) && (y <= tbl[j + 3]))
 			i = j / 4;
 	}
 
@@ -113,10 +96,6 @@ void maus::alter_kb_handler() {
 #endif
 }
 
-void maus::flush_kb_puffer() {
-	del_kb_puffer();
-}
-
 void maus::neuer_maushandler(maus_info *mpos) {
 	set_mouse_handler(mpos);
 	maus_info_blk = mpos;
@@ -130,8 +109,7 @@ in_zeiger *maus::get_in_zeiger() {
 }
 
 int16 maus::get_switch_code() {
-	int16 switch_code;
-	switch_code = 0;
+	int16 switch_code = 0;
 
 	if (maus_info_blk) {
 		if (maus_info_blk->button == 2) {
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 882845eb6e8..7d0740e96a6 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -28,34 +28,12 @@ namespace Chewy {
 
 void set_new_kb_handler(kb_info *key);
 void set_old_kb_handler();
-void del_kb_puffer();
 
 void set_mouse_handler(maus_info *mpos);
 
-extern uint8 new_kb;
-
-extern uint8 mouse_on;
-extern int16 mouse_button;
-extern uint8 mouse_links;
-extern uint8 mouse_links_los;
-extern uint8 mouse_active;
-extern uint8 cur_move;
-extern uint8 mouse_hor;
-extern uint8 mouse_ver;
-extern uint8 mouse_hot_x;
-extern uint8 mouse_hot_y;
-
-extern uint8 jflag;
-extern uint8 joy_code;
-extern uint8 button;
-extern int16 xdiff;
-extern int16 ydiff;
-extern int16 joyx;
-extern int16 joyy;
-extern int16 eck1x;
-extern int16 eck1y;
-extern int16 eck2x;
-extern int16 eck2y;
+extern bool mouse_links_los;
+extern bool mouse_active;
+extern bool cur_move;
 
 extern int16 modul;
 extern int16 fcode;
@@ -71,7 +49,6 @@ public:
 
 	void neuer_kb_handler(kb_info *key);
 	void alter_kb_handler();
-	void flush_kb_puffer();
 
 	void neuer_maushandler(maus_info *mpos);
 	maus_info *maus_info_adr();


Commit: 3e6c3b31f7c512d4739b61a855864abc9082c0cb
    https://github.com/scummvm/scummvm/commit/3e6c3b31f7c512d4739b61a855864abc9082c0cb
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:53-08:00

Commit Message:
CHEWY: Reduce variable scopes in atds, fix some CppCheck warnings

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 5205968e9d6..681f5be3092 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -28,6 +28,7 @@
 
 namespace Chewy {
 
+
 int16 mouse_push;
 int print_delay_count1;
 
@@ -71,7 +72,6 @@ bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 
 
 atdsys::atdsys() {
-	int16 i;
 	SplitStringInit init_ssi = { nullptr, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
 	aadv.Dialog = false;
 	aadv.StrNr = -1;
@@ -92,7 +92,7 @@ atdsys::atdsys() {
 	atdsv.VocNr = -1;
 	ssret.Next = false;
 	ssr = &ssret;
-	for (i = 0; i < AAD_MAX_PERSON; i++)
+	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
 		ssi[i] = init_ssi;
 	inv_block_nr = -1;
 	inv_use_mem = nullptr;
@@ -100,8 +100,7 @@ atdsys::atdsys() {
 }
 
 atdsys::~atdsys() {
-	int16 i;
-	for (i = 0; i < MAX_HANDLE; i++)
+	for (int16 i = 0; i < MAX_HANDLE; i++)
 		close_handle(i);
 
 	if (inv_use_mem)
@@ -140,39 +139,28 @@ void atdsys::updateSoundSettings() {
 }
 
 int16 atdsys::get_delay(int16 txt_len) {
-	int16 max_len;
-	int16 z_len;
-	int16 ret;
-	z_len = (ssi->Width / ssi->Fvorx) + 1;
-	max_len = z_len * ssi->Zeilen;
+	int16 z_len = (ssi->Width / ssi->Fvorx) + 1;
+	int16 max_len = z_len * ssi->Zeilen;
 	if (txt_len > max_len)
 		txt_len = max_len;
 
-	ret = *atdsv.Delay * (txt_len + z_len);
+	int16 ret = *atdsv.Delay * (txt_len + z_len);
 	return ret;
 }
 
 SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
-	char *str_adr;
-	char *start_adr;
-	int16 zeichen_anz;
-	int16 count;
-	int16 tmp_count;
-	int16 ende;
-	int16 test_zeilen;
-	int16 ende1;
 	ssret.Anz = 0;
 	ssret.Next = false;
 	ssret.StrPtr = split_ptr;
 	ssret.X = split_x;
-	zeichen_anz = (ssi_->Width / ssi_->Fvorx) + 1;
+	int16 zeichen_anz = (ssi_->Width / ssi_->Fvorx) + 1;
 	memset(split_ptr, 0, sizeof(char *)*MAX_STR_SPLIT);
 	calc_txt_win(ssi_);
-	str_adr = ssi_->Str;
-	count = 0;
-	tmp_count = 0;
-	ende = 0;
-	start_adr = str_adr;
+	char *str_adr = ssi_->Str;
+	int16 count = 0;
+	int16 tmp_count = 0;
+	bool ende = false;
+	char *start_adr = str_adr;
 
 	while (!ende) {
 		switch (*str_adr) {
@@ -200,8 +188,8 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 					split_x[ssret.Anz] = ssi_->X;
 				++ssret.Anz;
 				if (ssret.Anz == ssi_->Zeilen) {
-					ende = 1;
-					ende1 = 0;
+					ende = true;
+					bool ende1 = false;
 					while (!ende1) {
 						if (*str_adr == ATDS_END_TEXT)
 							ende1 = true;
@@ -212,7 +200,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 						++str_adr;
 					}
 				} else if (*str_adr == 0 && count < zeichen_anz) {
-					ende = 1;
+					ende = true;
 				} else {
 					str_adr = start_adr + tmp_count + 1;
 					start_adr = str_adr;
@@ -227,6 +215,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 		case '.':
 		case ',':
 			if (str_adr[1] == 0 || str_adr[1] == ' ') {
+				int16 test_zeilen;
 				if (*str_adr == ',')
 					test_zeilen = 1;
 				else
@@ -236,7 +225,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 				if ((ssret.Anz + test_zeilen) >= ssi_->Zeilen) {
 					if (count < zeichen_anz) {
 						tmp_count = count;
-						ende = 1;
+						ende = true;
 					}
 					split_ptr[ssret.Anz] = start_adr;
 					start_adr[tmp_count] = 0;
@@ -245,7 +234,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 					else
 						split_x[ssret.Anz] = ssi_->X;
 					++ssret.Anz;
-					ende1 = 0;
+					bool ende1 = false;
 					while (!ende1) {
 						if (*str_adr == ATDS_END_TEXT)
 							ende1 = true;
@@ -292,7 +281,6 @@ void atdsys::str_null2leer(char *str_start, char *str_end) {
 }
 
 void atdsys::calc_txt_win(SplitStringInit *ssi_) {
-
 	if (ssi_->X - (ssi_->Width >> 1) < 2)
 		ssi_->X = 2;
 	else if (ssi_->X + (ssi_->Width >> 1) > (SCREEN_WIDTH - 2))
@@ -314,8 +302,7 @@ void atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 }
 
 Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
-	Stream *handle;
-	handle = chewy_fopen(fname_, fmode);
+	Stream *handle = chewy_fopen(fname_, fmode);
 	if (handle) {
 		atdshandle[ATDS_HANDLE] = handle;
 	} else {
@@ -333,9 +320,8 @@ void atdsys::set_speech_handle(Stream *stream) {
 
 void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-	char *tmp_adr;
 	ChunkHead Ch;
-	tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
+	char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
 	if (!modul) {
 		if (rs) {
 			atdshandle[mode] = rs;
@@ -375,13 +361,12 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 }
 
 void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
-	Stream *stream;
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname_, 0, 20000);
 	if (!modul) {
-		stream = chewy_fopen(fname_, fmode);
+		Stream *stream = chewy_fopen(fname_, fmode);
 		if (stream) {
 			close_handle(mode);
 			atdshandle[mode] = stream;
@@ -424,10 +409,8 @@ void atdsys::close_handle(int16 mode) {
 }
 
 char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
-	char *tmp_adr;
-	uint32 size;
-	tmp_adr = NULL;
-	size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
+	char *tmp_adr = nullptr;
+	uint32 size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
 	if (size) {
 		tmp_adr = (char *)MALLOC(size + 3l);
 	}
@@ -438,8 +421,7 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	ChunkHead Ch;
 	char *txt_adr = atdsmem[mode];
-	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(
-		atdshandle[mode]);
+	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(atdshandle[mode]);
 
 	if (stream && txt_adr) {
 		mem->file->select_pool_item(stream, chunk_nr + atdspooloff[mode]);
@@ -496,10 +478,8 @@ void atdsys::save_ads_header(int16 dia_nr) {
 }
 
 void atdsys::crypt(char *txt_, uint32 size) {
-	uint8 *sp;
-	uint32 i;
-	sp = (uint8 *)txt_;
-	for (i = 0; i < size; i++) {
+	uint8 *sp = (uint8 *)txt_;
+	for (uint32 i = 0; i < size; i++) {
 		*sp = -(*sp);
 		++sp;
 	}
@@ -523,6 +503,8 @@ void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 		ats_st_header[3] = atsheader;
 		break;
 
+	default:
+		break;
 	}
 }
 
@@ -550,24 +532,21 @@ void atdsys::set_ats_mem(int16 mode) {
 
 	default:
 		break;
-
 	}
 }
 
-bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode,
-                        int16 *voc_nr) {
-	int16 txt_anz;
-	char *ptr;
+bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
 	*voc_nr = -1;
 	set_ats_mem(mode);
 	if (atsmem) {
 		if (atsv.Display)
 			stop_ats();
 
+		int16 txt_anz;
 		atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
 		if (atsv.Ptr) {
 			atsv.Display = true;
-			ptr = atsv.Ptr;
+			char *ptr = atsv.Ptr;
 			atsv.TxtLen = 0;
 			while (*ptr++ != ATDS_END_TEXT)
 				++atsv.TxtLen;
@@ -601,10 +580,6 @@ int16 atdsys::ats_get_status() {
 }
 
 void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
-	int16 i;
-	char *tmp_ptr;
-	char *start_ptr;
-	SplitStringInit tmp_ssi;
 	if (atsv.Display) {
 		if (atdsv._field12) {
 			switch (in->get_switch_code()) {
@@ -630,7 +605,7 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 		}
 
 		if (atsv.SilentCount <= 0) {
-			tmp_ptr = atsv.Ptr;
+			char *tmp_ptr = atsv.Ptr;
 			out->set_fontadr(atdsv.Font);
 			out->set_vorschub(atdsv.Fvorx, 0);
 			ats_ssi = ssi[0];
@@ -639,12 +614,12 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			ats_ssi.FHoehe = atdsv.Fhoehe;
 			ats_ssi.X = x - scrx;
 			ats_ssi.Y = y - scry;
-			start_ptr = tmp_ptr;
+			char *start_ptr = tmp_ptr;
 			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
-			tmp_ssi = ats_ssi;
+			SplitStringInit tmp_ssi = ats_ssi;
 			ssr = split_string(&tmp_ssi);
 
-			for (i = 0; i < ssr->Anz; i++) {
+			for (int16 i = 0; i < ssr->Anz; i++) {
 				out->printxy(ssr->X[i],
 				              ssr->Y + (i * ats_ssi.FHoehe) + 1,
 				              0, 300, 0, ssr->StrPtr[i]);
@@ -685,29 +660,25 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 }
 
 char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mode) {
-	char *str_;
-	uint8 status;
-	uint8 lo_hi[2];
-	int16 ak_nybble;
-	str_ = 0;
+	char *str_ = nullptr;
 	set_ats_mem(mode);
 
 	atsv.TxtMode = txt_mode;
 
 	if (!get_steuer_bit(txt_nr, ATS_AKTIV_BIT, mode)) {
-		status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2];
-		ak_nybble = (atsv.TxtMode + 1) % 2;
+		uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2];
+		int16 ak_nybble = (atsv.TxtMode + 1) % 2;
 
+		uint8 lo_hi[2];
 		lo_hi[1] = status >> 4;
 		lo_hi[0] = status &= 15;
 		str_ = ats_search_block(atsv.TxtMode, atsmem);
-		if (str_ != 0) {
+		if (str_ != nullptr) {
 			ats_search_nr(txt_nr, &str_);
-			if (str_ != 0) {
-				ats_search_str(txt_anz, &lo_hi[ak_nybble],
-				               (uint8)ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
+			if (str_ != nullptr) {
+				ats_search_str(txt_anz, &lo_hi[ak_nybble], (uint8)ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
 
-				if (str_ != 0) {
+				if (str_ != nullptr) {
 					status = 0;
 					lo_hi[1] <<= 4;
 					status |= lo_hi[0];
@@ -722,13 +693,11 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 }
 
 void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
-	uint8 status;
-	uint8 lo_hi[2];
-	int16 ak_nybble;
 	set_ats_mem(mode);
-	status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
-	ak_nybble = (txt_mode + 1) % 2;
+	uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	int16 ak_nybble = (txt_mode + 1) % 2;
 
+	uint8 lo_hi[2];
 	lo_hi[1] = status >> 4;
 	lo_hi[0] = status &= 15;
 	lo_hi[ak_nybble] = str_nr;
@@ -740,19 +709,16 @@ void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode)
 }
 
 void atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
-	int16 i;
-	for (i = 0; i < 5; i++)
+	for (int16 i = 0; i < 5; i++)
 		set_ats_str(txt_nr, i, str_nr, mode);
 }
 
 int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
-	uint8 status;
-	uint8 lo_hi[2];
-	int16 ak_nybble;
 	set_ats_mem(mode);
-	status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
-	ak_nybble = (txt_mode + 1) % 2;
+	uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	int16 ak_nybble = (txt_mode + 1) % 2;
 
+	uint8 lo_hi[2];
 	lo_hi[1] = status >> 4;
 	lo_hi[0] = status &= 15;
 
@@ -760,9 +726,8 @@ int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 }
 
 int16 atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
-	int16 ret;
 	set_ats_mem(mode);
-	ret = bit->is_bit(ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	int16 ret = bit->is_bit(ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 	return ret;
 }
 
@@ -799,13 +764,11 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 }
 
 void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
-	char *start_str;
-	start_str = *str_;
+	char *start_str = *str_;
 
 	bool done1 = false;
 	while (!done1) {
-		Common::MemoryReadStream rs1((const byte *)start_str,
-			AtsTxtHeader::SIZE());
+		Common::MemoryReadStream rs1((const byte *)start_str, AtsTxtHeader::SIZE());
 		atsv.TxtHeader.load(&rs1);
 
 		if (atsv.TxtHeader.TxtNr == 0xFEF0 &&
@@ -814,8 +777,7 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 			*str_ = start_str + AtsTxtHeader::SIZE();
 
 			if (atsv.TxtMode) {
-				Common::MemoryReadStream rs2((const byte *)*str_,
-					AtsStrHeader::SIZE());
+				Common::MemoryReadStream rs2((const byte *)*str_, AtsStrHeader::SIZE());
 				atsv.StrHeader.load(&rs2);
 			}
 
@@ -834,8 +796,7 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 					start_str += 4;
 				else if (start_str[1] == 0xe) {
 					++start_str;
-					if (start_str[1] == 0xf && start_str[2] == 0xf &&
-							start_str[3] == 0xf) {
+					if (start_str[1] == 0xf && start_str[2] == 0xf && start_str[3] == 0xf) {
 						done1 = done2 = true;
 						*str_ = nullptr;
 					} else {
@@ -848,23 +809,19 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 }
 
 void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
-	char *tmp_str;
-	char *start_str;
-	int16 ende;
-	int16 count;
-	tmp_str = *str_;
-	start_str = *str_;
+	char *tmp_str = *str_;
+	char *start_str = *str_;
 	tmp_str += AtsStrHeader::SIZE();
 	*anz = 0;
-	ende = 0;
-	count = 0;
+	bool ende = false;
+	int16 count = 0;
 
 	while (!ende) {
 		if (count == *status) {
 			if (!*tmp_str) {
 				++*anz;
 			} else if (*tmp_str == ATDS_END_TEXT) {
-				ende = 1;
+				ende = true;
 				*str_ = start_str;
 				start_str -= AtsStrHeader::SIZE();
 
@@ -886,7 +843,7 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 		} else {
 			if (*tmp_str == ATDS_END_TEXT) {
 				if (tmp_str[1] == ATDS_END) {
-					ende = 1;
+					ende = false;
 					*anz = 0;
 					*status = count;
 					*str_ = start_str;
@@ -906,9 +863,9 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 			           (tmp_str[0] == (char)BLOCKENDE &&
 			            tmp_str[1] == (char)BLOCKENDE &&
 			            tmp_str[2] == (char)BLOCKENDE)) {
-				ende = 1;
+				ende = false;
 				*anz = 0;
-				*str_ = 0;
+				*str_ = nullptr;
 			}
 		}
 
@@ -917,8 +874,6 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 }
 
 int16 atdsys::start_aad(int16 dia_nr) {
-	int16 txt_len;
-
 	if (aadv.Dialog)
 		stop_aad();
 
@@ -932,12 +887,13 @@ int16 atdsys::start_aad(int16 dia_nr) {
 			aadv.StrNr = 0;
 			aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
 			aadv.Ptr += sizeof(AadStrHeader);
+			int16 txt_len;
 			aad_get_zeilen(aadv.Ptr, &txt_len);
 			aadv.DelayCount = get_delay(txt_len);
 			print_delay_count1 = aadv.DelayCount / 10;
 
 			atdsv.DiaNr = dia_nr;
-			if (atdsv.aad_str != 0)
+			if (atdsv.aad_str != nullptr)
 				atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
 			mouse_push = true;
 			stop_ats();
@@ -954,15 +910,6 @@ void atdsys::stop_aad() {
 }
 
 void atdsys::print_aad(int16 scrx, int16 scry) {
-	int16 i;
-	int16 txt_len;
-	int16 tmp_person;
-	int16 tmp_str_nr;
-	char *tmp_ptr;
-	char *start_ptr;
-	int16 vocx;
-	SplitStringInit tmp_ssi;
-
 	if (aadv.Dialog) {
 		if (atdsv._field12) {
 			switch (in->get_switch_code()) {
@@ -988,7 +935,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 		}
 
 		if (aadv.SilentCount <= 0) {
-			tmp_ptr = aadv.Ptr;
+			char *tmp_ptr = aadv.Ptr;
 			out->set_fontadr(atdsv.Font);
 			out->set_vorschub(atdsv.Fvorx, 0);
 			ssi[aadv.StrHeader->AkPerson].Str = tmp_ptr;
@@ -1000,15 +947,16 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 			}
 			ssi[aadv.StrHeader->AkPerson].Fvorx = atdsv.Fvorx;
 			ssi[aadv.StrHeader->AkPerson].FHoehe = atdsv.Fhoehe;
-			start_ptr = tmp_ptr;
+			char *start_ptr = tmp_ptr;
+			int16 txt_len;
 			aad_get_zeilen(start_ptr, &txt_len);
 			str_null2leer(start_ptr, start_ptr + txt_len - 1);
-			tmp_ssi = ssi[aadv.StrHeader->AkPerson];
+			SplitStringInit tmp_ssi = ssi[aadv.StrHeader->AkPerson];
 			ssr = split_string(&tmp_ssi);
 
 			if (atdsv.Display == DISPLAY_TXT ||
 			        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
-				for (i = 0; i < ssr->Anz; i++) {
+				for (int16 i = 0; i < ssr->Anz; i++) {
 					out->printxy(ssr->X[i] + 1,
 					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
 					              0, 300, 0, ssr->StrPtr[i]);
@@ -1039,8 +987,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 							mem->file->select_pool_item(atdsv.SpeechHandle, atdsv.VocNr);
 							ERROR
 
-							vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
-							       _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
+							int16 vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
+							             _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
 							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
 							ailsnd->startDbVoc(atdsv.SpeechHandle, 0, 63);
 							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
@@ -1052,7 +1000,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 						err->set_user_msg("sprachausgabe.tvp");
 					}
 				}
-				for (i = 0; i < ssr->Anz; i++) {
+				for (int16 i = 0; i < ssr->Anz; i++) {
 					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
@@ -1075,11 +1023,11 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 						++aadv.StrNr;
 						while (*aadv.Ptr++ != ATDS_END_TEXT);
 
-						tmp_person = aadv.StrHeader->AkPerson;
-						tmp_str_nr = aadv.StrNr;
+						int16 tmp_person = aadv.StrHeader->AkPerson;
+						int16 tmp_str_nr = aadv.StrNr;
 						aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
 						aadv.Ptr += sizeof(AadStrHeader);
-						if (atdsv.aad_str != 0) {
+						if (atdsv.aad_str != nullptr) {
 							if (tmp_person != aadv.StrHeader->AkPerson) {
 								atdsv.aad_str(atdsv.DiaNr, tmp_str_nr, tmp_person, AAD_STR_END);
 								atdsv.aad_str(atdsv.DiaNr, aadv.StrNr, aadv.StrHeader->AkPerson, AAD_STR_START);
@@ -1113,11 +1061,9 @@ int16 atdsys::aad_get_status() {
 }
 
 int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
-	int16 zeilen;
-	char *ptr;
 	*txt_len = 0;
-	ptr = str_;
-	zeilen = 0;
+	char *ptr = str_;
+	int16 zeilen = 0;
 	while (*str_ != ATDS_END_TEXT) {
 		if (*str_++ == 0)
 			++zeilen;
@@ -1128,27 +1074,23 @@ int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
 }
 
 void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
-	char *start_ptr;
-	uint16 *pos;
-	int16 ende;
-	int16 ende1;
-	start_ptr = *ptr;
-	ende = 0;
+	char *start_ptr = *ptr;
 
 	if (start_ptr[0] == (char)BLOCKENDE &&
 	        start_ptr[1] == (char)BLOCKENDE &&
 	        start_ptr[2] == (char)BLOCKENDE) {
-		*ptr = 0;
+		*ptr = nullptr;
 	} else {
+		bool ende = false;
 		while (!ende) {
-			pos = (uint16 *)start_ptr;
+			uint16 *pos = (uint16 *)start_ptr;
 			if (pos[0] == dia_nr) {
-				ende = 1;
+				ende = true;
 				aadv.TxtHeader = (AadTxtHeader *)start_ptr;
 				*ptr = start_ptr + sizeof(AadTxtHeader);
 			} else {
 				start_ptr += sizeof(AadTxtHeader) + pos[1] * sizeof(AadInfo);
-				ende1 = 0;
+				bool ende1 = false;
 				for (; !ende1; ++start_ptr) {
 					if (*start_ptr != ATDS_END_TEXT)
 						continue;
@@ -1158,11 +1100,11 @@ void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 						if (start_ptr[1] == (char)BLOCKENDE &&
 						        start_ptr[2] == (char)BLOCKENDE &&
 						        start_ptr[3] == (char)BLOCKENDE) {
-							ende = 1;
-							ende1 = 1;
-							*ptr = 0;
+							ende = true;
+							ende1 = true;
+							*ptr = nullptr;
 						} else {
-							ende1 = 1;
+							ende1 = true;
 						}
 					}
 				}
@@ -1210,10 +1152,8 @@ int16 atdsys::ads_get_status() {
 }
 
 int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
-	int16 ret;
-	char *tmp_adr;
-	ret = true;
-	tmp_adr = adsv.Ptr;
+	int16 ret = true;
+	char *tmp_adr = adsv.Ptr;
 	ads_search_block(block_nr, &tmp_adr);
 	if (tmp_adr) {
 		ads_search_item(item_nr, &tmp_adr);
@@ -1225,20 +1165,17 @@ int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
 }
 
 char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
-	int16 i;
-	char nr;
-	char *tmp_adr;
 	*anzahl = 0;
 	memset(e_ptr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
 	if (adsv.Dialog != -1) {
 		adsv.BlkPtr = adsv.Ptr;
 		ads_search_block(block_nr, &adsv.BlkPtr);
 		if (adsv.BlkPtr) {
-			for (i = 0; i < ADS_MAX_BL_EIN; i++) {
-				tmp_adr = adsv.BlkPtr;
+			for (int16 i = 0; i < ADS_MAX_BL_EIN; i++) {
+				char *tmp_adr = adsv.BlkPtr;
 				ads_search_item(i, &tmp_adr);
 				if (tmp_adr) {
-					nr = tmp_adr[-1];
+					char nr = tmp_adr[-1];
 					tmp_adr += sizeof(AadStrHeader);
 					if (ads_block[block_nr].Show[(int16)nr] == true) {
 						e_ptr[*anzahl] = tmp_adr;
@@ -1274,8 +1211,6 @@ AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 }
 
 AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
-	int16 anzahl;
-
 	if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_SHOW_BIT) == false)
 		ads_block[blk_nr].Show[e_nr[item_nr]] = false;
 	adsnb.EndNr = e_nr[item_nr];
@@ -1287,7 +1222,7 @@ AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
 		if (ads_block[blk_nr].Next[e_nr[item_nr]]) {
 			adsnb.BlkNr = ads_block[blk_nr].Next[e_nr[item_nr]];
 
-			anzahl = 0;
+			int16 anzahl = 0;
 			while (!anzahl && adsnb.BlkNr != -1) {
 
 				anzahl = 0;
@@ -1307,19 +1242,16 @@ AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
 }
 
 int16 atdsys::return_block(AdsBlock *ab) {
-	int16 ret;
-	short blk_nr;
-	int16 anz;
-	int16 ende;
 	ads_stack_ptr -= 1;
-	ret = -1;
-	ende = 0;
+	int16 ret = -1;
+	bool ende = false;
 	while (ads_stack_ptr >= 0 && !ende) {
-		blk_nr = ads_stack[ads_stack_ptr];
+		short blk_nr = ads_stack[ads_stack_ptr];
+		int16 anz;
 		ads_item_ptr(blk_nr, &anz);
 		if (anz) {
 			ret = blk_nr;
-			ende = 1;
+			ende = true;
 		} else
 			--ads_stack_ptr;
 	}
@@ -1328,48 +1260,43 @@ int16 atdsys::return_block(AdsBlock *ab) {
 }
 
 void atdsys::ads_search_block(int16 blk_nr, char **ptr) {
-	char *start_ptr;
-	int16 ende;
-	start_ptr = *ptr;
-	ende = 0;
+	char *start_ptr = *ptr;
+	bool ende = false;
 	while (!ende) {
 		if (*start_ptr == (char)blk_nr) {
-			ende = 1;
+			ende = true;
 			*ptr = start_ptr;
 		} else {
 			start_ptr += 2 + sizeof(AadStrHeader);
 			while (*start_ptr++ != ATDS_END_BLOCK);
 			if (start_ptr[0] == ATDS_END &&
 			        start_ptr[1] == ATDS_END) {
-				ende = 1;
-				*ptr = 0;
+				ende = true;
+				*ptr = nullptr;
 			}
 		}
 	}
 }
 
 void atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
-	char *start_ptr;
-	int16 ende;
-	start_ptr = *blk_adr + 1;
-	ende = 0;
+	char *start_ptr = *blk_adr + 1;
+	bool ende = false;
 	while (!ende) {
 		if (*start_ptr == item_nr) {
-			ende = 1;
+			ende = true;
 			*blk_adr = start_ptr + 1;
 		} else {
 			start_ptr += 1 + sizeof(AadStrHeader);
 			while (*start_ptr++ != ATDS_END_EINTRAG);
 			if (*start_ptr == ATDS_END_BLOCK) {
-				ende = 1;
-				*blk_adr = 0;
+				ende = true;
+				*blk_adr = nullptr;
 			}
 		}
 	}
 }
 
 int16 atdsys::start_ads_auto_dia(char *item_adr) {
-	int16 txt_len;
 	aadv.Dialog = false;
 	if (item_adr) {
 		aadv.Person = adsv.Person;
@@ -1378,11 +1305,12 @@ int16 atdsys::start_ads_auto_dia(char *item_adr) {
 		aadv.StrNr = 0;
 		aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
 		aadv.Ptr += sizeof(AadStrHeader);
+		int16 txt_len;
 		aad_get_zeilen(aadv.Ptr, &txt_len);
 		aadv.DelayCount = get_delay(txt_len);
 		atdsv.DiaNr = adsv.TxtHeader->DiaNr + 10000;
 
-		if (atdsv.aad_str != 0)
+		if (atdsv.aad_str != nullptr)
 			atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
 		mouse_push = true;
 		stop_ats();
@@ -1418,11 +1346,7 @@ void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 }
 
 int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
-	int16 i;
-	bool ok;
-	int16 txt_nr;
-	InvUse *iu;
-	txt_nr = -1;
+	int16 txt_nr = -1;
 	if (cur_inv != -1) {
 		if (inv_block_nr != cur_inv) {
 			inv_block_nr = cur_inv + 1;
@@ -1434,8 +1358,8 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 				rs->seek(InvUse::SIZE() * inv_block_nr
 				      * INV_STRC_ANZ, SEEK_SET);
 
-				iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
-				for (i = 0; i < INV_STRC_ANZ; ++i, ++iu) {
+				InvUse *iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
+				for (int16 i = 0; i < INV_STRC_ANZ; ++i, ++iu) {
 					if (!iu->load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
@@ -1448,9 +1372,10 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 			}
 		}
 
-		iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
-		ok = false;
-		for (i = 0; i < INV_STRC_ANZ && !ok; i++) {
+		InvUse *iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
+		bool ok = false;
+
+		for (int16 i = 0; i < INV_STRC_ANZ && !ok; i++) {
 			if (iu[i].ObjId == mode) {
 				if (iu[i].ObjNr == test_nr) {
 					txt_nr = iu[i].TxtNr;


Commit: 8d9060b9c9bcdbebdc1105a5242a89dac13d10f1
    https://github.com/scummvm/scummvm/commit/8d9060b9c9bcdbebdc1105a5242a89dac13d10f1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:53-08:00

Commit Message:
CHEWY: Move ged_user_func room code into their Room classes

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room40.h
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room41.h
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room42.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index cb33529240a..e419ddd7b34 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -173,132 +173,16 @@ void check_ged_action(int16 index) {
 }
 
 int16 ged_user_func(int16 idx_nr) {
+#define GED_FUNC(NUM) case NUM: idx_nr = Room##NUM::gedUserFunc(idx_nr)
 	switch (idx_nr) {
-	case 40:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-		case 8:
-			if (_G(spieler).R8GTuer)
-				idx_nr = 0;
-			break;
-
-		case 9:
-			if (!_G(spieler).R9Gitter)
-				idx_nr = 0;
-			break;
-
-		case 16:
-			if (!_G(spieler).R16F5Exit)
-				idx_nr = 0;
-			break;
-
-		case 17:
-			if (_G(spieler).R17Location != 1)
-				idx_nr = 0;
-			break;
-
-		case 21:
-			if (!_G(spieler).R21Laser2Weg)
-				idx_nr = 0;
-			break;
-
-		case 31:
-			if (!_G(spieler).R31KlappeZu)
-				idx_nr = 0;
-			break;
-
-		case 41:
-			if (!_G(spieler).R41LolaOk)
-				idx_nr = 0;
-			break;
-
-		case 52:
-			if (!_G(spieler).R52LichtAn)
-				idx_nr = 2;
-			else
-				idx_nr = 4;
-			break;
-
-		case 71:
-			if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
-				idx_nr = 0;
-			else
-				idx_nr = 4;
-			break;
-
-		case 76:
-			return idx_nr;
-
-		case 84:
-			if (!_G(spieler).flags31_1)
-				_G(spieler).flags31_4 = true;
-			break;
-
-		case 86:
-			if (!_G(spieler).flags32_2)
-				idx_nr = 0;
-			break;
-
-		case 94:
-			if (!_G(spieler).flags35_10)
-				idx_nr = 0;
-			break;
-
-		case 97:
-			if (!_G(spieler).flags35_80)
-				idx_nr = 0;
-			break;
-
-		default:
-			break;
-		}
-		break;
-
-	case 41:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-		case 17:
-			if (_G(spieler).R17Location != 2)
-				idx_nr = 0;
-			break;
-
-		case 21:
-			if (!_G(spieler).R21Laser1Weg) {
-				idx_nr = 0;
-			} else
-				idx_nr = 3;
-			break;
-
-		case 37:
-			if (!_G(spieler).R37Kloppe)
-				idx_nr = 0;
-			break;
-
-		case 52:
-			if (!_G(spieler).R52TuerAuf)
-				idx_nr = 2;
-			else
-				idx_nr = 4;
-			break;
-
-		case 97:
-			if (!_G(spieler).flags36_20)
-				idx_nr = 0;
-			break;
-
-		default:
-			break;
-		}
-		break;
-
-	case 42:
-		if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
-			if (!_G(spieler).flags37_1)
-				idx_nr = 0;
-		}
-		break;
+	GED_FUNC(40);
+	GED_FUNC(41);
+	GED_FUNC(42);
 
 	default:
 		break;
 	}
+#undef GED_FUNC
 
 	return idx_nr;
 }
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 2b6f67b9b09..0f6721471e0 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -155,6 +155,87 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
+int16 Room40::gedUserFunc(int16 idx_nr) {
+	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+	case 8:
+		if (_G(spieler).R8GTuer)
+			idx_nr = 0;
+		break;
+
+	case 9:
+		if (!_G(spieler).R9Gitter)
+			idx_nr = 0;
+		break;
+
+	case 16:
+		if (!_G(spieler).R16F5Exit)
+			idx_nr = 0;
+		break;
+
+	case 17:
+		if (_G(spieler).R17Location != 1)
+			idx_nr = 0;
+		break;
+
+	case 21:
+		if (!_G(spieler).R21Laser2Weg)
+			idx_nr = 0;
+		break;
+
+	case 31:
+		if (!_G(spieler).R31KlappeZu)
+			idx_nr = 0;
+		break;
+
+	case 41:
+		if (!_G(spieler).R41LolaOk)
+			idx_nr = 0;
+		break;
+
+	case 52:
+		if (!_G(spieler).R52LichtAn)
+			idx_nr = 2;
+		else
+			idx_nr = 4;
+		break;
+
+	case 71:
+		if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
+			idx_nr = 0;
+		else
+			idx_nr = 4;
+		break;
+
+	case 76:
+		return idx_nr;
+
+	case 84:
+		if (!_G(spieler).flags31_1)
+			_G(spieler).flags31_4 = true;
+		break;
+
+	case 86:
+		if (!_G(spieler).flags32_2)
+			idx_nr = 0;
+		break;
+
+	case 94:
+		if (!_G(spieler).flags35_10)
+			idx_nr = 0;
+		break;
+
+	case 97:
+		if (!_G(spieler).flags35_80)
+			idx_nr = 0;
+		break;
+
+	default:
+		break;
+	}
+
+	return idx_nr;
+}
+
 void Room40::move_train(int16 mode) {
 	_G(spieler).R40TrainMove = false;
 	hide_cur();
diff --git a/engines/chewy/rooms/room40.h b/engines/chewy/rooms/room40.h
index 96f328125c0..0b6318068bb 100644
--- a/engines/chewy/rooms/room40.h
+++ b/engines/chewy/rooms/room40.h
@@ -36,6 +36,7 @@ public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static bool timer(int16 t_nr, int16 ani_nr);
+	static int16 gedUserFunc(int16 idx_nr);
 
 	static int16 use_mr_pumpkin();
 	static void talk_police();
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 1855dc151bc..6a89069e3af 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -79,6 +79,44 @@ void Room41::xit() {
 	_G(spieler).R41TrainCount--;
 }
 
+int16 Room41::gedUserFunc(int16 idx_nr) {
+	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+	case 17:
+		if (_G(spieler).R17Location != 2)
+			idx_nr = 0;
+		break;
+
+	case 21:
+		if (!_G(spieler).R21Laser1Weg) {
+			idx_nr = 0;
+		} else
+			idx_nr = 3;
+		break;
+
+	case 37:
+		if (!_G(spieler).R37Kloppe)
+			idx_nr = 0;
+		break;
+
+	case 52:
+		if (!_G(spieler).R52TuerAuf)
+			idx_nr = 2;
+		else
+			idx_nr = 4;
+		break;
+
+	case 97:
+		if (!_G(spieler).flags36_20)
+			idx_nr = 0;
+		break;
+
+	default:
+		break;
+	}
+
+	return idx_nr;
+}
+
 void Room41::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
diff --git a/engines/chewy/rooms/room41.h b/engines/chewy/rooms/room41.h
index 318c4c8cfc2..ba1294fda29 100644
--- a/engines/chewy/rooms/room41.h
+++ b/engines/chewy/rooms/room41.h
@@ -35,6 +35,8 @@ private:
 public:
 	static void entry();
 	static void xit();
+	static int16 gedUserFunc(int16 idx_nr);
+
 	static int16 use_brief();
 	static int16 use_lola();
 	static int16 use_kasse();
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 9a27f7041d5..315cca2c903 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -67,6 +67,15 @@ void Room42::gedAction(int index) {
 		calc_xit();
 }
 
+int16 Room42::gedUserFunc(int16 idx_nr) {
+	if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
+		if (!_G(spieler).flags37_1)
+			idx_nr = 0;
+	}
+
+	return idx_nr;
+}
+
 void Room42::setup_func() {
 	if (!_G(spieler).R42HoToBeamter)
 		calc_person_look();
diff --git a/engines/chewy/rooms/room42.h b/engines/chewy/rooms/room42.h
index d89b5459d8d..3c1ef79557e 100644
--- a/engines/chewy/rooms/room42.h
+++ b/engines/chewy/rooms/room42.h
@@ -33,6 +33,7 @@ private:
 public:
 	static void entry();
 	static void gedAction(int index);
+	static int16 gedUserFunc(int16 idx_nr);
 
 	static void talk_beamter();
 	static int16 use_psack();


Commit: ccb3a6ae9f31f014c259b5389f69ad90964d3011
    https://github.com/scummvm/scummvm/commit/ccb3a6ae9f31f014c259b5389f69ad90964d3011
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:53-08:00

Commit Message:
CHEWY: Fix Howard disappearing in room 42

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room42.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index e419ddd7b34..73da01a3906 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -146,7 +146,6 @@ void check_ged_action(int16 index) {
 		GED_ACTION(18);
 		GED_ACTION(28);
 		GED_ACTION(37);
-		GED_ACTION(42);
 
 		case 45:
 		case 46:
@@ -412,7 +411,7 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 41: Room41::xit(); break;
-	case 42: Room42::calc_xit(); break;
+	case 42: Room42::xit(); break;
 	case 45: Room45::xit(eib_nr); break;
 	case 46: Room46::xit(); break;
 	case 47: Room47::xit(); break;
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 315cca2c903..c38db90eac3 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -62,9 +62,13 @@ void Room42::entry() {
 	}
 }
 
-void Room42::gedAction(int index) {
-	if (!index)
-		calc_xit();
+void Room42::xit() {
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
+		atds->set_ats_str(264, 1, ATS_DATEI);
+		stop_spz();
+		_G(spieler).R42HoToBeamter = false;
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+	}
 }
 
 int16 Room42::gedUserFunc(int16 idx_nr) {
@@ -81,15 +85,6 @@ void Room42::setup_func() {
 		calc_person_look();
 }
 
-void Room42::calc_xit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		atds->set_ats_str(264, 1, ATS_DATEI);
-		stop_spz();
-		_G(spieler).R42HoToBeamter = false;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
-	}
-}
-
 void Room42::get_kuerbis(int16 aad_nr) {
 	hide_cur();
 	auto_move(1, P_CHEWY);
diff --git a/engines/chewy/rooms/room42.h b/engines/chewy/rooms/room42.h
index 3c1ef79557e..c4a65aad515 100644
--- a/engines/chewy/rooms/room42.h
+++ b/engines/chewy/rooms/room42.h
@@ -32,7 +32,7 @@ private:
 
 public:
 	static void entry();
-	static void gedAction(int index);
+	static void xit();
 	static int16 gedUserFunc(int16 idx_nr);
 
 	static void talk_beamter();


Commit: 30d0520c0c13c72d1bf08dfaf1c307771f7e8b9c
    https://github.com/scummvm/scummvm/commit/30d0520c0c13c72d1bf08dfaf1c307771f7e8b9c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:53-08:00

Commit Message:
CHEWY: Stop redundant default response after using boombox

Changed paths:
    engines/chewy/rooms/room40.cpp


diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 0f6721471e0..485be85e375 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -409,6 +409,8 @@ int16 Room40::use_mr_pumpkin() {
 				break;
 
 			case RECORDER_INV:
+				action_ret = true;
+
 				if (_G(spieler).R39TvRecord == 6) {
 					action_ret = true;
 					if (_G(spieler).R40PoliceWeg == false)


Commit: b7debd8befe26d2dbc7c0fb65e5053d00390f353
    https://github.com/scummvm/scummvm/commit/b7debd8befe26d2dbc7c0fb65e5053d00390f353
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:54-08:00

Commit Message:
CHEWY: Fix room 47 combination lock

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 936845cf846..ed6fa5960ad 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -435,9 +435,8 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 286:
-					case 289:
-					case 290:
-					case 291:
+					case 292:
+					case 293:
 						Room47::use_knopf(txt_nr);
 						break;
 


Commit: 383c094f0ba4bc218dfa67fad7f33d5b1fb6d603
    https://github.com/scummvm/scummvm/commit/383c094f0ba4bc218dfa67fad7f33d5b1fb6d603
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:54-08:00

Commit Message:
CHEWY: Fix room 46 fight cutscene

Changed paths:
    engines/chewy/rooms/room46.cpp


diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index efa602aeee8..a38cdd858a6 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -128,7 +128,7 @@ void Room46::bodo() {
 	start_detail_wait(6, 1, ANI_VOR);
 	det->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(0, 1, ANI_VOR);
+	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065, CFO_MODE);
 	out->setze_zeiger(nullptr);
 	out->cls();


Commit: 08af2295d83cf481e51c2a71531f43513de6411c
    https://github.com/scummvm/scummvm/commit/08af2295d83cf481e51c2a71531f43513de6411c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:54-08:00

Commit Message:
CHEWY: Fix using taxi sign in room 45

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index ed6fa5960ad..ca1b01986a9 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -569,6 +569,10 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = Room63::use_schalter();
 						break;
 
+					case 386:
+						action_ret = Room45::use_taxi();
+						break;
+
 					case 394:
 						action_ret = Room67::talk_papagei();
 						break;


Commit: 75cdacaf7e139f4a426d7cac58445d2ee0e78d74
    https://github.com/scummvm/scummvm/commit/75cdacaf7e139f4a426d7cac58445d2ee0e78d74
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:54-08:00

Commit Message:
CHEWY: Fix room 49 water pistol cutscene

Changed paths:
    engines/chewy/rooms/room49.cpp


diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 8899dfc5965..6083b279968 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -125,8 +125,6 @@ void Room49::calc_boy() {
 
 		SetUpScreenFunc = nullptr;
 		start_aad_wait(262, -1);
-
-		SetUpScreenFunc = setup_func;
 		auto_move(3, P_CHEWY);
 		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);


Commit: a65bfeb8d3dd33e5f35547acf9feb04e42d4f3ff
    https://github.com/scummvm/scummvm/commit/a65bfeb8d3dd33e5f35547acf9feb04e42d4f3ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:54-08:00

Commit Message:
CHEWY: Use gum constant in add inventory call

Changed paths:
    engines/chewy/rooms/room49.cpp


diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 6083b279968..b65c20838f8 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -194,8 +194,8 @@ void Room49::use_boy_cigar() {
 	start_aad_wait(264, -1);
 	room->set_zoom(zoom);
 
-	obj->add_inventar(68, &room_blk);
-	inventory_2_cur(68);
+	obj->add_inventar(GUM_INV, &room_blk);
+	inventory_2_cur(GUM_INV);
 	atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
 	SetUpScreenFunc = setup_func;


Commit: d3f734a00c66c6bea7d84197ff802be90a706e19
    https://github.com/scummvm/scummvm/commit/d3f734a00c66c6bea7d84197ff802be90a706e19
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Revert Move ged_user_func room code into their Room classes

This reverts commit 7727b6ed38a10073698ac1edc8194ccc2e7f3532.

I mistakenly equated index numbers with room numbers

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room40.h
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room41.h
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room42.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 73da01a3906..78a82847b35 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -172,16 +172,132 @@ void check_ged_action(int16 index) {
 }
 
 int16 ged_user_func(int16 idx_nr) {
-#define GED_FUNC(NUM) case NUM: idx_nr = Room##NUM::gedUserFunc(idx_nr)
 	switch (idx_nr) {
-	GED_FUNC(40);
-	GED_FUNC(41);
-	GED_FUNC(42);
+	case 40:
+		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		case 8:
+			if (_G(spieler).R8GTuer)
+				idx_nr = 0;
+			break;
+
+		case 9:
+			if (!_G(spieler).R9Gitter)
+				idx_nr = 0;
+			break;
+
+		case 16:
+			if (!_G(spieler).R16F5Exit)
+				idx_nr = 0;
+			break;
+
+		case 17:
+			if (_G(spieler).R17Location != 1)
+				idx_nr = 0;
+			break;
+
+		case 21:
+			if (!_G(spieler).R21Laser2Weg)
+				idx_nr = 0;
+			break;
+
+		case 31:
+			if (!_G(spieler).R31KlappeZu)
+				idx_nr = 0;
+			break;
+
+		case 41:
+			if (!_G(spieler).R41LolaOk)
+				idx_nr = 0;
+			break;
+
+		case 52:
+			if (!_G(spieler).R52LichtAn)
+				idx_nr = 2;
+			else
+				idx_nr = 4;
+			break;
+
+		case 71:
+			if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
+				idx_nr = 0;
+			else
+				idx_nr = 4;
+			break;
+
+		case 76:
+			return idx_nr;
+
+		case 84:
+			if (!_G(spieler).flags31_1)
+				_G(spieler).flags31_4 = true;
+			break;
+
+		case 86:
+			if (!_G(spieler).flags32_2)
+				idx_nr = 0;
+			break;
+
+		case 94:
+			if (!_G(spieler).flags35_10)
+				idx_nr = 0;
+			break;
+
+		case 97:
+			if (!_G(spieler).flags35_80)
+				idx_nr = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 41:
+		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		case 17:
+			if (_G(spieler).R17Location != 2)
+				idx_nr = 0;
+			break;
+
+		case 21:
+			if (!_G(spieler).R21Laser1Weg) {
+				idx_nr = 0;
+			} else
+				idx_nr = 3;
+			break;
+
+		case 37:
+			if (!_G(spieler).R37Kloppe)
+				idx_nr = 0;
+			break;
+
+		case 52:
+			if (!_G(spieler).R52TuerAuf)
+				idx_nr = 2;
+			else
+				idx_nr = 4;
+			break;
+
+		case 97:
+			if (!_G(spieler).flags36_20)
+				idx_nr = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 42:
+		if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
+			if (!_G(spieler).flags37_1)
+				idx_nr = 0;
+		}
+		break;
 
 	default:
 		break;
 	}
-#undef GED_FUNC
 
 	return idx_nr;
 }
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 485be85e375..14a08c1147e 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -155,87 +155,6 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 	return false;
 }
 
-int16 Room40::gedUserFunc(int16 idx_nr) {
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-	case 8:
-		if (_G(spieler).R8GTuer)
-			idx_nr = 0;
-		break;
-
-	case 9:
-		if (!_G(spieler).R9Gitter)
-			idx_nr = 0;
-		break;
-
-	case 16:
-		if (!_G(spieler).R16F5Exit)
-			idx_nr = 0;
-		break;
-
-	case 17:
-		if (_G(spieler).R17Location != 1)
-			idx_nr = 0;
-		break;
-
-	case 21:
-		if (!_G(spieler).R21Laser2Weg)
-			idx_nr = 0;
-		break;
-
-	case 31:
-		if (!_G(spieler).R31KlappeZu)
-			idx_nr = 0;
-		break;
-
-	case 41:
-		if (!_G(spieler).R41LolaOk)
-			idx_nr = 0;
-		break;
-
-	case 52:
-		if (!_G(spieler).R52LichtAn)
-			idx_nr = 2;
-		else
-			idx_nr = 4;
-		break;
-
-	case 71:
-		if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
-			idx_nr = 0;
-		else
-			idx_nr = 4;
-		break;
-
-	case 76:
-		return idx_nr;
-
-	case 84:
-		if (!_G(spieler).flags31_1)
-			_G(spieler).flags31_4 = true;
-		break;
-
-	case 86:
-		if (!_G(spieler).flags32_2)
-			idx_nr = 0;
-		break;
-
-	case 94:
-		if (!_G(spieler).flags35_10)
-			idx_nr = 0;
-		break;
-
-	case 97:
-		if (!_G(spieler).flags35_80)
-			idx_nr = 0;
-		break;
-
-	default:
-		break;
-	}
-
-	return idx_nr;
-}
-
 void Room40::move_train(int16 mode) {
 	_G(spieler).R40TrainMove = false;
 	hide_cur();
diff --git a/engines/chewy/rooms/room40.h b/engines/chewy/rooms/room40.h
index 0b6318068bb..96f328125c0 100644
--- a/engines/chewy/rooms/room40.h
+++ b/engines/chewy/rooms/room40.h
@@ -36,7 +36,6 @@ public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static bool timer(int16 t_nr, int16 ani_nr);
-	static int16 gedUserFunc(int16 idx_nr);
 
 	static int16 use_mr_pumpkin();
 	static void talk_police();
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 6a89069e3af..1855dc151bc 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -79,44 +79,6 @@ void Room41::xit() {
 	_G(spieler).R41TrainCount--;
 }
 
-int16 Room41::gedUserFunc(int16 idx_nr) {
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
-	case 17:
-		if (_G(spieler).R17Location != 2)
-			idx_nr = 0;
-		break;
-
-	case 21:
-		if (!_G(spieler).R21Laser1Weg) {
-			idx_nr = 0;
-		} else
-			idx_nr = 3;
-		break;
-
-	case 37:
-		if (!_G(spieler).R37Kloppe)
-			idx_nr = 0;
-		break;
-
-	case 52:
-		if (!_G(spieler).R52TuerAuf)
-			idx_nr = 2;
-		else
-			idx_nr = 4;
-		break;
-
-	case 97:
-		if (!_G(spieler).flags36_20)
-			idx_nr = 0;
-		break;
-
-	default:
-		break;
-	}
-
-	return idx_nr;
-}
-
 void Room41::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
diff --git a/engines/chewy/rooms/room41.h b/engines/chewy/rooms/room41.h
index ba1294fda29..318c4c8cfc2 100644
--- a/engines/chewy/rooms/room41.h
+++ b/engines/chewy/rooms/room41.h
@@ -35,8 +35,6 @@ private:
 public:
 	static void entry();
 	static void xit();
-	static int16 gedUserFunc(int16 idx_nr);
-
 	static int16 use_brief();
 	static int16 use_lola();
 	static int16 use_kasse();
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index c38db90eac3..b8cf9c564f2 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -71,15 +71,6 @@ void Room42::xit() {
 	}
 }
 
-int16 Room42::gedUserFunc(int16 idx_nr) {
-	if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
-		if (!_G(spieler).flags37_1)
-			idx_nr = 0;
-	}
-
-	return idx_nr;
-}
-
 void Room42::setup_func() {
 	if (!_G(spieler).R42HoToBeamter)
 		calc_person_look();
diff --git a/engines/chewy/rooms/room42.h b/engines/chewy/rooms/room42.h
index c4a65aad515..a948a4d2300 100644
--- a/engines/chewy/rooms/room42.h
+++ b/engines/chewy/rooms/room42.h
@@ -33,13 +33,11 @@ private:
 public:
 	static void entry();
 	static void xit();
-	static int16 gedUserFunc(int16 idx_nr);
 
 	static void talk_beamter();
 	static int16 use_psack();
 	static int16 use_beamter();
 	static void dia_beamter(int16 str_end_nr);
-	static void calc_xit();
 };
 
 } // namespace Rooms


Commit: 0eba439f4b09b16adb512af3d0ccce0bd783f2a2
    https://github.com/scummvm/scummvm/commit/0eba439f4b09b16adb512af3d0ccce0bd783f2a2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Fix cutscene using cockroaches on secretary

Changed paths:
    engines/chewy/rooms/room55.cpp


diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 27b5ba0514a..675ce5649f7 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -376,13 +376,12 @@ int16 Room55::use_kammeraus() {
 			
 			flc->remove_flic_user_function();
 			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
-			room->set_timer_status(19 + aniNr, TIMER_STOP);
-			det->stop_detail(19 + aniNr);
-			det->del_static_ani(19 + aniNr);
+			room->set_timer_status(aniNr, TIMER_STOP);
+			det->stop_detail(aniNr);
+			det->del_static_ani(aniNr);
 			det->hide_static_spr(10);
 			_G(spieler).R55ExitDia = 322;
 			_G(spieler).R55SekWeg = true;
-			atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
 			atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(_G(spieler).AkInvent);
 			atds->set_steuer_bit(345, 1, 1);
@@ -440,9 +439,9 @@ void Room55::talk_line() {
 		aad_nr = 320;
 		_G(spieler).R55ExitDia = 321;
 		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
-		room->set_timer_status(19 + aniNr, TIMER_STOP);
-		det->stop_detail(19 + aniNr);
-		det->del_static_ani(19 + aniNr);
+		room->set_timer_status(aniNr, TIMER_STOP);
+		det->stop_detail(aniNr);
+		det->del_static_ani(aniNr);
 		start_detail_wait(22, 1, ANI_VOR);
 		det->set_static_ani(21, -1);
 	} else if (!_G(spieler).R55RaumOk) {


Commit: 10b15ddcf470170d5c6e69a4d9f2d5620a906550
    https://github.com/scummvm/scummvm/commit/10b15ddcf470170d5c6e69a4d9f2d5620a906550
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: remove unused functions in datei, reduce some variable scopes

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 237cf112c0f..4dcebafe6e1 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -21,7 +21,6 @@
 
 #include "common/debug.h"
 #include "common/system.h"
-#include "common/savefile.h"
 #include "chewy/datei.h"
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
@@ -43,7 +42,6 @@ uint8 tmp[10000]; // FIXME
 
 extern int16 modul;
 extern int16 fcode;
-int16 *ft;
 
 datei::datei() {
 }
@@ -54,182 +52,37 @@ datei::~datei() {
 void datei::assign_filename(const char *fname, const char *ext) {
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
 	if (!strchr(filename, '.'))
 		strcat(filename, ext);
 }
 
-void datei::load_pcx(const char *fname, byte *speicher, byte *palette) {
-	Common::File f;
-	pcx_header *header;
-	uint8 zeichen;
-	uint16 count, i = 0, j = 0, index;
-	int16 hoehe;
-	int16 breite;
-	int16 *abmess;
-	header = (pcx_header *)tmp;
-	abmess = (int16 *)speicher;
-	speicher += 4;
-
-	assign_filename(fname, ".pcx");
-
-	if (f.open(filename)) {
-		if (header->load(&f)) {
-			if ((header->id == 10) && (header->version == 5) && (header->bpp == 8)) {
-				hoehe = (header->ymax - header->ymin) + 1;
-				breite = header->bpz * header->planes;
-
-				abmess[0] = breite;
-				abmess[1] = hoehe;
-				f.seek(128L, SEEK_SET);
-				for (i = 0; i < hoehe; i++) {
-					index = 0;
-					while (index < breite) {
-						zeichen = f.readByte();
-						if (((zeichen & 0xc0) == 0xc0) && (header->komp)) {
-							count = zeichen & 0x3f;
-
-							zeichen = f.readByte();
-							for (j = 0; j < count; j++) {
-
-								speicher[index] = zeichen;
-								++index;
-							}
-						} else {
-							speicher[index] = zeichen;
-							index++;
-						}
-					}
-					speicher += breite;
-				}
-				if (!(f.seek(-769L, SEEK_END))) {
-					zeichen = f.readByte();
-					if (zeichen == 12) {
-						f.seek(-768L, SEEK_END);
-						if (f.read(palette, 768) != 768) {
-							fcode = PALETTEFEHLER;
-							modul = DATEI;
-						} else {
-							j = 0;
-							for (i = 0; i < 256; i++) {
-								palette[j] >>= 2;
-								palette[j + 1] >>= 2;
-								palette[j + 2] >>= 2;
-								j += 3;
-							}
-						}
-					} else {
-						fcode = PALETTEFEHLER;
-						modul = DATEI;
-					}
-				}
-			} else {
-				fcode = NOTPCX;
-				modul = DATEI;
-			}
-		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::load_image(const char *fname, byte *sp, byte *palette) {
-	Common::File f;
-	tbf_dateiheader *header;
-	uint16 i = 0;
-	int16 *abmess;
-	byte *speicher;
-	int16 format;
-	header = (tbf_dateiheader *)tmp;
-
-	speicher = sp;
-	abmess = (int16 *)speicher;
-
-	assign_filename(fname, ".tbf");
-
-	if ((speicher) && (palette)) {
-		if (f.open(filename)) {
-			if (header->load(&f)) {
-				format = get_id(header->id);
-				if (format != -1) {
-					for (i = 0; i < 768; i++)
-						palette[i] = header->palette[i];
-					f.seek(tbf_dateiheader::SIZE() + 1, SEEK_SET);
-					switch (format) {
-					case TBFDATEI:
-						abmess[0] = header->width;
-						abmess[1] = header->height;
-						speicher += 4;
-						read_tbf_image(&f, header->komp,
-						    header->entpsize, speicher);
-						break;
-					case TPFDATEI:
-						abmess[0] = header->width;
-						abmess[1] = header->height;
-						speicher += 4;
-						read_tpf_image(&f, header->komp,
-						    header->entpsize, speicher);
-						break;
-					}
-				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
-				}
-			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
-			}
-
-			f.close();
-		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
-		}
-	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
-	}
-}
-
 void datei::load_image(Stream *stream, byte *sp, byte *palette) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	tbf_dateiheader *header;
-	uint16 i = 0;
-	int16 *abmess;
-	byte *speicher;
-	int16 format;
-	ChunkHead ch;
-	header = (tbf_dateiheader *)tmp;
-	speicher = sp;
-	abmess = (int16 *) speicher;
+	tbf_dateiheader *header = (tbf_dateiheader *)tmp;
+	byte *speicher = sp;
+	int16 *abmess = (int16 *)speicher;
 
 	if ((speicher) && (palette) && (rs)) {
 		if (header->load(rs)) {
-			format = get_id(header->id);
+			int16 format = get_id(header->id);
 			if (format != -1) {
-				for (i = 0; i < 768; i++)
+				for (uint16 i = 0; i < 768; i++)
 					palette[i] = header->palette[i];
 				switch (format) {
 				case TBFDATEI:
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tbf_image(rs, header->komp,
-					               header->entpsize, speicher);
+					read_tbf_image(rs, header->komp, header->entpsize, speicher);
 					break;
 				case TPFDATEI:
 					abmess[0] = header->width;
 					abmess[1] = header->height;
 					speicher += 4;
-					read_tpf_image(rs, header->komp,
-					               header->entpsize, speicher);
+					read_tpf_image(rs, header->komp, header->entpsize, speicher);
+					break;
+
+				default:
 					break;
 				}
 			} else {
@@ -245,15 +98,14 @@ void datei::load_image(Stream *stream, byte *sp, byte *palette) {
 		modul = GRAFIK;
 	}
 
+	ChunkHead ch;
 	if (!modul)
 		ch.load(rs);
 }
 
 uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	uint32 tmp1;
-	NewPhead *ph;
-	ph = (NewPhead *)tmp;
+	NewPhead *ph = (NewPhead *)tmp;
 
 	if (rs) {
 		rs->seek(0, SEEK_SET);
@@ -267,7 +119,7 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 					nr = ph->PoolAnz - 1;
 
 				rs->seek(-(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
-				tmp1 = rs->readUint32LE();
+				uint32 tmp1 = rs->readUint32LE();
 				rs->seek(tmp1, SEEK_SET);
 			}
 		}
@@ -277,28 +129,24 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 }
 
 void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
-	Common::File f;
-	taf_dateiheader *header;
 	taf_imageheader iheader;
-	int16 *abmess, komp;
-	int16 id;
-	uint16 sprcount = 0;
-	uint32 size = 0, next = 0, image = 0;
-	byte *speicher;
-	speicher = sp;
-	header = (taf_dateiheader *)tmp;
+	byte *speicher = sp;
+	taf_dateiheader *header = (taf_dateiheader *)tmp;
 
 	assign_filename(fname, ".taf");
 
-	abmess = (int16 *) speicher;
+	int16 *abmess = (int16 *)speicher;
 	speicher += 4;
 	if (abmess) {
+		Common::File f;
 		if (f.open(filename)) {
 			if (header->load(&f)) {
-				id = get_id(header->id);
+				int16 id = get_id(header->id);
 				if (id == TAFDATEI) {
+					uint32 image = 0;
 					if (header->korrekt == 1) {
-						next = header->next;
+						uint32 next = header->next;
+						uint16 sprcount = 0;
 						while ((sprcount <= nr) && (nr <= header->count)) {
 							f.seek(next, SEEK_SET);
 							if (iheader.load(&f)) {
@@ -312,7 +160,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 						}
 					} else {
 						f.seek((-(int)((header->count - nr) * sizeof(uint32))), SEEK_END);
-						next = f.readUint32LE();
+						uint32 next = f.readUint32LE();
 						f.seek(next, SEEK_SET);
 
 						if (iheader.load(&f)) {
@@ -326,8 +174,8 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 
 					abmess[0] = iheader.width;
 					abmess[1] = iheader.height;
-					size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
-					komp = iheader.komp;
+					const uint32 size = (uint32)(iheader.height * iheader.width);
+					int16 komp = iheader.komp;
 					f.seek(image, SEEK_SET);
 					read_tbf_image(&f, komp, size, speicher);
 
@@ -356,28 +204,24 @@ void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher
 }
 
 void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
-	Common::File f;
-	taf_dateiheader *header;
-	taf_imageheader iheader;
-	int16 komp, id;
-	uint16 sprcount, anzahl, *abmess;
-	uint32 size = 0, next = 0, image = 0;
-	byte *speicher;
-	header = (taf_dateiheader *)tmp;
+	taf_dateiheader *header = (taf_dateiheader *)tmp;
 
 	assign_filename(fname, ".taf");
 
-	speicher = hi_sp;
+	byte *speicher = hi_sp;
 	if (speicher) {
+		Common::File f;
 		if (f.open(filename)) {
 			if (header->load(&f)) {
-				id = get_id(header->id);
+				int16 id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->mode == 19)) {
-					next = header->next;
-					anzahl = header->count;
-					for (sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
+					uint32 next = header->next;
+					uint16 anzahl = header->count;
+					uint32 image = 0;
+					for (uint16 sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
 						tinfo->image[sprcount] = speicher;
 						f.seek(next, SEEK_SET);
+						taf_imageheader iheader;
 						if (iheader.load(&f)) {
 							next = iheader.next;
 							image = iheader.image;
@@ -385,13 +229,12 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 							fcode = READFEHLER;
 							modul = DATEI;
 						}
-						abmess = (uint16 *)speicher;
+						uint16 *abmess = (uint16 *)speicher;
 						abmess[0] = iheader.width;
 						abmess[1] = iheader.height;
 						speicher += 4;
-						size = (uint32)((uint32)iheader.height) *
-						       ((uint32)iheader.width);
-						komp = iheader.komp;
+						uint32 size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
+						int16 komp = iheader.komp;
 
 						f.seek(image, SEEK_SET);
 						read_tbf_image(&f, komp, size, speicher);
@@ -418,16 +261,14 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 }
 
 void datei::load_korrektur(const char *fname, int16 *sp) {
-	Common::File f;
 	taf_dateiheader *header = (taf_dateiheader *)tmp;
-	int16 id;
-
 	assign_filename(fname, ".taf");
 
 	if (sp) {
+		Common::File f;
 		if (f.open(filename)) {
 			if (header->load(&f)) {
-				id = get_id(header->id);
+				int16 id = get_id(header->id);
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
 					f.seek(-((int)(header->count * sizeof(int16) * 2) * header->korrekt), SEEK_END);
 					if ((f.size() - f.pos() / 2) < (int16)(header->count * sizeof(int16) * 2)) {
@@ -458,23 +299,18 @@ void datei::load_korrektur(const char *fname, int16 *sp) {
 }
 
 void datei::load_tff(const char *fname, byte *speicher) {
-	Common::File f;
-	tff_header *tff;
-	uint32 size;
-
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
 
 	if (speicher) {
-		if (*filename == 0)
-			get_filename(filename, MAXPATH);
 		if (!strchr(filename, '.'))
 			strcat(filename, ".tff");
 
+		Common::File f;
 		if (f.open(filename)) {
-			tff = (tff_header *)speicher;
+			tff_header *tff = (tff_header *)speicher;
 			if (tff->load(&f)) {
-				size = tff->size;
+				uint32 size = tff->size;
 				if (f.read(speicher + sizeof(tff_header), size) != size) {
 					fcode = READFEHLER;
 					modul = DATEI;
@@ -496,19 +332,15 @@ void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	assert(rs);
 
-	uint32 pos = 0;
-	uint8 value;
-	uint8 count, i;
-	byte *speicher;
-	speicher = sp;
+	byte *speicher = sp;
 
 	if (komp == 1) {
 		// Run length encoding using count/value pairs
-		for (pos = 0; pos < size;) {
-			count = rs->readByte();
-			value = rs->readByte();
+		for (uint32 pos = 0; pos < size;) {
+			uint8 count = rs->readByte();
+			uint8 value = rs->readByte();
 
-			for (i = 0; (i < count) && (pos < size); i++) {
+			for (uint8 i = 0; (i < count) && (pos < size); i++) {
 				speicher[pos] = value;
 				++pos;
 			}
@@ -519,27 +351,22 @@ void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
 	}
 }
 
-void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size,
-                           byte *speicher) {
-	uint32 pos = 0;
-	char zeichen;
-	uint8 count, i = 0;
-	int16 plane;
+void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
 	if (komp == 1) {
-		for (plane = 0; plane < 4; plane++) {
-			for (pos = (uint32)plane; pos < (size + plane);) {
-				count = chewy_fgetc(handle);
-				zeichen = chewy_fgetc(handle);
-				for (i = 0; i < count && pos < (size + plane); i++) {
+		for (int16 plane = 0; plane < 4; plane++) {
+			for (uint32 pos = (uint32)plane; pos < (size + plane);) {
+				uint8 count = chewy_fgetc(handle);
+				char zeichen = chewy_fgetc(handle);
+				for (uint8 i = 0; i < count && pos < (size + plane); i++) {
 					speicher[pos] = zeichen;
 					pos += 4;
 				}
 			}
 		}
 	} else {
-		for (plane = 0; plane < 4; plane++) {
-			for (pos = (uint32) plane; pos < size + plane;) {
-				zeichen = chewy_fgetc(handle);
+		for (int16 plane = 0; plane < 4; plane++) {
+			for (uint32 pos = (uint32)plane; pos < size + plane;) {
+				char zeichen = chewy_fgetc(handle);
 				speicher[pos] = zeichen;
 				pos += 4;
 			}
@@ -547,110 +374,6 @@ void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size,
 	}
 }
 
-void datei::load_dialog(const char *fname, dialogue *dial, menue *men,
-                        knopf *knpf) {
-	Common::File f;
-	int16 i = 0, j = 0;
-	knopf *lknpf;
-	menue *lmen;
-	lknpf = knpf;
-	lmen = men;
-
-	assign_filename(fname, ".tdf");
-
-	if (f.open(filename)) {
-		if (!dial->load(&f)) {
-			fcode = READFEHLER;
-			modul = DATEI;
-		} else {
-			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
-				if (!lmen->load(&f)) {
-					fcode = READFEHLER;
-					modul = DATEI;
-				} else {
-					dial->menueliste[i] = lmen;
-					for (j = 0; (j < lmen->anzknoepfe) && (!modul); j++) {
-						if (!lknpf->load(&f)) {
-							fcode = READFEHLER;
-							modul = DATEI;
-						} else {
-							lmen->knopfliste[j] = lknpf;
-							lknpf++;
-						}
-					}
-					++lmen;
-				}
-			}
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::load_sbi(const char *fname, sbi_inst *speicher) {
-	Common::File f;
-
-	assign_filename(fname, ".sbi");
-
-	if (f.open(filename)) {
-		if (!speicher->load(&f)) {
-			modul = DATEI;
-			fcode = READFEHLER;
-		}
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-	if (strncmp((char *)speicher->id, "SBI", 3)) {
-		modul = DATEI;
-		fcode = NOTSBI;
-	}
-}
-
-uint32 datei::load_voc(const char *fname, byte *speicher) {
-	Common::File f;
-	voc_header *header;
-	uint32 s;
-	byte *sp = nullptr;
-	header = (voc_header *)tmp;
-	sp = speicher;
-
-	assign_filename(fname, ".voc");
-
-	s = size(filename, VOCDATEI);
-
-	if (!modul) {
-		if (f.open(filename)) {
-			if (!header->load(&f)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else {
-				if (strncmp(header->id, "Creative Voice File", 19)) {
-					modul = DATEI;
-					fcode = NOTVOC;
-				} else {
-					f.seek(header->offset, SEEK_SET);
-					if (f.read(sp, s) != s) {
-						modul = DATEI;
-						fcode = READFEHLER;
-					}
-				}
-			}
-
-			f.close();
-		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
-		}
-	}
-
-	return s;
-}
-
 uint32 datei::load_voc(Stream *handle, byte *speicher) {
 	ChunkHead *ch = (ChunkHead *)tmp;
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
@@ -677,57 +400,12 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 	return ch->size;
 }
 
-void datei::load_vocinfo(const char *fname, voc_header *speicher) {
-	Common::File f;
-
-	assign_filename(fname, ".voc");
-
-	if (f.open(filename)) {
-		if (!speicher->load(&f)) {
-			modul = DATEI;
-			fcode = READFEHLER;
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-	if (strncmp(speicher->id, "CREATIVE VOICE FILE", 0x14)) {
-		modul = DATEI;
-		fcode = NOTVOC;
-	}
-}
-
 void datei::void_load(const char *fname, byte *speicher, uint32 size) {
-	Common::File f;
-
 	strncpy(filename, fname, MAXPATH - 1);
 	filename[MAXPATH - 1] = '\0';
 
-	if (f.open(filename)) {
-		if (!f.read(speicher, size)) {
-			modul = DATEI;
-			fcode = READFEHLER;
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-uint32 datei::load_file(const char *fname, byte *speicher) {
 	Common::File f;
-	uint32 size = 0;
-
-	strncpy(filename, fname, MAXPATH - 1);
-	filename[MAXPATH - 1] = '\0';
-
 	if (f.open(filename)) {
-		size = f.size();
-
 		if (!f.read(speicher, size)) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -738,91 +416,12 @@ uint32 datei::load_file(const char *fname, byte *speicher) {
 		fcode = OPENFEHLER;
 		modul = DATEI;
 	}
-
-	return size;
-}
-
-uint32 datei::load_item(Stream *handle, byte *speicher) {
-	ChunkHead *ch;
-	ch = (ChunkHead *) tmp;
-	if (handle) {
-		chewy_fseek(handle, -(int)sizeof(ChunkHead), SEEK_CUR);
-		if (!(chewy_fread(ch, sizeof(ChunkHead), 1, handle))) {
-			modul = DATEI;
-			fcode = READFEHLER;
-		} else {
-			if (!(chewy_fread(speicher, ch->size, 1, handle))) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			}
-		}
-	}
-
-	return ch->size;
-}
-
-uint32 datei::load_tmf(const char *fname, tmf_header *th) {
-	Common::File f;
-	uint32 size = 0;
-	byte *speicher = nullptr;
-	int16 ok, i;
-
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!strchr(filename, '.'))
-		strcat(filename, ".tmf");
-
-	if (f.open(filename)) {
-		size = f.size();
-
-		if (!th->load(&f)) {
-			modul = DATEI;
-			fcode = READFEHLER;
-		} else {
-			size -= tmf_header::SIZE();
-			speicher = (byte *)th + sizeof(tmf_header);
-			ok = 0;
-			if (!strncmp(th->id, "TMF", 3))
-				ok = 1;
-			if (!ok) {
-				modul = DATEI;
-				fcode = NOTTBF;
-			}
-		}
-		if (!modul) {
-			if (f.read(speicher, size) != size) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			}
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-
-	if (!modul) {
-		speicher = (byte *)th;
-		speicher += sizeof(tmf_header);
-		speicher += ((uint32)th->pattern_anz) * 1024l;
-		for (i = 0; i < 31; i++) {
-			if (th->instrument[i].laenge) {
-				th->ipos[i] = speicher;
-				speicher += th->instrument[i].laenge;
-			}
-		}
-	}
-
-	return size + sizeof(tmf_header);
 }
 
 uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead *ch = (ChunkHead *)tmp;
-	byte *speicher = nullptr;
 	uint32 size = 0;
-	int16 i;
 
 	if (rs) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
@@ -838,9 +437,9 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 					fcode = READFEHLER;
 				} else {
 					size = ch->size + sizeof(tmf_header);
-					speicher = (byte *)song + sizeof(tmf_header);
+					byte *speicher = (byte *)song + sizeof(tmf_header);
 					speicher += ((uint32)song->pattern_anz) * 1024l;
-					for (i = 0; i < 31; ++i) {
+					for (int16 i = 0; i < 31; ++i) {
 						if (song->instrument[i].laenge) {
 							song->ipos[i] = speicher;
 							speicher += song->instrument[i].laenge;
@@ -857,356 +456,14 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	return size;
 }
 
-void datei::save_pcx(const char *fname, byte *speicher, byte *palette) {
-	Stream *handle;
-	pcx_header *header;
-
-	byte *line_ptr, *sptr;
-	uint16 i;
-	int16 curr_data;
-	int16 prev_data;
-	int16 data_count;
-	int16 line_count;
-	int16 hoehe;
-	int16 breite;
-	int16 *abmess;
-	header = (pcx_header *)tmp;
-	abmess = (int16 *)speicher;
-	sptr = speicher + 4;
-
-	assign_filename(fname, ".pcx");
-
-	breite = abmess[0];
-	hoehe = abmess[1];
-
-	header->id = 10;
-	header->version = 5;
-	header->bpp = 8;
-	header->bpz = breite;
-	header->planes = 1;
-	header->screenx = breite;
-	header->screeny = hoehe;
-	header->hodpi = breite;
-	header->verdpi = hoehe;
-	header->xmax = breite - 1;
-	header->xmin = 0;
-	header->ymax = hoehe - 1;
-	header->ymin = 0;
-	header->komp = 1;
-	header->reserviert = 0;
-	header->palinfo = 1;
-	handle = chewy_fopen(filename, "wb");
-	if (handle) {
-		if (chewy_fwrite(header, sizeof(pcx_header), 1, handle)) {
-			chewy_fseek(handle, 128L, SEEK_SET);
-			line_ptr = sptr;
-			for (i = 0; i < hoehe; i++) {
-				prev_data = *line_ptr++;
-				data_count = 1;
-				line_count = 1;
-
-				while (line_count < breite) {
-					curr_data = *line_ptr++;
-					line_count++;
-					if (curr_data == prev_data) {
-						data_count++;
-						if (data_count == 0x3f) {
-							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-								chewy_fputc(0xc0 | data_count, handle);
-							chewy_fputc(prev_data, handle);
-							data_count = 0;
-						}
-					} else {
-						if (data_count > 0) {
-							if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-								chewy_fputc(0xc0 | data_count, handle);
-							chewy_fputc(prev_data, handle);
-						}
-						prev_data = curr_data;
-						data_count = 1;
-					}
-				}
-				if (data_count > 0) {
-					if (((prev_data & 0xc0) == 0xc0) || data_count > 1)
-						chewy_fputc(0xc0 | data_count, handle);
-					chewy_fputc(prev_data, handle);
-				}
-			}
-			chewy_fputc(12, handle);
-			for (i = 0; i < 768; i++)
-				chewy_fputc(palette[i] << 2, handle);
-		} else {
-			fcode = WRITEFEHLER;
-			modul = DATEI;
-		}
-		chewy_fclose(handle);
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::save_tafmcga(const char *fname, byte **spvekt, byte *palette,
-                         int16 komp, int16 *korrektur) {
-	Stream *handle;
-	taf_dateiheader *header;
-	taf_imageheader iheader;
-	uint16 i = 0;
-	uint16 sprcount = 0;
-	int16 *abmess;
-	byte *speicher;
-	uint32 size = 0, allsize = 0, next = 0;
-	header = (taf_dateiheader *)tmp;
-
-	assign_filename(fname, ".taf");
-
-	handle = chewy_fopen(filename, "wb");
-	if (handle) {
-		strncpy(header->id, "TAF\0", 4);
-		header->mode = 19;
-		for (i = 0; i < 768; i++)
-			header->palette[i] = palette[i];
-		chewy_fseek(handle, sizeof(taf_dateiheader) + 1, SEEK_SET);
-		header->next = chewy_ftell(handle);
-		abmess = (int16 *) spvekt[sprcount];
-		speicher = spvekt[sprcount];
-		speicher += 4;
-		next = chewy_ftell(handle);
-		while ((abmess != 0) && (sprcount < MAXSPRITE)) {
-			chewy_fseek(handle, next + (sizeof(taf_imageheader) + 1), SEEK_SET);
-			iheader.image = chewy_ftell(handle);
-			iheader.komp = komp;
-			iheader.width = abmess[0];
-			iheader.height = abmess[1];
-			size = (uint32)((long)iheader.height) * ((long)iheader.width);
-			allsize += size;
-			write_tbf_image(handle, komp, size, speicher);
-			if (!modul) {
-				iheader.next = chewy_ftell(handle);
-				chewy_fseek(handle, next, SEEK_SET);
-				if (!chewy_fwrite(&iheader, sizeof(taf_imageheader), 1, handle)) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
-				}
-				next = iheader.next;
-			}
-			++sprcount;
-			abmess = (int16 *) spvekt[sprcount];
-			speicher = spvekt[sprcount];
-			speicher += 4;
-		}
-		header->allsize = allsize;
-		header->count = sprcount;
-		if (!korrektur)
-			header->korrekt = 0;
-		else {
-			header->korrekt = 1;
-			chewy_fseek(handle, 0l, SEEK_END);
-			if (!chewy_fwrite(korrektur, 4 * sprcount, 1, handle)) {
-				fcode = WRITEFEHLER;
-				modul = DATEI;
-			}
-		}
-		chewy_fseek(handle, 0L, SEEK_SET);
-		if (!chewy_fwrite(header, sizeof(taf_dateiheader), 1, handle)) {
-			fcode = WRITEFEHLER;
-			modul = DATEI;
-		}
-		chewy_fclose(handle);
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::save_tff(const char *fname, byte *speicher) {
-	Stream *handle;
-	uint32 size;
-	tff_header *tff= (tff_header *)speicher;
-
-	assign_filename(fname, ".tff");
-
-	if (speicher) {
-		handle = chewy_fopen(filename, "wb");
-		if (handle) {
-			tff->size = (uint32)tff->count * ((uint32)(tff->width / 8) *
-			                                       (uint32)tff->height);
-			size = tff->size + sizeof(tff_header);
-			if (!(chewy_fwrite(speicher, (size_t)size, 1, handle))) {
-				fcode = WRITEFEHLER;
-				modul = DATEI;
-			}
-			chewy_fclose(handle);
-		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
-		}
-	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
-	}
-}
-
-void datei::write_tbf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
-	uint32 pos = 0;
-	int16 fehler;
-	uint8 zeichen;
-	uint8 count;
-	if (komp == 1) {
-		for (pos = 0; pos < size;) {
-			count = 0;
-			zeichen = speicher[pos];
-			while (speicher[pos] == zeichen && count < 254 && pos < size) {
-				++pos;
-				++count;
-			}
-			fehler = chewy_fputc((int16)count, handle);
-			fehler = chewy_fputc((int16)zeichen, handle);
-			if (fehler == EOF) {
-				fcode = WRITEFEHLER;
-				modul = DATEI;
-				break;
-			}
-		}
-	} else {
-		if (!chewy_fwrite(speicher, size, 1, handle)) {
-			fcode = WRITEFEHLER;
-			modul = DATEI;
-		}
-	}
-}
-
-void datei::save_dialog(const char *fname, dialogue *dial) {
-	Stream *handle;
-	menue *men;
-	knopf *knpf;
-	int16 i = 0, j = 0;
-
-	assign_filename(fname, ".tdf");
-
-	handle = chewy_fopen(filename, "wb");
-	if (handle) {
-		strncpy(dial->id, "TDF\0", 4);
-		if (!(chewy_fwrite(dial, sizeof(dialogue), 1, handle))) {
-			fcode = WRITEFEHLER;
-			modul = DATEI;
-		} else {
-			for (i = 0; (i < dial->anzmenue) && (!modul); i++) {
-				men = dial->menueliste[i];
-				if (!(chewy_fwrite(men, sizeof(menue), 1, handle))) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
-				} else {
-					for (j = 0; (j < men->anzknoepfe) && (!modul); j++) {
-						knpf = men->knopfliste[j];
-						if (knpf != 0) {
-							if (!(chewy_fwrite(knpf, sizeof(knopf), 1, handle))) {
-								fcode = WRITEFEHLER;
-								modul = DATEI;
-							}
-						}
-					}
-				}
-			}
-		}
-		chewy_fclose(handle);
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::save_tmf(const char *fname, tmf_header *thead) {
-	uint16 i = 0;
-	char *sp;
-	sp = (char *)thead;
-	sp += sizeof(tmf_header);
-
-	assign_filename(fname, ".tmf");
-
-	Stream *handle = chewy_fopen(filename, "wb");
-	if (handle) {
-		if ((chewy_fwrite(thead, sizeof(tmf_header), 1, handle))) {
-			for (i = 0; (i < thead->pattern_anz) && (!modul); i++) {
-				if (!(chewy_fwrite(sp, 1024, 1, handle))) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
-				}
-				sp += 1024;
-			}
-			for (i = 0; (i < 31) && (!modul); i++) {
-				if (thead->instrument[i].laenge) {
-					if (!(chewy_fwrite(thead->ipos[i], (size_t)thead->instrument[i].laenge, 1,
-					             handle))) {
-						fcode = WRITEFEHLER;
-						modul = DATEI;
-					}
-				}
-			}
-		} else {
-			fcode = WRITEFEHLER;
-			modul = DATEI;
-		}
-		chewy_fclose(handle);
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
-void datei::get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz) {
-	menue men;
-	int16 i = 0;
-	dialogue dial;
-	*menueanz = 0;
-	*knopfanz = 0;
-
-	assign_filename(fname, ".tdf");
-
-	Common::File f;
-	if (f.open(filename)) {
-		if (!dial.load(&f)) {
-			fcode = READFEHLER;
-			modul = DATEI;
-		} else {
-			if ((!(strncmp(dial.id, "TDF", 3)))) {
-				*menueanz = dial.anzmenue;
-				for (i = 0; (i < dial.anzmenue) && (!modul); i++) {
-					if (!men.load(&f)) {
-						fcode = READFEHLER;
-						modul = DATEI;
-					} else {
-						*knopfanz += men.anzknoepfe;
-						f.seek(men.anzknoepfe * knopf::SIZE(), SEEK_CUR);
-					}
-				}
-			}
-		}
-
-		f.close();
-	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-	}
-}
-
 uint32 datei::size(const char *fname, int16 typ) {
-	Common::File f;
-	tbf_dateiheader *tbfheader;
-	tff_header tff;
-	pcx_header *pcxheader;
-	mod_header *mh;
-	uint16 hoehe, breite;
 	uint32 size = 0;
-	int16 id = 0;
-	tbfheader = (tbf_dateiheader *)tmp;
-	pcxheader = (pcx_header *) tmp;
-	mh = (mod_header *)tmp;
+	tbf_dateiheader *tbfheader = (tbf_dateiheader *)tmp;
+	pcx_header *pcxheader = (pcx_header *)tmp;
+	mod_header *mh = (mod_header *)tmp;
 
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
 
 	if (!strchr(filename, '.')) {
 		switch (typ) {
@@ -1230,17 +487,20 @@ uint32 datei::size(const char *fname, int16 typ) {
 			strcat(filename, ".tmf");
 			typ = 300;
 			break;
+		default:
+			break;
 		}
 	}
 
 	// SCUMMVM: Note to self, use sizeof(structures) for
 	// allocating size, not custom ::SIZE() functions
+	Common::File f;
 	if (f.open(filename)) {
 		switch (typ) {
 		case TBFDATEI:
 		case TPFDATEI:
 			if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
-				id = get_id(tbfheader->id);
+				int16 id = get_id(tbfheader->id);
 				if ((id == TBFDATEI) || (id == TPFDATEI)) {
 					size = tbfheader->entpsize + 4;
 				} else {
@@ -1258,8 +518,8 @@ uint32 datei::size(const char *fname, int16 typ) {
 			if (chewy_fread(pcxheader, sizeof(pcx_header), 1, &f)) {
 				if ((pcxheader->id == 10) && (pcxheader->version == 5)
 				        && (pcxheader->bpp == 8)) {
-					hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
-					breite = pcxheader->bpz * pcxheader->planes;
+					uint16 hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
+					uint16 breite = pcxheader->bpz * pcxheader->planes;
 					size = (uint32)((long)hoehe) * ((long)breite) + 4;
 				} else {
 					fcode = NOTTBF;
@@ -1272,9 +532,10 @@ uint32 datei::size(const char *fname, int16 typ) {
 			}
 			break;
 
-		case TFFDATEI:
+		case TFFDATEI: {
+			tff_header tff;
 			if (tff.load(&f)) {
-				id = get_id(tff.id);
+				int16 id = get_id(tff.id);
 				if (id == TFFDATEI) {
 					size = tff.size + sizeof(tff_header);
 				} else {
@@ -1285,15 +546,16 @@ uint32 datei::size(const char *fname, int16 typ) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			}
+			}
 			break;
 
 		case VOCDATEI:
 			size = (uint32)f.size() - sizeof(voc_header);
 			break;
 
-		case MODDATEI:
+		case MODDATEI: {
 			size = (uint32)f.size();
-			id = 0;
+			int16 id = 0;
 
 			if (chewy_fread(mh, sizeof(mod_header), 1, &f)) {
 				if (!strncmp(mh->id, "M.K.", 4))
@@ -1310,6 +572,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 			else
 				size -= (uint32)sizeof(mod15_header);
 			size += sizeof(tmf_header);
+			}
 			break;
 
 		default:
@@ -1328,14 +591,10 @@ uint32 datei::size(const char *fname, int16 typ) {
 }
 
 uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
-	Common::File f;
-	NewPhead *Nph;
-	ChunkHead ch;
-	int16 i;
-	uint32 size;
-	Nph = (NewPhead *)tmp;
-	size = 0;
+	NewPhead *Nph = (NewPhead *)tmp;
+	uint32 size = 0;
 
+	Common::File f;
 	if (f.open(fname)) {
 		if (!Nph->load(&f)) {
 			modul = DATEI;
@@ -1345,8 +604,8 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 				select_pool_item(&f, chunk_start);
 				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
 
-				for (i = chunk_start; (i < Nph->PoolAnz) && (!modul)
-				        && i < (chunk_start + chunk_anz); i++) {
+				for (int16 i = chunk_start; (i < Nph->PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
+					ChunkHead ch;
 					if (!ch.load(&f)) {
 						modul = DATEI;
 						fcode = READFEHLER;
@@ -1371,18 +630,16 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 }
 
 uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
-	Common::File tafFile;
 	uint32 size = 0;
-	int16 id;
-	taf_dateiheader *tdh;
-	tdh = (taf_dateiheader *)tmp;
+	taf_dateiheader *tdh = (taf_dateiheader *)tmp;
 	*tafheader = tdh;
 
 	assign_filename(fname, ".taf");
 
+	Common::File tafFile;
 	if (tafFile.open(filename)) {
 		if (tdh->load(&tafFile)) {
-			id = get_id(tdh->id);
+			int16 id = get_id(tdh->id);
 			if ((id == TAFDATEI) && (tdh->mode == 19)) {
 				size = tdh->allsize + (((uint32)tdh->count) * 8l);
 
@@ -1409,23 +666,14 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 }
 
 void datei::load_palette(const char *fname, byte *palette, int16 typ) {
-	Common::File f;
-	uint8 zeichen;
-	uint16 j = 0, i;
-	tbf_dateiheader *tbfheader;
-	taf_dateiheader *tafheader;
-	pcx_header *pcxheader;
-	int16 id;
-
-	tbfheader = (tbf_dateiheader *)tmp;
-	pcxheader = (pcx_header *)tmp;
-	tafheader = (taf_dateiheader *)tmp;
+	tbf_dateiheader *tbfheader = (tbf_dateiheader *)tmp;
+	pcx_header *pcxheader = (pcx_header *)tmp;
+	taf_dateiheader *tafheader = (taf_dateiheader *)tmp;
 
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
-	if (!filename[0])
-		get_filename(filename, MAXPATH);
 
+	Common::File f;
 	if (!strchr(filename, '.')) {
 		switch (typ) {
 		case TBFDATEI:
@@ -1450,10 +698,10 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 			case TBFDATEI:
 			case TPFDATEI:
 				if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
-					id = get_id(tbfheader->id);
+					int16 id = get_id(tbfheader->id);
 					if (((id == TBFDATEI) || (id == TPFDATEI)) &&
 					        (tbfheader->mode == 19)) {
-						for (i = 0; i < 768; i++)
+						for (uint16 i = 0; i < 768; i++)
 							palette[i] = tbfheader->palette[i];
 					} else {
 						fcode = NOTTBF;
@@ -1470,15 +718,15 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 					if ((pcxheader->id == 10) && (pcxheader->version == 5)
 					        && (pcxheader->bpp == 8)) {
 						if (!f.seek(-769L, SEEK_END)) {
-							zeichen = f.readByte();
+							uint8 zeichen = f.readByte();
 							if (zeichen == 12) {
 								f.seek(-768L, SEEK_END);
 								if ((chewy_fread(palette, 768, 1, &f)) != 1) {
 									fcode = PALETTEFEHLER;
 									modul = DATEI;
 								} else {
-									j = 0;
-									for (i = 0; i < 255; i++) {
+									uint16 j = 0;
+									for (uint16 i = 0; i < 255; i++) {
 										palette[j] >>= 2;
 										palette[j + 1] >>= 2;
 										palette[j + 2] >>= 2;
@@ -1502,9 +750,9 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 
 			case TAFDATEI:
 				if (tafheader->load(&f)) {
-					id = get_id(tafheader->id);
+					int16 id = get_id(tafheader->id);
 					if ((id == TAFDATEI) && (tafheader->mode == 19)) {
-						for (i = 0; i < 768; i++)
+						for (uint16 i = 0; i < 768; i++)
 							palette[i] = tafheader->palette[i];
 					} else {
 						fcode = NOTTBF;
@@ -1529,55 +777,21 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 	}
 }
 
-void datei::load_palette(Stream *handle, byte *palette) {
-	tbf_dateiheader *header;
-	uint16 i = 0;
-	int format;
-	header = (tbf_dateiheader *)tmp;
-	if (palette) {
-		if (handle) {
-			if (chewy_fread(header, sizeof(tbf_dateiheader), 1, handle)) {
-				format = get_id(header->id);
-				if (format != -1) {
-					for (i = 0; i < 768; i++)
-						palette[i] = header->palette[i];
-					chewy_fseek(handle, -(int)sizeof(tbf_dateiheader), SEEK_CUR);
-				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
-				}
-			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
-			}
-		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
-		}
-	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
-	}
-}
-
 void datei::imsize(const char *fname, uint32 *svekt) {
-	Common::File f;
-	taf_dateiheader *header;
-	taf_imageheader iheader;
-	uint16 sprcount = 0;
-	uint32 next = 0;
-	int16 id;
-	header = (taf_dateiheader *)tmp;
+	taf_dateiheader *header = (taf_dateiheader *)tmp;
 
 	assign_filename(fname, ".taf");
 
+	Common::File f;
 	if (f.open(filename)) {
 		if (header->load(&f)) {
-			id = get_id(header->id);
+			int16 id = get_id(header->id);
 			if ((id == TAFDATEI) && (header->mode == 19)) {
-				next = header->next;
+				uint32 next = header->next;
+				uint16 sprcount = 0;
 				while (sprcount < header->count) {
 					f.seek(next, SEEK_SET);
+					taf_imageheader iheader;
 					if (iheader.load(&f)) {
 						next = iheader.next;
 						svekt[sprcount] = (uint32)iheader.width * (uint32)iheader.height;
@@ -1597,134 +811,8 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 	}
 }
 
-int16 datei::get_filename(const char *fname, int16 maxlen) {
-	warning("STUB - get_filename");
-
-	int16 ret = 0;
-#if 0
-	char z = 0;
-	debugN("Dateiname: ");
-	while ((z != 27) && (z != 13) && (ret < maxlen)) {
-		z = getch();
-		if ((((z & 0xdf) >= 65) && ((z & 0xdf) <= 90))) {
-			z &= 0xdf;
-			debugN("%c", z);
-			fname[ret] = z;
-			ret += 1;
-		} else if ((z >= 0x30) && (z <= 0x39)) {
-			debugN("%c", z);
-			fname[ret] = z;
-			ret += 1;
-		} else if (z == 92) {
-			debugN("%c", z);
-			fname[ret] = '\\';
-			ret += 1;
-		} else if (z == 46) {
-			debugN("%c", z);
-			fname[ret] = z;
-			ret += 1;
-		} else if (z == 58) {
-			debugN("%c", z);
-			fname[ret] = z;
-			ret += 1;
-		} else if (z == 8) {
-			debugN("%c", z);
-			debugN("%c", 32);
-			debugN("%c", 8);
-			if (ret > 0)
-				ret -= 1;
-		} else if ((z != 13) && (z != 27))
-			debugN("%c", 7);
-	}
-	fname[ret] = 0;
-	debugN("\n");
-	if (z == 27)
-		ret = 0;
-#endif
-	return ret;
-}
-
-void datei::respfad(char *respath, char *resdir) {
-	warning("STUB: respfad()");
-
-#if 0
-	getcwd(respath, MAXPATH);
-	strcat(respath, "/");
-	strcat(respath, resdir);
-	strcat(respath, "/");
-#endif
-}
-
-void datei::res2dname(char *respath, char *fnme, char *dtname) {
-	strcpy(fnme, respath);
-	strcat(fnme, dtname);
-}
-
-void datei::cwd(char *buf, int16 buflen) {
-	warning("STUB: cwd()");
-
-#if 0
-	getcwd(buf, buflen);
-#endif
-}
-
-void datei::cd(char *dir) {
-	warning("STUB: cd()");
-
-#if 0
-	char tmpname[16] = {0};
-	strncpy(tmpname, "cd ", 3);
-	strcat(tmpname, dir);
-	system(tmpname);
-#endif
-}
-
-void datei::write_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
-	uint32 pos = 0;
-	int16 fehler;
-	uint8 zeichen;
-	uint8 count;
-	int16 plane;
-	if (komp == 1) {
-		plane = 0;
-		while (plane <= 3) {
-			for (pos = plane; pos < (size);) {
-				count = 0;
-				zeichen = speicher[pos];
-				while ((speicher[pos] == zeichen) && (count < 255) && (pos < (size))) {
-					pos += 4;
-					++count;
-				}
-				fehler = chewy_fputc(count, handle);
-				fehler = chewy_fputc(zeichen, handle);
-				if (fehler == EOF) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
-					break;
-				}
-			}
-			++plane;
-		}
-	} else {
-		plane = 0;
-		while (plane <= 3) {
-			for (pos = plane; pos < (size); pos += 4) {
-				zeichen = speicher[pos];
-				fehler = chewy_fputc(zeichen, handle);
-				if (fehler == EOF) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
-					break;
-				}
-			}
-			++plane;
-		}
-	}
-}
-
 int16 datei::get_id(char *id_code) {
-	int16 id;
-	id = -1;
+	int16 id = -1;
 	if (!(scumm_strnicmp(id_code, "TBF", 3)))
 		id = TBFDATEI;
 	if (!(scumm_strnicmp(id_code, "TPF", 3)))
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index a1a131cdb70..3ccab2c9cf9 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -23,7 +23,6 @@
 #define CHEWY_DATEI_H
 
 #include "chewy/chewy.h"
-#include "chewy/file.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -35,8 +34,6 @@ public:
 	datei();
 	~datei();
 
-	void load_pcx(const char *fname, byte *speicher, byte *palette);
-	void load_image(const char *fname, byte *sp, byte *palette);
 	void load_tafmcga(const char *fname, byte *sp, int16 nr);
 
 	void load_image(Stream *stream, byte *sp, byte *palette);
@@ -44,39 +41,18 @@ public:
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
 	void read_tpf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
 	uint32 load_voc(Stream *stream, byte *speicher);
-	uint32 load_item(Stream *stream, byte *speicher);
 	uint32 load_tmf(Stream *stream, tmf_header *song);
-	void write_tbf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
-	void write_tpf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
-	void load_palette(Stream *stream, byte *palette);
 
 	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
 	void load_korrektur(const char *fname, int16 *sp);
 	void load_tff(const char *fname, byte *speicher);
-	void load_dialog(const char *fname, dialogue *dial, menue *men, knopf *knpf);
-	void load_sbi(const char *fname, sbi_inst *speicher);
-	uint32 load_voc(const char *fname, byte *speicher);
-	void load_vocinfo(const char *fname, voc_header *speicher);
 	void void_load(const char *fname, byte *speicher, uint32 size);
-	uint32 load_file(const char *fname, byte *speicher);
-	uint32 load_tmf(const char *fname, tmf_header *th);
-	void save_pcx(const char *fname, byte *speicher, byte *palette);
-	void save_tafmcga(const char *fname, byte **spvekt, byte *palette, int16 komp, int16 *korrektur);
-	void save_tff(const char *fname, byte *speicher);
-	void save_dialog(const char *fname, dialogue *dial);
-	void save_tmf(const char *fname, tmf_header *thead);
-	void get_tdfanz(const char *fname, int16 *menueanz, int16 *knopfanz);
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
 	void load_palette(const char *fname, byte *palette, int16 typ);
 	void imsize(const char *fname, uint32 *svekt);
 
-	short get_filename(const char *fname, int16 maxlen);
-	void respfad(char *respath, char *resdir);
-	void res2dname(char *respath, char *fnme, char *dtname);
-	void cwd(char *buf, int16 buflen);
-	void cd(char *dir);
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
 	void read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp);


Commit: b880a40b15ba19322cb4531e63c8c9b86002aa32
    https://github.com/scummvm/scummvm/commit/b880a40b15ba19322cb4531e63c8c9b86002aa32
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Remove debug, reduce some variable scopes, fix a couple of variable types

Changed paths:
  R engines/chewy/debug.cpp
  R engines/chewy/debug.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/module.mk
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 681f5be3092..9bc1dec49e2 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -327,8 +327,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 			atdshandle[mode] = rs;
 			atdsmem[mode] = tmp_adr;
 			atdspooloff[mode] = chunk_start;
-			switch (mode) {
-			case INV_USE_DATEI:
+			if (mode == INV_USE_DATEI) {
 				mem->file->select_pool_item(rs, atdspooloff[mode]);
 				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
@@ -352,8 +351,6 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 						inv_use_mem[Ch.size + 2] = (char)BLOCKENDE;
 					}
 				}
-				break;
-
 			}
 		}
 	} else
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index e63ab423903..13ad86ba43a 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -22,8 +22,6 @@
 #ifndef CHEWY_ATDS_H
 #define CHEWY_ATDS_H
 
-#include "chewy/file.h"
-
 namespace Chewy {
 
 #define ATDS_VOC_OFFSET 20
@@ -278,8 +276,7 @@ public:
 	void close_handle(int16 mode);
 	void crypt(char *txt, uint32 size);
 	void init_ats_mode(int16 mode, uint8 *atsheader);
-	bool start_ats(int16 txt_nr, int16 txt_mode, int16 color,
-	                int16 mode, int16 *voc_nr);
+	bool start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr);
 	void stop_ats();
 	int16 ats_get_status();
 	void print_ats(int16 x, int16 y, int16 scrx, int16 scry);
@@ -289,8 +286,7 @@ public:
 	void set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode);
 	void set_ats_str(int16 txt_nr, int16 str_nr, int16 mode);
 	int16 get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode);
-	char *ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz,
-	                  int16 mode);
+	char *ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mode);
 	char *ats_search_block(int16 txt_mode, char *txt_adr);
 	void ats_search_nr(int16 txt_nr, char **str);
 	void ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str);
@@ -299,8 +295,7 @@ public:
 	void stop_aad();
 	void print_aad(int16 scrx, int16 scry);
 	int16 aad_get_status();
-	void set_string_end_func
-	(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode));
+	void set_string_end_func(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode));
 	void aad_search_dia(int16 dia_nr, char **ptr);
 	int16 aad_get_zeilen(char *str, int16 *txt_len);
 	bool ads_start(int16 dia_nr);
@@ -318,7 +313,7 @@ public:
 	int16 check_item(int16 block_nr, int16 item_nr);
 	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
 	int16 get_stereo_pos(int16 x);
-	void set_unknown(int16 nr) {
+	void set_unknown(bool nr) {
 		atdsv._field12 = nr;
 	}
 
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 2a30e31c6b6..687e232c252 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -130,10 +130,8 @@ void cursor::move(int16 x, int16 y) {
 	}
 }
 
-void cursor::wait_taste_los(int16 maus_plot) {
-	int16 is_mouse, stay;
-	int16 switch_code;
-	is_mouse = 0;
+void cursor::wait_taste_los(bool maus_plot) {
+	int16 is_mouse = 0;
 	if (maus_da) {
 		g_events->update();
 		is_mouse = minfo->button;
@@ -141,8 +139,8 @@ void cursor::wait_taste_los(int16 maus_plot) {
 
 	if (!is_mouse)
 		in->hot_key = 0;
-	stay = 1;
-	switch_code = 1;
+	int16 stay = 1;
+	int16 switch_code = 1;
 
 	while ((switch_code != 0) && (stay)) {
 		switch_code = in->get_switch_code();
@@ -158,10 +156,4 @@ void cursor::wait_taste_los(int16 maus_plot) {
 	}
 }
 
-void cursor::wait_taste(int16 maus_plot) {
-	while (in->get_switch_code() == 0)
-		if (maus_plot != false)
-			plot_cur();
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 0d50275a677..73dcfb19035 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -44,8 +44,7 @@ public:
 	void set_cur_ani(cur_ani *ani);
 
 	void move(int16 x, int16 y);
-	void wait_taste_los(int16 maus_plot);
-	void wait_taste(int16 maus_plot);
+	void wait_taste_los(bool maus_plot);
 
 	mcga_grafik *out = nullptr;
 	maus *in = nullptr;
diff --git a/engines/chewy/debug.cpp b/engines/chewy/debug.cpp
deleted file mode 100644
index 1d2c95507c3..00000000000
--- a/engines/chewy/debug.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "chewy/defines.h"
-#include "chewy/global.h"
-#include "chewy/debug.h"
-
-namespace Chewy {
-
-void look_debug_action(int16 key_nr) {
-	int16 ende;
-#define TXT_MARK_NAME 0
-#define TXT_MARK_LOOK 1
-#define TXT_MARK_USE 2
-#define TXT_MARK_WALK 3
-#define TXT_MARK_TALK 4
-	switch (key_nr) {
-	case I_KEY:
-	case I_KEY + ALT:
-		ende = 0;
-		while (!ende) {
-			switch (in->get_switch_code()) {
-			case ENTER:
-			case ESC:
-				ende = 1;
-				break;
-
-			case ALT + ENTER:
-//				look_icm_action();
-				break;
-			}
-
-			SHOULD_QUIT_RETURN;
-		}
-		break;
-
-	case F1_KEY + ALT:
-		warning("Removed : get memory");
-		break;
-
-	case F2_KEY +ALT:
-//		get_maus_speed();
-		break;
-
-	case F3_KEY +ALT:
-//		room->cache_test(&room_blk);
-		break;
-
-	case F4_KEY +ALT:
-//		taf_sequence_test();
-		break;
-
-	case T_KEY + ALT:
-//		timer_test();
-		break;
-
-	case H_KEY + ALT:
-//		draw_help_win(1);
-		break;
-
-	case H_KEY:
-//		draw_help_win(2);
-		break;
-
-	case F_KEY + ALT:
-		show_frame ^= 1;
-		cur->wait_taste_los(0);
-		break;
-
-	}
-}
-
-void test_load(void *handle, taf_info *Tt, int16 anz) {
-	warning("STUB - test_load");
-#if 0
-	int16 ende;
-	int16 ende1;
-	int16 i;
-	int16 tmp1, tmp2;
-	int16 str_anz;
-	int16 x, y;
-	int16 abfrage;
-	int16 spr;
-	int16 action;
-	int16 *Cxy;
-	char c[] = {
-		"Erstes Sprite : \0"
-		"Anzahl Sprites : \0"
-	};
-	str_anz = 2;
-	ende = 0;
-	out->setze_zeiger(0);
-	while (!ende) {
-		out->printxy(0, 0, 255, 0, 0, "F1 Bereich laden\0");
-		out->printxy(0, 10, 255, 0, 0, "F2 Sprites anzeigen\0");
-		out->printxy(0, 20, 255, 0, 0, "F3 Bereich löschen\0");
-		SHOULD_QUIT_RETURN;
-
-		switch (in->get_switch_code()) {
-		case ESC :
-			ende = 1;
-			break;
-
-		case F1_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			in ->alter_kb_handler();
-			tmp1 = 0;
-			tmp2 = 0;
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp1);
-			abfrage = out->scanxy(x + 96, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp2);
-			if (abfrage != 27) {
-				det->load_taf_seq(handle, tmp1, tmp2, Tt);
-				ERROR
-			}
-			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-			in ->neuer_kb_handler(&kbinfo);
-			break;
-
-		case F2_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, 1, 10, c, 0);
-			in ->alter_kb_handler();
-			spr = 0;
-			for (i = 0; i < 1; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &spr);
-			in ->neuer_kb_handler(&kbinfo);
-			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-			SHOULD_QUIT_RETURN;
-
-			if (abfrage != 27) {
-				ende1 = 0;
-				action = 1;
-				while (!ende1) {
-					switch (kbinfo.scan_code) {
-					case ESC:
-						ende1 = 1;
-						break;
-
-					case PLUS:
-						if (spr >= anz - 1)
-							spr = 0;
-						else
-							++spr;
-						action = 1;
-						break;
-
-					case MINUS:
-						if (spr > 0)
-							--spr;
-						else
-							spr = anz - 1;
-						action = 1;
-						break;
-
-					}
-					if (action) {
-						kbinfo.scan_code = Common::KEYCODE_INVALID;
-						action = 0;
-						out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-						if (Tt->image[spr] != 0) {
-							Cxy = Tt->korrektur + (spr << 1);
-							out->sprite_set(Tt->image[spr], 100 + Cxy[0], 60 + Cxy[1], 0);
-						}
-						out->printxy(0, 0, 255, 0, 0, "Sprite Nr:%d\0", spr);
-					}
-				}
-			}
-			in ->neuer_kb_handler(&kbinfo);
-			break;
-
-		case F3_KEY:
-			x = 160;
-			y = 100;
-			auto_menu(&x, &y, str_anz, 10, c, 0);
-			in ->alter_kb_handler();
-			tmp1 = 0;
-			tmp2 = 0;
-			for (i = 0; i < str_anz; i++)
-				out->printxy(x, y + i * 10, 14, 300, scr_width, txt->str_pos(c, i));
-			abfrage = out->scanxy(x + 96, y, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp1);
-			abfrage = out->scanxy(x + 96, y + 10, 14, 60, 6, scr_width, "%[0-9]3d\0", &tmp2);
-			if (abfrage != 27) {
-				det->del_taf_tbl(tmp1, tmp2, Tt);
-				ERROR
-			}
-			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-			in ->neuer_kb_handler(&kbinfo);
-			break;
-		}
-	}
-#endif
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/debug.h b/engines/chewy/debug.h
deleted file mode 100644
index e0ca890b7eb..00000000000
--- a/engines/chewy/debug.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_DEBUG_H
-#define CHEWY_DEBUG_H
-
-namespace Chewy {
-
-void get_room_nr();
-
-void room_info();
-
-void plot_auto_mov(int16 mode);
-
-void go_auto_mov();
-
-void plot_maus();
-void plot_rect();
-void get_auto_mov();
-void start_detail();
-void play_last_ani(int16 nr);
-
-void set_z_ebene();
-void get_phase(ObjMov *om);
-//FIXME: was using Stream *
-void test_load(void *handle, taf_info *Tt, int16 anz);
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 9e6e53bf64f..c32e2da4ede 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -133,37 +133,39 @@ bool RdiDateiHeader::load(Common::SeekableReadStream *src) {
 
 
 detail::detail() {
-	char *tptr;
-	int16 i, size;
-	size = sizeof(room_detail_info);
-	tptr = (char *)&rdi;
-	for (i = 0; i < size; i++)
+	int16 size = sizeof(room_detail_info);
+	char *tptr = (char *)&rdi;
+
+	for (int16 i = 0; i < size; i++)
 		*tptr++ = 0;
-	for (i = 0; i < MAXDETAILS; i++) {
+
+	for (int16 i = 0; i < MAXDETAILS; i++) {
 		rdi.Sinfo[i].SprNr = -1;
 		rdi.Ainfo[i].start_ani = -1;
 	}
-	for (i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
+
+	for (int16 i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
 		rdi.mvect[i] = -1;
+
 #ifdef KONVERT
-	for (i = 0; i < MAXDETAILS; i++) {
+	for (int16 i = 0; i < MAXDETAILS; i++) {
 		rdi_new.Sinfo[i].SprNr = -1;
 		rdi_new.Ainfo[i].start_ani = -1;
 	}
-
 #endif
+
 	global_delay = 0;
 	ani_freezeflag = false;
 	fulltaf = false;
-	rdi.dptr = 0;
+	rdi.dptr = nullptr;
 	tafname[0] = 0;
-	for (i = 0; i < (MAXDETAILS * MAX_SOUNDS); i++) {
-		rdi.sample[i] = NULL;
+	for (int16 i = 0; i < (MAXDETAILS * MAX_SOUNDS); i++) {
+		rdi.sample[i] = nullptr;
 		rdi.tvp_index[i] = -1;
 	}
-	SoundBuffer = 0;
+	SoundBuffer = nullptr;
 	direct_taf_ani = OFF;
-	CurrentTaf = 0;
+	CurrentTaf = nullptr;
 }
 
 detail::~detail() {
@@ -208,7 +210,7 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 		if (rdi.dptr) {
 			if (fulltaf) {
 				free(rdi.dptr);
-				rdi.dptr = 0;
+				rdi.dptr = nullptr;
 				fulltaf = false;
 			} else {
 				del_taf_tbl(rdi.dptr);
@@ -235,16 +237,14 @@ void detail::del_dptr() {
 			free((char *)rdi.dptr);
 		else {
 			del_taf_tbl(rdi.dptr);
-			rdi.dptr = 0;
+			rdi.dptr = nullptr;
 			tafname[0] = 0;
 		}
-		rdi.dptr = 0;
+		rdi.dptr = nullptr;
 	}
-
 }
 
 void detail::load_taf_tbl(taf_info *fti) {
-	int16 i;
 	if (!fti) {
 		fti = rdi.dptr;
 	}
@@ -252,7 +252,7 @@ void detail::load_taf_tbl(taf_info *fti) {
 	if (!modul) {
 		if (fti) {
 			if (CurrentTaf) {
-				for (i = 0; i < MAXDETAILS; i++) {
+				for (int16 i = 0; i < MAXDETAILS; i++) {
 					if (rdi.Sinfo[i].SprNr != -1)
 						load_taf_seq(CurrentTaf, rdi.Sinfo[i].SprNr, 1, fti);
 					if (rdi.Ainfo[i].start_ani != -1 &&
@@ -271,16 +271,13 @@ void detail::load_taf_tbl(taf_info *fti) {
 
 taf_info *detail::init_taf_tbl(const char *fname_) {
 	taf_dateiheader *tafheader;
-	taf_info *Tt;
-	byte *tmp;
-	int16 anz;
 
-	Tt = 0;
+	taf_info *Tt = 0;
 
 	mem->file->get_tafinfo(fname_, &tafheader);
 	if (!modul) {
-		anz = tafheader->count;
-		tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
+		int16 anz = tafheader->count;
+		byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
 
 		if (!modul) {
 			Tt = (taf_info *)tmp;
@@ -306,11 +303,10 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 }
 
 void detail::del_taf_tbl(taf_info *Tt) {
-	int16 i;
 	if (!Tt) {
 		Tt = rdi.dptr;
 	}
-	for (i = 0; i < Tt->anzahl; i++) {
+	for (int16 i = 0; i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
 	}
 	free((char *) Tt->korrektur);
@@ -323,10 +319,9 @@ void detail::del_taf_tbl(taf_info *Tt) {
 }
 
 void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
-	int16 i;
 	if (!Tt)
 		Tt = rdi.dptr;
-	for (i = start; i < start + anz && i < Tt->anzahl; i++) {
+	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
 		Tt->image[i] = 0;
 	}
@@ -345,15 +340,13 @@ void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 
 void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	uint32 size;
-	taf_imageheader iheader;
-	int16 i;
 
 	rs->seek(SpritePos[spr_nr], SEEK_SET);
-	for (i = 0; i < spr_anz && !modul; i++) {
+	for (int16 i = 0; i < spr_anz && !modul; i++) {
+		taf_imageheader iheader;
 		if (iheader.load(rs)) {
 			if (!Tt->image[spr_nr + i]) {
-				size = iheader.width * iheader.height ;
+				uint32 size = iheader.width * iheader.height;
 				Tt->image[spr_nr + i] = (byte *)MALLOC(size + 4l);
 				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
 				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
@@ -370,196 +363,6 @@ void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info
 	}
 }
 
-#ifdef ICM
-
-void detail::save_detail(char *fname, int16 room_nr) {
-	Stream *new_handle;
-	Stream *old_handle;
-	taf_info *tmprdi;
-	char tmp_name[MAXPATH + 1];
-	char *str;
-#ifdef KONVERT
-	room_detail_info_new tmp_rdi_new;
-#endif
-	room_detail_info tmp_rdi;
-	int16 i;
-	char *tmp;
-	modul = 0;
-	fcode = 0;
-	tmprdi = rdi.dptr;
-	tmp = (char *)&tmp_rdi;
-	for (i = 0; i < sizeof(room_detail_info); i++)
-		tmp[i] = 0;
-
-	strcpy(tmp_name, fname);
-	str = strchr(tmp_name, '.');
-	strcpy(str + 1, "BAK");
-	mem->file->fcopy(tmp_name, fname);
-	remove("rdi.old\0");
-	mem->file->fcopy("rdi.old", fname);
-	old_handle = chewy_fopen("rdi.old", "rb");
-	if (old_handle) {
-		new_handle = chewy_fopen(fname, "wb");
-		if (new_handle) {
-			strcpy(rdi_datei_header.Id, "RDI\0");
-			rdi_datei_header.Anz = MAX_RDI_ROOM;
-			if (chewy_fwrite(&rdi_datei_header, sizeof(RdiDateiHeader), 1, new_handle)) {
-
-				chewy_fseek(old_handle, sizeof(RdiDateiHeader), SEEK_SET);
-				for (i = 0; i < room_nr && !modul; i++) {
-					if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
-#ifdef KONVERT
-						konvert_format(&tmp_rdi, &tmp_rdi_new);
-						if (!chewy_fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
-#else
-						if (!chewy_fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
-#endif
-						{
-							modul = DATEI;
-							fcode = WRITEFEHLER;
-						}
-					} else {
-						modul = DATEI;
-						fcode = READFEHLER;
-					}
-				}
-
-#ifdef KONVERT
-				konvert_format(&rdi, &rdi_new);
-				if (chewy_fwrite(&rdi_new, sizeof(room_detail_info_new), 1, new_handle))
-#else
-				if (chewy_fwrite(&rdi, sizeof(room_detail_info), 1, new_handle))
-#endif
-				{
-
-					chewy_fseek(old_handle, sizeof(room_detail_info), SEEK_CUR);
-
-					for (i = 0; i < MAX_RDI_ROOM - (room_nr + 1) && !modul; i++) {
-						if (chewy_fread(&tmp_rdi, sizeof(room_detail_info), 1, old_handle)) {
-#ifdef KONVERT
-							konvert_format(&tmp_rdi, &tmp_rdi_new);
-							if (!chewy_fwrite(&tmp_rdi_new, sizeof(room_detail_info_new), 1, new_handle))
-#else
-							if (!chewy_fwrite(&tmp_rdi, sizeof(room_detail_info), 1, new_handle))
-#endif
-							{
-								modul = DATEI;
-								fcode = WRITEFEHLER;
-							}
-						} else {
-							modul = DATEI;
-							fcode = READFEHLER;
-						}
-					}
-				} else {
-					modul = DATEI;
-					fcode = WRITEFEHLER;
-				}
-			} else {
-				modul = DATEI;
-				fcode = WRITEFEHLER;
-			}
-			chewy_fclose(new_handle);
-		} else {
-			modul = DATEI;
-			fcode = OPENFEHLER;
-		}
-		chewy_fclose(old_handle);
-	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
-	}
-	remove("rdi.old\0");
-	rdi.dptr = tmprdi;
-}
-
-#endif
-
-#ifdef KONVERT
-void detail::konvert_format(room_detail_info *rdi_a,
-                            room_detail_info_new *rdi_n) {
-
-	char *tmp;
-	char *tmp1;
-	int16 j;
-	int16 i;
-
-	rdi_n->StaticDetailAnz = rdi_a->StaticDetailAnz;
-	rdi_n->AniDetailAnz = rdi_a->AniDetailAnz;
-	rdi_n->dptr = rdi_a->dptr;
-
-	for (j = 0; j < MAXDETAILS; j++) {
-		rdi_n->Ainfo[j].x = rdi_a->Ainfo[j].x;
-		rdi_n->Ainfo[j].y = rdi_a->Ainfo[j].y;
-		rdi_n->Ainfo[j].start_flag = rdi_a->Ainfo[j].start_flag;
-		rdi_n->Ainfo[j].repeat = rdi_a->Ainfo[j].repeat;
-		rdi_n->Ainfo[j].start_ani = rdi_a->Ainfo[j].start_ani;
-		rdi_n->Ainfo[j].end_ani = rdi_a->Ainfo[j].end_ani;
-		rdi_n->Ainfo[j].ani_count = rdi_a->Ainfo[j].ani_count;
-		rdi_n->Ainfo[j].delay = rdi_a->Ainfo[j].delay;
-		rdi_n->Ainfo[j].delay_count = rdi_a->Ainfo[j].delay_count;
-		rdi_n->Ainfo[j].reverse = rdi_a->Ainfo[j].reverse;
-		rdi_n->Ainfo[j].timer_start = rdi_a->Ainfo[j].timer_start;
-		rdi_n->Ainfo[j].z_ebene = rdi_a->Ainfo[j].z_ebene;
-		rdi_n->Ainfo[j].load_flag = rdi_a->Ainfo[j].load_flag;
-		rdi_n->Ainfo[j].zoom = rdi_a->Ainfo[j].zoom;
-		rdi_n->Ainfo[j].show_1_phase = rdi_a->Ainfo[j].show_1_phase;
-		rdi_n->Ainfo[j].phase_nr = rdi_a->Ainfo[j].phase_nr;
-	}
-
-	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
-		rdi_n->tvp_index[i] = rdi_a->tvp_index[i];
-		rdi_n->sample[i] = rdi_a->sample[i];
-		for (j = 0; j < MAX_SOUNDS; j++) {
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_enable[j] =
-			    rdi_a->Ainfo[i / 3].sfx.sound_enable[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_index[j] =
-			    rdi_a->Ainfo[i / 3].sfx.sound_index[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.sound_start[j] =
-			    rdi_a->Ainfo[i / 3].sfx.sound_start[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.kanal[j] =
-			    rdi_a->Ainfo[i / 3].sfx.kanal[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.volume[j] =
-			    rdi_a->Ainfo[i / 3].sfx.volume[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.repeats[j] =
-			    rdi_a->Ainfo[i / 3].sfx.repeats[j];
-			rdi_n->Ainfo[i / MAX_SOUNDS].sfx.stereo[j] =
-			    rdi_a->Ainfo[i / 3].sfx.stereo[j];
-		}
-	}
-
-	for (j = 0; j < MAXDETAILS; j++) {
-		rdi_n->Sinfo[j].x = rdi_a->Sinfo[j].x;
-		rdi_n->Sinfo[j].y = rdi_a->Sinfo[j].y;
-		rdi_n->Sinfo[j].SprNr = rdi_a->Sinfo[j].SprNr;
-		rdi_n->Sinfo[j].z_ebene = rdi_a->Sinfo[j].z_ebene;
-		rdi_n->Sinfo[j].Hide = rdi_a->Sinfo[j].Hide;
-		rdi_n->Sinfo[j].Dummy = rdi_a->Sinfo[j].Dummy;
-	}
-
-	for (i = 0; i < MAX_M_ITEMS * 4; i++)
-		rdi_n->mvect[i] = rdi_a->mvect[i];
-
-	for (i = 0; i < MAX_M_ITEMS; i++)
-		rdi_n->mtxt[i] = rdi_a->mtxt[i];
-
-	rdi_n->Ri.RoomNr = rdi_a->Ri.RoomNr;
-	rdi_n->Ri.BildNr = rdi_a->Ri.BildNr;
-	rdi_n->Ri.AutoMovAnz = rdi_a->Ri.AutoMovAnz;
-	rdi_n->Ri.TafLoad = rdi_a->Ri.TafLoad;
-	strncpy(rdi_n->Ri.TafName, rdi_a->Ri.TafName, 14);
-	rdi_n->Ri.ZoomFak = rdi_a->Ri.ZoomFak;
-	rdi_n->Ri.Dummy = rdi_a->Ri.Dummy;
-
-	for (j = 0; j < MAX_AUTO_MOV; j++) {
-		rdi_n->AutoMov[j].X = rdi_a->AutoMov[j].X;
-		rdi_n->AutoMov[j].Y = rdi_a->AutoMov[j].Y;
-		rdi_n->AutoMov[j].SprNr = rdi_a->AutoMov[j].SprNr;
-		rdi_n->AutoMov[j].dummy = rdi_a->AutoMov[j].dummy;
-	}
-}
-#endif
-
 void detail::set_static_spr(int16 nr, int16 spr_nr) {
 	rdi.Sinfo[nr].SprNr = spr_nr;
 }
@@ -576,10 +379,9 @@ void detail::show_static_spr(int16 nr) {
 
 byte *detail::get_static_image(int16 det_nr) {
 	byte *ret;
-	int16 index;
-	index = rdi.Sinfo[det_nr].SprNr;
+	int16 index = rdi.Sinfo[det_nr].SprNr;
 	if (index == -1)
-		ret = 0;
+		ret = nullptr;
 	else
 		ret = rdi.dptr->image[index];
 	return ret;
@@ -607,9 +409,8 @@ void detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
 }
 
 void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
-	int16 tmp;
 	if (start > end) {
-		tmp = start;
+		int16 tmp = start;
 		start = end;
 		end = tmp;
 	}
@@ -618,14 +419,12 @@ void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 }
 
 byte *detail::get_image(int16 spr_nr) {
-	byte *ret;
-	ret = rdi.dptr->image[spr_nr];
+	byte *ret = rdi.dptr->image[spr_nr];
 	return ret;
 }
 
 ani_detail_info *detail::get_ani_detail(int16 ani_nr) {
-	ani_detail_info *ret;
-	ret = &rdi.Ainfo[ani_nr];
+	ani_detail_info *ret = &rdi.Ainfo[ani_nr];
 	return ret;
 }
 
@@ -667,34 +466,27 @@ void detail::del_static_ani(int16 ani_nr) {
 	rdi.Ainfo[ani_nr].show_1_phase = false;
 }
 
-void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
-                              int16 zoomx, int16 zoomy) {
-	int16 i, k;
-	int16 x, y, sprnr;
-	int16 *Cxy;
-	int16 kx, ky;
-	ani_detail_info *adiptr;
-	int16 sound_effect;
-	if (start > end) {
-		i = start;
-		start = end;
-		end = i;
-	}
+void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, int16 zoomx, int16 zoomy) {
+	if (start > end)
+		SWAP(start, end);
+
 	if (start > MAXDETAILS)
 		start = 0;
+
 	if (end > MAXDETAILS)
 		end = MAXDETAILS - 1;
-	for (i = start; (i <= end) && (!modul); i++) {
-		adiptr = &rdi.Ainfo[i];
+
+	for (int16 i = start; (i <= end) && (!modul); i++) {
+		ani_detail_info *adiptr = &rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
-			sprnr = adiptr->ani_count;
-			Cxy = rdi.dptr->korrektur + (sprnr << 1);
-			kx = Cxy[0];
-			ky = Cxy[1];
+			int16 sprnr = adiptr->ani_count;
+			int16 *Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			int16 kx = Cxy[0];
+			int16 ky = Cxy[1];
 			if (zoomx != 0 || zoomy != 0)
 				calc_zoom_kor(&kx, &ky, zoomx, zoomy);
-			x = adiptr->x + kx - scrx;
-			y = adiptr->y + ky - scry;
+			int16 x = adiptr->x + kx - scrx;
+			int16 y = adiptr->y + ky - scry;
 			if (adiptr->load_flag == 1) {
 				load_taf_ani_sprite(sprnr);
 				if (!modul)
@@ -702,8 +494,8 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 			} else
 				out->scale_set(rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
-			for (k = 0; k < MAX_SOUNDS; k++) {
-				sound_effect = adiptr->sfx.sound_index[k];
+			for (int16 k = 0; k < MAX_SOUNDS; k++) {
+				int16 sound_effect = adiptr->sfx.sound_index[k];
 				if ((adiptr->sfx.sound_enable[k]) && (sound_effect != -1) &&
 				        (rdi.sample[sound_effect])) {
 					if ((adiptr->sfx.sound_start[k] == adiptr->ani_count) &&
@@ -768,23 +560,20 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 }
 
 void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end) {
-	int16 x, y;
-	int16 i;
-	byte *simage;
-	if (start > end) {
-		i = start;
-		start = end;
-		end = i;
-	}
+	if (start > end)
+		SWAP(start, end);
+
 	if (start > MAXDETAILS)
 		start = 0;
+	
 	if (end > MAXDETAILS)
 		end = MAXDETAILS - 1;
-	for (i = start; i <= end; i++) {
+
+	for (int16 i = start; i <= end; i++) {
 		if (rdi.Sinfo[i].SprNr != -1 && !rdi.Sinfo[i].Hide) {
-			x = rdi.Sinfo[i].x - scrx;
-			y = rdi.Sinfo[i].y - scry;
-			simage = rdi.dptr->image[rdi.Sinfo[i].SprNr];
+			int16 x = rdi.Sinfo[i].x - scrx;
+			int16 y = rdi.Sinfo[i].y - scry;
+			byte *simage = rdi.dptr->image[rdi.Sinfo[i].SprNr];
 			out->sprite_set(simage, x, y, 0);
 		}
 	}
@@ -809,27 +598,23 @@ void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 
 void detail::stop_detail(int16 nr) {
 	if (nr >= 0 && nr < 32) {
-		ani_detail_info *adiptr;
-		adiptr = &rdi.Ainfo[nr];
+		ani_detail_info *adiptr = &rdi.Ainfo[nr];
 		adiptr->start_flag = 0;
 	}
 }
 
 void detail::set_ani_delay(int16 nr, int16 del) {
-	ani_detail_info *adiptr;
-	adiptr = &rdi.Ainfo[nr];
+	ani_detail_info *adiptr = &rdi.Ainfo[nr];
 	adiptr->delay = del;
 }
 
 void detail::init_list(int16 *mv) {
-	int16 i;
-	for (i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
+	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
 		rdi.mvect[i] = mv[i];
 }
 
 void detail::get_list(int16 *mv) {
-	int16 i;
-	for (i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
+	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
 		mv[i] = rdi.mvect[i];
 }
 
@@ -856,21 +641,16 @@ int16 detail::get_ani_status(int16 det_nr) {
 	return ret;
 }
 
-SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
-                                   int16 spr_nr, int16 mode) {
-	int16 *Cxy;
-	int16 *Xy;
-	ani_detail_info *adiptr;
-	int16 k, sound_effect;
+SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 spr_nr, int16 mode) {
 	if (det_nr > MAXDETAILS)
 		det_nr = MAXDETAILS - 1;
-	adiptr = &rdi.Ainfo[det_nr];
+	ani_detail_info *adiptr = &rdi.Ainfo[det_nr];
 	if (spr_nr < adiptr->start_ani)
 		spr_nr = adiptr->start_ani;
 	if (spr_nr > adiptr->end_ani)
 		spr_nr = adiptr->end_ani - 1;
-	Cxy = rdi.dptr->korrektur + (spr_nr << 1);
-	Xy = (int16 *) rdi.dptr->image[spr_nr];
+	int16 *Cxy = rdi.dptr->korrektur + (spr_nr << 1);
+	int16 *Xy = (int16 *)rdi.dptr->image[spr_nr];
 	spr_info.Image = rdi.dptr->image[spr_nr];
 	spr_info.X = adiptr->x + Cxy[0] - scrx;
 	spr_info.Y = adiptr->y + Cxy[1] - scry;
@@ -879,8 +659,8 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
 	if (mode)
 		out->sprite_set(spr_info.Image, spr_info.X, spr_info.Y, 0);
 
-	for (k = 0; k < MAX_SOUNDS; k++) {
-		sound_effect = adiptr->sfx.sound_index[k];
+	for (int16 k = 0; k < MAX_SOUNDS; k++) {
+		int16 sound_effect = adiptr->sfx.sound_index[k];
 		if ((adiptr->sfx.sound_enable[k] != false) && (sound_effect != -1) &&
 		        (rdi.sample[sound_effect])) {
 			if (adiptr->sfx.sound_start[k] == spr_nr) {
@@ -932,27 +712,20 @@ void detail::set_sound_area(byte *buffer, uint32 size) {
 }
 
 void detail::load_room_sounds(Stream *tvp_handle) {
-	int16 i, break_flag;
-	int16 index;
-	byte *workbuf;
-	uint32 size;
-	uint32 allsize;
-
 	if (tvp_handle) {
-		workbuf = SoundBuffer;
-		allsize = 0;
-		size = 0;
-		break_flag = false;
+		byte *workbuf = SoundBuffer;
+		int16 break_flag = false;
 
 		if (workbuf) {
-			for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++)
-				rdi.sample[i] = NULL;
+			for (int16 i = 0; i < MAXDETAILS * MAX_SOUNDS; i++)
+				rdi.sample[i] = nullptr;
 
-			for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (break_flag == false); i++) {
-				index = rdi.tvp_index[i];
+			uint32 allsize = 0;
+			for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (break_flag == false); i++) {
+				int16 index = rdi.tvp_index[i];
 				if ((index != -1) && (rdi.sample[i] == NULL)) {
 					mem->file->select_pool_item(tvp_handle, index);
-					size = mem->file->load_voc(tvp_handle, workbuf);
+					uint32 size = mem->file->load_voc(tvp_handle, workbuf);
 
 					if (!modul) {
 						rdi.sample[i] = workbuf;
@@ -978,27 +751,23 @@ void detail::load_room_sounds(Stream *tvp_handle) {
 }
 
 void detail::set_sound_para(int16 nr, sound_def_blk *sdb_src) {
-	sound_def_blk *sdb_dest;
-	sdb_dest = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb_dest = &rdi.Ainfo[nr].sfx;
 	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
 }
 
 void detail::get_sound_para(int16 nr, sound_def_blk *sdb_dest) {
-	sound_def_blk *sdb_src;
-	sdb_src = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb_src = &rdi.Ainfo[nr].sfx;
 	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
 }
 
 void detail::map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index) {
-	sound_def_blk *sdb;
-	int16 i, j;
-	sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	remove_unused_samples();
 
 	bool found = false;
 	if (sdb->sound_index[sslot] != -1) {
-		for (i = 0; (i < MAXDETAILS) && (!found); i++) {
-			for (j = 0; (j < MAX_SOUNDS) && (!found); j++)
+		for (int16 i = 0; (i < MAXDETAILS) && (!found); i++) {
+			for (int16 j = 0; (j < MAX_SOUNDS) && (!found); j++)
 				if ((rdi.Ainfo[i].sfx.sound_index[j] == sdb->sound_index[sslot]) &&
 				        (i != nr) && (j != sslot))
 					found = true;
@@ -1011,14 +780,14 @@ void detail::map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index) {
 	}
 
 	found = false;
-	for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
+	for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
 		if (rdi.tvp_index[i] == tvp_index) {
 			found = true;
 			sdb->sound_index[sslot] = i;
 		}
 	}
 
-	for (i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
+	for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
 		if (rdi.tvp_index[i] == -1) {
 			found = true;
 			sdb->sound_index[sslot] = i;
@@ -1028,15 +797,13 @@ void detail::map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index) {
 }
 
 void detail::disable_sound(int16 nr, int16 sslot) {
-	sound_def_blk *sdb;
-	sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	sdb->sound_enable[sslot] = 0;
 	ailsnd->endSample(sdb->kanal[sslot]);
 }
 
 void detail::enable_sound(int16 nr, int16 sslot) {
-	sound_def_blk *sdb;
-	sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	sdb->sound_enable[sslot] = 1;
 }
 
@@ -1060,18 +827,14 @@ void detail::play_sound(int16 nr, int16 sslot) {
 }
 
 void detail::disable_detail_sound(int16 nr) {
-	sound_def_blk *sdb;
-	int16 i;
-	sdb = &rdi.Ainfo[nr].sfx;
-	for (i = 0; i < MAX_SOUNDS; i++)
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		sdb->sound_enable[i] = 0;
 }
 
 void detail::enable_detail_sound(int16 nr) {
-	sound_def_blk *sdb;
-	int16 i;
-	sdb = &rdi.Ainfo[nr].sfx;
-	for (i = 0; i < MAX_SOUNDS; i++)
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		if (sdb->sound_index[i] != -1)
 			sdb->sound_enable[i] = 1;
 }
@@ -1099,10 +862,8 @@ void detail::play_detail_sound(int16 nr) {
 }
 
 void detail::clear_detail_sound(int16 nr) {
-	sound_def_blk *sdb;
-	short i;
-	sdb = &rdi.Ainfo[nr].sfx;
-	for (i = 0; i < MAX_SOUNDS; i++) {
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	for (short i = 0; i < MAX_SOUNDS; i++) {
 		sdb->sound_enable[i] = 0;
 		sdb->sound_index[i] = -1;
 		sdb->sound_start[i] = 0;
@@ -1115,24 +876,20 @@ void detail::clear_detail_sound(int16 nr) {
 }
 
 void detail::disable_room_sound() {
-	int16 i;
-	for (i = 0; i < MAXDETAILS; i++)
+	for (int16 i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
 	ailsnd->endSound();
 }
 
 void detail::enable_room_sound() {
-	int16 i;
-	for (i = 0; i < MAXDETAILS; i++)
+	for (int16 i = 0; i < MAXDETAILS; i++)
 		enable_detail_sound(i);
 }
 
 void detail::clear_room_sound() {
-	sound_def_blk *sdb;
-	int16 i, j;
-	for (j = 0; j < MAXDETAILS; j++) {
-		sdb = &rdi.Ainfo[j].sfx;
-		for (i = 0; i < MAX_SOUNDS; i++) {
+	for (int16 j = 0; j < MAXDETAILS; j++) {
+		sound_def_blk *sdb = &rdi.Ainfo[j].sfx;
+		for (int16 i = 0; i < MAX_SOUNDS; i++) {
 			sdb->sound_enable[i] = 0;
 			sdb->sound_index[i] = -1;
 			sdb->sound_start[i] = 0;
@@ -1142,9 +899,9 @@ void detail::clear_room_sound() {
 			sdb->stereo[i] = 0;
 		}
 	}
-	for (i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
+	for (int16 i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
 		rdi.tvp_index[i] = -1;
-		rdi.sample[i] = NULL;
+		rdi.sample[i] = nullptr;
 	}
 }
 #ifdef DETEDIT
@@ -1158,44 +915,35 @@ void detail::shadow_room(int16 mode) {
 #endif
 
 void detail::remove_unused_samples() {
-	int16 i, j, k, found;
-	found = false;
+	bool found = false;
 
-	for (k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
+	for (int16 k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
 		if (rdi.tvp_index[k] != -1) {
 			found = false;
-			for (i = 0; (i < MAXDETAILS) && (found == false); i++) {
-				for (j = 0; (j < MAX_SOUNDS) && (found == false); j++)
+			for (int16 i = 0; (i < MAXDETAILS) && (found == false); i++) {
+				for (int16 j = 0; (j < MAX_SOUNDS) && (found == false); j++)
 					if (rdi.Ainfo[i].sfx.sound_index[j] == k)
 						found = true;
 			}
-			if (found == false) {
+			if (!found) {
 				rdi.tvp_index[k] = -1;
-				rdi.sample[k] = NULL;
+				rdi.sample[k] = nullptr;
 			}
 		}
 	}
 }
 
-int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y,
-                              int16 scrx, int16 scry) {
-	int16 i;
-	int16 ok;
-	int16 detail_nr;
-	int16 *Cxy;
-	int16 *Xy;
-	int16 sprnr;
-	int16 x, y;
-	ani_detail_info *adiptr;
-	ok = false;
-	detail_nr = -1;
-	for (i = 0; i < MAXDETAILS && !ok; i++) {
-		adiptr = &rdi.Ainfo[i];
+int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 scry) {
+	int16 ok = false;
+	int16 detail_nr = -1;
+	for (int16 i = 0; i < MAXDETAILS && !ok; i++) {
+		ani_detail_info *adiptr = &rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
-			sprnr = adiptr->ani_count;
-			Cxy = rdi.dptr->korrektur + (sprnr << 1);
-			x = adiptr->x + Cxy[0] - scrx;
-			y = adiptr->y + Cxy[1] - scry;
+			int16 sprnr = adiptr->ani_count;
+			int16 *Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			int16 x = adiptr->x + Cxy[0] - scrx;
+			int16 y = adiptr->y + Cxy[1] - scry;
+			int16 *Xy;
 			if (adiptr->load_flag == 1) {
 				Xy = (int16 *)taf_load_buffer;
 			} else {
@@ -1219,14 +967,13 @@ void detail::set_taf_ani_mem(byte *load_area) {
 
 void detail::load_taf_ani_sprite(int16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(CurrentTaf);
-	int32 size;
-	taf_imageheader iheader;
 
 	if (rs) {
 		rs->seek(SpritePos[nr]);
 
+		taf_imageheader iheader;
 		if (iheader.load(rs)) {
-			size = (int32)iheader.width * (int32)iheader.height;
+			int32 size = (int32)iheader.width * (int32)iheader.height;
 			((int16 *)taf_load_buffer)[0] = iheader.width;
 			((int16 *)taf_load_buffer)[1] = iheader.height;
 
@@ -1251,20 +998,18 @@ void detail::load_taf_ani_sprite(int16 nr) {
 
 void detail::load_sprite_pointer(Stream *stream) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	uint16 anzahl;
-	taf_dateiheader header;
-	taf_imageheader iheader;
-	int16 i;
 
 	if (rs) {
 		rs->seek(0, SEEK_SET);
 
+		taf_dateiheader header;
 		if (header.load(rs)) {
-			anzahl = header.count;
+			uint16 anzahl = header.count;
 			rs->seek(header.next, SEEK_SET);
 			SpritePos[0] = header.next;
 
-			for (i = 1; i < anzahl && !modul; i++) {
+			for (int16 i = 1; i < anzahl && !modul; i++) {
+				taf_imageheader iheader;
 				if (!iheader.load(rs)) {
 					fcode = READFEHLER;
 					modul = DATEI;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index d60521c1d01..e6d4fd71578 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -24,7 +24,6 @@
 
 #include "chewy/file.h"
 #include "chewy/ngshext.h"
-#include "chewy/defines.h"
 
 namespace Chewy {
 
@@ -194,9 +193,6 @@ public:
 
 	void load_rdi_taf(const char *fname, int16 load_flag);
 
-#ifdef ICM
-	void save_detail(char *fname, int16 room_nr);
-#endif
 	void set_static_spr(int16 nr, int16 spr_nr);
 	byte *get_static_image(int16 det_nr);
 
@@ -280,11 +276,6 @@ private:
 	void load_taf_ani_sprite(int16 nr);
 
 	void remove_unused_samples();
-#ifdef KONVERT
-	void konvert_format(room_detail_info *rdi_a,
-	                    room_detail_info_new *rdi_n);
-	room_detail_info_new rdi_new;
-#endif
 	room_detail_info rdi;
 #ifdef DETEDIT
 	room_detail_info rdi_shadow;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index e6f4bf52c1c..8344e077c79 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -6,7 +6,6 @@ MODULE_OBJS = \
 	chewy.o \
 	cursor.o \
 	datei.o \
-	debug.o \
 	debugger.o \
 	detail.o \
 	effect.o \
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 7b549c3101f..3ba80603fff 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -51,7 +51,7 @@ void Room51::entry() {
 	_G(zoom_mov_fak) = 4;
 
 	if (_G(spieler).flags32_10) {
-		atds->set_unknown(0);
+		atds->set_unknown(false);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
@@ -100,7 +100,7 @@ void Room51::entry() {
 }
 
 void Room51::xit(int16 eib_nr) {
-	atds->set_unknown(1);
+	atds->set_unknown(true);
 
 	if (_G(spieler).flags32_10) {
 		flags.MainInput = true;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 8ed24052f4d..0cf32836e37 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -197,9 +197,9 @@ int Room82::proc6() {
 		start_aad_wait(450, -1);
 		out->ausblenden(0);
 		out->set_teilpalette(pal, 255, 1);
-		atds->set_unknown(0);
+		atds->set_unknown(false);
 		start_aad_wait(598, -1);
-		atds->set_unknown(1);
+		atds->set_unknown(true);
 		det->show_static_spr(7);
 		fx_blend = BLEND3;
 		set_up_screen(DO_SETUP);


Commit: a416a12ff7b2ab47879e783a3634b4de4b9bc553
    https://github.com/scummvm/scummvm/commit/a416a12ff7b2ab47879e783a3634b4de4b9bc553
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Remove dead code, reduce more variable scopes

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/events.cpp
    engines/chewy/events_base.cpp
    engines/chewy/flic.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index c32e2da4ede..bc988db8e4e 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -147,13 +147,6 @@ detail::detail() {
 	for (int16 i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
 		rdi.mvect[i] = -1;
 
-#ifdef KONVERT
-	for (int16 i = 0; i < MAXDETAILS; i++) {
-		rdi_new.Sinfo[i].SprNr = -1;
-		rdi_new.Ainfo[i].start_ani = -1;
-	}
-#endif
-
 	global_delay = 0;
 	ani_freezeflag = false;
 	fulltaf = false;
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 0b6963ed69b..c6809998f95 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -28,8 +28,7 @@ namespace Chewy {
 
 EventsManager *g_events;
 
-EventsManager::EventsManager(Graphics::Screen *screen) :
-		EventsBase(screen) {
+EventsManager::EventsManager(Graphics::Screen *screen) : EventsBase(screen) {
 	g_events = this;
 	init_timer_handler();
 }
@@ -52,11 +51,9 @@ void EventsManager::timer_handler() {
 }
 
 void EventsManager::handleEvent(const Common::Event &event) {
-	if (event.type >= Common::EVENT_MOUSEMOVE &&
-		event.type <= Common::EVENT_MBUTTONUP)
+	if (event.type >= Common::EVENT_MOUSEMOVE && event.type <= Common::EVENT_MBUTTONUP)
 		handleMouseEvent(event);
-	else if (event.type == Common::EVENT_KEYDOWN ||
-			event.type == Common::EVENT_KEYUP)
+	else if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_KEYUP)
 		handleKbdEvent(event);
 }
 
diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
index 6f351bc0715..35dfff63ffb 100644
--- a/engines/chewy/events_base.cpp
+++ b/engines/chewy/events_base.cpp
@@ -26,8 +26,7 @@ namespace Chewy {
 
 EventsBase *g_eventsBase;
 
-EventsBase::EventsBase(Graphics::Screen *screen, uint refreshRate) :
-		_screen(screen) {
+EventsBase::EventsBase(Graphics::Screen *screen, uint refreshRate) : _screen(screen) {
 	g_eventsBase = this;
 	addTimer(updateScreen, refreshRate);
 }
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index d1a80f781ae..920b48b5b04 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -28,14 +28,13 @@
 
 namespace Chewy {
 
-static int16(*custom_user)(int16) = 0;
-static int16(*flic_user)(int16) = 0;
+static int16(*custom_user)(int16) = nullptr;
+static int16(*flic_user)(int16) = nullptr;
 
 void decode_flc(byte *vscr, const byte *dbuf) {
 	Common::MemoryReadStream src(dbuf, 0xffffffff);
 	int h = src.readUint16LE();
-	int val, pair;
-	int8 b;
+	int val;
 
 	for (; h > 0; --h, vscr += SCREEN_WIDTH) {
 		// Get value, and handle any line skips if needed
@@ -47,11 +46,11 @@ void decode_flc(byte *vscr, const byte *dbuf) {
 		byte *dest = vscr;
 		for (; val > 0; --val) {
 			dest += src.readByte();
-			b = src.readSByte();
+			int8 b = src.readSByte();
 
 			if (b < 0) {
 				b = -b;
-				pair = src.readUint16LE();
+				int pair = src.readUint16LE();
 				for (; b > 0; --b, dest += 2)
 					WRITE_LE_UINT16(dest, pair);
 
@@ -64,12 +63,11 @@ void decode_flc(byte *vscr, const byte *dbuf) {
 }
 
 void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
-	int x;
-
 	for (; h > 0; --h, vscr += SCREEN_WIDTH) {
 		byte *dest = vscr;
 		++dbuf;		// Skip number of entries in line
 
+		int x;
 		for (x = 0; x < br; ) {
 			int8 len = (int8)*dbuf++;
 			if (len < 0) {
@@ -105,9 +103,8 @@ flic::~flic() {
 }
 
 void flic::play(const char *fname, byte *vscreen, byte *load_p) {
-	Stream *lhandle;
 
-	lhandle = File::open(fname);
+	Stream *lhandle = File::open(fname);
 	if (lhandle) {
 		play(lhandle, vscreen, load_p);
 		delete lhandle;
@@ -119,9 +116,7 @@ void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 
 int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-	uint16 i;
-	size_t tmp_size;
-	float start, ende;
+	float ende;
 	int16 ret = 0;
 
 	load_puffer = load_p;
@@ -134,14 +129,14 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 			fade_delay = 0;
 			cls_flag = false;
 			CurrentFrame = 0;
-			for (i = 0; (i < flic_header.frames) && (!modul) && (ret >= 0); i++) {
+			for (uint16 i = 0; (i < flic_header.frames) && (!modul) && (ret >= 0); i++) {
 				if (!frame_header.load(rs)) {
 					modul = DATEI;
 					fcode = READFEHLER;
 				} else {
 					if (frame_header.type != PREFIX) {
-						tmp_size = ((size_t)frame_header.size) - sizeof(FrameHead);
-						start = (float) g_system->getMillis(); // clock()
+						size_t tmp_size = ((size_t)frame_header.size) - sizeof(FrameHead);
+						float start = (float)g_system->getMillis(); // clock()
 						start /= 0.05f;
 						start += flic_header.speed;
 						if (tmp_size) {
@@ -170,17 +165,14 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 }
 
 int16 flic::decode_frame() {
-	uint16 i;
-	byte *tmp_buf;
-	bool update_flag;
 	ChunkHead chunk_header;
 	int16 action_ret = 0;
 
-	tmp_buf = load_puffer;
-	update_flag = false;
+	byte *tmp_buf = load_puffer;
+	bool update_flag = false;
 	if (frame_header.chunks != 0) {
 		fade_flag = false;
-		for (i = 0; i < frame_header.chunks; i++) {
+		for (uint16 i = 0; i < frame_header.chunks; i++) {
 			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
 			chunk_header.load(&rs);
 
@@ -256,12 +248,7 @@ int16 flic::decode_frame() {
 }
 
 void flic::col256_chunk(byte *tmp) {
-	int i;
-	int packets;
-	int count;
-	byte anz, col;
-	byte r, g, b;
-	packets = *(int16 *)tmp;
+	int packets = *(int16 *)tmp;
 	tmp += 2;
 
 	out->vsync_start();
@@ -272,7 +259,7 @@ void flic::col256_chunk(byte *tmp) {
 
 	if (tmp[1] == 0) {
 		tmp += 2;
-		for (i = 0; i < PALETTE_SIZE; i++)
+		for (int i = 0; i < PALETTE_SIZE; i++)
 			tmp[i] >>= 2;
 		if (fade_flag == false)
 			out->set_palette(tmp);
@@ -282,14 +269,14 @@ void flic::col256_chunk(byte *tmp) {
 			memcpy(fade_pal, tmp, PALETTE_SIZE);
 		}
 	} else {
-		col = 0;
-		for (count = 0; count < packets; count++) {
+		byte col = 0;
+		for (int count = 0; count < packets; count++) {
 			col += *tmp++;
-			anz = *tmp++;
-			for (i = 0; i < anz; i++) {
-				r = *tmp++ >> 2;
-				g = *tmp++ >> 2;
-				b = *tmp++ >> 2;
+			byte anz = *tmp++;
+			for (int i = 0; i < anz; i++) {
+				byte r = *tmp++ >> 2;
+				byte g = *tmp++ >> 2;
+				byte b = *tmp++ >> 2;
 				out->raster_col(col, r, g, b);
 				++col;
 			}
@@ -298,12 +285,7 @@ void flic::col256_chunk(byte *tmp) {
 }
 
 void flic::col64_chunk(byte *tmp) {
-	int i;
-	int packets;
-	int count;
-	byte anz, col;
-	byte r, g, b;
-	packets = *((int16 *)tmp);
+	int packets = *((int16 *)tmp);
 	tmp += 2;
 
 	out->vsync_start();
@@ -321,14 +303,14 @@ void flic::col64_chunk(byte *tmp) {
 			memcpy(fade_pal, tmp + 2, PALETTE_SIZE);
 		}
 	} else {
-		col = 0;
-		for (count = 0; count < packets; count++) {
+		byte col = 0;
+		for (int count = 0; count < packets; count++) {
 			col += *tmp++;
-			anz = *tmp++;
-			for (i = 0; i < anz; i++) {
-				r = *tmp++ >> 2;
-				g = *tmp++ >> 2;
-				b = *tmp++ >> 2;
+			byte anz = *tmp++;
+			for (int i = 0; i < anz; i++) {
+				byte r = *tmp++ >> 2;
+				byte g = *tmp++ >> 2;
+				byte b = *tmp++ >> 2;
 				out->raster_col(col, r, g, b);
 				++col;
 			}
@@ -337,25 +319,15 @@ void flic::col64_chunk(byte *tmp) {
 }
 
 void flic::delta_chunk_byte(byte *tmp) {
-	short int *ipo;
-	byte *abl;
-	byte *tabl;
-	short int i, j;
-	short int rest_height;
-	short signed int count;
-	signed char tmp_count;
-	short int data;
-	short int mode_word;
-	short int pcount;
-	byte skip, last_byte = 0;
+	byte last_byte = 0;
 	bool last_flag;
-	abl = virt_screen;
-	ipo = (short int *)tmp;
-	rest_height = *ipo++;
+	byte *abl = virt_screen;
+	short int *ipo = (short int *)tmp;
+	short int rest_height = *ipo++;
 	tmp += 2;
-	for (i = 0; (i < rest_height) && (i < 200); i++) {
-		tabl = abl;
-		mode_word = *ipo++;
+	for (short int i = 0; (i < rest_height) && (i < 200); i++) {
+		byte *tabl = abl;
+		short int mode_word = *ipo++;
 		if (mode_word & 0x4000) {
 			mode_word = -mode_word;
 			abl += (int16)(mode_word * flic_header.width);
@@ -370,12 +342,12 @@ void flic::delta_chunk_byte(byte *tmp) {
 			last_flag = false;
 		tmp = (byte *)ipo;
 		if (mode_word) {
-			pcount = 0;
-			for (j = 0; (pcount < mode_word) && (j <= flic_header.width); ++pcount) {
-				skip = *tmp++;
+			short int pcount = 0;
+			for (short int j = 0; (pcount < mode_word) && (j <= flic_header.width); ++pcount) {
+				byte skip = *tmp++;
 				abl += skip;
-				tmp_count = (signed char) * tmp++;
-				count = (short signed int)tmp_count;
+				signed char tmp_count = (signed char)*tmp++;
+				short signed int count = (short signed int)tmp_count;
 				if (count > 0) {
 					count <<= 1;
 					while ((count) && (j < flic_header.width)) {
@@ -385,7 +357,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 					}
 				} else {
 					count = -count;
-					data = *(short int *)tmp;
+					short int data = *(short int *)tmp;
 					tmp += 2;
 					while ((count > 0) && (j < flic_header.width)) {
 						*((short int *)abl) = data;
@@ -404,9 +376,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 }
 
 int16 flic::custom_play(CustomInfo *ci) {
-	uint16 i;
 	int16 ret = 0;
-	uint32 start, ende;
 
 	Cinfo = ci;
 	load_puffer = ci->TempArea;
@@ -414,7 +384,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 	Music = ci->MusicSlot;
 	Sound = ci->SoundSlot;
 
-	if (ci->Fname != 0) {
+	if (ci->Fname != nullptr) {
 		ci->Handle = File::open(ci->Fname);
 	}
 
@@ -427,13 +397,13 @@ int16 flic::custom_play(CustomInfo *ci) {
 				fade_delay = 0;
 				CurrentFrame = 0;
 
-				for (i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0); i++) {
+				for (uint16 i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0); i++) {
 					if (!custom_frame.load(rs)) {
 						modul = DATEI;
 						fcode = READFEHLER;
 					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
-							start = g_system->getMillis() + custom_header.speed;
+							uint32 start = g_system->getMillis() + custom_header.speed;
 							if (custom_frame.size) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									modul = DATEI;
@@ -447,6 +417,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 							g_screen->update();
 
 							// Loop until the frame time expires
+							uint32 ende;
 							do {
 								ende = g_system->getMillis();
 								g_events->update();
@@ -479,14 +450,10 @@ int16 flic::custom_play(CustomInfo *ci) {
 
 void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
-	ChunkHead chead;
-	uint16 i, j;
-	tmf_header *th;
-	byte *tmp;
-	musik_info mi;
-	th = (tmf_header *)Music;
-
-	for (i = 0; (i < custom_frame.chunks) && (!modul); i++) {
+	tmf_header *th = (tmf_header *)Music;
+
+	for (uint16 i = 0; (i < custom_frame.chunks) && (!modul); i++) {
+		ChunkHead chead;
 		if (!chead.load(handle)) {
 			modul = DATEI;
 			fcode = READFEHLER;
@@ -517,10 +484,10 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				modul = DATEI;
 				fcode = READFEHLER;
 			} else {
-				tmp = Music;
+				byte *tmp = Music;
 				tmp += sizeof(tmf_header);
 				tmp += ((uint32)th->pattern_anz) * 1024l;
-				for (j = 0; j < 31; j++) {
+				for (uint16 j = 0; j < 31; j++) {
 					if (th->instrument[j].laenge) {
 						th->ipos[j] = tmp;
 						tmp += th->instrument[j].laenge;
@@ -610,7 +577,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 			break;
 
-		case WAIT_MSTOP:
+		case WAIT_MSTOP: {
+			musik_info mi;
 			do {
 #ifndef AIL
 				snd->getMusicInfo(&mi);
@@ -618,6 +586,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				ailsnd->getMusicInfo(&mi);
 #endif
 			} while (mi.musik_playing != 0);
+			}
 			break;
 
 		case SET_MVOL:
@@ -750,17 +719,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 }
 
 int16 flic::decode_cframe() {
-	ChunkHead chunk_header;
-	uint16 i;
-	byte *tmp_buf;
-	int16 update_flag;
-	tmp_buf = load_puffer;
-	update_flag = false;
+	byte *tmp_buf = load_puffer;
+	int16 update_flag = false;
 	int16 action_ret = 0;
 
 	if (custom_frame.chunks != 0) {
-		for (i = 0; i < custom_frame.chunks; i++) {
+		for (uint16 i = 0; i < custom_frame.chunks; i++) {
 			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
+			ChunkHead chunk_header;
 			chunk_header.load(&rs);
 
 			tmp_buf += ChunkHead::SIZE();
@@ -837,17 +803,13 @@ int16 flic::decode_cframe() {
 }
 
 void flic::free_sound(int16 nr) {
-	byte *fsound;
-	long fsize;
-	long copysize;
-	int16 i;
-	fsound = sounds[nr];
-	fsize = Ssize[nr];
+	byte *fsound = sounds[nr];
+	long fsize = Ssize[nr];
 	if ((fsound != 0) && (fsize != 0)) {
-		copysize = Cinfo->MaxSoundSize;
+		long copysize = Cinfo->MaxSoundSize;
 		copysize -= (long)(fsound - Cinfo->SoundSlot);
 		memmove(fsound, fsound + fsize, copysize);
-		for (i = 0; i < 50; i++) {
+		for (int16 i = 0; i < 50; i++) {
 			if (sounds[i] == fsound) {
 				sounds[i] = 0;
 				Ssize[i] = 0;
@@ -863,7 +825,7 @@ void flic::set_custom_user_function(int16(*user_funktion)(int16 frame)) {
 }
 
 void flic::remove_custom_user_function() {
-	custom_user = 0;
+	custom_user = nullptr;
 }
 
 void flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
@@ -871,7 +833,7 @@ void flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
 }
 
 void flic::remove_flic_user_function() {
-	flic_user = 0;
+	flic_user = nullptr;
 }
 
 } // namespace Chewy


Commit: 72e367bf83eda238f3049143533fe95fa909f422
    https://github.com/scummvm/scummvm/commit/72e367bf83eda238f3049143533fe95fa909f422
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Fix opening crate in room 66

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 78a82847b35..fe0c5ee1085 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1832,6 +1832,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		start_aad_wait(406, -1);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
 			start_aad_wait(613, -1);
+		show_cur();
 		break;
 
 	case 100:


Commit: 3eb1e5e115432d53d0d05fd8ebc13b946a299626
    https://github.com/scummvm/scummvm/commit/3eb1e5e115432d53d0d05fd8ebc13b946a299626
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:55-08:00

Commit Message:
CHEWY: Fix giving artifact to trader

Changed paths:
    engines/chewy/rooms/room66.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index e0892b5853c..0caf7e99c6b 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -178,7 +178,7 @@ int Room66::proc2() {
 }
 
 int Room66::proc7() {
-	if (!is_cur_inventar(88))
+	if (!is_cur_inventar(ARTE_INV))
 		return 0;
 
 	hide_cur();
@@ -191,7 +191,7 @@ int Room66::proc7() {
 		_G(spieler).flags26_20 = true;
 	}
 
-	proc8(7, 2, 3, 411 + (_G(spieler).R68Papagei ? 1 : 0));
+	proc8(7, 2, 3, 411 + (_G(spieler).flags26_10 ? 1 : 0));
 	_G(cur_hide_flag) = 0;
 	hide_cur();
 	if (_G(spieler).flags26_20)
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index ca1b01986a9..2c6e758fd99 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2269,7 +2269,6 @@ void calc_inv_use_txt(int16 test_nr) {
 		obj->change_inventar(test_nr, B_MARY2_INV, &room_blk);
 		break;
 
-	case 88:
 	case 13:
 		_G(spieler).flags26_10 = true;
 		flags.InventMenu = false;
@@ -2279,6 +2278,12 @@ void calc_inv_use_txt(int16 test_nr) {
 		atds->set_ats_str(88, 1, INV_ATS_DATEI);
 		break;
 
+	case 88:
+		_G(spieler).flags26_10 = true;
+		start_aad_wait(350, -1);
+		atds->set_ats_str(88, 1, INV_ATS_DATEI);
+		break;
+
 	case 102:
 	case 104:
 		del_inventar(_G(spieler).AkInvent);


Commit: 764237105330e8bdbf21833fd1d3cbeb68415c97
    https://github.com/scummvm/scummvm/commit/764237105330e8bdbf21833fd1d3cbeb68415c97
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:56-08:00

Commit Message:
CHEWY: Fix Nichelle singing cutscene

Changed paths:
    engines/chewy/rooms/room68.cpp


diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 08993374fc8..b8477c6b44f 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -365,17 +365,15 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		else {
 			det->start_detail(23, 255, ANI_VOR);
 			ailsnd->initDoubleBuffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
-			::error("TODO: voc_handle");
-#if 0
-			Stream *voc_handle = nullptr; // TODO : should be the voc_handle initialized in sound_init()
 			mem->file->select_pool_item(voc_handle, 109);
 			ERROR
+
 			ailsnd->startDbVoc(voc_handle, 1, 30);
 			wait_show_screen(2);
 
 			while (!ailsnd->isSpeechActive(1))
 				set_up_screen(DO_SETUP);
-#endif
+
 			det->stop_detail(23);
 		}
 


Commit: 437fed7ea394acc2b1191d81a5e4dc1885da582c
    https://github.com/scummvm/scummvm/commit/437fed7ea394acc2b1191d81a5e4dc1885da582c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/room.cpp


diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index ba57b20cc95..1b30ba8d8bc 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -518,7 +518,7 @@ void switch_room(int16 nr) {
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	ERROR
 
-		enter_room(-1);
+	enter_room(-1);
 	set_up_screen(DO_SETUP);
 }
 


Commit: bc48079711eb95783df33400ad4547430d38e083
    https://github.com/scummvm/scummvm/commit/bc48079711eb95783df33400ad4547430d38e083
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Flesh out room 70 implementation

Changed paths:
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room70.h
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp


diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index bcdcf2181d1..0480980d81a 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -48,19 +48,52 @@ void Room70::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 116:
-		proc2();
+		leftEntry();
 		break;
 	case 117:
-		proc3();
+		rightEntry();
 		break;
 	default:
 		_G(spieler).scrollx = 62;
-		proc1();
+		topEntry();
 		break;
 	}
 }
 
 void Room70::xit(int16 eib_nr) {
+	_G(spieler).ScrollxStep = 1;
+
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 70) {
+		if (eib_nr == 102) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 69;
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
+		} else if (eib_nr == 103 || eib_nr == 104) {
+			_G(spieler).PersonRoomNr[P_HOWARD] = 75;
+			_G(spieler).PersonRoomNr[P_NICHELLE] = 75;
+		}
+	}
+}
+
+void Room70::topEntry() {
+	_G(cur_hide_flag) = 0;
+	hide_cur();
+	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
+	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
+	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
+	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
+	show_cur();
+}
+
+void Room70::leftEntry() {
+	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
+	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
+	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
+}
+
+void Room70::rightEntry() {
+	set_person_pos(587, 114, P_CHEWY, P_LEFT);
+	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
+	set_person_pos(561, 112, P_HOWARD, P_LEFT);
 }
 
 void Room70::setup_func() {
@@ -69,7 +102,7 @@ void Room70::setup_func() {
 	const int posX = spieler_vector[P_CHEWY].Xypos[0];
 
 	int howDestX, nicDestX;
-	if (posX > 40) {
+	if (posX < 40) {
 		howDestX = 52;
 		nicDestX = 100;
 	} else if (posX < 230) {
@@ -87,26 +120,5 @@ void Room70::setup_func() {
 	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);	
 }
 
-void Room70::proc1() {
-	_G(cur_hide_flag) = 0;
-	hide_cur();
-	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
-	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
-	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
-	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
-	show_cur();
-}
-
-void Room70::proc2() {
-	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
-	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
-	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
-}
-
-void Room70::proc3() {
-	set_person_pos(587, 114, P_CHEWY, P_LEFT);
-	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
-	set_person_pos(561, 112, P_HOWARD, P_LEFT);
-}
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room70.h b/engines/chewy/rooms/room70.h
index 8bee95e297e..a905eaf890d 100644
--- a/engines/chewy/rooms/room70.h
+++ b/engines/chewy/rooms/room70.h
@@ -30,9 +30,10 @@ public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
 	static void setup_func();
-	static void proc1();
-	static void proc2();
-	static void proc3();
+
+	static void topEntry();
+	static void leftEntry();
+	static void rightEntry();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 1432a29aa18..4abeaf135cf 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -50,10 +50,10 @@ void Room73::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 106:
-		Room70::proc1();
+		Room70::topEntry();
 		break;
 	case 115:
-		Room70::proc2();
+		Room70::leftEntry();
 	default:
 		break;
 	}
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index c85752fbf42..5d1b60c3249 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -52,14 +52,14 @@ void Room74::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 105:
-		Room70::proc2();
+		Room70::leftEntry();
 		break;
 	case 108:
 		_G(spieler).scrollx = 188;
 		Room75::proc1();
 		break;
 	case 109:
-		Room70::proc3();
+		Room70::rightEntry();
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 87eb4810957..38f918da061 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -52,10 +52,10 @@ void Room75::entry(int16 eib_nr) {
 		proc1();
 		break;		
 	case 104:
-		Room70::proc3();
+		Room70::rightEntry();
 		break;
 	case 111:
-		Room70::proc2();
+		Room70::leftEntry();
 		break;
 	default:
 		break;


Commit: 69626ad2b47b0b6b1ef7737878060cf8283cb6fe
    https://github.com/scummvm/scummvm/commit/69626ad2b47b0b6b1ef7737878060cf8283cb6fe
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Range checking for checking to display exit cursors

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e2563627f1a..2d550faa55b 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1802,13 +1802,15 @@ bool is_cur_inventar(int16 nr) {
 }
 
 void check_mouse_ausgang(int16 x, int16 y) {
-	int16 nr;
+	int16 nr, attr;
+	bool found = true;
 
-	int16 found;
-	found = true;
 	if (menu_item == CUR_WALK) {
 		nr = obj->is_exit(x, y);
-		switch (_G(spieler).room_e_obj[nr].Attribut) {
+		attr = (nr >= 0 && nr < MAX_EXIT) ?
+			_G(spieler).room_e_obj[nr].Attribut : 0;
+
+		switch (attr) {
 		case AUSGANG_LINKS:
 			cur_ausgang_flag = AUSGANG_LINKS;
 			cursor_wahl(CUR_AUSGANG_LINKS);
@@ -1832,8 +1834,8 @@ void check_mouse_ausgang(int16 x, int16 y) {
 		default:
 			found = false;
 			break;
-
 		}
+
 		if (cur_ausgang_flag && !found) {
 			cursor_wahl(menu_item);
 			cur_ausgang_flag = false;
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 370b8d7cddb..d27f7224336 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -563,6 +563,7 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 ret;
 	int16 i;
 	ret = -1;
+
 	for (i = 0; i < max_exit && ret == -1; i++) {
 		if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 			if (mouse_x >= Re[i].X &&
@@ -573,6 +574,7 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 			}
 		}
 	}
+
 	return ret;
 }
 


Commit: 57e6e74558d114e6ae140798eee41faddd250910
    https://github.com/scummvm/scummvm/commit/57e6e74558d114e6ae140798eee41faddd250910
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Fix loading master room exists list

Changed paths:
    engines/chewy/objekte.cpp


diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index d27f7224336..225f6e8a515 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -154,7 +154,7 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 			modul = DATEI;
 		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
-				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++RoomEx) {
+				for (int i = 0; i < eib_datei_header.Anz && valid; ++i, ++RoomEx) {
 					valid = RoomEx->load(&f);
 				}
 


Commit: 48d825923b6bc5283d772b4d6c694d5d23f96b28
    https://github.com/scummvm/scummvm/commit/48d825923b6bc5283d772b4d6c694d5d23f96b28
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Remove dead code

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/global.cpp
    engines/chewy/main.cpp
    engines/chewy/ngstypes.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 920b48b5b04..b1581c43fac 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -99,9 +99,6 @@ flic::flic() {
 	Common::fill(&sounds[0], &sounds[50], (byte *)nullptr);
 }
 
-flic::~flic() {
-}
-
 void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 
 	Stream *lhandle = File::open(fname);
@@ -384,10 +381,6 @@ int16 flic::custom_play(CustomInfo *ci) {
 	Music = ci->MusicSlot;
 	Sound = ci->SoundSlot;
 
-	if (ci->Fname != nullptr) {
-		ci->Handle = File::open(ci->Fname);
-	}
-
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(ci->Handle);
 	if (rs) {
 		if (custom_header.load(rs)) {
@@ -438,8 +431,6 @@ int16 flic::custom_play(CustomInfo *ci) {
 				}
 			}
 		}
-		if (ci->Fname != 0)
-			chewy_fclose(ci->Handle);
 	} else {
 		modul = DATEI;
 		fcode = OPENFEHLER;
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index bd0f3aa7052..cca7fde8916 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -78,7 +78,6 @@ extern void decode_rle(byte *vscr, const byte *dbuf, int br, int h);
 class flic {
 public:
 	flic();
-	~flic();
 	void play(const char *fname, byte *vscreen, byte *load_p);
 
 	int16 play(Common::Stream *handle, byte *vscreen, byte *load_p);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 2ce5eff1f6b..c280ef6d0d3 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -256,7 +256,6 @@ movclass *mov;
 
 char background[] = { EPISODE1 };
 char backged[] = { EPISODE1_GEP };
-char fname[80] = {0};
 
 AutoMov auto_mov[MAX_AUTO_MOV];
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 2d550faa55b..fd3d0eedbf1 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -113,7 +113,6 @@ void alloc_buffers() {
 	Ci.SoundSlot = (byte *)MALLOC(SOUND_SLOT_SIZE);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
 	ERROR;
-	Ci.Fname = fname;
 	SpeechBuf[0] = (byte *)MALLOC(SPEECH_HALF_BUF * 2);
 	ERROR
 	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 081df762e68..811b090a9f8 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -536,7 +536,6 @@ struct CustomFrameHead {
 };
 
 struct CustomInfo {
-	char *Fname = nullptr;
 	Stream *Handle = nullptr;
 	byte *VirtScreen = 0;
 	byte *TempArea = 0;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index fe0c5ee1085..542b6786d5d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -933,7 +933,6 @@ void flic_cut(int16 nr, int16 mode) {
 	g_events->delay(50);
 	Common::File *f = File::open("cut/cut.tap");
 	Ci.Handle = f;
-	Ci.Fname = 0;
 
 	if (Ci.Handle) {
 		switch (nr) {


Commit: 3b9cec226b2940c7a0e86592359b83df6ed0b406
    https://github.com/scummvm/scummvm/commit/3b9cec226b2940c7a0e86592359b83df6ed0b406
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:35:57-08:00

Commit Message:
CHEWY: Add first version of new video code, currently disabled

This code uses the VideoPlayer interface and is much more cleanly
separated from the engine code compared to the original implementation.
Some functionality has not been implemented yet, which includes:
- Video effects (borders, blending etc)
- Custom video frame callbacks in specific rooms via
  set_flic_user_function(). This is used in rooms 28, 37, 51, 54, 55
  and 64

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 542b6786d5d..84405db15fa 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -25,9 +25,14 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/rooms.h"
+#include "chewy/resource.h"
+#include "chewy/sound.h"
+#include "chewy/video/cfo_decoder.h"
 
 namespace Chewy {
 
+//#define NEW_VIDEO_CODE 1
+
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 
@@ -828,6 +833,58 @@ int16 flic_user_function(int16 keys) {
 	return ret;
 }
 
+static void playVideo(uint num) {
+	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
+	VideoResource *videoResource = new VideoResource("cut.tap");
+	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
+
+	if (!cfoDecoder->loadStream(videoStream)) {
+		delete videoResource;
+		delete cfoDecoder;
+		return;
+	}
+
+	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
+	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
+	bool skipVideo = false;
+	byte curPalette[256 * 3];
+
+	save_palette(curPalette);
+	//_vm->_cursor->hideCursor();	// TODO
+
+	cfoDecoder->start();
+
+	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo) {
+		if (cfoDecoder->needsUpdate()) {
+			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
+			if (frame) {
+				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
+
+				if (cfoDecoder->hasDirtyPalette())
+					setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
+
+				g_system->updateScreen();
+			}
+		}
+
+		Common::Event event;
+		while (g_system->getEventManager()->pollEvent(event)) {
+			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
+				skipVideo = true;
+		}
+
+		g_system->delayMillis(10);
+	}
+
+	cfoDecoder->close();
+
+	setScummVMPalette(curPalette, 0, 256);
+	//_vm->_cursor->showCursor();	// TODO
+
+	delete videoResource;
+	delete cfoDecoder;
+}
+
 static void flic_proc1() {
 	const int16 VALS1[] = {
 		135,  145,  142,  140,  145,  144,  142,  134,  148,  138,
@@ -874,8 +931,12 @@ static void flic_proc1() {
 		bool flag;
 		do {
 			flic_val2 = VALS1[i];
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, flic_val2);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(flic_val2);
+#endif
 
 			flag = VALS4[i] && atds->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
@@ -904,12 +965,6 @@ static void flic_proc1() {
 	out->cls();
 }
 
-#define PLAY_LOOP do { \
-		mem->file->select_pool_item(Ci.Handle, nr); \
-		ret = flc->custom_play(&Ci); \
-	} while (atds->aad_get_status() != -1 && ret != -1)
-
-
 void flic_cut(int16 nr, int16 mode) {
 	static const int16 FLIC_CUT_133[] = {
 		133, 123, 125, 126, 124, 128, 129, 130, 131,
@@ -931,8 +986,10 @@ void flic_cut(int16 nr, int16 mode) {
 	det->disable_room_sound();
 	ailsnd->endSound();
 	g_events->delay(50);
+//#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
 	Ci.Handle = f;
+//#endif
 
 	if (Ci.Handle) {
 		switch (nr) {
@@ -940,8 +997,12 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1000:
 			ailsnd->stopMod();
 			CurrentSong = -1;
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+#else
+			playVideo(nr);
+#endif // !NEW_VIDEO_CODE	
 			break;
 
 		case FCUT_019:
@@ -958,60 +1019,71 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->stopMod();
 			CurrentSong = -1;
 			nr = FCUT_019;
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
-			ret = flc->custom_play(&Ci);
+			flc->custom_play(&Ci);
+#else
+			playVideo(nr);
+#endif // !NEW_VIDEO_CODE
 			ailsnd->setLoopMode(1);
 
 			if (!modul && ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				f->seek(ChunkHead::SIZE(), SEEK_CUR);
 				out->cls();
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif // !NEW_VIDEO_CODE
 
 				if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 					mem->file->select_pool_item(Ci.Handle, 21);
 					out->cls();
 					flc->custom_play(&Ci);
+#else
+					playVideo(21);
+#endif
+
 					if (!modul) {
+#ifndef NEW_VIDEO_CODE
 						f->seek(ChunkHead::SIZE(), SEEK_CUR);
 						out->cls();
-						flc->custom_play(&Ci);
+						ret = flc->custom_play(&Ci);
+#else
+						playVideo(nr);
+#endif // !NEW_VIDEO_CODE
 					}
 				}
 			}
 			if (!modul) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 20);
 				out->cls();
 				flc->custom_play(&Ci);
+#else
+				playVideo(20);
+#endif
 			}
 			if (!modul) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 23);
 				out->cls();
 				flc->custom_play(&Ci);
+#else
+				playVideo(23);
+#endif
 			}
-			if (!modul) {
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
-			}
-			if (!modul) {
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
-			}
-			if (!modul) {
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
-			}
-			if (!modul) {
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
-			}
-			if (!modul) {
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				flc->custom_play(&Ci);
+			for (int i = 0; i < 5; i++) {
+				if (!modul) {
+#ifndef NEW_VIDEO_CODE
+					f->seek(ChunkHead::SIZE(), SEEK_CUR);
+					out->cls();
+					ret = flc->custom_play(&Ci);
+#else
+					playVideo(nr);
+#endif
+				}
 			}
 			ERROR
 			ailsnd->fadeOut(0);
@@ -1026,44 +1098,79 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_036:
 		case FCUT_037:
 		case FCUT_040:
-			PLAY_LOOP;
+			do {
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, nr);
+				ret = flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
+			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
 		case FCUT_034:
 			ailsnd->stopMod();
 			CurrentSong = -1;
 
-			PLAY_LOOP;
+			do {
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, nr);
+				ret = flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
+			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
 		case FCUT_053:
 			for (i = 0; i < 3; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
 			}
 			break;
 
 		case FCUT_054:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+#else
+			playVideo(nr);
+			playVideo(nr);
+#endif
 			break;
 
 		case FCUT_058:
 			load_room_music(255);
+#ifndef NEW_VIDEO_CODE
 			nr = FCUT_058;
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+#else
+			playVideo(FCUT_058);
+#endif // !NEW_VIDEO_CODE
 
 			if (!modul) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FCUT_059);
 				flc->custom_play(&Ci);
+#else
+				playVideo(FCUT_059);
+#endif
 			}
 			if (!_G(spieler).R43GetPgLady) {
 				if (!modul) {
+#ifndef NEW_VIDEO_CODE
 					mem->file->select_pool_item(Ci.Handle, FCUT_060);
 					flc->custom_play(&Ci);
+#else
+					playVideo(FCUT_060);
+#endif
 				}
 			} else {
 				if (!modul) {
@@ -1074,8 +1181,12 @@ void flic_cut(int16 nr, int16 mode) {
 					flc->remove_custom_user_function();
 				}
 				if (!modul) {
+#ifndef NEW_VIDEO_CODE
 					mem->file->select_pool_item(Ci.Handle, FCUT_062);
 					flc->custom_play(&Ci);
+#else
+					playVideo(FCUT_062);
+#endif
 				}
 			}
 			ailsnd->fadeOut(0);
@@ -1097,46 +1208,71 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_071:
 			ailsnd->stopMod();
 			CurrentSong = -1;
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+#else
+			playVideo(nr);
+#endif
 			break;
 
 		case 83:
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 83);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(83);
+#endif
 			}
 
 
 		case 95:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
 			}
 			break;
 
 		case 112:
 			ailsnd->setMusicMasterVol(32);
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
+			ret = flc->custom_play(&Ci);
 			mem->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
+#else
+			playVideo(nr);
+			playVideo(nr);
+#endif
 			ailsnd->setMusicMasterVol(5);
 			break;
 
 		case 116:
 			for (i = 0; i < 6; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
 			}
 			break;
 
 		case 133:
 		case 1123:
 			for (i = 0; i < 13 && i != -1 && !modul; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(FLIC_CUT_133[i]);
+#endif
 				if (i == 0 || i == 1) {
 					out->setze_zeiger(nullptr);
 					out->cls();
@@ -1151,53 +1287,82 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1003:
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 1);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(1);
+#endif
 
 			if (ret != -1) {
 				for (i = 0; i < 3 && ret != -1; ++i) {
 					fx->border(workpage, 100, 0, 0);
 					print_rows(591);
+#ifndef NEW_VIDEO_CODE
 					mem->file->select_pool_item(Ci.Handle, i + 3);
 					ret = flc->custom_play(&Ci);
+#else
+					playVideo(i + 3);
+#endif
 				}
 			}
 			break;
 
 		case 1006:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 6);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 6);
+#endif
 			}
 			break;
 
 		case 1009:
 			for (i = 0; i < 2 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 9);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(i + 9);
+#endif
 			}
 			break;
 
 		case 1012:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 12);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 12);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 12);
+#endif
 			}
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				out->cls();
 				mem->file->select_pool_item(Ci.Handle, 17);
 				fx->border(workpage, 100, 0, 0);
 			}
+#else
+			out->cls();
+			fx->border(workpage, 100, 0, 0);
+#endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 15);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 15);
+#endif
 			}
 			break;
 
@@ -1205,14 +1370,18 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 11 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(594);
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				if (FLIC_CUT_1045[i] == 53) {
 					ailsnd->stopMod();
 					CurrentSong = -1;
 					load_room_music(256);
 				}
 
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(FLIC_CUT_1045[i]);
+#endif
 
 				if (FLIC_CUT_1045[i] == 53) {
 					ailsnd->stopMod();
@@ -1221,29 +1390,53 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1031:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 31);
-			ret = flc->custom_play(&Ci);
+			flc->custom_play(&Ci);
+#else
+			playVideo(31);
+#endif
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
+				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 43);
-				flc->custom_play(&Ci);
+				ret = flc->custom_play(&Ci);
+#else
+				playVideo(43);
+#endif
 			}
 			break;
 
 		case 1048:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 50);
-			ret = flc->custom_play(&Ci);
+			flc->custom_play(&Ci);
+#else
+			playVideo(50);
+#endif
 
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
+				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 48);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(48);
+#endif
 			}
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 49);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(49);
+#endif
 			}
+
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 				ret = flc->custom_play(&Ci);
@@ -1252,17 +1445,27 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->spr_blende(workpage, 100, false, 0);
 				mem->file->select_pool_item(Ci.Handle, 54);
 			}
+#else
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(nr);
+#endif
 			break;
 
 		case 1055:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 55);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 55);
+#endif
 			}
 
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 46);
+#endif
 				fx->border(workpage, 100, 0, 0);
 			}
 			break;
@@ -1271,26 +1474,46 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 58);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(58);
+#endif
 
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 59);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(59);
+#endif
 			}
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 60);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(60);
+#endif
 			}
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 61);
 				fx->spr_blende(workpage, 100, false, 0);
-				ret = flc->custom_play(&Ci);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, 61);
+				flc->custom_play(&Ci);
+#else
+				playVideo(61);
+#endif
 			}
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 62);
 				fx->border(workpage, 100, 0, 0);
-				ret = flc->custom_play(&Ci);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, 62);
+				flc->custom_play(&Ci);
+#else
+				playVideo(62);
+#endif
 			}
 			break;
 
@@ -1300,30 +1523,50 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 65);
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(i + 65);
+#endif
 			}
 			break;
 
 		case 1068:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 68);
-			ret = flc->custom_play(&Ci);
+			flc->custom_play(&Ci);
+#else
+			playVideo(68);
+#endif
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 70);
-				flc->custom_play(&Ci);
+				ret = flc->custom_play(&Ci);
+#else
+				playVideo(70);
+#endif
 			}
 			break;
 
 		case 1069:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 69);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(69);
+#endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 71);
 				fx->spr_blende(workpage, 100, false, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 71);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 71);
+#endif
 			}
 			break;
 
@@ -1331,39 +1574,63 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 4 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(605);
-				mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				fx->spr_blende(workpage, 100, false, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + FLIC_CUT_1074[i]);
+#endif
 			}
 			break;
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(FLIC_CUT_1080[i]);
+#endif
 			}
 			break;
 
 		case 1087:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 87);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(87);
+#endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, i + 102);
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
+#else
+				playVideo(i + 102);
+#endif
 			}
 			break;
 
 		case 1088:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 88);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(88);
+#endif
 
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 86);
 				fx->spr_blende(workpage, 100, false, 0);
+#ifndef NEW_VIDEO_CODE
+				mem->file->select_pool_item(Ci.Handle, 86);
 				flc->custom_play(&Ci);
+#else
+				playVideo(86);
+#endif
 				ailsnd->stopMod();
 			}
 			break;
@@ -1387,31 +1654,53 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1106:
 			for (i = 0; i < 3 && ret == -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
 				out->cls();
-				ret = flc->custom_play(&Ci);
+				flc->custom_play(&Ci);
+#else
+				playVideo(FLIC_CUT_1106[i]);
+#endif
 			}
 			break;
 
 		case 1107:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 107);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(107);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				mem->file->select_pool_item(Ci.Handle, 109);
 				fx->border(workpage, 100, 0, 0);
 			}
+#else
+			fx->border(workpage, 100, 0, 0);
+			//playVideo(109);
+#endif
 			break;
 
 		case 1108:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 108);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(108);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				mem->file->select_pool_item(Ci.Handle, 115);
 				fx->spr_blende(workpage, 100, false, 0);
 				flc->custom_play(&Ci);
 			}
+#else
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(115);
+#endif
 			break;
 
 		case 1110:
@@ -1419,36 +1708,55 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			load_room_music(257);
 			ailsnd->setMusicMasterVol(20);
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(110);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 112);
-				fx->spr_blende(workpage, 100, false, 0);
 				ailsnd->setMusicMasterVol(63);
+				fx->spr_blende(workpage, 100, false, 0);
+				mem->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
 			}
-
+#else
+			ailsnd->setMusicMasterVol(63);
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(112);
+#endif
 			ailsnd->stopMod();
 			break;
 
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
 				out->cls();
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(FLIC_CUT_1113[i]);
+#endif
 			}
 			break;
 
 		case 1117:
+#ifndef NEW_VIDEO_CODE
 			if (mem->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
-				mem->file->select_pool_item(Ci.Handle, 119);
 				fx->border(workpage, 100, 0, 0);
+				mem->file->select_pool_item(Ci.Handle, 119);
 				flc->custom_play(&Ci);
 			}
+#else
+			fx->border(workpage, 100, 0, 0);
+			playVideo(119);
+#endif
 			break;
 
 		default:
+#ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle,
 				(nr < 1000) ? nr : nr - 1000);
 
@@ -1464,6 +1772,10 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 
 			ERROR
+#else
+			playVideo(nr < 1000 ? nr : nr - 1000);
+#endif
+
 			break;
 		}
 


Commit: 2574347f822c312d500741e8a578313f83290e62
    https://github.com/scummvm/scummvm/commit/2574347f822c312d500741e8a578313f83290e62
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:35:58-08:00

Commit Message:
CHEWY: Start removing ERROR from code

Error checking is done mostly on game resources, so it will
eventually be moved into the resource reading code

Changed paths:
    engines/chewy/main_menu.cpp
    engines/chewy/menus.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 7c6f78d4b4a..5aa525c7776 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -63,7 +63,6 @@ void MainMenu::execute() {
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
 		room->load_room(&room_blk, 98, &_G(spieler));
-		ERROR
 
 		CurrentSong = -1;
 		load_room_music(98);
@@ -212,7 +211,6 @@ void MainMenu::startGame() {
 
 	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
 	room->load_room(&room_blk, 0, &_G(spieler));
-	ERROR
 
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 3b4cf612e8c..dc7c6393786 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -496,7 +496,6 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 	if (mode == INV_ATS_MODE) {
 		atds->load_atds(invent_nr, INV_ATS_DATEI);
-		ERROR
 		txt_name_adr = atds->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
 		txt_adr = atds->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
 		xoff = strlen(txt_name_adr);
@@ -516,7 +515,6 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		if (!txt_adr) {
 			ende = 1;
 		}
-		ERROR
 	}
 	else
 		ende = 1;
@@ -953,7 +951,6 @@ void ads_menu() {
 				talk_hide_static = -1;
 				if (flags.AdsDialog == false) {
 					atds->save_ads_header(ads_dia_nr);
-					ERROR;
 				}
 			}
 			break;
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index f958cb8bc79..c62b8cda10a 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -767,11 +767,9 @@ void Room0::feederAni() {
 			flic_cut(FCUT_001, CFO_MODE);
 
 			test_intro(1);
-			ERROR
 
 			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
 			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			ERROR
 			set_person_pos(Rdi->AutoMov[4].X - CH_HOT_MOV_X,
 			               Rdi->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
 			spieler_vector[P_CHEWY].DelayCount = 0;
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index 5609825744f..cbe4cd98536 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -129,8 +129,6 @@ void Room3::terminal() {
 			clear_prog_ani();
 			_G(auto_obj) = 0;
 			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			ERROR
-
 			fx_blend = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 3d599925746..31a8f023ee4 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -121,8 +121,7 @@ int16 Room4::sonde_comp() {
 	minfo.button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
-	
+
 	fx_blend = BLEND1;
 	atds->stop_aad();
 
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index a80e3815458..ffe688f1b5b 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -42,7 +42,6 @@ void Room44::look_news() {
 	fx_blend = BLEND1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
 
 	start_aad_wait(172, -1);
 	_G(spieler).scrollx = tmpsx;
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index b65c20838f8..696c4730078 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -182,7 +182,6 @@ void Room49::use_boy_cigar() {
 	auto_scroll(164, 0);
 	flic_cut(67, CFO_MODE);
 	test_intro(17);
-	ERROR
 
 	room->set_timer_status(255, TIMER_STOP);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 3ba80603fff..5b8ce182a84 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -173,7 +173,6 @@ void Room51::setup_func() {
 				out->cls();
 				flic_cut(115, 0);
 				test_intro(28);
-				ERROR
 				
 				switch_room(91);
 				break;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 675ce5649f7..50371aa70e2 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -241,7 +241,6 @@ int16 Room55::use_telefon() {
 
 				flic_cut(FCUT_072, CFO_MODE);
 				test_intro(19);
-				ERROR
 				
 				flags.NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
@@ -372,8 +371,7 @@ int16 Room55::use_kammeraus() {
 			flc->set_flic_user_function(cut_serv);
 			flic_cut(FCUT_070, CFO_MODE);
 			test_intro(18);
-			ERROR
-			
+		
 			flc->remove_flic_user_function();
 			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
 			room->set_timer_status(aniNr, TIMER_STOP);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index be0b16110d2..b7796329508 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -164,7 +164,6 @@ void Room56::entry() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(116, CFO_MODE);
 		test_intro(21);
-		ERROR
 		out->setze_zeiger(nullptr);
 		out->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
@@ -357,7 +356,6 @@ int16 Room56::use_kneipe() {
 		flic_cut(112, CFO_MODE);
 		flc->remove_custom_user_function();
 		test_intro(31);
-		ERROR
 
 		set_up_screen(NO_SETUP);
 		fx_blend = BLEND3;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index b8477c6b44f..b4c6eda0495 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -320,7 +320,6 @@ int16 Room68::use_diva() {
 		flic_cut(FCUT_083, CFO_MODE);
 		det->del_static_ani(18);
 		test_intro(22);
-		ERROR
 		det->del_static_ani(18);
 		start_detail_wait(7, 1, ANI_VOR);
 		atds->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
@@ -366,7 +365,6 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			det->start_detail(23, 255, ANI_VOR);
 			ailsnd->initDoubleBuffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
 			mem->file->select_pool_item(voc_handle, 109);
-			ERROR
 
 			ailsnd->startDbVoc(voc_handle, 1, 30);
 			wait_show_screen(2);
@@ -379,7 +377,6 @@ void Room68::kostuem_aad(int16 aad_nr) {
 
 		if (_G(spieler).DisplayText) {
 			mem->file->select_pool_item(voc_handle, 108);
-			ERROR
 			ailsnd->startDbVoc(voc_handle, 1, 30);			
 		}
 		
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index fec4de73e2e..a0ca2cb868a 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -63,7 +63,6 @@ void Room72::entry(int16 eib_nr) {
 		go_auto_xy(120, 104, P_NICHELLE, ANI_WAIT);
 		proc1(84);
 		test_intro(23);
-		ERROR
 		break;
 	case 113:
 		set_person_pos(213, 129, P_CHEWY, P_LEFT);
@@ -74,7 +73,6 @@ void Room72::entry(int16 eib_nr) {
 		go_auto_xy(186, 102, P_NICHELLE, ANI_WAIT);
 		proc1(85);
 		test_intro(23);
-		ERROR
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index b028f488863..11ac54e69a6 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -96,7 +96,6 @@ void Room85::entry(int16 eib_nr) {
 		flc->set_custom_user_function(Room87::proc5);
 		flic_cut(89, CFO_MODE);
 		test_intro(25);
-		ERROR
 
 		flc->remove_custom_user_function();
 		switch_room(84);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index e062bc87dd1..33362460498 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -135,7 +135,6 @@ int Room88::proc3() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(86, CFO_MODE);
 		test_intro(24);
-		ERROR
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 88;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 3e5c0b6570c..2237073cd98 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -81,7 +81,6 @@ void Room89::entry() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(117, CFO_MODE);
 		test_intro(35);
-		ERROR
 
 		fx_blend = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
@@ -176,7 +175,6 @@ int Room89::proc2() {
 	flags.NoPalAfterFlc = true;
 	flic_cut(102, CFO_MODE);
 	test_intro(26);
-	ERROR
 
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 487;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index cae7752fdfe..ad02b5eafbd 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -328,7 +328,6 @@ int Room90::proc6() {
 	out->cls();
 	flic_cut(109, CFO_MODE);
 	test_intro(29);
-	ERROR
 
 	det->hide_static_spr(4);
 	det->hide_static_spr(5);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 57762f56513..b1ce2eafb45 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -59,7 +59,6 @@ void Room92::entry() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(104, CFO_MODE);
 		test_intro(27);
-		ERROR
 		out->setze_zeiger(nullptr);
 		out->cls();
 		flags.NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 51381b9b96c..fb05f7a6123 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -57,7 +57,6 @@ void Room94::entry() {
 		out->cls();
 		flic_cut(120, CFO_MODE);
 		test_intro(30);
-		ERROR
 		fx_blend = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
 		_G(spieler).r93_word18DB2C = _G(spieler).scrollx;
@@ -77,7 +76,6 @@ void Room94::entry() {
 			out->cls();
 			flic_cut(121, CFO_MODE);
 			test_intro(32);
-			ERROR
 
 			fx_blend = BLEND_NONE;
 			SetUpScreenFunc = nullptr;
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index e1a6da9b6cf..f16dc8f9a64 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -111,7 +111,6 @@ int Room95::proc2() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(133, CFO_MODE);
 		test_intro(33);
-		ERROR
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
 		switch_room(97);
 	} else {
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index c227412e2c3..3f9dd23baf6 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -1022,7 +1022,6 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 				free((char *)spz_tinfo);
 			spz_akt_id = ani_id;
 			spz_tinfo = mem->taf_seq_adr(spz_taf_handle, spr_start, spr_anz);
-			ERROR
 		}
 
 		for (i = 0; i < spr_anz; i++) {
@@ -1087,7 +1086,6 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
 		if (PersonTaf[p_nr])
 			free((char *)PersonTaf[p_nr]);
 		PersonTaf[p_nr] = mem->taf_seq_adr(spz_taf_handle, ani_start, ani_anz);
-		ERROR
 		spieler_vector[p_nr].PhNr = 0;
 		spieler_vector[p_nr].PhAnz = ani_anz;
 	}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 2c6e758fd99..d8ad55875ac 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -32,10 +32,8 @@ int16 load_ads_dia(int16 dia_nr) {
 
 	if (flags.AdsDialog == false) {
 		bool tmp = atds->ads_start(dia_nr);
-		ERROR
 		if (tmp == true) {
 			atds->load_atds(dia_nr, ADH_DATEI);
-			ERROR
 			ret = true;
 			ads_blk_nr = 0;
 			ads_item_ptr = atds->ads_item_ptr(ads_blk_nr, &ads_item_anz);
@@ -2180,9 +2178,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrolly = 0;
 
 		room->open_handle("BACK/GBOOK.TGP", "rb", R_TGPDATEI);
-		ERROR
 		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0);
-		ERROR;
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->back2screen(workpage);
@@ -2197,9 +2193,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		}
 
 		room->open_handle(EPISODE1, "rb", R_TGPDATEI);
-		ERROR
 		room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
-		ERROR;
 
 		_G(spieler).scrollx = scrollx;
 		_G(spieler).scrolly = scrolly;
@@ -2320,7 +2314,6 @@ static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 	_G(calc_inv_text_str1) = Common::String::format("%s ", s);
 
 	atds->load_atds(cur_inv, INV_ATS_DATEI);
-	ERROR
 
 	s = atds->ats_get_txt(cur_inv, TXT_MARK_NAME, &txt_anz, 6);
 	_G(calc_inv_text_str1) += s;
@@ -2329,7 +2322,6 @@ static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 	_G(calc_inv_text_str2) = Common::String::format("%s ", s);
 
 	atds->load_atds(test_nr, INV_ATS_DATEI);
-	ERROR
 
 	s = atds->ats_get_txt(test_nr, TXT_MARK_NAME, &txt_anz, 6);
 	_G(calc_inv_text_str2) += s;
@@ -2376,7 +2368,6 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 
 	if (inv_mode != -1) {
 		txt_nr = atds->calc_inv_no_use(_G(spieler).AkInvent, test_nr, inv_mode);
-		ERROR
 		if (txt_nr != -1) {
 			if (!flags.InventMenu) {
 				if (txt_nr >= 15000) {
@@ -2384,7 +2375,6 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 				} else {
 					ret = start_ats_wait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATEI);
 				}
-				ERROR
 			} else {
 				look_invent(-1, INV_USE_ATS_MODE, txt_nr);
 			}


Commit: f512718281af4cae4487e14833e5b33984c051d2
    https://github.com/scummvm/scummvm/commit/f512718281af4cae4487e14833e5b33984c051d2
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:35:58-08:00

Commit Message:
CHEWY: Use error() instead of returning a global error flag

The error messages are temporary, and all error checking for
resources will be eventually moved into the resource handling
code

Changed paths:
  R engines/chewy/fehler.cpp
  R engines/chewy/fehler.h
    engines/chewy/ailclass.cpp
    engines/chewy/atds.cpp
    engines/chewy/chewy.cpp
    engines/chewy/datei.cpp
    engines/chewy/debugger.cpp
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/file.cpp
    engines/chewy/file.h
    engines/chewy/flic.cpp
    engines/chewy/gedclass.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/memory.cpp
    engines/chewy/module.mk
    engines/chewy/ngsdefs.h
    engines/chewy/ngshext.h
    engines/chewy/objekte.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 8d1eed12011..680c5d878be 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -633,7 +633,7 @@ void ailclass::startDbVoc(Stream *v, int16 channel, int16 vol) {
 	src->seek(-ChunkHead::SIZE(), SEEK_CUR);
 	ChunkHead ch;
 	if (!ch.load(src))
-		::error("Error loading speech");
+		error("Error loading speech");
 
 	Common::SeekableReadStream *rs = src->readStream(ch.size);
 	playSpeech(channel, rs);
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 9bc1dec49e2..b684cc0c283 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -306,9 +306,7 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	if (handle) {
 		atdshandle[ATDS_HANDLE] = handle;
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
-		err->set_user_msg(fname_);
+		error("Error reading from %s", fname_);
 	}
 
 	return handle;
@@ -327,13 +325,13 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 			atdshandle[mode] = rs;
 			atdsmem[mode] = tmp_adr;
 			atdspooloff[mode] = chunk_start;
-			if (mode == INV_USE_DATEI) {
+			switch (mode) {
+			case INV_USE_DATEI:
 				mem->file->select_pool_item(rs, atdspooloff[mode]);
 				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				if (!Ch.load(rs)) {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("Error reading from %s", fname_);
 				} else {
 					free(inv_use_mem);
 					inv_use_mem = (char *)MALLOC(Ch.size + 3l);
@@ -341,8 +339,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					if (!modul) {
 						if (Ch.size) {
 							if (!rs->read(inv_use_mem, Ch.size)) {
-								fcode = READFEHLER;
-								modul = DATEI;
+								error("Error reading from %s", fname_);
 							} else
 								crypt(inv_use_mem, Ch.size);
 						}
@@ -351,10 +348,12 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 						inv_use_mem[Ch.size + 2] = (char)BLOCKENDE;
 					}
 				}
+				break;
+
 			}
 		}
 	} else
-		err->set_user_msg(fname_);
+		error("Error reading from %s", fname_);
 }
 
 void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
@@ -382,9 +381,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 				break;
 			}
 		} else {
-			modul = DATEI;
-			fcode = OPENFEHLER;
-			err->set_user_msg(fname_);
+			error("Error reading from %s", fname_);
 		}
 	}
 }
@@ -424,13 +421,11 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 		mem->file->select_pool_item(stream, chunk_nr + atdspooloff[mode]);
 		stream->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!Ch.load(stream)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("load_atds error");
 		} else {
 			if (Ch.size) {
 				if (stream->read(txt_adr, Ch.size) != Ch.size) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_atds error");
 				} else if (mode != ADH_DATEI)
 					crypt(txt_adr, Ch.size);
 			}
@@ -439,8 +434,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 			txt_adr[Ch.size + 2] = (char)BLOCKENDE;
 		}
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("load_atds error");
 	}
 }
 
@@ -454,23 +448,20 @@ void atdsys::save_ads_header(int16 dia_nr) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 		if (!Ch.load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("save_ads_header error");
 		} else {
 			if (Ch.size) {
 				Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
 				ws->seek(rs->pos());
 				if (ws->write(atdsmem[ADH_HANDLE], Ch.size) != Ch.size) {
-					fcode = WRITEFEHLER;
-					modul = DATEI;
+					error("save_ads_header error");
 				}
 
 				delete ws;
 			}
 		}
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("save_ads_header error");
 	}
 }
 
@@ -982,7 +973,6 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 						atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
 						if (atdsv.VocNr != -1) {
 							mem->file->select_pool_item(atdsv.SpeechHandle, atdsv.VocNr);
-							ERROR
 
 							int16 vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
 							             _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
@@ -992,9 +982,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 							aadv.DelayCount = 1;
 						}
 					} else {
-						modul = DATEI;
-						fcode = OPENFEHLER;
-						err->set_user_msg("sprachausgabe.tvp");
+						error("Error reading from sprachausgabe.tvp");
 					}
 				}
 				for (int16 i = 0; i < ssr->Anz; i++) {
@@ -1358,14 +1346,12 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 				InvUse *iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
 				for (int16 i = 0; i < INV_STRC_ANZ; ++i, ++iu) {
 					if (!iu->load(rs)) {
-						modul = DATEI;
-						fcode = READFEHLER;
+						error("calc_inv_no_use error");
 						break;
 					}
 				}
 			} else {
-				modul = DATEI;
-				fcode = OPENFEHLER;
+				error("calc_inv_no_use error");
 			}
 		}
 
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 46fda7f059a..126487bbab5 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -93,8 +93,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 	Common::Serializer s(stream, nullptr);
 	if (!_G(spieler).synchronize(s)) {
-		fcode = READFEHLER;
-		modul = DATEI;
+		error("loadGameStream error");
 		return Common::kReadingFailed;
 
 	} else {
@@ -113,7 +112,6 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
 		room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-		ERROR
 		load_chewy_taf(_G(spieler).ChewyAni);
 
 		fx_blend = BLEND1;
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 4dcebafe6e1..670693fca5c 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -86,16 +86,13 @@ void datei::load_image(Stream *stream, byte *sp, byte *palette) {
 					break;
 				}
 			} else {
-				fcode = NOTTBF;
-				modul = DATEI;
+				error("load_image error");
 			}
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("load_image error");
 		}
 	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
+		error("load_image error");
 	}
 
 	ChunkHead ch;
@@ -110,9 +107,7 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	if (rs) {
 		rs->seek(0, SEEK_SET);
 		if (!ph->load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
-			rs->seek(0, SEEK_SET);
+			error("select_pool_item error");
 		} else {
 			if (!strncmp(ph->id, "NGS", 3)) {
 				if (nr >= ph->PoolAnz)
@@ -153,8 +148,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 								next = iheader.next;
 								image = iheader.image;
 							} else {
-								fcode = READFEHLER;
-								modul = DATEI;
+								error("load_tafmcga error");
 							}
 							++sprcount;
 						}
@@ -167,8 +161,7 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 							next = iheader.next;
 							image = iheader.image;
 						} else {
-							fcode = READFEHLER;
-							modul = DATEI;
+							error("load_tafmcga error");
 						}
 					}
 
@@ -180,22 +173,18 @@ void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
 					read_tbf_image(&f, komp, size, speicher);
 
 				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
+					error("load_tafmcga error");
 				}
 			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
+				error("load_tafmcga error");
 			}
 
 			f.close();
 		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
+			error("load_tafmcga error");
 		}
 	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
+		error("load_tafmcga error");
 	}
 }
 
@@ -226,8 +215,7 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 							next = iheader.next;
 							image = iheader.image;
 						} else {
-							fcode = READFEHLER;
-							modul = DATEI;
+							error("load_full_taf error");
 						}
 						uint16 *abmess = (uint16 *)speicher;
 						abmess[0] = iheader.width;
@@ -241,22 +229,18 @@ void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
 						speicher += size;
 					}
 				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
+					error("load_full_taf error");
 				}
 			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
+				error("load_full_taf error");
 			}
 
 			f.close();
 		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
+			error("load_full_taf error");
 		}
 	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
+		error("load_full_taf error");
 	}
 }
 
@@ -272,29 +256,24 @@ void datei::load_korrektur(const char *fname, int16 *sp) {
 				if ((id == TAFDATEI) && (header->korrekt > 0)) {
 					f.seek(-((int)(header->count * sizeof(int16) * 2) * header->korrekt), SEEK_END);
 					if ((f.size() - f.pos() / 2) < (int16)(header->count * sizeof(int16) * 2)) {
-						fcode = READFEHLER;
-						modul = DATEI;
+						error("load_korrektur error");
 					} else {
 						for (int i = 0; i < header->count * 2; ++i)
 							*sp++ = f.readSint16LE();
 					}
 				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
+					error("load_korrektur error");
 				}
 			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
+				error("load_korrektur error");
 			}
 
 			f.close();
 		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
+			error("load_korrektur error");
 		}
 	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
+		error("load_korrektur error");
 	}
 }
 
@@ -312,19 +291,16 @@ void datei::load_tff(const char *fname, byte *speicher) {
 			if (tff->load(&f)) {
 				uint32 size = tff->size;
 				if (f.read(speicher + sizeof(tff_header), size) != size) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_tff error");
 				}
 			}
 
 			f.close();
 		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
+			error("load_tff error");
 		}
 	} else {
-		fcode = ZEIGERFEHLER;
-		modul = GRAFIK;
+		error("load_tff error");
 	}
 }
 
@@ -382,17 +358,14 @@ uint32 datei::load_voc(Stream *handle, byte *speicher) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 		if (!ch->load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("load_voc error");
 		} else {
 			if (ch->type == VOCDATEI) {
 				if (rs->read(speicher, ch->size) != ch->size) {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("load_voc error");
 				}
 			} else {
-				modul = DATEI;
-				fcode = NOTVOC;
+				error("load_voc error");
 			}
 		}
 	}
@@ -407,14 +380,12 @@ void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	Common::File f;
 	if (f.open(filename)) {
 		if (!f.read(speicher, size)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("void_load error");
 		}
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("void_load error");
 	}
 }
 
@@ -426,15 +397,13 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	if (rs) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!ch->load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("load_tmf error");
 		} else {
 			if (ch->type == TMFDATEI) {
 				assert(ch->size > (uint32)tmf_header::SIZE());
 
 				if (!song->load(rs)) {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("load_tmf error");
 				} else {
 					size = ch->size + sizeof(tmf_header);
 					byte *speicher = (byte *)song + sizeof(tmf_header);
@@ -447,8 +416,7 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 					}
 				}
 			} else {
-				modul = DATEI;
-				fcode = NOTTBF;
+				error("load_tmf error");
 			}
 		}
 	}
@@ -504,13 +472,10 @@ uint32 datei::size(const char *fname, int16 typ) {
 				if ((id == TBFDATEI) || (id == TPFDATEI)) {
 					size = tbfheader->entpsize + 4;
 				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
-					size = 0;
+					error("size error");
 				}
 			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
+				error("size error");
 			}
 			break;
 
@@ -522,13 +487,10 @@ uint32 datei::size(const char *fname, int16 typ) {
 					uint16 breite = pcxheader->bpz * pcxheader->planes;
 					size = (uint32)((long)hoehe) * ((long)breite) + 4;
 				} else {
-					fcode = NOTTBF;
-					modul = DATEI;
-					size = 0;
+					error("size error");
 				}
 			} else {
-				fcode = READFEHLER;
-				modul = DATEI;
+				error("size error");
 			}
 			break;
 
@@ -539,12 +501,10 @@ uint32 datei::size(const char *fname, int16 typ) {
 				if (id == TFFDATEI) {
 					size = tff.size + sizeof(tff_header);
 				} else {
-					modul = DATEI;
-					fcode = NOTTBF;
+					error("size error");
 				}
 			} else {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("size error");
 			}
 			}
 			break;
@@ -582,8 +542,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("size error");
 		size = 0;
 	}
 
@@ -597,8 +556,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 	Common::File f;
 	if (f.open(fname)) {
 		if (!Nph->load(&f)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("get_poolsize error");
 		} else {
 			if (!strncmp(Nph->id, "NGS", 3)) {
 				select_pool_item(&f, chunk_start);
@@ -607,9 +565,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 				for (int16 i = chunk_start; (i < Nph->PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
 					ChunkHead ch;
 					if (!ch.load(&f)) {
-						modul = DATEI;
-						fcode = READFEHLER;
-						size = 0;
+						error("get_poolsize error");
 					} else {
 						if (ch.size > size)
 							size = ch.size;
@@ -622,8 +578,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("get_poolsize error");
 	}
 
 	return size;
@@ -645,21 +600,15 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 
 				size += ((uint32)sizeof(taf_info));
 			} else {
-				fcode = NOTTBF;
-				modul = DATEI;
-				size = 0;
+				error("get_tafinfo error");
 			}
 		} else {
-			fcode = NOTTBF;
-			modul = DATEI;
-			size = 0;
+			error("get_tafinfo error");
 		}
 
 		tafFile.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-		size = 0;
+		error("get_tafinfo error");
 	}
 
 	return size;
@@ -687,8 +636,7 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 			strcat(filename, ".taf");
 			break;
 		default:
-			modul = DATEI;
-			fcode = NOTTBF;
+			error("load_palette error");
 		}
 	}
 
@@ -704,12 +652,10 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 						for (uint16 i = 0; i < 768; i++)
 							palette[i] = tbfheader->palette[i];
 					} else {
-						fcode = NOTTBF;
-						modul = DATEI;
+						error("load_palette error");
 					}
 				} else {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_palette error");
 				}
 				break;
 
@@ -722,8 +668,7 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 							if (zeichen == 12) {
 								f.seek(-768L, SEEK_END);
 								if ((chewy_fread(palette, 768, 1, &f)) != 1) {
-									fcode = PALETTEFEHLER;
-									modul = DATEI;
+									error("load_palette error");
 								} else {
 									uint16 j = 0;
 									for (uint16 i = 0; i < 255; i++) {
@@ -734,17 +679,14 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 									}
 								}
 							} else {
-								fcode = PALETTEFEHLER;
-								modul = DATEI;
+								error("load_palette error");
 							}
 						}
 					} else {
-						fcode = NOTTBF;
-						modul = DATEI;
+						error("load_palette error");
 					}
 				} else {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_palette error");
 				}
 				break;
 
@@ -755,24 +697,20 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 						for (uint16 i = 0; i < 768; i++)
 							palette[i] = tafheader->palette[i];
 					} else {
-						fcode = NOTTBF;
-						modul = DATEI;
+						error("load_palette error");
 					}
 				} else {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_palette error");
 				}
 				break;
 
 			default:
-				modul = DATEI;
-				fcode = NOTTBF;
+				error("load_palette error");
 			}
 
 			f.close();
 		} else {
-			fcode = OPENFEHLER;
-			modul = DATEI;
+			error("load_palette error");
 		}
 	}
 }
@@ -796,8 +734,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 						next = iheader.next;
 						svekt[sprcount] = (uint32)iheader.width * (uint32)iheader.height;
 					} else {
-						fcode = READFEHLER;
-						modul = DATEI;
+						error("imsize error");
 					}
 					++sprcount;
 				}
@@ -806,8 +743,7 @@ void datei::imsize(const char *fname, uint32 *svekt) {
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("imsize error");
 	}
 }
 
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 2ea189bec46..1a68de5c8e8 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -38,7 +38,7 @@ static int strToInt(const char *s) {
 	uint tmp = 0;
 	int read = sscanf(s, "%xh", &tmp);
 	if (read < 1)
-		::error("strToInt failed on string \"%s\"", s);
+		error("strToInt failed on string \"%s\"", s);
 	return (int)tmp;
 }
 
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index e0f85cac67b..09a819cfa1b 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -54,8 +54,6 @@ enum SetupScreenMode {
 #define SOUND_SLOT_SIZE 500000
 #define SPEECH_HALF_BUF 25000
 
-#define ERROR if(modul) {error();}
-
 #define JXDIFF 180
 #define JYDIFF 150
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index bc988db8e4e..43e876c9f56 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -177,22 +177,18 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 				f.seek(room_nr * room_detail_info::SIZE(), SEEK_CUR);
 
 				if (!rdi.load(&f)) {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("load_rdi error");
 				}
 			} else {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("load_rdi error");
 			}
 		} else {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("load_rdi error");
 		}
 
 		f.close();
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("load_rdi error");
 	}
 
 	rdi.dptr = tmprdi;
@@ -253,12 +249,11 @@ void detail::load_taf_tbl(taf_info *fti) {
 						load_taf_seq(CurrentTaf, rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
 				}
 			} else {
-				modul = DATEI;
-				fcode = OPENFEHLER;
+				error("load_taf_tbl error");
 			}
 		}
 	} else {
-		ERROR
+		error("load_taf_tbl error");
 	}
 }
 
@@ -285,8 +280,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 				if (CurrentTaf) {
 					load_sprite_pointer(CurrentTaf);
 				} else {
-					modul = DATEI;
-					fcode = OPENFEHLER;
+					error("init_taf_tbl error");
 				}
 			}
 		}
@@ -350,8 +344,7 @@ void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info
 
 			rs->seek(iheader.next, SEEK_SET);
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("load_taf_seq error");
 		}
 	}
 }
@@ -729,17 +722,13 @@ void detail::load_room_sounds(Stream *tvp_handle) {
 					}
 
 					if (allsize > SoundBufferSize) {
-						modul = SPEICHER;
-						fcode = NOSPEICHER;
-						err->set_user_msg("SFX-SIZE TOO LARGE");
-						break_flag = true;
+						error("load_room_sounds error");
 					}
 				}
 			}
 		}
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("load_room_sounds error");
 	}
 }
 
@@ -974,18 +963,13 @@ void detail::load_taf_ani_sprite(int16 nr) {
 			if (taf_load_buffer)
 				mem->file->load_tafmcga(rs, iheader.komp, size, taf_load_buffer + 4l);
 			else {
-				modul = SPEICHER;
-				fcode = NOSPEICHER;
-				err->set_user_msg("Taf-Load-Puffer nicht initialisiert");
+				error("load_taf_ani_sprite error");
 			}
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("load_taf_ani_sprite error");
 		}
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
-		err->set_user_msg("Arbeitstaf nicht geöffnet");
+		error("load_taf_ani_sprite error");
 	}
 }
 
@@ -1004,15 +988,13 @@ void detail::load_sprite_pointer(Stream *stream) {
 			for (int16 i = 1; i < anzahl && !modul; i++) {
 				taf_imageheader iheader;
 				if (!iheader.load(rs)) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("load_sprite_pointer error");
 				}
 				SpritePos[i] = iheader.next;
 				rs->seek(iheader.next, SEEK_SET);
 			}
 		} else {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("load_sprite_pointer error");
 		}
 	}
 }
diff --git a/engines/chewy/fehler.cpp b/engines/chewy/fehler.cpp
deleted file mode 100644
index 0a8978b81cf..00000000000
--- a/engines/chewy/fehler.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/system.h"
-#include "chewy/fehler.h"
-#include "chewy/ngstypes.h"
-
-namespace Chewy {
-
-fehler *err;
-
-fehler::fehler() {
-	language = ENGL;
-
-	memset(err_dat, 0, sizeof(err_dat));
-	memset(err_txt, 0, sizeof(err_txt));
-
-	modul = 0;
-	user_msg = nullptr;
-}
-
-fehler::~fehler() {
-}
-
-void fehler::msg() {
-	bool ok = true;
-
-	if (language == GERMAN) {
-		switch (modul) {
-		case 1:
-			warning(" Meldung des Grafikmoduls:");
-			break;
-
-		case 2:
-			warning("Meldung des Speichermoduls:");
-			break;
-
-		case 3:
-			warning("Meldung des Dateimoduls:");
-			break;
-
-		case 4:
-			warning("Meldung des Mausmoduls:");
-			break;
-
-		case 5:
-			warning("Meldung des Dialogmoduls:");
-			break;
-
-		default:
-			warning("Modul %d und Meldung %d sind mir nicht bekannt", modul, fcode);
-			ok = false;
-			break;
-		}
-	} else {
-		switch (modul) {
-		case 1:
-			warning("GRAPHICS ERROR:");
-			break;
-
-		case 2:
-			warning("ERROR FROM MEMORY MANAGER:");
-			break;
-
-		case 3:
-			warning("ERROR FROM FILER:");
-			break;
-
-		case 4:
-			warning("ERROR FROM MOUSE-HANDLER:");
-			break;
-
-		case 5:
-			warning("ERROR FROM DILOGUE:");
-			break;
-
-		default:
-			warning("MODUKE %d AND MESSAGE %d NOT KNOWN", modul, fcode);
-			ok = false;
-			break;
-		}
-	}
-	if (ok) {
-		warning("%s", err_txt);
-		if (user_msg) {
-			warning("%s", user_msg);
-			user_msg = nullptr;
-		}
-	}
-}
-
-void fehler::set_user_msg(const char *msg) {
-	user_msg = msg;
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/fehler.h b/engines/chewy/fehler.h
deleted file mode 100644
index 0ba9696283f..00000000000
--- a/engines/chewy/fehler.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_FEHLER_H
-#define CHEWY_FEHLER_H
-
-namespace Chewy {
-
-#define MAX_MODULE 6
-#define GERMAN 1
-#define ENGL 2
-extern int16 modul;
-extern int16 fcode;
-
-class fehler {
-public:
-	fehler();
-	~fehler();
-
-	void msg();
-	void set_user_msg(const char *msg);
-	Common::String get_user_msg() const { return user_msg; }
-private:
-	char err_txt[120];
-	char err_dat[80];
-	int16 language;
-	const char *user_msg;
-};
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index a6b06e0a270..d20c3b7ab17 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
+#include "chewy/resource.h"
 
 namespace Chewy {
 
@@ -151,14 +152,11 @@ int16 file_menue() {
 	char *tmp;
 	int16 text_off, active_slot;
 	int16 rect, line;
-	taf_info *ti;
+	taf_info *ti = mem->taf_adr(OPTION_TAF);
+	//SpriteResource *options = new SpriteResource(OPTION_TAF);
 	ret = 0;
 	room->open_handle("back/gbook.tgp", "rb", R_TGPDATEI);
-	ERROR
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
-	ERROR;
-	ti = mem->taf_adr(OPTION_TAF);
-	ERROR
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -168,7 +166,6 @@ int16 file_menue() {
 
 	fnames = iog->io_init(&ioptr);
 	fnames += 1;
-	ERROR
 	if (!modul) {
 		x[0] = 1;
 		x[1] = 1;
@@ -186,12 +183,22 @@ int16 file_menue() {
 		while (key != ESC) {
 			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 			for (i = 28, j = 0; i < 35; i++, j++) {
+#if 0
+				TAFChunk *sprite = options->getSprite(i);
+				// TODO: korrektur?
+				if (!mode[j])
+					out->sprite_set(sprite->data, 16 + /*ti->korrektur[i << 1] + */x[j],
+									76 + /*ti->korrektur[(i << 1) + 1] + */y[j], 0);
+				else
+					out->sprite_set(sprite->data, 16 /* + ti->korrektur[i << 1]*/,
+									76 /*+ ti->korrektur[(i << 1) + 1]*/, 0);
+#endif
 				if (!mode[j])
 					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1] + x[j],
-					                76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
+									76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
 				else
 					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
-					                76 + ti->korrektur[(i << 1) + 1], 0);
+									76 + ti->korrektur[(i << 1) + 1], 0);
 			}
 			key = in->get_switch_code();
 			if (mode[2] || mode[3] || mode[8]) {
@@ -342,11 +349,9 @@ int16 file_menue() {
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
 						room->open_handle(&background[0], "rb", R_TGPDATEI);
-						ERROR
 						CurrentSong = -1;
 						iog->load(text_off + active_slot,
 						          ioptr.save_path);
-						ERROR
 						key = ESC;
 					}
 				} else if (mode[2]) {
@@ -361,7 +366,6 @@ int16 file_menue() {
 					if (key != 27) {
 						iog->save_entry(text_off + active_slot,
 						                ioptr.save_path);
-						ERROR
 					}
 					key = 0;
 				}
@@ -394,9 +398,7 @@ int16 file_menue() {
 	free(ti);
 
 	room->open_handle(&background[0], "rb", R_TGPDATEI);
-	ERROR
 	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
-	ERROR;
 	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);
 	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
@@ -423,7 +425,6 @@ void option_menue(taf_info *ti) {
 	int16 delay_count;
 	short bar_off;
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0);
-	ERROR;
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -627,7 +628,6 @@ void option_menue(taf_info *ti) {
 	}
 
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
-	ERROR;
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 955db586039..3271cace2fa 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -81,12 +81,12 @@ inline size_t chewy_ftell(Stream *stream) {
 }
 
 inline size_t chewy_fwrite(void *ptr, size_t size, size_t nmemb, Stream *stream) {
-	::error("TODO: chewy_fwrite");
+	error("TODO: chewy_fwrite");
 	return 0;
 }
 
 inline int chewy_fputc(byte c, Stream *stream) {
-	::error("TODO: chewy_fputc");
+	error("TODO: chewy_fputc");
 	return 0;
 }
 
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index b1581c43fac..30880e63cdf 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -106,8 +106,7 @@ void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 		play(lhandle, vscreen, load_p);
 		delete lhandle;
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("flic error");
 	}
 }
 
@@ -128,8 +127,7 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 			CurrentFrame = 0;
 			for (uint16 i = 0; (i < flic_header.frames) && (!modul) && (ret >= 0); i++) {
 				if (!frame_header.load(rs)) {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("flic error");
 				} else {
 					if (frame_header.type != PREFIX) {
 						size_t tmp_size = ((size_t)frame_header.size) - sizeof(FrameHead);
@@ -138,8 +136,7 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 						start += flic_header.speed;
 						if (tmp_size) {
 							if (rs->read(load_puffer, tmp_size) != tmp_size) {
-								modul = DATEI;
-								fcode = READFEHLER;
+								error("flic error");
 							} else {
 								ret = decode_frame();
 							}
@@ -392,15 +389,13 @@ int16 flic::custom_play(CustomInfo *ci) {
 
 				for (uint16 i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0); i++) {
 					if (!custom_frame.load(rs)) {
-						modul = DATEI;
-						fcode = READFEHLER;
+						error("flic error");
 					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
 							uint32 start = g_system->getMillis() + custom_header.speed;
 							if (custom_frame.size) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
-									modul = DATEI;
-									fcode = READFEHLER;
+									error("flic error");
 								} else {
 									ret = decode_cframe();
 								}
@@ -432,8 +427,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 			}
 		}
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("flic error");
 	}
 
 	return ret;
@@ -446,8 +440,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	for (uint16 i = 0; (i < custom_frame.chunks) && (!modul); i++) {
 		ChunkHead chead;
 		if (!chead.load(handle)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("flic error");
 		}
 
 		switch (chead.type) {
@@ -464,16 +457,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case FADE_OUT:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 				out->ausblenden(para[0]);
 			break;
 
 		case LOAD_MUSIC:
 			if (handle->read(Music, chead.size) != chead.size) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else {
 				byte *tmp = Music;
 				tmp += sizeof(tmf_header);
@@ -503,8 +494,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 		case LOAD_VOC:
 			if (!File::readArray(handle, &para[0], 1) ||
 				handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else {
 				sounds[para[0]] = Sound;
 				Ssize[para[0]] = chead.size - 2;
@@ -582,8 +572,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_MVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->setMusicMasterVol(para[0]);
@@ -610,8 +599,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case PLAY_VOC:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->playVoc(sounds[para[0]], para[1], para[2], para[3]);
@@ -627,8 +615,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_SVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->setSoundMasterVol(para[0]);
@@ -639,8 +626,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_CVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->setChannelVol((byte)para[0], (byte)para[1]);
@@ -651,16 +637,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case FREE_EFFECT:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 				free_sound(para[0]);
 			break;
 
 		case MFADE_IN:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->fadeIn(para[0]);
@@ -671,8 +655,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case MFADE_OUT:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifndef AIL
 				snd->fadeOut(para[0]);
@@ -683,8 +666,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_STEREO:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
+				error("flic error");
 			} else
 #ifdef AIL
 				ailsnd->setStereoPos(para[0], para[1]);
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index 568807fb1b9..a61ecaab3a4 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -22,7 +22,6 @@
 #include "common/file.h"
 #include "chewy/chewy.h"
 #include "chewy/gedclass.h"
-#include "chewy/fehler.h"
 #include "chewy/ngshext.h"
 
 namespace Chewy {
@@ -32,9 +31,7 @@ void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr,
 	if (f.open(fname)) {
 		load_ged_pool(&f, Gh, ch_nr, speicher);
 	} else {
-		modul = 3;
-		fcode = 0;
-		err->set_user_msg("GED POOL");
+		error("load_ged_pool error");
 	}
 }
 
@@ -45,9 +42,7 @@ void gedclass::load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader
 			load_ged_chunk(Gh, stream, ch_nr, speicher);
 		}
 	} else {
-		modul = 3;
-		fcode = 0;
-		err->set_user_msg("GED POOL");
+		error("load_ged_pool error");
 	}
 }
 
@@ -72,9 +67,7 @@ void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
 			}
 		}
 	} else {
-		modul = 3;
-		fcode = 0;
-		err->set_user_msg("GED FILE");
+		error("load_ged_chunk error");
 	}
 }
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 6a0d738f2dc..720838fbf35 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -359,7 +359,6 @@ void standard_init();
 
 void get_detect(char *fname);
 
-void error();
 void tidy();
 
 void init_load();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 7f2be108840..a6cf750d3d4 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -34,7 +34,6 @@ static void font_load();
 void standard_init() {
 	mem = new memory();
 	out = new mcga_grafik();
-	err = new fehler();
 	in = new maus();
 	fx = new effect();
 	txt = new text();
@@ -193,10 +192,7 @@ void init_room() {
 	strcpy(room_blk.RoomDir, "room/");
 
 	room->open_handle(&background[0], "rb", R_TGPDATEI);
-	ERROR
-
 	room->open_handle(&backged[0], "rb", R_GEPDATEI);
-	ERROR
 }
 
 void init_atds() {
@@ -210,33 +206,18 @@ void init_atds() {
 
 	// New set up
 	Stream *handle = atds->pool_handle(ATDS_TXT, "rb");
-	ERROR
 	atds->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
-	ERROR
 	atds->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
-
 	atds->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
-	ERROR
 	atds->init_ats_mode(INV_ATS_DATEI, _G(spieler).InvAts);
-
 	atds->set_handle(ATDS_TXT, AAD_DATEI, handle, AAD_TAP_OFF, AAD_TAP_MAX);
-	ERROR
-
 	atds->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
-	ERROR
-
 	atds->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
-	ERROR
 	atds->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
 	atds->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
-
 	atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
-	ERROR
-
 	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
 	atds->open_handle(ADSH_TMP, "rb", 3);
-	ERROR
-
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
 	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
@@ -244,7 +225,6 @@ void init_atds() {
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
 		atds->set_split_win(i, &ssi[i]);
 	atds->set_string_end_func(&atds_string_start);
-	ERROR
 }
 
 void new_game() {
@@ -260,48 +240,36 @@ void new_game() {
 		_G(spieler).room_e_obj[i].RoomNr = -1;
 
 	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
-	ERROR
 	obj->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
-	ERROR
 	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
-	ERROR
 
 	byte *tmp = (byte *)MALLOC(ROOM_ATS_MAX);
-	ERROR
-
 	Common::File f;
 	if (f.open(ROOM_ATS_STEUER)) {
 		if (!f.read(tmp, ROOM_ATS_MAX)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("new_game error");
 		}
 
 		f.close();
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("new_game error");
 	}
-	ERROR
 
 	for (int16 i = 0; i < ROOM_ATS_MAX; i++)
 		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
 	tmp = (byte *)MALLOC(MAX_MOV_OBJ);
-	ERROR
 
 	if (f.open(INV_ATS_STEUER)) {
 		if (!f.read(tmp, MAX_MOV_OBJ)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("new_game error");
 		}
 
 		f.close();
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("new_game error");
 	}
-	ERROR
 
 	for (int16 i = 0; i < MAX_MOV_OBJ; i++)
 		_G(spieler).InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
@@ -323,7 +291,6 @@ static void font_load() {
 
 	// Load the 8x8 font
 	mem->tff_adr(FONT8x8, &font8x8);
-	ERROR
 	out->set_fontadr(font8x8);
 
 	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
@@ -332,7 +299,6 @@ static void font_load() {
 
 	// Load the 6x8 font
 	mem->tff_adr(FONT6x8, &font6x8);
-	ERROR
 	out->set_fontadr(font6x8);
 	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	fvorx6x8 = vorx - 2;
@@ -347,23 +313,15 @@ void init_load() {
 	load_chewy_taf(CHEWY_NORMAL);
 
 	spz_taf_handle = room->open_handle(CH_SPZ_FILE, "rb", R_SPEZTAF);
-	err->set_user_msg("Chewy Spezial Taf");
-	ERROR
 
 	spz_akt_id = -1;
 	spz_tinfo = nullptr;
 	set_spz_delay(3);
 
 	menutaf = mem->taf_adr(MENUTAF);
-	ERROR
 	mem->file->get_tafinfo(MENUTAF, &tafheader);
-	ERROR
-
 	spblende = mem->void_adr("cut/blende.rnd");
-	ERROR
-
 	room->load_room(&room_blk, room_start_nr, &_G(spieler));
-	ERROR
 	out->set_palette(pal);
 }
 
@@ -373,28 +331,14 @@ void get_detect(char *fname_) {
 	Stream *handle = chewy_fopen(fname_, "rb");
 	if (handle) {
 		if (!chewy_fread(&detect, sizeof(DetectInfo), 1, handle)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("get_detect error");
 		}
 		chewy_fclose(handle);
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("get_detect error");
 	}
 }
 
-void error() {
-	in->alter_kb_handler();
-	out->rest_palette();
-	out->restore_mode();
-
-	Common::String msg = err->get_user_msg();
-	err->msg();
-	tidy();
-
-	::error("%s", msg.c_str());
-}
-
 void tidy() {
 	sound_exit();
 	in->alter_kb_handler();
@@ -417,7 +361,6 @@ void tidy() {
 	delete txt;
 	delete fx;
 	delete in;
-	delete err;
 	delete out;
 	delete mem;
 
@@ -436,7 +379,6 @@ void tidy() {
 	txt = nullptr;
 	fx = nullptr;
 	in = nullptr;
-	err = nullptr;
 	out = nullptr;
 	mem = nullptr;
 }
@@ -467,7 +409,6 @@ void sound_init() {
 		flags.InitSound = true;
 
 		voc_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
-		ERROR
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
 		music_handle = room->get_sound_handle();
@@ -478,18 +419,14 @@ void sound_init() {
 		EndOfPool = 0;
 		NewPhead Nph;
 		if (!Nph.load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("sound_init error");
 		} else {
 			EndOfPool = Nph.PoolAnz - 1;
 		}
-		ERROR
 
 		speech_handle = chewy_fopen(SPEECH_TVP, "rb");
 		if (!speech_handle) {
-			modul = DATEI;
-			fcode = OPENFEHLER;
-			err->set_user_msg("speech.tvp");
+			error("Error opening speech.tvp");
 		} else {
 			ailsnd->initDoubleBuffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
 			atds->set_speech_handle(speech_handle);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index fd3d0eedbf1..e2b0ce21d61 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -98,23 +98,16 @@ void game_main() {
 
 void alloc_buffers() {
 	workpage = (byte *)MALLOC(64004l);
-	ERROR
 	pal = (byte *)MALLOC(768l);
-	ERROR
 	cur_back = (byte *)MALLOC(16 * 16 + 4);
-	ERROR;
 	Ci.VirtScreen = workpage;
 	Ci.TempArea = (byte *)MALLOC(64004l);
-	ERROR;
 	det->set_taf_ani_mem(Ci.TempArea);
 	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
-	ERROR;
 	Ci.SoundSlot = (byte *)MALLOC(SOUND_SLOT_SIZE);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
-	ERROR;
 	SpeechBuf[0] = (byte *)MALLOC(SPEECH_HALF_BUF * 2);
-	ERROR
 	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
 }
 
@@ -1860,7 +1853,6 @@ void calc_ausgang(int16 x, int16 y) {
 				exit_room(nr);
 				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
 				room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-				ERROR
 				set_person_pos(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               spieler_mi[_G(auto_p_nr)].HotMovX,
 				               Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
@@ -2091,7 +2083,7 @@ ChewyFont::ChewyFont(Common::String filename) {
 	uint32 header = stream.readUint32BE();
 
 	if (header != headerFont)
-		::error("Invalid resource - %s", filename.c_str());
+		error("Invalid resource - %s", filename.c_str());
 
 	stream.skip(4);	// total memory
 	_count = stream.readUint16LE();
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index c761d76fae6..58d8bbad822 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -105,8 +105,7 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 						rs->seek(iheader.next, SEEK_SET);
 
 					} else {
-						modul = DATEI;
-						fcode = READFEHLER;
+						error("taf_seq_adr error");
 					}
 				}
 				if (!modul) {
@@ -139,16 +138,14 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 								rs->seek(iheader.next, SEEK_SET);
 								sp_ptr += size;
 							} else {
-								modul = DATEI;
-								fcode = READFEHLER;
+								error("taf_seq_adr error");
 							}
 						}
 						if (!modul) {
 							rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
 
 							if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
-								fcode = READFEHLER;
-								modul = DATEI;
+								error("taf_seq_adr error");
 							} else {
 								int16 *p = ts_info->korrektur;
 								for (i = 0; i < (int)image_anz * 2; ++i, ++p)
@@ -160,16 +157,13 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 					}
 				}
 			} else {
-				fcode = NOTTBF;
-				modul = DATEI;
+				error("taf_seq_adr error");
 			}
 		} else {
-			fcode = NOTTBF;
-			modul = DATEI;
+			error("taf_seq_adr error");
 		}
 	} else {
-		modul = DATEI;
-		fcode = READFEHLER;
+		error("taf_seq_adr error");
 	}
 
 	return ts_info;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 8344e077c79..b0ae130c9b4 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -11,7 +11,6 @@ MODULE_OBJS = \
 	effect.o \
 	events.o \
 	events_base.o \
-	fehler.o \
 	file.o \
 	flic.o \
 	gedclass.o \
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 089b54621d5..1c19d272083 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -119,16 +119,6 @@ namespace Chewy {
 #define GRAFIK 1
 #define SPEICHER 2
 #define DATEI 3
-#define OPENFEHLER 0
-#define READFEHLER 1
-#define WRITEFEHLER 2
-#define CLOSEFEHLER 3
-#define ZEIGERFEHLER 3
-#define NOTPCX 7
-#define PALETTEFEHLER 6
-#define NOTTBF 7
-#define NOTSBI 8
-#define NOTVOC 9
 #define MOD15 10
 #define TYPE_ANZ 27
 #define PCXDATEI 0
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 63910ca1f96..23b69ad3128 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -24,7 +24,6 @@
 
 #include "chewy/memory.h"
 #include "chewy/mcga.h"
-#include "chewy/fehler.h"
 #include "chewy/mouse.h"
 
 #include "chewy/io_game.h"
@@ -42,7 +41,6 @@ class sblaster;
 
 extern mcga_grafik *out;
 extern memory *mem;
-extern fehler *err;
 extern maus *in;
 extern sblaster *snd;
 extern io_game *iog;
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/objekte.cpp
index 225f6e8a515..f628b1df7cc 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/objekte.cpp
@@ -75,8 +75,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 
 	if (f.open(fname_)) {
 		if (!iib_datei_header.load(&f)) {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
 				assert(iib_datei_header.Size % RoomMovObjekt::SIZE() == 0);
@@ -87,22 +86,19 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 				}
 
 				if (!valid) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("objekt::load error");
 				} else {
 					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObjekt::SIZE();
 				}
 			} else
 				max_inventar_obj = 0;
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		}
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("objekt::load error");
 	}
 
 	return max_inventar_obj;
@@ -114,8 +110,7 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 
 	if (f.open(fname_)) {
 		if (!sib_datei_header.load(&f)) {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
 			if (sib_datei_header.Anz) {
 				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++rsi) {
@@ -123,22 +118,19 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 				}
 
 				if (!valid) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("objekt::load error");
 				} else {
 					max_static_inventar = sib_datei_header.Anz;
 				}
 			} else
 				max_static_inventar = 0;
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		}
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("objekt::load error");
 	}
 
 	return max_static_inventar;
@@ -150,8 +142,7 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 
 	if (f.open(fname_)) {
 		if (!eib_datei_header.load(&f)) {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
 				for (int i = 0; i < eib_datei_header.Anz && valid; ++i, ++RoomEx) {
@@ -159,22 +150,19 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 				}
 
 				if (!valid) {
-					fcode = READFEHLER;
-					modul = DATEI;
+					error("objekt::load error");
 				} else {
 					max_exit = eib_datei_header.Anz;
 				}
 			} else
 				max_exit = 0;
 		} else {
-			fcode = READFEHLER;
-			modul = DATEI;
+			error("objekt::load error");
 		}
 
 		f.close();
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("objekt::load error");
 	}
 
 	return max_exit;
@@ -563,7 +551,6 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 ret;
 	int16 i;
 	ret = -1;
-
 	for (i = 0; i < max_exit && ret == -1; i++) {
 		if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 			if (mouse_x >= Re[i].X &&
@@ -574,7 +561,6 @@ int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
 			}
 		}
 	}
-
 	return ret;
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 84405db15fa..f1aa852e79d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -312,7 +312,6 @@ void enter_room(int16 eib_nr) {
 
 	if ((!modul) && (flags.InitSound))
 		load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
-	ERROR
 	load_chewy_taf(_G(spieler).ChewyAni);
 	atds->stop_aad();
 	atds->stop_ats();
@@ -1085,7 +1084,6 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 				}
 			}
-			ERROR
 			ailsnd->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
@@ -1771,7 +1769,6 @@ void flic_cut(int16 nr, int16 mode) {
 				break;
 			}
 
-			ERROR
 #else
 			playVideo(nr < 1000 ? nr : nr - 1000);
 #endif
@@ -1781,12 +1778,9 @@ void flic_cut(int16 nr, int16 mode) {
 
 		chewy_fclose(Ci.Handle);
 	} else {
-		fcode = OPENFEHLER;
-		modul = DATEI;
+		error("flic_cut error");
 	}
 
-	ERROR
-
 	ailsnd->endSound();
 	g_events->delay(50);
 	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
@@ -1794,9 +1788,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
-		ERROR
 		room->load_sound();
-		ERROR
 
 		if (_G(spieler).SpeechSwitch)
 			det->enable_room_sound();
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 1b30ba8d8bc..a57fcea9170 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -21,6 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/global.h"
+#include "chewy/resource.h"
 #include "chewy/room.h"
 #include "chewy/ngshext.h"
 
@@ -53,9 +54,7 @@ Stream *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
 		close_handle(mode);
 		roomhandle[mode] = stream;
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
-		err->set_user_msg(fname1);
+		error("open_handle error");
 	}
 
 	return roomhandle[mode];
@@ -72,7 +71,6 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 	clear_prog_ani();
 	det->load_rdi(Rb->DetFile, room_nr);
-	ERROR
 	load_sound();
 
 	if (player->SoundSwitch == false)
@@ -91,10 +89,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		}
 		if (!modul) {
 			obj->calc_all_static_detail();
-			ERROR
 			load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD);
-			ERROR
-
 			set_pal(AblagePal[Rb->AkAblage], Rb->LowPalMem);
 			calc_invent(Rb, player);
 
@@ -238,6 +233,8 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 }
 
 int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
+	//BackgroundResource *res = new BackgroundResource();
+
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(roomhandle[R_TGPDATEI]);
 	tbf_dateiheader tb;
 	bool ret = false;
@@ -246,8 +243,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 		mem->file->select_pool_item(rs, nr);
 
 		if (!tb.load(rs)) {
-			modul = DATEI;
-			fcode = READFEHLER;
+			error("Error reading from room data");
 		}
 
 		if (!modul) {
@@ -274,19 +270,16 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
 							GedXAnz[Rb->AkAblage] = tmp[0] / GedInfo[Rb->AkAblage].X;
 							GedYAnz[Rb->AkAblage] = tmp[1] / GedInfo[Rb->AkAblage].Y;
 						} else {
-							modul = DATEI;
-							fcode = READFEHLER;
+							error("load_tgp error");
 						}
 					}
 				} else {
-					modul = DATEI;
-					fcode = READFEHLER;
+					error("load_tgp error");
 				}
 			}
 		}
 	} else {
-		modul = DATEI;
-		fcode = OPENFEHLER;
+		error("load_tgp error");
 	}
 
 	return ret;
@@ -309,7 +302,6 @@ void Room::init_ablage() {
 	} else {
 		AkAblage = -1;
 		Ablage[0] = 0;
-		ERROR
 	}
 }
 
@@ -498,14 +490,13 @@ void load_chewy_taf(int16 taf_nr) {
 			_G(spieler).ChewyAni = taf_nr;
 			AkChewyTaf = taf_nr;
 			chewy = mem->taf_adr(fname_);
-			ERROR
 
 			taf_dateiheader *tafheader;
 			mem->file->get_tafinfo(fname_, &tafheader);
 			if (!modul) {
 				chewy_kor = chewy->korrektur;
 			} else {
-				error();
+				error("load_chewy_taf error");
 			}
 		}
 	}
@@ -516,8 +507,6 @@ void switch_room(int16 nr) {
 	exit_room(-1);
 	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-	ERROR
-
 	enter_room(-1);
 	set_up_screen(DO_SETUP);
 }


Commit: 282235ef64c6d54b56d314d3973cfeb6cdc9490f
    https://github.com/scummvm/scummvm/commit/282235ef64c6d54b56d314d3973cfeb6cdc9490f
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:35:58-08:00

Commit Message:
CHEWY: Error out on unused custom FLIC frame types

Changed paths:
    engines/chewy/flic.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 30880e63cdf..6db28291c1a 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -445,6 +445,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		switch (chead.type) {
 		case FADE_IN:
+			error("decode_custom_frame: Unused frame type FADE_IN found");
+#if 0
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -452,7 +454,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				fade_flag = true;
 				fade_delay = para[0];
 			}
-
+#endif
 			break;
 
 		case FADE_OUT:
@@ -480,6 +482,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case LOAD_RAW:
+			error("decode_custom_frame: Unused frame type LOAD_RAW found");
+#if 0
 			if (!File::readArray(handle, &para[0], 1) ||
 			        handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
 				modul = DATEI;
@@ -489,6 +493,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				Ssize[para[0]] = chead.size;
 				Sound += chead.size - 2;
 			}
+#endif
+
 			break;
 
 		case LOAD_VOC:
@@ -513,6 +519,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case PLAY_SEQ:
+			error("decode_custom_frame: Unused frame type PLAY_SEQ found");
+#if 0
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -529,9 +537,12 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 				}
 			}
+#endif
 			break;
 
 		case PLAY_PATTERN:
+			error("decode_custom_frame: Unused frame type PLAY_PATTERN found");
+#if 0
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -548,6 +559,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #endif
 				}
 			}
+#endif
 			break;
 
 		case STOP_MUSIC:
@@ -583,6 +595,8 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case SET_LOOPMODE:
+			error("decode_custom_frame: Unused frame type SET_LOOPMODE found");
+#if 0
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				modul = DATEI;
 				fcode = READFEHLER;
@@ -591,6 +605,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				snd->setLoopMode(para[0]);
 #else
 				ailsnd->setLoopMode(para[0]);
+#endif
 #endif
 			break;
 
@@ -674,7 +689,10 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case SET_SPEED:
+			error("decode_custom_frame: Unused frame type SET_SPEED found");
+#if 0
 			custom_header.speed = handle->readUint32LE();
+#endif
 			break;
 
 		case CLEAR_SCREEN:


Commit: 97c902b4555170b7d28da8e1df77f9c7c98efc31
    https://github.com/scummvm/scummvm/commit/97c902b4555170b7d28da8e1df77f9c7c98efc31
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:58-08:00

Commit Message:
CHEWY: Create JungleRoom base class for shared entry/exit logic

Changed paths:
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room70.h
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room73.h
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room74.h
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room75.h


diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index a57fcea9170..de2b3f1454c 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -34,6 +34,54 @@ const int16 SURIMY_TAF19_PHASEN[4][2] = {
 	{ 0, 0 }
 };
 
+
+void JungleRoom::topEntry() {
+	_G(cur_hide_flag) = 0;
+	hide_cur();
+	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
+	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
+	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
+	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
+	show_cur();
+}
+
+void JungleRoom::leftEntry() {
+	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
+	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
+	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
+}
+
+void JungleRoom::rightEntry() {
+	set_person_pos(587, 114, P_CHEWY, P_LEFT);
+	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
+	set_person_pos(561, 112, P_HOWARD, P_LEFT);
+}
+
+void JungleRoom::setup_func() {
+	calc_person_look();
+
+	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+
+	int howDestX, nicDestX;
+	if (posX < 40) {
+		howDestX = 52;
+		nicDestX = 100;
+	} else if (posX < 230) {
+		howDestX = 83;
+		nicDestX = 163;
+	} else if (posX < 445) {
+		howDestX = 261;
+		nicDestX = 329;
+	} else {
+		howDestX = 493;
+		nicDestX = 543;
+	}
+
+	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
+	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
+}
+
+
 Room::Room() {
 	room_timer.TimerAnz = 0;
 	room_timer.TimerStart = 0;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 7aaf383315f..6b63a8b511a 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_RAUM_H
-#define CHEWY_RAUM_H
+#ifndef CHEWY_ROOM_H
+#define CHEWY_ROOM_H
 
 #include "chewy/objekt.h"
 
@@ -44,6 +44,17 @@ extern const int16 SURIMY_TAF19_PHASEN[4][2];
 #define R_GEPDATEI 2
 #define R_SPEZTAF 3
 
+
+class JungleRoom {
+protected:
+	static void topEntry();
+	static void leftEntry();
+	static void rightEntry();
+
+	static void setup_func();
+};
+
+
 struct RaumBlk {
 	byte *LowPalMem;
 	const char *InvFile;
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 0480980d81a..b96e51e8d8d 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -74,51 +74,5 @@ void Room70::xit(int16 eib_nr) {
 	}
 }
 
-void Room70::topEntry() {
-	_G(cur_hide_flag) = 0;
-	hide_cur();
-	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
-	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
-	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
-	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
-	show_cur();
-}
-
-void Room70::leftEntry() {
-	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
-	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
-	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
-}
-
-void Room70::rightEntry() {
-	set_person_pos(587, 114, P_CHEWY, P_LEFT);
-	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
-	set_person_pos(561, 112, P_HOWARD, P_LEFT);
-}
-
-void Room70::setup_func() {
-	calc_person_look();
-
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
-
-	int howDestX, nicDestX;
-	if (posX < 40) {
-		howDestX = 52;
-		nicDestX = 100;
-	} else if (posX < 230) {
-		howDestX = 83;
-		nicDestX = 163;
-	} else if (posX < 445) {
-		howDestX = 261;
-		nicDestX = 329;
-	} else {
-		howDestX = 493;
-		nicDestX = 543;
-	}
-
-	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);	
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room70.h b/engines/chewy/rooms/room70.h
index a905eaf890d..fe44ad1d81e 100644
--- a/engines/chewy/rooms/room70.h
+++ b/engines/chewy/rooms/room70.h
@@ -22,18 +22,15 @@
 #ifndef CHEWY_ROOMS_ROOM70_H
 #define CHEWY_ROOMS_ROOM70_H
 
+#include "chewy/room.h"
+
 namespace Chewy {
 namespace Rooms {
 
-class Room70 {
+class Room70 : public JungleRoom {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
-	static void setup_func();
-
-	static void topEntry();
-	static void leftEntry();
-	static void rightEntry();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 4abeaf135cf..dd2d1b4c1dd 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -41,7 +41,7 @@ void Room73::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = Room70::setup_func;
+	SetUpScreenFunc = setup_func;
 	if (_G(spieler).flags28_20)
 		det->show_static_spr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
 
@@ -50,10 +50,10 @@ void Room73::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 106:
-		Room70::topEntry();
+		topEntry();
 		break;
 	case 115:
-		Room70::leftEntry();
+		leftEntry();
 	default:
 		break;
 	}
diff --git a/engines/chewy/rooms/room73.h b/engines/chewy/rooms/room73.h
index 77946f80910..530f7b22e18 100644
--- a/engines/chewy/rooms/room73.h
+++ b/engines/chewy/rooms/room73.h
@@ -25,7 +25,7 @@
 namespace Chewy {
 namespace Rooms {
 
-class Room73 {
+class Room73 : public JungleRoom {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 5d1b60c3249..4f7e9b0af0e 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -42,7 +42,7 @@ void Room74::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = Room70::setup_func;
+	SetUpScreenFunc = setup_func;
 
 	if (_G(spieler).flags29_1)
 		det->start_detail(0, 255, false);
@@ -52,14 +52,14 @@ void Room74::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 105:
-		Room70::leftEntry();
+		leftEntry();
 		break;
 	case 108:
 		_G(spieler).scrollx = 188;
 		Room75::proc1();
 		break;
 	case 109:
-		Room70::rightEntry();
+		rightEntry();
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room74.h b/engines/chewy/rooms/room74.h
index 1e8a24fd408..823238cb1e9 100644
--- a/engines/chewy/rooms/room74.h
+++ b/engines/chewy/rooms/room74.h
@@ -22,10 +22,12 @@
 #ifndef CHEWY_ROOMS_ROOM74_H
 #define CHEWY_ROOMS_ROOM74_H
 
+#include "chewy/room.h"
+
 namespace Chewy {
 namespace Rooms {
 
-class Room74 {
+class Room74 : public JungleRoom {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 38f918da061..4f81f7cf2bc 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -41,7 +41,7 @@ void Room75::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = Room70::setup_func;
+	SetUpScreenFunc = setup_func;
 
 	if (flags.LoadGame)
 		return;
@@ -52,10 +52,10 @@ void Room75::entry(int16 eib_nr) {
 		proc1();
 		break;		
 	case 104:
-		Room70::rightEntry();
+		rightEntry();
 		break;
 	case 111:
-		Room70::leftEntry();
+		leftEntry();
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room75.h b/engines/chewy/rooms/room75.h
index 1977baf07a3..abfbba204e1 100644
--- a/engines/chewy/rooms/room75.h
+++ b/engines/chewy/rooms/room75.h
@@ -22,10 +22,12 @@
 #ifndef CHEWY_ROOMS_ROOM75_H
 #define CHEWY_ROOMS_ROOM75_H
 
+#include "chewy/room.h"
+
 namespace Chewy {
 namespace Rooms {
 
-class Room75 {
+class Room75 : public JungleRoom {
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);


Commit: 5b9ab5b650164802812b6014a59b97196468b69d
    https://github.com/scummvm/scummvm/commit/5b9ab5b650164802812b6014a59b97196468b69d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Fixes for room 71 leopard vining, variables cleanup

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room71.h
    engines/chewy/t_event.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index f1aa852e79d..6537630e9a3 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1073,7 +1073,7 @@ void flic_cut(int16 nr, int16 mode) {
 				playVideo(23);
 #endif
 			}
-			for (int i = 0; i < 5; i++) {
+			for (i = 0; i < 5; i++) {
 				if (!modul) {
 #ifndef NEW_VIDEO_CODE
 					f->seek(ChunkHead::SIZE(), SEEK_CUR);
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 13ecee3faed..3a81633bad8 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -28,6 +28,9 @@
 namespace Chewy {
 namespace Rooms {
 
+int Room71::_state;
+int Room71::_delay;
+
 void Room71::entry(int16 eib_nr) {
 	det->enable_sound(0, 0);
 	det->enable_sound(0, 1);
@@ -41,8 +44,8 @@ void Room71::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 8;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 16;
 	_G(zoom_horizont) = 0;
-	_G(spieler).r71_word18DB16 = 0;
-	_G(spieler).r71_word18DB18 = 0;
+	_state = 0;
+	_delay = 0;
 	SetUpScreenFunc = setup_func;
 	_G(spieler).DiaAMov = 4;
 	if (!_G(spieler).flags28_2 && !_G(spieler).flags28_4) {
@@ -98,19 +101,22 @@ void Room71::xit(int16 eib_nr) {
 void Room71::setup_func() {
 	calc_person_look();
 
-	if (_G(spieler).r71_word18DB16) {
-		if (_G(spieler).r71_word18DB18)
-			--_G(spieler).r71_word18DB18;
+	if (_state) {
+		if (_delay)
+			--_delay;
 		else {
-			_G(spieler).r71_word18DB18 = (_G(spieler).DelaySpeed + 1) / 2;
-			if (_G(spieler).r71_word18DB16 == 1) {
+			_delay = (_G(spieler).DelaySpeed + 1) / 2;
+
+			if (_state == 1) {
 				det->set_static_pos(3, 244 + g_engine->_rnd.getRandomNumber(4), -1 * g_engine->_rnd.getRandomNumber(4), false, false);				
 			} else {
 				det->set_static_pos(5, 198 + g_engine->_rnd.getRandomNumber(3), -1 * g_engine->_rnd.getRandomNumber(3), false, false);
 			}
 		}
+
 	} else {
 		const int posX = spieler_vector[P_CHEWY].Xypos[0];
+
 		int howDestX, howDestY, nicDestX, nicDestY;
 		if (posX < 40) {
 			howDestX = 82;
@@ -154,7 +160,7 @@ int Room71::proc1() {
 	auto_move(2, P_CHEWY);
 	flags.NoScroll = true;
 	auto_scroll(256, 0);
-	_G(spieler).r71_word18DB18 = 0;
+	_delay = 0;
 	if (menu_item == CUR_HOWARD) {
 		proc4();
 		if (_G(spieler).flags28_4) {
@@ -243,11 +249,11 @@ void Room71::proc4() {
 }
 
 void Room71::proc5(int16 val) {
-	_G(spieler).r71_word18DB16 = 1 + (_G(spieler).flags28_4 ? 1 : 0);
+	_state = 1 + (_G(spieler).flags28_4 ? 1 : 0);
 	det->hide_static_spr(2);
 	start_detail_wait(val, 5, ANI_VOR);
 	det->show_static_spr(2);
-	_G(spieler).r71_word18DB16 = 0;
+	_state = 0;
 }
 
 int Room71::proc6() {
diff --git a/engines/chewy/rooms/room71.h b/engines/chewy/rooms/room71.h
index 4b354c36987..8784afdce65 100644
--- a/engines/chewy/rooms/room71.h
+++ b/engines/chewy/rooms/room71.h
@@ -26,6 +26,8 @@ namespace Chewy {
 namespace Rooms {
 
 class Room71 {
+private:
+	static int _state, _delay;
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index d8ad55875ac..cd71daaff78 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -621,7 +621,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 442:
-						action_ret = Room77::proc1();
+						action_ret = Room71::proc1();
 						break;
 
 					case 443:
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 064076ccfa8..1d0f8bcb58f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -487,8 +487,6 @@ struct Spieler : public SpielerFlags {
 	int16 R64Moni2Ani = 0;
 
 	// ---- //
-	int16 r71_word18DB16 = 0;
-	int16 r71_word18DB18 = 0;
 	int16 R71Val1 = 0;
 	int16 R71Val2 = 0;
 	// ---- //


Commit: ef41a8b904065d961615aa82d6876bd603344746
    https://github.com/scummvm/scummvm/commit/ef41a8b904065d961615aa82d6876bd603344746
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Reduce some variable scopes

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/m_event.cpp


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index c280ef6d0d3..458e98b006d 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -25,7 +25,6 @@
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/ngshext.h"
-#include "chewy/objekt.h"
 #include "chewy/text.h"
 #include "chewy/room.h"
 #include "chewy/objekte.h"
@@ -36,7 +35,6 @@
 #include "chewy/movclass.h"
 #include "chewy/gedclass.h"
 #include "chewy/bitclass.h"
-#include "chewy/ailclass.h"
 
 namespace Chewy {
 
@@ -135,8 +133,7 @@ Globals::Globals() {
 		{ 0, 1, 5, 90 },
 		{ 0, 1, 7, 190 }
 	};
-	Common::copy(&R45_PINFO[0][0], &R45_PINFO[0][0] + R45_MAX_PERSON * 4,
-		&_r45_pinfo[0][0]);
+	Common::copy(&R45_PINFO[0][0], &R45_PINFO[0][0] + R45_MAX_PERSON * 4, &_r45_pinfo[0][0]);
 }
 
 Globals::~Globals() {
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index a6cf750d3d4..b389affb12c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -284,15 +284,15 @@ void new_game() {
 }
 
 static void font_load() {
-	int16 vorx;
-	int16 vory;
-	int16 fntbr;
-	int16 fnth;
 
 	// Load the 8x8 font
 	mem->tff_adr(FONT8x8, &font8x8);
 	out->set_fontadr(font8x8);
 
+	int16 vorx;
+	int16 vory;
+	int16 fntbr;
+	int16 fnth;
 	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	fvorx8x8 = vorx;
 	fvory8x8 = vory;
@@ -308,7 +308,6 @@ static void font_load() {
 }
 
 void init_load() {
-	taf_dateiheader *tafheader;
 	AkChewyTaf = 0;
 	load_chewy_taf(CHEWY_NORMAL);
 
@@ -319,6 +318,7 @@ void init_load() {
 	set_spz_delay(3);
 
 	menutaf = mem->taf_adr(MENUTAF);
+	taf_dateiheader *tafheader;
 	mem->file->get_tafinfo(MENUTAF, &tafheader);
 	spblende = mem->void_adr("cut/blende.rnd");
 	room->load_room(&room_blk, room_start_nr, &_G(spieler));
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 395eb1e8813..7427ed739d5 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -50,13 +50,7 @@ short file_xy_g[7][4] = {
 	{ 6, 6, 133, 97}
 };
 
-byte code_tbl_g[6] = {72,
-                      80,
-                      59,
-                      60,
-                      61,
-                      62
-                     };
+byte code_tbl_g[6] = {72, 80, 59, 60, 61, 62};
 
 char auf_tbl_g[3][3] = { {FSTRING8 },
 	{FSTRING9 },
@@ -70,11 +64,7 @@ char ab_tbl_g[4][3] = { {FSTRING11},
 
 int16 io_game::io_menu(iog_init *iostruc) {
 	int16 max_scroll = 20;
-	int16 i, j, x, y;
-	int16 auswahl;
-	int16 cur_y1;
-	int16 cur_y;
-	int16 scroll_flag;
+	int16 i, j, y;
 	char ende = 0, mouse_f = 1;
 	char a = 0;
 	int16 y1 = 106;
@@ -92,15 +82,16 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		kbinfo = inzeig->kbinfo;
 	scr_width = scr_w << 2;
 	d_klick = DOPPEL_KLICK;
-	cur_y1 = io->popy + 4;
-	cur_y = io->popy + 8;
+	int16 cur_y1 = io->popy + 4;
+	int16 cur_y = io->popy + 8;
 	plot_io();
 	schalter_aus();
 	for (i = 0; i < 20; i++)
 		file_find_g[i][0] = 0;
-	scroll_flag = 0;
+	int16 scroll_flag = 0;
 	i = 0;
 
+	int16 auswahl;
 	if (!io->key_nr) {
 		out->box(io->popx + 161, io->popy + 4, io->popx + 243, io->popy + 21, io->m_col[1]);
 		auswahl = 1;
@@ -156,7 +147,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		cur->plot_cur();
 
 		if (minfo->button == 1) {
-			x = minfo->x;
+			int16 x = minfo->x;
 			y = minfo->y;
 
 			j = in->maus_vector(x - io->popx, y - io->popy, (int16 *)file_xy_g, 7);
@@ -475,8 +466,7 @@ void io_game::unmark_eintrag(int16 y, int16 nr) {
 }
 
 void io_game::plot_dir_liste(int16 cur_y, int16 start) {
-	int16 i;
-	for (i = start; i < start + 8; i++) {
+	for (int16 i = start; i < start + 8; i++) {
 		if (i < 20) {
 
 			out->pop_box(io->popx + 8, cur_y + 1, io->popx + 131, cur_y + 10,
@@ -496,9 +486,7 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 	}
 }
 
-void io_game::schalter_aus()
-
-{
+void io_game::schalter_aus() {
 	out->vsync_start();
 	out->pop_box(io->popx + 163, io->popy + 6, io->popx + 241, io->popy + 18,
 	              io->m_col[0], io->m_col[1], io->m_col[5]);
@@ -524,38 +512,29 @@ void io_game::schalter_aus()
 }
 
 void io_game::plot_io() {
-	int16 i;
-	int16 y1 = 120;
-
-	out->pop_box(io->popx, io->popy, io->popx + 248, io->popy + y1,
-	              io->m_col[0], io->m_col[1], io->m_col[5]);
-	out->pop_box(io->popx + 1, io->popy + 1, io->popx - 1 + 248, io->popy - 1 + y1,
-	              io->m_col[0], io->m_col[1], 300);
+	const int16 y1 = 120;
 
-	out->pop_box(io->popx + 6, io->popy + 6, io->popx + 133, io->popy + y1 - 20,
-	              io->m_col[1], io->m_col[0], io->m_col[3]);
-
-	out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51,
-	              io->m_col[0], io->m_col[1], 300);
+	out->pop_box(io->popx, io->popy, io->popx + 248, io->popy + y1, io->m_col[0], io->m_col[1], io->m_col[5]);
+	out->pop_box(io->popx + 1, io->popy + 1, io->popx - 1 + 248, io->popy - 1 + y1, io->m_col[0], io->m_col[1], 300);
+	out->pop_box(io->popx + 6, io->popy + 6, io->popx + 133, io->popy + y1 - 20, io->m_col[1], io->m_col[0], io->m_col[3]);
+	out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51, io->m_col[0], io->m_col[1], 300);
 	plot_auf_txt(io->m_col[1]);
-	out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 20,
-	              io->m_col[0], io->m_col[1], 300);
+
+	out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 20,io->m_col[0], io->m_col[1], 300);
 	plot_ab_txt(io->m_col[1]);
-	for (i = 0; i < 9; i++) {
-		out->printxy(io->popx + 10, io->popy + 10 + i * 10,
-		              io->m_col[5], 300, scr_width, "%d.\0", i + 1);
+
+	for (int16 i = 0; i < 9; i++) {
+		out->printxy(io->popx + 10, io->popy + 10 + i * 10,io->m_col[5], 300, scr_width, "%d.\0", i + 1);
 	}
 }
 
 void io_game::plot_auf_txt(int16 farbe) {
-	int16 i;
-	for (i = 0; i < 3; i++)
+	for (int16 i = 0; i < 3; i++)
 		out->printxy(io->popx + 146, io->popy + 15 + i * 10, farbe, 300, scr_width, auf_tbl_g[i]);
 }
 
 void io_game::plot_ab_txt(int16 farbe) {
-	int16 i;
-	for (i = 0; i < 4; i++)
+	for (int16 i = 0; i < 4; i++)
 		out->printxy(io->popx + 146, io->popy + 59 + i * 10, farbe, 300, scr_width, ab_tbl_g[i]);
 }
 
@@ -621,18 +600,14 @@ void io_game::load(int16 slotNum, char *fname) {
 	}
 }
 
-void io_game::print_shad(int16 x, int16 y, int16 fcol, int16 bcol,
-                         int16 scol, int16 width, char *name)
-
-{
+void io_game::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 width, char *name) {
 	out->printxy(x + 1, y + 1, scol, bcol, width, name);
 	out->printxy(x, y, fcol, bcol, width, name);
 }
 
 char *io_game::io_init(iog_init *iostruc) {
-	int16 i;
 	io = iostruc;
-	for (i = 0; i < 20; i++)
+	for (int16 i = 0; i < 20; i++)
 		file_find_g[i][0] = 0;
 	get_savegame_files();
 
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index ac21da31be5..9dd0484b5f9 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -29,17 +29,13 @@ namespace Chewy {
 #define PATTERN_PLAY 2
 
 void load_room_music(int16 room_nr) {
-	int16 ttp_index;
-	int16 volume;
-	int16 lp_mode;
-	int16 play_mode;
-	int16 seq_start = 0;
-	int16 seq_end = 0;
-	int16 pattern = 0;
-	ttp_index = -1;
-	volume = _G(spieler).MusicVol;
-	lp_mode = 1;
-	play_mode = NORMAL_PLAY;
+	const int16 seq_start = 0;
+	const int16 seq_end = 0;
+	const int16 pattern = 0;
+	int16 ttp_index = -1;
+	int16 volume = _G(spieler).MusicVol;
+	const int16 lp_mode = 1;
+	const int16 play_mode = NORMAL_PLAY;
 	if (_G(spieler).MusicSwitch && (music_handle)) {
 		switch (room_nr) {
 		case 0:


Commit: a6cb14b4637bf9fd6ab7ef6199dbd00285f87d00
    https://github.com/scummvm/scummvm/commit/a6cb14b4637bf9fd6ab7ef6199dbd00285f87d00
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Remove unused includes in scenes 73 to 75

Changed paths:
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp


diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index dd2d1b4c1dd..cf7f8d18147 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/rooms/room70.h"
 #include "chewy/rooms/room73.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 4f7e9b0af0e..c6d647855d7 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/rooms/room70.h"
 #include "chewy/rooms/room74.h"
 #include "chewy/rooms/room75.h"
 
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 4f81f7cf2bc..1f2414ece20 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -23,7 +23,6 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room75.h"
-#include "chewy/rooms/room70.h"
 
 namespace Chewy {
 namespace Rooms {


Commit: b0b6a0f7c9c84811086db784d65f461d871935c5
    https://github.com/scummvm/scummvm/commit/b0b6a0f7c9c84811086db784d65f461d871935c5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Fix room 71 walk area after leopard is tied up

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6537630e9a3..bf3fb4cac80 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -223,14 +223,12 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 71:
-			if (!_G(spieler).flags28_2 || !_G(spieler).flags29_4)
-				idx_nr = 0;
-			else
-				idx_nr = 4;
+			idx_nr = _G(spieler).R71LeopardVined ? 1 : 0;
 			break;
 
 		case 76:
-			return idx_nr;
+			idx_nr = _G(spieler).flags29_4 ? 4 : 0;
+			break;
 
 		case 84:
 			if (!_G(spieler).flags31_1)
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 3a81633bad8..1f884a875cd 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -48,10 +48,10 @@ void Room71::entry(int16 eib_nr) {
 	_delay = 0;
 	SetUpScreenFunc = setup_func;
 	_G(spieler).DiaAMov = 4;
-	if (!_G(spieler).flags28_2 && !_G(spieler).flags28_4) {
+	if (!_G(spieler).R71LeopardVined && !_G(spieler).flags28_4) {
 		_G(timer_nr)[0] = room->set_timer(0, 10);
 		det->set_static_ani(0, -1);
-	} else if (_G(spieler).flags28_2) {
+	} else if (_G(spieler).R71LeopardVined) {
 		det->start_detail(2, 255, ANI_VOR);
 		det->show_static_spr(8);
 		det->hide_static_spr(2);
@@ -183,7 +183,7 @@ int Room71::proc1() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 
-	if (!_G(spieler).flags28_2)
+	if (!_G(spieler).R71LeopardVined)
 		start_aad_wait(432, -1);
 
 	show_cur();
@@ -217,7 +217,7 @@ void Room71::proc2() {
 	_G(spieler).PersonHide[P_HOWARD] = false;
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(spieler).flags28_2 = true;
+	_G(spieler).R71LeopardVined = true;
 	flags.NoScroll = false;
 	menu_item = CUR_WALK;
 	cursor_wahl(CUR_WALK);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 1d0f8bcb58f..c2312290b29 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -277,7 +277,7 @@ struct SpielerFlags {
 	bool R68IndigoDia : 1;
 
 	bool R68Gutschein : 1;
-	bool flags28_2 : 1;
+	bool R71LeopardVined : 1;
 	bool flags28_4 : 1;
 	bool flags28_8 : 1;
 	bool flags28_10 : 1;


Commit: 98faf5ac581410350c2cd7cc0ae07f277da7e59d
    https://github.com/scummvm/scummvm/commit/98faf5ac581410350c2cd7cc0ae07f277da7e59d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Fix room 74 cutting rubber plant

Changed paths:
    engines/chewy/defines.h
    engines/chewy/rooms/room74.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 09a819cfa1b..5a9b2ffe537 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -388,6 +388,8 @@ enum SetupScreenMode {
 #define VIDEO_INV 96
 #define B_MARY2_INV 97
 #define KARTE_INV 98
+#define MACHETE_INV 99
+#define RUBBER_INV 100
 
 #define SIB_SCHLEIM 3
 
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index c6d647855d7..703b54747e8 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -63,7 +63,6 @@ void Room74::entry(int16 eib_nr) {
 	default:
 		break;
 	}
-	
 }
 
 void Room74::xit(int16 eib_nr) {
@@ -90,22 +89,24 @@ void Room74::xit(int16 eib_nr) {
 int Room74::proc1() {
 	int retVal = 0;
 	hide_cur();
-	if (is_cur_inventar(99)) {
+
+	if (is_cur_inventar(MACHETE_INV)) {
 		retVal = 1;
-		_G(spieler).flags28_80 = true;
+		_G(spieler).R74CutRubberPlant = true;
 		auto_move(4, P_CHEWY);
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(1, 1, ANI_VOR);
 		set_person_pos(272, 116, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = 0;
+		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->start_detail(0, 255, false);
 		_G(spieler).flags29_1 = true;
 		atds->set_ats_str(435, 1, ATS_DATEI);
-	} else if (!_G(spieler).inv_cur && _G(spieler).flags28_80) {
+
+	} else if (!_G(spieler).inv_cur && _G(spieler).R74CutRubberPlant) {
 		atds->set_steuer_bit(435, ATS_AKTIV_BIT, ATS_DATEI);
 		auto_move(5, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
-		new_invent_2_cur(100);
+		new_invent_2_cur(RUBBER_INV);
 	}
 
 	show_cur();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index c2312290b29..42eaa04e0d8 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -283,7 +283,7 @@ struct SpielerFlags {
 	bool flags28_10 : 1;
 	bool flags28_20 : 1;
 	bool flags28_40 : 1;
-	bool flags28_80 : 1;
+	bool R74CutRubberPlant : 1;
 
 	bool flags29_1 : 1;
 	bool flags29_2 : 1;


Commit: 617b52aa9565a8a23483e90394f54268c8269288
    https://github.com/scummvm/scummvm/commit/617b52aa9565a8a23483e90394f54268c8269288
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Fix cutscene when first entering room 76

Changed paths:
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room76.h
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 6d0bcb18a0e..3670fbaa197 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -28,6 +28,9 @@
 namespace Chewy {
 namespace Rooms {
 
+int Room76::_state;
+
+
 void Room76::entry() {
 	det->enable_sound(0,0);
 	det->enable_sound(0, 1);
@@ -35,15 +38,18 @@ void Room76::entry() {
 	det->play_sound(0, 1);
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
-	_G(spieler).r76_word18DB1E = 0;
+	_state = 0;
+
 	set_person_pos(308, 84, P_NICHELLE, P_RIGHT);
 	set_person_pos(365, 84, P_HOWARD, P_RIGHT);
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
-	if (_G(spieler).flags29_4) {
+
+	if (!_G(spieler).flags29_4) {
 		atds->del_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
+
 	} else {
 		det->del_static_ani(2);
 		for (int i = 0; i < 3; ++i)
@@ -62,14 +68,15 @@ void Room76::entry() {
 		flags.NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).flags29_2 = true;
-		set_person_pos(128, 135, P_HOWARD, P_RIGHT);
+		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		proc3(420);
 		proc5();
-	} else if (!_G(spieler).r76_word18DB1A) {
+
+	} else if (!_G(spieler).r76State) {
 		hide_cur();
 		flags.NoScroll = true;
 		_G(spieler).scrollx = 122;
-		_G(spieler).r76_word18DB1A = -1;
+		_G(spieler).r76State = -1;
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		proc3(422);
 		flags.NoScroll = false;
@@ -78,14 +85,14 @@ void Room76::entry() {
 
 void Room76::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).r76_word18DB1A = -1;
+	_G(spieler).r76State = -1;
 }
 
 void Room76::setup_func() {
-	if (_G(spieler).r76_word18DB1E != 1 || _G(spieler).scrollx < 300)
+	if (_state != 1 || _G(spieler).scrollx < 300)
 		return;
 
-	_G(spieler).r76_word18DB1E = 0;
+	_state = 0;
 	det->start_detail(11, 1, false);
 	det->start_detail(12, 1, false);
 }
@@ -126,7 +133,7 @@ void Room76::proc3(int diaNr) {
 }
 
 void Room76::proc5() {
-	_G(spieler).r76_word18DB1E = 1;
+	_state = 1;
 	det->del_static_ani(2);
 	det->start_detail(6, 1, false);
 	flags.NoScroll = false;
diff --git a/engines/chewy/rooms/room76.h b/engines/chewy/rooms/room76.h
index 44936f89c96..95e5c62ec96 100644
--- a/engines/chewy/rooms/room76.h
+++ b/engines/chewy/rooms/room76.h
@@ -26,6 +26,9 @@ namespace Chewy {
 namespace Rooms {
 
 class Room76 {
+private:
+	static int _state;
+
 public:
 	static void entry();
 	static void xit();
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 917fd6a2aa6..bac4395d5a5 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -33,7 +33,7 @@ void Room77::entry() {
 	det->play_sound(0, 0);
 	det->play_sound(0, 1);
 	_G(spieler).ScrollxStep = 2;
-	if (_G(spieler).r76_word18DB1A == 1) {
+	if (_G(spieler).r76State == 1) {
 		_G(spieler).flags29_4 = true;
 		atds->set_ats_str(452, 1, ATS_DATEI);
 	}
@@ -47,8 +47,8 @@ void Room77::entry() {
 		}
 	}
 
-	if (_G(spieler).r76_word18DB1A == 1) {
-		_G(spieler).r76_word18DB1A = -1;
+	if (_G(spieler).r76State == 1) {
+		_G(spieler).r76State = -1;
 		hide_cur();
 		_G(spieler).scrollx = 62;
 		set_person_pos(158, 127, P_CHEWY, P_RIGHT);
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 57bc256e04a..7c1a2046052 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room78::entry() {
-	_G(spieler).r76_word18DB1A = -1;
+	_G(spieler).r76State = -1;
 	det->enable_sound(0, 1);
 	det->play_sound(0, 1);
 	hide_cur();
@@ -115,10 +115,10 @@ void Room78::entry() {
 		}
 
 		if (_G(spieler).flags29_10 && _G(spieler).flags29_20) {
-			_G(spieler).r76_word18DB1A = 1;
+			_G(spieler).r76State = 1;
 			destRoom = 77;
 		} else {
-			_G(spieler).r76_word18DB1A = 0;
+			_G(spieler).r76State = 0;
 			destRoom = 76;
 		}		
 	}
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 42eaa04e0d8..7811d0db898 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -490,8 +490,7 @@ struct Spieler : public SpielerFlags {
 	int16 R71Val1 = 0;
 	int16 R71Val2 = 0;
 	// ---- //
-	int16 r76_word18DB1A = 0;
-	int16 r76_word18DB1E = 0;
+	int16 r76State = 0;
 	// ---- //
 	int16 R79Val[3] = {0, 0, 0};
 	// ---- //


Commit: b57197c43a5b9653be545965c32b9561770f6a99
    https://github.com/scummvm/scummvm/commit/b57197c43a5b9653be545965c32b9561770f6a99
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:35:59-08:00

Commit Message:
CHEWY: Fix giving chocolate to chief

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index cd71daaff78..e4945b3ea9c 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -628,14 +628,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						action_ret = Room71::proc6();
 						break;
 
-					case 450:
-						action_ret = Room76::proc6();
-						break;
-
 					case 452:
 						action_ret = Room76::proc7();
 						break;
 
+					case 458:
+						action_ret = Room76::proc6();
+						break;
+
 					case 463:
 						action_ret = Room77::proc1();
 						break;


Commit: 33902bc8ce1367f8ba7390217d2669ec1aecd3e0
    https://github.com/scummvm/scummvm/commit/33902bc8ce1367f8ba7390217d2669ec1aecd3e0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY: Workaround for original bug loading saves in room 77

Changed paths:
    engines/chewy/rooms/room77.cpp


diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index bac4395d5a5..10eddd5fcb0 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -47,7 +47,12 @@ void Room77::entry() {
 		}
 	}
 
-	if (_G(spieler).r76State == 1) {
+	// WORKAROUND: Loading saved game in this room don't properly
+	// reset the flag used for cutscenes when returning to village
+	if (flags.LoadGame) {
+		_G(spieler).r76State = -1;
+
+	} else if (_G(spieler).r76State == 1) {
 		_G(spieler).r76State = -1;
 		hide_cur();
 		_G(spieler).scrollx = 62;


Commit: 90a666d0d09e8c2df1db750dcfc87bc7e9070d4f
    https://github.com/scummvm/scummvm/commit/90a666d0d09e8c2df1db750dcfc87bc7e9070d4f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY: Fix selecting destinations in room 80

Changed paths:
    engines/chewy/rooms/room80.cpp


diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index f58eb0a0a1e..1018f018e36 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -133,6 +133,9 @@ void Room80::setup_func() {
 
 	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 80)
 		_G(spieler).PersonRoomNr[P_NICHELLE] = nextRoom;
+
+	flags.NoScroll = false;
+	switch_room(nextRoom);
 }
 
 } // namespace Rooms


Commit: 04193434d9ecec3e59c74f85685abfec4830c8f4
    https://github.com/scummvm/scummvm/commit/04193434d9ecec3e59c74f85685abfec4830c8f4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY: Use the new TGP image resource loading code

This also effectively removes the TGPDATEI resource handle

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/file.cpp
    engines/chewy/file.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/resource.cpp
    engines/chewy/resource.h
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 670693fca5c..19208bbde95 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -56,50 +56,6 @@ void datei::assign_filename(const char *fname, const char *ext) {
 		strcat(filename, ext);
 }
 
-void datei::load_image(Stream *stream, byte *sp, byte *palette) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	tbf_dateiheader *header = (tbf_dateiheader *)tmp;
-	byte *speicher = sp;
-	int16 *abmess = (int16 *)speicher;
-
-	if ((speicher) && (palette) && (rs)) {
-		if (header->load(rs)) {
-			int16 format = get_id(header->id);
-			if (format != -1) {
-				for (uint16 i = 0; i < 768; i++)
-					palette[i] = header->palette[i];
-				switch (format) {
-				case TBFDATEI:
-					abmess[0] = header->width;
-					abmess[1] = header->height;
-					speicher += 4;
-					read_tbf_image(rs, header->komp, header->entpsize, speicher);
-					break;
-				case TPFDATEI:
-					abmess[0] = header->width;
-					abmess[1] = header->height;
-					speicher += 4;
-					read_tpf_image(rs, header->komp, header->entpsize, speicher);
-					break;
-
-				default:
-					break;
-				}
-			} else {
-				error("load_image error");
-			}
-		} else {
-			error("load_image error");
-		}
-	} else {
-		error("load_image error");
-	}
-
-	ChunkHead ch;
-	if (!modul)
-		ch.load(rs);
-}
-
 uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	NewPhead *ph = (NewPhead *)tmp;
@@ -327,29 +283,6 @@ void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
 	}
 }
 
-void datei::read_tpf_image(Stream *handle, int16 komp, uint32 size, byte *speicher) {
-	if (komp == 1) {
-		for (int16 plane = 0; plane < 4; plane++) {
-			for (uint32 pos = (uint32)plane; pos < (size + plane);) {
-				uint8 count = chewy_fgetc(handle);
-				char zeichen = chewy_fgetc(handle);
-				for (uint8 i = 0; i < count && pos < (size + plane); i++) {
-					speicher[pos] = zeichen;
-					pos += 4;
-				}
-			}
-		}
-	} else {
-		for (int16 plane = 0; plane < 4; plane++) {
-			for (uint32 pos = (uint32)plane; pos < size + plane;) {
-				char zeichen = chewy_fgetc(handle);
-				speicher[pos] = zeichen;
-				pos += 4;
-			}
-		}
-	}
-}
-
 uint32 datei::load_voc(Stream *handle, byte *speicher) {
 	ChunkHead *ch = (ChunkHead *)tmp;
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 3ccab2c9cf9..db27eca7975 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -36,10 +36,8 @@ public:
 
 	void load_tafmcga(const char *fname, byte *sp, int16 nr);
 
-	void load_image(Stream *stream, byte *sp, byte *palette);
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
-	void read_tpf_image(Stream *stream, int16 komp, uint32 size, byte *speicher);
 	uint32 load_voc(Stream *stream, byte *speicher);
 	uint32 load_tmf(Stream *stream, tmf_header *song);
 
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index d20c3b7ab17..02f431d26b5 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -155,8 +155,7 @@ int16 file_menue() {
 	taf_info *ti = mem->taf_adr(OPTION_TAF);
 	//SpriteResource *options = new SpriteResource(OPTION_TAF);
 	ret = 0;
-	room->open_handle("back/gbook.tgp", "rb", R_TGPDATEI);
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -348,7 +347,6 @@ int16 file_menue() {
 				if (mode[3]) {
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
-						room->open_handle(&background[0], "rb", R_TGPDATEI);
 						CurrentSong = -1;
 						iog->load(text_off + active_slot,
 						          ioptr.save_path);
@@ -397,8 +395,7 @@ int16 file_menue() {
 	}
 	free(ti);
 
-	room->open_handle(&background[0], "rb", R_TGPDATEI);
-	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
+	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
 	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);
 	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
@@ -424,7 +421,7 @@ void option_menue(taf_info *ti) {
 	//int16 TmpFrame;
 	int16 delay_count;
 	short bar_off;
-	room->load_tgp(0, &room_blk, GBOOK_TGP, 0);
+	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -627,7 +624,7 @@ void option_menue(taf_info *ti) {
 			--delay_count;
 	}
 
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0);
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 3271cace2fa..fd6903b5c07 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -68,12 +68,6 @@ inline int chewy_fseek(Stream *stream, long int offset, int whence) {
 	return rs->seek(offset, whence);
 }
 
-inline int chewy_fgetc(Stream *stream) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-	return rs->readByte();
-}
-
 inline size_t chewy_ftell(Stream *stream) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	assert(rs);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 458e98b006d..fdb4bab0388 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -251,7 +251,6 @@ atdsys *atds;
 flic *flc;
 movclass *mov;
 
-char background[] = { EPISODE1 };
 char backged[] = { EPISODE1_GEP };
 
 AutoMov auto_mov[MAX_AUTO_MOV];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 720838fbf35..2773713e3c9 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -236,7 +236,6 @@ extern flic *flc;
 extern movclass *mov;
 extern ailclass *ailsnd;
 
-extern char background[];
 extern char backged[];
 extern char fname[80];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index b389affb12c..3b380949d6c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -191,7 +191,6 @@ void init_room() {
 	room_blk.AtsLoad = true;
 	strcpy(room_blk.RoomDir, "room/");
 
-	room->open_handle(&background[0], "rb", R_TGPDATEI);
 	room->open_handle(&backged[0], "rb", R_GEPDATEI);
 }
 
diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
index 4b727a4e442..92059cec6dd 100644
--- a/engines/chewy/resource.cpp
+++ b/engines/chewy/resource.cpp
@@ -190,7 +190,7 @@ TAFChunk *SpriteResource::getSprite(uint num) {
 	return taf;
 }
 
-TBFChunk *BackgroundResource::getImage(uint num) {
+TBFChunk *BackgroundResource::getImage(uint num, bool fixPalette) {
 	assert(num < _chunkList.size());
 
 	Chunk *chunk = &_chunkList[num];
@@ -207,7 +207,7 @@ TBFChunk *BackgroundResource::getImage(uint num) {
 	tbf->width = _stream.readUint16LE();
 	tbf->height = _stream.readUint16LE();
 	for (int j = 0; j < 3 * 256; j++)
-		tbf->palette[j] = (_stream.readByte() << 2) & 0xff;
+		tbf->palette[j] = fixPalette ? (_stream.readByte() << 2) & 0xff : _stream.readByte();
 
 	tbf->data = new uint8[tbf->size];
 
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index 1b3777dc0df..6e008400614 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -159,7 +159,7 @@ public:
 	BackgroundResource(Common::String filename) : Resource(filename) {}
 	virtual ~BackgroundResource() {}
 
-	TBFChunk *getImage(uint num);
+	TBFChunk *getImage(uint num, bool fixPalette);
 };
 
 class SoundResource : public Resource {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index de2b3f1454c..fa742b78290 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -137,7 +137,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		}
 		if (!modul) {
 			obj->calc_all_static_detail();
-			load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD);
+			load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
 			set_pal(AblagePal[Rb->AkAblage], Rb->LowPalMem);
 			calc_invent(Rb, player);
 
@@ -280,57 +280,38 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 	}
 }
 
-int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode) {
-	//BackgroundResource *res = new BackgroundResource();
+int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName) {
+	BackgroundResource *res = new BackgroundResource(fileName);
+	TBFChunk *img = res->getImage(nr, false);
 
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(roomhandle[R_TGPDATEI]);
-	tbf_dateiheader tb;
-	bool ret = false;
+	Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), img->size + 4);
 
-	if (rs) {
-		mem->file->select_pool_item(rs, nr);
-
-		if (!tb.load(rs)) {
-			error("Error reading from room data");
-		}
-
-		if (!modul) {
-			rs->seek(-tbf_dateiheader::SIZE(), SEEK_CUR);
-			Rb->AkAblage = get_ablage(nr + (1000 * tgp_idx), tb.entpsize + 4);
-
-			if (Rb->AkAblage == -1) {
-			} else if (Rb->AkAblage >= 1000) {
-				Rb->AkAblage -= 1000;
-
-			} else {
-				mem->file->load_image(rs, Ablage[Rb->AkAblage], AblagePal[Rb->AkAblage]);
-				if (!modul) {
-					set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), tb.entpsize);
-					ret = true;
-
-					if (mode == GED_LOAD) {
-						Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
-							roomhandle[R_GEPDATEI]);
-						ged->load_ged_pool(gstream, &GedInfo[Rb->AkAblage],
-						                   nr, GedMem[Rb->AkAblage]);
-						if (!modul) {
-							int16 *tmp = (int16 *)Ablage[Rb->AkAblage];
-							GedXAnz[Rb->AkAblage] = tmp[0] / GedInfo[Rb->AkAblage].X;
-							GedYAnz[Rb->AkAblage] = tmp[1] / GedInfo[Rb->AkAblage].Y;
-						} else {
-							error("load_tgp error");
-						}
-					}
-				} else {
-					error("load_tgp error");
-				}
-			}
-		}
+	if (Rb->AkAblage == -1) {
+	} else if (Rb->AkAblage >= 1000) {
+		Rb->AkAblage -= 1000;
 	} else {
-		error("load_tgp error");
+		// Image width and height is piggy-banked inside the image data
+		uint16 *mem = (uint16 *)Ablage[Rb->AkAblage];
+		mem[0] = img->width;
+		mem[1] = img->height;
+		memcpy(Ablage[Rb->AkAblage] + 4, img->data, img->size);
+		memcpy(AblagePal[Rb->AkAblage], img->palette, 3 * 256);
+		set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), img->size);
+
+		if (mode == GED_LOAD) {
+			Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
+				roomhandle[R_GEPDATEI]);
+			ged->load_ged_pool(gstream, &GedInfo[Rb->AkAblage],
+						        nr, GedMem[Rb->AkAblage]);
+			GedXAnz[Rb->AkAblage] = img->width / GedInfo[Rb->AkAblage].X;
+			GedYAnz[Rb->AkAblage] = img->height / GedInfo[Rb->AkAblage].Y;
+		}
 	}
 
-	return ret;
+	delete img;
+	delete res;
+
+	return true;
 }
 
 void Room::init_ablage() {
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 6b63a8b511a..26806f0b1e5 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -39,7 +39,6 @@ extern const int16 SURIMY_TAF19_PHASEN[4][2];
 #define MAX_ROOM_HANDLE 4
 #define GED_LOAD 1
 
-#define R_TGPDATEI 0
 #define R_VOCDATEI 1
 #define R_GEPDATEI 2
 #define R_SPEZTAF 3
@@ -96,7 +95,7 @@ public:
 
 	void load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr);
 
-	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode);
+	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
 	void load_sound();
 
 	Stream *get_sound_handle();
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index e4945b3ea9c..f4ce4bf46cd 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2177,8 +2177,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 
-		room->open_handle("BACK/GBOOK.TGP", "rb", R_TGPDATEI);
-		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0);
+		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, "BACK/GBOOK.TGP");
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->back2screen(workpage);
@@ -2192,8 +2191,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			SHOULD_QUIT_RETURN;
 		}
 
-		room->open_handle(EPISODE1, "rb", R_TGPDATEI);
-		room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD);
+		room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 		_G(spieler).scrollx = scrollx;
 		_G(spieler).scrolly = scrolly;


Commit: 23f70c6c7fbfe37e14809e5fbbd33b4fa17355de
    https://github.com/scummvm/scummvm/commit/23f70c6c7fbfe37e14809e5fbbd33b4fa17355de
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY: Small modification in the logic of Room 46, review logic of rooms 47 to 49

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room49.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e2b0ce21d61..3519224f90e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -112,9 +112,8 @@ void alloc_buffers() {
 }
 
 void free_buffers() {
-	int16 i;
 	det->del_dptr();
-	for (i = 0; i < MAX_PERSON; i++)
+	for (int16 i = 0; i < MAX_PERSON; i++)
 		free((char *)PersonTaf[i]);
 	free((char *)spz_tinfo);
 	free(font6x8);
@@ -323,9 +322,8 @@ void menu_exit() {
 }
 
 int16 main_loop(int16 mode) {
-	int16 ende;
 	int16 ret;
-	ende = false;
+	int16 ende = false;
 
 	maus_action();
 	if (flags.MainInput) {
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index a38cdd858a6..7b59fc7a69d 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -132,11 +132,14 @@ void Room46::bodo() {
 	flic_cut(FCUT_065, CFO_MODE);
 	out->setze_zeiger(nullptr);
 	out->cls();
+	test_intro(16);
+	
 	_G(spieler).PersonHide[P_CHEWY] = false;
-
 	det->hide_static_spr(0);
 	det->hide_static_spr(3);
 	load_chewy_taf(CHEWY_ROCKER);
+	_G(spieler).R28ChewyPump = false;
+	
 	set_person_pos(213, 118, P_CHEWY, P_RIGHT);
 	start_aad_wait(243, -1);
 	invent_2_slot(UHR_INV);
@@ -149,13 +152,22 @@ void Room46::kloppe() {
 	for (int16 i = 0; i < 4; i++) {
 		mem->file->select_pool_item(Ci.Handle, FCUT_065);
 
-		flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+		flc->custom_play(&Ci);
+		
 		out->setze_zeiger(nullptr);
 		out->cls();
 		start_aad(244 + i, -1);
 		int16 delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
 
+		if (flags.InitSound && _G(spieler).SpeechSwitch) {
+			while (ailsnd->isSpeechActive()) {
+				ailsnd->serveDbSamples();
+				SHOULD_QUIT_RETURN;
+			}
+			continue;
+		}
+		
 		while (in->get_switch_code() == 0 && delay) {
 			out->skip_frame(1);
 			--delay;
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index e4c1f8b2392..e3e88b4983c 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -84,18 +84,16 @@ int16 Room47::use_knopf(int16 txt_nr) {
 }
 
 void Room47::set_detail() {
-	int16 i;
-
-	for (i = 0; i < 10; i++)
+	for (int16 i = 0; i < 10; i++)
 		det->hide_static_spr(i);
 
-	for (i = 0; i < 3; i++) {
+	for (int16 i = 0; i < 3; i++) {
 		det->show_static_spr(_G(spieler).R47Schloss[i]);
-		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i * 1, false, true);
+		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i, false, true);
 		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
 	}
 
-	for (i = 0; i < 10; i++)
+	for (int16 i = 0; i < 10; i++)
 		det->hide_static_spr(i);
 }
 
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 696c4730078..7e09327e641 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -106,8 +106,8 @@ void Room49::calc_boy_ani() {
 		det->del_static_ani(1);
 	}
 
-	det->set_static_ani(_G(spieler).R49BoyAni, -1);
-	det->start_detail(_G(spieler).R49BoyAni, 1, ANI_VOR);
+	det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
+	det->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_VOR);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 }
 
@@ -119,12 +119,13 @@ void Room49::calc_boy() {
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
 		person_end_phase[P_CHEWY] = P_LEFT;
-		det->stop_detail(_G(spieler).R49BoyAni);
-		det->del_static_ani(_G(spieler).R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+		det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 		det->set_static_ani(2, -1);
 
 		SetUpScreenFunc = nullptr;
 		start_aad_wait(262, -1);
+		SetUpScreenFunc = nullptr;
 		auto_move(3, P_CHEWY);
 		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
@@ -139,7 +140,7 @@ void Room49::calc_boy() {
 		start_detail_wait(4, 1, ANI_GO);
 
 		SetUpScreenFunc = setup_func;
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		room->set_timer_status(255, TIMER_START);
 		show_cur();
 	}
@@ -182,7 +183,7 @@ void Room49::use_boy_cigar() {
 	auto_scroll(164, 0);
 	flic_cut(67, CFO_MODE);
 	test_intro(17);
-
+	
 	room->set_timer_status(255, TIMER_STOP);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
 	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
@@ -205,7 +206,7 @@ void Room49::use_boy_cigar() {
 void Room49::talk_boy() {
 	if (!_G(spieler).R49BoyWeg) {
 		auto_move(3, P_CHEWY);
-		talk_boy(266 + _G(spieler).R49WegFrei);
+		talk_boy(266 + (_G(spieler).R49WegFrei ? 1 : 0));
 	}
 }
 
@@ -213,16 +214,16 @@ void Room49::talk_boy(int16 aad_nr) {
 	if (!_G(spieler).R49BoyWeg) {
 		room->set_timer_status(255, TIMER_STOP);
 		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->stop_detail(_G(spieler).R49BoyAni);
+		det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		det->set_static_ani(2, -1);
 		SetUpScreenFunc = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(aad_nr, -1);
 		SetUpScreenFunc = setup_func;
 		det->del_static_ani(2);
-		det->set_static_ani(_G(spieler).R49BoyAni, -1);
+		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		room->set_timer_status(255, TIMER_START);
 	}
 }


Commit: 75f3dde121fa83124580647a363878d039333c69
    https://github.com/scummvm/scummvm/commit/75f3dde121fa83124580647a363878d039333c69
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY:Fix logic of Room 45

Changed paths:
    engines/chewy/rooms/room45.cpp


diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index ed86a175bc4..1d384178505 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -100,7 +100,7 @@ void Room45::setup_func() {
 		if (!_G(r45_delay)) {
 			_G(r45_delay) = _G(spieler).DelaySpeed / 2;
 
-			for (int16 i = 0; i < MAX_PERSON; i++) {
+			for (int16 i = 0; i < R45_MAX_PERSON; i++) {
 				if (_G(r45_pinfo)[i][0] == 1) {
 					y = Adi[3 + i].y;
 					x = Adi[3 + i].x;
@@ -146,15 +146,14 @@ void Room45::setup_func() {
 
 			if (ch_x < 95) {
 				x = 18;
-				y = 130;
 			} else if (ch_x > 240) {
 				x = 304;
-				y = 130;
 			} else {
 				x = 176;
-				y = 130;
 			}
 
+			y = 130;
+
 			if (HowardMov && flags.ExitMov) {
 				x = 56;
 				y = 122;
@@ -213,6 +212,8 @@ void Room45::taxi_mov() {
 	room->set_timer_status(12, TIMER_STOP);
 	det->del_static_ani(12);
 	det->enable_sound(15, 1);
+	det->play_sound(15, 1);
+	
 	det->show_static_spr(11);
 	auto_move(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;


Commit: b817313f486caf2e57c007562fc5711118b4ab1c
    https://github.com/scummvm/scummvm/commit/b817313f486caf2e57c007562fc5711118b4ab1c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:00-08:00

Commit Message:
CHEWY: Review logic of rooms 43 and 44, add a missing (useless?) call of test_intro

Changed paths:
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp


diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 092c532ddca..2ff6cd0d7f1 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room43.h"
 
@@ -30,8 +29,6 @@ namespace Chewy {
 namespace Rooms {
 
 void Room43::night_small() {
-	int16 i;
-
 	hide_person();
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
@@ -49,7 +46,7 @@ void Room43::night_small() {
 	_G(spieler).ScrollxStep = 16;
 	auto_scroll(192, 0);
 
-	for (i = 0; i < 3; i++) {
+	for (int16 i = 0; i < 3; i++) {
 		if (i)
 			_G(spieler).ScrollxStep = 16 / i;
 		auto_scroll(128 + i * 16, 0);
@@ -85,6 +82,8 @@ void Room43::catch_pg() {
 	flic_cut(FCUT_058, CFO_MODE);
 
 	det->disable_sound(0, 0);
+	test_intro(14);
+	
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index ffe688f1b5b..bbac8543e12 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room44.h"
 
@@ -30,18 +29,15 @@ namespace Chewy {
 namespace Rooms {
 
 void Room44::look_news() {
-	int16 tmpsx, tmpsy;
-	int16 tmproom;
-
-	tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
-	tmpsx = _G(spieler).scrollx;
-	tmpsy = _G(spieler).scrolly;
+	int16 tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
+	int16 tmpsx = _G(spieler).scrollx;
+	int16 tmpsy = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	hide_person();
 	fx_blend = BLEND1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	room->load_room(&room_blk, 44, &_G(spieler));
 
 	start_aad_wait(172, -1);
 	_G(spieler).scrollx = tmpsx;


Commit: 057b99f930733cc012de9f3e4c5a258a75c2ccb8
    https://github.com/scummvm/scummvm/commit/057b99f930733cc012de9f3e4c5a258a75c2ccb8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Fix logic in room 42

Changed paths:
    engines/chewy/rooms/room42.cpp


diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index b8cf9c564f2..fb81a2161f0 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -52,12 +52,10 @@ void Room42::entry() {
 			atds->set_ats_str(264, 1, ATS_DATEI);
 		}
 
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-				!_G(spieler).R42BriefOk)
+		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && !_G(spieler).R42BriefOk)
 			start_aad_wait(302, -1);
 
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-				_G(spieler).R42BriefOk)
+		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk)
 			start_aad_wait(301, -1);
 	}
 }
@@ -94,13 +92,14 @@ void Room42::get_kuerbis(int16 aad_nr) {
 int16 Room42::use_psack() {
 	int16 action_flag = false;
 
+	if (menu_item == CUR_HOWARD)
+		return action_flag;
+
+	hide_cur();
 	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
 		action_flag = true;
 		get_kuerbis(136);
-
-	} else if (_G(spieler).R42HoToBeamter &&
-			!_G(spieler).inv_cur &&
-			!_G(spieler).R42MarkeOk) {
+	} else if (_G(spieler).R42HoToBeamter && !_G(spieler).inv_cur && !_G(spieler).R42MarkeOk) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -116,7 +115,6 @@ int16 Room42::use_psack() {
 		auto_move(4, P_CHEWY);
 		start_aad_wait(185, -1);
 		_G(spieler).R42HoToBeamter = false;
-
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		auto_move(3, P_CHEWY);
@@ -137,6 +135,7 @@ int16 Room42::use_psack() {
 		start_aad_wait(182, -1);
 	}
 
+	show_cur();
 	return action_flag;
 }
 
@@ -194,7 +193,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 		case 2:
 			det->play_sound(4, 0);
-			start_detail_wait(4, 4, ANI_VOR);
+			start_detail_wait(4, 13, ANI_VOR);
 			break;
 
 		case 3:


Commit: bdca03f332f6eb435dc183a4cae01c1c81282129
    https://github.com/scummvm/scummvm/commit/bdca03f332f6eb435dc183a4cae01c1c81282129
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Review of the logic of Room 41, small fix

Changed paths:
    engines/chewy/rooms/room41.cpp


diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 1855dc151bc..ebffd5944d4 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room41.h"
 
@@ -106,8 +105,7 @@ void Room41::talk_hoggy1() {
 			_G(spieler).R41BruchInfo = true;
 			start_aad_wait(132, -1);
 			start_aad_wait(128, -1);
-		} else if (_G(spieler).R31SurFurz &&
-			!_G(spieler).R41KuerbisInfo) {
+		} else if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
@@ -130,8 +128,7 @@ void Room41::talk_hoggy2() {
 		first_talk();
 
 	} else if (_G(spieler).R41BruchInfo) {
-		if (_G(spieler).R31SurFurz &&
-			!_G(spieler).R41KuerbisInfo) {
+		if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
 			auto_move(5, P_CHEWY);
@@ -155,10 +152,9 @@ void Room41::first_talk() {
 }
 
 void Room41::start_hoggy() {
-	int16 i;
 	show_cur();
 
-	for (i = 0; i < 2; i++) {
+	for (int16 i = 0; i < 2; i++) {
 		room->set_timer_status(i, TIMER_START);
 		det->set_static_ani(i, -1);
 		det->del_static_ani(i + 3);
@@ -166,10 +162,9 @@ void Room41::start_hoggy() {
 }
 
 void Room41::stop_hoggy() {
-	int16 i;
 	hide_cur();
 
-	for (i = 0; i < 2; i++) {
+	for (int16 i = 0; i < 2; i++) {
 		room->set_timer_status(i, TIMER_STOP);
 		det->del_static_ani(i);
 		det->stop_detail(i);
@@ -194,22 +189,20 @@ int16 Room41::use_kasse() {
 int16 Room41::use_lola() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
-			hide_cur();
-			action_flag = true;
-			_G(spieler).R41LolaOk = true;
-			auto_move(4, P_CHEWY);
-			det->disable_sound(6, 0);
-			flic_cut(FCUT_057, CFO_MODE);
-			set_person_pos(127, 112, P_CHEWY, P_LEFT);
-			det->stop_detail(6);
-
-			atds->del_steuer_bit(267, 1, 1);
-			atds->set_ats_str(267, 1, ATS_DATEI);
-			atds->hide_item(11, 0, 3);
-			show_cur();
-		}
+	if (!_G(spieler).inv_cur && !_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
+		hide_cur();
+		action_flag = true;
+		_G(spieler).R41LolaOk = true;
+		auto_move(4, P_CHEWY);
+		det->disable_sound(6, 0);
+		flic_cut(FCUT_057, CFO_MODE);
+		set_person_pos(127, 112, P_CHEWY, P_LEFT);
+		det->stop_detail(6);
+
+		atds->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATEI);
+		atds->set_ats_str(267, 1, ATS_DATEI);
+		atds->hide_item(11, 0, 3);
+		show_cur();
 	}
 
 	return action_flag;
@@ -217,6 +210,7 @@ int16 Room41::use_lola() {
 
 int16 Room41::use_brief() {
 	int16 action_flag = false;
+	hide_cur();
 
 	if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;


Commit: f62de89d9382349ecc8ccdbc5c6de36228b87f49
    https://github.com/scummvm/scummvm/commit/f62de89d9382349ecc8ccdbc5c6de36228b87f49
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Fix switch in calc_person_dia method

Changed paths:
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index f4ce4bf46cd..87985045f93 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2560,185 +2560,190 @@ void calc_person_dia(int16 p_nr) {
 	switch (p_nr) {
 	case P_HOWARD:
 	case P_NICHELLE:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY] - 28) {
-		case 0:
-			_G(spieler).PersonDia[p_nr] = (p_nr == P_HOWARD) ? 545 : 547;
-			break;
-
-		case 18:
-			if (p_nr == P_HOWARD)
-				_G(spieler).PersonDia[p_nr] = 542;
-			break;
-
+		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 		case 28:
-			if (p_nr == P_HOWARD)
-				_G(spieler).PersonDia[p_nr] = 543;
-			break;
-
-		case 38:
-			if (p_nr == P_HOWARD)
-				_G(spieler).PersonDia[p_nr] = 540;
-			break;
-
-		case 39:
-			_G(spieler).PersonDia[p_nr] = 501;
-			break;
-
-		case 40:
-			_G(spieler).PersonDia[p_nr] = 500;
-			break;
-
-		case 41:
-			_G(spieler).PersonDia[p_nr] = 492;
-			break;
-
-		case 42:
-			if (_G(spieler).flags32_10) {
-				_G(spieler).PersonDia[p_nr] = 465;
-				if (_G(spieler).flags30_80 && !_G(spieler).flags31_1)
-					_G(spieler).PersonDia[p_nr] = 466;
-			}
-			break;
-
-		case 43:
 			if (p_nr == P_HOWARD) {
-				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
-				_G(spieler).PersonDia[P_HOWARD] = 470;
-			} else {
-				_G(spieler).PersonDia[P_NICHELLE] = 536;
+				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
+					_G(spieler).PersonDia[p_nr] = 565;
+				else
+					flag = true;
 			}
 			break;
 
-		case 45:
-			_G(spieler).PersonDia[p_nr] = _G(spieler).flags32_2 ? 469 : 467;
-			break;
-
 		case 46:
-			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 535;
+			if (_G(spieler).flags32_10)
+				_G(spieler).PersonDia[p_nr] = 497;
 			else
 				flag = true;
 			break;
 
-		case 47:
-			if (!_G(spieler).flags32_10)
-				_G(spieler).PersonDia[P_NICHELLE] = 536;
-			else if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[P_NICHELLE] = 534;
+		case 58:
+			if (_G(spieler).flags32_10)
+				_G(spieler).PersonDia[p_nr] = 507;
 			else
 				flag = true;
 			break;
 
-		case 51:
-			if (p_nr != P_NICHELLE)
-				flag = true;
-			else if (_G(spieler).flags30_10)
-				_G(spieler).PersonDia[p_nr] = 533;
-			else
-				Room82::proc8();
-			break;
-
-		case 53:
-			if (!_G(spieler).flags30_2)
-				_G(spieler).PersonDia[p_nr] = 457;
+		case 66:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 525;
 			else
 				flag = true;
 			break;
 
-		case 54:
+		case 67:
 			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 532;
+				_G(spieler).PersonDia[p_nr] = 526;
 			else
 				flag = true;
 			break;
 
-		case 56:
+		case 68:
 			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 531;
+				_G(spieler).PersonDia[p_nr] = 527;
 			else
 				flag = true;
 			break;
 
-		case 57:
-			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 530;
-			else
-				flag = true;
+		case 69:
+			_G(spieler).PersonDia[p_nr] = 381;
 			break;
 
-		case 58:
-			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 529;
-			else
+		case 70:
+			if (p_nr == P_NICHELLE) {
+				_G(spieler).PersonDia[p_nr] = 528;
+			} else {
 				flag = true;
+			}
 			break;
 
-		case 59:
+		case 71:
 			if (p_nr == P_NICHELLE) {
 				if (!_G(spieler).flags28_4) {
 					Room71::proc7();
 					_G(spieler).PersonDia[p_nr] = -1;
 				}
 			} else if (!_G(spieler).flags28_4) {
-				_G(spieler).PersonDia[p_nr] = 528;
+				_G(spieler).PersonDia[p_nr] = 435;
 			} else {
 				flag = true;
 			}
 			break;
 
-		case 60:
+		case 73:
 			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 528;
+				_G(spieler).PersonDia[p_nr] = 529;
 			else
 				flag = true;
 			break;
 
-		case 61:
-			_G(spieler).PersonDia[p_nr] = 381;
+		case 74:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 530;
+			else
+				flag = true;
 			break;
 
-		case 62:
+		case 75:
 			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 527;
+				_G(spieler).PersonDia[p_nr] = 531;
 			else
 				flag = true;
 			break;
 
-		case 63:
+		case 79:
 			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 526;
+				_G(spieler).PersonDia[p_nr] = 532;
 			else
 				flag = true;
 			break;
 
-		case 66:
-			if (p_nr == P_NICHELLE)
-				_G(spieler).PersonDia[p_nr] = 525;
+		case 81:
+			if (!_G(spieler).flags30_2)
+				_G(spieler).PersonDia[p_nr] = 457;
 			else
 				flag = true;
 			break;
 
-		case 67:
-			if (_G(spieler).flags32_10)
-				_G(spieler).PersonDia[p_nr] = 507;
+		case 82:
+			if (p_nr != P_NICHELLE)
+				flag = true;
+			else if (_G(spieler).flags30_10)
+				_G(spieler).PersonDia[p_nr] = 533;
+			else
+				Room82::proc8();
+			break;
+
+		case 84:
+			if (!_G(spieler).flags32_10)
+				_G(spieler).PersonDia[P_NICHELLE] = 479;
+			else if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[P_NICHELLE] = 534;
 			else
 				flag = true;
 			break;
 
-		case 68:
-			if (_G(spieler).flags32_10)
-				_G(spieler).PersonDia[p_nr] = 497;
+		case 85:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 535;
 			else
 				flag = true;
 			break;
 
-		case 69:
+		case 86:
+			_G(spieler).PersonDia[p_nr] = _G(spieler).flags32_2 ? 469 : 467;
+			break;
+
+		case 87:
 			if (p_nr == P_HOWARD) {
-				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
-					_G(spieler).PersonDia[p_nr] = 565;
-				else
-					flag = true;
-			}			
+				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
+				_G(spieler).PersonDia[P_HOWARD] = 470;
+			} else {
+				_G(spieler).PersonDia[P_NICHELLE] = 536;
+			}
+			break;
+
+
+		case 88:
+			if (_G(spieler).flags32_10) {
+				_G(spieler).PersonDia[p_nr] = 465;
+				if (_G(spieler).flags30_80 && !_G(spieler).flags31_1)
+					_G(spieler).PersonDia[p_nr] = 466;
+			}
+			break;
+
+		case 89:
+			_G(spieler).PersonDia[p_nr] = 492;
+			break;
+
+		case 90:
+			_G(spieler).PersonDia[p_nr] = 500;
+			break;
+
+		case 91:
+			_G(spieler).PersonDia[p_nr] = 501;
+			break;
+
+		case 94:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 540;
+			break;
+
+		case 95:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 543;
+			break;
+
+		case 96:
+			if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 542;
+			break;
+
+		case 97:
+			if (p_nr == P_NICHELLE)
+				_G(spieler).PersonDia[p_nr] = 547;
+			else if (p_nr == P_HOWARD)
+				_G(spieler).PersonDia[p_nr] = 545;
 			break;
 
 		default:


Commit: ebd8c368574b299dee53489045a6a10d046a25de
    https://github.com/scummvm/scummvm/commit/ebd8c368574b299dee53489045a6a10d046a25de
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Fix Nichelle's initial position in room 82

Changed paths:
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 0cf32836e37..95d4d84d4ac 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -54,7 +54,7 @@ void Room82::entry() {
 	if (_G(spieler).flags30_1) {
 		set_person_pos(635, 144, P_CHEWY, P_LEFT);
 		set_person_pos(592, 115, P_HOWARD, P_RIGHT);
-		set_person_pos(543, 11, P_NICHELLE, P_RIGHT);
+		set_person_pos(543, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(spieler).scrollx = 479;
 	} else if (_G(spieler).flags31_8) {


Commit: f334ecb53b551f7ba66e3d6dbdc65f38d8f7496a
    https://github.com/scummvm/scummvm/commit/f334ecb53b551f7ba66e3d6dbdc65f38d8f7496a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Added constant for food certificate inventory item

Changed paths:
    engines/chewy/defines.h
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 5a9b2ffe537..5357825c40d 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -390,6 +390,7 @@ enum SetupScreenMode {
 #define KARTE_INV 98
 #define MACHETE_INV 99
 #define RUBBER_INV 100
+#define FOOD_CERTIFICATE_INV 101
 
 #define SIB_SCHLEIM 3
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 95d4d84d4ac..c02cdf672a2 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -142,7 +142,7 @@ void Room82::talk3() {
 }
 
 int Room82::proc3() {
-	if (!is_cur_inventar(101))
+	if (!is_cur_inventar(FOOD_CERTIFICATE_INV))
 		return 0;
 
 	hide_cur();


Commit: b3cff2990199d13c3ab41e58dea36b203320e50c
    https://github.com/scummvm/scummvm/commit/b3cff2990199d13c3ab41e58dea36b203320e50c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Fix display of 'Jim' hover text in room 82

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index b684cc0c283..eea782411b3 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -799,7 +799,6 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
 	char *tmp_str = *str_;
 	char *start_str = *str_;
-	tmp_str += AtsStrHeader::SIZE();
 	*anz = 0;
 	bool ende = false;
 	int16 count = 0;


Commit: 065ce40e1852bc9cecf0ce11eab34da2e01e0561
    https://github.com/scummvm/scummvm/commit/065ce40e1852bc9cecf0ce11eab34da2e01e0561
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:01-08:00

Commit Message:
CHEWY: Fix selecting hermit's hut in lost valley

Changed paths:
    engines/chewy/rooms/room80.cpp


diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 1018f018e36..19089fbeb4d 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -103,7 +103,7 @@ void Room80::setup_func() {
 			nextRoom = 84;
 		break;
 	case 2:
-		nextRoom = 82;
+		nextRoom = 81;
 		break;
 	default:
 		nextRoom = -1;


Commit: 4fcd88e252a25fd6daab16ca0ff20fbad2aee905
    https://github.com/scummvm/scummvm/commit/4fcd88e252a25fd6daab16ca0ff20fbad2aee905
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/menus.cpp


diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index dc7c6393786..6065c26cfa9 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -503,10 +503,11 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		xoff = (254 - xoff) / 2;
 		txt_zeilen = 2;
 		yoff = 10;
-	}
-	else if (mode == INV_USE_ATS_MODE) {
+
+	} else if (mode == INV_USE_ATS_MODE) {
 		txt_zeilen = 3;
 		yoff = 0;
+
 		if (ats_nr >= 15000) {
 			txt_adr = atds->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
 		} else {
@@ -515,12 +516,13 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		if (!txt_adr) {
 			ende = 1;
 		}
-	}
-	else
+	} else {
 		ende = 1;
+	}
 
 	while (!ende) {
 		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+
 		if (minfo.button) {
 			if (minfo.button == 2) {
 				if (!maus_flag)
@@ -553,12 +555,17 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 						ende = 1;
 						break;
 
+					default:
+						break;
 					}
 				}
 			}
+
 			maus_flag = 1;
-		} else
+		} else {
 			maus_flag = 0;
+		}
+
 		switch (kbinfo.scan_code) {
 		case F1_KEY:
 			in->hot_key = F1_KEY;
@@ -571,6 +578,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 		case ESC:
 			ende = 1;
 			break;
+
 		case CURSOR_UP:
 			if (txt_start > 0)
 				--txt_start;
@@ -581,7 +589,10 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 				++txt_start;
 			break;
 
+		default:
+			break;
 		}
+
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		plot_inventar_menu();
@@ -590,9 +601,11 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 		if (mode == INV_ATS_MODE)
 			out->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
-			              scr_width, txt_name_adr);
+				scr_width, txt_name_adr);
+
 		out->set_fontadr(font6x8);
 		out->set_vorschub(fvorx6x8, fvory6x8);
+
 		if (txt_anz > txt_zeilen) {
 			if (txt_start > 0) {
 				if (rect == 6)
@@ -602,6 +615,7 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
 				              scr_width, c);
 			}
+
 			if (txt_start < txt_anz - txt_zeilen) {
 				if (rect == 7)
 					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
@@ -610,14 +624,15 @@ int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
 				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
 			}
 		}
+
 		k = 0;
 		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
 			              scr_width, "%s", txt->str_pos(txt_adr, i));
 			++k;
 		}
-		cur->plot_cur();
 
+		cur->plot_cur();
 		out->back2screen(workpage);
 		SHOULD_QUIT_RETURN0;
 	}
@@ -691,6 +706,7 @@ int16 calc_use_invent(int16 inv_nr) {
 	int16 benutzt;
 	int16 ret;
 	benutzt = false;
+
 	if (menu_item == CUR_LOOK) {
 		switch (inv_nr) {
 		case ZEITUNG_INV:


Commit: 14e2d89b35f468054c0205ec194c450d15378fdf
    https://github.com/scummvm/scummvm/commit/14e2d89b35f468054c0205ec194c450d15378fdf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Partially working display of diary

Changed paths:
    engines/chewy/defines.h
    engines/chewy/menus.cpp
    engines/chewy/rooms/room81.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 5357825c40d..a2d612aa632 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -164,6 +164,7 @@ enum SetupScreenMode {
 #define GBOOK_TGP 1
 #define EPISODE1 "back/episode1.tgp\0"
 #define BUCH_START 2
+#define DIARY_START 3
 
 #define EPISODE1_GEP "back/episode1.gep\0"
 
@@ -391,6 +392,7 @@ enum SetupScreenMode {
 #define MACHETE_INV 99
 #define RUBBER_INV 100
 #define FOOD_CERTIFICATE_INV 101
+#define DIARY_INV 109
 
 #define SIB_SCHLEIM 3
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 6065c26cfa9..090491105cd 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -702,10 +702,43 @@ void look_invent_screen(int16 txt_mode, int16 txt_nr) {
 	}
 }
 
+static void showDiary() {
+	int16 scrollx = _G(spieler).scrollx,
+		scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+
+	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, "BACK/GBOOK.TGP");
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	out->back2screen(workpage);
+	room->set_ak_pal(&room_blk);
+	out->setze_zeiger(nullptr);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+
+	while (in->get_switch_code() != ESC) {
+		g_events->update();
+		SHOULD_QUIT_RETURN;
+	}
+	while (in->get_switch_code() != 0) {
+		g_events->update();
+		SHOULD_QUIT_RETURN;
+	}
+
+	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(spieler).scrollx = scrollx;
+	_G(spieler).scrolly = scrolly;
+	set_up_screen(NO_SETUP);
+	plot_inventar_menu();
+	out->setze_zeiger(nullptr);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+}
+
 int16 calc_use_invent(int16 inv_nr) {
-	int16 benutzt;
+	int16 ret_val;
 	int16 ret;
-	benutzt = false;
+	ret_val = false;
 
 	if (menu_item == CUR_LOOK) {
 		switch (inv_nr) {
@@ -715,17 +748,24 @@ int16 calc_use_invent(int16 inv_nr) {
 
 		case CUTMAG_INV:
 			show_invent_menu = 2;
-			benutzt = true;
+			ret_val = true;
 			Rooms::Room58::look_cut_mag(58);
 			break;
 
 		case SPARK_INV:
 			show_invent_menu = 2;
-			benutzt = true;
+			ret_val = true;
 			save_person_rnr();
 			Rooms::Room58::look_cut_mag(60);
 			break;
 
+		case DIARY_INV:
+			showDiary();
+			ret_val = true;
+			break;
+
+		default:
+			break;
 		}
 	} else if (menu_item == CUR_USE) {
 		switch (inv_nr) {
@@ -733,13 +773,15 @@ int16 calc_use_invent(int16 inv_nr) {
 			ret = del_invent_slot(GBUCH_INV);
 			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
 			obj->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
-			benutzt = true;
+			ret_val = true;
 			break;
 
+		default:
+			break;
 		}
 	}
 
-	return benutzt;
+	return ret_val;
 }
 
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 8c4012ec41e..c94810550c8 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -91,7 +91,7 @@ void Room81::proc1() {
 		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
 		auto_move(1, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = false;
-		invent_2_slot(109);
+		invent_2_slot(DIARY_INV);
 		_G(spieler).flags30_2 = true;
 		_G(spieler).flags31_4 = true;
 	}


Commit: b2885e52d849cf23c25f99ee74639c67f79235eb
    https://github.com/scummvm/scummvm/commit/b2885e52d849cf23c25f99ee74639c67f79235eb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Fix flag for having gotten diary

Changed paths:
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 19089fbeb4d..5834651bdee 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -38,7 +38,7 @@ void Room80::entry() {
 	det->play_sound(0, 1);
 	det->play_sound(0, 2);
 
-	if (_G(spieler).flags31_2) {
+	if (_G(spieler).gottenDiary) {
 		atds->del_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		atds->set_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
@@ -83,7 +83,7 @@ void Room80::setup_func() {
 		return;
 
 	if (vec != 0 && vec != 2) {
-		if (vec != 1 || !_G(spieler).flags31_2)
+		if (vec != 1 || !_G(spieler).gottenDiary)
 			return;
 	}
 
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index c94810550c8..2ea4d7d3fdb 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -92,8 +92,8 @@ void Room81::proc1() {
 		auto_move(1, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = false;
 		invent_2_slot(DIARY_INV);
-		_G(spieler).flags30_2 = true;
 		_G(spieler).flags31_4 = true;
+		_G(spieler).gottenDiary = true;
 	}
 	
 	if (diaNr != -1) {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7811d0db898..10f20e3755f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -304,7 +304,7 @@ struct SpielerFlags {
 	bool flags30_80 : 1;
 
 	bool flags31_1 : 1;
-	bool flags31_2 : 1;
+	bool gottenDiary : 1;
 	bool flags31_4 : 1;
 	bool flags31_8 : 1;
 	bool flags31_10 : 1;


Commit: 45f313cffcabd1ba3cd3457303094a6a96cbf7ff
    https://github.com/scummvm/scummvm/commit/45f313cffcabd1ba3cd3457303094a6a96cbf7ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Move room 84 global to a static local

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room84.h
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index bf3fb4cac80..9807cb06c0e 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -232,7 +232,7 @@ int16 ged_user_func(int16 idx_nr) {
 
 		case 84:
 			if (!_G(spieler).flags31_1)
-				_G(spieler).flags31_4 = true;
+				_G(spieler).R84GoonsPresent = true;
 			break;
 
 		case 86:
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 2ea4d7d3fdb..ac724672db4 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -92,7 +92,7 @@ void Room81::proc1() {
 		auto_move(1, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = false;
 		invent_2_slot(DIARY_INV);
-		_G(spieler).flags31_4 = true;
+		_G(spieler).R84GoonsPresent = true;
 		_G(spieler).gottenDiary = true;
 	}
 	
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 0c8d2372b56..6c3e5ed51dc 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -28,6 +28,8 @@
 namespace Chewy {
 namespace Rooms {
 
+bool Room84::_flag;
+
 void Room84::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(zoom_horizont) = 110;
@@ -35,8 +37,8 @@ void Room84::entry() {
 	_G(zoom_mov_fak) = 3;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
-	_G(spieler).flags31_4 = false;
-	_G(spieler).r84_bool18DB1C = false;
+	_G(spieler).R84GoonsPresent = false;
+	_flag = false;
 	det->enable_sound(0, 0);
 	det->play_sound(0, 0);
 
@@ -128,8 +130,9 @@ void Room84::xit(int16 eib_nr) {
 
 void Room84::setup_func() {
 	calc_person_look();
-	if (_G(spieler).flags31_4 && !_G(spieler).r84_bool18DB1C) {
-		_G(spieler).r84_bool18DB1C = true;
+
+	if (_G(spieler).R84GoonsPresent && !_flag) {
+		_flag = true;
 		_G(spieler).flags30_80 = true;
 		hide_cur();
 		auto_move(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room84.h b/engines/chewy/rooms/room84.h
index 4a7e001b2ab..3c7f1a6f1bc 100644
--- a/engines/chewy/rooms/room84.h
+++ b/engines/chewy/rooms/room84.h
@@ -26,6 +26,9 @@ namespace Chewy {
 namespace Rooms {
 
 class Room84 {
+private:
+	static bool _flag;
+
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 10f20e3755f..b5bd44ae84e 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -305,7 +305,7 @@ struct SpielerFlags {
 
 	bool flags31_1 : 1;
 	bool gottenDiary : 1;
-	bool flags31_4 : 1;
+	bool R84GoonsPresent : 1;
 	bool flags31_8 : 1;
 	bool flags31_10 : 1;
 	byte flags31_unused : 3;
@@ -494,8 +494,6 @@ struct Spieler : public SpielerFlags {
 	// ---- //
 	int16 R79Val[3] = {0, 0, 0};
 	// ---- //
-	int16 r84_bool18DB1C = false;
-	// ---- //
 	int16 R88Val1 = 0;
 	// ---- //
 	int r90_word18DB28 = 0;


Commit: 3ae7d64011e25b0cc632b674981ae9492a1d6484
    https://github.com/scummvm/scummvm/commit/3ae7d64011e25b0cc632b674981ae9492a1d6484
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Renaming SPieler field to r88DestRoom

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/t_event.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 9807cb06c0e..02af1ee6950 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -231,7 +231,7 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 84:
-			if (!_G(spieler).flags31_1)
+			if (!_G(spieler).R88UsedMonkey)
 				_G(spieler).R84GoonsPresent = true;
 			break;
 
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index b7796329508..17ddcfbc3ce 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -158,7 +158,7 @@ void Room56::entry() {
 	case 1:
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
-		_G(spieler).R88Val1 = 82;
+		_G(spieler).r88DestRoom = 82;
 		out->setze_zeiger(nullptr);
 		out->cls();
 		flags.NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 5834651bdee..52450a5d3aa 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -60,7 +60,7 @@ void Room80::entry() {
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 40;
 	_G(zoom_horizont) = 0;
 
-	if (_G(spieler).R88Val1 == 84)
+	if (_G(spieler).r88DestRoom == 84)
 		det->show_static_spr(3);
 	else
 		det->show_static_spr(4);
@@ -97,7 +97,7 @@ void Room80::setup_func() {
 		nextRoom = 82;
 		break;
 	case 1:
-		if (_G(spieler).flags31_1)
+		if (_G(spieler).R88UsedMonkey)
 			nextRoom = 85;
 		else
 			nextRoom = 84;
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index ac724672db4..543224821ae 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -36,7 +36,7 @@ void Room81::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).DiaAMov = 0;
-	if (_G(spieler).R88Val1 == 84) {
+	if (_G(spieler).r88DestRoom == 84) {
 		det->show_static_spr(0);
 		atds->del_steuer_bit(488, ATS_AKTIV_BIT, ATS_DATEI);
 	}
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index c02cdf672a2..0bfa3ebdb1a 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -37,7 +37,7 @@ void Room82::entry() {
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 
-	if (_G(spieler).flags31_1) {
+	if (_G(spieler).R88UsedMonkey) {
 		det->show_static_spr(6);
 		atds->set_steuer_bit(473, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->set_steuer_bit(467, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 6c3e5ed51dc..a8f64b699b3 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -42,7 +42,7 @@ void Room84::entry() {
 	det->enable_sound(0, 0);
 	det->play_sound(0, 0);
 
-	if (_G(spieler).flags31_1) {
+	if (_G(spieler).R88UsedMonkey) {
 		det->del_static_ani(3);
 		det->stop_detail(0);
 		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
@@ -58,7 +58,7 @@ void Room84::entry() {
 		atds->set_ats_str(485, 2, ATS_DATEI);
 	}
 
-	if (_G(spieler).R88Val1 == 84) {
+	if (_G(spieler).r88DestRoom == 84) {
 		det->show_static_spr(7);
 		atds->del_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
 		atds->del_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
@@ -77,10 +77,11 @@ void Room84::entry() {
 		set_person_pos(569, 135, P_CHEWY, P_LEFT);
 		set_person_pos(489, 113, P_HOWARD, P_RIGHT);
 		set_person_pos(523, 110, P_NICHELLE, P_RIGHT);
-		_G(spieler).flags30_8 = false;
-		_G(spieler).flags31_1 = false;
+		_G(spieler).flags30_1 = false;
+		_G(spieler).flags31_8 = false;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 319;
+
 		if (_G(spieler).flags32_10) {
 			set_person_pos(347, 130, P_CHEWY, P_RIGHT);
 			set_person_pos(408, 113, P_HOWARD, P_LEFT);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 33362460498..9a65956abff 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -35,8 +35,8 @@ void Room88::entry() {
 	set_person_pos(91, 110, P_NICHELLE, P_RIGHT);
 	
 	det->show_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
-	if (_G(spieler).R88Val1 == 0)
-		_G(spieler).R88Val1 = 82;
+	if (_G(spieler).r88DestRoom == 0)
+		_G(spieler).r88DestRoom = 82;
 
 	SetUpScreenFunc = calc_person_look;
 
@@ -48,7 +48,7 @@ void Room88::entry() {
 
 void Room88::xit() {
 	_G(spieler).flags31_8 = true;
-	_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).R88Val1;
+	_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).r88DestRoom;
 
 	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 88)
 		_G(spieler).PersonRoomNr[P_NICHELLE] = _G(spieler).PersonRoomNr[P_HOWARD];
@@ -60,7 +60,7 @@ int Room88::proc1() {
 
 	hide_cur();
 	auto_move(0, P_CHEWY);
-	switch_room(_G(spieler).R88Val1);
+	switch_room(_G(spieler).r88DestRoom);
 	menu_item = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	show_cur();
@@ -94,7 +94,7 @@ int Room88::proc3() {
 	hide_cur();
 	auto_move(2, P_CHEWY);
 
-	if (!_G(spieler).flags30_80 || _G(spieler).flags31_1) {
+	if (!_G(spieler).flags30_80 || _G(spieler).R88UsedMonkey) {
 		hide_cur();
 		if (_G(spieler).flags32_10) {
 			start_aad_wait(480, -1);
@@ -140,8 +140,8 @@ int Room88::proc3() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 88;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 		switch_room(88);
-		_G(spieler).R88Val1 = 84;
-		_G(spieler).flags31_1 = true;
+		_G(spieler).r88DestRoom = 84;
+		_G(spieler).R88UsedMonkey = true;
 		_G(spieler).flags32_1 = false;
 	}
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 87985045f93..07cfe3cf245 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2707,7 +2707,7 @@ void calc_person_dia(int16 p_nr) {
 		case 88:
 			if (_G(spieler).flags32_10) {
 				_G(spieler).PersonDia[p_nr] = 465;
-				if (_G(spieler).flags30_80 && !_G(spieler).flags31_1)
+				if (_G(spieler).flags30_80 && !_G(spieler).R88UsedMonkey)
 					_G(spieler).PersonDia[p_nr] = 466;
 			}
 			break;
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index b5bd44ae84e..7958d304d89 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -303,12 +303,14 @@ struct SpielerFlags {
 	bool flags30_40 : 1;
 	bool flags30_80 : 1;
 
-	bool flags31_1 : 1;
+	bool R88UsedMonkey : 1;
 	bool gottenDiary : 1;
 	bool R84GoonsPresent : 1;
 	bool flags31_8 : 1;
 	bool flags31_10 : 1;
-	byte flags31_unused : 3;
+	byte flags31_20 : 1;
+	byte flags31_40 : 1;
+	byte flags31_80 : 1;
 
 	// Further flags
 	bool flags32_1 : 1;
@@ -494,7 +496,7 @@ struct Spieler : public SpielerFlags {
 	// ---- //
 	int16 R79Val[3] = {0, 0, 0};
 	// ---- //
-	int16 R88Val1 = 0;
+	int16 r88DestRoom = 0;
 	// ---- //
 	int r90_word18DB28 = 0;
 	int r90_Array187030[8][4] = {


Commit: 4aeda52e0c4586a5eb10b286a843a3fbed3c94db
    https://github.com/scummvm/scummvm/commit/4aeda52e0c4586a5eb10b286a843a3fbed3c94db
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:02-08:00

Commit Message:
CHEWY: Fix entering crashed glider

Changed paths:
    engines/chewy/rooms/room85.cpp


diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 11ac54e69a6..822fafd5842 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -162,7 +162,7 @@ int Room85::proc2() {
 	remove_inventory(109);
 	remove_inventory(98);
 	remove_inventory(87);
-	remove_inventory(89);
+	switch_room(89);
 	
 	show_cur();
 	return 1;


Commit: 13b3860aea16d4b2cf98ddc6d17e3136311ea1ec
    https://github.com/scummvm/scummvm/commit/13b3860aea16d4b2cf98ddc6d17e3136311ea1ec
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Rework logic in Room 40

Changed paths:
    engines/chewy/rooms/room40.cpp


diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 14a08c1147e..85b58af2c08 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -97,6 +97,7 @@ void Room40::xit(int16 eib_nr) {
 	hide_cur();
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).R40PoliceAb = false;
+	_G(spieler).R40HoUse = false;
 	stop_spz();
 	SetUpScreenFunc = nullptr;
 
@@ -105,9 +106,8 @@ void Room40::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 
 		} else if (eib_nr == 72) {
-			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) &&
-				_G(spieler).R42BriefOk && _G(spieler).R28Manuskript) ||
-				(_G(spieler).R40TrainOk)) {
+			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
+				|| _G(spieler).R40TrainOk) {
 				_G(spieler).R40TrainOk = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
 				_G(spieler).room_e_obj[72].Exit = 45;
@@ -123,6 +123,8 @@ void Room40::xit(int16 eib_nr) {
 				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
 				move_train(1);
+				test_intro(15);
+				
 				flags.NoPalAfterFlc = true;
 				flic_cut(FCUT_073, CFO_MODE);
 
@@ -138,7 +140,7 @@ void Room40::xit(int16 eib_nr) {
 				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
 			}
 		} else {
-			_G(spieler).PersonRoomNr[1] = 41;
+			_G(spieler).PersonRoomNr[P_HOWARD] = 41;
 		}
 	}
 
@@ -166,7 +168,7 @@ void Room40::move_train(int16 mode) {
 		start_aad_wait(206, -1);
 
 	int16 lx = -40;
-	int16 ax = lx - 190;
+	int16 ax = -230;
 
 	det->start_detail(7, 20, ANI_VOR);
 	det->show_static_spr(11);
@@ -175,6 +177,7 @@ void Room40::move_train(int16 mode) {
 		det->show_static_spr(12);
 
 	det->enable_sound(7, 0);
+	det->play_sound(7, 0);
 	int16 delay = 0;
 
 	while (ax < 560) {
@@ -225,7 +228,7 @@ void Room40::setup_func() {
 			x = 428;
 			y = 90;
 		} else if (sp_x < 170) {
-			x = 165;
+			x = 166;
 			y = 99;
 		} else {
 			x = spieler_vector[P_HOWARD].Xypos[0];
@@ -262,6 +265,16 @@ void Room40::setup_func() {
 			}
 			break;
 
+		case POLICE_RIGHT:
+			if (det->get_ani_status(POLICE_RIGHT) == false) {
+				det->show_static_spr(15);
+				_G(spieler).R40PoliceAniStatus = 255;
+				room->set_timer_status(255, TIMER_START);
+				uhr->reset_timer(_G(timer_nr)[0], 0);
+				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+			}
+			break;
+
 		case POLICE_FLASCHE:
 			if (det->get_ani_status(POLICE_FLASCHE) == false) {
 				det->hide_static_spr(0);
@@ -291,16 +304,6 @@ void Room40::setup_func() {
 			}
 			break;
 
-		case POLICE_RIGHT:
-			if (det->get_ani_status(POLICE_RIGHT) == false) {
-				det->show_static_spr(15);
-				_G(spieler).R40PoliceAniStatus = 255;
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], 0);
-				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
-			}
-			break;
-
 		default:
 			break;
 		}
@@ -331,7 +334,6 @@ int16 Room40::use_mr_pumpkin() {
 				action_ret = true;
 
 				if (_G(spieler).R39TvRecord == 6) {
-					action_ret = true;
 					if (_G(spieler).R40PoliceWeg == false)
 						use_schalter(227);
 					else {
@@ -366,55 +368,51 @@ int16 Room40::use_mr_pumpkin() {
 int16 Room40::use_schalter(int16 aad_nr) {
 	int16 action_flag = false;
 
-	if (menu_item != CUR_HOWARD) {
-		if (!_G(spieler).inv_cur) {
-			if (_G(spieler).R40PoliceWeg == false) {
-				action_flag = true;
-
-				hide_cur();
-				auto_move(8, P_CHEWY);
-
-				if (_G(spieler).R40PoliceAniStatus != 255) {
-					start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
-					start_aad_wait(204, -1);
-
-					while (_G(spieler).R40PoliceAniStatus != 255) {
-						set_up_screen(DO_SETUP);
-						SHOULD_QUIT_RETURN0;
-					}
-				}
+	if (menu_item != CUR_HOWARD &&_G(spieler).R40PoliceWeg == false) {
+		action_flag = true;
 
-				room->set_timer_status(255, TIMER_STOP);
-				_G(spieler).R40PoliceStart = false;
-				stop_spz();
-				start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
+		hide_cur();
+		auto_move(8, P_CHEWY);
 
-				if (_G(spieler).R40PoliceAb) {
-					_G(spieler).R40PoliceAb = false;
-					stop_spz();
-					go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
-					_G(spieler).R40HoUse = false;
-				}
+		if (_G(spieler).R40PoliceAniStatus != 255) {
+			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+			start_aad_wait(204, -1);
 
-				det->hide_static_spr(15);
-				start_detail_wait(12, 1, ANI_VOR);
-				det->set_static_ani(14, -1);
-				start_aad_wait(aad_nr, -1);
-				det->del_static_ani(14);
-				start_detail_wait(13, 1, ANI_VOR);
-				det->show_static_spr(15);
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], 0);
-				show_cur();
+			while (_G(spieler).R40PoliceAniStatus != 255) {
+				set_up_screen(DO_SETUP);
+				SHOULD_QUIT_RETURN0;
 			}
 		}
+
+		room->set_timer_status(255, TIMER_STOP);
+		_G(spieler).R40PoliceStart = false;
+		stop_spz();
+		start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
+
+		if (_G(spieler).R40PoliceAb) {
+			_G(spieler).R40PoliceAb = false;
+			stop_spz();
+			go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
+			_G(spieler).R40HoUse = false;
+		}
+
+		det->hide_static_spr(15);
+		start_detail_wait(12, 1, ANI_VOR);
+		det->set_static_ani(14, -1);
+		start_aad_wait(aad_nr, -1);
+		det->del_static_ani(14);
+		start_detail_wait(13, 1, ANI_VOR);
+		det->show_static_spr(15);
+		room->set_timer_status(255, TIMER_START);
+		uhr->reset_timer(_G(timer_nr)[0], 0);
+		show_cur();
 	}
 
 	return action_flag;
 }
 
 void Room40::talk_police() {
-	if (_G(spieler).R40PoliceWeg == false && _G(spieler).R40PoliceAniStatus == 255) {
+	if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
 		hide_cur();
 		_G(spieler).R40PoliceStart = false;
 		room->set_timer_status(255, TIMER_STOP);
@@ -428,6 +426,7 @@ void Room40::talk_police() {
 
 void Room40::talk_handler() {
 	if (!_G(spieler).R40HaendlerOk) {
+		_G(spieler).flags38_2 = true;
 		hide_cur();
 		auto_move(6, P_CHEWY);
 		det->del_static_ani(4);
@@ -446,55 +445,59 @@ int16 Room40::use_haendler() {
 
 	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
-		hide_cur();
-		invent_2_slot(DUENGER_INV);
-		_G(spieler).R40HoUse = true;
-		_G(spieler).R40HaendlerOk = true;
-		_G(spieler).R40TeilKarte = true;
-		_G(spieler).R40DuengerMit = true;
-		atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
-		auto_move(10, P_CHEWY);
-		auto_move(11, P_HOWARD);
-		start_aad_wait(208, -1);
-		auto_move(6, P_HOWARD);
-		flags.NoScroll = true;
-
-		auto_scroll(270, 0);
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
-		det->set_static_ani(3, -1);
-		start_aad_wait(209, -1);
-		det->del_static_ani(3);
-		det->set_static_ani(5, -1);
-		start_aad_wait(213, -1);
+		if (!_G(spieler).flags38_2) {
+			start_aad_wait(612, -1);
+		} else {
+			hide_cur();
+			invent_2_slot(DUENGER_INV);
+			_G(spieler).R40HoUse = true;
+			_G(spieler).R40HaendlerOk = true;
+			_G(spieler).R40TeilKarte = true;
+			_G(spieler).R40DuengerMit = true;
+			atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
+			auto_move(10, P_CHEWY);
+			auto_move(11, P_HOWARD);
+			start_aad_wait(208, -1);
+			auto_move(6, P_HOWARD);
+			flags.NoScroll = true;
 
-		if (_G(spieler).R28RKuerbis) {
-			det->del_static_ani(5);
+			auto_scroll(270, 0);
+			det->del_static_ani(4);
+			room->set_timer_status(4, TIMER_STOP);
 			det->set_static_ani(3, -1);
-			start_aad_wait(211, -1);
-			out->ausblenden(0);
-			out->set_teilpalette(pal, 255, 1);
-			start_aad_wait(212, -1);
-			out->ausblenden(0);
-			_G(spieler).R40Wettbewerb = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-			flags.NoScroll = false;
-			out->setze_zeiger(nullptr);
-			out->cls();
-			switch_room(28);
-			SetUpScreenFunc = setup_func;
+			start_aad_wait(209, -1);
+			det->del_static_ani(3);
+			det->set_static_ani(5, -1);
+			start_aad_wait(213, -1);
+
+			if (_G(spieler).R28RKuerbis) {
+				det->del_static_ani(5);
+				det->set_static_ani(3, -1);
+				start_aad_wait(211, -1);
+				out->ausblenden(0);
+				out->set_teilpalette(pal, 255, 1);
+				start_aad_wait(212, -1);
+				out->ausblenden(0);
+				_G(spieler).R40Wettbewerb = true;
+				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+				flags.NoScroll = false;
+				out->setze_zeiger(nullptr);
+				out->cls();
+				switch_room(28);
+				SetUpScreenFunc = setup_func;
 
-		} else {
-			auto_move(11, P_HOWARD);
-			start_aad_wait(210, -1);
-		}
+			} else {
+				auto_move(11, P_HOWARD);
+				start_aad_wait(210, -1);
+			}
 
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
-		show_cur();
-		flags.NoScroll = false;
-		flags.MausLinks = false;
-		_G(spieler).R40HoUse = false;
+			menu_item = CUR_WALK;
+			cursor_wahl(menu_item);
+			show_cur();
+			flags.NoScroll = false;
+			flags.MausLinks = false;
+			_G(spieler).R40HoUse = false;
+		}
 	}
 
 	return action_flag;
@@ -520,13 +523,17 @@ int16 Room40::use_bmeister() {
 
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
-		hide_cur();
-		_G(spieler).R40HoUse = true;
-		new_invent_2_cur(HOTEL_INV);
-		bmeister_dia(237);
-		_G(spieler).flags37_80 = true;
-		flags.NoScroll = false;
-		show_cur();
+		if (_G(spieler).flags37_80) {
+			start_aad_wait(605, -1);
+		} else {
+			hide_cur();
+			_G(spieler).R40HoUse = true;
+			new_invent_2_cur(HOTEL_INV);
+			bmeister_dia(237);
+			_G(spieler).flags37_80 = true;
+			flags.NoScroll = false;
+			show_cur();
+		}
 	}
 
 	return action_flag;


Commit: 2a98a78211bce429f1d6682f6b7e751860133fea
    https://github.com/scummvm/scummvm/commit/2a98a78211bce429f1d6682f6b7e751860133fea
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Some more changes in scene 40

Changed paths:
    engines/chewy/rooms/room40.cpp


diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 85b58af2c08..66b9e8b2dc2 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -572,7 +572,7 @@ bool Room40::use_police() {
 	bool result = false;
 
 	if (menu_item == CUR_HOWARD) {
-		if (_G(spieler).R40PoliceWeg == false && _G(spieler).R40PoliceAniStatus == 255) {
+		if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
 			result = true;
 			_G(spieler).R40PoliceAb = true;
 			hide_cur();
@@ -602,62 +602,59 @@ bool Room40::use_police() {
 int16 Room40::use_tele() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R40PoliceWeg == false) {
-			action_flag = true;
-			hide_cur();
-
-			int16 dia_nr1 = -1;
-			if (!_G(spieler).R40PoliceAb) {
-				start_aad_wait(219, -1);
-				_G(spieler).R40HoUse = false;
+	if (!_G(spieler).inv_cur && _G(spieler).R40PoliceWeg == false) {
+		action_flag = true;
+		hide_cur();
 
-			} else {
-				auto_move(13, P_CHEWY);
-				det->show_static_spr(0);
+		int16 dia_nr1 = -1;
+		if (!_G(spieler).R40PoliceAb) {
+			start_aad_wait(219, -1);
+			_G(spieler).R40HoUse = false;
 
-				int16 dia_nr;
-				if (!_G(spieler).R40DuengerMit) {
-					dia_nr = 220;
-					dia_nr1 = 222;
-				} else {
-					dia_nr = 221;
-					dia_nr1 = 223;
-				}
+		} else {
+			auto_move(13, P_CHEWY);
+			det->show_static_spr(0);
 
-				start_aad_wait(dia_nr, -1);
-				auto_move(11, P_HOWARD);
-				det->hide_static_spr(0);
-				auto_move(9, P_CHEWY);
-				start_aad_wait(dia_nr1, -1);
-				_G(spieler).R40HoUse = false;
-				int16 timer_wert = 0;
+			int16 dia_nr;
+			if (!_G(spieler).R40DuengerMit) {
+				dia_nr = 220;
+				dia_nr1 = 222;
+			} else {
+				dia_nr = 221;
+				dia_nr1 = 223;
+			}
 
-				if (dia_nr1 == 223) {
-					if (is_cur_inventar(DUENGER_INV)) {
-						del_inventar(_G(spieler).AkInvent);
-					} else {
-						obj->del_inventar(DUENGER_INV, &room_blk);
-						del_invent_slot(DUENGER_INV);
-					}
+			start_aad_wait(dia_nr, -1);
+			auto_move(11, P_HOWARD);
+			det->hide_static_spr(0);
+			auto_move(9, P_CHEWY);
+			start_aad_wait(dia_nr1, -1);
+			_G(spieler).R40HoUse = false;
+			int16 timer_wert = 0;
 
-					invent_2_slot(LIKOER_INV);
-					auto_move(1, P_CHEWY);
-					_G(spieler).R40DuengerMit = false;
-					_G(spieler).R40DuengerTele = true;
-					flags.MausLinks = true;
-					flags.MainInput = false;
-					timer_wert = 3;
+			if (dia_nr1 == 223) {
+				if (is_cur_inventar(DUENGER_INV)) {
+					del_inventar(_G(spieler).AkInvent);
+				} else {
+					remove_inventory(DUENGER_INV);
 				}
 
-				_G(spieler).R40PoliceAb = false;
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], timer_wert);
+				invent_2_slot(LIKOER_INV);
+				auto_move(1, P_CHEWY);
+				_G(spieler).R40DuengerMit = false;
+				_G(spieler).R40DuengerTele = true;
+				flags.MausLinks = true;
+				flags.MainInput = false;
+				timer_wert = 3;
 			}
 
-			if (dia_nr1 != 223)
-				show_cur();
+			_G(spieler).R40PoliceAb = false;
+			room->set_timer_status(255, TIMER_START);
+			uhr->reset_timer(_G(timer_nr)[0], timer_wert);
 		}
+
+		if (dia_nr1 != 223)
+			show_cur();
 	}
 
 	return action_flag;


Commit: 2399a8aa87ac85c35d2088e9ea17fec57bd557b0
    https://github.com/scummvm/scummvm/commit/2399a8aa87ac85c35d2088e9ea17fec57bd557b0
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Fix a bug in Room 51, hopefully fix the memory reused by room 65, fi a couple of warnings

Changed paths:
    engines/chewy/global.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room51.cpp


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 2773713e3c9..be749241933 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -109,6 +109,7 @@ public:
 	int16 _r65tmp_ho_x = 0;
 	int16 _r65tmp_ho_y = 0;
 	int16 _r68HohesC = 0;
+	bool _r51onOff[5] = {false};
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 02af1ee6950..01767731742 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -830,6 +830,7 @@ int16 flic_user_function(int16 keys) {
 	return ret;
 }
 
+#ifdef NEW_VIDEO_CODE
 static void playVideo(uint num) {
 	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
 	VideoResource *videoResource = new VideoResource("cut.tap");
@@ -881,6 +882,7 @@ static void playVideo(uint num) {
 	delete videoResource;
 	delete cfoDecoder;
 }
+#endif
 
 static void flic_proc1() {
 	const int16 VALS1[] = {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index fa742b78290..0c011273d5e 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -291,9 +291,9 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 		Rb->AkAblage -= 1000;
 	} else {
 		// Image width and height is piggy-banked inside the image data
-		uint16 *mem = (uint16 *)Ablage[Rb->AkAblage];
-		mem[0] = img->width;
-		mem[1] = img->height;
+		uint16 *memPtr = (uint16 *)Ablage[Rb->AkAblage];
+		memPtr[0] = img->width;
+		memPtr[1] = img->height;
 		memcpy(Ablage[Rb->AkAblage] + 4, img->data, img->size);
 		memcpy(AblagePal[Rb->AkAblage], img->palette, 3 * 256);
 		set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), img->size);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5b8ce182a84..253a77b1a98 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -64,7 +64,7 @@ void Room51::entry() {
 		hide_cur();
 
 		for (int i = 0; i < 2; ++i) {
-			_arr[0] = false;
+			_arr[i] = false;
 			_G(timer_nr)[i] = room->set_timer(i + 9, i * 2 + 6);
 		}
 
@@ -353,15 +353,15 @@ int16 Room51::cut_serv(int16 frame) {
 
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
-		assert(t_nr >= 0 && t_nr < 2);
-		if (!Room65::_scrollY[t_nr]) {
+		assert(t_nr >= 0 && t_nr < 5);
+		if (!_G(r51onOff)[t_nr]) {
 			det->start_detail(t_nr, 1, ANI_VOR);
-			Room65::_scrollY[t_nr] = 1;
+			_G(r51onOff)[t_nr] = true;
 		} else if (!det->get_ani_status(t_nr)) {
 			det->start_detail(t_nr, 1, ANI_GO);
 			det->start_detail(t_nr + 2, 1, ANI_VOR);
 			uhr->reset_timer(obj_nr, 0);
-			Room65::_scrollY[t_nr] = 0;
+			_G(r51onOff)[t_nr] = false;
 		}
 	}
 }


Commit: 34b2dcdd39067a8876ce5cb3884001337750f676
    https://github.com/scummvm/scummvm/commit/34b2dcdd39067a8876ce5cb3884001337750f676
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Shift global into room 91 local

Changed paths:
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room91.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index a62d5e3d06e..886e60446d7 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -43,7 +43,7 @@ void Room50::entry(int16 eib_nr) {
 		hide_cur();
 		stop_page();
 		_G(maus_links_click) = false;
-		set_person_pos(0, 64, P_HOWARD, P_RIGHT);
+		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
 		set_person_pos(92, 123, P_CHEWY, P_LEFT);
 		start_aad_wait(510, -1);
 		out->setze_zeiger(nullptr);
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index c8f31bf66c2..8eefb8807a8 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -28,13 +28,15 @@
 namespace Chewy {
 namespace Rooms {
 
+int16 Room91::_click;
+
 void Room91::entry() {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
-	_G(spieler).r91_word18DB2A = 0;
+	_click = 0;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	spieler_mi[P_HOWARD].Mode = true;
 
@@ -105,17 +107,17 @@ void Room91::setup_func() {
 		cur_2_inventory();
 		cursor_wahl(CUR_22);
 
-		if (_G(maus_links_click) == 0 || _G(spieler).r91_word18DB2A)
+		if (_G(maus_links_click) == 0 || _click)
 			return;
 
-		const int old_r91_word18DB2A = _G(spieler).r91_word18DB2A;
-		_G(maus_links_click) = old_r91_word18DB2A;
-		_G(spieler).r91_word18DB2A = 1;
+		const int oldClick = _click;
+		_G(maus_links_click) = oldClick;
+		_click = 1;
 		const int aniNr = 1 + (minfo.y <= 100 ? 1 : 0);
 		hide_cur();
 		det->stop_detail(0);
 		start_detail_wait(aniNr, 1, ANI_VOR);
-		_G(spieler).r91_word18DB2A = old_r91_word18DB2A;
+		_click = oldClick;
 		det->start_detail(0, 255, false);
 		det->start_detail(aniNr + 2, 1, false);
 		det->start_detail(7, 1, false);
diff --git a/engines/chewy/rooms/room91.h b/engines/chewy/rooms/room91.h
index e5b390b484a..943c4f6d974 100644
--- a/engines/chewy/rooms/room91.h
+++ b/engines/chewy/rooms/room91.h
@@ -26,6 +26,9 @@ namespace Chewy {
 namespace Rooms {
 
 class Room91 {
+private:
+	static int16 _click;
+
 public:
 	static void entry();
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7958d304d89..b5afb0e4ec7 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -510,8 +510,6 @@ struct Spieler : public SpielerFlags {
 		{0, 1, 170, 190}
 	};
 	
-	// ---- //
-	int r91_word18DB2A = 0;
 	// ---- //
 	int r93_word18DB2C = 0;
 	// ---- //


Commit: b63b80e76337c200d0eb6ebabff182702620d434
    https://github.com/scummvm/scummvm/commit/b63b80e76337c200d0eb6ebabff182702620d434
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Renaming global used for room 93 & 94

Changed paths:
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index 08576947d9e..cf9c0f91942 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -67,7 +67,7 @@ void Room93::entry() {
 
 void Room93::xit() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 94;
-	_G(spieler).scrollx = _G(spieler).r93_word18DB2C;
+	_G(spieler).scrollx = _G(spieler).r94Scrollx;
 	menu_item = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 }
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index fb05f7a6123..e5064f1a14a 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -59,7 +59,7 @@ void Room94::entry() {
 		test_intro(30);
 		fx_blend = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
-		_G(spieler).r93_word18DB2C = _G(spieler).scrollx;
+		_G(spieler).r94Scrollx = _G(spieler).scrollx;
 		switch_room(93);
 		return;
 	}
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index b5afb0e4ec7..7fdd85f498e 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -511,7 +511,7 @@ struct Spieler : public SpielerFlags {
 	};
 	
 	// ---- //
-	int r93_word18DB2C = 0;
+	int r94Scrollx = 0;
 	// ---- //
 	int r97_word18DB2E = 0;
 	bool r97_bool18DB30 = false;


Commit: 2cd8e50d5848f4f50b9e9cbf730e1e3764072148
    https://github.com/scummvm/scummvm/commit/2cd8e50d5848f4f50b9e9cbf730e1e3764072148
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:03-08:00

Commit Message:
CHEWY: Fix initial location in hotel during endgame

Changed paths:
    engines/chewy/rooms/room91.cpp


diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 8eefb8807a8..f328750d57a 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -45,7 +45,6 @@ void Room91::entry() {
 
 	_G(spieler).scrollx = 320;
 	hide_cur();
-	_G(spieler).scrollx = 320;
 
 	if (_G(spieler).flags34_1) {
 		set_person_pos(499, 106, P_CHEWY, P_RIGHT);
@@ -56,8 +55,7 @@ void Room91::entry() {
 		}
 	} else {
 		flags.MainInput = false;
-		flags.NoScroll = false;
-		flags.NoScroll = true; // CHECKME: clearly, this has to be double checked. Maybe I didn't understand properly the NOT?
+		flags.NoScroll = true;
 		_G(spieler).flags34_1 = true;
 		set_person_pos(326, 99, P_CHEWY, P_RIGHT);
 		set_person_pos(312, 75, P_HOWARD, P_RIGHT);
@@ -79,6 +77,7 @@ void Room91::entry() {
 void Room91::xit(int16 eib_nr) {
 	flags.MainInput = true;
 	_G(spieler).ScrollxStep = 1;
+	_G(spieler).scrollx = 0;
 
 	if (eib_nr == 136)
 		_G(spieler).PersonRoomNr[P_HOWARD] = 90;


Commit: 77defa5bbf4c4cd781add4a0259bbfaaccad26c2
    https://github.com/scummvm/scummvm/commit/77defa5bbf4c4cd781add4a0259bbfaaccad26c2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Fix array indexing in room 51

Changed paths:
    engines/chewy/global.h
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room51.h


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index be749241933..2773713e3c9 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -109,7 +109,6 @@ public:
 	int16 _r65tmp_ho_x = 0;
 	int16 _r65tmp_ho_y = 0;
 	int16 _r68HohesC = 0;
-	bool _r51onOff[5] = {false};
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 253a77b1a98..a69df315114 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -39,7 +39,7 @@ static const AniBlock ABLOCK37[5] = {
 };
 
 bool Room51::_flag;
-bool Room51::_arr[2];
+bool Room51::_enemyFlag[2];
 int16 Room51::_tmpx;
 int16 Room51::_tmpy;
 int Room51::_index;
@@ -64,7 +64,7 @@ void Room51::entry() {
 		hide_cur();
 
 		for (int i = 0; i < 2; ++i) {
-			_arr[i] = false;
+			_enemyFlag[i] = false;
 			_G(timer_nr)[i] = room->set_timer(i + 9, i * 2 + 6);
 		}
 
@@ -353,15 +353,15 @@ int16 Room51::cut_serv(int16 frame) {
 
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
-		assert(t_nr >= 0 && t_nr < 5);
-		if (!_G(r51onOff)[t_nr]) {
-			det->start_detail(t_nr, 1, ANI_VOR);
-			_G(r51onOff)[t_nr] = true;
-		} else if (!det->get_ani_status(t_nr)) {
-			det->start_detail(t_nr, 1, ANI_GO);
-			det->start_detail(t_nr + 2, 1, ANI_VOR);
-			uhr->reset_timer(obj_nr, 0);
-			_G(r51onOff)[t_nr] = false;
+		if (!_enemyFlag[obj_nr - 9]) {
+			det->start_detail(obj_nr, 1, ANI_VOR);
+			_enemyFlag[obj_nr - 9] = true;
+
+		} else if (!det->get_ani_status(obj_nr)) {
+			det->start_detail(obj_nr, 1, ANI_GO);
+			det->start_detail(obj_nr + 2, 1, ANI_VOR);
+			uhr->reset_timer(t_nr, 0);
+			_enemyFlag[obj_nr - 9] = false;
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room51.h b/engines/chewy/rooms/room51.h
index 382782250c5..8516eb8b333 100644
--- a/engines/chewy/rooms/room51.h
+++ b/engines/chewy/rooms/room51.h
@@ -28,7 +28,7 @@ namespace Rooms {
 class Room51 {
 private:
 	static bool _flag;
-	static bool _arr[2];
+	static bool _enemyFlag[2];
 	static int16 _tmpx, _tmpy;
 	static int _index;
 


Commit: d39dd81427f4b6b522a8573215db7673d03f64f0
    https://github.com/scummvm/scummvm/commit/d39dd81427f4b6b522a8573215db7673d03f64f0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Fixed Howard text in room 90 after escaping Borx

Changed paths:
    engines/chewy/rooms/room90.cpp


diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index ad02b5eafbd..0304e02b05d 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -84,9 +84,11 @@ void Room90::entry(int16 eib_nr) {
 		_G(spieler).flags33_10 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
 		switch_room(91);
+
 	} else if (!_G(spieler).flags33_20) {
-		start_aad_wait(-1, 499);
+		start_aad_wait(499, -1);
 		_G(spieler).flags33_20 = true;
+
 	} else if (_G(spieler).flags34_20) {
 		set_person_pos(411, 146, P_CHEWY, P_RIGHT);
 		set_person_pos(440, 132, P_HOWARD, P_RIGHT);


Commit: 5ad55150c5e9c9df30c752d344d3ff8707209a41
    https://github.com/scummvm/scummvm/commit/5ad55150c5e9c9df30c752d344d3ff8707209a41
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Cleanup of method for getting hubcaps

Changed paths:
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room90.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 0304e02b05d..d76bdeb187e 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -230,7 +230,7 @@ void Room90::proc2() {
 	flags.AutoAniPlay = false;
 }
 
-int Room90::proc3() {
+int Room90::getHubcaps() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
@@ -241,8 +241,10 @@ int Room90::proc3() {
 	start_spz_wait(43, 1, false, P_CHEWY);
 	load_chewy_taf(CHEWY_ANI7);
 
-	while (spieler_vector[P_HOWARD].Xypos[0] != 176)
+	while (spieler_vector[P_HOWARD].Xypos[0] != 176) {
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN0;
+	}
 
 	start_spz_wait(47, 1, false, P_HOWARD);
 	_G(spieler).mi[1] = 2;
@@ -262,6 +264,7 @@ int Room90::proc3() {
 		destX -= 2;
 		det->set_detail_pos(12, destX, 15);
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN0;
 	}
 
 	start_aad_wait(517, -1);
diff --git a/engines/chewy/rooms/room90.h b/engines/chewy/rooms/room90.h
index 104d4e9444b..a724d7441ef 100644
--- a/engines/chewy/rooms/room90.h
+++ b/engines/chewy/rooms/room90.h
@@ -31,7 +31,7 @@ public:
 	static void xit(int16 eib_nr);
 	static void setup_func();
 	static void proc2();
-	static int proc3();
+	static int getHubcaps();
 	static int proc4();
 	static int16 proc5(int16 key);
 	static int proc6();
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 07cfe3cf245..bb74a9c4fe4 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -713,7 +713,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 517:
-						action_ret = Room90::proc3();
+						action_ret = Room90::getHubcaps();
 						break;
 
 					case 519:


Commit: 69a4ab71c21547a6c8bec08e45ac8cde76e654b1
    https://github.com/scummvm/scummvm/commit/69a4ab71c21547a6c8bec08e45ac8cde76e654b1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Add loading switch case for wearing hubcap

Changed paths:
    engines/chewy/defines.h
    engines/chewy/room.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index a2d612aa632..4518a4031f2 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -152,6 +152,7 @@ enum SetupScreenMode {
 #define CHEWY_PUMP_TAF "misc/ch_pump.taf"
 #define CHEWY_ROCK_TAF "misc/ch_rock.taf"
 #define CHEWY_JMAN_TAF "misc/ch_mans.taf"
+#define CHEWY_HELM_TAF "misc/ch_helm.taf"
 #define MENUTAF "misc/menu.taf"
 #define CH_SPZ_FILE "misc/ch_spez.taf"
 #define OPTION_TAF "MISC/OPTION.TAF"
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 0c011273d5e..8725761a34f 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -510,6 +510,12 @@ void load_chewy_taf(int16 taf_nr) {
 			spieler_mi[P_CHEWY].HotY = 68;
 			break;
 
+		case CHEWY_ANI7:
+			fname_ = CHEWY_HELM_TAF;
+			chewy_ph_anz = chewy_mi_phasen_anz;
+			chewy_ph = (uint8 *)chewy_mi_phasen;
+			break;
+
 		default:
 			fname_ = NULL;
 			break;


Commit: 113420ab9ba6f16c133008a19d81161026ad8fb9
    https://github.com/scummvm/scummvm/commit/113420ab9ba6f16c133008a19d81161026ad8fb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Clean up of room 90 globals to be local & static

Changed paths:
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room90.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index d76bdeb187e..49e16d0c9bd 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -28,10 +28,12 @@
 namespace Chewy {
 namespace Rooms {
 
+int Room90::_delay;
+
 void Room90::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
-	_G(spieler).r90_word18DB28 = 0;
+	_delay = 0;
 	SetUpScreenFunc = setup_func;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 	_G(zoom_horizont) = 150;
@@ -113,10 +115,10 @@ void Room90::setup_func() {
 	if (menu_item != CUR_WALK)
 		return;
 
-	if (_G(spieler).r90_word18DB28)
-		--_G(spieler).r90_word18DB28;
+	if (_delay)
+		--_delay;
 	else {
-		_G(spieler).r90_word18DB28 = _G(spieler).DelaySpeed - 1;
+		_delay = _G(spieler).DelaySpeed - 1;
 		for (int i = 0; i < 8; ++i) {
 			if (_G(spieler).r90_Array187030[i][0] == 1) {
 				int destY = Adi[i + 4].y;
diff --git a/engines/chewy/rooms/room90.h b/engines/chewy/rooms/room90.h
index a724d7441ef..9dbdf9669e8 100644
--- a/engines/chewy/rooms/room90.h
+++ b/engines/chewy/rooms/room90.h
@@ -26,6 +26,9 @@ namespace Chewy {
 namespace Rooms {
 
 class Room90 {
+private:
+	static int _delay;
+
 public:
 	static void entry(int16 eib_nr);
 	static void xit(int16 eib_nr);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7fdd85f498e..69b8fae0476 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -498,7 +498,6 @@ struct Spieler : public SpielerFlags {
 	// ---- //
 	int16 r88DestRoom = 0;
 	// ---- //
-	int r90_word18DB28 = 0;
 	int r90_Array187030[8][4] = {
 		{0, 1, 180, 190},
 		{0, 1,  60,  60},


Commit: afc0e0729b9c1a54f1df79534369eb5699cf7007
    https://github.com/scummvm/scummvm/commit/afc0e0729b9c1a54f1df79534369eb5699cf7007
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:04-08:00

Commit Message:
CHEWY: Some methods cleanup in room 90

Changed paths:
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room90.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 49e16d0c9bd..c23633fa2ea 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -112,7 +112,7 @@ void Room90::xit(int16 eib_nr) {
 }
 
 void Room90::setup_func() {
-	if (menu_item != CUR_WALK)
+	if (menu_display)
 		return;
 
 	if (_delay)
@@ -157,7 +157,7 @@ void Room90::setup_func() {
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || HowardMov)
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || HowardMov == 1)
 		return;
 
 	calc_person_look();
@@ -278,7 +278,7 @@ int Room90::getHubcaps() {
 	return 1;
 }	
 
-int Room90::proc4() {
+int Room90::shootControlUnit() {
 	if (!is_cur_inventar(111))
 		return 0;
 
@@ -322,7 +322,7 @@ int16 Room90::proc5(int16 key) {
 	return 0;
 }
 
-int Room90::proc6() {
+int Room90::useSurimyOnWreck() {
 	if (!is_cur_inventar(18))
 		return 0;
 
diff --git a/engines/chewy/rooms/room90.h b/engines/chewy/rooms/room90.h
index 9dbdf9669e8..ee9049157c0 100644
--- a/engines/chewy/rooms/room90.h
+++ b/engines/chewy/rooms/room90.h
@@ -35,9 +35,9 @@ public:
 	static void setup_func();
 	static void proc2();
 	static int getHubcaps();
-	static int proc4();
+	static int shootControlUnit();
 	static int16 proc5(int16 key);
-	static int proc6();
+	static int useSurimyOnWreck();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index bb74a9c4fe4..876ddfd8fb3 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -717,11 +717,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 519:
-						action_ret = Room90::proc4();
+						action_ret = Room90::shootControlUnit();
 						break;
 
 					case 520:
-						action_ret = Room90::proc6();
+						action_ret = Room90::useSurimyOnWreck();
 						break;
 
 					case 522:


Commit: 759c28dc24efc815b625a727652f5c18ecd36c4b
    https://github.com/scummvm/scummvm/commit/759c28dc24efc815b625a727652f5c18ecd36c4b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:05-08:00

Commit Message:
CHEWY: Fix giving bottle to ghost

Changed paths:
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room94.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index e5064f1a14a..fe2d6520906 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -125,8 +125,8 @@ void Room94::talk1() {
 	show_cur();
 }
 
-int Room94::proc3() {
-	if (is_cur_inventar(62))
+int Room94::giveGhostBottle() {
+	if (!is_cur_inventar(LIKOER2_INV))
 		return 0;
 
 	hide_cur();
diff --git a/engines/chewy/rooms/room94.h b/engines/chewy/rooms/room94.h
index c819e54d6f6..627e659da43 100644
--- a/engines/chewy/rooms/room94.h
+++ b/engines/chewy/rooms/room94.h
@@ -33,7 +33,7 @@ public:
 	static void setup_func();
 
 	static void talk1();
-	static int proc3();
+	static int giveGhostBottle();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 876ddfd8fb3..a8b60da83ac 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -725,7 +725,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 522:
-						action_ret = Room94::proc3();
+						action_ret = Room94::giveGhostBottle();
 						break;
 
 					case 525:


Commit: 14e9cceee9c460390e8749f0ee5cd6daa0d204e3
    https://github.com/scummvm/scummvm/commit/14e9cceee9c460390e8749f0ee5cd6daa0d204e3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:05-08:00

Commit Message:
CHEWY: Move room 97 globals to room fields

Changed paths:
    engines/chewy/rooms/room97.cpp
    engines/chewy/rooms/room97.h
    engines/chewy/types.h


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index ba3a52c61d7..2b4dfd715c3 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -28,6 +28,14 @@
 namespace Chewy {
 namespace Rooms {
 
+int Room97::_word18DB2E;
+bool Room97::_bool18DB30;
+bool Room97::_bool18DB32;
+int Room97::_word18DB34;
+int Room97::_word18DB36;
+int Room97::_word18DB38;
+bool Room97::_bool18DB3A;
+
 void Room97::entry() {
 	det->enable_sound(0, 0);
 	det->play_sound(0, 0);
@@ -41,7 +49,7 @@ void Room97::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 42;
 
-	_G(spieler).r97_bool18DB32 = false;
+	_bool18DB32 = false;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 97;
 	_G(zoom_mov_fak) = 0;
 	_G(spieler).ScrollxStep = 2;
@@ -82,29 +90,31 @@ void Room97::entry() {
 	if (_G(spieler).flags37_4)
 		det->show_static_spr(20);
 
-	_G(spieler).r97_word18DB2E = 0;
-	_G(spieler).r97_word18DB34 = 332;
-	_G(spieler).r97_word18DB36 = 110;
-	_G(spieler).r97_word18DB38 = 132;
+	_word18DB2E = 0;
+	_word18DB34 = 332;
+	_word18DB36 = 110;
+	_word18DB38 = 132;
 
 	if (!flags.ExitMov) {
-		hide_cur();
-		out->setze_zeiger(nullptr);
-		out->cls();
-
-		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
-		_G(spieler).SVal2 = 0;
-		_G(spieler).flags35_4 = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(19, 1, ANI_VOR);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		show_cur();
-		switch_room(89);
-	} else {
-		_G(spieler).scrollx = 800;
-		set_person_pos(1067, 98, P_CHEWY, P_LEFT);
-		set_person_pos(1092, 83, P_HOWARD, P_LEFT);
-		set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
+		if (_G(spieler).flags37_8) {
+			hide_cur();
+			out->setze_zeiger(nullptr);
+			out->cls();
+
+			_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
+			_G(spieler).SVal2 = 0;
+			_G(spieler).flags35_4 = true;
+			_G(spieler).PersonHide[P_CHEWY] = true;
+			start_detail_wait(19, 1, ANI_VOR);
+			_G(spieler).PersonHide[P_CHEWY] = false;
+			show_cur();
+			switch_room(89);
+		} else {
+			_G(spieler).scrollx = 800;
+			set_person_pos(1067, 98, P_CHEWY, P_LEFT);
+			set_person_pos(1092, 83, P_HOWARD, P_LEFT);
+			set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
+		}
 	}
 }
 
@@ -149,35 +159,35 @@ void Room97::setup_func() {
 	if (_G(spieler).flags35_80 && spieler_vector->Xypos[P_CHEWY] > 830)
 		set_person_pos(830, 98, P_CHEWY, P_RIGHT);
 
-	if (_G(spieler).r97_word18DB2E)
-		--_G(spieler).r97_word18DB2E;
+	if (_word18DB2E)
+		--_word18DB2E;
 	else {
-		_G(spieler).r97_word18DB2E = _G(spieler).DelaySpeed / 2;
-		if (_G(spieler).r97_word18DB34 != 710)
-			_G(spieler).r97_word18DB34 += 2;
-		else if (_G(spieler).r97_word18DB36 < 200) {
-			_G(spieler).r97_word18DB36 += 2;
-			_G(spieler).r97_word18DB38 += 2;
+		_word18DB2E = _G(spieler).DelaySpeed / 2;
+		if (_word18DB34 != 710)
+			_word18DB34 += 2;
+		else if (_word18DB36 < 200) {
+			_word18DB36 += 2;
+			_word18DB38 += 2;
 		} else {
 			if (!_G(spieler).flags36_8) {
-				_G(spieler).r97_word18DB34 = 332;
-				_G(spieler).r97_word18DB36 = _G(spieler).flags36_10 ? 106 : 110;
+				_word18DB34 = 332;
+				_word18DB36 = _G(spieler).flags36_10 ? 106 : 110;
 			}
-			_G(spieler).r97_bool18DB3A = true;
+			_bool18DB3A = true;
 		}
 
-		if (_G(spieler).r97_bool18DB3A) {
-			if (_G(spieler).r97_word18DB38 <= 132)
-				_G(spieler).r97_bool18DB3A = false;
+		if (_bool18DB3A) {
+			if (_word18DB38 <= 132)
+				_bool18DB3A = false;
 			else
-				_G(spieler).r97_word18DB38 -= 2;
+				_word18DB38 -= 2;
 		}
 
-		det->set_static_pos(16, 699, _G(spieler).r97_word18DB38, false, false);
+		det->set_static_pos(16, 699, _word18DB38, false, false);
 		if (_G(spieler).flags36_10) {
-			det->set_detail_pos(12, _G(spieler).r97_word18DB34, _G(spieler).r97_word18DB36);
+			det->set_detail_pos(12, _word18DB34, _word18DB36);
 		} else {
-			det->set_static_pos(14, _G(spieler).r97_word18DB34, _G(spieler).r97_word18DB36, false, false);
+			det->set_static_pos(14, _word18DB34, _word18DB36, false, false);
 		}
 	}
 
@@ -218,7 +228,7 @@ void Room97::setup_func() {
 			go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
 	}
 
-	if (!_G(spieler).r97_bool18DB32)
+	if (!_bool18DB32)
 		return;
 
 	int destX = -1;
@@ -366,8 +376,10 @@ int Room97::proc5() {
 	auto_move(0, P_CHEWY);
 	auto_scroll(800, 0);
 	
-	while (spieler_vector[P_HOWARD].Xypos[0] < 1080)
+	while (spieler_vector[P_HOWARD].Xypos[0] < 1080) {
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN0;
+	}
 
 	flic_cut(122, CFO_MODE);
 
@@ -636,7 +648,7 @@ int Room97::proc14() {
 	if (!is_cur_inventar(SLIME_INV))
 		return 0;
 
-	_G(spieler).r97_bool18DB30 = true;
+	_bool18DB30 = true;
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
 	menu_item = CUR_USE;
@@ -666,7 +678,7 @@ void Room97::proc15() {
 	}
 
 	hide_cur();
-	if (_G(spieler).r97_bool18DB30) {
+	if (_bool18DB30) {
 		start_detail_wait(17, 1, ANI_VOR);
 		det->start_detail(16, 1, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -689,9 +701,9 @@ void Room97::proc15() {
 		auto_move(10, P_CHEWY);
 		auto_scroll(60, 0);
 		start_aad_wait(544, -1);
-		_G(spieler).r97_bool18DB32 = true;
+		_bool18DB32 = true;
 		auto_move(11, P_CHEWY);
-		_G(spieler).r97_bool18DB32 = false;
+		_bool18DB32 = false;
 		flags.AutoAniPlay = false;
 		proc13();
 		flags.AutoAniPlay = true;
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
index f389b6a561d..5c1ad5cdc9e 100644
--- a/engines/chewy/rooms/room97.h
+++ b/engines/chewy/rooms/room97.h
@@ -26,6 +26,15 @@ namespace Chewy {
 namespace Rooms {
 
 class Room97 {
+private:
+	static int _word18DB2E;
+	static bool _bool18DB30;
+	static bool _bool18DB32;
+	static int _word18DB34;
+	static int _word18DB36;
+	static int _word18DB38;
+	static bool _bool18DB3A;
+
 private:
 	static void setup_func();
 	static void proc2();
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 69b8fae0476..7eaa5a54c18 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -511,14 +511,6 @@ struct Spieler : public SpielerFlags {
 	
 	// ---- //
 	int r94Scrollx = 0;
-	// ---- //
-	int r97_word18DB2E = 0;
-	bool r97_bool18DB30 = false;
-	bool r97_bool18DB32 = false;
-	int r97_word18DB34 = 0;
-	int r97_word18DB36 = 0;
-	int r97_word18DB38 = 0;
-	bool r97_bool18DB3A = false;
 	// --- //
 
 	uint8 mi[8] = {0};


Commit: f105802ecfab82b846e661c07b0d8ad77dcda393
    https://github.com/scummvm/scummvm/commit/f105802ecfab82b846e661c07b0d8ad77dcda393
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:05-08:00

Commit Message:
CHEWY: Fix destX in Room97::setup_func

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 2b4dfd715c3..cf388c7b753 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -205,7 +205,7 @@ void Room97::setup_func() {
 		int destX, destY;
 
 		if (chewyPosX > 980) {
-			destX = 1000;
+			destX = 1080;
 			destY = 91;
 		} else if (chewyPosX > 880) {
 			destX = 994;


Commit: 7b139a913248df03c4744dcc23f82b68b9ce8eb0
    https://github.com/scummvm/scummvm/commit/7b139a913248df03c4744dcc23f82b68b9ce8eb0
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:05-08:00

Commit Message:
CHEWY: Fix logic in room97::entry

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index cf388c7b753..e5df0d360d1 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -55,9 +55,14 @@ void Room97::entry() {
 	_G(spieler).ScrollxStep = 2;
 	det->hide_static_spr(14);
 
-	if (_G(spieler).flags36_4)
-		det->show_static_spr(17);
+	if (_G(spieler).flags36_2) {
+		det->hide_static_spr(14);
+		det->hide_static_spr(18);
 
+		if (!_G(spieler).flags36_4)
+			det->show_static_spr(17);
+	}
+	
 	if (_G(spieler).flags36_10) {
 		det->start_detail(11, 255, ANI_VOR);
 		det->stop_detail(5);
@@ -95,26 +100,27 @@ void Room97::entry() {
 	_word18DB36 = 110;
 	_word18DB38 = 132;
 
-	if (!flags.ExitMov) {
-		if (_G(spieler).flags37_8) {
-			hide_cur();
-			out->setze_zeiger(nullptr);
-			out->cls();
-
-			_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
-			_G(spieler).SVal2 = 0;
-			_G(spieler).flags35_4 = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(19, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			show_cur();
-			switch_room(89);
-		} else {
-			_G(spieler).scrollx = 800;
-			set_person_pos(1067, 98, P_CHEWY, P_LEFT);
-			set_person_pos(1092, 83, P_HOWARD, P_LEFT);
-			set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
-		}
+	if (flags.LoadGame)
+		return;
+
+	if (_G(spieler).flags37_8) {
+		hide_cur();
+		out->setze_zeiger(nullptr);
+		out->cls();
+
+		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
+		_G(spieler).SVal2 = 0;
+		_G(spieler).flags35_4 = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(19, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		show_cur();
+		switch_room(89);
+	} else {
+		_G(spieler).scrollx = 800;
+		set_person_pos(1067, 98, P_CHEWY, P_LEFT);
+		set_person_pos(1092, 83, P_HOWARD, P_LEFT);
+		set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
 	}
 }
 


Commit: a74d0e8c2515d2e5965a1182edd17f3376d644a1
    https://github.com/scummvm/scummvm/commit/a74d0e8c2515d2e5965a1182edd17f3376d644a1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:05-08:00

Commit Message:
CHEWY: Fix an issue in Room97::proc2

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index e5df0d360d1..6fbe7bec510 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -273,7 +273,7 @@ void Room97::proc2() {
 	go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	spieler_mi[P_CHEWY].Mode = false;
 	Sdi[6].z_ebene = 166;
-	Sdi[18].z_ebene = 157;
+	Sdi[24].z_ebene = 157;
 	show_cur();
 	flags.AutoAniPlay = false;
 }


Commit: 6aaa8ceaa6ddebb32a9f3772c4dc4975f4ec46b7
    https://github.com/scummvm/scummvm/commit/6aaa8ceaa6ddebb32a9f3772c4dc4975f4ec46b7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Use the new sound code

This removes a lot of the stubbed voice and sound functions.
The custom music format code hasn't been updated yet

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/datei.cpp
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/flic.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room26.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room83.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sound.cpp
    engines/chewy/sound.h
    engines/chewy/sprite.cpp
    engines/chewy/video/cfo_decoder.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 680c5d878be..e20fcf33b87 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -21,12 +21,12 @@
 
 #include "audio/audiostream.h"
 #include "audio/decoders/raw.h"
-#include "common/config-manager.h"
 #include "chewy/chewy.h"
 #include "chewy/ailclass.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
 #include "chewy/ngshext.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -161,66 +161,7 @@ char *Patterns[128];
 char *CurrentLine;
 int16 StereoPos[8] = {63};
 
-byte *Dbuffer[8][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} };
-uint32 DbufferLen[8] = {0};
-uint32 DbSampleLen[8] = {0};
-Stream *DbufferHandles[8] = {0};
-
-ailScummVM::ailScummVM() {
-	_mixer = g_engine->_mixer;
-}
-
-void ailScummVM::playSpeech(int channel, Common::SeekableReadStream *src) {
-	Audio::AudioStream *audioStream =
-		Audio::makeRawStream(src, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
-	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
-		&_soundHandles[channel & 1], audioStream);
-
-	waitForSpeechToFinish();
-}
-
-bool ailScummVM::isSpeechActive(int channel) const {
-	return _mixer->isSoundHandleActive(
-		_soundHandles[channel & 1]);
-}
-
-void ailScummVM::waitForSpeechToFinish() {
-	if (flags.InitSound && _G(spieler).SpeechSwitch) {
-		while (isSpeechActive() && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
-		}
-	}
-}
-
-bool ailScummVM::hasSubtitles() {
-	return ConfMan.getBool("subtitles");
-}
-
-bool ailScummVM::isSpeechMuted() {
-	return ConfMan.getBool("speech_mute");
-}
-
-
 ailclass::ailclass() {
-#if 0
-	int16 i;
-	char *enstr;
-	char a[] = {116, 109, 121, 83, 120, 107, 124, 107, 103, 114, 0}; // "NGS-REVEAL"
-	char
-	b[] = {121, 117, 123, 116, 106, 133, 121, 127, 121, 122, 107, 115, 133, 78, 105, 79,
-		133, 116, 107, 125, 133, 109, 107, 116, 107, 120, 103, 122, 111, 117, 116, 133,
-		121, 117, 108, 122, 125, 103, 120, 107, 0 }; // "SOUND_SYSTEM_(C)_NEW_GENERATION_SOFTWARE"
-	for (i = 0; a[i] != 0; i++)
-		a[i] -= 38;
-	for (i = 0; b[i] != 0; i++)
-		b[i] -= 38;
-	enstr = (char *)getenv(a);
-	if (enstr) {
-		printf(b);
-		printf("\n");
-		g_events->delay(800);
-	}
-#endif
 	SoundEnable = false;
 	MusicFade = false;
 }
@@ -237,34 +178,6 @@ ailclass::~ailclass() {
 int16 ailclass::init(uint16 freq) {
 	warning("STUB: ailclass::init()");
 
-#if 0
-	int16 port, irq, dma;
-	int16 i;
-	GlobalFrequency = freq;
-	AIL_startup();
-	AIL_set_preference(DIG_SERVICE_RATE, 300);
-	AIL_set_preference(DIG_LATENCY, 30);
-	AIL_set_preference(DIG_USE_STEREO, YES);
-	AIL_set_preference(DIG_HARDWARE_SAMPLE_RATE, freq);
-	AIL_set_preference(DIG_USE_16_BITS, NO);
-	dig = AIL_install_DIG_INI();
-	if (dig == NULL) {
-		AIL_shutdown();
-		SoundCard = 0;
-	} else {
-		SoundEnable = TRUE;
-		for (i = 0; i < MAX_VOICES; i++) {
-			smp[i] = AIL_allocate_sample_handle(dig);
-			if (smp[i] == NULL) {
-				break;
-			}
-		}
-		RealVoices = i;
-		SoundCard = SOUNDBLASTER;
-	}
-
-	return SoundCard;
-#endif
 	return SOUNDBLASTER;
 }
 
@@ -292,31 +205,6 @@ void ailclass::setSoundMasterVol(int16 vol) {
 	SoundMasterVol = vol;
 }
 
-void ailclass::setChannelVol(uint8 channel, uint8 vol) {
-	channel &= 3;
-	channel += 4;
-
-	warning("STUB: ailclass::setChannelVol()");
-#if 0
-	if (SoundEnable)
-		AIL_set_sample_volume(smp[channel], vol);
-#endif
-}
-
-void ailclass::setStereoPos(int16 channel, int16 pos) {
-	channel &= 7;
-	channel += 4;
-	pos &= 127;
-
-	warning("STUB: ailclass::setStereoPos()");
-#if 0
-	if (SoundEnable) {
-		StereoPos[channel] = pos;
-		AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
-	}
-#endif
-}
-
 void ailclass::disableSound() {
 	SoundEnable = false;
 }
@@ -459,20 +347,6 @@ void ailclass::getMusicInfo(musik_info *mi) {
 	mi->cur_pattnr = PatPointer;
 }
 
-void ailclass::getChannelInfo(channel_info *ch, int16 channel) {
-	warning("STUB: ailclass::getChannelInfo()");
-
-#if 0
-	ch->finetune = Instrument[channel].finetune;
-	ch->volume = Instrument[channel].insvol;
-	ch->repstart = Instrument[channel].repstart;
-	ch->replen = Instrument[channel].replen;
-	ch->len = Instrument[channel].laenge;
-	ch->pointer = (dword)Sample[channel];
-	ch->pos = AIL_sample_position(smp[channel]);
-#endif
-}
-
 int16 ailclass::musicPlaying() {
 	return MusicStatus;
 }
@@ -500,64 +374,6 @@ void ailclass::initNoteTable(uint16 sfreq) {
 	}
 }
 
-void ailclass::playVoc(byte *anf_adr, int16 channel, int16 vol, int16 rep) {
-	warning("STUB: ailclass::playVoc()");
-
-#if 0
-	byte *vptr = 0;
-	byte blockt;
-	byte freq = 0;
-	dword blocklen;
-	uint16 RealFrq;
-	if (SoundEnable) {
-		vptr = (byte *)anf_adr;
-		vol = (vol << 1) & 127;
-		channel &= 3;
-		channel += 4;
-		while (*vptr != 0) {
-			blockt = *vptr++;
-			if (blockt > 7)
-				blockt = 8;
-			blocklen = (uint32) * vptr++;
-			blocklen += ((uint32) * vptr++) << 8;
-			blocklen += ((uint32) * vptr++) << 16;
-			if (blockt == 1) {
-				freq = vptr[0];
-				RealFrq = 1000000 / (256 - freq);
-				AIL_init_sample(smp[channel]);
-				AIL_set_sample_type(smp[channel], DIG_F_MONO_8, 0);
-				AIL_set_sample_address(smp[channel], vptr + 2, blocklen);
-				AIL_set_sample_playback_rate(smp[channel], RealFrq);
-				AIL_set_sample_volume(smp[channel], vol);
-				AIL_set_sample_loop_count(smp[channel], rep);
-				AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
-				AIL_start_sample(smp[channel]);
-			}
-			vptr += blocklen;
-		}
-	}
-#endif
-}
-
-void ailclass::playRaw(int16 channel, char *sp, uint32 len, uint16 frequency, int16 volume, int16 rep) {
-	warning("STUB: ailclass::playRaw()");
-
-#if 0
-	channel &= 3;
-	channel += 4;
-	if (SoundEnable) {
-		AIL_init_sample(smp[channel]);
-		AIL_set_sample_type(smp[channel], DIG_F_MONO_8, 0);
-		AIL_set_sample_address(smp[channel], sp, len);
-		AIL_set_sample_playback_rate(smp[channel], frequency);
-		AIL_set_sample_volume(smp[channel], volume);
-		AIL_set_sample_loop_count(smp[channel], rep);
-		AIL_set_sample_pan(smp[channel], (byte)StereoPos[channel]);
-		AIL_start_sample(smp[channel]);
-	}
-#endif
-}
-
 void ailclass::stopSound() {
 	warning("STUB: ailclass::stopSound()");
 
@@ -568,16 +384,6 @@ void ailclass::stopSound() {
 #endif
 }
 
-void ailclass::continueSound() {
-	warning("STUB: ailclass::continueSound()");
-
-#if 0
-	int16 i;
-	for (i = 4; i < 8; i++)
-		AIL_resume_sample(smp[i]);
-#endif
-}
-
 void ailclass::endSound() {
 	warning("STUB: ailclass::endSound()");
 
@@ -588,92 +394,6 @@ void ailclass::endSound() {
 #endif
 }
 
-void ailclass::stopSample(int16 channel) {
-	warning("STUB: ailclass::stopSample()");
-
-#if 0
-	channel &= 3;
-	channel += 4;
-	AIL_stop_sample(smp[channel]);
-#endif
-}
-
-void ailclass::continueSample(int16 channel) {
-	warning("STUB: ailclass::continueSample()");
-
-#if 0
-	channel &= 3;
-	channel += 4;
-	AIL_resume_sample(smp[channel]);
-#endif
-}
-
-void ailclass::endSample(int16 channel) {
-	warning("STUB: ailclass::endSample()");
-
-#if 0
-	channel &= 3;
-	channel += 4;
-	AIL_end_sample(smp[channel]);
-#endif
-}
-
-void ailclass::initDoubleBuffer(byte *b1, byte *b2, uint32 len, int16 channel) {
-	channel &= 3;
-	channel += 4;
-	Dbuffer[channel][0] = b1;
-	Dbuffer[channel][1] = b2;
-	DbufferLen[channel] = len;
-}
-
-void ailclass::startDbVoc(Stream *v, int16 channel, int16 vol) {
-	Common::SeekableReadStream *src = dynamic_cast<Common::SeekableReadStream *>(v);
-	assert(src);
-
-	src->seek(-ChunkHead::SIZE(), SEEK_CUR);
-	ChunkHead ch;
-	if (!ch.load(src))
-		error("Error loading speech");
-
-	Common::SeekableReadStream *rs = src->readStream(ch.size);
-	playSpeech(channel, rs);
-}
-
-void ailclass::serveDbSamples() {
-	debug(1, "STUB: ailclass::serveDbSamples()");
-
-#if 0
-	int16 i;
-	int16 BufNr;
-	dword len;
-	for (i = 4; (i < 8) && (!modul); i++) {
-		if (DbSampleLen[i] != 0) {
-			BufNr = AIL_sample_buffer_ready(smp[i]);
-			if (BufNr != -1) {
-				if (DbSampleLen[i] > DbufferLen[i]) {
-					len = DbufferLen[i];
-					DbSampleLen[i] -= DbufferLen[i];
-				} else {
-					len = DbSampleLen[i];
-					DbSampleLen[i] = 0;
-				}
-				if (!chewy_fread(Dbuffer[i][BufNr], len, 1, DbufferHandles[i])) {
-					modul = DATEI;
-					fcode = READFEHLER;
-				} else
-					AIL_load_sample_buffer(smp[i], BufNr, Dbuffer[i][BufNr], len);
-			}
-		} else if (DbufferHandles[i]) {
-			BufNr = AIL_sample_buffer_ready(smp[i]);
-			if (BufNr != -1) {
-				AIL_load_sample_buffer(smp[i], BufNr, Dbuffer[i][BufNr], 0);
-				DbufferHandles[i] = 0;
-			}
-		}
-	}
-#endif
-}
-
 void mod_irq() {
 	if (!InInterrupt) {
 		++InInterrupt;
@@ -903,9 +623,4 @@ void ailclass::switchSound(bool onOff) {
 		SoundSwitch = onOff;
 }
 
-void serve_speech() {
-	if (flags.InitSound && _G(spieler).SpeechSwitch)
-		ailsnd->serveDbSamples();
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index c769f233433..79ee421fa6d 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -32,42 +32,7 @@ void checkSampleEnd();
 void DecodePatternLine();
 void DecodeChannel(int16 ch);
 
-class ailScummVM {
-private:
-	Audio::Mixer *_mixer;
-	Audio::SoundHandle _soundHandles[2];
-public:
-	ailScummVM();
-
-	/**
-	 * Plays a VOC file from the passed stream, and takes
-	 * responsibility for freeing it when done
-	 */
-	void playSpeech(int channel, Common::SeekableReadStream *src);
-
-	/**
-	 * Returns true if one of the two speech channels are
-	 * currently playing
-	 */
-	bool isSpeechActive(int channel = 0) const;
-
-	/**
-	 * Helper method to wait until any playing speech is finished
-	 */
-	void waitForSpeechToFinish();
-
-	/**
-	 * Returns true if subtitles are enabled
-	 */
-	bool hasSubtitles();
-
-	/**
-	 * Returns true if speech is muted
-	 */
-	bool isSpeechMuted();
-};
-
-class ailclass : public ailScummVM {
+class ailclass {
 public:
 	ailclass();
 	~ailclass();
@@ -78,12 +43,9 @@ public:
 
 	void setMusicMasterVol(int16 vol);
 	void setSoundMasterVol(int16 vol);
-	void setStereoPos(int16 channel, int16 pos);
-	void setChannelVol(uint8 channel, uint8 vol);
 	void disableSound();
 
 	void getMusicInfo(musik_info *mi);
-	void getChannelInfo(channel_info *mi, int16 channel);
 	int16 musicPlaying();
 	int16 getSampleStatus(int16 channel);
 
@@ -99,24 +61,13 @@ public:
 	void fadeIn(uint16 delay);
 	void fadeOut(uint16 delay);
 
-	void playVoc(byte *anf_adr, int16 channel, int16 vol, int16 rep);
-	void playRaw(int16 channel, char *voc, uint32 len, uint16 frequency, int16 volume, int16 rep);
 	void endSound();
 	void stopSound();
-	void continueSound();
-	void stopSample(int16 channel);
-	void continueSample(int16 channel);
-	void endSample(int16 channel);
-	void initDoubleBuffer(byte *b1, byte *b2, uint32 len, int16 channel);
 
-	void startDbVoc(Stream *voc, int16 channel, int16 vol);
-	void serveDbSamples();
 	void switchMusic(bool onOff);
 	void switchSound(bool onOff);
 };
 
-extern void serve_speech();
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index eea782411b3..2193aa9e267 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -25,6 +25,7 @@
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -88,7 +89,6 @@ atdsys::atdsys() {
 	atdsv.Display = DISPLAY_TXT;
 	atdsv.DiaNr = -1;
 	atdsv.aad_str = 0;
-	atdsv.SpeechHandle = nullptr;
 	atdsv.VocNr = -1;
 	ssret.Next = false;
 	ssr = &ssret;
@@ -133,7 +133,7 @@ void atdsys::updateSoundSettings() {
 
 	if (_hasSpeech) {
 		// TODO: In the future, properly implement DISPLAY_ALL
-		if (!ailsnd->isSpeechMuted())
+		if (!g_engine->_sound->isSpeechMuted())
 			atdsv.Display = DISPLAY_VOC;
 	}
 }
@@ -312,10 +312,6 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	return handle;
 }
 
-void atdsys::set_speech_handle(Stream *stream) {
-	atdsv.SpeechHandle = stream;
-}
-
 void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead Ch;
@@ -968,22 +964,14 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 #ifndef SCRIPT
 			else if (atdsv.Display == DISPLAY_VOC) {
 				if (atdsv.VocNr != aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
-					if (atdsv.SpeechHandle) {
-						atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
-						if (atdsv.VocNr != -1) {
-							mem->file->select_pool_item(atdsv.SpeechHandle, atdsv.VocNr);
-
-							int16 vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
-							             _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
-							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
-							ailsnd->startDbVoc(atdsv.SpeechHandle, 0, 63);
-							ailsnd->setStereoPos(0, get_stereo_pos(vocx));
-							aadv.DelayCount = 1;
-						}
-					} else {
-						error("Error reading from sprachausgabe.tvp");
-					}
+					atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
+					g_engine->_sound->playSpeech(atdsv.VocNr);
+					int16 vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
+								 _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
+					g_engine->_sound->setSoundChannelBalance(0, getStereoPos(vocx));
+					aadv.DelayCount = 1;
 				}
+
 				for (int16 i = 0; i < ssr->Anz; i++) {
 					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
 				}
@@ -1370,7 +1358,10 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 	return txt_nr;
 }
 
-int16 atdsys::get_stereo_pos(int16 x) {
+int16 atdsys::getStereoPos(int16 x) {
+	// TODO: Convert to ScummVM's balance (-127 ... 0 ... 127)
+	return 0;
+#if 0
 	float fx_ = (float)x;
 
 	fx_ /= 2.5;
@@ -1378,6 +1369,7 @@ int16 atdsys::get_stereo_pos(int16 x) {
 		fx_ += 1.0;
 
 	return (int16)fx_;
+#endif
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 13ad86ba43a..0505e86d6a5 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -119,8 +119,6 @@ struct AtdsVar {
 	int16 _field12 = 0;
 	int16 VocNr = 0;
 
-	Stream *SpeechHandle = nullptr;
-
 	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) = nullptr;
 };
 
@@ -270,7 +268,6 @@ public:
 	void save_ads_header(int16 dia_nr);
 
 	Stream *pool_handle(const char *fname, const char *fmode);
-	void set_speech_handle(Stream *speech_handle);
 	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, const char *fmode, int16 mode);
 	void close_handle(int16 mode);
@@ -312,7 +309,7 @@ public:
 	int16 start_ads_auto_dia(char *item_adr);
 	int16 check_item(int16 block_nr, int16 item_nr);
 	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
-	int16 get_stereo_pos(int16 x);
+	int16 getStereoPos(int16 x);
 	void set_unknown(bool nr) {
 		atdsv._field12 = nr;
 	}
diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 19208bbde95..738fb8bffc7 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -283,29 +283,6 @@ void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
 	}
 }
 
-uint32 datei::load_voc(Stream *handle, byte *speicher) {
-	ChunkHead *ch = (ChunkHead *)tmp;
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-
-	if (rs) {
-		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
-
-		if (!ch->load(rs)) {
-			error("load_voc error");
-		} else {
-			if (ch->type == VOCDATEI) {
-				if (rs->read(speicher, ch->size) != ch->size) {
-					error("load_voc error");
-				}
-			} else {
-				error("load_voc error");
-			}
-		}
-	}
-
-	return ch->size;
-}
-
 void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	strncpy(filename, fname, MAXPATH - 1);
 	filename[MAXPATH - 1] = '\0';
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 4518a4031f2..775313f9cd3 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -179,7 +179,6 @@ enum SetupScreenMode {
 #define INV_USE_IDX "txt/inv_use.idx"
 
 #define DETAIL_TVP "sound/details.tap"
-#define SPEECH_TVP "sound/speech.tvp"
 
 #define ADSH_TMP "adsh.tmp"
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 43e876c9f56..a6fc08215b9 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -22,6 +22,7 @@
 #include "chewy/detail.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -480,24 +481,18 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 			} else
 				out->scale_set(rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
+			Sound *sound = g_engine->_sound;
+
 			for (int16 k = 0; k < MAX_SOUNDS; k++) {
-				int16 sound_effect = adiptr->sfx.sound_index[k];
-				if ((adiptr->sfx.sound_enable[k]) && (sound_effect != -1) &&
-				        (rdi.sample[sound_effect])) {
+				int16 soundEffect = adiptr->sfx.sound_index[k];
+				if ((adiptr->sfx.sound_enable[k]) && (soundEffect != -1) &&
+				        (rdi.sample[soundEffect])) {
 					if ((adiptr->sfx.sound_start[k] == adiptr->ani_count) &&
 					        (!adiptr->delay_count)) {
-#ifdef AIL
-						ailsnd->setStereoPos(adiptr->sfx.kanal[k],
-						                       adiptr->sfx.stereo[k]);
-						ailsnd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
-						                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
-#else
-#if 0
-						snd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
-						              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
-#endif
-						warning("STUB: detail::plot_ani_details()");
-#endif
+						const uint channel = adiptr->sfx.kanal[k] & 7;
+						sound->setSoundChannelBalance(channel, adiptr->sfx.stereo[k]);
+						sound->setSoundChannelVolume(channel, adiptr->sfx.volume[k]);
+						sound->playSound(soundEffect, channel,	adiptr->sfx.repeats[k]);
 					}
 				}
 			}
@@ -645,23 +640,17 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 	if (mode)
 		out->sprite_set(spr_info.Image, spr_info.X, spr_info.Y, 0);
 
+	Sound *sound = g_engine->_sound;
+
 	for (int16 k = 0; k < MAX_SOUNDS; k++) {
-		int16 sound_effect = adiptr->sfx.sound_index[k];
-		if ((adiptr->sfx.sound_enable[k] != false) && (sound_effect != -1) &&
-		        (rdi.sample[sound_effect])) {
+		int16 soundEffect = adiptr->sfx.sound_index[k];
+		if ((adiptr->sfx.sound_enable[k]) && (soundEffect != -1) &&
+		        (rdi.sample[soundEffect])) {
 			if (adiptr->sfx.sound_start[k] == spr_nr) {
-#ifdef AIL
-				ailsnd->setStereoPos(adiptr->sfx.kanal[k],
-				                       adiptr->sfx.stereo[k]);
-				ailsnd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
-				                 adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
-#else
-				warning("STUB: detail::plot_detail_sprite()");
-#if 0
-				snd->playVoc(rdi.sample[sound_effect], adiptr->sfx.kanal[k],
-				              adiptr->sfx.volume[k], adiptr->sfx.repeats[k]);
-#endif
-#endif
+				const uint channel = adiptr->sfx.kanal[k] & 7;
+				sound->setSoundChannelBalance(channel, adiptr->sfx.stereo[k]);
+				sound->setSoundChannelVolume(channel, adiptr->sfx.volume[k]);
+				sound->playSound(soundEffect, channel, adiptr->sfx.repeats[k]);
 			}
 		}
 	}
@@ -697,156 +686,37 @@ void detail::set_sound_area(byte *buffer, uint32 size) {
 	SoundBufferSize = size;
 }
 
-void detail::load_room_sounds(Stream *tvp_handle) {
-	if (tvp_handle) {
-		byte *workbuf = SoundBuffer;
-		int16 break_flag = false;
-
-		if (workbuf) {
-			for (int16 i = 0; i < MAXDETAILS * MAX_SOUNDS; i++)
-				rdi.sample[i] = nullptr;
-
-			uint32 allsize = 0;
-			for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (break_flag == false); i++) {
-				int16 index = rdi.tvp_index[i];
-				if ((index != -1) && (rdi.sample[i] == NULL)) {
-					mem->file->select_pool_item(tvp_handle, index);
-					uint32 size = mem->file->load_voc(tvp_handle, workbuf);
-
-					if (!modul) {
-						rdi.sample[i] = workbuf;
-						workbuf += size;
-						allsize += size;
-					} else {
-						break_flag = true;
-					}
-
-					if (allsize > SoundBufferSize) {
-						error("load_room_sounds error");
-					}
-				}
-			}
-		}
-	} else {
-		error("load_room_sounds error");
-	}
-}
-
-void detail::set_sound_para(int16 nr, sound_def_blk *sdb_src) {
-	sound_def_blk *sdb_dest = &rdi.Ainfo[nr].sfx;
-	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
-}
-
-void detail::get_sound_para(int16 nr, sound_def_blk *sdb_dest) {
-	sound_def_blk *sdb_src = &rdi.Ainfo[nr].sfx;
-	memcpy(sdb_dest, sdb_src, sizeof(sound_def_blk));
-}
-
-void detail::map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
-	remove_unused_samples();
-
-	bool found = false;
-	if (sdb->sound_index[sslot] != -1) {
-		for (int16 i = 0; (i < MAXDETAILS) && (!found); i++) {
-			for (int16 j = 0; (j < MAX_SOUNDS) && (!found); j++)
-				if ((rdi.Ainfo[i].sfx.sound_index[j] == sdb->sound_index[sslot]) &&
-				        (i != nr) && (j != sslot))
-					found = true;
-		}
-
-		if (!found) {
-			rdi.tvp_index[sdb->sound_index[sslot]] = -1;
-			sdb->sound_index[sslot] = -1;
-		}
-	}
-
-	found = false;
-	for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
-		if (rdi.tvp_index[i] == tvp_index) {
-			found = true;
-			sdb->sound_index[sslot] = i;
-		}
-	}
-
-	for (int16 i = 0; (i < MAXDETAILS * MAX_SOUNDS) && (!found); i++) {
-		if (rdi.tvp_index[i] == -1) {
-			found = true;
-			sdb->sound_index[sslot] = i;
-			rdi.tvp_index[i] = tvp_index;
-		}
-	}
-}
-
-void detail::disable_sound(int16 nr, int16 sslot) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
-	sdb->sound_enable[sslot] = 0;
-	ailsnd->endSample(sdb->kanal[sslot]);
-}
-
-void detail::enable_sound(int16 nr, int16 sslot) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
-	sdb->sound_enable[sslot] = 1;
-}
-
-void detail::play_sound(int16 nr, int16 sslot) {
-	warning("STUB: detail::play_sound()");
-#if 0
-	sound_def_blk *sdb;
-	sdb = &rdi.Ainfo[nr].sfx;
-	if ((sdb->sound_enable[sslot] != FALSE) && (sdb->sound_index[sslot] != -1) &&
-	        (rdi.sample[sdb->sound_index[sslot]])) {
-#ifdef AIL
-		ailsnd->setStereoPos(sdb->kanal[sslot], sdb->stereo[sslot]);
-		ailsnd->playVoc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
-		                 sdb->volume[sslot], sdb->repeats[sslot]);
-#else
-		snd->playVoc(rdi.sample[sdb->sound_index[sslot]], sdb->kanal[sslot],
-		              sdb->volume[sslot], sdb->repeats[sslot]);
-#endif
-	}
-#endif
-}
-
 void detail::disable_detail_sound(int16 nr) {
 	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
-		sdb->sound_enable[i] = 0;
+		sdb->sound_enable[i] = false;
 }
 
 void detail::enable_detail_sound(int16 nr) {
 	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		if (sdb->sound_index[i] != -1)
-			sdb->sound_enable[i] = 1;
+			sdb->sound_enable[i] = true;
 }
 
 void detail::play_detail_sound(int16 nr) {
-	warning("STUB: detail::play_detail_sound()");
-#if 0
-	sound_def_blk *sdb;
-	int16 k;
-	sdb = &rdi.Ainfo[nr].sfx;
-	for (k = 0; k < MAX_SOUNDS; k++) {
-		if ((sdb->sound_enable[k] != FALSE) && (sdb->sound_index[k] != -1) &&
+	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	Sound *sound = g_engine->_sound;
+	for (int16 k = 0; k < MAX_SOUNDS; k++) {
+		if ((sdb->sound_enable[k]) && (sdb->sound_index[k] != -1) &&
 		        (rdi.sample[sdb->sound_index[k]])) {
-#ifdef AIL
-			ailsnd->setStereoPos(sdb->kanal[k], sdb->stereo[k]);
-			ailsnd->playVoc(rdi.sample[sdb->sound_index[k]], sdb->kanal[k],
-			                 sdb->volume[k], sdb->repeats[k]);
-#else
-			snd->playVoc(rdi.sample[sound_effect], sdb->kanal[k],
-			              sdb->volume[k], sdb->repeats[k]);
-#endif
+			const uint channel = sdb->kanal[k] & 7;
+			sound->setSoundChannelBalance(channel, sdb->stereo[k]);
+			sound->setSoundChannelVolume(channel, sdb->volume[k]);
+			sound->playSound(sdb->sound_index[k], channel, sdb->repeats[k]);
 		}
 	}
-#endif
 }
 
 void detail::clear_detail_sound(int16 nr) {
 	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	for (short i = 0; i < MAX_SOUNDS; i++) {
-		sdb->sound_enable[i] = 0;
+		sdb->sound_enable[i] = false;
 		sdb->sound_index[i] = -1;
 		sdb->sound_start[i] = 0;
 		sdb->kanal[i] = 0;
@@ -872,7 +742,7 @@ void detail::clear_room_sound() {
 	for (int16 j = 0; j < MAXDETAILS; j++) {
 		sound_def_blk *sdb = &rdi.Ainfo[j].sfx;
 		for (int16 i = 0; i < MAX_SOUNDS; i++) {
-			sdb->sound_enable[i] = 0;
+			sdb->sound_enable[i] = false;
 			sdb->sound_index[i] = -1;
 			sdb->sound_start[i] = 0;
 			sdb->kanal[i] = 0;
@@ -886,15 +756,6 @@ void detail::clear_room_sound() {
 		rdi.sample[i] = nullptr;
 	}
 }
-#ifdef DETEDIT
-
-void detail::shadow_room(int16 mode) {
-	if (mode == SAVE_ROOM)
-		memcpy(&rdi_shadow, &rdi, sizeof(room_detail_info));
-	else
-		memcpy(&rdi, &rdi_shadow, sizeof(room_detail_info));
-}
-#endif
 
 void detail::remove_unused_samples() {
 	bool found = false;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index e6d4fd71578..c67803ccb39 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -75,7 +75,7 @@ struct SprInfo {
 };
 
 struct sound_def_blk {
-	int16 sound_enable[MAX_SOUNDS];
+	bool sound_enable[MAX_SOUNDS];
 	int16 sound_index[MAX_SOUNDS];
 	int16 sound_start[MAX_SOUNDS];
 	int16 kanal[MAX_SOUNDS];
@@ -252,13 +252,6 @@ public:
 	                      int16 scrx, int16 scry);
 
 	void set_sound_area(byte *buffer, uint32 size);
-	void load_room_sounds(Stream *tvp_handle);
-	void get_sound_para(int16 nr, sound_def_blk *sdb_dest);
-	void set_sound_para(int16 nr, sound_def_blk *sdb_src);
-	void map_tvp2sound(int16 nr, int16 sslot, int16 tvp_index);
-	void disable_sound(int16 nr, int16 sslot);
-	void enable_sound(int16 nr, int16 sslot);
-	void play_sound(int16 nr, int16 sslot);
 	void disable_detail_sound(int16 nr);
 	void enable_detail_sound(int16 nr);
 	void clear_detail_sound(int16 nr);
@@ -266,9 +259,6 @@ public:
 	void disable_room_sound();
 	void enable_room_sound();
 	void clear_room_sound();
-#ifdef DETEDIT
-	void shadow_room(int16 mode);
-#endif
 	void set_taf_ani_mem(byte *load_area);
 	void load_sprite_pointer(Stream *stream);
 
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 6db28291c1a..6fce4bb2c98 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -25,6 +25,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/flic.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -615,39 +616,31 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 		case PLAY_VOC:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
-			} else
-#ifndef AIL
-				snd->playVoc(sounds[para[0]], para[1], para[2], para[3]);
-#else
-				if (para[3] == 255)
-					para[3] = 0;
-				else
-					para[3] += 1;
-			ailsnd->playVoc(sounds[para[0]], para[1], para[2], para[3]);
-#endif
-
+			} else {
+				uint16 number = para[0];
+				uint16 channel = para[1];
+				uint16 volume = para[2] * Audio::Mixer::kMaxChannelVolume / 63;
+				uint16 repeat = para[3];
+				assert(number < MAX_SOUND_EFFECTS);
+
+				Chewy::Sound *sound = g_engine->_sound;
+				sound->setSoundVolume(volume);
+				sound->playSound(sounds[number], Ssize[number], channel, repeat, DisposeAfterUse::NO);
+			}
 			break;
 
 		case SET_SVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
 			} else
-#ifndef AIL
-				snd->setSoundMasterVol(para[0]);
-#else
-				ailsnd->setSoundMasterVol(para[0]);
-#endif
+				g_engine->_sound->setSoundVolume(para[0]);
 			break;
 
 		case SET_CVOL:
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
 			} else
-#ifndef AIL
-				snd->setChannelVol((byte)para[0], (byte)para[1]);
-#else
-				ailsnd->setChannelVol((byte)para[0], (byte)para[1]);
-#endif
+				g_engine->_sound->setSoundChannelVolume(para[0], para[1]);
 			break;
 
 		case FREE_EFFECT:
@@ -683,9 +676,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
 			} else
-#ifdef AIL
-				ailsnd->setStereoPos(para[0], para[1]);
-#endif
+				g_engine->_sound->setSoundChannelBalance(para[0], para[1]);
 			break;
 
 		case SET_SPEED:
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index fdb4bab0388..42cae34130c 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -363,11 +363,8 @@ SplitStringInit ssi[AAD_MAX_PERSON] = {
 int16 frequenz;
 int16 CurrentSong = -1;
 bool savegameFlag;
-Stream *voc_handle;
 Stream *music_handle;
 int16 EndOfPool;
-Stream *speech_handle;
-byte *SpeechBuf[2];
 int timer_action_ctr;
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 2773713e3c9..c21a44b9224 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -270,11 +270,8 @@ extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
 
 extern int16 frequenz;
-extern Stream *voc_handle;
 extern Stream *music_handle;
 extern int16 EndOfPool;
-extern Stream *speech_handle;
-extern byte *SpeechBuf[2];
 extern int16 CurrentSong;
 extern bool savegameFlag;
 extern int timer_action_ctr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 3b380949d6c..c86ae9a6166 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -407,10 +407,9 @@ void sound_init() {
 		ailsnd->switchSound(true);
 		flags.InitSound = true;
 
-		voc_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+		music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
-		music_handle = room->get_sound_handle();
 		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
 		assert(rs);
 
@@ -423,22 +422,11 @@ void sound_init() {
 			EndOfPool = Nph.PoolAnz - 1;
 		}
 
-		speech_handle = chewy_fopen(SPEECH_TVP, "rb");
-		if (!speech_handle) {
-			error("Error opening speech.tvp");
-		} else {
-			ailsnd->initDoubleBuffer(SpeechBuf[0], SpeechBuf[1], SPEECH_HALF_BUF, 0);
-			atds->set_speech_handle(speech_handle);
-
-			atds->setHasSpeech(true);
-			_G(spieler).DisplayText = false;
-		}
-
-		if (!modul) {
-			_G(spieler).SoundSwitch = true;
-			_G(spieler).MusicSwitch = true;
-			_G(spieler).SpeechSwitch = true;
-		}
+		atds->setHasSpeech(true);
+		_G(spieler).DisplayText = false;
+		_G(spieler).SoundSwitch = true;
+		_G(spieler).MusicSwitch = true;
+		_G(spieler).SpeechSwitch = true;
 	}
 }
 
@@ -446,8 +434,6 @@ void sound_exit() {
 	if (detect.SoundSource && flags.InitSound) {
 		ailsnd->exitMixMode();
 		ailsnd->exit1();
-		if (speech_handle)
-			chewy_fclose(speech_handle);
 	}
 }
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 3519224f90e..adbc3fc2afe 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -107,8 +107,6 @@ void alloc_buffers() {
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
 	Ci.SoundSlot = (byte *)MALLOC(SOUND_SLOT_SIZE);
 	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
-	SpeechBuf[0] = (byte *)MALLOC(SPEECH_HALF_BUF * 2);
-	SpeechBuf[1] = SpeechBuf[0] + SPEECH_HALF_BUF;
 }
 
 void free_buffers() {
@@ -123,7 +121,6 @@ void free_buffers() {
 	free((char *)chewy);
 
 	free((char *)curtaf);
-	free(SpeechBuf[0]);
 	free(Ci.SoundSlot);
 	free(Ci.MusicSlot);
 	free(Ci.TempArea);
@@ -553,8 +550,6 @@ void set_up_screen(SetupScreenMode mode) {
 	if (isMainLoop)
 		mode = DO_SETUP;
 
-	if (flags.InitSound && _G(spieler).SpeechSwitch)
-		ailsnd->serveDbSamples();
 	uhr->calc_timer();
 
 	if (ani_timer[0].TimeFlag) {
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 01767731742..d9440a06c73 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -97,7 +97,7 @@ void timer_action(int16 t_nr) {
 	int16 ani_nr = t_nr - room->room_timer.TimerStart;
 	bool default_flag = false;
 
-	if (ailsnd->isSpeechActive())
+	if (g_engine->_sound->isSpeechActive())
 		return;
 
 #define TIMER(NUM) case NUM: Room##NUM::timer(t_nr, ani_nr); break;
@@ -356,7 +356,7 @@ void enter_room(int16 eib_nr) {
 		Room17::entry();
 		if (_G(spieler).SoundSwitch) {
 			if (!_G(spieler).R17EnergieOut)
-				det->play_sound(15, 0);
+				g_engine->_sound->playSound(15);
 		}
 		break;
 
@@ -369,7 +369,7 @@ void enter_room(int16 eib_nr) {
 	case 24:
 		Room24::entry();
 		if (_G(spieler).SoundSwitch)
-			det->play_sound(17, 0);
+			g_engine->_sound->playSound(17);
 		break;
 
 	ENTRY(25);
@@ -796,7 +796,6 @@ void print_rows(int16 id) {
 int16 flic_user_function(int16 keys) {
 	int ret;
 
-	serve_speech();
 	if (atds->aad_get_status() != -1) {
 		switch (flic_val1) {
 		case 579:
@@ -952,9 +951,7 @@ static void flic_proc1() {
 		atds->print_aad(254, 0);
 
 		if (flags.InitSound && _G(spieler).SpeechSwitch) {
-			while (ailsnd->isSpeechActive() && !SHOULD_QUIT) {
-				ailsnd->serveDbSamples();
-			}
+			g_engine->_sound->waitForSpeechToFinish();
 		} else {
 			delay(6000);
 		}
@@ -1781,14 +1778,13 @@ void flic_cut(int16 nr, int16 mode) {
 		error("flic_cut error");
 	}
 
-	ailsnd->endSound();
+	g_engine->_sound->stopSound();
 	g_events->delay(50);
 	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
 	ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
-		room->load_sound();
 
 		if (_G(spieler).SpeechSwitch)
 			det->enable_room_sound();
@@ -2030,11 +2026,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_TUERKNOPF_R18:
 		if (_G(spieler).R18DoorBruecke) {
-			det->disable_sound(19, 0);
-			det->enable_sound(19, 1);
+			g_engine->_sound->stopSound(0);
+			g_engine->_sound->playSound(19, 1);
 		} else {
-			det->enable_sound(19, 0);
-			det->disable_sound(19, 1);
+			g_engine->_sound->playSound(19, 0);
+			g_engine->_sound->stopSound(1);
 		}
 
 		if (!_G(spieler).R6DoorLeftF) {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 8725761a34f..a4118d843e5 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -119,7 +119,6 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 	clear_prog_ani();
 	det->load_rdi(Rb->DetFile, room_nr);
-	load_sound();
 
 	if (player->SoundSwitch == false)
 		det->disable_room_sound();
@@ -451,18 +450,6 @@ void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
 	}
 }
 
-void Room::load_sound() {
-	if (!modul && flags.InitSound) {
-		det->load_room_sounds(roomhandle[R_VOCDATEI]);
-	}
-}
-
-Stream *Room::get_sound_handle() {
-	return (modul || !flags.InitSound) ? nullptr :
-		roomhandle[R_VOCDATEI];
-}
-
-
 void load_chewy_taf(int16 taf_nr) {
 	if (AkChewyTaf != taf_nr) {
 		if (chewy) {
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 26806f0b1e5..d58cf4ec1d1 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -96,9 +96,6 @@ public:
 	void load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr);
 
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
-	void load_sound();
-
-	Stream *get_sound_handle();
 
 	byte *get_ablage(int16 nr);
 
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index c62b8cda10a..e4b5617ba4a 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room0.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -205,15 +206,15 @@ void Room0::eyeStart(EyeMode mode) {
 	flags.AniUserAction = true;
 
 	if (mode == EYE_START) {
-		det->enable_sound(FLAP_DETAIL, 0);
-		det->disable_sound(FLAP_DETAIL, 1);
-		det->enable_sound(SCHLAUCH_DETAIL, 0);
-		det->disable_sound(SCHLAUCH_DETAIL, 2);
+		g_engine->_sound->playSound(FLAP_DETAIL, 0, false);
+		g_engine->_sound->stopSound(1);
+		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 0, false);
+		g_engine->_sound->stopSound(2);
 	} else {
-		det->disable_sound(FLAP_DETAIL, 0);
-		det->enable_sound(FLAP_DETAIL, 1);
-		det->disable_sound(SCHLAUCH_DETAIL, 0);
-		det->enable_sound(SCHLAUCH_DETAIL, 2);
+		g_engine->_sound->stopSound(1);
+		g_engine->_sound->playSound(FLAP_DETAIL, 1, false);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 2, false);
 	}
 
 	while (!ende) {
@@ -477,15 +478,15 @@ void Room0::feederStart(int16 mode) {
 
 	if (!mode) {
 		trapDoorOpen();
-		det->enable_sound(FLAP_DETAIL, 0);
-		det->disable_sound(FLAP_DETAIL, 1);
-		det->enable_sound(FUETTER_SCHLAUCH, 0);
-		det->disable_sound(FUETTER_SCHLAUCH, 2);
+		g_engine->_sound->playSound(FLAP_DETAIL, 0);
+		g_engine->_sound->stopSound(1);
+		g_engine->_sound->playSound(FUETTER_SCHLAUCH, 0);
+		g_engine->_sound->stopSound(2);
 	} else {
-		det->disable_sound(FLAP_DETAIL, 0);
-		det->enable_sound(FLAP_DETAIL, 1);
-		det->disable_sound(FUETTER_SCHLAUCH, 0);
-		det->enable_sound(FUETTER_SCHLAUCH, 2);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->playSound(FLAP_DETAIL, 1);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->playSound(FUETTER_SCHLAUCH, 2);
 	}
 
 	ende = false;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 0ecb387b8c6..a9ff1d4d414 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -301,7 +301,6 @@ int16 Room12::cut_serv(int16 frame) {
 	if (frame == 43)
 		start_aad(106, 0);
 
-	serve_speech();
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index e42fa94a326..592f4c3fb09 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room17.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -291,7 +292,7 @@ int16 Room17::energie_hebel() {
 		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
 		_G(spieler).R17EnergieOut ^= 1;
 		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
-		det->play_sound(12, 0);
+		g_engine->_sound->playSound(12);
 
 		if (!_G(spieler).R17EnergieOut) {
 			det->start_detail(1, 255, ANI_VOR);
@@ -302,13 +303,13 @@ int16 Room17::energie_hebel() {
 
 		atds->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
 		atds->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
-		det->play_sound(12, 0);
+		g_engine->_sound->playSound(12);
 
 		if (_G(spieler).R17EnergieOut) {
-			det->disable_sound(15, 0);
+			g_engine->_sound->stopSound(0);
 		} else {
-			det->enable_sound(15, 0);
-			det->play_sound(15, 0);
+			g_engine->_sound->playSound(15, 0);
+			g_engine->_sound->playSound(15);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index ef0f4a0278b..36f07531302 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room24.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -92,16 +93,16 @@ void Room24::use_hebel(int16 txt_nr) {
 			_G(spieler).R24Hebel[1] == 0 &&
 			_G(spieler).R24Hebel[2] == 2) {
 		_G(spieler).R16F5Exit = true;
-		det->enable_sound(1, 0);
-		det->disable_sound(1, 1);
+		g_engine->_sound->playSound(1, 0);
+		g_engine->_sound->stopSound(1);
 		det->start_detail(1, 1, ANI_VOR);
 		det->show_static_spr(10);
 		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
 
 	} else if (_G(spieler).R16F5Exit) {
 		det->hide_static_spr(10);
-		det->enable_sound(1, 1);
-		det->disable_sound(1, 0);
+		g_engine->_sound->playSound(1, 1);
+		g_engine->_sound->stopSound(0);
 		det->start_detail(1, 1, ANI_RUECK);
 		_G(spieler).R16F5Exit = false;
 		atds->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
@@ -145,8 +146,8 @@ void Room24::calc_animation(int16 kristall_nr) {
 				ani_nr = 8;
 			}
 
-			det->enable_sound(ani_nr + kristall_nr * 4, 0);
-			det->disable_sound(5 + ani_nr + kristall_nr * 4, 0);
+			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
+			g_engine->_sound->stopSound(0);
 			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
@@ -159,8 +160,8 @@ void Room24::calc_animation(int16 kristall_nr) {
 				ani_nr = 8;
 			}
 
-			det->disable_sound(ani_nr + kristall_nr * 4, 0);
-			det->enable_sound(5 + ani_nr + kristall_nr * 4, 0);
+			g_engine->_sound->stopSound(0);
+			g_engine->_sound->playSound(5 + ani_nr + kristall_nr * 4, 0);
 			det->stop_detail(5 + kristall_nr * 4);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 5e41011425d..315b7bb4117 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room23.h"
 #include "chewy/rooms/room25.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -44,8 +45,8 @@ static const MovLine SURIMY_MPKT[2] = {
 
 void Room25::entry() {
 	if (!_G(spieler).R25GleiteLoesch) {
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 
 		for (int i = 0; i < 9; ++i)
 			det->start_detail(i, 255, ANI_VOR);
@@ -73,8 +74,8 @@ void Room25::entry() {
 		_G(spieler).R25FirstEntry = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, CFO_MODE);
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 		fx_blend = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -109,7 +110,7 @@ int16 Room25::gleiter_loesch() {
 			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			atds->set_ats_str(219, 1, ATS_DATEI);
 			atds->set_ats_str(187, 1, ATS_DATEI);
-			det->disable_sound(0, 0);
+			g_engine->_sound->stopSound(0);
 
 			for (int i = 0; i < 9; ++i)
 				det->stop_detail(i);
diff --git a/engines/chewy/rooms/room26.cpp b/engines/chewy/rooms/room26.cpp
index 10f92ea760e..7598fd6fc62 100644
--- a/engines/chewy/rooms/room26.cpp
+++ b/engines/chewy/rooms/room26.cpp
@@ -24,16 +24,17 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room26.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room26::entry() {
 	if (_G(spieler).R25GleiteLoesch) {
-		det->disable_sound(0, 0);
+		g_engine->_sound->stopSound(0);
 	} else {
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 	}
 }
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 03bbbf4c968..670c0b1a7c4 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room28.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -278,8 +279,7 @@ void Room28::set_pump() {
 				SetUpScreenFunc = nullptr;
 
 				if (flags.InitSound && _G(spieler).SpeechSwitch) {
-					while (ailsnd->isSpeechActive() && !SHOULD_QUIT)
-						set_up_screen(DO_SETUP);
+					g_engine->_sound->waitForSpeechToFinish();
 				}
 
 				start_aad_wait(177, -1);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 6e346b07a94..c8683be7fd0 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room31.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -96,7 +97,7 @@ void Room31::open_luke() {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = false;
-		det->play_sound(3, 0);
+		g_engine->_sound->playSound(3);
 		calc_luke();
 		show_cur();
 	}
@@ -108,7 +109,7 @@ void Room31::proc1() {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
-		det->play_sound(3, 0);
+		g_engine->_sound->playSound(3);
 		calc_luke();
 		show_cur();
 	}
@@ -194,8 +195,8 @@ void Room31::close_luke() {
 		auto_move(2, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
-		det->play_sound(3, 0);
-		det->play_sound(3, 1);
+		g_engine->_sound->playSound(3);
+		g_engine->_sound->playSound(3, 1, false);
 		calc_luke();
 		show_cur();
 	}
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 3830e741973..81b4490685b 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room37.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -194,7 +195,7 @@ int16 Room37::use_glas() {
 			start_aad_wait(146, -1);
 			show_cur();
 			flags.NoScroll = false;
-			det->play_sound(3, 0);
+			g_engine->_sound->playSound(3);
 		} else {
 			auto_move(4, P_CHEWY);
 		}
@@ -233,8 +234,8 @@ void Room37::dog_bell() {
 			det->show_static_spr(9);
 			start_ani_block(3, ABLOCK31);
 			det->set_static_ani(3, -1);
-			det->enable_sound(3, 0);
-			det->play_sound(3, 0);
+			g_engine->_sound->playSound(3, 0);
+			g_engine->_sound->playSound(3);
 			enable_timer();
 			dia_nr = 149;
 			ani_nr = CH_TALK12;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 20a27629f85..92cdfafd84a 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -380,7 +380,6 @@ int16 Room39::setup_func(int16 frame) {
 		}
 	}
 
-	serve_speech();
 	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (!_flag && atds->aad_get_status() == -1)
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 31a8f023ee4..5b0095362f7 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room4.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -66,13 +67,13 @@ int16 Room4::sonde_comp() {
 					--cur_x;
 				else
 					cur_x = 2;
-				det->play_sound(0, 1);
+				g_engine->_sound->playSound(0, 1, false);
 				break;
 
 			case 1:
 				ende = 1;
 				spr_nr = RAHMEN_GELB;
-				det->play_sound(0, 0);
+				g_engine->_sound->playSound(0);
 				break;
 
 			case 2:
@@ -80,7 +81,7 @@ int16 Room4::sonde_comp() {
 					++cur_x;
 				else
 					cur_x = 0;
-				det->play_sound(0, 2);
+				g_engine->_sound->playSound(0, 2, false);
 				break;
 
 			default:
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 66b9e8b2dc2..1d0f706b1ab 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -26,6 +26,7 @@
 #include "chewy/room.h"
 #include "chewy/rooms/room40.h"
 #include "chewy/rooms/room43.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -176,8 +177,7 @@ void Room40::move_train(int16 mode) {
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
 		det->show_static_spr(12);
 
-	det->enable_sound(7, 0);
-	det->play_sound(7, 0);
+	g_engine->_sound->playSound(7, 0);
 	int16 delay = 0;
 
 	while (ax < 560) {
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index ebffd5944d4..1f5e7cf69bd 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room41.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -38,7 +39,7 @@ void Room41::entry() {
 	hide_cur();
 
 	if (!_G(spieler).R41LolaOk) {
-		det->play_sound(6, 0);
+		g_engine->_sound->playSound(6);
 
 		if (!flags.LoadGame) {
 			room->set_timer_status(0, TIMER_STOP);
@@ -194,7 +195,7 @@ int16 Room41::use_lola() {
 		action_flag = true;
 		_G(spieler).R41LolaOk = true;
 		auto_move(4, P_CHEWY);
-		det->disable_sound(6, 0);
+		g_engine->_sound->stopSound(0);
 		flic_cut(FCUT_057, CFO_MODE);
 		set_person_pos(127, 112, P_CHEWY, P_LEFT);
 		det->stop_detail(6);
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index fb81a2161f0..e0cbca81fc7 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -25,13 +25,14 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room42.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room42::entry() {
 	if (!_G(spieler).R42BeamterWach) {
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0);
 		det->start_detail(0, 255, ANI_VOR);
 	}
 
@@ -43,7 +44,7 @@ void Room42::entry() {
 			_G(timer_nr)[0] = room->set_timer(8, 5);
 			det->set_static_ani(8, -1);
 			_G(spieler).R42BeamterWach = true;
-			det->disable_sound(0, 0);
+			g_engine->_sound->stopSound(0);
 
 			SetUpScreenFunc = setup_func;
 
@@ -192,7 +193,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 			break;
 
 		case 2:
-			det->play_sound(4, 0);
+			g_engine->_sound->playSound(4);
 			start_detail_wait(4, 13, ANI_VOR);
 			break;
 
@@ -210,7 +211,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		}
 
 		det->stop_detail(0);
-		det->disable_sound(0, 0);
+		g_engine->_sound->stopSound(0);
 		start_detail_wait(1, 1, ANI_VOR);
 		det->start_detail(2, 255, ANI_VOR);
 
@@ -221,8 +222,8 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 		det->stop_detail(2);
 		det->start_detail(0, 255, ANI_VOR);
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 	}
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 2ff6cd0d7f1..f2493a04234 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room43.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -34,7 +35,7 @@ void Room43::night_small() {
 	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stopMod();
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
@@ -56,7 +57,7 @@ void Room43::night_small() {
 	_G(spieler).scrollx = 194;
 	start_aad_wait(191, -1);
 	flic_cut(FCUT_058, CFO_MODE);
-	det->disable_sound(0, 0);
+	g_engine->_sound->stopSound(0);
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
@@ -71,7 +72,7 @@ void Room43::catch_pg() {
 	_G(spieler).scrolly = 0;
 	switch_room(43);
 	ailsnd->stopMod();
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
@@ -81,7 +82,7 @@ void Room43::catch_pg() {
 	_G(spieler).R43GetPgLady = true;
 	flic_cut(FCUT_058, CFO_MODE);
 
-	det->disable_sound(0, 0);
+	g_engine->_sound->stopSound(0);
 	test_intro(14);
 	
 	flags.NoScroll = false;
@@ -94,7 +95,6 @@ void Room43::catch_pg() {
 
 int16 Room43::setup_func(int16 frame) {
 	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	serve_speech();
 
 	return 0;
 }
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 1d384178505..da7cd01d69b 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room45.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -211,9 +212,7 @@ void Room45::taxi_mov() {
 	HowardMov = 2;
 	room->set_timer_status(12, TIMER_STOP);
 	det->del_static_ani(12);
-	det->enable_sound(15, 1);
-	det->play_sound(15, 1);
-	
+	g_engine->_sound->playSound(15, 1);
 	det->show_static_spr(11);
 	auto_move(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
@@ -227,11 +226,11 @@ void Room45::taxi_mov() {
 	}
 
 	det->hide_static_spr(11);
-	det->enable_sound(15, 2);
-	det->play_sound(15, 2);
-	det->enable_sound(15, 0);
+	g_engine->_sound->playSound(15, 2);
+	g_engine->_sound->playSound(15, 2, false);
+	g_engine->_sound->playSound(15, 0);
 	start_detail_wait(15, 1, ANI_VOR);
-	det->disable_sound(15, 0);
+	g_engine->_sound->stopSound(0);
 	switch_room(48);
 }
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 7b59fc7a69d..85a5da7725b 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room46.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -161,10 +162,7 @@ void Room46::kloppe() {
 		atds->print_aad(0, 0);
 
 		if (flags.InitSound && _G(spieler).SpeechSwitch) {
-			while (ailsnd->isSpeechActive()) {
-				ailsnd->serveDbSamples();
-				SHOULD_QUIT_RETURN;
-			}
+			g_engine->_sound->waitForSpeechToFinish();
 			continue;
 		}
 		
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index e3e88b4983c..43289b6d11b 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room47.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -65,8 +66,8 @@ int16 Room47::use_knopf(int16 txt_nr) {
 			break;
 		}
 
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 		++_G(spieler).R47Schloss[k_nr];
 
 		if (_G(spieler).R47Schloss[k_nr] > 9)
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 27698d9c201..2999ab5301e 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room48.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -136,7 +137,7 @@ void Room48::setup_func() {
 							det->stop_detail(0);
 							det->del_static_ani(0);
 							start_detail_wait(2, 1, ANI_VOR);
-							det->disable_sound(2, 0);
+							g_engine->_sound->stopSound(0);
 							menu_item = CUR_WALK;
 							cursor_wahl(menu_item);
 							show_cur();
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 7e09327e641..5b9f88b4e0e 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room49.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -259,7 +260,7 @@ int16 Room49::use_taxi() {
 
 		det->hide_static_spr(7);
 		start_detail_wait(5, 1, ANI_VOR);
-		det->disable_sound(5, 0);
+		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index a69df315114..4b61c43b9a1 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -26,6 +26,7 @@
 #include "chewy/room.h"
 #include "chewy/rooms/room51.h"
 #include "chewy/rooms/room65.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -236,8 +237,8 @@ int16 Room51::use_door(int16 txt_nr) {
 			auto_move(9, P_CHEWY);
 
 			if (!_G(spieler).R51KillerWeg) {
-				det->enable_sound(2, 0);
-				det->play_sound(2, 0);
+				g_engine->_sound->playSound(2, 0);
+				g_engine->_sound->playSound(2);
 				det->show_static_spr(1);
 				start_detail_wait(2, 1, ANI_VOR);
 				det->start_detail(5, 255, ANI_VOR);
@@ -248,12 +249,12 @@ int16 Room51::use_door(int16 txt_nr) {
 					det->stop_detail(5);
 					start_ani_block(5, ABLOCK37);
 					det->hide_static_spr(1);
-					det->disable_sound(2, 0);
+					g_engine->_sound->stopSound(0);
 					start_aad_wait(284, -1);
 				} else {
 					_G(spieler).R51KillerWeg = true;
 					start_aad_wait(290, -1);
-					det->disable_sound(2, 0);
+					g_engine->_sound->stopSound(0);
 					out->ausblenden(1);
 					out->setze_zeiger(nullptr);
 					out->cls();
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 465c8d9b51f..64d8a18577c 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room52.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -34,10 +35,10 @@ void Room52::entry() {
 
 	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg) {
 		plot_armee(0);
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 	} else {
-		det->disable_sound(0, 0);
+		g_engine->_sound->stopSound(0);
 	}
 
 	if (_G(spieler).R52KakerWeg)
@@ -80,8 +81,8 @@ int16 Room52::use_hot_dog() {
 		auto_move(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
 		plot_armee(20);
-		det->enable_sound(0, 0);
-		det->play_sound(0, 0);
+		g_engine->_sound->playSound(0, 0);
+		g_engine->_sound->playSound(0);
 		atds->set_ats_str(341, 1, ATS_DATEI);
 		auto_move(2, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
@@ -92,8 +93,8 @@ int16 Room52::use_hot_dog() {
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(7, 1, ANI_VOR);
-		det->enable_sound(7, 0);
-		det->play_sound(7, 0);
+		g_engine->_sound->playSound(7, 0);
+		g_engine->_sound->playSound(7);
 		det->start_detail(8, 255, ANI_VOR);
 
 		for (int16 i = 0; i < 5; i++) {
@@ -101,11 +102,11 @@ int16 Room52::use_hot_dog() {
 			det->stop_detail(2 + i);
 		}
 
-		det->disable_sound(0, 0);
+		g_engine->_sound->stopSound(0);
 		det->stop_detail(0);
 		det->stop_detail(8);
 		start_detail_wait(7, 1, ANI_RUECK);
-		det->disable_sound(7, 0);
+		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(303, -1);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 74c91e2bdcc..cec9f69dce9 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room54.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -137,9 +138,9 @@ int16 Room54::use_schalter() {
 			start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 			det->show_static_spr(0);
 			auto_move(2, P_CHEWY);
-			det->enable_sound(1, 0);
-			det->enable_sound(0, 1);
-			det->disable_sound(1, 2);
+			g_engine->_sound->playSound(1, 0);
+			g_engine->_sound->playSound(0, 1);
+			g_engine->_sound->stopSound(2);
 
 			start_detail_wait(1, 1, ANI_VOR);
 			det->start_detail(3, 255, ANI_VOR);
@@ -151,11 +152,11 @@ int16 Room54::use_schalter() {
 			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_VOR);
 				det->hide_static_spr(0);
-				det->disable_sound(1, 0);
-				det->disable_sound(0, 1);
-				det->enable_sound(1, 2);
+				g_engine->_sound->stopSound(0);
+				g_engine->_sound->stopSound(1);
+				g_engine->_sound->playSound(1, 2);
 				start_detail_wait(1, 1, ANI_RUECK);
-				det->disable_sound(1, 2);
+				g_engine->_sound->stopSound(2);
 				aad_nr = 295;
 
 			} else {
@@ -291,8 +292,8 @@ int16 Room54::use_azug() {
 				_G(spieler).R55Location = true;
 				SetUpScreenFunc = nullptr;
 				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
-				det->enable_sound(1, 0);
-				det->play_sound(1, 0);
+				g_engine->_sound->playSound(1, 0);
+				g_engine->_sound->playSound(1);
 
 				int16 ch_y = 68;
 				int16 ay = 0;
@@ -332,8 +333,8 @@ void Room54::aufzug_ab() {
 	_G(spieler).scrollx = 0;
 	SetUpScreenFunc = setup_func;
 	det->show_static_spr(12);
-	det->enable_sound(1, 0);
-	det->play_sound(1, 0);
+	g_engine->_sound->playSound(1, 0);
+	g_engine->_sound->playSound(1);
 
 	int16 ch_y = -40;
 	int16 ay = -108;
@@ -355,7 +356,7 @@ void Room54::aufzug_ab() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	det->disable_sound(1, 0);
+	g_engine->_sound->stopSound(0);
 	det->hide_static_spr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 17ddcfbc3ce..817c0b6d511 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room56.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -54,12 +55,12 @@ void Room56::entry() {
 			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
-			det->disable_sound(7, 0);
-			det->enable_sound(7, 1);
+			g_engine->_sound->stopSound(0);
+			g_engine->_sound->playSound(7, 1);
 			start_detail_wait(7, 1, ANI_RUECK);
 			start_detail_wait(8, 1, ANI_VOR);
-			det->disable_sound(7, 1);
-			det->enable_sound(7, 0);
+			g_engine->_sound->stopSound(1);
+			g_engine->_sound->playSound(7, 0);
 			start_detail_wait(7, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
 
@@ -185,8 +186,8 @@ void Room56::entry() {
 		break;
 	}
 
-	det->enable_sound(9, 0);
-	det->play_sound(9, 0);
+	g_engine->_sound->playSound(9, 0);
+	g_engine->_sound->playSound(9);
 }
 
 void Room56::xit() {
@@ -209,8 +210,8 @@ int16 Room56::use_taxi() {
 		action_ret = true;
 		hide_cur();
 		auto_move(1, P_CHEWY);
-		det->disable_sound(7, 0);
-		det->enable_sound(7, 1);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->playSound(7, 1);
 		start_detail_wait(7, 1, ANI_RUECK);
 		det->start_detail(8, 1, ANI_VOR);
 		_G(zoom_horizont) = 0;
@@ -299,12 +300,12 @@ int16 Room56::use_kneipe() {
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
 				flic_cut(75, CFO_MODE);
-				det->disable_sound(10, 0);
-				det->play_sound(9, 0);
+				g_engine->_sound->stopSound(0);
+				g_engine->_sound->playSound(9);
 				det->start_detail(10, 6, ANI_VOR);
 				start_aad_wait(307, -1);
 				det->stop_detail(10);
-				det->enable_sound(10, 0);
+				g_engine->_sound->playSound(10, 0);
 				out->ausblenden(0);
 				set_up_screen(DO_SETUP);
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -360,8 +361,8 @@ int16 Room56::use_kneipe() {
 		set_up_screen(NO_SETUP);
 		fx_blend = BLEND3;
 		show_cur();
-		det->enable_sound(9, 0);
-		det->play_sound(9, 0);
+		g_engine->_sound->playSound(9, 0);
+		g_engine->_sound->playSound(9);
 	}
 	return action_ret;
 }
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index cf5c4ed1c19..45f614b2859 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room57.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -82,8 +83,8 @@ int16 Room57::use_taxi() {
 		action_ret = true;
 		hide_cur();
 		auto_move(3, P_CHEWY);
-		det->enable_sound(3, 0);
-		det->play_sound(3, 0);
+		g_engine->_sound->playSound(3, 0);
+		g_engine->_sound->playSound(3);
 		det->show_static_spr(7);
 		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -96,12 +97,12 @@ int16 Room57::use_taxi() {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 		det->hide_static_spr(7);
-		det->enable_sound(3, 1);
-		det->play_sound(3, 1);
+		g_engine->_sound->playSound(3, 1);
+		g_engine->_sound->playSound(3);
 		room->set_timer_status(3, TIMER_STOP);
 		det->del_static_ani(3);
 		start_detail_wait(5, 1, ANI_VOR);
-		det->disable_sound(5, 0);
+		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
 	return action_ret;
@@ -138,7 +139,7 @@ int16 Room57::use_pfoertner() {
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
 			det->hide_static_spr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
-			det->disable_sound(6, 0);
+			g_engine->_sound->stopSound(0);
 			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			start_aad_wait(349, -1);
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 2f84636aedd..1e53ebf5bdc 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -142,7 +142,6 @@ int16 Room6::cut_serv2(int16 frame) {
 	if (frame == 31)
 		start_aad(107, 0);
 
-	serve_speech();
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index b4c6eda0495..b067f1ea70f 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room68.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -100,8 +101,8 @@ void Room68::setup_func() {
 		if (det->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = 2;
 			if (_G(spieler).SpeechSwitch && flags.InitSound) {
-				det->enable_sound(2, 0);
-				det->play_sound(_G(r68HohesC), 0);
+				g_engine->_sound->playSound(2, 0);
+				g_engine->_sound->playSound(_G(r68HohesC));
 				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
 
 				while (ailsnd->getSampleStatus(1) == 4)
@@ -363,21 +364,16 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			start_detail_wait(23, 3, ANI_VOR);
 		else {
 			det->start_detail(23, 255, ANI_VOR);
-			ailsnd->initDoubleBuffer(Ci.SoundSlot, &(Ci.SoundSlot[22000]), 22000, 1);
-			mem->file->select_pool_item(voc_handle, 109);
-
-			ailsnd->startDbVoc(voc_handle, 1, 30);
+			g_engine->_sound->playSound(109, 1, false);
 			wait_show_screen(2);
 
-			while (!ailsnd->isSpeechActive(1))
-				set_up_screen(DO_SETUP);
+			g_engine->_sound->waitForSpeechToFinish();
 
 			det->stop_detail(23);
 		}
 
 		if (_G(spieler).DisplayText) {
-			mem->file->select_pool_item(voc_handle, 108);
-			ailsnd->startDbVoc(voc_handle, 1, 30);			
+			g_engine->_sound->playSound(108, 1, false);
 		}
 		
 		det->start_detail(24, 255, ANI_VOR);
@@ -406,8 +402,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		det->set_static_ani(8, -1);
 		start_aad_wait(392, -1);
 
-		while (ailsnd->isSpeechActive(1))
-			set_up_screen(DO_SETUP);
+		g_engine->_sound->waitForSpeechToFinish();
 		
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		det->stop_detail(27);
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 0e5dabd6750..fd6c99a8e72 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room69.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room69::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index b96e51e8d8d..a43076838a4 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room70.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room70::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 1f884a875cd..5eb061fb4a2 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room71.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -32,10 +33,10 @@ int Room71::_state;
 int Room71::_delay;
 
 void Room71::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->enable_sound(0, 1);
-	det->play_sound(0, 0);
-	det->play_sound(0, 1);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0);
+	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index a0ca2cb868a..21916ac076b 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room72.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room72::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index cf7f8d18147..c1333e545ee 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -23,13 +23,14 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room73.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room73::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 703b54747e8..a4953b9f563 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/rooms/room74.h"
 #include "chewy/rooms/room75.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room74::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 1f2414ece20..17ef7fea748 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -23,13 +23,14 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room75.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room75::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 70;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 3670fbaa197..0b89b35f905 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room76.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -32,10 +33,10 @@ int Room76::_state;
 
 
 void Room76::entry() {
-	det->enable_sound(0,0);
-	det->enable_sound(0, 1);
-	det->play_sound(0, 0);
-	det->play_sound(0, 1);
+	g_engine->_sound->playSound(0,0);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0);
+	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
 	_state = 0;
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 10eddd5fcb0..0a1e483200f 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -23,15 +23,16 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room77.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room77::entry() {
-	det->enable_sound(0, 0);
-	det->enable_sound(0, 1);
-	det->play_sound(0, 0);
-	det->play_sound(0, 1);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0);
+	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
 	if (_G(spieler).r76State == 1) {
 		_G(spieler).flags29_4 = true;
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 7c1a2046052..14f173926da 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -24,14 +24,15 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room78.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room78::entry() {
 	_G(spieler).r76State = -1;
-	det->enable_sound(0, 1);
-	det->play_sound(0, 1);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0, 1, false);
 	hide_cur();
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 70ed1d3dd4e..9ba113276a0 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room79.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room79::entry() {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 52450a5d3aa..29e0042716f 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room80.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -31,12 +32,12 @@ void Room80::entry() {
 	_G(maus_links_click) = false;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	det->enable_sound(0, 0);
-	det->enable_sound(0, 1);
-	det->enable_sound(0, 2);
-	det->play_sound(0, 0);
-	det->play_sound(0, 1);
-	det->play_sound(0, 2);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0, 2);
+	g_engine->_sound->playSound(0);
+	g_engine->_sound->playSound(0, 1, false);
+	g_engine->_sound->playSound(0, 2, false);
 
 	if (_G(spieler).gottenDiary) {
 		atds->del_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 543224821ae..9e0a5291db0 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -23,13 +23,14 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/rooms/room81.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room81::entry() {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 140;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 0bfa3ebdb1a..44ba35c2679 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -26,13 +26,14 @@
 
 #include "chewy/rooms/room82.h"
 #include "chewy/rooms/room66.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room82::entry() {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
diff --git a/engines/chewy/rooms/room83.cpp b/engines/chewy/rooms/room83.cpp
index e6e5bdc5b65..1f7904d4c31 100644
--- a/engines/chewy/rooms/room83.cpp
+++ b/engines/chewy/rooms/room83.cpp
@@ -21,13 +21,14 @@
 
 #include "chewy/global.h"
 #include "chewy/rooms/room83.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room83::entry() {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index a8f64b699b3..bb467b0e2d9 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room84.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -39,8 +40,7 @@ void Room84::entry() {
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).R84GoonsPresent = false;
 	_flag = false;
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
 
 	if (_G(spieler).R88UsedMonkey) {
 		det->del_static_ani(3);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 822fafd5842..a3eb2e7e6b6 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -25,15 +25,16 @@
 #include "chewy/room.h"
 #include "chewy/rooms/room85.h"
 #include "chewy/rooms/room87.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room85::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
-	det->enable_sound(0, 1);
-	det->play_sound(0, 1);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
 	SetUpScreenFunc = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 00d115c3b8d..4e480dffb46 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room86.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -148,8 +149,8 @@ int Room86::proc2() {
 	auto_move(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	det->start_detail(0, 255, false);
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	del_inventar(_G(spieler).AkInvent);
 	auto_move(3, P_CHEWY);
 	proc3(true);
@@ -181,10 +182,10 @@ void Room86::proc3(bool cond) {
 
 	det->set_static_pos(0, 352, destY, false, false);
 	det->show_static_spr(0);
-	det->enable_sound(0, 1);
-	det->enable_sound(0, 2);
-	det->play_sound(0, 1);
-	det->play_sound(0, 2);
+	g_engine->_sound->playSound(0, 1);
+	g_engine->_sound->playSound(0, 2);
+	g_engine->_sound->playSound(0, 1, false);
+	g_engine->_sound->playSound(0, 2, false);
 
 	for (int i = 0; i < 48; ++i) {
 		set_up_screen(NO_SETUP);
@@ -194,8 +195,8 @@ void Room86::proc3(bool cond) {
 		out->back2screen(workpage);
 	}
 
-	det->disable_sound(0, 1);
-	det->disable_sound(0, 2);
+	g_engine->_sound->stopSound(1);
+	g_engine->_sound->stopSound(2);
 	flags.NoScroll = false;
 }
 
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index e2d5db21c80..9e41fbaafbc 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -148,7 +148,6 @@ int16 Room87::proc3(int16 key) {
 }
 
 int16 Room87::proc5(int16 key) {
-	serve_speech();
 	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	return 0;
 }
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index c23633fa2ea..ba8bbd6e6d1 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room90.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -66,8 +67,8 @@ void Room90::entry(int16 eib_nr) {
 	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
 		det->set_detail_pos(12, 329, 15);
 		det->start_detail(12, 255, false);
-		det->enable_sound(12, 0);
-		det->play_sound(12, 0);
+		g_engine->_sound->playSound(12, 0);
+		g_engine->_sound->playSound(12);
 	}
 
 	if (_G(spieler).flags33_40 && !_G(spieler).flags34_10) {
@@ -257,8 +258,8 @@ int Room90::getHubcaps() {
 	auto_scroll(176, 0);
 	det->set_detail_pos(12, 495, 15);
 	det->start_detail(12, 255, false);
-	det->enable_sound(12, 0);
-	det->play_sound(12, 0);
+	g_engine->_sound->playSound(12, 0);
+	g_engine->_sound->playSound(12);
 
 	int destX = 495;
 
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index f16dc8f9a64..95cf7880453 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -24,13 +24,14 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room95.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
 
 void Room95::entry(int16 eib_nr) {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	SetUpScreenFunc = setup_func;	
 	_G(zoom_horizont) = 140;
 	_G(spieler).ScrollxStep = 2;
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 6fbe7bec510..b3cc1c6f695 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -24,6 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room97.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -37,8 +38,8 @@ int Room97::_word18DB38;
 bool Room97::_bool18DB3A;
 
 void Room97::entry() {
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	SetUpScreenFunc = setup_func;
 	_G(zoom_horizont) = 0;
 
@@ -84,9 +85,9 @@ void Room97::entry() {
 			det->stop_detail(23 + i);
 			det->start_detail(27 + i, 255, ANI_VOR);
 		}
-		det->disable_sound(26, 0);
-		det->disable_sound(27, 0);
-		det->disable_sound(28, 0);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->stopSound(0);
 	}
 
 	if (_G(spieler).flags37_1)
@@ -336,8 +337,8 @@ void Room97::proc4() {
 		hide_cur();
 		spieler_mi[P_CHEWY].Mode = true;
 		stop_person(P_CHEWY);
-		det->enable_sound(9, 0);
-		det->disable_sound(9, 1);
+		g_engine->_sound->playSound(9, 0);
+		g_engine->_sound->stopSound(1);
 		start_detail_wait(9, 1, ANI_VOR);
 		det->show_static_spr(21);
 
@@ -356,8 +357,8 @@ void Room97::proc4() {
 
 		start_detail_wait(29, 1, ANI_VOR);
 		det->hide_static_spr(21);
-		det->enable_sound(9, 1);
-		det->disable_sound(9, 0);
+		g_engine->_sound->playSound(9, 1);
+		g_engine->_sound->stopSound(0);
 		start_detail_wait(9, 0, ANI_RUECK);
 
 		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
@@ -489,8 +490,8 @@ int Room97::proc8() {
 		auto_scroll(406, 0);
 		wait_show_screen(40);
 		det->stop_detail(24);
-		det->enable_sound(26, 0);
-		det->play_sound(26, 0);
+		g_engine->_sound->playSound(26, 0);
+		g_engine->_sound->playSound(26);
 		start_detail_wait(25, 1, ANI_VOR);
 		det->start_detail(26, 255, false);
 		det->stop_detail(23);
@@ -555,8 +556,8 @@ int Room97::proc10() {
 	hide_cur();
 	auto_move(8, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	det->enable_sound(7, 0);
-	det->disable_sound(7, 1);
+	g_engine->_sound->playSound(7, 0);
+	g_engine->_sound->stopSound(1);
 	start_detail_wait(7, 1, ANI_VOR);
 	det->show_static_spr(19);
 	_G(spieler).flags37_1 = true;
@@ -584,8 +585,8 @@ int Room97::proc11() {
 		auto_move(7, P_CHEWY);
 		start_spz(5, 255, false, P_CHEWY);
 		start_aad_wait(571, -1);
-		det->enable_sound(4, 0);
-		det->play_sound(4, 0);
+		g_engine->_sound->playSound(4, 0);
+		g_engine->_sound->playSound(4);
 		det->start_detail(4, 1, false);
 		auto_move(12, P_CHEWY);
 		start_spz_wait(64, 1, false, P_CHEWY);
@@ -700,8 +701,8 @@ void Room97::proc15() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(27);
 		start_detail_wait(18, 1, ANI_VOR);
-		det->enable_sound(8, 0);
-		det->disable_sound(8, 1);
+		g_engine->_sound->playSound(8, 0);
+		g_engine->_sound->stopSound(1);
 		start_detail_wait(8, 1, ANI_VOR);
 		det->show_static_spr(20);
 		auto_move(10, P_CHEWY);
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index aaf8b3f3bfb..46d5e6ade6f 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -22,10 +22,12 @@
 #include "audio/audiostream.h"
 #include "audio/mixer.h"
 #include "audio/decoders/raw.h"
+#include "common/config-manager.h"
 #include "common/system.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
 #include "chewy/types.h"
+#include "chewy/global.h"
 
 namespace Chewy {
 
@@ -40,18 +42,18 @@ Sound::~Sound() {
 	delete _speechRes;
 }
 
-void Sound::playSound(int num, bool loop, uint channel) {
+void Sound::playSound(int num, uint channel, bool loop) {
 	SoundChunk *sound = _soundRes->getSound(num);
 	uint8 *data = (uint8 *)MALLOC(sound->size);
 	memcpy(data, sound->data, sound->size);
 
-	playSound(data, sound->size, loop, channel);
+	playSound(data, sound->size, channel, loop);
 
 	delete[] sound->data;
 	delete sound;
 }
 
-void Sound::playSound(uint8 *data, uint32 size, bool loop, uint channel, DisposeAfterUse::Flag dispose) {
+void Sound::playSound(uint8 *data, uint32 size, uint channel, bool loop, DisposeAfterUse::Flag dispose) {
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
 	                                 Audio::makeRawStream(data,
 	                                         size, 22050, Audio::FLAG_UNSIGNED,
@@ -157,6 +159,11 @@ void Sound::playSpeech(int num) {
 
 	_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);
 
+	// Wait for speech to finish
+	while (isSpeechActive() && !SHOULD_QUIT) {
+		set_up_screen(DO_SETUP);
+	}
+
 	delete[] sound->data;
 	delete sound;
 }
@@ -256,4 +263,20 @@ void Sound::convertTMFToMod(uint8 *tmfData, uint32 tmfSize, uint8 *modData, uint
 	free(modData);
 }
 
+void Sound::waitForSpeechToFinish() {
+	if (flags.InitSound && _G(spieler).SpeechSwitch) {
+		while (g_engine->_sound->isSpeechActive() && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
+	}
+}
+
+bool Sound::hasSubtitles() {
+	return ConfMan.getBool("subtitles");
+}
+
+bool Sound::isSpeechMuted() {
+	return ConfMan.getBool("speech_mute");
+}
+
 }
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index 1c4ff876b92..d470d7d1557 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -36,11 +36,11 @@ public:
 	Sound(Audio::Mixer *mixer);
 	virtual ~Sound();
 
-	void playSound(int num, bool loop = false, uint channel = 0);
-	void playSound(uint8 *data, uint32 size, bool loop = false, uint channel = 0, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
+	void playSound(int num, uint channel = 0, bool loop = false);
+	void playSound(uint8 *data, uint32 size, uint channel = 0, bool loop = false, DisposeAfterUse::Flag dispose = DisposeAfterUse::YES);
 	void pauseSound(uint channel);
 	void resumeSound(uint channel);
-	void stopSound(uint channel);
+	void stopSound(uint channel = 0);
 	bool isSoundActive(uint channel);
 	void setSoundVolume(uint volume);
 	void setSoundChannelVolume(uint channel, uint volume);
@@ -63,6 +63,22 @@ public:
 
 	void stopAll();
 
+	/**
+	 * Helper method to wait until any playing speech is finished
+	 */
+	void waitForSpeechToFinish();
+
+	/**
+	 * Returns true if subtitles are enabled
+	 */
+	bool hasSubtitles();
+
+	/**
+	 * Returns true if speech is muted
+	 */
+	bool isSpeechMuted();
+
+
 private:
 	Audio::Mixer *_mixer;
 	Audio::SoundHandle _soundHandle[MAX_SOUND_EFFECTS];
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 3f9dd23baf6..e593c197ef6 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -21,6 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/global.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -427,7 +428,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 }
 
 void start_aad(int16 dia_nr) {
-	ailsnd->waitForSpeechToFinish();
+	g_engine->_sound->waitForSpeechToFinish();
 	set_ssi_xy();
 	atds->start_aad(dia_nr);
 }
@@ -447,14 +448,12 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			if (ret) {
 				while (atds->ats_get_status() != false && !SHOULD_QUIT)
 					set_up_screen(DO_SETUP);
-			} else if (VocNr != -1) {
+			} else if (VocNr >= 0) {
 				ret = true;
-				mem->file->select_pool_item(speech_handle, VocNr);
 				vocx = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
-				ailsnd->setStereoPos(0, atds->get_stereo_pos(vocx));
-				ailsnd->startDbVoc(speech_handle, 0, 63);
-				ailsnd->setStereoPos(0, atds->get_stereo_pos(vocx));
-				warning("FIXME - unknown constant SMP_PLAYING");
+				g_engine->_sound->setSoundChannelBalance(0, atds->getStereoPos(vocx));
+				g_engine->_sound->playSpeech(VocNr);
+				//warning("FIXME - unknown constant SMP_PLAYING");
 
 				set_up_screen(DO_SETUP);
 			}
diff --git a/engines/chewy/video/cfo_decoder.cpp b/engines/chewy/video/cfo_decoder.cpp
index 44cd29f8d34..6a9f1c16710 100644
--- a/engines/chewy/video/cfo_decoder.cpp
+++ b/engines/chewy/video/cfo_decoder.cpp
@@ -253,7 +253,7 @@ void CfoDecoder::CfoVideoTrack::handleCustomFrame() {
 			assert(number < MAX_SOUND_EFFECTS);
 
 			_sound->setSoundVolume(volume);
-			_sound->playSound(_soundEffects[number], _soundEffectSize[number], repeat, channel, DisposeAfterUse::NO);
+			_sound->playSound(_soundEffects[number], _soundEffectSize[number], channel, repeat, DisposeAfterUse::NO);
 			break;
 		case kChunkSetSoundVolume:
 			volume = _fileStream->readUint16LE() * Audio::Mixer::kMaxChannelVolume / 63;


Commit: 63ebfc0d9b1216d7e33b6e0a41405bf8e95ea94c
    https://github.com/scummvm/scummvm/commit/63ebfc0d9b1216d7e33b6e0a41405bf8e95ea94c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Fix more issues in Room 97 logic

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index b3cc1c6f695..004a0cf70fe 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -294,7 +294,7 @@ void Room97::proc3() {
 		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	} else if (!_G(spieler).flags36_40) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(567, -1);
+		start_aad_wait(568, -1);
 		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
@@ -342,15 +342,17 @@ void Room97::proc4() {
 		start_detail_wait(9, 1, ANI_VOR);
 		det->show_static_spr(21);
 
-		while (spieler_vector[P_HOWARD].Xypos[0] > 996)
+		while (spieler_vector[P_HOWARD].Xypos[0] > 996) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
+		}
 
 		det->show_static_spr(2);
 		HowardMov = 1;
 		
 		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
 		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
-		go_auto_xy(1037, 99, P_CHEWY, ANI_WAIT);
+		go_auto_xy(1037, 90, P_CHEWY, ANI_WAIT);
 
 		go_auto_xy(995, 77, P_HOWARD, ANI_WAIT);
 		go_auto_xy(1047, 87, P_HOWARD, ANI_WAIT);
@@ -389,18 +391,21 @@ int Room97::proc5() {
 	}
 
 	flic_cut(122, CFO_MODE);
+	test_intro(34);
 
-	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-	start_detail_wait(0, 1, ANI_VOR);
-	det->show_static_spr(13);
-	start_detail_wait(13, 1, ANI_VOR);
-	det->start_detail(14, 255, false);
-	start_aad_wait(555, -1);
-	_G(spieler).flags36_40 = true;
-	atds->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(535, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	det->enable_sound(0, 0);
+	det->play_sound(0, 0);
+	_G(spieler).scrollx = 720;
+	set_person_pos(822, 98, P_CHEWY, P_LEFT);
+	set_person_pos(861, 81, P_HOWARD, P_LEFT);
+	del_inventar(_G(spieler).AkInvent);
+	det->show_static_spr(21);
+	_G(spieler).flags35_80 = true;
+	start_aad_wait(546, -1);
+	det->hide_static_spr(21);
+	det->enable_sound(9, 1);
+	det->disable_sound(9, 0);
+	start_detail_wait(9, 0, ANI_GO);
 	
 	show_cur();
 	return 1;
@@ -674,6 +679,7 @@ void Room97::proc15() {
 	cursor_wahl(CUR_USE);
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
+	_bool18DB30 = false;
 	
 	while (det->get_ani_detail(16) != nullptr) {
 		get_user_key(NO_SETUP);


Commit: 7f31a9d41e38cef7c46d77755b2ffa46938a27d7
    https://github.com/scummvm/scummvm/commit/7f31a9d41e38cef7c46d77755b2ffa46938a27d7
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Fix compilation

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 004a0cf70fe..c4d17ccb7d3 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -393,8 +393,8 @@ int Room97::proc5() {
 	flic_cut(122, CFO_MODE);
 	test_intro(34);
 
-	det->enable_sound(0, 0);
-	det->play_sound(0, 0);
+	g_engine->_sound->playSound(0, 0);
+	g_engine->_sound->playSound(0);
 	_G(spieler).scrollx = 720;
 	set_person_pos(822, 98, P_CHEWY, P_LEFT);
 	set_person_pos(861, 81, P_HOWARD, P_LEFT);
@@ -403,8 +403,8 @@ int Room97::proc5() {
 	_G(spieler).flags35_80 = true;
 	start_aad_wait(546, -1);
 	det->hide_static_spr(21);
-	det->enable_sound(9, 1);
-	det->disable_sound(9, 0);
+	g_engine->_sound->playSound(9, 1);
+	g_engine->_sound->stopSound(0);
 	start_detail_wait(9, 0, ANI_GO);
 	
 	show_cur();


Commit: 666f5318edc7850d66d50d07eabb889490774764
    https://github.com/scummvm/scummvm/commit/666f5318edc7850d66d50d07eabb889490774764
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Fix palette in new video code and hook it in a console command

Also fix a crash in videos with music

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/debugger.cpp
    engines/chewy/debugger.h
    engines/chewy/video/cfo_decoder.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 126487bbab5..6263283849d 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -23,6 +23,7 @@
 #include "common/fs.h"
 #include "common/system.h"
 #include "engines/util.h"
+#include "graphics/palette.h"
 #include "chewy/chewy.h"
 #include "chewy/debugger.h"
 #include "chewy/events.h"
@@ -30,6 +31,7 @@
 #include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
+#include "chewy/video/cfo_decoder.h"
 
 namespace Chewy {
 
@@ -160,4 +162,59 @@ SaveStateList ChewyEngine::listSaves() {
 	return getMetaEngine()->listSaves(_targetName.c_str());
 }
 
+void ChewyEngine::playVideo(uint num) {
+	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
+	VideoResource *videoResource = new VideoResource("cut.tap");
+	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
+
+	if (!cfoDecoder->loadStream(videoStream)) {
+		delete videoResource;
+		delete cfoDecoder;
+		return;
+	}
+
+	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
+	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
+	bool skipVideo = false;
+	byte curPalette[256 * 3];
+
+	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
+	//save_palette(curPalette);
+	cur->hide_cur();
+
+	cfoDecoder->start();
+
+	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo) {
+		if (cfoDecoder->needsUpdate()) {
+			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
+			if (frame) {
+				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
+
+				if (cfoDecoder->hasDirtyPalette())
+					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
+					//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
+
+				g_system->updateScreen();
+			}
+		}
+
+		Common::Event event;
+		while (g_system->getEventManager()->pollEvent(event)) {
+			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
+				skipVideo = true;
+		}
+
+		g_system->delayMillis(10);
+	}
+
+	cfoDecoder->close();
+
+	g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
+	//setScummVMPalette(curPalette, 0, 256);
+	cur->show_cur();
+
+	delete videoResource;
+	delete cfoDecoder;
+}
+
 } // End of namespace Chewy
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 6e7417414f3..0495aeb5485 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -100,6 +100,8 @@ public:
 	uint getRandomNumber(uint max) {
 		return _rnd.getRandomNumber(max);
 	}
+
+	void playVideo(uint num);
 };
 
 extern ChewyEngine *g_engine;
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 1a68de5c8e8..4d2bf120e9e 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -45,6 +45,7 @@ static int strToInt(const char *s) {
 Debugger::Debugger() : GUI::Debugger() {
 	registerCmd("room", WRAP_METHOD(Debugger, Cmd_GotoRoom));
 	registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
+	registerCmd("video", WRAP_METHOD(Debugger, Cmd_PlayVideo));
 }
 
 Debugger::~Debugger() {
@@ -78,4 +79,16 @@ bool Debugger::Cmd_Item(int argc, const char **argv) {
 	return true;
 }
 
+bool Debugger::Cmd_PlayVideo(int argc, const char **argv) {
+	if (argc < 2) {
+		debugPrintf("Usage: play_video <number>\n");
+		return true;
+	}
+
+	int resNum = atoi(argv[1]);
+	g_engine->playVideo(resNum);
+
+	return false;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/debugger.h b/engines/chewy/debugger.h
index a681e06587d..42cd62b3440 100644
--- a/engines/chewy/debugger.h
+++ b/engines/chewy/debugger.h
@@ -30,6 +30,8 @@ class Debugger : public GUI::Debugger {
 protected:
 	bool Cmd_GotoRoom(int argc, const char **argv);
 	bool Cmd_Item(int argc, const char **argv);
+	bool Cmd_PlayVideo(int argc, const char **argv);
+
 public:
 	Debugger();
 	~Debugger() override;
diff --git a/engines/chewy/video/cfo_decoder.cpp b/engines/chewy/video/cfo_decoder.cpp
index 6a9f1c16710..837ec305ca9 100644
--- a/engines/chewy/video/cfo_decoder.cpp
+++ b/engines/chewy/video/cfo_decoder.cpp
@@ -93,6 +93,7 @@ CfoDecoder::CfoVideoTrack::~CfoVideoTrack() {
 	}
 
 	delete[] _musicData;
+	_musicData = nullptr;
 }
 
 void CfoDecoder::CfoVideoTrack::readHeader() {
@@ -225,6 +226,7 @@ void CfoDecoder::CfoVideoTrack::handleCustomFrame() {
 
 			// Game videos do not restart music after stopping it
 			delete[] _musicData;
+			_musicData = nullptr;
 			_musicSize = 0;
 			break;
 		case kChunkWaitMusicEnd:
@@ -310,7 +312,8 @@ void CfoDecoder::CfoVideoTrack::fadeOut() {
 				--_palette[i * 3 + 2];
 		}
 
-		setScummVMPalette(_palette, 0, 256);
+		//setScummVMPalette(_palette, 0, 256);
+		g_system->getPaletteManager()->setPalette(_palette, 0, 256);
 		g_system->updateScreen();
 		g_system->delayMillis(10);
 	}


Commit: 0271fb2f52f75cad4ed325c20382be895ea05ec3
    https://github.com/scummvm/scummvm/commit/0271fb2f52f75cad4ed325c20382be895ea05ec3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Add a description for all videos

Changed paths:
    engines/chewy/defines.h
    engines/chewy/rooms/room23.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 775313f9cd3..c6d6a829141 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -415,80 +415,168 @@ enum SetupScreenMode {
 #define CFO_MODE 0
 #define FLC_MODE 1
 #define ASF_MODE 2
-#define FCUT_001 0
-#define FCUT_002 1
-#define FCUT_003 2
-#define FCUT_004 3
-#define FCUT_005 4
-#define FCUT_006 5
-#define FCUT_007 6
-#define FCUT_008 7
-#define FCUT_009 8
-#define FCUT_010 9
-#define FCUT_011 10
-#define FCUT_012 11
-#define FCUT_013 12
-#define FCUT_014 13
-#define FCUT_015 14
-#define FCUT_016 15
-#define FCUT_017 16
-#define FCUT_018 17
-#define FCUT_019 18
-#define FCUT_029 29
-#define FCUT_030 30
-#define FCUT_031 31
-#define FCUT_032 32
-#define FCUT_033 33
-#define FCUT_034 34
-#define FCUT_035 35
-#define FCUT_036 36
-#define FCUT_037 37
-#define FCUT_038 38
-#define FCUT_039 39
-#define FCUT_040 40
-#define FCUT_041 41
-#define FCUT_042 42
-#define FCUT_043 43
-#define FCUT_044 44
-#define FCUT_045 45
-#define FCUT_046 46
-#define FCUT_047 47
-#define FCUT_048 48
-#define FCUT_049 49
-#define FCUT_050 50
-#define FCUT_051 51
-#define FCUT_052 52
-#define FCUT_053 53
-#define FCUT_054 54
-#define FCUT_055 55
-#define FCUT_056 56
-#define FCUT_057 57
-#define FCUT_058 58
-#define FCUT_059 59
-#define FCUT_060 60
-#define FCUT_061 61
-#define FCUT_062 62
-#define FCUT_063 63
-#define FCUT_064 64
-#define FCUT_065 65
-#define FCUT_066 66
-#define FCUT_067 67
-#define FCUT_068 68
-#define FCUT_069 69
-#define FCUT_070 70
-#define FCUT_071 71
-#define FCUT_072 72
-#define FCUT_073 73
-#define FCUT_074 74
-#define FCUT_075 75
-#define FCUT_076 76
-#define FCUT_077 77
-#define FCUT_078 78
-#define FCUT_079 79
-#define FCUT_080 80
-#define FCUT_081 81
-#define FCUT_082 82
-#define FCUT_083 83
+
+#define FCUT_001 0	// Chewy escapes the prison cell
+#define FCUT_002 1	// Burger
+#define FCUT_003 2	// Chewy mocks an alien and he trips on a rope
+#define FCUT_004 3	// Jumping rat-line creature
+#define FCUT_005 4	// Chewy sticks his hand in the rat's hole (custom callback: Room6::cut_serv1)
+#define FCUT_006 5	// Chewy sticks the burger in the rat's hole and catches it (custom callback: Room6::cut_serv2)
+#define FCUT_007 6	// Chewy pushes the big red button and a huge anvil drops on him
+#define FCUT_008 7	// Chewy paints "don't" in front of "push this"
+#define FCUT_009 8	// Alien pushes the big red button and a huge anvil drops on him
+#define FCUT_010 9	// Chewy tries the transporter (custom callback: Room11::cut_serv)
+#define FCUT_011 10	// Chewy uses a deflated alien in the transporter (custom callback: Room12::cut_serv)
+#define FCUT_012 11	// Four panel video, where Chewy flies in a spaceship
+#define FCUT_013 12	// Chewy messes with a conveyor belt
+#define FCUT_014 13	// Chewy is transported in place of an alien
+#define FCUT_015 14	// Chewy jumps on a conveyor belt
+#define FCUT_016 15	// Transporter
+#define FCUT_017 16	// Transporter
+#define FCUT_018 17	// Chewy drops from a conveyor belt into a dumpster
+#define FCUT_019_01 18	// Space chase: Chewy escapes F5 with spaceship
+#define FCUT_019_02 19	// Space chase: Spaceship flight
+#define FCUT_019_03 20  // Space chase: Spaceship flight
+#define FCUT_019_04 21	// Space chase: Aliens chasing Chewy's spaceship
+#define FCUT_019_05 22  // Space chase: Dogfight with Chewy and alien spaceship
+#define FCUT_019_06 23  // Space chase: Chewy's spaceship enters bumper field and black hole
+#define FCUT_019_07 24  // Space chase: Chewy's spaceship travels through black hole
+#define FCUT_019_08 25  // Space chase: Chewy's spaceship approaches earth
+#define FCUT_019_09 26  // Space chase: Chewy's spaceship starts descending
+#define FCUT_019_10 27  // Space chase: Chewy's spaceship approaches farm
+#define FCUT_019_11 28	// Space chase: Chewy's spaceship performs crash landing near farm
+#define FCUT_029 29 // Chewy wakes up after crash landing
+#define FCUT_030 30	// Chewy douses shaceship fire
+#define FCUT_031 31	// Chewy uses kitchen appliance
+#define FCUT_032 32	// TV: Farmer speaking (custom callback: Room39::setup_func)
+#define FCUT_033 33	// TV: Gasp ghost show intro
+#define FCUT_034 34 // TV: Gasp ghost show (custom callback: Room39::setup_func)
+#define FCUT_035 35 // TV: Book sale show (custom callback: Room39::setup_func)
+#define FCUT_036 36	// TV: Laura letter - head chopping block
+#define FCUT_037 37 // TV: Tied girl and aliens (custom callback: Room39::setup_func)
+#define FCUT_038 38 // TV: Flap news (custom callback: Room39::setup_func)
+#define FCUT_039 39 // TV: Flap news with alien (custom callback: Room39::setup_func)
+#define FCUT_040 40 // TV: Cooking show (custom callback: Room39::setup_func)
+#define FCUT_041 41	// Using translator on TV to learn English
+#define FCUT_042 42	// Turning on TV
+#define FCUT_043 43	// Chewy trying to wake up Howard
+#define FCUT_044 44	// Chewy using head band with typewriter
+#define FCUT_045 45	// Using translator on cat
+#define FCUT_046 46	// Using rat in the attic
+#define FCUT_047 47	// Using chicken feed on seesaw 
+#define FCUT_048 48	// Using fishing pole and bone to grab the dog dentures
+#define FCUT_049 49	// Closeup of Chewy having taken the dog dentures
+#define FCUT_050 50	// Barking dog
+#define FCUT_051 51	// Barking dog without dentures
+#define FCUT_052 52 // Using translator on chicken
+#define FCUT_053 53	// Chewy watching a fight
+#define FCUT_054 54	// Chewy mocking animal
+#define FCUT_055 55	// Using rat on old car
+#define FCUT_056 56	// Using rat in front of old car, flower appears
+#define FCUT_057 57	// Chewy with pumpkin head in the mail office using the vending machine
+#define FCUT_058 58	// Zombie girl jumping on train tracks
+#define FCUT_059 59	// Zombie girl talking to the pumpkin dummy, causing its head to explode
+#define FCUT_060 60	// Zombie girl talking to the pumpkin dummy and crashing into the store
+#define FCUT_061 61 // Zombie girl getting scared, shrinks and is placed in bottle by Howard (custom callback: Room43::setup_func)
+#define FCUT_062 62	// Zombie girl talks from inside the bottle
+#define FCUT_063 63	// Howard and Chewy walking beside a moving truck
+#define FCUT_064 64	// Giant pumpkin bursts through the house
+#define FCUT_065 65	// Policeman fighting Howard and Chewy
+#define FCUT_066 66 // Policeman loses from Howard and Chewy
+#define FCUT_067 67	// Chewy throws smoke at kid, so it spits a chewing gum at Howard
+#define FCUT_068 68	// Man runs out of room full of spiders
+#define FCUT_069 69	// Chewy enters phone booth, transforms into blonde woman
+#define FCUT_070 70	// Woman runs out of room full of spiders
+#define FCUT_071 71	// Best seller book presentation
+#define FCUT_072 72	// Chewy removes his woman disguise
+#define FCUT_073 73	// Train moving
+#define FCUT_074 74	// Howard and Chewy at docks, another man appears
+#define FCUT_075 75	// Howard and Chewy at docks, get thrown out of store
+#define FCUT_076 76	// Howard inside box, lid closes
+#define FCUT_077 77	// Chewy turns TV host into alien
+#define FCUT_078 78	// Fire alarm in TV console room
+#define FCUT_079 79	// Running away in the sewers
+#define FCUT_080 80	// Gasp ghost show TV set, rain starts
+#define FCUT_081 81	// Gasp ghost show TV set, Chewy and alien
+#define FCUT_082 82	// Gasp ghost show TV set, large monster prop is dropped on alien
+#define FCUT_083 83	// Lady screaming at piranha in cocktail glass
+#define FCUT_084 84 // Dropping inside trap in jungle
+#define FCUT_085 85 // Dropping inside trap in jungle (with Howard)
+#define FCUT_086 86 // King kong chasing hunters
+#define FCUT_087 87 // King kong fights alien spaceships
+#define FCUT_088 88 // King kong shouting
+#define FCUT_089 89	// Lasers shot at heroes outside temple (custom callback: Room87::proc5)
+#define FCUT_090 90	// Aliens abduct Nichelle
+#define FCUT_091 91 // Alien ship flies away with Nichelle
+#define FCUT_092 92 // Chewy taunts aliens opposite a cave
+#define FCUT_093 93 // Chewy, pink ball and statue turning into pink alien
+#define FCUT_094 94 // Pink alien talking (custom callback: Room87::proc3)
+#define FCUT_095 95 // Pink alien talking (custom callback: Room87::proc5)
+#define FCUT_096 96	// Pink alien jumping down
+#define FCUT_097 97 // Aliens coming out of door and shooting
+#define FCUT_098 98	// Chewy and pink alien running away from aliens
+#define FCUT_099 99	// Pink alien taking pink ball
+#define FCUT_100 100 // Heroes running away from aliens
+#define FCUT_101 101 // Heroes falling off waterfall
+#define FCUT_102 102 // Spaceship flying away from jungle and King Kong
+#define FCUT_103 103 // Spaceship flying
+#define FCUT_104 104 // Howard and Chewy beaming down
+#define FCUT_105 105 // Spaceship beams up the heroes and flies away
+#define FCUT_106 106 // Pink alien beams down the heroes
+#define FCUT_107 107 // Chewy shooting at slime police zeppelin (custom callback: Room90::proc5)
+#define FCUT_108 108 // Aliens entering hotel
+#define FCUT_109 109 // Rat jumping closeup
+#define FCUT_110 110 // Aliens at docks
+#define FCUT_111 111 // Rat closeup
+#define FCUT_112 112 // Alien band playing music (custom callback: Room56::proc1)
+#define FCUT_113 113 // Howard and Chewy beaming up
+#define FCUT_114 114 // Howard and Chewy opening a door leading outside building
+#define FCUT_115 115 // Aliens falling off building
+#define FCUT_116 116 // Ship in ocean
+#define FCUT_117 117 // Volcano erupting, F5 emerges from inside
+#define FCUT_118 118 // Ship flying above town
+#define FCUT_119 119 // Ship flying above town
+#define FCUT_120 120 // Howard and Chewy beaming down, shooting starts
+#define FCUT_121 121 // Zombie sheriff shoots small winding pink aliens
+#define FCUT_122 122 // Alien chases small winding pink alien
+#define FCUT_123 123 // Howard and Chewy on a wagon jumping a gap on train track
+#define FCUT_124 124 // Howard and Chewy on wagon
+#define FCUT_125 125 // Wagon crashes into alien
+#define FCUT_126 126 // Wagon running next to shooting alien
+#define FCUT_127 127 // Wagon reaching the end of the tracks
+#define FCUT_128 128 // Wagon reaching bridge
+#define FCUT_129 129 // Wagon crossing bridge
+#define FCUT_130 130 // Wagon crossing bridge
+#define FCUT_131 131 // Wagon moving
+#define FCUT_132 132 // Wagon moving
+#define FCUT_133 133 // Howard and Chewy on wagon
+#define FCUT_134 134 // Red spaceships (custom callback: flic_user_function)
+#define FCUT_135 135 // Red spaceships (custom callback: flic_user_function)
+#define FCUT_136 136 // Red spaceship shooting spaceship (custom callback: flic_user_function)
+#define FCUT_137 137 // Dogfight between red spaceship and spaceship (custom callback: flic_user_function)
+#define FCUT_138 138 // Spaceships flying from F5 (custom callback: flic_user_function)
+#define FCUT_139 139 // Chewy's spaceship enters bumper field (custom callback: flic_user_function)
+#define FCUT_140 140 // Purple aliens talking from inside spaceships (custom callback: flic_user_function)
+#define FCUT_141 141 // Purple alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_142 142 // Purple alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_143 143 // Purple alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_144 144 // Purple alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_145 145 // Purple alien talking from inside spaceship
+#define FCUT_146 146 // Purple alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_147 147 // Red space ship approaching Earth (custom callback: flic_user_function)
+#define FCUT_148 148 // Purple alien entering F5 and getting pink orb (custom callback: flic_user_function)
+#define FCUT_149 149 // Space ship shooting green bullet (custom callback: flic_user_function)
+#define FCUT_150 150 // Space ship generating force field (custom callback: flic_user_function)
+#define FCUT_151 151 // Alien talking from inside spaceship (custom callback: flic_user_function)
+#define FCUT_152 152 // Purple alien crash landing outside temple, natives appear (custom callback: flic_user_function)
+#define FCUT_153 153 // Red space ship crash landing in jungle (custom callback: flic_user_function)
+#define FCUT_154 154 // Red space ship being chased (custom callback: flic_user_function)
+#define FCUT_155 155 // Intro logos (German)
+#define FCUT_156 156 // Red space ship entering black hole (custom callback: flic_user_function)
+#define FCUT_157 157 // Red space ship travelling inside black hole (custom callback: flic_user_function)
+#define FCUT_158 158 // Howard and Chewy waking up
+#define FCUT_159 159 // Credits
+#define FCUT_155 160 // Intro logos (English)
 
 #define AUSGANG_LINKS 1
 #define AUSGANG_RECHTS 2
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 9a8db086170..e99f2740703 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -104,7 +104,7 @@ int16 Room23::start_gleiter() {
 				} else if (_G(spieler).R23GleiterExit == 16) {
 					out->setze_zeiger(nullptr);
 					out->cls();
-					flic_cut(FCUT_019, CFO_MODE);
+					flic_cut(FCUT_019_01, CFO_MODE);
 					_G(spieler).R23GleiterExit = 25;
 
 					cur_2_inventory();


Commit: d9cd0969318f8b0fc53041667599df413391337a
    https://github.com/scummvm/scummvm/commit/d9cd0969318f8b0fc53041667599df413391337a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:06-08:00

Commit Message:
CHEWY: Remove superfluous code

Changed paths:
    engines/chewy/rooms/room25.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 315b7bb4117..3fce1dfad82 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -75,7 +75,6 @@ void Room25::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, CFO_MODE);
 		g_engine->_sound->playSound(0, 0);
-		g_engine->_sound->playSound(0);
 		fx_blend = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;


Commit: 6c9177efebc5740aea7d1013d3c8befc947f183b
    https://github.com/scummvm/scummvm/commit/6c9177efebc5740aea7d1013d3c8befc947f183b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Remove unused video frame handling code

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 6fce4bb2c98..1588524532a 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -393,7 +393,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 						error("flic error");
 					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
-							uint32 start = g_system->getMillis() + custom_header.speed;
+							uint32 start = g_system->getMillis();
 							if (custom_frame.size) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									error("flic error");
@@ -447,15 +447,6 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 		switch (chead.type) {
 		case FADE_IN:
 			error("decode_custom_frame: Unused frame type FADE_IN found");
-#if 0
-			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else {
-				fade_flag = true;
-				fade_delay = para[0];
-			}
-#endif
 			break;
 
 		case FADE_OUT:
@@ -484,18 +475,6 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case LOAD_RAW:
 			error("decode_custom_frame: Unused frame type LOAD_RAW found");
-#if 0
-			if (!File::readArray(handle, &para[0], 1) ||
-			        handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else {
-				sounds[para[0]] = Sound;
-				Ssize[para[0]] = chead.size;
-				Sound += chead.size - 2;
-			}
-#endif
-
 			break;
 
 		case LOAD_VOC:
@@ -521,46 +500,10 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case PLAY_SEQ:
 			error("decode_custom_frame: Unused frame type PLAY_SEQ found");
-#if 0
-			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else {
-				if (!strncmp(th->id, "TMF\0", 4)) {
-#ifndef AIL
-					snd->playMod(th);
-					snd->stopMod();
-					snd->playSequence(para[0], para[1]);
-#else
-					ailsnd->playMod(th);
-					ailsnd->stopMod();
-					ailsnd->playSequence(para[0], para[1]);
-#endif
-				}
-			}
-#endif
 			break;
 
 		case PLAY_PATTERN:
 			error("decode_custom_frame: Unused frame type PLAY_PATTERN found");
-#if 0
-			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else {
-				if (!strncmp(th->id, "TMF\0", 4)) {
-#ifndef AIL
-					snd->playMod(th);
-					snd->stopMod();
-					snd->playPattern(para[0]);
-#else
-					ailsnd->playMod(th);
-					ailsnd->stopMod();
-					ailsnd->playPattern(para[0]);
-#endif
-				}
-			}
-#endif
 			break;
 
 		case STOP_MUSIC:
@@ -597,17 +540,6 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_LOOPMODE:
 			error("decode_custom_frame: Unused frame type SET_LOOPMODE found");
-#if 0
-			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				modul = DATEI;
-				fcode = READFEHLER;
-			} else
-#ifndef AIL
-				snd->setLoopMode(para[0]);
-#else
-				ailsnd->setLoopMode(para[0]);
-#endif
-#endif
 			break;
 
 		case PLAY_RAW:
@@ -681,9 +613,6 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case SET_SPEED:
 			error("decode_custom_frame: Unused frame type SET_SPEED found");
-#if 0
-			custom_header.speed = handle->readUint32LE();
-#endif
 			break;
 
 		case CLEAR_SCREEN:
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 811b090a9f8..2b3737bd8c1 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -521,7 +521,6 @@ struct CustomFlicHead {
 	uint16 frames = 0;
 	uint16 width = 0;
 	uint16 height = 0;
-	uint32 speed = 0;
 	uint32 oframe1 = 0;
 
 	bool load(Common::SeekableReadStream *src);


Commit: 620d85c172be7ffcc3c9831dbc3b73693eb18ba5
    https://github.com/scummvm/scummvm/commit/620d85c172be7ffcc3c9831dbc3b73693eb18ba5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Start hooking the new video code

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index d9440a06c73..f1c23ff22ce 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -27,7 +27,6 @@
 #include "chewy/rooms/rooms.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
-#include "chewy/video/cfo_decoder.h"
 
 namespace Chewy {
 
@@ -829,60 +828,6 @@ int16 flic_user_function(int16 keys) {
 	return ret;
 }
 
-#ifdef NEW_VIDEO_CODE
-static void playVideo(uint num) {
-	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
-	VideoResource *videoResource = new VideoResource("cut.tap");
-	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
-
-	if (!cfoDecoder->loadStream(videoStream)) {
-		delete videoResource;
-		delete cfoDecoder;
-		return;
-	}
-
-	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
-	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
-	bool skipVideo = false;
-	byte curPalette[256 * 3];
-
-	save_palette(curPalette);
-	//_vm->_cursor->hideCursor();	// TODO
-
-	cfoDecoder->start();
-
-	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo) {
-		if (cfoDecoder->needsUpdate()) {
-			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
-			if (frame) {
-				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
-
-				if (cfoDecoder->hasDirtyPalette())
-					setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
-
-				g_system->updateScreen();
-			}
-		}
-
-		Common::Event event;
-		while (g_system->getEventManager()->pollEvent(event)) {
-			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
-				skipVideo = true;
-		}
-
-		g_system->delayMillis(10);
-	}
-
-	cfoDecoder->close();
-
-	setScummVMPalette(curPalette, 0, 256);
-	//_vm->_cursor->showCursor();	// TODO
-
-	delete videoResource;
-	delete cfoDecoder;
-}
-#endif
-
 static void flic_proc1() {
 	const int16 VALS1[] = {
 		135,  145,  142,  140,  145,  144,  142,  134,  148,  138,
@@ -933,9 +878,8 @@ static void flic_proc1() {
 			mem->file->select_pool_item(Ci.Handle, flic_val2);
 			ret = flc->custom_play(&Ci);
 #else
-			playVideo(flic_val2);
+			g_engine->playVideo(flic_val2);
 #endif
-
 			flag = VALS4[i] && atds->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
@@ -993,94 +937,28 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1000:
 			ailsnd->stopMod();
 			CurrentSong = -1;
-#ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-#else
-			playVideo(nr);
-#endif // !NEW_VIDEO_CODE	
-			break;
-
-		case FCUT_019:
-		case 19:
-		case 20:
-		case 21:
-		case 22:
-		case 23:
-		case 24:
-		case 25:
-		case 26:
-		case 27:
-		case 28:
+			g_engine->playVideo(nr);
+			break;
+
+		case FCUT_019_01:
+		case FCUT_019_02:
+		case FCUT_019_03:
+		case FCUT_019_04:
+		case FCUT_019_05:
+		case FCUT_019_06:
+		case FCUT_019_07:
+		case FCUT_019_08:
+		case FCUT_019_09:
+		case FCUT_019_10:
+		case FCUT_019_11:
 			ailsnd->stopMod();
 			CurrentSong = -1;
-			nr = FCUT_019;
-#ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-#else
-			playVideo(nr);
-#endif // !NEW_VIDEO_CODE
+			nr = FCUT_019_01;
 			ailsnd->setLoopMode(1);
 
-			if (!modul && ret != -1) {
-#ifndef NEW_VIDEO_CODE
-				f->seek(ChunkHead::SIZE(), SEEK_CUR);
-				out->cls();
-				ret = flc->custom_play(&Ci);
-#else
-				playVideo(nr);
-#endif // !NEW_VIDEO_CODE
+			for (int i = 0; i < 11; i++)
+				g_engine->playVideo(FCUT_019_01 + i);
 
-				if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
-					mem->file->select_pool_item(Ci.Handle, 21);
-					out->cls();
-					flc->custom_play(&Ci);
-#else
-					playVideo(21);
-#endif
-
-					if (!modul) {
-#ifndef NEW_VIDEO_CODE
-						f->seek(ChunkHead::SIZE(), SEEK_CUR);
-						out->cls();
-						ret = flc->custom_play(&Ci);
-#else
-						playVideo(nr);
-#endif // !NEW_VIDEO_CODE
-					}
-				}
-			}
-			if (!modul) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 20);
-				out->cls();
-				flc->custom_play(&Ci);
-#else
-				playVideo(20);
-#endif
-			}
-			if (!modul) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 23);
-				out->cls();
-				flc->custom_play(&Ci);
-#else
-				playVideo(23);
-#endif
-			}
-			for (i = 0; i < 5; i++) {
-				if (!modul) {
-#ifndef NEW_VIDEO_CODE
-					f->seek(ChunkHead::SIZE(), SEEK_CUR);
-					out->cls();
-					ret = flc->custom_play(&Ci);
-#else
-					playVideo(nr);
-#endif
-				}
-			}
 			ailsnd->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
@@ -1119,70 +997,41 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_053:
 			for (i = 0; i < 3; ++i) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, nr);
-				flc->custom_play(&Ci);
-#else
-				playVideo(nr);
-#endif
+				g_engine->playVideo(nr);
 			}
 			break;
 
 		case FCUT_054:
-#ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-#else
-			playVideo(nr);
-			playVideo(nr);
-#endif
+			g_engine->playVideo(nr);
+			g_engine->playVideo(nr);
 			break;
 
 		case FCUT_058:
 			load_room_music(255);
-#ifndef NEW_VIDEO_CODE
-			nr = FCUT_058;
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-#else
-			playVideo(FCUT_058);
-#endif // !NEW_VIDEO_CODE
+			g_engine->playVideo(FCUT_058);
 
 			if (!modul) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FCUT_059);
-				flc->custom_play(&Ci);
-#else
-				playVideo(FCUT_059);
-#endif
+				g_engine->playVideo(FCUT_059);
 			}
 			if (!_G(spieler).R43GetPgLady) {
 				if (!modul) {
-#ifndef NEW_VIDEO_CODE
-					mem->file->select_pool_item(Ci.Handle, FCUT_060);
-					flc->custom_play(&Ci);
-#else
-					playVideo(FCUT_060);
-#endif
+					g_engine->playVideo(FCUT_060);
 				}
 			} else {
 				if (!modul) {
-					mem->file->select_pool_item(Ci.Handle, FCUT_061);
 					start_aad(623, -1);
+#ifndef NEW_VIDEO_CODE
+					mem->file->select_pool_item(Ci.Handle, FCUT_061);
 					flc->set_custom_user_function(Room43::setup_func);
 					flc->custom_play(&Ci);
 					flc->remove_custom_user_function();
-				}
-				if (!modul) {
-#ifndef NEW_VIDEO_CODE
-					mem->file->select_pool_item(Ci.Handle, FCUT_062);
-					flc->custom_play(&Ci);
 #else
-					playVideo(FCUT_062);
+					g_engine->playVideo(FCUT_061);
 #endif
 				}
+				if (!modul) {
+					g_engine->playVideo(FCUT_062);
+				}
 			}
 			ailsnd->fadeOut(0);
 			out->ausblenden(1);
@@ -1203,27 +1052,16 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_071:
 			ailsnd->stopMod();
 			CurrentSong = -1;
-#ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
-#else
-			playVideo(nr);
-#endif
+			g_engine->playVideo(FCUT_071);
 			break;
 
-		case 83:
+		case FCUT_083:
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 83);
-				flc->custom_play(&Ci);
-#else
-				playVideo(83);
-#endif
+				g_engine->playVideo(FCUT_083);
 			}
 
-
-		case 95:
+		case FCUT_095:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
@@ -1234,7 +1072,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			break;
 
-		case 112:
+		case FCUT_112:
 			ailsnd->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
@@ -1248,18 +1086,13 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->setMusicMasterVol(5);
 			break;
 
-		case 116:
+		case FCUT_116:
 			for (i = 0; i < 6; ++i) {
-#ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, nr);
-				flc->custom_play(&Ci);
-#else
-				playVideo(nr);
-#endif
+				g_engine->playVideo(nr);
 			}
 			break;
 
-		case 133:
+		case FCUT_133:
 		case 1123:
 			for (i = 0; i < 13 && i != -1 && !modul; ++i) {
 #ifndef NEW_VIDEO_CODE
@@ -1286,7 +1119,7 @@ void flic_cut(int16 nr, int16 mode) {
 			mem->file->select_pool_item(Ci.Handle, 1);
 			ret = flc->custom_play(&Ci);
 #else
-			playVideo(1);
+			g_engine->playVideo(FCUT_001);
 #endif
 
 			if (ret != -1) {
@@ -1340,7 +1173,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				out->cls();
-				mem->file->select_pool_item(Ci.Handle, 17);
+				mem->file->select_pool_item(Ci.Handle, FCUT_017);
 				fx->border(workpage, 100, 0, 0);
 			}
 #else
@@ -1385,16 +1218,10 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1031:
-#ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 31);
-			flc->custom_play(&Ci);
-#else
-			playVideo(31);
-#endif
+			g_engine->playVideo(FCUT_031);
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
-				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 43);
 				ret = flc->custom_play(&Ci);
@@ -1661,7 +1488,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1107:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 107);
+			mem->file->select_pool_item(Ci.Handle, FCUT_107);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(107);


Commit: eb83ea4bd8ac9e62cdb5bd1dd5354aecfdf032f4
    https://github.com/scummvm/scummvm/commit/eb83ea4bd8ac9e62cdb5bd1dd5354aecfdf032f4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Remove unused code

Changed paths:
    engines/chewy/effect.cpp
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_grafik.cpp
    engines/chewy/mcga_grafik.h
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room55.cpp


diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 9706556b8a7..d8b5d681c97 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -42,7 +42,6 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 					x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 				else
 					x = rnd_zeiger[i] * 8;
-				out->skip_line(skip_line);
 				out->box_fill(x, y, x + 8, y + 8, col);
 			}
 			out->set_palette(palette);
@@ -54,7 +53,6 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
 				x = rnd_zeiger[i] * 8;
-			out->skip_line(skip_line);
 			out->setze_zeiger(sram_speicher);
 			out->sprite_save(sp, x, y, 8, 8, 0);
 			out->setze_zeiger(screen);
@@ -79,7 +77,6 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 					out->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
 				for (int16 y1 = 24 - i; y1 >= i; y1--)
 					out->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
-				out->skip_line(frames);
 			}
 			out->set_palette(palette);
 		}
@@ -111,7 +108,6 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 					out->setze_zeiger(screen);
 					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
-				out->skip_line(frames);
 			}
 			break;
 
@@ -142,7 +138,6 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 					out->setze_zeiger(screen);
 					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
-				out->skip_line(frames);
 			}
 			break;
 
@@ -160,7 +155,6 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 			out->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
 			out->box_fill(x + 160, 0, x + 168, 200, farbe);
 			out->back2screen(workpage_);
-			out->skip_line(lines);
 		}
 	} else {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
@@ -168,7 +162,6 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 			out->box_fill(x, 0, x + 8, 200, farbe);
 			out->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
 			out->back2screen(workpage_);
-			out->skip_line(lines);
 		}
 	}
 }
@@ -180,7 +173,6 @@ void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
 			out->box_fill(0, 92 - y, 320, 92 - y + 8, col);
 			out->box_fill(0, 100 + y, 320, 108 + y, col);
 			out->back2screen(workpage_);
-			out->skip_line(lines);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
@@ -188,7 +180,6 @@ void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
 			out->box_fill(0, i, 320, i + 8, col);
 			out->box_fill(0, 192 - i, 320, 200 - i, col);
 			out->back2screen(workpage_);
-			out->skip_line(lines);
 		}
 	}
 }
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 1588524532a..7d62c514fdd 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -246,7 +246,6 @@ void flic::col256_chunk(byte *tmp) {
 	int packets = *(int16 *)tmp;
 	tmp += 2;
 
-	out->vsync_start();
 	if (cls_flag == true)
 		out->cls();
 	else
@@ -283,7 +282,6 @@ void flic::col64_chunk(byte *tmp) {
 	int packets = *((int16 *)tmp);
 	tmp += 2;
 
-	out->vsync_start();
 	if (cls_flag == true)
 		out->cls();
 	else
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index c86ae9a6166..6489b8a8dec 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -48,7 +48,6 @@ void standard_init() {
 	flc = new flic();
 	mov = new movclass();
 
-	out->vsync_start();
 	out->init();
 	out->cls();
 	out->palette_save();
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 7427ed739d5..8904e567027 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -241,7 +241,6 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				}
 			}
 			cur->show_cur();
-			out->skip_frame((int16)io->delay);
 			break;
 
 		case 80:
@@ -276,7 +275,6 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				}
 			}
 			cur->show_cur();
-			out->skip_frame((int16)io->delay);
 			break;
 
 		case 59:
@@ -438,7 +436,6 @@ void io_game::mark_eintrag(int16 y, int16 nr) {
 		else
 			out->printxy(io->popx + 28, y + 2, io->m_col[2], 300,
 			              scr_width, &file_find_g[nr][1]);
-		out->vsync_start();
 		out->box_fill(io->popx + 8, io->popy + 106, io->popx + 244, io->popy + 117,
 		               io->m_col[5]);
 		print_shad(io->popx + 8, io->popy + 106, io->m_col[0], 300, io->m_col[1],
@@ -487,7 +484,6 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 }
 
 void io_game::schalter_aus() {
-	out->vsync_start();
 	out->pop_box(io->popx + 163, io->popy + 6, io->popx + 241, io->popy + 18,
 	              io->m_col[0], io->m_col[1], io->m_col[5]);
 	if (io->f1)
@@ -503,7 +499,6 @@ void io_game::schalter_aus() {
 	if (io->f3)
 		out->printxy(io->popx + 167, io->popy + 41, io->m_col[1], 300, scr_width,
 		              FSTRING3);
-	out->vsync_start();
 	out->pop_box(io->popx + 163, io->popy + 6 + 16 * 3, io->popx + 241, io->popy + 18 + 16 * 3,
 	              io->m_col[0], io->m_col[1], io->m_col[5]);
 	if (io->f4)
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index adbc3fc2afe..9a71c8b61a7 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -64,7 +64,6 @@ ChewyFont *_font6;
 ChewyFont *_font8;
 FontMgr *_fontMgr;
 
-void r39_ok();
 void switch_room(int16 nr);
 
 void game_main() {
@@ -93,7 +92,6 @@ void game_main() {
 	remove(ADSH_TMP);
 	tidy();
 	out->rest_palette();
-	out->restore_mode();
 }
 
 void alloc_buffers() {
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index f897dc1cc68..71f6558a49b 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -46,26 +46,6 @@ void init_mcga() {
 	spriteWidth = 0;
 }
 
-void old_mode() {
-	// No implementation needed
-}
-
-void vflyback_start() {
-	// No implementation needed
-}
-
-void vflyback_end() {
-	// No implementation needed
-}
-
-void hflyback_start() {
-	// No implementation needed
-}
-
-void hflyback_end() {
-	// No implementation needed
-}
-
 void set_pointer(byte *ptr) {
 	if (ptr) {
 		_G(currentScreen) = ptr;
@@ -145,16 +125,6 @@ void mem2mcga(const byte *ptr) {
 	g_screen->markAllDirty();
 }
 
-void mem2mcga_masked(const byte *ptr, int16 maske) {
-	byte *destP = SCREEN;
-
-	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr, ++destP) {
-		byte pixel = *ptr;
-		if (pixel != maske)
-			*destP = pixel;
-	}
-}
-
 void mcga2mem(byte *ptr) {
 	const byte *srcP = SCREEN;
 	*((uint16 *)ptr) = SCREEN_WIDTH;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 326eb8d7095..628ced23a21 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -30,12 +30,7 @@ namespace Chewy {
 extern int fontFirst, fontLast;
 
 void init_mcga();
-void old_mode();
 
-void vflyback_start();
-void vflyback_end();
-void hflyback_start();
-void hflyback_end();
 void set_pointer(byte *ptr);
 byte *get_dispoff();
 
@@ -51,15 +46,7 @@ void setpixel_mcga(int16 x, int16 y, int16 farbe);
 uint8 getpix(int16 x, int16 y);
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 
-#ifdef EFFEKTE
-void split_in(byte *source);
-void fall_in(byte *source);
-void over_in(byte *source);
-void y_shrink(byte *source, byte *dest, int16 faktor, int16 zeile);
-#endif
-
 void mem2mcga(const byte *ptr);
-void mem2mcga_masked(const byte *ptr, int16 maske);
 void mcga2mem(byte *ptr);
 void mem2mem(const byte *ptr1, byte *ptr2);
 void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske);
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 1a934c3252d..199e6a1e979 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -113,10 +113,6 @@ void mcga_grafik::set_writemode(char wm) {
 	writemode = wm;
 }
 
-void mcga_grafik::restore_mode() {
-	old_mode();
-}
-
 void mcga_grafik::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	clipx1 = x1;
 	clipx2 = x2;
@@ -124,38 +120,6 @@ void mcga_grafik::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	clipy2 = y2;
 }
 
-void mcga_grafik::vsync_start() {
-	vflyback_start();
-}
-
-void mcga_grafik::vsync_end() {
-	vflyback_end();
-}
-
-void mcga_grafik::hsync_start() {
-	hflyback_start();
-}
-
-void mcga_grafik::hsync_end() {
-	hflyback_end();
-}
-
-void mcga_grafik::skip_frame(int16 frames) {
-	int16 i = 0;
-	for (i = 0; i < frames; i++) {
-		vflyback_start();
-		vflyback_end();
-	}
-}
-
-void mcga_grafik::skip_line(int16 lines) {
-	int16 i = 0;
-	for (i = 0; i < lines; i++) {
-		hflyback_start();
-		hflyback_end();
-	}
-}
-
 void mcga_grafik::setze_zeiger(byte *ptr) {
 	set_pointer(ptr);
 }
@@ -164,12 +128,6 @@ byte *mcga_grafik::get_zeiger() {
 	return get_dispoff();
 }
 
-void mcga_grafik::set_bildbreite(int16 breite) {
-	scr_w = breite;
-	if (!scr_w)
-		scr_w = 320;
-}
-
 void mcga_grafik::set_mono() {
 	mono = true;
 }
@@ -242,8 +200,6 @@ void mcga_grafik::einblenden(byte *palette, int16 frames) {
 			k += 3;
 		}
 		setpalette(pal_table);
-		if (frames)
-			skip_frame(frames);
 	}
 }
 
@@ -271,8 +227,6 @@ void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stuf
 			k += 3;
 		}
 		set_palpart(pal_table, startcol, anz);
-		if (frames)
-			skip_frame(frames);
 	}
 }
 
@@ -294,8 +248,6 @@ void mcga_grafik::ausblenden(int16 frames) {
 			k += 3;
 		}
 		setpalette(pal_table);
-		if (frames)
-			skip_frame(frames);
 	}
 }
 
@@ -319,8 +271,6 @@ void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frame
 			k += 3;
 		}
 		set_palpart(pal_table, startcol, anz);
-		if (frames)
-			skip_frame(frames);
 	}
 }
 
@@ -428,25 +378,6 @@ void mcga_grafik::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	}
 }
 
-#ifdef EFFEKTE
-void mcga_grafik::seit_in(char *source) {
-	split_in(source);
-}
-
-void mcga_grafik::falling_in(char *source) {
-	fall_in(source);
-}
-
-void mcga_grafik::ueberblend(char *source) {
-	over_in(source);
-}
-
-void mcga_grafik::y_shrumpf(char *source, char *dest, int16 faktor,
-                            int16 zeile) {
-	y_shrink(source, dest, faktor, zeile);
-}
-#endif
-
 void mcga_grafik::back2screen(byte *ptr) {
 	mem2mcga(ptr);
 }
@@ -455,10 +386,6 @@ void mcga_grafik::back2back(byte *ptr1, byte *ptr2) {
 	mem2mem(ptr1, ptr2);
 }
 
-void mcga_grafik::back2screen_maskiert(byte *ptr, int16 maske) {
-	mem2mcga_masked(ptr, maske);
-}
-
 void mcga_grafik::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
 	mem2mem_masked(ptr1, ptr2, maske);
 }
@@ -679,7 +606,6 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 
 						eing = 0;
 						move(x, y);
-						vsync_start();
 						for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
 							if (zstring[i] != 0) {
 								putz(zstring[i], fcol, bcol, scrwidth);
@@ -695,7 +621,6 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
 
 						{
-							skip_frame(1);
 							izahl = devices();
 							if (izahl == 13) {
 								eing = 2;
@@ -711,7 +636,6 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
 
 						{
-							skip_frame(1);
 							izahl = devices();
 							if (izahl == 13) {
 								eing = 2;
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_grafik.h
index e8b3f01e6d4..414b78cc7e2 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_grafik.h
@@ -60,21 +60,13 @@ public:
 	~mcga_grafik();
 
 	void init();
-	void restore_mode();
 	void set_writemode(char wm);
 	void init_mausmode(maus_info *minfo);
 	void exit_mausmode();
 
 	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
-	void vsync_start();
-	void vsync_end();
-	void hsync_start();
-	void hsync_end();
-	void skip_line(int16 lines);
-	void skip_frame(int16 frames);
 	void setze_zeiger(byte *ptr);
 	byte *get_zeiger();
-	void set_bildbreite(int16 breite);
 
 	void set_mono();
 	void calc_mono(byte *pal, int16 startcol, int16 anz);
@@ -100,21 +92,7 @@ public:
 	void kreis(int16 x, int16 y, int16 r, int16 farbe);
 	void fkreis(int16 x, int16 y, int16 r, int16 farbe);
 
-#ifdef EFFEKTE
-	void upscroll();
-	void downscroll();
-	void leftscroll();
-	void rightscroll();
-	void set_dispoff(int16 offset);
-	void seit_in(byte *source);
-	void falling_in(byte *source);
-	void ueberblend(byte *source);
-	void y_shrumpf(byte *source, byte *dest, int16 faktor,
-	               int16 zeile);
-#endif
-
 	void back2screen(byte *ptr);
-	void back2screen_maskiert(byte *ptr, int16 maske);
 	void screen2back(byte *ptr);
 	void back2back(byte *ptr1, byte *ptr2);
 	void back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske);
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 85a5da7725b..b52748b9a7b 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -167,7 +167,6 @@ void Room46::kloppe() {
 		}
 		
 		while (in->get_switch_code() == 0 && delay) {
-			out->skip_frame(1);
 			--delay;
 			SHOULD_QUIT_RETURN;
 		}
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 50371aa70e2..9f12314f726 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -231,7 +231,6 @@ int16 Room55::use_telefon() {
 					else
 						_G(spieler).scrollx = 0;
 					while (delay) {
-						out->skip_frame(1);
 						--delay;
 					}
 


Commit: 491952c6b68112ddce8a468d86edcc31007b12bd
    https://github.com/scummvm/scummvm/commit/491952c6b68112ddce8a468d86edcc31007b12bd
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Re-add accidentally removed FLIC speed code

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 7d62c514fdd..70483d9fc17 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -391,7 +391,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 						error("flic error");
 					} else {
 						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
-							uint32 start = g_system->getMillis();
+							uint32 start = g_system->getMillis() + custom_header.speed;
 							if (custom_frame.size) {
 								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
 									error("flic error");
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 2b3737bd8c1..811b090a9f8 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -521,6 +521,7 @@ struct CustomFlicHead {
 	uint16 frames = 0;
 	uint16 width = 0;
 	uint16 height = 0;
+	uint32 speed = 0;
 	uint32 oframe1 = 0;
 
 	bool load(Common::SeekableReadStream *src);


Commit: 14aa8d92f5ca1ea0d32808c9182981422a41ca92
    https://github.com/scummvm/scummvm/commit/14aa8d92f5ca1ea0d32808c9182981422a41ca92
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Remove unused code

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index e20fcf33b87..0e235e75da7 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -374,16 +374,6 @@ void ailclass::initNoteTable(uint16 sfreq) {
 	}
 }
 
-void ailclass::stopSound() {
-	warning("STUB: ailclass::stopSound()");
-
-#if 0
-	int16 i;
-	for (i = 4; i < 8; i++)
-		AIL_stop_sample(smp[i]);
-#endif
-}
-
 void ailclass::endSound() {
 	warning("STUB: ailclass::endSound()");
 
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 79ee421fa6d..4694385e75a 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -62,7 +62,6 @@ public:
 	void fadeOut(uint16 delay);
 
 	void endSound();
-	void stopSound();
 
 	void switchMusic(bool onOff);
 	void switchSound(bool onOff);


Commit: d0db1ee26c5ed0aaea82367c6f26d5b3f35b0b0a
    https://github.com/scummvm/scummvm/commit/d0db1ee26c5ed0aaea82367c6f26d5b3f35b0b0a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:07-08:00

Commit Message:
CHEWY: Remove more unused code

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/file.cpp
    engines/chewy/global.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/sound.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index 0e235e75da7..bd663beabf6 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -130,8 +130,6 @@ int16 SoundEnable = 0;
 int16 SoundCard = 0;
 int16 SoundMasterVol = 120;
 int16 MusicMasterVol = 120;
-int16 MusicSwitch = false;
-int16 SoundSwitch = false;
 int16 LoopEnable = OFF;
 int16 PlaybackMode = NORMAL_PLAYBACK;
 int16 StartPos = 0;
@@ -387,7 +385,7 @@ void ailclass::endSound() {
 void mod_irq() {
 	if (!InInterrupt) {
 		++InInterrupt;
-		if (MusicSwitch && (MusicStatus == ON)) {
+		if (MusicStatus == ON) {
 			checkSampleEnd();
 			if (PatternCount <= 0) {
 				PatternCount = CurrentTempo;
@@ -603,14 +601,4 @@ void DecodeChannel(int16 ch) {
 #endif
 }
 
-void ailclass::switchMusic(bool onOff) {
-	if (SoundEnable)
-		MusicSwitch = onOff;
-}
-
-void ailclass::switchSound(bool onOff) {
-	if (SoundEnable)
-		SoundSwitch = onOff;
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 4694385e75a..389199f1d69 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -62,9 +62,6 @@ public:
 	void fadeOut(uint16 delay);
 
 	void endSound();
-
-	void switchMusic(bool onOff);
-	void switchSound(bool onOff);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 02f431d26b5..e80286969cd 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -458,53 +458,51 @@ void option_menue(taf_info *ti) {
 		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
 		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
 
-		if (flags.InitSound) {
-			if (_G(spieler).SoundSwitch) {
-				out->sprite_set(ti->image[mund_ani],
-				                18 + ti->korrektur[mund_ani << 1],
-				                8 + ti->korrektur[(mund_ani << 1) + 1], 0);
-				out->sprite_set(ti->image[SCHNULL_OFF],
-				                18 + ti->korrektur[SCHNULL_OFF << 1],
-				                8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
-			} else {
-				out->sprite_set(ti->image[SCHNULLER],
-				                18 + ti->korrektur[SCHNULLER << 1],
-				                8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
-				out->sprite_set(ti->image[SCHNULL_BAND],
-				                18 + ti->korrektur[SCHNULL_BAND << 1],
-				                8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
-			}
-			out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
-			out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
-			out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
-
-			out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
-			out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
-			out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
-			if (_G(spieler).MusicSwitch) {
-				out->sprite_set(ti->image[MUSIC_ON1],
-				                18 + ti->korrektur[MUSIC_ON1 << 1],
-				                8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
-				out->sprite_set(ti->image[MUSIC_ON2],
-				                18 + ti->korrektur[MUSIC_ON2 << 1],
-				                8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
-			} else
-				out->sprite_set(ti->image[MUSIC_OFF],
-				                18 + ti->korrektur[MUSIC_OFF << 1],
-				                8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
-
-			if (_G(spieler).DisplayText) {
-				out->sprite_set(ti->image[tdisp_ani],
-				                18 + ti->korrektur[tdisp_ani << 1],
-				                8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
-				out->sprite_set(ti->image[TDISP_EIN],
-				                18 + ti->korrektur[TDISP_EIN << 1],
-				                8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
-			} else
-				out->sprite_set(ti->image[TDISP_AUS],
-				                18 + ti->korrektur[TDISP_AUS << 1],
-				                8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
+		if (_G(spieler).SoundSwitch) {
+			out->sprite_set(ti->image[mund_ani],
+				            18 + ti->korrektur[mund_ani << 1],
+				            8 + ti->korrektur[(mund_ani << 1) + 1], 0);
+			out->sprite_set(ti->image[SCHNULL_OFF],
+				            18 + ti->korrektur[SCHNULL_OFF << 1],
+				            8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
+		} else {
+			out->sprite_set(ti->image[SCHNULLER],
+				            18 + ti->korrektur[SCHNULLER << 1],
+				            8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
+			out->sprite_set(ti->image[SCHNULL_BAND],
+				            18 + ti->korrektur[SCHNULL_BAND << 1],
+				            8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
 		}
+		out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
+		out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
+		out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
+
+		out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
+		out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
+		out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
+		if (_G(spieler).MusicSwitch) {
+			out->sprite_set(ti->image[MUSIC_ON1],
+				            18 + ti->korrektur[MUSIC_ON1 << 1],
+				            8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
+			out->sprite_set(ti->image[MUSIC_ON2],
+				            18 + ti->korrektur[MUSIC_ON2 << 1],
+				            8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
+		} else
+			out->sprite_set(ti->image[MUSIC_OFF],
+				            18 + ti->korrektur[MUSIC_OFF << 1],
+				            8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
+
+		if (_G(spieler).DisplayText) {
+			out->sprite_set(ti->image[tdisp_ani],
+				            18 + ti->korrektur[tdisp_ani << 1],
+				            8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
+			out->sprite_set(ti->image[TDISP_EIN],
+				            18 + ti->korrektur[TDISP_EIN << 1],
+				            8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
+		} else
+			out->sprite_set(ti->image[TDISP_AUS],
+				            18 + ti->korrektur[TDISP_AUS << 1],
+				            8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
 
 		out->sprite_set(ti->image[EXIT],
 		                18 + ti->korrektur[EXIT << 1],
@@ -528,20 +526,16 @@ void option_menue(taf_info *ti) {
 					_G(spieler).SoundSwitch = false;
 					det->disable_room_sound();
 				} else {
-					if (flags.InitSound) {
-						_G(spieler).SoundSwitch = true;
-						det->enable_room_sound();
-					}
+					_G(spieler).SoundSwitch = true;
+					det->enable_room_sound();
 				}
 				break;
 			case 3:
 			case 4:
 				if (_G(spieler).DisplayText) {
-					if (flags.InitSound) {
-						_G(spieler).DisplayText = false;
-						atds->setHasSpeech(true);
-						_G(spieler).SpeechSwitch = true;
-					}
+					_G(spieler).DisplayText = false;
+					atds->setHasSpeech(true);
+					_G(spieler).SpeechSwitch = true;
 				} else {
 					_G(spieler).DisplayText = true;
 					atds->setHasSpeech(false);
@@ -552,7 +546,7 @@ void option_menue(taf_info *ti) {
 				if (_G(spieler).MusicSwitch) {
 					_G(spieler).MusicSwitch = false;
 					ailsnd->stopMod();
-				} else  if (flags.InitSound) {
+				} else {
 					_G(spieler).MusicSwitch = true;
 					CurrentSong = -1;
 					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 42cae34130c..7841a15a1b9 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -220,7 +220,7 @@ room_detail_info *Rdi;
 static_detail_info *Sdi;
 ani_detail_info *Adi;
 Flags flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-				0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+				0, 0, 0, 0, 0, 0, 0, 0, 0 };
 CustomInfo Ci;
 GotoPkt gpkt;
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 6489b8a8dec..c169f7e5224 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -389,7 +389,6 @@ void set_speed() {
 #define RAP10 9
 
 void sound_init() {
-	flags.InitSound = false;
 	_G(spieler).SoundSwitch = false;
 	_G(spieler).MusicSwitch = false;
 	frequenz = 22050;
@@ -402,9 +401,6 @@ void sound_init() {
 		_G(spieler).SoundVol = 63;
 		ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
 		ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
-		ailsnd->switchMusic(true);
-		ailsnd->switchSound(true);
-		flags.InitSound = true;
 
 		music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
@@ -430,7 +426,7 @@ void sound_init() {
 }
 
 void sound_exit() {
-	if (detect.SoundSource && flags.InitSound) {
+	if (detect.SoundSource) {
 		ailsnd->exitMixMode();
 		ailsnd->exit1();
 	}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 9a71c8b61a7..030a0c01030 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1208,37 +1208,6 @@ void check_shad(int16 g_idx, int16 mode) {
 		45, 3, 28,
 		45, 6, 32
 	};
-
-	if (flags.NoShad == false) {
-		switch (g_idx) {
-		case 1:
-			if (mode)
-				out->set_teilpalette(PAL_1, 1, 11);
-			palcopy(pal, PAL_1, 0, 0, 12);
-			break;
-
-		case 2:
-			if (mode)
-				out->set_teilpalette(PAL_2, 1, 11);
-			palcopy(pal, PAL_2, 0, 0, 12);
-			break;
-
-		case 3:
-			if (mode)
-				out->set_teilpalette(PAL_3, 1, 11);
-			palcopy(pal, PAL_3, 0, 0, 12);
-			break;
-
-		case 4:
-			if (mode)
-				out->set_teilpalette(PAL_0, 1, 11);
-			palcopy(pal, PAL_0, 0, 0, 12);
-			break;
-
-		default:
-			break;
-		}
-	}
 }
 
 void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w_, char *txtptr) {
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index f1c23ff22ce..192868b622c 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -307,7 +307,7 @@ int16 ged_user_func(int16 idx_nr) {
 void enter_room(int16 eib_nr) {
 	int16 i;
 
-	if ((!modul) && (flags.InitSound))
+	if (!modul)
 		load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
 	atds->stop_aad();
@@ -894,7 +894,7 @@ static void flic_proc1() {
 		start_aad(595);
 		atds->print_aad(254, 0);
 
-		if (flags.InitSound && _G(spieler).SpeechSwitch) {
+		if (_G(spieler).SpeechSwitch) {
 			g_engine->_sound->waitForSpeechToFinish();
 		} else {
 			delay(6000);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 670c0b1a7c4..0edd7700845 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -278,7 +278,7 @@ void Room28::set_pump() {
 				stop_person(P_HOWARD);
 				SetUpScreenFunc = nullptr;
 
-				if (flags.InitSound && _G(spieler).SpeechSwitch) {
+				if (_G(spieler).SpeechSwitch) {
 					g_engine->_sound->waitForSpeechToFinish();
 				}
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index b52748b9a7b..6285dc1c8ab 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -161,7 +161,7 @@ void Room46::kloppe() {
 		int16 delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
 
-		if (flags.InitSound && _G(spieler).SpeechSwitch) {
+		if (_G(spieler).SpeechSwitch) {
 			g_engine->_sound->waitForSpeechToFinish();
 			continue;
 		}
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index b067f1ea70f..31c13b6ffd4 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -100,7 +100,7 @@ void Room68::setup_func() {
 	case 1:
 		if (det->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = 2;
-			if (_G(spieler).SpeechSwitch && flags.InitSound) {
+			if (_G(spieler).SpeechSwitch) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(_G(r68HohesC));
 				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 46d5e6ade6f..e0d76cfcc9d 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -264,7 +264,7 @@ void Sound::convertTMFToMod(uint8 *tmfData, uint32 tmfSize, uint8 *modData, uint
 }
 
 void Sound::waitForSpeechToFinish() {
-	if (flags.InitSound && _G(spieler).SpeechSwitch) {
+	if (_G(spieler).SpeechSwitch) {
 		while (g_engine->_sound->isSpeechActive() && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7eaa5a54c18..4001b11e8c0 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -579,13 +579,11 @@ struct Flags {
 	uint16 InventMenu : 1;
 	uint16 NoScroll : 1;
 
-	bool InitSound : true;
 	uint16 ExitMov : 1;
 	uint16 MausTxt : 1;
 	uint16 LoadGame : 1;
 	uint16 main_maus_flag: 1;
 	uint16 ZoomMov : 1;
-	uint16 IcmEntry : 1;
 	uint16 SaveMenu : 1;
 
 	uint16 SpzAni : 1;
@@ -594,7 +592,6 @@ struct Flags {
 	uint16 NoPalAfterFlc : 1;
 	uint16 NoDiaBox : 1;
 	uint16 NoEndPosMovObj: 1;
-	uint16 NoShad : 1;
 	uint16 SavePersonRnr : 1;
 
 	uint16 CursorStatus : 1;


Commit: 666565dae9a65e59ea0874c53f909ae9f993cded
    https://github.com/scummvm/scummvm/commit/666565dae9a65e59ea0874c53f909ae9f993cded
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Use the new TAF sprite loading code

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/memory.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 738fb8bffc7..c3135da03f8 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -79,71 +79,6 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	return nr;
 }
 
-void datei::load_tafmcga(const char *fname, byte *sp, int16 nr) {
-	taf_imageheader iheader;
-	byte *speicher = sp;
-	taf_dateiheader *header = (taf_dateiheader *)tmp;
-
-	assign_filename(fname, ".taf");
-
-	int16 *abmess = (int16 *)speicher;
-	speicher += 4;
-	if (abmess) {
-		Common::File f;
-		if (f.open(filename)) {
-			if (header->load(&f)) {
-				int16 id = get_id(header->id);
-				if (id == TAFDATEI) {
-					uint32 image = 0;
-					if (header->korrekt == 1) {
-						uint32 next = header->next;
-						uint16 sprcount = 0;
-						while ((sprcount <= nr) && (nr <= header->count)) {
-							f.seek(next, SEEK_SET);
-							if (iheader.load(&f)) {
-								next = iheader.next;
-								image = iheader.image;
-							} else {
-								error("load_tafmcga error");
-							}
-							++sprcount;
-						}
-					} else {
-						f.seek((-(int)((header->count - nr) * sizeof(uint32))), SEEK_END);
-						uint32 next = f.readUint32LE();
-						f.seek(next, SEEK_SET);
-
-						if (iheader.load(&f)) {
-							next = iheader.next;
-							image = iheader.image;
-						} else {
-							error("load_tafmcga error");
-						}
-					}
-
-					abmess[0] = iheader.width;
-					abmess[1] = iheader.height;
-					const uint32 size = (uint32)(iheader.height * iheader.width);
-					int16 komp = iheader.komp;
-					f.seek(image, SEEK_SET);
-					read_tbf_image(&f, komp, size, speicher);
-
-				} else {
-					error("load_tafmcga error");
-				}
-			} else {
-				error("load_tafmcga error");
-			}
-
-			f.close();
-		} else {
-			error("load_tafmcga error");
-		}
-	} else {
-		error("load_tafmcga error");
-	}
-}
-
 void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher) {
 	read_tbf_image(handle, komp, size, speicher);
 }
@@ -625,38 +560,6 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 	}
 }
 
-void datei::imsize(const char *fname, uint32 *svekt) {
-	taf_dateiheader *header = (taf_dateiheader *)tmp;
-
-	assign_filename(fname, ".taf");
-
-	Common::File f;
-	if (f.open(filename)) {
-		if (header->load(&f)) {
-			int16 id = get_id(header->id);
-			if ((id == TAFDATEI) && (header->mode == 19)) {
-				uint32 next = header->next;
-				uint16 sprcount = 0;
-				while (sprcount < header->count) {
-					f.seek(next, SEEK_SET);
-					taf_imageheader iheader;
-					if (iheader.load(&f)) {
-						next = iheader.next;
-						svekt[sprcount] = (uint32)iheader.width * (uint32)iheader.height;
-					} else {
-						error("imsize error");
-					}
-					++sprcount;
-				}
-			}
-		}
-
-		f.close();
-	} else {
-		error("imsize error");
-	}
-}
-
 int16 datei::get_id(char *id_code) {
 	int16 id = -1;
 	if (!(scumm_strnicmp(id_code, "TBF", 3)))
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index db27eca7975..3ac62668374 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -34,11 +34,8 @@ public:
 	datei();
 	~datei();
 
-	void load_tafmcga(const char *fname, byte *sp, int16 nr);
-
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
-	uint32 load_voc(Stream *stream, byte *speicher);
 	uint32 load_tmf(Stream *stream, tmf_header *song);
 
 	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
@@ -49,7 +46,6 @@ public:
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
 	void load_palette(const char *fname, byte *palette, int16 typ);
-	void imsize(const char *fname, uint32 *svekt);
 
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 58d8bbad822..15278abc84c 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -27,7 +27,6 @@ namespace Chewy {
 
 extern int16 modul;
 extern int16 fcode;
-uint32 imagesize[MAXSPRITE];
 memory::memory() {
 	file = nullptr;
 }
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index a4118d843e5..1b0d351bdf3 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -158,22 +158,6 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	}
 }
 
-void Room::load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr) {
-	uint32 imagesize[MAXSPRITE] = {0};
-	if (palette != nullptr)
-		mem->file->load_palette(filename, palette, TAFDATEI);
-	if (!modul) {
-		imagesize[sprnr] = 0l;
-		mem->file->imsize(filename, imagesize);
-		if (!modul) {
-			*speicher = (byte *)MALLOC((imagesize[sprnr]) + 4l);
-			if (!modul) {
-				mem->file->load_tafmcga(filename, *speicher, sprnr);
-			}
-		}
-	}
-}
-
 void Room::set_timer_start(int16 timer_start) {
 	room_timer.TimerStart = timer_start;
 }
@@ -247,10 +231,18 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 		memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
 		memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
 
+		SpriteResource *spriteRes = new SpriteResource(Rb->InvFile);
+
 		for (int16 i = 1; i < obj->mov_obj_room[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->mov_obj_room[i]]) {
-
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->mov_obj_room[i]], nullptr, (int16)obj->mov_obj_room[i]);
+				TAFChunk *sprite = spriteRes->getSprite(obj->mov_obj_room[i]);
+				Rb->InvSprAdr[obj->mov_obj_room[i]] = (byte *)MALLOC(sprite->width * sprite->height + 4);
+				// Sprite width and height is piggy-banked inside the sprite data
+				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[obj->mov_obj_room[i]];
+				memPtr[0] = sprite->width;
+				memPtr[1] = sprite->height;
+				memcpy(Rb->InvSprAdr[obj->mov_obj_room[i]] + 4, sprite->data, sprite->width * sprite->height);
+				delete sprite;
 			} else {
 				Rb->InvSprAdr[obj->mov_obj_room[i]] = tmp_inv_spr[obj->mov_obj_room[i]];
 				tmp_inv_spr[obj->mov_obj_room[i]] = nullptr;
@@ -259,8 +251,14 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 
 		for (int16 i = 1; i < obj->spieler_invnr[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->spieler_invnr[i]]) {
-
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[obj->spieler_invnr[i]], nullptr, (int16)obj->spieler_invnr[i]);
+				TAFChunk *sprite = spriteRes->getSprite(obj->spieler_invnr[i]);
+				Rb->InvSprAdr[obj->spieler_invnr[i]] = (byte *)MALLOC(sprite->width * sprite->height + 4);
+				// Sprite width and height is piggy-banked inside the sprite data
+				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[obj->spieler_invnr[i]];
+				memPtr[0] = sprite->width;
+				memPtr[1] = sprite->height;
+				memcpy(Rb->InvSprAdr[obj->spieler_invnr[i]] + 4, sprite->data, sprite->width * sprite->height);
+				delete sprite;
 			} else {
 				Rb->InvSprAdr[obj->spieler_invnr[i]] = tmp_inv_spr[obj->spieler_invnr[i]];
 				tmp_inv_spr[obj->spieler_invnr[i]] = 0;
@@ -273,9 +271,19 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 		}
 
 		if (player->AkInvent != -1) {
-			if (Rb->InvSprAdr[player->AkInvent] == nullptr)
-				load_taf(Rb->InvFile, &Rb->InvSprAdr[player->AkInvent], nullptr, (int16)player->AkInvent);
+			if (Rb->InvSprAdr[player->AkInvent] == nullptr) {
+				TAFChunk *sprite = spriteRes->getSprite(player->AkInvent);
+				Rb->InvSprAdr[player->AkInvent] = (byte *)MALLOC(sprite->width * sprite->height + 4);
+				// Sprite width and height is piggy-banked inside the sprite data
+				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[player->AkInvent];
+				memPtr[0] = sprite->width;
+				memPtr[1] = sprite->height;
+				memcpy(Rb->InvSprAdr[player->AkInvent] + 4, sprite->data, sprite->width * sprite->height);
+				delete sprite;
+			}
 		}
+
+		delete spriteRes;
 	}
 }
 
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index d58cf4ec1d1..fc5a6ff5705 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -93,8 +93,6 @@ public:
 
 	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
 
-	void load_taf(const char *filename, byte **speicher, byte *palette, int16 sprnr);
-
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
 
 	byte *get_ablage(int16 nr);


Commit: ee5b444f0dac5a630f2289ac1f3c4c2b634fe252
    https://github.com/scummvm/scummvm/commit/ee5b444f0dac5a630f2289ac1f3c4c2b634fe252
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Commented out duplicate define

Changed paths:
    engines/chewy/defines.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index c6d6a829141..93507abf2d6 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -576,7 +576,7 @@ enum SetupScreenMode {
 #define FCUT_157 157 // Red space ship travelling inside black hole (custom callback: flic_user_function)
 #define FCUT_158 158 // Howard and Chewy waking up
 #define FCUT_159 159 // Credits
-#define FCUT_155 160 // Intro logos (English)
+//#define FCUT_155 160 // Intro logos (English)
 
 #define AUSGANG_LINKS 1
 #define AUSGANG_RECHTS 2


Commit: 7408afa36ce9fd84d29c785ec4e874813cc6b799
    https://github.com/scummvm/scummvm/commit/7408afa36ce9fd84d29c785ec4e874813cc6b799
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Added a bunch of quit checks to flic playback

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 192868b622c..fd6035a5736 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -956,8 +956,10 @@ void flic_cut(int16 nr, int16 mode) {
 			nr = FCUT_019_01;
 			ailsnd->setLoopMode(1);
 
-			for (int i = 0; i < 11; i++)
+			for (i = 0; i < 11; i++) {
 				g_engine->playVideo(FCUT_019_01 + i);
+				SHOULD_QUIT_RETURN;
+			}
 
 			ailsnd->fadeOut(0);
 			out->ausblenden(1);
@@ -975,6 +977,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
 #endif
@@ -989,6 +992,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
 #endif
@@ -998,6 +1002,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_053:
 			for (i = 0; i < 3; ++i) {
 				g_engine->playVideo(nr);
+				SHOULD_QUIT_RETURN;
 			}
 			break;
 
@@ -1036,7 +1041,7 @@ void flic_cut(int16 nr, int16 mode) {
 			ailsnd->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
-			while (ailsnd->musicPlaying());
+			while (ailsnd->musicPlaying() && !SHOULD_QUIT);
 			break;
 
 		case FCUT_065:
@@ -1059,6 +1064,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				g_engine->playVideo(FCUT_083);
+				SHOULD_QUIT_RETURN;
 			}
 
 		case FCUT_095:
@@ -1089,6 +1095,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_116:
 			for (i = 0; i < 6; ++i) {
 				g_engine->playVideo(nr);
+				SHOULD_QUIT_RETURN;
 			}
 			break;
 
@@ -1098,6 +1105,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_133[i]);
 #endif
@@ -1129,6 +1137,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 					mem->file->select_pool_item(Ci.Handle, i + 3);
 					ret = flc->custom_play(&Ci);
+					SHOULD_QUIT_RETURN;
 #else
 					playVideo(i + 3);
 #endif
@@ -1142,6 +1151,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 6);
 #endif
@@ -1153,6 +1163,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 9);
 				flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 9);
 #endif
@@ -1162,6 +1173,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1012:
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
+				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 12);
 				ret = flc->custom_play(&Ci);
@@ -1188,6 +1200,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 15);
 #endif
@@ -1207,6 +1220,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1045[i]);
 #endif
@@ -1279,6 +1293,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 55);
 #endif
@@ -1348,6 +1363,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 65);
 				flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 65);
 #endif
@@ -1367,6 +1383,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, 70);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(70);
 #endif
@@ -1381,7 +1398,7 @@ void flic_cut(int16 nr, int16 mode) {
 			playVideo(69);
 #endif
 
-			for (i = 0; i < 2 && ret != -1; ++i) {
+			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				fx->spr_blende(workpage, 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 71);
@@ -1400,6 +1417,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + FLIC_CUT_1074[i]);
 #endif
@@ -1412,6 +1430,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1080[i]);
 #endif
@@ -1431,6 +1450,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				mem->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 102);
 #endif
@@ -1471,6 +1491,7 @@ void flic_cut(int16 nr, int16 mode) {
 				}
 
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 			}
 			break;
 
@@ -1480,6 +1501,7 @@ void flic_cut(int16 nr, int16 mode) {
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
 				out->cls();
 				flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1106[i]);
 #endif
@@ -1558,6 +1580,7 @@ void flic_cut(int16 nr, int16 mode) {
 				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
 				out->cls();
 				ret = flc->custom_play(&Ci);
+				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1113[i]);
 #endif


Commit: fd7e82993d025fbac159e69a68a55bf0bb16281d
    https://github.com/scummvm/scummvm/commit/fd7e82993d025fbac159e69a68a55bf0bb16281d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Fix overrun on SpritePos array

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/ngsdefs.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index a6fc08215b9..703c5f3c193 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -845,6 +845,7 @@ void detail::load_sprite_pointer(Stream *stream) {
 			uint16 anzahl = header.count;
 			rs->seek(header.next, SEEK_SET);
 			SpritePos[0] = header.next;
+			assert(anzahl < MAXSPRITE);
 
 			for (int16 i = 1; i < anzahl && !modul; i++) {
 				taf_imageheader iheader;
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 1c19d272083..a1d1cb1a88d 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -26,7 +26,7 @@
 
 namespace Chewy {
 
-#define MAXSPRITE 350
+#define MAXSPRITE 620
 #define NOSPEICHER 0
 #define MAXFONTBREITE 32
 #define MAXFONTHOEHE 32


Commit: fd8a494be31349600f73be62d53e4bbd9c7c0d0f
    https://github.com/scummvm/scummvm/commit/fd8a494be31349600f73be62d53e4bbd9c7c0d0f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Fix cursor change guard in scene 97

Changed paths:
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index c4d17ccb7d3..7d79e315f9d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -198,7 +198,7 @@ void Room97::setup_func() {
 		}
 	}
 
-	if (!_G(spieler).flags37_1 && menu_item == CUR_WALK) {
+	if (_G(spieler).flags37_1 && menu_item == CUR_WALK) {
 		if (_G(spieler).scrollx + minfo.x >= 487 && _G(spieler).scrollx + minfo.x <= 522 && minfo.y >= 23 && minfo.y <= 59)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else


Commit: 2707dda8d4afcb5ca0e892ffdc98af4cf2e14109
    https://github.com/scummvm/scummvm/commit/2707dda8d4afcb5ca0e892ffdc98af4cf2e14109
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Fix initial walkable areas in room 97

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index fd6035a5736..4d242aab2d6 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -245,7 +245,7 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 97:
-			if (!_G(spieler).flags35_80)
+			if (_G(spieler).flags35_80)
 				idx_nr = 0;
 			break;
 


Commit: 700e357cc5ff10d6cda9e56e8f71a40485e77ebf
    https://github.com/scummvm/scummvm/commit/700e357cc5ff10d6cda9e56e8f71a40485e77ebf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:08-08:00

Commit Message:
CHEWY: Add debugger command for showing walkable areas

Changed paths:
    engines/chewy/chewy.h
    engines/chewy/debugger.cpp
    engines/chewy/debugger.h
    engines/chewy/main.cpp


diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index 0495aeb5485..a2e9fed2d74 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -70,6 +70,7 @@ public:
 	Sound *_sound = nullptr;
 	Graphics::Screen *_screen = nullptr;
 	bool _canLoadSave = false;
+	bool _showWalkAreas = false;
 
 public:
 	ChewyEngine(OSystem *syst, const ChewyGameDescription *gameDesc);
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 4d2bf120e9e..d47da88611c 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -23,6 +23,7 @@
 #include "chewy/debugger.h"
 #include "chewy/global.h"
 #include "chewy/ngshext.h"
+#include "chewy/chewy.h"
 
 namespace Chewy {
 
@@ -46,6 +47,7 @@ Debugger::Debugger() : GUI::Debugger() {
 	registerCmd("room", WRAP_METHOD(Debugger, Cmd_GotoRoom));
 	registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
 	registerCmd("video", WRAP_METHOD(Debugger, Cmd_PlayVideo));
+	registerCmd("walk", WRAP_METHOD(Debugger, Cmd_WalkAreas));
 }
 
 Debugger::~Debugger() {
@@ -91,4 +93,9 @@ bool Debugger::Cmd_PlayVideo(int argc, const char **argv) {
 	return false;
 }
 
+bool Debugger::Cmd_WalkAreas(int argc, const char **argv) {
+	g_engine->_showWalkAreas = (argc == 2) && !strcmp(argv[1], "on");
+	return false;
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/debugger.h b/engines/chewy/debugger.h
index 42cd62b3440..e4a13c3f5ff 100644
--- a/engines/chewy/debugger.h
+++ b/engines/chewy/debugger.h
@@ -31,6 +31,7 @@ protected:
 	bool Cmd_GotoRoom(int argc, const char **argv);
 	bool Cmd_Item(int argc, const char **argv);
 	bool Cmd_PlayVideo(int argc, const char **argv);
+	bool Cmd_WalkAreas(int argc, const char **argv);
 
 public:
 	Debugger();
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 030a0c01030..42648eaea9d 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -537,6 +537,27 @@ int16 main_loop(int16 mode) {
 	return ende;
 }
 
+static void showWalkAreas() {
+	int xs = (_G(spieler).scrollx / 8) * 8,
+		ys = (_G(spieler).scrolly / 8) * 8;
+
+	for (int y = 0, yp = ys; y < 200 / 8; ++y, yp += 8) {
+		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
+			int idx = ged->ged_idx(xp, yp,
+				room->GedXAnz[room_blk.AkAblage],
+				ged_mem[room_blk.AkAblage]);
+
+			if (idx) {
+				Common::Rect r(xp, yp, xp + 8, yp + 8);
+				r.translate(-_G(spieler).scrollx, -_G(spieler).scrolly);
+				r.clip(Common::Rect(0, 0, 320, 200));
+
+				g_screen->frameRect(r, 0xff);
+			}
+		}
+	}
+}
+
 void set_up_screen(SetupScreenMode mode) {
 	int16 nr;
 	int16 tmp;
@@ -714,6 +735,9 @@ void set_up_screen(SetupScreenMode mode) {
 		fx_blend = BLEND_NONE;
 	}
 
+	if (g_engine->_showWalkAreas)
+		showWalkAreas();
+
 	_G(cur_hide_flag) = false;
 	ScrXy = (int16 *)ablage[room_blk.AkAblage];
 	if (!menu_display)


Commit: 729735434f5296ed64e44d6188d06530cef4a878
    https://github.com/scummvm/scummvm/commit/729735434f5296ed64e44d6188d06530cef4a878
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Fix another walkable area check in room 97

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 4d242aab2d6..aa974c05cea 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -281,7 +281,7 @@ int16 ged_user_func(int16 idx_nr) {
 			break;
 
 		case 97:
-			if (!_G(spieler).flags36_20)
+			if (_G(spieler).flags36_20)
 				idx_nr = 0;
 			break;
 


Commit: 206432b7a941b78c8f77795102058c64a1afe893
    https://github.com/scummvm/scummvm/commit/206432b7a941b78c8f77795102058c64a1afe893
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Fix gedAction indexing for room 97

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index aa974c05cea..870e76cc3b4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -132,6 +132,7 @@ void timer_action(int16 t_nr) {
 }
 
 void check_ged_action(int16 index) {
+	int16 orig_index = index;
 	index -= 50;
 	index /= 4;
 
@@ -162,7 +163,7 @@ void check_ged_action(int16 index) {
 		GED_ACTION(52);
 		GED_ACTION(55);
 		GED_ACTION(94);
-		GED_ACTION(97);
+		case 97: Room97::gedAction(orig_index); break;
 
 		default:
 			break;


Commit: eb791c7514f67618d7fa669f58a028e3440a9581
    https://github.com/scummvm/scummvm/commit/eb791c7514f67618d7fa669f58a028e3440a9581
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Fixes for eye sensor anim in room 97, endgame comments

Changed paths:
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/rooms/room97.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 2237073cd98..687cee2bc0a 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -71,6 +71,7 @@ void Room89::entry() {
 		switch_room(92);
 		show_cur();
 	} else if (_G(spieler).flags35_4) {
+		// End sequence
 		hide_cur();
 		set_person_pos(138, 82, P_CHEWY, P_RIGHT);
 		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
@@ -89,6 +90,7 @@ void Room89::entry() {
 		flags.NoPalAfterFlc = true;
 		flic_cut(119, CFO_MODE);
 
+		// Squash screen into a single point at the center
 		int edi = -20;
 		int var24 = 0;
 		out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
@@ -103,6 +105,7 @@ void Room89::entry() {
 			g_events->delay(30);
 		}
 
+		// Unsquish out thanks for playing screen
 		out->setze_zeiger(workptr);
 		out->cls();
 		out->printxy(70, 80, 15, 0, 0, "Thank you for playing");
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 7d79e315f9d..1e3ec0d60f7 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -30,7 +30,7 @@ namespace Chewy {
 namespace Rooms {
 
 int Room97::_word18DB2E;
-bool Room97::_bool18DB30;
+bool Room97::_slimeThrown;
 bool Room97::_bool18DB32;
 int Room97::_word18DB34;
 int Room97::_word18DB36;
@@ -151,7 +151,7 @@ void Room97::gedAction(int index) {
 			auto_scroll(268, 0);
 		break;
 	case 56:
-		proc15();
+		sensorAnim();
 		break;
 	default:
 		break;
@@ -656,11 +656,11 @@ void Room97::proc13() {
 	flags.AutoAniPlay = false;
 }
 
-int Room97::proc14() {
+int Room97::throwSlime() {
 	if (!is_cur_inventar(SLIME_INV))
 		return 0;
 
-	_bool18DB30 = true;
+	_slimeThrown = true;
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
 	menu_item = CUR_USE;
@@ -669,7 +669,7 @@ int Room97::proc14() {
 	return 1;
 }
 
-void Room97::proc15() {
+void Room97::sensorAnim() {
 	if (_G(spieler).flags37_4 || flags.AutoAniPlay)
 		return;
 
@@ -679,19 +679,22 @@ void Room97::proc15() {
 	cursor_wahl(CUR_USE);
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
-	_bool18DB30 = false;
+	_slimeThrown = false;
+	det->start_detail(16, 1, 0);
 	
-	while (det->get_ani_detail(16) != nullptr) {
+	while (det->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
 		if (minfo.button == 1 || in->get_switch_code() == 28) {
 			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
+
 		set_up_screen(DO_SETUP);
+		SHOULD_QUIT_RETURN;
 	}
 
 	hide_cur();
-	if (_bool18DB30) {
+	if (!_slimeThrown) {
 		start_detail_wait(17, 1, ANI_VOR);
 		det->start_detail(16, 1, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -707,6 +710,7 @@ void Room97::proc15() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(27);
 		start_detail_wait(18, 1, ANI_VOR);
+
 		g_engine->_sound->playSound(8, 0);
 		g_engine->_sound->stopSound(1);
 		start_detail_wait(8, 1, ANI_VOR);
@@ -722,8 +726,10 @@ void Room97::proc15() {
 		flags.AutoAniPlay = true;
 		auto_move(7, P_CHEWY);
 
-		while (_G(spieler).scrollx < 368)
+		while (_G(spieler).scrollx < 368) {
 			set_up_screen(DO_SETUP);
+			SHOULD_QUIT_RETURN;
+		}
 
 		det->show_static_spr(26);
 		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
diff --git a/engines/chewy/rooms/room97.h b/engines/chewy/rooms/room97.h
index 5c1ad5cdc9e..c57f1a5844d 100644
--- a/engines/chewy/rooms/room97.h
+++ b/engines/chewy/rooms/room97.h
@@ -28,7 +28,7 @@ namespace Rooms {
 class Room97 {
 private:
 	static int _word18DB2E;
-	static bool _bool18DB30;
+	static bool _slimeThrown;
 	static bool _bool18DB32;
 	static int _word18DB34;
 	static int _word18DB36;
@@ -42,7 +42,7 @@ private:
 	static void proc4();
 	static void proc12();
 	static void proc13();
-	static void proc15();
+	static void sensorAnim();
 
 public:
 	static void entry();
@@ -56,7 +56,7 @@ public:
 	static int proc9();
 	static int proc10();
 	static int proc11();
-	static int proc14();
+	static int throwSlime();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index a8b60da83ac..bb02cef7fb3 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -753,7 +753,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 541:
-						action_ret = Room97::proc14();
+						action_ret = Room97::throwSlime();
 						break;
 
 					case 542:


Commit: beed42963373d4db63b0adaa0e224bb5fdbd752f
    https://github.com/scummvm/scummvm/commit/beed42963373d4db63b0adaa0e224bb5fdbd752f
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Remove unused feature detection code

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 7841a15a1b9..ca35c1e761a 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -200,7 +200,6 @@ int16 life_handler;
 void (*SetUpScreenFunc)();
 
 SprInfo spr_info[MAX_PROG_ANI];
-DetectInfo detect;
 maus_info minfo;
 kb_info kbinfo;
 cur_blk curblk;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c21a44b9224..1f679e02280 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -184,7 +184,6 @@ extern char *life_str;
 extern int16 life_handler;
 
 extern SprInfo spr_info[MAX_PROG_ANI];
-extern DetectInfo detect;
 extern maus_info minfo;
 extern kb_info kbinfo;
 extern cur_blk curblk;
@@ -353,16 +352,12 @@ int16 is_chewy_busy();
 
 void standard_init();
 
-void get_detect(char *fname);
-
 void tidy();
 
 void init_load();
 
 void var_init();
 
-void get_frame_speed(char *work_page, char *source);
-
 void set_speed();
 
 void new_game();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index c169f7e5224..88308725fb1 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -323,20 +323,6 @@ void init_load() {
 	out->set_palette(pal);
 }
 
-void get_detect(char *fname_) {
-	modul = 0;
-	fcode = 0;
-	Stream *handle = chewy_fopen(fname_, "rb");
-	if (handle) {
-		if (!chewy_fread(&detect, sizeof(DetectInfo), 1, handle)) {
-			error("get_detect error");
-		}
-		chewy_fclose(handle);
-	} else {
-		error("get_detect error");
-	}
-}
-
 void tidy() {
 	sound_exit();
 	in->alter_kb_handler();
@@ -393,43 +379,36 @@ void sound_init() {
 	_G(spieler).MusicSwitch = false;
 	frequenz = 22050;
 
-	detect.SoundSource = ailsnd->init(frequenz);
-
-	if (detect.SoundSource) {
-		ailsnd->initMixMode();
-		_G(spieler).MusicVol = 63;
-		_G(spieler).SoundVol = 63;
-		ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
-		ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+	ailsnd->initMixMode();
+	_G(spieler).MusicVol = 63;
+	_G(spieler).SoundVol = 63;
+	ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
+	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
 
-		music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
-		det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
+	music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+	det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
-		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
-		assert(rs);
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
+	assert(rs);
 
-		rs->seek(0);
-		EndOfPool = 0;
-		NewPhead Nph;
-		if (!Nph.load(rs)) {
-			error("sound_init error");
-		} else {
-			EndOfPool = Nph.PoolAnz - 1;
-		}
-
-		atds->setHasSpeech(true);
-		_G(spieler).DisplayText = false;
-		_G(spieler).SoundSwitch = true;
-		_G(spieler).MusicSwitch = true;
-		_G(spieler).SpeechSwitch = true;
+	rs->seek(0);
+	EndOfPool = 0;
+	NewPhead Nph;
+	if (!Nph.load(rs)) {
+		error("sound_init error");
+	} else {
+		EndOfPool = Nph.PoolAnz - 1;
 	}
+
+	atds->setHasSpeech(true);
+	_G(spieler).DisplayText = false;
+	_G(spieler).SoundSwitch = true;
+	_G(spieler).MusicSwitch = true;
+	_G(spieler).SpeechSwitch = true;
 }
 
 void sound_exit() {
-	if (detect.SoundSource) {
-		ailsnd->exitMixMode();
-		ailsnd->exit1();
-	}
+	ailsnd->exitMixMode();
 }
 
 #define CSP_INT "csp.int"
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 811b090a9f8..f6b78890b13 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -359,34 +359,6 @@ struct vesa_modus_block {
 	char dummy[100] = { 0 };
 };
 
-struct DetectInfo {
-	int16 Adlib = 0;
-	int16 Port = 0;
-	int16 Irq = 0;
-	int16 Dma = 0;
-	int16 SoundSource = 0;
-
-	int16 VideoRam = 0;
-	int16 VgaDisplay = 0;
-
-	int16 Ems = 0;
-	int16 EmsVerV = 0;
-	int16 EmsVerN = 0;
-	int16 EmsPages = 0;
-	int16 EmsFree = 0;
-	char *EmsPage0 = nullptr;
-	char *EmsPage1 = nullptr;
-	char *EmsPage2 = nullptr;
-	char *EmsPage3 = nullptr;
-	int16 Joy = 0;
-
-	int16 Himem = 0;
-	int16 CpuId = 0;
-
-	int16 Fpu = 0;
-	int16 Manuell = 0;
-};
-
 struct iog_init {
 	char id[4] = { 0 };
 	char save_path[30] = { 0 };


Commit: 70713e4a63da5856c45dd893f4bdb356937fd2f7
    https://github.com/scummvm/scummvm/commit/70713e4a63da5856c45dd893f4bdb356937fd2f7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Remove unused sound code

Changed paths:
    engines/chewy/ailclass.cpp
    engines/chewy/ailclass.h
    engines/chewy/flic.cpp


diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/ailclass.cpp
index bd663beabf6..a757ac6187f 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/ailclass.cpp
@@ -127,7 +127,6 @@ int16 TimerEnabled = false;
 int16 RealVoices;
 
 int16 SoundEnable = 0;
-int16 SoundCard = 0;
 int16 SoundMasterVol = 120;
 int16 MusicMasterVol = 120;
 int16 LoopEnable = OFF;
@@ -166,27 +165,6 @@ ailclass::ailclass() {
 
 ailclass::~ailclass() {
 	warning("STUB: ailclass::~ailclass()");
-
-#if 0
-	if (SoundCard != NONE)
-		AIL_shutdown();
-#endif
-}
-
-int16 ailclass::init(uint16 freq) {
-	warning("STUB: ailclass::init()");
-
-	return SOUNDBLASTER;
-}
-
-int16 ailclass::init(char *midiDrvName) {
-	return SoundCard;
-}
-
-void ailclass::exit1() {
-	warning("STUB: ailclass::exit1()");
-	// AIL_shutdown();
-	SoundCard = NONE;
 }
 
 void ailclass::setMusicMasterVol(int16 vol) {
@@ -322,14 +300,6 @@ void ailclass::setLoopMode(int16 mode) {
 		LoopEnable = mode;
 }
 
-void ailclass::fadeIn(uint16 delay) {
-	FadeVol = MusicMasterVol;
-	MusicMasterVol = 0;
-	FadeStart = delay;
-	FadeCounter = 0;
-	MusicFade = FADE_IN;
-}
-
 void ailclass::fadeOut(uint16 delay) {
 	FadeStart = delay;
 	FadeCounter = 0;
diff --git a/engines/chewy/ailclass.h b/engines/chewy/ailclass.h
index 389199f1d69..58c6513fe15 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/ailclass.h
@@ -37,10 +37,6 @@ public:
 	ailclass();
 	~ailclass();
 
-	int16 init(uint16 freq);
-	int16 init(char *midiDrvName);
-	void exit1();
-
 	void setMusicMasterVol(int16 vol);
 	void setSoundMasterVol(int16 vol);
 	void disableSound();
@@ -58,7 +54,6 @@ public:
 	void playSequence(int16 startPos, int16 endPos);
 	void playPattern(int16 pattern);
 	void setLoopMode(int16 mode);
-	void fadeIn(uint16 delay);
 	void fadeOut(uint16 delay);
 
 	void endSound();
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 70483d9fc17..89d06ad087c 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -581,14 +581,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case MFADE_IN:
-			if (!File::readArray(handle, &para[0], chead.size / 2)) {
-				error("flic error");
-			} else
-#ifndef AIL
-				snd->fadeIn(para[0]);
-#else
-				ailsnd->fadeIn(para[0]);
-#endif
+			error("decode_custom_frame: Unused frame type MFADE_IN found");
 			break;
 
 		case MFADE_OUT:


Commit: bc17ade120bdf1ba857556b8fe54ac99bab5ae9f
    https://github.com/scummvm/scummvm/commit/bc17ade120bdf1ba857556b8fe54ac99bab5ae9f
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Remove unused defines

Changed paths:
    engines/chewy/ngsdefs.h


diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index a1d1cb1a88d..c4dd49aed32 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -31,26 +31,9 @@ namespace Chewy {
 #define MAXFONTBREITE 32
 #define MAXFONTHOEHE 32
 
-/*
-#define master_clear outportb(0x00d,0)
-#define flipflop_clear outportb(0x00c,0)
-#define all_mask_set outportb(0x00f,0x0ff)
-#define all_mask_clear outportb(0x00f,0)
-#define read_status inportb(0x008)
-#define set_kommando(komm) outportb(0x008,komm);
-*/
-
 #define CHECK 0x00
 #define WRITE 0x04
 #define READ 0x08
-#define AUTOINIT_EIN 0x10
-#define AUTOINIT_AUS 0x00
-#define ADRESSDEC 0x20
-#define ADRESSINC 0x00
-#define REQUESTMODE 0x00
-#define SINGLEMODE 0x40
-#define BLOCKMODE 0x80
-#define KASKAMODE 0xc0
 
 #define MCGA_SPEICHER 64000L
 #define SETZEN 0
@@ -60,58 +43,6 @@ namespace Chewy {
 
 #define COPY_PAGE out->screen2screen
 
-#define PAGE_0_1 0,0,316,199,0,0,0,80
-#define PAGE_0_2 0,0,316,199,0,0,0,160*200
-#define PAGE_0_3 0,0,316,199,0,0,0,160*200+80
-#define PAGE_1_0 0,0,316,199,0,0,80,0
-#define PAGE_1_2 0,0,316,199,0,0,80,160*200
-#define PAGE_1_3 0,0,316,199,0,0,80,160*200+80
-#define PAGE_2_0 0,0,316,199,0,0,160*200,0
-#define PAGE_2_1 0,0,316,199,0,0,160*200,80
-#define PAGE_2_3 0,0,316,199,0,0,160*200,160*200+80
-#define PAGE_3_0 0,0,316,199,0,0,160*200+80,0
-#define PAGE_3_1 0,0,316,199,0,0,160*200+80,80
-#define PAGE_3_2 0,0,316,199,0,0,160*200+80,160*200
-#define PAGE_R_L 0,0,316,399,0,0,80,0
-#define PAGE_L_R 0,0,316,399,0,0,0,80
-#define PAGE_D_U 0,0,635,199,0,0,160*200,0
-#define PAGE_U_D 0,0,635,199,0,0,0,160*200
-
-#define PAGEWA_0_1 0,0,316,199,0,0,0,80
-#define PAGEWA_0_2 0,0,316,199,0,0,0,160
-#define PAGEWA_0_3 0,0,316,199,0,0,0,240
-#define PAGEWA_1_0 0,0,316,199,0,0,80,0
-#define PAGEWA_1_2 0,0,316,199,0,0,80,160
-#define PAGEWA_1_3 0,0,316,199,0,0,80,240
-#define PAGEWA_2_0 0,0,316,199,0,0,160,0
-#define PAGEWA_2_1 0,0,316,199,0,0,160,80
-#define PAGEWA_2_3 0,0,316,199,0,0,160,240
-#define PAGEWA_3_0 0,0,316,199,0,0,240,0
-#define PAGEWA_3_1 0,0,316,199,0,0,240,80
-#define PAGEWA_3_2 0,0,316,199,0,0,240,160
-
-#define PAGESE_0_1 0,0,316,199,0,0,0,80*200
-#define PAGESE_0_2 0,0,316,199,0,0,0,80*400
-#define PAGESE_0_3 0,0,316,199,0,0,0,80*600
-#define PAGESE_1_0 0,0,316,199,0,0,80*200,0
-#define PAGESE_1_2 0,0,316,199,0,0,80*200,80*400
-#define PAGESE_1_3 0,0,316,199,0,0,80*200,80*600
-#define PAGESE_2_0 0,0,316,199,0,0,80*400,0
-#define PAGESE_2_1 0,0,316,199,0,0,80*400,80*200
-#define PAGESE_2_3 0,0,316,199,0,0,80*400,80*600
-#define PAGESE_3_0 0,0,316,199,0,0,80*600,0
-#define PAGESE_3_1 0,0,316,199,0,0,80*600,80*200
-#define PAGESE_3_2 0,0,316,199,0,0,80*600,80*400
-
-#define MODE640X400X256 0x100
-#define MODE640X480X256 0x101
-#define MODE800X600X16 0x102
-#define MODE800X600X256 0x103
-#define MODE1024X768X16 0x104
-#define MODE1024X768X256 0x105
-#define MODE1280X1024X16 0x106
-#define MODE1280X1024X256 0x107
-
 #define END_POOL 32767
 
 #define MAXDIRS 50
@@ -152,13 +83,6 @@ namespace Chewy {
 #define SCREENSAVE 0
 #define SPRITESAVE 1
 
-#define MAUS 4
-#define NICHT_BEWEGT 0
-#define LINKS 1
-#define RECHTS 2
-#define HOCH 3
-#define RUNTER 4
-
 #define ALT 0x1000
 #define SHIFT_LEFT Common::KEYCODE_LSHIFT
 #define SHIFT_RIGHT Common::KEYCODE_RSHIFT
@@ -235,28 +159,6 @@ namespace Chewy {
 #define NEIN 0
 #define ON 1
 #define OFF 0
-#define KEINE 0
-#define SPEAKER 1
-#define ADLIB 2
-#define SOUNDBLASTER 3
-#define SB_PRO 4
-#define SB_16_ASP 5
-
-#define NONE 0
-#define MDA 1
-#define CGA 2
-#define EGAMono 3
-#define EGAColor 4
-#define VGAMono 5
-#define VGAColor 6
-#define MCGAMono 7
-#define MCGAColor 8
-#define I86 0
-#define I186 1
-#define I286 2
-#define I386sx 3
-#define I386dx 4
-#define I486 5
 
 } // namespace Chewy
 


Commit: 7e1e2188a2d7646493978de8fb04fad70f2ba709
    https://github.com/scummvm/scummvm/commit/7e1e2188a2d7646493978de8fb04fad70f2ba709
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:09-08:00

Commit Message:
CHEWY: Remove obsolete palette code

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/memory.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index c3135da03f8..075496bf66d 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -459,9 +459,8 @@ uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
 	return size;
 }
 
-void datei::load_palette(const char *fname, byte *palette, int16 typ) {
-	tbf_dateiheader *tbfheader = (tbf_dateiheader *)tmp;
-	pcx_header *pcxheader = (pcx_header *)tmp;
+// Currently only used for TAF palettes from taf_adr(). Will be removed
+void datei::load_palette(const char *fname, byte *palette) {
 	taf_dateiheader *tafheader = (taf_dateiheader *)tmp;
 
 	strncpy(filename, fname, MAXPATH - 5);
@@ -469,87 +468,20 @@ void datei::load_palette(const char *fname, byte *palette, int16 typ) {
 
 	Common::File f;
 	if (!strchr(filename, '.')) {
-		switch (typ) {
-		case TBFDATEI:
-		case TPFDATEI:
-			strcat(filename, ".tbf");
-			break;
-		case PCXDATEI:
-			strcat(filename, ".pcx");
-			break;
-		case TAFDATEI:
-			strcat(filename, ".taf");
-			break;
-		default:
-			error("load_palette error");
-		}
+		strcat(filename, ".taf");
 	}
 
 	if (!modul) {
 		if (f.open(filename)) {
-			switch (typ) {
-			case TBFDATEI:
-			case TPFDATEI:
-				if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
-					int16 id = get_id(tbfheader->id);
-					if (((id == TBFDATEI) || (id == TPFDATEI)) &&
-					        (tbfheader->mode == 19)) {
-						for (uint16 i = 0; i < 768; i++)
-							palette[i] = tbfheader->palette[i];
-					} else {
-						error("load_palette error");
-					}
-				} else {
-					error("load_palette error");
-				}
-				break;
-
-			case PCXDATEI:
-				if (chewy_fread(pcxheader, sizeof(pcx_header), 1, &f)) {
-					if ((pcxheader->id == 10) && (pcxheader->version == 5)
-					        && (pcxheader->bpp == 8)) {
-						if (!f.seek(-769L, SEEK_END)) {
-							uint8 zeichen = f.readByte();
-							if (zeichen == 12) {
-								f.seek(-768L, SEEK_END);
-								if ((chewy_fread(palette, 768, 1, &f)) != 1) {
-									error("load_palette error");
-								} else {
-									uint16 j = 0;
-									for (uint16 i = 0; i < 255; i++) {
-										palette[j] >>= 2;
-										palette[j + 1] >>= 2;
-										palette[j + 2] >>= 2;
-										j += 3;
-									}
-								}
-							} else {
-								error("load_palette error");
-							}
-						}
-					} else {
-						error("load_palette error");
-					}
+			if (tafheader->load(&f)) {
+				int16 id = get_id(tafheader->id);
+				if ((id == TAFDATEI) && (tafheader->mode == 19)) {
+					for (uint16 i = 0; i < 768; i++)
+						palette[i] = tafheader->palette[i];
 				} else {
 					error("load_palette error");
 				}
-				break;
-
-			case TAFDATEI:
-				if (tafheader->load(&f)) {
-					int16 id = get_id(tafheader->id);
-					if ((id == TAFDATEI) && (tafheader->mode == 19)) {
-						for (uint16 i = 0; i < 768; i++)
-							palette[i] = tafheader->palette[i];
-					} else {
-						error("load_palette error");
-					}
-				} else {
-					error("load_palette error");
-				}
-				break;
-
-			default:
+			} else {
 				error("load_palette error");
 			}
 
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index 3ac62668374..b2ff3294e31 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -45,7 +45,7 @@ public:
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
-	void load_palette(const char *fname, byte *palette, int16 typ);
+	void load_palette(const char *fname, byte *palette);
 
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 15278abc84c..160cf5ef183 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -55,7 +55,7 @@ taf_info *memory::taf_adr(const char *filename) {
 			tinfo->image = (byte **)(tmp1 + sizeof(taf_info));
 			tinfo->palette = tmp1 + size;
 			tinfo->anzahl = anz_image;
-			file->load_palette(filename, tinfo->palette, TAFDATEI);
+			file->load_palette(filename, tinfo->palette);
 			if (!modul) {
 				tempptr = tmp1 + (((uint32)sizeof(taf_info)) + kgroesse);
 				file ->load_full_taf(filename, tempptr, tinfo);


Commit: 748bbf12d2932dcf99e88545d014db00f831f4ad
    https://github.com/scummvm/scummvm/commit/748bbf12d2932dcf99e88545d014db00f831f4ad
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: Remove more unused resource handling code

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/memory.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 075496bf66d..5b35927e06a 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -269,6 +269,9 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 	return size;
 }
 
+// Only used in 2 places, will be removed eventually:
+// tff_adr() with type TFFDATEI
+// void_adr() with type 200
 uint32 datei::size(const char *fname, int16 typ) {
 	uint32 size = 0;
 	tbf_dateiheader *tbfheader = (tbf_dateiheader *)tmp;
@@ -278,31 +281,8 @@ uint32 datei::size(const char *fname, int16 typ) {
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
 
-	if (!strchr(filename, '.')) {
-		switch (typ) {
-		case TBFDATEI:
-		case TPFDATEI:
-			strcat(filename, ".tbf");
-			break;
-		case PCXDATEI:
-			strcat(filename, ".pcx");
-			break;
-		case TFFDATEI:
-			strcat(filename, ".tff");
-			break;
-		case VOCDATEI:
-			strcat(filename, ".voc");
-			break;
-		case MODDATEI:
-			strcat(filename, ".mod");
-			break;
-		case TMFDATEI:
-			strcat(filename, ".tmf");
-			typ = 300;
-			break;
-		default:
-			break;
-		}
+	if (!strchr(filename, '.') && typ == TFFDATEI) {
+		strcat(filename, ".tff");
 	}
 
 	// SCUMMVM: Note to self, use sizeof(structures) for
@@ -310,35 +290,6 @@ uint32 datei::size(const char *fname, int16 typ) {
 	Common::File f;
 	if (f.open(filename)) {
 		switch (typ) {
-		case TBFDATEI:
-		case TPFDATEI:
-			if (chewy_fread(tbfheader, sizeof(tbf_dateiheader), 1, &f)) {
-				int16 id = get_id(tbfheader->id);
-				if ((id == TBFDATEI) || (id == TPFDATEI)) {
-					size = tbfheader->entpsize + 4;
-				} else {
-					error("size error");
-				}
-			} else {
-				error("size error");
-			}
-			break;
-
-		case PCXDATEI:
-			if (chewy_fread(pcxheader, sizeof(pcx_header), 1, &f)) {
-				if ((pcxheader->id == 10) && (pcxheader->version == 5)
-				        && (pcxheader->bpp == 8)) {
-					uint16 hoehe = (pcxheader->ymax - pcxheader->ymin) + 1;
-					uint16 breite = pcxheader->bpz * pcxheader->planes;
-					size = (uint32)((long)hoehe) * ((long)breite) + 4;
-				} else {
-					error("size error");
-				}
-			} else {
-				error("size error");
-			}
-			break;
-
 		case TFFDATEI: {
 			tff_header tff;
 			if (tff.load(&f)) {
@@ -353,33 +304,6 @@ uint32 datei::size(const char *fname, int16 typ) {
 			}
 			}
 			break;
-
-		case VOCDATEI:
-			size = (uint32)f.size() - sizeof(voc_header);
-			break;
-
-		case MODDATEI: {
-			size = (uint32)f.size();
-			int16 id = 0;
-
-			if (chewy_fread(mh, sizeof(mod_header), 1, &f)) {
-				if (!strncmp(mh->id, "M.K.", 4))
-					id = 1;
-				if (!strncmp(mh->id, "M!K!", 4))
-					id = 2;
-				if (!strncmp(mh->id, "FLT4", 4))
-					id = 3;
-				if (!strncmp(mh->id, "FLT8", 4))
-					id = 4;
-			}
-			if (id)
-				size -= (uint32)sizeof(mod_header);
-			else
-				size -= (uint32)sizeof(mod15_header);
-			size += sizeof(tmf_header);
-			}
-			break;
-
 		default:
 			size = (uint32)f.size();
 			break;
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 160cf5ef183..5516b6f2da5 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -186,6 +186,7 @@ void memory::tff_adr(const char *filename, byte **speicher) {
 	}
 }
 
+// Only called from init_load() with filename blende.rnd
 byte *memory::void_adr(const char *filename) {
 	uint32 size = 0;
 	byte *ptr = 0;


Commit: cbe29e4b1529ae86e3253a68ea578c1d2174922d
    https://github.com/scummvm/scummvm/commit/cbe29e4b1529ae86e3253a68ea578c1d2174922d
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY : WIP implementation of gbook

Changed paths:
    engines/chewy/file.cpp


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index e80286969cd..608dc08096d 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -66,7 +66,100 @@ static const int16 FILE_ICONS[8 * 4] = {
 	232, 143, 310, 193
 };
 
-Common::File *File::open(const char *name) {
+static const int16 ARRAY187546[65][2] = {
+	{40,  160}, {80,  170}, {40,  190}, {80,  200}, {80,  210},
+	{40,  230}, {80,  240}, {80,  250}, {80,  260}, {40,  280},
+	{80,  290}, {80,  300}, {80,  310}, {80,  320}, {40,  340},
+	{80,  350}, {80,  360}, {40,  380}, {80,  390}, {40,  410},
+	{80,  420}, {40,  440}, {80,  450}, {40,  470}, {80,  480},
+	{80,  490}, {80,  500}, {80,  510}, {80,  520}, {40,  540},
+	{80,  550}, {80,  560}, {80,  570}, {80,  580}, {40,  600},
+	{80,  610}, {80,  620}, {80,  630}, {80,  640}, {80,  650},
+	{80,  660}, {80,  670}, {80,  680}, {80,  690}, {80,  700},
+	{80,  710}, {80,  720}, {80,  730}, {80,  740}, {80,  750},
+	{80,  760}, {40,  780}, {40,  790}, {40,  800}, {40,  810},
+	{40,  820}, {40,  840}, {80,  850}, {40,  870}, {80,  880},
+	{80,  890}, {80,  910}, {80,  920}, {80,  930}, {80,  940}
+};
+
+static const bool ARRAY187504[65] = {
+	true, false, true, false, false, true, false, false, false, true,
+	false, false, false, false, true, false, false, true, false, true,
+	false, true, false, true, false, false, false, false, false, true,
+	false, false, false, false, true, false, false, false, false, false,
+	false, false, false, false, false, false, false, false, false, false,
+	false, true, true, true, true, true, true, false, true, false,
+	false, true, true, true, true
+};
+
+static const char *ARRAY187070[65] = {
+	"Idea & Story:",
+	"Carsten Wieland",
+	"Programming:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Graphics & Animation:",
+	"Carsten Wieland",
+	"Nihat Keesen",
+	"Stefan Frank",
+	"Text & Dialogues:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Carsten Wieland",
+	"Wolfgang Walk",
+	"Music:",
+	"Carsten Wieland",
+	"Stelter Studios",
+	"Sound FX:",
+	"Helmut Theuerkauf",
+	"Producer & Lecturer:",
+	"Wolfgang Walk",
+	"Minister of financial affairs:",
+	"Carsten (Dagobert) Korte",
+	"Testers:",
+	"Lutz Rafflenbeul",
+	"Thomas Friedmann",
+	"Bernhard Ewers",
+	"Christian von der Hotline",
+	"Carsten Korte",
+	"The voices:",
+	"Chewy......Renier Baaken",
+	"Howard.....Wolfgang Walk",
+	"Nichelle...Indhira Mohammed",
+	"Clint......Alexander Schottky",
+	"Also cast:",
+	"Renier Baaken",
+	"Guido B_94h_sherz", // FIXME
+	"Gerhard Fehn",
+	"Alice Krause",
+	"Reinhard Lie_E1h_Willi Meyer", //FIXME
+	"Nicole Meister",
+	"Lutz Rafflenbeul",
+	"Alexander Schottky",
+	"Bernd Schulze",
+	"Susanne Simenec",
+	"Helmut Theuerkauf",
+	"Andreas Vogelpoth",
+	"Mark Wagener",
+	"Wolfgang Walk",
+	"Thomas Piet Wiesenm_81h_ller", //FIXME
+	"Speech recorded by",
+	"tmp Studio, Moers by Willi Meyer",
+	"Cut by Hartmut Stelter",
+	"Studios Hamburg and",
+	"Carsten Wieland",
+	"Soundsystem:",
+	"AIL (c) Miles Design",
+	"Adventure Engine:",
+	"I.C.M. developed by",
+	"New Generation Software",
+	"Song Boo Boo Ba Baby composed",
+	"by Haiko Ruttmann,",
+	"Lyrics Wolfgang Walk,",
+	"feIndhira Mohammed."
+};
+
+	Common::File *File::open(const char *name) {
 	Common::File *f = new Common::File();
 	if (f->open(name)) {
 		return f;
@@ -408,19 +501,7 @@ int16 file_menue() {
 }
 
 void option_menue(taf_info *ti) {
-	int16 key;
-	int16 surimy_ani;
-	int16 mund_ani;
-	int16 mund_delay;
-	int16 mund_count;
-	int16 tdisp_ani;
-	int16 tdisp_delay;
-	int16 tdisp_count;
-	int16 rect;
 	long akt_clock = 0, stop_clock = 0;
-	//int16 TmpFrame;
-	int16 delay_count;
-	short bar_off;
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
@@ -429,16 +510,16 @@ void option_menue(taf_info *ti) {
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 	out->setze_zeiger(workptr);
-	key = 0;
-	surimy_ani = SURIMY_START;
-	mund_ani = MUND_START;
-	mund_delay = 3;
-	mund_count = mund_delay;
-	tdisp_ani = TDISP_START;
-	tdisp_delay = 3;
-	tdisp_count = tdisp_delay;
+	int16 key = 0;
+	int16 surimy_ani = SURIMY_START;
+	int16 mund_ani = MUND_START;
+	int16 mund_delay = 3;
+	int16 mund_count = mund_delay;
+	int16 tdisp_ani = TDISP_START;
+	int16 tdisp_delay = 3;
+	int16 tdisp_count = tdisp_delay;
 	FrameSpeed = 0;
-	delay_count = _G(spieler).DelaySpeed;
+	int16 delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
 	while (key != ESC) {
 		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
@@ -454,7 +535,7 @@ void option_menue(taf_info *ti) {
 
 		out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
 		                8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
-		bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
+		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
 		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
 		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
 
@@ -511,7 +592,7 @@ void option_menue(taf_info *ti) {
 		key = in->get_switch_code();
 		if ((minfo.button == 1) || (key == ENTER)) {
 			WAIT_TASTE_LOS
-			rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
+			int16 rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
 				if (_G(spieler).FramesPerSecond > 6)
@@ -628,6 +709,81 @@ void option_menue(taf_info *ti) {
 }
 
 void gbook() {
-	warning("STUB - gbook()");
-}
+	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
+	room->load_tgp(5, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	out->setze_zeiger(screen0);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+
+	for (int i = 0; i < 6; ++i) {
+		int esi = 63 - (6 * i);
+		
+		out->raster_col(6 - i, esi, 0, 0);
+		out->raster_col(7 + i, esi, 0, 0);
+
+		esi = 63 - (4 * i);
+		out->raster_col(37 - i, esi, esi, esi);
+		out->raster_col(38 + i, esi, esi, esi);		
+	}
+
+	_G(spieler).DelaySpeed = 2;
+
+	int edi = 0;	
+	bool endLoop = false;
+	while (!endLoop) {
+		if (in->get_switch_code() == 1)
+			endLoop = true;
+
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+
+		if (in->get_switch_code() == 1)
+			endLoop = true;
+
+		_G(spieler).scrollx++;
+		if (_G(spieler).scrollx >= 320)
+			_G(spieler).scrollx = 0;
+
+		++edi;
+		g_events->delay(50);
+		int esp_4 = 0;
+		
+		for (int i = 0; i < 65; ++i) {
+			int edx = ARRAY187546[i][1] - edi;
+			if (edx >= 160 || edx <= 40)
+				continue;
+			int esp_8;
+			if (ARRAY187504[i]) {
+				esp_8 = 32;
+				out->set_fontadr(font6x8);
+				out->set_vorschub(fvorx6x8, fvorx6x8);
+			} else {
+				esp_8 = 1;
+				out->set_fontadr(font8x8);
+				out->set_vorschub(fvorx8x8, fvorx8x8);
+			}
+			esp_4 = 1;
+
+			// txt->str_pos((char *)&ARRAY187070, i);
+			int fgCol = esp_8 + (160 - (ARRAY187546[i][1] - edi)) / 10;
+			out->printxy(ARRAY187546[i][0], ARRAY187546[i][1], fgCol, 300, scr_width, ARRAY187070[i]);
+		}
+
+		if (esp_4 == 0)
+			endLoop = true;
+
+		out->setze_zeiger(nullptr);
+		out->back2screen(workpage);
+	}
+
+	out->set_fontadr(font8x8);
+	out->set_vorschub(fvorx8x8, fvorx8x8);
+	room->open_handle("back/episode1.tgp", "rb", 0);
+
+	room->set_ak_pal(&room_blk);
+	hide_cur();
+	uhr->reset_timer(0, 5);
+	}
 } // namespace Chewy


Commit: 4ca5ea2e894bb43dd762f56ddb775c3035323a17
    https://github.com/scummvm/scummvm/commit/4ca5ea2e894bb43dd762f56ddb775c3035323a17
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: Fix a bug in gbook, reduce some variable scopes in printxy

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 608dc08096d..47557fd61ab 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -718,19 +718,19 @@ void gbook() {
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
-		int esi = 63 - (6 * i);
+		int color = 63 - (6 * i);
 		
-		out->raster_col(6 - i, esi, 0, 0);
-		out->raster_col(7 + i, esi, 0, 0);
+		out->raster_col(6 - i, color, 0, 0);
+		out->raster_col(7 + i, color, 0, 0);
 
-		esi = 63 - (4 * i);
-		out->raster_col(37 - i, esi, esi, esi);
-		out->raster_col(38 + i, esi, esi, esi);		
+		color = 63 - (4 * i);
+		out->raster_col(37 - i, color, color, color);
+		out->raster_col(38 + i, color, color, color);		
 	}
 
 	_G(spieler).DelaySpeed = 2;
 
-	int edi = 0;	
+	int lineScrolled = 0;	
 	bool endLoop = false;
 	while (!endLoop) {
 		if (in->get_switch_code() == 1)
@@ -742,36 +742,35 @@ void gbook() {
 		if (in->get_switch_code() == 1)
 			endLoop = true;
 
-		_G(spieler).scrollx++;
-		if (_G(spieler).scrollx >= 320)
+		if (++_G(spieler).scrollx >= 320)
 			_G(spieler).scrollx = 0;
 
-		++edi;
+		++lineScrolled;
 		g_events->delay(50);
-		int esp_4 = 0;
+		bool stillScrolling = false;
 		
 		for (int i = 0; i < 65; ++i) {
-			int edx = ARRAY187546[i][1] - edi;
-			if (edx >= 160 || edx <= 40)
+			int destY = ARRAY187546[i][1] - lineScrolled;
+			if (destY >= 160 || destY <= 40)
 				continue;
-			int esp_8;
+			int fontCol;
 			if (ARRAY187504[i]) {
-				esp_8 = 32;
+				fontCol = 32;
 				out->set_fontadr(font6x8);
 				out->set_vorschub(fvorx6x8, fvorx6x8);
 			} else {
-				esp_8 = 1;
+				fontCol = 1;
 				out->set_fontadr(font8x8);
 				out->set_vorschub(fvorx8x8, fvorx8x8);
 			}
-			esp_4 = 1;
+			stillScrolling = true;
 
 			// txt->str_pos((char *)&ARRAY187070, i);
-			int fgCol = esp_8 + (160 - (ARRAY187546[i][1] - edi)) / 10;
-			out->printxy(ARRAY187546[i][0], ARRAY187546[i][1], fgCol, 300, scr_width, ARRAY187070[i]);
+			int fgCol = fontCol + (160 - destY) / 10;
+			out->printxy(ARRAY187546[i][0], destY, fgCol, 300, scr_width, ARRAY187070[i]);
 		}
 
-		if (esp_4 == 0)
+		if (!stillScrolling)
 			endLoop = true;
 
 		out->setze_zeiger(nullptr);
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 199e6a1e979..a3be55790b7 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -871,21 +871,17 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
                           const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zstring[35];
-	unsigned char nextChar;
-	int16 izahl;
-	int16 count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
+	int16 diff;
 	char *tempptr;
 	va_list parptr;
 	va_start(parptr, string);
 	crlfx = x;
-	crlfy = y + (int16)fonth + 2;
+	crlfy = y + fonth + 2;
 	gcurx = x;
 	gcury = y;
 	i = 0;
 
+	unsigned char nextChar;
 	do {
 		nextChar = (unsigned char)string[i];
 		++i;
@@ -923,7 +919,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 				vors();
 			} else {
 				nextChar = string[i];
-				count = 0;
+				int16 count = 0;
 				if ((nextChar >= 0x30) && (nextChar <= 0x39))
 					count = atoi(string + i);
 				while ((nextChar >= 0x30) && (nextChar <= 0x39)) {
@@ -940,10 +936,10 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 				case 'd':
 				case 'u':
 					if (nextChar == 'd') {
-						izahl = va_arg(parptr, int);
+						int16 izahl = va_arg(parptr, int);
 						itoa(izahl, zstring, 10);
 					} else {
-						uzahl = va_arg(parptr, unsigned int);
+						uint16 uzahl = va_arg(parptr, unsigned int);
 						itoa(uzahl, zstring, 10);
 					}
 					k = 0;
@@ -963,10 +959,10 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 
 				case 'l':
 					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
+						long lzahl = va_arg(parptr, long);
 						ltoa(lzahl, zstring, 10);
 					} else {
-						luzahl = va_arg(parptr, uint32);
+						uint32 luzahl = va_arg(parptr, uint32);
 						ultoa(luzahl, zstring, 10);
 						++i;
 					}


Commit: c594485550db27cf394d3621b1561a706b5c950c
    https://github.com/scummvm/scummvm/commit/c594485550db27cf394d3621b1561a706b5c950c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: FIxes and cleanup for credits method gbook

Changed paths:
    engines/chewy/file.cpp


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 47557fd61ab..71f7060b4de 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -66,7 +66,7 @@ static const int16 FILE_ICONS[8 * 4] = {
 	232, 143, 310, 193
 };
 
-static const int16 ARRAY187546[65][2] = {
+static const int16 CREDITS_POS[65][2] = {
 	{40,  160}, {80,  170}, {40,  190}, {80,  200}, {80,  210},
 	{40,  230}, {80,  240}, {80,  250}, {80,  260}, {40,  280},
 	{80,  290}, {80,  300}, {80,  310}, {80,  320}, {40,  340},
@@ -82,7 +82,7 @@ static const int16 ARRAY187546[65][2] = {
 	{80,  890}, {80,  910}, {80,  920}, {80,  930}, {80,  940}
 };
 
-static const bool ARRAY187504[65] = {
+static const bool CREDITS_TYPE[65] = {
 	true, false, true, false, false, true, false, false, false, true,
 	false, false, false, false, true, false, false, true, false, true,
 	false, true, false, true, false, false, false, false, false, true,
@@ -92,7 +92,7 @@ static const bool ARRAY187504[65] = {
 	false, true, true, true, true
 };
 
-static const char *ARRAY187070[65] = {
+static const char *CREDITS_TEXT[65] = {
 	"Idea & Story:",
 	"Carsten Wieland",
 	"Programming:",
@@ -709,6 +709,9 @@ void option_menue(taf_info *ti) {
 }
 
 void gbook() {
+	int lineScrolled = 0;
+	int fontCol;
+
 	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
 	room->load_tgp(5, &room_blk, 1, 0, "BACK/GBOOK.TGP");
 	_G(spieler).scrollx = 0;
@@ -730,48 +733,48 @@ void gbook() {
 
 	_G(spieler).DelaySpeed = 2;
 
-	int lineScrolled = 0;	
-	bool endLoop = false;
-	while (!endLoop) {
-		if (in->get_switch_code() == 1)
-			endLoop = true;
+	for (;;) {
+		if (in->get_switch_code() == ESC || SHOULD_QUIT)
+			break;
 
+		// Display the starfield background
 		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-
-		if (in->get_switch_code() == 1)
-			endLoop = true;
+		out->map_spr2screen(ablage[room_blk.AkAblage],
+			_G(spieler).scrollx, _G(spieler).scrolly);
 
+		// Animate moving the background
 		if (++_G(spieler).scrollx >= 320)
 			_G(spieler).scrollx = 0;
 
+		if (in->get_switch_code() == ESC)
+			break;
+
 		++lineScrolled;
 		g_events->delay(50);
 		bool stillScrolling = false;
 		
 		for (int i = 0; i < 65; ++i) {
-			int destY = ARRAY187546[i][1] - lineScrolled;
+			int destY = CREDITS_POS[i][1] - lineScrolled;
 			if (destY >= 160 || destY <= 40)
 				continue;
-			int fontCol;
-			if (ARRAY187504[i]) {
+
+			if (CREDITS_TYPE[i]) {
 				fontCol = 32;
 				out->set_fontadr(font6x8);
-				out->set_vorschub(fvorx6x8, fvorx6x8);
+				out->set_vorschub(fvorx6x8, fvory6x8);
 			} else {
 				fontCol = 1;
 				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvorx8x8);
+				out->set_vorschub(fvorx8x8, fvory8x8);
 			}
 			stillScrolling = true;
 
-			// txt->str_pos((char *)&ARRAY187070, i);
 			int fgCol = fontCol + (160 - destY) / 10;
-			out->printxy(ARRAY187546[i][0], destY, fgCol, 300, scr_width, ARRAY187070[i]);
+			out->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
 		}
 
 		if (!stillScrolling)
-			endLoop = true;
+			break;
 
 		out->setze_zeiger(nullptr);
 		out->back2screen(workpage);
@@ -784,5 +787,6 @@ void gbook() {
 	room->set_ak_pal(&room_blk);
 	hide_cur();
 	uhr->reset_timer(0, 5);
-	}
+}
+
 } // namespace Chewy


Commit: 12c393c9fd4ed499dfceca8f7c68597ce3343368
    https://github.com/scummvm/scummvm/commit/12c393c9fd4ed499dfceca8f7c68597ce3343368
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: Fix sprite saving

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 71f6558a49b..d17e0d0edc4 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -176,6 +176,7 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width, int16 height, int1
 		for (int row = 0; row < height; ++row) {
 			Common::copy(scrP, scrP + width, sptr);
 			scrP += pitch;
+			sptr += width;
 		}
 	}
 }


Commit: f43b7357bb9b1a6b820e34db7f297df534394793
    https://github.com/scummvm/scummvm/commit/f43b7357bb9b1a6b820e34db7f297df534394793
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: Janitorial for endgame sprite code

Changed paths:
    engines/chewy/mcga_grafik.cpp
    engines/chewy/rooms/room89.cpp


diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index a3be55790b7..07e09ef9ad1 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -396,8 +396,10 @@ void mcga_grafik::screen2back(byte *ptr) {
 
 void mcga_grafik::sprite_save(byte *sptr, int16 x,
                               int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
-	if (breite < 4)breite = 4;
-	if (hoehe <= 0)hoehe = 1;
+	if (breite < 4)
+		breite = 4;
+	if (hoehe <= 0)
+		hoehe = 1;
 	if (x < clipx1) {
 		x = clipx1;
 		breite -= (clipx1 - x);
@@ -410,8 +412,11 @@ void mcga_grafik::sprite_save(byte *sptr, int16 x,
 	}
 	if ((y + hoehe) > clipy2 + 1)
 		hoehe = clipy2 - y;
-	if (breite < 1)breite = 0;
-	if (hoehe <= 0)hoehe = 0;
+	if (breite < 1)
+		breite = 0;
+	if (hoehe <= 0)
+		hoehe = 0;
+
 	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
 }
 
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 687cee2bc0a..c3cda58970c 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -99,7 +99,7 @@ void Room89::entry() {
 			var24 -= 2;
 			out->setze_zeiger(workptr);
 			out->cls();
-			out->scale_set(Ci.TempArea, abs(edi) / 2, abs(var24) / 2, edi, var24, scr_width);
+			out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
 			out->setze_zeiger(nullptr);
 			out->back2screen(workpage);
 			g_events->delay(30);
@@ -119,7 +119,7 @@ void Room89::entry() {
 			var30 += 2;
 			out->setze_zeiger(workptr);
 			out->cls();
-			out->scale_set(Ci.TempArea, abs(edi) / 2, abs(var30) / 2, edi, var30, scr_width);
+			out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
 			out->setze_zeiger(nullptr);
 			out->back2screen(workpage);
 			g_events->delay(30);


Commit: 4834cfa89b1c85a15d650e721115e7e9cc2f99ce
    https://github.com/scummvm/scummvm/commit/4834cfa89b1c85a15d650e721115e7e9cc2f99ce
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:10-08:00

Commit Message:
CHEWY: Fix accents in credits text

Changed paths:
    engines/chewy/file.cpp


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 71f7060b4de..a82f2cc9c30 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -129,10 +129,11 @@ static const char *CREDITS_TEXT[65] = {
 	"Clint......Alexander Schottky",
 	"Also cast:",
 	"Renier Baaken",
-	"Guido B_94h_sherz", // FIXME
+	"Guido B\x94sherz",
 	"Gerhard Fehn",
 	"Alice Krause",
-	"Reinhard Lie_E1h_Willi Meyer", //FIXME
+	"Reinhard Lie\xE1",
+	"Willi Meyer",
 	"Nicole Meister",
 	"Lutz Rafflenbeul",
 	"Alexander Schottky",
@@ -142,7 +143,7 @@ static const char *CREDITS_TEXT[65] = {
 	"Andreas Vogelpoth",
 	"Mark Wagener",
 	"Wolfgang Walk",
-	"Thomas Piet Wiesenm_81h_ller", //FIXME
+	"Thomas Piet Wiesenm\x81ller",
 	"Speech recorded by",
 	"tmp Studio, Moers by Willi Meyer",
 	"Cut by Hartmut Stelter",
@@ -156,7 +157,7 @@ static const char *CREDITS_TEXT[65] = {
 	"Song Boo Boo Ba Baby composed",
 	"by Haiko Ruttmann,",
 	"Lyrics Wolfgang Walk,",
-	"feIndhira Mohammed."
+	"featuring Indhira Mohammed."
 };
 
 	Common::File *File::open(const char *name) {


Commit: 613a3471cef50925d7c4c6c7a2c6f8cfb6b8bc36
    https://github.com/scummvm/scummvm/commit/613a3471cef50925d7c4c6c7a2c6f8cfb6b8bc36
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Should quit checks on zoom in/out during endgame sequence

Changed paths:
    engines/chewy/rooms/room89.cpp


diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index c3cda58970c..5663a499d71 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -103,6 +103,7 @@ void Room89::entry() {
 			out->setze_zeiger(nullptr);
 			out->back2screen(workpage);
 			g_events->delay(30);
+			SHOULD_QUIT_RETURN;
 		}
 
 		// Unsquish out thanks for playing screen
@@ -123,6 +124,7 @@ void Room89::entry() {
 			out->setze_zeiger(nullptr);
 			out->back2screen(workpage);
 			g_events->delay(30);
+			SHOULD_QUIT_RETURN;
 		}
 
 		g_events->delay(3000);


Commit: 3fa814fa903119c83603abf12bcc23da9212cb12
    https://github.com/scummvm/scummvm/commit/3fa814fa903119c83603abf12bcc23da9212cb12
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Properly implement register_cutscene from test_intro

Changed paths:
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1f679e02280..865b565d98a 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -364,7 +364,7 @@ void new_game();
 void sound_init();
 void sound_exit();
 void show_intro();
-void test_intro(int testVal);
+void register_cutscene(int cutsceneNum);
 
 void init_atds();
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 88308725fb1..17352d74320 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -411,8 +411,6 @@ void sound_exit() {
 	ailsnd->exitMixMode();
 }
 
-#define CSP_INT "csp.int"
-
 void show_intro() {
 	if (!ConfMan.getBool("shown_intro")) {
 		ConfMan.setBool("shown_intro", true);
@@ -421,9 +419,22 @@ void show_intro() {
 	}
 }
 
-void test_intro(int testVal) {
-	// No implementation
-}
+static const char *CUTSCENES = "cutscenes";
+static const int MAX_CUTSCENES = 36;
+
+void register_cutscene(int cutsceneNum) {
+	assert(cutsceneNum >= 0 && cutsceneNum < MAX_CUTSCENES);
+	Common::String creditsStr;
+	if (ConfMan.hasKey(CUTSCENES)) {
+		creditsStr = ConfMan.get(CUTSCENES);
+	} else {
+		for (int i = 0; i < MAX_CUTSCENES; ++i)
+			creditsStr += '0';
+	}
 
+	creditsStr.setChar('1', cutsceneNum);
+	ConfMan.set(CUTSCENES, creditsStr);
+	ConfMan.flushToDisk();
+}
 
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index e4b5617ba4a..c54c6fbef10 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -767,7 +767,7 @@ void Room0::feederAni() {
 			out->cls();
 			flic_cut(FCUT_001, CFO_MODE);
 
-			test_intro(1);
+			register_cutscene(1);
 
 			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
 			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 1d0f706b1ab..833b77aeb61 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -124,7 +124,7 @@ void Room40::xit(int16 eib_nr) {
 				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
 				move_train(1);
-				test_intro(15);
+				register_cutscene(15);
 				
 				flags.NoPalAfterFlc = true;
 				flic_cut(FCUT_073, CFO_MODE);
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index f2493a04234..e09cac42e0b 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -83,7 +83,7 @@ void Room43::catch_pg() {
 	flic_cut(FCUT_058, CFO_MODE);
 
 	g_engine->_sound->stopSound(0);
-	test_intro(14);
+	register_cutscene(14);
 	
 	flags.NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 6285dc1c8ab..821d1da0bd2 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -133,7 +133,7 @@ void Room46::bodo() {
 	flic_cut(FCUT_065, CFO_MODE);
 	out->setze_zeiger(nullptr);
 	out->cls();
-	test_intro(16);
+	register_cutscene(16);
 	
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	det->hide_static_spr(0);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 5b9f88b4e0e..1077417ef80 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -183,7 +183,7 @@ void Room49::use_boy_cigar() {
 
 	auto_scroll(164, 0);
 	flic_cut(67, CFO_MODE);
-	test_intro(17);
+	register_cutscene(17);
 	
 	room->set_timer_status(255, TIMER_STOP);
 	uhr->reset_timer(_G(timer_nr)[0], 0);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 4b61c43b9a1..2ef899ec582 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -173,7 +173,7 @@ void Room51::setup_func() {
 				out->setze_zeiger(nullptr);
 				out->cls();
 				flic_cut(115, 0);
-				test_intro(28);
+				register_cutscene(28);
 				
 				switch_room(91);
 				break;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 9f12314f726..133b73ac9e5 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -239,7 +239,7 @@ int16 Room55::use_telefon() {
 				}
 
 				flic_cut(FCUT_072, CFO_MODE);
-				test_intro(19);
+				register_cutscene(19);
 				
 				flags.NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
@@ -369,7 +369,7 @@ int16 Room55::use_kammeraus() {
 			det->show_static_spr(10);
 			flc->set_flic_user_function(cut_serv);
 			flic_cut(FCUT_070, CFO_MODE);
-			test_intro(18);
+			register_cutscene(18);
 		
 			flc->remove_flic_user_function();
 			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 817c0b6d511..08379552e1e 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -164,7 +164,7 @@ void Room56::entry() {
 		out->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(116, CFO_MODE);
-		test_intro(21);
+		register_cutscene(21);
 		out->setze_zeiger(nullptr);
 		out->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
@@ -356,7 +356,7 @@ int16 Room56::use_kneipe() {
 		flc->set_custom_user_function(proc1);
 		flic_cut(112, CFO_MODE);
 		flc->remove_custom_user_function();
-		test_intro(31);
+		register_cutscene(31);
 
 		set_up_screen(NO_SETUP);
 		fx_blend = BLEND3;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 31c13b6ffd4..d0efc2b5942 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -320,7 +320,7 @@ int16 Room68::use_diva() {
 		start_ani_block(2, ABLOCK38);
 		flic_cut(FCUT_083, CFO_MODE);
 		det->del_static_ani(18);
-		test_intro(22);
+		register_cutscene(22);
 		det->del_static_ani(18);
 		start_detail_wait(7, 1, ANI_VOR);
 		atds->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 21916ac076b..53bc33cb128 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -63,7 +63,7 @@ void Room72::entry(int16 eib_nr) {
 		go_auto_xy(147, 103, P_HOWARD, ANI_GO);
 		go_auto_xy(120, 104, P_NICHELLE, ANI_WAIT);
 		proc1(84);
-		test_intro(23);
+		register_cutscene(23);
 		break;
 	case 113:
 		set_person_pos(213, 129, P_CHEWY, P_LEFT);
@@ -73,7 +73,7 @@ void Room72::entry(int16 eib_nr) {
 		go_auto_xy(154, 102, P_HOWARD, ANI_GO);
 		go_auto_xy(186, 102, P_NICHELLE, ANI_WAIT);
 		proc1(85);
-		test_intro(23);
+		register_cutscene(23);
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index a3eb2e7e6b6..6d67f9c6dc0 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -96,7 +96,7 @@ void Room85::entry(int16 eib_nr) {
 		start_aad(476, -1);
 		flc->set_custom_user_function(Room87::proc5);
 		flic_cut(89, CFO_MODE);
-		test_intro(25);
+		register_cutscene(25);
 
 		flc->remove_custom_user_function();
 		switch_room(84);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 9a65956abff..75585646a27 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -134,7 +134,7 @@ int Room88::proc3() {
 		out->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(86, CFO_MODE);
-		test_intro(24);
+		register_cutscene(24);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 88;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 5663a499d71..099b1c41e5f 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -81,7 +81,7 @@ void Room89::entry() {
 		out->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(117, CFO_MODE);
-		test_intro(35);
+		register_cutscene(35);
 
 		fx_blend = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
@@ -179,7 +179,7 @@ int Room89::proc2() {
 	out->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(102, CFO_MODE);
-	test_intro(26);
+	register_cutscene(26);
 
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 487;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index ba8bbd6e6d1..8587c27764f 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -335,7 +335,7 @@ int Room90::useSurimyOnWreck() {
 	out->setze_zeiger(nullptr);
 	out->cls();
 	flic_cut(109, CFO_MODE);
-	test_intro(29);
+	register_cutscene(29);
 
 	det->hide_static_spr(4);
 	det->hide_static_spr(5);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index b1ce2eafb45..d4443b507f2 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -58,7 +58,7 @@ void Room92::entry() {
 		out->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(104, CFO_MODE);
-		test_intro(27);
+		register_cutscene(27);
 		out->setze_zeiger(nullptr);
 		out->cls();
 		flags.NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index fe2d6520906..2aebf719196 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -56,7 +56,7 @@ void Room94::entry() {
 		out->setze_zeiger(nullptr);
 		out->cls();
 		flic_cut(120, CFO_MODE);
-		test_intro(30);
+		register_cutscene(30);
 		fx_blend = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
 		_G(spieler).r94Scrollx = _G(spieler).scrollx;
@@ -75,7 +75,7 @@ void Room94::entry() {
 			out->setze_zeiger(nullptr);
 			out->cls();
 			flic_cut(121, CFO_MODE);
-			test_intro(32);
+			register_cutscene(32);
 
 			fx_blend = BLEND_NONE;
 			SetUpScreenFunc = nullptr;
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 95cf7880453..4dcd32fd61b 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -111,7 +111,7 @@ int Room95::proc2() {
 		out->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(133, CFO_MODE);
-		test_intro(33);
+		register_cutscene(33);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
 		switch_room(97);
 	} else {
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 1e3ec0d60f7..7225ad9e20c 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -391,7 +391,7 @@ int Room97::proc5() {
 	}
 
 	flic_cut(122, CFO_MODE);
-	test_intro(34);
+	register_cutscene(34);
 
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);


Commit: 0e6bcfc680747c640edd70f6bd7d093e7edbe9e2
    https://github.com/scummvm/scummvm/commit/0e6bcfc680747c640edd70f6bd7d093e7edbe9e2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Add missing calls to register_cutscene

Changed paths:
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room7.cpp


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 0169b5ef92a..e65243f1583 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -151,6 +151,7 @@ int16 Room11::scanner() {
 				flc->set_custom_user_function(Room12::cut_serv);
 				start_aad(105, 0);
 				flic_cut(FCUT_011, CFO_MODE);
+				register_cutscene(4);
 				flc->remove_custom_user_function();
 				_G(spieler).R11TerminalOk = true;
 				cur_2_inventory();
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index a9ff1d4d414..fda95c40e06 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -210,6 +210,7 @@ int16 Room12::use_terminal() {
 				flags.NoScroll = true;
 				auto_scroll(46, 0);
 				flic_cut(FCUT_017, CFO_MODE);
+				register_cutscene(5);
 
 				load_chewy_taf(CHEWY_BORK);
 				flags.NoScroll = false;
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 60e9d1fd2cd..8eb3446d482 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -186,6 +186,7 @@ void Room13::jmp_band() {
 			switch_room(14);
 
 			flic_cut(FCUT_018, CFO_MODE);
+			register_cutscene(6);
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
 			_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 78895590cf3..e219f4393e2 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -152,6 +152,7 @@ void Room22::bork_walk2() {
 	wait_auto_obj(BORK_OBJ);
 
 	flic_cut(FCUT_009, CFO_MODE);
+	register_cutscene(3);
 	det->show_static_spr(4);
 	atds->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R22BorkPlatt = true;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index e99f2740703..6fa522f7b0f 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -88,6 +88,7 @@ int16 Room23::start_gleiter() {
 					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_012, CFO_MODE);
+					register_cutscene(7);
 					out->cls();
 					_G(spieler).R23GleiterExit = 16;
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
@@ -105,6 +106,7 @@ int16 Room23::start_gleiter() {
 					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_019_01, CFO_MODE);
+					register_cutscene(9);
 					_G(spieler).R23GleiterExit = 25;
 
 					cur_2_inventory();
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index c8683be7fd0..0596fa71849 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -159,6 +159,7 @@ int16 Room31::use_topf() {
 							close_luke();
 							auto_move(3, P_CHEWY);
 							flic_cut(FCUT_046, CFO_MODE);
+							register_cutscene(13);
 							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
 							dia_nr = 156;
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index c1a25fa8597..4a1fe5e098e 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -48,6 +48,7 @@ int16 Room32::use_howard() {
 			auto_move(1, P_CHEWY);
 			cur_2_inventory();
 			remove_inventory(MUNTER_INV);
+			register_cutscene(11);
 			flic_cut(FCUT_043, CFO_MODE);
 			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
@@ -120,6 +121,7 @@ void Room32::use_schreibmaschine() {
 						_G(spieler).R32UseSchreib = true;
 						cur_2_inventory();
 						flic_cut(FCUT_044, CFO_MODE);
+						register_cutscene(12);
 						det->show_static_spr(5);
 						atds->set_ats_str(203, 1, ATS_DATEI);
 						ani_nr = CH_TALK3;
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 81b4490685b..13ff12b2d7f 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -252,6 +252,7 @@ void Room37::dog_bell() {
 			flic_cut(FCUT_051, CFO_MODE);
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054, CFO_MODE);
+			register_cutscene(10);
 			det->show_static_spr(0);
 
 			_G(spieler).R37HundScham = true;
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room7.cpp
index 860465f685a..8b360ff2299 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room7.cpp
@@ -154,6 +154,7 @@ void Room7::klingel() {
 		obj->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
 		obj->hide_sib(SIB_KLINGEL_R7);
 		flags.NoPalAfterFlc = false;
+		register_cutscene(2);
 		flic_cut(FCUT_003, CFO_MODE);
 		set_person_pos(201, 117, P_CHEWY, P_LEFT);
 		_G(spieler).scrollx = 0;


Commit: 24b8640fb63967da063463cf944a3f357aab913b
    https://github.com/scummvm/scummvm/commit/24b8640fb63967da063463cf944a3f357aab913b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Cutscenes are 1 based rather than 0

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 17352d74320..ac2762d4606 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -420,10 +420,10 @@ void show_intro() {
 }
 
 static const char *CUTSCENES = "cutscenes";
-static const int MAX_CUTSCENES = 36;
+static const int MAX_CUTSCENES = 35;
 
 void register_cutscene(int cutsceneNum) {
-	assert(cutsceneNum >= 0 && cutsceneNum < MAX_CUTSCENES);
+	assert(cutsceneNum >= 1 && cutsceneNum <= MAX_CUTSCENES);
 	Common::String creditsStr;
 	if (ConfMan.hasKey(CUTSCENES)) {
 		creditsStr = ConfMan.get(CUTSCENES);
@@ -432,7 +432,7 @@ void register_cutscene(int cutsceneNum) {
 			creditsStr += '0';
 	}
 
-	creditsStr.setChar('1', cutsceneNum);
+	creditsStr.setChar('1', cutsceneNum - 1);
 	ConfMan.set(CUTSCENES, creditsStr);
 	ConfMan.flushToDisk();
 }


Commit: e550159c45dff349faca501e42a9181ea193c920
    https://github.com/scummvm/scummvm/commit/e550159c45dff349faca501e42a9181ea193c920
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Beginnings of Cinema main menu dialog

Changed paths:
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp


diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 865b565d98a..1337de8c8cd 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -22,6 +22,7 @@
 #ifndef CHEWY_GLOBAL_H
 #define CHEWY_GLOBAL_H
 
+#include "common/array.h"
 #include "chewy/chewy.h"
 #include "chewy/types.h"
 #include "chewy/atds.h"
@@ -365,6 +366,7 @@ void sound_init();
 void sound_exit();
 void show_intro();
 void register_cutscene(int cutsceneNum);
+void getCutscenes(Common::Array<int> &cutscenes);
 
 void init_atds();
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index ac2762d4606..a2ef4260817 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -437,4 +437,16 @@ void register_cutscene(int cutsceneNum) {
 	ConfMan.flushToDisk();
 }
 
+void getCutscenes(Common::Array<int> &cutscenes) {
+	cutscenes.clear();
+	if (!ConfMan.hasKey(CUTSCENES))
+		return;
+
+	Common::String str = ConfMan.get(CUTSCENES);
+	for (int i = 0; i < MAX_CUTSCENES; ++i) {
+		if (str[i] == '1')
+			cutscenes.push_back(i + 1);
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 5aa525c7776..67efb292f6f 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -28,6 +28,8 @@
 
 namespace Chewy {
 
+static constexpr int CINEMA_LINES = 12;
+
 int MainMenu::_selection;
 int MainMenu::_personAni[3];
 
@@ -289,7 +291,45 @@ void MainMenu::restorePersonAni() {
 }
 
 void MainMenu::cinema() {
-	warning("TODO: cinema dialog");
+	int timer_nr;
+	int16 txt_anz;
+	int topIndex = 0;
+	Common::Array<int> cutscenes;
+	getCutscenes(cutscenes);
+
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	atds->load_atds(98, 1);
+	
+	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
+	room->load_tgp(4, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	show_cur();
+	show_intro();
+	kbinfo.scan_code = 0;
+
+	for (;;) {
+		timer_nr = 0;
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+
+		if (!cutscenes.empty()) {
+			// Render cutscene list
+			for (int i = 0; i < CINEMA_LINES; ++i) {
+				// TODO
+			}
+		} else {
+			// No cutscenes seen yet
+			char *s = atds->ats_get_txt(545, 0, &txt_anz, 1);
+			out->printxy(40, 68, 14, 300, scr_width, s);
+		}
+
+		// TODO
+	}
+
+	room->open_handle(EPISODE1_TGP, "rb", 0);
+	room->set_ak_pal(&room_blk);
+	hide_cur();
+	uhr->reset_timer(0, 5);
 }
 
 } // namespace Chewy


Commit: 3728ccf045a6402e4a0a0f95727e9d90cdcad71c
    https://github.com/scummvm/scummvm/commit/3728ccf045a6402e4a0a0f95727e9d90cdcad71c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Modify hardcoded logic in Room 39

Changed paths:
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room39.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 92cdfafd84a..249b182678e 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -110,6 +110,7 @@ short Room39::use_howard() {
 				}
 
 				dia_nr = -1;
+				action_flag = true;
 			} else {
 				ani_nr = CH_TALK11;
 				dia_nr = 166;
@@ -169,11 +170,13 @@ int16 Room39::use_tv() {
 	int16 ani_nr = -1;
 	int16 action_flag = false;
 
+	hide_cur();
 	auto_move(2, P_CHEWY);
 	int16 cls_flag = false;
-	hide_cur();
 
 	if (is_cur_inventar(ZAPPER_INV)) {
+		_G(maus_links_click) = false;
+		
 		_G(spieler).R39TvOn = true;
 		if (_G(spieler).R39TvKanal >= 5)
 			_G(spieler).R39TvKanal = -1;
@@ -190,25 +193,28 @@ int16 Room39::use_tv() {
 		else if (_G(spieler).R39TvKanal == 5)
 			flic_cut(FCUT_033, CFO_MODE);
 
-		look_tv(0);
+		look_tv(false);
 		set_tv();
 		cls_flag = true;
 
 		if (!_G(spieler).R39TransMensch) {
 			ani_nr = CH_TALK11;
 			dia_nr = 78;
+		} else if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
+			dia_nr = -1;
+			ani_nr = -1;
 		} else {
-			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
-				dia_nr = 79;
-				ani_nr = -1;
-			} else {
-				dia_nr = 80 + _G(spieler).R39TvKanal;
-				ani_nr = -1;
-			}
+			if (80 + _G(spieler).R39TvKanal != 85)
+				dia_nr = -1;
+			else
+				dia_nr = 85;
+			
+			ani_nr = -1;
 		}
 
 		action_flag = true;
 	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
+		action_flag = true;
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
@@ -239,12 +245,10 @@ int16 Room39::use_tv() {
 
 		set_tv();
 
-	} else if (is_cur_inventar(RECORDER_INV)) {
-		if (_G(spieler).R39TvOn && _G(spieler).ChewyAni != 5) {
-			if (!_G(spieler).R39TransMensch) {
-				ani_nr = CH_TALK12;
-				dia_nr = 97;
-			} else {
+	} else if (is_cur_inventar(RECORDER_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
+		action_flag = true;
+		if (_G(spieler).R39TvOn) {
+			if (_G(spieler).R39TransMensch) {
 				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(98, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
@@ -252,8 +256,11 @@ int16 Room39::use_tv() {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
-				atds->set_ats_str(CASSETTE_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
+				atds->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
 				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
+			} else {
+				ani_nr = CH_TALK12;
+				dia_nr = 97;
 			}
 		} else {
 			ani_nr = CH_TALK11;
@@ -280,11 +287,12 @@ int16 Room39::use_tv() {
 	return action_flag;
 }
 
-void Room39::look_tv(int16 cls_mode) {
+void Room39::look_tv(bool cls_mode) {
 	_flag = false;
 
 	if (_G(spieler).R39TvOn) {
 		if (!flags.AutoAniPlay) {
+			flags.AutoAniPlay = true;
 			int16 flic_nr;
 			int16 dia_nr;
 			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
index 77f1aa57f58..82549f539c1 100644
--- a/engines/chewy/rooms/room39.h
+++ b/engines/chewy/rooms/room39.h
@@ -38,7 +38,7 @@ public:
 	static int16 use_tv();
 	static short use_howard();
 	static void talk_howard();
-	static void look_tv(int16 cls_mode);
+	static void look_tv(bool cls_mode);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index bb02cef7fb3..e09b53084dc 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -75,7 +75,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					switch (txt_nr) {
 					case 229:
 						auto_move(2, P_CHEWY);
-						Room39::look_tv(1);
+						Room39::look_tv(true);
 						break;
 
 					case 268:


Commit: 6086ee20ced2acc02548f91057c7e19f77b209bf
    https://github.com/scummvm/scummvm/commit/6086ee20ced2acc02548f91057c7e19f77b209bf
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:11-08:00

Commit Message:
CHEWY: Review logic of Room 37

Changed paths:
    engines/chewy/rooms/room37.cpp


diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 13ff12b2d7f..c4bc5755b02 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -1,4 +1,4 @@
-/* ScummVM - Graphic Adventure Engine
+	/* ScummVM - Graphic Adventure Engine
  *
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
@@ -57,6 +57,7 @@ void Room37::entry() {
 		if (!_G(spieler).R37HundScham) {
 			_G(timer_nr)[0] = room->set_timer(3, 4);
 			det->set_static_ani(3, -1);
+			g_engine->_sound->playSound(3, 0);
 		}
 	}
 
@@ -132,10 +133,9 @@ short Room37::use_wippe() {
 }
 
 int16 Room37::cut_serv1(int16 frame) {
-	int16 static_nr;
-	int16 static_nr1;
-
 	if (!_G(spieler).R37Kloppe) {
+		int16 static_nr;
+		int16 static_nr1;
 		if (!_G(spieler).R37Gebiss) {
 			static_nr = 9;
 			static_nr1 = 11;
@@ -156,11 +156,10 @@ int16 Room37::cut_serv1(int16 frame) {
 
 int16 Room37::cut_serv2(int16 frame) {
 	static const int16 STATIC_NR[] = { 7, 14, 12, 10 };
-	short i;
 
 	det->show_static_spr(12);
 	det->show_static_spr(10);
-	for (i = 0; i < 4; i++)
+	for (short i = 0; i < 4; i++)
 		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, STATIC_NR[i], STATIC_NR[i]);
 
 	return 0;
@@ -170,8 +169,8 @@ int16 Room37::use_glas() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).R37Gebiss) {
+		action_flag = true;
 		if (is_cur_inventar(ANGEL2_INV)) {
-			action_flag = true;
 			flags.NoScroll = true;
 			hide_cur();
 			auto_move(5, P_CHEWY);
@@ -211,6 +210,7 @@ void Room37::dog_bell() {
 
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
+		g_engine->_sound->stopSound(0); // nr 3, sslot 0
 
 		if (!_G(spieler).R37Gebiss) {
 			stop_person(P_CHEWY);
@@ -235,7 +235,7 @@ void Room37::dog_bell() {
 			start_ani_block(3, ABLOCK31);
 			det->set_static_ani(3, -1);
 			g_engine->_sound->playSound(3, 0);
-			g_engine->_sound->playSound(3);
+//			g_engine->_sound->playSound(3);
 			enable_timer();
 			dia_nr = 149;
 			ani_nr = CH_TALK12;
@@ -345,12 +345,9 @@ void Room37::use_hahn() {
 }
 
 void Room37::hahn_dia() {
-	int16 tmp_scrollx;
-	int16 tmp_scrolly;
-
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	tmp_scrollx = _G(spieler).scrollx;
-	tmp_scrolly = _G(spieler).scrolly;
+	int16 tmp_scrollx = _G(spieler).scrollx;
+	int16 tmp_scrolly = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(38);


Commit: 32b99089b56961fb028c994196047249fe7ab25a
    https://github.com/scummvm/scummvm/commit/32b99089b56961fb028c994196047249fe7ab25a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Finished main menu cinema dialog

Changed paths:
    engines/chewy/defines.h
    engines/chewy/inits.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 93507abf2d6..6e8c7f7dc35 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -163,7 +163,7 @@ enum SetupScreenMode {
 
 #define EPISODE1_TGP 0
 #define GBOOK_TGP 1
-#define EPISODE1 "back/episode1.tgp\0"
+#define EPISODE1 "back/episode1.tgp"
 #define BUCH_START 2
 #define DIARY_START 3
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index a2ef4260817..ae0c477df13 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -442,9 +442,9 @@ void getCutscenes(Common::Array<int> &cutscenes) {
 	if (!ConfMan.hasKey(CUTSCENES))
 		return;
 
-	Common::String str = ConfMan.get(CUTSCENES);
+	Common::String cutStr = ConfMan.get(CUTSCENES);
 	for (int i = 0; i < MAX_CUTSCENES; ++i) {
-		if (str[i] == '1')
+		if (cutStr[i] == '1')
 			cutscenes.push_back(i + 1);
 	}
 }
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 67efb292f6f..71a694ee192 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -30,6 +30,17 @@ namespace Chewy {
 
 static constexpr int CINEMA_LINES = 12;
 
+static const int16 CINEMA_TBL[4 * 3] = {
+	10,  80,  32, 105,
+	10, 150,  32, 175,
+	36,  64, 310, 188
+};
+static const uint8 CINEMA_FLICS[35] = {
+	0, 2, 6, 9, 15, 12, 11, 18, 3, 48, 31, 44,
+	55, 58, 45, 65, 67, 68, 69, 80, 74, 83, 84, 88,
+	93, 87, 106, 108, 107, 113, 110, 121, 123, 122, 117
+};
+
 int MainMenu::_selection;
 int MainMenu::_personAni[3];
 
@@ -291,9 +302,12 @@ void MainMenu::restorePersonAni() {
 }
 
 void MainMenu::cinema() {
-	int timer_nr;
-	int16 txt_anz;
+	int timer_nr = 0;
+	int16 txt_anz = 0;
 	int topIndex = 0;
+	int selected = -1;
+	bool flag = false;
+	int delay = 0;
 	Common::Array<int> cutscenes;
 	getCutscenes(cutscenes);
 
@@ -304,10 +318,10 @@ void MainMenu::cinema() {
 	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
 	room->load_tgp(4, &room_blk, 1, 0, "BACK/GBOOK.TGP");
 	show_cur();
-	show_intro();
+	g_events->clearEvents();
 	kbinfo.scan_code = 0;
 
-	for (;;) {
+	for (bool endLoop = false; !endLoop;) {
 		timer_nr = 0;
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
@@ -315,21 +329,151 @@ void MainMenu::cinema() {
 		if (!cutscenes.empty()) {
 			// Render cutscene list
 			for (int i = 0; i < CINEMA_LINES; ++i) {
-				// TODO
+				char *csName = atds->ats_get_txt(546 + i + topIndex,
+					0, &txt_anz, 1);
+				int yp = i * 10 + 68;
+
+				if (i == selected)
+					out->box_fill(37, yp, 308, yp + 10, 42);
+				out->printxy(40, yp, 14, 300, 0, "%s", csName);
 			}
 		} else {
 			// No cutscenes seen yet
-			char *s = atds->ats_get_txt(545, 0, &txt_anz, 1);
-			out->printxy(40, 68, 14, 300, scr_width, s);
+			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
+			out->printxy(40, 68, 14, 300, scr_width, none);
+		}
+
+		if (minfo.button == 1 && !flag) {
+			flag = true;
+			switch (in->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
+			case 0:
+				kbinfo.scan_code = Common::KEYCODE_UP;
+				if (!endLoop) {
+					endLoop = true;
+					timer_nr = 5;
+				}
+				break;
+
+			case 1:
+				kbinfo.scan_code = Common::KEYCODE_DOWN;
+				if (!endLoop) {
+					endLoop = true;
+					timer_nr = 5;
+				}
+				break;
+
+			case 2: {
+				int selIndex = (minfo.y - 68) / 10 + topIndex;
+				if (selIndex < (int)cutscenes.size())
+					selected = selIndex;
+				kbinfo.scan_code = Common::KEYCODE_RETURN;
+				break;
+			}
+
+			default:
+				break;
+			}
+		} else if (minfo.button == 2 && !flag) {
+			kbinfo.scan_code = ESC;
+			flag = true;
+		} else if (minfo.button != 1) {
+			flag = false;
+			timer_nr = 0;
+			delay = 0;
+		} else if (flag) {
+			EVENTS_UPDATE;
+			if (--delay <= 0)
+				flag = false;
 		}
 
-		// TODO
+		switch (kbinfo.scan_code) {
+		case ESC:
+			endLoop = true;
+			kbinfo.scan_code = 0;
+			break;
+
+		case Common::KEYCODE_UP:
+		case Common::KEYCODE_KP8:
+			if (selected > 0) {
+				--selected;
+			} else if (topIndex > 0) {
+				--topIndex;
+			}
+			kbinfo.scan_code = 0;
+			break;
+
+		case Common::KEYCODE_DOWN:
+		case Common::KEYCODE_KP2: {
+			int newIndex = selected + 1;
+			if (selected >= 11) {
+				if ((topIndex + newIndex) < (int)cutscenes.size())
+					++topIndex;
+			} else {
+				if ((topIndex + newIndex) < (int)cutscenes.size())
+					++selected;
+			}
+			kbinfo.scan_code = 0;
+			break;
+		}
+
+		case Common::KEYCODE_RETURN:
+			hide_cur();
+			out->cls();
+			out->setze_zeiger(screen0);
+			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			print_rows(546 + topIndex);
+
+			flc->set_custom_user_function(cinema_cut_serv);
+			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
+			flc->remove_custom_user_function();
+			out->set_fontadr(font6x8);
+			out->set_vorschub(fvorx6x8, fvory6x8);
+			show_cur();
+			delay = 0;
+			flag = false;
+			break;
+
+		default:
+			break;
+		}
+
+		// The below are hacks to get the dialog to work in ScummVM
+		kbinfo.scan_code = 0;
+		minfo.button = 0;
+		txt_anz = 0;
+
+		if (!txt_anz) {
+			cur->plot_cur();
+
+			if (flag) {
+				flag = false;
+				out->setze_zeiger(screen0);
+				room->set_ak_pal(&room_blk);
+				fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			} else {
+				out->back2screen(workpage);
+			}
+		}
+
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
 	}
 
-	room->open_handle(EPISODE1_TGP, "rb", 0);
+	room->open_handle(EPISODE1, "rb", 0);
 	room->set_ak_pal(&room_blk);
 	hide_cur();
 	uhr->reset_timer(0, 5);
 }
 
+int16 MainMenu::cinema_cut_serv(int16 frame) {
+	if (in->get_switch_code() == ESC) {
+		ailsnd->stopMod();
+		ailsnd->endSound();
+		return -1;
+
+	} else {
+		return 0;
+	}
+}
+
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index fa048ba11cc..892efa8230e 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -80,6 +80,9 @@ private:
 	 * Restores the personAni array
 	 */
 	static void restorePersonAni();
+
+	static int16 cinema_cut_serv(int16 frame);
+
 public:
 	/**
 	 * Displays the menu


Commit: 9ad7c9c77ce66d3c4d8ea6510094095a54924c41
    https://github.com/scummvm/scummvm/commit/9ad7c9c77ce66d3c4d8ea6510094095a54924c41
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Remove redundant null characters from the end of string constants

Changed paths:
    engines/chewy/defines.h
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 6e8c7f7dc35..7fea2505ace 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -157,7 +157,7 @@ enum SetupScreenMode {
 #define CH_SPZ_FILE "misc/ch_spez.taf"
 #define OPTION_TAF "MISC/OPTION.TAF"
 
-#define SAVEDIR "save/savegame.\0"
+#define SAVEDIR "save/savegame."
 
 #define DETAILTEST "room/test.rdi"
 
@@ -167,10 +167,10 @@ enum SetupScreenMode {
 #define BUCH_START 2
 #define DIARY_START 3
 
-#define EPISODE1_GEP "back/episode1.gep\0"
+#define EPISODE1_GEP "back/episode1.gep"
 
-#define FONT6x8 "txt/6x8.tff\0"
-#define FONT8x8 "txt/8x8.tff\0"
+#define FONT6x8 "txt/6x8.tff"
+#define FONT8x8 "txt/8x8.tff"
 
 #define ATDS_TXT "txt/atds.tap"
 #define INV_ATS_STEUER "txt/inv_st.s"
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 89d06ad087c..bcb84d2deb0 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -380,7 +380,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(ci->Handle);
 	if (rs) {
 		if (custom_header.load(rs)) {
-			if (!scumm_strnicmp(custom_header.id, "CFO\0", 4)) {
+			if (!scumm_strnicmp(custom_header.id, "CFO", 4)) {
 				cls_flag = false;
 				fade_flag = false;
 				fade_delay = 0;
@@ -487,7 +487,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case PLAY_MUSIC:
-			if (!strncmp(th->id, "TMF\0", 4))
+			if (!strncmp(th->id, "TMF", 4))
 #ifndef AIL
 				snd->playMod(th);
 #else
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index ae0c477df13..137bbc307b7 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -80,7 +80,7 @@ void standard_init() {
 	cur->set_cur_ani(&curani);
 
 	iog = new io_game(out, in, cur);
-	strcpy(ioptr.id, "CHE\0");
+	strcpy(ioptr.id, "CHE");
 	strcpy(ioptr.save_path, SAVEDIR);
 	ioptr.delay = 8;
 	alloc_buffers();
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 8904e567027..32babeaab2c 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -428,7 +428,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 void io_game::mark_eintrag(int16 y, int16 nr) {
 	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10,
 	              io->m_col[1], io->m_col[0], io->m_col[4]);
-	out->printxy(io->popx + 10, y + 2, io->m_col[2], 300, scr_width, "%d.\0", nr + 1);
+	out->printxy(io->popx + 10, y + 2, io->m_col[2], 300, scr_width, "%d.", nr + 1);
 	if (file_find_g[nr][0] != 0) {
 		if (strlen(&file_find_g[nr][1]) >= 17)
 			out->printnxy(io->popx + 28, y + 2, io->m_col[2], 300, 17,
@@ -451,7 +451,7 @@ void io_game::mark_eintrag(int16 y, int16 nr) {
 void io_game::unmark_eintrag(int16 y, int16 nr) {
 	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[3],
 	              io->m_col[3], io->m_col[3]);
-	out->printxy(io->popx + 10, y + 2, io->m_col[5], 300, scr_width, "%d.\0", nr + 1);
+	out->printxy(io->popx + 10, y + 2, io->m_col[5], 300, scr_width, "%d.", nr + 1);
 	if (file_find_g[nr][0] != 0) {
 		if (strlen(&file_find_g[nr][1]) >= 17)
 			out->printnxy(io->popx + 28, y + 2, io->m_col[5], 300, 17,
@@ -469,7 +469,7 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 			out->pop_box(io->popx + 8, cur_y + 1, io->popx + 131, cur_y + 10,
 			              io->m_col[3], io->m_col[3], io->m_col[3]);
 			out->printxy(io->popx + 10, cur_y + 2, io->m_col[5], 300,
-			              scr_width, "%d.\0", i + 1);
+			              scr_width, "%d.", i + 1);
 			if (file_find_g[i][0] != 0) {
 				if (strlen(&file_find_g[i][1]) >= 17)
 					out->printnxy(io->popx + 28, cur_y + 2, io->m_col[5], 300, 17,
@@ -519,7 +519,7 @@ void io_game::plot_io() {
 	plot_ab_txt(io->m_col[1]);
 
 	for (int16 i = 0; i < 9; i++) {
-		out->printxy(io->popx + 10, io->popy + 10 + i * 10,io->m_col[5], 300, scr_width, "%d.\0", i + 1);
+		out->printxy(io->popx + 10, io->popy + 10 + i * 10,io->m_col[5], 300, scr_width, "%d.", i + 1);
 	}
 }
 
@@ -566,7 +566,7 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 	out->pop_box
 	(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[1], io->m_col[0], io->m_col[4]);
 
-	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.\0", slotNum + 1);
+	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.", slotNum + 1);
 	if (file_find_g[slotNum][0] == 0) {
 		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
 	} else {
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index a8f3cb37fb3..3a55f823d39 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -30,36 +30,36 @@ namespace Chewy {
 
 #ifdef ENGLISCH
 
-#define FSTRING1 "F1 Save\0"
-#define FSTRING2 "F2 Load\0"
-#define FSTRING3 "F3 Quit\0"
-#define FSTRING4 "F4 Return\0"
-#define FSTRING5 " Are You \0"
-#define FSTRING6 "Sure (Y/N)?\0"
-#define FSTRING7 "ESC Cancel\0"
-#define FSTRING8 "U\0"
-#define FSTRING9 " \0"
-#define FSTRING10 "P\0"
-#define FSTRING11 "D\0"
-#define FSTRING12 "O\0"
-#define FSTRING13 "W\0"
-#define FSTRING14 "N\0"
+#define FSTRING1 "F1 Save"
+#define FSTRING2 "F2 Load"
+#define FSTRING3 "F3 Quit"
+#define FSTRING4 "F4 Return"
+#define FSTRING5 " Are You "
+#define FSTRING6 "Sure (Y/N)?"
+#define FSTRING7 "ESC Cancel"
+#define FSTRING8 "U"
+#define FSTRING9 " "
+#define FSTRING10 "P"
+#define FSTRING11 "D"
+#define FSTRING12 "O"
+#define FSTRING13 "W"
+#define FSTRING14 "N"
 #else
 
-#define FSTRING1 "F1 Speichern\0"
-#define FSTRING2 "F2 Laden\0"
-#define FSTRING3 "F3 Beenden \0"
-#define FSTRING4 "F4 Zurück\0"
-#define FSTRING5 " Bist Du \0"
-#define FSTRING6 "sicher (J/N)?\0"
-#define FSTRING7 "ESC Abbrechen\0"
-#define FSTRING8 "A\0"
-#define FSTRING9 "U\0"
-#define FSTRING10 "F\0"
-#define FSTRING11 " \0"
-#define FSTRING12 "A\0"
-#define FSTRING13 "B\0"
-#define FSTRING14 " \0"
+#define FSTRING1 "F1 Speichern"
+#define FSTRING2 "F2 Laden"
+#define FSTRING3 "F3 Beenden "
+#define FSTRING4 "F4 Zurück"
+#define FSTRING5 " Bist Du "
+#define FSTRING6 "sicher (J/N)?"
+#define FSTRING7 "ESC Abbrechen"
+#define FSTRING8 "A"
+#define FSTRING9 "U"
+#define FSTRING10 "F"
+#define FSTRING11 " "
+#define FSTRING12 "A"
+#define FSTRING13 "B"
+#define FSTRING14 " "
 #endif
 
 #define IOG_END 1


Commit: 1cf9b1e78acc1b59b23a9935db0b348d2e7e4a05
    https://github.com/scummvm/scummvm/commit/1cf9b1e78acc1b59b23a9935db0b348d2e7e4a05
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Fix clipping sprites off the left edge of the screen

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index d17e0d0edc4..50018edc9be 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -388,6 +388,7 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 	if (x < clipx1) {
 		int xCount = clipx1 - x;
 		spriteDeltaX2 -= xCount;
+		dest += xCount;
 
 		--xCount;
 		if (xCount >= 1) {


Commit: 9c5d8da1dec3ec674893f5830ad549362f259ea1
    https://github.com/scummvm/scummvm/commit/9c5d8da1dec3ec674893f5830ad549362f259ea1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Fix mouse clicks removing on-screen text

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room82.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 2193aa9e267..f2cb7f0d32e 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -90,6 +90,7 @@ atdsys::atdsys() {
 	atdsv.DiaNr = -1;
 	atdsv.aad_str = 0;
 	atdsv.VocNr = -1;
+	atdsv._eventsEnabled = true;
 	ssret.Next = false;
 	ssr = &ssret;
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
@@ -565,7 +566,7 @@ int16 atdsys::ats_get_status() {
 
 void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	if (atsv.Display) {
-		if (atdsv._field12) {
+		if (atdsv._eventsEnabled) {
 			switch (in->get_switch_code()) {
 			case ESC:
 			case ENTER:
@@ -894,7 +895,7 @@ void atdsys::stop_aad() {
 
 void atdsys::print_aad(int16 scrx, int16 scry) {
 	if (aadv.Dialog) {
-		if (atdsv._field12) {
+		if (atdsv._eventsEnabled) {
 			switch (in->get_switch_code()) {
 			case ESC:
 			case ENTER:
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 0505e86d6a5..2ebbb2ec1bc 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -116,7 +116,7 @@ struct AtdsVar {
 	int16 DiaNr = 0;
 
 	uint8 Display = 0;
-	int16 _field12 = 0;
+	bool _eventsEnabled = false;
 	int16 VocNr = 0;
 
 	void (*aad_str)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) = nullptr;
@@ -310,8 +310,8 @@ public:
 	int16 check_item(int16 block_nr, int16 item_nr);
 	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
 	int16 getStereoPos(int16 x);
-	void set_unknown(bool nr) {
-		atdsv._field12 = nr;
+	void enableEvents(bool nr) {
+		atdsv._eventsEnabled = nr;
 	}
 
 private:
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 2ef899ec582..914af0d496f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -52,7 +52,7 @@ void Room51::entry() {
 	_G(zoom_mov_fak) = 4;
 
 	if (_G(spieler).flags32_10) {
-		atds->set_unknown(false);
+		atds->enableEvents(false);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
@@ -101,7 +101,7 @@ void Room51::entry() {
 }
 
 void Room51::xit(int16 eib_nr) {
-	atds->set_unknown(true);
+	atds->enableEvents(true);
 
 	if (_G(spieler).flags32_10) {
 		flags.MainInput = true;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 44ba35c2679..f345cde572d 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -198,9 +198,9 @@ int Room82::proc6() {
 		start_aad_wait(450, -1);
 		out->ausblenden(0);
 		out->set_teilpalette(pal, 255, 1);
-		atds->set_unknown(false);
+		atds->enableEvents(false);
 		start_aad_wait(598, -1);
-		atds->set_unknown(true);
+		atds->enableEvents(true);
 		det->show_static_spr(7);
 		fx_blend = BLEND3;
 		set_up_screen(DO_SETUP);


Commit: f41734d1cc7c5b00288011d737c0bd7527d564be
    https://github.com/scummvm/scummvm/commit/f41734d1cc7c5b00288011d737c0bd7527d564be
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Finally fixed room backgrounds being incorrectly offset by 8 pixels

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 50018edc9be..5d7b6fd6acc 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -147,7 +147,7 @@ void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
 
 void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
 	const int width = *((const int16 *)sptr);
-	sptr += y * width + x;
+	sptr += 4 + y * width + x;
 	byte *destP = SCREEN;
 
 	for (int row = 0; row < SCREEN_HEIGHT;


Commit: 5895c2e07283b7d6dce3f3b579e4f3482852d146
    https://github.com/scummvm/scummvm/commit/5895c2e07283b7d6dce3f3b579e4f3482852d146
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:12-08:00

Commit Message:
CHEWY: Fix logic in Room 35

Changed paths:
    engines/chewy/rooms/room35.cpp


diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 45e27d78841..a3306ed2b06 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -44,7 +44,7 @@ int16 Room35::schublade() {
 	int16 action_flag = false;
 	hide_cur();
 
-	if (!_G(spieler).inv_cur) {
+	if (_G(spieler).ChewyAni != CHEWY_ROCKER && !_G(spieler).inv_cur) {
 		if (!_G(spieler).R35Schublade) {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
@@ -117,11 +117,11 @@ int16 Room35::use_cat() {
 }
 
 void Room35::talk_cat() {
-	int16 dia_nr;
 	hide_cur();
 	auto_move(4, P_CHEWY);
 
 	if (_G(spieler).R35TransCat) {
+		int16 dia_nr;
 		if (!_G(spieler).R35CatEat) {
 			dia_nr = 7;
 		} else {


Commit: f3d7286a55bad9a5a70a63845c186d3c6f3b4cc8
    https://github.com/scummvm/scummvm/commit/f3d7286a55bad9a5a70a63845c186d3c6f3b4cc8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Review logic of room 34

Changed paths:
    engines/chewy/rooms/room34.cpp


diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 27def3f23ee..bf463144a16 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room34.h"
 


Commit: 9d28b764e72f412c4b467a40f1304cf26fb40f8a
    https://github.com/scummvm/scummvm/commit/9d28b764e72f412c4b467a40f1304cf26fb40f8a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Split credits and cinema dialogs into their own classes

Started a new dialogs folder for the games' menus and dialogs.
This will be cleaner than currently, where they're mingled
in the code files with other support classes and methods

Changed paths:
  A engines/chewy/dialogs/cinema.cpp
  A engines/chewy/dialogs/cinema.h
  A engines/chewy/dialogs/credits.cpp
  A engines/chewy/dialogs/credits.h
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/main_menu.cpp
    engines/chewy/main_menu.h
    engines/chewy/module.mk
    engines/chewy/rooms/room89.cpp


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
new file mode 100644
index 00000000000..d23084166bc
--- /dev/null
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -0,0 +1,222 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/dialogs/cinema.h"
+#include "chewy/events.h"
+#include "chewy/file.h"
+#include "chewy/global.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+static constexpr int CINEMA_LINES = 12;
+
+static const int16 CINEMA_TBL[4 * 3] = {
+	10,  80,  32, 105,
+	10, 150,  32, 175,
+	36,  64, 310, 188
+};
+
+static const uint8 CINEMA_FLICS[35] = {
+	0, 2, 6, 9, 15, 12, 11, 18, 3, 48, 31, 44,
+	55, 58, 45, 65, 67, 68, 69, 80, 74, 83, 84, 88,
+	93, 87, 106, 108, 107, 113, 110, 121, 123, 122, 117
+};
+
+void Cinema::execute() {
+	int timer_nr = 0;
+	int16 txt_anz = 0;
+	int topIndex = 0;
+	int selected = -1;
+	bool flag = false;
+	int delay = 0;
+	Common::Array<int> cutscenes;
+	getCutscenes(cutscenes);
+
+	out->set_fontadr(font6x8);
+	out->set_vorschub(fvorx6x8, fvory6x8);
+	atds->load_atds(98, 1);
+
+	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
+	room->load_tgp(4, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	show_cur();
+	g_events->clearEvents();
+	kbinfo.scan_code = 0;
+
+	for (bool endLoop = false; !endLoop;) {
+		timer_nr = 0;
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+
+		if (!cutscenes.empty()) {
+			// Render cutscene list
+			for (int i = 0; i < CINEMA_LINES; ++i) {
+				char *csName = atds->ats_get_txt(546 + i + topIndex,
+					0, &txt_anz, 1);
+				int yp = i * 10 + 68;
+
+				if (i == selected)
+					out->box_fill(37, yp, 308, yp + 10, 42);
+				out->printxy(40, yp, 14, 300, 0, "%s", csName);
+			}
+		} else {
+			// No cutscenes seen yet
+			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
+			out->printxy(40, 68, 14, 300, scr_width, none);
+		}
+
+		if (minfo.button == 1 && !flag) {
+			flag = true;
+			switch (in->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
+			case 0:
+				kbinfo.scan_code = Common::KEYCODE_UP;
+				if (!endLoop) {
+					endLoop = true;
+					timer_nr = 5;
+				}
+				break;
+
+			case 1:
+				kbinfo.scan_code = Common::KEYCODE_DOWN;
+				if (!endLoop) {
+					endLoop = true;
+					timer_nr = 5;
+				}
+				break;
+
+			case 2:
+			{
+				int selIndex = (minfo.y - 68) / 10 + topIndex;
+				if (selIndex < (int)cutscenes.size())
+					selected = selIndex;
+				kbinfo.scan_code = Common::KEYCODE_RETURN;
+				break;
+			}
+
+			default:
+				break;
+			}
+		} else if (minfo.button == 2 && !flag) {
+			kbinfo.scan_code = ESC;
+			flag = true;
+		} else if (minfo.button != 1) {
+			flag = false;
+			timer_nr = 0;
+			delay = 0;
+		} else if (flag) {
+			EVENTS_UPDATE;
+			if (--delay <= 0)
+				flag = false;
+		}
+
+		switch (kbinfo.scan_code) {
+		case ESC:
+			endLoop = true;
+			kbinfo.scan_code = 0;
+			break;
+
+		case Common::KEYCODE_UP:
+		case Common::KEYCODE_KP8:
+			if (selected > 0) {
+				--selected;
+			} else if (topIndex > 0) {
+				--topIndex;
+			}
+			kbinfo.scan_code = 0;
+			break;
+
+		case Common::KEYCODE_DOWN:
+		case Common::KEYCODE_KP2:
+		{
+			int newIndex = selected + 1;
+			if (selected >= 11) {
+				if ((topIndex + newIndex) < (int)cutscenes.size())
+					++topIndex;
+			} else {
+				if ((topIndex + newIndex) < (int)cutscenes.size())
+					++selected;
+			}
+			kbinfo.scan_code = 0;
+			break;
+		}
+
+		case Common::KEYCODE_RETURN:
+			hide_cur();
+			out->cls();
+			out->setze_zeiger(screen0);
+			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			print_rows(546 + topIndex);
+
+			flc->set_custom_user_function(cut_serv);
+			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
+			flc->remove_custom_user_function();
+			out->set_fontadr(font6x8);
+			out->set_vorschub(fvorx6x8, fvory6x8);
+			show_cur();
+			delay = 0;
+			flag = false;
+			break;
+
+		default:
+			break;
+		}
+
+		// The below are hacks to get the dialog to work in ScummVM
+		kbinfo.scan_code = 0;
+		minfo.button = 0;
+		txt_anz = 0;
+
+		if (!txt_anz) {
+			cur->plot_cur();
+
+			if (flag) {
+				flag = false;
+				out->setze_zeiger(screen0);
+				room->set_ak_pal(&room_blk);
+				fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			} else {
+				out->back2screen(workpage);
+			}
+		}
+
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
+	}
+
+	room->open_handle(EPISODE1, "rb", 0);
+	room->set_ak_pal(&room_blk);
+	hide_cur();
+	uhr->reset_timer(0, 5);
+}
+
+int16 Cinema::cut_serv(int16 frame) {
+	if (in->get_switch_code() == ESC) {
+		ailsnd->stopMod();
+		ailsnd->endSound();
+		return -1;
+
+	} else {
+		return 0;
+	}
+}
+
+} // namespace Dialogs
+} // namespace Chewy
diff --git a/engines/chewy/dialogs/cinema.h b/engines/chewy/dialogs/cinema.h
new file mode 100644
index 00000000000..9896169021c
--- /dev/null
+++ b/engines/chewy/dialogs/cinema.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_DIALOGS_CINEMA_H
+#define CHEWY_DIALOGS_CINEMA_H
+
+#include "common/scummsys.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+class Cinema {
+private:
+	static int16 cut_serv(int16 frame);
+
+public:
+	static void execute();
+};
+
+} // namespace Dialogs
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
new file mode 100644
index 00000000000..e78fc4ce671
--- /dev/null
+++ b/engines/chewy/dialogs/credits.cpp
@@ -0,0 +1,206 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/dialogs/credits.h"
+#include "chewy/events.h"
+#include "chewy/file.h"
+#include "chewy/global.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+static const int16 CREDITS_POS[65][2] = {
+	{40,  160}, {80,  170}, {40,  190}, {80,  200}, {80,  210},
+	{40,  230}, {80,  240}, {80,  250}, {80,  260}, {40,  280},
+	{80,  290}, {80,  300}, {80,  310}, {80,  320}, {40,  340},
+	{80,  350}, {80,  360}, {40,  380}, {80,  390}, {40,  410},
+	{80,  420}, {40,  440}, {80,  450}, {40,  470}, {80,  480},
+	{80,  490}, {80,  500}, {80,  510}, {80,  520}, {40,  540},
+	{80,  550}, {80,  560}, {80,  570}, {80,  580}, {40,  600},
+	{80,  610}, {80,  620}, {80,  630}, {80,  640}, {80,  650},
+	{80,  660}, {80,  670}, {80,  680}, {80,  690}, {80,  700},
+	{80,  710}, {80,  720}, {80,  730}, {80,  740}, {80,  750},
+	{80,  760}, {40,  780}, {40,  790}, {40,  800}, {40,  810},
+	{40,  820}, {40,  840}, {80,  850}, {40,  870}, {80,  880},
+	{80,  890}, {80,  910}, {80,  920}, {80,  930}, {80,  940}
+};
+
+static const bool CREDITS_TYPE[65] = {
+	true, false, true, false, false, true, false, false, false, true,
+	false, false, false, false, true, false, false, true, false, true,
+	false, true, false, true, false, false, false, false, false, true,
+	false, false, false, false, true, false, false, false, false, false,
+	false, false, false, false, false, false, false, false, false, false,
+	false, true, true, true, true, true, true, false, true, false,
+	false, true, true, true, true
+};
+
+static const char *CREDITS_TEXT[65] = {
+	"Idea & Story:",
+	"Carsten Wieland",
+	"Programming:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Graphics & Animation:",
+	"Carsten Wieland",
+	"Nihat Keesen",
+	"Stefan Frank",
+	"Text & Dialogues:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Carsten Wieland",
+	"Wolfgang Walk",
+	"Music:",
+	"Carsten Wieland",
+	"Stelter Studios",
+	"Sound FX:",
+	"Helmut Theuerkauf",
+	"Producer & Lecturer:",
+	"Wolfgang Walk",
+	"Minister of financial affairs:",
+	"Carsten (Dagobert) Korte",
+	"Testers:",
+	"Lutz Rafflenbeul",
+	"Thomas Friedmann",
+	"Bernhard Ewers",
+	"Christian von der Hotline",
+	"Carsten Korte",
+	"The voices:",
+	"Chewy......Renier Baaken",
+	"Howard.....Wolfgang Walk",
+	"Nichelle...Indhira Mohammed",
+	"Clint......Alexander Schottky",
+	"Also cast:",
+	"Renier Baaken",
+	"Guido B\x94sherz",
+	"Gerhard Fehn",
+	"Alice Krause",
+	"Reinhard Lie\xE1",
+	"Willi Meyer",
+	"Nicole Meister",
+	"Lutz Rafflenbeul",
+	"Alexander Schottky",
+	"Bernd Schulze",
+	"Susanne Simenec",
+	"Helmut Theuerkauf",
+	"Andreas Vogelpoth",
+	"Mark Wagener",
+	"Wolfgang Walk",
+	"Thomas Piet Wiesenm\x81ller",
+	"Speech recorded by",
+	"tmp Studio, Moers by Willi Meyer",
+	"Cut by Hartmut Stelter",
+	"Studios Hamburg and",
+	"Carsten Wieland",
+	"Soundsystem:",
+	"AIL (c) Miles Design",
+	"Adventure Engine:",
+	"I.C.M. developed by",
+	"New Generation Software",
+	"Song Boo Boo Ba Baby composed",
+	"by Haiko Ruttmann,",
+	"Lyrics Wolfgang Walk,",
+	"featuring Indhira Mohammed."
+};
+
+void Credits::execute() {
+	int lineScrolled = 0;
+	int fontCol;
+
+	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
+	room->load_tgp(5, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+	out->setze_zeiger(screen0);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+
+	for (int i = 0; i < 6; ++i) {
+		int color = 63 - (6 * i);
+
+		out->raster_col(6 - i, color, 0, 0);
+		out->raster_col(7 + i, color, 0, 0);
+
+		color = 63 - (4 * i);
+		out->raster_col(37 - i, color, color, color);
+		out->raster_col(38 + i, color, color, color);
+	}
+
+	_G(spieler).DelaySpeed = 2;
+
+	for (;;) {
+		if (in->get_switch_code() == ESC || SHOULD_QUIT)
+			break;
+
+		// Display the starfield background
+		out->setze_zeiger(workptr);
+		out->map_spr2screen(ablage[room_blk.AkAblage],
+			_G(spieler).scrollx, _G(spieler).scrolly);
+
+		// Animate moving the background
+		if (++_G(spieler).scrollx >= 320)
+			_G(spieler).scrollx = 0;
+
+		if (in->get_switch_code() == ESC)
+			break;
+
+		++lineScrolled;
+		g_events->delay(50);
+		bool stillScrolling = false;
+
+		for (int i = 0; i < 65; ++i) {
+			int destY = CREDITS_POS[i][1] - lineScrolled;
+			if (destY >= 160 || destY <= 40)
+				continue;
+
+			if (CREDITS_TYPE[i]) {
+				fontCol = 32;
+				out->set_fontadr(font6x8);
+				out->set_vorschub(fvorx6x8, fvory6x8);
+			} else {
+				fontCol = 1;
+				out->set_fontadr(font8x8);
+				out->set_vorschub(fvorx8x8, fvory8x8);
+			}
+			stillScrolling = true;
+
+			int fgCol = fontCol + (160 - destY) / 10;
+			out->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
+		}
+
+		if (!stillScrolling)
+			break;
+
+		out->setze_zeiger(nullptr);
+		out->back2screen(workpage);
+	}
+
+	out->set_fontadr(font8x8);
+	out->set_vorschub(fvorx8x8, fvorx8x8);
+	room->open_handle("back/episode1.tgp", "rb", 0);
+
+	room->set_ak_pal(&room_blk);
+	hide_cur();
+	uhr->reset_timer(0, 5);
+}
+
+} // namespace Dialogs
+} // namespace Chewy
diff --git a/engines/chewy/dialogs/credits.h b/engines/chewy/dialogs/credits.h
new file mode 100644
index 00000000000..29ffb6fe8f9
--- /dev/null
+++ b/engines/chewy/dialogs/credits.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_DIALOGS_CREDITS_H
+#define CHEWY_DIALOGS_CREDITS_H
+
+namespace Chewy {
+namespace Dialogs {
+
+class Credits {
+public:
+	static void execute();
+};
+
+} // namespace Dialogs
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index a82f2cc9c30..0216526b443 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -66,101 +66,7 @@ static const int16 FILE_ICONS[8 * 4] = {
 	232, 143, 310, 193
 };
 
-static const int16 CREDITS_POS[65][2] = {
-	{40,  160}, {80,  170}, {40,  190}, {80,  200}, {80,  210},
-	{40,  230}, {80,  240}, {80,  250}, {80,  260}, {40,  280},
-	{80,  290}, {80,  300}, {80,  310}, {80,  320}, {40,  340},
-	{80,  350}, {80,  360}, {40,  380}, {80,  390}, {40,  410},
-	{80,  420}, {40,  440}, {80,  450}, {40,  470}, {80,  480},
-	{80,  490}, {80,  500}, {80,  510}, {80,  520}, {40,  540},
-	{80,  550}, {80,  560}, {80,  570}, {80,  580}, {40,  600},
-	{80,  610}, {80,  620}, {80,  630}, {80,  640}, {80,  650},
-	{80,  660}, {80,  670}, {80,  680}, {80,  690}, {80,  700},
-	{80,  710}, {80,  720}, {80,  730}, {80,  740}, {80,  750},
-	{80,  760}, {40,  780}, {40,  790}, {40,  800}, {40,  810},
-	{40,  820}, {40,  840}, {80,  850}, {40,  870}, {80,  880},
-	{80,  890}, {80,  910}, {80,  920}, {80,  930}, {80,  940}
-};
-
-static const bool CREDITS_TYPE[65] = {
-	true, false, true, false, false, true, false, false, false, true,
-	false, false, false, false, true, false, false, true, false, true,
-	false, true, false, true, false, false, false, false, false, true,
-	false, false, false, false, true, false, false, false, false, false,
-	false, false, false, false, false, false, false, false, false, false,
-	false, true, true, true, true, true, true, false, true, false,
-	false, true, true, true, true
-};
-
-static const char *CREDITS_TEXT[65] = {
-	"Idea & Story:",
-	"Carsten Wieland",
-	"Programming:",
-	"Helmut Theuerkauf",
-	"Alexander Diessner",
-	"Graphics & Animation:",
-	"Carsten Wieland",
-	"Nihat Keesen",
-	"Stefan Frank",
-	"Text & Dialogues:",
-	"Helmut Theuerkauf",
-	"Alexander Diessner",
-	"Carsten Wieland",
-	"Wolfgang Walk",
-	"Music:",
-	"Carsten Wieland",
-	"Stelter Studios",
-	"Sound FX:",
-	"Helmut Theuerkauf",
-	"Producer & Lecturer:",
-	"Wolfgang Walk",
-	"Minister of financial affairs:",
-	"Carsten (Dagobert) Korte",
-	"Testers:",
-	"Lutz Rafflenbeul",
-	"Thomas Friedmann",
-	"Bernhard Ewers",
-	"Christian von der Hotline",
-	"Carsten Korte",
-	"The voices:",
-	"Chewy......Renier Baaken",
-	"Howard.....Wolfgang Walk",
-	"Nichelle...Indhira Mohammed",
-	"Clint......Alexander Schottky",
-	"Also cast:",
-	"Renier Baaken",
-	"Guido B\x94sherz",
-	"Gerhard Fehn",
-	"Alice Krause",
-	"Reinhard Lie\xE1",
-	"Willi Meyer",
-	"Nicole Meister",
-	"Lutz Rafflenbeul",
-	"Alexander Schottky",
-	"Bernd Schulze",
-	"Susanne Simenec",
-	"Helmut Theuerkauf",
-	"Andreas Vogelpoth",
-	"Mark Wagener",
-	"Wolfgang Walk",
-	"Thomas Piet Wiesenm\x81ller",
-	"Speech recorded by",
-	"tmp Studio, Moers by Willi Meyer",
-	"Cut by Hartmut Stelter",
-	"Studios Hamburg and",
-	"Carsten Wieland",
-	"Soundsystem:",
-	"AIL (c) Miles Design",
-	"Adventure Engine:",
-	"I.C.M. developed by",
-	"New Generation Software",
-	"Song Boo Boo Ba Baby composed",
-	"by Haiko Ruttmann,",
-	"Lyrics Wolfgang Walk,",
-	"featuring Indhira Mohammed."
-};
-
-	Common::File *File::open(const char *name) {
+Common::File *File::open(const char *name) {
 	Common::File *f = new Common::File();
 	if (f->open(name)) {
 		return f;
@@ -709,85 +615,4 @@ void option_menue(taf_info *ti) {
 	out->setze_zeiger(workptr);
 }
 
-void gbook() {
-	int lineScrolled = 0;
-	int fontCol;
-
-	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
-	room->load_tgp(5, &room_blk, 1, 0, "BACK/GBOOK.TGP");
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-	out->setze_zeiger(screen0);
-	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-
-	for (int i = 0; i < 6; ++i) {
-		int color = 63 - (6 * i);
-		
-		out->raster_col(6 - i, color, 0, 0);
-		out->raster_col(7 + i, color, 0, 0);
-
-		color = 63 - (4 * i);
-		out->raster_col(37 - i, color, color, color);
-		out->raster_col(38 + i, color, color, color);		
-	}
-
-	_G(spieler).DelaySpeed = 2;
-
-	for (;;) {
-		if (in->get_switch_code() == ESC || SHOULD_QUIT)
-			break;
-
-		// Display the starfield background
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage],
-			_G(spieler).scrollx, _G(spieler).scrolly);
-
-		// Animate moving the background
-		if (++_G(spieler).scrollx >= 320)
-			_G(spieler).scrollx = 0;
-
-		if (in->get_switch_code() == ESC)
-			break;
-
-		++lineScrolled;
-		g_events->delay(50);
-		bool stillScrolling = false;
-		
-		for (int i = 0; i < 65; ++i) {
-			int destY = CREDITS_POS[i][1] - lineScrolled;
-			if (destY >= 160 || destY <= 40)
-				continue;
-
-			if (CREDITS_TYPE[i]) {
-				fontCol = 32;
-				out->set_fontadr(font6x8);
-				out->set_vorschub(fvorx6x8, fvory6x8);
-			} else {
-				fontCol = 1;
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
-			}
-			stillScrolling = true;
-
-			int fgCol = fontCol + (160 - destY) / 10;
-			out->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
-		}
-
-		if (!stillScrolling)
-			break;
-
-		out->setze_zeiger(nullptr);
-		out->back2screen(workpage);
-	}
-
-	out->set_fontadr(font8x8);
-	out->set_vorschub(fvorx8x8, fvorx8x8);
-	room->open_handle("back/episode1.tgp", "rb", 0);
-
-	room->set_ak_pal(&room_blk);
-	hide_cur();
-	uhr->reset_timer(0, 5);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1337de8c8cd..d86e4adb821 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -375,7 +375,6 @@ void init_room();
 int16 call_fileio(int16 palette, int16 mode);
 int16 file_menue();
 void option_menue(taf_info *ti);
-void gbook();
 
 void look_debug_action(int16 key_nr);
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 71a694ee192..03040000b7d 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -25,22 +25,11 @@
 #include "chewy/global.h"
 #include "chewy/main.h"
 #include "chewy/ngshext.h"
+#include "chewy/dialogs/cinema.h"
+#include "chewy/dialogs/credits.h"
 
 namespace Chewy {
 
-static constexpr int CINEMA_LINES = 12;
-
-static const int16 CINEMA_TBL[4 * 3] = {
-	10,  80,  32, 105,
-	10, 150,  32, 175,
-	36,  64, 310, 188
-};
-static const uint8 CINEMA_FLICS[35] = {
-	0, 2, 6, 9, 15, 12, 11, 18, 3, 48, 31, 44,
-	55, 58, 45, 65, 67, 68, 69, 80, 74, 83, 84, 88,
-	93, 87, 106, 108, 107, 113, 110, 121, 123, 122, 117
-};
-
 int MainMenu::_selection;
 int MainMenu::_personAni[3];
 
@@ -116,7 +105,7 @@ void MainMenu::execute() {
 			cur->move(152, 92);
 			minfo.x = 152;
 			minfo.y = 92;
-			cinema();
+			Dialogs::Cinema::execute();
 			break;
 
 		case MM_QUIT:
@@ -132,7 +121,7 @@ void MainMenu::execute() {
 			flic_cut(159, CFO_MODE);
 			flc->remove_custom_user_function();
 			fx->border(workpage, 100, 0, 0);
-			gbook();
+			Dialogs::Credits::execute();
 			break;
 
 		default:
@@ -301,179 +290,4 @@ void MainMenu::restorePersonAni() {
 	}
 }
 
-void MainMenu::cinema() {
-	int timer_nr = 0;
-	int16 txt_anz = 0;
-	int topIndex = 0;
-	int selected = -1;
-	bool flag = false;
-	int delay = 0;
-	Common::Array<int> cutscenes;
-	getCutscenes(cutscenes);
-
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
-	atds->load_atds(98, 1);
-	
-	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
-	room->load_tgp(4, &room_blk, 1, 0, "BACK/GBOOK.TGP");
-	show_cur();
-	g_events->clearEvents();
-	kbinfo.scan_code = 0;
-
-	for (bool endLoop = false; !endLoop;) {
-		timer_nr = 0;
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-
-		if (!cutscenes.empty()) {
-			// Render cutscene list
-			for (int i = 0; i < CINEMA_LINES; ++i) {
-				char *csName = atds->ats_get_txt(546 + i + topIndex,
-					0, &txt_anz, 1);
-				int yp = i * 10 + 68;
-
-				if (i == selected)
-					out->box_fill(37, yp, 308, yp + 10, 42);
-				out->printxy(40, yp, 14, 300, 0, "%s", csName);
-			}
-		} else {
-			// No cutscenes seen yet
-			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
-			out->printxy(40, 68, 14, 300, scr_width, none);
-		}
-
-		if (minfo.button == 1 && !flag) {
-			flag = true;
-			switch (in->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
-			case 0:
-				kbinfo.scan_code = Common::KEYCODE_UP;
-				if (!endLoop) {
-					endLoop = true;
-					timer_nr = 5;
-				}
-				break;
-
-			case 1:
-				kbinfo.scan_code = Common::KEYCODE_DOWN;
-				if (!endLoop) {
-					endLoop = true;
-					timer_nr = 5;
-				}
-				break;
-
-			case 2: {
-				int selIndex = (minfo.y - 68) / 10 + topIndex;
-				if (selIndex < (int)cutscenes.size())
-					selected = selIndex;
-				kbinfo.scan_code = Common::KEYCODE_RETURN;
-				break;
-			}
-
-			default:
-				break;
-			}
-		} else if (minfo.button == 2 && !flag) {
-			kbinfo.scan_code = ESC;
-			flag = true;
-		} else if (minfo.button != 1) {
-			flag = false;
-			timer_nr = 0;
-			delay = 0;
-		} else if (flag) {
-			EVENTS_UPDATE;
-			if (--delay <= 0)
-				flag = false;
-		}
-
-		switch (kbinfo.scan_code) {
-		case ESC:
-			endLoop = true;
-			kbinfo.scan_code = 0;
-			break;
-
-		case Common::KEYCODE_UP:
-		case Common::KEYCODE_KP8:
-			if (selected > 0) {
-				--selected;
-			} else if (topIndex > 0) {
-				--topIndex;
-			}
-			kbinfo.scan_code = 0;
-			break;
-
-		case Common::KEYCODE_DOWN:
-		case Common::KEYCODE_KP2: {
-			int newIndex = selected + 1;
-			if (selected >= 11) {
-				if ((topIndex + newIndex) < (int)cutscenes.size())
-					++topIndex;
-			} else {
-				if ((topIndex + newIndex) < (int)cutscenes.size())
-					++selected;
-			}
-			kbinfo.scan_code = 0;
-			break;
-		}
-
-		case Common::KEYCODE_RETURN:
-			hide_cur();
-			out->cls();
-			out->setze_zeiger(screen0);
-			fx->blende1(workptr, screen0, pal, 150, 0, 0);
-			print_rows(546 + topIndex);
-
-			flc->set_custom_user_function(cinema_cut_serv);
-			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
-			flc->remove_custom_user_function();
-			out->set_fontadr(font6x8);
-			out->set_vorschub(fvorx6x8, fvory6x8);
-			show_cur();
-			delay = 0;
-			flag = false;
-			break;
-
-		default:
-			break;
-		}
-
-		// The below are hacks to get the dialog to work in ScummVM
-		kbinfo.scan_code = 0;
-		minfo.button = 0;
-		txt_anz = 0;
-
-		if (!txt_anz) {
-			cur->plot_cur();
-
-			if (flag) {
-				flag = false;
-				out->setze_zeiger(screen0);
-				room->set_ak_pal(&room_blk);
-				fx->blende1(workptr, screen0, pal, 150, 0, 0);
-			} else {
-				out->back2screen(workpage);
-			}
-		}
-
-		EVENTS_UPDATE;
-		SHOULD_QUIT_RETURN;
-	}
-
-	room->open_handle(EPISODE1, "rb", 0);
-	room->set_ak_pal(&room_blk);
-	hide_cur();
-	uhr->reset_timer(0, 5);
-}
-
-int16 MainMenu::cinema_cut_serv(int16 frame) {
-	if (in->get_switch_code() == ESC) {
-		ailsnd->stopMod();
-		ailsnd->endSound();
-		return -1;
-
-	} else {
-		return 0;
-	}
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/main_menu.h
index 892efa8230e..a0b40a08ed4 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/main_menu.h
@@ -66,11 +66,6 @@ private:
 	 */
 	static bool loadGame();
 
-	/**
-	 * Cinema dialog
-	 */
-	static void cinema();
-
 	/**
 	 * Saves the personAni array
 	 */
@@ -81,8 +76,6 @@ private:
 	 */
 	static void restorePersonAni();
 
-	static int16 cinema_cut_serv(int16 frame);
-
 public:
 	/**
 	 * Displays the menu
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index b0ae130c9b4..5ff740b3bd8 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -40,6 +40,8 @@ MODULE_OBJS = \
 	text.o \
 	timer.o \
 	types.o \
+	dialogs/cinema.o \
+	dialogs/credits.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \
 	rooms/room1.o \
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 099b1c41e5f..1b76f027bea 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
+#include "chewy/dialogs/credits.h"
 #include "chewy/rooms/room89.h"
 #include "chewy/rooms/room66.h"
 
@@ -134,7 +135,7 @@ void Room89::entry() {
 		out->setze_zeiger(nullptr);
 		out->cls();
 
-		gbook();
+		Dialogs::Credits::execute();
 		
 		_G(spieler).SVal4 = 1;
 		out->ausblenden(2);


Commit: 5ea7cb956fa1f0e01c39e99822d1748a2b66c523
    https://github.com/scummvm/scummvm/commit/5ea7cb956fa1f0e01c39e99822d1748a2b66c523
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Change uses of GBOOK.TGP to a define

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/file.cpp
    engines/chewy/menus.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 7fea2505ace..9eca8b6e822 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -158,8 +158,8 @@ enum SetupScreenMode {
 #define OPTION_TAF "MISC/OPTION.TAF"
 
 #define SAVEDIR "save/savegame."
-
 #define DETAILTEST "room/test.rdi"
+#define GBOOK "BACK/GBOOK.TGP"
 
 #define EPISODE1_TGP 0
 #define GBOOK_TGP 1
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index d23084166bc..b5f0669a956 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -55,8 +55,8 @@ void Cinema::execute() {
 	out->set_vorschub(fvorx6x8, fvory6x8);
 	atds->load_atds(98, 1);
 
-	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
-	room->load_tgp(4, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	room->open_handle(GBOOK, "rb", 0);
+	room->load_tgp(4, &room_blk, 1, 0, GBOOK);
 	show_cur();
 	g_events->clearEvents();
 	kbinfo.scan_code = 0;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index e78fc4ce671..afeac80d23a 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -125,8 +125,8 @@ void Credits::execute() {
 	int lineScrolled = 0;
 	int fontCol;
 
-	room->open_handle("BACK/GBOOK.TGP", "rb", 0);
-	room->load_tgp(5, &room_blk, 1, 0, "BACK/GBOOK.TGP");
+	room->open_handle(GBOOK, "rb", 0);
+	room->load_tgp(5, &room_blk, 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	out->setze_zeiger(screen0);
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 0216526b443..0f08025e0ce 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -155,7 +155,7 @@ int16 file_menue() {
 	taf_info *ti = mem->taf_adr(OPTION_TAF);
 	//SpriteResource *options = new SpriteResource(OPTION_TAF);
 	ret = 0;
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -409,7 +409,7 @@ int16 file_menue() {
 
 void option_menue(taf_info *ti) {
 	long akt_clock = 0, stop_clock = 0;
-	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
+	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
@@ -606,7 +606,7 @@ void option_menue(taf_info *ti) {
 			--delay_count;
 	}
 
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, "back/gbook.tgp");
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 090491105cd..ffe7e87dd78 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -708,7 +708,7 @@ static void showDiary() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 
-	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, "BACK/GBOOK.TGP");
+	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 	out->back2screen(workpage);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index e09b53084dc..433659d0a59 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2177,7 +2177,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 
-		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, "BACK/GBOOK.TGP");
+		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, GBOOK);
 		out->setze_zeiger(workptr);
 		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		out->back2screen(workpage);


Commit: 2560edc9a3a4e81a14c0749ad07af8714c063b44
    https://github.com/scummvm/scummvm/commit/2560edc9a3a4e81a14c0749ad07af8714c063b44
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Split files and options menus into their own classes

Changed paths:
  A engines/chewy/dialogs/files.cpp
  A engines/chewy/dialogs/files.h
  A engines/chewy/dialogs/options.cpp
  A engines/chewy/dialogs/options.h
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/module.mk


diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
new file mode 100644
index 00000000000..de90f9a9015
--- /dev/null
+++ b/engines/chewy/dialogs/files.cpp
@@ -0,0 +1,311 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/dialogs/files.h"
+#include "chewy/dialogs/options.h"
+#include "chewy/events.h"
+#include "chewy/file.h"
+#include "chewy/global.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+static const int16 FILE_ICONS[8 * 4] = {
+	14, 73, 32, 94,
+	14, 96, 32, 118,
+	36, 64, 310, 128,
+	16, 143, 76, 193,
+	78, 143, 130, 193,
+	132, 143, 178, 193,
+	180, 143, 228, 193,
+	232, 143, 310, 193
+};
+
+
+int16 Files::execute() {
+	int16 u_index;
+	int16 key = 0;
+	int16 i, j;
+	int16 x[8];
+	int16 y[8];
+	int16 mode[9];
+	int16 ret;
+	char *fnames;
+	char *tmp;
+	int16 text_off, active_slot;
+	int16 rect, line;
+	taf_info *ti = mem->taf_adr(OPTION_TAF);
+	//SpriteResource *options = new SpriteResource(OPTION_TAF);
+	ret = 0;
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	out->setze_zeiger(screen0);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	out->setze_zeiger(workptr);
+
+	fnames = iog->io_init(&ioptr);
+	fnames += 1;
+	if (!modul) {
+		x[0] = 1;
+		x[1] = 1;
+		y[0] = 0;
+		y[1] = 0;
+		for (i = 2; i < 8; i++) {
+			x[i] = 5;
+			y[i] = 5;
+		}
+		for (i = 0; i < 8; i++)
+			mode[i] = 0;
+		mode[8] = 1;
+		text_off = 0;
+		active_slot = 0;
+		while (key != ESC) {
+			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			for (i = 28, j = 0; i < 35; i++, j++) {
+#if 0
+				TAFChunk *sprite = options->getSprite(i);
+				// TODO: korrektur?
+				if (!mode[j])
+					out->sprite_set(sprite->data, 16 + /*ti->korrektur[i << 1] + */x[j],
+						76 + /*ti->korrektur[(i << 1) + 1] + */y[j], 0);
+				else
+					out->sprite_set(sprite->data, 16 /* + ti->korrektur[i << 1]*/,
+						76 /*+ ti->korrektur[(i << 1) + 1]*/, 0);
+#endif
+				if (!mode[j])
+					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1] + x[j],
+						76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
+				else
+					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
+						76 + ti->korrektur[(i << 1) + 1], 0);
+			}
+			key = in->get_switch_code();
+			if (mode[2] || mode[3] || mode[8]) {
+				tmp = fnames + (text_off * 40);
+				for (i = 0; i < 6; i++) {
+					if (tmp != 0) {
+						if (i != active_slot) {
+							out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+							out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
+						} else {
+							if (mode[8]) {
+								out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+								out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
+							} else {
+								out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
+								out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
+								out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
+							}
+						}
+					}
+					tmp += 40;
+				}
+			}
+			if (mode[0])
+				--mode[0];
+			if (mode[1])
+				--mode[1];
+			if (mode[4])
+				--mode[4];
+			if (mode[4] == 1)
+				key = ESC;
+			if (mode[5])
+				--mode[5];
+			if (mode[5] == 1) {
+#ifdef ENGLISCH
+				out->printxy(120, 138, 255, 300, 0, "QUIT ?? Y/N ");
+#else
+				out->printxy(120, 138, 255, 300, 0, "BEENDEN ?? J/N ");
+#endif
+				out->back2screen(workpage);
+				in->alter_kb_handler();
+
+				key = getch();
+				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
+					ret = 1;
+					key = ESC;
+				} else
+					key = 0;
+				in->neuer_kb_handler(&kbinfo);
+			}
+			if (mode[6])
+				--mode[6];
+			if (mode[6] == 1) {
+				Dialogs::Options::execute(ti);
+			}
+			if ((minfo.button == 1) || (key == ENTER)) {
+				WAIT_TASTE_LOS
+					rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
+				key = 0;
+				switch (rect) {
+				case 0:
+					key = CURSOR_UP + ALT;
+					break;
+				case 1:
+					key = CURSOR_DOWN + ALT;
+					break;
+				case 2:
+					line = (minfo.y - 68) / 10;
+					if (line == active_slot)
+						key = ENTER;
+					else
+						active_slot = line;
+					if (active_slot > 5)
+						active_slot = 5;
+					break;
+				case 3:
+					key = F1_KEY;
+					break;
+				case 4:
+					key = F2_KEY;
+					break;
+				case 5:
+					key = F3_KEY;
+					break;
+				case 6:
+					key = F4_KEY;
+					break;
+				case 7:
+					key = F5_KEY;
+					break;
+				}
+				minfo.button = 0;
+			}
+
+			switch (key) {
+			case F1_KEY:
+				mode[2] = 1;
+				mode[3] = 0;
+				mode[8] = 0;
+
+				break;
+
+			case F2_KEY:
+				mode[2] = 0;
+				mode[3] = 1;
+				mode[8] = 0;
+
+				break;
+
+			case F3_KEY:
+				mode[4] = 10;
+				break;
+
+			case F4_KEY:
+				mode[5] = 10;
+				break;
+
+			case F5_KEY:
+				mode[6] = 10;
+				break;
+
+			case CURSOR_UP + ALT:
+				WAIT_TASTE_LOS
+					if (mode[2] || mode[3]) {
+						mode[0] = 10;
+						if (active_slot > 0)
+							--active_slot;
+						else if (text_off > 0)
+							--text_off;
+					}
+				break;
+
+			case CURSOR_DOWN + ALT:
+				if (mode[2] || mode[3]) {
+					mode[1] = 10;
+					if (active_slot < 5)
+						++active_slot;
+					else if (text_off < (20 - 6))
+						++text_off;
+				}
+				WAIT_TASTE_LOS
+					break;
+
+			case ENTER:
+			case ENTER + ALT:
+				WAIT_TASTE_LOS
+					if (mode[3]) {
+						tmp = fnames + ((text_off + active_slot) * 40);
+						if (tmp[0]) {
+							CurrentSong = -1;
+							iog->load(text_off + active_slot,
+								ioptr.save_path);
+							key = ESC;
+						}
+					} else if (mode[2]) {
+						out->back2screen(workpage);
+						out->setze_zeiger(screen0);
+						in->alter_kb_handler();
+						tmp = fnames + ((text_off + active_slot) * 40);
+						key = out->scanxy(70, 68 + (active_slot * 10),
+							255, 42, 14, 0, "%36s36", tmp);
+						in->neuer_kb_handler(&kbinfo);
+						out->setze_zeiger(workptr);
+						if (key != 27) {
+							iog->save_entry(text_off + active_slot,
+								ioptr.save_path);
+						}
+						key = 0;
+					}
+					break;
+
+			case CURSOR_UP:
+				cur->move(minfo.x, --minfo.y);
+				break;
+
+			case CURSOR_DOWN:
+				cur->move(minfo.x, ++minfo.y);
+				break;
+
+			case CURSOR_LEFT:
+				cur->move(--minfo.x, minfo.y);
+				break;
+
+			case CURSOR_RIGHT:
+				cur->move(++minfo.x, minfo.y);
+				break;
+
+			}
+			cur->plot_cur();
+			out->back2screen(workpage);
+
+			EVENTS_UPDATE;
+			SHOULD_QUIT_RETURN0;
+		}
+	}
+	free(ti);
+
+	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	fx_blend = BLEND1;
+	room->set_ak_pal(&room_blk);
+	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
+		spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+		room->GedXAnz[room_blk.AkAblage],
+		ged_mem[room_blk.AkAblage]);
+	check_shad(u_index, 1);
+
+	return ret;
+}
+
+} // namespace Dialogs
+} // namespace Chewy
diff --git a/engines/chewy/dialogs/files.h b/engines/chewy/dialogs/files.h
new file mode 100644
index 00000000000..66efb23e9af
--- /dev/null
+++ b/engines/chewy/dialogs/files.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_DIALOGS_FILES_H
+#define CHEWY_DIALOGS_FILES_H
+
+#include "common/scummsys.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+class Files {
+public:
+	static int16 execute();
+};
+
+} // namespace Dialogs
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
new file mode 100644
index 00000000000..00b04d22f99
--- /dev/null
+++ b/engines/chewy/dialogs/options.cpp
@@ -0,0 +1,267 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/dialogs/options.h"
+#include "chewy/events.h"
+#include "chewy/file.h"
+#include "chewy/global.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+#define SURIMY_START 0
+#define SURIMY_END 7
+#define SCHNULLER 8
+#define SCHNULL_BAND 22
+#define MUND_START 9
+#define MUND_END 11
+#define SCHNULL_OFF 23
+#define TDISP_START 12
+#define TDISP_END 19
+#define TDISP_EIN 20
+#define TDISP_AUS 21
+#define MUSIC_OFF 24
+#define MUSIC_ON1 25
+#define MUSIC_ON2 26
+#define EXIT 27
+
+static const int16 OPTION_ICONS[9 * 4] = {
+	 18,   61,   40,   76,
+	112,   61,  130,   76,
+	 82,  104,  144,  139,
+	164,   93,  194,  115,
+	198,   80,  206,  115,
+	210,   55,  302,  138,
+	126,  146,  210,  198,
+	 22,   92,   44,  136,
+	 50,   92,   72,  136
+};
+
+void Options::execute(taf_info *ti) {
+	long akt_clock = 0, stop_clock = 0;
+	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	out->setze_zeiger(screen0);
+
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	out->setze_zeiger(workptr);
+	int16 key = 0;
+	int16 surimy_ani = SURIMY_START;
+	int16 mund_ani = MUND_START;
+	int16 mund_delay = 3;
+	int16 mund_count = mund_delay;
+	int16 tdisp_ani = TDISP_START;
+	int16 tdisp_delay = 3;
+	int16 tdisp_count = tdisp_delay;
+	FrameSpeed = 0;
+	int16 delay_count = _G(spieler).DelaySpeed;
+	warning("stop_clock = (clock() / CLK_TCK) + 1;");
+	while (key != ESC) {
+		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+		++FrameSpeed;
+		warning("akt_clock = clock() / CLK_TCK;");
+		if (akt_clock >= stop_clock) {
+			//TmpFrame = FrameSpeed;
+			_G(spieler).DelaySpeed = (FrameSpeed >> 1) / _G(spieler).FramesPerSecond;
+
+			FrameSpeed = 0;
+			warning("stop_clock = (clock() / CLK_TCK) + 1;");
+		}
+
+		out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
+			8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
+		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
+		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
+		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
+
+		if (_G(spieler).SoundSwitch) {
+			out->sprite_set(ti->image[mund_ani],
+				18 + ti->korrektur[mund_ani << 1],
+				8 + ti->korrektur[(mund_ani << 1) + 1], 0);
+			out->sprite_set(ti->image[SCHNULL_OFF],
+				18 + ti->korrektur[SCHNULL_OFF << 1],
+				8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
+		} else {
+			out->sprite_set(ti->image[SCHNULLER],
+				18 + ti->korrektur[SCHNULLER << 1],
+				8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
+			out->sprite_set(ti->image[SCHNULL_BAND],
+				18 + ti->korrektur[SCHNULL_BAND << 1],
+				8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
+		}
+		out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
+		out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
+		out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
+
+		out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
+		out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
+		out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
+		if (_G(spieler).MusicSwitch) {
+			out->sprite_set(ti->image[MUSIC_ON1],
+				18 + ti->korrektur[MUSIC_ON1 << 1],
+				8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
+			out->sprite_set(ti->image[MUSIC_ON2],
+				18 + ti->korrektur[MUSIC_ON2 << 1],
+				8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
+		} else
+			out->sprite_set(ti->image[MUSIC_OFF],
+				18 + ti->korrektur[MUSIC_OFF << 1],
+				8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
+
+		if (_G(spieler).DisplayText) {
+			out->sprite_set(ti->image[tdisp_ani],
+				18 + ti->korrektur[tdisp_ani << 1],
+				8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
+			out->sprite_set(ti->image[TDISP_EIN],
+				18 + ti->korrektur[TDISP_EIN << 1],
+				8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
+		} else
+			out->sprite_set(ti->image[TDISP_AUS],
+				18 + ti->korrektur[TDISP_AUS << 1],
+				8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
+
+		out->sprite_set(ti->image[EXIT],
+			18 + ti->korrektur[EXIT << 1],
+			8 + ti->korrektur[(EXIT << 1) + 1], 0);
+
+		key = in->get_switch_code();
+		if ((minfo.button == 1) || (key == ENTER)) {
+			WAIT_TASTE_LOS
+				int16 rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
+			switch (rect) {
+			case 0:
+				if (_G(spieler).FramesPerSecond > 6)
+					--_G(spieler).FramesPerSecond;
+				break;
+			case 1:
+				if (_G(spieler).FramesPerSecond < 10)
+					++_G(spieler).FramesPerSecond;
+				break;
+			case 2:
+				if (_G(spieler).SoundSwitch) {
+					_G(spieler).SoundSwitch = false;
+					det->disable_room_sound();
+				} else {
+					_G(spieler).SoundSwitch = true;
+					det->enable_room_sound();
+				}
+				break;
+			case 3:
+			case 4:
+				if (_G(spieler).DisplayText) {
+					_G(spieler).DisplayText = false;
+					atds->setHasSpeech(true);
+					_G(spieler).SpeechSwitch = true;
+				} else {
+					_G(spieler).DisplayText = true;
+					atds->setHasSpeech(false);
+					_G(spieler).SpeechSwitch = false;
+				}
+				break;
+			case 5:
+				if (_G(spieler).MusicSwitch) {
+					_G(spieler).MusicSwitch = false;
+					ailsnd->stopMod();
+				} else {
+					_G(spieler).MusicSwitch = true;
+					CurrentSong = -1;
+					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
+				}
+				break;
+			case 6:
+				key = ESC;
+				break;
+			case 7:
+				_G(spieler).SoundVol = (136 - minfo.y) << 1;
+				ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+				break;
+			case 8:
+				_G(spieler).MusicVol = (136 - minfo.y) << 1;
+				ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
+				break;
+			}
+			minfo.button = 0;
+		}
+		switch (key) {
+
+		case CURSOR_UP:
+			cur->move(minfo.x, --minfo.y);
+			break;
+
+		case CURSOR_DOWN:
+			cur->move(minfo.x, ++minfo.y);
+			break;
+
+		case CURSOR_LEFT:
+			cur->move(--minfo.x, minfo.y);
+			break;
+
+		case CURSOR_RIGHT:
+			cur->move(++minfo.x, minfo.y);
+			break;
+		}
+
+		cur->plot_cur();
+		out->back2screen(workpage);
+		EVENTS_UPDATE;
+		SHOULD_QUIT_RETURN;
+
+		if (!delay_count) {
+			if (surimy_ani < SURIMY_END)
+				++surimy_ani;
+			else
+				surimy_ani = SURIMY_START;
+			if (mund_count > 0)
+				--mund_count;
+			else {
+				if (mund_ani < MUND_END)
+					++mund_ani;
+				else
+					mund_ani = MUND_START;
+				mund_count = mund_delay;
+			}
+			if (tdisp_count > 0)
+				--tdisp_count;
+			else {
+				if (tdisp_ani < TDISP_END)
+					++tdisp_ani;
+				else
+					tdisp_ani = TDISP_START;
+				tdisp_count = tdisp_delay;
+			}
+			delay_count = _G(spieler).DelaySpeed;
+		} else
+			--delay_count;
+	}
+
+	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	out->setze_zeiger(screen0);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	out->setze_zeiger(workptr);
+}
+
+} // namespace Dialogs
+} // namespace Chewy
diff --git a/engines/chewy/dialogs/options.h b/engines/chewy/dialogs/options.h
new file mode 100644
index 00000000000..764ef798135
--- /dev/null
+++ b/engines/chewy/dialogs/options.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_DIALOGS_OPTIONS_H
+#define CHEWY_DIALOGS_OPTIONS_H
+
+#include "chewy/ngstypes.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+class Options {
+public:
+	static void execute(taf_info *ti);
+};
+
+} // namespace Dialogs
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 0f08025e0ce..f7ffa6d5b33 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -27,45 +27,6 @@
 
 namespace Chewy {
 
-#define SURIMY_START 0
-#define SURIMY_END 7
-#define SCHNULLER 8
-#define SCHNULL_BAND 22
-#define MUND_START 9
-#define MUND_END 11
-#define SCHNULL_OFF 23
-#define TDISP_START 12
-#define TDISP_END 19
-#define TDISP_EIN 20
-#define TDISP_AUS 21
-#define MUSIC_OFF 24
-#define MUSIC_ON1 25
-#define MUSIC_ON2 26
-#define EXIT 27
-
-const int16 OPTION_ICONS[9 * 4] = {
-	 18,   61,   40,   76,
-	112,   61,  130,   76,
-	 82,  104,  144,  139,
-	164,   93,  194,  115,
-	198,   80,  206,  115,
-	210,   55,  302,  138,
-	126,  146,  210,  198,
-	 22,   92,   44,  136,
-	 50,   92,   72,  136
-};
-
-static const int16 FILE_ICONS[8 * 4] = {
-	14, 73, 32, 94,
-	14, 96, 32, 118,
-	36, 64, 310, 128,
-	16, 143, 76, 193,
-	78, 143, 130, 193,
-	132, 143, 178, 193,
-	180, 143, 228, 193,
-	232, 143, 310, 193
-};
-
 Common::File *File::open(const char *name) {
 	Common::File *f = new Common::File();
 	if (f->open(name)) {
@@ -140,479 +101,4 @@ int16 call_fileio(int16 palette, int16 mode) {
 	return ret;
 }
 
-int16 file_menue() {
-	int16 u_index;
-	int16 key = 0;
-	int16 i, j;
-	int16 x[8];
-	int16 y[8];
-	int16 mode[9];
-	int16 ret;
-	char *fnames;
-	char *tmp;
-	int16 text_off, active_slot;
-	int16 rect, line;
-	taf_info *ti = mem->taf_adr(OPTION_TAF);
-	//SpriteResource *options = new SpriteResource(OPTION_TAF);
-	ret = 0;
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
-	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
-
-	fnames = iog->io_init(&ioptr);
-	fnames += 1;
-	if (!modul) {
-		x[0] = 1;
-		x[1] = 1;
-		y[0] = 0;
-		y[1] = 0;
-		for (i = 2; i < 8; i++) {
-			x[i] = 5;
-			y[i] = 5;
-		}
-		for (i = 0; i < 8; i++)
-			mode[i] = 0;
-		mode[8] = 1;
-		text_off = 0;
-		active_slot = 0;
-		while (key != ESC) {
-			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-			for (i = 28, j = 0; i < 35; i++, j++) {
-#if 0
-				TAFChunk *sprite = options->getSprite(i);
-				// TODO: korrektur?
-				if (!mode[j])
-					out->sprite_set(sprite->data, 16 + /*ti->korrektur[i << 1] + */x[j],
-									76 + /*ti->korrektur[(i << 1) + 1] + */y[j], 0);
-				else
-					out->sprite_set(sprite->data, 16 /* + ti->korrektur[i << 1]*/,
-									76 /*+ ti->korrektur[(i << 1) + 1]*/, 0);
-#endif
-				if (!mode[j])
-					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1] + x[j],
-									76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
-				else
-					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
-									76 + ti->korrektur[(i << 1) + 1], 0);
-			}
-			key = in->get_switch_code();
-			if (mode[2] || mode[3] || mode[8]) {
-				tmp = fnames + (text_off * 40);
-				for (i = 0; i < 6; i++) {
-					if (tmp != 0) {
-						if (i != active_slot) {
-							out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-							out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
-						} else {
-							if (mode[8]) {
-								out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-								out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
-							} else {
-								out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
-								out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
-								out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
-							}
-						}
-					}
-					tmp += 40;
-				}
-			}
-			if (mode[0])
-				--mode[0];
-			if (mode[1])
-				--mode[1];
-			if (mode[4])
-				--mode[4];
-			if (mode[4] == 1)
-				key = ESC;
-			if (mode[5])
-				--mode[5];
-			if (mode[5] == 1) {
-#ifdef ENGLISCH
-				out->printxy(120, 138, 255, 300, 0, "QUIT ?? Y/N ");
-#else
-				out->printxy(120, 138, 255, 300, 0, "BEENDEN ?? J/N ");
-#endif
-				out->back2screen(workpage);
-				in->alter_kb_handler();
-
-				key = getch();
-				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
-					ret = 1;
- 					key = ESC;
-				} else
-					key = 0;
-				in->neuer_kb_handler(&kbinfo);
-			}
-			if (mode[6])
-				--mode[6];
-			if (mode[6] == 1) {
-				option_menue(ti);
-			}
-			if ((minfo.button == 1) || (key == ENTER)) {
-				WAIT_TASTE_LOS
-				rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
-				key = 0;
-				switch (rect) {
-				case 0:
-					key = CURSOR_UP + ALT;
-					break;
-				case 1:
-					key = CURSOR_DOWN + ALT;
-					break;
-				case 2:
-					line = (minfo.y - 68) / 10;
-					if (line == active_slot)
-						key = ENTER;
-					else
-						active_slot = line;
-					if (active_slot > 5)
-						active_slot = 5;
-					break;
-				case 3:
-					key = F1_KEY;
-					break;
-				case 4:
-					key = F2_KEY;
-					break;
-				case 5:
-					key = F3_KEY;
-					break;
-				case 6:
-					key = F4_KEY;
-					break;
-				case 7:
-					key = F5_KEY;
-					break;
-				}
-				minfo.button = 0;
-			}
-
-			switch (key) {
-			case F1_KEY:
-				mode[2] = 1;
-				mode[3] = 0;
-				mode[8] = 0;
-
-				break;
-
-			case F2_KEY:
-				mode[2] = 0;
-				mode[3] = 1;
-				mode[8] = 0;
-
-				break;
-
-			case F3_KEY:
-				mode[4] = 10;
-				break;
-
-			case F4_KEY:
-				mode[5] = 10;
-				break;
-
-			case F5_KEY:
-				mode[6] = 10;
-				break;
-
-			case CURSOR_UP+ALT:
-				WAIT_TASTE_LOS
-				if (mode[2] || mode[3]) {
-					mode[0] = 10;
-					if (active_slot > 0)
-						--active_slot;
-					else if (text_off > 0)
-						-- text_off;
-				}
-				break;
-
-			case CURSOR_DOWN+ALT:
-				if (mode[2] || mode[3]) {
-					mode[1] = 10;
-					if (active_slot < 5)
-						++active_slot;
-					else if (text_off < (20 - 6))
-						++ text_off;
-				}
-				WAIT_TASTE_LOS
-				break;
-
-			case ENTER:
-			case ENTER+ALT:
-				WAIT_TASTE_LOS
-				if (mode[3]) {
-					tmp = fnames + ((text_off + active_slot) * 40);
-					if (tmp[0]) {
-						CurrentSong = -1;
-						iog->load(text_off + active_slot,
-						          ioptr.save_path);
-						key = ESC;
-					}
-				} else if (mode[2]) {
-					out->back2screen(workpage);
-					out->setze_zeiger(screen0);
-					in->alter_kb_handler();
-					tmp = fnames + ((text_off + active_slot) * 40);
-					key = out->scanxy(70, 68 + (active_slot * 10),
-					                  255, 42, 14, 0, "%36s36", tmp);
-					in->neuer_kb_handler(&kbinfo);
-					out->setze_zeiger(workptr);
-					if (key != 27) {
-						iog->save_entry(text_off + active_slot,
-						                ioptr.save_path);
-					}
-					key = 0;
-				}
-				break;
-
-			case CURSOR_UP:
-				cur->move(minfo.x, --minfo.y);
-				break;
-
-			case CURSOR_DOWN:
-				cur->move(minfo.x, ++minfo.y);
-				break;
-
-			case CURSOR_LEFT:
-				cur->move(--minfo.x, minfo.y);
-				break;
-
-			case CURSOR_RIGHT:
-				cur->move(++minfo.x, minfo.y);
-				break;
-
-			}
-			cur->plot_cur();
-			out->back2screen(workpage);
-
-			EVENTS_UPDATE;
-			SHOULD_QUIT_RETURN0;
-		}
-	}
-	free(ti);
-
-	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
-	fx_blend = BLEND1;
-	room->set_ak_pal(&room_blk);
-	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-	                        spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-	                        room->GedXAnz[room_blk.AkAblage],
-	                        ged_mem[room_blk.AkAblage]);
-	check_shad(u_index, 1);
-
-	return ret;
-}
-
-void option_menue(taf_info *ti) {
-	long akt_clock = 0, stop_clock = 0;
-	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
-
-	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
-	int16 key = 0;
-	int16 surimy_ani = SURIMY_START;
-	int16 mund_ani = MUND_START;
-	int16 mund_delay = 3;
-	int16 mund_count = mund_delay;
-	int16 tdisp_ani = TDISP_START;
-	int16 tdisp_delay = 3;
-	int16 tdisp_count = tdisp_delay;
-	FrameSpeed = 0;
-	int16 delay_count = _G(spieler).DelaySpeed;
-	warning("stop_clock = (clock() / CLK_TCK) + 1;");
-	while (key != ESC) {
-		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-		++FrameSpeed;
-		warning("akt_clock = clock() / CLK_TCK;");
-		if (akt_clock >= stop_clock) {
-			//TmpFrame = FrameSpeed;
-			_G(spieler).DelaySpeed = (FrameSpeed >> 1) / _G(spieler).FramesPerSecond;
-
-			FrameSpeed = 0;
-			warning("stop_clock = (clock() / CLK_TCK) + 1;");
-		}
-
-		out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
-		                8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
-		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
-		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
-		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
-
-		if (_G(spieler).SoundSwitch) {
-			out->sprite_set(ti->image[mund_ani],
-				            18 + ti->korrektur[mund_ani << 1],
-				            8 + ti->korrektur[(mund_ani << 1) + 1], 0);
-			out->sprite_set(ti->image[SCHNULL_OFF],
-				            18 + ti->korrektur[SCHNULL_OFF << 1],
-				            8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
-		} else {
-			out->sprite_set(ti->image[SCHNULLER],
-				            18 + ti->korrektur[SCHNULLER << 1],
-				            8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
-			out->sprite_set(ti->image[SCHNULL_BAND],
-				            18 + ti->korrektur[SCHNULL_BAND << 1],
-				            8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
-		}
-		out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
-		out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
-		out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
-
-		out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
-		out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
-		out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
-		if (_G(spieler).MusicSwitch) {
-			out->sprite_set(ti->image[MUSIC_ON1],
-				            18 + ti->korrektur[MUSIC_ON1 << 1],
-				            8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
-			out->sprite_set(ti->image[MUSIC_ON2],
-				            18 + ti->korrektur[MUSIC_ON2 << 1],
-				            8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
-		} else
-			out->sprite_set(ti->image[MUSIC_OFF],
-				            18 + ti->korrektur[MUSIC_OFF << 1],
-				            8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
-
-		if (_G(spieler).DisplayText) {
-			out->sprite_set(ti->image[tdisp_ani],
-				            18 + ti->korrektur[tdisp_ani << 1],
-				            8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
-			out->sprite_set(ti->image[TDISP_EIN],
-				            18 + ti->korrektur[TDISP_EIN << 1],
-				            8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
-		} else
-			out->sprite_set(ti->image[TDISP_AUS],
-				            18 + ti->korrektur[TDISP_AUS << 1],
-				            8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
-
-		out->sprite_set(ti->image[EXIT],
-		                18 + ti->korrektur[EXIT << 1],
-		                8 + ti->korrektur[(EXIT << 1) + 1], 0);
-
-		key = in->get_switch_code();
-		if ((minfo.button == 1) || (key == ENTER)) {
-			WAIT_TASTE_LOS
-			int16 rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
-			switch (rect) {
-			case 0:
-				if (_G(spieler).FramesPerSecond > 6)
-					--_G(spieler).FramesPerSecond;
-				break;
-			case 1:
-				if (_G(spieler).FramesPerSecond < 10)
-					++_G(spieler).FramesPerSecond;
-				break;
-			case 2:
-				if (_G(spieler).SoundSwitch) {
-					_G(spieler).SoundSwitch = false;
-					det->disable_room_sound();
-				} else {
-					_G(spieler).SoundSwitch = true;
-					det->enable_room_sound();
-				}
-				break;
-			case 3:
-			case 4:
-				if (_G(spieler).DisplayText) {
-					_G(spieler).DisplayText = false;
-					atds->setHasSpeech(true);
-					_G(spieler).SpeechSwitch = true;
-				} else {
-					_G(spieler).DisplayText = true;
-					atds->setHasSpeech(false);
-					_G(spieler).SpeechSwitch = false;
-				}
-				break;
-			case 5:
-				if (_G(spieler).MusicSwitch) {
-					_G(spieler).MusicSwitch = false;
-					ailsnd->stopMod();
-				} else {
-					_G(spieler).MusicSwitch = true;
-					CurrentSong = -1;
-					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
-				}
-				break;
-			case 6:
-				key = ESC;
-				break;
-			case 7:
-				_G(spieler).SoundVol = (136 - minfo.y) << 1;
-				ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
-				break;
-			case 8:
-				_G(spieler).MusicVol = (136 - minfo.y) << 1;
-				ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
-				break;
-			}
-			minfo.button = 0;
-		}
-		switch (key) {
-
-		case CURSOR_UP:
-			cur->move(minfo.x, --minfo.y);
-			break;
-
-		case CURSOR_DOWN:
-			cur->move(minfo.x, ++minfo.y);
-			break;
-
-		case CURSOR_LEFT:
-			cur->move(--minfo.x, minfo.y);
-			break;
-
-		case CURSOR_RIGHT:
-			cur->move(++minfo.x, minfo.y);
-			break;
-		}
-
-		cur->plot_cur();
-		out->back2screen(workpage);
-		EVENTS_UPDATE;
-		SHOULD_QUIT_RETURN;
-
-		if (!delay_count) {
-			if (surimy_ani < SURIMY_END)
-				++surimy_ani;
-			else
-				surimy_ani = SURIMY_START;
-			if (mund_count > 0)
-				--mund_count;
-			else {
-				if (mund_ani < MUND_END)
-					++mund_ani;
-				else
-					mund_ani = MUND_START;
-				mund_count = mund_delay;
-			}
-			if (tdisp_count > 0)
-				--tdisp_count;
-			else {
-				if (tdisp_ani < TDISP_END)
-					++tdisp_ani;
-				else
-					tdisp_ani = TDISP_START;
-				tdisp_count = tdisp_delay;
-			}
-			delay_count = _G(spieler).DelaySpeed;
-		} else
-			--delay_count;
-	}
-
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
-	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index d86e4adb821..24d358d0ebb 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -373,10 +373,8 @@ void init_atds();
 void init_room();
 
 int16 call_fileio(int16 palette, int16 mode);
-int16 file_menue();
-void option_menue(taf_info *ti);
 
-void look_debug_action(int16 key_nr);
+//void look_debug_action(int16 key_nr);
 
 void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 42648eaea9d..5f0057a2f6b 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -26,6 +26,7 @@
 #include "chewy/menus.h"
 #include "chewy/ngshext.h"
 #include "chewy/main_menu.h"
+#include "chewy/dialogs/files.h"
 
 namespace Chewy {
 
@@ -388,7 +389,7 @@ int16 main_loop(int16 mode) {
 			out->set_fontadr(font6x8);
 			out->set_vorschub(fvorx6x8, fvory6x8);
 			cursor_wahl(CUR_SAVE);
-			if (file_menue() == 1) {
+			if (Dialogs::Files::execute() == 1) {
 				ende = 1;
 				fx_blend = BLEND4;
 			}
@@ -456,7 +457,7 @@ int16 main_loop(int16 mode) {
 
 				out->setze_zeiger(screen0);
 				cursor_wahl(CUR_SAVE);
-				ret = file_menue();
+				ret = Dialogs::Files::execute();
 				if (ret == IOG_END) {
 					ende = 1;
 					fx_blend = BLEND4;
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 03040000b7d..66e2c9c0059 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -27,6 +27,7 @@
 #include "chewy/ngshext.h"
 #include "chewy/dialogs/cinema.h"
 #include "chewy/dialogs/credits.h"
+#include "chewy/dialogs/files.h"
 
 namespace Chewy {
 
@@ -236,7 +237,7 @@ bool MainMenu::loadGame() {
 	minfo.x = 152;
 	minfo.y = 92;
 	savegameFlag = true;
-	int result = file_menue();
+	int result = Dialogs::Files::execute();
 
 	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
 		menu_item == CUR_USE) ? 8 : 0);
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 5ff740b3bd8..303a5be51c9 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -42,6 +42,8 @@ MODULE_OBJS = \
 	types.o \
 	dialogs/cinema.o \
 	dialogs/credits.o \
+	dialogs/files.o \
+	dialogs/options.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \
 	rooms/room1.o \


Commit: ac48be729e32fe4ea483b824712b1959875bc55a
    https://github.com/scummvm/scummvm/commit/ac48be729e32fe4ea483b824712b1959875bc55a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Move inventory methods to it's own class

Changed paths:
  A engines/chewy/dialogs/inventory.cpp
  A engines/chewy/dialogs/inventory.h
    engines/chewy/global.h
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/menus.h
    engines/chewy/module.mk
    engines/chewy/rooms/room8.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
new file mode 100644
index 00000000000..a84544ab9d5
--- /dev/null
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -0,0 +1,636 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/dialogs/inventory.h"
+#include "chewy/events.h"
+#include "chewy/file.h"
+#include "chewy/global.h"
+#include "chewy/menus.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
+	{ WIN_INF_X + 6, WIN_INF_Y + 10, WIN_INF_X + 6 + 30, WIN_INF_Y + 10 + 14 },
+	{ WIN_INF_X + 6 + 32, WIN_INF_Y + 10, WIN_INF_X + 6 + 62, WIN_INF_Y + 10 + 14 },
+	{ -1, -1, -1, -1 },
+	{ WIN_INF_X + 198, WIN_INF_Y + 10, WIN_INF_X + 198 + 30, WIN_INF_Y + 10 + 14 },
+	{ WIN_INF_X + 198 + 40, WIN_INF_Y + 10, WIN_INF_X + 198 + 70, WIN_INF_Y + 10 + 14 },
+	{ WIN_INF_X + 6, WIN_INF_Y + 4 + 26, WIN_INF_X + 268, WIN_INF_Y + 4 + 26 + 90 },
+	{ WIN_INF_X + 242, WIN_INF_Y + 136, WIN_INF_X + 292, WIN_INF_Y + 136 + 14 },
+	{ WIN_INF_X + 242, WIN_INF_Y + 156, WIN_INF_X + 292, WIN_INF_Y + 156 + 14 }
+};
+
+int16 Inventory::inv_rand_x;
+int16 Inventory::inv_rand_y;
+int Inventory::keyVal;
+
+
+void Inventory::plot_menu() {
+	int16 i, j, k;
+	int16 *xy;
+	int16 x, y;
+	int16 x1, y1;
+	out->setze_zeiger(workptr);
+	build_menu(WIN_INVENTAR);
+
+	for (j = 0; j < 3; j++) {
+		for (i = 0; i < 5; i++)
+			out->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
+				WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
+	}
+
+	k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+	if (k != -1) {
+		if (k < 5)
+			out->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
+				INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
+		else {
+			x = (minfo.x - (WIN_INF_X)) / 54;
+			y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
+			k = x + (y * 5);
+			k += _G(spieler).InventY * 5;
+			if (k < (_G(spieler).InventY + 3) * 5)
+				out->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
+					WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
+		}
+	}
+
+	if (inv_rand_x != -1) {
+		out->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
+			WIN_INF_X + 14 + inv_rand_x * 54 + 40, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24, 41);
+		out->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
+			WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
+	}
+
+	for (i = 0; i < 2; i++) {
+		_G(ani_invent_delay)[i][0] -= 1;
+		if (_G(ani_invent_delay)[i][0] <= 0) {
+			_G(ani_invent_delay)[i][0] = _G(ani_invent_delay)[i][1];
+			++_G(ani_count)[i];
+			if (_G(ani_count)[i] > ANI_INVENT_END[i]) {
+				_G(ani_count)[i] = _G(ani_invent_anf)[i];
+				_G(ani_invent_delay)[i][0] = 30000;
+			}
+		}
+		if (i == 2)
+			y = 3;
+		else
+			y = 0;
+		out->sprite_set(curtaf->image[_G(ani_count)[i]],
+			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
+	}
+
+	for (i = 0; i < 2; i++) {
+		out->sprite_set(menutaf->image[PFEIL_UP + i],
+			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, scr_width);
+	}
+
+	y = WIN_INF_Y + 6 + 30;
+	for (j = 0; j < 3; j++) {
+		for (i = 0; i < 5; i++) {
+			if (_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i] != -1) {
+				xy = (int16 *)inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
+				x1 = 40 - xy[0];
+				x1 /= 2;
+				y1 = 24 - xy[1];
+				y1 /= 2;
+				out->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
+					x1 + WIN_INF_X + 14 + i * 54,
+					y1 + y + 32 * j, scr_width);
+			}
+		}
+	}
+}
+
+void Inventory::menu() {
+	int16 menu_flag1;
+	int16 maus_flag;
+	int16 taste_flag;
+	int16 i, k;
+	int16 abfrage;
+	int16 tmp, tmp1;
+	int16 disp_tmp;
+	int16 ret_look;
+	int16 ani_tmp;
+	int16 menu_first;
+
+	keyVal = 0;
+	flags.InventMenu = true;
+	disp_tmp = _G(spieler).DispFlag;
+	_G(spieler).DispFlag = false;
+	ani_tmp = flags.AutoAniPlay;
+	flags.AutoAniPlay = true;
+	flags.StopAutoObj = true;
+	menu_display = 0;
+	tmp = _G(spieler).MausSpeed;
+	if (tmp > 3) {
+		tmp1 = tmp - 2;
+	} else
+		tmp1 = tmp;
+	in->speed(tmp1, tmp1 * 2);
+	cur->move(152, 92);
+	minfo.x = 152;
+	minfo.y = 92;
+
+	invent_cur_mode = CUR_USE;
+	if (_G(spieler).AkInvent != -1) {
+		cursor_wahl(CUR_AK_INVENT);
+
+	} else {
+		invent_cur_mode = CUR_USE;
+		cursor_wahl(CUR_USE);
+	}
+
+	menu_flag1 = MENU_EINBLENDEN;
+	taste_flag = 28;
+	kbinfo.key_code = '\0';
+	maus_flag = 1;
+
+	for (i = 0; i < 3; i++) {
+		_G(ani_invent_delay)[i][0] = 30000;
+		_G(ani_count)[i] = _G(ani_invent_anf)[i];
+	}
+
+	ret_look = -1;
+	menu_first = false;
+	show_invent_menu = 1;
+
+	while (show_invent_menu == 1 && !SHOULD_QUIT) {
+		if (!minfo.button)
+			maus_flag = 0;
+		if (minfo.button == 1 || kbinfo.key_code == ENTER || keyVal) {
+			if (!maus_flag) {
+				maus_flag = 1;
+				kbinfo.key_code = '\0';
+
+				k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+				if (keyVal == F1_KEY)
+					k = 0;
+				else if (keyVal == F2_KEY)
+					k = 1;
+				else if (keyVal == ENTER)
+					k = 5;
+
+				keyVal = 0;
+
+				switch (k) {
+				case 0:
+					invent_cur_mode = CUR_USE;
+					menu_item = CUR_USE;
+					if (_G(spieler).AkInvent == -1) {
+						cursor_wahl(CUR_USE);
+					} else {
+						cursor_wahl(CUR_AK_INVENT);
+					}
+					break;
+
+				case 1:
+					if (_G(spieler).AkInvent != -1) {
+						inv_rand_x = -1;
+						inv_rand_y = -1;
+						ret_look = look(_G(spieler).AkInvent, INV_ATS_MODE, -1);
+
+						taste_flag = ESC;
+					} else {
+						invent_cur_mode = CUR_LOOK;
+						menu_item = CUR_LOOK;
+						cursor_wahl(CUR_LOOK);
+					}
+					break;
+
+				case 3:
+					in->hot_key = PAGE_UP;
+					break;
+
+				case 4:
+					in->hot_key = PAGE_DOWN;
+					break;
+
+				case 5:
+					inv_rand_x = (minfo.x - (WIN_INF_X)) / 54;
+					inv_rand_y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
+					k = inv_rand_x + (inv_rand_y * 5);
+					k += _G(spieler).InventY * 5;
+					if (invent_cur_mode == CUR_USE) {
+						if (_G(spieler).AkInvent == -1) {
+							if (_G(spieler).InventSlot[k] != -1) {
+								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
+									menu_item = CUR_USE;
+									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
+									cursor_wahl(CUR_AK_INVENT);
+									del_invent_slot(_G(spieler).InventSlot[k]);
+								}
+							}
+						} else {
+							if (_G(spieler).InventSlot[k] != -1)
+								obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
+							else {
+								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
+								obj->sort();
+								_G(spieler).AkInvent = -1;
+								menu_item = invent_cur_mode;
+								cursor_wahl(invent_cur_mode);
+							}
+						}
+					} else if (invent_cur_mode == CUR_LOOK) {
+						if (_G(spieler).InventSlot[k] != -1) {
+							if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
+								_G(spieler).AkInvent = _G(spieler).InventSlot[k];
+								ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
+								_G(spieler).AkInvent = -1;
+								cursor_wahl(invent_cur_mode);
+								taste_flag = ESC;
+							}
+						}
+					}
+					break;
+
+				default:
+					break;
+				}
+			}
+		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
+			if (!maus_flag) {
+				in->hot_key = ESC;
+				maus_flag = 1;
+			}
+		}
+
+		if (ret_look == 0) {
+			invent_cur_mode = CUR_USE;
+			menu_item = CUR_USE;
+			if (_G(spieler).AkInvent == -1)
+				cursor_wahl(CUR_USE);
+			else
+				cursor_wahl(CUR_AK_INVENT);
+		} else if (ret_look == 5) {
+			taste_flag = false;
+			maus_flag = 0;
+			minfo.button = 1;
+			keyVal = ENTER;
+		}
+
+		ret_look = -1;
+		abfrage = in->get_switch_code();
+		cur->hide_cur();
+
+		if (taste_flag) {
+			if (abfrage != taste_flag)
+				taste_flag = 0;
+		} else {
+			switch (abfrage) {
+			case F1_KEY:
+				keyVal = F1_KEY;
+				break;
+
+			case F2_KEY:
+				keyVal = F2_KEY;
+				break;
+
+			case ESC:
+				if (!menu_first) {
+					menu_first = true;
+					cur->show_cur();
+					while (in->get_switch_code() == ESC) {
+						set_up_screen(NO_SETUP);
+						inv_rand_x = -1;
+						inv_rand_y = -1;
+						Dialogs::Inventory::plot_menu();
+						cur->plot_cur();
+						out->back2screen(workpage);
+					}
+				} else {
+					if (menu_flag1 != MENU_EINBLENDEN) {
+						menu_flag1 = MENU_AUSBLENDEN;
+						show_invent_menu = false;
+					}
+				}
+				break;
+
+			case CURSOR_RIGHT:
+				if (minfo.x < 320 - _G(spieler).CurBreite)
+					minfo.x += 3;
+				break;
+
+			case CURSOR_LEFT:
+				if (minfo.x > 2)
+					minfo.x -= 3;
+				break;
+
+			case CURSOR_UP:
+				if (minfo.y > 2)
+					minfo.y -= 3;
+				break;
+
+			case CURSOR_DOWN:
+				if (minfo.y < 197 - _G(spieler).CurHoehe)
+					minfo.y += 3;
+				break;
+
+			case PAGE_UP:
+				if (_G(spieler).InventY > 0)
+					--_G(spieler).InventY;
+				kbinfo.key_code = '\0';
+				break;
+
+			case PAGE_DOWN:
+				if (_G(spieler).InventY < (MAX_MOV_OBJ / 5) - 3)
+					++_G(spieler).InventY;
+				kbinfo.key_code = '\0';
+				break;
+
+			default:
+				break;
+			}
+			menu_first = true;
+		}
+
+		if (show_invent_menu != 2) {
+			set_up_screen(NO_SETUP);
+			cur->move(minfo.x, minfo.y);
+			cur->show_cur();
+			if (menu_flag1 != MENU_AUSBLENDEN) {
+				inv_rand_x = -1;
+				inv_rand_y = -1;
+				Dialogs::Inventory::plot_menu();
+			}
+			if (menu_flag1 == false)
+				cur->plot_cur();
+			out->setze_zeiger(nullptr);
+			if (menu_flag1 == MENU_EINBLENDEN) {
+				fx->blende1(workptr, screen0, 0, 200, 0, 300);
+			} else if (menu_flag1 == MENU_AUSBLENDEN)
+				fx->blende1(workptr, screen0, 0, 200, 1, 300);
+			menu_flag1 = false;
+			out->set_clip(0, 0, 320, 200);
+			out->back2screen(workpage);
+		} else {
+			show_cur();
+		}
+	}
+
+	cur->move(maus_old_x, maus_old_y);
+	minfo.x = maus_old_x;
+	minfo.y = maus_old_y;
+	while (in->get_switch_code() == ESC && !SHOULD_QUIT) {
+		set_up_screen(NO_SETUP);
+		cur->plot_cur();
+		out->back2screen(workpage);
+	}
+
+	in->speed(tmp, tmp * 2);
+	flags.InventMenu = false;
+	flags.AutoAniPlay = ani_tmp;
+	_G(spieler).DispFlag = disp_tmp;
+	menu_display = tmp_menu;
+	flags.StopAutoObj = false;
+}
+
+int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
+	int16 ende;
+	int16 txt_start;
+	int16 txt_anz = 0;
+	int16 maus_flag;
+	int16 i, k;
+	int16 ret;
+	int16 xoff = 0;
+	int16 yoff = 0;
+	int16 txt_zeilen = 0;
+	int16 rect;
+	char *txt_adr = nullptr;
+	char *txt_name_adr = nullptr;
+	char c[2] = { 0 };
+	ret = -1;
+	ende = 0;
+	txt_start = 0;
+	maus_flag = 1;
+
+	if (mode == INV_ATS_MODE) {
+		atds->load_atds(invent_nr, INV_ATS_DATEI);
+		txt_name_adr = atds->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
+		txt_adr = atds->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
+		xoff = strlen(txt_name_adr);
+		xoff *= fvorx8x8;
+		xoff = (254 - xoff) / 2;
+		txt_zeilen = 2;
+		yoff = 10;
+
+	} else if (mode == INV_USE_ATS_MODE) {
+		txt_zeilen = 3;
+		yoff = 0;
+
+		if (ats_nr >= 15000) {
+			txt_adr = atds->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
+		} else {
+			txt_adr = atds->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
+		}
+		if (!txt_adr) {
+			ende = 1;
+		}
+	} else {
+		ende = 1;
+	}
+
+	while (!ende) {
+		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+
+		if (minfo.button) {
+			if (minfo.button == 2) {
+				if (!maus_flag)
+					kbinfo.scan_code = ESC;
+			} else if (minfo.button == 1) {
+				if (!maus_flag) {
+					switch (rect) {
+					case 0:
+						ende = 1;
+						ret = 0;
+						break;
+
+					case 1:
+						ende = 1;
+						ret = 1;
+						break;
+
+					case 3:
+					case 6:
+						kbinfo.scan_code = CURSOR_UP;
+						break;
+
+					case 4:
+					case 7:
+						kbinfo.scan_code = CURSOR_DOWN;
+						break;
+
+					case 5:
+						ret = 5;
+						ende = 1;
+						break;
+
+					default:
+						break;
+					}
+				}
+			}
+
+			maus_flag = 1;
+		} else {
+			maus_flag = 0;
+		}
+
+		switch (kbinfo.scan_code) {
+		case F1_KEY:
+			in->hot_key = F1_KEY;
+			break;
+
+		case F2_KEY:
+			in->hot_key = F2_KEY;
+			break;
+
+		case ESC:
+			ende = 1;
+			break;
+
+		case CURSOR_UP:
+			if (txt_start > 0)
+				--txt_start;
+			break;
+
+		case CURSOR_DOWN:
+			if (txt_start < txt_anz - txt_zeilen)
+				++txt_start;
+			break;
+
+		default:
+			break;
+		}
+
+		kbinfo.scan_code = Common::KEYCODE_INVALID;
+		set_up_screen(NO_SETUP);
+		Dialogs::Inventory::plot_menu();
+		out->set_fontadr(font8x8);
+		out->set_vorschub(fvorx8x8, fvory8x8);
+
+		if (mode == INV_ATS_MODE)
+			out->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
+				scr_width, txt_name_adr);
+
+		out->set_fontadr(font6x8);
+		out->set_vorschub(fvorx6x8, fvory6x8);
+
+		if (txt_anz > txt_zeilen) {
+			if (txt_start > 0) {
+				if (rect == 6)
+					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
+						WIN_INF_Y + 136 + 14, 41);
+				c[0] = 24;
+				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
+					scr_width, c);
+			}
+
+			if (txt_start < txt_anz - txt_zeilen) {
+				if (rect == 7)
+					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
+						WIN_INF_Y + 156 + 14, 41);
+				c[0] = 25;
+				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
+			}
+		}
+
+		k = 0;
+		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
+			out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
+				scr_width, "%s", txt->str_pos(txt_adr, i));
+			++k;
+		}
+
+		cur->plot_cur();
+		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN0;
+	}
+
+	while (in->get_switch_code() == ESC) {
+		set_up_screen(NO_SETUP);
+		Dialogs::Inventory::plot_menu();
+		cur->plot_cur();
+		out->back2screen(workpage);
+		SHOULD_QUIT_RETURN0;
+	}
+
+	return ret;
+}
+
+void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
+	int16 ok;
+	int16 m_mode = 0;
+
+	if (!flags.AtsAction) {
+		if (txt_nr != -1) {
+			switch (txt_mode) {
+			case INVENTAR_NORMAL:
+			case INVENTAR_STATIC:
+				ok = true;
+				switch (menu_item) {
+				case CUR_LOOK:
+					m_mode = TXT_MARK_LOOK;
+					break;
+
+				case CUR_USE:
+				case CUR_USER:
+				case CUR_HOWARD:
+				case CUR_NICHELLE:
+					m_mode = TXT_MARK_USE;
+					if (_G(spieler).inv_cur)
+						ok = false;
+					break;
+
+				case CUR_WALK:
+					m_mode = TXT_MARK_WALK;
+					break;
+
+				case CUR_TALK:
+					m_mode = TXT_MARK_TALK;
+					break;
+
+				}
+
+				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
+					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
+				}
+				if (ok) {
+					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);
+				}
+
+				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
+					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
+				if (menu_item == CUR_USE)
+					flags.StaticUseTxt = true;
+				break;
+
+			default:
+				break;
+			}
+		}
+	}
+}
+
+} // namespace Dialogs
+} // namespace Chewy
diff --git a/engines/chewy/dialogs/inventory.h b/engines/chewy/dialogs/inventory.h
new file mode 100644
index 00000000000..ef85e5cec17
--- /dev/null
+++ b/engines/chewy/dialogs/inventory.h
@@ -0,0 +1,46 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_DIALOGS_INVENTORY_H
+#define CHEWY_DIALOGS_INVENTORY_H
+
+#include "chewy/ngstypes.h"
+
+namespace Chewy {
+namespace Dialogs {
+
+class Inventory {
+private:
+	static int16 inv_rand_x;
+	static int16 inv_rand_y;
+	static int keyVal;
+
+public:
+	static void plot_menu();
+	static void menu();
+	static int16 look(int16 invent_nr, int16 mode, int16 ats_nr);
+	static void look_screen(int16 txt_mode, int16 txt_nr);
+};
+
+} // namespace Dialogs
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 24d358d0ebb..992cfbbbce2 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -383,14 +383,6 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 zeilen_hoehe,
 
 void maus_mov_menu();
 
-void plot_inventar_menu();
-
-void invent_menu();
-
-int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr);
-
-void look_invent_screen(int16 txt_mode, int16 nr);
-
 int16 calc_use_invent(int16 inv_nr);
 
 void cur_2_inventory();
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 5f0057a2f6b..8c1588ec3b2 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -27,6 +27,7 @@
 #include "chewy/ngshext.h"
 #include "chewy/main_menu.h"
 #include "chewy/dialogs/files.h"
+#include "chewy/dialogs/inventory.h"
 
 namespace Chewy {
 
@@ -363,7 +364,7 @@ int16 main_loop(int16 mode) {
 			maus_old_y = minfo.y;
 			menu_item = CUR_USE;
 			menu_entry();
-			invent_menu();
+			Dialogs::Inventory::menu();
 			menu_exit();
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
@@ -430,7 +431,7 @@ int16 main_loop(int16 mode) {
 
 				menu_item = CUR_USE;
 				menu_entry();
-				invent_menu();
+				Dialogs::Inventory::menu();
 				menu_exit();
 				menu_flag = MENU_AUSBLENDEN;
 				menu_display = 0;
@@ -787,7 +788,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 	if (_G(maus_links_click)) {
 		if (menu_item != CUR_USE)
-			look_invent_screen(txt_mode, txt_nr);
+			Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 		else {
 			if (_G(spieler).inv_cur) {
 				obj_auswerten(nr, txt_mode);
@@ -796,7 +797,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 					if (!flags.ChAutoMov) {
 						_G(maus_links_click) = false;
 						auto_move(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
-						look_invent_screen(txt_mode, txt_nr);
+						Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 
 						if (_G(spieler).AkInvent != -1)
 							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
@@ -982,7 +983,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
 				txt_nr = obj->iib_txt_nr(test_nr);
-				look_invent_screen(INVENTAR_NORMAL, txt_nr);
+				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
 				if (_G(spieler).room_m_obj[test_nr].AniFlag != 255) {
 					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[test_nr].HeldHide;
 					play_scene_ani(_G(spieler).room_m_obj[test_nr].AniFlag, ANI_VOR);
@@ -1002,7 +1003,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
-			look_invent_screen(INVENTAR_STATIC, txt_nr);
+			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
 				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
@@ -1041,7 +1042,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
-			look_invent_screen(INVENTAR_STATIC, txt_nr);
+			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
 				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
@@ -1084,7 +1085,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = obj->sib_txt_nr(test_nr);
-			look_invent_screen(INVENTAR_STATIC, txt_nr);
+			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
 				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
@@ -1117,7 +1118,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			}
 		} else if (ret == NO_ACTION) {
 			txt_nr = obj->sib_txt_nr(test_nr);
-			look_invent_screen(INVENTAR_STATIC, txt_nr);
+			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 		}
 	}
 
@@ -1719,7 +1720,7 @@ void get_user_key(int16 mode) {
 
 			tmp_menu_item = menu_item;
 			menu_item = CUR_USE;
-			invent_menu();
+			Dialogs::Inventory::menu();
 			menu_flag = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index ffe7e87dd78..0bd7e35f3d7 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -23,28 +23,15 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/menus.h"
+#include "chewy/dialogs/inventory.h"
 #include "chewy/rooms/room44.h"
 #include "chewy/rooms/room58.h"
 
 namespace Chewy {
 
-static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
-	{WIN_INF_X + 6, WIN_INF_Y + 10, WIN_INF_X + 6 + 30, WIN_INF_Y + 10 + 14},
-	{WIN_INF_X + 6 + 32, WIN_INF_Y + 10, WIN_INF_X + 6 + 62, WIN_INF_Y + 10 + 14},
-	{ -1, -1, -1, -1},
-	{WIN_INF_X + 198, WIN_INF_Y + 10, WIN_INF_X + 198 + 30, WIN_INF_Y + 10 + 14},
-	{WIN_INF_X + 198 + 40, WIN_INF_Y + 10, WIN_INF_X + 198 + 70, WIN_INF_Y + 10 + 14},
-	{WIN_INF_X + 6, WIN_INF_Y + 4 + 26, WIN_INF_X + 268, WIN_INF_Y + 4 + 26 + 90},
-	{WIN_INF_X + 242, WIN_INF_Y + 136, WIN_INF_X + 292, WIN_INF_Y + 136 + 14},
-	{WIN_INF_X + 242, WIN_INF_Y + 156, WIN_INF_X + 292, WIN_INF_Y + 156 + 14}
-};
-
 char m_flip = 0;
 int16 tmp_menu;
-int16 inv_rand_x;
-int16 inv_rand_y;
 int16 show_invent_menu;
-static int keyVal;
 
 void plot_main_menu() {
 	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
@@ -113,595 +100,6 @@ void maus_mov_menu() {
 	menu_item = (maus_menu_x / (MAUS_MENU_MAX_X / 5));
 }
 
-void plot_inventar_menu() {
-	int16 i, j, k;
-	int16 *xy;
-	int16 x, y;
-	int16 x1, y1;
-	out->setze_zeiger(workptr);
-	build_menu(WIN_INVENTAR);
-
-	for (j = 0; j < 3; j++) {
-		for (i = 0; i < 5; i++)
-			out->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
-			    WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
-	}
-
-	k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
-	if (k != -1) {
-		if (k < 5)
-			out->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
-			               INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
-		else {
-			x = (minfo.x - (WIN_INF_X)) / 54;
-			y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
-			k = x + (y * 5);
-			k += _G(spieler).InventY * 5;
-			if (k < (_G(spieler).InventY + 3) * 5)
-				out->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
-				               WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
-		}
-	}
-
-	if (inv_rand_x != -1) {
-		out->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
-		               WIN_INF_X + 14 + inv_rand_x * 54 + 40, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24, 41);
-		out->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
-		          WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
-	}
-
-	for (i = 0; i < 2; i++) {
-		_G(ani_invent_delay)[i][0] -= 1;
-		if (_G(ani_invent_delay)[i][0] <= 0) {
-			_G(ani_invent_delay)[i][0] = _G(ani_invent_delay)[i][1];
-			++_G(ani_count)[i];
-			if (_G(ani_count)[i] > ANI_INVENT_END[i]) {
-				_G(ani_count)[i] = _G(ani_invent_anf)[i];
-				_G(ani_invent_delay)[i][0] = 30000;
-			}
-		}
-		if (i == 2)
-			y = 3;
-		else
-			y = 0;
-		out->sprite_set(curtaf->image[_G(ani_count)[i]],
-		                 WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
-	}
-
-	for (i = 0; i < 2; i++) {
-		out->sprite_set(menutaf->image[PFEIL_UP + i],
-		                 WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, scr_width);
-	}
-
-	y = WIN_INF_Y + 6 + 30;
-	for (j = 0; j < 3; j++) {
-		for (i = 0; i < 5; i++) {
-			if (_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i] != -1) {
-				xy = (int16 *)inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
-				x1 = 40 - xy[0];
-				x1 /= 2;
-				y1 = 24 - xy[1];
-				y1 /= 2;
-				out->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
-				                 x1 + WIN_INF_X + 14 + i * 54,
-				                 y1 + y + 32 * j, scr_width);
-			}
-		}
-	}
-}
-
-void invent_menu() {
-	int16 menu_flag1;
-	int16 maus_flag;
-	int16 taste_flag;
-	int16 i, k;
-	int16 abfrage;
-	int16 tmp, tmp1;
-	int16 disp_tmp;
-	int16 ret_look;
-	int16 ani_tmp;
-	int16 menu_first;
-
-	keyVal = 0;
-	flags.InventMenu = true;
-	disp_tmp = _G(spieler).DispFlag;
-	_G(spieler).DispFlag = false;
-	ani_tmp = flags.AutoAniPlay;
-	flags.AutoAniPlay = true;
-	flags.StopAutoObj = true;
-	menu_display = 0;
-	tmp = _G(spieler).MausSpeed;
-	if (tmp > 3) {
-		tmp1 = tmp - 2;
-	} else
-		tmp1 = tmp;
-	in->speed(tmp1, tmp1 * 2);
-	cur->move(152, 92);
-	minfo.x = 152;
-	minfo.y = 92;
-
-	invent_cur_mode = CUR_USE;
-	if (_G(spieler).AkInvent != -1) {
-		cursor_wahl(CUR_AK_INVENT);
-
-	} else {
-		invent_cur_mode = CUR_USE;
-		cursor_wahl(CUR_USE);
-	}
-
-	menu_flag1 = MENU_EINBLENDEN;
-	taste_flag = 28;
-	kbinfo.key_code = '\0';
-	maus_flag = 1;
-
-	for (i = 0; i < 3; i++) {
-		_G(ani_invent_delay)[i][0] = 30000;
-		_G(ani_count)[i] = _G(ani_invent_anf)[i];
-	}
-
-	ret_look = -1;
-	menu_first = false;
-	show_invent_menu = 1;
-
-	while (show_invent_menu == 1 && !SHOULD_QUIT) {
-		if (!minfo.button)
-			maus_flag = 0;
-		if (minfo.button == 1 || kbinfo.key_code == ENTER || keyVal) {
-			if (!maus_flag) {
-				maus_flag = 1;
-				kbinfo.key_code = '\0';
-
-				k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
-				if (keyVal == F1_KEY)
-					k = 0;
-				else if (keyVal == F2_KEY)
-					k = 1;
-				else if (keyVal == ENTER)
-					k = 5;
-
-				keyVal = 0;
-
-				switch (k) {
-				case 0:
-					invent_cur_mode = CUR_USE;
-					menu_item = CUR_USE;
-					if (_G(spieler).AkInvent == -1) {
-						cursor_wahl(CUR_USE);
-					} else {
-						cursor_wahl(CUR_AK_INVENT);
-					}
-					break;
-
-				case 1:
-					if (_G(spieler).AkInvent != -1) {
-						inv_rand_x = -1;
-						inv_rand_y = -1;
-						ret_look = look_invent(_G(spieler).AkInvent, INV_ATS_MODE, -1);
-
-						taste_flag = ESC;
-					} else {
-						invent_cur_mode = CUR_LOOK;
-						menu_item = CUR_LOOK;
-						cursor_wahl(CUR_LOOK);
-					}
-					break;
-
-				case 3:
-					in->hot_key = PAGE_UP;
-					break;
-
-				case 4:
-					in->hot_key = PAGE_DOWN;
-					break;
-
-				case 5:
-					inv_rand_x = (minfo.x - (WIN_INF_X)) / 54;
-					inv_rand_y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
-					k = inv_rand_x + (inv_rand_y * 5);
-					k += _G(spieler).InventY * 5;
-					if (invent_cur_mode == CUR_USE) {
-						if (_G(spieler).AkInvent == -1) {
-							if (_G(spieler).InventSlot[k] != -1) {
-								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
-									menu_item = CUR_USE;
-									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
-									cursor_wahl(CUR_AK_INVENT);
-									del_invent_slot(_G(spieler).InventSlot[k]);
-								}
-							}
-						} else {
-							if (_G(spieler).InventSlot[k] != -1)
-								obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
-							else {
-								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
-								obj->sort();
-								_G(spieler).AkInvent = -1;
-								menu_item = invent_cur_mode;
-								cursor_wahl(invent_cur_mode);
-							}
-						}
-					} else if (invent_cur_mode == CUR_LOOK) {
-						if (_G(spieler).InventSlot[k] != -1) {
-							if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
-								_G(spieler).AkInvent = _G(spieler).InventSlot[k];
-								ret_look = look_invent(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
-								_G(spieler).AkInvent = -1;
-								cursor_wahl(invent_cur_mode);
-								taste_flag = ESC;
-							}
-						}
-					}
-					break;
-
-				default:
-					break;
-				}
-			}
-		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
-			if (!maus_flag) {
-				in->hot_key = ESC;
-				maus_flag = 1;
-			}
-		}
-
-		if (ret_look == 0) {
-			invent_cur_mode = CUR_USE;
-			menu_item = CUR_USE;
-			if (_G(spieler).AkInvent == -1)
-				cursor_wahl(CUR_USE);
-			else
-				cursor_wahl(CUR_AK_INVENT);
-		} else if (ret_look == 5) {
-			taste_flag = false;
-			maus_flag = 0;
-			minfo.button = 1;
-			keyVal = ENTER;
-		}
-
-		ret_look = -1;
-		abfrage = in->get_switch_code();
-		cur->hide_cur();
-
-		if (taste_flag) {
-			if (abfrage != taste_flag)
-				taste_flag = 0;
-		} else {
-			switch (abfrage) {
-			case F1_KEY:
-				keyVal = F1_KEY;
-				break;
-
-			case F2_KEY:
-				keyVal = F2_KEY;
-				break;
-
-			case ESC:
-				if (!menu_first) {
-					menu_first = true;
-					cur->show_cur();
-					while (in->get_switch_code() == ESC) {
-						set_up_screen(NO_SETUP);
-						inv_rand_x = -1;
-						inv_rand_y = -1;
-						plot_inventar_menu();
-						cur->plot_cur();
-						out->back2screen(workpage);
-					}
-				} else {
-					if (menu_flag1 != MENU_EINBLENDEN) {
-						menu_flag1 = MENU_AUSBLENDEN;
-						show_invent_menu = false;
-
-					}
-				}
-				break;
-
-			case CURSOR_RIGHT:
-				if (minfo.x < 320 - _G(spieler).CurBreite)
-					minfo.x += 3;
-				break;
-
-			case CURSOR_LEFT:
-				if (minfo.x > 2)
-					minfo.x -= 3;
-				break;
-
-			case CURSOR_UP:
-				if (minfo.y > 2)
-					minfo.y -= 3;
-				break;
-
-			case CURSOR_DOWN:
-				if (minfo.y < 197 - _G(spieler).CurHoehe)
-					minfo.y += 3;
-				break;
-
-			case PAGE_UP:
-				if (_G(spieler).InventY > 0)
-					--_G(spieler).InventY;
-				kbinfo.key_code = '\0';
-				break;
-
-			case PAGE_DOWN:
-				if (_G(spieler).InventY < (MAX_MOV_OBJ / 5) - 3)
-					++_G(spieler).InventY;
-				kbinfo.key_code = '\0';
-				break;
-
-			default:
-				break;
-			}
-			menu_first = true;
-		}
-
-		if (show_invent_menu != 2) {
-			set_up_screen(NO_SETUP);
-			cur->move(minfo.x, minfo.y);
-			cur->show_cur();
-			if (menu_flag1 != MENU_AUSBLENDEN) {
-				inv_rand_x = -1;
-				inv_rand_y = -1;
-				plot_inventar_menu();
-			}
-			if (menu_flag1 == false)
-				cur->plot_cur();
-			out->setze_zeiger(nullptr);
-			if (menu_flag1 == MENU_EINBLENDEN) {
-				fx->blende1(workptr, screen0, 0, 200, 0, 300);
-			} else if (menu_flag1 == MENU_AUSBLENDEN)
-				fx->blende1(workptr, screen0, 0, 200, 1, 300);
-			menu_flag1 = false;
-			out->set_clip(0, 0, 320, 200);
-			out->back2screen(workpage);
-		} else {
-			show_cur();
-		}
-	}
-
-	cur->move(maus_old_x, maus_old_y);
-	minfo.x = maus_old_x;
-	minfo.y = maus_old_y;
-	while (in->get_switch_code() == ESC && !SHOULD_QUIT) {
-		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		out->back2screen(workpage);
-	}
-
-	in->speed(tmp, tmp * 2);
-	flags.InventMenu = false;
-	flags.AutoAniPlay = ani_tmp;
-	_G(spieler).DispFlag = disp_tmp;
-	menu_display = tmp_menu;
-	flags.StopAutoObj = false;
-}
-
-int16 look_invent(int16 invent_nr, int16 mode, int16 ats_nr) {
-	int16 ende;
-	int16 txt_start;
-	int16 txt_anz = 0;
-	int16 maus_flag;
-	int16 i, k;
-	int16 ret;
-	int16 xoff = 0;
-	int16 yoff = 0;
-	int16 txt_zeilen = 0;
-	int16 rect;
-	char *txt_adr = nullptr;
-	char *txt_name_adr = nullptr;
-	char c[2] = {0};
-	ret = -1;
-	ende = 0;
-	txt_start = 0;
-	maus_flag = 1;
-
-	if (mode == INV_ATS_MODE) {
-		atds->load_atds(invent_nr, INV_ATS_DATEI);
-		txt_name_adr = atds->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
-		txt_adr = atds->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
-		xoff = strlen(txt_name_adr);
-		xoff *= fvorx8x8;
-		xoff = (254 - xoff) / 2;
-		txt_zeilen = 2;
-		yoff = 10;
-
-	} else if (mode == INV_USE_ATS_MODE) {
-		txt_zeilen = 3;
-		yoff = 0;
-
-		if (ats_nr >= 15000) {
-			txt_adr = atds->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
-		} else {
-			txt_adr = atds->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
-		}
-		if (!txt_adr) {
-			ende = 1;
-		}
-	} else {
-		ende = 1;
-	}
-
-	while (!ende) {
-		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
-
-		if (minfo.button) {
-			if (minfo.button == 2) {
-				if (!maus_flag)
-					kbinfo.scan_code = ESC;
-			} else if (minfo.button == 1) {
-				if (!maus_flag) {
-					switch (rect) {
-					case 0:
-						ende = 1;
-						ret = 0;
-						break;
-
-					case 1:
-						ende = 1;
-						ret = 1;
-						break;
-
-					case 3:
-					case 6:
-						kbinfo.scan_code = CURSOR_UP;
-						break;
-
-					case 4:
-					case 7:
-						kbinfo.scan_code = CURSOR_DOWN;
-						break;
-
-					case 5:
-						ret = 5;
-						ende = 1;
-						break;
-
-					default:
-						break;
-					}
-				}
-			}
-
-			maus_flag = 1;
-		} else {
-			maus_flag = 0;
-		}
-
-		switch (kbinfo.scan_code) {
-		case F1_KEY:
-			in->hot_key = F1_KEY;
-			break;
-
-		case F2_KEY:
-			in->hot_key = F2_KEY;
-			break;
-
-		case ESC:
-			ende = 1;
-			break;
-
-		case CURSOR_UP:
-			if (txt_start > 0)
-				--txt_start;
-			break;
-
-		case CURSOR_DOWN:
-			if (txt_start < txt_anz - txt_zeilen)
-				++txt_start;
-			break;
-
-		default:
-			break;
-		}
-
-		kbinfo.scan_code = Common::KEYCODE_INVALID;
-		set_up_screen(NO_SETUP);
-		plot_inventar_menu();
-		out->set_fontadr(font8x8);
-		out->set_vorschub(fvorx8x8, fvory8x8);
-
-		if (mode == INV_ATS_MODE)
-			out->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
-				scr_width, txt_name_adr);
-
-		out->set_fontadr(font6x8);
-		out->set_vorschub(fvorx6x8, fvory6x8);
-
-		if (txt_anz > txt_zeilen) {
-			if (txt_start > 0) {
-				if (rect == 6)
-					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
-					               WIN_INF_Y + 136 + 14, 41);
-				c[0] = 24;
-				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
-				              scr_width, c);
-			}
-
-			if (txt_start < txt_anz - txt_zeilen) {
-				if (rect == 7)
-					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
-					               WIN_INF_Y + 156 + 14, 41);
-				c[0] = 25;
-				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
-			}
-		}
-
-		k = 0;
-		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
-			out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-			              scr_width, "%s", txt->str_pos(txt_adr, i));
-			++k;
-		}
-
-		cur->plot_cur();
-		out->back2screen(workpage);
-		SHOULD_QUIT_RETURN0;
-	}
-
-	while (in->get_switch_code() == ESC) {
-		set_up_screen(NO_SETUP);
-		plot_inventar_menu();
-		cur->plot_cur();
-		out->back2screen(workpage);
-		SHOULD_QUIT_RETURN0;
-	}
-
-	return ret;
-}
-
-void look_invent_screen(int16 txt_mode, int16 txt_nr) {
-	int16 ok;
-	int16 m_mode = 0;
-
-	if (!flags.AtsAction) {
-		if (txt_nr != -1) {
-			switch (txt_mode) {
-			case INVENTAR_NORMAL:
-			case INVENTAR_STATIC:
-				ok = true;
-				switch (menu_item) {
-				case CUR_LOOK:
-					m_mode = TXT_MARK_LOOK;
-					break;
-
-				case CUR_USE:
-				case CUR_USER:
-				case CUR_HOWARD:
-				case CUR_NICHELLE:
-					m_mode = TXT_MARK_USE;
-					if (_G(spieler).inv_cur)
-						ok = false;
-					break;
-
-				case CUR_WALK:
-					m_mode = TXT_MARK_WALK;
-					break;
-
-				case CUR_TALK:
-					m_mode = TXT_MARK_TALK;
-					break;
-
-				}
-
-				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
-					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
-				}
-				if (ok) {
-					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);
-				}
-
-				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
-					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
-				if (menu_item == CUR_USE)
-					flags.StaticUseTxt = true;
-				break;
-
-			default:
-				break;
-			}
-		}
-	}
-}
-
 static void showDiary() {
 	int16 scrollx = _G(spieler).scrollx,
 		scrolly = _G(spieler).scrolly;
@@ -729,7 +127,7 @@ static void showDiary() {
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
-	plot_inventar_menu();
+	Dialogs::Inventory::plot_menu();
 	out->setze_zeiger(nullptr);
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
diff --git a/engines/chewy/menus.h b/engines/chewy/menus.h
index 57a1b1daaaf..f1385b63f68 100644
--- a/engines/chewy/menus.h
+++ b/engines/chewy/menus.h
@@ -22,6 +22,8 @@
 #ifndef CHEWY_MENUS_H
 #define CHEWY_MENUS_H
 
+namespace Chewy {
+
 #define MAUS_MENU_MAX_X 200
 #define MENU_EINBLENDEN 1
 #define MENU_AUSBLENDEN 2
@@ -29,4 +31,9 @@
 #define MENU_IOMENU 4
 #define MENU_MAIN 5
 
+extern int16 tmp_menu;
+extern int16 show_invent_menu;
+
+} // namespace Chewy
+
 #endif
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 303a5be51c9..19a6f1e5c74 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -43,6 +43,7 @@ MODULE_OBJS = \
 	dialogs/cinema.o \
 	dialogs/credits.o \
 	dialogs/files.o \
+	dialogs/inventory.o \
 	dialogs/options.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index 53f86f788c8..5c315699122 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -25,6 +25,7 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room8.h"
+#include "chewy/dialogs/inventory.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -134,7 +135,7 @@ bool Room8::gips_wurf() {
 		auto_move(8, P_CHEWY);
 		flags.AtsAction = false;
 		menu_item = CUR_USE;
-		look_invent_screen(INVENTAR_NORMAL, 178);
+		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
 		flags.AtsAction = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(20, 1, ANI_VOR);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 433659d0a59..b43c9eb4549 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -23,6 +23,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
+#include "chewy/dialogs/inventory.h"
 #include "chewy/rooms/rooms.h"
 
 namespace Chewy {
@@ -2374,7 +2375,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 					ret = start_ats_wait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATEI);
 				}
 			} else {
-				look_invent(-1, INV_USE_ATS_MODE, txt_nr);
+				Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, txt_nr);
 			}
 		} else {
 			ok = false;
@@ -2385,7 +2386,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 
 				if (flags.InventMenu) {
 					calc_inv_get_text(_G(spieler).AkInvent, test_nr);
-					look_invent(-1, INV_USE_ATS_MODE, RAND_NO_USE[r_val] + 15000);
+					Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, RAND_NO_USE[r_val] + 15000);
 				} else {
 					ret = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 				}


Commit: a34672b86d83955e54e0da2b142c393d2b3fa9ea
    https://github.com/scummvm/scummvm/commit/a34672b86d83955e54e0da2b142c393d2b3fa9ea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Move calc_use_invent and showDiary to Inventory

Changed paths:
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/inventory.h
    engines/chewy/global.h
    engines/chewy/menus.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index a84544ab9d5..dbc9a5ea074 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -20,6 +20,8 @@
  */
 
 #include "chewy/dialogs/inventory.h"
+#include "chewy/rooms/room44.h"
+#include "chewy/rooms/room58.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
@@ -632,5 +634,87 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 	}
 }
 
+int16 Inventory::calc_use_invent(int16 inv_nr) {
+	int16 ret_val;
+	int16 ret;
+	ret_val = false;
+
+	if (menu_item == CUR_LOOK) {
+		switch (inv_nr) {
+		case ZEITUNG_INV:
+			Rooms::Room44::look_news();
+			break;
+
+		case CUTMAG_INV:
+			show_invent_menu = 2;
+			ret_val = true;
+			Rooms::Room58::look_cut_mag(58);
+			break;
+
+		case SPARK_INV:
+			show_invent_menu = 2;
+			ret_val = true;
+			save_person_rnr();
+			Rooms::Room58::look_cut_mag(60);
+			break;
+
+		case DIARY_INV:
+			showDiary();
+			ret_val = true;
+			break;
+
+		default:
+			break;
+		}
+	} else if (menu_item == CUR_USE) {
+		switch (inv_nr) {
+		case GBUCH_INV:
+			ret = del_invent_slot(GBUCH_INV);
+			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
+			obj->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
+			ret_val = true;
+			break;
+
+		default:
+			break;
+		}
+	}
+
+	return ret_val;
+}
+
+void Inventory::showDiary() {
+	int16 scrollx = _G(spieler).scrollx,
+		scrolly = _G(spieler).scrolly;
+	_G(spieler).scrollx = 0;
+	_G(spieler).scrolly = 0;
+
+	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
+	out->setze_zeiger(workptr);
+	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	out->back2screen(workpage);
+	room->set_ak_pal(&room_blk);
+	out->setze_zeiger(nullptr);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+
+	while (in->get_switch_code() != ESC) {
+		g_events->update();
+		SHOULD_QUIT_RETURN;
+	}
+	while (in->get_switch_code() != 0) {
+		g_events->update();
+		SHOULD_QUIT_RETURN;
+	}
+
+	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(spieler).scrollx = scrollx;
+	_G(spieler).scrolly = scrolly;
+	set_up_screen(NO_SETUP);
+	Dialogs::Inventory::plot_menu();
+	out->setze_zeiger(nullptr);
+	room->set_ak_pal(&room_blk);
+	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+}
+
 } // namespace Dialogs
 } // namespace Chewy
diff --git a/engines/chewy/dialogs/inventory.h b/engines/chewy/dialogs/inventory.h
index ef85e5cec17..2be3976098c 100644
--- a/engines/chewy/dialogs/inventory.h
+++ b/engines/chewy/dialogs/inventory.h
@@ -33,6 +33,8 @@ private:
 	static int16 inv_rand_y;
 	static int keyVal;
 
+	static int16 calc_use_invent(int16 inv_nr);
+	static void showDiary();
 public:
 	static void plot_menu();
 	static void menu();
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 992cfbbbce2..c6d4afabaa6 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -374,8 +374,6 @@ void init_room();
 
 int16 call_fileio(int16 palette, int16 mode);
 
-//void look_debug_action(int16 key_nr);
-
 void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode);
 
 void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 zeilen_hoehe,
@@ -383,8 +381,6 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 zeilen_hoehe,
 
 void maus_mov_menu();
 
-int16 calc_use_invent(int16 inv_nr);
-
 void cur_2_inventory();
 
 void inventory_2_cur(int16 nr);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 0bd7e35f3d7..921531df210 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -100,88 +100,6 @@ void maus_mov_menu() {
 	menu_item = (maus_menu_x / (MAUS_MENU_MAX_X / 5));
 }
 
-static void showDiary() {
-	int16 scrollx = _G(spieler).scrollx,
-		scrolly = _G(spieler).scrolly;
-	_G(spieler).scrollx = 0;
-	_G(spieler).scrolly = 0;
-
-	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-	out->back2screen(workpage);
-	room->set_ak_pal(&room_blk);
-	out->setze_zeiger(nullptr);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-
-	while (in->get_switch_code() != ESC) {
-		g_events->update();
-		SHOULD_QUIT_RETURN;
-	}
-	while (in->get_switch_code() != 0) {
-		g_events->update();
-		SHOULD_QUIT_RETURN;
-	}
-
-	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
-	_G(spieler).scrollx = scrollx;
-	_G(spieler).scrolly = scrolly;
-	set_up_screen(NO_SETUP);
-	Dialogs::Inventory::plot_menu();
-	out->setze_zeiger(nullptr);
-	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-}
-
-int16 calc_use_invent(int16 inv_nr) {
-	int16 ret_val;
-	int16 ret;
-	ret_val = false;
-
-	if (menu_item == CUR_LOOK) {
-		switch (inv_nr) {
-		case ZEITUNG_INV:
-			Rooms::Room44::look_news();
-			break;
-
-		case CUTMAG_INV:
-			show_invent_menu = 2;
-			ret_val = true;
-			Rooms::Room58::look_cut_mag(58);
-			break;
-
-		case SPARK_INV:
-			show_invent_menu = 2;
-			ret_val = true;
-			save_person_rnr();
-			Rooms::Room58::look_cut_mag(60);
-			break;
-
-		case DIARY_INV:
-			showDiary();
-			ret_val = true;
-			break;
-
-		default:
-			break;
-		}
-	} else if (menu_item == CUR_USE) {
-		switch (inv_nr) {
-		case GBUCH_INV:
-			ret = del_invent_slot(GBUCH_INV);
-			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
-			obj->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
-			ret_val = true;
-			break;
-
-		default:
-			break;
-		}
-	}
-
-	return ret_val;
-}
-
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 	int16 vorx, vory, fntbr, fnth;
 	int16 len;


Commit: 577e0f13c2d0550e06cf86a2c91d5697d662083c
    https://github.com/scummvm/scummvm/commit/577e0f13c2d0550e06cf86a2c91d5697d662083c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:13-08:00

Commit Message:
CHEWY: Workarounds for incorrectly wrapped inventory item descriptions

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index f2cb7f0d32e..7676d9882ee 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -674,6 +674,18 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 		}
 	}
 
+	// WORKAROUND: Proper word wrapping some inventory items' look desc
+	if (txt_mode == TXT_MARK_LOOK) {
+		if (txt_nr == 29 && str_[37] == ' ' && str_[56] == '\0') {
+			str_[37] = '\0';
+			str_[56] = ' ';
+		}
+		if (txt_nr == 21 && str_[39] == ' ' && str_[46] == '\0') {
+			str_[39] = '\0';
+			str_[46] = ' ';
+		}
+	}
+
 	return str_;
 }
 


Commit: 82bf5e547e0aa9f7e0de18ae8de40fa1367868ea
    https://github.com/scummvm/scummvm/commit/82bf5e547e0aa9f7e0de18ae8de40fa1367868ea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Improve prior workaround using inventory constants

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 7676d9882ee..c649eb47da3 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -676,11 +676,11 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 
 	// WORKAROUND: Proper word wrapping some inventory items' look desc
 	if (txt_mode == TXT_MARK_LOOK) {
-		if (txt_nr == 29 && str_[37] == ' ' && str_[56] == '\0') {
+		if (txt_nr == CYB_KRONE_INV && str_[37] == ' ' && str_[56] == '\0') {
 			str_[37] = '\0';
 			str_[56] = ' ';
 		}
-		if (txt_nr == 21 && str_[39] == ' ' && str_[46] == '\0') {
+		if (txt_nr == YEL_CARD_INV && str_[39] == ' ' && str_[46] == '\0') {
 			str_[39] = '\0';
 			str_[46] = ' ';
 		}


Commit: b9af0333c52a2d6af687ab7760ed563fd5ffb05a
    https://github.com/scummvm/scummvm/commit/b9af0333c52a2d6af687ab7760ed563fd5ffb05a
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Review logic of Room 33

Changed paths:
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room33.h


diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 7eeaae56988..3526650a847 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -54,7 +54,7 @@ void Room33::surimy_go() {
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = true;
-			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
@@ -80,19 +80,17 @@ void Room33::look_schublade() {
 int16 Room33::use_schublade() {
 	int16 action_flag = false;
 
-	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur) {
-		if (!_G(spieler).R33Messer) {
-			action_flag = true;
-			_G(spieler).R33Messer = true;
-
-			hide_cur();
-			atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
-			atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
-			atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
-			start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
-			invent_2_slot(MESSER_INV);
-			show_cur();
-		}
+	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur && !_G(spieler).R33Messer) {
+		hide_cur();
+		action_flag = true;
+		_G(spieler).R33Messer = true;
+
+		atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
+		atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
+		atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
+		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		invent_2_slot(MESSER_INV);
+		show_cur();
 	}
 
 	return action_flag;
@@ -101,8 +99,8 @@ int16 Room33::use_schublade() {
 void Room33::use_maschine() {
 	int16 dia_nr;
 	int16 ani_nr;
-	int16 action = true;
-	int16 hocker = false;
+	bool action = true;
+	bool hocker = false;
 	hide_cur();
 
 	if (!_G(spieler).R33MunterOk) {
@@ -110,23 +108,23 @@ void Room33::use_maschine() {
 
 		if (_G(spieler).inv_cur) {
 			switch (_G(spieler).AkInvent) {
-			case K_FLEISCH_INV:
-				_G(spieler).R33Munter[1] = true;
-				break;
-
 			case MILCH_INV:
 				_G(spieler).R33Munter[3] = true;
 				invent_2_slot(MILCH_LEER_INV);
 				break;
 
-			case KAFFEE_INV:
-				_G(spieler).R33Munter[0] = true;
+			case K_FLEISCH_INV:
+				_G(spieler).R33Munter[1] = true;
 				break;
 
 			case EIER_INV:
 				_G(spieler).R33Munter[2] = true;
 				break;
 
+			case KAFFEE_INV:
+				_G(spieler).R33Munter[0] = true;
+				break;
+
 			default:
 				action = false;
 				break;
@@ -185,8 +183,8 @@ void Room33::use_maschine() {
 	show_cur();
 }
 
-int16 Room33::calc_muntermacher() {
-	int16 ret = true;
+bool Room33::calc_muntermacher() {
+	bool ret = true;
 
 	for (int16 i = 0; i < 4; i++) {
 		if (_G(spieler).R33Munter[i] == false)
@@ -199,20 +197,18 @@ int16 Room33::calc_muntermacher() {
 int16 Room33::get_munter() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
-			action_flag = true;
-			hide_cur();
-			_G(spieler).R33MunterGet = true;
-			auto_move(4, P_CHEWY);
-			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			invent_2_slot(MUNTER_INV);
-			atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
-			det->hide_static_spr(3);
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
-			start_aad_wait(72, -1);
-			show_cur();
-		}
+	if (!_G(spieler).inv_cur && !_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
+		action_flag = true;
+		hide_cur();
+		_G(spieler).R33MunterGet = true;
+		auto_move(4, P_CHEWY);
+		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+		invent_2_slot(MUNTER_INV);
+		atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+		det->hide_static_spr(3);
+		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+		start_aad_wait(72, -1);
+		show_cur();
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room33.h b/engines/chewy/rooms/room33.h
index 4b0c50a5eac..0c64025df65 100644
--- a/engines/chewy/rooms/room33.h
+++ b/engines/chewy/rooms/room33.h
@@ -28,7 +28,7 @@ namespace Rooms {
 class Room33 {
 private:
 	static void surimy_go();
-	static int16 calc_muntermacher();
+	static bool calc_muntermacher();
 
 public:
 	static void entry();


Commit: 36910549633aff29895d4e5f962085d79d237cc0
    https://github.com/scummvm/scummvm/commit/36910549633aff29895d4e5f962085d79d237cc0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: In progress proper implementation of Files dialog

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/files.h
    engines/chewy/main.cpp
    engines/chewy/main_menu.cpp
    engines/chewy/memory.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 9eca8b6e822..0e577f86f8d 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -182,6 +182,8 @@ enum SetupScreenMode {
 
 #define ADSH_TMP "adsh.tmp"
 
+#define QUIT_MSG "QUIT ?? Y/N "
+
 #define MAX_PERSON 3
 
 #define P_CHEWY 0
@@ -587,6 +589,8 @@ enum SetupScreenMode {
 
 #define FILEMENUE 1
 
+#define ERROR if (modul) ::error("General failure - %d", modul);
+
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index de90f9a9015..82791f17027 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -40,58 +40,60 @@ static const int16 FILE_ICONS[8 * 4] = {
 };
 
 
-int16 Files::execute() {
-	int16 u_index;
+int16 Files::execute(bool isInGame) {
+	//int16 u_index;
 	int16 key = 0;
 	int16 i, j;
 	int16 x[8];
 	int16 y[8];
 	int16 mode[9];
-	int16 ret;
+	int16 ret = 0;
 	char *fnames;
 	char *tmp;
 	int16 text_off, active_slot;
 	int16 rect, line;
+	bool flag = false;
+
 	taf_info *ti = mem->taf_adr(OPTION_TAF);
-	//SpriteResource *options = new SpriteResource(OPTION_TAF);
-	ret = 0;
+	g_events->clearEvents();
+
+	room->open_handle(GBOOK, "rb", 0);
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	out->setze_zeiger(workptr);
 	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 	out->setze_zeiger(screen0);
 	room->set_ak_pal(&room_blk);
+	fnames = iog->io_init(&ioptr);
+	fnames += 1;
+	ERROR;
+
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 	out->setze_zeiger(workptr);
+	show_cur();
 
-	fnames = iog->io_init(&ioptr);
-	fnames += 1;
 	if (!modul) {
 		x[0] = 1;
 		x[1] = 1;
 		y[0] = 0;
 		y[1] = 0;
+
 		for (i = 2; i < 8; i++) {
 			x[i] = 5;
 			y[i] = 5;
 		}
 		for (i = 0; i < 8; i++)
 			mode[i] = 0;
+
 		mode[8] = 1;
 		text_off = 0;
 		active_slot = 0;
-		while (key != ESC) {
+
+		while (key != ESC && !SHOULD_QUIT) {
+			// Draw the dialog background
 			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+
+			// Draw the buttons at the bottom
 			for (i = 28, j = 0; i < 35; i++, j++) {
-#if 0
-				TAFChunk *sprite = options->getSprite(i);
-				// TODO: korrektur?
-				if (!mode[j])
-					out->sprite_set(sprite->data, 16 + /*ti->korrektur[i << 1] + */x[j],
-						76 + /*ti->korrektur[(i << 1) + 1] + */y[j], 0);
-				else
-					out->sprite_set(sprite->data, 16 /* + ti->korrektur[i << 1]*/,
-						76 /*+ ti->korrektur[(i << 1) + 1]*/, 0);
-#endif
 				if (!mode[j])
 					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1] + x[j],
 						76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
@@ -99,28 +101,22 @@ int16 Files::execute() {
 					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
 						76 + ti->korrektur[(i << 1) + 1], 0);
 			}
-			key = in->get_switch_code();
-			if (mode[2] || mode[3] || mode[8]) {
-				tmp = fnames + (text_off * 40);
-				for (i = 0; i < 6; i++) {
-					if (tmp != 0) {
-						if (i != active_slot) {
-							out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-							out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
-						} else {
-							if (mode[8]) {
-								out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-								out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
-							} else {
-								out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
-								out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
-								out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
-							}
-						}
-					}
-					tmp += 40;
+
+			// Render the list of savegame slots
+			tmp = fnames + (text_off * 40);
+			for (i = 0; i < 6; i++, tmp += 40) {
+				if (i != active_slot) {
+					out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+					out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
+				} else {
+					out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
+					out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
+					out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
 				}
 			}
+
+			key = in->get_switch_code();
+
 			if (mode[0])
 				--mode[0];
 			if (mode[1])
@@ -131,12 +127,9 @@ int16 Files::execute() {
 				key = ESC;
 			if (mode[5])
 				--mode[5];
+
 			if (mode[5] == 1) {
-#ifdef ENGLISCH
-				out->printxy(120, 138, 255, 300, 0, "QUIT ?? Y/N ");
-#else
-				out->printxy(120, 138, 255, 300, 0, "BEENDEN ?? J/N ");
-#endif
+				out->printxy(120, 138, 255, 300, 0, QUIT_MSG);
 				out->back2screen(workpage);
 				in->alter_kb_handler();
 
@@ -144,27 +137,35 @@ int16 Files::execute() {
 				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
 					ret = 1;
 					key = ESC;
-				} else
+				} else {
 					key = 0;
+				}
+
 				in->neuer_kb_handler(&kbinfo);
 			}
+
 			if (mode[6])
 				--mode[6];
 			if (mode[6] == 1) {
 				Dialogs::Options::execute(ti);
 			}
-			if ((minfo.button == 1) || (key == ENTER)) {
-				WAIT_TASTE_LOS
-					rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
+
+			if (!flag && ((minfo.button == 1) || (key == ENTER))) {
+				rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
+				flag = true;
 				key = 0;
+
 				switch (rect) {
 				case 0:
+					// Scroll up button
 					key = CURSOR_UP + ALT;
 					break;
 				case 1:
+					// Scroll down button
 					key = CURSOR_DOWN + ALT;
 					break;
 				case 2:
+					// Savegame list area
 					line = (minfo.y - 68) / 10;
 					if (line == active_slot)
 						key = ENTER;
@@ -189,7 +190,11 @@ int16 Files::execute() {
 					key = F5_KEY;
 					break;
 				}
+
 				minfo.button = 0;
+			} else {
+				flag = false;
+				EVENTS_UPDATE;
 			}
 
 			switch (key) {
@@ -197,14 +202,12 @@ int16 Files::execute() {
 				mode[2] = 1;
 				mode[3] = 0;
 				mode[8] = 0;
-
 				break;
 
 			case F2_KEY:
 				mode[2] = 0;
 				mode[3] = 1;
 				mode[8] = 0;
-
 				break;
 
 			case F3_KEY:
@@ -220,14 +223,13 @@ int16 Files::execute() {
 				break;
 
 			case CURSOR_UP + ALT:
-				WAIT_TASTE_LOS
-					if (mode[2] || mode[3]) {
-						mode[0] = 10;
-						if (active_slot > 0)
-							--active_slot;
-						else if (text_off > 0)
-							--text_off;
-					}
+				if (mode[2] || mode[3]) {
+					mode[0] = 10;
+					if (active_slot > 0)
+						--active_slot;
+					else if (text_off > 0)
+						--text_off;
+				}
 				break;
 
 			case CURSOR_DOWN + ALT:
@@ -238,36 +240,34 @@ int16 Files::execute() {
 					else if (text_off < (20 - 6))
 						++text_off;
 				}
-				WAIT_TASTE_LOS
-					break;
+				break;
 
 			case ENTER:
 			case ENTER + ALT:
-				WAIT_TASTE_LOS
-					if (mode[3]) {
-						tmp = fnames + ((text_off + active_slot) * 40);
-						if (tmp[0]) {
-							CurrentSong = -1;
-							iog->load(text_off + active_slot,
-								ioptr.save_path);
-							key = ESC;
-						}
-					} else if (mode[2]) {
-						out->back2screen(workpage);
-						out->setze_zeiger(screen0);
-						in->alter_kb_handler();
-						tmp = fnames + ((text_off + active_slot) * 40);
-						key = out->scanxy(70, 68 + (active_slot * 10),
-							255, 42, 14, 0, "%36s36", tmp);
-						in->neuer_kb_handler(&kbinfo);
-						out->setze_zeiger(workptr);
-						if (key != 27) {
-							iog->save_entry(text_off + active_slot,
-								ioptr.save_path);
-						}
-						key = 0;
+				if (mode[3]) {
+					tmp = fnames + ((text_off + active_slot) * 40);
+					if (tmp[0]) {
+						CurrentSong = -1;
+						iog->load(text_off + active_slot,
+							ioptr.save_path);
+						key = ESC;
 					}
-					break;
+				} else if (mode[2]) {
+					out->back2screen(workpage);
+					out->setze_zeiger(screen0);
+					in->alter_kb_handler();
+					tmp = fnames + ((text_off + active_slot) * 40);
+					key = out->scanxy(70, 68 + (active_slot * 10),
+						255, 42, 14, 0, "%36s36", tmp);
+					in->neuer_kb_handler(&kbinfo);
+					out->setze_zeiger(workptr);
+					if (key != 27) {
+						iog->save_entry(text_off + active_slot,
+							ioptr.save_path);
+					}
+					key = 0;
+				}
+				break;
 
 			case CURSOR_UP:
 				cur->move(minfo.x, --minfo.y);
@@ -285,24 +285,25 @@ int16 Files::execute() {
 				cur->move(++minfo.x, minfo.y);
 				break;
 
+			default:
+				break;
 			}
+
 			cur->plot_cur();
 			out->back2screen(workpage);
 
 			EVENTS_UPDATE;
-			SHOULD_QUIT_RETURN0;
 		}
 	}
+
 	free(ti);
 
+	room->open_handle(EPISODE1, "rb", 0);
 	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	ERROR;
+
 	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);
-	u_index = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-		spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-		room->GedXAnz[room_blk.AkAblage],
-		ged_mem[room_blk.AkAblage]);
-	check_shad(u_index, 1);
 
 	return ret;
 }
diff --git a/engines/chewy/dialogs/files.h b/engines/chewy/dialogs/files.h
index 66efb23e9af..202f00524dd 100644
--- a/engines/chewy/dialogs/files.h
+++ b/engines/chewy/dialogs/files.h
@@ -29,7 +29,7 @@ namespace Dialogs {
 
 class Files {
 public:
-	static int16 execute();
+	static int16 execute(bool isInGame);
 };
 
 } // namespace Dialogs
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8c1588ec3b2..963a51fa56d 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -390,7 +390,7 @@ int16 main_loop(int16 mode) {
 			out->set_fontadr(font6x8);
 			out->set_vorschub(fvorx6x8, fvory6x8);
 			cursor_wahl(CUR_SAVE);
-			if (Dialogs::Files::execute() == 1) {
+			if (Dialogs::Files::execute(true) == 1) {
 				ende = 1;
 				fx_blend = BLEND4;
 			}
@@ -458,15 +458,16 @@ int16 main_loop(int16 mode) {
 
 				out->setze_zeiger(screen0);
 				cursor_wahl(CUR_SAVE);
-				ret = Dialogs::Files::execute();
+				ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
 					ende = 1;
 					fx_blend = BLEND4;
 				}
-				out->setze_zeiger(workptr);
 
+				out->setze_zeiger(workptr);
 				menu_item = tmp_menu_item;
 				menu_display = MENU_AUSBLENDEN;
+
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
@@ -490,7 +491,6 @@ int16 main_loop(int16 mode) {
 					cursor_wahl(menu_item);
 				}
 				break;
-
 			}
 			break;
 
@@ -519,6 +519,7 @@ int16 main_loop(int16 mode) {
 			break;
 
 		}
+
 		if (menu_display == MENU_AUSBLENDEN) {
 			menu_exit();
 			menu_flag = MENU_AUSBLENDEN;
@@ -529,13 +530,11 @@ int16 main_loop(int16 mode) {
 			minfo.y = maus_old_y;
 		}
 	}
+
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	if (mode == DO_SETUP)
 		set_up_screen(DO_MAIN_LOOP);
-#ifdef DEMO
-	if (_G(spieler).PersonRoomNr[P_CHEWY] > 24)
-		ende = 1;
-#endif
+
 	return ende;
 }
 
diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/main_menu.cpp
index 66e2c9c0059..611bc7d1cb3 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/main_menu.cpp
@@ -237,7 +237,7 @@ bool MainMenu::loadGame() {
 	minfo.x = 152;
 	minfo.y = 92;
 	savegameFlag = true;
-	int result = Dialogs::Files::execute();
+	int result = Dialogs::Files::execute(false);
 
 	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
 		menu_item == CUR_USE) ? 8 : 0);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 5516b6f2da5..35c6ef7749e 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -67,7 +67,7 @@ taf_info *memory::taf_adr(const char *filename) {
 		} else {
 			fcode = NOSPEICHER;
 			modul = SPEICHER;
-			tinfo = 0;
+			tinfo = nullptr;
 		}
 	}
 


Commit: 86772b3d18271eef4512e61c69e6654448d9ccb5
    https://github.com/scummvm/scummvm/commit/86772b3d18271eef4512e61c69e6654448d9ccb5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Further work on Files dialog

Changed paths:
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/files.h


diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 82791f17027..67e002d1458 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -28,6 +28,13 @@
 namespace Chewy {
 namespace Dialogs {
 
+#define NUM_VISIBLE_SLOTS 6
+
+enum Widget {
+	SCROLL_UP = 0, SCROLL_DOWN = 1, SAVE = 2, LOAD = 3,
+	GAME = 4, QUIT = 5, OPTIONS = 6, W7 = 7, W8 = 8
+};
+
 static const int16 FILE_ICONS[8 * 4] = {
 	14, 73, 32, 94,
 	14, 96, 32, 118,
@@ -41,12 +48,11 @@ static const int16 FILE_ICONS[8 * 4] = {
 
 
 int16 Files::execute(bool isInGame) {
-	//int16 u_index;
 	int16 key = 0;
 	int16 i, j;
-	int16 x[8];
-	int16 y[8];
+	Common::Point pt[8];
 	int16 mode[9];
+	bool visibility[8];
 	int16 ret = 0;
 	char *fnames;
 	char *tmp;
@@ -72,39 +78,46 @@ int16 Files::execute(bool isInGame) {
 	show_cur();
 
 	if (!modul) {
-		x[0] = 1;
-		x[1] = 1;
-		y[0] = 0;
-		y[1] = 0;
-
-		for (i = 2; i < 8; i++) {
-			x[i] = 5;
-			y[i] = 5;
+		pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
+		for (i = SAVE; i <= W7; i++)
+			pt[i] = Common::Point(5, 5);
+
+		Common::fill(visibility, visibility + 8, true);
+		Common::fill(mode, mode + 8, 0);
+		mode[W8] = 1;
+
+		if (!isInGame) {
+			visibility[SAVE] = false;
+			visibility[GAME] = false;
+			mode[LOAD] = 1;
+			mode[W8] = 0;
 		}
-		for (i = 0; i < 8; i++)
-			mode[i] = 0;
 
-		mode[8] = 1;
-		text_off = 0;
-		active_slot = 0;
+		text_off = 0;		// Top visible save slot
+		active_slot = 0;	// Currently selected slot
 
 		while (key != ESC && !SHOULD_QUIT) {
 			// Draw the dialog background
 			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 
 			// Draw the buttons at the bottom
-			for (i = 28, j = 0; i < 35; i++, j++) {
-				if (!mode[j])
-					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1] + x[j],
-						76 + ti->korrektur[(i << 1) + 1] + y[j], 0);
-				else
-					out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
-						76 + ti->korrektur[(i << 1) + 1], 0);
+			for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
+				if (visibility[j]) {
+					if (!mode[j])
+						// Not pressed
+						out->sprite_set(
+							ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
+							76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
+					else
+						// Pressed
+						out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
+							76 + ti->korrektur[(i << 1) + 1], 0);
+				}
 			}
 
-			// Render the list of savegame slots
+			// Write the list of savegame slots
 			tmp = fnames + (text_off * 40);
-			for (i = 0; i < 6; i++, tmp += 40) {
+			for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
 				if (i != active_slot) {
 					out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
 					out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
@@ -117,18 +130,19 @@ int16 Files::execute(bool isInGame) {
 
 			key = in->get_switch_code();
 
-			if (mode[0])
-				--mode[0];
-			if (mode[1])
-				--mode[1];
-			if (mode[4])
-				--mode[4];
-			if (mode[4] == 1)
+			if (mode[SCROLL_UP])
+				--mode[SCROLL_UP];
+			if (mode[SCROLL_DOWN])
+				--mode[SCROLL_DOWN];
+
+			if (mode[GAME])
+				--mode[GAME];
+			if (mode[GAME] == 1)
 				key = ESC;
-			if (mode[5])
-				--mode[5];
 
-			if (mode[5] == 1) {
+			if (mode[QUIT])
+				--mode[QUIT];
+			if (mode[QUIT] == 1) {
 				out->printxy(120, 138, 255, 300, 0, QUIT_MSG);
 				out->back2screen(workpage);
 				in->alter_kb_handler();
@@ -144,28 +158,25 @@ int16 Files::execute(bool isInGame) {
 				in->neuer_kb_handler(&kbinfo);
 			}
 
-			if (mode[6])
-				--mode[6];
-			if (mode[6] == 1) {
+			if (mode[OPTIONS])
+				--mode[OPTIONS];
+			if (mode[OPTIONS] == 1) {
 				Dialogs::Options::execute(ti);
 			}
 
-			if (!flag && ((minfo.button == 1) || (key == ENTER))) {
+			if (!flag && minfo.button == 1) {
 				rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
 				flag = true;
 				key = 0;
 
 				switch (rect) {
 				case 0:
-					// Scroll up button
-					key = CURSOR_UP + ALT;
+					key = CURSOR_UP;
 					break;
 				case 1:
-					// Scroll down button
-					key = CURSOR_DOWN + ALT;
+					key = CURSOR_DOWN;
 					break;
 				case 2:
-					// Savegame list area
 					line = (minfo.y - 68) / 10;
 					if (line == active_slot)
 						key = ENTER;
@@ -173,6 +184,9 @@ int16 Files::execute(bool isInGame) {
 						active_slot = line;
 					if (active_slot > 5)
 						active_slot = 5;
+
+					if (!isInGame)
+						goto enter;
 					break;
 				case 3:
 					key = F1_KEY;
@@ -191,68 +205,67 @@ int16 Files::execute(bool isInGame) {
 					break;
 				}
 
-				minfo.button = 0;
-			} else {
+			} else if (flag && minfo.button == 0) {
 				flag = false;
-				EVENTS_UPDATE;
 			}
 
 			switch (key) {
 			case F1_KEY:
-				mode[2] = 1;
-				mode[3] = 0;
-				mode[8] = 0;
+				if (visibility[SAVE]) {
+					mode[LOAD] = 0;
+					mode[SAVE] = 1;
+					mode[W8] = 0;
+					goto enter;
+				}
 				break;
 
 			case F2_KEY:
-				mode[2] = 0;
-				mode[3] = 1;
-				mode[8] = 0;
+				mode[LOAD] = 1;
+				mode[SAVE] = 0;
+				mode[W8] = 0;
+				goto enter;
 				break;
 
 			case F3_KEY:
-				mode[4] = 10;
+				if (visibility[GAME])
+					mode[GAME] = 10;
 				break;
 
 			case F4_KEY:
-				mode[5] = 10;
+				mode[QUIT] = 10;
 				break;
 
 			case F5_KEY:
-				mode[6] = 10;
+				mode[OPTIONS] = 10;
 				break;
 
-			case CURSOR_UP + ALT:
-				if (mode[2] || mode[3]) {
-					mode[0] = 10;
-					if (active_slot > 0)
-						--active_slot;
-					else if (text_off > 0)
-						--text_off;
-				}
+			case CURSOR_UP:
+				mode[SCROLL_UP] = 10;
+				if (active_slot > 0)
+					--active_slot;
+				else if (text_off > 0)
+					--text_off;
 				break;
 
-			case CURSOR_DOWN + ALT:
-				if (mode[2] || mode[3]) {
-					mode[1] = 10;
-					if (active_slot < 5)
-						++active_slot;
-					else if (text_off < (20 - 6))
-						++text_off;
-				}
+			case CURSOR_DOWN:
+				mode[SCROLL_DOWN] = 10;
+				if (active_slot < (NUM_VISIBLE_SLOTS - 1))
+					++active_slot;
+				else if (text_off < (20 - NUM_VISIBLE_SLOTS))
+					++text_off;
 				break;
 
 			case ENTER:
 			case ENTER + ALT:
-				if (mode[3]) {
+enter:
+				if (mode[LOAD]) {
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
 						CurrentSong = -1;
-						iog->load(text_off + active_slot,
-							ioptr.save_path);
+						iog->load(text_off + active_slot, ioptr.save_path);
 						key = ESC;
 					}
-				} else if (mode[2]) {
+				} else if (mode[SAVE]) {
 					out->back2screen(workpage);
 					out->setze_zeiger(screen0);
 					in->alter_kb_handler();
@@ -261,30 +274,14 @@ int16 Files::execute(bool isInGame) {
 						255, 42, 14, 0, "%36s36", tmp);
 					in->neuer_kb_handler(&kbinfo);
 					out->setze_zeiger(workptr);
-					if (key != 27) {
+					if (key != Common::KEYCODE_ESCAPE) {
 						iog->save_entry(text_off + active_slot,
 							ioptr.save_path);
 					}
-					key = 0;
+					key = ESC;
 				}
 				break;
 
-			case CURSOR_UP:
-				cur->move(minfo.x, --minfo.y);
-				break;
-
-			case CURSOR_DOWN:
-				cur->move(minfo.x, ++minfo.y);
-				break;
-
-			case CURSOR_LEFT:
-				cur->move(--minfo.x, minfo.y);
-				break;
-
-			case CURSOR_RIGHT:
-				cur->move(++minfo.x, minfo.y);
-				break;
-
 			default:
 				break;
 			}
diff --git a/engines/chewy/dialogs/files.h b/engines/chewy/dialogs/files.h
index 202f00524dd..dee6248a1ef 100644
--- a/engines/chewy/dialogs/files.h
+++ b/engines/chewy/dialogs/files.h
@@ -29,6 +29,12 @@ namespace Dialogs {
 
 class Files {
 public:
+	/**
+	 * Shows the file dialog
+	 * @param isInGame	True when called in-game,
+	 * false when called from the main menu
+	 * @returns		Returns 1 if quit was selected
+	 */
 	static int16 execute(bool isInGame);
 };
 


Commit: bbccfb878571918e01bb5636d099c2e5866aac27
    https://github.com/scummvm/scummvm/commit/bbccfb878571918e01bb5636d099c2e5866aac27
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Moved MainMenu class to dialogs folder

Changed paths:
  A engines/chewy/dialogs/main_menu.cpp
  A engines/chewy/dialogs/main_menu.h
  R engines/chewy/main_menu.cpp
  R engines/chewy/main_menu.h
    engines/chewy/main.cpp
    engines/chewy/module.mk


diff --git a/engines/chewy/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
similarity index 97%
rename from engines/chewy/main_menu.cpp
rename to engines/chewy/dialogs/main_menu.cpp
index 611bc7d1cb3..91e81b971a9 100644
--- a/engines/chewy/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -20,16 +20,17 @@
  */
 
 #include "common/textconsole.h"
-#include "chewy/main_menu.h"
+#include "chewy/dialogs/main_menu.h"
+#include "chewy/dialogs/cinema.h"
+#include "chewy/dialogs/credits.h"
+#include "chewy/dialogs/files.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/main.h"
 #include "chewy/ngshext.h"
-#include "chewy/dialogs/cinema.h"
-#include "chewy/dialogs/credits.h"
-#include "chewy/dialogs/files.h"
 
 namespace Chewy {
+namespace Dialogs {
 
 int MainMenu::_selection;
 int MainMenu::_personAni[3];
@@ -173,8 +174,8 @@ void MainMenu::animate() {
 
 int16 MainMenu::creditsFn(int16 key) {
 	if (key == 32 || key == 72 || key == 92 ||
-			key == 128 || key == 165 || key == 185 ||
-			key == 211 || key == 248 || key == 266) {
+		key == 128 || key == 165 || key == 185 ||
+		key == 211 || key == 248 || key == 266) {
 		for (int idx = 0; idx < 2000; ++idx) {
 			if (in->get_switch_code() == ESC)
 				return -1;
@@ -291,4 +292,5 @@ void MainMenu::restorePersonAni() {
 	}
 }
 
+} // namespace Dialogs
 } // namespace Chewy
diff --git a/engines/chewy/main_menu.h b/engines/chewy/dialogs/main_menu.h
similarity index 97%
rename from engines/chewy/main_menu.h
rename to engines/chewy/dialogs/main_menu.h
index a0b40a08ed4..a4c33a67d1e 100644
--- a/engines/chewy/main_menu.h
+++ b/engines/chewy/dialogs/main_menu.h
@@ -25,6 +25,7 @@
 #include "chewy/events_base.h"
 
 namespace Chewy {
+namespace Dialogs {
 
 enum MainMenuSelection {
 	MM_START_GAME = 0,
@@ -88,6 +89,7 @@ public:
 	static void playGame();
 };
 
+} // namespace Dialogs
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 963a51fa56d..cd7a8a33480 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -25,9 +25,9 @@
 #include "chewy/events.h"
 #include "chewy/menus.h"
 #include "chewy/ngshext.h"
-#include "chewy/main_menu.h"
 #include "chewy/dialogs/files.h"
 #include "chewy/dialogs/inventory.h"
+#include "chewy/dialogs/main_menu.h"
 
 namespace Chewy {
 
@@ -85,10 +85,10 @@ void game_main() {
 	int saveSlot = ConfMan.getInt("save_slot");
 	if (saveSlot != -1) {
 		(void)g_engine->loadGameState(saveSlot);
-		MainMenu::playGame();
+		Dialogs::MainMenu::playGame();
 		return;
 	} else {
-		MainMenu::execute();
+		Dialogs::MainMenu::execute();
 	}
 
 	remove(ADSH_TMP);
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 19a6f1e5c74..da0f5f20b66 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -19,7 +19,6 @@ MODULE_OBJS = \
 	io_game.o \
 	m_event.o \
 	main.o \
-	main_menu.o \
 	mouse.o \
 	mcga.o \
 	mcga_grafik.o \
@@ -44,6 +43,7 @@ MODULE_OBJS = \
 	dialogs/credits.o \
 	dialogs/files.o \
 	dialogs/inventory.o \
+	dialogs/main_menu.o \
 	dialogs/options.o \
 	video/cfo_decoder.o \
 	rooms/room0.o \


Commit: c205543c3d81d7570c3ae3df7c34c1b8c5679398
    https://github.com/scummvm/scummvm/commit/c205543c3d81d7570c3ae3df7c34c1b8c5679398
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Fixes for scanxy

Changed paths:
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/mcga_grafik.cpp


diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index c6809998f95..de65442fc18 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -147,6 +147,12 @@ void EventsManager::clearEvents() {
 	minfo.button = 0;
 }
 
+kb_info *EventsManager::setKbdInfo(kb_info *kbInfo) {
+	kb_info *kb = _kbInfo;
+	_kbInfo = kbInfo;
+	return kb;
+}
+
 void EventsManager::setMousePos(const Common::Point &pt) {
 	g_system->warpMouse(pt.x, pt.y);
 	_mousePos = pt;
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index a18120635a2..6f29ab8d610 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -50,9 +50,7 @@ public:
 
 	void clearEvents();
 
-	void setKbdInfo(kb_info *kb_info) {
-		_kbInfo = kb_info;
-	}
+	kb_info *setKbdInfo(kb_info *kbInfo);
 
 	/**
 	 * Set the mouse position
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_grafik.cpp
index 07e09ef9ad1..c4066764a4b 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_grafik.cpp
@@ -451,13 +451,13 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
 	int16 ret = 0;
 	int16 delay_flag;
-	char ende = 0, zeichen, zaehler, cursor_z;
+	int8 ende = 0, zeichen, zaehler, cursor_z;
 	char zstring[81], z1string[81];
-	char einfuege_cur = 0;
-	char char_anf = 0, char_end = 0;
+	int8 einfuege_cur = 0;
+	unsigned char char_anf = 0, char_end = 0;
 	uint16 vorzeichen = 0;
-	char x_mode = 0;
-	char eing = 0;
+	int8 x_mode = 0;
+	int8 eing = 0;
 	uint16 izahl = 0;
 	uint16 *intzahl = nullptr;
 	int16 *intzahl1 = nullptr;
@@ -466,6 +466,10 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	uint32 luzahl;
 	va_list parptr;
 	va_start(parptr, string);
+
+	kb_info kbInfo;
+	kb_info *kb_old = g_events->setKbdInfo(&kbInfo);
+
 	if ((x == -1) || (y == -1)) {
 		x = gcurx;
 		y = gcury;
@@ -473,15 +477,16 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 		gcurx = x;
 		gcury = y;
 	}
+
 	move(x, y);
 	i = 0;
+
 	while (!ende) {
 		zeichen = string[i];
 		++i;
 
 		if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
 			if (zeichen == '%') {
-
 				zeichen = string[i];
 				++i;
 				zaehler = 0;
@@ -563,7 +568,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 				case 's':
 					if ((char_anf == 0) && (char_end == 0)) {
 						char_anf = ' ';
-						char_end = '\xdc';
+						char_end = 0xdc;
 					}
 					mode = 3;
 					vorzeichen = 0xFF;
@@ -573,6 +578,7 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 					strcpy(zstring, charstr);
 					break;
 				}
+
 				zeichen = string[i];
 				++i;
 				if (zeichen == 'x') {
@@ -608,9 +614,11 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 				}
 				for (j = stelle; j < j + 1; j++) {
 					while ((!kbhit()) || (eing != 0)) {
+						EVENTS_UPDATE;
 
 						eing = 0;
 						move(x, y);
+
 						for (i = disp_stelle; i <= disp_stellemax + disp_stelle; ++i) {
 							if (zstring[i] != 0) {
 								putz(zstring[i], fcol, bcol, scrwidth);
@@ -623,14 +631,13 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 						}
 						if (svga == ON)
 							upd_scr();
-						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
-
-						{
+						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++) {
 							izahl = devices();
-							if (izahl == 13) {
+
+							if (izahl == Common::KEYCODE_RETURN) {
 								eing = 2;
 								break;
-							} else if (izahl == 27) {
+							} else if (izahl == Common::KEYCODE_ESCAPE) {
 								eing = 2;
 								break;
 							}
@@ -638,14 +645,12 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 						plot_scan_cur((x + (disp_akt)*fvorx), gcury, cur_col, 300, scrwidth, cursor_z);
 						if (svga == ON)
 							upd_scr();
-						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++)
-
-						{
+						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++) {
 							izahl = devices();
-							if (izahl == 13) {
+							if (izahl == Common::KEYCODE_RETURN) {
 								eing = 2;
 								break;
-							} else if (izahl == 27) {
+							} else if (izahl == Common::KEYCODE_ESCAPE) {
 								eing = 2;
 								break;
 							}
@@ -655,23 +660,24 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 					}
 					if (eing < 2)
 						izahl = (uint16)getch();
-					if (izahl == 13) {
 
-						ret = 13;
+					if (izahl == Common::KEYCODE_RETURN) {
+						ret = Common::KEYCODE_RETURN;
 						ende = 1;
 						break;
 					}
-					if (izahl == 27) {
 
-						ret = 27;
+					if (izahl == Common::KEYCODE_ESCAPE) {
+						ret = Common::KEYCODE_ESCAPE;
 						ende = 2;
 						break;
 					}
 
-					if (izahl == 8) {
+					if (izahl == Common::KEYCODE_BACKSPACE) {
 						eing = 1;
 						while (kbhit())
 							getch();
+
 						if (stelle > 0) {
 							strcpy(zstring + stelle - 1, zstring + stelle);
 							plot_scan_cur((x + disp_akt * fvorx), gcury, bcol, bcol, scrwidth, cursor_z);
@@ -684,8 +690,9 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 							else if (disp_akt > 0) {
 								--disp_akt;
 							}
-						} else
+						} else {
 							putch(7);
+						}
 					}
 
 					if (izahl == 0) {
@@ -784,8 +791,8 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 					if ((stelle == stellemax) && (stellemax >= zaehler)) {
 						stellemax = zaehler;
 						putch(7);
-					} else {
 
+					} else {
 						if (disp_akt < disp_stellemax) {
 							++disp_akt;
 						} else {
@@ -816,10 +823,10 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 							}
 						}
 					}
+
 					if (x_mode == 1) {
 						ende = 1;
 						ret = izahl;
-
 						break;
 					}
 				}
@@ -839,8 +846,8 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 			break;
 		}
 	}
-	switch (ende) {
 
+	switch (ende) {
 	case 1:
 		switch (mode) {
 		case 1:
@@ -861,8 +868,12 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	case 2:
 		break;
 	}
+
 	if (svga == ON)
 		upd_scr();
+
+	g_events->setKbdInfo(kb_old);
+
 	return ret;
 }
 


Commit: bb363bce25f3ba9f23339c00442f2c0de2e92187
    https://github.com/scummvm/scummvm/commit/bb363bce25f3ba9f23339c00442f2c0de2e92187
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:14-08:00

Commit Message:
CHEWY: Use the ScummVM GMM dialog by default

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/dialogs/files.cpp
    engines/chewy/main.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 6263283849d..9572b81f69f 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -162,6 +162,17 @@ SaveStateList ChewyEngine::listSaves() {
 	return getMetaEngine()->listSaves(_targetName.c_str());
 }
 
+void ChewyEngine::showGmm(bool isInGame) {
+	_canLoad = true;
+	_canSave = isInGame;
+
+	openMainMenuDialog();
+	_events->clearEvents();
+
+	_canLoad = false;
+	_canSave = false;
+}
+
 void ChewyEngine::playVideo(uint num) {
 	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
 	VideoResource *videoResource = new VideoResource("cut.tap");
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index a2e9fed2d74..e7be1d4a1c6 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -49,6 +49,10 @@ class Globals;
 class Sound;
 
 class ChewyEngine : public Engine {
+private:
+	bool _canLoad = false;
+	bool _canSave = false;
+
 protected:
 	// Engine APIs
 	Common::Error run() override;
@@ -69,7 +73,6 @@ public:
 	Globals *_globals = nullptr;
 	Sound *_sound = nullptr;
 	Graphics::Screen *_screen = nullptr;
-	bool _canLoadSave = false;
 	bool _showWalkAreas = false;
 
 public:
@@ -80,10 +83,14 @@ public:
 	Common::Language getLanguage() const;
 
 	bool canLoadGameStateCurrently() override {
-		return _canLoadSave;
+		return _canLoad;
 	}
 	bool canSaveGameStateCurrently() override {
-		return _canLoadSave;
+		return _canSave;
+	}
+	void setCanLoadSave(bool canLoadSave) {
+		_canLoad = canLoadSave;
+		_canSave = canLoadSave;
 	}
 
 	/**
@@ -98,6 +105,11 @@ public:
 
 	SaveStateList listSaves();
 
+	/**
+	 * Show the GMM
+	 */
+	void showGmm(bool isInGame);
+
 	uint getRandomNumber(uint max) {
 		return _rnd.getRandomNumber(max);
 	}
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 67e002d1458..753e5d138e2 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "chewy/dialogs/files.h"
 #include "chewy/dialogs/options.h"
 #include "chewy/events.h"
@@ -60,6 +61,11 @@ int16 Files::execute(bool isInGame) {
 	int16 rect, line;
 	bool flag = false;
 
+	if (!ConfMan.getBool("original_menus")) {
+		g_engine->showGmm(isInGame);
+		return 0;
+	}
+
 	taf_info *ti = mem->taf_adr(OPTION_TAF);
 	g_events->clearEvents();
 
@@ -72,7 +78,7 @@ int16 Files::execute(bool isInGame) {
 	fnames = iog->io_init(&ioptr);
 	fnames += 1;
 	ERROR;
-
+ 
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 	out->setze_zeiger(workptr);
 	show_cur();
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index cd7a8a33480..43ebe67690f 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -749,9 +749,9 @@ void set_up_screen(SetupScreenMode mode) {
 
 	g_screen->update();
 
-	g_engine->_canLoadSave = isMainLoop;
+	g_engine->setCanLoadSave(isMainLoop);
 	EVENTS_UPDATE;
-	g_engine->_canLoadSave = false;
+	g_engine->setCanLoadSave(false);
 }
 
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {


Commit: 574d8ad9cd22075de62f3fdefa544add1e5a845e
    https://github.com/scummvm/scummvm/commit/574d8ad9cd22075de62f3fdefa544add1e5a845e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:16-08:00

Commit Message:
CHEWY: Fix occassional speech playback even in text mode

Changed paths:
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index e593c197ef6..580fd519595 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -439,6 +439,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	bool ret = false;
 	tmp_maus_links = _G(maus_links_click);
 	_G(maus_links_click) = false;
+
 	if (!flags.AtsText) {
 		flags.AtsText = true;
 		if (txt_nr != -1) {
@@ -448,7 +449,11 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			if (ret) {
 				while (atds->ats_get_status() != false && !SHOULD_QUIT)
 					set_up_screen(DO_SETUP);
-			} else if (VocNr >= 0) {
+
+			// WORKAROUND: There are a few cases in the game with no text,
+			// but a voice sample the game would fall back on even in
+			// subtitles only mode. Don't allow this in ScummVM
+			} else if (VocNr >= 0 && !g_engine->_sound->isSpeechMuted()) {
 				ret = true;
 				vocx = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
 				g_engine->_sound->setSoundChannelBalance(0, atds->getStereoPos(vocx));


Commit: 050bb36a7f8b8f220a4ef42877aa289b7e809e93
    https://github.com/scummvm/scummvm/commit/050bb36a7f8b8f220a4ef42877aa289b7e809e93
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:16-08:00

Commit Message:
CHEWY: Review logic of Room 32

Changed paths:
    engines/chewy/rooms/room32.cpp


diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 4a1fe5e098e..6e9d4a8d12c 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room32.h"
 
 namespace Chewy {
@@ -32,9 +30,8 @@ namespace Rooms {
 void Room32::entry() {
 	if (_G(spieler).R32HowardWeg)
 		det->hide_static_spr(0);
-	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
+	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib)
 		det->show_static_spr(5);
-	}
 }
 
 int16 Room32::use_howard() {
@@ -101,16 +98,6 @@ void Room32::use_schreibmaschine() {
 	if (_G(spieler).R32HowardWeg) {
 		if (_G(spieler).inv_cur) {
 			switch (_G(spieler).AkInvent) {
-			case PAPIER_INV:
-				auto_move(2, P_CHEWY);
-				_G(spieler).R32PapierOk = true;
-				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
-				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
-				ani_nr = CH_TALK3;
-				dia_nr = 86;
-				break;
-
 			case CYB_KRONE_INV:
 				if (!_G(spieler).R32UseSchreib) {
 					if (!_G(spieler).R32PapierOk) {
@@ -131,6 +118,16 @@ void Room32::use_schreibmaschine() {
 				}
 				break;
 
+			case PAPIER_INV:
+				auto_move(2, P_CHEWY);
+				_G(spieler).R32PapierOk = true;
+				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
+				del_inventar(_G(spieler).AkInvent);
+				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
+				ani_nr = CH_TALK3;
+				dia_nr = 86;
+				break;
+
 			default:
 				ani_nr = CH_TALK12;
 				dia_nr = 90;
@@ -154,18 +151,16 @@ void Room32::use_schreibmaschine() {
 int16 Room32::get_script() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur) {
-		if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
-			action_flag = true;
-			_G(spieler).R32Script = true;
-			auto_move(4, P_CHEWY);
-			invent_2_slot(MANUSKRIPT_INV);
-			start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-			det->hide_static_spr(5);
-			atds->set_ats_str(203, 0, ATS_DATEI);
-			start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
-			start_aad_wait(91, -1);
-		}
+	if (!_G(spieler).inv_cur && !_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
+		action_flag = true;
+		_G(spieler).R32Script = true;
+		auto_move(4, P_CHEWY);
+		invent_2_slot(MANUSKRIPT_INV);
+		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
+		det->hide_static_spr(5);
+		atds->set_ats_str(203, 0, ATS_DATEI);
+		start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
+		start_aad_wait(91, -1);
 	}
 
 	return action_flag;


Commit: 3c4353732917fdb0ce029e566eb5e9f9e8091789
    https://github.com/scummvm/scummvm/commit/3c4353732917fdb0ce029e566eb5e9f9e8091789
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:16-08:00

Commit Message:
CHEWY: Remove unused file functions

Changed paths:
    engines/chewy/file.h


diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index fd6903b5c07..3309a02f777 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -56,34 +56,6 @@ inline void chewy_fclose(Stream *&stream) {
 	stream = nullptr;
 }
 
-inline size_t chewy_fread(void *ptr, size_t size, size_t nmemb, Stream *stream) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-	return rs->read(ptr, size * nmemb) / size;
-}
-
-inline int chewy_fseek(Stream *stream, long int offset, int whence) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-	return rs->seek(offset, whence);
-}
-
-inline size_t chewy_ftell(Stream *stream) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-	return rs->size();
-}
-
-inline size_t chewy_fwrite(void *ptr, size_t size, size_t nmemb, Stream *stream) {
-	error("TODO: chewy_fwrite");
-	return 0;
-}
-
-inline int chewy_fputc(byte c, Stream *stream) {
-	error("TODO: chewy_fputc");
-	return 0;
-}
-
 } // namespace Chewy
 
 #endif


Commit: 3c23b39bbeb3f172fcf653e2e9eebda61b198b87
    https://github.com/scummvm/scummvm/commit/3c23b39bbeb3f172fcf653e2e9eebda61b198b87
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:16-08:00

Commit Message:
CHEWY: Improvements for sprite handling in the new resource loader

Changed paths:
    engines/chewy/resource.cpp
    engines/chewy/resource.h


diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
index 92059cec6dd..f2efa589e75 100644
--- a/engines/chewy/resource.cpp
+++ b/engines/chewy/resource.cpp
@@ -58,7 +58,7 @@ Resource::Resource(Common::String filename) {
 		_encrypted = false;
 	}
 
-	if (filename == "atds.tap")
+	if (filename.contains("atds.tap"))
 		_encrypted = true;
 
 	_chunkCount = _stream.readUint16LE();
@@ -77,11 +77,17 @@ Resource::Resource(Common::String filename) {
 		_stream.skip(cur.size);
 		_chunkList.push_back(cur);
 	}
+
+	_spriteCorrectionsCount = 0;
+	_spriteCorrectionsTable = nullptr;
 }
 
 Resource::~Resource() {
 	_chunkList.clear();
 	_stream.close();
+
+	delete _spriteCorrectionsTable;
+	_spriteCorrectionsTable = nullptr;
 }
 
 uint32 Resource::getChunkCount() const {
@@ -115,10 +121,15 @@ void Resource::initSprite(Common::String filename) {
 	_encrypted = false;
 	/*screenMode = */_stream.readUint16LE();
 	_chunkCount = _stream.readUint16LE();
-	_stream.skip(4);
-	_stream.skip(3 * 256);
+	_allSize = _stream.readUint32LE();
+	_stream.read(_spritePalette, 3 * 256);
 	nextSpriteOffset = _stream.readUint32LE();
-	_stream.skip(2 + 1);
+	_spriteCorrectionsCount = _stream.readUint16LE();
+
+	// Sometimes there's a filler byte
+	if ((int32)nextSpriteOffset == _stream.pos() + 1)
+		_stream.skip(1);
+
 	if ((int32)nextSpriteOffset != _stream.pos())
 		error("Invalid sprite resource - %s", filename.c_str());
 
@@ -140,6 +151,16 @@ void Resource::initSprite(Common::String filename) {
 
 		_stream.skip(cur.size);
 		_chunkList.push_back(cur);
+
+		if (_stream.err())
+			error("Sprite stream error - %s", filename.c_str());
+	}
+
+	_spriteCorrectionsTable = new uint16[_chunkCount * 2];
+
+	for (uint i = 0; i < _chunkCount; i++) {
+		_spriteCorrectionsTable[i * 2] = _stream.readUint16LE();
+		_spriteCorrectionsTable[i * 2 + 1] = _stream.readUint16LE();
 	}
 }
 
@@ -190,6 +211,21 @@ TAFChunk *SpriteResource::getSprite(uint num) {
 	return taf;
 }
 
+uint32 SpriteResource::getSpriteData(uint num, uint8 **buf, bool initBuffer) {
+	TAFChunk *sprite = getSprite(num);
+	uint32 size = sprite->width * sprite->height;
+	if (initBuffer)
+		*buf = (byte *)malloc(size + 4);
+	// Sprite width and height is piggy-banked inside the sprite data
+	uint16 *memPtr = (uint16 *)*buf;
+	memPtr[0] = sprite->width;
+	memPtr[1] = sprite->height;
+	memcpy(*buf + 4, sprite->data, size);
+	delete sprite;
+
+	return size + 4;
+}
+
 TBFChunk *BackgroundResource::getImage(uint num, bool fixPalette) {
 	assert(num < _chunkList.size());
 
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index 6e008400614..c75feedb29b 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -143,6 +143,12 @@ protected:
 	ResourceType _resType;
 	bool _encrypted;
 
+	// Sprite specific
+	uint8 _spritePalette[3 * 256];
+	uint32 _allSize;
+	uint16 _spriteCorrectionsCount;
+	uint16 *_spriteCorrectionsTable;
+
 	ChunkList _chunkList;
 };
 
@@ -152,6 +158,11 @@ public:
 	virtual ~SpriteResource() {}
 
 	TAFChunk *getSprite(uint num);
+	uint32 getSpriteData(uint num, uint8 **buf, bool initBuffer);
+	uint8 *getSpritePalette() { return _spritePalette; }
+	uint32 getAllSize() { return _allSize; }
+	uint16 getSpriteCorrectionsCount() { return _spriteCorrectionsCount; }
+	uint16 *getSpriteCorrectionsTable() { return _spriteCorrectionsTable; }
 };
 
 class BackgroundResource : public Resource {


Commit: 8f60024811f689ac3e1a20833a6dde3cfc7c7446
    https://github.com/scummvm/scummvm/commit/8f60024811f689ac3e1a20833a6dde3cfc7c7446
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Simplify inventory sprite loading

Changed paths:
    engines/chewy/room.cpp


diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 1b0d351bdf3..9ea9d4b54c5 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -235,14 +235,7 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 
 		for (int16 i = 1; i < obj->mov_obj_room[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->mov_obj_room[i]]) {
-				TAFChunk *sprite = spriteRes->getSprite(obj->mov_obj_room[i]);
-				Rb->InvSprAdr[obj->mov_obj_room[i]] = (byte *)MALLOC(sprite->width * sprite->height + 4);
-				// Sprite width and height is piggy-banked inside the sprite data
-				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[obj->mov_obj_room[i]];
-				memPtr[0] = sprite->width;
-				memPtr[1] = sprite->height;
-				memcpy(Rb->InvSprAdr[obj->mov_obj_room[i]] + 4, sprite->data, sprite->width * sprite->height);
-				delete sprite;
+				spriteRes->getSpriteData(obj->mov_obj_room[i], &Rb->InvSprAdr[obj->mov_obj_room[i]], true);
 			} else {
 				Rb->InvSprAdr[obj->mov_obj_room[i]] = tmp_inv_spr[obj->mov_obj_room[i]];
 				tmp_inv_spr[obj->mov_obj_room[i]] = nullptr;
@@ -251,14 +244,7 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 
 		for (int16 i = 1; i < obj->spieler_invnr[0] + 1; i++) {
 			if (!tmp_inv_spr[obj->spieler_invnr[i]]) {
-				TAFChunk *sprite = spriteRes->getSprite(obj->spieler_invnr[i]);
-				Rb->InvSprAdr[obj->spieler_invnr[i]] = (byte *)MALLOC(sprite->width * sprite->height + 4);
-				// Sprite width and height is piggy-banked inside the sprite data
-				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[obj->spieler_invnr[i]];
-				memPtr[0] = sprite->width;
-				memPtr[1] = sprite->height;
-				memcpy(Rb->InvSprAdr[obj->spieler_invnr[i]] + 4, sprite->data, sprite->width * sprite->height);
-				delete sprite;
+				spriteRes->getSpriteData(obj->spieler_invnr[i], &Rb->InvSprAdr[obj->spieler_invnr[i]], true);
 			} else {
 				Rb->InvSprAdr[obj->spieler_invnr[i]] = tmp_inv_spr[obj->spieler_invnr[i]];
 				tmp_inv_spr[obj->spieler_invnr[i]] = 0;
@@ -272,14 +258,7 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 
 		if (player->AkInvent != -1) {
 			if (Rb->InvSprAdr[player->AkInvent] == nullptr) {
-				TAFChunk *sprite = spriteRes->getSprite(player->AkInvent);
-				Rb->InvSprAdr[player->AkInvent] = (byte *)MALLOC(sprite->width * sprite->height + 4);
-				// Sprite width and height is piggy-banked inside the sprite data
-				uint16 *memPtr = (uint16 *)Rb->InvSprAdr[player->AkInvent];
-				memPtr[0] = sprite->width;
-				memPtr[1] = sprite->height;
-				memcpy(Rb->InvSprAdr[player->AkInvent] + 4, sprite->data, sprite->width * sprite->height);
-				delete sprite;
+				spriteRes->getSpriteData(player->AkInvent, &Rb->InvSprAdr[player->AkInvent], true);
 			}
 		}
 
@@ -520,14 +499,7 @@ void load_chewy_taf(int16 taf_nr) {
 			_G(spieler).ChewyAni = taf_nr;
 			AkChewyTaf = taf_nr;
 			chewy = mem->taf_adr(fname_);
-
-			taf_dateiheader *tafheader;
-			mem->file->get_tafinfo(fname_, &tafheader);
-			if (!modul) {
-				chewy_kor = chewy->korrektur;
-			} else {
-				error("load_chewy_taf error");
-			}
+			chewy_kor = chewy->korrektur;
 		}
 	}
 }


Commit: 0963ce948d8ef0eb9b921883f76126065bf98ee0
    https://github.com/scummvm/scummvm/commit/0963ce948d8ef0eb9b921883f76126065bf98ee0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Cleanup

Changed paths:
    engines/chewy/io_game.cpp


diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 32babeaab2c..6d94e9b1ed2 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -570,9 +570,7 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 	if (file_find_g[slotNum][0] == 0) {
 		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
 	} else {
-		//handle = chewy_fopen(path, "rb");
 		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
-		//chewy_fclose(handle);
 		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
 
 	}


Commit: 282e1657770b3f546e32403d6ad1e711968d96ea
    https://github.com/scummvm/scummvm/commit/282e1657770b3f546e32403d6ad1e711968d96ea
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Remove obsolete error checking

This code is gradually being replaced with the new resource code

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/files.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 0e577f86f8d..1444798b89a 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -589,8 +589,6 @@ enum SetupScreenMode {
 
 #define FILEMENUE 1
 
-#define ERROR if (modul) ::error("General failure - %d", modul);
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 753e5d138e2..9d3056a94a9 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -77,7 +77,6 @@ int16 Files::execute(bool isInGame) {
 	room->set_ak_pal(&room_blk);
 	fnames = iog->io_init(&ioptr);
 	fnames += 1;
-	ERROR;
  
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 	out->setze_zeiger(workptr);
@@ -303,7 +302,6 @@ enter:
 
 	room->open_handle(EPISODE1, "rb", 0);
 	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
-	ERROR;
 
 	fx_blend = BLEND1;
 	room->set_ak_pal(&room_blk);


Commit: b3863a4f579828b48c3379011b2692942d99fd02
    https://github.com/scummvm/scummvm/commit/b3863a4f579828b48c3379011b2692942d99fd02
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Remove dead code

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 137bbc307b7..4fc486899d3 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -316,8 +316,6 @@ void init_load() {
 	set_spz_delay(3);
 
 	menutaf = mem->taf_adr(MENUTAF);
-	taf_dateiheader *tafheader;
-	mem->file->get_tafinfo(MENUTAF, &tafheader);
 	spblende = mem->void_adr("cut/blende.rnd");
 	room->load_room(&room_blk, room_start_nr, &_G(spieler));
 	out->set_palette(pal);


Commit: 9c411272fe6e74f2b3234357d07f959c1646e868
    https://github.com/scummvm/scummvm/commit/9c411272fe6e74f2b3234357d07f959c1646e868
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Reduce scope of sound buffer

The sound buffer is only used in the old FLIC player

Changed paths:
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/main.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 1444798b89a..53532fdfd25 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -51,7 +51,6 @@ enum SetupScreenMode {
 #define MIN_FAR_MEM 3000000
 #define MIN_LOW_MEM 100000
 #define MUSIC_SLOT_SIZE 500000
-#define SOUND_SLOT_SIZE 500000
 #define SPEECH_HALF_BUF 25000
 
 #define JXDIFF 180
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 703c5f3c193..b0c79c54179 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -157,7 +157,6 @@ detail::detail() {
 		rdi.sample[i] = nullptr;
 		rdi.tvp_index[i] = -1;
 	}
-	SoundBuffer = nullptr;
 	direct_taf_ani = OFF;
 	CurrentTaf = nullptr;
 }
@@ -681,11 +680,6 @@ void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
 	*ky += (int16)tmpy;
 }
 
-void detail::set_sound_area(byte *buffer, uint32 size) {
-	SoundBuffer = buffer;
-	SoundBufferSize = size;
-}
-
 void detail::disable_detail_sound(int16 nr) {
 	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index c67803ccb39..21020030031 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -251,7 +251,6 @@ public:
 	int16 mouse_on_detail(int16 mouse_x, int16 mouse_y,
 	                      int16 scrx, int16 scry);
 
-	void set_sound_area(byte *buffer, uint32 size);
 	void disable_detail_sound(int16 nr);
 	void enable_detail_sound(int16 nr);
 	void clear_detail_sound(int16 nr);
@@ -281,9 +280,6 @@ private:
 	int16 direct_taf_ani;
 	Stream *CurrentTaf;
 	uint32 SpritePos[MAXSPRITE];
-
-	byte *SoundBuffer;
-	uint32 SoundBufferSize;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index bcb84d2deb0..1d444ed7190 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -29,6 +29,8 @@
 
 namespace Chewy {
 
+#define SOUND_SLOT_SIZE 500000
+
 static int16(*custom_user)(int16) = nullptr;
 static int16(*flic_user)(int16) = nullptr;
 
@@ -98,6 +100,11 @@ void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
 
 flic::flic() {
 	Common::fill(&sounds[0], &sounds[50], (byte *)nullptr);
+	_soundBuffer = new byte[SOUND_SLOT_SIZE];
+}
+
+flic::~flic() {
+	delete[] _soundBuffer;
 }
 
 void flic::play(const char *fname, byte *vscreen, byte *load_p) {
@@ -375,7 +382,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 	load_puffer = ci->TempArea;
 	virt_screen = ci->VirtScreen + 4;
 	Music = ci->MusicSlot;
-	Sound = ci->SoundSlot;
+	Sound = _soundBuffer;
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(ci->Handle);
 	if (rs) {
@@ -708,8 +715,8 @@ void flic::free_sound(int16 nr) {
 	byte *fsound = sounds[nr];
 	long fsize = Ssize[nr];
 	if ((fsound != 0) && (fsize != 0)) {
-		long copysize = Cinfo->MaxSoundSize;
-		copysize -= (long)(fsound - Cinfo->SoundSlot);
+		long copysize = SOUND_SLOT_SIZE;
+		copysize -= (long)(fsound - _soundBuffer);
 		memmove(fsound, fsound + fsize, copysize);
 		for (int16 i = 0; i < 50; i++) {
 			if (sounds[i] == fsound) {
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index cca7fde8916..b82e40bcf84 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -78,6 +78,7 @@ extern void decode_rle(byte *vscr, const byte *dbuf, int br, int h);
 class flic {
 public:
 	flic();
+	~flic();
 	void play(const char *fname, byte *vscreen, byte *load_p);
 
 	int16 play(Common::Stream *handle, byte *vscreen, byte *load_p);
@@ -101,6 +102,7 @@ private:
 	byte *virt_screen;
 	byte *Music;
 	byte *Sound;
+	byte *_soundBuffer;
 	CustomInfo *Cinfo;
 	FlicHead flic_header;
 	CustomFlicHead custom_header;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 43ebe67690f..6e9ac388caa 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -105,8 +105,6 @@ void alloc_buffers() {
 	det->set_taf_ani_mem(Ci.TempArea);
 	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
-	Ci.SoundSlot = (byte *)MALLOC(SOUND_SLOT_SIZE);
-	Ci.MaxSoundSize = SOUND_SLOT_SIZE;
 }
 
 void free_buffers() {
@@ -121,7 +119,6 @@ void free_buffers() {
 	free((char *)chewy);
 
 	free((char *)curtaf);
-	free(Ci.SoundSlot);
 	free(Ci.MusicSlot);
 	free(Ci.TempArea);
 	free(cur_back);


Commit: 3471cecbf097c7f3cbabdd0d82beeee863672c10
    https://github.com/scummvm/scummvm/commit/3471cecbf097c7f3cbabdd0d82beeee863672c10
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:17-08:00

Commit Message:
CHEWY: Switch to the new sprite loading code

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index 5b35927e06a..eb10ee86c75 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -83,91 +83,6 @@ void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher
 	read_tbf_image(handle, komp, size, speicher);
 }
 
-void datei::load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo) {
-	taf_dateiheader *header = (taf_dateiheader *)tmp;
-
-	assign_filename(fname, ".taf");
-
-	byte *speicher = hi_sp;
-	if (speicher) {
-		Common::File f;
-		if (f.open(filename)) {
-			if (header->load(&f)) {
-				int16 id = get_id(header->id);
-				if ((id == TAFDATEI) && (header->mode == 19)) {
-					uint32 next = header->next;
-					uint16 anzahl = header->count;
-					uint32 image = 0;
-					for (uint16 sprcount = 0; (sprcount < anzahl) && (!modul); sprcount++) {
-						tinfo->image[sprcount] = speicher;
-						f.seek(next, SEEK_SET);
-						taf_imageheader iheader;
-						if (iheader.load(&f)) {
-							next = iheader.next;
-							image = iheader.image;
-						} else {
-							error("load_full_taf error");
-						}
-						uint16 *abmess = (uint16 *)speicher;
-						abmess[0] = iheader.width;
-						abmess[1] = iheader.height;
-						speicher += 4;
-						uint32 size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
-						int16 komp = iheader.komp;
-
-						f.seek(image, SEEK_SET);
-						read_tbf_image(&f, komp, size, speicher);
-						speicher += size;
-					}
-				} else {
-					error("load_full_taf error");
-				}
-			} else {
-				error("load_full_taf error");
-			}
-
-			f.close();
-		} else {
-			error("load_full_taf error");
-		}
-	} else {
-		error("load_full_taf error");
-	}
-}
-
-void datei::load_korrektur(const char *fname, int16 *sp) {
-	taf_dateiheader *header = (taf_dateiheader *)tmp;
-	assign_filename(fname, ".taf");
-
-	if (sp) {
-		Common::File f;
-		if (f.open(filename)) {
-			if (header->load(&f)) {
-				int16 id = get_id(header->id);
-				if ((id == TAFDATEI) && (header->korrekt > 0)) {
-					f.seek(-((int)(header->count * sizeof(int16) * 2) * header->korrekt), SEEK_END);
-					if ((f.size() - f.pos() / 2) < (int16)(header->count * sizeof(int16) * 2)) {
-						error("load_korrektur error");
-					} else {
-						for (int i = 0; i < header->count * 2; ++i)
-							*sp++ = f.readSint16LE();
-					}
-				} else {
-					error("load_korrektur error");
-				}
-			} else {
-				error("load_korrektur error");
-			}
-
-			f.close();
-		} else {
-			error("load_korrektur error");
-		}
-	} else {
-		error("load_korrektur error");
-	}
-}
-
 void datei::load_tff(const char *fname, byte *speicher) {
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
@@ -274,8 +189,6 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 // void_adr() with type 200
 uint32 datei::size(const char *fname, int16 typ) {
 	uint32 size = 0;
-	tbf_dateiheader *tbfheader = (tbf_dateiheader *)tmp;
-	pcx_header *pcxheader = (pcx_header *)tmp;
 	mod_header *mh = (mod_header *)tmp;
 
 	strncpy(filename, fname, MAXPATH - 5);
@@ -353,69 +266,6 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 	return size;
 }
 
-uint32 datei::get_tafinfo(const char *fname, taf_dateiheader **tafheader) {
-	uint32 size = 0;
-	taf_dateiheader *tdh = (taf_dateiheader *)tmp;
-	*tafheader = tdh;
-
-	assign_filename(fname, ".taf");
-
-	Common::File tafFile;
-	if (tafFile.open(filename)) {
-		if (tdh->load(&tafFile)) {
-			int16 id = get_id(tdh->id);
-			if ((id == TAFDATEI) && (tdh->mode == 19)) {
-				size = tdh->allsize + (((uint32)tdh->count) * 8l);
-
-				size += ((uint32)sizeof(taf_info));
-			} else {
-				error("get_tafinfo error");
-			}
-		} else {
-			error("get_tafinfo error");
-		}
-
-		tafFile.close();
-	} else {
-		error("get_tafinfo error");
-	}
-
-	return size;
-}
-
-// Currently only used for TAF palettes from taf_adr(). Will be removed
-void datei::load_palette(const char *fname, byte *palette) {
-	taf_dateiheader *tafheader = (taf_dateiheader *)tmp;
-
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-
-	Common::File f;
-	if (!strchr(filename, '.')) {
-		strcat(filename, ".taf");
-	}
-
-	if (!modul) {
-		if (f.open(filename)) {
-			if (tafheader->load(&f)) {
-				int16 id = get_id(tafheader->id);
-				if ((id == TAFDATEI) && (tafheader->mode == 19)) {
-					for (uint16 i = 0; i < 768; i++)
-						palette[i] = tafheader->palette[i];
-				} else {
-					error("load_palette error");
-				}
-			} else {
-				error("load_palette error");
-			}
-
-			f.close();
-		} else {
-			error("load_palette error");
-		}
-	}
-}
-
 int16 datei::get_id(char *id_code) {
 	int16 id = -1;
 	if (!(scumm_strnicmp(id_code, "TBF", 3)))
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index b2ff3294e31..c1994d71b64 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -38,14 +38,10 @@ public:
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
 	uint32 load_tmf(Stream *stream, tmf_header *song);
 
-	void load_full_taf(const char *fname, byte *hi_sp, taf_info *tinfo);
-	void load_korrektur(const char *fname, int16 *sp);
 	void load_tff(const char *fname, byte *speicher);
 	void void_load(const char *fname, byte *speicher, uint32 size);
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
-	uint32 get_tafinfo(const char *fname, taf_dateiheader **tafheader);
-	void load_palette(const char *fname, byte *palette);
 
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index b0c79c54179..346d98a28ff 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -23,6 +23,7 @@
 #include "chewy/file.h"
 #include "chewy/global.h"
 #include "chewy/sound.h"
+#include "chewy/resource.h"
 
 namespace Chewy {
 
@@ -158,12 +159,9 @@ detail::detail() {
 		rdi.tvp_index[i] = -1;
 	}
 	direct_taf_ani = OFF;
-	CurrentTaf = nullptr;
 }
 
 detail::~detail() {
-	if (CurrentTaf)
-		chewy_fclose(CurrentTaf);
 	direct_taf_ani = OFF;
 }
 
@@ -238,53 +236,31 @@ void detail::load_taf_tbl(taf_info *fti) {
 		fti = rdi.dptr;
 	}
 
-	if (!modul) {
-		if (fti) {
-			if (CurrentTaf) {
-				for (int16 i = 0; i < MAXDETAILS; i++) {
-					if (rdi.Sinfo[i].SprNr != -1)
-						load_taf_seq(CurrentTaf, rdi.Sinfo[i].SprNr, 1, fti);
-					if (rdi.Ainfo[i].start_ani != -1 &&
-					        rdi.Ainfo[i].end_ani != -1 && !rdi.Ainfo[i].load_flag)
-						load_taf_seq(CurrentTaf, rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
-				}
-			} else {
-				error("load_taf_tbl error");
-			}
+	if (fti) {
+		for (int16 i = 0; i < MAXDETAILS; i++) {
+			if (rdi.Sinfo[i].SprNr != -1)
+				load_taf_seq(rdi.Sinfo[i].SprNr, 1, fti);
+			if (rdi.Ainfo[i].start_ani != -1 &&
+					rdi.Ainfo[i].end_ani != -1 && !rdi.Ainfo[i].load_flag)
+				load_taf_seq(rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
 		}
-	} else {
-		error("load_taf_tbl error");
 	}
 }
 
 taf_info *detail::init_taf_tbl(const char *fname_) {
-	taf_dateiheader *tafheader;
-
 	taf_info *Tt = 0;
+	SpriteResource *res = new SpriteResource(tafname);
+	int16 anz = res->getChunkCount();
+	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
 
-	mem->file->get_tafinfo(fname_, &tafheader);
-	if (!modul) {
-		int16 anz = tafheader->count;
-		byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
-
-		if (!modul) {
-			Tt = (taf_info *)tmp;
-			Tt->anzahl = anz;
-			Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
-			Tt->image = (byte **)(tmp + sizeof(taf_info));
-
-			if (!modul) {
-				mem->file->load_korrektur(fname_, Tt->korrektur);
-				Tt->palette = 0;
-				CurrentTaf = chewy_fopen(fname_, "rb");
-				if (CurrentTaf) {
-					load_sprite_pointer(CurrentTaf);
-				} else {
-					error("init_taf_tbl error");
-				}
-			}
-		}
-	}
+	Tt = (taf_info *)tmp;
+	Tt->anzahl = anz;
+	Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
+	Tt->image = (byte **)(tmp + sizeof(taf_info));
+	memcpy(Tt->korrektur, (byte *)res->getSpriteCorrectionsTable(), Tt->anzahl * 2 * sizeof(int16));
+	Tt->palette = 0;
+
+	delete res;
 
 	return Tt;
 }
@@ -298,11 +274,6 @@ void detail::del_taf_tbl(taf_info *Tt) {
 	}
 	free((char *) Tt->korrektur);
 	free((char *) Tt);
-
-	if (CurrentTaf) {
-		chewy_fclose(CurrentTaf);
-		CurrentTaf = 0;
-	}
 }
 
 void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
@@ -315,38 +286,18 @@ void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 }
 
 void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
-
 	if (!Tt)
 		Tt = rdi.dptr;
 
-	if (CurrentTaf) {
-		load_taf_seq(CurrentTaf, spr_nr, spr_anz, Tt);
-
-	}
-}
-
-void detail::load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz, taf_info *Tt) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-
-	rs->seek(SpritePos[spr_nr], SEEK_SET);
-	for (int16 i = 0; i < spr_anz && !modul; i++) {
-		taf_imageheader iheader;
-		if (iheader.load(rs)) {
-			if (!Tt->image[spr_nr + i]) {
-				uint32 size = iheader.width * iheader.height;
-				Tt->image[spr_nr + i] = (byte *)MALLOC(size + 4l);
-				((int16 *)Tt->image[spr_nr + i])[0] = iheader.width;
-				((int16 *)Tt->image[spr_nr + i])[1] = iheader.height;
+	SpriteResource *res = new SpriteResource(tafname);
 
-				rs->seek(iheader.image, SEEK_SET);
-				mem->file->load_tafmcga(rs, iheader.komp, size, Tt->image[spr_nr + i] + 4l);
-			}
-
-			rs->seek(iheader.next, SEEK_SET);
-		} else {
-			error("load_taf_seq error");
+	for (int16 i = 0; i < spr_anz; i++) {
+		if (!Tt->image[spr_nr + i]) {
+			res->getSpriteData(spr_nr + i, &Tt->image[spr_nr + i], true);
 		}
 	}
+
+	delete res;
 }
 
 void detail::set_static_spr(int16 nr, int16 spr_nr) {
@@ -803,56 +754,9 @@ void detail::set_taf_ani_mem(byte *load_area) {
 }
 
 void detail::load_taf_ani_sprite(int16 nr) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(CurrentTaf);
-
-	if (rs) {
-		rs->seek(SpritePos[nr]);
-
-		taf_imageheader iheader;
-		if (iheader.load(rs)) {
-			int32 size = (int32)iheader.width * (int32)iheader.height;
-			((int16 *)taf_load_buffer)[0] = iheader.width;
-			((int16 *)taf_load_buffer)[1] = iheader.height;
-
-			rs->seek(iheader.image);
-			if (taf_load_buffer)
-				mem->file->load_tafmcga(rs, iheader.komp, size, taf_load_buffer + 4l);
-			else {
-				error("load_taf_ani_sprite error");
-			}
-		} else {
-			error("load_taf_ani_sprite error");
-		}
-	} else {
-		error("load_taf_ani_sprite error");
-	}
-}
-
-void detail::load_sprite_pointer(Stream *stream) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-
-	if (rs) {
-		rs->seek(0, SEEK_SET);
-
-		taf_dateiheader header;
-		if (header.load(rs)) {
-			uint16 anzahl = header.count;
-			rs->seek(header.next, SEEK_SET);
-			SpritePos[0] = header.next;
-			assert(anzahl < MAXSPRITE);
-
-			for (int16 i = 1; i < anzahl && !modul; i++) {
-				taf_imageheader iheader;
-				if (!iheader.load(rs)) {
-					error("load_sprite_pointer error");
-				}
-				SpritePos[i] = iheader.next;
-				rs->seek(iheader.next, SEEK_SET);
-			}
-		} else {
-			error("load_sprite_pointer error");
-		}
-	}
+	SpriteResource *res = new SpriteResource(tafname);
+	res->getSpriteData(nr, &taf_load_buffer, false);
+	delete res;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 21020030031..c0161b14fdc 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -278,8 +278,6 @@ private:
 	char tafname[80];
 	byte *taf_load_buffer;
 	int16 direct_taf_ani;
-	Stream *CurrentTaf;
-	uint32 SpritePos[MAXSPRITE];
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index ca35c1e761a..dafba3bb145 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -256,7 +256,6 @@ AutoMov auto_mov[MAX_AUTO_MOV];
 
 int16 HowardMov;
 
-Stream *spz_taf_handle;
 taf_seq_info *spz_tinfo;
 int16 SpzDelay;
 int16 spz_spr_nr[MAX_SPZ_PHASEN];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c6d4afabaa6..4ba7ccb84ba 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -258,7 +258,6 @@ extern taf_seq_info *PersonTaf[MAX_PERSON];
 extern uint8 PersonSpr[MAX_PERSON][8];
 
 extern int16 SpzDelay;
-extern Stream *spz_taf_handle;
 extern taf_seq_info *spz_tinfo;
 extern int16 spz_spr_nr[MAX_SPZ_PHASEN];
 extern int16 spz_start;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 4fc486899d3..e8e5bd1e6a2 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -309,8 +309,6 @@ void init_load() {
 	AkChewyTaf = 0;
 	load_chewy_taf(CHEWY_NORMAL);
 
-	spz_taf_handle = room->open_handle(CH_SPZ_FILE, "rb", R_SPEZTAF);
-
 	spz_akt_id = -1;
 	spz_tinfo = nullptr;
 	set_spz_delay(3);
@@ -384,7 +382,6 @@ void sound_init() {
 	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
 
 	music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
-	det->set_sound_area(Ci.SoundSlot, SOUND_SLOT_SIZE);
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
 	assert(rs);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 35c6ef7749e..26f6c2d91a8 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -22,6 +22,7 @@
 #include "common/memstream.h"
 #include "chewy/memory.h"
 #include "chewy/types.h"
+#include "chewy/resource.h"
 
 namespace Chewy {
 
@@ -35,48 +36,38 @@ memory::~memory() {
 }
 
 taf_info *memory::taf_adr(const char *filename) {
-	uint32 size;
-	int16 anz_image = 0;
-	uint32 kgroesse;
-	byte *tempptr, *tmp1;
+	SpriteResource *res = new SpriteResource(filename);
+	int32 imageCount = res->getChunkCount();
+	uint32 size = res->getAllSize() + imageCount * 8 + sizeof(taf_info);
+	uint32 kgroesse = imageCount * sizeof(byte *);
+	byte *imgPtr, *tmp1;
 	taf_info *tinfo = nullptr;
-	taf_dateiheader *tafheader;
-	tafheader = 0;
-
-	size = file->get_tafinfo(filename, &tafheader);
-	kgroesse = 0l;
-	if (!modul) {
-		anz_image = tafheader->count;
-		kgroesse = ((uint32)anz_image) * sizeof(byte *);
 
-		tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
-		if (!modul) {
-			tinfo = (taf_info *)tmp1;
-			tinfo->image = (byte **)(tmp1 + sizeof(taf_info));
-			tinfo->palette = tmp1 + size;
-			tinfo->anzahl = anz_image;
-			file->load_palette(filename, tinfo->palette);
-			if (!modul) {
-				tempptr = tmp1 + (((uint32)sizeof(taf_info)) + kgroesse);
-				file ->load_full_taf(filename, tempptr, tinfo);
-				tinfo->korrektur = (int16 *)(tmp1 + (size + 768l));
-				file ->load_korrektur(filename, tinfo->korrektur);
-			}
-			if (modul)
-				free(tmp1);
-		} else {
-			fcode = NOSPEICHER;
-			modul = SPEICHER;
-			tinfo = nullptr;
-		}
+	tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
+	tinfo = (taf_info *)tmp1;
+	tinfo->image = (byte **)(tmp1 + sizeof(taf_info));
+	tinfo->palette = tmp1 + size;
+	tinfo->anzahl = imageCount;
+	memcpy(tinfo->palette, res->getSpritePalette(), PALETTE_SIZE);
+	imgPtr = tmp1 + sizeof(taf_info) + kgroesse;
+
+	for (int i = 0; i < imageCount; i++) {
+		tinfo->image[i] = imgPtr;
+		imgPtr += res->getSpriteData(i, &tinfo->image[i], false);
 	}
 
+	tinfo->korrektur = (int16 *)(tmp1 + (size + 768l));
+	memcpy(tinfo->korrektur, res->getSpriteCorrectionsTable(), imageCount * 2 * sizeof(int16));
+
+	delete res;
+
 	return tinfo;
 }
 
-taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
-                                  int16 image_anz) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
+#if 1
+	Common::File *rs = new Common::File();
+	rs->open(CH_SPZ_FILE);
 	taf_dateiheader header;
 	taf_imageheader iheader;
 	taf_seq_info *ts_info = nullptr;
@@ -165,7 +156,47 @@ taf_seq_info *memory::taf_seq_adr(Stream *stream, int16 image_start,
 		error("taf_seq_adr error");
 	}
 
+	delete rs;
+
+	return ts_info;
+#else
+	// TODO: New code - currently crashes with an OOB memory access
+	SpriteResource *res = new SpriteResource(CH_SPZ_FILE);
+	int16 imageCount = res->getChunkCount();
+	uint32 size = 0;
+	taf_seq_info *ts_info = nullptr;
+	byte *tmp1;
+	byte *imgPtr;
+
+	for (int i = 0; i < image_anz; i++) {
+		TAFChunk *sprite = res->getSprite(i + image_start);
+		size += sprite->width * sprite->height;
+		delete sprite;
+	}
+
+	size += image_anz * sizeof(byte *);
+	size += image_anz * sizeof(char *);
+	size += ((uint32)sizeof(taf_seq_info));
+	tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
+
+	ts_info = (taf_seq_info *)tmp1;
+	ts_info->anzahl = image_anz;
+	ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
+	ts_info->korrektur = (int16 *)(tmp1 + size);
+
+	imgPtr = tmp1 + (((uint32)sizeof(taf_seq_info)) + (image_anz * sizeof(char *)));
+
+	for (int i = 0; i < image_anz; i++) {
+		ts_info->image[i] = imgPtr;
+		imgPtr += res->getSpriteData(i, &ts_info->image[i], false);
+	}
+
+	memcpy(ts_info->korrektur, res->getSpriteCorrectionsTable(), image_anz * 2 * sizeof(int16));
+
+	delete res;
+
 	return ts_info;
+#endif
 }
 
 void memory::tff_adr(const char *filename, byte **speicher) {
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index 4c5bf2d08b5..b0620d87047 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -34,8 +34,7 @@ public:
 	void init();
 
 	taf_info *taf_adr(const char *filename);
-	taf_seq_info *taf_seq_adr(Stream *handle, int16 image_start,
-	                          int16 image_anz);
+	taf_seq_info *taf_seq_adr(int16 image_start, int16 image_anz);
 	void tff_adr(const char *filename, byte **speicher);
 	byte *void_adr(const char *filename);
 
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 396900b2a1e..904b0e406bd 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -23,41 +23,6 @@
 
 namespace Chewy {
 
-bool pcx_header::load(Common::SeekableReadStream *src) {
-	id = src->readByte();
-	version = src->readByte();
-	komp = src->readByte();
-	bpp = src->readByte();
-	xmin = src->readSint16LE();
-	ymin = src->readSint16LE();
-	xmax = src->readSint16LE();
-	ymax = src->readSint16LE();
-	hodpi = src->readSint16LE();
-	verdpi = src->readSint16LE();
-	src->read(lcmap, 16 * 3);
-	reserviert = src->readByte();
-	planes = src->readByte();
-	bpz = src->readSint16LE();
-	palinfo = src->readSint16LE();
-	screenx = src->readSint16LE();
-	screeny = src->readSint16LE();
-	src->read(dummy, 54);
-
-	return true;
-}
-
-bool tbf_dateiheader::load(Common::SeekableReadStream *src) {
-	src->read(id, 4);
-	mode = src->readSint16LE();
-	komp = src->readSint16LE();
-	entpsize = src->readUint32LE();
-	width = src->readUint16LE();
-	height = src->readUint16LE();
-	src->read(palette, 768);
-
-	return true;
-}
-
 bool taf_dateiheader::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	mode = src->readSint16LE();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index f6b78890b13..c399a687a93 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -28,44 +28,6 @@
 
 namespace Chewy {
 
-struct pcx_header {
-	int8 id = 0;
-	int8 version = 0;
-	int8 komp = 0;
-	int8 bpp = 0;
-	int16 xmin = 0;
-	int16 ymin = 0;
-	int16 xmax = 0;
-	int16 ymax = 0;
-	int16 hodpi = 0;
-	int16 verdpi = 0;
-	int8 lcmap[16 * 3] = { 0 };
-	int8 reserviert = 0;
-	int8 planes = 0;
-	int16 bpz = 0;
-	int16 palinfo = 0;
-	int16 screenx = 0;
-	int16 screeny = 0;
-	byte dummy[54];
-
-	bool load(Common::SeekableReadStream *src);
-};
-
-struct tbf_dateiheader {
-	char id[4] = { 0 };
-	int16 mode = 0;
-	int16 komp = 0;
-	uint32 entpsize = 0;
-	uint16 width = 0;
-	uint16 height = 0;
-	char palette[768];
-
-	bool load(Common::SeekableReadStream *src);
-	static constexpr int SIZE() {
-		return 4 + 2 + 2 + 4 + 2 + 2 + 768;
-	}
-};
-
 struct taf_dateiheader {
 	char id[4] = { 0 };
 	int16 mode = 0;
@@ -511,9 +473,7 @@ struct CustomInfo {
 	Stream *Handle = nullptr;
 	byte *VirtScreen = 0;
 	byte *TempArea = 0;
-	byte *SoundSlot = 0;
 	byte *MusicSlot = 0;
-	uint32 MaxSoundSize = 0;
 	uint32 MaxMusicSize = 0;
 };
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 580fd519595..ad6bf592e28 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -1025,7 +1025,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 			if (spz_tinfo)
 				free((char *)spz_tinfo);
 			spz_akt_id = ani_id;
-			spz_tinfo = mem->taf_seq_adr(spz_taf_handle, spr_start, spr_anz);
+			spz_tinfo = mem->taf_seq_adr(spr_start, spr_anz);
 		}
 
 		for (i = 0; i < spr_anz; i++) {
@@ -1089,7 +1089,7 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
 		PersonAni[p_nr] = ani_id;
 		if (PersonTaf[p_nr])
 			free((char *)PersonTaf[p_nr]);
-		PersonTaf[p_nr] = mem->taf_seq_adr(spz_taf_handle, ani_start, ani_anz);
+		PersonTaf[p_nr] = mem->taf_seq_adr(ani_start, ani_anz);
 		spieler_vector[p_nr].PhNr = 0;
 		spieler_vector[p_nr].PhAnz = ani_anz;
 	}


Commit: c293beae861d1da9dee1d5702ff756b579da0842
    https://github.com/scummvm/scummvm/commit/c293beae861d1da9dee1d5702ff756b579da0842
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Fix logic of room 31

Changed paths:
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room31.h
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 0596fa71849..686824eb1b1 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -60,7 +60,7 @@ void Room31::surimy_go() {
 			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			auto_mov_obj[SURIMY_OBJ].Mode = true;
-			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
@@ -91,8 +91,11 @@ void Room31::calc_luke() {
 	}
 }
 
-void Room31::open_luke() {
+int16 Room31::open_luke() {
+	int16 action_flag = false;
+	
 	if (!_G(spieler).inv_cur && _G(spieler).R31KlappeZu) {
+		action_flag = true;
 		hide_cur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
@@ -101,10 +104,15 @@ void Room31::open_luke() {
 		calc_luke();
 		show_cur();
 	}
+
+	return action_flag;
 }
 
-void Room31::proc1() {
+int16 Room31::close_luke_proc1() {
+	int16 action_flag = false;
+
 	if (!_G(spieler).inv_cur && !_G(spieler).R31KlappeZu) {
+		action_flag = true;
 		hide_cur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -113,6 +121,21 @@ void Room31::proc1() {
 		calc_luke();
 		show_cur();
 	}
+
+	return action_flag;
+}
+
+void Room31::close_luke_proc3() {
+	if (!_G(spieler).R31KlappeZu) {
+		hide_cur();
+		auto_move(2, P_CHEWY);
+		start_spz_wait(13, 1, false, P_CHEWY);
+		_G(spieler).R31KlappeZu = true;
+		g_engine->_sound->playSound(3);
+		g_engine->_sound->playSound(3, 1, false);
+		calc_luke();
+		show_cur();
+	}
 }
 
 int16 Room31::use_topf() {
@@ -156,7 +179,7 @@ int16 Room31::use_topf() {
 							ani_nr = CH_TALK5;
 							dia_nr = 180;
 						} else {
-							close_luke();
+							close_luke_proc3();
 							auto_move(3, P_CHEWY);
 							flic_cut(FCUT_046, CFO_MODE);
 							register_cutscene(13);
@@ -180,6 +203,7 @@ int16 Room31::use_topf() {
 			dia_nr = 154;
 		}
 	}
+	
 	if (dia_nr != -1) {
 		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
@@ -190,18 +214,5 @@ int16 Room31::use_topf() {
 	return action_flag;
 }
 
-void Room31::close_luke() {
-	if (!_G(spieler).R31KlappeZu) {
-		hide_cur();
-		auto_move(2, P_CHEWY);
-		start_spz_wait(13, 1, false, P_CHEWY);
-		_G(spieler).R31KlappeZu = true;
-		g_engine->_sound->playSound(3);
-		g_engine->_sound->playSound(3, 1, false);
-		calc_luke();
-		show_cur();
-	}
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room31.h b/engines/chewy/rooms/room31.h
index d15683dcab0..5ccdd8e3c45 100644
--- a/engines/chewy/rooms/room31.h
+++ b/engines/chewy/rooms/room31.h
@@ -29,12 +29,12 @@ class Room31 {
 private:
 	static void surimy_go();
 	static void calc_luke();
-	static void close_luke();
+	static void close_luke_proc3();
 
 public:
 	static void entry();
-	static void open_luke();
-	static void proc1();
+	static int16 open_luke();
+	static int16 close_luke_proc1();
 	static int16 use_topf();
 };
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b43c9eb4549..b31b707cf6b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -378,11 +378,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 244:
-						Room31::open_luke();
+						action_ret = Room31::open_luke();
 						break;
 
 					case 245:
-						Room31::proc1();
+						action_ret = Room31::close_luke_proc1();
 						break;
 
 					case 249:


Commit: c715a101b0730ac8c7bb82482a5da6213e043fb3
    https://github.com/scummvm/scummvm/commit/c715a101b0730ac8c7bb82482a5da6213e043fb3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Remove unused methods. Some cleanup

Changed paths:
    engines/chewy/datei.cpp
    engines/chewy/datei.h


diff --git a/engines/chewy/datei.cpp b/engines/chewy/datei.cpp
index eb10ee86c75..22d585826ea 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/datei.cpp
@@ -49,13 +49,6 @@ datei::datei() {
 datei::~datei() {
 }
 
-void datei::assign_filename(const char *fname, const char *ext) {
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
-	if (!strchr(filename, '.'))
-		strcat(filename, ext);
-}
-
 uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	NewPhead *ph = (NewPhead *)tmp;
@@ -79,8 +72,27 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	return nr;
 }
 
-void datei::load_tafmcga(Stream *handle, int16 komp, uint32 size, byte *speicher) {
-	read_tbf_image(handle, komp, size, speicher);
+void datei::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher) {
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
+	assert(rs);
+
+	byte *sp = speicher;
+
+	if (komp == 1) {
+		// Run length encoding using count/value pairs
+		for (uint32 pos = 0; pos < size;) {
+			uint8 count = rs->readByte();
+			uint8 value = rs->readByte();
+
+			for (uint8 i = 0; (i < count) && (pos < size); i++) {
+				sp[pos] = value;
+				++pos;
+			}
+		}
+	} else {
+		rs->read(sp, size);
+		sp += size;
+	}
 }
 
 void datei::load_tff(const char *fname, byte *speicher) {
@@ -110,29 +122,6 @@ void datei::load_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void datei::read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-
-	byte *speicher = sp;
-
-	if (komp == 1) {
-		// Run length encoding using count/value pairs
-		for (uint32 pos = 0; pos < size;) {
-			uint8 count = rs->readByte();
-			uint8 value = rs->readByte();
-
-			for (uint8 i = 0; (i < count) && (pos < size); i++) {
-				speicher[pos] = value;
-				++pos;
-			}
-		}
-	} else {
-		rs->read(speicher, size);
-		speicher += size;
-	}
-}
-
 void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	strncpy(filename, fname, MAXPATH - 1);
 	filename[MAXPATH - 1] = '\0';
diff --git a/engines/chewy/datei.h b/engines/chewy/datei.h
index c1994d71b64..1ab7da5876d 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/datei.h
@@ -28,8 +28,6 @@
 namespace Chewy {
 
 class datei {
-private:
-	void assign_filename(const char *fname, const char *ext);
 public:
 	datei();
 	~datei();


Commit: 0c36a691dee0a42593dc659a83780971f26306e9
    https://github.com/scummvm/scummvm/commit/0c36a691dee0a42593dc659a83780971f26306e9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Fix logic in room 29

Changed paths:
    engines/chewy/rooms/room29.cpp


diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 2eb3af22733..fddbae94bcb 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -22,14 +22,12 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/rooms/room29.h"
 
 namespace Chewy {
 namespace Rooms {
 
-static const AniBlock ABLOCK26[4] = {
-	{ 2, 255, ANI_VOR, ANI_GO, 0 },
+static const AniBlock ABLOCK26[3] = {
 	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
 	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
 	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
@@ -53,8 +51,6 @@ void Room29::entry() {
 	}
 
 	if (_G(spieler).R29AutoSitz) {
-		det->show_static_spr(9);
-
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
 			atds->set_steuer_bit(212, 1, 1);
 		else
@@ -65,19 +61,18 @@ void Room29::entry() {
 }
 
 void Room29::xit() {
-	if (obj->check_inventar(PUMPE_INV)) {
+	if (obj->check_inventar(PUMPE_INV))
 		del_inventar(PUMPE_INV);
-	}
 }
 
 int16 Room29::use_pumpe() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).R29Pumpe) {
-		action_flag = true;
 		hide_cur();
 
 		if (is_cur_inventar(SCHLAUCH_INV)) {
+			action_flag = true;
 			_G(spieler).R29Pumpe = true;
 			_G(spieler).R29Schlauch1 = true;
 			auto_move(1, P_CHEWY);
@@ -86,6 +81,7 @@ int16 Room29::use_pumpe() {
 			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
+			action_flag = true;
 			start_aad_wait(62, -1);
 		}
 
@@ -99,9 +95,13 @@ int16 Room29::get_schlauch() {
 	int16 action_flag = false;
 	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
 		action_flag = true;
+		hide_cur();
+
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		new_invent_2_cur(PUMPE_INV);
+
+		show_cur();
 	}
 	return action_flag;
 }
@@ -141,7 +141,7 @@ void Room29::schlitz_sitz() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		det->hide_static_spr(4);
 		det->show_static_spr(11);
-		start_ani_block(4, ABLOCK26);
+		start_ani_block(3, ABLOCK26);
 		det->show_static_spr(9);
 		det->hide_static_spr(11);
 		det->start_detail(2, 255, ANI_VOR);
@@ -161,6 +161,8 @@ int16 Room29::zaun_sprung() {
 	int16 action_flag = false;
 
 	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
+		hide_cur();
+		
 		action_flag = true;
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -169,8 +171,10 @@ int16 Room29::zaun_sprung() {
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
 
+		show_cur();
 		switch_room(37);
 		_G(spieler).PersonHide[P_CHEWY] = false;
+
 	}
 
 	return action_flag;


Commit: 82b435076fdcd583c2a9611590fbe8b0c7686ca9
    https://github.com/scummvm/scummvm/commit/82b435076fdcd583c2a9611590fbe8b0c7686ca9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Check logic of Room 28

Changed paths:
    engines/chewy/rooms/room28.cpp


diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 0edd7700845..30c79f91812 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -37,6 +37,7 @@ void Room28::entry(int16 eib_nr) {
 
 	if (_G(spieler).R28RKuerbis)
 		det->show_static_spr(6);
+
 	if (_G(spieler).R28Briefkasten) {
 		det->show_static_spr(8);
 		det->show_static_spr(9);
@@ -92,7 +93,7 @@ void Room28::entry(int16 eib_nr) {
 					if (_G(spieler).R40TeilKarte) {
 						haendler();
 					} else {
-						wait_show_screen(50);
+						wait_show_screen(60);
 						start_aad_wait(195, -1);
 					}
 
@@ -144,18 +145,16 @@ void Room28::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	hide_cur();
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
-		if (eib_nr == 69) {
-			SetUpScreenFunc = nullptr;
-			if (!_G(spieler).R28ExitTown) {
-				start_aad_wait(178, -1);
-				_G(spieler).R28ExitTown = true;
-			}
-
-			flags.ExitMov = false;
-			auto_move(6, P_HOWARD);
-			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
+		SetUpScreenFunc = nullptr;
+		if (!_G(spieler).R28ExitTown) {
+			start_aad_wait(178, -1);
+			_G(spieler).R28ExitTown = true;
 		}
+
+		flags.ExitMov = false;
+		auto_move(6, P_HOWARD);
+		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 	}
 
 	show_cur();
@@ -179,7 +178,7 @@ void Room28::haendler() {
 	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
 	det->set_static_ani(2, -1);
 
-	while (_G(spieler).scrollx < SCREEN_WIDTH) {
+	while (_G(spieler).scrollx < 300) {
 		SHOULD_QUIT_RETURN;
 		set_up_screen(DO_SETUP);
 	}
@@ -277,10 +276,7 @@ void Room28::set_pump() {
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
 				stop_person(P_HOWARD);
 				SetUpScreenFunc = nullptr;
-
-				if (_G(spieler).SpeechSwitch) {
-					g_engine->_sound->waitForSpeechToFinish();
-				}
+				g_engine->_sound->waitForSpeechToFinish();
 
 				start_aad_wait(177, -1);
 				SetUpScreenFunc = setup_func;
@@ -300,6 +296,7 @@ void Room28::get_pump() {
 
 	if (_G(spieler).R28ChewyPump) {
 		hide_cur();
+
 		stop_person(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -356,13 +353,8 @@ int16 Room28::cut_serv1(int16 frame) {
 }
 
 int16 Room28::cut_serv2(int16 frame) {
-	if (frame < 23) {
-		if (_G(spieler).R28Briefkasten) {
-			det->plot_static_details(0, 0, 8, 9);
-		} else {
-			det->plot_static_details(0, 0, 7, 7);
-		}
-	}
+	if (frame < 23)
+		cut_serv1(frame);
 
 	return 0;
 }


Commit: 6f67f04200850e0a849f4c0d8774a83a8495f1ca
    https://github.com/scummvm/scummvm/commit/6f67f04200850e0a849f4c0d8774a83a8495f1ca
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Change ailclass to SoundPlayer

Changed paths:
  A engines/chewy/sound_player.cpp
  A engines/chewy/sound_player.h
  R engines/chewy/ailclass.cpp
  R engines/chewy/ailclass.h
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/flic.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/module.mk
    engines/chewy/ngshext.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room68.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 346d98a28ff..761803117e7 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -675,7 +675,7 @@ void detail::clear_detail_sound(int16 nr) {
 void detail::disable_room_sound() {
 	for (int16 i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
-	ailsnd->endSound();
+	sndPlayer->endSound();
 }
 
 void detail::enable_room_sound() {
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index b5f0669a956..7f47abb638e 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -209,8 +209,8 @@ void Cinema::execute() {
 
 int16 Cinema::cut_serv(int16 frame) {
 	if (in->get_switch_code() == ESC) {
-		ailsnd->stopMod();
-		ailsnd->endSound();
+		sndPlayer->stopMod();
+		sndPlayer->endSound();
 		return -1;
 
 	} else {
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 91e81b971a9..f56ef66ea61 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -58,8 +58,8 @@ void MainMenu::execute() {
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
-		ailsnd->stopMod();
-		ailsnd->endSound();
+		sndPlayer->stopMod();
+		sndPlayer->endSound();
 		SetUpScreenFunc = screenFunc;
 
 		cursor_wahl(CUR_ZEIGE);
@@ -268,7 +268,7 @@ void MainMenu::playGame() {
 	cur->show_cur();
 	spieler_vector[P_CHEWY].Count = 0;
 	uhr->reset_timer(0, 0);
-	ailsnd->setLoopMode(_G(spieler).soundLoopMode);
+	sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !main_loop(1)) {
 	}
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 00b04d22f99..c9b0282ab1d 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -181,7 +181,7 @@ void Options::execute(taf_info *ti) {
 			case 5:
 				if (_G(spieler).MusicSwitch) {
 					_G(spieler).MusicSwitch = false;
-					ailsnd->stopMod();
+					sndPlayer->stopMod();
 				} else {
 					_G(spieler).MusicSwitch = true;
 					CurrentSong = -1;
@@ -193,11 +193,11 @@ void Options::execute(taf_info *ti) {
 				break;
 			case 7:
 				_G(spieler).SoundVol = (136 - minfo.y) << 1;
-				ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+				sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
 				break;
 			case 8:
 				_G(spieler).MusicVol = (136 - minfo.y) << 1;
-				ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
+				sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
 				break;
 			}
 			minfo.button = 0;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 1d444ed7190..4c332225381 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -498,7 +498,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->playMod(th);
 #else
-				ailsnd->playMod(th);
+				sndPlayer->playMod(th);
 #endif
 
 			break;
@@ -515,7 +515,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 			snd->stopMod();
 #else
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 #endif
 			break;
 
@@ -525,7 +525,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->getMusicInfo(&mi);
 #else
-				ailsnd->getMusicInfo(&mi);
+				sndPlayer->getMusicInfo(&mi);
 #endif
 			} while (mi.musik_playing != 0);
 			}
@@ -538,7 +538,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->setMusicMasterVol(para[0]);
 #else
-				ailsnd->setMusicMasterVol(para[0]);
+				sndPlayer->setMusicMasterVol(para[0]);
 #endif
 
 			break;
@@ -598,7 +598,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->fadeOut(para[0]);
 #else
-				ailsnd->fadeOut(para[0]);
+				sndPlayer->fadeOut(para[0]);
 #endif
 			break;
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 4ba7ccb84ba..9b4884bd598 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -34,7 +34,7 @@
 #include "chewy/text.h"
 #include "chewy/objekte.h"
 #include "chewy/effect.h"
-#include "chewy/ailclass.h"
+#include "chewy/sound_player.h"
 
 namespace Chewy {
 
@@ -234,7 +234,7 @@ extern effect *fx;
 extern atdsys *atds;
 extern flic *flc;
 extern movclass *mov;
-extern ailclass *ailsnd;
+extern SoundPlayer *sndPlayer;
 
 extern char backged[];
 extern char fname[80];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index e8e5bd1e6a2..e0668fda5f5 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -44,7 +44,7 @@ void standard_init() {
 	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
 	det = new detail();
 	atds = new atdsys();
-	ailsnd = new ailclass();
+	sndPlayer = new SoundPlayer();
 	flc = new flic();
 	mov = new movclass();
 
@@ -330,7 +330,7 @@ void tidy() {
 	delete cur;
 	delete mov;
 	delete flc;
-	delete ailsnd;
+	delete sndPlayer;
 	delete atds;
 	delete det;
 	delete uhr;
@@ -348,7 +348,7 @@ void tidy() {
 	cur = nullptr;
 	mov = nullptr;
 	flc = nullptr;
-	ailsnd = nullptr;
+	sndPlayer = nullptr;
 	atds = nullptr;
 	det = nullptr;
 	uhr = nullptr;
@@ -375,11 +375,11 @@ void sound_init() {
 	_G(spieler).MusicSwitch = false;
 	frequenz = 22050;
 
-	ailsnd->initMixMode();
+	sndPlayer->initMixMode();
 	_G(spieler).MusicVol = 63;
 	_G(spieler).SoundVol = 63;
-	ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
-	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
+	sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
+	sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
 
 	music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 
@@ -403,7 +403,7 @@ void sound_init() {
 }
 
 void sound_exit() {
-	ailsnd->exitMixMode();
+	sndPlayer->exitMixMode();
 }
 
 void show_intro() {
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 9dd0484b5f9..8729604da86 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -177,7 +177,7 @@ void load_room_music(int16 room_nr) {
 		default:
 			ttp_index = -1;
 			CurrentSong = -1;
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			break;
 		}
 		if (ttp_index != -1) {
@@ -185,25 +185,25 @@ void load_room_music(int16 room_nr) {
 				volume = 0;
 			else if (volume > _G(spieler).MusicVol)
 				volume = _G(spieler).MusicVol;
-			ailsnd->setMusicMasterVol(volume);
-			ailsnd->setLoopMode(lp_mode);
+			sndPlayer->setMusicMasterVol(volume);
+			sndPlayer->setLoopMode(lp_mode);
 			if (ttp_index != CurrentSong) {
-				ailsnd->stopMod();
-				while (ailsnd->musicPlaying());
+				sndPlayer->stopMod();
+				while (sndPlayer->musicPlaying());
 				memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
 				mem->file->select_pool_item(music_handle, EndOfPool - ttp_index);
 				mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 				CurrentSong = ttp_index;
 				if (!modul) {
 					if (play_mode == NORMAL_PLAY)
-						ailsnd->playMod((tmf_header *)Ci.MusicSlot);
+						sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
 					else {
-						ailsnd->playMod((tmf_header *)Ci.MusicSlot);
-						ailsnd->stopMod();
+						sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
+						sndPlayer->stopMod();
 						if (play_mode == SEQUENCE_PLAY)
-							ailsnd->playSequence(seq_start, seq_end);
+							sndPlayer->playSequence(seq_start, seq_end);
 						else if (play_mode == PATTERN_PLAY)
-							ailsnd->playPattern(pattern);
+							sndPlayer->playPattern(pattern);
 					}
 				}
 			}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 6e9ac388caa..b1052887f7f 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -56,7 +56,7 @@ io_game *iog;
 mcga_grafik *out;
 cursor *cur;
 #ifdef AIL
-ailclass *ailsnd;
+SoundPlayer *sndPlayer;
 #endif
 
 int16 modul = 0;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index da0f5f20b66..8a9c1576b76 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -1,7 +1,6 @@
 MODULE := engines/chewy
 
 MODULE_OBJS = \
-	ailclass.o \
 	atds.o \
 	chewy.o \
 	cursor.o \
@@ -33,6 +32,7 @@ MODULE_OBJS = \
 	room.o \
 	resource.o \
 	sound.o \
+	sound_player.o \
 	sprite.o \
 	t_event.o \
 	temp_file.o \
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 23b69ad3128..f580f79db02 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -30,7 +30,7 @@
 #include "chewy/cursor.h"
 #include "chewy/flic.h"
 #ifdef AIL
-#include "chewy/ailclass.h"
+#include "chewy/sound_player.h"
 #endif
 
 namespace Chewy {
@@ -46,7 +46,7 @@ extern sblaster *snd;
 extern io_game *iog;
 extern cursor *cur;
 #ifdef AIL
-extern ailclass *ailsnd;
+extern SoundPlayer *sndPlayer;
 #endif
 
 extern uint16 _stklen;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 870e76cc3b4..5a8c70e5e03 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -925,7 +925,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	out->setze_zeiger(nullptr);
 	det->disable_room_sound();
-	ailsnd->endSound();
+	sndPlayer->endSound();
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
@@ -936,7 +936,7 @@ void flic_cut(int16 nr, int16 mode) {
 		switch (nr) {
 		case FCUT_001:
 		case 1000:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			g_engine->playVideo(nr);
 			break;
@@ -952,21 +952,21 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_019_09:
 		case FCUT_019_10:
 		case FCUT_019_11:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			nr = FCUT_019_01;
-			ailsnd->setLoopMode(1);
+			sndPlayer->setLoopMode(1);
 
 			for (i = 0; i < 11; i++) {
 				g_engine->playVideo(FCUT_019_01 + i);
 				SHOULD_QUIT_RETURN;
 			}
 
-			ailsnd->fadeOut(0);
+			sndPlayer->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
-			while (ailsnd->musicPlaying());
-			ailsnd->setLoopMode(_G(spieler).soundLoopMode);
+			while (sndPlayer->musicPlaying());
+			sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
 			break;
 
 		case FCUT_032:
@@ -986,7 +986,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_034:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 
 			do {
@@ -1039,24 +1039,24 @@ void flic_cut(int16 nr, int16 mode) {
 					g_engine->playVideo(FCUT_062);
 				}
 			}
-			ailsnd->fadeOut(0);
+			sndPlayer->fadeOut(0);
 			out->ausblenden(1);
 			out->cls();
-			while (ailsnd->musicPlaying() && !SHOULD_QUIT);
+			while (sndPlayer->musicPlaying() && !SHOULD_QUIT);
 			break;
 
 		case FCUT_065:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
-			ailsnd->setLoopMode(1);
+			sndPlayer->setLoopMode(1);
 			Room46::kloppe();
-			ailsnd->setLoopMode(_G(spieler).soundLoopMode);
+			sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
 			CurrentSong = -1;
 			break;
 
 		case FCUT_071:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			g_engine->playVideo(FCUT_071);
 			break;
@@ -1080,7 +1080,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_112:
-			ailsnd->setMusicMasterVol(32);
+			sndPlayer->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, nr);
 			ret = flc->custom_play(&Ci);
@@ -1090,7 +1090,7 @@ void flic_cut(int16 nr, int16 mode) {
 			playVideo(nr);
 			playVideo(nr);
 #endif
-			ailsnd->setMusicMasterVol(5);
+			sndPlayer->setMusicMasterVol(5);
 			break;
 
 		case FCUT_116:
@@ -1213,7 +1213,7 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(594);
 				if (FLIC_CUT_1045[i] == 53) {
-					ailsnd->stopMod();
+					sndPlayer->stopMod();
 					CurrentSong = -1;
 					load_room_music(256);
 				}
@@ -1227,7 +1227,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 				if (FLIC_CUT_1045[i] == 53) {
-					ailsnd->stopMod();
+					sndPlayer->stopMod();
 				}
 			}
 			break;
@@ -1309,7 +1309,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1058:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
 #ifndef NEW_VIDEO_CODE
@@ -1356,7 +1356,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1065:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
 
@@ -1474,7 +1474,7 @@ void flic_cut(int16 nr, int16 mode) {
 #else
 				playVideo(86);
 #endif
-				ailsnd->stopMod();
+				sndPlayer->stopMod();
 			}
 			break;
 
@@ -1549,10 +1549,10 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1110:
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			CurrentSong = -1;
 			load_room_music(257);
-			ailsnd->setMusicMasterVol(20);
+			sndPlayer->setMusicMasterVol(20);
 #ifndef NEW_VIDEO_CODE
 			mem->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
@@ -1562,7 +1562,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				ailsnd->setMusicMasterVol(63);
+				sndPlayer->setMusicMasterVol(63);
 				fx->spr_blende(workpage, 100, false, 0);
 				mem->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
@@ -1572,7 +1572,7 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->spr_blende(workpage, 100, false, 0);
 			playVideo(112);
 #endif
-			ailsnd->stopMod();
+			sndPlayer->stopMod();
 			break;
 
 		case 1113:
@@ -1631,8 +1631,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 	g_engine->_sound->stopSound();
 	g_events->delay(50);
-	ailsnd->setSoundMasterVol(_G(spieler).SoundVol);
-	ailsnd->setMusicMasterVol(_G(spieler).MusicVol);
+	sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
+	sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index e09cac42e0b..85a5ed2614b 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -34,7 +34,7 @@ void Room43::night_small() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	ailsnd->stopMod();
+	sndPlayer->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
@@ -71,7 +71,7 @@ void Room43::catch_pg() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	ailsnd->stopMod();
+	sndPlayer->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 821d1da0bd2..6ad4fb45c6c 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -174,10 +174,10 @@ void Room46::kloppe() {
 
 	mem->file->select_pool_item(Ci.Handle, 66);
 	flc->custom_play(&Ci);
-	ailsnd->fadeOut(0);
+	sndPlayer->fadeOut(0);
 	out->cls();
 
-	while (ailsnd->musicPlaying() && !SHOULD_QUIT) {
+	while (sndPlayer->musicPlaying() && !SHOULD_QUIT) {
 		EVENTS_UPDATE;
 	}
 }
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index d0efc2b5942..61dfe1f6c92 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -105,7 +105,7 @@ void Room68::setup_func() {
 				g_engine->_sound->playSound(_G(r68HohesC));
 				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
 
-				while (ailsnd->getSampleStatus(1) == 4)
+				while (sndPlayer->getSampleStatus(1) == 4)
 					set_up_screen(DO_SETUP);
 				det->stop_detail(_G(r68HohesC));
 			} else {
@@ -347,7 +347,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		start_aad_wait(389, -1);
 	else {
 		if (_G(spieler).DisplayText == 0)
-			ailsnd->fadeOut(5);
+			sndPlayer->fadeOut(5);
 		
 		SetUpScreenFunc = nullptr;
 		del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/ailclass.cpp b/engines/chewy/sound_player.cpp
similarity index 94%
rename from engines/chewy/ailclass.cpp
rename to engines/chewy/sound_player.cpp
index a757ac6187f..0e100cdf553 100644
--- a/engines/chewy/ailclass.cpp
+++ b/engines/chewy/sound_player.cpp
@@ -22,7 +22,7 @@
 #include "audio/audiostream.h"
 #include "audio/decoders/raw.h"
 #include "chewy/chewy.h"
-#include "chewy/ailclass.h"
+#include "chewy/sound_player.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
 #include "chewy/ngshext.h"
@@ -158,34 +158,34 @@ char *Patterns[128];
 char *CurrentLine;
 int16 StereoPos[8] = {63};
 
-ailclass::ailclass() {
+SoundPlayer::SoundPlayer() {
 	SoundEnable = false;
 	MusicFade = false;
 }
 
-ailclass::~ailclass() {
+SoundPlayer::~SoundPlayer() {
 	warning("STUB: ailclass::~ailclass()");
 }
 
-void ailclass::setMusicMasterVol(int16 vol) {
+void SoundPlayer::setMusicMasterVol(int16 vol) {
 	vol <<= 1;
 	if (vol > 120)
 		vol = 120;
 	MusicMasterVol = vol;
 }
 
-void ailclass::setSoundMasterVol(int16 vol) {
+void SoundPlayer::setSoundMasterVol(int16 vol) {
 	vol <<= 1;
 	if (vol > 120)
 		vol = 120;
 	SoundMasterVol = vol;
 }
 
-void ailclass::disableSound() {
+void SoundPlayer::disableSound() {
 	SoundEnable = false;
 }
 
-void ailclass::initMixMode() {
+void SoundPlayer::initMixMode() {
 	warning("STUB: ailclass::initMixMode()");
 
 	if (SoundEnable) {
@@ -207,7 +207,7 @@ void ailclass::initMixMode() {
 	}
 }
 
-void ailclass::exitMixMode() {
+void SoundPlayer::exitMixMode() {
 	warning("STUB: ailclass::exitMixMode()");
 
 #if 0
@@ -220,7 +220,7 @@ void ailclass::exitMixMode() {
 #endif
 }
 
-void ailclass::playMod(tmf_header *th) {
+void SoundPlayer::playMod(tmf_header *th) {
 	char *tmp;
 	int16 i;
 	ActiveSong = th;
@@ -245,7 +245,7 @@ void ailclass::playMod(tmf_header *th) {
 	}
 }
 
-void ailclass::stopMod() {
+void SoundPlayer::stopMod() {
 	warning("STUB: ailclass::stopMod()");
 
 #if 0
@@ -260,13 +260,13 @@ void ailclass::stopMod() {
 #endif
 }
 
-void ailclass::continueMusic() {
+void SoundPlayer::continueMusic() {
 	if (SoundEnable)
 		if (!strncmp(ActiveSong->id, "TMF", 3))
 			MusicStatus = ON;
 }
 
-void ailclass::playSequence(int16 startPos, int16 endPos) {
+void SoundPlayer::playSequence(int16 startPos, int16 endPos) {
 	if (SoundEnable) {
 		if (!strncmp(ActiveSong->id, "TMF", 3)) {
 			StartPos = startPos;
@@ -280,7 +280,7 @@ void ailclass::playSequence(int16 startPos, int16 endPos) {
 	}
 }
 
-void ailclass::playPattern(int16 pattern) {
+void SoundPlayer::playPattern(int16 pattern) {
 	if (SoundEnable) {
 		if (!strncmp(ActiveSong->id, "TMF", 3)) {
 			StartPos = 0;
@@ -294,20 +294,20 @@ void ailclass::playPattern(int16 pattern) {
 	}
 }
 
-void ailclass::setLoopMode(int16 mode) {
+void SoundPlayer::setLoopMode(int16 mode) {
 	mode &= 1;
 	if (SoundEnable)
 		LoopEnable = mode;
 }
 
-void ailclass::fadeOut(uint16 delay) {
+void SoundPlayer::fadeOut(uint16 delay) {
 	FadeStart = delay;
 	FadeCounter = 0;
 	MusicFade = FADE_OUT;
 	FadeVol = MusicMasterVol;
 }
 
-void ailclass::getMusicInfo(musik_info *mi) {
+void SoundPlayer::getMusicInfo(musik_info *mi) {
 	mi->musik_playing = MusicStatus;
 	mi->play_mode = 0;
 	mi->pattern_line = PatLine;
@@ -315,11 +315,11 @@ void ailclass::getMusicInfo(musik_info *mi) {
 	mi->cur_pattnr = PatPointer;
 }
 
-int16 ailclass::musicPlaying() {
+int16 SoundPlayer::musicPlaying() {
 	return MusicStatus;
 }
 
-int16 ailclass::getSampleStatus(int16 channel) {
+int16 SoundPlayer::getSampleStatus(int16 channel) {
 	warning("STUB: ailclass::getSampleStatus()");
 
 #if 0
@@ -332,7 +332,7 @@ int16 ailclass::getSampleStatus(int16 channel) {
 	return 0;
 }
 
-void ailclass::initNoteTable(uint16 sfreq) {
+void SoundPlayer::initNoteTable(uint16 sfreq) {
 	float TimerFreq;
 	TimerFreq = 7093789.2f;
 	for (int j = 0; j < 16; j++) {
@@ -342,7 +342,7 @@ void ailclass::initNoteTable(uint16 sfreq) {
 	}
 }
 
-void ailclass::endSound() {
+void SoundPlayer::endSound() {
 	warning("STUB: ailclass::endSound()");
 
 #if 0
diff --git a/engines/chewy/ailclass.h b/engines/chewy/sound_player.h
similarity index 93%
rename from engines/chewy/ailclass.h
rename to engines/chewy/sound_player.h
index 58c6513fe15..967dd35703a 100644
--- a/engines/chewy/ailclass.h
+++ b/engines/chewy/sound_player.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_AILCLASS_H
-#define CHEWY_AILCLASS_H
+#ifndef CHEWY_SOUND_PLAYER_H
+#define CHEWY_SOUND_PLAYER_H
 
 #include "audio/mixer.h"
 #include "chewy/ngstypes.h"
@@ -32,10 +32,10 @@ void checkSampleEnd();
 void DecodePatternLine();
 void DecodeChannel(int16 ch);
 
-class ailclass {
+class SoundPlayer {
 public:
-	ailclass();
-	~ailclass();
+	SoundPlayer();
+	~SoundPlayer();
 
 	void setMusicMasterVol(int16 vol);
 	void setSoundMasterVol(int16 vol);


Commit: f3a51b1407c8b169376a57872d1ec67ac9d7566d
    https://github.com/scummvm/scummvm/commit/f3a51b1407c8b169376a57872d1ec67ac9d7566d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Rename object class files

Changed paths:
  A engines/chewy/object.cpp
  A engines/chewy/object.h
  A engines/chewy/object_extra.cpp
  A engines/chewy/object_extra.h
  R engines/chewy/objekt.cpp
  R engines/chewy/objekt.h
  R engines/chewy/objekte.cpp
  R engines/chewy/objekte.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/module.mk
    engines/chewy/room.h
    engines/chewy/types.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index dafba3bb145..29e6e2cb378 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -27,7 +27,7 @@
 #include "chewy/ngshext.h"
 #include "chewy/text.h"
 #include "chewy/room.h"
-#include "chewy/objekte.h"
+#include "chewy/object.h"
 #include "chewy/timer.h"
 #include "chewy/detail.h"
 #include "chewy/effect.h"
@@ -242,7 +242,7 @@ bitclass *bit;
 gedclass *ged;
 text *txt;
 Room *room;
-objekt *obj;
+Object *obj;
 timer *uhr;
 detail *det;
 effect *fx;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 9b4884bd598..72e8a5be692 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -32,7 +32,7 @@
 #include "chewy/gedclass.h"
 #include "chewy/bitclass.h"
 #include "chewy/text.h"
-#include "chewy/objekte.h"
+#include "chewy/object.h"
 #include "chewy/effect.h"
 #include "chewy/sound_player.h"
 
@@ -227,7 +227,7 @@ extern bitclass *bit;
 extern gedclass *ged;
 extern text *txt;
 extern Room *room;
-extern objekt *obj;
+extern Object *obj;
 extern timer *uhr;
 extern detail *det;
 extern effect *fx;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index e0668fda5f5..013490eece4 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -40,7 +40,7 @@ void standard_init() {
 	bit = new bitclass();
 	ged = new gedclass(&ged_user_func);
 	room = new Room();
-	obj = new objekt(&_G(spieler));
+	obj = new Object(&_G(spieler));
 	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
 	det = new detail();
 	atds = new atdsys();
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 8a9c1576b76..46343eaecd4 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -26,8 +26,8 @@ MODULE_OBJS = \
 	metaengine.o \
 	movclass.o \
 	ngstypes.o \
-	objekt.o \
-	objekte.o \
+	object.o \
+	object_extra.o \
 	r_event.o \
 	room.o \
 	resource.o \
diff --git a/engines/chewy/objekte.cpp b/engines/chewy/object.cpp
similarity index 87%
rename from engines/chewy/objekte.cpp
rename to engines/chewy/object.cpp
index f628b1df7cc..d158ca5682c 100644
--- a/engines/chewy/objekte.cpp
+++ b/engines/chewy/object.cpp
@@ -22,7 +22,7 @@
 #include "chewy/defines.h"
 #include "chewy/global.h"
 #include "chewy/ngshext.h"
-#include "chewy/objekte.h"
+#include "chewy/object.h"
 
 namespace Chewy {
 
@@ -57,7 +57,7 @@ static const int16 SIB_ZUSTAND_TBL[] = {
 	32000
 };
 
-objekt::objekt(Spieler *sp) {
+Object::Object(Spieler *sp) {
 	max_inventar_obj = 0;
 	max_static_inventar = 0;
 	max_exit = 0;
@@ -66,10 +66,10 @@ objekt::objekt(Spieler *sp) {
 	Rsi = sp->room_s_obj;
 	Re = sp->room_e_obj;
 }
-objekt::~objekt() {
+Object::~Object() {
 }
 
-int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
+int16 Object::load(const char *fname_, RoomMovObject *rmo) {
 	Common::File f;
 	bool valid = true;
 
@@ -78,9 +78,9 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 			error("objekt::load error");
 		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
-				assert(iib_datei_header.Size % RoomMovObjekt::SIZE() == 0);
+				assert(iib_datei_header.Size % RoomMovObject::SIZE() == 0);
 
-				for (uint i = 0; i < iib_datei_header.Size / RoomMovObjekt::SIZE() && valid;
+				for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid;
 						++i, ++rmo) {
 					valid = rmo->load(&f);
 				}
@@ -88,7 +88,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 				if (!valid) {
 					error("objekt::load error");
 				} else {
-					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObjekt::SIZE();
+					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
 				}
 			} else
 				max_inventar_obj = 0;
@@ -104,7 +104,7 @@ int16 objekt::load(const char *fname_, RoomMovObjekt *rmo) {
 	return max_inventar_obj;
 }
 
-int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
+int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
 	Common::File f;
 	bool valid = true;
 
@@ -136,7 +136,7 @@ int16 objekt::load(const char *fname_, RoomStaticInventar *rsi) {
 	return max_static_inventar;
 }
 
-int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
+int16 Object::load(const char *fname_, RoomExit *RoomEx) {
 	Common::File f;
 	bool valid = true;
 
@@ -168,7 +168,7 @@ int16 objekt::load(const char *fname_, RoomExit *RoomEx) {
 	return max_exit;
 }
 
-void objekt::sort() {
+void Object::sort() {
 	short i;
 	mov_obj_room[0] = 0;
 
@@ -186,7 +186,7 @@ void objekt::sort() {
 	}
 }
 
-void objekt::free_inv_spr(byte **inv_spr_adr) {
+void Object::free_inv_spr(byte **inv_spr_adr) {
 	int16 i;
 	for (i = 0; i < MAX_MOV_OBJ; i++)
 		if (inv_spr_adr[i] != 0) {
@@ -195,7 +195,7 @@ void objekt::free_inv_spr(byte **inv_spr_adr) {
 		}
 }
 
-int16 objekt::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
+int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 i;
 	int16 ret;
 	ret = -1;
@@ -211,7 +211,7 @@ int16 objekt::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 	return ret;
 }
 
-int16 objekt::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
+int16 Object::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 i;
 	int16 ret;
 	ret = -1;
@@ -226,15 +226,15 @@ int16 objekt::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
 	return ret;
 }
 
-int16 objekt::iib_txt_nr(int16 inv_nr) {
+int16 Object::iib_txt_nr(int16 inv_nr) {
 	return Rmo[inv_nr].TxtNr;
 }
 
-int16 objekt::sib_txt_nr(int16 sib_nr) {
+int16 Object::sib_txt_nr(int16 sib_nr) {
 	return Rsi[sib_nr].TxtNr;
 }
 
-int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
+int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 	int16 ret;
 	int16 i, j;
 	int16 ok;
@@ -291,7 +291,7 @@ int16 objekt::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 	return ret;
 }
 
-int16 objekt::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
+int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 	int16 action_flag;
 	int16 i;
 	int16 ok;
@@ -332,22 +332,22 @@ int16 objekt::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 	return action_flag;
 }
 
-void objekt::hide_sib(int16 nr) {
+void Object::hide_sib(int16 nr) {
 	Rsi[nr].HideSib = true;
 }
 
-void objekt::show_sib(int16 nr) {
+void Object::show_sib(int16 nr) {
 	Rsi[nr].HideSib = false;
 }
 
-void objekt::calc_all_static_detail() {
+void Object::calc_all_static_detail() {
 	int16 i;
 	for (i = 0; i < max_static_inventar; i++) {
 		calc_static_detail(i);
 	}
 }
 
-void objekt::calc_static_detail(int16 det_nr) {
+void Object::calc_static_detail(int16 det_nr) {
 	int16 nr;
 	int16 i;
 	int16 n;
@@ -418,7 +418,7 @@ void objekt::calc_static_detail(int16 det_nr) {
 	}
 }
 
-int16 objekt::calc_static_use(int16 nr) {
+int16 Object::calc_static_use(int16 nr) {
 	int16 ret;
 	switch (Rsi[nr].ZustandAk) {
 	case OBJZU_AUF:
@@ -444,7 +444,7 @@ int16 objekt::calc_static_use(int16 nr) {
 	return ret;
 }
 
-int16 objekt::calc_rsi_flip_flop(int16 nr) {
+int16 Object::calc_rsi_flip_flop(int16 nr) {
 	int16 tmp;
 	int16 ret;
 	ret = true;
@@ -467,11 +467,11 @@ int16 objekt::calc_rsi_flip_flop(int16 nr) {
 	return ret;
 }
 
-void objekt::set_rsi_flip_flop(int16 nr, int16 anz) {
+void Object::set_rsi_flip_flop(int16 nr, int16 anz) {
 	Rsi[nr].ZustandFlipFlop = anz;
 }
 
-int16 objekt::calc_rmo_flip_flop(int16 nr) {
+int16 Object::calc_rmo_flip_flop(int16 nr) {
 	int16 tmp;
 	int16 ret;
 	if (Rmo[nr].ZustandFlipFlop > 0) {
@@ -487,7 +487,7 @@ int16 objekt::calc_rmo_flip_flop(int16 nr) {
 	return ret;
 }
 
-int16 objekt::del_obj_use(int16 nr) {
+int16 Object::del_obj_use(int16 nr) {
 	int16 ret;
 	if (Rmo[nr].Del == 1) {
 		Rmo[nr].RoomNr = -1;
@@ -502,20 +502,20 @@ int16 objekt::del_obj_use(int16 nr) {
 	return ret;
 }
 
-void objekt::add_inventar(int16 nr, RaumBlk *Rb) {
+void Object::add_inventar(int16 nr, RaumBlk *Rb) {
 	Player->room_m_obj[nr].RoomNr = 255;
 	sort();
 	room->calc_invent(Rb, Player);
 
 }
 
-void objekt::del_inventar(int16 nr, RaumBlk *Rb) {
+void Object::del_inventar(int16 nr, RaumBlk *Rb) {
 
 	Player->room_m_obj[nr].RoomNr = -1;
 	sort();
 }
 
-void objekt::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
+void Object::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
 	Player->room_m_obj[old_inv].RoomNr = -1;
 	Player->room_m_obj[new_inv].RoomNr = 255;
 	sort();
@@ -523,7 +523,7 @@ void objekt::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
 
 }
 
-void objekt::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
+void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
                           RaumBlk *Rb) {
 
 	++mov_obj_room[0];
@@ -536,7 +536,7 @@ void objekt::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
 	sort();
 }
 
-int16 objekt::check_inventar(int16 nr) {
+int16 Object::check_inventar(int16 nr) {
 	int16 i;
 	int16 ret;
 	ret = false;
@@ -547,7 +547,7 @@ int16 objekt::check_inventar(int16 nr) {
 	return ret;
 }
 
-int16 objekt::is_exit(int16 mouse_x, int16 mouse_y) {
+int16 Object::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 ret;
 	int16 i;
 	ret = -1;
diff --git a/engines/chewy/objekte.h b/engines/chewy/object.h
similarity index 91%
rename from engines/chewy/objekte.h
rename to engines/chewy/object.h
index dc1253d64ce..1630b6fab5b 100644
--- a/engines/chewy/objekte.h
+++ b/engines/chewy/object.h
@@ -19,10 +19,10 @@
  *
  */
 
-#ifndef CHEWY_OBJEKTE_H
-#define CHEWY_OBJEKTE_H
+#ifndef CHEWY_OBJECT_H
+#define CHEWY_OBJECT_H
 
-#include "chewy/objekt.h"
+#include "chewy/object_extra.h"
 
 namespace Chewy {
 
@@ -34,69 +34,41 @@ namespace Chewy {
 #define OBJEKT_1 1
 #define OBJEKT_2 2
 
-class objekt {
-
+class Object {
 public:
-	objekt(Spieler *sp);
-	~objekt();
-
-	short load(const char *fname, RoomMovObjekt *Rmo);
+	Object(Spieler *sp);
+	~Object();
 
+	short load(const char *fname, RoomMovObject *Rmo);
 	int16 load(const char *fname, RoomStaticInventar *Rsi);
-
 	int16 load(const char *fname, RoomExit *RoomEx);
-
 	void sort();
-
 	void free_inv_spr(byte **inv_spr_adr);
-
 	int16 is_sib_mouse(int16 mouse_x, int16 mouse_y);
-
 	int16 is_iib_mouse(int16 mouse_x, int16 mouse_y);
-
 	int16 iib_txt_nr(int16 inv_nr);
-
 	int16 sib_txt_nr(int16 sib_nr);
-
 	int16 action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr);
-
 	int16 action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr);
-
 	void hide_sib(int16 nr);
-
 	void show_sib(int16 nr);
-
 	void calc_all_static_detail();
-
 	void calc_static_detail(int16 det_nr);
-
 	int16 calc_static_use(int16 nr);
-
 	int16 del_obj_use(int16 nr);
-
 	int16 calc_rsi_flip_flop(int16 nr);
-
 	void set_rsi_flip_flop(int16 nr, int16 anz);
-
 	void add_inventar(int16 nr, RaumBlk *Rb);
-
 	void del_inventar(int16 nr, RaumBlk *Rb);
-
 	void change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb);
-
 	void set_inventar(int16 nr, int16 x, int16 y, int16 automov,
 	                  RaumBlk *Rb);
-
 	int16 check_inventar(int16 nr);
-
 	int16 is_exit(int16 mouse_x, int16 mouse_y);
-
 	uint8 mov_obj_room[MAX_MOV_OBJ + 1];
-
 	uint8 spieler_invnr[MAX_MOV_OBJ + 1];
 
 private:
-
 	int16 calc_rmo_flip_flop(int16 nr);
 
 	IibDateiHeader iib_datei_header;
@@ -106,10 +78,9 @@ private:
 	int16 max_static_inventar;
 	int16 max_exit;
 	Spieler *Player;
-	RoomMovObjekt *Rmo;
+	RoomMovObject *Rmo;
 	RoomStaticInventar *Rsi;
 	RoomExit *Re;
-
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/objekt.cpp b/engines/chewy/object_extra.cpp
similarity index 95%
rename from engines/chewy/objekt.cpp
rename to engines/chewy/object_extra.cpp
index a4074a18b17..5cb3270f714 100644
--- a/engines/chewy/objekt.cpp
+++ b/engines/chewy/object_extra.cpp
@@ -19,17 +19,17 @@
  *
  */
 
-#include "chewy/objekt.h"
+#include "chewy/object_extra.h"
 
 namespace Chewy {
 
-bool RoomMovObjekt::load(Common::SeekableReadStream *src) {
+bool RoomMovObject::load(Common::SeekableReadStream *src) {
 	Common::Serializer s(src, nullptr);
 	synchronize(s);
 	return true;
 }
 
-void RoomMovObjekt::synchronize(Common::Serializer &s) {	
+void RoomMovObject::synchronize(Common::Serializer &s) {	
 	s.syncAsSint16LE(RoomNr);
 
 	s.syncAsSint16LE(X);
diff --git a/engines/chewy/objekt.h b/engines/chewy/object_extra.h
similarity index 97%
rename from engines/chewy/objekt.h
rename to engines/chewy/object_extra.h
index a0f7c9ae746..5c523c25929 100644
--- a/engines/chewy/objekt.h
+++ b/engines/chewy/object_extra.h
@@ -19,15 +19,15 @@
  *
  */
 
-#ifndef CHEWY_OBJEKT_H
-#define CHEWY_OBJEKT_H
+#ifndef CHEWY_OBJECT_EXTRA_H
+#define CHEWY_OBJECT_EXTRA_H
 
 #include "common/serializer.h"
 #include "common/stream.h"
 
 namespace Chewy {
 
-struct RoomMovObjekt {
+struct RoomMovObject {
 	int16 RoomNr = 0;
 
 	int16 X = 0;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index fc5a6ff5705..396dcc09036 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -22,7 +22,7 @@
 #ifndef CHEWY_ROOM_H
 #define CHEWY_ROOM_H
 
-#include "chewy/objekt.h"
+#include "chewy/object_extra.h"
 
 namespace Chewy {
 
@@ -60,7 +60,7 @@ struct RaumBlk {
 	const char *DetFile;
 	byte **InvSprAdr;
 
-	RoomMovObjekt *Rmo;
+	RoomMovObject *Rmo;
 
 	RoomStaticInventar *Rsi;
 
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 4001b11e8c0..f2d013801be 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -24,7 +24,7 @@
 
 #include "common/serializer.h"
 #include "chewy/defines.h"
-#include "chewy/objekt.h"
+#include "chewy/object_extra.h"
 #include "chewy/detail.h"
 
 namespace Chewy {
@@ -410,7 +410,7 @@ struct Spieler : public SpielerFlags {
 	int16 CurBreite = 0;
 	int16 CurHoehe = 0;
 
-	RoomMovObjekt room_m_obj[MAX_MOV_OBJ];
+	RoomMovObject room_m_obj[MAX_MOV_OBJ];
 	RoomStaticInventar room_s_obj[MAX_FEST_OBJ];
 	RoomExit room_e_obj[MAX_EXIT];
 	int16 X[MAX_PERSON] = { 0 };


Commit: 16fcf62af98a10af2c2db474bfc0adbe1900515c
    https://github.com/scummvm/scummvm/commit/16fcf62af98a10af2c2db474bfc0adbe1900515c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Renamed datei.cpp to data.cpp

Changed paths:
  A engines/chewy/data.cpp
  A engines/chewy/data.h
  R engines/chewy/datei.cpp
  R engines/chewy/datei.h
    engines/chewy/memory.h
    engines/chewy/module.mk


diff --git a/engines/chewy/datei.cpp b/engines/chewy/data.cpp
similarity index 90%
rename from engines/chewy/datei.cpp
rename to engines/chewy/data.cpp
index 22d585826ea..28dd1e91433 100644
--- a/engines/chewy/datei.cpp
+++ b/engines/chewy/data.cpp
@@ -21,7 +21,7 @@
 
 #include "common/debug.h"
 #include "common/system.h"
-#include "chewy/datei.h"
+#include "chewy/data.h"
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
@@ -43,13 +43,13 @@ uint8 tmp[10000]; // FIXME
 extern int16 modul;
 extern int16 fcode;
 
-datei::datei() {
+Data::Data() {
 }
 
-datei::~datei() {
+Data::~Data() {
 }
 
-uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
+uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	NewPhead *ph = (NewPhead *)tmp;
 
@@ -72,7 +72,7 @@ uint16 datei::select_pool_item(Stream *stream, uint16 nr) {
 	return nr;
 }
 
-void datei::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher) {
+void Data::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
 	assert(rs);
 
@@ -95,7 +95,7 @@ void datei::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher
 	}
 }
 
-void datei::load_tff(const char *fname, byte *speicher) {
+void Data::load_tff(const char *fname, byte *speicher) {
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
 
@@ -122,7 +122,7 @@ void datei::load_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void datei::void_load(const char *fname, byte *speicher, uint32 size) {
+void Data::void_load(const char *fname, byte *speicher, uint32 size) {
 	strncpy(filename, fname, MAXPATH - 1);
 	filename[MAXPATH - 1] = '\0';
 
@@ -138,7 +138,7 @@ void datei::void_load(const char *fname, byte *speicher, uint32 size) {
 	}
 }
 
-uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
+uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead *ch = (ChunkHead *)tmp;
 	uint32 size = 0;
@@ -176,7 +176,7 @@ uint32 datei::load_tmf(Stream *handle, tmf_header *song) {
 // Only used in 2 places, will be removed eventually:
 // tff_adr() with type TFFDATEI
 // void_adr() with type 200
-uint32 datei::size(const char *fname, int16 typ) {
+uint32 Data::size(const char *fname, int16 typ) {
 	uint32 size = 0;
 	mod_header *mh = (mod_header *)tmp;
 
@@ -220,7 +220,7 @@ uint32 datei::size(const char *fname, int16 typ) {
 	return size;
 }
 
-uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
+uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
 	NewPhead *Nph = (NewPhead *)tmp;
 	uint32 size = 0;
 
@@ -255,7 +255,7 @@ uint32 datei::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz
 	return size;
 }
 
-int16 datei::get_id(char *id_code) {
+int16 Data::get_id(char *id_code) {
 	int16 id = -1;
 	if (!(scumm_strnicmp(id_code, "TBF", 3)))
 		id = TBFDATEI;
@@ -269,7 +269,7 @@ int16 datei::get_id(char *id_code) {
 	return id;
 }
 
-void datei::fcopy(const char *d_fname, const char *s_fname) {
+void Data::fcopy(const char *d_fname, const char *s_fname) {
 	assert(!strcmp(d_fname, ADSH_TMP));
 
 	Common::File f;
diff --git a/engines/chewy/datei.h b/engines/chewy/data.h
similarity index 95%
rename from engines/chewy/datei.h
rename to engines/chewy/data.h
index 1ab7da5876d..58c19f9d20c 100644
--- a/engines/chewy/datei.h
+++ b/engines/chewy/data.h
@@ -19,18 +19,18 @@
  *
  */
 
-#ifndef CHEWY_DATEI_H
-#define CHEWY_DATEI_H
+#ifndef CHEWY_DATA_H
+#define CHEWY_DATA_H
 
 #include "chewy/chewy.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
 
-class datei {
+class Data {
 public:
-	datei();
-	~datei();
+	Data();
+	~Data();
 
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index b0620d87047..ded098d5c8c 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -22,7 +22,7 @@
 #ifndef CHEWY_MEMORY_H
 #define CHEWY_MEMORY_H
 
-#include "chewy/datei.h"
+#include "chewy/data.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -38,7 +38,7 @@ public:
 	void tff_adr(const char *filename, byte **speicher);
 	byte *void_adr(const char *filename);
 
-	datei *file;
+	Data *file;
 private:
 
 	uint32 mem_avail;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 46343eaecd4..439451303b5 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -4,7 +4,7 @@ MODULE_OBJS = \
 	atds.o \
 	chewy.o \
 	cursor.o \
-	datei.o \
+	data.o \
 	debugger.o \
 	detail.o \
 	effect.o \


Commit: ecf68aadffa7d9961bd45f3f924f320dec044868
    https://github.com/scummvm/scummvm/commit/ecf68aadffa7d9961bd45f3f924f320dec044868
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:18-08:00

Commit Message:
CHEWY: Rename mcga_grafik to mcga_graphics

Changed paths:
  A engines/chewy/mcga_graphics.cpp
  A engines/chewy/mcga_graphics.h
  R engines/chewy/mcga_grafik.cpp
  R engines/chewy/mcga_grafik.h
    engines/chewy/cursor.h
    engines/chewy/mcga.cpp
    engines/chewy/module.mk


diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 73dcfb19035..129b37ed537 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -22,7 +22,7 @@
 #ifndef CHEWY_CURSOR_H
 #define CHEWY_CURSOR_H
 
-#include "chewy/mcga_grafik.h"
+#include "chewy/mcga_graphics.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 5d7b6fd6acc..9ec54acf49b 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -24,7 +24,7 @@
 #include "chewy/chewy.h"
 #include "chewy/global.h"
 #include "chewy/mcga.h"
-#include "chewy/mcga_grafik.h"
+#include "chewy/mcga_graphics.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/mcga_grafik.cpp b/engines/chewy/mcga_graphics.cpp
similarity index 99%
rename from engines/chewy/mcga_grafik.cpp
rename to engines/chewy/mcga_graphics.cpp
index c4066764a4b..7fac9fc595c 100644
--- a/engines/chewy/mcga_grafik.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -22,7 +22,7 @@
 #include "common/memstream.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
-#include "chewy/mcga_grafik.h"
+#include "chewy/mcga_graphics.h"
 #include "chewy/mcga.h"
 
 namespace Chewy {
diff --git a/engines/chewy/mcga_grafik.h b/engines/chewy/mcga_graphics.h
similarity index 98%
rename from engines/chewy/mcga_grafik.h
rename to engines/chewy/mcga_graphics.h
index 414b78cc7e2..3affa64365d 100644
--- a/engines/chewy/mcga_grafik.h
+++ b/engines/chewy/mcga_graphics.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_MCGA_GRAFIK_H
-#define CHEWY_MCGA_GRAFIK_H
+#ifndef CHEWY_MCGA_GRAPHICS_H
+#define CHEWY_MCGA_GRAPHICS_H
 
 #include "graphics/screen.h"
 #include "chewy/mouse.h"
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 439451303b5..36d76e0afb0 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -20,7 +20,7 @@ MODULE_OBJS = \
 	main.o \
 	mouse.o \
 	mcga.o \
-	mcga_grafik.o \
+	mcga_graphics.o \
 	memory.o \
 	menus.o \
 	metaengine.o \


Commit: 0d2fcd0496f317e27a9c71152e6a67951fb446dd
    https://github.com/scummvm/scummvm/commit/0d2fcd0496f317e27a9c71152e6a67951fb446dd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Rename two classes

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/main.cpp
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/ngshext.h


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 687e232c252..e9c2f9e92b6 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -24,7 +24,7 @@
 
 namespace Chewy {
 
-cursor::cursor(mcga_grafik *iout, maus *iin, cur_blk *curblkp) {
+cursor::cursor(McgaGraphic *iout, InputMgr *iin, cur_blk *curblkp) {
 	out = iout;
 	in = iin;
 	scr_width = scr_w;
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 129b37ed537..a29707ed55e 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -32,7 +32,7 @@ extern int16 scr_w;
 class cursor {
 public:
 	cursor();
-	cursor(mcga_grafik *out, maus *in, cur_blk *curblk);
+	cursor(McgaGraphic *out, InputMgr *in, cur_blk *curblk);
 	~cursor();
 
 	void plot_cur();
@@ -46,8 +46,8 @@ public:
 	void move(int16 x, int16 y);
 	void wait_taste_los(bool maus_plot);
 
-	mcga_grafik *out = nullptr;
-	maus *in = nullptr;
+	McgaGraphic *out = nullptr;
+	InputMgr *in = nullptr;
 	maus_info *minfo = nullptr;
 	in_zeiger *inzeig = nullptr;
 	cur_blk *curblk = nullptr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 013490eece4..097600f2098 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -33,8 +33,8 @@ static void font_load();
 
 void standard_init() {
 	mem = new memory();
-	out = new mcga_grafik();
-	in = new maus();
+	out = new McgaGraphic();
+	in = new InputMgr();
 	fx = new effect();
 	txt = new text();
 	bit = new bitclass();
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 6d94e9b1ed2..c2ca43627ae 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 
 extern int16 scr_w;
 
-io_game::io_game(mcga_grafik *iout, maus *iin, cursor *curp) {
+io_game::io_game(McgaGraphic *iout, InputMgr *iin, cursor *curp) {
 	out = iout;
 	in = iin;
 	cur = curp;
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 3a55f823d39..8e1c3a380da 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -73,7 +73,7 @@ namespace Chewy {
 class io_game {
 
 public:
-	io_game(mcga_grafik *out, maus *in, cursor *curp);
+	io_game(McgaGraphic *out, InputMgr *in, cursor *curp);
 	~io_game();
 
 	int16 io_menu(iog_init *iostruc);
@@ -100,8 +100,8 @@ private:
 
 	void itoa(int N, char *str, int base);
 
-	mcga_grafik *out;
-	maus *in;
+	McgaGraphic *out;
+	InputMgr *in;
 	cursor *cur;
 	iog_init *io;
 	long dklick_start, dklick_end;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index b1052887f7f..881c810337d 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -50,10 +50,10 @@ loudness *music;
 
 #endif
 
-maus *in;
+InputMgr *in;
 memory *mem;
 io_game *iog;
-mcga_grafik *out;
+McgaGraphic *out;
 cursor *cur;
 #ifdef AIL
 SoundPlayer *sndPlayer;
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 7fac9fc595c..a1c350bc216 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -61,7 +61,7 @@ int16 *rlist = 0;
 bool mono = false;
 uint8 svga;
 
-mcga_grafik::mcga_grafik() {
+McgaGraphic::McgaGraphic() {
 	int16 i;
 
 	crlfx = crlfy = 0;
@@ -100,39 +100,39 @@ mcga_grafik::mcga_grafik() {
 	MausMode = false;
 }
 
-mcga_grafik::~mcga_grafik() {
+McgaGraphic::~McgaGraphic() {
 }
 
-void mcga_grafik::init() {
+void McgaGraphic::init() {
 	scr_w = 320;
 	scr_h = 200;
 	init_mcga();
 }
 
-void mcga_grafik::set_writemode(char wm) {
+void McgaGraphic::set_writemode(char wm) {
 	writemode = wm;
 }
 
-void mcga_grafik::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
+void McgaGraphic::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	clipx1 = x1;
 	clipx2 = x2;
 	clipy1 = y1;
 	clipy2 = y2;
 }
 
-void mcga_grafik::setze_zeiger(byte *ptr) {
+void McgaGraphic::setze_zeiger(byte *ptr) {
 	set_pointer(ptr);
 }
 
-byte *mcga_grafik::get_zeiger() {
+byte *McgaGraphic::get_zeiger() {
 	return get_dispoff();
 }
 
-void mcga_grafik::set_mono() {
+void McgaGraphic::set_mono() {
 	mono = true;
 }
 
-void mcga_grafik::calc_mono(byte *pal, int16 startcol, int16 anz) {
+void McgaGraphic::calc_mono(byte *pal, int16 startcol, int16 anz) {
 	int16 i, k;
 	uint8 r, g, b, grau;
 	k = startcol * 3;
@@ -148,7 +148,7 @@ void mcga_grafik::calc_mono(byte *pal, int16 startcol, int16 anz) {
 	}
 }
 
-void mcga_grafik::set_palette(byte *palette) {
+void McgaGraphic::set_palette(byte *palette) {
 	int16 i;
 	for (i = 0; i < 768; i++)
 		pal_table[i] = palette[i];
@@ -157,15 +157,15 @@ void mcga_grafik::set_palette(byte *palette) {
 	setpalette(palette);
 }
 
-void mcga_grafik::palette_save(byte *pal) {
+void McgaGraphic::palette_save(byte *pal) {
 	save_palette(pal);
 }
 
-void mcga_grafik::rest_palette() {
+void McgaGraphic::rest_palette() {
 	restore_palette();
 }
 
-void mcga_grafik::raster_col(int16 c, int16 r, int16 g, int16 b) {
+void McgaGraphic::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	int16 index;
 	index = c * 3;
 	pal_table[index] = r;
@@ -176,7 +176,7 @@ void mcga_grafik::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	rastercol(c, r, g, b);
 }
 
-void mcga_grafik::einblenden(byte *palette, int16 frames) {
+void McgaGraphic::einblenden(byte *palette, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 r1, g1, b1;
@@ -203,7 +203,7 @@ void mcga_grafik::einblenden(byte *palette, int16 frames) {
 	}
 }
 
-void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
+void McgaGraphic::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
                             frames) {
 	int16 i = 0, j, k;
 	int16 r, g, b;
@@ -230,7 +230,7 @@ void mcga_grafik::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stuf
 	}
 }
 
-void mcga_grafik::ausblenden(int16 frames) {
+void McgaGraphic::ausblenden(int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	for (j = 0; j < 64; j++) {
@@ -251,7 +251,7 @@ void mcga_grafik::ausblenden(int16 frames) {
 	}
 }
 
-void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
+void McgaGraphic::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 endcol = 0;
@@ -274,7 +274,7 @@ void mcga_grafik::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frame
 	}
 }
 
-void mcga_grafik::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
+void McgaGraphic::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
 	int16 i;
 	int16 k, endcol;
 	k = startcol * 3;
@@ -290,33 +290,33 @@ void mcga_grafik::set_teilpalette(const byte *palette, int16 startcol, int16 anz
 	set_palpart(pal_table, startcol, anz);
 }
 
-void mcga_grafik::cls() {
+void McgaGraphic::cls() {
 	clear_mcga();
 }
 
-void mcga_grafik::punkt(int16 xpos, int16 ypos, int16 farbn) {
+void McgaGraphic::punkt(int16 xpos, int16 ypos, int16 farbn) {
 	setpixel_mcga(xpos, ypos, farbn);
 }
 
-uint8 mcga_grafik::get_pixel(int16 xpos, int16 ypos) {
+uint8 McgaGraphic::get_pixel(int16 xpos, int16 ypos) {
 	uint8 pix;
 	pix = getpix(xpos, ypos);
 
 	return pix;
 }
 
-void mcga_grafik::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphic::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	line_mcga(x1, y1, x2, y2, farbe);
 }
 
-void mcga_grafik::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphic::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	line_mcga(x1, y1, x2, y1, farbe);
 	line_mcga(x1, y2 - 1, x2, y2 - 1, farbe);
 	line_mcga(x1, y1, x1, y2, farbe);
 	line_mcga(x2, y1, x2, y2, farbe);
 }
 
-void mcga_grafik::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphic::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	int16 h, i;
 	if (x2 == x1)x2++;
 	h = abs(y2 - y1);
@@ -326,7 +326,7 @@ void mcga_grafik::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe)
 		line_mcga(x1, y1 + i, x2, y1 + i, farbe);
 }
 
-void mcga_grafik::pop_box(int16 x, int16 y, int16 x1, int16 y1,
+void McgaGraphic::pop_box(int16 x, int16 y, int16 x1, int16 y1,
                           int16 col1, int16 col2, int16 back_col) {
 	if (back_col < 255)
 		box_fill(x, y, x1, y1, back_col);
@@ -336,7 +336,7 @@ void mcga_grafik::pop_box(int16 x, int16 y, int16 x1, int16 y1,
 	linie(x, y, x, y1 + 1, col1);
 }
 
-void mcga_grafik::kreis(int16 x, int16 y, int16 r, int16 farbe) {
+void McgaGraphic::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, diff;
 	int16 w, i;
 	for (w = 0; w <= 91; w++) {
@@ -359,7 +359,7 @@ void mcga_grafik::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 	}
 }
 
-void mcga_grafik::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
+void McgaGraphic::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, i = 0, diff;
 	int16 w;
 	for (w = 0; w <= 90; w++) {
@@ -378,23 +378,23 @@ void mcga_grafik::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	}
 }
 
-void mcga_grafik::back2screen(byte *ptr) {
+void McgaGraphic::back2screen(byte *ptr) {
 	mem2mcga(ptr);
 }
 
-void mcga_grafik::back2back(byte *ptr1, byte *ptr2) {
+void McgaGraphic::back2back(byte *ptr1, byte *ptr2) {
 	mem2mem(ptr1, ptr2);
 }
 
-void mcga_grafik::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
+void McgaGraphic::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
 	mem2mem_masked(ptr1, ptr2, maske);
 }
 
-void mcga_grafik::screen2back(byte *ptr) {
+void McgaGraphic::screen2back(byte *ptr) {
 	mcga2mem(ptr);
 }
 
-void mcga_grafik::sprite_save(byte *sptr, int16 x,
+void McgaGraphic::sprite_save(byte *sptr, int16 x,
                               int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
 	if (breite < 4)
 		breite = 4;
@@ -420,15 +420,15 @@ void mcga_grafik::sprite_save(byte *sptr, int16 x,
 	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
 }
 
-void mcga_grafik::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void McgaGraphic::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void McgaGraphic::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	spr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
+void McgaGraphic::map_spr2screen(byte *sptr, int16 x, int16 y) {
 	int16 br, h;
 	br = ((int16 *)sptr)[0];
 	h = ((int16 *)sptr)[1];
@@ -436,7 +436,7 @@ void mcga_grafik::map_spr2screen(byte *sptr, int16 x, int16 y) {
 		map_spr_2screen(sptr, x, y);
 }
 
-void mcga_grafik::set_fontadr(byte *adr) {
+void McgaGraphic::set_fontadr(byte *adr) {
 	tff_header *tff = (tff_header *)adr;
 
 	setfont(adr + sizeof(tff_header), tff->width, tff->height,
@@ -445,7 +445,7 @@ void mcga_grafik::set_fontadr(byte *adr) {
 	fvory = 0;
 }
 
-int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
+int16 McgaGraphic::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
                           const char *string, ...) {
 	int16 i, j, stelle, stellemax, mode = 0;
 	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
@@ -877,13 +877,13 @@ int16 mcga_grafik::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	return ret;
 }
 
-void mcga_grafik::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
+void McgaGraphic::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
                                 char cursor_z) {
 	move(x, y);
 	putz(cursor_z, fcol, bcol, scrwidth);
 }
 
-void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
+void McgaGraphic::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
                           const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zstring[35];
@@ -1020,7 +1020,7 @@ void mcga_grafik::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 	} while ((i < MAXSTRING) && (nextChar != 0));
 }
 
-void mcga_grafik::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
+void McgaGraphic::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
                                 int16 scrwidth, const char *string) {
 	int16 i = 0;
 	char zeichen;
@@ -1037,7 +1037,7 @@ void mcga_grafik::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void mcga_grafik::print(int16 fgCol, int16 bgCol, int16 scrwidth,
+void McgaGraphic::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 		const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
@@ -1176,7 +1176,7 @@ void mcga_grafik::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void mcga_grafik::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
+void McgaGraphic::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
                            int16 scrwidth, const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
@@ -1317,7 +1317,7 @@ void mcga_grafik::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 men
 	}
 }
 
-void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
+void McgaGraphic::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
                               int16 scrwidth) {
 	crlfx = x;
 	crlfy = y + fonth + 2;
@@ -1351,7 +1351,7 @@ void mcga_grafik::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16
 	}
 }
 
-void mcga_grafik::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
+void McgaGraphic::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
 	crlfx = gcurx;
 	crlfy = gcury + fonth + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
@@ -1384,40 +1384,40 @@ void mcga_grafik::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwid
 	}
 }
 
-void mcga_grafik::set_vorschub(int16 x, int16 y) {
+void McgaGraphic::set_vorschub(int16 x, int16 y) {
 	if (fvorx != -255)
 		fvorx = x;
 	if (fvory != -255)
 		fvory = y;
 }
 
-void mcga_grafik::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
+void McgaGraphic::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
 	*vorx = fvorx;
 	*vory = fvory;
 	*fntbr = fontbr;
 	*fnth = fonth;
 }
 
-void mcga_grafik::vorschub() {
+void McgaGraphic::vorschub() {
 	vors();
 }
 
-void mcga_grafik::move(int16 x, int16 y) {
+void McgaGraphic::move(int16 x, int16 y) {
 	gcurx = x;
 	gcury = y;
 }
 
-void mcga_grafik::init_mausmode(maus_info *minfo) {
+void McgaGraphic::init_mausmode(maus_info *minfo) {
 	MausMode = true;
 	m_info = minfo;
 }
 
-void mcga_grafik::exit_mausmode() {
+void McgaGraphic::exit_mausmode() {
 	MausMode = false;
 	m_info = nullptr;
 }
 
-int16 mcga_grafik::devices() {
+int16 McgaGraphic::devices() {
 	int16 i;
 	i = 0;
 	if (MausMode != false) {
@@ -1432,7 +1432,7 @@ int16 mcga_grafik::devices() {
 	return i;
 }
 
-int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
+int16 McgaGraphic::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	int16 k, diff;
 	k = 0;
 	while (zstring[k] != 0)
@@ -1452,26 +1452,26 @@ int16 mcga_grafik::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	return diff;
 }
 
-void mcga_grafik::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+void McgaGraphic::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
 	if (xdiff_ || ydiff_)
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
 	else
 		mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void mcga_grafik::init(uint16 mode, byte *info_blk, byte *vscreen) {
+void McgaGraphic::init(uint16 mode, byte *info_blk, byte *vscreen) {
 	if (!get_vesa_info(mode, info_blk)) {
 		init_svga(&vi, vscreen);
 		//g_events->delay(250);
 	}
 }
 
-void mcga_grafik::update_screen() {
+void McgaGraphic::update_screen() {
 	if (svga == ON)
 		upd_scr();
 }
 
-int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
+int16 McgaGraphic::get_vesa_info(uint16 mode, byte *iblk) {
 	int16 error = 0;
 #if 0
 	vesa_status_block *vsb;
@@ -1629,15 +1629,15 @@ int16 mcga_grafik::get_vesa_info(uint16 mode, byte *iblk) {
 	return error;
 }
 
-void mcga_grafik::ltoa(long N, char *str, int base) {
+void McgaGraphic::ltoa(long N, char *str, int base) {
 	sprintf(str, "%ld", N);
 }
 
-void mcga_grafik::ultoa(uint32 N, char *str, int base) {
+void McgaGraphic::ultoa(uint32 N, char *str, int base) {
 	sprintf(str, "%u", N);
 }
 
-void mcga_grafik::itoa(int N, char *str, int base) {
+void McgaGraphic::itoa(int N, char *str, int base) {
 	sprintf(str, "%d", N);
 }
 
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 3affa64365d..c553623b913 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -54,10 +54,10 @@ extern int16 *rlist;
 extern bool mono;
 extern uint8 svga;
 
-class mcga_grafik {
+class McgaGraphic {
 public:
-	mcga_grafik();
-	~mcga_grafik();
+	McgaGraphic();
+	~McgaGraphic();
 
 	void init();
 	void set_writemode(char wm);
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 286cf4a20a4..7792ee34f68 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -45,32 +45,32 @@ void set_mouse_handler(maus_info *mpos) {
 	// No implementation in ScummVM
 }
 
-maus::maus() {
+InputMgr::InputMgr() {
 	maus_info_blk = nullptr;
 	kb_info_blk = nullptr;
 }
 
-maus::~maus() {
+InputMgr::~InputMgr() {
 }
 
-int maus::init() {
+int InputMgr::init() {
 	// ScummVM supports three buttons
 	return 3;
 }
 
-void maus::speed(int16 x, int16 y) {
+void InputMgr::speed(int16 x, int16 y) {
 	// Changing mouse speed isn't supported in ScummVM
 }
 
-void maus::move_mouse(int16 x, int16 y) {
+void InputMgr::move_mouse(int16 x, int16 y) {
 	g_events->warpMouse(Common::Point(x, y));
 }
 
-void maus::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
+void InputMgr::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
 	// Mouse clip rectangle isn't supported in ScummVM
 }
 
-int16 maus::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
+int16 InputMgr::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 	int16 i = -1;
 	for (int16 j = 0; (j < anz * 4) && (i == -1); j += 4) {
 		if ((x >= tbl[j]) && (x <= tbl[j + 2]) && (y >= tbl[j + 1]) && (y <= tbl[j + 3]))
@@ -80,35 +80,35 @@ int16 maus::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 	return i;
 }
 
-void maus::neuer_kb_handler(kb_info *key) {
+void InputMgr::neuer_kb_handler(kb_info *key) {
 	set_new_kb_handler(key);
 	kb_info_blk = key;
 	kb_info_blk->key_code = '\0';
 }
 
-void maus::alter_kb_handler() {
+void InputMgr::alter_kb_handler() {
 	set_old_kb_handler();
 	kb_info_blk = nullptr;
-	warning("STUB - maus::alter_kb_handler");
+	warning("STUB - InputMgr::alter_kb_handler");
 #if 0
 	while (kbhit())
 		getch();
 #endif
 }
 
-void maus::neuer_maushandler(maus_info *mpos) {
+void InputMgr::neuer_maushandler(maus_info *mpos) {
 	set_mouse_handler(mpos);
 	maus_info_blk = mpos;
 }
 
-in_zeiger *maus::get_in_zeiger() {
+in_zeiger *InputMgr::get_in_zeiger() {
 	inzeig.minfo = maus_info_blk;
 	inzeig.kbinfo = kb_info_blk;
 
 	return &inzeig;
 }
 
-int16 maus::get_switch_code() {
+int16 InputMgr::get_switch_code() {
 	int16 switch_code = 0;
 
 	if (maus_info_blk) {
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 7d0740e96a6..7f765f31b42 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -38,10 +38,10 @@ extern bool cur_move;
 extern int16 modul;
 extern int16 fcode;
 
-class maus {
+class InputMgr {
 public:
-	maus();
-	~maus();
+	InputMgr();
+	~InputMgr();
 	int init();
 	void speed(int16 x, int16 y);
 	void move_mouse(int16 x, int16 y);
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index f580f79db02..2998e5637dd 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -39,9 +39,9 @@ namespace Chewy {
 
 class sblaster;
 
-extern mcga_grafik *out;
+extern McgaGraphic *out;
 extern memory *mem;
-extern maus *in;
+extern InputMgr *in;
 extern sblaster *snd;
 extern io_game *iog;
 extern cursor *cur;


Commit: 12c1612ced20dc49d6d385c2b891e142ddec870f
    https://github.com/scummvm/scummvm/commit/12c1612ced20dc49d6d385c2b891e142ddec870f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Room 27 - Review + small fix

Changed paths:
    engines/chewy/rooms/room27.cpp


diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 8516999fa79..14ddf4c6a7a 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -53,13 +53,12 @@ void Room27::xit(int16 eib_nr) {
 			start_detail_wait(2, 1, ANI_VOR);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
-		} else if ((_G(spieler).R27HowardGed < 3) && (eib_nr != -1)) {
+		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
 			++_G(spieler).R27HowardGed;
 			start_aad_wait(174, -1);
 		}
 	}
 
-	_G(spieler).PersonHide[P_HOWARD] = false;
 	show_cur();
 }
 


Commit: 9266a8be9b44b89e3e886a38fec0dafd21cc1aae
    https://github.com/scummvm/scummvm/commit/9266a8be9b44b89e3e886a38fec0dafd21cc1aae
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Review hardcoded logic of Room26, remove duplicate call of playsound and a useless include

Changed paths:
    engines/chewy/rooms/room26.cpp


diff --git a/engines/chewy/rooms/room26.cpp b/engines/chewy/rooms/room26.cpp
index 7598fd6fc62..d55442d3509 100644
--- a/engines/chewy/rooms/room26.cpp
+++ b/engines/chewy/rooms/room26.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/rooms/room26.h"
 #include "chewy/sound.h"
 
@@ -30,12 +29,10 @@ namespace Chewy {
 namespace Rooms {
 
 void Room26::entry() {
-	if (_G(spieler).R25GleiteLoesch) {
+	if (_G(spieler).R25GleiteLoesch)
 		g_engine->_sound->stopSound(0);
-	} else {
+	else
 		g_engine->_sound->playSound(0, 0);
-		g_engine->_sound->playSound(0);
-	}
 }
 
 } // namespace Rooms


Commit: a9af72eacbeedc09d855b0b8479b528d6d74e6af
    https://github.com/scummvm/scummvm/commit/a9af72eacbeedc09d855b0b8479b528d6d74e6af
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Fix logic in Room 25

Changed paths:
    engines/chewy/rooms/room25.cpp


diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 3fce1dfad82..59411360146 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -46,7 +46,6 @@ static const MovLine SURIMY_MPKT[2] = {
 void Room25::entry() {
 	if (!_G(spieler).R25GleiteLoesch) {
 		g_engine->_sound->playSound(0, 0);
-		g_engine->_sound->playSound(0);
 
 		for (int i = 0; i < 9; ++i)
 			det->start_detail(i, 255, ANI_VOR);
@@ -64,7 +63,7 @@ void Room25::entry() {
 			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
 			atds->set_ats_str(113, 0, ATS_DATEI);
 
-			obj->del_inventar(TRANSLATOR_INV, &room_blk);
+			remove_inventory(TRANSLATOR_INV);
 			_G(spieler).inv_cur = false;
 			menu_item = CUR_WALK;
 			_G(spieler).AkInvent = -1;
@@ -82,14 +81,12 @@ void Room25::entry() {
 		start_aad_wait(64, -1);
 		show_cur();
 
-	} else if (_G(spieler).R25GleiterExit) {
-		if (!flags.LoadGame) {
-			set_person_pos(127, 122, P_CHEWY, P_LEFT);
+	} else if (_G(spieler).R25GleiterExit && !flags.LoadGame) {
+		set_person_pos(127, 122, P_CHEWY, P_LEFT);
 
-			if (!_G(spieler).R25SurimyGo) {
-				_G(spieler).R25SurimyGo = 1;
-				xit_gleiter();
-			}
+		if (!_G(spieler).R25SurimyGo) {
+			_G(spieler).R25SurimyGo = 1;
+			xit_gleiter();
 		}
 	}
 
@@ -160,7 +157,7 @@ void Room25::xit_gleiter() {
 		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 		auto_mov_obj[SURIMY_OBJ].Mode = true;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 		fx_blend = BLEND1;
 		set_up_screen(DO_SETUP);
 


Commit: 931db1a86dcda8821d65ed3af4f4a924fd111afd
    https://github.com/scummvm/scummvm/commit/931db1a86dcda8821d65ed3af4f4a924fd111afd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Review logic of Room 24

Changed paths:
    engines/chewy/rooms/room24.cpp


diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 36f07531302..4380486c6ef 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room24.h"
 #include "chewy/sound.h"
@@ -36,10 +35,7 @@ static const uint8 KRISTALL_SPR[3][3] = {
 	{ 13, 14, 20 },
 };
 
-
 void Room24::entry() {
-	int16 i;
-
 	flags.MainInput = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(0, 0, P_CHEWY, -1);
@@ -59,7 +55,7 @@ void Room24::entry() {
 	calc_hebel_spr();
 	calc_animation(255);
 
-	for (i = 0; i < 3; i++) {
+	for (int16 i = 0; i < 3; i++) {
 		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
 			det->start_detail(5 + i * 4, 255, ANI_RUECK);
 	}
@@ -89,9 +85,7 @@ void Room24::use_hebel(int16 txt_nr) {
 	calc_hebel_spr();
 	calc_animation(txt_nr - 161);
 
-	if (_G(spieler).R24Hebel[0] == 1 &&
-			_G(spieler).R24Hebel[1] == 0 &&
-			_G(spieler).R24Hebel[2] == 2) {
+	if (_G(spieler).R24Hebel[0] == 1 && _G(spieler).R24Hebel[1] == 0 && _G(spieler).R24Hebel[2] == 2) {
 		_G(spieler).R16F5Exit = true;
 		g_engine->_sound->playSound(1, 0);
 		g_engine->_sound->stopSound(1);
@@ -110,9 +104,6 @@ void Room24::use_hebel(int16 txt_nr) {
 }
 
 void Room24::calc_hebel_spr() {
-	int16 i;
-	int16 j;
-
 	if (!_G(spieler).R24FirstEntry) {
 		_G(spieler).R24FirstEntry = true;
 		_G(spieler).R24Hebel[0] = 2;
@@ -123,8 +114,8 @@ void Room24::calc_hebel_spr() {
 		_G(spieler).R24HebelDir[2] = 1;
 	}
 
-	for (i = 0; i < 3; i++) {
-		for (j = 0; j < 3; j++)
+	for (int16 i = 0; i < 3; i++) {
+		for (int16 j = 0; j < 3; j++)
 			det->hide_static_spr(1 + j + i * 3);
 
 		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
@@ -133,19 +124,11 @@ void Room24::calc_hebel_spr() {
 }
 
 void Room24::calc_animation(int16 kristall_nr) {
-	int16 i;
-	int16 ani_nr;
-
 	if (kristall_nr != 255) {
 		hide_cur();
 
 		if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
-			if (_G(spieler).R24KristallLast[kristall_nr] == 13) {
-				ani_nr = 7;
-			} else {
-				ani_nr = 8;
-			}
-
+			int16 ani_nr = _G(spieler).R24KristallLast[kristall_nr] == 13 ? 7 : 8;
 			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
 			g_engine->_sound->stopSound(0);
 			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
@@ -154,12 +137,7 @@ void Room24::calc_animation(int16 kristall_nr) {
 			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
 
 		} else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
-			if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13) {
-				ani_nr = 7;
-			} else {
-				ani_nr = 8;
-			}
-
+			int16 ani_nr = KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13 ? 7 : 8;
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(5 + ani_nr + kristall_nr * 4, 0);
 			det->stop_detail(5 + kristall_nr * 4);
@@ -170,9 +148,10 @@ void Room24::calc_animation(int16 kristall_nr) {
 		show_cur();
 	}
 
-	for (i = 0; i < 6; i++)
+	for (int16 i = 0; i < 6; i++)
 		det->hide_static_spr(13 + i);
-	for (i = 0; i < 3; i++) {
+
+	for (int16 i = 0; i < 3; i++) {
 		det->show_static_spr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
 		_G(spieler).R24KristallLast[i] = KRISTALL_SPR[i][_G(spieler).R24Hebel[i]];
 	}


Commit: 5133a4875d9cb61a28bfd5aece1d9461fb661d47
    https://github.com/scummvm/scummvm/commit/5133a4875d9cb61a28bfd5aece1d9461fb661d47
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Fix logic in Room 23

Changed paths:
    engines/chewy/rooms/room23.cpp


diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 6fa522f7b0f..c0bd5ada251 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -47,10 +47,10 @@ void Room23::cockpit() {
 	_G(maus_links_click) = false;
 	switch_room(23);
 
-	if (_G(spieler).R23Cartridge)
-		det->show_static_spr(3);
-	else
+	if (!_G(spieler).R23Cartridge || !_G(spieler).R25GleiteLoesch)
 		det->hide_static_spr(3);
+	else
+		det->show_static_spr(3);
 }
 
 int16 Room23::start_gleiter() {
@@ -67,7 +67,7 @@ int16 Room23::start_gleiter() {
 				if (!_G(spieler).R16F5Exit) {
 					start_ok = false;
 					start_aad_wait(35, -1);
-				} else if ((!_G(spieler).R23Cartridge) || (!_G(spieler).R18CartSave)) {
+				} else if (!_G(spieler).R23Cartridge || !_G(spieler).R18CartSave) {
 					start_ok = false;
 					start_aad_wait(41, -1);
 				} else if (!_G(spieler).R17EnergieOut) {
@@ -87,6 +87,7 @@ int16 Room23::start_gleiter() {
 				if (_G(spieler).R23GleiterExit == 14) {
 					out->setze_zeiger(nullptr);
 					out->cls();
+					flags.NoPalAfterFlc = true;
 					flic_cut(FCUT_012, CFO_MODE);
 					register_cutscene(7);
 					out->cls();
@@ -94,7 +95,7 @@ int16 Room23::start_gleiter() {
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
 
 					switch_room(_G(spieler).R23GleiterExit);
-					start_spz_wait(CH_WONDER1, 1, false, P_CHEWY);
+					start_spz_wait(CH_WONDER1, 2, false, P_CHEWY);
 					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 
 					_G(spieler).DelaySpeed = 10;
@@ -106,8 +107,8 @@ int16 Room23::start_gleiter() {
 					out->setze_zeiger(nullptr);
 					out->cls();
 					flic_cut(FCUT_019_01, CFO_MODE);
-					register_cutscene(9);
 					_G(spieler).R23GleiterExit = 25;
+					register_cutscene(9);
 
 					cur_2_inventory();
 					remove_inventory(5);
@@ -132,7 +133,7 @@ void Room23::use_cartridge() {
 
 	if (_G(spieler).R18CartSave) {
 		atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(111, 1, ATS_DATEI);
+		atds->set_ats_str(111, 2, ATS_DATEI);
 		start_detail_wait(4, 1, ANI_VOR);
 		det->show_static_spr(3);
 	} else {


Commit: 73d99548deb35b7b26b5d2d4a3420debbc435749
    https://github.com/scummvm/scummvm/commit/73d99548deb35b7b26b5d2d4a3420debbc435749
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:19-08:00

Commit Message:
CHEWY: Fix logic in Room 22

Changed paths:
    engines/chewy/rooms/room22.cpp


diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index e219f4393e2..b944d0c4a0b 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -61,9 +61,9 @@ AniBlock ABLOCK14[2] = {
 
 void Room22::entry() {
 	if (!_G(spieler).R22BorkPlatt) {
-		det->load_taf_seq(36, (56 - 36) + 1, nullptr);
+		det->load_taf_seq(36, 21, nullptr);
 		room->set_timer(255, 15);
-	} else if (_G(spieler).R22ChewyPlatt && !_G(spieler).R22GetBork) {
+	} else if (!_G(spieler).R22GetBork) {
 		det->show_static_spr(4);
 	}
 }


Commit: d5591a8aff209f06a7bd086327a3c57ad60f5676
    https://github.com/scummvm/scummvm/commit/d5591a8aff209f06a7bd086327a3c57ad60f5676
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Fix detection table to work with Mass Add properly

Changed paths:
    engines/chewy/detection.cpp


diff --git a/engines/chewy/detection.cpp b/engines/chewy/detection.cpp
index b58de96f9e9..79d3e083b88 100644
--- a/engines/chewy/detection.cpp
+++ b/engines/chewy/detection.cpp
@@ -29,11 +29,6 @@ static const PlainGameDescriptor chewyGames[] = {
 	{nullptr, nullptr}
 };
 
-static const char *directoryGlobs[] = {
-	"txt",
-	nullptr
-};
-
 namespace Chewy {
 
 static const ChewyGameDescription gameDescriptions[] = {
@@ -42,7 +37,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 		{
 			"chewy",
 			nullptr,
-			AD_ENTRY1s("atds.tap", "e6050c144dd4f23d79ea4f89a8ef306e", 218857),
+			AD_ENTRY1s("txt/atds.tap", "e6050c144dd4f23d79ea4f89a8ef306e", 218857),
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
@@ -55,7 +50,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 		{
 			"chewy",
 			nullptr,
-			AD_ENTRY1s("atds.tap", "b1210066a524fe0f88862f44671ed97d", 226988),
+			AD_ENTRY1s("txt/atds.tap", "b1210066a524fe0f88862f44671ed97d", 226988),
 			Common::ES_ESP,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
@@ -67,7 +62,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 		{
 			"chewy",
 			nullptr,
-			AD_ENTRY1s("atds.tap", "c117e884cc5b4bbe50ae1217d13916c4", 231071),
+			AD_ENTRY1s("txt/atds.tap", "c117e884cc5b4bbe50ae1217d13916c4", 231071),
 			Common::DE_DEU,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
@@ -79,7 +74,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 		{
 			"chewy",
 			nullptr,
-			AD_ENTRY1s("atds.tap", "e22f97761c0e7772ec99660f2277b1a4", 231001),
+			AD_ENTRY1s("txt/atds.tap", "e22f97761c0e7772ec99660f2277b1a4", 231001),
 			Common::DE_DEU,
 			Common::kPlatformDOS,
 			ADGF_NO_FLAGS,
@@ -96,7 +91,7 @@ static const ChewyGameDescription gameDescriptions[] = {
 		{
 			"chewy",
 			nullptr,
-			AD_ENTRY1s("atds.tap", "c3be5641e90dd01274309b778cf8146d", 230686),
+			AD_ENTRY1s("txt/atds.tap", "c3be5641e90dd01274309b778cf8146d", 230686),
 			Common::DE_DEU,
 			Common::kPlatformDOS,
 			ADGF_DEMO,
@@ -113,7 +108,7 @@ class ChewyMetaEngineDetection : public AdvancedMetaEngineDetection {
 public:
 	ChewyMetaEngineDetection() : AdvancedMetaEngineDetection(Chewy::gameDescriptions, sizeof(Chewy::ChewyGameDescription), chewyGames) {
 		_maxScanDepth = 2;
-		_directoryGlobs = directoryGlobs;
+		_flags = kADFlagMatchFullPaths;
 	}
 
 	const char *getEngineId() const override {


Commit: 4a129032eec29c05625a85f0b996f20e18a937ab
    https://github.com/scummvm/scummvm/commit/4a129032eec29c05625a85f0b996f20e18a937ab
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Further cleanup of McgaGraphics

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/main.cpp
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/ngshext.h


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index e9c2f9e92b6..91e08a97f2d 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -24,7 +24,7 @@
 
 namespace Chewy {
 
-cursor::cursor(McgaGraphic *iout, InputMgr *iin, cur_blk *curblkp) {
+cursor::cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
 	out = iout;
 	in = iin;
 	scr_width = scr_w;
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index a29707ed55e..5a4ce1575c5 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -32,7 +32,7 @@ extern int16 scr_w;
 class cursor {
 public:
 	cursor();
-	cursor(McgaGraphic *out, InputMgr *in, cur_blk *curblk);
+	cursor(McgaGraphics *out, InputMgr *in, cur_blk *curblk);
 	~cursor();
 
 	void plot_cur();
@@ -46,7 +46,7 @@ public:
 	void move(int16 x, int16 y);
 	void wait_taste_los(bool maus_plot);
 
-	McgaGraphic *out = nullptr;
+	McgaGraphics *out = nullptr;
 	InputMgr *in = nullptr;
 	maus_info *minfo = nullptr;
 	in_zeiger *inzeig = nullptr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 097600f2098..95c7450f8e7 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -33,7 +33,7 @@ static void font_load();
 
 void standard_init() {
 	mem = new memory();
-	out = new McgaGraphic();
+	out = new McgaGraphics();
 	in = new InputMgr();
 	fx = new effect();
 	txt = new text();
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index c2ca43627ae..6a10a81bbf9 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 
 extern int16 scr_w;
 
-io_game::io_game(McgaGraphic *iout, InputMgr *iin, cursor *curp) {
+io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
 	out = iout;
 	in = iin;
 	cur = curp;
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 8e1c3a380da..e1d06e6e8ec 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -73,7 +73,7 @@ namespace Chewy {
 class io_game {
 
 public:
-	io_game(McgaGraphic *out, InputMgr *in, cursor *curp);
+	io_game(McgaGraphics *out, InputMgr *in, cursor *curp);
 	~io_game();
 
 	int16 io_menu(iog_init *iostruc);
@@ -100,7 +100,7 @@ private:
 
 	void itoa(int N, char *str, int base);
 
-	McgaGraphic *out;
+	McgaGraphics *out;
 	InputMgr *in;
 	cursor *cur;
 	iog_init *io;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 881c810337d..b0cd13f8bb9 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -53,7 +53,7 @@ loudness *music;
 InputMgr *in;
 memory *mem;
 io_game *iog;
-McgaGraphic *out;
+McgaGraphics *out;
 cursor *cur;
 #ifdef AIL
 SoundPlayer *sndPlayer;
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index a1c350bc216..47190ff245e 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -27,13 +27,6 @@
 
 namespace Chewy {
 
-#define SETZEN 0
-#define UND 1
-#define ODER 2
-#define XODER 3
-#define GRAFIK 1
-#define SPEICHER 2
-#define DATEI 3
 #define MAXSTRING 255
 
 byte pal_table[PALETTE_SIZE];
@@ -61,7 +54,7 @@ int16 *rlist = 0;
 bool mono = false;
 uint8 svga;
 
-McgaGraphic::McgaGraphic() {
+McgaGraphics::McgaGraphics() {
 	int16 i;
 
 	crlfx = crlfy = 0;
@@ -100,39 +93,39 @@ McgaGraphic::McgaGraphic() {
 	MausMode = false;
 }
 
-McgaGraphic::~McgaGraphic() {
+McgaGraphics::~McgaGraphics() {
 }
 
-void McgaGraphic::init() {
+void McgaGraphics::init() {
 	scr_w = 320;
 	scr_h = 200;
 	init_mcga();
 }
 
-void McgaGraphic::set_writemode(char wm) {
+void McgaGraphics::set_writemode(char wm) {
 	writemode = wm;
 }
 
-void McgaGraphic::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
+void McgaGraphics::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	clipx1 = x1;
 	clipx2 = x2;
 	clipy1 = y1;
 	clipy2 = y2;
 }
 
-void McgaGraphic::setze_zeiger(byte *ptr) {
+void McgaGraphics::setze_zeiger(byte *ptr) {
 	set_pointer(ptr);
 }
 
-byte *McgaGraphic::get_zeiger() {
+byte *McgaGraphics::get_zeiger() {
 	return get_dispoff();
 }
 
-void McgaGraphic::set_mono() {
+void McgaGraphics::set_mono() {
 	mono = true;
 }
 
-void McgaGraphic::calc_mono(byte *pal, int16 startcol, int16 anz) {
+void McgaGraphics::calc_mono(byte *pal, int16 startcol, int16 anz) {
 	int16 i, k;
 	uint8 r, g, b, grau;
 	k = startcol * 3;
@@ -148,7 +141,7 @@ void McgaGraphic::calc_mono(byte *pal, int16 startcol, int16 anz) {
 	}
 }
 
-void McgaGraphic::set_palette(byte *palette) {
+void McgaGraphics::set_palette(byte *palette) {
 	int16 i;
 	for (i = 0; i < 768; i++)
 		pal_table[i] = palette[i];
@@ -157,15 +150,15 @@ void McgaGraphic::set_palette(byte *palette) {
 	setpalette(palette);
 }
 
-void McgaGraphic::palette_save(byte *pal) {
+void McgaGraphics::palette_save(byte *pal) {
 	save_palette(pal);
 }
 
-void McgaGraphic::rest_palette() {
+void McgaGraphics::rest_palette() {
 	restore_palette();
 }
 
-void McgaGraphic::raster_col(int16 c, int16 r, int16 g, int16 b) {
+void McgaGraphics::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	int16 index;
 	index = c * 3;
 	pal_table[index] = r;
@@ -176,7 +169,7 @@ void McgaGraphic::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	rastercol(c, r, g, b);
 }
 
-void McgaGraphic::einblenden(byte *palette, int16 frames) {
+void McgaGraphics::einblenden(byte *palette, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 r1, g1, b1;
@@ -203,7 +196,7 @@ void McgaGraphic::einblenden(byte *palette, int16 frames) {
 	}
 }
 
-void McgaGraphic::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
+void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
                             frames) {
 	int16 i = 0, j, k;
 	int16 r, g, b;
@@ -230,7 +223,7 @@ void McgaGraphic::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stuf
 	}
 }
 
-void McgaGraphic::ausblenden(int16 frames) {
+void McgaGraphics::ausblenden(int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	for (j = 0; j < 64; j++) {
@@ -251,7 +244,7 @@ void McgaGraphic::ausblenden(int16 frames) {
 	}
 }
 
-void McgaGraphic::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
+void McgaGraphics::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 endcol = 0;
@@ -274,7 +267,7 @@ void McgaGraphic::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frame
 	}
 }
 
-void McgaGraphic::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
+void McgaGraphics::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
 	int16 i;
 	int16 k, endcol;
 	k = startcol * 3;
@@ -290,33 +283,33 @@ void McgaGraphic::set_teilpalette(const byte *palette, int16 startcol, int16 anz
 	set_palpart(pal_table, startcol, anz);
 }
 
-void McgaGraphic::cls() {
+void McgaGraphics::cls() {
 	clear_mcga();
 }
 
-void McgaGraphic::punkt(int16 xpos, int16 ypos, int16 farbn) {
+void McgaGraphics::punkt(int16 xpos, int16 ypos, int16 farbn) {
 	setpixel_mcga(xpos, ypos, farbn);
 }
 
-uint8 McgaGraphic::get_pixel(int16 xpos, int16 ypos) {
+uint8 McgaGraphics::get_pixel(int16 xpos, int16 ypos) {
 	uint8 pix;
 	pix = getpix(xpos, ypos);
 
 	return pix;
 }
 
-void McgaGraphic::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphics::linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	line_mcga(x1, y1, x2, y2, farbe);
 }
 
-void McgaGraphic::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphics::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	line_mcga(x1, y1, x2, y1, farbe);
 	line_mcga(x1, y2 - 1, x2, y2 - 1, farbe);
 	line_mcga(x1, y1, x1, y2, farbe);
 	line_mcga(x2, y1, x2, y2, farbe);
 }
 
-void McgaGraphic::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphics::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	int16 h, i;
 	if (x2 == x1)x2++;
 	h = abs(y2 - y1);
@@ -326,7 +319,7 @@ void McgaGraphic::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe)
 		line_mcga(x1, y1 + i, x2, y1 + i, farbe);
 }
 
-void McgaGraphic::pop_box(int16 x, int16 y, int16 x1, int16 y1,
+void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1,
                           int16 col1, int16 col2, int16 back_col) {
 	if (back_col < 255)
 		box_fill(x, y, x1, y1, back_col);
@@ -336,7 +329,7 @@ void McgaGraphic::pop_box(int16 x, int16 y, int16 x1, int16 y1,
 	linie(x, y, x, y1 + 1, col1);
 }
 
-void McgaGraphic::kreis(int16 x, int16 y, int16 r, int16 farbe) {
+void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, diff;
 	int16 w, i;
 	for (w = 0; w <= 91; w++) {
@@ -359,7 +352,7 @@ void McgaGraphic::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 	}
 }
 
-void McgaGraphic::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
+void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, i = 0, diff;
 	int16 w;
 	for (w = 0; w <= 90; w++) {
@@ -378,23 +371,23 @@ void McgaGraphic::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	}
 }
 
-void McgaGraphic::back2screen(byte *ptr) {
+void McgaGraphics::back2screen(byte *ptr) {
 	mem2mcga(ptr);
 }
 
-void McgaGraphic::back2back(byte *ptr1, byte *ptr2) {
+void McgaGraphics::back2back(byte *ptr1, byte *ptr2) {
 	mem2mem(ptr1, ptr2);
 }
 
-void McgaGraphic::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
+void McgaGraphics::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
 	mem2mem_masked(ptr1, ptr2, maske);
 }
 
-void McgaGraphic::screen2back(byte *ptr) {
+void McgaGraphics::screen2back(byte *ptr) {
 	mcga2mem(ptr);
 }
 
-void McgaGraphic::sprite_save(byte *sptr, int16 x,
+void McgaGraphics::sprite_save(byte *sptr, int16 x,
                               int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
 	if (breite < 4)
 		breite = 4;
@@ -420,15 +413,15 @@ void McgaGraphic::sprite_save(byte *sptr, int16 x,
 	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
 }
 
-void McgaGraphic::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void McgaGraphics::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void McgaGraphic::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void McgaGraphics::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	spr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void McgaGraphic::map_spr2screen(byte *sptr, int16 x, int16 y) {
+void McgaGraphics::map_spr2screen(byte *sptr, int16 x, int16 y) {
 	int16 br, h;
 	br = ((int16 *)sptr)[0];
 	h = ((int16 *)sptr)[1];
@@ -436,7 +429,7 @@ void McgaGraphic::map_spr2screen(byte *sptr, int16 x, int16 y) {
 		map_spr_2screen(sptr, x, y);
 }
 
-void McgaGraphic::set_fontadr(byte *adr) {
+void McgaGraphics::set_fontadr(byte *adr) {
 	tff_header *tff = (tff_header *)adr;
 
 	setfont(adr + sizeof(tff_header), tff->width, tff->height,
@@ -445,7 +438,7 @@ void McgaGraphic::set_fontadr(byte *adr) {
 	fvory = 0;
 }
 
-int16 McgaGraphic::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
+int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
                           const char *string, ...) {
 	int16 i, j, stelle, stellemax, mode = 0;
 	int16 disp_stelle = 0, disp_stellemax = 0, disp_akt = 0;
@@ -877,13 +870,13 @@ int16 McgaGraphic::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_co
 	return ret;
 }
 
-void McgaGraphic::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
+void McgaGraphics::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
                                 char cursor_z) {
 	move(x, y);
 	putz(cursor_z, fcol, bcol, scrwidth);
 }
 
-void McgaGraphic::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
+void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
                           const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zstring[35];
@@ -1020,7 +1013,7 @@ void McgaGraphic::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrw
 	} while ((i < MAXSTRING) && (nextChar != 0));
 }
 
-void McgaGraphic::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
+void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
                                 int16 scrwidth, const char *string) {
 	int16 i = 0;
 	char zeichen;
@@ -1037,7 +1030,7 @@ void McgaGraphic::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void McgaGraphic::print(int16 fgCol, int16 bgCol, int16 scrwidth,
+void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 		const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
@@ -1176,7 +1169,7 @@ void McgaGraphic::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void McgaGraphic::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
+void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
                            int16 scrwidth, const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zeichen, zstring[35];
@@ -1317,7 +1310,7 @@ void McgaGraphic::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 men
 	}
 }
 
-void McgaGraphic::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
+void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
                               int16 scrwidth) {
 	crlfx = x;
 	crlfy = y + fonth + 2;
@@ -1351,7 +1344,7 @@ void McgaGraphic::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16
 	}
 }
 
-void McgaGraphic::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
+void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
 	crlfx = gcurx;
 	crlfy = gcury + fonth + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
@@ -1384,40 +1377,40 @@ void McgaGraphic::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwid
 	}
 }
 
-void McgaGraphic::set_vorschub(int16 x, int16 y) {
+void McgaGraphics::set_vorschub(int16 x, int16 y) {
 	if (fvorx != -255)
 		fvorx = x;
 	if (fvory != -255)
 		fvory = y;
 }
 
-void McgaGraphic::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
+void McgaGraphics::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
 	*vorx = fvorx;
 	*vory = fvory;
 	*fntbr = fontbr;
 	*fnth = fonth;
 }
 
-void McgaGraphic::vorschub() {
+void McgaGraphics::vorschub() {
 	vors();
 }
 
-void McgaGraphic::move(int16 x, int16 y) {
+void McgaGraphics::move(int16 x, int16 y) {
 	gcurx = x;
 	gcury = y;
 }
 
-void McgaGraphic::init_mausmode(maus_info *minfo) {
+void McgaGraphics::init_mausmode(maus_info *minfo) {
 	MausMode = true;
 	m_info = minfo;
 }
 
-void McgaGraphic::exit_mausmode() {
+void McgaGraphics::exit_mausmode() {
 	MausMode = false;
 	m_info = nullptr;
 }
 
-int16 McgaGraphic::devices() {
+int16 McgaGraphics::devices() {
 	int16 i;
 	i = 0;
 	if (MausMode != false) {
@@ -1432,7 +1425,7 @@ int16 McgaGraphic::devices() {
 	return i;
 }
 
-int16 McgaGraphic::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
+int16 McgaGraphics::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	int16 k, diff;
 	k = 0;
 	while (zstring[k] != 0)
@@ -1452,26 +1445,26 @@ int16 McgaGraphic::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
 	return diff;
 }
 
-void McgaGraphic::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
+void McgaGraphics::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
 	if (xdiff_ || ydiff_)
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
 	else
 		mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void McgaGraphic::init(uint16 mode, byte *info_blk, byte *vscreen) {
+void McgaGraphics::init(uint16 mode, byte *info_blk, byte *vscreen) {
 	if (!get_vesa_info(mode, info_blk)) {
 		init_svga(&vi, vscreen);
 		//g_events->delay(250);
 	}
 }
 
-void McgaGraphic::update_screen() {
+void McgaGraphics::update_screen() {
 	if (svga == ON)
 		upd_scr();
 }
 
-int16 McgaGraphic::get_vesa_info(uint16 mode, byte *iblk) {
+int16 McgaGraphics::get_vesa_info(uint16 mode, byte *iblk) {
 	int16 error = 0;
 #if 0
 	vesa_status_block *vsb;
@@ -1629,15 +1622,15 @@ int16 McgaGraphic::get_vesa_info(uint16 mode, byte *iblk) {
 	return error;
 }
 
-void McgaGraphic::ltoa(long N, char *str, int base) {
+void McgaGraphics::ltoa(long N, char *str, int base) {
 	sprintf(str, "%ld", N);
 }
 
-void McgaGraphic::ultoa(uint32 N, char *str, int base) {
+void McgaGraphics::ultoa(uint32 N, char *str, int base) {
 	sprintf(str, "%u", N);
 }
 
-void McgaGraphic::itoa(int N, char *str, int base) {
+void McgaGraphics::itoa(int N, char *str, int base) {
 	sprintf(str, "%d", N);
 }
 
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index c553623b913..e6838861404 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -54,10 +54,10 @@ extern int16 *rlist;
 extern bool mono;
 extern uint8 svga;
 
-class McgaGraphic {
+class McgaGraphics {
 public:
-	McgaGraphic();
-	~McgaGraphic();
+	McgaGraphics();
+	~McgaGraphics();
 
 	void init();
 	void set_writemode(char wm);
@@ -127,6 +127,7 @@ public:
 	int16 get_vesa_info(uint16 mode, byte *info_blk);
 	void init(uint16 mode, byte *info_blk, byte *vscreen);
 	void update_screen();
+
 private:
 	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
 	int16 devices();
@@ -136,7 +137,6 @@ private:
 	void ltoa(long N, char *str, int base);
 	void ultoa(uint32 N, char *str, int base);
 	void itoa(int N, char *str, int base);
-
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index 2998e5637dd..e1cb98a558a 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -39,7 +39,7 @@ namespace Chewy {
 
 class sblaster;
 
-extern McgaGraphic *out;
+extern McgaGraphics *out;
 extern memory *mem;
 extern InputMgr *in;
 extern sblaster *snd;


Commit: 0ec95e3487990d759d81c9f1767e43332f4cef6d
    https://github.com/scummvm/scummvm/commit/0ec95e3487990d759d81c9f1767e43332f4cef6d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Refactored mcga_graphics.cpp globals

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/global.h
    engines/chewy/io_game.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index c649eb47da3..e7390c3f9d9 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -108,9 +108,9 @@ atdsys::~atdsys() {
 		free(inv_use_mem);
 }
 
-void atdsys::set_font(byte *font_adr, int16 fvorx_, int16 fhoehe) {
+void atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
 	atdsv.Font = font_adr;
-	atdsv.Fvorx = fvorx_;
+	atdsv.Fvorx = fvorx;
 	atdsv.Fhoehe = fhoehe;
 }
 
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 91e08a97f2d..687eea98410 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -21,13 +21,14 @@
 
 #include "chewy/cursor.h"
 #include "chewy/events.h"
+#include "chewy/global.h"
 
 namespace Chewy {
 
 cursor::cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
 	out = iout;
 	in = iin;
-	scr_width = scr_w;
+	scr_width = _G(scr_w);
 	curblk = curblkp;
 	inzeig = in->get_in_zeiger();
 	if (!inzeig->minfo)
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 5a4ce1575c5..6cf87691d47 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -27,8 +27,6 @@
 
 namespace Chewy {
 
-extern int16 scr_w;
-
 class cursor {
 public:
 	cursor();
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 72e8a5be692..93bcde85a85 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -110,6 +110,11 @@ public:
 	int16 _r65tmp_ho_x = 0;
 	int16 _r65tmp_ho_y = 0;
 	int16 _r68HohesC = 0;
+
+	// mcga_graphics.cpp
+	int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
+	int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
+	int16 _scr_w = 0, _scr_h = SCREEN_HEIGHT;
 };
 
 extern Globals *g_globals;
@@ -297,8 +302,8 @@ void obj_auswerten(int16 test_nr, int16 txt_nr);
 
 void swap_if_l(int16 *x1, int16 *x2);
 
-void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w,
-                char *txtptr);
+void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol,
+	int16 scr_w, char *txtptr);
 
 bool auto_move(int16 mov_nr, int16 p_nr);
 void get_user_key(int16 mode);
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 6a10a81bbf9..fce19045884 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -22,13 +22,12 @@
 #include "common/system.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
+#include "chewy/global.h"
 #include "chewy/file.h"
 #include "chewy/io_game.h"
 
 namespace Chewy {
 
-extern int16 scr_w;
-
 io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
 	out = iout;
 	in = iin;
@@ -80,7 +79,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		in->neuer_kb_handler(kbinfo);
 	else
 		kbinfo = inzeig->kbinfo;
-	scr_width = scr_w << 2;
+	scr_width = _G(scr_w) << 2;
 	d_klick = DOPPEL_KLICK;
 	int16 cur_y1 = io->popy + 4;
 	int16 cur_y = io->popy + 8;
@@ -533,8 +532,8 @@ void io_game::plot_ab_txt(int16 farbe) {
 		out->printxy(io->popx + 146, io->popy + 59 + i * 10, farbe, 300, scr_width, ab_tbl_g[i]);
 }
 
-void io_game::itoa(int N, char *str, int base) {
-	sprintf(str, "%d", N);
+void io_game::itoa(int N, char *s, int base) {
+	sprintf(s, "%d", N);
 }
 
 int16 io_game::get_savegame_files() {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index b0cd13f8bb9..90006a9b7b6 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1232,9 +1232,9 @@ void check_shad(int16 g_idx, int16 mode) {
 	};
 }
 
-void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w_, char *txtptr) {
-	out->printxy(x + 1, y + 1, scol, bcol, scr_w_, txtptr);
-	out->printxy(x, y, fcol, bcol, scr_w_, txtptr);
+void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w, char *txtptr) {
+	out->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
+	out->printxy(x, y, fcol, bcol, scr_w, txtptr);
 }
 
 bool auto_move(int16 mov_nr, int16 p_nr) {
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 9ec54acf49b..310d10ae6c2 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -206,35 +206,35 @@ void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth) {
 }
 
 static bool mspr_set_mcga_clip(int x, int y, int pitch, int &width, int &height, const byte *&srcP, byte *&destP) {
-	if (y < clipy1) {
-		int yDiff = ABS(clipy1 - y);
+	if (y < _G(clipy1)) {
+		int yDiff = ABS(_G(clipy1) - y);
 		height -= yDiff;
 		srcP += yDiff * width;
-		y = clipy1;
+		y = _G(clipy1);
 	}
 	if (height < 1)
 		return false;
 
-	if (x < clipx1) {
-		int xDiff = ABS(clipx1 - x);
+	if (x < _G(clipx1)) {
+		int xDiff = ABS(_G(clipx1) - x);
 		width -= xDiff;
 		srcP += xDiff;
-		x = clipx1;
+		x = _G(clipx1);
 	}
 	if (width < 1)
 		return false;
 
 	int x2 = x + width;
-	if (x2 > clipx2) {
-		int xDiff = x2 - clipx2;
+	if (x2 > _G(clipx2)) {
+		int xDiff = x2 - _G(clipx2);
 		width -= xDiff;
 	}
 	if (width <= 1)
 		return false;
 
 	int y2 = y + height;
-	if (y2 > clipy2) {
-		int yDiff = y2 - clipy2;
+	if (y2 > _G(clipy2)) {
+		int yDiff = y2 - _G(clipy2);
 		height -= yDiff;
 	}
 	if (height < 1)
@@ -288,8 +288,8 @@ void upd_scr() {
 }
 
 void vors() {
-	gcurx += fvorx;
-	gcury += fvory;
+	_G(gcurx) += _G(fvorx);
+	_G(gcury) += _G(fvory);
 }
 
 void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
@@ -322,7 +322,7 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 }
 
 void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
-	putcxy(gcurx, gcury, c, fgCol, bgCol, scrWidth);
+	putcxy(_G(gcurx), _G(gcury), c, fgCol, bgCol, scrWidth);
 }
 
 void init_svga(VesaInfo *vi_, byte *virt_screen) {
@@ -362,8 +362,8 @@ static void setYVals() {
 }
 
 void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
-	if (y < clipy1) {
-		int yCount = clipy1 - y;
+	if (y < _G(clipy1)) {
+		int yCount = _G(clipy1) - y;
 		spriteDeltaY2 -= yCount;
 
 		--yCount;
@@ -385,8 +385,8 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 		return;
 	}
 
-	if (x < clipx1) {
-		int xCount = clipx1 - x;
+	if (x < _G(clipx1)) {
+		int xCount = _G(clipx1) - x;
 		spriteDeltaX2 -= xCount;
 		dest += xCount;
 
@@ -404,14 +404,14 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 
 	if (spriteDeltaX2 > 0) {
 		int x2 = x + spriteDeltaX2;
-		if (x2 >= clipx2) {
-			spriteDeltaX2 -= x2 - clipx2;
+		if (x2 >= _G(clipx2)) {
+			spriteDeltaX2 -= x2 - _G(clipx2);
 		}
 
 		if (spriteDeltaY2 > 0) {
 			int y2 = y + spriteDeltaY2;
-			if (y2 >= clipy2) {
-				spriteDeltaY2 -= y2 - clipy2;
+			if (y2 >= _G(clipy2)) {
+				spriteDeltaY2 -= y2 - _G(clipy2);
 			}
 			if (spriteDeltaY2 <= 0)
 				source = nullptr;
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 47190ff245e..a2939f796a3 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -22,6 +22,7 @@
 #include "common/memstream.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
+#include "chewy/global.h"
 #include "chewy/mcga_graphics.h"
 #include "chewy/mcga.h"
 
@@ -29,88 +30,33 @@ namespace Chewy {
 
 #define MAXSTRING 255
 
-byte pal_table[PALETTE_SIZE];
-
-int16 FuNr;
-real_regs rr;
-real_regs *rp = &rr;
-maus_info *m_info;
 VesaInfo vi;
 
-int16 clipx1, clipx2, clipy1, clipy2;
-int16 gcurx, gcury, fvorx, fvory;
-int16 fontbr, fonth;
-int16 scr_w, scr_h;
-char writemode;
-
-char MausMode;
-char enter_key;
-char escape_key;
-char einfuegen = 0;
-
-int16 crlfx = 0, crlfy = 0;
-int16 r_gef = -1, r_end = false;
-int16 *rlist = 0;
-bool mono = false;
-uint8 svga;
-
 McgaGraphics::McgaGraphics() {
-	int16 i;
-
-	crlfx = crlfy = 0;
-	r_gef = -1;
-	r_end = false;
-	rlist = 0;
-	mono = false;
-	svga = 0;
-
-#if 0
-	char *enstr;
-
-	char a[] = {92, 85, 97, 59, 96, 83, 100, 83, 79, 90, 0}; // "NGS-REVEAL"
-	char b[] = {85, 96, 79, 94, 86, 87, 81, 97, 109, 82, 96, 87, 100, 83, 96, 109,
-		54, 81, 55, 109, 92, 83, 101, 109, 85, 83, 92, 83, 96, 79, 98, 87, 93, 92,
-		109, 97, 93, 84, 98, 101, 79, 96, 83, 0 }; // "GRAPHICS_DRIVER_(C)_NEW_GENERATION_SOFTWARE"
-	for (i = 0; a[i] != 0; i++)
-		a[i] -= 14;
-	for (i = 0; b[i] != 0; i++)
-		b[i] -= 14;
-	enstr = (char *)getenv(a);
-	if (enstr) {
-		printf(b);
-		printf("\n");
-		g_events->delay(800);
-	}
-#endif
-
-	for (i = 0; i < 360; i++) {
+	for (int i = 0; i < 360; i++) {
 		sinus[i] = sin(i * 3.14159265359 / 180);
 		cosinus[i] = cos(i * 3.14159265359 / 180);
 	}
-	scr_w = 0;
-	scr_h = 200;
-	mono = false;
-	MausMode = false;
 }
 
 McgaGraphics::~McgaGraphics() {
 }
 
 void McgaGraphics::init() {
-	scr_w = 320;
-	scr_h = 200;
+	_G(scr_w) = SCREEN_WIDTH;
+	_G(scr_h) = SCREEN_HEIGHT;
 	init_mcga();
 }
 
 void McgaGraphics::set_writemode(char wm) {
-	writemode = wm;
+	_writeMode = wm;
 }
 
 void McgaGraphics::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
-	clipx1 = x1;
-	clipx2 = x2;
-	clipy1 = y1;
-	clipy2 = y2;
+	_G(clipx1) = x1;
+	_G(clipx2) = x2;
+	_G(clipy1) = y1;
+	_G(clipy2) = y2;
 }
 
 void McgaGraphics::setze_zeiger(byte *ptr) {
@@ -122,7 +68,7 @@ byte *McgaGraphics::get_zeiger() {
 }
 
 void McgaGraphics::set_mono() {
-	mono = true;
+	_mono = true;
 }
 
 void McgaGraphics::calc_mono(byte *pal, int16 startcol, int16 anz) {
@@ -144,8 +90,8 @@ void McgaGraphics::calc_mono(byte *pal, int16 startcol, int16 anz) {
 void McgaGraphics::set_palette(byte *palette) {
 	int16 i;
 	for (i = 0; i < 768; i++)
-		pal_table[i] = palette[i];
-	if (mono)
+		_palTable[i] = palette[i];
+	if (_mono)
 		calc_mono(palette, 0, 256);
 	setpalette(palette);
 }
@@ -161,11 +107,11 @@ void McgaGraphics::rest_palette() {
 void McgaGraphics::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	int16 index;
 	index = c * 3;
-	pal_table[index] = r;
-	pal_table[index + 1] = g;
-	pal_table[index + 2] = b;
-	if (mono)
-		calc_mono(pal_table, c, 1);
+	_palTable[index] = r;
+	_palTable[index + 1] = g;
+	_palTable[index + 2] = b;
+	if (_mono)
+		calc_mono(_palTable, c, 1);
 	rastercol(c, r, g, b);
 }
 
@@ -173,7 +119,7 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 	int16 i, j, k;
 	int16 r, g, b;
 	int16 r1, g1, b1;
-	if (mono)
+	if (_mono)
 		calc_mono(palette, 0, 256);
 	for (j = 63; j >= 0; j--) {
 		k = 0;
@@ -185,14 +131,14 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 			g1 = g - j;
 			b1 = b - j;
 			if ((r1 > 0) && (r1 <= r))
-				pal_table[k] = r1;
+				_palTable[k] = r1;
 			if ((g1 > 0) && (r1 <= r))
-				pal_table[k + 1] = g1;
+				_palTable[k + 1] = g1;
 			if ((b1 > 0) && (r1 <= r))
-				pal_table[k + 2] = b1;
+				_palTable[k + 2] = b1;
 			k += 3;
 		}
-		setpalette(pal_table);
+		setpalette(_palTable);
 	}
 }
 
@@ -201,25 +147,25 @@ void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stu
 	int16 i = 0, j, k;
 	int16 r, g, b;
 	int16 endcol = 0;
-	if (mono)
+	if (_mono)
 		calc_mono(palette, startcol, anz);
 	endcol = startcol + anz;
 	for (j = stufen; j >= 0; j--) {
 		endcol = startcol + anz;
 		k = startcol * 3;
 		for (i = startcol; i < endcol; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
+			r = _palTable[k];
+			g = _palTable[k + 1];
+			b = _palTable[k + 2];
 			if ((r + 1) <= palette[k]) ++r;
 			if ((g + 1) <= palette[k + 1]) ++g;
 			if ((b + 1) <= palette[k + 2]) ++b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
+			_palTable[k] = r;
+			_palTable[k + 1] = g;
+			_palTable[k + 2] = b;
 			k += 3;
 		}
-		set_palpart(pal_table, startcol, anz);
+		set_palpart(_palTable, startcol, anz);
 	}
 }
 
@@ -229,18 +175,18 @@ void McgaGraphics::ausblenden(int16 frames) {
 	for (j = 0; j < 64; j++) {
 		k = 0;
 		for (i = 0; i < 256; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
+			r = _palTable[k];
+			g = _palTable[k + 1];
+			b = _palTable[k + 2];
 			if (r > 0) --r;
 			if (g > 0) --g;
 			if (b > 0) --b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
+			_palTable[k] = r;
+			_palTable[k + 1] = g;
+			_palTable[k + 2] = b;
 			k += 3;
 		}
-		setpalette(pal_table);
+		setpalette(_palTable);
 	}
 }
 
@@ -252,18 +198,18 @@ void McgaGraphics::abblenden(int16 startcol, int16 anz, int16 stufen, int16 fram
 	for (j = 0; j < stufen; j++) {
 		k = startcol * 3;
 		for (i = startcol; i < endcol; i++) {
-			r = pal_table[k];
-			g = pal_table[k + 1];
-			b = pal_table[k + 2];
+			r = _palTable[k];
+			g = _palTable[k + 1];
+			b = _palTable[k + 2];
 			if (r > 0) --r;
 			if (g > 0) --g;
 			if (b > 0) --b;
-			pal_table[k] = r;
-			pal_table[k + 1] = g;
-			pal_table[k + 2] = b;
+			_palTable[k] = r;
+			_palTable[k + 1] = g;
+			_palTable[k + 2] = b;
 			k += 3;
 		}
-		set_palpart(pal_table, startcol, anz);
+		set_palpart(_palTable, startcol, anz);
 	}
 }
 
@@ -273,14 +219,14 @@ void McgaGraphics::set_teilpalette(const byte *palette, int16 startcol, int16 an
 	k = startcol * 3;
 	endcol = startcol + anz;
 	for (i = startcol; i < endcol; i++) {
-		pal_table[k] = palette[k];
-		pal_table[k + 1] = palette[k + 1];
-		pal_table[k + 2] = palette[k + 2];
+		_palTable[k] = palette[k];
+		_palTable[k + 1] = palette[k + 1];
+		_palTable[k + 2] = palette[k + 2];
 		k += 3;
 	}
-	if (mono)
-		calc_mono(pal_table, startcol, anz);
-	set_palpart(pal_table, startcol, anz);
+	if (_mono)
+		calc_mono(_palTable, startcol, anz);
+	set_palpart(_palTable, startcol, anz);
 }
 
 void McgaGraphics::cls() {
@@ -393,18 +339,18 @@ void McgaGraphics::sprite_save(byte *sptr, int16 x,
 		breite = 4;
 	if (hoehe <= 0)
 		hoehe = 1;
-	if (x < clipx1) {
-		x = clipx1;
-		breite -= (clipx1 - x);
+	if (x < _G(clipx1)) {
+		x = _G(clipx1);
+		breite -= (_G(clipx1) - x);
 	}
-	if ((x + breite) > clipx2 + 1)
-		breite = clipx2 - x;
-	if (y < clipy1) {
-		y = clipy1;
-		hoehe -= (clipy1 - y);
+	if ((x + breite) > _G(clipx2) + 1)
+		breite = _G(clipx2) - x;
+	if (y < _G(clipy1)) {
+		y = _G(clipy1);
+		hoehe -= (_G(clipy1) - y);
 	}
-	if ((y + hoehe) > clipy2 + 1)
-		hoehe = clipy2 - y;
+	if ((y + hoehe) > _G(clipy2) + 1)
+		hoehe = _G(clipy2) - y;
 	if (breite < 1)
 		breite = 0;
 	if (hoehe <= 0)
@@ -434,8 +380,8 @@ void McgaGraphics::set_fontadr(byte *adr) {
 
 	setfont(adr + sizeof(tff_header), tff->width, tff->height,
 	        tff->first, tff->last);
-	fvorx = tff->width;
-	fvory = 0;
+	_G(fvorx) = tff->width;
+	_G(fvory) = 0;
 }
 
 int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
@@ -464,11 +410,11 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 	kb_info *kb_old = g_events->setKbdInfo(&kbInfo);
 
 	if ((x == -1) || (y == -1)) {
-		x = gcurx;
-		y = gcury;
+		x = _G(gcurx);
+		y = _G(gcury);
 	} else {
-		gcurx = x;
-		gcury = y;
+		_G(gcurx) = x;
+		_G(gcury) = y;
 	}
 
 	move(x, y);
@@ -503,7 +449,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 					zeichen = string[i];
 					++i;
 				}
-				if (einfuegen == 1) {
+				if (_einfuegen == 1) {
 					einfuege_cur = 125;
 					cursor_z = '_' + einfuege_cur;
 				} else {
@@ -622,7 +568,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 								break;
 							}
 						}
-						if (svga == ON)
+						if (_svga == ON)
 							upd_scr();
 						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++) {
 							izahl = devices();
@@ -635,8 +581,8 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 								break;
 							}
 						}
-						plot_scan_cur((x + (disp_akt)*fvorx), gcury, cur_col, 300, scrwidth, cursor_z);
-						if (svga == ON)
+						plot_scan_cur((x + (disp_akt)*_G(fvorx)), _G(gcury), cur_col, 300, scrwidth, cursor_z);
+						if (_svga == ON)
 							upd_scr();
 						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++) {
 							izahl = devices();
@@ -673,8 +619,8 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 
 						if (stelle > 0) {
 							strcpy(zstring + stelle - 1, zstring + stelle);
-							plot_scan_cur((x + disp_akt * fvorx), gcury, bcol, bcol, scrwidth, cursor_z);
-							if (svga == ON)
+							plot_scan_cur((x + disp_akt * _G(fvorx)), _G(gcury), bcol, bcol, scrwidth, cursor_z);
+							if (_svga == ON)
 								upd_scr();
 							--stelle;
 							--stellemax;
@@ -757,12 +703,12 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 
 						if (izahl == 82) {
 							g_events->delay(200);
-							if (!einfuegen) {
-								einfuegen = 1;
+							if (!_einfuegen) {
+								_einfuegen = 1;
 								einfuege_cur = 125;
 								cursor_z = '_' + einfuege_cur;
 							} else {
-								einfuegen = 0;
+								_einfuegen = 0;
 								einfuege_cur = 0;
 								cursor_z = '_';
 							}
@@ -794,7 +740,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 								disp_akt = disp_stellemax;
 							}
 						}
-						if (!einfuegen) {
+						if (!_einfuegen) {
 							zstring[stelle] = izahl;
 							zstring[stellemax + 1] = 0;
 							if (stelle == stellemax) {
@@ -862,7 +808,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 		break;
 	}
 
-	if (svga == ON)
+	if (_svga == ON)
 		upd_scr();
 
 	g_events->setKbdInfo(kb_old);
@@ -884,10 +830,10 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 	char *tempptr;
 	va_list parptr;
 	va_start(parptr, string);
-	crlfx = x;
-	crlfy = y + fonth + 2;
-	gcurx = x;
-	gcury = y;
+	_crlfx = x;
+	_crlfy = y + _fontH + 2;
+	_G(gcurx) = x;
+	_G(gcury) = y;
 	i = 0;
 
 	unsigned char nextChar;
@@ -897,20 +843,20 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 		if ((nextChar < 32) || (nextChar == 127)) {
 			switch (nextChar) {
 			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
+				_G(gcurx) -= _G(fvorx);
+				_G(gcury) -= _G(fvory);
 				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
+				_G(gcury) = _crlfy;
+				_G(gcurx) = _crlfx;
+				_crlfx = _G(gcurx);
+				_crlfy = _G(gcury) + _fontH + 2;
 				break;
 
 			case 13:
-				gcurx = crlfx;
+				_G(gcurx) = _crlfx;
 				break;
 
 			case 127 :
@@ -1017,8 +963,8 @@ void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
                                 int16 scrwidth, const char *string) {
 	int16 i = 0;
 	char zeichen;
-	gcurx = x;
-	gcury = y;
+	_G(gcurx) = x;
+	_G(gcury) = y;
 	i = 0;
 	do {
 		zeichen = string[i];
@@ -1041,8 +987,8 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 	uint32 luzahl;
 	va_list parptr;
 	va_start(parptr, string);
-	crlfx = gcurx;
-	crlfy = gcury + fonth + 2;
+	_crlfx = _G(gcurx);
+	_crlfy = _G(gcury) + _fontH + 2;
 	i = 0;
 	do {
 		zeichen = string[i];
@@ -1050,20 +996,20 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 		if ((zeichen > 0 && zeichen < 32) || (zeichen == 127)) {
 			switch (zeichen) {
 			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
+				_G(gcurx) -= _G(fvorx);
+				_G(gcury) -= _G(fvory);
 				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
+				_G(gcury) = _crlfy;
+				_G(gcurx) = _crlfx;
+				_crlfx = _G(gcurx);
+				_crlfy = _G(gcury) + _fontH + 2;
 				break;
 
 			case 13:
-				gcurx = crlfx;
+				_G(gcurx) = _crlfx;
 				break;
 
 			case 127 :
@@ -1180,30 +1126,30 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 	uint32 luzahl;
 	va_list parptr;
 	va_start(parptr, string);
-	gcurx = x;
-	gcury = y;
-	crlfx = gcurx;
-	crlfy = y + fonth + 2;
+	_G(gcurx) = x;
+	_G(gcury) = y;
+	_crlfx = _G(gcurx);
+	_crlfy = y + _fontH + 2;
 	for (i = 0; i < menge;) {
 		zeichen = string[i];
 		++i;
 		if ((zeichen < 32) || (zeichen == 127)) {
 			switch (zeichen) {
 			case 8:
-				gcurx -= fvorx;
-				gcury -= fvory;
+				_G(gcurx) -= _G(fvorx);
+				_G(gcury) -= _G(fvory);
 				putz(32, fgCol, bgCol, scrwidth);
 				break;
 
 			case 10:
-				gcury = crlfy;
-				gcurx = crlfx;
-				crlfx = gcurx;
-				crlfy = gcury + fonth + 2;
+				_G(gcury) = _crlfy;
+				_G(gcurx) = _crlfx;
+				_crlfx = _G(gcurx);
+				_crlfy = _G(gcury) + _fontH + 2;
 				break;
 
 			case 13:
-				gcurx = crlfx;
+				_G(gcurx) = _crlfx;
 				break;
 
 			case 127 :
@@ -1312,26 +1258,26 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 
 void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
                               int16 scrwidth) {
-	crlfx = x;
-	crlfy = y + fonth + 2;
+	_crlfx = x;
+	_crlfy = y + _fontH + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
 		switch (zeichen) {
 		case 8:
-			x -= fvorx;
-			y -= fvory;
+			x -= _G(fvorx);
+			y -= _G(fvory);
 			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
 
 		case 10:
-			gcury = crlfy;
-			gcurx = crlfx;
-			crlfx = gcurx;
-			crlfy = gcury + fonth + 2;
+			_G(gcury) = _crlfy;
+			_G(gcurx) = _crlfx;
+			_crlfx = _G(gcurx);
+			_crlfy = _G(gcury) + _fontH + 2;
 			break;
 
 		case 13:
-			gcurx = crlfx;
-			gcury = crlfy;
+			_G(gcurx) = _crlfx;
+			_G(gcury) = _crlfy;
 			break;
 
 		case 127:
@@ -1345,26 +1291,26 @@ void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int1
 }
 
 void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
-	crlfx = gcurx;
-	crlfy = gcury + fonth + 2;
+	_crlfx = _G(gcurx);
+	_crlfy = _G(gcury) + _fontH + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
 		switch (zeichen) {
 		case 8:
-			gcurx -= fvorx;
-			gcury -= fvory;
+			_G(gcurx) -= _G(fvorx);
+			_G(gcury) -= _G(fvory);
 			putz(32, fgCol, bgCol, scrwidth);
 			break;
 
 		case 10:
-			gcury = crlfy;
-			gcurx = crlfx;
-			crlfx = gcurx;
-			crlfy = gcury + fonth + 2;
+			_G(gcury) = _crlfy;
+			_G(gcurx) = _crlfx;
+			_crlfx = _G(gcurx);
+			_crlfy = _G(gcury) + _fontH + 2;
 			break;
 
 		case 13:
-			gcurx = crlfx;
-			gcury = crlfy;
+			_G(gcurx) = _crlfx;
+			_G(gcury) = _crlfy;
 			break;
 
 		case 127:
@@ -1378,17 +1324,17 @@ void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwi
 }
 
 void McgaGraphics::set_vorschub(int16 x, int16 y) {
-	if (fvorx != -255)
-		fvorx = x;
-	if (fvory != -255)
-		fvory = y;
+	if (_G(fvorx) != -255)
+		_G(fvorx) = x;
+	if (_G(fvory) != -255)
+		_G(fvory) = y;
 }
 
 void McgaGraphics::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
-	*vorx = fvorx;
-	*vory = fvory;
-	*fntbr = fontbr;
-	*fnth = fonth;
+	*vorx = _G(fvorx);
+	*vory = _G(fvory);
+	*fntbr = _fontBr;
+	*fnth = _fontH;
 }
 
 void McgaGraphics::vorschub() {
@@ -1396,24 +1342,24 @@ void McgaGraphics::vorschub() {
 }
 
 void McgaGraphics::move(int16 x, int16 y) {
-	gcurx = x;
-	gcury = y;
+	_G(gcurx) = x;
+	_G(gcury) = y;
 }
 
 void McgaGraphics::init_mausmode(maus_info *minfo) {
-	MausMode = true;
-	m_info = minfo;
+	_mausMode = true;
+	_mInfo = minfo;
 }
 
 void McgaGraphics::exit_mausmode() {
-	MausMode = false;
-	m_info = nullptr;
+	_mausMode = false;
+	_mInfo = nullptr;
 }
 
 int16 McgaGraphics::devices() {
 	int16 i;
 	i = 0;
-	if (MausMode != false) {
+	if (_mausMode != false) {
 		if (i > 1) {
 			i = 27;
 		} else if (i == 1)
@@ -1460,7 +1406,7 @@ void McgaGraphics::init(uint16 mode, byte *info_blk, byte *vscreen) {
 }
 
 void McgaGraphics::update_screen() {
-	if (svga == ON)
+	if (_svga == ON)
 		upd_scr();
 }
 
@@ -1483,7 +1429,7 @@ int16 McgaGraphics::get_vesa_info(uint16 mode, byte *iblk) {
 	rr.eax = 0x4f00;
 	rr.edi = (dword)vsb & 15;
 	rr.es = (uint16)(((dword)vsb) >> 4);
-	FuNr = 0x10;
+	_fuNr = 0x10;
 	r_int();
 	if ((rr.eax != 0x4f) && (strnicmp((char *)vsb->id, "VESA", 4)))
 		error = 1;
@@ -1516,7 +1462,7 @@ int16 McgaGraphics::get_vesa_info(uint16 mode, byte *iblk) {
 		rr.ecx = (dword) mode;
 		rr.edi = (dword)vmb & 15;
 		rr.es = (uint16)(((dword)vmb) >> 4);
-		FuNr = 0x10;
+		_fuNr = 0x10;
 		r_int();
 		if (rr.eax != 0x4f)
 			error = 1;
@@ -1545,50 +1491,50 @@ int16 McgaGraphics::get_vesa_info(uint16 mode, byte *iblk) {
 				switch (mode) {
 				case 0x100:
 					screensize = 640l * 400l;
-					scr_w = 640;
-					scr_h = 400;
+					_G(scr_w) = 640;
+					_G(scr_h) = 400;
 					break;
 
 				case 0x101:
 					screensize = 640l * 480l;
-					scr_w = 640;
-					scr_h = 480;
+					_G(scr_w) = 640;
+					_G(scr_h) = 480;
 					break;
 
 				case 0x102:
 					screensize = (800l * 600l) >> 1;
-					scr_w = 800;
-					scr_h = 600;
+					_G(scr_w) = 800;
+					_G(scr_h) = 600;
 					break;
 
 				case 0x103:
 					screensize = 800l * 600l;
-					scr_w = 800;
-					scr_h = 600;
+					_G(scr_w) = 800;
+					_G(scr_h) = 600;
 					break;
 
 				case 0x104:
 					screensize = (1024l * 768l) >> 1;
-					scr_w = 1024;
-					scr_h = 768;
+					_G(scr_w) = 1024;
+					_G(scr_h) = 768;
 					break;
 
 				case 0x105:
 					screensize = 1024l * 768l;
-					scr_w = 1024;
-					scr_h = 768;
+					_G(scr_w) = 1024;
+					_G(scr_h) = 768;
 					break;
 
 				case 0x106:
 					screensize = (1280l * 1024l) >> 1;
-					scr_w = 1280;
-					scr_h = 1280;
+					_G(scr_w) = 1280;
+					_G(scr_h) = 1280;
 					break;
 
 				case 0x107:
 					screensize = 1280l * 1024l;
-					scr_w = 1280;
-					scr_h = 1280;
+					_G(scr_w) = 1280;
+					_G(scr_h) = 1280;
 					break;
 
 				}
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index e6838861404..2edfce09a06 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -28,32 +28,6 @@
 
 namespace Chewy {
 
-extern byte pal_table[PALETTE_SIZE];
-extern uint8 svga;
-extern int16 FuNr;
-extern real_regs rr;
-extern real_regs *rp;
-extern maus_info *m_info;
-extern VesaInfo vi;
-
-extern int16 clipx1, clipx2, clipy1, clipy2;
-extern int16 gcurx, gcury, fvorx, fvory;
-extern int16 fontbr, fonth;
-extern int16 scr_w, scr_h;
-extern int16 fontfirst, fontlast;
-extern char writemode;
-
-extern char MausMode;
-extern char enter_key;
-extern char escape_key;
-extern char einfuegen;
-
-extern int16 crlfx, crlfy;
-extern int16 r_gef, r_end;
-extern int16 *rlist;
-extern bool mono;
-extern uint8 svga;
-
 class McgaGraphics {
 public:
 	McgaGraphics();
@@ -133,6 +107,15 @@ private:
 	int16 devices();
 	float sinus[360];
 	float cosinus[360];
+	byte _palTable[PALETTE_SIZE];
+	uint8 _writeMode = 0;
+	bool _mono = false;
+	bool _mausMode = false;
+	int16 _crlfx = 0, _crlfy = 0;
+	int16 _fontBr = 0, _fontH = 0;
+	uint8 _svga = 0;
+	uint8 _einfuegen = 0;
+	maus_info *_mInfo = nullptr;
 
 	void ltoa(long N, char *str, int base);
 	void ultoa(uint32 N, char *str, int base);


Commit: acb1f74826f5f77da7e200f32989c979b964153e
    https://github.com/scummvm/scummvm/commit/acb1f74826f5f77da7e200f32989c979b964153e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Cleanup of io_game.cpp

Changed paths:
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h


diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index fce19045884..17b2cda655d 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -28,18 +28,7 @@
 
 namespace Chewy {
 
-io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
-	out = iout;
-	in = iin;
-	cur = curp;
-}
-
-io_game::~io_game() {
-}
-
-char file_find_g[20][USER_NAME + 4];
-
-short file_xy_g[7][4] = {
+static const int16 FILE_XY_G[7][4] = {
 	{140, 6, 156, 51},
 	{140, 55, 156, 100},
 	{163, 6, 241, 18},
@@ -49,18 +38,25 @@ short file_xy_g[7][4] = {
 	{ 6, 6, 133, 97}
 };
 
-byte code_tbl_g[6] = {72, 80, 59, 60, 61, 62};
+static const byte CODE_TBL_G[6] = { 72, 80, 59, 60, 61, 62 };
 
-char auf_tbl_g[3][3] = { {FSTRING8 },
-	{FSTRING9 },
-	{FSTRING10},
+static const char AUF_TBL_G[3][3] = {
+	{ FSTRING8 }, {FSTRING9 }, { FSTRING10 }
 };
-char ab_tbl_g[4][3] = { {FSTRING11},
-	{FSTRING12},
-	{FSTRING13},
-	{FSTRING14},
+
+static const char AB_TBL_G[4][3] = {
+	{ FSTRING11 }, { FSTRING12 }, { FSTRING13 }, { FSTRING14 }
 };
 
+io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
+	out = iout;
+	in = iin;
+	cur = curp;
+}
+
+io_game::~io_game() {
+}
+
 int16 io_game::io_menu(iog_init *iostruc) {
 	int16 max_scroll = 20;
 	int16 i, j, y;
@@ -79,14 +75,17 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		in->neuer_kb_handler(kbinfo);
 	else
 		kbinfo = inzeig->kbinfo;
+
 	scr_width = _G(scr_w) << 2;
 	d_klick = DOPPEL_KLICK;
 	int16 cur_y1 = io->popy + 4;
 	int16 cur_y = io->popy + 8;
 	plot_io();
 	schalter_aus();
+
 	for (i = 0; i < 20; i++)
-		file_find_g[i][0] = 0;
+		_fileFind[i][0] = 0;
+
 	int16 scroll_flag = 0;
 	i = 0;
 
@@ -100,11 +99,13 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		auswahl = (int16)io->key_nr;
 		cur_y1 = (auswahl - 1) * 16 + io->popy + 4;
 	}
+
 	cur->show_cur();
 	switch_code = 1;
 	cur->wait_taste_los(true);
 	kbinfo->key_code = '\0';
 	kbinfo->scan_code = Common::KEYCODE_INVALID;
+
 	switch ((int16)io->key_nr) {
 	case 0:
 		cur->hide_cur();
@@ -112,14 +113,14 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		i = 0;
 		cur_y = io->popy + 8;
 		scroll_flag = 0;
-		if (file_find_g[0][0] != 0) {
-			if (strlen(&file_find_g[0][1]) >= 17)
+		if (_fileFind[0][0] != 0) {
+			if (strlen(&_fileFind[0][1]) >= 17)
 				out->
-				printnxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, 17, scr_width, &file_find_g[0][1]
+				printnxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, 17, scr_width, &_fileFind[0][1]
 				        );
 			else
 				out->
-				printxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, scr_width, &file_find_g[0][1]);
+				printxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, scr_width, &_fileFind[0][1]);
 		}
 		plot_dir_liste(io->popy + 18, i + 1);
 		cur->show_cur();
@@ -137,6 +138,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		in->hot_key = 62;
 		break;
 	}
+
 	switch_code = 0;
 	while (ende == 0) {
 		if (mouse_f != 0) {
@@ -149,13 +151,13 @@ int16 io_game::io_menu(iog_init *iostruc) {
 			int16 x = minfo->x;
 			y = minfo->y;
 
-			j = in->maus_vector(x - io->popx, y - io->popy, (int16 *)file_xy_g, 7);
+			j = in->maus_vector(x - io->popx, y - io->popy, (int16 *)FILE_XY_G, 7);
 
 			if (j != -1) {
 				mouse_f = 1;
 				if (j < 6)
 
-					in->hot_key = code_tbl_g[j];
+					in->hot_key = CODE_TBL_G[j];
 				if ((j == 6) && (y >= io->popy + 8)) {
 					y -= io->popy + 8;
 					y /= 10;
@@ -201,7 +203,6 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					}
 				}
 			}
-
 		}
 
 		switch_code = in->get_switch_code();
@@ -377,7 +378,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					ende = 1;
 				}
 
-				if ((io_flag == 2) && (file_find_g[i][0] == 1)) {
+				if ((io_flag == 2) && (_fileFind[i][0] == 1)) {
 
 					load(i, io->save_path);
 
@@ -428,17 +429,17 @@ void io_game::mark_eintrag(int16 y, int16 nr) {
 	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10,
 	              io->m_col[1], io->m_col[0], io->m_col[4]);
 	out->printxy(io->popx + 10, y + 2, io->m_col[2], 300, scr_width, "%d.", nr + 1);
-	if (file_find_g[nr][0] != 0) {
-		if (strlen(&file_find_g[nr][1]) >= 17)
+	if (_fileFind[nr][0] != 0) {
+		if (strlen(&_fileFind[nr][1]) >= 17)
 			out->printnxy(io->popx + 28, y + 2, io->m_col[2], 300, 17,
-			               scr_width, &file_find_g[nr][1]);
+			               scr_width, &_fileFind[nr][1]);
 		else
 			out->printxy(io->popx + 28, y + 2, io->m_col[2], 300,
-			              scr_width, &file_find_g[nr][1]);
+			              scr_width, &_fileFind[nr][1]);
 		out->box_fill(io->popx + 8, io->popy + 106, io->popx + 244, io->popy + 117,
 		               io->m_col[5]);
 		print_shad(io->popx + 8, io->popy + 106, io->m_col[0], 300, io->m_col[1],
-		           scr_width, &file_find_g[nr][1]);
+		           scr_width, &_fileFind[nr][1]);
 	} else {
 		out->move(io->popx + 8, io->popy + 106);
 		out->box_fill(io->popx + 8, io->popy + 106, io->popx + 244, io->popy + 117,
@@ -451,13 +452,13 @@ void io_game::unmark_eintrag(int16 y, int16 nr) {
 	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[3],
 	              io->m_col[3], io->m_col[3]);
 	out->printxy(io->popx + 10, y + 2, io->m_col[5], 300, scr_width, "%d.", nr + 1);
-	if (file_find_g[nr][0] != 0) {
-		if (strlen(&file_find_g[nr][1]) >= 17)
+	if (_fileFind[nr][0] != 0) {
+		if (strlen(&_fileFind[nr][1]) >= 17)
 			out->printnxy(io->popx + 28, y + 2, io->m_col[5], 300, 17,
-			               scr_width, &file_find_g[nr][1]);
+			               scr_width, &_fileFind[nr][1]);
 		else
 			out->printxy(io->popx + 28, y + 2, io->m_col[5], 300,
-			              scr_width, &file_find_g[nr][1]);
+			              scr_width, &_fileFind[nr][1]);
 	}
 }
 
@@ -469,13 +470,13 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 			              io->m_col[3], io->m_col[3], io->m_col[3]);
 			out->printxy(io->popx + 10, cur_y + 2, io->m_col[5], 300,
 			              scr_width, "%d.", i + 1);
-			if (file_find_g[i][0] != 0) {
-				if (strlen(&file_find_g[i][1]) >= 17)
+			if (_fileFind[i][0] != 0) {
+				if (strlen(&_fileFind[i][1]) >= 17)
 					out->printnxy(io->popx + 28, cur_y + 2, io->m_col[5], 300, 17,
-					               scr_width, &file_find_g[i][1]);
+					               scr_width, &_fileFind[i][1]);
 				else
 					out->printxy(io->popx + 28, cur_y + 2, io->m_col[5], 300,
-					              scr_width, &file_find_g[i][1]);
+					              scr_width, &_fileFind[i][1]);
 			}
 			cur_y += 10;
 		}
@@ -524,12 +525,12 @@ void io_game::plot_io() {
 
 void io_game::plot_auf_txt(int16 farbe) {
 	for (int16 i = 0; i < 3; i++)
-		out->printxy(io->popx + 146, io->popy + 15 + i * 10, farbe, 300, scr_width, auf_tbl_g[i]);
+		out->printxy(io->popx + 146, io->popy + 15 + i * 10, farbe, 300, scr_width, AUF_TBL_G[i]);
 }
 
 void io_game::plot_ab_txt(int16 farbe) {
 	for (int16 i = 0; i < 4; i++)
-		out->printxy(io->popx + 146, io->popy + 59 + i * 10, farbe, 300, scr_width, ab_tbl_g[i]);
+		out->printxy(io->popx + 146, io->popy + 59 + i * 10, farbe, 300, scr_width, AB_TBL_G[i]);
 }
 
 void io_game::itoa(int N, char *s, int base) {
@@ -541,14 +542,14 @@ int16 io_game::get_savegame_files() {
 	int ret = 0;
 
 	for (int i = 0; i < 20; i++) {
-		file_find_g[i][0] = 0;
+		_fileFind[i][0] = 0;
 
 		for (uint j = 0; j < saveList.size(); ++j) {
 			if (saveList[j].getSaveSlot() == i) {
 				Common::String name = saveList[j].getDescription();
-				file_find_g[i][0] = 1;
-				strncpy(&file_find_g[i][1], name.c_str(), USER_NAME + 3);
-				file_find_g[i][USER_NAME + 3] = '\0';
+				_fileFind[i][0] = 1;
+				strncpy(&_fileFind[i][1], name.c_str(), USER_NAME + 3);
+				_fileFind[i][USER_NAME + 3] = '\0';
 				++ret;
 				break;
 			}
@@ -566,11 +567,11 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 	(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[1], io->m_col[0], io->m_col[4]);
 
 	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.", slotNum + 1);
-	if (file_find_g[slotNum][0] == 0) {
-		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
+	if (_fileFind[slotNum][0] == 0) {
+		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &_fileFind[slotNum][1]);
 	} else {
 		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
-		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &file_find_g[slotNum][1]);
+		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &_fileFind[slotNum][1]);
 
 	}
 	in->neuer_kb_handler(kbinfo);
@@ -579,7 +580,7 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 
 	cur->show_cur();
 
-	Common::String desc(&file_find_g[slotNum][1]);
+	Common::String desc(&_fileFind[slotNum][1]);
 	(void)g_engine->saveGameState(slotNum, desc);
 }
 
@@ -587,7 +588,7 @@ void io_game::load(int16 slotNum, char *fname) {
 	get_savegame_files();
 
 	cur->hide_cur();
-	if (file_find_g[slotNum][0] == 1) {
+	if (_fileFind[slotNum][0] == 1) {
 		(void)g_engine->loadGameState(slotNum);
 	}
 }
@@ -600,14 +601,14 @@ void io_game::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, i
 char *io_game::io_init(iog_init *iostruc) {
 	io = iostruc;
 	for (int16 i = 0; i < 20; i++)
-		file_find_g[i][0] = 0;
+		_fileFind[i][0] = 0;
 	get_savegame_files();
 
-	return &file_find_g[0][0];
+	return &_fileFind[0][0];
 }
 
 void io_game::save_entry(int16 slotNum, char *fname) {
-	Common::String desc(&file_find_g[slotNum][1]);
+	Common::String desc(&_fileFind[slotNum][1]);
 	g_engine->saveGameState(slotNum, desc);
 }
 
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index e1d06e6e8ec..d240d27c3a1 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -111,7 +111,7 @@ private:
 	int16 scr_width;
 	float d_klick;
 	int16 switch_code;
-
+	char _fileFind[20][USER_NAME + 4];
 };
 
 } // namespace Chewy


Commit: 03d836ca7af4d01fa9d8d6de2b0d4b109109fd58
    https://github.com/scummvm/scummvm/commit/03d836ca7af4d01fa9d8d6de2b0d4b109109fd58
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Remove deprecated code from mcga_graphics

Changed paths:
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index a2939f796a3..22091172970 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -30,8 +30,6 @@ namespace Chewy {
 
 #define MAXSTRING 255
 
-VesaInfo vi;
-
 McgaGraphics::McgaGraphics() {
 	for (int i = 0; i < 360; i++) {
 		sinus[i] = sin(i * 3.14159265359 / 180);
@@ -1398,176 +1396,11 @@ void McgaGraphics::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 y
 		mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void McgaGraphics::init(uint16 mode, byte *info_blk, byte *vscreen) {
-	if (!get_vesa_info(mode, info_blk)) {
-		init_svga(&vi, vscreen);
-		//g_events->delay(250);
-	}
-}
-
 void McgaGraphics::update_screen() {
 	if (_svga == ON)
 		upd_scr();
 }
 
-int16 McgaGraphics::get_vesa_info(uint16 mode, byte *iblk) {
-	int16 error = 0;
-#if 0
-	vesa_status_block *vsb;
-	vesa_modus_block *vmb ;
-	uint16 vsb_seg, vsb_off;
-	char *tmp;
-	uint16 *code_list;
-	dword screensize;
-	int16 i;
-	uint16 akt_page;
-	uint16 StepGr;
-	error = 0;
-
-	vsb = (vesa_status_block *) iblk;
-	vmb = (vesa_modus_block *) iblk;
-	rr.eax = 0x4f00;
-	rr.edi = (dword)vsb & 15;
-	rr.es = (uint16)(((dword)vsb) >> 4);
-	_fuNr = 0x10;
-	r_int();
-	if ((rr.eax != 0x4f) && (strnicmp((char *)vsb->id, "VESA", 4)))
-		error = 1;
-	if (!error) {
-		printf("VESA Version : %d.%d \n", vsb->ver_high, vsb->ver_low);
-		vsb_seg = (uint16)(((dword)vsb->name) >> 16);
-		vsb_off = (uint16)(((dword)vsb->name) & 0xffff);
-		tmp = (char *)((dword)vsb_seg << 4) + ((dword)vsb_off);
-		printf("Hersteller : %s \n", tmp);
-		if (vsb->ver_high >= 1)
-			printf("SPEICHER : %u * 64k = %uk\n", vsb->memory, vsb->memory << 6);
-		else
-			error = 1;
-	}
-
-	if (!error) {
-		vsb_seg = (uint16)(((dword)vsb->codenrs) >> 16);
-		vsb_off = (uint16)(((dword)vsb->codenrs) & 0xffff);
-		code_list = (uint16 *)(((dword)vsb_seg << 4) + ((dword)vsb_off));
-		while ((*code_list != mode) && (*code_list != 0xffff))
-			++code_list;
-		if (*code_list == 0xffff)
-			error = 1;
-	}
-	if (!error) {
-		printf("Mode %4x : ist verfügbar\n", mode);
-
-		memset(iblk, 0, sizeof(vesa_status_block));
-		rr.eax = 0x4f01;
-		rr.ecx = (dword) mode;
-		rr.edi = (dword)vmb & 15;
-		rr.es = (uint16)(((dword)vmb) >> 4);
-		_fuNr = 0x10;
-		r_int();
-		if (rr.eax != 0x4f)
-			error = 1;
-		if (!error) {
-			vi.ModeNr = mode;
-			if (vmb->mflag & 1) {
-				if (vmb->mflag & 1)printf("Monitor kann Modus darstellen\n");
-				if (vmb->mflag & 2)printf("Optionale Infos geliefert\n");
-				if (vmb->mflag & 4)printf("BIOS-Textfunktionen möglich\n");
-				if (vmb->mflag & 0x8)printf("Farbmodus\n");
-				if (vmb->mflag & 0x10)printf("Grafikmodus\n");
-				if (vmb->fw_flag & 1) {
-					if (vmb->fw_flag & 4) {
-						vi.WriteWin = 0;
-						vi.WriteSeg = vmb->fw_seg;
-					}
-				}
-
-				if (vmb->fs_flag & 1) {
-					if (vmb->fs_flag & 4) {
-						vi.WriteWin = 1;
-						vi.WriteSeg = vmb->fs_seg;
-					}
-				}
-
-				switch (mode) {
-				case 0x100:
-					screensize = 640l * 400l;
-					_G(scr_w) = 640;
-					_G(scr_h) = 400;
-					break;
-
-				case 0x101:
-					screensize = 640l * 480l;
-					_G(scr_w) = 640;
-					_G(scr_h) = 480;
-					break;
-
-				case 0x102:
-					screensize = (800l * 600l) >> 1;
-					_G(scr_w) = 800;
-					_G(scr_h) = 600;
-					break;
-
-				case 0x103:
-					screensize = 800l * 600l;
-					_G(scr_w) = 800;
-					_G(scr_h) = 600;
-					break;
-
-				case 0x104:
-					screensize = (1024l * 768l) >> 1;
-					_G(scr_w) = 1024;
-					_G(scr_h) = 768;
-					break;
-
-				case 0x105:
-					screensize = 1024l * 768l;
-					_G(scr_w) = 1024;
-					_G(scr_h) = 768;
-					break;
-
-				case 0x106:
-					screensize = (1280l * 1024l) >> 1;
-					_G(scr_w) = 1280;
-					_G(scr_h) = 1280;
-					break;
-
-				case 0x107:
-					screensize = 1280l * 1024l;
-					_G(scr_w) = 1280;
-					_G(scr_h) = 1280;
-					break;
-
-				}
-				akt_page = 0;
-				StepGr = vmb->wsize / vmb->stepgr;
-				if (StepGr == 0)
-					StepGr = 1;
-				vi.ScreenSize = screensize;
-				for (i = 0; (i < 20); i++) {
-					vi.Page[i] = akt_page;
-					akt_page += StepGr;
-				}
-				printf("Granularität = %d Kbyte\n", vmb->stepgr);
-				printf("Größe der Fenster = %d Kbyte\n", vmb->wsize);
-				printf("Segmentadresse erstes Fenster = %xh\n", vmb->fw_seg);
-				printf("Segmentadresse zweites Fenster = %xh\n", vmb->fs_seg);
-				printf("Zeiger auf Page-Select-Routine = %p\n", vmb->page_set);
-				vi.WinSize = ((dword)vmb->wsize) * 1024l;
-				vi.CallSeg = FP_SEG(vmb->page_set);
-				vi.CallOff = FP_OFF(vmb->page_set);
-				vi.PageAnz = vi.ScreenSize / vi.WinSize;
-				printf("Pages = %d\n", vi.PageAnz);
-
-				vi.CopyRest = vi.ScreenSize % vi.WinSize;
-			}
-			else
-				vi.ModeAvail = FALSE;
-		}
-	}
-#endif
-	return error;
-}
-
 void McgaGraphics::ltoa(long N, char *str, int base) {
 	sprintf(str, "%ld", N);
 }
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 2edfce09a06..5431f415554 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -97,9 +97,6 @@ public:
 	void set_vorschub(int16 x, int16 y);
 	void move(int16 x, int16 y);
 	void get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth);
-
-	int16 get_vesa_info(uint16 mode, byte *info_blk);
-	void init(uint16 mode, byte *info_blk, byte *vscreen);
 	void update_screen();
 
 private:


Commit: 4bfa4a73c33728a074b3cfcbfd3eb9922cf99cd3
    https://github.com/scummvm/scummvm/commit/4bfa4a73c33728a074b3cfcbfd3eb9922cf99cd3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:20-08:00

Commit Message:
CHEWY: Re-enable title sequence

Changed paths:
    engines/chewy/dialogs/main_menu.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index f56ef66ea61..f002a4cd533 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "common/textconsole.h"
 #include "chewy/dialogs/main_menu.h"
 #include "chewy/dialogs/cinema.h"
@@ -36,16 +37,16 @@ int MainMenu::_selection;
 int MainMenu::_personAni[3];
 
 void MainMenu::execute() {
-#ifdef TODO_REENABLE
-	// TODO: Currently disabled so it doesn't keep playing on startup
-	mem->file->select_pool_item(music_handle, EndOfPool - 17);
-	mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
-	if (!modul)
-		ailsnd->playMod((tmf_header *)Ci.MusicSlot);
-
-	flic_cut(200, 0);
-	ailsnd->stopMod();
-#endif
+	// Convenience during testing to not keep showing title sequence
+	if (!ConfMan.getBool("skip_title")) {
+		mem->file->select_pool_item(music_handle, EndOfPool - 17);
+		mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
+		if (!modul)
+			sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
+
+		flic_cut(200, 0);
+		sndPlayer->stopMod();
+	}
 
 	show_intro();
 


Commit: 7f256088fcf3e8257fd65c8f49f0e60c9517862a
    https://github.com/scummvm/scummvm/commit/7f256088fcf3e8257fd65c8f49f0e60c9517862a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Cleanup of atds

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index e7390c3f9d9..2f5b885f832 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -29,10 +29,6 @@
 
 namespace Chewy {
 
-
-int16 mouse_push;
-int print_delay_count1;
-
 bool AtsTxtHeader::load(Common::SeekableReadStream *src) {
 	TxtNr = src->readUint16LE();
 	AMov = src->readUint16LE();
@@ -540,9 +536,9 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, in
 				atsv.Display = false;
 			} else {
 				atsv.DelayCount = get_delay(atsv.TxtLen);
-				print_delay_count1 = atsv.DelayCount / 10;
+				_printDelayCount1 = atsv.DelayCount / 10;
 				atsv.Color = color;
-				mouse_push = true;
+				_mousePush = true;
 			}
 			*voc_nr = atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
 			if ((atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
@@ -571,9 +567,9 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
-				if (mouse_push == false) {
-					if (atsv.SilentCount <= 0 && atsv.DelayCount > print_delay_count1) {
-						mouse_push = true;
+				if (_mousePush == false) {
+					if (atsv.SilentCount <= 0 && atsv.DelayCount > _printDelayCount1) {
+						_mousePush = true;
 						atsv.DelayCount = 0;
 						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
 						inzeig->kbinfo->key_code = '\0';
@@ -582,11 +578,11 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 				break;
 
 			default:
-				mouse_push = false;
+				_mousePush = false;
 				break;
 			}
 		} else {
-			mouse_push = false;
+			_mousePush = false;
 		}
 
 		if (atsv.SilentCount <= 0) {
@@ -634,7 +630,7 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 					while (*tmp_ptr++ != ATDS_END_TEXT)
 						++atsv.TxtLen;
 					atsv.DelayCount = get_delay(atsv.TxtLen);
-					print_delay_count1 = atsv.DelayCount / 10;
+					_printDelayCount1 = atsv.DelayCount / 10;
 					atsv.SilentCount = atdsv.Silent;
 				}
 			} else
@@ -886,12 +882,12 @@ int16 atdsys::start_aad(int16 dia_nr) {
 			int16 txt_len;
 			aad_get_zeilen(aadv.Ptr, &txt_len);
 			aadv.DelayCount = get_delay(txt_len);
-			print_delay_count1 = aadv.DelayCount / 10;
+			_printDelayCount1 = aadv.DelayCount / 10;
 
 			atdsv.DiaNr = dia_nr;
 			if (atdsv.aad_str != nullptr)
 				atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
-			mouse_push = true;
+			_mousePush = true;
 			stop_ats();
 			atdsv.VocNr = -1;
 		}
@@ -912,9 +908,9 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
-				if (mouse_push == false) {
-					if (aadv.SilentCount <= 0 && aadv.DelayCount > print_delay_count1) {
-						mouse_push = true;
+				if (_mousePush == false) {
+					if (aadv.SilentCount <= 0 && aadv.DelayCount > _printDelayCount1) {
+						_mousePush = true;
 						aadv.DelayCount = 0;
 						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
 						inzeig->kbinfo->key_code = '\0';
@@ -923,11 +919,11 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 				break;
 
 			default:
-				mouse_push = false;
+				_mousePush = false;
 				break;
 			}
 		} else {
-			mouse_push = false;
+			_mousePush = false;
 		}
 
 		if (aadv.SilentCount <= 0) {
@@ -972,10 +968,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
-			}
 
-#ifndef SCRIPT
-			else if (atdsv.Display == DISPLAY_VOC) {
+			} else if (atdsv.Display == DISPLAY_VOC) {
 				if (atdsv.VocNr != aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
 					atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
 					g_engine->_sound->playSpeech(atdsv.VocNr);
@@ -990,7 +984,7 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
 			}
-#endif
+
 			if (aadv.DelayCount <= 0) {
 				aadv.Ptr = tmp_ptr;
 				while (*tmp_ptr == ' ' || *tmp_ptr == 0)
@@ -1021,23 +1015,23 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 					}
 					aad_get_zeilen(aadv.Ptr, &txt_len);
 					aadv.DelayCount = get_delay(txt_len);
-					print_delay_count1 = aadv.DelayCount / 10;
+					_printDelayCount1 = aadv.DelayCount / 10;
 					aadv.SilentCount = atdsv.Silent;
 				}
 			} else {
 				if (atdsv.Display == DISPLAY_TXT ||
 				        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1)
 					--aadv.DelayCount;
-#ifndef SCRIPT
+
 				else if (atdsv.Display == DISPLAY_VOC) {
 					warning("FIXME - unknown constant SMP_PLAYING");
 
 					aadv.DelayCount = 0;
 				}
-#endif
 			}
-		} else
+		} else {
 			--aadv.SilentCount;
+		}
 	}
 }
 
@@ -1297,7 +1291,7 @@ int16 atdsys::start_ads_auto_dia(char *item_adr) {
 
 		if (atdsv.aad_str != nullptr)
 			atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
-		mouse_push = true;
+		_mousePush = true;
 		stop_ats();
 	} else {
 		aadv.Dialog = false;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 2ebbb2ec1bc..1fe934b671e 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -346,6 +346,8 @@ private:
 	int16 tmp_delay;
 	in_zeiger *inzeig = nullptr;
 	bool _hasSpeech = false;
+	int16 _mousePush = 0;
+	int _printDelayCount1 = 0;
 };
 
 } // namespace Chewy


Commit: c5d0eb9f9fd7fcae55a4f89dee090f77d6a1704e
    https://github.com/scummvm/scummvm/commit/c5d0eb9f9fd7fcae55a4f89dee090f77d6a1704e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Fix a bunch of global shadowing warnings

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/global.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 28dd1e91433..a601f257612 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -178,7 +178,6 @@ uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
 // void_adr() with type 200
 uint32 Data::size(const char *fname, int16 typ) {
 	uint32 size = 0;
-	mod_header *mh = (mod_header *)tmp;
 
 	strncpy(filename, fname, MAXPATH - 5);
 	filename[MAXPATH - 5] = '\0';
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 93bcde85a85..cc6dc054542 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -154,8 +154,6 @@ extern int16 fvory8x8;
 
 extern char *invent_txt;
 extern char *invent_name;
-
-extern char *str;
 extern char **ads_item_ptr;
 
 extern SplitStringInit ssi[AAD_MAX_PERSON];
@@ -242,7 +240,6 @@ extern movclass *mov;
 extern SoundPlayer *sndPlayer;
 
 extern char backged[];
-extern char fname[80];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
 extern int16 HowardMov;
 
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 22091172970..ad0043eecbf 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -69,18 +69,18 @@ void McgaGraphics::set_mono() {
 	_mono = true;
 }
 
-void McgaGraphics::calc_mono(byte *pal, int16 startcol, int16 anz) {
+void McgaGraphics::calc_mono(byte *palette, int16 startcol, int16 anz) {
 	int16 i, k;
 	uint8 r, g, b, grau;
 	k = startcol * 3;
 	for (i = 0; i < anz; i++) {
-		r = pal[k];
-		g = pal[k + 1];
-		b = pal[k + 2];
+		r = palette[k];
+		g = palette[k + 1];
+		b = palette[k + 2];
 		grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
-		pal[k] = grau;
-		pal[k + 1] = grau;
-		pal[k + 2] = grau;
+		palette[k] = grau;
+		palette[k + 1] = grau;
+		palette[k + 2] = grau;
 		k += 3;
 	}
 }
@@ -94,8 +94,8 @@ void McgaGraphics::set_palette(byte *palette) {
 	setpalette(palette);
 }
 
-void McgaGraphics::palette_save(byte *pal) {
-	save_palette(pal);
+void McgaGraphics::palette_save(byte *palette) {
+	save_palette(palette);
 }
 
 void McgaGraphics::rest_palette() {
@@ -1344,9 +1344,9 @@ void McgaGraphics::move(int16 x, int16 y) {
 	_G(gcury) = y;
 }
 
-void McgaGraphics::init_mausmode(maus_info *minfo) {
+void McgaGraphics::init_mausmode(maus_info *mInfo) {
 	_mausMode = true;
-	_mInfo = minfo;
+	_mInfo = mInfo;
 }
 
 void McgaGraphics::exit_mausmode() {
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 5431f415554..ab73683da6e 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -35,7 +35,7 @@ public:
 
 	void init();
 	void set_writemode(char wm);
-	void init_mausmode(maus_info *minfo);
+	void init_mausmode(maus_info *mInfo);
 	void exit_mausmode();
 
 	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
@@ -43,9 +43,9 @@ public:
 	byte *get_zeiger();
 
 	void set_mono();
-	void calc_mono(byte *pal, int16 startcol, int16 anz);
+	void calc_mono(byte *palette, int16 startcol, int16 anz);
 	void set_palette(byte *palette);
-	void palette_save(byte *pal = nullptr);
+	void palette_save(byte *palette = nullptr);
 	void rest_palette();
 	void raster_col(int16 c, int16 r, int16 g, int16 b);
 	void einblenden(byte *palette, int16 frames);


Commit: 0e2739d42c3a46144be52e47056a47b4b0cfb5f6
    https://github.com/scummvm/scummvm/commit/0e2739d42c3a46144be52e47056a47b4b0cfb5f6
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Review Room 19

Changed paths:
    engines/chewy/rooms/room19.cpp


diff --git a/engines/chewy/rooms/room19.cpp b/engines/chewy/rooms/room19.cpp
index 8241b5b71b8..7bbda47f3d5 100644
--- a/engines/chewy/rooms/room19.cpp
+++ b/engines/chewy/rooms/room19.cpp
@@ -22,8 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room19.h"
 
 namespace Chewy {


Commit: c62d7581240909ce9bb9b94bac0861f6ae29c114
    https://github.com/scummvm/scummvm/commit/c62d7581240909ce9bb9b94bac0861f6ae29c114
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Review logic of Room 21

Changed paths:
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room21.h


diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 3e31ce06044..f2d61552633 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -115,7 +115,7 @@ void Room21::calc_laser() {
 }
 
 void Room21::init_spinne() {
-	det->load_taf_seq(42, (89 - 42) + 1, nullptr);
+	det->load_taf_seq(42, 48, nullptr);
 	_G(auto_obj) = 2;
 
 	mov_phasen[SPINNE1_OBJ].AtsText = 130;
@@ -125,7 +125,7 @@ void Room21::init_spinne() {
 	auto_mov_obj[SPINNE1_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SPINNE1_OBJ].Mode = true;
-	init_auto_obj(SPINNE1_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE1_OBJ].Lines, (const MovLine *)SPINNE_MPKT);
+	init_auto_obj(SPINNE1_OBJ, &SPINNE_PHASEN[0][0], 3, (const MovLine *)SPINNE_MPKT);
 
 	mov_phasen[SPINNE2_OBJ].AtsText = 130;
 	mov_phasen[SPINNE2_OBJ].Lines = 2;
@@ -134,7 +134,7 @@ void Room21::init_spinne() {
 	auto_mov_obj[SPINNE2_OBJ].Id = AUTO_OBJ1;
 	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SPINNE2_OBJ].Mode = true;
-	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
+	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], 2, (const MovLine *)SPINNE_MPKT1);
 	_G(timer_nr)[0] = room->set_timer(255, 21);
 	_G(e_streifen) = false;
 }
@@ -146,24 +146,19 @@ void Room21::restart_spinne2() {
 	_G(e_streifen) = false;
 }
 
-void Room21::e_streifen() {
-	_G(auto_obj) = 3;
-	mov_phasen[ENERGIE_OBJ].AtsText = 0;
-	mov_phasen[ENERGIE_OBJ].Lines = 2;
-	mov_phasen[ENERGIE_OBJ].Repeat = 1;
-	mov_phasen[ENERGIE_OBJ].ZoomFak = 0;
-	auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
-	auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[ENERGIE_OBJ].Mode = true;
-	init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[ENERGIE_OBJ].Lines, (const MovLine *)SPINNE_MPKT2);
-}
-
 void Room21::setup_func() {
-	if (auto_mov_vector[SPINNE2_OBJ].Xypos[1] >= 190) {
-		if (!_G(e_streifen)) {
-			_G(e_streifen) = true;
-			e_streifen();
-		}
+	if (auto_mov_vector[SPINNE2_OBJ].Xypos[1] >= 190 && !_G(e_streifen)) {
+		_G(e_streifen) = true;
+
+		_G(auto_obj) = 3;
+		mov_phasen[ENERGIE_OBJ].AtsText = 0;
+		mov_phasen[ENERGIE_OBJ].Lines = 2;
+		mov_phasen[ENERGIE_OBJ].Repeat = 1;
+		mov_phasen[ENERGIE_OBJ].ZoomFak = 0;
+		auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
+		auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
+		auto_mov_obj[ENERGIE_OBJ].Mode = true;
+		init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], 2, (const MovLine *)SPINNE_MPKT2);
 	}
 }
 
@@ -193,57 +188,44 @@ void Room21::chewy_kolli() {
 		}
 	}
 
-	if (kolli) {
-		if (!flags.AutoAniPlay) {
-			const int16 tmp = spieler_vector[P_CHEWY].Count;
-			stop_person(P_CHEWY);
-			flags.AutoAniPlay = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			int16 ani_nr;
-			if (spieler_vector[P_CHEWY].Xyvo[0] < 0)
-				ani_nr = 10;
-			else
-				ani_nr = 11;
-
-			det->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-			start_detail_wait(ani_nr, 1, ANI_VOR);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			flags.AutoAniPlay = false;
-			spieler_vector[P_CHEWY].Count = tmp;
-			get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-			mov->continue_auto_go();
-		}
+	if (kolli && !flags.AutoAniPlay) {
+		const int16 tmp = spieler_vector[P_CHEWY].Count;
+		stop_person(P_CHEWY);
+		flags.AutoAniPlay = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		int16 ani_nr = (spieler_vector[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
+		det->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		start_detail_wait(ani_nr, 1, ANI_VOR);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.AutoAniPlay = false;
+		spieler_vector[P_CHEWY].Count = tmp;
+		get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+		mov->continue_auto_go();
 	}
 }
 
 void Room21::salto() {
-	if (!_G(spieler).inv_cur) {
-		if (atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8) {
-			if (!_G(spieler).R21Salto) {
-				if (!flags.AutoAniPlay) {
-					_G(spieler).R21Salto = true;
-					flags.AutoAniPlay = true;
-					_G(spieler).PersonHide[P_CHEWY] = true;
-
-					for (int16 i = 0; i < 3; i++) {
-						det->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
-							spieler_vector[P_CHEWY].Xypos[1]);
-					}
-
-					start_ani_block(3, ABLOCK19);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					start_aad_wait(36, -1);
-					flags.AutoAniPlay = false;
-				}
-			}
+	if (!_G(spieler).inv_cur && atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8
+		&& !_G(spieler).R21Salto && !flags.AutoAniPlay) {
+		_G(spieler).R21Salto = true;
+		flags.AutoAniPlay = true;
+		_G(spieler).PersonHide[P_CHEWY] = true;
+
+		for (int16 i = 0; i < 3; i++) {
+			det->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
+				spieler_vector[P_CHEWY].Xypos[1]);
 		}
+
+		start_ani_block(3, ABLOCK19);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		start_aad_wait(36, -1);
+		flags.AutoAniPlay = false;
 	}
 }
 
 void Room21::use_gitter_energie() {
 	_G(spieler).R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
-		AUSGANG_UNTEN, AUSGANG_OBEN,
-		(int16)_G(spieler).R21GitterEnergie);
+		AUSGANG_UNTEN, AUSGANG_OBEN, (int16)_G(spieler).R21GitterEnergie);
 	_G(auto_obj) = 0;
 	_G(spieler).R17Location = 1;
 	_G(spieler).PersonHide[P_CHEWY] = true;
@@ -258,24 +240,22 @@ void Room21::use_gitter_energie() {
 int16 Room21::use_fenster() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur) {
-		if (!flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
-			action_flag = true;
-			flags.AutoAniPlay = true;
-			_G(spieler).R18Gitter = true;
-			auto_move(13, P_CHEWY);
-			set_person_pos(541, 66, P_CHEWY, P_LEFT);
-			switch_room(18);
-
-			if (!_G(spieler).R18FirstEntry) {
-				start_aad_wait(39, -1);
-				_G(spieler).R18FirstEntry = true;
-			}
-
-			_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
-			_G(spieler).room_e_obj[41].Attribut = 255;
-			flags.AutoAniPlay = false;
+	if (!_G(spieler).inv_cur && !flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
+		action_flag = true;
+		flags.AutoAniPlay = true;
+		_G(spieler).R18Gitter = true;
+		auto_move(13, P_CHEWY);
+		set_person_pos(541, 66, P_CHEWY, P_LEFT);
+		switch_room(18);
+
+		if (!_G(spieler).R18FirstEntry) {
+			start_aad_wait(39, -1);
+			_G(spieler).R18FirstEntry = true;
 		}
+
+		_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[41].Attribut = 255;
+		flags.AutoAniPlay = false;
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room21.h b/engines/chewy/rooms/room21.h
index 592f79ec1d8..56f065102a9 100644
--- a/engines/chewy/rooms/room21.h
+++ b/engines/chewy/rooms/room21.h
@@ -28,7 +28,6 @@ namespace Rooms {
 class Room21 {
 private:
 	static void init_spinne();
-	static void e_streifen();
 	static void setup_func();
 	static void chewy_kolli();
 	static void restart_spinne2();


Commit: 22ae05e061f9a7d002e6336fa42f1443cd535bf8
    https://github.com/scummvm/scummvm/commit/22ae05e061f9a7d002e6336fa42f1443cd535bf8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Review logic of Room 18, fix a small issue

Changed paths:
    engines/chewy/rooms/room18.cpp


diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index d9c212b52b6..e442134cb73 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -93,17 +93,20 @@ void Room18::entry() {
 
 	if (_G(spieler).R18CartTerminal)
 		det->show_static_spr(23);
+
 	if (!_G(spieler).R18SurimyWurf) {
 		init_borks();
 	} else {
 		for (int16 i = 0; i < 5; i++)
 			det->hide_static_spr(BORK_SPR[i]);
+
 		for (int16 i = 0; i < (4 - (_G(spieler).R18Krone ? 1 : 0)); i++)
 			det->show_static_spr(BORK_SPR1[i]);
 	}
 
 	if (_G(spieler).R16F5Exit)
 		det->hide_static_spr(19);
+	
 	if (_G(spieler).R17EnergieOut) {
 		det->stop_detail(0);
 		atds->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -115,45 +118,44 @@ void Room18::entry() {
 		start_aad_wait(39, -1);
 		_G(spieler).R18FirstEntry = true;
 	}
+
 	if (_G(spieler).R18Gitter)
 		_G(spieler).scrolly = 0;
 }
 
 bool Room18::timer(int16 t_nr, int16 ani_nr) {
-	if (!_G(spieler).R18SurimyWurf) {
-		if (!flags.AutoAniPlay) {
-			flags.AutoAniPlay = true;
-
-			if (t_nr == _G(timer_nr)[0]) {
-				det->hide_static_spr(16);
-				start_detail_wait(10, 1, ANI_VOR);
-				det->show_static_spr(16);
-				uhr->reset_timer(_G(timer_nr)[0], 10);
-			} else if (t_nr == _G(timer_nr)[1]) {
-				hide_cur();
-				det->hide_static_spr(17);
-				start_detail_wait(9, 1, ANI_VOR);
-				det->show_static_spr(17);
-
-				if (!_G(spieler).R18SondeMoni) {
-					_G(spieler).R18SondeMoni = true;
-					start_detail_wait(2, 1, ANI_VOR);
-					det->show_static_spr(9);
-					start_detail_wait(4, 1, ANI_VOR);
-					det->show_static_spr(11);
-					wait_show_screen(50);
-					det->hide_static_spr(9);
-					det->hide_static_spr(11);
-				} else {
-					monitor();
-				}
-
-				show_cur();
-				uhr->reset_timer(_G(timer_nr)[1], 15);
+	if (!_G(spieler).R18SurimyWurf && !flags.AutoAniPlay) {
+		flags.AutoAniPlay = true;
+
+		if (t_nr == _G(timer_nr)[0]) {
+			det->hide_static_spr(16);
+			start_detail_wait(10, 1, ANI_VOR);
+			det->show_static_spr(16);
+			uhr->reset_timer(_G(timer_nr)[0], 10);
+		} else if (t_nr == _G(timer_nr)[1]) {
+			hide_cur();
+			det->hide_static_spr(17);
+			start_detail_wait(9, 1, ANI_VOR);
+			det->show_static_spr(17);
+
+			if (!_G(spieler).R18SondeMoni) {
+				_G(spieler).R18SondeMoni = true;
+				start_detail_wait(2, 1, ANI_VOR);
+				det->show_static_spr(9);
+				start_detail_wait(4, 1, ANI_VOR);
+				det->show_static_spr(11);
+				wait_show_screen(50);
+				det->hide_static_spr(9);
+				det->hide_static_spr(11);
+			} else {
+				monitor();
 			}
 
-			flags.AutoAniPlay = false;
+			show_cur();
+			uhr->reset_timer(_G(timer_nr)[1], 15);
 		}
+
+		flags.AutoAniPlay = false;
 	}
 
 	return false;
@@ -170,6 +172,7 @@ void Room18::gedAction(int index) {
 void Room18::init_borks() {
 	for (int16 i = 0; i < 5; i++)
 		det->show_static_spr(BORK_SPR[i]);
+	
 	for (int16 i = 0; i < 4; i++)
 		det->hide_static_spr(BORK_SPR1[i]);
 
@@ -186,10 +189,7 @@ void Room18::monitor() {
 	int16 nr = 0;
 	if (_G(spieler).R18MoniSwitch) {
 		start_ani_block(2, ABLOCK21);
-		if (_G(spieler).R17EnergieOut)
-			nr = 2;
-		else
-			nr = 1;
+		nr = (_G(spieler).R17EnergieOut) ? 2 : 1;
 	} else {
 		det->stop_detail(23);
 		atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -232,8 +232,8 @@ int16 Room18::calc_surimy() {
 		hide_cur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
-		det->load_taf_seq(245, 294 - 245 + 1, nullptr);
-		det->load_taf_seq(116, 170 - 116 + 1, nullptr);
+		det->load_taf_seq(245, 50, nullptr);
+		det->load_taf_seq(116, 55, nullptr);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -317,9 +317,9 @@ int16 Room18::calc_surimy() {
 		for (int16 i = 0; i < 3; i++)
 			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
 
-		atds->del_steuer_bit(179, 0, 1);
+		atds->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
-		det->del_taf_tbl(245, 50, 0);
+		det->del_taf_tbl(245, 50, nullptr);
 	}
 
 	return action_flag;


Commit: 9b437b227a702aad9384b11fdfd8c665819dd6ae
    https://github.com/scummvm/scummvm/commit/9b437b227a702aad9384b11fdfd8c665819dd6ae
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:21-08:00

Commit Message:
CHEWY: Initialize the file property when creating memory class

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/memory.cpp


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index a601f257612..361de71f007 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -28,12 +28,6 @@
 
 namespace Chewy {
 
-#define GRAFIK 1
-#define SPEICHER 2
-#define DATEI 3
-#define MAUS 4
-#define DIALOG 5
-
 #undef MAXPATH
 #define MAXPATH 1000
 
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 26f6c2d91a8..e6d116430fe 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -28,9 +28,11 @@ namespace Chewy {
 
 extern int16 modul;
 extern int16 fcode;
+
 memory::memory() {
-	file = nullptr;
+	file = new Data();
 }
+
 memory::~memory() {
 	delete (file);
 }


Commit: 04cdb08501c0e3fb94c63cb34115a8964d201697
    https://github.com/scummvm/scummvm/commit/04cdb08501c0e3fb94c63cb34115a8964d201697
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Refactored global statics for Data

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/data.h
    engines/chewy/defines.h
    engines/chewy/detail.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 361de71f007..1f6fee9b600 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -28,12 +28,6 @@
 
 namespace Chewy {
 
-#undef MAXPATH
-#define MAXPATH 1000
-
-char filename[MAXPATH];
-uint8 tmp[10000]; // FIXME
-
 extern int16 modul;
 extern int16 fcode;
 
@@ -45,18 +39,18 @@ Data::~Data() {
 
 uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	NewPhead *ph = (NewPhead *)tmp;
+	NewPhead ph;
 
 	if (rs) {
 		rs->seek(0, SEEK_SET);
-		if (!ph->load(rs)) {
+		if (!ph.load(rs)) {
 			error("select_pool_item error");
 		} else {
-			if (!strncmp(ph->id, "NGS", 3)) {
-				if (nr >= ph->PoolAnz)
-					nr = ph->PoolAnz - 1;
+			if (!strncmp(ph.id, "NGS", 3)) {
+				if (nr >= ph.PoolAnz)
+					nr = ph.PoolAnz - 1;
 
-				rs->seek(-(int)((ph->PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+				rs->seek(-(int)((ph.PoolAnz - nr) * sizeof(uint32)), SEEK_END);
 				uint32 tmp1 = rs->readUint32LE();
 				rs->seek(tmp1, SEEK_SET);
 			}
@@ -90,15 +84,15 @@ void Data::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher)
 }
 
 void Data::load_tff(const char *fname, byte *speicher) {
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
+	strncpy(_filename, fname, MAXPATH - 5);
+	_filename[MAXPATH - 5] = '\0';
 
 	if (speicher) {
-		if (!strchr(filename, '.'))
-			strcat(filename, ".tff");
+		if (!strchr(_filename, '.'))
+			strcat(_filename, ".tff");
 
 		Common::File f;
-		if (f.open(filename)) {
+		if (f.open(_filename)) {
 			tff_header *tff = (tff_header *)speicher;
 			if (tff->load(&f)) {
 				uint32 size = tff->size;
@@ -117,11 +111,11 @@ void Data::load_tff(const char *fname, byte *speicher) {
 }
 
 void Data::void_load(const char *fname, byte *speicher, uint32 size) {
-	strncpy(filename, fname, MAXPATH - 1);
-	filename[MAXPATH - 1] = '\0';
+	strncpy(_filename, fname, MAXPATH - 1);
+	_filename[MAXPATH - 1] = '\0';
 
 	Common::File f;
-	if (f.open(filename)) {
+	if (f.open(_filename)) {
 		if (!f.read(speicher, size)) {
 			error("void_load error");
 		}
@@ -134,21 +128,21 @@ void Data::void_load(const char *fname, byte *speicher, uint32 size) {
 
 uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-	ChunkHead *ch = (ChunkHead *)tmp;
+	ChunkHead ch;
 	uint32 size = 0;
 
 	if (rs) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
-		if (!ch->load(rs)) {
+		if (!ch.load(rs)) {
 			error("load_tmf error");
 		} else {
-			if (ch->type == TMFDATEI) {
-				assert(ch->size > (uint32)tmf_header::SIZE());
+			if (ch.type == TMFDATEI) {
+				assert(ch.size > (uint32)tmf_header::SIZE());
 
 				if (!song->load(rs)) {
 					error("load_tmf error");
 				} else {
-					size = ch->size + sizeof(tmf_header);
+					size = ch.size + sizeof(tmf_header);
 					byte *speicher = (byte *)song + sizeof(tmf_header);
 					speicher += ((uint32)song->pattern_anz) * 1024l;
 					for (int16 i = 0; i < 31; ++i) {
@@ -173,17 +167,17 @@ uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
 uint32 Data::size(const char *fname, int16 typ) {
 	uint32 size = 0;
 
-	strncpy(filename, fname, MAXPATH - 5);
-	filename[MAXPATH - 5] = '\0';
+	strncpy(_filename, fname, MAXPATH - 5);
+	_filename[MAXPATH - 5] = '\0';
 
-	if (!strchr(filename, '.') && typ == TFFDATEI) {
-		strcat(filename, ".tff");
+	if (!strchr(_filename, '.') && typ == TFFDATEI) {
+		strcat(_filename, ".tff");
 	}
 
 	// SCUMMVM: Note to self, use sizeof(structures) for
 	// allocating size, not custom ::SIZE() functions
 	Common::File f;
-	if (f.open(filename)) {
+	if (f.open(_filename)) {
 		switch (typ) {
 		case TFFDATEI: {
 			tff_header tff;
@@ -214,19 +208,19 @@ uint32 Data::size(const char *fname, int16 typ) {
 }
 
 uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
-	NewPhead *Nph = (NewPhead *)tmp;
+	NewPhead Nph;
 	uint32 size = 0;
 
 	Common::File f;
 	if (f.open(fname)) {
-		if (!Nph->load(&f)) {
+		if (!Nph.load(&f)) {
 			error("get_poolsize error");
 		} else {
-			if (!strncmp(Nph->id, "NGS", 3)) {
+			if (!strncmp(Nph.id, "NGS", 3)) {
 				select_pool_item(&f, chunk_start);
 				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
 
-				for (int16 i = chunk_start; (i < Nph->PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
+				for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
 					ChunkHead ch;
 					if (!ch.load(&f)) {
 						error("get_poolsize error");
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 58c19f9d20c..948d3b0c3c8 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -23,11 +23,15 @@
 #define CHEWY_DATA_H
 
 #include "chewy/chewy.h"
+#include "chewy/defines.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
 
 class Data {
+private:
+	char _filename[MAXPATH];
+
 public:
 	Data();
 	~Data();
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 53532fdfd25..a02e3648b18 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -24,6 +24,8 @@
 
 namespace Chewy {
 
+#define MAXPATH 255
+
 #define VERSION1 0
 #define VERSION2 2
 
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index c0161b14fdc..f31c549d5bd 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -22,6 +22,7 @@
 #ifndef CHEWY_DETAIL_H
 #define CHEWY_DETAIL_H
 
+#include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/ngshext.h"
 
@@ -163,7 +164,6 @@ struct RdiDateiHeader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-#define MAXPATH 255
 struct DeteditPrj {
 	char Id[7];
 	char IibFile[MAXPATH];


Commit: 47da3236ecbe2fb4fb430d4d2cda4f4ab06b5d26
    https://github.com/scummvm/scummvm/commit/47da3236ecbe2fb4fb430d4d2cda4f4ab06b5d26
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Refactored global statics for flic

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 4c332225381..a8399691b82 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -31,9 +31,6 @@ namespace Chewy {
 
 #define SOUND_SLOT_SIZE 500000
 
-static int16(*custom_user)(int16) = nullptr;
-static int16(*flic_user)(int16) = nullptr;
-
 void decode_flc(byte *vscr, const byte *dbuf) {
 	Common::MemoryReadStream src(dbuf, 0xffffffff);
 	int h = src.readUint16LE();
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index b82e40bcf84..44b549cb255 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -115,6 +115,8 @@ private:
 	byte *sounds[50];
 	uint32 Ssize[50];
 	int16 CurrentFrame;
+	int16(*custom_user)(int16) = nullptr;
+	int16(*flic_user)(int16) = nullptr;
 };
 
 } // namespace Chewy


Commit: f7e480cc40ff2444c97563331e88be44f15f45a6
    https://github.com/scummvm/scummvm/commit/f7e480cc40ff2444c97563331e88be44f15f45a6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Rename fields of io_game

Changed paths:
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h


diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 17b2cda655d..166ee112842 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -29,13 +29,13 @@
 namespace Chewy {
 
 static const int16 FILE_XY_G[7][4] = {
-	{140, 6, 156, 51},
-	{140, 55, 156, 100},
-	{163, 6, 241, 18},
-	{163, 22, 241, 34},
-	{163, 38, 241, 50},
-	{163, 54, 241, 66},
-	{ 6, 6, 133, 97}
+	{ 140,  6, 156, 51 },
+	{ 140, 55, 156, 100 },
+	{ 163,  6, 241, 18 },
+	{ 163, 22, 241, 34 },
+	{ 163, 38, 241, 50 },
+	{ 163, 54, 241, 66 },
+	{   6,  6, 133, 97 }
 };
 
 static const byte CODE_TBL_G[6] = { 72, 80, 59, 60, 61, 62 };
@@ -49,9 +49,9 @@ static const char AB_TBL_G[4][3] = {
 };
 
 io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
-	out = iout;
-	in = iin;
-	cur = curp;
+	_out = iout;
+	_in = iin;
+	_cur = curp;
 }
 
 io_game::~io_game() {
@@ -66,20 +66,20 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	int16 ret = 0;
 	char io_flag = 0;
 
-	io = iostruc;
-	inzeig = in->get_in_zeiger();
-	cur->hide_cur();
-	if (inzeig->minfo)
-		minfo = inzeig->minfo;
-	if (!inzeig->kbinfo)
-		in->neuer_kb_handler(kbinfo);
+	_io = iostruc;
+	_inzeig = _in->get_in_zeiger();
+	_cur->hide_cur();
+	if (_inzeig->minfo)
+		_minfo = _inzeig->minfo;
+	if (!_inzeig->kbinfo)
+		_in->neuer_kb_handler(_kbinfo);
 	else
-		kbinfo = inzeig->kbinfo;
+		_kbinfo = _inzeig->kbinfo;
 
-	scr_width = _G(scr_w) << 2;
-	d_klick = DOPPEL_KLICK;
-	int16 cur_y1 = io->popy + 4;
-	int16 cur_y = io->popy + 8;
+	_scrWidth = _G(scr_w) << 2;
+	_dblClick = DOPPEL_KLICK;
+	int16 cur_y1 = _io->popy + 4;
+	int16 cur_y = _io->popy + 8;
 	plot_io();
 	schalter_aus();
 
@@ -90,76 +90,76 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	i = 0;
 
 	int16 auswahl;
-	if (!io->key_nr) {
-		out->box(io->popx + 161, io->popy + 4, io->popx + 243, io->popy + 21, io->m_col[1]);
+	if (!_io->key_nr) {
+		_out->box(_io->popx + 161, _io->popy + 4, _io->popx + 243, _io->popy + 21, _io->m_col[1]);
 		auswahl = 1;
 	} else {
-		out->box(io->popx + 161, io->popy + 4 + ((io->key_nr - 1) * 16),
-		          io->popx + 243, io->popy + 21 + ((io->key_nr - 1) * 16), io->m_col[1]);
-		auswahl = (int16)io->key_nr;
-		cur_y1 = (auswahl - 1) * 16 + io->popy + 4;
+		_out->box(_io->popx + 161, _io->popy + 4 + ((_io->key_nr - 1) * 16),
+		          _io->popx + 243, _io->popy + 21 + ((_io->key_nr - 1) * 16), _io->m_col[1]);
+		auswahl = (int16)_io->key_nr;
+		cur_y1 = (auswahl - 1) * 16 + _io->popy + 4;
 	}
 
-	cur->show_cur();
-	switch_code = 1;
-	cur->wait_taste_los(true);
-	kbinfo->key_code = '\0';
-	kbinfo->scan_code = Common::KEYCODE_INVALID;
+	_cur->show_cur();
+	_switchCode = 1;
+	_cur->wait_taste_los(true);
+	_kbinfo->key_code = '\0';
+	_kbinfo->scan_code = Common::KEYCODE_INVALID;
 
-	switch ((int16)io->key_nr) {
+	switch ((int16)_io->key_nr) {
 	case 0:
-		cur->hide_cur();
+		_cur->hide_cur();
 		get_savegame_files();
 		i = 0;
-		cur_y = io->popy + 8;
+		cur_y = _io->popy + 8;
 		scroll_flag = 0;
 		if (_fileFind[0][0] != 0) {
 			if (strlen(&_fileFind[0][1]) >= 17)
-				out->
-				printnxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, 17, scr_width, &_fileFind[0][1]
+				_out->
+				printnxy(_io->popx + 28, _io->popy + 10, _io->m_col[5], 300, 17, _scrWidth, &_fileFind[0][1]
 				        );
 			else
-				out->
-				printxy(io->popx + 28, io->popy + 10, io->m_col[5], 300, scr_width, &_fileFind[0][1]);
+				_out->
+				printxy(_io->popx + 28, _io->popy + 10, _io->m_col[5], 300, _scrWidth, &_fileFind[0][1]);
 		}
-		plot_dir_liste(io->popy + 18, i + 1);
-		cur->show_cur();
+		plot_dir_liste(_io->popy + 18, i + 1);
+		_cur->show_cur();
 		break;
 	case 1:
-		in->hot_key = 59;
+		_in->hot_key = 59;
 		break;
 	case 2:
-		in->hot_key = 60;
+		_in->hot_key = 60;
 		break;
 	case 3:
-		in->hot_key = 61;
+		_in->hot_key = 61;
 		break;
 	case 4:
-		in->hot_key = 62;
+		_in->hot_key = 62;
 		break;
 	}
 
-	switch_code = 0;
+	_switchCode = 0;
 	while (ende == 0) {
 		if (mouse_f != 0) {
 			mouse_f = 0;
-			kbinfo->key_code = '\0';
+			_kbinfo->key_code = '\0';
 		}
-		cur->plot_cur();
+		_cur->plot_cur();
 
-		if (minfo->button == 1) {
-			int16 x = minfo->x;
-			y = minfo->y;
+		if (_minfo->button == 1) {
+			int16 x = _minfo->x;
+			y = _minfo->y;
 
-			j = in->maus_vector(x - io->popx, y - io->popy, (int16 *)FILE_XY_G, 7);
+			j = _in->maus_vector(x - _io->popx, y - _io->popy, (int16 *)FILE_XY_G, 7);
 
 			if (j != -1) {
 				mouse_f = 1;
 				if (j < 6)
 
-					in->hot_key = CODE_TBL_G[j];
-				if ((j == 6) && (y >= io->popy + 8)) {
-					y -= io->popy + 8;
+					_in->hot_key = CODE_TBL_G[j];
+				if ((j == 6) && (y >= _io->popy + 8)) {
+					y -= _io->popy + 8;
 					y /= 10;
 
 					if (y < (max_scroll)) {
@@ -167,68 +167,68 @@ int16 io_game::io_menu(iog_init *iostruc) {
 						if (y + scroll_flag != i) {
 							mouse_links_los = false;
 							cur_move = true;
-							cur->hide_cur();
+							_cur->hide_cur();
 
 							if (io_flag != 0)
 								unmark_eintrag(cur_y, i);
-							dklick_start = g_system->getMillis(); //clock();
+							_dblClickStart = g_system->getMillis(); //clock();
 							i = y;
-							cur_y = i * 10 + io->popy + 8;
+							cur_y = i * 10 + _io->popy + 8;
 							i += scroll_flag;
 							if (io_flag != 0)
 								mark_eintrag(cur_y, i);
-							cur->show_cur();
+							_cur->show_cur();
 						} else if (mouse_links_los) {
 							mouse_links_los = false;
-							dklick_end = g_system->getMillis(); //clock();
-							if ((dklick_end - dklick_start) / 1000 < d_klick)
-								kbinfo->key_code = 28;
+							_dblClickEnd = g_system->getMillis(); //clock();
+							if ((_dblClickEnd - _dblClickStart) / 1000 < _dblClick)
+								_kbinfo->key_code = 28;
 							else
-								dklick_start = g_system->getMillis(); //clock();
+								_dblClickStart = g_system->getMillis(); //clock();
 						}
 					}
 				} else {
 					if (j > 2) {
-						y -= io->popy + 8;
+						y -= _io->popy + 8;
 						y /= 15;
 						if (auswahl != (y + 1)) {
-							cur->hide_cur();
-							out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[5]);
+							_cur->hide_cur();
+							_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
 							auswahl = y + 1;
-							cur_y1 = (auswahl - 1) * 16 + io->popy + 4;
+							cur_y1 = (auswahl - 1) * 16 + _io->popy + 4;
 
-							out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[1]);
-							cur->show_cur();
+							_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
+							_cur->show_cur();
 						}
 					}
 				}
 			}
 		}
 
-		switch_code = in->get_switch_code();
-		switch (switch_code) {
+		_switchCode = _in->get_switch_code();
+		switch (_switchCode) {
 
 		case 72:
-			cur->hide_cur();
+			_cur->hide_cur();
 			if (!io_flag) {
 				if (auswahl > 1) {
-					out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[5]);
+					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
 					--auswahl;
 					cur_y1 -= 16;
-					out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[1]);
+					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
 				}
 			} else {
 
 				if (a != 2) {
-					out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 6,
-					              io->m_col[0], io->m_col[1], io->m_col[5]);
-					plot_ab_txt(io->m_col[1]);
+					_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6,
+					              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+					plot_ab_txt(_io->m_col[1]);
 					a = 2;
 
-					out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51, io->m_col[1], io->m_col[0], io->m_col[3]);
-					plot_auf_txt(io->m_col[2]);
+					_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+					plot_auf_txt(_io->m_col[2]);
 				}
-				if (cur_y > io->popy + 8) {
+				if (cur_y > _io->popy + 8) {
 					unmark_eintrag(cur_y, i);
 					--i;
 					cur_y -= 10;
@@ -237,32 +237,32 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					--i;
 					--scroll_flag;
 					mark_eintrag(cur_y, i);
-					plot_dir_liste(io->popy + 18, i + 1);
+					plot_dir_liste(_io->popy + 18, i + 1);
 				}
 			}
-			cur->show_cur();
+			_cur->show_cur();
 			break;
 
 		case 80:
-			cur->hide_cur();
+			_cur->hide_cur();
 			if (!io_flag) {
 				if (auswahl < 4) {
-					out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[5]);
+					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
 					++auswahl;
 					cur_y1 += 16;
-					out->box(io->popx + 161, cur_y1, io->popx + 243, cur_y1 + 17, io->m_col[1]);
+					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
 				}
 			} else {
 
 				if (a != 1) {
-					out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51, io->m_col[0], io->m_col[1], io->m_col[5]);
-					plot_auf_txt(io->m_col[1]);
+					_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+					plot_auf_txt(_io->m_col[1]);
 					a = 1;
 
-					out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 6, io->m_col[1], io->m_col[0], io->m_col[3]);
-					plot_ab_txt(io->m_col[2]);
+					_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+					plot_ab_txt(_io->m_col[2]);
 				}
-				if ((cur_y < io->popy + 6 + 9 * 9) && (i < (max_scroll - 1))) {
+				if ((cur_y < _io->popy + 6 + 9 * 9) && (i < (max_scroll - 1))) {
 					unmark_eintrag(cur_y, i);
 					++i;
 					cur_y += 10;
@@ -270,92 +270,92 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				} else if (i < (max_scroll - 1)) {
 					++i;
 					++scroll_flag;
-					plot_dir_liste(io->popy + 8, i - 8);
+					plot_dir_liste(_io->popy + 8, i - 8);
 					mark_eintrag(cur_y, i);
 				}
 			}
-			cur->show_cur();
+			_cur->show_cur();
 			break;
 
 		case 59:
-			if (io->f1) {
+			if (_io->f1) {
 				io_flag = 1;
-				cur->hide_cur();
+				_cur->hide_cur();
 				schalter_aus();
-				out->pop_box(io->popx + 163, io->popy + 6, io->popx + 241, io->popy + 18, io->m_col[1], io->m_col[0], io->m_col[3]);
-				out->printxy(io->popx + 167, io->popy + 9, io->m_col[2], 300, scr_width, FSTRING1);
+				_out->pop_box(_io->popx + 163, _io->popy + 6, _io->popx + 241, _io->popy + 18, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+				_out->printxy(_io->popx + 167, _io->popy + 9, _io->m_col[2], 300, _scrWidth, FSTRING1);
 
 				get_savegame_files();
 				i = 0;
-				cur_y = io->popy + 8;
+				cur_y = _io->popy + 8;
 				scroll_flag = 0;
-				plot_dir_liste(io->popy + 18, i + 1);
+				plot_dir_liste(_io->popy + 18, i + 1);
 				mark_eintrag(cur_y, i);
-				cur->show_cur();
-				cur->wait_taste_los(true);
+				_cur->show_cur();
+				_cur->wait_taste_los(true);
 			}
 			break;
 
 		case 60:
-			if (io->f2) {
+			if (_io->f2) {
 				io_flag = 2;
-				cur->hide_cur();
+				_cur->hide_cur();
 				schalter_aus();
-				out->pop_box(io->popx + 163, io->popy + 6 + 1 * 16, io->popx + 241, io->popy + 18 + 1 * 16, io->m_col[1], io->m_col[0], io->m_col[3]);
-				out->printxy(io->popx + 167, io->popy + 25, io->m_col[2], 300, scr_width, FSTRING2);
+				_out->pop_box(_io->popx + 163, _io->popy + 6 + 1 * 16, _io->popx + 241, _io->popy + 18 + 1 * 16, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+				_out->printxy(_io->popx + 167, _io->popy + 25, _io->m_col[2], 300, _scrWidth, FSTRING2);
 
 				get_savegame_files();
 				i = 0;
-				cur_y = io->popy + 8;
+				cur_y = _io->popy + 8;
 				scroll_flag = 0;
-				plot_dir_liste(io->popy + 18, i + 1);
+				plot_dir_liste(_io->popy + 18, i + 1);
 				mark_eintrag(cur_y, i);
-				cur->show_cur();
-				cur->wait_taste_los(true);
+				_cur->show_cur();
+				_cur->wait_taste_los(true);
 			}
 			break;
 
 		case 61:
-			if (io->f3) {
+			if (_io->f3) {
 				io_flag = 0;
-				cur->hide_cur();
+				_cur->hide_cur();
 				schalter_aus();
 				unmark_eintrag(cur_y, i);
-				out->pop_box(io->popx + 163, io->popy + 6 + 2 * 16, io->popx + 241, io->popy + 18 + 2 * 16, io->m_col[1], io->m_col[0], io->m_col[3]);
-				out->printxy(io->popx + 167, io->popy + 41, io->m_col[2], 300, scr_width, FSTRING3);
+				_out->pop_box(_io->popx + 163, _io->popy + 6 + 2 * 16, _io->popx + 241, _io->popy + 18 + 2 * 16, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+				_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[2], 300, _scrWidth, FSTRING3);
 
-				out->printxy(io->popx + 167, io->popy + 75, io->m_col[1], 300, scr_width, FSTRING5);
-				out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING6);
-				cur->show_cur();
+				_out->printxy(_io->popx + 167, _io->popy + 75, _io->m_col[1], 300, _scrWidth, FSTRING5);
+				_out->printxy(_io->popx + 167, _io->popy + 85, _io->m_col[1], 300, _scrWidth, FSTRING6);
+				_cur->show_cur();
 				ende = 0;
-				kbinfo->key_code = '\0';
-				kbinfo->scan_code = Common::KEYCODE_INVALID;
+				_kbinfo->key_code = '\0';
+				_kbinfo->scan_code = Common::KEYCODE_INVALID;
 				while (!ende) {
-					cur->plot_cur();
+					_cur->plot_cur();
 					SHOULD_QUIT_RETURN0;
 
-					switch_code = in->get_switch_code();
-					if ((kbinfo->scan_code == 36) ||
-					        (kbinfo->scan_code == 44) ||
-					        (kbinfo->scan_code == 21)) {
+					_switchCode = _in->get_switch_code();
+					if ((_kbinfo->scan_code == 36) ||
+					        (_kbinfo->scan_code == 44) ||
+					        (_kbinfo->scan_code == 21)) {
 						ende = 1;
 						ret = IOG_END;
-					} else if ((switch_code == 1) ||
-					           (kbinfo->scan_code == 49))
+					} else if ((_switchCode == 1) ||
+					           (_kbinfo->scan_code == 49))
 						break;
 				}
-				cur->wait_taste_los(true);
-				cur->hide_cur();
-				out->box_fill(io->popx + 167, io->popy + 70, io->popx + 244, io->popy + 100, io->m_col[5]);
-				out->pop_box(io->popx + 163, io->popy + 6 + 2 * 16, io->popx + 241, io->popy + 18 + 2 * 16, io->m_col[0], io->m_col[1], io->m_col[5]);
-				out->printxy(io->popx + 167, io->popy + 41, io->m_col[1], 300, scr_width, FSTRING3);
+				_cur->wait_taste_los(true);
+				_cur->hide_cur();
+				_out->box_fill(_io->popx + 167, _io->popy + 70, _io->popx + 244, _io->popy + 100, _io->m_col[5]);
+				_out->pop_box(_io->popx + 163, _io->popy + 6 + 2 * 16, _io->popx + 241, _io->popy + 18 + 2 * 16, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+				_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[1], 300, _scrWidth, FSTRING3);
 
-				cur->show_cur();
+				_cur->show_cur();
 			}
 			break;
 
 		case 62:
-			if (io->f4) {
+			if (_io->f4) {
 				io_flag = 0;
 				ende = 1;
 				ret = IOG_BACK;
@@ -367,40 +367,40 @@ int16 io_game::io_menu(iog_init *iostruc) {
 
 				if (io_flag == 1) {
 					io_flag = 0;
-					save(cur_y, i, io->save_path);
-					cur->hide_cur();
+					save(cur_y, i, _io->save_path);
+					_cur->hide_cur();
 					get_savegame_files();
 					mark_eintrag(cur_y, i);
 					schalter_aus();
 
-					cur->show_cur();
+					_cur->show_cur();
 					ret = IOG_SAVE;
 					ende = 1;
 				}
 
 				if ((io_flag == 2) && (_fileFind[i][0] == 1)) {
 
-					load(i, io->save_path);
+					load(i, _io->save_path);
 
 					ret = IOG_LOAD;
 					ende = 1;
 					io_flag = 0;
 				}
 			} else
-				in->hot_key = auswahl + 58;
+				_in->hot_key = auswahl + 58;
 			g_events->delay(200);
-			kbinfo->key_code = '\0';
+			_kbinfo->key_code = '\0';
 			break;
 
 		case 1:
 			if (io_flag != 0) {
 				io_flag = 0;
-				cur->hide_cur();
+				_cur->hide_cur();
 				schalter_aus();
 				unmark_eintrag(cur_y, i);
-				cur->show_cur();
-				cur->wait_taste_los(true);
-				kbinfo->key_code = '\0';
+				_cur->show_cur();
+				_cur->wait_taste_los(true);
+				_kbinfo->key_code = '\0';
 			} else {
 				ende = 1;
 				ret = IOG_BACK;
@@ -410,55 +410,55 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		default:
 			if (a != 0) {
 				a = 0;
-				cur->hide_cur();
-				out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51, io->m_col[0], io->m_col[1], io->m_col[5]);
-				plot_auf_txt(io->m_col[1]);
-				out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 6, io->m_col[0], io->m_col[1], io->m_col[5]);
-				plot_ab_txt(io->m_col[1]);
-				cur->show_cur();
+				_cur->hide_cur();
+				_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+				plot_auf_txt(_io->m_col[1]);
+				_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+				plot_ab_txt(_io->m_col[1]);
+				_cur->show_cur();
 			}
 
 		}
 	}
-	cur->wait_taste_los(true);
-	cur->hide_cur();
+	_cur->wait_taste_los(true);
+	_cur->hide_cur();
 	return ret;
 }
 
 void io_game::mark_eintrag(int16 y, int16 nr) {
-	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10,
-	              io->m_col[1], io->m_col[0], io->m_col[4]);
-	out->printxy(io->popx + 10, y + 2, io->m_col[2], 300, scr_width, "%d.", nr + 1);
+	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10,
+	              _io->m_col[1], _io->m_col[0], _io->m_col[4]);
+	_out->printxy(_io->popx + 10, y + 2, _io->m_col[2], 300, _scrWidth, "%d.", nr + 1);
 	if (_fileFind[nr][0] != 0) {
 		if (strlen(&_fileFind[nr][1]) >= 17)
-			out->printnxy(io->popx + 28, y + 2, io->m_col[2], 300, 17,
-			               scr_width, &_fileFind[nr][1]);
+			_out->printnxy(_io->popx + 28, y + 2, _io->m_col[2], 300, 17,
+			               _scrWidth, &_fileFind[nr][1]);
 		else
-			out->printxy(io->popx + 28, y + 2, io->m_col[2], 300,
-			              scr_width, &_fileFind[nr][1]);
-		out->box_fill(io->popx + 8, io->popy + 106, io->popx + 244, io->popy + 117,
-		               io->m_col[5]);
-		print_shad(io->popx + 8, io->popy + 106, io->m_col[0], 300, io->m_col[1],
-		           scr_width, &_fileFind[nr][1]);
+			_out->printxy(_io->popx + 28, y + 2, _io->m_col[2], 300,
+			              _scrWidth, &_fileFind[nr][1]);
+		_out->box_fill(_io->popx + 8, _io->popy + 106, _io->popx + 244, _io->popy + 117,
+		               _io->m_col[5]);
+		print_shad(_io->popx + 8, _io->popy + 106, _io->m_col[0], 300, _io->m_col[1],
+		           _scrWidth, &_fileFind[nr][1]);
 	} else {
-		out->move(io->popx + 8, io->popy + 106);
-		out->box_fill(io->popx + 8, io->popy + 106, io->popx + 244, io->popy + 117,
-		               io->m_col[5]);
+		_out->move(_io->popx + 8, _io->popy + 106);
+		_out->box_fill(_io->popx + 8, _io->popy + 106, _io->popx + 244, _io->popy + 117,
+		               _io->m_col[5]);
 
 	}
 }
 
 void io_game::unmark_eintrag(int16 y, int16 nr) {
-	out->pop_box(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[3],
-	              io->m_col[3], io->m_col[3]);
-	out->printxy(io->popx + 10, y + 2, io->m_col[5], 300, scr_width, "%d.", nr + 1);
+	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10, _io->m_col[3],
+	              _io->m_col[3], _io->m_col[3]);
+	_out->printxy(_io->popx + 10, y + 2, _io->m_col[5], 300, _scrWidth, "%d.", nr + 1);
 	if (_fileFind[nr][0] != 0) {
 		if (strlen(&_fileFind[nr][1]) >= 17)
-			out->printnxy(io->popx + 28, y + 2, io->m_col[5], 300, 17,
-			               scr_width, &_fileFind[nr][1]);
+			_out->printnxy(_io->popx + 28, y + 2, _io->m_col[5], 300, 17,
+			               _scrWidth, &_fileFind[nr][1]);
 		else
-			out->printxy(io->popx + 28, y + 2, io->m_col[5], 300,
-			              scr_width, &_fileFind[nr][1]);
+			_out->printxy(_io->popx + 28, y + 2, _io->m_col[5], 300,
+			              _scrWidth, &_fileFind[nr][1]);
 	}
 }
 
@@ -466,17 +466,17 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 	for (int16 i = start; i < start + 8; i++) {
 		if (i < 20) {
 
-			out->pop_box(io->popx + 8, cur_y + 1, io->popx + 131, cur_y + 10,
-			              io->m_col[3], io->m_col[3], io->m_col[3]);
-			out->printxy(io->popx + 10, cur_y + 2, io->m_col[5], 300,
-			              scr_width, "%d.", i + 1);
+			_out->pop_box(_io->popx + 8, cur_y + 1, _io->popx + 131, cur_y + 10,
+			              _io->m_col[3], _io->m_col[3], _io->m_col[3]);
+			_out->printxy(_io->popx + 10, cur_y + 2, _io->m_col[5], 300,
+			              _scrWidth, "%d.", i + 1);
 			if (_fileFind[i][0] != 0) {
 				if (strlen(&_fileFind[i][1]) >= 17)
-					out->printnxy(io->popx + 28, cur_y + 2, io->m_col[5], 300, 17,
-					               scr_width, &_fileFind[i][1]);
+					_out->printnxy(_io->popx + 28, cur_y + 2, _io->m_col[5], 300, 17,
+					               _scrWidth, &_fileFind[i][1]);
 				else
-					out->printxy(io->popx + 28, cur_y + 2, io->m_col[5], 300,
-					              scr_width, &_fileFind[i][1]);
+					_out->printxy(_io->popx + 28, cur_y + 2, _io->m_col[5], 300,
+					              _scrWidth, &_fileFind[i][1]);
 			}
 			cur_y += 10;
 		}
@@ -484,53 +484,53 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 }
 
 void io_game::schalter_aus() {
-	out->pop_box(io->popx + 163, io->popy + 6, io->popx + 241, io->popy + 18,
-	              io->m_col[0], io->m_col[1], io->m_col[5]);
-	if (io->f1)
-		out->printxy(io->popx + 167, io->popy + 9, io->m_col[1], 300, scr_width,
+	_out->pop_box(_io->popx + 163, _io->popy + 6, _io->popx + 241, _io->popy + 18,
+	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+	if (_io->f1)
+		_out->printxy(_io->popx + 167, _io->popy + 9, _io->m_col[1], 300, _scrWidth,
 		              FSTRING1);
-	out->pop_box(io->popx + 163, io->popy + 6 + 16, io->popx + 241, io->popy + 18 + 16,
-	              io->m_col[0], io->m_col[1], io->m_col[5]);
-	if (io->f2)
-		out->printxy(io->popx + 167, io->popy + 25, io->m_col[1], 300, scr_width,
+	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16, _io->popx + 241, _io->popy + 18 + 16,
+	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+	if (_io->f2)
+		_out->printxy(_io->popx + 167, _io->popy + 25, _io->m_col[1], 300, _scrWidth,
 		              FSTRING2);
-	out->pop_box(io->popx + 163, io->popy + 6 + 16 * 2, io->popx + 241, io->popy + 18 + 16 * 2,
-	              io->m_col[0], io->m_col[1], io->m_col[5]);
-	if (io->f3)
-		out->printxy(io->popx + 167, io->popy + 41, io->m_col[1], 300, scr_width,
+	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16 * 2, _io->popx + 241, _io->popy + 18 + 16 * 2,
+	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+	if (_io->f3)
+		_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[1], 300, _scrWidth,
 		              FSTRING3);
-	out->pop_box(io->popx + 163, io->popy + 6 + 16 * 3, io->popx + 241, io->popy + 18 + 16 * 3,
-	              io->m_col[0], io->m_col[1], io->m_col[5]);
-	if (io->f4)
-		out->printxy(io->popx + 167, io->popy + 57, io->m_col[1], 300, scr_width,
+	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16 * 3, _io->popx + 241, _io->popy + 18 + 16 * 3,
+	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+	if (_io->f4)
+		_out->printxy(_io->popx + 167, _io->popy + 57, _io->m_col[1], 300, _scrWidth,
 		              FSTRING4);
 }
 
 void io_game::plot_io() {
 	const int16 y1 = 120;
 
-	out->pop_box(io->popx, io->popy, io->popx + 248, io->popy + y1, io->m_col[0], io->m_col[1], io->m_col[5]);
-	out->pop_box(io->popx + 1, io->popy + 1, io->popx - 1 + 248, io->popy - 1 + y1, io->m_col[0], io->m_col[1], 300);
-	out->pop_box(io->popx + 6, io->popy + 6, io->popx + 133, io->popy + y1 - 20, io->m_col[1], io->m_col[0], io->m_col[3]);
-	out->pop_box(io->popx + 140, io->popy + 6, io->popx + 156, io->popy + 51, io->m_col[0], io->m_col[1], 300);
-	plot_auf_txt(io->m_col[1]);
+	_out->pop_box(_io->popx, _io->popy, _io->popx + 248, _io->popy + y1, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
+	_out->pop_box(_io->popx + 1, _io->popy + 1, _io->popx - 1 + 248, _io->popy - 1 + y1, _io->m_col[0], _io->m_col[1], 300);
+	_out->pop_box(_io->popx + 6, _io->popy + 6, _io->popx + 133, _io->popy + y1 - 20, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
+	_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], 300);
+	plot_auf_txt(_io->m_col[1]);
 
-	out->pop_box(io->popx + 140, io->popy + 55, io->popx + 156, io->popy + y1 - 20,io->m_col[0], io->m_col[1], 300);
-	plot_ab_txt(io->m_col[1]);
+	_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 20,_io->m_col[0], _io->m_col[1], 300);
+	plot_ab_txt(_io->m_col[1]);
 
 	for (int16 i = 0; i < 9; i++) {
-		out->printxy(io->popx + 10, io->popy + 10 + i * 10,io->m_col[5], 300, scr_width, "%d.", i + 1);
+		_out->printxy(_io->popx + 10, _io->popy + 10 + i * 10,_io->m_col[5], 300, _scrWidth, "%d.", i + 1);
 	}
 }
 
 void io_game::plot_auf_txt(int16 farbe) {
 	for (int16 i = 0; i < 3; i++)
-		out->printxy(io->popx + 146, io->popy + 15 + i * 10, farbe, 300, scr_width, AUF_TBL_G[i]);
+		_out->printxy(_io->popx + 146, _io->popy + 15 + i * 10, farbe, 300, _scrWidth, AUF_TBL_G[i]);
 }
 
 void io_game::plot_ab_txt(int16 farbe) {
 	for (int16 i = 0; i < 4; i++)
-		out->printxy(io->popx + 146, io->popy + 59 + i * 10, farbe, 300, scr_width, AB_TBL_G[i]);
+		_out->printxy(_io->popx + 146, _io->popy + 59 + i * 10, farbe, 300, _scrWidth, AB_TBL_G[i]);
 }
 
 void io_game::itoa(int N, char *s, int base) {
@@ -560,25 +560,25 @@ int16 io_game::get_savegame_files() {
 }
 
 void io_game::save(int16 y, int16 slotNum, char *fname) {
-	cur->wait_taste_los(true);
-	in->alter_kb_handler();
-	cur->hide_cur();
-	out->pop_box
-	(io->popx + 8, y, io->popx + 131, y + 10, io->m_col[1], io->m_col[0], io->m_col[4]);
+	_cur->wait_taste_los(true);
+	_in->alter_kb_handler();
+	_cur->hide_cur();
+	_out->pop_box
+	(_io->popx + 8, y, _io->popx + 131, y + 10, _io->m_col[1], _io->m_col[0], _io->m_col[4]);
 
-	out->printxy(io->popx + 10, y + 2, io->m_col[0], 300, scr_width, "%d.", slotNum + 1);
+	_out->printxy(_io->popx + 10, y + 2, _io->m_col[0], 300, _scrWidth, "%d.", slotNum + 1);
 	if (_fileFind[slotNum][0] == 0) {
-		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &_fileFind[slotNum][1]);
+		_out->scanxy(_io->popx + 28, y + 2, _io->m_col[0], _io->m_col[4], _io->m_col[2], _scrWidth, "%36s15", &_fileFind[slotNum][1]);
 	} else {
-		out->printxy(io->popx + 167, io->popy + 85, io->m_col[1], 300, scr_width, FSTRING7);
-		out->scanxy(io->popx + 28, y + 2, io->m_col[0], io->m_col[4], io->m_col[2], scr_width, "%36s15", &_fileFind[slotNum][1]);
+		_out->printxy(_io->popx + 167, _io->popy + 85, _io->m_col[1], 300, _scrWidth, FSTRING7);
+		_out->scanxy(_io->popx + 28, y + 2, _io->m_col[0], _io->m_col[4], _io->m_col[2], _scrWidth, "%36s15", &_fileFind[slotNum][1]);
 
 	}
-	in->neuer_kb_handler(kbinfo);
+	_in->neuer_kb_handler(_kbinfo);
 	mark_eintrag(y, slotNum);
-	out->box_fill(io->popx + 167, io->popy + 70, io->popx + 244, io->popy + 100, io->m_col[5]);
+	_out->box_fill(_io->popx + 167, _io->popy + 70, _io->popx + 244, _io->popy + 100, _io->m_col[5]);
 
-	cur->show_cur();
+	_cur->show_cur();
 
 	Common::String desc(&_fileFind[slotNum][1]);
 	(void)g_engine->saveGameState(slotNum, desc);
@@ -587,19 +587,19 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 void io_game::load(int16 slotNum, char *fname) {
 	get_savegame_files();
 
-	cur->hide_cur();
+	_cur->hide_cur();
 	if (_fileFind[slotNum][0] == 1) {
 		(void)g_engine->loadGameState(slotNum);
 	}
 }
 
 void io_game::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 width, char *name) {
-	out->printxy(x + 1, y + 1, scol, bcol, width, name);
-	out->printxy(x, y, fcol, bcol, width, name);
+	_out->printxy(x + 1, y + 1, scol, bcol, width, name);
+	_out->printxy(x, y, fcol, bcol, width, name);
 }
 
 char *io_game::io_init(iog_init *iostruc) {
-	io = iostruc;
+	_io = iostruc;
 	for (int16 i = 0; i < 20; i++)
 		_fileFind[i][0] = 0;
 	get_savegame_files();
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index d240d27c3a1..26c0dcde573 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -71,7 +71,6 @@ namespace Chewy {
 #define DOPPEL_KLICK 0.5
 
 class io_game {
-
 public:
 	io_game(McgaGraphics *out, InputMgr *in, cursor *curp);
 	~io_game();
@@ -96,21 +95,19 @@ private:
 	void plot_dir_liste(int16 cur_y, int16 start);
 	void schalter_aus();
 	int16 get_savegame_files();
-	void get_switch_code();
-
 	void itoa(int N, char *str, int base);
 
-	McgaGraphics *out;
-	InputMgr *in;
-	cursor *cur;
-	iog_init *io;
-	long dklick_start, dklick_end;
-	kb_info *kbinfo;
-	maus_info *minfo;
-	in_zeiger *inzeig;
-	int16 scr_width;
-	float d_klick;
-	int16 switch_code;
+	McgaGraphics *_out;
+	InputMgr *_in;
+	cursor *_cur;
+	iog_init *_io;
+	uint32 _dblClickStart, _dblClickEnd;
+	kb_info *_kbinfo;
+	maus_info *_minfo;
+	in_zeiger *_inzeig;
+	int16 _scrWidth;
+	float _dblClick;
+	int16 _switchCode;
 	char _fileFind[20][USER_NAME + 4];
 };
 


Commit: b7a34ca29fe4a18b2265039b23e8d44ec50f446b
    https://github.com/scummvm/scummvm/commit/b7a34ca29fe4a18b2265039b23e8d44ec50f446b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Rename atds fields

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 2f5b885f832..c25d8bdfe93 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -70,54 +70,54 @@ bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 
 atdsys::atdsys() {
 	SplitStringInit init_ssi = { nullptr, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
-	aadv.Dialog = false;
-	aadv.StrNr = -1;
-	aadv.SilentCount = false;
-	adsv.Dialog = -1;
-	adsv.AutoDia = false;
-	adsv.StrNr = -1;
-	adsv.SilentCount = false;
-	atsv.Display = false;
-	atsv.SilentCount = false;
-	atdsv.Delay = &tmp_delay;
-	tmp_delay = 1;
-	atdsv.Silent = false;
-	atdsv.Display = DISPLAY_TXT;
-	atdsv.DiaNr = -1;
-	atdsv.aad_str = 0;
-	atdsv.VocNr = -1;
-	atdsv._eventsEnabled = true;
-	ssret.Next = false;
-	ssr = &ssret;
+	_aadv.Dialog = false;
+	_aadv.StrNr = -1;
+	_aadv.SilentCount = false;
+	_adsv.Dialog = -1;
+	_adsv.AutoDia = false;
+	_adsv.StrNr = -1;
+	_adsv.SilentCount = false;
+	_atsv.Display = false;
+	_atsv.SilentCount = false;
+	_atdsv.Delay = &_tmpDelay;
+	_tmpDelay = 1;
+	_atdsv.Silent = false;
+	_atdsv.Display = DISPLAY_TXT;
+	_atdsv.DiaNr = -1;
+	_atdsv.aad_str = 0;
+	_atdsv.VocNr = -1;
+	_atdsv._eventsEnabled = true;
+	_ssret.Next = false;
+	_ssr = &_ssret;
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
-		ssi[i] = init_ssi;
-	inv_block_nr = -1;
-	inv_use_mem = nullptr;
-	inzeig = in->get_in_zeiger();
+		_ssi[i] = init_ssi;
+	_invBlockNr = -1;
+	_invUseMem = nullptr;
+	_inzeig = in->get_in_zeiger();
 }
 
 atdsys::~atdsys() {
 	for (int16 i = 0; i < MAX_HANDLE; i++)
 		close_handle(i);
 
-	if (inv_use_mem)
-		free(inv_use_mem);
+	if (_invUseMem)
+		free(_invUseMem);
 }
 
 void atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
-	atdsv.Font = font_adr;
-	atdsv.Fvorx = fvorx;
-	atdsv.Fhoehe = fhoehe;
+	_atdsv.Font = font_adr;
+	_atdsv.Fvorx = fvorx;
+	_atdsv.Fhoehe = fhoehe;
 }
 
 void atdsys::set_delay(int16 *delay, int16 silent) {
-	atdsv.Delay = delay;
-	atdsv.Silent = silent;
+	_atdsv.Delay = delay;
+	_atdsv.Silent = silent;
 }
 
 void atdsys::set_string_end_func
 (void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)) {
-	atdsv.aad_str = str_func;
+	_atdsv.aad_str = str_func;
 }
 
 void atdsys::setHasSpeech(bool hasSpeech) {
@@ -126,32 +126,32 @@ void atdsys::setHasSpeech(bool hasSpeech) {
 }
 
 void atdsys::updateSoundSettings() {
-	atdsv.Display = DISPLAY_TXT;
+	_atdsv.Display = DISPLAY_TXT;
 
 	if (_hasSpeech) {
 		// TODO: In the future, properly implement DISPLAY_ALL
 		if (!g_engine->_sound->isSpeechMuted())
-			atdsv.Display = DISPLAY_VOC;
+			_atdsv.Display = DISPLAY_VOC;
 	}
 }
 
 int16 atdsys::get_delay(int16 txt_len) {
-	int16 z_len = (ssi->Width / ssi->Fvorx) + 1;
-	int16 max_len = z_len * ssi->Zeilen;
+	int16 z_len = (_ssi->Width / _ssi->Fvorx) + 1;
+	int16 max_len = z_len * _ssi->Zeilen;
 	if (txt_len > max_len)
 		txt_len = max_len;
 
-	int16 ret = *atdsv.Delay * (txt_len + z_len);
+	int16 ret = *_atdsv.Delay * (txt_len + z_len);
 	return ret;
 }
 
 SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
-	ssret.Anz = 0;
-	ssret.Next = false;
-	ssret.StrPtr = split_ptr;
-	ssret.X = split_x;
+	_ssret.Anz = 0;
+	_ssret.Next = false;
+	_ssret.StrPtr = _splitPtr;
+	_ssret.X = _splitX;
 	int16 zeichen_anz = (ssi_->Width / ssi_->Fvorx) + 1;
-	memset(split_ptr, 0, sizeof(char *)*MAX_STR_SPLIT);
+	memset(_splitPtr, 0, sizeof(char *)*MAX_STR_SPLIT);
 	calc_txt_win(ssi_);
 	char *str_adr = ssi_->Str;
 	int16 count = 0;
@@ -177,14 +177,14 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 				++str_adr;
 				++count;
 			} else {
-				split_ptr[ssret.Anz] = start_adr;
+				_splitPtr[_ssret.Anz] = start_adr;
 				start_adr[tmp_count] = 0;
 				if (ssi_->Mode == SPLIT_MITTE)
-					split_x[ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
+					_splitX[_ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
 				else
-					split_x[ssret.Anz] = ssi_->X;
-				++ssret.Anz;
-				if (ssret.Anz == ssi_->Zeilen) {
+					_splitX[_ssret.Anz] = ssi_->X;
+				++_ssret.Anz;
+				if (_ssret.Anz == ssi_->Zeilen) {
 					ende = true;
 					bool ende1 = false;
 					while (!ende1) {
@@ -192,7 +192,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 							ende1 = true;
 						else if (*str_adr != ' ' && *str_adr != 0) {
 							ende1 = true;
-							ssret.Next = true;
+							_ssret.Next = true;
 						}
 						++str_adr;
 					}
@@ -219,25 +219,25 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 					test_zeilen = 2;
 				++count;
 				++str_adr;
-				if ((ssret.Anz + test_zeilen) >= ssi_->Zeilen) {
+				if ((_ssret.Anz + test_zeilen) >= ssi_->Zeilen) {
 					if (count < zeichen_anz) {
 						tmp_count = count;
 						ende = true;
 					}
-					split_ptr[ssret.Anz] = start_adr;
+					_splitPtr[_ssret.Anz] = start_adr;
 					start_adr[tmp_count] = 0;
 					if (ssi_->Mode == SPLIT_MITTE)
-						split_x[ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
+						_splitX[_ssret.Anz] = ssi_->X + ((ssi_->Width - (strlen(start_adr) * ssi_->Fvorx)) >> 1);
 					else
-						split_x[ssret.Anz] = ssi_->X;
-					++ssret.Anz;
+						_splitX[_ssret.Anz] = ssi_->X;
+					++_ssret.Anz;
 					bool ende1 = false;
 					while (!ende1) {
 						if (*str_adr == ATDS_END_TEXT)
 							ende1 = true;
 						else if (*str_adr != ' ' && *str_adr != 0) {
 							ende1 = true;
-							ssret.Next = true;
+							_ssret.Next = true;
 						}
 						++str_adr;
 					}
@@ -261,12 +261,12 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 
 		}
 	}
-	if (ssret.Anz <= ssi_->Zeilen)
-		ssret.Y = ssi_->Y + (ssi_->Zeilen - ssret.Anz) * ssi_->FHoehe;
+	if (_ssret.Anz <= ssi_->Zeilen)
+		_ssret.Y = ssi_->Y + (ssi_->Zeilen - _ssret.Anz) * ssi_->FHoehe;
 	else
-		ssret.Y = ssi_->Y;
+		_ssret.Y = ssi_->Y;
 
-	return &ssret;
+	return &_ssret;
 }
 
 void atdsys::str_null2leer(char *str_start, char *str_end) {
@@ -295,13 +295,13 @@ void atdsys::calc_txt_win(SplitStringInit *ssi_) {
 }
 
 void atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
-	ssi[nr] = ssinit[0];
+	_ssi[nr] = ssinit[0];
 }
 
 Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	Stream *handle = chewy_fopen(fname_, fmode);
 	if (handle) {
-		atdshandle[ATDS_HANDLE] = handle;
+		_atdshandle[ATDS_HANDLE] = handle;
 	} else {
 		error("Error reading from %s", fname_);
 	}
@@ -315,30 +315,30 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 	char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
 	if (!modul) {
 		if (rs) {
-			atdshandle[mode] = rs;
-			atdsmem[mode] = tmp_adr;
-			atdspooloff[mode] = chunk_start;
+			_atdshandle[mode] = rs;
+			_atdsmem[mode] = tmp_adr;
+			_atdspooloff[mode] = chunk_start;
 			switch (mode) {
 			case INV_USE_DATEI:
-				mem->file->select_pool_item(rs, atdspooloff[mode]);
+				mem->file->select_pool_item(rs, _atdspooloff[mode]);
 				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				if (!Ch.load(rs)) {
 					error("Error reading from %s", fname_);
 				} else {
-					free(inv_use_mem);
-					inv_use_mem = (char *)MALLOC(Ch.size + 3l);
+					free(_invUseMem);
+					_invUseMem = (char *)MALLOC(Ch.size + 3l);
 
 					if (!modul) {
 						if (Ch.size) {
-							if (!rs->read(inv_use_mem, Ch.size)) {
+							if (!rs->read(_invUseMem, Ch.size)) {
 								error("Error reading from %s", fname_);
 							} else
-								crypt(inv_use_mem, Ch.size);
+								crypt(_invUseMem, Ch.size);
 						}
-						inv_use_mem[Ch.size] = (char)BLOCKENDE;
-						inv_use_mem[Ch.size + 1] = (char)BLOCKENDE;
-						inv_use_mem[Ch.size + 2] = (char)BLOCKENDE;
+						_invUseMem[Ch.size] = (char)BLOCKENDE;
+						_invUseMem[Ch.size + 1] = (char)BLOCKENDE;
+						_invUseMem[Ch.size + 2] = (char)BLOCKENDE;
 					}
 				}
 				break;
@@ -358,16 +358,16 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 		Stream *stream = chewy_fopen(fname_, fmode);
 		if (stream) {
 			close_handle(mode);
-			atdshandle[mode] = stream;
-			atdsmem[mode] = tmp_adr;
+			_atdshandle[mode] = stream;
+			_atdsmem[mode] = tmp_adr;
 
 			switch (mode) {
 			case ADH_DATEI:
-				ads_block = (AdsBlock *)atdsmem[ADH_HANDLE];
+				_adsBlock = (AdsBlock *)_atdsmem[ADH_HANDLE];
 				break;
 
 			case INV_IDX_DATEI:
-				atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
+				_atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
 				break;
 
 			default:
@@ -380,19 +380,19 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 }
 
 void atdsys::close_handle(int16 mode) {
-	Stream *stream = atdshandle[mode];
+	Stream *stream = _atdshandle[mode];
 	if (stream) {
-		chewy_fclose(atdshandle[mode]);
+		chewy_fclose(_atdshandle[mode]);
 
 		for (int i = 0; i < MAX_HANDLE; ++i) {
-			if (atdshandle[i] == stream)
-				atdshandle[i] = nullptr;
+			if (_atdshandle[i] == stream)
+				_atdshandle[i] = nullptr;
 		}
 	}
 
-	if (atdsmem[mode])
-		free(atdsmem[mode]);
-	atdsmem[mode] = nullptr;
+	if (_atdsmem[mode])
+		free(_atdsmem[mode]);
+	_atdsmem[mode] = nullptr;
 }
 
 char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
@@ -407,11 +407,11 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 
 void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	ChunkHead Ch;
-	char *txt_adr = atdsmem[mode];
-	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(atdshandle[mode]);
+	char *txt_adr = _atdsmem[mode];
+	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(_atdshandle[mode]);
 
 	if (stream && txt_adr) {
-		mem->file->select_pool_item(stream, chunk_nr + atdspooloff[mode]);
+		mem->file->select_pool_item(stream, chunk_nr + _atdspooloff[mode]);
 		stream->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!Ch.load(stream)) {
 			error("load_atds error");
@@ -433,10 +433,10 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 
 void atdsys::save_ads_header(int16 dia_nr) {
 	ChunkHead Ch;
-	if (atdshandle[ADH_HANDLE]) {
-		mem->file->select_pool_item(atdshandle[ADH_HANDLE], dia_nr);
+	if (_atdshandle[ADH_HANDLE]) {
+		mem->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
 		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
-			atdshandle[ADH_HANDLE]);
+			_atdshandle[ADH_HANDLE]);
 
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
@@ -446,7 +446,7 @@ void atdsys::save_ads_header(int16 dia_nr) {
 			if (Ch.size) {
 				Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
 				ws->seek(rs->pos());
-				if (ws->write(atdsmem[ADH_HANDLE], Ch.size) != Ch.size) {
+				if (ws->write(_atdsmem[ADH_HANDLE], Ch.size) != Ch.size) {
 					error("save_ads_header error");
 				}
 
@@ -469,19 +469,19 @@ void atdsys::crypt(char *txt_, uint32 size) {
 void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 	switch (mode) {
 	case ATS_DATEI:
-		ats_st_header[0] = atsheader;
+		_ats_st_header[0] = atsheader;
 		break;
 
 	case INV_USE_DATEI:
-		ats_st_header[1] = atsheader;
+		_ats_st_header[1] = atsheader;
 		break;
 
 	case INV_USE_DEF:
-		ats_st_header[2] = atsheader;
+		_ats_st_header[2] = atsheader;
 		break;
 
 	case INV_ATS_DATEI:
-		ats_st_header[3] = atsheader;
+		_ats_st_header[3] = atsheader;
 		break;
 
 	default:
@@ -492,23 +492,23 @@ void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 void atdsys::set_ats_mem(int16 mode) {
 	switch (mode) {
 	case ATS_DATEI:
-		ats_sheader = ats_st_header[0];
-		atsmem = atdsmem[mode];
+		_ats_sheader = _ats_st_header[0];
+		_atsmem = _atdsmem[mode];
 		break;
 
 	case INV_USE_DATEI:
-		ats_sheader = ats_st_header[1];
-		atsmem = atdsmem[mode];
+		_ats_sheader = _ats_st_header[1];
+		_atsmem = _atdsmem[mode];
 		break;
 
 	case INV_USE_DEF:
-		ats_sheader = ats_st_header[2];
-		atsmem = inv_use_mem;
+		_ats_sheader = _ats_st_header[2];
+		_atsmem = _invUseMem;
 		break;
 
 	case INV_ATS_DATEI:
-		ats_sheader = ats_st_header[3];
-		atsmem = atdsmem[mode];
+		_ats_sheader = _ats_st_header[3];
+		_atsmem = _atdsmem[mode];
 		break;
 
 	default:
@@ -519,60 +519,60 @@ void atdsys::set_ats_mem(int16 mode) {
 bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
 	*voc_nr = -1;
 	set_ats_mem(mode);
-	if (atsmem) {
-		if (atsv.Display)
+	if (_atsmem) {
+		if (_atsv.Display)
 			stop_ats();
 
 		int16 txt_anz;
-		atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
-		if (atsv.Ptr) {
-			atsv.Display = true;
-			char *ptr = atsv.Ptr;
-			atsv.TxtLen = 0;
+		_atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
+		if (_atsv.Ptr) {
+			_atsv.Display = true;
+			char *ptr = _atsv.Ptr;
+			_atsv.TxtLen = 0;
 			while (*ptr++ != ATDS_END_TEXT)
-				++atsv.TxtLen;
-			if ((byte)*atsv.Ptr == 248) {
+				++_atsv.TxtLen;
+			if ((byte)*_atsv.Ptr == 248) {
 				// Special code for no message to display
-				atsv.Display = false;
+				_atsv.Display = false;
 			} else {
-				atsv.DelayCount = get_delay(atsv.TxtLen);
-				_printDelayCount1 = atsv.DelayCount / 10;
-				atsv.Color = color;
+				_atsv.DelayCount = get_delay(_atsv.TxtLen);
+				_printDelayCount1 = _atsv.DelayCount / 10;
+				_atsv.Color = color;
 				_mousePush = true;
 			}
-			*voc_nr = atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
-			if ((atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
-				atsv.Display = false;
+			*voc_nr = _atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
+			if ((_atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
+				_atsv.Display = false;
 			}
 		} else
-			atsv.Display = false;
+			_atsv.Display = false;
 	} else
-		atsv.Display = false;
+		_atsv.Display = false;
 
-	return atsv.Display;
+	return _atsv.Display;
 }
 
 void atdsys::stop_ats() {
-	atsv.Display = false;
+	_atsv.Display = false;
 }
 
 int16 atdsys::ats_get_status() {
-	return atsv.Display;
+	return _atsv.Display;
 }
 
 void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
-	if (atsv.Display) {
-		if (atdsv._eventsEnabled) {
+	if (_atsv.Display) {
+		if (_atdsv._eventsEnabled) {
 			switch (in->get_switch_code()) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
 				if (_mousePush == false) {
-					if (atsv.SilentCount <= 0 && atsv.DelayCount > _printDelayCount1) {
+					if (_atsv.SilentCount <= 0 && _atsv.DelayCount > _printDelayCount1) {
 						_mousePush = true;
-						atsv.DelayCount = 0;
-						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-						inzeig->kbinfo->key_code = '\0';
+						_atsv.DelayCount = 0;
+						_inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+						_inzeig->kbinfo->key_code = '\0';
 					}
 				}
 				break;
@@ -585,58 +585,58 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			_mousePush = false;
 		}
 
-		if (atsv.SilentCount <= 0) {
-			char *tmp_ptr = atsv.Ptr;
-			out->set_fontadr(atdsv.Font);
-			out->set_vorschub(atdsv.Fvorx, 0);
-			ats_ssi = ssi[0];
-			ats_ssi.Str = tmp_ptr;
-			ats_ssi.Fvorx = atdsv.Fvorx;
-			ats_ssi.FHoehe = atdsv.Fhoehe;
-			ats_ssi.X = x - scrx;
-			ats_ssi.Y = y - scry;
+		if (_atsv.SilentCount <= 0) {
+			char *tmp_ptr = _atsv.Ptr;
+			out->set_fontadr(_atdsv.Font);
+			out->set_vorschub(_atdsv.Fvorx, 0);
+			_atsSsi = _ssi[0];
+			_atsSsi.Str = tmp_ptr;
+			_atsSsi.Fvorx = _atdsv.Fvorx;
+			_atsSsi.FHoehe = _atdsv.Fhoehe;
+			_atsSsi.X = x - scrx;
+			_atsSsi.Y = y - scry;
 			char *start_ptr = tmp_ptr;
-			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
-			SplitStringInit tmp_ssi = ats_ssi;
-			ssr = split_string(&tmp_ssi);
-
-			for (int16 i = 0; i < ssr->Anz; i++) {
-				out->printxy(ssr->X[i],
-				              ssr->Y + (i * ats_ssi.FHoehe) + 1,
-				              0, 300, 0, ssr->StrPtr[i]);
-				out->printxy(ssr->X[i],
-				              ssr->Y + (i * ats_ssi.FHoehe) - 1,
-				              0, 300, 0, ssr->StrPtr[i]);
-				out->printxy(ssr->X[i] + 1,
-				              ssr->Y + (i * ats_ssi.FHoehe),
-				              0, 300, 0, ssr->StrPtr[i]);
-				out->printxy(ssr->X[i] - 1,
-				              ssr->Y + (i * ats_ssi.FHoehe),
-				              0, 300, 0, ssr->StrPtr[i]);
-				out->printxy(ssr->X[i],
-				              ssr->Y + (i * ats_ssi.FHoehe),
-				              atsv.Color,
-				              300, 0, ssr->StrPtr[i]);
-				tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+			str_null2leer(start_ptr, start_ptr + _atsv.TxtLen - 1);
+			SplitStringInit tmp_ssi = _atsSsi;
+			_ssr = split_string(&tmp_ssi);
+
+			for (int16 i = 0; i < _ssr->Anz; i++) {
+				out->printxy(_ssr->X[i],
+				              _ssr->Y + (i * _atsSsi.FHoehe) + 1,
+				              0, 300, 0, _ssr->StrPtr[i]);
+				out->printxy(_ssr->X[i],
+				              _ssr->Y + (i * _atsSsi.FHoehe) - 1,
+				              0, 300, 0, _ssr->StrPtr[i]);
+				out->printxy(_ssr->X[i] + 1,
+				              _ssr->Y + (i * _atsSsi.FHoehe),
+				              0, 300, 0, _ssr->StrPtr[i]);
+				out->printxy(_ssr->X[i] - 1,
+				              _ssr->Y + (i * _atsSsi.FHoehe),
+				              0, 300, 0, _ssr->StrPtr[i]);
+				out->printxy(_ssr->X[i],
+				              _ssr->Y + (i * _atsSsi.FHoehe),
+				              _atsv.Color,
+				              300, 0, _ssr->StrPtr[i]);
+				tmp_ptr += strlen(_ssr->StrPtr[i]) + 1;
 			}
 
-			str_null2leer(start_ptr, start_ptr + atsv.TxtLen - 1);
-			if (atsv.DelayCount <= 0) {
-				if (ssr->Next == false) {
-					atsv.Display = false;
+			str_null2leer(start_ptr, start_ptr + _atsv.TxtLen - 1);
+			if (_atsv.DelayCount <= 0) {
+				if (_ssr->Next == false) {
+					_atsv.Display = false;
 				} else {
-					atsv.Ptr = tmp_ptr;
-					atsv.TxtLen = 0;
+					_atsv.Ptr = tmp_ptr;
+					_atsv.TxtLen = 0;
 					while (*tmp_ptr++ != ATDS_END_TEXT)
-						++atsv.TxtLen;
-					atsv.DelayCount = get_delay(atsv.TxtLen);
-					_printDelayCount1 = atsv.DelayCount / 10;
-					atsv.SilentCount = atdsv.Silent;
+						++_atsv.TxtLen;
+					_atsv.DelayCount = get_delay(_atsv.TxtLen);
+					_printDelayCount1 = _atsv.DelayCount / 10;
+					_atsv.SilentCount = _atdsv.Silent;
 				}
 			} else
-				--atsv.DelayCount;
+				--_atsv.DelayCount;
 		} else
-			--atsv.SilentCount;
+			--_atsv.SilentCount;
 	}
 }
 
@@ -644,27 +644,27 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 	char *str_ = nullptr;
 	set_ats_mem(mode);
 
-	atsv.TxtMode = txt_mode;
+	_atsv.TxtMode = txt_mode;
 
 	if (!get_steuer_bit(txt_nr, ATS_AKTIV_BIT, mode)) {
-		uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2];
-		int16 ak_nybble = (atsv.TxtMode + 1) % 2;
+		uint8 status = _ats_sheader[(txt_nr * MAX_ATS_STATUS) + (_atsv.TxtMode + 1) / 2];
+		int16 ak_nybble = (_atsv.TxtMode + 1) % 2;
 
 		uint8 lo_hi[2];
 		lo_hi[1] = status >> 4;
 		lo_hi[0] = status &= 15;
-		str_ = ats_search_block(atsv.TxtMode, atsmem);
+		str_ = ats_search_block(_atsv.TxtMode, _atsmem);
 		if (str_ != nullptr) {
 			ats_search_nr(txt_nr, &str_);
 			if (str_ != nullptr) {
-				ats_search_str(txt_anz, &lo_hi[ak_nybble], (uint8)ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
+				ats_search_str(txt_anz, &lo_hi[ak_nybble], (uint8)_ats_sheader[txt_nr * MAX_ATS_STATUS], &str_);
 
 				if (str_ != nullptr) {
 					status = 0;
 					lo_hi[1] <<= 4;
 					status |= lo_hi[0];
 					status |= lo_hi[1];
-					ats_sheader[(txt_nr * MAX_ATS_STATUS) + (atsv.TxtMode + 1) / 2] = status;
+					_ats_sheader[(txt_nr * MAX_ATS_STATUS) + (_atsv.TxtMode + 1) / 2] = status;
 				}
 			}
 		}
@@ -687,7 +687,7 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 
 void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
 	set_ats_mem(mode);
-	uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	uint8 status = _ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
 	int16 ak_nybble = (txt_mode + 1) % 2;
 
 	uint8 lo_hi[2];
@@ -698,7 +698,7 @@ void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode)
 	lo_hi[1] <<= 4;
 	status |= lo_hi[0];
 	status |= lo_hi[1];
-	ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2] = status;
+	_ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2] = status;
 }
 
 void atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
@@ -708,7 +708,7 @@ void atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
 
 int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 	set_ats_mem(mode);
-	uint8 status = ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
+	uint8 status = _ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
 	int16 ak_nybble = (txt_mode + 1) % 2;
 
 	uint8 lo_hi[2];
@@ -720,18 +720,18 @@ int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 int16 atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	int16 ret = bit->is_bit(ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	int16 ret = bit->is_bit(_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 	return ret;
 }
 
 void atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	bit->set_bit(&ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	bit->set_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
 void atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	bit->del_bit(&ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	bit->del_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
 char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
@@ -762,16 +762,16 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	bool done1 = false;
 	while (!done1) {
 		Common::MemoryReadStream rs1((const byte *)start_str, AtsTxtHeader::SIZE());
-		atsv.TxtHeader.load(&rs1);
+		_atsv.TxtHeader.load(&rs1);
 
-		if (atsv.TxtHeader.TxtNr == 0xFEF0 &&
-				atsv.TxtHeader.AMov == txt_nr) {
+		if (_atsv.TxtHeader.TxtNr == 0xFEF0 &&
+				_atsv.TxtHeader.AMov == txt_nr) {
 			// Found match
 			*str_ = start_str + AtsTxtHeader::SIZE();
 
-			if (atsv.TxtMode) {
+			if (_atsv.TxtMode) {
 				Common::MemoryReadStream rs2((const byte *)*str_, AtsStrHeader::SIZE());
-				atsv.StrHeader.load(&rs2);
+				_atsv.StrHeader.load(&rs2);
 			}
 
 			*str_ += AtsStrHeader::SIZE();
@@ -817,10 +817,10 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 				*str_ = start_str;
 				start_str -= AtsStrHeader::SIZE();
 
-				if (atsv.TxtMode != TXT_MARK_NAME) {
+				if (_atsv.TxtMode != TXT_MARK_NAME) {
 					Common::MemoryReadStream rs((const byte *)start_str,
 						AtsStrHeader::SIZE());
-					atsv.StrHeader.load(&rs);
+					_atsv.StrHeader.load(&rs);
 				}
 
 				if (tmp_str[1] != ATDS_END) {
@@ -840,10 +840,10 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 					*status = count;
 					*str_ = start_str;
 					start_str -= AtsStrHeader::SIZE();
-					if (atsv.TxtMode != TXT_MARK_NAME) {
+					if (_atsv.TxtMode != TXT_MARK_NAME) {
 						Common::MemoryReadStream rs((const byte *)start_str,
 							AtsStrHeader::SIZE());
-						atsv.StrHeader.load(&rs);
+						_atsv.StrHeader.load(&rs);
 					}
 				} else {
 					++count;
@@ -866,54 +866,54 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 }
 
 int16 atdsys::start_aad(int16 dia_nr) {
-	if (aadv.Dialog)
+	if (_aadv.Dialog)
 		stop_aad();
 
-	if (atdsmem[AAD_HANDLE]) {
-		aadv.Ptr = atdsmem[AAD_HANDLE];
-		aad_search_dia(dia_nr, &aadv.Ptr);
-		if (aadv.Ptr) {
-			aadv.Person = (AadInfo *)aadv.Ptr;
-			aadv.Ptr += aadv.TxtHeader->PerAnz * sizeof(AadInfo);
-			aadv.Dialog = true;
-			aadv.StrNr = 0;
-			aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
-			aadv.Ptr += sizeof(AadStrHeader);
+	if (_atdsmem[AAD_HANDLE]) {
+		_aadv.Ptr = _atdsmem[AAD_HANDLE];
+		aad_search_dia(dia_nr, &_aadv.Ptr);
+		if (_aadv.Ptr) {
+			_aadv.Person = (AadInfo *)_aadv.Ptr;
+			_aadv.Ptr += _aadv.TxtHeader->PerAnz * sizeof(AadInfo);
+			_aadv.Dialog = true;
+			_aadv.StrNr = 0;
+			_aadv.StrHeader = (AadStrHeader *)_aadv.Ptr;
+			_aadv.Ptr += sizeof(AadStrHeader);
 			int16 txt_len;
-			aad_get_zeilen(aadv.Ptr, &txt_len);
-			aadv.DelayCount = get_delay(txt_len);
-			_printDelayCount1 = aadv.DelayCount / 10;
+			aad_get_zeilen(_aadv.Ptr, &txt_len);
+			_aadv.DelayCount = get_delay(txt_len);
+			_printDelayCount1 = _aadv.DelayCount / 10;
 
-			atdsv.DiaNr = dia_nr;
-			if (atdsv.aad_str != nullptr)
-				atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
+			_atdsv.DiaNr = dia_nr;
+			if (_atdsv.aad_str != nullptr)
+				_atdsv.aad_str(_atdsv.DiaNr, 0, _aadv.StrHeader->AkPerson, AAD_STR_START);
 			_mousePush = true;
 			stop_ats();
-			atdsv.VocNr = -1;
+			_atdsv.VocNr = -1;
 		}
 	}
 
-	return aadv.Dialog;
+	return _aadv.Dialog;
 }
 
 void atdsys::stop_aad() {
-	aadv.Dialog = false;
-	aadv.StrNr = -1;
+	_aadv.Dialog = false;
+	_aadv.StrNr = -1;
 }
 
 void atdsys::print_aad(int16 scrx, int16 scry) {
-	if (aadv.Dialog) {
-		if (atdsv._eventsEnabled) {
+	if (_aadv.Dialog) {
+		if (_atdsv._eventsEnabled) {
 			switch (in->get_switch_code()) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
 				if (_mousePush == false) {
-					if (aadv.SilentCount <= 0 && aadv.DelayCount > _printDelayCount1) {
+					if (_aadv.SilentCount <= 0 && _aadv.DelayCount > _printDelayCount1) {
 						_mousePush = true;
-						aadv.DelayCount = 0;
-						inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-						inzeig->kbinfo->key_code = '\0';
+						_aadv.DelayCount = 0;
+						_inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
+						_inzeig->kbinfo->key_code = '\0';
 					}
 				}
 				break;
@@ -926,117 +926,117 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 			_mousePush = false;
 		}
 
-		if (aadv.SilentCount <= 0) {
-			char *tmp_ptr = aadv.Ptr;
-			out->set_fontadr(atdsv.Font);
-			out->set_vorschub(atdsv.Fvorx, 0);
-			ssi[aadv.StrHeader->AkPerson].Str = tmp_ptr;
-			if (aadv.Person[aadv.StrHeader->AkPerson].X != -1) {
-				ssi[aadv.StrHeader->AkPerson].X = aadv.Person[aadv.StrHeader->AkPerson].X - scrx;
+		if (_aadv.SilentCount <= 0) {
+			char *tmp_ptr = _aadv.Ptr;
+			out->set_fontadr(_atdsv.Font);
+			out->set_vorschub(_atdsv.Fvorx, 0);
+			_ssi[_aadv.StrHeader->AkPerson].Str = tmp_ptr;
+			if (_aadv.Person[_aadv.StrHeader->AkPerson].X != -1) {
+				_ssi[_aadv.StrHeader->AkPerson].X = _aadv.Person[_aadv.StrHeader->AkPerson].X - scrx;
 			}
-			if (aadv.Person[aadv.StrHeader->AkPerson].Y != -1) {
-				ssi[aadv.StrHeader->AkPerson].Y = aadv.Person[aadv.StrHeader->AkPerson].Y - scry;
+			if (_aadv.Person[_aadv.StrHeader->AkPerson].Y != -1) {
+				_ssi[_aadv.StrHeader->AkPerson].Y = _aadv.Person[_aadv.StrHeader->AkPerson].Y - scry;
 			}
-			ssi[aadv.StrHeader->AkPerson].Fvorx = atdsv.Fvorx;
-			ssi[aadv.StrHeader->AkPerson].FHoehe = atdsv.Fhoehe;
+			_ssi[_aadv.StrHeader->AkPerson].Fvorx = _atdsv.Fvorx;
+			_ssi[_aadv.StrHeader->AkPerson].FHoehe = _atdsv.Fhoehe;
 			char *start_ptr = tmp_ptr;
 			int16 txt_len;
 			aad_get_zeilen(start_ptr, &txt_len);
 			str_null2leer(start_ptr, start_ptr + txt_len - 1);
-			SplitStringInit tmp_ssi = ssi[aadv.StrHeader->AkPerson];
-			ssr = split_string(&tmp_ssi);
-
-			if (atdsv.Display == DISPLAY_TXT ||
-			        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
-				for (int16 i = 0; i < ssr->Anz; i++) {
-					out->printxy(ssr->X[i] + 1,
-					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
-					              0, 300, 0, ssr->StrPtr[i]);
-					out->printxy(ssr->X[i] - 1,
-					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
-					              0, 300, 0, ssr->StrPtr[i]);
-					out->printxy(ssr->X[i],
-					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe) + 1,
-					              0, 300, 0, ssr->StrPtr[i]);
-					out->printxy(ssr->X[i],
-					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe) - 1,
-					              0, 300, 0, ssr->StrPtr[i]);
-					out->printxy(ssr->X[i],
-					              ssr->Y + (i * ssi[aadv.StrHeader->AkPerson].FHoehe),
-					              aadv.Person[aadv.StrHeader->AkPerson].Color,
-					              300, 0, ssr->StrPtr[i]);
-					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+			SplitStringInit tmp_ssi = _ssi[_aadv.StrHeader->AkPerson];
+			_ssr = split_string(&tmp_ssi);
+
+			if (_atdsv.Display == DISPLAY_TXT ||
+			        (_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
+				for (int16 i = 0; i < _ssr->Anz; i++) {
+					out->printxy(_ssr->X[i] + 1,
+					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
+					              0, 300, 0, _ssr->StrPtr[i]);
+					out->printxy(_ssr->X[i] - 1,
+					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
+					              0, 300, 0, _ssr->StrPtr[i]);
+					out->printxy(_ssr->X[i],
+					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) + 1,
+					              0, 300, 0, _ssr->StrPtr[i]);
+					out->printxy(_ssr->X[i],
+					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) - 1,
+					              0, 300, 0, _ssr->StrPtr[i]);
+					out->printxy(_ssr->X[i],
+					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
+					              _aadv.Person[_aadv.StrHeader->AkPerson].Color,
+					              300, 0, _ssr->StrPtr[i]);
+					tmp_ptr += strlen(_ssr->StrPtr[i]) + 1;
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
 
-			} else if (atdsv.Display == DISPLAY_VOC) {
-				if (atdsv.VocNr != aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
-					atdsv.VocNr = aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
-					g_engine->_sound->playSpeech(atdsv.VocNr);
-					int16 vocx = spieler_vector[aadv.StrHeader->AkPerson].Xypos[0] -
-								 _G(spieler).scrollx + spieler_mi[aadv.StrHeader->AkPerson].HotX;
+			} else if (_atdsv.Display == DISPLAY_VOC) {
+				if (_atdsv.VocNr != _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
+					_atdsv.VocNr = _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
+					g_engine->_sound->playSpeech(_atdsv.VocNr);
+					int16 vocx = spieler_vector[_aadv.StrHeader->AkPerson].Xypos[0] -
+								 _G(spieler).scrollx + spieler_mi[_aadv.StrHeader->AkPerson].HotX;
 					g_engine->_sound->setSoundChannelBalance(0, getStereoPos(vocx));
-					aadv.DelayCount = 1;
+					_aadv.DelayCount = 1;
 				}
 
-				for (int16 i = 0; i < ssr->Anz; i++) {
-					tmp_ptr += strlen(ssr->StrPtr[i]) + 1;
+				for (int16 i = 0; i < _ssr->Anz; i++) {
+					tmp_ptr += strlen(_ssr->StrPtr[i]) + 1;
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
 			}
 
-			if (aadv.DelayCount <= 0) {
-				aadv.Ptr = tmp_ptr;
+			if (_aadv.DelayCount <= 0) {
+				_aadv.Ptr = tmp_ptr;
 				while (*tmp_ptr == ' ' || *tmp_ptr == 0)
 					++tmp_ptr;
 				if (tmp_ptr[1] == ATDS_END ||
 				        tmp_ptr[1] == ATDS_END_EINTRAG) {
-					if (atdsv.aad_str != 0)
-						atdsv.aad_str(atdsv.DiaNr, aadv.StrNr, aadv.StrHeader->AkPerson, AAD_STR_END);
-					aadv.Dialog = false;
-					adsv.AutoDia = false;
-					aadv.StrNr = -1;
-					ssret.Next = false;
+					if (_atdsv.aad_str != 0)
+						_atdsv.aad_str(_atdsv.DiaNr, _aadv.StrNr, _aadv.StrHeader->AkPerson, AAD_STR_END);
+					_aadv.Dialog = false;
+					_adsv.AutoDia = false;
+					_aadv.StrNr = -1;
+					_ssret.Next = false;
 				} else {
-					if (ssr->Next == false) {
-						++aadv.StrNr;
-						while (*aadv.Ptr++ != ATDS_END_TEXT);
-
-						int16 tmp_person = aadv.StrHeader->AkPerson;
-						int16 tmp_str_nr = aadv.StrNr;
-						aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
-						aadv.Ptr += sizeof(AadStrHeader);
-						if (atdsv.aad_str != nullptr) {
-							if (tmp_person != aadv.StrHeader->AkPerson) {
-								atdsv.aad_str(atdsv.DiaNr, tmp_str_nr, tmp_person, AAD_STR_END);
-								atdsv.aad_str(atdsv.DiaNr, aadv.StrNr, aadv.StrHeader->AkPerson, AAD_STR_START);
+					if (_ssr->Next == false) {
+						++_aadv.StrNr;
+						while (*_aadv.Ptr++ != ATDS_END_TEXT);
+
+						int16 tmp_person = _aadv.StrHeader->AkPerson;
+						int16 tmp_str_nr = _aadv.StrNr;
+						_aadv.StrHeader = (AadStrHeader *)_aadv.Ptr;
+						_aadv.Ptr += sizeof(AadStrHeader);
+						if (_atdsv.aad_str != nullptr) {
+							if (tmp_person != _aadv.StrHeader->AkPerson) {
+								_atdsv.aad_str(_atdsv.DiaNr, tmp_str_nr, tmp_person, AAD_STR_END);
+								_atdsv.aad_str(_atdsv.DiaNr, _aadv.StrNr, _aadv.StrHeader->AkPerson, AAD_STR_START);
 							}
 						}
 					}
-					aad_get_zeilen(aadv.Ptr, &txt_len);
-					aadv.DelayCount = get_delay(txt_len);
-					_printDelayCount1 = aadv.DelayCount / 10;
-					aadv.SilentCount = atdsv.Silent;
+					aad_get_zeilen(_aadv.Ptr, &txt_len);
+					_aadv.DelayCount = get_delay(txt_len);
+					_printDelayCount1 = _aadv.DelayCount / 10;
+					_aadv.SilentCount = _atdsv.Silent;
 				}
 			} else {
-				if (atdsv.Display == DISPLAY_TXT ||
-				        (aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1)
-					--aadv.DelayCount;
+				if (_atdsv.Display == DISPLAY_TXT ||
+				        (_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1)
+					--_aadv.DelayCount;
 
-				else if (atdsv.Display == DISPLAY_VOC) {
+				else if (_atdsv.Display == DISPLAY_VOC) {
 					warning("FIXME - unknown constant SMP_PLAYING");
 
-					aadv.DelayCount = 0;
+					_aadv.DelayCount = 0;
 				}
 			}
 		} else {
-			--aadv.SilentCount;
+			--_aadv.SilentCount;
 		}
 	}
 }
 
 int16 atdsys::aad_get_status() {
-	return aadv.StrNr;
+	return _aadv.StrNr;
 }
 
 int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
@@ -1065,7 +1065,7 @@ void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 			uint16 *pos = (uint16 *)start_ptr;
 			if (pos[0] == dia_nr) {
 				ende = true;
-				aadv.TxtHeader = (AadTxtHeader *)start_ptr;
+				_aadv.TxtHeader = (AadTxtHeader *)start_ptr;
 				*ptr = start_ptr + sizeof(AadTxtHeader);
 			} else {
 				start_ptr += sizeof(AadTxtHeader) + pos[1] * sizeof(AadInfo);
@@ -1098,22 +1098,22 @@ bool  atdsys::ads_start(int16 dia_nr) {
 	load_atds(dia_nr, ADS_DATEI);
 	if (!modul) {
 		bool ende = false;
-		if (atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
-		        atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
-		        atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
+		if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
+		        _atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
+		        _atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
 			ende = true;
 		if (!ende) {
-			adsv.Ptr = atdsmem[ADS_HANDLE];
-			adsv.TxtHeader = (AdsTxtHeader *)adsv.Ptr;
-			if (adsv.TxtHeader->DiaNr == dia_nr) {
+			_adsv.Ptr = _atdsmem[ADS_HANDLE];
+			_adsv.TxtHeader = (AdsTxtHeader *)_adsv.Ptr;
+			if (_adsv.TxtHeader->DiaNr == dia_nr) {
 				ret = true;
-				adsv.Ptr += sizeof(AdsTxtHeader);
-				adsv.Person = (AadInfo *) adsv.Ptr;
-				adsv.Ptr += adsv.TxtHeader->PerAnz * sizeof(AadInfo);
-				adsv.Dialog = dia_nr;
-				adsv.StrNr = 0;
-				ads_stack[0] = 0;
-				ads_stack_ptr = 1;
+				_adsv.Ptr += sizeof(AdsTxtHeader);
+				_adsv.Person = (AadInfo *) _adsv.Ptr;
+				_adsv.Ptr += _adsv.TxtHeader->PerAnz * sizeof(AadInfo);
+				_adsv.Dialog = dia_nr;
+				_adsv.StrNr = 0;
+				_adsStack[0] = 0;
+				_adsStackPtr = 1;
 			}
 		}
 	}
@@ -1121,18 +1121,18 @@ bool  atdsys::ads_start(int16 dia_nr) {
 }
 
 void atdsys::stop_ads() {
-	adsv.Dialog = -1;
-	adsv.AutoDia = false;
+	_adsv.Dialog = -1;
+	_adsv.AutoDia = false;
 
 }
 
 int16 atdsys::ads_get_status() {
-	return adsv.Dialog;
+	return _adsv.Dialog;
 }
 
 int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
 	int16 ret = true;
-	char *tmp_adr = adsv.Ptr;
+	char *tmp_adr = _adsv.Ptr;
 	ads_search_block(block_nr, &tmp_adr);
 	if (tmp_adr) {
 		ads_search_item(item_nr, &tmp_adr);
@@ -1145,20 +1145,20 @@ int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
 
 char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 	*anzahl = 0;
-	memset(e_ptr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
-	if (adsv.Dialog != -1) {
-		adsv.BlkPtr = adsv.Ptr;
-		ads_search_block(block_nr, &adsv.BlkPtr);
-		if (adsv.BlkPtr) {
+	memset(_ePtr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
+	if (_adsv.Dialog != -1) {
+		_adsv.BlkPtr = _adsv.Ptr;
+		ads_search_block(block_nr, &_adsv.BlkPtr);
+		if (_adsv.BlkPtr) {
 			for (int16 i = 0; i < ADS_MAX_BL_EIN; i++) {
-				char *tmp_adr = adsv.BlkPtr;
+				char *tmp_adr = _adsv.BlkPtr;
 				ads_search_item(i, &tmp_adr);
 				if (tmp_adr) {
 					char nr = tmp_adr[-1];
 					tmp_adr += sizeof(AadStrHeader);
-					if (ads_block[block_nr].Show[(int16)nr] == true) {
-						e_ptr[*anzahl] = tmp_adr;
-						e_nr[*anzahl] = (int16)nr;
+					if (_adsBlock[block_nr].Show[(int16)nr] == true) {
+						_ePtr[*anzahl] = tmp_adr;
+						_eNr[*anzahl] = (int16)nr;
 						++(*anzahl);
 					}
 				}
@@ -1166,75 +1166,75 @@ char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 		}
 	}
 
-	return e_ptr;
+	return _ePtr;
 }
 
 AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
-	adsnb.BlkNr = blk_nr;
-	if (!aadv.Dialog) {
-		if (!adsv.AutoDia) {
-			ads_search_item(e_nr[item_nr], &adsv.BlkPtr);
-			if (adsv.BlkPtr) {
-				if (start_ads_auto_dia(adsv.BlkPtr))
-					adsv.AutoDia = true;
-				if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_EXIT_BIT) == true) {
+	_adsnb.BlkNr = blk_nr;
+	if (!_aadv.Dialog) {
+		if (!_adsv.AutoDia) {
+			ads_search_item(_eNr[item_nr], &_adsv.BlkPtr);
+			if (_adsv.BlkPtr) {
+				if (start_ads_auto_dia(_adsv.BlkPtr))
+					_adsv.AutoDia = true;
+				if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_EXIT_BIT) == true) {
 					stop_ads();
-					adsnb.EndNr = e_nr[item_nr];
-					adsnb.BlkNr = -1;
+					_adsnb.EndNr = _eNr[item_nr];
+					_adsnb.BlkNr = -1;
 				}
 			}
 		}
 	}
 
-	return &adsnb;
+	return &_adsnb;
 }
 
 AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
-	if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_SHOW_BIT) == false)
-		ads_block[blk_nr].Show[e_nr[item_nr]] = false;
-	adsnb.EndNr = e_nr[item_nr];
-	if (bit->is_bit((uint8)ads_block[blk_nr].Steuer[e_nr[item_nr]], ADS_RESTART_BIT) == true) {
-		adsnb.BlkNr = 0;
+	if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_SHOW_BIT) == false)
+		_adsBlock[blk_nr].Show[_eNr[item_nr]] = false;
+	_adsnb.EndNr = _eNr[item_nr];
+	if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_RESTART_BIT) == true) {
+		_adsnb.BlkNr = 0;
 
-		ads_stack_ptr = 0;
+		_adsStackPtr = 0;
 	} else {
-		if (ads_block[blk_nr].Next[e_nr[item_nr]]) {
-			adsnb.BlkNr = ads_block[blk_nr].Next[e_nr[item_nr]];
+		if (_adsBlock[blk_nr].Next[_eNr[item_nr]]) {
+			_adsnb.BlkNr = _adsBlock[blk_nr].Next[_eNr[item_nr]];
 
 			int16 anzahl = 0;
-			while (!anzahl && adsnb.BlkNr != -1) {
+			while (!anzahl && _adsnb.BlkNr != -1) {
 
 				anzahl = 0;
-				ads_item_ptr(adsnb.BlkNr, &anzahl);
+				ads_item_ptr(_adsnb.BlkNr, &anzahl);
 				if (!anzahl) {
-					adsnb.BlkNr = return_block(ads_block);
+					_adsnb.BlkNr = return_block(_adsBlock);
 				}
 			}
 		} else {
-			adsnb.BlkNr = return_block(ads_block);
+			_adsnb.BlkNr = return_block(_adsBlock);
 		}
 	}
-	ads_stack[ads_stack_ptr] = adsnb.BlkNr;
-	++ads_stack_ptr;
+	_adsStack[_adsStackPtr] = _adsnb.BlkNr;
+	++_adsStackPtr;
 
-	return &adsnb;
+	return &_adsnb;
 }
 
 int16 atdsys::return_block(AdsBlock *ab) {
-	ads_stack_ptr -= 1;
+	_adsStackPtr -= 1;
 	int16 ret = -1;
 	bool ende = false;
-	while (ads_stack_ptr >= 0 && !ende) {
-		short blk_nr = ads_stack[ads_stack_ptr];
+	while (_adsStackPtr >= 0 && !ende) {
+		short blk_nr = _adsStack[_adsStackPtr];
 		int16 anz;
 		ads_item_ptr(blk_nr, &anz);
 		if (anz) {
 			ret = blk_nr;
 			ende = true;
 		} else
-			--ads_stack_ptr;
+			--_adsStackPtr;
 	}
-	++ads_stack_ptr;
+	++_adsStackPtr;
 	return ret;
 }
 
@@ -1276,50 +1276,50 @@ void atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
 }
 
 int16 atdsys::start_ads_auto_dia(char *item_adr) {
-	aadv.Dialog = false;
+	_aadv.Dialog = false;
 	if (item_adr) {
-		aadv.Person = adsv.Person;
-		aadv.Ptr = item_adr;
-		aadv.Dialog = true;
-		aadv.StrNr = 0;
-		aadv.StrHeader = (AadStrHeader *)aadv.Ptr;
-		aadv.Ptr += sizeof(AadStrHeader);
+		_aadv.Person = _adsv.Person;
+		_aadv.Ptr = item_adr;
+		_aadv.Dialog = true;
+		_aadv.StrNr = 0;
+		_aadv.StrHeader = (AadStrHeader *)_aadv.Ptr;
+		_aadv.Ptr += sizeof(AadStrHeader);
 		int16 txt_len;
-		aad_get_zeilen(aadv.Ptr, &txt_len);
-		aadv.DelayCount = get_delay(txt_len);
-		atdsv.DiaNr = adsv.TxtHeader->DiaNr + 10000;
+		aad_get_zeilen(_aadv.Ptr, &txt_len);
+		_aadv.DelayCount = get_delay(txt_len);
+		_atdsv.DiaNr = _adsv.TxtHeader->DiaNr + 10000;
 
-		if (atdsv.aad_str != nullptr)
-			atdsv.aad_str(atdsv.DiaNr, 0, aadv.StrHeader->AkPerson, AAD_STR_START);
+		if (_atdsv.aad_str != nullptr)
+			_atdsv.aad_str(_atdsv.DiaNr, 0, _aadv.StrHeader->AkPerson, AAD_STR_START);
 		_mousePush = true;
 		stop_ats();
 	} else {
-		aadv.Dialog = false;
+		_aadv.Dialog = false;
 	}
 
-	return aadv.Dialog;
+	return _aadv.Dialog;
 }
 
 void atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
-	if (adsv.Dialog == dia_nr) {
+	if (_adsv.Dialog == dia_nr) {
 		if (check_item(blk_nr, item_nr))
-			ads_block[blk_nr].Show[item_nr] = false;
+			_adsBlock[blk_nr].Show[item_nr] = false;
 	} else {
 		load_atds(dia_nr, ADH_DATEI);
 		if (check_item(blk_nr, item_nr))
-			ads_block[blk_nr].Show[item_nr] = false;
+			_adsBlock[blk_nr].Show[item_nr] = false;
 		save_ads_header(dia_nr);
 	}
 }
 
 void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
-	if (adsv.Dialog == dia_nr) {
+	if (_adsv.Dialog == dia_nr) {
 		if (check_item(blk_nr, item_nr))
-			ads_block[blk_nr].Show[item_nr] = true;
+			_adsBlock[blk_nr].Show[item_nr] = true;
 	} else {
 		load_atds(dia_nr, ADH_DATEI);
 		if (check_item(blk_nr, item_nr))
-			ads_block[blk_nr].Show[item_nr] = true;
+			_adsBlock[blk_nr].Show[item_nr] = true;
 		save_ads_header(dia_nr);
 	}
 }
@@ -1327,17 +1327,17 @@ void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 	int16 txt_nr = -1;
 	if (cur_inv != -1) {
-		if (inv_block_nr != cur_inv) {
-			inv_block_nr = cur_inv + 1;
-			load_atds(inv_block_nr + atdspooloff[mode], INV_USE_DATEI);
+		if (_invBlockNr != cur_inv) {
+			_invBlockNr = cur_inv + 1;
+			load_atds(_invBlockNr + _atdspooloff[mode], INV_USE_DATEI);
 
 			Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
-				atdshandle[INV_IDX_HANDLE]);
+				_atdshandle[INV_IDX_HANDLE]);
 			if (rs) {
-				rs->seek(InvUse::SIZE() * inv_block_nr
+				rs->seek(InvUse::SIZE() * _invBlockNr
 				      * INV_STRC_ANZ, SEEK_SET);
 
-				InvUse *iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
+				InvUse *iu = (InvUse *)_atdsmem[INV_IDX_HANDLE];
 				for (int16 i = 0; i < INV_STRC_ANZ; ++i, ++iu) {
 					if (!iu->load(rs)) {
 						error("calc_inv_no_use error");
@@ -1349,7 +1349,7 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 			}
 		}
 
-		InvUse *iu = (InvUse *)atdsmem[INV_IDX_HANDLE];
+		InvUse *iu = (InvUse *)_atdsmem[INV_IDX_HANDLE];
 		bool ok = false;
 
 		for (int16 i = 0; i < INV_STRC_ANZ && !ok; i++) {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 1fe934b671e..19f84133f19 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -58,15 +58,10 @@ namespace Chewy {
 #define SPLIT_LEFT 2
 
 #define ATDS_END_ZEILE 0
-
 #define ATDS_END_BLOCK 0x0b
-
 #define ATDS_END_EINTRAG 0x0c
-
 #define ATDS_END_TEXT 0x0d
-
 #define ATDS_END 0x0e
-
 #define BLOCKENDE 0x0f
 
 #define MAX_ATS_ROOM 100
@@ -91,9 +86,7 @@ namespace Chewy {
 #define ADS_STACK_SIZE 50
 
 #define ADS_EXIT_BIT 1
-
 #define ADS_SHOW_BIT 2
-
 #define ADS_RESTART_BIT 4
 
 struct AdsDiaHeaders {
@@ -311,40 +304,40 @@ public:
 	int16 calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode);
 	int16 getStereoPos(int16 x);
 	void enableEvents(bool nr) {
-		atdsv._eventsEnabled = nr;
+		_atdsv._eventsEnabled = nr;
 	}
 
 private:
 	int16 get_delay(int16 txt_len);
 
-	Stream *atdshandle[MAX_HANDLE] = { nullptr };
-	char *atdsmem[MAX_HANDLE] = { nullptr };
-	int16 atdspooloff[MAX_HANDLE] = { 0 };
-	char *atsmem = nullptr;
-	uint8 *ats_sheader = nullptr;
-	uint8 *ats_st_header[4];
-	char *atds_id_ptr = nullptr;
-	AadVar aadv;
-	AtsVar atsv;
-	AdsVar adsv;
-	AtdsVar atdsv;
-	char *e_ptr[ADS_MAX_BL_EIN] = { nullptr };
-	int16 e_nr[ADS_MAX_BL_EIN] = { 0 };
-	AdsBlock *ads_block = nullptr;
-	AdsNextBlk adsnb;
-	uint8 ads_stack[ADS_STACK_SIZE] = { 0 };
-	int16 ads_stack_ptr;
-	SplitStringRet ssret;
-	SplitStringRet *ssr = nullptr;
-	SplitStringInit ssi[AAD_MAX_PERSON];
-	SplitStringInit ats_ssi;
-
-	char *split_ptr[MAX_STR_SPLIT] = { nullptr };
-	int16 split_x[MAX_STR_SPLIT] = { 0 };
-	int16 inv_block_nr;
-	char *inv_use_mem = nullptr;
-	int16 tmp_delay;
-	in_zeiger *inzeig = nullptr;
+	Stream *_atdshandle[MAX_HANDLE] = { nullptr };
+	char *_atdsmem[MAX_HANDLE] = { nullptr };
+	int16 _atdspooloff[MAX_HANDLE] = { 0 };
+	char *_atsmem = nullptr;
+	uint8 *_ats_sheader = nullptr;
+	uint8 *_ats_st_header[4];
+	char *_atds_id_ptr = nullptr;
+	AadVar _aadv;
+	AtsVar _atsv;
+	AdsVar _adsv;
+	AtdsVar _atdsv;
+	char *_ePtr[ADS_MAX_BL_EIN] = { nullptr };
+	int16 _eNr[ADS_MAX_BL_EIN] = { 0 };
+	AdsBlock *_adsBlock = nullptr;
+	AdsNextBlk _adsnb;
+	uint8 _adsStack[ADS_STACK_SIZE] = { 0 };
+	int16 _adsStackPtr;
+	SplitStringRet _ssret;
+	SplitStringRet *_ssr = nullptr;
+	SplitStringInit _ssi[AAD_MAX_PERSON];
+	SplitStringInit _atsSsi;
+
+	char *_splitPtr[MAX_STR_SPLIT] = { nullptr };
+	int16 _splitX[MAX_STR_SPLIT] = { 0 };
+	int16 _invBlockNr;
+	char *_invUseMem = nullptr;
+	int16 _tmpDelay;
+	in_zeiger *_inzeig = nullptr;
 	bool _hasSpeech = false;
 	int16 _mousePush = 0;
 	int _printDelayCount1 = 0;


Commit: 021b20ea39609e1adf0d1788a29a3c34e4e382e7
    https://github.com/scummvm/scummvm/commit/021b20ea39609e1adf0d1788a29a3c34e4e382e7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Rename cursor fields

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 687eea98410..5a5c4a4a1f2 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -26,20 +26,21 @@
 namespace Chewy {
 
 cursor::cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
-	out = iout;
-	in = iin;
-	scr_width = _G(scr_w);
-	curblk = curblkp;
-	inzeig = in->get_in_zeiger();
-	if (!inzeig->minfo)
-		maus_da = false;
-	else {
-		maus_da = true;
-		minfo = inzeig->minfo;
-		sichtbar = false;
-		ani = nullptr;
-		cur_aufruf = false;
-		ani_count = false;
+	_out = iout;
+	_in = iin;
+	_scrWidth = _G(scr_w);
+	_curblk = curblkp;
+	_inzeig = _in->get_in_zeiger();
+
+	if (!_inzeig->minfo) {
+		_maus_da = false;
+	} else {
+		_maus_da = true;
+		_minfo = _inzeig->minfo;
+		_sichtbar = false;
+		_ani = nullptr;
+		_cur_aufruf = false;
+		_ani_count = false;
 	}
 }
 
@@ -47,83 +48,83 @@ cursor::~cursor() {
 }
 
 void cursor::plot_cur() {
-	if (maus_da && sichtbar) {
+	if (_maus_da && _sichtbar) {
 		if (cur_move) {
 			mouse_active = true;
 			cur_move = false;
-			if (!curblk->no_back) {
+			if (!_curblk->no_back) {
 
-				out->blockcopy(curblk->cur_back, cur_x_old, cur_y_old, scr_width);
+				_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
 
-				out->sprite_save(curblk->cur_back, (minfo->x + curblk->page_off_x),
-				                  (minfo->y + curblk->page_off_y), curblk->xsize,
-				                  curblk->ysize, scr_width);
+				_out->sprite_save(_curblk->cur_back, (_minfo->x + _curblk->page_off_x),
+				                  (_minfo->y + _curblk->page_off_y), _curblk->xsize,
+				                  _curblk->ysize, _scrWidth);
 			}
 
-			cur_x_old = (minfo->x + curblk->page_off_x);
-			cur_y_old = (minfo->y + curblk->page_off_y);
+			_cur_x_old = (_minfo->x + _curblk->page_off_x);
+			_cur_y_old = (_minfo->y + _curblk->page_off_y);
 		}
 
-		cur_aufruf -= 1;
-		if ((cur_aufruf <= 0) && (ani != nullptr)) {
-			cur_aufruf = ani->delay;
-			++ani_count;
-			if (ani_count > ani->ani_end)
-				ani_count = ani->ani_anf;
+		_cur_aufruf -= 1;
+		if ((_cur_aufruf <= 0) && (_ani != nullptr)) {
+			_cur_aufruf = _ani->delay;
+			++_ani_count;
+			if (_ani_count > _ani->ani_end)
+				_ani_count = _ani->ani_anf;
 		}
 
-		out->sprite_set(curblk->sprite[ani_count], cur_x_old, cur_y_old,
-		                 scr_width);
+		_out->sprite_set(_curblk->sprite[_ani_count], _cur_x_old, _cur_y_old,
+		                 _scrWidth);
 		mouse_active = false;
 	}
 }
 
 void cursor::show_cur() {
-	if ((maus_da) && (!sichtbar)) {
-		sichtbar = true;
+	if ((_maus_da) && (!_sichtbar)) {
+		_sichtbar = true;
 		mouse_active = true;
 
-		minfo->x = g_events->_mousePos.x;
-		minfo->y = g_events->_mousePos.y;
+		_minfo->x = g_events->_mousePos.x;
+		_minfo->y = g_events->_mousePos.y;
 
-		if (!curblk->no_back) {
-			out->sprite_save(curblk->cur_back, (minfo->x + curblk->page_off_x),
-			    (minfo->y + curblk->page_off_y), curblk->xsize,
-			    curblk->ysize, scr_width);
+		if (!_curblk->no_back) {
+			_out->sprite_save(_curblk->cur_back, (_minfo->x + _curblk->page_off_x),
+			    (_minfo->y + _curblk->page_off_y), _curblk->xsize,
+			    _curblk->ysize, _scrWidth);
 		}
 
-		cur_x_old = (minfo->x + curblk->page_off_x);
-		cur_y_old = (minfo->y + curblk->page_off_y);
+		_cur_x_old = (_minfo->x + _curblk->page_off_x);
+		_cur_y_old = (_minfo->y + _curblk->page_off_y);
 		cur_move = true;
 		plot_cur();
 	}
 }
 
 void cursor::hide_cur() {
-	if ((maus_da) && (sichtbar)) {
-		if (!curblk->no_back) {
-			out->blockcopy(curblk->cur_back, cur_x_old, cur_y_old, scr_width);
+	if ((_maus_da) && (_sichtbar)) {
+		if (!_curblk->no_back) {
+			_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
 		}
-		sichtbar = false;
+		_sichtbar = false;
 	}
 }
 
 void cursor::set_cur_ani(cur_ani *ani1) {
-	ani = ani1;
-	cur_aufruf = 0;
-	ani_count = ani->ani_anf;
+	_ani = ani1;
+	_cur_aufruf = 0;
+	_ani_count = _ani->ani_anf;
 }
 
 void cursor::move(int16 x, int16 y) {
-	if (maus_da) {
+	if (_maus_da) {
 		mouse_active = true;
 
-		minfo->x = x;
-		minfo->y = y;
-		cur_x_old = (minfo->x + curblk->page_off_x);
-		cur_y_old = (minfo->y + curblk->page_off_y);
-		in->move_mouse(x, y);
-		if (sichtbar)
+		_minfo->x = x;
+		_minfo->y = y;
+		_cur_x_old = (_minfo->x + _curblk->page_off_x);
+		_cur_y_old = (_minfo->y + _curblk->page_off_y);
+		_in->move_mouse(x, y);
+		if (_sichtbar)
 			cur_move = true;
 		else
 			cur_move = false;
@@ -133,23 +134,24 @@ void cursor::move(int16 x, int16 y) {
 
 void cursor::wait_taste_los(bool maus_plot) {
 	int16 is_mouse = 0;
-	if (maus_da) {
+	if (_maus_da) {
 		g_events->update();
-		is_mouse = minfo->button;
+		is_mouse = _minfo->button;
 	}
 
 	if (!is_mouse)
-		in->hot_key = 0;
+		_in->hot_key = 0;
+
 	int16 stay = 1;
 	int16 switch_code = 1;
 
 	while ((switch_code != 0) && (stay)) {
-		switch_code = in->get_switch_code();
+		switch_code = _in->get_switch_code();
 		if (is_mouse) {
 			switch_code = 2;
 
 			g_events->update();
-			stay = minfo->button;
+			stay = _minfo->button;
 		}
 
 		if (maus_plot)
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 6cf87691d47..b4542436b78 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -34,29 +34,25 @@ public:
 	~cursor();
 
 	void plot_cur();
-
 	void show_cur();
-
 	void hide_cur();
-
 	void set_cur_ani(cur_ani *ani);
-
 	void move(int16 x, int16 y);
 	void wait_taste_los(bool maus_plot);
 
-	McgaGraphics *out = nullptr;
-	InputMgr *in = nullptr;
-	maus_info *minfo = nullptr;
-	in_zeiger *inzeig = nullptr;
-	cur_blk *curblk = nullptr;
-	cur_ani *ani = nullptr;
-	int scr_width = 0;
-	int16 cur_x_old = 0;
-	int16 cur_y_old = 0;
-	int16 cur_aufruf = 0;
-	int16 ani_count = 0;
-	uint8 maus_da = 0;
-	bool sichtbar = false;
+	McgaGraphics *_out = nullptr;
+	InputMgr *_in = nullptr;
+	maus_info *_minfo = nullptr;
+	in_zeiger *_inzeig = nullptr;
+	cur_blk *_curblk = nullptr;
+	cur_ani *_ani = nullptr;
+	int _scrWidth = 0;
+	int16 _cur_x_old = 0;
+	int16 _cur_y_old = 0;
+	int16 _cur_aufruf = 0;
+	int16 _ani_count = 0;
+	uint8 _maus_da = 0;
+	bool _sichtbar = false;
 };
 
 } // namespace Chewy


Commit: ee41d4a2892df5de01837a15348c41e8043a660e
    https://github.com/scummvm/scummvm/commit/ee41d4a2892df5de01837a15348c41e8043a660e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Rename detail class fields

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 761803117e7..40145c53ebb 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -136,45 +136,45 @@ bool RdiDateiHeader::load(Common::SeekableReadStream *src) {
 
 detail::detail() {
 	int16 size = sizeof(room_detail_info);
-	char *tptr = (char *)&rdi;
+	char *tptr = (char *)&_rdi;
 
 	for (int16 i = 0; i < size; i++)
 		*tptr++ = 0;
 
 	for (int16 i = 0; i < MAXDETAILS; i++) {
-		rdi.Sinfo[i].SprNr = -1;
-		rdi.Ainfo[i].start_ani = -1;
+		_rdi.Sinfo[i].SprNr = -1;
+		_rdi.Ainfo[i].start_ani = -1;
 	}
 
 	for (int16 i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
-		rdi.mvect[i] = -1;
+		_rdi.mvect[i] = -1;
 
-	global_delay = 0;
-	ani_freezeflag = false;
-	fulltaf = false;
-	rdi.dptr = nullptr;
-	tafname[0] = 0;
+	_globalDelay = 0;
+	_aniFreezeflag = false;
+	_fullTaf = false;
+	_rdi.dptr = nullptr;
+	_tafName[0] = 0;
 	for (int16 i = 0; i < (MAXDETAILS * MAX_SOUNDS); i++) {
-		rdi.sample[i] = nullptr;
-		rdi.tvp_index[i] = -1;
+		_rdi.sample[i] = nullptr;
+		_rdi.tvp_index[i] = -1;
 	}
-	direct_taf_ani = OFF;
+	_directTafAni = OFF;
 }
 
 detail::~detail() {
-	direct_taf_ani = OFF;
+	_directTafAni = OFF;
 }
 
 void detail::load_rdi(const char *fname_, int16 room_nr) {
 	Common::File f;
-	taf_info *tmprdi = rdi.dptr;
+	taf_info *tmprdi = _rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
-		if (rdi_datei_header.load(&f)) {
-			if (!scumm_strnicmp(rdi_datei_header.Id, "RDI", 3)) {
+		if (_rdi_datei_header.load(&f)) {
+			if (!scumm_strnicmp(_rdi_datei_header.Id, "RDI", 3)) {
 				f.seek(room_nr * room_detail_info::SIZE(), SEEK_CUR);
 
-				if (!rdi.load(&f)) {
+				if (!_rdi.load(&f)) {
 					error("load_rdi error");
 				}
 			} else {
@@ -189,67 +189,67 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 		error("load_rdi error");
 	}
 
-	rdi.dptr = tmprdi;
+	_rdi.dptr = tmprdi;
 }
 
 void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
-	if (strcmp(tafname, fname_)) {
-		if (rdi.dptr) {
-			if (fulltaf) {
-				free(rdi.dptr);
-				rdi.dptr = nullptr;
-				fulltaf = false;
+	if (strcmp(_tafName, fname_)) {
+		if (_rdi.dptr) {
+			if (_fullTaf) {
+				free(_rdi.dptr);
+				_rdi.dptr = nullptr;
+				_fullTaf = false;
 			} else {
-				del_taf_tbl(rdi.dptr);
+				del_taf_tbl(_rdi.dptr);
 			}
 		}
-		strcpy(tafname, fname_);
+		strcpy(_tafName, fname_);
 		if (!load_flag) {
-			rdi.dptr = init_taf_tbl(fname_);
+			_rdi.dptr = init_taf_tbl(fname_);
 			if (!modul)
-				load_taf_tbl(rdi.dptr);
+				load_taf_tbl(_rdi.dptr);
 		} else {
-			rdi.dptr = mem->taf_adr(fname_);
-			fulltaf = true;
+			_rdi.dptr = mem->taf_adr(fname_);
+			_fullTaf = true;
 		}
 	} else {
-		if (!fulltaf)
-			load_taf_tbl(rdi.dptr);
+		if (!_fullTaf)
+			load_taf_tbl(_rdi.dptr);
 	}
 }
 
 void detail::del_dptr() {
-	if (rdi.dptr) {
-		if (fulltaf)
-			free((char *)rdi.dptr);
+	if (_rdi.dptr) {
+		if (_fullTaf)
+			free((char *)_rdi.dptr);
 		else {
-			del_taf_tbl(rdi.dptr);
-			rdi.dptr = nullptr;
-			tafname[0] = 0;
+			del_taf_tbl(_rdi.dptr);
+			_rdi.dptr = nullptr;
+			_tafName[0] = 0;
 		}
-		rdi.dptr = nullptr;
+		_rdi.dptr = nullptr;
 	}
 }
 
 void detail::load_taf_tbl(taf_info *fti) {
 	if (!fti) {
-		fti = rdi.dptr;
+		fti = _rdi.dptr;
 	}
 
 	if (fti) {
 		for (int16 i = 0; i < MAXDETAILS; i++) {
-			if (rdi.Sinfo[i].SprNr != -1)
-				load_taf_seq(rdi.Sinfo[i].SprNr, 1, fti);
-			if (rdi.Ainfo[i].start_ani != -1 &&
-					rdi.Ainfo[i].end_ani != -1 && !rdi.Ainfo[i].load_flag)
-				load_taf_seq(rdi.Ainfo[i].start_ani, (rdi.Ainfo[i].end_ani - rdi.Ainfo[i].start_ani) + 1, fti);
+			if (_rdi.Sinfo[i].SprNr != -1)
+				load_taf_seq(_rdi.Sinfo[i].SprNr, 1, fti);
+			if (_rdi.Ainfo[i].start_ani != -1 &&
+					_rdi.Ainfo[i].end_ani != -1 && !_rdi.Ainfo[i].load_flag)
+				load_taf_seq(_rdi.Ainfo[i].start_ani, (_rdi.Ainfo[i].end_ani - _rdi.Ainfo[i].start_ani) + 1, fti);
 		}
 	}
 }
 
 taf_info *detail::init_taf_tbl(const char *fname_) {
 	taf_info *Tt = 0;
-	SpriteResource *res = new SpriteResource(tafname);
+	SpriteResource *res = new SpriteResource(_tafName);
 	int16 anz = res->getChunkCount();
 	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
 
@@ -267,7 +267,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 
 void detail::del_taf_tbl(taf_info *Tt) {
 	if (!Tt) {
-		Tt = rdi.dptr;
+		Tt = _rdi.dptr;
 	}
 	for (int16 i = 0; i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
@@ -278,7 +278,7 @@ void detail::del_taf_tbl(taf_info *Tt) {
 
 void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 	if (!Tt)
-		Tt = rdi.dptr;
+		Tt = _rdi.dptr;
 	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
 		Tt->image[i] = 0;
@@ -287,9 +287,9 @@ void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 
 void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 	if (!Tt)
-		Tt = rdi.dptr;
+		Tt = _rdi.dptr;
 
-	SpriteResource *res = new SpriteResource(tafname);
+	SpriteResource *res = new SpriteResource(_tafName);
 
 	for (int16 i = 0; i < spr_anz; i++) {
 		if (!Tt->image[spr_nr + i]) {
@@ -301,48 +301,48 @@ void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 }
 
 void detail::set_static_spr(int16 nr, int16 spr_nr) {
-	rdi.Sinfo[nr].SprNr = spr_nr;
+	_rdi.Sinfo[nr].SprNr = spr_nr;
 }
 
 void detail::hide_static_spr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
-		rdi.Sinfo[nr].Hide = true;
+		_rdi.Sinfo[nr].Hide = true;
 }
 
 void detail::show_static_spr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
-		rdi.Sinfo[nr].Hide = false;
+		_rdi.Sinfo[nr].Hide = false;
 }
 
 byte *detail::get_static_image(int16 det_nr) {
 	byte *ret;
-	int16 index = rdi.Sinfo[det_nr].SprNr;
+	int16 index = _rdi.Sinfo[det_nr].SprNr;
 	if (index == -1)
 		ret = nullptr;
 	else
-		ret = rdi.dptr->image[index];
+		ret = _rdi.dptr->image[index];
 	return ret;
 }
 
 void detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
 	if (korr_flag) {
-		int16 *Cxy = rdi.dptr->korrektur + (rdi.Sinfo[det_nr].SprNr << 1);
+		int16 *Cxy = _rdi.dptr->korrektur + (_rdi.Sinfo[det_nr].SprNr << 1);
 		x += Cxy[0];
 		y += Cxy[1];
 	}
-	rdi.Sinfo[det_nr].x = x;
-	rdi.Sinfo[det_nr].y = y;
-	rdi.Sinfo[det_nr].Hide = hide;
+	_rdi.Sinfo[det_nr].x = x;
+	_rdi.Sinfo[det_nr].y = y;
+	_rdi.Sinfo[det_nr].Hide = hide;
 }
 
 void detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
-	rdi.Ainfo[det_nr].x = x;
-	rdi.Ainfo[det_nr].y = y;
+	_rdi.Ainfo[det_nr].x = x;
+	_rdi.Ainfo[det_nr].y = y;
 }
 
 void detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
-	*start = rdi.Ainfo[ani_nr].start_ani;
-	*end = rdi.Ainfo[ani_nr].end_ani;
+	*start = _rdi.Ainfo[ani_nr].start_ani;
+	*end = _rdi.Ainfo[ani_nr].end_ani;
 }
 
 void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
@@ -351,56 +351,56 @@ void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 		start = end;
 		end = tmp;
 	}
-	rdi.Ainfo[ani_nr].start_ani = start;
-	rdi.Ainfo[ani_nr].end_ani = end;
+	_rdi.Ainfo[ani_nr].start_ani = start;
+	_rdi.Ainfo[ani_nr].end_ani = end;
 }
 
 byte *detail::get_image(int16 spr_nr) {
-	byte *ret = rdi.dptr->image[spr_nr];
+	byte *ret = _rdi.dptr->image[spr_nr];
 	return ret;
 }
 
 ani_detail_info *detail::get_ani_detail(int16 ani_nr) {
-	ani_detail_info *ret = &rdi.Ainfo[ani_nr];
+	ani_detail_info *ret = &_rdi.Ainfo[ani_nr];
 	return ret;
 }
 
 int16 *detail::get_korrektur_tbl() {
 	int16 *ret;
-	ret = rdi.dptr->korrektur;
+	ret = _rdi.dptr->korrektur;
 	return ret;
 }
 
 void detail::init_taf(taf_info *dptr) {
-	rdi.dptr = dptr;
+	_rdi.dptr = dptr;
 }
 
 taf_info *detail::get_taf_info() {
 	taf_info *ret;
-	ret = rdi.dptr;
+	ret = _rdi.dptr;
 	return ret;
 }
 
 room_detail_info *detail::get_room_detail_info() {
-	return &rdi;
+	return &_rdi;
 }
 
 void detail::freeze_ani() {
-	ani_freezeflag = true;
+	_aniFreezeflag = true;
 }
 
 void detail::unfreeze_ani() {
-	ani_freezeflag = false;
+	_aniFreezeflag = false;
 }
 
 void detail::set_static_ani(int16 ani_nr, int16 static_nr) {
-	rdi.Ainfo[ani_nr].show_1_phase = true;
+	_rdi.Ainfo[ani_nr].show_1_phase = true;
 	if (static_nr != -1)
-		rdi.Ainfo[ani_nr].phase_nr = static_nr;
+		_rdi.Ainfo[ani_nr].phase_nr = static_nr;
 }
 
 void detail::del_static_ani(int16 ani_nr) {
-	rdi.Ainfo[ani_nr].show_1_phase = false;
+	_rdi.Ainfo[ani_nr].show_1_phase = false;
 }
 
 void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, int16 zoomx, int16 zoomy) {
@@ -414,10 +414,10 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 		end = MAXDETAILS - 1;
 
 	for (int16 i = start; (i <= end) && (!modul); i++) {
-		ani_detail_info *adiptr = &rdi.Ainfo[i];
+		ani_detail_info *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
 			int16 kx = Cxy[0];
 			int16 ky = Cxy[1];
 			if (zoomx != 0 || zoomy != 0)
@@ -427,16 +427,16 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 			if (adiptr->load_flag == 1) {
 				load_taf_ani_sprite(sprnr);
 				if (!modul)
-					out->scale_set(taf_load_buffer, x, y, zoomx, zoomy, 0);
+					out->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
 			} else
-				out->scale_set(rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
+				out->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
 			Sound *sound = g_engine->_sound;
 
 			for (int16 k = 0; k < MAX_SOUNDS; k++) {
 				int16 soundEffect = adiptr->sfx.sound_index[k];
 				if ((adiptr->sfx.sound_enable[k]) && (soundEffect != -1) &&
-				        (rdi.sample[soundEffect])) {
+				        (_rdi.sample[soundEffect])) {
 					if ((adiptr->sfx.sound_start[k] == adiptr->ani_count) &&
 					        (!adiptr->delay_count)) {
 						const uint channel = adiptr->sfx.kanal[k] & 7;
@@ -447,12 +447,12 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 				}
 			}
 
-			if (!ani_freezeflag) {
+			if (!_aniFreezeflag) {
 				if (adiptr->reverse) {
 					if (adiptr->delay_count > 0)
 						--adiptr->delay_count;
 					else {
-						adiptr->delay_count = adiptr->delay + global_delay;
+						adiptr->delay_count = adiptr->delay + _globalDelay;
 						if (adiptr->ani_count > adiptr->start_ani)
 							--adiptr->ani_count;
 						else {
@@ -467,7 +467,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 					if (adiptr->delay_count > 0)
 						--adiptr->delay_count;
 					else {
-						adiptr->delay_count = adiptr->delay + global_delay;
+						adiptr->delay_count = adiptr->delay + _globalDelay;
 						if (adiptr->ani_count < adiptr->end_ani)
 							++adiptr->ani_count;
 						else {
@@ -482,9 +482,9 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 		} else {
 			adiptr->start_flag = 0;
 			if (adiptr->show_1_phase) {
-				rdi.Sinfo[adiptr->phase_nr].Hide = false;
+				_rdi.Sinfo[adiptr->phase_nr].Hide = false;
 				plot_static_details(scrx, scry, adiptr->phase_nr, adiptr->phase_nr);
-				rdi.Sinfo[adiptr->phase_nr].Hide = true;
+				_rdi.Sinfo[adiptr->phase_nr].Hide = true;
 			}
 		}
 	}
@@ -501,10 +501,10 @@ void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 		end = MAXDETAILS - 1;
 
 	for (int16 i = start; i <= end; i++) {
-		if (rdi.Sinfo[i].SprNr != -1 && !rdi.Sinfo[i].Hide) {
-			int16 x = rdi.Sinfo[i].x - scrx;
-			int16 y = rdi.Sinfo[i].y - scry;
-			byte *simage = rdi.dptr->image[rdi.Sinfo[i].SprNr];
+		if (_rdi.Sinfo[i].SprNr != -1 && !_rdi.Sinfo[i].Hide) {
+			int16 x = _rdi.Sinfo[i].x - scrx;
+			int16 y = _rdi.Sinfo[i].y - scry;
+			byte *simage = _rdi.dptr->image[_rdi.Sinfo[i].SprNr];
 			out->sprite_set(simage, x, y, 0);
 		}
 	}
@@ -513,7 +513,7 @@ void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 	if (nr != -1) {
 		ani_detail_info *adiptr;
-		adiptr = &rdi.Ainfo[nr];
+		adiptr = &_rdi.Ainfo[nr];
 		if (rep)
 			adiptr->start_flag = rep;
 		else
@@ -529,33 +529,33 @@ void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 
 void detail::stop_detail(int16 nr) {
 	if (nr >= 0 && nr < 32) {
-		ani_detail_info *adiptr = &rdi.Ainfo[nr];
+		ani_detail_info *adiptr = &_rdi.Ainfo[nr];
 		adiptr->start_flag = 0;
 	}
 }
 
 void detail::set_ani_delay(int16 nr, int16 del) {
-	ani_detail_info *adiptr = &rdi.Ainfo[nr];
+	ani_detail_info *adiptr = &_rdi.Ainfo[nr];
 	adiptr->delay = del;
 }
 
 void detail::init_list(int16 *mv) {
 	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
-		rdi.mvect[i] = mv[i];
+		_rdi.mvect[i] = mv[i];
 }
 
 void detail::get_list(int16 *mv) {
 	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
-		mv[i] = rdi.mvect[i];
+		mv[i] = _rdi.mvect[i];
 }
 
 int16 detail::maus_vector(int16 x, int16 y) {
 	int16 i, j;
 	i = -1;
 	for (j = 0; (j < (MAX_M_ITEMS - 1) << 2) && (i == -1); j += 4) {
-		if (rdi.mvect[j] != -1) {
-			if ((x >= rdi.mvect[j]) && (x <= rdi.mvect[j + 2]) &&
-			        (y >= rdi.mvect[j + 1]) && (y <= rdi.mvect[j + 3]))
+		if (_rdi.mvect[j] != -1) {
+			if ((x >= _rdi.mvect[j]) && (x <= _rdi.mvect[j + 2]) &&
+			        (y >= _rdi.mvect[j + 1]) && (y <= _rdi.mvect[j + 3]))
 				i = j / 4;
 		}
 	}
@@ -565,7 +565,7 @@ int16 detail::maus_vector(int16 x, int16 y) {
 
 int16 detail::get_ani_status(int16 det_nr) {
 	int16 ret;
-	if (rdi.Ainfo[det_nr].start_flag > 0)
+	if (_rdi.Ainfo[det_nr].start_flag > 0)
 		ret = 1;
 	else
 		ret = 0;
@@ -575,27 +575,27 @@ int16 detail::get_ani_status(int16 det_nr) {
 SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 spr_nr, int16 mode) {
 	if (det_nr > MAXDETAILS)
 		det_nr = MAXDETAILS - 1;
-	ani_detail_info *adiptr = &rdi.Ainfo[det_nr];
+	ani_detail_info *adiptr = &_rdi.Ainfo[det_nr];
 	if (spr_nr < adiptr->start_ani)
 		spr_nr = adiptr->start_ani;
 	if (spr_nr > adiptr->end_ani)
 		spr_nr = adiptr->end_ani - 1;
-	int16 *Cxy = rdi.dptr->korrektur + (spr_nr << 1);
-	int16 *Xy = (int16 *)rdi.dptr->image[spr_nr];
-	spr_info.Image = rdi.dptr->image[spr_nr];
-	spr_info.X = adiptr->x + Cxy[0] - scrx;
-	spr_info.Y = adiptr->y + Cxy[1] - scry;
-	spr_info.X1 = spr_info.X + Xy[0];
-	spr_info.Y1 = spr_info.Y + Xy[1];
+	int16 *Cxy = _rdi.dptr->korrektur + (spr_nr << 1);
+	int16 *Xy = (int16 *)_rdi.dptr->image[spr_nr];
+	_sprInfo.Image = _rdi.dptr->image[spr_nr];
+	_sprInfo.X = adiptr->x + Cxy[0] - scrx;
+	_sprInfo.Y = adiptr->y + Cxy[1] - scry;
+	_sprInfo.X1 = _sprInfo.X + Xy[0];
+	_sprInfo.Y1 = _sprInfo.Y + Xy[1];
 	if (mode)
-		out->sprite_set(spr_info.Image, spr_info.X, spr_info.Y, 0);
+		out->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
 
 	Sound *sound = g_engine->_sound;
 
 	for (int16 k = 0; k < MAX_SOUNDS; k++) {
 		int16 soundEffect = adiptr->sfx.sound_index[k];
 		if ((adiptr->sfx.sound_enable[k]) && (soundEffect != -1) &&
-		        (rdi.sample[soundEffect])) {
+		        (_rdi.sample[soundEffect])) {
 			if (adiptr->sfx.sound_start[k] == spr_nr) {
 				const uint channel = adiptr->sfx.kanal[k] & 7;
 				sound->setSoundChannelBalance(channel, adiptr->sfx.stereo[k]);
@@ -605,12 +605,12 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 		}
 	}
 
-	return spr_info;
+	return _sprInfo;
 }
 
 void detail::set_global_delay(int16 delay) {
-	global_delay = delay;
-	global_delay -= 2;
+	_globalDelay = delay;
+	_globalDelay -= 2;
 }
 
 void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
@@ -632,24 +632,24 @@ void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
 }
 
 void detail::disable_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		sdb->sound_enable[i] = false;
 }
 
 void detail::enable_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		if (sdb->sound_index[i] != -1)
 			sdb->sound_enable[i] = true;
 }
 
 void detail::play_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
 	Sound *sound = g_engine->_sound;
 	for (int16 k = 0; k < MAX_SOUNDS; k++) {
 		if ((sdb->sound_enable[k]) && (sdb->sound_index[k] != -1) &&
-		        (rdi.sample[sdb->sound_index[k]])) {
+		        (_rdi.sample[sdb->sound_index[k]])) {
 			const uint channel = sdb->kanal[k] & 7;
 			sound->setSoundChannelBalance(channel, sdb->stereo[k]);
 			sound->setSoundChannelVolume(channel, sdb->volume[k]);
@@ -659,7 +659,7 @@ void detail::play_detail_sound(int16 nr) {
 }
 
 void detail::clear_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &rdi.Ainfo[nr].sfx;
+	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (short i = 0; i < MAX_SOUNDS; i++) {
 		sdb->sound_enable[i] = false;
 		sdb->sound_index[i] = -1;
@@ -685,7 +685,7 @@ void detail::enable_room_sound() {
 
 void detail::clear_room_sound() {
 	for (int16 j = 0; j < MAXDETAILS; j++) {
-		sound_def_blk *sdb = &rdi.Ainfo[j].sfx;
+		sound_def_blk *sdb = &_rdi.Ainfo[j].sfx;
 		for (int16 i = 0; i < MAX_SOUNDS; i++) {
 			sdb->sound_enable[i] = false;
 			sdb->sound_index[i] = -1;
@@ -697,8 +697,8 @@ void detail::clear_room_sound() {
 		}
 	}
 	for (int16 i = 0; i < MAXDETAILS * MAX_SOUNDS; i++) {
-		rdi.tvp_index[i] = -1;
-		rdi.sample[i] = nullptr;
+		_rdi.tvp_index[i] = -1;
+		_rdi.sample[i] = nullptr;
 	}
 }
 
@@ -706,16 +706,16 @@ void detail::remove_unused_samples() {
 	bool found = false;
 
 	for (int16 k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
-		if (rdi.tvp_index[k] != -1) {
+		if (_rdi.tvp_index[k] != -1) {
 			found = false;
 			for (int16 i = 0; (i < MAXDETAILS) && (found == false); i++) {
 				for (int16 j = 0; (j < MAX_SOUNDS) && (found == false); j++)
-					if (rdi.Ainfo[i].sfx.sound_index[j] == k)
+					if (_rdi.Ainfo[i].sfx.sound_index[j] == k)
 						found = true;
 			}
 			if (!found) {
-				rdi.tvp_index[k] = -1;
-				rdi.sample[k] = nullptr;
+				_rdi.tvp_index[k] = -1;
+				_rdi.sample[k] = nullptr;
 			}
 		}
 	}
@@ -725,17 +725,17 @@ int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 	int16 ok = false;
 	int16 detail_nr = -1;
 	for (int16 i = 0; i < MAXDETAILS && !ok; i++) {
-		ani_detail_info *adiptr = &rdi.Ainfo[i];
+		ani_detail_info *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = rdi.dptr->korrektur + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
 			int16 x = adiptr->x + Cxy[0] - scrx;
 			int16 y = adiptr->y + Cxy[1] - scry;
 			int16 *Xy;
 			if (adiptr->load_flag == 1) {
-				Xy = (int16 *)taf_load_buffer;
+				Xy = (int16 *)_tafLoadBuffer;
 			} else {
-				Xy = (int16 *)rdi.dptr->image[sprnr];
+				Xy = (int16 *)_rdi.dptr->image[sprnr];
 			}
 			if (mouse_x >= x && mouse_x <= x + Xy[0] &&
 			        mouse_y >= y && mouse_y <= y + Xy[1]) {
@@ -749,13 +749,13 @@ int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 }
 
 void detail::set_taf_ani_mem(byte *load_area) {
-	taf_load_buffer = load_area;
-	direct_taf_ani = ON;
+	_tafLoadBuffer = load_area;
+	_directTafAni = ON;
 }
 
 void detail::load_taf_ani_sprite(int16 nr) {
-	SpriteResource *res = new SpriteResource(tafname);
-	res->getSpriteData(nr, &taf_load_buffer, false);
+	SpriteResource *res = new SpriteResource(_tafName);
+	res->getSpriteData(nr, &_tafLoadBuffer, false);
 	delete res;
 }
 
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index f31c549d5bd..5016cea9291 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -265,19 +265,19 @@ private:
 	void load_taf_ani_sprite(int16 nr);
 
 	void remove_unused_samples();
-	room_detail_info rdi;
+	room_detail_info _rdi;
 #ifdef DETEDIT
 	room_detail_info rdi_shadow;
 #endif
-	RdiDateiHeader rdi_datei_header;
-	SprInfo spr_info;
-
-	int16 global_delay;
-	int16 ani_freezeflag;
-	int16 fulltaf;
-	char tafname[80];
-	byte *taf_load_buffer;
-	int16 direct_taf_ani;
+	RdiDateiHeader _rdi_datei_header;
+	SprInfo _sprInfo;
+
+	int16 _globalDelay = 0;
+	int16 _aniFreezeflag = 0;
+	int16 _fullTaf = 0;
+	char _tafName[80];
+	byte *_tafLoadBuffer = nullptr;
+	int16 _directTafAni = 0;
 };
 
 } // namespace Chewy


Commit: c7647e4b609043ffa6de6a3744c0cbee6c5d320c
    https://github.com/scummvm/scummvm/commit/c7647e4b609043ffa6de6a3744c0cbee6c5d320c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:22-08:00

Commit Message:
CHEWY: Rename flic class fields

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index a8399691b82..2e8a846e044 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -96,7 +96,7 @@ void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
 
 
 flic::flic() {
-	Common::fill(&sounds[0], &sounds[50], (byte *)nullptr);
+	Common::fill(&_sounds[0], &_sounds[50], (byte *)nullptr);
 	_soundBuffer = new byte[SOUND_SLOT_SIZE];
 }
 
@@ -120,27 +120,27 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	float ende;
 	int16 ret = 0;
 
-	load_puffer = load_p;
-	virt_screen = vscreen + 4;
+	_loadBuffer = load_p;
+	_virtScreen = vscreen + 4;
 
-	if (flic_header.load(rs)) {
-		if (flic_header.type == FLC) {
+	if (_flicHeader.load(rs)) {
+		if (_flicHeader.type == FLC) {
 			//trace_mode = false;
-			fade_flag = false;
-			fade_delay = 0;
-			cls_flag = false;
-			CurrentFrame = 0;
-			for (uint16 i = 0; (i < flic_header.frames) && (!modul) && (ret >= 0); i++) {
-				if (!frame_header.load(rs)) {
+			_fadeFlag = false;
+			_fadeDelay = 0;
+			_clsFlag = false;
+			_currentFrame = 0;
+			for (uint16 i = 0; (i < _flicHeader.frames) && (!modul) && (ret >= 0); i++) {
+				if (!_frameHeader.load(rs)) {
 					error("flic error");
 				} else {
-					if (frame_header.type != PREFIX) {
-						size_t tmp_size = ((size_t)frame_header.size) - sizeof(FrameHead);
+					if (_frameHeader.type != PREFIX) {
+						size_t tmp_size = ((size_t)_frameHeader.size) - sizeof(FrameHead);
 						float start = (float)g_system->getMillis(); // clock()
 						start /= 0.05f;
-						start += flic_header.speed;
+						start += _flicHeader.speed;
 						if (tmp_size) {
-							if (rs->read(load_puffer, tmp_size) != tmp_size) {
+							if (rs->read(_loadBuffer, tmp_size) != tmp_size) {
 								error("flic error");
 							} else {
 								ret = decode_frame();
@@ -151,9 +151,9 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 							ende = (float)g_system->getMillis(); // clock()
 							ende /= 0.05f;
 						} while (ende <= start);
-						++CurrentFrame;
+						++_currentFrame;
 					} else {
-						rs->seek((int)frame_header.size - FrameHead::SIZE(), SEEK_CUR);
+						rs->seek((int)_frameHeader.size - FrameHead::SIZE(), SEEK_CUR);
 					}
 				}
 			}
@@ -167,11 +167,11 @@ int16 flic::decode_frame() {
 	ChunkHead chunk_header;
 	int16 action_ret = 0;
 
-	byte *tmp_buf = load_puffer;
+	byte *tmp_buf = _loadBuffer;
 	bool update_flag = false;
-	if (frame_header.chunks != 0) {
-		fade_flag = false;
-		for (uint16 i = 0; i < frame_header.chunks; i++) {
+	if (_frameHeader.chunks != 0) {
+		_fadeFlag = false;
+		for (uint16 i = 0; i < _frameHeader.chunks; i++) {
 			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
 			chunk_header.load(&rs);
 
@@ -188,14 +188,14 @@ int16 flic::decode_frame() {
 				break;
 
 			case BYTE_RUN:
-				decode_rle(virt_screen, tmp_buf,
-				           (int)flic_header.width,
-				           (int)flic_header.height);
+				decode_rle(_virtScreen, tmp_buf,
+				           (int)_flicHeader.width,
+				           (int)_flicHeader.height);
 				update_flag = true;
 				break;
 
 			case DELTA_FLC:
-				decode_flc(virt_screen, tmp_buf);
+				decode_flc(_virtScreen, tmp_buf);
 				update_flag = true;
 				break;
 
@@ -206,7 +206,7 @@ int16 flic::decode_frame() {
 				break;
 
 			case CLS:
-				out->setze_zeiger(virt_screen);
+				out->setze_zeiger(_virtScreen);
 				out->cls();
 				out->setze_zeiger(nullptr);
 
@@ -214,7 +214,7 @@ int16 flic::decode_frame() {
 				break;
 
 			case UNPRESSED:
-				out->back2back(load_puffer, virt_screen);
+				out->back2back(_loadBuffer, _virtScreen);
 
 				update_flag = true;
 				break;
@@ -230,15 +230,15 @@ int16 flic::decode_frame() {
 			tmp_buf += chunk_header.size;
 		}
 		if (update_flag != false) {
-			if (flic_user) {
-				out->setze_zeiger(virt_screen);
-				action_ret = flic_user(CurrentFrame);
+			if (_flicUser) {
+				out->setze_zeiger(_virtScreen);
+				action_ret = _flicUser(_currentFrame);
 				out->setze_zeiger(nullptr);
 			}
-			out->back2screen(virt_screen - 4);
-			if (fade_flag != false) {
-				out->einblenden(fade_pal, fade_delay);
-				fade_flag = false;
+			out->back2screen(_virtScreen - 4);
+			if (_fadeFlag != false) {
+				out->einblenden(_fadePal, _fadeDelay);
+				_fadeFlag = false;
 			}
 		}
 	}
@@ -250,21 +250,21 @@ void flic::col256_chunk(byte *tmp) {
 	int packets = *(int16 *)tmp;
 	tmp += 2;
 
-	if (cls_flag == true)
+	if (_clsFlag == true)
 		out->cls();
 	else
-		cls_flag = true;
+		_clsFlag = true;
 
 	if (tmp[1] == 0) {
 		tmp += 2;
 		for (int i = 0; i < PALETTE_SIZE; i++)
 			tmp[i] >>= 2;
-		if (fade_flag == false)
+		if (_fadeFlag == false)
 			out->set_palette(tmp);
 		else {
-			memset(fade_pal, 0, PALETTE_SIZE);
-			out->set_palette(fade_pal);
-			memcpy(fade_pal, tmp, PALETTE_SIZE);
+			memset(_fadePal, 0, PALETTE_SIZE);
+			out->set_palette(_fadePal);
+			memcpy(_fadePal, tmp, PALETTE_SIZE);
 		}
 	} else {
 		byte col = 0;
@@ -286,18 +286,18 @@ void flic::col64_chunk(byte *tmp) {
 	int packets = *((int16 *)tmp);
 	tmp += 2;
 
-	if (cls_flag == true)
+	if (_clsFlag == true)
 		out->cls();
 	else
-		cls_flag = true;
+		_clsFlag = true;
 
 	if (!tmp[1]) {
-		if (fade_flag == false)
+		if (_fadeFlag == false)
 			out->set_palette(tmp + 2);
 		else {
-			memset(fade_pal, 0, PALETTE_SIZE);
-			out->set_palette(fade_pal);
-			memcpy(fade_pal, tmp + 2, PALETTE_SIZE);
+			memset(_fadePal, 0, PALETTE_SIZE);
+			out->set_palette(_fadePal);
+			memcpy(_fadePal, tmp + 2, PALETTE_SIZE);
 		}
 	} else {
 		byte col = 0;
@@ -318,7 +318,7 @@ void flic::col64_chunk(byte *tmp) {
 void flic::delta_chunk_byte(byte *tmp) {
 	byte last_byte = 0;
 	bool last_flag;
-	byte *abl = virt_screen;
+	byte *abl = _virtScreen;
 	short int *ipo = (short int *)tmp;
 	short int rest_height = *ipo++;
 	tmp += 2;
@@ -327,7 +327,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 		short int mode_word = *ipo++;
 		if (mode_word & 0x4000) {
 			mode_word = -mode_word;
-			abl += (int16)(mode_word * flic_header.width);
+			abl += (int16)(mode_word * _flicHeader.width);
 			tabl = abl;
 			mode_word = *ipo++;
 		}
@@ -340,14 +340,14 @@ void flic::delta_chunk_byte(byte *tmp) {
 		tmp = (byte *)ipo;
 		if (mode_word) {
 			short int pcount = 0;
-			for (short int j = 0; (pcount < mode_word) && (j <= flic_header.width); ++pcount) {
+			for (short int j = 0; (pcount < mode_word) && (j <= _flicHeader.width); ++pcount) {
 				byte skip = *tmp++;
 				abl += skip;
 				signed char tmp_count = (signed char)*tmp++;
 				short signed int count = (short signed int)tmp_count;
 				if (count > 0) {
 					count <<= 1;
-					while ((count) && (j < flic_header.width)) {
+					while ((count) && (j < _flicHeader.width)) {
 						*abl++ = *tmp++;
 						++j;
 						--count;
@@ -356,7 +356,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 					count = -count;
 					short int data = *(short int *)tmp;
 					tmp += 2;
-					while ((count > 0) && (j < flic_header.width)) {
+					while ((count > 0) && (j < _flicHeader.width)) {
 						*((short int *)abl) = data;
 						abl += 2;
 						j += 2;
@@ -367,7 +367,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 			if (last_flag)
 				*abl++ = last_byte;
 		}
-		abl = tabl + flic_header.width;
+		abl = tabl + _flicHeader.width;
 		ipo = (short int *)tmp;
 	}
 }
@@ -375,29 +375,29 @@ void flic::delta_chunk_byte(byte *tmp) {
 int16 flic::custom_play(CustomInfo *ci) {
 	int16 ret = 0;
 
-	Cinfo = ci;
-	load_puffer = ci->TempArea;
-	virt_screen = ci->VirtScreen + 4;
-	Music = ci->MusicSlot;
-	Sound = _soundBuffer;
+	_cInfo = ci;
+	_loadBuffer = ci->TempArea;
+	_virtScreen = ci->VirtScreen + 4;
+	_music = ci->MusicSlot;
+	_sound = _soundBuffer;
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(ci->Handle);
 	if (rs) {
-		if (custom_header.load(rs)) {
-			if (!scumm_strnicmp(custom_header.id, "CFO", 4)) {
-				cls_flag = false;
-				fade_flag = false;
-				fade_delay = 0;
-				CurrentFrame = 0;
-
-				for (uint16 i = 0; (i < custom_header.frames) && (!modul) && (ret >= 0); i++) {
-					if (!custom_frame.load(rs)) {
+		if (_customHeader.load(rs)) {
+			if (!scumm_strnicmp(_customHeader.id, "CFO", 4)) {
+				_clsFlag = false;
+				_fadeFlag = false;
+				_fadeDelay = 0;
+				_currentFrame = 0;
+
+				for (uint16 i = 0; (i < _customHeader.frames) && (!modul) && (ret >= 0); i++) {
+					if (!_customFrame.load(rs)) {
 						error("flic error");
 					} else {
-						if ((custom_frame.type != PREFIX) && (custom_frame.type != CUSTOM)) {
-							uint32 start = g_system->getMillis() + custom_header.speed;
-							if (custom_frame.size) {
-								if (rs->read(load_puffer, custom_frame.size) != custom_frame.size) {
+						if ((_customFrame.type != PREFIX) && (_customFrame.type != CUSTOM)) {
+							uint32 start = g_system->getMillis() + _customHeader.speed;
+							if (_customFrame.size) {
+								if (rs->read(_loadBuffer, _customFrame.size) != _customFrame.size) {
 									error("flic error");
 								} else {
 									ret = decode_cframe();
@@ -414,9 +414,9 @@ int16 flic::custom_play(CustomInfo *ci) {
 								g_events->update();
 								SHOULD_QUIT_RETURN0;
 							} while (ende <= start);
-							++CurrentFrame;
+							++_currentFrame;
 
-						} else if (custom_frame.type == CUSTOM) {
+						} else if (_customFrame.type == CUSTOM) {
 							decode_custom_frame(
 								dynamic_cast<Common::SeekableReadStream *>(ci->Handle));
 
@@ -438,9 +438,9 @@ int16 flic::custom_play(CustomInfo *ci) {
 
 void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
-	tmf_header *th = (tmf_header *)Music;
+	tmf_header *th = (tmf_header *)_music;
 
-	for (uint16 i = 0; (i < custom_frame.chunks) && (!modul); i++) {
+	for (uint16 i = 0; (i < _customFrame.chunks) && (!modul); i++) {
 		ChunkHead chead;
 		if (!chead.load(handle)) {
 			error("flic error");
@@ -459,10 +459,10 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case LOAD_MUSIC:
-			if (handle->read(Music, chead.size) != chead.size) {
+			if (handle->read(_music, chead.size) != chead.size) {
 				error("flic error");
 			} else {
-				byte *tmp = Music;
+				byte *tmp = _music;
 				tmp += sizeof(tmf_header);
 				tmp += ((uint32)th->pattern_anz) * 1024l;
 				for (uint16 j = 0; j < 31; j++) {
@@ -481,12 +481,12 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 		case LOAD_VOC:
 			if (!File::readArray(handle, &para[0], 1) ||
-				handle->read(Sound, chead.size - 2) != (chead.size - 2)) {
+				handle->read(_sound, chead.size - 2) != (chead.size - 2)) {
 				error("flic error");
 			} else {
-				sounds[para[0]] = Sound;
-				Ssize[para[0]] = chead.size - 2;
-				Sound += chead.size;
+				_sounds[para[0]] = _sound;
+				_sSize[para[0]] = chead.size - 2;
+				_sound += chead.size;
 			}
 			break;
 
@@ -559,7 +559,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 
 				Chewy::Sound *sound = g_engine->_sound;
 				sound->setSoundVolume(volume);
-				sound->playSound(sounds[number], Ssize[number], channel, repeat, DisposeAfterUse::NO);
+				sound->playSound(_sounds[number], _sSize[number], channel, repeat, DisposeAfterUse::NO);
 			}
 			break;
 
@@ -611,7 +611,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case CLEAR_SCREEN:
-			out->setze_zeiger(virt_screen);
+			out->setze_zeiger(_virtScreen);
 			out->cls();
 			out->setze_zeiger(nullptr);
 			out->cls();
@@ -625,12 +625,12 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 }
 
 int16 flic::decode_cframe() {
-	byte *tmp_buf = load_puffer;
+	byte *tmp_buf = _loadBuffer;
 	int16 update_flag = false;
 	int16 action_ret = 0;
 
-	if (custom_frame.chunks != 0) {
-		for (uint16 i = 0; i < custom_frame.chunks; i++) {
+	if (_customFrame.chunks != 0) {
+		for (uint16 i = 0; i < _customFrame.chunks; i++) {
 			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
 			ChunkHead chunk_header;
 			chunk_header.load(&rs);
@@ -647,13 +647,13 @@ int16 flic::decode_cframe() {
 				break;
 
 			case BYTE_RUN:
-				decode_rle(virt_screen, tmp_buf,
-				    custom_header.width, custom_header.height);
+				decode_rle(_virtScreen, tmp_buf,
+				    _customHeader.width, _customHeader.height);
 				update_flag = true;
 				break;
 
 			case DELTA_FLC:
-				decode_flc(virt_screen, tmp_buf);
+				decode_flc(_virtScreen, tmp_buf);
 				update_flag = true;
 
 				break;
@@ -661,7 +661,7 @@ int16 flic::decode_cframe() {
 				break;
 
 			case CLS:
-				out->setze_zeiger(virt_screen);
+				out->setze_zeiger(_virtScreen);
 				out->cls();
 				out->setze_zeiger(nullptr);
 
@@ -669,7 +669,7 @@ int16 flic::decode_cframe() {
 				break;
 
 			case UNPRESSED:
-				out->back2back(load_puffer, virt_screen);
+				out->back2back(_loadBuffer, _virtScreen);
 
 				update_flag = true;
 				break;
@@ -689,18 +689,18 @@ int16 flic::decode_cframe() {
 		}
 
 		if (update_flag != false) {
-			if (custom_user) {
-				out->back2back(virt_screen, load_puffer);
-				out->setze_zeiger(virt_screen);
-				action_ret = custom_user(CurrentFrame);
+			if (_customUser) {
+				out->back2back(_virtScreen, _loadBuffer);
+				out->setze_zeiger(_virtScreen);
+				action_ret = _customUser(_currentFrame);
 				out->setze_zeiger(nullptr);
-				out->back2screen(virt_screen - 4);
-				out->back2back(load_puffer, virt_screen);
+				out->back2screen(_virtScreen - 4);
+				out->back2back(_loadBuffer, _virtScreen);
 			} else
-				out->back2screen(virt_screen - 4);
-			if (fade_flag != false) {
-				out->einblenden(fade_pal, fade_delay);
-				fade_flag = false;
+				out->back2screen(_virtScreen - 4);
+			if (_fadeFlag != false) {
+				out->einblenden(_fadePal, _fadeDelay);
+				_fadeFlag = false;
 			}
 		}
 	}
@@ -709,37 +709,37 @@ int16 flic::decode_cframe() {
 }
 
 void flic::free_sound(int16 nr) {
-	byte *fsound = sounds[nr];
-	long fsize = Ssize[nr];
+	byte *fsound = _sounds[nr];
+	long fsize = _sSize[nr];
 	if ((fsound != 0) && (fsize != 0)) {
 		long copysize = SOUND_SLOT_SIZE;
 		copysize -= (long)(fsound - _soundBuffer);
 		memmove(fsound, fsound + fsize, copysize);
 		for (int16 i = 0; i < 50; i++) {
-			if (sounds[i] == fsound) {
-				sounds[i] = 0;
-				Ssize[i] = 0;
-			} else if (sounds[i] > fsound)
-				sounds[i] -= fsize;
+			if (_sounds[i] == fsound) {
+				_sounds[i] = 0;
+				_sSize[i] = 0;
+			} else if (_sounds[i] > fsound)
+				_sounds[i] -= fsize;
 		}
-		Sound -= fsize;
+		_sound -= fsize;
 	}
 }
 
 void flic::set_custom_user_function(int16(*user_funktion)(int16 frame)) {
-	custom_user = user_funktion;
+	_customUser = user_funktion;
 }
 
 void flic::remove_custom_user_function() {
-	custom_user = nullptr;
+	_customUser = nullptr;
 }
 
 void flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
-	flic_user = user_funktion;
+	_flicUser = user_funktion;
 }
 
 void flic::remove_flic_user_function() {
-	flic_user = nullptr;
+	_flicUser = nullptr;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 44b549cb255..f2b20b26bbd 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -98,25 +98,25 @@ private:
 	void decode_custom_frame(Common::SeekableReadStream *handle);
 	void free_sound(int16 nr);
 
-	byte *load_puffer;
-	byte *virt_screen;
-	byte *Music;
-	byte *Sound;
+	byte *_loadBuffer;
+	byte *_virtScreen;
+	byte *_music;
+	byte *_sound;
 	byte *_soundBuffer;
-	CustomInfo *Cinfo;
-	FlicHead flic_header;
-	CustomFlicHead custom_header;
-	CustomFrameHead custom_frame;
-	FrameHead frame_header;
-	bool fade_flag;
-	bool cls_flag;
-	byte fade_pal[768];
-	int16 fade_delay;
-	byte *sounds[50];
-	uint32 Ssize[50];
-	int16 CurrentFrame;
-	int16(*custom_user)(int16) = nullptr;
-	int16(*flic_user)(int16) = nullptr;
+	CustomInfo *_cInfo;
+	FlicHead _flicHeader;
+	CustomFlicHead _customHeader;
+	CustomFrameHead _customFrame;
+	FrameHead _frameHeader;
+	bool _fadeFlag;
+	bool _clsFlag;
+	byte _fadePal[PALETTE_SIZE];
+	int16 _fadeDelay;
+	byte *_sounds[50];
+	uint32 _sSize[50];
+	int16 _currentFrame;
+	int16(*_customUser)(int16) = nullptr;
+	int16(*_flicUser)(int16) = nullptr;
 };
 
 } // namespace Chewy


Commit: eb1d434f8a254a0e7e78fe888eb45b202b4a30eb
    https://github.com/scummvm/scummvm/commit/eb1d434f8a254a0e7e78fe888eb45b202b4a30eb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Rename McgaGraphics class fields

Changed paths:
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index ad0043eecbf..6d31700dce6 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -32,8 +32,8 @@ namespace Chewy {
 
 McgaGraphics::McgaGraphics() {
 	for (int i = 0; i < 360; i++) {
-		sinus[i] = sin(i * 3.14159265359 / 180);
-		cosinus[i] = cos(i * 3.14159265359 / 180);
+		_sines[i] = sin(i * 3.14159265359 / 180);
+		_cosines[i] = cos(i * 3.14159265359 / 180);
 	}
 }
 
@@ -277,7 +277,7 @@ void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, diff;
 	int16 w, i;
 	for (w = 0; w <= 91; w++) {
-		a = (int16)(sinus[w] * ((float)r * 0.85));
+		a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
 			diff = a - alt;
 			for (i = 0; i <= diff; i++) {
@@ -287,7 +287,7 @@ void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 				setpixel_mcga(x + b, (y + (alt + i)), farbe);
 			}
 		}
-		b = (int16)(cosinus[w] * (float)r);
+		b = (int16)(_cosines[w] * (float)r);
 		setpixel_mcga(x - b, y - a, farbe);
 		setpixel_mcga(x + b, y - a, farbe);
 		setpixel_mcga(x - b, y + a, farbe);
@@ -300,7 +300,7 @@ void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, i = 0, diff;
 	int16 w;
 	for (w = 0; w <= 90; w++) {
-		a = (int16)(sinus[w] * ((float)r * 0.85));
+		a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
 			diff = a - alt;
 			for (i = 0; i < diff; i++) {
@@ -308,7 +308,7 @@ void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 				line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
 			}
 		}
-		b = (int16)(cosinus[w] * ((float)r));
+		b = (int16)(_cosines[w] * ((float)r));
 		line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
 		line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
 		alt = a;
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index ab73683da6e..46e21cbf1e1 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -102,8 +102,9 @@ public:
 private:
 	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
 	int16 devices();
-	float sinus[360];
-	float cosinus[360];
+
+	float _sines[360];
+	float _cosines[360];
 	byte _palTable[PALETTE_SIZE];
 	uint8 _writeMode = 0;
 	bool _mono = false;


Commit: 3f0d86d88b437e92aed18f383359f1a2e748d4a4
    https://github.com/scummvm/scummvm/commit/3f0d86d88b437e92aed18f383359f1a2e748d4a4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Cleanup of memory class

Changed paths:
    engines/chewy/memory.cpp
    engines/chewy/memory.h


diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index e6d116430fe..0ece963a814 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -67,7 +67,6 @@ taf_info *memory::taf_adr(const char *filename) {
 }
 
 taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
-#if 1
 	Common::File *rs = new Common::File();
 	rs->open(CH_SPZ_FILE);
 	taf_dateiheader header;
@@ -161,49 +160,12 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	delete rs;
 
 	return ts_info;
-#else
-	// TODO: New code - currently crashes with an OOB memory access
-	SpriteResource *res = new SpriteResource(CH_SPZ_FILE);
-	int16 imageCount = res->getChunkCount();
-	uint32 size = 0;
-	taf_seq_info *ts_info = nullptr;
-	byte *tmp1;
-	byte *imgPtr;
-
-	for (int i = 0; i < image_anz; i++) {
-		TAFChunk *sprite = res->getSprite(i + image_start);
-		size += sprite->width * sprite->height;
-		delete sprite;
-	}
-
-	size += image_anz * sizeof(byte *);
-	size += image_anz * sizeof(char *);
-	size += ((uint32)sizeof(taf_seq_info));
-	tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
-
-	ts_info = (taf_seq_info *)tmp1;
-	ts_info->anzahl = image_anz;
-	ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
-	ts_info->korrektur = (int16 *)(tmp1 + size);
-
-	imgPtr = tmp1 + (((uint32)sizeof(taf_seq_info)) + (image_anz * sizeof(char *)));
-
-	for (int i = 0; i < image_anz; i++) {
-		ts_info->image[i] = imgPtr;
-		imgPtr += res->getSpriteData(i, &ts_info->image[i], false);
-	}
-
-	memcpy(ts_info->korrektur, res->getSpriteCorrectionsTable(), image_anz * 2 * sizeof(int16));
-
-	delete res;
-
-	return ts_info;
-#endif
 }
 
 void memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
+
 	if (!modul) {
 		*speicher = (byte *)MALLOC(size);
 		if (*speicher) {
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index ded098d5c8c..d01b87180f9 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -39,9 +39,6 @@ public:
 	byte *void_adr(const char *filename);
 
 	Data *file;
-private:
-
-	uint32 mem_avail;
 };
 
 } // namespace Chewy


Commit: 988c210ec5dfb1106367b7d7981fc83ada9b1ad8
    https://github.com/scummvm/scummvm/commit/988c210ec5dfb1106367b7d7981fc83ada9b1ad8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Rename InputMgr class fields

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/io_game.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/rooms/room39.cpp


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 5a5c4a4a1f2..1d45248bc99 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -140,7 +140,7 @@ void cursor::wait_taste_los(bool maus_plot) {
 	}
 
 	if (!is_mouse)
-		_in->hot_key = 0;
+		_in->_hotkey = 0;
 
 	int16 stay = 1;
 	int16 switch_code = 1;
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index dbc9a5ea074..eb78d3f95ef 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -220,11 +220,11 @@ void Inventory::menu() {
 					break;
 
 				case 3:
-					in->hot_key = PAGE_UP;
+					in->_hotkey = PAGE_UP;
 					break;
 
 				case 4:
-					in->hot_key = PAGE_DOWN;
+					in->_hotkey = PAGE_DOWN;
 					break;
 
 				case 5:
@@ -272,7 +272,7 @@ void Inventory::menu() {
 			}
 		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
 			if (!maus_flag) {
-				in->hot_key = ESC;
+				in->_hotkey = ESC;
 				maus_flag = 1;
 			}
 		}
@@ -500,11 +500,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 		switch (kbinfo.scan_code) {
 		case F1_KEY:
-			in->hot_key = F1_KEY;
+			in->_hotkey = F1_KEY;
 			break;
 
 		case F2_KEY:
-			in->hot_key = F2_KEY;
+			in->_hotkey = F2_KEY;
 			break;
 
 		case ESC:
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 166ee112842..bce951b9261 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -126,16 +126,16 @@ int16 io_game::io_menu(iog_init *iostruc) {
 		_cur->show_cur();
 		break;
 	case 1:
-		_in->hot_key = 59;
+		_in->_hotkey = 59;
 		break;
 	case 2:
-		_in->hot_key = 60;
+		_in->_hotkey = 60;
 		break;
 	case 3:
-		_in->hot_key = 61;
+		_in->_hotkey = 61;
 		break;
 	case 4:
-		_in->hot_key = 62;
+		_in->_hotkey = 62;
 		break;
 	}
 
@@ -157,7 +157,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 				mouse_f = 1;
 				if (j < 6)
 
-					_in->hot_key = CODE_TBL_G[j];
+					_in->_hotkey = CODE_TBL_G[j];
 				if ((j == 6) && (y >= _io->popy + 8)) {
 					y -= _io->popy + 8;
 					y /= 10;
@@ -387,7 +387,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 					io_flag = 0;
 				}
 			} else
-				_in->hot_key = auswahl + 58;
+				_in->_hotkey = auswahl + 58;
 			g_events->delay(200);
 			_kbinfo->key_code = '\0';
 			break;
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 7792ee34f68..95108f9fa9c 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -46,8 +46,8 @@ void set_mouse_handler(maus_info *mpos) {
 }
 
 InputMgr::InputMgr() {
-	maus_info_blk = nullptr;
-	kb_info_blk = nullptr;
+	_mouseInfoBlk = nullptr;
+	_kbInfoBlk = nullptr;
 }
 
 InputMgr::~InputMgr() {
@@ -82,13 +82,13 @@ int16 InputMgr::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 
 void InputMgr::neuer_kb_handler(kb_info *key) {
 	set_new_kb_handler(key);
-	kb_info_blk = key;
-	kb_info_blk->key_code = '\0';
+	_kbInfoBlk = key;
+	_kbInfoBlk->key_code = '\0';
 }
 
 void InputMgr::alter_kb_handler() {
 	set_old_kb_handler();
-	kb_info_blk = nullptr;
+	_kbInfoBlk = nullptr;
 	warning("STUB - InputMgr::alter_kb_handler");
 #if 0
 	while (kbhit())
@@ -98,35 +98,35 @@ void InputMgr::alter_kb_handler() {
 
 void InputMgr::neuer_maushandler(maus_info *mpos) {
 	set_mouse_handler(mpos);
-	maus_info_blk = mpos;
+	_mouseInfoBlk = mpos;
 }
 
 in_zeiger *InputMgr::get_in_zeiger() {
-	inzeig.minfo = maus_info_blk;
-	inzeig.kbinfo = kb_info_blk;
+	_inzeig.minfo = _mouseInfoBlk;
+	_inzeig.kbinfo = _kbInfoBlk;
 
-	return &inzeig;
+	return &_inzeig;
 }
 
 int16 InputMgr::get_switch_code() {
 	int16 switch_code = 0;
 
-	if (maus_info_blk) {
-		if (maus_info_blk->button == 2) {
+	if (_mouseInfoBlk) {
+		if (_mouseInfoBlk->button == 2) {
 			switch_code = ESC;
-		} else if (maus_info_blk->button == 1)
+		} else if (_mouseInfoBlk->button == 1)
 			switch_code = 255;
-		else if (maus_info_blk->button == 4)
+		else if (_mouseInfoBlk->button == 4)
 			switch_code = 254;
 	}
 
-	if (kb_info_blk)
-		if (kb_info_blk->key_code != 0)
-			switch_code = (int16)kb_info_blk->key_code;
+	if (_kbInfoBlk)
+		if (_kbInfoBlk->key_code != 0)
+			switch_code = (int16)_kbInfoBlk->key_code;
 
-	if (hot_key != 0) {
-		switch_code = (int16)hot_key;
-		hot_key = 0;
+	if (_hotkey != 0) {
+		switch_code = (int16)_hotkey;
+		_hotkey = 0;
 	}
 
 	return switch_code;
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 7f765f31b42..3813057506f 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -42,6 +42,7 @@ class InputMgr {
 public:
 	InputMgr();
 	~InputMgr();
+
 	int init();
 	void speed(int16 x, int16 y);
 	void move_mouse(int16 x, int16 y);
@@ -58,11 +59,12 @@ public:
 	in_zeiger *get_in_zeiger();
 	int16 get_switch_code();
 
-	int16 hot_key = 0;
+	int16 _hotkey = 0;
+
 private:
-	maus_info *maus_info_blk = nullptr;
-	kb_info *kb_info_blk = nullptr;
-	in_zeiger inzeig;
+	maus_info *_mouseInfoBlk = nullptr;
+	kb_info *_kbInfoBlk = nullptr;
+	in_zeiger _inzeig;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 249b182678e..04dc6b13c9a 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -376,7 +376,7 @@ int16 Room39::setup_func(int16 frame) {
 			start_aad(601, 0);
 			break;
 		case 297:
-			in->hot_key = 1;
+			in->_hotkey = 1;
 			break;
 		case 171:
 		case 266:


Commit: e866f7ca089fe1854aa9b07e7e7ea8279f8cc00d
    https://github.com/scummvm/scummvm/commit/e866f7ca089fe1854aa9b07e7e7ea8279f8cc00d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Rename of movclass class fields

Changed paths:
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h


diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 947ce1c1b1d..5356fc4b697 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -28,8 +28,8 @@ namespace Chewy {
 
 #define LEFT_VECT -1
 #define RIGHT_VECT 1
-#define UP_VECT -gpkt->Breite
-#define DOWN_VECT gpkt->Breite
+#define UP_VECT -_gpkt->Breite
+#define DOWN_VECT _gpkt->Breite
 #define GEFUNDEN 1
 #define UNBEGEHBAR 2
 #define Y_DOWN 1
@@ -49,10 +49,10 @@ namespace Chewy {
 #define MOV_Y 2
 
 movclass::movclass() {
-	vec_tbl[0] = -40;
-	vec_tbl[1] = 1;
-	vec_tbl[2] = 40;
-	vec_tbl[3] = -1;
+	_vecTbl[0] = -40;
+	_vecTbl[1] = 1;
+	_vecTbl[2] = 40;
+	_vecTbl[3] = -1;
 }
 
 movclass::~movclass() {
@@ -63,36 +63,36 @@ void movclass::goto_xy(GotoPkt *gp) {
 	int16 ziel_feld;
 	//int16 anz;
 	int16 tmp;
-	gpkt = gp;
-	agv.AutoGo = false;
-	agv.Continue = false;
-	vec_tbl[0] = -gpkt->Breite;
-	vec_tbl[2] = gpkt->Breite;
-	plot_delay = 20;
+	_gpkt = gp;
+	_agv.AutoGo = false;
+	_agv.Continue = false;
+	_vecTbl[0] = -_gpkt->Breite;
+	_vecTbl[2] = _gpkt->Breite;
+	_plotDelay = 20;
 	calc_xy();
-	plot_delay = 0;
+	_plotDelay = 0;
 
-	start_feld = get_feld_nr(gpkt->Sx, gpkt->Sy);
-	ziel_feld = get_feld_nr(gpkt->Dx, gpkt->Dy);
+	start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
+	ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
 	tmp = ziel_feld;
 	/*anz = */calc_go(start_feld, &ziel_feld);
 
 	if (tmp != ziel_feld) {
 		get_mov_line();
-		if (gml.MLineFeld != -1) {
-			calc_mov_line_xit(gml.MLineFeld);
-			if (mle.FNr != -1) {
-				agv.AutoGo = true;
-				agv.Start = 0;
-				agv.LastFeld = -1;
-				agv.AkKnoten = 0;
-				start_feld = get_feld_nr(gpkt->Sx, gpkt->Sy);
-				ziel_feld = gml.MLineFeld;
+		if (_gml.MLineFeld != -1) {
+			calc_mov_line_xit(_gml.MLineFeld);
+			if (_mle.FNr != -1) {
+				_agv.AutoGo = true;
+				_agv.Start = 0;
+				_agv.LastFeld = -1;
+				_agv.AkKnoten = 0;
+				start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
+				ziel_feld = _gml.MLineFeld;
 				calc_go(start_feld, &ziel_feld);
-				if (gml.MLineFeld != ziel_feld) {
-					agv.PktAnz = 2;
+				if (_gml.MLineFeld != ziel_feld) {
+					_agv.PktAnz = 2;
 				} else {
-					agv.PktAnz = 1;
+					_agv.PktAnz = 1;
 				}
 			}
 		}
@@ -106,71 +106,71 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 	int16 ret;
 	ret = -1;
 
-	if (agv.AutoGo == true) {
-		speicher = gpkt->Mem;
-		speicher += (gpkt->Breite * gpkt->Hoehe) * gpkt->AkMovEbene;
-		if (!agv.Start) {
-			agv.Start = agv.PktAnz;
-			if (agv.PktAnz == 1) {
-				agv.Start = 3;
-				get_feld_xy(gml.MLineFeld, &agv.X_End, &agv.Y_End);
-				agv.AkFeld = gml.MLineFeld;
+	if (_agv.AutoGo == true) {
+		speicher = _gpkt->Mem;
+		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
+		if (!_agv.Start) {
+			_agv.Start = _agv.PktAnz;
+			if (_agv.PktAnz == 1) {
+				_agv.Start = 3;
+				get_feld_xy(_gml.MLineFeld, &_agv.X_End, &_agv.Y_End);
+				_agv.AkFeld = _gml.MLineFeld;
 			} else {
-				get_feld_xy(gml.GotoFeld, &agv.X_End, &agv.Y_End);
-				agv.AkFeld = gml.GotoFeld;
+				get_feld_xy(_gml.GotoFeld, &_agv.X_End, &_agv.Y_End);
+				_agv.AkFeld = _gml.GotoFeld;
 			}
-			*auto_x = agv.X_End + 4;
-			*auto_y = agv.Y_End + 4;
+			*auto_x = _agv.X_End + 4;
+			*auto_y = _agv.Y_End + 4;
 			ret = true;
 		} else {
-			if (get_feld_nr(x, y) == agv.AkFeld) {
-				if (agv.Start == 2) {
-					agv.Start = 3;
-					get_feld_xy(gml.GotoFeld, &agv.X_End, &agv.Y_End);
-					*auto_x = agv.X_End + 4;
-					*auto_y = agv.Y_End + 4;
+			if (get_feld_nr(x, y) == _agv.AkFeld) {
+				if (_agv.Start == 2) {
+					_agv.Start = 3;
+					get_feld_xy(_gml.GotoFeld, &_agv.X_End, &_agv.Y_End);
+					*auto_x = _agv.X_End + 4;
+					*auto_y = _agv.Y_End + 4;
 					ret = true;
-				} else if (agv.Start == 3) {
-					if (agv.LastFeld == -1) {
-						agv.LastFeld = gml.MLineFeld;
-						agv.AkFeld = gml.MLineFeld + mle.Direction;
-						if (speicher[agv.AkFeld] == MOV_LINE_KNOTEN) {
-							feld1knoten = true;
+				} else if (_agv.Start == 3) {
+					if (_agv.LastFeld == -1) {
+						_agv.LastFeld = _gml.MLineFeld;
+						_agv.AkFeld = _gml.MLineFeld + _mle.Direction;
+						if (speicher[_agv.AkFeld] == MOV_LINE_KNOTEN) {
+							_feld1knoten = true;
 						} else
-							feld1knoten = false;
-						get_feld_xy(agv.AkFeld, &agv.X_End, &agv.Y_End);
-						*auto_x = agv.X_End + 4;
-						*auto_y = agv.Y_End + 4;
+							_feld1knoten = false;
+						get_feld_xy(_agv.AkFeld, &_agv.X_End, &_agv.Y_End);
+						*auto_x = _agv.X_End + 4;
+						*auto_y = _agv.Y_End + 4;
 						ret = true;
-					} else if (get_feld_nr(x, y) == agv.AkFeld) {
-						if (agv.AkFeld == mle.FNr) {
-							agv.AutoGo = false;
-							*auto_x = gpkt->Dx;
-							*auto_y = gpkt->Dy;
+					} else if (get_feld_nr(x, y) == _agv.AkFeld) {
+						if (_agv.AkFeld == _mle.FNr) {
+							_agv.AutoGo = false;
+							*auto_x = _gpkt->Dx;
+							*auto_y = _gpkt->Dy;
 							ret = true;
 						} else {
 							ok = 0;
-							if (feld1knoten) {
-								feld1knoten = false;
-								agv.LastFeld = agv.AkFeld;
-								agv.AkFeld = mle.KnPkt[agv.AkKnoten];
-								++agv.AkKnoten;
-								if (agv.AkFeld != -1)
+							if (_feld1knoten) {
+								_feld1knoten = false;
+								_agv.LastFeld = _agv.AkFeld;
+								_agv.AkFeld = _mle.KnPkt[_agv.AkKnoten];
+								++_agv.AkKnoten;
+								if (_agv.AkFeld != -1)
 									ok = 1;
 							} else {
 								for (i = 0; i < 4 && !ok; i++) {
-									if (speicher[agv.AkFeld + vec_tbl[i]] == MOV_LINE_IDX) {
-										if (agv.AkFeld + vec_tbl[i] != agv.LastFeld) {
-											agv.LastFeld = agv.AkFeld;
-											agv.AkFeld += vec_tbl[i];
+									if (speicher[_agv.AkFeld + _vecTbl[i]] == MOV_LINE_IDX) {
+										if (_agv.AkFeld + _vecTbl[i] != _agv.LastFeld) {
+											_agv.LastFeld = _agv.AkFeld;
+											_agv.AkFeld += _vecTbl[i];
 											ok = 1;
 										}
-									} else if (speicher[agv.AkFeld + vec_tbl[i]] == MOV_LINE_KNOTEN) {
-										if (agv.AkFeld + vec_tbl[i] != agv.LastFeld) {
-											agv.LastFeld = agv.AkFeld + vec_tbl[i];
-											agv.AkFeld = mle.KnPkt[agv.AkKnoten];
-											++agv.AkKnoten;
-											if (agv.AkFeld == -1)
+									} else if (speicher[_agv.AkFeld + _vecTbl[i]] == MOV_LINE_KNOTEN) {
+										if (_agv.AkFeld + _vecTbl[i] != _agv.LastFeld) {
+											_agv.LastFeld = _agv.AkFeld + _vecTbl[i];
+											_agv.AkFeld = _mle.KnPkt[_agv.AkKnoten];
+											++_agv.AkKnoten;
+											if (_agv.AkFeld == -1)
 												ok = 0;
 											else
 												ok = 1;
@@ -179,13 +179,13 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 								}
 							}
 							if (ok) {
-								get_feld_xy(agv.AkFeld, &agv.X_End, &agv.Y_End);
-								*auto_x = agv.X_End + 4;
-								*auto_y = agv.Y_End + 4;
+								get_feld_xy(_agv.AkFeld, &_agv.X_End, &_agv.Y_End);
+								*auto_x = _agv.X_End + 4;
+								*auto_y = _agv.Y_End + 4;
 							} else {
-								agv.AutoGo = false;
-								*auto_x = gpkt->Dx;
-								*auto_y = gpkt->Dy;
+								_agv.AutoGo = false;
+								*auto_x = _gpkt->Dx;
+								*auto_y = _gpkt->Dy;
 							}
 							ret = true;
 						}
@@ -199,16 +199,16 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 }
 
 void movclass::stop_auto_go() {
-	agv.AutoGo = false;
-	agv.Continue = true;
+	_agv.AutoGo = false;
+	_agv.Continue = true;
 }
 
 void movclass::continue_auto_go() {
-	agv.AutoGo = agv.Continue;
+	_agv.AutoGo = _agv.Continue;
 }
 
 bool movclass::auto_go_status() {
-	return agv.AutoGo;
+	return _agv.AutoGo;
 }
 
 void movclass::calc_xy() {
@@ -225,7 +225,7 @@ void movclass::calc_xy() {
 	int16 yvector = 0;
 	int16 tmp_feld;
 
-	if (!ged->ged_idx(gpkt->Dx, gpkt->Dy, gpkt->Breite, gpkt->Mem)) {
+	if (!ged->ged_idx(_gpkt->Dx, _gpkt->Dy, _gpkt->Breite, _gpkt->Mem)) {
 		ende = 0;
 		count = 0;
 		min_x = -1;
@@ -233,8 +233,8 @@ void movclass::calc_xy() {
 
 		while (!ende) {
 			min_steps = 30000;
-			x = gpkt->Dx - (count + 1) * 8;
-			y = gpkt->Dy - (count + 1) * 8;
+			x = _gpkt->Dx - (count + 1) * 8;
+			y = _gpkt->Dy - (count + 1) * 8;
 
 			for (seite = 0; seite < 4; seite++) {
 				anz = 2 + (count * 2);
@@ -265,11 +265,11 @@ void movclass::calc_xy() {
 				}
 
 				for (i = 0; i < anz; i++) {
-					if (x >= 0 && x < gpkt->Breite * 8 &&
-					        y >= 0 && y < gpkt->Hoehe * 8) {
-						if (ged->ged_idx(x, y, gpkt->Breite, gpkt->Mem)) {
-							aksteps = abs(gpkt->Dx - x);
-							aksteps += abs(gpkt->Dy - y);
+					if (x >= 0 && x < _gpkt->Breite * 8 &&
+					        y >= 0 && y < _gpkt->Hoehe * 8) {
+						if (ged->ged_idx(x, y, _gpkt->Breite, _gpkt->Mem)) {
+							aksteps = abs(_gpkt->Dx - x);
+							aksteps += abs(_gpkt->Dy - y);
 							if (aksteps < min_steps) {
 								min_steps = aksteps;
 								min_x = x;
@@ -286,9 +286,9 @@ void movclass::calc_xy() {
 			if (min_steps != 30000) {
 				ende = 1;
 				tmp_feld = get_feld_nr(min_x, min_y);
-				get_feld_xy(tmp_feld, &gpkt->Dx, &gpkt->Dy);
-				gpkt->Dx += 4;
-				gpkt->Dy += 4;
+				get_feld_xy(tmp_feld, &_gpkt->Dx, &_gpkt->Dy);
+				_gpkt->Dx += 4;
+				_gpkt->Dy += 4;
 			}
 		}
 	}
@@ -307,7 +307,7 @@ short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
 	ObjMov om;
 	MovInfo mi;
 
-	mi.Vorschub = gpkt->Vorschub;
+	mi.Vorschub = _gpkt->Vorschub;
 	get_feld_xy(src_feld, &om.Xypos[0], &om.Xypos[1]);
 	get_feld_xy(*dst_feld, &mi.XyzEnd[0], &mi.XyzEnd[1]);
 	mi.XyzStart[0] = om.Xypos[0];
@@ -358,15 +358,15 @@ short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
 			tmpz = 0;
 			if (!ged->ged_idx(om.Xypos[0] + tmpx + tmpz,
 			                  om.Xypos[1] + tmpy + tmpz,
-			                  gpkt->Breite, gpkt->Mem)) {
+			                  _gpkt->Breite, _gpkt->Mem)) {
 
 				if (!ged->ged_idx(om.Xypos[0] + tmpx + tmpz,
 				                  om.Xypos[1] + tmpz,
-				                  gpkt->Breite, gpkt->Mem)) {
+				                  _gpkt->Breite, _gpkt->Mem)) {
 
 					if (!ged->ged_idx(om.Xypos[0] + tmpz,
 					                  om.Xypos[1] + tmpy + tmpz,
-					                  gpkt->Breite, gpkt->Mem)) {
+					                  _gpkt->Breite, _gpkt->Mem)) {
 
 						abbruch = UNBEGEHBAR;
 					} else {
@@ -448,14 +448,14 @@ void movclass::get_mov_line() {
 	int16 count;
 	int16 y_richtung;
 	byte *speicher;
-	gml.GotoFeld = -1;
-	gml.MLineFeld = -1;
-	if (gpkt->Ebenen > 1) {
-		speicher = gpkt->Mem;
+	_gml.GotoFeld = -1;
+	_gml.MLineFeld = -1;
+	if (_gpkt->Ebenen > 1) {
+		speicher = _gpkt->Mem;
 
-		speicher += (gpkt->Breite * gpkt->Hoehe) * gpkt->AkMovEbene;
+		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
 
-		start_feld = get_feld_nr(gpkt->Sx, gpkt->Sy);
+		start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
 		ende = 0;
 		count = 0;
 		min_steps = 30000;
@@ -464,20 +464,20 @@ void movclass::get_mov_line() {
 		while (!ende) {
 
 			tmp_feld = start_feld + count * count_vect;
-			if (ged->ged_idx(tmp_feld, gpkt->Breite, gpkt->Mem)) {
+			if (ged->ged_idx(tmp_feld, _gpkt->Breite, _gpkt->Mem)) {
 				abbruch = 0;
 				vector = 0;
-				while ((tmp_feld % gpkt->Breite) < (gpkt->Breite - 1) && !abbruch)
+				while ((tmp_feld % _gpkt->Breite) < (_gpkt->Breite - 1) && !abbruch)
 				{
-					if (ged->ged_idx(tmp_feld + vector, gpkt->Breite, gpkt->Mem)) {
+					if (ged->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
 						tmp_feld += vector;
 						if (speicher[tmp_feld] == MOV_LINE_IDX) {
-							ak_steps = abs((tmp_feld % gpkt->Breite) - (start_feld % gpkt->Breite));
-							ak_steps += abs((tmp_feld / gpkt->Breite) - (start_feld / gpkt->Breite));
+							ak_steps = abs((tmp_feld % _gpkt->Breite) - (start_feld % _gpkt->Breite));
+							ak_steps += abs((tmp_feld / _gpkt->Breite) - (start_feld / _gpkt->Breite));
 							if (ak_steps < min_steps) {
 								min_steps = ak_steps;
-								gml.GotoFeld = start_feld + count * count_vect;
-								gml.MLineFeld = tmp_feld;
+								_gml.GotoFeld = start_feld + count * count_vect;
+								_gml.MLineFeld = tmp_feld;
 							}
 						}
 						vector = RIGHT_VECT;
@@ -489,16 +489,16 @@ void movclass::get_mov_line() {
 				tmp_feld = start_feld + count * count_vect;
 				vector = LEFT_VECT;
 				abbruch = 0;
-				while ((tmp_feld % gpkt->Breite) > 0 && !abbruch) {
-					if (ged->ged_idx(tmp_feld + vector, gpkt->Breite, gpkt->Mem)) {
+				while ((tmp_feld % _gpkt->Breite) > 0 && !abbruch) {
+					if (ged->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
 						tmp_feld += vector;
 						if (speicher[tmp_feld] == MOV_LINE_IDX) {
-							ak_steps = abs((tmp_feld % gpkt->Breite) - (start_feld % gpkt->Breite));
-							ak_steps += abs((tmp_feld / gpkt->Breite) - (start_feld / gpkt->Breite));
+							ak_steps = abs((tmp_feld % _gpkt->Breite) - (start_feld % _gpkt->Breite));
+							ak_steps += abs((tmp_feld / _gpkt->Breite) - (start_feld / _gpkt->Breite));
 							if (ak_steps < min_steps) {
 								min_steps = ak_steps;
-								gml.GotoFeld = start_feld + count * count_vect;
-								gml.MLineFeld = tmp_feld;
+								_gml.GotoFeld = start_feld + count * count_vect;
+								_gml.MLineFeld = tmp_feld;
 							}
 						}
 					} else {
@@ -547,14 +547,14 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 	byte *speicher;
 	for (i = 0; i < MAX_KNOTEN_PKT; i++)
 		TmpKnPkt[i] = -1;
-	if (gpkt->Ebenen > 1) {
+	if (_gpkt->Ebenen > 1) {
 		memset((char *)knoten_felder, -1, MAX_KNOTEN_PKT * 6);
-		speicher = gpkt->Mem;
-		speicher += (gpkt->Breite * gpkt->Hoehe) * gpkt->AkMovEbene;
-		mle.Steps = 30000;
+		speicher = _gpkt->Mem;
+		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
+		_mle.Steps = 30000;
 		min_step_unerreicht = 30000;
-		mle.FNr = -1;
-		ziel_feld = get_feld_nr(gpkt->Dx, gpkt->Dy);
+		_mle.FNr = -1;
+		ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
 		calc_feld = start_feld;
 		last_feld = start_feld;
 		steps = 0;
@@ -570,21 +570,21 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 			tmp_feld = ziel_feld;
 			calc_go(calc_feld, &tmp_feld);
 			if (tmp_feld == ziel_feld) {
-				dest_steps = abs((ziel_feld % gpkt->Breite) - (calc_feld % gpkt->Breite));
-				dest_steps += abs((ziel_feld / gpkt->Breite) - (calc_feld / gpkt->Breite));
-				if (dest_steps < mle.Steps) {
-					mle.Steps = dest_steps;
-					mle.FNr = calc_feld;
+				dest_steps = abs((ziel_feld % _gpkt->Breite) - (calc_feld % _gpkt->Breite));
+				dest_steps += abs((ziel_feld / _gpkt->Breite) - (calc_feld / _gpkt->Breite));
+				if (dest_steps < _mle.Steps) {
+					_mle.Steps = dest_steps;
+					_mle.FNr = calc_feld;
 					if (dir == 30000)
-						mle.Direction = 0;
+						_mle.Direction = 0;
 					else
-						mle.Direction = dir;
+						_mle.Direction = dir;
 					for (i = 0; i < MAX_KNOTEN_PKT; i++)
-						mle.KnPkt[i] = TmpKnPkt[i];
+						_mle.KnPkt[i] = TmpKnPkt[i];
 				}
 			} else {
-				dest_steps = abs((ziel_feld % gpkt->Breite) - (tmp_feld % gpkt->Breite));
-				dest_steps += abs((ziel_feld / gpkt->Breite) - (tmp_feld / gpkt->Breite));
+				dest_steps = abs((ziel_feld % _gpkt->Breite) - (tmp_feld % _gpkt->Breite));
+				dest_steps += abs((ziel_feld / _gpkt->Breite) - (tmp_feld / _gpkt->Breite));
 				if (dest_steps < min_step_unerreicht) {
 					min_step_unerreicht = dest_steps;
 					feld_unerreicht = tmp_feld;
@@ -598,16 +598,16 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 			}
 			ok = 0;
 			for (i = 0; i < 4 && !ok; i++) {
-				if (speicher[calc_feld + vec_tbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_IDX)
+				if (speicher[calc_feld + _vecTbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_IDX)
 				{
-					if (calc_feld + vec_tbl[tbl_ptr + i * tbl_dir] != last_feld)
+					if (calc_feld + _vecTbl[tbl_ptr + i * tbl_dir] != last_feld)
 					{
 						last_feld = calc_feld;
-						calc_feld += vec_tbl[tbl_ptr + i * tbl_dir];
+						calc_feld += _vecTbl[tbl_ptr + i * tbl_dir];
 						++steps;
 						ok = 1;
 						if (dir == 30000) {
-							dir = vec_tbl[tbl_ptr + i * tbl_dir];
+							dir = _vecTbl[tbl_ptr + i * tbl_dir];
 						}
 						if (knoten_flag) {
 							TmpKnPkt[ak_knoten] = calc_feld;
@@ -615,10 +615,10 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 							knoten_flag = false;
 						}
 					}
-				} else if (speicher[calc_feld + vec_tbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_KNOTEN) {
-					if (calc_feld + vec_tbl[tbl_ptr + i * tbl_dir] != last_feld) {
+				} else if (speicher[calc_feld + _vecTbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_KNOTEN) {
+					if (calc_feld + _vecTbl[tbl_ptr + i * tbl_dir] != last_feld) {
 						if (dir == 30000) {
-							dir = vec_tbl[tbl_ptr + i * tbl_dir];
+							dir = _vecTbl[tbl_ptr + i * tbl_dir];
 						}
 						++ak_knoten;
 						for (k = 0; k < 6; k++)
@@ -639,7 +639,7 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 						}
 						knoten_felder[ak_knoten][k] = calc_feld;
 						last_feld = calc_feld;
-						calc_feld += vec_tbl[tbl_ptr + i * tbl_dir];
+						calc_feld += _vecTbl[tbl_ptr + i * tbl_dir];
 						knoten_felder[ak_knoten][4] = calc_feld;
 						++steps;
 						knoten_felder[ak_knoten][5] = steps;
@@ -656,10 +656,10 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 					for (i = 0; i < 4 && !ok; i++) {
 						if (knoten_felder[ak_knoten][tbl_ptr + i * tbl_dir] == -1) {
 							tmp_feld = knoten_felder[ak_knoten][4];
-							if (speicher[tmp_feld + vec_tbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_IDX)
+							if (speicher[tmp_feld + _vecTbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_IDX)
 							{
 								last_feld = knoten_felder[ak_knoten][4];
-								calc_feld = tmp_feld + vec_tbl[tbl_ptr + i * tbl_dir];
+								calc_feld = tmp_feld + _vecTbl[tbl_ptr + i * tbl_dir];
 
 								TmpKnPkt[ak_knoten] = calc_feld;
 								knoten_felder[ak_knoten][tbl_ptr + i * tbl_dir] = calc_feld;
@@ -680,16 +680,16 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 					last_feld = start_feld;
 				} else {
 					found = 1;
-					if (mle.FNr == -1) {
-						mle.Steps = min_step_unerreicht;
-						mle.FNr = feld_unerreicht;
-						mle.Direction = dir_unerreicht;
+					if (_mle.FNr == -1) {
+						_mle.Steps = min_step_unerreicht;
+						_mle.FNr = feld_unerreicht;
+						_mle.Direction = dir_unerreicht;
 						for (i = 0; i < MAX_KNOTEN_PKT; i++)
-							mle.KnPkt[i] = KnPkt_unrreicht[i];
+							_mle.KnPkt[i] = KnPkt_unrreicht[i];
 
-						get_feld_xy(feld_unerreicht, &gpkt->Dx, &gpkt->Dy);
-						gpkt->Dx += 4;
-						gpkt->Dy += 4;
+						get_feld_xy(feld_unerreicht, &_gpkt->Dx, &_gpkt->Dy);
+						_gpkt->Dx += 4;
+						_gpkt->Dy += 4;
 					}
 				}
 			}
@@ -701,12 +701,12 @@ int16 movclass::get_feld_nr(int16 x, int16 y) {
 	x >>= 3;
 	y >>= 3;
 
-	return x + (y * gpkt->Breite);
+	return x + (y * _gpkt->Breite);
 }
 
 void movclass::get_feld_xy(int16 fnr, int16 *x, int16 *y) {
-	*x = (fnr % gpkt->Breite);
-	*y = (fnr / gpkt->Breite);
+	*x = (fnr % _gpkt->Breite);
+	*y = (fnr / _gpkt->Breite);
 	*x <<= 3;
 	*y <<= 3;
 }
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 21af455a23c..a7c7b0eebf0 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -126,13 +126,13 @@ private:
 	void get_mov_line();
 	void calc_mov_line_xit(int16 start_feld);
 
-	int16 feld1knoten = 0;
-	int16 plot_delay = 0;
-	AutoGoVar agv;
-	MovLineExit mle;
-	GotoMovLine gml;
-	GotoPkt *gpkt = nullptr;
-	int16 vec_tbl[4];
+	int16 _feld1knoten = 0;
+	int16 _plotDelay = 0;
+	AutoGoVar _agv;
+	MovLineExit _mle;
+	GotoMovLine _gml;
+	GotoPkt *_gpkt = nullptr;
+	int16 _vecTbl[4];
 };
 
 } // namespace Chewy


Commit: fab4e985f1f53e59d89e53e03bdfa28d9a2e9e0a
    https://github.com/scummvm/scummvm/commit/fab4e985f1f53e59d89e53e03bdfa28d9a2e9e0a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Rename of Room class fields

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 90006a9b7b6..84d30c4ce7a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -542,7 +542,7 @@ static void showWalkAreas() {
 	for (int y = 0, yp = ys; y < 200 / 8; ++y, yp += 8) {
 		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
 			int idx = ged->ged_idx(xp, yp,
-				room->GedXAnz[room_blk.AkAblage],
+				room->_gedXAnz[room_blk.AkAblage],
 				ged_mem[room_blk.AkAblage]);
 
 			if (idx) {
@@ -625,10 +625,10 @@ void set_up_screen(SetupScreenMode mode) {
 						          spieler_mi[P_CHEWY].HotX;
 						gpkt.Sy = spieler_vector[P_CHEWY].Xypos[1] +
 						          spieler_mi[P_CHEWY].HotY;
-						gpkt.Breite = room->GedXAnz[room_blk.AkAblage];
-						gpkt.Hoehe = room->GedYAnz[room_blk.AkAblage];
+						gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
+						gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
 						gpkt.Mem = ged_mem[room_blk.AkAblage];
-						gpkt.Ebenen = room->GedInfo[room_blk.AkAblage].Ebenen;
+						gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
 						gpkt.AkMovEbene = _G(ged_mov_ebene);
 						mov->goto_xy(&gpkt);
 						spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
@@ -650,7 +650,7 @@ void set_up_screen(SetupScreenMode mode) {
 			int16 idx = ged->ged_idx(
 				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-				room->GedXAnz[room_blk.AkAblage],
+				room->_gedXAnz[room_blk.AkAblage],
 				ged_mem[room_blk.AkAblage]);
 			check_shad(idx, 0);
 		} else {
@@ -1256,10 +1256,10 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			          spieler_mi[p_nr].HotMovY + spieler_mi[p_nr].HotY;
 			gpkt.Sx = spieler_vector[p_nr].Xypos[0] + spieler_mi[p_nr].HotX;
 			gpkt.Sy = spieler_vector[p_nr].Xypos[1] + spieler_mi[p_nr].HotY;
-			gpkt.Breite = room->GedXAnz[room_blk.AkAblage];
-			gpkt.Hoehe = room->GedYAnz[room_blk.AkAblage];
+			gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
+			gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
 			gpkt.Mem = ged_mem[room_blk.AkAblage];
-			gpkt.Ebenen = room->GedInfo[room_blk.AkAblage].Ebenen;
+			gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
 			gpkt.AkMovEbene = _G(ged_mov_ebene);
 			mov->goto_xy(&gpkt);
 
@@ -1694,8 +1694,8 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 
 void calc_ani_timer() {
 	int16 i;
-	for (i = room->room_timer.TimerStart;
-	        i < room->room_timer.TimerStart + room->room_timer.TimerAnz; i++) {
+	for (i = room->_roomTimer.TimerStart;
+	        i < room->_roomTimer.TimerStart + room->_roomTimer.TimerAnz; i++) {
 		if (ani_timer[i].TimeFlag)
 			timer_action(i);
 	}
@@ -1847,7 +1847,7 @@ void calc_ausgang(int16 x, int16 y) {
 
 				u_idx = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				                      spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-				                      room->GedXAnz[room_blk.AkAblage],
+				                      room->_gedXAnz[room_blk.AkAblage],
 				                      ged_mem[room_blk.AkAblage]);
 				check_shad(u_idx, 0);
 				set_person_spr(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 5a8c70e5e03..f10911d2daf 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -93,7 +93,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 }
 
 void timer_action(int16 t_nr) {
-	int16 ani_nr = t_nr - room->room_timer.TimerStart;
+	int16 ani_nr = t_nr - room->_roomTimer.TimerStart;
 	bool default_flag = false;
 
 	if (g_engine->_sound->isSpeechActive())
@@ -124,7 +124,7 @@ void timer_action(int16 t_nr) {
 #undef TIMER
 
 	if (default_flag && flags.AutoAniPlay == false) {
-		det->start_detail(room->room_timer.ObjNr[ani_nr], 1, ANI_VOR);
+		det->start_detail(room->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
 		uhr->reset_timer(t_nr, 0);
 	}
 
@@ -324,8 +324,8 @@ void enter_room(int16 eib_nr) {
 
 	flags.ZoomMov = false;
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)room->room_info->ZoomFak;
-	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)room->room_info->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)room->_roomInfo->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)room->_roomInfo->ZoomFak;
 
 	uhr->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 9ea9d4b54c5..e7895ba0919 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -83,16 +83,16 @@ void JungleRoom::setup_func() {
 
 
 Room::Room() {
-	room_timer.TimerAnz = 0;
-	room_timer.TimerStart = 0;
+	_roomTimer.TimerAnz = 0;
+	_roomTimer.TimerStart = 0;
 	init_ablage();
 	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
-		roomhandle[i] = 0;
+		_roomHandle[i] = 0;
 }
 Room::~Room() {
 	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
-		if (roomhandle[i])
-			chewy_fclose(roomhandle[i]);
+		if (_roomHandle[i])
+			chewy_fclose(_roomHandle[i]);
 	free_ablage();
 }
 
@@ -100,17 +100,17 @@ Stream *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
 	Stream *stream = chewy_fopen(fname1, fmode);
 	if (stream) {
 		close_handle(mode);
-		roomhandle[mode] = stream;
+		_roomHandle[mode] = stream;
 	} else {
 		error("open_handle error");
 	}
 
-	return roomhandle[mode];
+	return _roomHandle[mode];
 }
 
 void Room::close_handle(int16 mode) {
-	if (roomhandle[mode])
-		chewy_fclose(roomhandle[mode]);
+	if (_roomHandle[mode])
+		chewy_fclose(_roomHandle[mode]);
 }
 
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
@@ -124,20 +124,20 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		det->disable_room_sound();
 	if (!modul) {
 		room_detail_info *Rdi_ = det->get_room_detail_info();
-		room_info = &Rdi_->Ri;
-		if (room_info->TafLoad != 255) {
+		_roomInfo = &Rdi_->Ri;
+		if (_roomInfo->TafLoad != 255) {
 			char tmp_str[MAXPATH];
 			strcpy(tmp_str, Rb->RoomDir);
-			strcat(tmp_str, room_info->TafName);
-			det->load_rdi_taf(tmp_str, room_info->TafLoad);
+			strcat(tmp_str, _roomInfo->TafName);
+			det->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
 			Rb->Fti = det->get_taf_info();
 			Rb->DetImage = Rb->Fti->image;
 			Rb->DetKorrekt = Rb->Fti->korrektur;
 		}
 		if (!modul) {
 			obj->calc_all_static_detail();
-			load_tgp(room_info->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
-			set_pal(AblagePal[Rb->AkAblage], Rb->LowPalMem);
+			load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
+			set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
 			calc_invent(Rb, player);
 
 			if (!modul) {
@@ -147,25 +147,25 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 			if (!modul) {
 				if (Rb->AtsLoad)
-					atds->load_atds(room_info->RoomNr, ATS_DATEI);
+					atds->load_atds(_roomInfo->RoomNr, ATS_DATEI);
 			}
 
 			if (!modul) {
 				if (Rb->AadLoad)
-					atds->load_atds(room_info->RoomNr, AAD_DATEI);
+					atds->load_atds(_roomInfo->RoomNr, AAD_DATEI);
 			}
 		}
 	}
 }
 
 void Room::set_timer_start(int16 timer_start) {
-	room_timer.TimerStart = timer_start;
+	_roomTimer.TimerStart = timer_start;
 }
 
 void Room::add_timer_new_room() {
-	room_timer.TimerAnz = 0;
+	_roomTimer.TimerAnz = 0;
 
-	for (int i = 0; i < MAXDETAILS && room_timer.TimerAnz < MAX_ROOM_TIMER; i++) {
+	for (int i = 0; i < MAXDETAILS && _roomTimer.TimerAnz < MAX_ROOM_TIMER; i++) {
 		ani_detail_info *adi = det->get_ani_detail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
@@ -176,37 +176,37 @@ void Room::add_timer_new_room() {
 }
 
 void Room::del_timer_old_room() {
-	for (int i = 0; i < room_timer.TimerAnz; i++) {
-		uhr->set_status(room_timer.TimerNr[i], TIMER_STOP);
+	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
+		uhr->set_status(_roomTimer.TimerNr[i], TIMER_STOP);
 
 	}
 
-	room_timer.TimerAnz = 0;
+	_roomTimer.TimerAnz = 0;
 }
 
 int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 
-	int16 timer_nr_ = room_timer.TimerStart + room_timer.TimerAnz;
+	int16 timer_nr_ = _roomTimer.TimerStart + _roomTimer.TimerAnz;
 	int16 ret = uhr->set_new_timer(timer_nr_, timer_end, SEC_MODE);
 	if (ret != -1) {
-		room_timer.ObjNr[room_timer.TimerAnz] = ani_nr;
-		room_timer.TimerNr[room_timer.TimerAnz] = timer_nr_;
-		++room_timer.TimerAnz;
+		_roomTimer.ObjNr[_roomTimer.TimerAnz] = ani_nr;
+		_roomTimer.TimerNr[_roomTimer.TimerAnz] = timer_nr_;
+		++_roomTimer.TimerAnz;
 	}
 
 	return timer_nr_;
 }
 
 void Room::set_timer_status(int16 ani_nr, int16 status) {
-	for (int i = 0; i < room_timer.TimerAnz; i++) {
-		if (room_timer.ObjNr[i] == ani_nr) {
-			uhr->set_status(room_timer.TimerNr[i], status);
+	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
+		if (_roomTimer.ObjNr[i] == ani_nr) {
+			uhr->set_status(_roomTimer.TimerNr[i], status);
 		}
 	}
 }
 
 void Room::set_zoom(int16 zoom) {
-	room_info->ZoomFak = (uint8)zoom;
+	_roomInfo->ZoomFak = (uint8)zoom;
 }
 
 void Room::set_pal(const byte *src_pal, byte *dest_pal) {
@@ -220,7 +220,7 @@ void Room::set_pal(const byte *src_pal, byte *dest_pal) {
 }
 
 void Room::set_ak_pal(RaumBlk *Rb) {
-	set_pal(AblagePal[Rb->AkAblage], Rb->LowPalMem);
+	set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
 }
 
 void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
@@ -277,20 +277,20 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 		Rb->AkAblage -= 1000;
 	} else {
 		// Image width and height is piggy-banked inside the image data
-		uint16 *memPtr = (uint16 *)Ablage[Rb->AkAblage];
+		uint16 *memPtr = (uint16 *)_ablage[Rb->AkAblage];
 		memPtr[0] = img->width;
 		memPtr[1] = img->height;
-		memcpy(Ablage[Rb->AkAblage] + 4, img->data, img->size);
-		memcpy(AblagePal[Rb->AkAblage], img->palette, 3 * 256);
+		memcpy(_ablage[Rb->AkAblage] + 4, img->data, img->size);
+		memcpy(_ablagePal[Rb->AkAblage], img->palette, 3 * 256);
 		set_ablage_info(Rb->AkAblage, nr + (1000 * tgp_idx), img->size);
 
 		if (mode == GED_LOAD) {
 			Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
-				roomhandle[R_GEPDATEI]);
-			ged->load_ged_pool(gstream, &GedInfo[Rb->AkAblage],
-						        nr, GedMem[Rb->AkAblage]);
-			GedXAnz[Rb->AkAblage] = img->width / GedInfo[Rb->AkAblage].X;
-			GedYAnz[Rb->AkAblage] = img->height / GedInfo[Rb->AkAblage].Y;
+				_roomHandle[R_GEPDATEI]);
+			ged->load_ged_pool(gstream, &_gedInfo[Rb->AkAblage],
+						        nr, _gedMem[Rb->AkAblage]);
+			_gedXAnz[Rb->AkAblage] = img->width / _gedInfo[Rb->AkAblage].X;
+			_gedYAnz[Rb->AkAblage] = img->height / _gedInfo[Rb->AkAblage].Y;
 		}
 	}
 
@@ -301,37 +301,37 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 }
 
 void Room::init_ablage() {
-	LastAblageSave = 0;
-	Ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
-	AblagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
-	GedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
+	_lastAblageSave = 0;
+	_ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
+	_ablagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
+	_gedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
 	if (!modul) {
-		AkAblage = 0;
+		_akAblage = 0;
 		for (int16 i = 0; i < MAX_ABLAGE; i++) {
-			Ablage[i] = Ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
-			AblageInfo[i][0] = -1;
-			AblageInfo[i][1] = -1;
-			AblagePal[i] = AblagePal[0] + 768l * i;
-			GedMem[i] = GedMem[0] + (GED_BLOCK_SIZE * i);
+			_ablage[i] = _ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
+			_ablageInfo[i][0] = -1;
+			_ablageInfo[i][1] = -1;
+			_ablagePal[i] = _ablagePal[0] + 768l * i;
+			_gedMem[i] = _gedMem[0] + (GED_BLOCK_SIZE * i);
 		}
 	} else {
-		AkAblage = -1;
-		Ablage[0] = 0;
+		_akAblage = -1;
+		_ablage[0] = 0;
 	}
 }
 
 void Room::free_ablage() {
-	free(GedMem[0]);
-	free(AblagePal[0]);
-	free(Ablage[0]);
-	AkAblage = -1;
+	free(_gedMem[0]);
+	free(_ablagePal[0]);
+	free(_ablage[0]);
+	_akAblage = -1;
 }
 
 byte *Room::get_ablage(int16 nr) {
 	byte *ret = nullptr;
 
-	if (nr < MAX_ABLAGE && AkAblage != -1) {
-		ret = Ablage[nr];
+	if (nr < MAX_ABLAGE && _akAblage != -1) {
+		ret = _ablage[nr];
 	}
 	return ret;
 }
@@ -339,8 +339,8 @@ byte *Room::get_ablage(int16 nr) {
 byte **Room::get_ablage() {
 	byte **ret = nullptr;
 
-	if (AkAblage != -1) {
-		ret = &Ablage[0];
+	if (_akAblage != -1) {
+		ret = &_ablage[0];
 	}
 	return ret;
 }
@@ -348,8 +348,8 @@ byte **Room::get_ablage() {
 byte **Room::get_ged_mem() {
 	byte **ret = nullptr;
 
-	if (AkAblage != -1) {
-		ret = &GedMem[0];
+	if (_akAblage != -1) {
+		ret = &_gedMem[0];
 	}
 	return ret;
 }
@@ -362,8 +362,8 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 	int16 ende = 0;
 
 	for (int16 i = 0; i < MAX_ABLAGE && !ende; i++) {
-		if (AblageInfo[i][0] == pic_nr &&
-		        AblageInfo[i][1] != 255) {
+		if (_ablageInfo[i][0] == pic_nr &&
+		        _ablageInfo[i][1] != 255) {
 			ende = 1;
 			ret = 1000 + i;
 		}
@@ -380,19 +380,19 @@ int16 Room::get_ablage(int16 pic_nr, uint32 pic_size) {
 
 			ende = 0;
 			while (!ende) {
-				if (AblageInfo[LastAblageSave][1] == 255) {
-					--LastAblageSave;
-					if (LastAblageSave < 0) {
-						LastAblageSave = 0;
-						AblageInfo[0][1] = MAX_ABLAGE;
+				if (_ablageInfo[_lastAblageSave][1] == 255) {
+					--_lastAblageSave;
+					if (_lastAblageSave < 0) {
+						_lastAblageSave = 0;
+						_ablageInfo[0][1] = MAX_ABLAGE;
 					}
 				} else
 					ende = 1;
 			}
-			int16 i = AblageInfo[LastAblageSave][1];
-			for (int16 j = LastAblageSave; j < LastAblageSave + i; j++) {
-				AblageInfo[j][0] = -1;
-				AblageInfo[j][1] = -1;
+			int16 i = _ablageInfo[_lastAblageSave][1];
+			for (int16 j = _lastAblageSave; j < _lastAblageSave + i; j++) {
+				_ablageInfo[j][0] = -1;
+				_ablageInfo[j][1] = -1;
 			}
 		}
 	}
@@ -403,18 +403,18 @@ int16 Room::get_ablage_g1(int16 ablage_bedarf, int16 ak_pos) {
 	short ret = 0;
 	int16 ende = 0;
 	int16 count = 0;
-	LastAblageSave = ak_pos;
+	_lastAblageSave = ak_pos;
 	while (!ende) {
-		if (LastAblageSave >= MAX_ABLAGE)
-			LastAblageSave = 0;
+		if (_lastAblageSave >= MAX_ABLAGE)
+			_lastAblageSave = 0;
 		if (ablage_bedarf == 1) {
 			ende = 1;
-			ret = LastAblageSave;
-		} else if (ablage_bedarf <= MAX_ABLAGE - LastAblageSave) {
+			ret = _lastAblageSave;
+		} else if (ablage_bedarf <= MAX_ABLAGE - _lastAblageSave) {
 			ende = 1;
-			ret = LastAblageSave;
+			ret = _lastAblageSave;
 		} else
-			++LastAblageSave;
+			++_lastAblageSave;
 		++count;
 		if (count > MAX_ABLAGE) {
 			ret = -1;
@@ -430,10 +430,10 @@ void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
 		++ablage_bedarf;
 	int16 j = (int16)ablage_bedarf;
 	for (int16 i = ablagenr; i < j + ablagenr; i++) {
-		AblageInfo[i][0] = bildnr;
-		AblageInfo[i][1] = (int16)ablage_bedarf;
+		_ablageInfo[i][0] = bildnr;
+		_ablageInfo[i][1] = (int16)ablage_bedarf;
 		ablage_bedarf = 255;
-		++LastAblageSave;
+		++_lastAblageSave;
 	}
 }
 
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 396dcc09036..b41692d350a 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -88,71 +88,45 @@ public:
 	~Room();
 
 	Stream *open_handle(const char *fname, const char *fmode, int16 mode);
-
 	void close_handle(int16 mode);
-
 	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
-
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
-
 	byte *get_ablage(int16 nr);
-
 	byte **get_ablage();
-
 	byte **get_ged_mem();
-
 	void set_timer_start(int16 timer_start);
-
 	void add_timer_new_room();
-
 	void del_timer_old_room();
-
 	int16 set_timer(int16 ani_nr, int16 timer_end);
-
 	void set_timer_status(int16 ani_nr, int16 status);
-
 	void set_zoom(int16 zoom);
-
 	void set_pal(const byte *src_pal, byte *dest_pal);
-
 	void set_ak_pal(RaumBlk *Rb);
-
 	void calc_invent(RaumBlk *Rb, Spieler *player);
 
-	RaumTimer room_timer;
-	RaumInfo *room_info;
-	GedChunkHeader GedInfo[MAX_ABLAGE];
-	int16 GedXAnz[MAX_ABLAGE];
-
-	int16 GedYAnz[MAX_ABLAGE];
+	RaumTimer _roomTimer;
+	RaumInfo *_roomInfo;
+	GedChunkHeader _gedInfo[MAX_ABLAGE];
+	int16 _gedXAnz[MAX_ABLAGE];
+	int16 _gedYAnz[MAX_ABLAGE];
 
 private:
-
-	// FIXME: was FILE*
-	void load_ged_chunk(RaumBlk *Rb, void *handle, int16 nr,
-	                    char *speicher);
-
 	void init_ablage();
-
 	void free_ablage();
-
 	int16 get_ablage(int16 pic_nr, uint32 pic_size);
-
 	int16 get_ablage_g1(int16 ablage_bedarf, int16 ak_pos);
 	void set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size);
 
-	void load_room_music(int16 room_nr);
-
-	GedPoolHeader ged_pool_header;
-	int16 AkAblage;
-	int16 LastAblageSave;
+	GedPoolHeader _gedPoolHeader;
+	int16 _akAblage;
+	int16 _lastAblageSave;
 
-	byte *Ablage[MAX_ABLAGE];
-	byte *AblagePal[MAX_ABLAGE];
-	int16 AblageInfo[MAX_ABLAGE][2];
+	byte *_ablage[MAX_ABLAGE];
+	byte *_ablagePal[MAX_ABLAGE];
+	int16 _ablageInfo[MAX_ABLAGE][2];
 
-	byte *GedMem[MAX_ABLAGE];
-	Stream *roomhandle[MAX_ROOM_HANDLE];
+	byte *_gedMem[MAX_ABLAGE];
+	Stream *_roomHandle[MAX_ROOM_HANDLE];
 };
 
 extern void load_chewy_taf(int16 taf_nr);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index fda95c40e06..4d8691f9f51 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -123,7 +123,7 @@ void Room12::init_bork() {
 			mov_phasen[R12_BORK_OBJ].AtsText = 120;
 			mov_phasen[R12_BORK_OBJ].Lines = 5;
 			mov_phasen[R12_BORK_OBJ].Repeat = 1;
-			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->room_info->ZoomFak + 20;
+			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->_roomInfo->ZoomFak + 20;
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = true;
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index e294685734e..26ae7e72688 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -67,7 +67,7 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
 		flags.AutoAniPlay = true;
 		det->hide_static_spr(9);
-		start_detail_wait(room->room_timer.ObjNr[ani_nr], 1, ANI_VOR);
+		start_detail_wait(room->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
 		uhr->reset_timer(t_nr, 0);
 		det->show_static_spr(9);
 		det->start_detail(7, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 592f4c3fb09..76e3499cd0e 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -106,8 +106,8 @@ void Room17::xit() {
 }
 
 bool Room17::timer(int16 t_nr, int16 ani_nr) {
-	if (room->room_timer.ObjNr[ani_nr] == 2 ||
-		room->room_timer.ObjNr[ani_nr] == 3) {
+	if (room->_roomTimer.ObjNr[ani_nr] == 2 ||
+		room->_roomTimer.ObjNr[ani_nr] == 3) {
 		if (_G(spieler).R17EnergieOut)
 			uhr->reset_timer(t_nr, 0);
 		else
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 1077417ef80..628e5f66996 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -175,7 +175,7 @@ void Room49::use_boy_cigar() {
 	SetUpScreenFunc = nullptr;
 	auto_move(5, P_CHEWY);
 
-	const int16 zoom = room->room_info->ZoomFak;
+	const int16 zoom = room->_roomInfo->ZoomFak;
 	room->set_zoom(zoom);
 	go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 914af0d496f..5f2b63e6251 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -125,7 +125,7 @@ void Room51::xit(int16 eib_nr) {
 
 bool Room51::timer(int16 t_nr, int16 ani_nr) {
 	if (_G(spieler).flags32_10)
-		timer_action(t_nr, room->room_timer.ObjNr[ani_nr]);
+		timer_action(t_nr, room->_roomTimer.ObjNr[ani_nr]);
 	else
 		return true;
 
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index ece0a6001d6..b0369caee23 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -63,7 +63,7 @@ int16 Room64::cut_sev(int16 frame) {
 	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
 	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
-	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak, (int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
+	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
 	out->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
 	return 0;
 }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index ad6bf592e28..e0e8f5b26a9 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -76,7 +76,7 @@ void sprite_engine() {
 			if (Adi[nr].zoom) {
 
 				y = Adi[nr].y;
-				calc_zoom(y, (int16)room->room_info->ZoomFak, (int16)room->room_info->ZoomFak, &detmov);
+				calc_zoom(y, (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &detmov);
 			} else {
 				detmov.Xzoom = 0;
 				detmov.Yzoom = 0;
@@ -101,8 +101,8 @@ void sprite_engine() {
 					spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 					x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
 					y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
-					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->room_info->ZoomFak,
-					          (int16)room->room_info->ZoomFak, &spieler_vector[P_CHEWY]);
+					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak,
+					          (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
 
 					out->scale_set(chewy->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
@@ -115,8 +115,8 @@ void sprite_engine() {
 					y = spieler_mi[P_CHEWY].XyzStart[1] + spz_tinfo->korrektur[spr_nr * 2 + 1] -
 					    _G(spieler).scrolly;
 					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1],
-					          (int16)room->room_info->ZoomFak,
-					          (int16)room->room_info->ZoomFak,
+					          (int16)room->_roomInfo->ZoomFak,
+					          (int16)room->_roomInfo->ZoomFak,
 					          &spieler_vector[P_CHEWY]);
 
 					out->scale_set(spz_tinfo->image[spr_nr], x, y,
@@ -282,7 +282,7 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	if (!flags.ExitMov) {
 		if (p_nr == P_CHEWY) {
 			u_index = ged->ged_idx(x + spieler_mi[p_nr].HotX, y + spieler_mi[p_nr].HotY,
-			                        room->GedXAnz[room_blk.AkAblage],
+			                        room->_gedXAnz[room_blk.AkAblage],
 			                        ged_mem[room_blk.AkAblage]);
 			check_shad(u_index, 1);
 		}
@@ -729,17 +729,17 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 			if (!mi->Mode) {
 				if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 				                              om->Xypos[1] + mi->HotY + tmpy,
-				                              room->GedXAnz[room_blk.AkAblage],
+				                              room->_gedXAnz[room_blk.AkAblage],
 				                              ged_mem[room_blk.AkAblage]))) {
 
 					if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 					                              om->Xypos[1] + mi->HotY,
-					                              room->GedXAnz[room_blk.AkAblage],
+					                              room->_gedXAnz[room_blk.AkAblage],
 					                              ged_mem[room_blk.AkAblage]))) {
 
 						if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX,
 						                              om->Xypos[1] + mi->HotY + tmpy,
-						                              room->GedXAnz[room_blk.AkAblage],
+						                              room->_gedXAnz[room_blk.AkAblage],
 						                              ged_mem[room_blk.AkAblage]))) {
 							om->Count = 0;
 						} else {
@@ -844,7 +844,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 				if (mi->Id == CHEWY_OBJ) {
 					u_index = ged->ged_idx(om->Xypos[0] + mi->HotX,
 					                        om->Xypos[1] + mi->HotY,
-					                        room->GedXAnz[room_blk.AkAblage],
+					                        room->_gedXAnz[room_blk.AkAblage],
 					                        ged_mem[room_blk.AkAblage]);
 					check_shad(u_index, 1);
 				}


Commit: b220b5cd37d973ce52d6a27228e3c9fd0abf1c57
    https://github.com/scummvm/scummvm/commit/b220b5cd37d973ce52d6a27228e3c9fd0abf1c57
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:23-08:00

Commit Message:
CHEWY: Rename of timer class fields

Changed paths:
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 12bedfcd300..66632e256fa 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -32,8 +32,8 @@ int timer_count;
 bool timer_suspend;
 
 timer::timer(int16 max_t, TimerBlk *t) {
-	timer_blk = t;
-	timer_max = max_t;
+	_timerBlk = t;
+	_timerMax = max_t;
 	timer_int = false;
 	timer_suspend = false;
 	set_all_status(TIMER_STOP);
@@ -57,22 +57,22 @@ void timer::calc_timer() {
 	int ak_time;
 	float freq;
 	ak_time = timer_count;
-	for (i = 0; i < timer_max; i++) {
-		if (timer_blk[i].TimeStatus != TIMER_STOP) {
-			freq = timer_freq[timer_blk[i].TimeMode];
+	for (i = 0; i < _timerMax; i++) {
+		if (_timerBlk[i].TimeStatus != TIMER_STOP) {
+			freq = timer_freq[_timerBlk[i].TimeMode];
 
-			timer_blk[i].TimeLast = ((float)ak_time - (float)timer_blk[i].TimeLast);
+			_timerBlk[i].TimeLast = ((float)ak_time - (float)_timerBlk[i].TimeLast);
 
-			count = (int16)((float)timer_blk[i].TimeLast / (float)freq);
-			if (timer_blk[i].TimeStatus == TIMER_START)
-				timer_blk[i].TimeCount += count;
+			count = (int16)((float)_timerBlk[i].TimeLast / (float)freq);
+			if (_timerBlk[i].TimeStatus == TIMER_START)
+				_timerBlk[i].TimeCount += count;
 
-			timer_blk[i].TimeLast = (float)ak_time - (float)(timer_blk[i].TimeLast -
+			_timerBlk[i].TimeLast = (float)ak_time - (float)(_timerBlk[i].TimeLast -
 			                        (float)((float)count * (float)freq));
 
-			if (timer_blk[i].TimeCount >= timer_blk[i].TimeEnd) {
-				++timer_blk[i].TimeFlag;
-				timer_blk[i].TimeCount = 0;
+			if (_timerBlk[i].TimeCount >= _timerBlk[i].TimeEnd) {
+				++_timerBlk[i].TimeFlag;
+				_timerBlk[i].TimeCount = 0;
 			}
 		}
 	}
@@ -80,60 +80,60 @@ void timer::calc_timer() {
 
 int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mode) {
 	int16 ret;
-	if (timer_nr < timer_max) {
+	if (timer_nr < _timerMax) {
 		ret = true;
-		timer_blk[timer_nr].TimeCount = 0;
-		timer_blk[timer_nr].TimeEnd = timer_end_wert;
-		timer_blk[timer_nr].TimeFlag = 0;
-		timer_blk[timer_nr].TimeLast = timer_count;
-		timer_blk[timer_nr].TimeMode = timer_mode;
-		timer_blk[timer_nr].TimeStatus = true;
+		_timerBlk[timer_nr].TimeCount = 0;
+		_timerBlk[timer_nr].TimeEnd = timer_end_wert;
+		_timerBlk[timer_nr].TimeFlag = 0;
+		_timerBlk[timer_nr].TimeLast = timer_count;
+		_timerBlk[timer_nr].TimeMode = timer_mode;
+		_timerBlk[timer_nr].TimeStatus = true;
 	} else
 		ret = -1;
 	return ret;
 }
 
 void timer::reset_timer(int16 timer_nr, int16 timer_wert) {
-	if (timer_nr < timer_max) {
-		timer_blk[timer_nr].TimeCount = 0;
-		timer_blk[timer_nr].TimeFlag = 0;
-		timer_blk[timer_nr].TimeLast = timer_count;
+	if (timer_nr < _timerMax) {
+		_timerBlk[timer_nr].TimeCount = 0;
+		_timerBlk[timer_nr].TimeFlag = 0;
+		_timerBlk[timer_nr].TimeLast = timer_count;
 		if (timer_wert)
-			timer_blk[timer_nr].TimeEnd = timer_wert;
+			_timerBlk[timer_nr].TimeEnd = timer_wert;
 	}
 }
 
 void timer::reset_all_timer() {
 	int16 i;
-	for (i = 0; i < timer_max; i++) {
-		timer_blk[i].TimeCount = 0;
-		timer_blk[i].TimeFlag = 0;
-		timer_blk[i].TimeLast = timer_count;
+	for (i = 0; i < _timerMax; i++) {
+		_timerBlk[i].TimeCount = 0;
+		_timerBlk[i].TimeFlag = 0;
+		_timerBlk[i].TimeLast = timer_count;
 	}
 }
 
 void timer::set_status(int16 timer_nr, int16 status) {
-	if (timer_nr < timer_max) {
-		timer_blk[timer_nr].TimeStatus = status;
+	if (timer_nr < _timerMax) {
+		_timerBlk[timer_nr].TimeStatus = status;
 	}
 }
 
 void timer::set_all_status(int16 status) {
 	int16 i;
 	if (status == TIMER_FREEZE) {
-		for (i = 0; i < timer_max; i++) {
-			if (timer_blk[i].TimeStatus != TIMER_STOP)
-				timer_blk[i].TimeStatus = TIMER_FREEZE;
+		for (i = 0; i < _timerMax; i++) {
+			if (_timerBlk[i].TimeStatus != TIMER_STOP)
+				_timerBlk[i].TimeStatus = TIMER_FREEZE;
 		}
 	}
 	else if (status == TIMER_UNFREEZE) {
-		for (i = 0; i < timer_max; i++) {
-			if (timer_blk[i].TimeStatus != TIMER_STOP)
-				timer_blk[i].TimeStatus = TIMER_START;
+		for (i = 0; i < _timerMax; i++) {
+			if (_timerBlk[i].TimeStatus != TIMER_STOP)
+				_timerBlk[i].TimeStatus = TIMER_START;
 		}
 	} else {
-		for (i = 0; i < timer_max; i++)
-			timer_blk[i].TimeStatus = status;
+		for (i = 0; i < _timerMax; i++)
+			_timerBlk[i].TimeStatus = status;
 	}
 }
 
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 15810591f25..b04d535813e 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -58,29 +58,19 @@ public:
 	timer(int16 max_timer, TimerBlk *t);
 	~timer();
 
-	void timer_init();
-
 	void calc_timer();
-
 	int16 set_new_timer(int16 timer_nr, int16 timer_end_wert,
 	                    int16 timer_mode);
-
 	void reset_timer(int16 timer_nr, int16 timer_wert);
-
 	void reset_all_timer();
-
 	void set_status(int16 timer_nr, int16 status);
-
 	void set_all_status(int16 status);
-
 	void disable_timer();
 	void enable_timer();
 
 private:
-	TimerBlk *timer_blk;
-
-	int16 timer_max;
-
+	TimerBlk *_timerBlk;
+	int16 _timerMax;
 };
 
 } // namespace Chewy


Commit: c5d0e15fd84e64d264125c38e1582a9780428d7f
    https://github.com/scummvm/scummvm/commit/c5d0e15fd84e64d264125c38e1582a9780428d7f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:24-08:00

Commit Message:
CHEWY: Move main.cpp globals to Globals

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/chewy.cpp
    engines/chewy/data.cpp
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/gedclass.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/mouse.h
    engines/chewy/ngsdefs.h
    engines/chewy/ngshext.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index c25d8bdfe93..d2875d903e5 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -93,7 +93,7 @@ atdsys::atdsys() {
 		_ssi[i] = init_ssi;
 	_invBlockNr = -1;
 	_invUseMem = nullptr;
-	_inzeig = in->get_in_zeiger();
+	_inzeig = _G(in)->get_in_zeiger();
 }
 
 atdsys::~atdsys() {
@@ -313,14 +313,14 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead Ch;
 	char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
-	if (!modul) {
+	if (!_G(modul)) {
 		if (rs) {
 			_atdshandle[mode] = rs;
 			_atdsmem[mode] = tmp_adr;
 			_atdspooloff[mode] = chunk_start;
 			switch (mode) {
 			case INV_USE_DATEI:
-				mem->file->select_pool_item(rs, _atdspooloff[mode]);
+				_G(mem)->file->select_pool_item(rs, _atdspooloff[mode]);
 				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				if (!Ch.load(rs)) {
@@ -329,7 +329,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					free(_invUseMem);
 					_invUseMem = (char *)MALLOC(Ch.size + 3l);
 
-					if (!modul) {
+					if (!_G(modul)) {
 						if (Ch.size) {
 							if (!rs->read(_invUseMem, Ch.size)) {
 								error("Error reading from %s", fname_);
@@ -354,7 +354,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname_, 0, 20000);
-	if (!modul) {
+	if (!_G(modul)) {
 		Stream *stream = chewy_fopen(fname_, fmode);
 		if (stream) {
 			close_handle(mode);
@@ -397,7 +397,7 @@ void atdsys::close_handle(int16 mode) {
 
 char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	char *tmp_adr = nullptr;
-	uint32 size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
+	uint32 size = _G(mem)->file->get_poolsize(fname_, chunk_start, chunk_anz);
 	if (size) {
 		tmp_adr = (char *)MALLOC(size + 3l);
 	}
@@ -411,7 +411,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(_atdshandle[mode]);
 
 	if (stream && txt_adr) {
-		mem->file->select_pool_item(stream, chunk_nr + _atdspooloff[mode]);
+		_G(mem)->file->select_pool_item(stream, chunk_nr + _atdspooloff[mode]);
 		stream->seek(-ChunkHead::SIZE(), SEEK_CUR);
 		if (!Ch.load(stream)) {
 			error("load_atds error");
@@ -434,7 +434,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 void atdsys::save_ads_header(int16 dia_nr) {
 	ChunkHead Ch;
 	if (_atdshandle[ADH_HANDLE]) {
-		mem->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
+		_G(mem)->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
 		Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
 			_atdshandle[ADH_HANDLE]);
 
@@ -563,7 +563,7 @@ int16 atdsys::ats_get_status() {
 void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	if (_atsv.Display) {
 		if (_atdsv._eventsEnabled) {
-			switch (in->get_switch_code()) {
+			switch (_G(in)->get_switch_code()) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
@@ -587,8 +587,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 
 		if (_atsv.SilentCount <= 0) {
 			char *tmp_ptr = _atsv.Ptr;
-			out->set_fontadr(_atdsv.Font);
-			out->set_vorschub(_atdsv.Fvorx, 0);
+			_G(out)->set_fontadr(_atdsv.Font);
+			_G(out)->set_vorschub(_atdsv.Fvorx, 0);
 			_atsSsi = _ssi[0];
 			_atsSsi.Str = tmp_ptr;
 			_atsSsi.Fvorx = _atdsv.Fvorx;
@@ -601,19 +601,19 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			_ssr = split_string(&tmp_ssi);
 
 			for (int16 i = 0; i < _ssr->Anz; i++) {
-				out->printxy(_ssr->X[i],
+				_G(out)->printxy(_ssr->X[i],
 				              _ssr->Y + (i * _atsSsi.FHoehe) + 1,
 				              0, 300, 0, _ssr->StrPtr[i]);
-				out->printxy(_ssr->X[i],
+				_G(out)->printxy(_ssr->X[i],
 				              _ssr->Y + (i * _atsSsi.FHoehe) - 1,
 				              0, 300, 0, _ssr->StrPtr[i]);
-				out->printxy(_ssr->X[i] + 1,
+				_G(out)->printxy(_ssr->X[i] + 1,
 				              _ssr->Y + (i * _atsSsi.FHoehe),
 				              0, 300, 0, _ssr->StrPtr[i]);
-				out->printxy(_ssr->X[i] - 1,
+				_G(out)->printxy(_ssr->X[i] - 1,
 				              _ssr->Y + (i * _atsSsi.FHoehe),
 				              0, 300, 0, _ssr->StrPtr[i]);
-				out->printxy(_ssr->X[i],
+				_G(out)->printxy(_ssr->X[i],
 				              _ssr->Y + (i * _atsSsi.FHoehe),
 				              _atsv.Color,
 				              300, 0, _ssr->StrPtr[i]);
@@ -904,7 +904,7 @@ void atdsys::stop_aad() {
 void atdsys::print_aad(int16 scrx, int16 scry) {
 	if (_aadv.Dialog) {
 		if (_atdsv._eventsEnabled) {
-			switch (in->get_switch_code()) {
+			switch (_G(in)->get_switch_code()) {
 			case ESC:
 			case ENTER:
 			case MAUS_LINKS:
@@ -928,8 +928,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 
 		if (_aadv.SilentCount <= 0) {
 			char *tmp_ptr = _aadv.Ptr;
-			out->set_fontadr(_atdsv.Font);
-			out->set_vorschub(_atdsv.Fvorx, 0);
+			_G(out)->set_fontadr(_atdsv.Font);
+			_G(out)->set_vorschub(_atdsv.Fvorx, 0);
 			_ssi[_aadv.StrHeader->AkPerson].Str = tmp_ptr;
 			if (_aadv.Person[_aadv.StrHeader->AkPerson].X != -1) {
 				_ssi[_aadv.StrHeader->AkPerson].X = _aadv.Person[_aadv.StrHeader->AkPerson].X - scrx;
@@ -949,19 +949,19 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 			if (_atdsv.Display == DISPLAY_TXT ||
 			        (_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
 				for (int16 i = 0; i < _ssr->Anz; i++) {
-					out->printxy(_ssr->X[i] + 1,
+					_G(out)->printxy(_ssr->X[i] + 1,
 					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
 					              0, 300, 0, _ssr->StrPtr[i]);
-					out->printxy(_ssr->X[i] - 1,
+					_G(out)->printxy(_ssr->X[i] - 1,
 					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
 					              0, 300, 0, _ssr->StrPtr[i]);
-					out->printxy(_ssr->X[i],
+					_G(out)->printxy(_ssr->X[i],
 					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) + 1,
 					              0, 300, 0, _ssr->StrPtr[i]);
-					out->printxy(_ssr->X[i],
+					_G(out)->printxy(_ssr->X[i],
 					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) - 1,
 					              0, 300, 0, _ssr->StrPtr[i]);
-					out->printxy(_ssr->X[i],
+					_G(out)->printxy(_ssr->X[i],
 					              _ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
 					              _aadv.Person[_aadv.StrHeader->AkPerson].Color,
 					              300, 0, _ssr->StrPtr[i]);
@@ -1096,7 +1096,7 @@ bool  atdsys::ads_start(int16 dia_nr) {
 	bool ret = false;
 
 	load_atds(dia_nr, ADS_DATEI);
-	if (!modul) {
+	if (!_G(modul)) {
 		bool ende = false;
 		if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
 		        _atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 9572b81f69f..925e3f82607 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -191,7 +191,7 @@ void ChewyEngine::playVideo(uint num) {
 
 	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
 	//save_palette(curPalette);
-	cur->hide_cur();
+	_G(cur)->hide_cur();
 
 	cfoDecoder->start();
 
@@ -222,7 +222,7 @@ void ChewyEngine::playVideo(uint num) {
 
 	g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
 	//setScummVMPalette(curPalette, 0, 256);
-	cur->show_cur();
+	_G(cur)->show_cur();
 
 	delete videoResource;
 	delete cfoDecoder;
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 1f6fee9b600..f8e79581424 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -25,12 +25,10 @@
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
+#include "chewy/global.h"
 
 namespace Chewy {
 
-extern int16 modul;
-extern int16 fcode;
-
 Data::Data() {
 }
 
@@ -220,7 +218,7 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 				select_pool_item(&f, chunk_start);
 				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
 
-				for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
+				for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!_G(modul)) && i < (chunk_start + chunk_anz); i++) {
 					ChunkHead ch;
 					if (!ch.load(&f)) {
 						error("get_poolsize error");
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index a02e3648b18..9adab1fae92 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -585,7 +585,7 @@ enum SetupScreenMode {
 #define AUSGANG_RECHTS 2
 #define AUSGANG_OBEN 3
 #define AUSGANG_UNTEN 4
-#define WAIT_TASTE_LOS while (in->get_switch_code() != 0 \
+#define WAIT_TASTE_LOS while (_G(in)->get_switch_code() != 0 \
 	&& !SHOULD_QUIT) { g_events->update(); }
 
 #define FILEMENUE 1
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 40145c53ebb..10fed822fc5 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -206,10 +206,10 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 		strcpy(_tafName, fname_);
 		if (!load_flag) {
 			_rdi.dptr = init_taf_tbl(fname_);
-			if (!modul)
+			if (!_G(modul))
 				load_taf_tbl(_rdi.dptr);
 		} else {
-			_rdi.dptr = mem->taf_adr(fname_);
+			_rdi.dptr = _G(mem)->taf_adr(fname_);
 			_fullTaf = true;
 		}
 	} else {
@@ -413,7 +413,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 	if (end > MAXDETAILS)
 		end = MAXDETAILS - 1;
 
-	for (int16 i = start; (i <= end) && (!modul); i++) {
+	for (int16 i = start; (i <= end) && (!_G(modul)); i++) {
 		ani_detail_info *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
@@ -426,10 +426,10 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 			int16 y = adiptr->y + ky - scry;
 			if (adiptr->load_flag == 1) {
 				load_taf_ani_sprite(sprnr);
-				if (!modul)
-					out->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
+				if (!_G(modul))
+					_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
 			} else
-				out->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
+				_G(out)->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
 			Sound *sound = g_engine->_sound;
 
@@ -505,7 +505,7 @@ void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 			int16 x = _rdi.Sinfo[i].x - scrx;
 			int16 y = _rdi.Sinfo[i].y - scry;
 			byte *simage = _rdi.dptr->image[_rdi.Sinfo[i].SprNr];
-			out->sprite_set(simage, x, y, 0);
+			_G(out)->sprite_set(simage, x, y, 0);
 		}
 	}
 }
@@ -588,7 +588,7 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 	_sprInfo.X1 = _sprInfo.X + Xy[0];
 	_sprInfo.Y1 = _sprInfo.Y + Xy[1];
 	if (mode)
-		out->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
+		_G(out)->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
 
 	Sound *sound = g_engine->_sound;
 
@@ -675,7 +675,7 @@ void detail::clear_detail_sound(int16 nr) {
 void detail::disable_room_sound() {
 	for (int16 i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
-	sndPlayer->endSound();
+	_G(sndPlayer)->endSound();
 }
 
 void detail::enable_room_sound() {
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 7f47abb638e..3fd0ba1cb14 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -51,8 +51,8 @@ void Cinema::execute() {
 	Common::Array<int> cutscenes;
 	getCutscenes(cutscenes);
 
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
+	_G(out)->set_fontadr(font6x8);
+	_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 	atds->load_atds(98, 1);
 
 	room->open_handle(GBOOK, "rb", 0);
@@ -63,8 +63,8 @@ void Cinema::execute() {
 
 	for (bool endLoop = false; !endLoop;) {
 		timer_nr = 0;
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
 			// Render cutscene list
@@ -74,18 +74,18 @@ void Cinema::execute() {
 				int yp = i * 10 + 68;
 
 				if (i == selected)
-					out->box_fill(37, yp, 308, yp + 10, 42);
-				out->printxy(40, yp, 14, 300, 0, "%s", csName);
+					_G(out)->box_fill(37, yp, 308, yp + 10, 42);
+				_G(out)->printxy(40, yp, 14, 300, 0, "%s", csName);
 			}
 		} else {
 			// No cutscenes seen yet
 			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
-			out->printxy(40, 68, 14, 300, scr_width, none);
+			_G(out)->printxy(40, 68, 14, 300, scr_width, none);
 		}
 
 		if (minfo.button == 1 && !flag) {
 			flag = true;
-			switch (in->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
+			switch (_G(in)->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
 			case 0:
 				kbinfo.scan_code = Common::KEYCODE_UP;
 				if (!endLoop) {
@@ -160,16 +160,16 @@ void Cinema::execute() {
 
 		case Common::KEYCODE_RETURN:
 			hide_cur();
-			out->cls();
-			out->setze_zeiger(screen0);
+			_G(out)->cls();
+			_G(out)->setze_zeiger(screen0);
 			fx->blende1(workptr, screen0, pal, 150, 0, 0);
 			print_rows(546 + topIndex);
 
 			flc->set_custom_user_function(cut_serv);
 			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
 			flc->remove_custom_user_function();
-			out->set_fontadr(font6x8);
-			out->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->set_fontadr(font6x8);
+			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 			show_cur();
 			delay = 0;
 			flag = false;
@@ -185,15 +185,15 @@ void Cinema::execute() {
 		txt_anz = 0;
 
 		if (!txt_anz) {
-			cur->plot_cur();
+			_G(cur)->plot_cur();
 
 			if (flag) {
 				flag = false;
-				out->setze_zeiger(screen0);
+				_G(out)->setze_zeiger(screen0);
 				room->set_ak_pal(&room_blk);
 				fx->blende1(workptr, screen0, pal, 150, 0, 0);
 			} else {
-				out->back2screen(workpage);
+				_G(out)->back2screen(workpage);
 			}
 		}
 
@@ -208,9 +208,9 @@ void Cinema::execute() {
 }
 
 int16 Cinema::cut_serv(int16 frame) {
-	if (in->get_switch_code() == ESC) {
-		sndPlayer->stopMod();
-		sndPlayer->endSound();
+	if (_G(in)->get_switch_code() == ESC) {
+		_G(sndPlayer)->stopMod();
+		_G(sndPlayer)->endSound();
 		return -1;
 
 	} else {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index afeac80d23a..24222a39fea 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -129,37 +129,37 @@ void Credits::execute() {
 	room->load_tgp(5, &room_blk, 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	out->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(screen0);
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
 		int color = 63 - (6 * i);
 
-		out->raster_col(6 - i, color, 0, 0);
-		out->raster_col(7 + i, color, 0, 0);
+		_G(out)->raster_col(6 - i, color, 0, 0);
+		_G(out)->raster_col(7 + i, color, 0, 0);
 
 		color = 63 - (4 * i);
-		out->raster_col(37 - i, color, color, color);
-		out->raster_col(38 + i, color, color, color);
+		_G(out)->raster_col(37 - i, color, color, color);
+		_G(out)->raster_col(38 + i, color, color, color);
 	}
 
 	_G(spieler).DelaySpeed = 2;
 
 	for (;;) {
-		if (in->get_switch_code() == ESC || SHOULD_QUIT)
+		if (_G(in)->get_switch_code() == ESC || SHOULD_QUIT)
 			break;
 
 		// Display the starfield background
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage],
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
 			_G(spieler).scrollx, _G(spieler).scrolly);
 
 		// Animate moving the background
 		if (++_G(spieler).scrollx >= 320)
 			_G(spieler).scrollx = 0;
 
-		if (in->get_switch_code() == ESC)
+		if (_G(in)->get_switch_code() == ESC)
 			break;
 
 		++lineScrolled;
@@ -173,28 +173,28 @@ void Credits::execute() {
 
 			if (CREDITS_TYPE[i]) {
 				fontCol = 32;
-				out->set_fontadr(font6x8);
-				out->set_vorschub(fvorx6x8, fvory6x8);
+				_G(out)->set_fontadr(font6x8);
+				_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 			} else {
 				fontCol = 1;
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(font8x8);
+				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 			}
 			stillScrolling = true;
 
 			int fgCol = fontCol + (160 - destY) / 10;
-			out->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
+			_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
 		}
 
 		if (!stillScrolling)
 			break;
 
-		out->setze_zeiger(nullptr);
-		out->back2screen(workpage);
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->back2screen(workpage);
 	}
 
-	out->set_fontadr(font8x8);
-	out->set_vorschub(fvorx8x8, fvorx8x8);
+	_G(out)->set_fontadr(font8x8);
+	_G(out)->set_vorschub(fvorx8x8, fvorx8x8);
 	room->open_handle("back/episode1.tgp", "rb", 0);
 
 	room->set_ak_pal(&room_blk);
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 9d3056a94a9..34b7493916f 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -66,23 +66,23 @@ int16 Files::execute(bool isInGame) {
 		return 0;
 	}
 
-	taf_info *ti = mem->taf_adr(OPTION_TAF);
+	taf_info *ti = _G(mem)->taf_adr(OPTION_TAF);
 	g_events->clearEvents();
 
 	room->open_handle(GBOOK, "rb", 0);
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(screen0);
 	room->set_ak_pal(&room_blk);
-	fnames = iog->io_init(&ioptr);
+	fnames = _G(iog)->io_init(&ioptr);
 	fnames += 1;
  
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(workptr);
 	show_cur();
 
-	if (!modul) {
+	if (!_G(modul)) {
 		pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
 		for (i = SAVE; i <= W7; i++)
 			pt[i] = Common::Point(5, 5);
@@ -103,19 +103,19 @@ int16 Files::execute(bool isInGame) {
 
 		while (key != ESC && !SHOULD_QUIT) {
 			// Draw the dialog background
-			out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 
 			// Draw the buttons at the bottom
 			for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
 				if (visibility[j]) {
 					if (!mode[j])
 						// Not pressed
-						out->sprite_set(
+						_G(out)->sprite_set(
 							ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
 							76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
 					else
 						// Pressed
-						out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
+						_G(out)->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
 							76 + ti->korrektur[(i << 1) + 1], 0);
 				}
 			}
@@ -124,16 +124,16 @@ int16 Files::execute(bool isInGame) {
 			tmp = fnames + (text_off * 40);
 			for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
 				if (i != active_slot) {
-					out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-					out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
+					_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+					_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
 				} else {
-					out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
-					out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
-					out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
+					_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
+					_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
+					_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
 				}
 			}
 
-			key = in->get_switch_code();
+			key = _G(in)->get_switch_code();
 
 			if (mode[SCROLL_UP])
 				--mode[SCROLL_UP];
@@ -148,9 +148,9 @@ int16 Files::execute(bool isInGame) {
 			if (mode[QUIT])
 				--mode[QUIT];
 			if (mode[QUIT] == 1) {
-				out->printxy(120, 138, 255, 300, 0, QUIT_MSG);
-				out->back2screen(workpage);
-				in->alter_kb_handler();
+				_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
+				_G(out)->back2screen(workpage);
+				_G(in)->alter_kb_handler();
 
 				key = getch();
 				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
@@ -160,7 +160,7 @@ int16 Files::execute(bool isInGame) {
 					key = 0;
 				}
 
-				in->neuer_kb_handler(&kbinfo);
+				_G(in)->neuer_kb_handler(&kbinfo);
 			}
 
 			if (mode[OPTIONS])
@@ -170,7 +170,7 @@ int16 Files::execute(bool isInGame) {
 			}
 
 			if (!flag && minfo.button == 1) {
-				rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
+				rect = _G(in)->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
 				flag = true;
 				key = 0;
 
@@ -267,20 +267,20 @@ enter:
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
 						CurrentSong = -1;
-						iog->load(text_off + active_slot, ioptr.save_path);
+						_G(iog)->load(text_off + active_slot, ioptr.save_path);
 						key = ESC;
 					}
 				} else if (mode[SAVE]) {
-					out->back2screen(workpage);
-					out->setze_zeiger(screen0);
-					in->alter_kb_handler();
+					_G(out)->back2screen(workpage);
+					_G(out)->setze_zeiger(screen0);
+					_G(in)->alter_kb_handler();
 					tmp = fnames + ((text_off + active_slot) * 40);
-					key = out->scanxy(70, 68 + (active_slot * 10),
+					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
 						255, 42, 14, 0, "%36s36", tmp);
-					in->neuer_kb_handler(&kbinfo);
-					out->setze_zeiger(workptr);
+					_G(in)->neuer_kb_handler(&kbinfo);
+					_G(out)->setze_zeiger(workptr);
 					if (key != Common::KEYCODE_ESCAPE) {
-						iog->save_entry(text_off + active_slot,
+						_G(iog)->save_entry(text_off + active_slot,
 							ioptr.save_path);
 					}
 					key = ESC;
@@ -291,8 +291,8 @@ enter:
 				break;
 			}
 
-			cur->plot_cur();
-			out->back2screen(workpage);
+			_G(cur)->plot_cur();
+			_G(out)->back2screen(workpage);
 
 			EVENTS_UPDATE;
 		}
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index eb78d3f95ef..a06d2066772 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -51,19 +51,19 @@ void Inventory::plot_menu() {
 	int16 *xy;
 	int16 x, y;
 	int16 x1, y1;
-	out->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(workptr);
 	build_menu(WIN_INVENTAR);
 
 	for (j = 0; j < 3; j++) {
 		for (i = 0; i < 5; i++)
-			out->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
+			_G(out)->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
 				WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
 	}
 
-	k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+	k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 	if (k != -1) {
 		if (k < 5)
-			out->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
+			_G(out)->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
 				INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
 		else {
 			x = (minfo.x - (WIN_INF_X)) / 54;
@@ -71,15 +71,15 @@ void Inventory::plot_menu() {
 			k = x + (y * 5);
 			k += _G(spieler).InventY * 5;
 			if (k < (_G(spieler).InventY + 3) * 5)
-				out->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
+				_G(out)->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
 					WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
 		}
 	}
 
 	if (inv_rand_x != -1) {
-		out->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
+		_G(out)->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
 			WIN_INF_X + 14 + inv_rand_x * 54 + 40, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24, 41);
-		out->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
+		_G(out)->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
 			WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
 	}
 
@@ -97,12 +97,12 @@ void Inventory::plot_menu() {
 			y = 3;
 		else
 			y = 0;
-		out->sprite_set(curtaf->image[_G(ani_count)[i]],
+		_G(out)->sprite_set(curtaf->image[_G(ani_count)[i]],
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
 	}
 
 	for (i = 0; i < 2; i++) {
-		out->sprite_set(menutaf->image[PFEIL_UP + i],
+		_G(out)->sprite_set(menutaf->image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, scr_width);
 	}
 
@@ -115,7 +115,7 @@ void Inventory::plot_menu() {
 				x1 /= 2;
 				y1 = 24 - xy[1];
 				y1 /= 2;
-				out->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
+				_G(out)->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 					x1 + WIN_INF_X + 14 + i * 54,
 					y1 + y + 32 * j, scr_width);
 			}
@@ -148,8 +148,8 @@ void Inventory::menu() {
 		tmp1 = tmp - 2;
 	} else
 		tmp1 = tmp;
-	in->speed(tmp1, tmp1 * 2);
-	cur->move(152, 92);
+	_G(in)->speed(tmp1, tmp1 * 2);
+	_G(cur)->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
 
@@ -184,7 +184,7 @@ void Inventory::menu() {
 				maus_flag = 1;
 				kbinfo.key_code = '\0';
 
-				k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+				k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 				if (keyVal == F1_KEY)
 					k = 0;
 				else if (keyVal == F2_KEY)
@@ -220,11 +220,11 @@ void Inventory::menu() {
 					break;
 
 				case 3:
-					in->_hotkey = PAGE_UP;
+					_G(in)->_hotkey = PAGE_UP;
 					break;
 
 				case 4:
-					in->_hotkey = PAGE_DOWN;
+					_G(in)->_hotkey = PAGE_DOWN;
 					break;
 
 				case 5:
@@ -272,7 +272,7 @@ void Inventory::menu() {
 			}
 		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
 			if (!maus_flag) {
-				in->_hotkey = ESC;
+				_G(in)->_hotkey = ESC;
 				maus_flag = 1;
 			}
 		}
@@ -292,8 +292,8 @@ void Inventory::menu() {
 		}
 
 		ret_look = -1;
-		abfrage = in->get_switch_code();
-		cur->hide_cur();
+		abfrage = _G(in)->get_switch_code();
+		_G(cur)->hide_cur();
 
 		if (taste_flag) {
 			if (abfrage != taste_flag)
@@ -311,14 +311,14 @@ void Inventory::menu() {
 			case ESC:
 				if (!menu_first) {
 					menu_first = true;
-					cur->show_cur();
-					while (in->get_switch_code() == ESC) {
+					_G(cur)->show_cur();
+					while (_G(in)->get_switch_code() == ESC) {
 						set_up_screen(NO_SETUP);
 						inv_rand_x = -1;
 						inv_rand_y = -1;
 						Dialogs::Inventory::plot_menu();
-						cur->plot_cur();
-						out->back2screen(workpage);
+						_G(cur)->plot_cur();
+						_G(out)->back2screen(workpage);
 					}
 				} else {
 					if (menu_flag1 != MENU_EINBLENDEN) {
@@ -368,38 +368,38 @@ void Inventory::menu() {
 
 		if (show_invent_menu != 2) {
 			set_up_screen(NO_SETUP);
-			cur->move(minfo.x, minfo.y);
-			cur->show_cur();
+			_G(cur)->move(minfo.x, minfo.y);
+			_G(cur)->show_cur();
 			if (menu_flag1 != MENU_AUSBLENDEN) {
 				inv_rand_x = -1;
 				inv_rand_y = -1;
 				Dialogs::Inventory::plot_menu();
 			}
 			if (menu_flag1 == false)
-				cur->plot_cur();
-			out->setze_zeiger(nullptr);
+				_G(cur)->plot_cur();
+			_G(out)->setze_zeiger(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
 				fx->blende1(workptr, screen0, 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
 				fx->blende1(workptr, screen0, 0, 200, 1, 300);
 			menu_flag1 = false;
-			out->set_clip(0, 0, 320, 200);
-			out->back2screen(workpage);
+			_G(out)->set_clip(0, 0, 320, 200);
+			_G(out)->back2screen(workpage);
 		} else {
 			show_cur();
 		}
 	}
 
-	cur->move(maus_old_x, maus_old_y);
+	_G(cur)->move(maus_old_x, maus_old_y);
 	minfo.x = maus_old_x;
 	minfo.y = maus_old_y;
-	while (in->get_switch_code() == ESC && !SHOULD_QUIT) {
+	while (_G(in)->get_switch_code() == ESC && !SHOULD_QUIT) {
 		set_up_screen(NO_SETUP);
-		cur->plot_cur();
-		out->back2screen(workpage);
+		_G(cur)->plot_cur();
+		_G(out)->back2screen(workpage);
 	}
 
-	in->speed(tmp, tmp * 2);
+	_G(in)->speed(tmp, tmp * 2);
 	flags.InventMenu = false;
 	flags.AutoAniPlay = ani_tmp;
 	_G(spieler).DispFlag = disp_tmp;
@@ -453,7 +453,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	}
 
 	while (!ende) {
-		rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+		rect = _G(in)->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 
 		if (minfo.button) {
 			if (minfo.button == 2) {
@@ -500,11 +500,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 		switch (kbinfo.scan_code) {
 		case F1_KEY:
-			in->_hotkey = F1_KEY;
+			_G(in)->_hotkey = F1_KEY;
 			break;
 
 		case F2_KEY:
-			in->_hotkey = F2_KEY;
+			_G(in)->_hotkey = F2_KEY;
 			break;
 
 		case ESC:
@@ -528,52 +528,52 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
-		out->set_fontadr(font8x8);
-		out->set_vorschub(fvorx8x8, fvory8x8);
+		_G(out)->set_fontadr(font8x8);
+		_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 
 		if (mode == INV_ATS_MODE)
-			out->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
+			_G(out)->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
 				scr_width, txt_name_adr);
 
-		out->set_fontadr(font6x8);
-		out->set_vorschub(fvorx6x8, fvory6x8);
+		_G(out)->set_fontadr(font6x8);
+		_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 
 		if (txt_anz > txt_zeilen) {
 			if (txt_start > 0) {
 				if (rect == 6)
-					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
+					_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
 						WIN_INF_Y + 136 + 14, 41);
 				c[0] = 24;
-				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
+				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
 					scr_width, c);
 			}
 
 			if (txt_start < txt_anz - txt_zeilen) {
 				if (rect == 7)
-					out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
+					_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
 						WIN_INF_Y + 156 + 14, 41);
 				c[0] = 25;
-				out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
+				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
 			}
 		}
 
 		k = 0;
 		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
-			out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
+			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
 				scr_width, "%s", txt->str_pos(txt_adr, i));
 			++k;
 		}
 
-		cur->plot_cur();
-		out->back2screen(workpage);
+		_G(cur)->plot_cur();
+		_G(out)->back2screen(workpage);
 		SHOULD_QUIT_RETURN0;
 	}
 
-	while (in->get_switch_code() == ESC) {
+	while (_G(in)->get_switch_code() == ESC) {
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
-		cur->plot_cur();
-		out->back2screen(workpage);
+		_G(cur)->plot_cur();
+		_G(out)->back2screen(workpage);
 		SHOULD_QUIT_RETURN0;
 	}
 
@@ -690,18 +690,18 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = 0;
 
 	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-	out->back2screen(workpage);
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(out)->back2screen(workpage);
 	room->set_ak_pal(&room_blk);
-	out->setze_zeiger(nullptr);
+	_G(out)->setze_zeiger(nullptr);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 
-	while (in->get_switch_code() != ESC) {
+	while (_G(in)->get_switch_code() != ESC) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
-	while (in->get_switch_code() != 0) {
+	while (_G(in)->get_switch_code() != 0) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
@@ -711,7 +711,7 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
 	Dialogs::Inventory::plot_menu();
-	out->setze_zeiger(nullptr);
+	_G(out)->setze_zeiger(nullptr);
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 }
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index f002a4cd533..a40a904e24f 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -39,18 +39,18 @@ int MainMenu::_personAni[3];
 void MainMenu::execute() {
 	// Convenience during testing to not keep showing title sequence
 	if (!ConfMan.getBool("skip_title")) {
-		mem->file->select_pool_item(music_handle, EndOfPool - 17);
-		mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
-		if (!modul)
-			sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
+		_G(mem)->file->select_pool_item(music_handle, EndOfPool - 17);
+		_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
+		if (!_G(modul))
+			_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
 
 		flic_cut(200, 0);
-		sndPlayer->stopMod();
+		_G(sndPlayer)->stopMod();
 	}
 
 	show_intro();
 
-	cur->move(152, 92);
+	_G(cur)->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
 	_G(spieler).inv_cur = false;
@@ -59,8 +59,8 @@ void MainMenu::execute() {
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
-		sndPlayer->stopMod();
-		sndPlayer->endSound();
+		_G(sndPlayer)->stopMod();
+		_G(sndPlayer)->endSound();
 		SetUpScreenFunc = screenFunc;
 
 		cursor_wahl(CUR_ZEIGE);
@@ -73,7 +73,7 @@ void MainMenu::execute() {
 		load_room_music(98);
 		fx->border(workpage, 100, 0, 0);
 
-		out->set_palette(pal);
+		_G(out)->set_palette(pal);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		show_cur();
 
@@ -93,7 +93,7 @@ void MainMenu::execute() {
 
 		case MM_VIEW_INTRO:
 			fx->border(workpage, 100, 0, 0);
-			out->setze_zeiger(workptr);
+			_G(out)->setze_zeiger(workptr);
 			flags.NoPalAfterFlc = true;
 			flic_cut(135, CFO_MODE);
 			break;
@@ -105,15 +105,15 @@ void MainMenu::execute() {
 
 		case MM_CINEMA:
 			cursor_wahl(CUR_SAVE);
-			cur->move(152, 92);
+			_G(cur)->move(152, 92);
 			minfo.x = 152;
 			minfo.y = 92;
 			Dialogs::Cinema::execute();
 			break;
 
 		case MM_QUIT:
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			done = true;
 			break;
 
@@ -136,7 +136,7 @@ void MainMenu::execute() {
 void MainMenu::screenFunc() {
 	int vec = det->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 
-	if (in->get_switch_code() == 28 || minfo.button == 1) {
+	if (_G(in)->get_switch_code() == 28 || minfo.button == 1) {
 		_selection = vec;
 	}
 }
@@ -151,23 +151,23 @@ void MainMenu::animate() {
 	}
 
 	++FrameSpeed;
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage],
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (SetUpScreenFunc && !menu_display && !flags.InventMenu) {
 		SetUpScreenFunc();
-		out->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(workptr);
 	}
 
 	sprite_engine();
 	kb_mov(1);
 	calc_maus_txt(minfo.x, minfo.y, 1);
-	cur->plot_cur();
+	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
-	menu_flag = 0;
-	out->setze_zeiger(nullptr);
-	out->back2screen(workpage);
+	_G(menu_flag) = 0;
+	_G(out)->setze_zeiger(nullptr);
+	_G(out)->back2screen(workpage);
 
 	g_screen->update();
 	g_events->update();
@@ -178,14 +178,14 @@ int16 MainMenu::creditsFn(int16 key) {
 		key == 128 || key == 165 || key == 185 ||
 		key == 211 || key == 248 || key == 266) {
 		for (int idx = 0; idx < 2000; ++idx) {
-			if (in->get_switch_code() == ESC)
+			if (_G(in)->get_switch_code() == ESC)
 				return -1;
 			g_events->update();
 		}
 		return 0;
 
 	} else {
-		return in->get_switch_code() == ESC ? -1 : 0;
+		return _G(in)->get_switch_code() == ESC ? -1 : 0;
 	}
 }
 
@@ -231,11 +231,11 @@ void MainMenu::startGame() {
 bool MainMenu::loadGame() {
 	flags.SaveMenu = true;
 	savePersonAni();
-	out->setze_zeiger(screen0);
-	out->set_fontadr(font6x8);
-	out->set_vorschub(fvorx6x8, fvory6x8);
+	_G(out)->setze_zeiger(screen0);
+	_G(out)->set_fontadr(font6x8);
+	_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 	cursor_wahl(CUR_SAVE);
-	cur->move(152, 92);
+	_G(cur)->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
 	savegameFlag = true;
@@ -257,19 +257,19 @@ bool MainMenu::loadGame() {
 
 void MainMenu::playGame() {
 	// unused1 = 0;
-	inv_disp_ok = false;
+	_G(inv_disp_ok) = false;
 	_G(cur_display) = true;
-	tmp_menu_item = 0;
+	_G(tmp_menu_item) = 0;
 	_G(maus_links_click) = false;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 
 	flags.main_maus_flag = false;
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
-	cur->show_cur();
+	_G(cur)->show_cur();
 	spieler_vector[P_CHEWY].Count = 0;
 	uhr->reset_timer(0, 0);
-	sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
+	_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !main_loop(1)) {
 	}
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index c9b0282ab1d..c8a145028d7 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -58,13 +58,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
 void Options::execute(taf_info *ti) {
 	long akt_clock = 0, stop_clock = 0;
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(screen0);
 
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(workptr);
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
 	int16 mund_ani = MUND_START;
@@ -77,7 +77,7 @@ void Options::execute(taf_info *ti) {
 	int16 delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
 	while (key != ESC) {
-		out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 		++FrameSpeed;
 		warning("akt_clock = clock() / CLK_TCK;");
 		if (akt_clock >= stop_clock) {
@@ -88,66 +88,66 @@ void Options::execute(taf_info *ti) {
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
-		out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
+		_G(out)->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
 			8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
-		out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
-		out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
+		_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
+		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
 
 		if (_G(spieler).SoundSwitch) {
-			out->sprite_set(ti->image[mund_ani],
+			_G(out)->sprite_set(ti->image[mund_ani],
 				18 + ti->korrektur[mund_ani << 1],
 				8 + ti->korrektur[(mund_ani << 1) + 1], 0);
-			out->sprite_set(ti->image[SCHNULL_OFF],
+			_G(out)->sprite_set(ti->image[SCHNULL_OFF],
 				18 + ti->korrektur[SCHNULL_OFF << 1],
 				8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
 		} else {
-			out->sprite_set(ti->image[SCHNULLER],
+			_G(out)->sprite_set(ti->image[SCHNULLER],
 				18 + ti->korrektur[SCHNULLER << 1],
 				8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
-			out->sprite_set(ti->image[SCHNULL_BAND],
+			_G(out)->sprite_set(ti->image[SCHNULL_BAND],
 				18 + ti->korrektur[SCHNULL_BAND << 1],
 				8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
 		}
-		out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
-		out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
-		out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
+		_G(out)->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
+		_G(out)->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
+		_G(out)->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
 
-		out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
-		out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
-		out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
+		_G(out)->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
+		_G(out)->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
+		_G(out)->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
 		if (_G(spieler).MusicSwitch) {
-			out->sprite_set(ti->image[MUSIC_ON1],
+			_G(out)->sprite_set(ti->image[MUSIC_ON1],
 				18 + ti->korrektur[MUSIC_ON1 << 1],
 				8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
-			out->sprite_set(ti->image[MUSIC_ON2],
+			_G(out)->sprite_set(ti->image[MUSIC_ON2],
 				18 + ti->korrektur[MUSIC_ON2 << 1],
 				8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
 		} else
-			out->sprite_set(ti->image[MUSIC_OFF],
+			_G(out)->sprite_set(ti->image[MUSIC_OFF],
 				18 + ti->korrektur[MUSIC_OFF << 1],
 				8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
 
 		if (_G(spieler).DisplayText) {
-			out->sprite_set(ti->image[tdisp_ani],
+			_G(out)->sprite_set(ti->image[tdisp_ani],
 				18 + ti->korrektur[tdisp_ani << 1],
 				8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
-			out->sprite_set(ti->image[TDISP_EIN],
+			_G(out)->sprite_set(ti->image[TDISP_EIN],
 				18 + ti->korrektur[TDISP_EIN << 1],
 				8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
 		} else
-			out->sprite_set(ti->image[TDISP_AUS],
+			_G(out)->sprite_set(ti->image[TDISP_AUS],
 				18 + ti->korrektur[TDISP_AUS << 1],
 				8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
 
-		out->sprite_set(ti->image[EXIT],
+		_G(out)->sprite_set(ti->image[EXIT],
 			18 + ti->korrektur[EXIT << 1],
 			8 + ti->korrektur[(EXIT << 1) + 1], 0);
 
-		key = in->get_switch_code();
+		key = _G(in)->get_switch_code();
 		if ((minfo.button == 1) || (key == ENTER)) {
 			WAIT_TASTE_LOS
-				int16 rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
+				int16 rect = _G(in)->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
 				if (_G(spieler).FramesPerSecond > 6)
@@ -181,7 +181,7 @@ void Options::execute(taf_info *ti) {
 			case 5:
 				if (_G(spieler).MusicSwitch) {
 					_G(spieler).MusicSwitch = false;
-					sndPlayer->stopMod();
+					_G(sndPlayer)->stopMod();
 				} else {
 					_G(spieler).MusicSwitch = true;
 					CurrentSong = -1;
@@ -193,11 +193,11 @@ void Options::execute(taf_info *ti) {
 				break;
 			case 7:
 				_G(spieler).SoundVol = (136 - minfo.y) << 1;
-				sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
+				_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 				break;
 			case 8:
 				_G(spieler).MusicVol = (136 - minfo.y) << 1;
-				sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
+				_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 				break;
 			}
 			minfo.button = 0;
@@ -205,24 +205,24 @@ void Options::execute(taf_info *ti) {
 		switch (key) {
 
 		case CURSOR_UP:
-			cur->move(minfo.x, --minfo.y);
+			_G(cur)->move(minfo.x, --minfo.y);
 			break;
 
 		case CURSOR_DOWN:
-			cur->move(minfo.x, ++minfo.y);
+			_G(cur)->move(minfo.x, ++minfo.y);
 			break;
 
 		case CURSOR_LEFT:
-			cur->move(--minfo.x, minfo.y);
+			_G(cur)->move(--minfo.x, minfo.y);
 			break;
 
 		case CURSOR_RIGHT:
-			cur->move(++minfo.x, minfo.y);
+			_G(cur)->move(++minfo.x, minfo.y);
 			break;
 		}
 
-		cur->plot_cur();
-		out->back2screen(workpage);
+		_G(cur)->plot_cur();
+		_G(out)->back2screen(workpage);
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
 
@@ -255,12 +255,12 @@ void Options::execute(taf_info *ti) {
 	}
 
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	out->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(screen0);
 	room->set_ak_pal(&room_blk);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
-	out->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(workptr);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index d8b5d681c97..8a2892595de 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -32,7 +32,7 @@ effect::~effect() {
 
 void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
-	if (!modul) {
+	if (!_G(modul)) {
 		int16 *rnd_zeiger = (int16 *)rnd_speicher;
 		if (col < 256) {
 			for (int16 i = 0; i < 1002; i++) {
@@ -42,9 +42,9 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 					x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 				else
 					x = rnd_zeiger[i] * 8;
-				out->box_fill(x, y, x + 8, y + 8, col);
+				_G(out)->box_fill(x, y, x + 8, y + 8, col);
 			}
-			out->set_palette(palette);
+			_G(out)->set_palette(palette);
 		}
 		for (int16 i = 0; i < 1000; i++) {
 			int16 x;
@@ -53,10 +53,10 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
 				x = rnd_zeiger[i] * 8;
-			out->setze_zeiger(sram_speicher);
-			out->sprite_save(sp, x, y, 8, 8, 0);
-			out->setze_zeiger(screen);
-			out->sprite_set(sp, x, y, 0);
+			_G(out)->setze_zeiger(sram_speicher);
+			_G(out)->sprite_save(sp, x, y, 8, 8, 0);
+			_G(out)->setze_zeiger(screen);
+			_G(out)->sprite_set(sp, x, y, 0);
 		}
 		free(sp);
 	}
@@ -64,49 +64,49 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 
 void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
-	if (!modul) {
+	if (!_G(modul)) {
 		int16 i = 0;
 		if (col < 256) {
 			for (i = 0; i < 13; i++) {
 				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++)
-					out->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
+					_G(out)->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
 				for (y = i; y < 24 - i; y++)
-					out->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
+					_G(out)->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
 				for (x1 = 39 - i; x1 > i; x1--)
-					out->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
+					_G(out)->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
 				for (int16 y1 = 24 - i; y1 >= i; y1--)
-					out->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
+					_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
 			}
-			out->set_palette(palette);
+			_G(out)->set_palette(palette);
 		}
 		switch (mode) {
 		case 0:
 			for (i = 13; i >= 0; i--) {
 				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x * 8, i * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 				}
 				for (y = i; y < 24 - i; y++) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x * 8, y * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 				}
 				for (x1 = 39 - i; x1 > i; x1--) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x1 * 8, y * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
 				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
 			}
 			break;
@@ -115,28 +115,28 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 			for (i = 0; i < 13; i++) {
 				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x * 8, i * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 				}
 				for (y = i; y < 24 - i; y++) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x * 8, y * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 				}
 				for (x1 = 39 - i; x1 > i; x1--) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x1 * 8, y * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
 				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					out->setze_zeiger(sram_speicher);
-					out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					out->setze_zeiger(screen);
-					out->sprite_set(sp, x1 * 8, y1 * 8, 0);
+					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+					_G(out)->setze_zeiger(screen);
+					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
 			}
 			break;
@@ -151,17 +151,17 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	if (mode) {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			out->setze_zeiger(workpage_ + 4);
-			out->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
-			out->box_fill(x + 160, 0, x + 168, 200, farbe);
-			out->back2screen(workpage_);
+			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
+			_G(out)->box_fill(x + 160, 0, x + 168, 200, farbe);
+			_G(out)->back2screen(workpage_);
 		}
 	} else {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			out->setze_zeiger(workpage_ + 4);
-			out->box_fill(x, 0, x + 8, 200, farbe);
-			out->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
-			out->back2screen(workpage_);
+			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->box_fill(x, 0, x + 8, 200, farbe);
+			_G(out)->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
+			_G(out)->back2screen(workpage_);
 		}
 	}
 }
@@ -169,17 +169,17 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
-			out->setze_zeiger(workpage_ + 4);
-			out->box_fill(0, 92 - y, 320, 92 - y + 8, col);
-			out->box_fill(0, 100 + y, 320, 108 + y, col);
-			out->back2screen(workpage_);
+			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
+			_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
+			_G(out)->back2screen(workpage_);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
-			out->setze_zeiger(workpage_ + 4);
-			out->box_fill(0, i, 320, i + 8, col);
-			out->box_fill(0, 192 - i, 320, 200 - i, col);
-			out->back2screen(workpage_);
+			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->box_fill(0, i, 320, i + 8, col);
+			_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
+			_G(out)->back2screen(workpage_);
 		}
 	}
 }
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index f7ffa6d5b33..41f0ecddbb3 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -89,14 +89,14 @@ int16 call_fileio(int16 palette, int16 mode) {
 	}
 	curblk.no_back = false;
 	cursor_wahl(CUR_SAVE);
-	out->sprite_save(cur_back, minfo.x + curblk.page_off_x,
+	_G(out)->sprite_save(cur_back, minfo.x + curblk.page_off_x,
 	                  minfo.y + curblk.page_off_y, 16,
 	                  16, scr_width);
-	cur->hide_cur();
-	cur->show_cur();
-	cur->hide_cur();
-	ret = iog->io_menu(&ioptr);
-	cur->show_cur();
+	_G(cur)->hide_cur();
+	_G(cur)->show_cur();
+	_G(cur)->hide_cur();
+	ret = _G(iog)->io_menu(&ioptr);
+	_G(cur)->show_cur();
 	curblk.no_back = true;
 	return ret;
 }
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 2e8a846e044..3f84f9e70bc 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -25,6 +25,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/flic.h"
+#include "chewy/global.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
@@ -130,7 +131,7 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 			_fadeDelay = 0;
 			_clsFlag = false;
 			_currentFrame = 0;
-			for (uint16 i = 0; (i < _flicHeader.frames) && (!modul) && (ret >= 0); i++) {
+			for (uint16 i = 0; (i < _flicHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
 				if (!_frameHeader.load(rs)) {
 					error("flic error");
 				} else {
@@ -206,15 +207,15 @@ int16 flic::decode_frame() {
 				break;
 
 			case CLS:
-				out->setze_zeiger(_virtScreen);
-				out->cls();
-				out->setze_zeiger(nullptr);
+				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->cls();
+				_G(out)->setze_zeiger(nullptr);
 
 				update_flag = true;
 				break;
 
 			case UNPRESSED:
-				out->back2back(_loadBuffer, _virtScreen);
+				_G(out)->back2back(_loadBuffer, _virtScreen);
 
 				update_flag = true;
 				break;
@@ -231,13 +232,13 @@ int16 flic::decode_frame() {
 		}
 		if (update_flag != false) {
 			if (_flicUser) {
-				out->setze_zeiger(_virtScreen);
+				_G(out)->setze_zeiger(_virtScreen);
 				action_ret = _flicUser(_currentFrame);
-				out->setze_zeiger(nullptr);
+				_G(out)->setze_zeiger(nullptr);
 			}
-			out->back2screen(_virtScreen - 4);
+			_G(out)->back2screen(_virtScreen - 4);
 			if (_fadeFlag != false) {
-				out->einblenden(_fadePal, _fadeDelay);
+				_G(out)->einblenden(_fadePal, _fadeDelay);
 				_fadeFlag = false;
 			}
 		}
@@ -251,7 +252,7 @@ void flic::col256_chunk(byte *tmp) {
 	tmp += 2;
 
 	if (_clsFlag == true)
-		out->cls();
+		_G(out)->cls();
 	else
 		_clsFlag = true;
 
@@ -260,10 +261,10 @@ void flic::col256_chunk(byte *tmp) {
 		for (int i = 0; i < PALETTE_SIZE; i++)
 			tmp[i] >>= 2;
 		if (_fadeFlag == false)
-			out->set_palette(tmp);
+			_G(out)->set_palette(tmp);
 		else {
 			memset(_fadePal, 0, PALETTE_SIZE);
-			out->set_palette(_fadePal);
+			_G(out)->set_palette(_fadePal);
 			memcpy(_fadePal, tmp, PALETTE_SIZE);
 		}
 	} else {
@@ -275,7 +276,7 @@ void flic::col256_chunk(byte *tmp) {
 				byte r = *tmp++ >> 2;
 				byte g = *tmp++ >> 2;
 				byte b = *tmp++ >> 2;
-				out->raster_col(col, r, g, b);
+				_G(out)->raster_col(col, r, g, b);
 				++col;
 			}
 		}
@@ -287,16 +288,16 @@ void flic::col64_chunk(byte *tmp) {
 	tmp += 2;
 
 	if (_clsFlag == true)
-		out->cls();
+		_G(out)->cls();
 	else
 		_clsFlag = true;
 
 	if (!tmp[1]) {
 		if (_fadeFlag == false)
-			out->set_palette(tmp + 2);
+			_G(out)->set_palette(tmp + 2);
 		else {
 			memset(_fadePal, 0, PALETTE_SIZE);
-			out->set_palette(_fadePal);
+			_G(out)->set_palette(_fadePal);
 			memcpy(_fadePal, tmp + 2, PALETTE_SIZE);
 		}
 	} else {
@@ -308,7 +309,7 @@ void flic::col64_chunk(byte *tmp) {
 				byte r = *tmp++ >> 2;
 				byte g = *tmp++ >> 2;
 				byte b = *tmp++ >> 2;
-				out->raster_col(col, r, g, b);
+				_G(out)->raster_col(col, r, g, b);
 				++col;
 			}
 		}
@@ -390,7 +391,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 				_fadeDelay = 0;
 				_currentFrame = 0;
 
-				for (uint16 i = 0; (i < _customHeader.frames) && (!modul) && (ret >= 0); i++) {
+				for (uint16 i = 0; (i < _customHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
 					if (!_customFrame.load(rs)) {
 						error("flic error");
 					} else {
@@ -421,8 +422,8 @@ int16 flic::custom_play(CustomInfo *ci) {
 								dynamic_cast<Common::SeekableReadStream *>(ci->Handle));
 
 						} else {
-							out->raster_col(255, 63, 63, 63);
-							out->printxy(0, 0, 255, 0, 0, "Unknown Frame Type");
+							_G(out)->raster_col(255, 63, 63, 63);
+							_G(out)->printxy(0, 0, 255, 0, 0, "Unknown Frame Type");
 							taste;
 						}
 					}
@@ -440,7 +441,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
 	tmf_header *th = (tmf_header *)_music;
 
-	for (uint16 i = 0; (i < _customFrame.chunks) && (!modul); i++) {
+	for (uint16 i = 0; (i < _customFrame.chunks) && (!_G(modul)); i++) {
 		ChunkHead chead;
 		if (!chead.load(handle)) {
 			error("flic error");
@@ -455,7 +456,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
 			} else
-				out->ausblenden(para[0]);
+				_G(out)->ausblenden(para[0]);
 			break;
 
 		case LOAD_MUSIC:
@@ -495,7 +496,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->playMod(th);
 #else
-				sndPlayer->playMod(th);
+				_G(sndPlayer)->playMod(th);
 #endif
 
 			break;
@@ -512,7 +513,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 			snd->stopMod();
 #else
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 #endif
 			break;
 
@@ -522,7 +523,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->getMusicInfo(&mi);
 #else
-				sndPlayer->getMusicInfo(&mi);
+				_G(sndPlayer)->getMusicInfo(&mi);
 #endif
 			} while (mi.musik_playing != 0);
 			}
@@ -535,7 +536,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->setMusicMasterVol(para[0]);
 #else
-				sndPlayer->setMusicMasterVol(para[0]);
+				_G(sndPlayer)->setMusicMasterVol(para[0]);
 #endif
 
 			break;
@@ -595,7 +596,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 #ifndef AIL
 				snd->fadeOut(para[0]);
 #else
-				sndPlayer->fadeOut(para[0]);
+				_G(sndPlayer)->fadeOut(para[0]);
 #endif
 			break;
 
@@ -611,14 +612,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case CLEAR_SCREEN:
-			out->setze_zeiger(_virtScreen);
-			out->cls();
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(_virtScreen);
+			_G(out)->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			break;
 
 		default:
-			out->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
+			_G(out)->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
 			break;
 		}
 	}
@@ -661,15 +662,15 @@ int16 flic::decode_cframe() {
 				break;
 
 			case CLS:
-				out->setze_zeiger(_virtScreen);
-				out->cls();
-				out->setze_zeiger(nullptr);
+				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->cls();
+				_G(out)->setze_zeiger(nullptr);
 
 				update_flag = true;
 				break;
 
 			case UNPRESSED:
-				out->back2back(_loadBuffer, _virtScreen);
+				_G(out)->back2back(_loadBuffer, _virtScreen);
 
 				update_flag = true;
 				break;
@@ -678,8 +679,8 @@ int16 flic::decode_cframe() {
 				break;
 
 			default:
-				out->raster_col(255, 63, 63, 63);
-				out->printxy(0, 0, 255, 0, 0, "Unknown CHUNK");
+				_G(out)->raster_col(255, 63, 63, 63);
+				_G(out)->printxy(0, 0, 255, 0, 0, "Unknown CHUNK");
 
 				update_flag = true;
 				break;
@@ -690,16 +691,16 @@ int16 flic::decode_cframe() {
 
 		if (update_flag != false) {
 			if (_customUser) {
-				out->back2back(_virtScreen, _loadBuffer);
-				out->setze_zeiger(_virtScreen);
+				_G(out)->back2back(_virtScreen, _loadBuffer);
+				_G(out)->setze_zeiger(_virtScreen);
 				action_ret = _customUser(_currentFrame);
-				out->setze_zeiger(nullptr);
-				out->back2screen(_virtScreen - 4);
-				out->back2back(_loadBuffer, _virtScreen);
+				_G(out)->setze_zeiger(nullptr);
+				_G(out)->back2screen(_virtScreen - 4);
+				_G(out)->back2back(_loadBuffer, _virtScreen);
 			} else
-				out->back2screen(_virtScreen - 4);
+				_G(out)->back2screen(_virtScreen - 4);
 			if (_fadeFlag != false) {
-				out->einblenden(_fadePal, _fadeDelay);
+				_G(out)->einblenden(_fadePal, _fadeDelay);
 				_fadeFlag = false;
 			}
 		}
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index a61ecaab3a4..b86d8796ad5 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -21,6 +21,7 @@
 
 #include "common/file.h"
 #include "chewy/chewy.h"
+#include "chewy/global.h"
 #include "chewy/gedclass.h"
 #include "chewy/ngshext.h"
 
@@ -52,18 +53,18 @@ void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
 		int i = 0;
 		do {
 			if (!Gh->load(stream)) {
-				modul = 3;
-				fcode = 1;
+				_G(modul) = 3;
+				_G(fcode) = 1;
 			} else if (i != nr) {
 				// Skip over the entry's data
 				stream->seek(Gh->Len, SEEK_CUR);
 			}
-		} while (!modul && ++i <= nr);
+		} while (!_G(modul) && ++i <= nr);
 
-		if (!modul) {
+		if (!_G(modul)) {
 			if (stream->read(speicher, Gh->Len) != Gh->Len) {
-				modul = 3;
-				fcode = 1;
+				_G(modul) = 3;
+				_G(fcode) = 1;
 			}
 		}
 	} else {
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index cc6dc054542..9598f97675f 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -45,6 +45,14 @@ extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
 extern const int16 ANI_INVENT_END[3];
 extern const int16 SPZ_ANI_PH[][2];
 
+class ChewyFont;
+class cursor;
+class FontMgr;
+class InputMgr;
+class io_game;
+class McgaGraphics;
+class memory;
+class SoundPlayer;
 
 class Globals {
 	class CurrentScreen : public Graphics::Surface {
@@ -111,6 +119,27 @@ public:
 	int16 _r65tmp_ho_y = 0;
 	int16 _r68HohesC = 0;
 
+	// main.cpp
+	int16 _menu_flag = 0;
+	bool _inv_disp_ok = 0;
+	int16 _txt_aus_click = 0;
+	int16 _txt_nummer = 0;
+	int16 _tmp_menu_item = 0;
+	int16 _cur_ausgang_flag = 0;
+	int16 _room_start_nr = 0;
+	int16 _TmpFrameSpeed = 0;
+	InputMgr *_in = nullptr;
+	memory *_mem = nullptr;
+	io_game *_iog = nullptr;
+	McgaGraphics *_out = nullptr;
+	cursor *_cur = nullptr;
+	SoundPlayer *_sndPlayer = nullptr;
+	ChewyFont *_font6 = nullptr;
+	ChewyFont *_font8 = nullptr;
+	FontMgr *_fontMgr = nullptr;
+	int16 _modul = 0;
+	int16 _fcode = 0;
+
 	// mcga_graphics.cpp
 	int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
 	int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
@@ -237,7 +266,6 @@ extern effect *fx;
 extern atdsys *atds;
 extern flic *flc;
 extern movclass *mov;
-extern SoundPlayer *sndPlayer;
 
 extern char backged[];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 95c7450f8e7..85887068651 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -28,13 +28,12 @@
 
 namespace Chewy {
 
-extern int16 room_start_nr;
 static void font_load();
 
 void standard_init() {
-	mem = new memory();
-	out = new McgaGraphics();
-	in = new InputMgr();
+	_G(mem) = new memory();
+	_G(out) = new McgaGraphics();
+	_G(in) = new InputMgr();
 	fx = new effect();
 	txt = new text();
 	bit = new bitclass();
@@ -44,22 +43,22 @@ void standard_init() {
 	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
 	det = new detail();
 	atds = new atdsys();
-	sndPlayer = new SoundPlayer();
+	_G(sndPlayer) = new SoundPlayer();
 	flc = new flic();
 	mov = new movclass();
 
-	out->init();
-	out->cls();
-	out->palette_save();
-	out->set_clip(0, 0, 320, 200);
-	out->set_writemode(0);
+	_G(out)->init();
+	_G(out)->cls();
+	_G(out)->palette_save();
+	_G(out)->set_clip(0, 0, 320, 200);
+	_G(out)->set_writemode(0);
 	scr_width = 0;
 	screen0 = (byte *)g_screen->getPixels();
-	in->neuer_kb_handler(&kbinfo);
+	_G(in)->neuer_kb_handler(&kbinfo);
 
-	in->rectangle(0, 0, 320, 210);
-	in->neuer_maushandler(&minfo);
-	out->init_mausmode(&minfo);
+	_G(in)->rectangle(0, 0, 320, 210);
+	_G(in)->neuer_maushandler(&minfo);
+	_G(out)->init_mausmode(&minfo);
 	curblk.page_off_x = 0;
 	curblk.page_off_y = 0;
 	curblk.xsize = 16;
@@ -67,7 +66,7 @@ void standard_init() {
 
 	// WORKAROUND: Moved from init_load because the original
 	// uses curtaf->image below before curtaf was initialized
-	curtaf = mem->taf_adr(CURSOR);
+	curtaf = _G(mem)->taf_adr(CURSOR);
 
 	curblk.sprite = curtaf->image;
 	curblk.cur_back = cur_back;
@@ -76,10 +75,10 @@ void standard_init() {
 	curani.ani_end = 0;
 	curani.delay = 0;
 	
-	cur = new cursor(out, in, &curblk);
-	cur->set_cur_ani(&curani);
+	_G(cur) = new cursor(_G(out), _G(in), &curblk);
+	_G(cur)->set_cur_ani(&curani);
 
-	iog = new io_game(out, in, cur);
+	_G(iog) = new io_game(_G(out), _G(in), _G(cur));
 	strcpy(ioptr.id, "CHE");
 	strcpy(ioptr.save_path, SAVEDIR);
 	ioptr.delay = 8;
@@ -87,12 +86,12 @@ void standard_init() {
 	pal[765] = 63;
 	pal[766] = 63;
 	pal[767] = 63;
-	out->einblenden(pal, 0);
+	_G(out)->einblenden(pal, 0);
 	room->set_timer_start(1);
 	font_load();
 
-	out->cls();
-	in->neuer_kb_handler(&kbinfo);
+	_G(out)->cls();
+	_G(in)->neuer_kb_handler(&kbinfo);
 
 	var_init();
 	ablage = room->get_ablage();
@@ -102,8 +101,8 @@ void standard_init() {
 	pal[765] = 63;
 	pal[766] = 63;
 	pal[767] = 63;
-	out->einblenden(pal, 0);
-	out->cls();
+	_G(out)->einblenden(pal, 0);
+	_G(out)->cls();
 	uhr->set_new_timer(0, 5, SEC_10_MODE);
 
 	curblk.cur_back = cur_back;
@@ -162,7 +161,7 @@ void var_init() {
 		_G(spieler).PersonRoomNr[i] = -1;
 		_G(spieler).PersonDia[i] = -1;
 	}
-	_G(spieler).PersonRoomNr[P_CHEWY] = room_start_nr;
+	_G(spieler).PersonRoomNr[P_CHEWY] = _G(room_start_nr);
 
 	gpkt.Vorschub = spieler_mi[P_CHEWY].Vorschub;
 	init_room();
@@ -214,7 +213,7 @@ void init_atds() {
 	atds->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
 	atds->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
 	atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
-	mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
+	_G(mem)->file->fcopy(ADSH_TMP, "txt/diah.adh");
 	atds->open_handle(ADSH_TMP, "rb", 3);
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
@@ -284,24 +283,24 @@ void new_game() {
 static void font_load() {
 
 	// Load the 8x8 font
-	mem->tff_adr(FONT8x8, &font8x8);
-	out->set_fontadr(font8x8);
+	_G(mem)->tff_adr(FONT8x8, &font8x8);
+	_G(out)->set_fontadr(font8x8);
 
 	int16 vorx;
 	int16 vory;
 	int16 fntbr;
 	int16 fnth;
-	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
+	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	fvorx8x8 = vorx;
 	fvory8x8 = vory;
 
 	// Load the 6x8 font
-	mem->tff_adr(FONT6x8, &font6x8);
-	out->set_fontadr(font6x8);
-	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
+	_G(mem)->tff_adr(FONT6x8, &font6x8);
+	_G(out)->set_fontadr(font6x8);
+	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	fvorx6x8 = vorx - 2;
 	fvory6x8 = vory;
-	out->set_vorschub(fvorx6x8, vory);
+	_G(out)->set_vorschub(fvorx6x8, vory);
 	atds->set_font(font8x8, fvorx8x8, 10);
 }
 
@@ -313,24 +312,24 @@ void init_load() {
 	spz_tinfo = nullptr;
 	set_spz_delay(3);
 
-	menutaf = mem->taf_adr(MENUTAF);
-	spblende = mem->void_adr("cut/blende.rnd");
-	room->load_room(&room_blk, room_start_nr, &_G(spieler));
-	out->set_palette(pal);
+	menutaf = _G(mem)->taf_adr(MENUTAF);
+	spblende = _G(mem)->void_adr("cut/blende.rnd");
+	room->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
+	_G(out)->set_palette(pal);
 }
 
 void tidy() {
 	sound_exit();
-	in->alter_kb_handler();
-	in->init();
+	_G(in)->alter_kb_handler();
+	_G(in)->init();
 	free_buffers();
 	obj->free_inv_spr(&inv_spr[0]);
 
-	delete iog;
-	delete cur;
+	delete _G(iog);
+	delete _G(cur);
 	delete mov;
 	delete flc;
-	delete sndPlayer;
+	delete _G(sndPlayer);
 	delete atds;
 	delete det;
 	delete uhr;
@@ -340,15 +339,15 @@ void tidy() {
 	delete bit;
 	delete txt;
 	delete fx;
-	delete in;
-	delete out;
-	delete mem;
+	delete _G(in);
+	delete _G(out);
+	delete _G(mem);
 
-	iog = nullptr;
-	cur = nullptr;
+	_G(iog) = nullptr;
+	_G(cur) = nullptr;
 	mov = nullptr;
 	flc = nullptr;
-	sndPlayer = nullptr;
+	_G(sndPlayer) = nullptr;
 	atds = nullptr;
 	det = nullptr;
 	uhr = nullptr;
@@ -358,13 +357,13 @@ void tidy() {
 	bit = nullptr;
 	txt = nullptr;
 	fx = nullptr;
-	in = nullptr;
-	out = nullptr;
-	mem = nullptr;
+	_G(in) = nullptr;
+	_G(out) = nullptr;
+	_G(mem) = nullptr;
 }
 
 void set_speed() {
-	in->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
+	_G(in)->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
 }
 
 #define GRAVIS 8
@@ -375,11 +374,11 @@ void sound_init() {
 	_G(spieler).MusicSwitch = false;
 	frequenz = 22050;
 
-	sndPlayer->initMixMode();
+	_G(sndPlayer)->initMixMode();
 	_G(spieler).MusicVol = 63;
 	_G(spieler).SoundVol = 63;
-	sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
-	sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
+	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
+	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 
 	music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 
@@ -403,7 +402,7 @@ void sound_init() {
 }
 
 void sound_exit() {
-	sndPlayer->exitMixMode();
+	_G(sndPlayer)->exitMixMode();
 }
 
 void show_intro() {
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 8729604da86..381009afa2e 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -177,7 +177,7 @@ void load_room_music(int16 room_nr) {
 		default:
 			ttp_index = -1;
 			CurrentSong = -1;
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			break;
 		}
 		if (ttp_index != -1) {
@@ -185,25 +185,25 @@ void load_room_music(int16 room_nr) {
 				volume = 0;
 			else if (volume > _G(spieler).MusicVol)
 				volume = _G(spieler).MusicVol;
-			sndPlayer->setMusicMasterVol(volume);
-			sndPlayer->setLoopMode(lp_mode);
+			_G(sndPlayer)->setMusicMasterVol(volume);
+			_G(sndPlayer)->setLoopMode(lp_mode);
 			if (ttp_index != CurrentSong) {
-				sndPlayer->stopMod();
-				while (sndPlayer->musicPlaying());
+				_G(sndPlayer)->stopMod();
+				while (_G(sndPlayer)->musicPlaying());
 				memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
-				mem->file->select_pool_item(music_handle, EndOfPool - ttp_index);
-				mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
+				_G(mem)->file->select_pool_item(music_handle, EndOfPool - ttp_index);
+				_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
 				CurrentSong = ttp_index;
-				if (!modul) {
+				if (!_G(modul)) {
 					if (play_mode == NORMAL_PLAY)
-						sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
+						_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
 					else {
-						sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
-						sndPlayer->stopMod();
+						_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
+						_G(sndPlayer)->stopMod();
 						if (play_mode == SEQUENCE_PLAY)
-							sndPlayer->playSequence(seq_start, seq_end);
+							_G(sndPlayer)->playSequence(seq_start, seq_end);
 						else if (play_mode == PATTERN_PLAY)
-							sndPlayer->playPattern(pattern);
+							_G(sndPlayer)->playPattern(pattern);
 					}
 				}
 			}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 84d30c4ce7a..1cd2e5b0dab 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -33,52 +33,23 @@ namespace Chewy {
 
 #define AUSGANG_CHECK_PIX 8
 
-int16 menu_flag;
-char cur_no_flag;
-bool inv_disp_ok;
-int16 txt_aus_click;
-int16 txt_nummer;
-int16 tmp_menu_item;
-int16 cur_ausgang_flag;
-int16 room_start_nr;
-int16 TmpFrameSpeed;
-
-#if 0
-fehler *err;
-sblaster *snd;
-loudness *music;
-
-#endif
-
-InputMgr *in;
-memory *mem;
-io_game *iog;
-McgaGraphics *out;
-cursor *cur;
-#ifdef AIL
-SoundPlayer *sndPlayer;
-#endif
-
-int16 modul = 0;
-int16 fcode = 0;
-
-ChewyFont *_font6;
-ChewyFont *_font8;
-FontMgr *_fontMgr;
-
-void switch_room(int16 nr);
+static const int16 invent_display[4][2] = {
+	{5, 0}, { 265, 0 }, { 265, 149 }, { 5, 149 }
+};
+
+extern void switch_room(int16 nr);
 
 void game_main() {
-	_fontMgr = new FontMgr();
+	_G(fontMgr) = new FontMgr();
 
-	_font8 = new ChewyFont("TXT/8X8.TFF");
-	_font6 = new ChewyFont("TXT/6X8.TFF");
-	_font6->setDisplaySize(_font6->getDataWidth() - 2, _font6->getDataHeight());
-	_font8->setDeltaX(10);
+	_G(font8) = new ChewyFont("TXT/8X8.TFF");
+	_G(font6) = new ChewyFont("TXT/6X8.TFF");
+	_G(font6)->setDisplaySize(_G(font6)->getDataWidth() - 2, _G(font6)->getDataHeight());
+	_G(font8)->setDeltaX(10);
 
-	room_start_nr = 0;
+	_G(room_start_nr) = 0;
 	standard_init();
-	out->cls();
+	_G(out)->cls();
 	cursor_wahl(CUR_WALK);
 	workptr = workpage + 4l;
 
@@ -93,7 +64,7 @@ void game_main() {
 
 	remove(ADSH_TMP);
 	tidy();
-	out->rest_palette();
+	_G(out)->rest_palette();
 }
 
 void alloc_buffers() {
@@ -245,11 +216,11 @@ void cursor_wahl(int16 nr) {
 
 	if (ok) {
 		cur_move = true;
-		cur->set_cur_ani(&curani);
+		_G(cur)->set_cur_ani(&curani);
 		int16 *xy = (int16 *)curblk.sprite[curani.ani_anf];
 		_G(spieler).CurBreite = xy[0];
 		_G(spieler).CurHoehe = xy[1];
-		in->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
+		_G(in)->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
 	}
 }
 
@@ -257,31 +228,25 @@ void hide_cur() {
 	if (!_G(cur_hide_flag)) {
 		_G(cur_hide_flag) = true;
 		flags.ShowAtsInvTxt = false;
-		cur->hide_cur();
+		_G(cur)->hide_cur();
 		flags.CursorStatus = false;
 	}
 }
 
 void show_cur() {
 	flags.ShowAtsInvTxt = true;
-	cur->show_cur();
+	_G(cur)->show_cur();
 	flags.CursorStatus = true;
 }
 
-int16 invent_display[4][2] = { {5, 0},
-	{265, 0},
-	{265, 149},
-	{5, 149}
-};
-
 void test_menu() {
 	int16 ende;
 	menu_lauflicht = 0;
-	inv_disp_ok = false;
+	_G(inv_disp_ok) = false;
 	_G(spieler).inv_cur = false;
 	menu_display = 0;
 	_G(cur_display) = true;
-	cur->show_cur();
+	_G(cur)->show_cur();
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[spieler_vector[P_CHEWY].Phase];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
@@ -289,10 +254,10 @@ void test_menu() {
 	ende = false;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	flags.main_maus_flag = false;
-	tmp_menu_item = false;
+	_G(tmp_menu_item) = false;
 	_G(maus_links_click) = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	txt_aus_click = false;
+	_G(txt_aus_click) = false;
 	fx_blend = BLEND3;
 	_G(auto_obj) = 0;
 	flags.MainInput = true;
@@ -356,18 +321,18 @@ int16 main_loop(int16 mode) {
 
 		case F5_KEY:
 		case SPACE:
-			tmp_menu_item = menu_item;
+			_G(tmp_menu_item) = menu_item;
 			maus_old_x = minfo.x;
 			maus_old_y = minfo.y;
 			menu_item = CUR_USE;
 			menu_entry();
 			Dialogs::Inventory::menu();
 			menu_exit();
-			menu_flag = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
-				menu_item = tmp_menu_item;
+				menu_item = _G(tmp_menu_item);
 				cursor_wahl(menu_item);
 				_G(spieler).inv_cur = false;
 			} else {
@@ -383,9 +348,9 @@ int16 main_loop(int16 mode) {
 		case F6_KEY:
 			flags.SaveMenu = true;
 
-			out->setze_zeiger(screen0);
-			out->set_fontadr(font6x8);
-			out->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->setze_zeiger(screen0);
+			_G(out)->set_fontadr(font6x8);
+			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 			cursor_wahl(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
 				ende = 1;
@@ -397,23 +362,23 @@ int16 main_loop(int16 mode) {
 				cursor_wahl(menu_item);
 			_G(cur_display) = true;
 			flags.SaveMenu = false;
-			cur->show_cur();
-			out->setze_zeiger(workptr);
+			_G(cur)->show_cur();
+			_G(out)->setze_zeiger(workptr);
 			break;
 
 		case ESC:
 			if (menu_display == 0) {
 				menu_entry();
-				tmp_menu_item = menu_item;
+				_G(tmp_menu_item) = menu_item;
 				maus_old_x = minfo.x;
 				maus_old_y = minfo.y;
 				menu_display = MENU_EINBLENDEN;
 				maus_menu_x = (MAUS_MENU_MAX_X / 5) * (menu_item);
 				_G(cur_display) = false;
-				cur->move(maus_menu_x, 100);
+				_G(cur)->move(maus_menu_x, 100);
 			} else {
 				menu_exit();
-				menu_item = tmp_menu_item;
+				menu_item = _G(tmp_menu_item);
 				menu_display = MENU_AUSBLENDEN;
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
@@ -430,11 +395,11 @@ int16 main_loop(int16 mode) {
 				menu_entry();
 				Dialogs::Inventory::menu();
 				menu_exit();
-				menu_flag = MENU_AUSBLENDEN;
+				_G(menu_flag) = MENU_AUSBLENDEN;
 				menu_display = 0;
 				_G(cur_display) = true;
 				if (_G(spieler).AkInvent == -1) {
-					menu_item = tmp_menu_item;
+					menu_item = _G(tmp_menu_item);
 					cursor_wahl(menu_item);
 					_G(spieler).inv_cur = false;
 				} else {
@@ -447,13 +412,13 @@ int16 main_loop(int16 mode) {
 			case CUR_SAVE:
 				flags.SaveMenu = true;
 				menu_display = MENU_EINBLENDEN;
-				cur->move(152, 92);
+				_G(cur)->move(152, 92);
 				minfo.x = 152;
 				minfo.y = 92;
-				out->set_fontadr(font6x8);
-				out->set_vorschub(fvorx6x8, fvory6x8);
+				_G(out)->set_fontadr(font6x8);
+				_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 
-				out->setze_zeiger(screen0);
+				_G(out)->setze_zeiger(screen0);
 				cursor_wahl(CUR_SAVE);
 				ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
@@ -461,27 +426,27 @@ int16 main_loop(int16 mode) {
 					fx_blend = BLEND4;
 				}
 
-				out->setze_zeiger(workptr);
-				menu_item = tmp_menu_item;
+				_G(out)->setze_zeiger(workptr);
+				menu_item = _G(tmp_menu_item);
 				menu_display = MENU_AUSBLENDEN;
 
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
-					cursor_wahl(tmp_menu_item);
+					cursor_wahl(_G(tmp_menu_item));
 				_G(cur_display) = true;
 
 				flags.SaveMenu = false;
-				cur->show_cur();
+				_G(cur)->show_cur();
 				break;
 
 			default:
 				if (menu_display != 0) {
 					menu_exit();
-					menu_flag = MENU_AUSBLENDEN;
+					_G(menu_flag) = MENU_AUSBLENDEN;
 					menu_display = 0;
 					_G(cur_display) = true;
-					cur->move(maus_old_x, maus_old_y);
+					_G(cur)->move(maus_old_x, maus_old_y);
 					minfo.x = maus_old_x;
 					minfo.y = maus_old_y;
 					_G(spieler).inv_cur = false;
@@ -519,10 +484,10 @@ int16 main_loop(int16 mode) {
 
 		if (menu_display == MENU_AUSBLENDEN) {
 			menu_exit();
-			menu_flag = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
-			cur->move(maus_old_x, maus_old_y);
+			_G(cur)->move(maus_old_x, maus_old_y);
 			minfo.x = maus_old_x;
 			minfo.y = maus_old_y;
 		}
@@ -577,15 +542,15 @@ void set_up_screen(SetupScreenMode mode) {
 		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
 	++FrameSpeed;
-	out->setze_zeiger(workptr);
-	out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
 
 	if (SetUpScreenFunc && menu_display == 0 && !flags.InventMenu) {
 		SetUpScreenFunc();
-		out->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(workptr);
 	}
 
 	sprite_engine();
@@ -603,7 +568,7 @@ void set_up_screen(SetupScreenMode mode) {
 		if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
 			build_menu(invent_display[_G(spieler).InvDisp][0],
 			           invent_display[_G(spieler).InvDisp][1], 3, 3, 60, 0);
-			out->sprite_set(inv_spr[_G(spieler).AkInvent],
+			_G(out)->sprite_set(inv_spr[_G(spieler).AkInvent],
 			                 invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
 			                 invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
 			                 , scr_width);
@@ -613,7 +578,7 @@ void set_up_screen(SetupScreenMode mode) {
 			ads_menu();
 		if (_G(maus_links_click)) {
 			if (menu_item == CUR_WALK) {
-				if (cur_ausgang_flag) {
+				if (_G(cur_ausgang_flag)) {
 					calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				} else {
 					if (!flags.ChewyDontGo) {
@@ -681,10 +646,10 @@ void set_up_screen(SetupScreenMode mode) {
 			}
 		}
 		if (_G(cur_display) == true && mode == DO_SETUP) {
-			cur->plot_cur();
+			_G(cur)->plot_cur();
 
 			if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
-				out->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
+				_G(out)->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
 				                scr_width);
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
@@ -702,9 +667,9 @@ void set_up_screen(SetupScreenMode mode) {
 	atds->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
 	                spieler_vector[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(maus_links_click) = false;
-	menu_flag = false;
+	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
-		out->setze_zeiger(nullptr);
+		_G(out)->setze_zeiger(nullptr);
 		switch (fx_blend) {
 		case BLEND1:
 			fx->blende1(workptr, screen0, pal, 150, 0, 0);
@@ -719,14 +684,14 @@ void set_up_screen(SetupScreenMode mode) {
 			break;
 
 		case BLEND4:
-			out->setze_zeiger(workptr);
-			out->cls();
-			out->setze_zeiger(nullptr);
+			_G(out)->setze_zeiger(workptr);
+			_G(out)->cls();
+			_G(out)->setze_zeiger(nullptr);
 			fx->blende1(workptr, screen0, pal, 150, 0, 0);
 			break;
 
 		default:
-			out->back2screen(workpage);
+			_G(out)->back2screen(workpage);
 			break;
 		}
 
@@ -771,8 +736,8 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 			}
 			if (str_adr) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(font8x8);
+				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_adr, anz);
@@ -828,7 +793,7 @@ void kb_mov(int16 mode) {
 	int16 ende;
 	ende = 0;
 	while (!ende) {
-		switch (in->get_switch_code()) {
+		switch (_G(in)->get_switch_code()) {
 		case CURSOR_RIGHT:
 			if (minfo.x < 320 - _G(spieler).CurBreite)
 				minfo.x += 2;
@@ -854,7 +819,7 @@ void kb_mov(int16 mode) {
 			break;
 
 		}
-		cur->move(minfo.x, minfo.y);
+		_G(cur)->move(minfo.x, minfo.y);
 		if (mode)
 			ende = 1;
 		else
@@ -872,7 +837,7 @@ void kb_cur_action(int16 key, int16 mode) {
 			else
 				menu_item = CUR_WALK;
 			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
-			cur->move(maus_menu_x, 100);
+			_G(cur)->move(maus_menu_x, 100);
 		}
 		break;
 
@@ -883,7 +848,7 @@ void kb_cur_action(int16 key, int16 mode) {
 			else
 				menu_item = CUR_INVENT;
 			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
-			cur->move(maus_menu_x, 100);
+			_G(cur)->move(maus_menu_x, 100);
 		}
 		break;
 
@@ -913,15 +878,15 @@ void maus_action() {
 	        x < invent_display[_G(spieler).InvDisp][0] + 48 &&
 	        y > invent_display[_G(spieler).InvDisp][1] &&
 	        y < invent_display[_G(spieler).InvDisp][1] + 48) {
-		if (!_G(spieler).inv_cur && !inv_disp_ok && _G(spieler).AkInvent != -1) {
+		if (!_G(spieler).inv_cur && !_G(inv_disp_ok) && _G(spieler).AkInvent != -1) {
 			cursor_wahl(CUR_USE);
 		}
-		inv_disp_ok = true;
+		_G(inv_disp_ok) = true;
 	} else {
-		if (!_G(spieler).inv_cur && inv_disp_ok) {
+		if (!_G(spieler).inv_cur && _G(inv_disp_ok)) {
 			cursor_wahl(menu_item);
 		}
-		inv_disp_ok = false;
+		_G(inv_disp_ok) = false;
 	}
 	if (atds->aad_get_status() == -1) {
 		if (minfo.button || kbinfo.key_code == ESC || kbinfo.key_code == ENTER) {
@@ -935,7 +900,7 @@ void maus_action() {
 					if (menu_display == MENU_EINBLENDEN)
 						kbinfo.scan_code = ENTER;
 					else if (_G(spieler).AkInvent != -1) {
-						if (inv_disp_ok) {
+						if (_G(inv_disp_ok)) {
 							if (_G(spieler).inv_cur) {
 								menu_item = CUR_USE;
 								cursor_wahl(menu_item);
@@ -1233,8 +1198,8 @@ void check_shad(int16 g_idx, int16 mode) {
 }
 
 void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w, char *txtptr) {
-	out->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
-	out->printxy(x, y, fcol, bcol, scr_w, txtptr);
+	_G(out)->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
+	_G(out)->printxy(x, y, fcol, bcol, scr_w, txtptr);
 }
 
 bool auto_move(int16 mov_nr, int16 p_nr) {
@@ -1276,7 +1241,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				while (mov->auto_go_status()) {
 					if (SHOULD_QUIT)
 						return 0;
-					if (in->get_switch_code() == ESC) {
+					if (_G(in)->get_switch_code() == ESC) {
 						if (flags.ExitMov || flags.BreakAMov) {
 							key = ESC;
 							mov->stop_auto_go();
@@ -1295,7 +1260,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 				get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 				while (!ende) {
-					if (in->get_switch_code() == ESC || key == ESC) {
+					if (_G(in)->get_switch_code() == ESC || key == ESC) {
 						if (flags.ExitMov || flags.BreakAMov) {
 							spieler_vector[p_nr].Count = 0;
 							move_status = false;
@@ -1348,7 +1313,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 		if (mode == ANI_WAIT) {
 			while (!ende) {
-				if (in->get_switch_code() == ESC) {
+				if (_G(in)->get_switch_code() == ESC) {
 					if (flags.ExitMov || flags.BreakAMov) {
 						spieler_vector[p_nr].Count = 0;
 						move_status = false;
@@ -1504,8 +1469,8 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					char *str_ = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
 						ret = txt_nr;
-						out->set_fontadr(font8x8);
-						out->set_vorschub(fvorx8x8, fvory8x8);
+						_G(out)->set_fontadr(font8x8);
+						_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 						calc_txt_xy(&x, &y, str_, anz);
 						for (i = 0; i < anz; i++)
 							print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
@@ -1578,8 +1543,8 @@ void calc_mouse_person(int16 x, int16 y) {
 		p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
 			if (!_G(spieler).PersonHide[p_nr]) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(font8x8);
+				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
 				print_shad(x, y, 255, 300, 0, scr_width, str_);
@@ -1706,22 +1671,22 @@ void get_user_key(int16 mode) {
 	maus_action();
 	_G(maus_links_click) = false;
 
-	if (!inv_disp_ok) {
-		switch (in->get_switch_code()) {
+	if (!_G(inv_disp_ok)) {
+		switch (_G(in)->get_switch_code()) {
 		case F5_KEY:
 		case SPACE:
 		case ESC:
 			maus_old_x = minfo.x;
 			maus_old_y = minfo.y;
 
-			tmp_menu_item = menu_item;
+			_G(tmp_menu_item) = menu_item;
 			menu_item = CUR_USE;
 			Dialogs::Inventory::menu();
-			menu_flag = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_AUSBLENDEN;
 			menu_display = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
-				menu_item = tmp_menu_item;
+				menu_item = _G(tmp_menu_item);
 				cursor_wahl(menu_item);
 				_G(spieler).inv_cur = false;
 			} else {
@@ -1786,22 +1751,22 @@ void check_mouse_ausgang(int16 x, int16 y) {
 
 		switch (attr) {
 		case AUSGANG_LINKS:
-			cur_ausgang_flag = AUSGANG_LINKS;
+			_G(cur_ausgang_flag) = AUSGANG_LINKS;
 			cursor_wahl(CUR_AUSGANG_LINKS);
 			break;
 
 		case AUSGANG_RECHTS:
-			cur_ausgang_flag = AUSGANG_RECHTS;
+			_G(cur_ausgang_flag) = AUSGANG_RECHTS;
 			cursor_wahl(CUR_AUSGANG_RECHTS);
 			break;
 
 		case AUSGANG_OBEN:
-			cur_ausgang_flag = AUSGANG_OBEN;
+			_G(cur_ausgang_flag) = AUSGANG_OBEN;
 			cursor_wahl(CUR_AUSGANG_OBEN);
 			break;
 
 		case AUSGANG_UNTEN:
-			cur_ausgang_flag = AUSGANG_UNTEN;
+			_G(cur_ausgang_flag) = AUSGANG_UNTEN;
 			cursor_wahl(CUR_AUSGANG_UNTEN);
 			break;
 
@@ -1810,9 +1775,9 @@ void check_mouse_ausgang(int16 x, int16 y) {
 			break;
 		}
 
-		if (cur_ausgang_flag && !found) {
+		if (_G(cur_ausgang_flag) && !found) {
 			cursor_wahl(menu_item);
-			cur_ausgang_flag = false;
+			_G(cur_ausgang_flag) = false;
 		}
 	}
 }
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 7673cea8f6b..34da815e2ee 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -29,15 +29,10 @@
 
 namespace Chewy {
 
-extern int16 menu_flag;
-extern bool inv_disp_ok;
-extern int16 tmp_menu_item;
-
 void game_main();
 void free_buffers();
 void plot_main_menu();
 void test_menu();
-void shading(int16 new_shad_nr);
 void palcopy(byte *dipal, const byte *sipal, int16 distart,
              int16 sistart, int16 anz);
 short calc_maus_txt(int16 x, int16 y, int16 mode);
@@ -83,10 +78,6 @@ public:
 	ChewyFont *getFont() { return _font; }
 };
 
-extern ChewyFont *_font6;
-extern ChewyFont *_font8;
-extern FontMgr *_fontMgr;
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 0ece963a814..6761751fdc3 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -21,14 +21,12 @@
 
 #include "common/memstream.h"
 #include "chewy/memory.h"
+#include "chewy/global.h"
 #include "chewy/types.h"
 #include "chewy/resource.h"
 
 namespace Chewy {
 
-extern int16 modul;
-extern int16 fcode;
-
 memory::memory() {
 	file = new Data();
 }
@@ -90,7 +88,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 
 				rs->seek(ptr, SEEK_SET);
 				size = 0;
-				for (i = 0; i < image_anz && !modul; i++) {
+				for (i = 0; i < image_anz && !_G(modul); i++) {
 					if (iheader.load(rs)) {
 						size += iheader.width * iheader.height;
 						rs->seek(iheader.next, SEEK_SET);
@@ -99,13 +97,13 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 						error("taf_seq_adr error");
 					}
 				}
-				if (!modul) {
+				if (!_G(modul)) {
 					size += image_anz * sizeof(byte *);
 					size += image_anz * sizeof(char *);
 					size += ((uint32)sizeof(taf_seq_info));
 					tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
 
-					if (!modul) {
+					if (!_G(modul)) {
 						ts_info = (taf_seq_info *)tmp1;
 						ts_info->anzahl = image_anz;
 						ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
@@ -114,7 +112,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 						sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
 							+ (image_anz * sizeof(char *)));
 
-						for (i = 0; i < image_anz && !modul; i++) {
+						for (i = 0; i < image_anz && !_G(modul); i++) {
 							if (iheader.load(rs)) {
 								ts_info->image[i] = sp_ptr;
 								abmess = (int16 *)sp_ptr;
@@ -132,7 +130,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 								error("taf_seq_adr error");
 							}
 						}
-						if (!modul) {
+						if (!_G(modul)) {
 							rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
 
 							if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
@@ -143,7 +141,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 									*p = rs->readSint16LE();
 							}
 						}
-						if (modul)
+						if (_G(modul))
 							free(tmp1);
 					}
 				}
@@ -166,17 +164,17 @@ void memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
 
-	if (!modul) {
+	if (!_G(modul)) {
 		*speicher = (byte *)MALLOC(size);
 		if (*speicher) {
 			file->load_tff(filename, *speicher);
-			if (modul) {
+			if (_G(modul)) {
 				free(*speicher);
 				*speicher = 0;
 			}
 		} else {
-			fcode = NOSPEICHER;
-			modul = SPEICHER;
+			_G(fcode) = NOSPEICHER;
+			_G(modul) = SPEICHER;
 		}
 	}
 }
@@ -187,12 +185,12 @@ byte *memory::void_adr(const char *filename) {
 	byte *ptr = 0;
 	size = file->size(filename, 200);
 
-	if (!modul) {
+	if (!_G(modul)) {
 		ptr = (byte *)MALLOC(size * sizeof(uint32));
-		if (!modul) {
+		if (!_G(modul)) {
 			*(uint32 *)ptr = size;
 			file->void_load(filename, ptr + sizeof(uint32), size);
-			if (modul)
+			if (_G(modul))
 				free(ptr);
 		}
 	}
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 921531df210..94efc82e378 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -63,7 +63,7 @@ void plot_main_menu() {
 				deltaX = -40;
 		}
 
-		out->scale_set(menutaf->image[i],
+		_G(out)->scale_set(menutaf->image[i],
 			MENU_X + deltaX + korrektur[i * 2],
 		    _G(spieler).MainMenuY + korrektur[i * 2 + 1],
 			zoomx, zoomy, 0);
@@ -80,7 +80,7 @@ void plot_main_menu() {
 			deltaX = 40;
 
 		int img = IMAGES[menu_item];
-		out->scale_set(menutaf->image[img],
+		_G(out)->scale_set(menutaf->image[img],
 		    MENU_X + deltaX + korrektur[img * 2] - 5,
 		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
 			zoomx, zoomy, 0);
@@ -106,7 +106,7 @@ void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 	int16 pix_len;
 	int16 tmp_len;
 	int16 i;
-	out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
+	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	len = 0;
 	for (i = 0; i < txt_anz; i++) {
 
@@ -169,14 +169,14 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 	xy[3][1] = y + 16 * (yanz - 1);
 
 	for (i = 0; i < 4; i++)
-		out->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
+		_G(out)->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
 		                 xy[i][0], xy[i][1], scr_width);
 
 	s_nr = BAU_MENU_SEITE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yanz - 2; i++) {
-			out->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, scr_width);
+			_G(out)->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, scr_width);
 		}
 		++s_nr;
 	}
@@ -186,7 +186,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xanz - 2; i++) {
-				out->sprite_set(menutaf->image[s_nr],
+				_G(out)->sprite_set(menutaf->image[s_nr],
 				                 xy[2][0] + 16 + i * 16, xy[j * 2][1], scr_width);
 			}
 		}
@@ -212,22 +212,22 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				out->sprite_set(menutaf->image[BAU_MENU_OBEN],
+				_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN],
 				                 x + i * 16, xy[0][1], scr_width);
 			x = xy[1][0] - leer * 16;
 		}
-		out->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
+		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
 		                 xy[0][0] + 16 + leer * 16, xy[0][1], scr_width);
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < mitte; i++)
-			out->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
+			_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
 			                 x + i * 16, xy[0][1], scr_width);
-		out->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
+		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
 		                 x + i * 16, xy[0][1], scr_width);
 	}
 
-	out->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
+	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
 	               xy[0][1] + 16 + (yanz - 2) * 16, col);
 }
 
@@ -285,8 +285,8 @@ void ads_menu() {
 			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
-			out->set_fontadr(font6x8);
-			out->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->set_fontadr(font6x8);
+			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
 			if (ads_item_anz > 4)
 				cur_y_start = 190;
 			else
@@ -296,11 +296,11 @@ void ads_menu() {
 					col = 255;
 				else
 					col = 14;
-				out->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
+				_G(out)->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
 			}
 		}
 
-		switch (in->get_switch_code()) {
+		switch (_G(in)->get_switch_code()) {
 		case 255:
 		case ENTER:
 			if (cur_y < ads_item_anz && cur_y >= 0 && ads_push == false) {
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 3813057506f..7246d7fa552 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -35,9 +35,6 @@ extern bool mouse_links_los;
 extern bool mouse_active;
 extern bool cur_move;
 
-extern int16 modul;
-extern int16 fcode;
-
 class InputMgr {
 public:
 	InputMgr();
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index c4dd49aed32..4634951c8db 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -41,7 +41,7 @@ namespace Chewy {
 #define ODER 2
 #define XODER 3
 
-#define COPY_PAGE out->screen2screen
+#define COPY_PAGE _G(out)->screen2screen
 
 #define END_POOL 32767
 
diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index e1cb98a558a..ed96c1c5310 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -39,19 +39,9 @@ namespace Chewy {
 
 class sblaster;
 
-extern McgaGraphics *out;
-extern memory *mem;
-extern InputMgr *in;
 extern sblaster *snd;
-extern io_game *iog;
-extern cursor *cur;
-#ifdef AIL
-extern SoundPlayer *sndPlayer;
-#endif
 
 extern uint16 _stklen;
-extern int16 modul;
-extern int16 fcode;
 
 } // namespace Chewy
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index f10911d2daf..9ba4b77a3cd 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -308,7 +308,7 @@ int16 ged_user_func(int16 idx_nr) {
 void enter_room(int16 eib_nr) {
 	int16 i;
 
-	if (!modul)
+	if (!_G(modul))
 		load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
 	atds->stop_aad();
@@ -780,16 +780,16 @@ void print_rows(int16 id) {
 	int16 txt_anz, len;
 	char *txtStr, *s;
 
-	out->set_fontadr(font8x8);
-	out->set_vorschub(fvorx8x8, fvory8x8);
+	_G(out)->set_fontadr(font8x8);
+	_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 	txtStr = atds->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
-	out->setze_zeiger(nullptr);
+	_G(out)->setze_zeiger(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
 		s = txt->str_pos(txtStr, i);
 		len = (strlen(s) * fvorx8x8) / 2;
 
-		out->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
+		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
 	}
 }
 
@@ -802,7 +802,7 @@ int16 flic_user_function(int16 keys) {
 		case 584:
 		case 588:
 		case 591:
-			out->raster_col(254, 63, 12, 46);
+			_G(out)->raster_col(254, 63, 12, 46);
 			break;
 		default:
 			break;
@@ -815,7 +815,7 @@ int16 flic_user_function(int16 keys) {
 	if (flic_val1 == 594 && keys == 18)
 		atds->stop_aad();
 
-	ret = in->get_switch_code() == ESC ? -1 : 0;
+	ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
 	if (flic_val2 == 140 && keys == 15)
 		ret = -2;
 	if (flic_val2 == 144 && keys == 7)
@@ -862,8 +862,8 @@ static void flic_proc1() {
 		else if (VALS1[i] == 143)
 			load_room_music(260);
 		if (VALS2[i]) {
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 		}
 
 		flic_val1 = 0;
@@ -876,7 +876,7 @@ static void flic_proc1() {
 		do {
 			flic_val2 = VALS1[i];
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, flic_val2);
+			_G(mem)->file->select_pool_item(Ci.Handle, flic_val2);
 			ret = flc->custom_play(&Ci);
 #else
 			g_engine->playVideo(flic_val2);
@@ -889,9 +889,9 @@ static void flic_proc1() {
 
 	flc->remove_custom_user_function();
 	if (ret == -1) {
-		out->setze_zeiger(nullptr);
-		out->cls();
-		out->raster_col(254, 62, 35, 7);
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
+		_G(out)->raster_col(254, 62, 35, 7);
 		start_aad(595);
 		atds->print_aad(254, 0);
 
@@ -902,8 +902,8 @@ static void flic_proc1() {
 		}
 	}
 
-	out->setze_zeiger(workptr);
-	out->cls();
+	_G(out)->setze_zeiger(workptr);
+	_G(out)->cls();
 }
 
 void flic_cut(int16 nr, int16 mode) {
@@ -923,9 +923,9 @@ void flic_cut(int16 nr, int16 mode) {
 	static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
-	out->setze_zeiger(nullptr);
+	_G(out)->setze_zeiger(nullptr);
 	det->disable_room_sound();
-	sndPlayer->endSound();
+	_G(sndPlayer)->endSound();
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
@@ -936,7 +936,7 @@ void flic_cut(int16 nr, int16 mode) {
 		switch (nr) {
 		case FCUT_001:
 		case 1000:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			g_engine->playVideo(nr);
 			break;
@@ -952,21 +952,21 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_019_09:
 		case FCUT_019_10:
 		case FCUT_019_11:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			nr = FCUT_019_01;
-			sndPlayer->setLoopMode(1);
+			_G(sndPlayer)->setLoopMode(1);
 
 			for (i = 0; i < 11; i++) {
 				g_engine->playVideo(FCUT_019_01 + i);
 				SHOULD_QUIT_RETURN;
 			}
 
-			sndPlayer->fadeOut(0);
-			out->ausblenden(1);
-			out->cls();
-			while (sndPlayer->musicPlaying());
-			sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
+			_G(sndPlayer)->fadeOut(0);
+			_G(out)->ausblenden(1);
+			_G(out)->cls();
+			while (_G(sndPlayer)->musicPlaying());
+			_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 			break;
 
 		case FCUT_032:
@@ -976,7 +976,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_040:
 			do {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, nr);
+				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -986,12 +986,12 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_034:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 
 			do {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, nr);
+				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1016,18 +1016,18 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(255);
 			g_engine->playVideo(FCUT_058);
 
-			if (!modul) {
+			if (!_G(modul)) {
 				g_engine->playVideo(FCUT_059);
 			}
 			if (!_G(spieler).R43GetPgLady) {
-				if (!modul) {
+				if (!_G(modul)) {
 					g_engine->playVideo(FCUT_060);
 				}
 			} else {
-				if (!modul) {
+				if (!_G(modul)) {
 					start_aad(623, -1);
 #ifndef NEW_VIDEO_CODE
-					mem->file->select_pool_item(Ci.Handle, FCUT_061);
+					_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
 					flc->set_custom_user_function(Room43::setup_func);
 					flc->custom_play(&Ci);
 					flc->remove_custom_user_function();
@@ -1035,28 +1035,28 @@ void flic_cut(int16 nr, int16 mode) {
 					g_engine->playVideo(FCUT_061);
 #endif
 				}
-				if (!modul) {
+				if (!_G(modul)) {
 					g_engine->playVideo(FCUT_062);
 				}
 			}
-			sndPlayer->fadeOut(0);
-			out->ausblenden(1);
-			out->cls();
-			while (sndPlayer->musicPlaying() && !SHOULD_QUIT);
+			_G(sndPlayer)->fadeOut(0);
+			_G(out)->ausblenden(1);
+			_G(out)->cls();
+			while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT);
 			break;
 
 		case FCUT_065:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
-			sndPlayer->setLoopMode(1);
+			_G(sndPlayer)->setLoopMode(1);
 			Room46::kloppe();
-			sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
+			_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 			CurrentSong = -1;
 			break;
 
 		case FCUT_071:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			g_engine->playVideo(FCUT_071);
 			break;
@@ -1071,7 +1071,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_095:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, nr);
+				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
 #else
 				playVideo(nr);
@@ -1080,17 +1080,17 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_112:
-			sndPlayer->setMusicMasterVol(32);
+			_G(sndPlayer)->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, nr);
+			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			ret = flc->custom_play(&Ci);
-			mem->file->select_pool_item(Ci.Handle, nr);
+			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
 #else
 			playVideo(nr);
 			playVideo(nr);
 #endif
-			sndPlayer->setMusicMasterVol(5);
+			_G(sndPlayer)->setMusicMasterVol(5);
 			break;
 
 		case FCUT_116:
@@ -1102,17 +1102,17 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_133:
 		case 1123:
-			for (i = 0; i < 13 && i != -1 && !modul; ++i) {
+			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_133[i]);
 #endif
 				if (i == 0 || i == 1) {
-					out->setze_zeiger(nullptr);
-					out->cls();
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
 				}
 			}
 			break;
@@ -1125,7 +1125,7 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 1);
+			_G(mem)->file->select_pool_item(Ci.Handle, 1);
 			ret = flc->custom_play(&Ci);
 #else
 			g_engine->playVideo(FCUT_001);
@@ -1136,7 +1136,7 @@ void flic_cut(int16 nr, int16 mode) {
 					fx->border(workpage, 100, 0, 0);
 					print_rows(591);
 #ifndef NEW_VIDEO_CODE
-					mem->file->select_pool_item(Ci.Handle, i + 3);
+					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
 					ret = flc->custom_play(&Ci);
 					SHOULD_QUIT_RETURN;
 #else
@@ -1150,7 +1150,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 6);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1162,7 +1162,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1009:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 9);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1176,7 +1176,7 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 12);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
 				ret = flc->custom_play(&Ci);
 #else
 				playVideo(i + 12);
@@ -1185,12 +1185,12 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				out->cls();
-				mem->file->select_pool_item(Ci.Handle, FCUT_017);
+				_G(out)->cls();
+				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
 				fx->border(workpage, 100, 0, 0);
 			}
 #else
-			out->cls();
+			_G(out)->cls();
 			fx->border(workpage, 100, 0, 0);
 #endif
 			break;
@@ -1199,7 +1199,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 15);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1213,13 +1213,13 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(594);
 				if (FLIC_CUT_1045[i] == 53) {
-					sndPlayer->stopMod();
+					_G(sndPlayer)->stopMod();
 					CurrentSong = -1;
 					load_room_music(256);
 				}
 
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1227,7 +1227,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 				if (FLIC_CUT_1045[i] == 53) {
-					sndPlayer->stopMod();
+					_G(sndPlayer)->stopMod();
 				}
 			}
 			break;
@@ -1238,7 +1238,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 43);
+				_G(mem)->file->select_pool_item(Ci.Handle, 43);
 				ret = flc->custom_play(&Ci);
 #else
 				playVideo(43);
@@ -1248,7 +1248,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1048:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 50);
+			_G(mem)->file->select_pool_item(Ci.Handle, 50);
 			flc->custom_play(&Ci);
 #else
 			playVideo(50);
@@ -1258,7 +1258,7 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->spr_blende(workpage, 100, false, 0);
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 48);
+				_G(mem)->file->select_pool_item(Ci.Handle, 48);
 				ret = flc->custom_play(&Ci);
 #else
 				playVideo(48);
@@ -1266,7 +1266,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 49);
+				_G(mem)->file->select_pool_item(Ci.Handle, 49);
 				flc->custom_play(&Ci);
 #else
 				playVideo(49);
@@ -1280,7 +1280,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
-				mem->file->select_pool_item(Ci.Handle, 54);
+				_G(mem)->file->select_pool_item(Ci.Handle, 54);
 			}
 #else
 			fx->spr_blende(workpage, 100, false, 0);
@@ -1292,7 +1292,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 55);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1302,18 +1302,18 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 46);
+				_G(mem)->file->select_pool_item(Ci.Handle, 46);
 #endif
 				fx->border(workpage, 100, 0, 0);
 			}
 			break;
 
 		case 1058:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 58);
+			_G(mem)->file->select_pool_item(Ci.Handle, 58);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(58);
@@ -1321,7 +1321,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 59);
+				_G(mem)->file->select_pool_item(Ci.Handle, 59);
 				flc->custom_play(&Ci);
 #else
 				playVideo(59);
@@ -1329,7 +1329,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 60);
+				_G(mem)->file->select_pool_item(Ci.Handle, 60);
 				flc->custom_play(&Ci);
 #else
 				playVideo(60);
@@ -1338,7 +1338,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 61);
+				_G(mem)->file->select_pool_item(Ci.Handle, 61);
 				flc->custom_play(&Ci);
 #else
 				playVideo(61);
@@ -1347,7 +1347,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 62);
+				_G(mem)->file->select_pool_item(Ci.Handle, 62);
 				flc->custom_play(&Ci);
 #else
 				playVideo(62);
@@ -1356,13 +1356,13 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1065:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 65);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1373,7 +1373,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1068:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 68);
+			_G(mem)->file->select_pool_item(Ci.Handle, 68);
 			flc->custom_play(&Ci);
 #else
 			playVideo(68);
@@ -1382,7 +1382,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 70);
+				_G(mem)->file->select_pool_item(Ci.Handle, 70);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1393,7 +1393,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1069:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 69);
+			_G(mem)->file->select_pool_item(Ci.Handle, 69);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(69);
@@ -1402,7 +1402,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				fx->spr_blende(workpage, 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 71);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
 				ret = flc->custom_play(&Ci);
 #else
 				playVideo(i + 71);
@@ -1416,7 +1416,7 @@ void flic_cut(int16 nr, int16 mode) {
 				print_rows(605);
 				fx->spr_blende(workpage, 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1429,7 +1429,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 8 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1440,7 +1440,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1087:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 87);
+			_G(mem)->file->select_pool_item(Ci.Handle, 87);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(87);
@@ -1449,7 +1449,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, i + 102);
+				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1460,7 +1460,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1088:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 88);
+			_G(mem)->file->select_pool_item(Ci.Handle, 88);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(88);
@@ -1469,23 +1469,23 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, 86);
+				_G(mem)->file->select_pool_item(Ci.Handle, 86);
 				flc->custom_play(&Ci);
 #else
 				playVideo(86);
 #endif
-				sndPlayer->stopMod();
+				_G(sndPlayer)->stopMod();
 			}
 			break;
 
 		case 1093:
 			for (i = 0; i < 12 && ret != -1; ++i) {
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
 				switch (FLIC_CUT_1093[i]) {
 				case 90:
 				case 91:
 				case 92:
-					out->cls();
+					_G(out)->cls();
 					break;
 				default:
 					break;
@@ -1499,8 +1499,8 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1106:
 			for (i = 0; i < 3 && ret == -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
-				out->cls();
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
+				_G(out)->cls();
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1511,7 +1511,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1107:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, FCUT_107);
+			_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(107);
@@ -1519,7 +1519,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 109);
+				_G(mem)->file->select_pool_item(Ci.Handle, 109);
 				fx->border(workpage, 100, 0, 0);
 			}
 #else
@@ -1530,7 +1530,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1108:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 108);
+			_G(mem)->file->select_pool_item(Ci.Handle, 108);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(108);
@@ -1538,7 +1538,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				mem->file->select_pool_item(Ci.Handle, 115);
+				_G(mem)->file->select_pool_item(Ci.Handle, 115);
 				fx->spr_blende(workpage, 100, false, 0);
 				flc->custom_play(&Ci);
 			}
@@ -1549,12 +1549,12 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1110:
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(257);
-			sndPlayer->setMusicMasterVol(20);
+			_G(sndPlayer)->setMusicMasterVol(20);
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle, 110);
+			_G(mem)->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
 #else
 			playVideo(110);
@@ -1562,9 +1562,9 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				sndPlayer->setMusicMasterVol(63);
+				_G(sndPlayer)->setMusicMasterVol(63);
 				fx->spr_blende(workpage, 100, false, 0);
-				mem->file->select_pool_item(Ci.Handle, 112);
+				_G(mem)->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
 			}
 #else
@@ -1572,14 +1572,14 @@ void flic_cut(int16 nr, int16 mode) {
 			fx->spr_blende(workpage, 100, false, 0);
 			playVideo(112);
 #endif
-			sndPlayer->stopMod();
+			_G(sndPlayer)->stopMod();
 			break;
 
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
-				out->cls();
+				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
+				_G(out)->cls();
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
@@ -1590,9 +1590,9 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1117:
 #ifndef NEW_VIDEO_CODE
-			if (mem->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
+			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
 				fx->border(workpage, 100, 0, 0);
-				mem->file->select_pool_item(Ci.Handle, 119);
+				_G(mem)->file->select_pool_item(Ci.Handle, 119);
 				flc->custom_play(&Ci);
 			}
 #else
@@ -1603,7 +1603,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		default:
 #ifndef NEW_VIDEO_CODE
-			mem->file->select_pool_item(Ci.Handle,
+			_G(mem)->file->select_pool_item(Ci.Handle,
 				(nr < 1000) ? nr : nr - 1000);
 
 			switch (mode) {
@@ -1631,8 +1631,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 	g_engine->_sound->stopSound();
 	g_events->delay(50);
-	sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
-	sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
+	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
+	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
@@ -1644,11 +1644,11 @@ void flic_cut(int16 nr, int16 mode) {
 	}
 
 	if (!flags.NoPalAfterFlc)
-		out->set_palette(pal);
+		_G(out)->set_palette(pal);
 
 	atds->stop_aad();
 	atds->stop_ats();
-	out->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(workptr);
 	flags.NoPalAfterFlc = false;
 }
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index e7895ba0919..1e7f8181ea2 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -114,15 +114,15 @@ void Room::close_handle(int16 mode) {
 }
 
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
-	modul = 0;
-	fcode = 0;
+	_G(modul) = 0;
+	_G(fcode) = 0;
 
 	clear_prog_ani();
 	det->load_rdi(Rb->DetFile, room_nr);
 
 	if (player->SoundSwitch == false)
 		det->disable_room_sound();
-	if (!modul) {
+	if (!_G(modul)) {
 		room_detail_info *Rdi_ = det->get_room_detail_info();
 		_roomInfo = &Rdi_->Ri;
 		if (_roomInfo->TafLoad != 255) {
@@ -134,23 +134,23 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 			Rb->DetImage = Rb->Fti->image;
 			Rb->DetKorrekt = Rb->Fti->korrektur;
 		}
-		if (!modul) {
+		if (!_G(modul)) {
 			obj->calc_all_static_detail();
 			load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
 			set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
 			calc_invent(Rb, player);
 
-			if (!modul) {
+			if (!_G(modul)) {
 				del_timer_old_room();
 				add_timer_new_room();
 			}
 
-			if (!modul) {
+			if (!_G(modul)) {
 				if (Rb->AtsLoad)
 					atds->load_atds(_roomInfo->RoomNr, ATS_DATEI);
 			}
 
-			if (!modul) {
+			if (!_G(modul)) {
 				if (Rb->AadLoad)
 					atds->load_atds(_roomInfo->RoomNr, AAD_DATEI);
 			}
@@ -226,7 +226,7 @@ void Room::set_ak_pal(RaumBlk *Rb) {
 void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 	byte *tmp_inv_spr[MAX_MOV_OBJ];
 
-	if (!modul) {
+	if (!_G(modul)) {
 		obj->sort();
 		memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
 		memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
@@ -305,7 +305,7 @@ void Room::init_ablage() {
 	_ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
 	_ablagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
 	_gedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
-	if (!modul) {
+	if (!_G(modul)) {
 		_akAblage = 0;
 		for (int16 i = 0; i < MAX_ABLAGE; i++) {
 			_ablage[i] = _ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
@@ -498,7 +498,7 @@ void load_chewy_taf(int16 taf_nr) {
 		if (fname_ != NULL) {
 			_G(spieler).ChewyAni = taf_nr;
 			AkChewyTaf = taf_nr;
-			chewy = mem->taf_adr(fname_);
+			chewy = _G(mem)->taf_adr(fname_);
 			chewy_kor = chewy->korrektur;
 		}
 	}
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index c54c6fbef10..49b919d57ee 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -236,9 +236,9 @@ void Room0::eyeStart(EyeMode mode) {
 		set_up_screen(NO_SETUP);
 		SHOULD_QUIT_RETURN;
 
-		cur->plot_cur();
+		_G(cur)->plot_cur();
 		calcEyeClick(3);
-		out->back2screen(workpage);
+		_G(out)->back2screen(workpage);
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -283,9 +283,9 @@ void Room0::eyeWait() {
 		spr_info[2].ZEbene = 192;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
-		cur->plot_cur();
+		_G(cur)->plot_cur();
 		calcEyeClick(2);
-		out->back2screen(workpage);
+		_G(out)->back2screen(workpage);
 
 		if (adi->delay_count > 0) {
 			--adi->delay_count;
@@ -311,8 +311,8 @@ void Room0::calcEyeClick(int16 ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
 			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(font8x8);
+				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
@@ -506,11 +506,11 @@ void Room0::feederStart(int16 mode) {
 		SHOULD_QUIT_RETURN;
 
 		set_up_screen(NO_SETUP);
-		cur->plot_cur();
+		_G(cur)->plot_cur();
 		if (!mode)
 			calcPillowClick(1);
 
-		out->back2screen(workpage);
+		_G(out)->back2screen(workpage);
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -547,9 +547,9 @@ void Room0::feederExtend() {
 		spr_info[1].ZEbene = 191;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
-		cur->plot_cur();
+		_G(cur)->plot_cur();
 		calcPillowClick(1);
-		out->back2screen(workpage);
+		_G(out)->back2screen(workpage);
 	}
 
 	clear_prog_ani();
@@ -564,8 +564,8 @@ void Room0::calcPillowClick(int16 ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
 			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
-				out->set_fontadr(font8x8);
-				out->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(font8x8);
+				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
@@ -764,7 +764,7 @@ void Room0::feederAni() {
 			feederStart(1);
 			auto_move(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
-			out->cls();
+			_G(out)->cls();
 			flic_cut(FCUT_001, CFO_MODE);
 
 			register_cutscene(1);
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 919cfdf2e65..01eb6ae0519 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -31,9 +31,9 @@ namespace Rooms {
 
 void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		out->setze_zeiger(nullptr);
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->setze_zeiger(nullptr);
 		fx->blende1(workptr, screen0, pal, 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		fx_blend = BLEND_NONE;
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 8eb3446d482..66d80cf798d 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -46,7 +46,7 @@ static const MovLine R13_BORK_MPKT[3] = {
 
 void Room13::entry() {
 	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
-		out->cls();
+		_G(out)->cls();
 		flic_cut(FCUT_013, CFO_MODE);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index c0bd5ada251..6548dbfba09 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -85,12 +85,12 @@ int16 Room23::start_gleiter() {
 					det->stop_detail(i);
 
 				if (_G(spieler).R23GleiterExit == 14) {
-					out->setze_zeiger(nullptr);
-					out->cls();
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
 					flags.NoPalAfterFlc = true;
 					flic_cut(FCUT_012, CFO_MODE);
 					register_cutscene(7);
-					out->cls();
+					_G(out)->cls();
 					_G(spieler).R23GleiterExit = 16;
 					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
 
@@ -104,8 +104,8 @@ int16 Room23::start_gleiter() {
 					_G(maus_links_click) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
-					out->setze_zeiger(nullptr);
-					out->cls();
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
 					flic_cut(FCUT_019_01, CFO_MODE);
 					_G(spieler).R23GleiterExit = 25;
 					register_cutscene(9);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 30c79f91812..3ae55d9c4e9 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -82,8 +82,8 @@ void Room28::entry(int16 eib_nr) {
 					det->show_static_spr(6);
 
 					if (!_G(spieler).R40TeilKarte) {
-						out->ausblenden(0);
-						out->set_teilpalette(pal, 255, 1);
+						_G(out)->ausblenden(0);
+						_G(out)->set_teilpalette(pal, 255, 1);
 						start_aad_wait(607, -1);
 						fx_blend = BLEND3;
 					}
@@ -105,8 +105,8 @@ void Room28::entry(int16 eib_nr) {
 			case 77:
 				if (_G(spieler).R28PostCar) {
 					_G(spieler).R28PostCar = false;
-					out->setze_zeiger(nullptr);
-					out->cls();
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
 					flic_cut(FCUT_063, CFO_MODE);
 					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 04dc6b13c9a..4fed7f611ec 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -182,8 +182,8 @@ int16 Room39::use_tv() {
 			_G(spieler).R39TvKanal = -1;
 
 		flags.NoPalAfterFlc = true;
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flic_cut(FCUT_042, CFO_MODE);
 		++_G(spieler).R39TvKanal;
 		flags.NoPalAfterFlc = true;
@@ -222,16 +222,16 @@ int16 Room39::use_tv() {
 			flic_cut(FCUT_041, CFO_MODE);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
-			out->setze_zeiger(nullptr);
-			out->cls();
-			out->set_palette(pal);
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
+			_G(out)->set_palette(pal);
 			flags.NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], CFO_MODE);
 
-			out->cls();
-			out->setze_zeiger(nullptr);
-			out->cls();
-			out->set_palette(pal);
+			_G(out)->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
+			_G(out)->set_palette(pal);
 			set_tv();
 			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(80, -1);
@@ -269,10 +269,10 @@ int16 Room39::use_tv() {
 	}
 
 	if (cls_flag) {
-		out->cls();
-		out->setze_zeiger(nullptr);
-		out->cls();
-		out->set_palette(pal);
+		_G(out)->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
+		_G(out)->set_palette(pal);
 		flags.NoPalAfterFlc = false;
 	}
 
@@ -307,9 +307,9 @@ void Room39::look_tv(bool cls_mode) {
 			}
 
 			if (cls_mode) {
-				out->setze_zeiger(nullptr);
-				out->cls();
-				out->set_palette(pal);
+				_G(out)->setze_zeiger(nullptr);
+				_G(out)->cls();
+				_G(out)->set_palette(pal);
 				flags.NoPalAfterFlc = true;
 			}
 
@@ -325,10 +325,10 @@ void Room39::look_tv(bool cls_mode) {
 			flc->remove_custom_user_function();
 
 			if (cls_mode) {
-				out->cls();
-				out->setze_zeiger(nullptr);
-				out->cls();
-				out->set_palette(pal);
+				_G(out)->cls();
+				_G(out)->setze_zeiger(nullptr);
+				_G(out)->cls();
+				_G(out)->set_palette(pal);
 				flags.NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TransMensch && dia_nr == 85)
@@ -362,7 +362,7 @@ void Room39::set_tv() {
 }
 
 int16 Room39::setup_func(int16 frame) {
-	int16 action_ret = in->get_switch_code() == ESC ? -1 : 0;
+	int16 action_ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
 
 	if (_flag) {
 		if (frame == 121)
@@ -376,7 +376,7 @@ int16 Room39::setup_func(int16 frame) {
 			start_aad(601, 0);
 			break;
 		case 297:
-			in->_hotkey = 1;
+			_G(in)->_hotkey = 1;
 			break;
 		case 171:
 		case 266:
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index 5b0095362f7..d5f8886a6fe 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -55,13 +55,13 @@ int16 Room4::sonde_comp() {
 	curblk.sprite = room_blk.DetImage;
 	int16 cur_x = 1;
 	int16 spr_nr = RAHMEN_ROT;
-	cur->move(160, 160);
+	_G(cur)->move(160, 160);
 
 	start_aad(46);
 	while (!ende) {
 		maus_action();
 		if (_G(maus_links_click)) {
-			switch (in->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
+			switch (_G(in)->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
 				if (cur_x > 0)
 					--cur_x;
@@ -102,7 +102,7 @@ int16 Room4::sonde_comp() {
 		}
 		cursor_wahl(CUR_USER);
 		_G(spieler).CurHoehe = 16;
-		in->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
+		_G(in)->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
 		if (minfo.y < 124) {
 			minfo.y = 123;
 		}
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 833b77aeb61..3f17f142605 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -115,10 +115,10 @@ void Room40::xit(int16 eib_nr) {
 				obj->hide_sib(SIB_MUENZE_R40);
 
 				uhr->disable_timer();
-				out->ausblenden(0);
+				_G(out)->ausblenden(0);
 				hide_person();
 				set_up_screen(DO_SETUP);
-				out->einblenden(pal, 0);
+				_G(out)->einblenden(pal, 0);
 				uhr->enable_timer();
 
 				_G(maus_links_click) = false;
@@ -341,7 +341,7 @@ int16 Room40::use_mr_pumpkin() {
 						auto_move(8, P_CHEWY);
 						start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
 						del_inventar(_G(spieler).AkInvent);
-						out->ausblenden(1);
+						_G(out)->ausblenden(1);
 						Room43::catch_pg();
 						remove_inventory(LIKOER_INV);
 						obj->add_inventar(LIKOER2_INV, &room_blk);
@@ -474,15 +474,15 @@ int16 Room40::use_haendler() {
 				det->del_static_ani(5);
 				det->set_static_ani(3, -1);
 				start_aad_wait(211, -1);
-				out->ausblenden(0);
-				out->set_teilpalette(pal, 255, 1);
+				_G(out)->ausblenden(0);
+				_G(out)->set_teilpalette(pal, 255, 1);
 				start_aad_wait(212, -1);
-				out->ausblenden(0);
+				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 				flags.NoScroll = false;
-				out->setze_zeiger(nullptr);
-				out->cls();
+				_G(out)->setze_zeiger(nullptr);
+				_G(out)->cls();
 				switch_room(28);
 				SetUpScreenFunc = setup_func;
 
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 85a5ed2614b..ad82633bcac 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -34,7 +34,7 @@ void Room43::night_small() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	sndPlayer->stopMod();
+	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
@@ -71,7 +71,7 @@ void Room43::catch_pg() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(43);
-	sndPlayer->stopMod();
+	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
 	flags.NoScroll = true;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 6ad4fb45c6c..cfb14526321 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -131,8 +131,8 @@ void Room46::bodo() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065, CFO_MODE);
-	out->setze_zeiger(nullptr);
-	out->cls();
+	_G(out)->setze_zeiger(nullptr);
+	_G(out)->cls();
 	register_cutscene(16);
 	
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -151,12 +151,12 @@ void Room46::bodo() {
 
 void Room46::kloppe() {
 	for (int16 i = 0; i < 4; i++) {
-		mem->file->select_pool_item(Ci.Handle, FCUT_065);
+		_G(mem)->file->select_pool_item(Ci.Handle, FCUT_065);
 
 		flc->custom_play(&Ci);
 		
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		start_aad(244 + i, -1);
 		int16 delay = _G(spieler).DelaySpeed * 50;
 		atds->print_aad(0, 0);
@@ -166,18 +166,18 @@ void Room46::kloppe() {
 			continue;
 		}
 		
-		while (in->get_switch_code() == 0 && delay) {
+		while (_G(in)->get_switch_code() == 0 && delay) {
 			--delay;
 			SHOULD_QUIT_RETURN;
 		}
 	}
 
-	mem->file->select_pool_item(Ci.Handle, 66);
+	_G(mem)->file->select_pool_item(Ci.Handle, 66);
 	flc->custom_play(&Ci);
-	sndPlayer->fadeOut(0);
-	out->cls();
+	_G(sndPlayer)->fadeOut(0);
+	_G(out)->cls();
 
-	while (sndPlayer->musicPlaying() && !SHOULD_QUIT) {
+	while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT) {
 		EVENTS_UPDATE;
 	}
 }
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 886e60446d7..7e8f7b44f3f 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -46,8 +46,8 @@ void Room50::entry(int16 eib_nr) {
 		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
 		set_person_pos(92, 123, P_CHEWY, P_LEFT);
 		start_aad_wait(510, -1);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(108, 0);
 		show_cur();
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5f2b63e6251..90487c21d2e 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -143,7 +143,7 @@ void Room51::setup_func() {
 
 		det->set_static_pos(17, _tmpx, _tmpy, false, false);
 
-		if ((minfo.button == 1 || in->get_switch_code() == 28) && !_flag) {
+		if ((minfo.button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			det->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
 			start_detail_wait(8, 1, ANI_VOR);
@@ -170,8 +170,8 @@ void Room51::setup_func() {
 				start_aad_wait(514, -1);
 				wait_show_screen(5);
 				flags.NoPalAfterFlc = true;
-				out->setze_zeiger(nullptr);
-				out->cls();
+				_G(out)->setze_zeiger(nullptr);
+				_G(out)->cls();
 				flic_cut(115, 0);
 				register_cutscene(28);
 				
@@ -255,10 +255,10 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(spieler).R51KillerWeg = true;
 					start_aad_wait(290, -1);
 					g_engine->_sound->stopSound(0);
-					out->ausblenden(1);
-					out->setze_zeiger(nullptr);
-					out->cls();
-					out->einblenden(pal, 0);
+					_G(out)->ausblenden(1);
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
+					_G(out)->einblenden(pal, 0);
 					flags.NoPalAfterFlc = true;
 					flc->set_flic_user_function(cut_serv);
 					det->show_static_spr(16);
@@ -284,8 +284,8 @@ int16 Room51::use_door(int16 txt_nr) {
 		case 331:
 		case 334:
 			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			flags.NoPalAfterFlc = true;
 			flic_cut(114, 0);
 			set_person_pos(115, 144, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 08379552e1e..715d4680b01 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -120,8 +120,8 @@ void Room56::entry() {
 				atds->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(spieler).room_e_obj[137].Attribut = 3;
 				if (_G(spieler).flags33_80) {
-					out->setze_zeiger(nullptr);
-					out->cls();
+					_G(out)->setze_zeiger(nullptr);
+					_G(out)->cls();
 					flic_cut(113, CFO_MODE);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
 					load_chewy_taf(CHEWY_NORMAL);
@@ -160,20 +160,20 @@ void Room56::entry() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 		_G(spieler).r88DestRoom = 82;
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(116, CFO_MODE);
 		register_cutscene(21);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
 		switch_room(66);
 		break;
 	case 2:
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flic_cut(110, CFO_MODE);
 		_G(spieler).flags34_20 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
@@ -306,7 +306,7 @@ int16 Room56::use_kneipe() {
 				start_aad_wait(307, -1);
 				det->stop_detail(10);
 				g_engine->_sound->playSound(10, 0);
-				out->ausblenden(0);
+				_G(out)->ausblenden(0);
 				set_up_screen(DO_SETUP);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				_G(spieler).PersonHide[P_HOWARD] = false;
@@ -350,8 +350,8 @@ int16 Room56::use_kneipe() {
 		_G(maus_links_click) = false;
 		auto_move(4, P_CHEWY);
 		start_aad_wait(521, -1);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flc->set_custom_user_function(proc1);
 		flic_cut(112, CFO_MODE);
@@ -370,7 +370,7 @@ int16 Room56::use_kneipe() {
 int16 Room56::proc1(int16 key) {
 	int16 retVal = 0;
 
-	if (in->get_switch_code() == 1)
+	if (_G(in)->get_switch_code() == 1)
 		retVal = -1;
 
 	return retVal;
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 63daed08029..270f05dd24e 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -144,7 +144,7 @@ void Room63::bork_platt() {
 	start_detail_wait(4, 1, ANI_VOR);
 	det->show_static_spr(13);
 	start_aad_wait(361, -1);
-	out->cls();
+	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(FCUT_079, CFO_MODE);
 	fx_blend = BLEND3;
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index b0369caee23..7b20850ebab 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -64,7 +64,7 @@ int16 Room64::cut_sev(int16 frame) {
 	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
 	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
-	out->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
+	_G(out)->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 61dfe1f6c92..48eeefcca1c 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -105,7 +105,7 @@ void Room68::setup_func() {
 				g_engine->_sound->playSound(_G(r68HohesC));
 				det->start_detail(_G(r68HohesC), 255, ANI_VOR);
 
-				while (sndPlayer->getSampleStatus(1) == 4)
+				while (_G(sndPlayer)->getSampleStatus(1) == 4)
 					set_up_screen(DO_SETUP);
 				det->stop_detail(_G(r68HohesC));
 			} else {
@@ -347,7 +347,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		start_aad_wait(389, -1);
 	else {
 		if (_G(spieler).DisplayText == 0)
-			sndPlayer->fadeOut(5);
+			_G(sndPlayer)->fadeOut(5);
 		
 		SetUpScreenFunc = nullptr;
 		del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 0b89b35f905..8c8893a1e9e 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -191,13 +191,13 @@ int Room76::proc7() {
 		invent_2_slot(106);
 		invent_2_slot(105);
 		start_aad_wait(444, -1);
-		out->ausblenden(0);
-		out->set_teilpalette(pal, 255, 1);
+		_G(out)->ausblenden(0);
+		_G(out)->set_teilpalette(pal, 255, 1);
 		start_aad_wait(443, -1);
 		_G(spieler).scrollx = 0;
 		fx_blend = BLEND3;
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		det->set_static_ani(2, -1);
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index f345cde572d..b74989ad658 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -196,8 +196,8 @@ int Room82::proc6() {
 
 	if (_G(spieler).flags30_10) {
 		start_aad_wait(450, -1);
-		out->ausblenden(0);
-		out->set_teilpalette(pal, 255, 1);
+		_G(out)->ausblenden(0);
+		_G(out)->set_teilpalette(pal, 255, 1);
 		atds->enableEvents(false);
 		start_aad_wait(598, -1);
 		atds->enableEvents(true);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 6d67f9c6dc0..28813e6fe8c 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -85,8 +85,8 @@ void Room85::entry(int16 eib_nr) {
 		det->show_static_spr(6);
 		start_aad_wait(474, -1);
 		flic_cut(90, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(91, CFO_MODE);
 		det->hide_static_spr(6);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 4e480dffb46..87dd9e0ebfb 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -191,8 +191,8 @@ void Room86::proc3(bool cond) {
 		set_up_screen(NO_SETUP);
 		det->set_static_pos(0, 352, destY, false, false);
 		destY += deltaY;
-		out->setze_zeiger(nullptr);
-		out->back2screen(workpage);
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->back2screen(workpage);
 	}
 
 	g_engine->_sound->stopSound(1);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 75585646a27..2ba0abc84e1 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -98,12 +98,12 @@ int Room88::proc3() {
 		hide_cur();
 		if (_G(spieler).flags32_10) {
 			start_aad_wait(480, -1);
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			flags.NoPalAfterFlc = true;
 			flic_cut(87, CFO_MODE);
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
 			switch_room(84);
 		} else {
@@ -120,18 +120,18 @@ int Room88::proc3() {
 			start_detail_wait(aniNr, 1, ANI_GO);
 		}
 
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(88, CFO_MODE);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).flags32_1 = true;
-		out->raster_col(0, 0, 0, 0);
+		_G(out)->raster_col(0, 0, 0, 0);
 		switch_room(80);
 		hide_cur();
 		start_detail_wait(1, 1, ANI_VOR);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(86, CFO_MODE);
 		register_cutscene(24);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 1b76f027bea..93c00768390 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -59,12 +59,12 @@ void Room89::entry() {
 		_G(spieler).SVal2 = 537;
 		switch_room(92);
 		start_aad_wait(490, -1);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(118, CFO_MODE);
 		_G(spieler).SVal1 = 89;
@@ -78,69 +78,69 @@ void Room89::entry() {
 		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
 		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
 		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(117, CFO_MODE);
 		register_cutscene(35);
 
 		fx_blend = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(119, CFO_MODE);
 
 		// Squash screen into a single point at the center
 		int edi = -20;
 		int var24 = 0;
-		out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
-			out->setze_zeiger(workptr);
-			out->cls();
-			out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
-			out->setze_zeiger(nullptr);
-			out->back2screen(workpage);
+			_G(out)->setze_zeiger(workptr);
+			_G(out)->cls();
+			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->back2screen(workpage);
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		// Unsquish out thanks for playing screen
-		out->setze_zeiger(workptr);
-		out->cls();
-		out->printxy(70, 80, 15, 0, 0, "Thank you for playing");
-		out->printxy(70, 100, 15, 0, 0, "  CHEWY ESC from F5");
-		out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->cls();
+		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
+		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY ESC from F5");
+		_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
 		edi = -300;
 		int var30 = -200;
 
 		for (int esi = 0; esi < 100; ++esi) {
 			edi += 3;
 			var30 += 2;
-			out->setze_zeiger(workptr);
-			out->cls();
-			out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
-			out->setze_zeiger(nullptr);
-			out->back2screen(workpage);
+			_G(out)->setze_zeiger(workptr);
+			_G(out)->cls();
+			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->back2screen(workpage);
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		g_events->delay(3000);
-		out->ausblenden(2);
-		out->setze_zeiger(workptr);
-		out->cls();
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->ausblenden(2);
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 
 		Dialogs::Credits::execute();
 		
 		_G(spieler).SVal4 = 1;
-		out->ausblenden(2);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->ausblenden(2);
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 	}
 
 	_G(spieler).SVal2 = 0;
@@ -176,8 +176,8 @@ int Room89::proc2() {
 	_G(spieler).SVal2 = 489;
 	switch_room(92);
 	start_aad_wait(490, -1);
-	out->setze_zeiger(nullptr);
-	out->cls();
+	_G(out)->setze_zeiger(nullptr);
+	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(102, CFO_MODE);
 	register_cutscene(26);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 8587c27764f..483dcb7a741 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -332,8 +332,8 @@ int Room90::useSurimyOnWreck() {
 	cur_2_inventory();
 	auto_move(6, P_CHEWY);
 	_G(maus_links_click) = false;
-	out->setze_zeiger(nullptr);
-	out->cls();
+	_G(out)->setze_zeiger(nullptr);
+	_G(out)->cls();
 	flic_cut(109, CFO_MODE);
 	register_cutscene(29);
 
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index d4443b507f2..a9c8617e1e9 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -37,12 +37,12 @@ void Room92::entry() {
 	start_aad_wait(_G(spieler).SVal2, -1);
 	switch (_G(spieler).SVal2) {
 	case 487:
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
 		show_person();
 		switch_room(_G(spieler).SVal1);
@@ -50,21 +50,21 @@ void Room92::entry() {
 	case 488:
 		flags.StaticUseTxt = true;
 		flic_cut(106, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(105, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(104, CFO_MODE);
 		register_cutscene(27);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
 		_G(spieler).flags33_8 = true;
 		show_person();
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 2aebf719196..78180dfa515 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -53,8 +53,8 @@ void Room94::entry() {
 		_G(spieler).scrollx = 0;
 		set_person_pos(156, 149, P_CHEWY, P_RIGHT);
 		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flic_cut(120, CFO_MODE);
 		register_cutscene(30);
 		fx_blend = BLEND_NONE;
@@ -72,8 +72,8 @@ void Room94::entry() {
 		if (_G(spieler).flags37_40) {
 			_G(spieler).flags37_40 = true;
 			flags.NoScroll = true;
-			out->setze_zeiger(nullptr);
-			out->cls();
+			_G(out)->setze_zeiger(nullptr);
+			_G(out)->cls();
 			flic_cut(121, CFO_MODE);
 			register_cutscene(32);
 
@@ -133,8 +133,8 @@ int Room94::giveGhostBottle() {
 	auto_move(2, P_CHEWY);
 	auto_scroll(216, 0);
 	del_inventar(_G(spieler).AkInvent);
-	out->setze_zeiger(nullptr);
-	out->cls();
+	_G(out)->setze_zeiger(nullptr);
+	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(62, CFO_MODE);
 	fx_blend = BLEND3;
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 4dcd32fd61b..235b0821c4c 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -107,8 +107,8 @@ int Room95::proc2() {
 	}
 
 	if (_G(spieler).flags35_20) {
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
 		flic_cut(133, CFO_MODE);
 		register_cutscene(33);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 7225ad9e20c..f166fc47c4e 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -106,8 +106,8 @@ void Room97::entry() {
 
 	if (_G(spieler).flags37_8) {
 		hide_cur();
-		out->setze_zeiger(nullptr);
-		out->cls();
+		_G(out)->setze_zeiger(nullptr);
+		_G(out)->cls();
 
 		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
 		_G(spieler).SVal2 = 0;
@@ -684,7 +684,7 @@ void Room97::sensorAnim() {
 	
 	while (det->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
-		if (minfo.button == 1 || in->get_switch_code() == 28) {
+		if (minfo.button == 1 || _G(in)->get_switch_code() == 28) {
 			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index e0e8f5b26a9..3bbdf2c454d 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -90,7 +90,7 @@ void sprite_engine() {
 			break;
 
 		case ZOBJ_INVENTAR:
-			out->sprite_set(inv_spr[nr],
+			_G(out)->sprite_set(inv_spr[nr],
 			                 _G(spieler).room_m_obj[nr].X - _G(spieler).scrollx,
 			                 _G(spieler).room_m_obj[nr].Y - _G(spieler).scrolly, 0);
 			break;
@@ -104,7 +104,7 @@ void sprite_engine() {
 					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak,
 					          (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
 
-					out->scale_set(chewy->image[spr_nr], x, y,
+					_G(out)->scale_set(chewy->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
 					                spieler_vector[P_CHEWY].Yzoom,
 					                scr_width);
@@ -119,7 +119,7 @@ void sprite_engine() {
 					          (int16)room->_roomInfo->ZoomFak,
 					          &spieler_vector[P_CHEWY]);
 
-					out->scale_set(spz_tinfo->image[spr_nr], x, y,
+					_G(out)->scale_set(spz_tinfo->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
 					                spieler_vector[P_CHEWY].Yzoom,
 					                scr_width);
@@ -149,14 +149,14 @@ void sprite_engine() {
 				          _G(spieler).ZoomXy[p_nr][0],
 				          _G(spieler).ZoomXy[p_nr][1],
 				          &spieler_vector[p_nr]);
-				out->scale_set(ts_info->image[spr_nr], x, y,
+				_G(out)->scale_set(ts_info->image[spr_nr], x, y,
 				                spieler_vector[p_nr].Xzoom,
 				                spieler_vector[p_nr].Yzoom,
 				                scr_width);
 			}
 			break;
 		case ZOBJ_PROGANI:
-			out->sprite_set(spr_info[nr].Image,
+			_G(out)->sprite_set(spr_info[nr].Image,
 			                 spr_info[nr].X - _G(spieler).scrollx,
 			                 spr_info[nr].Y - _G(spieler).scrolly, 0);
 			break;
@@ -169,7 +169,7 @@ void sprite_engine() {
 			          mov_phasen[nr].ZoomFak,
 			          mov_phasen[nr].ZoomFak,
 			          &auto_mov_vector[nr]);
-			out->scale_set(room_blk.DetImage[spr_nr],
+			_G(out)->scale_set(room_blk.DetImage[spr_nr],
 			                auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
 			                auto_mov_vector[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
 			                auto_mov_vector[nr].Xzoom,
@@ -1025,7 +1025,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 			if (spz_tinfo)
 				free((char *)spz_tinfo);
 			spz_akt_id = ani_id;
-			spz_tinfo = mem->taf_seq_adr(spr_start, spr_anz);
+			spz_tinfo = _G(mem)->taf_seq_adr(spr_start, spr_anz);
 		}
 
 		for (i = 0; i < spr_anz; i++) {
@@ -1089,7 +1089,7 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
 		PersonAni[p_nr] = ani_id;
 		if (PersonTaf[p_nr])
 			free((char *)PersonTaf[p_nr]);
-		PersonTaf[p_nr] = mem->taf_seq_adr(ani_start, ani_anz);
+		PersonTaf[p_nr] = _G(mem)->taf_seq_adr(ani_start, ani_anz);
 		spieler_vector[p_nr].PhNr = 0;
 		spieler_vector[p_nr].PhAnz = ani_anz;
 	}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index b31b707cf6b..589f2d32670 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2179,15 +2179,15 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrolly = 0;
 
 		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, GBOOK);
-		out->setze_zeiger(workptr);
-		out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		out->back2screen(workpage);
+		_G(out)->setze_zeiger(workptr);
+		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->back2screen(workpage);
 
-		while (in->get_switch_code() != ESC) {
+		while (_G(in)->get_switch_code() != ESC) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}
-		while (in->get_switch_code() != 0) {
+		while (_G(in)->get_switch_code() != 0) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}


Commit: b48cbcfaab24a97feb2726ed2a6c9210822b7c52
    https://github.com/scummvm/scummvm/commit/b48cbcfaab24a97feb2726ed2a6c9210822b7c52
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:24-08:00

Commit Message:
CHEWY: Move mcga.cpp globals to Globals

Changed paths:
    engines/chewy/data.h
    engines/chewy/global.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp


diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 948d3b0c3c8..356a325f3e3 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -30,7 +30,7 @@ namespace Chewy {
 
 class Data {
 private:
-	char _filename[MAXPATH];
+	char _filename[MAXPATH] = { 0 };
 
 public:
 	Data();
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 9598f97675f..d2d691368c6 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -140,6 +140,15 @@ public:
 	int16 _modul = 0;
 	int16 _fcode = 0;
 
+	// mcga.cpp
+	byte _saved_palette[PALETTE_SIZE] = { 0 };
+	bool _screenHasDefault = false;
+	byte *_screenDefaultP = nullptr;
+	int _spriteWidth = 0;
+	byte *_fontAddr = nullptr;
+	size_t _fontWidth = 0, _fontHeight = 0;
+	int _fontFirst = 0, _fontLast = 0;
+
 	// mcga_graphics.cpp
 	int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
 	int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 310d10ae6c2..0771525ad81 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -31,26 +31,19 @@ namespace Chewy {
 #define SCREEN_S _G(currentScreen)
 #define SCREEN _G(currentScreen).getPixels()
 
-static byte saved_palette[PALETTE_SIZE];
-static bool screenHasDefault;
-static byte *screenDefaultP;
-static int spriteWidth;
-static byte *fontAddr;
-static size_t fontWidth, fontHeight;
-int fontFirst, fontLast;
 
 void init_mcga() {
 	_G(currentScreen) = (byte *)g_screen->getPixels();
-	screenHasDefault = false;
-	screenDefaultP = nullptr;
-	spriteWidth = 0;
+	_G(screenHasDefault) = false;
+	_G(screenDefaultP) = nullptr;
+	_G(spriteWidth) = 0;
 }
 
 void set_pointer(byte *ptr) {
 	if (ptr) {
 		_G(currentScreen) = ptr;
-	} else if (screenHasDefault) {
-		_G(currentScreen) = screenDefaultP;
+	} else if (_G(screenHasDefault)) {
+		_G(currentScreen) = _G(screenDefaultP);
 	} else {
 		_G(currentScreen) = (byte *)g_screen->getPixels();
 	}
@@ -78,13 +71,13 @@ void setpalette(const byte *palette) {
 
 void save_palette(byte *palette) {
 	if (!palette)
-		palette = saved_palette;
+		palette = _G(saved_palette);
 
 	g_system->getPaletteManager()->grabPalette(palette, 0, PALETTE_COUNT);
 }
 
 void restore_palette() {
-	setpalette(saved_palette);
+	setpalette(_G(saved_palette));
 }
 
 void rastercol(int16 color, int16 r, int16 g, int16 b) {
@@ -254,7 +247,7 @@ void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth) {
 	int height = *((const int16 *)sptr);
 	sptr += 2;
 	const byte *srcP = sptr;
-	spriteWidth = width;
+	_G(spriteWidth) = width;
 
 	if (!(height >= 1 && width >= 4))
 		return;
@@ -263,7 +256,7 @@ void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth) {
 	if (!mspr_set_mcga_clip(x, y, pitch, width, height, srcP, destP))
 		return;
 	int destPitchRemainder = pitch - width;
-	int srcPitchRemainder = spriteWidth - width;
+	int srcPitchRemainder = _G(spriteWidth) - width;
 
 	for (int row = 0; row < height; ++row,
 			srcP += srcPitchRemainder, destP += destPitchRemainder) {
@@ -275,11 +268,11 @@ void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth) {
 }
 
 void setfont(byte *addr, int16 width, int16 height, int16 first, int16 last) {
-	fontAddr = addr;
-	fontWidth = width;
-	fontHeight = height;
-	fontFirst = first;
-	fontLast = last;
+	_G(fontAddr) = addr;
+	_G(fontWidth) = width;
+	_G(fontHeight) = height;
+	_G(fontFirst) = first;
+	_G(fontLast) = last;
 }
 
 void upd_scr() {
@@ -293,17 +286,17 @@ void vors() {
 }
 
 void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
-	size_t charSize = (fontWidth / 8) * fontHeight;
-	byte *charSrcP = fontAddr + (c - fontFirst) * charSize;
+	size_t charSize = (_G(fontWidth) / 8) * _G(fontHeight);
+	byte *charSrcP = _G(fontAddr) + (c - _G(fontFirst)) * charSize;
 
 	if (scrWidth == 0)
 		scrWidth = SCREEN_WIDTH;
 	byte *destP = SCREEN + (y * scrWidth) + x;
 
-	for (size_t yp = 0; yp < fontHeight; ++yp, destP += scrWidth) {
+	for (size_t yp = 0; yp < _G(fontHeight); ++yp, destP += scrWidth) {
 		byte *destLineP = destP;
 
-		for (size_t byteCtr = 0; byteCtr < (fontWidth / 8); ++byteCtr) {
+		for (size_t byteCtr = 0; byteCtr < (_G(fontWidth) / 8); ++byteCtr) {
 			byte bits = *charSrcP++;
 
 			// Iterate through the 8 bits
@@ -318,7 +311,7 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 
 	if (SCREEN == (byte *)g_screen->getPixels())
 		g_screen->addDirtyRect(Common::Rect(
-			x, y, x + fontWidth, y + fontHeight));
+			x, y, x + _G(fontWidth), y + _G(fontHeight)));
 }
 
 void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
@@ -342,8 +335,8 @@ static void setXVals() {
 		spriteXVal1 = 0;
 		spriteXVal2 = 1;
 	} else {
-		spriteXVal1 = spriteWidth / spriteDeltaX2;
-		spriteXVal2 = 1000 * (spriteWidth % spriteDeltaX2);
+		spriteXVal1 = _G(spriteWidth) / spriteDeltaX2;
+		spriteXVal2 = 1000 * (_G(spriteWidth) % spriteDeltaX2);
 		if (spriteDeltaX2)
 			spriteXVal2 /= spriteDeltaX2;
 	}
@@ -369,12 +362,12 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 		--yCount;
 		if (yCount >= 1) {
 			for (int yc = 0, countY = spriteYVal2; yc < yCount; ++yc) {
-				source += spriteWidth * spriteYVal1;
+				source += _G(spriteWidth) * spriteYVal1;
 				dest += SCREEN_WIDTH;
 
 				while (countY > 1000) {
 					countY -= 1000;
-					source += spriteWidth;
+					source += _G(spriteWidth);
 				}
 			}
 		}
@@ -424,12 +417,12 @@ void clip(byte *&source, byte *&dest, int16 &x, int16 &y) {
 }
 
 void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 scrWidth) {
-	spriteWidth = ((int16 *)source)[0];
+	_G(spriteWidth) = ((int16 *)source)[0];
 	spriteHeight = ((int16 *)source)[1];
 	source += 4;
 
 	spriteDeltaX1 = xDiff;
-	spriteDeltaX2 = spriteWidth + xDiff;
+	spriteDeltaX2 = _G(spriteWidth) + xDiff;
 	spriteDeltaY1 = yDiff;
 	spriteDeltaY2 = spriteHeight + yDiff;
 
@@ -467,13 +460,13 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 yDiff, int16 sc
 			scrP = scrLine + SCREEN_WIDTH;
 
 			for (int ySkip = 0; ySkip < spriteYVal1; ++ySkip) {
-				source += spriteWidth;
+				source += _G(spriteWidth);
 			}
 
 			countY += spriteYVal2;
 			while (countY > 1000) {
 				countY -= 1000;
-				source += spriteWidth;
+				source += _G(spriteWidth);
 			}
 		}
 	}
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 628ced23a21..b736430b952 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -27,8 +27,6 @@
 
 namespace Chewy {
 
-extern int fontFirst, fontLast;
-
 void init_mcga();
 
 void set_pointer(byte *ptr);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 6d31700dce6..1a44010a5c2 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -422,7 +422,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 		zeichen = string[i];
 		++i;
 
-		if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
+		if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
 			if (zeichen == '%') {
 				zeichen = string[i];
 				++i;
@@ -862,11 +862,11 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 				break;
 
 			default :
-				if (nextChar >= fontFirst)
+				if (nextChar >= _G(fontFirst))
 					putz(nextChar, fgCol, bgCol, scrwidth);
 				break;
 			}
-		} else if ((nextChar >= fontFirst) && (nextChar <= fontLast)) {
+		} else if ((nextChar >= _G(fontFirst)) && (nextChar <= _G(fontLast))) {
 			if (nextChar != '%') {
 				putz(nextChar, fgCol, bgCol, scrwidth);
 				vors();
@@ -967,7 +967,7 @@ void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
 	do {
 		zeichen = string[i];
 		++i;
-		if ((zeichen >= fontFirst) && (zeichen <= fontLast)) {
+		if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
 			putz(zeichen, fgCol, bgCol, scrwidth);
 			vors();
 		}
@@ -1015,13 +1015,13 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 				break;
 
 			default :
-				if (zeichen >= fontFirst) {
+				if (zeichen >= _G(fontFirst)) {
 					putz(zeichen, fgCol, bgCol, scrwidth);
 					vors();
 				}
 				break;
 			}
-		} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 0)) {
+		} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 0)) {
 			if (zeichen != '%') {
 				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
@@ -1155,12 +1155,12 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 				break;
 
 			default :
-				if (zeichen >= fontFirst)
+				if (zeichen >= _G(fontFirst))
 					putz(zeichen, fgCol, bgCol, scrwidth);
 				break;
 			}
 		}
-		else if ((zeichen >= fontFirst) && (zeichen <= fontLast)) {
+		else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
 			if (zeichen != '%') {
 				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
@@ -1282,7 +1282,7 @@ void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int1
 			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
 		}
-	} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
+	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
 		putcxy(x, y, zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}
@@ -1315,7 +1315,7 @@ void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwi
 			putz(32, fgCol, bgCol, scrwidth);
 			break;
 		}
-	} else if ((zeichen >= fontFirst) && (zeichen <= fontLast) && (zeichen != 127)) {
+	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
 		putz(zeichen, fgCol, bgCol, scrwidth);
 		vors();
 	}


Commit: 643cda6085659d33f60337743391757224fbec8e
    https://github.com/scummvm/scummvm/commit/643cda6085659d33f60337743391757224fbec8e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:24-08:00

Commit Message:
CHEWY: Move menus.cpp globals to Globals

Changed paths:
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/global.h
    engines/chewy/menus.cpp
    engines/chewy/menus.h


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index a06d2066772..97c46e60cfc 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -174,9 +174,9 @@ void Inventory::menu() {
 
 	ret_look = -1;
 	menu_first = false;
-	show_invent_menu = 1;
+	_G(show_invent_menu) = 1;
 
-	while (show_invent_menu == 1 && !SHOULD_QUIT) {
+	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
 		if (!minfo.button)
 			maus_flag = 0;
 		if (minfo.button == 1 || kbinfo.key_code == ENTER || keyVal) {
@@ -323,7 +323,7 @@ void Inventory::menu() {
 				} else {
 					if (menu_flag1 != MENU_EINBLENDEN) {
 						menu_flag1 = MENU_AUSBLENDEN;
-						show_invent_menu = false;
+						_G(show_invent_menu) = false;
 					}
 				}
 				break;
@@ -366,7 +366,7 @@ void Inventory::menu() {
 			menu_first = true;
 		}
 
-		if (show_invent_menu != 2) {
+		if (_G(show_invent_menu) != 2) {
 			set_up_screen(NO_SETUP);
 			_G(cur)->move(minfo.x, minfo.y);
 			_G(cur)->show_cur();
@@ -403,7 +403,7 @@ void Inventory::menu() {
 	flags.InventMenu = false;
 	flags.AutoAniPlay = ani_tmp;
 	_G(spieler).DispFlag = disp_tmp;
-	menu_display = tmp_menu;
+	menu_display = _G(tmp_menu);
 	flags.StopAutoObj = false;
 }
 
@@ -646,13 +646,13 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 			break;
 
 		case CUTMAG_INV:
-			show_invent_menu = 2;
+			_G(show_invent_menu) = 2;
 			ret_val = true;
 			Rooms::Room58::look_cut_mag(58);
 			break;
 
 		case SPARK_INV:
-			show_invent_menu = 2;
+			_G(show_invent_menu) = 2;
 			ret_val = true;
 			save_person_rnr();
 			Rooms::Room58::look_cut_mag(60);
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index d2d691368c6..217078e22ed 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -153,6 +153,11 @@ public:
 	int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
 	int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
 	int16 _scr_w = 0, _scr_h = SCREEN_HEIGHT;
+
+	// menus.cpp
+	int8 _m_flip = 0;
+	int16 _tmp_menu = 0;
+	int16 _show_invent_menu = 0;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 94efc82e378..5e21f4ac879 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -29,19 +29,15 @@
 
 namespace Chewy {
 
-char m_flip = 0;
-int16 tmp_menu;
-int16 show_invent_menu;
-
 void plot_main_menu() {
 	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
 	int16 i;
 	int16 zoomx, zoomy;
 	int16 *korrektur;
 
-	if (menu_item != tmp_menu) {
-		m_flip = 0;
-		tmp_menu = menu_item;
+	if (menu_item != _G(tmp_menu)) {
+		_G(m_flip) = 0;
+		_G(tmp_menu) = menu_item;
 	}
 
 	maus_mov_menu();
@@ -71,8 +67,8 @@ void plot_main_menu() {
 
 	zoomx = 16;
 	zoomy = 16;
-	++m_flip;
-	if (m_flip < 12 * (_G(spieler).DelaySpeed + 1)) {
+	++_G(m_flip);
+	if (_G(m_flip) < 12 * (_G(spieler).DelaySpeed + 1)) {
 		int deltaX = 0;
 		if (menu_item == CUR_SAVE)
 			deltaX = -40;
@@ -85,8 +81,8 @@ void plot_main_menu() {
 		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
 			zoomx, zoomy, 0);
 	} else {
-		if (m_flip > 15 * (_G(spieler).DelaySpeed + 1))
-			m_flip = 0;
+		if (_G(m_flip) > 15 * (_G(spieler).DelaySpeed + 1))
+			_G(m_flip) = 0;
 	}
 }
 
diff --git a/engines/chewy/menus.h b/engines/chewy/menus.h
index f1385b63f68..6666d2e15a0 100644
--- a/engines/chewy/menus.h
+++ b/engines/chewy/menus.h
@@ -31,9 +31,6 @@ namespace Chewy {
 #define MENU_IOMENU 4
 #define MENU_MAIN 5
 
-extern int16 tmp_menu;
-extern int16 show_invent_menu;
-
 } // namespace Chewy
 
 #endif


Commit: 858998106d5305d74303b59ecd8686bf8257e2b2
    https://github.com/scummvm/scummvm/commit/858998106d5305d74303b59ecd8686bf8257e2b2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:24-08:00

Commit Message:
CHEWY: Move various globals to Globals

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/events.cpp
    engines/chewy/global.h
    engines/chewy/r_event.cpp
    engines/chewy/sprite.cpp
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 925e3f82607..87fca8016dc 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -67,8 +67,8 @@ ChewyEngine::~ChewyEngine() {
 
 void ChewyEngine::initialize() {
 	g_screen = _screen = new Graphics::Screen();
-	_events = new EventsManager(_screen);
 	_globals = new Globals();
+	_events = new EventsManager(_screen);
 	_sound = new Sound(_mixer);
 
 	_tempFiles.add(ADSH_TMP, 5710);
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index de65442fc18..82bf83422c0 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -39,15 +39,15 @@ EventsManager::~EventsManager() {
 
 
 void EventsManager::init_timer_handler() {
-	timer_int = true;
-	timer_count = 0;
+	_G(timer_int) = true;
+	_G(timer_count) = 0;
 
 	addTimer(timer_handler, (uint32)(1000 / 18.2));
 }
 
 void EventsManager::timer_handler() {
-	if (!timer_suspend)
-		++timer_count;
+	if (!_G(timer_suspend))
+		++_G(timer_count);
 }
 
 void EventsManager::handleEvent(const Common::Event &event) {
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 217078e22ed..43c7387b3af 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -38,6 +38,7 @@
 
 namespace Chewy {
 
+#define MAX_ZOBJ 60
 #define MAX_RAND_NO_USE 6
 #define R45_MAX_PERSON 9
 
@@ -69,15 +70,18 @@ class Globals {
 		byte *getPixels() { return (byte *)Graphics::Surface::getPixels(); }
 	};
 
+	struct ZObjSort {
+		uint8 ObjArt;
+		uint8 ObjNr;
+		int16 ObjZ;
+	};
 public:
 	Globals();
 	~Globals();
 public:
 	int16 _ani_invent_anf[3] = { 38, 39, 21 };
 	int16 _ani_invent_delay[3][2] = {
-		{12, 12},
-		{10, 10},
-		{11, 11},
+		{ 12, 12 }, { 10, 10 }, { 11, 11 }
 	};
 	int16 _ani_count[3] = { 38, 39, 21 };
 	int16 _timer_nr[MAX_TIMER_OBJ] = { 0 };
@@ -158,6 +162,20 @@ public:
 	int8 _m_flip = 0;
 	int16 _tmp_menu = 0;
 	int16 _show_invent_menu = 0;
+
+	// r_event.cpp
+	int16 _flic_val1 = 0, _flic_val2 = 0;
+
+	// sprite.cpp
+	int16 _z_count = 0;
+	ZObjSort _z_obj_sort[MAX_ZOBJ];
+	char _new_vector = false;
+	int16 _tmp_maus_links = 0;
+
+	// timer.cpp
+	bool _timer_int = false;
+	int _timer_count = 0;
+	bool _timer_suspend = false;
 };
 
 extern Globals *g_globals;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 9ba4b77a3cd..7d3345024d5 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -35,8 +35,6 @@ namespace Chewy {
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 
-static int16 flic_val1, flic_val2;
-
 void play_scene_ani(int16 nr, int16 mode) {
 #define ROOM_1_1 101
 #define ROOM_1_2 102
@@ -797,7 +795,7 @@ int16 flic_user_function(int16 keys) {
 	int ret;
 
 	if (atds->aad_get_status() != -1) {
-		switch (flic_val1) {
+		switch (_G(flic_val1)) {
 		case 579:
 		case 584:
 		case 588:
@@ -810,18 +808,18 @@ int16 flic_user_function(int16 keys) {
 	}
 
 	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (flic_val1 == 593 && keys == 35)
+	if (_G(flic_val1) == 593 && keys == 35)
 		atds->stop_aad();
-	if (flic_val1 == 594 && keys == 18)
+	if (_G(flic_val1) == 594 && keys == 18)
 		atds->stop_aad();
 
 	ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
-	if (flic_val2 == 140 && keys == 15)
+	if (_G(flic_val2) == 140 && keys == 15)
 		ret = -2;
-	if (flic_val2 == 144 && keys == 7)
+	if (_G(flic_val2) == 144 && keys == 7)
 		ret = -2;
-	if (flic_val2 == 145 || flic_val2 == 142 ||
-			flic_val2 == 141 || flic_val2 == 146) {
+	if (_G(flic_val2) == 145 || _G(flic_val2) == 142 ||
+			_G(flic_val2) == 141 || _G(flic_val2) == 146) {
 		if (atds->aad_get_status() == -1)
 			ret = -2;
 	}
@@ -866,20 +864,20 @@ static void flic_proc1() {
 			_G(out)->cls();
 		}
 
-		flic_val1 = 0;
+		_G(flic_val1) = 0;
 		if (VALS3[i] != -1) {
 			start_aad(VALS3[i], -1);
-			flic_val1 = VALS3[i];
+			_G(flic_val1) = VALS3[i];
 		}
 
 		bool flag;
 		do {
-			flic_val2 = VALS1[i];
+			_G(flic_val2) = VALS1[i];
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, flic_val2);
+			_G(mem)->file->select_pool_item(Ci.Handle, _G(flic_val2));
 			ret = flc->custom_play(&Ci);
 #else
-			g_engine->playVideo(flic_val2);
+			g_engine->playVideo(_G(flic_val2));
 #endif
 			flag = VALS4[i] && atds->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 3bbdf2c454d..cf332191973 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -33,18 +33,6 @@ namespace Chewy {
 #define ZOBJ_CHEWY 6
 #define ZOBJ_HOWARD 7
 #define ZOBJ_NICHELLE 8
-#define MAX_ZOBJ 60
-
-struct ZObjSort {
-	uint8 ObjArt;
-	uint8 ObjNr;
-	int16 ObjZ;
-};
-
-int16 z_count;
-ZObjSort z_obj_sort[MAX_ZOBJ];
-char new_vector = false;
-int16 tmp_maus_links;
 
 void sprite_engine() {
 	int16 zmin;
@@ -61,17 +49,17 @@ void sprite_engine() {
 	calc_z_ebene();
 	calc_person_ani();
 
-	for (i = 0; i < z_count; i++) {
+	for (i = 0; i < _G(z_count); i++) {
 		zmin = 3000;
-		for (j = 0; j < z_count; j++) {
-			if (z_obj_sort[j].ObjZ != 3000 && z_obj_sort[j].ObjZ < zmin) {
-				zmin = z_obj_sort[j].ObjZ;
+		for (j = 0; j < _G(z_count); j++) {
+			if (_G(z_obj_sort)[j].ObjZ != 3000 && _G(z_obj_sort)[j].ObjZ < zmin) {
+				zmin = _G(z_obj_sort)[j].ObjZ;
 				min_zeiger = j;
 			}
 		}
-		nr = (int16)z_obj_sort[min_zeiger].ObjNr;
+		nr = (int16)_G(z_obj_sort)[min_zeiger].ObjNr;
 
-		switch (z_obj_sort[min_zeiger].ObjArt) {
+		switch (_G(z_obj_sort)[min_zeiger].ObjArt) {
 		case ZOBJ_ANI_DETAIL:
 			if (Adi[nr].zoom) {
 
@@ -129,7 +117,7 @@ void sprite_engine() {
 
 		case ZOBJ_HOWARD:
 		case ZOBJ_NICHELLE:
-			p_nr = z_obj_sort[min_zeiger].ObjArt - 6;
+			p_nr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
 			if (!_G(spieler).PersonHide[p_nr]) {
 				if (!spz_ani[p_nr]) {
 					ts_info = PersonTaf[p_nr];
@@ -179,65 +167,65 @@ void sprite_engine() {
 		default:
 			break;
 		}
-		z_obj_sort[min_zeiger].ObjZ = 3000;
+		_G(z_obj_sort)[min_zeiger].ObjZ = 3000;
 	}
 }
 
 void calc_z_ebene() {
 	int16 i;
-	z_count = 0;
+	_G(z_count) = 0;
 
 	for (i = 0; i < MAX_PERSON; i++) {
 		if (_G(spieler).PersonRoomNr[P_CHEWY + i] == _G(spieler).PersonRoomNr[P_CHEWY] &&
 		        spieler_mi[P_CHEWY + i].Id != NO_MOV_OBJ) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_CHEWY + i;
-			z_obj_sort[z_count].ObjZ = spieler_vector[P_CHEWY + i].Xypos[1] +
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_CHEWY + i;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = spieler_vector[P_CHEWY + i].Xypos[1] +
 			                           spieler_mi[P_CHEWY + i].HotMovY
 			                           - abs(spieler_vector[P_CHEWY + i].Yzoom);
-			++z_count;
+			++_G(z_count);
 		}
 	}
 
 	for (i = 0; i < MAXDETAILS; i++) {
 		if (Sdi[i].SprNr != -1) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_STATIC_DETAIL;
-			z_obj_sort[z_count].ObjNr = i;
-			z_obj_sort[z_count].ObjZ = Sdi[i].z_ebene;
-			++z_count;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_STATIC_DETAIL;
+			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = Sdi[i].z_ebene;
+			++_G(z_count);
 		}
 		if (Adi[i].start_ani != -1) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_ANI_DETAIL;
-			z_obj_sort[z_count].ObjNr = i;
-			z_obj_sort[z_count].ObjZ = Adi[i].z_ebene;
-			++z_count;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_ANI_DETAIL;
+			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = Adi[i].z_ebene;
+			++_G(z_count);
 		}
 	}
 
 	for (i = 0; i < obj->mov_obj_room[0]; i++) {
 
 		if (_G(spieler).room_m_obj[obj->mov_obj_room[i + 1]].ZEbene < 2000) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_INVENTAR;
-			z_obj_sort[z_count].ObjNr = obj->mov_obj_room[i + 1];
-			z_obj_sort[z_count].ObjZ = _G(spieler).room_m_obj[obj->mov_obj_room[i + 1]].ZEbene;
-			++z_count;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_INVENTAR;
+			_G(z_obj_sort)[_G(z_count)].ObjNr = obj->mov_obj_room[i + 1];
+			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spieler).room_m_obj[obj->mov_obj_room[i + 1]].ZEbene;
+			++_G(z_count);
 		}
 	}
 
 	for (i = 0; i < MAX_PROG_ANI; i++) {
 		if (spr_info[i].ZEbene < 200) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_PROGANI;
-			z_obj_sort[z_count].ObjNr = i;
-			z_obj_sort[z_count].ObjZ = spr_info[i].ZEbene;
-			++z_count;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_PROGANI;
+			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = spr_info[i].ZEbene;
+			++_G(z_count);
 		}
 	}
 
 	for (i = 0; i < _G(auto_obj); i++) {
 		if (auto_mov_vector[i].Xypos[2] < 200) {
-			z_obj_sort[z_count].ObjArt = ZOBJ_AUTO_OBJ;
-			z_obj_sort[z_count].ObjNr = i;
-			z_obj_sort[z_count].ObjZ = auto_mov_vector[i].Xypos[2];
-			++z_count;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_AUTO_OBJ;
+			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = auto_mov_vector[i].Xypos[2];
+			++_G(z_count);
 		}
 	}
 }
@@ -353,18 +341,18 @@ void stop_person(int16 p_nr) {
 }
 
 void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	det->start_detail(ani_nr, rep, mode);
 	while (det->get_ani_status(ani_nr) && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 }
 
 void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	ani_detail_info *adi;
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	det->start_detail(ani_nr, rep, mode);
 	adi = det->get_ani_detail(ani_nr);
@@ -375,7 +363,7 @@ void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	while (det->get_ani_status(ani_nr) && adi->ani_count != frame && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 }
 
 void wait_detail(int16 det_nr) {
@@ -384,7 +372,7 @@ void wait_detail(int16 det_nr) {
 }
 
 void wait_show_screen(int16 frames) {
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	if (_G(spieler).DelaySpeed > 0)
 		frames *= _G(spieler).DelaySpeed;
@@ -393,12 +381,12 @@ void wait_show_screen(int16 frames) {
 			get_user_key(NO_SETUP);
 		set_up_screen(DO_SETUP);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 }
 
 void start_ani_block(int16 anz, const AniBlock *ab) {
 	int16 i;
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	for (i = 0; i < anz; i++) {
 		if (ab[i].Mode == ANI_WAIT)
@@ -406,12 +394,12 @@ void start_ani_block(int16 anz, const AniBlock *ab) {
 		else
 			det->start_detail(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 }
 
 void start_aad_wait(int16 dia_nr, int16 str_nr) {
 
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	talk_start_ani = -1;
 	talk_hide_static = -1;
@@ -420,7 +408,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -437,7 +425,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	int16 VocNr;
 	int16 vocx;
 	bool ret = false;
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 
 	if (!flags.AtsText) {
@@ -470,12 +458,12 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 	return ret;
 }
 
 void aad_wait(int16 str_nr) {
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	if (str_nr == -1) {
 		while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
@@ -486,7 +474,7 @@ void aad_wait(int16 str_nr) {
 			set_up_screen(DO_SETUP);
 		}
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -518,12 +506,12 @@ void start_ads_wait(int16 dia_nr) {
 }
 
 void wait_auto_obj(int16 nr) {
-	tmp_maus_links = _G(maus_links_click);
+	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	while (mov_phasen[nr].Repeat != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
-	_G(maus_links_click) = tmp_maus_links;
+	_G(maus_links_click) = _G(tmp_maus_links);
 }
 
 void stop_auto_obj(int16 nr) {
@@ -767,7 +755,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 								mi->XyzStart[1] = om->Xypos[1];
 								mov->get_mov_vector(mi->XyzStart, mi->Vorschub, om);
 								if (om->Xyvo[1] != 0) {
-									new_vector = true;
+									_G(new_vector) = true;
 									swap_if_l(&om->Xyvo[1], &om->Xyvo[0]);
 								}
 								get_phase(om, mi);
@@ -804,7 +792,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 							mi->XyzStart[1] = om->Xypos[1];
 							mov->get_mov_vector(mi->XyzStart, mi->Vorschub, om);
 							if (om->Xyvo[0] != 0) {
-								new_vector = true;
+								_G(new_vector) = true;
 								swap_if_l(&om->Xyvo[0], &om->Xyvo[1]);
 
 							}
@@ -823,8 +811,8 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 					om->Xypos[0] += tmpx;
 					om->Xypos[1] += tmpy;
 					om->Xypos[2] += tmpz;
-					if (new_vector) {
-						new_vector = false;
+					if (_G(new_vector)) {
+						_G(new_vector) = false;
 						mi->XyzStart[0] = om->Xypos[0];
 						mi->XyzStart[1] = om->Xypos[1];
 						mov->get_mov_vector(mi->XyzStart, mi->Vorschub, om);
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 66632e256fa..2b467c4a63f 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -22,20 +22,17 @@
 #include "common/system.h"
 #include "common/textconsole.h"
 #include "chewy/chewy.h"
-#include "chewy/timer.h"
 #include "chewy/defines.h"
+#include "chewy/global.h"
+#include "chewy/timer.h"
 
 namespace Chewy {
 
-bool timer_int;
-int timer_count;
-bool timer_suspend;
-
 timer::timer(int16 max_t, TimerBlk *t) {
 	_timerBlk = t;
 	_timerMax = max_t;
-	timer_int = false;
-	timer_suspend = false;
+	_G(timer_int) = false;
+	_G(timer_suspend) = false;
 	set_all_status(TIMER_STOP);
 }
 
@@ -56,7 +53,7 @@ void timer::calc_timer() {
 	int16 count;
 	int ak_time;
 	float freq;
-	ak_time = timer_count;
+	ak_time = _G(timer_count);
 	for (i = 0; i < _timerMax; i++) {
 		if (_timerBlk[i].TimeStatus != TIMER_STOP) {
 			freq = timer_freq[_timerBlk[i].TimeMode];
@@ -85,7 +82,7 @@ int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mod
 		_timerBlk[timer_nr].TimeCount = 0;
 		_timerBlk[timer_nr].TimeEnd = timer_end_wert;
 		_timerBlk[timer_nr].TimeFlag = 0;
-		_timerBlk[timer_nr].TimeLast = timer_count;
+		_timerBlk[timer_nr].TimeLast = _G(timer_count);
 		_timerBlk[timer_nr].TimeMode = timer_mode;
 		_timerBlk[timer_nr].TimeStatus = true;
 	} else
@@ -97,7 +94,7 @@ void timer::reset_timer(int16 timer_nr, int16 timer_wert) {
 	if (timer_nr < _timerMax) {
 		_timerBlk[timer_nr].TimeCount = 0;
 		_timerBlk[timer_nr].TimeFlag = 0;
-		_timerBlk[timer_nr].TimeLast = timer_count;
+		_timerBlk[timer_nr].TimeLast = _G(timer_count);
 		if (timer_wert)
 			_timerBlk[timer_nr].TimeEnd = timer_wert;
 	}
@@ -108,7 +105,7 @@ void timer::reset_all_timer() {
 	for (i = 0; i < _timerMax; i++) {
 		_timerBlk[i].TimeCount = 0;
 		_timerBlk[i].TimeFlag = 0;
-		_timerBlk[i].TimeLast = timer_count;
+		_timerBlk[i].TimeLast = _G(timer_count);
 	}
 }
 
@@ -138,11 +135,11 @@ void timer::set_all_status(int16 status) {
 }
 
 void timer::disable_timer() {
-	timer_suspend = true;
+	_G(timer_suspend) = true;
 }
 
 void timer::enable_timer() {
-	timer_suspend = false;
+	_G(timer_suspend) = false;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index b04d535813e..555ebfa0b88 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -37,10 +37,6 @@ namespace Chewy {
 
 #define TIMER_UNFREEZE 3
 
-extern bool timer_int;
-extern int timer_count;
-extern bool timer_suspend;
-
 struct TimerBlk {
 	int16 TimeCount;
 


Commit: 2233ffa5985c641442dbf799c3f9485957a2b811
    https://github.com/scummvm/scummvm/commit/2233ffa5985c641442dbf799c3f9485957a2b811
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:24-08:00

Commit Message:
CHEWY: Move some static arrays from global.cpp to room.cpp

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/main.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index a40a904e24f..d60e55245d0 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -218,7 +218,7 @@ void MainMenu::startGame() {
 	room->load_room(&room_blk, 0, &_G(spieler));
 
 	spieler_vector[P_CHEWY].Phase = 6;
-	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[6];
+	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	fx_blend = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 29e6e2cb378..c21dcb97278 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -142,7 +142,6 @@ Globals::~Globals() {
 
 int16 person_tmp_hide[MAX_PERSON];
 int16 person_tmp_room[MAX_PERSON];
-uint32 ram_start;
 
 int16 FrameSpeed;
 
@@ -227,8 +226,6 @@ taf_info *curtaf;
 taf_info *menutaf;
 taf_seq_info *howard_taf;
 taf_info *chewy;
-uint8 *chewy_ph_anz;
-uint8 *chewy_ph;
 int16 *chewy_kor;
 
 int16 person_end_phase[MAX_PERSON];
@@ -269,65 +266,6 @@ int16 spz_ani[MAX_PERSON];
 
 int16 AkChewyTaf;
 
-uint8 chewy_phasen[8][8] = {
-	{ 0, 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, 33, 32},
-	{35, 36, 37, 38, 39, 40, 41, 42},
-	{43, 44, 45, 46, 47, 48, 49, 50},
-	{51, 52, 53, 52, 51},
-};
-uint8 chewy_phasen_anz[] = {8, 8, 8, 8, 5, 8, 8, 5};
-
-uint8 chewy_bo_phasen[8][8] = {
-	{ 0, 1, 2, 3, 4, 5},
-	{ 6, 7, 8, 9, 10, 11},
-	{12, 13, 14, 15, 16, 17},
-	{12, 13, 14, 15, 16, 17},
-	{18, 19, 20, 19, 18},
-	{21, 22, 23, 24, 25, 26},
-	{21, 22, 23, 24, 25, 26},
-	{27, 28, 29, 28, 27},
-};
-uint8 chewy_bo_phasen_anz[] = {6, 6, 6, 6, 5, 6, 6, 5};
-
-uint8 chewy_mi_phasen[8][8] = {
-	{ 0, 1, 2, 3, 4, 5, 6, 7},
-	{ 8, 9, 10, 11, 12, 13, 14, 15},
-	{24, 25, 26, 27, 28, 29, 30, 31},
-	{24, 25, 26, 27, 28, 29, 30, 31},
-	{32, 33, 34, 33, 32},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{35, 36, 37, 36, 35},
-};
-uint8 chewy_mi_phasen_anz[] = {8, 8, 8, 8, 5, 8, 8, 5};
-
-uint8 chewy_ro_phasen[8][8] = {
-	{ 0, 1, 2, 3, 4, 5, 6, 7},
-	{ 8, 9, 10, 11, 12, 13, 14, 15},
-	{24, 25, 26, 27, 28, 29, 30, 31},
-	{24, 25, 26, 27, 28, 29, 30, 31},
-	{32, 33, 34, 35, 36, 35, 34, 33},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{37, 38, 39, 40, 41, 40, 39, 38},
-};
-uint8 chewy_ro_phasen_anz[] = {8, 8, 8, 8, 8, 8, 8, 8};
-
-uint8 chewy_jm_phasen[8][8] = {
-	{ 0, 1, 2, 3, 4, 5, 6, 7},
-	{ 8, 9, 10, 11, 12, 13, 14, 15},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{16, 17, 18, 19, 20, 21, 22, 23},
-	{24, 25, 26, 27, 27, 26, 25, 24},
-	{ 8, 9, 10, 11, 12, 13, 14, 15},
-	{ 8, 9, 10, 11, 12, 13, 14, 15},
-	{28, 29, 30, 31, 31, 30, 29, 28},
-};
-
 int16 PersonAni[MAX_PERSON];
 taf_seq_info *PersonTaf[MAX_PERSON];
 uint8 PersonSpr[MAX_PERSON][8];
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 43c7387b3af..00a192bbd20 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -123,6 +123,10 @@ public:
 	int16 _r65tmp_ho_y = 0;
 	int16 _r68HohesC = 0;
 
+	// global.cpp
+	const uint8 *_chewy_ph_anz;
+	const uint8 *_chewy_ph;
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -188,7 +192,6 @@ extern int16 person_tmp_room[MAX_PERSON];
 extern char *err_str;
 extern uint32 ram_end;
 
-extern uint32 ram_start;
 extern int16 FrameSpeed;
 extern int16 FrameSpeedTmp;
 
@@ -276,8 +279,6 @@ extern taf_info *curtaf;
 extern taf_info *menutaf;
 extern taf_seq_info *howard_taf;
 extern taf_info *chewy;
-extern uint8 *chewy_ph_anz;
-extern uint8 *chewy_ph;
 extern int16 *chewy_kor;
 
 extern int16 person_end_phase[MAX_PERSON];
@@ -304,7 +305,7 @@ extern AutoMov auto_mov[MAX_AUTO_MOV];
 extern int16 HowardMov;
 
 extern int16 AkChewyTaf;
-
+/*
 extern uint8 chewy_phasen[8][8];
 extern uint8 chewy_bo_phasen[8][8];
 extern uint8 chewy_mi_phasen[8][8];
@@ -314,7 +315,7 @@ extern uint8 chewy_phasen_anz[];
 extern uint8 chewy_bo_phasen_anz[];
 extern uint8 chewy_mi_phasen_anz[];
 extern uint8 chewy_ro_phasen_anz[];
-
+*/
 extern int16 PersonAni[MAX_PERSON];
 extern taf_seq_info *PersonTaf[MAX_PERSON];
 extern uint8 PersonSpr[MAX_PERSON][8];
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 1cd2e5b0dab..f9bea6d8e15 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -248,7 +248,7 @@ void test_menu() {
 	_G(cur_display) = true;
 	_G(cur)->show_cur();
 	spieler_vector[P_CHEWY].Phase = 6;
-	spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[spieler_vector[P_CHEWY].Phase];
+	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[spieler_vector[P_CHEWY].Phase];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	spieler_vector[P_CHEWY].Count = 0;
 	ende = false;
@@ -1502,7 +1502,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 					switch (i) {
 					case P_CHEWY:
 						xy = (int16
-						      *)chewy->image[chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr]];
+						      *)chewy->image[_G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 1e7f8181ea2..f144427542c 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -34,6 +34,69 @@ const int16 SURIMY_TAF19_PHASEN[4][2] = {
 	{ 0, 0 }
 };
 
+static const uint8 CHEWY_PHASEN[8][8] = {
+	{  0, 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, 33, 32 },
+	{ 35, 36, 37, 38, 39, 40, 41, 42 },
+	{ 43, 44, 45, 46, 47, 48, 49, 50 },
+	{ 51, 52, 53, 52, 51 }
+};
+
+static const uint8 CHEWY_PHASEN_ANZ[] = { 8, 8, 8, 8, 5, 8, 8, 5 };
+
+static const uint8 CHEWY_BO_PHASEN[8][8] = {
+	{  0, 1, 2, 3, 4, 5 },
+	{  6, 7, 8, 9, 10, 11 },
+	{ 12, 13, 14, 15, 16, 17 },
+	{ 12, 13, 14, 15, 16, 17 },
+	{ 18, 19, 20, 19, 18 },
+	{ 21, 22, 23, 24, 25, 26 },
+	{ 21, 22, 23, 24, 25, 26 },
+	{ 27, 28, 29, 28, 27 }
+};
+
+static const uint8 CHEWY_BO_PHASEN_ANZ[] = { 6, 6, 6, 6, 5, 6, 6, 5 };
+
+static const uint8 CHEWY_MI_PHASEN[8][8] = {
+	{  0, 1, 2, 3, 4, 5, 6, 7 },
+	{  8, 9, 10, 11, 12, 13, 14, 15 },
+	{ 24, 25, 26, 27, 28, 29, 30, 31 },
+	{ 24, 25, 26, 27, 28, 29, 30, 31 },
+	{ 32, 33, 34, 33, 32 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 35, 36, 37, 36, 35 }
+};
+
+static const uint8 CHEWY_MI_PHASEN_ANZ[] = { 8, 8, 8, 8, 5, 8, 8, 5 };
+
+static const uint8 CHEWY_RO_PHASEN[8][8] = {
+	{  0, 1, 2, 3, 4, 5, 6, 7 },
+	{  8, 9, 10, 11, 12, 13, 14, 15 },
+	{ 24, 25, 26, 27, 28, 29, 30, 31 },
+	{ 24, 25, 26, 27, 28, 29, 30, 31 },
+	{ 32, 33, 34, 35, 36, 35, 34, 33 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 37, 38, 39, 40, 41, 40, 39, 38 }
+};
+
+static const uint8 CHEWY_RO_PHASEN_ANZ[] = { 8, 8, 8, 8, 8, 8, 8, 8 };
+
+static const uint8 CHEWY_JM_PHASEN[8][8] = {
+	{  0, 1, 2, 3, 4, 5, 6, 7 },
+	{  8, 9, 10, 11, 12, 13, 14, 15 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 16, 17, 18, 19, 20, 21, 22, 23 },
+	{ 24, 25, 26, 27, 27, 26, 25, 24 },
+	{  8, 9, 10, 11, 12, 13, 14, 15 },
+	{  8, 9, 10, 11, 12, 13, 14, 15 },
+	{ 28, 29, 30, 31, 31, 30, 29, 28 }
+};
+
 
 void JungleRoom::topEntry() {
 	_G(cur_hide_flag) = 0;
@@ -449,45 +512,45 @@ void load_chewy_taf(int16 taf_nr) {
 		switch (taf_nr) {
 		case CHEWY_NORMAL:
 			fname_ = CHEWY_TAF;
-			chewy_ph_anz = chewy_phasen_anz;
-			chewy_ph = (uint8 *)chewy_phasen;
+			_G(chewy_ph_anz) = CHEWY_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_PHASEN;
 			break;
 
 		case CHEWY_BORK:
 			fname_ = CHEWY_BO_TAF;
-			chewy_ph_anz = chewy_bo_phasen_anz;
-			chewy_ph = (uint8 *)chewy_bo_phasen;
+			_G(chewy_ph_anz) = CHEWY_BO_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_BO_PHASEN;
 			break;
 
 		case CHEWY_MINI:
 			fname_ = CHEWY_MI_TAF;
-			chewy_ph_anz = chewy_mi_phasen_anz;
-			chewy_ph = (uint8 *)chewy_mi_phasen;
+			_G(chewy_ph_anz) = CHEWY_MI_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_MI_PHASEN;
 			break;
 
 		case CHEWY_PUMPKIN:
 			fname_ = CHEWY_PUMP_TAF;
-			chewy_ph_anz = chewy_mi_phasen_anz;
-			chewy_ph = (uint8 *)chewy_mi_phasen;
+			_G(chewy_ph_anz) = CHEWY_MI_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_MI_PHASEN;
 			break;
 
 		case CHEWY_ROCKER:
 			fname_ = CHEWY_ROCK_TAF;
-			chewy_ph_anz = chewy_ro_phasen_anz;
-			chewy_ph = (uint8 *)chewy_ro_phasen;
+			_G(chewy_ph_anz) = CHEWY_RO_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_RO_PHASEN;
 			break;
 
 		case CHEWY_JMANS:
 			fname_ = CHEWY_JMAN_TAF;
-			chewy_ph_anz = chewy_ro_phasen_anz;
-			chewy_ph = (uint8 *)chewy_jm_phasen;
+			_G(chewy_ph_anz) = CHEWY_RO_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_JM_PHASEN;
 			spieler_mi[P_CHEWY].HotY = 68;
 			break;
 
 		case CHEWY_ANI7:
 			fname_ = CHEWY_HELM_TAF;
-			chewy_ph_anz = chewy_mi_phasen_anz;
-			chewy_ph = (uint8 *)chewy_mi_phasen;
+			_G(chewy_ph_anz) = CHEWY_MI_PHASEN_ANZ;
+			_G(chewy_ph) = (const uint8 *)CHEWY_MI_PHASEN;
 			break;
 
 		default:
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 7b20850ebab..614f791f3ba 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -59,7 +59,7 @@ void Room64::entry() {
 }
 
 int16 Room64::cut_sev(int16 frame) {
-	const int16 spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+	const int16 spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
 	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index cf332191973..705a5bc9e6e 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -86,7 +86,7 @@ void sprite_engine() {
 		case ZOBJ_CHEWY:
 			if (!_G(spieler).PersonHide[P_CHEWY]) {
 				if (!spz_ani[P_CHEWY]) {
-					spr_nr = chewy_ph[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
+					spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 					x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
 					y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak,
@@ -290,14 +290,14 @@ void set_person_spr(int16 nr, int16 p_nr) {
 		case P_LEFT:
 			spieler_vector[P_CHEWY].Phase = CH_L_STEHEN;
 			spieler_vector[P_CHEWY].PhNr = 0;
-			spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[CH_L_STEHEN];
+			spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_L_STEHEN];
 			person_end_phase[P_CHEWY] = P_LEFT;
 			break;
 
 		case P_RIGHT:
 			spieler_vector[P_CHEWY].Phase = CH_R_STEHEN;
 			spieler_vector[P_CHEWY].PhNr = 0;
-			spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[CH_R_STEHEN];
+			spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_R_STEHEN];
 			person_end_phase[P_CHEWY] = P_RIGHT;
 			break;
 


Commit: 56a560f7bb04861f036f61178bee4a6a4ca6f999
    https://github.com/scummvm/scummvm/commit/56a560f7bb04861f036f61178bee4a6a4ca6f999
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Fix a couple of issues in Room 17

Changed paths:
    engines/chewy/rooms/room17.cpp


diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 76e3499cd0e..523559d14d1 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -54,13 +54,14 @@ void Room17::entry() {
 	if (!_G(spieler).R17EnergieOut) {
 		det->start_detail(1, 255, ANI_VOR);
 		for (int i = 0; i < 3; ++i)
-			det->start_detail(i, 255, ANI_VOR);
+			det->start_detail(6 + i, 255, ANI_VOR);
 	}
 
 	plot_seil();
 
 	if (_G(spieler).R17GitterWeg)
 		det->hide_static_spr(5);
+
 	if (_G(spieler).R17DoorKommand)
 		det->show_static_spr(7);
 
@@ -87,6 +88,7 @@ void Room17::entry() {
 			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
 		else
 			_G(spieler).room_e_obj[39].Attribut = 255;
+
 		if (_G(spieler).R18DoorBruecke)
 			_G(spieler).room_e_obj[35].Attribut = AUSGANG_LINKS;
 		else
@@ -135,28 +137,24 @@ void Room17::gedAction(int index) {
 int16 Room17::use_seil() {
 	int16 action_flag = false;
 
-	if (!flags.AutoAniPlay) {
-		if (_G(spieler).R17Location == 1) {
-			if (is_cur_inventar(SEIL_INV)) {
-				action_flag = true;
-				hide_cur();
-
-				del_inventar(_G(spieler).AkInvent);
-				flags.AutoAniPlay = true;
-				auto_move(5, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(10, 1, ANI_VOR);
-				_G(spieler).R17Seil = true;
-				atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
-				plot_seil();
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				flags.AutoAniPlay = false;
-				start_spz(5, 255, false, P_CHEWY);
-				start_aad_wait(119, -1);
-
-				show_cur();
-			}
-		}
+	if (!flags.AutoAniPlay && _G(spieler).R17Location == 1 && is_cur_inventar(SEIL_INV)) {
+		action_flag = true;
+		hide_cur();
+
+		del_inventar(_G(spieler).AkInvent);
+		flags.AutoAniPlay = true;
+		auto_move(5, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_detail_wait(10, 1, ANI_VOR);
+		_G(spieler).R17Seil = true;
+		atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
+		plot_seil();
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		flags.AutoAniPlay = false;
+		start_spz(5, 255, false, P_CHEWY);
+		start_aad_wait(119, -1);
+
+		show_cur();
 	}
 
 	return action_flag;
@@ -276,14 +274,14 @@ int16 Room17::energie_hebel() {
 	auto_move(7, P_CHEWY);
 
 	if (!_G(spieler).R17HebelOk) {
-		action_flag = true;
-
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
 			start_aad_wait(38, -1);
-		} else {
+			action_flag = true;
+		} else if (!_G(spieler).inv_cur) {
 			start_aad_wait(37, -1);
+			action_flag = true;
 		}
 
 	} else if (!_G(spieler).inv_cur) {
@@ -291,8 +289,6 @@ int16 Room17::energie_hebel() {
 
 		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
 		_G(spieler).R17EnergieOut ^= 1;
-		atds->set_ats_str(142, TXT_MARK_LOOK, _G(spieler).R17EnergieOut, ATS_DATEI);
-		g_engine->_sound->playSound(12);
 
 		if (!_G(spieler).R17EnergieOut) {
 			det->start_detail(1, 255, ANI_VOR);
@@ -309,7 +305,6 @@ int16 Room17::energie_hebel() {
 			g_engine->_sound->stopSound(0);
 		} else {
 			g_engine->_sound->playSound(15, 0);
-			g_engine->_sound->playSound(15);
 		}
 	}
 


Commit: 5f9f51ed59e0020a65267826cdc2d16f146e7478
    https://github.com/scummvm/scummvm/commit/5f9f51ed59e0020a65267826cdc2d16f146e7478
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Remove useless include in Room 16, review logic of Room 14

Changed paths:
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp


diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 26ae7e72688..78482349ab8 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room14.h"
 #include "chewy/rooms/room23.h"
@@ -52,13 +51,8 @@ void Room14::entry() {
 }
 
 bool Room14::timer(int16 t_nr, int16 ani_nr) {
-	switch (ani_nr) {
-	case 0:
+	if (ani_nr) 
 		eremit_feuer(t_nr, ani_nr);
-		break;
-	default:
-		break;
-	}
 
 	return false;
 }
@@ -120,13 +114,12 @@ int16 Room14::use_gleiter() {
 void Room14::talk_eremit()  {
 	if (!_G(spieler).R14Feuer) {
 		auto_move(6, P_CHEWY);
+		flags.AutoAniPlay = true;
 
 		if (_G(spieler).R14Translator) {
-			flags.AutoAniPlay = true;
 			load_ads_dia(0);
 			obj->show_sib(46);
 		} else {
-			flags.AutoAniPlay = true;
 			hide_cur();
 			start_aad_wait(24, -1);
 			show_cur();
@@ -156,11 +149,8 @@ int16 Room14::use_schleim() {
 }
 
 void Room14::feuer() {
-	int16 tmp;
-	int16 waffe;
-
-	waffe = false;
-	tmp = _G(spieler).AkInvent;
+	int16 waffe = false;
+	int16 tmp = _G(spieler).AkInvent;
 	_G(spieler).R14Feuer = true;
 	_G(cur_hide_flag) = false;
 	flags.AutoAniPlay = true;
@@ -168,12 +158,12 @@ void Room14::feuer() {
 
 	if (is_cur_inventar(BWAFFE_INV)) {
 		auto_move(5, P_CHEWY);
+		waffe = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(8, 1, ANI_VOR, 11);
 		start_detail_wait(9, 1, ANI_VOR);
 		wait_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		waffe = true;
 	} else {
 		auto_move(7, P_CHEWY);
 		det->hide_static_spr(9);
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index d25f98d3214..603ea5bb23d 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room16.h"
 #include "chewy/rooms/room23.h"


Commit: 153fe2c35124fb8372acfcd8ca95d143b5cf6629
    https://github.com/scummvm/scummvm/commit/153fe2c35124fb8372acfcd8ca95d143b5cf6629
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Review calls to set_steuer_bit, fix various issues in Room13 logic

Changed paths:
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room55.cpp


diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 66d80cf798d..5dc0a8047a8 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -68,9 +68,15 @@ void Room13::entry() {
 			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		}
 
-		if (_G(spieler).R13Band) {
+		if (_G(spieler).R13Bandlauf) {
+			for (int i = 0; i < 5; ++i)
+				det->start_detail(i, 255, false);
+		}
+		
+		if (!flags.LoadGame && _G(spieler).R13Band) {
 			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-			atds->set_steuer_bit(100, 1, 1);
+			atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(spieler).R13Band = false;
 		}
 
 		if (_G(spieler).R21GitterMuell)
@@ -80,21 +86,14 @@ void Room13::entry() {
 
 void Room13::xit() {
 	_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-	atds->set_steuer_bit(100, 1, 1);
+	atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R13Band = false;
 }
 
 void Room13::gedAction(int index) {
-	switch (index) {
-	case 2:
-		if (_G(spieler).R12ChewyBork) {
-			stop_person(P_CHEWY);
-			talk_bork();
-		}
-		break;
-
-	default:
-		break;
+	if (index == 2 && _G(spieler).R12ChewyBork) {
+		stop_person(P_CHEWY);
+		talk_bork();
 	}
 }
 
@@ -108,7 +107,7 @@ void Room13::talk_bork() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		det->stop_detail(9);
-		det->load_taf_seq(86, (97 - 86) + 1, nullptr);
+		det->load_taf_seq(86, 12, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		det->hide_static_spr(12);
 		_G(auto_obj) = 1;
@@ -120,7 +119,7 @@ void Room13::talk_bork() {
 		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
 		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 		auto_mov_obj[R13_BORK_OBJ].Mode = true;
-		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], mov_phasen[R13_BORK_OBJ].Lines, (const MovLine *)R13_BORK_MPKT);
+		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], 3, (const MovLine *)R13_BORK_MPKT);
 		auto_move(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
 		auto_move(11, P_CHEWY);
@@ -177,7 +176,7 @@ void Room13::jmp_band() {
 			flags.NoScroll = false;
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
-			_G(spieler).R13Bandlauf = 0;
+			_G(spieler).R13Bandlauf = false;
 			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
@@ -190,11 +189,10 @@ void Room13::jmp_band() {
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			wait_show_screen(40);
+			wait_show_screen(20);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		}
-	} else
-		start_aad_wait(118, -1);
+	}
 }
 
 void Room13::jmp_boden() {
@@ -215,14 +213,14 @@ void Room13::jmp_boden() {
 
 int16 Room13::monitor_knopf() {
 	int16 action_flag = false;
-
+	
 	if (!_G(spieler).inv_cur) {
-		action_flag = true;
-
 		if (_G(spieler).R13Band) {
+			action_flag = true;
 			start_aad_wait(620, -1);
 
 		} else if (!_G(spieler).R12ChewyBork) {
+			action_flag = true;
 			auto_move(8, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(6, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index b944d0c4a0b..65c171490fa 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -121,7 +121,7 @@ void Room22::bork(int16 t_nr) {
 				bork_walk1();
 			} else {
 				if (!_G(spieler).R22ChewyPlatt) {
-					atds->set_steuer_bit(79, 1, 1);
+					atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 					_G(spieler).R22ChewyPlatt = true;
 				}
 
@@ -196,7 +196,7 @@ int16 Room22::malen() {
 
 		if (!_G(spieler).R22ChewyPlatt) {
 			_G(spieler).R22ChewyPlatt = true;
-			atds->set_steuer_bit(79, 1, 1);
+			atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index fddbae94bcb..6f61c06a848 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -52,7 +52,7 @@ void Room29::entry() {
 
 	if (_G(spieler).R29AutoSitz) {
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
-			atds->set_steuer_bit(212, 1, 1);
+			atds->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		else
 			det->show_static_spr(9);
 	}
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 1f5e7cf69bd..1dd321e3c9f 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -60,7 +60,7 @@ void Room41::entry() {
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-		atds->set_steuer_bit(269, 1, 1);
+		atds->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	if (!flags.LoadGame)
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 133b73ac9e5..68e1cba86f7 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -381,8 +381,8 @@ int16 Room55::use_kammeraus() {
 			_G(spieler).R55SekWeg = true;
 			atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(_G(spieler).AkInvent);
-			atds->set_steuer_bit(345, 1, 1);
-			atds->set_steuer_bit(346, 1, 1);
+			atds->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
+			atds->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATEI);
 			strasse(1);
 			show_cur();
 		}


Commit: 7e5078b433b7b745ce06d7b97a805ca2fcdf7d0e
    https://github.com/scummvm/scummvm/commit/7e5078b433b7b745ce06d7b97a805ca2fcdf7d0e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: review of Room 12, fix a bug and move cut_serv to Room 11

Changed paths:
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room12.h


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index e65243f1583..381db963aff 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -148,7 +148,7 @@ int16 Room11::scanner() {
 				hide_cur();
 				action_flag = true;
 
-				flc->set_custom_user_function(Room12::cut_serv);
+				flc->set_custom_user_function(r12_cut_serv);
 				start_aad(105, 0);
 				flic_cut(FCUT_011, CFO_MODE);
 				register_cutscene(4);
@@ -220,5 +220,21 @@ int16 Room11::cut_serv(int16 frame) {
 	return 0;
 }
 
+int16 Room11::r12_cut_serv(int16 frame) {
+	if (_G(spieler).R11DoorRightF)
+		det->plot_static_details(0, 0, 0, 0);
+	if (_G(spieler).R11DoorRightB)
+		det->plot_static_details(0, 0, 6, 6);
+	if (_G(spieler).R6DoorRightB)
+		det->plot_static_details(0, 0, 7, 7);
+
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+
+	if (frame == 43)
+		start_aad(106, 0);
+
+	return 0;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index 07e775e8943..e3a17587b0f 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -32,6 +32,7 @@ private:
 	static void bork_zwinkert();
 	static void chewy_bo_use();
 	static int16 cut_serv(int16 frame);
+	static int16 r12_cut_serv(int16 frame);
 
 public:
 	static void entry();
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 4d8691f9f51..80e34815a34 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -64,15 +64,14 @@ static const AniBlock ABLOCK16[2] = {
 
 
 void Room12::entry() {
-	int16 i;
 	_G(zoom_horizont) = 150;
-	_G(timer_nr)[1] = room->set_timer(255, 20);
+	_G(timer_nr)[1] = room->set_timer(254, 20);
 
 	if (!_G(spieler).R12Betreten) {
 		_G(spieler).R12Betreten = true;
 		hide_cur();
 
-		for (i = 7; i < 10; i++)
+		for (int16 i = 7; i < 10; i++)
 			det->show_static_spr(i);
 
 		flags.NoScroll = true;
@@ -80,44 +79,40 @@ void Room12::entry() {
 		flic_cut(FCUT_016, CFO_MODE);
 		flags.NoScroll = false;
 
-		for (i = 7; i < 10; i++)
+		for (int16 i = 7; i < 10; i++)
 			det->hide_static_spr(i);
 
 		obj->show_sib(SIB_TALISMAN_R12);
 		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
 		obj->calc_all_static_detail();
 		auto_move(5, P_CHEWY);
+		start_spz(16, 255, false, 0);
 		start_aad_wait(109, -1);
 		show_cur();
 
-	} else {
-		if (_G(spieler).R12Talisman == true && !_G(spieler).R12BorkInRohr)
-			_G(timer_nr)[0] = room->set_timer(255, 20);
-		else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
-			det->show_static_spr(12);
-	}
+	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
+		_G(timer_nr)[0] = room->set_timer(255, 20);
+	else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
+		det->show_static_spr(12);
 }
 
 bool Room12::timer(int16 t_nr, int16 ani_nr) {
 	if (t_nr == _G(timer_nr)[0]) {
 		if (!is_chewy_busy())
 			init_bork();
-	} else if (t_nr == _G(timer_nr)[1]) {
-		if (_G(spieler).R12TransOn) {
-			_G(spieler).R12TransOn = false;
-			start_aad_wait(30, -1);
-		}
+	} else if (t_nr == _G(timer_nr)[1] && _G(spieler).R12TransOn) {
+		_G(spieler).R12TransOn = false;
+		start_aad_wait(30, -1);
 	}
 
 	return false;
 }
 
 void Room12::init_bork() {
-	if (!auto_obj_status(R12_BORK_OBJ) &&
-		!_G(spieler).R12BorkTalk) {
-
+	if (!auto_obj_status(R12_BORK_OBJ) && !_G(spieler).R12BorkTalk) {
 		if (!_G(auto_obj))
-			det->load_taf_seq(62, (85 - 62) + 1, nullptr);
+			det->load_taf_seq(62, 24, nullptr);
+
 		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
 			_G(auto_obj) = 1;
 			mov_phasen[R12_BORK_OBJ].AtsText = 120;
@@ -127,7 +122,7 @@ void Room12::init_bork() {
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = true;
-			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines, (const MovLine *)R12_BORK_MPKT);
+			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 5, (const MovLine *)R12_BORK_MPKT);
 
 			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
@@ -170,7 +165,7 @@ void Room12::bork_ok() {
 
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 2;
-	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines, (const MovLine *)R12_BORK_MPKT1);
+	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 2, (const MovLine *)R12_BORK_MPKT1);
 	wait_auto_obj(R12_BORK_OBJ);
 
 	_G(spieler).R12BorkInRohr = true;
@@ -181,8 +176,7 @@ void Room12::bork_ok() {
 
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 3;
-	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], mov_phasen[R12_BORK_OBJ].Lines,
-		(const MovLine *)R12_BORK_MPKT2);
+	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
 	det->hide_static_spr(10);
 	start_detail_wait(4, 1, ANI_VOR);
@@ -254,18 +248,16 @@ void Room12::use_linke_rohr() {
 
 int16 Room12::chewy_trans() {
 	int16 action_flag = false;
-	if (!_G(spieler).inv_cur) {
-		if (_G(spieler).R12TransOn) {
-			action_flag = true;
-			flags.AutoAniPlay = true;
-			auto_move(9, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ABLOCK16);
-			set_person_pos(108, 82, P_CHEWY, P_RIGHT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(spieler).R12TransOn = false;
-			flags.AutoAniPlay = false;
-		}
+	if (!_G(spieler).inv_cur && _G(spieler).R12TransOn) {
+		action_flag = true;
+		flags.AutoAniPlay = true;
+		auto_move(9, P_CHEWY);
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		start_ani_block(2, ABLOCK16);
+		set_person_pos(108, 82, P_CHEWY, P_RIGHT);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler).R12TransOn = false;
+		flags.AutoAniPlay = false;
 	}
 	return action_flag;
 }
@@ -289,21 +281,5 @@ int16 Room12::useTransformerTube() {
 	return result;
 }
 
-int16 Room12::cut_serv(int16 frame) {
-	if (_G(spieler).R11DoorRightF)
-		det->plot_static_details(0, 0, 0, 0);
-	if (_G(spieler).R11DoorRightB)
-		det->plot_static_details(0, 0, 6, 6);
-	if (_G(spieler).R6DoorRightB)
-		det->plot_static_details(0, 0, 7, 7);
-
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-
-	if (frame == 43)
-		start_aad(106, 0);
-
-	return 0;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room12.h b/engines/chewy/rooms/room12.h
index 4dc6167b26f..e6f3b8d92b4 100644
--- a/engines/chewy/rooms/room12.h
+++ b/engines/chewy/rooms/room12.h
@@ -34,7 +34,6 @@ public:
 	static void entry();
 	static bool timer(int16 t_nr, int16 ani_nr);
 
-	static int16 cut_serv(int16 frame);
 	static void use_linke_rohr();
 	static int16 chewy_trans();
 	static int16 useTransformerTube();


Commit: 296093a17b8c0dc6cf730c20372a347933f4bd34
    https://github.com/scummvm/scummvm/commit/296093a17b8c0dc6cf730c20372a347933f4bd34
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Review logic of Room 11, fix a couple of issues

Changed paths:
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 381db963aff..f36a531e773 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -25,7 +25,6 @@
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room11.h"
-#include "chewy/rooms/room12.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -143,37 +142,36 @@ int16 Room11::scanner() {
 		if (!_G(spieler).R11CardOk) {
 			action_flag = true;
 			start_aad_wait(13, -1);
-		} else {
-			if (is_cur_inventar(BORK_INV)) {
-				hide_cur();
-				action_flag = true;
+		} else if (is_cur_inventar(BORK_INV)) {
+			hide_cur();
+			set_up_screen(DO_SETUP);
+			action_flag = true;
 
-				flc->set_custom_user_function(r12_cut_serv);
-				start_aad(105, 0);
-				flic_cut(FCUT_011, CFO_MODE);
-				register_cutscene(4);
+			flc->set_custom_user_function(cut_serv_2);
+			start_aad(105, 0);
+			flic_cut(FCUT_011, CFO_MODE);
+			register_cutscene(4);
+			flc->remove_custom_user_function();
+			_G(spieler).R11TerminalOk = true;
+			cur_2_inventory();
+			menu_item = CUR_TALK;
+			cursor_wahl(menu_item);
+			start_aad_wait(12, -1);
+			show_cur();
+			load_ads_dia(3);
+		} else if (!_G(spieler).inv_cur) {
+			if (!_G(spieler).R11TerminalOk) {
+				action_flag = true;
+				flc->set_custom_user_function(cut_serv);
+				flic_cut(FCUT_010, CFO_MODE);
 				flc->remove_custom_user_function();
-				_G(spieler).R11TerminalOk = true;
-				cur_2_inventory();
+				start_aad_wait(20, -1);
+			} else {
+				action_flag = true;
+				start_aad_wait(12, -1);
 				menu_item = CUR_TALK;
 				cursor_wahl(menu_item);
-				start_aad_wait(12, -1);
 				load_ads_dia(3);
-				show_cur();
-			} else if (!_G(spieler).inv_cur) {
-				if (!_G(spieler).R11TerminalOk) {
-					action_flag = true;
-					flc->set_custom_user_function(cut_serv);
-					flic_cut(FCUT_010, CFO_MODE);
-					flc->remove_custom_user_function();
-					start_aad_wait(20, -1);
-				} else {
-					action_flag = true;
-					start_aad_wait(12, -1);
-					menu_item = CUR_TALK;
-					cursor_wahl(menu_item);
-					load_ads_dia(3);
-				}
 			}
 		}
 	}
@@ -183,6 +181,7 @@ int16 Room11::scanner() {
 
 void Room11::get_card() {
 	if (_G(spieler).R11CardOk) {
+		cur_2_inventory();
 		_G(spieler).R11CardOk = false;
 		obj->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
 
@@ -212,19 +211,23 @@ void Room11::put_card() {
 int16 Room11::cut_serv(int16 frame) {
 	if (_G(spieler).R11DoorRightF)
 		det->plot_static_details(0, 0, 0, 0);
+
 	if (_G(spieler).R11DoorRightB)
 		det->plot_static_details(0, 0, 6, 6);
+
 	if (_G(spieler).R45MagOk)
 		det->plot_static_details(0, 0, 7, 7);
 
 	return 0;
 }
 
-int16 Room11::r12_cut_serv(int16 frame) {
+int16 Room11::cut_serv_2(int16 frame) {
 	if (_G(spieler).R11DoorRightF)
 		det->plot_static_details(0, 0, 0, 0);
+
 	if (_G(spieler).R11DoorRightB)
 		det->plot_static_details(0, 0, 6, 6);
+
 	if (_G(spieler).R6DoorRightB)
 		det->plot_static_details(0, 0, 7, 7);
 
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index e3a17587b0f..ba38a4d7c16 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -22,8 +22,6 @@
 #ifndef CHEWY_ROOMS_ROOM11_H
 #define CHEWY_ROOMS_ROOM11_H
 
-#include "chewy/ngsdefs.h"
-
 namespace Chewy {
 namespace Rooms {
 
@@ -32,7 +30,7 @@ private:
 	static void bork_zwinkert();
 	static void chewy_bo_use();
 	static int16 cut_serv(int16 frame);
-	static int16 r12_cut_serv(int16 frame);
+	static int16 cut_serv_2(int16 frame);
 
 public:
 	static void entry();


Commit: 15be829a0db70d74c43d2963acc57b6b187d153c
    https://github.com/scummvm/scummvm/commit/15be829a0db70d74c43d2963acc57b6b187d153c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Review Room 10, move Room6::cut_serv2 to Room10::cut_serv

Changed paths:
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room10.h
    engines/chewy/rooms/room6.cpp
    engines/chewy/rooms/room6.h


diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 01eb6ae0519..45486864ac7 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -23,7 +23,6 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room6.h"
 #include "chewy/rooms/room10.h"
 
 namespace Chewy {
@@ -54,7 +53,7 @@ void Room10::get_surimy() {
 	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
-	flc->set_custom_user_function(Room6::cut_serv2);
+	flc->set_custom_user_function(cut_serv);
 	flic_cut(FCUT_006, CFO_MODE);
 	flc->remove_custom_user_function();
 	_G(spieler).R10SurimyOk = true;
@@ -66,5 +65,13 @@ void Room10::get_surimy() {
 	show_cur();
 }
 
+int16 Room10::cut_serv(int16 frame) {
+	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	if (frame == 31)
+		start_aad(107, 0);
+
+	return 0;
+}
+
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room10.h b/engines/chewy/rooms/room10.h
index f93c83f8868..76e94b6e4a9 100644
--- a/engines/chewy/rooms/room10.h
+++ b/engines/chewy/rooms/room10.h
@@ -26,6 +26,8 @@ namespace Chewy {
 namespace Rooms {
 
 class Room10 {
+	static int16 cut_serv(int16 frame);
+
 public:
 	static void entry();
 	static void get_surimy();
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room6.cpp
index 1e53ebf5bdc..3aa1a99f226 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room6.cpp
@@ -137,13 +137,5 @@ int16 Room6::cut_serv1(int16 frame) {
 	return (frame == 40) ? -1 : 0;
 }
 
-int16 Room6::cut_serv2(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 31)
-		start_aad(107, 0);
-
-	return 0;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room6.h b/engines/chewy/rooms/room6.h
index a256dbe8800..bf83e3ae049 100644
--- a/engines/chewy/rooms/room6.h
+++ b/engines/chewy/rooms/room6.h
@@ -32,7 +32,6 @@ private:
 public:
 	static void entry();
 	static int16 cut_serv1(int16 frame);
-	static int16 cut_serv2(int16 frame);
 	static void bola_knopf();
 };
 


Commit: b263d38ec9cd430d750e11da3ddd3dfafae6cece
    https://github.com/scummvm/scummvm/commit/b263d38ec9cd430d750e11da3ddd3dfafae6cece
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:25-08:00

Commit Message:
CHEWY: Re-introduce content of check_shad method

The NoShadow flag was never set, which means that although the
flag itself could be removed, the code that was executed when
it was false still needed to be kept

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index f9bea6d8e15..6294eea5588 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1195,6 +1195,35 @@ void check_shad(int16 g_idx, int16 mode) {
 		45, 3, 28,
 		45, 6, 32
 	};
+
+	switch (g_idx) {
+	case 1:
+		if (mode)
+			_G(out)->set_teilpalette(PAL_1, 1, 11);
+		palcopy(pal, PAL_1, 0, 0, 12);
+		break;
+
+	case 2:
+		if (mode)
+			_G(out)->set_teilpalette(PAL_2, 1, 11);
+		palcopy(pal, PAL_2, 0, 0, 12);
+		break;
+
+	case 3:
+		if (mode)
+			_G(out)->set_teilpalette(PAL_3, 1, 11);
+		palcopy(pal, PAL_3, 0, 0, 12);
+		break;
+
+	case 4:
+		if (mode)
+			_G(out)->set_teilpalette(PAL_0, 1, 11);
+		palcopy(pal, PAL_0, 0, 0, 12);
+		break;
+
+	default:
+		break;
+	}
 }
 
 void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w, char *txtptr) {


Commit: 2bc4ccd77981fc2f9edc37fbcc6afe7626f92f47
    https://github.com/scummvm/scummvm/commit/2bc4ccd77981fc2f9edc37fbcc6afe7626f92f47
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:26-08:00

Commit Message:
CHEWY: Fix mismatched allocation/delete in Resource

Changed paths:
    engines/chewy/resource.cpp


diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
index f2efa589e75..5294333ff5f 100644
--- a/engines/chewy/resource.cpp
+++ b/engines/chewy/resource.cpp
@@ -86,7 +86,7 @@ Resource::~Resource() {
 	_chunkList.clear();
 	_stream.close();
 
-	delete _spriteCorrectionsTable;
+	delete[] _spriteCorrectionsTable;
 	_spriteCorrectionsTable = nullptr;
 }
 


Commit: af023582844b84906a58243c2512f5c0e1f472ff
    https://github.com/scummvm/scummvm/commit/af023582844b84906a58243c2512f5c0e1f472ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:26-08:00

Commit Message:
CHEWY: Fix memory overrun in Resource::unpackRLE

Changed paths:
    engines/chewy/resource.cpp


diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp
index 5294333ff5f..eba6ca00e25 100644
--- a/engines/chewy/resource.cpp
+++ b/engines/chewy/resource.cpp
@@ -165,7 +165,6 @@ void Resource::initSprite(Common::String filename) {
 }
 
 void Resource::unpackRLE(uint8 *buffer, uint32 compressedSize, uint32 uncompressedSize) {
-
 	uint8 count;
 	uint8 value;
 	uint32 outPos = 0;
@@ -173,7 +172,7 @@ void Resource::unpackRLE(uint8 *buffer, uint32 compressedSize, uint32 uncompress
 	for (uint i = 0; i < (compressedSize) / 2 && outPos < uncompressedSize; i++) {
 		count = _stream.readByte();
 		value = _stream.readByte();
-		for (uint8 j = 0; j < count; j++) {
+		for (uint8 j = 0; j < count && outPos < uncompressedSize; j++) {
 			buffer[outPos++] = value;
 		}
 	}


Commit: 97d8d700f1f4f9a17fb01750534164d782013491
    https://github.com/scummvm/scummvm/commit/97d8d700f1f4f9a17fb01750534164d782013491
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:26-08:00

Commit Message:
CHEWY: Review logic of Room 9

Changed paths:
    engines/chewy/rooms/room9.cpp


diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room9.cpp
index 89f736d932a..a224d2a0122 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room9.cpp
@@ -48,10 +48,11 @@ static const MovLine SURIMY_MPKT1[2] = {
 void Room9::entry() {
 	_G(spieler).R7ChewyFlug = false;
 
-	if (!_G(spieler).R9Gitter) {
+	if (!_G(spieler).R9Gitter)
 		set_person_pos(138, 91, P_CHEWY, P_LEFT);
-	} else
+	else
 		det->show_static_spr(5);
+
 	if (_G(spieler).R9Surimy) {
 		det->hide_static_spr(4);
 		room->set_timer_status(7, TIMER_STOP);
@@ -98,7 +99,7 @@ void Room9::surimy_ani() {
 	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SURIMY_OBJ].Mode = true;
-	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
 	start_detail_frame(0, 1, ANI_VOR, 15);
 	det->start_detail(2, 1, ANI_VOR);
@@ -109,19 +110,12 @@ void Room9::surimy_ani() {
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
-	det->del_taf_tbl(91, 8, 0);
+	det->del_taf_tbl(91, 8, nullptr);
 }
 
 void Room9::gedAction(int index) {
-	switch (index) {
-	case 0:
-		if (!_G(spieler).R9Surimy)
-			surimy();
-		break;
-
-	default:
-		break;
-	}
+	if (index == 0 && !_G(spieler).R9Surimy)
+		surimy();
 }
 
 } // namespace Rooms


Commit: acf19682c0291fea18976c1e972b1f04b299d91e
    https://github.com/scummvm/scummvm/commit/acf19682c0291fea18976c1e972b1f04b299d91e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:26-08:00

Commit Message:
CHEWY: Review logic in room 8, fix a bug

Changed paths:
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room8.cpp


diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index f36a531e773..96e9cc9c436 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -134,18 +134,18 @@ void Room11::chewy_bo_use() {
 }
 
 int16 Room11::scanner() {
-	int16 action_flag = false;
+	int16 actionFl = false;
 
 	if (!_G(spieler).R12ChewyBork) {
 		auto_move(7, P_CHEWY);
 
 		if (!_G(spieler).R11CardOk) {
-			action_flag = true;
+			actionFl = true;
 			start_aad_wait(13, -1);
 		} else if (is_cur_inventar(BORK_INV)) {
 			hide_cur();
 			set_up_screen(DO_SETUP);
-			action_flag = true;
+			actionFl = true;
 
 			flc->set_custom_user_function(cut_serv_2);
 			start_aad(105, 0);
@@ -161,13 +161,13 @@ int16 Room11::scanner() {
 			load_ads_dia(3);
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
-				action_flag = true;
+				actionFl = true;
 				flc->set_custom_user_function(cut_serv);
 				flic_cut(FCUT_010, CFO_MODE);
 				flc->remove_custom_user_function();
 				start_aad_wait(20, -1);
 			} else {
-				action_flag = true;
+				actionFl = true;
 				start_aad_wait(12, -1);
 				menu_item = CUR_TALK;
 				cursor_wahl(menu_item);
@@ -176,7 +176,7 @@ int16 Room11::scanner() {
 		}
 	}
 
-	return action_flag;
+	return actionFl;
 }
 
 void Room11::get_card() {
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index 5c315699122..a1bd549f9e7 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -112,8 +112,11 @@ void Room8::start_verbrennen() {
 }
 
 bool Room8::gips_wurf() {
+	bool actionFl = false;
+	
 	if (is_cur_inventar(GIPS_EIMER_INV)) {
 		hide_cur();
+		actionFl = true;
 		det->load_taf_seq(116, 30, nullptr);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = false;
@@ -131,7 +134,7 @@ bool Room8::gips_wurf() {
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
 		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
-		det->del_taf_tbl(116, 30, 0);
+		det->del_taf_tbl(116, 30, nullptr);
 		auto_move(8, P_CHEWY);
 		flags.AtsAction = false;
 		menu_item = CUR_USE;
@@ -143,11 +146,9 @@ bool Room8::gips_wurf() {
 		invent_2_slot(MASKE_INV);
 		cursor_wahl(menu_item);
 		show_cur();
-
-		return true;
 	}
 
-	return false;
+	return actionFl;
 }
 
 void Room8::open_gdoor() {
@@ -170,17 +171,17 @@ void Room8::talk_nimoy() {
 	flags.NoScroll = true;
 	auto_scroll(0, 120);
 	if (_G(spieler).R8Folter) {
-		int16 tmp;
-		if (!_G(spieler).R8GipsWurf)
-			tmp = 1;
-		else
-			tmp = 2;
+		int16 diaNr = _G(spieler).R8GipsWurf ? 2 : 1;
+
 		if (!_G(spieler).R8GTuer)
-			load_ads_dia(tmp);
+			load_ads_dia(diaNr);
 		else
 			start_aad_wait(61, -1);
-	} else
+	} else {
+		start_aad_wait(603, -1);
 		load_ads_dia(6);
+	}
+
 	flags.NoScroll = false;
 }
 


Commit: 9aaa14ad5fa0aaeef73fd89b943be9382acd03ed
    https://github.com/scummvm/scummvm/commit/9aaa14ad5fa0aaeef73fd89b943be9382acd03ed
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:26-08:00

Commit Message:
CHEWY: Move io_pal1 static array to file.cpp

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index 41f0ecddbb3..f4a593bae6c 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -27,6 +27,8 @@
 
 namespace Chewy {
 
+static const byte IO_PAL1[7] = { 11, 60, 14, 2, 1, 5, 4 };
+
 Common::File *File::open(const char *name) {
 	Common::File *f = new Common::File();
 	if (f->open(name)) {
@@ -58,7 +60,7 @@ int16 call_fileio(int16 palette, int16 mode) {
 	switch (palette) {
 
 	case PAL1:
-		ioptr.m_col = io_pal1;
+		ioptr.m_col = IO_PAL1;
 		break;
 	}
 	switch (mode) {
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index c21dcb97278..e912e6e68f9 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -233,8 +233,6 @@ int16 ani_stand_count[MAX_PERSON];
 
 bool ani_stand_flag[MAX_PERSON];
 
-char io_pal1[7] = {11, 60, 14, 2, 1, 5, 4};
-
 bitclass *bit;
 gedclass *ged;
 text *txt;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 00a192bbd20..d74152e995d 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -286,8 +286,6 @@ extern int16 ani_stand_count[MAX_PERSON];
 
 extern bool ani_stand_flag[MAX_PERSON];
 
-extern char io_pal1[7];
-
 extern bitclass *bit;
 extern gedclass *ged;
 extern text *txt;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index c399a687a93..a753e1098bc 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -327,7 +327,7 @@ struct iog_init {
 
 	int16 popx = 0;
 	int16 popy = 0;
-	char *m_col = nullptr;
+	const byte *m_col = nullptr;
 	uint8 f1 = 0;
 	uint8 f2 = 0;
 	uint8 f3 = 0;


Commit: a6aa69e49cae53572890a319c63483cbc8e1d8bb
    https://github.com/scummvm/scummvm/commit/a6aa69e49cae53572890a319c63483cbc8e1d8bb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Remove the original's keycode constants

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/mouse.cpp
    engines/chewy/ngsdefs.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room4.cpp
    engines/chewy/rooms/room8.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index d2875d903e5..de2b49085dc 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -564,8 +564,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	if (_atsv.Display) {
 		if (_atdsv._eventsEnabled) {
 			switch (_G(in)->get_switch_code()) {
-			case ESC:
-			case ENTER:
+			case Common::KEYCODE_ESCAPE:
+			case Common::KEYCODE_RETURN:
 			case MAUS_LINKS:
 				if (_mousePush == false) {
 					if (_atsv.SilentCount <= 0 && _atsv.DelayCount > _printDelayCount1) {
@@ -905,8 +905,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 	if (_aadv.Dialog) {
 		if (_atdsv._eventsEnabled) {
 			switch (_G(in)->get_switch_code()) {
-			case ESC:
-			case ENTER:
+			case Common::KEYCODE_ESCAPE:
+			case Common::KEYCODE_RETURN:
 			case MAUS_LINKS:
 				if (_mousePush == false) {
 					if (_aadv.SilentCount <= 0 && _aadv.DelayCount > _printDelayCount1) {
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 3fd0ba1cb14..f26cd2a3683 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -115,7 +115,7 @@ void Cinema::execute() {
 				break;
 			}
 		} else if (minfo.button == 2 && !flag) {
-			kbinfo.scan_code = ESC;
+			kbinfo.scan_code = Common::KEYCODE_ESCAPE;
 			flag = true;
 		} else if (minfo.button != 1) {
 			flag = false;
@@ -128,7 +128,7 @@ void Cinema::execute() {
 		}
 
 		switch (kbinfo.scan_code) {
-		case ESC:
+		case Common::KEYCODE_ESCAPE:
 			endLoop = true;
 			kbinfo.scan_code = 0;
 			break;
@@ -208,7 +208,7 @@ void Cinema::execute() {
 }
 
 int16 Cinema::cut_serv(int16 frame) {
-	if (_G(in)->get_switch_code() == ESC) {
+	if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 		_G(sndPlayer)->stopMod();
 		_G(sndPlayer)->endSound();
 		return -1;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 24222a39fea..70f30fb8f99 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -147,7 +147,7 @@ void Credits::execute() {
 	_G(spieler).DelaySpeed = 2;
 
 	for (;;) {
-		if (_G(in)->get_switch_code() == ESC || SHOULD_QUIT)
+		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || SHOULD_QUIT)
 			break;
 
 		// Display the starfield background
@@ -159,7 +159,7 @@ void Credits::execute() {
 		if (++_G(spieler).scrollx >= 320)
 			_G(spieler).scrollx = 0;
 
-		if (_G(in)->get_switch_code() == ESC)
+		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
 			break;
 
 		++lineScrolled;
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 34b7493916f..4e780662d65 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -101,7 +101,7 @@ int16 Files::execute(bool isInGame) {
 		text_off = 0;		// Top visible save slot
 		active_slot = 0;	// Currently selected slot
 
-		while (key != ESC && !SHOULD_QUIT) {
+		while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 			// Draw the dialog background
 			_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 
@@ -143,7 +143,7 @@ int16 Files::execute(bool isInGame) {
 			if (mode[GAME])
 				--mode[GAME];
 			if (mode[GAME] == 1)
-				key = ESC;
+				key = Common::KEYCODE_ESCAPE;
 
 			if (mode[QUIT])
 				--mode[QUIT];
@@ -155,7 +155,7 @@ int16 Files::execute(bool isInGame) {
 				key = getch();
 				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
 					ret = 1;
-					key = ESC;
+					key = Common::KEYCODE_ESCAPE;
 				} else {
 					key = 0;
 				}
@@ -176,15 +176,15 @@ int16 Files::execute(bool isInGame) {
 
 				switch (rect) {
 				case 0:
-					key = CURSOR_UP;
+					key = Common::KEYCODE_UP;
 					break;
 				case 1:
-					key = CURSOR_DOWN;
+					key = Common::KEYCODE_DOWN;
 					break;
 				case 2:
 					line = (minfo.y - 68) / 10;
 					if (line == active_slot)
-						key = ENTER;
+						key = Common::KEYCODE_RETURN;
 					else
 						active_slot = line;
 					if (active_slot > 5)
@@ -194,19 +194,19 @@ int16 Files::execute(bool isInGame) {
 						goto enter;
 					break;
 				case 3:
-					key = F1_KEY;
+					key = Common::KEYCODE_F1;
 					break;
 				case 4:
-					key = F2_KEY;
+					key = Common::KEYCODE_F2;
 					break;
 				case 5:
-					key = F3_KEY;
+					key = Common::KEYCODE_F3;
 					break;
 				case 6:
-					key = F4_KEY;
+					key = Common::KEYCODE_F4;
 					break;
 				case 7:
-					key = F5_KEY;
+					key = Common::KEYCODE_F5;
 					break;
 				}
 
@@ -215,7 +215,7 @@ int16 Files::execute(bool isInGame) {
 			}
 
 			switch (key) {
-			case F1_KEY:
+			case Common::KEYCODE_F1:
 				if (visibility[SAVE]) {
 					mode[LOAD] = 0;
 					mode[SAVE] = 1;
@@ -224,27 +224,27 @@ int16 Files::execute(bool isInGame) {
 				}
 				break;
 
-			case F2_KEY:
+			case Common::KEYCODE_F2:
 				mode[LOAD] = 1;
 				mode[SAVE] = 0;
 				mode[W8] = 0;
 				goto enter;
 				break;
 
-			case F3_KEY:
+			case Common::KEYCODE_F3:
 				if (visibility[GAME])
 					mode[GAME] = 10;
 				break;
 
-			case F4_KEY:
+			case Common::KEYCODE_F4:
 				mode[QUIT] = 10;
 				break;
 
-			case F5_KEY:
+			case Common::KEYCODE_F5:
 				mode[OPTIONS] = 10;
 				break;
 
-			case CURSOR_UP:
+			case Common::KEYCODE_UP:
 				mode[SCROLL_UP] = 10;
 				if (active_slot > 0)
 					--active_slot;
@@ -252,7 +252,7 @@ int16 Files::execute(bool isInGame) {
 					--text_off;
 				break;
 
-			case CURSOR_DOWN:
+			case Common::KEYCODE_DOWN:
 				mode[SCROLL_DOWN] = 10;
 				if (active_slot < (NUM_VISIBLE_SLOTS - 1))
 					++active_slot;
@@ -260,15 +260,15 @@ int16 Files::execute(bool isInGame) {
 					++text_off;
 				break;
 
-			case ENTER:
-			case ENTER + ALT:
+			case Common::KEYCODE_RETURN:
+			case Common::KEYCODE_RETURN + ALT:
 enter:
 				if (mode[LOAD]) {
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
 						CurrentSong = -1;
 						_G(iog)->load(text_off + active_slot, ioptr.save_path);
-						key = ESC;
+						key = Common::KEYCODE_ESCAPE;
 					}
 				} else if (mode[SAVE]) {
 					_G(out)->back2screen(workpage);
@@ -283,7 +283,7 @@ enter:
 						_G(iog)->save_entry(text_off + active_slot,
 							ioptr.save_path);
 					}
-					key = ESC;
+					key = Common::KEYCODE_ESCAPE;
 				}
 				break;
 
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 97c46e60cfc..d529ec6c20a 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -179,17 +179,17 @@ void Inventory::menu() {
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
 		if (!minfo.button)
 			maus_flag = 0;
-		if (minfo.button == 1 || kbinfo.key_code == ENTER || keyVal) {
+		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN || keyVal) {
 			if (!maus_flag) {
 				maus_flag = 1;
 				kbinfo.key_code = '\0';
 
 				k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
-				if (keyVal == F1_KEY)
+				if (keyVal == Common::KEYCODE_F1)
 					k = 0;
-				else if (keyVal == F2_KEY)
+				else if (keyVal == Common::KEYCODE_F2)
 					k = 1;
-				else if (keyVal == ENTER)
+				else if (keyVal == Common::KEYCODE_RETURN)
 					k = 5;
 
 				keyVal = 0;
@@ -211,7 +211,7 @@ void Inventory::menu() {
 						inv_rand_y = -1;
 						ret_look = look(_G(spieler).AkInvent, INV_ATS_MODE, -1);
 
-						taste_flag = ESC;
+						taste_flag = Common::KEYCODE_ESCAPE;
 					} else {
 						invent_cur_mode = CUR_LOOK;
 						menu_item = CUR_LOOK;
@@ -220,11 +220,11 @@ void Inventory::menu() {
 					break;
 
 				case 3:
-					_G(in)->_hotkey = PAGE_UP;
+					_G(in)->_hotkey = Common::KEYCODE_PAGEUP;
 					break;
 
 				case 4:
-					_G(in)->_hotkey = PAGE_DOWN;
+					_G(in)->_hotkey = Common::KEYCODE_PAGEDOWN;
 					break;
 
 				case 5:
@@ -260,7 +260,7 @@ void Inventory::menu() {
 								ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
 								_G(spieler).AkInvent = -1;
 								cursor_wahl(invent_cur_mode);
-								taste_flag = ESC;
+								taste_flag = Common::KEYCODE_ESCAPE;
 							}
 						}
 					}
@@ -270,9 +270,9 @@ void Inventory::menu() {
 					break;
 				}
 			}
-		} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
+		} else if (minfo.button == 2 || kbinfo.key_code == Common::KEYCODE_ESCAPE) {
 			if (!maus_flag) {
-				_G(in)->_hotkey = ESC;
+				_G(in)->_hotkey = Common::KEYCODE_ESCAPE;
 				maus_flag = 1;
 			}
 		}
@@ -288,7 +288,7 @@ void Inventory::menu() {
 			taste_flag = false;
 			maus_flag = 0;
 			minfo.button = 1;
-			keyVal = ENTER;
+			keyVal = Common::KEYCODE_RETURN;
 		}
 
 		ret_look = -1;
@@ -300,19 +300,19 @@ void Inventory::menu() {
 				taste_flag = 0;
 		} else {
 			switch (abfrage) {
-			case F1_KEY:
-				keyVal = F1_KEY;
+			case Common::KEYCODE_F1:
+				keyVal = Common::KEYCODE_F1;
 				break;
 
-			case F2_KEY:
-				keyVal = F2_KEY;
+			case Common::KEYCODE_F2:
+				keyVal = Common::KEYCODE_F2;
 				break;
 
-			case ESC:
+			case Common::KEYCODE_ESCAPE:
 				if (!menu_first) {
 					menu_first = true;
 					_G(cur)->show_cur();
-					while (_G(in)->get_switch_code() == ESC) {
+					while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 						set_up_screen(NO_SETUP);
 						inv_rand_x = -1;
 						inv_rand_y = -1;
@@ -328,33 +328,33 @@ void Inventory::menu() {
 				}
 				break;
 
-			case CURSOR_RIGHT:
+			case Common::KEYCODE_RIGHT:
 				if (minfo.x < 320 - _G(spieler).CurBreite)
 					minfo.x += 3;
 				break;
 
-			case CURSOR_LEFT:
+			case Common::KEYCODE_LEFT:
 				if (minfo.x > 2)
 					minfo.x -= 3;
 				break;
 
-			case CURSOR_UP:
+			case Common::KEYCODE_UP:
 				if (minfo.y > 2)
 					minfo.y -= 3;
 				break;
 
-			case CURSOR_DOWN:
+			case Common::KEYCODE_DOWN:
 				if (minfo.y < 197 - _G(spieler).CurHoehe)
 					minfo.y += 3;
 				break;
 
-			case PAGE_UP:
+			case Common::KEYCODE_PAGEUP:
 				if (_G(spieler).InventY > 0)
 					--_G(spieler).InventY;
 				kbinfo.key_code = '\0';
 				break;
 
-			case PAGE_DOWN:
+			case Common::KEYCODE_PAGEDOWN:
 				if (_G(spieler).InventY < (MAX_MOV_OBJ / 5) - 3)
 					++_G(spieler).InventY;
 				kbinfo.key_code = '\0';
@@ -393,7 +393,7 @@ void Inventory::menu() {
 	_G(cur)->move(maus_old_x, maus_old_y);
 	minfo.x = maus_old_x;
 	minfo.y = maus_old_y;
-	while (_G(in)->get_switch_code() == ESC && !SHOULD_QUIT) {
+	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
 		_G(out)->back2screen(workpage);
@@ -458,7 +458,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		if (minfo.button) {
 			if (minfo.button == 2) {
 				if (!maus_flag)
-					kbinfo.scan_code = ESC;
+					kbinfo.scan_code = Common::KEYCODE_ESCAPE;
 			} else if (minfo.button == 1) {
 				if (!maus_flag) {
 					switch (rect) {
@@ -474,12 +474,12 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 					case 3:
 					case 6:
-						kbinfo.scan_code = CURSOR_UP;
+						kbinfo.scan_code = Common::KEYCODE_UP;
 						break;
 
 					case 4:
 					case 7:
-						kbinfo.scan_code = CURSOR_DOWN;
+						kbinfo.scan_code = Common::KEYCODE_DOWN;
 						break;
 
 					case 5:
@@ -499,24 +499,24 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		}
 
 		switch (kbinfo.scan_code) {
-		case F1_KEY:
-			_G(in)->_hotkey = F1_KEY;
+		case Common::KEYCODE_F1:
+			_G(in)->_hotkey = Common::KEYCODE_F1;
 			break;
 
-		case F2_KEY:
-			_G(in)->_hotkey = F2_KEY;
+		case Common::KEYCODE_F2:
+			_G(in)->_hotkey = Common::KEYCODE_F2;
 			break;
 
-		case ESC:
+		case Common::KEYCODE_ESCAPE:
 			ende = 1;
 			break;
 
-		case CURSOR_UP:
+		case Common::KEYCODE_UP:
 			if (txt_start > 0)
 				--txt_start;
 			break;
 
-		case CURSOR_DOWN:
+		case Common::KEYCODE_DOWN:
 			if (txt_start < txt_anz - txt_zeilen)
 				++txt_start;
 			break;
@@ -569,7 +569,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		SHOULD_QUIT_RETURN0;
 	}
 
-	while (_G(in)->get_switch_code() == ESC) {
+	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
 		_G(cur)->plot_cur();
@@ -697,7 +697,7 @@ void Inventory::showDiary() {
 	_G(out)->setze_zeiger(nullptr);
 	fx->blende1(workptr, screen0, pal, 150, 0, 0);
 
-	while (_G(in)->get_switch_code() != ESC) {
+	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index d60e55245d0..a1822ead47c 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -178,14 +178,14 @@ int16 MainMenu::creditsFn(int16 key) {
 		key == 128 || key == 165 || key == 185 ||
 		key == 211 || key == 248 || key == 266) {
 		for (int idx = 0; idx < 2000; ++idx) {
-			if (_G(in)->get_switch_code() == ESC)
+			if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
 				return -1;
 			g_events->update();
 		}
 		return 0;
 
 	} else {
-		return _G(in)->get_switch_code() == ESC ? -1 : 0;
+		return _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	}
 }
 
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index c8a145028d7..e2d506f7d75 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -76,7 +76,7 @@ void Options::execute(taf_info *ti) {
 	FrameSpeed = 0;
 	int16 delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
-	while (key != ESC) {
+	while (key != Common::KEYCODE_ESCAPE) {
 		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
 		++FrameSpeed;
 		warning("akt_clock = clock() / CLK_TCK;");
@@ -145,7 +145,7 @@ void Options::execute(taf_info *ti) {
 			8 + ti->korrektur[(EXIT << 1) + 1], 0);
 
 		key = _G(in)->get_switch_code();
-		if ((minfo.button == 1) || (key == ENTER)) {
+		if ((minfo.button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
 				int16 rect = _G(in)->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
 			switch (rect) {
@@ -189,7 +189,7 @@ void Options::execute(taf_info *ti) {
 				}
 				break;
 			case 6:
-				key = ESC;
+				key = Common::KEYCODE_ESCAPE;
 				break;
 			case 7:
 				_G(spieler).SoundVol = (136 - minfo.y) << 1;
@@ -204,19 +204,19 @@ void Options::execute(taf_info *ti) {
 		}
 		switch (key) {
 
-		case CURSOR_UP:
+		case Common::KEYCODE_UP:
 			_G(cur)->move(minfo.x, --minfo.y);
 			break;
 
-		case CURSOR_DOWN:
+		case Common::KEYCODE_DOWN:
 			_G(cur)->move(minfo.x, ++minfo.y);
 			break;
 
-		case CURSOR_LEFT:
+		case Common::KEYCODE_LEFT:
 			_G(cur)->move(--minfo.x, minfo.y);
 			break;
 
-		case CURSOR_RIGHT:
+		case Common::KEYCODE_RIGHT:
 			_G(cur)->move(++minfo.x, minfo.y);
 			break;
 		}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 6294eea5588..4b1732a39da 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -287,7 +287,7 @@ int16 main_loop(int16 mode) {
 	maus_action();
 	if (flags.MainInput) {
 		switch (kbinfo.scan_code) {
-		case F1_KEY:
+		case Common::KEYCODE_F1:
 			_G(spieler).inv_cur = false;
 			menu_item = CUR_WALK;
 			cursor_wahl(menu_item);
@@ -295,7 +295,7 @@ int16 main_loop(int16 mode) {
 				menu_display = MENU_AUSBLENDEN;
 			break;
 
-		case F2_KEY:
+		case Common::KEYCODE_F2:
 			_G(spieler).inv_cur = false;
 			menu_item = CUR_USE;
 			cursor_wahl(menu_item);
@@ -303,7 +303,7 @@ int16 main_loop(int16 mode) {
 				menu_display = MENU_AUSBLENDEN;
 			break;
 
-		case F3_KEY:
+		case Common::KEYCODE_F3:
 			_G(spieler).inv_cur = false;
 			menu_item = CUR_LOOK;
 			cursor_wahl(menu_item);
@@ -311,7 +311,7 @@ int16 main_loop(int16 mode) {
 				menu_display = MENU_AUSBLENDEN;
 			break;
 
-		case F4_KEY:
+		case Common::KEYCODE_F4:
 			_G(spieler).inv_cur = false;
 			menu_item = CUR_TALK;
 			cursor_wahl(menu_item);
@@ -319,8 +319,8 @@ int16 main_loop(int16 mode) {
 				menu_display = MENU_AUSBLENDEN;
 			break;
 
-		case F5_KEY:
-		case SPACE:
+		case Common::KEYCODE_F5:
+		case Common::KEYCODE_SPACE:
 			_G(tmp_menu_item) = menu_item;
 			maus_old_x = minfo.x;
 			maus_old_y = minfo.y;
@@ -345,7 +345,7 @@ int16 main_loop(int16 mode) {
 			kbinfo.key_code = '\0';
 			break;
 
-		case F6_KEY:
+		case Common::KEYCODE_F6:
 			flags.SaveMenu = true;
 
 			_G(out)->setze_zeiger(screen0);
@@ -366,7 +366,7 @@ int16 main_loop(int16 mode) {
 			_G(out)->setze_zeiger(workptr);
 			break;
 
-		case ESC:
+		case Common::KEYCODE_ESCAPE:
 			if (menu_display == 0) {
 				menu_entry();
 				_G(tmp_menu_item) = menu_item;
@@ -387,7 +387,7 @@ int16 main_loop(int16 mode) {
 			}
 			break;
 
-		case ENTER:
+		case Common::KEYCODE_RETURN:
 			switch (menu_item) {
 			case CUR_INVENT:
 
@@ -456,22 +456,18 @@ int16 main_loop(int16 mode) {
 			}
 			break;
 
-		case CURSOR_RIGHT:
-		case CURSOR_LEFT:
-		case CURSOR_UP:
-		case CURSOR_DOWN:
+		case Common::KEYCODE_RIGHT:
+		case Common::KEYCODE_LEFT:
+		case Common::KEYCODE_UP:
+		case Common::KEYCODE_DOWN:
 			kb_cur_action(kbinfo.scan_code, 0);
 			break;
 
-		case X_KEY + ALT:
-			ende = 1;
-			break;
-
 		case 41:
 			_G(spieler).DispFlag ^= 1;
 			break;
 
-		case TAB:
+		case Common::KEYCODE_TAB:
 			if (menu_display == 0 && _G(spieler).DispFlag) {
 				if (_G(spieler).InvDisp < 3)
 					++_G(spieler).InvDisp;
@@ -794,22 +790,22 @@ void kb_mov(int16 mode) {
 	ende = 0;
 	while (!ende) {
 		switch (_G(in)->get_switch_code()) {
-		case CURSOR_RIGHT:
+		case Common::KEYCODE_RIGHT:
 			if (minfo.x < 320 - _G(spieler).CurBreite)
 				minfo.x += 2;
 			break;
 
-		case CURSOR_LEFT:
+		case Common::KEYCODE_LEFT:
 			if (minfo.x > 1)
 				minfo.x -= 2;
 			break;
 
-		case CURSOR_UP:
+		case Common::KEYCODE_UP:
 			if (minfo.y > 1)
 				minfo.y -= 2;
 			break;
 
-		case CURSOR_DOWN:
+		case Common::KEYCODE_DOWN:
 			if (minfo.y < 210 - _G(spieler).CurHoehe)
 				minfo.y += 2;
 			break;
@@ -830,7 +826,7 @@ void kb_mov(int16 mode) {
 
 void kb_cur_action(int16 key, int16 mode) {
 	switch (key) {
-	case CURSOR_RIGHT:
+	case Common::KEYCODE_RIGHT:
 		if (menu_display == MENU_EINBLENDEN) {
 			if (menu_item < 5)
 				++menu_item;
@@ -841,7 +837,7 @@ void kb_cur_action(int16 key, int16 mode) {
 		}
 		break;
 
-	case CURSOR_LEFT:
+	case Common::KEYCODE_LEFT:
 		if (menu_display == MENU_EINBLENDEN) {
 			if (menu_item > 0)
 				--menu_item;
@@ -852,14 +848,14 @@ void kb_cur_action(int16 key, int16 mode) {
 		}
 		break;
 
-	case CURSOR_UP:
+	case Common::KEYCODE_UP:
 		if (menu_display == MENU_EINBLENDEN) {
 			if (_G(spieler).MainMenuY > 1)
 				_G(spieler).MainMenuY -= 2;
 		}
 		break;
 
-	case CURSOR_DOWN:
+	case Common::KEYCODE_DOWN:
 		if (menu_display == MENU_EINBLENDEN) {
 			if (_G(spieler).MainMenuY < 163)
 				_G(spieler).MainMenuY += 2;
@@ -889,16 +885,16 @@ void maus_action() {
 		_G(inv_disp_ok) = false;
 	}
 	if (atds->aad_get_status() == -1) {
-		if (minfo.button || kbinfo.key_code == ESC || kbinfo.key_code == ENTER) {
+		if (minfo.button || kbinfo.key_code == Common::KEYCODE_ESCAPE || kbinfo.key_code == Common::KEYCODE_RETURN) {
 
-			if (minfo.button == 2 || kbinfo.key_code == ESC) {
+			if (minfo.button == 2 || kbinfo.key_code == Common::KEYCODE_ESCAPE) {
 				if (!flags.main_maus_flag) {
-					kbinfo.scan_code = ESC;
+					kbinfo.scan_code = Common::KEYCODE_ESCAPE;
 				}
-			} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 				if (!flags.main_maus_flag) {
 					if (menu_display == MENU_EINBLENDEN)
-						kbinfo.scan_code = ENTER;
+						kbinfo.scan_code = Common::KEYCODE_RETURN;
 					else if (_G(spieler).AkInvent != -1) {
 						if (_G(inv_disp_ok)) {
 							if (_G(spieler).inv_cur) {
@@ -1270,9 +1266,9 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				while (mov->auto_go_status()) {
 					if (SHOULD_QUIT)
 						return 0;
-					if (_G(in)->get_switch_code() == ESC) {
+					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 						if (flags.ExitMov || flags.BreakAMov) {
-							key = ESC;
+							key = Common::KEYCODE_ESCAPE;
 							mov->stop_auto_go();
 							move_status = false;
 						}
@@ -1289,7 +1285,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 				get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 				while (!ende) {
-					if (_G(in)->get_switch_code() == ESC || key == ESC) {
+					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
 						if (flags.ExitMov || flags.BreakAMov) {
 							spieler_vector[p_nr].Count = 0;
 							move_status = false;
@@ -1342,7 +1338,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 		if (mode == ANI_WAIT) {
 			while (!ende) {
-				if (_G(in)->get_switch_code() == ESC) {
+				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 					if (flags.ExitMov || flags.BreakAMov) {
 						spieler_vector[p_nr].Count = 0;
 						move_status = false;
@@ -1702,9 +1698,9 @@ void get_user_key(int16 mode) {
 
 	if (!_G(inv_disp_ok)) {
 		switch (_G(in)->get_switch_code()) {
-		case F5_KEY:
-		case SPACE:
-		case ESC:
+		case Common::KEYCODE_F5:
+		case Common::KEYCODE_SPACE:
+		case Common::KEYCODE_ESCAPE:
 			maus_old_x = minfo.x;
 			maus_old_y = minfo.y;
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 5e21f4ac879..1b5c676a241 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -298,7 +298,7 @@ void ads_menu() {
 
 		switch (_G(in)->get_switch_code()) {
 		case 255:
-		case ENTER:
+		case Common::KEYCODE_RETURN:
 			if (cur_y < ads_item_anz && cur_y >= 0 && ads_push == false) {
 				_G(cur_display) = false;
 				ads_push = true;
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 95108f9fa9c..4c4d2a7c609 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -113,7 +113,7 @@ int16 InputMgr::get_switch_code() {
 
 	if (_mouseInfoBlk) {
 		if (_mouseInfoBlk->button == 2) {
-			switch_code = ESC;
+			switch_code = Common::KEYCODE_ESCAPE;
 		} else if (_mouseInfoBlk->button == 1)
 			switch_code = 255;
 		else if (_mouseInfoBlk->button == 4)
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 4634951c8db..8df860de943 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -84,70 +84,6 @@ namespace Chewy {
 #define SPRITESAVE 1
 
 #define ALT 0x1000
-#define SHIFT_LEFT Common::KEYCODE_LSHIFT
-#define SHIFT_RIGHT Common::KEYCODE_RSHIFT
-#define CURSOR_LEFT Common::KEYCODE_LEFT
-#define CURSOR_RIGHT Common::KEYCODE_RIGHT
-#define CURSOR_UP Common::KEYCODE_UP
-#define CURSOR_DOWN Common::KEYCODE_DOWN
-#define PAGE_UP Common::KEYCODE_PAGEUP
-#define PAGE_DOWN Common::KEYCODE_PAGEDOWN
-#define BS_KEY Common::KEYCODE_BACKSPACE
-#define PAUSE_KEY Common::KEYCODE_PAUSE
-#define PLUS Common::KEYCODE_PLUS
-#define MINUS Common::KEYCODE_MINUS
-#define TAB Common::KEYCODE_TAB
-#define ESC Common::KEYCODE_ESCAPE
-#define ENTER Common::KEYCODE_RETURN
-#define SPACE Common::KEYCODE_SPACE
-#define A_KEY Common::KEYCODE_a
-#define B_KEY Common::KEYCODE_b
-#define C_KEY Common::KEYCODE_c
-#define D_KEY Common::KEYCODE_d
-#define E_KEY Common::KEYCODE_e
-#define F_KEY Common::KEYCODE_f
-#define G_KEY Common::KEYCODE_g
-#define H_KEY Common::KEYCODE_h
-#define I_KEY Common::KEYCODE_i
-#define J_KEY Common::KEYCODE_j
-#define K_KEY Common::KEYCODE_k
-#define L_KEY Common::KEYCODE_l
-#define M_KEY Common::KEYCODE_m
-#define N_KEY Common::KEYCODE_n
-#define O_KEY Common::KEYCODE_o
-#define P_KEY Common::KEYCODE_p
-#define Q_KEY Common::KEYCODE_q
-#define R_KEY Common::KEYCODE_r
-#define S_KEY Common::KEYCODE_s
-#define T_KEY Common::KEYCODE_t
-#define U_KEY Common::KEYCODE_u
-#define V_KEY Common::KEYCODE_v
-#define W_KEY Common::KEYCODE_w
-#define X_KEY Common::KEYCODE_x
-#define Y_KEY Common::KEYCODE_y
-#define Z_KEY Common::KEYCODE_z
-#define F1_KEY Common::KEYCODE_F1
-#define F2_KEY Common::KEYCODE_F2
-#define F3_KEY Common::KEYCODE_F3
-#define F4_KEY Common::KEYCODE_F4
-#define F5_KEY Common::KEYCODE_F5
-#define F6_KEY Common::KEYCODE_F6
-#define F7_KEY Common::KEYCODE_F7
-#define F8_KEY Common::KEYCODE_F8
-#define F9_KEY Common::KEYCODE_F9
-#define F10_KEY Common::KEYCODE_F10
-#define F11_KEY Common::KEYCODE_F11
-#define F12_KEY Common::KEYCODE_F12
-#define KEY_1 Common::KEYCODE_1
-#define KEY_2 Common::KEYCODE_2
-#define KEY_3 Common::KEYCODE_3
-#define KEY_4 Common::KEYCODE_4
-#define KEY_5 Common::KEYCODE_5
-#define KEY_6 Common::KEYCODE_6
-#define KEY_7 Common::KEYCODE_7
-#define KEY_8 Common::KEYCODE_8
-#define KEY_9 Common::KEYCODE_9
-#define KEY_0 Common::KEYCODE_0
 
 #define MAUS_LINKS 255
 #define MAUS_RECHTS 1
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7d3345024d5..bd8d5be162f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -813,7 +813,7 @@ int16 flic_user_function(int16 keys) {
 	if (_G(flic_val1) == 594 && keys == 18)
 		atds->stop_aad();
 
-	ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
+	ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	if (_G(flic_val2) == 140 && keys == 15)
 		ret = -2;
 	if (_G(flic_val2) == 144 && keys == 7)
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 49b919d57ee..43c3d649a65 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -308,7 +308,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 	int16 i;
 
 	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
+		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
 			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(font8x8);
@@ -319,7 +319,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				for (i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
-		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
@@ -561,7 +561,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 	int16 i;
 
 	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != ENTER) {
+		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
 			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(font8x8);
@@ -572,7 +572,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				for (i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
 			}
-		} else if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index cbe4cd98536..ff76e6e5c5d 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -339,7 +339,7 @@ void Room3::probeTransfer() {
 
 			if (i == 2 || i == 1) {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
-					if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+					if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 						if (is_cur_inventar(SPINAT_INV)) {
 							ssi[0].X = 120;
 							ssi[0].Y = 100;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 4fed7f611ec..de760faa03a 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -362,7 +362,7 @@ void Room39::set_tv() {
 }
 
 int16 Room39::setup_func(int16 frame) {
-	int16 action_ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
+	int16 action_ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 
 	if (_flag) {
 		if (frame == 121)
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room4.cpp
index d5f8886a6fe..c2b10bf4150 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room4.cpp
@@ -93,7 +93,7 @@ int16 Room4::sonde_comp() {
 		spr_info[0].ZEbene = 0;
 		spr_info[0].X = CUR_POS[cur_x][0];
 		spr_info[0].Y = CUR_POS[cur_x][1];
-		if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			curani.ani_anf = HAND_CLICK;
 			curani.ani_end = HAND_CLICK;
 		} else {
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room8.cpp
index a1bd549f9e7..1a3fa252b20 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room8.cpp
@@ -94,7 +94,7 @@ void Room8::start_verbrennen() {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
-			if (minfo.button == 1 || kbinfo.key_code == ENTER) {
+			if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 				if (minfo.x > 146 && minfo.x < 208 &&
 					minfo.y > 107 && minfo.y < 155)
 					break;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 93c00768390..acf9b55d71d 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -111,7 +111,7 @@ void Room89::entry() {
 		_G(out)->setze_zeiger(workptr);
 		_G(out)->cls();
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
-		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY ESC from F5");
+		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Common::KEYCODE_ESCAPE from F5");
 		_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
 		edi = -300;
 		int var30 = -200;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 589f2d32670..e35f52293cb 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2183,7 +2183,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->back2screen(workpage);
 
-		while (_G(in)->get_switch_code() != ESC) {
+		while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}


Commit: 640b101e5d2d47d29ae494b329964c6924516b8c
    https://github.com/scummvm/scummvm/commit/640b101e5d2d47d29ae494b329964c6924516b8c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Capitalize class names

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/bitclass.h
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/effect.cpp
    engines/chewy/effect.h
    engines/chewy/flic.cpp
    engines/chewy/flic.h
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/movclass.cpp
    engines/chewy/movclass.h
    engines/chewy/object.cpp
    engines/chewy/resource.h
    engines/chewy/room.cpp
    engines/chewy/rooms/room0.cpp
    engines/chewy/rooms/room3.cpp
    engines/chewy/sprite.cpp
    engines/chewy/text.cpp
    engines/chewy/text.h
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index de2b49085dc..0d11da11800 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -68,7 +68,7 @@ bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 }
 
 
-atdsys::atdsys() {
+Atdsys::Atdsys() {
 	SplitStringInit init_ssi = { nullptr, 0, 0, 220, 4, SPLIT_MITTE, 8, 8,};
 	_aadv.Dialog = false;
 	_aadv.StrNr = -1;
@@ -96,7 +96,7 @@ atdsys::atdsys() {
 	_inzeig = _G(in)->get_in_zeiger();
 }
 
-atdsys::~atdsys() {
+Atdsys::~Atdsys() {
 	for (int16 i = 0; i < MAX_HANDLE; i++)
 		close_handle(i);
 
@@ -104,28 +104,28 @@ atdsys::~atdsys() {
 		free(_invUseMem);
 }
 
-void atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
+void Atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
 	_atdsv.Font = font_adr;
 	_atdsv.Fvorx = fvorx;
 	_atdsv.Fhoehe = fhoehe;
 }
 
-void atdsys::set_delay(int16 *delay, int16 silent) {
+void Atdsys::set_delay(int16 *delay, int16 silent) {
 	_atdsv.Delay = delay;
 	_atdsv.Silent = silent;
 }
 
-void atdsys::set_string_end_func
+void Atdsys::set_string_end_func
 (void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)) {
 	_atdsv.aad_str = str_func;
 }
 
-void atdsys::setHasSpeech(bool hasSpeech) {
+void Atdsys::setHasSpeech(bool hasSpeech) {
 	_hasSpeech = hasSpeech;
 	updateSoundSettings();
 }
 
-void atdsys::updateSoundSettings() {
+void Atdsys::updateSoundSettings() {
 	_atdsv.Display = DISPLAY_TXT;
 
 	if (_hasSpeech) {
@@ -135,7 +135,7 @@ void atdsys::updateSoundSettings() {
 	}
 }
 
-int16 atdsys::get_delay(int16 txt_len) {
+int16 Atdsys::get_delay(int16 txt_len) {
 	int16 z_len = (_ssi->Width / _ssi->Fvorx) + 1;
 	int16 max_len = z_len * _ssi->Zeilen;
 	if (txt_len > max_len)
@@ -145,7 +145,7 @@ int16 atdsys::get_delay(int16 txt_len) {
 	return ret;
 }
 
-SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
+SplitStringRet *Atdsys::split_string(SplitStringInit *ssi_) {
 	_ssret.Anz = 0;
 	_ssret.Next = false;
 	_ssret.StrPtr = _splitPtr;
@@ -269,7 +269,7 @@ SplitStringRet *atdsys::split_string(SplitStringInit *ssi_) {
 	return &_ssret;
 }
 
-void atdsys::str_null2leer(char *str_start, char *str_end) {
+void Atdsys::str_null2leer(char *str_start, char *str_end) {
 	while (str_start < str_end) {
 		if (*str_start == 0)
 			*str_start = 32;
@@ -277,7 +277,7 @@ void atdsys::str_null2leer(char *str_start, char *str_end) {
 	}
 }
 
-void atdsys::calc_txt_win(SplitStringInit *ssi_) {
+void Atdsys::calc_txt_win(SplitStringInit *ssi_) {
 	if (ssi_->X - (ssi_->Width >> 1) < 2)
 		ssi_->X = 2;
 	else if (ssi_->X + (ssi_->Width >> 1) > (SCREEN_WIDTH - 2))
@@ -294,11 +294,11 @@ void atdsys::calc_txt_win(SplitStringInit *ssi_) {
 	}
 }
 
-void atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
+void Atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 	_ssi[nr] = ssinit[0];
 }
 
-Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
+Stream *Atdsys::pool_handle(const char *fname_, const char *fmode) {
 	Stream *handle = chewy_fopen(fname_, fmode);
 	if (handle) {
 		_atdshandle[ATDS_HANDLE] = handle;
@@ -309,7 +309,7 @@ Stream *atdsys::pool_handle(const char *fname_, const char *fmode) {
 	return handle;
 }
 
-void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
+void Atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead Ch;
 	char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
@@ -349,7 +349,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 		error("Error reading from %s", fname_);
 }
 
-void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
+void Atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
@@ -379,7 +379,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 	}
 }
 
-void atdsys::close_handle(int16 mode) {
+void Atdsys::close_handle(int16 mode) {
 	Stream *stream = _atdshandle[mode];
 	if (stream) {
 		chewy_fclose(_atdshandle[mode]);
@@ -395,7 +395,7 @@ void atdsys::close_handle(int16 mode) {
 	_atdsmem[mode] = nullptr;
 }
 
-char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
+char *Atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	char *tmp_adr = nullptr;
 	uint32 size = _G(mem)->file->get_poolsize(fname_, chunk_start, chunk_anz);
 	if (size) {
@@ -405,7 +405,7 @@ char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
 	return tmp_adr;
 }
 
-void atdsys::load_atds(int16 chunk_nr, int16 mode) {
+void Atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	ChunkHead Ch;
 	char *txt_adr = _atdsmem[mode];
 	Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(_atdshandle[mode]);
@@ -431,7 +431,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
 	}
 }
 
-void atdsys::save_ads_header(int16 dia_nr) {
+void Atdsys::save_ads_header(int16 dia_nr) {
 	ChunkHead Ch;
 	if (_atdshandle[ADH_HANDLE]) {
 		_G(mem)->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
@@ -458,7 +458,7 @@ void atdsys::save_ads_header(int16 dia_nr) {
 	}
 }
 
-void atdsys::crypt(char *txt_, uint32 size) {
+void Atdsys::crypt(char *txt_, uint32 size) {
 	uint8 *sp = (uint8 *)txt_;
 	for (uint32 i = 0; i < size; i++) {
 		*sp = -(*sp);
@@ -466,7 +466,7 @@ void atdsys::crypt(char *txt_, uint32 size) {
 	}
 }
 
-void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
+void Atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 	switch (mode) {
 	case ATS_DATEI:
 		_ats_st_header[0] = atsheader;
@@ -489,7 +489,7 @@ void atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 	}
 }
 
-void atdsys::set_ats_mem(int16 mode) {
+void Atdsys::set_ats_mem(int16 mode) {
 	switch (mode) {
 	case ATS_DATEI:
 		_ats_sheader = _ats_st_header[0];
@@ -516,7 +516,7 @@ void atdsys::set_ats_mem(int16 mode) {
 	}
 }
 
-bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
+bool Atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
 	*voc_nr = -1;
 	set_ats_mem(mode);
 	if (_atsmem) {
@@ -552,15 +552,15 @@ bool atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, in
 	return _atsv.Display;
 }
 
-void atdsys::stop_ats() {
+void Atdsys::stop_ats() {
 	_atsv.Display = false;
 }
 
-int16 atdsys::ats_get_status() {
+int16 Atdsys::ats_get_status() {
 	return _atsv.Display;
 }
 
-void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
+void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	if (_atsv.Display) {
 		if (_atdsv._eventsEnabled) {
 			switch (_G(in)->get_switch_code()) {
@@ -640,7 +640,7 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	}
 }
 
-char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mode) {
+char *Atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mode) {
 	char *str_ = nullptr;
 	set_ats_mem(mode);
 
@@ -685,7 +685,7 @@ char *atdsys::ats_get_txt(int16 txt_nr, int16 txt_mode, int16 *txt_anz, int16 mo
 	return str_;
 }
 
-void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
+void Atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode) {
 	set_ats_mem(mode);
 	uint8 status = _ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
 	int16 ak_nybble = (txt_mode + 1) % 2;
@@ -701,12 +701,12 @@ void atdsys::set_ats_str(int16 txt_nr, int16 txt_mode, int16 str_nr, int16 mode)
 	_ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2] = status;
 }
 
-void atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
+void Atdsys::set_ats_str(int16 txt_nr, int16 str_nr, int16 mode) {
 	for (int16 i = 0; i < 5; i++)
 		set_ats_str(txt_nr, i, str_nr, mode);
 }
 
-int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
+int16 Atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 	set_ats_mem(mode);
 	uint8 status = _ats_sheader[(txt_nr * MAX_ATS_STATUS) + (txt_mode + 1) / 2];
 	int16 ak_nybble = (txt_mode + 1) % 2;
@@ -718,23 +718,23 @@ int16 atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 	return (int16)lo_hi[ak_nybble];
 }
 
-int16 atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+int16 Atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
 	int16 ret = bit->is_bit(_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 	return ret;
 }
 
-void atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+void Atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
 	bit->set_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
-void atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
+void Atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
 	bit->del_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
-char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
+char *Atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 	char *strP = txt_adr;
 	int ende = 0;
 
@@ -756,7 +756,7 @@ char *atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 	return strP;
 }
 
-void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
+void Atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	char *start_str = *str_;
 
 	bool done1 = false;
@@ -801,7 +801,7 @@ void atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	}
 }
 
-void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
+void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
 	char *tmp_str = *str_;
 	char *start_str = *str_;
 	*anz = 0;
@@ -865,7 +865,7 @@ void atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 	}
 }
 
-int16 atdsys::start_aad(int16 dia_nr) {
+int16 Atdsys::start_aad(int16 dia_nr) {
 	if (_aadv.Dialog)
 		stop_aad();
 
@@ -896,12 +896,12 @@ int16 atdsys::start_aad(int16 dia_nr) {
 	return _aadv.Dialog;
 }
 
-void atdsys::stop_aad() {
+void Atdsys::stop_aad() {
 	_aadv.Dialog = false;
 	_aadv.StrNr = -1;
 }
 
-void atdsys::print_aad(int16 scrx, int16 scry) {
+void Atdsys::print_aad(int16 scrx, int16 scry) {
 	if (_aadv.Dialog) {
 		if (_atdsv._eventsEnabled) {
 			switch (_G(in)->get_switch_code()) {
@@ -1035,11 +1035,11 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
 	}
 }
 
-int16 atdsys::aad_get_status() {
+int16 Atdsys::aad_get_status() {
 	return _aadv.StrNr;
 }
 
-int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
+int16 Atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
 	*txt_len = 0;
 	char *ptr = str_;
 	int16 zeilen = 0;
@@ -1052,7 +1052,7 @@ int16 atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
 	return zeilen;
 }
 
-void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
+void Atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 	char *start_ptr = *ptr;
 
 	if (start_ptr[0] == (char)BLOCKENDE &&
@@ -1092,7 +1092,7 @@ void atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 	}
 }
 
-bool  atdsys::ads_start(int16 dia_nr) {
+bool  Atdsys::ads_start(int16 dia_nr) {
 	bool ret = false;
 
 	load_atds(dia_nr, ADS_DATEI);
@@ -1120,17 +1120,17 @@ bool  atdsys::ads_start(int16 dia_nr) {
 	return ret;
 }
 
-void atdsys::stop_ads() {
+void Atdsys::stop_ads() {
 	_adsv.Dialog = -1;
 	_adsv.AutoDia = false;
 
 }
 
-int16 atdsys::ads_get_status() {
+int16 Atdsys::ads_get_status() {
 	return _adsv.Dialog;
 }
 
-int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
+int16 Atdsys::check_item(int16 block_nr, int16 item_nr) {
 	int16 ret = true;
 	char *tmp_adr = _adsv.Ptr;
 	ads_search_block(block_nr, &tmp_adr);
@@ -1143,7 +1143,7 @@ int16 atdsys::check_item(int16 block_nr, int16 item_nr) {
 	return ret;
 }
 
-char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
+char **Atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 	*anzahl = 0;
 	memset(_ePtr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
 	if (_adsv.Dialog != -1) {
@@ -1169,7 +1169,7 @@ char **atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 	return _ePtr;
 }
 
-AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
+AdsNextBlk *Atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 	_adsnb.BlkNr = blk_nr;
 	if (!_aadv.Dialog) {
 		if (!_adsv.AutoDia) {
@@ -1189,7 +1189,7 @@ AdsNextBlk *atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 	return &_adsnb;
 }
 
-AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
+AdsNextBlk *Atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
 	if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_SHOW_BIT) == false)
 		_adsBlock[blk_nr].Show[_eNr[item_nr]] = false;
 	_adsnb.EndNr = _eNr[item_nr];
@@ -1220,7 +1220,7 @@ AdsNextBlk *atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
 	return &_adsnb;
 }
 
-int16 atdsys::return_block(AdsBlock *ab) {
+int16 Atdsys::return_block(AdsBlock *ab) {
 	_adsStackPtr -= 1;
 	int16 ret = -1;
 	bool ende = false;
@@ -1238,7 +1238,7 @@ int16 atdsys::return_block(AdsBlock *ab) {
 	return ret;
 }
 
-void atdsys::ads_search_block(int16 blk_nr, char **ptr) {
+void Atdsys::ads_search_block(int16 blk_nr, char **ptr) {
 	char *start_ptr = *ptr;
 	bool ende = false;
 	while (!ende) {
@@ -1257,7 +1257,7 @@ void atdsys::ads_search_block(int16 blk_nr, char **ptr) {
 	}
 }
 
-void atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
+void Atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
 	char *start_ptr = *blk_adr + 1;
 	bool ende = false;
 	while (!ende) {
@@ -1275,7 +1275,7 @@ void atdsys::ads_search_item(int16 item_nr, char **blk_adr) {
 	}
 }
 
-int16 atdsys::start_ads_auto_dia(char *item_adr) {
+int16 Atdsys::start_ads_auto_dia(char *item_adr) {
 	_aadv.Dialog = false;
 	if (item_adr) {
 		_aadv.Person = _adsv.Person;
@@ -1300,7 +1300,7 @@ int16 atdsys::start_ads_auto_dia(char *item_adr) {
 	return _aadv.Dialog;
 }
 
-void atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
+void Atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 	if (_adsv.Dialog == dia_nr) {
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = false;
@@ -1312,7 +1312,7 @@ void atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 	}
 }
 
-void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
+void Atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 	if (_adsv.Dialog == dia_nr) {
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = true;
@@ -1324,7 +1324,7 @@ void atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 	}
 }
 
-int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
+int16 Atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 	int16 txt_nr = -1;
 	if (cur_inv != -1) {
 		if (_invBlockNr != cur_inv) {
@@ -1365,7 +1365,7 @@ int16 atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 	return txt_nr;
 }
 
-int16 atdsys::getStereoPos(int16 x) {
+int16 Atdsys::getStereoPos(int16 x) {
 	// TODO: Convert to ScummVM's balance (-127 ... 0 ... 127)
 	return 0;
 #if 0
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 19f84133f19..3a876e5ab5c 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -243,10 +243,10 @@ struct SplitStringInit {
 	int16 FHoehe;
 };
 
-class atdsys {
+class Atdsys {
 public:
-	atdsys();
-	~atdsys();
+	Atdsys();
+	~Atdsys();
 
 	void set_font(byte *font_adr, int16 fvorx, int16 fhoehe);
 	void set_delay(int16 *delay, int16 silent);
diff --git a/engines/chewy/bitclass.h b/engines/chewy/bitclass.h
index 3d1560ff0de..e9ad786507b 100644
--- a/engines/chewy/bitclass.h
+++ b/engines/chewy/bitclass.h
@@ -24,11 +24,10 @@
 
 namespace Chewy {
 
-class bitclass {
-
+class BitClass {
 public:
-	bitclass() {}
-	~bitclass() {}
+	BitClass() {}
+	~BitClass() {}
 
 	bool is_bit(int16 value, int16 bit) { return (value & bit) != 0; }
 	void set_bit(int16 *value, int16 bit) { *value |= bit; }
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 1d45248bc99..b628365368d 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -25,7 +25,7 @@
 
 namespace Chewy {
 
-cursor::cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
+Cursor::Cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
 	_out = iout;
 	_in = iin;
 	_scrWidth = _G(scr_w);
@@ -44,10 +44,10 @@ cursor::cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
 	}
 }
 
-cursor::~cursor() {
+Cursor::~Cursor() {
 }
 
-void cursor::plot_cur() {
+void Cursor::plot_cur() {
 	if (_maus_da && _sichtbar) {
 		if (cur_move) {
 			mouse_active = true;
@@ -79,7 +79,7 @@ void cursor::plot_cur() {
 	}
 }
 
-void cursor::show_cur() {
+void Cursor::show_cur() {
 	if ((_maus_da) && (!_sichtbar)) {
 		_sichtbar = true;
 		mouse_active = true;
@@ -100,7 +100,7 @@ void cursor::show_cur() {
 	}
 }
 
-void cursor::hide_cur() {
+void Cursor::hide_cur() {
 	if ((_maus_da) && (_sichtbar)) {
 		if (!_curblk->no_back) {
 			_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
@@ -109,13 +109,13 @@ void cursor::hide_cur() {
 	}
 }
 
-void cursor::set_cur_ani(cur_ani *ani1) {
+void Cursor::set_cur_ani(cur_ani *ani1) {
 	_ani = ani1;
 	_cur_aufruf = 0;
 	_ani_count = _ani->ani_anf;
 }
 
-void cursor::move(int16 x, int16 y) {
+void Cursor::move(int16 x, int16 y) {
 	if (_maus_da) {
 		mouse_active = true;
 
@@ -132,7 +132,7 @@ void cursor::move(int16 x, int16 y) {
 	}
 }
 
-void cursor::wait_taste_los(bool maus_plot) {
+void Cursor::wait_taste_los(bool maus_plot) {
 	int16 is_mouse = 0;
 	if (_maus_da) {
 		g_events->update();
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index b4542436b78..5bcfb8a9528 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -27,11 +27,11 @@
 
 namespace Chewy {
 
-class cursor {
+class Cursor {
 public:
-	cursor();
-	cursor(McgaGraphics *out, InputMgr *in, cur_blk *curblk);
-	~cursor();
+	Cursor();
+	Cursor(McgaGraphics *out, InputMgr *in, cur_blk *curblk);
+	~Cursor();
 
 	void plot_cur();
 	void show_cur();
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 10fed822fc5..fcb7bbd5408 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -48,7 +48,7 @@ bool RaumAutoMov::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool sound_def_blk::load(Common::SeekableReadStream *src) {
+bool SoundDefBlk::load(Common::SeekableReadStream *src) {
 	int i;
 
 	for (i = 0; i < MAX_SOUNDS; ++i)
@@ -69,7 +69,7 @@ bool sound_def_blk::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool ani_detail_info::load(Common::SeekableReadStream *src) {
+bool AniDetailInfo::load(Common::SeekableReadStream *src) {
 	x = src->readSint16LE();
 	y = src->readSint16LE();
 	start_flag = src->readByte();
@@ -91,7 +91,7 @@ bool ani_detail_info::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool static_detail_info::load(Common::SeekableReadStream *src) {
+bool StaticDetailInfo::load(Common::SeekableReadStream *src) {
 	x = src->readSint16LE();
 	y = src->readSint16LE();
 	SprNr = src->readSint16LE();
@@ -102,7 +102,7 @@ bool static_detail_info::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool room_detail_info::load(Common::SeekableReadStream *src) {
+bool RoomDetailInfo::load(Common::SeekableReadStream *src) {
 	int i;
 
 	StaticDetailAnz = src->readSint16LE();
@@ -134,8 +134,8 @@ bool RdiDateiHeader::load(Common::SeekableReadStream *src) {
 }
 
 
-detail::detail() {
-	int16 size = sizeof(room_detail_info);
+Detail::Detail() {
+	int16 size = sizeof(RoomDetailInfo);
 	char *tptr = (char *)&_rdi;
 
 	for (int16 i = 0; i < size; i++)
@@ -161,18 +161,18 @@ detail::detail() {
 	_directTafAni = OFF;
 }
 
-detail::~detail() {
+Detail::~Detail() {
 	_directTafAni = OFF;
 }
 
-void detail::load_rdi(const char *fname_, int16 room_nr) {
+void Detail::load_rdi(const char *fname_, int16 room_nr) {
 	Common::File f;
 	taf_info *tmprdi = _rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
 		if (_rdi_datei_header.load(&f)) {
 			if (!scumm_strnicmp(_rdi_datei_header.Id, "RDI", 3)) {
-				f.seek(room_nr * room_detail_info::SIZE(), SEEK_CUR);
+				f.seek(room_nr * RoomDetailInfo::SIZE(), SEEK_CUR);
 
 				if (!_rdi.load(&f)) {
 					error("load_rdi error");
@@ -192,7 +192,7 @@ void detail::load_rdi(const char *fname_, int16 room_nr) {
 	_rdi.dptr = tmprdi;
 }
 
-void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
+void Detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 	if (strcmp(_tafName, fname_)) {
 		if (_rdi.dptr) {
 			if (_fullTaf) {
@@ -218,7 +218,7 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 	}
 }
 
-void detail::del_dptr() {
+void Detail::del_dptr() {
 	if (_rdi.dptr) {
 		if (_fullTaf)
 			free((char *)_rdi.dptr);
@@ -231,7 +231,7 @@ void detail::del_dptr() {
 	}
 }
 
-void detail::load_taf_tbl(taf_info *fti) {
+void Detail::load_taf_tbl(taf_info *fti) {
 	if (!fti) {
 		fti = _rdi.dptr;
 	}
@@ -247,7 +247,7 @@ void detail::load_taf_tbl(taf_info *fti) {
 	}
 }
 
-taf_info *detail::init_taf_tbl(const char *fname_) {
+taf_info *Detail::init_taf_tbl(const char *fname_) {
 	taf_info *Tt = 0;
 	SpriteResource *res = new SpriteResource(_tafName);
 	int16 anz = res->getChunkCount();
@@ -265,7 +265,7 @@ taf_info *detail::init_taf_tbl(const char *fname_) {
 	return Tt;
 }
 
-void detail::del_taf_tbl(taf_info *Tt) {
+void Detail::del_taf_tbl(taf_info *Tt) {
 	if (!Tt) {
 		Tt = _rdi.dptr;
 	}
@@ -276,7 +276,7 @@ void detail::del_taf_tbl(taf_info *Tt) {
 	free((char *) Tt);
 }
 
-void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
+void Detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
 	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
@@ -285,7 +285,7 @@ void detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 	}
 }
 
-void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
+void Detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
 
@@ -300,21 +300,21 @@ void detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
 	delete res;
 }
 
-void detail::set_static_spr(int16 nr, int16 spr_nr) {
+void Detail::set_static_spr(int16 nr, int16 spr_nr) {
 	_rdi.Sinfo[nr].SprNr = spr_nr;
 }
 
-void detail::hide_static_spr(int16 nr) {
+void Detail::hide_static_spr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
 		_rdi.Sinfo[nr].Hide = true;
 }
 
-void detail::show_static_spr(int16 nr) {
+void Detail::show_static_spr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
 		_rdi.Sinfo[nr].Hide = false;
 }
 
-byte *detail::get_static_image(int16 det_nr) {
+byte *Detail::get_static_image(int16 det_nr) {
 	byte *ret;
 	int16 index = _rdi.Sinfo[det_nr].SprNr;
 	if (index == -1)
@@ -324,7 +324,7 @@ byte *detail::get_static_image(int16 det_nr) {
 	return ret;
 }
 
-void detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
+void Detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
 	if (korr_flag) {
 		int16 *Cxy = _rdi.dptr->korrektur + (_rdi.Sinfo[det_nr].SprNr << 1);
 		x += Cxy[0];
@@ -335,17 +335,17 @@ void detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr
 	_rdi.Sinfo[det_nr].Hide = hide;
 }
 
-void detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
+void Detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
 	_rdi.Ainfo[det_nr].x = x;
 	_rdi.Ainfo[det_nr].y = y;
 }
 
-void detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
+void Detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
 	*start = _rdi.Ainfo[ani_nr].start_ani;
 	*end = _rdi.Ainfo[ani_nr].end_ani;
 }
 
-void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
+void Detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 	if (start > end) {
 		int16 tmp = start;
 		start = end;
@@ -355,55 +355,55 @@ void detail::set_ani(int16 ani_nr, int16 start, int16 end) {
 	_rdi.Ainfo[ani_nr].end_ani = end;
 }
 
-byte *detail::get_image(int16 spr_nr) {
+byte *Detail::get_image(int16 spr_nr) {
 	byte *ret = _rdi.dptr->image[spr_nr];
 	return ret;
 }
 
-ani_detail_info *detail::get_ani_detail(int16 ani_nr) {
-	ani_detail_info *ret = &_rdi.Ainfo[ani_nr];
+AniDetailInfo *Detail::get_ani_detail(int16 ani_nr) {
+	AniDetailInfo *ret = &_rdi.Ainfo[ani_nr];
 	return ret;
 }
 
-int16 *detail::get_korrektur_tbl() {
+int16 *Detail::get_korrektur_tbl() {
 	int16 *ret;
 	ret = _rdi.dptr->korrektur;
 	return ret;
 }
 
-void detail::init_taf(taf_info *dptr) {
+void Detail::init_taf(taf_info *dptr) {
 	_rdi.dptr = dptr;
 }
 
-taf_info *detail::get_taf_info() {
+taf_info *Detail::get_taf_info() {
 	taf_info *ret;
 	ret = _rdi.dptr;
 	return ret;
 }
 
-room_detail_info *detail::get_room_detail_info() {
+RoomDetailInfo *Detail::get_room_detail_info() {
 	return &_rdi;
 }
 
-void detail::freeze_ani() {
+void Detail::freeze_ani() {
 	_aniFreezeflag = true;
 }
 
-void detail::unfreeze_ani() {
+void Detail::unfreeze_ani() {
 	_aniFreezeflag = false;
 }
 
-void detail::set_static_ani(int16 ani_nr, int16 static_nr) {
+void Detail::set_static_ani(int16 ani_nr, int16 static_nr) {
 	_rdi.Ainfo[ani_nr].show_1_phase = true;
 	if (static_nr != -1)
 		_rdi.Ainfo[ani_nr].phase_nr = static_nr;
 }
 
-void detail::del_static_ani(int16 ani_nr) {
+void Detail::del_static_ani(int16 ani_nr) {
 	_rdi.Ainfo[ani_nr].show_1_phase = false;
 }
 
-void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, int16 zoomx, int16 zoomy) {
+void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, int16 zoomx, int16 zoomy) {
 	if (start > end)
 		SWAP(start, end);
 
@@ -414,7 +414,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 		end = MAXDETAILS - 1;
 
 	for (int16 i = start; (i <= end) && (!_G(modul)); i++) {
-		ani_detail_info *adiptr = &_rdi.Ainfo[i];
+		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
 			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
@@ -490,7 +490,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 	}
 }
 
-void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end) {
+void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end) {
 	if (start > end)
 		SWAP(start, end);
 
@@ -510,9 +510,9 @@ void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 	}
 }
 
-void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
+void Detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 	if (nr != -1) {
-		ani_detail_info *adiptr;
+		AniDetailInfo *adiptr;
 		adiptr = &_rdi.Ainfo[nr];
 		if (rep)
 			adiptr->start_flag = rep;
@@ -527,29 +527,29 @@ void detail::start_detail(int16 nr, int16 rep, int16 reverse) {
 	}
 }
 
-void detail::stop_detail(int16 nr) {
+void Detail::stop_detail(int16 nr) {
 	if (nr >= 0 && nr < 32) {
-		ani_detail_info *adiptr = &_rdi.Ainfo[nr];
+		AniDetailInfo *adiptr = &_rdi.Ainfo[nr];
 		adiptr->start_flag = 0;
 	}
 }
 
-void detail::set_ani_delay(int16 nr, int16 del) {
-	ani_detail_info *adiptr = &_rdi.Ainfo[nr];
+void Detail::set_ani_delay(int16 nr, int16 del) {
+	AniDetailInfo *adiptr = &_rdi.Ainfo[nr];
 	adiptr->delay = del;
 }
 
-void detail::init_list(int16 *mv) {
+void Detail::init_list(int16 *mv) {
 	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
 		_rdi.mvect[i] = mv[i];
 }
 
-void detail::get_list(int16 *mv) {
+void Detail::get_list(int16 *mv) {
 	for (int16 i = 0; i < ((MAX_M_ITEMS - 1) << 2); i++)
 		mv[i] = _rdi.mvect[i];
 }
 
-int16 detail::maus_vector(int16 x, int16 y) {
+int16 Detail::maus_vector(int16 x, int16 y) {
 	int16 i, j;
 	i = -1;
 	for (j = 0; (j < (MAX_M_ITEMS - 1) << 2) && (i == -1); j += 4) {
@@ -563,7 +563,7 @@ int16 detail::maus_vector(int16 x, int16 y) {
 	return i;
 }
 
-int16 detail::get_ani_status(int16 det_nr) {
+int16 Detail::get_ani_status(int16 det_nr) {
 	int16 ret;
 	if (_rdi.Ainfo[det_nr].start_flag > 0)
 		ret = 1;
@@ -572,10 +572,10 @@ int16 detail::get_ani_status(int16 det_nr) {
 	return ret;
 }
 
-SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 spr_nr, int16 mode) {
+SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 spr_nr, int16 mode) {
 	if (det_nr > MAXDETAILS)
 		det_nr = MAXDETAILS - 1;
-	ani_detail_info *adiptr = &_rdi.Ainfo[det_nr];
+	AniDetailInfo *adiptr = &_rdi.Ainfo[det_nr];
 	if (spr_nr < adiptr->start_ani)
 		spr_nr = adiptr->start_ani;
 	if (spr_nr > adiptr->end_ani)
@@ -608,12 +608,12 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 	return _sprInfo;
 }
 
-void detail::set_global_delay(int16 delay) {
+void Detail::set_global_delay(int16 delay) {
 	_globalDelay = delay;
 	_globalDelay -= 2;
 }
 
-void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
+void Detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
 	float tmpx;
 	float tmpy;
 	float tmpx1;
@@ -631,21 +631,21 @@ void detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
 	*ky += (int16)tmpy;
 }
 
-void detail::disable_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
+void Detail::disable_detail_sound(int16 nr) {
+	SoundDefBlk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		sdb->sound_enable[i] = false;
 }
 
-void detail::enable_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
+void Detail::enable_detail_sound(int16 nr) {
+	SoundDefBlk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (int16 i = 0; i < MAX_SOUNDS; i++)
 		if (sdb->sound_index[i] != -1)
 			sdb->sound_enable[i] = true;
 }
 
-void detail::play_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
+void Detail::play_detail_sound(int16 nr) {
+	SoundDefBlk *sdb = &_rdi.Ainfo[nr].sfx;
 	Sound *sound = g_engine->_sound;
 	for (int16 k = 0; k < MAX_SOUNDS; k++) {
 		if ((sdb->sound_enable[k]) && (sdb->sound_index[k] != -1) &&
@@ -658,8 +658,8 @@ void detail::play_detail_sound(int16 nr) {
 	}
 }
 
-void detail::clear_detail_sound(int16 nr) {
-	sound_def_blk *sdb = &_rdi.Ainfo[nr].sfx;
+void Detail::clear_detail_sound(int16 nr) {
+	SoundDefBlk *sdb = &_rdi.Ainfo[nr].sfx;
 	for (short i = 0; i < MAX_SOUNDS; i++) {
 		sdb->sound_enable[i] = false;
 		sdb->sound_index[i] = -1;
@@ -672,20 +672,20 @@ void detail::clear_detail_sound(int16 nr) {
 	remove_unused_samples();
 }
 
-void detail::disable_room_sound() {
+void Detail::disable_room_sound() {
 	for (int16 i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
 	_G(sndPlayer)->endSound();
 }
 
-void detail::enable_room_sound() {
+void Detail::enable_room_sound() {
 	for (int16 i = 0; i < MAXDETAILS; i++)
 		enable_detail_sound(i);
 }
 
-void detail::clear_room_sound() {
+void Detail::clear_room_sound() {
 	for (int16 j = 0; j < MAXDETAILS; j++) {
-		sound_def_blk *sdb = &_rdi.Ainfo[j].sfx;
+		SoundDefBlk *sdb = &_rdi.Ainfo[j].sfx;
 		for (int16 i = 0; i < MAX_SOUNDS; i++) {
 			sdb->sound_enable[i] = false;
 			sdb->sound_index[i] = -1;
@@ -702,7 +702,7 @@ void detail::clear_room_sound() {
 	}
 }
 
-void detail::remove_unused_samples() {
+void Detail::remove_unused_samples() {
 	bool found = false;
 
 	for (int16 k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
@@ -721,11 +721,11 @@ void detail::remove_unused_samples() {
 	}
 }
 
-int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 scry) {
+int16 Detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 scry) {
 	int16 ok = false;
 	int16 detail_nr = -1;
 	for (int16 i = 0; i < MAXDETAILS && !ok; i++) {
-		ani_detail_info *adiptr = &_rdi.Ainfo[i];
+		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
 			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
@@ -748,12 +748,12 @@ int16 detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 	return detail_nr;
 }
 
-void detail::set_taf_ani_mem(byte *load_area) {
+void Detail::set_taf_ani_mem(byte *load_area) {
 	_tafLoadBuffer = load_area;
 	_directTafAni = ON;
 }
 
-void detail::load_taf_ani_sprite(int16 nr) {
+void Detail::load_taf_ani_sprite(int16 nr) {
 	SpriteResource *res = new SpriteResource(_tafName);
 	res->getSpriteData(nr, &_tafLoadBuffer, false);
 	delete res;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 5016cea9291..ad4cb709198 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -75,7 +75,7 @@ struct SprInfo {
 	int16 Y1 = 0;
 };
 
-struct sound_def_blk {
+struct SoundDefBlk {
 	bool sound_enable[MAX_SOUNDS];
 	int16 sound_index[MAX_SOUNDS];
 	int16 sound_start[MAX_SOUNDS];
@@ -90,7 +90,7 @@ struct sound_def_blk {
 	}
 };
 
-struct ani_detail_info {
+struct AniDetailInfo {
 	int16 x;
 	int16 y;
 	uint8 start_flag;
@@ -105,18 +105,18 @@ struct ani_detail_info {
 	int16 z_ebene;
 	uint8 load_flag;
 	uint8 zoom;
-	sound_def_blk sfx;
+	SoundDefBlk sfx;
 	int16 show_1_phase;
 	int16 phase_nr;
 
 	bool load(Common::SeekableReadStream *src);
 	static constexpr int SIZE() {
 		return 2 + 2 + 1 + 1 + 2 * 8 + 1 + 1 +
-			sound_def_blk::SIZE() + 2 + 2;
+			SoundDefBlk::SIZE() + 2 + 2;
 	}
 };
 
-struct static_detail_info {
+struct StaticDetailInfo {
 	int16 x;
 	int16 y;
 	int16 SprNr;
@@ -130,12 +130,12 @@ struct static_detail_info {
 	}
 };
 
-struct room_detail_info {
+struct RoomDetailInfo {
 	int16 StaticDetailAnz = 0;
 	int16 AniDetailAnz = 0;
 	taf_info *dptr = nullptr;
-	ani_detail_info Ainfo[MAXDETAILS];
-	static_detail_info Sinfo[MAXDETAILS];
+	AniDetailInfo Ainfo[MAXDETAILS];
+	StaticDetailInfo Sinfo[MAXDETAILS];
 	int16 mvect[MAX_M_ITEMS * 4] = { 0 };
 	int16 mtxt[MAX_M_ITEMS] = { 0 };
 	RaumInfo Ri;
@@ -146,8 +146,8 @@ struct room_detail_info {
 	bool load(Common::SeekableReadStream *src);
 	static constexpr int SIZE() {
 		return 2 + 2 + 4 +
-			(ani_detail_info::SIZE() * MAXDETAILS) +
-			(static_detail_info::SIZE() * MAXDETAILS) +
+			(AniDetailInfo::SIZE() * MAXDETAILS) +
+			(StaticDetailInfo::SIZE() * MAXDETAILS) +
 			(2 * MAX_M_ITEMS * 4) +
 			(2 * MAX_M_ITEMS) +
 			RaumInfo::SIZE() +
@@ -184,10 +184,10 @@ struct DeteditPrj {
 	char DummyFile[MAXPATH];
 };
 
-class detail {
+class Detail {
 public:
-	detail();
-	~detail();
+	Detail();
+	~Detail();
 
 	void load_rdi(const char *fname, int16 room_nr);
 
@@ -205,11 +205,11 @@ public:
 	void get_ani_werte(int16 ani_nr, int16 *start, int16 *end);
 	void set_ani(int16 ani_nr, int16 start, int16 end);
 	byte *get_image(int16 spr_nr);
-	ani_detail_info *get_ani_detail(int16 ani_nr);
+	AniDetailInfo *get_ani_detail(int16 ani_nr);
 	int16 *get_korrektur_tbl();
 	void init_taf(taf_info *dptr);
 	taf_info *get_taf_info();
-	room_detail_info *get_room_detail_info();
+	RoomDetailInfo *get_room_detail_info();
 
 	void set_static_ani(int16 ani_nr, int16 static_nr);
 
@@ -265,7 +265,7 @@ private:
 	void load_taf_ani_sprite(int16 nr);
 
 	void remove_unused_samples();
-	room_detail_info _rdi;
+	RoomDetailInfo _rdi;
 #ifdef DETEDIT
 	room_detail_info rdi_shadow;
 #endif
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 8a2892595de..6bfd53e26f7 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -25,12 +25,12 @@
 
 namespace Chewy {
 
-effect::effect() {
+Effect::Effect() {
 }
-effect::~effect() {
+Effect::~Effect() {
 }
 
-void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
+void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!_G(modul)) {
 		int16 *rnd_zeiger = (int16 *)rnd_speicher;
@@ -62,7 +62,7 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 	}
 }
 
-void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
+void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
 	if (!_G(modul)) {
 		int16 i = 0;
@@ -148,7 +148,7 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 	}
 }
 
-void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
+void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	if (mode) {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
 			_G(out)->setze_zeiger(workpage_ + 4);
@@ -166,7 +166,7 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	}
 }
 
-void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
+void Effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
 			_G(out)->setze_zeiger(workpage_ + 4);
diff --git a/engines/chewy/effect.h b/engines/chewy/effect.h
index cceeb499c69..96fd88b156d 100644
--- a/engines/chewy/effect.h
+++ b/engines/chewy/effect.h
@@ -32,10 +32,10 @@ enum BlendMode {
 	BLEND4 = 4
 };
 
-class effect {
+class Effect {
 public:
-	effect();
-	~effect();
+	Effect();
+	~Effect();
 
 	void blende1(byte *sram_speicher, byte *screen,
 		byte *palette, int16 frames, uint8 mode, int16 col);
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 3f84f9e70bc..ddaf00e0b86 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -96,16 +96,16 @@ void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
 }
 
 
-flic::flic() {
+Flic::Flic() {
 	Common::fill(&_sounds[0], &_sounds[50], (byte *)nullptr);
 	_soundBuffer = new byte[SOUND_SLOT_SIZE];
 }
 
-flic::~flic() {
+Flic::~Flic() {
 	delete[] _soundBuffer;
 }
 
-void flic::play(const char *fname, byte *vscreen, byte *load_p) {
+void Flic::play(const char *fname, byte *vscreen, byte *load_p) {
 
 	Stream *lhandle = File::open(fname);
 	if (lhandle) {
@@ -116,7 +116,7 @@ void flic::play(const char *fname, byte *vscreen, byte *load_p) {
 	}
 }
 
-int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
+int16 Flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	float ende;
 	int16 ret = 0;
@@ -164,7 +164,7 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
 	return ret;
 }
 
-int16 flic::decode_frame() {
+int16 Flic::decode_frame() {
 	ChunkHead chunk_header;
 	int16 action_ret = 0;
 
@@ -247,7 +247,7 @@ int16 flic::decode_frame() {
 	return action_ret;
 }
 
-void flic::col256_chunk(byte *tmp) {
+void Flic::col256_chunk(byte *tmp) {
 	int packets = *(int16 *)tmp;
 	tmp += 2;
 
@@ -283,7 +283,7 @@ void flic::col256_chunk(byte *tmp) {
 	}
 }
 
-void flic::col64_chunk(byte *tmp) {
+void Flic::col64_chunk(byte *tmp) {
 	int packets = *((int16 *)tmp);
 	tmp += 2;
 
@@ -316,7 +316,7 @@ void flic::col64_chunk(byte *tmp) {
 	}
 }
 
-void flic::delta_chunk_byte(byte *tmp) {
+void Flic::delta_chunk_byte(byte *tmp) {
 	byte last_byte = 0;
 	bool last_flag;
 	byte *abl = _virtScreen;
@@ -373,7 +373,7 @@ void flic::delta_chunk_byte(byte *tmp) {
 	}
 }
 
-int16 flic::custom_play(CustomInfo *ci) {
+int16 Flic::custom_play(CustomInfo *ci) {
 	int16 ret = 0;
 
 	_cInfo = ci;
@@ -437,7 +437,7 @@ int16 flic::custom_play(CustomInfo *ci) {
 	return ret;
 }
 
-void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
+void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
 	tmf_header *th = (tmf_header *)_music;
 
@@ -625,7 +625,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	}
 }
 
-int16 flic::decode_cframe() {
+int16 Flic::decode_cframe() {
 	byte *tmp_buf = _loadBuffer;
 	int16 update_flag = false;
 	int16 action_ret = 0;
@@ -709,7 +709,7 @@ int16 flic::decode_cframe() {
 	return action_ret;
 }
 
-void flic::free_sound(int16 nr) {
+void Flic::free_sound(int16 nr) {
 	byte *fsound = _sounds[nr];
 	long fsize = _sSize[nr];
 	if ((fsound != 0) && (fsize != 0)) {
@@ -727,19 +727,19 @@ void flic::free_sound(int16 nr) {
 	}
 }
 
-void flic::set_custom_user_function(int16(*user_funktion)(int16 frame)) {
+void Flic::set_custom_user_function(int16(*user_funktion)(int16 frame)) {
 	_customUser = user_funktion;
 }
 
-void flic::remove_custom_user_function() {
+void Flic::remove_custom_user_function() {
 	_customUser = nullptr;
 }
 
-void flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
+void Flic::set_flic_user_function(int16(*user_funktion)(int16 frame)) {
 	_flicUser = user_funktion;
 }
 
-void flic::remove_flic_user_function() {
+void Flic::remove_flic_user_function() {
 	_flicUser = nullptr;
 }
 
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index f2b20b26bbd..55f51dd0543 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -75,10 +75,10 @@ enum CustomTypes {
 extern void decode_flc(byte *vscr, const byte *dbuf);
 extern void decode_rle(byte *vscr, const byte *dbuf, int br, int h);
 
-class flic {
+class Flic {
 public:
-	flic();
-	~flic();
+	Flic();
+	~Flic();
 	void play(const char *fname, byte *vscreen, byte *load_p);
 
 	int16 play(Common::Stream *handle, byte *vscreen, byte *load_p);
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index b86d8796ad5..fdd1f147a47 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -27,7 +27,7 @@
 
 namespace Chewy {
 
-void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+void GedClass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 	Common::File f;
 	if (f.open(fname)) {
 		load_ged_pool(&f, Gh, ch_nr, speicher);
@@ -36,7 +36,7 @@ void gedclass::load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr,
 	}
 }
 
-void gedclass::load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+void GedClass::load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 	if (stream) {
 		stream->seek(0, SEEK_SET);
 		if (_gedPoolHeader.load(stream)) {
@@ -47,7 +47,7 @@ void gedclass::load_ged_pool(Common::SeekableReadStream *stream, GedChunkHeader
 	}
 }
 
-void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *stream, int16 nr, byte *speicher) {
+void GedClass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *stream, int16 nr, byte *speicher) {
 	if (stream) {
 		// Scan for the correct index entry
 		int i = 0;
@@ -72,7 +72,7 @@ void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
 	}
 }
 
-int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
+int16 GedClass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
 	int16 result = 0;
 	if (_gedUserFunc)
 		result = _gedUserFunc(speicher[((y / 8) * x_anz) + (x / 8)]);
@@ -80,7 +80,7 @@ int16 gedclass::ged_idx(int16 x, int16 y, int16 x_anz, byte *speicher) {
 	return result;
 }
 
-int16 gedclass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
+int16 GedClass::ged_idx(int16 g_idx, int16 x_anz, byte *speicher) {
 	int16 result = 0;
 	if (_gedUserFunc)
 		result = _gedUserFunc(speicher[g_idx]);
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 41ed01320d6..c7f269092f4 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -29,9 +29,9 @@ namespace Chewy {
 
 typedef int16(*GedUserFunc)(int16 idx_nr);
 
-class gedclass {
+class GedClass {
 public:
-	gedclass(GedUserFunc func) : _gedUserFunc(func) {
+	GedClass(GedUserFunc func) : _gedUserFunc(func) {
 	}
 
 	void load_ged_pool(const char *fname, GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e912e6e68f9..45ee1254da5 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -214,9 +214,9 @@ MovInfo auto_mov_obj[MAX_OBJ_MOV];
 MovPhasen mov_phasen[MAX_OBJ_MOV];
 MovLine mov_line[MAX_OBJ_MOV][5];
 TimerBlk ani_timer[MAX_TIMER_OBJ];
-room_detail_info *Rdi;
-static_detail_info *Sdi;
-ani_detail_info *Adi;
+RoomDetailInfo *Rdi;
+StaticDetailInfo *Sdi;
+AniDetailInfo *Adi;
 Flags flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 				0, 0, 0, 0, 0, 0, 0, 0, 0 };
 CustomInfo Ci;
@@ -233,17 +233,17 @@ int16 ani_stand_count[MAX_PERSON];
 
 bool ani_stand_flag[MAX_PERSON];
 
-bitclass *bit;
-gedclass *ged;
-text *txt;
+BitClass *bit;
+GedClass *ged;
+Text *txt;
 Room *room;
 Object *obj;
-timer *uhr;
-detail *det;
-effect *fx;
-atdsys *atds;
-flic *flc;
-movclass *mov;
+Timer *uhr;
+Detail *det;
+Effect *fx;
+Atdsys *atds;
+Flic *flc;
+MovClass *mov;
 
 char backged[] = { EPISODE1_GEP };
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index d74152e995d..1d70787f956 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -47,12 +47,12 @@ extern const int16 ANI_INVENT_END[3];
 extern const int16 SPZ_ANI_PH[][2];
 
 class ChewyFont;
-class cursor;
+class Cursor;
 class FontMgr;
 class InputMgr;
-class io_game;
+class IOGame;
 class McgaGraphics;
-class memory;
+class Memory;
 class SoundPlayer;
 
 class Globals {
@@ -137,10 +137,10 @@ public:
 	int16 _room_start_nr = 0;
 	int16 _TmpFrameSpeed = 0;
 	InputMgr *_in = nullptr;
-	memory *_mem = nullptr;
-	io_game *_iog = nullptr;
+	Memory *_mem = nullptr;
+	IOGame *_iog = nullptr;
 	McgaGraphics *_out = nullptr;
-	cursor *_cur = nullptr;
+	Cursor *_cur = nullptr;
 	SoundPlayer *_sndPlayer = nullptr;
 	ChewyFont *_font6 = nullptr;
 	ChewyFont *_font8 = nullptr;
@@ -268,9 +268,9 @@ extern MovInfo auto_mov_obj[MAX_OBJ_MOV];
 extern MovPhasen mov_phasen[MAX_OBJ_MOV];
 extern MovLine mov_line[MAX_OBJ_MOV][5];
 extern TimerBlk ani_timer[MAX_TIMER_OBJ];
-extern room_detail_info *Rdi;
-extern static_detail_info *Sdi;
-extern ani_detail_info *Adi;
+extern RoomDetailInfo *Rdi;
+extern StaticDetailInfo *Sdi;
+extern AniDetailInfo *Adi;
 extern Flags flags;
 extern CustomInfo Ci;
 extern GotoPkt gpkt;
@@ -286,17 +286,17 @@ extern int16 ani_stand_count[MAX_PERSON];
 
 extern bool ani_stand_flag[MAX_PERSON];
 
-extern bitclass *bit;
-extern gedclass *ged;
-extern text *txt;
+extern BitClass *bit;
+extern GedClass *ged;
+extern Text *txt;
 extern Room *room;
 extern Object *obj;
-extern timer *uhr;
-extern detail *det;
-extern effect *fx;
-extern atdsys *atds;
-extern flic *flc;
-extern movclass *mov;
+extern Timer *uhr;
+extern Detail *det;
+extern Effect *fx;
+extern Atdsys *atds;
+extern Flic *flc;
+extern MovClass *mov;
 
 extern char backged[];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 85887068651..63cd054e8d7 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -31,21 +31,21 @@ namespace Chewy {
 static void font_load();
 
 void standard_init() {
-	_G(mem) = new memory();
+	_G(mem) = new Memory();
 	_G(out) = new McgaGraphics();
 	_G(in) = new InputMgr();
-	fx = new effect();
-	txt = new text();
-	bit = new bitclass();
-	ged = new gedclass(&ged_user_func);
+	fx = new Effect();
+	txt = new Text();
+	bit = new BitClass();
+	ged = new GedClass(&ged_user_func);
 	room = new Room();
 	obj = new Object(&_G(spieler));
-	uhr = new timer(MAX_TIMER_OBJ, ani_timer);
-	det = new detail();
-	atds = new atdsys();
+	uhr = new Timer(MAX_TIMER_OBJ, ani_timer);
+	det = new Detail();
+	atds = new Atdsys();
 	_G(sndPlayer) = new SoundPlayer();
-	flc = new flic();
-	mov = new movclass();
+	flc = new Flic();
+	mov = new MovClass();
 
 	_G(out)->init();
 	_G(out)->cls();
@@ -75,10 +75,10 @@ void standard_init() {
 	curani.ani_end = 0;
 	curani.delay = 0;
 	
-	_G(cur) = new cursor(_G(out), _G(in), &curblk);
+	_G(cur) = new Cursor(_G(out), _G(in), &curblk);
 	_G(cur)->set_cur_ani(&curani);
 
-	_G(iog) = new io_game(_G(out), _G(in), _G(cur));
+	_G(iog) = new IOGame(_G(out), _G(in), _G(cur));
 	strcpy(ioptr.id, "CHE");
 	strcpy(ioptr.save_path, SAVEDIR);
 	ioptr.delay = 8;
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index bce951b9261..961f0df9ec1 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -48,16 +48,16 @@ static const char AB_TBL_G[4][3] = {
 	{ FSTRING11 }, { FSTRING12 }, { FSTRING13 }, { FSTRING14 }
 };
 
-io_game::io_game(McgaGraphics *iout, InputMgr *iin, cursor *curp) {
+IOGame::IOGame(McgaGraphics *iout, InputMgr *iin, Cursor *curp) {
 	_out = iout;
 	_in = iin;
 	_cur = curp;
 }
 
-io_game::~io_game() {
+IOGame::~IOGame() {
 }
 
-int16 io_game::io_menu(iog_init *iostruc) {
+int16 IOGame::io_menu(iog_init *iostruc) {
 	int16 max_scroll = 20;
 	int16 i, j, y;
 	char ende = 0, mouse_f = 1;
@@ -425,7 +425,7 @@ int16 io_game::io_menu(iog_init *iostruc) {
 	return ret;
 }
 
-void io_game::mark_eintrag(int16 y, int16 nr) {
+void IOGame::mark_eintrag(int16 y, int16 nr) {
 	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10,
 	              _io->m_col[1], _io->m_col[0], _io->m_col[4]);
 	_out->printxy(_io->popx + 10, y + 2, _io->m_col[2], 300, _scrWidth, "%d.", nr + 1);
@@ -448,7 +448,7 @@ void io_game::mark_eintrag(int16 y, int16 nr) {
 	}
 }
 
-void io_game::unmark_eintrag(int16 y, int16 nr) {
+void IOGame::unmark_eintrag(int16 y, int16 nr) {
 	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10, _io->m_col[3],
 	              _io->m_col[3], _io->m_col[3]);
 	_out->printxy(_io->popx + 10, y + 2, _io->m_col[5], 300, _scrWidth, "%d.", nr + 1);
@@ -462,7 +462,7 @@ void io_game::unmark_eintrag(int16 y, int16 nr) {
 	}
 }
 
-void io_game::plot_dir_liste(int16 cur_y, int16 start) {
+void IOGame::plot_dir_liste(int16 cur_y, int16 start) {
 	for (int16 i = start; i < start + 8; i++) {
 		if (i < 20) {
 
@@ -483,7 +483,7 @@ void io_game::plot_dir_liste(int16 cur_y, int16 start) {
 	}
 }
 
-void io_game::schalter_aus() {
+void IOGame::schalter_aus() {
 	_out->pop_box(_io->popx + 163, _io->popy + 6, _io->popx + 241, _io->popy + 18,
 	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
 	if (_io->f1)
@@ -506,7 +506,7 @@ void io_game::schalter_aus() {
 		              FSTRING4);
 }
 
-void io_game::plot_io() {
+void IOGame::plot_io() {
 	const int16 y1 = 120;
 
 	_out->pop_box(_io->popx, _io->popy, _io->popx + 248, _io->popy + y1, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
@@ -523,21 +523,21 @@ void io_game::plot_io() {
 	}
 }
 
-void io_game::plot_auf_txt(int16 farbe) {
+void IOGame::plot_auf_txt(int16 farbe) {
 	for (int16 i = 0; i < 3; i++)
 		_out->printxy(_io->popx + 146, _io->popy + 15 + i * 10, farbe, 300, _scrWidth, AUF_TBL_G[i]);
 }
 
-void io_game::plot_ab_txt(int16 farbe) {
+void IOGame::plot_ab_txt(int16 farbe) {
 	for (int16 i = 0; i < 4; i++)
 		_out->printxy(_io->popx + 146, _io->popy + 59 + i * 10, farbe, 300, _scrWidth, AB_TBL_G[i]);
 }
 
-void io_game::itoa(int N, char *s, int base) {
+void IOGame::itoa(int N, char *s, int base) {
 	sprintf(s, "%d", N);
 }
 
-int16 io_game::get_savegame_files() {
+int16 IOGame::get_savegame_files() {
 	SaveStateList saveList = g_engine->listSaves();
 	int ret = 0;
 
@@ -559,7 +559,7 @@ int16 io_game::get_savegame_files() {
 	return ret;
 }
 
-void io_game::save(int16 y, int16 slotNum, char *fname) {
+void IOGame::save(int16 y, int16 slotNum, char *fname) {
 	_cur->wait_taste_los(true);
 	_in->alter_kb_handler();
 	_cur->hide_cur();
@@ -584,7 +584,7 @@ void io_game::save(int16 y, int16 slotNum, char *fname) {
 	(void)g_engine->saveGameState(slotNum, desc);
 }
 
-void io_game::load(int16 slotNum, char *fname) {
+void IOGame::load(int16 slotNum, char *fname) {
 	get_savegame_files();
 
 	_cur->hide_cur();
@@ -593,12 +593,12 @@ void io_game::load(int16 slotNum, char *fname) {
 	}
 }
 
-void io_game::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 width, char *name) {
+void IOGame::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 width, char *name) {
 	_out->printxy(x + 1, y + 1, scol, bcol, width, name);
 	_out->printxy(x, y, fcol, bcol, width, name);
 }
 
-char *io_game::io_init(iog_init *iostruc) {
+char *IOGame::io_init(iog_init *iostruc) {
 	_io = iostruc;
 	for (int16 i = 0; i < 20; i++)
 		_fileFind[i][0] = 0;
@@ -607,7 +607,7 @@ char *io_game::io_init(iog_init *iostruc) {
 	return &_fileFind[0][0];
 }
 
-void io_game::save_entry(int16 slotNum, char *fname) {
+void IOGame::save_entry(int16 slotNum, char *fname) {
 	Common::String desc(&_fileFind[slotNum][1]);
 	g_engine->saveGameState(slotNum, desc);
 }
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 26c0dcde573..e815a94ea2a 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -70,10 +70,10 @@ namespace Chewy {
 
 #define DOPPEL_KLICK 0.5
 
-class io_game {
+class IOGame {
 public:
-	io_game(McgaGraphics *out, InputMgr *in, cursor *curp);
-	~io_game();
+	IOGame(McgaGraphics *out, InputMgr *in, Cursor *curp);
+	~IOGame();
 
 	int16 io_menu(iog_init *iostruc);
 
@@ -99,7 +99,7 @@ private:
 
 	McgaGraphics *_out;
 	InputMgr *_in;
-	cursor *_cur;
+	Cursor *_cur;
 	iog_init *_io;
 	uint32 _dblClickStart, _dblClickEnd;
 	kb_info *_kbinfo;
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 6761751fdc3..0e789c48998 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -27,15 +27,15 @@
 
 namespace Chewy {
 
-memory::memory() {
+Memory::Memory() {
 	file = new Data();
 }
 
-memory::~memory() {
+Memory::~Memory() {
 	delete (file);
 }
 
-taf_info *memory::taf_adr(const char *filename) {
+taf_info *Memory::taf_adr(const char *filename) {
 	SpriteResource *res = new SpriteResource(filename);
 	int32 imageCount = res->getChunkCount();
 	uint32 size = res->getAllSize() + imageCount * 8 + sizeof(taf_info);
@@ -64,7 +64,7 @@ taf_info *memory::taf_adr(const char *filename) {
 	return tinfo;
 }
 
-taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
+taf_seq_info *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	Common::File *rs = new Common::File();
 	rs->open(CH_SPZ_FILE);
 	taf_dateiheader header;
@@ -160,7 +160,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	return ts_info;
 }
 
-void memory::tff_adr(const char *filename, byte **speicher) {
+void Memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size;
 	size = file->size(filename, TFFDATEI);
 
@@ -180,7 +180,7 @@ void memory::tff_adr(const char *filename, byte **speicher) {
 }
 
 // Only called from init_load() with filename blende.rnd
-byte *memory::void_adr(const char *filename) {
+byte *Memory::void_adr(const char *filename) {
 	uint32 size = 0;
 	byte *ptr = 0;
 	size = file->size(filename, 200);
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index d01b87180f9..e974291d4b8 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -27,10 +27,10 @@
 
 namespace Chewy {
 
-class memory {
+class Memory {
 public:
-	memory();
-	~memory();
+	Memory();
+	~Memory();
 	void init();
 
 	taf_info *taf_adr(const char *filename);
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 5356fc4b697..e211e92bc15 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -48,17 +48,17 @@ namespace Chewy {
 #define MOV_X 1
 #define MOV_Y 2
 
-movclass::movclass() {
+MovClass::MovClass() {
 	_vecTbl[0] = -40;
 	_vecTbl[1] = 1;
 	_vecTbl[2] = 40;
 	_vecTbl[3] = -1;
 }
 
-movclass::~movclass() {
+MovClass::~MovClass() {
 }
 
-void movclass::goto_xy(GotoPkt *gp) {
+void MovClass::goto_xy(GotoPkt *gp) {
 	int16 start_feld;
 	int16 ziel_feld;
 	//int16 anz;
@@ -99,7 +99,7 @@ void movclass::goto_xy(GotoPkt *gp) {
 	}
 }
 
-int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
+int16 MovClass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 	byte *speicher;
 	int16 i;
 	int16 ok;
@@ -198,20 +198,20 @@ int16 movclass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 	return ret;
 }
 
-void movclass::stop_auto_go() {
+void MovClass::stop_auto_go() {
 	_agv.AutoGo = false;
 	_agv.Continue = true;
 }
 
-void movclass::continue_auto_go() {
+void MovClass::continue_auto_go() {
 	_agv.AutoGo = _agv.Continue;
 }
 
-bool movclass::auto_go_status() {
+bool MovClass::auto_go_status() {
 	return _agv.AutoGo;
 }
 
-void movclass::calc_xy() {
+void MovClass::calc_xy() {
 	int16 ende;
 	int16 i;
 	int16 seite;
@@ -294,7 +294,7 @@ void movclass::calc_xy() {
 	}
 }
 
-short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
+short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 	int16 tmpx;
 	int16 tmpy;
 	int16 tmpz;
@@ -436,7 +436,7 @@ short movclass::calc_go(int16 src_feld, int16 *dst_feld) {
 	return steps;
 }
 
-void movclass::get_mov_line() {
+void MovClass::get_mov_line() {
 	int16 ende;
 	int16 start_feld;
 	int16 tmp_feld;
@@ -519,7 +519,7 @@ void movclass::get_mov_line() {
 	}
 }
 
-void movclass::calc_mov_line_xit(int16 start_feld) {
+void MovClass::calc_mov_line_xit(int16 start_feld) {
 	int16 calc_feld;
 	int16 last_feld;
 	int16 ziel_feld;
@@ -697,21 +697,21 @@ void movclass::calc_mov_line_xit(int16 start_feld) {
 	}
 }
 
-int16 movclass::get_feld_nr(int16 x, int16 y) {
+int16 MovClass::get_feld_nr(int16 x, int16 y) {
 	x >>= 3;
 	y >>= 3;
 
 	return x + (y * _gpkt->Breite);
 }
 
-void movclass::get_feld_xy(int16 fnr, int16 *x, int16 *y) {
+void MovClass::get_feld_xy(int16 fnr, int16 *x, int16 *y) {
 	*x = (fnr % _gpkt->Breite);
 	*y = (fnr / _gpkt->Breite);
 	*x <<= 3;
 	*y <<= 3;
 }
 
-void movclass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
+void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 	uint8 xvector;
 	uint8 yvector;
 	uint8 zvector;
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index a7c7b0eebf0..6f8a05b02e7 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -106,10 +106,10 @@ struct AutoGoVar {
 	int16 AkKnoten = 0;
 };
 
-class movclass {
+class MovClass {
 public:
-	movclass();
-	~movclass();
+	MovClass();
+	~MovClass();
 
 	void goto_xy(GotoPkt *gpkt);
 	int16 calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y);
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index d158ca5682c..7fc603ce57b 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -351,7 +351,7 @@ void Object::calc_static_detail(int16 det_nr) {
 	int16 nr;
 	int16 i;
 	int16 n;
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 
 	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 		nr = Rsi[det_nr].StaticAk;
diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index c75feedb29b..992b0a7e2cc 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -64,7 +64,6 @@ enum ResourceType {
 	kResourceTCF = 26
 };
 
-
 struct Chunk {
 	uint32 size;
 	uint16 num;
@@ -72,10 +71,7 @@ struct Chunk {
 	uint32 pos;
 };
 
-
 struct TBFChunk {
-
-
 	uint16 screenMode;
 	uint16 compressionFlag;
 	uint32 size;
@@ -85,26 +81,19 @@ struct TBFChunk {
 	uint8 *data;
 };
 
-
 struct TAFChunk {
 	uint16 compressionFlag;
 	uint16 width;
 	uint16 height;
-
-
-
 	uint8 *data;
 };
 
-
 struct SoundChunk {
 	uint32 size;
 	uint8 *data;
 };
 
-
 struct VideoChunk {
-
 	uint32 size;
 	uint16 frameCount;
 	uint16 width;
@@ -190,6 +179,6 @@ public:
 	Common::SeekableReadStream *getVideoStream(uint num);
 };
 
-}
+} // namespace Chewy
 
 #endif
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index f144427542c..13f43e6cb3a 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -186,7 +186,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	if (player->SoundSwitch == false)
 		det->disable_room_sound();
 	if (!_G(modul)) {
-		room_detail_info *Rdi_ = det->get_room_detail_info();
+		RoomDetailInfo *Rdi_ = det->get_room_detail_info();
 		_roomInfo = &Rdi_->Ri;
 		if (_roomInfo->TafLoad != 255) {
 			char tmp_str[MAXPATH];
@@ -229,7 +229,7 @@ void Room::add_timer_new_room() {
 	_roomTimer.TimerAnz = 0;
 
 	for (int i = 0; i < MAXDETAILS && _roomTimer.TimerAnz < MAX_ROOM_TIMER; i++) {
-		ani_detail_info *adi = det->get_ani_detail(i);
+		AniDetailInfo *adi = det->get_ani_detail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room0.cpp
index 43c3d649a65..cb85b8e73b1 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room0.cpp
@@ -189,7 +189,7 @@ void Room0::eyeAnim() {
 }
 
 void Room0::eyeStart(EyeMode mode) {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
@@ -265,7 +265,7 @@ void Room0::eyeStart(EyeMode mode) {
 }
 
 void Room0::eyeWait() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
@@ -332,7 +332,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 }
 
 void Room0::eyeShoot() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
@@ -386,7 +386,7 @@ void Room0::eyeShoot() {
 }
 
 void Room0::eyeSlimeBack() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	bool ende;
 
 	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
@@ -429,7 +429,7 @@ void Room0::eyeSlimeBack() {
 }
 
 void Room0::checkSlimeEye() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 
 	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
 	adi->ani_count = adi->start_ani;
@@ -467,7 +467,7 @@ void Room0::checkSlimeEye() {
 }
 
 void Room0::feederStart(int16 mode) {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	bool ende;
 
 	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
@@ -584,7 +584,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 }
 
 void Room0::checkFeed() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	int16 i;
 	bool ende;
 
@@ -675,7 +675,7 @@ void Room0::checkFeed() {
 }
 
 void Room0::checkPillow() {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	bool ende, mode;
 
 	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room3.cpp
index ff76e6e5c5d..b26d4928039 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room3.cpp
@@ -180,7 +180,7 @@ void Room3::sonde_knarre() {
 		{ {  13,  45,  75 }, 1, 3 }
 	};
 	hide_cur();
-	room_detail_info *rdi = det->get_room_detail_info();
+	RoomDetailInfo *rdi = det->get_room_detail_info();
 
 	det->load_taf_seq(162, 17, nullptr);
 	int16 tmp = _G(zoom_horizont);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 705a5bc9e6e..3b03fb45b11 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -351,7 +351,7 @@ void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
 }
 
 void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
-	ani_detail_info *adi;
+	AniDetailInfo *adi;
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	det->start_detail(ani_nr, rep, mode);
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 002b8f56130..f567bd3e682 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -24,12 +24,12 @@
 
 namespace Chewy {
 
-text::text() {
+Text::Text() {
 }
-text::~text() {
+Text::~Text() {
 }
 
-void text::crypt(char *txt, uint32 size) {
+void Text::crypt(char *txt, uint32 size) {
 	uint8 *sp;
 	uint32 i;
 	sp = (uint8 *)txt;
@@ -39,7 +39,7 @@ void text::crypt(char *txt, uint32 size) {
 	}
 }
 
-char *text::str_pos(char *txt_adr, int16 pos) {
+char *Text::str_pos(char *txt_adr, int16 pos) {
 	char *ptr;
 	int16 i;
 	ptr = txt_adr;
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index 927a49fe426..e08fde9357f 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -24,10 +24,10 @@
 
 namespace Chewy {
 
-class text {
+class Text {
 public:
-	text();
-	~text();
+	Text();
+	~Text();
 
 	void crypt(char *txt, uint32 size);
 
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 2b467c4a63f..2a2e0a84e97 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -28,7 +28,7 @@
 
 namespace Chewy {
 
-timer::timer(int16 max_t, TimerBlk *t) {
+Timer::Timer(int16 max_t, TimerBlk *t) {
 	_timerBlk = t;
 	_timerMax = max_t;
 	_G(timer_int) = false;
@@ -36,7 +36,7 @@ timer::timer(int16 max_t, TimerBlk *t) {
 	set_all_status(TIMER_STOP);
 }
 
-timer::~timer() {
+Timer::~Timer() {
 }
 
 float timer_freq[6] = {
@@ -48,7 +48,7 @@ float timer_freq[6] = {
 	65520.0f
 };
 
-void timer::calc_timer() {
+void Timer::calc_timer() {
 	int16 i;
 	int16 count;
 	int ak_time;
@@ -75,7 +75,7 @@ void timer::calc_timer() {
 	}
 }
 
-int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mode) {
+int16 Timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mode) {
 	int16 ret;
 	if (timer_nr < _timerMax) {
 		ret = true;
@@ -90,7 +90,7 @@ int16 timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mod
 	return ret;
 }
 
-void timer::reset_timer(int16 timer_nr, int16 timer_wert) {
+void Timer::reset_timer(int16 timer_nr, int16 timer_wert) {
 	if (timer_nr < _timerMax) {
 		_timerBlk[timer_nr].TimeCount = 0;
 		_timerBlk[timer_nr].TimeFlag = 0;
@@ -100,7 +100,7 @@ void timer::reset_timer(int16 timer_nr, int16 timer_wert) {
 	}
 }
 
-void timer::reset_all_timer() {
+void Timer::reset_all_timer() {
 	int16 i;
 	for (i = 0; i < _timerMax; i++) {
 		_timerBlk[i].TimeCount = 0;
@@ -109,13 +109,13 @@ void timer::reset_all_timer() {
 	}
 }
 
-void timer::set_status(int16 timer_nr, int16 status) {
+void Timer::set_status(int16 timer_nr, int16 status) {
 	if (timer_nr < _timerMax) {
 		_timerBlk[timer_nr].TimeStatus = status;
 	}
 }
 
-void timer::set_all_status(int16 status) {
+void Timer::set_all_status(int16 status) {
 	int16 i;
 	if (status == TIMER_FREEZE) {
 		for (i = 0; i < _timerMax; i++) {
@@ -134,11 +134,11 @@ void timer::set_all_status(int16 status) {
 	}
 }
 
-void timer::disable_timer() {
+void Timer::disable_timer() {
 	_G(timer_suspend) = true;
 }
 
-void timer::enable_timer() {
+void Timer::enable_timer() {
 	_G(timer_suspend) = false;
 }
 
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 555ebfa0b88..7864907d453 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -49,10 +49,10 @@ struct TimerBlk {
 	int16 TimeStatus;
 };
 
-class timer {
+class Timer {
 public:
-	timer(int16 max_timer, TimerBlk *t);
-	~timer();
+	Timer(int16 max_timer, TimerBlk *t);
+	~Timer();
 
 	void calc_timer();
 	int16 set_new_timer(int16 timer_nr, int16 timer_end_wert,


Commit: e9a67381ec9b0683daf290019bf742c12fb3ac09
    https://github.com/scummvm/scummvm/commit/e9a67381ec9b0683daf290019bf742c12fb3ac09
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Clean deprecated stuff out of ngshext.h

Changed paths:
    engines/chewy/ngshext.h


diff --git a/engines/chewy/ngshext.h b/engines/chewy/ngshext.h
index ed96c1c5310..79864da89fa 100644
--- a/engines/chewy/ngshext.h
+++ b/engines/chewy/ngshext.h
@@ -25,24 +25,9 @@
 #include "chewy/memory.h"
 #include "chewy/mcga.h"
 #include "chewy/mouse.h"
-
 #include "chewy/io_game.h"
 #include "chewy/cursor.h"
 #include "chewy/flic.h"
-#ifdef AIL
 #include "chewy/sound_player.h"
-#endif
-
-namespace Chewy {
-
-#define MAXPFAD 81
-
-class sblaster;
-
-extern sblaster *snd;
-
-extern uint16 _stklen;
-
-} // namespace Chewy
 
 #endif


Commit: dbd71d5f63ccff743fb8131c007499397d3ac0f6
    https://github.com/scummvm/scummvm/commit/dbd71d5f63ccff743fb8131c007499397d3ac0f6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Cleanup of palette array in taf_dateiheader

Changed paths:
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 904b0e406bd..77234758914 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -28,7 +28,7 @@ bool taf_dateiheader::load(Common::SeekableReadStream *src) {
 	mode = src->readSint16LE();
 	count = src->readSint16LE();
 	allsize = src->readUint32LE();
-	src->read(palette, 768);
+	src->read(palette, PALETTE_SIZE);
 	next = src->readUint32LE();
 	korrekt = src->readSint16LE();
 
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index a753e1098bc..2a0f1736b37 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -22,9 +22,9 @@
 #ifndef CHEWY_NGSTYPES_H
 #define CHEWY_NGSTYPES_H
 
+#include "graphics/screen.h"
 #include "chewy/ngsdefs.h"
 #include "chewy/file.h"
-#include "common/stream.h"
 
 namespace Chewy {
 
@@ -33,7 +33,7 @@ struct taf_dateiheader {
 	int16 mode = 0;
 	int16 count = 0;
 	uint32 allsize = 0;
-	char palette[768];
+	byte palette[PALETTE_SIZE];
 	uint32 next = 0;
 	int16 korrekt = 0;
 


Commit: 6a84e1d620fe872708263a974cfcb0c4dbc67294
    https://github.com/scummvm/scummvm/commit/6a84e1d620fe872708263a974cfcb0c4dbc67294
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Cleanup of #if blocks

Changed paths:
    engines/chewy/detail.h
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index ad4cb709198..60bac19e5e6 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -266,9 +266,6 @@ private:
 
 	void remove_unused_samples();
 	RoomDetailInfo _rdi;
-#ifdef DETEDIT
-	room_detail_info rdi_shadow;
-#endif
 	RdiDateiHeader _rdi_datei_header;
 	SprInfo _sprInfo;
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index bd8d5be162f..ea32d281b77 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -30,8 +30,6 @@
 
 namespace Chewy {
 
-//#define NEW_VIDEO_CODE 1
-
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 
@@ -873,12 +871,9 @@ static void flic_proc1() {
 		bool flag;
 		do {
 			_G(flic_val2) = VALS1[i];
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, _G(flic_val2));
 			ret = flc->custom_play(&Ci);
-#else
-			g_engine->playVideo(_G(flic_val2));
-#endif
+
 			flag = VALS4[i] && atds->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
@@ -925,10 +920,9 @@ void flic_cut(int16 nr, int16 mode) {
 	det->disable_room_sound();
 	_G(sndPlayer)->endSound();
 	g_events->delay(50);
-//#ifndef NEW_VIDEO_CODE
+
 	Common::File *f = File::open("cut/cut.tap");
 	Ci.Handle = f;
-//#endif
 
 	if (Ci.Handle) {
 		switch (nr) {
@@ -973,13 +967,9 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_037:
 		case FCUT_040:
 			do {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(nr);
-#endif
 			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
@@ -988,13 +978,9 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 
 			do {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(nr);
-#endif
 			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
@@ -1024,14 +1010,10 @@ void flic_cut(int16 nr, int16 mode) {
 			} else {
 				if (!_G(modul)) {
 					start_aad(623, -1);
-#ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
 					flc->set_custom_user_function(Room43::setup_func);
 					flc->custom_play(&Ci);
 					flc->remove_custom_user_function();
-#else
-					g_engine->playVideo(FCUT_061);
-#endif
 				}
 				if (!_G(modul)) {
 					g_engine->playVideo(FCUT_062);
@@ -1068,26 +1050,18 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_095:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
-#else
-				playVideo(nr);
-#endif
 			}
 			break;
 
 		case FCUT_112:
 			_G(sndPlayer)->setMusicMasterVol(32);
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			ret = flc->custom_play(&Ci);
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
-#else
-			playVideo(nr);
-			playVideo(nr);
-#endif
+
 			_G(sndPlayer)->setMusicMasterVol(5);
 			break;
 
@@ -1101,13 +1075,10 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_133:
 		case 1123:
 			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(FLIC_CUT_133[i]);
-#endif
+
 				if (i == 0 || i == 1) {
 					_G(out)->setze_zeiger(nullptr);
 					_G(out)->cls();
@@ -1122,24 +1093,17 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1003:
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 1);
 			ret = flc->custom_play(&Ci);
-#else
-			g_engine->playVideo(FCUT_001);
-#endif
 
 			if (ret != -1) {
 				for (i = 0; i < 3 && ret != -1; ++i) {
 					fx->border(workpage, 100, 0, 0);
 					print_rows(591);
-#ifndef NEW_VIDEO_CODE
+
 					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
 					ret = flc->custom_play(&Ci);
 					SHOULD_QUIT_RETURN;
-#else
-					playVideo(i + 3);
-#endif
 				}
 			}
 			break;
@@ -1147,25 +1111,18 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1006:
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 6);
-#endif
 			}
 			break;
 
 		case 1009:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 9);
-#endif
 			}
 			break;
 
@@ -1173,36 +1130,25 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 				SHOULD_QUIT_RETURN;
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
 				ret = flc->custom_play(&Ci);
-#else
-				playVideo(i + 12);
-#endif
 			}
 
-#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(out)->cls();
 				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
 				fx->border(workpage, 100, 0, 0);
 			}
-#else
-			_G(out)->cls();
-			fx->border(workpage, 100, 0, 0);
-#endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 15);
-#endif
 			}
 			break;
 
@@ -1216,13 +1162,9 @@ void flic_cut(int16 nr, int16 mode) {
 					load_room_music(256);
 				}
 
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(FLIC_CUT_1045[i]);
-#endif
 
 				if (FLIC_CUT_1045[i] == 53) {
 					_G(sndPlayer)->stopMod();
@@ -1235,43 +1177,28 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, 43);
 				ret = flc->custom_play(&Ci);
-#else
-				playVideo(43);
-#endif
 			}
 			break;
 
 		case 1048:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 50);
 			flc->custom_play(&Ci);
-#else
-			playVideo(50);
-#endif
 
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, 48);
 				ret = flc->custom_play(&Ci);
-#else
-				playVideo(48);
-#endif
 			}
 			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 49);
 				flc->custom_play(&Ci);
-#else
-				playVideo(49);
-#endif
 			}
 
-#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 				ret = flc->custom_play(&Ci);
@@ -1280,28 +1207,19 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->spr_blende(workpage, 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 54);
 			}
-#else
-			fx->spr_blende(workpage, 100, false, 0);
-			playVideo(nr);
-#endif
 			break;
 
 		case 1055:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 55);
-#endif
 			}
 
 			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 46);
-#endif
 				fx->border(workpage, 100, 0, 0);
 			}
 			break;
@@ -1310,46 +1228,28 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
-#ifndef NEW_VIDEO_CODE
+
 			_G(mem)->file->select_pool_item(Ci.Handle, 58);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(58);
-#endif
 
 			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 59);
 				flc->custom_play(&Ci);
-#else
-				playVideo(59);
-#endif
 			}
 			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 60);
 				flc->custom_play(&Ci);
-#else
-				playVideo(60);
-#endif
 			}
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, 61);
 				flc->custom_play(&Ci);
-#else
-				playVideo(61);
-#endif
 			}
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 62);
 				flc->custom_play(&Ci);
-#else
-				playVideo(62);
-#endif
 			}
 			break;
 
@@ -1359,52 +1259,32 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 65);
-#endif
 			}
 			break;
 
 		case 1068:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 68);
 			flc->custom_play(&Ci);
-#else
-			playVideo(68);
-#endif
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 70);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(70);
-#endif
 			}
 			break;
 
 		case 1069:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 69);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(69);
-#endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				fx->spr_blende(workpage, 100, false, 0);
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
 				ret = flc->custom_play(&Ci);
-#else
-				playVideo(i + 71);
-#endif
 			}
 			break;
 
@@ -1413,65 +1293,45 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(605);
 				fx->spr_blende(workpage, 100, false, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + FLIC_CUT_1074[i]);
-#endif
 			}
 			break;
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(FLIC_CUT_1080[i]);
-#endif
 			}
 			break;
 
 		case 1087:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 87);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(87);
-#endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
+
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(i + 102);
-#endif
 			}
 			break;
 
 		case 1088:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 88);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(88);
-#endif
 
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 86);
 				flc->custom_play(&Ci);
-#else
-				playVideo(86);
-#endif
+
 				_G(sndPlayer)->stopMod();
 			}
 			break;
@@ -1496,54 +1356,32 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1106:
 			for (i = 0; i < 3 && ret == -1; ++i) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
 				_G(out)->cls();
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(FLIC_CUT_1106[i]);
-#endif
 			}
 			break;
 
 		case 1107:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(107);
-#endif
 
-#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 109);
 				fx->border(workpage, 100, 0, 0);
 			}
-#else
-			fx->border(workpage, 100, 0, 0);
-			//playVideo(109);
-#endif
 			break;
 
 		case 1108:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 108);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(108);
-#endif
 
-#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 115);
 				fx->spr_blende(workpage, 100, false, 0);
 				flc->custom_play(&Ci);
 			}
-#else
-			fx->spr_blende(workpage, 100, false, 0);
-			playVideo(115);
-#endif
 			break;
 
 		case 1110:
@@ -1551,56 +1389,38 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			load_room_music(257);
 			_G(sndPlayer)->setMusicMasterVol(20);
-#ifndef NEW_VIDEO_CODE
+
 			_G(mem)->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
-#else
-			playVideo(110);
-#endif
 
-#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(sndPlayer)->setMusicMasterVol(63);
 				fx->spr_blende(workpage, 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
 			}
-#else
-			ailsnd->setMusicMasterVol(63);
-			fx->spr_blende(workpage, 100, false, 0);
-			playVideo(112);
-#endif
+
 			_G(sndPlayer)->stopMod();
 			break;
 
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
 				_G(out)->cls();
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-#else
-				playVideo(FLIC_CUT_1113[i]);
-#endif
 			}
 			break;
 
 		case 1117:
-#ifndef NEW_VIDEO_CODE
 			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
 				fx->border(workpage, 100, 0, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 119);
 				flc->custom_play(&Ci);
 			}
-#else
-			fx->border(workpage, 100, 0, 0);
-			playVideo(119);
-#endif
 			break;
 
 		default:
-#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle,
 				(nr < 1000) ? nr : nr - 1000);
 
@@ -1614,11 +1434,6 @@ void flic_cut(int16 nr, int16 mode) {
 			default:
 				break;
 			}
-
-#else
-			playVideo(nr < 1000 ? nr : nr - 1000);
-#endif
-
 			break;
 		}
 


Commit: 0b4be086c0450e43830d0ec5e3d612cbc9391656
    https://github.com/scummvm/scummvm/commit/0b4be086c0450e43830d0ec5e3d612cbc9391656
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:27-08:00

Commit Message:
CHEWY: Add zeroes to better sort files for rooms 1 to 9

Changed paths:
  A engines/chewy/rooms/room00.cpp
  A engines/chewy/rooms/room00.h
  A engines/chewy/rooms/room01.cpp
  A engines/chewy/rooms/room01.h
  A engines/chewy/rooms/room02.cpp
  A engines/chewy/rooms/room02.h
  A engines/chewy/rooms/room03.cpp
  A engines/chewy/rooms/room03.h
  A engines/chewy/rooms/room04.cpp
  A engines/chewy/rooms/room04.h
  A engines/chewy/rooms/room05.cpp
  A engines/chewy/rooms/room05.h
  A engines/chewy/rooms/room06.cpp
  A engines/chewy/rooms/room06.h
  A engines/chewy/rooms/room07.cpp
  A engines/chewy/rooms/room07.h
  A engines/chewy/rooms/room08.cpp
  A engines/chewy/rooms/room08.h
  A engines/chewy/rooms/room09.cpp
  A engines/chewy/rooms/room09.h
  R engines/chewy/rooms/room0.cpp
  R engines/chewy/rooms/room0.h
  R engines/chewy/rooms/room1.cpp
  R engines/chewy/rooms/room1.h
  R engines/chewy/rooms/room2.cpp
  R engines/chewy/rooms/room2.h
  R engines/chewy/rooms/room3.cpp
  R engines/chewy/rooms/room3.h
  R engines/chewy/rooms/room4.cpp
  R engines/chewy/rooms/room4.h
  R engines/chewy/rooms/room5.cpp
  R engines/chewy/rooms/room5.h
  R engines/chewy/rooms/room6.cpp
  R engines/chewy/rooms/room6.h
  R engines/chewy/rooms/room7.cpp
  R engines/chewy/rooms/room7.h
  R engines/chewy/rooms/room8.cpp
  R engines/chewy/rooms/room8.h
  R engines/chewy/rooms/room9.cpp
  R engines/chewy/rooms/room9.h
    engines/chewy/module.mk
    engines/chewy/rooms/rooms.h


diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 36d76e0afb0..06dded6aee8 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -46,16 +46,16 @@ MODULE_OBJS = \
 	dialogs/main_menu.o \
 	dialogs/options.o \
 	video/cfo_decoder.o \
-	rooms/room0.o \
-	rooms/room1.o \
-	rooms/room2.o \
-	rooms/room3.o \
-	rooms/room4.o \
-	rooms/room5.o \
-	rooms/room6.o \
-	rooms/room7.o \
-	rooms/room8.o \
-	rooms/room9.o \
+	rooms/room00.o \
+	rooms/room01.o \
+	rooms/room02.o \
+	rooms/room03.o \
+	rooms/room04.o \
+	rooms/room05.o \
+	rooms/room06.o \
+	rooms/room07.o \
+	rooms/room08.o \
+	rooms/room09.o \
 	rooms/room10.o \
 	rooms/room11.o \
 	rooms/room12.o \
diff --git a/engines/chewy/rooms/room0.cpp b/engines/chewy/rooms/room00.cpp
similarity index 99%
rename from engines/chewy/rooms/room0.cpp
rename to engines/chewy/rooms/room00.cpp
index cb85b8e73b1..73c432709a1 100644
--- a/engines/chewy/rooms/room0.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room0.h"
+#include "chewy/rooms/room00.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room0.h b/engines/chewy/rooms/room00.h
similarity index 100%
rename from engines/chewy/rooms/room0.h
rename to engines/chewy/rooms/room00.h
diff --git a/engines/chewy/rooms/room1.cpp b/engines/chewy/rooms/room01.cpp
similarity index 98%
rename from engines/chewy/rooms/room1.cpp
rename to engines/chewy/rooms/room01.cpp
index 2530869e61f..50d529ab44d 100644
--- a/engines/chewy/rooms/room1.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room1.h"
+#include "chewy/rooms/room01.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room1.h b/engines/chewy/rooms/room01.h
similarity index 100%
rename from engines/chewy/rooms/room1.h
rename to engines/chewy/rooms/room01.h
diff --git a/engines/chewy/rooms/room2.cpp b/engines/chewy/rooms/room02.cpp
similarity index 98%
rename from engines/chewy/rooms/room2.cpp
rename to engines/chewy/rooms/room02.cpp
index f1fe28beb5a..f17238fdc6c 100644
--- a/engines/chewy/rooms/room2.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room2.h"
+#include "chewy/rooms/room02.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room2.h b/engines/chewy/rooms/room02.h
similarity index 100%
rename from engines/chewy/rooms/room2.h
rename to engines/chewy/rooms/room02.h
diff --git a/engines/chewy/rooms/room3.cpp b/engines/chewy/rooms/room03.cpp
similarity index 99%
rename from engines/chewy/rooms/room3.cpp
rename to engines/chewy/rooms/room03.cpp
index b26d4928039..861558fbe95 100644
--- a/engines/chewy/rooms/room3.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -23,9 +23,9 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room2.h"
-#include "chewy/rooms/room3.h"
-#include "chewy/rooms/room4.h"
+#include "chewy/rooms/room02.h"
+#include "chewy/rooms/room03.h"
+#include "chewy/rooms/room04.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room3.h b/engines/chewy/rooms/room03.h
similarity index 100%
rename from engines/chewy/rooms/room3.h
rename to engines/chewy/rooms/room03.h
diff --git a/engines/chewy/rooms/room4.cpp b/engines/chewy/rooms/room04.cpp
similarity index 99%
rename from engines/chewy/rooms/room4.cpp
rename to engines/chewy/rooms/room04.cpp
index c2b10bf4150..332f3a5b43c 100644
--- a/engines/chewy/rooms/room4.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room4.h"
+#include "chewy/rooms/room04.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room4.h b/engines/chewy/rooms/room04.h
similarity index 100%
rename from engines/chewy/rooms/room4.h
rename to engines/chewy/rooms/room04.h
diff --git a/engines/chewy/rooms/room5.cpp b/engines/chewy/rooms/room05.cpp
similarity index 98%
rename from engines/chewy/rooms/room5.cpp
rename to engines/chewy/rooms/room05.cpp
index 983811bdfad..46fe4b5e19f 100644
--- a/engines/chewy/rooms/room5.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room5.h"
+#include "chewy/rooms/room05.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room5.h b/engines/chewy/rooms/room05.h
similarity index 100%
rename from engines/chewy/rooms/room5.h
rename to engines/chewy/rooms/room05.h
diff --git a/engines/chewy/rooms/room6.cpp b/engines/chewy/rooms/room06.cpp
similarity index 99%
rename from engines/chewy/rooms/room6.cpp
rename to engines/chewy/rooms/room06.cpp
index 3aa1a99f226..e7d26fcf4c0 100644
--- a/engines/chewy/rooms/room6.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room6.h"
+#include "chewy/rooms/room06.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room6.h b/engines/chewy/rooms/room06.h
similarity index 100%
rename from engines/chewy/rooms/room6.h
rename to engines/chewy/rooms/room06.h
diff --git a/engines/chewy/rooms/room7.cpp b/engines/chewy/rooms/room07.cpp
similarity index 99%
rename from engines/chewy/rooms/room7.cpp
rename to engines/chewy/rooms/room07.cpp
index 8b360ff2299..c3fb7ce8b4e 100644
--- a/engines/chewy/rooms/room7.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/rooms/room7.h"
+#include "chewy/rooms/room07.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room7.h b/engines/chewy/rooms/room07.h
similarity index 100%
rename from engines/chewy/rooms/room7.h
rename to engines/chewy/rooms/room07.h
diff --git a/engines/chewy/rooms/room8.cpp b/engines/chewy/rooms/room08.cpp
similarity index 99%
rename from engines/chewy/rooms/room8.cpp
rename to engines/chewy/rooms/room08.cpp
index 1a3fa252b20..3a13cab7f85 100644
--- a/engines/chewy/rooms/room8.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -24,7 +24,7 @@
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room8.h"
+#include "chewy/rooms/room08.h"
 #include "chewy/dialogs/inventory.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room8.h b/engines/chewy/rooms/room08.h
similarity index 100%
rename from engines/chewy/rooms/room8.h
rename to engines/chewy/rooms/room08.h
diff --git a/engines/chewy/rooms/room9.cpp b/engines/chewy/rooms/room09.cpp
similarity index 99%
rename from engines/chewy/rooms/room9.cpp
rename to engines/chewy/rooms/room09.cpp
index a224d2a0122..e60a97782f3 100644
--- a/engines/chewy/rooms/room9.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -23,7 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/room.h"
-#include "chewy/rooms/room9.h"
+#include "chewy/rooms/room09.h"
 
 namespace Chewy {
 namespace Rooms {
diff --git a/engines/chewy/rooms/room9.h b/engines/chewy/rooms/room09.h
similarity index 100%
rename from engines/chewy/rooms/room9.h
rename to engines/chewy/rooms/room09.h
diff --git a/engines/chewy/rooms/rooms.h b/engines/chewy/rooms/rooms.h
index 1667bfeb1a7..ffc84279961 100644
--- a/engines/chewy/rooms/rooms.h
+++ b/engines/chewy/rooms/rooms.h
@@ -22,16 +22,16 @@
 #ifndef CHEWY_ROOMS_ROOMS_H
 #define CHEWY_ROOMS_ROOMS_H
 
-#include "chewy/rooms/room0.h"
-#include "chewy/rooms/room1.h"
-#include "chewy/rooms/room2.h"
-#include "chewy/rooms/room3.h"
-#include "chewy/rooms/room4.h"
-#include "chewy/rooms/room5.h"
-#include "chewy/rooms/room6.h"
-#include "chewy/rooms/room7.h"
-#include "chewy/rooms/room8.h"
-#include "chewy/rooms/room9.h"
+#include "chewy/rooms/room00.h"
+#include "chewy/rooms/room01.h"
+#include "chewy/rooms/room02.h"
+#include "chewy/rooms/room03.h"
+#include "chewy/rooms/room04.h"
+#include "chewy/rooms/room05.h"
+#include "chewy/rooms/room06.h"
+#include "chewy/rooms/room07.h"
+#include "chewy/rooms/room08.h"
+#include "chewy/rooms/room09.h"
 #include "chewy/rooms/room10.h"
 #include "chewy/rooms/room11.h"
 #include "chewy/rooms/room12.h"


Commit: 7692967adb87911259755995cec966052c391adf
    https://github.com/scummvm/scummvm/commit/7692967adb87911259755995cec966052c391adf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Strip out unused code from IOGame

Changed paths:
    engines/chewy/file.cpp
    engines/chewy/global.h
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h


diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index f4a593bae6c..a5a7e53c6eb 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -52,55 +52,4 @@ bool File::readArray(Common::SeekableReadStream *src, uint16 *arr, size_t size)
 	return result;
 }
 
-int16 call_fileio(int16 palette, int16 mode) {
-	short ret;
-	ret = 0;
-	ioptr.popx = 30;
-	ioptr.popy = 50;
-	switch (palette) {
-
-	case PAL1:
-		ioptr.m_col = IO_PAL1;
-		break;
-	}
-	switch (mode) {
-
-	case LOADIO:
-		ioptr.f1 = 0;
-		ioptr.f2 = 1;
-		ioptr.f3 = 1;
-		ioptr.f4 = 1;
-		ioptr.key_nr = 2;
-		break;
-
-	case SAVEIO:
-		ioptr.f1 = 1;
-		ioptr.f2 = 0;
-		ioptr.f3 = 1;
-		ioptr.f4 = 1;
-		ioptr.key_nr = 1;
-		break;
-	case ALLIO:
-		ioptr.f1 = 1;
-		ioptr.f2 = 1;
-		ioptr.f3 = 1;
-		ioptr.f4 = 1;
-		ioptr.key_nr = 0;
-		break;
-
-	}
-	curblk.no_back = false;
-	cursor_wahl(CUR_SAVE);
-	_G(out)->sprite_save(cur_back, minfo.x + curblk.page_off_x,
-	                  minfo.y + curblk.page_off_y, 16,
-	                  16, scr_width);
-	_G(cur)->hide_cur();
-	_G(cur)->show_cur();
-	_G(cur)->hide_cur();
-	ret = _G(iog)->io_menu(&ioptr);
-	_G(cur)->show_cur();
-	curblk.no_back = true;
-	return ret;
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1d70787f956..23a86955e1a 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -432,8 +432,6 @@ void init_atds();
 
 void init_room();
 
-int16 call_fileio(int16 palette, int16 mode);
-
 void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode);
 
 void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 zeilen_hoehe,
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index 961f0df9ec1..c09259c1748 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -28,515 +28,35 @@
 
 namespace Chewy {
 
-static const int16 FILE_XY_G[7][4] = {
-	{ 140,  6, 156, 51 },
-	{ 140, 55, 156, 100 },
-	{ 163,  6, 241, 18 },
-	{ 163, 22, 241, 34 },
-	{ 163, 38, 241, 50 },
-	{ 163, 54, 241, 66 },
-	{   6,  6, 133, 97 }
-};
-
-static const byte CODE_TBL_G[6] = { 72, 80, 59, 60, 61, 62 };
-
-static const char AUF_TBL_G[3][3] = {
-	{ FSTRING8 }, {FSTRING9 }, { FSTRING10 }
-};
-
-static const char AB_TBL_G[4][3] = {
-	{ FSTRING11 }, { FSTRING12 }, { FSTRING13 }, { FSTRING14 }
-};
-
-IOGame::IOGame(McgaGraphics *iout, InputMgr *iin, Cursor *curp) {
-	_out = iout;
-	_in = iin;
-	_cur = curp;
+IOGame::IOGame(McgaGraphics *out, InputMgr *in, Cursor *cur) {
+	_out = out;
+	_in = in;
+	_cur = cur;
 }
 
-IOGame::~IOGame() {
-}
-
-int16 IOGame::io_menu(iog_init *iostruc) {
-	int16 max_scroll = 20;
-	int16 i, j, y;
-	char ende = 0, mouse_f = 1;
-	char a = 0;
-	int16 y1 = 106;
-	int16 ret = 0;
-	char io_flag = 0;
-
+char *IOGame::io_init(iog_init *iostruc) {
 	_io = iostruc;
-	_inzeig = _in->get_in_zeiger();
-	_cur->hide_cur();
-	if (_inzeig->minfo)
-		_minfo = _inzeig->minfo;
-	if (!_inzeig->kbinfo)
-		_in->neuer_kb_handler(_kbinfo);
-	else
-		_kbinfo = _inzeig->kbinfo;
-
-	_scrWidth = _G(scr_w) << 2;
-	_dblClick = DOPPEL_KLICK;
-	int16 cur_y1 = _io->popy + 4;
-	int16 cur_y = _io->popy + 8;
-	plot_io();
-	schalter_aus();
-
-	for (i = 0; i < 20; i++)
+	for (int16 i = 0; i < 20; i++)
 		_fileFind[i][0] = 0;
+	get_savegame_files();
 
-	int16 scroll_flag = 0;
-	i = 0;
-
-	int16 auswahl;
-	if (!_io->key_nr) {
-		_out->box(_io->popx + 161, _io->popy + 4, _io->popx + 243, _io->popy + 21, _io->m_col[1]);
-		auswahl = 1;
-	} else {
-		_out->box(_io->popx + 161, _io->popy + 4 + ((_io->key_nr - 1) * 16),
-		          _io->popx + 243, _io->popy + 21 + ((_io->key_nr - 1) * 16), _io->m_col[1]);
-		auswahl = (int16)_io->key_nr;
-		cur_y1 = (auswahl - 1) * 16 + _io->popy + 4;
-	}
-
-	_cur->show_cur();
-	_switchCode = 1;
-	_cur->wait_taste_los(true);
-	_kbinfo->key_code = '\0';
-	_kbinfo->scan_code = Common::KEYCODE_INVALID;
-
-	switch ((int16)_io->key_nr) {
-	case 0:
-		_cur->hide_cur();
-		get_savegame_files();
-		i = 0;
-		cur_y = _io->popy + 8;
-		scroll_flag = 0;
-		if (_fileFind[0][0] != 0) {
-			if (strlen(&_fileFind[0][1]) >= 17)
-				_out->
-				printnxy(_io->popx + 28, _io->popy + 10, _io->m_col[5], 300, 17, _scrWidth, &_fileFind[0][1]
-				        );
-			else
-				_out->
-				printxy(_io->popx + 28, _io->popy + 10, _io->m_col[5], 300, _scrWidth, &_fileFind[0][1]);
-		}
-		plot_dir_liste(_io->popy + 18, i + 1);
-		_cur->show_cur();
-		break;
-	case 1:
-		_in->_hotkey = 59;
-		break;
-	case 2:
-		_in->_hotkey = 60;
-		break;
-	case 3:
-		_in->_hotkey = 61;
-		break;
-	case 4:
-		_in->_hotkey = 62;
-		break;
-	}
-
-	_switchCode = 0;
-	while (ende == 0) {
-		if (mouse_f != 0) {
-			mouse_f = 0;
-			_kbinfo->key_code = '\0';
-		}
-		_cur->plot_cur();
-
-		if (_minfo->button == 1) {
-			int16 x = _minfo->x;
-			y = _minfo->y;
-
-			j = _in->maus_vector(x - _io->popx, y - _io->popy, (int16 *)FILE_XY_G, 7);
-
-			if (j != -1) {
-				mouse_f = 1;
-				if (j < 6)
-
-					_in->_hotkey = CODE_TBL_G[j];
-				if ((j == 6) && (y >= _io->popy + 8)) {
-					y -= _io->popy + 8;
-					y /= 10;
-
-					if (y < (max_scroll)) {
-
-						if (y + scroll_flag != i) {
-							mouse_links_los = false;
-							cur_move = true;
-							_cur->hide_cur();
-
-							if (io_flag != 0)
-								unmark_eintrag(cur_y, i);
-							_dblClickStart = g_system->getMillis(); //clock();
-							i = y;
-							cur_y = i * 10 + _io->popy + 8;
-							i += scroll_flag;
-							if (io_flag != 0)
-								mark_eintrag(cur_y, i);
-							_cur->show_cur();
-						} else if (mouse_links_los) {
-							mouse_links_los = false;
-							_dblClickEnd = g_system->getMillis(); //clock();
-							if ((_dblClickEnd - _dblClickStart) / 1000 < _dblClick)
-								_kbinfo->key_code = 28;
-							else
-								_dblClickStart = g_system->getMillis(); //clock();
-						}
-					}
-				} else {
-					if (j > 2) {
-						y -= _io->popy + 8;
-						y /= 15;
-						if (auswahl != (y + 1)) {
-							_cur->hide_cur();
-							_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
-							auswahl = y + 1;
-							cur_y1 = (auswahl - 1) * 16 + _io->popy + 4;
-
-							_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
-							_cur->show_cur();
-						}
-					}
-				}
-			}
-		}
-
-		_switchCode = _in->get_switch_code();
-		switch (_switchCode) {
-
-		case 72:
-			_cur->hide_cur();
-			if (!io_flag) {
-				if (auswahl > 1) {
-					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
-					--auswahl;
-					cur_y1 -= 16;
-					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
-				}
-			} else {
-
-				if (a != 2) {
-					_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6,
-					              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-					plot_ab_txt(_io->m_col[1]);
-					a = 2;
-
-					_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-					plot_auf_txt(_io->m_col[2]);
-				}
-				if (cur_y > _io->popy + 8) {
-					unmark_eintrag(cur_y, i);
-					--i;
-					cur_y -= 10;
-					mark_eintrag(cur_y, i);
-				} else if (i > 0) {
-					--i;
-					--scroll_flag;
-					mark_eintrag(cur_y, i);
-					plot_dir_liste(_io->popy + 18, i + 1);
-				}
-			}
-			_cur->show_cur();
-			break;
-
-		case 80:
-			_cur->hide_cur();
-			if (!io_flag) {
-				if (auswahl < 4) {
-					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[5]);
-					++auswahl;
-					cur_y1 += 16;
-					_out->box(_io->popx + 161, cur_y1, _io->popx + 243, cur_y1 + 17, _io->m_col[1]);
-				}
-			} else {
-
-				if (a != 1) {
-					_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-					plot_auf_txt(_io->m_col[1]);
-					a = 1;
-
-					_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-					plot_ab_txt(_io->m_col[2]);
-				}
-				if ((cur_y < _io->popy + 6 + 9 * 9) && (i < (max_scroll - 1))) {
-					unmark_eintrag(cur_y, i);
-					++i;
-					cur_y += 10;
-					mark_eintrag(cur_y, i);
-				} else if (i < (max_scroll - 1)) {
-					++i;
-					++scroll_flag;
-					plot_dir_liste(_io->popy + 8, i - 8);
-					mark_eintrag(cur_y, i);
-				}
-			}
-			_cur->show_cur();
-			break;
-
-		case 59:
-			if (_io->f1) {
-				io_flag = 1;
-				_cur->hide_cur();
-				schalter_aus();
-				_out->pop_box(_io->popx + 163, _io->popy + 6, _io->popx + 241, _io->popy + 18, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-				_out->printxy(_io->popx + 167, _io->popy + 9, _io->m_col[2], 300, _scrWidth, FSTRING1);
-
-				get_savegame_files();
-				i = 0;
-				cur_y = _io->popy + 8;
-				scroll_flag = 0;
-				plot_dir_liste(_io->popy + 18, i + 1);
-				mark_eintrag(cur_y, i);
-				_cur->show_cur();
-				_cur->wait_taste_los(true);
-			}
-			break;
-
-		case 60:
-			if (_io->f2) {
-				io_flag = 2;
-				_cur->hide_cur();
-				schalter_aus();
-				_out->pop_box(_io->popx + 163, _io->popy + 6 + 1 * 16, _io->popx + 241, _io->popy + 18 + 1 * 16, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-				_out->printxy(_io->popx + 167, _io->popy + 25, _io->m_col[2], 300, _scrWidth, FSTRING2);
-
-				get_savegame_files();
-				i = 0;
-				cur_y = _io->popy + 8;
-				scroll_flag = 0;
-				plot_dir_liste(_io->popy + 18, i + 1);
-				mark_eintrag(cur_y, i);
-				_cur->show_cur();
-				_cur->wait_taste_los(true);
-			}
-			break;
-
-		case 61:
-			if (_io->f3) {
-				io_flag = 0;
-				_cur->hide_cur();
-				schalter_aus();
-				unmark_eintrag(cur_y, i);
-				_out->pop_box(_io->popx + 163, _io->popy + 6 + 2 * 16, _io->popx + 241, _io->popy + 18 + 2 * 16, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-				_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[2], 300, _scrWidth, FSTRING3);
-
-				_out->printxy(_io->popx + 167, _io->popy + 75, _io->m_col[1], 300, _scrWidth, FSTRING5);
-				_out->printxy(_io->popx + 167, _io->popy + 85, _io->m_col[1], 300, _scrWidth, FSTRING6);
-				_cur->show_cur();
-				ende = 0;
-				_kbinfo->key_code = '\0';
-				_kbinfo->scan_code = Common::KEYCODE_INVALID;
-				while (!ende) {
-					_cur->plot_cur();
-					SHOULD_QUIT_RETURN0;
-
-					_switchCode = _in->get_switch_code();
-					if ((_kbinfo->scan_code == 36) ||
-					        (_kbinfo->scan_code == 44) ||
-					        (_kbinfo->scan_code == 21)) {
-						ende = 1;
-						ret = IOG_END;
-					} else if ((_switchCode == 1) ||
-					           (_kbinfo->scan_code == 49))
-						break;
-				}
-				_cur->wait_taste_los(true);
-				_cur->hide_cur();
-				_out->box_fill(_io->popx + 167, _io->popy + 70, _io->popx + 244, _io->popy + 100, _io->m_col[5]);
-				_out->pop_box(_io->popx + 163, _io->popy + 6 + 2 * 16, _io->popx + 241, _io->popy + 18 + 2 * 16, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-				_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[1], 300, _scrWidth, FSTRING3);
-
-				_cur->show_cur();
-			}
-			break;
-
-		case 62:
-			if (_io->f4) {
-				io_flag = 0;
-				ende = 1;
-				ret = IOG_BACK;
-			}
-			break;
-
-		case 28:
-			if (io_flag != 0) {
-
-				if (io_flag == 1) {
-					io_flag = 0;
-					save(cur_y, i, _io->save_path);
-					_cur->hide_cur();
-					get_savegame_files();
-					mark_eintrag(cur_y, i);
-					schalter_aus();
-
-					_cur->show_cur();
-					ret = IOG_SAVE;
-					ende = 1;
-				}
-
-				if ((io_flag == 2) && (_fileFind[i][0] == 1)) {
-
-					load(i, _io->save_path);
-
-					ret = IOG_LOAD;
-					ende = 1;
-					io_flag = 0;
-				}
-			} else
-				_in->_hotkey = auswahl + 58;
-			g_events->delay(200);
-			_kbinfo->key_code = '\0';
-			break;
-
-		case 1:
-			if (io_flag != 0) {
-				io_flag = 0;
-				_cur->hide_cur();
-				schalter_aus();
-				unmark_eintrag(cur_y, i);
-				_cur->show_cur();
-				_cur->wait_taste_los(true);
-				_kbinfo->key_code = '\0';
-			} else {
-				ende = 1;
-				ret = IOG_BACK;
-			}
-			break;
-
-		default:
-			if (a != 0) {
-				a = 0;
-				_cur->hide_cur();
-				_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-				plot_auf_txt(_io->m_col[1]);
-				_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 6, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-				plot_ab_txt(_io->m_col[1]);
-				_cur->show_cur();
-			}
-
-		}
-	}
-	_cur->wait_taste_los(true);
-	_cur->hide_cur();
-	return ret;
-}
-
-void IOGame::mark_eintrag(int16 y, int16 nr) {
-	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10,
-	              _io->m_col[1], _io->m_col[0], _io->m_col[4]);
-	_out->printxy(_io->popx + 10, y + 2, _io->m_col[2], 300, _scrWidth, "%d.", nr + 1);
-	if (_fileFind[nr][0] != 0) {
-		if (strlen(&_fileFind[nr][1]) >= 17)
-			_out->printnxy(_io->popx + 28, y + 2, _io->m_col[2], 300, 17,
-			               _scrWidth, &_fileFind[nr][1]);
-		else
-			_out->printxy(_io->popx + 28, y + 2, _io->m_col[2], 300,
-			              _scrWidth, &_fileFind[nr][1]);
-		_out->box_fill(_io->popx + 8, _io->popy + 106, _io->popx + 244, _io->popy + 117,
-		               _io->m_col[5]);
-		print_shad(_io->popx + 8, _io->popy + 106, _io->m_col[0], 300, _io->m_col[1],
-		           _scrWidth, &_fileFind[nr][1]);
-	} else {
-		_out->move(_io->popx + 8, _io->popy + 106);
-		_out->box_fill(_io->popx + 8, _io->popy + 106, _io->popx + 244, _io->popy + 117,
-		               _io->m_col[5]);
-
-	}
-}
-
-void IOGame::unmark_eintrag(int16 y, int16 nr) {
-	_out->pop_box(_io->popx + 8, y, _io->popx + 131, y + 10, _io->m_col[3],
-	              _io->m_col[3], _io->m_col[3]);
-	_out->printxy(_io->popx + 10, y + 2, _io->m_col[5], 300, _scrWidth, "%d.", nr + 1);
-	if (_fileFind[nr][0] != 0) {
-		if (strlen(&_fileFind[nr][1]) >= 17)
-			_out->printnxy(_io->popx + 28, y + 2, _io->m_col[5], 300, 17,
-			               _scrWidth, &_fileFind[nr][1]);
-		else
-			_out->printxy(_io->popx + 28, y + 2, _io->m_col[5], 300,
-			              _scrWidth, &_fileFind[nr][1]);
-	}
-}
-
-void IOGame::plot_dir_liste(int16 cur_y, int16 start) {
-	for (int16 i = start; i < start + 8; i++) {
-		if (i < 20) {
-
-			_out->pop_box(_io->popx + 8, cur_y + 1, _io->popx + 131, cur_y + 10,
-			              _io->m_col[3], _io->m_col[3], _io->m_col[3]);
-			_out->printxy(_io->popx + 10, cur_y + 2, _io->m_col[5], 300,
-			              _scrWidth, "%d.", i + 1);
-			if (_fileFind[i][0] != 0) {
-				if (strlen(&_fileFind[i][1]) >= 17)
-					_out->printnxy(_io->popx + 28, cur_y + 2, _io->m_col[5], 300, 17,
-					               _scrWidth, &_fileFind[i][1]);
-				else
-					_out->printxy(_io->popx + 28, cur_y + 2, _io->m_col[5], 300,
-					              _scrWidth, &_fileFind[i][1]);
-			}
-			cur_y += 10;
-		}
-	}
+	return &_fileFind[0][0];
 }
 
-void IOGame::schalter_aus() {
-	_out->pop_box(_io->popx + 163, _io->popy + 6, _io->popx + 241, _io->popy + 18,
-	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-	if (_io->f1)
-		_out->printxy(_io->popx + 167, _io->popy + 9, _io->m_col[1], 300, _scrWidth,
-		              FSTRING1);
-	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16, _io->popx + 241, _io->popy + 18 + 16,
-	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-	if (_io->f2)
-		_out->printxy(_io->popx + 167, _io->popy + 25, _io->m_col[1], 300, _scrWidth,
-		              FSTRING2);
-	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16 * 2, _io->popx + 241, _io->popy + 18 + 16 * 2,
-	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-	if (_io->f3)
-		_out->printxy(_io->popx + 167, _io->popy + 41, _io->m_col[1], 300, _scrWidth,
-		              FSTRING3);
-	_out->pop_box(_io->popx + 163, _io->popy + 6 + 16 * 3, _io->popx + 241, _io->popy + 18 + 16 * 3,
-	              _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-	if (_io->f4)
-		_out->printxy(_io->popx + 167, _io->popy + 57, _io->m_col[1], 300, _scrWidth,
-		              FSTRING4);
+void IOGame::save_entry(int16 slotNum, char *fname) {
+	Common::String desc(&_fileFind[slotNum][1]);
+	g_engine->saveGameState(slotNum, desc);
 }
 
-void IOGame::plot_io() {
-	const int16 y1 = 120;
-
-	_out->pop_box(_io->popx, _io->popy, _io->popx + 248, _io->popy + y1, _io->m_col[0], _io->m_col[1], _io->m_col[5]);
-	_out->pop_box(_io->popx + 1, _io->popy + 1, _io->popx - 1 + 248, _io->popy - 1 + y1, _io->m_col[0], _io->m_col[1], 300);
-	_out->pop_box(_io->popx + 6, _io->popy + 6, _io->popx + 133, _io->popy + y1 - 20, _io->m_col[1], _io->m_col[0], _io->m_col[3]);
-	_out->pop_box(_io->popx + 140, _io->popy + 6, _io->popx + 156, _io->popy + 51, _io->m_col[0], _io->m_col[1], 300);
-	plot_auf_txt(_io->m_col[1]);
-
-	_out->pop_box(_io->popx + 140, _io->popy + 55, _io->popx + 156, _io->popy + y1 - 20,_io->m_col[0], _io->m_col[1], 300);
-	plot_ab_txt(_io->m_col[1]);
+void IOGame::load(int16 slotNum, char *fname) {
+	get_savegame_files();
 
-	for (int16 i = 0; i < 9; i++) {
-		_out->printxy(_io->popx + 10, _io->popy + 10 + i * 10,_io->m_col[5], 300, _scrWidth, "%d.", i + 1);
+	_cur->hide_cur();
+	if (_fileFind[slotNum][0] == 1) {
+		(void)g_engine->loadGameState(slotNum);
 	}
 }
 
-void IOGame::plot_auf_txt(int16 farbe) {
-	for (int16 i = 0; i < 3; i++)
-		_out->printxy(_io->popx + 146, _io->popy + 15 + i * 10, farbe, 300, _scrWidth, AUF_TBL_G[i]);
-}
-
-void IOGame::plot_ab_txt(int16 farbe) {
-	for (int16 i = 0; i < 4; i++)
-		_out->printxy(_io->popx + 146, _io->popy + 59 + i * 10, farbe, 300, _scrWidth, AB_TBL_G[i]);
-}
-
-void IOGame::itoa(int N, char *s, int base) {
-	sprintf(s, "%d", N);
-}
-
 int16 IOGame::get_savegame_files() {
 	SaveStateList saveList = g_engine->listSaves();
 	int ret = 0;
@@ -559,57 +79,4 @@ int16 IOGame::get_savegame_files() {
 	return ret;
 }
 
-void IOGame::save(int16 y, int16 slotNum, char *fname) {
-	_cur->wait_taste_los(true);
-	_in->alter_kb_handler();
-	_cur->hide_cur();
-	_out->pop_box
-	(_io->popx + 8, y, _io->popx + 131, y + 10, _io->m_col[1], _io->m_col[0], _io->m_col[4]);
-
-	_out->printxy(_io->popx + 10, y + 2, _io->m_col[0], 300, _scrWidth, "%d.", slotNum + 1);
-	if (_fileFind[slotNum][0] == 0) {
-		_out->scanxy(_io->popx + 28, y + 2, _io->m_col[0], _io->m_col[4], _io->m_col[2], _scrWidth, "%36s15", &_fileFind[slotNum][1]);
-	} else {
-		_out->printxy(_io->popx + 167, _io->popy + 85, _io->m_col[1], 300, _scrWidth, FSTRING7);
-		_out->scanxy(_io->popx + 28, y + 2, _io->m_col[0], _io->m_col[4], _io->m_col[2], _scrWidth, "%36s15", &_fileFind[slotNum][1]);
-
-	}
-	_in->neuer_kb_handler(_kbinfo);
-	mark_eintrag(y, slotNum);
-	_out->box_fill(_io->popx + 167, _io->popy + 70, _io->popx + 244, _io->popy + 100, _io->m_col[5]);
-
-	_cur->show_cur();
-
-	Common::String desc(&_fileFind[slotNum][1]);
-	(void)g_engine->saveGameState(slotNum, desc);
-}
-
-void IOGame::load(int16 slotNum, char *fname) {
-	get_savegame_files();
-
-	_cur->hide_cur();
-	if (_fileFind[slotNum][0] == 1) {
-		(void)g_engine->loadGameState(slotNum);
-	}
-}
-
-void IOGame::print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 width, char *name) {
-	_out->printxy(x + 1, y + 1, scol, bcol, width, name);
-	_out->printxy(x, y, fcol, bcol, width, name);
-}
-
-char *IOGame::io_init(iog_init *iostruc) {
-	_io = iostruc;
-	for (int16 i = 0; i < 20; i++)
-		_fileFind[i][0] = 0;
-	get_savegame_files();
-
-	return &_fileFind[0][0];
-}
-
-void IOGame::save_entry(int16 slotNum, char *fname) {
-	Common::String desc(&_fileFind[slotNum][1]);
-	g_engine->saveGameState(slotNum, desc);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index e815a94ea2a..1b282ecbc43 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_IOGAME_H
-#define CHEWY_IOGAME_H
+#ifndef CHEWY_IOGame2_H
+#define CHEWY_IOGame2_H
 
 #include "chewy/mcga.h"
 #include "chewy/cursor.h"
@@ -28,40 +28,6 @@
 
 namespace Chewy {
 
-#ifdef ENGLISCH
-
-#define FSTRING1 "F1 Save"
-#define FSTRING2 "F2 Load"
-#define FSTRING3 "F3 Quit"
-#define FSTRING4 "F4 Return"
-#define FSTRING5 " Are You "
-#define FSTRING6 "Sure (Y/N)?"
-#define FSTRING7 "ESC Cancel"
-#define FSTRING8 "U"
-#define FSTRING9 " "
-#define FSTRING10 "P"
-#define FSTRING11 "D"
-#define FSTRING12 "O"
-#define FSTRING13 "W"
-#define FSTRING14 "N"
-#else
-
-#define FSTRING1 "F1 Speichern"
-#define FSTRING2 "F2 Laden"
-#define FSTRING3 "F3 Beenden "
-#define FSTRING4 "F4 Zurück"
-#define FSTRING5 " Bist Du "
-#define FSTRING6 "sicher (J/N)?"
-#define FSTRING7 "ESC Abbrechen"
-#define FSTRING8 "A"
-#define FSTRING9 "U"
-#define FSTRING10 "F"
-#define FSTRING11 " "
-#define FSTRING12 "A"
-#define FSTRING13 "B"
-#define FSTRING14 " "
-#endif
-
 #define IOG_END 1
 #define IOG_LOAD 2
 #define IOG_SAVE 3
@@ -71,44 +37,22 @@ namespace Chewy {
 #define DOPPEL_KLICK 0.5
 
 class IOGame {
-public:
-	IOGame(McgaGraphics *out, InputMgr *in, Cursor *curp);
-	~IOGame();
+private:
+	Cursor *_cur;
+	iog_init *_io;
+	InputMgr *_in;
+	McgaGraphics *_out;
+	char _fileFind[20][USER_NAME + 4];
+
+private:
+	int16 get_savegame_files();
 
-	int16 io_menu(iog_init *iostruc);
+public:
+	IOGame(McgaGraphics *out, InputMgr *in, Cursor *cur);
 
-	void print_shad(int16 x, int16 y,
-	                int16 fcol, int16 bcol,
-	                int16 scol, int16 width,
-	                char *name);
 	char *io_init(iog_init *iostruc);
 	void load(int16 nr, char *fname);
 	void save_entry(int16 nr, char *fname);
-
-private:
-	void save(int16 y, int16 nr, char *fname);
-	void plot_io();
-	void plot_auf_txt(int16 farbe);
-	void plot_ab_txt(int16 farbe);
-	void mark_eintrag(int16 y, int16 nr);
-	void unmark_eintrag(int16 y, int16 nr);
-	void plot_dir_liste(int16 cur_y, int16 start);
-	void schalter_aus();
-	int16 get_savegame_files();
-	void itoa(int N, char *str, int base);
-
-	McgaGraphics *_out;
-	InputMgr *_in;
-	Cursor *_cur;
-	iog_init *_io;
-	uint32 _dblClickStart, _dblClickEnd;
-	kb_info *_kbinfo;
-	maus_info *_minfo;
-	in_zeiger *_inzeig;
-	int16 _scrWidth;
-	float _dblClick;
-	int16 _switchCode;
-	char _fileFind[20][USER_NAME + 4];
 };
 
 } // namespace Chewy


Commit: 3780ada931416c883c68b7e9e7951bff9417009a
    https://github.com/scummvm/scummvm/commit/3780ada931416c883c68b7e9e7951bff9417009a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Remove method declarations that have no implementation

Changed paths:
    engines/chewy/data.h
    engines/chewy/detail.h
    engines/chewy/mcga.h
    engines/chewy/memory.h
    engines/chewy/mouse.h
    engines/chewy/room.h


diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 356a325f3e3..3ec015b8959 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -47,7 +47,6 @@ public:
 
 	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
-	void read_tbf_image(Stream *stream, int16 komp, uint32 size, byte *sp);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 60bac19e5e6..9aa1c3e7635 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -219,7 +219,6 @@ public:
 	void stop_detail(int16 nr);
 	void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 	                      int16 zoomx, int16 zoomy);
-	void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end);
 	void plot_static_details(int16 scrx, int16 scry, int16 start, int16 end);
 	void init_list(int16 *mv);
 	void get_list(int16 *mv);
@@ -237,9 +236,6 @@ public:
 
 	void del_taf_tbl(int16 start, int16 anz, taf_info *Tt);
 
-	void load_taf_seq(Stream *stream, int16 spr_nr, int16 spr_anz,
-	                  taf_info *Tt);
-
 	void load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt);
 	void load_taf_tbl(taf_info *fti);
 
@@ -259,7 +255,6 @@ public:
 	void enable_room_sound();
 	void clear_room_sound();
 	void set_taf_ani_mem(byte *load_area);
-	void load_sprite_pointer(Stream *stream);
 
 private:
 	void load_taf_ani_sprite(int16 nr);
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index b736430b952..b4bd347f8b6 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -54,7 +54,6 @@ void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
 	int16 height, int16 scrWidth);
 void spr_set_mcga(const byte *sptr, int16 x, int16 y, int16 scrWidth);
 void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth);
-void zoom_img(byte *source, byte *dest, int16 xdiff, int16 ydiff);
 void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
     int16 ydiff, int16 scrWidth);
 
@@ -63,9 +62,6 @@ void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth);
 void setfont(byte *addr, int16 width, int16 height, int16 first,
              int16 last);
 void vors();
-void movecur(int16 x, int16 y);
-
-uint8 joystick();
 
 void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index e974291d4b8..a18c7ab9991 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -31,7 +31,6 @@ class Memory {
 public:
 	Memory();
 	~Memory();
-	void init();
 
 	taf_info *taf_adr(const char *filename);
 	taf_seq_info *taf_seq_adr(int16 image_start, int16 image_anz);
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 7246d7fa552..15979012472 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -47,10 +47,7 @@ public:
 
 	void neuer_kb_handler(kb_info *key);
 	void alter_kb_handler();
-
 	void neuer_maushandler(maus_info *mpos);
-	maus_info *maus_info_adr();
-
 	int16 maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
 	in_zeiger *get_in_zeiger();
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index b41692d350a..32513d22a74 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -53,7 +53,6 @@ protected:
 	static void setup_func();
 };
 
-
 struct RaumBlk {
 	byte *LowPalMem;
 	const char *InvFile;
@@ -61,7 +60,6 @@ struct RaumBlk {
 	byte **InvSprAdr;
 
 	RoomMovObject *Rmo;
-
 	RoomStaticInventar *Rsi;
 
 	char RoomDir[9];
@@ -78,7 +76,6 @@ struct RaumTimer {
 	int16 TimerAnz;
 
 	uint8 ObjNr[MAX_ROOM_TIMER];
-
 	uint8 TimerNr[MAX_ROOM_TIMER];
 };
 


Commit: 49fd2bd1f04640768d3aa8337ddbdf8bff7da2b8
    https://github.com/scummvm/scummvm/commit/49fd2bd1f04640768d3aa8337ddbdf8bff7da2b8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Properly clear mouse click when used to skip dialogue

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/events.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 0d11da11800..6afd012af61 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -23,6 +23,7 @@
 #include "chewy/ngshext.h"
 #include "chewy/atds.h"
 #include "chewy/defines.h"
+#include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/global.h"
 #include "chewy/sound.h"
@@ -908,6 +909,8 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 			case Common::KEYCODE_ESCAPE:
 			case Common::KEYCODE_RETURN:
 			case MAUS_LINKS:
+				EVENTS_CLEAR;
+
 				if (_mousePush == false) {
 					if (_aadv.SilentCount <= 0 && _aadv.DelayCount > _printDelayCount1) {
 						_mousePush = true;
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index f26cd2a3683..e1eb0d29b0c 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -58,7 +58,7 @@ void Cinema::execute() {
 	room->open_handle(GBOOK, "rb", 0);
 	room->load_tgp(4, &room_blk, 1, 0, GBOOK);
 	show_cur();
-	g_events->clearEvents();
+	EVENTS_CLEAR;
 	kbinfo.scan_code = 0;
 
 	for (bool endLoop = false; !endLoop;) {
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 4e780662d65..23e725d9981 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -67,7 +67,7 @@ int16 Files::execute(bool isInGame) {
 	}
 
 	taf_info *ti = _G(mem)->taf_adr(OPTION_TAF);
-	g_events->clearEvents();
+	EVENTS_CLEAR;
 
 	room->open_handle(GBOOK, "rb", 0);
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index a1822ead47c..4f8a94739eb 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -86,7 +86,7 @@ void MainMenu::execute() {
 
 		switch (_selection) {
 		case MM_START_GAME:
-			g_events->clearEvents();
+			EVENTS_CLEAR;
 			startGame();
 			playGame();
 			break;
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 6f29ab8d610..08ee9f8968e 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -67,6 +67,7 @@ extern char getch();
 extern void putch(char c);
 
 #define EVENTS_UPDATE g_events->update()
+#define EVENTS_CLEAR g_events->clearEvents()
 
 } // namespace Chewy
 


Commit: 15831e186691a08bff86f796c68280c93366306b
    https://github.com/scummvm/scummvm/commit/15831e186691a08bff86f796c68280c93366306b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Review logic of Room 7; fix a couple of issues

Changed paths:
    engines/chewy/rooms/room07.cpp


diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index c3fb7ce8b4e..9834a7f1c70 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -74,8 +74,10 @@ void Room7::haken(int16 sib_nr) {
 }
 
 void Room7::klingel() {
+	hide_cur();
+	
 	if ((!_G(spieler).R7BellCount) ||
-		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft != 0 && !_G(spieler).R7SeilOk)) {
+		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft && !_G(spieler).R7SeilOk)) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(5, 0);
 		start_ani_block(3, ABLOCK25);
@@ -144,7 +146,7 @@ void Room7::klingel() {
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
-		det->del_taf_tbl(192, 74, 0);
+		det->del_taf_tbl(192, 74, nullptr);
 
 	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
 		_G(spieler).R7BorkFlug = true;
@@ -163,25 +165,20 @@ void Room7::klingel() {
 	}
 
 	++_G(spieler).R7BellCount;
+
+	show_cur();
 }
 
 void Room7::gedAction(int index) {
-	switch (index) {
-	case 0:
-		if (_G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(20, 1, ANI_VOR);
-			det->show_static_spr(10);
-			wait_show_screen(20 * _G(spieler).DelaySpeed);
-			det->hide_static_spr(10);
-			set_person_pos(180, 124, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(spieler).R7ChewyFlug = false;
-		}
-		break;
-
-	default:
-		break;
+	if (index == 0 && _G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
+		_G(spieler).PersonHide[P_CHEWY] = true;
+		set_person_pos(180, 124, P_CHEWY, P_LEFT);
+		start_detail_wait(20, 1, ANI_VOR);
+		det->show_static_spr(10);
+		wait_show_screen(10 * _G(spieler).DelaySpeed);
+		det->hide_static_spr(10);
+		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler).R7ChewyFlug = false;
 	}
 }
 


Commit: babff2b11fba6613e86e4095557140bd141e1f28
    https://github.com/scummvm/scummvm/commit/babff2b11fba6613e86e4095557140bd141e1f28
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Review logic of Room 6, fix issue

Changed paths:
    engines/chewy/rooms/room06.cpp


diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index e7d26fcf4c0..d67a4175f66 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -23,20 +23,19 @@
 #include "chewy/events.h"
 #include "chewy/global.h"
 #include "chewy/ani_dat.h"
-#include "chewy/room.h"
 #include "chewy/rooms/room06.h"
 
 namespace Chewy {
 namespace Rooms {
 
-static const int16 R6_ROBO_PHASEN[4][2] = {
+static const int16 ROBO_PHASEN[4][2] = {
 	{ 86, 86 },
 	{ 86, 86 },
 	{ 86, 86 },
 	{ 86, 86 }
 };
 
-static const MovLine R6_ROBO_MPKT[3] = {
+static const MovLine ROBO_MPKT[3] = {
 	{ { 168,  71, 180 }, 1,  1 },
 	{ { 180,  71, 100 }, 1,  2 },
 	{ {  60, 210, 110 }, 1, 16 }
@@ -59,24 +58,22 @@ void Room6::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 
-	if (_G(spieler).R6BolaSchild) {
-		if (_G(spieler).R6RaumBetreten < 2) {
-			det->start_detail(7, 255, ANI_VOR);
-			atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-			if (!flags.LoadGame)
-				++_G(spieler).R6RaumBetreten;
+	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
+		det->start_detail(7, 255, ANI_VOR);
+		atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+		if (!flags.LoadGame)
+			++_G(spieler).R6RaumBetreten;
 
-			if (_G(spieler).R6RaumBetreten == 2) {
-				hide_cur();
-				det->stop_detail(7);
-				init_robo();
-				wait_auto_obj(0);
-				_G(spieler).R6BolaOk = true;
-				obj->show_sib(SIB_BOLA_KNOPF_R6);
-				obj->hide_sib(SIB_BOLA_R6);
-				atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-				show_cur();
-			}
+		if (_G(spieler).R6RaumBetreten == 2) {
+			hide_cur();
+			det->stop_detail(7);
+			init_robo();
+			wait_auto_obj(0);
+			_G(spieler).R6BolaOk = true;
+			obj->show_sib(SIB_BOLA_KNOPF_R6);
+			obj->hide_sib(SIB_BOLA_R6);
+			atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+			show_cur();
 		}
 	}
 }
@@ -91,12 +88,10 @@ void Room6::init_robo() {
 	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
 	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[ROBO_OBJ].Mode = true;
-	init_auto_obj(ROBO_OBJ, &R6_ROBO_PHASEN[0][0], mov_phasen[ROBO_OBJ].Lines,
-		(const MovLine *)R6_ROBO_MPKT);
+	init_auto_obj(ROBO_OBJ, &ROBO_PHASEN[0][0], 3, (const MovLine *)ROBO_MPKT);
 }
 
 void Room6::bola_knopf() {
-	int16 tmp;
 	if (!_G(spieler).R6BolaBecher) {
 		det->hide_static_spr(0);
 		start_detail_wait(0, 1, ANI_VOR);
@@ -123,11 +118,9 @@ void Room6::bola_knopf() {
 			}
 			det->show_static_spr(0);
 			++_G(spieler).R6BolaJoke;
-			if (_G(spieler).R6BolaJoke < 3)
-				tmp = 3;
-			else
-				tmp = 4;
-			start_aad_wait(tmp, -1);
+			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
+			start_spz(4, 244, false, 0);
+			start_aad_wait(diaNr, -1);
 		}
 		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 	}


Commit: 4cb351eeb4ab7f4c55cbc4ad3eca7b3303316b8d
    https://github.com/scummvm/scummvm/commit/4cb351eeb4ab7f4c55cbc4ad3eca7b3303316b8d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: More arrays to become statics

Changed paths:
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index d529ec6c20a..1d437192e90 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -41,6 +41,9 @@ static const int16 INVENTORY_HOTSPOTS[INVENTORY_HOTSPOTS_COUNT][4] = {
 	{ WIN_INF_X + 242, WIN_INF_Y + 156, WIN_INF_X + 292, WIN_INF_Y + 156 + 14 }
 };
 
+static const int16 ANI_INVENT_END[3] = { 7, 16, 24 };
+
+
 int16 Inventory::inv_rand_x;
 int16 Inventory::inv_rand_y;
 int Inventory::keyVal;
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 45ee1254da5..ae2c3cf640b 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -42,80 +42,6 @@ namespace Chewy {
 
 const uint8 RAND_NO_USE[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
 
-const int16 ANI_INVENT_END[3] = { 7, 16, 24 };
-
-const int16 SPZ_ANI_PH[][2] = {
-	{   0,   12 },
-	{  12,    6 },
-	{  18,    6 },
-	{  24,    6 },
-	{  30,    6 },
-	{  36,    6 },
-	{  42,    6 },
-	{  48,    5 },
-	{  53,    3 },
-	{  56,   14 },
-	{  70,    7 },
-	{  77,    6 },
-	{  83,    5 },
-	{  88,    8 },
-	{  96,    5 },
-	{   5,    7 },
-	{  24,   12 },
-	{ 101,   19 },
-	{ 120,    8 },
-	{ 128,    3 },
-	{ 128,    8 },
-	{ 136,    8 },
-	{ 465,    8 },
-	{ 473,    3 },
-	{ 473,    8 },
-	{ 481,    8 },
-	{ 144,    6 },
-	{ 150,    5 },
-	{ 155,    9 },
-	{ 155,    3 },
-	{ 164,    3 },
-	{ 167,    8 },
-	{ 175,    7 },
-	{ 182,   10 },
-	{ 192,   15 },
-	{ 214,    8 },
-	{ 207,    3 },
-	{ 210,    4 },
-	{ 214,    8 },
-	{ 559,    8 },
-	{ 552,    3 },
-	{ 555,    4 },
-	{ 559,    8 },
-	{ 222,    7 },
-	{ 229,    4 },
-	{ 233,    9 },
-	{ 242,    4 },
-	{ 270,    8 },
-	{ 246,    8 },
-	{ 297,    3 },
-	{ 297,    8 },
-	{ 262,    8 },
-	{ 591,    8 },
-	{ 642,    3 },
-	{ 642,    8 },
-	{ 254,    8 },
-	{ 288,    3 },
-	{ 288,    9 },
-	{ 607,    8 },
-	{ 599,    8 },
-	{ 633,    3 },
-	{ 633,    9 },
-	{ 305,   18 },
-	{ 278,   10 },
-	{ 323,    2 },
-	{ 325,    6 },
-	{ 331,    2 },
-	{ 333,    8 },
-	{ 341,    4 }
-};
-
 
 Globals *g_globals = nullptr;
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 23a86955e1a..879cf4aba46 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -43,8 +43,6 @@ namespace Chewy {
 #define R45_MAX_PERSON 9
 
 extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
-extern const int16 ANI_INVENT_END[3];
-extern const int16 SPZ_ANI_PH[][2];
 
 class ChewyFont;
 class Cursor;
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 3b03fb45b11..4becc78a740 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -34,6 +34,79 @@ namespace Chewy {
 #define ZOBJ_HOWARD 7
 #define ZOBJ_NICHELLE 8
 
+static const int16 SPZ_ANI_PH[][2] = {
+	{   0,   12 },
+	{  12,    6 },
+	{  18,    6 },
+	{  24,    6 },
+	{  30,    6 },
+	{  36,    6 },
+	{  42,    6 },
+	{  48,    5 },
+	{  53,    3 },
+	{  56,   14 },
+	{  70,    7 },
+	{  77,    6 },
+	{  83,    5 },
+	{  88,    8 },
+	{  96,    5 },
+	{   5,    7 },
+	{  24,   12 },
+	{ 101,   19 },
+	{ 120,    8 },
+	{ 128,    3 },
+	{ 128,    8 },
+	{ 136,    8 },
+	{ 465,    8 },
+	{ 473,    3 },
+	{ 473,    8 },
+	{ 481,    8 },
+	{ 144,    6 },
+	{ 150,    5 },
+	{ 155,    9 },
+	{ 155,    3 },
+	{ 164,    3 },
+	{ 167,    8 },
+	{ 175,    7 },
+	{ 182,   10 },
+	{ 192,   15 },
+	{ 214,    8 },
+	{ 207,    3 },
+	{ 210,    4 },
+	{ 214,    8 },
+	{ 559,    8 },
+	{ 552,    3 },
+	{ 555,    4 },
+	{ 559,    8 },
+	{ 222,    7 },
+	{ 229,    4 },
+	{ 233,    9 },
+	{ 242,    4 },
+	{ 270,    8 },
+	{ 246,    8 },
+	{ 297,    3 },
+	{ 297,    8 },
+	{ 262,    8 },
+	{ 591,    8 },
+	{ 642,    3 },
+	{ 642,    8 },
+	{ 254,    8 },
+	{ 288,    3 },
+	{ 288,    9 },
+	{ 607,    8 },
+	{ 599,    8 },
+	{ 633,    3 },
+	{ 633,    9 },
+	{ 305,   18 },
+	{ 278,   10 },
+	{ 323,    2 },
+	{ 325,    6 },
+	{ 331,    2 },
+	{ 333,    8 },
+	{ 341,    4 }
+};
+
+
 void sprite_engine() {
 	int16 zmin;
 	int16 min_zeiger = 0;


Commit: 0d19fd29e8e24fc24aec9fa6d7b3571ee1d7ae86
    https://github.com/scummvm/scummvm/commit/0d19fd29e8e24fc24aec9fa6d7b3571ee1d7ae86
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:28-08:00

Commit Message:
CHEWY: Remove unused globals

Changed paths:
    engines/chewy/global.cpp
    engines/chewy/global.h


diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index ae2c3cf640b..339089edb4a 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -70,12 +70,8 @@ int16 person_tmp_hide[MAX_PERSON];
 int16 person_tmp_room[MAX_PERSON];
 
 int16 FrameSpeed;
-
 int16 FrameSpeedTmp;
 
-int16 frame_delay_count;
-int16 show_frame;
-
 byte **ablage;
 byte *workpage;
 byte *workptr;
@@ -95,7 +91,6 @@ int16 fvorx8x8;
 int16 fvory6x8;
 short fvory8x8;
 
-char *str;
 char **ads_item_ptr;
 
 int16 ads_dia_nr;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 879cf4aba46..b10d4cb6d75 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -187,14 +187,9 @@ extern Globals *g_globals;
 extern int16 person_tmp_hide[MAX_PERSON];
 extern int16 person_tmp_room[MAX_PERSON];
 
-extern char *err_str;
-extern uint32 ram_end;
-
 extern int16 FrameSpeed;
 extern int16 FrameSpeedTmp;
 
-extern int16 show_frame;
-
 extern byte **ablage;
 extern byte *workpage;
 extern byte *workptr;
@@ -299,19 +294,8 @@ extern MovClass *mov;
 extern char backged[];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
 extern int16 HowardMov;
-
 extern int16 AkChewyTaf;
-/*
-extern uint8 chewy_phasen[8][8];
-extern uint8 chewy_bo_phasen[8][8];
-extern uint8 chewy_mi_phasen[8][8];
-extern uint8 chewy_ro_phasen[8][8];
-extern uint8 chewy_jm_phasen[8][8];
-extern uint8 chewy_phasen_anz[];
-extern uint8 chewy_bo_phasen_anz[];
-extern uint8 chewy_mi_phasen_anz[];
-extern uint8 chewy_ro_phasen_anz[];
-*/
+
 extern int16 PersonAni[MAX_PERSON];
 extern taf_seq_info *PersonTaf[MAX_PERSON];
 extern uint8 PersonSpr[MAX_PERSON][8];


Commit: 232ffd0b93769873462e4091191070e77f54ab27
    https://github.com/scummvm/scummvm/commit/232ffd0b93769873462e4091191070e77f54ab27
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Review logic in Room 5, reduce variable scope

Changed paths:
    engines/chewy/rooms/room05.cpp


diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 46fe4b5e19f..00d7e3c52fa 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -35,8 +35,8 @@ void Room5::entry() {
 }
 
 void Room5::pushButton() {
-	int16 str_nr;
 	if (_G(spieler).R5Terminal) {
+		int16 str_nr;
 		if (_G(spieler).R5Tuer == false) {
 			start_detail_wait(9, 1, ANI_VOR);
 			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;


Commit: 911798a78cb32c9c72be9cabc15f0bd79ed07358
    https://github.com/scummvm/scummvm/commit/911798a78cb32c9c72be9cabc15f0bd79ed07358
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Review the logic of Room 4

Changed paths:
    engines/chewy/rooms/room04.cpp


diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 332f3a5b43c..ed36ab6c095 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -67,13 +67,13 @@ int16 Room4::sonde_comp() {
 					--cur_x;
 				else
 					cur_x = 2;
-				g_engine->_sound->playSound(0, 1, false);
+				g_engine->_sound->playSound(0, 1);
 				break;
 
 			case 1:
 				ende = 1;
 				spr_nr = RAHMEN_GELB;
-				g_engine->_sound->playSound(0);
+				g_engine->_sound->playSound(0, 0);
 				break;
 
 			case 2:
@@ -81,18 +81,19 @@ int16 Room4::sonde_comp() {
 					++cur_x;
 				else
 					cur_x = 0;
-				g_engine->_sound->playSound(0, 2, false);
+				g_engine->_sound->playSound(0, 2);
 				break;
 
 			default:
 				break;
 			}
 		}
-		spr_info[0].Image = room_blk.DetImage[spr_nr];
 
+		spr_info[0].Image = room_blk.DetImage[spr_nr];
 		spr_info[0].ZEbene = 0;
 		spr_info[0].X = CUR_POS[cur_x][0];
 		spr_info[0].Y = CUR_POS[cur_x][1];
+
 		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			curani.ani_anf = HAND_CLICK;
 			curani.ani_end = HAND_CLICK;
@@ -103,9 +104,10 @@ int16 Room4::sonde_comp() {
 		cursor_wahl(CUR_USER);
 		_G(spieler).CurHoehe = 16;
 		_G(in)->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
-		if (minfo.y < 124) {
+
+		if (minfo.y < 124)
 			minfo.y = 123;
-		}
+
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
@@ -115,13 +117,13 @@ int16 Room4::sonde_comp() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = CUR_WALK;
 	cursor_wahl(menu_item);
-	set_person_pos(118 - CH_HOT_MOV_X,
-		164 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+
 	spieler_vector[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
 	minfo.button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	room->load_room(&room_blk, 3, &_G(spieler));
+	set_person_pos(110, 139, P_CHEWY, P_LEFT);
 
 	fx_blend = BLEND1;
 	atds->stop_aad();


Commit: 4469a6ce1bda62522ab64be3ff77080d94f29a77
    https://github.com/scummvm/scummvm/commit/4469a6ce1bda62522ab64be3ff77080d94f29a77
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Review logic of Room 02

Changed paths:
    engines/chewy/rooms/room02.cpp


diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index f17238fdc6c..05987aa3f21 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/global.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room02.h"
 
@@ -79,19 +78,14 @@ void Room2::electrifyWalkway2() {
 }
 
 void Room2::gedAction(int index) {
-	switch (index) {
-	case 0:
+	if (index == 0) {
 		det->stop_detail(5);
-		if (!_G(spieler).R2ElectrocutedBork) {
+		if (!_G(spieler).R2ElectrocutedBork)
 			det->start_detail(6, 2, ANI_VOR);
-		} else {
+		else
 			start_ani_block(2, ABLOCK4);
-		}
-		jump_out_r1(9);
-		break;
 
-	default:
-		break;
+		jump_out_r1(9);
 	}
 }
 


Commit: d1ac557f14ef1625de3eee44e821d23d3da723c1
    https://github.com/scummvm/scummvm/commit/d1ac557f14ef1625de3eee44e821d23d3da723c1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Use more consistently constants with start_spz

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ea32d281b77..8a19df835dd 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1913,7 +1913,7 @@ void sib_event_inv(int16 sib_nr) {
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(115, 0);
 
 		if (_G(spieler).R12TransOn)
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 05987aa3f21..49db180da90 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -56,7 +56,7 @@ void Room2::jump_out_r1(int16 nr) {
 
 void Room2::electrifyWalkway1() {
 	det->start_detail(ANI_5, 255, ANI_VOR);
-	start_spz(ANI_5, 255, false, ANI_VOR);
+	start_spz(CH_TALK6, 255, false, ANI_VOR);
 	start_aad_wait(49, -1);
 	det->stop_detail(ANI_5);
 
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index d67a4175f66..be19f02c683 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -119,7 +119,7 @@ void Room6::bola_knopf() {
 			det->show_static_spr(0);
 			++_G(spieler).R6BolaJoke;
 			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
-			start_spz(4, 244, false, 0);
+			start_spz(CH_TALK5, 244, false, 0);
 			start_aad_wait(diaNr, -1);
 		}
 		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index e60a97782f3..a684d7394f3 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -80,7 +80,7 @@ void Room9::surimy() {
 	det->hide_static_spr(4);
 	room->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
-	start_spz(15, 255, false, P_CHEWY);
+	start_spz(CH_TALK11, 255, false, P_CHEWY);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 45486864ac7..dcd11315437 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -40,7 +40,7 @@ void Room10::entry() {
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		hide_cur();
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(101, 0);
 		show_cur();
 
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 80e34815a34..264faea32bb 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -86,7 +86,7 @@ void Room12::entry() {
 		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
 		obj->calc_all_static_detail();
 		auto_move(5, P_CHEWY);
-		start_spz(16, 255, false, 0);
+		start_spz(CH_TALK12, 255, false, 0);
 		start_aad_wait(109, -1);
 		show_cur();
 
@@ -199,7 +199,7 @@ int16 Room12::use_terminal() {
 			start_aad_wait(110, -1);
 
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
-				start_spz(4, 255, false, P_CHEWY);
+				start_spz(CH_TALK5, 255, false, P_CHEWY);
 				start_aad_wait(112, -1);
 				flags.NoScroll = true;
 				auto_scroll(46, 0);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 5dc0a8047a8..61d5f9a552e 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -50,7 +50,7 @@ void Room13::entry() {
 		flic_cut(FCUT_013, CFO_MODE);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
-		start_spz(16, 255, false, P_CHEWY);
+		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 523559d14d1..bc29bb704ac 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -151,7 +151,7 @@ int16 Room17::use_seil() {
 		plot_seil();
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.AutoAniPlay = false;
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(119, -1);
 
 		show_cur();
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 0caf7e99c6b..3c2a50a30bc 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -60,7 +60,7 @@ void Room66::entry(int16 eib_nr) {
 		start_detail_wait(1, 1, ANI_VOR);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_spz(16, 255, false, P_CHEWY);
+		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(404, -1);
 		start_aad_wait(415, -1);
 		show_cur();
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 8c8893a1e9e..b7235efaee2 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -213,10 +213,10 @@ int Room76::proc7() {
 		_G(spieler).flags29_80 = true;
 		switch_room(78);
 	} else {
-			hide_cur();
-			start_spz(16, 255, false, P_CHEWY);
-			start_aad_wait(577, -1);
-			show_cur();
+		hide_cur();
+		start_spz(CH_TALK12, 255, false, P_CHEWY);
+		start_aad_wait(577, -1);
+		show_cur();
 	}
 
 	return 1;
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 9e0a5291db0..334c0df1043 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -98,7 +98,7 @@ void Room81::proc1() {
 	}
 	
 	if (diaNr != -1) {
-		start_spz(16, 255, false, P_CHEWY);
+		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(diaNr, -1);
 	}
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index b74989ad658..49500b1a2a4 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -211,7 +211,7 @@ int Room82::proc6() {
 		remove_inventory(105);
 		remove_inventory(106);
 	} else {
-		start_spz(16, 255, false, P_CHEWY);
+		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(276, -1);
 	}
 
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 87dd9e0ebfb..1feb98948cf 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -159,7 +159,7 @@ int Room86::proc2() {
 	atds->set_ats_str(498, 1, ATS_DATEI);
 	_G(spieler).flags32_2 = true;
 	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
-	start_spz(16, 255, false, P_CHEWY);
+	start_spz(CH_TALK12, 255, false, P_CHEWY);
 	start_aad_wait(468, -1);
 
 	show_cur();
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 9e41fbaafbc..67e3d59eeba 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -128,7 +128,7 @@ int Room87::proc2(int16 txt_nr) {
 	}
 
 	if (diaNr) {
-		start_spz(0, 255, false, P_CHEWY);
+		start_spz(CH_TALK1, 255, false, P_CHEWY);
 		start_aad_wait(diaNr, -1);
 	} else {
 		auto_move(movNr, P_CHEWY);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index acf9b55d71d..958240ee68d 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -203,7 +203,7 @@ int Room89::proc4() {
 		_G(spieler).flags32_80 = true;
 		det->hide_static_spr(6);
 		new_invent_2_cur(111);
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(491, -1);
 	} else {
 		det->show_static_spr(5);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 235b0821c4c..071099a2bb9 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -115,7 +115,7 @@ int Room95::proc2() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
 		switch_room(97);
 	} else {
-		start_spz(0, 255, false, P_CHEWY);
+		start_spz(CH_TALK1, 255, false, P_CHEWY);
 		start_aad_wait(548, -1);
 	}
 
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index f166fc47c4e..b6cce8c391b 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -368,7 +368,7 @@ void Room97::proc4() {
 		go_auto_xy(995, 82, P_HOWARD, ANI_WAIT);
 		det->hide_static_spr(2);
 		spieler_mi[P_CHEWY].Mode = false;
-		start_spz(4, 255, false, P_CHEWY);
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
 		HowardMov = 0;
 		show_cur();
@@ -428,7 +428,7 @@ int Room97::proc6() {
 	det->hide_static_spr(18);
 	start_detail_wait(15, 1, ANI_VOR);
 	det->show_static_spr(17);
-	start_spz(4, 255, false, P_CHEWY);
+	start_spz(CH_TALK5, 255, false, P_CHEWY);
 	start_aad_wait(558, -1);
 	det->hide_static_spr(28);
 	det->stop_detail(5);
@@ -518,7 +518,7 @@ int Room97::proc8() {
 	}
 
 	if (diaNr != -1) {
-		start_spz(4, 255, false, P_CHEWY);
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(diaNr, -1);
 	}
 
@@ -534,7 +534,7 @@ int Room97::proc9() {
 	auto_move(5, P_CHEWY);
 	
 	if (!_G(spieler).flags36_20) {
-		start_spz(4, 255, false, P_CHEWY);
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(556, -1);
 	} else {
 		start_spz_wait(13, 1, false, P_CHEWY);
@@ -581,14 +581,14 @@ int Room97::proc11() {
 	hide_cur();
 
 	if (!_G(spieler).flags37_2) {
-		start_spz(4, 255, false, P_CHEWY);
+		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(569, -1);
 	} else {
 		auto_move(9, P_CHEWY);
 		start_aad_wait(570, -1);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		auto_move(7, P_CHEWY);
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(571, -1);
 		g_engine->_sound->playSound(4, 0);
 		g_engine->_sound->playSound(4);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index e35f52293cb..24e68d47caa 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -159,7 +159,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							flc->set_custom_user_function(Room6::cut_serv1);
 							flic_cut(FCUT_005, CFO_MODE);
 							flc->remove_custom_user_function();
-							start_spz(4, -1, false, P_CHEWY);
+							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
 							show_cur();
 						} else {
@@ -2265,7 +2265,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case 13:
 		_G(spieler).flags26_10 = true;
 		flags.InventMenu = false;
-		start_spz(5, 255, false, P_CHEWY);
+		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		flags.InventMenu = true;
 		atds->set_ats_str(88, 1, INV_ATS_DATEI);


Commit: 69ed3921244f508166c1669d029ae5c9ee8de834
    https://github.com/scummvm/scummvm/commit/69ed3921244f508166c1669d029ae5c9ee8de834
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Move graphics related globals to Globals

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/debugger.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.h
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 87fca8016dc..17a186dbc5d 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -116,7 +116,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 		load_chewy_taf(_G(spieler).ChewyAni);
 
-		fx_blend = BLEND1;
+		_G(fx_blend) = BLEND1;
 		room->calc_invent(&room_blk, &_G(spieler));
 
 		if (_G(spieler).AkInvent != -1)
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index d47da88611c..43f29851346 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -62,7 +62,7 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 		exit_room(-1);
 		_G(spieler).PersonRoomNr[P_CHEWY] = roomNum;
 		room->load_room(&room_blk, roomNum, &_G(spieler));
-		fx_blend = BLEND1;
+		_G(fx_blend) = BLEND1;
 		enter_room(-1);
 
 		return false;
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index e1eb0d29b0c..168b8febced 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -51,8 +51,8 @@ void Cinema::execute() {
 	Common::Array<int> cutscenes;
 	getCutscenes(cutscenes);
 
-	_G(out)->set_fontadr(font6x8);
-	_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+	_G(out)->set_fontadr(_G(font6x8));
+	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 	atds->load_atds(98, 1);
 
 	room->open_handle(GBOOK, "rb", 0);
@@ -80,7 +80,7 @@ void Cinema::execute() {
 		} else {
 			// No cutscenes seen yet
 			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
-			_G(out)->printxy(40, 68, 14, 300, scr_width, none);
+			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), none);
 		}
 
 		if (minfo.button == 1 && !flag) {
@@ -161,15 +161,15 @@ void Cinema::execute() {
 		case Common::KEYCODE_RETURN:
 			hide_cur();
 			_G(out)->cls();
-			_G(out)->setze_zeiger(screen0);
-			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			_G(out)->setze_zeiger(_G(screen0));
+			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 			print_rows(546 + topIndex);
 
 			flc->set_custom_user_function(cut_serv);
 			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
 			flc->remove_custom_user_function();
-			_G(out)->set_fontadr(font6x8);
-			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->set_fontadr(_G(font6x8));
+			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			show_cur();
 			delay = 0;
 			flag = false;
@@ -189,9 +189,9 @@ void Cinema::execute() {
 
 			if (flag) {
 				flag = false;
-				_G(out)->setze_zeiger(screen0);
+				_G(out)->setze_zeiger(_G(screen0));
 				room->set_ak_pal(&room_blk);
-				fx->blende1(workptr, screen0, pal, 150, 0, 0);
+				fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 			} else {
 				_G(out)->back2screen(workpage);
 			}
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 70f30fb8f99..66c681d1c84 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -129,9 +129,9 @@ void Credits::execute() {
 	room->load_tgp(5, &room_blk, 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(out)->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
 		int color = 63 - (6 * i);
@@ -173,17 +173,17 @@ void Credits::execute() {
 
 			if (CREDITS_TYPE[i]) {
 				fontCol = 32;
-				_G(out)->set_fontadr(font6x8);
-				_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+				_G(out)->set_fontadr(_G(font6x8));
+				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			} else {
 				fontCol = 1;
-				_G(out)->set_fontadr(font8x8);
-				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(_G(font8x8));
+				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 			}
 			stillScrolling = true;
 
 			int fgCol = fontCol + (160 - destY) / 10;
-			_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
+			_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, _G(scr_width), CREDITS_TEXT[i]);
 		}
 
 		if (!stillScrolling)
@@ -193,8 +193,8 @@ void Credits::execute() {
 		_G(out)->back2screen(workpage);
 	}
 
-	_G(out)->set_fontadr(font8x8);
-	_G(out)->set_vorschub(fvorx8x8, fvorx8x8);
+	_G(out)->set_fontadr(_G(font8x8));
+	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvorx8x8));
 	room->open_handle("back/episode1.tgp", "rb", 0);
 
 	room->set_ak_pal(&room_blk);
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 23e725d9981..981f152689f 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -73,12 +73,12 @@ int16 Files::execute(bool isInGame) {
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(workptr);
 	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	_G(out)->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
 	fnames = _G(iog)->io_init(&ioptr);
 	fnames += 1;
  
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(workptr);
 	show_cur();
 
@@ -272,7 +272,7 @@ enter:
 					}
 				} else if (mode[SAVE]) {
 					_G(out)->back2screen(workpage);
-					_G(out)->setze_zeiger(screen0);
+					_G(out)->setze_zeiger(_G(screen0));
 					_G(in)->alter_kb_handler();
 					tmp = fnames + ((text_off + active_slot) * 40);
 					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
@@ -303,7 +303,7 @@ enter:
 	room->open_handle(EPISODE1, "rb", 0);
 	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
 
-	fx_blend = BLEND1;
+	_G(fx_blend) = BLEND1;
 	room->set_ak_pal(&room_blk);
 
 	return ret;
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 1d437192e90..06cbb48b5bd 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -101,12 +101,12 @@ void Inventory::plot_menu() {
 		else
 			y = 0;
 		_G(out)->sprite_set(curtaf->image[_G(ani_count)[i]],
-			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
+			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
 	for (i = 0; i < 2; i++) {
 		_G(out)->sprite_set(menutaf->image[PFEIL_UP + i],
-			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, scr_width);
+			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
 	y = WIN_INF_Y + 6 + 30;
@@ -120,7 +120,7 @@ void Inventory::plot_menu() {
 				y1 /= 2;
 				_G(out)->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 					x1 + WIN_INF_X + 14 + i * 54,
-					y1 + y + 32 * j, scr_width);
+					y1 + y + 32 * j, _G(scr_width));
 			}
 		}
 	}
@@ -382,9 +382,9 @@ void Inventory::menu() {
 				_G(cur)->plot_cur();
 			_G(out)->setze_zeiger(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
-				fx->blende1(workptr, screen0, 0, 200, 0, 300);
+				fx->blende1(workptr, _G(screen0), 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
-				fx->blende1(workptr, screen0, 0, 200, 1, 300);
+				fx->blende1(workptr, _G(screen0), 0, 200, 1, 300);
 			menu_flag1 = false;
 			_G(out)->set_clip(0, 0, 320, 200);
 			_G(out)->back2screen(workpage);
@@ -434,7 +434,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		txt_name_adr = atds->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
 		txt_adr = atds->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
 		xoff = strlen(txt_name_adr);
-		xoff *= fvorx8x8;
+		xoff *= _G(fvorx8x8);
 		xoff = (254 - xoff) / 2;
 		txt_zeilen = 2;
 		yoff = 10;
@@ -531,15 +531,15 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
-		_G(out)->set_fontadr(font8x8);
-		_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+		_G(out)->set_fontadr(_G(font8x8));
+		_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 
 		if (mode == INV_ATS_MODE)
 			_G(out)->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
-				scr_width, txt_name_adr);
+				_G(scr_width), txt_name_adr);
 
-		_G(out)->set_fontadr(font6x8);
-		_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+		_G(out)->set_fontadr(_G(font6x8));
+		_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 
 		if (txt_anz > txt_zeilen) {
 			if (txt_start > 0) {
@@ -548,7 +548,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 						WIN_INF_Y + 136 + 14, 41);
 				c[0] = 24;
 				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
-					scr_width, c);
+					_G(scr_width), c);
 			}
 
 			if (txt_start < txt_anz - txt_zeilen) {
@@ -556,14 +556,14 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 					_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
 						WIN_INF_Y + 156 + 14, 41);
 				c[0] = 25;
-				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
+				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, _G(scr_width), c);
 			}
 		}
 
 		k = 0;
 		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-				scr_width, "%s", txt->str_pos(txt_adr, i));
+				_G(scr_width), "%s", txt->str_pos(txt_adr, i));
 			++k;
 		}
 
@@ -698,7 +698,7 @@ void Inventory::showDiary() {
 	_G(out)->back2screen(workpage);
 	room->set_ak_pal(&room_blk);
 	_G(out)->setze_zeiger(nullptr);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 
 	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 		g_events->update();
@@ -716,7 +716,7 @@ void Inventory::showDiary() {
 	Dialogs::Inventory::plot_menu();
 	_G(out)->setze_zeiger(nullptr);
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 4f8a94739eb..4fc14c1e7c1 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -73,7 +73,7 @@ void MainMenu::execute() {
 		load_room_music(98);
 		fx->border(workpage, 100, 0, 0);
 
-		_G(out)->set_palette(pal);
+		_G(out)->set_palette(_G(pal));
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		show_cur();
 
@@ -220,7 +220,7 @@ void MainMenu::startGame() {
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
-	fx_blend = BLEND3;
+	_G(fx_blend) = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	menu_item = CUR_WALK;
 	cursor_wahl(CUR_WALK);
@@ -231,9 +231,9 @@ void MainMenu::startGame() {
 bool MainMenu::loadGame() {
 	flags.SaveMenu = true;
 	savePersonAni();
-	_G(out)->setze_zeiger(screen0);
-	_G(out)->set_fontadr(font6x8);
-	_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_fontadr(_G(font6x8));
+	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 	cursor_wahl(CUR_SAVE);
 	_G(cur)->move(152, 92);
 	minfo.x = 152;
@@ -248,7 +248,7 @@ bool MainMenu::loadGame() {
 	flags.SaveMenu = false;
 
 	if (result == 0) {
-		fx_blend = BLEND1;
+		_G(fx_blend) = BLEND1;
 		return true;
 	} else {
 		return false;
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index e2d506f7d75..56c0938334d 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -60,10 +60,10 @@ void Options::execute(taf_info *ti) {
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(workptr);
 	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	_G(out)->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(_G(screen0));
 
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(workptr);
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
@@ -257,9 +257,9 @@ void Options::execute(taf_info *ti) {
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(workptr);
 	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-	_G(out)->setze_zeiger(screen0);
+	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, screen0, pal, 150, 0, 0);
+	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(workptr);
 }
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 339089edb4a..878ab87d5a5 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -77,20 +77,8 @@ byte *workpage;
 byte *workptr;
 byte *cur_back;
 byte **ged_mem;
-byte *pal;
 byte *spblende;
 
-byte *screen0;
-int16 scr_width;
-BlendMode fx_blend;
-
-byte *font6x8;
-byte *font8x8;
-int16 fvorx6x8;
-int16 fvorx8x8;
-int16 fvory6x8;
-short fvory8x8;
-
 char **ads_item_ptr;
 
 int16 ads_dia_nr;
@@ -193,25 +181,15 @@ int16 talk_start_ani = -1;
 int16 talk_hide_static = -1;
 
 SplitStringInit ssi[AAD_MAX_PERSON] = {
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-
 	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
 };
 
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index b10d4cb6d75..6b2f8a42346 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -124,6 +124,17 @@ public:
 	// global.cpp
 	const uint8 *_chewy_ph_anz;
 	const uint8 *_chewy_ph;
+	byte *_pal = nullptr;
+	byte *_screen0 = nullptr;
+	int16 _scr_width = 0;
+	BlendMode _fx_blend = BLEND_NONE;
+
+	byte *_font6x8 = nullptr;
+	byte *_font8x8 = nullptr;
+	int16 _fvorx6x8 = 0;
+	int16 _fvorx8x8 = 0;
+	int16 _fvory6x8 = 0;
+	short _fvory8x8 = 0;
 
 	// main.cpp
 	int16 _menu_flag = 0;
@@ -195,20 +206,8 @@ extern byte *workpage;
 extern byte *workptr;
 extern byte *cur_back;
 extern byte **ged_mem;
-extern byte *pal;
 extern byte *spblende;
 
-extern byte *screen0;
-extern int16 scr_width;
-extern BlendMode fx_blend;
-
-extern byte *font6x8;
-extern byte *font8x8;
-extern int16 fvorx6x8;
-extern int16 fvorx8x8;
-extern int16 fvory6x8;
-extern int16 fvory8x8;
-
 extern char *invent_txt;
 extern char *invent_name;
 extern char **ads_item_ptr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 63cd054e8d7..5eca5da1f2d 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -52,8 +52,8 @@ void standard_init() {
 	_G(out)->palette_save();
 	_G(out)->set_clip(0, 0, 320, 200);
 	_G(out)->set_writemode(0);
-	scr_width = 0;
-	screen0 = (byte *)g_screen->getPixels();
+	_G(scr_width) = 0;
+	_G(screen0) = (byte *)g_screen->getPixels();
 	_G(in)->neuer_kb_handler(&kbinfo);
 
 	_G(in)->rectangle(0, 0, 320, 210);
@@ -83,10 +83,10 @@ void standard_init() {
 	strcpy(ioptr.save_path, SAVEDIR);
 	ioptr.delay = 8;
 	alloc_buffers();
-	pal[765] = 63;
-	pal[766] = 63;
-	pal[767] = 63;
-	_G(out)->einblenden(pal, 0);
+	_G(pal)[765] = 63;
+	_G(pal)[766] = 63;
+	_G(pal)[767] = 63;
+	_G(out)->einblenden(_G(pal), 0);
 	room->set_timer_start(1);
 	font_load();
 
@@ -98,10 +98,10 @@ void standard_init() {
 	ged_mem = room->get_ged_mem();
 
 	_G(zoom_horizont) = 140;
-	pal[765] = 63;
-	pal[766] = 63;
-	pal[767] = 63;
-	_G(out)->einblenden(pal, 0);
+	_G(pal)[765] = 63;
+	_G(pal)[766] = 63;
+	_G(pal)[767] = 63;
+	_G(out)->einblenden(_G(pal), 0);
 	_G(out)->cls();
 	uhr->set_new_timer(0, 5, SEC_10_MODE);
 
@@ -179,7 +179,7 @@ void var_init() {
 
 void init_room() {
 	room_blk.AkAblage = 0;
-	room_blk.LowPalMem = pal;
+	room_blk.LowPalMem = _G(pal);
 	room_blk.InvFile = INVENTAR;
 	room_blk.DetFile = DETAILTEST;
 	room_blk.InvSprAdr = &inv_spr[0];
@@ -283,25 +283,25 @@ void new_game() {
 static void font_load() {
 
 	// Load the 8x8 font
-	_G(mem)->tff_adr(FONT8x8, &font8x8);
-	_G(out)->set_fontadr(font8x8);
+	_G(mem)->tff_adr(FONT8x8, &_G(font8x8));
+	_G(out)->set_fontadr(_G(font8x8));
 
 	int16 vorx;
 	int16 vory;
 	int16 fntbr;
 	int16 fnth;
 	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
-	fvorx8x8 = vorx;
-	fvory8x8 = vory;
+	_G(fvorx8x8) = vorx;
+	_G(fvory8x8) = vory;
 
 	// Load the 6x8 font
-	_G(mem)->tff_adr(FONT6x8, &font6x8);
-	_G(out)->set_fontadr(font6x8);
+	_G(mem)->tff_adr(FONT6x8, &_G(font6x8));
+	_G(out)->set_fontadr(_G(font6x8));
 	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
-	fvorx6x8 = vorx - 2;
-	fvory6x8 = vory;
-	_G(out)->set_vorschub(fvorx6x8, vory);
-	atds->set_font(font8x8, fvorx8x8, 10);
+	_G(fvorx6x8) = vorx - 2;
+	_G(fvory6x8) = vory;
+	_G(out)->set_vorschub(_G(fvorx6x8), vory);
+	atds->set_font(_G(font8x8), _G(fvorx8x8), 10);
 }
 
 void init_load() {
@@ -315,7 +315,7 @@ void init_load() {
 	menutaf = _G(mem)->taf_adr(MENUTAF);
 	spblende = _G(mem)->void_adr("cut/blende.rnd");
 	room->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
-	_G(out)->set_palette(pal);
+	_G(out)->set_palette(_G(pal));
 }
 
 void tidy() {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 4b1732a39da..f9c8d15d357 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -69,7 +69,7 @@ void game_main() {
 
 void alloc_buffers() {
 	workpage = (byte *)MALLOC(64004l);
-	pal = (byte *)MALLOC(768l);
+	_G(pal) = (byte *)MALLOC(768l);
 	cur_back = (byte *)MALLOC(16 * 16 + 4);
 	Ci.VirtScreen = workpage;
 	Ci.TempArea = (byte *)MALLOC(64004l);
@@ -83,8 +83,8 @@ void free_buffers() {
 	for (int16 i = 0; i < MAX_PERSON; i++)
 		free((char *)PersonTaf[i]);
 	free((char *)spz_tinfo);
-	free(font6x8);
-	free(font8x8);
+	free(_G(font6x8));
+	free(_G(font8x8));
 	free(spblende);
 	free((char *)menutaf);
 	free((char *)chewy);
@@ -93,7 +93,7 @@ void free_buffers() {
 	free(Ci.MusicSlot);
 	free(Ci.TempArea);
 	free(cur_back);
-	free(pal);
+	free(_G(pal));
 	free(workpage);
 }
 
@@ -258,7 +258,7 @@ void test_menu() {
 	_G(maus_links_click) = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(txt_aus_click) = false;
-	fx_blend = BLEND3;
+	_G(fx_blend) = BLEND3;
 	_G(auto_obj) = 0;
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
@@ -348,13 +348,13 @@ int16 main_loop(int16 mode) {
 		case Common::KEYCODE_F6:
 			flags.SaveMenu = true;
 
-			_G(out)->setze_zeiger(screen0);
-			_G(out)->set_fontadr(font6x8);
-			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->setze_zeiger(_G(screen0));
+			_G(out)->set_fontadr(_G(font6x8));
+			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			cursor_wahl(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
 				ende = 1;
-				fx_blend = BLEND4;
+				_G(fx_blend) = BLEND4;
 			}
 			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
 				cursor_wahl(CUR_AK_INVENT);
@@ -415,15 +415,15 @@ int16 main_loop(int16 mode) {
 				_G(cur)->move(152, 92);
 				minfo.x = 152;
 				minfo.y = 92;
-				_G(out)->set_fontadr(font6x8);
-				_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+				_G(out)->set_fontadr(_G(font6x8));
+				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 
-				_G(out)->setze_zeiger(screen0);
+				_G(out)->setze_zeiger(_G(screen0));
 				cursor_wahl(CUR_SAVE);
 				ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
 					ende = 1;
-					fx_blend = BLEND4;
+					_G(fx_blend) = BLEND4;
 				}
 
 				_G(out)->setze_zeiger(workptr);
@@ -567,7 +567,7 @@ void set_up_screen(SetupScreenMode mode) {
 			_G(out)->sprite_set(inv_spr[_G(spieler).AkInvent],
 			                 invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
 			                 invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
-			                 , scr_width);
+			                 , _G(scr_width));
 		}
 
 		if (flags.AdsDialog)
@@ -607,7 +607,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 		calc_auto_go();
 
-		if (fx_blend) {
+		if (_G(fx_blend)) {
 			int16 idx = ged->ged_idx(
 				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
@@ -646,7 +646,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 			if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
 				_G(out)->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
-				                scr_width);
+				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
 				if (_G(pfeil_ani) < 4)
@@ -666,24 +666,24 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
 		_G(out)->setze_zeiger(nullptr);
-		switch (fx_blend) {
+		switch (_G(fx_blend)) {
 		case BLEND1:
-			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		case BLEND2:
-			fx->blende1(workptr, screen0, pal, 150, 1, 0);
+			fx->blende1(workptr, _G(screen0), _G(pal), 150, 1, 0);
 			break;
 
 		case BLEND3:
-			fx->rnd_blende(spblende, workptr, screen0, pal, 0, 10);
+			fx->rnd_blende(spblende, workptr, _G(screen0), _G(pal), 0, 10);
 			break;
 
 		case BLEND4:
 			_G(out)->setze_zeiger(workptr);
 			_G(out)->cls();
 			_G(out)->setze_zeiger(nullptr);
-			fx->blende1(workptr, screen0, pal, 150, 0, 0);
+			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		default:
@@ -691,7 +691,7 @@ void set_up_screen(SetupScreenMode mode) {
 			break;
 		}
 
-		fx_blend = BLEND_NONE;
+		_G(fx_blend) = BLEND_NONE;
 	}
 
 	if (g_engine->_showWalkAreas)
@@ -732,13 +732,13 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 			}
 			if (str_adr) {
-				_G(out)->set_fontadr(font8x8);
-				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(_G(font8x8));
+				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_adr, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos(str_adr, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos(str_adr, i));
 			}
 		}
 	}
@@ -1196,25 +1196,25 @@ void check_shad(int16 g_idx, int16 mode) {
 	case 1:
 		if (mode)
 			_G(out)->set_teilpalette(PAL_1, 1, 11);
-		palcopy(pal, PAL_1, 0, 0, 12);
+		palcopy(_G(pal), PAL_1, 0, 0, 12);
 		break;
 
 	case 2:
 		if (mode)
 			_G(out)->set_teilpalette(PAL_2, 1, 11);
-		palcopy(pal, PAL_2, 0, 0, 12);
+		palcopy(_G(pal), PAL_2, 0, 0, 12);
 		break;
 
 	case 3:
 		if (mode)
 			_G(out)->set_teilpalette(PAL_3, 1, 11);
-		palcopy(pal, PAL_3, 0, 0, 12);
+		palcopy(_G(pal), PAL_3, 0, 0, 12);
 		break;
 
 	case 4:
 		if (mode)
 			_G(out)->set_teilpalette(PAL_0, 1, 11);
-		palcopy(pal, PAL_0, 0, 0, 12);
+		palcopy(_G(pal), PAL_0, 0, 0, 12);
 		break;
 
 	default:
@@ -1494,11 +1494,11 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					char *str_ = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
 						ret = txt_nr;
-						_G(out)->set_fontadr(font8x8);
-						_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+						_G(out)->set_fontadr(_G(font8x8));
+						_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 						calc_txt_xy(&x, &y, str_, anz);
 						for (i = 0; i < anz; i++)
-							print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
 					}
 				}
 			} else {
@@ -1568,11 +1568,11 @@ void calc_mouse_person(int16 x, int16 y) {
 		p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
 			if (!_G(spieler).PersonHide[p_nr]) {
-				_G(out)->set_fontadr(font8x8);
-				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(_G(font8x8));
+				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
-				print_shad(x, y, 255, 300, 0, scr_width, str_);
+				print_shad(x, y, 255, 300, 0, _G(scr_width), str_);
 				if (_G(maus_links_click) == 1) {
 					def_nr = -1;
 					txt_nr = -1;
@@ -1842,7 +1842,7 @@ void calc_ausgang(int16 x, int16 y) {
 				check_shad(u_idx, 0);
 				set_person_spr(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
-				fx_blend = BLEND1;
+				_G(fx_blend) = BLEND1;
 				_G(auto_obj) = 0;
 				spieler_vector[P_CHEWY].Xzoom = 0;
 				spieler_vector[P_CHEWY].Yzoom = 0;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index b4bd347f8b6..899b643d372 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -34,7 +34,7 @@ byte *get_dispoff();
 
 void setScummVMPalette(const byte *palette, uint start, uint count);
 void setpalette(const byte *palette);
-void save_palette(byte *pal);
+void save_palette(byte *palette);
 void restore_palette();
 void rastercol(int16 color, int16 r, int16 g, int16 b);
 void set_palpart(const byte *palette, int16 startcol, int16 anz);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 1b5c676a241..bcaf1719363 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -166,13 +166,13 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 
 	for (i = 0; i < 4; i++)
 		_G(out)->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
-		                 xy[i][0], xy[i][1], scr_width);
+		                 xy[i][0], xy[i][1], _G(scr_width));
 
 	s_nr = BAU_MENU_SEITE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yanz - 2; i++) {
-			_G(out)->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, scr_width);
+			_G(out)->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
 		}
 		++s_nr;
 	}
@@ -183,7 +183,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xanz - 2; i++) {
 				_G(out)->sprite_set(menutaf->image[s_nr],
-				                 xy[2][0] + 16 + i * 16, xy[j * 2][1], scr_width);
+				                 xy[2][0] + 16 + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
 		s_nr -= 3;
@@ -209,18 +209,18 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
 				_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN],
-				                 x + i * 16, xy[0][1], scr_width);
+				                 x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
 		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
-		                 xy[0][0] + 16 + leer * 16, xy[0][1], scr_width);
+		                 xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < mitte; i++)
 			_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
-			                 x + i * 16, xy[0][1], scr_width);
+			                 x + i * 16, xy[0][1], _G(scr_width));
 		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
-		                 x + i * 16, xy[0][1], scr_width);
+		                 x + i * 16, xy[0][1], _G(scr_width));
 	}
 
 	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
@@ -239,7 +239,7 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 		if (x_pix < tmp)
 			x_pix = tmp;
 	}
-	x_pix *= fvorx6x8;
+	x_pix *= _G(fvorx6x8);
 	x_pix += 12;
 	tmp = x_pix;
 	if (x_pix % 16)
@@ -281,8 +281,8 @@ void ads_menu() {
 			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
-			_G(out)->set_fontadr(font6x8);
-			_G(out)->set_vorschub(fvorx6x8, fvory6x8);
+			_G(out)->set_fontadr(_G(font6x8));
+			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			if (ads_item_anz > 4)
 				cur_y_start = 190;
 			else
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8a19df835dd..118515e85b3 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -776,14 +776,14 @@ void print_rows(int16 id) {
 	int16 txt_anz, len;
 	char *txtStr, *s;
 
-	_G(out)->set_fontadr(font8x8);
-	_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+	_G(out)->set_fontadr(_G(font8x8));
+	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 	txtStr = atds->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
 	_G(out)->setze_zeiger(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
 		s = txt->str_pos(txtStr, i);
-		len = (strlen(s) * fvorx8x8) / 2;
+		len = (strlen(s) * _G(fvorx8x8)) / 2;
 
 		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
 	}
@@ -1457,7 +1457,7 @@ void flic_cut(int16 nr, int16 mode) {
 	}
 
 	if (!flags.NoPalAfterFlc)
-		_G(out)->set_palette(pal);
+		_G(out)->set_palette(_G(pal));
 
 	atds->stop_aad();
 	atds->stop_ats();
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 13f43e6cb3a..a4d1e5743e3 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -568,7 +568,7 @@ void load_chewy_taf(int16 taf_nr) {
 }
 
 void switch_room(int16 nr) {
-	fx_blend = BLEND1;
+	_G(fx_blend) = BLEND1;
 	exit_room(-1);
 	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
 	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 73c432709a1..f7b93d8079e 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -311,13 +311,13 @@ void Room0::calcEyeClick(int16 ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
 			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
-				_G(out)->set_fontadr(font8x8);
-				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(_G(font8x8));
+				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
@@ -564,13 +564,13 @@ void Room0::calcPillowClick(int16 ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
 			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
-				_G(out)->set_fontadr(font8x8);
-				_G(out)->set_vorschub(fvorx8x8, fvory8x8);
+				_G(out)->set_fontadr(_G(font8x8));
+				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 				x = minfo.x;
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
@@ -776,7 +776,7 @@ void Room0::feederAni() {
 			spieler_vector[P_CHEWY].DelayCount = 0;
 
 			check_shad(4, 0);
-			fx_blend = BLEND1;
+			_G(fx_blend) = BLEND1;
 			set_up_screen(DO_SETUP);
 		} else {
 			action = true;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 861558fbe95..62067113437 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -129,7 +129,7 @@ void Room3::terminal() {
 			clear_prog_ani();
 			_G(auto_obj) = 0;
 			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			fx_blend = BLEND1;
+			_G(fx_blend) = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index ed36ab6c095..8d3e4c97f58 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -125,7 +125,7 @@ int16 Room4::sonde_comp() {
 	room->load_room(&room_blk, 3, &_G(spieler));
 	set_person_pos(110, 139, P_CHEWY, P_LEFT);
 
-	fx_blend = BLEND1;
+	_G(fx_blend) = BLEND1;
 	atds->stop_aad();
 
 	return cur_x;
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index dcd11315437..66841a66476 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -33,9 +33,9 @@ void Room10::entry() {
 		_G(out)->setze_zeiger(workptr);
 		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->setze_zeiger(nullptr);
-		fx->blende1(workptr, screen0, pal, 150, 0, 0);
+		fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
-		fx_blend = BLEND_NONE;
+		_G(fx_blend) = BLEND_NONE;
 		flic_cut(FCUT_004, CFO_MODE);
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 59411360146..18aadc68301 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -74,7 +74,7 @@ void Room25::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		flic_cut(FCUT_029, CFO_MODE);
 		g_engine->_sound->playSound(0, 0);
-		fx_blend = BLEND_NONE;
+		_G(fx_blend) = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
@@ -158,12 +158,12 @@ void Room25::xit_gleiter() {
 		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 		auto_mov_obj[SURIMY_OBJ].Mode = true;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
-		fx_blend = BLEND1;
+		_G(fx_blend) = BLEND1;
 		set_up_screen(DO_SETUP);
 
 		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(65, -1);
-		fx_blend = BLEND_NONE;
+		_G(fx_blend) = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
 		_G(auto_obj) = 0;
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 3ae55d9c4e9..edfdcc51785 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -83,9 +83,9 @@ void Room28::entry(int16 eib_nr) {
 
 					if (!_G(spieler).R40TeilKarte) {
 						_G(out)->ausblenden(0);
-						_G(out)->set_teilpalette(pal, 255, 1);
+						_G(out)->set_teilpalette(_G(pal), 255, 1);
 						start_aad_wait(607, -1);
-						fx_blend = BLEND3;
+						_G(fx_blend) = BLEND3;
 					}
 
 					flags.NoScroll = false;
@@ -116,7 +116,7 @@ void Room28::entry(int16 eib_nr) {
 
 					set_person_pos(480, 118, P_HOWARD, P_LEFT);
 					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
-					fx_blend = BLEND_NONE;
+					_G(fx_blend) = BLEND_NONE;
 					flags.ExitMov = false;
 					spieler_mi[P_HOWARD].Mode = true;
 					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index de760faa03a..23433028b75 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -224,14 +224,14 @@ int16 Room39::use_tv() {
 			_G(spieler).R39ClintNews = 0;
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
-			_G(out)->set_palette(pal);
+			_G(out)->set_palette(_G(pal));
 			flags.NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], CFO_MODE);
 
 			_G(out)->cls();
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
-			_G(out)->set_palette(pal);
+			_G(out)->set_palette(_G(pal));
 			set_tv();
 			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(80, -1);
@@ -272,7 +272,7 @@ int16 Room39::use_tv() {
 		_G(out)->cls();
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		_G(out)->set_palette(pal);
+		_G(out)->set_palette(_G(pal));
 		flags.NoPalAfterFlc = false;
 	}
 
@@ -309,7 +309,7 @@ void Room39::look_tv(bool cls_mode) {
 			if (cls_mode) {
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
-				_G(out)->set_palette(pal);
+				_G(out)->set_palette(_G(pal));
 				flags.NoPalAfterFlc = true;
 			}
 
@@ -328,7 +328,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(out)->cls();
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
-				_G(out)->set_palette(pal);
+				_G(out)->set_palette(_G(pal));
 				flags.NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TransMensch && dia_nr == 85)
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 3f17f142605..6561be65dc3 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -118,7 +118,7 @@ void Room40::xit(int16 eib_nr) {
 				_G(out)->ausblenden(0);
 				hide_person();
 				set_up_screen(DO_SETUP);
-				_G(out)->einblenden(pal, 0);
+				_G(out)->einblenden(_G(pal), 0);
 				uhr->enable_timer();
 
 				_G(maus_links_click) = false;
@@ -475,7 +475,7 @@ int16 Room40::use_haendler() {
 				det->set_static_ani(3, -1);
 				start_aad_wait(211, -1);
 				_G(out)->ausblenden(0);
-				_G(out)->set_teilpalette(pal, 255, 1);
+				_G(out)->set_teilpalette(_G(pal), 255, 1);
 				start_aad_wait(212, -1);
 				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
@@ -554,7 +554,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 		start_aad_wait(aad_nr, -1);
 		flags.NoPalAfterFlc = true;
 		flic_cut(FCUT_062, CFO_MODE);
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		start_aad_wait(375, -1);
 	} else {
 		start_aad_wait(aad_nr, -1);
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index bbac8543e12..1e545cbafc6 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -35,7 +35,7 @@ void Room44::look_news() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	hide_person();
-	fx_blend = BLEND1;
+	_G(fx_blend) = BLEND1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
 	room->load_room(&room_blk, 44, &_G(spieler));
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 90487c21d2e..b8b07f2254f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -258,7 +258,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(out)->ausblenden(1);
 					_G(out)->setze_zeiger(nullptr);
 					_G(out)->cls();
-					_G(out)->einblenden(pal, 0);
+					_G(out)->einblenden(_G(pal), 0);
 					flags.NoPalAfterFlc = true;
 					flc->set_flic_user_function(cut_serv);
 					det->show_static_spr(16);
@@ -272,7 +272,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					obj->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
 					det->hide_static_spr(1);
 
-					fx_blend = BLEND3;
+					_G(fx_blend) = BLEND3;
 					set_up_screen(DO_SETUP);
 					start_aad_wait(291, -1);
 				}
@@ -289,7 +289,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			flags.NoPalAfterFlc = true;
 			flic_cut(114, 0);
 			set_person_pos(115, 144, P_CHEWY, P_LEFT);
-			fx_blend = BLEND3;
+			_G(fx_blend) = BLEND3;
 			set_up_screen(NO_SETUP);
 			start_aad_wait(564, -1);
 			break;
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 715d4680b01..095377c30f1 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -313,7 +313,7 @@ int16 Room56::use_kneipe() {
 				_G(spieler).scrollx = 0;
 				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
 				set_person_pos(50, 81, P_CHEWY, P_LEFT);
-				fx_blend = BLEND3;
+				_G(fx_blend) = BLEND3;
 				start_aad_wait(308, -1);
 
 				SetUpScreenFunc = setup_func;
@@ -331,7 +331,7 @@ int16 Room56::use_kneipe() {
 			_G(spieler).flags33_80 = true;
 			auto_move(4, P_CHEWY);
 			flic_cut(111, CFO_MODE);
-			fx_blend = BLEND3;
+			_G(fx_blend) = BLEND3;
 			start_aad_wait(522, -1);
 			start_spz_wait(66, 1, false, P_CHEWY);
 			start_spz(67, 255, false, P_CHEWY);
@@ -359,7 +359,7 @@ int16 Room56::use_kneipe() {
 		register_cutscene(31);
 
 		set_up_screen(NO_SETUP);
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		show_cur();
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->playSound(9);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 270f05dd24e..31873e5b6f0 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -147,7 +147,7 @@ void Room63::bork_platt() {
 	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(FCUT_079, CFO_MODE);
-	fx_blend = BLEND3;
+	_G(fx_blend) = BLEND3;
 	show_cur();
 	flags.MainInput = true;
 	_G(spieler).R62Flucht = true;
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 614f791f3ba..2b05d6c4fd5 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -64,7 +64,7 @@ int16 Room64::cut_sev(int16 frame) {
 	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
 	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
-	_G(out)->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
+	_G(out)->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, _G(scr_width));
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index b7235efaee2..8833d7bcf65 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -192,10 +192,10 @@ int Room76::proc7() {
 		invent_2_slot(105);
 		start_aad_wait(444, -1);
 		_G(out)->ausblenden(0);
-		_G(out)->set_teilpalette(pal, 255, 1);
+		_G(out)->set_teilpalette(_G(pal), 255, 1);
 		start_aad_wait(443, -1);
 		_G(spieler).scrollx = 0;
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 49500b1a2a4..c6747d82520 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -197,12 +197,12 @@ int Room82::proc6() {
 	if (_G(spieler).flags30_10) {
 		start_aad_wait(450, -1);
 		_G(out)->ausblenden(0);
-		_G(out)->set_teilpalette(pal, 255, 1);
+		_G(out)->set_teilpalette(_G(pal), 255, 1);
 		atds->enableEvents(false);
 		start_aad_wait(598, -1);
 		atds->enableEvents(true);
 		det->show_static_spr(7);
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		set_up_screen(DO_SETUP);
 		Room66::proc8(2, 7, 7, 451);
 		_G(spieler).flags30_20 = true;
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 28813e6fe8c..db5d88dab71 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -91,7 +91,7 @@ void Room85::entry(int16 eib_nr) {
 		flic_cut(91, CFO_MODE);
 		det->hide_static_spr(6);
 		_G(spieler).scrollx = 25;
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		start_aad_wait(475, -1);
 		start_aad(476, -1);
 		flc->set_custom_user_function(Room87::proc5);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 958240ee68d..4b89f7e704d 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -84,7 +84,7 @@ void Room89::entry() {
 		flic_cut(117, CFO_MODE);
 		register_cutscene(35);
 
-		fx_blend = BLEND3;
+		_G(fx_blend) = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
@@ -100,7 +100,7 @@ void Room89::entry() {
 			var24 -= 2;
 			_G(out)->setze_zeiger(workptr);
 			_G(out)->cls();
-			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
+			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->back2screen(workpage);
 			g_events->delay(30);
@@ -121,7 +121,7 @@ void Room89::entry() {
 			var30 += 2;
 			_G(out)->setze_zeiger(workptr);
 			_G(out)->cls();
-			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
+			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->back2screen(workpage);
 			g_events->delay(30);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 483dcb7a741..b00ca865700 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -303,7 +303,7 @@ int Room90::shootControlUnit() {
 	det->show_static_spr(4);
 	det->show_static_spr(5);
 	set_up_screen(NO_SETUP);
-	fx_blend = BLEND3;
+	_G(fx_blend) = BLEND3;
 	spieler_mi[P_CHEWY].Mode = false;
 	flags.NoScroll = false;
 	HowardMov = 0;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 78180dfa515..8975b1ba8b8 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -57,7 +57,7 @@ void Room94::entry() {
 		_G(out)->cls();
 		flic_cut(120, CFO_MODE);
 		register_cutscene(30);
-		fx_blend = BLEND_NONE;
+		_G(fx_blend) = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
 		_G(spieler).r94Scrollx = _G(spieler).scrollx;
 		switch_room(93);
@@ -77,7 +77,7 @@ void Room94::entry() {
 			flic_cut(121, CFO_MODE);
 			register_cutscene(32);
 
-			fx_blend = BLEND_NONE;
+			_G(fx_blend) = BLEND_NONE;
 			SetUpScreenFunc = nullptr;
 			Room66::proc8(2, 3, 0, 551);
 			SetUpScreenFunc = setup_func;
@@ -137,7 +137,7 @@ int Room94::giveGhostBottle() {
 	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
 	flic_cut(62, CFO_MODE);
-	fx_blend = BLEND3;
+	_G(fx_blend) = BLEND3;
 	det->start_detail(5, 255, false);
 	start_aad_wait(541, -1);
 	det->stop_detail(5);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 4becc78a740..093ee2993f0 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -168,7 +168,7 @@ void sprite_engine() {
 					_G(out)->scale_set(chewy->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
 					                spieler_vector[P_CHEWY].Yzoom,
-					                scr_width);
+					                _G(scr_width));
 				} else {
 					spr_nr = spz_spr_nr[spieler_vector[P_CHEWY].PhNr];
 					x = spieler_mi[P_CHEWY].XyzStart[0] + spz_tinfo->korrektur[spr_nr * 2] -
@@ -183,7 +183,7 @@ void sprite_engine() {
 					_G(out)->scale_set(spz_tinfo->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
 					                spieler_vector[P_CHEWY].Yzoom,
-					                scr_width);
+					                _G(scr_width));
 				}
 			}
 			break;
@@ -213,7 +213,7 @@ void sprite_engine() {
 				_G(out)->scale_set(ts_info->image[spr_nr], x, y,
 				                spieler_vector[p_nr].Xzoom,
 				                spieler_vector[p_nr].Yzoom,
-				                scr_width);
+				                _G(scr_width));
 			}
 			break;
 		case ZOBJ_PROGANI:
@@ -234,7 +234,7 @@ void sprite_engine() {
 			                auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
 			                auto_mov_vector[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
 			                auto_mov_vector[nr].Xzoom,
-			                auto_mov_vector[nr].Yzoom, scr_width);
+			                auto_mov_vector[nr].Yzoom, _G(scr_width));
 			break;
 
 		default:


Commit: 24daa6e493715a667a127e6192d417bf62cbff2c
    https://github.com/scummvm/scummvm/commit/24daa6e493715a667a127e6192d417bf62cbff2c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:29-08:00

Commit Message:
CHEWY: Review logic of Room 01

Changed paths:
    engines/chewy/rooms/room01.cpp


diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 50d529ab44d..ff8828344ee 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -40,31 +40,24 @@ void Room1::gottenCard() {
 void Room1::gedAction(int index) {
 	#define KABELABDECKUNG 1
 
-	switch (index) {
-	case 0:
-		if (!_G(spieler).R2ElectrocutedBork) {
-			bool flag = false;
-			if (_G(spieler).AkInvent == KABEL_INV) {
-				flag = true;
-				del_inventar(_G(spieler).AkInvent);
-			} else if (obj->check_inventar(KABEL_INV)) {
-				flag = true;
-				obj->del_obj_use(KABEL_INV);
-				del_invent_slot(KABEL_INV);
-			}
-
-			if (flag) {
-				start_aad_wait(54, -1);
-				atds->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
-				_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
-				obj->calc_rsi_flip_flop(KABELABDECKUNG);
-				obj->calc_all_static_detail();
-			}
+	if (index == 0 && !_G(spieler).R2ElectrocutedBork) {
+		bool flag = false;
+		if (_G(spieler).AkInvent == KABEL_INV) {
+			flag = true;
+			del_inventar(_G(spieler).AkInvent);
+		} else if (obj->check_inventar(KABEL_INV)) {
+			flag = true;
+			obj->del_obj_use(KABEL_INV);
+			remove_inventory(KABEL_INV);
 		}
-		break;
 
-	default:
-		break;
+		if (flag) {
+			start_aad_wait(54, -1);
+			atds->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
+			obj->calc_rsi_flip_flop(KABELABDECKUNG);
+			obj->calc_all_static_detail();
+		}
 	}
 }
 


Commit: 75c029de78108ff77bff8d77bbae024ce8b41fca
    https://github.com/scummvm/scummvm/commit/75c029de78108ff77bff8d77bbae024ce8b41fca
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:30-08:00

Commit Message:
CHEWY: Revert cleanup of #ifdef blocks

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 118515e85b3..1dcd33c3db0 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -30,6 +30,8 @@
 
 namespace Chewy {
 
+//#define NEW_VIDEO_CODE 1
+
 #define STERNE_ANI 17
 #define TUER_ZU_ANI 3
 
@@ -871,9 +873,12 @@ static void flic_proc1() {
 		bool flag;
 		do {
 			_G(flic_val2) = VALS1[i];
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, _G(flic_val2));
 			ret = flc->custom_play(&Ci);
-
+#else
+			g_engine->playVideo(_G(flic_val2));
+#endif
 			flag = VALS4[i] && atds->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
@@ -920,9 +925,10 @@ void flic_cut(int16 nr, int16 mode) {
 	det->disable_room_sound();
 	_G(sndPlayer)->endSound();
 	g_events->delay(50);
-
+//#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
 	Ci.Handle = f;
+//#endif
 
 	if (Ci.Handle) {
 		switch (nr) {
@@ -967,9 +973,13 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_037:
 		case FCUT_040:
 			do {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(nr);
+#endif
 			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
@@ -978,9 +988,13 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 
 			do {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(nr);
+#endif
 			} while (atds->aad_get_status() != -1 && ret != -1);
 			break;
 
@@ -1010,10 +1024,14 @@ void flic_cut(int16 nr, int16 mode) {
 			} else {
 				if (!_G(modul)) {
 					start_aad(623, -1);
+#ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
 					flc->set_custom_user_function(Room43::setup_func);
 					flc->custom_play(&Ci);
 					flc->remove_custom_user_function();
+#else
+					g_engine->playVideo(FCUT_061);
+#endif
 				}
 				if (!_G(modul)) {
 					g_engine->playVideo(FCUT_062);
@@ -1050,18 +1068,26 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_095:
 			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
 				flc->custom_play(&Ci);
+#else
+				playVideo(nr);
+#endif
 			}
 			break;
 
 		case FCUT_112:
 			_G(sndPlayer)->setMusicMasterVol(32);
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			ret = flc->custom_play(&Ci);
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
 			flc->custom_play(&Ci);
-
+#else
+			playVideo(nr);
+			playVideo(nr);
+#endif
 			_G(sndPlayer)->setMusicMasterVol(5);
 			break;
 
@@ -1075,10 +1101,13 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_133:
 		case 1123:
 			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
-
+#else
+				playVideo(FLIC_CUT_133[i]);
+#endif
 				if (i == 0 || i == 1) {
 					_G(out)->setze_zeiger(nullptr);
 					_G(out)->cls();
@@ -1093,17 +1122,24 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1003:
 			fx->border(workpage, 100, 0, 0);
 			print_rows(590);
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 1);
 			ret = flc->custom_play(&Ci);
+#else
+			g_engine->playVideo(FCUT_001);
+#endif
 
 			if (ret != -1) {
 				for (i = 0; i < 3 && ret != -1; ++i) {
 					fx->border(workpage, 100, 0, 0);
 					print_rows(591);
-
+#ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
 					ret = flc->custom_play(&Ci);
 					SHOULD_QUIT_RETURN;
+#else
+					playVideo(i + 3);
+#endif
 				}
 			}
 			break;
@@ -1111,18 +1147,25 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1006:
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 6);
+#endif
 			}
 			break;
 
 		case 1009:
 			for (i = 0; i < 2 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 9);
+#endif
 			}
 			break;
 
@@ -1130,25 +1173,36 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
 				SHOULD_QUIT_RETURN;
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 12);
+#endif
 			}
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(out)->cls();
 				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
 				fx->border(workpage, 100, 0, 0);
 			}
+#else
+			_G(out)->cls();
+			fx->border(workpage, 100, 0, 0);
+#endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 15);
+#endif
 			}
 			break;
 
@@ -1162,9 +1216,13 @@ void flic_cut(int16 nr, int16 mode) {
 					load_room_music(256);
 				}
 
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(FLIC_CUT_1045[i]);
+#endif
 
 				if (FLIC_CUT_1045[i] == 53) {
 					_G(sndPlayer)->stopMod();
@@ -1177,28 +1235,43 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 43);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(43);
+#endif
 			}
 			break;
 
 		case 1048:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 50);
 			flc->custom_play(&Ci);
+#else
+			playVideo(50);
+#endif
 
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 48);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(48);
+#endif
 			}
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 49);
 				flc->custom_play(&Ci);
+#else
+				playVideo(49);
+#endif
 			}
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
 				ret = flc->custom_play(&Ci);
@@ -1207,19 +1280,28 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->spr_blende(workpage, 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 54);
 			}
+#else
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(nr);
+#endif
 			break;
 
 		case 1055:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 55);
+#endif
 			}
 
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 46);
+#endif
 				fx->border(workpage, 100, 0, 0);
 			}
 			break;
@@ -1228,28 +1310,46 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->stopMod();
 			CurrentSong = -1;
 			load_room_music(255);
-
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 58);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(58);
+#endif
 
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 59);
 				flc->custom_play(&Ci);
+#else
+				playVideo(59);
+#endif
 			}
 			if (ret != -1) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 60);
 				flc->custom_play(&Ci);
+#else
+				playVideo(60);
+#endif
 			}
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 61);
 				flc->custom_play(&Ci);
+#else
+				playVideo(61);
+#endif
 			}
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 62);
 				flc->custom_play(&Ci);
+#else
+				playVideo(62);
+#endif
 			}
 			break;
 
@@ -1259,32 +1359,52 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 65);
+#endif
 			}
 			break;
 
 		case 1068:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 68);
 			flc->custom_play(&Ci);
+#else
+			playVideo(68);
+#endif
 
 			if (ret != -1) {
 				fx->border(workpage, 100, 0, 0);
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 70);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(70);
+#endif
 			}
 			break;
 
 		case 1069:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 69);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(69);
+#endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				fx->spr_blende(workpage, 100, false, 0);
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
 				ret = flc->custom_play(&Ci);
+#else
+				playVideo(i + 71);
+#endif
 			}
 			break;
 
@@ -1293,45 +1413,65 @@ void flic_cut(int16 nr, int16 mode) {
 				fx->border(workpage, 100, 0, 0);
 				print_rows(605);
 				fx->spr_blende(workpage, 100, false, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + FLIC_CUT_1074[i]);
+#endif
 			}
 			break;
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(FLIC_CUT_1080[i]);
+#endif
 			}
 			break;
 
 		case 1087:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 87);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(87);
+#endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				fx->border(workpage, 100, 0, 0);
-
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(i + 102);
+#endif
 			}
 			break;
 
 		case 1088:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 88);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(88);
+#endif
 
 			if (ret != -1) {
 				fx->spr_blende(workpage, 100, false, 0);
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 86);
 				flc->custom_play(&Ci);
-
+#else
+				playVideo(86);
+#endif
 				_G(sndPlayer)->stopMod();
 			}
 			break;
@@ -1356,32 +1496,54 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1106:
 			for (i = 0; i < 3 && ret == -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
 				_G(out)->cls();
 				flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(FLIC_CUT_1106[i]);
+#endif
 			}
 			break;
 
 		case 1107:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(107);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 109);
 				fx->border(workpage, 100, 0, 0);
 			}
+#else
+			fx->border(workpage, 100, 0, 0);
+			//playVideo(109);
+#endif
 			break;
 
 		case 1108:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 108);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(108);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 115);
 				fx->spr_blende(workpage, 100, false, 0);
 				flc->custom_play(&Ci);
 			}
+#else
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(115);
+#endif
 			break;
 
 		case 1110:
@@ -1389,38 +1551,56 @@ void flic_cut(int16 nr, int16 mode) {
 			CurrentSong = -1;
 			load_room_music(257);
 			_G(sndPlayer)->setMusicMasterVol(20);
-
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 110);
 			ret = flc->custom_play(&Ci);
+#else
+			playVideo(110);
+#endif
 
+#ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(sndPlayer)->setMusicMasterVol(63);
 				fx->spr_blende(workpage, 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
 			}
-
+#else
+			ailsnd->setMusicMasterVol(63);
+			fx->spr_blende(workpage, 100, false, 0);
+			playVideo(112);
+#endif
 			_G(sndPlayer)->stopMod();
 			break;
 
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
+#ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
 				_G(out)->cls();
 				ret = flc->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
+#else
+				playVideo(FLIC_CUT_1113[i]);
+#endif
 			}
 			break;
 
 		case 1117:
+#ifndef NEW_VIDEO_CODE
 			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
 				fx->border(workpage, 100, 0, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 119);
 				flc->custom_play(&Ci);
 			}
+#else
+			fx->border(workpage, 100, 0, 0);
+			playVideo(119);
+#endif
 			break;
 
 		default:
+#ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle,
 				(nr < 1000) ? nr : nr - 1000);
 
@@ -1434,6 +1614,11 @@ void flic_cut(int16 nr, int16 mode) {
 			default:
 				break;
 			}
+
+#else
+			playVideo(nr < 1000 ? nr : nr - 1000);
+#endif
+
 			break;
 		}
 


Commit: 793e53c09aad0819321a1c845f702f2f6127985d
    https://github.com/scummvm/scummvm/commit/793e53c09aad0819321a1c845f702f2f6127985d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:30-08:00

Commit Message:
CHEWY: Moving globals to Globals

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/events.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 17a186dbc5d..6f473a0fdf6 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -108,7 +108,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		flags.LoadGame = true;
 
 		if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1) {
-			menu_item = CUR_USE;
+			_G(menu_item) = CUR_USE;
 		}
 
 		if (_G(spieler).AkInvent != -1)
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 168b8febced..20730b3ad15 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -63,8 +63,8 @@ void Cinema::execute() {
 
 	for (bool endLoop = false; !endLoop;) {
 		timer_nr = 0;
-		_G(out)->setze_zeiger(workptr);
-		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
 			// Render cutscene list
@@ -162,7 +162,7 @@ void Cinema::execute() {
 			hide_cur();
 			_G(out)->cls();
 			_G(out)->setze_zeiger(_G(screen0));
-			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			print_rows(546 + topIndex);
 
 			flc->set_custom_user_function(cut_serv);
@@ -191,9 +191,9 @@ void Cinema::execute() {
 				flag = false;
 				_G(out)->setze_zeiger(_G(screen0));
 				room->set_ak_pal(&room_blk);
-				fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+				fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			} else {
-				_G(out)->back2screen(workpage);
+				_G(out)->back2screen(_G(workpage));
 			}
 		}
 
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 66c681d1c84..baf0afe7f2a 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -131,7 +131,7 @@ void Credits::execute() {
 	_G(spieler).scrolly = 0;
 	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
 		int color = 63 - (6 * i);
@@ -151,8 +151,8 @@ void Credits::execute() {
 			break;
 
 		// Display the starfield background
-		_G(out)->setze_zeiger(workptr);
-		_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
+		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage],
 			_G(spieler).scrollx, _G(spieler).scrolly);
 
 		// Animate moving the background
@@ -190,7 +190,7 @@ void Credits::execute() {
 			break;
 
 		_G(out)->setze_zeiger(nullptr);
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 	}
 
 	_G(out)->set_fontadr(_G(font8x8));
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 981f152689f..579261dc67a 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -71,15 +71,15 @@ int16 Files::execute(bool isInGame) {
 
 	room->open_handle(GBOOK, "rb", 0);
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
 	fnames = _G(iog)->io_init(&ioptr);
 	fnames += 1;
  
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(workptr);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
 	show_cur();
 
 	if (!_G(modul)) {
@@ -103,7 +103,7 @@ int16 Files::execute(bool isInGame) {
 
 		while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 			// Draw the dialog background
-			_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+			_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 
 			// Draw the buttons at the bottom
 			for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
@@ -149,7 +149,7 @@ int16 Files::execute(bool isInGame) {
 				--mode[QUIT];
 			if (mode[QUIT] == 1) {
 				_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
-				_G(out)->back2screen(workpage);
+				_G(out)->back2screen(_G(workpage));
 				_G(in)->alter_kb_handler();
 
 				key = getch();
@@ -271,14 +271,14 @@ enter:
 						key = Common::KEYCODE_ESCAPE;
 					}
 				} else if (mode[SAVE]) {
-					_G(out)->back2screen(workpage);
+					_G(out)->back2screen(_G(workpage));
 					_G(out)->setze_zeiger(_G(screen0));
 					_G(in)->alter_kb_handler();
 					tmp = fnames + ((text_off + active_slot) * 40);
 					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
 						255, 42, 14, 0, "%36s36", tmp);
 					_G(in)->neuer_kb_handler(&kbinfo);
-					_G(out)->setze_zeiger(workptr);
+					_G(out)->setze_zeiger(_G(workptr));
 					if (key != Common::KEYCODE_ESCAPE) {
 						_G(iog)->save_entry(text_off + active_slot,
 							ioptr.save_path);
@@ -292,7 +292,7 @@ enter:
 			}
 
 			_G(cur)->plot_cur();
-			_G(out)->back2screen(workpage);
+			_G(out)->back2screen(_G(workpage));
 
 			EVENTS_UPDATE;
 		}
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 06cbb48b5bd..8481c07a53a 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -54,7 +54,7 @@ void Inventory::plot_menu() {
 	int16 *xy;
 	int16 x, y;
 	int16 x1, y1;
-	_G(out)->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(_G(workptr));
 	build_menu(WIN_INVENTAR);
 
 	for (j = 0; j < 3; j++) {
@@ -113,12 +113,12 @@ void Inventory::plot_menu() {
 	for (j = 0; j < 3; j++) {
 		for (i = 0; i < 5; i++) {
 			if (_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i] != -1) {
-				xy = (int16 *)inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
+				xy = (int16 *)_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
 				x1 = 40 - xy[0];
 				x1 /= 2;
 				y1 = 24 - xy[1];
 				y1 /= 2;
-				_G(out)->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
+				_G(out)->sprite_set(_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 					x1 + WIN_INF_X + 14 + i * 54,
 					y1 + y + 32 * j, _G(scr_width));
 			}
@@ -145,7 +145,7 @@ void Inventory::menu() {
 	ani_tmp = flags.AutoAniPlay;
 	flags.AutoAniPlay = true;
 	flags.StopAutoObj = true;
-	menu_display = 0;
+	_G(menu_display) = 0;
 	tmp = _G(spieler).MausSpeed;
 	if (tmp > 3) {
 		tmp1 = tmp - 2;
@@ -156,12 +156,12 @@ void Inventory::menu() {
 	minfo.x = 152;
 	minfo.y = 92;
 
-	invent_cur_mode = CUR_USE;
+	_G(invent_cur_mode) = CUR_USE;
 	if (_G(spieler).AkInvent != -1) {
 		cursor_wahl(CUR_AK_INVENT);
 
 	} else {
-		invent_cur_mode = CUR_USE;
+		_G(invent_cur_mode) = CUR_USE;
 		cursor_wahl(CUR_USE);
 	}
 
@@ -199,8 +199,8 @@ void Inventory::menu() {
 
 				switch (k) {
 				case 0:
-					invent_cur_mode = CUR_USE;
-					menu_item = CUR_USE;
+					_G(invent_cur_mode) = CUR_USE;
+					_G(menu_item) = CUR_USE;
 					if (_G(spieler).AkInvent == -1) {
 						cursor_wahl(CUR_USE);
 					} else {
@@ -216,8 +216,8 @@ void Inventory::menu() {
 
 						taste_flag = Common::KEYCODE_ESCAPE;
 					} else {
-						invent_cur_mode = CUR_LOOK;
-						menu_item = CUR_LOOK;
+						_G(invent_cur_mode) = CUR_LOOK;
+						_G(menu_item) = CUR_LOOK;
 						cursor_wahl(CUR_LOOK);
 					}
 					break;
@@ -235,11 +235,11 @@ void Inventory::menu() {
 					inv_rand_y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
 					k = inv_rand_x + (inv_rand_y * 5);
 					k += _G(spieler).InventY * 5;
-					if (invent_cur_mode == CUR_USE) {
+					if (_G(invent_cur_mode) == CUR_USE) {
 						if (_G(spieler).AkInvent == -1) {
 							if (_G(spieler).InventSlot[k] != -1) {
 								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
-									menu_item = CUR_USE;
+									_G(menu_item) = CUR_USE;
 									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
 									cursor_wahl(CUR_AK_INVENT);
 									del_invent_slot(_G(spieler).InventSlot[k]);
@@ -252,17 +252,17 @@ void Inventory::menu() {
 								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
 								obj->sort();
 								_G(spieler).AkInvent = -1;
-								menu_item = invent_cur_mode;
-								cursor_wahl(invent_cur_mode);
+								_G(menu_item) = _G(invent_cur_mode);
+								cursor_wahl(_G(invent_cur_mode));
 							}
 						}
-					} else if (invent_cur_mode == CUR_LOOK) {
+					} else if (_G(invent_cur_mode) == CUR_LOOK) {
 						if (_G(spieler).InventSlot[k] != -1) {
 							if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
 								_G(spieler).AkInvent = _G(spieler).InventSlot[k];
 								ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
 								_G(spieler).AkInvent = -1;
-								cursor_wahl(invent_cur_mode);
+								cursor_wahl(_G(invent_cur_mode));
 								taste_flag = Common::KEYCODE_ESCAPE;
 							}
 						}
@@ -281,8 +281,8 @@ void Inventory::menu() {
 		}
 
 		if (ret_look == 0) {
-			invent_cur_mode = CUR_USE;
-			menu_item = CUR_USE;
+			_G(invent_cur_mode) = CUR_USE;
+			_G(menu_item) = CUR_USE;
 			if (_G(spieler).AkInvent == -1)
 				cursor_wahl(CUR_USE);
 			else
@@ -321,7 +321,7 @@ void Inventory::menu() {
 						inv_rand_y = -1;
 						Dialogs::Inventory::plot_menu();
 						_G(cur)->plot_cur();
-						_G(out)->back2screen(workpage);
+						_G(out)->back2screen(_G(workpage));
 					}
 				} else {
 					if (menu_flag1 != MENU_EINBLENDEN) {
@@ -382,31 +382,31 @@ void Inventory::menu() {
 				_G(cur)->plot_cur();
 			_G(out)->setze_zeiger(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
-				fx->blende1(workptr, _G(screen0), 0, 200, 0, 300);
+				fx->blende1(_G(workptr), _G(screen0), 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
-				fx->blende1(workptr, _G(screen0), 0, 200, 1, 300);
+				fx->blende1(_G(workptr), _G(screen0), 0, 200, 1, 300);
 			menu_flag1 = false;
 			_G(out)->set_clip(0, 0, 320, 200);
-			_G(out)->back2screen(workpage);
+			_G(out)->back2screen(_G(workpage));
 		} else {
 			show_cur();
 		}
 	}
 
-	_G(cur)->move(maus_old_x, maus_old_y);
-	minfo.x = maus_old_x;
-	minfo.y = maus_old_y;
+	_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
+	minfo.x = _G(maus_old_x);
+	minfo.y = _G(maus_old_y);
 	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 	}
 
 	_G(in)->speed(tmp, tmp * 2);
 	flags.InventMenu = false;
 	flags.AutoAniPlay = ani_tmp;
 	_G(spieler).DispFlag = disp_tmp;
-	menu_display = _G(tmp_menu);
+	_G(menu_display) = _G(tmp_menu);
 	flags.StopAutoObj = false;
 }
 
@@ -568,7 +568,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		}
 
 		_G(cur)->plot_cur();
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 		SHOULD_QUIT_RETURN0;
 	}
 
@@ -576,7 +576,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
 		_G(cur)->plot_cur();
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 		SHOULD_QUIT_RETURN0;
 	}
 
@@ -593,7 +593,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 			case INVENTAR_NORMAL:
 			case INVENTAR_STATIC:
 				ok = true;
-				switch (menu_item) {
+				switch (_G(menu_item)) {
 				case CUR_LOOK:
 					m_mode = TXT_MARK_LOOK;
 					break;
@@ -626,7 +626,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 
 				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
 					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
-				if (menu_item == CUR_USE)
+				if (_G(menu_item) == CUR_USE)
 					flags.StaticUseTxt = true;
 				break;
 
@@ -642,7 +642,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 	int16 ret;
 	ret_val = false;
 
-	if (menu_item == CUR_LOOK) {
+	if (_G(menu_item) == CUR_LOOK) {
 		switch (inv_nr) {
 		case ZEITUNG_INV:
 			Rooms::Room44::look_news();
@@ -669,7 +669,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 		default:
 			break;
 		}
-	} else if (menu_item == CUR_USE) {
+	} else if (_G(menu_item) == CUR_USE) {
 		switch (inv_nr) {
 		case GBUCH_INV:
 			ret = del_invent_slot(GBUCH_INV);
@@ -693,12 +693,12 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = 0;
 
 	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-	_G(out)->back2screen(workpage);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(out)->back2screen(_G(workpage));
 	room->set_ak_pal(&room_blk);
 	_G(out)->setze_zeiger(nullptr);
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 		g_events->update();
@@ -716,7 +716,7 @@ void Inventory::showDiary() {
 	Dialogs::Inventory::plot_menu();
 	_G(out)->setze_zeiger(nullptr);
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 4fc14c1e7c1..d36cf30ca21 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -54,7 +54,7 @@ void MainMenu::execute() {
 	minfo.x = 152;
 	minfo.y = 92;
 	_G(spieler).inv_cur = false;
-	menu_display = 0;
+	_G(menu_display) = 0;
 	_G(spieler).soundLoopMode = 1;
 
 	bool done = false;
@@ -71,7 +71,7 @@ void MainMenu::execute() {
 
 		CurrentSong = -1;
 		load_room_music(98);
-		fx->border(workpage, 100, 0, 0);
+		fx->border(_G(workpage), 100, 0, 0);
 
 		_G(out)->set_palette(_G(pal));
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -92,8 +92,8 @@ void MainMenu::execute() {
 			break;
 
 		case MM_VIEW_INTRO:
-			fx->border(workpage, 100, 0, 0);
-			_G(out)->setze_zeiger(workptr);
+			fx->border(_G(workpage), 100, 0, 0);
+			_G(out)->setze_zeiger(_G(workptr));
 			flags.NoPalAfterFlc = true;
 			flic_cut(135, CFO_MODE);
 			break;
@@ -118,12 +118,12 @@ void MainMenu::execute() {
 			break;
 
 		case MM_CREDITS:
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 			flags.NoPalAfterFlc = true;
 			flc->set_custom_user_function(creditsFn);
 			flic_cut(159, CFO_MODE);
 			flc->remove_custom_user_function();
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 			Dialogs::Credits::execute();
 			break;
 
@@ -144,20 +144,20 @@ void MainMenu::screenFunc() {
 void MainMenu::animate() {
 	if (ani_timer->TimeFlag) {
 		uhr->reset_timer(0, 0);
-		_G(spieler).DelaySpeed = FrameSpeed / _G(spieler).FramesPerSecond;
+		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		spieler_vector->Delay = _G(spieler).DelaySpeed + spz_delay[0];
-		FrameSpeed = 0;
+		_G(FrameSpeed) = 0;
 		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
 
-	++FrameSpeed;
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
+	++_G(FrameSpeed);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
-	if (SetUpScreenFunc && !menu_display && !flags.InventMenu) {
+	if (SetUpScreenFunc && !_G(menu_display) && !flags.InventMenu) {
 		SetUpScreenFunc();
-		_G(out)->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(_G(workptr));
 	}
 
 	sprite_engine();
@@ -167,7 +167,7 @@ void MainMenu::animate() {
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
 	_G(out)->setze_zeiger(nullptr);
-	_G(out)->back2screen(workpage);
+	_G(out)->back2screen(_G(workpage));
 
 	g_screen->update();
 	g_events->update();
@@ -222,7 +222,7 @@ void MainMenu::startGame() {
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	_G(fx_blend) = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	enter_room(-1);
 	_G(auto_obj) = 0;
@@ -242,7 +242,7 @@ bool MainMenu::loadGame() {
 	int result = Dialogs::Files::execute(false);
 
 	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
-		menu_item == CUR_USE) ? 8 : 0);
+		_G(menu_item) == CUR_USE) ? 8 : 0);
 	_G(cur_display) = true;
 	restorePersonAni();
 	flags.SaveMenu = false;
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 56c0938334d..ec717d1df89 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -58,13 +58,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
 void Options::execute(taf_info *ti) {
 	long akt_clock = 0, stop_clock = 0;
 	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
 
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(workptr);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
 	int16 mund_ani = MUND_START;
@@ -73,18 +73,18 @@ void Options::execute(taf_info *ti) {
 	int16 tdisp_ani = TDISP_START;
 	int16 tdisp_delay = 3;
 	int16 tdisp_count = tdisp_delay;
-	FrameSpeed = 0;
+	_G(FrameSpeed) = 0;
 	int16 delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
 	while (key != Common::KEYCODE_ESCAPE) {
-		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
-		++FrameSpeed;
+		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+		++_G(FrameSpeed);
 		warning("akt_clock = clock() / CLK_TCK;");
 		if (akt_clock >= stop_clock) {
-			//TmpFrame = FrameSpeed;
-			_G(spieler).DelaySpeed = (FrameSpeed >> 1) / _G(spieler).FramesPerSecond;
+			//TmpFrame = _G(FrameSpeed);
+			_G(spieler).DelaySpeed = (_G(FrameSpeed) >> 1) / _G(spieler).FramesPerSecond;
 
-			FrameSpeed = 0;
+			_G(FrameSpeed) = 0;
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
@@ -222,7 +222,7 @@ void Options::execute(taf_info *ti) {
 		}
 
 		_G(cur)->plot_cur();
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
 
@@ -255,12 +255,12 @@ void Options::execute(taf_info *ti) {
 	}
 
 	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
 	room->set_ak_pal(&room_blk);
-	fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(workptr);
+	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(out)->setze_zeiger(_G(workptr));
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 6bfd53e26f7..1a6abbacad1 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -166,20 +166,20 @@ void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	}
 }
 
-void Effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
+void Effect::spr_blende(byte *wrkPage, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
-			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->setze_zeiger(wrkPage + 4);
 			_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
 			_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
-			_G(out)->back2screen(workpage_);
+			_G(out)->back2screen(wrkPage);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
-			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->setze_zeiger(wrkPage + 4);
 			_G(out)->box_fill(0, i, 320, i + 8, col);
 			_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
-			_G(out)->back2screen(workpage_);
+			_G(out)->back2screen(wrkPage);
 		}
 	}
 }
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 82bf83422c0..68c142fbdfe 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -59,9 +59,9 @@ void EventsManager::handleEvent(const Common::Event &event) {
 
 void EventsManager::handleMouseEvent(const Common::Event &event) {
 	_mousePos = event.mouse;
-	bool isWheelEnabled = !menu_display && !flags.InventMenu &&
+	bool isWheelEnabled = !_G(menu_display) && !flags.InventMenu &&
 		g_engine->canSaveAutosaveCurrently() &&
-		menu_item >= CUR_WALK && menu_item <= CUR_TALK;
+		_G(menu_item) >= CUR_WALK && _G(menu_item) <= CUR_TALK;
 
 	// Different event types handling
 	if (event.type != Common::EVENT_MOUSEMOVE)
@@ -79,26 +79,26 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 	case Common::EVENT_WHEELUP:
 		// Cycle backwards through cursors
 		if (isWheelEnabled) {
-			if (--menu_item < 0)
-				menu_item = CUR_TALK;
-			cursor_wahl(menu_item);
+			if (--_G(menu_item) < 0)
+				_G(menu_item) = CUR_TALK;
+			cursor_wahl(_G(menu_item));
 		}
 		return;
 
 	case Common::EVENT_WHEELDOWN:
 		// Cycle forwards through cursors
 		if (isWheelEnabled) {
-			if (++menu_item > CUR_TALK)
-				menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
+			if (++_G(menu_item) > CUR_TALK)
+				_G(menu_item) = CUR_WALK;
+			cursor_wahl(_G(menu_item));
 		}
 		return;
 
 	case Common::EVENT_MBUTTONDOWN:
 		// Toggle between walk and look cursor
 		if (isWheelEnabled) {
-			menu_item = (menu_item == CUR_WALK) ? CUR_LOOK : CUR_WALK;
-			cursor_wahl(menu_item);
+			_G(menu_item) = (_G(menu_item) == CUR_WALK) ? CUR_LOOK : CUR_WALK;
+			cursor_wahl(_G(menu_item));
 		}
 		return;
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 878ab87d5a5..d5c354fd0c9 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -66,38 +66,6 @@ Globals::~Globals() {
 	g_globals = nullptr;
 }
 
-int16 person_tmp_hide[MAX_PERSON];
-int16 person_tmp_room[MAX_PERSON];
-
-int16 FrameSpeed;
-int16 FrameSpeedTmp;
-
-byte **ablage;
-byte *workpage;
-byte *workptr;
-byte *cur_back;
-byte **ged_mem;
-byte *spblende;
-
-char **ads_item_ptr;
-
-int16 ads_dia_nr;
-int16 ads_item_anz;
-int16 ads_blk_nr;
-int16 ads_push;
-
-int16 ads_tmp_dsp;
-int8 menu_display;
-int16 menu_lauflicht;
-int16 menu_item;
-int16 menu_item_vorwahl;
-int16 maus_menu_x;
-int16 maus_old_x;
-int16 maus_old_y;
-int16 inventar_nr;
-int16 invent_cur_mode;
-byte *inv_spr[MAX_MOV_OBJ];
-
 bool life_flag;
 int16 life_x;
 int16 life_y;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 6b2f8a42346..c6e531712f5 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -135,6 +135,35 @@ public:
 	int16 _fvorx8x8 = 0;
 	int16 _fvory6x8 = 0;
 	short _fvory8x8 = 0;
+	int16 _FrameSpeed = 0;
+	int16 _FrameSpeedTmp = 0;
+
+	byte **_ablage = nullptr;
+	byte *_workpage = nullptr;
+	byte *_workptr = nullptr;
+	byte *_cur_back = nullptr;
+	byte **_ged_mem = nullptr;
+	byte *_spblende = nullptr;
+	char **_ads_item_ptr = nullptr;
+
+	int16 _ads_dia_nr = 0;
+	int16 _ads_item_anz = 0;
+	int16 _ads_blk_nr = 0;
+	int16 _ads_push = 0;
+
+	int16 _ads_tmp_dsp = 0;
+	int8 _menu_display = 0;
+	int16 _menu_lauflicht = 0;
+	int16 _menu_item = 0;
+	int16 _menu_item_vorwahl = 0;
+	int16 _maus_menu_x = 0;
+	int16 _maus_old_x = 0;
+	int16 _maus_old_y = 0;
+	int16 _inventar_nr = 0;
+	int16 _invent_cur_mode = 0;
+	byte *_inv_spr[MAX_MOV_OBJ] = { nullptr };
+	int16 _person_tmp_hide[MAX_PERSON] = { 0 };
+	int16 _person_tmp_room[MAX_PERSON] = { 0 };
 
 	// main.cpp
 	int16 _menu_flag = 0;
@@ -195,46 +224,15 @@ extern Globals *g_globals;
 
 #define _G(FIELD) g_globals->_##FIELD
 
-extern int16 person_tmp_hide[MAX_PERSON];
-extern int16 person_tmp_room[MAX_PERSON];
-
-extern int16 FrameSpeed;
-extern int16 FrameSpeedTmp;
-
-extern byte **ablage;
-extern byte *workpage;
-extern byte *workptr;
-extern byte *cur_back;
-extern byte **ged_mem;
-extern byte *spblende;
-
 extern char *invent_txt;
 extern char *invent_name;
-extern char **ads_item_ptr;
 
 extern SplitStringInit ssi[AAD_MAX_PERSON];
 extern int16 talk_start_ani;
 
 extern int16 talk_hide_static;
 
-extern int16 ads_dia_nr;
-extern int16 ads_item_anz;
-extern int16 ads_blk_nr;
-extern int16 ads_push;
-
-extern int16 ads_tmp_dsp;
-extern int8 menu_display;
-extern int16 menu_lauflicht;
-extern int16 menu_item;
-extern int16 menu_item_vorwahl;
-extern int16 maus_menu_x;
-extern int16 maus_old_x;
-extern int16 maus_old_y;
-extern int16 inventar_nr;
-
-extern int16 invent_cur_mode;
 extern int16 ak_invent;
-extern byte *inv_spr[MAX_MOV_OBJ];
 
 extern bool life_flag;
 extern int16 life_x;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 5eca5da1f2d..9d9954edd72 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -69,7 +69,7 @@ void standard_init() {
 	curtaf = _G(mem)->taf_adr(CURSOR);
 
 	curblk.sprite = curtaf->image;
-	curblk.cur_back = cur_back;
+	curblk.cur_back = _G(cur_back);
 	curblk.no_back = true;
 	curani.ani_anf = 0;
 	curani.ani_end = 0;
@@ -94,8 +94,8 @@ void standard_init() {
 	_G(in)->neuer_kb_handler(&kbinfo);
 
 	var_init();
-	ablage = room->get_ablage();
-	ged_mem = room->get_ged_mem();
+	_G(ablage) = room->get_ablage();
+	_G(ged_mem) = room->get_ged_mem();
 
 	_G(zoom_horizont) = 140;
 	_G(pal)[765] = 63;
@@ -105,7 +105,7 @@ void standard_init() {
 	_G(out)->cls();
 	uhr->set_new_timer(0, 5, SEC_10_MODE);
 
-	curblk.cur_back = cur_back;
+	curblk.cur_back = _G(cur_back);
 	sound_init();
 	init_load();
 }
@@ -117,8 +117,8 @@ void var_init() {
 
 	life_handler = false;
 	_G(auto_p_nr) = 0;
-	menu_item = CUR_WALK;
-	inventar_nr = 0;
+	_G(menu_item) = CUR_WALK;
+	_G(inventar_nr) = 0;
 	_G(ged_mov_ebene) = 1;
 	new_game();
 	_G(spieler).MainMenuY = MENU_Y;
@@ -182,7 +182,7 @@ void init_room() {
 	room_blk.LowPalMem = _G(pal);
 	room_blk.InvFile = INVENTAR;
 	room_blk.DetFile = DETAILTEST;
-	room_blk.InvSprAdr = &inv_spr[0];
+	room_blk.InvSprAdr = &_G(inv_spr)[0];
 	room_blk.Rmo = _G(spieler).room_m_obj;
 	room_blk.Rsi = _G(spieler).room_s_obj;
 	room_blk.AadLoad = true;
@@ -313,7 +313,7 @@ void init_load() {
 	set_spz_delay(3);
 
 	menutaf = _G(mem)->taf_adr(MENUTAF);
-	spblende = _G(mem)->void_adr("cut/blende.rnd");
+	_G(spblende) = _G(mem)->void_adr("cut/blende.rnd");
 	room->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
 	_G(out)->set_palette(_G(pal));
 }
@@ -323,7 +323,7 @@ void tidy() {
 	_G(in)->alter_kb_handler();
 	_G(in)->init();
 	free_buffers();
-	obj->free_inv_spr(&inv_spr[0]);
+	obj->free_inv_spr(&_G(inv_spr)[0]);
 
 	delete _G(iog);
 	delete _G(cur);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index f9c8d15d357..aba9480dda2 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -51,7 +51,7 @@ void game_main() {
 	standard_init();
 	_G(out)->cls();
 	cursor_wahl(CUR_WALK);
-	workptr = workpage + 4l;
+	_G(workptr) = _G(workpage) + 4l;
 
 	int saveSlot = ConfMan.getInt("save_slot");
 	if (saveSlot != -1) {
@@ -68,10 +68,10 @@ void game_main() {
 }
 
 void alloc_buffers() {
-	workpage = (byte *)MALLOC(64004l);
+	_G(workpage) = (byte *)MALLOC(64004l);
 	_G(pal) = (byte *)MALLOC(768l);
-	cur_back = (byte *)MALLOC(16 * 16 + 4);
-	Ci.VirtScreen = workpage;
+	_G(cur_back) = (byte *)MALLOC(16 * 16 + 4);
+	Ci.VirtScreen = _G(workpage);
 	Ci.TempArea = (byte *)MALLOC(64004l);
 	det->set_taf_ani_mem(Ci.TempArea);
 	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
@@ -85,16 +85,16 @@ void free_buffers() {
 	free((char *)spz_tinfo);
 	free(_G(font6x8));
 	free(_G(font8x8));
-	free(spblende);
+	free(_G(spblende));
 	free((char *)menutaf);
 	free((char *)chewy);
 
 	free((char *)curtaf);
 	free(Ci.MusicSlot);
 	free(Ci.TempArea);
-	free(cur_back);
+	free(_G(cur_back));
 	free(_G(pal));
-	free(workpage);
+	free(_G(workpage));
 }
 
 void cursor_wahl(int16 nr) {
@@ -157,7 +157,7 @@ void cursor_wahl(int16 nr) {
 	case CUR_AK_INVENT:
 		curani.ani_anf = _G(spieler).AkInvent;
 		curani.ani_end = _G(spieler).AkInvent;
-		curblk.sprite = &inv_spr[0];
+		curblk.sprite = &_G(inv_spr)[0];
 		_G(spieler).inv_cur = true;
 		break;
 
@@ -241,10 +241,10 @@ void show_cur() {
 
 void test_menu() {
 	int16 ende;
-	menu_lauflicht = 0;
+	_G(menu_lauflicht) = 0;
 	_G(inv_disp_ok) = false;
 	_G(spieler).inv_cur = false;
-	menu_display = 0;
+	_G(menu_display) = 0;
 	_G(cur_display) = true;
 	_G(cur)->show_cur();
 	spieler_vector[P_CHEWY].Phase = 6;
@@ -277,7 +277,7 @@ void menu_exit() {
 	det->unfreeze_ani();
 	uhr->set_all_status(TIMER_UNFREEZE);
 	uhr->reset_timer(0, 0);
-	FrameSpeed = 0;
+	_G(FrameSpeed) = 0;
 }
 
 int16 main_loop(int16 mode) {
@@ -289,54 +289,54 @@ int16 main_loop(int16 mode) {
 		switch (kbinfo.scan_code) {
 		case Common::KEYCODE_F1:
 			_G(spieler).inv_cur = false;
-			menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
-			if (menu_display == MENU_EINBLENDEN)
-				menu_display = MENU_AUSBLENDEN;
+			_G(menu_item) = CUR_WALK;
+			cursor_wahl(_G(menu_item));
+			if (_G(menu_display) == MENU_EINBLENDEN)
+				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
 
 		case Common::KEYCODE_F2:
 			_G(spieler).inv_cur = false;
-			menu_item = CUR_USE;
-			cursor_wahl(menu_item);
-			if (menu_display == MENU_EINBLENDEN)
-				menu_display = MENU_AUSBLENDEN;
+			_G(menu_item) = CUR_USE;
+			cursor_wahl(_G(menu_item));
+			if (_G(menu_display) == MENU_EINBLENDEN)
+				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
 
 		case Common::KEYCODE_F3:
 			_G(spieler).inv_cur = false;
-			menu_item = CUR_LOOK;
-			cursor_wahl(menu_item);
-			if (menu_display == MENU_EINBLENDEN)
-				menu_display = MENU_AUSBLENDEN;
+			_G(menu_item) = CUR_LOOK;
+			cursor_wahl(_G(menu_item));
+			if (_G(menu_display) == MENU_EINBLENDEN)
+				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
 
 		case Common::KEYCODE_F4:
 			_G(spieler).inv_cur = false;
-			menu_item = CUR_TALK;
-			cursor_wahl(menu_item);
-			if (menu_display == MENU_EINBLENDEN)
-				menu_display = MENU_AUSBLENDEN;
+			_G(menu_item) = CUR_TALK;
+			cursor_wahl(_G(menu_item));
+			if (_G(menu_display) == MENU_EINBLENDEN)
+				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
 
 		case Common::KEYCODE_F5:
 		case Common::KEYCODE_SPACE:
-			_G(tmp_menu_item) = menu_item;
-			maus_old_x = minfo.x;
-			maus_old_y = minfo.y;
-			menu_item = CUR_USE;
+			_G(tmp_menu_item) = _G(menu_item);
+			_G(maus_old_x) = minfo.x;
+			_G(maus_old_y) = minfo.y;
+			_G(menu_item) = CUR_USE;
 			menu_entry();
 			Dialogs::Inventory::menu();
 			menu_exit();
 			_G(menu_flag) = MENU_AUSBLENDEN;
-			menu_display = 0;
+			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
-				menu_item = _G(tmp_menu_item);
-				cursor_wahl(menu_item);
+				_G(menu_item) = _G(tmp_menu_item);
+				cursor_wahl(_G(menu_item));
 				_G(spieler).inv_cur = false;
 			} else {
-				menu_item = CUR_USE;
+				_G(menu_item) = CUR_USE;
 				cursor_wahl(CUR_AK_INVENT);
 
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
@@ -356,54 +356,54 @@ int16 main_loop(int16 mode) {
 				ende = 1;
 				_G(fx_blend) = BLEND4;
 			}
-			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
+			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
 				cursor_wahl(CUR_AK_INVENT);
 			} else
-				cursor_wahl(menu_item);
+				cursor_wahl(_G(menu_item));
 			_G(cur_display) = true;
 			flags.SaveMenu = false;
 			_G(cur)->show_cur();
-			_G(out)->setze_zeiger(workptr);
+			_G(out)->setze_zeiger(_G(workptr));
 			break;
 
 		case Common::KEYCODE_ESCAPE:
-			if (menu_display == 0) {
+			if (_G(menu_display) == 0) {
 				menu_entry();
-				_G(tmp_menu_item) = menu_item;
-				maus_old_x = minfo.x;
-				maus_old_y = minfo.y;
-				menu_display = MENU_EINBLENDEN;
-				maus_menu_x = (MAUS_MENU_MAX_X / 5) * (menu_item);
+				_G(tmp_menu_item) = _G(menu_item);
+				_G(maus_old_x) = minfo.x;
+				_G(maus_old_y) = minfo.y;
+				_G(menu_display) = MENU_EINBLENDEN;
+				_G(maus_menu_x) = (MAUS_MENU_MAX_X / 5) * (_G(menu_item));
 				_G(cur_display) = false;
-				_G(cur)->move(maus_menu_x, 100);
+				_G(cur)->move(_G(maus_menu_x), 100);
 			} else {
 				menu_exit();
-				menu_item = _G(tmp_menu_item);
-				menu_display = MENU_AUSBLENDEN;
-				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
+				_G(menu_item) = _G(tmp_menu_item);
+				_G(menu_display) = MENU_AUSBLENDEN;
+				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
-					cursor_wahl(menu_item);
+					cursor_wahl(_G(menu_item));
 			}
 			break;
 
 		case Common::KEYCODE_RETURN:
-			switch (menu_item) {
+			switch (_G(menu_item)) {
 			case CUR_INVENT:
 
-				menu_item = CUR_USE;
+				_G(menu_item) = CUR_USE;
 				menu_entry();
 				Dialogs::Inventory::menu();
 				menu_exit();
 				_G(menu_flag) = MENU_AUSBLENDEN;
-				menu_display = 0;
+				_G(menu_display) = 0;
 				_G(cur_display) = true;
 				if (_G(spieler).AkInvent == -1) {
-					menu_item = _G(tmp_menu_item);
-					cursor_wahl(menu_item);
+					_G(menu_item) = _G(tmp_menu_item);
+					cursor_wahl(_G(menu_item));
 					_G(spieler).inv_cur = false;
 				} else {
-					menu_item = CUR_USE;
+					_G(menu_item) = CUR_USE;
 					cursor_wahl(CUR_AK_INVENT);
 					get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 				}
@@ -411,7 +411,7 @@ int16 main_loop(int16 mode) {
 
 			case CUR_SAVE:
 				flags.SaveMenu = true;
-				menu_display = MENU_EINBLENDEN;
+				_G(menu_display) = MENU_EINBLENDEN;
 				_G(cur)->move(152, 92);
 				minfo.x = 152;
 				minfo.y = 92;
@@ -426,11 +426,11 @@ int16 main_loop(int16 mode) {
 					_G(fx_blend) = BLEND4;
 				}
 
-				_G(out)->setze_zeiger(workptr);
-				menu_item = _G(tmp_menu_item);
-				menu_display = MENU_AUSBLENDEN;
+				_G(out)->setze_zeiger(_G(workptr));
+				_G(menu_item) = _G(tmp_menu_item);
+				_G(menu_display) = MENU_AUSBLENDEN;
 
-				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
+				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
 					cursor_wahl(CUR_AK_INVENT);
 				} else
 					cursor_wahl(_G(tmp_menu_item));
@@ -441,16 +441,16 @@ int16 main_loop(int16 mode) {
 				break;
 
 			default:
-				if (menu_display != 0) {
+				if (_G(menu_display) != 0) {
 					menu_exit();
 					_G(menu_flag) = MENU_AUSBLENDEN;
-					menu_display = 0;
+					_G(menu_display) = 0;
 					_G(cur_display) = true;
-					_G(cur)->move(maus_old_x, maus_old_y);
-					minfo.x = maus_old_x;
-					minfo.y = maus_old_y;
+					_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
+					minfo.x = _G(maus_old_x);
+					minfo.y = _G(maus_old_y);
 					_G(spieler).inv_cur = false;
-					cursor_wahl(menu_item);
+					cursor_wahl(_G(menu_item));
 				}
 				break;
 			}
@@ -468,7 +468,7 @@ int16 main_loop(int16 mode) {
 			break;
 
 		case Common::KEYCODE_TAB:
-			if (menu_display == 0 && _G(spieler).DispFlag) {
+			if (_G(menu_display) == 0 && _G(spieler).DispFlag) {
 				if (_G(spieler).InvDisp < 3)
 					++_G(spieler).InvDisp;
 				else
@@ -478,14 +478,14 @@ int16 main_loop(int16 mode) {
 
 		}
 
-		if (menu_display == MENU_AUSBLENDEN) {
+		if (_G(menu_display) == MENU_AUSBLENDEN) {
 			menu_exit();
 			_G(menu_flag) = MENU_AUSBLENDEN;
-			menu_display = 0;
+			_G(menu_display) = 0;
 			_G(cur_display) = true;
-			_G(cur)->move(maus_old_x, maus_old_y);
-			minfo.x = maus_old_x;
-			minfo.y = maus_old_y;
+			_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
+			minfo.x = _G(maus_old_x);
+			minfo.y = _G(maus_old_y);
 		}
 	}
 
@@ -504,7 +504,7 @@ static void showWalkAreas() {
 		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
 			int idx = ged->ged_idx(xp, yp,
 				room->_gedXAnz[room_blk.AkAblage],
-				ged_mem[room_blk.AkAblage]);
+				_G(ged_mem)[room_blk.AkAblage]);
 
 			if (idx) {
 				Common::Rect r(xp, yp, xp + 8, yp + 8);
@@ -532,25 +532,25 @@ void set_up_screen(SetupScreenMode mode) {
 
 	if (ani_timer[0].TimeFlag) {
 		uhr->reset_timer(0, 0);
-		_G(spieler).DelaySpeed = FrameSpeed / _G(spieler).FramesPerSecond;
+		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + spz_delay[P_CHEWY];
-		FrameSpeed = 0;
+		_G(FrameSpeed) = 0;
 		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
-	++FrameSpeed;
-	_G(out)->setze_zeiger(workptr);
-	_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	++_G(FrameSpeed);
+	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
 
-	if (SetUpScreenFunc && menu_display == 0 && !flags.InventMenu) {
+	if (SetUpScreenFunc && _G(menu_display) == 0 && !flags.InventMenu) {
 		SetUpScreenFunc();
-		_G(out)->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(_G(workptr));
 	}
 
 	sprite_engine();
-	if (menu_display == MENU_EINBLENDEN || flags.InventMenu) {
+	if (_G(menu_display) == MENU_EINBLENDEN || flags.InventMenu) {
 		if (!flags.InventMenu)
 			plot_main_menu();
 	} else {
@@ -564,7 +564,7 @@ void set_up_screen(SetupScreenMode mode) {
 		if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
 			build_menu(invent_display[_G(spieler).InvDisp][0],
 			           invent_display[_G(spieler).InvDisp][1], 3, 3, 60, 0);
-			_G(out)->sprite_set(inv_spr[_G(spieler).AkInvent],
+			_G(out)->sprite_set(_G(inv_spr)[_G(spieler).AkInvent],
 			                 invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
 			                 invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
 			                 , _G(scr_width));
@@ -573,7 +573,7 @@ void set_up_screen(SetupScreenMode mode) {
 		if (flags.AdsDialog)
 			ads_menu();
 		if (_G(maus_links_click)) {
-			if (menu_item == CUR_WALK) {
+			if (_G(menu_item) == CUR_WALK) {
 				if (_G(cur_ausgang_flag)) {
 					calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				} else {
@@ -588,7 +588,7 @@ void set_up_screen(SetupScreenMode mode) {
 						          spieler_mi[P_CHEWY].HotY;
 						gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
 						gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
-						gpkt.Mem = ged_mem[room_blk.AkAblage];
+						gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
 						gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
 						gpkt.AkMovEbene = _G(ged_mov_ebene);
 						mov->goto_xy(&gpkt);
@@ -612,7 +612,7 @@ void set_up_screen(SetupScreenMode mode) {
 				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 				room->_gedXAnz[room_blk.AkAblage],
-				ged_mem[room_blk.AkAblage]);
+				_G(ged_mem)[room_blk.AkAblage]);
 			check_shad(idx, 0);
 		} else {
 			for (i = 0; i < MAX_PERSON; i++) {
@@ -668,26 +668,26 @@ void set_up_screen(SetupScreenMode mode) {
 		_G(out)->setze_zeiger(nullptr);
 		switch (_G(fx_blend)) {
 		case BLEND1:
-			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		case BLEND2:
-			fx->blende1(workptr, _G(screen0), _G(pal), 150, 1, 0);
+			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 1, 0);
 			break;
 
 		case BLEND3:
-			fx->rnd_blende(spblende, workptr, _G(screen0), _G(pal), 0, 10);
+			fx->rnd_blende(_G(spblende), _G(workptr), _G(screen0), _G(pal), 0, 10);
 			break;
 
 		case BLEND4:
-			_G(out)->setze_zeiger(workptr);
+			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
 			_G(out)->setze_zeiger(nullptr);
-			fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		default:
-			_G(out)->back2screen(workpage);
+			_G(out)->back2screen(_G(workpage));
 			break;
 		}
 
@@ -698,8 +698,8 @@ void set_up_screen(SetupScreenMode mode) {
 		showWalkAreas();
 
 	_G(cur_hide_flag) = false;
-	ScrXy = (int16 *)ablage[room_blk.AkAblage];
-	if (!menu_display)
+	ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
+	if (!_G(menu_display))
 		calc_scroll(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 		            spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 		            ScrXy[0], ScrXy[1],
@@ -744,7 +744,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 	}
 
 	if (_G(maus_links_click)) {
-		if (menu_item != CUR_USE)
+		if (_G(menu_item) != CUR_USE)
 			Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 		else {
 			if (_G(spieler).inv_cur) {
@@ -769,8 +769,8 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 						}
 
 						_G(spieler).inv_cur = false;
-						menu_item = CUR_WALK;
-						cursor_wahl(menu_item);
+						_G(menu_item) = CUR_WALK;
+						cursor_wahl(_G(menu_item));
 						spieler_vector[P_CHEWY].DelayCount = 0;
 
 						if (_G(spieler).AkInvent != -1)
@@ -827,36 +827,36 @@ void kb_mov(int16 mode) {
 void kb_cur_action(int16 key, int16 mode) {
 	switch (key) {
 	case Common::KEYCODE_RIGHT:
-		if (menu_display == MENU_EINBLENDEN) {
-			if (menu_item < 5)
-				++menu_item;
+		if (_G(menu_display) == MENU_EINBLENDEN) {
+			if (_G(menu_item) < 5)
+				++_G(menu_item);
 			else
-				menu_item = CUR_WALK;
-			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
-			_G(cur)->move(maus_menu_x, 100);
+				_G(menu_item) = CUR_WALK;
+			_G(maus_menu_x) = (_G(menu_item)) * (MAUS_MENU_MAX_X / 5);
+			_G(cur)->move(_G(maus_menu_x), 100);
 		}
 		break;
 
 	case Common::KEYCODE_LEFT:
-		if (menu_display == MENU_EINBLENDEN) {
-			if (menu_item > 0)
-				--menu_item;
+		if (_G(menu_display) == MENU_EINBLENDEN) {
+			if (_G(menu_item) > 0)
+				--_G(menu_item);
 			else
-				menu_item = CUR_INVENT;
-			maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
-			_G(cur)->move(maus_menu_x, 100);
+				_G(menu_item) = CUR_INVENT;
+			_G(maus_menu_x) = (_G(menu_item)) * (MAUS_MENU_MAX_X / 5);
+			_G(cur)->move(_G(maus_menu_x), 100);
 		}
 		break;
 
 	case Common::KEYCODE_UP:
-		if (menu_display == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_EINBLENDEN) {
 			if (_G(spieler).MainMenuY > 1)
 				_G(spieler).MainMenuY -= 2;
 		}
 		break;
 
 	case Common::KEYCODE_DOWN:
-		if (menu_display == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_EINBLENDEN) {
 			if (_G(spieler).MainMenuY < 163)
 				_G(spieler).MainMenuY += 2;
 		}
@@ -880,7 +880,7 @@ void maus_action() {
 		_G(inv_disp_ok) = true;
 	} else {
 		if (!_G(spieler).inv_cur && _G(inv_disp_ok)) {
-			cursor_wahl(menu_item);
+			cursor_wahl(_G(menu_item));
 		}
 		_G(inv_disp_ok) = false;
 	}
@@ -893,16 +893,16 @@ void maus_action() {
 				}
 			} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 				if (!flags.main_maus_flag) {
-					if (menu_display == MENU_EINBLENDEN)
+					if (_G(menu_display) == MENU_EINBLENDEN)
 						kbinfo.scan_code = Common::KEYCODE_RETURN;
 					else if (_G(spieler).AkInvent != -1) {
 						if (_G(inv_disp_ok)) {
 							if (_G(spieler).inv_cur) {
-								menu_item = CUR_USE;
-								cursor_wahl(menu_item);
+								_G(menu_item) = CUR_USE;
+								cursor_wahl(_G(menu_item));
 								_G(spieler).inv_cur = false;
 							} else {
-								menu_item = CUR_USE;
+								_G(menu_item) = CUR_USE;
 								cursor_wahl(CUR_AK_INVENT);
 								kbinfo.scan_code = Common::KEYCODE_INVALID;
 							}
@@ -977,13 +977,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					play_scene_ani(ani_nr, tmp);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
-			menu_item_vorwahl = CUR_WALK;
+			_G(menu_item_vorwahl) = CUR_WALK;
 			show_cur();
 			sib_event_inv(test_nr);
 
 			if (!_G(spieler).inv_cur) {
-				menu_item = menu_item_vorwahl;
-				cursor_wahl(menu_item);
+				_G(menu_item) = _G(menu_item_vorwahl);
+				cursor_wahl(_G(menu_item));
 			}
 			obj->calc_all_static_detail();
 		}
@@ -1022,7 +1022,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
 				action_flag = true;
 			}
-			menu_item_vorwahl = CUR_WALK;
+			_G(menu_item_vorwahl) = CUR_WALK;
 			show_cur();
 			sib_ret = sib_event_no_inv(test_nr);
 
@@ -1031,8 +1031,8 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			if (!_G(spieler).inv_cur) {
 
 				if (sib_ret || action_flag) {
-					menu_item = menu_item_vorwahl;
-					cursor_wahl(menu_item);
+					_G(menu_item) = _G(menu_item_vorwahl);
+					cursor_wahl(_G(menu_item));
 				}
 			}
 		} else if (ret == SIB_GET_INV) {
@@ -1065,13 +1065,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			if (_G(spieler).room_s_obj[test_nr].InvNr != -1)
 				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
 			obj->calc_rsi_flip_flop(test_nr);
-			menu_item_vorwahl = CUR_WALK;
+			_G(menu_item_vorwahl) = CUR_WALK;
 			show_cur();
 			sib_event_no_inv(test_nr);
 			obj->calc_all_static_detail();
 			if (!_G(spieler).inv_cur) {
-				menu_item = menu_item_vorwahl;
-				cursor_wahl(menu_item);
+				_G(menu_item) = _G(menu_item_vorwahl);
+				cursor_wahl(_G(menu_item));
 			}
 		} else if (ret == NO_ACTION) {
 			txt_nr = obj->sib_txt_nr(test_nr);
@@ -1248,7 +1248,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			gpkt.Sy = spieler_vector[p_nr].Xypos[1] + spieler_mi[p_nr].HotY;
 			gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
 			gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
-			gpkt.Mem = ged_mem[room_blk.AkAblage];
+			gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
 			gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
 			gpkt.AkMovEbene = _G(ged_mov_ebene);
 			mov->goto_xy(&gpkt);
@@ -1411,7 +1411,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					ok = true;
 					flags.MausTxt = true;
 
-					switch (menu_item) {
+					switch (_G(menu_item)) {
 					case CUR_LOOK:
 						txt_mode = TXT_MARK_LOOK;
 						break;
@@ -1436,7 +1436,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 					action_ret = 0;
 					if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-						if (menu_item != CUR_WALK && menu_item != CUR_USE) {
+						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
@@ -1472,7 +1472,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					
 					if (ok && !action_ret && txt_mode == TXT_MARK_USE && disp_flag) {
 						if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-							if (menu_item != CUR_WALK) {
+							if (_G(menu_item) != CUR_WALK) {
 								if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
 								else
@@ -1578,7 +1578,7 @@ void calc_mouse_person(int16 x, int16 y) {
 					txt_nr = -1;
 					if (!_G(spieler).inv_cur) {
 						txt_nr = calc_person_txt(p_nr);
-						switch (menu_item) {
+						switch (_G(menu_item)) {
 						case CUR_LOOK:
 							mode = TXT_MARK_LOOK;
 							switch (p_nr) {
@@ -1639,7 +1639,7 @@ void calc_mouse_person(int16 x, int16 y) {
 						}
 						if (dia_nr == -1) {
 							if (txt_nr != 30000) {
-								if (menu_item != CUR_WALK) {
+								if (_G(menu_item) != CUR_WALK) {
 									if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 										set_person_spr(P_RIGHT, P_CHEWY);
 									else
@@ -1650,7 +1650,7 @@ void calc_mouse_person(int16 x, int16 y) {
 							}
 						}
 					} else {
-						if (menu_item != CUR_WALK) {
+						if (_G(menu_item) != CUR_WALK) {
 							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
@@ -1701,21 +1701,21 @@ void get_user_key(int16 mode) {
 		case Common::KEYCODE_F5:
 		case Common::KEYCODE_SPACE:
 		case Common::KEYCODE_ESCAPE:
-			maus_old_x = minfo.x;
-			maus_old_y = minfo.y;
+			_G(maus_old_x) = minfo.x;
+			_G(maus_old_y) = minfo.y;
 
-			_G(tmp_menu_item) = menu_item;
-			menu_item = CUR_USE;
+			_G(tmp_menu_item) = _G(menu_item);
+			_G(menu_item) = CUR_USE;
 			Dialogs::Inventory::menu();
 			_G(menu_flag) = MENU_AUSBLENDEN;
-			menu_display = 0;
+			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
-				menu_item = _G(tmp_menu_item);
-				cursor_wahl(menu_item);
+				_G(menu_item) = _G(tmp_menu_item);
+				cursor_wahl(_G(menu_item));
 				_G(spieler).inv_cur = false;
 			} else {
-				menu_item = CUR_USE;
+				_G(menu_item) = CUR_USE;
 				cursor_wahl(CUR_AK_INVENT);
 
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
@@ -1749,9 +1749,9 @@ void set_ani_screen() {
 void del_inventar(int16 nr) {
 	obj->del_inventar(nr, &room_blk);
 	_G(spieler).inv_cur = false;
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	_G(spieler).AkInvent = -1;
-	cursor_wahl(menu_item);
+	cursor_wahl(_G(menu_item));
 	del_invent_slot(nr);
 	_G(maus_links_click) = false;
 }
@@ -1769,7 +1769,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 	int16 nr, attr;
 	bool found = true;
 
-	if (menu_item == CUR_WALK) {
+	if (_G(menu_item) == CUR_WALK) {
 		nr = obj->is_exit(x, y);
 		attr = (nr >= 0 && nr < MAX_EXIT) ?
 			_G(spieler).room_e_obj[nr].Attribut : 0;
@@ -1801,7 +1801,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 		}
 
 		if (_G(cur_ausgang_flag) && !found) {
-			cursor_wahl(menu_item);
+			cursor_wahl(_G(menu_item));
 			_G(cur_ausgang_flag) = false;
 		}
 	}
@@ -1818,7 +1818,7 @@ void calc_ausgang(int16 x, int16 y) {
 			flags.ExitMov = true;
 			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
 				flags.ShowAtsInvTxt = false;
-				menu_item = CUR_DISK;
+				_G(menu_item) = CUR_DISK;
 				cursor_wahl(CUR_DISK);
 				set_up_screen(DO_SETUP);
 				_G(cur_hide_flag) = true;
@@ -1829,7 +1829,7 @@ void calc_ausgang(int16 x, int16 y) {
 				               spieler_mi[_G(auto_p_nr)].HotMovX,
 				               Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
-				ScrXy = (int16 *)ablage[room_blk.AkAblage];
+				ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
 				get_scroll_off(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				               spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 				               ScrXy[0], ScrXy[1],
@@ -1838,7 +1838,7 @@ void calc_ausgang(int16 x, int16 y) {
 				u_idx = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				                      spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
 				                      room->_gedXAnz[room_blk.AkAblage],
-				                      ged_mem[room_blk.AkAblage]);
+				                      _G(ged_mem)[room_blk.AkAblage]);
 				check_shad(u_idx, 0);
 				set_person_spr(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
@@ -1847,8 +1847,8 @@ void calc_ausgang(int16 x, int16 y) {
 				spieler_vector[P_CHEWY].Xzoom = 0;
 				spieler_vector[P_CHEWY].Yzoom = 0;
 				flags.ShowAtsInvTxt = true;
-				menu_item = CUR_WALK;
-				cursor_wahl(menu_item);
+				_G(menu_item) = CUR_WALK;
+				cursor_wahl(_G(menu_item));
 				flags.ExitMov = false;
 				enter_room(nr);
 			}
@@ -1955,12 +1955,12 @@ void auto_scroll(int16 scrx, int16 scry) {
 
 void disable_timer() {
 	uhr->disable_timer();
-	FrameSpeedTmp = FrameSpeed;
+	_G(FrameSpeedTmp) = _G(FrameSpeed);
 }
 
 void enable_timer() {
 	uhr->enable_timer();
-	FrameSpeed = FrameSpeedTmp;
+	_G(FrameSpeed) = _G(FrameSpeedTmp);
 }
 
 void calc_auto_go() {
@@ -1992,9 +1992,9 @@ void hide_person() {
 
 		if (!_G(spieler).PersonHide[i]) {
 			_G(spieler).PersonHide[i] = true;
-			person_tmp_hide[i] = true;
+			_G(person_tmp_hide)[i] = true;
 		} else
-			person_tmp_hide[i] = false;
+			_G(person_tmp_hide)[i] = false;
 	}
 }
 
@@ -2002,7 +2002,7 @@ void show_person() {
 	int16 i;
 	for (i = 0; i < MAX_PERSON; i++) {
 
-		if (person_tmp_hide[i])
+		if (_G(person_tmp_hide)[i])
 			_G(spieler).PersonHide[i] = false;
 	}
 }
@@ -2010,7 +2010,7 @@ void show_person() {
 void save_person_rnr() {
 	int16 i;
 	for (i = 0; i < MAX_PERSON; i++)
-		person_tmp_room[i] = _G(spieler).PersonRoomNr[i];
+		_G(person_tmp_room)[i] = _G(spieler).PersonRoomNr[i];
 	flags.SavePersonRnr = true;
 }
 
@@ -2018,7 +2018,7 @@ void set_person_rnr() {
 	int16 i;
 	if (flags.SavePersonRnr) {
 		for (i = 0; i < MAX_PERSON; i++)
-			_G(spieler).PersonRoomNr[i] = person_tmp_room[i];
+			_G(spieler).PersonRoomNr[i] = _G(person_tmp_room)[i];
 		flags.SavePersonRnr = false;
 	}
 }
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index bcaf1719363..8b9856e5966 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -35,9 +35,9 @@ void plot_main_menu() {
 	int16 zoomx, zoomy;
 	int16 *korrektur;
 
-	if (menu_item != _G(tmp_menu)) {
+	if (_G(menu_item) != _G(tmp_menu)) {
 		_G(m_flip) = 0;
-		_G(tmp_menu) = menu_item;
+		_G(tmp_menu) = _G(menu_item);
 	}
 
 	maus_mov_menu();
@@ -70,12 +70,12 @@ void plot_main_menu() {
 	++_G(m_flip);
 	if (_G(m_flip) < 12 * (_G(spieler).DelaySpeed + 1)) {
 		int deltaX = 0;
-		if (menu_item == CUR_SAVE)
+		if (_G(menu_item) == CUR_SAVE)
 			deltaX = -40;
-		else if (menu_item == CUR_INVENT)
+		else if (_G(menu_item) == CUR_INVENT)
 			deltaX = 40;
 
-		int img = IMAGES[menu_item];
+		int img = IMAGES[_G(menu_item)];
 		_G(out)->scale_set(menutaf->image[img],
 		    MENU_X + deltaX + korrektur[img * 2] - 5,
 		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
@@ -87,13 +87,13 @@ void plot_main_menu() {
 }
 
 void maus_mov_menu() {
-	maus_menu_x = g_events->_mousePos.x;
-	if (maus_menu_x > 200) {
+	_G(maus_menu_x) = g_events->_mousePos.x;
+	if (_G(maus_menu_x) > 200) {
 		g_events->warpMouse(Common::Point(200, g_events->_mousePos.y));
-		maus_menu_x = 200;
+		_G(maus_menu_x) = 200;
 	}
 
-	menu_item = (maus_menu_x / (MAUS_MENU_MAX_X / 5));
+	_G(menu_item) = (_G(maus_menu_x) / (MAUS_MENU_MAX_X / 5));
 }
 
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
@@ -125,7 +125,7 @@ void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 void get_display_xy(int16 *x, int16 *y, int16 nr) {
 	int16 *xy;
 	int16 x1, y1;
-	xy = (int16 *)inv_spr[nr];
+	xy = (int16 *)_G(inv_spr)[nr];
 	x1 = 48 - xy[0];
 	x1 /= 2;
 	*x = x1;
@@ -266,67 +266,67 @@ void ads_menu() {
 	if (flags.AdsDialog) {
 		flags.ShowAtsInvTxt = false;
 		flags.MainInput = false;
-		if (ads_item_anz > 4)
+		if (_G(ads_item_anz) > 4)
 			cur_y_start = 190;
 		else
-			cur_y_start = 190 - (4 - ads_item_anz) * 10;
+			cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
 		cur_y = minfo.y;
 		if (cur_y < 160 || cur_y > cur_y_start + 10)
 			cur_y = 255;
 		else
 			cur_y = (cur_y_start + 5 - cur_y) / 10;
 
-		if (atds->aad_get_status() == -1 && ads_push == false &&
+		if (atds->aad_get_status() == -1 && _G(ads_push) == false &&
 		        flags.NoDiaBox == false) {
 			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
-			if (ads_item_anz > 4)
+			if (_G(ads_item_anz) > 4)
 				cur_y_start = 190;
 			else
-				cur_y_start = 190 - (4 - ads_item_anz) * 10;
-			for (i = 0; i < ads_item_anz && i < 4; i++) {
+				cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
+			for (i = 0; i < _G(ads_item_anz) && i < 4; i++) {
 				if (cur_y == i)
 					col = 255;
 				else
 					col = 14;
-				_G(out)->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
+				_G(out)->printxy(4, cur_y_start - i * 10, col, 300, 0, _G(ads_item_ptr)[i]);
 			}
 		}
 
 		switch (_G(in)->get_switch_code()) {
 		case 255:
 		case Common::KEYCODE_RETURN:
-			if (cur_y < ads_item_anz && cur_y >= 0 && ads_push == false) {
+			if (cur_y < _G(ads_item_anz) && cur_y >= 0 && _G(ads_push) == false) {
 				_G(cur_display) = false;
-				ads_push = true;
+				_G(ads_push) = true;
 				minfo.y = 159;
-				an_blk = atds->ads_item_choice(ads_blk_nr, cur_y);
+				an_blk = atds->ads_item_choice(_G(ads_blk_nr), cur_y);
 				if (an_blk->BlkNr == -1) {
-					ads_action(ads_dia_nr, ads_blk_nr, an_blk->EndNr);
-					ads_ende(ads_dia_nr, ads_blk_nr, an_blk->EndNr);
+					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
+					ads_ende(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					stop_ads_dialog();
 				} else {
-					an_blk = atds->calc_next_block(ads_blk_nr, cur_y);
-					ads_action(ads_dia_nr, ads_blk_nr, an_blk->EndNr);
-					ads_blk_nr = an_blk->BlkNr;
-					ads_item_ptr = atds->ads_item_ptr(ads_blk_nr,
-					                                  &ads_item_anz);
+					an_blk = atds->calc_next_block(_G(ads_blk_nr), cur_y);
+					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
+					_G(ads_blk_nr) = an_blk->BlkNr;
+					_G(ads_item_ptr) = atds->ads_item_ptr(_G(ads_blk_nr),
+					                                  &_G(ads_item_anz));
 				}
 				det->stop_detail(talk_start_ani);
 				det->show_static_spr(talk_hide_static);
 				talk_start_ani = -1;
 				talk_hide_static = -1;
 				if (flags.AdsDialog == false) {
-					atds->save_ads_header(ads_dia_nr);
+					atds->save_ads_header(_G(ads_dia_nr));
 				}
 			}
 			break;
 
 		default:
-			ads_push = false;
+			_G(ads_push) = false;
 			break;
 		}
 	}
@@ -334,7 +334,7 @@ void ads_menu() {
 
 void stop_ads_dialog() {
 	aad_wait(-1);
-	_G(spieler).DispFlag = ads_tmp_dsp;
+	_G(spieler).DispFlag = _G(ads_tmp_dsp);
 	_G(cur_display) = true;
 	flags.ShowAtsInvTxt = true;
 	flags.MainInput = true;
@@ -349,8 +349,8 @@ void cur_2_inventory() {
 	if (_G(spieler).AkInvent != -1) {
 		invent_2_slot(_G(spieler).AkInvent);
 		_G(spieler).AkInvent = -1;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 	}
 	_G(spieler).inv_cur = false;
 }
@@ -359,7 +359,7 @@ void inventory_2_cur(int16 nr) {
 	if (_G(spieler).AkInvent == -1) {
 		if (obj->check_inventar(nr)) {
 			del_invent_slot(nr);
-			menu_item = CUR_USE;
+			_G(menu_item) = CUR_USE;
 			_G(spieler).AkInvent = nr;
 			cursor_wahl(CUR_AK_INVENT);
 			get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1dcd33c3db0..b45958aae37 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -512,8 +512,8 @@ void exit_room(int16 eib_nr) {
 			break;
 
 		}
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 		_G(maus_links_click) = false;
 		break;
 
@@ -598,7 +598,7 @@ void exit_room(int16 eib_nr) {
 	case 123:
 	case 125:
 	case 135:
-		xy = (int16 *)ablage[room_blk.AkAblage];
+		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
 		x = xy[0] + 30;
 		y = spieler_vector[P_CHEWY].Xypos[1];
 		break;
@@ -613,7 +613,7 @@ void exit_room(int16 eib_nr) {
 	case 92:
 	case 122:
 	case 131:
-		xy = (int16 *)ablage[room_blk.AkAblage];
+		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
 		x = spieler_vector[P_CHEWY].Xypos[0];
 		y = xy[1] + 3;
 		break;
@@ -900,7 +900,7 @@ static void flic_proc1() {
 		}
 	}
 
-	_G(out)->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->cls();
 }
 
@@ -1120,7 +1120,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1003:
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 			print_rows(590);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 1);
@@ -1131,7 +1131,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 				for (i = 0; i < 3 && ret != -1; ++i) {
-					fx->border(workpage, 100, 0, 0);
+					fx->border(_G(workpage), 100, 0, 0);
 					print_rows(591);
 #ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
@@ -1146,7 +1146,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1006:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
 				ret = flc->custom_play(&Ci);
@@ -1171,7 +1171,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1012:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
@@ -1185,17 +1185,17 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(out)->cls();
 				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 			}
 #else
 			_G(out)->cls();
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 #endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
 				ret = flc->custom_play(&Ci);
@@ -1208,7 +1208,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1045:
 			for (i = 0; i < 11 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 				print_rows(594);
 				if (FLIC_CUT_1045[i] == 53) {
 					_G(sndPlayer)->stopMod();
@@ -1234,7 +1234,7 @@ void flic_cut(int16 nr, int16 mode) {
 			g_engine->playVideo(FCUT_031);
 
 			if (ret != -1) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 43);
 				ret = flc->custom_play(&Ci);
@@ -1253,8 +1253,8 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 			if (ret != -1) {
-				fx->spr_blende(workpage, 100, false, 0);
-				fx->border(workpage, 100, 0, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 48);
 				ret = flc->custom_play(&Ci);
@@ -1273,22 +1273,22 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 				ret = flc->custom_play(&Ci);
 			}
 			if (ret != -1) {
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 54);
 			}
 #else
-			fx->spr_blende(workpage, 100, false, 0);
+			fx->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(nr);
 #endif
 			break;
 
 		case 1055:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
 				ret = flc->custom_play(&Ci);
@@ -1302,7 +1302,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 46);
 #endif
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 			}
 			break;
 
@@ -1334,7 +1334,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 			}
 			if (ret != -1) {
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 61);
 				flc->custom_play(&Ci);
@@ -1343,7 +1343,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 			}
 			if (ret != -1) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 62);
 				flc->custom_play(&Ci);
@@ -1378,7 +1378,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 			if (ret != -1) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 70);
 				ret = flc->custom_play(&Ci);
@@ -1398,7 +1398,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
 				ret = flc->custom_play(&Ci);
@@ -1410,9 +1410,9 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1074:
 			for (i = 0; i < 4 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 				print_rows(605);
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
 				ret = flc->custom_play(&Ci);
@@ -1425,7 +1425,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
 				ret = flc->custom_play(&Ci);
@@ -1445,7 +1445,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
 				flc->custom_play(&Ci);
@@ -1465,7 +1465,7 @@ void flic_cut(int16 nr, int16 mode) {
 #endif
 
 			if (ret != -1) {
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 86);
 				flc->custom_play(&Ci);
@@ -1518,10 +1518,10 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 109);
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 			}
 #else
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 			//playVideo(109);
 #endif
 			break;
@@ -1537,11 +1537,11 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 115);
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 				flc->custom_play(&Ci);
 			}
 #else
-			fx->spr_blende(workpage, 100, false, 0);
+			fx->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(115);
 #endif
 			break;
@@ -1561,13 +1561,13 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(sndPlayer)->setMusicMasterVol(63);
-				fx->spr_blende(workpage, 100, false, 0);
+				fx->spr_blende(_G(workpage), 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 112);
 				flc->custom_play(&Ci);
 			}
 #else
 			ailsnd->setMusicMasterVol(63);
-			fx->spr_blende(workpage, 100, false, 0);
+			fx->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(112);
 #endif
 			_G(sndPlayer)->stopMod();
@@ -1589,12 +1589,12 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1117:
 #ifndef NEW_VIDEO_CODE
 			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
-				fx->border(workpage, 100, 0, 0);
+				fx->border(_G(workpage), 100, 0, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 119);
 				flc->custom_play(&Ci);
 			}
 #else
-			fx->border(workpage, 100, 0, 0);
+			fx->border(_G(workpage), 100, 0, 0);
 			playVideo(119);
 #endif
 			break;
@@ -1646,7 +1646,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	atds->stop_aad();
 	atds->stop_ats();
-	_G(out)->setze_zeiger(workptr);
+	_G(out)->setze_zeiger(_G(workptr));
 	flags.NoPalAfterFlc = false;
 }
 
@@ -1821,12 +1821,12 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = false;
 		atds->set_ats_str(112, 0, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
 		atds->set_ats_str(113, 1, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TALISMAN_R12:
@@ -2074,20 +2074,20 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_CARTRIDGE_R23:
 		Room23::use_cartridge();
-		menu_item_vorwahl = CUR_USE;
+		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = true;
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(112, 1, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(113, 0, ATS_DATEI);
-		menu_item_vorwahl = CUR_USE;
+		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_FEUER_R14:
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index f7b93d8079e..bbcf1b4221e 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -133,7 +133,7 @@ bool Room0::getPillow() {
 		auto_move(1, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
-		menu_item = CUR_WALK;
+		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
 		atds->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
 		det->hide_static_spr(6);
@@ -155,7 +155,7 @@ bool Room0::pullSlime() {
 		set_person_pos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
-		menu_item = CUR_WALK;
+		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
 		atds->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
@@ -238,7 +238,7 @@ void Room0::eyeStart(EyeMode mode) {
 
 		_G(cur)->plot_cur();
 		calcEyeClick(3);
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -285,7 +285,7 @@ void Room0::eyeWait() {
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
 		calcEyeClick(2);
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 
 		if (adi->delay_count > 0) {
 			--adi->delay_count;
@@ -510,7 +510,7 @@ void Room0::feederStart(int16 mode) {
 		if (!mode)
 			calcPillowClick(1);
 
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -549,7 +549,7 @@ void Room0::feederExtend() {
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
 		calcPillowClick(1);
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 	}
 
 	clear_prog_ani();
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 8d3e4c97f58..c4df16a8d67 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -115,8 +115,8 @@ int16 Room4::sonde_comp() {
 
 	clear_prog_ani();
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
+	_G(menu_item) = CUR_WALK;
+	cursor_wahl(_G(menu_item));
 
 	spieler_vector[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 9834a7f1c70..e42a139ba89 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -51,8 +51,8 @@ void Room7::haken(int16 sib_nr) {
 
 	del_inventar(8);
 	_G(spieler).AkInvent = -1;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
+	_G(menu_item) = CUR_WALK;
+	cursor_wahl(_G(menu_item));
 
 	if (_G(spieler).R7RHaken) {
 		_G(spieler).R7SeilOk = true;
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 3a13cab7f85..a40dd87771a 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -137,14 +137,14 @@ bool Room8::gips_wurf() {
 		det->del_taf_tbl(116, 30, nullptr);
 		auto_move(8, P_CHEWY);
 		flags.AtsAction = false;
-		menu_item = CUR_USE;
+		_G(menu_item) = CUR_USE;
 		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
 		flags.AtsAction = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(20, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
-		cursor_wahl(menu_item);
+		cursor_wahl(_G(menu_item));
 		show_cur();
 	}
 
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 66841a66476..c6d8b1f1d84 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -30,10 +30,10 @@ namespace Rooms {
 
 void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
-		_G(out)->setze_zeiger(workptr);
-		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->setze_zeiger(nullptr);
-		fx->blende1(workptr, _G(screen0), _G(pal), 150, 0, 0);
+		fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
 		flic_cut(FCUT_004, CFO_MODE);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 96e9cc9c436..558308a3633 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -108,7 +108,7 @@ void Room11::talk_debug() {
 		flags.AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		start_ads_wait(5);
-		menu_item = CUR_WALK;
+		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
 
 		flags.AutoAniPlay = false;
@@ -154,8 +154,8 @@ int16 Room11::scanner() {
 			flc->remove_custom_user_function();
 			_G(spieler).R11TerminalOk = true;
 			cur_2_inventory();
-			menu_item = CUR_TALK;
-			cursor_wahl(menu_item);
+			_G(menu_item) = CUR_TALK;
+			cursor_wahl(_G(menu_item));
 			start_aad_wait(12, -1);
 			show_cur();
 			load_ads_dia(3);
@@ -169,8 +169,8 @@ int16 Room11::scanner() {
 			} else {
 				actionFl = true;
 				start_aad_wait(12, -1);
-				menu_item = CUR_TALK;
-				cursor_wahl(menu_item);
+				_G(menu_item) = CUR_TALK;
+				cursor_wahl(_G(menu_item));
 				load_ads_dia(3);
 			}
 		}
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 264faea32bb..74553f54c3e 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -210,8 +210,8 @@ int16 Room12::use_terminal() {
 				flags.NoScroll = false;
 				atds->set_ats_str(118, 0, ATS_DATEI);
 				det->hide_static_spr(12);
-				menu_item = CUR_WALK;
-				cursor_wahl(menu_item);
+				_G(menu_item) = CUR_WALK;
+				cursor_wahl(_G(menu_item));
 				set_person_pos(108, 90, P_CHEWY, -1);
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index bc29bb704ac..aa3f321866d 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -222,8 +222,8 @@ void Room17::calc_seil() {
 				_G(spieler).R17Location = 1;
 			}
 
-			menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
+			_G(menu_item) = CUR_WALK;
+			cursor_wahl(_G(menu_item));
 			wait_auto_obj(CHEWY_OBJ);
 			show_cur();
 			set_person_spr(P_LEFT, P_CHEWY);
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 65c171490fa..5f6712ee27e 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -173,8 +173,8 @@ void Room22::get_bork() {
 		invent_2_slot(BORK_INV);
 
 		_G(spieler).R22GetBork = true;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 	}
 }
 
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 6548dbfba09..9006d2096a8 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -140,7 +140,7 @@ void Room23::use_cartridge() {
 		atds->set_ats_str(111, 1, ATS_DATEI);
 	}
 
-	menu_item_vorwahl = CUR_USE;
+	_G(menu_item_vorwahl) = CUR_USE;
 }
 
 void Room23::get_cartridge() {
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 4380486c6ef..9e0c0d29281 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -44,7 +44,7 @@ void Room24::entry() {
 	curblk.sprite = room_blk.DetImage;
 	curani.ani_anf = 7;
 	curani.ani_end = 10;
-	menu_item = CUR_USER;
+	_G(menu_item) = CUR_USER;
 	cursor_wahl(CUR_USER);
 
 	if (_G(spieler).R16F5Exit)
@@ -63,8 +63,8 @@ void Room24::entry() {
 
 void Room24::xit() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
+	_G(menu_item) = CUR_WALK;
+	cursor_wahl(_G(menu_item));
 	set_person_pos(263, 144, P_CHEWY, -1);
 	_G(spieler).scrollx = 88;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 18aadc68301..18d703ee5eb 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -65,9 +65,9 @@ void Room25::entry() {
 
 			remove_inventory(TRANSLATOR_INV);
 			_G(spieler).inv_cur = false;
-			menu_item = CUR_WALK;
+			_G(menu_item) = CUR_WALK;
 			_G(spieler).AkInvent = -1;
-			cursor_wahl(menu_item);
+			cursor_wahl(_G(menu_item));
 		}
 
 		_G(spieler).R25FirstEntry = true;
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index c4bc5755b02..caec2a85513 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -88,7 +88,7 @@ void Room37::gedAction(int index) {
 
 void Room37::setup_func() {
 	if (_G(maus_links_click) && !_G(spieler).R37Kloppe &&
-			menu_item == CUR_WALK) {
+			_G(menu_item) == CUR_WALK) {
 		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
 			(minfo.x + _G(spieler).scrollx > 482)) {
 			// Don't allow moving into chicken coop area
@@ -295,8 +295,8 @@ void Room37::use_hahn() {
 		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 		flic_cut(FCUT_052, CFO_MODE);
 		cur_2_inventory();
-		menu_item = CUR_TALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_TALK;
+		cursor_wahl(_G(menu_item));
 		show_cur();
 		hahn_dia();
 
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 23433028b75..7f0733ed665 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -161,8 +161,8 @@ void Room39::ok() {
 
 	switch_room(27);
 	start_aad_wait(192, -1);
-	menu_item = CUR_WALK;
-	cursor_wahl(menu_item);
+	_G(menu_item) = CUR_WALK;
+	cursor_wahl(_G(menu_item));
 }
 
 int16 Room39::use_tv() {
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 6561be65dc3..d103ac41d8e 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -313,7 +313,7 @@ void Room40::setup_func() {
 int16 Room40::use_mr_pumpkin() {
 	int16 action_ret = false;
 
-	if (menu_item != CUR_HOWARD) {
+	if (_G(menu_item) != CUR_HOWARD) {
 		hide_cur();
 
 		if (!_G(spieler).inv_cur) {
@@ -368,7 +368,7 @@ int16 Room40::use_mr_pumpkin() {
 int16 Room40::use_schalter(int16 aad_nr) {
 	int16 action_flag = false;
 
-	if (menu_item != CUR_HOWARD &&_G(spieler).R40PoliceWeg == false) {
+	if (_G(menu_item) != CUR_HOWARD &&_G(spieler).R40PoliceWeg == false) {
 		action_flag = true;
 
 		hide_cur();
@@ -443,7 +443,7 @@ void Room40::talk_handler() {
 int16 Room40::use_haendler() {
 	int16 action_flag = false;
 
-	if (menu_item == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
+	if (_G(menu_item) == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
 		if (!_G(spieler).flags38_2) {
 			start_aad_wait(612, -1);
@@ -491,8 +491,8 @@ int16 Room40::use_haendler() {
 				start_aad_wait(210, -1);
 			}
 
-			menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
+			_G(menu_item) = CUR_WALK;
+			cursor_wahl(_G(menu_item));
 			show_cur();
 			flags.NoScroll = false;
 			flags.MausLinks = false;
@@ -506,7 +506,7 @@ int16 Room40::use_haendler() {
 int16 Room40::use_bmeister() {
 	short action_flag = false;
 
-	if (menu_item == CUR_HOWARD) {
+	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
 		hide_cur();
 		_G(spieler).R40HoUse = true;
@@ -517,8 +517,8 @@ int16 Room40::use_bmeister() {
 		start_aad_wait(216, -1);
 		_G(spieler).R40HoUse = false;
 		flags.NoScroll = false;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 		show_cur();
 
 	} else if (is_cur_inventar(LIKOER2_INV)) {
@@ -571,7 +571,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 bool Room40::use_police() {
 	bool result = false;
 
-	if (menu_item == CUR_HOWARD) {
+	if (_G(menu_item) == CUR_HOWARD) {
 		if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
 			result = true;
 			_G(spieler).R40PoliceAb = true;
@@ -587,8 +587,8 @@ bool Room40::use_police() {
 			person_end_phase[P_HOWARD] = P_RIGHT;
 			start_aad_wait(218, -1);
 			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-			menu_item = CUR_WALK;
-			cursor_wahl(menu_item);
+			_G(menu_item) = CUR_WALK;
+			cursor_wahl(_G(menu_item));
 			show_cur();
 			flags.MausLinks = false;
 		}
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index e0cbca81fc7..76be36ded2d 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -93,7 +93,7 @@ void Room42::get_kuerbis(int16 aad_nr) {
 int16 Room42::use_psack() {
 	int16 action_flag = false;
 
-	if (menu_item == CUR_HOWARD)
+	if (_G(menu_item) == CUR_HOWARD)
 		return action_flag;
 
 	hide_cur();
@@ -143,15 +143,15 @@ int16 Room42::use_psack() {
 int16 Room42::use_beamter() {
 	int16 action_flag = false;
 
-	if (menu_item == CUR_HOWARD) {
+	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
 		atds->set_ats_str(264, 2, ATS_DATEI);
 		hide_cur();
 		auto_move(4, P_CHEWY);
 		start_aad_wait(184, -1);
 		_G(spieler).R42HoToBeamter = true;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 		show_cur();
 		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 		flags.MausLinks = false;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index da7cd01d69b..7e77be70fc7 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -97,7 +97,7 @@ void Room45::setup_func() {
 	int16 x;
 	int16 y;
 
-	if (menu_display == 0) {
+	if (_G(menu_display) == 0) {
 		if (!_G(r45_delay)) {
 			_G(r45_delay) = _G(spieler).DelaySpeed / 2;
 
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 2999ab5301e..b4cab146fa3 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -90,8 +90,8 @@ void Room48::setup_func() {
 		det->hide_static_spr(1 + i);
 
 	if (flags.ShowAtsInvTxt) {
-		if (menu_display == 0) {
-			menu_item = CUR_USE;
+		if (_G(menu_display) == 0) {
+			_G(menu_item) = CUR_USE;
 			cur_2_inventory();
 			cursor_wahl(CUR_ZEIGE);
 			const int16 idx = det->maus_vector(minfo.x, minfo.y);
@@ -138,8 +138,8 @@ void Room48::setup_func() {
 							det->del_static_ani(0);
 							start_detail_wait(2, 1, ANI_VOR);
 							g_engine->_sound->stopSound(0);
-							menu_item = CUR_WALK;
-							cursor_wahl(menu_item);
+							_G(menu_item) = CUR_WALK;
+							cursor_wahl(_G(menu_item));
 							show_cur();
 							_G(spieler).R48TaxiEntry = true;
 							_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index b8b07f2254f..6f03385282f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -108,8 +108,8 @@ void Room51::xit(int16 eib_nr) {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
-		menu_item = CUR_WALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_WALK;
+		cursor_wahl(_G(menu_item));
 		show_cur();
 
 	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 095377c30f1..ee054c1e794 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -284,7 +284,7 @@ int16 Room56::use_man() {
 int16 Room56::use_kneipe() {
 	int16 action_ret = false;
 	if (!_G(spieler).flags32_10) {
-		if (menu_item == CUR_WALK && !_G(spieler).inv_cur && atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
+		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
 			action_ret = true;
 			hide_cur();
 			if (_G(spieler).R56Kneipe) {
@@ -344,7 +344,7 @@ int16 Room56::use_kneipe() {
 			start_aad_wait(518, -1);
 		}
 		show_cur();
-	} else if (menu_item == 0 || menu_item == 2 || (menu_item == 1 && !_G(spieler).inv_cur)){
+	} else if (_G(menu_item) == 0 || _G(menu_item) == 2 || (_G(menu_item) == 1 && !_G(spieler).inv_cur)){
 		hide_cur();
 		action_ret = 1;
 		_G(maus_links_click) = false;
@@ -441,7 +441,7 @@ void Room56::setup_func() {
 	if (_G(spieler).flags32_10)
 		return;
 	
-	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && menu_item == CUR_WALK) {
+	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
 		if (minfo.x + _G(spieler).scrollx >= 157 && minfo.x + _G(spieler).scrollx <= 204 && minfo.y >= 28 && minfo.y <= 89)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index 156b7034f74..96650bb74d7 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -67,9 +67,9 @@ void Room58::look_cut_mag(int16 r_nr) {
 }
 
 void Room58::setup_func() {
-	if (menu_item != CUR_LOOK) {
-		menu_item = CUR_LOOK;
-		cursor_wahl(menu_item);
+	if (_G(menu_item) != CUR_LOOK) {
+		_G(menu_item) = CUR_LOOK;
+		cursor_wahl(_G(menu_item));
 	}
 }
 
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 31873e5b6f0..579e1845b36 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -70,7 +70,7 @@ void Room63::setup_func() {
 		return;
 
 	cur_2_inventory();
-	menu_item = CUR_USE;
+	_G(menu_item) = CUR_USE;
 	cursor_wahl(CUR_USE);
 	
 	switch (_G(r63ChewyAni)) {
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 119cde0c9dc..0ad6ad3c937 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -142,7 +142,7 @@ int16 Room67::talk_papagei() {
 		action_flag = true;
 		hide_cur();
 		room->set_timer_status(1, TIMER_STOP);
-		if (menu_item == CUR_HOWARD) {
+		if (_G(menu_item) == CUR_HOWARD) {
 			show_cur();
 
 			ssi[2].X = 270 - _G(spieler).scrollx;
@@ -150,10 +150,10 @@ int16 Room67::talk_papagei() {
 			atds->set_split_win(2, &ssi[2]);
 			start_ads_wait(19);
 			room->set_timer_status(1, TIMER_START);
-		} else if (menu_item == CUR_NICHELLE) {
+		} else if (_G(menu_item) == CUR_NICHELLE) {
 			start_aad_wait(380, -1);
 			room->set_timer_status(1, TIMER_START);
-		} else if (menu_item == CUR_TALK) {
+		} else if (_G(menu_item) == CUR_TALK) {
 			auto_move(5, P_CHEWY);
 			show_cur();
 
@@ -162,7 +162,7 @@ int16 Room67::talk_papagei() {
 			atds->set_split_win(2, &ssi[2]);
 			start_ads_wait(18);
 			room->set_timer_status(1, TIMER_START);
-		} else if (menu_item == CUR_USE) {
+		} else if (_G(menu_item) == CUR_USE) {
 			hide_cur();
 			auto_move(4, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 5eb061fb4a2..aeb42e3e62d 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -162,7 +162,7 @@ int Room71::proc1() {
 	flags.NoScroll = true;
 	auto_scroll(256, 0);
 	_delay = 0;
-	if (menu_item == CUR_HOWARD) {
+	if (_G(menu_item) == CUR_HOWARD) {
 		proc4();
 		if (_G(spieler).flags28_4) {
 			if (_G(spieler).R71Val2)
@@ -170,7 +170,7 @@ int Room71::proc1() {
 			else
 				_G(spieler).R71Val1 = 1;
 		}
-	} else if (menu_item == CUR_NICHELLE) {
+	} else if (_G(menu_item) == CUR_NICHELLE) {
 		proc3();
 		if (_G(spieler).flags28_4) {
 			if (_G(spieler).R71Val1)
@@ -220,7 +220,7 @@ void Room71::proc2() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler).R71LeopardVined = true;
 	flags.NoScroll = false;
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	start_aad_wait(434, -1);
 }
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 29e0042716f..fcda26ab3e7 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -73,10 +73,10 @@ void Room80::setup_func() {
 	for (int i = 0; i < 3; ++i)
 		det->hide_static_spr(i);
 
-	if (_G(spieler).flags32_1 || !flags.ShowAtsInvTxt || menu_display)
+	if (_G(spieler).flags32_1 || !flags.ShowAtsInvTxt || _G(menu_display))
 		return;
 
-	menu_item = CUR_USE;
+	_G(menu_item) = CUR_USE;
 	cur_2_inventory();
 	cursor_wahl(CUR_ZEIGE);
 	int vec = det->maus_vector(_G(spieler).scrollx + minfo.x, minfo.y);
@@ -116,7 +116,7 @@ void Room80::setup_func() {
 
 	SetUpScreenFunc = nullptr;
 	det->hide_static_spr(vec);
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	_G(spieler).flags30_1 = true;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index c6747d82520..01528d078c6 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -248,7 +248,7 @@ int Room82::proc9() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 	switch_room(88);
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 
 	return 1;
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index bb467b0e2d9..0abfcac037c 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -200,7 +200,7 @@ int Room84::proc4() {
 
 	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
 	switch_room(88);
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	show_cur();
 
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 1feb98948cf..b1e4001d9a5 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -192,7 +192,7 @@ void Room86::proc3(bool cond) {
 		det->set_static_pos(0, 352, destY, false, false);
 		destY += deltaY;
 		_G(out)->setze_zeiger(nullptr);
-		_G(out)->back2screen(workpage);
+		_G(out)->back2screen(_G(workpage));
 	}
 
 	g_engine->_sound->stopSound(1);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 2ba0abc84e1..521df623906 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -61,7 +61,7 @@ int Room88::proc1() {
 	hide_cur();
 	auto_move(0, P_CHEWY);
 	switch_room(_G(spieler).r88DestRoom);
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	show_cur();
 	
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 4b89f7e704d..aaacdeb9ccd 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -98,17 +98,17 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
-			_G(out)->setze_zeiger(workptr);
+			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
-			_G(out)->back2screen(workpage);
+			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		// Unsquish out thanks for playing screen
-		_G(out)->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(_G(workptr));
 		_G(out)->cls();
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
 		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Common::KEYCODE_ESCAPE from F5");
@@ -119,18 +119,18 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi += 3;
 			var30 += 2;
-			_G(out)->setze_zeiger(workptr);
+			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
-			_G(out)->back2screen(workpage);
+			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		g_events->delay(3000);
 		_G(out)->ausblenden(2);
-		_G(out)->setze_zeiger(workptr);
+		_G(out)->setze_zeiger(_G(workptr));
 		_G(out)->cls();
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index b00ca865700..b09a7e4a794 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -113,7 +113,7 @@ void Room90::xit(int16 eib_nr) {
 }
 
 void Room90::setup_func() {
-	if (menu_display)
+	if (_G(menu_display))
 		return;
 
 	if (_delay)
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index f328750d57a..971a1876295 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -99,10 +99,10 @@ void Room91::setup_func() {
 		else
 			go_auto_xy(536, 90, P_HOWARD, ANI_GO);
 	} else {
-		if (menu_display)
+		if (_G(menu_display))
 			return;
 		
-		menu_item = CUR_USE;
+		_G(menu_item) = CUR_USE;
 		cur_2_inventory();
 		cursor_wahl(CUR_22);
 
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index cf9c0f91942..e4ddcf9362b 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -68,7 +68,7 @@ void Room93::entry() {
 void Room93::xit() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 94;
 	_G(spieler).scrollx = _G(spieler).r94Scrollx;
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 }
 
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index b6cce8c391b..ab3aa04fbb7 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -198,7 +198,7 @@ void Room97::setup_func() {
 		}
 	}
 
-	if (_G(spieler).flags37_1 && menu_item == CUR_WALK) {
+	if (_G(spieler).flags37_1 && _G(menu_item) == CUR_WALK) {
 		if (_G(spieler).scrollx + minfo.x >= 487 && _G(spieler).scrollx + minfo.x <= 522 && minfo.y >= 23 && minfo.y <= 59)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else
@@ -567,7 +567,7 @@ int Room97::proc10() {
 	det->show_static_spr(19);
 	_G(spieler).flags37_1 = true;
 	atds->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
-	menu_item = CUR_WALK;
+	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 
 	show_cur();
@@ -663,7 +663,7 @@ int Room97::throwSlime() {
 	_slimeThrown = true;
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
-	menu_item = CUR_USE;
+	_G(menu_item) = CUR_USE;
 	cursor_wahl(CUR_USE);
 	
 	return 1;
@@ -675,7 +675,7 @@ void Room97::sensorAnim() {
 
 	flags.AutoAniPlay = true;
 	stop_person(P_CHEWY);
-	menu_item = CUR_USE;
+	_G(menu_item) = CUR_USE;
 	cursor_wahl(CUR_USE);
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	atds->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 093ee2993f0..f048b9f6200 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -151,7 +151,7 @@ void sprite_engine() {
 			break;
 
 		case ZOBJ_INVENTAR:
-			_G(out)->sprite_set(inv_spr[nr],
+			_G(out)->sprite_set(_G(inv_spr)[nr],
 			                 _G(spieler).room_m_obj[nr].X - _G(spieler).scrollx,
 			                 _G(spieler).room_m_obj[nr].Y - _G(spieler).scrolly, 0);
 			break;
@@ -344,7 +344,7 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 		if (p_nr == P_CHEWY) {
 			u_index = ged->ged_idx(x + spieler_mi[p_nr].HotX, y + spieler_mi[p_nr].HotY,
 			                        room->_gedXAnz[room_blk.AkAblage],
-			                        ged_mem[room_blk.AkAblage]);
+			                        _G(ged_mem)[room_blk.AkAblage]);
 			check_shad(u_index, 1);
 		}
 	}
@@ -504,7 +504,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	if (!flags.AtsText) {
 		flags.AtsText = true;
 		if (txt_nr != -1) {
-			if (menu_item != CUR_WALK)
+			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_START);
 			ret = atds->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
 			if (ret) {
@@ -523,7 +523,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 
 				set_up_screen(DO_SETUP);
 			}
-			if (menu_item != CUR_WALK)
+			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_END);
 		}
 		flags.AtsText = false;
@@ -569,8 +569,8 @@ void start_aad(int16 dia_nr, int16 ssi_nr) {
 
 void start_ads_wait(int16 dia_nr) {
 	if (!flags.AdsDialog) {
-		menu_item = CUR_TALK;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_TALK;
+		cursor_wahl(_G(menu_item));
 		load_ads_dia(dia_nr);
 		while (flags.AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
@@ -791,17 +791,17 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 				if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 				                              om->Xypos[1] + mi->HotY + tmpy,
 				                              room->_gedXAnz[room_blk.AkAblage],
-				                              ged_mem[room_blk.AkAblage]))) {
+				                              _G(ged_mem)[room_blk.AkAblage]))) {
 
 					if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 					                              om->Xypos[1] + mi->HotY,
 					                              room->_gedXAnz[room_blk.AkAblage],
-					                              ged_mem[room_blk.AkAblage]))) {
+					                              _G(ged_mem)[room_blk.AkAblage]))) {
 
 						if (!(u_index = ged->ged_idx(om->Xypos[0] + mi->HotX,
 						                              om->Xypos[1] + mi->HotY + tmpy,
 						                              room->_gedXAnz[room_blk.AkAblage],
-						                              ged_mem[room_blk.AkAblage]))) {
+						                              _G(ged_mem)[room_blk.AkAblage]))) {
 							om->Count = 0;
 						} else {
 							if (!tmpy) {
@@ -906,7 +906,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 					u_index = ged->ged_idx(om->Xypos[0] + mi->HotX,
 					                        om->Xypos[1] + mi->HotY,
 					                        room->_gedXAnz[room_blk.AkAblage],
-					                        ged_mem[room_blk.AkAblage]);
+					                        _G(ged_mem)[room_blk.AkAblage]);
 					check_shad(u_index, 1);
 				}
 			}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 24e68d47caa..5af9972ee16 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -36,15 +36,15 @@ int16 load_ads_dia(int16 dia_nr) {
 		if (tmp == true) {
 			atds->load_atds(dia_nr, ADH_DATEI);
 			ret = true;
-			ads_blk_nr = 0;
-			ads_item_ptr = atds->ads_item_ptr(ads_blk_nr, &ads_item_anz);
+			_G(ads_blk_nr) = 0;
+			_G(ads_item_ptr) = atds->ads_item_ptr(_G(ads_blk_nr), &_G(ads_item_anz));
 			flags.AdsDialog = true;
-			ads_push = true;
-			ads_tmp_dsp = _G(spieler).DispFlag;
+			_G(ads_push) = true;
+			_G(ads_tmp_dsp) = _G(spieler).DispFlag;
 			_G(spieler).DispFlag = false;
 
 			set_ssi_xy();
-			ads_dia_nr = dia_nr;
+			_G(ads_dia_nr) = dia_nr;
 			talk_start_ani = -1;
 			talk_hide_static = -1;
 		}
@@ -2179,9 +2179,9 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrolly = 0;
 
 		room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, GBOOK);
-		_G(out)->setze_zeiger(workptr);
-		_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		_G(out)->back2screen(workpage);
+		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->back2screen(_G(workpage));
 
 		while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 			g_events->update();
@@ -2201,8 +2201,8 @@ void calc_inv_use_txt(int16 test_nr) {
 	case ANGEL_INV:
 	case KNOCHEN_INV:
 		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_USE;
+		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = ANGEL2_INV;
 		obj->change_inventar(test_nr, ANGEL2_INV, &room_blk);
@@ -2219,8 +2219,8 @@ void calc_inv_use_txt(int16 test_nr) {
 	case MESSER_INV:
 		if (_G(spieler).AkInvent == 40) {
 			del_inventar(_G(spieler).AkInvent);
-			menu_item = CUR_USE;
-			cursor_wahl(menu_item);
+			_G(menu_item) = CUR_USE;
+			cursor_wahl(_G(menu_item));
 			invent_2_slot(K_MASKE_INV);
 			invent_2_slot(K_FLEISCH_INV);
 			invent_2_slot(K_KERNE_INV);
@@ -2232,8 +2232,8 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case BRIEF_INV:
 		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_USE;
+		cursor_wahl(_G(menu_item));
 		_G(spieler).R42BriefMarke = true;
 		ret = del_invent_slot(BRIEF_INV);
 		_G(spieler).InventSlot[ret] = BRIEF2_INV;
@@ -2242,8 +2242,8 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case FLASCHE_INV:
 		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_USE;
+		cursor_wahl(_G(menu_item));
 		// fall through
 
 	case WOLLE_INV:
@@ -2255,8 +2255,8 @@ void calc_inv_use_txt(int16 test_nr) {
 	case B_MARY_INV:
 	case PIRANHA_INV:
 		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
-		cursor_wahl(menu_item);
+		_G(menu_item) = CUR_USE;
+		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = B_MARY2_INV;
 		obj->change_inventar(test_nr, B_MARY2_INV, &room_blk);
@@ -2280,7 +2280,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case 102:
 	case 104:
 		del_inventar(_G(spieler).AkInvent);
-		menu_item = CUR_USE;
+		_G(menu_item) = CUR_USE;
 		cursor_wahl(CUR_USE);
 
 		ret = del_invent_slot(test_nr);
@@ -2291,7 +2291,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case 105:
 		del_inventar(_G(spieler).AkInvent);
 		atds->set_ats_str(105, 0, 1, 6);
-		menu_item = CUR_USE;
+		_G(menu_item) = CUR_USE;
 		cursor_wahl(CUR_USE);
 		break;
 
@@ -2417,28 +2417,28 @@ int16 calc_person_txt(int16 p_nr) {
 		break;
 
 	case P_HOWARD:
-		switch (menu_item) {
+		switch (_G(menu_item)) {
 		case CUR_USE:
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 40:
 				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != CHEWY_ROCKER) {
-					menu_item = CUR_HOWARD;
-					cursor_wahl(menu_item);
+					_G(menu_item) = CUR_HOWARD;
+					cursor_wahl(_G(menu_item));
 					txt_nr = 30000;
 				}
 				break;
 
 			case 67:
 			case 71:
-				menu_item = CUR_HOWARD;
-				cursor_wahl(menu_item);
+				_G(menu_item) = CUR_HOWARD;
+				cursor_wahl(_G(menu_item));
 				txt_nr = 30000;
 				break;
 
 			case 42:
 				if (!_G(spieler).R42MarkeOk && !_G(spieler).R42HoToBeamter) {
-					menu_item = CUR_HOWARD;
-					cursor_wahl(menu_item);
+					_G(menu_item) = CUR_HOWARD;
+					cursor_wahl(_G(menu_item));
 					txt_nr = 30000;
 				}
 				break;
@@ -2457,12 +2457,12 @@ int16 calc_person_txt(int16 p_nr) {
 		break;
 
 	case P_NICHELLE:
-		if (menu_item == CUR_USE) {
+		if (_G(menu_item) == CUR_USE) {
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 67:
 			case 71:
-				menu_item = CUR_NICHELLE;
-				cursor_wahl(menu_item);
+				_G(menu_item) = CUR_NICHELLE;
+				cursor_wahl(_G(menu_item));
 				txt_nr = 30000;
 				break;
 


Commit: 096b125379497db2bbc3493a077621ca1a368fb9
    https://github.com/scummvm/scummvm/commit/096b125379497db2bbc3493a077621ca1a368fb9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:30-08:00

Commit Message:
CHEWY: Move SetupScreenFunc to Globals, remove unused life globals

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index d36cf30ca21..78ffd19a6e0 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -61,7 +61,7 @@ void MainMenu::execute() {
 	while (!done && !SHOULD_QUIT) {
 		_G(sndPlayer)->stopMod();
 		_G(sndPlayer)->endSound();
-		SetUpScreenFunc = screenFunc;
+		_G(SetUpScreenFunc) = screenFunc;
 
 		cursor_wahl(CUR_ZEIGE);
 		_selection = -1;
@@ -155,8 +155,8 @@ void MainMenu::animate() {
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
-	if (SetUpScreenFunc && !_G(menu_display) && !flags.InventMenu) {
-		SetUpScreenFunc();
+	if (_G(SetUpScreenFunc) && !_G(menu_display) && !flags.InventMenu) {
+		_G(SetUpScreenFunc)();
 		_G(out)->setze_zeiger(_G(workptr));
 	}
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index d5c354fd0c9..d99d2e57dbc 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -66,14 +66,6 @@ Globals::~Globals() {
 	g_globals = nullptr;
 }
 
-bool life_flag;
-int16 life_x;
-int16 life_y;
-int16 life_anz;
-char *life_str;
-int16 life_handler;
-
-void (*SetUpScreenFunc)();
 
 SprInfo spr_info[MAX_PROG_ANI];
 maus_info minfo;
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c6e531712f5..400d79d0bdc 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -128,6 +128,7 @@ public:
 	byte *_screen0 = nullptr;
 	int16 _scr_width = 0;
 	BlendMode _fx_blend = BLEND_NONE;
+	void (*_SetUpScreenFunc)() = nullptr;
 
 	byte *_font6x8 = nullptr;
 	byte *_font8x8 = nullptr;
@@ -234,13 +235,6 @@ extern int16 talk_hide_static;
 
 extern int16 ak_invent;
 
-extern bool life_flag;
-extern int16 life_x;
-extern int16 life_y;
-extern int16 life_anz;
-extern char *life_str;
-extern int16 life_handler;
-
 extern SprInfo spr_info[MAX_PROG_ANI];
 extern maus_info minfo;
 extern kb_info kbinfo;
@@ -378,8 +372,6 @@ int16 is_mouse_person(int16 x, int16 y);
 
 void calc_mouse_person(int16 x, int16 y);
 
-extern void (*SetUpScreenFunc)(void);
-
 void hide_person();
 
 void show_person();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 9d9954edd72..4e4856e81b1 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -115,7 +115,6 @@ void var_init() {
 	Sdi = &Rdi->Sinfo[0];
 	Adi = &Rdi->Ainfo[0];
 
-	life_handler = false;
 	_G(auto_p_nr) = 0;
 	_G(menu_item) = CUR_WALK;
 	_G(inventar_nr) = 0;
@@ -169,7 +168,7 @@ void var_init() {
 	_G(spieler).FramesPerSecond = 7;
 	_G(spieler).DisplayText = true;
 	CurrentSong = -1;
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	_G(pfeil_delay) = 0;
 	_G(pfeil_ani) = 0;
 	timer_action_ctr = 0;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index aba9480dda2..e1171c0a0a4 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -544,8 +544,8 @@ void set_up_screen(SetupScreenMode mode) {
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
 
-	if (SetUpScreenFunc && _G(menu_display) == 0 && !flags.InventMenu) {
-		SetUpScreenFunc();
+	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !flags.InventMenu) {
+		_G(SetUpScreenFunc)();
 		_G(out)->setze_zeiger(_G(workptr));
 	}
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index b45958aae37..3f32ce8bdc6 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -327,7 +327,7 @@ void enter_room(int16 eib_nr) {
 
 	uhr->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	HowardMov = 0;
 	_G(cur_hide_flag) = false;
 
@@ -492,7 +492,7 @@ void exit_room(int16 eib_nr) {
 		if (eib_nr == 47)
 			_G(spieler).R17Location = 1;
 		flags.NoEndPosMovObj = false;
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		load_chewy_taf(CHEWY_NORMAL);
 
 		break;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index f2d61552633..bb2bfd83a0e 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -70,7 +70,7 @@ void Room21::entry() {
 	init_spinne();
 	_G(timer_nr)[2] = room->set_timer(255, 1);
 	flags.NoEndPosMovObj = true;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 bool Room21::timer(int16 t_nr, int16 ani_nr) {
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index edfdcc51785..0b5dbe41dcb 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -49,7 +49,7 @@ void Room28::entry(int16 eib_nr) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 		hide_cur();
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).R40Wettbewerb) {
 			_G(spieler).scrollx = 320;
@@ -146,7 +146,7 @@ void Room28::xit(int16 eib_nr) {
 	hide_cur();
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		if (!_G(spieler).R28ExitTown) {
 			start_aad_wait(178, -1);
 			_G(spieler).R28ExitTown = true;
@@ -167,7 +167,7 @@ void Room28::gedAction(int index) {
 
 void Room28::haendler() {
 	hide_cur();
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
 	atds->set_ats_str(209, 1, ATS_DATEI);
@@ -190,7 +190,7 @@ void Room28::haendler() {
 	det->del_static_ani(3);
 	det->set_static_ani(4, -1);
 	start_aad_wait(198, -1);
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	auto_move(4, P_CHEWY);
 	hide_cur();
 	auto_move(3, P_CHEWY);
@@ -275,11 +275,11 @@ void Room28::set_pump() {
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
 				stop_person(P_HOWARD);
-				SetUpScreenFunc = nullptr;
+				_G(SetUpScreenFunc) = nullptr;
 				g_engine->_sound->waitForSpeechToFinish();
 
 				start_aad_wait(177, -1);
-				SetUpScreenFunc = setup_func;
+				_G(SetUpScreenFunc) = setup_func;
 				++_G(spieler).R28PumpTxt;
 			}
 
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index caec2a85513..881fe6e4dd2 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -41,7 +41,7 @@ void Room37::entry() {
 	_G(zoom_horizont) = 100;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	obj->show_sib(74);
 	obj->show_sib(75);
 
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index d103ac41d8e..194b9bb432c 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -89,7 +89,7 @@ void Room40::entry(int16 eib_nr) {
 		}
 	}
 
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	if (_G(spieler).R40TrainMove)
 		move_train(0);
 }
@@ -100,7 +100,7 @@ void Room40::xit(int16 eib_nr) {
 	_G(spieler).R40PoliceAb = false;
 	_G(spieler).R40HoUse = false;
 	stop_spz();
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
 		if (eib_nr == 70 || eib_nr == 77) {
@@ -484,7 +484,7 @@ int16 Room40::use_haendler() {
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
 				switch_room(28);
-				SetUpScreenFunc = setup_func;
+				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
 				auto_move(11, P_HOWARD);
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 1dd321e3c9f..05f95c8b98b 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -66,7 +66,7 @@ void Room41::entry() {
 	if (!flags.LoadGame)
 		set_person_pos(241, 113, P_HOWARD, P_RIGHT);
 
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	show_cur();
 }
 
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 76be36ded2d..78048ec4128 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -37,7 +37,7 @@ void Room42::entry() {
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 
 		if (!flags.LoadGame) {
 			det->stop_detail(0);
@@ -46,7 +46,7 @@ void Room42::entry() {
 			_G(spieler).R42BeamterWach = true;
 			g_engine->_sound->stopSound(0);
 
-			SetUpScreenFunc = setup_func;
+			_G(SetUpScreenFunc) = setup_func;
 
 			set_person_pos(80, 43, P_HOWARD, P_LEFT);
 			atds->set_ats_str(263, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 7e77be70fc7..9ccbb3093ad 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room45::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(r45_delay) = 0;
 	_G(zoom_horizont) = 150;
 	flags.ZoomMov = true;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index cfb14526321..db5757c4ec8 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -32,7 +32,7 @@ namespace Rooms {
 void Room46::entry(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 
 		if (eib_nr == 79) {
 			set_person_pos(140, 90, P_HOWARD, P_LEFT);
@@ -43,7 +43,7 @@ void Room46::entry(int16 eib_nr) {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
 		spieler_mi[P_HOWARD].Mode = true;
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).flags33_8) {
 			_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 43289b6d11b..07ca19a34d0 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 void Room47::entry() {
 	hide_person();
 	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
-	SetUpScreenFunc = set_detail;
+	_G(SetUpScreenFunc) = set_detail;
 	flags.MainInput = false;
 }
 
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index b4cab146fa3..c0366728c4e 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -35,7 +35,7 @@ void Room48::entry() {
 	_G(spieler).scrolly = 0;
 	show_cur();
 	calc_pic();
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(timer_nr)[0] = room->set_timer(255, 20);
 }
 
@@ -129,7 +129,7 @@ void Room48::setup_func() {
 						}
 
 						if (r_nr != -1) {
-							SetUpScreenFunc = nullptr;
+							_G(SetUpScreenFunc) = nullptr;
 							det->hide_static_spr(1 + idx);
 							hide_cur();
 							room->set_timer_status(255, TIMER_STOP);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 628e5f66996..5961041b502 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -40,7 +40,7 @@ void Room49::entry(int16 eib_nr) {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 
 	if (!_G(spieler).R49BoyWeg) {
 		_G(timer_nr)[0] = room->set_timer(255, 2);
@@ -78,7 +78,7 @@ void Room49::xit(int16 eib_nr) {
 		if (eib_nr == 80) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		} else if (eib_nr == 81) {
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			start_aad_wait(268, -1);
 		}
 	}
@@ -124,9 +124,9 @@ void Room49::calc_boy() {
 		det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 		det->set_static_ani(2, -1);
 
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		start_aad_wait(262, -1);
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		auto_move(3, P_CHEWY);
 		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
@@ -140,7 +140,7 @@ void Room49::calc_boy() {
 		det->hide_static_spr(9);
 		start_detail_wait(4, 1, ANI_GO);
 
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		room->set_timer_status(255, TIMER_START);
 		show_cur();
@@ -172,7 +172,7 @@ void Room49::use_boy_cigar() {
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
 	talk_boy(263);
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	auto_move(5, P_CHEWY);
 
 	const int16 zoom = room->_roomInfo->ZoomFak;
@@ -199,7 +199,7 @@ void Room49::use_boy_cigar() {
 	inventory_2_cur(GUM_INV);
 	atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).R49BoyWeg = true;
 	show_cur();
 }
@@ -219,10 +219,10 @@ void Room49::talk_boy(int16 aad_nr) {
 
 		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		det->set_static_ani(2, -1);
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(aad_nr, -1);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		det->del_static_ani(2);
 		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		room->set_timer_status(255, TIMER_START);
@@ -231,10 +231,10 @@ void Room49::talk_boy(int16 aad_nr) {
 
 void Room49::look_hotel() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(261, -1);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 	}
 }
 
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 7e8f7b44f3f..c7738d06bf4 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -67,7 +67,7 @@ void Room50::entry(int16 eib_nr) {
 			det->show_static_spr(4);
 		}
 
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 			spieler_mi[P_HOWARD].Mode = true;
@@ -195,7 +195,7 @@ int16 Room50::use_gum() {
 		auto_move(3, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
 
 		set_person_spr(P_LEFT, P_HOWARD);
@@ -212,7 +212,7 @@ int16 Room50::use_gum() {
 		det->del_static_ani(5);
 		det->set_static_ani(10, -1);
 		start_aad_wait(277, -1);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		auto_move(3, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
 		det->del_static_ani(10);
@@ -269,7 +269,7 @@ void Room50::setup_func() {
 		}
 
 		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			HowardMov = 0;
 			auto_move(4, P_HOWARD);
 		} else {
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 6f03385282f..999e01ecbcb 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -59,7 +59,7 @@ void Room51::entry() {
 		_G(spieler).scrollx = 0;
 		set_person_pos(34, 120, P_HOWARD, P_RIGHT);
 		set_person_pos(234, 69, P_CHEWY, P_LEFT);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		det->show_static_spr(17);
 		_index = 0;
 		hide_cur();
@@ -94,7 +94,7 @@ void Room51::entry() {
 				show_cur();
 			}
 
-			SetUpScreenFunc = setup_func;
+			_G(SetUpScreenFunc) = setup_func;
 			spieler_mi[P_HOWARD].Mode = true;
 		}
 	}
@@ -196,7 +196,7 @@ void Room51::setup_func() {
 		}
 
 		if (HowardMov && flags.ExitMov) {
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			HowardMov = 0;
 			auto_move(9, P_HOWARD);
 		} else {
@@ -215,7 +215,7 @@ int16 Room51::use_door(int16 txt_nr) {
 		switch (txt_nr) {
 		case 329:
 			auto_move(8, P_CHEWY);
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			det->show_static_spr(0);
 
 			if (!_G(spieler).R51HotelRoom) {
@@ -225,7 +225,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
 				start_aad_wait(285, -1);
 				atds->set_ats_str(329, 1, ATS_DATEI);
-				SetUpScreenFunc = setup_func;
+				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
 				show_cur();
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 64d8a18577c..58acca9cd8f 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -30,7 +30,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room52::entry() {
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 
 	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg) {
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index cec9f69dce9..2aec3a5264f 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room54::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 106;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
@@ -237,7 +237,7 @@ int16 Room54::use_zelle() {
 			} else {
 				auto_move(5, P_CHEWY);
 				_G(spieler).R54HowardVorne = 1;
-				SetUpScreenFunc = nullptr;
+				_G(SetUpScreenFunc) = nullptr;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
 				flc->set_flic_user_function(cut_serv);
@@ -290,7 +290,7 @@ int16 Room54::use_azug() {
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				det->show_static_spr(12);
 				_G(spieler).R55Location = true;
-				SetUpScreenFunc = nullptr;
+				_G(SetUpScreenFunc) = nullptr;
 				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
 				g_engine->_sound->playSound(1, 0);
 				g_engine->_sound->playSound(1);
@@ -331,7 +331,7 @@ void Room54::aufzug_ab() {
 	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	det->show_static_spr(12);
 	g_engine->_sound->playSound(1, 0);
 	g_engine->_sound->playSound(1);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 68e1cba86f7..0111450fb26 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room55::entry() {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
@@ -217,7 +217,7 @@ int16 Room55::use_telefon() {
 
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
 				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
-				SetUpScreenFunc = nullptr;
+				_G(SetUpScreenFunc) = nullptr;
 				det->set_static_ani(18, -1);
 				start_aad_wait(334, -1);
 				start_aad_wait(335, -1);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index ee054c1e794..9fc6adaa34f 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -74,7 +74,7 @@ void Room56::entry() {
 			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(spieler).PersonHide[P_HOWARD] = false;
-			SetUpScreenFunc = setup_func;
+			_G(SetUpScreenFunc) = setup_func;
 			spieler_mi[P_CHEWY].Mode = true;
 			auto_move(1, P_CHEWY);
 			spieler_mi[P_CHEWY].Mode = false;
@@ -138,7 +138,7 @@ void Room56::entry() {
 					room->set_zoom(23);
 					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 					_G(spieler).ZoomXy[P_HOWARD][0] = 37;
-					SetUpScreenFunc = setup_func;
+					_G(SetUpScreenFunc) = setup_func;
 					spieler_mi[P_CHEWY].Mode = true;
 					auto_move(1, P_CHEWY);
 					spieler_mi[P_CHEWY].Mode = false;
@@ -149,7 +149,7 @@ void Room56::entry() {
 			}
 		}
 	}
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(zoom_horizont) = 114;
@@ -290,7 +290,7 @@ int16 Room56::use_kneipe() {
 			if (_G(spieler).R56Kneipe) {
 				start_aad_wait(344, -1);
 			} else {
-				SetUpScreenFunc = nullptr;
+				_G(SetUpScreenFunc) = nullptr;
 				auto_move(4, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				go_auto_xy(160, 58, P_HOWARD, ANI_VOR);
@@ -316,7 +316,7 @@ int16 Room56::use_kneipe() {
 				_G(fx_blend) = BLEND3;
 				start_aad_wait(308, -1);
 
-				SetUpScreenFunc = setup_func;
+				_G(SetUpScreenFunc) = setup_func;
 				flags.NoScroll = false;
 				if (obj->check_inventar(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 45f614b2859..412192384ac 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -33,7 +33,7 @@ void Room57::entry() {
 	_G(zoom_horizont) = 180;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	spieler_mi[P_HOWARD].Mode = true;
@@ -90,7 +90,7 @@ int16 Room57::use_taxi() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
@@ -129,7 +129,7 @@ int16 Room57::use_pfoertner() {
 		start_aad_wait(340, -1);
 	} else if (is_cur_inventar(EINLAD_INV)) {
 		action_ret = true;
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
 		if (_G(spieler).R56AbfahrtOk) {
 			start_aad_wait(341, -1);
@@ -145,7 +145,7 @@ int16 Room57::use_pfoertner() {
 			start_aad_wait(349, -1);
 			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
 		}
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 	}
 	show_cur();
 	room->set_timer_status(1, TIMER_START);
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index 96650bb74d7..da0fb07f355 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room58::entry() {
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room58::xit() {
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 2a5d34719ff..5bff6254ed5 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room62::entry() {
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 	_G(spieler).R62LauraVerwandlung = 0;
 	_G(spieler).room_e_obj[91].Attribut = 255;
@@ -102,7 +102,7 @@ int16 Room62::use_laura() {
 		hide_cur();
 		auto_move(2, P_CHEWY);
 		auto_scroll(0, 0);
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		det->del_static_ani(8);
 		det->stop_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 579e1845b36..cec467d9e05 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -54,7 +54,7 @@ void Room63::entry() {
 		det->show_static_spr(12);
 	} else if (_G(spieler).R62LauraVerwandlung) {
 		atds->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
 		set_person_pos(424, 78, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 2b05d6c4fd5..51fd9826489 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room64::entry() {
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(r62Delay) = 0;
 	_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
 
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 3c2a50a30bc..79b28d3bbd2 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -50,7 +50,7 @@ void Room66::entry(int16 eib_nr) {
 		set_person_pos(623, 81, P_HOWARD, P_LEFT);
 		start_aad_wait(413, -1);
 		auto_move(9, P_CHEWY);
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		start_aad_wait(403, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(0, 1, ANI_VOR);
@@ -83,7 +83,7 @@ void Room66::entry(int16 eib_nr) {
 		}
 		
 	}
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room66::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 0ad6ad3c937..43fa7854bae 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room67::entry() {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).DiaAMov = 7;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 48eeefcca1c..6bff6adfbf6 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -44,7 +44,7 @@ static const AniBlock ABLOCK39[3] = {
 void Room68::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).DiaAMov = 1;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(r68HohesC) = -1;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
@@ -349,7 +349,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		if (_G(spieler).DisplayText == 0)
 			_G(sndPlayer)->fadeOut(5);
 		
-		SetUpScreenFunc = nullptr;
+		_G(SetUpScreenFunc) = nullptr;
 		del_inventar(_G(spieler).AkInvent);
 		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
 		_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index fd6c99a8e72..49ba9622b29 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -43,7 +43,7 @@ void Room69::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).DiaAMov = 2;
 	if (flags.LoadGame)
 		return;
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index a43076838a4..0355e93ca4f 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -42,7 +42,7 @@ void Room70::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 
 	if (flags.LoadGame)
 		return;
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index aeb42e3e62d..df8c846424d 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -47,7 +47,7 @@ void Room71::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 0;
 	_state = 0;
 	_delay = 0;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).DiaAMov = 4;
 	if (!_G(spieler).R71LeopardVined && !_G(spieler).flags28_4) {
 		_G(timer_nr)[0] = room->set_timer(0, 10);
@@ -195,10 +195,10 @@ int Room71::proc1() {
 void Room71::proc2() {
 	start_aad_wait(432, -1);
 	start_aad_wait(433, -1);
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	go_auto_xy(518, 35, P_HOWARD, ANI_GO);
 	go_auto_xy(568, 36, P_NICHELLE, ANI_WAIT);
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	flags.NoScroll = true;
 	auto_scroll(284, 0);
 	_G(spieler).PersonHide[P_CHEWY] = true;
@@ -227,9 +227,9 @@ void Room71::proc2() {
 
 void Room71::proc3() {
 	start_aad_wait(431, -1);
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	go_auto_xy(510, 34, P_NICHELLE, ANI_WAIT);
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	proc5(6);
@@ -239,9 +239,9 @@ void Room71::proc3() {
 
 void Room71::proc4() {
 	start_aad_wait(430, -1);
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	go_auto_xy(518, 35, P_HOWARD, ANI_WAIT);
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	proc5(4);
@@ -286,7 +286,7 @@ void Room71::proc7() {
 	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad_wait(429, -1);
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	set_person_spr(P_LEFT, P_CHEWY);
 	go_auto_xy(323, 28, P_NICHELLE, ANI_WAIT);
 	flags.NoScroll = true;
@@ -296,7 +296,7 @@ void Room71::proc7() {
 	start_aad_wait(624, -1);
 	det->stop_detail(7);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	flags.NoScroll = false;
 	start_aad_wait(432, -1);
 
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index c1333e545ee..9470290d82f 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -41,7 +41,7 @@ void Room73::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	if (_G(spieler).flags28_20)
 		det->show_static_spr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
 
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index a4953b9f563..c43819fc4b1 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -42,7 +42,7 @@ void Room74::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 
 	if (_G(spieler).flags29_1)
 		det->start_detail(0, 255, false);
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 17ef7fea748..7c5b5771b47 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -41,7 +41,7 @@ void Room75::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 
 	if (flags.LoadGame)
 		return;
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 8833d7bcf65..765e6dc81ef 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -38,7 +38,7 @@ void Room76::entry() {
 	g_engine->_sound->playSound(0);
 	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_state = 0;
 
 	set_person_pos(308, 84, P_NICHELLE, P_RIGHT);
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 9ba113276a0..51caed3cd72 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -52,7 +52,7 @@ void Room79::entry() {
 		show_cur();
 	}
 
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room79::xit() {
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index fcda26ab3e7..d3499edeb52 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -66,7 +66,7 @@ void Room80::entry() {
 	else
 		det->show_static_spr(4);
 
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room80::setup_func() {
@@ -114,7 +114,7 @@ void Room80::setup_func() {
 	if (nextRoom == -1)
 		return;
 
-	SetUpScreenFunc = nullptr;
+	_G(SetUpScreenFunc) = nullptr;
 	det->hide_static_spr(vec);
 	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 01528d078c6..7ba66868280 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -48,7 +48,7 @@ void Room82::entry() {
 		det->show_static_spr(7);
 
 	if (flags.LoadGame) {
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		return;
 	}
 
@@ -67,12 +67,12 @@ void Room82::entry() {
 	}
 
 	if (_G(spieler).flags30_8) {
-		SetUpScreenFunc = setup_func;
+		_G(SetUpScreenFunc) = setup_func;
 		proc4();
 	}
 
 	_G(maus_links_click) = false;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room82::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 0abfcac037c..169de08f0e0 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -72,7 +72,7 @@ void Room84::entry() {
 	}
 
 	if (flags.LoadGame) {
-		; // Nothing. It avoids a deeper level of if, and we need the SetUpScreenFunc at the end
+		; // Nothing. It avoids a deeper level of if, and we need the _G(SetUpScreenFunc) at the end
 	} else if (_G(spieler).flags30_1 || _G(spieler).flags31_8) {
 		set_person_pos(569, 135, P_CHEWY, P_LEFT);
 		set_person_pos(489, 113, P_HOWARD, P_RIGHT);
@@ -110,7 +110,7 @@ void Room84::entry() {
 		_G(spieler).scrollx = 156;
 	}
 	
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room84::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index db5d88dab71..77374c7736f 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -36,7 +36,7 @@ void Room85::entry(int16 eib_nr) {
 	g_engine->_sound->playSound(0, 1);
 	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 22;
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index b1e4001d9a5..1fcf6b4201b 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room86::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 67e3d59eeba..601ed98bbe0 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room87::entry() {
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_HOWARD].Mode = true;
 	spieler_mi[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 18;
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 521df623906..54b27d0d471 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -38,7 +38,7 @@ void Room88::entry() {
 	if (_G(spieler).r88DestRoom == 0)
 		_G(spieler).r88DestRoom = 82;
 
-	SetUpScreenFunc = calc_person_look;
+	_G(SetUpScreenFunc) = calc_person_look;
 
 	if (_G(spieler).flags32_10) {
 		det->start_detail(4, 255, false);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index aaacdeb9ccd..3d8fc3139b9 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -33,7 +33,7 @@ namespace Rooms {
 void Room89::entry() {
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(timer_nr)[0] = room->set_timer(2, 10);
 	if (_G(spieler).flags33_4) {
 		det->show_static_spr(5);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index b09a7e4a794..fd643a008d5 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -35,7 +35,7 @@ void Room90::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	spieler_mi[P_HOWARD].Mode = true;
 	_delay = 0;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 	_G(zoom_horizont) = 150;
 	flags.ZoomMov = true;
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 971a1876295..7d47f95532c 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -35,7 +35,7 @@ void Room91::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_click = 0;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	spieler_mi[P_HOWARD].Mode = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 8975b1ba8b8..372c8ed1227 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -35,7 +35,7 @@ void Room94::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 	_G(spieler).ScrollxStep = 2;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 34;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 48;
 	spieler_mi[P_HOWARD].Mode = true;
@@ -78,9 +78,9 @@ void Room94::entry() {
 			register_cutscene(32);
 
 			_G(fx_blend) = BLEND_NONE;
-			SetUpScreenFunc = nullptr;
+			_G(SetUpScreenFunc) = nullptr;
 			Room66::proc8(2, 3, 0, 551);
-			SetUpScreenFunc = setup_func;
+			_G(SetUpScreenFunc) = setup_func;
 			flags.NoScroll = false;
 		}
 	} else {
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 071099a2bb9..bc7b44e5119 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -32,7 +32,7 @@ namespace Rooms {
 void Room95::entry(int16 eib_nr) {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
-	SetUpScreenFunc = setup_func;	
+	_G(SetUpScreenFunc) = setup_func;	
 	_G(zoom_horizont) = 140;
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 5afef99a75f..75e52821daf 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -36,7 +36,7 @@ void Room96::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 50;
 	spieler_mi[P_HOWARD].Mode = true;
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	spieler_mi[P_CHEWY].Mode = true;
 
 	if (flags.LoadGame)
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index ab3aa04fbb7..4fb7ce06bc9 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -40,7 +40,7 @@ bool Room97::_bool18DB3A;
 void Room97::entry() {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
-	SetUpScreenFunc = setup_func;
+	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 0;
 
 	spieler_mi[P_HOWARD].Mode = true;


Commit: 546cb99e0bb866b29b697cb78a75289a5b94a8c6
    https://github.com/scummvm/scummvm/commit/546cb99e0bb866b29b697cb78a75289a5b94a8c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:30-08:00

Commit Message:
CHEWY: Move globals to Globals

Changed paths:
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 579261dc67a..c1f02500d40 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -266,7 +266,7 @@ enter:
 				if (mode[LOAD]) {
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
-						CurrentSong = -1;
+						_G(currentSong) = -1;
 						_G(iog)->load(text_off + active_slot, ioptr.save_path);
 						key = Common::KEYCODE_ESCAPE;
 					}
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 78ffd19a6e0..b97bc46311e 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -39,8 +39,8 @@ int MainMenu::_personAni[3];
 void MainMenu::execute() {
 	// Convenience during testing to not keep showing title sequence
 	if (!ConfMan.getBool("skip_title")) {
-		_G(mem)->file->select_pool_item(music_handle, EndOfPool - 17);
-		_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
+		_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - 17);
+		_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)Ci.MusicSlot);
 		if (!_G(modul))
 			_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
 
@@ -69,7 +69,7 @@ void MainMenu::execute() {
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
 		room->load_room(&room_blk, 98, &_G(spieler));
 
-		CurrentSong = -1;
+		_G(currentSong) = -1;
 		load_room_music(98);
 		fx->border(_G(workpage), 100, 0, 0);
 
@@ -238,7 +238,7 @@ bool MainMenu::loadGame() {
 	_G(cur)->move(152, 92);
 	minfo.x = 152;
 	minfo.y = 92;
-	savegameFlag = true;
+	_G(savegameFlag) = true;
 	int result = Dialogs::Files::execute(false);
 
 	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index ec717d1df89..df58e222ab6 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -184,7 +184,7 @@ void Options::execute(taf_info *ti) {
 					_G(sndPlayer)->stopMod();
 				} else {
 					_G(spieler).MusicSwitch = true;
-					CurrentSong = -1;
+					_G(currentSong) = -1;
 					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 				}
 				break;
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index d99d2e57dbc..e04b7efb67e 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -114,8 +114,6 @@ Atdsys *atds;
 Flic *flc;
 MovClass *mov;
 
-char backged[] = { EPISODE1_GEP };
-
 AutoMov auto_mov[MAX_AUTO_MOV];
 
 int16 HowardMov;
@@ -137,27 +135,4 @@ int16 PersonAni[MAX_PERSON];
 taf_seq_info *PersonTaf[MAX_PERSON];
 uint8 PersonSpr[MAX_PERSON][8];
 
-int16 talk_start_ani = -1;
-int16 talk_hide_static = -1;
-
-SplitStringInit ssi[AAD_MAX_PERSON] = {
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-};
-
-int16 frequenz;
-int16 CurrentSong = -1;
-bool savegameFlag;
-Stream *music_handle;
-int16 EndOfPool;
-int timer_action_ctr;
-
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 400d79d0bdc..47051883290 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -166,6 +166,28 @@ public:
 	int16 _person_tmp_hide[MAX_PERSON] = { 0 };
 	int16 _person_tmp_room[MAX_PERSON] = { 0 };
 
+	SplitStringInit _ssi[AAD_MAX_PERSON] = {
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
+	};
+
+	int16 _talk_start_ani = -1;
+	int16 _talk_hide_static = -1;
+	int16 _frequenz = 0;
+	int16 _currentSong = -1;
+	bool _savegameFlag = false;
+	Stream *_music_handle = nullptr;
+	int16 _EndOfPool = 0;
+	int _timer_action_ctr = 0;
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -228,11 +250,6 @@ extern Globals *g_globals;
 extern char *invent_txt;
 extern char *invent_name;
 
-extern SplitStringInit ssi[AAD_MAX_PERSON];
-extern int16 talk_start_ani;
-
-extern int16 talk_hide_static;
-
 extern int16 ak_invent;
 
 extern SprInfo spr_info[MAX_PROG_ANI];
@@ -282,7 +299,6 @@ extern Atdsys *atds;
 extern Flic *flc;
 extern MovClass *mov;
 
-extern char backged[];
 extern AutoMov auto_mov[MAX_AUTO_MOV];
 extern int16 HowardMov;
 extern int16 AkChewyTaf;
@@ -302,13 +318,6 @@ extern int16 spz_delay[MAX_PERSON];
 extern int16 spz_p_nr;
 extern int16 spz_ani[MAX_PERSON];
 
-extern int16 frequenz;
-extern Stream *music_handle;
-extern int16 EndOfPool;
-extern int16 CurrentSong;
-extern bool savegameFlag;
-extern int timer_action_ctr;
-
 void cursor_wahl(int16 nr);
 
 void hide_cur();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 4e4856e81b1..69e4ddc2f78 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -167,13 +167,13 @@ void var_init() {
 	init_atds();
 	_G(spieler).FramesPerSecond = 7;
 	_G(spieler).DisplayText = true;
-	CurrentSong = -1;
+	_G(currentSong) = -1;
 	_G(SetUpScreenFunc) = nullptr;
 	_G(pfeil_delay) = 0;
 	_G(pfeil_ani) = 0;
-	timer_action_ctr = 0;
+	_G(timer_action_ctr) = 0;
 	flags.CursorStatus = true;
-	savegameFlag = false;
+	_G(savegameFlag) = false;
 }
 
 void init_room() {
@@ -188,7 +188,7 @@ void init_room() {
 	room_blk.AtsLoad = true;
 	strcpy(room_blk.RoomDir, "room/");
 
-	room->open_handle(&backged[0], "rb", R_GEPDATEI);
+	room->open_handle(EPISODE1_GEP, "rb", R_GEPDATEI);
 }
 
 void init_atds() {
@@ -219,7 +219,7 @@ void init_atds() {
 	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
 	atds->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
-		atds->set_split_win(i, &ssi[i]);
+		atds->set_split_win(i, &_G(ssi)[i]);
 	atds->set_string_end_func(&atds_string_start);
 }
 
@@ -371,7 +371,7 @@ void set_speed() {
 void sound_init() {
 	_G(spieler).SoundSwitch = false;
 	_G(spieler).MusicSwitch = false;
-	frequenz = 22050;
+	_G(frequenz) = 22050;
 
 	_G(sndPlayer)->initMixMode();
 	_G(spieler).MusicVol = 63;
@@ -379,18 +379,18 @@ void sound_init() {
 	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 
-	music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+	_G(music_handle) = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(music_handle);
+	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(_G(music_handle));
 	assert(rs);
 
 	rs->seek(0);
-	EndOfPool = 0;
+	_G(EndOfPool) = 0;
 	NewPhead Nph;
 	if (!Nph.load(rs)) {
 		error("sound_init error");
 	} else {
-		EndOfPool = Nph.PoolAnz - 1;
+		_G(EndOfPool) = Nph.PoolAnz - 1;
 	}
 
 	atds->setHasSpeech(true);
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 381009afa2e..d425cb7bbc5 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -36,7 +36,7 @@ void load_room_music(int16 room_nr) {
 	int16 volume = _G(spieler).MusicVol;
 	const int16 lp_mode = 1;
 	const int16 play_mode = NORMAL_PLAY;
-	if (_G(spieler).MusicSwitch && (music_handle)) {
+	if (_G(spieler).MusicSwitch && (_G(music_handle))) {
 		switch (room_nr) {
 		case 0:
 			ttp_index = 0;
@@ -176,7 +176,7 @@ void load_room_music(int16 room_nr) {
 
 		default:
 			ttp_index = -1;
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			_G(sndPlayer)->stopMod();
 			break;
 		}
@@ -187,13 +187,13 @@ void load_room_music(int16 room_nr) {
 				volume = _G(spieler).MusicVol;
 			_G(sndPlayer)->setMusicMasterVol(volume);
 			_G(sndPlayer)->setLoopMode(lp_mode);
-			if (ttp_index != CurrentSong) {
+			if (ttp_index != _G(currentSong)) {
 				_G(sndPlayer)->stopMod();
 				while (_G(sndPlayer)->musicPlaying());
 				memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
-				_G(mem)->file->select_pool_item(music_handle, EndOfPool - ttp_index);
-				_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
-				CurrentSong = ttp_index;
+				_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - ttp_index);
+				_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)Ci.MusicSlot);
+				_G(currentSong) = ttp_index;
 				if (!_G(modul)) {
 					if (play_mode == NORMAL_PLAY)
 						_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 8b9856e5966..27e770b1856 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -315,10 +315,10 @@ void ads_menu() {
 					_G(ads_item_ptr) = atds->ads_item_ptr(_G(ads_blk_nr),
 					                                  &_G(ads_item_anz));
 				}
-				det->stop_detail(talk_start_ani);
-				det->show_static_spr(talk_hide_static);
-				talk_start_ani = -1;
-				talk_hide_static = -1;
+				det->stop_detail(_G(talk_start_ani));
+				det->show_static_spr(_G(talk_hide_static));
+				_G(talk_start_ani) = -1;
+				_G(talk_hide_static) = -1;
 				if (flags.AdsDialog == false) {
 					atds->save_ads_header(_G(ads_dia_nr));
 				}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 3f32ce8bdc6..9566a19a5c4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -935,7 +935,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_001:
 		case 1000:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			g_engine->playVideo(nr);
 			break;
 
@@ -951,7 +951,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_019_10:
 		case FCUT_019_11:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			nr = FCUT_019_01;
 			_G(sndPlayer)->setLoopMode(1);
 
@@ -985,7 +985,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_034:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 
 			do {
 #ifndef NEW_VIDEO_CODE
@@ -1045,17 +1045,17 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_065:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			load_room_music(256);
 			_G(sndPlayer)->setLoopMode(1);
 			Room46::kloppe();
 			_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			break;
 
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			g_engine->playVideo(FCUT_071);
 			break;
 
@@ -1212,7 +1212,7 @@ void flic_cut(int16 nr, int16 mode) {
 				print_rows(594);
 				if (FLIC_CUT_1045[i] == 53) {
 					_G(sndPlayer)->stopMod();
-					CurrentSong = -1;
+					_G(currentSong) = -1;
 					load_room_music(256);
 				}
 
@@ -1308,7 +1308,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1058:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			load_room_music(255);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 58);
@@ -1355,7 +1355,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1065:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
@@ -1548,7 +1548,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1110:
 			_G(sndPlayer)->stopMod();
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			load_room_music(257);
 			_G(sndPlayer)->setMusicMasterVol(20);
 #ifndef NEW_VIDEO_CODE
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index bbcf1b4221e..3289a1ecca6 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -76,12 +76,12 @@ void Room0::entry() {
 bool Room0::timer(int16 t_nr, int16 ani_nr) {
 	switch (ani_nr) {
 	case 1:
-		if (timer_action_ctr > 0) {
+		if (_G(timer_action_ctr) > 0) {
 			uhr->reset_timer(t_nr, 0);
-			--timer_action_ctr;
+			--_G(timer_action_ctr);
 		} else if (!is_chewy_busy()) {
 			if (!_G(spieler).R0FueterLab)
-				timer_action_ctr = 2;
+				_G(timer_action_ctr) = 2;
 
 			flags.AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 62067113437..49ff27da600 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -341,8 +341,8 @@ void Room3::probeTransfer() {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
 					if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 						if (is_cur_inventar(SPINAT_INV)) {
-							ssi[0].X = 120;
-							ssi[0].Y = 100;
+							_G(ssi)[0].X = 120;
+							_G(ssi)[0].Y = 100;
 							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
 
 								start_aad(50);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 74553f54c3e..aeedd8d4178 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -180,7 +180,7 @@ void Room12::bork_ok() {
 	wait_auto_obj(R12_BORK_OBJ);
 	det->hide_static_spr(10);
 	start_detail_wait(4, 1, ANI_VOR);
-	talk_hide_static = -1;
+	_G(talk_hide_static) = -1;
 	det->show_static_spr(12);
 	atds->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
 	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 43fa7854bae..3a4bc321793 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -145,9 +145,9 @@ int16 Room67::talk_papagei() {
 		if (_G(menu_item) == CUR_HOWARD) {
 			show_cur();
 
-			ssi[2].X = 270 - _G(spieler).scrollx;
-			ssi[2].Y = 10;
-			atds->set_split_win(2, &ssi[2]);
+			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
+			_G(ssi)[2].Y = 10;
+			atds->set_split_win(2, &_G(ssi)[2]);
 			start_ads_wait(19);
 			room->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_NICHELLE) {
@@ -157,9 +157,9 @@ int16 Room67::talk_papagei() {
 			auto_move(5, P_CHEWY);
 			show_cur();
 
-			ssi[2].X = 270 - _G(spieler).scrollx;
-			ssi[2].Y = 10;
-			atds->set_split_win(2, &ssi[2]);
+			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
+			_G(ssi)[2].Y = 10;
+			atds->set_split_win(2, &_G(ssi)[2]);
 			start_ads_wait(18);
 			room->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_USE) {
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 6bff6adfbf6..942a15b094c 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -226,9 +226,9 @@ void Room68::talk_keeper() {
 	start_detail_wait(15, 1, ANI_VOR);
 	det->set_static_ani(16, -1);
 	show_cur();
-	ssi[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
-	ssi[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
-	atds->set_split_win(3, &ssi[3]);
+	_G(ssi)[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
+	_G(ssi)[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
+	atds->set_split_win(3, &_G(ssi)[3]);
 	start_ads_wait(20);
 	_G(cur_hide_flag) = false;
 	hide_cur();
@@ -416,7 +416,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
 
 		if (_G(spieler).DisplayText) {
-			CurrentSong = -1;
+			_G(currentSong) = -1;
 			load_room_music(_G(spieler).PersonRoomNr[0]);
 		}
 	}
@@ -428,9 +428,9 @@ void Room68::talk_papagei() {
 	auto_move(5, P_CHEWY);
 	show_cur();
 
-	ssi[2].X = 60;
-	ssi[2].Y = 80;
-	atds->set_split_win(2, &ssi[2]);
+	_G(ssi)[2].X = 60;
+	_G(ssi)[2].Y = 80;
+	atds->set_split_win(2, &_G(ssi)[2]);
 	start_ads_wait(18);
 }
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index f048b9f6200..ce49346c9a3 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -338,8 +338,8 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	if (p_nr >= P_NICHELLE) {
 		++tmp_nr;
 	}
-	ssi[tmp_nr].X = spieler_vector[p_nr].Xypos[0] - _G(spieler).scrollx + spieler_mi[p_nr].HotX;
-	ssi[tmp_nr].Y = spieler_vector[p_nr].Xypos[1] - _G(spieler).scrolly;
+	_G(ssi)[tmp_nr].X = spieler_vector[p_nr].Xypos[0] - _G(spieler).scrollx + spieler_mi[p_nr].HotX;
+	_G(ssi)[tmp_nr].Y = spieler_vector[p_nr].Xypos[1] - _G(spieler).scrolly;
 	if (!flags.ExitMov) {
 		if (p_nr == P_CHEWY) {
 			u_index = ged->ged_idx(x + spieler_mi[p_nr].HotX, y + spieler_mi[p_nr].HotY,
@@ -474,8 +474,8 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	talk_start_ani = -1;
-	talk_hide_static = -1;
+	_G(talk_start_ani) = -1;
+	_G(talk_hide_static) = -1;
 	set_ssi_xy();
 	atds->start_aad(dia_nr);
 	while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
@@ -556,9 +556,9 @@ void aad_wait(int16 str_nr) {
 void start_aad(int16 dia_nr, int16 ssi_nr) {
 	switch (ssi_nr) {
 	case 0:
-		ssi[0].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
-		ssi[0].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
-		atds->set_split_win(0, &ssi[0]);
+		_G(ssi)[0].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
+		_G(ssi)[0].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
+		atds->set_split_win(0, &_G(ssi)[0]);
 		break;
 
 	default:
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 5af9972ee16..01a7000a102 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -45,8 +45,8 @@ int16 load_ads_dia(int16 dia_nr) {
 
 			set_ssi_xy();
 			_G(ads_dia_nr) = dia_nr;
-			talk_start_ani = -1;
-			talk_hide_static = -1;
+			_G(talk_start_ani) = -1;
+			_G(talk_hide_static) = -1;
 		}
 	}
 	return ret;
@@ -58,9 +58,9 @@ void set_ssi_xy() {
 	for (int16 i = 0; i < MAX_PERSON; i++) {
 		if (i >= P_NICHELLE)
 			tmp = 1;
-		ssi[i + tmp].X = spieler_vector[i].Xypos[0] - _G(spieler).scrollx + spieler_mi[i].HotX;
-		ssi[i + tmp].Y = spieler_vector[i].Xypos[1] - _G(spieler).scrolly;
-		atds->set_split_win(i + tmp, &ssi[i + tmp]);
+		_G(ssi)[i + tmp].X = spieler_vector[i].Xypos[0] - _G(spieler).scrollx + spieler_mi[i].HotX;
+		_G(ssi)[i + tmp].Y = spieler_vector[i].Xypos[1] - _G(spieler).scrolly;
+		atds->set_split_win(i + tmp, &_G(ssi)[i + tmp]);
 	}
 }
 
@@ -1407,13 +1407,13 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		switch (person_nr) {
 		case 1:
 			if (mode == AAD_STR_START) {
-				talk_start_ani = 9;
-				talk_hide_static = 8;
+				_G(talk_start_ani) = 9;
+				_G(talk_hide_static) = 8;
 			} else {
 				talk_stop_ani = 9;
 				talk_show_static = 8;
-				talk_start_ani = -1;
-				talk_hide_static = -1;
+				_G(talk_start_ani) = -1;
+				_G(talk_hide_static) = -1;
 			}
 			break;
 
@@ -1425,15 +1425,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		switch (person_nr) {
 		case 0:
 			talk_stop_ani = 9;
-			talk_start_ani = 10;
+			_G(talk_start_ani) = 10;
 			talk_show_static = 13;
-			talk_hide_static = 12;
+			_G(talk_hide_static) = 12;
 			break;
 
 		case 1:
-			talk_start_ani = 9;
+			_G(talk_start_ani) = 9;
 			talk_stop_ani = 10;
-			talk_hide_static = 13;
+			_G(talk_hide_static) = 13;
 			talk_show_static = 12;
 			break;
 
@@ -1454,13 +1454,13 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 		case 1:
 			if (mode == AAD_STR_START) {
-				talk_start_ani = 4;
-				talk_hide_static = 9;
+				_G(talk_start_ani) = 4;
+				_G(talk_hide_static) = 9;
 			} else {
 				talk_stop_ani = 4;
 				talk_show_static = 9;
-				talk_start_ani = -1;
-				talk_hide_static = -1;
+				_G(talk_start_ani) = -1;
+				_G(talk_hide_static) = -1;
 			}
 			break;
 
@@ -2153,9 +2153,9 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	}
 
 	if (altes_format) {
-		det->start_detail(talk_start_ani, 255, ANI_VOR);
+		det->start_detail(_G(talk_start_ani), 255, ANI_VOR);
 		det->stop_detail(talk_stop_ani);
-		det->hide_static_spr(talk_hide_static);
+		det->hide_static_spr(_G(talk_hide_static));
 		det->show_static_spr(talk_show_static);
 	} else {
 		det->start_detail(talk_ani, 255, ANI_VOR);


Commit: d9c6188922fffb2fa8b311b5965c9adbeb8f9476
    https://github.com/scummvm/scummvm/commit/d9c6188922fffb2fa8b311b5965c9adbeb8f9476
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:30-08:00

Commit Message:
CHEWY: Move spz globals to Globals

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index b97bc46311e..f07df3a25fe 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -145,7 +145,7 @@ void MainMenu::animate() {
 	if (ani_timer->TimeFlag) {
 		uhr->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
-		spieler_vector->Delay = _G(spieler).DelaySpeed + spz_delay[0];
+		spieler_vector->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[0];
 		_G(FrameSpeed) = 0;
 		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
@@ -279,11 +279,11 @@ void MainMenu::playGame() {
 
 void MainMenu::savePersonAni() {
 	for (int i = 0; i < MAX_PERSON; ++i) {
-		_personAni[i] = PersonAni[i];
-		PersonAni[i] = -1;
+		_personAni[i] = _G(PersonAni)[i];
+		_G(PersonAni)[i] = -1;
 
-		delete PersonTaf[i];
-		PersonTaf[i] = nullptr;
+		delete _G(PersonTaf)[i];
+		_G(PersonTaf)[i] = nullptr;
 	}
 }
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index e04b7efb67e..39f7469aa63 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -114,25 +114,5 @@ Atdsys *atds;
 Flic *flc;
 MovClass *mov;
 
-AutoMov auto_mov[MAX_AUTO_MOV];
-
-int16 HowardMov;
-
-taf_seq_info *spz_tinfo;
-int16 SpzDelay;
-int16 spz_spr_nr[MAX_SPZ_PHASEN];
-int16 spz_start;
-int16 spz_akt_id;
-
-int16 spz_p_nr;
-int16 spz_delay[MAX_PERSON];
-int16 spz_count;
-int16 spz_ani[MAX_PERSON];
-
-int16 AkChewyTaf;
-
-int16 PersonAni[MAX_PERSON];
-taf_seq_info *PersonTaf[MAX_PERSON];
-uint8 PersonSpr[MAX_PERSON][8];
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 47051883290..1b57082575d 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -188,6 +188,25 @@ public:
 	int16 _EndOfPool = 0;
 	int _timer_action_ctr = 0;
 
+	AutoMov _auto_mov[MAX_AUTO_MOV];
+	int16 _HowardMov = 0;
+
+	taf_seq_info *_spz_tinfo = nullptr;
+	int16 _SpzDelay = 0;
+	int16 _spz_spr_nr[MAX_SPZ_PHASEN] = { 0 };
+	int16 _spz_start = 0;
+	int16 _spz_akt_id = 0;
+
+	int16 _spz_p_nr = 0;
+	int16 _spz_delay[MAX_PERSON] = { 0 };
+	int16 _spz_count = 0;
+	int16 _spz_ani[MAX_PERSON] = { 0 };
+
+	int16 _AkChewyTaf = 0;
+	int16 _PersonAni[MAX_PERSON] = { 0 };
+	taf_seq_info *_PersonTaf[MAX_PERSON] = { nullptr };
+	uint8 _PersonSpr[MAX_PERSON][8] = { 0 };
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -299,24 +318,6 @@ extern Atdsys *atds;
 extern Flic *flc;
 extern MovClass *mov;
 
-extern AutoMov auto_mov[MAX_AUTO_MOV];
-extern int16 HowardMov;
-extern int16 AkChewyTaf;
-
-extern int16 PersonAni[MAX_PERSON];
-extern taf_seq_info *PersonTaf[MAX_PERSON];
-extern uint8 PersonSpr[MAX_PERSON][8];
-
-extern int16 SpzDelay;
-extern taf_seq_info *spz_tinfo;
-extern int16 spz_spr_nr[MAX_SPZ_PHASEN];
-extern int16 spz_start;
-extern int16 spz_akt_id;
-
-extern int16 spz_count;
-extern int16 spz_delay[MAX_PERSON];
-extern int16 spz_p_nr;
-extern int16 spz_ani[MAX_PERSON];
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 69e4ddc2f78..5192bf2ab88 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -151,12 +151,12 @@ void var_init() {
 	spieler_mi[P_NICHELLE].Mode = true;
 
 	for (int16 i = 0; i < MAX_PERSON; i++) {
-		PersonAni[i] = -1;
-		PersonTaf[i] = 0;
+		_G(PersonAni)[i] = -1;
+		_G(PersonTaf)[i] = 0;
 		spieler_mi[i].Mode = false;
 
 		ani_stand_flag[i] = false;
-		spz_delay[i] = 0;
+		_G(spz_delay)[i] = 0;
 		_G(spieler).PersonRoomNr[i] = -1;
 		_G(spieler).PersonDia[i] = -1;
 	}
@@ -275,7 +275,7 @@ void new_game() {
 	for (int16 i = 0; i < obj->spieler_invnr[0]; i++)
 		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
 
-	AkChewyTaf = 0;
+	_G(AkChewyTaf) = 0;
 	load_chewy_taf(CHEWY_NORMAL);
 }
 
@@ -304,11 +304,11 @@ static void font_load() {
 }
 
 void init_load() {
-	AkChewyTaf = 0;
+	_G(AkChewyTaf) = 0;
 	load_chewy_taf(CHEWY_NORMAL);
 
-	spz_akt_id = -1;
-	spz_tinfo = nullptr;
+	_G(spz_akt_id) = -1;
+	_G(spz_tinfo) = nullptr;
 	set_spz_delay(3);
 
 	menutaf = _G(mem)->taf_adr(MENUTAF);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e1171c0a0a4..17361786b71 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -81,8 +81,8 @@ void alloc_buffers() {
 void free_buffers() {
 	det->del_dptr();
 	for (int16 i = 0; i < MAX_PERSON; i++)
-		free((char *)PersonTaf[i]);
-	free((char *)spz_tinfo);
+		free((char *)_G(PersonTaf)[i]);
+	free((char *)_G(spz_tinfo));
 	free(_G(font6x8));
 	free(_G(font8x8));
 	free(_G(spblende));
@@ -533,7 +533,7 @@ void set_up_screen(SetupScreenMode mode) {
 	if (ani_timer[0].TimeFlag) {
 		uhr->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
-		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + spz_delay[P_CHEWY];
+		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[P_CHEWY];
 		_G(FrameSpeed) = 0;
 		det->set_global_delay(_G(spieler).DelaySpeed);
 	}
@@ -1523,7 +1523,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 				check = false;
 			else {
 				check = true;;
-				if (!spz_ani[i]) {
+				if (!_G(spz_ani)[i]) {
 					switch (i) {
 					case P_CHEWY:
 						xy = (int16
@@ -1535,12 +1535,12 @@ int16 is_mouse_person(int16 x, int16 y) {
 						if (_G(spieler).PersonRoomNr[i] !=
 						        _G(spieler).PersonRoomNr[P_CHEWY])
 							check = false;
-						xy = (int16 *)PersonTaf[i]->image[PersonSpr[i][spieler_vector[i].PhNr]];
+						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][spieler_vector[i].PhNr]];
 						break;
 
 					}
 				} else
-					xy = (int16 *)spz_tinfo->image[spz_spr_nr[spieler_vector[i].PhNr]];
+					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[spieler_vector[i].PhNr]];
 				if (check) {
 					if (x + _G(spieler).scrollx >= spieler_vector[i].Xypos[0] &&
 					        x + _G(spieler).scrollx <= spieler_vector[i].Xypos[0] + xy[0] + spieler_vector[i].Xzoom &&
@@ -2032,7 +2032,7 @@ int16 is_chewy_busy() {
 				if (!mov->auto_go_status()) {
 					if (!spieler_vector[P_CHEWY].Count) {
 						if (!flags.ExitMov) {
-							if (!spz_ani[P_CHEWY]) {
+							if (!_G(spz_ani)[P_CHEWY]) {
 								ret = false;
 							}
 						}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 9566a19a5c4..84d5d66f0ac 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -153,7 +153,7 @@ void check_ged_action(int16 index) {
 		case 45:
 		case 46:
 			if (!index && flags.ExitMov)
-				HowardMov = 1;
+				_G(HowardMov) = 1;
 			break;
 
 		GED_ACTION(49);
@@ -328,7 +328,7 @@ void enter_room(int16 eib_nr) {
 	uhr->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
 	_G(SetUpScreenFunc) = nullptr;
-	HowardMov = 0;
+	_G(HowardMov) = 0;
 	_G(cur_hide_flag) = false;
 
 #define ENTRY(NUM) case NUM: Room##NUM::entry(); break
@@ -672,20 +672,20 @@ void exit_room(int16 eib_nr) {
 	case 84:
 		x = spieler_vector[P_CHEWY].Xypos[0] - 70;
 		y = spieler_vector[P_CHEWY].Xypos[1] - 50;
-		HowardMov = 1;
+		_G(HowardMov) = 1;
 		break;
 
 	case 85:
 		x = spieler_vector[P_CHEWY].Xypos[0] + 70;
 		y = spieler_vector[P_CHEWY].Xypos[1];
-		HowardMov = 1;
+		_G(HowardMov) = 1;
 		break;
 
 	case 86:
 		det->show_static_spr(0);
 		x = spieler_vector[P_CHEWY].Xypos[0] - 44;
 		y = spieler_vector[P_CHEWY].Xypos[1];
-		HowardMov = 2;
+		_G(HowardMov) = 2;
 		break;
 
 	case 90:
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index a4d1e5743e3..f860e1c60ee 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -501,7 +501,7 @@ void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
 }
 
 void load_chewy_taf(int16 taf_nr) {
-	if (AkChewyTaf != taf_nr) {
+	if (_G(AkChewyTaf) != taf_nr) {
 		if (chewy) {
 			free((char *)chewy);
 			chewy = nullptr;
@@ -560,7 +560,7 @@ void load_chewy_taf(int16 taf_nr) {
 		}
 		if (fname_ != NULL) {
 			_G(spieler).ChewyAni = taf_nr;
-			AkChewyTaf = taf_nr;
+			_G(AkChewyTaf) = taf_nr;
 			chewy = _G(mem)->taf_adr(fname_);
 			chewy_kor = chewy->korrektur;
 		}
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 9ccbb3093ad..ed6eea98ffd 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -141,7 +141,7 @@ void Room45::setup_func() {
 			--_G(r45_delay);
 		}
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && HowardMov != 2) {
+		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && _G(HowardMov) != 2) {
 			calc_person_look();
 			const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
 
@@ -155,7 +155,7 @@ void Room45::setup_func() {
 
 			y = 130;
 
-			if (HowardMov && flags.ExitMov) {
+			if (_G(HowardMov) && flags.ExitMov) {
 				x = 56;
 				y = 122;
 			}
@@ -209,7 +209,7 @@ void Room45::talk_taxi(int16 aad_nr) {
 }
 
 void Room45::taxi_mov() {
-	HowardMov = 2;
+	_G(HowardMov) = 2;
 	room->set_timer_status(12, TIMER_STOP);
 	det->del_static_ani(12);
 	g_engine->_sound->playSound(15, 1);
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index db5757c4ec8..41789706550 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -88,7 +88,7 @@ void Room46::setup_func() {
 		x = 120;
 	}
 
-	if (HowardMov && flags.ExitMov) {
+	if (_G(HowardMov) && flags.ExitMov) {
 		x = 160;
 		y = 200;
 	}
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index c7738d06bf4..fd855c8d6d3 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -268,9 +268,9 @@ void Room50::setup_func() {
 			y = 115;
 		}
 
-		if (HowardMov && flags.ExitMov) {
+		if (_G(HowardMov) && flags.ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
-			HowardMov = 0;
+			_G(HowardMov) = 0;
 			auto_move(4, P_HOWARD);
 		} else {
 			go_auto_xy(x, y, P_HOWARD, ANI_GO);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 999e01ecbcb..e9315500dab 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -195,9 +195,9 @@ void Room51::setup_func() {
 			y = 118;
 		}
 
-		if (HowardMov && flags.ExitMov) {
+		if (_G(HowardMov) && flags.ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
-			HowardMov = 0;
+			_G(HowardMov) = 0;
 			auto_move(9, P_HOWARD);
 		} else {
 			go_auto_xy(x, y, P_HOWARD, ANI_GO);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 77374c7736f..618c64edece 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -142,7 +142,7 @@ void Room85::setup_func() {
 		nicDestX = 128;
 	}
 
-	if (HowardMov == 1) {
+	if (_G(HowardMov) == 1) {
 		howDestX = 98;
 		nicDestX = 128;
 	}
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 601ed98bbe0..4d7dda53bdc 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -72,7 +72,7 @@ void Room87::setup_func() {
 		nicDestY = 110;
 	}
 
-	if (HowardMov == 1) {
+	if (_G(HowardMov) == 1) {
 		howDestX = 11;
 		howDestY = 70;
 		nicDestX = -3;
@@ -90,7 +90,7 @@ void Room87::xit(int16 eib_nr) {
 	spieler_mi[P_CHEWY].Mode = true;
 	_G(zoom_horizont) = 0;
 	room->set_zoom(25);
-	HowardMov = 1;
+	_G(HowardMov) = 1;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 	go_auto_xy(20, 56, P_CHEWY, ANI_WAIT);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index fd643a008d5..ec3d47a2f34 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -62,7 +62,7 @@ void Room90::entry(int16 eib_nr) {
 	}
 
 	hide_cur();
-	HowardMov = 1;
+	_G(HowardMov) = 1;
 
 	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
 		det->set_detail_pos(12, 329, 15);
@@ -100,7 +100,7 @@ void Room90::entry(int16 eib_nr) {
 		start_aad_wait(520, -1);
 	}
 
-	HowardMov = 0;
+	_G(HowardMov) = 0;
 	show_cur();
 }
 
@@ -158,7 +158,7 @@ void Room90::setup_func() {
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || HowardMov == 1)
+	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || _G(HowardMov) == 1)
 		return;
 
 	calc_person_look();
@@ -174,7 +174,7 @@ void Room90::setup_func() {
 	else
 		destX = 18;
 
-	if (HowardMov == 2)
+	if (_G(HowardMov) == 2)
 		destX = 18;
 
 	go_auto_xy(destX, 132, P_HOWARD, ANI_GO);
@@ -285,7 +285,7 @@ int Room90::shootControlUnit() {
 
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
-	HowardMov = 2;
+	_G(HowardMov) = 2;
 	flags.ZoomMov = false;
 	auto_move(5, P_CHEWY);
 	spieler_mi[P_CHEWY].Mode = true;
@@ -306,7 +306,7 @@ int Room90::shootControlUnit() {
 	_G(fx_blend) = BLEND3;
 	spieler_mi[P_CHEWY].Mode = false;
 	flags.NoScroll = false;
-	HowardMov = 0;
+	_G(HowardMov) = 0;
 	_G(spieler).flags33_40 = true;
 	det->stop_detail(12);
 	atds->set_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index bc7b44e5119..8baed124dc1 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -79,7 +79,7 @@ void Room95::setup_func() {
 	else
 		destX = 536;
 
-	if (HowardMov == 1) {
+	if (_G(HowardMov) == 1) {
 		destX = 473;
 		destY = 83;
 	}
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 75e52821daf..4c177a28a49 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -65,7 +65,7 @@ void Room96::setup_func() {
 	else
 		destX = 93;
 
-	if (HowardMov == 1) {
+	if (_G(HowardMov) == 1) {
 		destX = 49;
 		destY = 60;
 	}
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 4fb7ce06bc9..ca398f9462a 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -231,7 +231,7 @@ void Room97::setup_func() {
 			destY = 112;
 		}
 
-		if (HowardMov != 1)
+		if (_G(HowardMov) != 1)
 			go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
 	}
 
@@ -298,7 +298,7 @@ void Room97::proc3() {
 		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
-		HowardMov = 1;
+		_G(HowardMov) = 1;
 		go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
 		Sdi[6].z_ebene = 6;
 		Sdi[24].z_ebene = 6;
@@ -348,7 +348,7 @@ void Room97::proc4() {
 		}
 
 		det->show_static_spr(2);
-		HowardMov = 1;
+		_G(HowardMov) = 1;
 		
 		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
 		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
@@ -370,7 +370,7 @@ void Room97::proc4() {
 		spieler_mi[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
-		HowardMov = 0;
+		_G(HowardMov) = 0;
 		show_cur();
 	}
 		
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index ce49346c9a3..f7b5419b233 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -158,7 +158,7 @@ void sprite_engine() {
 
 		case ZOBJ_CHEWY:
 			if (!_G(spieler).PersonHide[P_CHEWY]) {
-				if (!spz_ani[P_CHEWY]) {
+				if (!_G(spz_ani)[P_CHEWY]) {
 					spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
 					x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
 					y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
@@ -170,17 +170,17 @@ void sprite_engine() {
 					                spieler_vector[P_CHEWY].Yzoom,
 					                _G(scr_width));
 				} else {
-					spr_nr = spz_spr_nr[spieler_vector[P_CHEWY].PhNr];
-					x = spieler_mi[P_CHEWY].XyzStart[0] + spz_tinfo->korrektur[spr_nr * 2] -
+					spr_nr = _G(spz_spr_nr)[spieler_vector[P_CHEWY].PhNr];
+					x = spieler_mi[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->korrektur[spr_nr * 2] -
 					    _G(spieler).scrollx;
-					y = spieler_mi[P_CHEWY].XyzStart[1] + spz_tinfo->korrektur[spr_nr * 2 + 1] -
+					y = spieler_mi[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->korrektur[spr_nr * 2 + 1] -
 					    _G(spieler).scrolly;
 					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1],
 					          (int16)room->_roomInfo->ZoomFak,
 					          (int16)room->_roomInfo->ZoomFak,
 					          &spieler_vector[P_CHEWY]);
 
-					_G(out)->scale_set(spz_tinfo->image[spr_nr], x, y,
+					_G(out)->scale_set(_G(spz_tinfo)->image[spr_nr], x, y,
 					                spieler_vector[P_CHEWY].Xzoom,
 					                spieler_vector[P_CHEWY].Yzoom,
 					                _G(scr_width));
@@ -192,12 +192,12 @@ void sprite_engine() {
 		case ZOBJ_NICHELLE:
 			p_nr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
 			if (!_G(spieler).PersonHide[p_nr]) {
-				if (!spz_ani[p_nr]) {
-					ts_info = PersonTaf[p_nr];
-					spr_nr = PersonSpr[p_nr][spieler_vector[p_nr].PhNr];
+				if (!_G(spz_ani)[p_nr]) {
+					ts_info = _G(PersonTaf)[p_nr];
+					spr_nr = _G(PersonSpr)[p_nr][spieler_vector[p_nr].PhNr];
 				} else {
-					ts_info = spz_tinfo;
-					spr_nr = spz_spr_nr[spieler_vector[p_nr].PhNr];
+					ts_info = _G(spz_tinfo);
+					spr_nr = _G(spz_spr_nr)[spieler_vector[p_nr].PhNr];
 				}
 
 				x = spieler_mi[p_nr].XyzStart[0] +
@@ -917,21 +917,21 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 		} else {
 			switch (mi->Id) {
 			case CHEWY_OBJ:
-				if (!spz_ani[P_CHEWY])
+				if (!_G(spz_ani)[P_CHEWY])
 					calc_person_end_ani(om, P_CHEWY);
 				else
 					calc_person_spz_ani(om);
 				break;
 
 			case HOWARD_OBJ:
-				if (!spz_ani[P_HOWARD])
+				if (!_G(spz_ani)[P_HOWARD])
 					calc_person_end_ani(om, P_HOWARD);
 				else
 					calc_person_spz_ani(om);
 				break;
 
 			case NICHELLE_OBJ:
-				if (!spz_ani[P_NICHELLE])
+				if (!_G(spz_ani)[P_NICHELLE])
 					calc_person_end_ani(om, P_NICHELLE);
 				else
 					calc_person_spz_ani(om);
@@ -1060,7 +1060,7 @@ void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
 
 void start_spz_wait(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 	if (start_spz(ani_id, count, reverse, p_nr)) {
-		while (spz_count && !SHOULD_QUIT)
+		while (_G(spz_count) && !SHOULD_QUIT)
 			set_up_screen(DO_SETUP);
 	}
 }
@@ -1073,8 +1073,8 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 	bool ret = false;
 	if (!flags.SpzAni) {
 		flags.SpzAni = true;
-		spz_ani[p_nr] = true;
-		spz_p_nr = p_nr;
+		_G(spz_ani)[p_nr] = true;
+		_G(spz_p_nr) = p_nr;
 		spr_start = SPZ_ANI_PH[ani_id][0];
 		spr_anz = SPZ_ANI_PH[ani_id][1];
 		if (person_end_phase[p_nr] == P_RIGHT) {
@@ -1082,28 +1082,28 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 			spr_start += CH_SPZ_OFFSET;
 		}
 
-		if (ani_id != spz_akt_id) {
-			if (spz_tinfo)
-				free((char *)spz_tinfo);
-			spz_akt_id = ani_id;
-			spz_tinfo = _G(mem)->taf_seq_adr(spr_start, spr_anz);
+		if (ani_id != _G(spz_akt_id)) {
+			if (_G(spz_tinfo))
+				free((char *)_G(spz_tinfo));
+			_G(spz_akt_id) = ani_id;
+			_G(spz_tinfo) = _G(mem)->taf_seq_adr(spr_start, spr_anz);
 		}
 
 		for (i = 0; i < spr_anz; i++) {
 			if (!reverse)
-				spz_spr_nr[i] = i;
+				_G(spz_spr_nr)[i] = i;
 			else
-				spz_spr_nr[i] = spr_anz - i - 1;
+				_G(spz_spr_nr)[i] = spr_anz - i - 1;
 		}
 
-		spz_start = spr_start;
-		spz_delay[p_nr] = SpzDelay;
+		_G(spz_start) = spr_start;
+		_G(spz_delay)[p_nr] = _G(SpzDelay);
 		spieler_vector[p_nr].Count = 0;
 		spieler_vector[p_nr].PhNr = 0;
 		spieler_vector[p_nr].PhAnz = spr_anz;
-		spieler_vector[p_nr].Delay = _G(spieler).DelaySpeed + spz_delay[p_nr];
+		spieler_vector[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
 		spieler_vector[p_nr].DelayCount = 0;
-		spz_count = count;
+		_G(spz_count) = count;
 		flags.MausLinks = true;
 		ret = true;
 	}
@@ -1114,12 +1114,12 @@ void calc_person_spz_ani(ObjMov *om) {
 	if (om->PhNr < om->PhAnz - 1)
 		++om->PhNr;
 	else {
-		--spz_count;
-		if (spz_count > 0) {
+		--_G(spz_count);
+		if (_G(spz_count) > 0) {
 			om->PhNr = 0;
-			om->Delay = _G(spieler).DelaySpeed + spz_delay[spz_p_nr];
+			om->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[_G(spz_p_nr)];
 		} else {
-			if (spz_count != 255)
+			if (_G(spz_count) != 255)
 				stop_spz();
 		}
 	}
@@ -1129,28 +1129,28 @@ void stop_spz() {
 	if (flags.SpzAni) {
 		flags.SpzAni = false;
 		flags.MausLinks = false;
-		spz_ani[spz_p_nr] = false;
-		spieler_vector[spz_p_nr].Count = 0;
-		spieler_vector[spz_p_nr].PhNr = 0;
-		set_person_spr(person_end_phase[spz_p_nr], spz_p_nr);
-		spz_delay[spz_p_nr] = 0;
+		_G(spz_ani)[_G(spz_p_nr)] = false;
+		spieler_vector[_G(spz_p_nr)].Count = 0;
+		spieler_vector[_G(spz_p_nr)].PhNr = 0;
+		set_person_spr(person_end_phase[_G(spz_p_nr)], _G(spz_p_nr));
+		_G(spz_delay)[_G(spz_p_nr)] = 0;
 	}
 }
 
 void set_spz_delay(int16 delay) {
-	SpzDelay = delay;
+	_G(SpzDelay) = delay;
 }
 
 void load_person_ani(int16 ani_id, int16 p_nr) {
 	int16 ani_start;
 	short ani_anz;
-	if (PersonAni[p_nr] != ani_id) {
+	if (_G(PersonAni)[p_nr] != ani_id) {
 		ani_start = SPZ_ANI_PH[ani_id][0];
 		ani_anz = SPZ_ANI_PH[ani_id][1];
-		PersonAni[p_nr] = ani_id;
-		if (PersonTaf[p_nr])
-			free((char *)PersonTaf[p_nr]);
-		PersonTaf[p_nr] = _G(mem)->taf_seq_adr(ani_start, ani_anz);
+		_G(PersonAni)[p_nr] = ani_id;
+		if (_G(PersonTaf)[p_nr])
+			free((char *)_G(PersonTaf)[p_nr]);
+		_G(PersonTaf)[p_nr] = _G(mem)->taf_seq_adr(ani_start, ani_anz);
 		spieler_vector[p_nr].PhNr = 0;
 		spieler_vector[p_nr].PhAnz = ani_anz;
 	}
@@ -1173,17 +1173,17 @@ void calc_person_ani() {
 
 			case P_HOWARD:
 			case P_NICHELLE:
-				if (!spz_ani[p_nr]) {
+				if (!_G(spz_ani)[p_nr]) {
 					for (i = 0; i < 8; i++)
-						PersonSpr[p_nr][i] = i;
+						_G(PersonSpr)[p_nr][i] = i;
 
 					if (!spieler_vector[p_nr].Count &&
 					        _G(auto_p_nr) != p_nr) {
 						ani_nr = (int16)p_ani[p_nr - 1][4] + (person_end_phase[p_nr] * 4);
 
 						spieler_vector[p_nr].PhAnz = 5;
-						PersonSpr[p_nr][3] = 1;
-						PersonSpr[p_nr][4] = 0;
+						_G(PersonSpr)[p_nr][3] = 1;
+						_G(PersonSpr)[p_nr][4] = 0;
 					} else {
 						switch (spieler_vector[p_nr].Phase) {
 						case CH_LEFT_NO:


Commit: 8d42bf7690bb1ef4832aa8068caa9d59c100354b
    https://github.com/scummvm/scummvm/commit/8d42bf7690bb1ef4832aa8068caa9d59c100354b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:31-08:00

Commit Message:
CHEWY: Move object pointer globals to Globals

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/chewy.cpp
    engines/chewy/debugger.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/movclass.cpp
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room59.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 6afd012af61..9f256724e70 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -721,18 +721,18 @@ int16 Atdsys::get_ats_str(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 int16 Atdsys::get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	int16 ret = bit->is_bit(_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	int16 ret = _G(bit)->is_bit(_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 	return ret;
 }
 
 void Atdsys::set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	bit->set_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	_G(bit)->set_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
 void Atdsys::del_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode) {
 	set_ats_mem(mode);
-	bit->del_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
+	_G(bit)->del_bit(&_ats_sheader[txt_nr * MAX_ATS_STATUS], bit_idx);
 }
 
 char *Atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
@@ -825,11 +825,11 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 				}
 
 				if (tmp_str[1] != ATDS_END) {
-					if (!bit->is_bit(steuer, ATS_COUNT_BIT))
+					if (!_G(bit)->is_bit(steuer, ATS_COUNT_BIT))
 						++*status;
 				} else {
 
-					if (bit->is_bit(steuer, ATS_RESET_BIT))
+					if (_G(bit)->is_bit(steuer, ATS_RESET_BIT))
 						*status = 0;
 				}
 			}
@@ -1180,7 +1180,7 @@ AdsNextBlk *Atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 			if (_adsv.BlkPtr) {
 				if (start_ads_auto_dia(_adsv.BlkPtr))
 					_adsv.AutoDia = true;
-				if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_EXIT_BIT) == true) {
+				if (_G(bit)->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_EXIT_BIT) == true) {
 					stop_ads();
 					_adsnb.EndNr = _eNr[item_nr];
 					_adsnb.BlkNr = -1;
@@ -1193,10 +1193,10 @@ AdsNextBlk *Atdsys::ads_item_choice(int16 blk_nr, int16 item_nr) {
 }
 
 AdsNextBlk *Atdsys::calc_next_block(int16 blk_nr, int16 item_nr) {
-	if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_SHOW_BIT) == false)
+	if (_G(bit)->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_SHOW_BIT) == false)
 		_adsBlock[blk_nr].Show[_eNr[item_nr]] = false;
 	_adsnb.EndNr = _eNr[item_nr];
-	if (bit->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_RESTART_BIT) == true) {
+	if (_G(bit)->is_bit((uint8)_adsBlock[blk_nr].Steuer[_eNr[item_nr]], ADS_RESTART_BIT) == true) {
 		_adsnb.BlkNr = 0;
 
 		_adsStackPtr = 0;
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 6f473a0fdf6..667794bb7a9 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -113,15 +113,15 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
-		room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+		_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 		load_chewy_taf(_G(spieler).ChewyAni);
 
 		_G(fx_blend) = BLEND1;
-		room->calc_invent(&room_blk, &_G(spieler));
+		_G(room)->calc_invent(&room_blk, &_G(spieler));
 
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
-		obj->sort();
+		_G(obj)->sort();
 
 		set_speed();
 
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 43f29851346..f1b45703e46 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -61,7 +61,7 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 		int roomNum = strToInt(argv[1]);
 		exit_room(-1);
 		_G(spieler).PersonRoomNr[P_CHEWY] = roomNum;
-		room->load_room(&room_blk, roomNum, &_G(spieler));
+		_G(room)->load_room(&room_blk, roomNum, &_G(spieler));
 		_G(fx_blend) = BLEND1;
 		enter_room(-1);
 
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 20730b3ad15..573fe44a797 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -53,10 +53,10 @@ void Cinema::execute() {
 
 	_G(out)->set_fontadr(_G(font6x8));
 	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
-	atds->load_atds(98, 1);
+	_G(atds)->load_atds(98, 1);
 
-	room->open_handle(GBOOK, "rb", 0);
-	room->load_tgp(4, &room_blk, 1, 0, GBOOK);
+	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->load_tgp(4, &room_blk, 1, 0, GBOOK);
 	show_cur();
 	EVENTS_CLEAR;
 	kbinfo.scan_code = 0;
@@ -69,7 +69,7 @@ void Cinema::execute() {
 		if (!cutscenes.empty()) {
 			// Render cutscene list
 			for (int i = 0; i < CINEMA_LINES; ++i) {
-				char *csName = atds->ats_get_txt(546 + i + topIndex,
+				char *csName = _G(atds)->ats_get_txt(546 + i + topIndex,
 					0, &txt_anz, 1);
 				int yp = i * 10 + 68;
 
@@ -79,7 +79,7 @@ void Cinema::execute() {
 			}
 		} else {
 			// No cutscenes seen yet
-			char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
+			char *none = _G(atds)->ats_get_txt(545, 0, &txt_anz, 1);
 			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), none);
 		}
 
@@ -162,12 +162,12 @@ void Cinema::execute() {
 			hide_cur();
 			_G(out)->cls();
 			_G(out)->setze_zeiger(_G(screen0));
-			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			print_rows(546 + topIndex);
 
-			flc->set_custom_user_function(cut_serv);
+			_G(flc)->set_custom_user_function(cut_serv);
 			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
-			flc->remove_custom_user_function();
+			_G(flc)->remove_custom_user_function();
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			show_cur();
@@ -190,8 +190,8 @@ void Cinema::execute() {
 			if (flag) {
 				flag = false;
 				_G(out)->setze_zeiger(_G(screen0));
-				room->set_ak_pal(&room_blk);
-				fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+				_G(room)->set_ak_pal(&room_blk);
+				_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			} else {
 				_G(out)->back2screen(_G(workpage));
 			}
@@ -201,10 +201,10 @@ void Cinema::execute() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	room->open_handle(EPISODE1, "rb", 0);
-	room->set_ak_pal(&room_blk);
+	_G(room)->open_handle(EPISODE1, "rb", 0);
+	_G(room)->set_ak_pal(&room_blk);
 	hide_cur();
-	uhr->reset_timer(0, 5);
+	_G(uhr)->reset_timer(0, 5);
 }
 
 int16 Cinema::cut_serv(int16 frame) {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index baf0afe7f2a..2e5d49cbafd 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -125,13 +125,13 @@ void Credits::execute() {
 	int lineScrolled = 0;
 	int fontCol;
 
-	room->open_handle(GBOOK, "rb", 0);
-	room->load_tgp(5, &room_blk, 1, 0, GBOOK);
+	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->load_tgp(5, &room_blk, 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	_G(out)->setze_zeiger(_G(screen0));
-	room->set_ak_pal(&room_blk);
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(room)->set_ak_pal(&room_blk);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
 		int color = 63 - (6 * i);
@@ -195,11 +195,11 @@ void Credits::execute() {
 
 	_G(out)->set_fontadr(_G(font8x8));
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvorx8x8));
-	room->open_handle("back/episode1.tgp", "rb", 0);
+	_G(room)->open_handle("back/episode1.tgp", "rb", 0);
 
-	room->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&room_blk);
 	hide_cur();
-	uhr->reset_timer(0, 5);
+	_G(uhr)->reset_timer(0, 5);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index c1f02500d40..658f5702e73 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -69,16 +69,16 @@ int16 Files::execute(bool isInGame) {
 	taf_info *ti = _G(mem)->taf_adr(OPTION_TAF);
 	EVENTS_CLEAR;
 
-	room->open_handle(GBOOK, "rb", 0);
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
-	room->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&room_blk);
 	fnames = _G(iog)->io_init(&ioptr);
 	fnames += 1;
  
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(_G(workptr));
 	show_cur();
 
@@ -300,11 +300,11 @@ enter:
 
 	free(ti);
 
-	room->open_handle(EPISODE1, "rb", 0);
-	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->open_handle(EPISODE1, "rb", 0);
+	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 	_G(fx_blend) = BLEND1;
-	room->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&room_blk);
 
 	return ret;
 }
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 8481c07a53a..004a61365ab 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -100,12 +100,12 @@ void Inventory::plot_menu() {
 			y = 3;
 		else
 			y = 0;
-		_G(out)->sprite_set(curtaf->image[_G(ani_count)[i]],
+		_G(out)->sprite_set(_G(curtaf)->image[_G(ani_count)[i]],
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
 	for (i = 0; i < 2; i++) {
-		_G(out)->sprite_set(menutaf->image[PFEIL_UP + i],
+		_G(out)->sprite_set(_G(menutaf)->image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
@@ -250,7 +250,7 @@ void Inventory::menu() {
 								obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
 							else {
 								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
-								obj->sort();
+								_G(obj)->sort();
 								_G(spieler).AkInvent = -1;
 								_G(menu_item) = _G(invent_cur_mode);
 								cursor_wahl(_G(invent_cur_mode));
@@ -382,9 +382,9 @@ void Inventory::menu() {
 				_G(cur)->plot_cur();
 			_G(out)->setze_zeiger(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
-				fx->blende1(_G(workptr), _G(screen0), 0, 200, 0, 300);
+				_G(fx)->blende1(_G(workptr), _G(screen0), 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
-				fx->blende1(_G(workptr), _G(screen0), 0, 200, 1, 300);
+				_G(fx)->blende1(_G(workptr), _G(screen0), 0, 200, 1, 300);
 			menu_flag1 = false;
 			_G(out)->set_clip(0, 0, 320, 200);
 			_G(out)->back2screen(_G(workpage));
@@ -430,9 +430,9 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	maus_flag = 1;
 
 	if (mode == INV_ATS_MODE) {
-		atds->load_atds(invent_nr, INV_ATS_DATEI);
-		txt_name_adr = atds->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
-		txt_adr = atds->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
+		_G(atds)->load_atds(invent_nr, INV_ATS_DATEI);
+		txt_name_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
+		txt_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
 		xoff = strlen(txt_name_adr);
 		xoff *= _G(fvorx8x8);
 		xoff = (254 - xoff) / 2;
@@ -444,9 +444,9 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		yoff = 0;
 
 		if (ats_nr >= 15000) {
-			txt_adr = atds->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
+			txt_adr = _G(atds)->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
 		} else {
-			txt_adr = atds->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
+			txt_adr = _G(atds)->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
 		}
 		if (!txt_adr) {
 			ende = 1;
@@ -563,7 +563,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		k = 0;
 		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-				_G(scr_width), "%s", txt->str_pos(txt_adr, i));
+				_G(scr_width), "%s", _G(txt)->str_pos(txt_adr, i));
 			++k;
 		}
 
@@ -617,14 +617,14 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 
 				}
 
-				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
+				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
 				}
 				if (ok) {
 					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);
 				}
 
-				if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
+				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
 					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
 				if (_G(menu_item) == CUR_USE)
 					flags.StaticUseTxt = true;
@@ -674,7 +674,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 		case GBUCH_INV:
 			ret = del_invent_slot(GBUCH_INV);
 			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
-			obj->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
+			_G(obj)->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
 			ret_val = true;
 			break;
 
@@ -692,13 +692,13 @@ void Inventory::showDiary() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 
-	room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(out)->back2screen(_G(workpage));
-	room->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&room_blk);
 	_G(out)->setze_zeiger(nullptr);
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
 		g_events->update();
@@ -709,14 +709,14 @@ void Inventory::showDiary() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	room->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
 	Dialogs::Inventory::plot_menu();
 	_G(out)->setze_zeiger(nullptr);
-	room->set_ak_pal(&room_blk);
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(room)->set_ak_pal(&room_blk);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index f07df3a25fe..1c86177a90b 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -67,11 +67,11 @@ void MainMenu::execute() {
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
-		room->load_room(&room_blk, 98, &_G(spieler));
+		_G(room)->load_room(&room_blk, 98, &_G(spieler));
 
 		_G(currentSong) = -1;
 		load_room_music(98);
-		fx->border(_G(workpage), 100, 0, 0);
+		_G(fx)->border(_G(workpage), 100, 0, 0);
 
 		_G(out)->set_palette(_G(pal));
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -92,7 +92,7 @@ void MainMenu::execute() {
 			break;
 
 		case MM_VIEW_INTRO:
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(out)->setze_zeiger(_G(workptr));
 			flags.NoPalAfterFlc = true;
 			flic_cut(135, CFO_MODE);
@@ -118,12 +118,12 @@ void MainMenu::execute() {
 			break;
 
 		case MM_CREDITS:
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			flags.NoPalAfterFlc = true;
-			flc->set_custom_user_function(creditsFn);
+			_G(flc)->set_custom_user_function(creditsFn);
 			flic_cut(159, CFO_MODE);
-			flc->remove_custom_user_function();
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(flc)->remove_custom_user_function();
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			Dialogs::Credits::execute();
 			break;
 
@@ -134,7 +134,7 @@ void MainMenu::execute() {
 }
 
 void MainMenu::screenFunc() {
-	int vec = det->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+	int vec = _G(det)->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 
 	if (_G(in)->get_switch_code() == 28 || minfo.button == 1) {
 		_selection = vec;
@@ -143,11 +143,11 @@ void MainMenu::screenFunc() {
 
 void MainMenu::animate() {
 	if (ani_timer->TimeFlag) {
-		uhr->reset_timer(0, 0);
+		_G(uhr)->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		spieler_vector->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[0];
 		_G(FrameSpeed) = 0;
-		det->set_global_delay(_G(spieler).DelaySpeed);
+		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
 
 	++_G(FrameSpeed);
@@ -215,7 +215,7 @@ void MainMenu::startGame() {
 	_G(spieler).soundLoopMode = sndLoopMode;
 
 	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
-	room->load_room(&room_blk, 0, &_G(spieler));
+	_G(room)->load_room(&room_blk, 0, &_G(spieler));
 
 	spieler_vector[P_CHEWY].Phase = 6;
 	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
@@ -268,7 +268,7 @@ void MainMenu::playGame() {
 	flags.ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
 	spieler_vector[P_CHEWY].Count = 0;
-	uhr->reset_timer(0, 0);
+	_G(uhr)->reset_timer(0, 0);
 	_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !main_loop(1)) {
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index df58e222ab6..4144af6070c 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -57,13 +57,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
 
 void Options::execute(taf_info *ti) {
 	long akt_clock = 0, stop_clock = 0;
-	room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
 
-	room->set_ak_pal(&room_blk);
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(room)->set_ak_pal(&room_blk);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(_G(workptr));
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
@@ -160,21 +160,21 @@ void Options::execute(taf_info *ti) {
 			case 2:
 				if (_G(spieler).SoundSwitch) {
 					_G(spieler).SoundSwitch = false;
-					det->disable_room_sound();
+					_G(det)->disable_room_sound();
 				} else {
 					_G(spieler).SoundSwitch = true;
-					det->enable_room_sound();
+					_G(det)->enable_room_sound();
 				}
 				break;
 			case 3:
 			case 4:
 				if (_G(spieler).DisplayText) {
 					_G(spieler).DisplayText = false;
-					atds->setHasSpeech(true);
+					_G(atds)->setHasSpeech(true);
 					_G(spieler).SpeechSwitch = true;
 				} else {
 					_G(spieler).DisplayText = true;
-					atds->setHasSpeech(false);
+					_G(atds)->setHasSpeech(false);
 					_G(spieler).SpeechSwitch = false;
 				}
 				break;
@@ -254,12 +254,12 @@ void Options::execute(taf_info *ti) {
 			--delay_count;
 	}
 
-	room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
-	room->set_ak_pal(&room_blk);
-	fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+	_G(room)->set_ak_pal(&room_blk);
+	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(_G(workptr));
 }
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 39f7469aa63..be09240283b 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -83,36 +83,15 @@ MovInfo auto_mov_obj[MAX_OBJ_MOV];
 MovPhasen mov_phasen[MAX_OBJ_MOV];
 MovLine mov_line[MAX_OBJ_MOV][5];
 TimerBlk ani_timer[MAX_TIMER_OBJ];
-RoomDetailInfo *Rdi;
-StaticDetailInfo *Sdi;
-AniDetailInfo *Adi;
 Flags flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 				0, 0, 0, 0, 0, 0, 0, 0, 0 };
 CustomInfo Ci;
 GotoPkt gpkt;
 
-taf_info *curtaf;
-taf_info *menutaf;
-taf_seq_info *howard_taf;
-taf_info *chewy;
-int16 *chewy_kor;
-
 int16 person_end_phase[MAX_PERSON];
 int16 ani_stand_count[MAX_PERSON];
 
 bool ani_stand_flag[MAX_PERSON];
 
-BitClass *bit;
-GedClass *ged;
-Text *txt;
-Room *room;
-Object *obj;
-Timer *uhr;
-Detail *det;
-Effect *fx;
-Atdsys *atds;
-Flic *flc;
-MovClass *mov;
-
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index 1b57082575d..c24fe98df3b 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -207,6 +207,26 @@ public:
 	taf_seq_info *_PersonTaf[MAX_PERSON] = { nullptr };
 	uint8 _PersonSpr[MAX_PERSON][8] = { 0 };
 
+	RoomDetailInfo *_Rdi = nullptr;
+	StaticDetailInfo *_Sdi = nullptr;
+	AniDetailInfo *_Adi = nullptr;
+	taf_info *_curtaf = nullptr;
+	taf_info *_menutaf = nullptr;
+	taf_seq_info *_howard_taf = nullptr;
+	taf_info *_chewy = nullptr;
+	int16 *_chewy_kor = nullptr;
+	BitClass *_bit = nullptr;
+	GedClass *_ged = nullptr;
+	Text *_txt = nullptr;
+	Room *_room = nullptr;
+	Object *_obj = nullptr;
+	Timer *_uhr = nullptr;
+	Detail *_det = nullptr;
+	Effect *_fx = nullptr;
+	Atdsys *_atds = nullptr;
+	Flic *_flc = nullptr;
+	MovClass *_mov = nullptr;
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -288,36 +308,15 @@ extern MovInfo auto_mov_obj[MAX_OBJ_MOV];
 extern MovPhasen mov_phasen[MAX_OBJ_MOV];
 extern MovLine mov_line[MAX_OBJ_MOV][5];
 extern TimerBlk ani_timer[MAX_TIMER_OBJ];
-extern RoomDetailInfo *Rdi;
-extern StaticDetailInfo *Sdi;
-extern AniDetailInfo *Adi;
 extern Flags flags;
 extern CustomInfo Ci;
 extern GotoPkt gpkt;
 
-extern taf_info *curtaf;
-extern taf_info *menutaf;
-extern taf_seq_info *howard_taf;
-extern taf_info *chewy;
-extern int16 *chewy_kor;
-
 extern int16 person_end_phase[MAX_PERSON];
 extern int16 ani_stand_count[MAX_PERSON];
 
 extern bool ani_stand_flag[MAX_PERSON];
 
-extern BitClass *bit;
-extern GedClass *ged;
-extern Text *txt;
-extern Room *room;
-extern Object *obj;
-extern Timer *uhr;
-extern Detail *det;
-extern Effect *fx;
-extern Atdsys *atds;
-extern Flic *flc;
-extern MovClass *mov;
-
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 5192bf2ab88..73a30c67ed6 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -34,18 +34,18 @@ void standard_init() {
 	_G(mem) = new Memory();
 	_G(out) = new McgaGraphics();
 	_G(in) = new InputMgr();
-	fx = new Effect();
-	txt = new Text();
-	bit = new BitClass();
-	ged = new GedClass(&ged_user_func);
-	room = new Room();
-	obj = new Object(&_G(spieler));
-	uhr = new Timer(MAX_TIMER_OBJ, ani_timer);
-	det = new Detail();
-	atds = new Atdsys();
+	_G(fx) = new Effect();
+	_G(txt) = new Text();
+	_G(bit) = new BitClass();
+	_G(ged) = new GedClass(&ged_user_func);
+	_G(room) = new Room();
+	_G(obj) = new Object(&_G(spieler));
+	_G(uhr) = new Timer(MAX_TIMER_OBJ, ani_timer);
+	_G(det) = new Detail();
+	_G(atds) = new Atdsys();
 	_G(sndPlayer) = new SoundPlayer();
-	flc = new Flic();
-	mov = new MovClass();
+	_G(flc) = new Flic();
+	_G(mov) = new MovClass();
 
 	_G(out)->init();
 	_G(out)->cls();
@@ -65,10 +65,10 @@ void standard_init() {
 	curblk.ysize = 16;
 
 	// WORKAROUND: Moved from init_load because the original
-	// uses curtaf->image below before curtaf was initialized
-	curtaf = _G(mem)->taf_adr(CURSOR);
+	// uses _G(curtaf)->image below before _G(curtaf) was initialized
+	_G(curtaf) = _G(mem)->taf_adr(CURSOR);
 
-	curblk.sprite = curtaf->image;
+	curblk.sprite = _G(curtaf)->image;
 	curblk.cur_back = _G(cur_back);
 	curblk.no_back = true;
 	curani.ani_anf = 0;
@@ -87,15 +87,15 @@ void standard_init() {
 	_G(pal)[766] = 63;
 	_G(pal)[767] = 63;
 	_G(out)->einblenden(_G(pal), 0);
-	room->set_timer_start(1);
+	_G(room)->set_timer_start(1);
 	font_load();
 
 	_G(out)->cls();
 	_G(in)->neuer_kb_handler(&kbinfo);
 
 	var_init();
-	_G(ablage) = room->get_ablage();
-	_G(ged_mem) = room->get_ged_mem();
+	_G(ablage) = _G(room)->get_ablage();
+	_G(ged_mem) = _G(room)->get_ged_mem();
 
 	_G(zoom_horizont) = 140;
 	_G(pal)[765] = 63;
@@ -103,7 +103,7 @@ void standard_init() {
 	_G(pal)[767] = 63;
 	_G(out)->einblenden(_G(pal), 0);
 	_G(out)->cls();
-	uhr->set_new_timer(0, 5, SEC_10_MODE);
+	_G(uhr)->set_new_timer(0, 5, SEC_10_MODE);
 
 	curblk.cur_back = _G(cur_back);
 	sound_init();
@@ -111,9 +111,9 @@ void standard_init() {
 }
 
 void var_init() {
-	Rdi = det->get_room_detail_info();
-	Sdi = &Rdi->Sinfo[0];
-	Adi = &Rdi->Ainfo[0];
+	_G(Rdi) = _G(det)->get_room_detail_info();
+	_G(Sdi) = &_G(Rdi)->Sinfo[0];
+	_G(Adi) = &_G(Rdi)->Ainfo[0];
 
 	_G(auto_p_nr) = 0;
 	_G(menu_item) = CUR_WALK;
@@ -188,39 +188,39 @@ void init_room() {
 	room_blk.AtsLoad = true;
 	strcpy(room_blk.RoomDir, "room/");
 
-	room->open_handle(EPISODE1_GEP, "rb", R_GEPDATEI);
+	_G(room)->open_handle(EPISODE1_GEP, "rb", R_GEPDATEI);
 }
 
 void init_atds() {
 	// Close any prior handles
-	atds->close_handle(AAD_DATEI);
-	atds->close_handle(ATS_DATEI);
-	atds->close_handle(ADS_DATEI);
-	atds->close_handle(INV_USE_DATEI);
-	atds->close_handle(INV_ATS_DATEI);
-	atds->close_handle(ATDS_HANDLE);
+	_G(atds)->close_handle(AAD_DATEI);
+	_G(atds)->close_handle(ATS_DATEI);
+	_G(atds)->close_handle(ADS_DATEI);
+	_G(atds)->close_handle(INV_USE_DATEI);
+	_G(atds)->close_handle(INV_ATS_DATEI);
+	_G(atds)->close_handle(ATDS_HANDLE);
 
 	// New set up
-	Stream *handle = atds->pool_handle(ATDS_TXT, "rb");
-	atds->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
-	atds->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
-	atds->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
-	atds->init_ats_mode(INV_ATS_DATEI, _G(spieler).InvAts);
-	atds->set_handle(ATDS_TXT, AAD_DATEI, handle, AAD_TAP_OFF, AAD_TAP_MAX);
-	atds->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
-	atds->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
-	atds->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
-	atds->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
-	atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
+	Stream *handle = _G(atds)->pool_handle(ATDS_TXT, "rb");
+	_G(atds)->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
+	_G(atds)->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
+	_G(atds)->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
+	_G(atds)->init_ats_mode(INV_ATS_DATEI, _G(spieler).InvAts);
+	_G(atds)->set_handle(ATDS_TXT, AAD_DATEI, handle, AAD_TAP_OFF, AAD_TAP_MAX);
+	_G(atds)->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
+	_G(atds)->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
+	_G(atds)->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
+	_G(atds)->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
+	_G(atds)->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
 	_G(mem)->file->fcopy(ADSH_TMP, "txt/diah.adh");
-	atds->open_handle(ADSH_TMP, "rb", 3);
+	_G(atds)->open_handle(ADSH_TMP, "rb", 3);
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
 	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
-	atds->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
+	_G(atds)->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
-		atds->set_split_win(i, &_G(ssi)[i]);
-	atds->set_string_end_func(&atds_string_start);
+		_G(atds)->set_split_win(i, &_G(ssi)[i]);
+	_G(atds)->set_string_end_func(&atds_string_start);
 }
 
 void new_game() {
@@ -235,9 +235,9 @@ void new_game() {
 	for (int16 i = 0; i < MAX_EXIT; i++)
 		_G(spieler).room_e_obj[i].RoomNr = -1;
 
-	obj->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
-	obj->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
-	obj->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
+	_G(obj)->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
+	_G(obj)->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
+	_G(obj)->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 
 	byte *tmp = (byte *)MALLOC(ROOM_ATS_MAX);
 	Common::File f;
@@ -271,9 +271,9 @@ void new_game() {
 		_G(spieler).InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
 	free(tmp);
 
-	obj->sort();
-	for (int16 i = 0; i < obj->spieler_invnr[0]; i++)
-		_G(spieler).InventSlot[i] = obj->spieler_invnr[i + 1];
+	_G(obj)->sort();
+	for (int16 i = 0; i < _G(obj)->spieler_invnr[0]; i++)
+		_G(spieler).InventSlot[i] = _G(obj)->spieler_invnr[i + 1];
 
 	_G(AkChewyTaf) = 0;
 	load_chewy_taf(CHEWY_NORMAL);
@@ -300,7 +300,7 @@ static void font_load() {
 	_G(fvorx6x8) = vorx - 2;
 	_G(fvory6x8) = vory;
 	_G(out)->set_vorschub(_G(fvorx6x8), vory);
-	atds->set_font(_G(font8x8), _G(fvorx8x8), 10);
+	_G(atds)->set_font(_G(font8x8), _G(fvorx8x8), 10);
 }
 
 void init_load() {
@@ -311,9 +311,9 @@ void init_load() {
 	_G(spz_tinfo) = nullptr;
 	set_spz_delay(3);
 
-	menutaf = _G(mem)->taf_adr(MENUTAF);
+	_G(menutaf) = _G(mem)->taf_adr(MENUTAF);
 	_G(spblende) = _G(mem)->void_adr("cut/blende.rnd");
-	room->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
+	_G(room)->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
 	_G(out)->set_palette(_G(pal));
 }
 
@@ -322,40 +322,40 @@ void tidy() {
 	_G(in)->alter_kb_handler();
 	_G(in)->init();
 	free_buffers();
-	obj->free_inv_spr(&_G(inv_spr)[0]);
+	_G(obj)->free_inv_spr(&_G(inv_spr)[0]);
 
 	delete _G(iog);
 	delete _G(cur);
-	delete mov;
-	delete flc;
+	delete _G(mov);
+	delete _G(flc);
 	delete _G(sndPlayer);
-	delete atds;
-	delete det;
-	delete uhr;
-	delete obj;
-	delete room;
-	delete ged;
-	delete bit;
-	delete txt;
-	delete fx;
+	delete _G(atds);
+	delete _G(det);
+	delete _G(uhr);
+	delete _G(obj);
+	delete _G(room);
+	delete _G(ged);
+	delete _G(bit);
+	delete _G(txt);
+	delete _G(fx);
 	delete _G(in);
 	delete _G(out);
 	delete _G(mem);
 
 	_G(iog) = nullptr;
 	_G(cur) = nullptr;
-	mov = nullptr;
-	flc = nullptr;
+	_G(mov) = nullptr;
+	_G(flc) = nullptr;
 	_G(sndPlayer) = nullptr;
-	atds = nullptr;
-	det = nullptr;
-	uhr = nullptr;
-	obj = nullptr;
-	room = nullptr;
-	ged = nullptr;
-	bit = nullptr;
-	txt = nullptr;
-	fx = nullptr;
+	_G(atds) = nullptr;
+	_G(det) = nullptr;
+	_G(uhr) = nullptr;
+	_G(obj) = nullptr;
+	_G(room) = nullptr;
+	_G(ged) = nullptr;
+	_G(bit) = nullptr;
+	_G(txt) = nullptr;
+	_G(fx) = nullptr;
 	_G(in) = nullptr;
 	_G(out) = nullptr;
 	_G(mem) = nullptr;
@@ -379,7 +379,7 @@ void sound_init() {
 	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 
-	_G(music_handle) = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(_G(music_handle));
 	assert(rs);
@@ -393,7 +393,7 @@ void sound_init() {
 		_G(EndOfPool) = Nph.PoolAnz - 1;
 	}
 
-	atds->setHasSpeech(true);
+	_G(atds)->setHasSpeech(true);
 	_G(spieler).DisplayText = false;
 	_G(spieler).SoundSwitch = true;
 	_G(spieler).MusicSwitch = true;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 17361786b71..f322913fc2f 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -73,23 +73,23 @@ void alloc_buffers() {
 	_G(cur_back) = (byte *)MALLOC(16 * 16 + 4);
 	Ci.VirtScreen = _G(workpage);
 	Ci.TempArea = (byte *)MALLOC(64004l);
-	det->set_taf_ani_mem(Ci.TempArea);
+	_G(det)->set_taf_ani_mem(Ci.TempArea);
 	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
 	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
 }
 
 void free_buffers() {
-	det->del_dptr();
+	_G(det)->del_dptr();
 	for (int16 i = 0; i < MAX_PERSON; i++)
 		free((char *)_G(PersonTaf)[i]);
 	free((char *)_G(spz_tinfo));
 	free(_G(font6x8));
 	free(_G(font8x8));
 	free(_G(spblende));
-	free((char *)menutaf);
-	free((char *)chewy);
+	free((char *)_G(menutaf));
+	free((char *)_G(chewy));
 
-	free((char *)curtaf);
+	free((char *)_G(curtaf));
 	free(Ci.MusicSlot);
 	free(Ci.TempArea);
 	free(_G(cur_back));
@@ -100,7 +100,7 @@ void free_buffers() {
 void cursor_wahl(int16 nr) {
 	int16 ok = true;
 	if (nr != CUR_USER) {
-		curblk.sprite = curtaf->image;
+		curblk.sprite = _G(curtaf)->image;
 		curani.delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
@@ -263,20 +263,20 @@ void test_menu() {
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
 	enter_room(-1);
-	uhr->reset_timer(0, 0);
+	_G(uhr)->reset_timer(0, 0);
 	while (ende == 0)
 		ende = main_loop(DO_SETUP);
 }
 
 void menu_entry() {
-	det->freeze_ani();
-	uhr->set_all_status(TIMER_FREEZE);
+	_G(det)->freeze_ani();
+	_G(uhr)->set_all_status(TIMER_FREEZE);
 }
 
 void menu_exit() {
-	det->unfreeze_ani();
-	uhr->set_all_status(TIMER_UNFREEZE);
-	uhr->reset_timer(0, 0);
+	_G(det)->unfreeze_ani();
+	_G(uhr)->set_all_status(TIMER_UNFREEZE);
+	_G(uhr)->reset_timer(0, 0);
 	_G(FrameSpeed) = 0;
 }
 
@@ -502,8 +502,8 @@ static void showWalkAreas() {
 
 	for (int y = 0, yp = ys; y < 200 / 8; ++y, yp += 8) {
 		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
-			int idx = ged->ged_idx(xp, yp,
-				room->_gedXAnz[room_blk.AkAblage],
+			int idx = _G(ged)->ged_idx(xp, yp,
+				_G(room)->_gedXAnz[room_blk.AkAblage],
 				_G(ged_mem)[room_blk.AkAblage]);
 
 			if (idx) {
@@ -528,14 +528,14 @@ void set_up_screen(SetupScreenMode mode) {
 	if (isMainLoop)
 		mode = DO_SETUP;
 
-	uhr->calc_timer();
+	_G(uhr)->calc_timer();
 
 	if (ani_timer[0].TimeFlag) {
-		uhr->reset_timer(0, 0);
+		_G(uhr)->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[P_CHEWY];
 		_G(FrameSpeed) = 0;
-		det->set_global_delay(_G(spieler).DelaySpeed);
+		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
 	++_G(FrameSpeed);
 	_G(out)->setze_zeiger(_G(workptr));
@@ -555,7 +555,7 @@ void set_up_screen(SetupScreenMode mode) {
 			plot_main_menu();
 	} else {
 		kb_mov(1);
-		det->unfreeze_ani();
+		_G(det)->unfreeze_ani();
 		check_mouse_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 
 		if (!flags.SaveMenu)
@@ -586,17 +586,17 @@ void set_up_screen(SetupScreenMode mode) {
 						          spieler_mi[P_CHEWY].HotX;
 						gpkt.Sy = spieler_vector[P_CHEWY].Xypos[1] +
 						          spieler_mi[P_CHEWY].HotY;
-						gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
-						gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
+						gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
+						gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
 						gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
-						gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
+						gpkt.Ebenen = _G(room)->_gedInfo[room_blk.AkAblage].Ebenen;
 						gpkt.AkMovEbene = _G(ged_mov_ebene);
-						mov->goto_xy(&gpkt);
+						_G(mov)->goto_xy(&gpkt);
 						spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
 						spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
 						spieler_mi[P_CHEWY].XyzEnd[0] = gpkt.Dx - spieler_mi[P_CHEWY].HotX;
 						spieler_mi[P_CHEWY].XyzEnd[1] = gpkt.Dy - spieler_mi[P_CHEWY].HotY;
-						mov->get_mov_vector((int16 *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
+						_G(mov)->get_mov_vector((int16 *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
 						get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
 						spieler_vector[P_CHEWY].DelayCount = 0;
 						_G(auto_p_nr) = P_CHEWY;
@@ -608,10 +608,10 @@ void set_up_screen(SetupScreenMode mode) {
 		calc_auto_go();
 
 		if (_G(fx_blend)) {
-			int16 idx = ged->ged_idx(
+			int16 idx = _G(ged)->ged_idx(
 				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-				room->_gedXAnz[room_blk.AkAblage],
+				_G(room)->_gedXAnz[room_blk.AkAblage],
 				_G(ged_mem)[room_blk.AkAblage]);
 			check_shad(idx, 0);
 		} else {
@@ -625,17 +625,17 @@ void set_up_screen(SetupScreenMode mode) {
 		for (i = 0; i < _G(auto_obj) && !flags.StopAutoObj; i++)
 			mov_objekt(&auto_mov_vector[i], &auto_mov_obj[i]);
 
-		nr = obj->is_iib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+		nr = _G(obj)->is_iib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 		if (nr != -1) {
-			txt_nr = obj->iib_txt_nr(nr);
+			txt_nr = _G(obj)->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
 		} else {
 			tmp = calc_maus_txt(minfo.x, minfo.y, mode);
 			if (tmp == -1 || tmp == 255) {
 
-				nr = obj->is_sib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+				nr = _G(obj)->is_sib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				if (nr != -1) {
-					txt_nr = obj->sib_txt_nr(nr);
+					txt_nr = _G(obj)->sib_txt_nr(nr);
 					mous_obj_action(nr, mode, INVENTAR_STATIC, txt_nr);
 				} else
 					calc_mouse_person(minfo.x, minfo.y);
@@ -645,7 +645,7 @@ void set_up_screen(SetupScreenMode mode) {
 			_G(cur)->plot_cur();
 
 			if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
-				_G(out)->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
+				_G(out)->sprite_set(_G(curtaf)->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
 				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
@@ -659,8 +659,8 @@ void set_up_screen(SetupScreenMode mode) {
 		}
 	}
 
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	atds->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
 	                spieler_vector[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(maus_links_click) = false;
 	_G(menu_flag) = false;
@@ -668,22 +668,22 @@ void set_up_screen(SetupScreenMode mode) {
 		_G(out)->setze_zeiger(nullptr);
 		switch (_G(fx_blend)) {
 		case BLEND1:
-			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		case BLEND2:
-			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 1, 0);
+			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 1, 0);
 			break;
 
 		case BLEND3:
-			fx->rnd_blende(_G(spblende), _G(workptr), _G(screen0), _G(pal), 0, 10);
+			_G(fx)->rnd_blende(_G(spblende), _G(workptr), _G(screen0), _G(pal), 0, 10);
 			break;
 
 		case BLEND4:
 			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
 			_G(out)->setze_zeiger(nullptr);
-			fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
 		default:
@@ -727,7 +727,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
 			case INVENTAR_STATIC:
-				str_adr = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
+				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 				break;
 
 			}
@@ -738,7 +738,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_adr, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos(str_adr, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
 			}
 		}
 	}
@@ -884,7 +884,7 @@ void maus_action() {
 		}
 		_G(inv_disp_ok) = false;
 	}
-	if (atds->aad_get_status() == -1) {
+	if (_G(atds)->aad_get_status() == -1) {
 		if (minfo.button || kbinfo.key_code == Common::KEYCODE_ESCAPE || kbinfo.key_code == Common::KEYCODE_RETURN) {
 
 			if (minfo.button == 2 || kbinfo.key_code == Common::KEYCODE_ESCAPE) {
@@ -931,7 +931,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 	switch (mode) {
 	case INVENTAR_NORMAL:
-		ret = obj->action_iib_iib(_G(spieler).AkInvent, test_nr);
+		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			hide_cur();
 			if (flags.InventMenu == false) {
@@ -939,7 +939,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					_G(maus_links_click) = false;
 					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
-				txt_nr = obj->iib_txt_nr(test_nr);
+				txt_nr = _G(obj)->iib_txt_nr(test_nr);
 				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
 				if (_G(spieler).room_m_obj[test_nr].AniFlag != 255) {
 					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[test_nr].HeldHide;
@@ -952,14 +952,14 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		break;
 
 	case INVENTAR_STATIC:
-		ret = obj->action_iib_sib(_G(spieler).AkInvent, test_nr);
+		ret = _G(obj)->action_iib_sib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			_G(maus_links_click) = false;
 			hide_cur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
-			txt_nr = obj->sib_txt_nr(test_nr);
+			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
@@ -971,7 +971,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					obj->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(test_nr);
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
@@ -985,12 +985,12 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				_G(menu_item) = _G(menu_item_vorwahl);
 				cursor_wahl(_G(menu_item));
 			}
-			obj->calc_all_static_detail();
+			_G(obj)->calc_all_static_detail();
 		}
 		break;
 
 	case STATIC_USE:
-		ret = obj->calc_static_use(test_nr);
+		ret = _G(obj)->calc_static_use(test_nr);
 		if (ret == OBJEKT_1) {
 			_G(maus_links_click) = false;
 			hide_cur();
@@ -998,7 +998,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
-			txt_nr = obj->sib_txt_nr(test_nr);
+			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
@@ -1011,7 +1011,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					obj->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(test_nr);
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
@@ -1026,7 +1026,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			show_cur();
 			sib_ret = sib_event_no_inv(test_nr);
 
-			obj->calc_all_static_detail();
+			_G(obj)->calc_all_static_detail();
 
 			if (!_G(spieler).inv_cur) {
 
@@ -1041,7 +1041,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
-			txt_nr = obj->sib_txt_nr(test_nr);
+			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
@@ -1054,7 +1054,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					obj->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(test_nr);
 				}
 				if (ani_nr != -1) {
 					play_scene_ani(ani_nr, tmp);
@@ -1064,17 +1064,17 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 			if (_G(spieler).room_s_obj[test_nr].InvNr != -1)
 				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
-			obj->calc_rsi_flip_flop(test_nr);
+			_G(obj)->calc_rsi_flip_flop(test_nr);
 			_G(menu_item_vorwahl) = CUR_WALK;
 			show_cur();
 			sib_event_no_inv(test_nr);
-			obj->calc_all_static_detail();
+			_G(obj)->calc_all_static_detail();
 			if (!_G(spieler).inv_cur) {
 				_G(menu_item) = _G(menu_item_vorwahl);
 				cursor_wahl(_G(menu_item));
 			}
 		} else if (ret == NO_ACTION) {
-			txt_nr = obj->sib_txt_nr(test_nr);
+			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 		}
 	}
@@ -1240,36 +1240,36 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			_G(auto_p_nr) = p_nr;
 			tmp = _G(maus_links_click);
 			_G(maus_links_click) = false;
-			gpkt.Dx = Rdi->AutoMov[mov_nr].X -
+			gpkt.Dx = _G(Rdi)->AutoMov[mov_nr].X -
 			          spieler_mi[p_nr].HotMovX + spieler_mi[p_nr].HotX;
-			gpkt.Dy = Rdi->AutoMov[mov_nr].Y -
+			gpkt.Dy = _G(Rdi)->AutoMov[mov_nr].Y -
 			          spieler_mi[p_nr].HotMovY + spieler_mi[p_nr].HotY;
 			gpkt.Sx = spieler_vector[p_nr].Xypos[0] + spieler_mi[p_nr].HotX;
 			gpkt.Sy = spieler_vector[p_nr].Xypos[1] + spieler_mi[p_nr].HotY;
-			gpkt.Breite = room->_gedXAnz[room_blk.AkAblage];
-			gpkt.Hoehe = room->_gedYAnz[room_blk.AkAblage];
+			gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
+			gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
 			gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
-			gpkt.Ebenen = room->_gedInfo[room_blk.AkAblage].Ebenen;
+			gpkt.Ebenen = _G(room)->_gedInfo[room_blk.AkAblage].Ebenen;
 			gpkt.AkMovEbene = _G(ged_mov_ebene);
-			mov->goto_xy(&gpkt);
+			_G(mov)->goto_xy(&gpkt);
 
 			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
 			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 			spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
 			spieler_mi[p_nr].XyzEnd[1] = gpkt.Dy - spieler_mi[p_nr].HotY;
-			mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
+			_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
 				spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 			spieler_vector[p_nr].DelayCount = 0;
 
-			if (mov->auto_go_status()) {
-				while (mov->auto_go_status()) {
+			if (_G(mov)->auto_go_status()) {
+				while (_G(mov)->auto_go_status()) {
 					if (SHOULD_QUIT)
 						return 0;
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 						if (flags.ExitMov || flags.BreakAMov) {
 							key = Common::KEYCODE_ESCAPE;
-							mov->stop_auto_go();
+							_G(mov)->stop_auto_go();
 							move_status = false;
 						}
 					}
@@ -1282,7 +1282,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 				spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
 				spieler_mi[p_nr].XyzEnd[1] = gpkt.Dy - spieler_mi[p_nr].HotY;
-				mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
+				_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 				get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
 				while (!ende) {
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
@@ -1297,7 +1297,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 
 								set_person_pos(spieler_mi[p_nr].XyzEnd[0],
 								               spieler_mi[p_nr].XyzEnd[1],
-								               p_nr, Rdi->AutoMov[mov_nr].SprNr);
+								               p_nr, _G(Rdi)->AutoMov[mov_nr].SprNr);
 							}
 						}
 						ende = 1;
@@ -1331,7 +1331,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
 		spieler_mi[p_nr].XyzEnd[0] = x;
 		spieler_mi[p_nr].XyzEnd[1] = y;
-		mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
+		_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
 			spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
 
 		if (spieler_vector[p_nr].Count)
@@ -1397,9 +1397,9 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 			txt_nr = calc_mouse_mov_obj(&idx);
 
 			if (txt_nr == -1) {
-				idx = det->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
+				idx = _G(det)->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
 				if (idx != -1) {
-					txt_nr = Rdi->mtxt[idx];
+					txt_nr = _G(Rdi)->mtxt[idx];
 					inv_no_use_mode = DETEDIT_REC;
 				}
 			}
@@ -1435,7 +1435,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					}
 
 					action_ret = 0;
-					if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+					if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
@@ -1444,18 +1444,18 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 						}
 					}
 
-					if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
+					if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_VOR);
 					}
 					
-					if (ok && !atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+					if (ok && !_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (start_ats_wait(txt_nr, txt_mode, 14, ATS_DATEI))
 							disp_flag = false;
 					} else {
 						ret = -1;
 					}
 					
-					if (atds->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
+					if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
 						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_NACH);
 						action_flag = true;
 						if (action_ret)
@@ -1463,7 +1463,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (!ok && !action_ret) {
-						if (inv_no_use_mode != -1 && !atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							action_flag = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
 							if (action_flag)
 								ret = txt_nr;
@@ -1471,7 +1471,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (ok && !action_ret && txt_mode == TXT_MARK_USE && disp_flag) {
-						if (!atds->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+						if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							if (_G(menu_item) != CUR_WALK) {
 								if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
@@ -1491,14 +1491,14 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 				}
 
 				if (disp_flag && !action_flag) {
-					char *str_ = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
+					char *str_ = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
 						ret = txt_nr;
 						_G(out)->set_fontadr(_G(font8x8));
 						_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 						calc_txt_xy(&x, &y, str_, anz);
 						for (i = 0; i < anz; i++)
-							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
+							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 					}
 				}
 			} else {
@@ -1527,7 +1527,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 					switch (i) {
 					case P_CHEWY:
 						xy = (int16
-						      *)chewy->image[_G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr]];
+						      *)_G(chewy)->image[_G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
@@ -1684,8 +1684,8 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 
 void calc_ani_timer() {
 	int16 i;
-	for (i = room->_roomTimer.TimerStart;
-	        i < room->_roomTimer.TimerStart + room->_roomTimer.TimerAnz; i++) {
+	for (i = _G(room)->_roomTimer.TimerStart;
+	        i < _G(room)->_roomTimer.TimerStart + _G(room)->_roomTimer.TimerAnz; i++) {
 		if (ani_timer[i].TimeFlag)
 			timer_action(i);
 	}
@@ -1747,7 +1747,7 @@ void set_ani_screen() {
 }
 
 void del_inventar(int16 nr) {
-	obj->del_inventar(nr, &room_blk);
+	_G(obj)->del_inventar(nr, &room_blk);
 	_G(spieler).inv_cur = false;
 	_G(menu_item) = CUR_WALK;
 	_G(spieler).AkInvent = -1;
@@ -1770,7 +1770,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 	bool found = true;
 
 	if (_G(menu_item) == CUR_WALK) {
-		nr = obj->is_exit(x, y);
+		nr = _G(obj)->is_exit(x, y);
 		attr = (nr >= 0 && nr < MAX_EXIT) ?
 			_G(spieler).room_e_obj[nr].Attribut : 0;
 
@@ -1813,7 +1813,7 @@ void calc_ausgang(int16 x, int16 y) {
 	int16 *ScrXy;
 	if (!flags.ExitMov) {
 		_G(maus_links_click) = false;
-		nr = obj->is_exit(x, y);
+		nr = _G(obj)->is_exit(x, y);
 		if (nr != -1) {
 			flags.ExitMov = true;
 			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
@@ -1824,10 +1824,10 @@ void calc_ausgang(int16 x, int16 y) {
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
 				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
-				room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-				set_person_pos(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
+				_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+				set_person_pos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               spieler_mi[_G(auto_p_nr)].HotMovX,
-				               Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
+				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
 				ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
 				get_scroll_off(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
@@ -1835,12 +1835,12 @@ void calc_ausgang(int16 x, int16 y) {
 				               ScrXy[0], ScrXy[1],
 				               &_G(spieler).scrollx, &_G(spieler).scrolly);
 
-				u_idx = ged->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
+				u_idx = _G(ged)->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
 				                      spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
-				                      room->_gedXAnz[room_blk.AkAblage],
+				                      _G(room)->_gedXAnz[room_blk.AkAblage],
 				                      _G(ged_mem)[room_blk.AkAblage]);
 				check_shad(u_idx, 0);
-				set_person_spr(Rdi->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
+				set_person_spr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				spieler_vector[P_CHEWY].DelayCount = 0;
 				_G(fx_blend) = BLEND1;
 				_G(auto_obj) = 0;
@@ -1954,12 +1954,12 @@ void auto_scroll(int16 scrx, int16 scry) {
 }
 
 void disable_timer() {
-	uhr->disable_timer();
+	_G(uhr)->disable_timer();
 	_G(FrameSpeedTmp) = _G(FrameSpeed);
 }
 
 void enable_timer() {
-	uhr->enable_timer();
+	_G(uhr)->enable_timer();
 	_G(FrameSpeed) = _G(FrameSpeedTmp);
 }
 
@@ -1970,7 +1970,7 @@ void calc_auto_go() {
 	    spieler_mi[_G(auto_p_nr)].HotMovX + (spieler_mi[_G(auto_p_nr)].HotX - spieler_mi[_G(auto_p_nr)].HotMovX - 1);
 	y_offset =
 	    spieler_mi[_G(auto_p_nr)].HotMovY + (spieler_mi[_G(auto_p_nr)].HotY - spieler_mi[_G(auto_p_nr)].HotMovY - 2);
-	if (mov->calc_auto_go(spieler_mi[_G(auto_p_nr)].XyzStart[0] + x_offset,
+	if (_G(mov)->calc_auto_go(spieler_mi[_G(auto_p_nr)].XyzStart[0] + x_offset,
 	                       spieler_mi[_G(auto_p_nr)].XyzStart[1] + y_offset,
 	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[0],
 	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[1]) != -1)
@@ -1979,7 +1979,7 @@ void calc_auto_go() {
 		spieler_mi[_G(auto_p_nr)].XyzStart[1] = spieler_vector[_G(auto_p_nr)].Xypos[1];
 		spieler_mi[_G(auto_p_nr)].XyzEnd[0] -= x_offset;
 		spieler_mi[_G(auto_p_nr)].XyzEnd[1] -= y_offset;
-		mov->get_mov_vector((int16
+		_G(mov)->get_mov_vector((int16
 		                     *)spieler_mi[_G(auto_p_nr)].XyzStart, spieler_mi[_G(auto_p_nr)].Vorschub, &spieler_vector[_G(auto_p_nr)])
 		;
 		get_phase(&spieler_vector[_G(auto_p_nr)], &spieler_mi[_G(auto_p_nr)]);
@@ -2026,10 +2026,10 @@ void set_person_rnr() {
 int16 is_chewy_busy() {
 	int16 ret;
 	ret = true;
-	if (!atds->ats_get_status()) {
-		if (atds->aad_get_status() == -1) {
-			if (atds->ads_get_status() == -1) {
-				if (!mov->auto_go_status()) {
+	if (!_G(atds)->ats_get_status()) {
+		if (_G(atds)->aad_get_status() == -1) {
+			if (_G(atds)->ads_get_status() == -1) {
+				if (!_G(mov)->auto_go_status()) {
 					if (!spieler_vector[P_CHEWY].Count) {
 						if (!flags.ExitMov) {
 							if (!_G(spz_ani)[P_CHEWY]) {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 27e770b1856..204270cf8dd 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -41,7 +41,7 @@ void plot_main_menu() {
 	}
 
 	maus_mov_menu();
-	korrektur = (int16 *)menutaf->korrektur;
+	korrektur = (int16 *)_G(menutaf)->korrektur;
 
 	for (i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
@@ -59,7 +59,7 @@ void plot_main_menu() {
 				deltaX = -40;
 		}
 
-		_G(out)->scale_set(menutaf->image[i],
+		_G(out)->scale_set(_G(menutaf)->image[i],
 			MENU_X + deltaX + korrektur[i * 2],
 		    _G(spieler).MainMenuY + korrektur[i * 2 + 1],
 			zoomx, zoomy, 0);
@@ -76,7 +76,7 @@ void plot_main_menu() {
 			deltaX = 40;
 
 		int img = IMAGES[_G(menu_item)];
-		_G(out)->scale_set(menutaf->image[img],
+		_G(out)->scale_set(_G(menutaf)->image[img],
 		    MENU_X + deltaX + korrektur[img * 2] - 5,
 		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
 			zoomx, zoomy, 0);
@@ -106,7 +106,7 @@ void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 	len = 0;
 	for (i = 0; i < txt_anz; i++) {
 
-		tmp_len = strlen(txt->str_pos((char *)txt_adr, i));
+		tmp_len = strlen(_G(txt)->str_pos((char *)txt_adr, i));
 		if (tmp_len > len)
 			len = tmp_len;
 	}
@@ -165,14 +165,14 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 	xy[3][1] = y + 16 * (yanz - 1);
 
 	for (i = 0; i < 4; i++)
-		_G(out)->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
+		_G(out)->sprite_set(_G(menutaf)->image[(int16)sprite_eckenr[i]],
 		                 xy[i][0], xy[i][1], _G(scr_width));
 
 	s_nr = BAU_MENU_SEITE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yanz - 2; i++) {
-			_G(out)->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
+			_G(out)->sprite_set(_G(menutaf)->image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
 		}
 		++s_nr;
 	}
@@ -182,7 +182,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xanz - 2; i++) {
-				_G(out)->sprite_set(menutaf->image[s_nr],
+				_G(out)->sprite_set(_G(menutaf)->image[s_nr],
 				                 xy[2][0] + 16 + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
@@ -208,18 +208,18 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN],
+				_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN],
 				                 x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
-		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
+		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_L],
 		                 xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < mitte; i++)
-			_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
+			_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_M],
 			                 x + i * 16, xy[0][1], _G(scr_width));
-		_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
+		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_R],
 		                 x + i * 16, xy[0][1], _G(scr_width));
 	}
 
@@ -235,7 +235,7 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 
 	x_pix = 0;
 	for (i = 0; i < zeilen_anz; i++) {
-		tmp = strlen(txt->str_pos(text, i));
+		tmp = strlen(_G(txt)->str_pos(text, i));
 		if (x_pix < tmp)
 			x_pix = tmp;
 	}
@@ -276,7 +276,7 @@ void ads_menu() {
 		else
 			cur_y = (cur_y_start + 5 - cur_y) / 10;
 
-		if (atds->aad_get_status() == -1 && _G(ads_push) == false &&
+		if (_G(atds)->aad_get_status() == -1 && _G(ads_push) == false &&
 		        flags.NoDiaBox == false) {
 			_G(cur_display) = true;
 
@@ -303,24 +303,24 @@ void ads_menu() {
 				_G(cur_display) = false;
 				_G(ads_push) = true;
 				minfo.y = 159;
-				an_blk = atds->ads_item_choice(_G(ads_blk_nr), cur_y);
+				an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
 				if (an_blk->BlkNr == -1) {
 					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					ads_ende(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					stop_ads_dialog();
 				} else {
-					an_blk = atds->calc_next_block(_G(ads_blk_nr), cur_y);
+					an_blk = _G(atds)->calc_next_block(_G(ads_blk_nr), cur_y);
 					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					_G(ads_blk_nr) = an_blk->BlkNr;
-					_G(ads_item_ptr) = atds->ads_item_ptr(_G(ads_blk_nr),
+					_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr),
 					                                  &_G(ads_item_anz));
 				}
-				det->stop_detail(_G(talk_start_ani));
-				det->show_static_spr(_G(talk_hide_static));
+				_G(det)->stop_detail(_G(talk_start_ani));
+				_G(det)->show_static_spr(_G(talk_hide_static));
 				_G(talk_start_ani) = -1;
 				_G(talk_hide_static) = -1;
 				if (flags.AdsDialog == false) {
-					atds->save_ads_header(_G(ads_dia_nr));
+					_G(atds)->save_ads_header(_G(ads_dia_nr));
 				}
 			}
 			break;
@@ -340,7 +340,7 @@ void stop_ads_dialog() {
 	flags.MainInput = true;
 	flags.AdsDialog = false;
 	_G(maus_links_click) = false;
-	atds->stop_ads();
+	_G(atds)->stop_ads();
 	if (minfo.button)
 		flags.main_maus_flag = 1;
 }
@@ -357,7 +357,7 @@ void cur_2_inventory() {
 
 void inventory_2_cur(int16 nr) {
 	if (_G(spieler).AkInvent == -1) {
-		if (obj->check_inventar(nr)) {
+		if (_G(obj)->check_inventar(nr)) {
 			del_invent_slot(nr);
 			_G(menu_item) = CUR_USE;
 			_G(spieler).AkInvent = nr;
@@ -369,7 +369,7 @@ void inventory_2_cur(int16 nr) {
 
 void new_invent_2_cur(int16 inv_nr) {
 	cur_2_inventory();
-	obj->add_inventar(inv_nr, &room_blk);
+	_G(obj)->add_inventar(inv_nr, &room_blk);
 	inventory_2_cur(inv_nr);
 }
 
@@ -383,7 +383,7 @@ void invent_2_slot(int16 nr) {
 			ok = true;
 		}
 	}
-	obj->add_inventar(nr, &room_blk);
+	_G(obj)->add_inventar(nr, &room_blk);
 }
 
 int16 del_invent_slot(int16 nr) {
@@ -405,7 +405,7 @@ void remove_inventory(int16 nr) {
 	if (nr == _G(spieler).AkInvent) {
 		del_inventar(nr);
 	} else {
-		obj->del_inventar(nr, &room_blk);
+		_G(obj)->del_inventar(nr, &room_blk);
 		del_invent_slot(nr);
 	}
 }
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index e211e92bc15..f64e009bf75 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -225,7 +225,7 @@ void MovClass::calc_xy() {
 	int16 yvector = 0;
 	int16 tmp_feld;
 
-	if (!ged->ged_idx(_gpkt->Dx, _gpkt->Dy, _gpkt->Breite, _gpkt->Mem)) {
+	if (!_G(ged)->ged_idx(_gpkt->Dx, _gpkt->Dy, _gpkt->Breite, _gpkt->Mem)) {
 		ende = 0;
 		count = 0;
 		min_x = -1;
@@ -267,7 +267,7 @@ void MovClass::calc_xy() {
 				for (i = 0; i < anz; i++) {
 					if (x >= 0 && x < _gpkt->Breite * 8 &&
 					        y >= 0 && y < _gpkt->Hoehe * 8) {
-						if (ged->ged_idx(x, y, _gpkt->Breite, _gpkt->Mem)) {
+						if (_G(ged)->ged_idx(x, y, _gpkt->Breite, _gpkt->Mem)) {
 							aksteps = abs(_gpkt->Dx - x);
 							aksteps += abs(_gpkt->Dy - y);
 							if (aksteps < min_steps) {
@@ -356,15 +356,15 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 			}
 
 			tmpz = 0;
-			if (!ged->ged_idx(om.Xypos[0] + tmpx + tmpz,
+			if (!_G(ged)->ged_idx(om.Xypos[0] + tmpx + tmpz,
 			                  om.Xypos[1] + tmpy + tmpz,
 			                  _gpkt->Breite, _gpkt->Mem)) {
 
-				if (!ged->ged_idx(om.Xypos[0] + tmpx + tmpz,
+				if (!_G(ged)->ged_idx(om.Xypos[0] + tmpx + tmpz,
 				                  om.Xypos[1] + tmpz,
 				                  _gpkt->Breite, _gpkt->Mem)) {
 
-					if (!ged->ged_idx(om.Xypos[0] + tmpz,
+					if (!_G(ged)->ged_idx(om.Xypos[0] + tmpz,
 					                  om.Xypos[1] + tmpy + tmpz,
 					                  _gpkt->Breite, _gpkt->Mem)) {
 
@@ -464,12 +464,12 @@ void MovClass::get_mov_line() {
 		while (!ende) {
 
 			tmp_feld = start_feld + count * count_vect;
-			if (ged->ged_idx(tmp_feld, _gpkt->Breite, _gpkt->Mem)) {
+			if (_G(ged)->ged_idx(tmp_feld, _gpkt->Breite, _gpkt->Mem)) {
 				abbruch = 0;
 				vector = 0;
 				while ((tmp_feld % _gpkt->Breite) < (_gpkt->Breite - 1) && !abbruch)
 				{
-					if (ged->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
+					if (_G(ged)->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
 						tmp_feld += vector;
 						if (speicher[tmp_feld] == MOV_LINE_IDX) {
 							ak_steps = abs((tmp_feld % _gpkt->Breite) - (start_feld % _gpkt->Breite));
@@ -490,7 +490,7 @@ void MovClass::get_mov_line() {
 				vector = LEFT_VECT;
 				abbruch = 0;
 				while ((tmp_feld % _gpkt->Breite) > 0 && !abbruch) {
-					if (ged->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
+					if (_G(ged)->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
 						tmp_feld += vector;
 						if (speicher[tmp_feld] == MOV_LINE_IDX) {
 							ak_steps = abs((tmp_feld % _gpkt->Breite) - (start_feld % _gpkt->Breite));
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index 7fc603ce57b..def33f7c57a 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -368,25 +368,25 @@ void Object::calc_static_detail(int16 det_nr) {
 
 						if (nr >= 40) {
 							n = nr - 40;
-							adi = det->get_ani_detail(n);
+							adi = _G(det)->get_ani_detail(n);
 							if (adi->repeat)
-								det->start_detail(n, 0, ANI_VOR);
+								_G(det)->start_detail(n, 0, ANI_VOR);
 							else
-								det->start_detail(n, 1, ANI_VOR);
+								_G(det)->start_detail(n, 1, ANI_VOR);
 						} else
-							det->show_static_spr(nr);
+							_G(det)->show_static_spr(nr);
 						++i;
 					}
 				}
 			} else if (nr >= 40) {
 				n = nr - 40;
-				adi = det->get_ani_detail(n);
+				adi = _G(det)->get_ani_detail(n);
 				if (adi->repeat)
-					det->start_detail(n, 0, ANI_VOR);
+					_G(det)->start_detail(n, 0, ANI_VOR);
 				else
-					det->start_detail(n, 1, ANI_VOR);
+					_G(det)->start_detail(n, 1, ANI_VOR);
 			} else {
-				det->show_static_spr(nr);
+				_G(det)->show_static_spr(nr);
 			}
 		}
 
@@ -403,16 +403,16 @@ void Object::calc_static_detail(int16 det_nr) {
 						nr = SIB_ZUSTAND_TBL[i];
 
 						if (nr >= 40)
-							det->stop_detail(nr - 40);
+							_G(det)->stop_detail(nr - 40);
 						else
-							det->hide_static_spr(nr);
+							_G(det)->hide_static_spr(nr);
 						++i;
 					}
 				}
 			} else if (nr >= 40)
-				det->stop_detail(nr - 40);
+				_G(det)->stop_detail(nr - 40);
 			else {
-				det->hide_static_spr(nr);
+				_G(det)->hide_static_spr(nr);
 			}
 		}
 	}
@@ -505,7 +505,7 @@ int16 Object::del_obj_use(int16 nr) {
 void Object::add_inventar(int16 nr, RaumBlk *Rb) {
 	Player->room_m_obj[nr].RoomNr = 255;
 	sort();
-	room->calc_invent(Rb, Player);
+	_G(room)->calc_invent(Rb, Player);
 
 }
 
@@ -519,7 +519,7 @@ void Object::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
 	Player->room_m_obj[old_inv].RoomNr = -1;
 	Player->room_m_obj[new_inv].RoomNr = 255;
 	sort();
-	room->calc_invent(Rb, Player);
+	_G(room)->calc_invent(Rb, Player);
 
 }
 
@@ -532,7 +532,7 @@ void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
 	Player->room_m_obj[nr].X = x;
 	Player->room_m_obj[nr].Y = y;
 	Player->room_m_obj[nr].AutoMov = automov;
-	room->calc_invent(Rb, Player);
+	_G(room)->calc_invent(Rb, Player);
 	sort();
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 84d5d66f0ac..209b27c6acf 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -53,7 +53,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 
 	case ROOM_8_17:
 		start_aad(100, 0);
-		det->start_detail(21, 4, ANI_VOR);
+		_G(det)->start_detail(21, 4, ANI_VOR);
 		break;
 
 	case ROOM_18_20:
@@ -91,7 +91,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 }
 
 void timer_action(int16 t_nr) {
-	int16 ani_nr = t_nr - room->_roomTimer.TimerStart;
+	int16 ani_nr = t_nr - _G(room)->_roomTimer.TimerStart;
 	bool default_flag = false;
 
 	if (g_engine->_sound->isSpeechActive())
@@ -122,8 +122,8 @@ void timer_action(int16 t_nr) {
 #undef TIMER
 
 	if (default_flag && flags.AutoAniPlay == false) {
-		det->start_detail(room->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
-		uhr->reset_timer(t_nr, 0);
+		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
+		_G(uhr)->reset_timer(t_nr, 0);
 	}
 
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -309,8 +309,8 @@ void enter_room(int16 eib_nr) {
 	if (!_G(modul))
 		load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
-	atds->stop_aad();
-	atds->stop_ats();
+	_G(atds)->stop_aad();
+	_G(atds)->stop_ats();
 	_G(spieler).DiaAMov = -1;
 	_G(zoom_mov_fak) = 1;
 
@@ -322,10 +322,10 @@ void enter_room(int16 eib_nr) {
 
 	flags.ZoomMov = false;
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)room->_roomInfo->ZoomFak;
-	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)room->_roomInfo->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)_G(room)->_roomInfo->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)_G(room)->_roomInfo->ZoomFak;
 
-	uhr->reset_timer(0, 0);
+	_G(uhr)->reset_timer(0, 0);
 	flags.AutoAniPlay = false;
 	_G(SetUpScreenFunc) = nullptr;
 	_G(HowardMov) = 0;
@@ -456,7 +456,7 @@ void exit_room(int16 eib_nr) {
 	int16 x, y;
 	int16 no_exit;
 	no_exit = false;
-	det->disable_room_sound();
+	_G(det)->disable_room_sound();
 
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 	case 6:
@@ -465,7 +465,7 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 11:
-		atds->set_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
 	case 13:
@@ -666,7 +666,7 @@ void exit_room(int16 eib_nr) {
 	case 75:
 		x = 160;
 		y = 200;
-		det->show_static_spr(4);
+		_G(det)->show_static_spr(4);
 		break;
 
 	case 84:
@@ -682,20 +682,20 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 86:
-		det->show_static_spr(0);
+		_G(det)->show_static_spr(0);
 		x = spieler_vector[P_CHEWY].Xypos[0] - 44;
 		y = spieler_vector[P_CHEWY].Xypos[1];
 		_G(HowardMov) = 2;
 		break;
 
 	case 90:
-		det->show_static_spr(8);
+		_G(det)->show_static_spr(8);
 		x = spieler_vector[P_CHEWY].Xypos[0] - 60;
 		y = spieler_vector[P_CHEWY].Xypos[1];
 		break;
 
 	case 94:
-		det->show_static_spr(3);
+		_G(det)->show_static_spr(3);
 		x = spieler_vector[P_CHEWY].Xypos[0] - 40;
 		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
 		break;
@@ -703,7 +703,7 @@ void exit_room(int16 eib_nr) {
 	case 127:
 		x = 196;
 		y = 133;
-		det->show_static_spr(0);
+		_G(det)->show_static_spr(0);
 		break;
 
 	case 132:
@@ -780,11 +780,11 @@ void print_rows(int16 id) {
 
 	_G(out)->set_fontadr(_G(font8x8));
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-	txtStr = atds->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
+	txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
 	_G(out)->setze_zeiger(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
-		s = txt->str_pos(txtStr, i);
+		s = _G(txt)->str_pos(txtStr, i);
 		len = (strlen(s) * _G(fvorx8x8)) / 2;
 
 		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
@@ -794,7 +794,7 @@ void print_rows(int16 id) {
 int16 flic_user_function(int16 keys) {
 	int ret;
 
-	if (atds->aad_get_status() != -1) {
+	if (_G(atds)->aad_get_status() != -1) {
 		switch (_G(flic_val1)) {
 		case 579:
 		case 584:
@@ -807,11 +807,11 @@ int16 flic_user_function(int16 keys) {
 		}
 	}
 
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (_G(flic_val1) == 593 && keys == 35)
-		atds->stop_aad();
+		_G(atds)->stop_aad();
 	if (_G(flic_val1) == 594 && keys == 18)
-		atds->stop_aad();
+		_G(atds)->stop_aad();
 
 	ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	if (_G(flic_val2) == 140 && keys == 15)
@@ -820,7 +820,7 @@ int16 flic_user_function(int16 keys) {
 		ret = -2;
 	if (_G(flic_val2) == 145 || _G(flic_val2) == 142 ||
 			_G(flic_val2) == 141 || _G(flic_val2) == 146) {
-		if (atds->aad_get_status() == -1)
+		if (_G(atds)->aad_get_status() == -1)
 			ret = -2;
 	}
 
@@ -850,8 +850,8 @@ static void flic_proc1() {
 	};
 	int16 ret = 0;
 
-	atds->load_atds(98, AAD_DATEI);
-	flc->set_custom_user_function(flic_user_function);
+	_G(atds)->load_atds(98, AAD_DATEI);
+	_G(flc)->set_custom_user_function(flic_user_function);
 	load_room_music(258);
 
 	for (int i = 0; i < 29 && ret != -1; ++i) {
@@ -875,23 +875,23 @@ static void flic_proc1() {
 			_G(flic_val2) = VALS1[i];
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, _G(flic_val2));
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			g_engine->playVideo(_G(flic_val2));
 #endif
-			flag = VALS4[i] && atds->aad_get_status() != -1;
+			flag = VALS4[i] && _G(atds)->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
-		atds->stop_aad();
+		_G(atds)->stop_aad();
 	}
 
-	flc->remove_custom_user_function();
+	_G(flc)->remove_custom_user_function();
 	if (ret == -1) {
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		_G(out)->raster_col(254, 62, 35, 7);
 		start_aad(595);
-		atds->print_aad(254, 0);
+		_G(atds)->print_aad(254, 0);
 
 		if (_G(spieler).SpeechSwitch) {
 			g_engine->_sound->waitForSpeechToFinish();
@@ -922,7 +922,7 @@ void flic_cut(int16 nr, int16 mode) {
 	int16 i, ret = 0;
 
 	_G(out)->setze_zeiger(nullptr);
-	det->disable_room_sound();
+	_G(det)->disable_room_sound();
 	_G(sndPlayer)->endSound();
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
@@ -975,12 +975,12 @@ void flic_cut(int16 nr, int16 mode) {
 			do {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
 #endif
-			} while (atds->aad_get_status() != -1 && ret != -1);
+			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 			break;
 
 		case FCUT_034:
@@ -990,12 +990,12 @@ void flic_cut(int16 nr, int16 mode) {
 			do {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
 #endif
-			} while (atds->aad_get_status() != -1 && ret != -1);
+			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 			break;
 
 		case FCUT_053:
@@ -1026,9 +1026,9 @@ void flic_cut(int16 nr, int16 mode) {
 					start_aad(623, -1);
 #ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
-					flc->set_custom_user_function(Room43::setup_func);
-					flc->custom_play(&Ci);
-					flc->remove_custom_user_function();
+					_G(flc)->set_custom_user_function(Room43::setup_func);
+					_G(flc)->custom_play(&Ci);
+					_G(flc)->remove_custom_user_function();
 #else
 					g_engine->playVideo(FCUT_061);
 #endif
@@ -1067,10 +1067,10 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 
 		case FCUT_095:
-			while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
+			while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(nr);
 #endif
@@ -1081,9 +1081,9 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 			_G(mem)->file->select_pool_item(Ci.Handle, nr);
-			flc->custom_play(&Ci);
+			_G(flc)->custom_play(&Ci);
 #else
 			playVideo(nr);
 			playVideo(nr);
@@ -1103,7 +1103,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_133[i]);
@@ -1120,22 +1120,22 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case 1003:
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			print_rows(590);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 1);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			g_engine->playVideo(FCUT_001);
 #endif
 
 			if (ret != -1) {
 				for (i = 0; i < 3 && ret != -1; ++i) {
-					fx->border(_G(workpage), 100, 0, 0);
+					_G(fx)->border(_G(workpage), 100, 0, 0);
 					print_rows(591);
 #ifndef NEW_VIDEO_CODE
 					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
-					ret = flc->custom_play(&Ci);
+					ret = _G(flc)->custom_play(&Ci);
 					SHOULD_QUIT_RETURN;
 #else
 					playVideo(i + 3);
@@ -1146,10 +1146,10 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1006:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 6);
@@ -1161,7 +1161,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 9);
@@ -1171,11 +1171,11 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1012:
 			for (i = 0; i < 3 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 #else
 				playVideo(i + 12);
 #endif
@@ -1185,20 +1185,20 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(out)->cls();
 				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
 			_G(out)->cls();
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 #endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 15);
@@ -1208,7 +1208,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1045:
 			for (i = 0; i < 11 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 				print_rows(594);
 				if (FLIC_CUT_1045[i] == 53) {
 					_G(sndPlayer)->stopMod();
@@ -1218,7 +1218,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1045[i]);
@@ -1234,10 +1234,10 @@ void flic_cut(int16 nr, int16 mode) {
 			g_engine->playVideo(FCUT_031);
 
 			if (ret != -1) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 43);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 #else
 				playVideo(43);
 #endif
@@ -1247,17 +1247,17 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1048:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 50);
-			flc->custom_play(&Ci);
+			_G(flc)->custom_play(&Ci);
 #else
 			playVideo(50);
 #endif
 
 			if (ret != -1) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 48);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 #else
 				playVideo(48);
 #endif
@@ -1265,7 +1265,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 49);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(49);
 #endif
@@ -1273,25 +1273,25 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
-				ret = flc->custom_play(&Ci);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
+				ret = _G(flc)->custom_play(&Ci);
 			}
 			if (ret != -1) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 54);
 			}
 #else
-			fx->spr_blende(_G(workpage), 100, false, 0);
+			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(nr);
 #endif
 			break;
 
 		case 1055:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 55);
@@ -1302,7 +1302,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 46);
 #endif
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 			break;
 
@@ -1312,7 +1312,7 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(255);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 58);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(58);
 #endif
@@ -1320,7 +1320,7 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 59);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(59);
 #endif
@@ -1328,25 +1328,25 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 60);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(60);
 #endif
 			}
 			if (ret != -1) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 61);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(61);
 #endif
 			}
 			if (ret != -1) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 62);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(62);
 #endif
@@ -1361,7 +1361,7 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 65);
@@ -1372,16 +1372,16 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1068:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 68);
-			flc->custom_play(&Ci);
+			_G(flc)->custom_play(&Ci);
 #else
 			playVideo(68);
 #endif
 
 			if (ret != -1) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 70);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(70);
@@ -1392,16 +1392,16 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1069:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 69);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(69);
 #endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 #else
 				playVideo(i + 71);
 #endif
@@ -1410,12 +1410,12 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1074:
 			for (i = 0; i < 4 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 				print_rows(605);
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + FLIC_CUT_1074[i]);
@@ -1425,10 +1425,10 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1080:
 			for (i = 0; i < 8 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1080[i]);
@@ -1439,16 +1439,16 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1087:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 87);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(87);
 #endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 102);
@@ -1459,16 +1459,16 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1088:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 88);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(88);
 #endif
 
 			if (ret != -1) {
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, 86);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 #else
 				playVideo(86);
 #endif
@@ -1489,7 +1489,7 @@ void flic_cut(int16 nr, int16 mode) {
 					break;
 				}
 
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 			}
 			break;
@@ -1499,7 +1499,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
 				_G(out)->cls();
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1106[i]);
@@ -1510,7 +1510,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1107:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(107);
 #endif
@@ -1518,10 +1518,10 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 109);
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			//playVideo(109);
 #endif
 			break;
@@ -1529,7 +1529,7 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1108:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 108);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(108);
 #endif
@@ -1537,11 +1537,11 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(Ci.Handle, 115);
-				fx->spr_blende(_G(workpage), 100, false, 0);
-				flc->custom_play(&Ci);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
+				_G(flc)->custom_play(&Ci);
 			}
 #else
-			fx->spr_blende(_G(workpage), 100, false, 0);
+			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(115);
 #endif
 			break;
@@ -1553,7 +1553,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->setMusicMasterVol(20);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(Ci.Handle, 110);
-			ret = flc->custom_play(&Ci);
+			ret = _G(flc)->custom_play(&Ci);
 #else
 			playVideo(110);
 #endif
@@ -1561,13 +1561,13 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(sndPlayer)->setMusicMasterVol(63);
-				fx->spr_blende(_G(workpage), 100, false, 0);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 112);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 			}
 #else
 			ailsnd->setMusicMasterVol(63);
-			fx->spr_blende(_G(workpage), 100, false, 0);
+			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 			playVideo(112);
 #endif
 			_G(sndPlayer)->stopMod();
@@ -1578,7 +1578,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
 				_G(out)->cls();
-				ret = flc->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&Ci);
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1113[i]);
@@ -1589,12 +1589,12 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1117:
 #ifndef NEW_VIDEO_CODE
 			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
-				fx->border(_G(workpage), 100, 0, 0);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 				_G(mem)->file->select_pool_item(Ci.Handle, 119);
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 			}
 #else
-			fx->border(_G(workpage), 100, 0, 0);
+			_G(fx)->border(_G(workpage), 100, 0, 0);
 			playVideo(119);
 #endif
 			break;
@@ -1606,10 +1606,10 @@ void flic_cut(int16 nr, int16 mode) {
 
 			switch (mode) {
 			case 0:
-				flc->custom_play(&Ci);
+				_G(flc)->custom_play(&Ci);
 				break;
 			case 1:
-				flc->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				_G(flc)->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
 				break;
 			default:
 				break;
@@ -1636,16 +1636,16 @@ void flic_cut(int16 nr, int16 mode) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
 
 		if (_G(spieler).SpeechSwitch)
-			det->enable_room_sound();
+			_G(det)->enable_room_sound();
 
-		uhr->reset_timer(0, 0);
+		_G(uhr)->reset_timer(0, 0);
 	}
 
 	if (!flags.NoPalAfterFlc)
 		_G(out)->set_palette(_G(pal));
 
-	atds->stop_aad();
-	atds->stop_ats();
+	_G(atds)->stop_aad();
+	_G(atds)->stop_ats();
 	_G(out)->setze_zeiger(_G(workptr));
 	flags.NoPalAfterFlc = false;
 }
@@ -1654,12 +1654,12 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
                         int16 ats_nr1, int16 ats_nr2, int16 sib_nr,
                         int16 spr_nr1, int16 spr_nr2, int16 flag) {
 	if (ani_nr != -1)
-		det->start_detail(ani_nr, 1, flag);
+		_G(det)->start_detail(ani_nr, 1, flag);
 	flag ^= 1;
 	if (ats_nr1 != -1)
-		atds->set_ats_str(ats_nr1, flag, ATS_DATEI);
+		_G(atds)->set_ats_str(ats_nr1, flag, ATS_DATEI);
 	if (ats_nr2 != -1)
-		atds->set_ats_str(ats_nr2, flag, ATS_DATEI);
+		_G(atds)->set_ats_str(ats_nr2, flag, ATS_DATEI);
 	if (flag) {
 		if (eib_nr1 != -1)
 			_G(spieler).room_e_obj[eib_nr1].Attribut = spr_nr1;
@@ -1672,7 +1672,7 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
 			_G(spieler).room_e_obj[eib_nr1].Attribut = 255;
 	}
 	if (sib_nr != -1)
-		obj->calc_rsi_flip_flop(sib_nr);
+		_G(obj)->calc_rsi_flip_flop(sib_nr);
 
 	return (uint16)flag;
 }
@@ -1683,29 +1683,29 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	switch (sib_nr) {
 	case SIB_KABEL_R1:
-		atds->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATEI);
 		break;
 
 	case SIB_MONOKEL:
 		_G(spieler).R0Monokel = true;
-		obj->hide_sib(SIB_MONOKEL);
+		_G(obj)->hide_sib(SIB_MONOKEL);
 		if (_G(spieler).R0GBuch)
-			atds->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
 	case SIB_GBUCH:
 		_G(spieler).R0GBuch = true;
-		obj->hide_sib(SIB_GBUCH);
+		_G(obj)->hide_sib(SIB_GBUCH);
 		if (_G(spieler).R0Monokel)
-			atds->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
 	case SIB_TERMINAL_R5:
 		if (_G(spieler).R5Terminal) {
 			_G(spieler).R5Terminal = 0;
-			det->stop_detail(6);
-			atds->set_ats_str(27, TXT_MARK_LOOK, 0, ATS_DATEI);
-			atds->set_ats_str(30, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(det)->stop_detail(6);
+			_G(atds)->set_ats_str(27, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(30, TXT_MARK_LOOK, 0, ATS_DATEI);
 		}
 		break;
 
@@ -1714,11 +1714,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SEIL:
-		obj->hide_sib(SIB_SEIL);
+		_G(obj)->hide_sib(SIB_SEIL);
 		break;
 
 	case SIB_BOLA_SCHACHT:
-		atds->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATEI);
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
@@ -1735,11 +1735,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(spieler).R7Hebel ^= 1;
 
 		if (!_G(spieler).R7Hebel)
-			atds->set_ats_str(50, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 0, ATS_DATEI);
 		else if (!_G(spieler).R7BorkFlug)
-			atds->set_ats_str(50, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 1, ATS_DATEI);
 		else
-			atds->set_ats_str(50, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 2, ATS_DATEI);
 		break;
 
 	case SIB_KLINGEL_R7:
@@ -1748,8 +1748,8 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_GIPS_R7:
 		_G(spieler).R7RHaken = true;
-		obj->show_sib(SIB_RHAKEN_R7);
-		obj->hide_sib(SIB_GIPS_R7);
+		_G(obj)->show_sib(SIB_RHAKEN_R7);
+		_G(obj)->hide_sib(SIB_GIPS_R7);
 		break;
 
 	case SIB_TKNOPF2_R7:
@@ -1759,7 +1759,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SCHLOTT_R7:
-		obj->hide_sib(SIB_SCHLOTT_R7);
+		_G(obj)->hide_sib(SIB_SCHLOTT_R7);
 		break;
 
 	case SIB_LHAKEN_R7:
@@ -1767,15 +1767,15 @@ int16 sib_event_no_inv(int16 sib_nr) {
 			if (_G(spieler).R7RHaken) {
 				_G(spieler).R7SeilOk = true;
 				auto_move(4, P_CHEWY);
-				obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
-				obj->calc_rsi_flip_flop(SIB_RHAKEN_R7);
-				atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
-				atds->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
-				atds->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
+				_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
+				_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
+				_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
 				start_aad(9);
 			} else {
-				obj->set_rsi_flip_flop(SIB_LHAKEN_R7, 2);
-				obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
+				_G(obj)->set_rsi_flip_flop(SIB_LHAKEN_R7, 2);
+				_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 			}
 		}
 		break;
@@ -1791,7 +1791,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_DEE_PAINT_R9:
-		obj->hide_sib(SIB_DEE_PAINT_R9);
+		_G(obj)->hide_sib(SIB_DEE_PAINT_R9);
 		break;
 
 	case SIB_SCHLITZ_R11:
@@ -1803,15 +1803,15 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				det->start_detail(i, 255, ANI_VOR);
+				_G(det)->start_detail(i, 255, ANI_VOR);
 		} else {
 			for (int i = 0; i < 5; ++i)
-				det->stop_detail(i);
+				_G(det)->stop_detail(i);
 		}
 
-		atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-		atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-		atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		break;
 
 	case SIB_CARTRIDGE_R23:
@@ -1820,49 +1820,49 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = false;
-		atds->set_ats_str(112, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(112, 0, ATS_DATEI);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
-		atds->set_ats_str(113, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(113, 1, ATS_DATEI);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TALISMAN_R12:
 		_G(spieler).R12Talisman = true;
-		obj->hide_sib(SIB_TALISMAN_R12);
-		_G(timer_nr)[0] = room->set_timer(255, 20);
+		_G(obj)->hide_sib(SIB_TALISMAN_R12);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
 		break;
 
 	case SIB_GITTER_R16:
-		atds->set_ats_str(125, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(125, 1, ATS_DATEI);
 		_G(spieler).room_e_obj[33].Attribut = AUSGANG_OBEN;
 		break;
 
 	case SIB_SCHALTER1_R21:
-		det->start_detail(0, 1, _G(spieler).R21Hebel1);
+		_G(det)->start_detail(0, 1, _G(spieler).R21Hebel1);
 		_G(spieler).R21Hebel1 ^= 1;
 		Room21::calc_laser();
-		atds->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATEI);
+		_G(atds)->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATEI);
 		break;
 
 	case SIB_SCHALTER2_R21:
-		det->start_detail(1, 1, _G(spieler).R21Hebel2);
+		_G(det)->start_detail(1, 1, _G(spieler).R21Hebel2);
 		_G(spieler).R21Hebel2 ^= 1;
 		Room21::calc_laser();
-		atds->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATEI);
+		_G(atds)->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATEI);
 		break;
 
 	case SIB_SCHALTER3_R21:
-		det->start_detail(2, 1, _G(spieler).R21Hebel3);
+		_G(det)->start_detail(2, 1, _G(spieler).R21Hebel3);
 		_G(spieler).R21Hebel3 ^= 1;
 		Room21::calc_laser();
-		atds->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATEI);
+		_G(atds)->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATEI);
 		break;
 
 	case SIB_SEIL_R21:
-		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
 	case SIB_GITTER1_R21:
@@ -1870,7 +1870,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_CART1_R18:
-		atds->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATEI);
 		break;
 
 	case SIB_TUERKNOPF_R18:
@@ -1896,7 +1896,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = 0;
 		cur_2_inventory();
-		atds->set_ats_str(157, 1, AAD_DATEI);
+		_G(atds)->set_ats_str(157, 1, AAD_DATEI);
 		break;
 
 	case SIB_SCHLAUCH_R26:
@@ -1915,23 +1915,23 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case SIB_PIRANHA:
 	case SIB_SCHALL:
 	case SIB_ARTEFAKT:
-		obj->hide_sib(sib_nr);
+		_G(obj)->hide_sib(sib_nr);
 		break;
 
 	case SIB_PUTE_R34:
-		atds->set_ats_str(226, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(226, 1, ATS_DATEI);
 		break;
 
 	case SIB_TOPF_R31:
-		obj->hide_sib(SIB_TOPF_R31);
-		atds->set_ats_str(242, 1, ATS_DATEI);
+		_G(obj)->hide_sib(SIB_TOPF_R31);
+		_G(atds)->set_ats_str(242, 1, ATS_DATEI);
 		_G(spieler).R31PflanzeWeg = true;
 		break;
 
 	case SIB_HFUTTER1_R37:
 	case SIB_HFUTTER2_R37:
-		obj->hide_sib(74);
-		obj->hide_sib(75);
+		_G(obj)->hide_sib(74);
+		_G(obj)->hide_sib(75);
 		break;
 
 	case SIB_SURIMY_R27:
@@ -1939,16 +1939,16 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_MUENZE_R40:
-		obj->hide_sib(sib_nr);
-		det->del_static_ani(6);
-		room->set_timer_status(6, TIMER_STOP);
+		_G(obj)->hide_sib(sib_nr);
+		_G(det)->del_static_ani(6);
+		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(spieler).R40Geld = true;
 		start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(201, -1);
 		break;
 
 	case SIB_VISIT_R53:
-		obj->hide_sib(sib_nr);
+		_G(obj)->hide_sib(sib_nr);
 		_G(spieler).R53Visit = true;
 		break;
 
@@ -1957,24 +1957,24 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_LAMPE_R52:
-		atds->del_steuer_bit(338, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(338, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R52LichtAn ^= 1;
 		check_shad(2 * (_G(spieler).R52LichtAn + 1), 1);
 		break;
 
 	case SIB_KAUTABAK_R56:
-		obj->hide_sib(sib_nr);
+		_G(obj)->hide_sib(sib_nr);
 		_G(spieler).R56GetTabak = true;
 		break;
 
 	case SIB_ASCHE_R64:
-		det->stop_detail(0);
-		obj->hide_sib(sib_nr);
+		_G(det)->stop_detail(0);
+		_G(obj)->hide_sib(sib_nr);
 		Room64::talk_man(351);
 		break;
 
 	case 94:
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 		_G(cur_hide_flag) = false;
 		hide_cur();
 		start_aad_wait(406, -1);
@@ -2004,9 +2004,9 @@ void sib_event_inv(int16 sib_nr) {
 			cur_2_inventory();
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
-			det->start_detail(6, 255, ANI_VOR);
-			atds->set_ats_str(27, 1, ATS_DATEI);
-			atds->set_ats_str(30, 1, ATS_DATEI);
+			_G(det)->start_detail(6, 255, ANI_VOR);
+			_G(atds)->set_ats_str(27, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(30, 1, ATS_DATEI);
 		}
 		break;
 
@@ -2028,10 +2028,10 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_BOLA_KNOPF_R6:
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R6BolaSchild = true;
-		det->show_static_spr(2);
-		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-		obj->hide_sib(SIB_BOLA_KNOPF_R6);
-		obj->show_sib(SIB_BOLA_R6);
+		_G(det)->show_static_spr(2);
+		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+		_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
+		_G(obj)->show_sib(SIB_BOLA_R6);
 		break;
 
 	case SIB_LHAKEN_R7:
@@ -2080,13 +2080,13 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = true;
 		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(112, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(112, 1, ATS_DATEI);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
 		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(113, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(113, 0, ATS_DATEI);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
@@ -2097,7 +2097,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_ROEHRE_R12:
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
-		atds->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(115, 0);
 
@@ -2108,7 +2108,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_GITTER2_R21:
 		_G(spieler).R21GitterMuell = exit_flip_flop(-1, 46, 27, 132, 90, -1,
 			AUSGANG_RECHTS, AUSGANG_RECHTS, _G(spieler).R21GitterMuell);
-		atds->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATEI);
 		break;
 
 	case SIB_CART_FACH_R18:
@@ -2116,12 +2116,12 @@ void sib_event_inv(int16 sib_nr) {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = true;
 		del_inventar(_G(spieler).AkInvent);
-		det->show_static_spr(7);
-		atds->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(det)->show_static_spr(7);
+		_G(atds)->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
 
 		if (_G(spieler).R18CartTerminal) {
 			_G(spieler).R18CartSave = true;
-			atds->set_ats_str(26, 1, INV_ATS_DATEI);
+			_G(atds)->set_ats_str(26, 1, INV_ATS_DATEI);
 			start_aad_wait(120, -1);
 		} else {
 			start_aad_wait(121, -1);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index f860e1c60ee..beb6950b4d3 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -181,24 +181,24 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	_G(fcode) = 0;
 
 	clear_prog_ani();
-	det->load_rdi(Rb->DetFile, room_nr);
+	_G(det)->load_rdi(Rb->DetFile, room_nr);
 
 	if (player->SoundSwitch == false)
-		det->disable_room_sound();
+		_G(det)->disable_room_sound();
 	if (!_G(modul)) {
-		RoomDetailInfo *Rdi_ = det->get_room_detail_info();
+		RoomDetailInfo *Rdi_ = _G(det)->get_room_detail_info();
 		_roomInfo = &Rdi_->Ri;
 		if (_roomInfo->TafLoad != 255) {
 			char tmp_str[MAXPATH];
 			strcpy(tmp_str, Rb->RoomDir);
 			strcat(tmp_str, _roomInfo->TafName);
-			det->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
-			Rb->Fti = det->get_taf_info();
+			_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
+			Rb->Fti = _G(det)->get_taf_info();
 			Rb->DetImage = Rb->Fti->image;
 			Rb->DetKorrekt = Rb->Fti->korrektur;
 		}
 		if (!_G(modul)) {
-			obj->calc_all_static_detail();
+			_G(obj)->calc_all_static_detail();
 			load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
 			set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
 			calc_invent(Rb, player);
@@ -210,12 +210,12 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 			if (!_G(modul)) {
 				if (Rb->AtsLoad)
-					atds->load_atds(_roomInfo->RoomNr, ATS_DATEI);
+					_G(atds)->load_atds(_roomInfo->RoomNr, ATS_DATEI);
 			}
 
 			if (!_G(modul)) {
 				if (Rb->AadLoad)
-					atds->load_atds(_roomInfo->RoomNr, AAD_DATEI);
+					_G(atds)->load_atds(_roomInfo->RoomNr, AAD_DATEI);
 			}
 		}
 	}
@@ -229,18 +229,18 @@ void Room::add_timer_new_room() {
 	_roomTimer.TimerAnz = 0;
 
 	for (int i = 0; i < MAXDETAILS && _roomTimer.TimerAnz < MAX_ROOM_TIMER; i++) {
-		AniDetailInfo *adi = det->get_ani_detail(i);
+		AniDetailInfo *adi = _G(det)->get_ani_detail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
-			det->start_detail(i, 0, ANI_VOR);
+			_G(det)->start_detail(i, 0, ANI_VOR);
 		}
 	}
 }
 
 void Room::del_timer_old_room() {
 	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
-		uhr->set_status(_roomTimer.TimerNr[i], TIMER_STOP);
+		_G(uhr)->set_status(_roomTimer.TimerNr[i], TIMER_STOP);
 
 	}
 
@@ -250,7 +250,7 @@ void Room::del_timer_old_room() {
 int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 
 	int16 timer_nr_ = _roomTimer.TimerStart + _roomTimer.TimerAnz;
-	int16 ret = uhr->set_new_timer(timer_nr_, timer_end, SEC_MODE);
+	int16 ret = _G(uhr)->set_new_timer(timer_nr_, timer_end, SEC_MODE);
 	if (ret != -1) {
 		_roomTimer.ObjNr[_roomTimer.TimerAnz] = ani_nr;
 		_roomTimer.TimerNr[_roomTimer.TimerAnz] = timer_nr_;
@@ -263,7 +263,7 @@ int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 void Room::set_timer_status(int16 ani_nr, int16 status) {
 	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
 		if (_roomTimer.ObjNr[i] == ani_nr) {
-			uhr->set_status(_roomTimer.TimerNr[i], status);
+			_G(uhr)->set_status(_roomTimer.TimerNr[i], status);
 		}
 	}
 }
@@ -290,27 +290,27 @@ void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 	byte *tmp_inv_spr[MAX_MOV_OBJ];
 
 	if (!_G(modul)) {
-		obj->sort();
+		_G(obj)->sort();
 		memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
 		memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
 
 		SpriteResource *spriteRes = new SpriteResource(Rb->InvFile);
 
-		for (int16 i = 1; i < obj->mov_obj_room[0] + 1; i++) {
-			if (!tmp_inv_spr[obj->mov_obj_room[i]]) {
-				spriteRes->getSpriteData(obj->mov_obj_room[i], &Rb->InvSprAdr[obj->mov_obj_room[i]], true);
+		for (int16 i = 1; i < _G(obj)->mov_obj_room[0] + 1; i++) {
+			if (!tmp_inv_spr[_G(obj)->mov_obj_room[i]]) {
+				spriteRes->getSpriteData(_G(obj)->mov_obj_room[i], &Rb->InvSprAdr[_G(obj)->mov_obj_room[i]], true);
 			} else {
-				Rb->InvSprAdr[obj->mov_obj_room[i]] = tmp_inv_spr[obj->mov_obj_room[i]];
-				tmp_inv_spr[obj->mov_obj_room[i]] = nullptr;
+				Rb->InvSprAdr[_G(obj)->mov_obj_room[i]] = tmp_inv_spr[_G(obj)->mov_obj_room[i]];
+				tmp_inv_spr[_G(obj)->mov_obj_room[i]] = nullptr;
 			}
 		}
 
-		for (int16 i = 1; i < obj->spieler_invnr[0] + 1; i++) {
-			if (!tmp_inv_spr[obj->spieler_invnr[i]]) {
-				spriteRes->getSpriteData(obj->spieler_invnr[i], &Rb->InvSprAdr[obj->spieler_invnr[i]], true);
+		for (int16 i = 1; i < _G(obj)->spieler_invnr[0] + 1; i++) {
+			if (!tmp_inv_spr[_G(obj)->spieler_invnr[i]]) {
+				spriteRes->getSpriteData(_G(obj)->spieler_invnr[i], &Rb->InvSprAdr[_G(obj)->spieler_invnr[i]], true);
 			} else {
-				Rb->InvSprAdr[obj->spieler_invnr[i]] = tmp_inv_spr[obj->spieler_invnr[i]];
-				tmp_inv_spr[obj->spieler_invnr[i]] = 0;
+				Rb->InvSprAdr[_G(obj)->spieler_invnr[i]] = tmp_inv_spr[_G(obj)->spieler_invnr[i]];
+				tmp_inv_spr[_G(obj)->spieler_invnr[i]] = 0;
 			}
 		}
 
@@ -350,7 +350,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 		if (mode == GED_LOAD) {
 			Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
 				_roomHandle[R_GEPDATEI]);
-			ged->load_ged_pool(gstream, &_gedInfo[Rb->AkAblage],
+			_G(ged)->load_ged_pool(gstream, &_gedInfo[Rb->AkAblage],
 						        nr, _gedMem[Rb->AkAblage]);
 			_gedXAnz[Rb->AkAblage] = img->width / _gedInfo[Rb->AkAblage].X;
 			_gedYAnz[Rb->AkAblage] = img->height / _gedInfo[Rb->AkAblage].Y;
@@ -502,9 +502,9 @@ void Room::set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size) {
 
 void load_chewy_taf(int16 taf_nr) {
 	if (_G(AkChewyTaf) != taf_nr) {
-		if (chewy) {
-			free((char *)chewy);
-			chewy = nullptr;
+		if (_G(chewy)) {
+			free((char *)_G(chewy));
+			_G(chewy) = nullptr;
 		}
 		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
 
@@ -561,8 +561,8 @@ void load_chewy_taf(int16 taf_nr) {
 		if (fname_ != NULL) {
 			_G(spieler).ChewyAni = taf_nr;
 			_G(AkChewyTaf) = taf_nr;
-			chewy = _G(mem)->taf_adr(fname_);
-			chewy_kor = chewy->korrektur;
+			_G(chewy) = _G(mem)->taf_adr(fname_);
+			_G(chewy_kor) = _G(chewy)->korrektur;
 		}
 	}
 }
@@ -571,7 +571,7 @@ void switch_room(int16 nr) {
 	_G(fx_blend) = BLEND1;
 	exit_room(-1);
 	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
-	room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	enter_room(-1);
 	set_up_screen(DO_SETUP);
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 3289a1ecca6..d98163be569 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -53,14 +53,14 @@ namespace Rooms {
 
 void Room0::entry() {
 	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow ||
-			obj->check_inventar(0))
-		det->hide_static_spr(6);
+			_G(obj)->check_inventar(0))
+		_G(det)->hide_static_spr(6);
 
 	if (!flags.LoadGame) {
 		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
 		_G(cur_hide_flag) = 0;
 		hide_cur();
-		_G(timer_nr)[0] = room->set_timer(255, 3);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 3);
 
 		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
@@ -77,7 +77,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 	switch (ani_nr) {
 	case 1:
 		if (_G(timer_action_ctr) > 0) {
-			uhr->reset_timer(t_nr, 0);
+			_G(uhr)->reset_timer(t_nr, 0);
 			--_G(timer_action_ctr);
 		} else if (!is_chewy_busy()) {
 			if (!_G(spieler).R0FueterLab)
@@ -114,7 +114,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			if (!_G(spieler).R0PillowThrow)
 				feederAni();
 
-			uhr->reset_timer(t_nr, 0);
+			_G(uhr)->reset_timer(t_nr, 0);
 			flags.AutoAniPlay = false;
 		}
 		break;
@@ -135,8 +135,8 @@ bool Room0::getPillow() {
 		invent_2_slot(0);
 		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
-		atds->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
-		det->hide_static_spr(6);
+		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->hide_static_spr(6);
 
 		flags.AutoAniPlay = false;
 		show_cur();
@@ -157,7 +157,7 @@ bool Room0::pullSlime() {
 		invent_2_slot(1);
 		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
-		atds->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
 		flags.AutoAniPlay = false;
 		show_cur();
@@ -192,7 +192,7 @@ void Room0::eyeStart(EyeMode mode) {
 	AniDetailInfo *adi;
 	bool ende;
 
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	if (mode == EYE_START)
 		adi->ani_count = adi->start_ani;
 	else
@@ -219,18 +219,18 @@ void Room0::eyeStart(EyeMode mode) {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
+			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 38) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
 
-		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
@@ -267,7 +267,7 @@ void Room0::eyeStart(EyeMode mode) {
 void Room0::eyeWait() {
 	AniDetailInfo *adi;
 
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
 	adi->delay_count = 15;
 	flags.AniUserAction = true;
@@ -275,11 +275,11 @@ void Room0::eyeWait() {
 	while (adi->ani_count < 46) {
 		clear_prog_ani();
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
-		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[2].ZEbene = 192;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
@@ -309,7 +309,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
-			char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
+			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
@@ -317,7 +317,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
@@ -335,27 +335,27 @@ void Room0::eyeShoot() {
 	AniDetailInfo *adi;
 	bool ende;
 
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 47;
 
 	ende = false;
-	det->start_detail(CH_BLITZ, 1, VOR);
+	_G(det)->start_detail(CH_BLITZ, 1, VOR);
 
 	while (!ende) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
 
 		if (adi->ani_count < 53) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		} else {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
-			if (!det->get_ani_status(CH_BLITZ))
+			if (!_G(det)->get_ani_status(CH_BLITZ))
 				ende = true;
 		}
 
@@ -370,13 +370,13 @@ void Room0::eyeShoot() {
 		}
 	}
 
-	det->start_detail(STERNE_STEHEN, 255, VOR);
+	_G(det)->start_detail(STERNE_STEHEN, 255, VOR);
 	clear_prog_ani();
-	spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+	spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 	spr_info[0].ZEbene = 190;
-	spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+	spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 	spr_info[1].ZEbene = 191;
-	spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+	spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
 	spr_info[2].ZEbene = 192;
 
 	wait_show_screen(30);
@@ -389,7 +389,7 @@ void Room0::eyeSlimeBack() {
 	AniDetailInfo *adi;
 	bool ende;
 
-	adi = det->get_ani_detail(SCHLAUCH_DETAIL);
+	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 53;
 
 	ende = false;
@@ -397,19 +397,19 @@ void Room0::eyeSlimeBack() {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 
 		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 61) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
 
-		spr_info[3] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -431,22 +431,22 @@ void Room0::eyeSlimeBack() {
 void Room0::checkSlimeEye() {
 	AniDetailInfo *adi;
 
-	adi = det->get_ani_detail(CH_WIRFT_SCHLEIM);
+	adi = _G(det)->get_ani_detail(CH_WIRFT_SCHLEIM);
 	adi->ani_count = adi->start_ani;
 	if (adi->load_flag) {
-		det->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+		_G(det)->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
 	}
 
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
-		spr_info[2] = det->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+		spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
 		spr_info[2].ZEbene = 192;
-		spr_info[3] = det->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
+		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_up_screen(DO_SETUP);
 
@@ -459,7 +459,7 @@ void Room0::checkSlimeEye() {
 	}
 
 	if (adi->load_flag) {
-		det->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+		_G(det)->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
 	}
 
 	clear_prog_ani();
@@ -470,7 +470,7 @@ void Room0::feederStart(int16 mode) {
 	AniDetailInfo *adi;
 	bool ende;
 
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	if (!mode)
 		adi->ani_count = adi->start_ani;
 	else
@@ -495,9 +495,9 @@ void Room0::feederStart(int16 mode) {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
 
 		if (flags.AniUserAction)
@@ -531,8 +531,8 @@ void Room0::feederStart(int16 mode) {
 	flags.AniUserAction = false;
 
 	if (mode) {
-		det->start_detail(FLAP_DETAIL, 1, RUECK);
-		while (det->get_ani_status(FLAP_DETAIL))
+		_G(det)->start_detail(FLAP_DETAIL, 1, RUECK);
+		while (_G(det)->get_ani_status(FLAP_DETAIL))
 			set_ani_screen();
 
 	}
@@ -541,9 +541,9 @@ void Room0::feederStart(int16 mode) {
 void Room0::feederExtend() {
 	for (int16 i = 0; i < 30 && !_G(spieler).R0PillowThrow; i++) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
@@ -562,7 +562,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
-			char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
+			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
@@ -570,7 +570,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				y = minfo.y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), txt->str_pos((char *)str_, i));
+					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
@@ -588,7 +588,7 @@ void Room0::checkFeed() {
 	int16 i;
 	bool ende;
 
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 136;
 
 	i = 152;
@@ -598,27 +598,27 @@ void Room0::checkFeed() {
 		flags.AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 		if (adi->ani_count == 136) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			if (!_G(spieler).R0SlimeUsed)
-				det->stop_detail(16);
+				_G(det)->stop_detail(16);
 		}
 		if (adi->ani_count > 138) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
 		}
 		if (adi->ani_count > 141) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
 		if (adi->ani_count == 138) {
-			spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			spr_info[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			spr_info[3].ZEbene = 193;
 		}
 
-		spr_info[4] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[4] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[4].ZEbene = 194;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -638,27 +638,27 @@ void Room0::checkFeed() {
 	adi->ani_count = 138;
 
 	ende = false;
-	det->start_detail(CH_NACH_FUETTERN, 2, VOR);
+	_G(det)->start_detail(CH_NACH_FUETTERN, 2, VOR);
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 
 		if (adi->ani_count > 138) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 			spr_info[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 138) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
 
-		spr_info[3] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		spr_info[3].ZEbene = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
-		if (!det->get_ani_status(CH_NACH_FUETTERN))
+		if (!_G(det)->get_ani_status(CH_NACH_FUETTERN))
 			ende = true;
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -678,28 +678,28 @@ void Room0::checkPillow() {
 	AniDetailInfo *adi;
 	bool ende, mode;
 
-	adi = det->get_ani_detail(FUETTER_SCHLAUCH);
+	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 161;
 
 	ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->start_detail(CH_WIRFT_KISSEN, 1, VOR);
+	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, VOR);
 	mode = 0;
 
 	while (!ende) {
 		clear_prog_ani();
-		if (!det->get_ani_status(CH_WIRFT_KISSEN)) {
+		if (!_G(det)->get_ani_status(CH_WIRFT_KISSEN)) {
 			mode = 1;
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
-		spr_info[1] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 		spr_info[1].ZEbene = 191;
 		if (mode) {
-			spr_info[2] = det->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 			spr_info[2].ZEbene = 192;
 		}
 		set_up_screen(DO_SETUP);
@@ -722,8 +722,8 @@ void Room0::checkPillow() {
 
 void Room0::trapDoorOpen() {
 	int16 i;
-	det->start_detail(FLAP_DETAIL, 1, VOR);
-	while (det->get_ani_status(FLAP_DETAIL)) {
+	_G(det)->start_detail(FLAP_DETAIL, 1, VOR);
+	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 	}
@@ -731,7 +731,7 @@ void Room0::trapDoorOpen() {
 	flags.AniUserAction = true;
 	for (i = 0; i < 25; i++) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		spr_info[0].ZEbene = 190;
 
 		set_ani_screen();
@@ -743,9 +743,9 @@ void Room0::trapDoorOpen() {
 }
 
 void Room0::trapDoorClose() {
-	det->start_detail(FLAP_DETAIL, 1, RUECK);
+	_G(det)->start_detail(FLAP_DETAIL, 1, RUECK);
 
-	while (det->get_ani_status(FLAP_DETAIL)) {
+	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
@@ -770,9 +770,9 @@ void Room0::feederAni() {
 			register_cutscene(1);
 
 			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
-			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			set_person_pos(Rdi->AutoMov[4].X - CH_HOT_MOV_X,
-			               Rdi->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
+			_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			set_person_pos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
+			               _G(Rdi)->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
 			spieler_vector[P_CHEWY].DelayCount = 0;
 
 			check_shad(4, 0);
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index ff8828344ee..a1ffa95220b 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -29,12 +29,12 @@ namespace Chewy {
 namespace Rooms {
 
 void Room1::gottenCard() {
-	det->hide_static_spr(2);
+	_G(det)->hide_static_spr(2);
 	start_detail_wait(4, 1, ANI_VOR);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	atds->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
 	int16 tmp;
-	atds->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
+	_G(atds)->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
 }
 
 void Room1::gedAction(int index) {
@@ -45,18 +45,18 @@ void Room1::gedAction(int index) {
 		if (_G(spieler).AkInvent == KABEL_INV) {
 			flag = true;
 			del_inventar(_G(spieler).AkInvent);
-		} else if (obj->check_inventar(KABEL_INV)) {
+		} else if (_G(obj)->check_inventar(KABEL_INV)) {
 			flag = true;
-			obj->del_obj_use(KABEL_INV);
+			_G(obj)->del_obj_use(KABEL_INV);
 			remove_inventory(KABEL_INV);
 		}
 
 		if (flag) {
 			start_aad_wait(54, -1);
-			atds->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
 			_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
-			obj->calc_rsi_flip_flop(KABELABDECKUNG);
-			obj->calc_all_static_detail();
+			_G(obj)->calc_rsi_flip_flop(KABELABDECKUNG);
+			_G(obj)->calc_all_static_detail();
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 49db180da90..c88e2dbf36a 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -39,14 +39,14 @@ static const AniBlock ABLOCK4[2] = {
 
 void Room2::entry() {
 	if (!_G(spieler).R2ElectrocutedBork)
-		det->start_detail(5, 255, ANI_VOR);
+		_G(det)->start_detail(5, 255, ANI_VOR);
 }
 
 void Room2::jump_out_r1(int16 nr) {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(nr, 1, ANI_VOR);
 	set_up_screen(DO_SETUP);
-	det->stop_detail(6);
+	_G(det)->stop_detail(6);
 	set_person_pos(32, 127, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	clear_prog_ani();
@@ -55,21 +55,21 @@ void Room2::jump_out_r1(int16 nr) {
 }
 
 void Room2::electrifyWalkway1() {
-	det->start_detail(ANI_5, 255, ANI_VOR);
+	_G(det)->start_detail(ANI_5, 255, ANI_VOR);
 	start_spz(CH_TALK6, 255, false, ANI_VOR);
 	start_aad_wait(49, -1);
-	det->stop_detail(ANI_5);
+	_G(det)->stop_detail(ANI_5);
 
-	det->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
+	_G(det)->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
 	_G(spieler).R2ElectrocutedBork = true;
 	del_inventar(_G(spieler).AkInvent);
 
-	atds->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
-	atds->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
-	atds->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
-	atds->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
-	atds->set_ats_str(11, 1, ATS_DATEI);
+	_G(atds)->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
+	_G(atds)->set_ats_str(11, 1, ATS_DATEI);
 }
 
 void Room2::electrifyWalkway2() {
@@ -79,9 +79,9 @@ void Room2::electrifyWalkway2() {
 
 void Room2::gedAction(int index) {
 	if (index == 0) {
-		det->stop_detail(5);
+		_G(det)->stop_detail(5);
 		if (!_G(spieler).R2ElectrocutedBork)
-			det->start_detail(6, 2, ANI_VOR);
+			_G(det)->start_detail(6, 2, ANI_VOR);
 		else
 			start_ani_block(2, ABLOCK4);
 
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 49ff27da600..f3a94752565 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -102,7 +102,7 @@ void Room3::terminal() {
 		spr_info[0].ZEbene = 0;
 
 		if (!_G(spieler).R2ElectrocutedBork) {
-			det->stop_detail(5);
+			_G(det)->stop_detail(5);
 			start_ani_block(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
 				_G(spieler).R2FussSchleim = false;
@@ -112,7 +112,7 @@ void Room3::terminal() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(8, 1, ANI_VOR);
 			set_up_screen(DO_SETUP);
-			det->stop_detail(6);
+			_G(det)->stop_detail(6);
 			clear_prog_ani();
 			switch_room(1);
 			start_ani_block(2, ABLOCK0);
@@ -128,7 +128,7 @@ void Room3::terminal() {
 			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
-			room->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			_G(fx_blend) = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
@@ -180,9 +180,9 @@ void Room3::sonde_knarre() {
 		{ {  13,  45,  75 }, 1, 3 }
 	};
 	hide_cur();
-	RoomDetailInfo *rdi = det->get_room_detail_info();
+	RoomDetailInfo *rdi = _G(det)->get_room_detail_info();
 
-	det->load_taf_seq(162, 17, nullptr);
+	_G(det)->load_taf_seq(162, 17, nullptr);
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	_G(auto_obj) = 1;
@@ -197,28 +197,28 @@ void Room3::sonde_knarre() {
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
-	det->start_detail(SONDE_SHOOT, 1, ANI_VOR);
+	_G(det)->start_detail(SONDE_SHOOT, 1, ANI_VOR);
 	int16 ende = 0;
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
+			_G(det)->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
 		}
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		spr_info[0].ZEbene = 0;
 		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 &&
 			rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
-			spr_info[1] = det->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
+			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
 			spr_info[1].ZEbene = 190;
 		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 &&
-			det->get_ani_status(SONDE_RET) == 0) {
+			_G(det)->get_ani_status(SONDE_RET) == 0) {
 
-			spr_info[2] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
 			spr_info[2].ZEbene = 190;
 		}
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178) {
-			det->start_detail(SONDE_RET, 3, ANI_RUECK);
+			_G(det)->start_detail(SONDE_RET, 3, ANI_RUECK);
 		}
 		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28) {
 			ende = 1;
@@ -228,14 +228,14 @@ void Room3::sonde_knarre() {
 	}
 
 	clear_prog_ani();
-	det->start_detail(SONDE_RAUCH, 3, ANI_VOR);
+	_G(det)->start_detail(SONDE_RAUCH, 3, ANI_VOR);
 	ende = 0;
-	while (det->get_ani_status(SONDE_RAUCH)) {
+	while (_G(det)->get_ani_status(SONDE_RAUCH)) {
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		spr_info[0].ZEbene = 0;
 
-		spr_info[1] = det->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
 		spr_info[1].ZEbene = 190;
 		++ende;
 		if (ende == 3)
@@ -245,10 +245,10 @@ void Room3::sonde_knarre() {
 	start_aad_wait(53, -1);
 
 	clear_prog_ani();
-	det->start_detail(SONDE_REIN, 1, ANI_RUECK);
-	while (det->get_ani_status(SONDE_REIN)) {
+	_G(det)->start_detail(SONDE_REIN, 1, ANI_RUECK);
+	while (_G(det)->get_ani_status(SONDE_REIN)) {
 
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		spr_info[0].ZEbene = 0;
 		set_ani_screen();
 	}
@@ -260,7 +260,7 @@ void Room3::sonde_knarre() {
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt2);
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
-	det->del_taf_tbl(162, 17, 0);
+	_G(det)->del_taf_tbl(162, 17, 0);
 	_G(zoom_horizont) = tmp;
 	init_sonde();
 
@@ -288,7 +288,7 @@ void Room3::probeTransfer() {
 
 	flags.AniUserAction = false;
 	hide_cur();
-	/*rdi = */(void)det->get_room_detail_info();
+	/*rdi = */(void)_G(det)->get_room_detail_info();
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	int16 anistart = false;
@@ -303,10 +303,10 @@ void Room3::probeTransfer() {
 	while (mov_phasen[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
-	det->start_detail(SONDE_GREIF, 1, ANI_VOR);
-	while (det->get_ani_status(SONDE_GREIF)) {
+	_G(det)->start_detail(SONDE_GREIF, 1, ANI_VOR);
+	while (_G(det)->get_ani_status(SONDE_GREIF)) {
 		clear_prog_ani();
-		spr_info[0] = det->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
+		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
 		spr_info[0].ZEbene = 146;
 		set_ani_screen();
 
@@ -380,7 +380,7 @@ void Room3::probeTransfer() {
 			flags.AniUserAction = true;
 			spr_nr = 141;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->load_taf_seq(142, 8, nullptr);
+			_G(det)->load_taf_seq(142, 8, nullptr);
 			break;
 
 		case 1:
@@ -388,7 +388,7 @@ void Room3::probeTransfer() {
 			break;
 
 		case 2:
-			det->del_taf_tbl(142, 7, nullptr);
+			_G(det)->del_taf_tbl(142, 7, nullptr);
 			flags.AniUserAction = false;
 			switch_room(2);
 			break;
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index c4df16a8d67..7a2688bd20c 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -122,11 +122,11 @@ int16 Room4::sonde_comp() {
 	_G(maus_links_click) = false;
 	minfo.button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
-	room->load_room(&room_blk, 3, &_G(spieler));
+	_G(room)->load_room(&room_blk, 3, &_G(spieler));
 	set_person_pos(110, 139, P_CHEWY, P_LEFT);
 
 	_G(fx_blend) = BLEND1;
-	atds->stop_aad();
+	_G(atds)->stop_aad();
 
 	return cur_x;
 }
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 00d7e3c52fa..19b55d7abb8 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room5::entry() {
 	if (_G(spieler).R5Terminal)
-		det->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_VOR);
 }
 
 void Room5::pushButton() {
@@ -46,9 +46,9 @@ void Room5::pushButton() {
 			_G(spieler).room_e_obj[6].Attribut = 255;
 			str_nr = 0;
 		}
-		atds->set_ats_str(29, str_nr, ATS_DATEI);
+		_G(atds)->set_ats_str(29, str_nr, ATS_DATEI);
 		_G(spieler).R5Tuer ^= 1;
-		obj->calc_rsi_flip_flop(SIB_TUERE_R5);
+		_G(obj)->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else {
 		start_aad_wait(1, -1);
 	}
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index be19f02c683..46e6ae58a40 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -59,20 +59,20 @@ void Room6::entry() {
 	_G(zoom_mov_fak) = 2;
 
 	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
-		det->start_detail(7, 255, ANI_VOR);
-		atds->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->start_detail(7, 255, ANI_VOR);
+		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
 		if (!flags.LoadGame)
 			++_G(spieler).R6RaumBetreten;
 
 		if (_G(spieler).R6RaumBetreten == 2) {
 			hide_cur();
-			det->stop_detail(7);
+			_G(det)->stop_detail(7);
 			init_robo();
 			wait_auto_obj(0);
 			_G(spieler).R6BolaOk = true;
-			obj->show_sib(SIB_BOLA_KNOPF_R6);
-			obj->hide_sib(SIB_BOLA_R6);
-			atds->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(obj)->show_sib(SIB_BOLA_KNOPF_R6);
+			_G(obj)->hide_sib(SIB_BOLA_R6);
+			_G(atds)->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
 			show_cur();
 		}
 	}
@@ -93,36 +93,36 @@ void Room6::init_robo() {
 
 void Room6::bola_knopf() {
 	if (!_G(spieler).R6BolaBecher) {
-		det->hide_static_spr(0);
+		_G(det)->hide_static_spr(0);
 		start_detail_wait(0, 1, ANI_VOR);
 		if (_G(spieler).R6BolaOk) {
 			_G(spieler).R6BolaBecher = true;
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 			start_ani_block(2, ABLOCK7);
-			obj->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
+			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
 			wait_detail(2);
-			obj->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
-			atds->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
-			obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-			obj->hide_sib(SIB_BOLA_KNOPF_R6);
+			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
+			_G(atds)->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+			_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(3, ABLOCK6);
-			while (det->get_ani_status(3) && !SHOULD_QUIT) {
-				if (!det->get_ani_status(14)) {
+			while (_G(det)->get_ani_status(3) && !SHOULD_QUIT) {
+				if (!_G(det)->get_ani_status(14)) {
 					set_person_pos(220, 89, P_CHEWY, P_LEFT);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 				set_up_screen(DO_SETUP);
 			}
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 			++_G(spieler).R6BolaJoke;
 			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
 			start_spz(CH_TALK5, 244, false, 0);
 			start_aad_wait(diaNr, -1);
 		}
-		obj->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 	}
 }
 
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index e42a139ba89..61ed4ff809c 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -57,19 +57,19 @@ void Room7::haken(int16 sib_nr) {
 	if (_G(spieler).R7RHaken) {
 		_G(spieler).R7SeilOk = true;
 		if (sib_nr == SIB_LHAKEN_R7) {
-			obj->calc_rsi_flip_flop(SIB_LHAKEN_R7);
-			obj->calc_rsi_flip_flop(SIB_RHAKEN_R7);
+			_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
+			_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
 		}
-		atds->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
 		dia_nr = 9;
 	} else {
 		_G(spieler).R7SeilLeft = true;
 		dia_nr = 48;
 	}
 
-	obj->calc_all_static_detail();
-	atds->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(obj)->calc_all_static_detail();
+	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
 	start_aad_wait(dia_nr, -1);
 }
 
@@ -82,79 +82,79 @@ void Room7::klingel() {
 		start_aad(5, 0);
 		start_ani_block(3, ABLOCK25);
 
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 		start_detail_wait(12, 1, ANI_VOR);
 		start_detail_wait(11, 1, ANI_VOR);
-		det->hide_static_spr(7);
-		det->stop_detail(5);
+		_G(det)->hide_static_spr(7);
+		_G(det)->stop_detail(5);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else if (_G(spieler).R7BellCount == 1) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(6, 0);
 		start_ani_block(3, ABLOCK25);
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 		start_detail_wait(10, 1, ANI_VOR);
-		det->start_detail(13, 1, ANI_VOR);
+		_G(det)->start_detail(13, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		det->stop_detail(5);
+		_G(det)->stop_detail(5);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
-		det->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_VOR);
 		start_detail_wait(13, 1, ANI_VOR);
 		flic_cut(FCUT_002, CFO_MODE);
-		det->stop_detail(0);
+		_G(det)->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 		set_person_pos(114, 138, P_CHEWY, -1);
 
 		start_detail_frame(19, 1, ANI_VOR, 6);
 		start_detail_frame(9, 1, ANI_VOR, 4);
-		det->show_static_spr(9);
+		_G(det)->show_static_spr(9);
 		wait_detail(9);
-		det->hide_static_spr(9);
-		obj->show_sib(SIB_SCHLOTT_R7);
-		obj->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
+		_G(det)->hide_static_spr(9);
+		_G(obj)->show_sib(SIB_SCHLOTT_R7);
+		_G(obj)->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
-		det->hide_static_spr(7);
+		_G(det)->hide_static_spr(7);
 
 	} else if (!_G(spieler).R7SeilOk) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
 		start_ani_block(3, ABLOCK25);
-		det->show_static_spr(7);
-		det->load_taf_seq(192, 74, nullptr);
-		det->start_detail(14, 1, ANI_VOR);
+		_G(det)->show_static_spr(7);
+		_G(det)->load_taf_seq(192, 74, nullptr);
+		_G(det)->start_detail(14, 1, ANI_VOR);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
-		det->stop_detail(5);
+		_G(det)->stop_detail(5);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		flags.NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_VOR);
 		wait_detail(14);
 		start_ani_block(4, ABLOCK10);
-		det->hide_static_spr(7);
-		det->stop_detail(0);
+		_G(det)->hide_static_spr(7);
+		_G(det)->stop_detail(0);
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.NoScroll = false;
-		det->del_taf_tbl(192, 74, nullptr);
+		_G(det)->del_taf_tbl(192, 74, nullptr);
 
 	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
 		_G(spieler).R7BorkFlug = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(8, 0);
 		start_detail_wait(1, 1, ANI_VOR);
-		obj->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
-		obj->hide_sib(SIB_KLINGEL_R7);
+		_G(obj)->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
+		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		flags.NoPalAfterFlc = false;
 		register_cutscene(2);
 		flic_cut(FCUT_003, CFO_MODE);
@@ -174,9 +174,9 @@ void Room7::gedAction(int index) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		set_person_pos(180, 124, P_CHEWY, P_LEFT);
 		start_detail_wait(20, 1, ANI_VOR);
-		det->show_static_spr(10);
+		_G(det)->show_static_spr(10);
 		wait_show_screen(10 * _G(spieler).DelaySpeed);
-		det->hide_static_spr(10);
+		_G(det)->hide_static_spr(10);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).R7ChewyFlug = false;
 	}
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index a40dd87771a..c3e987b2cd0 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -46,23 +46,23 @@ void Room8::entry() {
 		start_folter();
 	else
 		stop_folter();
-	atds->set_ats_str(60, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(60, 0, ATS_DATEI);
 }
 
 void Room8::start_folter() {
-	atds->set_ats_str(67, 1, ATS_DATEI);
-	det->stop_detail(19);
-	det->start_detail(13, 255, ANI_VOR);
+	_G(atds)->set_ats_str(67, 1, ATS_DATEI);
+	_G(det)->stop_detail(19);
+	_G(det)->start_detail(13, 255, ANI_VOR);
 }
 
 void Room8::stop_folter() {
-	atds->set_ats_str(67, 0, ATS_DATEI);
-	det->start_detail(19, 255, ANI_VOR);
+	_G(atds)->set_ats_str(67, 0, ATS_DATEI);
+	_G(det)->start_detail(19, 255, ANI_VOR);
 
-	det->stop_detail(13);
+	_G(det)->stop_detail(13);
 
 	_G(spieler).R8Folter = true;
-	obj->hide_sib(SIB_FOLTER_R8);
+	_G(obj)->hide_sib(SIB_FOLTER_R8);
 }
 
 void Room8::hole_kohle() {
@@ -90,7 +90,7 @@ void Room8::start_verbrennen() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK12);
 
-		while (det->get_ani_status(9)) {
+		while (_G(det)->get_ani_status(9)) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
@@ -101,10 +101,10 @@ void Room8::start_verbrennen() {
 			}
 		}
 
-		det->stop_detail(9);
+		_G(det)->stop_detail(9);
 		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
 		start_ani_block(2, ABLOCK13);
-		atds->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 
@@ -117,7 +117,7 @@ bool Room8::gips_wurf() {
 	if (is_cur_inventar(GIPS_EIMER_INV)) {
 		hide_cur();
 		actionFl = true;
-		det->load_taf_seq(116, 30, nullptr);
+		_G(det)->load_taf_seq(116, 30, nullptr);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = false;
 
@@ -128,13 +128,13 @@ bool Room8::gips_wurf() {
 
 		start_detail_frame(5, 1, ANI_VOR, 16);
 		start_detail_wait(6, 1, ANI_VOR);
-		obj->show_sib(33);
-		det->show_static_spr(14);
+		_G(obj)->show_sib(33);
+		_G(det)->show_static_spr(14);
 		wait_detail(5);
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
-		obj->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
-		det->del_taf_tbl(116, 30, nullptr);
+		_G(obj)->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
+		_G(det)->del_taf_tbl(116, 30, nullptr);
 		auto_move(8, P_CHEWY);
 		flags.AtsAction = false;
 		_G(menu_item) = CUR_USE;
@@ -153,15 +153,15 @@ bool Room8::gips_wurf() {
 
 void Room8::open_gdoor() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->show_static_spr(17);
+	_G(det)->show_static_spr(17);
 	set_up_screen(DO_SETUP);
 	start_detail_wait(7, 1, ANI_VOR);
-	det->show_static_spr(15);
-	det->hide_static_spr(17);
+	_G(det)->show_static_spr(15);
+	_G(det)->hide_static_spr(17);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(204, 274, P_CHEWY, P_LEFT);
-	atds->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
-	obj->hide_sib(31);
+	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(obj)->hide_sib(31);
 	_G(spieler).R8GTuer = true;
 	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
 }
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index a684d7394f3..7a6a6ceb579 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -51,24 +51,24 @@ void Room9::entry() {
 	if (!_G(spieler).R9Gitter)
 		set_person_pos(138, 91, P_CHEWY, P_LEFT);
 	else
-		det->show_static_spr(5);
+		_G(det)->show_static_spr(5);
 
 	if (_G(spieler).R9Surimy) {
-		det->hide_static_spr(4);
-		room->set_timer_status(7, TIMER_STOP);
+		_G(det)->hide_static_spr(4);
+		_G(room)->set_timer_status(7, TIMER_STOP);
 	}
 }
 
 void Room9::gtuer() {
 	_G(spieler).R9Gitter = true;
-	det->show_static_spr(5);
+	_G(det)->show_static_spr(5);
 	start_detail_wait(6, 1, ANI_VOR);
 	set_person_pos(74, 93, P_CHEWY, P_LEFT);
-	atds->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATEI);
-	obj->show_sib(34);
-	atds->set_ats_str(73, 1, ATS_DATEI);
+	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(obj)->show_sib(34);
+	_G(atds)->set_ats_str(73, 1, ATS_DATEI);
 }
 
 void Room9::surimy() {
@@ -76,21 +76,21 @@ void Room9::surimy() {
 	_G(spieler).R9Surimy = true;
 	const int16 tmp = spieler_vector[P_CHEWY].Count;
 	stop_person(P_CHEWY);
-	atds->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	det->hide_static_spr(4);
-	room->set_timer_status(7, TIMER_STOP);
+	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(det)->hide_static_spr(4);
+	_G(room)->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	spieler_vector[P_CHEWY].Count = tmp;
 	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-	mov->continue_auto_go();
+	_G(mov)->continue_auto_go();
 	show_cur();
 }
 
 void Room9::surimy_ani() {
-	det->load_taf_seq(91, 8, nullptr);
+	_G(det)->load_taf_seq(91, 8, nullptr);
 	_G(auto_obj) = 1;
 	mov_phasen[SURIMY_OBJ].AtsText = 0;
 	mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -102,15 +102,15 @@ void Room9::surimy_ani() {
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
 	start_detail_frame(0, 1, ANI_VOR, 15);
-	det->start_detail(2, 1, ANI_VOR);
+	_G(det)->start_detail(2, 1, ANI_VOR);
 	wait_detail(0);
 	start_detail_wait(1, 1, ANI_VOR);
 	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
-	det->hide_static_spr(4);
+	_G(det)->hide_static_spr(4);
 	mov_phasen[SURIMY_OBJ].Repeat = 1;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
-	det->del_taf_tbl(91, 8, nullptr);
+	_G(det)->del_taf_tbl(91, 8, nullptr);
 }
 
 void Room9::gedAction(int index) {
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index c6d8b1f1d84..b770fe7709a 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -33,7 +33,7 @@ void Room10::entry() {
 		_G(out)->setze_zeiger(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->setze_zeiger(nullptr);
-		fx->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
+		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
 		flic_cut(FCUT_004, CFO_MODE);
@@ -45,7 +45,7 @@ void Room10::entry() {
 		show_cur();
 
 	} else if (_G(spieler).R10SurimyOk) {
-		room->set_timer_status(3, TIMER_STOP);
+		_G(room)->set_timer_status(3, TIMER_STOP);
 	}
 }
 
@@ -53,12 +53,12 @@ void Room10::get_surimy() {
 	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
-	flc->set_custom_user_function(cut_serv);
+	_G(flc)->set_custom_user_function(cut_serv);
 	flic_cut(FCUT_006, CFO_MODE);
-	flc->remove_custom_user_function();
+	_G(flc)->remove_custom_user_function();
 	_G(spieler).R10SurimyOk = true;
-	room->set_timer_status(3, TIMER_STOP);
-	atds->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(room)->set_timer_status(3, TIMER_STOP);
+	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
 	invent_2_slot(18);
 
 	del_inventar(_G(spieler).AkInvent);
@@ -66,7 +66,7 @@ void Room10::get_surimy() {
 }
 
 int16 Room10::cut_serv(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (frame == 31)
 		start_aad(107, 0);
 
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 558308a3633..6c804ac215f 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -47,30 +47,30 @@ void Room11::entry() {
 
 	if (_G(spieler).R12ChewyBork) {
 		if (!_G(spieler).R11DoorRightB) {
-			obj->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
+			_G(obj)->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
 			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
 				AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
-			obj->calc_all_static_detail();
+			_G(obj)->calc_all_static_detail();
 		}
 
-		obj->hide_sib(SIB_TKNOPF1_R11);
-		obj->hide_sib(SIB_SCHLITZ_R11);
-		obj->hide_sib(SIB_TKNOPF2_R11);
-		obj->hide_sib(SIB_TKNOPF3_R11);
+		_G(obj)->hide_sib(SIB_TKNOPF1_R11);
+		_G(obj)->hide_sib(SIB_SCHLITZ_R11);
+		_G(obj)->hide_sib(SIB_TKNOPF2_R11);
+		_G(obj)->hide_sib(SIB_TKNOPF3_R11);
 		_G(spieler).room_e_obj[20].Attribut = 255;
 		_G(spieler).room_e_obj[21].Attribut = 255;
-		atds->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
 
 		if (!flags.LoadGame) {
 			start_ani_block(2, ABLOCK17);
 			auto_move(8, P_CHEWY);
 			start_aad_wait(31, -1);
-			det->stop_detail(9);
+			_G(det)->stop_detail(9);
 		}
-		det->show_static_spr(8);
+		_G(det)->show_static_spr(8);
 		if (!flags.LoadGame)
 			auto_move(6, P_CHEWY);
-		_G(timer_nr)[0] = room->set_timer(255, 10);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 	}
 }
 
@@ -95,10 +95,10 @@ void Room11::gedAction(int index) {
 void Room11::bork_zwinkert() {
 	if (!flags.AutoAniPlay) {
 		flags.AutoAniPlay = true;
-		det->hide_static_spr(8);
+		_G(det)->hide_static_spr(8);
 		start_ani_block(2, ABLOCK18);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->show_static_spr(8);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(det)->show_static_spr(8);
 		flags.AutoAniPlay = false;
 	}
 }
@@ -121,11 +121,11 @@ void Room11::chewy_bo_use() {
 		flags.AutoAniPlay = true;
 
 		stop_person(P_CHEWY);
-		det->hide_static_spr(8);
+		_G(det)->hide_static_spr(8);
 		start_ani_block(2, ABLOCK17);
 		start_aad_wait(32, -1);
-		det->stop_detail(9);
-		det->show_static_spr(8);
+		_G(det)->stop_detail(9);
+		_G(det)->show_static_spr(8);
 		auto_move(6, P_CHEWY);
 
 		flags.AutoAniPlay = false;
@@ -147,11 +147,11 @@ int16 Room11::scanner() {
 			set_up_screen(DO_SETUP);
 			actionFl = true;
 
-			flc->set_custom_user_function(cut_serv_2);
+			_G(flc)->set_custom_user_function(cut_serv_2);
 			start_aad(105, 0);
 			flic_cut(FCUT_011, CFO_MODE);
 			register_cutscene(4);
-			flc->remove_custom_user_function();
+			_G(flc)->remove_custom_user_function();
 			_G(spieler).R11TerminalOk = true;
 			cur_2_inventory();
 			_G(menu_item) = CUR_TALK;
@@ -162,9 +162,9 @@ int16 Room11::scanner() {
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
-				flc->set_custom_user_function(cut_serv);
+				_G(flc)->set_custom_user_function(cut_serv);
 				flic_cut(FCUT_010, CFO_MODE);
-				flc->remove_custom_user_function();
+				_G(flc)->remove_custom_user_function();
 				start_aad_wait(20, -1);
 			} else {
 				actionFl = true;
@@ -183,14 +183,14 @@ void Room11::get_card() {
 	if (_G(spieler).R11CardOk) {
 		cur_2_inventory();
 		_G(spieler).R11CardOk = false;
-		obj->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
+		_G(obj)->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
 
 		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
 		cursor_wahl(CUR_AK_INVENT);
 		cursor_wahl(CUR_AK_INVENT);
-		det->stop_detail(0);
-		atds->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
-		atds->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(det)->stop_detail(0);
+		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
 	}
 }
 
@@ -198,9 +198,9 @@ void Room11::put_card() {
 	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
 		del_inventar(_G(spieler).R11IdCardNr);
-		det->start_detail(0, 255, ANI_VOR);
-		atds->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
-		atds->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R11CardOk = true;
 
 		if (!_G(spieler).R11TerminalOk)
@@ -210,28 +210,28 @@ void Room11::put_card() {
 
 int16 Room11::cut_serv(int16 frame) {
 	if (_G(spieler).R11DoorRightF)
-		det->plot_static_details(0, 0, 0, 0);
+		_G(det)->plot_static_details(0, 0, 0, 0);
 
 	if (_G(spieler).R11DoorRightB)
-		det->plot_static_details(0, 0, 6, 6);
+		_G(det)->plot_static_details(0, 0, 6, 6);
 
 	if (_G(spieler).R45MagOk)
-		det->plot_static_details(0, 0, 7, 7);
+		_G(det)->plot_static_details(0, 0, 7, 7);
 
 	return 0;
 }
 
 int16 Room11::cut_serv_2(int16 frame) {
 	if (_G(spieler).R11DoorRightF)
-		det->plot_static_details(0, 0, 0, 0);
+		_G(det)->plot_static_details(0, 0, 0, 0);
 
 	if (_G(spieler).R11DoorRightB)
-		det->plot_static_details(0, 0, 6, 6);
+		_G(det)->plot_static_details(0, 0, 6, 6);
 
 	if (_G(spieler).R6DoorRightB)
-		det->plot_static_details(0, 0, 7, 7);
+		_G(det)->plot_static_details(0, 0, 7, 7);
 
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (frame == 43)
 		start_aad(106, 0);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index aeedd8d4178..5a077f9abb4 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -65,14 +65,14 @@ static const AniBlock ABLOCK16[2] = {
 
 void Room12::entry() {
 	_G(zoom_horizont) = 150;
-	_G(timer_nr)[1] = room->set_timer(254, 20);
+	_G(timer_nr)[1] = _G(room)->set_timer(254, 20);
 
 	if (!_G(spieler).R12Betreten) {
 		_G(spieler).R12Betreten = true;
 		hide_cur();
 
 		for (int16 i = 7; i < 10; i++)
-			det->show_static_spr(i);
+			_G(det)->show_static_spr(i);
 
 		flags.NoScroll = true;
 		auto_scroll(60, 0);
@@ -80,20 +80,20 @@ void Room12::entry() {
 		flags.NoScroll = false;
 
 		for (int16 i = 7; i < 10; i++)
-			det->hide_static_spr(i);
+			_G(det)->hide_static_spr(i);
 
-		obj->show_sib(SIB_TALISMAN_R12);
-		obj->calc_rsi_flip_flop(SIB_TALISMAN_R12);
-		obj->calc_all_static_detail();
+		_G(obj)->show_sib(SIB_TALISMAN_R12);
+		_G(obj)->calc_rsi_flip_flop(SIB_TALISMAN_R12);
+		_G(obj)->calc_all_static_detail();
 		auto_move(5, P_CHEWY);
 		start_spz(CH_TALK12, 255, false, 0);
 		start_aad_wait(109, -1);
 		show_cur();
 
 	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
-		_G(timer_nr)[0] = room->set_timer(255, 20);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
 	else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
-		det->show_static_spr(12);
+		_G(det)->show_static_spr(12);
 }
 
 bool Room12::timer(int16 t_nr, int16 ani_nr) {
@@ -111,14 +111,14 @@ bool Room12::timer(int16 t_nr, int16 ani_nr) {
 void Room12::init_bork() {
 	if (!auto_obj_status(R12_BORK_OBJ) && !_G(spieler).R12BorkTalk) {
 		if (!_G(auto_obj))
-			det->load_taf_seq(62, 24, nullptr);
+			_G(det)->load_taf_seq(62, 24, nullptr);
 
 		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
 			_G(auto_obj) = 1;
 			mov_phasen[R12_BORK_OBJ].AtsText = 120;
 			mov_phasen[R12_BORK_OBJ].Lines = 5;
 			mov_phasen[R12_BORK_OBJ].Repeat = 1;
-			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)room->_roomInfo->ZoomFak + 20;
+			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)_G(room)->_roomInfo->ZoomFak + 20;
 			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			auto_mov_obj[R12_BORK_OBJ].Mode = true;
@@ -132,7 +132,7 @@ void Room12::init_bork() {
 
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
-					uhr->reset_timer(_G(timer_nr)[0], 0);
+					_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 					wait_show_screen(10);
 					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 					start_aad_wait(14, -1);
@@ -145,7 +145,7 @@ void Room12::init_bork() {
 			}
 		}
 
-		uhr->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 	}
 }
 
@@ -169,21 +169,21 @@ void Room12::bork_ok() {
 	wait_auto_obj(R12_BORK_OBJ);
 
 	_G(spieler).R12BorkInRohr = true;
-	det->set_detail_pos(3, 170, 145);
-	det->start_detail(3, 255, ANI_VOR);
+	_G(det)->set_detail_pos(3, 170, 145);
+	_G(det)->start_detail(3, 255, ANI_VOR);
 	start_aad_wait(57, -1);
-	det->stop_detail(3);
+	_G(det)->stop_detail(3);
 
 	mov_phasen[R12_BORK_OBJ].Repeat = 1;
 	mov_phasen[R12_BORK_OBJ].Lines = 3;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
-	det->hide_static_spr(10);
+	_G(det)->hide_static_spr(10);
 	start_detail_wait(4, 1, ANI_VOR);
 	_G(talk_hide_static) = -1;
-	det->show_static_spr(12);
-	atds->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
-	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+	_G(det)->show_static_spr(12);
+	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
+	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
 	flags.MausLinks = false;
 	show_cur();
@@ -208,8 +208,8 @@ int16 Room12::use_terminal() {
 
 				load_chewy_taf(CHEWY_BORK);
 				flags.NoScroll = false;
-				atds->set_ats_str(118, 0, ATS_DATEI);
-				det->hide_static_spr(12);
+				_G(atds)->set_ats_str(118, 0, ATS_DATEI);
+				_G(det)->hide_static_spr(12);
 				_G(menu_item) = CUR_WALK;
 				cursor_wahl(_G(menu_item));
 				set_person_pos(108, 90, P_CHEWY, -1);
@@ -224,7 +224,7 @@ int16 Room12::use_terminal() {
 
 			} else {
 				_G(spieler).R12TransOn = true;
-				uhr->reset_timer(_G(timer_nr)[1], 0);
+				_G(uhr)->reset_timer(_G(timer_nr)[1], 0);
 			}
 		} else {
 			start_aad(114, 0);
@@ -237,12 +237,12 @@ int16 Room12::use_terminal() {
 void Room12::use_linke_rohr() {
 	_G(spieler).R12TalismanOk = false;
 	_G(spieler).R12KetteLinks = true;
-	uhr->disable_timer();
-	obj->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
-	obj->calc_rsi_flip_flop(SIB_ROEHRE_R12);
-	obj->calc_all_static_detail();
-	atds->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
-	atds->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(uhr)->disable_timer();
+	_G(obj)->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
+	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
+	_G(obj)->calc_all_static_detail();
+	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
 	start_aad(111, 0);
 }
 
@@ -270,8 +270,8 @@ int16 Room12::useTransformerTube() {
 
 		if (_G(spieler).R12KetteLinks) {
 			_G(spieler).R12KetteLinks = false;
-			uhr->enable_timer();
-			atds->set_ats_str(117, 1, AAD_DATEI);
+			_G(uhr)->enable_timer();
+			_G(atds)->set_ats_str(117, 1, AAD_DATEI);
 		} else {
 			auto_move(7, P_CHEWY);
 			start_aad_wait(29, -1);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 61d5f9a552e..a2bdd093eeb 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -54,39 +54,39 @@ void Room13::entry() {
 		start_aad_wait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
-			det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+			_G(det)->show_static_spr(11 - _G(spieler).R13MonitorStatus);
 
 		if (!_G(spieler).R13BorkOk) {
-			det->show_static_spr(12);
-			obj->hide_sib(SIB_BANDKNOPF_R13);
+			_G(det)->show_static_spr(12);
+			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			_G(spieler).R13Bandlauf = true;
 
-			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 
-			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
 		}
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				det->start_detail(i, 255, false);
+				_G(det)->start_detail(i, 255, false);
 		}
 		
 		if (!flags.LoadGame && _G(spieler).R13Band) {
 			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-			atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R13Band = false;
 		}
 
 		if (_G(spieler).R21GitterMuell)
-			det->hide_static_spr(6);
+			_G(det)->hide_static_spr(6);
 	}
 }
 
 void Room13::xit() {
 	_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-	atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R13Band = false;
 }
 
@@ -101,15 +101,15 @@ void Room13::talk_bork() {
 	if (!_G(spieler).R13BorkOk) {
 		_G(spieler).R13BorkOk = true;
 		_G(spieler).R12ChewyBork = false;
-		det->show_static_spr(13);
-		det->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		det->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], false, true);
+		_G(det)->show_static_spr(13);
+		_G(det)->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		_G(det)->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
-		det->stop_detail(9);
-		det->load_taf_seq(86, 12, nullptr);
+		_G(det)->stop_detail(9);
+		_G(det)->load_taf_seq(86, 12, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		det->hide_static_spr(12);
+		_G(det)->hide_static_spr(12);
 		_G(auto_obj) = 1;
 
 		mov_phasen[R13_BORK_OBJ].AtsText = 122;
@@ -133,18 +133,18 @@ void Room13::talk_bork() {
 		_G(auto_obj) = 0;
 		flags.NoScroll = false;
 
-		atds->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
-		obj->show_sib(SIB_BANDKNOPF_R13);
+		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(obj)->show_sib(SIB_BANDKNOPF_R13);
 		set_person_pos(153, 138, P_CHEWY, P_LEFT);
 
 		start_aad_wait(34, -1);
 		start_aad_wait(249, -1);
 
-		obj->show_sib(SIB_TKNOPF1_R11);
-		obj->show_sib(SIB_SCHLITZ_R11);
-		obj->show_sib(SIB_TKNOPF2_R11);
-		obj->show_sib(SIB_TKNOPF3_R11);
+		_G(obj)->show_sib(SIB_TKNOPF1_R11);
+		_G(obj)->show_sib(SIB_SCHLITZ_R11);
+		_G(obj)->show_sib(SIB_TKNOPF2_R11);
+		_G(obj)->show_sib(SIB_TKNOPF3_R11);
 
 		if (_G(spieler).R6DoorRightB)
 			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
@@ -155,9 +155,9 @@ void Room13::talk_bork() {
 void Room13::jmp_band() {
 	if (!_G(spieler).R13Band && !_G(spieler).R12ChewyBork) {
 		if (!_G(spieler).R13Bandlauf) {
-			obj->hide_sib(SIB_BANDKNOPF_R13);
+			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			_G(spieler).room_e_obj[25].Attribut = 255;
-			atds->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R13Band = true;
 			auto_move(3, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -177,11 +177,11 @@ void Room13::jmp_band() {
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
 			_G(spieler).R13Bandlauf = false;
-			atds->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			atds->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			atds->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			obj->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
-			obj->hide_sib(SIB_BANDKNOPF_R13);
+			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(obj)->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
+			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
 
 			flic_cut(FCUT_018, CFO_MODE);
@@ -198,10 +198,10 @@ void Room13::jmp_band() {
 void Room13::jmp_boden() {
 	if (_G(spieler).R13Band) {
 		if (!_G(spieler).R13Surf)
-			obj->show_sib(SIB_BANDKNOPF_R13);
+			_G(obj)->show_sib(SIB_BANDKNOPF_R13);
 
 		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-		atds->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R13Band = false;
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -227,15 +227,15 @@ int16 Room13::monitor_knopf() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			if (_G(spieler).R13MonitorStatus)
-				det->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
+				_G(det)->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
 
 			++_G(spieler).R13MonitorStatus;
 			if (_G(spieler).R13MonitorStatus > 4)
 				_G(spieler).R13MonitorStatus = 0;
 			else
-				det->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+				_G(det)->show_static_spr(11 - _G(spieler).R13MonitorStatus);
 
-			atds->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
+			_G(atds)->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 78482349ab8..68f84582b33 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -35,12 +35,12 @@ void Room14::entry() {
 	_G(spieler).ScrollxStep = 2;
 
 	if (!_G(spieler).R14Feuer)
-		obj->hide_sib(46);
+		_G(obj)->hide_sib(46);
 
 	if (!flags.LoadGame) {
 		if (_G(spieler).R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
-			det->show_static_spr(6);
+			_G(det)->show_static_spr(6);
 			_G(spieler).scrollx = 160;
 			_G(spieler).scrolly = 120;
 		} else {
@@ -60,11 +60,11 @@ bool Room14::timer(int16 t_nr, int16 ani_nr) {
 void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
 		flags.AutoAniPlay = true;
-		det->hide_static_spr(9);
-		start_detail_wait(room->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
-		uhr->reset_timer(t_nr, 0);
-		det->show_static_spr(9);
-		det->start_detail(7, 1, ANI_VOR);
+		_G(det)->hide_static_spr(9);
+		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
+		_G(uhr)->reset_timer(t_nr, 0);
+		_G(det)->show_static_spr(9);
+		_G(det)->start_detail(7, 1, ANI_VOR);
 		flags.AutoAniPlay = false;
 	}
 }
@@ -100,8 +100,8 @@ int16 Room14::use_gleiter() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(10, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			det->show_static_spr(6);
-			atds->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(det)->show_static_spr(6);
+			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
 		} else {
 			_G(spieler).R23GleiterExit = 14;
 			Room23::cockpit();
@@ -118,7 +118,7 @@ void Room14::talk_eremit()  {
 
 		if (_G(spieler).R14Translator) {
 			load_ads_dia(0);
-			obj->show_sib(46);
+			_G(obj)->show_sib(46);
 		} else {
 			hide_cur();
 			start_aad_wait(24, -1);
@@ -166,29 +166,29 @@ void Room14::feuer() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
 		auto_move(7, P_CHEWY);
-		det->hide_static_spr(9);
+		_G(det)->hide_static_spr(9);
 		start_detail_frame(2, 1, ANI_VOR, 9);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(13, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_detail(2);
 		start_detail_wait(5, 1, ANI_VOR);
-		det->show_static_spr(9);
+		_G(det)->show_static_spr(9);
 	}
 
 	del_inventar(tmp);
-	det->start_detail(6, 255, ANI_VOR);
+	_G(det)->start_detail(6, 255, ANI_VOR);
 	wait_show_screen(40);
 
 	if (waffe)
 		auto_move(7, P_CHEWY);
 
 	start_aad_wait(26, -1);
-	det->hide_static_spr(9);
+	_G(det)->hide_static_spr(9);
 	start_detail_wait(3, 1, ANI_VOR);
-	det->show_static_spr(9);
+	_G(det)->show_static_spr(9);
 	invent_2_slot(FLUXO_INV);
-	atds->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
 	_G(spieler).R14FluxoFlex = true;
 	flags.AutoAniPlay = false;
 	show_cur();
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index 603ea5bb23d..414254b5a15 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -33,13 +33,13 @@ void Room16::entry() {
 	_G(zoom_horizont) = 140;
 
 	if (!_G(spieler).R16F5Exit) {
-		det->show_static_spr(4);
+		_G(det)->show_static_spr(4);
 		_G(spieler).room_e_obj[32].Attribut = 255;
-		atds->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		det->hide_static_spr(4);
+		_G(det)->hide_static_spr(4);
 		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
-		atds->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 }
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index aa3f321866d..0143fd237a4 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -52,34 +52,34 @@ static const MovLine CHEWY_MPKT1[2] = {
 
 void Room17::entry() {
 	if (!_G(spieler).R17EnergieOut) {
-		det->start_detail(1, 255, ANI_VOR);
+		_G(det)->start_detail(1, 255, ANI_VOR);
 		for (int i = 0; i < 3; ++i)
-			det->start_detail(6 + i, 255, ANI_VOR);
+			_G(det)->start_detail(6 + i, 255, ANI_VOR);
 	}
 
 	plot_seil();
 
 	if (_G(spieler).R17GitterWeg)
-		det->hide_static_spr(5);
+		_G(det)->hide_static_spr(5);
 
 	if (_G(spieler).R17DoorKommand)
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 
 	if (_G(spieler).R17Location == 1) {
 		flags.ZoomMov = true;
 		_G(zoom_mov_fak) = 3;
-		room->set_zoom(25);
+		_G(room)->set_zoom(25);
 		_G(zoom_horizont) = 0;
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 60;
 		set_person_pos(242, 146, P_CHEWY, P_LEFT);
 		xit();
 	} else if (_G(spieler).R17Location == 3) {
-		room->set_zoom(32);
+		_G(room)->set_zoom(32);
 		_G(zoom_horizont) = 399;
 		xit();
 	} else {
-		room->set_zoom(15);
+		_G(room)->set_zoom(15);
 		_G(zoom_horizont) = 0;
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).room_e_obj[38].Attribut = 255;
@@ -108,10 +108,10 @@ void Room17::xit() {
 }
 
 bool Room17::timer(int16 t_nr, int16 ani_nr) {
-	if (room->_roomTimer.ObjNr[ani_nr] == 2 ||
-		room->_roomTimer.ObjNr[ani_nr] == 3) {
+	if (_G(room)->_roomTimer.ObjNr[ani_nr] == 2 ||
+		_G(room)->_roomTimer.ObjNr[ani_nr] == 3) {
 		if (_G(spieler).R17EnergieOut)
-			uhr->reset_timer(t_nr, 0);
+			_G(uhr)->reset_timer(t_nr, 0);
 		else
 			return true;
 	}
@@ -147,7 +147,7 @@ int16 Room17::use_seil() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(10, 1, ANI_VOR);
 		_G(spieler).R17Seil = true;
-		atds->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
 		plot_seil();
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.AutoAniPlay = false;
@@ -163,19 +163,19 @@ int16 Room17::use_seil() {
 void Room17::plot_seil() {
 	if (_G(spieler).R17Seil) {
 		for (int16 i = 0; i < 3; i++)
-			det->show_static_spr(8 + i);
+			_G(det)->show_static_spr(8 + i);
 	}
 }
 
 void Room17::kletter_down() {
 	auto_move(5, P_CHEWY);
-	det->load_taf_seq(177, 1, nullptr);
+	_G(det)->load_taf_seq(177, 1, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(14, 1, ANI_VOR);
 	flags.ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
-	room->set_zoom(32);
+	_G(room)->set_zoom(32);
 	spieler_mi->Vorschub = 8;
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
@@ -185,13 +185,13 @@ void Room17::kletter_down() {
 
 void Room17::kletter_up() {
 	auto_move(6, P_CHEWY);
-	det->load_taf_seq(141, 4, nullptr);
+	_G(det)->load_taf_seq(141, 4, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(11, 1, ANI_VOR);
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollyStep = 1;
-	room->set_zoom(25);
+	_G(room)->set_zoom(25);
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
 	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT1);
@@ -246,14 +246,14 @@ void Room17::door_kommando(int16 mode) {
 				_G(spieler).R17DoorKommand = true;
 				start_detail_wait(4, 1, ANI_VOR);
 				stop_person(P_CHEWY);
-				det->show_static_spr(7);
+				_G(det)->show_static_spr(7);
 			}
 		} else {
 			close_door();
 		}
 
 		flags.AutoAniPlay = false;
-		atds->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
+		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
 	}
 }
 
@@ -261,9 +261,9 @@ void Room17::close_door() {
 	if (_G(spieler).R17DoorKommand) {
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).R17DoorKommand = false;
-		atds->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
-		det->hide_static_spr(7);
-		det->start_detail(4, 1, ANI_RUECK);
+		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
+		_G(det)->hide_static_spr(7);
+		_G(det)->start_detail(4, 1, ANI_RUECK);
 	}
 }
 
@@ -287,18 +287,18 @@ int16 Room17::energie_hebel() {
 	} else if (!_G(spieler).inv_cur) {
 		action_flag = true;
 
-		obj->calc_rsi_flip_flop(SIB_HEBEL_R17);
+		_G(obj)->calc_rsi_flip_flop(SIB_HEBEL_R17);
 		_G(spieler).R17EnergieOut ^= 1;
 
 		if (!_G(spieler).R17EnergieOut) {
-			det->start_detail(1, 255, ANI_VOR);
+			_G(det)->start_detail(1, 255, ANI_VOR);
 
 			for (int i = 0; i < 3; ++i)
-				det->start_detail(i + 6, 255, ANI_VOR);
+				_G(det)->start_detail(i + 6, 255, ANI_VOR);
 		}
 
-		atds->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
-		atds->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
+		_G(atds)->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
+		_G(atds)->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
 		g_engine->_sound->playSound(12);
 
 		if (_G(spieler).R17EnergieOut) {
@@ -329,7 +329,7 @@ int16 Room17::get_oel() {
 		start_detail_wait(13, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
-		obj->add_inventar(BECHER_VOLL_INV, &room_blk);
+		_G(obj)->add_inventar(BECHER_VOLL_INV, &room_blk);
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index e442134cb73..b3ecdc31317 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -88,30 +88,30 @@ static const AniBlock ABLOCK24[2] = {
 
 void Room18::entry() {
 	_G(spieler).R18MoniSwitch = false;
-	atds->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R18CartTerminal)
-		det->show_static_spr(23);
+		_G(det)->show_static_spr(23);
 
 	if (!_G(spieler).R18SurimyWurf) {
 		init_borks();
 	} else {
 		for (int16 i = 0; i < 5; i++)
-			det->hide_static_spr(BORK_SPR[i]);
+			_G(det)->hide_static_spr(BORK_SPR[i]);
 
 		for (int16 i = 0; i < (4 - (_G(spieler).R18Krone ? 1 : 0)); i++)
-			det->show_static_spr(BORK_SPR1[i]);
+			_G(det)->show_static_spr(BORK_SPR1[i]);
 	}
 
 	if (_G(spieler).R16F5Exit)
-		det->hide_static_spr(19);
+		_G(det)->hide_static_spr(19);
 	
 	if (_G(spieler).R17EnergieOut) {
-		det->stop_detail(0);
-		atds->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(det)->stop_detail(0);
+		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
 	} else {
-		atds->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
 	}
 
 	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
@@ -128,31 +128,31 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 		flags.AutoAniPlay = true;
 
 		if (t_nr == _G(timer_nr)[0]) {
-			det->hide_static_spr(16);
+			_G(det)->hide_static_spr(16);
 			start_detail_wait(10, 1, ANI_VOR);
-			det->show_static_spr(16);
-			uhr->reset_timer(_G(timer_nr)[0], 10);
+			_G(det)->show_static_spr(16);
+			_G(uhr)->reset_timer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
 			hide_cur();
-			det->hide_static_spr(17);
+			_G(det)->hide_static_spr(17);
 			start_detail_wait(9, 1, ANI_VOR);
-			det->show_static_spr(17);
+			_G(det)->show_static_spr(17);
 
 			if (!_G(spieler).R18SondeMoni) {
 				_G(spieler).R18SondeMoni = true;
 				start_detail_wait(2, 1, ANI_VOR);
-				det->show_static_spr(9);
+				_G(det)->show_static_spr(9);
 				start_detail_wait(4, 1, ANI_VOR);
-				det->show_static_spr(11);
+				_G(det)->show_static_spr(11);
 				wait_show_screen(50);
-				det->hide_static_spr(9);
-				det->hide_static_spr(11);
+				_G(det)->hide_static_spr(9);
+				_G(det)->hide_static_spr(11);
 			} else {
 				monitor();
 			}
 
 			show_cur();
-			uhr->reset_timer(_G(timer_nr)[1], 15);
+			_G(uhr)->reset_timer(_G(timer_nr)[1], 15);
 		}
 
 		flags.AutoAniPlay = false;
@@ -171,13 +171,13 @@ void Room18::gedAction(int index) {
 
 void Room18::init_borks() {
 	for (int16 i = 0; i < 5; i++)
-		det->show_static_spr(BORK_SPR[i]);
+		_G(det)->show_static_spr(BORK_SPR[i]);
 	
 	for (int16 i = 0; i < 4; i++)
-		det->hide_static_spr(BORK_SPR1[i]);
+		_G(det)->hide_static_spr(BORK_SPR1[i]);
 
-	_G(timer_nr)[0] = room->set_timer(255, 10);
-	_G(timer_nr)[1] = room->set_timer(255, 15);
+	_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
+	_G(timer_nr)[1] = _G(room)->set_timer(255, 15);
 	_G(spieler).scrollx = 276;
 	_G(spieler).scrolly = 0;
 	flags.NoScroll = true;
@@ -191,11 +191,11 @@ void Room18::monitor() {
 		start_ani_block(2, ABLOCK21);
 		nr = (_G(spieler).R17EnergieOut) ? 2 : 1;
 	} else {
-		det->stop_detail(23);
-		atds->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(det)->stop_detail(23);
+		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
 	}
 
-	atds->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
+	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
 }
 
 int16 Room18::sonden_moni() {
@@ -207,16 +207,16 @@ int16 Room18::sonden_moni() {
 		hide_cur();
 		auto_move(8, P_CHEWY);
 		start_detail_wait(3, 1, ANI_VOR);
-		det->show_static_spr(10);
+		_G(det)->show_static_spr(10);
 		start_ani_block(3, ABLOCK20);
 
 		for (int16 i = 0; i < 3; i++)
-			det->show_static_spr(i + 12);
+			_G(det)->show_static_spr(i + 12);
 
 		wait_show_screen(40);
 
 		for (int16 i = 0; i < 5; i++)
-			det->hide_static_spr(i + 10);
+			_G(det)->hide_static_spr(i + 10);
 
 		show_cur();
 	}
@@ -232,8 +232,8 @@ int16 Room18::calc_surimy() {
 		hide_cur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
-		det->load_taf_seq(245, 50, nullptr);
-		det->load_taf_seq(116, 55, nullptr);
+		_G(det)->load_taf_seq(245, 50, nullptr);
+		_G(det)->load_taf_seq(116, 55, nullptr);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -262,25 +262,25 @@ int16 Room18::calc_surimy() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_auto_obj(SURIMY_OBJ);
 
-		det->set_detail_pos(21, 392, 170);
-		det->set_detail_pos(22, 447, 154);
+		_G(det)->set_detail_pos(21, 392, 170);
+		_G(det)->set_detail_pos(22, 447, 154);
 		start_detail_frame(21, 1, ANI_VOR, 14);
-		det->start_detail(22, 1, ANI_VOR);
+		_G(det)->start_detail(22, 1, ANI_VOR);
 		wait_detail(21);
-		det->set_static_pos(26, 392, 170, false, true);
-		det->show_static_spr(26);
+		_G(det)->set_static_pos(26, 392, 170, false, true);
+		_G(det)->show_static_spr(26);
 
-		det->hide_static_spr(24);
+		_G(det)->hide_static_spr(24);
 		start_ani_block(2, ABLOCK22);
-		det->show_static_spr(20);
+		_G(det)->show_static_spr(20);
 
 		for (int16 i = 0; i < 3; i++)
-			det->hide_static_spr(i + 15);
+			_G(det)->hide_static_spr(i + 15);
 
 		start_ani_block(2, ABLOCK23);
-		det->show_static_spr(18);
-		det->show_static_spr(19);
-		det->hide_static_spr(26);
+		_G(det)->show_static_spr(18);
+		_G(det)->show_static_spr(19);
+		_G(det)->hide_static_spr(26);
 
 		flags.NoScroll = true;
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
@@ -288,19 +288,19 @@ int16 Room18::calc_surimy() {
 		auto_scroll(70, 0);
 		wait_auto_obj(SURIMY_OBJ);
 
-		det->set_detail_pos(21, 143, 170);
-		det->set_detail_pos(22, 198, 154);
+		_G(det)->set_detail_pos(21, 143, 170);
+		_G(det)->set_detail_pos(22, 198, 154);
 		start_detail_frame(21, 1, ANI_VOR, 14);
-		det->start_detail(22, 1, ANI_VOR);
+		_G(det)->start_detail(22, 1, ANI_VOR);
 		wait_detail(21);
-		det->set_static_pos(26, 143, 170, false, true);
-		det->show_static_spr(26);
+		_G(det)->set_static_pos(26, 143, 170, false, true);
+		_G(det)->show_static_spr(26);
 
-		det->hide_static_spr(25);
+		_G(det)->hide_static_spr(25);
 		start_ani_block(2, ABLOCK24);
-		det->show_static_spr(21);
+		_G(det)->show_static_spr(21);
 
-		det->hide_static_spr(26);
+		_G(det)->hide_static_spr(26);
 		mov_phasen[SURIMY_OBJ].Repeat = 1;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT2);
 		auto_scroll(0, 0);
@@ -311,15 +311,15 @@ int16 Room18::calc_surimy() {
 		_G(spieler).ScrollxStep = 2;
 		_G(auto_obj) = 0;
 
-		atds->set_ats_str(153, 1, ATS_DATEI);
-		atds->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(153, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
 
 		for (int16 i = 0; i < 3; i++)
-			atds->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
 
-		atds->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
-		det->del_taf_tbl(245, 50, nullptr);
+		_G(det)->del_taf_tbl(245, 50, nullptr);
 	}
 
 	return action_flag;
@@ -353,17 +353,17 @@ short Room18::use_cart_moni() {
 		_G(spieler).R18CartTerminal ^= 1;
 
 		if (!_G(spieler).R18CartTerminal) {
-			atds->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
-			det->hide_static_spr(23);
+			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(det)->hide_static_spr(23);
 			start_detail_wait(20, 1, ANI_RUECK);
 		} else {
-			atds->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
 			start_detail_wait(20, 1, ANI_VOR);
-			det->show_static_spr(23);
+			_G(det)->show_static_spr(23);
 
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
-				atds->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
+				_G(atds)->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
 				start_aad_wait(120, -1);
 			}
 		}
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index bb2bfd83a0e..b7d4aab18ee 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -68,7 +68,7 @@ void Room21::entry() {
 	load_chewy_taf(CHEWY_MINI);
 	calc_laser();
 	init_spinne();
-	_G(timer_nr)[2] = room->set_timer(255, 1);
+	_G(timer_nr)[2] = _G(room)->set_timer(255, 1);
 	flags.NoEndPosMovObj = true;
 	_G(SetUpScreenFunc) = setup_func;
 }
@@ -85,37 +85,37 @@ bool Room21::timer(int16 t_nr, int16 ani_nr) {
 void Room21::calc_laser() {
 	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
 		_G(spieler).R21Laser1Weg = true;
-		det->stop_detail(3);
-		atds->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->stop_detail(3);
+		_G(atds)->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		_G(spieler).R21Laser1Weg = false;
-		det->start_detail(3, 255, ANI_VOR);
-		atds->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->start_detail(3, 255, ANI_VOR);
+		_G(atds)->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
-		if (!obj->check_inventar(SEIL_INV) && !_G(spieler).R17Seil) {
-			obj->show_sib(SIB_SEIL_R21);
-			atds->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		if (!_G(obj)->check_inventar(SEIL_INV) && !_G(spieler).R17Seil) {
+			_G(obj)->show_sib(SIB_SEIL_R21);
+			_G(atds)->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 
 		_G(spieler).R21Laser2Weg = true;
-		det->stop_detail(4);
-		atds->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->stop_detail(4);
+		_G(atds)->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
 
 	} else {
-		obj->hide_sib(SIB_SEIL_R21);
-		atds->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(obj)->hide_sib(SIB_SEIL_R21);
+		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R21Laser2Weg = false;
-		det->start_detail(4, 255, ANI_VOR);
-		atds->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->start_detail(4, 255, ANI_VOR);
+		_G(atds)->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 }
 
 void Room21::init_spinne() {
-	det->load_taf_seq(42, 48, nullptr);
+	_G(det)->load_taf_seq(42, 48, nullptr);
 	_G(auto_obj) = 2;
 
 	mov_phasen[SPINNE1_OBJ].AtsText = 130;
@@ -135,14 +135,14 @@ void Room21::init_spinne() {
 	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
 	auto_mov_obj[SPINNE2_OBJ].Mode = true;
 	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], 2, (const MovLine *)SPINNE_MPKT1);
-	_G(timer_nr)[0] = room->set_timer(255, 21);
+	_G(timer_nr)[0] = _G(room)->set_timer(255, 21);
 	_G(e_streifen) = false;
 }
 
 void Room21::restart_spinne2() {
 	mov_phasen[SPINNE2_OBJ].Repeat = 1;
 	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
+	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 	_G(e_streifen) = false;
 }
 
@@ -194,25 +194,25 @@ void Room21::chewy_kolli() {
 		flags.AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 ani_nr = (spieler_vector[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
-		det->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		_G(det)->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 		start_detail_wait(ani_nr, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.AutoAniPlay = false;
 		spieler_vector[P_CHEWY].Count = tmp;
 		get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-		mov->continue_auto_go();
+		_G(mov)->continue_auto_go();
 	}
 }
 
 void Room21::salto() {
-	if (!_G(spieler).inv_cur && atds->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8
+	if (!_G(spieler).inv_cur && _G(atds)->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8
 		&& !_G(spieler).R21Salto && !flags.AutoAniPlay) {
 		_G(spieler).R21Salto = true;
 		flags.AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
 		for (int16 i = 0; i < 3; i++) {
-			det->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
+			_G(det)->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
 				spieler_vector[P_CHEWY].Xypos[1]);
 		}
 
@@ -231,7 +231,7 @@ void Room21::use_gitter_energie() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 
 	switch_room(17);
-	det->hide_static_spr(5);
+	_G(det)->hide_static_spr(5);
 	start_detail_wait(9, 1, ANI_VOR);
 	_G(spieler).R17GitterWeg = true;
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 5f6712ee27e..b951ca58e74 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -61,10 +61,10 @@ AniBlock ABLOCK14[2] = {
 
 void Room22::entry() {
 	if (!_G(spieler).R22BorkPlatt) {
-		det->load_taf_seq(36, 21, nullptr);
-		room->set_timer(255, 15);
+		_G(det)->load_taf_seq(36, 21, nullptr);
+		_G(room)->set_timer(255, 15);
 	} else if (!_G(spieler).R22GetBork) {
-		det->show_static_spr(4);
+		_G(det)->show_static_spr(4);
 	}
 }
 
@@ -91,7 +91,7 @@ int16 Room22::chewy_amboss() {
 		flags.NoPalAfterFlc = false;
 		flic_cut(FCUT_007, CFO_MODE);
 		_G(spieler).R22ChewyPlatt = true;
-		atds->set_ats_str(79, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
 		flags.AutoAniPlay = false;
 
 		show_cur();
@@ -121,7 +121,7 @@ void Room22::bork(int16 t_nr) {
 				bork_walk1();
 			} else {
 				if (!_G(spieler).R22ChewyPlatt) {
-					atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+					_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 					_G(spieler).R22ChewyPlatt = true;
 				}
 
@@ -131,7 +131,7 @@ void Room22::bork(int16 t_nr) {
 			show_cur();
 		}
 
-		uhr->reset_timer(t_nr, 0);
+		_G(uhr)->reset_timer(t_nr, 0);
 		flags.AutoAniPlay = false;
 	}
 }
@@ -153,23 +153,23 @@ void Room22::bork_walk2() {
 
 	flic_cut(FCUT_009, CFO_MODE);
 	register_cutscene(3);
-	det->show_static_spr(4);
-	atds->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(det)->show_static_spr(4);
+	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R22BorkPlatt = true;
-	atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 }
 
 void Room22::get_bork() {
 	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
 		auto_move(4, P_CHEWY);
-		det->hide_static_spr(4);
+		_G(det)->hide_static_spr(4);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK14);
 		set_person_pos(171, 120, P_CHEWY, P_LEFT);
 		start_aad_wait(11, -1);
-		det->stop_detail(3);
+		_G(det)->stop_detail(3);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		atds->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
 		invent_2_slot(BORK_INV);
 
 		_G(spieler).R22GetBork = true;
@@ -186,17 +186,17 @@ int16 Room22::malen() {
 		flags.AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		flic_cut(FCUT_008, CFO_MODE);
-		atds->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R22Paint = true;
-		obj->calc_rsi_flip_flop(SIB_PAINT_R22);
-		obj->hide_sib(SIB_PAINT_R22);
+		_G(obj)->calc_rsi_flip_flop(SIB_PAINT_R22);
+		_G(obj)->hide_sib(SIB_PAINT_R22);
 		del_inventar(_G(spieler).AkInvent);
-		obj->calc_all_static_detail();
+		_G(obj)->calc_all_static_detail();
 		flags.AutoAniPlay = false;
 
 		if (!_G(spieler).R22ChewyPlatt) {
 			_G(spieler).R22ChewyPlatt = true;
-			atds->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 9006d2096a8..3588fc9eba6 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -48,9 +48,9 @@ void Room23::cockpit() {
 	switch_room(23);
 
 	if (!_G(spieler).R23Cartridge || !_G(spieler).R25GleiteLoesch)
-		det->hide_static_spr(3);
+		_G(det)->hide_static_spr(3);
 	else
-		det->show_static_spr(3);
+		_G(det)->show_static_spr(3);
 }
 
 int16 Room23::start_gleiter() {
@@ -82,7 +82,7 @@ int16 Room23::start_gleiter() {
 				wait_show_screen(30);
 
 				for (int16 i = 0; i < 4; i++)
-					det->stop_detail(i);
+					_G(det)->stop_detail(i);
 
 				if (_G(spieler).R23GleiterExit == 14) {
 					_G(out)->setze_zeiger(nullptr);
@@ -132,23 +132,23 @@ void Room23::use_cartridge() {
 	_G(spieler).R23Cartridge = true;
 
 	if (_G(spieler).R18CartSave) {
-		atds->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(111, 2, ATS_DATEI);
+		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(111, 2, ATS_DATEI);
 		start_detail_wait(4, 1, ANI_VOR);
-		det->show_static_spr(3);
+		_G(det)->show_static_spr(3);
 	} else {
-		atds->set_ats_str(111, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(111, 1, ATS_DATEI);
 	}
 
 	_G(menu_item_vorwahl) = CUR_USE;
 }
 
 void Room23::get_cartridge() {
-	atds->set_ats_str(111, 0, ATS_DATEI);
-	atds->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_ats_str(111, 0, ATS_DATEI);
+	_G(atds)->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
 
 	_G(spieler).R23Cartridge = false;
-	det->hide_static_spr(3);
+	_G(det)->hide_static_spr(3);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 9e0c0d29281..adc578b2b33 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -48,16 +48,16 @@ void Room24::entry() {
 	cursor_wahl(CUR_USER);
 
 	if (_G(spieler).R16F5Exit)
-		det->show_static_spr(10);
+		_G(det)->show_static_spr(10);
 	else
-		det->hide_static_spr(10);
+		_G(det)->hide_static_spr(10);
 
 	calc_hebel_spr();
 	calc_animation(255);
 
 	for (int16 i = 0; i < 3; i++) {
 		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
-			det->start_detail(5 + i * 4, 255, ANI_RUECK);
+			_G(det)->start_detail(5 + i * 4, 255, ANI_RUECK);
 	}
 }
 
@@ -89,17 +89,17 @@ void Room24::use_hebel(int16 txt_nr) {
 		_G(spieler).R16F5Exit = true;
 		g_engine->_sound->playSound(1, 0);
 		g_engine->_sound->stopSound(1);
-		det->start_detail(1, 1, ANI_VOR);
-		det->show_static_spr(10);
-		atds->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
+		_G(det)->start_detail(1, 1, ANI_VOR);
+		_G(det)->show_static_spr(10);
+		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
 
 	} else if (_G(spieler).R16F5Exit) {
-		det->hide_static_spr(10);
+		_G(det)->hide_static_spr(10);
 		g_engine->_sound->playSound(1, 1);
 		g_engine->_sound->stopSound(0);
-		det->start_detail(1, 1, ANI_RUECK);
+		_G(det)->start_detail(1, 1, ANI_RUECK);
 		_G(spieler).R16F5Exit = false;
-		atds->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
 	}
 }
 
@@ -116,10 +116,10 @@ void Room24::calc_hebel_spr() {
 
 	for (int16 i = 0; i < 3; i++) {
 		for (int16 j = 0; j < 3; j++)
-			det->hide_static_spr(1 + j + i * 3);
+			_G(det)->hide_static_spr(1 + j + i * 3);
 
-		det->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
-		atds->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
+		_G(det)->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
+		_G(atds)->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
 	}
 }
 
@@ -131,16 +131,16 @@ void Room24::calc_animation(int16 kristall_nr) {
 			int16 ani_nr = _G(spieler).R24KristallLast[kristall_nr] == 13 ? 7 : 8;
 			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
 			g_engine->_sound->stopSound(0);
-			det->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
+			_G(det)->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
-			det->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
+			_G(det)->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
 
 		} else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 			int16 ani_nr = KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13 ? 7 : 8;
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(5 + ani_nr + kristall_nr * 4, 0);
-			det->stop_detail(5 + kristall_nr * 4);
+			_G(det)->stop_detail(5 + kristall_nr * 4);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
 		}
@@ -149,10 +149,10 @@ void Room24::calc_animation(int16 kristall_nr) {
 	}
 
 	for (int16 i = 0; i < 6; i++)
-		det->hide_static_spr(13 + i);
+		_G(det)->hide_static_spr(13 + i);
 
 	for (int16 i = 0; i < 3; i++) {
-		det->show_static_spr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
+		_G(det)->show_static_spr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
 		_G(spieler).R24KristallLast[i] = KRISTALL_SPR[i][_G(spieler).R24Hebel[i]];
 	}
 }
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 18d703ee5eb..acdf59ea184 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -48,20 +48,20 @@ void Room25::entry() {
 		g_engine->_sound->playSound(0, 0);
 
 		for (int i = 0; i < 9; ++i)
-			det->start_detail(i, 255, ANI_VOR);
+			_G(det)->start_detail(i, 255, ANI_VOR);
 	}
 
 	if (!_G(spieler).R29Schlauch2) {
-		det->hide_static_spr(0);
-		det->hide_static_spr(1);
+		_G(det)->hide_static_spr(0);
+		_G(det)->hide_static_spr(1);
 	}
 
 	if (!_G(spieler).R25FirstEntry) {
 		hide_cur();
 
-		if (obj->check_inventar(TRANSLATOR_INV)) {
-			obj->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
-			atds->set_ats_str(113, 0, ATS_DATEI);
+		if (_G(obj)->check_inventar(TRANSLATOR_INV)) {
+			_G(obj)->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
+			_G(atds)->set_ats_str(113, 0, ATS_DATEI);
 
 			remove_inventory(TRANSLATOR_INV);
 			_G(spieler).inv_cur = false;
@@ -103,13 +103,13 @@ int16 Room25::gleiter_loesch() {
 			_G(spieler).R25GleiteLoesch = true;
 			auto_move(2, P_CHEWY);
 			flic_cut(FCUT_030, CFO_MODE);
-			obj->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
-			atds->set_ats_str(219, 1, ATS_DATEI);
-			atds->set_ats_str(187, 1, ATS_DATEI);
+			_G(obj)->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
+			_G(atds)->set_ats_str(219, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(187, 1, ATS_DATEI);
 			g_engine->_sound->stopSound(0);
 
 			for (int i = 0; i < 9; ++i)
-				det->stop_detail(i);
+				_G(det)->stop_detail(i);
 		}
 
 	} else if (_G(spieler).R25GleiteLoesch) {
@@ -119,7 +119,7 @@ int16 Room25::gleiter_loesch() {
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
-			obj->add_inventar(MILCH_WAS_INV, &room_blk);
+			_G(obj)->add_inventar(MILCH_WAS_INV, &room_blk);
 			inventory_2_cur(MILCH_WAS_INV);
 			start_aad_wait(253, -1);
 		}
@@ -148,7 +148,7 @@ void Room25::xit_gleiter() {
 	if (!_G(spieler).R25SurimyLauf) {
 		hide_cur();
 		_G(spieler).R25SurimyLauf = true;
-		det->load_taf_seq(56, 8, nullptr);
+		_G(det)->load_taf_seq(56, 8, nullptr);
 		_G(auto_obj) = 1;
 		mov_phasen[SURIMY_OBJ].AtsText = 0;
 		mov_phasen[SURIMY_OBJ].Lines = 2;
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 14ddf4c6a7a..06777cfe7a0 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -30,11 +30,11 @@ namespace Rooms {
 
 void Room27::entry() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		_G(timer_nr)[0] = room->set_timer(0, 5);
-		det->set_static_ani(0, -1);
-		atds->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(timer_nr)[0] = _G(room)->set_timer(0, 5);
+		_G(det)->set_static_ani(0, -1);
+		_G(atds)->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		atds->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	_G(spieler).PersonHide[P_HOWARD] = true;
@@ -48,8 +48,8 @@ void Room27::xit(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
 			start_aad_wait(175, -1);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
+			_G(room)->set_timer_status(0, TIMER_STOP);
+			_G(det)->del_static_ani(0);
 			start_detail_wait(2, 1, ANI_VOR);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
@@ -63,7 +63,7 @@ void Room27::xit(int16 eib_nr) {
 }
 
 void Room27::get_surimy() {
-	obj->calc_all_static_detail();
+	_G(obj)->calc_all_static_detail();
 	hide_cur();
 	auto_move(4, P_CHEWY);
 
@@ -72,7 +72,7 @@ void Room27::get_surimy() {
 	}
 
 	show_cur();
-	obj->hide_sib(SIB_SURIMY_R27);
+	_G(obj)->hide_sib(SIB_SURIMY_R27);
 }
 
 void Room27::talk_howard() {
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 0b5dbe41dcb..12aecf58a9c 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -36,13 +36,13 @@ void Room28::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R28RKuerbis)
-		det->show_static_spr(6);
+		_G(det)->show_static_spr(6);
 
 	if (_G(spieler).R28Briefkasten) {
-		det->show_static_spr(8);
-		det->show_static_spr(9);
+		_G(det)->show_static_spr(8);
+		_G(det)->show_static_spr(9);
 	} else {
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
@@ -72,14 +72,14 @@ void Room28::entry(int16 eib_nr) {
 					wait_show_screen(10);
 					start_aad_wait(194, -1);
 					_G(spieler).room_e_obj[62].Attribut = 255;
-					atds->set_ats_str(208, 1, ATS_DATEI);
+					_G(atds)->set_ats_str(208, 1, ATS_DATEI);
 					flags.NoScroll = true;
 
 					auto_scroll(0, 0);
-					flc->set_flic_user_function(cut_serv1);
+					_G(flc)->set_flic_user_function(cut_serv1);
 					flic_cut(FCUT_064, CFO_MODE);
-					flc->remove_flic_user_function();
-					det->show_static_spr(6);
+					_G(flc)->remove_flic_user_function();
+					_G(det)->show_static_spr(6);
 
 					if (!_G(spieler).R40TeilKarte) {
 						_G(out)->ausblenden(0);
@@ -110,7 +110,7 @@ void Room28::entry(int16 eib_nr) {
 					flic_cut(FCUT_063, CFO_MODE);
 					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
-					atds->set_ats_str(209, 0, ATS_DATEI);
+					_G(atds)->set_ats_str(209, 0, ATS_DATEI);
 					_G(spieler).room_e_obj[69].Attribut = 255;
 					load_chewy_taf(CHEWY_NORMAL);
 
@@ -170,13 +170,13 @@ void Room28::haendler() {
 	_G(SetUpScreenFunc) = nullptr;
 	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
-	atds->set_ats_str(209, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(209, 1, ATS_DATEI);
 	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
 
 	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
 	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
-	det->set_static_ani(2, -1);
+	_G(det)->set_static_ani(2, -1);
 
 	while (_G(spieler).scrollx < 300) {
 		SHOULD_QUIT_RETURN;
@@ -184,18 +184,18 @@ void Room28::haendler() {
 	}
 
 	start_aad_wait(196, -1);
-	det->del_static_ani(2);
-	det->set_static_ani(3, -1);
+	_G(det)->del_static_ani(2);
+	_G(det)->set_static_ani(3, -1);
 	start_aad_wait(197, -1);
-	det->del_static_ani(3);
-	det->set_static_ani(4, -1);
+	_G(det)->del_static_ani(3);
+	_G(det)->set_static_ani(4, -1);
 	start_aad_wait(198, -1);
 	_G(SetUpScreenFunc) = setup_func;
 	auto_move(4, P_CHEWY);
 	hide_cur();
 	auto_move(3, P_CHEWY);
 	set_person_spr(P_RIGHT, P_CHEWY);
-	det->del_static_ani(4);
+	_G(det)->del_static_ani(4);
 	wait_show_screen(28);
 	start_aad_wait(199, -1);
 	invent_2_slot(DOLLAR175_INV);
@@ -218,24 +218,24 @@ void Room28::use_surimy() {
 		auto_scroll(0, 0);
 		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		flc->set_flic_user_function(cut_serv2);
+		_G(flc)->set_flic_user_function(cut_serv2);
 		flic_cut(FCUT_055, CFO_MODE);
-		flc->remove_flic_user_function();
-		flc->set_flic_user_function(cut_serv1);
+		_G(flc)->remove_flic_user_function();
+		_G(flc)->set_flic_user_function(cut_serv1);
 		flic_cut(FCUT_056, CFO_MODE);
-		flc->remove_flic_user_function();
+		_G(flc)->remove_flic_user_function();
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
-		atds->set_ats_str(205, 1, ATS_DATEI);
-		atds->set_ats_str(222, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(205, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(222, 1, ATS_DATEI);
 
 	} else {
 		ani_nr = CH_TALK5;
 		dia_nr = 139;
-		obj->calc_rsi_flip_flop(SIB_AUTO_R28);
+		_G(obj)->calc_rsi_flip_flop(SIB_AUTO_R28);
 	}
 
-	obj->calc_all_static_detail();
+	_G(obj)->calc_all_static_detail();
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
 	flags.NoScroll = false;
@@ -254,7 +254,7 @@ void Room28::set_pump() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
 			del_inventar(K_MASKE_INV);
-			det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			_G(det)->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 
 			if (_G(spieler).R28PumpTxt1 < 3) {
 				start_aad(137);
@@ -270,7 +270,7 @@ void Room28::set_pump() {
 			if (_G(spieler).R39TransMensch) {
 				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 			} else {
-				atds->set_ats_str(209, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(209, 1, ATS_DATEI);
 			}
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
@@ -301,11 +301,11 @@ void Room28::get_pump() {
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
-		det->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		_G(det)->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
 		start_detail_wait(tmp, 1, ANI_RUECK);
 
 		invent_2_slot(K_MASKE_INV);
-		atds->set_ats_str(209, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(209, 0, ATS_DATEI);
 		_G(spieler).room_e_obj[69].Attribut = 255;
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		load_chewy_taf(CHEWY_NORMAL);
@@ -328,13 +328,13 @@ int16 Room28::use_breifkasten() {
 		_G(spieler).R28Briefkasten = false;
 		auto_move(7, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-		det->hide_static_spr(8);
-		det->hide_static_spr(9);
-		det->show_static_spr(7);
+		_G(det)->hide_static_spr(8);
+		_G(det)->hide_static_spr(9);
+		_G(det)->show_static_spr(7);
 		auto_move(8, P_CHEWY);
 		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		start_aad_wait(179, -1);
-		atds->set_ats_str(206, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(206, 0, ATS_DATEI);
 		show_cur();
 		invent_2_slot(MANUSKRIPT_INV);
 		_G(spieler).R28Manuskript = true;
@@ -345,9 +345,9 @@ int16 Room28::use_breifkasten() {
 
 int16 Room28::cut_serv1(int16 frame) {
 	if (_G(spieler).R28Briefkasten) {
-		det->plot_static_details(0, 0, 8, 9);
+		_G(det)->plot_static_details(0, 0, 8, 9);
 	} else {
-		det->plot_static_details(0, 0, 7, 7);
+		_G(det)->plot_static_details(0, 0, 7, 7);
 	}
 	return 0;
 }
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 6f61c06a848..f4e73d9a394 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -44,24 +44,24 @@ static const AniBlock ABLOCK27[5] = {
 
 void Room29::entry() {
 	if (_G(spieler).R29Schlauch1) {
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 	} else if (_G(spieler).R29Schlauch2) {
-		det->show_static_spr(8);
-		det->show_static_spr(10);
+		_G(det)->show_static_spr(8);
+		_G(det)->show_static_spr(10);
 	}
 
 	if (_G(spieler).R29AutoSitz) {
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
-			atds->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		else
-			det->show_static_spr(9);
+			_G(det)->show_static_spr(9);
 	}
 
 	_G(spieler).ScrollxStep = 2;
 }
 
 void Room29::xit() {
-	if (obj->check_inventar(PUMPE_INV))
+	if (_G(obj)->check_inventar(PUMPE_INV))
 		del_inventar(PUMPE_INV);
 }
 
@@ -77,8 +77,8 @@ int16 Room29::use_pumpe() {
 			_G(spieler).R29Schlauch1 = true;
 			auto_move(1, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			det->show_static_spr(7);
-			atds->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(det)->show_static_spr(7);
+			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
 			action_flag = true;
@@ -115,13 +115,13 @@ bool Room29::use_schlauch() {
 
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		det->hide_static_spr(7);
+		_G(det)->hide_static_spr(7);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(4, 1, ANI_VOR);
-		det->show_static_spr(8);
-		det->show_static_spr(10);
-		atds->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(218, 1, ATS_DATEI);
+		_G(det)->show_static_spr(8);
+		_G(det)->show_static_spr(10);
+		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(218, 1, ATS_DATEI);
 
 		_G(spieler).R29Schlauch1 = false;
 		_G(spieler).R29Schlauch2 = true;
@@ -139,16 +139,16 @@ void Room29::schlitz_sitz() {
 		hide_cur();
 		_G(spieler).R29AutoSitz = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->hide_static_spr(4);
-		det->show_static_spr(11);
+		_G(det)->hide_static_spr(4);
+		_G(det)->show_static_spr(11);
 		start_ani_block(3, ABLOCK26);
-		det->show_static_spr(9);
-		det->hide_static_spr(11);
-		det->start_detail(2, 255, ANI_VOR);
+		_G(det)->show_static_spr(9);
+		_G(det)->hide_static_spr(11);
+		_G(det)->start_detail(2, 255, ANI_VOR);
 		start_aad_wait(63, -1);
 
-		det->stop_detail(2);
-		atds->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->stop_detail(2);
+		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(maus_links_click) = false;
 		kbinfo.scan_code = Common::KEYCODE_INVALID;
@@ -167,7 +167,7 @@ int16 Room29::zaun_sprung() {
 		auto_move(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(3, 1, ANI_VOR, 7);
-		det->hide_static_spr(9);
+		_G(det)->hide_static_spr(9);
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 686824eb1b1..71764a22084 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -51,7 +51,7 @@ void Room31::surimy_go() {
 		if (_G(spieler).R31SurimyGo >= 3) {
 			hide_cur();
 			_G(spieler).R31SurimyGo = 0;
-			det->load_taf_seq(39, 8, nullptr);
+			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -75,18 +75,18 @@ void Room31::surimy_go() {
 void Room31::calc_luke() {
 	if (!_G(spieler).R31KlappeZu) {
 		for (int16 i = 0; i < 3; i++)
-			det->show_static_spr(5 + i);
+			_G(det)->show_static_spr(5 + i);
 
-		atds->set_ats_str(244, 1, ATS_DATEI);
-		atds->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(244, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
 
 	} else {
 		for (int16 i = 0; i < 3; i++)
-			det->hide_static_spr(5 + i);
+			_G(det)->hide_static_spr(5 + i);
 
-		atds->set_ats_str(244, 0, ATS_DATEI);
-		atds->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(244, 0, ATS_DATEI);
+		_G(atds)->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).room_e_obj[75].Attribut = 255;
 	}
 }
@@ -153,7 +153,7 @@ int16 Room31::use_topf() {
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
-				atds->set_ats_str(242, 2, ATS_DATEI);
+				_G(atds)->set_ats_str(242, 2, ATS_DATEI);
 
 			} else if (is_cur_inventar(MILCH_WAS_INV)) {
 				if (_G(spieler).R31KoernerDa) {
@@ -163,11 +163,11 @@ int16 Room31::use_topf() {
 					start_ani_block(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					del_inventar(_G(spieler).AkInvent);
-					obj->add_inventar(MILCH_LEER_INV, &room_blk);
+					_G(obj)->add_inventar(MILCH_LEER_INV, &room_blk);
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
 					dia_nr = 151;
-					atds->set_ats_str(242, 3, ATS_DATEI);
+					_G(atds)->set_ats_str(242, 3, ATS_DATEI);
 				} else {
 					ani_nr = CH_TALK5;
 					dia_nr = 152;
@@ -186,7 +186,7 @@ int16 Room31::use_topf() {
 							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
 							dia_nr = 156;
-							atds->set_ats_str(242, 4, ATS_DATEI);
+							_G(atds)->set_ats_str(242, 4, ATS_DATEI);
 							cur_2_inventory();
 						}
 					} else {
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 6e9d4a8d12c..5250816d139 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -29,9 +29,9 @@ namespace Rooms {
 
 void Room32::entry() {
 	if (_G(spieler).R32HowardWeg)
-		det->hide_static_spr(0);
+		_G(det)->hide_static_spr(0);
 	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib)
-		det->show_static_spr(5);
+		_G(det)->show_static_spr(5);
 }
 
 int16 Room32::use_howard() {
@@ -47,7 +47,7 @@ int16 Room32::use_howard() {
 			remove_inventory(MUNTER_INV);
 			register_cutscene(11);
 			flic_cut(FCUT_043, CFO_MODE);
-			atds->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(75, -1);
 			wait_show_screen(5);
@@ -57,13 +57,13 @@ int16 Room32::use_howard() {
 			start_aad_wait(125, -1);
 			wait_show_screen(10);
 
-			det->hide_static_spr(0);
+			_G(det)->hide_static_spr(0);
 			start_detail_frame(0, 1, ANI_VOR, 9);
 			start_detail_wait(1, 1, ANI_RUECK);
-			det->show_static_spr(7);
-			det->show_static_spr(6);
+			_G(det)->show_static_spr(7);
+			_G(det)->show_static_spr(6);
 			wait_show_screen(20);
-			det->hide_static_spr(7);
+			_G(det)->hide_static_spr(7);
 			start_detail_wait(1, 1, ANI_VOR);
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			ani_nr = CH_TALK3;
@@ -109,11 +109,11 @@ void Room32::use_schreibmaschine() {
 						cur_2_inventory();
 						flic_cut(FCUT_044, CFO_MODE);
 						register_cutscene(12);
-						det->show_static_spr(5);
-						atds->set_ats_str(203, 1, ATS_DATEI);
+						_G(det)->show_static_spr(5);
+						_G(atds)->set_ats_str(203, 1, ATS_DATEI);
 						ani_nr = CH_TALK3;
 						dia_nr = 88;
-						atds->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATEI);
+						_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATEI);
 					}
 				}
 				break;
@@ -123,7 +123,7 @@ void Room32::use_schreibmaschine() {
 				_G(spieler).R32PapierOk = true;
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
-				atds->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
 				ani_nr = CH_TALK3;
 				dia_nr = 86;
 				break;
@@ -157,8 +157,8 @@ int16 Room32::get_script() {
 		auto_move(4, P_CHEWY);
 		invent_2_slot(MANUSKRIPT_INV);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		det->hide_static_spr(5);
-		atds->set_ats_str(203, 0, ATS_DATEI);
+		_G(det)->hide_static_spr(5);
+		_G(atds)->set_ats_str(203, 0, ATS_DATEI);
 		start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
 		start_aad_wait(91, -1);
 	}
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 3526650a847..c49788c0708 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -36,7 +36,7 @@ static const MovLine SURIMY_MPKT[2] = {
 
 void Room33::entry() {
 	if (_G(spieler).R33MunterGet)
-		det->hide_static_spr(3);
+		_G(det)->hide_static_spr(3);
 	surimy_go();
 }
 
@@ -45,7 +45,7 @@ void Room33::surimy_go() {
 		if (_G(spieler).R33SurimyGo >= 4) {
 			hide_cur();
 			_G(spieler).R33SurimyGo = 0;
-			det->load_taf_seq(39, 8, nullptr);
+			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
 			mov_phasen[SURIMY_OBJ].AtsText = 0;
 			mov_phasen[SURIMY_OBJ].Lines = 2;
@@ -71,8 +71,8 @@ void Room33::look_schublade() {
 		_G(spieler).R33SchubFirst = true;
 		hide_cur();
 		auto_move(1, P_CHEWY);
-		atds->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
-		atds->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
 		show_cur();
 	}
 }
@@ -85,9 +85,9 @@ int16 Room33::use_schublade() {
 		action_flag = true;
 		_G(spieler).R33Messer = true;
 
-		atds->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
-		atds->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
-		atds->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
 		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		invent_2_slot(MESSER_INV);
 		show_cur();
@@ -166,7 +166,7 @@ void Room33::use_maschine() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(71, -1);
-			atds->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 
 		if (hocker) {
@@ -204,8 +204,8 @@ int16 Room33::get_munter() {
 		auto_move(4, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(MUNTER_INV);
-		atds->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
-		det->hide_static_spr(3);
+		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->hide_static_spr(3);
 		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(72, -1);
 		show_cur();
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index a3306ed2b06..a45ba87ca43 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -37,7 +37,7 @@ static const AniBlock ABLOCK28[2] = {
 
 void Room35::entry() {
 	if (_G(spieler).R35Schublade)
-		det->show_static_spr(1);
+		_G(det)->show_static_spr(1);
 }
 
 int16 Room35::schublade() {
@@ -49,9 +49,9 @@ int16 Room35::schublade() {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			det->show_static_spr(1);
+			_G(det)->show_static_spr(1);
 			_G(spieler).R35Schublade = true;
-			atds->set_ats_str(234, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(234, 1, ATS_DATEI);
 		} else if (!_G(spieler).R35Falle) {
 			action_flag = true;
 			auto_move(3, P_CHEWY);
@@ -63,7 +63,7 @@ int16 Room35::schublade() {
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(93, -1);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			atds->set_ats_str(234, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(234, 2, ATS_DATEI);
 		}
 	}
 
@@ -91,21 +91,21 @@ int16 Room35::use_cat() {
 			_G(spieler).R35CatEat = true;
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(_G(spieler).AkInvent);
-			det->stop_detail(0);
-			det->del_static_ani(0);
+			_G(det)->stop_detail(0);
+			_G(det)->del_static_ani(0);
 			start_detail_wait(1, 1, ANI_VOR);
-			det->start_detail(2, 1, ANI_VOR);
+			_G(det)->start_detail(2, 1, ANI_VOR);
 			start_detail_wait(3, 1, ANI_VOR);
-			obj->show_sib(SIB_KNOCHEN_R35);
-			obj->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
-			det->show_static_spr(7);
-			atds->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(obj)->show_sib(SIB_KNOCHEN_R35);
+			_G(obj)->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
+			_G(det)->show_static_spr(7);
+			_G(atds)->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
 
-			while (det->get_ani_status(2) && !SHOULD_QUIT) {
+			while (_G(det)->get_ani_status(2) && !SHOULD_QUIT) {
 				set_up_screen(DO_SETUP);
 			}
 
-			det->set_static_ani(0, -1);
+			_G(det)->set_static_ani(0, -1);
 			enable_timer();
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(95, -1);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 881fe6e4dd2..866e17040d1 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -42,8 +42,8 @@ void Room37::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
-	obj->show_sib(74);
-	obj->show_sib(75);
+	_G(obj)->show_sib(74);
+	_G(obj)->show_sib(75);
 
 	if (!flags.LoadGame) {
 		_G(spieler).scrollx = 124;
@@ -51,23 +51,23 @@ void Room37::entry() {
 	}
 
 	if (!_G(spieler).R37Kloppe) {
-		_G(timer_nr)[1] = room->set_timer(7, 5);
-		det->set_static_ani(7, -1);
+		_G(timer_nr)[1] = _G(room)->set_timer(7, 5);
+		_G(det)->set_static_ani(7, -1);
 
 		if (!_G(spieler).R37HundScham) {
-			_G(timer_nr)[0] = room->set_timer(3, 4);
-			det->set_static_ani(3, -1);
+			_G(timer_nr)[0] = _G(room)->set_timer(3, 4);
+			_G(det)->set_static_ani(3, -1);
 			g_engine->_sound->playSound(3, 0);
 		}
 	}
 
 	if (_G(spieler).R37Gebiss) {
-		det->hide_static_spr(9);
+		_G(det)->hide_static_spr(9);
 
 		if (_G(spieler).R37Kloppe) {
-			det->hide_static_spr(8);
+			_G(det)->hide_static_spr(8);
 		} else if (_G(spieler).R37HundScham) {
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 		}
 	}
 }
@@ -113,9 +113,9 @@ short Room37::use_wippe() {
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
-			flc->set_flic_user_function(cut_serv1);
+			_G(flc)->set_flic_user_function(cut_serv1);
 			flic_cut(FCUT_047, CFO_MODE);
-			flc->remove_flic_user_function();
+			_G(flc)->remove_flic_user_function();
 			flags.NoScroll = false;
 			show_cur();
 			_G(spieler).scrollx = 269;
@@ -139,28 +139,28 @@ int16 Room37::cut_serv1(int16 frame) {
 		if (!_G(spieler).R37Gebiss) {
 			static_nr = 9;
 			static_nr1 = 11;
-			det->show_static_spr(11);
+			_G(det)->show_static_spr(11);
 		} else {
 			static_nr = 8;
 			static_nr1 = 0;
 		}
 
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
+		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
+		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
 	}
 
-	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
-	det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
+	_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
+	_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
 	return 0;
 }
 
 int16 Room37::cut_serv2(int16 frame) {
 	static const int16 STATIC_NR[] = { 7, 14, 12, 10 };
 
-	det->show_static_spr(12);
-	det->show_static_spr(10);
+	_G(det)->show_static_spr(12);
+	_G(det)->show_static_spr(10);
 	for (short i = 0; i < 4; i++)
-		det->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, STATIC_NR[i], STATIC_NR[i]);
+		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, STATIC_NR[i], STATIC_NR[i]);
 
 	return 0;
 }
@@ -179,16 +179,16 @@ int16 Room37::use_glas() {
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
-			flc->set_flic_user_function(cut_serv2);
+			_G(flc)->set_flic_user_function(cut_serv2);
 			flic_cut(FCUT_048, CFO_MODE);
-			flc->remove_flic_user_function();
+			_G(flc)->remove_flic_user_function();
 			flic_cut(FCUT_049, CFO_MODE);
 			invent_2_slot(GEBISS_INV);
-			det->hide_static_spr(9);
-			atds->set_ats_str(250, 1, ATS_DATEI);
-			atds->set_ats_str(256, 1, ATS_DATEI);
-			atds->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
-			obj->show_sib(SIB_HFUTTER2_R37);
+			_G(det)->hide_static_spr(9);
+			_G(atds)->set_ats_str(250, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(256, 1, ATS_DATEI);
+			_G(atds)->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(obj)->show_sib(SIB_HFUTTER2_R37);
 			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(146, -1);
@@ -219,21 +219,21 @@ void Room37::dog_bell() {
 			flags.NoScroll = true;
 			auto_scroll(178, 0);
 			disable_timer();
-			det->stop_detail(3);
-			det->del_static_ani(3);
+			_G(det)->stop_detail(3);
+			_G(det)->del_static_ani(3);
 			start_detail_wait(5, 1, ANI_VOR);
-			det->hide_static_spr(9);
+			_G(det)->hide_static_spr(9);
 			start_detail_wait(6, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			det->start_detail(11, 255, ANI_VOR);
+			_G(det)->start_detail(11, 255, ANI_VOR);
 			flic_cut(FCUT_050, CFO_MODE);
 			start_detail_wait(6, 1, ANI_RUECK);
-			det->stop_detail(11);
+			_G(det)->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			det->show_static_spr(9);
+			_G(det)->show_static_spr(9);
 			start_ani_block(3, ABLOCK31);
-			det->set_static_ani(3, -1);
+			_G(det)->set_static_ani(3, -1);
 			g_engine->_sound->playSound(3, 0);
 //			g_engine->_sound->playSound(3);
 			enable_timer();
@@ -245,15 +245,15 @@ void Room37::dog_bell() {
 			set_person_spr(P_LEFT, P_CHEWY);
 			flags.NoScroll = true;
 			auto_scroll(178, 0);
-			room->set_timer_status(3, TIMER_STOP);
-			det->del_static_ani(3);
-			det->stop_detail(3);
+			_G(room)->set_timer_status(3, TIMER_STOP);
+			_G(det)->del_static_ani(3);
+			_G(det)->stop_detail(3);
 			start_detail_wait(4, 1, ANI_VOR);
 			flic_cut(FCUT_051, CFO_MODE);
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054, CFO_MODE);
 			register_cutscene(10);
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 
 			_G(spieler).R37HundScham = true;
 			dia_nr = 148;
@@ -306,36 +306,36 @@ void Room37::use_hahn() {
 			hide_cur();
 			auto_move(6, P_CHEWY);
 			load_room_music(256);
-			room->set_timer_status(7, TIMER_STOP);
-			det->stop_detail(7);
-			det->del_static_ani(7);
-			det->start_detail(9, 1, ANI_VOR);
+			_G(room)->set_timer_status(7, TIMER_STOP);
+			_G(det)->stop_detail(7);
+			_G(det)->del_static_ani(7);
+			_G(det)->start_detail(9, 1, ANI_VOR);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(GEBISS_INV);
 			flags.NoScroll = true;
 			auto_scroll(177, 0);
 
-			while (det->get_ani_status(9)) {
+			while (_G(det)->get_ani_status(9)) {
 				set_up_screen(DO_SETUP);
 				SHOULD_QUIT_RETURN;
 			}
 
-			det->start_detail(4, 1, ANI_VOR);
-			det->hide_static_spr(0);
-			det->start_detail(10, 10, ANI_VOR);
+			_G(det)->start_detail(4, 1, ANI_VOR);
+			_G(det)->hide_static_spr(0);
+			_G(det)->start_detail(10, 10, ANI_VOR);
 			auto_move(8, P_CHEWY);
 			flic_cut(FCUT_053, CFO_MODE);
-			det->stop_detail(10);
+			_G(det)->stop_detail(10);
 
 			_G(spieler).scrollx = 320;
 			flags.NoScroll = false;
-			atds->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
-			det->hide_static_spr(8);
+			_G(atds)->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(det)->hide_static_spr(8);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(141, -1);
-			obj->add_inventar(EIER_INV, &room_blk);
+			_G(obj)->add_inventar(EIER_INV, &room_blk);
 			inventory_2_cur(EIER_INV);
 			show_cur();
 		}
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 7f0733ed665..e66782d1e7d 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -55,16 +55,16 @@ bool Room39::_flag;
 void Room39::entry() {
 	if (!_G(spieler).R41Einbruch) {
 		if (_G(spieler).R39HowardDa) {
-			det->show_static_spr(10);
+			_G(det)->show_static_spr(10);
 			if (!_G(spieler).R39HowardWach)
-				det->start_detail(1, 255, ANI_VOR);
+				_G(det)->start_detail(1, 255, ANI_VOR);
 			else
-				det->set_static_ani(5, -1);
+				_G(det)->set_static_ani(5, -1);
 
-			atds->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 	} else {
-		atds->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	set_tv();
@@ -83,21 +83,21 @@ short Room39::use_howard() {
 				_G(spieler).R39ScriptOk = true;
 				auto_move(3, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->start_detail(6, 255, ANI_VOR);
+				_G(det)->start_detail(6, 255, ANI_VOR);
 				start_aad_wait(170, -1);
-				det->stop_detail(6);
+				_G(det)->stop_detail(6);
 				start_detail_wait(7, 1, ANI_VOR);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 
 				del_inventar(_G(spieler).AkInvent);
-				det->stop_detail(1);
+				_G(det)->stop_detail(1);
 				start_ani_block(2, ABLOCK33);
 				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(167, -1);
-				det->stop_detail(3);
+				_G(det)->stop_detail(3);
 				start_detail_wait(4, 1, ANI_VOR);
-				det->set_static_ani(5, -1);
-				atds->set_ats_str(62, 1, ATS_DATEI);
+				_G(det)->set_static_ani(5, -1);
+				_G(atds)->set_ats_str(62, 1, ATS_DATEI);
 				start_aad_wait(169, -1);
 				show_cur();
 
@@ -153,10 +153,10 @@ void Room39::ok() {
 
 	Room43::night_small();
 	_G(spieler).PersonRoomNr[P_HOWARD] = 27;
-	obj->show_sib(SIB_SURIMY_R27);
-	obj->show_sib(SIB_ZEITUNG_R27);
-	obj->calc_rsi_flip_flop(SIB_SURIMY_R27);
-	obj->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
+	_G(obj)->show_sib(SIB_SURIMY_R27);
+	_G(obj)->show_sib(SIB_ZEITUNG_R27);
+	_G(obj)->calc_rsi_flip_flop(SIB_SURIMY_R27);
+	_G(obj)->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
 	invent_2_slot(BRIEF_INV);
 
 	switch_room(27);
@@ -256,7 +256,7 @@ int16 Room39::use_tv() {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
-				atds->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
+				_G(atds)->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
 				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
 			} else {
 				ani_nr = CH_TALK12;
@@ -320,9 +320,9 @@ void Room39::look_tv(bool cls_mode) {
 					_flag = true;
 			}
 
-			flc->set_custom_user_function(setup_func);
+			_G(flc)->set_custom_user_function(setup_func);
 			flic_cut(flic_nr, CFO_MODE);
-			flc->remove_custom_user_function();
+			_G(flc)->remove_custom_user_function();
 
 			if (cls_mode) {
 				_G(out)->cls();
@@ -343,20 +343,20 @@ void Room39::look_tv(bool cls_mode) {
 
 void Room39::set_tv() {
 	for (int16 i = 0; i < 6; i++)
-		det->hide_static_spr(i + 4);
+		_G(det)->hide_static_spr(i + 4);
 
 	if (_G(spieler).R39TvOn) {
 		if (_G(spieler).R39TvKanal == 2) {
-			det->start_detail(0, 255, ANI_VOR);
+			_G(det)->start_detail(0, 255, ANI_VOR);
 		} else {
-			det->stop_detail(0);
-			det->show_static_spr(_G(spieler).R39TvKanal + 4);
+			_G(det)->stop_detail(0);
+			_G(det)->show_static_spr(_G(spieler).R39TvKanal + 4);
 		}
 
 		if (_G(spieler).R39TransMensch) {
-			atds->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
+			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
 		} else {
-			atds->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
 		}
 	}
 }
@@ -381,16 +381,16 @@ int16 Room39::setup_func(int16 frame) {
 		case 171:
 		case 266:
 		case 370:
-			atds->stop_aad();
+			_G(atds)->stop_aad();
 			break;
 		default:
 			break;
 		}
 	}
 
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 
-	if (!_flag && atds->aad_get_status() == -1)
+	if (!_flag && _G(atds)->aad_get_status() == -1)
 		action_ret = -1;
 
 	return action_ret;
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 194b9bb432c..d27e2f4bc44 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -44,20 +44,20 @@ void Room40::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R40Geld) {
-		det->del_static_ani(6);
-		room->set_timer_status(6, TIMER_STOP);
+		_G(det)->del_static_ani(6);
+		_G(room)->set_timer_status(6, TIMER_STOP);
 	}
 
 	if (_G(spieler).R40HaendlerOk) {
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
+		_G(det)->del_static_ani(4);
+		_G(room)->set_timer_status(4, TIMER_STOP);
 	}
 
 	if (_G(spieler).R40PoliceWeg == false) {
-		_G(timer_nr)[0] = room->set_timer(255, 10);
-		atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
+		_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		det->hide_static_spr(15);
+		_G(det)->hide_static_spr(15);
 	}
 
 	_G(spieler).R40PoliceAniStatus = 255;
@@ -107,19 +107,19 @@ void Room40::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 
 		} else if (eib_nr == 72) {
-			if ((obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
+			if ((_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
 				|| _G(spieler).R40TrainOk) {
 				_G(spieler).R40TrainOk = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
 				_G(spieler).room_e_obj[72].Exit = 45;
-				obj->hide_sib(SIB_MUENZE_R40);
+				_G(obj)->hide_sib(SIB_MUENZE_R40);
 
-				uhr->disable_timer();
+				_G(uhr)->disable_timer();
 				_G(out)->ausblenden(0);
 				hide_person();
 				set_up_screen(DO_SETUP);
 				_G(out)->einblenden(_G(pal), 0);
-				uhr->enable_timer();
+				_G(uhr)->enable_timer();
 
 				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
@@ -171,21 +171,21 @@ void Room40::move_train(int16 mode) {
 	int16 lx = -40;
 	int16 ax = -230;
 
-	det->start_detail(7, 20, ANI_VOR);
-	det->show_static_spr(11);
+	_G(det)->start_detail(7, 20, ANI_VOR);
+	_G(det)->show_static_spr(11);
 
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-		det->show_static_spr(12);
+		_G(det)->show_static_spr(12);
 
 	g_engine->_sound->playSound(7, 0);
 	int16 delay = 0;
 
 	while (ax < 560) {
-		det->set_detail_pos(7, lx, 46);
-		det->set_static_pos(11, ax, 62, false, false);
+		_G(det)->set_detail_pos(7, lx, 46);
+		_G(det)->set_static_pos(11, ax, 62, false, false);
 
 		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-			det->set_static_pos(12, ax, 62, false, true);
+			_G(det)->set_static_pos(12, ax, 62, false, true);
 
 		if (!delay) {
 			lx += SPEED;
@@ -199,9 +199,9 @@ void Room40::move_train(int16 mode) {
 		SHOULD_QUIT_RETURN;
 	}
 
-	det->stop_detail(7);
-	det->hide_static_spr(11);
-	det->hide_static_spr(12);
+	_G(det)->stop_detail(7);
+	_G(det)->hide_static_spr(11);
+	_G(det)->hide_static_spr(12);
 
 	if (!mode)
 		start_aad_wait(207, -1);
@@ -242,48 +242,48 @@ void Room40::setup_func() {
 		if (_G(spieler).R40PoliceStart) {
 			_G(spieler).R40PoliceStart = false;
 			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
-			room->set_timer_status(255, TIMER_STOP);
-			uhr->reset_timer(_G(timer_nr)[0], 0);
-			det->hide_static_spr(15);
-			det->start_detail(POLICE_LEFT, 1, ANI_VOR);
-			atds->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(room)->set_timer_status(255, TIMER_STOP);
+			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+			_G(det)->hide_static_spr(15);
+			_G(det)->start_detail(POLICE_LEFT, 1, ANI_VOR);
+			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 
 		switch (_G(spieler).R40PoliceAniStatus) {
 		case POLICE_LEFT:
-			if (det->get_ani_status(POLICE_LEFT) == false) {
-				det->start_detail(POLICE_OFFEN, 1, ANI_VOR);
+			if (_G(det)->get_ani_status(POLICE_LEFT) == false) {
+				_G(det)->start_detail(POLICE_OFFEN, 1, ANI_VOR);
 				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
 			}
 			break;
 
 		case POLICE_OFFEN:
-			if (det->get_ani_status(POLICE_OFFEN) == false) {
-				det->show_static_spr(0);
-				det->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
+			if (_G(det)->get_ani_status(POLICE_OFFEN) == false) {
+				_G(det)->show_static_spr(0);
+				_G(det)->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
 				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
 			}
 			break;
 
 		case POLICE_RIGHT:
-			if (det->get_ani_status(POLICE_RIGHT) == false) {
-				det->show_static_spr(15);
+			if (_G(det)->get_ani_status(POLICE_RIGHT) == false) {
+				_G(det)->show_static_spr(15);
 				_G(spieler).R40PoliceAniStatus = 255;
-				room->set_timer_status(255, TIMER_START);
-				uhr->reset_timer(_G(timer_nr)[0], 0);
-				atds->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(room)->set_timer_status(255, TIMER_START);
+				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+				_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 			}
 			break;
 
 		case POLICE_FLASCHE:
-			if (det->get_ani_status(POLICE_FLASCHE) == false) {
-				det->hide_static_spr(0);
+			if (_G(det)->get_ani_status(POLICE_FLASCHE) == false) {
+				_G(det)->hide_static_spr(0);
 				if (_G(spieler).R40DuengerTele) {
 					hide_cur();
 					_G(spieler).R40PoliceWeg = true;
-					det->start_detail(17, 255, ANI_VOR);
+					_G(det)->start_detail(17, 255, ANI_VOR);
 					start_aad_wait(226, -1);
-					det->stop_detail(17);
+					_G(det)->stop_detail(17);
 					_G(spieler).R40HoUse = true;
 					person_end_phase[P_CHEWY] = P_RIGHT;
 					start_detail_wait(10, 1, ANI_VOR);
@@ -295,10 +295,10 @@ void Room40::setup_func() {
 					flags.MausLinks = false;
 					flags.MainInput = true;
 					_G(spieler).R40HoUse = false;
-					atds->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
+					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
 
 				} else {
-					det->start_detail(POLICE_RIGHT, 1, ANI_VOR);
+					_G(det)->start_detail(POLICE_RIGHT, 1, ANI_VOR);
 					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
 				}
 			}
@@ -344,7 +344,7 @@ int16 Room40::use_mr_pumpkin() {
 						_G(out)->ausblenden(1);
 						Room43::catch_pg();
 						remove_inventory(LIKOER_INV);
-						obj->add_inventar(LIKOER2_INV, &room_blk);
+						_G(obj)->add_inventar(LIKOER2_INV, &room_blk);
 						inventory_2_cur(LIKOER2_INV);
 						switch_room(40);
 						start_aad_wait(236, -1);
@@ -384,7 +384,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 			}
 		}
 
-		room->set_timer_status(255, TIMER_STOP);
+		_G(room)->set_timer_status(255, TIMER_STOP);
 		_G(spieler).R40PoliceStart = false;
 		stop_spz();
 		start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
@@ -396,15 +396,15 @@ int16 Room40::use_schalter(int16 aad_nr) {
 			_G(spieler).R40HoUse = false;
 		}
 
-		det->hide_static_spr(15);
+		_G(det)->hide_static_spr(15);
 		start_detail_wait(12, 1, ANI_VOR);
-		det->set_static_ani(14, -1);
+		_G(det)->set_static_ani(14, -1);
 		start_aad_wait(aad_nr, -1);
-		det->del_static_ani(14);
+		_G(det)->del_static_ani(14);
 		start_detail_wait(13, 1, ANI_VOR);
-		det->show_static_spr(15);
-		room->set_timer_status(255, TIMER_START);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
+		_G(det)->show_static_spr(15);
+		_G(room)->set_timer_status(255, TIMER_START);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
 	}
 
@@ -415,11 +415,11 @@ void Room40::talk_police() {
 	if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
 		hide_cur();
 		_G(spieler).R40PoliceStart = false;
-		room->set_timer_status(255, TIMER_STOP);
+		_G(room)->set_timer_status(255, TIMER_STOP);
 		auto_move(7, P_CHEWY);
 		start_aad_wait(203, -1);
-		room->set_timer_status(255, TIMER_START);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
+		_G(room)->set_timer_status(255, TIMER_START);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
 	}
 }
@@ -429,13 +429,13 @@ void Room40::talk_handler() {
 		_G(spieler).flags38_2 = true;
 		hide_cur();
 		auto_move(6, P_CHEWY);
-		det->del_static_ani(4);
-		room->set_timer_status(4, TIMER_STOP);
-		det->set_static_ani(3, -1);
+		_G(det)->del_static_ani(4);
+		_G(room)->set_timer_status(4, TIMER_STOP);
+		_G(det)->set_static_ani(3, -1);
 		start_aad_wait(202, -1);
-		det->set_static_ani(4, -1);
-		det->del_static_ani(3);
-		room->set_timer_status(4, TIMER_START);
+		_G(det)->set_static_ani(4, -1);
+		_G(det)->del_static_ani(3);
+		_G(room)->set_timer_status(4, TIMER_START);
 		show_cur();
 	}
 }
@@ -454,7 +454,7 @@ int16 Room40::use_haendler() {
 			_G(spieler).R40HaendlerOk = true;
 			_G(spieler).R40TeilKarte = true;
 			_G(spieler).R40DuengerMit = true;
-			atds->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
 			auto_move(10, P_CHEWY);
 			auto_move(11, P_HOWARD);
 			start_aad_wait(208, -1);
@@ -462,17 +462,17 @@ int16 Room40::use_haendler() {
 			flags.NoScroll = true;
 
 			auto_scroll(270, 0);
-			det->del_static_ani(4);
-			room->set_timer_status(4, TIMER_STOP);
-			det->set_static_ani(3, -1);
+			_G(det)->del_static_ani(4);
+			_G(room)->set_timer_status(4, TIMER_STOP);
+			_G(det)->set_static_ani(3, -1);
 			start_aad_wait(209, -1);
-			det->del_static_ani(3);
-			det->set_static_ani(5, -1);
+			_G(det)->del_static_ani(3);
+			_G(det)->set_static_ani(5, -1);
 			start_aad_wait(213, -1);
 
 			if (_G(spieler).R28RKuerbis) {
-				det->del_static_ani(5);
-				det->set_static_ani(3, -1);
+				_G(det)->del_static_ani(5);
+				_G(det)->set_static_ani(3, -1);
 				start_aad_wait(211, -1);
 				_G(out)->ausblenden(0);
 				_G(out)->set_teilpalette(_G(pal), 255, 1);
@@ -544,11 +544,11 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	auto_move(12, P_HOWARD);
 	flags.NoScroll = true;
 	auto_scroll(206, 0);
-	det->del_static_ani(0);
-	room->set_timer_status(0, TIMER_STOP);
-	det->stop_detail(0);
+	_G(det)->del_static_ani(0);
+	_G(room)->set_timer_status(0, TIMER_STOP);
+	_G(det)->stop_detail(0);
 	start_detail_wait(1, 1, ANI_VOR);
-	det->set_static_ani(2, -1);
+	_G(det)->set_static_ani(2, -1);
 
 	if (aad_nr == 237) {
 		start_aad_wait(aad_nr, -1);
@@ -561,9 +561,9 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	}
 
 	flags.NoPalAfterFlc = false;
-	room->set_timer_status(0, TIMER_START);
-	det->set_static_ani(0, -1);
-	det->del_static_ani(2);
+	_G(room)->set_timer_status(0, TIMER_START);
+	_G(det)->set_static_ani(0, -1);
+	_G(det)->del_static_ani(2);
 	auto_move(11, P_HOWARD);
 	auto_move(9, P_CHEWY);
 }
@@ -577,7 +577,7 @@ bool Room40::use_police() {
 			_G(spieler).R40PoliceAb = true;
 			hide_cur();
 			_G(spieler).R40PoliceStart = false;
-			room->set_timer_status(255, TIMER_STOP);
+			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(spieler).R40HoUse = true;
 			auto_move(9, P_CHEWY);
 			auto_move(11, P_HOWARD);
@@ -613,7 +613,7 @@ int16 Room40::use_tele() {
 
 		} else {
 			auto_move(13, P_CHEWY);
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 
 			int16 dia_nr;
 			if (!_G(spieler).R40DuengerMit) {
@@ -626,7 +626,7 @@ int16 Room40::use_tele() {
 
 			start_aad_wait(dia_nr, -1);
 			auto_move(11, P_HOWARD);
-			det->hide_static_spr(0);
+			_G(det)->hide_static_spr(0);
 			auto_move(9, P_CHEWY);
 			start_aad_wait(dia_nr1, -1);
 			_G(spieler).R40HoUse = false;
@@ -649,8 +649,8 @@ int16 Room40::use_tele() {
 			}
 
 			_G(spieler).R40PoliceAb = false;
-			room->set_timer_status(255, TIMER_START);
-			uhr->reset_timer(_G(timer_nr)[0], timer_wert);
+			_G(room)->set_timer_status(255, TIMER_START);
+			_G(uhr)->reset_timer(_G(timer_nr)[0], timer_wert);
 		}
 
 		if (dia_nr1 != 223)
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 05f95c8b98b..32da41f590e 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -42,25 +42,25 @@ void Room41::entry() {
 		g_engine->_sound->playSound(6);
 
 		if (!flags.LoadGame) {
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
+			_G(room)->set_timer_status(0, TIMER_STOP);
+			_G(det)->del_static_ani(0);
 			start_ani_block(2, ABLOCK32);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
+			_G(room)->set_timer_status(0, TIMER_START);
+			_G(det)->set_static_ani(0, -1);
 			start_aad_wait(127, -1);
 		} else {
-			det->start_detail(6, 255, ANI_VOR);
+			_G(det)->start_detail(6, 255, ANI_VOR);
 		}
 	}
 
 	if (_G(spieler).R41Einbruch) {
-		atds->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
-		det->show_static_spr(6);
-		det->show_static_spr(7);
+		_G(atds)->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->show_static_spr(6);
+		_G(det)->show_static_spr(7);
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-		atds->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	if (!flags.LoadGame)
@@ -148,17 +148,17 @@ void Room41::talk_hoggy2() {
 void Room41::first_talk() {
 	_G(spieler).R41FirstTalk = true;
 	start_aad_wait(134, -1);
-	atds->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
-	atds->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
 }
 
 void Room41::start_hoggy() {
 	show_cur();
 
 	for (int16 i = 0; i < 2; i++) {
-		room->set_timer_status(i, TIMER_START);
-		det->set_static_ani(i, -1);
-		det->del_static_ani(i + 3);
+		_G(room)->set_timer_status(i, TIMER_START);
+		_G(det)->set_static_ani(i, -1);
+		_G(det)->del_static_ani(i + 3);
 	}
 }
 
@@ -166,10 +166,10 @@ void Room41::stop_hoggy() {
 	hide_cur();
 
 	for (int16 i = 0; i < 2; i++) {
-		room->set_timer_status(i, TIMER_STOP);
-		det->del_static_ani(i);
-		det->stop_detail(i);
-		det->set_static_ani(i + 3, -1);
+		_G(room)->set_timer_status(i, TIMER_STOP);
+		_G(det)->del_static_ani(i);
+		_G(det)->stop_detail(i);
+		_G(det)->set_static_ani(i + 3, -1);
 	}
 }
 
@@ -198,11 +198,11 @@ int16 Room41::use_lola() {
 		g_engine->_sound->stopSound(0);
 		flic_cut(FCUT_057, CFO_MODE);
 		set_person_pos(127, 112, P_CHEWY, P_LEFT);
-		det->stop_detail(6);
+		_G(det)->stop_detail(6);
 
-		atds->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->set_ats_str(267, 1, ATS_DATEI);
-		atds->hide_item(11, 0, 3);
+		_G(atds)->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(267, 1, ATS_DATEI);
+		_G(atds)->hide_item(11, 0, 3);
 		show_cur();
 	}
 
@@ -227,7 +227,7 @@ int16 Room41::use_brief() {
 		stop_hoggy();
 		start_aad_wait(186, -1);
 		start_hoggy();
-		atds->set_ats_str(206, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(206, 1, ATS_DATEI);
 		_G(spieler).R28Briefkasten = true;
 		_G(spieler).R40TrainMove = true;
 		_G(spieler).R28PostCar = true;
@@ -244,7 +244,7 @@ void Room41::sub_dia() {
 
 	if (_G(spieler).R41LolaOk) {
 		start_aad_wait(163, -1);
-		atds->hide_item(11, 0, 2);
+		_G(atds)->hide_item(11, 0, 2);
 		stop_ads_dialog();
 		auto_move(5, P_CHEWY);
 		new_invent_2_cur(PAPIER_INV);
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 78048ec4128..fd98b60ee7a 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -33,37 +33,37 @@ namespace Rooms {
 void Room42::entry() {
 	if (!_G(spieler).R42BeamterWach) {
 		g_engine->_sound->playSound(0);
-		det->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_VOR);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (!flags.LoadGame) {
-			det->stop_detail(0);
-			_G(timer_nr)[0] = room->set_timer(8, 5);
-			det->set_static_ani(8, -1);
+			_G(det)->stop_detail(0);
+			_G(timer_nr)[0] = _G(room)->set_timer(8, 5);
+			_G(det)->set_static_ani(8, -1);
 			_G(spieler).R42BeamterWach = true;
 			g_engine->_sound->stopSound(0);
 
 			_G(SetUpScreenFunc) = setup_func;
 
 			set_person_pos(80, 43, P_HOWARD, P_LEFT);
-			atds->set_ats_str(263, 1, ATS_DATEI);
-			atds->set_ats_str(264, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(263, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(264, 1, ATS_DATEI);
 		}
 
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && !_G(spieler).R42BriefOk)
+		if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && !_G(spieler).R42BriefOk)
 			start_aad_wait(302, -1);
 
-		if (obj->check_inventar(HOTEL_INV) && obj->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk)
+		if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk)
 			start_aad_wait(301, -1);
 	}
 }
 
 void Room42::xit() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		atds->set_ats_str(264, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(264, 1, ATS_DATEI);
 		stop_spz();
 		_G(spieler).R42HoToBeamter = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
@@ -124,8 +124,8 @@ int16 Room42::use_psack() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
 		start_aad_wait(183, -1);
-		obj->calc_rsi_flip_flop(SIB_BKASTEN_R28);
-		atds->set_ats_str(206, 1, ATS_DATEI);
+		_G(obj)->calc_rsi_flip_flop(SIB_BKASTEN_R28);
+		_G(atds)->set_ats_str(206, 1, ATS_DATEI);
 		_G(spieler).R28Briefkasten = true;
 		_G(spieler).R40TrainMove = true;
 		_G(spieler).R28PostCar = true;
@@ -145,7 +145,7 @@ int16 Room42::use_beamter() {
 
 	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
-		atds->set_ats_str(264, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(264, 2, ATS_DATEI);
 		hide_cur();
 		auto_move(4, P_CHEWY);
 		start_aad_wait(184, -1);
@@ -179,7 +179,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 	hide_cur();
 
 	if (str_end_nr != 4) {
-		while (atds->aad_get_status() != -1) {
+		while (_G(atds)->aad_get_status() != -1) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
@@ -205,31 +205,31 @@ void Room42::dia_beamter(int16 str_end_nr) {
 			break;
 		}
 	} else {
-		while (atds->aad_get_status() < 2) {
+		while (_G(atds)->aad_get_status() < 2) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
-		det->stop_detail(0);
+		_G(det)->stop_detail(0);
 		g_engine->_sound->stopSound(0);
 		start_detail_wait(1, 1, ANI_VOR);
-		det->start_detail(2, 255, ANI_VOR);
+		_G(det)->start_detail(2, 255, ANI_VOR);
 
-		while (atds->aad_get_status() != -1) {
+		while (_G(atds)->aad_get_status() != -1) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
-		det->stop_detail(2);
-		det->start_detail(0, 255, ANI_VOR);
+		_G(det)->stop_detail(2);
+		_G(det)->start_detail(0, 255, ANI_VOR);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
 	}
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	det->start_detail(6, 255, ANI_VOR);
+	_G(det)->start_detail(6, 255, ANI_VOR);
 	start_aad_wait(135, -1);
-	det->stop_detail(6);
+	_G(det)->stop_detail(6);
 	flags.NoDiaBox = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	show_cur();
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index ad82633bcac..6e7842315c2 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -94,7 +94,7 @@ void Room43::catch_pg() {
 }
 
 int16 Room43::setup_func(int16 frame) {
-	atds->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 
 	return 0;
 }
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index 1e545cbafc6..6d1d03ca7df 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -37,7 +37,7 @@ void Room44::look_news() {
 	hide_person();
 	_G(fx_blend) = BLEND1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
-	room->load_room(&room_blk, 44, &_G(spieler));
+	_G(room)->load_room(&room_blk, 44, &_G(spieler));
 
 	start_aad_wait(172, -1);
 	_G(spieler).scrollx = tmpsx;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index ed6eea98ffd..9fcaf01d0af 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -103,37 +103,37 @@ void Room45::setup_func() {
 
 			for (int16 i = 0; i < R45_MAX_PERSON; i++) {
 				if (_G(r45_pinfo)[i][0] == 1) {
-					y = Adi[3 + i].y;
-					x = Adi[3 + i].x;
+					y = _G(Adi)[3 + i].y;
+					x = _G(Adi)[3 + i].x;
 
 					if (i < 6) {
 						x -= _G(r45_pinfo)[i][1];
 						if (x < -30) {
 							_G(r45_pinfo)[i][0] = 0;
-							det->stop_detail(3 + i);
+							_G(det)->stop_detail(3 + i);
 						}
 					} else {
 						x += _G(r45_pinfo)[i][1];
 						if (x > 540) {
 							_G(r45_pinfo)[i][0] = 0;
-							det->stop_detail(3 + i);
+							_G(det)->stop_detail(3 + i);
 						}
 					}
-					det->set_detail_pos(3 + i, x, y);
+					_G(det)->set_detail_pos(3 + i, x, y);
 				} else {
 					++_G(r45_pinfo)[i][2];
 
 					if (_G(r45_pinfo)[i][2] >= _G(r45_pinfo)[i][3]) {
 						_G(r45_pinfo)[i][2] = 0;
 						_G(r45_pinfo)[i][0] = 1;
-						y = Adi[3 + i].y;
+						y = _G(Adi)[3 + i].y;
 						if (i < 6) {
 							x = 500;
 						} else {
 							x = 0;
 						}
-						det->set_detail_pos(3 + i, x, y);
-						det->start_detail(3 + i, 255, ANI_VOR);
+						_G(det)->set_detail_pos(3 + i, x, y);
+						_G(det)->start_detail(3 + i, 255, ANI_VOR);
 					}
 				}
 			}
@@ -197,23 +197,23 @@ int16 Room45::use_taxi() {
 }
 
 void Room45::talk_taxi(int16 aad_nr) {
-	room->set_timer_status(12, TIMER_STOP);
-	det->del_static_ani(12);
+	_G(room)->set_timer_status(12, TIMER_STOP);
+	_G(det)->del_static_ani(12);
 	start_detail_wait(13, 1, ANI_VOR);
-	det->set_static_ani(14, -1);
+	_G(det)->set_static_ani(14, -1);
 	start_aad_wait(aad_nr, -1);
-	det->del_static_ani(14);
+	_G(det)->del_static_ani(14);
 	start_detail_wait(13, 1, ANI_RUECK);
-	det->set_static_ani(12, -1);
-	room->set_timer_status(12, TIMER_START);
+	_G(det)->set_static_ani(12, -1);
+	_G(room)->set_timer_status(12, TIMER_START);
 }
 
 void Room45::taxi_mov() {
 	_G(HowardMov) = 2;
-	room->set_timer_status(12, TIMER_STOP);
-	det->del_static_ani(12);
+	_G(room)->set_timer_status(12, TIMER_STOP);
+	_G(det)->del_static_ani(12);
 	g_engine->_sound->playSound(15, 1);
-	det->show_static_spr(11);
+	_G(det)->show_static_spr(11);
 	auto_move(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -225,7 +225,7 @@ void Room45::taxi_mov() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 	}
 
-	det->hide_static_spr(11);
+	_G(det)->hide_static_spr(11);
 	g_engine->_sound->playSound(15, 2);
 	g_engine->_sound->playSound(15, 2, false);
 	g_engine->_sound->playSound(15, 0);
@@ -243,13 +243,13 @@ int16 Room45::use_boy() {
 		if (is_cur_inventar(DOLLAR175_INV)) {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
-			atds->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATEI);
+			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATEI);
 			start_aad_wait(258, -1);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
+			_G(room)->set_timer_status(0, TIMER_STOP);
+			_G(det)->del_static_ani(0);
 			start_detail_wait(1, 1, ANI_VOR);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(0, -1);
+			_G(room)->set_timer_status(0, TIMER_START);
+			_G(det)->set_static_ani(0, -1);
 			_G(spieler).R45MagOk = true;
 		}
 	} else {
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 41789706550..f24276fd45d 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -98,7 +98,7 @@ void Room46::setup_func() {
 
 void Room46::bodo() {
 	hide_cur();
-	det->show_static_spr(0);
+	_G(det)->show_static_spr(0);
 	person_end_phase[P_CHEWY] = P_RIGHT;
 	start_aad_wait(240, -1);
 	spieler_mi[P_CHEWY].Mode = true;
@@ -111,23 +111,23 @@ void Room46::bodo() {
 
 	spieler_mi[P_CHEWY].Mode = false;
 	start_detail_wait(0, 1, ANI_VOR);
-	det->start_detail(5, 255, ANI_VOR);
+	_G(det)->start_detail(5, 255, ANI_VOR);
 	start_aad_wait(241, -1);
-	det->stop_detail(5);
-	det->show_static_spr(5);
+	_G(det)->stop_detail(5);
+	_G(det)->show_static_spr(5);
 	start_aad_wait(609, -1);
-	det->hide_static_spr(5);
+	_G(det)->hide_static_spr(5);
 	start_detail_wait(2, 1, ANI_VOR);
 	start_detail_wait(3, 1, ANI_VOR);
-	det->start_detail(4, 255, ANI_VOR);
+	_G(det)->start_detail(4, 255, ANI_VOR);
 	start_aad_wait(242, -1);
-	det->stop_detail(4);
+	_G(det)->stop_detail(4);
 
-	det->show_static_spr(6);
+	_G(det)->show_static_spr(6);
 	start_aad_wait(610, -1);
-	det->hide_static_spr(6);
+	_G(det)->hide_static_spr(6);
 	start_detail_wait(6, 1, ANI_VOR);
-	det->show_static_spr(3);
+	_G(det)->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065, CFO_MODE);
@@ -136,8 +136,8 @@ void Room46::bodo() {
 	register_cutscene(16);
 	
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	det->hide_static_spr(0);
-	det->hide_static_spr(3);
+	_G(det)->hide_static_spr(0);
+	_G(det)->hide_static_spr(3);
 	load_chewy_taf(CHEWY_ROCKER);
 	_G(spieler).R28ChewyPump = false;
 	
@@ -153,13 +153,13 @@ void Room46::kloppe() {
 	for (int16 i = 0; i < 4; i++) {
 		_G(mem)->file->select_pool_item(Ci.Handle, FCUT_065);
 
-		flc->custom_play(&Ci);
+		_G(flc)->custom_play(&Ci);
 		
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		start_aad(244 + i, -1);
 		int16 delay = _G(spieler).DelaySpeed * 50;
-		atds->print_aad(0, 0);
+		_G(atds)->print_aad(0, 0);
 
 		if (_G(spieler).SpeechSwitch) {
 			g_engine->_sound->waitForSpeechToFinish();
@@ -173,7 +173,7 @@ void Room46::kloppe() {
 	}
 
 	_G(mem)->file->select_pool_item(Ci.Handle, 66);
-	flc->custom_play(&Ci);
+	_G(flc)->custom_play(&Ci);
 	_G(sndPlayer)->fadeOut(0);
 	_G(out)->cls();
 
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 07ca19a34d0..e0f203d3b3a 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -86,16 +86,16 @@ int16 Room47::use_knopf(int16 txt_nr) {
 
 void Room47::set_detail() {
 	for (int16 i = 0; i < 10; i++)
-		det->hide_static_spr(i);
+		_G(det)->hide_static_spr(i);
 
 	for (int16 i = 0; i < 3; i++) {
-		det->show_static_spr(_G(spieler).R47Schloss[i]);
-		det->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i, false, true);
-		det->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
+		_G(det)->show_static_spr(_G(spieler).R47Schloss[i]);
+		_G(det)->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i, false, true);
+		_G(det)->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
 	}
 
 	for (int16 i = 0; i < 10; i++)
-		det->hide_static_spr(i);
+		_G(det)->hide_static_spr(i);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index c0366728c4e..ccd9657804b 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -36,7 +36,7 @@ void Room48::entry() {
 	show_cur();
 	calc_pic();
 	_G(SetUpScreenFunc) = setup_func;
-	_G(timer_nr)[0] = room->set_timer(255, 20);
+	_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
 }
 
 bool Room48::timer(int16 t_nr, int16 ani_nr) {
@@ -50,7 +50,7 @@ bool Room48::timer(int16 t_nr, int16 ani_nr) {
 
 void Room48::calc_pic() {
 	for (int16 i = 0; i < 2; i++) {
-		atds->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R48Auswahl[3 + i] = 0;
 	}
 
@@ -58,16 +58,16 @@ void Room48::calc_pic() {
 	_G(spieler).R48Auswahl[1] = 1;
 	_G(spieler).R48Auswahl[2] = 1;
 
-	if (obj->check_inventar(VCARD_INV)) {
+	if (_G(obj)->check_inventar(VCARD_INV)) {
 		_G(spieler).R48Auswahl[3] = 1;
-		atds->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
-		det->show_static_spr(4);
+		_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->show_static_spr(4);
 	}
 
-	if (obj->check_inventar(KAPPE_INV)) {
+	if (_G(obj)->check_inventar(KAPPE_INV)) {
 		_G(spieler).R48Auswahl[4] = 1;
-		atds->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
-		det->show_static_spr(4);
+		_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->show_static_spr(4);
 	}
 }
 
@@ -76,10 +76,10 @@ void Room48::frage() {
 		flags.AutoAniPlay = true;
 		hide_cur();
 		start_detail_wait(1, 1, ANI_VOR);
-		det->show_static_spr(6);
+		_G(det)->show_static_spr(6);
 		start_detail_wait(1, 1, ANI_RUECK);
-		det->hide_static_spr(6);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
+		_G(det)->hide_static_spr(6);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
 		flags.AutoAniPlay = false;
 	}
@@ -87,18 +87,18 @@ void Room48::frage() {
 
 void Room48::setup_func() {
 	for (int16 i = 0; i < 5; i++)
-		det->hide_static_spr(1 + i);
+		_G(det)->hide_static_spr(1 + i);
 
 	if (flags.ShowAtsInvTxt) {
 		if (_G(menu_display) == 0) {
 			_G(menu_item) = CUR_USE;
 			cur_2_inventory();
 			cursor_wahl(CUR_ZEIGE);
-			const int16 idx = det->maus_vector(minfo.x, minfo.y);
+			const int16 idx = _G(det)->maus_vector(minfo.x, minfo.y);
 
 			if (idx != -1) {
 				if (_G(spieler).R48Auswahl[idx]) {
-					det->show_static_spr(1 + idx);
+					_G(det)->show_static_spr(1 + idx);
 
 					if (_G(maus_links_click)) {
 						int16 r_nr;
@@ -130,12 +130,12 @@ void Room48::setup_func() {
 
 						if (r_nr != -1) {
 							_G(SetUpScreenFunc) = nullptr;
-							det->hide_static_spr(1 + idx);
+							_G(det)->hide_static_spr(1 + idx);
 							hide_cur();
-							room->set_timer_status(255, TIMER_STOP);
-							room->set_timer_status(0, TIMER_STOP);
-							det->stop_detail(0);
-							det->del_static_ani(0);
+							_G(room)->set_timer_status(255, TIMER_STOP);
+							_G(room)->set_timer_status(0, TIMER_STOP);
+							_G(det)->stop_detail(0);
+							_G(det)->del_static_ani(0);
 							start_detail_wait(2, 1, ANI_VOR);
 							g_engine->_sound->stopSound(0);
 							_G(menu_item) = CUR_WALK;
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 5961041b502..e27c5e8dbe1 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -43,12 +43,12 @@ void Room49::entry(int16 eib_nr) {
 	_G(SetUpScreenFunc) = setup_func;
 
 	if (!_G(spieler).R49BoyWeg) {
-		_G(timer_nr)[0] = room->set_timer(255, 2);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 2);
 	} else {
-		det->del_static_ani(0);
-		det->hide_static_spr(5);
-		det->del_static_ani(0);
-		det->del_static_ani(1);
+		_G(det)->del_static_ani(0);
+		_G(det)->hide_static_spr(5);
+		_G(det)->del_static_ani(0);
+		_G(det)->del_static_ani(1);
 	}
 
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
@@ -63,7 +63,7 @@ void Room49::entry(int16 eib_nr) {
 			_G(maus_links_click) = false;
 			_G(spieler).scrollx = 320;
 			_G(spieler).scrolly = 0;
-			det->start_detail(5, 1, ANI_VOR);
+			_G(det)->start_detail(5, 1, ANI_VOR);
 		} else if (eib_nr == 83) {
 			set_person_pos(377, 78, P_HOWARD, P_LEFT);
 		}
@@ -100,29 +100,29 @@ void Room49::calc_boy_ani() {
 	if (!_G(spieler).R49BoyAniCount) {
 		_G(spieler).R49BoyAniCount = 3;
 		_G(spieler).R49BoyAni = true;
-		det->del_static_ani(0);
+		_G(det)->del_static_ani(0);
 	} else {
 		--_G(spieler).R49BoyAniCount;
 		_G(spieler).R49BoyAni = false;
-		det->del_static_ani(1);
+		_G(det)->del_static_ani(1);
 	}
 
-	det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-	det->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_VOR);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
+	_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
+	_G(det)->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_VOR);
+	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 }
 
 void Room49::calc_boy() {
 	if (!_G(spieler).R49WegFrei) {
 		hide_cur();
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
+		_G(room)->set_timer_status(255, TIMER_STOP);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
 		person_end_phase[P_CHEWY] = P_LEFT;
-		det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
-		det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
-		det->set_static_ani(2, -1);
+		_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+		_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
+		_G(det)->set_static_ani(2, -1);
 
 		_G(SetUpScreenFunc) = nullptr;
 		start_aad_wait(262, -1);
@@ -130,19 +130,19 @@ void Room49::calc_boy() {
 		auto_move(3, P_CHEWY);
 		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
-		det->del_static_ani(2);
+		_G(det)->del_static_ani(2);
 		start_detail_wait(3, 1, ANI_VOR);
 
-		det->show_static_spr(9);
+		_G(det)->show_static_spr(9);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		start_detail_wait(8, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_HOWARD] = false;
-		det->hide_static_spr(9);
+		_G(det)->hide_static_spr(9);
 		start_detail_wait(4, 1, ANI_GO);
 
 		_G(SetUpScreenFunc) = setup_func;
-		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-		room->set_timer_status(255, TIMER_START);
+		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
+		_G(room)->set_timer_status(255, TIMER_START);
 		show_cur();
 	}
 }
@@ -175,8 +175,8 @@ void Room49::use_boy_cigar() {
 	_G(SetUpScreenFunc) = nullptr;
 	auto_move(5, P_CHEWY);
 
-	const int16 zoom = room->_roomInfo->ZoomFak;
-	room->set_zoom(zoom);
+	const int16 zoom = _G(room)->_roomInfo->ZoomFak;
+	_G(room)->set_zoom(zoom);
 	go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
 	flags.NoScroll = true;
@@ -185,19 +185,19 @@ void Room49::use_boy_cigar() {
 	flic_cut(67, CFO_MODE);
 	register_cutscene(17);
 	
-	room->set_timer_status(255, TIMER_STOP);
-	uhr->reset_timer(_G(timer_nr)[0], 0);
-	det->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
-	det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+	_G(room)->set_timer_status(255, TIMER_STOP);
+	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+	_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
+	_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
 	flags.NoScroll = false;
 	set_person_spr(P_RIGHT, P_CHEWY);
 	start_aad_wait(264, -1);
-	room->set_zoom(zoom);
+	_G(room)->set_zoom(zoom);
 
-	obj->add_inventar(GUM_INV, &room_blk);
+	_G(obj)->add_inventar(GUM_INV, &room_blk);
 	inventory_2_cur(GUM_INV);
-	atds->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).R49BoyWeg = true;
@@ -213,19 +213,19 @@ void Room49::talk_boy() {
 
 void Room49::talk_boy(int16 aad_nr) {
 	if (!_G(spieler).R49BoyWeg) {
-		room->set_timer_status(255, TIMER_STOP);
-		uhr->reset_timer(_G(timer_nr)[0], 0);
-		det->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
+		_G(room)->set_timer_status(255, TIMER_STOP);
+		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
-		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-		det->set_static_ani(2, -1);
+		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
+		_G(det)->set_static_ani(2, -1);
 		_G(SetUpScreenFunc) = nullptr;
 		stop_person(P_HOWARD);
 		start_aad_wait(aad_nr, -1);
 		_G(SetUpScreenFunc) = setup_func;
-		det->del_static_ani(2);
-		det->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-		room->set_timer_status(255, TIMER_START);
+		_G(det)->del_static_ani(2);
+		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
+		_G(room)->set_timer_status(255, TIMER_START);
 	}
 }
 
@@ -245,7 +245,7 @@ int16 Room49::use_taxi() {
 		action_ret = true;
 		hide_cur();
 		start_ani_block(2, ABLOCK34);
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -258,7 +258,7 @@ int16 Room49::use_taxi() {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 
-		det->hide_static_spr(7);
+		_G(det)->hide_static_spr(7);
 		start_detail_wait(5, 1, ANI_VOR);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index fd855c8d6d3..f15a8694e76 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -57,14 +57,14 @@ void Room50::entry(int16 eib_nr) {
 		if (_G(spieler).R50Zigarre) {
 			stop_cigar();
 		} else {
-			det->start_detail(0, 255, ANI_VOR);
+			_G(det)->start_detail(0, 255, ANI_VOR);
 		}
 
 		if (!_G(spieler).R50KeyOK) {
-			_G(timer_nr)[0] = room->set_timer(1, 8);
+			_G(timer_nr)[0] = _G(room)->set_timer(1, 8);
 			_wasser = false;
 		} else {
-			det->show_static_spr(4);
+			_G(det)->show_static_spr(4);
 		}
 
 		_G(SetUpScreenFunc) = setup_func;
@@ -108,31 +108,31 @@ void Room50::gedAction(int index) {
 }
 
 void Room50::stop_cigar() {
-	room->set_timer_status(0, TIMER_STOP);
-	det->del_static_ani(0);
-	atds->set_ats_str(328, 1, ATS_DATEI);
-	det->stop_detail(0);
+	_G(room)->set_timer_status(0, TIMER_STOP);
+	_G(det)->del_static_ani(0);
+	_G(atds)->set_ats_str(328, 1, ATS_DATEI);
+	_G(det)->stop_detail(0);
 	_G(spieler).R50Zigarre = true;
 }
 
 void Room50::calc_wasser() {
 	if (!_wasser) {
 		stop_page();
-		det->start_detail(4, 1, ANI_VOR);
+		_G(det)->start_detail(4, 1, ANI_VOR);
 		_wasser = true;
 	}
 }
 
 void Room50::stop_page() {
-	room->set_timer_status(3, TIMER_STOP);
-	det->del_static_ani(3);
-	det->stop_detail(3);
-	det->stop_detail(4);
+	_G(room)->set_timer_status(3, TIMER_STOP);
+	_G(det)->del_static_ani(3);
+	_G(det)->stop_detail(3);
+	_G(det)->stop_detail(4);
 }
 
 void Room50::go_page() {
-	det->set_static_ani(3, -1);
-	room->set_timer_status(3, TIMER_START);
+	_G(det)->set_static_ani(3, -1);
+	_G(room)->set_timer_status(3, TIMER_START);
 }
 
 void Room50::calc_treppe() {
@@ -142,12 +142,12 @@ void Room50::calc_treppe() {
 		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			stop_person(P_CHEWY);
-			room->set_timer_status(1, TIMER_STOP);
+			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
 			flags.NoScroll = true;
 			auto_scroll(40, 0);
 			stop_page();
-			det->set_static_ani(5, -1);
+			_G(det)->set_static_ani(5, -1);
 			start_aad_wait(272, -1);
 			auto_move(3, P_CHEWY);
 			aad_page(273, 5);
@@ -166,7 +166,7 @@ int16 Room50::use_gutschein() {
 		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			auto_move(3, P_CHEWY);
-			room->set_timer_status(1, TIMER_STOP);
+			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
 			stop_page();
 			del_inventar(_G(spieler).AkInvent);
@@ -187,11 +187,11 @@ int16 Room50::use_gum() {
 		action_ret = true;
 		hide_cur();
 		_G(spieler).R50KeyOK = true;
-		room->set_timer_status(1, TIMER_STOP);
+		_G(room)->set_timer_status(1, TIMER_STOP);
 		_wasser = false;
 		stop_page();
 		start_detail_wait(6, 1, ANI_VOR);
-		det->set_static_ani(5, -1);
+		_G(det)->set_static_ani(5, -1);
 		auto_move(3, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
@@ -202,26 +202,26 @@ int16 Room50::use_gum() {
 		del_inventar(_G(spieler).AkInvent);
 		hide_person();
 		start_detail_wait(2, 1, ANI_VOR);
-		det->show_static_spr(4);
+		_G(det)->show_static_spr(4);
 		start_detail_wait(2, 1, ANI_RUECK);
 		show_person();
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(275, -1);
-		det->del_static_ani(5);
+		_G(det)->del_static_ani(5);
 		start_detail_wait(9, 1, ANI_VOR);
-		det->del_static_ani(5);
-		det->set_static_ani(10, -1);
+		_G(det)->del_static_ani(5);
+		_G(det)->set_static_ani(10, -1);
 		start_aad_wait(277, -1);
 		_G(SetUpScreenFunc) = setup_func;
 		auto_move(3, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
-		det->del_static_ani(10);
+		_G(det)->del_static_ani(10);
 		go_page();
 
-		obj->add_inventar(KEY_INV, &room_blk);
+		_G(obj)->add_inventar(KEY_INV, &room_blk);
 		inventory_2_cur(KEY_INV);
-		atds->set_ats_str(323, 1, ATS_DATEI);
-		atds->set_ats_str(327, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(323, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(327, 1, ATS_DATEI);
 		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
 		show_cur();
 	}
@@ -234,20 +234,20 @@ void Room50::talk_page() {
 }
 
 void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
-	det->set_static_ani(ani_nr, -1);
+	_G(det)->set_static_ani(ani_nr, -1);
 	start_aad_wait(aad_nr, -1);
-	det->del_static_ani(ani_nr);
+	_G(det)->del_static_ani(ani_nr);
 	start_detail_wait(6, 1, ANI_RUECK);
 	go_page();
 
 	if (!_G(spieler).R50KeyOK)
-		room->set_timer_status(1, TIMER_START);
+		_G(room)->set_timer_status(1, TIMER_START);
 
 	show_cur();
 }
 
 void Room50::setup_func() {
-	if (_wasser && !det->get_ani_status(4)) {
+	if (_wasser && !_G(det)->get_ani_status(4)) {
 		_wasser = false;
 		go_page();
 	}
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index e9315500dab..ab69b9bb2ba 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -52,7 +52,7 @@ void Room51::entry() {
 	_G(zoom_mov_fak) = 4;
 
 	if (_G(spieler).flags32_10) {
-		atds->enableEvents(false);
+		_G(atds)->enableEvents(false);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
@@ -60,23 +60,23 @@ void Room51::entry() {
 		set_person_pos(34, 120, P_HOWARD, P_RIGHT);
 		set_person_pos(234, 69, P_CHEWY, P_LEFT);
 		_G(SetUpScreenFunc) = setup_func;
-		det->show_static_spr(17);
+		_G(det)->show_static_spr(17);
 		_index = 0;
 		hide_cur();
 
 		for (int i = 0; i < 2; ++i) {
 			_enemyFlag[i] = false;
-			_G(timer_nr)[i] = room->set_timer(i + 9, i * 2 + 6);
+			_G(timer_nr)[i] = _G(room)->set_timer(i + 9, i * 2 + 6);
 		}
 
 		flags.MainInput = false;
 		_flag = false;
 
 	} else {
-		det->hide_static_spr(17);
+		_G(det)->hide_static_spr(17);
 
 		for (int i = 0; i < 2; i++)
-			det->start_detail(3 + i, 1, ANI_VOR);
+			_G(det)->start_detail(3 + i, 1, ANI_VOR);
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
@@ -101,7 +101,7 @@ void Room51::entry() {
 }
 
 void Room51::xit(int16 eib_nr) {
-	atds->enableEvents(true);
+	_G(atds)->enableEvents(true);
 
 	if (_G(spieler).flags32_10) {
 		flags.MainInput = true;
@@ -125,7 +125,7 @@ void Room51::xit(int16 eib_nr) {
 
 bool Room51::timer(int16 t_nr, int16 ani_nr) {
 	if (_G(spieler).flags32_10)
-		timer_action(t_nr, room->_roomTimer.ObjNr[ani_nr]);
+		timer_action(t_nr, _G(room)->_roomTimer.ObjNr[ani_nr]);
 	else
 		return true;
 
@@ -141,11 +141,11 @@ void Room51::setup_func() {
 		if (_tmpy < 81)
 			_tmpy = 81;
 
-		det->set_static_pos(17, _tmpx, _tmpy, false, false);
+		_G(det)->set_static_pos(17, _tmpx, _tmpy, false, false);
 
 		if ((minfo.button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
-			det->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
+			_G(det)->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
 			start_detail_wait(8, 1, ANI_VOR);
 			_flag = false;
 			++_index;
@@ -216,7 +216,7 @@ int16 Room51::use_door(int16 txt_nr) {
 		case 329:
 			auto_move(8, P_CHEWY);
 			_G(SetUpScreenFunc) = nullptr;
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 
 			if (!_G(spieler).R51HotelRoom) {
 				auto_move(11, P_HOWARD);
@@ -224,7 +224,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				_G(spieler).R51HotelRoom = true;
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
 				start_aad_wait(285, -1);
-				atds->set_ats_str(329, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(329, 1, ATS_DATEI);
 				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
@@ -239,16 +239,16 @@ int16 Room51::use_door(int16 txt_nr) {
 			if (!_G(spieler).R51KillerWeg) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(2);
-				det->show_static_spr(1);
+				_G(det)->show_static_spr(1);
 				start_detail_wait(2, 1, ANI_VOR);
-				det->start_detail(5, 255, ANI_VOR);
+				_G(det)->start_detail(5, 255, ANI_VOR);
 
 				if (!_G(spieler).R52HotDogOk) {
 					start_aad_wait(287, -1);
 					auto_move(12, P_CHEWY);
-					det->stop_detail(5);
+					_G(det)->stop_detail(5);
 					start_ani_block(5, ABLOCK37);
-					det->hide_static_spr(1);
+					_G(det)->hide_static_spr(1);
 					g_engine->_sound->stopSound(0);
 					start_aad_wait(284, -1);
 				} else {
@@ -260,17 +260,17 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
 					flags.NoPalAfterFlc = true;
-					flc->set_flic_user_function(cut_serv);
-					det->show_static_spr(16);
+					_G(flc)->set_flic_user_function(cut_serv);
+					_G(det)->show_static_spr(16);
 					flic_cut(FCUT_068, CFO_MODE);
-					flc->remove_flic_user_function();
+					_G(flc)->remove_flic_user_function();
 
-					det->hide_static_spr(16);
+					_G(det)->hide_static_spr(16);
 					flags.NoPalAfterFlc = false;
-					det->stop_detail(5);
-					obj->show_sib(SIB_AUSRUEST_R52);
-					obj->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
-					det->hide_static_spr(1);
+					_G(det)->stop_detail(5);
+					_G(obj)->show_sib(SIB_AUSRUEST_R52);
+					_G(obj)->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
+					_G(det)->hide_static_spr(1);
 
 					_G(fx_blend) = BLEND3;
 					set_up_screen(DO_SETUP);
@@ -304,29 +304,29 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
-				det->show_static_spr(3);
+				_G(det)->show_static_spr(3);
 				start_aad_wait(278, -1);
 				start_detail_frame(0, 1, ANI_VOR, 3);
 				start_spz(HO_BRILL_JMP, 1, ANI_VOR, P_HOWARD);
 				wait_detail(0);
 
-				det->show_static_spr(14);
+				_G(det)->show_static_spr(14);
 				start_aad_wait(279, -1);
 				++_G(spieler).R51DoorCount;
-				obj->show_sib(SIB_FLASCHE_R51);
-				obj->calc_rsi_flip_flop(SIB_FLASCHE_R51);
-				det->hide_static_spr(3);
+				_G(obj)->show_sib(SIB_FLASCHE_R51);
+				_G(obj)->calc_rsi_flip_flop(SIB_FLASCHE_R51);
+				_G(det)->hide_static_spr(3);
 				break;
 
 			case 1:
-				det->show_static_spr(3);
+				_G(det)->show_static_spr(3);
 				start_aad_wait(280, -1);
 				start_detail_wait(1, 1, ANI_VOR);
 				++_G(spieler).R51DoorCount;
-				obj->show_sib(SIB_KAPPE_R51);
-				obj->calc_rsi_flip_flop(SIB_KAPPE_R51);
-				det->hide_static_spr(3);
-				det->show_static_spr(15);
+				_G(obj)->show_sib(SIB_KAPPE_R51);
+				_G(obj)->calc_rsi_flip_flop(SIB_KAPPE_R51);
+				_G(det)->hide_static_spr(3);
+				_G(det)->show_static_spr(15);
 				break;
 
 			default:
@@ -348,20 +348,20 @@ int16 Room51::use_door(int16 txt_nr) {
 }
 
 int16 Room51::cut_serv(int16 frame) {
-	det->plot_static_details(0, 0, 16, 16);
+	_G(det)->plot_static_details(0, 0, 16, 16);
 	return 0;
 }
 
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
 		if (!_enemyFlag[obj_nr - 9]) {
-			det->start_detail(obj_nr, 1, ANI_VOR);
+			_G(det)->start_detail(obj_nr, 1, ANI_VOR);
 			_enemyFlag[obj_nr - 9] = true;
 
-		} else if (!det->get_ani_status(obj_nr)) {
-			det->start_detail(obj_nr, 1, ANI_GO);
-			det->start_detail(obj_nr + 2, 1, ANI_VOR);
-			uhr->reset_timer(t_nr, 0);
+		} else if (!_G(det)->get_ani_status(obj_nr)) {
+			_G(det)->start_detail(obj_nr, 1, ANI_GO);
+			_G(det)->start_detail(obj_nr + 2, 1, ANI_VOR);
+			_G(uhr)->reset_timer(t_nr, 0);
 			_enemyFlag[obj_nr - 9] = false;
 		}
 	}
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 58acca9cd8f..5de9a36a08f 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -42,16 +42,16 @@ void Room52::entry() {
 	}
 
 	if (_G(spieler).R52KakerWeg)
-		det->stop_detail(0);
+		_G(det)->stop_detail(0);
 
 	if (!flags.LoadGame) {
-		det->show_static_spr(4);
+		_G(det)->show_static_spr(4);
 		_G(spieler).R52TuerAuf = true;
 		set_person_pos(20, 50, P_HOWARD, P_LEFT);
 		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		_G(spieler).R52TuerAuf = false;
-		det->hide_static_spr(4);
+		_G(det)->hide_static_spr(4);
 		check_shad(2, 1);
 	}
 }
@@ -76,14 +76,14 @@ int16 Room52::use_hot_dog() {
 		action_ret = true;
 		auto_move(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
-		det->show_static_spr(0);
+		_G(det)->show_static_spr(0);
 		del_inventar(_G(spieler).AkInvent);
 		auto_move(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
 		plot_armee(20);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
-		atds->set_ats_str(341, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(341, 1, ATS_DATEI);
 		auto_move(2, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(288, -1);
@@ -95,22 +95,22 @@ int16 Room52::use_hot_dog() {
 		start_detail_wait(7, 1, ANI_VOR);
 		g_engine->_sound->playSound(7, 0);
 		g_engine->_sound->playSound(7);
-		det->start_detail(8, 255, ANI_VOR);
+		_G(det)->start_detail(8, 255, ANI_VOR);
 
 		for (int16 i = 0; i < 5; i++) {
 			wait_show_screen(20);
-			det->stop_detail(2 + i);
+			_G(det)->stop_detail(2 + i);
 		}
 
 		g_engine->_sound->stopSound(0);
-		det->stop_detail(0);
-		det->stop_detail(8);
+		_G(det)->stop_detail(0);
+		_G(det)->stop_detail(8);
 		start_detail_wait(7, 1, ANI_RUECK);
 		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		atds->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(303, -1);
-		atds->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
+		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
 		_G(spieler).R52KakerWeg = true;
 	}
 
@@ -121,7 +121,7 @@ int16 Room52::use_hot_dog() {
 void Room52::plot_armee(int16 frame) {
 	for (int16 i = 0; i < 5; i++) {
 		wait_show_screen(frame);
-		det->start_detail(2 + i, 255, ANI_VOR);
+		_G(det)->start_detail(2 + i, 255, ANI_VOR);
 	}
 }
 
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 3be397854ad..025538d17b1 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -42,32 +42,32 @@ static const AniBlock ABLOCK35[7] = {
 
 void Room53::entry() {
 	hide_cur();
-	obj->hide_sib(SIB_VISIT_R53);
-	atds->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(obj)->hide_sib(SIB_VISIT_R53);
+	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 	start_detail_wait(0, 1, ANI_VOR);
-	det->set_static_ani(1, -1);
-	_G(timer_nr)[0] = room->set_timer(1, 7);
+	_G(det)->set_static_ani(1, -1);
+	_G(timer_nr)[0] = _G(room)->set_timer(1, 7);
 	show_cur();
 }
 
 void Room53::man_go() {
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
+	_G(room)->set_timer_status(1, TIMER_STOP);
+	_G(det)->del_static_ani(1);
 	start_detail_wait(5, 1, ANI_VOR);
-	atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 	if (!_G(spieler).R53Visit)
-		obj->show_sib(SIB_VISIT_R53);
+		_G(obj)->show_sib(SIB_VISIT_R53);
 }
 
 void Room53::talk_man() {
 	hide_cur();
 	auto_move(2, P_CHEWY);
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
+	_G(room)->set_timer_status(1, TIMER_STOP);
+	_G(det)->del_static_ani(1);
 	start_detail_wait(2, 1, ANI_VOR);
-	det->set_static_ani(3, -1);
+	_G(det)->set_static_ani(3, -1);
 	start_aad_wait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
-	det->del_static_ani(3);
+	_G(det)->del_static_ani(3);
 	start_detail_wait(4, 1, ANI_VOR);
 	man_go();
 	show_cur();
@@ -83,12 +83,12 @@ int16 Room53::use_man() {
 		del_inventar(_G(spieler).AkInvent);
 		auto_move(2, P_CHEWY);
 		start_aad_wait(271, -1);
-		room->set_timer_status(1, TIMER_STOP);
-		det->del_static_ani(1);
+		_G(room)->set_timer_status(1, TIMER_STOP);
+		_G(det)->del_static_ani(1);
 		start_ani_block(7, ABLOCK35);
-		obj->add_inventar(JMKOST_INV, &room_blk);
+		_G(obj)->add_inventar(JMKOST_INV, &room_blk);
 		inventory_2_cur(JMKOST_INV);
-		atds->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
 
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 2aec3a5264f..26d32faa492 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -39,7 +39,7 @@ void Room54::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
 
 	if (_G(spieler).R54FputzerWeg)
-		det->show_static_spr(9);
+		_G(det)->show_static_spr(9);
 
 	spieler_mi[P_HOWARD].Mode = true;
 
@@ -136,22 +136,22 @@ int16 Room54::use_schalter() {
 			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
 			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
 			start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 			auto_move(2, P_CHEWY);
 			g_engine->_sound->playSound(1, 0);
 			g_engine->_sound->playSound(0, 1);
 			g_engine->_sound->stopSound(2);
 
 			start_detail_wait(1, 1, ANI_VOR);
-			det->start_detail(3, 255, ANI_VOR);
+			_G(det)->start_detail(3, 255, ANI_VOR);
 			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
-			det->stop_detail(3);
+			_G(det)->stop_detail(3);
 			++_G(spieler).R54LiftCount;
 
 			int16 aad_nr;
 			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_VOR);
-				det->hide_static_spr(0);
+				_G(det)->hide_static_spr(0);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->stopSound(1);
 				g_engine->_sound->playSound(1, 2);
@@ -161,13 +161,13 @@ int16 Room54::use_schalter() {
 
 			} else {
 				start_detail_wait(5, 1, ANI_VOR);
-				det->show_static_spr(9);
+				_G(det)->show_static_spr(9);
 				start_detail_wait(4, 1, ANI_VOR);
 				aad_nr = 296;
 				_G(spieler).R54FputzerWeg = true;
-				atds->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_ats_str(349, 1, ATS_DATEI);
-				atds->set_ats_str(351, 1, ATS_DATEI);
+				_G(atds)->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_ats_str(349, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(351, 1, ATS_DATEI);
 			}
 
 			start_aad_wait(aad_nr, -1);
@@ -198,24 +198,24 @@ void Room54::talk_verkauf() {
 		auto_move(3, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
 		start_aad_wait(299, -1);
-		room->set_timer_status(6, TIMER_STOP);
-		det->del_static_ani(6);
+		_G(room)->set_timer_status(6, TIMER_STOP);
+		_G(det)->del_static_ani(6);
 		start_detail_wait(7, 1, ANI_VOR);
-		det->start_detail(8, 255, ANI_VOR);
+		_G(det)->start_detail(8, 255, ANI_VOR);
 		start_aad_wait(310, -1);
 
-		det->stop_detail(8);
+		_G(det)->stop_detail(8);
 		start_detail_wait(9, 1, ANI_VOR);
 		start_detail_wait(10, 1, ANI_VOR);
-		det->start_detail(11, 255, ANI_VOR);
+		_G(det)->start_detail(11, 255, ANI_VOR);
 		start_aad_wait(311, -1);
-		det->stop_detail(11);
-		room->set_timer_status(6, TIMER_START);
-		det->set_static_ani(6, -1);
+		_G(det)->stop_detail(11);
+		_G(room)->set_timer_status(6, TIMER_START);
+		_G(det)->set_static_ani(6, -1);
 		auto_move(4, P_CHEWY);
 
 		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
-		obj->add_inventar(BURGER_INV, &room_blk);
+		_G(obj)->add_inventar(BURGER_INV, &room_blk);
 		inventory_2_cur(BURGER_INV);
 	} else {
 		start_aad_wait(313, -1);
@@ -240,9 +240,9 @@ int16 Room54::use_zelle() {
 				_G(SetUpScreenFunc) = nullptr;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
-				flc->set_flic_user_function(cut_serv);
+				_G(flc)->set_flic_user_function(cut_serv);
 				flic_cut(FCUT_069, CFO_MODE);
-				flc->remove_flic_user_function();
+				_G(flc)->remove_flic_user_function();
 
 				del_inventar(_G(spieler).AkInvent);
 				invent_2_slot(LEDER_INV);
@@ -271,7 +271,7 @@ int16 Room54::use_zelle() {
 }
 
 int16 Room54::cut_serv(int16 frame) {
-	det->plot_static_details(176, 0, 9, 9);
+	_G(det)->plot_static_details(176, 0, 9, 9);
 	return 0;
 }
 
@@ -288,7 +288,7 @@ int16 Room54::use_azug() {
 				_G(spieler).R54HowardVorne = 0;
 				start_aad_wait(298, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->show_static_spr(12);
+				_G(det)->show_static_spr(12);
 				_G(spieler).R55Location = true;
 				_G(SetUpScreenFunc) = nullptr;
 				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
@@ -300,8 +300,8 @@ int16 Room54::use_azug() {
 				int16 delay = 0;
 
 				while (ch_y > -48) {
-					det->set_static_pos(12, 125, ch_y, false, false);
-					det->set_static_pos(9, 122, ay, false, false);
+					_G(det)->set_static_pos(12, 125, ch_y, false, false);
+					_G(det)->set_static_pos(9, 122, ay, false, false);
 
 					if (!delay) {
 						ch_y -= 3;
@@ -332,7 +332,7 @@ void Room54::aufzug_ab() {
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
 	_G(SetUpScreenFunc) = setup_func;
-	det->show_static_spr(12);
+	_G(det)->show_static_spr(12);
 	g_engine->_sound->playSound(1, 0);
 	g_engine->_sound->playSound(1);
 
@@ -341,8 +341,8 @@ void Room54::aufzug_ab() {
 	int16 delay = 0;
 
 	while (ch_y < 68) {
-		det->set_static_pos(12, 125, ch_y, false, false);
-		det->set_static_pos(9, 122, ay, false, false);
+		_G(det)->set_static_pos(12, 125, ch_y, false, false);
+		_G(det)->set_static_pos(9, 122, ay, false, false);
 
 		if (!delay) {
 			ch_y += 3;
@@ -357,7 +357,7 @@ void Room54::aufzug_ab() {
 	}
 
 	g_engine->_sound->stopSound(0);
-	det->hide_static_spr(12);
+	_G(det)->hide_static_spr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 0111450fb26..87e5f122497 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -39,21 +39,21 @@ void Room55::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
 
 	if (!_G(spieler).R54FputzerWeg)
-		det->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_VOR);
 
 	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
-		det->hide_static_spr(6);
+		_G(det)->hide_static_spr(6);
 
 	if (_G(spieler).R55RaumOk || _G(spieler).R55ScriptWeg)
-		det->hide_static_spr(0);
+		_G(det)->hide_static_spr(0);
 
 	if (!_G(spieler).R55SekWeg) {
-		det->start_detail(8, 255, ANI_VOR);
-		det->start_detail(9, 255, ANI_VOR);
+		_G(det)->start_detail(8, 255, ANI_VOR);
+		_G(det)->start_detail(9, 255, ANI_VOR);
 		_G(spieler).R55Entry ^= 1;
 		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
-		_G(timer_nr)[0] = room->set_timer(aniNr, 10);
-		det->set_static_ani(aniNr, -1);
+		_G(timer_nr)[0] = _G(room)->set_timer(aniNr, 10);
+		_G(det)->set_static_ani(aniNr, -1);
 	}
 
 	spieler_mi[P_HOWARD].Mode = true;
@@ -65,11 +65,11 @@ void Room55::entry() {
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
 		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
-		room->set_zoom(10);
+		_G(room)->set_zoom(10);
 	}
 
 	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
-		det->show_static_spr(0);
+		_G(det)->show_static_spr(0);
 
 	if (!flags.LoadGame) {
 		if (_G(spieler).R55Location) {
@@ -78,7 +78,7 @@ void Room55::entry() {
 			start_detail_wait(3, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(zoom_horizont) = 1;
-			atds->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			_G(spieler).scrollx = 0;
 
@@ -86,10 +86,10 @@ void Room55::entry() {
 				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
 			}
 
-			det->show_static_spr(8);
+			_G(det)->show_static_spr(8);
 			auto_move(1, P_CHEWY);
 			hide_cur();
-			det->hide_static_spr(8);
+			_G(det)->hide_static_spr(8);
 
 			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
 				set_person_spr(P_LEFT, P_CHEWY);
@@ -136,11 +136,11 @@ int16 Room55::use_stapel1() {
 			action_ret = true;
 			_G(spieler).R55ScriptWeg = true;
 			auto_move(4, P_CHEWY);
-			det->hide_static_spr(0);
+			_G(det)->hide_static_spr(0);
 			auto_move(5, P_CHEWY);
-			det->show_static_spr(1);
-			atds->set_ats_str(354, 1, ATS_DATEI);
-			atds->set_ats_str(355, 1, ATS_DATEI);
+			_G(det)->show_static_spr(1);
+			_G(atds)->set_ats_str(354, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(355, 1, ATS_DATEI);
 
 		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
@@ -152,9 +152,9 @@ int16 Room55::use_stapel1() {
 		if (_G(spieler).R55ScriptWeg) {
 			auto_move(4, P_CHEWY);
 			_G(spieler).R55EscScriptOk = true;
-			det->show_static_spr(0);
+			_G(det)->show_static_spr(0);
 			del_inventar(_G(spieler).AkInvent);
-			atds->set_ats_str(354, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(354, 2, ATS_DATEI);
 		} else {
 			start_aad_wait(326, -1);
 		}
@@ -189,9 +189,9 @@ int16 Room55::use_telefon() {
 				auto_move(6, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_detail_wait(10, 1, ANI_VOR);
-				det->start_detail(11, 255, ANI_VOR);
+				_G(det)->start_detail(11, 255, ANI_VOR);
 				start_aad_wait(329, -1);
-				det->stop_detail(11);
+				_G(det)->stop_detail(11);
 				start_detail_wait(10, 1, ANI_RUECK);
 
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -199,26 +199,26 @@ int16 Room55::use_telefon() {
 				flags.NoScroll = true;
 				auto_scroll(0, 0);
 				start_aad_wait(330, -1);
-				det->show_static_spr(8);
+				_G(det)->show_static_spr(8);
 				start_detail_wait(0, 1, ANI_VOR);
-				det->start_detail(1, 255, ANI_VOR);
+				_G(det)->start_detail(1, 255, ANI_VOR);
 				start_aad_wait(331, -1);
-				det->stop_detail(1);
+				_G(det)->stop_detail(1);
 
-				det->show_static_spr(16);
+				_G(det)->show_static_spr(16);
 				start_aad_wait(608, -1);
-				det->hide_static_spr(16);
+				_G(det)->hide_static_spr(16);
 				start_detail_wait(2, 1, ANI_VOR);
-				det->hide_static_spr(0);
-				det->hide_static_spr(8);
-				atds->set_ats_str(354, 1, ATS_DATEI);
+				_G(det)->hide_static_spr(0);
+				_G(det)->hide_static_spr(8);
+				_G(atds)->set_ats_str(354, 1, ATS_DATEI);
 				flic_cut(FCUT_071, CFO_MODE);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
 				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
 				_G(SetUpScreenFunc) = nullptr;
-				det->set_static_ani(18, -1);
+				_G(det)->set_static_ani(18, -1);
 				start_aad_wait(334, -1);
 				start_aad_wait(335, -1);
 				start_aad_wait(336, -1);
@@ -289,9 +289,9 @@ void Room55::get_job() {
 	int16 r_nr;
 	if (_G(spieler).R55Job) {
 		r_nr = 55;
-		atds->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
-		atds->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		r_nr = 54;
 		mans2rock();
@@ -327,7 +327,7 @@ void Room55::rock2mans() {
 
 void Room55::verleger_mov(int16 mode) {
 	start_detail_wait(7, 1, ANI_VOR);
-	det->show_static_spr(11);
+	_G(det)->show_static_spr(11);
 	start_detail_wait(13, 1, ANI_VOR);
 	start_detail_wait(14, 1, ANI_VOR);
 
@@ -337,16 +337,16 @@ void Room55::verleger_mov(int16 mode) {
 	if (mode)
 		start_detail_wait(15, 1, ANI_VOR);
 
-	det->set_static_ani(16, -1);
+	_G(det)->set_static_ani(16, -1);
 }
 
 void Room55::strasse(int16 mode) {
 	if (!_G(spieler).inv_cur || mode) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		room->set_timer_status(4, TIMER_STOP);
-		det->del_static_ani(4);
-		det->stop_detail(4);
-		atds->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(room)->set_timer_status(4, TIMER_STOP);
+		_G(det)->del_static_ani(4);
+		_G(det)->stop_detail(4);
+		_G(atds)->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
 		start_detail_wait(3, 1, ANI_RUECK);
 
 		_G(spieler).scrollx = 0;
@@ -366,23 +366,23 @@ int16 Room55::use_kammeraus() {
 			hide_cur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(5, 1, ANI_VOR);
-			det->show_static_spr(10);
-			flc->set_flic_user_function(cut_serv);
+			_G(det)->show_static_spr(10);
+			_G(flc)->set_flic_user_function(cut_serv);
 			flic_cut(FCUT_070, CFO_MODE);
 			register_cutscene(18);
 		
-			flc->remove_flic_user_function();
+			_G(flc)->remove_flic_user_function();
 			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
-			room->set_timer_status(aniNr, TIMER_STOP);
-			det->stop_detail(aniNr);
-			det->del_static_ani(aniNr);
-			det->hide_static_spr(10);
+			_G(room)->set_timer_status(aniNr, TIMER_STOP);
+			_G(det)->stop_detail(aniNr);
+			_G(det)->del_static_ani(aniNr);
+			_G(det)->hide_static_spr(10);
 			_G(spieler).R55ExitDia = 322;
 			_G(spieler).R55SekWeg = true;
-			atds->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(_G(spieler).AkInvent);
-			atds->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
-			atds->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATEI);
 			strasse(1);
 			show_cur();
 		}
@@ -393,7 +393,7 @@ int16 Room55::use_kammeraus() {
 
 int16 Room55::cut_serv(int16 frame) {
 	if (frame < 29 )
-		det->plot_static_details(136, 0, 10, 10);
+		_G(det)->plot_static_details(136, 0, 10, 10);
 
 	return 0;
 }
@@ -436,11 +436,11 @@ void Room55::talk_line() {
 		aad_nr = 320;
 		_G(spieler).R55ExitDia = 321;
 		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
-		room->set_timer_status(aniNr, TIMER_STOP);
-		det->stop_detail(aniNr);
-		det->del_static_ani(aniNr);
+		_G(room)->set_timer_status(aniNr, TIMER_STOP);
+		_G(det)->stop_detail(aniNr);
+		_G(det)->del_static_ani(aniNr);
 		start_detail_wait(22, 1, ANI_VOR);
-		det->set_static_ani(21, -1);
+		_G(det)->set_static_ani(21, -1);
 	} else if (!_G(spieler).R55RaumOk) {
 		auto_move(3, P_CHEWY);
 		aad_nr = 323;
@@ -450,10 +450,10 @@ void Room55::talk_line() {
 	start_aad_wait(aad_nr, -1);
 
 	if (_G(spieler).R55SekWeg) {
-		det->del_static_ani(16);
+		_G(det)->del_static_ani(16);
 		start_detail_wait(14, 1, ANI_VOR);
 	} else {
-		det->del_static_ani(21);
+		_G(det)->del_static_ani(21);
 		start_detail_wait(22, 1, ANI_VOR);
 	}
 
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 9fc6adaa34f..9538afcbaa5 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -36,12 +36,12 @@ void Room56::entry() {
 	int esi = 0; //TODO: rename this variable
 	spieler_mi[P_HOWARD].Mode = true;
 	if (_G(spieler).flags32_10) {
-		det->show_static_spr(10);
-		room->set_timer_status(0, TIMER_STOP);
-		det->del_static_ani(0);
-		det->start_detail(13, 255, ANI_VOR);
+		_G(det)->show_static_spr(10);
+		_G(room)->set_timer_status(0, TIMER_STOP);
+		_G(det)->del_static_ani(0);
+		_G(det)->start_detail(13, 255, ANI_VOR);
 	} else
-		_G(timer_nr)[0] = room->set_timer(255, 25);
+		_G(timer_nr)[0] = _G(room)->set_timer(255, 25);
 
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
@@ -51,7 +51,7 @@ void Room56::entry() {
 			_G(spieler).scrolly = 0;
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(spieler).PersonHide[P_HOWARD] = true;
-			det->hide_static_spr(2);
+			_G(det)->hide_static_spr(2);
 			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
@@ -66,10 +66,10 @@ void Room56::entry() {
 
 			if (!_G(spieler).R56GetTabak) {
 				flic_cut(FCUT_074, CFO_MODE);
-				det->show_static_spr(2);
+				_G(det)->show_static_spr(2);
 			}
 
-			room->set_zoom(23);
+			_G(room)->set_zoom(23);
 			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 			_G(spieler).PersonHide[P_CHEWY] = false;
@@ -85,19 +85,19 @@ void Room56::entry() {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 			_G(zoom_horizont) = 114;
-			room->set_zoom(70);
+			_G(room)->set_zoom(70);
 			_G(spieler).R62Flucht = false;
 			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
 			set_person_pos(429, 146, P_CHEWY, P_LEFT);
 			_G(spieler).scrollx = 262;
 			_G(spieler).PersonHide[P_HOWARD] = false;
-			det->show_static_spr(9);
-			det->show_static_spr(8);
-			room->set_timer_status(0, TIMER_STOP);
-			det->del_static_ani(0);
-			det->set_static_ani(3, -1);
+			_G(det)->show_static_spr(9);
+			_G(det)->show_static_spr(8);
+			_G(room)->set_timer_status(0, TIMER_STOP);
+			_G(det)->del_static_ani(0);
+			_G(det)->set_static_ani(3, -1);
 			_G(maus_links_click) = false;
-			atds->stop_aad();
+			_G(atds)->stop_aad();
 			hide_cur();
 			start_aad_wait(306, -1);
 			show_cur();
@@ -115,9 +115,9 @@ void Room56::entry() {
 				_G(spieler).flags34_8 = true;
 				esi = 2;
 			} else if (_G(spieler).flags34_40) {
-				atds->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(spieler).room_e_obj[137].Attribut = 3;
 				if (_G(spieler).flags33_80) {
 					_G(out)->setze_zeiger(nullptr);
@@ -135,7 +135,7 @@ void Room56::entry() {
 					_G(zoom_horizont) = 0;
 					set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 					set_person_pos(3, 42, P_CHEWY, P_RIGHT);
-					room->set_zoom(23);
+					_G(room)->set_zoom(23);
 					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 					_G(spieler).ZoomXy[P_HOWARD][0] = 37;
 					_G(SetUpScreenFunc) = setup_func;
@@ -153,7 +153,7 @@ void Room56::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(zoom_horizont) = 114;
-	room->set_zoom(70);
+	_G(room)->set_zoom(70);
 
 	switch(esi) {
 	case 1:
@@ -213,9 +213,9 @@ int16 Room56::use_taxi() {
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->playSound(7, 1);
 		start_detail_wait(7, 1, ANI_RUECK);
-		det->start_detail(8, 1, ANI_VOR);
+		_G(det)->start_detail(8, 1, ANI_VOR);
 		_G(zoom_horizont) = 0;
-		room->set_zoom(23);
+		_G(room)->set_zoom(23);
 		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 		spieler_mi[P_CHEWY].Mode = true;
@@ -254,28 +254,28 @@ int16 Room56::use_man() {
 	hide_cur();
 	auto_move(3, P_CHEWY);
 	start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-	room->set_timer_status(0, TIMER_STOP);
-	det->del_static_ani(0);
+	_G(room)->set_timer_status(0, TIMER_STOP);
+	_G(det)->del_static_ani(0);
 
 	if (!_G(spieler).R56WhiskyMix) {
 		start_detail_wait(4, 1, ANI_VOR);
 
-		det->set_static_ani(5, -1);
+		_G(det)->set_static_ani(5, -1);
 		start_aad_wait(304, -1);
-		det->del_static_ani(5);
-		room->set_timer_status(0, TIMER_START);
-		det->set_static_ani(0, -1);
+		_G(det)->del_static_ani(5);
+		_G(room)->set_timer_status(0, TIMER_START);
+		_G(det)->set_static_ani(0, -1);
 	} else {
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R56AbfahrtOk = true;
 		start_detail_wait(6, 1, ANI_VOR);
 
-		det->set_static_ani(1, -1);
+		_G(det)->set_static_ani(1, -1);
 		start_aad_wait(305, -1);
-		det->del_static_ani(1);
+		_G(det)->del_static_ani(1);
 	}
-	room->set_timer_status(0, TIMER_START);
-	det->set_static_ani(0, -1);
+	_G(room)->set_timer_status(0, TIMER_START);
+	_G(det)->set_static_ani(0, -1);
 
 	show_cur();
 	return action_ret;
@@ -284,7 +284,7 @@ int16 Room56::use_man() {
 int16 Room56::use_kneipe() {
 	int16 action_ret = false;
 	if (!_G(spieler).flags32_10) {
-		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
+		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && _G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
 			action_ret = true;
 			hide_cur();
 			if (_G(spieler).R56Kneipe) {
@@ -302,9 +302,9 @@ int16 Room56::use_kneipe() {
 				flic_cut(75, CFO_MODE);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
-				det->start_detail(10, 6, ANI_VOR);
+				_G(det)->start_detail(10, 6, ANI_VOR);
 				start_aad_wait(307, -1);
-				det->stop_detail(10);
+				_G(det)->stop_detail(10);
 				g_engine->_sound->playSound(10, 0);
 				_G(out)->ausblenden(0);
 				set_up_screen(DO_SETUP);
@@ -318,7 +318,7 @@ int16 Room56::use_kneipe() {
 
 				_G(SetUpScreenFunc) = setup_func;
 				flags.NoScroll = false;
-				if (obj->check_inventar(SACKGELD_INV)) {
+				if (_G(obj)->check_inventar(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
 					start_aad_wait(309, -1);
 				}
@@ -353,9 +353,9 @@ int16 Room56::use_kneipe() {
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		flags.NoPalAfterFlc = true;
-		flc->set_custom_user_function(proc1);
+		_G(flc)->set_custom_user_function(proc1);
 		flic_cut(112, CFO_MODE);
-		flc->remove_custom_user_function();
+		_G(flc)->remove_custom_user_function();
 		register_cutscene(31);
 
 		set_up_screen(NO_SETUP);
@@ -379,7 +379,7 @@ int16 Room56::proc1(int16 key) {
 void Room56::start_flug() {
 	if (!_G(spieler).flags32_10 && !_G(r56koch_flug)) {
 		_G(r56koch_flug) = 12;
-		det->start_detail(_G(r56koch_flug), 1, ANI_VOR);
+		_G(det)->start_detail(_G(r56koch_flug), 1, ANI_VOR);
 	}
 }
 
@@ -391,23 +391,23 @@ void Room56::setup_func() {
 	if (!_G(spieler).flags32_10) {
 		switch (_G(r56koch_flug)) {
 		case 10:
-			if (det->get_ani_status(10) == false) {
+			if (_G(det)->get_ani_status(10) == false) {
 				_G(r56koch_flug) = 0;
 
-				uhr->reset_timer(_G(timer_nr)[0], 0);
+				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 			}
 			break;
 
 		case 11:
-			if (det->get_ani_status(11) == false) {
-				det->start_detail(10, 1, ANI_VOR);
+			if (_G(det)->get_ani_status(11) == false) {
+				_G(det)->start_detail(10, 1, ANI_VOR);
 				_G(r56koch_flug) = 10;
 			}
 			break;
 
 		case 12:
-			if (det->get_ani_status(12) == false) {
-				det->start_detail(11, 1, ANI_VOR);
+			if (_G(det)->get_ani_status(12) == false) {
+				_G(det)->start_detail(11, 1, ANI_VOR);
 				_G(r56koch_flug) = 11;
 			}
 			break;
@@ -441,7 +441,7 @@ void Room56::setup_func() {
 	if (_G(spieler).flags32_10)
 		return;
 	
-	if (!atds->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
+	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
 		if (minfo.x + _G(spieler).scrollx >= 157 && minfo.x + _G(spieler).scrollx <= 204 && minfo.y >= 28 && minfo.y <= 89)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 412192384ac..6262b98e13f 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -38,7 +38,7 @@ void Room57::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	spieler_mi[P_HOWARD].Mode = true;
 	if (_G(spieler).R57StudioAuf)
-		det->hide_static_spr(4);
+		_G(det)->hide_static_spr(4);
 	
 	if (!flags.LoadGame &&_G(spieler).R48TaxiEntry) {
 		hide_cur();
@@ -85,7 +85,7 @@ int16 Room57::use_taxi() {
 		auto_move(3, P_CHEWY);
 		g_engine->_sound->playSound(3, 0);
 		g_engine->_sound->playSound(3);
-		det->show_static_spr(7);
+		_G(det)->show_static_spr(7);
 		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -96,11 +96,11 @@ int16 Room57::use_taxi() {
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
-		det->hide_static_spr(7);
+		_G(det)->hide_static_spr(7);
 		g_engine->_sound->playSound(3, 1);
 		g_engine->_sound->playSound(3);
-		room->set_timer_status(3, TIMER_STOP);
-		det->del_static_ani(3);
+		_G(room)->set_timer_status(3, TIMER_STOP);
+		_G(det)->del_static_ani(3);
 		start_detail_wait(5, 1, ANI_VOR);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
@@ -110,9 +110,9 @@ int16 Room57::use_taxi() {
 
 int16 Room57::use_pfoertner() {
 	int16 action_ret = false;
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	det->set_static_ani(3, -1);
+	_G(room)->set_timer_status(1, TIMER_STOP);
+	_G(det)->del_static_ani(1);
+	_G(det)->set_static_ani(3, -1);
 	hide_cur();
 	auto_move(1, P_CHEWY);
 	if (is_cur_inventar(CUTMAG_INV)) {
@@ -137,10 +137,10 @@ int16 Room57::use_pfoertner() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
-			det->hide_static_spr(4);
+			_G(det)->hide_static_spr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
 			g_engine->_sound->stopSound(0);
-			atds->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			start_aad_wait(349, -1);
 			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
@@ -148,25 +148,25 @@ int16 Room57::use_pfoertner() {
 		_G(SetUpScreenFunc) = setup_func;
 	}
 	show_cur();
-	room->set_timer_status(1, TIMER_START);
-	det->set_static_ani(1, -1);
+	_G(room)->set_timer_status(1, TIMER_START);
+	_G(det)->set_static_ani(1, -1);
 	return action_ret;
 }
 
 void Room57::talk_pfoertner() {
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	room->set_timer_status(1, TIMER_STOP);
-	det->del_static_ani(1);
-	det->set_static_ani(3, -1);
+	_G(room)->set_timer_status(1, TIMER_STOP);
+	_G(det)->del_static_ani(1);
+	_G(det)->set_static_ani(3, -1);
 	int16 aad_nr;
 	if (!_G(spieler).R57StudioAuf) {
 		aad_nr = 338;
 	} else
 		aad_nr = 342;
 	start_aad_wait(aad_nr, -1);
-	room->set_timer_status(1, TIMER_START);
-	det->set_static_ani(1, -1);
+	_G(room)->set_timer_status(1, TIMER_START);
+	_G(det)->set_static_ani(1, -1);
 	show_cur();
 }
 
diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
index a35e4a2dc1c..5163af8171d 100644
--- a/engines/chewy/rooms/room59.cpp
+++ b/engines/chewy/rooms/room59.cpp
@@ -30,8 +30,8 @@ namespace Rooms {
 
 void Room59::look_poster() {
 	if (!_G(spieler).R59PosterWeg) {
-		atds->set_ats_str(302, 1, ATS_DATEI);
-		atds->set_ats_str(301, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(302, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(301, 1, ATS_DATEI);
 		_G(spieler).R59PosterWeg = true;
 		invent_2_slot(SPARK_INV);
 		switch_room(60);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 5bff6254ed5..fd5e128e011 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -39,31 +39,31 @@ void Room62::entry() {
 		hide_cur();
 		_G(spieler).R62FirstEntry = true;
 		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
-		det->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(345, -1);
-		det->stop_detail(6);
-		det->set_static_ani(5, -1);
+		_G(det)->stop_detail(6);
+		_G(det)->set_static_ani(5, -1);
 		go_auto_xy(199, 59, P_HOWARD, ANI_WAIT);
 		set_person_spr(0, P_HOWARD);
-		det->del_static_ani(5);
-		det->start_detail(5, 255, ANI_VOR);
+		_G(det)->del_static_ani(5);
+		_G(det)->start_detail(5, 255, ANI_VOR);
 		start_aad_wait(346, -1);
-		det->stop_detail(5);
-		det->start_detail(6, 255, ANI_VOR);
+		_G(det)->stop_detail(5);
+		_G(det)->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(347, -1);
-		det->stop_detail(6);
+		_G(det)->stop_detail(6);
 		start_detail_wait(7, 1, ANI_VOR);
-		det->set_static_ani(5, -1);
-		det->start_detail(0, 255, ANI_VOR);
+		_G(det)->set_static_ani(5, -1);
+		_G(det)->start_detail(0, 255, ANI_VOR);
 		start_aad_wait(348, -1);
-		det->stop_detail(0);
-		det->del_static_ani(0);
-		det->start_detail(1, 1, ANI_VOR);
+		_G(det)->stop_detail(0);
+		_G(det)->del_static_ani(0);
+		_G(det)->start_detail(1, 1, ANI_VOR);
 		auto_move(0, P_CHEWY);
 		spieler_mi[P_CHEWY].Mode = true;
 		go_auto_xy(160, 240, P_CHEWY, ANI_WAIT);
 		spieler_mi[P_CHEWY].Mode = false;
-		det->del_static_ani(5);
+		_G(det)->del_static_ani(5);
 		start_detail_wait(7, 1, ANI_VOR);
 		show_cur();
 		_G(spieler).R64Moni1Ani = 3;
@@ -72,10 +72,10 @@ void Room62::entry() {
 		_G(spieler).R62TShow = true;
 		switch_room(64);
 	} else {
-		det->del_static_ani(0);
+		_G(det)->del_static_ani(0);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		det->set_static_ani(4, -1);
-		det->set_static_ani(8, -1);
+		_G(det)->set_static_ani(4, -1);
+		_G(det)->set_static_ani(8, -1);
 		_G(r62Delay) = 0;
 		_G(r62TalkAni) = 8;
 
@@ -85,12 +85,12 @@ void Room62::entry() {
 void Room62::setup_func() {
 	if (_G(r62Delay) <= 0 && _G(spieler).R62TShow) {
 		_G(r62Delay) = (_G(spieler).DelaySpeed + 1) * 60;
-		det->stop_detail(_G(r62TalkAni));
+		_G(det)->stop_detail(_G(r62TalkAni));
 		if (_G(r62TalkAni) == 4)
 			_G(r62TalkAni) = 8;
 		else
 			_G(r62TalkAni) = 4;
-		det->start_detail(_G(r62TalkAni), 255, ANI_VOR);
+		_G(det)->start_detail(_G(r62TalkAni), 255, ANI_VOR);
 	} else
 		--_G(r62Delay);
 }
@@ -103,11 +103,11 @@ int16 Room62::use_laura() {
 		auto_move(2, P_CHEWY);
 		auto_scroll(0, 0);
 		_G(SetUpScreenFunc) = nullptr;
-		det->del_static_ani(8);
-		det->stop_detail(8);
+		_G(det)->del_static_ani(8);
+		_G(det)->stop_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		det->start_detail(2, 255, ANI_VOR);
-		det->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(2, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077, CFO_MODE);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index cec467d9e05..be0c0ffc320 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -34,26 +34,26 @@ void Room63::entry() {
 	_G(r63Schalter) = false;
 	_G(r63RunDia) = 0;
 	if (_G(spieler).R63FxMannWeg)
-		det->del_static_ani(5);
+		_G(det)->del_static_ani(5);
 	if (!_G(spieler).R63Uhr) {
 		_G(cur_hide_flag) = false;
 		hide_cur();
-		det->start_detail(12, 255, ANI_VOR);
-		det->start_detail(10, 255, ANI_VOR);
-		det->start_detail(18, 255, ANI_VOR);
+		_G(det)->start_detail(12, 255, ANI_VOR);
+		_G(det)->start_detail(10, 255, ANI_VOR);
+		_G(det)->start_detail(18, 255, ANI_VOR);
 		auto_move(4, P_CHEWY);
-		det->stop_detail(10);
-		det->start_detail(11, 255, ANI_VOR);
+		_G(det)->stop_detail(10);
+		_G(det)->start_detail(11, 255, ANI_VOR);
 		auto_scroll(58, 0);
 		start_aad_wait(355, -1);
-		det->stop_detail(11);
-		det->start_detail(10, 255, ANI_VOR);
+		_G(det)->stop_detail(11);
+		_G(det)->start_detail(10, 255, ANI_VOR);
 		show_cur();
 	} else if (!_G(spieler).R63Feuer) {
-		det->show_static_spr(10);
-		det->show_static_spr(12);
+		_G(det)->show_static_spr(10);
+		_G(det)->show_static_spr(12);
 	} else if (_G(spieler).R62LauraVerwandlung) {
-		atds->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(SetUpScreenFunc) = setup_func;
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
@@ -61,7 +61,7 @@ void Room63::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).room_e_obj[95].Attribut = 255;
 		_G(r63ChewyAni) = 0;
-		det->start_detail(0, 1, ANI_VOR);
+		_G(det)->start_detail(0, 1, ANI_VOR);
 	}
 }
 
@@ -75,35 +75,35 @@ void Room63::setup_func() {
 	
 	switch (_G(r63ChewyAni)) {
 	case 0:
-		if (det->get_ani_status(0) == false) {
+		if (_G(det)->get_ani_status(0) == false) {
 			if (_G(r63RunDia) < 4)
 				++_G(r63RunDia);
 			start_aad(370 + _G(r63RunDia));
-			det->start_detail(1, 1, ANI_VOR);
+			_G(det)->start_detail(1, 1, ANI_VOR);
 			_G(r63ChewyAni) = 1;
 		}
 		break;
 
 	case 1:
-		if (det->get_ani_status(1) == false) {
+		if (_G(det)->get_ani_status(1) == false) {
 			_G(spieler).ScrollxStep = 4;
 			set_person_pos(0, 0, P_CHEWY, P_RIGHT);
-			det->start_detail(22, 1, ANI_VOR);
-			det->start_detail(2, 1, ANI_VOR);
-			atds->stop_aad();
+			_G(det)->start_detail(22, 1, ANI_VOR);
+			_G(det)->start_detail(2, 1, ANI_VOR);
+			_G(atds)->stop_aad();
 			_G(r63ChewyAni) = 2;
 		}
 		break;
 
 	case 2:
-		if (det->get_ani_status(2) == false) {
-			det->start_detail(3, 1, ANI_VOR);
+		if (_G(det)->get_ani_status(2) == false) {
+			_G(det)->start_detail(3, 1, ANI_VOR);
 			_G(r63ChewyAni) = 3;
 		}
 		break;
 
 	case 3:
-		if (det->get_ani_status(3) == false) {
+		if (_G(det)->get_ani_status(3) == false) {
 			if (!flags.AutoAniPlay) {
 				flags.AutoAniPlay = true;
 				flags.NoScroll = true;
@@ -115,7 +115,7 @@ void Room63::setup_func() {
 				flags.NoScroll = false;
 				_G(spieler).ScrollxStep = 4;
 				if (!_G(r63Schalter)) {
-					det->start_detail(0, 1, ANI_VOR);
+					_G(det)->start_detail(0, 1, ANI_VOR);
 					_G(r63ChewyAni) = 0;
 				} else
 					bork_platt();
@@ -142,7 +142,7 @@ void Room63::bork_platt() {
 	spieler_mi[P_CHEWY].Mode = false;
 	start_aad_wait(370, -1);
 	start_detail_wait(4, 1, ANI_VOR);
-	det->show_static_spr(13);
+	_G(det)->show_static_spr(13);
 	start_aad_wait(361, -1);
 	_G(out)->cls();
 	flags.NoPalAfterFlc = true;
@@ -159,12 +159,12 @@ void Room63::talk_hunter() {
 	hide_cur();
 	auto_move(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
-		det->hide_static_spr(10);
-	det->start_detail(10, 255, ANI_VOR);
+		_G(det)->hide_static_spr(10);
+	_G(det)->start_detail(10, 255, ANI_VOR);
 	start_aad_wait(356, -1);
 	if (_G(spieler).R63Uhr) {
-		det->show_static_spr(10);
-		det->stop_detail(10);
+		_G(det)->show_static_spr(10);
+		_G(det)->stop_detail(10);
 	}
 	show_cur();
 }
@@ -173,15 +173,15 @@ void Room63::talk_regie() {
 	hide_cur();
 	auto_move(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
-		det->hide_static_spr(12);
-	det->stop_detail(18);
-	det->start_detail(19, 255, ANI_VOR);
+		_G(det)->hide_static_spr(12);
+	_G(det)->stop_detail(18);
+	_G(det)->start_detail(19, 255, ANI_VOR);
 	start_aad_wait(357, -1);
-	det->stop_detail(19);
+	_G(det)->stop_detail(19);
 	if (_G(spieler).R63Uhr) {
-		det->show_static_spr(12);
+		_G(det)->show_static_spr(12);
 	} else {
-		det->start_detail(18, 255, ANI_VOR);
+		_G(det)->start_detail(18, 255, ANI_VOR);
 	}
 	show_cur();
 }
@@ -202,14 +202,14 @@ int16 Room63::use_fx_man() {
 		del_inventar(_G(spieler).AkInvent);
 		remove_inventory(34);
 		start_aad_wait(359, -1);
-		det->del_static_ani(5);
+		_G(det)->del_static_ani(5);
 		start_detail_wait(6, 1, ANI_VOR);
-		det->start_detail(7, 255, ANI_VOR);
+		_G(det)->start_detail(7, 255, ANI_VOR);
 		start_aad_wait(362, -1);
-		det->stop_detail(7);
+		_G(det)->stop_detail(7);
 		start_detail_wait(8, 1, ANI_VOR);
 		_G(spieler).R63FxMannWeg = true;
-		atds->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
 	}
 	return action_ret;
@@ -228,17 +228,17 @@ int16 Room63::use_schalter() {
 				hide_cur();
 				auto_move(1, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-				det->show_static_spr(2);
+				_G(det)->show_static_spr(2);
 				set_person_spr(P_LEFT, P_CHEWY);
 				start_detail_wait(21, 1, ANI_VOR);
-				det->show_static_spr(14);
+				_G(det)->show_static_spr(14);
 				wait_show_screen(18);
-				det->hide_static_spr(14);
+				_G(det)->hide_static_spr(14);
 				start_detail_wait(24, 1, ANI_VOR);
-				det->show_static_spr(1);
-				det->hide_static_spr(2);
+				_G(det)->show_static_spr(1);
+				_G(det)->hide_static_spr(2);
 				start_aad_wait(364, -1);
-				atds->set_ats_str(385, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(385, 1, ATS_DATEI);
 				show_cur();
 			}
 		} else {
@@ -252,12 +252,12 @@ int16 Room63::use_schalter() {
 
 void Room63::talk_girl() {
 	auto_move(2, P_CHEWY);
-	det->stop_detail(12);
+	_G(det)->stop_detail(12);
 	start_detail_wait(13, 1, ANI_VOR);
-	det->set_static_ani(14, -1);
+	_G(det)->set_static_ani(14, -1);
 	start_ads_wait(17);
-	det->del_static_ani(14);
-	det->start_detail(12, 255, ANI_VOR);
+	_G(det)->del_static_ani(14);
+	_G(det)->start_detail(12, 255, ANI_VOR);
 }
 
 int16 Room63::use_girl() {
@@ -267,23 +267,23 @@ int16 Room63::use_girl() {
 		hide_cur();
 		auto_move(2, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
-		det->stop_detail(12);
+		_G(det)->stop_detail(12);
 		start_detail_wait(13, 1, ANI_VOR);
-		det->set_static_ani(14, -1);
+		_G(det)->set_static_ani(14, -1);
 		start_aad_wait(365, -1);
-		det->del_static_ani(14);
-		det->start_detail(15, 255, ANI_VOR);
+		_G(det)->del_static_ani(14);
+		_G(det)->start_detail(15, 255, ANI_VOR);
 		start_aad_wait(360, -1);
-		det->stop_detail(15);
+		_G(det)->stop_detail(15);
 		start_detail_wait(16, 1, ANI_VOR);
 		_G(spieler).R63Uhr = true;
-		det->stop_detail(10);
-		det->stop_detail(18);
-		det->show_static_spr(10);
-		det->show_static_spr(12);
-		atds->set_ats_str(381, 1, ATS_DATEI);
-		atds->set_ats_str(382, 1, ATS_DATEI);
-		atds->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(det)->stop_detail(10);
+		_G(det)->stop_detail(18);
+		_G(det)->show_static_spr(10);
+		_G(det)->show_static_spr(12);
+		_G(atds)->set_ats_str(381, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(382, 1, ATS_DATEI);
+		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(367, -1);
 		show_cur();
 	}
@@ -304,16 +304,16 @@ int16 Room63::use_aschenbecher() {
 				auto_scroll(70, 0);
 				auto_move(1, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				det->start_detail(20, 255, ANI_VOR);
-				det->start_detail(10, 255, ANI_VOR);
-				det->start_detail(18, 255, ANI_VOR);
-				det->hide_static_spr(10);
-				det->hide_static_spr(12);
+				_G(det)->start_detail(20, 255, ANI_VOR);
+				_G(det)->start_detail(10, 255, ANI_VOR);
+				_G(det)->start_detail(18, 255, ANI_VOR);
+				_G(det)->hide_static_spr(10);
+				_G(det)->hide_static_spr(12);
 				start_aad_wait(368, -1);
 				flic_cut(FCUT_080, CFO_MODE);
-				atds->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
-				atds->set_ats_str(383, 1, ATS_DATEI);
+				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_ats_str(383, 1, ATS_DATEI);
 				_G(spieler).R63Feuer = true;
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				_G(spieler).scrollx = 0;
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 51fd9826489..f8b2a69734e 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -34,20 +34,20 @@ void Room64::entry() {
 	_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
 
 	if (_G(spieler).flags38_1)
-		det->start_detail(0, 255, false);
+		_G(det)->start_detail(0, 255, false);
 	
 	if (!_G(spieler).R64ManWeg) {
-		_G(timer_nr)[0] = room->set_timer(1, 10);
-		det->set_static_ani(1, -1);
+		_G(timer_nr)[0] = _G(room)->set_timer(1, 10);
+		_G(det)->set_static_ani(1, -1);
 		chewy_entry();
 		if (_G(spieler).R63Feuer) {
-			flc->set_flic_user_function(cut_sev);
+			_G(flc)->set_flic_user_function(cut_sev);
 			flic_cut(FCUT_078, CFO_MODE);
-			flc->remove_flic_user_function();
+			_G(flc)->remove_flic_user_function();
 			_G(spieler).R64ManWeg = true;
-			det->del_static_ani(1);
-			room->set_timer_status(1, TIMER_STOP);
-			atds->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(det)->del_static_ani(1);
+			_G(room)->set_timer_status(1, TIMER_STOP);
+			_G(atds)->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
 			hide_cur();
@@ -60,11 +60,11 @@ void Room64::entry() {
 
 int16 Room64::cut_sev(int16 frame) {
 	const int16 spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + chewy_kor[spr_nr * 2] - _G(spieler).scrollx;
-	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
+	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
+	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
-	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
-	_G(out)->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, _G(scr_width));
+	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak, (int16)_G(room)->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
+	_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, _G(scr_width));
 	return 0;
 }
 
@@ -72,9 +72,9 @@ void Room64::chewy_entry() {
 	calc_monitor();
 	if (!flags.LoadGame) {
 		hide_cur();
-		det->show_static_spr(3);
+		_G(det)->show_static_spr(3);
 		auto_move(2, P_CHEWY);
-		det->hide_static_spr(3);
+		_G(det)->hide_static_spr(3);
 		show_cur();
 	}
 }
@@ -88,19 +88,19 @@ void Room64::calc_monitor() {
 
 	case 3:
 		str_nr = 0;
-		det->set_static_ani(3, -1);
+		_G(det)->set_static_ani(3, -1);
 		break;
 
 	case 5:
 		str_nr = 1;
-		det->start_detail(5, 255, ANI_VOR);
+		_G(det)->start_detail(5, 255, ANI_VOR);
 		break;
 
 	default:
 		break;
 	}
 
-	atds->set_ats_str(373, str_nr, ATS_DATEI);
+	_G(atds)->set_ats_str(373, str_nr, ATS_DATEI);
 	switch (_G(spieler).R64Moni2Ani) {
 	case 0:
 		str_nr = 1;
@@ -108,20 +108,20 @@ void Room64::calc_monitor() {
 
 	case 4:
 		str_nr = 0;
-		det->set_static_ani(4, -1);
+		_G(det)->set_static_ani(4, -1);
 		break;
 
 	default:
 		break;
 	}
-	atds->set_ats_str(374, str_nr, ATS_DATEI);
+	_G(atds)->set_ats_str(374, str_nr, ATS_DATEI);
 }
 
 void Room64::setup_func() {
 	if (_G(r62Delay) <= 0 && _G(spieler).R62TShow) {
 		_G(r62Delay) = (_G(spieler).DelaySpeed + 1) * 60;
 		if (_G(r64TalkAni) == 3 || _G(r64TalkAni) == 4)
-			det->stop_detail(_G(r64TalkAni));
+			_G(det)->stop_detail(_G(r64TalkAni));
 		
 		if (_G(r64TalkAni) == 4)
 			_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
@@ -129,7 +129,7 @@ void Room64::setup_func() {
 			_G(r64TalkAni) = _G(spieler).R64Moni2Ani;
 
 		if (_G(r64TalkAni) != 0)
-			det->start_detail(_G(r64TalkAni), 255, ANI_VOR);
+			_G(det)->start_detail(_G(r64TalkAni), 255, ANI_VOR);
 	} else
 		--_G(r62Delay);
 }
@@ -142,14 +142,14 @@ void Room64::talk_man(int16 aad_nr) {
 	if (!_G(spieler).R64ManWeg) {
 		hide_cur();
 		auto_move(4, P_CHEWY);
-		room->set_timer_status(1, TIMER_STOP);
-		det->del_static_ani(1);
-		det->stop_detail(1);
-		det->set_static_ani(2, -1);
+		_G(room)->set_timer_status(1, TIMER_STOP);
+		_G(det)->del_static_ani(1);
+		_G(det)->stop_detail(1);
+		_G(det)->set_static_ani(2, -1);
 		start_aad_wait(aad_nr, -1);
-		det->del_static_ani(2);
-		room->set_timer_status(1, TIMER_START);
-		det->set_static_ani(1, -1);
+		_G(det)->del_static_ani(2);
+		_G(room)->set_timer_status(1, TIMER_START);
+		_G(det)->set_static_ani(1, -1);
 		show_cur();
 	}
 }
@@ -159,11 +159,11 @@ int16 Room64::use_tasche() {
 	hide_cur();
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R64ManWeg) {
-			if (!atds->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
+			if (!_G(atds)->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
 				auto_move(3, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				new_invent_2_cur(GERAET_INV);
-				atds->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
 				start_aad_wait(353, -1);
 			} else {
 				show_cur();
@@ -171,14 +171,14 @@ int16 Room64::use_tasche() {
 			}
 		} else {
 			auto_move(3, P_CHEWY);
-			room->set_timer_status(1, TIMER_STOP);
-			det->del_static_ani(1);
-			det->stop_detail(1);
-			det->start_detail(6, 255, false);
+			_G(room)->set_timer_status(1, TIMER_STOP);
+			_G(det)->del_static_ani(1);
+			_G(det)->stop_detail(1);
+			_G(det)->start_detail(6, 255, false);
 			start_aad_wait(352, -1);
-			det->stop_detail(6);
-			room->set_timer_status(0, TIMER_START);
-			det->set_static_ani(1, -1);
+			_G(det)->stop_detail(6);
+			_G(room)->set_timer_status(0, TIMER_START);
+			_G(det)->set_static_ani(1, -1);
 		}
 		
 		action_ret = true;
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 3ade50e4b8e..03e19692348 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -138,9 +138,9 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 			break;
 		}
 	} else if (mode == AAD_STR_START) {
-		det->start_detail(person_nr, 255, ANI_VOR);
+		_G(det)->start_detail(person_nr, 255, ANI_VOR);
 	} else {
-		det->stop_detail(person_nr);
+		_G(det)->stop_detail(person_nr);
 	}
 }
 
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 79b28d3bbd2..f50d861ab6d 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -39,8 +39,8 @@ void Room66::entry(int16 eib_nr) {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	if (!_G(spieler).flags26_4) {
-		det->show_static_spr(4);
-		det->show_static_spr(8);
+		_G(det)->show_static_spr(4);
+		_G(det)->show_static_spr(8);
 		_G(cur_hide_flag) = false;
 		hide_cur();
 		_G(spieler).flags26_4 = true;
@@ -54,9 +54,9 @@ void Room66::entry(int16 eib_nr) {
 		start_aad_wait(403, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(0, 1, ANI_VOR);
-		det->show_static_spr(14);
+		_G(det)->show_static_spr(14);
 		wait_show_screen(15);
-		det->hide_static_spr(14);
+		_G(det)->hide_static_spr(14);
 		start_detail_wait(1, 1, ANI_VOR);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -88,8 +88,8 @@ void Room66::entry(int16 eib_nr) {
 
 void Room66::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
-	atds->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATEI);
-	atds->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATEI);
 	if (_G(spieler).PersonRoomNr[P_HOWARD] != 66)
 		return;
 
@@ -143,7 +143,7 @@ void Room66::setup_func() {
 		return;
 
 	_G(spieler).flags26_8 = true;
-	det->start_detail(9, 5, false);
+	_G(det)->start_detail(9, 5, false);
 	start_aad_wait(405, -1);
 }
 
@@ -171,7 +171,7 @@ int Room66::proc2() {
 	auto_move(0, P_CHEWY);
 	_G(spieler).flags26_40 = true;
 	_G(spieler).room_e_obj[100].Attribut = 3;
-	atds->set_ats_str(423, 1, ANI_GO);
+	_G(atds)->set_ats_str(423, 1, ANI_GO);
 	show_cur();
 	
 	return 0;
@@ -207,13 +207,13 @@ void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, in
 	if (chewyAutoMovNr != -1)
 		auto_move(chewyAutoMovNr, P_CHEWY);
 
-	room->set_timer_status(restartAniNr, TIMER_STOP);
-	det->del_static_ani(restartAniNr);
-	det->set_static_ani(transitionAniNr, -1);
+	_G(room)->set_timer_status(restartAniNr, TIMER_STOP);
+	_G(det)->del_static_ani(restartAniNr);
+	_G(det)->set_static_ani(transitionAniNr, -1);
 	start_aad_wait(transitionDiaNr, -1);
-	det->del_static_ani(transitionAniNr);
-	det->set_static_ani(restartAniNr, -1);
-	room->set_timer_status(restartAniNr, TIMER_START);
+	_G(det)->del_static_ani(transitionAniNr);
+	_G(det)->set_static_ani(restartAniNr, -1);
+	_G(room)->set_timer_status(restartAniNr, TIMER_START);
 	show_cur();


Commit: cf7ac0878b3fd5b1e1add4c83e3db22c00ed1966
    https://github.com/scummvm/scummvm/commit/cf7ac0878b3fd5b1e1add4c83e3db22c00ed1966
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:31-08:00

Commit Message:
CHEWY: Move various array globals to Globals

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/chewy.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 9f256724e70..97eaa2001a5 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -976,8 +976,8 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 				if (_atdsv.VocNr != _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
 					_atdsv.VocNr = _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
 					g_engine->_sound->playSpeech(_atdsv.VocNr);
-					int16 vocx = spieler_vector[_aadv.StrHeader->AkPerson].Xypos[0] -
-								 _G(spieler).scrollx + spieler_mi[_aadv.StrHeader->AkPerson].HotX;
+					int16 vocx = _G(spieler_vector)[_aadv.StrHeader->AkPerson].Xypos[0] -
+								 _G(spieler).scrollx + _G(spieler_mi)[_aadv.StrHeader->AkPerson].HotX;
 					g_engine->_sound->setSoundChannelBalance(0, getStereoPos(vocx));
 					_aadv.DelayCount = 1;
 				}
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 667794bb7a9..311e1b9a3b7 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -142,9 +142,9 @@ Common::Error ChewyEngine::saveGameStream(Common::WriteStream *stream, bool isAu
 	Common::Serializer s(nullptr, stream);
 
 	for (int i = 0; i < MAX_PERSON; i++) {
-		_G(spieler).X[i] = spieler_vector[i].Xypos[0];
-		_G(spieler).Y[i] = spieler_vector[i].Xypos[1];
-		_G(spieler).Phase[i] = person_end_phase[i];
+		_G(spieler).X[i] = _G(spieler_vector)[i].Xypos[0];
+		_G(spieler).Y[i] = _G(spieler_vector)[i].Xypos[1];
+		_G(spieler).Phase[i] = _G(person_end_phase)[i];
 	}
 
 	if (!_G(spieler).synchronize(s))
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 1c86177a90b..4b4f1b18ec7 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -142,10 +142,10 @@ void MainMenu::screenFunc() {
 }
 
 void MainMenu::animate() {
-	if (ani_timer->TimeFlag) {
+	if (_G(ani_timer)->TimeFlag) {
 		_G(uhr)->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
-		spieler_vector->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[0];
+		_G(spieler_vector)->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[0];
 		_G(FrameSpeed) = 0;
 		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
@@ -217,8 +217,8 @@ void MainMenu::startGame() {
 	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
 	_G(room)->load_room(&room_blk, 0, &_G(spieler));
 
-	spieler_vector[P_CHEWY].Phase = 6;
-	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
+	_G(spieler_vector)[P_CHEWY].Phase = 6;
+	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	_G(fx_blend) = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -267,7 +267,7 @@ void MainMenu::playGame() {
 	flags.MainInput = true;
 	flags.ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
-	spieler_vector[P_CHEWY].Count = 0;
+	_G(spieler_vector)[P_CHEWY].Count = 0;
 	_G(uhr)->reset_timer(0, 0);
 	_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index be09240283b..52adacf5cf5 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -67,31 +67,19 @@ Globals::~Globals() {
 }
 
 
-SprInfo spr_info[MAX_PROG_ANI];
 maus_info minfo;
 kb_info kbinfo;
 cur_blk curblk;
 cur_ani curani;
 iog_init ioptr;
 RaumBlk room_blk;
-ObjMov spieler_vector[MAX_PERSON];
 
-MovInfo spieler_mi[MAX_PERSON];
 
-ObjMov auto_mov_vector[MAX_OBJ_MOV];
-MovInfo auto_mov_obj[MAX_OBJ_MOV];
-MovPhasen mov_phasen[MAX_OBJ_MOV];
-MovLine mov_line[MAX_OBJ_MOV][5];
-TimerBlk ani_timer[MAX_TIMER_OBJ];
 Flags flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 				0, 0, 0, 0, 0, 0, 0, 0, 0 };
 CustomInfo Ci;
 GotoPkt gpkt;
 
-int16 person_end_phase[MAX_PERSON];
-int16 ani_stand_count[MAX_PERSON];
-
-bool ani_stand_flag[MAX_PERSON];
 
 
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index c24fe98df3b..d9c4440721a 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -227,6 +227,18 @@ public:
 	Flic *_flc = nullptr;
 	MovClass *_mov = nullptr;
 
+	ObjMov _spieler_vector[MAX_PERSON];
+	SprInfo _spr_info[MAX_PROG_ANI];
+	MovInfo _spieler_mi[MAX_PERSON];
+	ObjMov _auto_mov_vector[MAX_OBJ_MOV];
+	MovInfo _auto_mov_obj[MAX_OBJ_MOV];
+	MovPhasen _mov_phasen[MAX_OBJ_MOV];
+	MovLine _mov_line[MAX_OBJ_MOV][5];
+	TimerBlk _ani_timer[MAX_TIMER_OBJ];
+	int16 _person_end_phase[MAX_PERSON] = { 0 };
+	int16 _ani_stand_count[MAX_PERSON] = { 0 };
+	bool _ani_stand_flag[MAX_PERSON] = { false };
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -291,32 +303,17 @@ extern char *invent_name;
 
 extern int16 ak_invent;
 
-extern SprInfo spr_info[MAX_PROG_ANI];
 extern maus_info minfo;
 extern kb_info kbinfo;
 extern cur_blk curblk;
 extern cur_ani curani;
 extern iog_init ioptr;
 extern RaumBlk room_blk;
-extern ObjMov spieler_vector[MAX_PERSON];
-
-extern MovInfo spieler_mi[MAX_PERSON];
-
-extern ObjMov auto_mov_vector[MAX_OBJ_MOV];
-extern MovInfo auto_mov_obj[MAX_OBJ_MOV];
 
-extern MovPhasen mov_phasen[MAX_OBJ_MOV];
-extern MovLine mov_line[MAX_OBJ_MOV][5];
-extern TimerBlk ani_timer[MAX_TIMER_OBJ];
 extern Flags flags;
 extern CustomInfo Ci;
 extern GotoPkt gpkt;
 
-extern int16 person_end_phase[MAX_PERSON];
-extern int16 ani_stand_count[MAX_PERSON];
-
-extern bool ani_stand_flag[MAX_PERSON];
-
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 73a30c67ed6..7c1df039c05 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -40,7 +40,7 @@ void standard_init() {
 	_G(ged) = new GedClass(&ged_user_func);
 	_G(room) = new Room();
 	_G(obj) = new Object(&_G(spieler));
-	_G(uhr) = new Timer(MAX_TIMER_OBJ, ani_timer);
+	_G(uhr) = new Timer(MAX_TIMER_OBJ, _G(ani_timer));
 	_G(det) = new Detail();
 	_G(atds) = new Atdsys();
 	_G(sndPlayer) = new SoundPlayer();
@@ -127,42 +127,42 @@ void var_init() {
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).ScrollyStep = 1;
 
-	spieler_mi[P_CHEWY].HotX = CH_HOT_X;
-	spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
-	spieler_mi[P_CHEWY].HotMovX = CH_HOT_MOV_X;
-	spieler_mi[P_CHEWY].HotMovY = CH_HOT_MOV_Y;
-	spieler_mi[P_CHEWY].Vorschub = CH_X_PIX;
-	spieler_mi[P_CHEWY].Id = CHEWY_OBJ;
-
-	spieler_mi[P_HOWARD].HotX = HO_HOT_X;
-	spieler_mi[P_HOWARD].HotY = HO_HOT_Y ;
-	spieler_mi[P_HOWARD].HotMovX = HO_HOT_MOV_X;
-	spieler_mi[P_HOWARD].HotMovY = HO_HOT_MOV_Y;
-	spieler_mi[P_HOWARD].Vorschub = HO_X_PIX;
-	spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
-
-	spieler_mi[P_NICHELLE].HotX = NI_HOT_X;
-	spieler_mi[P_NICHELLE].HotY = NI_HOT_Y ;
-	spieler_mi[P_NICHELLE].HotMovX = NI_HOT_MOV_X;
-	spieler_mi[P_NICHELLE].HotMovY = 62;
-	spieler_mi[P_NICHELLE].Vorschub = NI_X_PIX;
-	spieler_mi[P_NICHELLE].Id = NICHELLE_OBJ;
-
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_CHEWY].HotX = CH_HOT_X;
+	_G(spieler_mi)[P_CHEWY].HotY = CH_HOT_Y;
+	_G(spieler_mi)[P_CHEWY].HotMovX = CH_HOT_MOV_X;
+	_G(spieler_mi)[P_CHEWY].HotMovY = CH_HOT_MOV_Y;
+	_G(spieler_mi)[P_CHEWY].Vorschub = CH_X_PIX;
+	_G(spieler_mi)[P_CHEWY].Id = CHEWY_OBJ;
+
+	_G(spieler_mi)[P_HOWARD].HotX = HO_HOT_X;
+	_G(spieler_mi)[P_HOWARD].HotY = HO_HOT_Y ;
+	_G(spieler_mi)[P_HOWARD].HotMovX = HO_HOT_MOV_X;
+	_G(spieler_mi)[P_HOWARD].HotMovY = HO_HOT_MOV_Y;
+	_G(spieler_mi)[P_HOWARD].Vorschub = HO_X_PIX;
+	_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
+
+	_G(spieler_mi)[P_NICHELLE].HotX = NI_HOT_X;
+	_G(spieler_mi)[P_NICHELLE].HotY = NI_HOT_Y ;
+	_G(spieler_mi)[P_NICHELLE].HotMovX = NI_HOT_MOV_X;
+	_G(spieler_mi)[P_NICHELLE].HotMovY = 62;
+	_G(spieler_mi)[P_NICHELLE].Vorschub = NI_X_PIX;
+	_G(spieler_mi)[P_NICHELLE].Id = NICHELLE_OBJ;
+
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 
 	for (int16 i = 0; i < MAX_PERSON; i++) {
 		_G(PersonAni)[i] = -1;
 		_G(PersonTaf)[i] = 0;
-		spieler_mi[i].Mode = false;
+		_G(spieler_mi)[i].Mode = false;
 
-		ani_stand_flag[i] = false;
+		_G(ani_stand_flag)[i] = false;
 		_G(spz_delay)[i] = 0;
 		_G(spieler).PersonRoomNr[i] = -1;
 		_G(spieler).PersonDia[i] = -1;
 	}
 	_G(spieler).PersonRoomNr[P_CHEWY] = _G(room_start_nr);
 
-	gpkt.Vorschub = spieler_mi[P_CHEWY].Vorschub;
+	gpkt.Vorschub = _G(spieler_mi)[P_CHEWY].Vorschub;
 	init_room();
 	init_atds();
 	_G(spieler).FramesPerSecond = 7;
@@ -216,7 +216,7 @@ void init_atds() {
 	_G(atds)->open_handle(ADSH_TMP, "rb", 3);
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
-	spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed;
+	_G(spieler_vector)[P_CHEWY].Delay = _G(spieler).DelaySpeed;
 	_G(atds)->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
 		_G(atds)->set_split_win(i, &_G(ssi)[i]);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index f322913fc2f..fa850d650ff 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -247,10 +247,10 @@ void test_menu() {
 	_G(menu_display) = 0;
 	_G(cur_display) = true;
 	_G(cur)->show_cur();
-	spieler_vector[P_CHEWY].Phase = 6;
-	spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[spieler_vector[P_CHEWY].Phase];
+	_G(spieler_vector)[P_CHEWY].Phase = 6;
+	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[_G(spieler_vector)[P_CHEWY].Phase];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
-	spieler_vector[P_CHEWY].Count = 0;
+	_G(spieler_vector)[P_CHEWY].Count = 0;
 	ende = false;
 	kbinfo.scan_code = Common::KEYCODE_INVALID;
 	flags.main_maus_flag = false;
@@ -530,10 +530,10 @@ void set_up_screen(SetupScreenMode mode) {
 
 	_G(uhr)->calc_timer();
 
-	if (ani_timer[0].TimeFlag) {
+	if (_G(ani_timer)[0].TimeFlag) {
 		_G(uhr)->reset_timer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
-		spieler_vector[P_CHEWY].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[P_CHEWY];
+		_G(spieler_vector)[P_CHEWY].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[P_CHEWY];
 		_G(FrameSpeed) = 0;
 		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
@@ -542,7 +542,7 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
-		zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
+		zoom_mov_anpass(&_G(spieler_vector)[i], &_G(spieler_mi)[i]);
 
 	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !flags.InventMenu) {
 		_G(SetUpScreenFunc)();
@@ -578,27 +578,27 @@ void set_up_screen(SetupScreenMode mode) {
 					calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 				} else {
 					if (!flags.ChewyDontGo) {
-						gpkt.Dx = minfo.x - spieler_mi[P_CHEWY].HotMovX +
-						          _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
-						gpkt.Dy = minfo.y - spieler_mi[P_CHEWY].HotMovY +
-						          _G(spieler).scrolly + spieler_mi[P_CHEWY].HotY;
-						gpkt.Sx = spieler_vector[P_CHEWY].Xypos[0] +
-						          spieler_mi[P_CHEWY].HotX;
-						gpkt.Sy = spieler_vector[P_CHEWY].Xypos[1] +
-						          spieler_mi[P_CHEWY].HotY;
+						gpkt.Dx = minfo.x - _G(spieler_mi)[P_CHEWY].HotMovX +
+						          _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+						gpkt.Dy = minfo.y - _G(spieler_mi)[P_CHEWY].HotMovY +
+						          _G(spieler).scrolly + _G(spieler_mi)[P_CHEWY].HotY;
+						gpkt.Sx = _G(spieler_vector)[P_CHEWY].Xypos[0] +
+						          _G(spieler_mi)[P_CHEWY].HotX;
+						gpkt.Sy = _G(spieler_vector)[P_CHEWY].Xypos[1] +
+						          _G(spieler_mi)[P_CHEWY].HotY;
 						gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
 						gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
 						gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
 						gpkt.Ebenen = _G(room)->_gedInfo[room_blk.AkAblage].Ebenen;
 						gpkt.AkMovEbene = _G(ged_mov_ebene);
 						_G(mov)->goto_xy(&gpkt);
-						spieler_mi[P_CHEWY].XyzStart[0] = spieler_vector[P_CHEWY].Xypos[0];
-						spieler_mi[P_CHEWY].XyzStart[1] = spieler_vector[P_CHEWY].Xypos[1];
-						spieler_mi[P_CHEWY].XyzEnd[0] = gpkt.Dx - spieler_mi[P_CHEWY].HotX;
-						spieler_mi[P_CHEWY].XyzEnd[1] = gpkt.Dy - spieler_mi[P_CHEWY].HotY;
-						_G(mov)->get_mov_vector((int16 *)spieler_mi[P_CHEWY].XyzStart, spieler_mi[P_CHEWY].Vorschub, &spieler_vector[P_CHEWY]);
-						get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
-						spieler_vector[P_CHEWY].DelayCount = 0;
+						_G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler_vector)[P_CHEWY].Xypos[0];
+						_G(spieler_mi)[P_CHEWY].XyzStart[1] = _G(spieler_vector)[P_CHEWY].Xypos[1];
+						_G(spieler_mi)[P_CHEWY].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[P_CHEWY].HotX;
+						_G(spieler_mi)[P_CHEWY].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[P_CHEWY].HotY;
+						_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[P_CHEWY].XyzStart, _G(spieler_mi)[P_CHEWY].Vorschub, &_G(spieler_vector)[P_CHEWY]);
+						get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
+						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 						_G(auto_p_nr) = P_CHEWY;
 					}
 				}
@@ -609,21 +609,21 @@ void set_up_screen(SetupScreenMode mode) {
 
 		if (_G(fx_blend)) {
 			int16 idx = _G(ged)->ged_idx(
-				spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-				spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+				_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
+				_G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 				_G(room)->_gedXAnz[room_blk.AkAblage],
 				_G(ged_mem)[room_blk.AkAblage]);
 			check_shad(idx, 0);
 		} else {
 			for (i = 0; i < MAX_PERSON; i++) {
-				mov_objekt(&spieler_vector[i], &spieler_mi[i]);
-				spieler_mi[i].XyzStart[0] = spieler_vector[i].Xypos[0];
-				spieler_mi[i].XyzStart[1] = spieler_vector[i].Xypos[1];
+				mov_objekt(&_G(spieler_vector)[i], &_G(spieler_mi)[i]);
+				_G(spieler_mi)[i].XyzStart[0] = _G(spieler_vector)[i].Xypos[0];
+				_G(spieler_mi)[i].XyzStart[1] = _G(spieler_vector)[i].Xypos[1];
 			}
 		}
 
 		for (i = 0; i < _G(auto_obj) && !flags.StopAutoObj; i++)
-			mov_objekt(&auto_mov_vector[i], &auto_mov_obj[i]);
+			mov_objekt(&_G(auto_mov_vector)[i], &_G(auto_mov_obj)[i]);
 
 		nr = _G(obj)->is_iib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
 		if (nr != -1) {
@@ -660,8 +660,8 @@ void set_up_screen(SetupScreenMode mode) {
 	}
 
 	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	_G(atds)->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
-	                spieler_vector[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(atds)->print_ats(_G(spieler_vector)[P_CHEWY].Xypos[0] + CH_HOT_X,
+	                _G(spieler_vector)[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(maus_links_click) = false;
 	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
@@ -700,8 +700,8 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(cur_hide_flag) = false;
 	ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
 	if (!_G(menu_display))
-		calc_scroll(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-		            spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+		calc_scroll(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
+		            _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 		            ScrXy[0], ScrXy[1],
 		            &_G(spieler).scrollx, &_G(spieler).scrolly);
 
@@ -771,7 +771,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 						_G(spieler).inv_cur = false;
 						_G(menu_item) = CUR_WALK;
 						cursor_wahl(_G(menu_item));
-						spieler_vector[P_CHEWY].DelayCount = 0;
+						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 
 						if (_G(spieler).AkInvent != -1)
 							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
@@ -1241,11 +1241,11 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			tmp = _G(maus_links_click);
 			_G(maus_links_click) = false;
 			gpkt.Dx = _G(Rdi)->AutoMov[mov_nr].X -
-			          spieler_mi[p_nr].HotMovX + spieler_mi[p_nr].HotX;
+			          _G(spieler_mi)[p_nr].HotMovX + _G(spieler_mi)[p_nr].HotX;
 			gpkt.Dy = _G(Rdi)->AutoMov[mov_nr].Y -
-			          spieler_mi[p_nr].HotMovY + spieler_mi[p_nr].HotY;
-			gpkt.Sx = spieler_vector[p_nr].Xypos[0] + spieler_mi[p_nr].HotX;
-			gpkt.Sy = spieler_vector[p_nr].Xypos[1] + spieler_mi[p_nr].HotY;
+			          _G(spieler_mi)[p_nr].HotMovY + _G(spieler_mi)[p_nr].HotY;
+			gpkt.Sx = _G(spieler_vector)[p_nr].Xypos[0] + _G(spieler_mi)[p_nr].HotX;
+			gpkt.Sy = _G(spieler_vector)[p_nr].Xypos[1] + _G(spieler_mi)[p_nr].HotY;
 			gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
 			gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
 			gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
@@ -1253,14 +1253,14 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			gpkt.AkMovEbene = _G(ged_mov_ebene);
 			_G(mov)->goto_xy(&gpkt);
 
-			spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
-			spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
-			spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
-			spieler_mi[p_nr].XyzEnd[1] = gpkt.Dy - spieler_mi[p_nr].HotY;
-			_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
-				spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
-			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
-			spieler_vector[p_nr].DelayCount = 0;
+			_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
+			_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
+			_G(spieler_mi)[p_nr].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[p_nr].HotX;
+			_G(spieler_mi)[p_nr].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[p_nr].HotY;
+			_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart,
+				_G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
+			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
+			_G(spieler_vector)[p_nr].DelayCount = 0;
 
 			if (_G(mov)->auto_go_status()) {
 				while (_G(mov)->auto_go_status()) {
@@ -1278,25 +1278,25 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			}
 			if (flags.ChAutoMov) {
 				ende = 0;
-				spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
-				spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
-				spieler_mi[p_nr].XyzEnd[0] = gpkt.Dx - spieler_mi[p_nr].HotX;
-				spieler_mi[p_nr].XyzEnd[1] = gpkt.Dy - spieler_mi[p_nr].HotY;
-				_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
-				get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
+				_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
+				_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
+				_G(spieler_mi)[p_nr].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[p_nr].HotX;
+				_G(spieler_mi)[p_nr].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[p_nr].HotY;
+				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart, _G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
+				get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
 				while (!ende) {
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
 						if (flags.ExitMov || flags.BreakAMov) {
-							spieler_vector[p_nr].Count = 0;
+							_G(spieler_vector)[p_nr].Count = 0;
 							move_status = false;
 						}
 					}
-					if (!spieler_vector[p_nr].Count) {
+					if (!_G(spieler_vector)[p_nr].Count) {
 						if (move_status) {
 							if (flags.ExitMov == false && flags.ChAutoMov) {
 
-								set_person_pos(spieler_mi[p_nr].XyzEnd[0],
-								               spieler_mi[p_nr].XyzEnd[1],
+								set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
+								               _G(spieler_mi)[p_nr].XyzEnd[1],
 								               p_nr, _G(Rdi)->AutoMov[mov_nr].SprNr);
 							}
 						}
@@ -1327,27 +1327,27 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		_G(maus_links_click) = false;
 		ende = 0;
 
-		spieler_mi[p_nr].XyzStart[0] = spieler_vector[p_nr].Xypos[0];
-		spieler_mi[p_nr].XyzStart[1] = spieler_vector[p_nr].Xypos[1];
-		spieler_mi[p_nr].XyzEnd[0] = x;
-		spieler_mi[p_nr].XyzEnd[1] = y;
-		_G(mov)->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart,
-			spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
+		_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
+		_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
+		_G(spieler_mi)[p_nr].XyzEnd[0] = x;
+		_G(spieler_mi)[p_nr].XyzEnd[1] = y;
+		_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart,
+			_G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
 
-		if (spieler_vector[p_nr].Count)
-			get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
+		if (_G(spieler_vector)[p_nr].Count)
+			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
 		if (mode == ANI_WAIT) {
 			while (!ende) {
 				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 					if (flags.ExitMov || flags.BreakAMov) {
-						spieler_vector[p_nr].Count = 0;
+						_G(spieler_vector)[p_nr].Count = 0;
 						move_status = false;
 					}
 				}
-				if (!spieler_vector[p_nr].Count) {
+				if (!_G(spieler_vector)[p_nr].Count) {
 					if (move_status) {
-						set_person_pos(spieler_mi[p_nr].XyzEnd[0],
-						               spieler_mi[p_nr].XyzEnd[1], p_nr, -1);
+						set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
+						               _G(spieler_mi)[p_nr].XyzEnd[1], p_nr, -1);
 					}
 					ende = 1;
 				}
@@ -1437,7 +1437,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					action_ret = 0;
 					if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
-							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
+							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
 								set_person_spr(P_LEFT, P_CHEWY);
@@ -1473,7 +1473,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					if (ok && !action_ret && txt_mode == TXT_MARK_USE && disp_flag) {
 						if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							if (_G(menu_item) != CUR_WALK) {
-								if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
+								if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
 								else
 									set_person_spr(P_LEFT, P_CHEWY);
@@ -1519,7 +1519,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 	if (flags.ShowAtsInvTxt) {
 
 		for (i = 0; i < MAX_PERSON && is_person == -1; i++) {
-			if (spieler_mi[i].Id == NO_MOV_OBJ)
+			if (_G(spieler_mi)[i].Id == NO_MOV_OBJ)
 				check = false;
 			else {
 				check = true;;
@@ -1527,7 +1527,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 					switch (i) {
 					case P_CHEWY:
 						xy = (int16
-						      *)_G(chewy)->image[_G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr]];
+						      *)_G(chewy)->image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
@@ -1535,17 +1535,17 @@ int16 is_mouse_person(int16 x, int16 y) {
 						if (_G(spieler).PersonRoomNr[i] !=
 						        _G(spieler).PersonRoomNr[P_CHEWY])
 							check = false;
-						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][spieler_vector[i].PhNr]];
+						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
 
 					}
 				} else
-					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[spieler_vector[i].PhNr]];
+					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
 				if (check) {
-					if (x + _G(spieler).scrollx >= spieler_vector[i].Xypos[0] &&
-					        x + _G(spieler).scrollx <= spieler_vector[i].Xypos[0] + xy[0] + spieler_vector[i].Xzoom &&
-					        y + _G(spieler).scrolly >= spieler_vector[i].Xypos[1] &&
-					        y + _G(spieler).scrolly <= spieler_vector[i].Xypos[1] + xy[1] + spieler_vector[i].Yzoom) {
+					if (x + _G(spieler).scrollx >= _G(spieler_vector)[i].Xypos[0] &&
+					        x + _G(spieler).scrollx <= _G(spieler_vector)[i].Xypos[0] + xy[0] + _G(spieler_vector)[i].Xzoom &&
+					        y + _G(spieler).scrolly >= _G(spieler_vector)[i].Xypos[1] &&
+					        y + _G(spieler).scrolly <= _G(spieler_vector)[i].Xypos[1] + xy[1] + _G(spieler_vector)[i].Yzoom) {
 						is_person = i;
 					}
 				}
@@ -1640,7 +1640,7 @@ void calc_mouse_person(int16 x, int16 y) {
 						if (dia_nr == -1) {
 							if (txt_nr != 30000) {
 								if (_G(menu_item) != CUR_WALK) {
-									if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
+									if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 										set_person_spr(P_RIGHT, P_CHEWY);
 									else
 										set_person_spr(P_LEFT, P_CHEWY);
@@ -1651,7 +1651,7 @@ void calc_mouse_person(int16 x, int16 y) {
 						}
 					} else {
 						if (_G(menu_item) != CUR_WALK) {
-							if (x + _G(spieler).scrollx > spieler_vector[P_CHEWY].Xypos[0])
+							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
 							else
 								set_person_spr(P_LEFT, P_CHEWY);
@@ -1674,7 +1674,7 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 	for (i = 0; i < _G(auto_obj) && !ok; i++) {
 		if (mouse_auto_obj(i, 0, 0)) {
 			ok = 1;
-			txt_nr = mov_phasen[i].AtsText;
+			txt_nr = _G(mov_phasen)[i].AtsText;
 			*auto_nr = i;
 		}
 	}
@@ -1686,7 +1686,7 @@ void calc_ani_timer() {
 	int16 i;
 	for (i = _G(room)->_roomTimer.TimerStart;
 	        i < _G(room)->_roomTimer.TimerStart + _G(room)->_roomTimer.TimerAnz; i++) {
-		if (ani_timer[i].TimeFlag)
+		if (_G(ani_timer)[i].TimeFlag)
 			timer_action(i);
 	}
 }
@@ -1735,8 +1735,8 @@ void get_user_key(int16 mode) {
 void clear_prog_ani() {
 	int16 i;
 	for (i = 0; i < MAX_PROG_ANI; i++) {
-		spr_info[i].Image = nullptr;
-		spr_info[i].ZEbene = 255;
+		_G(spr_info)[i].Image = nullptr;
+		_G(spr_info)[i].ZEbene = 255;
 	}
 }
 
@@ -1826,26 +1826,26 @@ void calc_ausgang(int16 x, int16 y) {
 				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
 				_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 				set_person_pos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
-				               spieler_mi[_G(auto_p_nr)].HotMovX,
-				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - spieler_mi[_G(auto_p_nr)].HotMovY
+				               _G(spieler_mi)[_G(auto_p_nr)].HotMovX,
+				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - _G(spieler_mi)[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
 				ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
-				get_scroll_off(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-				               spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+				get_scroll_off(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
+				               _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 				               ScrXy[0], ScrXy[1],
 				               &_G(spieler).scrollx, &_G(spieler).scrolly);
 
-				u_idx = _G(ged)->ged_idx(spieler_vector[P_CHEWY].Xypos[0] + spieler_mi[P_CHEWY].HotX,
-				                      spieler_vector[P_CHEWY].Xypos[1] + spieler_mi[P_CHEWY].HotY,
+				u_idx = _G(ged)->ged_idx(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
+				                      _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 				                      _G(room)->_gedXAnz[room_blk.AkAblage],
 				                      _G(ged_mem)[room_blk.AkAblage]);
 				check_shad(u_idx, 0);
 				set_person_spr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
-				spieler_vector[P_CHEWY].DelayCount = 0;
+				_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 				_G(fx_blend) = BLEND1;
 				_G(auto_obj) = 0;
-				spieler_vector[P_CHEWY].Xzoom = 0;
-				spieler_vector[P_CHEWY].Yzoom = 0;
+				_G(spieler_vector)[P_CHEWY].Xzoom = 0;
+				_G(spieler_vector)[P_CHEWY].Yzoom = 0;
 				flags.ShowAtsInvTxt = true;
 				_G(menu_item) = CUR_WALK;
 				cursor_wahl(_G(menu_item));
@@ -1967,22 +1967,22 @@ void calc_auto_go() {
 	int16 x_offset;
 	int16 y_offset;
 	x_offset =
-	    spieler_mi[_G(auto_p_nr)].HotMovX + (spieler_mi[_G(auto_p_nr)].HotX - spieler_mi[_G(auto_p_nr)].HotMovX - 1);
+	    _G(spieler_mi)[_G(auto_p_nr)].HotMovX + (_G(spieler_mi)[_G(auto_p_nr)].HotX - _G(spieler_mi)[_G(auto_p_nr)].HotMovX - 1);
 	y_offset =
-	    spieler_mi[_G(auto_p_nr)].HotMovY + (spieler_mi[_G(auto_p_nr)].HotY - spieler_mi[_G(auto_p_nr)].HotMovY - 2);
-	if (_G(mov)->calc_auto_go(spieler_mi[_G(auto_p_nr)].XyzStart[0] + x_offset,
-	                       spieler_mi[_G(auto_p_nr)].XyzStart[1] + y_offset,
-	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[0],
-	                       &spieler_mi[_G(auto_p_nr)].XyzEnd[1]) != -1)
+	    _G(spieler_mi)[_G(auto_p_nr)].HotMovY + (_G(spieler_mi)[_G(auto_p_nr)].HotY - _G(spieler_mi)[_G(auto_p_nr)].HotMovY - 2);
+	if (_G(mov)->calc_auto_go(_G(spieler_mi)[_G(auto_p_nr)].XyzStart[0] + x_offset,
+	                       _G(spieler_mi)[_G(auto_p_nr)].XyzStart[1] + y_offset,
+	                       &_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[0],
+	                       &_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[1]) != -1)
 	{
-		spieler_mi[_G(auto_p_nr)].XyzStart[0] = spieler_vector[_G(auto_p_nr)].Xypos[0];
-		spieler_mi[_G(auto_p_nr)].XyzStart[1] = spieler_vector[_G(auto_p_nr)].Xypos[1];
-		spieler_mi[_G(auto_p_nr)].XyzEnd[0] -= x_offset;
-		spieler_mi[_G(auto_p_nr)].XyzEnd[1] -= y_offset;
+		_G(spieler_mi)[_G(auto_p_nr)].XyzStart[0] = _G(spieler_vector)[_G(auto_p_nr)].Xypos[0];
+		_G(spieler_mi)[_G(auto_p_nr)].XyzStart[1] = _G(spieler_vector)[_G(auto_p_nr)].Xypos[1];
+		_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[0] -= x_offset;
+		_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[1] -= y_offset;
 		_G(mov)->get_mov_vector((int16
-		                     *)spieler_mi[_G(auto_p_nr)].XyzStart, spieler_mi[_G(auto_p_nr)].Vorschub, &spieler_vector[_G(auto_p_nr)])
+		                     *)_G(spieler_mi)[_G(auto_p_nr)].XyzStart, _G(spieler_mi)[_G(auto_p_nr)].Vorschub, &_G(spieler_vector)[_G(auto_p_nr)])
 		;
-		get_phase(&spieler_vector[_G(auto_p_nr)], &spieler_mi[_G(auto_p_nr)]);
+		get_phase(&_G(spieler_vector)[_G(auto_p_nr)], &_G(spieler_mi)[_G(auto_p_nr)]);
 	}
 }
 
@@ -2030,7 +2030,7 @@ int16 is_chewy_busy() {
 		if (_G(atds)->aad_get_status() == -1) {
 			if (_G(atds)->ads_get_status() == -1) {
 				if (!_G(mov)->auto_go_status()) {
-					if (!spieler_vector[P_CHEWY].Count) {
+					if (!_G(spieler_vector)[P_CHEWY].Count) {
 						if (!flags.ExitMov) {
 							if (!_G(spz_ani)[P_CHEWY]) {
 								ret = false;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 209b27c6acf..3e9d823dc7f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -315,7 +315,7 @@ void enter_room(int16 eib_nr) {
 	_G(zoom_mov_fak) = 1;
 
 	for (i = 0; i < MAX_PERSON; i++) {
-		spieler_mi[i].Vorschub = 8;
+		_G(spieler_mi)[i].Vorschub = 8;
 		_G(spieler).ZoomXy[i][0] = 0;
 		_G(spieler).ZoomXy[i][1] = 0;
 	}
@@ -578,7 +578,7 @@ void exit_room(int16 eib_nr) {
 	case 120:
 	case 139:
 		x = -44;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	case 1:
@@ -600,7 +600,7 @@ void exit_room(int16 eib_nr) {
 	case 135:
 		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
 		x = xy[0] + 30;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	case 10:
@@ -614,7 +614,7 @@ void exit_room(int16 eib_nr) {
 	case 122:
 	case 131:
 		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
-		x = spieler_vector[P_CHEWY].Xypos[0];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 		y = xy[1] + 3;
 		break;
 
@@ -632,8 +632,8 @@ void exit_room(int16 eib_nr) {
 	case 50:
 	case 65:
 	case 126:
-		set_person_pos(spieler_vector[P_CHEWY].Xypos[0],
-		               spieler_vector[P_CHEWY].Xypos[1], P_CHEWY, P_RIGHT);
+		set_person_pos(_G(spieler_vector)[P_CHEWY].Xypos[0],
+		               _G(spieler_vector)[P_CHEWY].Xypos[1], P_CHEWY, P_RIGHT);
 		set_up_screen(DO_SETUP);
 		break;
 
@@ -648,8 +648,8 @@ void exit_room(int16 eib_nr) {
 	case 36:
 	case 71:
 	case 96:
-		set_person_pos(spieler_vector[P_CHEWY].Xypos[0],
-		               spieler_vector[P_CHEWY].Xypos[1], P_CHEWY, P_LEFT);
+		set_person_pos(_G(spieler_vector)[P_CHEWY].Xypos[0],
+		               _G(spieler_vector)[P_CHEWY].Xypos[1], P_CHEWY, P_LEFT);
 		set_up_screen(DO_SETUP);
 		break;
 
@@ -659,8 +659,8 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 72:
-		x = spieler_vector[P_CHEWY].Xypos[0];
-		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0];
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1] - 10;
 		break;
 
 	case 75:
@@ -670,34 +670,34 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 84:
-		x = spieler_vector[P_CHEWY].Xypos[0] - 70;
-		y = spieler_vector[P_CHEWY].Xypos[1] - 50;
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 70;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1] - 50;
 		_G(HowardMov) = 1;
 		break;
 
 	case 85:
-		x = spieler_vector[P_CHEWY].Xypos[0] + 70;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] + 70;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		_G(HowardMov) = 1;
 		break;
 
 	case 86:
 		_G(det)->show_static_spr(0);
-		x = spieler_vector[P_CHEWY].Xypos[0] - 44;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 44;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		_G(HowardMov) = 2;
 		break;
 
 	case 90:
 		_G(det)->show_static_spr(8);
-		x = spieler_vector[P_CHEWY].Xypos[0] - 60;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 60;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	case 94:
 		_G(det)->show_static_spr(3);
-		x = spieler_vector[P_CHEWY].Xypos[0] - 40;
-		y = spieler_vector[P_CHEWY].Xypos[1] - 10;
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 40;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1] - 10;
 		break;
 
 	case 127:
@@ -712,13 +712,13 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 140:
-		x = spieler_vector[P_CHEWY].Xypos[0] + 40;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] + 40;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	case 141:
-		x = spieler_vector[P_CHEWY].Xypos[0] - 12;
-		y = spieler_vector[P_CHEWY].Xypos[1];
+		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 12;
+		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	default:
@@ -726,9 +726,9 @@ void exit_room(int16 eib_nr) {
 	}
 
 	if (x != -1 && y != -1) {
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		go_auto_xy(x, y, P_CHEWY, ANI_WAIT);
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 	}
 
 	if (no_exit) {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index beb6950b4d3..2b8953fdf35 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -123,7 +123,7 @@ void JungleRoom::rightEntry() {
 void JungleRoom::setup_func() {
 	calc_person_look();
 
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 	int howDestX, nicDestX;
 	if (posX < 40) {
@@ -506,7 +506,7 @@ void load_chewy_taf(int16 taf_nr) {
 			free((char *)_G(chewy));
 			_G(chewy) = nullptr;
 		}
-		spieler_mi[P_CHEWY].HotY = CH_HOT_Y;
+		_G(spieler_mi)[P_CHEWY].HotY = CH_HOT_Y;
 
 		const char *fname_;
 		switch (taf_nr) {
@@ -544,7 +544,7 @@ void load_chewy_taf(int16 taf_nr) {
 			fname_ = CHEWY_JMAN_TAF;
 			_G(chewy_ph_anz) = CHEWY_RO_PHASEN_ANZ;
 			_G(chewy_ph) = (const uint8 *)CHEWY_JM_PHASEN;
-			spieler_mi[P_CHEWY].HotY = 68;
+			_G(spieler_mi)[P_CHEWY].HotY = 68;
 			break;
 
 		case CHEWY_ANI7:
@@ -578,12 +578,12 @@ void switch_room(int16 nr) {
 
 void calc_person_look() {
 	for (int16 i = 1; i < MAX_PERSON; i++) {
-		if (spieler_mi[i].Id != NO_MOV_OBJ) {
+		if (_G(spieler_mi)[i].Id != NO_MOV_OBJ) {
 
-			if (spieler_vector[i].Xypos[0] > spieler_vector[P_CHEWY].Xypos[0])
-				person_end_phase[i] = P_LEFT;
+			if (_G(spieler_vector)[i].Xypos[0] > _G(spieler_vector)[P_CHEWY].Xypos[0])
+				_G(person_end_phase)[i] = P_LEFT;
 			else
-				person_end_phase[i] = P_RIGHT;
+				_G(person_end_phase)[i] = P_RIGHT;
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index d98163be569..5c60fa0d82f 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -62,7 +62,7 @@ void Room0::entry() {
 		hide_cur();
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 3);
 
-		while (!ani_timer[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
+		while (!_G(ani_timer)[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 
@@ -219,19 +219,19 @@ void Room0::eyeStart(EyeMode mode) {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
 		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
-			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
+			_G(spr_info)[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 38) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		}
 
-		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
+		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[3].ZEbene = 193;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		SHOULD_QUIT_RETURN;
@@ -275,12 +275,12 @@ void Room0::eyeWait() {
 	while (adi->ani_count < 46) {
 		clear_prog_ani();
 
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[2].ZEbene = 192;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[2].ZEbene = 192;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
@@ -344,17 +344,17 @@ void Room0::eyeShoot() {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
 
 		if (adi->ani_count < 53) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		} else {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 			if (!_G(det)->get_ani_status(CH_BLITZ))
 				ende = true;
 		}
@@ -372,12 +372,12 @@ void Room0::eyeShoot() {
 
 	_G(det)->start_detail(STERNE_STEHEN, 255, VOR);
 	clear_prog_ani();
-	spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-	spr_info[0].ZEbene = 190;
-	spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-	spr_info[1].ZEbene = 191;
-	spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-	spr_info[2].ZEbene = 192;
+	_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+	_G(spr_info)[0].ZEbene = 190;
+	_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+	_G(spr_info)[1].ZEbene = 191;
+	_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+	_G(spr_info)[2].ZEbene = 192;
 
 	wait_show_screen(30);
 	clear_prog_ani();
@@ -397,20 +397,20 @@ void Room0::eyeSlimeBack() {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
 
 		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
-			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+			_G(spr_info)[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 61) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		}
 
-		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
+		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[3].ZEbene = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -440,14 +440,14 @@ void Room0::checkSlimeEye() {
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
-		spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-		spr_info[2].ZEbene = 192;
-		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
+		_G(spr_info)[2].ZEbene = 192;
+		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[3].ZEbene = 193;
 		set_up_screen(DO_SETUP);
 
 		if (adi->delay_count > 0)
@@ -495,10 +495,10 @@ void Room0::feederStart(int16 mode) {
 
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
 
 		if (flags.AniUserAction)
 			get_user_key(NO_SETUP);
@@ -541,10 +541,10 @@ void Room0::feederStart(int16 mode) {
 void Room0::feederExtend() {
 	for (int16 i = 0; i < 30 && !_G(spieler).R0PillowThrow; i++) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
 		get_user_key(NO_SETUP);
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
@@ -598,28 +598,28 @@ void Room0::checkFeed() {
 		flags.AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
 		if (adi->ani_count == 136) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			if (!_G(spieler).R0SlimeUsed)
 				_G(det)->stop_detail(16);
 		}
 		if (adi->ani_count > 138) {
-			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			_G(spr_info)[1].ZEbene = 191;
 		}
 		if (adi->ani_count > 141) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		}
 		if (adi->ani_count == 138) {
-			spr_info[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			spr_info[3].ZEbene = 193;
+			_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			_G(spr_info)[3].ZEbene = 193;
 		}
 
-		spr_info[4] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[4].ZEbene = 194;
+		_G(spr_info)[4] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[4].ZEbene = 194;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -641,20 +641,20 @@ void Room0::checkFeed() {
 	_G(det)->start_detail(CH_NACH_FUETTERN, 2, VOR);
 	while (!ende) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
 
 		if (adi->ani_count > 138) {
-			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			spr_info[1].ZEbene = 191;
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+			_G(spr_info)[1].ZEbene = 191;
 		}
 		if (adi->ani_count == 138) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		}
 
-		spr_info[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		spr_info[3].ZEbene = 193;
+		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+		_G(spr_info)[3].ZEbene = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -694,13 +694,13 @@ void Room0::checkPillow() {
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-		spr_info[1].ZEbene = 191;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 191;
 		if (mode) {
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-			spr_info[2].ZEbene = 192;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 192;
 		}
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
@@ -731,8 +731,8 @@ void Room0::trapDoorOpen() {
 	flags.AniUserAction = true;
 	for (i = 0; i < 25; i++) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		spr_info[0].ZEbene = 190;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 190;
 
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -773,7 +773,7 @@ void Room0::feederAni() {
 			_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			set_person_pos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
 			               _G(Rdi)->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
-			spieler_vector[P_CHEWY].DelayCount = 0;
+			_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 
 			check_shad(4, 0);
 			_G(fx_blend) = BLEND1;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index f3a94752565..7a744ee0b2a 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -96,10 +96,10 @@ void Room3::terminal() {
 	switch (Room4::sonde_comp()) {
 	case 0:
 		probeTransfer();
-		spr_info[0].Image = room_blk.DetImage[120];
-		spr_info[0].X = 250;
-		spr_info[0].Y = 2;
-		spr_info[0].ZEbene = 0;
+		_G(spr_info)[0].Image = room_blk.DetImage[120];
+		_G(spr_info)[0].X = 250;
+		_G(spr_info)[0].Y = 2;
+		_G(spr_info)[0].ZEbene = 0;
 
 		if (!_G(spieler).R2ElectrocutedBork) {
 			_G(det)->stop_detail(5);
@@ -159,14 +159,14 @@ void Room3::init_sonde() {
 #define SONDE_OBJ 0
 #define SONDE_OBJ1 1
 	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].AtsText = 24;
-	mov_phasen[SONDE_OBJ].Lines = 3;
-	mov_phasen[SONDE_OBJ].Repeat = 255;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT);
+	_G(mov_phasen)[SONDE_OBJ].AtsText = 24;
+	_G(mov_phasen)[SONDE_OBJ].Lines = 3;
+	_G(mov_phasen)[SONDE_OBJ].Repeat = 255;
+	_G(mov_phasen)[SONDE_OBJ].ZoomFak = 20;
+	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT);
 }
 
 void Room3::sonde_knarre() {
@@ -186,15 +186,15 @@ void Room3::sonde_knarre() {
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].Lines = 3;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt1);
+	_G(mov_phasen)[SONDE_OBJ].Lines = 3;
+	_G(mov_phasen)[SONDE_OBJ].Repeat = 1;
+	_G(mov_phasen)[SONDE_OBJ].ZoomFak = 20;
+	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt1);
 	flags.AniUserAction = false;
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
 	_G(det)->start_detail(SONDE_SHOOT, 1, ANI_VOR);
@@ -205,17 +205,17 @@ void Room3::sonde_knarre() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(det)->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
 		}
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 0;
 		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 &&
 			rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
-			spr_info[1] = _G(det)->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
-			spr_info[1].ZEbene = 190;
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
+			_G(spr_info)[1].ZEbene = 190;
 		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 &&
 			_G(det)->get_ani_status(SONDE_RET) == 0) {
 
-			spr_info[2] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-			spr_info[2].ZEbene = 190;
+			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+			_G(spr_info)[2].ZEbene = 190;
 		}
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178) {
 			_G(det)->start_detail(SONDE_RET, 3, ANI_RUECK);
@@ -232,11 +232,11 @@ void Room3::sonde_knarre() {
 	ende = 0;
 	while (_G(det)->get_ani_status(SONDE_RAUCH)) {
 
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 0;
 
-		spr_info[1] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-		spr_info[1].ZEbene = 190;
+		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
+		_G(spr_info)[1].ZEbene = 190;
 		++ende;
 		if (ende == 3)
 			_G(spieler).PersonHide[P_CHEWY] = false;
@@ -248,17 +248,17 @@ void Room3::sonde_knarre() {
 	_G(det)->start_detail(SONDE_REIN, 1, ANI_RUECK);
 	while (_G(det)->get_ani_status(SONDE_REIN)) {
 
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		spr_info[0].ZEbene = 0;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 0;
 		set_ani_screen();
 	}
 	clear_prog_ani();
 
-	mov_phasen[SONDE_OBJ].Lines = 2;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 28;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt2);
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+	_G(mov_phasen)[SONDE_OBJ].Lines = 2;
+	_G(mov_phasen)[SONDE_OBJ].Repeat = 1;
+	_G(mov_phasen)[SONDE_OBJ].ZoomFak = 28;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt2);
+	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 	_G(det)->del_taf_tbl(162, 17, 0);
 	_G(zoom_horizont) = tmp;
@@ -293,21 +293,21 @@ void Room3::probeTransfer() {
 	_G(zoom_horizont) = 100;
 	int16 anistart = false;
 	_G(auto_obj) = 1;
-	mov_phasen[SONDE_OBJ].Lines = 2;
-	mov_phasen[SONDE_OBJ].Repeat = 1;
-	mov_phasen[SONDE_OBJ].ZoomFak = 20;
-	auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT1);
-	while (mov_phasen[SONDE_OBJ].Repeat != -1)
+	_G(mov_phasen)[SONDE_OBJ].Lines = 2;
+	_G(mov_phasen)[SONDE_OBJ].Repeat = 1;
+	_G(mov_phasen)[SONDE_OBJ].ZoomFak = 20;
+	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT1);
+	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
 	_G(det)->start_detail(SONDE_GREIF, 1, ANI_VOR);
 	while (_G(det)->get_ani_status(SONDE_GREIF)) {
 		clear_prog_ani();
-		spr_info[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
-		spr_info[0].ZEbene = 146;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
+		_G(spr_info)[0].ZEbene = 146;
 		set_ani_screen();
 
 		SHOULD_QUIT_RETURN;
@@ -318,23 +318,23 @@ void Room3::probeTransfer() {
 
 	int16 spr_nr = 140;
 	for (int16 i = 0; i < 4 && !SHOULD_QUIT; i++) {
-		mov_phasen[SONDE_OBJ].Lines = 2;
-		mov_phasen[SONDE_OBJ].Repeat = 1;
-		mov_phasen[SONDE_OBJ].ZoomFak = 0;
-		auto_mov_obj[SONDE_OBJ].Id = AUTO_OBJ0;
-		auto_mov_obj[SONDE_OBJ].Mode = true;
-		auto_mov_vector[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ].Lines, SONDE_MPKT_[i]);
-		mov_phasen[SONDE_OBJ1].Lines = 2;
-		mov_phasen[SONDE_OBJ1].Repeat = 1;
-		mov_phasen[SONDE_OBJ1].ZoomFak = 0;
-		auto_mov_obj[SONDE_OBJ1].Id = AUTO_OBJ1;
-		auto_mov_obj[SONDE_OBJ1].Mode = true;
-		auto_mov_vector[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], mov_phasen[SONDE_OBJ1].Lines, SONDE_MPKT_[i]);
-		mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
-		mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
-		while (mov_phasen[SONDE_OBJ].Repeat != -1) {
+		_G(mov_phasen)[SONDE_OBJ].Lines = 2;
+		_G(mov_phasen)[SONDE_OBJ].Repeat = 1;
+		_G(mov_phasen)[SONDE_OBJ].ZoomFak = 0;
+		_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
+		_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
+		_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
+		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, SONDE_MPKT_[i]);
+		_G(mov_phasen)[SONDE_OBJ1].Lines = 2;
+		_G(mov_phasen)[SONDE_OBJ1].Repeat = 1;
+		_G(mov_phasen)[SONDE_OBJ1].ZoomFak = 0;
+		_G(auto_mov_obj)[SONDE_OBJ1].Id = AUTO_OBJ1;
+		_G(auto_mov_obj)[SONDE_OBJ1].Mode = true;
+		_G(auto_mov_vector)[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
+		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ1].Lines, SONDE_MPKT_[i]);
+		_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = spr_nr;
+		_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = spr_nr;
+		while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1) {
 			SHOULD_QUIT_RETURN;
 
 			if (i == 2 || i == 1) {
@@ -351,9 +351,9 @@ void Room3::probeTransfer() {
 								start_aad(44);
 							del_inventar(_G(spieler).AkInvent);
 							_G(spieler).R2FussSchleim = 1;
-							mov_phasen[SONDE_OBJ1].Phase[0][0] = 142;
-							mov_phasen[SONDE_OBJ1].Phase[0][1] = 149;
-							auto_mov_vector[SONDE_OBJ1].PhAnz = 8;
+							_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = 142;
+							_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = 149;
+							_G(auto_mov_vector)[SONDE_OBJ1].PhAnz = 8;
 							anistart = true;
 						}
 					}
@@ -362,13 +362,13 @@ void Room3::probeTransfer() {
 			set_ani_screen();
 
 			if (anistart) {
-				if (auto_mov_vector[SONDE_OBJ1].PhNr == 7) {
+				if (_G(auto_mov_vector)[SONDE_OBJ1].PhNr == 7) {
 					anistart = false;
 					spr_nr = 149;
-					mov_phasen[SONDE_OBJ1].Phase[0][0] = spr_nr;
-					mov_phasen[SONDE_OBJ1].Phase[0][1] = spr_nr;
-					auto_mov_vector[SONDE_OBJ1].PhAnz = 1;
-					auto_mov_vector[SONDE_OBJ1].PhNr = 0;
+					_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = spr_nr;
+					_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = spr_nr;
+					_G(auto_mov_vector)[SONDE_OBJ1].PhAnz = 1;
+					_G(auto_mov_vector)[SONDE_OBJ1].PhNr = 0;
 				}
 			}
 		}
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 7a2688bd20c..fa5db78007a 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -89,10 +89,10 @@ int16 Room4::sonde_comp() {
 			}
 		}
 
-		spr_info[0].Image = room_blk.DetImage[spr_nr];
-		spr_info[0].ZEbene = 0;
-		spr_info[0].X = CUR_POS[cur_x][0];
-		spr_info[0].Y = CUR_POS[cur_x][1];
+		_G(spr_info)[0].Image = room_blk.DetImage[spr_nr];
+		_G(spr_info)[0].ZEbene = 0;
+		_G(spr_info)[0].X = CUR_POS[cur_x][0];
+		_G(spr_info)[0].Y = CUR_POS[cur_x][1];
 
 		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
 			curani.ani_anf = HAND_CLICK;
@@ -118,7 +118,7 @@ int16 Room4::sonde_comp() {
 	_G(menu_item) = CUR_WALK;
 	cursor_wahl(_G(menu_item));
 
-	spieler_vector[P_CHEWY].DelayCount = 0;
+	_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
 	minfo.button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 46e6ae58a40..0b893467766 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -81,13 +81,13 @@ void Room6::entry() {
 void Room6::init_robo() {
 #define ROBO_OBJ 0
 	_G(auto_obj) = 1;
-	mov_phasen[ROBO_OBJ].AtsText = 44;
-	mov_phasen[ROBO_OBJ].Lines = 3;
-	mov_phasen[ROBO_OBJ].Repeat = 1;
-	mov_phasen[ROBO_OBJ].ZoomFak = 0;
-	auto_mov_obj[ROBO_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[ROBO_OBJ].Mode = true;
+	_G(mov_phasen)[ROBO_OBJ].AtsText = 44;
+	_G(mov_phasen)[ROBO_OBJ].Lines = 3;
+	_G(mov_phasen)[ROBO_OBJ].Repeat = 1;
+	_G(mov_phasen)[ROBO_OBJ].ZoomFak = 0;
+	_G(auto_mov_obj)[ROBO_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[ROBO_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[ROBO_OBJ].Mode = true;
 	init_auto_obj(ROBO_OBJ, &ROBO_PHASEN[0][0], 3, (const MovLine *)ROBO_MPKT);
 }
 
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 7a6a6ceb579..1df8011518c 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -74,7 +74,7 @@ void Room9::gtuer() {
 void Room9::surimy() {
 	hide_cur();
 	_G(spieler).R9Surimy = true;
-	const int16 tmp = spieler_vector[P_CHEWY].Count;
+	const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 	stop_person(P_CHEWY);
 	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(det)->hide_static_spr(4);
@@ -83,8 +83,8 @@ void Room9::surimy() {
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
 	start_aad_wait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
-	spieler_vector[P_CHEWY].Count = tmp;
-	get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+	_G(spieler_vector)[P_CHEWY].Count = tmp;
+	get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 	_G(mov)->continue_auto_go();
 	show_cur();
 }
@@ -92,13 +92,13 @@ void Room9::surimy() {
 void Room9::surimy_ani() {
 	_G(det)->load_taf_seq(91, 8, nullptr);
 	_G(auto_obj) = 1;
-	mov_phasen[SURIMY_OBJ].AtsText = 0;
-	mov_phasen[SURIMY_OBJ].Lines = 2;
-	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-	auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SURIMY_OBJ].Mode = true;
+	_G(mov_phasen)[SURIMY_OBJ].AtsText = 0;
+	_G(mov_phasen)[SURIMY_OBJ].Lines = 2;
+	_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+	_G(mov_phasen)[SURIMY_OBJ].ZoomFak = 0;
+	_G(auto_mov_obj)[SURIMY_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
 	start_detail_frame(0, 1, ANI_VOR, 15);
@@ -107,8 +107,8 @@ void Room9::surimy_ani() {
 	start_detail_wait(1, 1, ANI_VOR);
 	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
 	_G(det)->hide_static_spr(4);
-	mov_phasen[SURIMY_OBJ].Repeat = 1;
-	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
+	_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
 	_G(det)->del_taf_tbl(91, 8, nullptr);
 }
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 5a077f9abb4..5c651440d0d 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -115,20 +115,20 @@ void Room12::init_bork() {
 
 		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
 			_G(auto_obj) = 1;
-			mov_phasen[R12_BORK_OBJ].AtsText = 120;
-			mov_phasen[R12_BORK_OBJ].Lines = 5;
-			mov_phasen[R12_BORK_OBJ].Repeat = 1;
-			mov_phasen[R12_BORK_OBJ].ZoomFak = (int16)_G(room)->_roomInfo->ZoomFak + 20;
-			auto_mov_obj[R12_BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[R12_BORK_OBJ].Mode = true;
+			_G(mov_phasen)[R12_BORK_OBJ].AtsText = 120;
+			_G(mov_phasen)[R12_BORK_OBJ].Lines = 5;
+			_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
+			_G(mov_phasen)[R12_BORK_OBJ].ZoomFak = (int16)_G(room)->_roomInfo->ZoomFak + 20;
+			_G(auto_mov_obj)[R12_BORK_OBJ].Id = AUTO_OBJ0;
+			_G(auto_mov_vector)[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+			_G(auto_mov_obj)[R12_BORK_OBJ].Mode = true;
 			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 5, (const MovLine *)R12_BORK_MPKT);
 
 			if (!_G(spieler).R12TalismanOk) {
 				hide_cur();
-				auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
+				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
 				auto_move(5, P_CHEWY);
-				auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
+				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
 
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
@@ -158,13 +158,13 @@ void Room12::talk_bork() {
 void Room12::bork_ok() {
 	hide_cur();
 	flags.MausLinks = true;
-	auto_mov_vector[R12_BORK_OBJ].DelayCount = 1000;
+	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
 	auto_move(5, P_CHEWY);
-	auto_mov_vector[R12_BORK_OBJ].DelayCount = 0;
+	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
 	_G(spieler).R12BorkTalk = true;
 
-	mov_phasen[R12_BORK_OBJ].Repeat = 1;
-	mov_phasen[R12_BORK_OBJ].Lines = 2;
+	_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
+	_G(mov_phasen)[R12_BORK_OBJ].Lines = 2;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 2, (const MovLine *)R12_BORK_MPKT1);
 	wait_auto_obj(R12_BORK_OBJ);
 
@@ -174,8 +174,8 @@ void Room12::bork_ok() {
 	start_aad_wait(57, -1);
 	_G(det)->stop_detail(3);
 
-	mov_phasen[R12_BORK_OBJ].Repeat = 1;
-	mov_phasen[R12_BORK_OBJ].Lines = 3;
+	_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
+	_G(mov_phasen)[R12_BORK_OBJ].Lines = 3;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
 	_G(det)->hide_static_spr(10);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index a2bdd093eeb..abbc2dc2b2d 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -102,8 +102,8 @@ void Room13::talk_bork() {
 		_G(spieler).R13BorkOk = true;
 		_G(spieler).R12ChewyBork = false;
 		_G(det)->show_static_spr(13);
-		_G(det)->set_detail_pos(10, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
-		_G(det)->set_static_pos(12, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1], false, true);
+		_G(det)->set_detail_pos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
+		_G(det)->set_static_pos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		_G(det)->stop_detail(9);
@@ -112,13 +112,13 @@ void Room13::talk_bork() {
 		_G(det)->hide_static_spr(12);
 		_G(auto_obj) = 1;
 
-		mov_phasen[R13_BORK_OBJ].AtsText = 122;
-		mov_phasen[R13_BORK_OBJ].Lines = 3;
-		mov_phasen[R13_BORK_OBJ].Repeat = 1;
-		mov_phasen[R13_BORK_OBJ].ZoomFak = 0;
-		auto_mov_obj[R13_BORK_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[R13_BORK_OBJ].Mode = true;
+		_G(mov_phasen)[R13_BORK_OBJ].AtsText = 122;
+		_G(mov_phasen)[R13_BORK_OBJ].Lines = 3;
+		_G(mov_phasen)[R13_BORK_OBJ].Repeat = 1;
+		_G(mov_phasen)[R13_BORK_OBJ].ZoomFak = 0;
+		_G(auto_mov_obj)[R13_BORK_OBJ].Id = AUTO_OBJ0;
+		_G(auto_mov_vector)[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+		_G(auto_mov_obj)[R13_BORK_OBJ].Mode = true;
 		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], 3, (const MovLine *)R13_BORK_MPKT);
 		auto_move(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 0143fd237a4..abed45f7699 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -176,10 +176,10 @@ void Room17::kletter_down() {
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
 	_G(room)->set_zoom(32);
-	spieler_mi->Vorschub = 8;
+	_G(spieler_mi)->Vorschub = 8;
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], _G(mov_phasen)[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT);
 	set_person_pos(242, 350, P_CHEWY, P_LEFT);
 }
 
@@ -194,7 +194,7 @@ void Room17::kletter_up() {
 	_G(room)->set_zoom(25);
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
-	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], mov_phasen[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT1);
+	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], _G(mov_phasen)[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT1);
 	set_person_pos(243, 146, P_CHEWY, P_LEFT);
 }
 
@@ -205,13 +205,13 @@ void Room17::calc_seil() {
 		} else if (!flags.AutoAniPlay && !_G(spieler).inv_cur) {
 			close_door();
 			flags.AutoAniPlay = true;
-			mov_phasen[CHEWY_OBJ].AtsText = 0;
-			mov_phasen[CHEWY_OBJ].Lines = 2;
-			mov_phasen[CHEWY_OBJ].Repeat = 1;
-			mov_phasen[CHEWY_OBJ].ZoomFak = 0;
-			auto_mov_obj[CHEWY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[CHEWY_OBJ].Mode = true;
+			_G(mov_phasen)[CHEWY_OBJ].AtsText = 0;
+			_G(mov_phasen)[CHEWY_OBJ].Lines = 2;
+			_G(mov_phasen)[CHEWY_OBJ].Repeat = 1;
+			_G(mov_phasen)[CHEWY_OBJ].ZoomFak = 0;
+			_G(auto_mov_obj)[CHEWY_OBJ].Id = AUTO_OBJ0;
+			_G(auto_mov_vector)[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
+			_G(auto_mov_obj)[CHEWY_OBJ].Mode = true;
 			hide_cur();
 
 			if (_G(spieler).R17Location == 1) {
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index b3ecdc31317..6b714825292 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -235,18 +235,18 @@ int16 Room18::calc_surimy() {
 		_G(det)->load_taf_seq(245, 50, nullptr);
 		_G(det)->load_taf_seq(116, 55, nullptr);
 		_G(auto_obj) = 1;
-		mov_phasen[SURIMY_OBJ].AtsText = 0;
-		mov_phasen[SURIMY_OBJ].Lines = 2;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[SURIMY_OBJ].Mode = true;
-
-		if (spieler_vector[P_CHEWY].Xypos[1] < 150) {
+		_G(mov_phasen)[SURIMY_OBJ].AtsText = 0;
+		_G(mov_phasen)[SURIMY_OBJ].Lines = 2;
+		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+		_G(mov_phasen)[SURIMY_OBJ].ZoomFak = 0;
+		_G(auto_mov_obj)[SURIMY_OBJ].Id = AUTO_OBJ0;
+		_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed;
+		_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
+
+		if (_G(spieler_vector)[P_CHEWY].Xypos[1] < 150) {
 			start_detail_frame(18, 1, ANI_VOR, 8);
 
-			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT3);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT3);
 			wait_detail(18);
 		} else {
 			auto_move(1, P_CHEWY);
@@ -255,7 +255,7 @@ int16 Room18::calc_surimy() {
 			start_detail_frame(17, 1, ANI_VOR, 12);
 			_G(maus_links_click) = false;
 
-			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
+			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 			wait_detail(17);
 		}
 
@@ -283,8 +283,8 @@ int16 Room18::calc_surimy() {
 		_G(det)->hide_static_spr(26);
 
 		flags.NoScroll = true;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
+		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 		auto_scroll(70, 0);
 		wait_auto_obj(SURIMY_OBJ);
 
@@ -301,8 +301,8 @@ int16 Room18::calc_surimy() {
 		_G(det)->show_static_spr(21);
 
 		_G(det)->hide_static_spr(26);
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], mov_phasen[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT2);
+		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT2);
 		auto_scroll(0, 0);
 		wait_auto_obj(SURIMY_OBJ);
 		_G(spieler).ScrollxStep = 6;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index b7d4aab18ee..67b25d83abb 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -118,46 +118,46 @@ void Room21::init_spinne() {
 	_G(det)->load_taf_seq(42, 48, nullptr);
 	_G(auto_obj) = 2;
 
-	mov_phasen[SPINNE1_OBJ].AtsText = 130;
-	mov_phasen[SPINNE1_OBJ].Lines = 3;
-	mov_phasen[SPINNE1_OBJ].Repeat = 255;
-	mov_phasen[SPINNE1_OBJ].ZoomFak = 0;
-	auto_mov_obj[SPINNE1_OBJ].Id = AUTO_OBJ0;
-	auto_mov_vector[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SPINNE1_OBJ].Mode = true;
+	_G(mov_phasen)[SPINNE1_OBJ].AtsText = 130;
+	_G(mov_phasen)[SPINNE1_OBJ].Lines = 3;
+	_G(mov_phasen)[SPINNE1_OBJ].Repeat = 255;
+	_G(mov_phasen)[SPINNE1_OBJ].ZoomFak = 0;
+	_G(auto_mov_obj)[SPINNE1_OBJ].Id = AUTO_OBJ0;
+	_G(auto_mov_vector)[SPINNE1_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SPINNE1_OBJ].Mode = true;
 	init_auto_obj(SPINNE1_OBJ, &SPINNE_PHASEN[0][0], 3, (const MovLine *)SPINNE_MPKT);
 
-	mov_phasen[SPINNE2_OBJ].AtsText = 130;
-	mov_phasen[SPINNE2_OBJ].Lines = 2;
-	mov_phasen[SPINNE2_OBJ].Repeat = 1;
-	mov_phasen[SPINNE2_OBJ].ZoomFak = 0;
-	auto_mov_obj[SPINNE2_OBJ].Id = AUTO_OBJ1;
-	auto_mov_vector[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
-	auto_mov_obj[SPINNE2_OBJ].Mode = true;
+	_G(mov_phasen)[SPINNE2_OBJ].AtsText = 130;
+	_G(mov_phasen)[SPINNE2_OBJ].Lines = 2;
+	_G(mov_phasen)[SPINNE2_OBJ].Repeat = 1;
+	_G(mov_phasen)[SPINNE2_OBJ].ZoomFak = 0;
+	_G(auto_mov_obj)[SPINNE2_OBJ].Id = AUTO_OBJ1;
+	_G(auto_mov_vector)[SPINNE2_OBJ].Delay = _G(spieler).DelaySpeed;
+	_G(auto_mov_obj)[SPINNE2_OBJ].Mode = true;
 	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], 2, (const MovLine *)SPINNE_MPKT1);
 	_G(timer_nr)[0] = _G(room)->set_timer(255, 21);
 	_G(e_streifen) = false;
 }
 
 void Room21::restart_spinne2() {
-	mov_phasen[SPINNE2_OBJ].Repeat = 1;
-	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], mov_phasen[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
+	_G(mov_phasen)[SPINNE2_OBJ].Repeat = 1;
+	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], _G(mov_phasen)[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
 	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 	_G(e_streifen) = false;
 }
 
 void Room21::setup_func() {
-	if (auto_mov_vector[SPINNE2_OBJ].Xypos[1] >= 190 && !_G(e_streifen)) {
+	if (_G(auto_mov_vector)[SPINNE2_OBJ].Xypos[1] >= 190 && !_G(e_streifen)) {
 		_G(e_streifen) = true;
 
 		_G(auto_obj) = 3;
-		mov_phasen[ENERGIE_OBJ].AtsText = 0;
-		mov_phasen[ENERGIE_OBJ].Lines = 2;
-		mov_phasen[ENERGIE_OBJ].Repeat = 1;
-		mov_phasen[ENERGIE_OBJ].ZoomFak = 0;
-		auto_mov_obj[ENERGIE_OBJ].Id = AUTO_OBJ2;
-		auto_mov_vector[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
-		auto_mov_obj[ENERGIE_OBJ].Mode = true;
+		_G(mov_phasen)[ENERGIE_OBJ].AtsText = 0;
+		_G(mov_phasen)[ENERGIE_OBJ].Lines = 2;
+		_G(mov_phasen)[ENERGIE_OBJ].Repeat = 1;
+		_G(mov_phasen)[ENERGIE_OBJ].ZoomFak = 0;
+		_G(auto_mov_obj)[ENERGIE_OBJ].Id = AUTO_OBJ2;
+		_G(auto_mov_vector)[ENERGIE_OBJ].Delay = _G(spieler).DelaySpeed;
+		_G(auto_mov_obj)[ENERGIE_OBJ].Mode = true;
 		init_auto_obj(ENERGIE_OBJ, &SPINNE_PHASEN[0][0], 2, (const MovLine *)SPINNE_MPKT2);
 	}
 }
@@ -166,40 +166,40 @@ void Room21::chewy_kolli() {
 	int16 kolli = false;
 
 	for (int16 i = 0; i < 3 && !kolli; i++) {
-		int16 spr_nr = mov_phasen[i].Phase[auto_mov_vector[i].Phase][0] + auto_mov_vector[i].PhNr;
+		int16 spr_nr = _G(mov_phasen)[i].Phase[_G(auto_mov_vector)[i].Phase][0] + _G(auto_mov_vector)[i].PhNr;
 		int16 *xy = (int16 *)room_blk.DetImage[spr_nr];
 		int16 *Cxy = room_blk.DetKorrekt + (spr_nr << 1);
 		int16 xoff = xy[0];
 		int16 yoff = xy[1];
 		if (i == 2)
 			xoff += 10;
-		xoff += auto_mov_vector[i].Xzoom;
-		yoff += auto_mov_vector[i].Yzoom;
+		xoff += _G(auto_mov_vector)[i].Xzoom;
+		yoff += _G(auto_mov_vector)[i].Yzoom;
 
-		if ((!i && spieler_vector[P_CHEWY].Xypos[0] < 516) ||
-			(i == 1 && spieler_vector[P_CHEWY].Xypos[1] > 70) ||
+		if ((!i && _G(spieler_vector)[P_CHEWY].Xypos[0] < 516) ||
+			(i == 1 && _G(spieler_vector)[P_CHEWY].Xypos[1] > 70) ||
 			(i == 2)) {
-			if (spieler_vector[P_CHEWY].Xypos[0] + 12 >= auto_mov_vector[i].Xypos[0] + Cxy[0] &&
-				spieler_vector[P_CHEWY].Xypos[0] + 12 <= auto_mov_vector[i].Xypos[0] + xoff + Cxy[0] &&
-				spieler_vector[P_CHEWY].Xypos[1] + 12 >= auto_mov_vector[i].Xypos[1] + Cxy[1] &&
-				spieler_vector[P_CHEWY].Xypos[1] + 12 <= auto_mov_vector[i].Xypos[1] + yoff + Cxy[1] &&
-				mov_phasen[i].Start == 1)
+			if (_G(spieler_vector)[P_CHEWY].Xypos[0] + 12 >= _G(auto_mov_vector)[i].Xypos[0] + Cxy[0] &&
+				_G(spieler_vector)[P_CHEWY].Xypos[0] + 12 <= _G(auto_mov_vector)[i].Xypos[0] + xoff + Cxy[0] &&
+				_G(spieler_vector)[P_CHEWY].Xypos[1] + 12 >= _G(auto_mov_vector)[i].Xypos[1] + Cxy[1] &&
+				_G(spieler_vector)[P_CHEWY].Xypos[1] + 12 <= _G(auto_mov_vector)[i].Xypos[1] + yoff + Cxy[1] &&
+				_G(mov_phasen)[i].Start == 1)
 				kolli = true;
 		}
 	}
 
 	if (kolli && !flags.AutoAniPlay) {
-		const int16 tmp = spieler_vector[P_CHEWY].Count;
+		const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 		stop_person(P_CHEWY);
 		flags.AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		int16 ani_nr = (spieler_vector[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
-		_G(det)->set_detail_pos(ani_nr, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
+		_G(det)->set_detail_pos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		start_detail_wait(ani_nr, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flags.AutoAniPlay = false;
-		spieler_vector[P_CHEWY].Count = tmp;
-		get_phase(&spieler_vector[P_CHEWY], &spieler_mi[P_CHEWY]);
+		_G(spieler_vector)[P_CHEWY].Count = tmp;
+		get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 		_G(mov)->continue_auto_go();
 	}
 }
@@ -212,8 +212,8 @@ void Room21::salto() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
 		for (int16 i = 0; i < 3; i++) {
-			_G(det)->set_detail_pos(12 + i, spieler_vector[P_CHEWY].Xypos[0],
-				spieler_vector[P_CHEWY].Xypos[1]);
+			_G(det)->set_detail_pos(12 + i, _G(spieler_vector)[P_CHEWY].Xypos[0],
+				_G(spieler_vector)[P_CHEWY].Xypos[1]);
 		}
 
 		start_ani_block(3, ABLOCK19);
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index b951ca58e74..2376fc92e69 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -109,13 +109,13 @@ void Room22::bork(int16 t_nr) {
 			start_aad_wait(10, -1);
 			auto_move(3, P_CHEWY);
 			_G(auto_obj) = 1;
-			mov_phasen[BORK_OBJ].AtsText = 0;
-			mov_phasen[BORK_OBJ].Lines = 2;
-			mov_phasen[BORK_OBJ].Repeat = 1;
-			mov_phasen[BORK_OBJ].ZoomFak = 0;
-			auto_mov_obj[BORK_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[BORK_OBJ].Delay = _G(spieler).DelaySpeed;
-			auto_mov_obj[BORK_OBJ].Mode = true;
+			_G(mov_phasen)[BORK_OBJ].AtsText = 0;
+			_G(mov_phasen)[BORK_OBJ].Lines = 2;
+			_G(mov_phasen)[BORK_OBJ].Repeat = 1;
+			_G(mov_phasen)[BORK_OBJ].ZoomFak = 0;
+			_G(auto_mov_obj)[BORK_OBJ].Id = AUTO_OBJ0;
+			_G(auto_mov_vector)[BORK_OBJ].Delay = _G(spieler).DelaySpeed;
+			_G(auto_mov_obj)[BORK_OBJ].Mode = true;
 
 			if (!_G(spieler).R22Paint) {
 				bork_walk1();
@@ -137,18 +137,18 @@ void Room22::bork(int16 t_nr) {
 }
 
 void Room22::bork_walk1() {
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT);
 	wait_auto_obj(BORK_OBJ);
 
 	start_detail_wait(2, 1, ANI_VOR);
 
-	mov_phasen[BORK_OBJ].Repeat = 1;
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT1);
+	_G(mov_phasen)[BORK_OBJ].Repeat = 1;
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT1);
 	wait_auto_obj(BORK_OBJ);
 }
 
 void Room22::bork_walk2() {
-	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], mov_phasen[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT2);
+	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT2);
 	wait_auto_obj(BORK_OBJ);
 
 	flic_cut(FCUT_009, CFO_MODE);
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index acdf59ea184..1136eecef1f 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -150,13 +150,13 @@ void Room25::xit_gleiter() {
 		_G(spieler).R25SurimyLauf = true;
 		_G(det)->load_taf_seq(56, 8, nullptr);
 		_G(auto_obj) = 1;
-		mov_phasen[SURIMY_OBJ].AtsText = 0;
-		mov_phasen[SURIMY_OBJ].Lines = 2;
-		mov_phasen[SURIMY_OBJ].Repeat = 1;
-		mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-		auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-		auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-		auto_mov_obj[SURIMY_OBJ].Mode = true;
+		_G(mov_phasen)[SURIMY_OBJ].AtsText = 0;
+		_G(mov_phasen)[SURIMY_OBJ].Lines = 2;
+		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+		_G(mov_phasen)[SURIMY_OBJ].ZoomFak = 0;
+		_G(auto_mov_obj)[SURIMY_OBJ].Id = AUTO_OBJ0;
+		_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+		_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 		_G(fx_blend) = BLEND1;
 		set_up_screen(DO_SETUP);
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 06777cfe7a0..fd61b0b1579 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -52,7 +52,7 @@ void Room27::xit(int16 eib_nr) {
 			_G(det)->del_static_ani(0);
 			start_detail_wait(2, 1, ANI_VOR);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-			spieler_mi[P_HOWARD].Id = HOWARD_OBJ;
+			_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
 		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
 			++_G(spieler).R27HowardGed;
 			start_aad_wait(174, -1);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 12aecf58a9c..8dec70064f7 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -63,7 +63,7 @@ void Room28::entry(int16 eib_nr) {
 					_G(spieler).R28EntryHaus = true;
 					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
 					auto_move(3, P_HOWARD);
-					go_auto_xy(320, spieler_vector[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
+					go_auto_xy(320, _G(spieler_vector)[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
 					start_aad_wait(176, -1);
 				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
 					_G(spieler).R28RKuerbis = true;
@@ -118,9 +118,9 @@ void Room28::entry(int16 eib_nr) {
 					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
 					_G(fx_blend) = BLEND_NONE;
 					flags.ExitMov = false;
-					spieler_mi[P_HOWARD].Mode = true;
+					_G(spieler_mi)[P_HOWARD].Mode = true;
 					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
-					spieler_mi[P_HOWARD].Mode = false;
+					_G(spieler_mi)[P_HOWARD].Mode = false;
 					set_person_pos(440, 146, P_CHEWY, P_LEFT);
 					start_aad_wait(193, -1);
 				} else {
@@ -204,7 +204,7 @@ void Room28::haendler() {
 void Room28::setup_func() {
 	calc_person_look();
 
-	int16 x = (spieler_vector[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
+	int16 x = (_G(spieler_vector)[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
 	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
 }
 
@@ -248,13 +248,13 @@ void Room28::set_pump() {
 	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
 		if (!flags.AutoAniPlay) {
 			flags.AutoAniPlay = true;
-			if (spieler_vector[P_CHEWY].Xypos[0] < 380)
+			if (_G(spieler_vector)[P_CHEWY].Xypos[0] < 380)
 				auto_move(5, P_CHEWY);
 
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
+			int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
 			del_inventar(K_MASKE_INV);
-			_G(det)->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+			_G(det)->set_detail_pos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 
 			if (_G(spieler).R28PumpTxt1 < 3) {
 				start_aad(137);
@@ -300,8 +300,8 @@ void Room28::get_pump() {
 		stop_person(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		int16 tmp = (person_end_phase[P_CHEWY] == P_RIGHT) ? 1 : 0;
-		_G(det)->set_detail_pos(tmp, spieler_vector[P_CHEWY].Xypos[0], spieler_vector[P_CHEWY].Xypos[1]);
+		int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
+		_G(det)->set_detail_pos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		start_detail_wait(tmp, 1, ANI_RUECK);
 
 		invent_2_slot(K_MASKE_INV);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 71764a22084..0152b3cffac 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -53,13 +53,13 @@ void Room31::surimy_go() {
 			_G(spieler).R31SurimyGo = 0;
 			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
-			mov_phasen[SURIMY_OBJ].AtsText = 0;
-			mov_phasen[SURIMY_OBJ].Lines = 2;
-			mov_phasen[SURIMY_OBJ].Repeat = 1;
-			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = true;
+			_G(mov_phasen)[SURIMY_OBJ].AtsText = 0;
+			_G(mov_phasen)[SURIMY_OBJ].Lines = 2;
+			_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+			_G(mov_phasen)[SURIMY_OBJ].ZoomFak = 0;
+			_G(auto_mov_obj)[SURIMY_OBJ].Id = AUTO_OBJ0;
+			_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(157, -1);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index c49788c0708..032461e4b42 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -47,13 +47,13 @@ void Room33::surimy_go() {
 			_G(spieler).R33SurimyGo = 0;
 			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
-			mov_phasen[SURIMY_OBJ].AtsText = 0;
-			mov_phasen[SURIMY_OBJ].Lines = 2;
-			mov_phasen[SURIMY_OBJ].Repeat = 1;
-			mov_phasen[SURIMY_OBJ].ZoomFak = 0;
-			auto_mov_obj[SURIMY_OBJ].Id = AUTO_OBJ0;
-			auto_mov_vector[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
-			auto_mov_obj[SURIMY_OBJ].Mode = true;
+			_G(mov_phasen)[SURIMY_OBJ].AtsText = 0;
+			_G(mov_phasen)[SURIMY_OBJ].Lines = 2;
+			_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
+			_G(mov_phasen)[SURIMY_OBJ].ZoomFak = 0;
+			_G(auto_mov_obj)[SURIMY_OBJ].Id = AUTO_OBJ0;
+			_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
+			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(158, -1);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index d27e2f4bc44..64afb3d49c5 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -62,7 +62,7 @@ void Room40::entry(int16 eib_nr) {
 
 	_G(spieler).R40PoliceAniStatus = 255;
 	_G(spieler).R40PoliceStart = false;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
@@ -145,7 +145,7 @@ void Room40::xit(int16 eib_nr) {
 		}
 	}
 
-	spieler_mi[P_HOWARD].Mode = false;
+	_G(spieler_mi)[P_HOWARD].Mode = false;
 	show_cur();
 }
 
@@ -217,7 +217,7 @@ void Room40::setup_func() {
 		calc_person_look();
 
 		int16 x, y;
-		const int16 sp_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 sp_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 		if (sp_x > 170 && sp_x < 255) {
 			x = 248;
 			y = 97;
@@ -231,8 +231,8 @@ void Room40::setup_func() {
 			x = 166;
 			y = 99;
 		} else {
-			x = spieler_vector[P_HOWARD].Xypos[0];
-			y = spieler_vector[P_HOWARD].Xypos[1];
+			x = _G(spieler_vector)[P_HOWARD].Xypos[0];
+			y = _G(spieler_vector)[P_HOWARD].Xypos[1];
 		}
 
 		go_auto_xy(x, y, P_HOWARD, ANI_GO);
@@ -285,9 +285,9 @@ void Room40::setup_func() {
 					start_aad_wait(226, -1);
 					_G(det)->stop_detail(17);
 					_G(spieler).R40HoUse = true;
-					person_end_phase[P_CHEWY] = P_RIGHT;
+					_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 					start_detail_wait(10, 1, ANI_VOR);
-					person_end_phase[P_HOWARD] = P_RIGHT;
+					_G(person_end_phase)[P_HOWARD] = P_RIGHT;
 					start_aad_wait(224, -1);
 					_G(spieler).R40PoliceWeg = true;
 					show_cur();
@@ -584,7 +584,7 @@ bool Room40::use_police() {
 			start_aad_wait(217, -1);
 			auto_move(8, P_CHEWY);
 			go_auto_xy(300, 120, P_HOWARD, ANI_WAIT);
-			person_end_phase[P_HOWARD] = P_RIGHT;
+			_G(person_end_phase)[P_HOWARD] = P_RIGHT;
 			start_aad_wait(218, -1);
 			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 			_G(menu_item) = CUR_WALK;
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 32da41f590e..ad6b9f6eb44 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -82,7 +82,7 @@ void Room41::xit() {
 void Room41::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
-		if (spieler_vector->Xypos[P_HOWARD] == 160) {
+		if (_G(spieler_vector)->Xypos[P_HOWARD] == 160) {
 			go_auto_xy(258, 75, P_HOWARD, ANI_GO);
 		} else {
 			go_auto_xy(246, 120, P_HOWARD, ANI_GO);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 9fcaf01d0af..0b221218c0e 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -40,11 +40,11 @@ void Room45::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = true;
+		_G(spieler_mi)[P_HOWARD].Mode = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
 	}
 
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	if (!flags.LoadGame) {
 		int16 ch_x, ch_y;
 		int16 ho_x, ho_y;
@@ -80,7 +80,7 @@ void Room45::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 
 		if (eib_nr == 87) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
@@ -143,7 +143,7 @@ void Room45::setup_func() {
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && _G(HowardMov) != 2) {
 			calc_person_look();
-			const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+			const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 			if (ch_x < 95) {
 				x = 18;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index f24276fd45d..11551cfd549 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -42,7 +42,7 @@ void Room46::entry(int16 eib_nr) {
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = true;
+		_G(spieler_mi)[P_HOWARD].Mode = true;
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).flags33_8) {
@@ -72,14 +72,14 @@ void Room46::entry(int16 eib_nr) {
 
 void Room46::xit() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
 void Room46::setup_func() {
 	calc_person_look();
 	int16 y = 64;
-	const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 	int16 x;
 	if (ch_x > 160) {
@@ -99,9 +99,9 @@ void Room46::setup_func() {
 void Room46::bodo() {
 	hide_cur();
 	_G(det)->show_static_spr(0);
-	person_end_phase[P_CHEWY] = P_RIGHT;
+	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 	start_aad_wait(240, -1);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(42, 76, P_CHEWY, ANI_WAIT);
 	start_aad_wait(250, -1);
 	auto_move(1, P_CHEWY);
@@ -109,7 +109,7 @@ void Room46::bodo() {
 	start_aad_wait(251, -1);
 	auto_move(2, P_CHEWY);
 
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	start_detail_wait(0, 1, ANI_VOR);
 	_G(det)->start_detail(5, 255, ANI_VOR);
 	start_aad_wait(241, -1);
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index e0f203d3b3a..61367832538 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -39,7 +39,7 @@ void Room47::xit() {
 	flags.MainInput = true;
 	show_person();
 	set_person_pos(114, 102, P_CHEWY, P_LEFT);
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 }
 
 int16 Room47::use_knopf(int16 txt_nr) {
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index e27c5e8dbe1..0fe16bf1658 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -53,7 +53,7 @@ void Room49::entry(int16 eib_nr) {
 
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
@@ -74,7 +74,7 @@ void Room49::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 		if (eib_nr == 80) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		} else if (eib_nr == 81) {
@@ -119,7 +119,7 @@ void Room49::calc_boy() {
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
-		person_end_phase[P_CHEWY] = P_LEFT;
+		_G(person_end_phase)[P_CHEWY] = P_LEFT;
 		_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 		_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 		_G(det)->set_static_ani(2, -1);
@@ -270,7 +270,7 @@ int16 Room49::use_taxi() {
 void Room49::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		calc_person_look();
-		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 		int16 x, y;
 		if (ch_x < 130) {
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index f15a8694e76..1476134f5b3 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -70,7 +70,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
-			spieler_mi[P_HOWARD].Mode = true;
+			_G(spieler_mi)[P_HOWARD].Mode = true;
 
 			if (!flags.LoadGame) {
 				if (eib_nr == 85)
@@ -91,7 +91,7 @@ void Room50::xit(int16 eib_nr) {
 		else
 			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
 
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
@@ -193,7 +193,7 @@ int16 Room50::use_gum() {
 		start_detail_wait(6, 1, ANI_VOR);
 		_G(det)->set_static_ani(5, -1);
 		auto_move(3, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
 		_G(SetUpScreenFunc) = nullptr;
 		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
@@ -214,7 +214,7 @@ int16 Room50::use_gum() {
 		start_aad_wait(277, -1);
 		_G(SetUpScreenFunc) = setup_func;
 		auto_move(3, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		_G(det)->del_static_ani(10);
 		go_page();
 
@@ -254,13 +254,13 @@ void Room50::setup_func() {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 		calc_person_look();
-		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 		int16 x, y;
 		if (ch_x < 72) {
 			x = 1;
 			y = 64;
-		} else if (ch_x < 275 && spieler_vector[P_CHEWY].Xypos[1] > 72) {
+		} else if (ch_x < 275 && _G(spieler_vector)[P_CHEWY].Xypos[1] > 72) {
 			x = 143;
 			y = 57;
 		} else {
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index ab69b9bb2ba..f9b7ae7740f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -95,7 +95,7 @@ void Room51::entry() {
 			}
 
 			_G(SetUpScreenFunc) = setup_func;
-			spieler_mi[P_HOWARD].Mode = true;
+			_G(spieler_mi)[P_HOWARD].Mode = true;
 		}
 	}
 }
@@ -119,7 +119,7 @@ void Room51::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
 		}
 
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
@@ -184,7 +184,7 @@ void Room51::setup_func() {
 		}
 	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		calc_person_look();
-		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 
 		int16 x, y;
 		if (ch_y < 129) {
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 5de9a36a08f..74bae276a01 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room52::entry() {
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (_G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg) {
 		plot_armee(0);
@@ -59,7 +59,7 @@ void Room52::entry() {
 void Room52::xit() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 51;
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
@@ -138,7 +138,7 @@ void Room52::kaker_platt() {
 void Room52::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
-		const int16 y = (spieler_vector[P_CHEWY].Xypos[1] < 97) ? 44 : 87;
+		const int16 y = (_G(spieler_vector)[P_CHEWY].Xypos[1] < 97) ? 44 : 87;
 		go_auto_xy(1, y, P_HOWARD, ANI_GO);
 	}
 }
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 26d32faa492..d76906f3507 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -41,7 +41,7 @@ void Room54::entry(int16 eib_nr) {
 	if (_G(spieler).R54FputzerWeg)
 		_G(det)->show_static_spr(9);
 
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (!flags.LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
@@ -87,7 +87,7 @@ void Room54::xit(int16 eib_nr) {
 
 	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
@@ -96,7 +96,7 @@ void Room54::setup_func() {
 		calc_person_look();
 
 		if (_G(spieler).R54HowardVorne != 255) {
-			const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+			const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 			int16 x, y;
 			if (_G(spieler).R54HowardVorne) {
 				if (ch_x < 218) {
@@ -255,7 +255,7 @@ int16 Room54::use_zelle() {
 				go_auto_xy(241, 74, P_CHEWY, ANI_WAIT);
 				start_aad_wait(316, -1);
 
-				spieler_mi[P_HOWARD].Mode = true;
+				_G(spieler_mi)[P_HOWARD].Mode = true;
 				switch_room(55);
 			}
 		}
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 87e5f122497..e36863164a6 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -56,7 +56,7 @@ void Room55::entry() {
 		_G(det)->set_static_ani(aniNr, -1);
 	}
 
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (_G(spieler).R55Job) {
 		rock2mans();
@@ -115,7 +115,7 @@ void Room55::xit(int16 eib_nr) {
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-			spieler_mi[P_HOWARD].Mode = false;
+			_G(spieler_mi)[P_HOWARD].Mode = false;
 		}
 	}
 
@@ -247,7 +247,7 @@ int16 Room55::use_telefon() {
 				del_invent_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_ROCKER);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-				spieler_mi[P_HOWARD].Mode = false;
+				_G(spieler_mi)[P_HOWARD].Mode = false;
 				show_cur();
 				_G(spieler).R55R54First = true;
 				_G(spieler).R55ExitDia = 337;
@@ -298,7 +298,7 @@ void Room55::get_job() {
 	}
 
 	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (r_nr == 54)
 		flags.LoadGame = false;
@@ -401,7 +401,7 @@ int16 Room55::cut_serv(int16 frame) {
 void Room55::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
 		calc_person_look();
-		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 		int16 x, y;
 		if (ch_x < 100) {
@@ -459,7 +459,7 @@ void Room55::talk_line() {
 
 	flags.NoScroll = false;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 54;
-	spieler_mi[P_HOWARD].Mode = false;
+	_G(spieler_mi)[P_HOWARD].Mode = false;
 	switch_room(54);
 	show_cur();
 }
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 9538afcbaa5..db27e15f3b4 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -34,7 +34,7 @@ void Room56::entry() {
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	int esi = 0; //TODO: rename this variable
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	if (_G(spieler).flags32_10) {
 		_G(det)->show_static_spr(10);
 		_G(room)->set_timer_status(0, TIMER_STOP);
@@ -75,9 +75,9 @@ void Room56::entry() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(SetUpScreenFunc) = setup_func;
-			spieler_mi[P_CHEWY].Mode = true;
+			_G(spieler_mi)[P_CHEWY].Mode = true;
 			auto_move(1, P_CHEWY);
-			spieler_mi[P_CHEWY].Mode = false;
+			_G(spieler_mi)[P_CHEWY].Mode = false;
 			_G(maus_links_click) = false;
 			show_cur();
 		} else if (_G(spieler).R62Flucht && !_G(spieler).flags32_10) {
@@ -139,9 +139,9 @@ void Room56::entry() {
 					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 					_G(spieler).ZoomXy[P_HOWARD][0] = 37;
 					_G(SetUpScreenFunc) = setup_func;
-					spieler_mi[P_CHEWY].Mode = true;
+					_G(spieler_mi)[P_CHEWY].Mode = true;
 					auto_move(1, P_CHEWY);
-					spieler_mi[P_CHEWY].Mode = false;
+					_G(spieler_mi)[P_CHEWY].Mode = false;
 				}
 				show_cur();
 			} else {
@@ -191,7 +191,7 @@ void Room56::entry() {
 }
 
 void Room56::xit() {
-	spieler_mi[P_HOWARD].Mode = false;
+	_G(spieler_mi)[P_HOWARD].Mode = false;
 	_G(spieler).ScrollxStep = 1;
 }
 
@@ -218,9 +218,9 @@ int16 Room56::use_taxi() {
 		_G(room)->set_zoom(23);
 		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		go_auto_xy(3, 42, P_CHEWY, ANI_WAIT);
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
@@ -384,9 +384,9 @@ void Room56::start_flug() {
 }
 
 void Room56::setup_func() {
-	++spieler_mi[P_HOWARD].Vorschub;
-	if (spieler_mi[P_HOWARD].Vorschub > 8)
-		spieler_mi[P_HOWARD].Vorschub = 8;
+	++_G(spieler_mi)[P_HOWARD].Vorschub;
+	if (_G(spieler_mi)[P_HOWARD].Vorschub > 8)
+		_G(spieler_mi)[P_HOWARD].Vorschub = 8;
 
 	if (!_G(spieler).flags32_10) {
 		switch (_G(r56koch_flug)) {
@@ -419,8 +419,8 @@ void Room56::setup_func() {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
 		calc_person_look();
-		const int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
-		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
+		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		int16 x, y;
 		if (ch_x < 196) {
 			x = 23;
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 6262b98e13f..c08ad8e0466 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -36,7 +36,7 @@ void Room57::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	if (_G(spieler).R57StudioAuf)
 		_G(det)->hide_static_spr(4);
 	
@@ -55,7 +55,7 @@ void Room57::entry() {
 
 void Room57::xit(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
-		spieler_mi[P_HOWARD].Mode = false;
+		_G(spieler_mi)[P_HOWARD].Mode = false;
 		if (eib_nr == 91)
 			_G(spieler).PersonRoomNr[P_HOWARD] = 62;
 	}
@@ -64,7 +64,7 @@ void Room57::xit(int16 eib_nr) {
 void Room57::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 		calc_person_look();
-		const int16 ch_y = spieler_vector[P_CHEWY].Xypos[1];
+		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		int16 x, y;
 		if (ch_y < 145) {
 			x = 176;
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index da0fb07f355..c16454a6bbe 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -35,10 +35,10 @@ void Room58::entry() {
 void Room58::xit() {
 	_G(spieler).scrollx = _G(spieler).R58TmpSx;
 	_G(spieler).scrolly = _G(spieler).R58TmpSy;
-	spieler_vector[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
-	spieler_vector[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
-	spieler_mi[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
-	spieler_mi[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
+	_G(spieler_vector)[P_CHEWY].Xypos[0] = _G(spieler).R58TmpX;
+	_G(spieler_vector)[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
+	_G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
+	_G(spieler_mi)[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
 	flags.MainInput = true;
 	flags.LoadGame = true;
 	show_person();
@@ -55,10 +55,10 @@ void Room58::look_cut_mag(int16 r_nr) {
 
 	_G(spieler).R58TmpSx = _G(spieler).scrollx;
 	_G(spieler).R58TmpSy = _G(spieler).scrolly;
-	_G(spieler).R58TmpX = spieler_vector[P_CHEWY].Xypos[0];
-	_G(spieler).R58TmpY = spieler_vector[P_CHEWY].Xypos[1];
-	spieler_vector[P_CHEWY].Xypos[0] = 160;
-	spieler_vector[P_CHEWY].Xypos[1] = 100;
+	_G(spieler).R58TmpX = _G(spieler_vector)[P_CHEWY].Xypos[0];
+	_G(spieler).R58TmpY = _G(spieler_vector)[P_CHEWY].Xypos[1];
+	_G(spieler_vector)[P_CHEWY].Xypos[0] = 160;
+	_G(spieler_vector)[P_CHEWY].Xypos[1] = 100;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	flags.MainInput = false;
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index fd5e128e011..ed7fb582c6d 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room62::entry() {
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler).R62LauraVerwandlung = 0;
 	_G(spieler).room_e_obj[91].Attribut = 255;
 	if (!_G(spieler).R62FirstEntry) {
@@ -60,9 +60,9 @@ void Room62::entry() {
 		_G(det)->del_static_ani(0);
 		_G(det)->start_detail(1, 1, ANI_VOR);
 		auto_move(0, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		go_auto_xy(160, 240, P_CHEWY, ANI_WAIT);
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(det)->del_static_ani(5);
 		start_detail_wait(7, 1, ANI_VOR);
 		show_cur();
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index be0c0ffc320..1f70df1fa19 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -137,9 +137,9 @@ void Room63::bork_platt() {
 	flic_cut(FCUT_082, CFO_MODE);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	check_shad(4, 1);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	auto_move(6, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	start_aad_wait(370, -1);
 	start_detail_wait(4, 1, ANI_VOR);
 	_G(det)->show_static_spr(13);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index f8b2a69734e..52c671476e6 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -59,12 +59,12 @@ void Room64::entry() {
 }
 
 int16 Room64::cut_sev(int16 frame) {
-	const int16 spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-	const int16 x = spieler_mi[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
-	const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
+	const int16 spr_nr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
+	const int16 x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
+	const int16 y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
-	calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak, (int16)_G(room)->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
-	_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, _G(scr_width));
+	calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak, (int16)_G(room)->_roomInfo->ZoomFak, &_G(spieler_vector)[P_CHEWY]);
+	_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
 	return 0;
 }
 
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 03e19692348..5fe25a27a1c 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -37,14 +37,14 @@ void Room65::entry() {
 	_G(r65tmp_scrolly) = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(r65tmp_ch_x) = spieler_vector[P_CHEWY].Xypos[0];;
-	_G(r65tmp_ch_y) = spieler_vector[P_CHEWY].Xypos[1];;
-	_G(r65tmp_ho_x) = spieler_vector[P_HOWARD].Xypos[0];;
-	_G(r65tmp_ho_y) = spieler_vector[P_HOWARD].Xypos[1];;
-	spieler_vector[P_CHEWY].Xypos[0] = 10;
-	spieler_vector[P_CHEWY].Xypos[1] = 80;
-	spieler_vector[P_HOWARD].Xypos[0] = 150;
-	spieler_vector[P_HOWARD].Xypos[1] = 10;
+	_G(r65tmp_ch_x) = _G(spieler_vector)[P_CHEWY].Xypos[0];;
+	_G(r65tmp_ch_y) = _G(spieler_vector)[P_CHEWY].Xypos[1];;
+	_G(r65tmp_ho_x) = _G(spieler_vector)[P_HOWARD].Xypos[0];;
+	_G(r65tmp_ho_y) = _G(spieler_vector)[P_HOWARD].Xypos[1];;
+	_G(spieler_vector)[P_CHEWY].Xypos[0] = 10;
+	_G(spieler_vector)[P_CHEWY].Xypos[1] = 80;
+	_G(spieler_vector)[P_HOWARD].Xypos[0] = 150;
+	_G(spieler_vector)[P_HOWARD].Xypos[1] = 10;
 	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
 		_G(cur_hide_flag) = false;
 		hide_cur();
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index f50d861ab6d..4d88b680ceb 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -29,8 +29,8 @@ namespace Rooms {
 
 void Room66::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 50;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 36;
@@ -116,7 +116,7 @@ void Room66::xit(int16 eib_nr) {
 
 void Room66::setup_func() {
 	calc_person_look();
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 	int edx, esi;
 	if (posX < 30) {
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index d5828409212..5b7c8b1f1f2 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -31,8 +31,8 @@ namespace Rooms {
 void Room67::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).DiaAMov = 7;
 	if (_G(spieler).R67KommodeAuf)
 		_G(det)->show_static_spr(9);
@@ -67,7 +67,7 @@ void Room67::setup_func() {
 	calc_person_look();
 	const int16 y = 117;
 	int16 x;
-	if (spieler_vector[P_CHEWY].Xypos[0] > 320) {
+	if (_G(spieler_vector)[P_CHEWY].Xypos[0] > 320) {
 		x = 178;
 	} else {
 		x = 137;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 6700f48ef1d..fb94e42a813 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -46,8 +46,8 @@ void Room68::entry() {
 	_G(spieler).DiaAMov = 1;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(r68HohesC) = -1;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	
 	if (_G(spieler).R68Papagei) {
 		_G(det)->show_static_spr(12);
@@ -132,7 +132,7 @@ void Room68::setup_func() {
 	calc_person_look();
 	int16 ho_y = 75;
 	int16 ni_y = 75;
-	int16 ch_x = spieler_vector[P_CHEWY].Xypos[0];
+	int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int16 ho_x, ni_x;
 
 	if (ch_x < 130) {
@@ -226,8 +226,8 @@ void Room68::talk_keeper() {
 	start_detail_wait(15, 1, ANI_VOR);
 	_G(det)->set_static_ani(16, -1);
 	show_cur();
-	_G(ssi)[3].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;;
-	_G(ssi)[3].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
+	_G(ssi)[3].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
+	_G(ssi)[3].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 	_G(atds)->set_split_win(3, &_G(ssi)[3]);
 	start_ads_wait(20);
 	_G(cur_hide_flag) = false;
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 49ba9622b29..4c27865607d 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -38,8 +38,8 @@ void Room69::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 46;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 90;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
@@ -92,7 +92,7 @@ int16 Room69::use_bruecke() {
 			calc_person_dia(P_HOWARD);
 		} else {
 			auto_move(3, P_CHEWY);
-			spieler_mi[P_CHEWY].Mode = true;
+			_G(spieler_mi)[P_CHEWY].Mode = true;
 			go_auto_xy(253, 103, P_CHEWY, ANI_WAIT);
 			go_auto_xy(141, 103, P_CHEWY, ANI_WAIT);
 
@@ -113,7 +113,7 @@ int16 Room69::use_bruecke() {
 				_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
 			}
 
-			spieler_mi[P_CHEWY].Mode = false;
+			_G(spieler_mi)[P_CHEWY].Mode = false;
 			switch_room(70);
 		}
 		show_cur();
@@ -123,7 +123,7 @@ int16 Room69::use_bruecke() {
 
 void Room69::proc1() {
 	_G(spieler).scrollx = 0;
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	set_person_pos(46, 83, P_CHEWY, P_RIGHT);
 	set_person_pos(59, 68, P_NICHELLE, P_RIGHT);
 	set_person_pos(94, 82, P_HOWARD, P_RIGHT);
@@ -140,7 +140,7 @@ void Room69::proc1() {
 	go_auto_xy(141, 109, P_CHEWY, ANI_GO);
 	go_auto_xy(253, 106, P_CHEWY, ANI_WAIT);
 	auto_move(3, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 0355e93ca4f..cc9cb898ad6 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -37,8 +37,8 @@ void Room70::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index a22737a02dd..5eb5d471e2e 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -38,8 +38,8 @@ void Room71::entry(int16 eib_nr) {
 	g_engine->_sound->playSound(0);
 	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 8;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 16;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 8;
@@ -116,7 +116,7 @@ void Room71::setup_func() {
 		}
 
 	} else {
-		const int posX = spieler_vector[P_CHEWY].Xypos[0];
+		const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 		int howDestX, howDestY, nicDestX, nicDestY;
 		if (posX < 40) {
@@ -266,7 +266,7 @@ int Room71::proc6() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(3);
 	_G(det)->show_static_spr(4);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(244, 44, P_CHEWY, ANI_WAIT);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(4);
@@ -276,7 +276,7 @@ int Room71::proc6() {
 	_G(det)->del_static_ani(0);
 	_G(atds)->set_steuer_bit(443, ATS_AKTIV_BIT, ATS_DATEI);
 	auto_move(3, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	
 	show_cur();
 	return 1;
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 22232b3b903..45c33f235c1 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -32,8 +32,8 @@ namespace Rooms {
 void Room72::entry(int16 eib_nr) {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	
 	if (_G(spieler).flags28_10) {
 		_G(zoom_horizont) = 110;
@@ -44,7 +44,7 @@ void Room72::entry(int16 eib_nr) {
 		_G(spieler).ZoomXy[P_NICHELLE][0] = 20;
 		_G(spieler).ZoomXy[P_NICHELLE][1] = 40;
 		_G(zoom_horizont) = 140;
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		hide_cur();
 	}
 
@@ -96,7 +96,7 @@ void Room72::proc1(int16 flicNr) {
 	_G(det)->hide_static_spr(0);
 	set_up_screen(DO_SETUP);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
 	switch_room(76);
 }
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index a1e2edc2d32..7e9cbe817c2 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -36,8 +36,8 @@ void Room73::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index e7758ac1077..c7df0e898ca 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -37,8 +37,8 @@ void Room74::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 7c5b5771b47..afe8ff2a457 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -36,8 +36,8 @@ void Room75::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 100;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 70;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 100;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 8bf988951c8..e2e46755051 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -142,10 +142,10 @@ void Room76::proc5() {
 	auto_move(5, P_CHEWY);
 	_G(det)->hide_static_spr(10);
 	_G(det)->start_detail(13, 1, false);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(669, 127, P_CHEWY, ANI_WAIT);
 	wait_show_screen(20);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
 	set_person_pos(30, 150, P_CHEWY, P_RIGHT);
 	switch_room(78);
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 51caed3cd72..5cf43a36d6b 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -33,8 +33,8 @@ void Room79::entry() {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler).PersonHide[P_HOWARD] = false;
 	_G(spieler).PersonHide[P_NICHELLE] = false;
@@ -65,7 +65,7 @@ void Room79::xit() {
 
 void Room79::setup_func() {
 	calc_person_look();
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
 	int howDestX, howDestY, nicDestX, nicDestY;
 
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index b8da460ab5f..f09ef7a2afd 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -31,8 +31,8 @@ namespace Rooms {
 void Room81::entry() {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 140;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
@@ -72,7 +72,7 @@ void Room81::proc1() {
 	else if (_G(spieler).flags30_4)
 		diaNr = 460;
 	else {
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
 		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
 		go_auto_xy(171, 93, P_CHEWY, ANI_WAIT);
@@ -91,7 +91,7 @@ void Room81::proc1() {
 		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
 		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
 		auto_move(1, P_CHEWY);
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 		invent_2_slot(DIARY_INV);
 		_G(spieler).R84GoonsPresent = true;
 		_G(spieler).gottenDiary = true;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 54d6feb8b6a..bf9346db631 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -35,8 +35,8 @@ void Room82::entry() {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 
 	if (_G(spieler).R88UsedMonkey) {
 		_G(det)->show_static_spr(6);
@@ -90,7 +90,7 @@ void Room82::xit(int16 eib_nr) {
 void Room82::setup_func() {
 	calc_person_look();
 
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int howDestX, nicDestX;
 	
 	if (posX < 200) {
@@ -225,7 +225,7 @@ void Room82::proc8() {
 	start_aad_wait(447, -1);
 	auto_move(6, P_CHEWY);
 
-	while (spieler_vector[P_NICHELLE].Count != 0)
+	while (_G(spieler_vector)[P_NICHELLE].Count != 0)
 		set_up_screen(DO_SETUP);
 
 	_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 00d7e17277f..bf89b237535 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -36,8 +36,8 @@ void Room84::entry() {
 	_G(zoom_horizont) = 110;
 	flags.ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).R84GoonsPresent = false;
 	_flag = false;
 	g_engine->_sound->playSound(0, 0);
@@ -152,7 +152,7 @@ void Room84::setup_func() {
 		show_cur();
 	}
 
-	const int posX = spieler_vector[P_CHEWY].Xypos[0];
+	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int howDestX, nicDestX;
 	if (posX > 610) {
 		howDestX = nicDestX = 610;
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index d94a15dfd36..153d75059a4 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -37,8 +37,8 @@ void Room85::entry(int16 eib_nr) {
 	g_engine->_sound->playSound(0, 1, false);
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 22;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 22;
@@ -128,7 +128,7 @@ void Room85::xit(int16 eib_nr) {
 void Room85::setup_func() {
 	calc_person_look();
 
-	const int xyPos = spieler_vector[P_CHEWY].Xypos[0];
+	const int xyPos = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int howDestX, nicDestX;
 	
 	if (xyPos > 255) {
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 870a71a162c..8840bc7e37c 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -32,8 +32,8 @@ namespace Rooms {
 void Room86::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 20;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 20;
@@ -61,7 +61,7 @@ void Room86::entry(int16 eib_nr) {
 		set_person_pos(320, 42, P_NICHELLE, P_LEFT);
 		_G(spieler).scrollx = 164;
 	} else {
-		spieler_mi[P_CHEWY].Vorschub = 16;
+		_G(spieler_mi)[P_CHEWY].Vorschub = 16;
 		hide_cur();
 		flags.ZoomMov = false;
 		_G(spieler).scrollx = 246;
@@ -75,7 +75,7 @@ void Room86::entry(int16 eib_nr) {
 		auto_scroll(30, 0);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		flags.NoScroll = false;
-		spieler_mi[P_CHEWY].Vorschub = 8;
+		_G(spieler_mi)[P_CHEWY].Vorschub = 8;
 		_G(det)->stop_detail(0);
 		_G(det)->show_static_spr(4);
 		_G(det)->show_static_spr(5);
@@ -123,7 +123,7 @@ void Room86::setup_func() {
 	int howDestX;
 	int nicDestY = 56;
 
-	int xyPos = spieler_vector[P_CHEWY].Xypos[0];	
+	int xyPos = _G(spieler_vector)[P_CHEWY].Xypos[0];	
 	if (xyPos > 390) {
 		howDestX = 298;
 		howDestY = 44;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index af0550d3fab..718d2e6833c 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -31,8 +31,8 @@ namespace Rooms {
 void Room87::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 18;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 28;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 18;
@@ -60,12 +60,12 @@ void Room87::setup_func() {
 	int nicDestY = 0;
 
 	
-	if (spieler_vector[P_CHEWY].Xypos[0] > 186) {
+	if (_G(spieler_vector)[P_CHEWY].Xypos[0] > 186) {
 		howDestX = 103;
 		howDestY = 128;
 		nicDestX = 134;
 		nicDestY = 123;
-	} else if (spieler_vector[P_CHEWY].Xypos[0] > 20) {
+	} else if (_G(spieler_vector)[P_CHEWY].Xypos[0] > 20) {
 		howDestX = 27;
 		howDestY = 98;
 		nicDestX = -2;
@@ -87,7 +87,7 @@ void Room87::xit(int16 eib_nr) {
 	if (eib_nr != 129)
 		return;
 
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(zoom_horizont) = 0;
 	_G(room)->set_zoom(25);
 	_G(HowardMov) = 1;
@@ -96,7 +96,7 @@ void Room87::xit(int16 eib_nr) {
 	go_auto_xy(20, 56, P_CHEWY, ANI_WAIT);
 	go_auto_xy(31, 56, P_CHEWY, ANI_WAIT);
 	go_auto_xy(9, 53, P_CHEWY, ANI_WAIT);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).ScrollxStep = 1;
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 87)
 		_G(spieler).PersonRoomNr[P_HOWARD] = 86;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index b89a517dd02..d58e45545db 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -32,7 +32,7 @@ namespace Rooms {
 
 void Room89::entry() {
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(timer_nr)[0] = _G(room)->set_timer(2, 10);
 	if (_G(spieler).flags33_4) {
@@ -154,7 +154,7 @@ void Room89::setup_func() {
 	calc_person_look();
 	int destX;
 	
-	if (spieler_vector[P_CHEWY].Xypos[0] >= 230)
+	if (_G(spieler_vector)[P_CHEWY].Xypos[0] >= 230)
 		destX = 318;
 	else
 		destX = 116;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 014adf2b8dc..dba23b7ffa6 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -33,7 +33,7 @@ int Room90::_delay;
 
 void Room90::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_delay = 0;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
@@ -162,7 +162,7 @@ void Room90::setup_func() {
 		return;
 
 	calc_person_look();
-	int xyPos = spieler_vector[P_CHEWY].Xypos[0];
+	int xyPos = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int destX;
 
 	if (xyPos > 400)
@@ -244,7 +244,7 @@ int Room90::getHubcaps() {
 	start_spz_wait(43, 1, false, P_CHEWY);
 	load_chewy_taf(CHEWY_ANI7);
 
-	while (spieler_vector[P_HOWARD].Xypos[0] != 176) {
+	while (_G(spieler_vector)[P_HOWARD].Xypos[0] != 176) {
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
@@ -288,7 +288,7 @@ int Room90::shootControlUnit() {
 	_G(HowardMov) = 2;
 	flags.ZoomMov = false;
 	auto_move(5, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(232, 142, P_CHEWY, ANI_WAIT);
 	flags.NoScroll = true;
 	auto_scroll(176, 0);
@@ -304,7 +304,7 @@ int Room90::shootControlUnit() {
 	_G(det)->show_static_spr(5);
 	set_up_screen(NO_SETUP);
 	_G(fx_blend) = BLEND3;
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	flags.NoScroll = false;
 	_G(HowardMov) = 0;
 	_G(spieler).flags33_40 = true;
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 3d3b3b993f0..e78b3924950 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -38,7 +38,7 @@ void Room91::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_click = 0;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (flags.LoadGame)
 		return;
@@ -89,7 +89,7 @@ void Room91::xit(int16 eib_nr) {
 void Room91::setup_func() {
 	if (!_G(spieler).flags34_4) {
 		calc_person_look();
-		const int xyPos = spieler_vector[0].Xypos[0];
+		const int xyPos = _G(spieler_vector)[0].Xypos[0];
 		if (xyPos < 130)
 			go_auto_xy(40, 97, P_HOWARD, ANI_GO);
 		else if (xyPos < 312)
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index d3f1ce9310d..25e94eefd83 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -38,7 +38,7 @@ void Room94::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 34;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 48;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	if (_G(spieler).flags35_10) {
 		_G(room)->set_timer_status(3, TIMER_STOP);
 		_G(det)->del_static_ani(3);
@@ -101,7 +101,7 @@ void Room94::setup_func() {
 	calc_person_look();
 	int destX, destY = 122;
 
-	if (spieler_vector[P_CHEWY].Xypos[0] >= 370)
+	if (_G(spieler_vector)[P_CHEWY].Xypos[0] >= 370)
 		destX = 399;
 	else
 		destX = 255;
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 1554e1ba1c9..da80775f747 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -36,7 +36,7 @@ void Room95::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 140;
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (_G(spieler).flags35_20)
 		_G(det)->show_static_spr(10);
@@ -66,7 +66,7 @@ void Room95::xit(int16 eib_nr) {
 
 void Room95::setup_func() {
 	calc_person_look();
-	int posX = spieler_vector[P_CHEWY].Xypos[0];
+	int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	int destX;
 	int destY = 120;
 	
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 4c177a28a49..2234b757d06 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -35,9 +35,9 @@ void Room96::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 50;
-	spieler_mi[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(SetUpScreenFunc) = setup_func;
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 
 	if (flags.LoadGame)
 		return;
@@ -60,7 +60,7 @@ void Room96::setup_func() {
 	calc_person_look();
 	int destX, destY = 62;
 	
-	if (spieler_vector[P_CHEWY].Xypos[0] >= 120)
+	if (_G(spieler_vector)[P_CHEWY].Xypos[0] >= 120)
 		destX = 121;
 	else
 		destX = 93;
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index fe41bc3a617..4df87be5b6f 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -43,8 +43,8 @@ void Room97::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 0;
 
-	spieler_mi[P_HOWARD].Mode = true;
-	spieler_mi[P_NICHELLE].Mode = true;
+	_G(spieler_mi)[P_HOWARD].Mode = true;
+	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 24;
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 43;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
@@ -159,11 +159,11 @@ void Room97::gedAction(int index) {
 }
 
 void Room97::setup_func() {
-	spieler_mi[P_CHEWY].Vorschub = 4;
-	spieler_mi[P_HOWARD].Vorschub = 6;
-	spieler_mi[P_NICHELLE].Vorschub = 4;
+	_G(spieler_mi)[P_CHEWY].Vorschub = 4;
+	_G(spieler_mi)[P_HOWARD].Vorschub = 6;
+	_G(spieler_mi)[P_NICHELLE].Vorschub = 4;
 
-	if (_G(spieler).flags35_80 && spieler_vector->Xypos[P_CHEWY] > 830)
+	if (_G(spieler).flags35_80 && _G(spieler_vector)->Xypos[P_CHEWY] > 830)
 		set_person_pos(830, 98, P_CHEWY, P_RIGHT);
 
 	if (_word18DB2E)
@@ -207,7 +207,7 @@ void Room97::setup_func() {
 
 	calc_person_look();
 
-	const int chewyPosX = spieler_vector[P_CHEWY].Xypos[0];
+	const int chewyPosX = _G(spieler_vector)[P_CHEWY].Xypos[0];
 	if (!_G(spieler).flags36_80) {
 		int destX, destY;
 
@@ -240,7 +240,7 @@ void Room97::setup_func() {
 
 	int destX = -1;
 	int destY = -1;
-	const int nichellePosX = spieler_vector[P_NICHELLE].Xypos[0];
+	const int nichellePosX = _G(spieler_vector)[P_NICHELLE].Xypos[0];
 	if (chewyPosX > 250 && nichellePosX < 232) {
 		destX = 232;
 		destY = 27;
@@ -266,13 +266,13 @@ void Room97::proc2() {
 	_G(Sdi)[6].z_ebene = 6;
 	_G(Sdi)[24].z_ebene = 6;
 	_G(spieler).flags36_1 = false;
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(455, 59, P_CHEWY, ANI_WAIT);
 	go_auto_xy(496, 99, P_CHEWY, ANI_WAIT);
 	go_auto_xy(530, 99, P_CHEWY, ANI_WAIT);
 	go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
 	go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(Sdi)[6].z_ebene = 166;
 	_G(Sdi)[24].z_ebene = 157;
 	show_cur();
@@ -286,7 +286,7 @@ void Room97::proc3() {
 	flags.AutoAniPlay = true;
 	hide_cur();
 	stop_person(P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
@@ -319,7 +319,7 @@ void Room97::proc3() {
 			go_auto_xy(497, 31, P_HOWARD, ANI_WAIT);
 			start_aad_wait(562, -1);
 		}
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(Sdi)[6].z_ebene = 166;
 		_G(Sdi)[24].z_ebene = 157;
 		_G(spieler).flags36_80 = true;
@@ -335,14 +335,14 @@ void Room97::proc4() {
 	if (!_G(spieler).flags35_80) {
 		flags.AutoAniPlay = true;
 		hide_cur();
-		spieler_mi[P_CHEWY].Mode = true;
+		_G(spieler_mi)[P_CHEWY].Mode = true;
 		stop_person(P_CHEWY);
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->stopSound(1);
 		start_detail_wait(9, 1, ANI_VOR);
 		_G(det)->show_static_spr(21);
 
-		while (spieler_vector[P_HOWARD].Xypos[0] > 996) {
+		while (_G(spieler_vector)[P_HOWARD].Xypos[0] > 996) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
@@ -367,7 +367,7 @@ void Room97::proc4() {
 		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
 		go_auto_xy(995, 82, P_HOWARD, ANI_WAIT);
 		_G(det)->hide_static_spr(2);
-		spieler_mi[P_CHEWY].Mode = false;
+		_G(spieler_mi)[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
 		_G(HowardMov) = 0;
@@ -385,7 +385,7 @@ int Room97::proc5() {
 	auto_move(0, P_CHEWY);
 	auto_scroll(800, 0);
 	
-	while (spieler_vector[P_HOWARD].Xypos[0] < 1080) {
+	while (_G(spieler_vector)[P_HOWARD].Xypos[0] < 1080) {
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
@@ -417,7 +417,7 @@ int Room97::proc6() {
 
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(298, 120, P_CHEWY, ANI_WAIT);
 	set_person_spr(P_LEFT, P_CHEWY);
 	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -438,7 +438,7 @@ int Room97::proc6() {
 	_G(atds)->set_steuer_bit(531, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(530, 1, ATS_DATEI);
 	_G(atds)->set_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).flags36_8 = true;
 
 	show_cur();
@@ -451,7 +451,7 @@ int Room97::proc7() {
 
 	hide_cur();
 	auto_move(2, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->hide_static_spr(17);
 	start_detail_wait(22, 1, ANI_VOR);
@@ -462,7 +462,7 @@ int Room97::proc7() {
 	set_person_pos(304, 102, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	auto_move(1, P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 
 	show_cur();
 	return 1;
@@ -630,7 +630,7 @@ void Room97::proc12() {
 	set_person_pos(347, 42, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(det)->hide_static_spr(26);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
 	flags.AutoAniPlay = false;
 }
@@ -642,7 +642,7 @@ void Room97::proc13() {
 	flags.AutoAniPlay = true;
 	hide_cur();
 	stop_person(P_CHEWY);
-	spieler_mi[P_CHEWY].Mode = true;
+	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(det)->show_static_spr(26);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(508, 41, P_CHEWY, P_LEFT);
@@ -651,7 +651,7 @@ void Room97::proc13() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	auto_move(6, P_CHEWY);
 	_G(det)->hide_static_spr(26);
-	spieler_mi[P_CHEWY].Mode = false;
+	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
 	flags.AutoAniPlay = false;
 }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 256688ad183..8617e6a23d3 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -159,30 +159,30 @@ void sprite_engine() {
 		case ZOBJ_CHEWY:
 			if (!_G(spieler).PersonHide[P_CHEWY]) {
 				if (!_G(spz_ani)[P_CHEWY]) {
-					spr_nr = _G(chewy_ph)[spieler_vector[P_CHEWY].Phase * 8 + spieler_vector[P_CHEWY].PhNr];
-					x = spieler_mi[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
-					y = spieler_mi[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
-					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak,
-					          (int16)_G(room)->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
+					spr_nr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
+					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak,
+					          (int16)_G(room)->_roomInfo->ZoomFak, &_G(spieler_vector)[P_CHEWY]);
 
 					_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y,
-					                spieler_vector[P_CHEWY].Xzoom,
-					                spieler_vector[P_CHEWY].Yzoom,
+					                _G(spieler_vector)[P_CHEWY].Xzoom,
+					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
 				} else {
-					spr_nr = _G(spz_spr_nr)[spieler_vector[P_CHEWY].PhNr];
-					x = spieler_mi[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->korrektur[spr_nr * 2] -
+					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[P_CHEWY].PhNr];
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->korrektur[spr_nr * 2] -
 					    _G(spieler).scrollx;
-					y = spieler_mi[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->korrektur[spr_nr * 2 + 1] -
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->korrektur[spr_nr * 2 + 1] -
 					    _G(spieler).scrolly;
-					calc_zoom(spieler_mi[P_CHEWY].XyzStart[1],
+					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1],
 					          (int16)_G(room)->_roomInfo->ZoomFak,
 					          (int16)_G(room)->_roomInfo->ZoomFak,
-					          &spieler_vector[P_CHEWY]);
+					          &_G(spieler_vector)[P_CHEWY]);
 
 					_G(out)->scale_set(_G(spz_tinfo)->image[spr_nr], x, y,
-					                spieler_vector[P_CHEWY].Xzoom,
-					                spieler_vector[P_CHEWY].Yzoom,
+					                _G(spieler_vector)[P_CHEWY].Xzoom,
+					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
 				}
 			}
@@ -194,47 +194,47 @@ void sprite_engine() {
 			if (!_G(spieler).PersonHide[p_nr]) {
 				if (!_G(spz_ani)[p_nr]) {
 					ts_info = _G(PersonTaf)[p_nr];
-					spr_nr = _G(PersonSpr)[p_nr][spieler_vector[p_nr].PhNr];
+					spr_nr = _G(PersonSpr)[p_nr][_G(spieler_vector)[p_nr].PhNr];
 				} else {
 					ts_info = _G(spz_tinfo);
-					spr_nr = _G(spz_spr_nr)[spieler_vector[p_nr].PhNr];
+					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[p_nr].PhNr];
 				}
 
-				x = spieler_mi[p_nr].XyzStart[0] +
+				x = _G(spieler_mi)[p_nr].XyzStart[0] +
 				    ts_info->korrektur[spr_nr * 2] -
 				    _G(spieler).scrollx;
-				y = spieler_mi[p_nr].XyzStart[1] +
+				y = _G(spieler_mi)[p_nr].XyzStart[1] +
 				    ts_info->korrektur[spr_nr * 2 + 1] -
 				    _G(spieler).scrolly;
-				calc_zoom(spieler_mi[p_nr].XyzStart[1],
+				calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1],
 				          _G(spieler).ZoomXy[p_nr][0],
 				          _G(spieler).ZoomXy[p_nr][1],
-				          &spieler_vector[p_nr]);
+				          &_G(spieler_vector)[p_nr]);
 				_G(out)->scale_set(ts_info->image[spr_nr], x, y,
-				                spieler_vector[p_nr].Xzoom,
-				                spieler_vector[p_nr].Yzoom,
+				                _G(spieler_vector)[p_nr].Xzoom,
+				                _G(spieler_vector)[p_nr].Yzoom,
 				                _G(scr_width));
 			}
 			break;
 		case ZOBJ_PROGANI:
-			_G(out)->sprite_set(spr_info[nr].Image,
-			                 spr_info[nr].X - _G(spieler).scrollx,
-			                 spr_info[nr].Y - _G(spieler).scrolly, 0);
+			_G(out)->sprite_set(_G(spr_info)[nr].Image,
+			                 _G(spr_info)[nr].X - _G(spieler).scrollx,
+			                 _G(spr_info)[nr].Y - _G(spieler).scrolly, 0);
 			break;
 
 		case ZOBJ_AUTO_OBJ:
-			spr_nr = mov_phasen[nr].Phase[auto_mov_vector[nr].Phase][0] +
-			         auto_mov_vector[nr].PhNr;
+			spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
+			         _G(auto_mov_vector)[nr].PhNr;
 			Cxy = room_blk.DetKorrekt + (spr_nr << 1);
-			calc_zoom(auto_mov_vector[nr].Xypos[1],
-			          mov_phasen[nr].ZoomFak,
-			          mov_phasen[nr].ZoomFak,
-			          &auto_mov_vector[nr]);
+			calc_zoom(_G(auto_mov_vector)[nr].Xypos[1],
+			          _G(mov_phasen)[nr].ZoomFak,
+			          _G(mov_phasen)[nr].ZoomFak,
+			          &_G(auto_mov_vector)[nr]);
 			_G(out)->scale_set(room_blk.DetImage[spr_nr],
-			                auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
-			                auto_mov_vector[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
-			                auto_mov_vector[nr].Xzoom,
-			                auto_mov_vector[nr].Yzoom, _G(scr_width));
+			                _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
+			                _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
+			                _G(auto_mov_vector)[nr].Xzoom,
+			                _G(auto_mov_vector)[nr].Yzoom, _G(scr_width));
 			break;
 
 		default:
@@ -250,11 +250,11 @@ void calc_z_ebene() {
 
 	for (i = 0; i < MAX_PERSON; i++) {
 		if (_G(spieler).PersonRoomNr[P_CHEWY + i] == _G(spieler).PersonRoomNr[P_CHEWY] &&
-		        spieler_mi[P_CHEWY + i].Id != NO_MOV_OBJ) {
+		        _G(spieler_mi)[P_CHEWY + i].Id != NO_MOV_OBJ) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_CHEWY + i;
-			_G(z_obj_sort)[_G(z_count)].ObjZ = spieler_vector[P_CHEWY + i].Xypos[1] +
-			                           spieler_mi[P_CHEWY + i].HotMovY
-			                           - abs(spieler_vector[P_CHEWY + i].Yzoom);
+			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spieler_vector)[P_CHEWY + i].Xypos[1] +
+			                           _G(spieler_mi)[P_CHEWY + i].HotMovY
+			                           - abs(_G(spieler_vector)[P_CHEWY + i].Yzoom);
 			++_G(z_count);
 		}
 	}
@@ -285,19 +285,19 @@ void calc_z_ebene() {
 	}
 
 	for (i = 0; i < MAX_PROG_ANI; i++) {
-		if (spr_info[i].ZEbene < 200) {
+		if (_G(spr_info)[i].ZEbene < 200) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_PROGANI;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
-			_G(z_obj_sort)[_G(z_count)].ObjZ = spr_info[i].ZEbene;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spr_info)[i].ZEbene;
 			++_G(z_count);
 		}
 	}
 
 	for (i = 0; i < _G(auto_obj); i++) {
-		if (auto_mov_vector[i].Xypos[2] < 200) {
+		if (_G(auto_mov_vector)[i].Xypos[2] < 200) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_AUTO_OBJ;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
-			_G(z_obj_sort)[_G(z_count)].ObjZ = auto_mov_vector[i].Xypos[2];
+			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(auto_mov_vector)[i].Xypos[2];
 			++_G(z_count);
 		}
 	}
@@ -309,8 +309,8 @@ int16 mouse_on_prog_ani() {
 	ani_nr = -1;
 	for (i = 0; i < MAX_PROG_ANI && ani_nr == -1; i++) {
 
-		if (minfo.x >= spr_info[i].X && minfo.x <= spr_info[i].X1 &&
-		        minfo.y >= spr_info[i].Y && minfo.y <= spr_info[i].Y1) {
+		if (minfo.x >= _G(spr_info)[i].X && minfo.x <= _G(spr_info)[i].X1 &&
+		        minfo.y >= _G(spr_info)[i].Y && minfo.y <= _G(spr_info)[i].Y1) {
 			ani_nr = i;
 		}
 	}
@@ -323,26 +323,26 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	int16 tmp_nr;
 	if (richtung != -1)
 		set_person_spr(richtung, p_nr);
-	spieler_vector[p_nr].Xypos[0] = x;
-	spieler_vector[p_nr].Xypos[1] = y;
-	spieler_mi[p_nr].XyzStart[0] = x;
-	spieler_mi[p_nr].XyzStart[1] = y;
-	spieler_vector[p_nr].Count = 0;
-	spieler_vector[p_nr].Delay = _G(spieler).DelaySpeed;
-	spieler_vector[p_nr].DelayCount = 0;
-	calc_zoom(spieler_mi[p_nr].XyzStart[1],
+	_G(spieler_vector)[p_nr].Xypos[0] = x;
+	_G(spieler_vector)[p_nr].Xypos[1] = y;
+	_G(spieler_mi)[p_nr].XyzStart[0] = x;
+	_G(spieler_mi)[p_nr].XyzStart[1] = y;
+	_G(spieler_vector)[p_nr].Count = 0;
+	_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed;
+	_G(spieler_vector)[p_nr].DelayCount = 0;
+	calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1],
 	          _G(spieler).ZoomXy[p_nr][0],
 	          _G(spieler).ZoomXy[p_nr][1],
-	          &spieler_vector[p_nr]);
+	          &_G(spieler_vector)[p_nr]);
 	tmp_nr = p_nr;
 	if (p_nr >= P_NICHELLE) {
 		++tmp_nr;
 	}
-	_G(ssi)[tmp_nr].X = spieler_vector[p_nr].Xypos[0] - _G(spieler).scrollx + spieler_mi[p_nr].HotX;
-	_G(ssi)[tmp_nr].Y = spieler_vector[p_nr].Xypos[1] - _G(spieler).scrolly;
+	_G(ssi)[tmp_nr].X = _G(spieler_vector)[p_nr].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[p_nr].HotX;
+	_G(ssi)[tmp_nr].Y = _G(spieler_vector)[p_nr].Xypos[1] - _G(spieler).scrolly;
 	if (!flags.ExitMov) {
 		if (p_nr == P_CHEWY) {
-			u_index = _G(ged)->ged_idx(x + spieler_mi[p_nr].HotX, y + spieler_mi[p_nr].HotY,
+			u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[p_nr].HotX, y + _G(spieler_mi)[p_nr].HotY,
 			                        _G(room)->_gedXAnz[room_blk.AkAblage],
 			                        _G(ged_mem)[room_blk.AkAblage]);
 			check_shad(u_index, 1);
@@ -361,17 +361,17 @@ void set_person_spr(int16 nr, int16 p_nr) {
 	case P_CHEWY:
 		switch (nr) {
 		case P_LEFT:
-			spieler_vector[P_CHEWY].Phase = CH_L_STEHEN;
-			spieler_vector[P_CHEWY].PhNr = 0;
-			spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_L_STEHEN];
-			person_end_phase[P_CHEWY] = P_LEFT;
+			_G(spieler_vector)[P_CHEWY].Phase = CH_L_STEHEN;
+			_G(spieler_vector)[P_CHEWY].PhNr = 0;
+			_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_L_STEHEN];
+			_G(person_end_phase)[P_CHEWY] = P_LEFT;
 			break;
 
 		case P_RIGHT:
-			spieler_vector[P_CHEWY].Phase = CH_R_STEHEN;
-			spieler_vector[P_CHEWY].PhNr = 0;
-			spieler_vector[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_R_STEHEN];
-			person_end_phase[P_CHEWY] = P_RIGHT;
+			_G(spieler_vector)[P_CHEWY].Phase = CH_R_STEHEN;
+			_G(spieler_vector)[P_CHEWY].PhNr = 0;
+			_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[CH_R_STEHEN];
+			_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 			break;
 
 		}
@@ -381,22 +381,22 @@ void set_person_spr(int16 nr, int16 p_nr) {
 	case P_NICHELLE:
 #define HO_L_STEHEN 0
 #define HO_R_STEHEN 0
-		spieler_vector[p_nr].PhNr = 0;
-		spieler_vector[p_nr].PhAnz = 8;
-		person_end_phase[p_nr] = P_LEFT;
+		_G(spieler_vector)[p_nr].PhNr = 0;
+		_G(spieler_vector)[p_nr].PhAnz = 8;
+		_G(person_end_phase)[p_nr] = P_LEFT;
 		switch (nr) {
 		case P_LEFT:
-			spieler_vector[p_nr].Phase = HO_L_STEHEN;
-			spieler_vector[p_nr].PhNr = 0;
-			spieler_vector[p_nr].PhAnz = 8;
-			person_end_phase[p_nr] = P_LEFT;
+			_G(spieler_vector)[p_nr].Phase = HO_L_STEHEN;
+			_G(spieler_vector)[p_nr].PhNr = 0;
+			_G(spieler_vector)[p_nr].PhAnz = 8;
+			_G(person_end_phase)[p_nr] = P_LEFT;
 			break;
 
 		case P_RIGHT:
-			spieler_vector[p_nr].Phase = HO_R_STEHEN;
-			spieler_vector[p_nr].PhNr = 0;
-			spieler_vector[p_nr].PhAnz = 8;
-			person_end_phase[p_nr] = P_RIGHT;
+			_G(spieler_vector)[p_nr].Phase = HO_R_STEHEN;
+			_G(spieler_vector)[p_nr].PhNr = 0;
+			_G(spieler_vector)[p_nr].PhAnz = 8;
+			_G(person_end_phase)[p_nr] = P_RIGHT;
 			break;
 
 		}
@@ -409,7 +409,7 @@ void set_person_spr(int16 nr, int16 p_nr) {
 
 void stop_person(int16 p_nr) {
 	_G(mov)->stop_auto_go();
-	spieler_vector[p_nr].Count = 0;
+	_G(spieler_vector)[p_nr].Count = 0;
 
 }
 
@@ -516,7 +516,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			// subtitles only mode. Don't allow this in ScummVM
 			} else if (VocNr >= 0 && !g_engine->_sound->isSpeechMuted()) {
 				ret = true;
-				vocx = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
+				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));
 				g_engine->_sound->playSpeech(VocNr);
 				//warning("FIXME - unknown constant SMP_PLAYING");
@@ -556,8 +556,8 @@ void aad_wait(int16 str_nr) {
 void start_aad(int16 dia_nr, int16 ssi_nr) {
 	switch (ssi_nr) {
 	case 0:
-		_G(ssi)[0].X = spieler_vector[P_CHEWY].Xypos[0] - _G(spieler).scrollx + spieler_mi[P_CHEWY].HotX;
-		_G(ssi)[0].Y = spieler_vector[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
+		_G(ssi)[0].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+		_G(ssi)[0].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 		_G(atds)->set_split_win(0, &_G(ssi)[0]);
 		break;
 
@@ -581,7 +581,7 @@ void start_ads_wait(int16 dia_nr) {
 void wait_auto_obj(int16 nr) {
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	while (mov_phasen[nr].Repeat != -1 && !SHOULD_QUIT) {
+	while (_G(mov_phasen)[nr].Repeat != -1 && !SHOULD_QUIT) {
 		set_up_screen(DO_SETUP);
 	}
 	_G(maus_links_click) = _G(tmp_maus_links);
@@ -589,15 +589,15 @@ void wait_auto_obj(int16 nr) {
 
 void stop_auto_obj(int16 nr) {
 	if (nr < _G(auto_obj)) {
-		mov_phasen[nr].Start = false;
+		_G(mov_phasen)[nr].Start = false;
 	}
 }
 
 void continue_auto_obj(int16 nr, int16 repeat) {
 	if (nr < _G(auto_obj)) {
-		mov_phasen[nr].Start = 1;
+		_G(mov_phasen)[nr].Start = 1;
 		if (repeat)
-			mov_phasen[nr].Repeat = repeat;
+			_G(mov_phasen)[nr].Repeat = repeat;
 	}
 }
 
@@ -607,12 +607,12 @@ void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLin
 	MovLine *tmp1;
 	const MovLine *tmp2;
 	tmp2 = mline;
-	tmp = (int16 *)mov_phasen[auto_nr].Phase;
+	tmp = (int16 *)_G(mov_phasen)[auto_nr].Phase;
 	for (i = 0; i < 8; i++)
 		tmp[i] = phasen[i];
-	mov_phasen[auto_nr].Start = 1;
+	_G(mov_phasen)[auto_nr].Start = 1;
 
-	tmp1 = mov_line[auto_nr];
+	tmp1 = _G(mov_line)[auto_nr];
 	for (i = 0; i < lines; i++) {
 		tmp1->EndXyz[0] = tmp2->EndXyz[0];
 		tmp1->EndXyz[1] = tmp2->EndXyz[1];
@@ -623,53 +623,53 @@ void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLin
 		++tmp2;
 	}
 
-	auto_mov_obj[auto_nr].XyzEnd[0] = mline->EndXyz[0];
-	auto_mov_obj[auto_nr].XyzEnd[1] = mline->EndXyz[1];
-	auto_mov_obj[auto_nr].XyzEnd[2] = mline->EndXyz[2];
+	_G(auto_mov_obj)[auto_nr].XyzEnd[0] = mline->EndXyz[0];
+	_G(auto_mov_obj)[auto_nr].XyzEnd[1] = mline->EndXyz[1];
+	_G(auto_mov_obj)[auto_nr].XyzEnd[2] = mline->EndXyz[2];
 
-	auto_mov_vector[auto_nr].Count = 0;
-	auto_mov_vector[auto_nr].StNr = 0;
-	auto_mov_vector[auto_nr].DelayCount = 0;
+	_G(auto_mov_vector)[auto_nr].Count = 0;
+	_G(auto_mov_vector)[auto_nr].StNr = 0;
+	_G(auto_mov_vector)[auto_nr].DelayCount = 0;
 	new_auto_line(auto_nr);
 }
 
 void new_auto_line(int16 nr) {
 
 	if (nr < _G(auto_obj)) {
-		if (mov_phasen[nr].Repeat != -1 &&
-		        mov_phasen[nr].Start) {
+		if (_G(mov_phasen)[nr].Repeat != -1 &&
+		        _G(mov_phasen)[nr].Start) {
 
-			if (auto_mov_vector[nr].StNr < mov_phasen[nr].Lines) {
-				++auto_mov_vector[nr].StNr;
+			if (_G(auto_mov_vector)[nr].StNr < _G(mov_phasen)[nr].Lines) {
+				++_G(auto_mov_vector)[nr].StNr;
 			} else {
 
-				auto_mov_vector[nr].StNr = 1;
-				if (mov_phasen[nr].Repeat != 255) {
-					--mov_phasen[nr].Repeat;
+				_G(auto_mov_vector)[nr].StNr = 1;
+				if (_G(mov_phasen)[nr].Repeat != 255) {
+					--_G(mov_phasen)[nr].Repeat;
 				}
 			}
-			if (!mov_phasen[nr].Repeat) {
-				auto_mov_vector[nr].Xypos[2] = 201;
-				mov_phasen[nr].Repeat = -1;
-				mov_phasen[nr].Start = 0;
+			if (!_G(mov_phasen)[nr].Repeat) {
+				_G(auto_mov_vector)[nr].Xypos[2] = 201;
+				_G(mov_phasen)[nr].Repeat = -1;
+				_G(mov_phasen)[nr].Start = 0;
 			} else {
-				auto_mov_vector[nr].Phase = mov_line[nr][auto_mov_vector[nr].StNr - 1].PhNr;
-				auto_mov_vector[nr].PhNr = 0;
-
-				auto_mov_vector[nr].PhAnz = (mov_phasen[nr].Phase[auto_mov_vector[nr].Phase][1] -
-				                             mov_phasen[nr].Phase[auto_mov_vector[nr].Phase][0]) + 1;
-				auto_mov_obj[nr].Vorschub = mov_line[nr][auto_mov_vector[nr].StNr - 1].Vorschub;
-				auto_mov_obj[nr].XyzStart[0] = auto_mov_obj[nr].XyzEnd[0];
-				auto_mov_obj[nr].XyzStart[1] = auto_mov_obj[nr].XyzEnd[1];
-				auto_mov_obj[nr].XyzStart[2] = auto_mov_obj[nr].XyzEnd[2];
-				auto_mov_obj[nr].XyzEnd[0] = mov_line[nr][auto_mov_vector[nr].StNr - 1].EndXyz[0] ;
-				auto_mov_obj[nr].XyzEnd[1] = mov_line[nr][auto_mov_vector[nr].StNr - 1].EndXyz[1] ;;
-				auto_mov_obj[nr].XyzEnd[2] = mov_line[nr][auto_mov_vector[nr].StNr - 1].EndXyz[2] ;;
-				_G(mov)->get_mov_vector((int16 *)auto_mov_obj[nr].XyzStart,
-				                     auto_mov_obj[nr].Vorschub, &auto_mov_vector[nr]);
+				_G(auto_mov_vector)[nr].Phase = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].PhNr;
+				_G(auto_mov_vector)[nr].PhNr = 0;
+
+				_G(auto_mov_vector)[nr].PhAnz = (_G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][1] -
+				                             _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0]) + 1;
+				_G(auto_mov_obj)[nr].Vorschub = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].Vorschub;
+				_G(auto_mov_obj)[nr].XyzStart[0] = _G(auto_mov_obj)[nr].XyzEnd[0];
+				_G(auto_mov_obj)[nr].XyzStart[1] = _G(auto_mov_obj)[nr].XyzEnd[1];
+				_G(auto_mov_obj)[nr].XyzStart[2] = _G(auto_mov_obj)[nr].XyzEnd[2];
+				_G(auto_mov_obj)[nr].XyzEnd[0] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[0] ;
+				_G(auto_mov_obj)[nr].XyzEnd[1] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[1] ;;
+				_G(auto_mov_obj)[nr].XyzEnd[2] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[2] ;;
+				_G(mov)->get_mov_vector((int16 *)_G(auto_mov_obj)[nr].XyzStart,
+				                     _G(auto_mov_obj)[nr].Vorschub, &_G(auto_mov_vector)[nr]);
 			}
 		} else {
-			auto_mov_vector[nr].Xypos[2] = 201;
+			_G(auto_mov_vector)[nr].Xypos[2] = 201;
 		}
 	}
 }
@@ -680,24 +680,24 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 	int16 *xy;
 	int16 *Cxy;
 	ret = false;
-	if (mov_phasen[nr].Start == 1) {
-		spr_nr = mov_phasen[nr].Phase[auto_mov_vector[nr].Phase][0] +
-		         auto_mov_vector[nr].PhNr;
+	if (_G(mov_phasen)[nr].Start == 1) {
+		spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
+		         _G(auto_mov_vector)[nr].PhNr;
 		xy = (int16 *)room_blk.DetImage[spr_nr];
 		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
 
 		if (!xoff) {
 			xoff = xy ? xy[0] : 0;
-			xoff += auto_mov_vector[nr].Xzoom;
+			xoff += _G(auto_mov_vector)[nr].Xzoom;
 		}
 		if (!yoff) {
 			yoff = xy ? xy[1] : 0;
-			yoff += auto_mov_vector[nr].Yzoom;
+			yoff += _G(auto_mov_vector)[nr].Yzoom;
 		}
-		if (minfo.x >= auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx &&
-		        minfo.x <= auto_mov_vector[nr].Xypos[0] + xoff + Cxy[0] - _G(spieler).scrollx &&
-		        minfo.y >= auto_mov_vector[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly &&
-		        minfo.y <= auto_mov_vector[nr].Xypos[1] + yoff + Cxy[1] - _G(spieler).scrolly)
+		if (minfo.x >= _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx &&
+		        minfo.x <= _G(auto_mov_vector)[nr].Xypos[0] + xoff + Cxy[0] - _G(spieler).scrollx &&
+		        minfo.y >= _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly &&
+		        minfo.y <= _G(auto_mov_vector)[nr].Xypos[1] + yoff + Cxy[1] - _G(spieler).scrolly)
 			ret = true;
 	}
 	return ret;
@@ -707,7 +707,7 @@ int16 auto_obj_status(int16 nr) {
 	int16 status;
 	status = false;
 	if (nr < _G(auto_obj)) {
-		if (mov_phasen[nr].Repeat != -1)
+		if (_G(mov_phasen)[nr].Repeat != -1)
 			status = true;
 	}
 
@@ -950,21 +950,21 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 }
 
 void calc_person_end_ani(ObjMov *om, int16 p_nr) {
-	if (ani_stand_count[p_nr] >= 25 * (_G(spieler).DelaySpeed + p_nr * 2)) {
-		ani_stand_count[p_nr] = 0;
+	if (_G(ani_stand_count)[p_nr] >= 25 * (_G(spieler).DelaySpeed + p_nr * 2)) {
+		_G(ani_stand_count)[p_nr] = 0;
 		om->PhNr = 0;
-		ani_stand_flag[p_nr] = true;
-		set_person_spr(person_end_phase[p_nr], p_nr);
-	} else if (ani_stand_flag[p_nr]) {
+		_G(ani_stand_flag)[p_nr] = true;
+		set_person_spr(_G(person_end_phase)[p_nr], p_nr);
+	} else if (_G(ani_stand_flag)[p_nr]) {
 		om->Delay = _G(spieler).DelaySpeed + 1;
 		if (om->PhNr < om->PhAnz - 1)
 			++om->PhNr;
 		else
-			ani_stand_flag[p_nr] = false;
+			_G(ani_stand_flag)[p_nr] = false;
 	} else {
-		set_person_spr(person_end_phase[p_nr], p_nr);
+		set_person_spr(_G(person_end_phase)[p_nr], p_nr);
 		om->PhNr = 0;
-		++ani_stand_count[p_nr];
+		++_G(ani_stand_count)[p_nr];
 	}
 }
 
@@ -978,22 +978,22 @@ void get_phase(ObjMov *om, MovInfo *mi) {
 				if (om->Xyvo[1] > (mi->Vorschub - 1)) {
 					om->Phase = CH_DOWN;
 					if (om->Xypos[0] - _G(spieler).scrollx > SCREEN_WIDTH / 2)
-						person_end_phase[p_nr] = P_LEFT;
+						_G(person_end_phase)[p_nr] = P_LEFT;
 					else
-						person_end_phase[p_nr] = P_RIGHT;
+						_G(person_end_phase)[p_nr] = P_RIGHT;
 				} else {
 					om->Phase = CH_RIGHT_NO;
-					person_end_phase[p_nr] = P_RIGHT;
+					_G(person_end_phase)[p_nr] = P_RIGHT;
 				}
 			} else {
 				if (om->Xyvo[1] < - (mi->Vorschub - 1)) {
 					om->Phase = CH_UP;
 					if (om->Xypos[0] - _G(spieler).scrollx > SCREEN_WIDTH / 2)
-						person_end_phase[p_nr] = P_LEFT;
+						_G(person_end_phase)[p_nr] = P_LEFT;
 					else
-						person_end_phase[p_nr] = P_RIGHT;
+						_G(person_end_phase)[p_nr] = P_RIGHT;
 				} else {
-					person_end_phase[p_nr] = P_RIGHT;
+					_G(person_end_phase)[p_nr] = P_RIGHT;
 					om->Phase = CH_RIGHT_NO;
 				}
 			}
@@ -1003,22 +1003,22 @@ void get_phase(ObjMov *om, MovInfo *mi) {
 				if (om->Xyvo[1] > (mi->Vorschub - 1)) {
 					om->Phase = CH_DOWN;
 					if (om->Xypos[0] - _G(spieler).scrollx > SCREEN_WIDTH / 2)
-						person_end_phase[p_nr] = P_LEFT;
+						_G(person_end_phase)[p_nr] = P_LEFT;
 					else
-						person_end_phase[p_nr] = P_RIGHT;
+						_G(person_end_phase)[p_nr] = P_RIGHT;
 				} else {
-					person_end_phase[p_nr] = P_LEFT;
+					_G(person_end_phase)[p_nr] = P_LEFT;
 					om->Phase = CH_LEFT_NO;
 				}
 			} else {
 				if (om->Xyvo[1] < -(mi->Vorschub - 1)) {
 					om->Phase = CH_UP;
 					if (om->Xypos[0] - _G(spieler).scrollx > SCREEN_WIDTH / 2)
-						person_end_phase[p_nr] = P_LEFT;
+						_G(person_end_phase)[p_nr] = P_LEFT;
 					else
-						person_end_phase[p_nr] = P_RIGHT;
+						_G(person_end_phase)[p_nr] = P_RIGHT;
 				} else {
-					person_end_phase[p_nr] = P_LEFT;
+					_G(person_end_phase)[p_nr] = P_LEFT;
 					om->Phase = CH_LEFT_NO;
 				}
 			}
@@ -1077,7 +1077,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		_G(spz_p_nr) = p_nr;
 		spr_start = SPZ_ANI_PH[ani_id][0];
 		spr_anz = SPZ_ANI_PH[ani_id][1];
-		if (person_end_phase[p_nr] == P_RIGHT) {
+		if (_G(person_end_phase)[p_nr] == P_RIGHT) {
 			ani_id += 100;
 			spr_start += CH_SPZ_OFFSET;
 		}
@@ -1098,11 +1098,11 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 
 		_G(spz_start) = spr_start;
 		_G(spz_delay)[p_nr] = _G(SpzDelay);
-		spieler_vector[p_nr].Count = 0;
-		spieler_vector[p_nr].PhNr = 0;
-		spieler_vector[p_nr].PhAnz = spr_anz;
-		spieler_vector[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
-		spieler_vector[p_nr].DelayCount = 0;
+		_G(spieler_vector)[p_nr].Count = 0;
+		_G(spieler_vector)[p_nr].PhNr = 0;
+		_G(spieler_vector)[p_nr].PhAnz = spr_anz;
+		_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
+		_G(spieler_vector)[p_nr].DelayCount = 0;
 		_G(spz_count) = count;
 		flags.MausLinks = true;
 		ret = true;
@@ -1130,9 +1130,9 @@ void stop_spz() {
 		flags.SpzAni = false;
 		flags.MausLinks = false;
 		_G(spz_ani)[_G(spz_p_nr)] = false;
-		spieler_vector[_G(spz_p_nr)].Count = 0;
-		spieler_vector[_G(spz_p_nr)].PhNr = 0;
-		set_person_spr(person_end_phase[_G(spz_p_nr)], _G(spz_p_nr));
+		_G(spieler_vector)[_G(spz_p_nr)].Count = 0;
+		_G(spieler_vector)[_G(spz_p_nr)].PhNr = 0;
+		set_person_spr(_G(person_end_phase)[_G(spz_p_nr)], _G(spz_p_nr));
 		_G(spz_delay)[_G(spz_p_nr)] = 0;
 	}
 }
@@ -1151,8 +1151,8 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
 		if (_G(PersonTaf)[p_nr])
 			free((char *)_G(PersonTaf)[p_nr]);
 		_G(PersonTaf)[p_nr] = _G(mem)->taf_seq_adr(ani_start, ani_anz);
-		spieler_vector[p_nr].PhNr = 0;
-		spieler_vector[p_nr].PhAnz = ani_anz;
+		_G(spieler_vector)[p_nr].PhNr = 0;
+		_G(spieler_vector)[p_nr].PhAnz = ani_anz;
 	}
 }
 
@@ -1166,7 +1166,7 @@ void calc_person_ani() {
 	int16 p_nr;
 	int16 ani_nr = 0;
 	for (p_nr = 0; p_nr < MAX_PERSON; p_nr++) {
-		if (spieler_mi[p_nr].Id != NO_MOV_OBJ) {
+		if (_G(spieler_mi)[p_nr].Id != NO_MOV_OBJ) {
 			switch (p_nr) {
 			case P_CHEWY:
 				break;
@@ -1177,15 +1177,15 @@ void calc_person_ani() {
 					for (i = 0; i < 8; i++)
 						_G(PersonSpr)[p_nr][i] = i;
 
-					if (!spieler_vector[p_nr].Count &&
+					if (!_G(spieler_vector)[p_nr].Count &&
 					        _G(auto_p_nr) != p_nr) {
-						ani_nr = (int16)p_ani[p_nr - 1][4] + (person_end_phase[p_nr] * 4);
+						ani_nr = (int16)p_ani[p_nr - 1][4] + (_G(person_end_phase)[p_nr] * 4);
 
-						spieler_vector[p_nr].PhAnz = 5;
+						_G(spieler_vector)[p_nr].PhAnz = 5;
 						_G(PersonSpr)[p_nr][3] = 1;
 						_G(PersonSpr)[p_nr][4] = 0;
 					} else {
-						switch (spieler_vector[p_nr].Phase) {
+						switch (_G(spieler_vector)[p_nr].Phase) {
 						case CH_LEFT_NO:
 							ani_nr = (int16)p_ani[p_nr - 1][0];
 							break;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index f6c2805b982..d949e13117a 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -58,8 +58,8 @@ void set_ssi_xy() {
 	for (int16 i = 0; i < MAX_PERSON; i++) {
 		if (i >= P_NICHELLE)
 			tmp = 1;
-		_G(ssi)[i + tmp].X = spieler_vector[i].Xypos[0] - _G(spieler).scrollx + spieler_mi[i].HotX;
-		_G(ssi)[i + tmp].Y = spieler_vector[i].Xypos[1] - _G(spieler).scrolly;
+		_G(ssi)[i + tmp].X = _G(spieler_vector)[i].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[i].HotX;
+		_G(ssi)[i + tmp].Y = _G(spieler_vector)[i].Xypos[1] - _G(spieler).scrolly;
 		_G(atds)->set_split_win(i + tmp, &_G(ssi)[i + tmp]);
 	}
 }


Commit: a4a0f0a009836957ea71a19b5187aaef6971424c
    https://github.com/scummvm/scummvm/commit/a4a0f0a009836957ea71a19b5187aaef6971424c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:31-08:00

Commit Message:
CHEWY: Move final globals from global.cpp to Globals

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/debugger.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/events.cpp
    engines/chewy/global.cpp
    engines/chewy/global.h
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room19.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 311e1b9a3b7..8ff5ddbe89b 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -105,7 +105,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 			return Common::kReadingFailed;
 		adh->writeStream(stream, adh->size());
 
-		flags.LoadGame = true;
+		_G(flags).LoadGame = true;
 
 		if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1) {
 			_G(menu_item) = CUR_USE;
@@ -113,11 +113,11 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
-		_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+		_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 		load_chewy_taf(_G(spieler).ChewyAni);
 
 		_G(fx_blend) = BLEND1;
-		_G(room)->calc_invent(&room_blk, &_G(spieler));
+		_G(room)->calc_invent(&_G(room_blk), &_G(spieler));
 
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
@@ -132,7 +132,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		_G(auto_obj) = 0;
 
 		enter_room(-1);
-		flags.LoadGame = false;
+		_G(flags).LoadGame = false;
 
 		return Common::kNoError;
 	}
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index f1b45703e46..5e513f4d08c 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -61,7 +61,7 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 		int roomNum = strToInt(argv[1]);
 		exit_room(-1);
 		_G(spieler).PersonRoomNr[P_CHEWY] = roomNum;
-		_G(room)->load_room(&room_blk, roomNum, &_G(spieler));
+		_G(room)->load_room(&_G(room_blk), roomNum, &_G(spieler));
 		_G(fx_blend) = BLEND1;
 		enter_room(-1);
 
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 573fe44a797..a5f3c5b0823 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -56,15 +56,15 @@ void Cinema::execute() {
 	_G(atds)->load_atds(98, 1);
 
 	_G(room)->open_handle(GBOOK, "rb", 0);
-	_G(room)->load_tgp(4, &room_blk, 1, 0, GBOOK);
+	_G(room)->load_tgp(4, &_G(room_blk), 1, 0, GBOOK);
 	show_cur();
 	EVENTS_CLEAR;
-	kbinfo.scan_code = 0;
+	_G(kbinfo).scan_code = 0;
 
 	for (bool endLoop = false; !endLoop;) {
 		timer_nr = 0;
 		_G(out)->setze_zeiger(_G(workptr));
-		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
 			// Render cutscene list
@@ -83,11 +83,11 @@ void Cinema::execute() {
 			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), none);
 		}
 
-		if (minfo.button == 1 && !flag) {
+		if (_G(minfo).button == 1 && !flag) {
 			flag = true;
-			switch (_G(in)->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
+			switch (_G(in)->maus_vector(_G(minfo).x, _G(minfo).y, CINEMA_TBL, 3)) {
 			case 0:
-				kbinfo.scan_code = Common::KEYCODE_UP;
+				_G(kbinfo).scan_code = Common::KEYCODE_UP;
 				if (!endLoop) {
 					endLoop = true;
 					timer_nr = 5;
@@ -95,7 +95,7 @@ void Cinema::execute() {
 				break;
 
 			case 1:
-				kbinfo.scan_code = Common::KEYCODE_DOWN;
+				_G(kbinfo).scan_code = Common::KEYCODE_DOWN;
 				if (!endLoop) {
 					endLoop = true;
 					timer_nr = 5;
@@ -104,20 +104,20 @@ void Cinema::execute() {
 
 			case 2:
 			{
-				int selIndex = (minfo.y - 68) / 10 + topIndex;
+				int selIndex = (_G(minfo).y - 68) / 10 + topIndex;
 				if (selIndex < (int)cutscenes.size())
 					selected = selIndex;
-				kbinfo.scan_code = Common::KEYCODE_RETURN;
+				_G(kbinfo).scan_code = Common::KEYCODE_RETURN;
 				break;
 			}
 
 			default:
 				break;
 			}
-		} else if (minfo.button == 2 && !flag) {
-			kbinfo.scan_code = Common::KEYCODE_ESCAPE;
+		} else if (_G(minfo).button == 2 && !flag) {
+			_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 			flag = true;
-		} else if (minfo.button != 1) {
+		} else if (_G(minfo).button != 1) {
 			flag = false;
 			timer_nr = 0;
 			delay = 0;
@@ -127,10 +127,10 @@ void Cinema::execute() {
 				flag = false;
 		}
 
-		switch (kbinfo.scan_code) {
+		switch (_G(kbinfo).scan_code) {
 		case Common::KEYCODE_ESCAPE:
 			endLoop = true;
-			kbinfo.scan_code = 0;
+			_G(kbinfo).scan_code = 0;
 			break;
 
 		case Common::KEYCODE_UP:
@@ -140,7 +140,7 @@ void Cinema::execute() {
 			} else if (topIndex > 0) {
 				--topIndex;
 			}
-			kbinfo.scan_code = 0;
+			_G(kbinfo).scan_code = 0;
 			break;
 
 		case Common::KEYCODE_DOWN:
@@ -154,7 +154,7 @@ void Cinema::execute() {
 				if ((topIndex + newIndex) < (int)cutscenes.size())
 					++selected;
 			}
-			kbinfo.scan_code = 0;
+			_G(kbinfo).scan_code = 0;
 			break;
 		}
 
@@ -180,8 +180,8 @@ void Cinema::execute() {
 		}
 
 		// The below are hacks to get the dialog to work in ScummVM
-		kbinfo.scan_code = 0;
-		minfo.button = 0;
+		_G(kbinfo).scan_code = 0;
+		_G(minfo).button = 0;
 		txt_anz = 0;
 
 		if (!txt_anz) {
@@ -190,7 +190,7 @@ void Cinema::execute() {
 			if (flag) {
 				flag = false;
 				_G(out)->setze_zeiger(_G(screen0));
-				_G(room)->set_ak_pal(&room_blk);
+				_G(room)->set_ak_pal(&_G(room_blk));
 				_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			} else {
 				_G(out)->back2screen(_G(workpage));
@@ -202,7 +202,7 @@ void Cinema::execute() {
 	}
 
 	_G(room)->open_handle(EPISODE1, "rb", 0);
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	hide_cur();
 	_G(uhr)->reset_timer(0, 5);
 }
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 2e5d49cbafd..00122399e6a 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -126,11 +126,11 @@ void Credits::execute() {
 	int fontCol;
 
 	_G(room)->open_handle(GBOOK, "rb", 0);
-	_G(room)->load_tgp(5, &room_blk, 1, 0, GBOOK);
+	_G(room)->load_tgp(5, &_G(room_blk), 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	_G(out)->setze_zeiger(_G(screen0));
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	for (int i = 0; i < 6; ++i) {
@@ -152,7 +152,7 @@ void Credits::execute() {
 
 		// Display the starfield background
 		_G(out)->setze_zeiger(_G(workptr));
-		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage],
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 			_G(spieler).scrollx, _G(spieler).scrolly);
 
 		// Animate moving the background
@@ -197,7 +197,7 @@ void Credits::execute() {
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvorx8x8));
 	_G(room)->open_handle("back/episode1.tgp", "rb", 0);
 
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	hide_cur();
 	_G(uhr)->reset_timer(0, 5);
 }
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 658f5702e73..2582cd83852 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -70,12 +70,12 @@ int16 Files::execute(bool isInGame) {
 	EVENTS_CLEAR;
 
 	_G(room)->open_handle(GBOOK, "rb", 0);
-	_G(room)->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
-	_G(room)->set_ak_pal(&room_blk);
-	fnames = _G(iog)->io_init(&ioptr);
+	_G(room)->set_ak_pal(&_G(room_blk));
+	fnames = _G(iog)->io_init(&_G(ioptr));
 	fnames += 1;
  
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
@@ -103,7 +103,7 @@ int16 Files::execute(bool isInGame) {
 
 		while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 			// Draw the dialog background
-			_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+			_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 			// Draw the buttons at the bottom
 			for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
@@ -160,7 +160,7 @@ int16 Files::execute(bool isInGame) {
 					key = 0;
 				}
 
-				_G(in)->neuer_kb_handler(&kbinfo);
+				_G(in)->neuer_kb_handler(&_G(kbinfo));
 			}
 
 			if (mode[OPTIONS])
@@ -169,8 +169,8 @@ int16 Files::execute(bool isInGame) {
 				Dialogs::Options::execute(ti);
 			}
 
-			if (!flag && minfo.button == 1) {
-				rect = _G(in)->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
+			if (!flag && _G(minfo).button == 1) {
+				rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
 				flag = true;
 				key = 0;
 
@@ -182,7 +182,7 @@ int16 Files::execute(bool isInGame) {
 					key = Common::KEYCODE_DOWN;
 					break;
 				case 2:
-					line = (minfo.y - 68) / 10;
+					line = (_G(minfo).y - 68) / 10;
 					if (line == active_slot)
 						key = Common::KEYCODE_RETURN;
 					else
@@ -210,7 +210,7 @@ int16 Files::execute(bool isInGame) {
 					break;
 				}
 
-			} else if (flag && minfo.button == 0) {
+			} else if (flag && _G(minfo).button == 0) {
 				flag = false;
 			}
 
@@ -267,7 +267,7 @@ enter:
 					tmp = fnames + ((text_off + active_slot) * 40);
 					if (tmp[0]) {
 						_G(currentSong) = -1;
-						_G(iog)->load(text_off + active_slot, ioptr.save_path);
+						_G(iog)->load(text_off + active_slot, _G(ioptr).save_path);
 						key = Common::KEYCODE_ESCAPE;
 					}
 				} else if (mode[SAVE]) {
@@ -277,11 +277,11 @@ enter:
 					tmp = fnames + ((text_off + active_slot) * 40);
 					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
 						255, 42, 14, 0, "%36s36", tmp);
-					_G(in)->neuer_kb_handler(&kbinfo);
+					_G(in)->neuer_kb_handler(&_G(kbinfo));
 					_G(out)->setze_zeiger(_G(workptr));
 					if (key != Common::KEYCODE_ESCAPE) {
 						_G(iog)->save_entry(text_off + active_slot,
-							ioptr.save_path);
+							_G(ioptr).save_path);
 					}
 					key = Common::KEYCODE_ESCAPE;
 				}
@@ -301,10 +301,10 @@ enter:
 	free(ti);
 
 	_G(room)->open_handle(EPISODE1, "rb", 0);
-	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 	_G(fx_blend) = BLEND1;
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 
 	return ret;
 }
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 004a61365ab..8068b3de7cc 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -63,14 +63,14 @@ void Inventory::plot_menu() {
 				WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
 	}
 
-	k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+	k = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 	if (k != -1) {
 		if (k < 5)
 			_G(out)->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
 				INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
 		else {
-			x = (minfo.x - (WIN_INF_X)) / 54;
-			y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
+			x = (_G(minfo).x - (WIN_INF_X)) / 54;
+			y = (_G(minfo).y - (WIN_INF_Y + 4 + 30)) / 30;
 			k = x + (y * 5);
 			k += _G(spieler).InventY * 5;
 			if (k < (_G(spieler).InventY + 3) * 5)
@@ -139,12 +139,12 @@ void Inventory::menu() {
 	int16 menu_first;
 
 	keyVal = 0;
-	flags.InventMenu = true;
+	_G(flags).InventMenu = true;
 	disp_tmp = _G(spieler).DispFlag;
 	_G(spieler).DispFlag = false;
-	ani_tmp = flags.AutoAniPlay;
-	flags.AutoAniPlay = true;
-	flags.StopAutoObj = true;
+	ani_tmp = _G(flags).AutoAniPlay;
+	_G(flags).AutoAniPlay = true;
+	_G(flags).StopAutoObj = true;
 	_G(menu_display) = 0;
 	tmp = _G(spieler).MausSpeed;
 	if (tmp > 3) {
@@ -153,8 +153,8 @@ void Inventory::menu() {
 		tmp1 = tmp;
 	_G(in)->speed(tmp1, tmp1 * 2);
 	_G(cur)->move(152, 92);
-	minfo.x = 152;
-	minfo.y = 92;
+	_G(minfo).x = 152;
+	_G(minfo).y = 92;
 
 	_G(invent_cur_mode) = CUR_USE;
 	if (_G(spieler).AkInvent != -1) {
@@ -167,7 +167,7 @@ void Inventory::menu() {
 
 	menu_flag1 = MENU_EINBLENDEN;
 	taste_flag = 28;
-	kbinfo.key_code = '\0';
+	_G(kbinfo).key_code = '\0';
 	maus_flag = 1;
 
 	for (i = 0; i < 3; i++) {
@@ -180,14 +180,14 @@ void Inventory::menu() {
 	_G(show_invent_menu) = 1;
 
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
-		if (!minfo.button)
+		if (!_G(minfo).button)
 			maus_flag = 0;
-		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN || keyVal) {
+		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN || keyVal) {
 			if (!maus_flag) {
 				maus_flag = 1;
-				kbinfo.key_code = '\0';
+				_G(kbinfo).key_code = '\0';
 
-				k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+				k = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 				if (keyVal == Common::KEYCODE_F1)
 					k = 0;
 				else if (keyVal == Common::KEYCODE_F2)
@@ -231,8 +231,8 @@ void Inventory::menu() {
 					break;
 
 				case 5:
-					inv_rand_x = (minfo.x - (WIN_INF_X)) / 54;
-					inv_rand_y = (minfo.y - (WIN_INF_Y + 4 + 30)) / 30;
+					inv_rand_x = (_G(minfo).x - (WIN_INF_X)) / 54;
+					inv_rand_y = (_G(minfo).y - (WIN_INF_Y + 4 + 30)) / 30;
 					k = inv_rand_x + (inv_rand_y * 5);
 					k += _G(spieler).InventY * 5;
 					if (_G(invent_cur_mode) == CUR_USE) {
@@ -273,7 +273,7 @@ void Inventory::menu() {
 					break;
 				}
 			}
-		} else if (minfo.button == 2 || kbinfo.key_code == Common::KEYCODE_ESCAPE) {
+		} else if (_G(minfo).button == 2 || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE) {
 			if (!maus_flag) {
 				_G(in)->_hotkey = Common::KEYCODE_ESCAPE;
 				maus_flag = 1;
@@ -290,7 +290,7 @@ void Inventory::menu() {
 		} else if (ret_look == 5) {
 			taste_flag = false;
 			maus_flag = 0;
-			minfo.button = 1;
+			_G(minfo).button = 1;
 			keyVal = Common::KEYCODE_RETURN;
 		}
 
@@ -332,35 +332,35 @@ void Inventory::menu() {
 				break;
 
 			case Common::KEYCODE_RIGHT:
-				if (minfo.x < 320 - _G(spieler).CurBreite)
-					minfo.x += 3;
+				if (_G(minfo).x < 320 - _G(spieler).CurBreite)
+					_G(minfo).x += 3;
 				break;
 
 			case Common::KEYCODE_LEFT:
-				if (minfo.x > 2)
-					minfo.x -= 3;
+				if (_G(minfo).x > 2)
+					_G(minfo).x -= 3;
 				break;
 
 			case Common::KEYCODE_UP:
-				if (minfo.y > 2)
-					minfo.y -= 3;
+				if (_G(minfo).y > 2)
+					_G(minfo).y -= 3;
 				break;
 
 			case Common::KEYCODE_DOWN:
-				if (minfo.y < 197 - _G(spieler).CurHoehe)
-					minfo.y += 3;
+				if (_G(minfo).y < 197 - _G(spieler).CurHoehe)
+					_G(minfo).y += 3;
 				break;
 
 			case Common::KEYCODE_PAGEUP:
 				if (_G(spieler).InventY > 0)
 					--_G(spieler).InventY;
-				kbinfo.key_code = '\0';
+				_G(kbinfo).key_code = '\0';
 				break;
 
 			case Common::KEYCODE_PAGEDOWN:
 				if (_G(spieler).InventY < (MAX_MOV_OBJ / 5) - 3)
 					++_G(spieler).InventY;
-				kbinfo.key_code = '\0';
+				_G(kbinfo).key_code = '\0';
 				break;
 
 			default:
@@ -371,7 +371,7 @@ void Inventory::menu() {
 
 		if (_G(show_invent_menu) != 2) {
 			set_up_screen(NO_SETUP);
-			_G(cur)->move(minfo.x, minfo.y);
+			_G(cur)->move(_G(minfo).x, _G(minfo).y);
 			_G(cur)->show_cur();
 			if (menu_flag1 != MENU_AUSBLENDEN) {
 				inv_rand_x = -1;
@@ -394,8 +394,8 @@ void Inventory::menu() {
 	}
 
 	_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
-	minfo.x = _G(maus_old_x);
-	minfo.y = _G(maus_old_y);
+	_G(minfo).x = _G(maus_old_x);
+	_G(minfo).y = _G(maus_old_y);
 	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		set_up_screen(NO_SETUP);
 		_G(cur)->plot_cur();
@@ -403,11 +403,11 @@ void Inventory::menu() {
 	}
 
 	_G(in)->speed(tmp, tmp * 2);
-	flags.InventMenu = false;
-	flags.AutoAniPlay = ani_tmp;
+	_G(flags).InventMenu = false;
+	_G(flags).AutoAniPlay = ani_tmp;
 	_G(spieler).DispFlag = disp_tmp;
 	_G(menu_display) = _G(tmp_menu);
-	flags.StopAutoObj = false;
+	_G(flags).StopAutoObj = false;
 }
 
 int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
@@ -456,13 +456,13 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	}
 
 	while (!ende) {
-		rect = _G(in)->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+		rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 
-		if (minfo.button) {
-			if (minfo.button == 2) {
+		if (_G(minfo).button) {
+			if (_G(minfo).button == 2) {
 				if (!maus_flag)
-					kbinfo.scan_code = Common::KEYCODE_ESCAPE;
-			} else if (minfo.button == 1) {
+					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
+			} else if (_G(minfo).button == 1) {
 				if (!maus_flag) {
 					switch (rect) {
 					case 0:
@@ -477,12 +477,12 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 					case 3:
 					case 6:
-						kbinfo.scan_code = Common::KEYCODE_UP;
+						_G(kbinfo).scan_code = Common::KEYCODE_UP;
 						break;
 
 					case 4:
 					case 7:
-						kbinfo.scan_code = Common::KEYCODE_DOWN;
+						_G(kbinfo).scan_code = Common::KEYCODE_DOWN;
 						break;
 
 					case 5:
@@ -501,7 +501,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 			maus_flag = 0;
 		}
 
-		switch (kbinfo.scan_code) {
+		switch (_G(kbinfo).scan_code) {
 		case Common::KEYCODE_F1:
 			_G(in)->_hotkey = Common::KEYCODE_F1;
 			break;
@@ -528,7 +528,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 			break;
 		}
 
-		kbinfo.scan_code = Common::KEYCODE_INVALID;
+		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		Dialogs::Inventory::plot_menu();
 		_G(out)->set_fontadr(_G(font8x8));
@@ -587,7 +587,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 	int16 ok;
 	int16 m_mode = 0;
 
-	if (!flags.AtsAction) {
+	if (!_G(flags).AtsAction) {
 		if (txt_nr != -1) {
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
@@ -627,7 +627,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
 					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
 				if (_G(menu_item) == CUR_USE)
-					flags.StaticUseTxt = true;
+					_G(flags).StaticUseTxt = true;
 				break;
 
 			default:
@@ -674,7 +674,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 		case GBUCH_INV:
 			ret = del_invent_slot(GBUCH_INV);
 			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
-			_G(obj)->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &room_blk);
+			_G(obj)->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
 			ret_val = true;
 			break;
 
@@ -692,11 +692,11 @@ void Inventory::showDiary() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 
-	_G(room)->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(DIARY_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(out)->back2screen(_G(workpage));
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(out)->setze_zeiger(nullptr);
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
@@ -709,13 +709,13 @@ void Inventory::showDiary() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
 	Dialogs::Inventory::plot_menu();
 	_G(out)->setze_zeiger(nullptr);
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 }
 
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 4b4f1b18ec7..050452432f6 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -40,9 +40,9 @@ void MainMenu::execute() {
 	// Convenience during testing to not keep showing title sequence
 	if (!ConfMan.getBool("skip_title")) {
 		_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - 17);
-		_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)Ci.MusicSlot);
+		_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)_G(Ci).MusicSlot);
 		if (!_G(modul))
-			_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
+			_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
 
 		flic_cut(200, 0);
 		_G(sndPlayer)->stopMod();
@@ -51,8 +51,8 @@ void MainMenu::execute() {
 	show_intro();
 
 	_G(cur)->move(152, 92);
-	minfo.x = 152;
-	minfo.y = 92;
+	_G(minfo).x = 152;
+	_G(minfo).y = 92;
 	_G(spieler).inv_cur = false;
 	_G(menu_display) = 0;
 	_G(spieler).soundLoopMode = 1;
@@ -67,7 +67,7 @@ void MainMenu::execute() {
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
-		_G(room)->load_room(&room_blk, 98, &_G(spieler));
+		_G(room)->load_room(&_G(room_blk), 98, &_G(spieler));
 
 		_G(currentSong) = -1;
 		load_room_music(98);
@@ -94,7 +94,7 @@ void MainMenu::execute() {
 		case MM_VIEW_INTRO:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(out)->setze_zeiger(_G(workptr));
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			flic_cut(135, CFO_MODE);
 			break;
 
@@ -106,8 +106,8 @@ void MainMenu::execute() {
 		case MM_CINEMA:
 			cursor_wahl(CUR_SAVE);
 			_G(cur)->move(152, 92);
-			minfo.x = 152;
-			minfo.y = 92;
+			_G(minfo).x = 152;
+			_G(minfo).y = 92;
 			Dialogs::Cinema::execute();
 			break;
 
@@ -119,7 +119,7 @@ void MainMenu::execute() {
 
 		case MM_CREDITS:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			_G(flc)->set_custom_user_function(creditsFn);
 			flic_cut(159, CFO_MODE);
 			_G(flc)->remove_custom_user_function();
@@ -134,9 +134,9 @@ void MainMenu::execute() {
 }
 
 void MainMenu::screenFunc() {
-	int vec = _G(det)->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+	int vec = _G(det)->maus_vector(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 
-	if (_G(in)->get_switch_code() == 28 || minfo.button == 1) {
+	if (_G(in)->get_switch_code() == 28 || _G(minfo).button == 1) {
 		_selection = vec;
 	}
 }
@@ -152,17 +152,17 @@ void MainMenu::animate() {
 
 	++_G(FrameSpeed);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage],
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
-	if (_G(SetUpScreenFunc) && !_G(menu_display) && !flags.InventMenu) {
+	if (_G(SetUpScreenFunc) && !_G(menu_display) && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
 		_G(out)->setze_zeiger(_G(workptr));
 	}
 
 	sprite_engine();
 	kb_mov(1);
-	calc_maus_txt(minfo.x, minfo.y, 1);
+	calc_maus_txt(_G(minfo).x, _G(minfo).y, 1);
 	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
@@ -215,7 +215,7 @@ void MainMenu::startGame() {
 	_G(spieler).soundLoopMode = sndLoopMode;
 
 	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
-	_G(room)->load_room(&room_blk, 0, &_G(spieler));
+	_G(room)->load_room(&_G(room_blk), 0, &_G(spieler));
 
 	_G(spieler_vector)[P_CHEWY].Phase = 6;
 	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
@@ -229,15 +229,15 @@ void MainMenu::startGame() {
 }
 
 bool MainMenu::loadGame() {
-	flags.SaveMenu = true;
+	_G(flags).SaveMenu = true;
 	savePersonAni();
 	_G(out)->setze_zeiger(_G(screen0));
 	_G(out)->set_fontadr(_G(font6x8));
 	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 	cursor_wahl(CUR_SAVE);
 	_G(cur)->move(152, 92);
-	minfo.x = 152;
-	minfo.y = 92;
+	_G(minfo).x = 152;
+	_G(minfo).y = 92;
 	_G(savegameFlag) = true;
 	int result = Dialogs::Files::execute(false);
 
@@ -245,7 +245,7 @@ bool MainMenu::loadGame() {
 		_G(menu_item) == CUR_USE) ? 8 : 0);
 	_G(cur_display) = true;
 	restorePersonAni();
-	flags.SaveMenu = false;
+	_G(flags).SaveMenu = false;
 
 	if (result == 0) {
 		_G(fx_blend) = BLEND1;
@@ -261,11 +261,11 @@ void MainMenu::playGame() {
 	_G(cur_display) = true;
 	_G(tmp_menu_item) = 0;
 	_G(maus_links_click) = false;
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
-	flags.main_maus_flag = false;
-	flags.MainInput = true;
-	flags.ShowAtsInvTxt = true;
+	_G(flags).main_maus_flag = false;
+	_G(flags).MainInput = true;
+	_G(flags).ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
 	_G(spieler_vector)[P_CHEWY].Count = 0;
 	_G(uhr)->reset_timer(0, 0);
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 4144af6070c..b02ae1deb26 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -57,12 +57,12 @@ static const int16 OPTION_ICONS[9 * 4] = {
 
 void Options::execute(taf_info *ti) {
 	long akt_clock = 0, stop_clock = 0;
-	_G(room)->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(0, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
 
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(_G(workptr));
 	int16 key = 0;
@@ -77,7 +77,7 @@ void Options::execute(taf_info *ti) {
 	int16 delay_count = _G(spieler).DelaySpeed;
 	warning("stop_clock = (clock() / CLK_TCK) + 1;");
 	while (key != Common::KEYCODE_ESCAPE) {
-		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 		++_G(FrameSpeed);
 		warning("akt_clock = clock() / CLK_TCK;");
 		if (akt_clock >= stop_clock) {
@@ -145,9 +145,9 @@ void Options::execute(taf_info *ti) {
 			8 + ti->korrektur[(EXIT << 1) + 1], 0);
 
 		key = _G(in)->get_switch_code();
-		if ((minfo.button == 1) || (key == Common::KEYCODE_RETURN)) {
+		if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
-				int16 rect = _G(in)->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
+				int16 rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
 				if (_G(spieler).FramesPerSecond > 6)
@@ -192,32 +192,32 @@ void Options::execute(taf_info *ti) {
 				key = Common::KEYCODE_ESCAPE;
 				break;
 			case 7:
-				_G(spieler).SoundVol = (136 - minfo.y) << 1;
+				_G(spieler).SoundVol = (136 - _G(minfo).y) << 1;
 				_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 				break;
 			case 8:
-				_G(spieler).MusicVol = (136 - minfo.y) << 1;
+				_G(spieler).MusicVol = (136 - _G(minfo).y) << 1;
 				_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 				break;
 			}
-			minfo.button = 0;
+			_G(minfo).button = 0;
 		}
 		switch (key) {
 
 		case Common::KEYCODE_UP:
-			_G(cur)->move(minfo.x, --minfo.y);
+			_G(cur)->move(_G(minfo).x, --_G(minfo).y);
 			break;
 
 		case Common::KEYCODE_DOWN:
-			_G(cur)->move(minfo.x, ++minfo.y);
+			_G(cur)->move(_G(minfo).x, ++_G(minfo).y);
 			break;
 
 		case Common::KEYCODE_LEFT:
-			_G(cur)->move(--minfo.x, minfo.y);
+			_G(cur)->move(--_G(minfo).x, _G(minfo).y);
 			break;
 
 		case Common::KEYCODE_RIGHT:
-			_G(cur)->move(++minfo.x, minfo.y);
+			_G(cur)->move(++_G(minfo).x, _G(minfo).y);
 			break;
 		}
 
@@ -254,11 +254,11 @@ void Options::execute(taf_info *ti) {
 			--delay_count;
 	}
 
-	_G(room)->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
+	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], 0, 0);
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 	_G(out)->setze_zeiger(_G(screen0));
-	_G(room)->set_ak_pal(&room_blk);
+	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->setze_zeiger(_G(workptr));
 }
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 68c142fbdfe..3ddd73ce016 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -59,21 +59,21 @@ void EventsManager::handleEvent(const Common::Event &event) {
 
 void EventsManager::handleMouseEvent(const Common::Event &event) {
 	_mousePos = event.mouse;
-	bool isWheelEnabled = !_G(menu_display) && !flags.InventMenu &&
+	bool isWheelEnabled = !_G(menu_display) && !_G(flags).InventMenu &&
 		g_engine->canSaveAutosaveCurrently() &&
 		_G(menu_item) >= CUR_WALK && _G(menu_item) <= CUR_TALK;
 
 	// Different event types handling
 	if (event.type != Common::EVENT_MOUSEMOVE)
-		minfo.button = 0;
+		_G(minfo).button = 0;
 
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
-		minfo.button = 1;
+		_G(minfo).button = 1;
 		break;
 
 	case Common::EVENT_RBUTTONDOWN:
-		minfo.button = 2;
+		_G(minfo).button = 2;
 		break;
 
 	case Common::EVENT_WHEELUP:
@@ -109,8 +109,8 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 	// Set mouse position
 	if (!cur_move) {
 		cur_move = true;
-		minfo.x = event.mouse.x;
-		minfo.y = event.mouse.y;
+		_G(minfo).x = event.mouse.x;
+		_G(minfo).y = event.mouse.y;
 	}
 }
 
@@ -144,7 +144,7 @@ void EventsManager::clearEvents() {
 		_kbInfo->key_code = '\0';
 	}
 
-	minfo.button = 0;
+	_G(minfo).button = 0;
 }
 
 kb_info *EventsManager::setKbdInfo(kb_info *kbInfo) {
diff --git a/engines/chewy/global.cpp b/engines/chewy/global.cpp
index 52adacf5cf5..0fe75d9a065 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/global.cpp
@@ -66,20 +66,4 @@ Globals::~Globals() {
 	g_globals = nullptr;
 }
 
-
-maus_info minfo;
-kb_info kbinfo;
-cur_blk curblk;
-cur_ani curani;
-iog_init ioptr;
-RaumBlk room_blk;
-
-
-Flags flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-				0, 0, 0, 0, 0, 0, 0, 0, 0 };
-CustomInfo Ci;
-GotoPkt gpkt;
-
-
-
 } // namespace Chewy
diff --git a/engines/chewy/global.h b/engines/chewy/global.h
index d9c4440721a..335e653508e 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/global.h
@@ -239,6 +239,17 @@ public:
 	int16 _ani_stand_count[MAX_PERSON] = { 0 };
 	bool _ani_stand_flag[MAX_PERSON] = { false };
 
+	maus_info _minfo;
+	kb_info _kbinfo;
+	cur_blk _curblk;
+	cur_ani _curani;
+	iog_init _ioptr;
+	RaumBlk _room_blk;
+	Flags _flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+					0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	CustomInfo _Ci;
+	GotoPkt _gpkt;
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
@@ -297,7 +308,7 @@ public:
 extern Globals *g_globals;
 
 #define _G(FIELD) g_globals->_##FIELD
-
+/*
 extern char *invent_txt;
 extern char *invent_name;
 
@@ -313,7 +324,7 @@ extern RaumBlk room_blk;
 extern Flags flags;
 extern CustomInfo Ci;
 extern GotoPkt gpkt;
-
+*/
 
 void cursor_wahl(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 7c1df039c05..3ea76414ea0 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -54,34 +54,34 @@ void standard_init() {
 	_G(out)->set_writemode(0);
 	_G(scr_width) = 0;
 	_G(screen0) = (byte *)g_screen->getPixels();
-	_G(in)->neuer_kb_handler(&kbinfo);
+	_G(in)->neuer_kb_handler(&_G(kbinfo));
 
 	_G(in)->rectangle(0, 0, 320, 210);
-	_G(in)->neuer_maushandler(&minfo);
-	_G(out)->init_mausmode(&minfo);
-	curblk.page_off_x = 0;
-	curblk.page_off_y = 0;
-	curblk.xsize = 16;
-	curblk.ysize = 16;
+	_G(in)->neuer_maushandler(&_G(minfo));
+	_G(out)->init_mausmode(&_G(minfo));
+	_G(curblk).page_off_x = 0;
+	_G(curblk).page_off_y = 0;
+	_G(curblk).xsize = 16;
+	_G(curblk).ysize = 16;
 
 	// WORKAROUND: Moved from init_load because the original
 	// uses _G(curtaf)->image below before _G(curtaf) was initialized
 	_G(curtaf) = _G(mem)->taf_adr(CURSOR);
 
-	curblk.sprite = _G(curtaf)->image;
-	curblk.cur_back = _G(cur_back);
-	curblk.no_back = true;
-	curani.ani_anf = 0;
-	curani.ani_end = 0;
-	curani.delay = 0;
+	_G(curblk).sprite = _G(curtaf)->image;
+	_G(curblk).cur_back = _G(cur_back);
+	_G(curblk).no_back = true;
+	_G(curani).ani_anf = 0;
+	_G(curani).ani_end = 0;
+	_G(curani).delay = 0;
 	
-	_G(cur) = new Cursor(_G(out), _G(in), &curblk);
-	_G(cur)->set_cur_ani(&curani);
+	_G(cur) = new Cursor(_G(out), _G(in), &_G(curblk));
+	_G(cur)->set_cur_ani(&_G(curani));
 
 	_G(iog) = new IOGame(_G(out), _G(in), _G(cur));
-	strcpy(ioptr.id, "CHE");
-	strcpy(ioptr.save_path, SAVEDIR);
-	ioptr.delay = 8;
+	strcpy(_G(ioptr).id, "CHE");
+	strcpy(_G(ioptr).save_path, SAVEDIR);
+	_G(ioptr).delay = 8;
 	alloc_buffers();
 	_G(pal)[765] = 63;
 	_G(pal)[766] = 63;
@@ -91,7 +91,7 @@ void standard_init() {
 	font_load();
 
 	_G(out)->cls();
-	_G(in)->neuer_kb_handler(&kbinfo);
+	_G(in)->neuer_kb_handler(&_G(kbinfo));
 
 	var_init();
 	_G(ablage) = _G(room)->get_ablage();
@@ -105,7 +105,7 @@ void standard_init() {
 	_G(out)->cls();
 	_G(uhr)->set_new_timer(0, 5, SEC_10_MODE);
 
-	curblk.cur_back = _G(cur_back);
+	_G(curblk).cur_back = _G(cur_back);
 	sound_init();
 	init_load();
 }
@@ -162,7 +162,7 @@ void var_init() {
 	}
 	_G(spieler).PersonRoomNr[P_CHEWY] = _G(room_start_nr);
 
-	gpkt.Vorschub = _G(spieler_mi)[P_CHEWY].Vorschub;
+	_G(gpkt).Vorschub = _G(spieler_mi)[P_CHEWY].Vorschub;
 	init_room();
 	init_atds();
 	_G(spieler).FramesPerSecond = 7;
@@ -172,21 +172,21 @@ void var_init() {
 	_G(pfeil_delay) = 0;
 	_G(pfeil_ani) = 0;
 	_G(timer_action_ctr) = 0;
-	flags.CursorStatus = true;
+	_G(flags).CursorStatus = true;
 	_G(savegameFlag) = false;
 }
 
 void init_room() {
-	room_blk.AkAblage = 0;
-	room_blk.LowPalMem = _G(pal);
-	room_blk.InvFile = INVENTAR;
-	room_blk.DetFile = DETAILTEST;
-	room_blk.InvSprAdr = &_G(inv_spr)[0];
-	room_blk.Rmo = _G(spieler).room_m_obj;
-	room_blk.Rsi = _G(spieler).room_s_obj;
-	room_blk.AadLoad = true;
-	room_blk.AtsLoad = true;
-	strcpy(room_blk.RoomDir, "room/");
+	_G(room_blk).AkAblage = 0;
+	_G(room_blk).LowPalMem = _G(pal);
+	_G(room_blk).InvFile = INVENTAR;
+	_G(room_blk).DetFile = DETAILTEST;
+	_G(room_blk).InvSprAdr = &_G(inv_spr)[0];
+	_G(room_blk).Rmo = _G(spieler).room_m_obj;
+	_G(room_blk).Rsi = _G(spieler).room_s_obj;
+	_G(room_blk).AadLoad = true;
+	_G(room_blk).AtsLoad = true;
+	strcpy(_G(room_blk).RoomDir, "room/");
 
 	_G(room)->open_handle(EPISODE1_GEP, "rb", R_GEPDATEI);
 }
@@ -313,7 +313,7 @@ void init_load() {
 
 	_G(menutaf) = _G(mem)->taf_adr(MENUTAF);
 	_G(spblende) = _G(mem)->void_adr("cut/blende.rnd");
-	_G(room)->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
+	_G(room)->load_room(&_G(room_blk), _G(room_start_nr), &_G(spieler));
 	_G(out)->set_palette(_G(pal));
 }
 
@@ -407,7 +407,7 @@ void sound_exit() {
 void show_intro() {
 	if (!ConfMan.getBool("shown_intro")) {
 		ConfMan.setBool("shown_intro", true);
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(135, CFO_MODE);
 	}
 }
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index d425cb7bbc5..6f646b55669 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -190,15 +190,15 @@ void load_room_music(int16 room_nr) {
 			if (ttp_index != _G(currentSong)) {
 				_G(sndPlayer)->stopMod();
 				while (_G(sndPlayer)->musicPlaying());
-				memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
+				memset(_G(Ci).MusicSlot, 0, MUSIC_SLOT_SIZE);
 				_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - ttp_index);
-				_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)Ci.MusicSlot);
+				_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)_G(Ci).MusicSlot);
 				_G(currentSong) = ttp_index;
 				if (!_G(modul)) {
 					if (play_mode == NORMAL_PLAY)
-						_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
+						_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
 					else {
-						_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
+						_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
 						_G(sndPlayer)->stopMod();
 						if (play_mode == SEQUENCE_PLAY)
 							_G(sndPlayer)->playSequence(seq_start, seq_end);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index fa850d650ff..ee3689ee6e6 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -71,11 +71,11 @@ void alloc_buffers() {
 	_G(workpage) = (byte *)MALLOC(64004l);
 	_G(pal) = (byte *)MALLOC(768l);
 	_G(cur_back) = (byte *)MALLOC(16 * 16 + 4);
-	Ci.VirtScreen = _G(workpage);
-	Ci.TempArea = (byte *)MALLOC(64004l);
-	_G(det)->set_taf_ani_mem(Ci.TempArea);
-	Ci.MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
-	Ci.MaxMusicSize = MUSIC_SLOT_SIZE;
+	_G(Ci).VirtScreen = _G(workpage);
+	_G(Ci).TempArea = (byte *)MALLOC(64004l);
+	_G(det)->set_taf_ani_mem(_G(Ci).TempArea);
+	_G(Ci).MusicSlot = (byte *)MALLOC(MUSIC_SLOT_SIZE);
+	_G(Ci).MaxMusicSize = MUSIC_SLOT_SIZE;
 }
 
 void free_buffers() {
@@ -90,8 +90,8 @@ void free_buffers() {
 	free((char *)_G(chewy));
 
 	free((char *)_G(curtaf));
-	free(Ci.MusicSlot);
-	free(Ci.TempArea);
+	free(_G(Ci).MusicSlot);
+	free(_G(Ci).TempArea);
 	free(_G(cur_back));
 	free(_G(pal));
 	free(_G(workpage));
@@ -100,110 +100,110 @@ void free_buffers() {
 void cursor_wahl(int16 nr) {
 	int16 ok = true;
 	if (nr != CUR_USER) {
-		curblk.sprite = _G(curtaf)->image;
-		curani.delay = (1 + _G(spieler).DelaySpeed) * 5;
+		_G(curblk).sprite = _G(curtaf)->image;
+		_G(curani).delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
 	case CUR_WALK:
-		curani.ani_anf = 0;
-		curani.ani_end = 3;
+		_G(curani).ani_anf = 0;
+		_G(curani).ani_end = 3;
 		break;
 
 	case CUR_NO_WALK:
-		curani.ani_anf = 8;
-		curani.ani_end = 8;
+		_G(curani).ani_anf = 8;
+		_G(curani).ani_end = 8;
 		break;
 
 	case CUR_USE:
-		curani.ani_anf = 4;
-		curani.ani_end = 7;
+		_G(curani).ani_anf = 4;
+		_G(curani).ani_end = 7;
 		break;
 
 	case CUR_NO_USE:
-		curani.ani_anf = 4;
-		curani.ani_end = 4;
+		_G(curani).ani_anf = 4;
+		_G(curani).ani_end = 4;
 		break;
 
 	case CUR_NOPE:
-		curani.ani_anf = 9;
-		curani.ani_end = 12;
+		_G(curani).ani_anf = 9;
+		_G(curani).ani_end = 12;
 		break;
 
 	case CUR_LOOK:
-		curani.ani_anf = 13;
-		curani.ani_end = 16;
+		_G(curani).ani_anf = 13;
+		_G(curani).ani_end = 16;
 		break;
 
 	case CUR_NO_LOOK:
-		curani.ani_anf = 16;
-		curani.ani_end = 16;
+		_G(curani).ani_anf = 16;
+		_G(curani).ani_end = 16;
 		break;
 
 	case CUR_TALK:
-		curani.ani_anf = 17;
-		curani.ani_end = 20;
+		_G(curani).ani_anf = 17;
+		_G(curani).ani_end = 20;
 		break;
 
 	case CUR_NO_TALK:
-		curani.ani_anf = 17;
-		curani.ani_end = 17;
+		_G(curani).ani_anf = 17;
+		_G(curani).ani_end = 17;
 		break;
 
 	case CUR_INVENT:
-		curani.ani_anf = 21;
-		curani.ani_end = 24;
+		_G(curani).ani_anf = 21;
+		_G(curani).ani_end = 24;
 		break;
 
 	case CUR_AK_INVENT:
-		curani.ani_anf = _G(spieler).AkInvent;
-		curani.ani_end = _G(spieler).AkInvent;
-		curblk.sprite = &_G(inv_spr)[0];
+		_G(curani).ani_anf = _G(spieler).AkInvent;
+		_G(curani).ani_end = _G(spieler).AkInvent;
+		_G(curblk).sprite = &_G(inv_spr)[0];
 		_G(spieler).inv_cur = true;
 		break;
 
 	case CUR_SAVE:
-		curani.ani_anf = 25;
-		curani.ani_end = 25;
+		_G(curani).ani_anf = 25;
+		_G(curani).ani_end = 25;
 		break;
 
 	case CUR_AUSGANG_LINKS:
-		curani.ani_anf = AUSGANG_LINKS_SPR;
-		curani.ani_end = AUSGANG_LINKS_SPR;
+		_G(curani).ani_anf = AUSGANG_LINKS_SPR;
+		_G(curani).ani_end = AUSGANG_LINKS_SPR;
 		break;
 
 	case CUR_AUSGANG_RECHTS:
-		curani.ani_anf = AUSGANG_RECHTS_SPR;
-		curani.ani_end = AUSGANG_RECHTS_SPR;
+		_G(curani).ani_anf = AUSGANG_RECHTS_SPR;
+		_G(curani).ani_end = AUSGANG_RECHTS_SPR;
 		break;
 
 	case CUR_AUSGANG_OBEN:
-		curani.ani_anf = AUSGANG_OBEN_SPR;
-		curani.ani_end = AUSGANG_OBEN_SPR;
+		_G(curani).ani_anf = AUSGANG_OBEN_SPR;
+		_G(curani).ani_end = AUSGANG_OBEN_SPR;
 		break;
 
 	case CUR_AUSGANG_UNTEN:
-		curani.ani_anf = AUSGANG_UNTEN_SPR;
-		curani.ani_end = AUSGANG_UNTEN_SPR;
+		_G(curani).ani_anf = AUSGANG_UNTEN_SPR;
+		_G(curani).ani_end = AUSGANG_UNTEN_SPR;
 		break;
 
 	case CUR_DISK:
-		curani.ani_anf = 30;
-		curani.ani_end = 30;
+		_G(curani).ani_anf = 30;
+		_G(curani).ani_end = 30;
 		break;
 
 	case CUR_HOWARD:
-		curani.ani_anf = 31;
-		curani.ani_end = 31;
+		_G(curani).ani_anf = 31;
+		_G(curani).ani_end = 31;
 		break;
 
 	case CUR_NICHELLE:
-		curani.ani_anf = 37;
-		curani.ani_end = 37;
+		_G(curani).ani_anf = 37;
+		_G(curani).ani_end = 37;
 		break;
 
 	case CUR_ZEIGE:
-		curani.ani_anf = 9;
-		curani.ani_end = 9;
+		_G(curani).ani_anf = 9;
+		_G(curani).ani_end = 9;
 		break;
 	case CUR_USER:
 
@@ -216,8 +216,8 @@ void cursor_wahl(int16 nr) {
 
 	if (ok) {
 		cur_move = true;
-		_G(cur)->set_cur_ani(&curani);
-		int16 *xy = (int16 *)curblk.sprite[curani.ani_anf];
+		_G(cur)->set_cur_ani(&_G(curani));
+		int16 *xy = (int16 *)_G(curblk).sprite[_G(curani).ani_anf];
 		_G(spieler).CurBreite = xy[0];
 		_G(spieler).CurHoehe = xy[1];
 		_G(in)->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
@@ -227,16 +227,16 @@ void cursor_wahl(int16 nr) {
 void hide_cur() {
 	if (!_G(cur_hide_flag)) {
 		_G(cur_hide_flag) = true;
-		flags.ShowAtsInvTxt = false;
+		_G(flags).ShowAtsInvTxt = false;
 		_G(cur)->hide_cur();
-		flags.CursorStatus = false;
+		_G(flags).CursorStatus = false;
 	}
 }
 
 void show_cur() {
-	flags.ShowAtsInvTxt = true;
+	_G(flags).ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
-	flags.CursorStatus = true;
+	_G(flags).CursorStatus = true;
 }
 
 void test_menu() {
@@ -252,16 +252,16 @@ void test_menu() {
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	_G(spieler_vector)[P_CHEWY].Count = 0;
 	ende = false;
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
-	flags.main_maus_flag = false;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
+	_G(flags).main_maus_flag = false;
 	_G(tmp_menu_item) = false;
 	_G(maus_links_click) = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(txt_aus_click) = false;
 	_G(fx_blend) = BLEND3;
 	_G(auto_obj) = 0;
-	flags.MainInput = true;
-	flags.ShowAtsInvTxt = true;
+	_G(flags).MainInput = true;
+	_G(flags).ShowAtsInvTxt = true;
 	enter_room(-1);
 	_G(uhr)->reset_timer(0, 0);
 	while (ende == 0)
@@ -285,8 +285,8 @@ int16 main_loop(int16 mode) {
 	int16 ende = false;
 
 	maus_action();
-	if (flags.MainInput) {
-		switch (kbinfo.scan_code) {
+	if (_G(flags).MainInput) {
+		switch (_G(kbinfo).scan_code) {
 		case Common::KEYCODE_F1:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_WALK;
@@ -322,8 +322,8 @@ int16 main_loop(int16 mode) {
 		case Common::KEYCODE_F5:
 		case Common::KEYCODE_SPACE:
 			_G(tmp_menu_item) = _G(menu_item);
-			_G(maus_old_x) = minfo.x;
-			_G(maus_old_y) = minfo.y;
+			_G(maus_old_x) = _G(minfo).x;
+			_G(maus_old_y) = _G(minfo).y;
 			_G(menu_item) = CUR_USE;
 			menu_entry();
 			Dialogs::Inventory::menu();
@@ -342,11 +342,11 @@ int16 main_loop(int16 mode) {
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
-			kbinfo.key_code = '\0';
+			_G(kbinfo).key_code = '\0';
 			break;
 
 		case Common::KEYCODE_F6:
-			flags.SaveMenu = true;
+			_G(flags).SaveMenu = true;
 
 			_G(out)->setze_zeiger(_G(screen0));
 			_G(out)->set_fontadr(_G(font6x8));
@@ -361,7 +361,7 @@ int16 main_loop(int16 mode) {
 			} else
 				cursor_wahl(_G(menu_item));
 			_G(cur_display) = true;
-			flags.SaveMenu = false;
+			_G(flags).SaveMenu = false;
 			_G(cur)->show_cur();
 			_G(out)->setze_zeiger(_G(workptr));
 			break;
@@ -370,8 +370,8 @@ int16 main_loop(int16 mode) {
 			if (_G(menu_display) == 0) {
 				menu_entry();
 				_G(tmp_menu_item) = _G(menu_item);
-				_G(maus_old_x) = minfo.x;
-				_G(maus_old_y) = minfo.y;
+				_G(maus_old_x) = _G(minfo).x;
+				_G(maus_old_y) = _G(minfo).y;
 				_G(menu_display) = MENU_EINBLENDEN;
 				_G(maus_menu_x) = (MAUS_MENU_MAX_X / 5) * (_G(menu_item));
 				_G(cur_display) = false;
@@ -410,11 +410,11 @@ int16 main_loop(int16 mode) {
 				break;
 
 			case CUR_SAVE:
-				flags.SaveMenu = true;
+				_G(flags).SaveMenu = true;
 				_G(menu_display) = MENU_EINBLENDEN;
 				_G(cur)->move(152, 92);
-				minfo.x = 152;
-				minfo.y = 92;
+				_G(minfo).x = 152;
+				_G(minfo).y = 92;
 				_G(out)->set_fontadr(_G(font6x8));
 				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 
@@ -436,7 +436,7 @@ int16 main_loop(int16 mode) {
 					cursor_wahl(_G(tmp_menu_item));
 				_G(cur_display) = true;
 
-				flags.SaveMenu = false;
+				_G(flags).SaveMenu = false;
 				_G(cur)->show_cur();
 				break;
 
@@ -447,8 +447,8 @@ int16 main_loop(int16 mode) {
 					_G(menu_display) = 0;
 					_G(cur_display) = true;
 					_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
-					minfo.x = _G(maus_old_x);
-					minfo.y = _G(maus_old_y);
+					_G(minfo).x = _G(maus_old_x);
+					_G(minfo).y = _G(maus_old_y);
 					_G(spieler).inv_cur = false;
 					cursor_wahl(_G(menu_item));
 				}
@@ -460,7 +460,7 @@ int16 main_loop(int16 mode) {
 		case Common::KEYCODE_LEFT:
 		case Common::KEYCODE_UP:
 		case Common::KEYCODE_DOWN:
-			kb_cur_action(kbinfo.scan_code, 0);
+			kb_cur_action(_G(kbinfo).scan_code, 0);
 			break;
 
 		case 41:
@@ -484,12 +484,12 @@ int16 main_loop(int16 mode) {
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
-			minfo.x = _G(maus_old_x);
-			minfo.y = _G(maus_old_y);
+			_G(minfo).x = _G(maus_old_x);
+			_G(minfo).y = _G(maus_old_y);
 		}
 	}
 
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	if (mode == DO_SETUP)
 		set_up_screen(DO_MAIN_LOOP);
 
@@ -503,8 +503,8 @@ static void showWalkAreas() {
 	for (int y = 0, yp = ys; y < 200 / 8; ++y, yp += 8) {
 		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
 			int idx = _G(ged)->ged_idx(xp, yp,
-				_G(room)->_gedXAnz[room_blk.AkAblage],
-				_G(ged_mem)[room_blk.AkAblage]);
+				_G(room)->_gedXAnz[_G(room_blk).AkAblage],
+				_G(ged_mem)[_G(room_blk).AkAblage]);
 
 			if (idx) {
 				Common::Rect r(xp, yp, xp + 8, yp + 8);
@@ -539,26 +539,26 @@ void set_up_screen(SetupScreenMode mode) {
 	}
 	++_G(FrameSpeed);
 	_G(out)->setze_zeiger(_G(workptr));
-	_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
 		zoom_mov_anpass(&_G(spieler_vector)[i], &_G(spieler_mi)[i]);
 
-	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !flags.InventMenu) {
+	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
 		_G(out)->setze_zeiger(_G(workptr));
 	}
 
 	sprite_engine();
-	if (_G(menu_display) == MENU_EINBLENDEN || flags.InventMenu) {
-		if (!flags.InventMenu)
+	if (_G(menu_display) == MENU_EINBLENDEN || _G(flags).InventMenu) {
+		if (!_G(flags).InventMenu)
 			plot_main_menu();
 	} else {
 		kb_mov(1);
 		_G(det)->unfreeze_ani();
-		check_mouse_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+		check_mouse_ausgang(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 
-		if (!flags.SaveMenu)
+		if (!_G(flags).SaveMenu)
 			calc_ani_timer();
 
 		if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
@@ -570,32 +570,32 @@ void set_up_screen(SetupScreenMode mode) {
 			                 , _G(scr_width));
 		}
 
-		if (flags.AdsDialog)
+		if (_G(flags).AdsDialog)
 			ads_menu();
 		if (_G(maus_links_click)) {
 			if (_G(menu_item) == CUR_WALK) {
 				if (_G(cur_ausgang_flag)) {
-					calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+					calc_ausgang(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 				} else {
-					if (!flags.ChewyDontGo) {
-						gpkt.Dx = minfo.x - _G(spieler_mi)[P_CHEWY].HotMovX +
+					if (!_G(flags).ChewyDontGo) {
+						_G(gpkt).Dx = _G(minfo).x - _G(spieler_mi)[P_CHEWY].HotMovX +
 						          _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
-						gpkt.Dy = minfo.y - _G(spieler_mi)[P_CHEWY].HotMovY +
+						_G(gpkt).Dy = _G(minfo).y - _G(spieler_mi)[P_CHEWY].HotMovY +
 						          _G(spieler).scrolly + _G(spieler_mi)[P_CHEWY].HotY;
-						gpkt.Sx = _G(spieler_vector)[P_CHEWY].Xypos[0] +
+						_G(gpkt).Sx = _G(spieler_vector)[P_CHEWY].Xypos[0] +
 						          _G(spieler_mi)[P_CHEWY].HotX;
-						gpkt.Sy = _G(spieler_vector)[P_CHEWY].Xypos[1] +
+						_G(gpkt).Sy = _G(spieler_vector)[P_CHEWY].Xypos[1] +
 						          _G(spieler_mi)[P_CHEWY].HotY;
-						gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
-						gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
-						gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
-						gpkt.Ebenen = _G(room)->_gedInfo[room_blk.AkAblage].Ebenen;
-						gpkt.AkMovEbene = _G(ged_mov_ebene);
-						_G(mov)->goto_xy(&gpkt);
+						_G(gpkt).Breite = _G(room)->_gedXAnz[_G(room_blk).AkAblage];
+						_G(gpkt).Hoehe = _G(room)->_gedYAnz[_G(room_blk).AkAblage];
+						_G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage];
+						_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen;
+						_G(gpkt).AkMovEbene = _G(ged_mov_ebene);
+						_G(mov)->goto_xy(&_G(gpkt));
 						_G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler_vector)[P_CHEWY].Xypos[0];
 						_G(spieler_mi)[P_CHEWY].XyzStart[1] = _G(spieler_vector)[P_CHEWY].Xypos[1];
-						_G(spieler_mi)[P_CHEWY].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[P_CHEWY].HotX;
-						_G(spieler_mi)[P_CHEWY].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[P_CHEWY].HotY;
+						_G(spieler_mi)[P_CHEWY].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[P_CHEWY].HotX;
+						_G(spieler_mi)[P_CHEWY].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[P_CHEWY].HotY;
 						_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[P_CHEWY].XyzStart, _G(spieler_mi)[P_CHEWY].Vorschub, &_G(spieler_vector)[P_CHEWY]);
 						get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
@@ -611,8 +611,8 @@ void set_up_screen(SetupScreenMode mode) {
 			int16 idx = _G(ged)->ged_idx(
 				_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 				_G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
-				_G(room)->_gedXAnz[room_blk.AkAblage],
-				_G(ged_mem)[room_blk.AkAblage]);
+				_G(room)->_gedXAnz[_G(room_blk).AkAblage],
+				_G(ged_mem)[_G(room_blk).AkAblage]);
 			check_shad(idx, 0);
 		} else {
 			for (i = 0; i < MAX_PERSON; i++) {
@@ -622,30 +622,30 @@ void set_up_screen(SetupScreenMode mode) {
 			}
 		}
 
-		for (i = 0; i < _G(auto_obj) && !flags.StopAutoObj; i++)
+		for (i = 0; i < _G(auto_obj) && !_G(flags).StopAutoObj; i++)
 			mov_objekt(&_G(auto_mov_vector)[i], &_G(auto_mov_obj)[i]);
 
-		nr = _G(obj)->is_iib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+		nr = _G(obj)->is_iib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 		if (nr != -1) {
 			txt_nr = _G(obj)->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
 		} else {
-			tmp = calc_maus_txt(minfo.x, minfo.y, mode);
+			tmp = calc_maus_txt(_G(minfo).x, _G(minfo).y, mode);
 			if (tmp == -1 || tmp == 255) {
 
-				nr = _G(obj)->is_sib_mouse(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
+				nr = _G(obj)->is_sib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 				if (nr != -1) {
 					txt_nr = _G(obj)->sib_txt_nr(nr);
 					mous_obj_action(nr, mode, INVENTAR_STATIC, txt_nr);
 				} else
-					calc_mouse_person(minfo.x, minfo.y);
+					calc_mouse_person(_G(minfo).x, _G(minfo).y);
 			}
 		}
 		if (_G(cur_display) == true && mode == DO_SETUP) {
 			_G(cur)->plot_cur();
 
-			if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
-				_G(out)->sprite_set(_G(curtaf)->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
+			if ((_G(spieler).inv_cur) && (_G(flags).CursorStatus == true))
+				_G(out)->sprite_set(_G(curtaf)->image[_G(pfeil_ani) + 32], _G(minfo).x, _G(minfo).y,
 				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
@@ -698,7 +698,7 @@ void set_up_screen(SetupScreenMode mode) {
 		showWalkAreas();
 
 	_G(cur_hide_flag) = false;
-	ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
+	ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 	if (!_G(menu_display))
 		calc_scroll(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 		            _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
@@ -722,7 +722,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 	if (mode == DO_SETUP) {
 
-		if (txt_nr != -1 && flags.ShowAtsInvTxt) {
+		if (txt_nr != -1 && _G(flags).ShowAtsInvTxt) {
 
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
@@ -734,8 +734,8 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			if (str_adr) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = minfo.x;
-				y = minfo.y;
+				x = _G(minfo).x;
+				y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_adr, anz);
 				for (i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
@@ -751,7 +751,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				obj_auswerten(nr, txt_mode);
 			} else {
 				if (txt_mode == INVENTAR_NORMAL) {
-					if (!flags.ChAutoMov) {
+					if (!_G(flags).ChAutoMov) {
 						_G(maus_links_click) = false;
 						auto_move(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
 						Dialogs::Inventory::look_screen(txt_mode, txt_nr);
@@ -791,23 +791,23 @@ void kb_mov(int16 mode) {
 	while (!ende) {
 		switch (_G(in)->get_switch_code()) {
 		case Common::KEYCODE_RIGHT:
-			if (minfo.x < 320 - _G(spieler).CurBreite)
-				minfo.x += 2;
+			if (_G(minfo).x < 320 - _G(spieler).CurBreite)
+				_G(minfo).x += 2;
 			break;
 
 		case Common::KEYCODE_LEFT:
-			if (minfo.x > 1)
-				minfo.x -= 2;
+			if (_G(minfo).x > 1)
+				_G(minfo).x -= 2;
 			break;
 
 		case Common::KEYCODE_UP:
-			if (minfo.y > 1)
-				minfo.y -= 2;
+			if (_G(minfo).y > 1)
+				_G(minfo).y -= 2;
 			break;
 
 		case Common::KEYCODE_DOWN:
-			if (minfo.y < 210 - _G(spieler).CurHoehe)
-				minfo.y += 2;
+			if (_G(minfo).y < 210 - _G(spieler).CurHoehe)
+				_G(minfo).y += 2;
 			break;
 
 		default:
@@ -815,7 +815,7 @@ void kb_mov(int16 mode) {
 			break;
 
 		}
-		_G(cur)->move(minfo.x, minfo.y);
+		_G(cur)->move(_G(minfo).x, _G(minfo).y);
 		if (mode)
 			ende = 1;
 		else
@@ -868,8 +868,8 @@ void kb_cur_action(int16 key, int16 mode) {
 void maus_action() {
 	int16 x, y;
 
-	x = minfo.x;
-	y = minfo.y;
+	x = _G(minfo).x;
+	y = _G(minfo).y;
 	if (x > invent_display[_G(spieler).InvDisp][0] &&
 	        x < invent_display[_G(spieler).InvDisp][0] + 48 &&
 	        y > invent_display[_G(spieler).InvDisp][1] &&
@@ -885,16 +885,16 @@ void maus_action() {
 		_G(inv_disp_ok) = false;
 	}
 	if (_G(atds)->aad_get_status() == -1) {
-		if (minfo.button || kbinfo.key_code == Common::KEYCODE_ESCAPE || kbinfo.key_code == Common::KEYCODE_RETURN) {
+		if (_G(minfo).button || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 
-			if (minfo.button == 2 || kbinfo.key_code == Common::KEYCODE_ESCAPE) {
-				if (!flags.main_maus_flag) {
-					kbinfo.scan_code = Common::KEYCODE_ESCAPE;
+			if (_G(minfo).button == 2 || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE) {
+				if (!_G(flags).main_maus_flag) {
+					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 				}
-			} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
-				if (!flags.main_maus_flag) {
+			} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+				if (!_G(flags).main_maus_flag) {
 					if (_G(menu_display) == MENU_EINBLENDEN)
-						kbinfo.scan_code = Common::KEYCODE_RETURN;
+						_G(kbinfo).scan_code = Common::KEYCODE_RETURN;
 					else if (_G(spieler).AkInvent != -1) {
 						if (_G(inv_disp_ok)) {
 							if (_G(spieler).inv_cur) {
@@ -904,17 +904,17 @@ void maus_action() {
 							} else {
 								_G(menu_item) = CUR_USE;
 								cursor_wahl(CUR_AK_INVENT);
-								kbinfo.scan_code = Common::KEYCODE_INVALID;
+								_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 							}
-						} else if (!flags.MausLinks)
+						} else if (!_G(flags).MausLinks)
 							_G(maus_links_click) = true;
-					} else if (!flags.MausLinks)
+					} else if (!_G(flags).MausLinks)
 						_G(maus_links_click) = true;
 				}
 			}
-			flags.main_maus_flag = 1;
+			_G(flags).main_maus_flag = 1;
 		} else
-			flags.main_maus_flag = 0;
+			_G(flags).main_maus_flag = 0;
 	}
 }
 
@@ -934,7 +934,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			hide_cur();
-			if (flags.InventMenu == false) {
+			if (_G(flags).InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 					_G(maus_links_click) = false;
 					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
@@ -1091,8 +1091,8 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		break;
 
 	case NO_ACTION:
-		if (mode == STATIC_USE && flags.StaticUseTxt == true)
-			flags.StaticUseTxt = false;
+		if (mode == STATIC_USE && _G(flags).StaticUseTxt == true)
+			_G(flags).StaticUseTxt = false;
 		else {
 			if (mode != STATIC_USE) {
 				calc_inv_no_use(test_nr, mode);
@@ -1233,30 +1233,30 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 	int16 key;
 	int16 tmp;
 	if (mov_nr < MAX_AUTO_MOV) {
-		if (!flags.ChAutoMov) {
+		if (!_G(flags).ChAutoMov) {
 			key = false;
 			move_status = true;
-			flags.ChAutoMov = true;
+			_G(flags).ChAutoMov = true;
 			_G(auto_p_nr) = p_nr;
 			tmp = _G(maus_links_click);
 			_G(maus_links_click) = false;
-			gpkt.Dx = _G(Rdi)->AutoMov[mov_nr].X -
+			_G(gpkt).Dx = _G(Rdi)->AutoMov[mov_nr].X -
 			          _G(spieler_mi)[p_nr].HotMovX + _G(spieler_mi)[p_nr].HotX;
-			gpkt.Dy = _G(Rdi)->AutoMov[mov_nr].Y -
+			_G(gpkt).Dy = _G(Rdi)->AutoMov[mov_nr].Y -
 			          _G(spieler_mi)[p_nr].HotMovY + _G(spieler_mi)[p_nr].HotY;
-			gpkt.Sx = _G(spieler_vector)[p_nr].Xypos[0] + _G(spieler_mi)[p_nr].HotX;
-			gpkt.Sy = _G(spieler_vector)[p_nr].Xypos[1] + _G(spieler_mi)[p_nr].HotY;
-			gpkt.Breite = _G(room)->_gedXAnz[room_blk.AkAblage];
-			gpkt.Hoehe = _G(room)->_gedYAnz[room_blk.AkAblage];
-			gpkt.Mem = _G(ged_mem)[room_blk.AkAblage];
-			gpkt.Ebenen = _G(room)->_gedInfo[room_blk.AkAblage].Ebenen;
-			gpkt.AkMovEbene = _G(ged_mov_ebene);
-			_G(mov)->goto_xy(&gpkt);
+			_G(gpkt).Sx = _G(spieler_vector)[p_nr].Xypos[0] + _G(spieler_mi)[p_nr].HotX;
+			_G(gpkt).Sy = _G(spieler_vector)[p_nr].Xypos[1] + _G(spieler_mi)[p_nr].HotY;
+			_G(gpkt).Breite = _G(room)->_gedXAnz[_G(room_blk).AkAblage];
+			_G(gpkt).Hoehe = _G(room)->_gedYAnz[_G(room_blk).AkAblage];
+			_G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage];
+			_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen;
+			_G(gpkt).AkMovEbene = _G(ged_mov_ebene);
+			_G(mov)->goto_xy(&_G(gpkt));
 
 			_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 			_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
-			_G(spieler_mi)[p_nr].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[p_nr].HotX;
-			_G(spieler_mi)[p_nr].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[p_nr].HotY;
+			_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
+			_G(spieler_mi)[p_nr].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[p_nr].HotY;
 			_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart,
 				_G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
 			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
@@ -1267,7 +1267,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 					if (SHOULD_QUIT)
 						return 0;
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
-						if (flags.ExitMov || flags.BreakAMov) {
+						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							key = Common::KEYCODE_ESCAPE;
 							_G(mov)->stop_auto_go();
 							move_status = false;
@@ -1276,24 +1276,24 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 					set_up_screen(DO_SETUP);
 				}
 			}
-			if (flags.ChAutoMov) {
+			if (_G(flags).ChAutoMov) {
 				ende = 0;
 				_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 				_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
-				_G(spieler_mi)[p_nr].XyzEnd[0] = gpkt.Dx - _G(spieler_mi)[p_nr].HotX;
-				_G(spieler_mi)[p_nr].XyzEnd[1] = gpkt.Dy - _G(spieler_mi)[p_nr].HotY;
+				_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
+				_G(spieler_mi)[p_nr].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[p_nr].HotY;
 				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart, _G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
 				get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
 				while (!ende) {
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
-						if (flags.ExitMov || flags.BreakAMov) {
+						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							_G(spieler_vector)[p_nr].Count = 0;
 							move_status = false;
 						}
 					}
 					if (!_G(spieler_vector)[p_nr].Count) {
 						if (move_status) {
-							if (flags.ExitMov == false && flags.ChAutoMov) {
+							if (_G(flags).ExitMov == false && _G(flags).ChAutoMov) {
 
 								set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
 								               _G(spieler_mi)[p_nr].XyzEnd[1],
@@ -1308,7 +1308,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			}
 			_G(auto_p_nr) = P_CHEWY;
 			_G(maus_links_click) = tmp;
-			flags.ChAutoMov = false;
+			_G(flags).ChAutoMov = false;
 		}
 	}
 
@@ -1339,7 +1339,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		if (mode == ANI_WAIT) {
 			while (!ende) {
 				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
-					if (flags.ExitMov || flags.BreakAMov) {
+					if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 						_G(spieler_vector)[p_nr].Count = 0;
 						move_status = false;
 					}
@@ -1392,7 +1392,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 	inv_no_use_mode = -1;
 
 	if (mode == DO_SETUP) {
-		if (flags.ShowAtsInvTxt) {
+		if (_G(flags).ShowAtsInvTxt) {
 			inv_no_use_mode = AUTO_OBJ;
 			txt_nr = calc_mouse_mov_obj(&idx);
 
@@ -1407,9 +1407,9 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 			if (txt_nr != -1) {
 				ret = -1;
 
-				if (_G(maus_links_click) && !flags.MausTxt) {
+				if (_G(maus_links_click) && !_G(flags).MausTxt) {
 					ok = true;
-					flags.MausTxt = true;
+					_G(flags).MausTxt = true;
 
 					switch (_G(menu_item)) {
 					case CUR_LOOK:
@@ -1485,7 +1485,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 						}
 					}
 
-					flags.MausTxt = false;
+					_G(flags).MausTxt = false;
 				} else {
 					ret = -1;
 				}
@@ -1516,7 +1516,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 	int16 *xy = nullptr;
 	int16 check;
 	is_person = -1;
-	if (flags.ShowAtsInvTxt) {
+	if (_G(flags).ShowAtsInvTxt) {
 
 		for (i = 0; i < MAX_PERSON && is_person == -1; i++) {
 			if (_G(spieler_mi)[i].Id == NO_MOV_OBJ)
@@ -1564,7 +1564,7 @@ void calc_mouse_person(int16 x, int16 y) {
 	int16 p_nr;
 	char ch_txt[MAX_PERSON][9] = {"Chewy", "Howard", "Nichelle"};
 	dia_nr = -1;
-	if (flags.ShowAtsInvTxt && !flags.InventMenu) {
+	if (_G(flags).ShowAtsInvTxt && !_G(flags).InventMenu) {
 		p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
 			if (!_G(spieler).PersonHide[p_nr]) {
@@ -1692,7 +1692,7 @@ void calc_ani_timer() {
 }
 
 void get_user_key(int16 mode) {
-	flags.StopAutoObj = true;
+	_G(flags).StopAutoObj = true;
 	maus_action();
 	_G(maus_links_click) = false;
 
@@ -1701,8 +1701,8 @@ void get_user_key(int16 mode) {
 		case Common::KEYCODE_F5:
 		case Common::KEYCODE_SPACE:
 		case Common::KEYCODE_ESCAPE:
-			_G(maus_old_x) = minfo.x;
-			_G(maus_old_y) = minfo.y;
+			_G(maus_old_x) = _G(minfo).x;
+			_G(maus_old_y) = _G(minfo).y;
 
 			_G(tmp_menu_item) = _G(menu_item);
 			_G(menu_item) = CUR_USE;
@@ -1721,7 +1721,7 @@ void get_user_key(int16 mode) {
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
-			kbinfo.key_code = '\0';
+			_G(kbinfo).key_code = '\0';
 			break;
 
 		default:
@@ -1729,7 +1729,7 @@ void get_user_key(int16 mode) {
 		}
 	}
 
-	flags.StopAutoObj = false;
+	_G(flags).StopAutoObj = false;
 }
 
 void clear_prog_ani() {
@@ -1741,13 +1741,13 @@ void clear_prog_ani() {
 }
 
 void set_ani_screen() {
-	if (flags.AniUserAction)
+	if (_G(flags).AniUserAction)
 		get_user_key(NO_SETUP);
 	set_up_screen(DO_SETUP);
 }
 
 void del_inventar(int16 nr) {
-	_G(obj)->del_inventar(nr, &room_blk);
+	_G(obj)->del_inventar(nr, &_G(room_blk));
 	_G(spieler).inv_cur = false;
 	_G(menu_item) = CUR_WALK;
 	_G(spieler).AkInvent = -1;
@@ -1811,25 +1811,25 @@ void calc_ausgang(int16 x, int16 y) {
 	int16 nr;
 	int16 u_idx;
 	int16 *ScrXy;
-	if (!flags.ExitMov) {
+	if (!_G(flags).ExitMov) {
 		_G(maus_links_click) = false;
 		nr = _G(obj)->is_exit(x, y);
 		if (nr != -1) {
-			flags.ExitMov = true;
+			_G(flags).ExitMov = true;
 			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
-				flags.ShowAtsInvTxt = false;
+				_G(flags).ShowAtsInvTxt = false;
 				_G(menu_item) = CUR_DISK;
 				cursor_wahl(CUR_DISK);
 				set_up_screen(DO_SETUP);
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
 				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
-				_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+				_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 				set_person_pos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               _G(spieler_mi)[_G(auto_p_nr)].HotMovX,
 				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - _G(spieler_mi)[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
-				ScrXy = (int16 *)_G(ablage)[room_blk.AkAblage];
+				ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 				get_scroll_off(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 				               _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 				               ScrXy[0], ScrXy[1],
@@ -1837,8 +1837,8 @@ void calc_ausgang(int16 x, int16 y) {
 
 				u_idx = _G(ged)->ged_idx(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 				                      _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
-				                      _G(room)->_gedXAnz[room_blk.AkAblage],
-				                      _G(ged_mem)[room_blk.AkAblage]);
+				                      _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+				                      _G(ged_mem)[_G(room_blk).AkAblage]);
 				check_shad(u_idx, 0);
 				set_person_spr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				_G(spieler_vector)[P_CHEWY].DelayCount = 0;
@@ -1846,13 +1846,13 @@ void calc_ausgang(int16 x, int16 y) {
 				_G(auto_obj) = 0;
 				_G(spieler_vector)[P_CHEWY].Xzoom = 0;
 				_G(spieler_vector)[P_CHEWY].Yzoom = 0;
-				flags.ShowAtsInvTxt = true;
+				_G(flags).ShowAtsInvTxt = true;
 				_G(menu_item) = CUR_WALK;
 				cursor_wahl(_G(menu_item));
-				flags.ExitMov = false;
+				_G(flags).ExitMov = false;
 				enter_room(nr);
 			}
-			flags.ExitMov = false;
+			_G(flags).ExitMov = false;
 			set_up_screen(DO_SETUP);
 		}
 	}
@@ -1896,7 +1896,7 @@ void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y,
 int16 scroll_delay = 0;
 void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
                  int16 *sc_x, int16 *sc_y) {
-	if (!flags.NoScroll) {
+	if (!_G(flags).NoScroll) {
 		if (!scroll_delay) {
 
 			if ((_G(spieler).ScrollxStep * _G(spieler).DelaySpeed) > CH_X_PIX)
@@ -2011,15 +2011,15 @@ void save_person_rnr() {
 	int16 i;
 	for (i = 0; i < MAX_PERSON; i++)
 		_G(person_tmp_room)[i] = _G(spieler).PersonRoomNr[i];
-	flags.SavePersonRnr = true;
+	_G(flags).SavePersonRnr = true;
 }
 
 void set_person_rnr() {
 	int16 i;
-	if (flags.SavePersonRnr) {
+	if (_G(flags).SavePersonRnr) {
 		for (i = 0; i < MAX_PERSON; i++)
 			_G(spieler).PersonRoomNr[i] = _G(person_tmp_room)[i];
-		flags.SavePersonRnr = false;
+		_G(flags).SavePersonRnr = false;
 	}
 }
 
@@ -2031,7 +2031,7 @@ int16 is_chewy_busy() {
 			if (_G(atds)->ads_get_status() == -1) {
 				if (!_G(mov)->auto_go_status()) {
 					if (!_G(spieler_vector)[P_CHEWY].Count) {
-						if (!flags.ExitMov) {
+						if (!_G(flags).ExitMov) {
 							if (!_G(spz_ani)[P_CHEWY]) {
 								ret = false;
 							}
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 204270cf8dd..53fef237cbf 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -263,21 +263,21 @@ void ads_menu() {
 	int16 col;
 	AdsNextBlk *an_blk;
 
-	if (flags.AdsDialog) {
-		flags.ShowAtsInvTxt = false;
-		flags.MainInput = false;
+	if (_G(flags).AdsDialog) {
+		_G(flags).ShowAtsInvTxt = false;
+		_G(flags).MainInput = false;
 		if (_G(ads_item_anz) > 4)
 			cur_y_start = 190;
 		else
 			cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
-		cur_y = minfo.y;
+		cur_y = _G(minfo).y;
 		if (cur_y < 160 || cur_y > cur_y_start + 10)
 			cur_y = 255;
 		else
 			cur_y = (cur_y_start + 5 - cur_y) / 10;
 
 		if (_G(atds)->aad_get_status() == -1 && _G(ads_push) == false &&
-		        flags.NoDiaBox == false) {
+		        _G(flags).NoDiaBox == false) {
 			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
@@ -302,7 +302,7 @@ void ads_menu() {
 			if (cur_y < _G(ads_item_anz) && cur_y >= 0 && _G(ads_push) == false) {
 				_G(cur_display) = false;
 				_G(ads_push) = true;
-				minfo.y = 159;
+				_G(minfo).y = 159;
 				an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
 				if (an_blk->BlkNr == -1) {
 					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
@@ -319,7 +319,7 @@ void ads_menu() {
 				_G(det)->show_static_spr(_G(talk_hide_static));
 				_G(talk_start_ani) = -1;
 				_G(talk_hide_static) = -1;
-				if (flags.AdsDialog == false) {
+				if (_G(flags).AdsDialog == false) {
 					_G(atds)->save_ads_header(_G(ads_dia_nr));
 				}
 			}
@@ -336,13 +336,13 @@ void stop_ads_dialog() {
 	aad_wait(-1);
 	_G(spieler).DispFlag = _G(ads_tmp_dsp);
 	_G(cur_display) = true;
-	flags.ShowAtsInvTxt = true;
-	flags.MainInput = true;
-	flags.AdsDialog = false;
+	_G(flags).ShowAtsInvTxt = true;
+	_G(flags).MainInput = true;
+	_G(flags).AdsDialog = false;
 	_G(maus_links_click) = false;
 	_G(atds)->stop_ads();
-	if (minfo.button)
-		flags.main_maus_flag = 1;
+	if (_G(minfo).button)
+		_G(flags).main_maus_flag = 1;
 }
 
 void cur_2_inventory() {
@@ -369,7 +369,7 @@ void inventory_2_cur(int16 nr) {
 
 void new_invent_2_cur(int16 inv_nr) {
 	cur_2_inventory();
-	_G(obj)->add_inventar(inv_nr, &room_blk);
+	_G(obj)->add_inventar(inv_nr, &_G(room_blk));
 	inventory_2_cur(inv_nr);
 }
 
@@ -383,7 +383,7 @@ void invent_2_slot(int16 nr) {
 			ok = true;
 		}
 	}
-	_G(obj)->add_inventar(nr, &room_blk);
+	_G(obj)->add_inventar(nr, &_G(room_blk));
 }
 
 int16 del_invent_slot(int16 nr) {
@@ -405,7 +405,7 @@ void remove_inventory(int16 nr) {
 	if (nr == _G(spieler).AkInvent) {
 		del_inventar(nr);
 	} else {
-		_G(obj)->del_inventar(nr, &room_blk);
+		_G(obj)->del_inventar(nr, &_G(room_blk));
 		del_invent_slot(nr);
 	}
 }
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 3e9d823dc7f..46e46945105 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -87,7 +87,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 	}
 
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
 void timer_action(int16 t_nr) {
@@ -121,12 +121,12 @@ void timer_action(int16 t_nr) {
 	}
 #undef TIMER
 
-	if (default_flag && flags.AutoAniPlay == false) {
+	if (default_flag && _G(flags).AutoAniPlay == false) {
 		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
 		_G(uhr)->reset_timer(t_nr, 0);
 	}
 
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
 void check_ged_action(int16 index) {
@@ -134,8 +134,8 @@ void check_ged_action(int16 index) {
 	index -= 50;
 	index /= 4;
 
-	if (!flags.GedAction) {
-		flags.GedAction = true;
+	if (!_G(flags).GedAction) {
+		_G(flags).GedAction = true;
 
 #define GED_ACTION(NUM) case NUM: Room##NUM::gedAction(index); break;
 		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
@@ -152,7 +152,7 @@ void check_ged_action(int16 index) {
 
 		case 45:
 		case 46:
-			if (!index && flags.ExitMov)
+			if (!index && _G(flags).ExitMov)
 				_G(HowardMov) = 1;
 			break;
 
@@ -168,10 +168,10 @@ void check_ged_action(int16 index) {
 		}
 #undef GED_ACTION
 
-		flags.GedAction = false;
+		_G(flags).GedAction = false;
 	}
 
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
 int16 ged_user_func(int16 idx_nr) {
@@ -320,13 +320,13 @@ void enter_room(int16 eib_nr) {
 		_G(spieler).ZoomXy[i][1] = 0;
 	}
 
-	flags.ZoomMov = false;
+	_G(flags).ZoomMov = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)_G(room)->_roomInfo->ZoomFak;
 	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)_G(room)->_roomInfo->ZoomFak;
 
 	_G(uhr)->reset_timer(0, 0);
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 	_G(SetUpScreenFunc) = nullptr;
 	_G(HowardMov) = 0;
 	_G(cur_hide_flag) = false;
@@ -448,7 +448,7 @@ void enter_room(int16 eib_nr) {
 #undef ENTRY
 #undef ENTRY_NR
 
-	flags.LoadGame = false;
+	_G(flags).LoadGame = false;
 }
 
 void exit_room(int16 eib_nr) {
@@ -478,20 +478,20 @@ void exit_room(int16 eib_nr) {
 		else if (eib_nr == 41)
 			_G(spieler).R17Location = 3;
 		_G(spieler).ScrollxStep = 1;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		_G(spieler).R18Gitter = false;
 		_G(spieler).room_e_obj[50].Attribut = 255;
 		_G(spieler).room_e_obj[41].Attribut = AUSGANG_UNTEN;
 		break;
 
 	case 19:
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		break;
 
 	case 21:
 		if (eib_nr == 47)
 			_G(spieler).R17Location = 1;
-		flags.NoEndPosMovObj = false;
+		_G(flags).NoEndPosMovObj = false;
 		_G(SetUpScreenFunc) = nullptr;
 		load_chewy_taf(CHEWY_NORMAL);
 
@@ -523,7 +523,7 @@ void exit_room(int16 eib_nr) {
 	case 29: Room29::xit(); break;
 
 	case 34:
-		flags.ChewyDontGo = false;
+		_G(flags).ChewyDontGo = false;
 		break;
 
 	case 41: Room41::xit(); break;
@@ -598,7 +598,7 @@ void exit_room(int16 eib_nr) {
 	case 123:
 	case 125:
 	case 135:
-		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
+		xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 		x = xy[0] + 30;
 		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
@@ -613,7 +613,7 @@ void exit_room(int16 eib_nr) {
 	case 92:
 	case 122:
 	case 131:
-		xy = (int16 *)_G(ablage)[room_blk.AkAblage];
+		xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 		x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 		y = xy[1] + 3;
 		break;
@@ -874,8 +874,8 @@ static void flic_proc1() {
 		do {
 			_G(flic_val2) = VALS1[i];
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, _G(flic_val2));
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, _G(flic_val2));
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			g_engine->playVideo(_G(flic_val2));
 #endif
@@ -927,10 +927,10 @@ void flic_cut(int16 nr, int16 mode) {
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
-	Ci.Handle = f;
+	_G(Ci).Handle = f;
 //#endif
 
-	if (Ci.Handle) {
+	if (_G(Ci).Handle) {
 		switch (nr) {
 		case FCUT_001:
 		case 1000:
@@ -974,8 +974,8 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_040:
 			do {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
@@ -989,8 +989,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 			do {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(nr);
@@ -1025,9 +1025,9 @@ void flic_cut(int16 nr, int16 mode) {
 				if (!_G(modul)) {
 					start_aad(623, -1);
 #ifndef NEW_VIDEO_CODE
-					_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
+					_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_061);
 					_G(flc)->set_custom_user_function(Room43::setup_func);
-					_G(flc)->custom_play(&Ci);
+					_G(flc)->custom_play(&_G(Ci));
 					_G(flc)->remove_custom_user_function();
 #else
 					g_engine->playVideo(FCUT_061);
@@ -1069,8 +1069,8 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_095:
 			while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, nr);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(nr);
 #endif
@@ -1080,10 +1080,10 @@ void flic_cut(int16 nr, int16 mode) {
 		case FCUT_112:
 			_G(sndPlayer)->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, nr);
-			ret = _G(flc)->custom_play(&Ci);
-			_G(mem)->file->select_pool_item(Ci.Handle, nr);
-			_G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			ret = _G(flc)->custom_play(&_G(Ci));
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(nr);
 			playVideo(nr);
@@ -1102,8 +1102,8 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1123:
 			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_133[i]);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_133[i]);
@@ -1123,8 +1123,8 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			print_rows(590);
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 1);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 1);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			g_engine->playVideo(FCUT_001);
 #endif
@@ -1134,8 +1134,8 @@ void flic_cut(int16 nr, int16 mode) {
 					_G(fx)->border(_G(workpage), 100, 0, 0);
 					print_rows(591);
 #ifndef NEW_VIDEO_CODE
-					_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
-					ret = _G(flc)->custom_play(&Ci);
+					_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 3);
+					ret = _G(flc)->custom_play(&_G(Ci));
 					SHOULD_QUIT_RETURN;
 #else
 					playVideo(i + 3);
@@ -1148,8 +1148,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 3 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 6);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 6);
@@ -1160,8 +1160,8 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1009:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 9);
+				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 9);
@@ -1174,8 +1174,8 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 12);
+				ret = _G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(i + 12);
 #endif
@@ -1184,7 +1184,7 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(out)->cls();
-				_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_017);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
@@ -1197,8 +1197,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 15);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 15);
@@ -1217,8 +1217,8 @@ void flic_cut(int16 nr, int16 mode) {
 				}
 
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1045[i]);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1045[i]);
@@ -1236,8 +1236,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 43);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 43);
+				ret = _G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(43);
 #endif
@@ -1246,8 +1246,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1048:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 50);
-			_G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 50);
+			_G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(50);
 #endif
@@ -1256,16 +1256,16 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 48);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 48);
+				ret = _G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(48);
 #endif
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 49);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 49);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(49);
 #endif
@@ -1274,11 +1274,11 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				ret = _G(flc)->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&_G(Ci));
 			}
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(mem)->file->select_pool_item(Ci.Handle, 54);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 54);
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
@@ -1290,8 +1290,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 55);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 55);
@@ -1300,7 +1300,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 46);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 46);
 #endif
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
@@ -1311,24 +1311,24 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(currentSong) = -1;
 			load_room_music(255);
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 58);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 58);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(58);
 #endif
 
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 59);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 59);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(59);
 #endif
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 60);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 60);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(60);
 #endif
@@ -1336,8 +1336,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 61);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 61);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(61);
 #endif
@@ -1345,8 +1345,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 62);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 62);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(62);
 #endif
@@ -1360,8 +1360,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 65);
+				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 65);
@@ -1371,8 +1371,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1068:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 68);
-			_G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 68);
+			_G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(68);
 #endif
@@ -1380,8 +1380,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 70);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 70);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(70);
@@ -1391,8 +1391,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1069:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 69);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 69);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(69);
 #endif
@@ -1400,8 +1400,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 71);
+				ret = _G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(i + 71);
 #endif
@@ -1414,8 +1414,8 @@ void flic_cut(int16 nr, int16 mode) {
 				print_rows(605);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + FLIC_CUT_1074[i]);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + FLIC_CUT_1074[i]);
@@ -1427,8 +1427,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 8 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
-				ret = _G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1080[i]);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1080[i]);
@@ -1438,8 +1438,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1087:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 87);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 87);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(87);
 #endif
@@ -1447,8 +1447,8 @@ void flic_cut(int16 nr, int16 mode) {
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 102);
+				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(i + 102);
@@ -1458,8 +1458,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1088:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 88);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 88);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(88);
 #endif
@@ -1467,8 +1467,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, 86);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 86);
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				playVideo(86);
 #endif
@@ -1478,7 +1478,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1093:
 			for (i = 0; i < 12 && ret != -1; ++i) {
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1093[i]);
 				switch (FLIC_CUT_1093[i]) {
 				case 90:
 				case 91:
@@ -1489,7 +1489,7 @@ void flic_cut(int16 nr, int16 mode) {
 					break;
 				}
 
-				ret = _G(flc)->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 			}
 			break;
@@ -1497,9 +1497,9 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1106:
 			for (i = 0; i < 3 && ret == -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1106[i]);
 				_G(out)->cls();
-				_G(flc)->custom_play(&Ci);
+				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1106[i]);
@@ -1509,15 +1509,15 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1107:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_107);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(107);
 #endif
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				_G(mem)->file->select_pool_item(Ci.Handle, 109);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 109);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
@@ -1528,17 +1528,17 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1108:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 108);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 108);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(108);
 #endif
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				_G(mem)->file->select_pool_item(Ci.Handle, 115);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 115);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(flc)->custom_play(&Ci);
+				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
@@ -1552,8 +1552,8 @@ void flic_cut(int16 nr, int16 mode) {
 			load_room_music(257);
 			_G(sndPlayer)->setMusicMasterVol(20);
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle, 110);
-			ret = _G(flc)->custom_play(&Ci);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, 110);
+			ret = _G(flc)->custom_play(&_G(Ci));
 #else
 			playVideo(110);
 #endif
@@ -1562,8 +1562,8 @@ void flic_cut(int16 nr, int16 mode) {
 			if (ret != -1) {
 				_G(sndPlayer)->setMusicMasterVol(63);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(mem)->file->select_pool_item(Ci.Handle, 112);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 112);
+				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			ailsnd->setMusicMasterVol(63);
@@ -1576,9 +1576,9 @@ void flic_cut(int16 nr, int16 mode) {
 		case 1113:
 			for (i = 0; i < 5 && ret != -1; ++i) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1113[i]);
 				_G(out)->cls();
-				ret = _G(flc)->custom_play(&Ci);
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				playVideo(FLIC_CUT_1113[i]);
@@ -1588,10 +1588,10 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case 1117:
 #ifndef NEW_VIDEO_CODE
-			if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
+			if (_G(mem)->file->select_pool_item(_G(Ci).Handle, 117) != (uint16)-1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
-				_G(mem)->file->select_pool_item(Ci.Handle, 119);
-				_G(flc)->custom_play(&Ci);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, 119);
+				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(fx)->border(_G(workpage), 100, 0, 0);
@@ -1601,15 +1601,15 @@ void flic_cut(int16 nr, int16 mode) {
 
 		default:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(Ci.Handle,
+			_G(mem)->file->select_pool_item(_G(Ci).Handle,
 				(nr < 1000) ? nr : nr - 1000);
 
 			switch (mode) {
 			case 0:
-				_G(flc)->custom_play(&Ci);
+				_G(flc)->custom_play(&_G(Ci));
 				break;
 			case 1:
-				_G(flc)->play(Ci.Handle, Ci.VirtScreen, Ci.TempArea);
+				_G(flc)->play(_G(Ci).Handle, _G(Ci).VirtScreen, _G(Ci).TempArea);
 				break;
 			default:
 				break;
@@ -1622,7 +1622,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 		}
 
-		chewy_fclose(Ci.Handle);
+		chewy_fclose(_G(Ci).Handle);
 	} else {
 		error("flic_cut error");
 	}
@@ -1641,13 +1641,13 @@ void flic_cut(int16 nr, int16 mode) {
 		_G(uhr)->reset_timer(0, 0);
 	}
 
-	if (!flags.NoPalAfterFlc)
+	if (!_G(flags).NoPalAfterFlc)
 		_G(out)->set_palette(_G(pal));
 
 	_G(atds)->stop_aad();
 	_G(atds)->stop_ats();
 	_G(out)->setze_zeiger(_G(workptr));
-	flags.NoPalAfterFlc = false;
+	_G(flags).NoPalAfterFlc = false;
 }
 
 uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 2b8953fdf35..aa63f72293a 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -571,7 +571,7 @@ void switch_room(int16 nr) {
 	_G(fx_blend) = BLEND1;
 	exit_room(-1);
 	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
-	_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	enter_room(-1);
 	set_up_screen(DO_SETUP);
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 5c60fa0d82f..3d3889138ac 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -56,7 +56,7 @@ void Room0::entry() {
 			_G(obj)->check_inventar(0))
 		_G(det)->hide_static_spr(6);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
 		_G(cur_hide_flag) = 0;
 		hide_cur();
@@ -83,7 +83,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			if (!_G(spieler).R0FueterLab)
 				_G(timer_action_ctr) = 2;
 
-			flags.AutoAniPlay = true;
+			_G(flags).AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
 				start_aad_wait(42, -1);
 				auto_move(5, P_CHEWY);
@@ -115,7 +115,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 				feederAni();
 
 			_G(uhr)->reset_timer(t_nr, 0);
-			flags.AutoAniPlay = false;
+			_G(flags).AutoAniPlay = false;
 		}
 		break;
 
@@ -129,7 +129,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 bool Room0::getPillow() {
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(1, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
@@ -138,7 +138,7 @@ bool Room0::getPillow() {
 		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(det)->hide_static_spr(6);
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		show_cur();
 		return true;
 	}
@@ -159,7 +159,7 @@ bool Room0::pullSlime() {
 		cursor_wahl(CUR_WALK);
 		_G(atds)->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		show_cur();
 		return true;
 	}
@@ -203,7 +203,7 @@ void Room0::eyeStart(EyeMode mode) {
 	}
 
 	ende = false;
-	flags.AniUserAction = true;
+	_G(flags).AniUserAction = true;
 
 	if (mode == EYE_START) {
 		g_engine->_sound->playSound(FLAP_DETAIL, 0, false);
@@ -257,7 +257,7 @@ void Room0::eyeStart(EyeMode mode) {
 	}
 
 	clear_prog_ani();
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 
 	if (mode == EYE_END) {
 		trapDoorClose();
@@ -270,7 +270,7 @@ void Room0::eyeWait() {
 	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
 	adi->delay_count = 15;
-	flags.AniUserAction = true;
+	_G(flags).AniUserAction = true;
 
 	while (adi->ani_count < 46) {
 		clear_prog_ani();
@@ -298,7 +298,7 @@ void Room0::eyeWait() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	clear_prog_ani();
 }
 
@@ -308,18 +308,18 @@ void Room0::calcEyeClick(int16 ani_nr) {
 	int16 i;
 
 	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
+		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
 			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = minfo.x;
-				y = minfo.y;
+				x = _G(minfo).x;
+				y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
-		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
@@ -393,7 +393,7 @@ void Room0::eyeSlimeBack() {
 	adi->ani_count = 53;
 
 	ende = false;
-	flags.AniUserAction = true;
+	_G(flags).AniUserAction = true;
 
 	while (!ende) {
 		clear_prog_ani();
@@ -424,7 +424,7 @@ void Room0::eyeSlimeBack() {
 		}
 	}
 
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	clear_prog_ani();
 }
 
@@ -491,7 +491,7 @@ void Room0::feederStart(int16 mode) {
 
 	ende = false;
 	if (_G(spieler).R0SlimeUsed)
-		flags.AniUserAction = true;
+		_G(flags).AniUserAction = true;
 
 	while (!ende) {
 		clear_prog_ani();
@@ -500,7 +500,7 @@ void Room0::feederStart(int16 mode) {
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 		_G(spr_info)[1].ZEbene = 191;
 
-		if (flags.AniUserAction)
+		if (_G(flags).AniUserAction)
 			get_user_key(NO_SETUP);
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
@@ -528,7 +528,7 @@ void Room0::feederStart(int16 mode) {
 	}
 
 	clear_prog_ani();
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 
 	if (mode) {
 		_G(det)->start_detail(FLAP_DETAIL, 1, RUECK);
@@ -561,18 +561,18 @@ void Room0::calcPillowClick(int16 ani_nr) {
 	int16 i;
 
 	if (mouse_on_prog_ani() == ani_nr) {
-		if (minfo.button != 1 && kbinfo.key_code != Common::KEYCODE_RETURN) {
+		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
 			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = minfo.x;
-				y = minfo.y;
+				x = _G(minfo).x;
+				y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
-		} else if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
@@ -595,7 +595,7 @@ void Room0::checkFeed() {
 	ende = false;
 
 	if (_G(spieler).R0SlimeUsed)
-		flags.AniUserAction = true;
+		_G(flags).AniUserAction = true;
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -670,7 +670,7 @@ void Room0::checkFeed() {
 	}
 
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	clear_prog_ani();
 }
 
@@ -728,7 +728,7 @@ void Room0::trapDoorOpen() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	flags.AniUserAction = true;
+	_G(flags).AniUserAction = true;
 	for (i = 0; i < 25; i++) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -738,7 +738,7 @@ void Room0::trapDoorOpen() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	clear_prog_ani();
 }
 
@@ -770,7 +770,7 @@ void Room0::feederAni() {
 			register_cutscene(1);
 
 			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
-			_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			set_person_pos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
 			               _G(Rdi)->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
 			_G(spieler_vector)[P_CHEWY].DelayCount = 0;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 7a744ee0b2a..152c1a5ade6 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -96,7 +96,7 @@ void Room3::terminal() {
 	switch (Room4::sonde_comp()) {
 	case 0:
 		probeTransfer();
-		_G(spr_info)[0].Image = room_blk.DetImage[120];
+		_G(spr_info)[0].Image = _G(room_blk).DetImage[120];
 		_G(spr_info)[0].X = 250;
 		_G(spr_info)[0].Y = 2;
 		_G(spr_info)[0].ZEbene = 0;
@@ -128,7 +128,7 @@ void Room3::terminal() {
 			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
-			_G(room)->load_room(&room_blk, _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			_G(fx_blend) = BLEND1;
 			start_ani_block(3, ablock5);
 			set_person_pos(91, 107, P_CHEWY, P_LEFT);
@@ -140,7 +140,7 @@ void Room3::terminal() {
 	case 1:
 		_G(auto_obj) = 1;
 		_G(maus_links_click) = false;
-		minfo.button = 0;
+		_G(minfo).button = 0;
 		stop_person(P_CHEWY);
 		start_aad_wait(51, -1);
 		set_up_screen(DO_SETUP);
@@ -193,7 +193,7 @@ void Room3::sonde_knarre() {
 	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt1);
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
@@ -286,7 +286,7 @@ void Room3::probeTransfer() {
 		  { { 250,   2, 180 }, 0, 3 } }
 	};
 
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	hide_cur();
 	/*rdi = */(void)_G(det)->get_room_detail_info();
 	int16 tmp = _G(zoom_horizont);
@@ -339,7 +339,7 @@ void Room3::probeTransfer() {
 
 			if (i == 2 || i == 1) {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
-					if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
+					if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 						if (is_cur_inventar(SPINAT_INV)) {
 							_G(ssi)[0].X = 120;
 							_G(ssi)[0].Y = 100;
@@ -377,7 +377,7 @@ void Room3::probeTransfer() {
 		case 0:
 			show_cur();
 			start_aad(52);
-			flags.AniUserAction = true;
+			_G(flags).AniUserAction = true;
 			spr_nr = 141;
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(det)->load_taf_seq(142, 8, nullptr);
@@ -389,7 +389,7 @@ void Room3::probeTransfer() {
 
 		case 2:
 			_G(det)->del_taf_tbl(142, 7, nullptr);
-			flags.AniUserAction = false;
+			_G(flags).AniUserAction = false;
 			switch_room(2);
 			break;
 
@@ -398,7 +398,7 @@ void Room3::probeTransfer() {
 		}
 	}
 
-	flags.AniUserAction = false;
+	_G(flags).AniUserAction = false;
 	_G(zoom_horizont) = tmp;
 	_G(auto_obj) = 0;
 }
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index fa5db78007a..627f08bc3bc 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -52,7 +52,7 @@ int16 Room4::sonde_comp() {
 	switch_room(4);
 	_G(cur_display) = true;
 	int16 ende = 0;
-	curblk.sprite = room_blk.DetImage;
+	_G(curblk).sprite = _G(room_blk).DetImage;
 	int16 cur_x = 1;
 	int16 spr_nr = RAHMEN_ROT;
 	_G(cur)->move(160, 160);
@@ -61,7 +61,7 @@ int16 Room4::sonde_comp() {
 	while (!ende) {
 		maus_action();
 		if (_G(maus_links_click)) {
-			switch (_G(in)->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
+			switch (_G(in)->maus_vector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
 				if (cur_x > 0)
 					--cur_x;
@@ -89,24 +89,24 @@ int16 Room4::sonde_comp() {
 			}
 		}
 
-		_G(spr_info)[0].Image = room_blk.DetImage[spr_nr];
+		_G(spr_info)[0].Image = _G(room_blk).DetImage[spr_nr];
 		_G(spr_info)[0].ZEbene = 0;
 		_G(spr_info)[0].X = CUR_POS[cur_x][0];
 		_G(spr_info)[0].Y = CUR_POS[cur_x][1];
 
-		if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
-			curani.ani_anf = HAND_CLICK;
-			curani.ani_end = HAND_CLICK;
+		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+			_G(curani).ani_anf = HAND_CLICK;
+			_G(curani).ani_end = HAND_CLICK;
 		} else {
-			curani.ani_anf = HAND_NORMAL;
-			curani.ani_end = HAND_NORMAL;
+			_G(curani).ani_anf = HAND_NORMAL;
+			_G(curani).ani_end = HAND_NORMAL;
 		}
 		cursor_wahl(CUR_USER);
 		_G(spieler).CurHoehe = 16;
 		_G(in)->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
 
-		if (minfo.y < 124)
-			minfo.y = 123;
+		if (_G(minfo).y < 124)
+			_G(minfo).y = 123;
 
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
@@ -120,9 +120,9 @@ int16 Room4::sonde_comp() {
 
 	_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
-	minfo.button = 0;
+	_G(minfo).button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
-	_G(room)->load_room(&room_blk, 3, &_G(spieler));
+	_G(room)->load_room(&_G(room_blk), 3, &_G(spieler));
 	set_person_pos(110, 139, P_CHEWY, P_LEFT);
 
 	_G(fx_blend) = BLEND1;
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 0b893467766..136555933e2 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -55,13 +55,13 @@ static const AniBlock ABLOCK7[2] = {
 
 void Room6::entry() {
 	_G(zoom_horizont) = 80;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 
 	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
 		_G(det)->start_detail(7, 255, ANI_VOR);
 		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-		if (!flags.LoadGame)
+		if (!_G(flags).LoadGame)
 			++_G(spieler).R6RaumBetreten;
 
 		if (_G(spieler).R6RaumBetreten == 2) {
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 61ed4ff809c..5ece58a96ac 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -100,7 +100,7 @@ void Room7::klingel() {
 		_G(det)->stop_detail(5);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
@@ -121,7 +121,7 @@ void Room7::klingel() {
 		_G(obj)->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		_G(det)->hide_static_spr(7);
 
 	} else if (!_G(spieler).R7SeilOk) {
@@ -135,7 +135,7 @@ void Room7::klingel() {
 		_G(det)->stop_detail(5);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_move(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(det)->start_detail(0, 255, ANI_VOR);
@@ -145,7 +145,7 @@ void Room7::klingel() {
 		_G(det)->stop_detail(0);
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		_G(det)->del_taf_tbl(192, 74, nullptr);
 
 	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
@@ -155,7 +155,7 @@ void Room7::klingel() {
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(obj)->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
-		flags.NoPalAfterFlc = false;
+		_G(flags).NoPalAfterFlc = false;
 		register_cutscene(2);
 		flic_cut(FCUT_003, CFO_MODE);
 		set_person_pos(201, 117, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index c3e987b2cd0..d5663bf1983 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -94,9 +94,9 @@ void Room8::start_verbrennen() {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
-			if (minfo.button == 1 || kbinfo.key_code == Common::KEYCODE_RETURN) {
-				if (minfo.x > 146 && minfo.x < 208 &&
-					minfo.y > 107 && minfo.y < 155)
+			if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+				if (_G(minfo).x > 146 && _G(minfo).x < 208 &&
+					_G(minfo).y > 107 && _G(minfo).y < 155)
 					break;
 			}
 		}
@@ -133,13 +133,13 @@ bool Room8::gips_wurf() {
 		wait_detail(5);
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
-		_G(obj)->set_inventar(MASKE_INV, 181, 251, 8, &room_blk);
+		_G(obj)->set_inventar(MASKE_INV, 181, 251, 8, &_G(room_blk));
 		_G(det)->del_taf_tbl(116, 30, nullptr);
 		auto_move(8, P_CHEWY);
-		flags.AtsAction = false;
+		_G(flags).AtsAction = false;
 		_G(menu_item) = CUR_USE;
 		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
-		flags.AtsAction = true;
+		_G(flags).AtsAction = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(20, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -168,7 +168,7 @@ void Room8::open_gdoor() {
 
 void Room8::talk_nimoy() {
 	auto_move(9, P_CHEWY);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(0, 120);
 	if (_G(spieler).R8Folter) {
 		int16 diaNr = _G(spieler).R8GipsWurf ? 2 : 1;
@@ -182,7 +182,7 @@ void Room8::talk_nimoy() {
 		load_ads_dia(6);
 	}
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index b770fe7709a..427d22a1c7b 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
 		_G(out)->setze_zeiger(_G(workptr));
-		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->setze_zeiger(nullptr);
 		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 6c804ac215f..20212ef0804 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -42,7 +42,7 @@ AniBlock ABLOCK18[2] = {
 
 void Room11::entry() {
 	_G(zoom_horizont) = 80;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 
 	if (_G(spieler).R12ChewyBork) {
@@ -61,14 +61,14 @@ void Room11::entry() {
 		_G(spieler).room_e_obj[21].Attribut = 255;
 		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			start_ani_block(2, ABLOCK17);
 			auto_move(8, P_CHEWY);
 			start_aad_wait(31, -1);
 			_G(det)->stop_detail(9);
 		}
 		_G(det)->show_static_spr(8);
-		if (!flags.LoadGame)
+		if (!_G(flags).LoadGame)
 			auto_move(6, P_CHEWY);
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 	}
@@ -93,32 +93,32 @@ void Room11::gedAction(int index) {
 }
 
 void Room11::bork_zwinkert() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 		_G(det)->hide_static_spr(8);
 		start_ani_block(2, ABLOCK18);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		_G(det)->show_static_spr(8);
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
 void Room11::talk_debug() {
 	if (_G(spieler).R12ChewyBork) {
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		start_ads_wait(5);
 		_G(menu_item) = CUR_WALK;
 		cursor_wahl(CUR_WALK);
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
 void Room11::chewy_bo_use() {
 	if (_G(spieler).R12ChewyBork) {
 		hide_cur();
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 
 		stop_person(P_CHEWY);
 		_G(det)->hide_static_spr(8);
@@ -128,7 +128,7 @@ void Room11::chewy_bo_use() {
 		_G(det)->show_static_spr(8);
 		auto_move(6, P_CHEWY);
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		show_cur();
 	}
 }
@@ -183,7 +183,7 @@ void Room11::get_card() {
 	if (_G(spieler).R11CardOk) {
 		cur_2_inventory();
 		_G(spieler).R11CardOk = false;
-		_G(obj)->add_inventar(_G(spieler).R11IdCardNr, &room_blk);
+		_G(obj)->add_inventar(_G(spieler).R11IdCardNr, &_G(room_blk));
 
 		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
 		cursor_wahl(CUR_AK_INVENT);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 5c651440d0d..8f6489f6837 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -74,10 +74,10 @@ void Room12::entry() {
 		for (int16 i = 7; i < 10; i++)
 			_G(det)->show_static_spr(i);
 
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_scroll(60, 0);
 		flic_cut(FCUT_016, CFO_MODE);
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 
 		for (int16 i = 7; i < 10; i++)
 			_G(det)->hide_static_spr(i);
@@ -113,7 +113,7 @@ void Room12::init_bork() {
 		if (!_G(auto_obj))
 			_G(det)->load_taf_seq(62, 24, nullptr);
 
-		if (!flags.AutoAniPlay && !flags.ChAutoMov) {
+		if (!_G(flags).AutoAniPlay && !_G(flags).ChAutoMov) {
 			_G(auto_obj) = 1;
 			_G(mov_phasen)[R12_BORK_OBJ].AtsText = 120;
 			_G(mov_phasen)[R12_BORK_OBJ].Lines = 5;
@@ -157,7 +157,7 @@ void Room12::talk_bork() {
 
 void Room12::bork_ok() {
 	hide_cur();
-	flags.MausLinks = true;
+	_G(flags).MausLinks = true;
 	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
 	auto_move(5, P_CHEWY);
 	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
@@ -185,7 +185,7 @@ void Room12::bork_ok() {
 	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
-	flags.MausLinks = false;
+	_G(flags).MausLinks = false;
 	show_cur();
 }
 
@@ -201,13 +201,13 @@ int16 Room12::use_terminal() {
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
 				start_spz(CH_TALK5, 255, false, P_CHEWY);
 				start_aad_wait(112, -1);
-				flags.NoScroll = true;
+				_G(flags).NoScroll = true;
 				auto_scroll(46, 0);
 				flic_cut(FCUT_017, CFO_MODE);
 				register_cutscene(5);
 
 				load_chewy_taf(CHEWY_BORK);
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 				_G(atds)->set_ats_str(118, 0, ATS_DATEI);
 				_G(det)->hide_static_spr(12);
 				_G(menu_item) = CUR_WALK;
@@ -250,14 +250,14 @@ int16 Room12::chewy_trans() {
 	int16 action_flag = false;
 	if (!_G(spieler).inv_cur && _G(spieler).R12TransOn) {
 		action_flag = true;
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(9, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK16);
 		set_person_pos(108, 82, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).R12TransOn = false;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 	return action_flag;
 }
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index abbc2dc2b2d..e89ea4fa95a 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -73,7 +73,7 @@ void Room13::entry() {
 				_G(det)->start_detail(i, 255, false);
 		}
 		
-		if (!flags.LoadGame && _G(spieler).R13Band) {
+		if (!_G(flags).LoadGame && _G(spieler).R13Band) {
 			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 			_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R13Band = false;
@@ -123,7 +123,7 @@ void Room13::talk_bork() {
 		auto_move(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
 		auto_move(11, P_CHEWY);
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_scroll(41, 0);
 
 		start_spz(68, 255, false, P_CHEWY);
@@ -131,7 +131,7 @@ void Room13::talk_bork() {
 		flic_cut(FCUT_014, CFO_MODE);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 
 		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
@@ -170,10 +170,10 @@ void Room13::jmp_band() {
 			_G(maus_links_click) = false;
 			auto_move(12, P_CHEWY);
 			start_aad_wait(117, -1);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
 			flic_cut(FCUT_015, CFO_MODE);
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
 			_G(spieler).R13Bandlauf = false;
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 68f84582b33..ea32b83c56f 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -37,7 +37,7 @@ void Room14::entry() {
 	if (!_G(spieler).R14Feuer)
 		_G(obj)->hide_sib(46);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
 			_G(det)->show_static_spr(6);
@@ -58,14 +58,14 @@ bool Room14::timer(int16 t_nr, int16 ani_nr) {
 }
 
 void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
-	if (!flags.AutoAniPlay && !_G(spieler).R14Feuer) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay && !_G(spieler).R14Feuer) {
+		_G(flags).AutoAniPlay = true;
 		_G(det)->hide_static_spr(9);
 		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
 		_G(uhr)->reset_timer(t_nr, 0);
 		_G(det)->show_static_spr(9);
 		_G(det)->start_detail(7, 1, ANI_VOR);
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
@@ -114,7 +114,7 @@ int16 Room14::use_gleiter() {
 void Room14::talk_eremit()  {
 	if (!_G(spieler).R14Feuer) {
 		auto_move(6, P_CHEWY);
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 
 		if (_G(spieler).R14Translator) {
 			load_ads_dia(0);
@@ -123,7 +123,7 @@ void Room14::talk_eremit()  {
 			hide_cur();
 			start_aad_wait(24, -1);
 			show_cur();
-			flags.AutoAniPlay = false;
+			_G(flags).AutoAniPlay = false;
 		}
 	}
 }
@@ -153,7 +153,7 @@ void Room14::feuer() {
 	int16 tmp = _G(spieler).AkInvent;
 	_G(spieler).R14Feuer = true;
 	_G(cur_hide_flag) = false;
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	hide_cur();
 
 	if (is_cur_inventar(BWAFFE_INV)) {
@@ -190,7 +190,7 @@ void Room14::feuer() {
 	invent_2_slot(FLUXO_INV);
 	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
 	_G(spieler).R14FluxoFlex = true;
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 	show_cur();
 }
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index abed45f7699..91d4d244e26 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -66,7 +66,7 @@ void Room17::entry() {
 		_G(det)->show_static_spr(7);
 
 	if (_G(spieler).R17Location == 1) {
-		flags.ZoomMov = true;
+		_G(flags).ZoomMov = true;
 		_G(zoom_mov_fak) = 3;
 		_G(room)->set_zoom(25);
 		_G(zoom_horizont) = 0;
@@ -137,12 +137,12 @@ void Room17::gedAction(int index) {
 int16 Room17::use_seil() {
 	int16 action_flag = false;
 
-	if (!flags.AutoAniPlay && _G(spieler).R17Location == 1 && is_cur_inventar(SEIL_INV)) {
+	if (!_G(flags).AutoAniPlay && _G(spieler).R17Location == 1 && is_cur_inventar(SEIL_INV)) {
 		action_flag = true;
 		hide_cur();
 
 		del_inventar(_G(spieler).AkInvent);
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(10, 1, ANI_VOR);
@@ -150,7 +150,7 @@ int16 Room17::use_seil() {
 		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
 		plot_seil();
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(119, -1);
 
@@ -172,7 +172,7 @@ void Room17::kletter_down() {
 	_G(det)->load_taf_seq(177, 1, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(14, 1, ANI_VOR);
-	flags.ZoomMov = false;
+	_G(flags).ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
 	_G(room)->set_zoom(32);
@@ -188,7 +188,7 @@ void Room17::kletter_up() {
 	_G(det)->load_taf_seq(141, 4, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(11, 1, ANI_VOR);
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollyStep = 1;
 	_G(room)->set_zoom(25);
@@ -202,9 +202,9 @@ void Room17::calc_seil() {
 	if (_G(spieler).R17Seil) {
 		if (_G(spieler).R17Location == 2) {
 			start_aad_wait(619, -1);
-		} else if (!flags.AutoAniPlay && !_G(spieler).inv_cur) {
+		} else if (!_G(flags).AutoAniPlay && !_G(spieler).inv_cur) {
 			close_door();
-			flags.AutoAniPlay = true;
+			_G(flags).AutoAniPlay = true;
 			_G(mov_phasen)[CHEWY_OBJ].AtsText = 0;
 			_G(mov_phasen)[CHEWY_OBJ].Lines = 2;
 			_G(mov_phasen)[CHEWY_OBJ].Repeat = 1;
@@ -229,7 +229,7 @@ void Room17::calc_seil() {
 			set_person_spr(P_LEFT, P_CHEWY);
 			_G(spieler).ScrollyStep = 1;
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			flags.AutoAniPlay = false;
+			_G(flags).AutoAniPlay = false;
 			_G(auto_obj) = 0;
 			xit();
 		}
@@ -237,8 +237,8 @@ void Room17::calc_seil() {
 }
 
 void Room17::door_kommando(int16 mode) {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 
 		if (!mode) {
 			if (!_G(spieler).R17DoorKommand) {
@@ -252,7 +252,7 @@ void Room17::door_kommando(int16 mode) {
 			close_door();
 		}
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
 	}
 }
@@ -329,7 +329,7 @@ int16 Room17::get_oel() {
 		start_detail_wait(13, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
-		_G(obj)->add_inventar(BECHER_VOLL_INV, &room_blk);
+		_G(obj)->add_inventar(BECHER_VOLL_INV, &_G(room_blk));
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 6b714825292..e830f86512d 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -124,8 +124,8 @@ void Room18::entry() {
 }
 
 bool Room18::timer(int16 t_nr, int16 ani_nr) {
-	if (!_G(spieler).R18SurimyWurf && !flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(spieler).R18SurimyWurf && !_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 
 		if (t_nr == _G(timer_nr)[0]) {
 			_G(det)->hide_static_spr(16);
@@ -155,7 +155,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 			_G(uhr)->reset_timer(_G(timer_nr)[1], 15);
 		}
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 
 	return false;
@@ -180,7 +180,7 @@ void Room18::init_borks() {
 	_G(timer_nr)[1] = _G(room)->set_timer(255, 15);
 	_G(spieler).scrollx = 276;
 	_G(spieler).scrolly = 0;
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 }
 
 void Room18::monitor() {
@@ -282,7 +282,7 @@ int16 Room18::calc_surimy() {
 		_G(det)->show_static_spr(19);
 		_G(det)->hide_static_spr(26);
 
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 		auto_scroll(70, 0);
@@ -306,7 +306,7 @@ int16 Room18::calc_surimy() {
 		auto_scroll(0, 0);
 		wait_auto_obj(SURIMY_OBJ);
 		_G(spieler).ScrollxStep = 6;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		auto_scroll(318, 0);
 		_G(spieler).ScrollxStep = 2;
 		_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room19.cpp b/engines/chewy/rooms/room19.cpp
index 7bbda47f3d5..2818f09e195 100644
--- a/engines/chewy/rooms/room19.cpp
+++ b/engines/chewy/rooms/room19.cpp
@@ -29,7 +29,7 @@ namespace Rooms {
 
 void Room19::entry() {
 	_G(zoom_horizont) = 250;
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 24;
 }
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 67b25d83abb..b71fb04185a 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -69,7 +69,7 @@ void Room21::entry() {
 	calc_laser();
 	init_spinne();
 	_G(timer_nr)[2] = _G(room)->set_timer(255, 1);
-	flags.NoEndPosMovObj = true;
+	_G(flags).NoEndPosMovObj = true;
 	_G(SetUpScreenFunc) = setup_func;
 }
 
@@ -167,8 +167,8 @@ void Room21::chewy_kolli() {
 
 	for (int16 i = 0; i < 3 && !kolli; i++) {
 		int16 spr_nr = _G(mov_phasen)[i].Phase[_G(auto_mov_vector)[i].Phase][0] + _G(auto_mov_vector)[i].PhNr;
-		int16 *xy = (int16 *)room_blk.DetImage[spr_nr];
-		int16 *Cxy = room_blk.DetKorrekt + (spr_nr << 1);
+		int16 *xy = (int16 *)_G(room_blk).DetImage[spr_nr];
+		int16 *Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 		int16 xoff = xy[0];
 		int16 yoff = xy[1];
 		if (i == 2)
@@ -188,16 +188,16 @@ void Room21::chewy_kolli() {
 		}
 	}
 
-	if (kolli && !flags.AutoAniPlay) {
+	if (kolli && !_G(flags).AutoAniPlay) {
 		const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 		stop_person(P_CHEWY);
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
 		_G(det)->set_detail_pos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		start_detail_wait(ani_nr, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		_G(spieler_vector)[P_CHEWY].Count = tmp;
 		get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 		_G(mov)->continue_auto_go();
@@ -206,9 +206,9 @@ void Room21::chewy_kolli() {
 
 void Room21::salto() {
 	if (!_G(spieler).inv_cur && _G(atds)->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8
-		&& !_G(spieler).R21Salto && !flags.AutoAniPlay) {
+		&& !_G(spieler).R21Salto && !_G(flags).AutoAniPlay) {
 		_G(spieler).R21Salto = true;
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
 		for (int16 i = 0; i < 3; i++) {
@@ -219,7 +219,7 @@ void Room21::salto() {
 		start_ani_block(3, ABLOCK19);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_aad_wait(36, -1);
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
@@ -240,9 +240,9 @@ void Room21::use_gitter_energie() {
 int16 Room21::use_fenster() {
 	int16 action_flag = false;
 
-	if (!_G(spieler).inv_cur && !flags.AutoAniPlay && _G(spieler).R21Laser1Weg) {
+	if (!_G(spieler).inv_cur && !_G(flags).AutoAniPlay && _G(spieler).R21Laser1Weg) {
 		action_flag = true;
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		_G(spieler).R18Gitter = true;
 		auto_move(13, P_CHEWY);
 		set_person_pos(541, 66, P_CHEWY, P_LEFT);
@@ -255,7 +255,7 @@ int16 Room21::use_fenster() {
 
 		_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
 		_G(spieler).room_e_obj[41].Attribut = 255;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 2376fc92e69..e1ded0fab72 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -69,7 +69,7 @@ void Room22::entry() {
 }
 
 bool Room22::timer(int16 t_nr, int16 ani_nr) {
-	if (!ani_nr && !flags.ExitMov) {
+	if (!ani_nr && !_G(flags).ExitMov) {
 		bork(t_nr);
 	}
 
@@ -78,9 +78,9 @@ bool Room22::timer(int16 t_nr, int16 ani_nr) {
 
 int16 Room22::chewy_amboss() {
 	int16 action_flag = false;
-	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !flags.AutoAniPlay) {
+	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !_G(flags).AutoAniPlay) {
 		action_flag = true;
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		hide_cur();
 
 		auto_move(5, P_CHEWY);
@@ -88,11 +88,11 @@ int16 Room22::chewy_amboss() {
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		auto_move(2, P_CHEWY);
-		flags.NoPalAfterFlc = false;
+		_G(flags).NoPalAfterFlc = false;
 		flic_cut(FCUT_007, CFO_MODE);
 		_G(spieler).R22ChewyPlatt = true;
 		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 
 		show_cur();
 	}
@@ -100,8 +100,8 @@ int16 Room22::chewy_amboss() {
 }
 
 void Room22::bork(int16 t_nr) {
-	if (!flags.AutoAniPlay && !is_chewy_busy()) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay && !is_chewy_busy()) {
+		_G(flags).AutoAniPlay = true;
 
 		if (!_G(spieler).R22BorkPlatt) {
 			hide_cur();
@@ -132,7 +132,7 @@ void Room22::bork(int16 t_nr) {
 		}
 
 		_G(uhr)->reset_timer(t_nr, 0);
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
@@ -181,9 +181,9 @@ void Room22::get_bork() {
 int16 Room22::malen() {
 	int16 action_flag = false;
 
-	if (!flags.AutoAniPlay && is_cur_inventar(17)) {
+	if (!_G(flags).AutoAniPlay && is_cur_inventar(17)) {
 		action_flag = true;
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
 		flic_cut(FCUT_008, CFO_MODE);
 		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -192,7 +192,7 @@ int16 Room22::malen() {
 		_G(obj)->hide_sib(SIB_PAINT_R22);
 		del_inventar(_G(spieler).AkInvent);
 		_G(obj)->calc_all_static_detail();
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 
 		if (!_G(spieler).R22ChewyPlatt) {
 			_G(spieler).R22ChewyPlatt = true;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 3588fc9eba6..9bcd1340e82 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -87,7 +87,7 @@ int16 Room23::start_gleiter() {
 				if (_G(spieler).R23GleiterExit == 14) {
 					_G(out)->setze_zeiger(nullptr);
 					_G(out)->cls();
-					flags.NoPalAfterFlc = true;
+					_G(flags).NoPalAfterFlc = true;
 					flic_cut(FCUT_012, CFO_MODE);
 					register_cutscene(7);
 					_G(out)->cls();
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index adc578b2b33..506e154c46a 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -36,14 +36,14 @@ static const uint8 KRISTALL_SPR[3][3] = {
 };
 
 void Room24::entry() {
-	flags.MainInput = false;
+	_G(flags).MainInput = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(0, 0, P_CHEWY, -1);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	curblk.sprite = room_blk.DetImage;
-	curani.ani_anf = 7;
-	curani.ani_end = 10;
+	_G(curblk).sprite = _G(room_blk).DetImage;
+	_G(curani).ani_anf = 7;
+	_G(curani).ani_end = 10;
 	_G(menu_item) = CUR_USER;
 	cursor_wahl(CUR_USER);
 
@@ -68,7 +68,7 @@ void Room24::xit() {
 	set_person_pos(263, 144, P_CHEWY, -1);
 	_G(spieler).scrollx = 88;
 	_G(maus_links_click) = false;
-	flags.MainInput = true;
+	_G(flags).MainInput = true;
 }
 
 void Room24::use_hebel(int16 txt_nr) {
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 1136eecef1f..13870d95720 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -81,7 +81,7 @@ void Room25::entry() {
 		start_aad_wait(64, -1);
 		show_cur();
 
-	} else if (_G(spieler).R25GleiterExit && !flags.LoadGame) {
+	} else if (_G(spieler).R25GleiterExit && !_G(flags).LoadGame) {
 		set_person_pos(127, 122, P_CHEWY, P_LEFT);
 
 		if (!_G(spieler).R25SurimyGo) {
@@ -119,7 +119,7 @@ int16 Room25::gleiter_loesch() {
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
-			_G(obj)->add_inventar(MILCH_WAS_INV, &room_blk);
+			_G(obj)->add_inventar(MILCH_WAS_INV, &_G(room_blk));
 			inventory_2_cur(MILCH_WAS_INV);
 			start_aad_wait(253, -1);
 		}
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 8dec70064f7..eb8c3a7e753 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room28::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
 
@@ -73,7 +73,7 @@ void Room28::entry(int16 eib_nr) {
 					start_aad_wait(194, -1);
 					_G(spieler).room_e_obj[62].Attribut = 255;
 					_G(atds)->set_ats_str(208, 1, ATS_DATEI);
-					flags.NoScroll = true;
+					_G(flags).NoScroll = true;
 
 					auto_scroll(0, 0);
 					_G(flc)->set_flic_user_function(cut_serv1);
@@ -88,7 +88,7 @@ void Room28::entry(int16 eib_nr) {
 						_G(fx_blend) = BLEND3;
 					}
 
-					flags.NoScroll = false;
+					_G(flags).NoScroll = false;
 
 					if (_G(spieler).R40TeilKarte) {
 						haendler();
@@ -117,7 +117,7 @@ void Room28::entry(int16 eib_nr) {
 					set_person_pos(480, 118, P_HOWARD, P_LEFT);
 					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
 					_G(fx_blend) = BLEND_NONE;
-					flags.ExitMov = false;
+					_G(flags).ExitMov = false;
 					_G(spieler_mi)[P_HOWARD].Mode = true;
 					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
 					_G(spieler_mi)[P_HOWARD].Mode = false;
@@ -126,7 +126,7 @@ void Room28::entry(int16 eib_nr) {
 				} else {
 					set_person_pos(480, 100, P_HOWARD, P_LEFT);
 					go_auto_xy(420, 113, P_HOWARD, ANI_GO);
-					flags.ExitMov = false;
+					_G(flags).ExitMov = false;
 					auto_move(6, P_CHEWY);
 				}
 				break;
@@ -152,7 +152,7 @@ void Room28::xit(int16 eib_nr) {
 			_G(spieler).R28ExitTown = true;
 		}
 
-		flags.ExitMov = false;
+		_G(flags).ExitMov = false;
 		auto_move(6, P_HOWARD);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 	}
@@ -214,7 +214,7 @@ void Room28::use_surimy() {
 
 	if (!_G(spieler).R28SurimyCar) {
 		hide_cur();
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_scroll(0, 0);
 		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
@@ -238,7 +238,7 @@ void Room28::use_surimy() {
 	_G(obj)->calc_all_static_detail();
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	show_cur();
 }
 
@@ -246,8 +246,8 @@ void Room28::set_pump() {
 	hide_cur();
 
 	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
-		if (!flags.AutoAniPlay) {
-			flags.AutoAniPlay = true;
+		if (!_G(flags).AutoAniPlay) {
+			_G(flags).AutoAniPlay = true;
 			if (_G(spieler_vector)[P_CHEWY].Xypos[0] < 380)
 				auto_move(5, P_CHEWY);
 
@@ -283,7 +283,7 @@ void Room28::set_pump() {
 				++_G(spieler).R28PumpTxt;
 			}
 
-			flags.AutoAniPlay = false;
+			_G(flags).AutoAniPlay = false;
 		}
 	} else {
 		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index f4e73d9a394..581addd3b94 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -151,7 +151,7 @@ void Room29::schlitz_sitz() {
 		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(maus_links_click) = false;
-		kbinfo.scan_code = Common::KEYCODE_INVALID;
+		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
 		show_cur();
 	}
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 0152b3cffac..1b039f8e61b 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -163,7 +163,7 @@ int16 Room31::use_topf() {
 					start_ani_block(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					del_inventar(_G(spieler).AkInvent);
-					_G(obj)->add_inventar(MILCH_LEER_INV, &room_blk);
+					_G(obj)->add_inventar(MILCH_LEER_INV, &_G(room_blk));
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
 					dia_nr = 151;
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index bf463144a16..ecd6d2f445e 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room34::entry() {
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		use_kuehlschrank();
 }
 
@@ -39,7 +39,7 @@ bool Room34::use_kuehlschrank() {
 	if (!_G(spieler).inv_cur) {
 		result = true;
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			hide_cur();
 			auto_move(3, P_CHEWY);
 			_G(maus_links_click) = false;
@@ -48,9 +48,9 @@ bool Room34::use_kuehlschrank() {
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		flags.ChewyDontGo = true;
+		_G(flags).ChewyDontGo = true;
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			switch_room(34);
 		}
 
@@ -64,7 +64,7 @@ void Room34::xit_kuehlschrank() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(54, 111, P_CHEWY, -1);
 	switch_room(33);
-	flags.ChewyDontGo = false;
+	_G(flags).ChewyDontGo = false;
 	_G(maus_links_click) = false;
 }
 
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 866e17040d1..414f14e32a9 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -39,13 +39,13 @@ static const AniBlock ABLOCK31[3] = {
 
 void Room37::entry() {
 	_G(zoom_horizont) = 100;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(obj)->show_sib(74);
 	_G(obj)->show_sib(75);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		_G(spieler).scrollx = 124;
 		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
 	}
@@ -89,8 +89,8 @@ void Room37::gedAction(int index) {
 void Room37::setup_func() {
 	if (_G(maus_links_click) && !_G(spieler).R37Kloppe &&
 			_G(menu_item) == CUR_WALK) {
-		if ((minfo.x + _G(spieler).scrollx > 380 && minfo.y > 120) ||
-			(minfo.x + _G(spieler).scrollx > 482)) {
+		if ((_G(minfo).x + _G(spieler).scrollx > 380 && _G(minfo).y > 120) ||
+			(_G(minfo).x + _G(spieler).scrollx > 482)) {
 			// Don't allow moving into chicken coop area
 			// until the rooster has left
 			auto_move(7, P_CHEWY);
@@ -108,7 +108,7 @@ short Room37::use_wippe() {
 		if (is_cur_inventar(H_FUTTER_INV)) {
 			hide_cur();
 			auto_move(0, P_CHEWY);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(129, 0);
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(159, -1);
@@ -116,7 +116,7 @@ short Room37::use_wippe() {
 			_G(flc)->set_flic_user_function(cut_serv1);
 			flic_cut(FCUT_047, CFO_MODE);
 			_G(flc)->remove_flic_user_function();
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 			show_cur();
 			_G(spieler).scrollx = 269;
 			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
@@ -171,10 +171,10 @@ int16 Room37::use_glas() {
 	if (!_G(spieler).R37Gebiss) {
 		action_flag = true;
 		if (is_cur_inventar(ANGEL2_INV)) {
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			hide_cur();
 			auto_move(5, P_CHEWY);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(146, 0);
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(147, -1);
@@ -193,7 +193,7 @@ int16 Room37::use_glas() {
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(146, -1);
 			show_cur();
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 			g_engine->_sound->playSound(3);
 		} else {
 			auto_move(4, P_CHEWY);
@@ -208,15 +208,15 @@ void Room37::dog_bell() {
 	int16 ani_nr = 0;
 	hide_cur();
 
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 		g_engine->_sound->stopSound(0); // nr 3, sslot 0
 
 		if (!_G(spieler).R37Gebiss) {
 			stop_person(P_CHEWY);
-			flags.ChAutoMov = false;
+			_G(flags).ChAutoMov = false;
 			set_person_spr(P_LEFT, P_CHEWY);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(178, 0);
 			disable_timer();
 			_G(det)->stop_detail(3);
@@ -243,7 +243,7 @@ void Room37::dog_bell() {
 		} else if (!_G(spieler).R37HundScham) {
 			stop_person(P_CHEWY);
 			set_person_spr(P_LEFT, P_CHEWY);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(178, 0);
 			_G(room)->set_timer_status(3, TIMER_STOP);
 			_G(det)->del_static_ani(3);
@@ -260,7 +260,7 @@ void Room37::dog_bell() {
 			ani_nr = CH_TALK6;
 		}
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
@@ -268,7 +268,7 @@ void Room37::dog_bell() {
 		}
 	}
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	show_cur();
 }
 
@@ -312,7 +312,7 @@ void Room37::use_hahn() {
 			_G(det)->start_detail(9, 1, ANI_VOR);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(GEBISS_INV);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(177, 0);
 
 			while (_G(det)->get_ani_status(9)) {
@@ -328,14 +328,14 @@ void Room37::use_hahn() {
 			_G(det)->stop_detail(10);
 
 			_G(spieler).scrollx = 320;
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 			_G(atds)->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(det)->hide_static_spr(8);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(141, -1);
-			_G(obj)->add_inventar(EIER_INV, &room_blk);
+			_G(obj)->add_inventar(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
 			show_cur();
 		}
@@ -353,11 +353,11 @@ void Room37::hahn_dia() {
 	switch_room(38);
 	start_ads_wait(9);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.LoadGame = true;
+	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = tmp_scrollx;
 	_G(spieler).scrolly = tmp_scrolly;
 	switch_room(37);
-	flags.LoadGame = false;
+	_G(flags).LoadGame = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index e66782d1e7d..c693c89c064 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -181,12 +181,12 @@ int16 Room39::use_tv() {
 		if (_G(spieler).R39TvKanal >= 5)
 			_G(spieler).R39TvKanal = -1;
 
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_042, CFO_MODE);
 		++_G(spieler).R39TvKanal;
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 
 		if (_G(spieler).R39TvKanal == 2)
 			flic_cut(FCUT_036, CFO_MODE);
@@ -218,14 +218,14 @@ int16 Room39::use_tv() {
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_041, CFO_MODE);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
 			_G(out)->set_palette(_G(pal));
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], CFO_MODE);
 
 			_G(out)->cls();
@@ -273,7 +273,7 @@ int16 Room39::use_tv() {
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
 		_G(out)->set_palette(_G(pal));
-		flags.NoPalAfterFlc = false;
+		_G(flags).NoPalAfterFlc = false;
 	}
 
 	if (dia_nr != -1) {
@@ -291,8 +291,8 @@ void Room39::look_tv(bool cls_mode) {
 	_flag = false;
 
 	if (_G(spieler).R39TvOn) {
-		if (!flags.AutoAniPlay) {
-			flags.AutoAniPlay = true;
+		if (!_G(flags).AutoAniPlay) {
+			_G(flags).AutoAniPlay = true;
 			int16 flic_nr;
 			int16 dia_nr;
 			if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
@@ -310,7 +310,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
 				_G(out)->set_palette(_G(pal));
-				flags.NoPalAfterFlc = true;
+				_G(flags).NoPalAfterFlc = true;
 			}
 
 			if (_G(spieler).R39TransMensch) {
@@ -329,7 +329,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
 				_G(out)->set_palette(_G(pal));
-				flags.NoPalAfterFlc = false;
+				_G(flags).NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TransMensch && dia_nr == 85)
 					start_aad_wait(dia_nr, -1);
@@ -337,7 +337,7 @@ void Room39::look_tv(bool cls_mode) {
 		}
 
 		_G(maus_links_click) = false;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 64afb3d49c5..c04aa8da05c 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -71,7 +71,7 @@ void Room40::entry(int16 eib_nr) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			switch (eib_nr) {
 			case 69:
 				set_person_pos(30, 105, P_HOWARD, P_RIGHT);
@@ -126,7 +126,7 @@ void Room40::xit(int16 eib_nr) {
 				move_train(1);
 				register_cutscene(15);
 				
-				flags.NoPalAfterFlc = true;
+				_G(flags).NoPalAfterFlc = true;
 				flic_cut(FCUT_073, CFO_MODE);
 
 				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
@@ -162,7 +162,7 @@ void Room40::move_train(int16 mode) {
 	_G(spieler).R40TrainMove = false;
 	hide_cur();
 	auto_move(9, P_CHEWY);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(232, 0);
 
 	if (!mode)
@@ -208,7 +208,7 @@ void Room40::move_train(int16 mode) {
 	if (!mode)
 		auto_scroll(180, 0);
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	show_cur();
 }
 
@@ -292,8 +292,8 @@ void Room40::setup_func() {
 					_G(spieler).R40PoliceWeg = true;
 					show_cur();
 
-					flags.MausLinks = false;
-					flags.MainInput = true;
+					_G(flags).MausLinks = false;
+					_G(flags).MainInput = true;
 					_G(spieler).R40HoUse = false;
 					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
 
@@ -344,7 +344,7 @@ int16 Room40::use_mr_pumpkin() {
 						_G(out)->ausblenden(1);
 						Room43::catch_pg();
 						remove_inventory(LIKOER_INV);
-						_G(obj)->add_inventar(LIKOER2_INV, &room_blk);
+						_G(obj)->add_inventar(LIKOER2_INV, &_G(room_blk));
 						inventory_2_cur(LIKOER2_INV);
 						switch_room(40);
 						start_aad_wait(236, -1);
@@ -459,7 +459,7 @@ int16 Room40::use_haendler() {
 			auto_move(11, P_HOWARD);
 			start_aad_wait(208, -1);
 			auto_move(6, P_HOWARD);
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 
 			auto_scroll(270, 0);
 			_G(det)->del_static_ani(4);
@@ -480,7 +480,7 @@ int16 Room40::use_haendler() {
 				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
 				switch_room(28);
@@ -494,8 +494,8 @@ int16 Room40::use_haendler() {
 			_G(menu_item) = CUR_WALK;
 			cursor_wahl(_G(menu_item));
 			show_cur();
-			flags.NoScroll = false;
-			flags.MausLinks = false;
+			_G(flags).NoScroll = false;
+			_G(flags).MausLinks = false;
 			_G(spieler).R40HoUse = false;
 		}
 	}
@@ -516,7 +516,7 @@ int16 Room40::use_bmeister() {
 		bmeister_dia(215);
 		start_aad_wait(216, -1);
 		_G(spieler).R40HoUse = false;
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		_G(menu_item) = CUR_WALK;
 		cursor_wahl(_G(menu_item));
 		show_cur();
@@ -531,7 +531,7 @@ int16 Room40::use_bmeister() {
 			new_invent_2_cur(HOTEL_INV);
 			bmeister_dia(237);
 			_G(spieler).flags37_80 = true;
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 			show_cur();
 		}
 	}
@@ -542,7 +542,7 @@ int16 Room40::use_bmeister() {
 void Room40::bmeister_dia(int16 aad_nr) {
 	auto_move(7, P_CHEWY);
 	auto_move(12, P_HOWARD);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(206, 0);
 	_G(det)->del_static_ani(0);
 	_G(room)->set_timer_status(0, TIMER_STOP);
@@ -552,7 +552,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 
 	if (aad_nr == 237) {
 		start_aad_wait(aad_nr, -1);
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_062, CFO_MODE);
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(375, -1);
@@ -560,7 +560,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 		start_aad_wait(aad_nr, -1);
 	}
 
-	flags.NoPalAfterFlc = false;
+	_G(flags).NoPalAfterFlc = false;
 	_G(room)->set_timer_status(0, TIMER_START);
 	_G(det)->set_static_ani(0, -1);
 	_G(det)->del_static_ani(2);
@@ -590,7 +590,7 @@ bool Room40::use_police() {
 			_G(menu_item) = CUR_WALK;
 			cursor_wahl(_G(menu_item));
 			show_cur();
-			flags.MausLinks = false;
+			_G(flags).MausLinks = false;
 		}
 	} else {
 		start_aad_wait(225, -1);
@@ -643,8 +643,8 @@ int16 Room40::use_tele() {
 				auto_move(1, P_CHEWY);
 				_G(spieler).R40DuengerMit = false;
 				_G(spieler).R40DuengerTele = true;
-				flags.MausLinks = true;
-				flags.MainInput = false;
+				_G(flags).MausLinks = true;
+				_G(flags).MainInput = false;
 				timer_wert = 3;
 			}
 
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index ad6b9f6eb44..6170e04af62 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -41,7 +41,7 @@ void Room41::entry() {
 	if (!_G(spieler).R41LolaOk) {
 		g_engine->_sound->playSound(6);
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			start_ani_block(2, ABLOCK32);
@@ -63,7 +63,7 @@ void Room41::entry() {
 		_G(atds)->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
-	if (!flags.LoadGame)
+	if (!_G(flags).LoadGame)
 		set_person_pos(241, 113, P_HOWARD, P_RIGHT);
 
 	_G(SetUpScreenFunc) = setup_func;
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index fd98b60ee7a..d24a43eef35 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -39,7 +39,7 @@ void Room42::entry() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
 		_G(SetUpScreenFunc) = setup_func;
 
-		if (!flags.LoadGame) {
+		if (!_G(flags).LoadGame) {
 			_G(det)->stop_detail(0);
 			_G(timer_nr)[0] = _G(room)->set_timer(8, 5);
 			_G(det)->set_static_ani(8, -1);
@@ -154,7 +154,7 @@ int16 Room42::use_beamter() {
 		cursor_wahl(_G(menu_item));
 		show_cur();
 		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
-		flags.MausLinks = false;
+		_G(flags).MausLinks = false;
 	}
 
 	return action_flag;
@@ -185,7 +185,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		flags.NoDiaBox = true;
+		_G(flags).NoDiaBox = true;
 
 		switch (str_end_nr) {
 		case 1:
@@ -230,7 +230,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 	_G(det)->start_detail(6, 255, ANI_VOR);
 	start_aad_wait(135, -1);
 	_G(det)->stop_detail(6);
-	flags.NoDiaBox = false;
+	_G(flags).NoDiaBox = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	show_cur();
 }
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 6e7842315c2..65a26d2a714 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -37,7 +37,7 @@ void Room43::night_small() {
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(188, -1);
 	auto_scroll(320, 0);
@@ -58,7 +58,7 @@ void Room43::night_small() {
 	start_aad_wait(191, -1);
 	flic_cut(FCUT_058, CFO_MODE);
 	g_engine->_sound->stopSound(0);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
@@ -74,7 +74,7 @@ void Room43::catch_pg() {
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hide_cur();
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(234, -1);
 	auto_scroll(194, 0);
@@ -85,7 +85,7 @@ void Room43::catch_pg() {
 	g_engine->_sound->stopSound(0);
 	register_cutscene(14);
 	
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index 6d1d03ca7df..4fc570ad904 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -37,7 +37,7 @@ void Room44::look_news() {
 	hide_person();
 	_G(fx_blend) = BLEND1;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
-	_G(room)->load_room(&room_blk, 44, &_G(spieler));
+	_G(room)->load_room(&_G(room_blk), 44, &_G(spieler));
 
 	start_aad_wait(172, -1);
 	_G(spieler).scrollx = tmpsx;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 0b221218c0e..fd57f5091f6 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -34,7 +34,7 @@ void Room45::entry(int16 eib_nr) {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(r45_delay) = 0;
 	_G(zoom_horizont) = 150;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
@@ -45,7 +45,7 @@ void Room45::entry(int16 eib_nr) {
 	}
 
 	_G(spieler_mi)[P_HOWARD].Mode = true;
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		int16 ch_x, ch_y;
 		int16 ho_x, ho_y;
 		if (_G(spieler).R48TaxiEntry) {
@@ -88,7 +88,7 @@ void Room45::xit(int16 eib_nr) {
 	}
 
 	if (eib_nr == 87) {
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_073, CFO_MODE);
 	}
 }
@@ -155,7 +155,7 @@ void Room45::setup_func() {
 
 			y = 130;
 
-			if (_G(HowardMov) && flags.ExitMov) {
+			if (_G(HowardMov) && _G(flags).ExitMov) {
 				x = 56;
 				y = 122;
 			}
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 11551cfd549..5ab9e415cd6 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -88,7 +88,7 @@ void Room46::setup_func() {
 		x = 120;
 	}
 
-	if (_G(HowardMov) && flags.ExitMov) {
+	if (_G(HowardMov) && _G(flags).ExitMov) {
 		x = 160;
 		y = 200;
 	}
@@ -151,9 +151,8 @@ void Room46::bodo() {
 
 void Room46::kloppe() {
 	for (int16 i = 0; i < 4; i++) {
-		_G(mem)->file->select_pool_item(Ci.Handle, FCUT_065);
-
-		_G(flc)->custom_play(&Ci);
+		_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_065);
+		_G(flc)->custom_play(&_G(Ci));
 		
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
@@ -172,8 +171,8 @@ void Room46::kloppe() {
 		}
 	}
 
-	_G(mem)->file->select_pool_item(Ci.Handle, 66);
-	_G(flc)->custom_play(&Ci);
+	_G(mem)->file->select_pool_item(_G(Ci).Handle, 66);
+	_G(flc)->custom_play(&_G(Ci));
 	_G(sndPlayer)->fadeOut(0);
 	_G(out)->cls();
 
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 61367832538..3bde758c17b 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -32,11 +32,11 @@ void Room47::entry() {
 	hide_person();
 	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
 	_G(SetUpScreenFunc) = set_detail;
-	flags.MainInput = false;
+	_G(flags).MainInput = false;
 }
 
 void Room47::xit() {
-	flags.MainInput = true;
+	_G(flags).MainInput = true;
 	show_person();
 	set_person_pos(114, 102, P_CHEWY, P_LEFT);
 	_G(spieler_mi)[P_HOWARD].Mode = true;
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index ccd9657804b..43c83739df5 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -72,8 +72,8 @@ void Room48::calc_pic() {
 }
 
 void Room48::frage() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 		hide_cur();
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(det)->show_static_spr(6);
@@ -81,7 +81,7 @@ void Room48::frage() {
 		_G(det)->hide_static_spr(6);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		show_cur();
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
@@ -89,12 +89,12 @@ void Room48::setup_func() {
 	for (int16 i = 0; i < 5; i++)
 		_G(det)->hide_static_spr(1 + i);
 
-	if (flags.ShowAtsInvTxt) {
+	if (_G(flags).ShowAtsInvTxt) {
 		if (_G(menu_display) == 0) {
 			_G(menu_item) = CUR_USE;
 			cur_2_inventory();
 			cursor_wahl(CUR_ZEIGE);
-			const int16 idx = _G(det)->maus_vector(minfo.x, minfo.y);
+			const int16 idx = _G(det)->maus_vector(_G(minfo).x, _G(minfo).y);
 
 			if (idx != -1) {
 				if (_G(spieler).R48Auswahl[idx]) {
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 0fe16bf1658..87fa22db74c 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -37,7 +37,7 @@ static const AniBlock ABLOCK34[2] = {
 
 void Room49::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
@@ -55,7 +55,7 @@ void Room49::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
 			set_person_pos(527, 76, P_HOWARD, P_LEFT);
@@ -179,7 +179,7 @@ void Room49::use_boy_cigar() {
 	_G(room)->set_zoom(zoom);
 	go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 
 	auto_scroll(164, 0);
 	flic_cut(67, CFO_MODE);
@@ -190,12 +190,12 @@ void Room49::use_boy_cigar() {
 	_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 	_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	set_person_spr(P_RIGHT, P_CHEWY);
 	start_aad_wait(264, -1);
 	_G(room)->set_zoom(zoom);
 
-	_G(obj)->add_inventar(GUM_INV, &room_blk);
+	_G(obj)->add_inventar(GUM_INV, &_G(room_blk));
 	inventory_2_cur(GUM_INV);
 	_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 1476134f5b3..2ef070962a8 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -48,7 +48,7 @@ void Room50::entry(int16 eib_nr) {
 		start_aad_wait(510, -1);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(108, 0);
 		show_cur();
 		switch_room(51);
@@ -72,7 +72,7 @@ void Room50::entry(int16 eib_nr) {
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
 			_G(spieler_mi)[P_HOWARD].Mode = true;
 
-			if (!flags.LoadGame) {
+			if (!_G(flags).LoadGame) {
 				if (eib_nr == 85)
 					set_person_pos(298, 56, P_HOWARD, P_RIGHT);
 				else
@@ -136,25 +136,25 @@ void Room50::go_page() {
 }
 
 void Room50::calc_treppe() {
-	if (!flags.AutoAniPlay) {
-		flags.AutoAniPlay = true;
+	if (!_G(flags).AutoAniPlay) {
+		_G(flags).AutoAniPlay = true;
 
 		if (!_G(spieler).R50KeyOK) {
 			hide_cur();
 			stop_person(P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			auto_scroll(40, 0);
 			stop_page();
 			_G(det)->set_static_ani(5, -1);
 			start_aad_wait(272, -1);
 			auto_move(3, P_CHEWY);
 			aad_page(273, 5);
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 		}
 
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 	}
 }
 
@@ -218,7 +218,7 @@ int16 Room50::use_gum() {
 		_G(det)->del_static_ani(10);
 		go_page();
 
-		_G(obj)->add_inventar(KEY_INV, &room_blk);
+		_G(obj)->add_inventar(KEY_INV, &_G(room_blk));
 		inventory_2_cur(KEY_INV);
 		_G(atds)->set_ats_str(323, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(327, 1, ATS_DATEI);
@@ -268,7 +268,7 @@ void Room50::setup_func() {
 			y = 115;
 		}
 
-		if (_G(HowardMov) && flags.ExitMov) {
+		if (_G(HowardMov) && _G(flags).ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
 			_G(HowardMov) = 0;
 			auto_move(4, P_HOWARD);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index f9b7ae7740f..58532b9e88f 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -48,7 +48,7 @@ int Room51::_index;
 
 void Room51::entry() {
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 
 	if (_G(spieler).flags32_10) {
@@ -69,7 +69,7 @@ void Room51::entry() {
 			_G(timer_nr)[i] = _G(room)->set_timer(i + 9, i * 2 + 6);
 		}
 
-		flags.MainInput = false;
+		_G(flags).MainInput = false;
 		_flag = false;
 
 	} else {
@@ -82,7 +82,7 @@ void Room51::entry() {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 
-			if (!flags.LoadGame) {
+			if (!_G(flags).LoadGame) {
 				set_person_pos(88, 93, P_HOWARD, P_RIGHT);
 			}
 
@@ -104,7 +104,7 @@ void Room51::xit(int16 eib_nr) {
 	_G(atds)->enableEvents(true);
 
 	if (_G(spieler).flags32_10) {
-		flags.MainInput = true;
+		_G(flags).MainInput = true;
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
@@ -134,8 +134,8 @@ bool Room51::timer(int16 t_nr, int16 ani_nr) {
 
 void Room51::setup_func() {
 	if (_G(spieler).flags32_10) {
-		_tmpx = minfo.x;
-		_tmpy = minfo.y;
+		_tmpx = _G(minfo).x;
+		_tmpy = _G(minfo).y;
 		if (_tmpx > 215)
 			_tmpx = 215;
 		if (_tmpy < 81)
@@ -143,7 +143,7 @@ void Room51::setup_func() {
 
 		_G(det)->set_static_pos(17, _tmpx, _tmpy, false, false);
 
-		if ((minfo.button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
+		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
 			start_detail_wait(8, 1, ANI_VOR);
@@ -169,7 +169,7 @@ void Room51::setup_func() {
 			case 10012:
 				start_aad_wait(514, -1);
 				wait_show_screen(5);
-				flags.NoPalAfterFlc = true;
+				_G(flags).NoPalAfterFlc = true;
 				_G(out)->setze_zeiger(nullptr);
 				_G(out)->cls();
 				flic_cut(115, 0);
@@ -195,7 +195,7 @@ void Room51::setup_func() {
 			y = 118;
 		}
 
-		if (_G(HowardMov) && flags.ExitMov) {
+		if (_G(HowardMov) && _G(flags).ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
 			_G(HowardMov) = 0;
 			auto_move(9, P_HOWARD);
@@ -259,14 +259,14 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(out)->setze_zeiger(nullptr);
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
-					flags.NoPalAfterFlc = true;
+					_G(flags).NoPalAfterFlc = true;
 					_G(flc)->set_flic_user_function(cut_serv);
 					_G(det)->show_static_spr(16);
 					flic_cut(FCUT_068, CFO_MODE);
 					_G(flc)->remove_flic_user_function();
 
 					_G(det)->hide_static_spr(16);
-					flags.NoPalAfterFlc = false;
+					_G(flags).NoPalAfterFlc = false;
 					_G(det)->stop_detail(5);
 					_G(obj)->show_sib(SIB_AUSRUEST_R52);
 					_G(obj)->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
@@ -286,7 +286,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			flic_cut(114, 0);
 			set_person_pos(115, 144, P_CHEWY, P_LEFT);
 			_G(fx_blend) = BLEND3;
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 74bae276a01..7e3b1591f5c 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -44,7 +44,7 @@ void Room52::entry() {
 	if (_G(spieler).R52KakerWeg)
 		_G(det)->stop_detail(0);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		_G(det)->show_static_spr(4);
 		_G(spieler).R52TuerAuf = true;
 		set_person_pos(20, 50, P_HOWARD, P_LEFT);
@@ -126,7 +126,7 @@ void Room52::plot_armee(int16 frame) {
 }
 
 void Room52::kaker_platt() {
-	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg && !flags.ExitMov) {
+	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg && !_G(flags).ExitMov) {
 		_G(spieler).R52KakerJoke = true;
 		stop_person(P_CHEWY);
 		hide_cur();
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 025538d17b1..0e29dc28b70 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -86,7 +86,7 @@ int16 Room53::use_man() {
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
 		start_ani_block(7, ABLOCK35);
-		_G(obj)->add_inventar(JMKOST_INV, &room_blk);
+		_G(obj)->add_inventar(JMKOST_INV, &_G(room_blk));
 		inventory_2_cur(JMKOST_INV);
 		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index d76906f3507..2cfdb7958c9 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -33,7 +33,7 @@ void Room54::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 106;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
@@ -43,7 +43,7 @@ void Room54::entry(int16 eib_nr) {
 
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
 
@@ -117,7 +117,7 @@ void Room54::setup_func() {
 				}
 			}
 
-			if (!flags.SaveMenu)
+			if (!_G(flags).SaveMenu)
 				go_auto_xy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
@@ -215,7 +215,7 @@ void Room54::talk_verkauf() {
 		auto_move(4, P_CHEWY);
 
 		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
-		_G(obj)->add_inventar(BURGER_INV, &room_blk);
+		_G(obj)->add_inventar(BURGER_INV, &_G(room_blk));
 		inventory_2_cur(BURGER_INV);
 	} else {
 		start_aad_wait(313, -1);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index e36863164a6..7428700758d 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -32,7 +32,7 @@ void Room55::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).R55ExitDia = 0;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 20;
@@ -71,7 +71,7 @@ void Room55::entry() {
 	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
 		_G(det)->show_static_spr(0);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R55Location) {
 			_G(spieler).scrollx = 136;
 			set_person_pos(404, 66, P_CHEWY, P_RIGHT);
@@ -196,7 +196,7 @@ int16 Room55::use_telefon() {
 
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				auto_move(7, P_CHEWY);
-				flags.NoScroll = true;
+				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_aad_wait(330, -1);
 				_G(det)->show_static_spr(8);
@@ -241,7 +241,7 @@ int16 Room55::use_telefon() {
 				flic_cut(FCUT_072, CFO_MODE);
 				register_cutscene(19);
 				
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 				invent_2_slot(SACKGELD_INV);
 				invent_2_slot(EINLAD_INV);
 				del_invent_slot(LEDER_INV);
@@ -282,7 +282,7 @@ void Room55::get_job() {
 	show_cur();
 	start_ads_wait(15);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	flags.LoadGame = true;
+	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = oldScrollx;
 	_G(spieler).scrolly = oldScrolly;
 
@@ -301,11 +301,11 @@ void Room55::get_job() {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (r_nr == 54)
-		flags.LoadGame = false;
+		_G(flags).LoadGame = false;
 
 	set_person_pos(118, 96, P_CHEWY, P_LEFT);
 	switch_room(r_nr);
-	flags.LoadGame = false;
+	_G(flags).LoadGame = false;
 }
 
 void Room55::mans2rock() {
@@ -431,7 +431,7 @@ void Room55::talk_line() {
 	int16 aad_nr = 0;
 	if (!_G(spieler).R55SekWeg) {
 		auto_move(2, P_CHEWY);
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_scroll(136, 0);
 		aad_nr = 320;
 		_G(spieler).R55ExitDia = 321;
@@ -457,7 +457,7 @@ void Room55::talk_line() {
 		start_detail_wait(22, 1, ANI_VOR);
 	}
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 	_G(spieler_mi)[P_HOWARD].Mode = false;
 	switch_room(54);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index db27e15f3b4..017baf15109 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room56::entry() {
 	_G(spieler).ScrollxStep = 2;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	int esi = 0; //TODO: rename this variable
 	_G(spieler_mi)[P_HOWARD].Mode = true;
@@ -43,7 +43,7 @@ void Room56::entry() {
 	} else
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 25);
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			hide_cur();
 			_G(spieler).R48TaxiEntry = false;
@@ -162,7 +162,7 @@ void Room56::entry() {
 		_G(spieler).r88DestRoom = 82;
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(116, CFO_MODE);
 		register_cutscene(21);
 		_G(out)->setze_zeiger(nullptr);
@@ -296,7 +296,7 @@ int16 Room56::use_kneipe() {
 				go_auto_xy(160, 58, P_HOWARD, ANI_VOR);
 				_G(spieler).PersonHide[P_HOWARD] = true;
 				_G(spieler).R56Kneipe = true;
-				flags.NoScroll = true;
+				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
 				flic_cut(75, CFO_MODE);
@@ -317,7 +317,7 @@ int16 Room56::use_kneipe() {
 				start_aad_wait(308, -1);
 
 				_G(SetUpScreenFunc) = setup_func;
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 				if (_G(obj)->check_inventar(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
 					start_aad_wait(309, -1);
@@ -352,7 +352,7 @@ int16 Room56::use_kneipe() {
 		start_aad_wait(521, -1);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		_G(flc)->set_custom_user_function(proc1);
 		flic_cut(112, CFO_MODE);
 		_G(flc)->remove_custom_user_function();
@@ -442,7 +442,7 @@ void Room56::setup_func() {
 		return;
 	
 	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
-		if (minfo.x + _G(spieler).scrollx >= 157 && minfo.x + _G(spieler).scrollx <= 204 && minfo.y >= 28 && minfo.y <= 89)
+		if (_G(minfo).x + _G(spieler).scrollx >= 157 && _G(minfo).x + _G(spieler).scrollx <= 204 && _G(minfo).y >= 28 && _G(minfo).y <= 89)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else
 			cursor_wahl(CUR_WALK);
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index c08ad8e0466..d0790662bdb 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 
 void Room57::entry() {
 	_G(zoom_horizont) = 180;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 46;
@@ -40,7 +40,7 @@ void Room57::entry() {
 	if (_G(spieler).R57StudioAuf)
 		_G(det)->hide_static_spr(4);
 	
-	if (!flags.LoadGame &&_G(spieler).R48TaxiEntry) {
+	if (!_G(flags).LoadGame &&_G(spieler).R48TaxiEntry) {
 		hide_cur();
 		_G(spieler).R48TaxiEntry = false;
 		_G(spieler).scrollx = 0;
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index c16454a6bbe..067debf93a8 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -39,8 +39,8 @@ void Room58::xit() {
 	_G(spieler_vector)[P_CHEWY].Xypos[1] = _G(spieler).R58TmpY;
 	_G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler).R58TmpX;
 	_G(spieler_mi)[P_CHEWY].XyzStart[1] = _G(spieler).R58TmpY;
-	flags.MainInput = true;
-	flags.LoadGame = true;
+	_G(flags).MainInput = true;
+	_G(flags).LoadGame = true;
 	show_person();
 	set_person_rnr();
 	const int16 tmp = _G(spieler).R58TmpRoom1;
@@ -61,7 +61,7 @@ void Room58::look_cut_mag(int16 r_nr) {
 	_G(spieler_vector)[P_CHEWY].Xypos[1] = 100;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	flags.MainInput = false;
+	_G(flags).MainInput = false;
 	hide_person();
 	switch_room(r_nr);
 }
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 1f70df1fa19..cf142ed4ae8 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -104,22 +104,22 @@ void Room63::setup_func() {
 
 	case 3:
 		if (_G(det)->get_ani_status(3) == false) {
-			if (!flags.AutoAniPlay) {
-				flags.AutoAniPlay = true;
-				flags.NoScroll = true;
+			if (!_G(flags).AutoAniPlay) {
+				_G(flags).AutoAniPlay = true;
+				_G(flags).NoScroll = true;
 
 				_G(spieler).ScrollxStep = 16;
 				_G(spieler).scrollx -= _G(spieler).scrollx % 16;
 				auto_scroll(176, 0);
 				set_person_pos(424, 78, P_CHEWY, P_LEFT);
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 				_G(spieler).ScrollxStep = 4;
 				if (!_G(r63Schalter)) {
 					_G(det)->start_detail(0, 1, ANI_VOR);
 					_G(r63ChewyAni) = 0;
 				} else
 					bork_platt();
-				flags.AutoAniPlay = false;
+				_G(flags).AutoAniPlay = false;
 			}
 		}
 		break;
@@ -145,11 +145,11 @@ void Room63::bork_platt() {
 	_G(det)->show_static_spr(13);
 	start_aad_wait(361, -1);
 	_G(out)->cls();
-	flags.NoPalAfterFlc = true;
+	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_079, CFO_MODE);
 	_G(fx_blend) = BLEND3;
 	show_cur();
-	flags.MainInput = true;
+	_G(flags).MainInput = true;
 	_G(spieler).R62Flucht = true;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
 	switch_room(56);
@@ -223,7 +223,7 @@ int16 Room63::use_schalter() {
 			if (_G(spieler).R62LauraVerwandlung) {
 				_G(r63Schalter) = true;
 				hide_cur();
-				flags.MainInput = false;
+				_G(flags).MainInput = false;
 			} else {
 				hide_cur();
 				auto_move(1, P_CHEWY);
@@ -300,7 +300,7 @@ int16 Room63::use_aschenbecher() {
 			if (_G(spieler).R63FxMannWeg) {
 				auto_move(5, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
-				flags.NoScroll = true;
+				_G(flags).NoScroll = true;
 				auto_scroll(70, 0);
 				auto_move(1, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
@@ -319,7 +319,7 @@ int16 Room63::use_aschenbecher() {
 				_G(spieler).scrollx = 0;
 				set_person_pos(187, 42, P_CHEWY, P_RIGHT);
 				switch_room(64);
-				flags.NoScroll = false;
+				_G(flags).NoScroll = false;
 			} else
 				start_aad_wait(369, -1);
 		} else
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 52c671476e6..d6ca10f1dd2 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -70,7 +70,7 @@ int16 Room64::cut_sev(int16 frame) {
 
 void Room64::chewy_entry() {
 	calc_monitor();
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		hide_cur();
 		_G(det)->show_static_spr(3);
 		auto_move(2, P_CHEWY);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 5fe25a27a1c..1490563bd85 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -53,7 +53,7 @@ void Room65::entry() {
 	} else {
 		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
 	}
-	flags.LoadGame = true;
+	_G(flags).LoadGame = true;
 	show_person();
 	switch_room(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
 }
@@ -64,8 +64,8 @@ void Room65::xit() {
 	set_person_rnr();
 	set_person_pos(_G(r65tmp_ch_x), _G(r65tmp_ch_y), P_CHEWY, -1);
 	set_person_pos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
-	room_blk.AadLoad = true;
-	room_blk.AtsLoad = true;
+	_G(room_blk).AadLoad = true;
+	_G(room_blk).AtsLoad = true;
 	_G(maus_links_click) = false;
 }
 
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 4d88b680ceb..350fc98785c 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -36,7 +36,7 @@ void Room66::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 36;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 50;
 	_G(zoom_horizont) = 130;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	if (!_G(spieler).flags26_4) {
 		_G(det)->show_static_spr(4);
@@ -64,7 +64,7 @@ void Room66::entry(int16 eib_nr) {
 		start_aad_wait(404, -1);
 		start_aad_wait(415, -1);
 		show_cur();
-	} else if (!flags.LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
+	} else if (!_G(flags).LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
 		switch (eib_nr) {
 		case 96:
 			set_person_pos(488, 114, P_HOWARD, P_RIGHT);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 5b7c8b1f1f2..46c4ead3738 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -41,7 +41,7 @@ void Room67::entry() {
 		_G(det)->set_static_ani(1, -1);
 	} else
 		_G(det)->show_static_spr(0);
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		hide_cur();
 		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index fb94e42a813..dd69e2de1de 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -60,7 +60,7 @@ void Room68::entry() {
 	} else
 		_G(det)->hide_static_spr(3);
 	
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		hide_cur();
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
 			set_person_pos(524, 51, P_HOWARD, P_LEFT);
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 4c27865607d..111deb8ec23 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -41,11 +41,11 @@ void Room69::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).DiaAMov = 2;
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	_G(cur_hide_flag) = false;
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index cc9cb898ad6..a695ad72bb9 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -40,11 +40,11 @@ void Room70::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	switch (eib_nr) {
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 5eb5d471e2e..cb9fcfcc895 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -62,7 +62,7 @@ void Room71::entry(int16 eib_nr) {
 		_G(det)->hide_static_spr(3);
 	}
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	switch (eib_nr) {
@@ -153,13 +153,13 @@ void Room71::setup_func() {
 
 int Room71::proc1() {
 	if (_G(spieler).inv_cur) {
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		return 0;
 	}
 
 	hide_cur();
 	auto_move(2, P_CHEWY);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(256, 0);
 	_delay = 0;
 	if (_G(menu_item) == CUR_HOWARD) {
@@ -188,7 +188,7 @@ int Room71::proc1() {
 		start_aad_wait(432, -1);
 
 	show_cur();
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	return 1;
 }
 
@@ -199,7 +199,7 @@ void Room71::proc2() {
 	go_auto_xy(518, 35, P_HOWARD, ANI_GO);
 	go_auto_xy(568, 36, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(284, 0);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
@@ -219,7 +219,7 @@ void Room71::proc2() {
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler).R71LeopardVined = true;
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	_G(menu_item) = CUR_WALK;
 	cursor_wahl(CUR_WALK);
 	start_aad_wait(434, -1);
@@ -289,7 +289,7 @@ void Room71::proc7() {
 	_G(SetUpScreenFunc) = nullptr;
 	set_person_spr(P_LEFT, P_CHEWY);
 	go_auto_xy(323, 28, P_NICHELLE, ANI_WAIT);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(200, 0);
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(det)->start_detail(7, 255, false);
@@ -297,7 +297,7 @@ void Room71::proc7() {
 	_G(det)->stop_detail(7);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(SetUpScreenFunc) = setup_func;
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	start_aad_wait(432, -1);
 
 	show_cur();
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 45c33f235c1..fe2321827f3 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -48,10 +48,10 @@ void Room72::entry(int16 eib_nr) {
 		hide_cur();
 	}
 
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 
-	if (flags.LoadGame || _G(spieler).flags28_10)
+	if (_G(flags).LoadGame || _G(spieler).flags28_10)
 		return;
 
 	switch (eib_nr) {
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 7e9cbe817c2..2bab9cfba9f 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -39,13 +39,13 @@ void Room73::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 	if (_G(spieler).flags28_20)
 		_G(det)->show_static_spr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	switch (eib_nr) {
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index c7df0e898ca..1da9b4447a4 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -40,14 +40,14 @@ void Room74::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 
 	if (_G(spieler).flags29_1)
 		_G(det)->start_detail(0, 255, false);
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	switch (eib_nr) {
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index afe8ff2a457..62973792198 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -39,11 +39,11 @@ void Room75::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	switch (eib_nr) {
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index e2e46755051..1eb39cfe930 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -61,12 +61,12 @@ void Room76::entry() {
 		_G(atds)->set_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	if (!_G(spieler).flags29_2) {
 		hide_cur();
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).flags29_2 = true;
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
@@ -75,12 +75,12 @@ void Room76::entry() {
 
 	} else if (!_G(spieler).r76State) {
 		hide_cur();
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).r76State = -1;
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		proc3(422);
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 	}
 }
 
@@ -137,7 +137,7 @@ void Room76::proc5() {
 	_state = 1;
 	_G(det)->del_static_ani(2);
 	_G(det)->start_detail(6, 1, false);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	wait_show_screen(15);
 	auto_move(5, P_CHEWY);
 	_G(det)->hide_static_spr(10);
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index ff41520f24f..f946ac34be7 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -50,7 +50,7 @@ void Room77::entry() {
 
 	// WORKAROUND: Loading saved game in this room don't properly
 	// reset the flag used for cutscenes when returning to village
-	if (flags.LoadGame) {
+	if (_G(flags).LoadGame) {
 		_G(spieler).r76State = -1;
 
 	} else if (_G(spieler).r76State == 1) {
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 88acb15ccbe..30bcedc2d0d 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -58,7 +58,7 @@ void Room78::entry() {
 			}
 			set_up_screen(DO_SETUP);
 		}
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(101, CFO_MODE);
 		destRoom = 79;
 	} else {
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 5cf43a36d6b..635eff3e98e 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -40,7 +40,7 @@ void Room79::entry() {
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 79;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 79;
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		set_person_pos(459, 114, P_CHEWY, P_LEFT);
 		set_person_pos(568, 65, P_HOWARD, P_LEFT);
 		set_person_pos(534, 75, P_NICHELLE, P_LEFT);
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 209c18af207..e1830d1b2b8 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -54,7 +54,7 @@ void Room80::entry() {
 	set_person_pos(22, -1, P_HOWARD, P_RIGHT);
 	set_person_pos(6, 2, P_NICHELLE, P_RIGHT);
 	_G(spieler).scrollx = 10;
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 	_G(spieler).ZoomXy[P_NICHELLE][0] = 24;
@@ -73,13 +73,13 @@ void Room80::setup_func() {
 	for (int i = 0; i < 3; ++i)
 		_G(det)->hide_static_spr(i);
 
-	if (_G(spieler).flags32_1 || !flags.ShowAtsInvTxt || _G(menu_display))
+	if (_G(spieler).flags32_1 || !_G(flags).ShowAtsInvTxt || _G(menu_display))
 		return;
 
 	_G(menu_item) = CUR_USE;
 	cur_2_inventory();
 	cursor_wahl(CUR_ZEIGE);
-	int vec = _G(det)->maus_vector(_G(spieler).scrollx + minfo.x, minfo.y);
+	int vec = _G(det)->maus_vector(_G(spieler).scrollx + _G(minfo).x, _G(minfo).y);
 	if (vec == -1)
 		return;
 
@@ -135,7 +135,7 @@ void Room80::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 80)
 		_G(spieler).PersonRoomNr[P_NICHELLE] = nextRoom;
 
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	switch_room(nextRoom);
 }
 
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index f09ef7a2afd..ea6e6691ee1 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -34,7 +34,7 @@ void Room81::entry() {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).DiaAMov = 0;
 	if (_G(spieler).r88DestRoom == 84) {
@@ -44,7 +44,7 @@ void Room81::entry() {
 
 	proc3();
 
-	if (flags.LoadGame || !_G(spieler).flags30_1)
+	if (_G(flags).LoadGame || !_G(spieler).flags30_1)
 		return;
 
 	set_person_pos(155, 146, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index bf9346db631..004596228a7 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -47,7 +47,7 @@ void Room82::entry() {
 	if (_G(spieler).flags37_20)
 		_G(det)->show_static_spr(7);
 
-	if (flags.LoadGame) {
+	if (_G(flags).LoadGame) {
 		_G(SetUpScreenFunc) = setup_func;
 		return;
 	}
@@ -167,7 +167,7 @@ void Room82::proc4() {
 	hide_cur();
 	_G(spieler).flags30_8 = true;
 	auto_move(5, P_CHEWY);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(270, 0);
 	_G(room)->set_timer_status(7, TIMER_STOP);
 	_G(det)->del_static_ani(7);
@@ -182,7 +182,7 @@ void Room82::proc4() {
 	_G(det)->del_static_ani(8);
 	_G(det)->set_static_ani(7, -1);
 	_G(room)->set_timer_status(7, TIMER_START);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 
 	show_cur();
 }
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index bf89b237535..092776793bc 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -34,7 +34,7 @@ bool Room84::_flag;
 void Room84::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
@@ -71,7 +71,7 @@ void Room84::entry() {
 		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
 	}
 
-	if (flags.LoadGame) {
+	if (_G(flags).LoadGame) {
 		; // Nothing. It avoids a deeper level of if, and we need the _G(SetUpScreenFunc) at the end
 	} else if (_G(spieler).flags30_1 || _G(spieler).flags31_8) {
 		set_person_pos(569, 135, P_CHEWY, P_LEFT);
@@ -137,7 +137,7 @@ void Room84::setup_func() {
 		_G(spieler).flags30_80 = true;
 		hide_cur();
 		auto_move(4, P_CHEWY);
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		set_person_spr(P_LEFT, P_CHEWY);
 		auto_scroll(150, 0);
 		_G(det)->del_static_ani(3);
@@ -148,7 +148,7 @@ void Room84::setup_func() {
 		start_detail_wait(5, 1, ANI_VOR);
 		_G(det)->set_static_ani(3, -1);
 		start_aad_wait(456, -1);
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		show_cur();
 	}
 
@@ -173,11 +173,11 @@ void Room84::setup_func() {
 
 void Room84::talk1() {
 	auto_move(4, P_CHEWY);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	set_person_spr(P_LEFT, P_CHEWY);
 	auto_scroll(150, 0);
 	start_ads_wait(22);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 }
 
 void Room84::talk2() {
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 153d75059a4..d5029538b4e 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -45,7 +45,7 @@ void Room85::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 38;
 
 	_G(zoom_horizont) = 0;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 1;
 
 	if (_G(spieler).flags32_10) {
@@ -53,7 +53,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(atds)->del_steuer_bit(495, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	if (_G(spieler).flags30_1 || eib_nr == 124) {
@@ -87,7 +87,7 @@ void Room85::entry(int16 eib_nr) {
 		flic_cut(90, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(91, CFO_MODE);
 		_G(det)->hide_static_spr(6);
 		_G(spieler).scrollx = 25;
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 8840bc7e37c..543c1d31818 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -46,7 +46,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(0);
 	}
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	if (eib_nr == 127) {
@@ -63,29 +63,29 @@ void Room86::entry(int16 eib_nr) {
 	} else {
 		_G(spieler_mi)[P_CHEWY].Vorschub = 16;
 		hide_cur();
-		flags.ZoomMov = false;
+		_G(flags).ZoomMov = false;
 		_G(spieler).scrollx = 246;
 		_G(spieler).ScrollxStep = 8;
 		set_person_pos(443, 66, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 84;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 0;
 		auto_move(2, P_CHEWY);
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		_G(spieler.ScrollxStep = 2);
 		auto_scroll(30, 0);
 		start_spz_wait(13, 1, false, P_CHEWY);
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		_G(spieler_mi)[P_CHEWY].Vorschub = 8;
 		_G(det)->stop_detail(0);
 		_G(det)->show_static_spr(4);
 		_G(det)->show_static_spr(5);
 		invent_2_slot(94);
 		auto_move(4, P_CHEWY);
-		flags.NoScroll = true;
+		_G(flags).NoScroll = true;
 		auto_scroll(246, 0);
 		proc3(false);
 		flic_cut(92, CFO_MODE);
-		flags.NoScroll = false;
+		_G(flags).NoScroll = false;
 		auto_move(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
 		switch_room(85);
@@ -177,7 +177,7 @@ void Room86::proc3(bool cond) {
 		deltaY = 2;
 	}
 
-	if (flags.NoScroll)
+	if (_G(flags).NoScroll)
 		auto_scroll(196, 0);
 
 	_G(det)->set_static_pos(0, 352, destY, false, false);
@@ -197,7 +197,7 @@ void Room86::proc3(bool cond) {
 
 	g_engine->_sound->stopSound(1);
 	g_engine->_sound->stopSound(2);
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 718d2e6833c..ea1ab578f1c 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -44,7 +44,7 @@ void Room87::entry() {
 	if (_G(spieler).flags32_8)
 		_G(det)->show_static_spr(4);
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	set_person_pos(11, 70, P_HOWARD, P_RIGHT);
@@ -91,7 +91,7 @@ void Room87::xit(int16 eib_nr) {
 	_G(zoom_horizont) = 0;
 	_G(room)->set_zoom(25);
 	_G(HowardMov) = 1;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 	go_auto_xy(20, 56, P_CHEWY, ANI_WAIT);
 	go_auto_xy(31, 56, P_CHEWY, ANI_WAIT);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 39dc2fd0941..74e5554ceaa 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -100,7 +100,7 @@ int Room88::proc3() {
 			start_aad_wait(480, -1);
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
-			flags.NoPalAfterFlc = true;
+			_G(flags).NoPalAfterFlc = true;
 			flic_cut(87, CFO_MODE);
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
@@ -122,7 +122,7 @@ int Room88::proc3() {
 
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(88, CFO_MODE);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).flags32_1 = true;
@@ -132,7 +132,7 @@ int Room88::proc3() {
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(86, CFO_MODE);
 		register_cutscene(24);
 
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index d58e45545db..802391dd957 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -41,7 +41,7 @@ void Room89::entry() {
 			_G(det)->show_static_spr(6);
 	}
 
-	if (flags.LoadGame) {
+	if (_G(flags).LoadGame) {
 		_G(spieler).SVal2 = 0;
 		return;
 	}
@@ -61,11 +61,11 @@ void Room89::entry() {
 		start_aad_wait(490, -1);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(118, CFO_MODE);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 538;
@@ -80,7 +80,7 @@ void Room89::entry() {
 		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(117, CFO_MODE);
 		register_cutscene(35);
 
@@ -88,19 +88,19 @@ void Room89::entry() {
 		Room66::proc8(-1, 2, 3, 563);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(119, CFO_MODE);
 
 		// Squash screen into a single point at the center
 		int edi = -20;
 		int var24 = 0;
-		_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		_G(out)->sprite_save(_G(Ci).TempArea, 0, 0, 320, 200, 320);
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
 			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
-			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
+			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
@@ -112,7 +112,7 @@ void Room89::entry() {
 		_G(out)->cls();
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
 		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Common::KEYCODE_ESCAPE from F5");
-		_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
+		_G(out)->sprite_save(_G(Ci).TempArea, 0, 0, 320, 200, 320);
 		edi = -300;
 		int var30 = -200;
 
@@ -121,7 +121,7 @@ void Room89::entry() {
 			var30 += 2;
 			_G(out)->setze_zeiger(_G(workptr));
 			_G(out)->cls();
-			_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
+			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
@@ -178,7 +178,7 @@ int Room89::proc2() {
 	start_aad_wait(490, -1);
 	_G(out)->setze_zeiger(nullptr);
 	_G(out)->cls();
-	flags.NoPalAfterFlc = true;
+	_G(flags).NoPalAfterFlc = true;
 	flic_cut(102, CFO_MODE);
 	register_cutscene(26);
 
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index dba23b7ffa6..5bcef34c669 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -38,12 +38,12 @@ void Room90::entry(int16 eib_nr) {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 	_G(zoom_horizont) = 150;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 60;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 90;
 
-	if (!flags.LoadGame) {
+	if (!_G(flags).LoadGame) {
 		switch (eib_nr) {
 		case 78:
 		case 136:
@@ -77,7 +77,7 @@ void Room90::entry(int16 eib_nr) {
 	}
 
 	if (!_G(spieler).flags33_10) {
-		flags.ZoomMov = false;
+		_G(flags).ZoomMov = false;
 		start_aad_wait(498, -1);
 		go_auto_xy(-20, 121, P_HOWARD, ANI_GO);
 		auto_move(1, P_CHEWY);
@@ -181,10 +181,10 @@ void Room90::setup_func() {
 }
 
 void Room90::proc2() {
-	if (_G(spieler).flags33_80 || flags.AutoAniPlay)
+	if (_G(spieler).flags33_80 || _G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	int diaNr = -1;
 
 	switch (_G(spieler).PersonRoomNr[0]) {
@@ -230,7 +230,7 @@ void Room90::proc2() {
 		start_aad_wait(-1, diaNr);
 		show_cur();
 	}
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 int Room90::getHubcaps() {
@@ -286,15 +286,15 @@ int Room90::shootControlUnit() {
 	hide_cur();
 	del_inventar(_G(spieler).AkInvent);
 	_G(HowardMov) = 2;
-	flags.ZoomMov = false;
+	_G(flags).ZoomMov = false;
 	auto_move(5, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(232, 142, P_CHEWY, ANI_WAIT);
-	flags.NoScroll = true;
+	_G(flags).NoScroll = true;
 	auto_scroll(176, 0);
 	start_detail_wait(13, 1, ANI_VOR);
 	_G(flc)->set_custom_user_function(Room90::proc5);
-	flags.NoPalAfterFlc = true;
+	_G(flags).NoPalAfterFlc = true;
 	flic_cut(107, CFO_MODE);
 	_G(flc)->remove_custom_user_function();
 	_G(spieler).scrollx = 0;
@@ -305,13 +305,13 @@ int Room90::shootControlUnit() {
 	set_up_screen(NO_SETUP);
 	_G(fx_blend) = BLEND3;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 	_G(HowardMov) = 0;
 	_G(spieler).flags33_40 = true;
 	_G(det)->stop_detail(12);
 	_G(atds)->set_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->del_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 
 	show_cur();
 	return 1;
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index e78b3924950..0aa7c476e89 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -32,7 +32,7 @@ int16 Room91::_click;
 
 void Room91::entry() {
 	_G(zoom_horizont) = 110;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
@@ -40,7 +40,7 @@ void Room91::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][0] = _G(spieler).ZoomXy[P_HOWARD][1] = 30;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	_G(spieler).scrollx = 320;
@@ -54,8 +54,8 @@ void Room91::entry() {
 			start_aad_wait(503, -1);
 		}
 	} else {
-		flags.MainInput = false;
-		flags.NoScroll = true;
+		_G(flags).MainInput = false;
+		_G(flags).NoScroll = true;
 		_G(spieler).flags34_1 = true;
 		set_person_pos(326, 99, P_CHEWY, P_RIGHT);
 		set_person_pos(312, 75, P_HOWARD, P_RIGHT);
@@ -75,7 +75,7 @@ void Room91::entry() {
 }
 
 void Room91::xit(int16 eib_nr) {
-	flags.MainInput = true;
+	_G(flags).MainInput = true;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
 
@@ -83,7 +83,7 @@ void Room91::xit(int16 eib_nr) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 
 	_G(spieler).flags34_4 = false;
-	flags.NoScroll = false;
+	_G(flags).NoScroll = false;
 }
 
 void Room91::setup_func() {
@@ -112,7 +112,7 @@ void Room91::setup_func() {
 		const int oldClick = _click;
 		_G(maus_links_click) = oldClick;
 		_click = 1;
-		const int aniNr = 1 + (minfo.y <= 100 ? 1 : 0);
+		const int aniNr = 1 + (_G(minfo).y <= 100 ? 1 : 0);
 		hide_cur();
 		_G(det)->stop_detail(0);
 		start_detail_wait(aniNr, 1, ANI_VOR);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index a9c8617e1e9..1e7ce035786 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -39,7 +39,7 @@ void Room92::entry() {
 	case 487:
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
@@ -48,20 +48,20 @@ void Room92::entry() {
 		switch_room(_G(spieler).SVal1);
 		break;
 	case 488:
-		flags.StaticUseTxt = true;
+		_G(flags).StaticUseTxt = true;
 		flic_cut(106, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(105, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(104, CFO_MODE);
 		register_cutscene(27);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
@@ -71,7 +71,7 @@ void Room92::entry() {
 		switch_room(46);
 		break;
 	case 538:
-		flags.StaticUseTxt = true;
+		_G(flags).StaticUseTxt = true;
 		flic_cut(106, CFO_MODE);
 		show_person();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index b06c70a111d..7f3d149597f 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room93::entry() {
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	_G(spieler).scrollx = 0;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 25e94eefd83..de3236aa888 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -32,7 +32,7 @@ namespace Rooms {
 void Room94::entry() {
 	_G(spieler).flags33_80 = true;
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
 	_G(spieler).ScrollxStep = 2;
 	_G(SetUpScreenFunc) = setup_func;
@@ -44,7 +44,7 @@ void Room94::entry() {
 		_G(det)->del_static_ani(3);
 	}
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	if (_G(spieler).flags35_8) {
@@ -71,7 +71,7 @@ void Room94::entry() {
 		_G(spieler).scrollx = 150;
 		if (_G(spieler).flags37_40) {
 			_G(spieler).flags37_40 = true;
-			flags.NoScroll = true;
+			_G(flags).NoScroll = true;
 			_G(out)->setze_zeiger(nullptr);
 			_G(out)->cls();
 			flic_cut(121, CFO_MODE);
@@ -81,7 +81,7 @@ void Room94::entry() {
 			_G(SetUpScreenFunc) = nullptr;
 			Room66::proc8(2, 3, 0, 551);
 			_G(SetUpScreenFunc) = setup_func;
-			flags.NoScroll = false;
+			_G(flags).NoScroll = false;
 		}
 	} else {
 		hide_cur();
@@ -106,7 +106,7 @@ void Room94::setup_func() {
 	else
 		destX = 255;
 
-	if (flags.ExitMov) {
+	if (_G(flags).ExitMov) {
 		destX = 255;
 		destY = 86;
 	}
@@ -135,7 +135,7 @@ int Room94::giveGhostBottle() {
 	del_inventar(_G(spieler).AkInvent);
 	_G(out)->setze_zeiger(nullptr);
 	_G(out)->cls();
-	flags.NoPalAfterFlc = true;
+	_G(flags).NoPalAfterFlc = true;
 	flic_cut(62, CFO_MODE);
 	_G(fx_blend) = BLEND3;
 	_G(det)->start_detail(5, 255, false);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index da80775f747..5f2cb596e1b 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -41,7 +41,7 @@ void Room95::entry(int16 eib_nr) {
 	if (_G(spieler).flags35_20)
 		_G(det)->show_static_spr(10);
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	hide_cur();
@@ -109,7 +109,7 @@ int Room95::proc2() {
 	if (_G(spieler).flags35_20) {
 		_G(out)->setze_zeiger(nullptr);
 		_G(out)->cls();
-		flags.NoPalAfterFlc = true;
+		_G(flags).NoPalAfterFlc = true;
 		flic_cut(133, CFO_MODE);
 		register_cutscene(33);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 2234b757d06..960879b6002 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room96::entry() {
 	_G(zoom_horizont) = 140;
-	flags.ZoomMov = true;
+	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 30;
@@ -39,7 +39,7 @@ void Room96::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	hide_cur();
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 4df87be5b6f..fb34c8a7bd2 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -101,7 +101,7 @@ void Room97::entry() {
 	_word18DB36 = 110;
 	_word18DB38 = 132;
 
-	if (flags.LoadGame)
+	if (_G(flags).LoadGame)
 		return;
 
 	if (_G(spieler).flags37_8) {
@@ -199,7 +199,7 @@ void Room97::setup_func() {
 	}
 
 	if (_G(spieler).flags37_1 && _G(menu_item) == CUR_WALK) {
-		if (_G(spieler).scrollx + minfo.x >= 487 && _G(spieler).scrollx + minfo.x <= 522 && minfo.y >= 23 && minfo.y <= 59)
+		if (_G(spieler).scrollx + _G(minfo).x >= 487 && _G(spieler).scrollx + _G(minfo).x <= 522 && _G(minfo).y >= 23 && _G(minfo).y <= 59)
 			cursor_wahl(CUR_AUSGANG_OBEN);
 		else
 			cursor_wahl(CUR_WALK);
@@ -257,10 +257,10 @@ void Room97::setup_func() {
 }
 
 void Room97::proc2() {
-	if (flags.AutoAniPlay)
+	if (_G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	stop_person(P_CHEWY);
 	hide_cur();
 	_G(Sdi)[6].z_ebene = 6;
@@ -276,14 +276,14 @@ void Room97::proc2() {
 	_G(Sdi)[6].z_ebene = 166;
 	_G(Sdi)[24].z_ebene = 157;
 	show_cur();
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 void Room97::proc3() {
-	if (flags.AutoAniPlay)
+	if (_G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	hide_cur();
 	stop_person(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -325,15 +325,15 @@ void Room97::proc3() {
 		_G(spieler).flags36_80 = true;
 	}
 	show_cur();
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 void Room97::proc4() {
-	if (flags.AutoAniPlay)
+	if (_G(flags).AutoAniPlay)
 		return;
 
 	if (!_G(spieler).flags35_80) {
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		hide_cur();
 		_G(spieler_mi)[P_CHEWY].Mode = true;
 		stop_person(P_CHEWY);
@@ -374,7 +374,7 @@ void Room97::proc4() {
 		show_cur();
 	}
 		
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 int Room97::proc5() {
@@ -616,10 +616,10 @@ void Room97::proc12() {
 		return;
 	}
 
-	if (flags.AutoAniPlay)
+	if (_G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	hide_cur();
 	stop_person(P_CHEWY);
 	_G(det)->show_static_spr(26);
@@ -632,14 +632,14 @@ void Room97::proc12() {
 	_G(det)->hide_static_spr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 void Room97::proc13() {
-	if (!_G(spieler).flags37_1 || flags.AutoAniPlay)
+	if (!_G(spieler).flags37_1 || _G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	hide_cur();
 	stop_person(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -653,7 +653,7 @@ void Room97::proc13() {
 	_G(det)->hide_static_spr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	show_cur();
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 int Room97::throwSlime() {
@@ -670,10 +670,10 @@ int Room97::throwSlime() {
 }
 
 void Room97::sensorAnim() {
-	if (_G(spieler).flags37_4 || flags.AutoAniPlay)
+	if (_G(spieler).flags37_4 || _G(flags).AutoAniPlay)
 		return;
 
-	flags.AutoAniPlay = true;
+	_G(flags).AutoAniPlay = true;
 	stop_person(P_CHEWY);
 	_G(menu_item) = CUR_USE;
 	cursor_wahl(CUR_USE);
@@ -684,7 +684,7 @@ void Room97::sensorAnim() {
 	
 	while (_G(det)->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
-		if (minfo.button == 1 || _G(in)->get_switch_code() == 28) {
+		if (_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) {
 			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
@@ -721,9 +721,9 @@ void Room97::sensorAnim() {
 		_bool18DB32 = true;
 		auto_move(11, P_CHEWY);
 		_bool18DB32 = false;
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		proc13();
-		flags.AutoAniPlay = true;
+		_G(flags).AutoAniPlay = true;
 		auto_move(7, P_CHEWY);
 
 		while (_G(spieler).scrollx < 368) {
@@ -740,7 +740,7 @@ void Room97::sensorAnim() {
 
 	_G(atds)->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
 	show_cur();
-	flags.AutoAniPlay = false;
+	_G(flags).AutoAniPlay = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 8617e6a23d3..585d9e4da0e 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -225,12 +225,12 @@ void sprite_engine() {
 		case ZOBJ_AUTO_OBJ:
 			spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
 			         _G(auto_mov_vector)[nr].PhNr;
-			Cxy = room_blk.DetKorrekt + (spr_nr << 1);
+			Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 			calc_zoom(_G(auto_mov_vector)[nr].Xypos[1],
 			          _G(mov_phasen)[nr].ZoomFak,
 			          _G(mov_phasen)[nr].ZoomFak,
 			          &_G(auto_mov_vector)[nr]);
-			_G(out)->scale_set(room_blk.DetImage[spr_nr],
+			_G(out)->scale_set(_G(room_blk).DetImage[spr_nr],
 			                _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
 			                _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
 			                _G(auto_mov_vector)[nr].Xzoom,
@@ -309,8 +309,8 @@ int16 mouse_on_prog_ani() {
 	ani_nr = -1;
 	for (i = 0; i < MAX_PROG_ANI && ani_nr == -1; i++) {
 
-		if (minfo.x >= _G(spr_info)[i].X && minfo.x <= _G(spr_info)[i].X1 &&
-		        minfo.y >= _G(spr_info)[i].Y && minfo.y <= _G(spr_info)[i].Y1) {
+		if (_G(minfo).x >= _G(spr_info)[i].X && _G(minfo).x <= _G(spr_info)[i].X1 &&
+		        _G(minfo).y >= _G(spr_info)[i].Y && _G(minfo).y <= _G(spr_info)[i].Y1) {
 			ani_nr = i;
 		}
 	}
@@ -340,11 +340,11 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	}
 	_G(ssi)[tmp_nr].X = _G(spieler_vector)[p_nr].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[p_nr].HotX;
 	_G(ssi)[tmp_nr].Y = _G(spieler_vector)[p_nr].Xypos[1] - _G(spieler).scrolly;
-	if (!flags.ExitMov) {
+	if (!_G(flags).ExitMov) {
 		if (p_nr == P_CHEWY) {
 			u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[p_nr].HotX, y + _G(spieler_mi)[p_nr].HotY,
-			                        _G(room)->_gedXAnz[room_blk.AkAblage],
-			                        _G(ged_mem)[room_blk.AkAblage]);
+			                        _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+			                        _G(ged_mem)[_G(room_blk).AkAblage]);
 			check_shad(u_index, 1);
 		}
 	}
@@ -450,7 +450,7 @@ void wait_show_screen(int16 frames) {
 	if (_G(spieler).DelaySpeed > 0)
 		frames *= _G(spieler).DelaySpeed;
 	while (--frames > 0 && !SHOULD_QUIT) {
-		if (flags.AniUserAction)
+		if (_G(flags).AniUserAction)
 			get_user_key(NO_SETUP);
 		set_up_screen(DO_SETUP);
 	}
@@ -482,9 +482,9 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 		set_up_screen(DO_SETUP);
 	}
 	_G(maus_links_click) = _G(tmp_maus_links);
-	if (minfo.button)
-		flags.main_maus_flag = 1;
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	if (_G(minfo).button)
+		_G(flags).main_maus_flag = 1;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	stop_spz();
 }
 
@@ -501,8 +501,8 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 
-	if (!flags.AtsText) {
-		flags.AtsText = true;
+	if (!_G(flags).AtsText) {
+		_G(flags).AtsText = true;
 		if (txt_nr != -1) {
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_START);
@@ -526,11 +526,11 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_END);
 		}
-		flags.AtsText = false;
+		_G(flags).AtsText = false;
 	}
-	if (minfo.button)
-		flags.main_maus_flag = 1;
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	if (_G(minfo).button)
+		_G(flags).main_maus_flag = 1;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	_G(maus_links_click) = _G(tmp_maus_links);
 	return ret;
 }
@@ -548,9 +548,9 @@ void aad_wait(int16 str_nr) {
 		}
 	}
 	_G(maus_links_click) = _G(tmp_maus_links);
-	if (minfo.button)
-		flags.main_maus_flag = 1;
-	kbinfo.scan_code = Common::KEYCODE_INVALID;
+	if (_G(minfo).button)
+		_G(flags).main_maus_flag = 1;
+	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
 void start_aad(int16 dia_nr, int16 ssi_nr) {
@@ -568,11 +568,11 @@ void start_aad(int16 dia_nr, int16 ssi_nr) {
 }
 
 void start_ads_wait(int16 dia_nr) {
-	if (!flags.AdsDialog) {
+	if (!_G(flags).AdsDialog) {
 		_G(menu_item) = CUR_TALK;
 		cursor_wahl(_G(menu_item));
 		load_ads_dia(dia_nr);
-		while (flags.AdsDialog && !SHOULD_QUIT) {
+		while (_G(flags).AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 	}
@@ -683,8 +683,8 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 	if (_G(mov_phasen)[nr].Start == 1) {
 		spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
 		         _G(auto_mov_vector)[nr].PhNr;
-		xy = (int16 *)room_blk.DetImage[spr_nr];
-		Cxy = room_blk.DetKorrekt + (spr_nr << 1);
+		xy = (int16 *)_G(room_blk).DetImage[spr_nr];
+		Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 
 		if (!xoff) {
 			xoff = xy ? xy[0] : 0;
@@ -694,10 +694,10 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 			yoff = xy ? xy[1] : 0;
 			yoff += _G(auto_mov_vector)[nr].Yzoom;
 		}
-		if (minfo.x >= _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx &&
-		        minfo.x <= _G(auto_mov_vector)[nr].Xypos[0] + xoff + Cxy[0] - _G(spieler).scrollx &&
-		        minfo.y >= _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly &&
-		        minfo.y <= _G(auto_mov_vector)[nr].Xypos[1] + yoff + Cxy[1] - _G(spieler).scrolly)
+		if (_G(minfo).x >= _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx &&
+		        _G(minfo).x <= _G(auto_mov_vector)[nr].Xypos[0] + xoff + Cxy[0] - _G(spieler).scrollx &&
+		        _G(minfo).y >= _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly &&
+		        _G(minfo).y <= _G(auto_mov_vector)[nr].Xypos[1] + yoff + Cxy[1] - _G(spieler).scrolly)
 			ret = true;
 	}
 	return ret;
@@ -790,18 +790,18 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 			if (!mi->Mode) {
 				if (!(u_index = _G(ged)->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 				                              om->Xypos[1] + mi->HotY + tmpy,
-				                              _G(room)->_gedXAnz[room_blk.AkAblage],
-				                              _G(ged_mem)[room_blk.AkAblage]))) {
+				                              _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+				                              _G(ged_mem)[_G(room_blk).AkAblage]))) {
 
 					if (!(u_index = _G(ged)->ged_idx(om->Xypos[0] + mi->HotX + tmpx,
 					                              om->Xypos[1] + mi->HotY,
-					                              _G(room)->_gedXAnz[room_blk.AkAblage],
-					                              _G(ged_mem)[room_blk.AkAblage]))) {
+					                              _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+					                              _G(ged_mem)[_G(room_blk).AkAblage]))) {
 
 						if (!(u_index = _G(ged)->ged_idx(om->Xypos[0] + mi->HotX,
 						                              om->Xypos[1] + mi->HotY + tmpy,
-						                              _G(room)->_gedXAnz[room_blk.AkAblage],
-						                              _G(ged_mem)[room_blk.AkAblage]))) {
+						                              _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+						                              _G(ged_mem)[_G(room_blk).AkAblage]))) {
 							om->Count = 0;
 						} else {
 							if (!tmpy) {
@@ -815,7 +815,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 
 							if (abs(om->Xypos[1] - mi->XyzEnd[1]) <= abs(tmpy)) {
 								om->Count = 0;
-								if (!flags.NoEndPosMovObj) {
+								if (!_G(flags).NoEndPosMovObj) {
 									mi->XyzStart[0] = mi->XyzEnd[0];
 									mi->XyzStart[1] = mi->XyzEnd[1];
 									om->Xypos[0] = mi->XyzEnd[0];
@@ -832,7 +832,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 									swap_if_l(&om->Xyvo[1], &om->Xyvo[0]);
 								}
 								get_phase(om, mi);
-								if (om->Count == 0 && !flags.NoEndPosMovObj) {
+								if (om->Count == 0 && !_G(flags).NoEndPosMovObj) {
 									mi->XyzStart[0] = mi->XyzEnd[0];
 									mi->XyzStart[1] = mi->XyzEnd[1];
 									om->Xypos[0] = mi->XyzEnd[0];
@@ -852,7 +852,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 
 						if (abs(om->Xypos[0] - mi->XyzEnd[0]) <= abs(tmpx)) {
 							om->Count = 0;
-							if (!flags.NoEndPosMovObj) {
+							if (!_G(flags).NoEndPosMovObj) {
 								mi->XyzStart[0] = mi->XyzEnd[0];
 								mi->XyzStart[1] = mi->XyzEnd[1];
 								om->Xypos[0] = mi->XyzEnd[0];
@@ -870,7 +870,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 
 							}
 							get_lr_phase(om, mi->Id);
-							if (om->Count == 0 && !flags.NoEndPosMovObj) {
+							if (om->Count == 0 && !_G(flags).NoEndPosMovObj) {
 								mi->XyzStart[0] = mi->XyzEnd[0];
 								mi->XyzStart[1] = mi->XyzEnd[1];
 								om->Xypos[0] = mi->XyzEnd[0];
@@ -890,7 +890,7 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 						mi->XyzStart[1] = om->Xypos[1];
 						_G(mov)->get_mov_vector(mi->XyzStart, mi->Vorschub, om);
 					}
-					if (om->Count == 0 && !flags.NoEndPosMovObj) {
+					if (om->Count == 0 && !_G(flags).NoEndPosMovObj) {
 						mi->XyzStart[0] = mi->XyzEnd[0];
 						mi->XyzStart[1] = mi->XyzEnd[1];
 						om->Xypos[0] = mi->XyzEnd[0];
@@ -905,8 +905,8 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 				if (mi->Id == CHEWY_OBJ) {
 					u_index = _G(ged)->ged_idx(om->Xypos[0] + mi->HotX,
 					                        om->Xypos[1] + mi->HotY,
-					                        _G(room)->_gedXAnz[room_blk.AkAblage],
-					                        _G(ged_mem)[room_blk.AkAblage]);
+					                        _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+					                        _G(ged_mem)[_G(room_blk).AkAblage]);
 					check_shad(u_index, 1);
 				}
 			}
@@ -1043,7 +1043,7 @@ void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
 	int16 tmp_vorschub;
 	tmp_vorschub = mi->Vorschub;
 	mi->Vorschub = CH_X_PIX;
-	if (flags.ZoomMov) {
+	if (_G(flags).ZoomMov) {
 		if (om->Xzoom < 0 && _G(zoom_mov_fak) > 0) {
 			tmp = om->Xzoom / _G(zoom_mov_fak);
 			tmp = abs(tmp);
@@ -1071,8 +1071,8 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 	int16 spr_anz;
 
 	bool ret = false;
-	if (!flags.SpzAni) {
-		flags.SpzAni = true;
+	if (!_G(flags).SpzAni) {
+		_G(flags).SpzAni = true;
 		_G(spz_ani)[p_nr] = true;
 		_G(spz_p_nr) = p_nr;
 		spr_start = SPZ_ANI_PH[ani_id][0];
@@ -1104,7 +1104,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
 		_G(spieler_vector)[p_nr].DelayCount = 0;
 		_G(spz_count) = count;
-		flags.MausLinks = true;
+		_G(flags).MausLinks = true;
 		ret = true;
 	}
 	return ret;
@@ -1126,9 +1126,9 @@ void calc_person_spz_ani(ObjMov *om) {
 }
 
 void stop_spz() {
-	if (flags.SpzAni) {
-		flags.SpzAni = false;
-		flags.MausLinks = false;
+	if (_G(flags).SpzAni) {
+		_G(flags).SpzAni = false;
+		_G(flags).MausLinks = false;
 		_G(spz_ani)[_G(spz_p_nr)] = false;
 		_G(spieler_vector)[_G(spz_p_nr)].Count = 0;
 		_G(spieler_vector)[_G(spz_p_nr)].PhNr = 0;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index d949e13117a..53f5189b368 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -31,14 +31,14 @@ namespace Chewy {
 int16 load_ads_dia(int16 dia_nr) {
 	int16 ret = false;
 
-	if (flags.AdsDialog == false) {
+	if (_G(flags).AdsDialog == false) {
 		bool tmp = _G(atds)->ads_start(dia_nr);
 		if (tmp == true) {
 			_G(atds)->load_atds(dia_nr, ADH_DATEI);
 			ret = true;
 			_G(ads_blk_nr) = 0;
 			_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr), &_G(ads_item_anz));
-			flags.AdsDialog = true;
+			_G(flags).AdsDialog = true;
 			_G(ads_push) = true;
 			_G(ads_tmp_dsp) = _G(spieler).DispFlag;
 			_G(spieler).DispFlag = false;
@@ -68,8 +68,8 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 	int16 action_ret;
 	if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 		action_ret = true;
-		if (flags.AtsAction == false) {
-			flags.AtsAction = true;
+		if (_G(flags).AtsAction == false) {
+			_G(flags).AtsAction = true;
 			if (mode == ATS_ACTION_NACH) {
 				switch (txt_mode) {
 				case TXT_MARK_LOOK:
@@ -1122,7 +1122,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				}
 			}
 
-			flags.AtsAction = false;
+			_G(flags).AtsAction = false;
 		}
 	} else {
 		action_ret = false;
@@ -1132,8 +1132,8 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 }
 
 void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
-	if (flags.AdsAction == false) {
-		flags.AdsAction = true;
+	if (_G(flags).AdsAction == false) {
+		_G(flags).AdsAction = true;
 
 		switch (dia_nr) {
 		case 2:
@@ -1221,14 +1221,14 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 			break;
 		}
 
-		flags.AdsAction = false;
+		_G(flags).AdsAction = false;
 	}
 }
 
 void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 	switch (dia_nr) {
 	case 0:
-		flags.AutoAniPlay = false;
+		_G(flags).AutoAniPlay = false;
 		break;
 
 	case 5:
@@ -2178,9 +2178,9 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 
-		_G(room)->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, GBOOK);
+		_G(room)->load_tgp(BUCH_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 		_G(out)->setze_zeiger(_G(workptr));
-		_G(out)->map_spr2screen(_G(ablage)[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->back2screen(_G(workpage));
 
 		while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
@@ -2192,7 +2192,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			SHOULD_QUIT_RETURN;
 		}
 
-		_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &room_blk, EPISODE1_TGP, GED_LOAD, EPISODE1);
+		_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 		_G(spieler).scrollx = scrollx;
 		_G(spieler).scrolly = scrolly;
@@ -2205,13 +2205,13 @@ void calc_inv_use_txt(int16 test_nr) {
 		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = ANGEL2_INV;
-		_G(obj)->change_inventar(test_nr, ANGEL2_INV, &room_blk);
+		_G(obj)->change_inventar(test_nr, ANGEL2_INV, &_G(room_blk));
 		break;
 
 	case KUERBIS1_INV:
 		ret = del_invent_slot(KUERBIS1_INV);
 		_G(spieler).InventSlot[ret] = K_MASKE_INV;
-		_G(obj)->change_inventar(KUERBIS1_INV, K_MASKE_INV, &room_blk);
+		_G(obj)->change_inventar(KUERBIS1_INV, K_MASKE_INV, &_G(room_blk));
 		invent_2_slot(K_FLEISCH_INV);
 		invent_2_slot(K_KERNE_INV);
 		break;
@@ -2237,7 +2237,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).R42BriefMarke = true;
 		ret = del_invent_slot(BRIEF_INV);
 		_G(spieler).InventSlot[ret] = BRIEF2_INV;
-		_G(obj)->change_inventar(BRIEF_INV, BRIEF2_INV, &room_blk);
+		_G(obj)->change_inventar(BRIEF_INV, BRIEF2_INV, &_G(room_blk));
 		break;
 
 	case FLASCHE_INV:
@@ -2259,15 +2259,15 @@ void calc_inv_use_txt(int16 test_nr) {
 		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = B_MARY2_INV;
-		_G(obj)->change_inventar(test_nr, B_MARY2_INV, &room_blk);
+		_G(obj)->change_inventar(test_nr, B_MARY2_INV, &_G(room_blk));
 		break;
 
 	case 13:
 		_G(spieler).flags26_10 = true;
-		flags.InventMenu = false;
+		_G(flags).InventMenu = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
-		flags.InventMenu = true;
+		_G(flags).InventMenu = true;
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATEI);
 		break;
 
@@ -2285,7 +2285,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = 110;
-		_G(obj)->change_inventar(104, 110, &room_blk);
+		_G(obj)->change_inventar(104, 110, &_G(room_blk));
 		break;
 
 	case 105:
@@ -2368,7 +2368,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	if (inv_mode != -1) {
 		txt_nr = _G(atds)->calc_inv_no_use(_G(spieler).AkInvent, test_nr, inv_mode);
 		if (txt_nr != -1) {
-			if (!flags.InventMenu) {
+			if (!_G(flags).InventMenu) {
 				if (txt_nr >= 15000) {
 					ret = start_ats_wait(txt_nr - 15000, TXT_MARK_USE, 14, INV_USE_DEF);
 				} else {
@@ -2384,7 +2384,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 			if (!ok) {
 				r_val = g_engine->getRandomNumber(5);
 
-				if (flags.InventMenu) {
+				if (_G(flags).InventMenu) {
 					calc_inv_get_text(_G(spieler).AkInvent, test_nr);
 					Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, RAND_NO_USE[r_val] + 15000);
 				} else {
@@ -2779,8 +2779,8 @@ void calc_person_dia(int16 p_nr) {
 
 			show_cur();
 		} else {
-			room_blk.AadLoad = false;
-			room_blk.AtsLoad = false;
+			_G(room_blk).AadLoad = false;
+			_G(room_blk).AtsLoad = false;
 			_G(spieler).PersonDiaTmpRoom[p_nr] = _G(spieler).PersonRoomNr[P_CHEWY];
 			save_person_rnr();
 


Commit: 9c15eefa8099127c23d190202d1da1ec53c9f491
    https://github.com/scummvm/scummvm/commit/9c15eefa8099127c23d190202d1da1ec53c9f491
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:31-08:00

Commit Message:
CHEWY: Further Globals cleanup, renamed file to globals.cpp

Changed paths:
  A engines/chewy/globals.cpp
  A engines/chewy/globals.h
  R engines/chewy/global.cpp
  R engines/chewy/global.h
    engines/chewy/atds.cpp
    engines/chewy/chewy.cpp
    engines/chewy/cursor.cpp
    engines/chewy/data.cpp
    engines/chewy/debugger.cpp
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/events.cpp
    engines/chewy/file.cpp
    engines/chewy/flic.cpp
    engines/chewy/gedclass.cpp
    engines/chewy/inits.cpp
    engines/chewy/io_game.cpp
    engines/chewy/m_event.cpp
    engines/chewy/main.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga_graphics.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/module.mk
    engines/chewy/movclass.cpp
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room19.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room26.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room59.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room83.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sound.cpp
    engines/chewy/sound_player.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/timer.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 97eaa2001a5..8ab8ecd2255 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -25,7 +25,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 8ff5ddbe89b..8e63344ee92 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -27,7 +27,7 @@
 #include "chewy/chewy.h"
 #include "chewy/debugger.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index b628365368d..44f4ced7097 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/cursor.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index f8e79581424..0d952de2e7b 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -25,7 +25,7 @@
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 5e513f4d08c..54d48e097a6 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -21,7 +21,7 @@
 
 #include "common/file.h"
 #include "chewy/debugger.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ngshext.h"
 #include "chewy/chewy.h"
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index fcb7bbd5408..e3bfeaa04d4 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/detail.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/sound.h"
 #include "chewy/resource.h"
 
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index a5f3c5b0823..72e2f24ade1 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -22,7 +22,7 @@
 #include "chewy/dialogs/cinema.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 namespace Dialogs {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 00122399e6a..6745dec00eb 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -22,7 +22,7 @@
 #include "chewy/dialogs/credits.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 namespace Dialogs {
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 2582cd83852..7d9a1bd336b 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -24,7 +24,7 @@
 #include "chewy/dialogs/options.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 namespace Dialogs {
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 8068b3de7cc..49d55bfe323 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -24,7 +24,7 @@
 #include "chewy/rooms/room58.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/menus.h"
 
 namespace Chewy {
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 050452432f6..8bf41aa1c23 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -26,7 +26,7 @@
 #include "chewy/dialogs/credits.h"
 #include "chewy/dialogs/files.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/main.h"
 #include "chewy/ngshext.h"
 
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index b02ae1deb26..915cf8806e0 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -22,7 +22,7 @@
 #include "chewy/dialogs/options.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 namespace Dialogs {
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 1a6abbacad1..2f6be7a8ac9 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/ngshext.h"
 #include "chewy/effect.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 3ddd73ce016..2bcb851b304 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -21,7 +21,7 @@
 
 #include "common/system.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/timer.h"
 
 namespace Chewy {
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index a5a7e53c6eb..c2a7d38441b 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -22,7 +22,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/resource.h"
 
 namespace Chewy {
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index ddaf00e0b86..54472addb39 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -25,7 +25,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/flic.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index fdd1f147a47..784af53d4a5 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -21,7 +21,7 @@
 
 #include "common/file.h"
 #include "chewy/chewy.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/gedclass.h"
 #include "chewy/ngshext.h"
 
diff --git a/engines/chewy/global.cpp b/engines/chewy/globals.cpp
similarity index 56%
rename from engines/chewy/global.cpp
rename to engines/chewy/globals.cpp
index 0fe75d9a065..365fc6a8f48 100644
--- a/engines/chewy/global.cpp
+++ b/engines/chewy/globals.cpp
@@ -19,47 +19,19 @@
  *
  */
 
-#include "chewy/global.h"
-#include "chewy/chewy.h"
-#include "chewy/types.h"
-#include "chewy/defines.h"
-#include "chewy/file.h"
-#include "chewy/ngshext.h"
-#include "chewy/text.h"
-#include "chewy/room.h"
-#include "chewy/object.h"
-#include "chewy/timer.h"
-#include "chewy/detail.h"
-#include "chewy/effect.h"
-#include "chewy/atds.h"
-#include "chewy/movclass.h"
-#include "chewy/gedclass.h"
-#include "chewy/bitclass.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
 #define MAX_RAND_NO_USE 6
 
-const uint8 RAND_NO_USE[MAX_RAND_NO_USE] = {0, 1, 3, 4, 5, 6};
+const uint8 RAND_NO_USE[MAX_RAND_NO_USE] = { 0, 1, 3, 4, 5, 6 };
 
 
 Globals *g_globals = nullptr;
 
 Globals::Globals() {
 	g_globals = this;
-
-	static const int16 R45_PINFO[R45_MAX_PERSON][4] = {
-		{ 0, 4, 1490, 1500 },
-		{ 0, 1, 180, 190 },
-		{ 0, 1, 40, 60 },
-		{ 0, 1, 40, 150 },
-		{ 0, 1, 40, 230 },
-		{ 0, 1, 40, 340 },
-		{ 0, 1, 49, 50 },
-		{ 0, 1, 5, 90 },
-		{ 0, 1, 7, 190 }
-	};
-	Common::copy(&R45_PINFO[0][0], &R45_PINFO[0][0] + R45_MAX_PERSON * 4, &_r45_pinfo[0][0]);
 }
 
 Globals::~Globals() {
diff --git a/engines/chewy/global.h b/engines/chewy/globals.h
similarity index 94%
rename from engines/chewy/global.h
rename to engines/chewy/globals.h
index 335e653508e..bc7fc340392 100644
--- a/engines/chewy/global.h
+++ b/engines/chewy/globals.h
@@ -105,7 +105,6 @@ public:
 	bool _stopAutoMove[3] = { false };
 	bool _e_streifen = false;
 	int16 _r45_delay = 0;
-	int16 _r45_pinfo[R45_MAX_PERSON][4];
 	int16 _r56koch_flug = 0;
 	int16 _r62Delay = 0;
 	int16 _r62TalkAni = 0;
@@ -166,19 +165,6 @@ public:
 	int16 _person_tmp_hide[MAX_PERSON] = { 0 };
 	int16 _person_tmp_room[MAX_PERSON] = { 0 };
 
-	SplitStringInit _ssi[AAD_MAX_PERSON] = {
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8},
-	};
-
 	int16 _talk_start_ani = -1;
 	int16 _talk_hide_static = -1;
 	int16 _frequenz = 0;
@@ -250,6 +236,30 @@ public:
 	CustomInfo _Ci;
 	GotoPkt _gpkt;
 
+	SplitStringInit _ssi[AAD_MAX_PERSON] = {
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+		{ 0, 100, 0, 200, 4, SPLIT_MITTE, 8, 8 },
+	};
+	int16 _r45_pinfo[R45_MAX_PERSON][4] = {
+	   { 0, 4, 1490, 1500 },
+	   { 0, 1, 180, 190 },
+	   { 0, 1, 40, 60 },
+	   { 0, 1, 40, 150 },
+	   { 0, 1, 40, 230 },
+	   { 0, 1, 40, 340 },
+	   { 0, 1, 49, 50 },
+	   { 0, 1, 5, 90 },
+	   { 0, 1, 7, 190 }
+	};
+
 	// main.cpp
 	int16 _menu_flag = 0;
 	bool _inv_disp_ok = 0;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 3ea76414ea0..52ba778d400 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -24,7 +24,7 @@
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index c09259c1748..ae1ca577f22 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -22,7 +22,7 @@
 #include "common/system.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/file.h"
 #include "chewy/io_game.h"
 
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 6f646b55669..4695d8df474 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 34da815e2ee..c748c4208f9 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -25,7 +25,7 @@
 #include "graphics/surface.h"
 #include "common/rect.h"
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 0771525ad81..6fae2906acc 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -22,7 +22,7 @@
 #include "common/system.h"
 #include "graphics/palette.h"
 #include "chewy/chewy.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/mcga.h"
 #include "chewy/mcga_graphics.h"
 
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 1a44010a5c2..5f1999413a9 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -22,7 +22,7 @@
 #include "common/memstream.h"
 #include "chewy/chewy.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/mcga_graphics.h"
 #include "chewy/mcga.h"
 
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 0e789c48998..686eb932cc1 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -21,7 +21,7 @@
 
 #include "common/memstream.h"
 #include "chewy/memory.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/types.h"
 #include "chewy/resource.h"
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 53fef237cbf..4474496661a 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/menus.h"
 #include "chewy/dialogs/inventory.h"
 #include "chewy/rooms/room44.h"
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 06dded6aee8..e8a6963e0d6 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -13,7 +13,7 @@ MODULE_OBJS = \
 	file.o \
 	flic.o \
 	gedclass.o \
-	global.o \
+	globals.o \
 	inits.o \
 	io_game.o \
 	m_event.o \
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index f64e009bf75..4db4abaf9af 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -22,7 +22,7 @@
 #include "chewy/ngshext.h"
 #include "chewy/movclass.h"
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index def33f7c57a..fa52dfd43c0 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ngshext.h"
 #include "chewy/object.h"
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 46e46945105..e20864bceb8 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -22,7 +22,7 @@
 #include "common/system.h"
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/rooms.h"
 #include "chewy/resource.h"
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index aa63f72293a..9b75f7f269e 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/resource.h"
 #include "chewy/room.h"
 #include "chewy/ngshext.h"
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 3d3889138ac..7c0c2356b05 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room00.h"
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index a1ffa95220b..b4046c4ea8f 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room01.h"
 
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index c88e2dbf36a..0ef47330420 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room02.h"
 
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 152c1a5ade6..ac509ab8f1a 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room02.h"
 #include "chewy/rooms/room03.h"
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 627f08bc3bc..2c2cf7b5749 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room04.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 19b55d7abb8..073f82016f2 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room05.h"
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 136555933e2..1710ffacdfd 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room06.h"
 
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 5ece58a96ac..f2491a4ef32 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room07.h"
 
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index d5663bf1983..39731e9ce82 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room08.h"
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 1df8011518c..02b203244a8 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room09.h"
 
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 427d22a1c7b..d5bf9a7a9e1 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room10.h"
 
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 20212ef0804..aeec5f23334 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room11.h"
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 8f6489f6837..72753a4605e 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room12.h"
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index e89ea4fa95a..be90ea773f7 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room13.h"
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index ea32b83c56f..00490f3b8dc 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room14.h"
 #include "chewy/rooms/room23.h"
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index 414254b5a15..ab91ab7c243 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room16.h"
 #include "chewy/rooms/room23.h"
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 91d4d244e26..1ace373531f 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room17.h"
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index e830f86512d..b93e44c7a02 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room18.h"
 
diff --git a/engines/chewy/rooms/room19.cpp b/engines/chewy/rooms/room19.cpp
index 2818f09e195..f208c4eabf5 100644
--- a/engines/chewy/rooms/room19.cpp
+++ b/engines/chewy/rooms/room19.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room19.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index b71fb04185a..b762ef0f510 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room21.h"
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index e1ded0fab72..48a3f7efbde 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room22.h"
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 9bcd1340e82..56bacfadc32 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room23.h"
 
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 506e154c46a..59a86c59498 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room24.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 13870d95720..31e9ed3b9f0 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room23.h"
 #include "chewy/rooms/room25.h"
diff --git a/engines/chewy/rooms/room26.cpp b/engines/chewy/rooms/room26.cpp
index d55442d3509..a8213526429 100644
--- a/engines/chewy/rooms/room26.cpp
+++ b/engines/chewy/rooms/room26.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room26.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index fd61b0b1579..c805c2ea7d7 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room27.h"
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index eb8c3a7e753..aa0fb92306f 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/room28.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 581addd3b94..d523958b39f 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room29.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 1b039f8e61b..6380b03c221 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room31.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 5250816d139..41ded8dc3e8 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room32.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 032461e4b42..d659f773970 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room33.h"
 
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index ecd6d2f445e..4e0d1ba4458 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room34.h"
 
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index a45ba87ca43..b7745daf067 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room35.h"
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 414f14e32a9..5bf3f4609bc 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room37.h"
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index c693c89c064..063223b429f 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room39.h"
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index c04aa8da05c..5984aa2ee23 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room40.h"
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 6170e04af62..21137b928e4 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room41.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index d24a43eef35..1ea3482be03 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room42.h"
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 65a26d2a714..f56539e9444 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room43.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index 4fc570ad904..cfc9e74063b 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room44.h"
 
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index fd57f5091f6..dbeedc7e3e3 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room45.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 5ab9e415cd6..b69ea989bfc 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room46.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 3bde758c17b..99f688b5eb2 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room47.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 43c83739df5..ff30b151046 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room48.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 87fa22db74c..936166b59ba 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room49.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 2ef070962a8..264e9668dd1 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room50.h"
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 58532b9e88f..0228753c106 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room51.h"
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 7e3b1591f5c..d1a67f7fada 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room52.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 0e29dc28b70..2130e63bea0 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room53.h"
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 2cfdb7958c9..8c75d4c4db3 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room54.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 7428700758d..9b6bb682216 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room55.h"
 
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 017baf15109..19ae1dcada2 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room56.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index d0790662bdb..13c90aa3914 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room57.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index 067debf93a8..a62bbf49b82 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room58.h"
 
diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
index 5163af8171d..a1466bc5c32 100644
--- a/engines/chewy/rooms/room59.cpp
+++ b/engines/chewy/rooms/room59.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room59.h"
 
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index ed7fb582c6d..2a7c3ecf3c1 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room62.h"
 
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index cf142ed4ae8..9d3ebe64aaa 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room63.h"
 
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index d6ca10f1dd2..30e99b33340 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room64.h"
 
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 1490563bd85..b9801065cfd 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room65.h"
 
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 350fc98785c..c93e8f80906 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room66.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 46c4ead3738..66fb51470ab 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room67.h"
 
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index dd69e2de1de..6ae85701c7a 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room68.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 111deb8ec23..9f52bc950f6 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room69.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index a695ad72bb9..0cfdc37e1d4 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room70.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index cb9fcfcc895..61f1e8836bf 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room71.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index fe2321827f3..0f025ef4396 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room72.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 2bab9cfba9f..18af711b22f 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room73.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 1da9b4447a4..b30c116d660 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room74.h"
 #include "chewy/rooms/room75.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 62973792198..adbbb12bdad 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room75.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 1eb39cfe930..4969ed15344 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room76.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index f946ac34be7..2636d5a3898 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room77.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 30bcedc2d0d..20408f94afa 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room78.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 635eff3e98e..f5d82039f6b 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room79.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index e1830d1b2b8..5806dcd68e1 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room80.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index ea6e6691ee1..2549736883d 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room81.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 004596228a7..a315bc614cc 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 
 #include "chewy/rooms/room82.h"
diff --git a/engines/chewy/rooms/room83.cpp b/engines/chewy/rooms/room83.cpp
index 1f7904d4c31..51fb27ef194 100644
--- a/engines/chewy/rooms/room83.cpp
+++ b/engines/chewy/rooms/room83.cpp
@@ -19,7 +19,7 @@
  *
  */
 
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/rooms/room83.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 092776793bc..e4e1a9847d7 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room84.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index d5029538b4e..ec242608df1 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room85.h"
 #include "chewy/rooms/room87.h"
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 543c1d31818..1c2645942ec 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room86.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index ea1ab578f1c..f9d73892125 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room87.h"
 
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 74e5554ceaa..fb3912942cf 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room88.h"
 
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 802391dd957..a742b82e4d4 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/dialogs/credits.h"
 #include "chewy/rooms/room89.h"
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 5bcef34c669..d4fd781b793 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room90.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 0aa7c476e89..4e5a6884d65 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room91.h"
 
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 1e7ce035786..9cb33b14386 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room92.h"
 
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index 7f3d149597f..92d71b414e3 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room93.h"
 
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index de3236aa888..d78b078226c 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room94.h"
 #include "chewy/rooms/room66.h"
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 5f2cb596e1b..f0fad33c909 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room95.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index 960879b6002..f5793dd3c54 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room96.h"
 
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index fb34c8a7bd2..f01f22f39dd 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -21,7 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room97.h"
 #include "chewy/sound.h"
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index e0d76cfcc9d..7f9bdf0ffde 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -27,7 +27,7 @@
 #include "chewy/resource.h"
 #include "chewy/sound.h"
 #include "chewy/types.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
diff --git a/engines/chewy/sound_player.cpp b/engines/chewy/sound_player.cpp
index 0e100cdf553..3e29d8ebc2a 100644
--- a/engines/chewy/sound_player.cpp
+++ b/engines/chewy/sound_player.cpp
@@ -24,7 +24,7 @@
 #include "chewy/chewy.h"
 #include "chewy/sound_player.h"
 #include "chewy/file.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/ngshext.h"
 #include "chewy/sound.h"
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 585d9e4da0e..ec0cc98d099 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 53f5189b368..91a4565684c 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -22,7 +22,7 @@
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
 #include "chewy/events.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/dialogs/inventory.h"
 #include "chewy/rooms/rooms.h"
 
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 2a2e0a84e97..fd2c6285acf 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -23,7 +23,7 @@
 #include "common/textconsole.h"
 #include "chewy/chewy.h"
 #include "chewy/defines.h"
-#include "chewy/global.h"
+#include "chewy/globals.h"
 #include "chewy/timer.h"
 
 namespace Chewy {


Commit: d349d46776eb09547ee8ee07449bdb2199356256
    https://github.com/scummvm/scummvm/commit/d349d46776eb09547ee8ee07449bdb2199356256
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: Capitalize classes in ngstypes.h

Changed paths:
    engines/chewy/atds.h
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/data.cpp
    engines/chewy/data.h
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/dialogs/options.h
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/flic.cpp
    engines/chewy/globals.h
    engines/chewy/io_game.cpp
    engines/chewy/io_game.h
    engines/chewy/m_event.cpp
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/room.h
    engines/chewy/sound_player.cpp
    engines/chewy/sound_player.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 3a876e5ab5c..fa28eed5450 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -337,7 +337,7 @@ private:
 	int16 _invBlockNr;
 	char *_invUseMem = nullptr;
 	int16 _tmpDelay;
-	in_zeiger *_inzeig = nullptr;
+	KbdMouseInfo *_inzeig = nullptr;
 	bool _hasSpeech = false;
 	int16 _mousePush = 0;
 	int _printDelayCount1 = 0;
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 44f4ced7097..db1bcea3e60 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -25,7 +25,7 @@
 
 namespace Chewy {
 
-Cursor::Cursor(McgaGraphics *iout, InputMgr *iin, cur_blk *curblkp) {
+Cursor::Cursor(McgaGraphics *iout, InputMgr *iin, CurBlk *curblkp) {
 	_out = iout;
 	_in = iin;
 	_scrWidth = _G(scr_w);
@@ -109,7 +109,7 @@ void Cursor::hide_cur() {
 	}
 }
 
-void Cursor::set_cur_ani(cur_ani *ani1) {
+void Cursor::set_cur_ani(CurAni *ani1) {
 	_ani = ani1;
 	_cur_aufruf = 0;
 	_ani_count = _ani->ani_anf;
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 5bcfb8a9528..cf83c7f5530 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -30,22 +30,22 @@ namespace Chewy {
 class Cursor {
 public:
 	Cursor();
-	Cursor(McgaGraphics *out, InputMgr *in, cur_blk *curblk);
+	Cursor(McgaGraphics *out, InputMgr *in, CurBlk *curblk);
 	~Cursor();
 
 	void plot_cur();
 	void show_cur();
 	void hide_cur();
-	void set_cur_ani(cur_ani *ani);
+	void set_cur_ani(CurAni *ani);
 	void move(int16 x, int16 y);
 	void wait_taste_los(bool maus_plot);
 
 	McgaGraphics *_out = nullptr;
 	InputMgr *_in = nullptr;
-	maus_info *_minfo = nullptr;
-	in_zeiger *_inzeig = nullptr;
-	cur_blk *_curblk = nullptr;
-	cur_ani *_ani = nullptr;
+	MouseInfo *_minfo = nullptr;
+	KbdMouseInfo *_inzeig = nullptr;
+	CurBlk *_curblk = nullptr;
+	CurAni *_ani = nullptr;
 	int _scrWidth = 0;
 	int16 _cur_x_old = 0;
 	int16 _cur_y_old = 0;
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 0d952de2e7b..71edd14b934 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -91,10 +91,10 @@ void Data::load_tff(const char *fname, byte *speicher) {
 
 		Common::File f;
 		if (f.open(_filename)) {
-			tff_header *tff = (tff_header *)speicher;
+			TffHeader *tff = (TffHeader *)speicher;
 			if (tff->load(&f)) {
 				uint32 size = tff->size;
-				if (f.read(speicher + sizeof(tff_header), size) != size) {
+				if (f.read(speicher + sizeof(TffHeader), size) != size) {
 					error("load_tff error");
 				}
 			}
@@ -124,7 +124,7 @@ void Data::void_load(const char *fname, byte *speicher, uint32 size) {
 	}
 }
 
-uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
+uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead ch;
 	uint32 size = 0;
@@ -135,13 +135,13 @@ uint32 Data::load_tmf(Stream *handle, tmf_header *song) {
 			error("load_tmf error");
 		} else {
 			if (ch.type == TMFDATEI) {
-				assert(ch.size > (uint32)tmf_header::SIZE());
+				assert(ch.size > (uint32)TmfHeader::SIZE());
 
 				if (!song->load(rs)) {
 					error("load_tmf error");
 				} else {
-					size = ch.size + sizeof(tmf_header);
-					byte *speicher = (byte *)song + sizeof(tmf_header);
+					size = ch.size + sizeof(TmfHeader);
+					byte *speicher = (byte *)song + sizeof(TmfHeader);
 					speicher += ((uint32)song->pattern_anz) * 1024l;
 					for (int16 i = 0; i < 31; ++i) {
 						if (song->instrument[i].laenge) {
@@ -178,11 +178,11 @@ uint32 Data::size(const char *fname, int16 typ) {
 	if (f.open(_filename)) {
 		switch (typ) {
 		case TFFDATEI: {
-			tff_header tff;
+			TffHeader tff;
 			if (tff.load(&f)) {
 				int16 id = get_id(tff.id);
 				if (id == TFFDATEI) {
-					size = tff.size + sizeof(tff_header);
+					size = tff.size + sizeof(TffHeader);
 				} else {
 					error("size error");
 				}
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 3ec015b8959..831ea63f717 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -38,7 +38,7 @@ public:
 
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
-	uint32 load_tmf(Stream *stream, tmf_header *song);
+	uint32 load_tmf(Stream *stream, TmfHeader *song);
 
 	void load_tff(const char *fname, byte *speicher);
 	void void_load(const char *fname, byte *speicher, uint32 size);
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index e3bfeaa04d4..2dc46c9d05c 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -167,7 +167,7 @@ Detail::~Detail() {
 
 void Detail::load_rdi(const char *fname_, int16 room_nr) {
 	Common::File f;
-	taf_info *tmprdi = _rdi.dptr;
+	TafInfo *tmprdi = _rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
 		if (_rdi_datei_header.load(&f)) {
@@ -231,7 +231,7 @@ void Detail::del_dptr() {
 	}
 }
 
-void Detail::load_taf_tbl(taf_info *fti) {
+void Detail::load_taf_tbl(TafInfo *fti) {
 	if (!fti) {
 		fti = _rdi.dptr;
 	}
@@ -247,16 +247,16 @@ void Detail::load_taf_tbl(taf_info *fti) {
 	}
 }
 
-taf_info *Detail::init_taf_tbl(const char *fname_) {
-	taf_info *Tt = 0;
+TafInfo *Detail::init_taf_tbl(const char *fname_) {
+	TafInfo *Tt = 0;
 	SpriteResource *res = new SpriteResource(_tafName);
 	int16 anz = res->getChunkCount();
-	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(taf_info));
+	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(TafInfo));
 
-	Tt = (taf_info *)tmp;
+	Tt = (TafInfo *)tmp;
 	Tt->anzahl = anz;
 	Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
-	Tt->image = (byte **)(tmp + sizeof(taf_info));
+	Tt->image = (byte **)(tmp + sizeof(TafInfo));
 	memcpy(Tt->korrektur, (byte *)res->getSpriteCorrectionsTable(), Tt->anzahl * 2 * sizeof(int16));
 	Tt->palette = 0;
 
@@ -265,7 +265,7 @@ taf_info *Detail::init_taf_tbl(const char *fname_) {
 	return Tt;
 }
 
-void Detail::del_taf_tbl(taf_info *Tt) {
+void Detail::del_taf_tbl(TafInfo *Tt) {
 	if (!Tt) {
 		Tt = _rdi.dptr;
 	}
@@ -276,7 +276,7 @@ void Detail::del_taf_tbl(taf_info *Tt) {
 	free((char *) Tt);
 }
 
-void Detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
+void Detail::del_taf_tbl(int16 start, int16 anz, TafInfo *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
 	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
@@ -285,7 +285,7 @@ void Detail::del_taf_tbl(int16 start, int16 anz, taf_info *Tt) {
 	}
 }
 
-void Detail::load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt) {
+void Detail::load_taf_seq(int16 spr_nr, int16 spr_anz, TafInfo *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
 
@@ -371,12 +371,12 @@ int16 *Detail::get_korrektur_tbl() {
 	return ret;
 }
 
-void Detail::init_taf(taf_info *dptr) {
+void Detail::init_taf(TafInfo *dptr) {
 	_rdi.dptr = dptr;
 }
 
-taf_info *Detail::get_taf_info() {
-	taf_info *ret;
+TafInfo *Detail::get_taf_info() {
+	TafInfo *ret;
 	ret = _rdi.dptr;
 	return ret;
 }
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 9aa1c3e7635..ecec287fa9a 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -133,7 +133,7 @@ struct StaticDetailInfo {
 struct RoomDetailInfo {
 	int16 StaticDetailAnz = 0;
 	int16 AniDetailAnz = 0;
-	taf_info *dptr = nullptr;
+	TafInfo *dptr = nullptr;
 	AniDetailInfo Ainfo[MAXDETAILS];
 	StaticDetailInfo Sinfo[MAXDETAILS];
 	int16 mvect[MAX_M_ITEMS * 4] = { 0 };
@@ -207,8 +207,8 @@ public:
 	byte *get_image(int16 spr_nr);
 	AniDetailInfo *get_ani_detail(int16 ani_nr);
 	int16 *get_korrektur_tbl();
-	void init_taf(taf_info *dptr);
-	taf_info *get_taf_info();
+	void init_taf(TafInfo *dptr);
+	TafInfo *get_taf_info();
 	RoomDetailInfo *get_room_detail_info();
 
 	void set_static_ani(int16 ani_nr, int16 static_nr);
@@ -230,14 +230,14 @@ public:
 
 	void set_global_delay(int16 delay);
 
-	taf_info *init_taf_tbl(const char *fname);
+	TafInfo *init_taf_tbl(const char *fname);
 
-	void del_taf_tbl(taf_info *Tt);
+	void del_taf_tbl(TafInfo *Tt);
 
-	void del_taf_tbl(int16 start, int16 anz, taf_info *Tt);
+	void del_taf_tbl(int16 start, int16 anz, TafInfo *Tt);
 
-	void load_taf_seq(int16 spr_nr, int16 spr_anz, taf_info *Tt);
-	void load_taf_tbl(taf_info *fti);
+	void load_taf_seq(int16 spr_nr, int16 spr_anz, TafInfo *Tt);
+	void load_taf_tbl(TafInfo *fti);
 
 	void del_dptr();
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 7d9a1bd336b..853215f4ca7 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -66,7 +66,7 @@ int16 Files::execute(bool isInGame) {
 		return 0;
 	}
 
-	taf_info *ti = _G(mem)->taf_adr(OPTION_TAF);
+	TafInfo *ti = _G(mem)->taf_adr(OPTION_TAF);
 	EVENTS_CLEAR;
 
 	_G(room)->open_handle(GBOOK, "rb", 0);
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 8bf41aa1c23..febc013c930 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -40,9 +40,9 @@ void MainMenu::execute() {
 	// Convenience during testing to not keep showing title sequence
 	if (!ConfMan.getBool("skip_title")) {
 		_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - 17);
-		_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)_G(Ci).MusicSlot);
+		_G(mem)->file->load_tmf(_G(music_handle), (TmfHeader *)_G(Ci).MusicSlot);
 		if (!_G(modul))
-			_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
+			_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
 
 		flic_cut(200, 0);
 		_G(sndPlayer)->stopMod();
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 915cf8806e0..3eb316006de 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -55,7 +55,7 @@ static const int16 OPTION_ICONS[9 * 4] = {
 	 50,   92,   72,  136
 };
 
-void Options::execute(taf_info *ti) {
+void Options::execute(TafInfo *ti) {
 	long akt_clock = 0, stop_clock = 0;
 	_G(room)->load_tgp(0, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
diff --git a/engines/chewy/dialogs/options.h b/engines/chewy/dialogs/options.h
index 764ef798135..e45c3b476df 100644
--- a/engines/chewy/dialogs/options.h
+++ b/engines/chewy/dialogs/options.h
@@ -29,7 +29,7 @@ namespace Dialogs {
 
 class Options {
 public:
-	static void execute(taf_info *ti);
+	static void execute(TafInfo *ti);
 };
 
 } // namespace Dialogs
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 2bcb851b304..d002dbd7b27 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -147,8 +147,8 @@ void EventsManager::clearEvents() {
 	_G(minfo).button = 0;
 }
 
-kb_info *EventsManager::setKbdInfo(kb_info *kbInfo) {
-	kb_info *kb = _kbInfo;
+KbdInfo *EventsManager::setKbdInfo(KbdInfo *kbInfo) {
+	KbdInfo *kb = _kbInfo;
 	_kbInfo = kbInfo;
 	return kb;
 }
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 08ee9f8968e..be5b3f3e955 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -26,7 +26,7 @@
 
 namespace Chewy {
 
-struct kb_info;
+struct KbdInfo;
 
 class EventsManager : public EventsBase {
 private:
@@ -38,7 +38,7 @@ private:
 protected:
 	void handleEvent(const Common::Event &event) override;
 public:
-	kb_info *_kbInfo = nullptr;
+	KbdInfo *_kbInfo = nullptr;
 	Common::Point _mousePos;
 	bool _flag1 = false;
 	bool _flag2 = false;
@@ -50,7 +50,7 @@ public:
 
 	void clearEvents();
 
-	kb_info *setKbdInfo(kb_info *kbInfo);
+	KbdInfo *setKbdInfo(KbdInfo *kbInfo);
 
 	/**
 	 * Set the mouse position
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 54472addb39..8532f342f7a 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -439,7 +439,7 @@ int16 Flic::custom_play(CustomInfo *ci) {
 
 void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
-	tmf_header *th = (tmf_header *)_music;
+	TmfHeader *th = (TmfHeader *)_music;
 
 	for (uint16 i = 0; (i < _customFrame.chunks) && (!_G(modul)); i++) {
 		ChunkHead chead;
@@ -464,7 +464,7 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 				error("flic error");
 			} else {
 				byte *tmp = _music;
-				tmp += sizeof(tmf_header);
+				tmp += sizeof(TmfHeader);
 				tmp += ((uint32)th->pattern_anz) * 1024l;
 				for (uint16 j = 0; j < 31; j++) {
 					if (th->instrument[j].laenge) {
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index bc7fc340392..d2626d33afd 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -177,7 +177,7 @@ public:
 	AutoMov _auto_mov[MAX_AUTO_MOV];
 	int16 _HowardMov = 0;
 
-	taf_seq_info *_spz_tinfo = nullptr;
+	TafSeqInfo *_spz_tinfo = nullptr;
 	int16 _SpzDelay = 0;
 	int16 _spz_spr_nr[MAX_SPZ_PHASEN] = { 0 };
 	int16 _spz_start = 0;
@@ -190,16 +190,16 @@ public:
 
 	int16 _AkChewyTaf = 0;
 	int16 _PersonAni[MAX_PERSON] = { 0 };
-	taf_seq_info *_PersonTaf[MAX_PERSON] = { nullptr };
+	TafSeqInfo *_PersonTaf[MAX_PERSON] = { nullptr };
 	uint8 _PersonSpr[MAX_PERSON][8] = { 0 };
 
 	RoomDetailInfo *_Rdi = nullptr;
 	StaticDetailInfo *_Sdi = nullptr;
 	AniDetailInfo *_Adi = nullptr;
-	taf_info *_curtaf = nullptr;
-	taf_info *_menutaf = nullptr;
-	taf_seq_info *_howard_taf = nullptr;
-	taf_info *_chewy = nullptr;
+	TafInfo *_curtaf = nullptr;
+	TafInfo *_menutaf = nullptr;
+	TafSeqInfo *_howard_taf = nullptr;
+	TafInfo *_chewy = nullptr;
 	int16 *_chewy_kor = nullptr;
 	BitClass *_bit = nullptr;
 	GedClass *_ged = nullptr;
@@ -225,11 +225,11 @@ public:
 	int16 _ani_stand_count[MAX_PERSON] = { 0 };
 	bool _ani_stand_flag[MAX_PERSON] = { false };
 
-	maus_info _minfo;
-	kb_info _kbinfo;
-	cur_blk _curblk;
-	cur_ani _curani;
-	iog_init _ioptr;
+	MouseInfo _minfo;
+	KbdInfo _kbinfo;
+	CurBlk _curblk;
+	CurAni _curani;
+	IogInit _ioptr;
 	RaumBlk _room_blk;
 	Flags _flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 					0, 0, 0, 0, 0, 0, 0, 0, 0 };
diff --git a/engines/chewy/io_game.cpp b/engines/chewy/io_game.cpp
index ae1ca577f22..547c32555c8 100644
--- a/engines/chewy/io_game.cpp
+++ b/engines/chewy/io_game.cpp
@@ -34,7 +34,7 @@ IOGame::IOGame(McgaGraphics *out, InputMgr *in, Cursor *cur) {
 	_cur = cur;
 }
 
-char *IOGame::io_init(iog_init *iostruc) {
+char *IOGame::io_init(IogInit *iostruc) {
 	_io = iostruc;
 	for (int16 i = 0; i < 20; i++)
 		_fileFind[i][0] = 0;
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 1b282ecbc43..711f679b2f4 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -39,7 +39,7 @@ namespace Chewy {
 class IOGame {
 private:
 	Cursor *_cur;
-	iog_init *_io;
+	IogInit *_io;
 	InputMgr *_in;
 	McgaGraphics *_out;
 	char _fileFind[20][USER_NAME + 4];
@@ -50,7 +50,7 @@ private:
 public:
 	IOGame(McgaGraphics *out, InputMgr *in, Cursor *cur);
 
-	char *io_init(iog_init *iostruc);
+	char *io_init(IogInit *iostruc);
 	void load(int16 nr, char *fname);
 	void save_entry(int16 nr, char *fname);
 };
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 4695d8df474..9325f045f45 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -192,13 +192,13 @@ void load_room_music(int16 room_nr) {
 				while (_G(sndPlayer)->musicPlaying());
 				memset(_G(Ci).MusicSlot, 0, MUSIC_SLOT_SIZE);
 				_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - ttp_index);
-				_G(mem)->file->load_tmf(_G(music_handle), (tmf_header *)_G(Ci).MusicSlot);
+				_G(mem)->file->load_tmf(_G(music_handle), (TmfHeader *)_G(Ci).MusicSlot);
 				_G(currentSong) = ttp_index;
 				if (!_G(modul)) {
 					if (play_mode == NORMAL_PLAY)
-						_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
+						_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
 					else {
-						_G(sndPlayer)->playMod((tmf_header *)_G(Ci).MusicSlot);
+						_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
 						_G(sndPlayer)->stopMod();
 						if (play_mode == SEQUENCE_PLAY)
 							_G(sndPlayer)->playSequence(seq_start, seq_end);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 5f1999413a9..95536d999db 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -374,9 +374,9 @@ void McgaGraphics::map_spr2screen(byte *sptr, int16 x, int16 y) {
 }
 
 void McgaGraphics::set_fontadr(byte *adr) {
-	tff_header *tff = (tff_header *)adr;
+	TffHeader *tff = (TffHeader *)adr;
 
-	setfont(adr + sizeof(tff_header), tff->width, tff->height,
+	setfont(adr + sizeof(TffHeader), tff->width, tff->height,
 	        tff->first, tff->last);
 	_G(fvorx) = tff->width;
 	_G(fvory) = 0;
@@ -404,8 +404,8 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 	va_list parptr;
 	va_start(parptr, string);
 
-	kb_info kbInfo;
-	kb_info *kb_old = g_events->setKbdInfo(&kbInfo);
+	KbdInfo kbInfo;
+	KbdInfo *kb_old = g_events->setKbdInfo(&kbInfo);
 
 	if ((x == -1) || (y == -1)) {
 		x = _G(gcurx);
@@ -1344,7 +1344,7 @@ void McgaGraphics::move(int16 x, int16 y) {
 	_G(gcury) = y;
 }
 
-void McgaGraphics::init_mausmode(maus_info *mInfo) {
+void McgaGraphics::init_mausmode(MouseInfo *mInfo) {
 	_mausMode = true;
 	_mInfo = mInfo;
 }
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 46e21cbf1e1..28868b5693f 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -35,7 +35,7 @@ public:
 
 	void init();
 	void set_writemode(char wm);
-	void init_mausmode(maus_info *mInfo);
+	void init_mausmode(MouseInfo *mInfo);
 	void exit_mausmode();
 
 	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
@@ -113,7 +113,7 @@ private:
 	int16 _fontBr = 0, _fontH = 0;
 	uint8 _svga = 0;
 	uint8 _einfuegen = 0;
-	maus_info *_mInfo = nullptr;
+	MouseInfo *_mInfo = nullptr;
 
 	void ltoa(long N, char *str, int base);
 	void ultoa(uint32 N, char *str, int base);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 686eb932cc1..955d60deb01 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -35,21 +35,21 @@ Memory::~Memory() {
 	delete (file);
 }
 
-taf_info *Memory::taf_adr(const char *filename) {
+TafInfo *Memory::taf_adr(const char *filename) {
 	SpriteResource *res = new SpriteResource(filename);
 	int32 imageCount = res->getChunkCount();
-	uint32 size = res->getAllSize() + imageCount * 8 + sizeof(taf_info);
+	uint32 size = res->getAllSize() + imageCount * 8 + sizeof(TafInfo);
 	uint32 kgroesse = imageCount * sizeof(byte *);
 	byte *imgPtr, *tmp1;
-	taf_info *tinfo = nullptr;
+	TafInfo *tinfo = nullptr;
 
 	tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
-	tinfo = (taf_info *)tmp1;
-	tinfo->image = (byte **)(tmp1 + sizeof(taf_info));
+	tinfo = (TafInfo *)tmp1;
+	tinfo->image = (byte **)(tmp1 + sizeof(TafInfo));
 	tinfo->palette = tmp1 + size;
 	tinfo->anzahl = imageCount;
 	memcpy(tinfo->palette, res->getSpritePalette(), PALETTE_SIZE);
-	imgPtr = tmp1 + sizeof(taf_info) + kgroesse;
+	imgPtr = tmp1 + sizeof(TafInfo) + kgroesse;
 
 	for (int i = 0; i < imageCount; i++) {
 		tinfo->image[i] = imgPtr;
@@ -64,12 +64,12 @@ taf_info *Memory::taf_adr(const char *filename) {
 	return tinfo;
 }
 
-taf_seq_info *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
+TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	Common::File *rs = new Common::File();
 	rs->open(CH_SPZ_FILE);
-	taf_dateiheader header;
-	taf_imageheader iheader;
-	taf_seq_info *ts_info = nullptr;
+	TafFileHeader header;
+	TafImageHeader iheader;
+	TafSeqInfo *ts_info = nullptr;
 	uint32 ptr;
 	uint32 size;
 	int16 i;
@@ -100,16 +100,16 @@ taf_seq_info *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 				if (!_G(modul)) {
 					size += image_anz * sizeof(byte *);
 					size += image_anz * sizeof(char *);
-					size += ((uint32)sizeof(taf_seq_info));
+					size += ((uint32)sizeof(TafSeqInfo));
 					tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
 
 					if (!_G(modul)) {
-						ts_info = (taf_seq_info *)tmp1;
+						ts_info = (TafSeqInfo *)tmp1;
 						ts_info->anzahl = image_anz;
-						ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
+						ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
 						ts_info->korrektur = (int16 *)(tmp1 + size);
 						rs->seek(ptr, SEEK_SET);
-						sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
+						sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo))
 							+ (image_anz * sizeof(char *)));
 
 						for (i = 0; i < image_anz && !_G(modul); i++) {
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index a18c7ab9991..6e46dc8150e 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -32,8 +32,8 @@ public:
 	Memory();
 	~Memory();
 
-	taf_info *taf_adr(const char *filename);
-	taf_seq_info *taf_seq_adr(int16 image_start, int16 image_anz);
+	TafInfo *taf_adr(const char *filename);
+	TafSeqInfo *taf_seq_adr(int16 image_start, int16 image_anz);
 	void tff_adr(const char *filename, byte **speicher);
 	byte *void_adr(const char *filename);
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 4c4d2a7c609..35860c8252c 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -33,7 +33,7 @@ bool mouse_active;
 bool cur_move;
 
 
-void set_new_kb_handler(kb_info *key) {
+void set_new_kb_handler(KbdInfo *key) {
 	g_events->setKbdInfo(key);
 }
 
@@ -41,7 +41,7 @@ void set_old_kb_handler() {
 	g_events->setKbdInfo(nullptr);
 }
 
-void set_mouse_handler(maus_info *mpos) {
+void set_mouse_handler(MouseInfo *mpos) {
 	// No implementation in ScummVM
 }
 
@@ -80,7 +80,7 @@ int16 InputMgr::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 	return i;
 }
 
-void InputMgr::neuer_kb_handler(kb_info *key) {
+void InputMgr::neuer_kb_handler(KbdInfo *key) {
 	set_new_kb_handler(key);
 	_kbInfoBlk = key;
 	_kbInfoBlk->key_code = '\0';
@@ -96,12 +96,12 @@ void InputMgr::alter_kb_handler() {
 #endif
 }
 
-void InputMgr::neuer_maushandler(maus_info *mpos) {
+void InputMgr::neuer_maushandler(MouseInfo *mpos) {
 	set_mouse_handler(mpos);
 	_mouseInfoBlk = mpos;
 }
 
-in_zeiger *InputMgr::get_in_zeiger() {
+KbdMouseInfo *InputMgr::get_in_zeiger() {
 	_inzeig.minfo = _mouseInfoBlk;
 	_inzeig.kbinfo = _kbInfoBlk;
 
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 15979012472..64fe6cb069e 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -26,10 +26,10 @@
 
 namespace Chewy {
 
-void set_new_kb_handler(kb_info *key);
+void set_new_kb_handler(KbdInfo *key);
 void set_old_kb_handler();
 
-void set_mouse_handler(maus_info *mpos);
+void set_mouse_handler(MouseInfo *mpos);
 
 extern bool mouse_links_los;
 extern bool mouse_active;
@@ -45,20 +45,20 @@ public:
 	void move_mouse(int16 x, int16 y);
 	void rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax);
 
-	void neuer_kb_handler(kb_info *key);
+	void neuer_kb_handler(KbdInfo *key);
 	void alter_kb_handler();
-	void neuer_maushandler(maus_info *mpos);
+	void neuer_maushandler(MouseInfo *mpos);
 	int16 maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
-	in_zeiger *get_in_zeiger();
+	KbdMouseInfo *get_in_zeiger();
 	int16 get_switch_code();
 
 	int16 _hotkey = 0;
 
 private:
-	maus_info *_mouseInfoBlk = nullptr;
-	kb_info *_kbInfoBlk = nullptr;
-	in_zeiger _inzeig;
+	MouseInfo *_mouseInfoBlk = nullptr;
+	KbdInfo *_kbInfoBlk = nullptr;
+	KbdMouseInfo _inzeig;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 77234758914..7e91216f1fa 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -23,7 +23,7 @@
 
 namespace Chewy {
 
-bool taf_dateiheader::load(Common::SeekableReadStream *src) {
+bool TafFileHeader::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	mode = src->readSint16LE();
 	count = src->readSint16LE();
@@ -35,7 +35,7 @@ bool taf_dateiheader::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool taf_imageheader::load(Common::SeekableReadStream *src) {
+bool TafImageHeader::load(Common::SeekableReadStream *src) {
 	komp = src->readSint16LE();
 	width = src->readUint16LE();
 	height = src->readUint16LE();
@@ -53,7 +53,7 @@ bool NewPhead::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool tff_header::load(Common::SeekableReadStream *src) {
+bool TffHeader::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	size = src->readUint32LE();
 	count = src->readSint16LE();
@@ -65,7 +65,7 @@ bool tff_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool knopf::load(Common::SeekableReadStream *src) {
+bool Button::load(Common::SeekableReadStream *src) {
 	typ = src->readSint16LE();
 	enable = src->readSint16LE();
 	x1 = src->readSint16LE();
@@ -82,7 +82,7 @@ bool knopf::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool menue::load(Common::SeekableReadStream *src) {
+bool Menu::load(Common::SeekableReadStream *src) {
 	nr = src->readSint16LE();
 	disp = src->readSint16LE();
 	typ = src->readSint16LE();
@@ -99,7 +99,7 @@ bool menue::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool dialogue::load(Common::SeekableReadStream *src) {
+bool Dialogue::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	anzmenue = src->readSint16LE();
 	src->skip(4 * MAXMENUE);
@@ -109,7 +109,7 @@ bool dialogue::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool dialogue::save(Common::WriteStream *dest) {
+bool Dialogue::save(Common::WriteStream *dest) {
 	dest->write(id, 4);
 	dest->writeSint16LE(anzmenue);
 	for (int i = 0; i < MAXMENUE; ++i)
@@ -120,7 +120,7 @@ bool dialogue::save(Common::WriteStream *dest) {
 	return true;
 }
 
-bool sbi_inst::load(Common::SeekableReadStream *src) {
+bool SbiInst::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	src->read(name, 32);
 	modmulti = src->readByte();
@@ -139,7 +139,7 @@ bool sbi_inst::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool voc_header::load(Common::SeekableReadStream *src) {
+bool VocHeader::load(Common::SeekableReadStream *src) {
 	src->read(id, 0x14);
 	offset = src->readUint16LE();
 	ver_low = src->readByte();
@@ -149,7 +149,7 @@ bool voc_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool mod_inst::load(Common::SeekableReadStream *src) {
+bool ModInst::load(Common::SeekableReadStream *src) {
 	src->read(name, 22);
 	laenge = src->readUint16LE();
 	finetune = src->readSByte();
@@ -160,7 +160,7 @@ bool mod_inst::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool mod_header::load(Common::SeekableReadStream *src) {
+bool ModHeader::load(Common::SeekableReadStream *src) {
 	src->read(name, 20);
 	for (int i = 0; i < 31; ++i) {
 		if (!instrument[i].load(src))
@@ -175,7 +175,7 @@ bool mod_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool mod15_header::load(Common::SeekableReadStream *src) {
+bool Mod15Header::load(Common::SeekableReadStream *src) {
 	src->read(name, 20);
 	for (int i = 0; i < 15; ++i)
 		instrument[i].load(src);
@@ -187,7 +187,7 @@ bool mod15_header::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool tmf_inst::load(Common::SeekableReadStream *src) {
+bool TmfInst::load(Common::SeekableReadStream *src) {
 	finetune = src->readByte();
 	insvol = src->readByte();
 	repstart = src->readUint32LE();
@@ -197,7 +197,7 @@ bool tmf_inst::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool tmf_header::load(Common::SeekableReadStream *src) {
+bool TmfHeader::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	for (int i = 0; i < 31; ++i)
 		instrument[i].load(src);
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 2a0f1736b37..6e74d6da1e1 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -28,7 +28,11 @@
 
 namespace Chewy {
 
-struct taf_dateiheader {
+#define D_GR 16
+#define MAXMENUE 50
+#define MAXKNOPF 400
+
+struct TafFileHeader {
 	char id[4] = { 0 };
 	int16 mode = 0;
 	int16 count = 0;
@@ -40,7 +44,7 @@ struct taf_dateiheader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct taf_imageheader {
+struct TafImageHeader {
 	int16 komp = 0;
 	uint16 width = 0;
 	uint16 height = 0;
@@ -50,14 +54,14 @@ struct taf_imageheader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct taf_info {
+struct TafInfo {
 	int16 anzahl = 0;
 	byte *palette = nullptr;
 	int16 *korrektur = nullptr;
 	byte **image = nullptr;
 };
 
-struct taf_seq_info {
+struct TafSeqInfo {
 	int16 anzahl = 0;
 	int16 *korrektur = nullptr;
 	byte **image = nullptr;
@@ -71,7 +75,7 @@ struct NewPhead {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct tff_header {
+struct TffHeader {
 	char id[4] = { 0 };
 	uint32 size = 0;
 	int16 count = 0;
@@ -84,11 +88,7 @@ struct tff_header {
 	static constexpr int SIZE() { return 18; }
 };
 
-#define D_GR 16
-#define MAXMENUE 50
-#define MAXKNOPF 400
-
-struct knopf {
+struct Button {
 	int16 typ = 0;
 	int16 enable = 0;
 	int16 x1 = 0;
@@ -108,7 +108,7 @@ struct knopf {
 	}
 };
 
-struct menue {
+struct Menu {
 	int16 nr = 0;
 	int16 disp = 0;
 	int16 typ = 0;
@@ -117,7 +117,7 @@ struct menue {
 	int16 width = 0;
 	int16 height = 0;
 	int16 anzknoepfe = 0;
-	knopf *knopfliste[MAXKNOPF] = { nullptr };
+	Button *knopfliste[MAXKNOPF] = { nullptr };
 	int16 spritenr = 0;
 	char *sprite = nullptr;
 	char *spritesave = nullptr;
@@ -129,10 +129,10 @@ struct menue {
 	}
 };
 
-struct dialogue {
+struct Dialogue {
 	char id[4] = { 0 };
 	int16 anzmenue = 0;
-	menue *menueliste[MAXMENUE] = { nullptr };
+	Menu *menueliste[MAXMENUE] = { nullptr };
 	char menuetaf[D_GR] = { '\0' };
 	char knopftaf[D_GR] = { '\0' };
 
@@ -143,7 +143,7 @@ struct dialogue {
 	}
 };
 
-struct sbi_inst {
+struct SbiInst {
 	char id[4];
 	char name[32];
 	uint8 modmulti;
@@ -162,7 +162,7 @@ struct sbi_inst {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct voc_header {
+struct VocHeader {
 	char id[0x14];
 	uint16 offset;
 	uint8 ver_low;
@@ -172,23 +172,23 @@ struct voc_header {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct maus_info {
+struct MouseInfo {
 	int16 x = 0;
 	int16 y = 0;
 	int16 button = 0;
 };
 
-struct kb_info {
+struct KbdInfo {
 	char key_code = '\0';
 	int scan_code = Common::KEYCODE_INVALID;
 };
 
-struct in_zeiger {
-	maus_info *minfo = nullptr;
-	kb_info *kbinfo = nullptr;
+struct KbdMouseInfo {
+	MouseInfo *minfo = nullptr;
+	KbdInfo *kbinfo = nullptr;
 };
 
-struct mod_inst {
+struct ModInst {
 	char name[22];
 	uint16 laenge;
 	char finetune;
@@ -200,9 +200,9 @@ struct mod_inst {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct mod_header {
+struct ModHeader {
 	char name[20] = { 0 };
-	mod_inst instrument[31];
+	ModInst instrument[31];
 	char pattern_anz = 0;
 	char dummy = 0;
 	char sequenz[128] = { 0 };
@@ -211,9 +211,9 @@ struct mod_header {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct mod15_header {
+struct Mod15Header {
 	char name[20];
-	mod_inst instrument[15];
+	ModInst instrument[15];
 	char pattern_anz;
 	char dummy;
 	char sequenz[128];
@@ -222,7 +222,7 @@ struct mod15_header {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct tmf_inst {
+struct TmfInst {
 	uint8 finetune;
 	uint8 insvol;
 	uint32 repstart;
@@ -232,9 +232,9 @@ struct tmf_inst {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct tmf_header {
+struct TmfHeader {
 	char id[4] = { 0 };
-	tmf_inst instrument[31];
+	TmfInst instrument[31];
 	uint8 lied_len = 0;
 	uint8 pattern_anz = 0;
 	uint8 sequenz[128] = { 0 };
@@ -253,7 +253,7 @@ struct musik_info {
 	char *cur_pattern = nullptr;
 };
 
-struct channel_info {
+struct ChannelInfo {
 	uint8 finetune = 0;
 	uint8 volume = 0;
 	uint32 repstart = 0;
@@ -278,7 +278,7 @@ struct VesaInfo {
 	char dummy[10] = { 0 };
 };
 
-struct vesa_status_block {
+struct VesaStatusBlock {
 	uint8 id[4] = { 0 };
 	uint8 ver_low = 0;
 	uint8 ver_high = 0;
@@ -296,11 +296,9 @@ struct vesa_status_block {
 	char OemData[256] = { 0 };
 };
 
-struct vesa_modus_block {
+struct VesaModusBlock {
 	uint16 mflag = 0;
-
 	uint8 fw_flag = 0;
-
 	uint8 fs_flag = 0;
 
 	uint16 stepgr = 0;
@@ -321,7 +319,7 @@ struct vesa_modus_block {
 	char dummy[100] = { 0 };
 };
 
-struct iog_init {
+struct IogInit {
 	char id[4] = { 0 };
 	char save_path[30] = { 0 };
 
@@ -336,7 +334,7 @@ struct iog_init {
 	int16 delay = 0;
 };
 
-struct iot_init {
+struct IotInit {
 	int16 popx = 0;
 	int16 popy = 0;
 	char *m_col = nullptr;
@@ -351,7 +349,7 @@ struct iot_init {
 	int16 delay = 0;
 };
 
-struct mem_info_blk {
+struct MemInfoBlk {
 	uint32 size = 0;
 	uint32 akt_size = 0;
 	uint32 biggest_block = 0;
@@ -381,7 +379,7 @@ struct GedHeader {
 	uint32 Len = 0;
 };
 
-struct cur_blk {
+struct CurBlk {
 	int16 page_off_x = 0;
 	int16 page_off_y = 0;
 	byte *cur_back = nullptr;
@@ -391,13 +389,13 @@ struct cur_blk {
 	bool no_back = false;
 };
 
-struct cur_ani {
+struct CurAni {
 	uint8 ani_anf = 0;
 	uint8 ani_end = 0;
 	int16 delay = 0;
 };
 
-struct fcur_blk {
+struct FCurBlk {
 	int16 page_off_x = 0;
 	int16 page_off_y = 0;
 	uint32 cur_back = 0;
@@ -477,26 +475,6 @@ struct CustomInfo {
 	uint32 MaxMusicSize = 0;
 };
 
-struct real_regs {
-	uint32 edi = 0;
-	uint32 esi = 0;
-	uint32 ebp = 0;
-	uint32 reserved = 0;
-	uint32 ebx = 0;
-	uint32 edx = 0;
-	uint32 ecx = 0;
-	uint32 eax = 0;
-	uint16 flags = 0;
-	uint16 es = 0;
-	uint16 ds = 0;
-	uint16 fs = 0;
-	uint16 gs = 0;
-	uint16 ip = 0;
-	uint16 cs = 0;
-	uint16 sp = 0;
-	uint16 ss = 0;
-};
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 32513d22a74..075a20b2722 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -66,7 +66,7 @@ struct RaumBlk {
 	int16 AkAblage;
 	byte **DetImage;
 	int16 *DetKorrekt;
-	taf_info *Fti;
+	TafInfo *Fti;
 	int16 AadLoad;
 	int16 AtsLoad;
 };
diff --git a/engines/chewy/sound_player.cpp b/engines/chewy/sound_player.cpp
index 3e29d8ebc2a..c492ee6363b 100644
--- a/engines/chewy/sound_player.cpp
+++ b/engines/chewy/sound_player.cpp
@@ -146,11 +146,11 @@ int16 CurrentTempo = 6;
 int16 FineSpeedV;
 int16 FineSpeedN;
 int16 FineSpeedS;
-tmf_inst Instrument[4] = {{ 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }};
+TmfInst Instrument[4] = {{ 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }};
 uint16 InsFreq[4] = {0};
 char *Sample[4] = {0};
 
-tmf_header *ActiveSong;
+TmfHeader *ActiveSong;
 int16 SeqPointer;
 int16 PatPointer;
 int16 PatLine;
@@ -220,13 +220,13 @@ void SoundPlayer::exitMixMode() {
 #endif
 }
 
-void SoundPlayer::playMod(tmf_header *th) {
+void SoundPlayer::playMod(TmfHeader *th) {
 	char *tmp;
 	int16 i;
 	ActiveSong = th;
 	if (SoundEnable) {
 		tmp = (char *)ActiveSong;
-		tmp += sizeof(tmf_header);
+		tmp += sizeof(TmfHeader);
 		for (i = 0; i < 128; i++) {
 			Patterns[i] = tmp;
 			tmp += 1024;
diff --git a/engines/chewy/sound_player.h b/engines/chewy/sound_player.h
index 967dd35703a..b97166617a2 100644
--- a/engines/chewy/sound_player.h
+++ b/engines/chewy/sound_player.h
@@ -48,7 +48,7 @@ public:
 	void initNoteTable(uint16 sfreq);
 	void initMixMode();
 	void exitMixMode();
-	void playMod(tmf_header *th);
+	void playMod(TmfHeader *th);
 	void stopMod();
 	void continueMusic();
 	void playSequence(int16 startPos, int16 endPos);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index ec0cc98d099..5bd5539fd53 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -118,7 +118,7 @@ void sprite_engine() {
 	int16 x, y;
 	int16 p_nr;
 	ObjMov detmov;
-	taf_seq_info *ts_info;
+	TafSeqInfo *ts_info;
 	calc_z_ebene();
 	calc_person_ani();
 


Commit: cf3f5aba60705b6817a551df5b330532bb51cbfc
    https://github.com/scummvm/scummvm/commit/cf3f5aba60705b6817a551df5b330532bb51cbfc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: MInor cleanup of main, shifted field to Globals

Changed paths:
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/object_extra.h


diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index d2626d33afd..bc82cd05de1 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -280,6 +280,7 @@ public:
 	FontMgr *_fontMgr = nullptr;
 	int16 _modul = 0;
 	int16 _fcode = 0;
+	int16 _scroll_delay = 0;
 
 	// mcga.cpp
 	byte _saved_palette[PALETTE_SIZE] = { 0 };
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index ee3689ee6e6..8966533e6e9 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -32,6 +32,10 @@
 namespace Chewy {
 
 #define AUSGANG_CHECK_PIX 8
+#define SCROLL_LEFT 120
+#define SCROLL_RIGHT SCREEN_WIDTH-SCROLL_LEFT
+#define SCROLL_UP 80
+#define SCROLL_DOWN SCREEN_HEIGHT-SCROLL_UP
 
 static const int16 invent_display[4][2] = {
 	{5, 0}, { 265, 0 }, { 265, 149 }, { 5, 149 }
@@ -1888,19 +1892,13 @@ void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y,
 	}
 }
 
-#define SCROLL_LEFT 120
-#define SCROLL_RIGHT SCREEN_WIDTH-SCROLL_LEFT
-#define SCROLL_UP 80
-#define SCROLL_DOWN SCREEN_HEIGHT-SCROLL_UP
-
-int16 scroll_delay = 0;
 void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
                  int16 *sc_x, int16 *sc_y) {
 	if (!_G(flags).NoScroll) {
-		if (!scroll_delay) {
+		if (!_G(scroll_delay)) {
 
 			if ((_G(spieler).ScrollxStep * _G(spieler).DelaySpeed) > CH_X_PIX)
-				scroll_delay = CH_X_PIX / _G(spieler).ScrollxStep;
+				_G(scroll_delay) = CH_X_PIX / _G(spieler).ScrollxStep;
 
 			if (x - *sc_x < SCROLL_LEFT) {
 				if ((*sc_x - _G(spieler).ScrollxStep) > 0) {
@@ -1922,7 +1920,7 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
 				}
 			}
 		} else
-			--scroll_delay;
+			--_G(scroll_delay);
 	}
 }
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 6fae2906acc..4a7fea13162 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -30,7 +30,7 @@ namespace Chewy {
 
 #define SCREEN_S _G(currentScreen)
 #define SCREEN _G(currentScreen).getPixels()
-
+#define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
 
 void init_mcga() {
 	_G(currentScreen) = (byte *)g_screen->getPixels();
@@ -53,8 +53,6 @@ byte *get_dispoff() {
 	return SCREEN;
 }
 
-#define VGA_COLOR_TRANS(x) ((x) * 255 / 63)
-
 void setScummVMPalette(const byte *palette, uint start, uint count) {
 	byte tempPal[PALETTE_SIZE];
 	byte *dest = &tempPal[0];
diff --git a/engines/chewy/object_extra.h b/engines/chewy/object_extra.h
index 5c523c25929..577514a6539 100644
--- a/engines/chewy/object_extra.h
+++ b/engines/chewy/object_extra.h
@@ -27,6 +27,23 @@
 
 namespace Chewy {
 
+#define OBJZU_AUF 0
+#define OBJZU_ZU 1
+#define OBJZU_AN 2
+#define OBJZU_AUS 3
+#define OBJZU_VERSCHLOSSEN 5
+#define OBJZU_GEOEFFNET 6
+#define OBJZU_NASS 7
+#define OBJZU_TROCKEN 8
+#define OBJZU_OELIG 9
+#define OBJZU_HEISS 10
+#define OBJZU_KALT 11
+#define OBJZU_LEER 12
+#define OBJZU_VOLL 13
+#define OBJZU_UNDICHT 14
+#define OBJZU_KLEMMT 15
+#define SIB_GET_INV 16
+
 struct RoomMovObject {
 	int16 RoomNr = 0;
 
@@ -113,23 +130,6 @@ struct EibDateiHeader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-#define OBJZU_AUF 0
-#define OBJZU_ZU 1
-#define OBJZU_AN 2
-#define OBJZU_AUS 3
-#define OBJZU_VERSCHLOSSEN 5
-#define OBJZU_GEOEFFNET 6
-#define OBJZU_NASS 7
-#define OBJZU_TROCKEN 8
-#define OBJZU_OELIG 9
-#define OBJZU_HEISS 10
-#define OBJZU_KALT 11
-#define OBJZU_LEER 12
-#define OBJZU_VOLL 13
-#define OBJZU_UNDICHT 14
-#define OBJZU_KLEMMT 15
-#define SIB_GET_INV 16
-
 } // namespace Chewy
 
 #endif


Commit: d3a16e4015f9129818c2f539c8093d8327398e2b
    https://github.com/scummvm/scummvm/commit/d3a16e4015f9129818c2f539c8093d8327398e2b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: Cleanup of atds method parameters

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 8ab8ecd2255..366479542eb 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -299,21 +299,21 @@ void Atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 	_ssi[nr] = ssinit[0];
 }
 
-Stream *Atdsys::pool_handle(const char *fname_, const char *fmode) {
-	Stream *handle = chewy_fopen(fname_, fmode);
+Stream *Atdsys::pool_handle(const char *fname, const char *fmode) {
+	Stream *handle = chewy_fopen(fname, fmode);
 	if (handle) {
 		_atdshandle[ATDS_HANDLE] = handle;
 	} else {
-		error("Error reading from %s", fname_);
+		error("Error reading from %s", fname);
 	}
 
 	return handle;
 }
 
-void Atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
+void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead Ch;
-	char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
+	char *tmp_adr = atds_adr(fname, chunk_start, chunk_anz);
 	if (!_G(modul)) {
 		if (rs) {
 			_atdshandle[mode] = rs;
@@ -325,7 +325,7 @@ void Atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
 				if (!Ch.load(rs)) {
-					error("Error reading from %s", fname_);
+					error("Error reading from %s", fname);
 				} else {
 					free(_invUseMem);
 					_invUseMem = (char *)MALLOC(Ch.size + 3l);
@@ -333,7 +333,7 @@ void Atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					if (!_G(modul)) {
 						if (Ch.size) {
 							if (!rs->read(_invUseMem, Ch.size)) {
-								error("Error reading from %s", fname_);
+								error("Error reading from %s", fname);
 							} else
 								crypt(_invUseMem, Ch.size);
 						}
@@ -343,20 +343,20 @@ void Atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
 					}
 				}
 				break;
-
 			}
 		}
-	} else
-		error("Error reading from %s", fname_);
+	} else {
+		error("Error reading from %s", fname);
+	}
 }
 
-void Atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
+void Atdsys::open_handle(const char *fname, const char *fmode, int16 mode) {
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
-		tmp_adr = atds_adr(fname_, 0, 20000);
+		tmp_adr = atds_adr(fname, 0, 20000);
 	if (!_G(modul)) {
-		Stream *stream = chewy_fopen(fname_, fmode);
+		Stream *stream = chewy_fopen(fname, fmode);
 		if (stream) {
 			close_handle(mode);
 			_atdshandle[mode] = stream;
@@ -375,7 +375,7 @@ void Atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
 				break;
 			}
 		} else {
-			error("Error reading from %s", fname_);
+			error("Error reading from %s", fname);
 		}
 	}
 }
@@ -396,9 +396,9 @@ void Atdsys::close_handle(int16 mode) {
 	_atdsmem[mode] = nullptr;
 }
 
-char *Atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
+char *Atdsys::atds_adr(const char *fname, int16 chunk_start, int16 chunk_anz) {
 	char *tmp_adr = nullptr;
-	uint32 size = _G(mem)->file->get_poolsize(fname_, chunk_start, chunk_anz);
+	uint32 size = _G(mem)->file->get_poolsize(fname, chunk_start, chunk_anz);
 	if (size) {
 		tmp_adr = (char *)MALLOC(size + 3l);
 	}
@@ -459,8 +459,8 @@ void Atdsys::save_ads_header(int16 dia_nr) {
 	}
 }
 
-void Atdsys::crypt(char *txt_, uint32 size) {
-	uint8 *sp = (uint8 *)txt_;
+void Atdsys::crypt(char *txt, uint32 size) {
+	uint8 *sp = (uint8 *)txt;
 	for (uint32 i = 0; i < size; i++) {
 		*sp = -(*sp);
 		++sp;
@@ -757,8 +757,8 @@ char *Atdsys::ats_search_block(int16 txt_mode, char *txt_adr) {
 	return strP;
 }
 
-void Atdsys::ats_search_nr(int16 txt_nr, char **str_) {
-	char *start_str = *str_;
+void Atdsys::ats_search_nr(int16 txt_nr, char **str) {
+	char *start_str = *str;
 
 	bool done1 = false;
 	while (!done1) {
@@ -768,14 +768,14 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 		if (_atsv.TxtHeader.TxtNr == 0xFEF0 &&
 				_atsv.TxtHeader.AMov == txt_nr) {
 			// Found match
-			*str_ = start_str + AtsTxtHeader::SIZE();
+			*str = start_str + AtsTxtHeader::SIZE();
 
 			if (_atsv.TxtMode) {
-				Common::MemoryReadStream rs2((const byte *)*str_, AtsStrHeader::SIZE());
+				Common::MemoryReadStream rs2((const byte *)*str, AtsStrHeader::SIZE());
 				_atsv.StrHeader.load(&rs2);
 			}
 
-			*str_ += AtsStrHeader::SIZE();
+			*str += AtsStrHeader::SIZE();
 			break;
 		}
 
@@ -792,7 +792,7 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 					++start_str;
 					if (start_str[1] == 0xf && start_str[2] == 0xf && start_str[3] == 0xf) {
 						done1 = done2 = true;
-						*str_ = nullptr;
+						*str = nullptr;
 					} else {
 						done2 = true;
 					}
@@ -802,9 +802,9 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str_) {
 	}
 }
 
-void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_) {
-	char *tmp_str = *str_;
-	char *start_str = *str_;
+void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str) {
+	char *tmp_str = *str;
+	char *start_str = *str;
 	*anz = 0;
 	bool ende = false;
 	int16 count = 0;
@@ -815,7 +815,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 				++*anz;
 			} else if (*tmp_str == ATDS_END_TEXT) {
 				ende = true;
-				*str_ = start_str;
+				*str = start_str;
 				start_str -= AtsStrHeader::SIZE();
 
 				if (_atsv.TxtMode != TXT_MARK_NAME) {
@@ -839,7 +839,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 					ende = false;
 					*anz = 0;
 					*status = count;
-					*str_ = start_str;
+					*str = start_str;
 					start_str -= AtsStrHeader::SIZE();
 					if (_atsv.TxtMode != TXT_MARK_NAME) {
 						Common::MemoryReadStream rs((const byte *)start_str,
@@ -858,7 +858,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str_
 			            tmp_str[2] == (char)BLOCKENDE)) {
 				ende = false;
 				*anz = 0;
-				*str_ = nullptr;
+				*str = nullptr;
 			}
 		}
 
@@ -1042,15 +1042,15 @@ int16 Atdsys::aad_get_status() {
 	return _aadv.StrNr;
 }
 
-int16 Atdsys::aad_get_zeilen(char *str_, int16 *txt_len) {
+int16 Atdsys::aad_get_zeilen(char *str, int16 *txt_len) {
 	*txt_len = 0;
-	char *ptr = str_;
+	char *ptr = str;
 	int16 zeilen = 0;
-	while (*str_ != ATDS_END_TEXT) {
-		if (*str_++ == 0)
+	while (*str != ATDS_END_TEXT) {
+		if (*str++ == 0)
 			++zeilen;
 	}
-	*txt_len = (str_ - ptr) - 1;
+	*txt_len = (str - ptr) - 1;
 
 	return zeilen;
 }


Commit: 34251e12d5ccdb9a4f943e1c215816d4c70b662e
    https://github.com/scummvm/scummvm/commit/34251e12d5ccdb9a4f943e1c215816d4c70b662e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: Fix logic of Room 03

Changed paths:
    engines/chewy/rooms/room03.cpp


diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index ac509ab8f1a..abdd87c0389 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -26,6 +26,7 @@
 #include "chewy/rooms/room02.h"
 #include "chewy/rooms/room03.h"
 #include "chewy/rooms/room04.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Rooms {
@@ -44,6 +45,9 @@ namespace Rooms {
 
 #define GITTER_BLITZEN 7
 
+#define SONDE_OBJ 0
+#define SONDE_OBJ1 1
+
 static const MovLine SONDE_MPKT[3] = {
 	{ {  13, 45,  75 }, 1, 2 },
 	{ { 237, 52, 160 }, 1, 2 },
@@ -106,7 +110,6 @@ void Room3::terminal() {
 			start_ani_block(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
 				_G(spieler).R2FussSchleim = false;
-
 				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -142,6 +145,7 @@ void Room3::terminal() {
 		_G(maus_links_click) = false;
 		_G(minfo).button = 0;
 		stop_person(P_CHEWY);
+		start_spz(15, 255, false, P_CHEWY);
 		start_aad_wait(51, -1);
 		set_up_screen(DO_SETUP);
 		break;
@@ -156,8 +160,6 @@ void Room3::terminal() {
 }
 
 void Room3::init_sonde() {
-#define SONDE_OBJ 0
-#define SONDE_OBJ1 1
 	_G(auto_obj) = 1;
 	_G(mov_phasen)[SONDE_OBJ].AtsText = 24;
 	_G(mov_phasen)[SONDE_OBJ].Lines = 3;
@@ -166,7 +168,7 @@ void Room3::init_sonde() {
 	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
 	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 3, (const MovLine *)SONDE_MPKT);
 }
 
 void Room3::sonde_knarre() {
@@ -192,7 +194,7 @@ void Room3::sonde_knarre() {
 	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
 	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt1);
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 3, (MovLine*)sonde_mpkt1);
 	_G(flags).AniUserAction = false;
 	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
@@ -207,22 +209,20 @@ void Room3::sonde_knarre() {
 		}
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		_G(spr_info)[0].ZEbene = 0;
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 &&
-			rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
+		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 && rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
 			_G(spr_info)[1].ZEbene = 190;
-		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 &&
-			_G(det)->get_ani_status(SONDE_RET) == 0) {
-
+		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 && _G(det)->get_ani_status(SONDE_RET) == 0) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
 			_G(spr_info)[2].ZEbene = 190;
 		}
-		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178) {
+		
+		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178)
 			_G(det)->start_detail(SONDE_RET, 3, ANI_RUECK);
-		}
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28) {
+		
+		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28)
 			ende = 1;
-		}
+
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 	}
@@ -241,9 +241,11 @@ void Room3::sonde_knarre() {
 		if (ende == 3)
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
 	}
-	start_aad_wait(53, -1);
 
+	start_spz(15, 255, false, P_CHEWY);
+	start_aad_wait(53, -1);
 	clear_prog_ani();
 	_G(det)->start_detail(SONDE_REIN, 1, ANI_RUECK);
 	while (_G(det)->get_ani_status(SONDE_REIN)) {
@@ -252,15 +254,19 @@ void Room3::sonde_knarre() {
 		_G(spr_info)[0].ZEbene = 0;
 		set_ani_screen();
 	}
-	clear_prog_ani();
 
+	clear_prog_ani();
 	_G(mov_phasen)[SONDE_OBJ].Lines = 2;
 	_G(mov_phasen)[SONDE_OBJ].Repeat = 1;
 	_G(mov_phasen)[SONDE_OBJ].ZoomFak = 28;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (MovLine*)sonde_mpkt2);
-	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 2, (MovLine*)sonde_mpkt2);
+
+	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1) {
 		set_ani_screen();
-	_G(det)->del_taf_tbl(162, 17, 0);
+		SHOULD_QUIT_RETURN;
+	}
+
+	_G(det)->del_taf_tbl(162, 17, nullptr);
 	_G(zoom_horizont) = tmp;
 	init_sonde();
 
@@ -288,7 +294,7 @@ void Room3::probeTransfer() {
 
 	_G(flags).AniUserAction = false;
 	hide_cur();
-	/*rdi = */(void)_G(det)->get_room_detail_info();
+	_G(det)->get_room_detail_info();
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	int16 anistart = false;
@@ -299,9 +305,13 @@ void Room3::probeTransfer() {
 	_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
 	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
-	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, (const MovLine *)SONDE_MPKT1);
-	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
+	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 2, (const MovLine *)SONDE_MPKT1);
+	_G(atds)->set_ats_str(24, ATS_AKTIV_BIT, ATS_DATEI);
+	
+	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1) {
 		set_ani_screen();
+		SHOULD_QUIT_RETURN;
+	}
 
 	_G(det)->start_detail(SONDE_GREIF, 1, ANI_VOR);
 	while (_G(det)->get_ani_status(SONDE_GREIF)) {
@@ -324,14 +334,14 @@ void Room3::probeTransfer() {
 		_G(auto_mov_obj)[SONDE_OBJ].Id = AUTO_OBJ0;
 		_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
 		_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ].Lines, SONDE_MPKT_[i]);
+		init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 2, SONDE_MPKT_[i]);
 		_G(mov_phasen)[SONDE_OBJ1].Lines = 2;
 		_G(mov_phasen)[SONDE_OBJ1].Repeat = 1;
 		_G(mov_phasen)[SONDE_OBJ1].ZoomFak = 0;
 		_G(auto_mov_obj)[SONDE_OBJ1].Id = AUTO_OBJ1;
 		_G(auto_mov_obj)[SONDE_OBJ1].Mode = true;
 		_G(auto_mov_vector)[SONDE_OBJ1].Delay = _G(spieler).DelaySpeed;
-		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], _G(mov_phasen)[SONDE_OBJ1].Lines, SONDE_MPKT_[i]);
+		init_auto_obj(SONDE_OBJ1, &SONDE_PHASEN[0][0], 2, SONDE_MPKT_[i]);
 		_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = spr_nr;
 		_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = spr_nr;
 		while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1) {
@@ -344,13 +354,12 @@ void Room3::probeTransfer() {
 							_G(ssi)[0].X = 120;
 							_G(ssi)[0].Y = 100;
 							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
-
 								start_aad(50);
 							else
-
 								start_aad(44);
+
 							del_inventar(_G(spieler).AkInvent);
-							_G(spieler).R2FussSchleim = 1;
+							_G(spieler).R2FussSchleim = true;
 							_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = 142;
 							_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = 149;
 							_G(auto_mov_vector)[SONDE_OBJ1].PhAnz = 8;
@@ -384,12 +393,17 @@ void Room3::probeTransfer() {
 			break;
 
 		case 1:
+			g_engine->_sound->waitForSpeechToFinish();
+			_G(atds)->set_ats_str(24, 0, 1);
+			_G(mov_phasen)[0].AtsText = 544;
 			switch_room(1);
 			break;
 
 		case 2:
+			g_engine->_sound->waitForSpeechToFinish();
 			_G(det)->del_taf_tbl(142, 7, nullptr);
 			_G(flags).AniUserAction = false;
+			_G(mov_phasen)[0].AtsText = 24;
 			switch_room(2);
 			break;
 


Commit: 36ee1adf76085ffbfecdb0f1408efbc071d2303b
    https://github.com/scummvm/scummvm/commit/36ee1adf76085ffbfecdb0f1408efbc071d2303b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: Fix issues in Room 00

Changed paths:
    engines/chewy/rooms/room00.cpp


diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 7c0c2356b05..0e708691513 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -22,7 +22,6 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
-#include "chewy/ani_dat.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room00.h"
 #include "chewy/sound.h"
@@ -52,8 +51,7 @@ namespace Rooms {
 #define KOPF3 48
 
 void Room0::entry() {
-	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow ||
-			_G(obj)->check_inventar(0))
+	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->check_inventar(0))
 		_G(det)->hide_static_spr(6);
 
 	if (!_G(flags).LoadGame) {
@@ -74,8 +72,8 @@ void Room0::entry() {
 }
 
 bool Room0::timer(int16 t_nr, int16 ani_nr) {
-	switch (ani_nr) {
-	case 1:
+	bool retval = false;
+	if (ani_nr == 1) {
 		if (_G(timer_action_ctr) > 0) {
 			_G(uhr)->reset_timer(t_nr, 0);
 			--_G(timer_action_ctr);
@@ -95,6 +93,8 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 						start_aad_wait(618, -1);
 					else
 						start_aad_wait(43, -1);
+
+					++_G(spieler).R0FueterLab;
 				}
 
 				eyeAnim();
@@ -117,16 +117,15 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			_G(uhr)->reset_timer(t_nr, 0);
 			_G(flags).AutoAniPlay = false;
 		}
-		break;
+	} else if (t_nr == 3)
+		retval = true;
 
-	default:
-		break;
-	}
-
-	return false;
+	return retval;
 }
 
 bool Room0::getPillow() {
+	bool retval = false;
+	
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
 		_G(flags).AutoAniPlay = true;
@@ -140,18 +139,22 @@ bool Room0::getPillow() {
 
 		_G(flags).AutoAniPlay = false;
 		show_cur();
-		return true;
+		retval = true;
 	}
 
-	return false;
+	return retval;
 }
 
 bool Room0::pullSlime() {
+	bool retval = false;
 	if (!_G(spieler).inv_cur) {
 		hide_cur();
+		
+		_G(flags).AutoAniPlay = true;
 		auto_move(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(3, 1, ANI_VOR);
+		start_detail_wait(17, 2, ANI_VOR);
 		set_person_pos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
@@ -161,10 +164,10 @@ bool Room0::pullSlime() {
 
 		_G(flags).AutoAniPlay = false;
 		show_cur();
-		return true;
+		retval = true;
 	}
 
-	return false;
+	return retval;
 }
 
 void Room0::eyeAnim() {
@@ -189,10 +192,7 @@ void Room0::eyeAnim() {
 }
 
 void Room0::eyeStart(EyeMode mode) {
-	AniDetailInfo *adi;
-	bool ende;
-
-	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	if (mode == EYE_START)
 		adi->ani_count = adi->start_ani;
 	else
@@ -202,19 +202,19 @@ void Room0::eyeStart(EyeMode mode) {
 		trapDoorOpen();
 	}
 
-	ende = false;
+	bool ende = false;
 	_G(flags).AniUserAction = true;
 
 	if (mode == EYE_START) {
-		g_engine->_sound->playSound(FLAP_DETAIL, 0, false);
+		g_engine->_sound->playSound(FLAP_DETAIL, 0);
 		g_engine->_sound->stopSound(1);
-		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 0, false);
+		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 0);
 		g_engine->_sound->stopSound(2);
 	} else {
-		g_engine->_sound->stopSound(1);
-		g_engine->_sound->playSound(FLAP_DETAIL, 1, false);
 		g_engine->_sound->stopSound(0);
-		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 2, false);
+		g_engine->_sound->playSound(FLAP_DETAIL, 1);
+		g_engine->_sound->stopSound(0);
+		g_engine->_sound->playSound(SCHLAUCH_DETAIL, 2);
 	}
 
 	while (!ende) {
@@ -225,6 +225,7 @@ void Room0::eyeStart(EyeMode mode) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
 			_G(spr_info)[1].ZEbene = 191;
 		}
+		
 		if (adi->ani_count == 38) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
 			_G(spr_info)[2].ZEbene = 192;
@@ -265,9 +266,7 @@ void Room0::eyeStart(EyeMode mode) {
 }
 
 void Room0::eyeWait() {
-	AniDetailInfo *adi;
-
-	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
 	adi->delay_count = 15;
 	_G(flags).AniUserAction = true;


Commit: 316f0aee6e4d1682c41318a6d7012eecc35d7fd1
    https://github.com/scummvm/scummvm/commit/316f0aee6e4d1682c41318a6d7012eecc35d7fd1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:32-08:00

Commit Message:
CHEWY: Room 0 - Remove two defines, reduce some variable scopes

Changed paths:
    engines/chewy/rooms/room00.cpp


diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 0e708691513..3d7991a7ed9 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -41,8 +41,6 @@ namespace Rooms {
 #define CH_WIRFT_KISSEN 14
 #define FUETTER_SCHLAUCH 15
 #define STERNE_STEHEN 16
-#define VOR 0
-#define RUECK 1
 #define SCHLAUCH1 11
 #define SCHLAUCH2 38
 #define SCHLAUCH3 59
@@ -302,20 +300,17 @@ void Room0::eyeWait() {
 }
 
 void Room0::calcEyeClick(int16 ani_nr) {
-	int16 anz;
-	int16 x, y;
-	int16 i;
-
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
+			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = _G(minfo).x;
-				y = _G(minfo).y;
+				int16 x = _G(minfo).x;
+				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
-				for (i = 0; i < anz; i++)
+				for (int16 i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
@@ -323,7 +318,6 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
 			} else if (is_cur_inventar(PILLOW_INV)) {
-
 				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
 			}
 		}
@@ -331,14 +325,11 @@ void Room0::calcEyeClick(int16 ani_nr) {
 }
 
 void Room0::eyeShoot() {
-	AniDetailInfo *adi;
-	bool ende;
-
-	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 47;
 
-	ende = false;
-	_G(det)->start_detail(CH_BLITZ, 1, VOR);
+	bool ende = false;
+	_G(det)->start_detail(CH_BLITZ, 1, ANI_VOR);
 
 	while (!ende) {
 		clear_prog_ani();
@@ -369,7 +360,7 @@ void Room0::eyeShoot() {
 		}
 	}
 
-	_G(det)->start_detail(STERNE_STEHEN, 255, VOR);
+	_G(det)->start_detail(STERNE_STEHEN, 255, ANI_VOR);
 	clear_prog_ani();
 	_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 	_G(spr_info)[0].ZEbene = 190;
@@ -385,13 +376,10 @@ void Room0::eyeShoot() {
 }
 
 void Room0::eyeSlimeBack() {
-	AniDetailInfo *adi;
-	bool ende;
-
-	adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
 	adi->ani_count = 53;
 
-	ende = false;
+	bool ende = false;
 	_G(flags).AniUserAction = true;
 
 	while (!ende) {
@@ -530,7 +518,7 @@ void Room0::feederStart(int16 mode) {
 	_G(flags).AniUserAction = false;
 
 	if (mode) {
-		_G(det)->start_detail(FLAP_DETAIL, 1, RUECK);
+		_G(det)->start_detail(FLAP_DETAIL, 1, ANI_RUECK);
 		while (_G(det)->get_ani_status(FLAP_DETAIL))
 			set_ani_screen();
 
@@ -637,7 +625,7 @@ void Room0::checkFeed() {
 	adi->ani_count = 138;
 
 	ende = false;
-	_G(det)->start_detail(CH_NACH_FUETTERN, 2, VOR);
+	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_VOR);
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -682,7 +670,7 @@ void Room0::checkPillow() {
 
 	ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, VOR);
+	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, ANI_VOR);
 	mode = 0;
 
 	while (!ende) {
@@ -721,7 +709,7 @@ void Room0::checkPillow() {
 
 void Room0::trapDoorOpen() {
 	int16 i;
-	_G(det)->start_detail(FLAP_DETAIL, 1, VOR);
+	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_VOR);
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -742,7 +730,7 @@ void Room0::trapDoorOpen() {
 }
 
 void Room0::trapDoorClose() {
-	_G(det)->start_detail(FLAP_DETAIL, 1, RUECK);
+	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_RUECK);
 
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();


Commit: a5a997dbada28dc159940615de9ef582198dbde1
    https://github.com/scummvm/scummvm/commit/a5a997dbada28dc159940615de9ef582198dbde1
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:33-08:00

Commit Message:
CHEWY: End of review of Room 00

Changed paths:
    engines/chewy/rooms/room00.cpp


diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 3d7991a7ed9..2c58dbc920b 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -416,12 +416,10 @@ void Room0::eyeSlimeBack() {
 }
 
 void Room0::checkSlimeEye() {
-	AniDetailInfo *adi;
-
-	adi = _G(det)->get_ani_detail(CH_WIRFT_SCHLEIM);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(CH_WIRFT_SCHLEIM);
 	adi->ani_count = adi->start_ani;
 	if (adi->load_flag) {
-		_G(det)->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+		_G(det)->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, nullptr);
 	}
 
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
@@ -446,7 +444,7 @@ void Room0::checkSlimeEye() {
 	}
 
 	if (adi->load_flag) {
-		_G(det)->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, 0);
+		_G(det)->del_taf_tbl(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, nullptr);
 	}
 
 	clear_prog_ani();
@@ -454,10 +452,7 @@ void Room0::checkSlimeEye() {
 }
 
 void Room0::feederStart(int16 mode) {
-	AniDetailInfo *adi;
-	bool ende;
-
-	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	if (!mode)
 		adi->ani_count = adi->start_ani;
 	else
@@ -476,7 +471,7 @@ void Room0::feederStart(int16 mode) {
 		g_engine->_sound->playSound(FUETTER_SCHLAUCH, 2);
 	}
 
-	ende = false;
+	bool ende = false;
 	if (_G(spieler).R0SlimeUsed)
 		_G(flags).AniUserAction = true;
 
@@ -489,6 +484,7 @@ void Room0::feederStart(int16 mode) {
 
 		if (_G(flags).AniUserAction)
 			get_user_key(NO_SETUP);
+
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
 
@@ -543,20 +539,17 @@ void Room0::feederExtend() {
 }
 
 void Room0::calcPillowClick(int16 ani_nr) {
-	int16 anz;
-	int16 x, y;
-	int16 i;
-
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
+			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
-			if (str_ != 0) {
+			if (str_ != nullptr) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = _G(minfo).x;
-				y = _G(minfo).y;
+				int16 x = _G(minfo).x;
+				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
-				for (i = 0; i < anz; i++)
+				for (int16 i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
@@ -571,35 +564,36 @@ void Room0::calcPillowClick(int16 ani_nr) {
 }
 
 void Room0::checkFeed() {
-	AniDetailInfo *adi;
-	int16 i;
-	bool ende;
-
-	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 136;
 
-	i = 152;
-	ende = false;
+	int16 i = 152;
+	bool ende = false;
 
 	if (_G(spieler).R0SlimeUsed)
 		_G(flags).AniUserAction = true;
+
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		_G(spr_info)[0].ZEbene = 190;
+
 		if (adi->ani_count == 136) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			if (!_G(spieler).R0SlimeUsed)
 				_G(det)->stop_detail(16);
 		}
+
 		if (adi->ani_count > 138) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 			_G(spr_info)[1].ZEbene = 191;
 		}
+		
 		if (adi->ani_count > 141) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
 			_G(spr_info)[2].ZEbene = 192;
 		}
+
 		if (adi->ani_count == 138) {
 			_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			_G(spr_info)[3].ZEbene = 193;
@@ -623,9 +617,9 @@ void Room0::checkFeed() {
 	}
 
 	adi->ani_count = 138;
+	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_VOR);
 
 	ende = false;
-	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_VOR);
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -635,6 +629,7 @@ void Room0::checkFeed() {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 			_G(spr_info)[1].ZEbene = 191;
 		}
+
 		if (adi->ani_count == 138) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
 			_G(spr_info)[2].ZEbene = 192;
@@ -647,6 +642,7 @@ void Room0::checkFeed() {
 
 		if (!_G(det)->get_ani_status(CH_NACH_FUETTERN))
 			ende = true;
+
 		if (adi->delay_count > 0)
 			--adi->delay_count;
 		else {
@@ -662,21 +658,18 @@ void Room0::checkFeed() {
 }
 
 void Room0::checkPillow() {
-	AniDetailInfo *adi;
-	bool ende, mode;
-
-	adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
 	adi->ani_count = 161;
 
-	ende = false;
+	bool ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, ANI_VOR);
-	mode = 0;
+	bool mode = false;
 
 	while (!ende) {
 		clear_prog_ani();
 		if (!_G(det)->get_ani_status(CH_WIRFT_KISSEN)) {
-			mode = 1;
+			mode = true;
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
@@ -685,10 +678,12 @@ void Room0::checkPillow() {
 		_G(spr_info)[0].ZEbene = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
 		_G(spr_info)[1].ZEbene = 191;
+
 		if (mode) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
 			_G(spr_info)[2].ZEbene = 192;
 		}
+
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 
@@ -708,7 +703,6 @@ void Room0::checkPillow() {
 }
 
 void Room0::trapDoorOpen() {
-	int16 i;
 	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_VOR);
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
@@ -716,7 +710,7 @@ void Room0::trapDoorOpen() {
 	}
 
 	_G(flags).AniUserAction = true;
-	for (i = 0; i < 25; i++) {
+	for (int16 i = 0; i < 25; i++) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 		_G(spr_info)[0].ZEbene = 190;
@@ -740,8 +734,7 @@ void Room0::trapDoorClose() {
 }
 
 void Room0::feederAni() {
-	int16 action;
-	action = false;
+	int16 action = false;
 	feederStart(0);
 
 	if (_G(spieler).R0SlimeUsed) {


Commit: da6eca635e333d1e333d7d2fe4953433772ab710
    https://github.com/scummvm/scummvm/commit/da6eca635e333d1e333d7d2fe4953433772ab710
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:33-08:00

Commit Message:
CHEWY: Set DISPLAY_BOTH mode when subtitles and speech are both on

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/sound.cpp
    engines/chewy/sound.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 366479542eb..0d5e957705f 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -127,13 +127,10 @@ void Atdsys::setHasSpeech(bool hasSpeech) {
 }
 
 void Atdsys::updateSoundSettings() {
-	_atdsv.Display = DISPLAY_TXT;
-
-	if (_hasSpeech) {
-		// TODO: In the future, properly implement DISPLAY_ALL
-		if (!g_engine->_sound->isSpeechMuted())
-			_atdsv.Display = DISPLAY_VOC;
-	}
+	if (!_hasSpeech)
+		_atdsv.Display = DISPLAY_TXT;
+	else
+		_atdsv.Display = g_engine->_sound->getSpeechSubtitlesMode();
 }
 
 int16 Atdsys::get_delay(int16 txt_len) {
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index fa28eed5450..05e456ef027 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -306,6 +306,9 @@ public:
 	void enableEvents(bool nr) {
 		_atdsv._eventsEnabled = nr;
 	}
+	int getAtdDisplay() const {
+		return _atdsv.Display;	
+	}
 
 private:
 	int16 get_delay(int16 txt_len);
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 7f9bdf0ffde..4fcddfcc757 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -271,12 +271,13 @@ void Sound::waitForSpeechToFinish() {
 	}
 }
 
-bool Sound::hasSubtitles() {
-	return ConfMan.getBool("subtitles");
+int Sound::getSpeechSubtitlesMode() const {
+	if (!ConfMan.getBool("subtitles"))
+		return DISPLAY_VOC;
+	else if (!ConfMan.getBool("speech_mute"))
+		return DISPLAY_ALL;
+	else
+		return DISPLAY_TXT;
 }
 
-bool Sound::isSpeechMuted() {
-	return ConfMan.getBool("speech_mute");
-}
-
-}
+} // namespace Chewy
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index d470d7d1557..2e4475d07e0 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -69,15 +69,9 @@ public:
 	void waitForSpeechToFinish();
 
 	/**
-	 * Returns true if subtitles are enabled
+	 * Returns the speech, subtitles mode from the ScummVM config
 	 */
-	bool hasSubtitles();
-
-	/**
-	 * Returns true if speech is muted
-	 */
-	bool isSpeechMuted();
-
+	int getSpeechSubtitlesMode() const;
 
 private:
 	Audio::Mixer *_mixer;
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 5bd5539fd53..5b6e2df346a 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -514,7 +514,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			// WORKAROUND: There are a few cases in the game with no text,
 			// but a voice sample the game would fall back on even in
 			// subtitles only mode. Don't allow this in ScummVM
-			} else if (VocNr >= 0 && !g_engine->_sound->isSpeechMuted()) {
+			} else if (VocNr >= 0 && g_engine->_sound->getSpeechSubtitlesMode() != DISPLAY_TXT) {
 				ret = true;
 				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));


Commit: e7f5c1341ffe17fa45b1eacd561ca57545df40e0
    https://github.com/scummvm/scummvm/commit/e7f5c1341ffe17fa45b1eacd561ca57545df40e0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:33-08:00

Commit Message:
CHEWY: Handle mixed speech and subtitles

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/sound.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 0d5e957705f..cebcc2e768a 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -879,8 +879,8 @@ int16 Atdsys::start_aad(int16 dia_nr) {
 			_aadv.Ptr += sizeof(AadStrHeader);
 			int16 txt_len;
 			aad_get_zeilen(_aadv.Ptr, &txt_len);
-			_aadv.DelayCount = get_delay(txt_len);
-			_printDelayCount1 = _aadv.DelayCount / 10;
+			_aadv._delayCount = get_delay(txt_len);
+			_printDelayCount1 = _aadv._delayCount / 10;
 
 			_atdsv.DiaNr = dia_nr;
 			if (_atdsv.aad_str != nullptr)
@@ -909,9 +909,9 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 				EVENTS_CLEAR;
 
 				if (_mousePush == false) {
-					if (_aadv.SilentCount <= 0 && _aadv.DelayCount > _printDelayCount1) {
+					if (_aadv.SilentCount <= 0 && _aadv._delayCount > _printDelayCount1) {
 						_mousePush = true;
-						_aadv.DelayCount = 0;
+						_aadv._delayCount = 0;
 						_inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
 						_inzeig->kbinfo->key_code = '\0';
 					}
@@ -946,7 +946,7 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 			SplitStringInit tmp_ssi = _ssi[_aadv.StrHeader->AkPerson];
 			_ssr = split_string(&tmp_ssi);
 
-			if (_atdsv.Display == DISPLAY_TXT ||
+			if (_atdsv.Display != DISPLAY_VOC ||
 			        (_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
 				for (int16 i = 0; i < _ssr->Anz; i++) {
 					_G(out)->printxy(_ssr->X[i] + 1,
@@ -969,23 +969,32 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 				}
 				str_null2leer(start_ptr, start_ptr + txt_len - 1);
 
-			} else if (_atdsv.Display == DISPLAY_VOC) {
+			}
+
+			if (_atdsv.Display != DISPLAY_TXT &&
+					(_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) != -1) {
 				if (_atdsv.VocNr != _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
 					_atdsv.VocNr = _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
 					g_engine->_sound->playSpeech(_atdsv.VocNr);
 					int16 vocx = _G(spieler_vector)[_aadv.StrHeader->AkPerson].Xypos[0] -
 								 _G(spieler).scrollx + _G(spieler_mi)[_aadv.StrHeader->AkPerson].HotX;
 					g_engine->_sound->setSoundChannelBalance(0, getStereoPos(vocx));
-					_aadv.DelayCount = 1;
+
+					if (_atdsv.Display == DISPLAY_VOC) {
+						_aadv.StrNr = -1;
+						_aadv._delayCount = 1;
+					}
 				}
 
-				for (int16 i = 0; i < _ssr->Anz; i++) {
-					tmp_ptr += strlen(_ssr->StrPtr[i]) + 1;
+				if (_atdsv.Display != DISPLAY_ALL) {
+					for (int16 i = 0; i < _ssr->Anz; i++) {
+						tmp_ptr += strlen(_ssr->StrPtr[i]) + 1;
+					}
+					str_null2leer(start_ptr, start_ptr + txt_len - 1);
 				}
-				str_null2leer(start_ptr, start_ptr + txt_len - 1);
 			}
 
-			if (_aadv.DelayCount <= 0) {
+			if (_aadv._delayCount <= 0) {
 				_aadv.Ptr = tmp_ptr;
 				while (*tmp_ptr == ' ' || *tmp_ptr == 0)
 					++tmp_ptr;
@@ -1014,19 +1023,19 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 						}
 					}
 					aad_get_zeilen(_aadv.Ptr, &txt_len);
-					_aadv.DelayCount = get_delay(txt_len);
-					_printDelayCount1 = _aadv.DelayCount / 10;
+					_aadv._delayCount = get_delay(txt_len);
+					_printDelayCount1 = _aadv._delayCount / 10;
 					_aadv.SilentCount = _atdsv.Silent;
 				}
 			} else {
-				if (_atdsv.Display == DISPLAY_TXT ||
+				if (_atdsv.Display != DISPLAY_VOC ||
 				        (_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1)
-					--_aadv.DelayCount;
+					--_aadv._delayCount;
 
 				else if (_atdsv.Display == DISPLAY_VOC) {
 					warning("FIXME - unknown constant SMP_PLAYING");
 
-					_aadv.DelayCount = 0;
+					_aadv._delayCount = 0;
 				}
 			}
 		} else {
@@ -1286,7 +1295,7 @@ int16 Atdsys::start_ads_auto_dia(char *item_adr) {
 		_aadv.Ptr += sizeof(AadStrHeader);
 		int16 txt_len;
 		aad_get_zeilen(_aadv.Ptr, &txt_len);
-		_aadv.DelayCount = get_delay(txt_len);
+		_aadv._delayCount = get_delay(txt_len);
 		_atdsv.DiaNr = _adsv.TxtHeader->DiaNr + 10000;
 
 		if (_atdsv.aad_str != nullptr)
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 05e456ef027..92be60d8557 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -165,7 +165,7 @@ struct AadVar {
 	AadInfo *Person;
 	char *Ptr;
 	int16 StrNr;
-	int16 DelayCount;
+	int16 _delayCount;
 	int16 SilentCount;
 };
 
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 4fcddfcc757..0fa16c48329 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -147,25 +147,29 @@ void Sound::setMusicVolume(uint volume) {
 }
 
 void Sound::playSpeech(int num) {
+	// Get the speech data
 	SoundChunk *sound = _speechRes->getSound(num);
-	uint8 *data = (uint8 *)MALLOC(sound->size);
-	memcpy(data, sound->data, sound->size);
+	size_t size = sound->size;
+	uint8 *data = (uint8 *)MALLOC(size);
+	memcpy(data, sound->data, size);
+
+	delete[] sound->data;
+	delete sound;
 
+	// Play it
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-	                                 Audio::makeRawStream(data,
-	                                         sound->size, 22050, Audio::FLAG_UNSIGNED,
-	                                         DisposeAfterUse::YES),
-	                                 1);
+	    Audio::makeRawStream(data, size, 22050, Audio::FLAG_UNSIGNED,
+		DisposeAfterUse::YES), 1);
 
-	_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);
+	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
+		&_speechHandle, stream);
 
-	// Wait for speech to finish
-	while (isSpeechActive() && !SHOULD_QUIT) {
-		set_up_screen(DO_SETUP);
+	if (_G(atds)->getAtdDisplay() == DISPLAY_VOC) {
+		// Wait for speech to finish
+		while (isSpeechActive() && !SHOULD_QUIT) {
+			set_up_screen(DO_SETUP);
+		}
 	}
-
-	delete[] sound->data;
-	delete sound;
 }
 
 void Sound::pauseSpeech() {
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 5b6e2df346a..24c437b3323 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -478,9 +478,14 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	_G(talk_hide_static) = -1;
 	set_ssi_xy();
 	_G(atds)->start_aad(dia_nr);
-	while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
+
+	while (!SHOULD_QUIT && (
+		_G(atds)->aad_get_status() != -1 ||
+		g_engine->_sound->isSpeechActive()
+		)) {
 		set_up_screen(DO_SETUP);
 	}
+
 	_G(maus_links_click) = _G(tmp_maus_links);
 	if (_G(minfo).button)
 		_G(flags).main_maus_flag = 1;


Commit: 5717c8ac5ac53d20ee477a2f5775510b06aff6ac
    https://github.com/scummvm/scummvm/commit/5717c8ac5ac53d20ee477a2f5775510b06aff6ac
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:33-08:00

Commit Message:
CHEWY: Add German credits

Changed paths:
    engines/chewy/dialogs/credits.cpp


diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 6745dec00eb..7f7b9f2d515 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -53,7 +53,7 @@ static const bool CREDITS_TYPE[65] = {
 	false, true, true, true, true
 };
 
-static const char *CREDITS_TEXT[65] = {
+static const char *CREDITS_TEXT_EN[65] = {
 	"Idea & Story:",
 	"Carsten Wieland",
 	"Programming:",
@@ -121,6 +121,74 @@ static const char *CREDITS_TEXT[65] = {
 	"featuring Indhira Mohammed."
 };
 
+static const char *CREDITS_TEXT_DE[65] = {
+	"Idee & Story:",
+	"Carsten Wieland",
+	"Programmierung:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Grafiken & Animationen:",
+	"Carsten Wieland",
+	"Nihat Keesen",
+	"Stefan Frank",
+	"Text & Dialoge:",
+	"Helmut Theuerkauf",
+	"Alexander Diessner",
+	"Carsten Wieland",
+	"Wolfgang Walk",
+	"Musik:",
+	"Carsten Wieland",
+	"Stelter Studios",
+	"Soundeffekte:",
+	"Helmut Theuerkauf",
+	"Produzent & Lektor:",
+	"Wolfgang Walk",
+	"Minister f\x81r Finanzen",
+	"Carsten (Dagobert) Korte",
+	"Tester:",
+	"Lutz Rafflenbeul",
+	"Thomas Friedmann",
+	"Bernhard Ewers",
+	"Christian von der Hotline",
+	"Carsten Korte",
+	"Die Stimmen:",
+	"Chewy......Renier Baaken",
+	"Howard.....Wolfgang Walk",
+	"Nichelle...Indhira Mohammed",
+	"Clint......Alexander Schottky",
+	"In weiteren Rollen:",
+	"Renier Baaken",
+	"Guido B\x94sherz",
+	"Gerhard Fehn",
+	"Alice Krause",
+	"Reinhard Lie\xE1",
+	"Willi Meyer",
+	"Nicole Meister",
+	"Lutz Rafflenbeul",
+	"Alexander Schottky",
+	"Bernd Schulze",
+	"Susanne Simenec",
+	"Helmut Theuerkauf",
+	"Andreas Vogelpoth",
+	"Mark Wagener",
+	"Wolfgang Walk",
+	"Thomas Piet Wiesenm\x81ller",
+	"Die Sprache wurde aufgenommen",
+	"im tmp Studio, Moers von Willi Meyer",
+	"Nachbearbeitung in den Hartmut Stelter",
+	"Studios Hamburg und",
+	"Carsten Wieland",
+	"Soundsystem:",
+	"AIL (c) Miles Design",
+	"Adventure Engine:",
+	"I.C.M. entwickelt von",
+	"New Generation Software",
+	"Song Boo Boo Ba Baby komponiert",
+	"von Haiko Ruttmann,",
+	"Text Wolfgang Walk,",
+	"Gesang Indhira Mohammed."
+};
+
 void Credits::execute() {
 	int lineScrolled = 0;
 	int fontCol;
@@ -183,7 +251,7 @@ void Credits::execute() {
 			stillScrolling = true;
 
 			int fgCol = fontCol + (160 - destY) / 10;
-			_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, _G(scr_width), CREDITS_TEXT[i]);
+			_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, _G(scr_width), g_engine->getLanguage() == Common::Language::DE_DEU ? CREDITS_TEXT_DE[i] : CREDITS_TEXT_EN[i]);
 		}
 
 		if (!stillScrolling)


Commit: c81d3cb5e539a501c8f427a4ef729a8ad8c6d54c
    https://github.com/scummvm/scummvm/commit/c81d3cb5e539a501c8f427a4ef729a8ad8c6d54c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:33-08:00

Commit Message:
CHEWY: Remove the file mode in several functions

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/file.h
    engines/chewy/inits.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room89.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index cebcc2e768a..b6fa5ede743 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -296,8 +296,8 @@ void Atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 	_ssi[nr] = ssinit[0];
 }
 
-Stream *Atdsys::pool_handle(const char *fname, const char *fmode) {
-	Stream *handle = chewy_fopen(fname, fmode);
+Stream *Atdsys::pool_handle(const char *fname) {
+	Stream *handle = chewy_fopen(fname);
 	if (handle) {
 		_atdshandle[ATDS_HANDLE] = handle;
 	} else {
@@ -347,13 +347,13 @@ void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chu
 	}
 }
 
-void Atdsys::open_handle(const char *fname, const char *fmode, int16 mode) {
+void Atdsys::open_handle(const char *fname, int16 mode) {
 	char *tmp_adr = nullptr;
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname, 0, 20000);
 	if (!_G(modul)) {
-		Stream *stream = chewy_fopen(fname, fmode);
+		Stream *stream = chewy_fopen(fname);
 		if (stream) {
 			close_handle(mode);
 			_atdshandle[mode] = stream;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 92be60d8557..23dc7615555 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -260,9 +260,9 @@ public:
 	void load_atds(int16 chunk_nr, int16 mode);
 	void save_ads_header(int16 dia_nr);
 
-	Stream *pool_handle(const char *fname, const char *fmode);
+	Stream *pool_handle(const char *fname);
 	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
-	void open_handle(const char *fname, const char *fmode, int16 mode);
+	void open_handle(const char *fname, int16 mode);
 	void close_handle(int16 mode);
 	void crypt(char *txt, uint32 size);
 	void init_ats_mode(int16 mode, uint8 *atsheader);
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 72e2f24ade1..9097fc19c73 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -55,7 +55,7 @@ void Cinema::execute() {
 	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 	_G(atds)->load_atds(98, 1);
 
-	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(4, &_G(room_blk), 1, 0, GBOOK);
 	show_cur();
 	EVENTS_CLEAR;
@@ -201,7 +201,7 @@ void Cinema::execute() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(room)->open_handle(EPISODE1, "rb", 0);
+	_G(room)->open_handle(EPISODE1, 0);
 	_G(room)->set_ak_pal(&_G(room_blk));
 	hide_cur();
 	_G(uhr)->reset_timer(0, 5);
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 7f7b9f2d515..fd6360fcfbf 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -193,7 +193,7 @@ void Credits::execute() {
 	int lineScrolled = 0;
 	int fontCol;
 
-	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(5, &_G(room_blk), 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
@@ -263,7 +263,7 @@ void Credits::execute() {
 
 	_G(out)->set_fontadr(_G(font8x8));
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvorx8x8));
-	_G(room)->open_handle("back/episode1.tgp", "rb", 0);
+	_G(room)->open_handle("back/episode1.tgp", R_GEPDATEI);
 
 	_G(room)->set_ak_pal(&_G(room_blk));
 	hide_cur();
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 853215f4ca7..4700697e337 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -69,7 +69,7 @@ int16 Files::execute(bool isInGame) {
 	TafInfo *ti = _G(mem)->taf_adr(OPTION_TAF);
 	EVENTS_CLEAR;
 
-	_G(room)->open_handle(GBOOK, "rb", 0);
+	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
 	_G(out)->setze_zeiger(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
@@ -300,7 +300,7 @@ enter:
 
 	free(ti);
 
-	_G(room)->open_handle(EPISODE1, "rb", 0);
+	_G(room)->open_handle(EPISODE1, 0);
 	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 	_G(fx_blend) = BLEND1;
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 3309a02f777..45b4671950b 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -46,8 +46,7 @@ public:
 };
 
 
-inline Stream *chewy_fopen(const char *fname, const char *mode) {
-	assert(!strcmp(mode, "rb"));
+inline Stream *chewy_fopen(const char *fname) {
 	return File::open(fname);
 }
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 52ba778d400..62a551d5606 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -188,7 +188,7 @@ void init_room() {
 	_G(room_blk).AtsLoad = true;
 	strcpy(_G(room_blk).RoomDir, "room/");
 
-	_G(room)->open_handle(EPISODE1_GEP, "rb", R_GEPDATEI);
+	_G(room)->open_handle(EPISODE1_GEP, R_GEPDATEI);
 }
 
 void init_atds() {
@@ -201,7 +201,7 @@ void init_atds() {
 	_G(atds)->close_handle(ATDS_HANDLE);
 
 	// New set up
-	Stream *handle = _G(atds)->pool_handle(ATDS_TXT, "rb");
+	Stream *handle = _G(atds)->pool_handle(ATDS_TXT);
 	_G(atds)->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
 	_G(atds)->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
 	_G(atds)->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
@@ -211,9 +211,9 @@ void init_atds() {
 	_G(atds)->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
 	_G(atds)->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
 	_G(atds)->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
-	_G(atds)->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
+	_G(atds)->open_handle(INV_USE_IDX, INV_IDX_DATEI);
 	_G(mem)->file->fcopy(ADSH_TMP, "txt/diah.adh");
-	_G(atds)->open_handle(ADSH_TMP, "rb", 3);
+	_G(atds)->open_handle(ADSH_TMP, 3);
 	_G(spieler).AadSilent = 10;
 	_G(spieler).DelaySpeed = 5;
 	_G(spieler_vector)[P_CHEWY].Delay = _G(spieler).DelaySpeed;
@@ -379,7 +379,7 @@ void sound_init() {
 	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
 	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
 
-	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
+	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, R_VOCDATEI);
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(_G(music_handle));
 	assert(rs);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 9b75f7f269e..a30b8b7c144 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -159,8 +159,8 @@ Room::~Room() {
 	free_ablage();
 }
 
-Stream *Room::open_handle(const char *fname1, const char *fmode, int16 mode) {
-	Stream *stream = chewy_fopen(fname1, fmode);
+Stream *Room::open_handle(const char *fname1, int16 mode) {
+	Stream *stream = chewy_fopen(fname1);
 	if (stream) {
 		close_handle(mode);
 		_roomHandle[mode] = stream;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 075a20b2722..151c2a16fc0 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -84,7 +84,7 @@ public:
 	Room();
 	~Room();
 
-	Stream *open_handle(const char *fname, const char *fmode, int16 mode);
+	Stream *open_handle(const char *fname, int16 mode);
 	void close_handle(int16 mode);
 	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index a742b82e4d4..b1b8cb367d3 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -110,6 +110,7 @@ void Room89::entry() {
 		// Unsquish out thanks for playing screen
 		_G(out)->setze_zeiger(_G(workptr));
 		_G(out)->cls();
+		// Those strings are also displayed in the the German version
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
 		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Common::KEYCODE_ESCAPE from F5");
 		_G(out)->sprite_save(_G(Ci).TempArea, 0, 0, 320, 200, 320);


Commit: 9700be8e5aa36fb72611f4c371b3cf212246d5f9
    https://github.com/scummvm/scummvm/commit/9700be8e5aa36fb72611f4c371b3cf212246d5f9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index b6fa5ede743..5fd9444fd0a 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -517,18 +517,22 @@ void Atdsys::set_ats_mem(int16 mode) {
 bool Atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
 	*voc_nr = -1;
 	set_ats_mem(mode);
+
 	if (_atsmem) {
 		if (_atsv.Display)
 			stop_ats();
 
 		int16 txt_anz;
 		_atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
+
 		if (_atsv.Ptr) {
 			_atsv.Display = true;
 			char *ptr = _atsv.Ptr;
 			_atsv.TxtLen = 0;
+
 			while (*ptr++ != ATDS_END_TEXT)
 				++_atsv.TxtLen;
+
 			if ((byte)*_atsv.Ptr == 248) {
 				// Special code for no message to display
 				_atsv.Display = false;
@@ -538,14 +542,18 @@ bool Atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, in
 				_atsv.Color = color;
 				_mousePush = true;
 			}
+
 			*voc_nr = _atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
+
 			if ((_atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
 				_atsv.Display = false;
 			}
-		} else
+		} else {
 			_atsv.Display = false;
-	} else
+		}
+	} else {
 		_atsv.Display = false;
+	}
 
 	return _atsv.Display;
 }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 24c437b3323..1cc834715df 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -511,6 +511,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 		if (txt_nr != -1) {
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_START);
+
 			ret = _G(atds)->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
 			if (ret) {
 				while (_G(atds)->ats_get_status() != false && !SHOULD_QUIT)
@@ -528,15 +529,20 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 
 				set_up_screen(DO_SETUP);
 			}
+
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_END);
 		}
+
 		_G(flags).AtsText = false;
 	}
+
 	if (_G(minfo).button)
 		_G(flags).main_maus_flag = 1;
+
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	_G(maus_links_click) = _G(tmp_maus_links);
+
 	return ret;
 }
 


Commit: 097a485ea70ad40554f91aeca2a12ed2061b609b
    https://github.com/scummvm/scummvm/commit/097a485ea70ad40554f91aeca2a12ed2061b609b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Change DISPLAY constants to an enum

Changed paths:
    engines/chewy/atds.h
    engines/chewy/sound.cpp
    engines/chewy/sound.h


diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 23dc7615555..6014214684a 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -22,6 +22,8 @@
 #ifndef CHEWY_ATDS_H
 #define CHEWY_ATDS_H
 
+#include "chewy/file.h"
+
 namespace Chewy {
 
 #define ATDS_VOC_OFFSET 20
@@ -48,9 +50,11 @@ namespace Chewy {
 #define INV_ATS_HANDLE 6
 #define ATDS_HANDLE 7
 
-#define DISPLAY_TXT 0
-#define DISPLAY_VOC 1
-#define DISPLAY_ALL 2
+enum Display {
+	DISPLAY_TXT = 0,
+	DISPLAY_VOC = 1,
+	DISPLAY_ALL = 2
+};
 
 #define MAX_STR_SPLIT 10
 
@@ -89,6 +93,8 @@ namespace Chewy {
 #define ADS_SHOW_BIT 2
 #define ADS_RESTART_BIT 4
 
+struct KbdMouseInfo;
+
 struct AdsDiaHeaders {
 	int16 Anz;
 };
@@ -108,7 +114,7 @@ struct AtdsVar {
 	int16 *Delay = 0;
 	int16 DiaNr = 0;
 
-	uint8 Display = 0;
+	Display Display = DISPLAY_TXT;
 	bool _eventsEnabled = false;
 	int16 VocNr = 0;
 
@@ -260,8 +266,8 @@ public:
 	void load_atds(int16 chunk_nr, int16 mode);
 	void save_ads_header(int16 dia_nr);
 
-	Stream *pool_handle(const char *fname);
-	void set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz);
+	Common::Stream *pool_handle(const char *fname);
+	void set_handle(const char *fname, int16 mode, Common::Stream *handle, int16 chunk_start, int16 chunk_anz);
 	void open_handle(const char *fname, int16 mode);
 	void close_handle(int16 mode);
 	void crypt(char *txt, uint32 size);
@@ -313,7 +319,7 @@ public:
 private:
 	int16 get_delay(int16 txt_len);
 
-	Stream *_atdshandle[MAX_HANDLE] = { nullptr };
+	Common::Stream *_atdshandle[MAX_HANDLE] = { nullptr };
 	char *_atdsmem[MAX_HANDLE] = { nullptr };
 	int16 _atdspooloff[MAX_HANDLE] = { 0 };
 	char *_atsmem = nullptr;
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 0fa16c48329..f31d0e0de05 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -275,7 +275,7 @@ void Sound::waitForSpeechToFinish() {
 	}
 }
 
-int Sound::getSpeechSubtitlesMode() const {
+Display Sound::getSpeechSubtitlesMode() const {
 	if (!ConfMan.getBool("subtitles"))
 		return DISPLAY_VOC;
 	else if (!ConfMan.getBool("speech_mute"))
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index 2e4475d07e0..6267d100897 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -23,6 +23,7 @@
 #define CHEWY_SOUND_H
 
 #include "audio/mixer.h"
+#include "chewy/atds.h"
 #include "chewy/chewy.h"
 
 namespace Chewy {
@@ -71,7 +72,7 @@ public:
 	/**
 	 * Returns the speech, subtitles mode from the ScummVM config
 	 */
-	int getSpeechSubtitlesMode() const;
+	Display getSpeechSubtitlesMode() const;
 
 private:
 	Audio::Mixer *_mixer;


Commit: 995128b467c359e9e4091f1271a34906e52d1219
    https://github.com/scummvm/scummvm/commit/995128b467c359e9e4091f1271a34906e52d1219
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Work on CppCheck warnings

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room40.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 2dc46c9d05c..fad120cffb5 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -248,7 +248,7 @@ void Detail::load_taf_tbl(TafInfo *fti) {
 }
 
 TafInfo *Detail::init_taf_tbl(const char *fname_) {
-	TafInfo *Tt = 0;
+	TafInfo *Tt = nullptr;
 	SpriteResource *res = new SpriteResource(_tafName);
 	int16 anz = res->getChunkCount();
 	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(TafInfo));
@@ -346,11 +346,9 @@ void Detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
 }
 
 void Detail::set_ani(int16 ani_nr, int16 start, int16 end) {
-	if (start > end) {
-		int16 tmp = start;
-		start = end;
-		end = tmp;
-	}
+	if (start > end)
+		SWAP(start, end);
+
 	_rdi.Ainfo[ani_nr].start_ani = start;
 	_rdi.Ainfo[ani_nr].end_ani = end;
 }
@@ -366,8 +364,7 @@ AniDetailInfo *Detail::get_ani_detail(int16 ani_nr) {
 }
 
 int16 *Detail::get_korrektur_tbl() {
-	int16 *ret;
-	ret = _rdi.dptr->korrektur;
+	int16 *ret = _rdi.dptr->korrektur;
 	return ret;
 }
 
@@ -376,8 +373,7 @@ void Detail::init_taf(TafInfo *dptr) {
 }
 
 TafInfo *Detail::get_taf_info() {
-	TafInfo *ret;
-	ret = _rdi.dptr;
+	TafInfo *ret = _rdi.dptr;
 	return ret;
 }
 
@@ -550,9 +546,8 @@ void Detail::get_list(int16 *mv) {
 }
 
 int16 Detail::maus_vector(int16 x, int16 y) {
-	int16 i, j;
-	i = -1;
-	for (j = 0; (j < (MAX_M_ITEMS - 1) << 2) && (i == -1); j += 4) {
+	int16 i = -1;
+	for (int16 j = 0; (j < (MAX_M_ITEMS - 1) << 2) && (i == -1); j += 4) {
 		if (_rdi.mvect[j] != -1) {
 			if ((x >= _rdi.mvect[j]) && (x <= _rdi.mvect[j + 2]) &&
 			        (y >= _rdi.mvect[j + 1]) && (y <= _rdi.mvect[j + 3]))
@@ -614,17 +609,13 @@ void Detail::set_global_delay(int16 delay) {
 }
 
 void Detail::calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom, int16 yzoom) {
-	float tmpx;
-	float tmpy;
-	float tmpx1;
-	float tmpy1;
-	tmpx = (float)(((float) * kx / 100.0) * ((float)xzoom));
-	tmpy = (float)(((float) * ky / 100.0) * ((float)yzoom));
-
-	tmpx1 = tmpx - (int16)tmpx;
+	float tmpx = (float)(((float)*kx / 100.0) * ((float)xzoom));
+	float tmpy = (float)(((float)*ky / 100.0) * ((float)yzoom));
+
+	float tmpx1 = tmpx - (int16)tmpx;
 	if (fabs(tmpx1) > 0.5)
 		++tmpx;
-	tmpy1 = tmpy - (int16)tmpy;
+	float tmpy1 = tmpy - (int16)tmpy;
 	if (fabs(tmpy1) > 0.5)
 		++tmpy;
 	*kx += (int16)tmpx;
@@ -703,11 +694,9 @@ void Detail::clear_room_sound() {
 }
 
 void Detail::remove_unused_samples() {
-	bool found = false;
-
 	for (int16 k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
 		if (_rdi.tvp_index[k] != -1) {
-			found = false;
+			bool found = false;
 			for (int16 i = 0; (i < MAXDETAILS) && (found == false); i++) {
 				for (int16 j = 0; (j < MAX_SOUNDS) && (found == false); j++)
 					if (_rdi.Ainfo[i].sfx.sound_index[j] == k)
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index bc82cd05de1..a5cf81c01d6 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -319,23 +319,6 @@ public:
 extern Globals *g_globals;
 
 #define _G(FIELD) g_globals->_##FIELD
-/*
-extern char *invent_txt;
-extern char *invent_name;
-
-extern int16 ak_invent;
-
-extern maus_info minfo;
-extern kb_info kbinfo;
-extern cur_blk curblk;
-extern cur_ani curani;
-extern iog_init ioptr;
-extern RaumBlk room_blk;
-
-extern Flags flags;
-extern CustomInfo Ci;
-extern GotoPkt gpkt;
-*/
 
 void cursor_wahl(int16 nr);
 
@@ -346,7 +329,7 @@ void show_cur();
 void alloc_buffers();
 void free_buffers();
 
-int16 main_loop(int16 mode);
+bool main_loop(int16 mode);
 
 void set_up_screen(SetupScreenMode mode);
 
@@ -408,7 +391,7 @@ void save_person_rnr();
 
 void set_person_rnr();
 
-int16 is_chewy_busy();
+bool is_chewy_busy();
 
 void standard_init();
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 8966533e6e9..a9ecef9654a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -244,7 +244,6 @@ void show_cur() {
 }
 
 void test_menu() {
-	int16 ende;
 	_G(menu_lauflicht) = 0;
 	_G(inv_disp_ok) = false;
 	_G(spieler).inv_cur = false;
@@ -255,7 +254,7 @@ void test_menu() {
 	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[_G(spieler_vector)[P_CHEWY].Phase];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	_G(spieler_vector)[P_CHEWY].Count = 0;
-	ende = false;
+	bool ende = false;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	_G(flags).main_maus_flag = false;
 	_G(tmp_menu_item) = false;
@@ -268,7 +267,7 @@ void test_menu() {
 	_G(flags).ShowAtsInvTxt = true;
 	enter_room(-1);
 	_G(uhr)->reset_timer(0, 0);
-	while (ende == 0)
+	while (!ende)
 		ende = main_loop(DO_SETUP);
 }
 
@@ -284,9 +283,8 @@ void menu_exit() {
 	_G(FrameSpeed) = 0;
 }
 
-int16 main_loop(int16 mode) {
-	int16 ret;
-	int16 ende = false;
+bool main_loop(int16 mode) {
+	bool ende = false;
 
 	maus_action();
 	if (_G(flags).MainInput) {
@@ -357,7 +355,7 @@ int16 main_loop(int16 mode) {
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			cursor_wahl(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
-				ende = 1;
+				ende = true;
 				_G(fx_blend) = BLEND4;
 			}
 			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
@@ -413,7 +411,7 @@ int16 main_loop(int16 mode) {
 				}
 				break;
 
-			case CUR_SAVE:
+			case CUR_SAVE: {
 				_G(flags).SaveMenu = true;
 				_G(menu_display) = MENU_EINBLENDEN;
 				_G(cur)->move(152, 92);
@@ -424,9 +422,9 @@ int16 main_loop(int16 mode) {
 
 				_G(out)->setze_zeiger(_G(screen0));
 				cursor_wahl(CUR_SAVE);
-				ret = Dialogs::Files::execute(true);
+				int16 ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
-					ende = 1;
+					ende = true;
 					_G(fx_blend) = BLEND4;
 				}
 
@@ -442,6 +440,7 @@ int16 main_loop(int16 mode) {
 
 				_G(flags).SaveMenu = false;
 				_G(cur)->show_cur();
+				}
 				break;
 
 			default:
@@ -480,6 +479,8 @@ int16 main_loop(int16 mode) {
 			}
 			break;
 
+		default:
+			break;
 		}
 
 		if (_G(menu_display) == MENU_AUSBLENDEN) {
@@ -522,10 +523,7 @@ static void showWalkAreas() {
 }
 
 void set_up_screen(SetupScreenMode mode) {
-	int16 nr;
-	int16 tmp;
 	int16 i;
-	int16 *ScrXy;
 	int16 txt_nr;
 
 	bool isMainLoop = mode == DO_MAIN_LOOP;
@@ -629,12 +627,12 @@ void set_up_screen(SetupScreenMode mode) {
 		for (i = 0; i < _G(auto_obj) && !_G(flags).StopAutoObj; i++)
 			mov_objekt(&_G(auto_mov_vector)[i], &_G(auto_mov_obj)[i]);
 
-		nr = _G(obj)->is_iib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
+		int16 nr = _G(obj)->is_iib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 		if (nr != -1) {
 			txt_nr = _G(obj)->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
 		} else {
-			tmp = calc_maus_txt(_G(minfo).x, _G(minfo).y, mode);
+			int16 tmp = calc_maus_txt(_G(minfo).x, _G(minfo).y, mode);
 			if (tmp == -1 || tmp == 255) {
 
 				nr = _G(obj)->is_sib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
@@ -702,7 +700,7 @@ void set_up_screen(SetupScreenMode mode) {
 		showWalkAreas();
 
 	_G(cur_hide_flag) = false;
-	ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
+	int16 *ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 	if (!_G(menu_display))
 		calc_scroll(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 		            _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
@@ -717,12 +715,8 @@ void set_up_screen(SetupScreenMode mode) {
 }
 
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
-	int16 x;
-	int16 y;
-	int16 i;
 	int16 anz = 0;
-	char *str_adr;
-	str_adr = 0;
+	char *str_adr = nullptr;
 
 	if (mode == DO_SETUP) {
 
@@ -733,15 +727,17 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			case INVENTAR_STATIC:
 				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 				break;
-
+			default:
+				break;
 			}
+
 			if (str_adr) {
 				_G(out)->set_fontadr(_G(font8x8));
 				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-				x = _G(minfo).x;
-				y = _G(minfo).y;
+				int16 x = _G(minfo).x;
+				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_adr, anz);
-				for (i = 0; i < anz; i++)
+				for (int16 i = 0; i < anz; i++)
 					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
 			}
 		}
@@ -790,8 +786,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 }
 
 void kb_mov(int16 mode) {
-	int16 ende;
-	ende = 0;
+	bool ende = false;
 	while (!ende) {
 		switch (_G(in)->get_switch_code()) {
 		case Common::KEYCODE_RIGHT:
@@ -815,13 +810,13 @@ void kb_mov(int16 mode) {
 			break;
 
 		default:
-			ende = 1;
+			ende = true;
 			break;
 
 		}
 		_G(cur)->move(_G(minfo).x, _G(minfo).y);
 		if (mode)
-			ende = 1;
+			ende = true;
 		else
 			set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
@@ -866,14 +861,14 @@ void kb_cur_action(int16 key, int16 mode) {
 		}
 		break;
 
+	default:
+		break;
 	}
 }
 
 void maus_action() {
-	int16 x, y;
-
-	x = _G(minfo).x;
-	y = _G(minfo).y;
+	int16 x = _G(minfo).x;
+	int16 y = _G(minfo).y;
 	if (x > invent_display[_G(spieler).InvDisp][0] &&
 	        x < invent_display[_G(spieler).InvDisp][0] + 48 &&
 	        y > invent_display[_G(spieler).InvDisp][1] &&
@@ -923,15 +918,11 @@ void maus_action() {
 }
 
 void obj_auswerten(int16 test_nr, int16 mode) {
-	int16 ret;
-	int16 tmp;
 	int16 ani_nr;
 	int16 txt_nr;
-	int16 sib_ret;
-	int16 action_flag;
-	tmp = _G(spieler).AkInvent;
-	ret = NO_ACTION;
-	action_flag = false;
+	int16 tmp = _G(spieler).AkInvent;
+	int16 ret = NO_ACTION;
+	int16 action_flag = false;
 
 	switch (mode) {
 	case INVENTAR_NORMAL:
@@ -1028,7 +1019,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
 			show_cur();
-			sib_ret = sib_event_no_inv(test_nr);
+			int16 sib_ret = sib_event_no_inv(test_nr);
 
 			_G(obj)->calc_all_static_detail();
 
@@ -1081,14 +1072,14 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 		}
+		break;
+
+	default:
+		break;
 	}
 
 	switch (ret) {
 	case OBJEKT_1:
-		if (mode == INVENTAR_NORMAL)
-			calc_inv_use_txt(test_nr);
-		break;
-
 	case OBJEKT_2:
 		if (mode == INVENTAR_NORMAL)
 			calc_inv_use_txt(test_nr);
@@ -1097,19 +1088,19 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case NO_ACTION:
 		if (mode == STATIC_USE && _G(flags).StaticUseTxt == true)
 			_G(flags).StaticUseTxt = false;
-		else {
-			if (mode != STATIC_USE) {
-				calc_inv_no_use(test_nr, mode);
-			}
-		}
+		else if (mode != STATIC_USE)
+			calc_inv_no_use(test_nr, mode);
+
 		break;
 
+	default:
+		break;
 	}
 }
 
 void swap_if_l(int16 *x1, int16 *x2) {
-	int16 x1_s;
 	if (abs(*x1) < abs(*x2)) {
+		int16 x1_s;
 		if (*x1 < 0)
 			x1_s = 0;
 		else
@@ -1120,11 +1111,9 @@ void swap_if_l(int16 *x1, int16 *x2) {
 	}
 }
 
-void palcopy(byte *dipal, const byte *sipal, int16 distart,
-             int16 sistart, int16 anz) {
-	int16 i, j;
-	j = sistart;
-	for (i = distart; i < distart + anz; i++) {
+void palcopy(byte *dipal, const byte *sipal, int16 distart, int16 sistart, int16 anz) {
+	int16 j = sistart;
+	for (int16 i = distart; i < distart + anz; i++) {
 		dipal[i * 3] = sipal[j * 3];
 		dipal[i * 3 + 1] = sipal[j * 3 + 1];
 		dipal[i * 3 + 2] = sipal[j * 3 + 2];
@@ -1232,22 +1221,19 @@ void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_
 }
 
 bool auto_move(int16 mov_nr, int16 p_nr) {
-	int16 ende;
 	bool move_status = false;
-	int16 key;
-	int16 tmp;
 	if (mov_nr < MAX_AUTO_MOV) {
 		if (!_G(flags).ChAutoMov) {
-			key = false;
+			int16 key = false;
 			move_status = true;
 			_G(flags).ChAutoMov = true;
 			_G(auto_p_nr) = p_nr;
-			tmp = _G(maus_links_click);
+			int16 tmp = _G(maus_links_click);
 			_G(maus_links_click) = false;
 			_G(gpkt).Dx = _G(Rdi)->AutoMov[mov_nr].X -
-			          _G(spieler_mi)[p_nr].HotMovX + _G(spieler_mi)[p_nr].HotX;
+						  _G(spieler_mi)[p_nr].HotMovX + _G(spieler_mi)[p_nr].HotX;
 			_G(gpkt).Dy = _G(Rdi)->AutoMov[mov_nr].Y -
-			          _G(spieler_mi)[p_nr].HotMovY + _G(spieler_mi)[p_nr].HotY;
+						  _G(spieler_mi)[p_nr].HotMovY + _G(spieler_mi)[p_nr].HotY;
 			_G(gpkt).Sx = _G(spieler_vector)[p_nr].Xypos[0] + _G(spieler_mi)[p_nr].HotX;
 			_G(gpkt).Sy = _G(spieler_vector)[p_nr].Xypos[1] + _G(spieler_mi)[p_nr].HotY;
 			_G(gpkt).Breite = _G(room)->_gedXAnz[_G(room_blk).AkAblage];
@@ -1281,7 +1267,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				}
 			}
 			if (_G(flags).ChAutoMov) {
-				ende = 0;
+				bool ende = false;
 				_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 				_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
 				_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
@@ -1304,7 +1290,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 								               p_nr, _G(Rdi)->AutoMov[mov_nr].SprNr);
 							}
 						}
-						ende = 1;
+						ende = true;
 					}
 					set_up_screen(DO_SETUP);
 					SHOULD_QUIT_RETURN0;
@@ -1320,16 +1306,12 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 }
 
 void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
-	int16 move_status;
-	int16 tmp;
-	int16 ende;
-
 	if (!_G(stopAutoMove)[p_nr] &&
-			_G(spieler).PersonRoomNr[p_nr] == _G(spieler).PersonRoomNr[P_CHEWY]) {
-		move_status = true;
-		tmp = _G(maus_links_click);
+	    _G(spieler).PersonRoomNr[p_nr] == _G(spieler).PersonRoomNr[P_CHEWY]) {
+		int16 move_status = true;
+		int16 tmp = _G(maus_links_click);
 		_G(maus_links_click) = false;
-		ende = 0;
+		bool ende = false;
 
 		_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 		_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
@@ -1353,7 +1335,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 						set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
 						               _G(spieler_mi)[p_nr].XyzEnd[1], p_nr, -1);
 					}
-					ende = 1;
+					ende = true;
 				}
 				set_up_screen(DO_SETUP);
 				SHOULD_QUIT_RETURN;
@@ -1365,35 +1347,27 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 }
 
 int16 get_ani_richtung(int16 zustand) {
-	int16 ret;
-	ret = ANI_VOR;
+	int16 ret = ANI_VOR;
 	switch (zustand) {
 	case OBJZU_ZU:
 	case OBJZU_VERSCHLOSSEN:
 		ret = ANI_RUECK;
 		break;
-
+	default:
+		break;
 	}
 	return ret;
 }
 
 int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 	int16 idx;
-	int16 ret;
 	int16 anz;
-	int16 i;
 	int16 txt_nr = 0;
 	int16 txt_mode = 0;
-	int16 ok;
-	bool disp_flag;
-	bool action_flag;
-	int16 action_ret;
-	int16 inv_no_use_mode;
-	int16 r_val;
-	disp_flag = true;
-	action_flag = false;
-	ret = -1;
-	inv_no_use_mode = -1;
+	bool disp_flag = true;
+	bool action_flag = false;
+	int16 ret = -1;
+	int16 inv_no_use_mode = -1;
 
 	if (mode == DO_SETUP) {
 		if (_G(flags).ShowAtsInvTxt) {
@@ -1412,7 +1386,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 				ret = -1;
 
 				if (_G(maus_links_click) && !_G(flags).MausTxt) {
-					ok = true;
+					int16 ok = true;
 					_G(flags).MausTxt = true;
 
 					switch (_G(menu_item)) {
@@ -1438,7 +1412,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 						break;
 					}
 
-					action_ret = 0;
+					int16 action_ret = 0;
 					if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
@@ -1482,7 +1456,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 								else
 									set_person_spr(P_LEFT, P_CHEWY);
 							}
-							r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
+							int16 r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
 							action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 							if (action_flag)
 								ret = txt_nr;
@@ -1501,7 +1475,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 						_G(out)->set_fontadr(_G(font8x8));
 						_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 						calc_txt_xy(&x, &y, str_, anz);
-						for (i = 0; i < anz; i++)
+						for (int16 i = 0; i < anz; i++)
 							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 					}
 				}
@@ -1515,14 +1489,12 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 }
 
 int16 is_mouse_person(int16 x, int16 y) {
-	int16 is_person;
-	int16 i;
 	int16 *xy = nullptr;
 	int16 check;
-	is_person = -1;
+	int16 is_person = -1;
 	if (_G(flags).ShowAtsInvTxt) {
 
-		for (i = 0; i < MAX_PERSON && is_person == -1; i++) {
+		for (int16 i = 0; i < MAX_PERSON && is_person == -1; i++) {
 			if (_G(spieler_mi)[i].Id == NO_MOV_OBJ)
 				check = false;
 			else {
@@ -1530,8 +1502,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 				if (!_G(spz_ani)[i]) {
 					switch (i) {
 					case P_CHEWY:
-						xy = (int16
-						      *)_G(chewy)->image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
+						xy = (int16 *)_G(chewy)->image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
@@ -1542,6 +1513,8 @@ int16 is_mouse_person(int16 x, int16 y) {
 						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
 
+					default:
+						break;
 					}
 				} else
 					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
@@ -1561,15 +1534,11 @@ int16 is_mouse_person(int16 x, int16 y) {
 }
 
 void calc_mouse_person(int16 x, int16 y) {
-	int16 txt_nr;
-	int16 def_nr;
-	int16 dia_nr;
 	int16 mode = 0;
-	int16 p_nr;
 	char ch_txt[MAX_PERSON][9] = {"Chewy", "Howard", "Nichelle"};
-	dia_nr = -1;
+	int16 dia_nr = -1;
 	if (_G(flags).ShowAtsInvTxt && !_G(flags).InventMenu) {
-		p_nr = is_mouse_person(x, y);
+		int16 p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
 			if (!_G(spieler).PersonHide[p_nr]) {
 				_G(out)->set_fontadr(_G(font8x8));
@@ -1578,8 +1547,8 @@ void calc_mouse_person(int16 x, int16 y) {
 				calc_txt_xy(&x, &y, str_, 1);
 				print_shad(x, y, 255, 300, 0, _G(scr_width), str_);
 				if (_G(maus_links_click) == 1) {
-					def_nr = -1;
-					txt_nr = -1;
+					int16 def_nr = -1;
+					int16 txt_nr = -1;
 					if (!_G(spieler).inv_cur) {
 						txt_nr = calc_person_txt(p_nr);
 						switch (_G(menu_item)) {
@@ -1598,6 +1567,8 @@ void calc_mouse_person(int16 x, int16 y) {
 								def_nr = 24;
 								break;
 
+							default:
+								break;
 							}
 							break;
 
@@ -1616,6 +1587,8 @@ void calc_mouse_person(int16 x, int16 y) {
 								def_nr = 23;
 								break;
 
+							default:
+								break;
 							}
 							break;
 
@@ -1669,13 +1642,10 @@ void calc_mouse_person(int16 x, int16 y) {
 }
 
 int16 calc_mouse_mov_obj(int16 *auto_nr) {
-	int16 txt_nr;
-	int16 i;
-	int16 ok;
-	txt_nr = -1;
+	int16 txt_nr = -1;
 	*auto_nr = -1;
-	ok = 0;
-	for (i = 0; i < _G(auto_obj) && !ok; i++) {
+	int16 ok = 0;
+	for (int16 i = 0; i < _G(auto_obj) && !ok; i++) {
 		if (mouse_auto_obj(i, 0, 0)) {
 			ok = 1;
 			txt_nr = _G(mov_phasen)[i].AtsText;
@@ -1687,9 +1657,8 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 }
 
 void calc_ani_timer() {
-	int16 i;
-	for (i = _G(room)->_roomTimer.TimerStart;
-	        i < _G(room)->_roomTimer.TimerStart + _G(room)->_roomTimer.TimerAnz; i++) {
+	for (int16 i = _G(room)->_roomTimer.TimerStart;
+	     i < _G(room)->_roomTimer.TimerStart + _G(room)->_roomTimer.TimerAnz; i++) {
 		if (_G(ani_timer)[i].TimeFlag)
 			timer_action(i);
 	}
@@ -1737,8 +1706,7 @@ void get_user_key(int16 mode) {
 }
 
 void clear_prog_ani() {
-	int16 i;
-	for (i = 0; i < MAX_PROG_ANI; i++) {
+	for (int16 i = 0; i < MAX_PROG_ANI; i++) {
 		_G(spr_info)[i].Image = nullptr;
 		_G(spr_info)[i].ZEbene = 255;
 	}
@@ -1770,13 +1738,11 @@ bool is_cur_inventar(int16 nr) {
 }
 
 void check_mouse_ausgang(int16 x, int16 y) {
-	int16 nr, attr;
 	bool found = true;
 
 	if (_G(menu_item) == CUR_WALK) {
-		nr = _G(obj)->is_exit(x, y);
-		attr = (nr >= 0 && nr < MAX_EXIT) ?
-			_G(spieler).room_e_obj[nr].Attribut : 0;
+		int16 nr = _G(obj)->is_exit(x, y);
+		int16 attr = (nr >= 0 && nr < MAX_EXIT) ? _G(spieler).room_e_obj[nr].Attribut : 0;
 
 		switch (attr) {
 		case AUSGANG_LINKS:
@@ -1812,12 +1778,9 @@ void check_mouse_ausgang(int16 x, int16 y) {
 }
 
 void calc_ausgang(int16 x, int16 y) {
-	int16 nr;
-	int16 u_idx;
-	int16 *ScrXy;
 	if (!_G(flags).ExitMov) {
 		_G(maus_links_click) = false;
-		nr = _G(obj)->is_exit(x, y);
+		int16 nr = _G(obj)->is_exit(x, y);
 		if (nr != -1) {
 			_G(flags).ExitMov = true;
 			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
@@ -1833,16 +1796,16 @@ void calc_ausgang(int16 x, int16 y) {
 				               _G(spieler_mi)[_G(auto_p_nr)].HotMovX,
 				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - _G(spieler_mi)[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
-				ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
+				int16 *ScrXy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 				get_scroll_off(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
 				               _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
 				               ScrXy[0], ScrXy[1],
 				               &_G(spieler).scrollx, &_G(spieler).scrolly);
 
-				u_idx = _G(ged)->ged_idx(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
-				                      _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
-				                      _G(room)->_gedXAnz[_G(room_blk).AkAblage],
-				                      _G(ged_mem)[_G(room_blk).AkAblage]);
+				int16 u_idx = _G(ged)->ged_idx(_G(spieler_vector)[P_CHEWY].Xypos[0] + _G(spieler_mi)[P_CHEWY].HotX,
+				                               _G(spieler_vector)[P_CHEWY].Xypos[1] + _G(spieler_mi)[P_CHEWY].HotY,
+				                               _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+				                               _G(ged_mem)[_G(room_blk).AkAblage]);
 				check_shad(u_idx, 0);
 				set_person_spr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				_G(spieler_vector)[P_CHEWY].DelayCount = 0;
@@ -1862,8 +1825,7 @@ void calc_ausgang(int16 x, int16 y) {
 	}
 }
 
-void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y,
-                    int16 *sc_x, int16 *sc_y) {
+void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y, int16 *sc_x, int16 *sc_y) {
 	if (pic_x == SCREEN_WIDTH)
 		*sc_x = 0;
 	else {
@@ -1892,8 +1854,7 @@ void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y,
 	}
 }
 
-void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
-                 int16 *sc_x, int16 *sc_y) {
+void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y, int16 *sc_x, int16 *sc_y) {
 	if (!_G(flags).NoScroll) {
 		if (!_G(scroll_delay)) {
 
@@ -1925,15 +1886,13 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y,
 }
 
 void auto_scroll(int16 scrx, int16 scry) {
-	int16 ende;
-	int16 tmp_maus_click;
-	tmp_maus_click = _G(maus_links_click);
+	int16 tmp_maus_click = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(spieler).scrollx >>= 1;
 	_G(spieler).scrollx <<= 1;
 	_G(spieler).scrolly >>= 1;
 	_G(spieler).scrolly <<= 1;
-	ende = false;
+	int16 ende = false;
 	while (!ende) {
 		if (scrx < _G(spieler).scrollx)
 			_G(spieler).scrollx -= _G(spieler).ScrollxStep;
@@ -1962,12 +1921,8 @@ void enable_timer() {
 }
 
 void calc_auto_go() {
-	int16 x_offset;
-	int16 y_offset;
-	x_offset =
-	    _G(spieler_mi)[_G(auto_p_nr)].HotMovX + (_G(spieler_mi)[_G(auto_p_nr)].HotX - _G(spieler_mi)[_G(auto_p_nr)].HotMovX - 1);
-	y_offset =
-	    _G(spieler_mi)[_G(auto_p_nr)].HotMovY + (_G(spieler_mi)[_G(auto_p_nr)].HotY - _G(spieler_mi)[_G(auto_p_nr)].HotMovY - 2);
+	int16 x_offset = _G(spieler_mi)[_G(auto_p_nr)].HotMovX + (_G(spieler_mi)[_G(auto_p_nr)].HotX - _G(spieler_mi)[_G(auto_p_nr)].HotMovX - 1);
+	int16 y_offset = _G(spieler_mi)[_G(auto_p_nr)].HotMovY + (_G(spieler_mi)[_G(auto_p_nr)].HotY - _G(spieler_mi)[_G(auto_p_nr)].HotMovY - 2);
 	if (_G(mov)->calc_auto_go(_G(spieler_mi)[_G(auto_p_nr)].XyzStart[0] + x_offset,
 	                       _G(spieler_mi)[_G(auto_p_nr)].XyzStart[1] + y_offset,
 	                       &_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[0],
@@ -1985,8 +1940,7 @@ void calc_auto_go() {
 }
 
 void hide_person() {
-	int16 i;
-	for (i = 0; i < MAX_PERSON; i++) {
+	for (int16 i = 0; i < MAX_PERSON; i++) {
 
 		if (!_G(spieler).PersonHide[i]) {
 			_G(spieler).PersonHide[i] = true;
@@ -1997,8 +1951,7 @@ void hide_person() {
 }
 
 void show_person() {
-	int16 i;
-	for (i = 0; i < MAX_PERSON; i++) {
+	for (int16 i = 0; i < MAX_PERSON; i++) {
 
 		if (_G(person_tmp_hide)[i])
 			_G(spieler).PersonHide[i] = false;
@@ -2006,24 +1959,21 @@ void show_person() {
 }
 
 void save_person_rnr() {
-	int16 i;
-	for (i = 0; i < MAX_PERSON; i++)
+	for (int16 i = 0; i < MAX_PERSON; i++)
 		_G(person_tmp_room)[i] = _G(spieler).PersonRoomNr[i];
 	_G(flags).SavePersonRnr = true;
 }
 
 void set_person_rnr() {
-	int16 i;
 	if (_G(flags).SavePersonRnr) {
-		for (i = 0; i < MAX_PERSON; i++)
+		for (int16 i = 0; i < MAX_PERSON; i++)
 			_G(spieler).PersonRoomNr[i] = _G(person_tmp_room)[i];
 		_G(flags).SavePersonRnr = false;
 	}
 }
 
-int16 is_chewy_busy() {
-	int16 ret;
-	ret = true;
+bool is_chewy_busy() {
+	bool ret = true;
 	if (!_G(atds)->ats_get_status()) {
 		if (_G(atds)->aad_get_status() == -1) {
 			if (_G(atds)->ads_get_status() == -1) {
@@ -2067,15 +2017,13 @@ ChewyFont::ChewyFont(Common::String filename) {
 
 	_fontSurface.create(_dataWidth * _count, _dataHeight, ::Graphics::PixelFormat::createFormatCLUT8());
 
-	byte curr;
 	int bitIndex = 7;
-	byte *p;
 
-	curr = stream.readByte();
+	byte curr = stream.readByte();
 
 	for (uint n = 0; n < _count; n++) {
 		for (uint y = 0; y < _dataHeight; y++) {
-			p = (byte *)_fontSurface.getBasePtr(n * _dataWidth, y);
+			byte *p = (byte *)_fontSurface.getBasePtr(n * _dataWidth, y);
 
 			for (uint x = n * _dataWidth; x < n * _dataWidth + _dataWidth; x++) {
 				*p++ = (curr & (1 << bitIndex)) ? 0 : 0xFF;
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index d659f773970..50bc3629877 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -99,14 +99,15 @@ int16 Room33::use_schublade() {
 void Room33::use_maschine() {
 	int16 dia_nr;
 	int16 ani_nr;
-	bool action = true;
-	bool hocker = false;
 	hide_cur();
 
 	if (!_G(spieler).R33MunterOk) {
 		auto_move(4, P_CHEWY);
 
+		bool hocker = false;
 		if (_G(spieler).inv_cur) {
+			bool action = true;
+
 			switch (_G(spieler).AkInvent) {
 			case MILCH_INV:
 				_G(spieler).R33Munter[3] = true;
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 5984aa2ee23..5e57ae801a6 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -203,11 +203,11 @@ void Room40::move_train(int16 mode) {
 	_G(det)->hide_static_spr(11);
 	_G(det)->hide_static_spr(12);
 
-	if (!mode)
+	if (!mode) {
 		start_aad_wait(207, -1);
-	if (!mode)
 		auto_scroll(180, 0);
-
+	}
+	
 	_G(flags).NoScroll = false;
 	show_cur();
 }


Commit: bf6cee2b9a4970a4c31e5ee8c97044f01739baf5
    https://github.com/scummvm/scummvm/commit/bf6cee2b9a4970a4c31e5ee8c97044f01739baf5
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: More work on CppCheck

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/menus.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index a9ecef9654a..ea5b081eb7e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1311,7 +1311,6 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		int16 move_status = true;
 		int16 tmp = _G(maus_links_click);
 		_G(maus_links_click) = false;
-		bool ende = false;
 
 		_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 		_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
@@ -1323,6 +1322,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		if (_G(spieler_vector)[p_nr].Count)
 			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
 		if (mode == ANI_WAIT) {
+			bool ende = false;
 			while (!ende) {
 				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 					if (_G(flags).ExitMov || _G(flags).BreakAMov) {
@@ -1360,19 +1360,14 @@ int16 get_ani_richtung(int16 zustand) {
 }
 
 int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
-	int16 idx;
-	int16 anz;
-	int16 txt_nr = 0;
 	int16 txt_mode = 0;
-	bool disp_flag = true;
-	bool action_flag = false;
 	int16 ret = -1;
-	int16 inv_no_use_mode = -1;
 
 	if (mode == DO_SETUP) {
 		if (_G(flags).ShowAtsInvTxt) {
-			inv_no_use_mode = AUTO_OBJ;
-			txt_nr = calc_mouse_mov_obj(&idx);
+			int16 inv_no_use_mode = AUTO_OBJ;
+			int16 idx;
+			int16 txt_nr = calc_mouse_mov_obj(&idx);
 
 			if (txt_nr == -1) {
 				idx = _G(det)->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
@@ -1384,6 +1379,8 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 			if (txt_nr != -1) {
 				ret = -1;
+				bool disp_flag = true;
+				bool action_flag = false;
 
 				if (_G(maus_links_click) && !_G(flags).MausTxt) {
 					int16 ok = true;
@@ -1410,6 +1407,9 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					case CUR_TALK:
 						txt_mode = TXT_MARK_TALK;
 						break;
+
+					default:
+						break;
 					}
 
 					int16 action_ret = 0;
@@ -1469,6 +1469,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 				}
 
 				if (disp_flag && !action_flag) {
+					int16 anz;
 					char *str_ = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
 						ret = txt_nr;
@@ -1490,15 +1491,12 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 int16 is_mouse_person(int16 x, int16 y) {
 	int16 *xy = nullptr;
-	int16 check;
 	int16 is_person = -1;
 	if (_G(flags).ShowAtsInvTxt) {
 
 		for (int16 i = 0; i < MAX_PERSON && is_person == -1; i++) {
-			if (_G(spieler_mi)[i].Id == NO_MOV_OBJ)
-				check = false;
-			else {
-				check = true;;
+			if (_G(spieler_mi)[i].Id != NO_MOV_OBJ) {
+				bool check = true;
 				if (!_G(spz_ani)[i]) {
 					switch (i) {
 					case P_CHEWY:
@@ -1507,8 +1505,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 
 					case P_HOWARD:
 					case P_NICHELLE:
-						if (_G(spieler).PersonRoomNr[i] !=
-						        _G(spieler).PersonRoomNr[P_CHEWY])
+						if (_G(spieler).PersonRoomNr[i] != _G(spieler).PersonRoomNr[P_CHEWY])
 							check = false;
 						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
@@ -1548,9 +1545,8 @@ void calc_mouse_person(int16 x, int16 y) {
 				print_shad(x, y, 255, 300, 0, _G(scr_width), str_);
 				if (_G(maus_links_click) == 1) {
 					int16 def_nr = -1;
-					int16 txt_nr = -1;
 					if (!_G(spieler).inv_cur) {
-						txt_nr = calc_person_txt(p_nr);
+						int16 txt_nr = calc_person_txt(p_nr);
 						switch (_G(menu_item)) {
 						case CUR_LOOK:
 							mode = TXT_MARK_LOOK;
@@ -1738,9 +1734,8 @@ bool is_cur_inventar(int16 nr) {
 }
 
 void check_mouse_ausgang(int16 x, int16 y) {
-	bool found = true;
-
 	if (_G(menu_item) == CUR_WALK) {
+		bool found = true;
 		int16 nr = _G(obj)->is_exit(x, y);
 		int16 attr = (nr >= 0 && nr < MAX_EXIT) ? _G(spieler).room_e_obj[nr].Attribut : 0;
 
@@ -1892,7 +1887,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 	_G(spieler).scrollx <<= 1;
 	_G(spieler).scrolly >>= 1;
 	_G(spieler).scrolly <<= 1;
-	int16 ende = false;
+	bool ende = false;
 	while (!ende) {
 		if (scrx < _G(spieler).scrollx)
 			_G(spieler).scrollx -= _G(spieler).ScrollxStep;
@@ -1932,8 +1927,7 @@ void calc_auto_go() {
 		_G(spieler_mi)[_G(auto_p_nr)].XyzStart[1] = _G(spieler_vector)[_G(auto_p_nr)].Xypos[1];
 		_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[0] -= x_offset;
 		_G(spieler_mi)[_G(auto_p_nr)].XyzEnd[1] -= y_offset;
-		_G(mov)->get_mov_vector((int16
-		                     *)_G(spieler_mi)[_G(auto_p_nr)].XyzStart, _G(spieler_mi)[_G(auto_p_nr)].Vorschub, &_G(spieler_vector)[_G(auto_p_nr)])
+		_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[_G(auto_p_nr)].XyzStart, _G(spieler_mi)[_G(auto_p_nr)].Vorschub, &_G(spieler_vector)[_G(auto_p_nr)])
 		;
 		get_phase(&_G(spieler_vector)[_G(auto_p_nr)], &_G(spieler_mi)[_G(auto_p_nr)]);
 	}
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 4474496661a..010317818c8 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -24,16 +24,12 @@
 #include "chewy/globals.h"
 #include "chewy/menus.h"
 #include "chewy/dialogs/inventory.h"
-#include "chewy/rooms/room44.h"
-#include "chewy/rooms/room58.h"
 
 namespace Chewy {
 
 void plot_main_menu() {
 	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
-	int16 i;
 	int16 zoomx, zoomy;
-	int16 *korrektur;
 
 	if (_G(menu_item) != _G(tmp_menu)) {
 		_G(m_flip) = 0;
@@ -41,9 +37,9 @@ void plot_main_menu() {
 	}
 
 	maus_mov_menu();
-	korrektur = (int16 *)_G(menutaf)->korrektur;
+	int16 *korrektur = (int16 *)_G(menutaf)->korrektur;
 
-	for (i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
+	for (int16 i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
 
 		if (i <= 8) {
@@ -98,20 +94,15 @@ void maus_mov_menu() {
 
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 	int16 vorx, vory, fntbr, fnth;
-	int16 len;
-	int16 pix_len;
-	int16 tmp_len;
-	int16 i;
 	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
-	len = 0;
-	for (i = 0; i < txt_anz; i++) {
-
-		tmp_len = strlen(_G(txt)->str_pos((char *)txt_adr, i));
+	int16 len = 0;
+	for (int16 i = 0; i < txt_anz; i++) {
+		int16 tmp_len = strlen(_G(txt)->str_pos((char *)txt_adr, i));
 		if (tmp_len > len)
 			len = tmp_len;
 	}
 	len = len * vorx;
-	pix_len = len / 2;
+	int16 pix_len = len / 2;
 	*x = *x - pix_len + 12;
 	if (*x > (SCREEN_WIDTH - len))
 		*x = SCREEN_WIDTH - len;
@@ -123,13 +114,11 @@ void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 }
 
 void get_display_xy(int16 *x, int16 *y, int16 nr) {
-	int16 *xy;
-	int16 x1, y1;
-	xy = (int16 *)_G(inv_spr)[nr];
-	x1 = 48 - xy[0];
+	int16 *xy = (int16 *)_G(inv_spr)[nr];
+	int16 x1 = 48 - xy[0];
 	x1 /= 2;
 	*x = x1;
-	y1 = 48 - xy[1];
+	int16 y1 = 48 - xy[1];
 	y1 /= 2;
 	*y = y1;
 }
@@ -147,13 +136,8 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 #define BAU_MENU_OBEN_R 24
 #define BAU_MENU_OBEN_M 25
 	int16 i, j;
-	int16 leer;
-	int16 mitte;
-	int16 s_nr;
 	int16 xy[4][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
-	uint8 sprite_eckenr[4] = {BAU_MENU_ECKE_LO, BAU_MENU_ECKE_RO,
-	                         BAU_MENU_ECKE_LU, BAU_MENU_ECKE_RU
-	                        };
+	uint8 sprite_eckenr[4] = { BAU_MENU_ECKE_LO, BAU_MENU_ECKE_RO, BAU_MENU_ECKE_LU, BAU_MENU_ECKE_RU };
 
 	xy[0][0] = x;
 	xy[0][1] = y;
@@ -168,7 +152,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		_G(out)->sprite_set(_G(menutaf)->image[(int16)sprite_eckenr[i]],
 		                 xy[i][0], xy[i][1], _G(scr_width));
 
-	s_nr = BAU_MENU_SEITE_L;
+	int16 s_nr = BAU_MENU_SEITE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yanz - 2; i++) {
@@ -182,16 +166,15 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xanz - 2; i++) {
-				_G(out)->sprite_set(_G(menutaf)->image[s_nr],
-				                 xy[2][0] + 16 + i * 16, xy[j * 2][1], _G(scr_width));
+				_G(out)->sprite_set(_G(menutaf)->image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
 		s_nr -= 3;
 	}
 
 	if (mode) {
-		leer = 0;
-		mitte = 0;
+		int16 leer = 0;
+		int16 mitte;
 		i = xanz - 7;
 		if (i == 0)
 			mitte = 1;
@@ -208,33 +191,25 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN],
-				                 x + i * 16, xy[0][1], _G(scr_width));
+				_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN], x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
-		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_L],
-		                 xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
+		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < mitte; i++)
-			_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_M],
-			                 x + i * 16, xy[0][1], _G(scr_width));
-		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_R],
-		                 x + i * 16, xy[0][1], _G(scr_width));
+			_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_M], x + i * 16, xy[0][1], _G(scr_width));
+		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_R], x + i * 16, xy[0][1], _G(scr_width));
 	}
 
-	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
-	               xy[0][1] + 16 + (yanz - 2) * 16, col);
+	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16, xy[0][1] + 16 + (yanz - 2) * 16, col);
 }
 
 void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, int16 mode) {
-	int16 x_pix;
 	int16 tmp;
-	int16 tmp1;
-	int16 i;
 
-	x_pix = 0;
-	for (i = 0; i < zeilen_anz; i++) {
+	int16 x_pix = 0;
+	for (int16 i = 0; i < zeilen_anz; i++) {
 		tmp = strlen(_G(txt)->str_pos(text, i));
 		if (x_pix < tmp)
 			x_pix = tmp;
@@ -244,7 +219,7 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 	tmp = x_pix;
 	if (x_pix % 16)
 		tmp += 16;
-	tmp1 = zeilen_anz * hoehe + 6 + 11;
+	int16 tmp1 = zeilen_anz * hoehe + 6 + 11;
 	if (tmp1 % 16)
 		tmp1 += 16;
 	*x -= ((tmp / 16) * 16) / 2;
@@ -257,11 +232,8 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 #define ADS_WIN 0,153,20,3,60,1
 
 void ads_menu() {
-	int16 i;
-	int16 cur_y;
 	int16 cur_y_start;
 	int16 col;
-	AdsNextBlk *an_blk;
 
 	if (_G(flags).AdsDialog) {
 		_G(flags).ShowAtsInvTxt = false;
@@ -270,7 +242,7 @@ void ads_menu() {
 			cur_y_start = 190;
 		else
 			cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
-		cur_y = _G(minfo).y;
+		int16 cur_y = _G(minfo).y;
 		if (cur_y < 160 || cur_y > cur_y_start + 10)
 			cur_y = 255;
 		else
@@ -287,7 +259,7 @@ void ads_menu() {
 				cur_y_start = 190;
 			else
 				cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
-			for (i = 0; i < _G(ads_item_anz) && i < 4; i++) {
+			for (int16 i = 0; i < _G(ads_item_anz) && i < 4; i++) {
 				if (cur_y == i)
 					col = 255;
 				else
@@ -303,7 +275,7 @@ void ads_menu() {
 				_G(cur_display) = false;
 				_G(ads_push) = true;
 				_G(minfo).y = 159;
-				an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
+				AdsNextBlk *an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
 				if (an_blk->BlkNr == -1) {
 					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					ads_ende(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
@@ -356,14 +328,12 @@ void cur_2_inventory() {
 }
 
 void inventory_2_cur(int16 nr) {
-	if (_G(spieler).AkInvent == -1) {
-		if (_G(obj)->check_inventar(nr)) {
-			del_invent_slot(nr);
-			_G(menu_item) = CUR_USE;
-			_G(spieler).AkInvent = nr;
-			cursor_wahl(CUR_AK_INVENT);
-			get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
-		}
+	if (_G(spieler).AkInvent == -1 && _G(obj)->check_inventar(nr)) {
+		del_invent_slot(nr);
+		_G(menu_item) = CUR_USE;
+		_G(spieler).AkInvent = nr;
+		cursor_wahl(CUR_AK_INVENT);
+		get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 	}
 }
 
@@ -374,10 +344,8 @@ void new_invent_2_cur(int16 inv_nr) {
 }
 
 void invent_2_slot(int16 nr) {
-	int16 i;
-	int16 ok;
-	ok = 0;
-	for (i = 0; i < MAX_MOV_OBJ && !ok; i++) {
+	int16 ok = 0;
+	for (int16 i = 0; i < MAX_MOV_OBJ && !ok; i++) {
 		if (_G(spieler).InventSlot[i] == -1) {
 			_G(spieler).InventSlot[i] = nr;
 			ok = true;
@@ -387,10 +355,8 @@ void invent_2_slot(int16 nr) {
 }
 
 int16 del_invent_slot(int16 nr) {
-	int16 i;
-	int16 ok;
-	ok = -1;
-	for (i = 0; i < MAX_MOV_OBJ; i++) {
+	int16 ok = -1;
+	for (int16 i = 0; i < MAX_MOV_OBJ; i++) {
 		if (_G(spieler).InventSlot[i] == nr) {
 			_G(spieler).InventSlot[i] = -1;
 			if (ok == -1)


Commit: 7da7a2781e8b828fadd8ba3d10d0c3c3c2702909
    https://github.com/scummvm/scummvm/commit/7da7a2781e8b828fadd8ba3d10d0c3c3c2702909
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Fix compilation with new video code

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index e20864bceb8..0e1e56df38d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -978,7 +978,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(nr);
+				g_engine->playVideo(nr);
 #endif
 			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 			break;
@@ -993,7 +993,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(nr);
+				g_engine->playVideo(nr);
 #endif
 			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 			break;
@@ -1072,7 +1072,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(nr);
+				g_engine->playVideo(nr);
 #endif
 			}
 			break;
@@ -1085,8 +1085,8 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(nr);
-			playVideo(nr);
+			g_engine->playVideo(nr);
+			g_engine->playVideo(nr);
 #endif
 			_G(sndPlayer)->setMusicMasterVol(5);
 			break;
@@ -1106,7 +1106,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(FLIC_CUT_133[i]);
+				g_engine->playVideo(FLIC_CUT_133[i]);
 #endif
 				if (i == 0 || i == 1) {
 					_G(out)->setze_zeiger(nullptr);
@@ -1138,7 +1138,7 @@ void flic_cut(int16 nr, int16 mode) {
 					ret = _G(flc)->custom_play(&_G(Ci));
 					SHOULD_QUIT_RETURN;
 #else
-					playVideo(i + 3);
+					g_engine->playVideo(i + 3);
 #endif
 				}
 			}
@@ -1152,7 +1152,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 6);
+				g_engine->playVideo(i + 6);
 #endif
 			}
 			break;
@@ -1164,7 +1164,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 9);
+				g_engine->playVideo(i + 9);
 #endif
 			}
 			break;
@@ -1177,7 +1177,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 12);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(i + 12);
+				g_engine->playVideo(i + 12);
 #endif
 			}
 
@@ -1201,7 +1201,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 15);
+				g_engine->playVideo(i + 15);
 #endif
 			}
 			break;
@@ -1221,7 +1221,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(FLIC_CUT_1045[i]);
+				g_engine->playVideo(FLIC_CUT_1045[i]);
 #endif
 
 				if (FLIC_CUT_1045[i] == 53) {
@@ -1239,7 +1239,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 43);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(43);
+				g_engine->playVideo(43);
 #endif
 			}
 			break;
@@ -1249,7 +1249,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 50);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(50);
+			g_engine->playVideo(50);
 #endif
 
 			if (ret != -1) {
@@ -1259,7 +1259,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 48);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(48);
+				g_engine->playVideo(48);
 #endif
 			}
 			if (ret != -1) {
@@ -1267,7 +1267,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 49);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(49);
+				g_engine->playVideo(49);
 #endif
 			}
 
@@ -1282,7 +1282,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			playVideo(nr);
+			g_engine->playVideo(nr);
 #endif
 			break;
 
@@ -1294,7 +1294,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 55);
+				g_engine->playVideo(i + 55);
 #endif
 			}
 
@@ -1314,7 +1314,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 58);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(58);
+			g_engine->playVideo(58);
 #endif
 
 			if (ret != -1) {
@@ -1322,7 +1322,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 59);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(59);
+				g_engine->playVideo(59);
 #endif
 			}
 			if (ret != -1) {
@@ -1330,7 +1330,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 60);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(60);
+				g_engine->playVideo(60);
 #endif
 			}
 			if (ret != -1) {
@@ -1339,7 +1339,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 61);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(61);
+				g_engine->playVideo(61);
 #endif
 			}
 			if (ret != -1) {
@@ -1348,7 +1348,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 62);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(62);
+				g_engine->playVideo(62);
 #endif
 			}
 			break;
@@ -1364,7 +1364,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 65);
+				g_engine->playVideo(i + 65);
 #endif
 			}
 			break;
@@ -1374,7 +1374,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 68);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(68);
+			g_engine->playVideo(68);
 #endif
 
 			if (ret != -1) {
@@ -1384,7 +1384,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(70);
+				g_engine->playVideo(70);
 #endif
 			}
 			break;
@@ -1394,7 +1394,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 69);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(69);
+			g_engine->playVideo(69);
 #endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
@@ -1403,7 +1403,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 71);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(i + 71);
+				g_engine->playVideo(i + 71);
 #endif
 			}
 			break;
@@ -1418,7 +1418,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + FLIC_CUT_1074[i]);
+				g_engine->playVideo(i + FLIC_CUT_1074[i]);
 #endif
 			}
 			break;
@@ -1431,7 +1431,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(FLIC_CUT_1080[i]);
+				g_engine->playVideo(FLIC_CUT_1080[i]);
 #endif
 			}
 			break;
@@ -1441,7 +1441,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 87);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(87);
+			g_engine->playVideo(87);
 #endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
@@ -1451,7 +1451,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(i + 102);
+				g_engine->playVideo(i + 102);
 #endif
 			}
 			break;
@@ -1461,7 +1461,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 88);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(88);
+			g_engine->playVideo(88);
 #endif
 
 			if (ret != -1) {
@@ -1470,7 +1470,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 86);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				playVideo(86);
+				g_engine->playVideo(86);
 #endif
 				_G(sndPlayer)->stopMod();
 			}
@@ -1502,7 +1502,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(FLIC_CUT_1106[i]);
+				g_engine->playVideo(FLIC_CUT_1106[i]);
 #endif
 			}
 			break;
@@ -1512,7 +1512,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_107);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(107);
+			g_engine->playVideo(107);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1531,7 +1531,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 108);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(108);
+			g_engine->playVideo(108);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1542,7 +1542,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			playVideo(115);
+			g_engine->playVideo(115);
 #endif
 			break;
 
@@ -1555,7 +1555,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 110);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			playVideo(110);
+			g_engine->playVideo(110);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1566,9 +1566,9 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
-			ailsnd->setMusicMasterVol(63);
+			_G(sndPlayer)->setMusicMasterVol(63);
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			playVideo(112);
+			g_engine->playVideo(112);
 #endif
 			_G(sndPlayer)->stopMod();
 			break;
@@ -1581,7 +1581,7 @@ void flic_cut(int16 nr, int16 mode) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				playVideo(FLIC_CUT_1113[i]);
+				g_engine->playVideo(FLIC_CUT_1113[i]);
 #endif
 			}
 			break;
@@ -1595,7 +1595,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 #else
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			playVideo(119);
+			g_engine->playVideo(119);
 #endif
 			break;
 
@@ -1616,7 +1616,7 @@ void flic_cut(int16 nr, int16 mode) {
 			}
 
 #else
-			playVideo(nr < 1000 ? nr : nr - 1000);
+			g_engine->playVideo(nr < 1000 ? nr : nr - 1000);
 #endif
 
 			break;


Commit: 4dfc0ffeea392fad64bb844b14c213937bcb42a1
    https://github.com/scummvm/scummvm/commit/4dfc0ffeea392fad64bb844b14c213937bcb42a1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Fixes regarding the video skipping flag

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 0e1e56df38d..c909087dba2 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1081,7 +1081,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->setMusicMasterVol(32);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			ret = _G(flc)->custom_play(&_G(Ci));
+			_G(flc)->custom_play(&_G(Ci));
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->custom_play(&_G(Ci));
 #else
@@ -1100,7 +1100,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 		case FCUT_133:
 		case 1123:
-			for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
+			for (i = 0; i < 13 && ret != -1 && !_G(modul); ++i) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_133[i]);
 				ret = _G(flc)->custom_play(&_G(Ci));
@@ -1237,7 +1237,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 43);
-				ret = _G(flc)->custom_play(&_G(Ci));
+				_G(flc)->custom_play(&_G(Ci));
 #else
 				g_engine->playVideo(43);
 #endif
@@ -1381,7 +1381,7 @@ void flic_cut(int16 nr, int16 mode) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 70);
-				ret = _G(flc)->custom_play(&_G(Ci));
+				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				g_engine->playVideo(70);


Commit: 26139fd227ef3d6917e09758ac2baee28565629c
    https://github.com/scummvm/scummvm/commit/26139fd227ef3d6917e09758ac2baee28565629c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:34-08:00

Commit Message:
CHEWY: Rename setze_zeiger -> set_pointer

Changed paths:
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/flic.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 9097fc19c73..bffcd9a5e8c 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -63,7 +63,7 @@ void Cinema::execute() {
 
 	for (bool endLoop = false; !endLoop;) {
 		timer_nr = 0;
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
@@ -161,7 +161,7 @@ void Cinema::execute() {
 		case Common::KEYCODE_RETURN:
 			hide_cur();
 			_G(out)->cls();
-			_G(out)->setze_zeiger(_G(screen0));
+			_G(out)->set_pointer(_G(screen0));
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			print_rows(546 + topIndex);
 
@@ -189,7 +189,7 @@ void Cinema::execute() {
 
 			if (flag) {
 				flag = false;
-				_G(out)->setze_zeiger(_G(screen0));
+				_G(out)->set_pointer(_G(screen0));
 				_G(room)->set_ak_pal(&_G(room_blk));
 				_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			} else {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index fd6360fcfbf..e80b2c4c955 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -197,7 +197,7 @@ void Credits::execute() {
 	_G(room)->load_tgp(5, &_G(room_blk), 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_pointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
@@ -219,7 +219,7 @@ void Credits::execute() {
 			break;
 
 		// Display the starfield background
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 			_G(spieler).scrollx, _G(spieler).scrolly);
 
@@ -257,7 +257,7 @@ void Credits::execute() {
 		if (!stillScrolling)
 			break;
 
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->back2screen(_G(workpage));
 	}
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 4700697e337..197e86241bd 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -71,15 +71,15 @@ int16 Files::execute(bool isInGame) {
 
 	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_pointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	fnames = _G(iog)->io_init(&_G(ioptr));
 	fnames += 1;
  
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	show_cur();
 
 	if (!_G(modul)) {
@@ -272,13 +272,13 @@ enter:
 					}
 				} else if (mode[SAVE]) {
 					_G(out)->back2screen(_G(workpage));
-					_G(out)->setze_zeiger(_G(screen0));
+					_G(out)->set_pointer(_G(screen0));
 					_G(in)->alter_kb_handler();
 					tmp = fnames + ((text_off + active_slot) * 40);
 					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
 						255, 42, 14, 0, "%36s36", tmp);
 					_G(in)->neuer_kb_handler(&_G(kbinfo));
-					_G(out)->setze_zeiger(_G(workptr));
+					_G(out)->set_pointer(_G(workptr));
 					if (key != Common::KEYCODE_ESCAPE) {
 						_G(iog)->save_entry(text_off + active_slot,
 							_G(ioptr).save_path);
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 49d55bfe323..5afc5009549 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -54,7 +54,7 @@ void Inventory::plot_menu() {
 	int16 *xy;
 	int16 x, y;
 	int16 x1, y1;
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	build_menu(WIN_INVENTAR);
 
 	for (j = 0; j < 3; j++) {
@@ -380,7 +380,7 @@ void Inventory::menu() {
 			}
 			if (menu_flag1 == false)
 				_G(cur)->plot_cur();
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
 				_G(fx)->blende1(_G(workptr), _G(screen0), 0, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
@@ -693,11 +693,11 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = 0;
 
 	_G(room)->load_tgp(DIARY_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(out)->back2screen(_G(workpage));
 	_G(room)->set_ak_pal(&_G(room_blk));
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
@@ -714,7 +714,7 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
 	Dialogs::Inventory::plot_menu();
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 }
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index febc013c930..9524789c3f8 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -93,7 +93,7 @@ void MainMenu::execute() {
 
 		case MM_VIEW_INTRO:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			_G(out)->setze_zeiger(_G(workptr));
+			_G(out)->set_pointer(_G(workptr));
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(135, CFO_MODE);
 			break;
@@ -112,7 +112,7 @@ void MainMenu::execute() {
 			break;
 
 		case MM_QUIT:
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			done = true;
 			break;
@@ -151,13 +151,13 @@ void MainMenu::animate() {
 	}
 
 	++_G(FrameSpeed);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (_G(SetUpScreenFunc) && !_G(menu_display) && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 	}
 
 	sprite_engine();
@@ -166,7 +166,7 @@ void MainMenu::animate() {
 	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(out)->back2screen(_G(workpage));
 
 	g_screen->update();
@@ -231,7 +231,7 @@ void MainMenu::startGame() {
 bool MainMenu::loadGame() {
 	_G(flags).SaveMenu = true;
 	savePersonAni();
-	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_pointer(_G(screen0));
 	_G(out)->set_fontadr(_G(font6x8));
 	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 	cursor_wahl(CUR_SAVE);
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 3eb316006de..35e9b383c5b 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -58,13 +58,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
 void Options::execute(TafInfo *ti) {
 	long akt_clock = 0, stop_clock = 0;
 	_G(room)->load_tgp(0, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_pointer(_G(screen0));
 
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
 	int16 mund_ani = MUND_START;
@@ -255,12 +255,12 @@ void Options::execute(TafInfo *ti) {
 	}
 
 	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->setze_zeiger(_G(screen0));
+	_G(out)->set_pointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 2f6be7a8ac9..8558c77083c 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -53,9 +53,9 @@ void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
 				x = rnd_zeiger[i] * 8;
-			_G(out)->setze_zeiger(sram_speicher);
+			_G(out)->set_pointer(sram_speicher);
 			_G(out)->sprite_save(sp, x, y, 8, 8, 0);
-			_G(out)->setze_zeiger(screen);
+			_G(out)->set_pointer(screen);
 			_G(out)->sprite_set(sp, x, y, 0);
 		}
 		free(sp);
@@ -85,27 +85,27 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 			for (i = 13; i >= 0; i--) {
 				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 				}
 				for (y = i; y < 24 - i; y++) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 				}
 				for (x1 = 39 - i; x1 > i; x1--) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
 				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
 			}
@@ -115,27 +115,27 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 			for (i = 0; i < 13; i++) {
 				int16 x, y, x1;
 				for (x = i; x < 39 - i; x++) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 				}
 				for (y = i; y < 24 - i; y++) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 				}
 				for (x1 = 39 - i; x1 > i; x1--) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 				}
 				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					_G(out)->setze_zeiger(sram_speicher);
+					_G(out)->set_pointer(sram_speicher);
 					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					_G(out)->setze_zeiger(screen);
+					_G(out)->set_pointer(screen);
 					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 				}
 			}
@@ -151,14 +151,14 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	if (mode) {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->set_pointer(workpage_ + 4);
 			_G(out)->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
 			_G(out)->box_fill(x + 160, 0, x + 168, 200, farbe);
 			_G(out)->back2screen(workpage_);
 		}
 	} else {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			_G(out)->setze_zeiger(workpage_ + 4);
+			_G(out)->set_pointer(workpage_ + 4);
 			_G(out)->box_fill(x, 0, x + 8, 200, farbe);
 			_G(out)->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
 			_G(out)->back2screen(workpage_);
@@ -169,14 +169,14 @@ void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 void Effect::spr_blende(byte *wrkPage, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
-			_G(out)->setze_zeiger(wrkPage + 4);
+			_G(out)->set_pointer(wrkPage + 4);
 			_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
 			_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
 			_G(out)->back2screen(wrkPage);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
-			_G(out)->setze_zeiger(wrkPage + 4);
+			_G(out)->set_pointer(wrkPage + 4);
 			_G(out)->box_fill(0, i, 320, i + 8, col);
 			_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
 			_G(out)->back2screen(wrkPage);
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 8532f342f7a..7f101e82f62 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -207,9 +207,9 @@ int16 Flic::decode_frame() {
 				break;
 
 			case CLS:
-				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->set_pointer(_virtScreen);
 				_G(out)->cls();
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 
 				update_flag = true;
 				break;
@@ -232,9 +232,9 @@ int16 Flic::decode_frame() {
 		}
 		if (update_flag != false) {
 			if (_flicUser) {
-				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->set_pointer(_virtScreen);
 				action_ret = _flicUser(_currentFrame);
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 			}
 			_G(out)->back2screen(_virtScreen - 4);
 			if (_fadeFlag != false) {
@@ -612,9 +612,9 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case CLEAR_SCREEN:
-			_G(out)->setze_zeiger(_virtScreen);
+			_G(out)->set_pointer(_virtScreen);
 			_G(out)->cls();
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			break;
 
@@ -662,9 +662,9 @@ int16 Flic::decode_cframe() {
 				break;
 
 			case CLS:
-				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->set_pointer(_virtScreen);
 				_G(out)->cls();
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 
 				update_flag = true;
 				break;
@@ -692,9 +692,9 @@ int16 Flic::decode_cframe() {
 		if (update_flag != false) {
 			if (_customUser) {
 				_G(out)->back2back(_virtScreen, _loadBuffer);
-				_G(out)->setze_zeiger(_virtScreen);
+				_G(out)->set_pointer(_virtScreen);
 				action_ret = _customUser(_currentFrame);
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 				_G(out)->back2screen(_virtScreen - 4);
 				_G(out)->back2back(_loadBuffer, _virtScreen);
 			} else
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index ea5b081eb7e..26af5d48502 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -350,7 +350,7 @@ bool main_loop(int16 mode) {
 		case Common::KEYCODE_F6:
 			_G(flags).SaveMenu = true;
 
-			_G(out)->setze_zeiger(_G(screen0));
+			_G(out)->set_pointer(_G(screen0));
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 			cursor_wahl(CUR_SAVE);
@@ -365,7 +365,7 @@ bool main_loop(int16 mode) {
 			_G(cur_display) = true;
 			_G(flags).SaveMenu = false;
 			_G(cur)->show_cur();
-			_G(out)->setze_zeiger(_G(workptr));
+			_G(out)->set_pointer(_G(workptr));
 			break;
 
 		case Common::KEYCODE_ESCAPE:
@@ -420,7 +420,7 @@ bool main_loop(int16 mode) {
 				_G(out)->set_fontadr(_G(font6x8));
 				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 
-				_G(out)->setze_zeiger(_G(screen0));
+				_G(out)->set_pointer(_G(screen0));
 				cursor_wahl(CUR_SAVE);
 				int16 ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
@@ -428,7 +428,7 @@ bool main_loop(int16 mode) {
 					_G(fx_blend) = BLEND4;
 				}
 
-				_G(out)->setze_zeiger(_G(workptr));
+				_G(out)->set_pointer(_G(workptr));
 				_G(menu_item) = _G(tmp_menu_item);
 				_G(menu_display) = MENU_AUSBLENDEN;
 
@@ -540,7 +540,7 @@ void set_up_screen(SetupScreenMode mode) {
 		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
 	++_G(FrameSpeed);
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
@@ -548,7 +548,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 	}
 
 	sprite_engine();
@@ -667,7 +667,7 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(maus_links_click) = false;
 	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		switch (_G(fx_blend)) {
 		case BLEND1:
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
@@ -682,9 +682,9 @@ void set_up_screen(SetupScreenMode mode) {
 			break;
 
 		case BLEND4:
-			_G(out)->setze_zeiger(_G(workptr));
+			_G(out)->set_pointer(_G(workptr));
 			_G(out)->cls();
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 4a7fea13162..e4ce90e9973 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -39,16 +39,6 @@ void init_mcga() {
 	_G(spriteWidth) = 0;
 }
 
-void set_pointer(byte *ptr) {
-	if (ptr) {
-		_G(currentScreen) = ptr;
-	} else if (_G(screenHasDefault)) {
-		_G(currentScreen) = _G(screenDefaultP);
-	} else {
-		_G(currentScreen) = (byte *)g_screen->getPixels();
-	}
-}
-
 byte *get_dispoff() {
 	return SCREEN;
 }
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 899b643d372..4b21ccaf3d7 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -29,7 +29,6 @@ namespace Chewy {
 
 void init_mcga();
 
-void set_pointer(byte *ptr);
 byte *get_dispoff();
 
 void setScummVMPalette(const byte *palette, uint start, uint count);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 95536d999db..37a72740856 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -57,8 +57,14 @@ void McgaGraphics::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	_G(clipy2) = y2;
 }
 
-void McgaGraphics::setze_zeiger(byte *ptr) {
-	set_pointer(ptr);
+void McgaGraphics::set_pointer(byte *ptr) {
+	if (ptr) {
+		_G(currentScreen) = ptr;
+	} else if (_G(screenHasDefault)) {
+		_G(currentScreen) = _G(screenDefaultP);
+	} else {
+		_G(currentScreen) = (byte *)g_screen->getPixels();
+	}
 }
 
 byte *McgaGraphics::get_zeiger() {
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 28868b5693f..2db01d71d5a 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -39,7 +39,7 @@ public:
 	void exit_mausmode();
 
 	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
-	void setze_zeiger(byte *ptr);
+	void set_pointer(byte *ptr);
 	byte *get_zeiger();
 
 	void set_mono();
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c909087dba2..6616cbf6114 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -781,7 +781,7 @@ void print_rows(int16 id) {
 	_G(out)->set_fontadr(_G(font8x8));
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 	txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
 		s = _G(txt)->str_pos(txtStr, i);
@@ -860,7 +860,7 @@ static void flic_proc1() {
 		else if (VALS1[i] == 143)
 			load_room_music(260);
 		if (VALS2[i]) {
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 		}
 
@@ -887,7 +887,7 @@ static void flic_proc1() {
 
 	_G(flc)->remove_custom_user_function();
 	if (ret == -1) {
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(out)->raster_col(254, 62, 35, 7);
 		start_aad(595);
@@ -900,7 +900,7 @@ static void flic_proc1() {
 		}
 	}
 
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(out)->cls();
 }
 
@@ -921,7 +921,7 @@ void flic_cut(int16 nr, int16 mode) {
 	static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(det)->disable_room_sound();
 	_G(sndPlayer)->endSound();
 	g_events->delay(50);
@@ -1109,7 +1109,7 @@ void flic_cut(int16 nr, int16 mode) {
 				g_engine->playVideo(FLIC_CUT_133[i]);
 #endif
 				if (i == 0 || i == 1) {
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 				}
 			}
@@ -1646,7 +1646,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	_G(atds)->stop_aad();
 	_G(atds)->stop_ats();
-	_G(out)->setze_zeiger(_G(workptr));
+	_G(out)->set_pointer(_G(workptr));
 	_G(flags).NoPalAfterFlc = false;
 }
 
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index d5bf9a7a9e1..2c7dfc61b5d 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -30,9 +30,9 @@ namespace Rooms {
 
 void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 56bacfadc32..de93a145b49 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -85,7 +85,7 @@ int16 Room23::start_gleiter() {
 					_G(det)->stop_detail(i);
 
 				if (_G(spieler).R23GleiterExit == 14) {
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					_G(flags).NoPalAfterFlc = true;
 					flic_cut(FCUT_012, CFO_MODE);
@@ -104,7 +104,7 @@ int16 Room23::start_gleiter() {
 					_G(maus_links_click) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_019_01, CFO_MODE);
 					_G(spieler).R23GleiterExit = 25;
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index aa0fb92306f..56b3f97c64e 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -105,7 +105,7 @@ void Room28::entry(int16 eib_nr) {
 			case 77:
 				if (_G(spieler).R28PostCar) {
 					_G(spieler).R28PostCar = false;
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_063, CFO_MODE);
 					_G(spieler).R28ChewyPump = false;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 063223b429f..b7f52d1fbe0 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -182,7 +182,7 @@ int16 Room39::use_tv() {
 			_G(spieler).R39TvKanal = -1;
 
 		_G(flags).NoPalAfterFlc = true;
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_042, CFO_MODE);
 		++_G(spieler).R39TvKanal;
@@ -222,14 +222,14 @@ int16 Room39::use_tv() {
 			flic_cut(FCUT_041, CFO_MODE);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(out)->set_palette(_G(pal));
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0], CFO_MODE);
 
 			_G(out)->cls();
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(out)->set_palette(_G(pal));
 			set_tv();
@@ -270,7 +270,7 @@ int16 Room39::use_tv() {
 
 	if (cls_flag) {
 		_G(out)->cls();
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(out)->set_palette(_G(pal));
 		_G(flags).NoPalAfterFlc = false;
@@ -307,7 +307,7 @@ void Room39::look_tv(bool cls_mode) {
 			}
 
 			if (cls_mode) {
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
 				_G(out)->set_palette(_G(pal));
 				_G(flags).NoPalAfterFlc = true;
@@ -326,7 +326,7 @@ void Room39::look_tv(bool cls_mode) {
 
 			if (cls_mode) {
 				_G(out)->cls();
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
 				_G(out)->set_palette(_G(pal));
 				_G(flags).NoPalAfterFlc = false;
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 5e57ae801a6..7a27ca7a01c 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -481,7 +481,7 @@ int16 Room40::use_haendler() {
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 				_G(flags).NoScroll = false;
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
 				switch_room(28);
 				_G(SetUpScreenFunc) = setup_func;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index b69ea989bfc..019ee26d2e1 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -131,7 +131,7 @@ void Room46::bodo() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065, CFO_MODE);
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	register_cutscene(16);
 	
@@ -154,7 +154,7 @@ void Room46::kloppe() {
 		_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_065);
 		_G(flc)->custom_play(&_G(Ci));
 		
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		start_aad(244 + i, -1);
 		int16 delay = _G(spieler).DelaySpeed * 50;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 264e9668dd1..43119a3e38a 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -46,7 +46,7 @@ void Room50::entry(int16 eib_nr) {
 		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
 		set_person_pos(92, 123, P_CHEWY, P_LEFT);
 		start_aad_wait(510, -1);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(108, 0);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 0228753c106..ddc0ec24f67 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -170,7 +170,7 @@ void Room51::setup_func() {
 				start_aad_wait(514, -1);
 				wait_show_screen(5);
 				_G(flags).NoPalAfterFlc = true;
-				_G(out)->setze_zeiger(nullptr);
+				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
 				flic_cut(115, 0);
 				register_cutscene(28);
@@ -256,7 +256,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					start_aad_wait(290, -1);
 					g_engine->_sound->stopSound(0);
 					_G(out)->ausblenden(1);
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
 					_G(flags).NoPalAfterFlc = true;
@@ -284,7 +284,7 @@ int16 Room51::use_door(int16 txt_nr) {
 		case 331:
 		case 334:
 			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(114, 0);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 19ae1dcada2..3e4e87fee31 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -120,7 +120,7 @@ void Room56::entry() {
 				_G(atds)->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(spieler).room_e_obj[137].Attribut = 3;
 				if (_G(spieler).flags33_80) {
-					_G(out)->setze_zeiger(nullptr);
+					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					flic_cut(113, CFO_MODE);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
@@ -160,19 +160,19 @@ void Room56::entry() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 		_G(spieler).r88DestRoom = 82;
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(116, CFO_MODE);
 		register_cutscene(21);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
 		switch_room(66);
 		break;
 	case 2:
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		flic_cut(110, CFO_MODE);
 		_G(spieler).flags34_20 = true;
@@ -350,7 +350,7 @@ int16 Room56::use_kneipe() {
 		_G(maus_links_click) = false;
 		auto_move(4, P_CHEWY);
 		start_aad_wait(521, -1);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		_G(flc)->set_custom_user_function(proc1);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 4969ed15344..43c932a78b5 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -196,7 +196,7 @@ int Room76::proc7() {
 		start_aad_wait(443, -1);
 		_G(spieler).scrollx = 0;
 		_G(fx_blend) = BLEND3;
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		_G(det)->set_static_ani(2, -1);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index ec242608df1..0d066733d98 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -85,7 +85,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(6);
 		start_aad_wait(474, -1);
 		flic_cut(90, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(91, CFO_MODE);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 1c2645942ec..cb1a495e6df 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -191,7 +191,7 @@ void Room86::proc3(bool cond) {
 		set_up_screen(NO_SETUP);
 		_G(det)->set_static_pos(0, 352, destY, false, false);
 		destY += deltaY;
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->back2screen(_G(workpage));
 	}
 
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index fb3912942cf..ce0d15f620e 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -98,11 +98,11 @@ int Room88::proc3() {
 		hide_cur();
 		if (_G(spieler).flags32_10) {
 			start_aad_wait(480, -1);
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(87, CFO_MODE);
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
 			switch_room(84);
@@ -120,7 +120,7 @@ int Room88::proc3() {
 			start_detail_wait(aniNr, 1, ANI_GO);
 		}
 
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(88, CFO_MODE);
@@ -130,7 +130,7 @@ int Room88::proc3() {
 		switch_room(80);
 		hide_cur();
 		start_detail_wait(1, 1, ANI_VOR);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(86, CFO_MODE);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index b1b8cb367d3..103d47cb384 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -59,11 +59,11 @@ void Room89::entry() {
 		_G(spieler).SVal2 = 537;
 		switch_room(92);
 		start_aad_wait(490, -1);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(118, CFO_MODE);
@@ -78,7 +78,7 @@ void Room89::entry() {
 		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
 		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
 		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(117, CFO_MODE);
@@ -86,7 +86,7 @@ void Room89::entry() {
 
 		_G(fx_blend) = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(119, CFO_MODE);
@@ -98,17 +98,17 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
-			_G(out)->setze_zeiger(_G(workptr));
+			_G(out)->set_pointer(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		// Unsquish out thanks for playing screen
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->cls();
 		// Those strings are also displayed in the the German version
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
@@ -120,10 +120,10 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi += 3;
 			var30 += 2;
-			_G(out)->setze_zeiger(_G(workptr));
+			_G(out)->set_pointer(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
@@ -131,16 +131,16 @@ void Room89::entry() {
 
 		g_events->delay(3000);
 		_G(out)->ausblenden(2);
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->cls();
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 
 		Dialogs::Credits::execute();
 		
 		_G(spieler).SVal4 = 1;
 		_G(out)->ausblenden(2);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 	}
 
@@ -177,7 +177,7 @@ int Room89::proc2() {
 	_G(spieler).SVal2 = 489;
 	switch_room(92);
 	start_aad_wait(490, -1);
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(102, CFO_MODE);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index d4fd781b793..aeb07e97a40 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -332,7 +332,7 @@ int Room90::useSurimyOnWreck() {
 	cur_2_inventory();
 	auto_move(6, P_CHEWY);
 	_G(maus_links_click) = false;
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	flic_cut(109, CFO_MODE);
 	register_cutscene(29);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 9cb33b14386..011589dcef9 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -37,11 +37,11 @@ void Room92::entry() {
 	start_aad_wait(_G(spieler).SVal2, -1);
 	switch (_G(spieler).SVal2) {
 	case 487:
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
 		show_person();
@@ -50,20 +50,20 @@ void Room92::entry() {
 	case 488:
 		_G(flags).StaticUseTxt = true;
 		flic_cut(106, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(105, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(104, CFO_MODE);
 		register_cutscene(27);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(103, CFO_MODE);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
 		_G(spieler).flags33_8 = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index d78b078226c..1c814353dac 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -53,7 +53,7 @@ void Room94::entry() {
 		_G(spieler).scrollx = 0;
 		set_person_pos(156, 149, P_CHEWY, P_RIGHT);
 		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		flic_cut(120, CFO_MODE);
 		register_cutscene(30);
@@ -72,7 +72,7 @@ void Room94::entry() {
 		if (_G(spieler).flags37_40) {
 			_G(spieler).flags37_40 = true;
 			_G(flags).NoScroll = true;
-			_G(out)->setze_zeiger(nullptr);
+			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			flic_cut(121, CFO_MODE);
 			register_cutscene(32);
@@ -133,7 +133,7 @@ int Room94::giveGhostBottle() {
 	auto_move(2, P_CHEWY);
 	auto_scroll(216, 0);
 	del_inventar(_G(spieler).AkInvent);
-	_G(out)->setze_zeiger(nullptr);
+	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(62, CFO_MODE);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index f0fad33c909..2d33064ba4f 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -107,7 +107,7 @@ int Room95::proc2() {
 	}
 
 	if (_G(spieler).flags35_20) {
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(133, CFO_MODE);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index f01f22f39dd..86e6b8152ef 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -106,7 +106,7 @@ void Room97::entry() {
 
 	if (_G(spieler).flags37_8) {
 		hide_cur();
-		_G(out)->setze_zeiger(nullptr);
+		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 
 		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 91a4565684c..0dfd63e8df5 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2179,7 +2179,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrolly = 0;
 
 		_G(room)->load_tgp(BUCH_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-		_G(out)->setze_zeiger(_G(workptr));
+		_G(out)->set_pointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->back2screen(_G(workpage));
 


Commit: 70b1e80bd1111345a2d49f2ceb112f01619cd241
    https://github.com/scummvm/scummvm/commit/70b1e80bd1111345a2d49f2ceb112f01619cd241
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:35-08:00

Commit Message:
CHEWY: Switch more functions to the new sound code

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/m_event.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/sound.cpp
    engines/chewy/sound.h
    engines/chewy/sound_player.cpp
    engines/chewy/sound_player.h


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index fad120cffb5..8dd08dacc76 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -666,7 +666,7 @@ void Detail::clear_detail_sound(int16 nr) {
 void Detail::disable_room_sound() {
 	for (int16 i = 0; i < MAXDETAILS; i++)
 		disable_detail_sound(i);
-	_G(sndPlayer)->endSound();
+	g_engine->_sound->stopAllSounds();
 }
 
 void Detail::enable_room_sound() {
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index bffcd9a5e8c..8594c9ca4fc 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Dialogs {
@@ -210,7 +211,7 @@ void Cinema::execute() {
 int16 Cinema::cut_serv(int16 frame) {
 	if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 		_G(sndPlayer)->stopMod();
-		_G(sndPlayer)->endSound();
+		g_engine->_sound->stopAllSounds();
 		return -1;
 
 	} else {
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 9524789c3f8..4e825373ada 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -29,6 +29,7 @@
 #include "chewy/globals.h"
 #include "chewy/main.h"
 #include "chewy/ngshext.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Dialogs {
@@ -59,8 +60,7 @@ void MainMenu::execute() {
 
 	bool done = false;
 	while (!done && !SHOULD_QUIT) {
-		_G(sndPlayer)->stopMod();
-		_G(sndPlayer)->endSound();
+		g_engine->_sound->stopAllSounds();
 		_G(SetUpScreenFunc) = screenFunc;
 
 		cursor_wahl(CUR_ZEIGE);
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 35e9b383c5b..2e4412defd8 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 namespace Dialogs {
@@ -193,11 +194,11 @@ void Options::execute(TafInfo *ti) {
 				break;
 			case 7:
 				_G(spieler).SoundVol = (136 - _G(minfo).y) << 1;
-				_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
+				g_engine->_sound->setSoundVolume(_G(spieler).SoundVol * Audio::Mixer::kMaxChannelVolume / 120);
 				break;
 			case 8:
 				_G(spieler).MusicVol = (136 - _G(minfo).y) << 1;
-				_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
+				g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
 				break;
 			}
 			_G(minfo).button = 0;
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 7f101e82f62..f8521d07b14 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -533,12 +533,7 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			if (!File::readArray(handle, &para[0], chead.size / 2)) {
 				error("flic error");
 			} else
-#ifndef AIL
-				snd->setMusicMasterVol(para[0]);
-#else
-				_G(sndPlayer)->setMusicMasterVol(para[0]);
-#endif
-
+				g_engine->_sound->setMusicVolume(para[0] * Audio::Mixer::kMaxChannelVolume / 120);
 			break;
 
 		case SET_LOOPMODE:
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 62a551d5606..ba3a34b951c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -25,6 +25,7 @@
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -376,8 +377,8 @@ void sound_init() {
 	_G(sndPlayer)->initMixMode();
 	_G(spieler).MusicVol = 63;
 	_G(spieler).SoundVol = 63;
-	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
-	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
+	g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
+	g_engine->_sound->setSoundVolume(_G(spieler).SoundVol * Audio::Mixer::kMaxChannelVolume / 120);
 
 	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, R_VOCDATEI);
 
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 9325f045f45..938745a1ae6 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -21,6 +21,7 @@
 
 #include "chewy/defines.h"
 #include "chewy/globals.h"
+#include "chewy/sound.h"
 
 namespace Chewy {
 
@@ -185,7 +186,7 @@ void load_room_music(int16 room_nr) {
 				volume = 0;
 			else if (volume > _G(spieler).MusicVol)
 				volume = _G(spieler).MusicVol;
-			_G(sndPlayer)->setMusicMasterVol(volume);
+			g_engine->_sound->setMusicVolume(volume * Audio::Mixer::kMaxChannelVolume / 120);
 			_G(sndPlayer)->setLoopMode(lp_mode);
 			if (ttp_index != _G(currentSong)) {
 				_G(sndPlayer)->stopMod();
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6616cbf6114..b78ec6aeda9 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -923,7 +923,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 	_G(out)->set_pointer(nullptr);
 	_G(det)->disable_room_sound();
-	_G(sndPlayer)->endSound();
+	g_engine->_sound->stopAllSounds();
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
 	Common::File *f = File::open("cut/cut.tap");
@@ -1078,7 +1078,7 @@ void flic_cut(int16 nr, int16 mode) {
 			break;
 
 		case FCUT_112:
-			_G(sndPlayer)->setMusicMasterVol(32);
+			g_engine->_sound->setMusicVolume(32 * Audio::Mixer::kMaxChannelVolume / 120);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->custom_play(&_G(Ci));
@@ -1088,7 +1088,7 @@ void flic_cut(int16 nr, int16 mode) {
 			g_engine->playVideo(nr);
 			g_engine->playVideo(nr);
 #endif
-			_G(sndPlayer)->setMusicMasterVol(5);
+			g_engine->_sound->setMusicVolume(5 * Audio::Mixer::kMaxChannelVolume / 120);
 			break;
 
 		case FCUT_116:
@@ -1550,7 +1550,7 @@ void flic_cut(int16 nr, int16 mode) {
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
 			load_room_music(257);
-			_G(sndPlayer)->setMusicMasterVol(20);
+			g_engine->_sound->setMusicVolume(20 * Audio::Mixer::kMaxChannelVolume / 120);
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 110);
 			ret = _G(flc)->custom_play(&_G(Ci));
@@ -1560,7 +1560,7 @@ void flic_cut(int16 nr, int16 mode) {
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				_G(sndPlayer)->setMusicMasterVol(63);
+				g_engine->_sound->setMusicVolume(63 * Audio::Mixer::kMaxChannelVolume / 120);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 112);
 				_G(flc)->custom_play(&_G(Ci));
@@ -1629,8 +1629,8 @@ void flic_cut(int16 nr, int16 mode) {
 
 	g_engine->_sound->stopSound();
 	g_events->delay(50);
-	_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
-	_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
+	g_engine->_sound->setSoundVolume(_G(spieler).SoundVol * Audio::Mixer::kMaxChannelVolume / 120);
+	g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
 
 	if (nr < 1000 && nr != 135) {
 		load_room_music(_G(spieler).PersonRoomNr[0]);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 6ae85701c7a..43810473cc2 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -105,8 +105,9 @@ void Room68::setup_func() {
 				g_engine->_sound->playSound(_G(r68HohesC));
 				_G(det)->start_detail(_G(r68HohesC), 255, ANI_VOR);
 
-				while (_G(sndPlayer)->getSampleStatus(1) == 4)
-					set_up_screen(DO_SETUP);
+				// TODO
+				//while (_G(sndPlayer)->getSampleStatus(1) == 4)
+				//	set_up_screen(DO_SETUP);
 				_G(det)->stop_detail(_G(r68HohesC));
 			} else {
 				_G(det)->start_detail(_G(r68HohesC), 3, ANI_VOR);
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index f31d0e0de05..b23e2807365 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -78,6 +78,11 @@ void Sound::stopSound(uint channel) {
 	_mixer->stopHandle(_soundHandle[channel]);
 }
 
+void Sound::stopAllSounds() {
+	for (int i = 4; i < 8; i++)
+		stopSound(i);
+}
+
 bool Sound::isSoundActive(uint channel) {
 	assert(channel < MAX_SOUND_EFFECTS);
 	return _mixer->isSoundHandleActive(_soundHandle[channel]);
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index 6267d100897..5057baac52f 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -42,6 +42,7 @@ public:
 	void pauseSound(uint channel);
 	void resumeSound(uint channel);
 	void stopSound(uint channel = 0);
+	void stopAllSounds();
 	bool isSoundActive(uint channel);
 	void setSoundVolume(uint volume);
 	void setSoundChannelVolume(uint channel, uint volume);
diff --git a/engines/chewy/sound_player.cpp b/engines/chewy/sound_player.cpp
index c492ee6363b..219c57c37fb 100644
--- a/engines/chewy/sound_player.cpp
+++ b/engines/chewy/sound_player.cpp
@@ -126,9 +126,6 @@ int TimerHandle; // FIXME: HTIMER
 int16 TimerEnabled = false;
 int16 RealVoices;
 
-int16 SoundEnable = 0;
-int16 SoundMasterVol = 120;
-int16 MusicMasterVol = 120;
 int16 LoopEnable = OFF;
 int16 PlaybackMode = NORMAL_PLAYBACK;
 int16 StartPos = 0;
@@ -159,7 +156,6 @@ char *CurrentLine;
 int16 StereoPos[8] = {63};
 
 SoundPlayer::SoundPlayer() {
-	SoundEnable = false;
 	MusicFade = false;
 }
 
@@ -167,44 +163,24 @@ SoundPlayer::~SoundPlayer() {
 	warning("STUB: ailclass::~ailclass()");
 }
 
-void SoundPlayer::setMusicMasterVol(int16 vol) {
-	vol <<= 1;
-	if (vol > 120)
-		vol = 120;
-	MusicMasterVol = vol;
-}
-
-void SoundPlayer::setSoundMasterVol(int16 vol) {
-	vol <<= 1;
-	if (vol > 120)
-		vol = 120;
-	SoundMasterVol = vol;
-}
-
-void SoundPlayer::disableSound() {
-	SoundEnable = false;
-}
-
 void SoundPlayer::initMixMode() {
 	warning("STUB: ailclass::initMixMode()");
 
-	if (SoundEnable) {
-		initNoteTable(GlobalFrequency);
+	initNoteTable(GlobalFrequency);
 #if 0
-		TimerHandle = AIL_register_timer(mod_irq);
-		if (TimerHandle != -1) {
-			AIL_set_timer_frequency(TimerHandle, 50);
-			AIL_start_timer(TimerHandle);
-			TimerEnabled = true;
-		} else
+	TimerHandle = AIL_register_timer(mod_irq);
+	if (TimerHandle != -1) {
+		AIL_set_timer_frequency(TimerHandle, 50);
+		AIL_start_timer(TimerHandle);
+		TimerEnabled = true;
+	} else
 #endif
 
-		TimerEnabled = false;
-		StereoPos[0] = 7;
-		StereoPos[1] = 120;
-		StereoPos[2] = 30;
-		StereoPos[3] = 90;
-	}
+	TimerEnabled = false;
+	StereoPos[0] = 7;
+	StereoPos[1] = 120;
+	StereoPos[2] = 30;
+	StereoPos[3] = 90;
 }
 
 void SoundPlayer::exitMixMode() {
@@ -224,25 +200,23 @@ void SoundPlayer::playMod(TmfHeader *th) {
 	char *tmp;
 	int16 i;
 	ActiveSong = th;
-	if (SoundEnable) {
-		tmp = (char *)ActiveSong;
-		tmp += sizeof(TmfHeader);
-		for (i = 0; i < 128; i++) {
-			Patterns[i] = tmp;
-			tmp += 1024;
-		}
-		SeqPointer = 0;
-		PatLine = 0;
-		PatPointer = ActiveSong->sequenz[SeqPointer];
-		CurrentLine = Patterns[PatPointer];
-		CurrentTempo = 6;
-		PatternCount = 0;
-		FineSpeedV = 1;
-		FineSpeedN = 0;
-		FineSpeedS = 0;
-
-		MusicStatus = ON;
+	tmp = (char *)ActiveSong;
+	tmp += sizeof(TmfHeader);
+	for (i = 0; i < 128; i++) {
+		Patterns[i] = tmp;
+		tmp += 1024;
 	}
+	SeqPointer = 0;
+	PatLine = 0;
+	PatPointer = ActiveSong->sequenz[SeqPointer];
+	CurrentLine = Patterns[PatPointer];
+	CurrentTempo = 6;
+	PatternCount = 0;
+	FineSpeedV = 1;
+	FineSpeedN = 0;
+	FineSpeedS = 0;
+
+	MusicStatus = ON;
 }
 
 void SoundPlayer::stopMod() {
@@ -261,50 +235,44 @@ void SoundPlayer::stopMod() {
 }
 
 void SoundPlayer::continueMusic() {
-	if (SoundEnable)
-		if (!strncmp(ActiveSong->id, "TMF", 3))
-			MusicStatus = ON;
+	if (!strncmp(ActiveSong->id, "TMF", 3))
+		MusicStatus = ON;
 }
 
 void SoundPlayer::playSequence(int16 startPos, int16 endPos) {
-	if (SoundEnable) {
-		if (!strncmp(ActiveSong->id, "TMF", 3)) {
-			StartPos = startPos;
-			EndPos = endPos;
-			SeqPointer = StartPos;
-			PatLine = 0;
-			PatPointer = ActiveSong->sequenz[SeqPointer];
-			CurrentLine = Patterns[PatPointer];
-			MusicStatus = ON;
-		}
+	if (!strncmp(ActiveSong->id, "TMF", 3)) {
+		StartPos = startPos;
+		EndPos = endPos;
+		SeqPointer = StartPos;
+		PatLine = 0;
+		PatPointer = ActiveSong->sequenz[SeqPointer];
+		CurrentLine = Patterns[PatPointer];
+		MusicStatus = ON;
 	}
 }
 
 void SoundPlayer::playPattern(int16 pattern) {
-	if (SoundEnable) {
-		if (!strncmp(ActiveSong->id, "TMF", 3)) {
-			StartPos = 0;
-			EndPos = 0;
-			SeqPointer = 0;
-			PatLine = 0;
-			PatPointer = pattern;
-			CurrentLine = Patterns[PatPointer];
-			MusicStatus = ON;
-		}
+	if (!strncmp(ActiveSong->id, "TMF", 3)) {
+		StartPos = 0;
+		EndPos = 0;
+		SeqPointer = 0;
+		PatLine = 0;
+		PatPointer = pattern;
+		CurrentLine = Patterns[PatPointer];
+		MusicStatus = ON;
 	}
 }
 
 void SoundPlayer::setLoopMode(int16 mode) {
 	mode &= 1;
-	if (SoundEnable)
-		LoopEnable = mode;
+	LoopEnable = mode;
 }
 
 void SoundPlayer::fadeOut(uint16 delay) {
 	FadeStart = delay;
 	FadeCounter = 0;
 	MusicFade = FADE_OUT;
-	FadeVol = MusicMasterVol;
+	FadeVol = _G(spieler).MusicVol;
 }
 
 void SoundPlayer::getMusicInfo(musik_info *mi) {
@@ -316,20 +284,8 @@ void SoundPlayer::getMusicInfo(musik_info *mi) {
 }
 
 int16 SoundPlayer::musicPlaying() {
-	return MusicStatus;
-}
-
-int16 SoundPlayer::getSampleStatus(int16 channel) {
-	warning("STUB: ailclass::getSampleStatus()");
-
-#if 0
-	int16 ret;
-	channel &= 3;
-	channel += 4;
-	ret = AIL_sample_status(smp[channel]);
-	return ret;
-#endif
-	return 0;
+	return 0;	// Temporary hack until the music code is finished
+	//return MusicStatus;
 }
 
 void SoundPlayer::initNoteTable(uint16 sfreq) {
@@ -342,16 +298,6 @@ void SoundPlayer::initNoteTable(uint16 sfreq) {
 	}
 }
 
-void SoundPlayer::endSound() {
-	warning("STUB: ailclass::endSound()");
-
-#if 0
-	int16 i;
-	for (i = 4; i < 8; i++)
-		AIL_end_sample(smp[i]);
-#endif
-}
-
 void mod_irq() {
 	if (!InInterrupt) {
 		++InInterrupt;
@@ -364,23 +310,23 @@ void mod_irq() {
 			if (MusicFade == FADE_IN) {
 				if (!FadeCounter) {
 					FadeCounter = FadeStart;
-					if ((MusicMasterVol + 2) <= FadeVol)
-						MusicMasterVol += 2;
+					if ((_G(spieler).MusicVol / 2 + 2) <= FadeVol)
+						_G(spieler).MusicVol += 2;
 					else {
 						MusicFade = OFF;
-						MusicMasterVol = FadeVol;
+						_G(spieler).MusicVol = FadeVol;
 					}
 				} else
 					--FadeCounter;
 			} else if (MusicFade == FADE_OUT) {
 				if (!FadeCounter) {
 					FadeCounter = FadeStart;
-					if ((MusicMasterVol - 2) > 0)
-						MusicMasterVol -= 2;
+					if (_G(spieler).MusicVol - 2 > 0)
+						_G(spieler).MusicVol -= 2;
 					else {
 						MusicFade = OFF;
 						MusicStatus = OFF;
-						MusicMasterVol = FadeVol;
+						_G(spieler).MusicVol = FadeVol;
 					}
 				} else
 					--FadeCounter;
diff --git a/engines/chewy/sound_player.h b/engines/chewy/sound_player.h
index b97166617a2..f2e36d7aaad 100644
--- a/engines/chewy/sound_player.h
+++ b/engines/chewy/sound_player.h
@@ -37,13 +37,8 @@ public:
 	SoundPlayer();
 	~SoundPlayer();
 
-	void setMusicMasterVol(int16 vol);
-	void setSoundMasterVol(int16 vol);
-	void disableSound();
-
 	void getMusicInfo(musik_info *mi);
 	int16 musicPlaying();
-	int16 getSampleStatus(int16 channel);
 
 	void initNoteTable(uint16 sfreq);
 	void initMixMode();
@@ -55,8 +50,6 @@ public:
 	void playPattern(int16 pattern);
 	void setLoopMode(int16 mode);
 	void fadeOut(uint16 delay);
-
-	void endSound();
 };
 
 } // namespace Chewy


Commit: 25ad52094dfdaad8ac942a80e636d77377303bd7
    https://github.com/scummvm/scummvm/commit/25ad52094dfdaad8ac942a80e636d77377303bd7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:35-08:00

Commit Message:
CHEWY: Remove the unused mode parameter of flic_cut()

It is always set to CFO_MODE

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 9adab1fae92..e970d10336d 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -415,10 +415,6 @@ enum SetupScreenMode {
 #define ATS_ACTION_VOR 0
 #define ATS_ACTION_NACH 1
 
-#define CFO_MODE 0
-#define FLC_MODE 1
-#define ASF_MODE 2
-
 #define FCUT_001 0	// Chewy escapes the prison cell
 #define FCUT_002 1	// Burger
 #define FCUT_003 2	// Chewy mocks an alien and he trips on a rope
@@ -579,7 +575,7 @@ enum SetupScreenMode {
 #define FCUT_157 157 // Red space ship travelling inside black hole (custom callback: flic_user_function)
 #define FCUT_158 158 // Howard and Chewy waking up
 #define FCUT_159 159 // Credits
-//#define FCUT_155 160 // Intro logos (English)
+#define FCUT_160 160 // Intro logos (English)
 
 #define AUSGANG_LINKS 1
 #define AUSGANG_RECHTS 2
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 8594c9ca4fc..868405acc67 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -167,7 +167,7 @@ void Cinema::execute() {
 			print_rows(546 + topIndex);
 
 			_G(flc)->set_custom_user_function(cut_serv);
-			flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
+			flic_cut(CINEMA_FLICS[topIndex + selected]);
 			_G(flc)->remove_custom_user_function();
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 4e825373ada..53e1eef0434 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -45,7 +45,9 @@ void MainMenu::execute() {
 		if (!_G(modul))
 			_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
 
-		flic_cut(200, 0);
+		// NOTE: Originally, this was set to play video 200, but this actually
+		// jumped to the very last video in the file, so we play it explicitly
+		flic_cut(FCUT_160);
 		_G(sndPlayer)->stopMod();
 	}
 
@@ -95,7 +97,7 @@ void MainMenu::execute() {
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(out)->set_pointer(_G(workptr));
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(135, CFO_MODE);
+			flic_cut(135);
 			break;
 
 		case MM_LOAD_GAME:
@@ -121,7 +123,7 @@ void MainMenu::execute() {
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(flags).NoPalAfterFlc = true;
 			_G(flc)->set_custom_user_function(creditsFn);
-			flic_cut(159, CFO_MODE);
+			flic_cut(159);
 			_G(flc)->remove_custom_user_function();
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			Dialogs::Credits::execute();
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index a5cf81c01d6..4e1fc8f9341 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -451,7 +451,7 @@ void enter_room(int16 eib_nr);
 
 void exit_room(int16 eib_nr);
 
-void flic_cut(int16 nr, int16 mode);
+void flic_cut(int16 nr);
 
 void print_rows(int16 id);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index ba3a34b951c..160dab26141 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -409,7 +409,7 @@ void show_intro() {
 	if (!ConfMan.getBool("shown_intro")) {
 		ConfMan.setBool("shown_intro", true);
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(135, CFO_MODE);
+		flic_cut(135);
 	}
 }
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index b78ec6aeda9..a9e07588ab3 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -904,7 +904,7 @@ static void flic_proc1() {
 	_G(out)->cls();
 }
 
-void flic_cut(int16 nr, int16 mode) {
+void flic_cut(int16 nr) {
 	static const int16 FLIC_CUT_133[] = {
 		133, 123, 125, 126, 124, 128, 129, 130, 131,
 		132, 133, 127, 158
@@ -1603,22 +1603,10 @@ void flic_cut(int16 nr, int16 mode) {
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle,
 				(nr < 1000) ? nr : nr - 1000);
-
-			switch (mode) {
-			case 0:
-				_G(flc)->custom_play(&_G(Ci));
-				break;
-			case 1:
-				_G(flc)->play(_G(Ci).Handle, _G(Ci).VirtScreen, _G(Ci).TempArea);
-				break;
-			default:
-				break;
-			}
-
+			_G(flc)->custom_play(&_G(Ci));
 #else
 			g_engine->playVideo(nr < 1000 ? nr : nr - 1000);
 #endif
-
 			break;
 		}
 
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 2c58dbc920b..b82f64b5e9e 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -745,7 +745,7 @@ void Room0::feederAni() {
 			auto_move(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
 			_G(out)->cls();
-			flic_cut(FCUT_001, CFO_MODE);
+			flic_cut(FCUT_001);
 
 			register_cutscene(1);
 
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index f2491a4ef32..da068d69671 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -106,7 +106,7 @@ void Room7::klingel() {
 
 		_G(det)->start_detail(0, 255, ANI_VOR);
 		start_detail_wait(13, 1, ANI_VOR);
-		flic_cut(FCUT_002, CFO_MODE);
+		flic_cut(FCUT_002);
 		_G(det)->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
@@ -157,7 +157,7 @@ void Room7::klingel() {
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		_G(flags).NoPalAfterFlc = false;
 		register_cutscene(2);
-		flic_cut(FCUT_003, CFO_MODE);
+		flic_cut(FCUT_003);
 		set_person_pos(201, 117, P_CHEWY, P_LEFT);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 2c7dfc61b5d..e0dfde5ebe3 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -36,7 +36,7 @@ void Room10::entry() {
 		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
-		flic_cut(FCUT_004, CFO_MODE);
+		flic_cut(FCUT_004);
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		hide_cur();
@@ -54,7 +54,7 @@ void Room10::get_surimy() {
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
 	_G(flc)->set_custom_user_function(cut_serv);
-	flic_cut(FCUT_006, CFO_MODE);
+	flic_cut(FCUT_006);
 	_G(flc)->remove_custom_user_function();
 	_G(spieler).R10SurimyOk = true;
 	_G(room)->set_timer_status(3, TIMER_STOP);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index aeec5f23334..d478d1aeb27 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -149,7 +149,7 @@ int16 Room11::scanner() {
 
 			_G(flc)->set_custom_user_function(cut_serv_2);
 			start_aad(105, 0);
-			flic_cut(FCUT_011, CFO_MODE);
+			flic_cut(FCUT_011);
 			register_cutscene(4);
 			_G(flc)->remove_custom_user_function();
 			_G(spieler).R11TerminalOk = true;
@@ -163,7 +163,7 @@ int16 Room11::scanner() {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
 				_G(flc)->set_custom_user_function(cut_serv);
-				flic_cut(FCUT_010, CFO_MODE);
+				flic_cut(FCUT_010);
 				_G(flc)->remove_custom_user_function();
 				start_aad_wait(20, -1);
 			} else {
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 72753a4605e..80e5ac8d86a 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -76,7 +76,7 @@ void Room12::entry() {
 
 		_G(flags).NoScroll = true;
 		auto_scroll(60, 0);
-		flic_cut(FCUT_016, CFO_MODE);
+		flic_cut(FCUT_016);
 		_G(flags).NoScroll = false;
 
 		for (int16 i = 7; i < 10; i++)
@@ -203,7 +203,7 @@ int16 Room12::use_terminal() {
 				start_aad_wait(112, -1);
 				_G(flags).NoScroll = true;
 				auto_scroll(46, 0);
-				flic_cut(FCUT_017, CFO_MODE);
+				flic_cut(FCUT_017);
 				register_cutscene(5);
 
 				load_chewy_taf(CHEWY_BORK);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index be90ea773f7..54e4ca72ef9 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -47,7 +47,7 @@ static const MovLine R13_BORK_MPKT[3] = {
 void Room13::entry() {
 	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
 		_G(out)->cls();
-		flic_cut(FCUT_013, CFO_MODE);
+		flic_cut(FCUT_013);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
@@ -128,7 +128,7 @@ void Room13::talk_bork() {
 
 		start_spz(68, 255, false, P_CHEWY);
 		start_aad_wait(248, -1);
-		flic_cut(FCUT_014, CFO_MODE);
+		flic_cut(FCUT_014);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
 		_G(flags).NoScroll = false;
@@ -172,7 +172,7 @@ void Room13::jmp_band() {
 			start_aad_wait(117, -1);
 			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
-			flic_cut(FCUT_015, CFO_MODE);
+			flic_cut(FCUT_015);
 			_G(flags).NoScroll = false;
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
@@ -184,7 +184,7 @@ void Room13::jmp_band() {
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
 
-			flic_cut(FCUT_018, CFO_MODE);
+			flic_cut(FCUT_018);
 			register_cutscene(6);
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 48a3f7efbde..c2dfa7ddec7 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -89,7 +89,7 @@ int16 Room22::chewy_amboss() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		auto_move(2, P_CHEWY);
 		_G(flags).NoPalAfterFlc = false;
-		flic_cut(FCUT_007, CFO_MODE);
+		flic_cut(FCUT_007);
 		_G(spieler).R22ChewyPlatt = true;
 		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
 		_G(flags).AutoAniPlay = false;
@@ -151,7 +151,7 @@ void Room22::bork_walk2() {
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT2);
 	wait_auto_obj(BORK_OBJ);
 
-	flic_cut(FCUT_009, CFO_MODE);
+	flic_cut(FCUT_009);
 	register_cutscene(3);
 	_G(det)->show_static_spr(4);
 	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
@@ -185,7 +185,7 @@ int16 Room22::malen() {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
-		flic_cut(FCUT_008, CFO_MODE);
+		flic_cut(FCUT_008);
 		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R22Paint = true;
 		_G(obj)->calc_rsi_flip_flop(SIB_PAINT_R22);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index de93a145b49..e9e097fd50e 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -88,7 +88,7 @@ int16 Room23::start_gleiter() {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					_G(flags).NoPalAfterFlc = true;
-					flic_cut(FCUT_012, CFO_MODE);
+					flic_cut(FCUT_012);
 					register_cutscene(7);
 					_G(out)->cls();
 					_G(spieler).R23GleiterExit = 16;
@@ -106,7 +106,7 @@ int16 Room23::start_gleiter() {
 				} else if (_G(spieler).R23GleiterExit == 16) {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
-					flic_cut(FCUT_019_01, CFO_MODE);
+					flic_cut(FCUT_019_01);
 					_G(spieler).R23GleiterExit = 25;
 					register_cutscene(9);
 
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 31e9ed3b9f0..4ed7da24b69 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -72,7 +72,7 @@ void Room25::entry() {
 
 		_G(spieler).R25FirstEntry = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		flic_cut(FCUT_029, CFO_MODE);
+		flic_cut(FCUT_029);
 		g_engine->_sound->playSound(0, 0);
 		_G(fx_blend) = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
@@ -102,7 +102,7 @@ int16 Room25::gleiter_loesch() {
 			action_flag = true;
 			_G(spieler).R25GleiteLoesch = true;
 			auto_move(2, P_CHEWY);
-			flic_cut(FCUT_030, CFO_MODE);
+			flic_cut(FCUT_030);
 			_G(obj)->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			_G(atds)->set_ats_str(219, 1, ATS_DATEI);
 			_G(atds)->set_ats_str(187, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 56b3f97c64e..9be9579d5e1 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -77,7 +77,7 @@ void Room28::entry(int16 eib_nr) {
 
 					auto_scroll(0, 0);
 					_G(flc)->set_flic_user_function(cut_serv1);
-					flic_cut(FCUT_064, CFO_MODE);
+					flic_cut(FCUT_064);
 					_G(flc)->remove_flic_user_function();
 					_G(det)->show_static_spr(6);
 
@@ -107,7 +107,7 @@ void Room28::entry(int16 eib_nr) {
 					_G(spieler).R28PostCar = false;
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
-					flic_cut(FCUT_063, CFO_MODE);
+					flic_cut(FCUT_063);
 					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
 					_G(atds)->set_ats_str(209, 0, ATS_DATEI);
@@ -219,10 +219,10 @@ void Room28::use_surimy() {
 		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(flc)->set_flic_user_function(cut_serv2);
-		flic_cut(FCUT_055, CFO_MODE);
+		flic_cut(FCUT_055);
 		_G(flc)->remove_flic_user_function();
 		_G(flc)->set_flic_user_function(cut_serv1);
-		flic_cut(FCUT_056, CFO_MODE);
+		flic_cut(FCUT_056);
 		_G(flc)->remove_flic_user_function();
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 6380b03c221..0945f1250e5 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -181,7 +181,7 @@ int16 Room31::use_topf() {
 						} else {
 							close_luke_proc3();
 							auto_move(3, P_CHEWY);
-							flic_cut(FCUT_046, CFO_MODE);
+							flic_cut(FCUT_046);
 							register_cutscene(13);
 							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 41ded8dc3e8..90a99679ab8 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -46,7 +46,7 @@ int16 Room32::use_howard() {
 			cur_2_inventory();
 			remove_inventory(MUNTER_INV);
 			register_cutscene(11);
-			flic_cut(FCUT_043, CFO_MODE);
+			flic_cut(FCUT_043);
 			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
 			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(75, -1);
@@ -107,7 +107,7 @@ void Room32::use_schreibmaschine() {
 						auto_move(3, P_CHEWY);
 						_G(spieler).R32UseSchreib = true;
 						cur_2_inventory();
-						flic_cut(FCUT_044, CFO_MODE);
+						flic_cut(FCUT_044);
 						register_cutscene(12);
 						_G(det)->show_static_spr(5);
 						_G(atds)->set_ats_str(203, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 50bc3629877..6208ef54153 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -163,7 +163,7 @@ void Room33::use_maschine() {
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(2, 1, ANI_VOR);
-			flic_cut(FCUT_031, CFO_MODE);
+			flic_cut(FCUT_031);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(71, -1);
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index b7745daf067..08084026556 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -81,7 +81,7 @@ int16 Room35::use_cat() {
 			auto_move(4, P_CHEWY);
 			_G(spieler).R35TransCat = true;
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
-			flic_cut(FCUT_045, CFO_MODE);
+			flic_cut(FCUT_045);
 			start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
 			start_aad_wait(94, -1);
 		} else if (is_cur_inventar(PUTENKEULE_INV)) {
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 5bf3f4609bc..b8308326b05 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -114,7 +114,7 @@ short Room37::use_wippe() {
 			start_aad_wait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
 			_G(flc)->set_flic_user_function(cut_serv1);
-			flic_cut(FCUT_047, CFO_MODE);
+			flic_cut(FCUT_047);
 			_G(flc)->remove_flic_user_function();
 			_G(flags).NoScroll = false;
 			show_cur();
@@ -180,9 +180,9 @@ int16 Room37::use_glas() {
 			start_aad_wait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
 			_G(flc)->set_flic_user_function(cut_serv2);
-			flic_cut(FCUT_048, CFO_MODE);
+			flic_cut(FCUT_048);
 			_G(flc)->remove_flic_user_function();
-			flic_cut(FCUT_049, CFO_MODE);
+			flic_cut(FCUT_049);
 			invent_2_slot(GEBISS_INV);
 			_G(det)->hide_static_spr(9);
 			_G(atds)->set_ats_str(250, 1, ATS_DATEI);
@@ -226,7 +226,7 @@ void Room37::dog_bell() {
 			start_detail_wait(6, 1, ANI_VOR);
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(det)->start_detail(11, 255, ANI_VOR);
-			flic_cut(FCUT_050, CFO_MODE);
+			flic_cut(FCUT_050);
 			start_detail_wait(6, 1, ANI_RUECK);
 			_G(det)->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
@@ -249,9 +249,9 @@ void Room37::dog_bell() {
 			_G(det)->del_static_ani(3);
 			_G(det)->stop_detail(3);
 			start_detail_wait(4, 1, ANI_VOR);
-			flic_cut(FCUT_051, CFO_MODE);
+			flic_cut(FCUT_051);
 			_G(spieler).scrollx = 104;
-			flic_cut(FCUT_054, CFO_MODE);
+			flic_cut(FCUT_054);
 			register_cutscene(10);
 			_G(det)->show_static_spr(0);
 
@@ -293,7 +293,7 @@ void Room37::use_hahn() {
 		auto_move(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
 		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
-		flic_cut(FCUT_052, CFO_MODE);
+		flic_cut(FCUT_052);
 		cur_2_inventory();
 		_G(menu_item) = CUR_TALK;
 		cursor_wahl(_G(menu_item));
@@ -324,7 +324,7 @@ void Room37::use_hahn() {
 			_G(det)->hide_static_spr(0);
 			_G(det)->start_detail(10, 10, ANI_VOR);
 			auto_move(8, P_CHEWY);
-			flic_cut(FCUT_053, CFO_MODE);
+			flic_cut(FCUT_053);
 			_G(det)->stop_detail(10);
 
 			_G(spieler).scrollx = 320;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index b7f52d1fbe0..0021eec8be9 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -184,14 +184,14 @@ int16 Room39::use_tv() {
 		_G(flags).NoPalAfterFlc = true;
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
-		flic_cut(FCUT_042, CFO_MODE);
+		flic_cut(FCUT_042);
 		++_G(spieler).R39TvKanal;
 		_G(flags).NoPalAfterFlc = true;
 
 		if (_G(spieler).R39TvKanal == 2)
-			flic_cut(FCUT_036, CFO_MODE);
+			flic_cut(FCUT_036);
 		else if (_G(spieler).R39TvKanal == 5)
-			flic_cut(FCUT_033, CFO_MODE);
+			flic_cut(FCUT_033);
 
 		look_tv(false);
 		set_tv();
@@ -219,14 +219,14 @@ int16 Room39::use_tv() {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			_G(spieler).R39TransMensch = true;
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(FCUT_041, CFO_MODE);
+			flic_cut(FCUT_041);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(out)->set_palette(_G(pal));
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(TV_FLIC[0], CFO_MODE);
+			flic_cut(TV_FLIC[0]);
 
 			_G(out)->cls();
 			_G(out)->set_pointer(nullptr);
@@ -321,7 +321,7 @@ void Room39::look_tv(bool cls_mode) {
 			}
 
 			_G(flc)->set_custom_user_function(setup_func);
-			flic_cut(flic_nr, CFO_MODE);
+			flic_cut(flic_nr);
 			_G(flc)->remove_custom_user_function();
 
 			if (cls_mode) {
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 7a27ca7a01c..525f32747f6 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -127,7 +127,7 @@ void Room40::xit(int16 eib_nr) {
 				register_cutscene(15);
 				
 				_G(flags).NoPalAfterFlc = true;
-				flic_cut(FCUT_073, CFO_MODE);
+				flic_cut(FCUT_073);
 
 				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
 					_G(spieler).PersonGlobalDia[1] = 10023;
@@ -553,7 +553,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	if (aad_nr == 237) {
 		start_aad_wait(aad_nr, -1);
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(FCUT_062, CFO_MODE);
+		flic_cut(FCUT_062);
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(375, -1);
 	} else {
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 21137b928e4..dd966a4322a 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -196,7 +196,7 @@ int16 Room41::use_lola() {
 		_G(spieler).R41LolaOk = true;
 		auto_move(4, P_CHEWY);
 		g_engine->_sound->stopSound(0);
-		flic_cut(FCUT_057, CFO_MODE);
+		flic_cut(FCUT_057);
 		set_person_pos(127, 112, P_CHEWY, P_LEFT);
 		_G(det)->stop_detail(6);
 
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index f56539e9444..fb8d302b8c0 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -56,7 +56,7 @@ void Room43::night_small() {
 
 	_G(spieler).scrollx = 194;
 	start_aad_wait(191, -1);
-	flic_cut(FCUT_058, CFO_MODE);
+	flic_cut(FCUT_058);
 	g_engine->_sound->stopSound(0);
 	_G(flags).NoScroll = false;
 	_G(spieler).ScrollxStep = 1;
@@ -80,7 +80,7 @@ void Room43::catch_pg() {
 	auto_scroll(194, 0);
 	start_aad_wait(235, -1);
 	_G(spieler).R43GetPgLady = true;
-	flic_cut(FCUT_058, CFO_MODE);
+	flic_cut(FCUT_058);
 
 	g_engine->_sound->stopSound(0);
 	register_cutscene(14);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index dbeedc7e3e3..834060ee7f7 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -89,7 +89,7 @@ void Room45::xit(int16 eib_nr) {
 
 	if (eib_nr == 87) {
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(FCUT_073, CFO_MODE);
+		flic_cut(FCUT_073);
 	}
 }
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 019ee26d2e1..cdff8bb88a6 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -130,7 +130,7 @@ void Room46::bodo() {
 	_G(det)->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
-	flic_cut(FCUT_065, CFO_MODE);
+	flic_cut(FCUT_065);
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	register_cutscene(16);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 936166b59ba..06693f1f4c8 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -182,7 +182,7 @@ void Room49::use_boy_cigar() {
 	_G(flags).NoScroll = true;
 
 	auto_scroll(164, 0);
-	flic_cut(67, CFO_MODE);
+	flic_cut(67);
 	register_cutscene(17);
 	
 	_G(room)->set_timer_status(255, TIMER_STOP);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 43119a3e38a..a9f4fa18267 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -49,7 +49,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(108, 0);
+		flic_cut(108);
 		show_cur();
 		switch_room(51);
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index ddc0ec24f67..83574a626c0 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -172,7 +172,7 @@ void Room51::setup_func() {
 				_G(flags).NoPalAfterFlc = true;
 				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
-				flic_cut(115, 0);
+				flic_cut(115);
 				register_cutscene(28);
 				
 				switch_room(91);
@@ -262,7 +262,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(flags).NoPalAfterFlc = true;
 					_G(flc)->set_flic_user_function(cut_serv);
 					_G(det)->show_static_spr(16);
-					flic_cut(FCUT_068, CFO_MODE);
+					flic_cut(FCUT_068);
 					_G(flc)->remove_flic_user_function();
 
 					_G(det)->hide_static_spr(16);
@@ -287,7 +287,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(114, 0);
+			flic_cut(114);
 			set_person_pos(115, 144, P_CHEWY, P_LEFT);
 			_G(fx_blend) = BLEND3;
 			set_up_screen(NO_SETUP);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 8c75d4c4db3..90939c27985 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -241,7 +241,7 @@ int16 Room54::use_zelle() {
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
 				_G(flc)->set_flic_user_function(cut_serv);
-				flic_cut(FCUT_069, CFO_MODE);
+				flic_cut(FCUT_069);
 				_G(flc)->remove_flic_user_function();
 
 				del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 9b6bb682216..16dd1111f1a 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -212,7 +212,7 @@ int16 Room55::use_telefon() {
 				_G(det)->hide_static_spr(0);
 				_G(det)->hide_static_spr(8);
 				_G(atds)->set_ats_str(354, 1, ATS_DATEI);
-				flic_cut(FCUT_071, CFO_MODE);
+				flic_cut(FCUT_071);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 
 				set_person_pos(178, 75, P_CHEWY, P_LEFT);
@@ -238,7 +238,7 @@ int16 Room55::use_telefon() {
 					SHOULD_QUIT_RETURN0;
 				}
 
-				flic_cut(FCUT_072, CFO_MODE);
+				flic_cut(FCUT_072);
 				register_cutscene(19);
 				
 				_G(flags).NoScroll = false;
@@ -368,7 +368,7 @@ int16 Room55::use_kammeraus() {
 			start_detail_wait(5, 1, ANI_VOR);
 			_G(det)->show_static_spr(10);
 			_G(flc)->set_flic_user_function(cut_serv);
-			flic_cut(FCUT_070, CFO_MODE);
+			flic_cut(FCUT_070);
 			register_cutscene(18);
 		
 			_G(flc)->remove_flic_user_function();
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 3e4e87fee31..d8bcd55020e 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -65,7 +65,7 @@ void Room56::entry() {
 			set_up_screen(DO_SETUP);
 
 			if (!_G(spieler).R56GetTabak) {
-				flic_cut(FCUT_074, CFO_MODE);
+				flic_cut(FCUT_074);
 				_G(det)->show_static_spr(2);
 			}
 
@@ -101,7 +101,7 @@ void Room56::entry() {
 			hide_cur();
 			start_aad_wait(306, -1);
 			show_cur();
-			flic_cut(FCUT_076, CFO_MODE);
+			flic_cut(FCUT_076);
 			esi = 1;
 			cur_2_inventory();
 			remove_inventory(56);
@@ -122,7 +122,7 @@ void Room56::entry() {
 				if (_G(spieler).flags33_80) {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
-					flic_cut(113, CFO_MODE);
+					flic_cut(113);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
 					load_chewy_taf(CHEWY_NORMAL);
 					_G(spieler).mi[P_HOWARD] = 0;
@@ -163,7 +163,7 @@ void Room56::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(116, CFO_MODE);
+		flic_cut(116);
 		register_cutscene(21);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
@@ -174,7 +174,7 @@ void Room56::entry() {
 	case 2:
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
-		flic_cut(110, CFO_MODE);
+		flic_cut(110);
 		_G(spieler).flags34_20 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 		switch_room(90);
@@ -299,7 +299,7 @@ int16 Room56::use_kneipe() {
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
-				flic_cut(75, CFO_MODE);
+				flic_cut(75);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
 				_G(det)->start_detail(10, 6, ANI_VOR);
@@ -330,7 +330,7 @@ int16 Room56::use_kneipe() {
 		if (_G(spieler).flags34_10) {
 			_G(spieler).flags33_80 = true;
 			auto_move(4, P_CHEWY);
-			flic_cut(111, CFO_MODE);
+			flic_cut(111);
 			_G(fx_blend) = BLEND3;
 			start_aad_wait(522, -1);
 			start_spz_wait(66, 1, false, P_CHEWY);
@@ -354,7 +354,7 @@ int16 Room56::use_kneipe() {
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		_G(flc)->set_custom_user_function(proc1);
-		flic_cut(112, CFO_MODE);
+		flic_cut(112);
 		_G(flc)->remove_custom_user_function();
 		register_cutscene(31);
 
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 2a7c3ecf3c1..7e7443eece4 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -110,7 +110,7 @@ int16 Room62::use_laura() {
 		_G(det)->start_detail(6, 255, ANI_VOR);
 		start_aad_wait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		flic_cut(FCUT_077, CFO_MODE);
+		flic_cut(FCUT_077);
 		show_cur();
 		_G(spieler).R64Moni1Ani = 0;
 		_G(spieler).R64Moni2Ani = 0;
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 9d3ebe64aaa..48c52d64748 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -133,8 +133,8 @@ void Room63::bork_platt() {
 	_G(spieler).R62LauraVerwandlung = false;
 	_G(r63Schalter) = false;
 	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
-	flic_cut(FCUT_081, CFO_MODE);
-	flic_cut(FCUT_082, CFO_MODE);
+	flic_cut(FCUT_081);
+	flic_cut(FCUT_082);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	check_shad(4, 1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -146,7 +146,7 @@ void Room63::bork_platt() {
 	start_aad_wait(361, -1);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(FCUT_079, CFO_MODE);
+	flic_cut(FCUT_079);
 	_G(fx_blend) = BLEND3;
 	show_cur();
 	_G(flags).MainInput = true;
@@ -310,7 +310,7 @@ int16 Room63::use_aschenbecher() {
 				_G(det)->hide_static_spr(10);
 				_G(det)->hide_static_spr(12);
 				start_aad_wait(368, -1);
-				flic_cut(FCUT_080, CFO_MODE);
+				flic_cut(FCUT_080);
 				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(atds)->set_ats_str(383, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 30e99b33340..88b790487fa 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -42,7 +42,7 @@ void Room64::entry() {
 		chewy_entry();
 		if (_G(spieler).R63Feuer) {
 			_G(flc)->set_flic_user_function(cut_sev);
-			flic_cut(FCUT_078, CFO_MODE);
+			flic_cut(FCUT_078);
 			_G(flc)->remove_flic_user_function();
 			_G(spieler).R64ManWeg = true;
 			_G(det)->del_static_ani(1);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 43810473cc2..300aa89825a 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -319,7 +319,7 @@ int16 Room68::use_diva() {
 		_G(det)->hide_static_spr(3);
 		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ABLOCK38);
-		flic_cut(FCUT_083, CFO_MODE);
+		flic_cut(FCUT_083);
 		_G(det)->del_static_ani(18);
 		register_cutscene(22);
 		_G(det)->del_static_ani(18);
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 0f025ef4396..29e54ebdead 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -89,7 +89,7 @@ void Room72::proc1(int16 flicNr) {
 	_G(spieler).flags28_10 = true;
 	wait_show_screen(7);
 	start_aad_wait(437, -1);
-	flic_cut(flicNr, CFO_MODE);
+	flic_cut(flicNr);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
 	_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 20408f94afa..0c48a9a5c11 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -59,7 +59,7 @@ void Room78::entry() {
 			set_up_screen(DO_SETUP);
 		}
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(101, CFO_MODE);
+		flic_cut(101);
 		destRoom = 79;
 	} else {
 		_G(det)->start_detail(0, 255, false);
@@ -98,7 +98,7 @@ void Room78::entry() {
 						if (flag1 == 0) {
 							_G(det)->start_detail(5, 1, false);
 						} else {
-							start_detail_wait(5, 1, CFO_MODE);
+							start_detail_wait(5, 1, ANI_VOR);
 						}
 					} else {
 						if (det4DestX <= 0)
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 0d066733d98..88e80d198f6 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -84,18 +84,18 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(5);
 		_G(det)->show_static_spr(6);
 		start_aad_wait(474, -1);
-		flic_cut(90, CFO_MODE);
+		flic_cut(90);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(91, CFO_MODE);
+		flic_cut(91);
 		_G(det)->hide_static_spr(6);
 		_G(spieler).scrollx = 25;
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(475, -1);
 		start_aad(476, -1);
 		_G(flc)->set_custom_user_function(Room87::proc5);
-		flic_cut(89, CFO_MODE);
+		flic_cut(89);
 		register_cutscene(25);
 
 		_G(flc)->remove_custom_user_function();
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index cb1a495e6df..328e0804cc2 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -84,7 +84,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(flags).NoScroll = true;
 		auto_scroll(246, 0);
 		proc3(false);
-		flic_cut(92, CFO_MODE);
+		flic_cut(92);
 		_G(flags).NoScroll = false;
 		auto_move(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index f9d73892125..19cb0913226 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -158,22 +158,22 @@ int Room87::proc4() {
 
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	flic_cut(93, CFO_MODE);
+	flic_cut(93);
 	_G(flc)->set_custom_user_function(proc3);
-	flic_cut(94, CFO_MODE);
+	flic_cut(94);
 	_G(flc)->remove_custom_user_function();
 	_G(flc)->set_custom_user_function(proc5);
 	start_aad(472);
-	flic_cut(95, CFO_MODE);
+	flic_cut(95);
 	_G(flc)->remove_custom_user_function();
-	flic_cut(96, CFO_MODE);
+	flic_cut(96);
 	_G(det)->hide_static_spr(2);
 	_G(det)->start_detail(2, 255, false);
 	start_aad_wait(471, -1);
-	flic_cut(97, CFO_MODE);
-	flic_cut(98, CFO_MODE);
-	flic_cut(99, CFO_MODE);
-	flic_cut(100, CFO_MODE);
+	flic_cut(97);
+	flic_cut(98);
+	flic_cut(99);
+	flic_cut(100);
 	_G(spieler).PersonGlobalDia[P_HOWARD] = -1;
 	_G(spieler).PersonDiaRoom[P_HOWARD] = false;
 	_G(spieler).flags32_10 = true;
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index ce0d15f620e..abbec02778e 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -101,7 +101,7 @@ int Room88::proc3() {
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(87, CFO_MODE);
+			flic_cut(87);
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
@@ -123,7 +123,7 @@ int Room88::proc3() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(88, CFO_MODE);
+		flic_cut(88);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).flags32_1 = true;
 		_G(out)->raster_col(0, 0, 0, 0);
@@ -133,7 +133,7 @@ int Room88::proc3() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(86, CFO_MODE);
+		flic_cut(86);
 		register_cutscene(24);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 103d47cb384..34b6460ffcb 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -62,11 +62,11 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103, CFO_MODE);
+		flic_cut(103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(118, CFO_MODE);
+		flic_cut(118);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 538;
 		switch_room(92);
@@ -81,7 +81,7 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(117, CFO_MODE);
+		flic_cut(117);
 		register_cutscene(35);
 
 		_G(fx_blend) = BLEND3;
@@ -89,7 +89,7 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(119, CFO_MODE);
+		flic_cut(119);
 
 		// Squash screen into a single point at the center
 		int edi = -20;
@@ -180,7 +180,7 @@ int Room89::proc2() {
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(102, CFO_MODE);
+	flic_cut(102);
 	register_cutscene(26);
 
 	_G(spieler).SVal1 = 89;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index aeb07e97a40..55897420d6a 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -295,7 +295,7 @@ int Room90::shootControlUnit() {
 	start_detail_wait(13, 1, ANI_VOR);
 	_G(flc)->set_custom_user_function(Room90::proc5);
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(107, CFO_MODE);
+	flic_cut(107);
 	_G(flc)->remove_custom_user_function();
 	_G(spieler).scrollx = 0;
 	set_person_pos(76, 145, P_CHEWY, P_LEFT);
@@ -334,7 +334,7 @@ int Room90::useSurimyOnWreck() {
 	_G(maus_links_click) = false;
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
-	flic_cut(109, CFO_MODE);
+	flic_cut(109);
 	register_cutscene(29);
 
 	_G(det)->hide_static_spr(4);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 011589dcef9..21a4c7a5ec2 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -40,7 +40,7 @@ void Room92::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103, CFO_MODE);
+		flic_cut(103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
@@ -49,20 +49,20 @@ void Room92::entry() {
 		break;
 	case 488:
 		_G(flags).StaticUseTxt = true;
-		flic_cut(106, CFO_MODE);
+		flic_cut(106);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(105, CFO_MODE);
+		flic_cut(105);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(104, CFO_MODE);
+		flic_cut(104);
 		register_cutscene(27);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103, CFO_MODE);
+		flic_cut(103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
@@ -72,7 +72,7 @@ void Room92::entry() {
 		break;
 	case 538:
 		_G(flags).StaticUseTxt = true;
-		flic_cut(106, CFO_MODE);
+		flic_cut(106);
 		show_person();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
 		_G(spieler).flags35_8 = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 1c814353dac..583bcc1a719 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -55,7 +55,7 @@ void Room94::entry() {
 		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
-		flic_cut(120, CFO_MODE);
+		flic_cut(120);
 		register_cutscene(30);
 		_G(fx_blend) = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
@@ -74,7 +74,7 @@ void Room94::entry() {
 			_G(flags).NoScroll = true;
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
-			flic_cut(121, CFO_MODE);
+			flic_cut(121);
 			register_cutscene(32);
 
 			_G(fx_blend) = BLEND_NONE;
@@ -136,7 +136,7 @@ int Room94::giveGhostBottle() {
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(62, CFO_MODE);
+	flic_cut(62);
 	_G(fx_blend) = BLEND3;
 	_G(det)->start_detail(5, 255, false);
 	start_aad_wait(541, -1);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 2d33064ba4f..ce5c515c181 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -110,7 +110,7 @@ int Room95::proc2() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(133, CFO_MODE);
+		flic_cut(133);
 		register_cutscene(33);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
 		switch_room(97);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 86e6b8152ef..51aaee7c24f 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -390,7 +390,7 @@ int Room97::proc5() {
 		SHOULD_QUIT_RETURN0;
 	}
 
-	flic_cut(122, CFO_MODE);
+	flic_cut(122);
 	register_cutscene(34);
 
 	g_engine->_sound->playSound(0, 0);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 0dfd63e8df5..053848e1b2a 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -157,7 +157,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							hide_cur();
 							auto_move(3, P_CHEWY);
 							_G(flc)->set_custom_user_function(Room6::cut_serv1);
-							flic_cut(FCUT_005, CFO_MODE);
+							flic_cut(FCUT_005);
 							_G(flc)->remove_custom_user_function();
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);


Commit: 58ee087eddf604b68fd1cfe68881f2769c25052d
    https://github.com/scummvm/scummvm/commit/58ee087eddf604b68fd1cfe68881f2769c25052d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:35-08:00

Commit Message:
CHEWY: Fix loading the correct speech data for item interactions

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 5fd9444fd0a..12ad33446b2 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -32,8 +32,10 @@ namespace Chewy {
 
 bool AtsTxtHeader::load(Common::SeekableReadStream *src) {
 	TxtNr = src->readUint16LE();
-	AMov = src->readUint16LE();
-	CurNr = src->readUint16LE();
+	AMov = src->readSint16LE();
+	CurNr = src->readSint16LE();
+	src->skip(2);
+
 	return true;
 }
 
@@ -767,13 +769,13 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str) {
 
 	bool done1 = false;
 	while (!done1) {
-		Common::MemoryReadStream rs1((const byte *)start_str, AtsTxtHeader::SIZE());
+		Common::MemoryReadStream rs1((const byte *)start_str + 2, AtsTxtHeader::SIZE());
 		_atsv.TxtHeader.load(&rs1);
 
-		if (_atsv.TxtHeader.TxtNr == 0xFEF0 &&
-				_atsv.TxtHeader.AMov == txt_nr) {
+		if (READ_LE_UINT16(start_str) == 0xFEF0 &&
+				_atsv.TxtHeader.TxtNr == txt_nr) {
 			// Found match
-			*str = start_str + AtsTxtHeader::SIZE();
+			*str = start_str + 2 + AtsTxtHeader::SIZE();
 
 			if (_atsv.TxtMode) {
 				Common::MemoryReadStream rs2((const byte *)*str, AtsStrHeader::SIZE());
@@ -784,7 +786,7 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str) {
 			break;
 		}
 
-		start_str += AtsTxtHeader::SIZE() + AtsStrHeader::SIZE();
+		start_str += 2 + AtsTxtHeader::SIZE() + AtsStrHeader::SIZE();
 
 		// Need to iterate over the following string to next entry
 		bool done2 = false;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 6014214684a..3beb5daa931 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -203,13 +203,13 @@ struct AtsStrHeader {
 	uint16 VocNr = 0;
 
 	bool load(Common::SeekableReadStream *src);
-	static constexpr int SIZE() { return 4; }
+	static constexpr int SIZE() { return 2; }
 };
 
 struct AtsTxtHeader {
 	uint16 TxtNr = 0;
-	uint16 AMov = 0;
-	uint16 CurNr = 0;
+	int16 AMov = 0;
+	int16 CurNr = 0;
 
 	bool load(Common::SeekableReadStream *src);
 	static constexpr int SIZE() { return 8; }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 1cc834715df..43bedf310e9 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -520,7 +520,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			// WORKAROUND: There are a few cases in the game with no text,
 			// but a voice sample the game would fall back on even in
 			// subtitles only mode. Don't allow this in ScummVM
-			} else if (VocNr >= 0 && g_engine->_sound->getSpeechSubtitlesMode() != DISPLAY_TXT) {
+			} else if (VocNr != -1 && g_engine->_sound->getSpeechSubtitlesMode() != DISPLAY_TXT) {
 				ret = true;
 				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));


Commit: 883664cf00e7b7c0cedefc922b7999f8103207e6
    https://github.com/scummvm/scummvm/commit/883664cf00e7b7c0cedefc922b7999f8103207e6
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:35-08:00

Commit Message:
CHEWY: More work on CppCheck, Fix an endianness issue (one of maaaaany)

Changed paths:
    engines/chewy/memory.cpp
    engines/chewy/movclass.cpp


diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 955d60deb01..c1f3f976645 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -40,16 +40,14 @@ TafInfo *Memory::taf_adr(const char *filename) {
 	int32 imageCount = res->getChunkCount();
 	uint32 size = res->getAllSize() + imageCount * 8 + sizeof(TafInfo);
 	uint32 kgroesse = imageCount * sizeof(byte *);
-	byte *imgPtr, *tmp1;
-	TafInfo *tinfo = nullptr;
 
-	tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
-	tinfo = (TafInfo *)tmp1;
+	byte *tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
+	TafInfo *tinfo = (TafInfo *)tmp1;
 	tinfo->image = (byte **)(tmp1 + sizeof(TafInfo));
 	tinfo->palette = tmp1 + size;
 	tinfo->anzahl = imageCount;
 	memcpy(tinfo->palette, res->getSpritePalette(), PALETTE_SIZE);
-	imgPtr = tmp1 + sizeof(TafInfo) + kgroesse;
+	byte *imgPtr = tmp1 + sizeof(TafInfo) + kgroesse;
 
 	for (int i = 0; i < imageCount; i++) {
 		tinfo->image[i] = imgPtr;
@@ -70,24 +68,18 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	TafFileHeader header;
 	TafImageHeader iheader;
 	TafSeqInfo *ts_info = nullptr;
-	uint32 ptr;
-	uint32 size;
 	int16 i;
-	int16 *abmess;
-	int16 id;
-	byte *tmp1;
-	byte *sp_ptr;
 
 	rs->seek(0, SEEK_SET);
 	if (header.load(rs)) {
-		id = file->get_id(header.id);
+		int16 id = file->get_id(header.id);
 		if (id == TAFDATEI) {
 			if (header.korrekt > 1) {
 				rs->seek((-(int)((header.count - image_start) * sizeof(uint32))), SEEK_END);
-				ptr = rs->readUint32LE();
+				uint32 ptr = rs->readUint32LE();
 
 				rs->seek(ptr, SEEK_SET);
-				size = 0;
+				uint32 size = 0;
 				for (i = 0; i < image_anz && !_G(modul); i++) {
 					if (iheader.load(rs)) {
 						size += iheader.width * iheader.height;
@@ -101,7 +93,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 					size += image_anz * sizeof(byte *);
 					size += image_anz * sizeof(char *);
 					size += ((uint32)sizeof(TafSeqInfo));
-					tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
+					byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
 
 					if (!_G(modul)) {
 						ts_info = (TafSeqInfo *)tmp1;
@@ -109,18 +101,17 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 						ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
 						ts_info->korrektur = (int16 *)(tmp1 + size);
 						rs->seek(ptr, SEEK_SET);
-						sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo))
-							+ (image_anz * sizeof(char *)));
+						byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo))
+						                       + (image_anz * sizeof(char *)));
 
 						for (i = 0; i < image_anz && !_G(modul); i++) {
 							if (iheader.load(rs)) {
 								ts_info->image[i] = sp_ptr;
-								abmess = (int16 *)sp_ptr;
+								int16 *abmess = (int16 *)sp_ptr;
 								abmess[0] = iheader.width;
 								abmess[1] = iheader.height;
 								sp_ptr += 4;
-								size = (uint32)((uint32)iheader.height) *
-									    ((uint32)iheader.width);
+								size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
 
 								rs->seek(iheader.image, SEEK_SET);
 								file->load_tafmcga(rs, iheader.komp, size, sp_ptr);
@@ -161,8 +152,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 }
 
 void Memory::tff_adr(const char *filename, byte **speicher) {
-	uint32 size;
-	size = file->size(filename, TFFDATEI);
+	uint32 size = file->size(filename, TFFDATEI);
 
 	if (!_G(modul)) {
 		*speicher = (byte *)MALLOC(size);
@@ -170,7 +160,7 @@ void Memory::tff_adr(const char *filename, byte **speicher) {
 			file->load_tff(filename, *speicher);
 			if (_G(modul)) {
 				free(*speicher);
-				*speicher = 0;
+				*speicher = nullptr;
 			}
 		} else {
 			_G(fcode) = NOSPEICHER;
@@ -181,17 +171,18 @@ void Memory::tff_adr(const char *filename, byte **speicher) {
 
 // Only called from init_load() with filename blende.rnd
 byte *Memory::void_adr(const char *filename) {
-	uint32 size = 0;
-	byte *ptr = 0;
-	size = file->size(filename, 200);
+	byte *ptr = nullptr;
+	uint32 size = file->size(filename, 200);
 
 	if (!_G(modul)) {
 		ptr = (byte *)MALLOC(size * sizeof(uint32));
 		if (!_G(modul)) {
-			*(uint32 *)ptr = size;
+			WRITE_LE_INT32(ptr, size);
 			file->void_load(filename, ptr + sizeof(uint32), size);
-			if (_G(modul))
+			if (_G(modul)) {
 				free(ptr);
+				ptr = nullptr;
+			}
 		}
 	}
 
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 4db4abaf9af..ebe52f24313 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -59,10 +59,6 @@ MovClass::~MovClass() {
 }
 
 void MovClass::goto_xy(GotoPkt *gp) {
-	int16 start_feld;
-	int16 ziel_feld;
-	//int16 anz;
-	int16 tmp;
 	_gpkt = gp;
 	_agv.AutoGo = false;
 	_agv.Continue = false;
@@ -72,10 +68,10 @@ void MovClass::goto_xy(GotoPkt *gp) {
 	calc_xy();
 	_plotDelay = 0;
 
-	start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
-	ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
-	tmp = ziel_feld;
-	/*anz = */calc_go(start_feld, &ziel_feld);
+	int16 start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
+	int16 ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
+	int16 tmp = ziel_feld;
+	calc_go(start_feld, &ziel_feld);
 
 	if (tmp != ziel_feld) {
 		get_mov_line();
@@ -100,14 +96,10 @@ void MovClass::goto_xy(GotoPkt *gp) {
 }
 
 int16 MovClass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
-	byte *speicher;
-	int16 i;
-	int16 ok;
-	int16 ret;
-	ret = -1;
+	int16 ret = -1;
 
 	if (_agv.AutoGo == true) {
-		speicher = _gpkt->Mem;
+		byte *speicher = _gpkt->Mem;
 		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
 		if (!_agv.Start) {
 			_agv.Start = _agv.PktAnz;
@@ -149,7 +141,7 @@ int16 MovClass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 							*auto_y = _gpkt->Dy;
 							ret = true;
 						} else {
-							ok = 0;
+							int16 ok = 0;
 							if (_feld1knoten) {
 								_feld1knoten = false;
 								_agv.LastFeld = _agv.AkFeld;
@@ -158,7 +150,7 @@ int16 MovClass::calc_auto_go(int16 x, int16 y, int16 *auto_x, int16 *auto_y) {
 								if (_agv.AkFeld != -1)
 									ok = 1;
 							} else {
-								for (i = 0; i < 4 && !ok; i++) {
+								for (int16 i = 0; i < 4 && !ok; i++) {
 									if (speicher[_agv.AkFeld + _vecTbl[i]] == MOV_LINE_IDX) {
 										if (_agv.AkFeld + _vecTbl[i] != _agv.LastFeld) {
 											_agv.LastFeld = _agv.AkFeld;
@@ -212,32 +204,22 @@ bool MovClass::auto_go_status() {
 }
 
 void MovClass::calc_xy() {
-	int16 ende;
-	int16 i;
-	int16 seite;
-	int16 count;
-	int16 anz;
-	int16 x, y;
-	int16 min_x, min_y;
-	int16 min_steps;
-	int16 aksteps;
 	int16 xvector = 0;
 	int16 yvector = 0;
-	int16 tmp_feld;
 
 	if (!_G(ged)->ged_idx(_gpkt->Dx, _gpkt->Dy, _gpkt->Breite, _gpkt->Mem)) {
-		ende = 0;
-		count = 0;
-		min_x = -1;
-		min_y = -1;
+		int16 ende = 0;
+		int16 count = 0;
+		int16 min_x = -1;
+		int16 min_y = -1;
 
 		while (!ende) {
-			min_steps = 30000;
-			x = _gpkt->Dx - (count + 1) * 8;
-			y = _gpkt->Dy - (count + 1) * 8;
+			int16 min_steps = 30000;
+			int16 x = _gpkt->Dx - (count + 1) * 8;
+			int16 y = _gpkt->Dy - (count + 1) * 8;
 
-			for (seite = 0; seite < 4; seite++) {
-				anz = 2 + (count * 2);
+			for (int16 seite = 0; seite < 4; seite++) {
+				int16 anz = 2 + (count * 2);
 
 				switch (seite) {
 				case S_OBEN:
@@ -264,11 +246,11 @@ void MovClass::calc_xy() {
 					break;
 				}
 
-				for (i = 0; i < anz; i++) {
+				for (int16 i = 0; i < anz; i++) {
 					if (x >= 0 && x < _gpkt->Breite * 8 &&
 					        y >= 0 && y < _gpkt->Hoehe * 8) {
 						if (_G(ged)->ged_idx(x, y, _gpkt->Breite, _gpkt->Mem)) {
-							aksteps = abs(_gpkt->Dx - x);
+							int16 aksteps = abs(_gpkt->Dx - x);
 							aksteps += abs(_gpkt->Dy - y);
 							if (aksteps < min_steps) {
 								min_steps = aksteps;
@@ -285,7 +267,7 @@ void MovClass::calc_xy() {
 			++count;
 			if (min_steps != 30000) {
 				ende = 1;
-				tmp_feld = get_feld_nr(min_x, min_y);
+				int16 tmp_feld = get_feld_nr(min_x, min_y);
 				get_feld_xy(tmp_feld, &_gpkt->Dx, &_gpkt->Dy);
 				_gpkt->Dx += 4;
 				_gpkt->Dy += 4;
@@ -295,14 +277,6 @@ void MovClass::calc_xy() {
 }
 
 short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
-	int16 tmpx;
-	int16 tmpy;
-	int16 tmpz;
-
-	int16 ende;
-	int16 mov_ok;
-	int16 steps;
-	int16 abbruch;
 	int16 new_vector = true;
 	ObjMov om;
 	MovInfo mi;
@@ -313,17 +287,17 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 	mi.XyzStart[0] = om.Xypos[0];
 	mi.XyzStart[1] = om.Xypos[1];
 	get_mov_vector(mi.XyzStart, mi.Vorschub, &om);
-	ende = 0;
-	mov_ok = 0;
-	steps = 0;
-	abbruch = 0;
+	int16 ende = 0;
+	int16 mov_ok = 0;
+	int16 steps = 0;
+	int16 abbruch = 0;
 
 	while (!ende && !abbruch) {
 		if (om.Count > 0) {
 			--om.Count;
-			tmpx = om.Xyvo[0];
-			tmpy = om.Xyvo[1];
-			tmpz = om.Xyvo[2];
+			int16 tmpx = om.Xyvo[0];
+			int16 tmpy = om.Xyvo[1];
+			int16 tmpz = om.Xyvo[2];
 			om.Xyna[0][0] += om.Xyna[0][1];
 			if (om.Xyna[0][1] < 0) {
 				if (om.Xyna[0][0] < -1000) {
@@ -437,36 +411,26 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 }
 
 void MovClass::get_mov_line() {
-	int16 ende;
-	int16 start_feld;
-	int16 tmp_feld;
 	int16 ak_steps;
-	int16 min_steps;
-	int16 vector;
-	int16 abbruch;
-	int16 count_vect;
-	int16 count;
-	int16 y_richtung;
-	byte *speicher;
 	_gml.GotoFeld = -1;
 	_gml.MLineFeld = -1;
 	if (_gpkt->Ebenen > 1) {
-		speicher = _gpkt->Mem;
+		byte *speicher = _gpkt->Mem;
 
 		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
 
-		start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
-		ende = 0;
-		count = 0;
-		min_steps = 30000;
-		count_vect = DOWN_VECT;
-		y_richtung = Y_DOWN;
+		int16 start_feld = get_feld_nr(_gpkt->Sx, _gpkt->Sy);
+		int16 ende = 0;
+		int16 count = 0;
+		int16 min_steps = 30000;
+		int16 count_vect = DOWN_VECT;
+		int16 y_richtung = Y_DOWN;
 		while (!ende) {
 
-			tmp_feld = start_feld + count * count_vect;
+			int16 tmp_feld = start_feld + count * count_vect;
 			if (_G(ged)->ged_idx(tmp_feld, _gpkt->Breite, _gpkt->Mem)) {
-				abbruch = 0;
-				vector = 0;
+				int16 abbruch = 0;
+				int16 vector = 0;
 				while ((tmp_feld % _gpkt->Breite) < (_gpkt->Breite - 1) && !abbruch)
 				{
 					if (_G(ged)->ged_idx(tmp_feld + vector, _gpkt->Breite, _gpkt->Mem)) {
@@ -520,52 +484,39 @@ void MovClass::get_mov_line() {
 }
 
 void MovClass::calc_mov_line_xit(int16 start_feld) {
-	int16 calc_feld;
-	int16 last_feld;
-	int16 ziel_feld;
 	int16 tmp_feld;
 	int16 i;
-	int16 found;
-	int16 steps;
 	int16 dest_steps;
 
-	int16 ok;
 	int16 k;
 	//int16 found_min;
 	int16 TmpKnPkt[MAX_KNOTEN_PKT];
-	int16 min_step_unerreicht;
 	int16 dir_unerreicht = 0;
 	int16 KnPkt_unrreicht[MAX_KNOTEN_PKT];
 	int16 feld_unerreicht = 0;
 	int16 knoten_felder[MAX_KNOTEN_PKT][6];
 
-	int16 ak_knoten;
-	int16 knoten_flag;
-	int16 tbl_dir;
-	int16 tbl_ptr;
-	int16 dir;
-	byte *speicher;
 	for (i = 0; i < MAX_KNOTEN_PKT; i++)
 		TmpKnPkt[i] = -1;
 	if (_gpkt->Ebenen > 1) {
 		memset((char *)knoten_felder, -1, MAX_KNOTEN_PKT * 6);
-		speicher = _gpkt->Mem;
+		byte *speicher = _gpkt->Mem;
 		speicher += (_gpkt->Breite * _gpkt->Hoehe) * _gpkt->AkMovEbene;
 		_mle.Steps = 30000;
-		min_step_unerreicht = 30000;
+		int16 min_step_unerreicht = 30000;
 		_mle.FNr = -1;
-		ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
-		calc_feld = start_feld;
-		last_feld = start_feld;
-		steps = 0;
-		found = 0;
-		ak_knoten = -1;
-		tbl_dir = 1;
-		tbl_ptr = 0;
-		knoten_flag = 0;
+		int16 ziel_feld = get_feld_nr(_gpkt->Dx, _gpkt->Dy);
+		int16 calc_feld = start_feld;
+		int16 last_feld = start_feld;
+		int16 steps = 0;
+		int16 found = 0;
+		int16 ak_knoten = -1;
+		int16 tbl_dir = 1;
+		int16 tbl_ptr = 0;
+		int16 knoten_flag = 0;
 
 		//found_min = 0;
-		dir = 30000;
+		int16 dir = 30000;
 		while (!found) {
 			tmp_feld = ziel_feld;
 			calc_go(calc_feld, &tmp_feld);
@@ -596,7 +547,7 @@ void MovClass::calc_mov_line_xit(int16 start_feld) {
 						KnPkt_unrreicht[i] = TmpKnPkt[i];
 				}
 			}
-			ok = 0;
+			int16 ok = 0;
 			for (i = 0; i < 4 && !ok; i++) {
 				if (speicher[calc_feld + _vecTbl[tbl_ptr + i * tbl_dir]] == MOV_LINE_IDX)
 				{
@@ -712,23 +663,13 @@ void MovClass::get_feld_xy(int16 fnr, int16 *x, int16 *y) {
 }
 
 void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
-	uint8 xvector;
-	uint8 yvector;
-	uint8 zvector;
-	float xstep;
-	float ystep;
-	float zstep;
-	int16 tmp;
-	int16 absx, absy, absz;
-	int16 x, y, z, x1, y1, z1;
-
 	if (vorschub > 0) {
-		x = xyz[0];
-		y = xyz[1];
-		z = xyz[2];
-		x1 = xyz[3];
-		y1 = xyz[4];
-		z1 = xyz[5];
+		int16 x = xyz[0];
+		int16 y = xyz[1];
+		int16 z = xyz[2];
+		int16 x1 = xyz[3];
+		int16 y1 = xyz[4];
+		int16 z1 = xyz[5];
 		om->Xypos[0] = x;
 		om->Xypos[1] = y;
 		om->Xypos[2] = z;
@@ -736,6 +677,7 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 		y = y - y1;
 		z = z - z1;
 
+		uint8 xvector;
 		if (x < 0) {
 			xvector = 1;
 			--x;
@@ -743,6 +685,9 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 			xvector = 0;
 			++x;
 		}
+
+
+		uint8 yvector;
 		if (y < 0) {
 			yvector = 1;
 			--y;
@@ -750,6 +695,8 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 			yvector = 0;
 			++y;
 		}
+
+		uint8 zvector;
 		if (z < 0) {
 			zvector = 1;
 			--z;
@@ -758,9 +705,11 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 			++z;
 		}
 
-		absx = abs(x);
-		absy = abs(y);
-		absz = abs(z);
+		int16 absx = abs(x);
+		int16 absy = abs(y);
+		int16 absz = abs(z);
+		float xstep;
+		float ystep;
 		if (absx < absy) {
 			xstep = (float)absx / ((float)absy / (float)vorschub);
 			ystep = vorschub;
@@ -770,6 +719,8 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 			ystep = (float)absy / ((float)absx / (float)vorschub);
 			om->Count = (int16)((float) x / (float)xstep);
 		}
+
+		float zstep;
 		om->Count = abs(om->Count);
 		if (!om->Count) {
 			zstep = (float)absz / 1.0;
@@ -786,7 +737,7 @@ void MovClass::get_mov_vector(int16 *xyz, int16 vorschub, ObjMov *om) {
 		om->Xyvo[0] = (int16)xstep;
 		om->Xyvo[1] = (int16)ystep;
 		om->Xyvo[2] = (int16)zstep;
-		tmp = (int16)((float)xstep * 1000.0);
+		int16 tmp = (int16)((float)xstep * 1000.0);
 		om->Xyna[0][1] = tmp - (om->Xyvo[0] * 1000);
 		om->Xyna[0][0] = 0;
 		tmp = (int16)((float)ystep * 1000.0);


Commit: 2123e8887f80ecb2752b4ef6fb3bee98f6c0bc7b
    https://github.com/scummvm/scummvm/commit/2123e8887f80ecb2752b4ef6fb3bee98f6c0bc7b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:35-08:00

Commit Message:
CHEWY: Remove unused functions

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/flic.h


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index f8521d07b14..04ecdbc70e5 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -105,65 +105,6 @@ Flic::~Flic() {
 	delete[] _soundBuffer;
 }
 
-void Flic::play(const char *fname, byte *vscreen, byte *load_p) {
-
-	Stream *lhandle = File::open(fname);
-	if (lhandle) {
-		play(lhandle, vscreen, load_p);
-		delete lhandle;
-	} else {
-		error("flic error");
-	}
-}
-
-int16 Flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-	float ende;
-	int16 ret = 0;
-
-	_loadBuffer = load_p;
-	_virtScreen = vscreen + 4;
-
-	if (_flicHeader.load(rs)) {
-		if (_flicHeader.type == FLC) {
-			//trace_mode = false;
-			_fadeFlag = false;
-			_fadeDelay = 0;
-			_clsFlag = false;
-			_currentFrame = 0;
-			for (uint16 i = 0; (i < _flicHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
-				if (!_frameHeader.load(rs)) {
-					error("flic error");
-				} else {
-					if (_frameHeader.type != PREFIX) {
-						size_t tmp_size = ((size_t)_frameHeader.size) - sizeof(FrameHead);
-						float start = (float)g_system->getMillis(); // clock()
-						start /= 0.05f;
-						start += _flicHeader.speed;
-						if (tmp_size) {
-							if (rs->read(_loadBuffer, tmp_size) != tmp_size) {
-								error("flic error");
-							} else {
-								ret = decode_frame();
-							}
-						}
-
-						do {
-							ende = (float)g_system->getMillis(); // clock()
-							ende /= 0.05f;
-						} while (ende <= start);
-						++_currentFrame;
-					} else {
-						rs->seek((int)_frameHeader.size - FrameHead::SIZE(), SEEK_CUR);
-					}
-				}
-			}
-		}
-	}
-
-	return ret;
-}
-
 int16 Flic::decode_frame() {
 	ChunkHead chunk_header;
 	int16 action_ret = 0;
diff --git a/engines/chewy/flic.h b/engines/chewy/flic.h
index 55f51dd0543..54e17b03109 100644
--- a/engines/chewy/flic.h
+++ b/engines/chewy/flic.h
@@ -79,9 +79,7 @@ class Flic {
 public:
 	Flic();
 	~Flic();
-	void play(const char *fname, byte *vscreen, byte *load_p);
 
-	int16 play(Common::Stream *handle, byte *vscreen, byte *load_p);
 	void set_flic_user_function(int16(*user_funktion)(int16 key));
 	void remove_flic_user_function();
 	int16 custom_play(CustomInfo *ci);


Commit: b292ea84bf09e739ecee08426f26569e7ac322a0
    https://github.com/scummvm/scummvm/commit/b292ea84bf09e739ecee08426f26569e7ac322a0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:36-08:00

Commit Message:
CHEWY: Use enums for video IDs

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/inits.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 53e1eef0434..8e2d4fe82ad 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -97,7 +97,7 @@ void MainMenu::execute() {
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(out)->set_pointer(_G(workptr));
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(135);
+			flic_cut(FCUT_135);
 			break;
 
 		case MM_LOAD_GAME:
@@ -123,7 +123,7 @@ void MainMenu::execute() {
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(flags).NoPalAfterFlc = true;
 			_G(flc)->set_custom_user_function(creditsFn);
-			flic_cut(159);
+			flic_cut(FCUT_159);
 			_G(flc)->remove_custom_user_function();
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			Dialogs::Credits::execute();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 160dab26141..fc37112bf96 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -409,7 +409,7 @@ void show_intro() {
 	if (!ConfMan.getBool("shown_intro")) {
 		ConfMan.setBool("shown_intro", true);
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(135);
+		flic_cut(FCUT_135);
 	}
 }
 
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 06693f1f4c8..e3577071967 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -182,7 +182,7 @@ void Room49::use_boy_cigar() {
 	_G(flags).NoScroll = true;
 
 	auto_scroll(164, 0);
-	flic_cut(67);
+	flic_cut(FCUT_067);
 	register_cutscene(17);
 	
 	_G(room)->set_timer_status(255, TIMER_STOP);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index a9f4fa18267..67bb34d0e9c 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -49,7 +49,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(108);
+		flic_cut(FCUT_108);
 		show_cur();
 		switch_room(51);
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 83574a626c0..2def1306ca4 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -172,7 +172,7 @@ void Room51::setup_func() {
 				_G(flags).NoPalAfterFlc = true;
 				_G(out)->set_pointer(nullptr);
 				_G(out)->cls();
-				flic_cut(115);
+				flic_cut(FCUT_115);
 				register_cutscene(28);
 				
 				switch_room(91);
@@ -287,7 +287,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(114);
+			flic_cut(FCUT_114);
 			set_person_pos(115, 144, P_CHEWY, P_LEFT);
 			_G(fx_blend) = BLEND3;
 			set_up_screen(NO_SETUP);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index d8bcd55020e..12395998e05 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -122,7 +122,7 @@ void Room56::entry() {
 				if (_G(spieler).flags33_80) {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
-					flic_cut(113);
+					flic_cut(FCUT_113);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
 					load_chewy_taf(CHEWY_NORMAL);
 					_G(spieler).mi[P_HOWARD] = 0;
@@ -163,7 +163,7 @@ void Room56::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(116);
+		flic_cut(FCUT_116);
 		register_cutscene(21);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
@@ -174,7 +174,7 @@ void Room56::entry() {
 	case 2:
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
-		flic_cut(110);
+		flic_cut(FCUT_110);
 		_G(spieler).flags34_20 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
 		switch_room(90);
@@ -299,7 +299,7 @@ int16 Room56::use_kneipe() {
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_detail_wait(12, 3, ANI_VOR);
-				flic_cut(75);
+				flic_cut(FCUT_075);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
 				_G(det)->start_detail(10, 6, ANI_VOR);
@@ -330,7 +330,7 @@ int16 Room56::use_kneipe() {
 		if (_G(spieler).flags34_10) {
 			_G(spieler).flags33_80 = true;
 			auto_move(4, P_CHEWY);
-			flic_cut(111);
+			flic_cut(FCUT_111);
 			_G(fx_blend) = BLEND3;
 			start_aad_wait(522, -1);
 			start_spz_wait(66, 1, false, P_CHEWY);
@@ -354,7 +354,7 @@ int16 Room56::use_kneipe() {
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		_G(flc)->set_custom_user_function(proc1);
-		flic_cut(112);
+		flic_cut(FCUT_112);
 		_G(flc)->remove_custom_user_function();
 		register_cutscene(31);
 
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 0c48a9a5c11..df8ca6e5701 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -59,7 +59,7 @@ void Room78::entry() {
 			set_up_screen(DO_SETUP);
 		}
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(101);
+		flic_cut(FCUT_101);
 		destRoom = 79;
 	} else {
 		_G(det)->start_detail(0, 255, false);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 88e80d198f6..3c2df204b9a 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -84,18 +84,18 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(5);
 		_G(det)->show_static_spr(6);
 		start_aad_wait(474, -1);
-		flic_cut(90);
+		flic_cut(FCUT_090);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(91);
+		flic_cut(FCUT_091);
 		_G(det)->hide_static_spr(6);
 		_G(spieler).scrollx = 25;
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(475, -1);
 		start_aad(476, -1);
 		_G(flc)->set_custom_user_function(Room87::proc5);
-		flic_cut(89);
+		flic_cut(FCUT_089);
 		register_cutscene(25);
 
 		_G(flc)->remove_custom_user_function();
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 328e0804cc2..cb20be2d0eb 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -84,7 +84,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(flags).NoScroll = true;
 		auto_scroll(246, 0);
 		proc3(false);
-		flic_cut(92);
+		flic_cut(FCUT_092);
 		_G(flags).NoScroll = false;
 		auto_move(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 19cb0913226..cd3e45d765c 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -158,22 +158,22 @@ int Room87::proc4() {
 
 	hide_cur();
 	auto_move(1, P_CHEWY);
-	flic_cut(93);
+	flic_cut(FCUT_093);
 	_G(flc)->set_custom_user_function(proc3);
-	flic_cut(94);
+	flic_cut(FCUT_094);
 	_G(flc)->remove_custom_user_function();
 	_G(flc)->set_custom_user_function(proc5);
 	start_aad(472);
-	flic_cut(95);
+	flic_cut(FCUT_095);
 	_G(flc)->remove_custom_user_function();
-	flic_cut(96);
+	flic_cut(FCUT_096);
 	_G(det)->hide_static_spr(2);
 	_G(det)->start_detail(2, 255, false);
 	start_aad_wait(471, -1);
-	flic_cut(97);
-	flic_cut(98);
-	flic_cut(99);
-	flic_cut(100);
+	flic_cut(FCUT_097);
+	flic_cut(FCUT_098);
+	flic_cut(FCUT_099);
+	flic_cut(FCUT_100);
 	_G(spieler).PersonGlobalDia[P_HOWARD] = -1;
 	_G(spieler).PersonDiaRoom[P_HOWARD] = false;
 	_G(spieler).flags32_10 = true;
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index abbec02778e..cd3eb96dcda 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -101,7 +101,7 @@ int Room88::proc3() {
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
-			flic_cut(87);
+			flic_cut(FCUT_087);
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
@@ -123,7 +123,7 @@ int Room88::proc3() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(88);
+		flic_cut(FCUT_088);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).flags32_1 = true;
 		_G(out)->raster_col(0, 0, 0, 0);
@@ -133,7 +133,7 @@ int Room88::proc3() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(86);
+		flic_cut(FCUT_086);
 		register_cutscene(24);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 34b6460ffcb..04e0725bf04 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -62,11 +62,11 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103);
+		flic_cut(FCUT_103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(118);
+		flic_cut(FCUT_118);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 538;
 		switch_room(92);
@@ -81,7 +81,7 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(117);
+		flic_cut(FCUT_117);
 		register_cutscene(35);
 
 		_G(fx_blend) = BLEND3;
@@ -89,7 +89,7 @@ void Room89::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(119);
+		flic_cut(FCUT_119);
 
 		// Squash screen into a single point at the center
 		int edi = -20;
@@ -180,7 +180,7 @@ int Room89::proc2() {
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(102);
+	flic_cut(FCUT_102);
 	register_cutscene(26);
 
 	_G(spieler).SVal1 = 89;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 55897420d6a..658f55c1e56 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -295,7 +295,7 @@ int Room90::shootControlUnit() {
 	start_detail_wait(13, 1, ANI_VOR);
 	_G(flc)->set_custom_user_function(Room90::proc5);
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(107);
+	flic_cut(FCUT_107);
 	_G(flc)->remove_custom_user_function();
 	_G(spieler).scrollx = 0;
 	set_person_pos(76, 145, P_CHEWY, P_LEFT);
@@ -334,7 +334,7 @@ int Room90::useSurimyOnWreck() {
 	_G(maus_links_click) = false;
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
-	flic_cut(109);
+	flic_cut(FCUT_109);
 	register_cutscene(29);
 
 	_G(det)->hide_static_spr(4);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 21a4c7a5ec2..20bcc51c7af 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -40,7 +40,7 @@ void Room92::entry() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103);
+		flic_cut(FCUT_103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
@@ -49,20 +49,20 @@ void Room92::entry() {
 		break;
 	case 488:
 		_G(flags).StaticUseTxt = true;
-		flic_cut(106);
+		flic_cut(FCUT_106);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(105);
+		flic_cut(FCUT_105);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(104);
+		flic_cut(FCUT_104);
 		register_cutscene(27);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(103);
+		flic_cut(FCUT_103);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
@@ -72,7 +72,7 @@ void Room92::entry() {
 		break;
 	case 538:
 		_G(flags).StaticUseTxt = true;
-		flic_cut(106);
+		flic_cut(FCUT_106);
 		show_person();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
 		_G(spieler).flags35_8 = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 583bcc1a719..8a94080d1cb 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -55,7 +55,7 @@ void Room94::entry() {
 		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
-		flic_cut(120);
+		flic_cut(FCUT_120);
 		register_cutscene(30);
 		_G(fx_blend) = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
@@ -74,7 +74,7 @@ void Room94::entry() {
 			_G(flags).NoScroll = true;
 			_G(out)->set_pointer(nullptr);
 			_G(out)->cls();
-			flic_cut(121);
+			flic_cut(FCUT_121);
 			register_cutscene(32);
 
 			_G(fx_blend) = BLEND_NONE;
@@ -136,7 +136,7 @@ int Room94::giveGhostBottle() {
 	_G(out)->set_pointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
-	flic_cut(62);
+	flic_cut(FCUT_062);
 	_G(fx_blend) = BLEND3;
 	_G(det)->start_detail(5, 255, false);
 	start_aad_wait(541, -1);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index ce5c515c181..f280f92ab9f 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -110,7 +110,7 @@ int Room95::proc2() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		flic_cut(133);
+		flic_cut(FCUT_133);
 		register_cutscene(33);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
 		switch_room(97);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 51aaee7c24f..2f616fd0031 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -390,7 +390,7 @@ int Room97::proc5() {
 		SHOULD_QUIT_RETURN0;
 	}
 
-	flic_cut(122);
+	flic_cut(FCUT_122);
 	register_cutscene(34);
 
 	g_engine->_sound->playSound(0, 0);


Commit: a085db8a7babd06528ab85abc58e057aee5c0b73
    https://github.com/scummvm/scummvm/commit/a085db8a7babd06528ab85abc58e057aee5c0b73
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:36-08:00

Commit Message:
CHEWY: Move all custom video callbacks to r_event.cpp

This will help to gather everything in a single place, in order to
aid in rewriting this functionality. This includes all videos with
custom callbacks, set_custom_user_function() and set_flic_user_function()

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/main_menu.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room10.h
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room28.h
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room37.h
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room39.h
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room51.h
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room54.h
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room55.h
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room64.h
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 8e2d4fe82ad..dccd8b94c79 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -122,9 +122,7 @@ void MainMenu::execute() {
 		case MM_CREDITS:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			_G(flags).NoPalAfterFlc = true;
-			_G(flc)->set_custom_user_function(creditsFn);
 			flic_cut(FCUT_159);
-			_G(flc)->remove_custom_user_function();
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			Dialogs::Credits::execute();
 			break;
diff --git a/engines/chewy/dialogs/main_menu.h b/engines/chewy/dialogs/main_menu.h
index a4c33a67d1e..41ef16e5453 100644
--- a/engines/chewy/dialogs/main_menu.h
+++ b/engines/chewy/dialogs/main_menu.h
@@ -52,11 +52,6 @@ private:
 	 */
 	static void animate();
 
-	/**
-	 * Support function for controlling the credits flic playback
-	 */
-	static int16 creditsFn(int16 key);
-
 	/**
 	 * Starts a new game
 	 */
@@ -87,6 +82,11 @@ public:
 	 * Plays the game
 	 */
 	static void playGame();
+
+	/**
+	 * Support function for controlling the credits flic playback
+	 */
+	static int16 creditsFn(int16 key);
 };
 
 } // namespace Dialogs
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index a9e07588ab3..c6a0f956ba4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "common/system.h"
+#include "chewy/dialogs/main_menu.h"
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
@@ -939,6 +940,50 @@ void flic_cut(int16 nr) {
 			g_engine->playVideo(nr);
 			break;
 
+		case FCUT_005:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room6::cut_serv1);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
+		case FCUT_006:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room10::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
+		case FCUT_010:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room11::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
+		case FCUT_011:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room11::cut_serv_2);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
 		case FCUT_019_01:
 		case FCUT_019_02:
 		case FCUT_019_03:
@@ -968,10 +1013,21 @@ void flic_cut(int16 nr) {
 			break;
 
 		case FCUT_032:
+		case FCUT_034:
 		case FCUT_035:
 		case FCUT_036:
 		case FCUT_037:
 		case FCUT_040:
+			// TV
+
+			if (nr == FCUT_034) {
+				_G(sndPlayer)->stopMod();
+				_G(currentSong) = -1;
+			}
+
+			if (nr != FCUT_036)
+				_G(flc)->set_custom_user_function(Room39::setup_func);
+
 			do {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
@@ -981,21 +1037,34 @@ void flic_cut(int16 nr) {
 				g_engine->playVideo(nr);
 #endif
 			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
+
+			if (nr != FCUT_036)
+				_G(flc)->remove_custom_user_function();
 			break;
 
-		case FCUT_034:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
+		case FCUT_038:
+		case FCUT_039:
+			// TV
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room39::setup_func);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
 
-			do {
+		case FCUT_047:
+		case FCUT_048:
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(nr == FCUT_047 ? Room37::cut_serv1 : Room37::cut_serv2);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
 #else
-				g_engine->playVideo(nr);
+			g_engine->playVideo(nr);
 #endif
-			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 			break;
 
 		case FCUT_053:
@@ -1010,6 +1079,18 @@ void flic_cut(int16 nr) {
 			g_engine->playVideo(nr);
 			break;
 
+		case FCUT_055:
+		case FCUT_056:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(nr == FCUT_055 ? Room28::cut_serv2 : Room28::cut_serv1);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
 		case FCUT_058:
 			load_room_music(255);
 			g_engine->playVideo(FCUT_058);
@@ -1025,7 +1106,7 @@ void flic_cut(int16 nr) {
 				if (!_G(modul)) {
 					start_aad(623, -1);
 #ifndef NEW_VIDEO_CODE
-					_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_061);
+					_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 					_G(flc)->set_custom_user_function(Room43::setup_func);
 					_G(flc)->custom_play(&_G(Ci));
 					_G(flc)->remove_custom_user_function();
@@ -1043,6 +1124,17 @@ void flic_cut(int16 nr) {
 			while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT);
 			break;
 
+		case FCUT_064:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room28::cut_serv1);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
 		case FCUT_065:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
@@ -1053,20 +1145,85 @@ void flic_cut(int16 nr) {
 			_G(currentSong) = -1;
 			break;
 
+		case FCUT_068:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room51::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+
+		case FCUT_069:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room54::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+
+		case FCUT_070:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room55::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
-			g_engine->playVideo(FCUT_071);
+			g_engine->playVideo(nr);
 			break;
 
+		case FCUT_078:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room64::cut_sev);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+
 		case FCUT_083:
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				g_engine->playVideo(FCUT_083);
 				SHOULD_QUIT_RETURN;
 			}
+			break;
+
+		case FCUT_089:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room87::proc5);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
+		case FCUT_094:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room87::proc3);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
 
 		case FCUT_095:
+			_G(flc)->set_custom_user_function(Room87::proc5);
+
 			while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
@@ -1075,15 +1232,30 @@ void flic_cut(int16 nr) {
 				g_engine->playVideo(nr);
 #endif
 			}
+
+			_G(flc)->remove_custom_user_function();
+			break;
+
+		case FCUT_107:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Room90::proc5);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
 			break;
 
 		case FCUT_112:
 			g_engine->_sound->setMusicVolume(32 * Audio::Mixer::kMaxChannelVolume / 120);
 #ifndef NEW_VIDEO_CODE
+			_G(flc)->set_custom_user_function(Room56::proc1);
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->custom_play(&_G(Ci));
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
 #else
 			g_engine->playVideo(nr);
 			g_engine->playVideo(nr);
@@ -1115,10 +1287,21 @@ void flic_cut(int16 nr) {
 			}
 			break;
 
-		case 135:
+		case FCUT_135:
 			flic_proc1();
 			break;
 
+		case FCUT_159:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_custom_user_function(Dialogs::MainMenu::creditsFn);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_custom_user_function();
+#else
+			g_engine->playVideo(nr);
+#endif
+			break;
+
 		case 1003:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			print_rows(590);
@@ -1236,38 +1419,38 @@ void flic_cut(int16 nr) {
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 43);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_043);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(43);
+				g_engine->playVideo(FCUT_043);
 #endif
 			}
 			break;
 
 		case 1048:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 50);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_050);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(50);
+			g_engine->playVideo(FCUT_050);
 #endif
 
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 48);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_048);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(48);
+				g_engine->playVideo(FCUT_048);
 #endif
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 49);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_049);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(49);
+				g_engine->playVideo(FCUT_049);
 #endif
 			}
 
@@ -1327,28 +1510,28 @@ void flic_cut(int16 nr) {
 			}
 			if (ret != -1) {
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 60);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_060);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(60);
+				g_engine->playVideo(FCUT_060);
 #endif
 			}
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 61);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_061);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(61);
+				g_engine->playVideo(FCUT_061);
 #endif
 			}
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 62);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_062);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(62);
+				g_engine->playVideo(FCUT_062);
 #endif
 			}
 			break;
@@ -1371,30 +1554,30 @@ void flic_cut(int16 nr) {
 
 		case 1068:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 68);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_068);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(68);
+			g_engine->playVideo(FCUT_068);
 #endif
 
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 70);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_070);
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(70);
+				g_engine->playVideo(FCUT_070);
 #endif
 			}
 			break;
 
 		case 1069:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 69);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_069);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(69);
+			g_engine->playVideo(FCUT_069);
 #endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
@@ -1438,10 +1621,10 @@ void flic_cut(int16 nr) {
 
 		case 1087:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 87);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_087);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(87);
+			g_engine->playVideo(FCUT_087);
 #endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
@@ -1458,19 +1641,19 @@ void flic_cut(int16 nr) {
 
 		case 1088:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 88);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_088);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(88);
+			g_engine->playVideo(FCUT_088);
 #endif
 
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 86);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_086);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(86);
+				g_engine->playVideo(FCUT_086);
 #endif
 				_G(sndPlayer)->stopMod();
 			}
@@ -1512,12 +1695,12 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_107);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(107);
+			g_engine->playVideo(FCUT_107);
 #endif
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 109);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_109);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
@@ -1528,21 +1711,21 @@ void flic_cut(int16 nr) {
 
 		case 1108:
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 108);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_108);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(108);
+			g_engine->playVideo(FCUT_108);
 #endif
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 115);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_115);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->playVideo(115);
+			g_engine->playVideo(FCUT_115);
 #endif
 			break;
 
@@ -1552,23 +1735,23 @@ void flic_cut(int16 nr) {
 			load_room_music(257);
 			g_engine->_sound->setMusicVolume(20 * Audio::Mixer::kMaxChannelVolume / 120);
 #ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 110);
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_110);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(110);
+			g_engine->playVideo(FCUT_110);
 #endif
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				g_engine->_sound->setMusicVolume(63 * Audio::Mixer::kMaxChannelVolume / 120);
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 112);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_112);
 				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(sndPlayer)->setMusicMasterVol(63);
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->playVideo(112);
+			g_engine->playVideo(FCUT_112);
 #endif
 			_G(sndPlayer)->stopMod();
 			break;
@@ -1588,14 +1771,14 @@ void flic_cut(int16 nr) {
 
 		case 1117:
 #ifndef NEW_VIDEO_CODE
-			if (_G(mem)->file->select_pool_item(_G(Ci).Handle, 117) != (uint16)-1) {
+			if (_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_117) != (uint16)-1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 119);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_119);
 				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			g_engine->playVideo(119);
+			g_engine->playVideo(FCUT_119);
 #endif
 			break;
 
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index e0dfde5ebe3..b7ea4520744 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -53,9 +53,7 @@ void Room10::get_surimy() {
 	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
-	_G(flc)->set_custom_user_function(cut_serv);
 	flic_cut(FCUT_006);
-	_G(flc)->remove_custom_user_function();
 	_G(spieler).R10SurimyOk = true;
 	_G(room)->set_timer_status(3, TIMER_STOP);
 	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room10.h b/engines/chewy/rooms/room10.h
index 76e94b6e4a9..6c0c8cb65f5 100644
--- a/engines/chewy/rooms/room10.h
+++ b/engines/chewy/rooms/room10.h
@@ -26,11 +26,11 @@ namespace Chewy {
 namespace Rooms {
 
 class Room10 {
-	static int16 cut_serv(int16 frame);
-
 public:
 	static void entry();
 	static void get_surimy();
+
+	static int16 cut_serv(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index d478d1aeb27..586b285f7ad 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -147,11 +147,9 @@ int16 Room11::scanner() {
 			set_up_screen(DO_SETUP);
 			actionFl = true;
 
-			_G(flc)->set_custom_user_function(cut_serv_2);
 			start_aad(105, 0);
 			flic_cut(FCUT_011);
 			register_cutscene(4);
-			_G(flc)->remove_custom_user_function();
 			_G(spieler).R11TerminalOk = true;
 			cur_2_inventory();
 			_G(menu_item) = CUR_TALK;
@@ -162,9 +160,7 @@ int16 Room11::scanner() {
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
-				_G(flc)->set_custom_user_function(cut_serv);
 				flic_cut(FCUT_010);
-				_G(flc)->remove_custom_user_function();
 				start_aad_wait(20, -1);
 			} else {
 				actionFl = true;
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index ba38a4d7c16..637172524e2 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -29,8 +29,6 @@ class Room11 {
 private:
 	static void bork_zwinkert();
 	static void chewy_bo_use();
-	static int16 cut_serv(int16 frame);
-	static int16 cut_serv_2(int16 frame);
 
 public:
 	static void entry();
@@ -41,6 +39,9 @@ public:
 	static void put_card();
 	static int16 scanner();
 	static void talk_debug();
+
+	static int16 cut_serv(int16 frame);
+	static int16 cut_serv_2(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 9be9579d5e1..f2615d37e39 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -76,9 +76,7 @@ void Room28::entry(int16 eib_nr) {
 					_G(flags).NoScroll = true;
 
 					auto_scroll(0, 0);
-					_G(flc)->set_flic_user_function(cut_serv1);
 					flic_cut(FCUT_064);
-					_G(flc)->remove_flic_user_function();
 					_G(det)->show_static_spr(6);
 
 					if (!_G(spieler).R40TeilKarte) {
@@ -218,12 +216,8 @@ void Room28::use_surimy() {
 		auto_scroll(0, 0);
 		_G(spieler).R28SurimyCar = true;
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		_G(flc)->set_flic_user_function(cut_serv2);
 		flic_cut(FCUT_055);
-		_G(flc)->remove_flic_user_function();
-		_G(flc)->set_flic_user_function(cut_serv1);
 		flic_cut(FCUT_056);
-		_G(flc)->remove_flic_user_function();
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
 		_G(atds)->set_ats_str(205, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room28.h b/engines/chewy/rooms/room28.h
index 07d3f27b65e..196e627103b 100644
--- a/engines/chewy/rooms/room28.h
+++ b/engines/chewy/rooms/room28.h
@@ -31,8 +31,6 @@ class Room28 {
 private:
 	static void haendler();
 	static void setup_func();
-	static int16 cut_serv1(int16 frame);
-	static int16 cut_serv2(int16 frame);
 	static void get_pump();
 
 public:
@@ -43,6 +41,9 @@ public:
 	static void use_surimy();
 	static void set_pump();
 	static int16 use_breifkasten();
+
+	static int16 cut_serv1(int16 frame);
+	static int16 cut_serv2(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index b8308326b05..5a1a41c0609 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -113,9 +113,7 @@ short Room37::use_wippe() {
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
-			_G(flc)->set_flic_user_function(cut_serv1);
 			flic_cut(FCUT_047);
-			_G(flc)->remove_flic_user_function();
 			_G(flags).NoScroll = false;
 			show_cur();
 			_G(spieler).scrollx = 269;
@@ -179,9 +177,7 @@ int16 Room37::use_glas() {
 			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
-			_G(flc)->set_flic_user_function(cut_serv2);
 			flic_cut(FCUT_048);
-			_G(flc)->remove_flic_user_function();
 			flic_cut(FCUT_049);
 			invent_2_slot(GEBISS_INV);
 			_G(det)->hide_static_spr(9);
diff --git a/engines/chewy/rooms/room37.h b/engines/chewy/rooms/room37.h
index 777d8858dae..743f556a337 100644
--- a/engines/chewy/rooms/room37.h
+++ b/engines/chewy/rooms/room37.h
@@ -30,8 +30,6 @@ namespace Rooms {
 class Room37 {
 private:
 	static void setup_func();
-	static int16 cut_serv1(int16 frame);
-	static int16 cut_serv2(int16 frame);
 	static void hahn_dia();
 	static void dog_bell();
 
@@ -43,6 +41,9 @@ public:
 	static int16 use_glas();
 	static void talk_hahn();
 	static void use_hahn();
+
+	static int16 cut_serv1(int16 frame);
+	static int16 cut_serv2(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 0021eec8be9..1c3640b1b7b 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -320,9 +320,7 @@ void Room39::look_tv(bool cls_mode) {
 					_flag = true;
 			}
 
-			_G(flc)->set_custom_user_function(setup_func);
 			flic_cut(flic_nr);
-			_G(flc)->remove_custom_user_function();
 
 			if (cls_mode) {
 				_G(out)->cls();
diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
index 82549f539c1..516dcc34f29 100644
--- a/engines/chewy/rooms/room39.h
+++ b/engines/chewy/rooms/room39.h
@@ -29,7 +29,6 @@ class Room39 {
 private:
 	static bool _flag;
 
-	static int16 setup_func(int16 frame);
 	static void ok();
 	static void set_tv();
 
@@ -39,6 +38,8 @@ public:
 	static short use_howard();
 	static void talk_howard();
 	static void look_tv(bool cls_mode);
+
+	static int16 setup_func(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 2def1306ca4..53ce5f55c11 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -260,10 +260,8 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
 					_G(flags).NoPalAfterFlc = true;
-					_G(flc)->set_flic_user_function(cut_serv);
 					_G(det)->show_static_spr(16);
 					flic_cut(FCUT_068);
-					_G(flc)->remove_flic_user_function();
 
 					_G(det)->hide_static_spr(16);
 					_G(flags).NoPalAfterFlc = false;
diff --git a/engines/chewy/rooms/room51.h b/engines/chewy/rooms/room51.h
index 8516eb8b333..d525bd501d4 100644
--- a/engines/chewy/rooms/room51.h
+++ b/engines/chewy/rooms/room51.h
@@ -33,7 +33,6 @@ private:
 	static int _index;
 
 	static void setup_func();
-	static int16 cut_serv(int16 frame);
 	static void timer_action(int16 t_nr, int16 obj_nr);
 
 public:
@@ -42,6 +41,7 @@ public:
 	static bool timer(int16 t_nr, int16 ani_nr);
 
 	static int16 use_door(int16 txt_nr);
+	static int16 cut_serv(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 90939c27985..087a0c71112 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -240,9 +240,7 @@ int16 Room54::use_zelle() {
 				_G(SetUpScreenFunc) = nullptr;
 				auto_scroll(176, 0);
 				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
-				_G(flc)->set_flic_user_function(cut_serv);
 				flic_cut(FCUT_069);
-				_G(flc)->remove_flic_user_function();
 
 				del_inventar(_G(spieler).AkInvent);
 				invent_2_slot(LEDER_INV);
diff --git a/engines/chewy/rooms/room54.h b/engines/chewy/rooms/room54.h
index 8f21fd47e82..18af93e58cb 100644
--- a/engines/chewy/rooms/room54.h
+++ b/engines/chewy/rooms/room54.h
@@ -28,7 +28,6 @@ namespace Rooms {
 class Room54 {
 private:
 	static void setup_func();
-	static int16 cut_serv(int16 frame);
 	static void aufzug_ab();
 
 public:
@@ -39,6 +38,8 @@ public:
 	static int16 use_zelle();
 	static short use_taxi();
 	static int16 use_azug();
+
+	static int16 cut_serv(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 16dd1111f1a..3d82d24506e 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -367,11 +367,9 @@ int16 Room55::use_kammeraus() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(5, 1, ANI_VOR);
 			_G(det)->show_static_spr(10);
-			_G(flc)->set_flic_user_function(cut_serv);
 			flic_cut(FCUT_070);
 			register_cutscene(18);
 		
-			_G(flc)->remove_flic_user_function();
 			const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
 			_G(room)->set_timer_status(aniNr, TIMER_STOP);
 			_G(det)->stop_detail(aniNr);
diff --git a/engines/chewy/rooms/room55.h b/engines/chewy/rooms/room55.h
index 6325c43cda1..6370762598a 100644
--- a/engines/chewy/rooms/room55.h
+++ b/engines/chewy/rooms/room55.h
@@ -31,7 +31,6 @@ private:
 	static void verleger_mov(int16 mode);
 	static void mans2rock();
 	static void rock2mans();
-	static int16 cut_serv(int16 frame);
 	static void setup_func();
 
 public:
@@ -45,6 +44,8 @@ public:
 	static int16 use_kammeraus();
 	static void strasse(int16 mode);
 	static void talk_line();
+
+	static int16 cut_serv(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 12395998e05..a6823c1aad8 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -353,9 +353,7 @@ int16 Room56::use_kneipe() {
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
-		_G(flc)->set_custom_user_function(proc1);
 		flic_cut(FCUT_112);
-		_G(flc)->remove_custom_user_function();
 		register_cutscene(31);
 
 		set_up_screen(NO_SETUP);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 88b790487fa..3d52e8b5cea 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -41,9 +41,7 @@ void Room64::entry() {
 		_G(det)->set_static_ani(1, -1);
 		chewy_entry();
 		if (_G(spieler).R63Feuer) {
-			_G(flc)->set_flic_user_function(cut_sev);
 			flic_cut(FCUT_078);
-			_G(flc)->remove_flic_user_function();
 			_G(spieler).R64ManWeg = true;
 			_G(det)->del_static_ani(1);
 			_G(room)->set_timer_status(1, TIMER_STOP);
diff --git a/engines/chewy/rooms/room64.h b/engines/chewy/rooms/room64.h
index 32c51ab73b7..f43276a097b 100644
--- a/engines/chewy/rooms/room64.h
+++ b/engines/chewy/rooms/room64.h
@@ -27,7 +27,6 @@ namespace Rooms {
 
 class Room64 {
 private:
-	static int16 cut_sev(int16 frame);
 	static void chewy_entry();
 	static void calc_monitor();
 	static void setup_func();
@@ -37,6 +36,8 @@ public:
 	static int16 use_tasche();
 	static void talk_man();
 	static void talk_man(int16 aad_nr);
+
+	static int16 cut_sev(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 3c2df204b9a..a904315671a 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -94,11 +94,9 @@ void Room85::entry(int16 eib_nr) {
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(475, -1);
 		start_aad(476, -1);
-		_G(flc)->set_custom_user_function(Room87::proc5);
 		flic_cut(FCUT_089);
 		register_cutscene(25);
 
-		_G(flc)->remove_custom_user_function();
 		switch_room(84);
 		show_cur();
 	}
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index cd3e45d765c..f48f6014af1 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -159,13 +159,9 @@ int Room87::proc4() {
 	hide_cur();
 	auto_move(1, P_CHEWY);
 	flic_cut(FCUT_093);
-	_G(flc)->set_custom_user_function(proc3);
 	flic_cut(FCUT_094);
-	_G(flc)->remove_custom_user_function();
-	_G(flc)->set_custom_user_function(proc5);
 	start_aad(472);
 	flic_cut(FCUT_095);
-	_G(flc)->remove_custom_user_function();
 	flic_cut(FCUT_096);
 	_G(det)->hide_static_spr(2);
 	_G(det)->start_detail(2, 255, false);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 658f55c1e56..945b4c0891c 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -293,10 +293,8 @@ int Room90::shootControlUnit() {
 	_G(flags).NoScroll = true;
 	auto_scroll(176, 0);
 	start_detail_wait(13, 1, ANI_VOR);
-	_G(flc)->set_custom_user_function(Room90::proc5);
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_107);
-	_G(flc)->remove_custom_user_function();
 	_G(spieler).scrollx = 0;
 	set_person_pos(76, 145, P_CHEWY, P_LEFT);
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 053848e1b2a..0f5a85124a7 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -156,9 +156,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
 							hide_cur();
 							auto_move(3, P_CHEWY);
-							_G(flc)->set_custom_user_function(Room6::cut_serv1);
 							flic_cut(FCUT_005);
-							_G(flc)->remove_custom_user_function();
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
 							show_cur();


Commit: de38f58836c0b8378c6fc69f585b06787657a4e0
    https://github.com/scummvm/scummvm/commit/de38f58836c0b8378c6fc69f585b06787657a4e0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:36-08:00

Commit Message:
CHEWY: Use more movie enums

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c6a0f956ba4..0c30f396f17 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -907,19 +907,33 @@ static void flic_proc1() {
 
 void flic_cut(int16 nr) {
 	static const int16 FLIC_CUT_133[] = {
-		133, 123, 125, 126, 124, 128, 129, 130, 131,
-		132, 133, 127, 158
+		FCUT_133, FCUT_123, FCUT_125, FCUT_126, FCUT_124,
+		FCUT_128, FCUT_129, FCUT_130, FCUT_131, FCUT_132,
+		FCUT_133, FCUT_127, FCUT_158
 	};
 	static const int16 FLIC_CUT_1045[] = {
-		30, 47, 41, 34, 45, 52, 53, 57, 64, 63, 62
+		FCUT_030, FCUT_047, FCUT_041, FCUT_034, FCUT_045,
+		FCUT_052, FCUT_053, FCUT_057, FCUT_064, FCUT_063,
+		FCUT_062
+	};
+	static const int16 FLIC_CUT_1074[] = {
+		FCUT_073, FCUT_114, FCUT_074, FCUT_075
+	};
+	static const int16 FLIC_CUT_1080[] = {
+		FCUT_080, FCUT_078, FCUT_077, FCUT_081, FCUT_082,
+		FCUT_079, FCUT_076, FCUT_116
 	};
-	static const int16 FLIC_CUT_1074[] = { 73, 114, 74, 75 };
-	static const int16 FLIC_CUT_1080[] = { 80, 78, 77, 81, 82, 79, 76, 116 };
 	static const int16 FLIC_CUT_1093[] = {
-		93, 94, 95, 96, 97, 98, 99, 100, 92, 90, 91, 89
+		FCUT_093, FCUT_094, FCUT_095, FCUT_096, FCUT_097,
+		FCUT_098, FCUT_099, FCUT_100, FCUT_092, FCUT_090,
+		FCUT_091, FCUT_089
+	};
+	static const int16 FLIC_CUT_1106[] = {
+		FCUT_106, FCUT_105, FCUT_104
+	};
+	static const int16 FLIC_CUT_1113[] = {
+		FCUT_113, FCUT_106, FCUT_103, FCUT_118, FCUT_120
 	};
-	static const int16 FLIC_CUT_1106[] = { 106, 105, 104 };
-	static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
 	int16 i, ret = 0;
 
 	_G(out)->set_pointer(nullptr);


Commit: 7d9cd2b8ad2f0bbc9f4783ebf69f0670164679cc
    https://github.com/scummvm/scummvm/commit/7d9cd2b8ad2f0bbc9f4783ebf69f0670164679cc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:36-08:00

Commit Message:
CHEWY: Rename all movie enums so that they match their values

Changed paths:
    engines/chewy/defines.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index e970d10336d..117b6ed784c 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -415,35 +415,35 @@ enum SetupScreenMode {
 #define ATS_ACTION_VOR 0
 #define ATS_ACTION_NACH 1
 
-#define FCUT_001 0	// Chewy escapes the prison cell
-#define FCUT_002 1	// Burger
-#define FCUT_003 2	// Chewy mocks an alien and he trips on a rope
-#define FCUT_004 3	// Jumping rat-line creature
-#define FCUT_005 4	// Chewy sticks his hand in the rat's hole (custom callback: Room6::cut_serv1)
-#define FCUT_006 5	// Chewy sticks the burger in the rat's hole and catches it (custom callback: Room6::cut_serv2)
-#define FCUT_007 6	// Chewy pushes the big red button and a huge anvil drops on him
-#define FCUT_008 7	// Chewy paints "don't" in front of "push this"
-#define FCUT_009 8	// Alien pushes the big red button and a huge anvil drops on him
-#define FCUT_010 9	// Chewy tries the transporter (custom callback: Room11::cut_serv)
-#define FCUT_011 10	// Chewy uses a deflated alien in the transporter (custom callback: Room12::cut_serv)
-#define FCUT_012 11	// Four panel video, where Chewy flies in a spaceship
-#define FCUT_013 12	// Chewy messes with a conveyor belt
-#define FCUT_014 13	// Chewy is transported in place of an alien
-#define FCUT_015 14	// Chewy jumps on a conveyor belt
-#define FCUT_016 15	// Transporter
-#define FCUT_017 16	// Transporter
-#define FCUT_018 17	// Chewy drops from a conveyor belt into a dumpster
-#define FCUT_019_01 18	// Space chase: Chewy escapes F5 with spaceship
-#define FCUT_019_02 19	// Space chase: Spaceship flight
-#define FCUT_019_03 20  // Space chase: Spaceship flight
-#define FCUT_019_04 21	// Space chase: Aliens chasing Chewy's spaceship
-#define FCUT_019_05 22  // Space chase: Dogfight with Chewy and alien spaceship
-#define FCUT_019_06 23  // Space chase: Chewy's spaceship enters bumper field and black hole
-#define FCUT_019_07 24  // Space chase: Chewy's spaceship travels through black hole
-#define FCUT_019_08 25  // Space chase: Chewy's spaceship approaches earth
-#define FCUT_019_09 26  // Space chase: Chewy's spaceship starts descending
-#define FCUT_019_10 27  // Space chase: Chewy's spaceship approaches farm
-#define FCUT_019_11 28	// Space chase: Chewy's spaceship performs crash landing near farm
+#define FCUT_000 0	// Chewy escapes the prison cell
+#define FCUT_001 1	// Burger
+#define FCUT_002 2	// Chewy mocks an alien and he trips on a rope
+#define FCUT_003 3	// Jumping rat-line creature
+#define FCUT_004 4	// Chewy sticks his hand in the rat's hole (custom callback: Room6::cut_serv1)
+#define FCUT_005 5	// Chewy sticks the burger in the rat's hole and catches it (custom callback: Room6::cut_serv2)
+#define FCUT_006 6	// Chewy pushes the big red button and a huge anvil drops on him
+#define FCUT_007 7	// Chewy paints "don't" in front of "push this"
+#define FCUT_008 8	// Alien pushes the big red button and a huge anvil drops on him
+#define FCUT_009 9	// Chewy tries the transporter (custom callback: Room11::cut_serv)
+#define FCUT_010 10	// Chewy uses a deflated alien in the transporter (custom callback: Room12::cut_serv)
+#define FCUT_011 11	// Four panel video, where Chewy flies in a spaceship
+#define FCUT_012 12	// Chewy messes with a conveyor belt
+#define FCUT_013 13	// Chewy is transported in place of an alien
+#define FCUT_014 14	// Chewy jumps on a conveyor belt
+#define FCUT_015 15	// Transporter
+#define FCUT_016 16	// Transporter
+#define FCUT_017 17	// Chewy drops from a conveyor belt into a dumpster
+#define FCUT_SPACECHASE_18 18	// Space chase: Chewy escapes F5 with spaceship
+#define FCUT_SPACECHASE_19 19	// Space chase: Spaceship flight
+#define FCUT_SPACECHASE_20 20  // Space chase: Spaceship flight
+#define FCUT_SPACECHASE_21 21	// Space chase: Aliens chasing Chewy's spaceship
+#define FCUT_SPACECHASE_22 22  // Space chase: Dogfight with Chewy and alien spaceship
+#define FCUT_SPACECHASE_23 23  // Space chase: Chewy's spaceship enters bumper field and black hole
+#define FCUT_SPACECHASE_24 24  // Space chase: Chewy's spaceship travels through black hole
+#define FCUT_SPACECHASE_25 25  // Space chase: Chewy's spaceship approaches earth
+#define FCUT_SPACECHASE_26 26  // Space chase: Chewy's spaceship starts descending
+#define FCUT_SPACECHASE_27 27  // Space chase: Chewy's spaceship approaches farm
+#define FCUT_SPACECHASE_28 28	// Space chase: Chewy's spaceship performs crash landing near farm
 #define FCUT_029 29 // Chewy wakes up after crash landing
 #define FCUT_030 30	// Chewy douses shaceship fire
 #define FCUT_031 31	// Chewy uses kitchen appliance
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 0c30f396f17..9c560d51ba4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -947,14 +947,14 @@ void flic_cut(int16 nr) {
 
 	if (_G(Ci).Handle) {
 		switch (nr) {
-		case FCUT_001:
+		case FCUT_000:
 		case 1000:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
 			g_engine->playVideo(nr);
 			break;
 
-		case FCUT_005:
+		case FCUT_004:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->set_custom_user_function(Room6::cut_serv1);
@@ -965,7 +965,7 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case FCUT_006:
+		case FCUT_005:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->set_custom_user_function(Room10::cut_serv);
@@ -976,7 +976,7 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case FCUT_010:
+		case FCUT_009:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->set_custom_user_function(Room11::cut_serv);
@@ -987,7 +987,7 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case FCUT_011:
+		case FCUT_010:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 			_G(flc)->set_custom_user_function(Room11::cut_serv_2);
@@ -998,24 +998,24 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case FCUT_019_01:
-		case FCUT_019_02:
-		case FCUT_019_03:
-		case FCUT_019_04:
-		case FCUT_019_05:
-		case FCUT_019_06:
-		case FCUT_019_07:
-		case FCUT_019_08:
-		case FCUT_019_09:
-		case FCUT_019_10:
-		case FCUT_019_11:
+		case FCUT_SPACECHASE_18:
+		case FCUT_SPACECHASE_19:
+		case FCUT_SPACECHASE_20:
+		case FCUT_SPACECHASE_21:
+		case FCUT_SPACECHASE_22:
+		case FCUT_SPACECHASE_23:
+		case FCUT_SPACECHASE_24:
+		case FCUT_SPACECHASE_25:
+		case FCUT_SPACECHASE_26:
+		case FCUT_SPACECHASE_27:
+		case FCUT_SPACECHASE_28:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
-			nr = FCUT_019_01;
+			nr = FCUT_SPACECHASE_18;
 			_G(sndPlayer)->setLoopMode(1);
 
 			for (i = 0; i < 11; i++) {
-				g_engine->playVideo(FCUT_019_01 + i);
+				g_engine->playVideo(FCUT_SPACECHASE_18 + i);
 				SHOULD_QUIT_RETURN;
 			}
 
@@ -1323,7 +1323,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 1);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_001);
+			g_engine->playVideo(FCUT_000);
 #endif
 
 			if (ret != -1) {
@@ -1381,7 +1381,7 @@ void flic_cut(int16 nr) {
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
 				_G(out)->cls();
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_017);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_016);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 			}
 #else
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index b82f64b5e9e..1a33789c9f7 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -745,7 +745,7 @@ void Room0::feederAni() {
 			auto_move(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
 			_G(out)->cls();
-			flic_cut(FCUT_001);
+			flic_cut(FCUT_000);
 
 			register_cutscene(1);
 
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index da068d69671..19c1f97af01 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -106,7 +106,7 @@ void Room7::klingel() {
 
 		_G(det)->start_detail(0, 255, ANI_VOR);
 		start_detail_wait(13, 1, ANI_VOR);
-		flic_cut(FCUT_002);
+		flic_cut(FCUT_001);
 		_G(det)->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
@@ -157,7 +157,7 @@ void Room7::klingel() {
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		_G(flags).NoPalAfterFlc = false;
 		register_cutscene(2);
-		flic_cut(FCUT_003);
+		flic_cut(FCUT_002);
 		set_person_pos(201, 117, P_CHEWY, P_LEFT);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index b7ea4520744..3ecc30d8bb8 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -36,7 +36,7 @@ void Room10::entry() {
 		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
-		flic_cut(FCUT_004);
+		flic_cut(FCUT_003);
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		hide_cur();
@@ -53,7 +53,7 @@ void Room10::get_surimy() {
 	hide_cur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
-	flic_cut(FCUT_006);
+	flic_cut(FCUT_005);
 	_G(spieler).R10SurimyOk = true;
 	_G(room)->set_timer_status(3, TIMER_STOP);
 	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 586b285f7ad..a7af31ee8cd 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -148,7 +148,7 @@ int16 Room11::scanner() {
 			actionFl = true;
 
 			start_aad(105, 0);
-			flic_cut(FCUT_011);
+			flic_cut(FCUT_010);
 			register_cutscene(4);
 			_G(spieler).R11TerminalOk = true;
 			cur_2_inventory();
@@ -160,7 +160,7 @@ int16 Room11::scanner() {
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
-				flic_cut(FCUT_010);
+				flic_cut(FCUT_009);
 				start_aad_wait(20, -1);
 			} else {
 				actionFl = true;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 80e5ac8d86a..ac5f37e2242 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -76,7 +76,7 @@ void Room12::entry() {
 
 		_G(flags).NoScroll = true;
 		auto_scroll(60, 0);
-		flic_cut(FCUT_016);
+		flic_cut(FCUT_015);
 		_G(flags).NoScroll = false;
 
 		for (int16 i = 7; i < 10; i++)
@@ -203,7 +203,7 @@ int16 Room12::use_terminal() {
 				start_aad_wait(112, -1);
 				_G(flags).NoScroll = true;
 				auto_scroll(46, 0);
-				flic_cut(FCUT_017);
+				flic_cut(FCUT_016);
 				register_cutscene(5);
 
 				load_chewy_taf(CHEWY_BORK);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 54e4ca72ef9..d5804f0a990 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -47,7 +47,7 @@ static const MovLine R13_BORK_MPKT[3] = {
 void Room13::entry() {
 	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
 		_G(out)->cls();
-		flic_cut(FCUT_013);
+		flic_cut(FCUT_012);
 		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
@@ -128,7 +128,7 @@ void Room13::talk_bork() {
 
 		start_spz(68, 255, false, P_CHEWY);
 		start_aad_wait(248, -1);
-		flic_cut(FCUT_014);
+		flic_cut(FCUT_013);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
 		_G(flags).NoScroll = false;
@@ -172,7 +172,7 @@ void Room13::jmp_band() {
 			start_aad_wait(117, -1);
 			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
-			flic_cut(FCUT_015);
+			flic_cut(FCUT_014);
 			_G(flags).NoScroll = false;
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
@@ -184,7 +184,7 @@ void Room13::jmp_band() {
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
 
-			flic_cut(FCUT_018);
+			flic_cut(FCUT_017);
 			register_cutscene(6);
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index c2dfa7ddec7..4ee95c35a0b 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -89,7 +89,7 @@ int16 Room22::chewy_amboss() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		auto_move(2, P_CHEWY);
 		_G(flags).NoPalAfterFlc = false;
-		flic_cut(FCUT_007);
+		flic_cut(FCUT_006);
 		_G(spieler).R22ChewyPlatt = true;
 		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
 		_G(flags).AutoAniPlay = false;
@@ -151,7 +151,7 @@ void Room22::bork_walk2() {
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT2);
 	wait_auto_obj(BORK_OBJ);
 
-	flic_cut(FCUT_009);
+	flic_cut(FCUT_008);
 	register_cutscene(3);
 	_G(det)->show_static_spr(4);
 	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
@@ -185,7 +185,7 @@ int16 Room22::malen() {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
 		auto_move(8, P_CHEWY);
-		flic_cut(FCUT_008);
+		flic_cut(FCUT_007);
 		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R22Paint = true;
 		_G(obj)->calc_rsi_flip_flop(SIB_PAINT_R22);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index e9e097fd50e..52dd0ccdc0b 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -88,7 +88,7 @@ int16 Room23::start_gleiter() {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
 					_G(flags).NoPalAfterFlc = true;
-					flic_cut(FCUT_012);
+					flic_cut(FCUT_011);
 					register_cutscene(7);
 					_G(out)->cls();
 					_G(spieler).R23GleiterExit = 16;
@@ -106,7 +106,7 @@ int16 Room23::start_gleiter() {
 				} else if (_G(spieler).R23GleiterExit == 16) {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
-					flic_cut(FCUT_019_01);
+					flic_cut(FCUT_SPACECHASE_18);
 					_G(spieler).R23GleiterExit = 25;
 					register_cutscene(9);
 
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 0f5a85124a7..2f1fd58fb12 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -156,7 +156,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
 							hide_cur();
 							auto_move(3, P_CHEWY);
-							flic_cut(FCUT_005);
+							flic_cut(FCUT_004);
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
 							show_cur();


Commit: 7f85d2d5b058806f4d070998c1a5a9fe0a0387a0
    https://github.com/scummvm/scummvm/commit/7f85d2d5b058806f4d070998c1a5a9fe0a0387a0
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: Work on CppCheck warnings in Object, rename a couple of functions

Changed paths:
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/object.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 5afc5009549..dd3ffed2eaf 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -674,7 +674,7 @@ int16 Inventory::calc_use_invent(int16 inv_nr) {
 		case GBUCH_INV:
 			ret = del_invent_slot(GBUCH_INV);
 			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
-			_G(obj)->change_inventar(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
+			_G(obj)->changeInventory(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
 			ret_val = true;
 			break;
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 26af5d48502..3dd4616f736 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1715,7 +1715,7 @@ void set_ani_screen() {
 }
 
 void del_inventar(int16 nr) {
-	_G(obj)->del_inventar(nr, &_G(room_blk));
+	_G(obj)->delInventory(nr, &_G(room_blk));
 	_G(spieler).inv_cur = false;
 	_G(menu_item) = CUR_WALK;
 	_G(spieler).AkInvent = -1;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 010317818c8..978c7101c66 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -328,7 +328,7 @@ void cur_2_inventory() {
 }
 
 void inventory_2_cur(int16 nr) {
-	if (_G(spieler).AkInvent == -1 && _G(obj)->check_inventar(nr)) {
+	if (_G(spieler).AkInvent == -1 && _G(obj)->checkInventory(nr)) {
 		del_invent_slot(nr);
 		_G(menu_item) = CUR_USE;
 		_G(spieler).AkInvent = nr;
@@ -339,7 +339,7 @@ void inventory_2_cur(int16 nr) {
 
 void new_invent_2_cur(int16 inv_nr) {
 	cur_2_inventory();
-	_G(obj)->add_inventar(inv_nr, &_G(room_blk));
+	_G(obj)->addInventory(inv_nr, &_G(room_blk));
 	inventory_2_cur(inv_nr);
 }
 
@@ -351,7 +351,7 @@ void invent_2_slot(int16 nr) {
 			ok = true;
 		}
 	}
-	_G(obj)->add_inventar(nr, &_G(room_blk));
+	_G(obj)->addInventory(nr, &_G(room_blk));
 }
 
 int16 del_invent_slot(int16 nr) {
@@ -371,7 +371,7 @@ void remove_inventory(int16 nr) {
 	if (nr == _G(spieler).AkInvent) {
 		del_inventar(nr);
 	} else {
-		_G(obj)->del_inventar(nr, &_G(room_blk));
+		_G(obj)->delInventory(nr, &_G(room_blk));
 		del_invent_slot(nr);
 	}
 }
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index fa52dfd43c0..b3c8d837e51 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -71,34 +71,34 @@ Object::~Object() {
 
 int16 Object::load(const char *fname_, RoomMovObject *rmo) {
 	Common::File f;
-	bool valid = true;
 
 	if (f.open(fname_)) {
 		if (!iib_datei_header.load(&f)) {
-			error("objekt::load error");
-		} else if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
+			error("Object::load error");
+		}
+
+		if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
 			if (iib_datei_header.Size) {
 				assert(iib_datei_header.Size % RoomMovObject::SIZE() == 0);
 
-				for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid;
-						++i, ++rmo) {
+				bool valid = true;
+				for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid; ++i, ++rmo) {
 					valid = rmo->load(&f);
 				}
 
-				if (!valid) {
-					error("objekt::load error");
-				} else {
-					max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
-				}
+				if (!valid)
+					error("Object::load error");
+
+				max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
 			} else
 				max_inventar_obj = 0;
 		} else {
-			error("objekt::load error");
+			error("Object::load error");
 		}
 
 		f.close();
 	} else {
-		error("objekt::load error");
+		error("Object::load error");
 	}
 
 	return max_inventar_obj;
@@ -106,31 +106,32 @@ int16 Object::load(const char *fname_, RoomMovObject *rmo) {
 
 int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
 	Common::File f;
-	bool valid = true;
 
 	if (f.open(fname_)) {
 		if (!sib_datei_header.load(&f)) {
-			error("objekt::load error");
-		} else if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
+			error("Object::load error");
+		}
+
+		if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
 			if (sib_datei_header.Anz) {
+				bool valid = true;
 				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++rsi) {
 					valid = rsi->load(&f);
 				}
 
-				if (!valid) {
-					error("objekt::load error");
-				} else {
-					max_static_inventar = sib_datei_header.Anz;
-				}
+				if (!valid)
+					error("Object::load error");
+
+				max_static_inventar = sib_datei_header.Anz;
 			} else
 				max_static_inventar = 0;
 		} else {
-			error("objekt::load error");
+			error("Object::load error");
 		}
 
 		f.close();
 	} else {
-		error("objekt::load error");
+		error("Object::load error");
 	}
 
 	return max_static_inventar;
@@ -138,42 +139,42 @@ int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
 
 int16 Object::load(const char *fname_, RoomExit *RoomEx) {
 	Common::File f;
-	bool valid = true;
 
 	if (f.open(fname_)) {
 		if (!eib_datei_header.load(&f)) {
-			error("objekt::load error");
-		} else if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
+			error("Object::load error");
+		}
+
+		if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
 			if (sib_datei_header.Anz) {
+				bool valid = true;
 				for (int i = 0; i < eib_datei_header.Anz && valid; ++i, ++RoomEx) {
 					valid = RoomEx->load(&f);
 				}
 
-				if (!valid) {
-					error("objekt::load error");
-				} else {
-					max_exit = eib_datei_header.Anz;
-				}
+				if (!valid)
+					error("Object::load error");
+
+				max_exit = eib_datei_header.Anz;
 			} else
 				max_exit = 0;
 		} else {
-			error("objekt::load error");
+			error("Object::load error");
 		}
 
 		f.close();
 	} else {
-		error("objekt::load error");
+		error("Object::load error");
 	}
 
 	return max_exit;
 }
 
 void Object::sort() {
-	short i;
 	mov_obj_room[0] = 0;
 
 	spieler_invnr[0] = 0;
-	for (i = 0; i < MAX_MOV_OBJ; i++) {
+	for (short i = 0; i < MAX_MOV_OBJ; i++) {
 		if (Rmo[i].RoomNr != -1) {
 			if (Rmo[i].RoomNr == 255) {
 				++spieler_invnr[0];
@@ -187,8 +188,7 @@ void Object::sort() {
 }
 
 void Object::free_inv_spr(byte **inv_spr_adr) {
-	int16 i;
-	for (i = 0; i < MAX_MOV_OBJ; i++)
+	for (int16 i = 0; i < MAX_MOV_OBJ; i++)
 		if (inv_spr_adr[i] != 0) {
 			free(inv_spr_adr[i]);
 			inv_spr_adr[i] = 0;
@@ -196,10 +196,8 @@ void Object::free_inv_spr(byte **inv_spr_adr) {
 }
 
 int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
-	int16 i;
-	int16 ret;
-	ret = -1;
-	for (i = 0; i < max_static_inventar && ret == -1; i++) {
+	int16 ret = -1;
+	for (int16 i = 0; i < max_static_inventar && ret == -1; i++) {
 		if (Rsi[i].RoomNr == Player->PersonRoomNr[P_CHEWY] && Rsi[i].HideSib == false) {
 			if (mouse_x >= Rsi[i].X &&
 			        mouse_x <= (Rsi[i].X + Rsi[i].XOff) &&
@@ -212,10 +210,8 @@ int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 }
 
 int16 Object::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
-	int16 i;
-	int16 ret;
-	ret = -1;
-	for (i = 1; i < mov_obj_room[0] + 1 && ret == -1; i++) {
+	int16 ret = -1;
+	for (int16 i = 1; i < mov_obj_room[0] + 1 && ret == -1; i++) {
 		if (Rmo[mov_obj_room[i]].X != -1 &&
 		        mouse_x >= Rmo[mov_obj_room[i]].X &&
 		        mouse_x <= (Rmo[mov_obj_room[i]].X + Rmo[mov_obj_room[i]].XOff) &&
@@ -235,40 +231,34 @@ int16 Object::sib_txt_nr(int16 sib_nr) {
 }
 
 int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
-	int16 ret;
-	int16 i, j;
-	int16 ok;
-	int16 tmp1, tmp2;
-	int16 action_flag;
-	ret = NO_ACTION;
+	int16 ret = NO_ACTION;
 
-	tmp1 = maus_obj_nr;
-	tmp2 = test_obj_nr;
-	action_flag = 0;
+	int16 tmp1 = maus_obj_nr;
+	int16 tmp2 = test_obj_nr;
+	bool actionFl = false;
 
-	for (j = 0; j < 2 && !action_flag; j++) {
+	for (int16 j = 0; j < 2 && !actionFl; j++) {
 		if (j) {
 			tmp1 = test_obj_nr;
 			tmp2 = maus_obj_nr;
 		}
 
 		if (Rmo[tmp1].ActionObj != -1) {
-			if (Rmo[tmp1].ActionObj < 30000 &&
-			        Rmo[tmp1].ActionObj == tmp2) {
-				action_flag = 1;
+			if (Rmo[tmp1].ActionObj < 30000 && Rmo[tmp1].ActionObj == tmp2) {
+				actionFl = true;
 			} else if (Rmo[tmp1].ActionObj >= 30000) {
-				i = 0;
+				int16 i = 0;
 				while (ACTION_OBJ_TBL[i] != Rmo[tmp1].ActionObj &&
 				        ACTION_OBJ_TBL[i] != 32000) {
 					++i;
 				}
 				if (ACTION_OBJ_TBL[i] != 32000) {
 					++i;
-					ok = 0;
+					int16 ok = 0;
 					while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
 						if (ACTION_OBJ_TBL[i] == tmp2 + 5000) {
 							ok = 1;
-							action_flag = 1;
+							actionFl = true;
 						}
 						++i;
 					}
@@ -277,39 +267,28 @@ int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 		}
 	}
 
-	if (action_flag == 1) {
-		if (!calc_rmo_flip_flop(tmp2)) {
-			action_flag = NO_ACTION;
-		} else {
-			if (tmp2 == test_obj_nr)
-				ret = OBJEKT_2;
-			else
-				ret = OBJEKT_1;
-		}
-	}
+	if (actionFl && calc_rmo_flip_flop(tmp2))
+		ret = (tmp2 == test_obj_nr) ? OBJEKT_2 : OBJEKT_1;
 
 	return ret;
 }
 
 int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
-	int16 action_flag;
-	int16 i;
-	int16 ok;
-	action_flag = NO_ACTION;
+	int16 action_flag = NO_ACTION;
 
 	if (Rmo[maus_obj_nr].ActionObj != -1) {
 		if (Rmo[maus_obj_nr].ActionObj < 30000 &&
 		        Rmo[maus_obj_nr].ActionObj == test_obj_nr) {
 			action_flag = OBJEKT_2;
 		} else if (Rmo[maus_obj_nr].ActionObj >= 30000) {
-			i = 0;
+			int16 i = 0;
 			while (ACTION_OBJ_TBL[i] != Rmo[maus_obj_nr].ActionObj &&
 			        ACTION_OBJ_TBL[i] != 32000) {
 				++i;
 			}
 			if (ACTION_OBJ_TBL[i] != 32000) {
 				++i;
-				ok = 0;
+				int16 ok = 0;
 				while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
 					if (ACTION_OBJ_TBL[i] == test_obj_nr) {
 						ok = 1;
@@ -341,20 +320,17 @@ void Object::show_sib(int16 nr) {
 }
 
 void Object::calc_all_static_detail() {
-	int16 i;
-	for (i = 0; i < max_static_inventar; i++) {
+	for (int16 i = 0; i < max_static_inventar; i++) {
 		calc_static_detail(i);
 	}
 }
 
 void Object::calc_static_detail(int16 det_nr) {
-	int16 nr;
 	int16 i;
 	int16 n;
-	AniDetailInfo *adi;
 
 	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
-		nr = Rsi[det_nr].StaticAk;
+		int16 nr = Rsi[det_nr].StaticAk;
 		if (nr != -1) {
 			if (nr >= 30000) {
 				i = 0;
@@ -368,7 +344,7 @@ void Object::calc_static_detail(int16 det_nr) {
 
 						if (nr >= 40) {
 							n = nr - 40;
-							adi = _G(det)->get_ani_detail(n);
+							AniDetailInfo *adi = _G(det)->get_ani_detail(n);
 							if (adi->repeat)
 								_G(det)->start_detail(n, 0, ANI_VOR);
 							else
@@ -380,7 +356,7 @@ void Object::calc_static_detail(int16 det_nr) {
 				}
 			} else if (nr >= 40) {
 				n = nr - 40;
-				adi = _G(det)->get_ani_detail(n);
+				AniDetailInfo *adi = _G(det)->get_ani_detail(n);
 				if (adi->repeat)
 					_G(det)->start_detail(n, 0, ANI_VOR);
 				else
@@ -445,11 +421,9 @@ int16 Object::calc_static_use(int16 nr) {
 }
 
 int16 Object::calc_rsi_flip_flop(int16 nr) {
-	int16 tmp;
-	int16 ret;
-	ret = true;
+	int16 ret = true;
 	if (Rsi[nr].ZustandFlipFlop > 0 && Rsi[nr].HideSib == false) {
-		tmp = Rsi[nr].ZustandAk;
+		int16 tmp = Rsi[nr].ZustandAk;
 		Rsi[nr].ZustandAk = Rsi[nr].ZustandOff;
 		Rsi[nr].ZustandOff = tmp;
 		tmp = Rsi[nr].StaticAk;
@@ -472,11 +446,10 @@ void Object::set_rsi_flip_flop(int16 nr, int16 anz) {
 }
 
 int16 Object::calc_rmo_flip_flop(int16 nr) {
-	int16 tmp;
 	int16 ret;
 	if (Rmo[nr].ZustandFlipFlop > 0) {
 		ret = true;
-		tmp = Rmo[nr].ZustandAk;
+		int16 tmp = Rmo[nr].ZustandAk;
 		Rmo[nr].ZustandAk = Rmo[nr].ZustandOff;
 		Rmo[nr].ZustandOff = tmp;
 		if (Rmo[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
@@ -502,30 +475,26 @@ int16 Object::del_obj_use(int16 nr) {
 	return ret;
 }
 
-void Object::add_inventar(int16 nr, RaumBlk *Rb) {
+void Object::addInventory(int16 nr, RaumBlk *Rb) {
 	Player->room_m_obj[nr].RoomNr = 255;
 	sort();
 	_G(room)->calc_invent(Rb, Player);
 
 }
 
-void Object::del_inventar(int16 nr, RaumBlk *Rb) {
-
+void Object::delInventory(int16 nr, RaumBlk *Rb) {
 	Player->room_m_obj[nr].RoomNr = -1;
 	sort();
 }
 
-void Object::change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
+void Object::changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
 	Player->room_m_obj[old_inv].RoomNr = -1;
 	Player->room_m_obj[new_inv].RoomNr = 255;
 	sort();
 	_G(room)->calc_invent(Rb, Player);
-
 }
 
-void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
-                          RaumBlk *Rb) {
-
+void Object::setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb) {
 	++mov_obj_room[0];
 	mov_obj_room[mov_obj_room[0]] = nr;
 	Player->room_m_obj[nr].RoomNr = Player->PersonRoomNr[P_CHEWY];
@@ -536,11 +505,9 @@ void Object::set_inventar(int16 nr, int16 x, int16 y, int16 automov,
 	sort();
 }
 
-int16 Object::check_inventar(int16 nr) {
-	int16 i;
-	int16 ret;
-	ret = false;
-	for (i = 0; i < spieler_invnr[0] && !ret; i++) {
+bool Object::checkInventory(int16 nr) {
+	bool ret = false;
+	for (int16 i = 0; i < spieler_invnr[0] && !ret; i++) {
 		if (spieler_invnr[i + 1] == nr)
 			ret = true;
 	}
@@ -548,10 +515,8 @@ int16 Object::check_inventar(int16 nr) {
 }
 
 int16 Object::is_exit(int16 mouse_x, int16 mouse_y) {
-	int16 ret;
-	int16 i;
-	ret = -1;
-	for (i = 0; i < max_exit && ret == -1; i++) {
+	int16 ret = -1;
+	for (int16 i = 0; i < max_exit && ret == -1; i++) {
 		if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
 			if (mouse_x >= Re[i].X &&
 			        mouse_x <= (Re[i].X + Re[i].XOff) &&
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 1a33789c9f7..28d70e6660c 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -49,7 +49,7 @@ namespace Rooms {
 #define KOPF3 48
 
 void Room0::entry() {
-	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->check_inventar(0))
+	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->checkInventory(0))
 		_G(det)->hide_static_spr(6);
 
 	if (!_G(flags).LoadGame) {
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index b4046c4ea8f..3259b14a956 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -45,7 +45,7 @@ void Room1::gedAction(int index) {
 		if (_G(spieler).AkInvent == KABEL_INV) {
 			flag = true;
 			del_inventar(_G(spieler).AkInvent);
-		} else if (_G(obj)->check_inventar(KABEL_INV)) {
+		} else if (_G(obj)->checkInventory(KABEL_INV)) {
 			flag = true;
 			_G(obj)->del_obj_use(KABEL_INV);
 			remove_inventory(KABEL_INV);
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 39731e9ce82..b774d4cd279 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -133,7 +133,7 @@ bool Room8::gips_wurf() {
 		wait_detail(5);
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
-		_G(obj)->set_inventar(MASKE_INV, 181, 251, 8, &_G(room_blk));
+		_G(obj)->setInventory(MASKE_INV, 181, 251, 8, &_G(room_blk));
 		_G(det)->del_taf_tbl(116, 30, nullptr);
 		auto_move(8, P_CHEWY);
 		_G(flags).AtsAction = false;
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index a7af31ee8cd..03ab624601a 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -179,7 +179,7 @@ void Room11::get_card() {
 	if (_G(spieler).R11CardOk) {
 		cur_2_inventory();
 		_G(spieler).R11CardOk = false;
-		_G(obj)->add_inventar(_G(spieler).R11IdCardNr, &_G(room_blk));
+		_G(obj)->addInventory(_G(spieler).R11IdCardNr, &_G(room_blk));
 
 		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
 		cursor_wahl(CUR_AK_INVENT);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 1ace373531f..14a56fa9f4a 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -329,7 +329,7 @@ int16 Room17::get_oel() {
 		start_detail_wait(13, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
-		_G(obj)->add_inventar(BECHER_VOLL_INV, &_G(room_blk));
+		_G(obj)->addInventory(BECHER_VOLL_INV, &_G(room_blk));
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index b762ef0f510..cad6b175524 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -96,7 +96,7 @@ void Room21::calc_laser() {
 	}
 
 	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
-		if (!_G(obj)->check_inventar(SEIL_INV) && !_G(spieler).R17Seil) {
+		if (!_G(obj)->checkInventory(SEIL_INV) && !_G(spieler).R17Seil) {
 			_G(obj)->show_sib(SIB_SEIL_R21);
 			_G(atds)->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		}
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 4ed7da24b69..34871cb9d8a 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -59,7 +59,7 @@ void Room25::entry() {
 	if (!_G(spieler).R25FirstEntry) {
 		hide_cur();
 
-		if (_G(obj)->check_inventar(TRANSLATOR_INV)) {
+		if (_G(obj)->checkInventory(TRANSLATOR_INV)) {
 			_G(obj)->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
 			_G(atds)->set_ats_str(113, 0, ATS_DATEI);
 
@@ -119,7 +119,7 @@ int16 Room25::gleiter_loesch() {
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
-			_G(obj)->add_inventar(MILCH_WAS_INV, &_G(room_blk));
+			_G(obj)->addInventory(MILCH_WAS_INV, &_G(room_blk));
 			inventory_2_cur(MILCH_WAS_INV);
 			start_aad_wait(253, -1);
 		}
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index d523958b39f..151da43ac33 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -61,7 +61,7 @@ void Room29::entry() {
 }
 
 void Room29::xit() {
-	if (_G(obj)->check_inventar(PUMPE_INV))
+	if (_G(obj)->checkInventory(PUMPE_INV))
 		del_inventar(PUMPE_INV);
 }
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 0945f1250e5..4322ee7c8db 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -163,7 +163,7 @@ int16 Room31::use_topf() {
 					start_ani_block(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					del_inventar(_G(spieler).AkInvent);
-					_G(obj)->add_inventar(MILCH_LEER_INV, &_G(room_blk));
+					_G(obj)->addInventory(MILCH_LEER_INV, &_G(room_blk));
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
 					dia_nr = 151;
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 5a1a41c0609..847ba6b960f 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -331,7 +331,7 @@ void Room37::use_hahn() {
 			_G(det)->hide_static_spr(8);
 			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(141, -1);
-			_G(obj)->add_inventar(EIER_INV, &_G(room_blk));
+			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
 			show_cur();
 		}
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 525f32747f6..57f86c8c270 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -107,7 +107,7 @@ void Room40::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 
 		} else if (eib_nr == 72) {
-			if ((_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
+			if ((_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
 				|| _G(spieler).R40TrainOk) {
 				_G(spieler).R40TrainOk = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
@@ -344,7 +344,7 @@ int16 Room40::use_mr_pumpkin() {
 						_G(out)->ausblenden(1);
 						Room43::catch_pg();
 						remove_inventory(LIKOER_INV);
-						_G(obj)->add_inventar(LIKOER2_INV, &_G(room_blk));
+						_G(obj)->addInventory(LIKOER2_INV, &_G(room_blk));
 						inventory_2_cur(LIKOER2_INV);
 						switch_room(40);
 						start_aad_wait(236, -1);
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 1ea3482be03..c8dc91b86a7 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -53,10 +53,10 @@ void Room42::entry() {
 			_G(atds)->set_ats_str(264, 1, ATS_DATEI);
 		}
 
-		if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && !_G(spieler).R42BriefOk)
+		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && !_G(spieler).R42BriefOk)
 			start_aad_wait(302, -1);
 
-		if (_G(obj)->check_inventar(HOTEL_INV) && _G(obj)->check_inventar(TICKET_INV) && _G(spieler).R42BriefOk)
+		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk)
 			start_aad_wait(301, -1);
 	}
 }
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index ff30b151046..34b971d30d1 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -58,13 +58,13 @@ void Room48::calc_pic() {
 	_G(spieler).R48Auswahl[1] = 1;
 	_G(spieler).R48Auswahl[2] = 1;
 
-	if (_G(obj)->check_inventar(VCARD_INV)) {
+	if (_G(obj)->checkInventory(VCARD_INV)) {
 		_G(spieler).R48Auswahl[3] = 1;
 		_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(det)->show_static_spr(4);
 	}
 
-	if (_G(obj)->check_inventar(KAPPE_INV)) {
+	if (_G(obj)->checkInventory(KAPPE_INV)) {
 		_G(spieler).R48Auswahl[4] = 1;
 		_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(det)->show_static_spr(4);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index e3577071967..c19ccefbf00 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -195,7 +195,7 @@ void Room49::use_boy_cigar() {
 	start_aad_wait(264, -1);
 	_G(room)->set_zoom(zoom);
 
-	_G(obj)->add_inventar(GUM_INV, &_G(room_blk));
+	_G(obj)->addInventory(GUM_INV, &_G(room_blk));
 	inventory_2_cur(GUM_INV);
 	_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
 
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 67bb34d0e9c..d4a08c36f63 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -218,7 +218,7 @@ int16 Room50::use_gum() {
 		_G(det)->del_static_ani(10);
 		go_page();
 
-		_G(obj)->add_inventar(KEY_INV, &_G(room_blk));
+		_G(obj)->addInventory(KEY_INV, &_G(room_blk));
 		inventory_2_cur(KEY_INV);
 		_G(atds)->set_ats_str(323, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(327, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 2130e63bea0..369e64c311c 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -86,7 +86,7 @@ int16 Room53::use_man() {
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
 		start_ani_block(7, ABLOCK35);
-		_G(obj)->add_inventar(JMKOST_INV, &_G(room_blk));
+		_G(obj)->addInventory(JMKOST_INV, &_G(room_blk));
 		inventory_2_cur(JMKOST_INV);
 		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 		show_cur();
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 087a0c71112..06a720699bb 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -215,7 +215,7 @@ void Room54::talk_verkauf() {
 		auto_move(4, P_CHEWY);
 
 		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
-		_G(obj)->add_inventar(BURGER_INV, &_G(room_blk));
+		_G(obj)->addInventory(BURGER_INV, &_G(room_blk));
 		inventory_2_cur(BURGER_INV);
 	} else {
 		start_aad_wait(313, -1);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index a6823c1aad8..7e879575dfb 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -318,7 +318,7 @@ int16 Room56::use_kneipe() {
 
 				_G(SetUpScreenFunc) = setup_func;
 				_G(flags).NoScroll = false;
-				if (_G(obj)->check_inventar(SACKGELD_INV)) {
+				if (_G(obj)->checkInventory(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
 					start_aad_wait(309, -1);
 				}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 2f1fd58fb12..8dc5db189bd 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2203,13 +2203,13 @@ void calc_inv_use_txt(int16 test_nr) {
 		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = ANGEL2_INV;
-		_G(obj)->change_inventar(test_nr, ANGEL2_INV, &_G(room_blk));
+		_G(obj)->changeInventory(test_nr, ANGEL2_INV, &_G(room_blk));
 		break;
 
 	case KUERBIS1_INV:
 		ret = del_invent_slot(KUERBIS1_INV);
 		_G(spieler).InventSlot[ret] = K_MASKE_INV;
-		_G(obj)->change_inventar(KUERBIS1_INV, K_MASKE_INV, &_G(room_blk));
+		_G(obj)->changeInventory(KUERBIS1_INV, K_MASKE_INV, &_G(room_blk));
 		invent_2_slot(K_FLEISCH_INV);
 		invent_2_slot(K_KERNE_INV);
 		break;
@@ -2235,7 +2235,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).R42BriefMarke = true;
 		ret = del_invent_slot(BRIEF_INV);
 		_G(spieler).InventSlot[ret] = BRIEF2_INV;
-		_G(obj)->change_inventar(BRIEF_INV, BRIEF2_INV, &_G(room_blk));
+		_G(obj)->changeInventory(BRIEF_INV, BRIEF2_INV, &_G(room_blk));
 		break;
 
 	case FLASCHE_INV:
@@ -2257,7 +2257,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		cursor_wahl(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = B_MARY2_INV;
-		_G(obj)->change_inventar(test_nr, B_MARY2_INV, &_G(room_blk));
+		_G(obj)->changeInventory(test_nr, B_MARY2_INV, &_G(room_blk));
 		break;
 
 	case 13:
@@ -2283,7 +2283,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = 110;
-		_G(obj)->change_inventar(104, 110, &_G(room_blk));
+		_G(obj)->changeInventory(104, 110, &_G(room_blk));
 		break;
 
 	case 105:


Commit: f5f1e89ed118402b112feac40fdaf1910251d94f
    https://github.com/scummvm/scummvm/commit/f5f1e89ed118402b112feac40fdaf1910251d94f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: Fix missing file in previous commit

Changed paths:
    engines/chewy/object.h


diff --git a/engines/chewy/object.h b/engines/chewy/object.h
index 1630b6fab5b..f1167f75a33 100644
--- a/engines/chewy/object.h
+++ b/engines/chewy/object.h
@@ -58,12 +58,11 @@ public:
 	int16 del_obj_use(int16 nr);
 	int16 calc_rsi_flip_flop(int16 nr);
 	void set_rsi_flip_flop(int16 nr, int16 anz);
-	void add_inventar(int16 nr, RaumBlk *Rb);
-	void del_inventar(int16 nr, RaumBlk *Rb);
-	void change_inventar(int16 old_inv, int16 new_inv, RaumBlk *Rb);
-	void set_inventar(int16 nr, int16 x, int16 y, int16 automov,
-	                  RaumBlk *Rb);
-	int16 check_inventar(int16 nr);
+	void addInventory(int16 nr, RaumBlk *Rb);
+	void delInventory(int16 nr, RaumBlk *Rb);
+	void changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb);
+	void setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb);
+	bool checkInventory(int16 nr);
 	int16 is_exit(int16 mouse_x, int16 mouse_y);
 	uint8 mov_obj_room[MAX_MOV_OBJ + 1];
 	uint8 spieler_invnr[MAX_MOV_OBJ + 1];


Commit: efddc43975e79d5629a785fbcd4db844182e34e3
    https://github.com/scummvm/scummvm/commit/efddc43975e79d5629a785fbcd4db844182e34e3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: Process mouse events on button up in the cinema screen

Changed paths:
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/events.cpp
    engines/chewy/events.h
    engines/chewy/events_base.cpp
    engines/chewy/events_base.h


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 868405acc67..014227a877d 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -123,7 +123,7 @@ void Cinema::execute() {
 			timer_nr = 0;
 			delay = 0;
 		} else if (flag) {
-			EVENTS_UPDATE;
+			g_events->update(true);
 			if (--delay <= 0)
 				flag = false;
 		}
@@ -198,7 +198,7 @@ void Cinema::execute() {
 			}
 		}
 
-		EVENTS_UPDATE;
+		g_events->update(true);
 		SHOULD_QUIT_RETURN;
 	}
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index d002dbd7b27..6e34f44fa70 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -50,14 +50,14 @@ void EventsManager::timer_handler() {
 		++_G(timer_count);
 }
 
-void EventsManager::handleEvent(const Common::Event &event) {
+void EventsManager::handleEvent(const Common::Event &event, bool updateOnButtonUp) {
 	if (event.type >= Common::EVENT_MOUSEMOVE && event.type <= Common::EVENT_MBUTTONUP)
-		handleMouseEvent(event);
+		handleMouseEvent(event, updateOnButtonUp);
 	else if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_KEYUP)
 		handleKbdEvent(event);
 }
 
-void EventsManager::handleMouseEvent(const Common::Event &event) {
+void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnButtonUp) {
 	_mousePos = event.mouse;
 	bool isWheelEnabled = !_G(menu_display) && !_G(flags).InventMenu &&
 		g_engine->canSaveAutosaveCurrently() &&
@@ -69,11 +69,19 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
-		_G(minfo).button = 1;
+	case Common::EVENT_LBUTTONUP:
+		if (updateOnButtonUp && event.type == Common::EVENT_LBUTTONUP)
+			_G(minfo).button = 1;
+		if (!updateOnButtonUp && event.type == Common::EVENT_LBUTTONDOWN)
+			_G(minfo).button = 1;
 		break;
 
 	case Common::EVENT_RBUTTONDOWN:
-		_G(minfo).button = 2;
+	case Common::EVENT_RBUTTONUP:
+		if (updateOnButtonUp && event.type == Common::EVENT_RBUTTONUP)
+			_G(minfo).button = 2;
+		if (!updateOnButtonUp && event.type == Common::EVENT_RBUTTONDOWN)
+			_G(minfo).button = 2;
 		break;
 
 	case Common::EVENT_WHEELUP:
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index be5b3f3e955..1eada761abb 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -33,10 +33,10 @@ private:
 	void init_timer_handler();
 	static void timer_handler();
 
-	void handleMouseEvent(const Common::Event &event);
+	void handleMouseEvent(const Common::Event &event, bool updateOnButtonUp);
 	void handleKbdEvent(const Common::Event &event);
 protected:
-	void handleEvent(const Common::Event &event) override;
+	void handleEvent(const Common::Event &event, bool updateOnButtonUp) override;
 public:
 	KbdInfo *_kbInfo = nullptr;
 	Common::Point _mousePos;
diff --git a/engines/chewy/events_base.cpp b/engines/chewy/events_base.cpp
index 35dfff63ffb..3d0ee796b70 100644
--- a/engines/chewy/events_base.cpp
+++ b/engines/chewy/events_base.cpp
@@ -59,7 +59,7 @@ void EventsBase::updateScreen() {
 		g_system->updateScreen();
 }
 
-void EventsBase::update() {
+void EventsBase::update(bool updateOnButtonUp) {
 	// Brief pause to prevent 100% CPU usage
 	g_system->delayMillis(10);
 
@@ -72,11 +72,11 @@ void EventsBase::update() {
 
 #define MOUSE_MOVE \
 	if (moveEvent.type != Common::EVENT_INVALID) { \
-		handleEvent(moveEvent); \
+		handleEvent(moveEvent, updateOnButtonUp); \
 		moveEvent.type = Common::EVENT_INVALID; \
 	}
 
-void EventsBase::processEvents() {
+void EventsBase::processEvents(bool updateOnButtonUp) {
 	Common::Event e;
 	Common::Event moveEvent;
 
@@ -89,7 +89,7 @@ void EventsBase::processEvents() {
 		case Common::EVENT_KEYDOWN:
 		case Common::EVENT_KEYUP:
 			MOUSE_MOVE;
-			handleEvent(e);
+			handleEvent(e, updateOnButtonUp);
 			break;
 
 		default:
@@ -99,7 +99,7 @@ void EventsBase::processEvents() {
 				moveEvent = e;
 			} else {
 				MOUSE_MOVE;
-				handleEvent(e);
+				handleEvent(e, updateOnButtonUp);
 				return;
 			}
 			break;
@@ -111,7 +111,7 @@ void EventsBase::processEvents() {
 
 #undef MOUSE_MOVE
 
-void EventsBase::handleEvent(const Common::Event &event) {
+void EventsBase::handleEvent(const Common::Event &event, bool updateOnButtonUp) {
 	if (event.type == Common::EVENT_KEYDOWN) {
 		_pendingKeyEvents.push(event);
 	} else {
diff --git a/engines/chewy/events_base.h b/engines/chewy/events_base.h
index f5ff63e2062..a52adfd100b 100644
--- a/engines/chewy/events_base.h
+++ b/engines/chewy/events_base.h
@@ -67,12 +67,13 @@ protected:
 	/**
 	 * Process any pending events
 	 */
-	void processEvents();
+	void processEvents(bool updateOnButtonUp = false);
 
 	/**
 	 * Handles pending event
 	 */
-	virtual void handleEvent(const Common::Event &event);
+	virtual void handleEvent(const Common::Event &event, bool updateOnButtonUp);
+
 public:
 	Graphics::Screen *_screen;
 public:
@@ -88,7 +89,7 @@ public:
 	 * Handles doing a brief delay, checking for timer updates,
 	 * and polling events
 	 */
-	void update();
+	void update(bool updateOnButtonUp = false);
 
 	/**
 	 * Returns true if any unprocessed keyboard events are pending


Commit: 318f3ea2bb3caebb6685e66fcf8664ffc6622407
    https://github.com/scummvm/scummvm/commit/318f3ea2bb3caebb6685e66fcf8664ffc6622407
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: Restore some of the deleted refactored functions

These will be used in the new video player

Changed paths:
    engines/chewy/text.cpp
    engines/chewy/text.h


diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index f567bd3e682..df088d6fd6b 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -20,15 +20,126 @@
  */
 
 #include "common/system.h"
+#include "chewy/resource.h"
 #include "chewy/text.h"
 
 namespace Chewy {
 
-Text::Text() {
+Text::Text() : Resource("atds.tap") {
 }
+
 Text::~Text() {
 }
 
+TextEntryList *Text::getDialog(uint dialogNum, uint entryNum) {
+	if (dialogNum >= kADSTextMax)
+		error("getDialog(): Invalid entry number requested, %d (max %d)", dialogNum, kADSTextMax - 1);
+
+	TextEntryList *l = new TextEntryList();
+
+	byte *data = getChunkData(dialogNum);
+	byte *ptr = data;
+
+	ptr += 2;  // entry number
+	ptr += 2;  // number of persons
+	ptr += 2;  // automove count
+	ptr += 2;  // cursor number
+	ptr += 13; // misc data
+
+	for (uint i = 0; i <= entryNum; i++) {
+		do {
+			TextEntry curDialog;
+			ptr++; // current entry
+			ptr += 2;
+			curDialog.speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
+			ptr += 2;
+
+			do {
+				curDialog.text += *ptr++;
+
+				if (*ptr == 0 && *(ptr + 1) != kEndText) {
+					// TODO: Split lines
+					*ptr = ' ';
+				}
+			} while (*ptr != kEndText);
+
+			if (i == entryNum)
+				l->push_back(curDialog);
+
+		} while (*(ptr + 1) != kEndEntry);
+
+		ptr += 2; // kEndText, kEndEntry
+
+		if (*ptr == kEndBlock) // not found
+			break;
+	}
+
+	delete[] data;
+
+	return l;
+}
+
+TextEntry *Text::getText(uint dialogNum, uint entryNum) {
+	if (dialogNum < kADSTextMax)
+		error("getText(): Invalid entry number requested, %d (min %d)", dialogNum, kADSTextMax);
+
+	TextEntry *d = new TextEntry();
+	bool isText = (dialogNum >= kADSTextMax && dialogNum < kADSTextMax + kATSTextMax);
+	bool isAutoDialog = (dialogNum >= kADSTextMax + kATSTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax);
+	//bool isInvText = (dialogNum >= kADSTextMax + kATSTextMax + kAADTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax + kINVTextMax);
+
+	byte *data = getChunkData(dialogNum);
+	byte *ptr = data;
+
+	if (isAutoDialog)
+		ptr += 3;
+
+	for (uint i = 0; i <= entryNum; i++) {
+		ptr += 13;
+		d->speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
+		ptr += 2;
+
+		do {
+			if (i == entryNum)
+				d->text += *ptr++;
+			else
+				ptr++;
+
+			if (*ptr == 0 && *(ptr + 1) != kEndText) {
+				// TODO: Split lines
+				*ptr = ' ';
+			}
+		} while (*ptr);
+
+		if (*(ptr + 1) != kEndText || *(ptr + 2) != kEndChunk) {
+			warning("Invalid text resource - %d, %d", dialogNum, entryNum);
+
+			delete[] data;
+			delete d;
+
+			return nullptr;
+		}
+
+		if (!isText)
+			ptr += 3; // 0, kEndText, kEndChunk
+		if (isAutoDialog)
+			ptr += 3;
+
+		if (i == entryNum) {
+			// Found
+			delete[] data;
+			return d;
+		}
+	}
+
+	// Not found
+	delete[] data;
+	delete d;
+
+	return nullptr;
+}
+
+
 void Text::crypt(char *txt, uint32 size) {
 	uint8 *sp;
 	uint32 i;
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index e08fde9357f..dba7d4f4cdd 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -22,15 +22,69 @@
 #ifndef CHEWY_TEXT_H
 #define CHEWY_TEXT_H
 
+#include "common/list.h"
+#include "chewy/chewy.h"
+#include "chewy/resource.h"
+
 namespace Chewy {
 
-class Text {
+/**
+ * Game texts are contained in txt/atds.tap, and contain the following (in that order):
+ * ADS (Adventure Dialog System) - dialogs, 500 entries max
+ * ATS (Adventure Text System) - text descriptions, 100 entries max
+ * AAD (Adventure Auto Dialog System) - automatic dialogs, 100 entries max
+ * INV - inventory text descriptions, 100 entries max
+ * USE - use action texts, 100 entries max
+ */
+enum MaxTextTypes {
+	kADSTextMax = 500, //   0 - 499
+	kATSTextMax = 100, // 500 - 599
+	kAADTextMax = 100, // 600 - 699
+	kINVTextMax = 100, // 700 - 799
+	kUSETextMax = 100  // 800 - 899
+};
+
+/**
+ * Markers for text entries
+ */
+enum TextEntryMarkers {
+	kEndRow = 0x00,
+	kEndBlock = 0x0b,
+	kEndEntry = 0x0c,
+	kEndText = 0x0d,
+	kEndChunk = 0x0e
+	// There's also 0x0f, block end, which we don't use
+};
+
+#define VOICE_OFFSET 20
+
+struct TextEntry {
+	int16 speechId;
+	Common::String text;
+};
+
+typedef Common::List<TextEntry> TextEntryList;
+
+class Text : public Resource {
 public:
 	Text();
 	~Text();
 
-	void crypt(char *txt, uint32 size);
+	/**
+	 * Gets a list of lines for a specific dialog entry
+	 */
+	TextEntryList *getDialog(uint dialogNum, uint entryNum);
+
+	/**
+	* Gets a line of text of the following types:
+	* - text (ATS) - 500 - 599
+	* - auto dialog (AAD) - 600 - 699
+	* - inventory text (INV) - 700 - 799
+	* - use text (USE) - 800 - 899
+	*/
+	TextEntry *getText(uint dialogNum, uint entryNum);
 
+	void crypt(char *txt, uint32 size);
 	char *str_pos(char *txt_adr, int16 pos);
 };
 


Commit: b8d008297161fb722b8bcfb3c455240f76d381f8
    https://github.com/scummvm/scummvm/commit/b8d008297161fb722b8bcfb3c455240f76d381f8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: Simplify the game initialization code

Changed paths:
    engines/chewy/inits.cpp


diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index fc37112bf96..585d8d1f8c6 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -240,37 +240,19 @@ void new_game() {
 	_G(obj)->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
 	_G(obj)->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 
-	byte *tmp = (byte *)MALLOC(ROOM_ATS_MAX);
 	Common::File f;
-	if (f.open(ROOM_ATS_STEUER)) {
-		if (!f.read(tmp, ROOM_ATS_MAX)) {
-			error("new_game error");
-		}
-
-		f.close();
-	} else {
-		error("new_game error");
-	}
 
+	if (!f.open(ROOM_ATS_STEUER))
+		error("Error reading file: %s", ROOM_ATS_STEUER);
 	for (int16 i = 0; i < ROOM_ATS_MAX; i++)
-		_G(spieler).Ats[i * MAX_ATS_STATUS] = (uint8)tmp[i];
-	free(tmp);
-
-	tmp = (byte *)MALLOC(MAX_MOV_OBJ);
-
-	if (f.open(INV_ATS_STEUER)) {
-		if (!f.read(tmp, MAX_MOV_OBJ)) {
-			error("new_game error");
-		}
-
-		f.close();
-	} else {
-		error("new_game error");
-	}
+		_G(spieler).Ats[i * MAX_ATS_STATUS] = f.readByte();
+	f.close();
 
+	if (!f.open(INV_ATS_STEUER))
+		error("Error reading file: %s", INV_ATS_STEUER);
 	for (int16 i = 0; i < MAX_MOV_OBJ; i++)
-		_G(spieler).InvAts[i * MAX_ATS_STATUS] = (uint8)tmp[i];
-	free(tmp);
+		_G(spieler).InvAts[i * MAX_ATS_STATUS] = f.readByte();
+	f.close();
 
 	_G(obj)->sort();
 	for (int16 i = 0; i < _G(obj)->spieler_invnr[0]; i++)


Commit: cfb636c1bde0f3eecb3bd68ac3fd82641dca12ad
    https://github.com/scummvm/scummvm/commit/cfb636c1bde0f3eecb3bd68ac3fd82641dca12ad
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:37-08:00

Commit Message:
CHEWY: More work on the new video player

It is now the default player for all videos except the ones with custom
callbacks. Started importing video callbacks in the new video player

Changed paths:
  A engines/chewy/video/video_player.cpp
  A engines/chewy/video/video_player.h
    engines/chewy/chewy.cpp
    engines/chewy/chewy.h
    engines/chewy/debugger.cpp
    engines/chewy/module.mk
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room06.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 8e63344ee92..bf635925cf5 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -31,7 +31,7 @@
 #include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
-#include "chewy/video/cfo_decoder.h"
+#include "chewy/video/video_player.h"
 
 namespace Chewy {
 
@@ -61,6 +61,7 @@ ChewyEngine::~ChewyEngine() {
 	delete _globals;
 	delete _screen;
 	delete _sound;
+	delete _video;
 	g_engine = nullptr;
 	g_screen = nullptr;
 }
@@ -70,6 +71,7 @@ void ChewyEngine::initialize() {
 	_globals = new Globals();
 	_events = new EventsManager(_screen);
 	_sound = new Sound(_mixer);
+	_video = new VideoPlayer();
 
 	_tempFiles.add(ADSH_TMP, 5710);
 	SearchMan.add("temp", &_tempFiles, 99, false);
@@ -173,59 +175,4 @@ void ChewyEngine::showGmm(bool isInGame) {
 	_canSave = false;
 }
 
-void ChewyEngine::playVideo(uint num) {
-	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
-	VideoResource *videoResource = new VideoResource("cut.tap");
-	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
-
-	if (!cfoDecoder->loadStream(videoStream)) {
-		delete videoResource;
-		delete cfoDecoder;
-		return;
-	}
-
-	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
-	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
-	bool skipVideo = false;
-	byte curPalette[256 * 3];
-
-	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
-	//save_palette(curPalette);
-	_G(cur)->hide_cur();
-
-	cfoDecoder->start();
-
-	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo) {
-		if (cfoDecoder->needsUpdate()) {
-			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
-			if (frame) {
-				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
-
-				if (cfoDecoder->hasDirtyPalette())
-					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
-					//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
-
-				g_system->updateScreen();
-			}
-		}
-
-		Common::Event event;
-		while (g_system->getEventManager()->pollEvent(event)) {
-			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
-				skipVideo = true;
-		}
-
-		g_system->delayMillis(10);
-	}
-
-	cfoDecoder->close();
-
-	g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
-	//setScummVMPalette(curPalette, 0, 256);
-	_G(cur)->show_cur();
-
-	delete videoResource;
-	delete cfoDecoder;
-}
-
 } // End of namespace Chewy
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index e7be1d4a1c6..8b82c1cc9e6 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -47,6 +47,7 @@ struct ChewyGameDescription;
 class EventsManager;
 class Globals;
 class Sound;
+class VideoPlayer;
 
 class ChewyEngine : public Engine {
 private:
@@ -72,6 +73,7 @@ public:
 	EventsManager *_events = nullptr;
 	Globals *_globals = nullptr;
 	Sound *_sound = nullptr;
+	VideoPlayer *_video = nullptr;
 	Graphics::Screen *_screen = nullptr;
 	bool _showWalkAreas = false;
 
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 54d48e097a6..0fa20563521 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -24,6 +24,7 @@
 #include "chewy/globals.h"
 #include "chewy/ngshext.h"
 #include "chewy/chewy.h"
+#include "chewy/video/video_player.h"
 
 namespace Chewy {
 
@@ -88,7 +89,7 @@ bool Debugger::Cmd_PlayVideo(int argc, const char **argv) {
 	}
 
 	int resNum = atoi(argv[1]);
-	g_engine->playVideo(resNum);
+	g_engine->_video->playVideo(resNum);
 
 	return false;
 }
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index e8a6963e0d6..6eb6869166f 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -46,6 +46,7 @@ MODULE_OBJS = \
 	dialogs/main_menu.o \
 	dialogs/options.o \
 	video/cfo_decoder.o \
+	video/video_player.o \
 	rooms/room00.o \
 	rooms/room01.o \
 	rooms/room02.o \
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 9c560d51ba4..165f6b40fb4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -28,6 +28,7 @@
 #include "chewy/rooms/rooms.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
+#include "chewy/video/video_player.h"
 
 namespace Chewy {
 
@@ -878,7 +879,7 @@ static void flic_proc1() {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, _G(flic_val2));
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(_G(flic_val2));
+			g_engine->_video->playVideo(_G(flic_val2));
 #endif
 			flag = VALS4[i] && _G(atds)->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
@@ -951,18 +952,7 @@ void flic_cut(int16 nr) {
 		case 1000:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
-			g_engine->playVideo(nr);
-			break;
-
-		case FCUT_004:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room6::cut_serv1);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->playVideo(nr);
-#endif
+			g_engine->_video->playVideo(nr);
 			break;
 
 		case FCUT_005:
@@ -972,7 +962,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -983,7 +973,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -994,7 +984,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1015,7 +1005,7 @@ void flic_cut(int16 nr) {
 			_G(sndPlayer)->setLoopMode(1);
 
 			for (i = 0; i < 11; i++) {
-				g_engine->playVideo(FCUT_SPACECHASE_18 + i);
+				g_engine->_video->playVideo(FCUT_SPACECHASE_18 + i);
 				SHOULD_QUIT_RETURN;
 			}
 
@@ -1048,7 +1038,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(nr);
+				g_engine->_video->playVideo(nr);
 #endif
 			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 
@@ -1065,7 +1055,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1077,20 +1067,20 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
 		case FCUT_053:
 			for (i = 0; i < 3; ++i) {
-				g_engine->playVideo(nr);
+				g_engine->_video->playVideo(nr);
 				SHOULD_QUIT_RETURN;
 			}
 			break;
 
 		case FCUT_054:
-			g_engine->playVideo(nr);
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 			break;
 
 		case FCUT_055:
@@ -1101,20 +1091,20 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
 		case FCUT_058:
 			load_room_music(255);
-			g_engine->playVideo(FCUT_058);
+			g_engine->_video->playVideo(FCUT_058);
 
 			if (!_G(modul)) {
-				g_engine->playVideo(FCUT_059);
+				g_engine->_video->playVideo(FCUT_059);
 			}
 			if (!_G(spieler).R43GetPgLady) {
 				if (!_G(modul)) {
-					g_engine->playVideo(FCUT_060);
+					g_engine->_video->playVideo(FCUT_060);
 				}
 			} else {
 				if (!_G(modul)) {
@@ -1125,11 +1115,11 @@ void flic_cut(int16 nr) {
 					_G(flc)->custom_play(&_G(Ci));
 					_G(flc)->remove_custom_user_function();
 #else
-					g_engine->playVideo(FCUT_061);
+					g_engine->_video->playVideo(FCUT_061);
 #endif
 				}
 				if (!_G(modul)) {
-					g_engine->playVideo(FCUT_062);
+					g_engine->_video->playVideo(FCUT_062);
 				}
 			}
 			_G(sndPlayer)->fadeOut(0);
@@ -1145,7 +1135,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1166,7 +1156,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 
 		case FCUT_069:
@@ -1176,7 +1166,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 
 		case FCUT_070:
@@ -1186,13 +1176,13 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 			break;
 
 		case FCUT_078:
@@ -1202,13 +1192,13 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_flic_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 
 		case FCUT_083:
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				g_engine->playVideo(FCUT_083);
+				g_engine->_video->playVideo(FCUT_083);
 				SHOULD_QUIT_RETURN;
 			}
 			break;
@@ -1220,7 +1210,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1231,7 +1221,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1243,7 +1233,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(nr);
+				g_engine->_video->playVideo(nr);
 #endif
 			}
 
@@ -1257,7 +1247,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1271,15 +1261,15 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			g_engine->_sound->setMusicVolume(5 * Audio::Mixer::kMaxChannelVolume / 120);
 			break;
 
 		case FCUT_116:
 			for (i = 0; i < 6; ++i) {
-				g_engine->playVideo(nr);
+				g_engine->_video->playVideo(nr);
 				SHOULD_QUIT_RETURN;
 			}
 			break;
@@ -1292,7 +1282,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FLIC_CUT_133[i]);
+				g_engine->_video->playVideo(FLIC_CUT_133[i]);
 #endif
 				if (i == 0 || i == 1) {
 					_G(out)->set_pointer(nullptr);
@@ -1312,7 +1302,7 @@ void flic_cut(int16 nr) {
 			_G(flc)->custom_play(&_G(Ci));
 			_G(flc)->remove_custom_user_function();
 #else
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1323,7 +1313,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 1);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_000);
+			g_engine->_video->playVideo(FCUT_000);
 #endif
 
 			if (ret != -1) {
@@ -1335,7 +1325,7 @@ void flic_cut(int16 nr) {
 					ret = _G(flc)->custom_play(&_G(Ci));
 					SHOULD_QUIT_RETURN;
 #else
-					g_engine->playVideo(i + 3);
+					g_engine->_video->playVideo(i + 3);
 #endif
 				}
 			}
@@ -1349,7 +1339,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 6);
+				g_engine->_video->playVideo(i + 6);
 #endif
 			}
 			break;
@@ -1361,7 +1351,7 @@ void flic_cut(int16 nr) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 9);
+				g_engine->_video->playVideo(i + 9);
 #endif
 			}
 			break;
@@ -1374,7 +1364,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 12);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(i + 12);
+				g_engine->_video->playVideo(i + 12);
 #endif
 			}
 
@@ -1398,7 +1388,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 15);
+				g_engine->_video->playVideo(i + 15);
 #endif
 			}
 			break;
@@ -1418,7 +1408,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FLIC_CUT_1045[i]);
+				g_engine->_video->playVideo(FLIC_CUT_1045[i]);
 #endif
 
 				if (FLIC_CUT_1045[i] == 53) {
@@ -1428,7 +1418,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1031:
-			g_engine->playVideo(FCUT_031);
+			g_engine->_video->playVideo(FCUT_031);
 
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
@@ -1436,7 +1426,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_043);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_043);
+				g_engine->_video->playVideo(FCUT_043);
 #endif
 			}
 			break;
@@ -1446,7 +1436,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_050);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_050);
+			g_engine->_video->playVideo(FCUT_050);
 #endif
 
 			if (ret != -1) {
@@ -1456,7 +1446,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_048);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_048);
+				g_engine->_video->playVideo(FCUT_048);
 #endif
 			}
 			if (ret != -1) {
@@ -1464,7 +1454,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_049);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_049);
+				g_engine->_video->playVideo(FCUT_049);
 #endif
 			}
 
@@ -1479,7 +1469,7 @@ void flic_cut(int16 nr) {
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->playVideo(nr);
+			g_engine->_video->playVideo(nr);
 #endif
 			break;
 
@@ -1491,7 +1481,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 55);
+				g_engine->_video->playVideo(i + 55);
 #endif
 			}
 
@@ -1511,7 +1501,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, 58);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(58);
+			g_engine->_video->playVideo(58);
 #endif
 
 			if (ret != -1) {
@@ -1519,7 +1509,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, 59);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(59);
+				g_engine->_video->playVideo(59);
 #endif
 			}
 			if (ret != -1) {
@@ -1527,7 +1517,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_060);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_060);
+				g_engine->_video->playVideo(FCUT_060);
 #endif
 			}
 			if (ret != -1) {
@@ -1536,7 +1526,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_061);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_061);
+				g_engine->_video->playVideo(FCUT_061);
 #endif
 			}
 			if (ret != -1) {
@@ -1545,7 +1535,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_062);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_062);
+				g_engine->_video->playVideo(FCUT_062);
 #endif
 			}
 			break;
@@ -1561,7 +1551,7 @@ void flic_cut(int16 nr) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 65);
+				g_engine->_video->playVideo(i + 65);
 #endif
 			}
 			break;
@@ -1571,7 +1561,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_068);
 			_G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_068);
+			g_engine->_video->playVideo(FCUT_068);
 #endif
 
 			if (ret != -1) {
@@ -1581,7 +1571,7 @@ void flic_cut(int16 nr) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FCUT_070);
+				g_engine->_video->playVideo(FCUT_070);
 #endif
 			}
 			break;
@@ -1591,7 +1581,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_069);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_069);
+			g_engine->_video->playVideo(FCUT_069);
 #endif
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
@@ -1600,7 +1590,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 71);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(i + 71);
+				g_engine->_video->playVideo(i + 71);
 #endif
 			}
 			break;
@@ -1615,7 +1605,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + FLIC_CUT_1074[i]);
+				g_engine->_video->playVideo(i + FLIC_CUT_1074[i]);
 #endif
 			}
 			break;
@@ -1628,7 +1618,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FLIC_CUT_1080[i]);
+				g_engine->_video->playVideo(FLIC_CUT_1080[i]);
 #endif
 			}
 			break;
@@ -1638,7 +1628,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_087);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_087);
+			g_engine->_video->playVideo(FCUT_087);
 #endif
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
@@ -1648,7 +1638,7 @@ void flic_cut(int16 nr) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(i + 102);
+				g_engine->_video->playVideo(i + 102);
 #endif
 			}
 			break;
@@ -1658,7 +1648,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_088);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_088);
+			g_engine->_video->playVideo(FCUT_088);
 #endif
 
 			if (ret != -1) {
@@ -1667,7 +1657,7 @@ void flic_cut(int16 nr) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_086);
 				_G(flc)->custom_play(&_G(Ci));
 #else
-				g_engine->playVideo(FCUT_086);
+				g_engine->_video->playVideo(FCUT_086);
 #endif
 				_G(sndPlayer)->stopMod();
 			}
@@ -1699,7 +1689,7 @@ void flic_cut(int16 nr) {
 				_G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FLIC_CUT_1106[i]);
+				g_engine->_video->playVideo(FLIC_CUT_1106[i]);
 #endif
 			}
 			break;
@@ -1709,7 +1699,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_107);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_107);
+			g_engine->_video->playVideo(FCUT_107);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1728,7 +1718,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_108);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_108);
+			g_engine->_video->playVideo(FCUT_108);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1739,7 +1729,7 @@ void flic_cut(int16 nr) {
 			}
 #else
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->playVideo(FCUT_115);
+			g_engine->_video->playVideo(FCUT_115);
 #endif
 			break;
 
@@ -1752,7 +1742,7 @@ void flic_cut(int16 nr) {
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_110);
 			ret = _G(flc)->custom_play(&_G(Ci));
 #else
-			g_engine->playVideo(FCUT_110);
+			g_engine->_video->playVideo(FCUT_110);
 #endif
 
 #ifndef NEW_VIDEO_CODE
@@ -1765,7 +1755,7 @@ void flic_cut(int16 nr) {
 #else
 			_G(sndPlayer)->setMusicMasterVol(63);
 			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->playVideo(FCUT_112);
+			g_engine->_video->playVideo(FCUT_112);
 #endif
 			_G(sndPlayer)->stopMod();
 			break;
@@ -1778,7 +1768,7 @@ void flic_cut(int16 nr) {
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
-				g_engine->playVideo(FLIC_CUT_1113[i]);
+				g_engine->_video->playVideo(FLIC_CUT_1113[i]);
 #endif
 			}
 			break;
@@ -1792,18 +1782,12 @@ void flic_cut(int16 nr) {
 			}
 #else
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			g_engine->playVideo(FCUT_119);
+			g_engine->_video->playVideo(FCUT_119);
 #endif
 			break;
 
 		default:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle,
-				(nr < 1000) ? nr : nr - 1000);
-			_G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->playVideo(nr < 1000 ? nr : nr - 1000);
-#endif
+			g_engine->_video->playVideo(nr < 1000 ? nr : nr - 1000);
 			break;
 		}
 
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 1710ffacdfd..f08c68e5656 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -126,9 +126,5 @@ void Room6::bola_knopf() {
 	}
 }
 
-int16 Room6::cut_serv1(int16 frame) {
-	return (frame == 40) ? -1 : 0;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room06.h b/engines/chewy/rooms/room06.h
index bf83e3ae049..c5bf7a6265c 100644
--- a/engines/chewy/rooms/room06.h
+++ b/engines/chewy/rooms/room06.h
@@ -31,7 +31,6 @@ private:
 
 public:
 	static void entry();
-	static int16 cut_serv1(int16 frame);
 	static void bola_knopf();
 };
 
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
new file mode 100644
index 00000000000..2417c22898f
--- /dev/null
+++ b/engines/chewy/video/video_player.cpp
@@ -0,0 +1,116 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "chewy/video/cfo_decoder.h"
+#include "chewy/video/video_player.h"
+#include "chewy/globals.h"
+#include "chewy/resource.h"
+#include "chewy/sound.h"
+#include "common/events.h"
+#include "graphics/palette.h"
+
+namespace Chewy {
+
+void VideoPlayer::playVideo(uint num) {
+	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
+	VideoResource *videoResource = new VideoResource("cut.tap");
+	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
+
+	if (!cfoDecoder->loadStream(videoStream)) {
+		delete videoResource;
+		delete cfoDecoder;
+		return;
+	}
+
+	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
+	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
+	bool skipVideo = false;
+	byte curPalette[256 * 3];
+	uint32 curFrame = 0;
+
+	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
+	//save_palette(curPalette);
+	_G(cur)->hide_cur();
+
+	// Clear events
+	Common::Event event;
+	while (g_system->getEventManager()->pollEvent(event)) {
+	}
+
+	cfoDecoder->start();
+
+	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && handleCustom(num, curFrame)) {
+		if (cfoDecoder->needsUpdate()) {
+			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
+			if (frame) {
+				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
+				curFrame = cfoDecoder->getCurFrame();
+
+				if (cfoDecoder->hasDirtyPalette())
+					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
+				//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
+
+				g_system->updateScreen();
+			}
+		}
+
+		while (g_system->getEventManager()->pollEvent(event)) {
+			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
+				skipVideo = true;
+		}
+
+		g_system->delayMillis(10);
+	}
+
+	cfoDecoder->close();
+
+	g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
+	//setScummVMPalette(curPalette, 0, 256);
+	_G(cur)->show_cur();
+
+	delete videoResource;
+	delete cfoDecoder;
+}
+
+bool VideoPlayer::handleCustom(uint num, uint frame) {
+	switch (num) {
+	case FCUT_004:
+		// Room6::cut_serv1
+		return (frame == 40) ? false : true;
+	case FCUT_005:
+		// Room10::cut_serv
+		// TODO: The text functions print to an overlay buffer
+		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+		if (frame == 31) {
+			start_aad(107, 0);
+			//TextEntryList *text = _G(txt)->getDialog(107, 0);
+			//g_engine->_sound->playSpeech(text->front().speechId);
+			//delete text;
+		}
+		break;
+	default:
+		return true;
+	}
+
+	return true;
+}
+
+} // End of namespace Chewy
diff --git a/engines/chewy/video/video_player.h b/engines/chewy/video/video_player.h
new file mode 100644
index 00000000000..fb187abba13
--- /dev/null
+++ b/engines/chewy/video/video_player.h
@@ -0,0 +1,37 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_VIDEO_VIDEO_PLAYER_H
+#define CHEWY_VIDEO_VIDEO_PLAYER_H
+
+namespace Chewy {
+
+class VideoPlayer {
+public:
+	void playVideo(uint num);
+
+private:
+	bool handleCustom(uint num, uint frame);
+};
+
+} // End of namespace Chewy
+
+#endif


Commit: c5f604db2d27229b82e4be696e19bceeaadb25ac
    https://github.com/scummvm/scummvm/commit/c5f604db2d27229b82e4be696e19bceeaadb25ac
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
CHEWY: Restore comments

Changed paths:
    engines/chewy/resource.h


diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h
index 992b0a7e2cc..bd5399d73bb 100644
--- a/engines/chewy/resource.h
+++ b/engines/chewy/resource.h
@@ -35,43 +35,47 @@
 namespace Chewy {
 
 enum ResourceType {
-	kResourcePCX = 0,
-	kResourceTBF = 1,
+	kResourcePCX = 0,		// unused
+	kResourceTBF = 1,		// background art, contained in TGPs
 	kResourceTAF = 2,
 	kResourceTFF = 3,
-	kResourceVOC = 4,
-	kResourceTPF = 5,
-	kResourceTMF = 6,
-	kResourceMOD = 7,
-	kResourceRAW = 8,
-	kResourceLBM = 9,
+	kResourceVOC = 4,		// speech and SFX, contained in TVPs
+	kResourceTPF = 5,		// unused
+	kResourceTMF = 6,		// music, similar to a MOD file, contained in details.tap
+	kResourceMOD = 7,		// unused
+	kResourceRAW = 8,		// unused
+	kResourceLBM = 9,		// unused
 	kResourceRDI = 10,
 	kResourceTXT = 11,
 	kResourceIIB = 12,
 	kResourceSIB = 13,
 	kResourceEIB = 14,
-	kResourceATS = 15,
-	kResourceSAA = 16,
-	kResourceFLC = 17,
-	kResourceAAD = 18,
-	kResourceADS = 19,
-	kResourceADH = 20,
-	kResourceTGP = 21,
-	kResourceTVP = 22,
-	kResourceTTP = 23,
-	kResourceTAP = 24,
-	kResourceCFO = 25,
-	kResourceTCF = 26
+	kResourceATS = 15,		// unused
+	kResourceSAA = 16,		// unused
+	kResourceFLC = 17,		// unused
+	kResourceAAD = 18,		// unused
+	kResourceADS = 19,		// unused
+	kResourceADH = 20,		// used in txt/diah.adh
+	kResourceTGP = 21,		// container for background art, used in back/comic.tgp, back/episode1.tgp and back/gbook.tgp
+	kResourceTVP = 22,		// container for speech, used in sound/speech.tvp
+	kResourceTTP = 23,		// unused
+	kResourceTAP = 24,		// container for sound effects, music and cutscenes, used in sound/details.tap and cut/cut.tap
+	kResourceCFO = 25,		// unused
+	kResourceTCF = 26		// error messages, used in err/err_e.tcf (English) and err/err_d.tcf (German)
 };
 
+// Generic chunk header
 struct Chunk {
 	uint32 size;
-	uint16 num;
+	uint16 num;	// same as the type below, used in chunks where the type is substituted with count
 	ResourceType type;
-	uint32 pos;
+	uint32 pos;	// position of the actual data
 };
 
+// TBF (background) chunk header
 struct TBFChunk {
+	// TBF chunk header
+	// ID (TBF, followed by a zero)
 	uint16 screenMode;
 	uint16 compressionFlag;
 	uint32 size;
@@ -81,24 +85,31 @@ struct TBFChunk {
 	uint8 *data;
 };
 
+// TAF (sprite) image data chunk header - 15 bytes
 struct TAFChunk {
 	uint16 compressionFlag;
 	uint16 width;
 	uint16 height;
+	// 4 bytes next sprite offset
+	// 4 bytes sprite image offset
+	// 1 byte padding
 	uint8 *data;
 };
 
+// Sound chunk header
 struct SoundChunk {
 	uint32 size;
 	uint8 *data;
 };
 
+// Video chunk header
 struct VideoChunk {
+	// ID (CFA, followed by a zero)
 	uint32 size;
 	uint16 frameCount;
 	uint16 width;
 	uint16 height;
-	uint32 frameDelay;
+	uint32 frameDelay;	// in ms
 	uint32 firstFrameOffset;
 };
 


Commit: 3d7209f44affad677039e2d33bf43a0a18e1f1a6
    https://github.com/scummvm/scummvm/commit/3d7209f44affad677039e2d33bf43a0a18e1f1a6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
CHEWY: Use the new video player in more videos

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room87.h
    engines/chewy/video/video_player.cpp
    engines/chewy/video/video_player.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 165f6b40fb4..32d5108cd4a 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -948,13 +948,6 @@ void flic_cut(int16 nr) {
 
 	if (_G(Ci).Handle) {
 		switch (nr) {
-		case FCUT_000:
-		case 1000:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
-			g_engine->_video->playVideo(nr);
-			break;
-
 		case FCUT_005:
 #ifndef NEW_VIDEO_CODE
 			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
@@ -1035,11 +1028,11 @@ void flic_cut(int16 nr) {
 			do {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
+				ret = _G(flc)->custom_play(&_G(Ci));			
 #else
-				g_engine->_video->playVideo(nr);
+				ret = g_engine->_video->playVideo(nr) ? 0 : -1;
 #endif
+				SHOULD_QUIT_RETURN;
 			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
 
 			if (nr != FCUT_036)
@@ -1214,17 +1207,6 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case FCUT_094:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room87::proc3);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
-
 		case FCUT_095:
 			_G(flc)->set_custom_user_function(Room87::proc5);
 
@@ -1253,17 +1235,8 @@ void flic_cut(int16 nr) {
 
 		case FCUT_112:
 			g_engine->_sound->setMusicVolume(32 * Audio::Mixer::kMaxChannelVolume / 120);
-#ifndef NEW_VIDEO_CODE
-			_G(flc)->set_custom_user_function(Room56::proc1);
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
 			g_engine->_video->playVideo(nr);
 			g_engine->_video->playVideo(nr);
-#endif
 			g_engine->_sound->setMusicVolume(5 * Audio::Mixer::kMaxChannelVolume / 120);
 			break;
 
@@ -1277,13 +1250,9 @@ void flic_cut(int16 nr) {
 		case FCUT_133:
 		case 1123:
 			for (i = 0; i < 13 && ret != -1 && !_G(modul); ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_133[i]);
-				ret = _G(flc)->custom_play(&_G(Ci));
+				ret = g_engine->_video->playVideo(FLIC_CUT_133[i]) ? 0 : -1;
 				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FLIC_CUT_133[i]);
-#endif
+
 				if (i == 0 || i == 1) {
 					_G(out)->set_pointer(nullptr);
 					_G(out)->cls();
@@ -1345,14 +1314,9 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1009:
-			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 9);
-				_G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
+			for (i = 0; i < 2; ++i) {
 				g_engine->_video->playVideo(i + 9);
-#endif
+				SHOULD_QUIT_RETURN;
 			}
 			break;
 
@@ -1432,12 +1396,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1048:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_050);
-			_G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_050);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_050) ? 0 : -1;
 
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
@@ -1449,14 +1408,8 @@ void flic_cut(int16 nr) {
 				g_engine->_video->playVideo(FCUT_048);
 #endif
 			}
-			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_049);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_049);
-#endif
-			}
+			if (ret != -1)
+				ret = g_engine->_video->playVideo(FCUT_049) ? 0 : -1;
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
@@ -1478,7 +1431,7 @@ void flic_cut(int16 nr) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 55);
-				ret = _G(flc)->custom_play(&_G(Ci));
+				ret = _G(flc)->custom_play(&_G(Ci)) ? 0 : -1;
 				SHOULD_QUIT_RETURN;
 #else
 				g_engine->_video->playVideo(i + 55);
@@ -1497,29 +1450,14 @@ void flic_cut(int16 nr) {
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;
 			load_room_music(255);
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 58);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(58);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_058) ? 0 : -1;
+
+			if (ret != -1)
+				ret = g_engine->_video->playVideo(FCUT_059) ? 0 : -1;
+
+			if (ret != -1)
+				ret = g_engine->_video->playVideo(FCUT_060) ? 0 : -1;
 
-			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 59);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(59);
-#endif
-			}
-			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_060);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_060);
-#endif
-			}
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 #ifndef NEW_VIDEO_CODE
@@ -1546,23 +1484,13 @@ void flic_cut(int16 nr) {
 			load_room_music(256);
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 65);
-				_G(flc)->custom_play(&_G(Ci));
+				ret = g_engine->_video->playVideo(i + 65, false) ? 0 : -1;
 				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + 65);
-#endif
 			}
 			break;
 
 		case 1068:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_068);
-			_G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_068);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_068) ? 0 : -1;
 
 			if (ret != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
@@ -1577,12 +1505,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1069:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_069);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_069);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_069) ? 0 : -1;
 
 			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
@@ -1624,12 +1547,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1087:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_087);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_087);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_087) ? 0 : -1;
 
 			for (i = 0; i < 2 && ret != -1; ++i) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
@@ -1644,12 +1562,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1088:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_088);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_088);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_088) ? 0 : -1;
 
 			if (ret != -1) {
 				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
@@ -1695,12 +1608,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1107:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_107);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_107);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_107) ? 0 : -1;
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
@@ -1714,12 +1622,7 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1108:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_108);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_108);
-#endif
+			ret = g_engine->_video->playVideo(FCUT_108) ? 0 : -1;
 
 #ifndef NEW_VIDEO_CODE
 			if (ret != -1) {
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index f48f6014af1..78d9d9c04fd 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -143,10 +143,6 @@ int Room87::proc2(int16 txt_nr) {
 	return 1;
 }
 
-int16 Room87::proc3(int16 key) {
-	return key < 12 ? 0 : -1;
-}
-
 int16 Room87::proc5(int16 key) {
 	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	return 0;
diff --git a/engines/chewy/rooms/room87.h b/engines/chewy/rooms/room87.h
index 6455a84464f..3a5088b3698 100644
--- a/engines/chewy/rooms/room87.h
+++ b/engines/chewy/rooms/room87.h
@@ -33,7 +33,6 @@ public:
 	static void xit(int16 eib_nr);
 	static void setup_func();
 	static int proc2(int16 txt_nr);
-	static int16 proc3(int16 key);
 	static int16 proc5(int16 key);
 	static int proc4();
 };
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 2417c22898f..e2ad47a8a86 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -29,15 +29,20 @@
 
 namespace Chewy {
 
-void VideoPlayer::playVideo(uint num) {
+bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 	CfoDecoder *cfoDecoder = new CfoDecoder(g_engine->_sound);
 	VideoResource *videoResource = new VideoResource("cut.tap");
 	Common::SeekableReadStream *videoStream = videoResource->getVideoStream(num);
 
+	if (stopMusic) {
+		_G(sndPlayer)->stopMod();
+		_G(currentSong) = -1;
+	}
+
 	if (!cfoDecoder->loadStream(videoStream)) {
 		delete videoResource;
 		delete cfoDecoder;
-		return;
+		return false;
 	}
 
 	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
@@ -88,6 +93,8 @@ void VideoPlayer::playVideo(uint num) {
 
 	delete videoResource;
 	delete cfoDecoder;
+
+	return !skipVideo;
 }
 
 bool VideoPlayer::handleCustom(uint num, uint frame) {
@@ -106,6 +113,12 @@ bool VideoPlayer::handleCustom(uint num, uint frame) {
 			//delete text;
 		}
 		break;
+	case FCUT_094:
+		//Room87::proc3
+		return (frame >= 12) ? false : true;
+	case FCUT_112:
+		//Room56::proc1
+		return (_G(in)->get_switch_code() == 1) ? false : true;
 	default:
 		return true;
 	}
diff --git a/engines/chewy/video/video_player.h b/engines/chewy/video/video_player.h
index fb187abba13..c6e5d138e7b 100644
--- a/engines/chewy/video/video_player.h
+++ b/engines/chewy/video/video_player.h
@@ -26,7 +26,12 @@ namespace Chewy {
 
 class VideoPlayer {
 public:
-	void playVideo(uint num);
+	/**
+	 * @Plays a video file
+	 * @param num - the video file number
+	 * @return - true if played, false if skipped
+	*/
+	bool playVideo(uint num, bool stopMusic = true);
 
 private:
 	bool handleCustom(uint num, uint frame);


Commit: 1ea4b7bd5b524b759d8923e943283b8a0215a4bb
    https://github.com/scummvm/scummvm/commit/1ea4b7bd5b524b759d8923e943283b8a0215a4bb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
Remove the modul / fcode checks

These checks were used for incorrect resources, so it's best to place
the relevant checks when loading resources instead of random places in
the code. Also, remove unused chunk IDs

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/data.cpp
    engines/chewy/detail.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/effect.cpp
    engines/chewy/flic.cpp
    engines/chewy/gedclass.cpp
    engines/chewy/globals.h
    engines/chewy/m_event.cpp
    engines/chewy/memory.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 12ad33446b2..58cc9079bad 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -313,39 +313,33 @@ void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chu
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead Ch;
 	char *tmp_adr = atds_adr(fname, chunk_start, chunk_anz);
-	if (!_G(modul)) {
-		if (rs) {
-			_atdshandle[mode] = rs;
-			_atdsmem[mode] = tmp_adr;
-			_atdspooloff[mode] = chunk_start;
-			switch (mode) {
-			case INV_USE_DATEI:
-				_G(mem)->file->select_pool_item(rs, _atdspooloff[mode]);
-				rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
-
-				if (!Ch.load(rs)) {
-					error("Error reading from %s", fname);
-				} else {
-					free(_invUseMem);
-					_invUseMem = (char *)MALLOC(Ch.size + 3l);
-
-					if (!_G(modul)) {
-						if (Ch.size) {
-							if (!rs->read(_invUseMem, Ch.size)) {
-								error("Error reading from %s", fname);
-							} else
-								crypt(_invUseMem, Ch.size);
-						}
-						_invUseMem[Ch.size] = (char)BLOCKENDE;
-						_invUseMem[Ch.size + 1] = (char)BLOCKENDE;
-						_invUseMem[Ch.size + 2] = (char)BLOCKENDE;
-					}
+	if (rs) {
+		_atdshandle[mode] = rs;
+		_atdsmem[mode] = tmp_adr;
+		_atdspooloff[mode] = chunk_start;
+		switch (mode) {
+		case INV_USE_DATEI:
+			_G(mem)->file->select_pool_item(rs, _atdspooloff[mode]);
+			rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
+
+			if (!Ch.load(rs)) {
+				error("Error reading from %s", fname);
+			} else {
+				free(_invUseMem);
+				_invUseMem = (char *)MALLOC(Ch.size + 3l);
+
+				if (Ch.size) {
+					if (!rs->read(_invUseMem, Ch.size)) {
+						error("Error reading from %s", fname);
+					} else
+						crypt(_invUseMem, Ch.size);
 				}
-				break;
+				_invUseMem[Ch.size] = (char)BLOCKENDE;
+				_invUseMem[Ch.size + 1] = (char)BLOCKENDE;
+				_invUseMem[Ch.size + 2] = (char)BLOCKENDE;
 			}
+			break;
 		}
-	} else {
-		error("Error reading from %s", fname);
 	}
 }
 
@@ -354,28 +348,26 @@ void Atdsys::open_handle(const char *fname, int16 mode) {
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname, 0, 20000);
-	if (!_G(modul)) {
-		Stream *stream = chewy_fopen(fname);
-		if (stream) {
-			close_handle(mode);
-			_atdshandle[mode] = stream;
-			_atdsmem[mode] = tmp_adr;
-
-			switch (mode) {
-			case ADH_DATEI:
-				_adsBlock = (AdsBlock *)_atdsmem[ADH_HANDLE];
-				break;
+	Stream *stream = chewy_fopen(fname);
+	if (stream) {
+		close_handle(mode);
+		_atdshandle[mode] = stream;
+		_atdsmem[mode] = tmp_adr;
 
-			case INV_IDX_DATEI:
-				_atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
-				break;
+		switch (mode) {
+		case ADH_DATEI:
+			_adsBlock = (AdsBlock *)_atdsmem[ADH_HANDLE];
+			break;
 
-			default:
-				break;
-			}
-		} else {
-			error("Error reading from %s", fname);
+		case INV_IDX_DATEI:
+			_atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
+			break;
+
+		default:
+			break;
 		}
+	} else {
+		error("Error reading from %s", fname);
 	}
 }
 
@@ -1115,25 +1107,23 @@ bool  Atdsys::ads_start(int16 dia_nr) {
 	bool ret = false;
 
 	load_atds(dia_nr, ADS_DATEI);
-	if (!_G(modul)) {
-		bool ende = false;
-		if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
-		        _atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
-		        _atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
-			ende = true;
-		if (!ende) {
-			_adsv.Ptr = _atdsmem[ADS_HANDLE];
-			_adsv.TxtHeader = (AdsTxtHeader *)_adsv.Ptr;
-			if (_adsv.TxtHeader->DiaNr == dia_nr) {
-				ret = true;
-				_adsv.Ptr += sizeof(AdsTxtHeader);
-				_adsv.Person = (AadInfo *) _adsv.Ptr;
-				_adsv.Ptr += _adsv.TxtHeader->PerAnz * sizeof(AadInfo);
-				_adsv.Dialog = dia_nr;
-				_adsv.StrNr = 0;
-				_adsStack[0] = 0;
-				_adsStackPtr = 1;
-			}
+	bool ende = false;
+	if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
+		    _atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
+		    _atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
+		ende = true;
+	if (!ende) {
+		_adsv.Ptr = _atdsmem[ADS_HANDLE];
+		_adsv.TxtHeader = (AdsTxtHeader *)_adsv.Ptr;
+		if (_adsv.TxtHeader->DiaNr == dia_nr) {
+			ret = true;
+			_adsv.Ptr += sizeof(AdsTxtHeader);
+			_adsv.Person = (AadInfo *) _adsv.Ptr;
+			_adsv.Ptr += _adsv.TxtHeader->PerAnz * sizeof(AadInfo);
+			_adsv.Dialog = dia_nr;
+			_adsv.StrNr = 0;
+			_adsStack[0] = 0;
+			_adsStackPtr = 1;
 		}
 	}
 	return ret;
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 71edd14b934..0ee374a9bc8 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -218,7 +218,7 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 				select_pool_item(&f, chunk_start);
 				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
 
-				for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!_G(modul)) && i < (chunk_start + chunk_anz); i++) {
+				for (int16 i = chunk_start; (i < Nph.PoolAnz) && i < (chunk_start + chunk_anz); i++) {
 					ChunkHead ch;
 					if (!ch.load(&f)) {
 						error("get_poolsize error");
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 8dd08dacc76..93bfe045ec2 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -206,8 +206,7 @@ void Detail::load_rdi_taf(const char *fname_, int16 load_flag) {
 		strcpy(_tafName, fname_);
 		if (!load_flag) {
 			_rdi.dptr = init_taf_tbl(fname_);
-			if (!_G(modul))
-				load_taf_tbl(_rdi.dptr);
+			load_taf_tbl(_rdi.dptr);
 		} else {
 			_rdi.dptr = _G(mem)->taf_adr(fname_);
 			_fullTaf = true;
@@ -409,7 +408,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 	if (end > MAXDETAILS)
 		end = MAXDETAILS - 1;
 
-	for (int16 i = start; (i <= end) && (!_G(modul)); i++) {
+	for (int16 i = start; (i <= end); i++) {
 		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
@@ -422,8 +421,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 			int16 y = adiptr->y + ky - scry;
 			if (adiptr->load_flag == 1) {
 				load_taf_ani_sprite(sprnr);
-				if (!_G(modul))
-					_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
+				_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
 			} else
 				_G(out)->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 197e86241bd..1357525f637 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -82,220 +82,218 @@ int16 Files::execute(bool isInGame) {
 	_G(out)->set_pointer(_G(workptr));
 	show_cur();
 
-	if (!_G(modul)) {
-		pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
-		for (i = SAVE; i <= W7; i++)
-			pt[i] = Common::Point(5, 5);
-
-		Common::fill(visibility, visibility + 8, true);
-		Common::fill(mode, mode + 8, 0);
-		mode[W8] = 1;
-
-		if (!isInGame) {
-			visibility[SAVE] = false;
-			visibility[GAME] = false;
-			mode[LOAD] = 1;
-			mode[W8] = 0;
-		}
+	pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
+	for (i = SAVE; i <= W7; i++)
+		pt[i] = Common::Point(5, 5);
+
+	Common::fill(visibility, visibility + 8, true);
+	Common::fill(mode, mode + 8, 0);
+	mode[W8] = 1;
+
+	if (!isInGame) {
+		visibility[SAVE] = false;
+		visibility[GAME] = false;
+		mode[LOAD] = 1;
+		mode[W8] = 0;
+	}
 
-		text_off = 0;		// Top visible save slot
-		active_slot = 0;	// Currently selected slot
-
-		while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
-			// Draw the dialog background
-			_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-
-			// Draw the buttons at the bottom
-			for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
-				if (visibility[j]) {
-					if (!mode[j])
-						// Not pressed
-						_G(out)->sprite_set(
-							ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
-							76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
-					else
-						// Pressed
-						_G(out)->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
-							76 + ti->korrektur[(i << 1) + 1], 0);
-				}
+	text_off = 0;		// Top visible save slot
+	active_slot = 0;	// Currently selected slot
+
+	while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
+		// Draw the dialog background
+		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
+
+		// Draw the buttons at the bottom
+		for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
+			if (visibility[j]) {
+				if (!mode[j])
+					// Not pressed
+					_G(out)->sprite_set(
+						ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
+						76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
+				else
+					// Pressed
+					_G(out)->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
+						76 + ti->korrektur[(i << 1) + 1], 0);
 			}
+		}
 
-			// Write the list of savegame slots
-			tmp = fnames + (text_off * 40);
-			for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
-				if (i != active_slot) {
-					_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
-					_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
-				} else {
-					_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
-					_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
-					_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
-				}
+		// Write the list of savegame slots
+		tmp = fnames + (text_off * 40);
+		for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
+			if (i != active_slot) {
+				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+				_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
+			} else {
+				_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
+				_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
+				_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
 			}
+		}
 
-			key = _G(in)->get_switch_code();
-
-			if (mode[SCROLL_UP])
-				--mode[SCROLL_UP];
-			if (mode[SCROLL_DOWN])
-				--mode[SCROLL_DOWN];
+		key = _G(in)->get_switch_code();
 
-			if (mode[GAME])
-				--mode[GAME];
-			if (mode[GAME] == 1)
-				key = Common::KEYCODE_ESCAPE;
+		if (mode[SCROLL_UP])
+			--mode[SCROLL_UP];
+		if (mode[SCROLL_DOWN])
+			--mode[SCROLL_DOWN];
 
-			if (mode[QUIT])
-				--mode[QUIT];
-			if (mode[QUIT] == 1) {
-				_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
-				_G(out)->back2screen(_G(workpage));
-				_G(in)->alter_kb_handler();
-
-				key = getch();
-				if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
-					ret = 1;
-					key = Common::KEYCODE_ESCAPE;
-				} else {
-					key = 0;
-				}
+		if (mode[GAME])
+			--mode[GAME];
+		if (mode[GAME] == 1)
+			key = Common::KEYCODE_ESCAPE;
 
-				_G(in)->neuer_kb_handler(&_G(kbinfo));
-			}
+		if (mode[QUIT])
+			--mode[QUIT];
+		if (mode[QUIT] == 1) {
+			_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
+			_G(out)->back2screen(_G(workpage));
+			_G(in)->alter_kb_handler();
 
-			if (mode[OPTIONS])
-				--mode[OPTIONS];
-			if (mode[OPTIONS] == 1) {
-				Dialogs::Options::execute(ti);
+			key = getch();
+			if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
+				ret = 1;
+				key = Common::KEYCODE_ESCAPE;
+			} else {
+				key = 0;
 			}
 
-			if (!flag && _G(minfo).button == 1) {
-				rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
-				flag = true;
-				key = 0;
+			_G(in)->neuer_kb_handler(&_G(kbinfo));
+		}
 
-				switch (rect) {
-				case 0:
-					key = Common::KEYCODE_UP;
-					break;
-				case 1:
-					key = Common::KEYCODE_DOWN;
-					break;
-				case 2:
-					line = (_G(minfo).y - 68) / 10;
-					if (line == active_slot)
-						key = Common::KEYCODE_RETURN;
-					else
-						active_slot = line;
-					if (active_slot > 5)
-						active_slot = 5;
-
-					if (!isInGame)
-						goto enter;
-					break;
-				case 3:
-					key = Common::KEYCODE_F1;
-					break;
-				case 4:
-					key = Common::KEYCODE_F2;
-					break;
-				case 5:
-					key = Common::KEYCODE_F3;
-					break;
-				case 6:
-					key = Common::KEYCODE_F4;
-					break;
-				case 7:
-					key = Common::KEYCODE_F5;
-					break;
-				}
+		if (mode[OPTIONS])
+			--mode[OPTIONS];
+		if (mode[OPTIONS] == 1) {
+			Dialogs::Options::execute(ti);
+		}
 
-			} else if (flag && _G(minfo).button == 0) {
-				flag = false;
-			}
+		if (!flag && _G(minfo).button == 1) {
+			rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
+			flag = true;
+			key = 0;
 
-			switch (key) {
-			case Common::KEYCODE_F1:
-				if (visibility[SAVE]) {
-					mode[LOAD] = 0;
-					mode[SAVE] = 1;
-					mode[W8] = 0;
+			switch (rect) {
+			case 0:
+				key = Common::KEYCODE_UP;
+				break;
+			case 1:
+				key = Common::KEYCODE_DOWN;
+				break;
+			case 2:
+				line = (_G(minfo).y - 68) / 10;
+				if (line == active_slot)
+					key = Common::KEYCODE_RETURN;
+				else
+					active_slot = line;
+				if (active_slot > 5)
+					active_slot = 5;
+
+				if (!isInGame)
 					goto enter;
-				}
 				break;
-
-			case Common::KEYCODE_F2:
-				mode[LOAD] = 1;
-				mode[SAVE] = 0;
-				mode[W8] = 0;
-				goto enter;
+			case 3:
+				key = Common::KEYCODE_F1;
 				break;
-
-			case Common::KEYCODE_F3:
-				if (visibility[GAME])
-					mode[GAME] = 10;
+			case 4:
+				key = Common::KEYCODE_F2;
 				break;
-
-			case Common::KEYCODE_F4:
-				mode[QUIT] = 10;
+			case 5:
+				key = Common::KEYCODE_F3;
 				break;
-
-			case Common::KEYCODE_F5:
-				mode[OPTIONS] = 10;
+			case 6:
+				key = Common::KEYCODE_F4;
 				break;
-
-			case Common::KEYCODE_UP:
-				mode[SCROLL_UP] = 10;
-				if (active_slot > 0)
-					--active_slot;
-				else if (text_off > 0)
-					--text_off;
+			case 7:
+				key = Common::KEYCODE_F5;
 				break;
+			}
 
-			case Common::KEYCODE_DOWN:
-				mode[SCROLL_DOWN] = 10;
-				if (active_slot < (NUM_VISIBLE_SLOTS - 1))
-					++active_slot;
-				else if (text_off < (20 - NUM_VISIBLE_SLOTS))
-					++text_off;
-				break;
+		} else if (flag && _G(minfo).button == 0) {
+			flag = false;
+		}
+
+		switch (key) {
+		case Common::KEYCODE_F1:
+			if (visibility[SAVE]) {
+				mode[LOAD] = 0;
+				mode[SAVE] = 1;
+				mode[W8] = 0;
+				goto enter;
+			}
+			break;
 
-			case Common::KEYCODE_RETURN:
-			case Common::KEYCODE_RETURN + ALT:
+		case Common::KEYCODE_F2:
+			mode[LOAD] = 1;
+			mode[SAVE] = 0;
+			mode[W8] = 0;
+			goto enter;
+			break;
+
+		case Common::KEYCODE_F3:
+			if (visibility[GAME])
+				mode[GAME] = 10;
+			break;
+
+		case Common::KEYCODE_F4:
+			mode[QUIT] = 10;
+			break;
+
+		case Common::KEYCODE_F5:
+			mode[OPTIONS] = 10;
+			break;
+
+		case Common::KEYCODE_UP:
+			mode[SCROLL_UP] = 10;
+			if (active_slot > 0)
+				--active_slot;
+			else if (text_off > 0)
+				--text_off;
+			break;
+
+		case Common::KEYCODE_DOWN:
+			mode[SCROLL_DOWN] = 10;
+			if (active_slot < (NUM_VISIBLE_SLOTS - 1))
+				++active_slot;
+			else if (text_off < (20 - NUM_VISIBLE_SLOTS))
+				++text_off;
+			break;
+
+		case Common::KEYCODE_RETURN:
+		case Common::KEYCODE_RETURN + ALT:
 enter:
-				if (mode[LOAD]) {
-					tmp = fnames + ((text_off + active_slot) * 40);
-					if (tmp[0]) {
-						_G(currentSong) = -1;
-						_G(iog)->load(text_off + active_slot, _G(ioptr).save_path);
-						key = Common::KEYCODE_ESCAPE;
-					}
-				} else if (mode[SAVE]) {
-					_G(out)->back2screen(_G(workpage));
-					_G(out)->set_pointer(_G(screen0));
-					_G(in)->alter_kb_handler();
-					tmp = fnames + ((text_off + active_slot) * 40);
-					key = _G(out)->scanxy(70, 68 + (active_slot * 10),
-						255, 42, 14, 0, "%36s36", tmp);
-					_G(in)->neuer_kb_handler(&_G(kbinfo));
-					_G(out)->set_pointer(_G(workptr));
-					if (key != Common::KEYCODE_ESCAPE) {
-						_G(iog)->save_entry(text_off + active_slot,
-							_G(ioptr).save_path);
-					}
+			if (mode[LOAD]) {
+				tmp = fnames + ((text_off + active_slot) * 40);
+				if (tmp[0]) {
+					_G(currentSong) = -1;
+					_G(iog)->load(text_off + active_slot, _G(ioptr).save_path);
 					key = Common::KEYCODE_ESCAPE;
 				}
-				break;
-
-			default:
-				break;
+			} else if (mode[SAVE]) {
+				_G(out)->back2screen(_G(workpage));
+				_G(out)->set_pointer(_G(screen0));
+				_G(in)->alter_kb_handler();
+				tmp = fnames + ((text_off + active_slot) * 40);
+				key = _G(out)->scanxy(70, 68 + (active_slot * 10),
+					255, 42, 14, 0, "%36s36", tmp);
+				_G(in)->neuer_kb_handler(&_G(kbinfo));
+				_G(out)->set_pointer(_G(workptr));
+				if (key != Common::KEYCODE_ESCAPE) {
+					_G(iog)->save_entry(text_off + active_slot,
+						_G(ioptr).save_path);
+				}
+				key = Common::KEYCODE_ESCAPE;
 			}
+			break;
 
-			_G(cur)->plot_cur();
-			_G(out)->back2screen(_G(workpage));
-
-			EVENTS_UPDATE;
+		default:
+			break;
 		}
+
+		_G(cur)->plot_cur();
+		_G(out)->back2screen(_G(workpage));
+
+		EVENTS_UPDATE;
 	}
 
 	free(ti);
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index dccd8b94c79..ddc005bdb34 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -42,8 +42,7 @@ void MainMenu::execute() {
 	if (!ConfMan.getBool("skip_title")) {
 		_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - 17);
 		_G(mem)->file->load_tmf(_G(music_handle), (TmfHeader *)_G(Ci).MusicSlot);
-		if (!_G(modul))
-			_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
+		_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
 
 		// NOTE: Originally, this was set to play video 200, but this actually
 		// jumped to the very last video in the file, so we play it explicitly
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 8558c77083c..65e79340aa7 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -32,120 +32,116 @@ Effect::~Effect() {
 
 void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
-	if (!_G(modul)) {
-		int16 *rnd_zeiger = (int16 *)rnd_speicher;
-		if (col < 256) {
-			for (int16 i = 0; i < 1002; i++) {
-				int16 x;
-				int16 y = (rnd_zeiger[i] / 40) * 8;
-				if (rnd_zeiger[i] > 39)
-					x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
-				else
-					x = rnd_zeiger[i] * 8;
-				_G(out)->box_fill(x, y, x + 8, y + 8, col);
-			}
-			_G(out)->set_palette(palette);
-		}
-		for (int16 i = 0; i < 1000; i++) {
+	int16 *rnd_zeiger = (int16 *)rnd_speicher;
+	if (col < 256) {
+		for (int16 i = 0; i < 1002; i++) {
 			int16 x;
 			int16 y = (rnd_zeiger[i] / 40) * 8;
 			if (rnd_zeiger[i] > 39)
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
 				x = rnd_zeiger[i] * 8;
-			_G(out)->set_pointer(sram_speicher);
-			_G(out)->sprite_save(sp, x, y, 8, 8, 0);
-			_G(out)->set_pointer(screen);
-			_G(out)->sprite_set(sp, x, y, 0);
+			_G(out)->box_fill(x, y, x + 8, y + 8, col);
 		}
-		free(sp);
+		_G(out)->set_palette(palette);
 	}
+	for (int16 i = 0; i < 1000; i++) {
+		int16 x;
+		int16 y = (rnd_zeiger[i] / 40) * 8;
+		if (rnd_zeiger[i] > 39)
+			x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
+		else
+			x = rnd_zeiger[i] * 8;
+		_G(out)->set_pointer(sram_speicher);
+		_G(out)->sprite_save(sp, x, y, 8, 8, 0);
+		_G(out)->set_pointer(screen);
+		_G(out)->sprite_set(sp, x, y, 0);
+	}
+	free(sp);
 }
 
 void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
 	byte *sp = (byte *)MALLOC(8 * 8 + 4);
-	if (!_G(modul)) {
-		int16 i = 0;
-		if (col < 256) {
-			for (i = 0; i < 13; i++) {
-				int16 x, y, x1;
-				for (x = i; x < 39 - i; x++)
-					_G(out)->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
-				for (y = i; y < 24 - i; y++)
-					_G(out)->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
-				for (x1 = 39 - i; x1 > i; x1--)
-					_G(out)->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
-				for (int16 y1 = 24 - i; y1 >= i; y1--)
-					_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
-			}
-			_G(out)->set_palette(palette);
+	int16 i = 0;
+	if (col < 256) {
+		for (i = 0; i < 13; i++) {
+			int16 x, y, x1;
+			for (x = i; x < 39 - i; x++)
+				_G(out)->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
+			for (y = i; y < 24 - i; y++)
+				_G(out)->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
+			for (x1 = 39 - i; x1 > i; x1--)
+				_G(out)->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
+			for (int16 y1 = 24 - i; y1 >= i; y1--)
+				_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
 		}
-		switch (mode) {
-		case 0:
-			for (i = 13; i >= 0; i--) {
-				int16 x, y, x1;
-				for (x = i; x < 39 - i; x++) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
-				}
-				for (y = i; y < 24 - i; y++) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
-				}
-				for (x1 = 39 - i; x1 > i; x1--) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
-				}
-				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
-				}
+		_G(out)->set_palette(palette);
+	}
+	switch (mode) {
+	case 0:
+		for (i = 13; i >= 0; i--) {
+			int16 x, y, x1;
+			for (x = i; x < 39 - i; x++) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 			}
-			break;
-
-		case 1:
-			for (i = 0; i < 13; i++) {
-				int16 x, y, x1;
-				for (x = i; x < 39 - i; x++) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x * 8, i * 8, 0);
-				}
-				for (y = i; y < 24 - i; y++) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x * 8, y * 8, 0);
-				}
-				for (x1 = 39 - i; x1 > i; x1--) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
-				}
-				for (int16 y1 = 24 - i; y1 > i; y1--) {
-					_G(out)->set_pointer(sram_speicher);
-					_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-					_G(out)->set_pointer(screen);
-					_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
-				}
+			for (y = i; y < 24 - i; y++) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
+			}
+			for (x1 = 39 - i; x1 > i; x1--) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 			}
-			break;
+			for (int16 y1 = 24 - i; y1 > i; y1--) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
+			}
+		}
+		break;
 
-		default:
-			break;
+	case 1:
+		for (i = 0; i < 13; i++) {
+			int16 x, y, x1;
+			for (x = i; x < 39 - i; x++) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
+			}
+			for (y = i; y < 24 - i; y++) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
+			}
+			for (x1 = 39 - i; x1 > i; x1--) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
+			}
+			for (int16 y1 = 24 - i; y1 > i; y1--) {
+				_G(out)->set_pointer(sram_speicher);
+				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
+				_G(out)->set_pointer(screen);
+				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
+			}
 		}
-		free(sp);
+		break;
+
+	default:
+		break;
 	}
+	free(sp);
 }
 
 void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 04ecdbc70e5..0408ecad358 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -332,7 +332,7 @@ int16 Flic::custom_play(CustomInfo *ci) {
 				_fadeDelay = 0;
 				_currentFrame = 0;
 
-				for (uint16 i = 0; (i < _customHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
+				for (uint16 i = 0; (i < _customHeader.frames) && (ret >= 0); i++) {
 					if (!_customFrame.load(rs)) {
 						error("flic error");
 					} else {
@@ -382,7 +382,7 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 	uint16 para[10];
 	TmfHeader *th = (TmfHeader *)_music;
 
-	for (uint16 i = 0; (i < _customFrame.chunks) && (!_G(modul)); i++) {
+	for (uint16 i = 0; (i < _customFrame.chunks); i++) {
 		ChunkHead chead;
 		if (!chead.load(handle)) {
 			error("flic error");
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index 784af53d4a5..a983a1072e4 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -52,20 +52,15 @@ void GedClass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
 		// Scan for the correct index entry
 		int i = 0;
 		do {
-			if (!Gh->load(stream)) {
-				_G(modul) = 3;
-				_G(fcode) = 1;
-			} else if (i != nr) {
+			Gh->load(stream);
+			if (i != nr) {
 				// Skip over the entry's data
 				stream->seek(Gh->Len, SEEK_CUR);
 			}
-		} while (!_G(modul) && ++i <= nr);
+		} while (++i <= nr);
 
-		if (!_G(modul)) {
-			if (stream->read(speicher, Gh->Len) != Gh->Len) {
-				_G(modul) = 3;
-				_G(fcode) = 1;
-			}
+		if (stream->read(speicher, Gh->Len) != Gh->Len) {
+			error("load_ged_chunk error");
 		}
 	} else {
 		error("load_ged_chunk error");
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 4e1fc8f9341..b899806548f 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -278,8 +278,6 @@ public:
 	ChewyFont *_font6 = nullptr;
 	ChewyFont *_font8 = nullptr;
 	FontMgr *_fontMgr = nullptr;
-	int16 _modul = 0;
-	int16 _fcode = 0;
 	int16 _scroll_delay = 0;
 
 	// mcga.cpp
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 938745a1ae6..a8b724bc4d2 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -195,17 +195,15 @@ void load_room_music(int16 room_nr) {
 				_G(mem)->file->select_pool_item(_G(music_handle), _G(EndOfPool) - ttp_index);
 				_G(mem)->file->load_tmf(_G(music_handle), (TmfHeader *)_G(Ci).MusicSlot);
 				_G(currentSong) = ttp_index;
-				if (!_G(modul)) {
-					if (play_mode == NORMAL_PLAY)
-						_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
-					else {
-						_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
-						_G(sndPlayer)->stopMod();
-						if (play_mode == SEQUENCE_PLAY)
-							_G(sndPlayer)->playSequence(seq_start, seq_end);
-						else if (play_mode == PATTERN_PLAY)
-							_G(sndPlayer)->playPattern(pattern);
-					}
+				if (play_mode == NORMAL_PLAY)
+					_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
+				else {
+					_G(sndPlayer)->playMod((TmfHeader *)_G(Ci).MusicSlot);
+					_G(sndPlayer)->stopMod();
+					if (play_mode == SEQUENCE_PLAY)
+						_G(sndPlayer)->playSequence(seq_start, seq_end);
+					else if (play_mode == PATTERN_PLAY)
+						_G(sndPlayer)->playPattern(pattern);
 				}
 			}
 		}
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index c1f3f976645..5b714c0d6b9 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -80,7 +80,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 
 				rs->seek(ptr, SEEK_SET);
 				uint32 size = 0;
-				for (i = 0; i < image_anz && !_G(modul); i++) {
+				for (i = 0; i < image_anz; i++) {
 					if (iheader.load(rs)) {
 						size += iheader.width * iheader.height;
 						rs->seek(iheader.next, SEEK_SET);
@@ -89,53 +89,44 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 						error("taf_seq_adr error");
 					}
 				}
-				if (!_G(modul)) {
-					size += image_anz * sizeof(byte *);
-					size += image_anz * sizeof(char *);
-					size += ((uint32)sizeof(TafSeqInfo));
-					byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
-
-					if (!_G(modul)) {
-						ts_info = (TafSeqInfo *)tmp1;
-						ts_info->anzahl = image_anz;
-						ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
-						ts_info->korrektur = (int16 *)(tmp1 + size);
-						rs->seek(ptr, SEEK_SET);
-						byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo))
-						                       + (image_anz * sizeof(char *)));
-
-						for (i = 0; i < image_anz && !_G(modul); i++) {
-							if (iheader.load(rs)) {
-								ts_info->image[i] = sp_ptr;
-								int16 *abmess = (int16 *)sp_ptr;
-								abmess[0] = iheader.width;
-								abmess[1] = iheader.height;
-								sp_ptr += 4;
-								size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
-
-								rs->seek(iheader.image, SEEK_SET);
-								file->load_tafmcga(rs, iheader.komp, size, sp_ptr);
-								rs->seek(iheader.next, SEEK_SET);
-								sp_ptr += size;
-							} else {
-								error("taf_seq_adr error");
-							}
-						}
-						if (!_G(modul)) {
-							rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
-
-							if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
-								error("taf_seq_adr error");
-							} else {
-								int16 *p = ts_info->korrektur;
-								for (i = 0; i < (int)image_anz * 2; ++i, ++p)
-									*p = rs->readSint16LE();
-							}
-						}
-						if (_G(modul))
-							free(tmp1);
+				size += image_anz * sizeof(byte *);
+				size += image_anz * sizeof(char *);
+				size += ((uint32)sizeof(TafSeqInfo));
+				byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
+
+				ts_info = (TafSeqInfo *)tmp1;
+				ts_info->anzahl = image_anz;
+				ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
+				ts_info->korrektur = (int16 *)(tmp1 + size);
+				rs->seek(ptr, SEEK_SET);
+				byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
+
+				for (i = 0; i < image_anz; i++) {
+					if (iheader.load(rs)) {
+						ts_info->image[i] = sp_ptr;
+						int16 *abmess = (int16 *)sp_ptr;
+						abmess[0] = iheader.width;
+						abmess[1] = iheader.height;
+						sp_ptr += 4;
+						size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
+
+						rs->seek(iheader.image, SEEK_SET);
+						file->load_tafmcga(rs, iheader.komp, size, sp_ptr);
+						rs->seek(iheader.next, SEEK_SET);
+						sp_ptr += size;
+					} else {
+						error("taf_seq_adr error");
 					}
 				}
+				rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
+
+				if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
+					error("taf_seq_adr error");
+				} else {
+					int16 *p = ts_info->korrektur;
+					for (i = 0; i < (int)image_anz * 2; ++i, ++p)
+						*p = rs->readSint16LE();
+				}
 			} else {
 				error("taf_seq_adr error");
 			}
@@ -154,19 +145,8 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 void Memory::tff_adr(const char *filename, byte **speicher) {
 	uint32 size = file->size(filename, TFFDATEI);
 
-	if (!_G(modul)) {
-		*speicher = (byte *)MALLOC(size);
-		if (*speicher) {
-			file->load_tff(filename, *speicher);
-			if (_G(modul)) {
-				free(*speicher);
-				*speicher = nullptr;
-			}
-		} else {
-			_G(fcode) = NOSPEICHER;
-			_G(modul) = SPEICHER;
-		}
-	}
+	*speicher = (byte *)MALLOC(size);
+	file->load_tff(filename, *speicher);
 }
 
 // Only called from init_load() with filename blende.rnd
@@ -174,17 +154,9 @@ byte *Memory::void_adr(const char *filename) {
 	byte *ptr = nullptr;
 	uint32 size = file->size(filename, 200);
 
-	if (!_G(modul)) {
-		ptr = (byte *)MALLOC(size * sizeof(uint32));
-		if (!_G(modul)) {
-			WRITE_LE_INT32(ptr, size);
-			file->void_load(filename, ptr + sizeof(uint32), size);
-			if (_G(modul)) {
-				free(ptr);
-				ptr = nullptr;
-			}
-		}
-	}
+	ptr = (byte *)MALLOC(size * sizeof(uint32));
+	WRITE_LE_INT32(ptr, size);
+	file->void_load(filename, ptr + sizeof(uint32), size);
 
 	return ptr;
 }
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 32d5108cd4a..cbb701aede0 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -308,8 +308,7 @@ int16 ged_user_func(int16 idx_nr) {
 void enter_room(int16 eib_nr) {
 	int16 i;
 
-	if (!_G(modul))
-		load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
+	load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
 	_G(atds)->stop_aad();
 	_G(atds)->stop_ats();
@@ -1091,29 +1090,22 @@ void flic_cut(int16 nr) {
 		case FCUT_058:
 			load_room_music(255);
 			g_engine->_video->playVideo(FCUT_058);
+			g_engine->_video->playVideo(FCUT_059);
 
-			if (!_G(modul)) {
-				g_engine->_video->playVideo(FCUT_059);
-			}
 			if (!_G(spieler).R43GetPgLady) {
-				if (!_G(modul)) {
-					g_engine->_video->playVideo(FCUT_060);
-				}
+				g_engine->_video->playVideo(FCUT_060);
 			} else {
-				if (!_G(modul)) {
 					start_aad(623, -1);
 #ifndef NEW_VIDEO_CODE
-					_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-					_G(flc)->set_custom_user_function(Room43::setup_func);
-					_G(flc)->custom_play(&_G(Ci));
-					_G(flc)->remove_custom_user_function();
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+				_G(flc)->set_custom_user_function(Room43::setup_func);
+				_G(flc)->custom_play(&_G(Ci));
+				_G(flc)->remove_custom_user_function();
 #else
-					g_engine->_video->playVideo(FCUT_061);
+				g_engine->_video->playVideo(FCUT_061);
 #endif
-				}
-				if (!_G(modul)) {
-					g_engine->_video->playVideo(FCUT_062);
-				}
+
+				g_engine->_video->playVideo(FCUT_062);
 			}
 			_G(sndPlayer)->fadeOut(0);
 			_G(out)->ausblenden(1);
@@ -1249,7 +1241,7 @@ void flic_cut(int16 nr) {
 
 		case FCUT_133:
 		case 1123:
-			for (i = 0; i < 13 && ret != -1 && !_G(modul); ++i) {
+			for (i = 0; i < 13 && ret != -1; ++i) {
 				ret = g_engine->_video->playVideo(FLIC_CUT_133[i]) ? 0 : -1;
 				SHOULD_QUIT_RETURN;
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index a30b8b7c144..21b56c033ea 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -177,48 +177,35 @@ void Room::close_handle(int16 mode) {
 }
 
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
-	_G(modul) = 0;
-	_G(fcode) = 0;
-
 	clear_prog_ani();
 	_G(det)->load_rdi(Rb->DetFile, room_nr);
 
 	if (player->SoundSwitch == false)
 		_G(det)->disable_room_sound();
-	if (!_G(modul)) {
-		RoomDetailInfo *Rdi_ = _G(det)->get_room_detail_info();
-		_roomInfo = &Rdi_->Ri;
-		if (_roomInfo->TafLoad != 255) {
-			char tmp_str[MAXPATH];
-			strcpy(tmp_str, Rb->RoomDir);
-			strcat(tmp_str, _roomInfo->TafName);
-			_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
-			Rb->Fti = _G(det)->get_taf_info();
-			Rb->DetImage = Rb->Fti->image;
-			Rb->DetKorrekt = Rb->Fti->korrektur;
-		}
-		if (!_G(modul)) {
-			_G(obj)->calc_all_static_detail();
-			load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
-			set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
-			calc_invent(Rb, player);
-
-			if (!_G(modul)) {
-				del_timer_old_room();
-				add_timer_new_room();
-			}
+	RoomDetailInfo *Rdi_ = _G(det)->get_room_detail_info();
+	_roomInfo = &Rdi_->Ri;
+	if (_roomInfo->TafLoad != 255) {
+		char tmp_str[MAXPATH];
+		strcpy(tmp_str, Rb->RoomDir);
+		strcat(tmp_str, _roomInfo->TafName);
+		_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
+		Rb->Fti = _G(det)->get_taf_info();
+		Rb->DetImage = Rb->Fti->image;
+		Rb->DetKorrekt = Rb->Fti->korrektur;
+	}
+	_G(obj)->calc_all_static_detail();
+	load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
+	set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
+	calc_invent(Rb, player);
 
-			if (!_G(modul)) {
-				if (Rb->AtsLoad)
-					_G(atds)->load_atds(_roomInfo->RoomNr, ATS_DATEI);
-			}
+	del_timer_old_room();
+	add_timer_new_room();
 
-			if (!_G(modul)) {
-				if (Rb->AadLoad)
-					_G(atds)->load_atds(_roomInfo->RoomNr, AAD_DATEI);
-			}
-		}
-	}
+	if (Rb->AtsLoad)
+		_G(atds)->load_atds(_roomInfo->RoomNr, ATS_DATEI);
+
+	if (Rb->AadLoad)
+		_G(atds)->load_atds(_roomInfo->RoomNr, AAD_DATEI);
 }
 
 void Room::set_timer_start(int16 timer_start) {
@@ -289,44 +276,42 @@ void Room::set_ak_pal(RaumBlk *Rb) {
 void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
 	byte *tmp_inv_spr[MAX_MOV_OBJ];
 
-	if (!_G(modul)) {
-		_G(obj)->sort();
-		memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
-		memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
+	_G(obj)->sort();
+	memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
+	memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
 
-		SpriteResource *spriteRes = new SpriteResource(Rb->InvFile);
+	SpriteResource *spriteRes = new SpriteResource(Rb->InvFile);
 
-		for (int16 i = 1; i < _G(obj)->mov_obj_room[0] + 1; i++) {
-			if (!tmp_inv_spr[_G(obj)->mov_obj_room[i]]) {
-				spriteRes->getSpriteData(_G(obj)->mov_obj_room[i], &Rb->InvSprAdr[_G(obj)->mov_obj_room[i]], true);
-			} else {
-				Rb->InvSprAdr[_G(obj)->mov_obj_room[i]] = tmp_inv_spr[_G(obj)->mov_obj_room[i]];
-				tmp_inv_spr[_G(obj)->mov_obj_room[i]] = nullptr;
-			}
+	for (int16 i = 1; i < _G(obj)->mov_obj_room[0] + 1; i++) {
+		if (!tmp_inv_spr[_G(obj)->mov_obj_room[i]]) {
+			spriteRes->getSpriteData(_G(obj)->mov_obj_room[i], &Rb->InvSprAdr[_G(obj)->mov_obj_room[i]], true);
+		} else {
+			Rb->InvSprAdr[_G(obj)->mov_obj_room[i]] = tmp_inv_spr[_G(obj)->mov_obj_room[i]];
+			tmp_inv_spr[_G(obj)->mov_obj_room[i]] = nullptr;
 		}
+	}
 
-		for (int16 i = 1; i < _G(obj)->spieler_invnr[0] + 1; i++) {
-			if (!tmp_inv_spr[_G(obj)->spieler_invnr[i]]) {
-				spriteRes->getSpriteData(_G(obj)->spieler_invnr[i], &Rb->InvSprAdr[_G(obj)->spieler_invnr[i]], true);
-			} else {
-				Rb->InvSprAdr[_G(obj)->spieler_invnr[i]] = tmp_inv_spr[_G(obj)->spieler_invnr[i]];
-				tmp_inv_spr[_G(obj)->spieler_invnr[i]] = 0;
-			}
+	for (int16 i = 1; i < _G(obj)->spieler_invnr[0] + 1; i++) {
+		if (!tmp_inv_spr[_G(obj)->spieler_invnr[i]]) {
+			spriteRes->getSpriteData(_G(obj)->spieler_invnr[i], &Rb->InvSprAdr[_G(obj)->spieler_invnr[i]], true);
+		} else {
+			Rb->InvSprAdr[_G(obj)->spieler_invnr[i]] = tmp_inv_spr[_G(obj)->spieler_invnr[i]];
+			tmp_inv_spr[_G(obj)->spieler_invnr[i]] = 0;
 		}
+	}
 
-		for (int16 i = 0; i < MAX_MOV_OBJ; i++) {
-			if (tmp_inv_spr[i] != 0)
-				free(tmp_inv_spr[i]);
-		}
+	for (int16 i = 0; i < MAX_MOV_OBJ; i++) {
+		if (tmp_inv_spr[i] != 0)
+			free(tmp_inv_spr[i]);
+	}
 
-		if (player->AkInvent != -1) {
-			if (Rb->InvSprAdr[player->AkInvent] == nullptr) {
-				spriteRes->getSpriteData(player->AkInvent, &Rb->InvSprAdr[player->AkInvent], true);
-			}
+	if (player->AkInvent != -1) {
+		if (Rb->InvSprAdr[player->AkInvent] == nullptr) {
+			spriteRes->getSpriteData(player->AkInvent, &Rb->InvSprAdr[player->AkInvent], true);
 		}
-
-		delete spriteRes;
 	}
+
+	delete spriteRes;
 }
 
 int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName) {
@@ -368,18 +353,13 @@ void Room::init_ablage() {
 	_ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
 	_ablagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
 	_gedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
-	if (!_G(modul)) {
-		_akAblage = 0;
-		for (int16 i = 0; i < MAX_ABLAGE; i++) {
-			_ablage[i] = _ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
-			_ablageInfo[i][0] = -1;
-			_ablageInfo[i][1] = -1;
-			_ablagePal[i] = _ablagePal[0] + 768l * i;
-			_gedMem[i] = _gedMem[0] + (GED_BLOCK_SIZE * i);
-		}
-	} else {
-		_akAblage = -1;
-		_ablage[0] = 0;
+	_akAblage = 0;
+	for (int16 i = 0; i < MAX_ABLAGE; i++) {
+		_ablage[i] = _ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
+		_ablageInfo[i][0] = -1;
+		_ablageInfo[i][1] = -1;
+		_ablagePal[i] = _ablagePal[0] + 768l * i;
+		_gedMem[i] = _gedMem[0] + (GED_BLOCK_SIZE * i);
 	}
 }
 


Commit: e0eff4c5110fd4d3c60ccceb9cfe13b99e131756
    https://github.com/scummvm/scummvm/commit/e0eff4c5110fd4d3c60ccceb9cfe13b99e131756
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
CHEWY: Remove unused chunk types

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/ngsdefs.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 0ee374a9bc8..480566eacdb 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -242,10 +242,6 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 
 int16 Data::get_id(char *id_code) {
 	int16 id = -1;
-	if (!(scumm_strnicmp(id_code, "TBF", 3)))
-		id = TBFDATEI;
-	if (!(scumm_strnicmp(id_code, "TPF", 3)))
-		id = TPFDATEI;
 	if (!(scumm_strnicmp(id_code, "TAF", 3)))
 		id = TAFDATEI;
 	if (!(scumm_strnicmp(id_code, "TFF", 3)))
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 8df860de943..bdbccf058bf 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -52,34 +52,9 @@ namespace Chewy {
 #define DATEI 3
 #define MOD15 10
 #define TYPE_ANZ 27
-#define PCXDATEI 0
-#define TBFDATEI 1
 #define TAFDATEI 2
 #define TFFDATEI 3
-#define VOCDATEI 4
-#define TPFDATEI 5
 #define TMFDATEI 6
-#define MODDATEI 7
-#define RAWDATEI 8
-#define LBMDATEI 9
-#define RDIDATEI 10
-#define TXTDATEI 11
-#define IIBDATEI 12
-#define SIBDATEI 13
-#define EIBDATEI 14
-#define ATSDATEI 15
-#define SAADATEI 16
-#define FLCDATEI 17
-#define AADDATEI 18
-#define ADSDATEI 19
-#define ADHDATEI 20
-#define TGPDATEI 21
-#define TVPDATEI 22
-#define TTPDATEI 23
-#define TAPDATEI 24
-#define CFODATEI 25
-#define TCFDATEI 26
-#define NODATEI 255
 #define SCREENSAVE 0
 #define SPRITESAVE 1
 


Commit: 8ba4c1b29c47255c7d8af07ccc140c2c636caa0d
    https://github.com/scummvm/scummvm/commit/8ba4c1b29c47255c7d8af07ccc140c2c636caa0d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
CHEWY: Start rewriting taf_seq_adr()

Still not 100% correct, as sprites are drawn with wrong offsets

Changed paths:
    engines/chewy/memory.cpp


diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 5b714c0d6b9..6c6309d17a1 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -140,6 +140,41 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	delete rs;
 
 	return ts_info;
+
+	// TODO: This implementation draws sprites with wrong offsets
+#if 0
+	TafSeqInfo *ts_info = nullptr;
+	SpriteResource *res = new SpriteResource(CH_SPZ_FILE);
+	uint32 size = 0;
+
+	for (int16 i = 0; i < image_anz; i++) {
+		TAFChunk *sprite = res->getSprite(i + image_start);
+		size += sprite->width * sprite->height;
+		delete sprite;
+	}
+
+	size += image_anz * sizeof(byte *);
+	size += image_anz * sizeof(char *);
+	size += ((uint32)sizeof(TafSeqInfo));
+
+	byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
+	ts_info = (TafSeqInfo *)tmp1;
+	ts_info->anzahl = image_anz;
+	ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
+	ts_info->korrektur = (int16 *)(tmp1 + size);
+	byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
+
+	for (int16 i = 0; i < image_anz; i++) {
+		ts_info->image[i] = sp_ptr;
+		sp_ptr += res->getSpriteData(i + image_start, &ts_info->image[i], false);
+	}
+
+	memcpy(ts_info->korrektur, res->getSpriteCorrectionsTable(), image_anz * 2 * sizeof(int16));
+
+	delete res;
+
+	return ts_info;
+#endif
 }
 
 void Memory::tff_adr(const char *filename, byte **speicher) {


Commit: 239f53a10430dc0774426f0fe870aec3962f820c
    https://github.com/scummvm/scummvm/commit/239f53a10430dc0774426f0fe870aec3962f820c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:38-08:00

Commit Message:
CHEWY: More janitorial work around CppCheck

Changed paths:
    engines/chewy/mcga_graphics.cpp
    engines/chewy/movclass.cpp
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 37a72740856..2b513557f6f 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -76,14 +76,12 @@ void McgaGraphics::set_mono() {
 }
 
 void McgaGraphics::calc_mono(byte *palette, int16 startcol, int16 anz) {
-	int16 i, k;
-	uint8 r, g, b, grau;
-	k = startcol * 3;
-	for (i = 0; i < anz; i++) {
-		r = palette[k];
-		g = palette[k + 1];
-		b = palette[k + 2];
-		grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
+	int16 k = startcol * 3;
+	for (int16 i = 0; i < anz; i++) {
+		uint8 r = palette[k];
+		uint8 g = palette[k + 1];
+		uint8 b = palette[k + 2];
+		uint8 grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
 		palette[k] = grau;
 		palette[k + 1] = grau;
 		palette[k + 2] = grau;
@@ -92,8 +90,7 @@ void McgaGraphics::calc_mono(byte *palette, int16 startcol, int16 anz) {
 }
 
 void McgaGraphics::set_palette(byte *palette) {
-	int16 i;
-	for (i = 0; i < 768; i++)
+	for (int16 i = 0; i < 768; i++)
 		_palTable[i] = palette[i];
 	if (_mono)
 		calc_mono(palette, 0, 256);
@@ -109,8 +106,7 @@ void McgaGraphics::rest_palette() {
 }
 
 void McgaGraphics::raster_col(int16 c, int16 r, int16 g, int16 b) {
-	int16 index;
-	index = c * 3;
+	int16 index = c * 3;
 	_palTable[index] = r;
 	_palTable[index + 1] = g;
 	_palTable[index + 2] = b;
@@ -120,20 +116,17 @@ void McgaGraphics::raster_col(int16 c, int16 r, int16 g, int16 b) {
 }
 
 void McgaGraphics::einblenden(byte *palette, int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	int16 r1, g1, b1;
 	if (_mono)
 		calc_mono(palette, 0, 256);
-	for (j = 63; j >= 0; j--) {
-		k = 0;
-		for (i = 0; i < 256; i++) {
-			r = palette[k];
-			g = palette[k + 1];
-			b = palette[k + 2];
-			r1 = r - j;
-			g1 = g - j;
-			b1 = b - j;
+	for (int16 j = 63; j >= 0; j--) {
+		int16 k = 0;
+		for (int16 i = 0; i < 256; i++) {
+			int16 r = palette[k];
+			int16 g = palette[k + 1];
+			int16 b = palette[k + 2];
+			int16 r1 = r - j;
+			int16 g1 = g - j;
+			int16 b1 = b - j;
 			if ((r1 > 0) && (r1 <= r))
 				_palTable[k] = r1;
 			if ((g1 > 0) && (r1 <= r))
@@ -146,21 +139,17 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 	}
 }
 
-void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16
-                            frames) {
-	int16 i = 0, j, k;
-	int16 r, g, b;
-	int16 endcol = 0;
+void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16 frames) {
 	if (_mono)
 		calc_mono(palette, startcol, anz);
-	endcol = startcol + anz;
-	for (j = stufen; j >= 0; j--) {
+	int16 endcol = startcol + anz;
+	for (int16 j = stufen; j >= 0; j--) {
 		endcol = startcol + anz;
-		k = startcol * 3;
-		for (i = startcol; i < endcol; i++) {
-			r = _palTable[k];
-			g = _palTable[k + 1];
-			b = _palTable[k + 2];
+		int16 k = startcol * 3;
+		for (int16 i = startcol; i < endcol; i++) {
+			int16 r = _palTable[k];
+			int16 g = _palTable[k + 1];
+			int16 b = _palTable[k + 2];
 			if ((r + 1) <= palette[k]) ++r;
 			if ((g + 1) <= palette[k + 1]) ++g;
 			if ((b + 1) <= palette[k + 2]) ++b;
@@ -174,14 +163,12 @@ void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stu
 }
 
 void McgaGraphics::ausblenden(int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	for (j = 0; j < 64; j++) {
-		k = 0;
-		for (i = 0; i < 256; i++) {
-			r = _palTable[k];
-			g = _palTable[k + 1];
-			b = _palTable[k + 2];
+	for (int16 j = 0; j < 64; j++) {
+		int16 k = 0;
+		for (int16 i = 0; i < 256; i++) {
+			int16 r = _palTable[k];
+			int16 g = _palTable[k + 1];
+			int16 b = _palTable[k + 2];
 			if (r > 0) --r;
 			if (g > 0) --g;
 			if (b > 0) --b;
@@ -195,16 +182,13 @@ void McgaGraphics::ausblenden(int16 frames) {
 }
 
 void McgaGraphics::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
-	int16 i, j, k;
-	int16 r, g, b;
-	int16 endcol = 0;
-	endcol = startcol + anz;
-	for (j = 0; j < stufen; j++) {
-		k = startcol * 3;
-		for (i = startcol; i < endcol; i++) {
-			r = _palTable[k];
-			g = _palTable[k + 1];
-			b = _palTable[k + 2];
+	int16 endcol = startcol + anz;
+	for (int16 j = 0; j < stufen; j++) {
+		int16 k = startcol * 3;
+		for (int16 i = startcol; i < endcol; i++) {
+			int16 r = _palTable[k];
+			int16 g = _palTable[k + 1];
+			int16 b = _palTable[k + 2];
 			if (r > 0) --r;
 			if (g > 0) --g;
 			if (b > 0) --b;
@@ -218,11 +202,9 @@ void McgaGraphics::abblenden(int16 startcol, int16 anz, int16 stufen, int16 fram
 }
 
 void McgaGraphics::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
-	int16 i;
-	int16 k, endcol;
-	k = startcol * 3;
-	endcol = startcol + anz;
-	for (i = startcol; i < endcol; i++) {
+	int16 k = startcol * 3;
+	int16 endcol = startcol + anz;
+	for (int16 i = startcol; i < endcol; i++) {
 		_palTable[k] = palette[k];
 		_palTable[k + 1] = palette[k + 1];
 		_palTable[k + 2] = palette[k + 2];
@@ -242,8 +224,7 @@ void McgaGraphics::punkt(int16 xpos, int16 ypos, int16 farbn) {
 }
 
 uint8 McgaGraphics::get_pixel(int16 xpos, int16 ypos) {
-	uint8 pix;
-	pix = getpix(xpos, ypos);
+	uint8 pix = getpix(xpos, ypos);
 
 	return pix;
 }
@@ -260,17 +241,15 @@ void McgaGraphics::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 }
 
 void McgaGraphics::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
-	int16 h, i;
 	if (x2 == x1)x2++;
-	h = abs(y2 - y1);
+	int16 h = abs(y2 - y1);
 	if (h == 0)
 		h = 1;
-	for (i = 0; i < h; i++)
+	for (int16 i = 0; i < h; i++)
 		line_mcga(x1, y1 + i, x2, y1 + i, farbe);
 }
 
-void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1,
-                          int16 col1, int16 col2, int16 back_col) {
+void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1, int16 col1, int16 col2, int16 back_col) {
 	if (back_col < 255)
 		box_fill(x, y, x1, y1, back_col);
 	linie(x, y1, x1, y1, col2);
@@ -280,13 +259,12 @@ void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1,
 }
 
 void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 a = 0, b = 0, alt = 0, diff;
-	int16 w, i;
-	for (w = 0; w <= 91; w++) {
+	int16 a = 0, b = 0, alt = 0;
+	for (int16 w = 0; w <= 91; w++) {
 		a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
-			diff = a - alt;
-			for (i = 0; i <= diff; i++) {
+			int16 diff = a - alt;
+			for (int16 i = 0; i <= diff; i++) {
 				setpixel_mcga(x - b, (y - (alt + i)), farbe);
 				setpixel_mcga(x + b, (y - (alt + i)), farbe);
 				setpixel_mcga(x - b, (y + (alt + i)), farbe);
@@ -304,8 +282,7 @@ void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 
 void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
 	int16 a = 0, b = 0, alt = 0, i = 0, diff;
-	int16 w;
-	for (w = 0; w <= 90; w++) {
+	for (int16 w = 0; w <= 90; w++) {
 		a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
 			diff = a - alt;
@@ -337,8 +314,7 @@ void McgaGraphics::screen2back(byte *ptr) {
 	mcga2mem(ptr);
 }
 
-void McgaGraphics::sprite_save(byte *sptr, int16 x,
-                              int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
+void McgaGraphics::sprite_save(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
 	if (breite < 4)
 		breite = 4;
 	if (hoehe <= 0)
@@ -372,9 +348,8 @@ void McgaGraphics::blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 }
 
 void McgaGraphics::map_spr2screen(byte *sptr, int16 x, int16 y) {
-	int16 br, h;
-	br = ((int16 *)sptr)[0];
-	h = ((int16 *)sptr)[1];
+	int16 br = ((int16 *)sptr)[0];
+	int16 h = ((int16 *)sptr)[1];
 	if ((br >= 320) || (h >= 200))
 		map_spr_2screen(sptr, x, y);
 }
@@ -790,8 +765,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 		}
 	}
 
-	switch (ende) {
-	case 1:
+	if (ende == 1) {
 		switch (mode) {
 		case 1:
 			intzahl[0] = atoi(zstring);
@@ -805,11 +779,9 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 		case 4:
 			intzahl1[0] = atoi(zstring);
 			break;
+		default:
+			break;
 		}
-		break;
-
-	case 2:
-		break;
 	}
 
 	if (_svga == ON)
@@ -820,14 +792,12 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 	return ret;
 }
 
-void McgaGraphics::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
-                                char cursor_z) {
+void McgaGraphics::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth, char cursor_z) {
 	move(x, y);
 	putz(cursor_z, fcol, bcol, scrwidth);
 }
 
-void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
-                          const char *string, ...) {
+void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string, ...) {
 	int16 i = 0, k = 0, l;
 	char zstring[35];
 	int16 diff;
@@ -957,19 +927,19 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 					}
 					break;
 
+				default:
+					break;
 				}
 			}
 		}
 	} while ((i < MAXSTRING) && (nextChar != 0));
 }
 
-void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
-                                int16 scrwidth, const char *string) {
-	int16 i = 0;
+void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string) {
 	char zeichen;
 	_G(gcurx) = x;
 	_G(gcury) = y;
-	i = 0;
+	int16 i = 0;
 	do {
 		zeichen = string[i];
 		++i;
@@ -980,20 +950,16 @@ void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
 	} while ((i < MAXSTRING) && (zeichen != 0));
 }
 
-void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
-		const char *string, ...) {
-	int16 i = 0, k = 0, l;
+void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth, const char *string, ...) {
+	int16 k = 0, l;
 	char zeichen, zstring[35];
 	char *tempptr;
-	int16 izahl, count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
+	int16 diff;
 	va_list parptr;
 	va_start(parptr, string);
 	_crlfx = _G(gcurx);
 	_crlfy = _G(gcury) + _fontH + 2;
-	i = 0;
+	int16 i = 0;
 	do {
 		zeichen = string[i];
 		++i;
@@ -1033,7 +999,7 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 				vors();
 			} else {
 				zeichen = string[i];
-				count = 0;
+				int16 count = 0;
 				if ((zeichen >= 0x30) && (zeichen <= 0x39))
 					count = atoi(string + i);
 				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
@@ -1050,10 +1016,10 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 				case 'd':
 				case 'u':
 					if (zeichen == 'd') {
-						izahl = va_arg(parptr, int);
+						int16 izahl = va_arg(parptr, int);
 						itoa(izahl, zstring, 10);
 					} else {
-						uzahl = va_arg(parptr, unsigned int);
+						uint16 uzahl = va_arg(parptr, unsigned int);
 						itoa(uzahl, zstring, 10);
 					}
 					k = 0;
@@ -1073,10 +1039,10 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 
 				case 'l':
 					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
+						long lzahl = va_arg(parptr, long);
 						ltoa(lzahl, zstring, 10);
 					} else {
-						luzahl = va_arg(parptr, unsigned long);
+						uint32 luzahl = va_arg(parptr, unsigned long);
 						ultoa(luzahl, zstring, 10);
 						++i;
 					}
@@ -1122,12 +1088,9 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth,
 void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
                            int16 scrwidth, const char *string, ...) {
 	int16 i = 0, k = 0, l;
-	char zeichen, zstring[35];
+	char zstring[35];
 	char *tempptr;
-	int16 izahl, count, diff;
-	uint16 uzahl;
-	long lzahl;
-	uint32 luzahl;
+	int16 diff;
 	va_list parptr;
 	va_start(parptr, string);
 	_G(gcurx) = x;
@@ -1135,7 +1098,7 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 	_crlfx = _G(gcurx);
 	_crlfy = y + _fontH + 2;
 	for (i = 0; i < menge;) {
-		zeichen = string[i];
+		char zeichen = string[i];
 		++i;
 		if ((zeichen < 32) || (zeichen == 127)) {
 			switch (zeichen) {
@@ -1165,15 +1128,13 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 					putz(zeichen, fgCol, bgCol, scrwidth);
 				break;
 			}
-		}
-		else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
+		} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
 			if (zeichen != '%') {
 				putz(zeichen, fgCol, bgCol, scrwidth);
 				vors();
-			}
-			else {
+			} else {
 				zeichen = string[i];
-				count = 0;
+				int16 count = 0;
 				if ((zeichen >= 0x30) && (zeichen <= 0x39))
 					count = atoi(string + i);
 				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
@@ -1190,10 +1151,10 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 				case 'd':
 				case 'u':
 					if (zeichen == 'd') {
-						izahl = va_arg(parptr, int);
+						int16 izahl = va_arg(parptr, int);
 						itoa(izahl, zstring, 10);
 					} else {
-						uzahl = va_arg(parptr, unsigned int);
+						uint16 uzahl = va_arg(parptr, unsigned int);
 						itoa(uzahl, zstring, 10);
 					}
 					k = 0;
@@ -1213,10 +1174,10 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 
 				case 'l':
 					if (string[i] != 'u') {
-						lzahl = va_arg(parptr, long);
+						long lzahl = va_arg(parptr, long);
 						ltoa(lzahl, zstring, 10);
 					} else {
-						luzahl = va_arg(parptr, uint32);
+						uint32 luzahl = va_arg(parptr, uint32);
 						ultoa(luzahl, zstring, 10);
 						++i;
 					} k
@@ -1254,14 +1215,15 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 
 					break;
 
+				default:
+					break;
 				}
 			}
 		}
 	}
 }
 
-void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
-                              int16 scrwidth) {
+void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
 	_crlfx = x;
 	_crlfy = y + _fontH + 2;
 	if ((zeichen < 32) || (zeichen == 127)) {
@@ -1287,6 +1249,9 @@ void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int1
 		case 127:
 			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
 			break;
+
+		default:
+			break;
 		}
 	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
 		putcxy(x, y, zeichen, fgCol, bgCol, scrwidth);
@@ -1320,6 +1285,9 @@ void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwi
 		case 127:
 			putz(32, fgCol, bgCol, scrwidth);
 			break;
+
+		default:
+			break;
 		}
 	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
 		putz(zeichen, fgCol, bgCol, scrwidth);
@@ -1361,8 +1329,7 @@ void McgaGraphics::exit_mausmode() {
 }
 
 int16 McgaGraphics::devices() {
-	int16 i;
-	i = 0;
+	int16 i = 0;
 	if (_mausMode != false) {
 		if (i > 1) {
 			i = 27;
@@ -1376,10 +1343,11 @@ int16 McgaGraphics::devices() {
 }
 
 int16 McgaGraphics::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
-	int16 k, diff;
-	k = 0;
+	int16 diff;
+	int16 k = 0;
 	while (zstring[k] != 0)
 		++k;
+
 	if (k >= stellen) {
 		while ((k) && (stellen)) {
 			--k;
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index ebe52f24313..757b7329b86 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -30,8 +30,9 @@ namespace Chewy {
 #define RIGHT_VECT 1
 #define UP_VECT -_gpkt->Breite
 #define DOWN_VECT _gpkt->Breite
-#define GEFUNDEN 1
-#define UNBEGEHBAR 2
+#define MOV_START 0
+#define MOV_FOUND 1
+#define MOV_UNPASSABLE 2
 #define Y_DOWN 1
 #define Y_UP 2
 #define SOURCE_COL 14
@@ -287,12 +288,12 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 	mi.XyzStart[0] = om.Xypos[0];
 	mi.XyzStart[1] = om.Xypos[1];
 	get_mov_vector(mi.XyzStart, mi.Vorschub, &om);
-	int16 ende = 0;
+	bool endFl = false;
 	int16 mov_ok = 0;
 	int16 steps = 0;
-	int16 abbruch = 0;
+	int16 abbruch = MOV_START;
 
-	while (!ende && !abbruch) {
+	while (!endFl && !abbruch) {
 		if (om.Count > 0) {
 			--om.Count;
 			int16 tmpx = om.Xyvo[0];
@@ -342,21 +343,21 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 					                  om.Xypos[1] + tmpy + tmpz,
 					                  _gpkt->Breite, _gpkt->Mem)) {
 
-						abbruch = UNBEGEHBAR;
+						abbruch = MOV_UNPASSABLE;
 					} else {
 						if (!tmpy) {
-							abbruch = UNBEGEHBAR;
+							abbruch = MOV_UNPASSABLE;
 						} else if (abs(om.Xypos[1] - mi.XyzEnd[1]) <= abs(tmpy)) {
-							abbruch = GEFUNDEN;
+							abbruch = MOV_FOUND;
 						} else {
 							mov_ok = MOV_Y;
 						}
 					}
 				} else {
 					if (!tmpx) {
-						abbruch = UNBEGEHBAR;
+						abbruch = MOV_UNPASSABLE;
 					} else  if (abs(om.Xypos[0] - mi.XyzEnd[0]) <= abs(tmpx)) {
-							abbruch = GEFUNDEN;
+							abbruch = MOV_FOUND;
 					} else {
 						mov_ok = MOV_X;
 					}
@@ -374,7 +375,7 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 				}
 				if (om.Count == 0) {
 
-					abbruch = GEFUNDEN;
+					abbruch = MOV_FOUND;
 				}
 			}
 
@@ -397,14 +398,14 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
 				}
 				if (om.Count == 0) {
 
-					abbruch = GEFUNDEN;
+					abbruch = MOV_FOUND;
 				}
 				mov_ok = false;
 			}
 		} else
-			ende = 1;
+			endFl = true;
 	}
-	if (abbruch == UNBEGEHBAR)
+	if (abbruch == MOV_UNPASSABLE)
 		*dst_feld = get_feld_nr(om.Xypos[0], om.Xypos[1]);
 
 	return steps;
@@ -446,7 +447,7 @@ void MovClass::get_mov_line() {
 						}
 						vector = RIGHT_VECT;
 					} else {
-						abbruch = UNBEGEHBAR;
+						abbruch = MOV_UNPASSABLE;
 					}
 				}
 
@@ -466,7 +467,7 @@ void MovClass::get_mov_line() {
 							}
 						}
 					} else {
-						abbruch = UNBEGEHBAR;
+						abbruch = MOV_UNPASSABLE;
 					}
 				}
 				++count;
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index cbb701aede0..e2cbc1e1517 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -306,8 +306,6 @@ int16 ged_user_func(int16 idx_nr) {
 }
 
 void enter_room(int16 eib_nr) {
-	int16 i;
-
 	load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
 	_G(atds)->stop_aad();
@@ -315,7 +313,7 @@ void enter_room(int16 eib_nr) {
 	_G(spieler).DiaAMov = -1;
 	_G(zoom_mov_fak) = 1;
 
-	for (i = 0; i < MAX_PERSON; i++) {
+	for (int16 i = 0; i < MAX_PERSON; i++) {
 		_G(spieler_mi)[i].Vorschub = 8;
 		_G(spieler).ZoomXy[i][0] = 0;
 		_G(spieler).ZoomXy[i][1] = 0;
@@ -453,10 +451,7 @@ void enter_room(int16 eib_nr) {
 }
 
 void exit_room(int16 eib_nr) {
-	int16 *xy;
-	int16 x, y;
-	int16 no_exit;
-	no_exit = false;
+	bool no_exit = false;
 	_G(det)->disable_room_sound();
 
 	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
@@ -512,6 +507,8 @@ void exit_room(int16 eib_nr) {
 			_G(spieler).R25GleiterExit = true;
 			break;
 
+		default:
+			break;
 		}
 		_G(menu_item) = CUR_WALK;
 		cursor_wahl(_G(menu_item));
@@ -555,8 +552,8 @@ void exit_room(int16 eib_nr) {
 		break;
 	}
 
-	x = -1;
-	y = -1;
+	int16 x = -1;
+	int16 y = -1;
 
 	switch (eib_nr) {
 	case 0:
@@ -598,10 +595,11 @@ void exit_room(int16 eib_nr) {
 	case 119:
 	case 123:
 	case 125:
-	case 135:
-		xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
+	case 135: {
+		int16 *xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 		x = xy[0] + 30;
 		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
+		}
 		break;
 
 	case 10:
@@ -613,10 +611,11 @@ void exit_room(int16 eib_nr) {
 	case 78:
 	case 92:
 	case 122:
-	case 131:
-		xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
+	case 131: {
+		int16 *xy = (int16 *)_G(ablage)[_G(room_blk).AkAblage];
 		x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 		y = xy[1] + 3;
+		}
 		break;
 
 	case 6:
@@ -776,25 +775,21 @@ void exit_room(int16 eib_nr) {
 }
 
 void print_rows(int16 id) {
-	int16 txt_anz, len;
-	char *txtStr, *s;
-
 	_G(out)->set_fontadr(_G(font8x8));
 	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
-	txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
+	int16 txt_anz;
+	char *txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
 	_G(out)->set_pointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
-		s = _G(txt)->str_pos(txtStr, i);
-		len = (strlen(s) * _G(fvorx8x8)) / 2;
+		char *s = _G(txt)->str_pos(txtStr, i);
+		int16 len = (strlen(s) * _G(fvorx8x8)) / 2;
 
 		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
 	}
 }
 
 int16 flic_user_function(int16 keys) {
-	int ret;
-
 	if (_G(atds)->aad_get_status() != -1) {
 		switch (_G(flic_val1)) {
 		case 579:
@@ -814,7 +809,7 @@ int16 flic_user_function(int16 keys) {
 	if (_G(flic_val1) == 594 && keys == 18)
 		_G(atds)->stop_aad();
 
-	ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
+	int ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	if (_G(flic_val2) == 140 && keys == 15)
 		ret = -2;
 	if (_G(flic_val2) == 144 && keys == 7)
@@ -1742,8 +1737,7 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
 }
 
 int16 sib_event_no_inv(int16 sib_nr) {
-	int16 ret;
-	ret = true;
+	int16 ret = true;
 
 	switch (sib_nr) {
 	case SIB_KABEL_R1:


Commit: a8f913b5a90aaa2c3d1e286429453af60100732b
    https://github.com/scummvm/scummvm/commit/a8f913b5a90aaa2c3d1e286429453af60100732b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY: More janitorial work on CppCheck warnings

Changed paths:
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 43bedf310e9..bddc664bead 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -108,29 +108,23 @@ static const int16 SPZ_ANI_PH[][2] = {
 
 
 void sprite_engine() {
-	int16 zmin;
 	int16 min_zeiger = 0;
-	int16 i;
-	int16 j;
-	int16 nr;
 	int16 spr_nr;
-	int16 *Cxy;
 	int16 x, y;
-	int16 p_nr;
 	ObjMov detmov;
 	TafSeqInfo *ts_info;
 	calc_z_ebene();
 	calc_person_ani();
 
-	for (i = 0; i < _G(z_count); i++) {
-		zmin = 3000;
-		for (j = 0; j < _G(z_count); j++) {
+	for (int16 i = 0; i < _G(z_count); i++) {
+		int16 zmin = 3000;
+		for (int16 j = 0; j < _G(z_count); j++) {
 			if (_G(z_obj_sort)[j].ObjZ != 3000 && _G(z_obj_sort)[j].ObjZ < zmin) {
 				zmin = _G(z_obj_sort)[j].ObjZ;
 				min_zeiger = j;
 			}
 		}
-		nr = (int16)_G(z_obj_sort)[min_zeiger].ObjNr;
+		int16 nr = (int16)_G(z_obj_sort)[min_zeiger].ObjNr;
 
 		switch (_G(z_obj_sort)[min_zeiger].ObjArt) {
 		case ZOBJ_ANI_DETAIL:
@@ -189,8 +183,8 @@ void sprite_engine() {
 			break;
 
 		case ZOBJ_HOWARD:
-		case ZOBJ_NICHELLE:
-			p_nr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
+		case ZOBJ_NICHELLE: {
+			int16 p_nr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
 			if (!_G(spieler).PersonHide[p_nr]) {
 				if (!_G(spz_ani)[p_nr]) {
 					ts_info = _G(PersonTaf)[p_nr];
@@ -200,41 +194,31 @@ void sprite_engine() {
 					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[p_nr].PhNr];
 				}
 
-				x = _G(spieler_mi)[p_nr].XyzStart[0] +
-				    ts_info->korrektur[spr_nr * 2] -
-				    _G(spieler).scrollx;
-				y = _G(spieler_mi)[p_nr].XyzStart[1] +
-				    ts_info->korrektur[spr_nr * 2 + 1] -
-				    _G(spieler).scrolly;
-				calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1],
-				          _G(spieler).ZoomXy[p_nr][0],
-				          _G(spieler).ZoomXy[p_nr][1],
-				          &_G(spieler_vector)[p_nr]);
-				_G(out)->scale_set(ts_info->image[spr_nr], x, y,
-				                _G(spieler_vector)[p_nr].Xzoom,
-				                _G(spieler_vector)[p_nr].Yzoom,
-				                _G(scr_width));
+				x = _G(spieler_mi)[p_nr].XyzStart[0] + ts_info->korrektur[spr_nr * 2] - _G(spieler).scrollx;
+				y = _G(spieler_mi)[p_nr].XyzStart[1] + ts_info->korrektur[spr_nr * 2 + 1] - _G(spieler).scrolly;
+				calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1], _G(spieler).ZoomXy[p_nr][0],_G(spieler).ZoomXy[p_nr][1], &_G(spieler_vector)[p_nr]);
+				_G(out)->scale_set(ts_info->image[spr_nr], x, y, _G(spieler_vector)[p_nr].Xzoom, _G(spieler_vector)[p_nr].Yzoom, _G(scr_width));
+			}
 			}
 			break;
 		case ZOBJ_PROGANI:
-			_G(out)->sprite_set(_G(spr_info)[nr].Image,
-			                 _G(spr_info)[nr].X - _G(spieler).scrollx,
-			                 _G(spr_info)[nr].Y - _G(spieler).scrolly, 0);
+			_G(out)->sprite_set(_G(spr_info)[nr].Image, _G(spr_info)[nr].X - _G(spieler).scrollx, _G(spr_info)[nr].Y - _G(spieler).scrolly, 0);
 			break;
 
-		case ZOBJ_AUTO_OBJ:
+		case ZOBJ_AUTO_OBJ: {
 			spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
 			         _G(auto_mov_vector)[nr].PhNr;
-			Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
+			int16 *cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 			calc_zoom(_G(auto_mov_vector)[nr].Xypos[1],
 			          _G(mov_phasen)[nr].ZoomFak,
 			          _G(mov_phasen)[nr].ZoomFak,
 			          &_G(auto_mov_vector)[nr]);
 			_G(out)->scale_set(_G(room_blk).DetImage[spr_nr],
-			                _G(auto_mov_vector)[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
-			                _G(auto_mov_vector)[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
+			                _G(auto_mov_vector)[nr].Xypos[0] + cxy[0] - _G(spieler).scrollx,
+			                _G(auto_mov_vector)[nr].Xypos[1] + cxy[1] - _G(spieler).scrolly,
 			                _G(auto_mov_vector)[nr].Xzoom,
 			                _G(auto_mov_vector)[nr].Yzoom, _G(scr_width));
+			}
 			break;
 
 		default:
@@ -304,11 +288,8 @@ void calc_z_ebene() {
 }
 
 int16 mouse_on_prog_ani() {
-	int16 i;
-	int16 ani_nr;
-	ani_nr = -1;
-	for (i = 0; i < MAX_PROG_ANI && ani_nr == -1; i++) {
-
+	int16 ani_nr = -1;
+	for (int16 i = 0; i < MAX_PROG_ANI && ani_nr == -1; i++) {
 		if (_G(minfo).x >= _G(spr_info)[i].X && _G(minfo).x <= _G(spr_info)[i].X1 &&
 		        _G(minfo).y >= _G(spr_info)[i].Y && _G(minfo).y <= _G(spr_info)[i].Y1) {
 			ani_nr = i;
@@ -319,8 +300,6 @@ int16 mouse_on_prog_ani() {
 }
 
 void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
-	int16 u_index;
-	int16 tmp_nr;
 	if (richtung != -1)
 		set_person_spr(richtung, p_nr);
 	_G(spieler_vector)[p_nr].Xypos[0] = x;
@@ -334,7 +313,7 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	          _G(spieler).ZoomXy[p_nr][0],
 	          _G(spieler).ZoomXy[p_nr][1],
 	          &_G(spieler_vector)[p_nr]);
-	tmp_nr = p_nr;
+	int16 tmp_nr = p_nr;
 	if (p_nr >= P_NICHELLE) {
 		++tmp_nr;
 	}
@@ -342,16 +321,15 @@ void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
 	_G(ssi)[tmp_nr].Y = _G(spieler_vector)[p_nr].Xypos[1] - _G(spieler).scrolly;
 	if (!_G(flags).ExitMov) {
 		if (p_nr == P_CHEWY) {
-			u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[p_nr].HotX, y + _G(spieler_mi)[p_nr].HotY,
-			                        _G(room)->_gedXAnz[_G(room_blk).AkAblage],
-			                        _G(ged_mem)[_G(room_blk).AkAblage]);
+			int16 u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[p_nr].HotX, y + _G(spieler_mi)[p_nr].HotY,
+			                                 _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+			                                 _G(ged_mem)[_G(room_blk).AkAblage]);
 			check_shad(u_index, 1);
 		}
 	}
 }
 
 void set_person_spr(int16 nr, int16 p_nr) {
-
 	if (nr == 5 || nr == 4)
 		nr = 0;
 	else if (nr == 10 || nr == 7)
@@ -424,11 +402,10 @@ void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
 }
 
 void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
-	AniDetailInfo *adi;
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(det)->start_detail(ani_nr, rep, mode);
-	adi = _G(det)->get_ani_detail(ani_nr);
+	AniDetailInfo *adi = _G(det)->get_ani_detail(ani_nr);
 	if (mode == ANI_VOR)
 		frame = adi->ani_count + frame;
 	else
@@ -458,10 +435,9 @@ void wait_show_screen(int16 frames) {
 }
 
 void start_ani_block(int16 anz, const AniBlock *ab) {
-	int16 i;
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	for (i = 0; i < anz; i++) {
+	for (int16 i = 0; i < anz; i++) {
 		if (ab[i].Mode == ANI_WAIT)
 			start_detail_wait(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 		else
@@ -471,7 +447,6 @@ void start_ani_block(int16 anz, const AniBlock *ab) {
 }
 
 void start_aad_wait(int16 dia_nr, int16 str_nr) {
-
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(talk_start_ani) = -1;
@@ -500,8 +475,6 @@ void start_aad(int16 dia_nr) {
 }
 
 bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
-	int16 VocNr;
-	int16 vocx;
 	bool ret = false;
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
@@ -512,6 +485,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_START);
 
+			int16 VocNr;
 			ret = _G(atds)->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
 			if (ret) {
 				while (_G(atds)->ats_get_status() != false && !SHOULD_QUIT)
@@ -522,7 +496,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			// subtitles only mode. Don't allow this in ScummVM
 			} else if (VocNr != -1 && g_engine->_sound->getSpeechSubtitlesMode() != DISPLAY_TXT) {
 				ret = true;
-				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+				int16 vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));
 				g_engine->_sound->playSpeech(VocNr);
 				//warning("FIXME - unknown constant SMP_PLAYING");
@@ -565,16 +539,12 @@ void aad_wait(int16 str_nr) {
 }
 
 void start_aad(int16 dia_nr, int16 ssi_nr) {
-	switch (ssi_nr) {
-	case 0:
+	if (ssi_nr == 0) {
 		_G(ssi)[0].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 		_G(ssi)[0].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 		_G(atds)->set_split_win(0, &_G(ssi)[0]);
-		break;
-
-	default:
-		break;
 	}
+
 	_G(atds)->start_aad(dia_nr);
 }
 
@@ -613,18 +583,14 @@ void continue_auto_obj(int16 nr, int16 repeat) {
 }
 
 void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLine *mline) {
-	int16 i;
-	int16 *tmp;
-	MovLine *tmp1;
-	const MovLine *tmp2;
-	tmp2 = mline;
-	tmp = (int16 *)_G(mov_phasen)[auto_nr].Phase;
-	for (i = 0; i < 8; i++)
+	const MovLine *tmp2 = mline;
+	int16 *tmp = (int16 *)_G(mov_phasen)[auto_nr].Phase;
+	for (int16 i = 0; i < 8; i++)
 		tmp[i] = phasen[i];
 	_G(mov_phasen)[auto_nr].Start = 1;
 
-	tmp1 = _G(mov_line)[auto_nr];
-	for (i = 0; i < lines; i++) {
+	MovLine *tmp1 = _G(mov_line)[auto_nr];
+	for (int16 i = 0; i < lines; i++) {
 		tmp1->EndXyz[0] = tmp2->EndXyz[0];
 		tmp1->EndXyz[1] = tmp2->EndXyz[1];
 		tmp1->EndXyz[2] = tmp2->EndXyz[2];
@@ -645,7 +611,6 @@ void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLin
 }
 
 void new_auto_line(int16 nr) {
-
 	if (nr < _G(auto_obj)) {
 		if (_G(mov_phasen)[nr].Repeat != -1 &&
 		        _G(mov_phasen)[nr].Start) {
@@ -686,16 +651,12 @@ void new_auto_line(int16 nr) {
 }
 
 int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
-	int16 ret;
-	int16 spr_nr;
-	int16 *xy;
-	int16 *Cxy;
-	ret = false;
+	int16 ret = false;
 	if (_G(mov_phasen)[nr].Start == 1) {
-		spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
-		         _G(auto_mov_vector)[nr].PhNr;
-		xy = (int16 *)_G(room_blk).DetImage[spr_nr];
-		Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
+		int16 spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
+		               _G(auto_mov_vector)[nr].PhNr;
+		int16 *xy = (int16 *)_G(room_blk).DetImage[spr_nr];
+		int16 *Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 
 		if (!xoff) {
 			xoff = xy ? xy[0] : 0;
@@ -715,8 +676,7 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 }
 
 int16 auto_obj_status(int16 nr) {
-	int16 status;
-	status = false;
+	int16 status = false;
 	if (nr < _G(auto_obj)) {
 		if (_G(mov_phasen)[nr].Repeat != -1)
 			status = true;
@@ -726,11 +686,9 @@ int16 auto_obj_status(int16 nr) {
 }
 
 void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y, ObjMov *om) {
-	float zoom_fak_x;
-	float zoom_fak_y;
-	zoom_fak_x = (float)zoomfak_x / (float)100.0;
+	float zoom_fak_x = (float)zoomfak_x / (float)100.0;
 	zoom_fak_x = -zoom_fak_x;
-	zoom_fak_y = (float)zoomfak_y / (float)100.0;
+	float zoom_fak_y = (float)zoomfak_y / (float)100.0;
 	zoom_fak_y = -zoom_fak_y;
 	if (!_G(zoom_horizont)) {
 		om->Xzoom = -zoomfak_x;
@@ -747,11 +705,7 @@ void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y, ObjMov *om) {
 }
 
 void mov_objekt(ObjMov *om, MovInfo *mi) {
-	int16 tmpx;
-	int16 tmpy;
-	int16 tmpz;
-	int16 u_index;
-	u_index = 0;
+	int16 u_index = 0;
 
 	if (om->DelayCount > 0)
 		--om->DelayCount;
@@ -764,9 +718,9 @@ void mov_objekt(ObjMov *om, MovInfo *mi) {
 				++om->PhNr;
 			else
 				om->PhNr = 0;
-			tmpx = om->Xyvo[0];
-			tmpy = om->Xyvo[1];
-			tmpz = om->Xyvo[2];
+			int16 tmpx = om->Xyvo[0];
+			int16 tmpy = om->Xyvo[1];
+			int16 tmpz = om->Xyvo[2];
 			om->Xyna[0][0] += om->Xyna[0][1];
 			if (om->Xyna[0][1] < 0) {
 				if (om->Xyna[0][0] < -1000) {
@@ -980,8 +934,7 @@ void calc_person_end_ani(ObjMov *om, int16 p_nr) {
 }
 
 void get_phase(ObjMov *om, MovInfo *mi) {
-	int16 p_nr;
-	p_nr = 255 - mi->Id;
+	int16 p_nr = 255 - mi->Id;
 	if (p_nr >= 0) {
 		if (om->Xyvo[0] > 0) {
 			if (om->Xyvo[1] > 0) {
@@ -1038,8 +991,7 @@ void get_phase(ObjMov *om, MovInfo *mi) {
 }
 
 void get_lr_phase(ObjMov *om, int16 mode) {
-	int16 p_nr;
-	p_nr = 255 - mode;
+	int16 p_nr = 255 - mode;
 	if (p_nr >= 0) {
 		if (om->Xyvo[0] > 0) {
 			om->Phase = CH_RIGHT_NO;
@@ -1050,13 +1002,11 @@ void get_lr_phase(ObjMov *om, int16 mode) {
 }
 
 void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
-	int16 tmp;
-	int16 tmp_vorschub;
-	tmp_vorschub = mi->Vorschub;
+	int16 tmp_vorschub = mi->Vorschub;
 	mi->Vorschub = CH_X_PIX;
 	if (_G(flags).ZoomMov) {
 		if (om->Xzoom < 0 && _G(zoom_mov_fak) > 0) {
-			tmp = om->Xzoom / _G(zoom_mov_fak);
+			int16 tmp = om->Xzoom / _G(zoom_mov_fak);
 			tmp = abs(tmp);
 			mi->Vorschub -= tmp;
 			if (mi->Vorschub < 2)
@@ -1077,17 +1027,13 @@ void start_spz_wait(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 }
 
 bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
-	int16 i;
-	int16 spr_start;
-	int16 spr_anz;
-
 	bool ret = false;
 	if (!_G(flags).SpzAni) {
 		_G(flags).SpzAni = true;
 		_G(spz_ani)[p_nr] = true;
 		_G(spz_p_nr) = p_nr;
-		spr_start = SPZ_ANI_PH[ani_id][0];
-		spr_anz = SPZ_ANI_PH[ani_id][1];
+		int16 spr_start = SPZ_ANI_PH[ani_id][0];
+		int16 spr_anz = SPZ_ANI_PH[ani_id][1];
 		if (_G(person_end_phase)[p_nr] == P_RIGHT) {
 			ani_id += 100;
 			spr_start += CH_SPZ_OFFSET;
@@ -1100,7 +1046,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 			_G(spz_tinfo) = _G(mem)->taf_seq_adr(spr_start, spr_anz);
 		}
 
-		for (i = 0; i < spr_anz; i++) {
+		for (int16 i = 0; i < spr_anz; i++) {
 			if (!reverse)
 				_G(spz_spr_nr)[i] = i;
 			else
@@ -1153,11 +1099,9 @@ void set_spz_delay(int16 delay) {
 }
 
 void load_person_ani(int16 ani_id, int16 p_nr) {
-	int16 ani_start;
-	short ani_anz;
 	if (_G(PersonAni)[p_nr] != ani_id) {
-		ani_start = SPZ_ANI_PH[ani_id][0];
-		ani_anz = SPZ_ANI_PH[ani_id][1];
+		int16 ani_start = SPZ_ANI_PH[ani_id][0];
+		short ani_anz = SPZ_ANI_PH[ani_id][1];
 		_G(PersonAni)[p_nr] = ani_id;
 		if (_G(PersonTaf)[p_nr])
 			free((char *)_G(PersonTaf)[p_nr]);
@@ -1173,10 +1117,8 @@ uint8 p_ani[MAX_PERSON - 1][5] = {
 };
 
 void calc_person_ani() {
-	int16 i;
-	int16 p_nr;
 	int16 ani_nr = 0;
-	for (p_nr = 0; p_nr < MAX_PERSON; p_nr++) {
+	for (int16 p_nr = 0; p_nr < MAX_PERSON; p_nr++) {
 		if (_G(spieler_mi)[p_nr].Id != NO_MOV_OBJ) {
 			switch (p_nr) {
 			case P_CHEWY:
@@ -1185,7 +1127,7 @@ void calc_person_ani() {
 			case P_HOWARD:
 			case P_NICHELLE:
 				if (!_G(spz_ani)[p_nr]) {
-					for (i = 0; i < 8; i++)
+					for (int16 i = 0; i < 8; i++)
 						_G(PersonSpr)[p_nr][i] = i;
 
 					if (!_G(spieler_vector)[p_nr].Count &&
@@ -1212,6 +1154,9 @@ void calc_person_ani() {
 						case CH_DOWN:
 							ani_nr = (int16)p_ani[p_nr - 1][3];
 							break;
+
+						default:
+							break;
 						}
 					}
 					load_person_ani(ani_nr, p_nr);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 8dc5db189bd..873ac776e1b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -1285,17 +1285,11 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
 	int16 talk_stop_ani = -1;
 	int16 talk_show_static = -1;
-	int16 tmp = -1;
-	int16 anz;
-	int16 i;
-	int16 altes_format;
-	int16 talk_ani;
-	int16 stop_ani;
 	int16 ani_nr;
-	talk_ani = -1;
-	stop_ani = -1;
-	altes_format = false;
-	tmp = -1;
+	int16 talk_ani = -1;
+	int16 stop_ani = -1;
+	int16 altes_format = false;
+	int16 tmp = -1;
 
 	switch (dia_nr) {
 	case 30000:
@@ -1495,8 +1489,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R35_CAT_DIA2:
 	case R35_CAT_DIA1:
 	case R37_HAHN_DIA:
-		switch (person_nr) {
-		case 1:
+		if (person_nr == 1) {
 			if (mode == AAD_STR_START) {
 				_G(room)->set_timer_status(1, TIMER_STOP);
 				_G(det)->del_static_ani(1);
@@ -1506,29 +1499,30 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				_G(det)->stop_detail(0);
 				_G(det)->set_static_ani(1, -1);
 			}
-			break;
-
 		}
 		break;
 
 	case 169:
 
 		switch (person_nr) {
-		case 1:
+		case 0:
 			if (mode == AAD_STR_START) {
-				_G(det)->start_detail(5, 255, ANI_VOR);
+				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			} else {
-				_G(det)->stop_detail(5);
+				stop_spz();
 			}
 			break;
 
-		case 0:
+		case 1:
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				_G(det)->start_detail(5, 255, ANI_VOR);
 			} else {
-				stop_spz();
+				_G(det)->stop_detail(5);
 			}
 			break;
+
+		default:
+			break;
 		}
 		break;
 
@@ -1564,7 +1558,8 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 		case P_HOWARD:
 		case P_NICHELLE:
-		case P_4:
+		case P_4: {
+			int16 anz;
 			if (person_nr == 4) {
 				anz = 2;
 				tmp = 3;
@@ -1572,7 +1567,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				anz = 1;
 				tmp = person_nr + 2;
 			}
-			for (i = 0; i < anz; i++) {
+			for (int16 i = 0; i < anz; i++) {
 				if (mode == AAD_STR_START) {
 					_G(det)->start_detail(tmp, 255, ANI_VOR);
 				} else {
@@ -1580,6 +1575,9 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				}
 				++tmp;
 			}
+			}
+			break;
+		default:
 			break;
 		}
 		break;
@@ -2143,6 +2141,8 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			}
 			break;
 
+		default:
+			break;
 		}
 		break;
 
@@ -2305,9 +2305,8 @@ void calc_inv_use_txt(int16 test_nr) {
 
 static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 	int16 txt_anz;
-	const char *s;
 
-	s = _G(atds)->ats_get_txt(31, TXT_MARK_USE, &txt_anz, 16);
+	const char *s = _G(atds)->ats_get_txt(31, TXT_MARK_USE, &txt_anz, 16);
 	_G(calc_inv_text_str1) = Common::String::format("%s ", s);
 
 	_G(atds)->load_atds(cur_inv, INV_ATS_DATEI);
@@ -2327,11 +2326,7 @@ static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 
 bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	int16 inv_mode;
-	int16 txt_nr = 0;
 	bool ret = false;
-	int16 r_val = 0;
-	int16 ok;
-	ret = false;
 
 	switch (mode) {
 	case INVENTAR_NORMAL:
@@ -2364,7 +2359,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	}
 
 	if (inv_mode != -1) {
-		txt_nr = _G(atds)->calc_inv_no_use(_G(spieler).AkInvent, test_nr, inv_mode);
+		int16 txt_nr = _G(atds)->calc_inv_no_use(_G(spieler).AkInvent, test_nr, inv_mode);
 		if (txt_nr != -1) {
 			if (!_G(flags).InventMenu) {
 				if (txt_nr >= 15000) {
@@ -2376,11 +2371,11 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 				Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, txt_nr);
 			}
 		} else {
-			ok = false;
+			int16 ok = false;
 			if (inv_mode == IUID_SPIELER)
 				ok = calc_person_click(test_nr);
 			if (!ok) {
-				r_val = g_engine->getRandomNumber(5);
+				int16 r_val = g_engine->getRandomNumber(5);
 
 				if (_G(flags).InventMenu) {
 					calc_inv_get_text(_G(spieler).AkInvent, test_nr);
@@ -2554,7 +2549,6 @@ int16 calc_person_click(int16 p_nr) {
 void calc_person_dia(int16 p_nr) {
 	bool flag = false;
 	int16 room_nr = 0;
-	int i;
 
 	switch (p_nr) {
 	case P_HOWARD:
@@ -2762,7 +2756,7 @@ void calc_person_dia(int16 p_nr) {
 				auto_move(_G(spieler).DiaAMov, P_CHEWY);
 
 			int16 tmp[3];
-			for (i = 0; i < 3; ++i) {
+			for (int i = 0; i < 3; ++i) {
 				tmp[i] = _G(spieler).PersonDiaRoom[i];
 				_G(spieler).PersonDiaRoom[i] = false;
 				_G(stopAutoMove)[i] = true;
@@ -2770,7 +2764,7 @@ void calc_person_dia(int16 p_nr) {
 
 			start_aad_wait(_G(spieler).PersonDia[p_nr], -1);
 
-			for (i = 0; i < 3; ++i) {
+			for (int i = 0; i < 3; ++i) {
 				_G(spieler).PersonDiaRoom[i] = tmp[i];
 				_G(stopAutoMove)[i] = false;
 			}


Commit: 4009fd7a6a557110e5945a82f33776a41a63731c
    https://github.com/scummvm/scummvm/commit/4009fd7a6a557110e5945a82f33776a41a63731c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY: Finish refactoring taf_seq_adr()

The sprite corrections table was not set correctly.
This allows us to remove related code that is now unused.

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/data.h
    engines/chewy/memory.cpp
    engines/chewy/ngsdefs.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 480566eacdb..867f9d6f7ec 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -58,29 +58,6 @@ uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 	return nr;
 }
 
-void Data::load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher) {
-	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	assert(rs);
-
-	byte *sp = speicher;
-
-	if (komp == 1) {
-		// Run length encoding using count/value pairs
-		for (uint32 pos = 0; pos < size;) {
-			uint8 count = rs->readByte();
-			uint8 value = rs->readByte();
-
-			for (uint8 i = 0; (i < count) && (pos < size); i++) {
-				sp[pos] = value;
-				++pos;
-			}
-		}
-	} else {
-		rs->read(sp, size);
-		sp += size;
-	}
-}
-
 void Data::load_tff(const char *fname, byte *speicher) {
 	strncpy(_filename, fname, MAXPATH - 5);
 	_filename[MAXPATH - 5] = '\0';
@@ -242,8 +219,6 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 
 int16 Data::get_id(char *id_code) {
 	int16 id = -1;
-	if (!(scumm_strnicmp(id_code, "TAF", 3)))
-		id = TAFDATEI;
 	if (!(scumm_strnicmp(id_code, "TFF", 3)))
 		id = TFFDATEI;
 
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 831ea63f717..5257a9d5710 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -37,7 +37,6 @@ public:
 	~Data();
 
 	uint16 select_pool_item(Stream *stream, uint16 nr);
-	void load_tafmcga(Stream *stream, int16 komp, uint32 size, byte *speicher);
 	uint32 load_tmf(Stream *stream, TmfHeader *song);
 
 	void load_tff(const char *fname, byte *speicher);
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 6c6309d17a1..2ad2c1c43c9 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -63,86 +63,6 @@ TafInfo *Memory::taf_adr(const char *filename) {
 }
 
 TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
-	Common::File *rs = new Common::File();
-	rs->open(CH_SPZ_FILE);
-	TafFileHeader header;
-	TafImageHeader iheader;
-	TafSeqInfo *ts_info = nullptr;
-	int16 i;
-
-	rs->seek(0, SEEK_SET);
-	if (header.load(rs)) {
-		int16 id = file->get_id(header.id);
-		if (id == TAFDATEI) {
-			if (header.korrekt > 1) {
-				rs->seek((-(int)((header.count - image_start) * sizeof(uint32))), SEEK_END);
-				uint32 ptr = rs->readUint32LE();
-
-				rs->seek(ptr, SEEK_SET);
-				uint32 size = 0;
-				for (i = 0; i < image_anz; i++) {
-					if (iheader.load(rs)) {
-						size += iheader.width * iheader.height;
-						rs->seek(iheader.next, SEEK_SET);
-
-					} else {
-						error("taf_seq_adr error");
-					}
-				}
-				size += image_anz * sizeof(byte *);
-				size += image_anz * sizeof(char *);
-				size += ((uint32)sizeof(TafSeqInfo));
-				byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
-
-				ts_info = (TafSeqInfo *)tmp1;
-				ts_info->anzahl = image_anz;
-				ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
-				ts_info->korrektur = (int16 *)(tmp1 + size);
-				rs->seek(ptr, SEEK_SET);
-				byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
-
-				for (i = 0; i < image_anz; i++) {
-					if (iheader.load(rs)) {
-						ts_info->image[i] = sp_ptr;
-						int16 *abmess = (int16 *)sp_ptr;
-						abmess[0] = iheader.width;
-						abmess[1] = iheader.height;
-						sp_ptr += 4;
-						size = (uint32)((uint32)iheader.height) * ((uint32)iheader.width);
-
-						rs->seek(iheader.image, SEEK_SET);
-						file->load_tafmcga(rs, iheader.komp, size, sp_ptr);
-						rs->seek(iheader.next, SEEK_SET);
-						sp_ptr += size;
-					} else {
-						error("taf_seq_adr error");
-					}
-				}
-				rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
-
-				if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
-					error("taf_seq_adr error");
-				} else {
-					int16 *p = ts_info->korrektur;
-					for (i = 0; i < (int)image_anz * 2; ++i, ++p)
-						*p = rs->readSint16LE();
-				}
-			} else {
-				error("taf_seq_adr error");
-			}
-		} else {
-			error("taf_seq_adr error");
-		}
-	} else {
-		error("taf_seq_adr error");
-	}
-
-	delete rs;
-
-	return ts_info;
-
-	// TODO: This implementation draws sprites with wrong offsets
-#if 0
 	TafSeqInfo *ts_info = nullptr;
 	SpriteResource *res = new SpriteResource(CH_SPZ_FILE);
 	uint32 size = 0;
@@ -169,12 +89,12 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 		sp_ptr += res->getSpriteData(i + image_start, &ts_info->image[i], false);
 	}
 
-	memcpy(ts_info->korrektur, res->getSpriteCorrectionsTable(), image_anz * 2 * sizeof(int16));
+	uint16 *correctionsTable = res->getSpriteCorrectionsTable() + image_start * 2;
+	memcpy(ts_info->korrektur, correctionsTable, image_anz * 2 * sizeof(int16));
 
 	delete res;
 
 	return ts_info;
-#endif
 }
 
 void Memory::tff_adr(const char *filename, byte **speicher) {
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index bdbccf058bf..4d8ef86344f 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -52,7 +52,6 @@ namespace Chewy {
 #define DATEI 3
 #define MOD15 10
 #define TYPE_ANZ 27
-#define TAFDATEI 2
 #define TFFDATEI 3
 #define TMFDATEI 6
 #define SCREENSAVE 0
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 7e91216f1fa..a14fafa6726 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -23,28 +23,6 @@
 
 namespace Chewy {
 
-bool TafFileHeader::load(Common::SeekableReadStream *src) {
-	src->read(id, 4);
-	mode = src->readSint16LE();
-	count = src->readSint16LE();
-	allsize = src->readUint32LE();
-	src->read(palette, PALETTE_SIZE);
-	next = src->readUint32LE();
-	korrekt = src->readSint16LE();
-
-	return true;
-}
-
-bool TafImageHeader::load(Common::SeekableReadStream *src) {
-	komp = src->readSint16LE();
-	width = src->readUint16LE();
-	height = src->readUint16LE();
-	next = src->readUint32LE();
-	image = src->readUint32LE();
-
-	return true;
-}
-
 bool NewPhead::load(Common::SeekableReadStream *src) {
 	src->read(id, 4);
 	type = src->readUint16LE();
@@ -139,54 +117,6 @@ bool SbiInst::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool VocHeader::load(Common::SeekableReadStream *src) {
-	src->read(id, 0x14);
-	offset = src->readUint16LE();
-	ver_low = src->readByte();
-	ver_high = src->readByte();
-	id_code = src->readUint16LE();
-
-	return true;
-}
-
-bool ModInst::load(Common::SeekableReadStream *src) {
-	src->read(name, 22);
-	laenge = src->readUint16LE();
-	finetune = src->readSByte();
-	insvol = src->readSByte();
-	repstart = src->readSint16LE();
-	replen = src->readSint16LE();
-
-	return true;
-}
-
-bool ModHeader::load(Common::SeekableReadStream *src) {
-	src->read(name, 20);
-	for (int i = 0; i < 31; ++i) {
-		if (!instrument[i].load(src))
-			return false;
-	}
-
-	pattern_anz = src->readSByte();
-	dummy = src->readSByte();
-	src->read(sequenz, 128);
-	src->read(id, 4);
-
-	return true;
-}
-
-bool Mod15Header::load(Common::SeekableReadStream *src) {
-	src->read(name, 20);
-	for (int i = 0; i < 15; ++i)
-		instrument[i].load(src);
-	pattern_anz = src->readSByte();
-	dummy = src->readSByte();
-	src->read(sequenz, 128);
-	src->read(id, 4);
-
-	return true;
-}
-
 bool TmfInst::load(Common::SeekableReadStream *src) {
 	finetune = src->readByte();
 	insvol = src->readByte();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 6e74d6da1e1..289ae01d4df 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -32,28 +32,6 @@ namespace Chewy {
 #define MAXMENUE 50
 #define MAXKNOPF 400
 
-struct TafFileHeader {
-	char id[4] = { 0 };
-	int16 mode = 0;
-	int16 count = 0;
-	uint32 allsize = 0;
-	byte palette[PALETTE_SIZE];
-	uint32 next = 0;
-	int16 korrekt = 0;
-
-	bool load(Common::SeekableReadStream *src);
-};
-
-struct TafImageHeader {
-	int16 komp = 0;
-	uint16 width = 0;
-	uint16 height = 0;
-	uint32 next = 0;
-	uint32 image = 0;
-
-	bool load(Common::SeekableReadStream *src);
-};
-
 struct TafInfo {
 	int16 anzahl = 0;
 	byte *palette = nullptr;
@@ -162,16 +140,6 @@ struct SbiInst {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct VocHeader {
-	char id[0x14];
-	uint16 offset;
-	uint8 ver_low;
-	uint8 ver_high;
-	uint16 id_code;
-
-	bool load(Common::SeekableReadStream *src);
-};
-
 struct MouseInfo {
 	int16 x = 0;
 	int16 y = 0;
@@ -188,40 +156,6 @@ struct KbdMouseInfo {
 	KbdInfo *kbinfo = nullptr;
 };
 
-struct ModInst {
-	char name[22];
-	uint16 laenge;
-	char finetune;
-
-	char insvol;
-	int16 repstart;
-	int16 replen;
-
-	bool load(Common::SeekableReadStream *src);
-};
-
-struct ModHeader {
-	char name[20] = { 0 };
-	ModInst instrument[31];
-	char pattern_anz = 0;
-	char dummy = 0;
-	char sequenz[128] = { 0 };
-	char id[4] = { 0 };
-
-	bool load(Common::SeekableReadStream *src);
-};
-
-struct Mod15Header {
-	char name[20];
-	ModInst instrument[15];
-	char pattern_anz;
-	char dummy;
-	char sequenz[128];
-	char id[4];
-
-	bool load(Common::SeekableReadStream *src);
-};
-
 struct TmfInst {
 	uint8 finetune;
 	uint8 insvol;


Commit: 62b70a5add8a55fcef0fe2d570fe62dde252bff1
    https://github.com/scummvm/scummvm/commit/62b70a5add8a55fcef0fe2d570fe62dde252bff1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY: Simplify loading of blende.rnd

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/data.h
    engines/chewy/inits.cpp
    engines/chewy/memory.cpp
    engines/chewy/memory.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 867f9d6f7ec..35dea596253 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -85,22 +85,6 @@ void Data::load_tff(const char *fname, byte *speicher) {
 	}
 }
 
-void Data::void_load(const char *fname, byte *speicher, uint32 size) {
-	strncpy(_filename, fname, MAXPATH - 1);
-	_filename[MAXPATH - 1] = '\0';
-
-	Common::File f;
-	if (f.open(_filename)) {
-		if (!f.read(speicher, size)) {
-			error("void_load error");
-		}
-
-		f.close();
-	} else {
-		error("void_load error");
-	}
-}
-
 uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead ch;
@@ -136,9 +120,8 @@ uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	return size;
 }
 
-// Only used in 2 places, will be removed eventually:
+// Only used in 1 place, will be removed eventually:
 // tff_adr() with type TFFDATEI
-// void_adr() with type 200
 uint32 Data::size(const char *fname, int16 typ) {
 	uint32 size = 0;
 
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 5257a9d5710..36d7b3e1906 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -40,7 +40,6 @@ public:
 	uint32 load_tmf(Stream *stream, TmfHeader *song);
 
 	void load_tff(const char *fname, byte *speicher);
-	void void_load(const char *fname, byte *speicher, uint32 size);
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 585d8d1f8c6..73f901386aa 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -295,7 +295,15 @@ void init_load() {
 	set_spz_delay(3);
 
 	_G(menutaf) = _G(mem)->taf_adr(MENUTAF);
-	_G(spblende) = _G(mem)->void_adr("cut/blende.rnd");
+
+	Common::File f;
+	if (!f.open("cut/blende.rnd"))
+		error("Error reading file: cut/blende.rnd");
+	_G(spblende) = (byte *)MALLOC(f.size() + sizeof(uint32));
+	WRITE_LE_INT32(_G(spblende), f.size());
+	f.read(_G(spblende) + sizeof(uint32), f.size());
+	f.close();
+
 	_G(room)->load_room(&_G(room_blk), _G(room_start_nr), &_G(spieler));
 	_G(out)->set_palette(_G(pal));
 }
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 2ad2c1c43c9..e4c45ff3ace 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -104,16 +104,4 @@ void Memory::tff_adr(const char *filename, byte **speicher) {
 	file->load_tff(filename, *speicher);
 }
 
-// Only called from init_load() with filename blende.rnd
-byte *Memory::void_adr(const char *filename) {
-	byte *ptr = nullptr;
-	uint32 size = file->size(filename, 200);
-
-	ptr = (byte *)MALLOC(size * sizeof(uint32));
-	WRITE_LE_INT32(ptr, size);
-	file->void_load(filename, ptr + sizeof(uint32), size);
-
-	return ptr;
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index 6e46dc8150e..dd18a39fc1a 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -35,7 +35,6 @@ public:
 	TafInfo *taf_adr(const char *filename);
 	TafSeqInfo *taf_seq_adr(int16 image_start, int16 image_anz);
 	void tff_adr(const char *filename, byte **speicher);
-	byte *void_adr(const char *filename);
 
 	Data *file;
 };


Commit: c620f1d93cd2924a60868c9bb70b7f8836b5b22e
    https://github.com/scummvm/scummvm/commit/c620f1d93cd2924a60868c9bb70b7f8836b5b22e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY: Remove more unused types

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index e4ce90e9973..25c3e7b0aae 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -306,10 +306,6 @@ void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
 	putcxy(_G(gcurx), _G(gcury), c, fgCol, bgCol, scrWidth);
 }
 
-void init_svga(VesaInfo *vi_, byte *virt_screen) {
-	warning("STUB - init_svga");
-}
-
 namespace Zoom {
 
 static int spriteHeight;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 4b21ccaf3d7..7098d7d0479 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -62,7 +62,6 @@ void setfont(byte *addr, int16 width, int16 height, int16 first,
              int16 last);
 void vors();
 
-void init_svga(VesaInfo *vi, byte *virt_screen);
 void upd_scr();
 
 } // namespace Chewy
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index a14fafa6726..7356ada05e4 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -98,25 +98,6 @@ bool Dialogue::save(Common::WriteStream *dest) {
 	return true;
 }
 
-bool SbiInst::load(Common::SeekableReadStream *src) {
-	src->read(id, 4);
-	src->read(name, 32);
-	modmulti = src->readByte();
-	carrmulti = src->readByte();
-	modamp = src->readByte();
-	carramp = src->readByte();
-	modad = src->readByte();
-	carrad = src->readByte();
-	modsr = src->readByte();
-	carrsr = src->readByte();
-	modw = src->readByte();
-	carrw = src->readByte();
-	rv = src->readByte();
-	src->read(frei, 5);
-
-	return true;
-}
-
 bool TmfInst::load(Common::SeekableReadStream *src) {
 	finetune = src->readByte();
 	insvol = src->readByte();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 289ae01d4df..753afcc32bf 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -121,25 +121,6 @@ struct Dialogue {
 	}
 };
 
-struct SbiInst {
-	char id[4];
-	char name[32];
-	uint8 modmulti;
-	uint8 carrmulti;
-	uint8 modamp;
-	uint8 carramp;
-	uint8 modad;
-	uint8 carrad;
-	uint8 modsr;
-	uint8 carrsr;
-	uint8 modw;
-	uint8 carrw;
-	uint8 rv;
-	uint8 frei[5];
-
-	bool load(Common::SeekableReadStream *src);
-};
-
 struct MouseInfo {
 	int16 x = 0;
 	int16 y = 0;
@@ -187,72 +168,6 @@ struct musik_info {
 	char *cur_pattern = nullptr;
 };
 
-struct ChannelInfo {
-	uint8 finetune = 0;
-	uint8 volume = 0;
-	uint32 repstart = 0;
-	uint32 replen = 0;
-	uint32 len = 0;
-	uint32 pointer = 0;
-	uint32 pos = 0;
-};
-
-struct VesaInfo {
-	int16 ModeNr = 0;
-	int16 ModeAvail = 0;
-	int16 WriteWin = 0;
-	uint32 WinSize = 0;
-	int16 Page[20] = { 0 };
-	int16 PageAnz = 0;
-	uint16 WriteSeg = 0;
-	uint16 CallSeg = 0;
-	uint16 CallOff = 0;
-	uint32 ScreenSize = 0;
-	uint32 CopyRest = 0;
-	char dummy[10] = { 0 };
-};
-
-struct VesaStatusBlock {
-	uint8 id[4] = { 0 };
-	uint8 ver_low = 0;
-	uint8 ver_high = 0;
-	char *name = nullptr;
-	uint32 lflag = 0;
-	uint16 *codenrs = nullptr;
-
-	uint16 memory = 0;
-
-	char *SoftwareRev = nullptr;
-	char *VendorName = nullptr;
-	char *ProductName = nullptr;
-	char *ProductRev = nullptr;
-	char dummy[222] = { 0 };
-	char OemData[256] = { 0 };
-};
-
-struct VesaModusBlock {
-	uint16 mflag = 0;
-	uint8 fw_flag = 0;
-	uint8 fs_flag = 0;
-
-	uint16 stepgr = 0;
-	uint16 wsize = 0;
-	uint16 fw_seg = 0;
-	uint16 fs_seg = 0;
-	void (*page_set)(int16 page) = nullptr;
-	uint16 scr_width = 0;
-	uint16 x_charsize = 0;
-	uint16 y_charsize = 0;
-	uint8 x_charwidth = 0;
-	uint8 y_charwidth = 0;
-	uint8 planes = 0;
-	uint8 bppix = 0;
-	uint8 memblks = 0;
-	uint8 model = 0;
-	uint8 blksize = 0;
-	char dummy[100] = { 0 };
-};
-
 struct IogInit {
 	char id[4] = { 0 };
 	char save_path[30] = { 0 };
@@ -268,28 +183,6 @@ struct IogInit {
 	int16 delay = 0;
 };
 
-struct IotInit {
-	int16 popx = 0;
-	int16 popy = 0;
-	char *m_col = nullptr;
-	char fname[81] = { 0 };
-	uint8 f1 = 0;
-	uint8 f2 = 0;
-	uint8 f3 = 0;
-	uint8 abbruch = 0;
-
-	int16(*save_funktion)(char *fname) = nullptr;
-	int16(*load_funktion)(char *fname) = nullptr;
-	int16 delay = 0;
-};
-
-struct MemInfoBlk {
-	uint32 size = 0;
-	uint32 akt_size = 0;
-	uint32 biggest_block = 0;
-	uint32 start = 0;
-};
-
 struct GedPoolHeader {
 	char Id[4] = { 0 };
 	int16 Anz = 0;
@@ -306,13 +199,6 @@ struct GedChunkHeader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct GedHeader {
-	char Id[4] = { 0 };
-	int16 X = 0;
-	int16 Y = 0;
-	uint32 Len = 0;
-};
-
 struct CurBlk {
 	int16 page_off_x = 0;
 	int16 page_off_y = 0;


Commit: 5d6fd6de1a567c3a0665e4ee3990e5f60566ee2b
    https://github.com/scummvm/scummvm/commit/5d6fd6de1a567c3a0665e4ee3990e5f60566ee2b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY:Add missing va_end(), add on TODO in devices()

Changed paths:
    engines/chewy/mcga_graphics.cpp


diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 2b513557f6f..4d28f751095 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -142,9 +142,8 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16 frames) {
 	if (_mono)
 		calc_mono(palette, startcol, anz);
-	int16 endcol = startcol + anz;
 	for (int16 j = stufen; j >= 0; j--) {
-		endcol = startcol + anz;
+		int16 endcol = startcol + anz;
 		int16 k = startcol * 3;
 		for (int16 i = startcol; i < endcol; i++) {
 			int16 r = _palTable[k];
@@ -259,9 +258,9 @@ void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1, int16 col1, int
 }
 
 void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 a = 0, b = 0, alt = 0;
+	int16 b = 0, alt = 0;
 	for (int16 w = 0; w <= 91; w++) {
-		a = (int16)(_sines[w] * ((float)r * 0.85));
+		int16 a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
 			int16 diff = a - alt;
 			for (int16 i = 0; i <= diff; i++) {
@@ -281,9 +280,9 @@ void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
 }
 
 void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 a = 0, b = 0, alt = 0, i = 0, diff;
+	int16 b = 0, alt = 0, i = 0, diff;
 	for (int16 w = 0; w <= 90; w++) {
-		a = (int16)(_sines[w] * ((float)r * 0.85));
+		int16 a = (int16)(_sines[w] * ((float)r * 0.85));
 		if ((a - alt) > 1) {
 			diff = a - alt;
 			for (i = 0; i < diff; i++) {
@@ -495,6 +494,9 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 					charstr = va_arg(parptr, char *);
 					strcpy(zstring, charstr);
 					break;
+
+				default:
+					break;
 				}
 
 				zeichen = string[i];
@@ -789,6 +791,7 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 
 	g_events->setKbdInfo(kb_old);
 
+	va_end(parptr);
 	return ret;
 }
 
@@ -933,6 +936,7 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 			}
 		}
 	} while ((i < MAXSTRING) && (nextChar != 0));
+	va_end(parptr);
 }
 
 void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string) {
@@ -1079,10 +1083,14 @@ void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth, const char *s
 
 					break;
 
+				default:
+					break;
 				}
 			}
 		}
 	} while ((i < MAXSTRING) && (zeichen != 0));
+
+	va_end(parptr);
 }
 
 void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
@@ -1221,6 +1229,7 @@ void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 me
 			}
 		}
 	}
+	va_end(parptr);
 }
 
 void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
@@ -1331,6 +1340,7 @@ void McgaGraphics::exit_mausmode() {
 int16 McgaGraphics::devices() {
 	int16 i = 0;
 	if (_mausMode != false) {
+		// TODO: This is wrong. 'i' should be initialized to "button status" (BX after a call to Int33h/03
 		if (i > 1) {
 			i = 27;
 		} else if (i == 1)


Commit: a805e557591115f64b2f8cb9c32a52caee4bb941
    https://github.com/scummvm/scummvm/commit/a805e557591115f64b2f8cb9c32a52caee4bb941
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:39-08:00

Commit Message:
CHEWY: Remove file function wrappers

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/file.cpp
    engines/chewy/file.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 58cc9079bad..a6071fb278d 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -299,14 +299,14 @@ void Atdsys::set_split_win(int16 nr, SplitStringInit *ssinit) {
 }
 
 Stream *Atdsys::pool_handle(const char *fname) {
-	Stream *handle = chewy_fopen(fname);
-	if (handle) {
-		_atdshandle[ATDS_HANDLE] = handle;
+	Common::File *f = new Common::File();
+	f->open(fname);
+	if (f->isOpen()) {
+		_atdshandle[ATDS_HANDLE] = f;
 	} else {
 		error("Error reading from %s", fname);
 	}
-
-	return handle;
+	return f;
 }
 
 void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chunk_start, int16 chunk_anz) {
@@ -348,10 +348,11 @@ void Atdsys::open_handle(const char *fname, int16 mode) {
 
 	if (mode != INV_IDX_DATEI)
 		tmp_adr = atds_adr(fname, 0, 20000);
-	Stream *stream = chewy_fopen(fname);
-	if (stream) {
+	Common::File *f = new Common::File();
+	f->open(fname);
+	if (f->isOpen()) {
 		close_handle(mode);
-		_atdshandle[mode] = stream;
+		_atdshandle[mode] = f;
 		_atdsmem[mode] = tmp_adr;
 
 		switch (mode) {
@@ -374,7 +375,8 @@ void Atdsys::open_handle(const char *fname, int16 mode) {
 void Atdsys::close_handle(int16 mode) {
 	Stream *stream = _atdshandle[mode];
 	if (stream) {
-		chewy_fclose(_atdshandle[mode]);
+		delete _atdshandle[mode];
+		_atdshandle[mode] = nullptr;
 
 		for (int i = 0; i < MAX_HANDLE; ++i) {
 			if (_atdshandle[i] == stream)
diff --git a/engines/chewy/file.cpp b/engines/chewy/file.cpp
index c2a7d38441b..68a0c582db8 100644
--- a/engines/chewy/file.cpp
+++ b/engines/chewy/file.cpp
@@ -27,18 +27,6 @@
 
 namespace Chewy {
 
-static const byte IO_PAL1[7] = { 11, 60, 14, 2, 1, 5, 4 };
-
-Common::File *File::open(const char *name) {
-	Common::File *f = new Common::File();
-	if (f->open(name)) {
-		return f;
-	} else {
-		delete f;
-		return nullptr;
-	}
-}
-
 bool File::readArray(Common::SeekableReadStream *src, uint16 *arr, size_t size) {
 	Common::SeekableReadStream *rs = src->readStream(size * 2);
 
diff --git a/engines/chewy/file.h b/engines/chewy/file.h
index 45b4671950b..6ca8ddcca63 100644
--- a/engines/chewy/file.h
+++ b/engines/chewy/file.h
@@ -32,12 +32,6 @@ using Common::Stream;
 
 class File {
 public:
-	/**
-	 * Opens up a file, returning it if successful,
-	 * or nullptr if not
-	 */
-	static Common::File *open(const char *name);
-
 	/**
 	 * Reads an array of uint16 values
 	 */
@@ -45,16 +39,6 @@ public:
 		uint16 *arr, size_t size);
 };
 
-
-inline Stream *chewy_fopen(const char *fname) {
-	return File::open(fname);
-}
-
-inline void chewy_fclose(Stream *&stream) {
-	delete stream;
-	stream = nullptr;
-}
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index e2cbc1e1517..1e51b814123 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -936,7 +936,8 @@ void flic_cut(int16 nr) {
 	g_engine->_sound->stopAllSounds();
 	g_events->delay(50);
 //#ifndef NEW_VIDEO_CODE
-	Common::File *f = File::open("cut/cut.tap");
+	Common::File *f = new Common::File();
+	f->open("cut/cut.tap");
 	_G(Ci).Handle = f;
 //#endif
 
@@ -1681,7 +1682,8 @@ void flic_cut(int16 nr) {
 			break;
 		}
 
-		chewy_fclose(_G(Ci).Handle);
+		delete _G(Ci).Handle;
+		_G(Ci).Handle = nullptr;
 	} else {
 		error("flic_cut error");
 	}
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 21b56c033ea..bfa3d469aff 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -155,15 +155,17 @@ Room::Room() {
 Room::~Room() {
 	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
 		if (_roomHandle[i])
-			chewy_fclose(_roomHandle[i]);
+			delete _roomHandle[i];
 	free_ablage();
 }
 
 Stream *Room::open_handle(const char *fname1, int16 mode) {
-	Stream *stream = chewy_fopen(fname1);
-	if (stream) {
-		close_handle(mode);
-		_roomHandle[mode] = stream;
+	Common::File *f = new Common::File();
+	f->open(fname1);
+	if (f->isOpen()) {
+		if (_roomHandle[mode])
+			delete _roomHandle[mode];
+		_roomHandle[mode] = f;
 	} else {
 		error("open_handle error");
 	}
@@ -171,11 +173,6 @@ Stream *Room::open_handle(const char *fname1, int16 mode) {
 	return _roomHandle[mode];
 }
 
-void Room::close_handle(int16 mode) {
-	if (_roomHandle[mode])
-		chewy_fclose(_roomHandle[mode]);
-}
-
 void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	clear_prog_ani();
 	_G(det)->load_rdi(Rb->DetFile, room_nr);
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 151c2a16fc0..990156af9f3 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -85,7 +85,6 @@ public:
 	~Room();
 
 	Stream *open_handle(const char *fname, int16 mode);
-	void close_handle(int16 mode);
 	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
 	byte *get_ablage(int16 nr);


Commit: cd7de90e42c77a5bdaf03717482b557dcfe516ee
    https://github.com/scummvm/scummvm/commit/cd7de90e42c77a5bdaf03717482b557dcfe516ee
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Remove stubbed mouse speed code

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/room.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index bf635925cf5..a3185317337 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -125,8 +125,6 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
 		_G(obj)->sort();
 
-		set_speed();
-
 		for (int i = 0; i < MAX_PERSON; i++) {
 			set_person_pos(_G(spieler).X[i], _G(spieler).Y[i], i, _G(spieler).Phase[i]);
 		}
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index dd3ffed2eaf..37e9af4b34e 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -132,7 +132,6 @@ void Inventory::menu() {
 	int16 taste_flag;
 	int16 i, k;
 	int16 abfrage;
-	int16 tmp, tmp1;
 	int16 disp_tmp;
 	int16 ret_look;
 	int16 ani_tmp;
@@ -146,12 +145,6 @@ void Inventory::menu() {
 	_G(flags).AutoAniPlay = true;
 	_G(flags).StopAutoObj = true;
 	_G(menu_display) = 0;
-	tmp = _G(spieler).MausSpeed;
-	if (tmp > 3) {
-		tmp1 = tmp - 2;
-	} else
-		tmp1 = tmp;
-	_G(in)->speed(tmp1, tmp1 * 2);
 	_G(cur)->move(152, 92);
 	_G(minfo).x = 152;
 	_G(minfo).y = 92;
@@ -402,7 +395,6 @@ void Inventory::menu() {
 		_G(out)->back2screen(_G(workpage));
 	}
 
-	_G(in)->speed(tmp, tmp * 2);
 	_G(flags).InventMenu = false;
 	_G(flags).AutoAniPlay = ani_tmp;
 	_G(spieler).DispFlag = disp_tmp;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index b899806548f..5911397094b 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -399,8 +399,6 @@ void init_load();
 
 void var_init();
 
-void set_speed();
-
 void new_game();
 void sound_init();
 void sound_exit();
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 73f901386aa..5c91b61eb91 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -124,7 +124,6 @@ void var_init() {
 	_G(spieler).MainMenuY = MENU_Y;
 	_G(spieler).DispFlag = true;
 	_G(spieler).AkInvent = -1;
-	_G(spieler).MausSpeed = 6;
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).ScrollyStep = 1;
 
@@ -352,10 +351,6 @@ void tidy() {
 	_G(mem) = nullptr;
 }
 
-void set_speed() {
-	_G(in)->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
-}
-
 #define GRAVIS 8
 #define RAP10 9
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 35860c8252c..cec93b26cb9 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -41,10 +41,6 @@ void set_old_kb_handler() {
 	g_events->setKbdInfo(nullptr);
 }
 
-void set_mouse_handler(MouseInfo *mpos) {
-	// No implementation in ScummVM
-}
-
 InputMgr::InputMgr() {
 	_mouseInfoBlk = nullptr;
 	_kbInfoBlk = nullptr;
@@ -58,10 +54,6 @@ int InputMgr::init() {
 	return 3;
 }
 
-void InputMgr::speed(int16 x, int16 y) {
-	// Changing mouse speed isn't supported in ScummVM
-}
-
 void InputMgr::move_mouse(int16 x, int16 y) {
 	g_events->warpMouse(Common::Point(x, y));
 }
@@ -97,7 +89,6 @@ void InputMgr::alter_kb_handler() {
 }
 
 void InputMgr::neuer_maushandler(MouseInfo *mpos) {
-	set_mouse_handler(mpos);
 	_mouseInfoBlk = mpos;
 }
 
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 64fe6cb069e..2c2c2a238d2 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -29,8 +29,6 @@ namespace Chewy {
 void set_new_kb_handler(KbdInfo *key);
 void set_old_kb_handler();
 
-void set_mouse_handler(MouseInfo *mpos);
-
 extern bool mouse_links_los;
 extern bool mouse_active;
 extern bool cur_move;
@@ -41,7 +39,6 @@ public:
 	~InputMgr();
 
 	int init();
-	void speed(int16 x, int16 y);
 	void move_mouse(int16 x, int16 y);
 	void rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax);
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index bfa3d469aff..e2678b46d2f 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -144,7 +144,6 @@ void JungleRoom::setup_func() {
 	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
-
 Room::Room() {
 	_roomTimer.TimerAnz = 0;
 	_roomTimer.TimerStart = 0;
@@ -152,6 +151,7 @@ Room::Room() {
 	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
 		_roomHandle[i] = 0;
 }
+
 Room::~Room() {
 	for (int16 i = 0; i < MAX_ROOM_HANDLE; i++)
 		if (_roomHandle[i])
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index ce8acb774f1..84464f05a9d 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -95,7 +95,8 @@ bool Spieler::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(scrolly);
 	s.syncAsSint16LE(ScrollxStep);
 	s.syncAsSint16LE(ScrollyStep);
-	s.syncAsSint16LE(MausSpeed);
+	int16 mouseSpeed = 6;
+	s.syncAsSint16LE(mouseSpeed);
 	s.syncAsSint16LE(DelaySpeed);
 	s.syncAsSint16LE(AadDelay);
 	s.syncAsSint16LE(AadSilent);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index f2d013801be..37039e959ed 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -430,7 +430,6 @@ struct Spieler : public SpielerFlags {
 	int16 scrolly = 0;
 	int16 ScrollxStep = 0;
 	int16 ScrollyStep = 0;
-	int16 MausSpeed = 0;
 	int16 DelaySpeed = 0;
 	int16 AadDelay = 0;
 	int16 AadSilent = 0;


Commit: e93c5f0928903018170719c133b42fe03d8246f3
    https://github.com/scummvm/scummvm/commit/e93c5f0928903018170719c133b42fe03d8246f3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Remove unused variable in Cinema::Execute

Changed paths:
    engines/chewy/dialogs/cinema.cpp


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 014227a877d..3785b4a94c1 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -43,7 +43,6 @@ static const uint8 CINEMA_FLICS[35] = {
 };
 
 void Cinema::execute() {
-	int timer_nr = 0;
 	int16 txt_anz = 0;
 	int topIndex = 0;
 	int selected = -1;
@@ -63,12 +62,11 @@ void Cinema::execute() {
 	_G(kbinfo).scan_code = 0;
 
 	for (bool endLoop = false; !endLoop;) {
-		timer_nr = 0;
 		_G(out)->set_pointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
-			// Render cutscene list
+			// Render cut-scene list
 			for (int i = 0; i < CINEMA_LINES; ++i) {
 				char *csName = _G(atds)->ats_get_txt(546 + i + topIndex,
 					0, &txt_anz, 1);
@@ -79,7 +77,7 @@ void Cinema::execute() {
 				_G(out)->printxy(40, yp, 14, 300, 0, "%s", csName);
 			}
 		} else {
-			// No cutscenes seen yet
+			// No cut-scene seen yet
 			char *none = _G(atds)->ats_get_txt(545, 0, &txt_anz, 1);
 			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), none);
 		}
@@ -89,18 +87,16 @@ void Cinema::execute() {
 			switch (_G(in)->maus_vector(_G(minfo).x, _G(minfo).y, CINEMA_TBL, 3)) {
 			case 0:
 				_G(kbinfo).scan_code = Common::KEYCODE_UP;
-				if (!endLoop) {
+				if (!endLoop)
 					endLoop = true;
-					timer_nr = 5;
-				}
+
 				break;
 
 			case 1:
 				_G(kbinfo).scan_code = Common::KEYCODE_DOWN;
-				if (!endLoop) {
+				if (!endLoop)
 					endLoop = true;
-					timer_nr = 5;
-				}
+
 				break;
 
 			case 2:
@@ -120,7 +116,6 @@ void Cinema::execute() {
 			flag = true;
 		} else if (_G(minfo).button != 1) {
 			flag = false;
-			timer_nr = 0;
 			delay = 0;
 		} else if (flag) {
 			g_events->update(true);
@@ -213,10 +208,9 @@ int16 Cinema::cut_serv(int16 frame) {
 		_G(sndPlayer)->stopMod();
 		g_engine->_sound->stopAllSounds();
 		return -1;
-
-	} else {
-		return 0;
 	}
+
+	return 0;
 }
 
 } // namespace Dialogs


Commit: e3f5e5ae44ee1bb666d7c7ef880feabf0434e75c
    https://github.com/scummvm/scummvm/commit/e3f5e5ae44ee1bb666d7c7ef880feabf0434e75c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Rename Display enum

Changed paths:
    engines/chewy/atds.h
    engines/chewy/sound.cpp
    engines/chewy/sound.h


diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 3beb5daa931..c661adb85dd 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -50,7 +50,7 @@ namespace Chewy {
 #define INV_ATS_HANDLE 6
 #define ATDS_HANDLE 7
 
-enum Display {
+enum DisplayMode {
 	DISPLAY_TXT = 0,
 	DISPLAY_VOC = 1,
 	DISPLAY_ALL = 2
@@ -114,7 +114,7 @@ struct AtdsVar {
 	int16 *Delay = 0;
 	int16 DiaNr = 0;
 
-	Display Display = DISPLAY_TXT;
+	DisplayMode Display = DISPLAY_TXT;
 	bool _eventsEnabled = false;
 	int16 VocNr = 0;
 
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index b23e2807365..8c39b76bdc7 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -280,7 +280,7 @@ void Sound::waitForSpeechToFinish() {
 	}
 }
 
-Display Sound::getSpeechSubtitlesMode() const {
+DisplayMode Sound::getSpeechSubtitlesMode() const {
 	if (!ConfMan.getBool("subtitles"))
 		return DISPLAY_VOC;
 	else if (!ConfMan.getBool("speech_mute"))
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index 5057baac52f..f2d3a991ca3 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -73,7 +73,7 @@ public:
 	/**
 	 * Returns the speech, subtitles mode from the ScummVM config
 	 */
-	Display getSpeechSubtitlesMode() const;
+	DisplayMode getSpeechSubtitlesMode() const;
 
 private:
 	Audio::Mixer *_mixer;


Commit: 8853eaba2c1985d597ac4f1065c659414aac960c
    https://github.com/scummvm/scummvm/commit/8853eaba2c1985d597ac4f1065c659414aac960c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Fix some more CppCheck warnings, some renaming

Changed paths:
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/inventory.h
    engines/chewy/dialogs/options.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/rooms/room04.cpp


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 3785b4a94c1..d497d00031e 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -84,7 +84,7 @@ void Cinema::execute() {
 
 		if (_G(minfo).button == 1 && !flag) {
 			flag = true;
-			switch (_G(in)->maus_vector(_G(minfo).x, _G(minfo).y, CINEMA_TBL, 3)) {
+			switch (_G(in)->mouseVector(_G(minfo).x, _G(minfo).y, CINEMA_TBL, 3)) {
 			case 0:
 				_G(kbinfo).scan_code = Common::KEYCODE_UP;
 				if (!endLoop)
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 1357525f637..6018001d43a 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -55,10 +55,7 @@ int16 Files::execute(bool isInGame) {
 	int16 mode[9];
 	bool visibility[8];
 	int16 ret = 0;
-	char *fnames;
-	char *tmp;
-	int16 text_off, active_slot;
-	int16 rect, line;
+	int16 line;
 	bool flag = false;
 
 	if (!ConfMan.getBool("original_menus")) {
@@ -75,7 +72,7 @@ int16 Files::execute(bool isInGame) {
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 	_G(out)->set_pointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
-	fnames = _G(iog)->io_init(&_G(ioptr));
+	char *fnames = _G(iog)->io_init(&_G(ioptr));
 	fnames += 1;
  
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
@@ -97,8 +94,8 @@ int16 Files::execute(bool isInGame) {
 		mode[W8] = 0;
 	}
 
-	text_off = 0;		// Top visible save slot
-	active_slot = 0;	// Currently selected slot
+	int16 text_off = 0;		// Top visible save slot
+	int16 active_slot = 0;	// Currently selected slot
 
 	while (key != Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		// Draw the dialog background
@@ -120,7 +117,7 @@ int16 Files::execute(bool isInGame) {
 		}
 
 		// Write the list of savegame slots
-		tmp = fnames + (text_off * 40);
+		char *tmp = fnames + (text_off * 40);
 		for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
 			if (i != active_slot) {
 				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
@@ -169,7 +166,7 @@ int16 Files::execute(bool isInGame) {
 		}
 
 		if (!flag && _G(minfo).button == 1) {
-			rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
+			int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
 			flag = true;
 			key = 0;
 
@@ -207,6 +204,9 @@ int16 Files::execute(bool isInGame) {
 			case 7:
 				key = Common::KEYCODE_F5;
 				break;
+
+			default:
+				break;
 			}
 
 		} else if (flag && _G(minfo).button == 0) {
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 37e9af4b34e..b27567cdc30 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -50,26 +50,23 @@ int Inventory::keyVal;
 
 
 void Inventory::plot_menu() {
-	int16 i, j, k;
-	int16 *xy;
-	int16 x, y;
-	int16 x1, y1;
 	_G(out)->set_pointer(_G(workptr));
 	build_menu(WIN_INVENTAR);
 
-	for (j = 0; j < 3; j++) {
-		for (i = 0; i < 5; i++)
+	for (int16 j = 0; j < 3; j++) {
+		for (int16 i = 0; i < 5; i++)
 			_G(out)->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
 				WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
 	}
 
-	k = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+	int16 y;
+	int16 k = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 	if (k != -1) {
 		if (k < 5)
 			_G(out)->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
 				INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
 		else {
-			x = (_G(minfo).x - (WIN_INF_X)) / 54;
+			int16 x = (_G(minfo).x - (WIN_INF_X)) / 54;
 			y = (_G(minfo).y - (WIN_INF_Y + 4 + 30)) / 30;
 			k = x + (y * 5);
 			k += _G(spieler).InventY * 5;
@@ -86,7 +83,7 @@ void Inventory::plot_menu() {
 			WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
 	}
 
-	for (i = 0; i < 2; i++) {
+	for (int16 i = 0; i < 2; i++) {
 		_G(ani_invent_delay)[i][0] -= 1;
 		if (_G(ani_invent_delay)[i][0] <= 0) {
 			_G(ani_invent_delay)[i][0] = _G(ani_invent_delay)[i][1];
@@ -104,19 +101,19 @@ void Inventory::plot_menu() {
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
-	for (i = 0; i < 2; i++) {
+	for (int16 i = 0; i < 2; i++) {
 		_G(out)->sprite_set(_G(menutaf)->image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
 	y = WIN_INF_Y + 6 + 30;
-	for (j = 0; j < 3; j++) {
-		for (i = 0; i < 5; i++) {
+	for (int16 j = 0; j < 3; j++) {
+		for (int16 i = 0; i < 5; i++) {
 			if (_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i] != -1) {
-				xy = (int16 *)_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
-				x1 = 40 - xy[0];
+				int16 *xy = (int16 *)_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]];
+				int16 x1 = 40 - xy[0];
 				x1 /= 2;
-				y1 = 24 - xy[1];
+				int16 y1 = 24 - xy[1];
 				y1 /= 2;
 				_G(out)->sprite_set(_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 					x1 + WIN_INF_X + 14 + i * 54,
@@ -127,21 +124,11 @@ void Inventory::plot_menu() {
 }
 
 void Inventory::menu() {
-	int16 menu_flag1;
-	int16 maus_flag;
-	int16 taste_flag;
-	int16 i, k;
-	int16 abfrage;
-	int16 disp_tmp;
-	int16 ret_look;
-	int16 ani_tmp;
-	int16 menu_first;
-
 	keyVal = 0;
 	_G(flags).InventMenu = true;
-	disp_tmp = _G(spieler).DispFlag;
+	int16 disp_tmp = _G(spieler).DispFlag;
 	_G(spieler).DispFlag = false;
-	ani_tmp = _G(flags).AutoAniPlay;
+	int16 ani_tmp = _G(flags).AutoAniPlay;
 	_G(flags).AutoAniPlay = true;
 	_G(flags).StopAutoObj = true;
 	_G(menu_display) = 0;
@@ -158,29 +145,29 @@ void Inventory::menu() {
 		cursor_wahl(CUR_USE);
 	}
 
-	menu_flag1 = MENU_EINBLENDEN;
-	taste_flag = 28;
+	int16 menu_flag1 = MENU_EINBLENDEN;
+	int16 taste_flag = 28;
 	_G(kbinfo).key_code = '\0';
-	maus_flag = 1;
+	bool mouseFl = true;
 
-	for (i = 0; i < 3; i++) {
+	for (int16 i = 0; i < 3; i++) {
 		_G(ani_invent_delay)[i][0] = 30000;
 		_G(ani_count)[i] = _G(ani_invent_anf)[i];
 	}
 
-	ret_look = -1;
-	menu_first = false;
+	int16 ret_look = -1;
+	int16 menu_first = false;
 	_G(show_invent_menu) = 1;
 
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
 		if (!_G(minfo).button)
-			maus_flag = 0;
+			mouseFl = false;
 		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN || keyVal) {
-			if (!maus_flag) {
-				maus_flag = 1;
+			if (!mouseFl) {
+				mouseFl = true;
 				_G(kbinfo).key_code = '\0';
 
-				k = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
+				int16 k = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 				if (keyVal == Common::KEYCODE_F1)
 					k = 0;
 				else if (keyVal == Common::KEYCODE_F2)
@@ -267,9 +254,9 @@ void Inventory::menu() {
 				}
 			}
 		} else if (_G(minfo).button == 2 || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE) {
-			if (!maus_flag) {
+			if (!mouseFl) {
 				_G(in)->_hotkey = Common::KEYCODE_ESCAPE;
-				maus_flag = 1;
+				mouseFl = true;
 			}
 		}
 
@@ -282,13 +269,13 @@ void Inventory::menu() {
 				cursor_wahl(CUR_AK_INVENT);
 		} else if (ret_look == 5) {
 			taste_flag = false;
-			maus_flag = 0;
+			mouseFl = false;
 			_G(minfo).button = 1;
 			keyVal = Common::KEYCODE_RETURN;
 		}
 
 		ret_look = -1;
-		abfrage = _G(in)->get_switch_code();
+		int16 abfrage = _G(in)->get_switch_code();
 		_G(cur)->hide_cur();
 
 		if (taste_flag) {
@@ -312,7 +299,7 @@ void Inventory::menu() {
 						set_up_screen(NO_SETUP);
 						inv_rand_x = -1;
 						inv_rand_y = -1;
-						Dialogs::Inventory::plot_menu();
+						plot_menu();
 						_G(cur)->plot_cur();
 						_G(out)->back2screen(_G(workpage));
 					}
@@ -369,7 +356,7 @@ void Inventory::menu() {
 			if (menu_flag1 != MENU_AUSBLENDEN) {
 				inv_rand_x = -1;
 				inv_rand_y = -1;
-				Dialogs::Inventory::plot_menu();
+				plot_menu();
 			}
 			if (menu_flag1 == false)
 				_G(cur)->plot_cur();
@@ -403,23 +390,17 @@ void Inventory::menu() {
 }
 
 int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
-	int16 ende;
-	int16 txt_start;
 	int16 txt_anz = 0;
-	int16 maus_flag;
-	int16 i, k;
-	int16 ret;
 	int16 xoff = 0;
 	int16 yoff = 0;
 	int16 txt_zeilen = 0;
-	int16 rect;
 	char *txt_adr = nullptr;
 	char *txt_name_adr = nullptr;
 	char c[2] = { 0 };
-	ret = -1;
-	ende = 0;
-	txt_start = 0;
-	maus_flag = 1;
+	int16 ret = -1;
+	bool endLoop = false;
+	int16 txt_start = 0;
+	bool mouseFl = true;
 
 	if (mode == INV_ATS_MODE) {
 		_G(atds)->load_atds(invent_nr, INV_ATS_DATEI);
@@ -441,29 +422,29 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 			txt_adr = _G(atds)->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
 		}
 		if (!txt_adr) {
-			ende = 1;
+			endLoop = true;
 		}
 	} else {
-		ende = 1;
+		endLoop = true;
 	}
 
-	while (!ende) {
-		rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
+	while (!endLoop) {
+		int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 
 		if (_G(minfo).button) {
 			if (_G(minfo).button == 2) {
-				if (!maus_flag)
+				if (!mouseFl)
 					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 			} else if (_G(minfo).button == 1) {
-				if (!maus_flag) {
+				if (!mouseFl) {
 					switch (rect) {
 					case 0:
-						ende = 1;
+						endLoop = true;
 						ret = 0;
 						break;
 
 					case 1:
-						ende = 1;
+						endLoop = true;
 						ret = 1;
 						break;
 
@@ -479,7 +460,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 					case 5:
 						ret = 5;
-						ende = 1;
+						endLoop = true;
 						break;
 
 					default:
@@ -488,9 +469,9 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 				}
 			}
 
-			maus_flag = 1;
+			mouseFl = true;
 		} else {
-			maus_flag = 0;
+			mouseFl = false;
 		}
 
 		switch (_G(kbinfo).scan_code) {
@@ -503,7 +484,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 			break;
 
 		case Common::KEYCODE_ESCAPE:
-			ende = 1;
+			endLoop = true;
 			break;
 
 		case Common::KEYCODE_UP:
@@ -522,7 +503,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
-		Dialogs::Inventory::plot_menu();
+		plot_menu();
 		_G(out)->set_fontadr(_G(font8x8));
 		_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
 
@@ -552,8 +533,8 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 			}
 		}
 
-		k = 0;
-		for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
+		int16 k = 0;
+		for (int16 i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
 				_G(scr_width), "%s", _G(txt)->str_pos(txt_adr, i));
 			++k;
@@ -566,7 +547,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 		set_up_screen(NO_SETUP);
-		Dialogs::Inventory::plot_menu();
+		plot_menu();
 		_G(cur)->plot_cur();
 		_G(out)->back2screen(_G(workpage));
 		SHOULD_QUIT_RETURN0;
@@ -607,6 +588,8 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 					m_mode = TXT_MARK_TALK;
 					break;
 
+				default:
+					break;
 				}
 
 				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
@@ -629,53 +612,44 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 	}
 }
 
-int16 Inventory::calc_use_invent(int16 inv_nr) {
-	int16 ret_val;
-	int16 ret;
-	ret_val = false;
+bool Inventory::calc_use_invent(int16 invNr) {
+	bool retVal = false;
 
 	if (_G(menu_item) == CUR_LOOK) {
-		switch (inv_nr) {
+		switch (invNr) {
 		case ZEITUNG_INV:
 			Rooms::Room44::look_news();
 			break;
 
 		case CUTMAG_INV:
 			_G(show_invent_menu) = 2;
-			ret_val = true;
+			retVal = true;
 			Rooms::Room58::look_cut_mag(58);
 			break;
 
 		case SPARK_INV:
 			_G(show_invent_menu) = 2;
-			ret_val = true;
+			retVal = true;
 			save_person_rnr();
 			Rooms::Room58::look_cut_mag(60);
 			break;
 
 		case DIARY_INV:
 			showDiary();
-			ret_val = true;
-			break;
-
-		default:
-			break;
-		}
-	} else if (_G(menu_item) == CUR_USE) {
-		switch (inv_nr) {
-		case GBUCH_INV:
-			ret = del_invent_slot(GBUCH_INV);
-			_G(spieler).InventSlot[ret] = GBUCH_OPEN_INV;
-			_G(obj)->changeInventory(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
-			ret_val = true;
+			retVal = true;
 			break;
 
 		default:
 			break;
 		}
+	} else if (_G(menu_item) == CUR_USE && invNr == GBUCH_INV) {
+		int16 id = del_invent_slot(GBUCH_INV);
+		_G(spieler).InventSlot[id] = GBUCH_OPEN_INV;
+		_G(obj)->changeInventory(GBUCH_INV, GBUCH_OPEN_INV, &_G(room_blk));
+		retVal = true;
 	}
 
-	return ret_val;
+	return retVal;
 }
 
 void Inventory::showDiary() {
@@ -705,7 +679,7 @@ void Inventory::showDiary() {
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
-	Dialogs::Inventory::plot_menu();
+	plot_menu();
 	_G(out)->set_pointer(nullptr);
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
diff --git a/engines/chewy/dialogs/inventory.h b/engines/chewy/dialogs/inventory.h
index 2be3976098c..ab5c34f7ddb 100644
--- a/engines/chewy/dialogs/inventory.h
+++ b/engines/chewy/dialogs/inventory.h
@@ -33,7 +33,7 @@ private:
 	static int16 inv_rand_y;
 	static int keyVal;
 
-	static int16 calc_use_invent(int16 inv_nr);
+	static bool calc_use_invent(int16 invNr);
 	static void showDiary();
 public:
 	static void plot_menu();
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 2e4412defd8..d34866f0938 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -148,7 +148,8 @@ void Options::execute(TafInfo *ti) {
 		key = _G(in)->get_switch_code();
 		if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
-				int16 rect = _G(in)->maus_vector(_G(minfo).x, _G(minfo).y, OPTION_ICONS, 9);
+
+			int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, OPTION_ICONS, 9);
 			switch (rect) {
 			case 0:
 				if (_G(spieler).FramesPerSecond > 6)
@@ -200,6 +201,9 @@ void Options::execute(TafInfo *ti) {
 				_G(spieler).MusicVol = (136 - _G(minfo).y) << 1;
 				g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
 				break;
+
+			default:
+				break;
 			}
 			_G(minfo).button = 0;
 		}
@@ -220,6 +224,9 @@ void Options::execute(TafInfo *ti) {
 		case Common::KEYCODE_RIGHT:
 			_G(cur)->move(++_G(minfo).x, _G(minfo).y);
 			break;
+
+		default:
+			break;
 		}
 
 		_G(cur)->plot_cur();
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index cec93b26cb9..ff2fc838d09 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -62,7 +62,7 @@ void InputMgr::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
 	// Mouse clip rectangle isn't supported in ScummVM
 }
 
-int16 InputMgr::maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz) {
+int16 InputMgr::mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 	int16 i = -1;
 	for (int16 j = 0; (j < anz * 4) && (i == -1); j += 4) {
 		if ((x >= tbl[j]) && (x <= tbl[j + 2]) && (y >= tbl[j + 1]) && (y <= tbl[j + 3]))
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 2c2c2a238d2..93b2653f9e1 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -45,7 +45,7 @@ public:
 	void neuer_kb_handler(KbdInfo *key);
 	void alter_kb_handler();
 	void neuer_maushandler(MouseInfo *mpos);
-	int16 maus_vector(int16 x, int16 y, const int16 *tbl, int16 anz);
+	int16 mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
 	KbdMouseInfo *get_in_zeiger();
 	int16 get_switch_code();
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 2c2cf7b5749..e250d187094 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -61,7 +61,7 @@ int16 Room4::sonde_comp() {
 	while (!ende) {
 		maus_action();
 		if (_G(maus_links_click)) {
-			switch (_G(in)->maus_vector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
+			switch (_G(in)->mouseVector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
 				if (cur_x > 0)
 					--cur_x;


Commit: 03e3b2a8f9316ef5bd29fc0113fdb149aa0b390f
    https://github.com/scummvm/scummvm/commit/03e3b2a8f9316ef5bd29fc0113fdb149aa0b390f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Fix speech num after looking at pillow twice

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index a6071fb278d..0d6482f6177 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -772,7 +772,8 @@ void Atdsys::ats_search_nr(int16 txt_nr, char **str) {
 			*str = start_str + 2 + AtsTxtHeader::SIZE();
 
 			if (_atsv.TxtMode) {
-				Common::MemoryReadStream rs2((const byte *)*str, AtsStrHeader::SIZE());
+				Common::MemoryReadStream rs2((const byte *)*str,
+					AtsStrHeader::SIZE());
 				_atsv.StrHeader.load(&rs2);
 			}
 
@@ -842,6 +843,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str)
 					*status = count;
 					*str = start_str;
 					start_str -= AtsStrHeader::SIZE();
+
 					if (_atsv.TxtMode != TXT_MARK_NAME) {
 						Common::MemoryReadStream rs((const byte *)start_str,
 							AtsStrHeader::SIZE());
@@ -849,8 +851,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str)
 					}
 				} else {
 					++count;
-
-					tmp_str += AtsStrHeader::SIZE();
+					tmp_str += AtsStrHeader::SIZE() + 2;
 					start_str = tmp_str + 1;
 				}
 			} else if (*tmp_str == ATDS_END ||


Commit: ccbffc0bd402a9eb7e86f5e126d57e6f98fb62fd
    https://github.com/scummvm/scummvm/commit/ccbffc0bd402a9eb7e86f5e126d57e6f98fb62fd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:40-08:00

Commit Message:
CHEWY: Mixed speech & subtitle support for item interactions

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/sound.cpp
    engines/chewy/sound.h
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 0d6482f6177..3874da0e6a3 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -80,7 +80,7 @@ Atdsys::Atdsys() {
 	_adsv.AutoDia = false;
 	_adsv.StrNr = -1;
 	_adsv.SilentCount = false;
-	_atsv.Display = false;
+	_atsv._display = DISPLAY_NONE;
 	_atsv.SilentCount = false;
 	_atdsv.Delay = &_tmpDelay;
 	_tmpDelay = 1;
@@ -510,60 +510,61 @@ void Atdsys::set_ats_mem(int16 mode) {
 	}
 }
 
-bool Atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
+DisplayMode Atdsys::start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr) {
 	*voc_nr = -1;
 	set_ats_mem(mode);
 
+	_atsv._display = DISPLAY_NONE;
+
 	if (_atsmem) {
-		if (_atsv.Display)
+		if (_atsv._display != DISPLAY_NONE)
 			stop_ats();
 
 		int16 txt_anz;
 		_atsv.Ptr = ats_get_txt(txt_nr, txt_mode, &txt_anz, mode);
 
 		if (_atsv.Ptr) {
-			_atsv.Display = true;
+			_atsv._display = _atdsv.Display;
 			char *ptr = _atsv.Ptr;
 			_atsv.TxtLen = 0;
 
 			while (*ptr++ != ATDS_END_TEXT)
 				++_atsv.TxtLen;
 
+			*voc_nr = _atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
+
 			if ((byte)*_atsv.Ptr == 248) {
 				// Special code for no message to display
-				_atsv.Display = false;
+				_atsv._display = (_atdsv.Display == DISPLAY_TXT || *voc_nr == -1) ?
+					DISPLAY_NONE : DISPLAY_VOC;
+
 			} else {
 				_atsv.DelayCount = get_delay(_atsv.TxtLen);
 				_printDelayCount1 = _atsv.DelayCount / 10;
 				_atsv.Color = color;
 				_mousePush = true;
-			}
 
-			*voc_nr = _atsv.StrHeader.VocNr - ATDS_VOC_OFFSET;
-
-			if ((_atdsv.Display == DISPLAY_VOC) && (*voc_nr != -1)) {
-				_atsv.Display = false;
+				if (*voc_nr == -1) {
+					_atsv._display = (_atdsv.Display == DISPLAY_VOC) ?
+						DISPLAY_NONE : DISPLAY_TXT;
+				}
 			}
-		} else {
-			_atsv.Display = false;
 		}
-	} else {
-		_atsv.Display = false;
 	}
 
-	return _atsv.Display;
+	return _atsv._display;
 }
 
 void Atdsys::stop_ats() {
-	_atsv.Display = false;
+	_atsv._display = DISPLAY_NONE;
 }
 
-int16 Atdsys::ats_get_status() {
-	return _atsv.Display;
+DisplayMode &Atdsys::ats_get_status() {
+	return _atsv._display;
 }
 
 void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
-	if (_atsv.Display) {
+	if (_atsv._display == DISPLAY_TXT || _atsv._display == DISPLAY_ALL) {
 		if (_atdsv._eventsEnabled) {
 			switch (_G(in)->get_switch_code()) {
 			case Common::KEYCODE_ESCAPE:
@@ -625,7 +626,8 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			str_null2leer(start_ptr, start_ptr + _atsv.TxtLen - 1);
 			if (_atsv.DelayCount <= 0) {
 				if (_ssr->Next == false) {
-					_atsv.Display = false;
+					_atsv._display = (_atsv._display == DISPLAY_ALL) ?
+						DISPLAY_VOC : DISPLAY_NONE;
 				} else {
 					_atsv.Ptr = tmp_ptr;
 					_atsv.TxtLen = 0;
@@ -980,7 +982,8 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 					(_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) != -1) {
 				if (_atdsv.VocNr != _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) {
 					_atdsv.VocNr = _aadv.StrHeader->VocNr - ATDS_VOC_OFFSET;
-					g_engine->_sound->playSpeech(_atdsv.VocNr);
+					g_engine->_sound->playSpeech(_atdsv.VocNr,
+						_atdsv.Display == DISPLAY_VOC);
 					int16 vocx = _G(spieler_vector)[_aadv.StrHeader->AkPerson].Xypos[0] -
 								 _G(spieler).scrollx + _G(spieler_mi)[_aadv.StrHeader->AkPerson].HotX;
 					g_engine->_sound->setSoundChannelBalance(0, getStereoPos(vocx));
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index c661adb85dd..bf7e816a1e2 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -51,6 +51,7 @@ namespace Chewy {
 #define ATDS_HANDLE 7
 
 enum DisplayMode {
+	DISPLAY_NONE = -1,
 	DISPLAY_TXT = 0,
 	DISPLAY_VOC = 1,
 	DISPLAY_ALL = 2
@@ -216,7 +217,7 @@ struct AtsTxtHeader {
 };
 
 struct AtsVar {
-	bool Display;
+	DisplayMode _display = DISPLAY_NONE;
 	AtsTxtHeader TxtHeader;
 	AtsStrHeader StrHeader;
 	char *Ptr;
@@ -272,9 +273,9 @@ public:
 	void close_handle(int16 mode);
 	void crypt(char *txt, uint32 size);
 	void init_ats_mode(int16 mode, uint8 *atsheader);
-	bool start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr);
+	DisplayMode start_ats(int16 txt_nr, int16 txt_mode, int16 color, int16 mode, int16 *voc_nr);
 	void stop_ats();
-	int16 ats_get_status();
+	DisplayMode &ats_get_status();
 	void print_ats(int16 x, int16 y, int16 scrx, int16 scry);
 	int16 get_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode);
 	void set_steuer_bit(int16 txt_nr, int16 bit_idx, int16 mode);
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 8c39b76bdc7..6c4cdc6aa92 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -151,7 +151,7 @@ void Sound::setMusicVolume(uint volume) {
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
 }
 
-void Sound::playSpeech(int num) {
+void Sound::playSpeech(int num, bool waitForFinish) {
 	// Get the speech data
 	SoundChunk *sound = _speechRes->getSound(num);
 	size_t size = sound->size;
@@ -169,7 +169,7 @@ void Sound::playSpeech(int num) {
 	_mixer->playStream(Audio::Mixer::kSpeechSoundType,
 		&_speechHandle, stream);
 
-	if (_G(atds)->getAtdDisplay() == DISPLAY_VOC) {
+	if (waitForFinish) {
 		// Wait for speech to finish
 		while (isSpeechActive() && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h
index f2d3a991ca3..cd1c40c1ed7 100644
--- a/engines/chewy/sound.h
+++ b/engines/chewy/sound.h
@@ -56,7 +56,7 @@ public:
 	bool isMusicActive();
 	void setMusicVolume(uint volume);
 
-	void playSpeech(int num);
+	void playSpeech(int num, bool waitForFinish);
 	void pauseSpeech();
 	void resumeSpeech();
 	void stopSpeech();
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index bddc664bead..438c4a2bf63 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -475,7 +475,10 @@ void start_aad(int16 dia_nr) {
 }
 
 bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
-	bool ret = false;
+	int16 VocNr;
+	int16 vocx;
+	DisplayMode ret = DISPLAY_NONE;
+
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 
@@ -485,25 +488,31 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_START);
 
-			int16 VocNr;
 			ret = _G(atds)->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
-			if (ret) {
-				while (_G(atds)->ats_get_status() != false && !SHOULD_QUIT)
-					set_up_screen(DO_SETUP);
 
-			// WORKAROUND: There are a few cases in the game with no text,
-			// but a voice sample the game would fall back on even in
-			// subtitles only mode. Don't allow this in ScummVM
-			} else if (VocNr != -1 && g_engine->_sound->getSpeechSubtitlesMode() != DISPLAY_TXT) {
-				ret = true;
-				int16 vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+			if (ret == DISPLAY_VOC || ret == DISPLAY_ALL) {
+				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));
-				g_engine->_sound->playSpeech(VocNr);
+				g_engine->_sound->playSpeech(VocNr,
+					_G(atds)->getAtdDisplay() == DISPLAY_VOC);
 				//warning("FIXME - unknown constant SMP_PLAYING");
 
 				set_up_screen(DO_SETUP);
 			}
 
+			if (ret != DISPLAY_NONE) {
+ 				DisplayMode &dMode = _G(atds)->ats_get_status();
+				while (!SHOULD_QUIT && dMode != DISPLAY_NONE) {
+					if (dMode != DISPLAY_TXT && !g_engine->_sound->isSpeechActive()) {
+						dMode = (dMode == DISPLAY_ALL) ?
+							DISPLAY_TXT : DISPLAY_NONE;
+					}
+
+					set_up_screen(DO_SETUP);
+				}
+			}
+
 			if (_G(menu_item) != CUR_WALK)
 				atds_string_start(30000, 0, 0, AAD_STR_END);
 		}
@@ -517,7 +526,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	_G(maus_links_click) = _G(tmp_maus_links);
 
-	return ret;
+	return ret != DISPLAY_NONE;
 }
 
 void aad_wait(int16 str_nr) {


Commit: ca5dd69fd0a14dc174c5cd3bb64b6ed58dd6db4b
    https://github.com/scummvm/scummvm/commit/ca5dd69fd0a14dc174c5cd3bb64b6ed58dd6db4b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: Remove useless check and include in mcga.cpp

Changed paths:
    engines/chewy/mcga.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 25c3e7b0aae..73c10bbea98 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -24,7 +24,6 @@
 #include "chewy/chewy.h"
 #include "chewy/globals.h"
 #include "chewy/mcga.h"
-#include "chewy/mcga_graphics.h"
 
 namespace Chewy {
 
@@ -333,8 +332,7 @@ static void setYVals() {
 	} else {
 		spriteYVal1 = spriteHeight / spriteDeltaY2;
 		spriteYVal2 = 1000 * (spriteHeight % spriteDeltaY2);
-		if (spriteDeltaY2)
-			spriteYVal2 /= spriteDeltaY2;
+		spriteYVal2 /= spriteDeltaY2;
 	}
 }
 


Commit: 6e8cf7168252f9c160001d637734e0ec02fbd8b9
    https://github.com/scummvm/scummvm/commit/6e8cf7168252f9c160001d637734e0ec02fbd8b9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: Some renaming

Changed paths:
    engines/chewy/main.cpp
    engines/chewy/object.cpp
    engines/chewy/object.h
    engines/chewy/object_extra.cpp
    engines/chewy/object_extra.h
    engines/chewy/room.h
    engines/chewy/types.h


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 3dd4616f736..4aec61424bf 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -254,7 +254,6 @@ void test_menu() {
 	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[_G(spieler_vector)[P_CHEWY].Phase];
 	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
 	_G(spieler_vector)[P_CHEWY].Count = 0;
-	bool ende = false;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	_G(flags).main_maus_flag = false;
 	_G(tmp_menu_item) = false;
@@ -267,8 +266,9 @@ void test_menu() {
 	_G(flags).ShowAtsInvTxt = true;
 	enter_room(-1);
 	_G(uhr)->reset_timer(0, 0);
-	while (!ende)
-		ende = main_loop(DO_SETUP);
+	bool endLoopFl = false;
+	while (!endLoopFl)
+		endLoopFl = main_loop(DO_SETUP);
 }
 
 void menu_entry() {
@@ -986,7 +986,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 	case STATIC_USE:
 		ret = _G(obj)->calc_static_use(test_nr);
-		if (ret == OBJEKT_1) {
+		if (ret == OBJECT_1) {
 			_G(maus_links_click) = false;
 			hide_cur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
@@ -1079,8 +1079,8 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	}
 
 	switch (ret) {
-	case OBJEKT_1:
-	case OBJEKT_2:
+	case OBJECT_1:
+	case OBJECT_2:
 		if (mode == INVENTAR_NORMAL)
 			calc_inv_use_txt(test_nr);
 		break;
@@ -1267,14 +1267,14 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 				}
 			}
 			if (_G(flags).ChAutoMov) {
-				bool ende = false;
+				bool endLoopFl = false;
 				_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
 				_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
 				_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
 				_G(spieler_mi)[p_nr].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[p_nr].HotY;
 				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart, _G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
 				get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
-				while (!ende) {
+				while (!endLoopFl) {
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
 						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							_G(spieler_vector)[p_nr].Count = 0;
@@ -1290,7 +1290,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 								               p_nr, _G(Rdi)->AutoMov[mov_nr].SprNr);
 							}
 						}
-						ende = true;
+						endLoopFl = true;
 					}
 					set_up_screen(DO_SETUP);
 					SHOULD_QUIT_RETURN0;
@@ -1322,8 +1322,8 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 		if (_G(spieler_vector)[p_nr].Count)
 			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
 		if (mode == ANI_WAIT) {
-			bool ende = false;
-			while (!ende) {
+			bool endLoopFl = false;
+			while (!endLoopFl) {
 				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 					if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 						_G(spieler_vector)[p_nr].Count = 0;
@@ -1335,7 +1335,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 						set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
 						               _G(spieler_mi)[p_nr].XyzEnd[1], p_nr, -1);
 					}
-					ende = true;
+					endLoopFl = true;
 				}
 				set_up_screen(DO_SETUP);
 				SHOULD_QUIT_RETURN;
@@ -1881,14 +1881,14 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y, int16 *sc_x, int16
 }
 
 void auto_scroll(int16 scrx, int16 scry) {
-	int16 tmp_maus_click = _G(maus_links_click);
+	int16 tmpMouseClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(spieler).scrollx >>= 1;
 	_G(spieler).scrollx <<= 1;
 	_G(spieler).scrolly >>= 1;
 	_G(spieler).scrolly <<= 1;
-	bool ende = false;
-	while (!ende) {
+	bool endLoopFl = false;
+	while (!endLoopFl) {
 		if (scrx < _G(spieler).scrollx)
 			_G(spieler).scrollx -= _G(spieler).ScrollxStep;
 		else if (scrx > _G(spieler).scrollx)
@@ -1898,11 +1898,11 @@ void auto_scroll(int16 scrx, int16 scry) {
 		else if (scry > _G(spieler).scrolly)
 			_G(spieler).scrolly += _G(spieler).ScrollyStep;
 		if (scrx == _G(spieler).scrollx && scry == _G(spieler).scrolly)
-			ende = true;
+			endLoopFl = true;
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
-	_G(maus_links_click) = tmp_maus_click;
+	_G(maus_links_click) = tmpMouseClick;
 }
 
 void disable_timer() {
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index b3c8d837e51..a367c384e79 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -58,13 +58,13 @@ static const int16 SIB_ZUSTAND_TBL[] = {
 };
 
 Object::Object(Spieler *sp) {
-	max_inventar_obj = 0;
-	max_static_inventar = 0;
-	max_exit = 0;
-	Player = sp;
-	Rmo = sp->room_m_obj;
-	Rsi = sp->room_s_obj;
-	Re = sp->room_e_obj;
+	_maxInventoryObj = 0;
+	_maxStaticInventory = 0;
+	_maxExit = 0;
+	_player = sp;
+	_rmo = sp->room_m_obj;
+	_rsi = sp->room_s_obj;
+	_roomExit = sp->room_e_obj;
 }
 Object::~Object() {
 }
@@ -73,25 +73,25 @@ int16 Object::load(const char *fname_, RoomMovObject *rmo) {
 	Common::File f;
 
 	if (f.open(fname_)) {
-		if (!iib_datei_header.load(&f)) {
+		if (!_iibFileHeader.load(&f)) {
 			error("Object::load error");
 		}
 
-		if (!scumm_strnicmp(iib_datei_header.Id, "IIB", 3)) {
-			if (iib_datei_header.Size) {
-				assert(iib_datei_header.Size % RoomMovObject::SIZE() == 0);
+		if (!scumm_strnicmp(_iibFileHeader.Id, "IIB", 3)) {
+			if (_iibFileHeader.Size) {
+				assert(_iibFileHeader.Size % RoomMovObject::SIZE() == 0);
 
 				bool valid = true;
-				for (uint i = 0; i < iib_datei_header.Size / RoomMovObject::SIZE() && valid; ++i, ++rmo) {
+				for (uint i = 0; i < _iibFileHeader.Size / RoomMovObject::SIZE() && valid; ++i, ++rmo) {
 					valid = rmo->load(&f);
 				}
 
 				if (!valid)
 					error("Object::load error");
 
-				max_inventar_obj = (int16)iib_datei_header.Size / RoomMovObject::SIZE();
+				_maxInventoryObj = (int16)_iibFileHeader.Size / RoomMovObject::SIZE();
 			} else
-				max_inventar_obj = 0;
+				_maxInventoryObj = 0;
 		} else {
 			error("Object::load error");
 		}
@@ -101,30 +101,30 @@ int16 Object::load(const char *fname_, RoomMovObject *rmo) {
 		error("Object::load error");
 	}
 
-	return max_inventar_obj;
+	return _maxInventoryObj;
 }
 
-int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
+int16 Object::load(const char *fname_, RoomStaticInventory *rsi) {
 	Common::File f;
 
 	if (f.open(fname_)) {
-		if (!sib_datei_header.load(&f)) {
+		if (!_sibFileHeader.load(&f)) {
 			error("Object::load error");
 		}
 
-		if (!scumm_strnicmp(sib_datei_header.Id, "SIB", 3)) {
-			if (sib_datei_header.Anz) {
+		if (!scumm_strnicmp(_sibFileHeader.Id, "SIB", 3)) {
+			if (_sibFileHeader.Anz) {
 				bool valid = true;
-				for (int i = 0; i < sib_datei_header.Anz && valid; ++i, ++rsi) {
+				for (int i = 0; i < _sibFileHeader.Anz && valid; ++i, ++rsi) {
 					valid = rsi->load(&f);
 				}
 
 				if (!valid)
 					error("Object::load error");
 
-				max_static_inventar = sib_datei_header.Anz;
+				_maxStaticInventory = _sibFileHeader.Anz;
 			} else
-				max_static_inventar = 0;
+				_maxStaticInventory = 0;
 		} else {
 			error("Object::load error");
 		}
@@ -134,30 +134,30 @@ int16 Object::load(const char *fname_, RoomStaticInventar *rsi) {
 		error("Object::load error");
 	}
 
-	return max_static_inventar;
+	return _maxStaticInventory;
 }
 
-int16 Object::load(const char *fname_, RoomExit *RoomEx) {
+int16 Object::load(const char *fname_, RoomExit *roomExit) {
 	Common::File f;
 
 	if (f.open(fname_)) {
-		if (!eib_datei_header.load(&f)) {
+		if (!_eibFileHeader.load(&f)) {
 			error("Object::load error");
 		}
 
-		if (!scumm_strnicmp(eib_datei_header.Id, "EIB", 3)) {
-			if (sib_datei_header.Anz) {
+		if (!scumm_strnicmp(_eibFileHeader.Id, "EIB", 3)) {
+			if (_sibFileHeader.Anz) {
 				bool valid = true;
-				for (int i = 0; i < eib_datei_header.Anz && valid; ++i, ++RoomEx) {
-					valid = RoomEx->load(&f);
+				for (int i = 0; i < _eibFileHeader.Anz && valid; ++i, ++roomExit) {
+					valid = roomExit->load(&f);
 				}
 
 				if (!valid)
 					error("Object::load error");
 
-				max_exit = eib_datei_header.Anz;
+				_maxExit = _eibFileHeader.Anz;
 			} else
-				max_exit = 0;
+				_maxExit = 0;
 		} else {
 			error("Object::load error");
 		}
@@ -167,7 +167,7 @@ int16 Object::load(const char *fname_, RoomExit *RoomEx) {
 		error("Object::load error");
 	}
 
-	return max_exit;
+	return _maxExit;
 }
 
 void Object::sort() {
@@ -175,11 +175,11 @@ void Object::sort() {
 
 	spieler_invnr[0] = 0;
 	for (short i = 0; i < MAX_MOV_OBJ; i++) {
-		if (Rmo[i].RoomNr != -1) {
-			if (Rmo[i].RoomNr == 255) {
+		if (_rmo[i].RoomNr != -1) {
+			if (_rmo[i].RoomNr == 255) {
 				++spieler_invnr[0];
 				spieler_invnr[spieler_invnr[0]] = i;
-			} else if (Rmo[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
+			} else if (_rmo[i].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
 				++mov_obj_room[0];
 				mov_obj_room[mov_obj_room[0]] = i;
 			}
@@ -197,12 +197,12 @@ void Object::free_inv_spr(byte **inv_spr_adr) {
 
 int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 ret = -1;
-	for (int16 i = 0; i < max_static_inventar && ret == -1; i++) {
-		if (Rsi[i].RoomNr == Player->PersonRoomNr[P_CHEWY] && Rsi[i].HideSib == false) {
-			if (mouse_x >= Rsi[i].X &&
-			        mouse_x <= (Rsi[i].X + Rsi[i].XOff) &&
-			        mouse_y >= Rsi[i].Y &&
-			        mouse_y <= (Rsi[i].Y + Rsi[i].YOff))
+	for (int16 i = 0; i < _maxStaticInventory && ret == -1; i++) {
+		if (_rsi[i].RoomNr == _player->PersonRoomNr[P_CHEWY] && _rsi[i].HideSib == false) {
+			if (mouse_x >= _rsi[i].X &&
+			        mouse_x <= (_rsi[i].X + _rsi[i].XOff) &&
+			        mouse_y >= _rsi[i].Y &&
+			        mouse_y <= (_rsi[i].Y + _rsi[i].YOff))
 				ret = i;
 		}
 	}
@@ -212,22 +212,22 @@ int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 int16 Object::is_iib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 ret = -1;
 	for (int16 i = 1; i < mov_obj_room[0] + 1 && ret == -1; i++) {
-		if (Rmo[mov_obj_room[i]].X != -1 &&
-		        mouse_x >= Rmo[mov_obj_room[i]].X &&
-		        mouse_x <= (Rmo[mov_obj_room[i]].X + Rmo[mov_obj_room[i]].XOff) &&
-		        mouse_y >= Rmo[mov_obj_room[i]].Y &&
-		        mouse_y <= (Rmo[mov_obj_room[i]].Y + Rmo[mov_obj_room[i]].YOff))
+		if (_rmo[mov_obj_room[i]].X != -1 &&
+		        mouse_x >= _rmo[mov_obj_room[i]].X &&
+		        mouse_x <= (_rmo[mov_obj_room[i]].X + _rmo[mov_obj_room[i]].XOff) &&
+		        mouse_y >= _rmo[mov_obj_room[i]].Y &&
+		        mouse_y <= (_rmo[mov_obj_room[i]].Y + _rmo[mov_obj_room[i]].YOff))
 			ret = mov_obj_room[i];
 	}
 	return ret;
 }
 
 int16 Object::iib_txt_nr(int16 inv_nr) {
-	return Rmo[inv_nr].TxtNr;
+	return _rmo[inv_nr].TxtNr;
 }
 
 int16 Object::sib_txt_nr(int16 sib_nr) {
-	return Rsi[sib_nr].TxtNr;
+	return _rsi[sib_nr].TxtNr;
 }
 
 int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
@@ -243,12 +243,12 @@ int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 			tmp2 = maus_obj_nr;
 		}
 
-		if (Rmo[tmp1].ActionObj != -1) {
-			if (Rmo[tmp1].ActionObj < 30000 && Rmo[tmp1].ActionObj == tmp2) {
+		if (_rmo[tmp1].ActionObj != -1) {
+			if (_rmo[tmp1].ActionObj < 30000 && _rmo[tmp1].ActionObj == tmp2) {
 				actionFl = true;
-			} else if (Rmo[tmp1].ActionObj >= 30000) {
+			} else if (_rmo[tmp1].ActionObj >= 30000) {
 				int16 i = 0;
-				while (ACTION_OBJ_TBL[i] != Rmo[tmp1].ActionObj &&
+				while (ACTION_OBJ_TBL[i] != _rmo[tmp1].ActionObj &&
 				        ACTION_OBJ_TBL[i] != 32000) {
 					++i;
 				}
@@ -268,7 +268,7 @@ int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 	}
 
 	if (actionFl && calc_rmo_flip_flop(tmp2))
-		ret = (tmp2 == test_obj_nr) ? OBJEKT_2 : OBJEKT_1;
+		ret = (tmp2 == test_obj_nr) ? OBJECT_2 : OBJECT_1;
 
 	return ret;
 }
@@ -276,13 +276,13 @@ int16 Object::action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr) {
 int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 	int16 action_flag = NO_ACTION;
 
-	if (Rmo[maus_obj_nr].ActionObj != -1) {
-		if (Rmo[maus_obj_nr].ActionObj < 30000 &&
-		        Rmo[maus_obj_nr].ActionObj == test_obj_nr) {
-			action_flag = OBJEKT_2;
-		} else if (Rmo[maus_obj_nr].ActionObj >= 30000) {
+	if (_rmo[maus_obj_nr].ActionObj != -1) {
+		if (_rmo[maus_obj_nr].ActionObj < 30000 &&
+		        _rmo[maus_obj_nr].ActionObj == test_obj_nr) {
+			action_flag = OBJECT_2;
+		} else if (_rmo[maus_obj_nr].ActionObj >= 30000) {
 			int16 i = 0;
-			while (ACTION_OBJ_TBL[i] != Rmo[maus_obj_nr].ActionObj &&
+			while (ACTION_OBJ_TBL[i] != _rmo[maus_obj_nr].ActionObj &&
 			        ACTION_OBJ_TBL[i] != 32000) {
 				++i;
 			}
@@ -292,18 +292,18 @@ int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 				while (ACTION_OBJ_TBL[i] < 30000 && !ok) {
 					if (ACTION_OBJ_TBL[i] == test_obj_nr) {
 						ok = 1;
-						action_flag = OBJEKT_2;
+						action_flag = OBJECT_2;
 					}
 					++i;
 				}
 			}
 		}
 	}
-	if (action_flag == OBJEKT_1) {
+	if (action_flag == OBJECT_1) {
 
 		if (!calc_rmo_flip_flop(maus_obj_nr))
 			action_flag = NO_ACTION;
-	} else if (action_flag == OBJEKT_2) {
+	} else if (action_flag == OBJECT_2) {
 
 		if (!calc_rsi_flip_flop(test_obj_nr))
 			action_flag = NO_ACTION;
@@ -312,15 +312,15 @@ int16 Object::action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr) {
 }
 
 void Object::hide_sib(int16 nr) {
-	Rsi[nr].HideSib = true;
+	_rsi[nr].HideSib = true;
 }
 
 void Object::show_sib(int16 nr) {
-	Rsi[nr].HideSib = false;
+	_rsi[nr].HideSib = false;
 }
 
 void Object::calc_all_static_detail() {
-	for (int16 i = 0; i < max_static_inventar; i++) {
+	for (int16 i = 0; i < _maxStaticInventory; i++) {
 		calc_static_detail(i);
 	}
 }
@@ -329,8 +329,8 @@ void Object::calc_static_detail(int16 det_nr) {
 	int16 i;
 	int16 n;
 
-	if (Rsi[det_nr].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
-		int16 nr = Rsi[det_nr].StaticAk;
+	if (_rsi[det_nr].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
+		int16 nr = _rsi[det_nr].StaticAk;
 		if (nr != -1) {
 			if (nr >= 30000) {
 				i = 0;
@@ -366,7 +366,7 @@ void Object::calc_static_detail(int16 det_nr) {
 			}
 		}
 
-		nr = Rsi[det_nr].StaticOff;
+		nr = _rsi[det_nr].StaticOff;
 		if (nr != -1) {
 			if (nr >= 30000) {
 				i = 0;
@@ -396,13 +396,13 @@ void Object::calc_static_detail(int16 det_nr) {
 
 int16 Object::calc_static_use(int16 nr) {
 	int16 ret;
-	switch (Rsi[nr].ZustandAk) {
+	switch (_rsi[nr].ZustandAk) {
 	case OBJZU_AUF:
 	case OBJZU_ZU:
 	case OBJZU_AN:
 	case OBJZU_AUS:
 		if (calc_rsi_flip_flop(nr))
-			ret = OBJEKT_1;
+			ret = OBJECT_1;
 		else
 			ret = NO_ACTION;
 		break;
@@ -422,17 +422,17 @@ int16 Object::calc_static_use(int16 nr) {
 
 int16 Object::calc_rsi_flip_flop(int16 nr) {
 	int16 ret = true;
-	if (Rsi[nr].ZustandFlipFlop > 0 && Rsi[nr].HideSib == false) {
-		int16 tmp = Rsi[nr].ZustandAk;
-		Rsi[nr].ZustandAk = Rsi[nr].ZustandOff;
-		Rsi[nr].ZustandOff = tmp;
-		tmp = Rsi[nr].StaticAk;
-		Rsi[nr].StaticAk = Rsi[nr].StaticOff;
-		Rsi[nr].StaticOff = tmp;
-		if (Rsi[nr].AniFlag == 255 && Rsi[nr].AutoMov == 255)
+	if (_rsi[nr].ZustandFlipFlop > 0 && _rsi[nr].HideSib == false) {
+		int16 tmp = _rsi[nr].ZustandAk;
+		_rsi[nr].ZustandAk = _rsi[nr].ZustandOff;
+		_rsi[nr].ZustandOff = tmp;
+		tmp = _rsi[nr].StaticAk;
+		_rsi[nr].StaticAk = _rsi[nr].StaticOff;
+		_rsi[nr].StaticOff = tmp;
+		if (_rsi[nr].AniFlag == 255 && _rsi[nr].AutoMov == 255)
 			calc_static_detail(nr);
-		if (Rsi[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
-			--Rsi[nr].ZustandFlipFlop;
+		if (_rsi[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
+			--_rsi[nr].ZustandFlipFlop;
 		}
 	} else {
 		ret = false;
@@ -442,18 +442,18 @@ int16 Object::calc_rsi_flip_flop(int16 nr) {
 }
 
 void Object::set_rsi_flip_flop(int16 nr, int16 anz) {
-	Rsi[nr].ZustandFlipFlop = anz;
+	_rsi[nr].ZustandFlipFlop = anz;
 }
 
 int16 Object::calc_rmo_flip_flop(int16 nr) {
 	int16 ret;
-	if (Rmo[nr].ZustandFlipFlop > 0) {
+	if (_rmo[nr].ZustandFlipFlop > 0) {
 		ret = true;
-		int16 tmp = Rmo[nr].ZustandAk;
-		Rmo[nr].ZustandAk = Rmo[nr].ZustandOff;
-		Rmo[nr].ZustandOff = tmp;
-		if (Rmo[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
-			--Rmo[nr].ZustandFlipFlop;
+		int16 tmp = _rmo[nr].ZustandAk;
+		_rmo[nr].ZustandAk = _rmo[nr].ZustandOff;
+		_rmo[nr].ZustandOff = tmp;
+		if (_rmo[nr].ZustandFlipFlop != ENDLOS_FLIP_FLOP) {
+			--_rmo[nr].ZustandFlipFlop;
 		}
 	} else
 		ret = false;
@@ -462,46 +462,46 @@ int16 Object::calc_rmo_flip_flop(int16 nr) {
 
 int16 Object::del_obj_use(int16 nr) {
 	int16 ret;
-	if (Rmo[nr].Del == 1) {
-		Rmo[nr].RoomNr = -1;
+	if (_rmo[nr].Del == 1) {
+		_rmo[nr].RoomNr = -1;
 		sort();
 		ret = true;
 	} else {
 		ret = false;
-		if (Rmo[nr].Del != 255) {
-			--Rmo[nr].Del;
+		if (_rmo[nr].Del != 255) {
+			--_rmo[nr].Del;
 		}
 	}
 	return ret;
 }
 
 void Object::addInventory(int16 nr, RaumBlk *Rb) {
-	Player->room_m_obj[nr].RoomNr = 255;
+	_player->room_m_obj[nr].RoomNr = 255;
 	sort();
-	_G(room)->calc_invent(Rb, Player);
+	_G(room)->calc_invent(Rb, _player);
 
 }
 
 void Object::delInventory(int16 nr, RaumBlk *Rb) {
-	Player->room_m_obj[nr].RoomNr = -1;
+	_player->room_m_obj[nr].RoomNr = -1;
 	sort();
 }
 
 void Object::changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
-	Player->room_m_obj[old_inv].RoomNr = -1;
-	Player->room_m_obj[new_inv].RoomNr = 255;
+	_player->room_m_obj[old_inv].RoomNr = -1;
+	_player->room_m_obj[new_inv].RoomNr = 255;
 	sort();
-	_G(room)->calc_invent(Rb, Player);
+	_G(room)->calc_invent(Rb, _player);
 }
 
 void Object::setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb) {
 	++mov_obj_room[0];
 	mov_obj_room[mov_obj_room[0]] = nr;
-	Player->room_m_obj[nr].RoomNr = Player->PersonRoomNr[P_CHEWY];
-	Player->room_m_obj[nr].X = x;
-	Player->room_m_obj[nr].Y = y;
-	Player->room_m_obj[nr].AutoMov = automov;
-	_G(room)->calc_invent(Rb, Player);
+	_player->room_m_obj[nr].RoomNr = _player->PersonRoomNr[P_CHEWY];
+	_player->room_m_obj[nr].X = x;
+	_player->room_m_obj[nr].Y = y;
+	_player->room_m_obj[nr].AutoMov = automov;
+	_G(room)->calc_invent(Rb, _player);
 	sort();
 }
 
@@ -516,12 +516,12 @@ bool Object::checkInventory(int16 nr) {
 
 int16 Object::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 ret = -1;
-	for (int16 i = 0; i < max_exit && ret == -1; i++) {
-		if (Re[i].RoomNr == Player->PersonRoomNr[P_CHEWY]) {
-			if (mouse_x >= Re[i].X &&
-			        mouse_x <= (Re[i].X + Re[i].XOff) &&
-			        mouse_y >= Re[i].Y &&
-			        mouse_y <= (Re[i].Y + Re[i].YOff)) {
+	for (int16 i = 0; i < _maxExit && ret == -1; i++) {
+		if (_roomExit[i].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
+			if (mouse_x >= _roomExit[i].X &&
+			        mouse_x <= (_roomExit[i].X + _roomExit[i].XOff) &&
+			        mouse_y >= _roomExit[i].Y &&
+			        mouse_y <= (_roomExit[i].Y + _roomExit[i].YOff)) {
 				ret = i;
 			}
 		}
diff --git a/engines/chewy/object.h b/engines/chewy/object.h
index f1167f75a33..83dac2c70c5 100644
--- a/engines/chewy/object.h
+++ b/engines/chewy/object.h
@@ -31,17 +31,17 @@ namespace Chewy {
 #define LOAD_NEW_OBJ 1
 
 #define NO_ACTION 0
-#define OBJEKT_1 1
-#define OBJEKT_2 2
+#define OBJECT_1 1
+#define OBJECT_2 2
 
 class Object {
 public:
 	Object(Spieler *sp);
 	~Object();
 
-	short load(const char *fname, RoomMovObject *Rmo);
-	int16 load(const char *fname, RoomStaticInventar *Rsi);
-	int16 load(const char *fname, RoomExit *RoomEx);
+	short load(const char *fname, RoomMovObject *rmo);
+	int16 load(const char *fname, RoomStaticInventory *rsi);
+	int16 load(const char *fname, RoomExit *roomExit);
 	void sort();
 	void free_inv_spr(byte **inv_spr_adr);
 	int16 is_sib_mouse(int16 mouse_x, int16 mouse_y);
@@ -70,16 +70,16 @@ public:
 private:
 	int16 calc_rmo_flip_flop(int16 nr);
 
-	IibDateiHeader iib_datei_header;
-	SibDateiHeader sib_datei_header;
-	EibDateiHeader eib_datei_header;
-	int16 max_inventar_obj;
-	int16 max_static_inventar;
-	int16 max_exit;
-	Spieler *Player;
-	RoomMovObject *Rmo;
-	RoomStaticInventar *Rsi;
-	RoomExit *Re;
+	IibFileHeader _iibFileHeader;
+	SibFileHeader _sibFileHeader;
+	EibFileHeader _eibFileHeader;
+	int16 _maxInventoryObj;
+	int16 _maxStaticInventory;
+	int16 _maxExit;
+	Spieler *_player;
+	RoomMovObject *_rmo;
+	RoomStaticInventory *_rsi;
+	RoomExit *_roomExit;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/object_extra.cpp b/engines/chewy/object_extra.cpp
index 5cb3270f714..477e6e05af1 100644
--- a/engines/chewy/object_extra.cpp
+++ b/engines/chewy/object_extra.cpp
@@ -50,7 +50,7 @@ void RoomMovObject::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(ZEbene);
 }
 
-bool IibDateiHeader::load(Common::SeekableReadStream *src) {
+bool IibFileHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	src->read(Tafname, 14);
 	Size = src->readUint32LE();
@@ -58,13 +58,13 @@ bool IibDateiHeader::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool RoomStaticInventar::load(Common::SeekableReadStream *src) {
+bool RoomStaticInventory::load(Common::SeekableReadStream *src) {
 	Common::Serializer s(src, nullptr);
 	synchronize(s);
 	return true;
 }
 
-void RoomStaticInventar::synchronize(Common::Serializer &s) {
+void RoomStaticInventory::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(RoomNr);
 	s.syncAsSint16LE(X);
 	s.syncAsSint16LE(Y);
@@ -84,7 +84,7 @@ void RoomStaticInventar::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(StaticOff);
 }
 
-bool SibDateiHeader::load(Common::SeekableReadStream *src) {
+bool SibFileHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	Anz = src->readUint16LE();
 
@@ -110,7 +110,7 @@ void RoomExit::synchronize(Common::Serializer &s) {
 	s.syncAsByte(dummy);
 }
 
-bool EibDateiHeader::load(Common::SeekableReadStream *src) {
+bool EibFileHeader::load(Common::SeekableReadStream *src) {
 	src->read(Id, 4);
 	Anz = src->readSint16LE();
 
diff --git a/engines/chewy/object_extra.h b/engines/chewy/object_extra.h
index 577514a6539..32e47beb1e0 100644
--- a/engines/chewy/object_extra.h
+++ b/engines/chewy/object_extra.h
@@ -69,7 +69,7 @@ struct RoomMovObject {
 	static constexpr int SIZE() { return 24; }
 };
 
-struct IibDateiHeader {
+struct IibFileHeader {
 	char Id[4];
 	char Tafname[14];
 	uint32 Size;
@@ -77,7 +77,7 @@ struct IibDateiHeader {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct RoomStaticInventar {
+struct RoomStaticInventory {
 	int16 RoomNr = 0;
 	int16 X = 0;
 	int16 Y = 0;
@@ -100,7 +100,7 @@ struct RoomStaticInventar {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct SibDateiHeader {
+struct SibFileHeader {
 	char Id[4];
 	int16 Anz;
 
@@ -123,7 +123,7 @@ struct RoomExit {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct EibDateiHeader {
+struct EibFileHeader {
 	char Id[4];
 	int16 Anz;
 
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 990156af9f3..40b0c1060e4 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -60,7 +60,7 @@ struct RaumBlk {
 	byte **InvSprAdr;
 
 	RoomMovObject *Rmo;
-	RoomStaticInventar *Rsi;
+	RoomStaticInventory *Rsi;
 
 	char RoomDir[9];
 	int16 AkAblage;
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 37039e959ed..b7a5b50f879 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -411,7 +411,7 @@ struct Spieler : public SpielerFlags {
 	int16 CurHoehe = 0;
 
 	RoomMovObject room_m_obj[MAX_MOV_OBJ];
-	RoomStaticInventar room_s_obj[MAX_FEST_OBJ];
+	RoomStaticInventory room_s_obj[MAX_FEST_OBJ];
 	RoomExit room_e_obj[MAX_EXIT];
 	int16 X[MAX_PERSON] = { 0 };
 	int16 Y[MAX_PERSON] = { 0 };


Commit: e35654ac19656006a3435925ac97326d99109b08
    https://github.com/scummvm/scummvm/commit/e35654ac19656006a3435925ac97326d99109b08
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: More renaming

Changed paths:
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/events.cpp
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index d497d00031e..c53e71b0519 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -57,7 +57,7 @@ void Cinema::execute() {
 
 	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(4, &_G(room_blk), 1, 0, GBOOK);
-	show_cur();
+	showCur();
 	EVENTS_CLEAR;
 	_G(kbinfo).scan_code = 0;
 
@@ -155,7 +155,7 @@ void Cinema::execute() {
 		}
 
 		case Common::KEYCODE_RETURN:
-			hide_cur();
+			hideCur();
 			_G(out)->cls();
 			_G(out)->set_pointer(_G(screen0));
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
@@ -166,7 +166,7 @@ void Cinema::execute() {
 			_G(flc)->remove_custom_user_function();
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
-			show_cur();
+			showCur();
 			delay = 0;
 			flag = false;
 			break;
@@ -199,7 +199,7 @@ void Cinema::execute() {
 
 	_G(room)->open_handle(EPISODE1, 0);
 	_G(room)->set_ak_pal(&_G(room_blk));
-	hide_cur();
+	hideCur();
 	_G(uhr)->reset_timer(0, 5);
 }
 
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index e80b2c4c955..4adb49bf771 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -266,7 +266,7 @@ void Credits::execute() {
 	_G(room)->open_handle("back/episode1.tgp", R_GEPDATEI);
 
 	_G(room)->set_ak_pal(&_G(room_blk));
-	hide_cur();
+	hideCur();
 	_G(uhr)->reset_timer(0, 5);
 }
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 6018001d43a..652b60d2391 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -77,7 +77,7 @@ int16 Files::execute(bool isInGame) {
  
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 	_G(out)->set_pointer(_G(workptr));
-	show_cur();
+	showCur();
 
 	pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
 	for (i = SAVE; i <= W7; i++)
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index b27567cdc30..71527198912 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -138,11 +138,11 @@ void Inventory::menu() {
 
 	_G(invent_cur_mode) = CUR_USE;
 	if (_G(spieler).AkInvent != -1) {
-		cursor_wahl(CUR_AK_INVENT);
+		cursorChoice(CUR_AK_INVENT);
 
 	} else {
 		_G(invent_cur_mode) = CUR_USE;
-		cursor_wahl(CUR_USE);
+		cursorChoice(CUR_USE);
 	}
 
 	int16 menu_flag1 = MENU_EINBLENDEN;
@@ -182,9 +182,9 @@ void Inventory::menu() {
 					_G(invent_cur_mode) = CUR_USE;
 					_G(menu_item) = CUR_USE;
 					if (_G(spieler).AkInvent == -1) {
-						cursor_wahl(CUR_USE);
+						cursorChoice(CUR_USE);
 					} else {
-						cursor_wahl(CUR_AK_INVENT);
+						cursorChoice(CUR_AK_INVENT);
 					}
 					break;
 
@@ -198,7 +198,7 @@ void Inventory::menu() {
 					} else {
 						_G(invent_cur_mode) = CUR_LOOK;
 						_G(menu_item) = CUR_LOOK;
-						cursor_wahl(CUR_LOOK);
+						cursorChoice(CUR_LOOK);
 					}
 					break;
 
@@ -221,7 +221,7 @@ void Inventory::menu() {
 								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
 									_G(menu_item) = CUR_USE;
 									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
-									cursor_wahl(CUR_AK_INVENT);
+									cursorChoice(CUR_AK_INVENT);
 									del_invent_slot(_G(spieler).InventSlot[k]);
 								}
 							}
@@ -233,7 +233,7 @@ void Inventory::menu() {
 								_G(obj)->sort();
 								_G(spieler).AkInvent = -1;
 								_G(menu_item) = _G(invent_cur_mode);
-								cursor_wahl(_G(invent_cur_mode));
+								cursorChoice(_G(invent_cur_mode));
 							}
 						}
 					} else if (_G(invent_cur_mode) == CUR_LOOK) {
@@ -242,7 +242,7 @@ void Inventory::menu() {
 								_G(spieler).AkInvent = _G(spieler).InventSlot[k];
 								ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
 								_G(spieler).AkInvent = -1;
-								cursor_wahl(_G(invent_cur_mode));
+								cursorChoice(_G(invent_cur_mode));
 								taste_flag = Common::KEYCODE_ESCAPE;
 							}
 						}
@@ -264,9 +264,9 @@ void Inventory::menu() {
 			_G(invent_cur_mode) = CUR_USE;
 			_G(menu_item) = CUR_USE;
 			if (_G(spieler).AkInvent == -1)
-				cursor_wahl(CUR_USE);
+				cursorChoice(CUR_USE);
 			else
-				cursor_wahl(CUR_AK_INVENT);
+				cursorChoice(CUR_AK_INVENT);
 		} else if (ret_look == 5) {
 			taste_flag = false;
 			mouseFl = false;
@@ -312,7 +312,7 @@ void Inventory::menu() {
 				break;
 
 			case Common::KEYCODE_RIGHT:
-				if (_G(minfo).x < 320 - _G(spieler).CurBreite)
+				if (_G(minfo).x < 320 - _G(spieler)._curWidth)
 					_G(minfo).x += 3;
 				break;
 
@@ -327,7 +327,7 @@ void Inventory::menu() {
 				break;
 
 			case Common::KEYCODE_DOWN:
-				if (_G(minfo).y < 197 - _G(spieler).CurHoehe)
+				if (_G(minfo).y < 197 - _G(spieler)._curHeight)
 					_G(minfo).y += 3;
 				break;
 
@@ -369,7 +369,7 @@ void Inventory::menu() {
 			_G(out)->set_clip(0, 0, 320, 200);
 			_G(out)->back2screen(_G(workpage));
 		} else {
-			show_cur();
+			showCur();
 		}
 	}
 
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index ddc005bdb34..5c921bb382f 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -64,7 +64,7 @@ void MainMenu::execute() {
 		g_engine->_sound->stopAllSounds();
 		_G(SetUpScreenFunc) = screenFunc;
 
-		cursor_wahl(CUR_ZEIGE);
+		cursorChoice(CUR_ZEIGE);
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
 		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
@@ -76,7 +76,7 @@ void MainMenu::execute() {
 
 		_G(out)->set_palette(_G(pal));
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		show_cur();
+		showCur();
 
 		// Wait for a selection to be made on the main menu
 		do {
@@ -105,7 +105,7 @@ void MainMenu::execute() {
 			break;
 
 		case MM_CINEMA:
-			cursor_wahl(CUR_SAVE);
+			cursorChoice(CUR_SAVE);
 			_G(cur)->move(152, 92);
 			_G(minfo).x = 152;
 			_G(minfo).y = 92;
@@ -189,7 +189,7 @@ int16 MainMenu::creditsFn(int16 key) {
 }
 
 void MainMenu::startGame() {
-	hide_cur();
+	hideCur();
 	animate();
 	exit_room(-1);
 
@@ -222,7 +222,7 @@ void MainMenu::startGame() {
 	_G(fx_blend) = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 	enter_room(-1);
 	_G(auto_obj) = 0;
 }
@@ -233,14 +233,14 @@ bool MainMenu::loadGame() {
 	_G(out)->set_pointer(_G(screen0));
 	_G(out)->set_fontadr(_G(font6x8));
 	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
-	cursor_wahl(CUR_SAVE);
+	cursorChoice(CUR_SAVE);
 	_G(cur)->move(152, 92);
 	_G(minfo).x = 152;
 	_G(minfo).y = 92;
 	_G(savegameFlag) = true;
 	int result = Dialogs::Files::execute(false);
 
-	cursor_wahl((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
+	cursorChoice((_G(spieler).inv_cur && _G(spieler).AkInvent != -1 &&
 		_G(menu_item) == CUR_USE) ? 8 : 0);
 	_G(cur_display) = true;
 	restorePersonAni();
@@ -270,7 +270,7 @@ void MainMenu::playGame() {
 	_G(uhr)->reset_timer(0, 0);
 	_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 
-	while (!SHOULD_QUIT && !main_loop(1)) {
+	while (!SHOULD_QUIT && !mainLoop(1)) {
 	}
 
 	_G(auto_obj) = 0;
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 6e34f44fa70..b3042d60b1f 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -89,7 +89,7 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 		if (isWheelEnabled) {
 			if (--_G(menu_item) < 0)
 				_G(menu_item) = CUR_TALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 		}
 		return;
 
@@ -98,7 +98,7 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 		if (isWheelEnabled) {
 			if (++_G(menu_item) > CUR_TALK)
 				_G(menu_item) = CUR_WALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 		}
 		return;
 
@@ -106,7 +106,7 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 		// Toggle between walk and look cursor
 		if (isWheelEnabled) {
 			_G(menu_item) = (_G(menu_item) == CUR_WALK) ? CUR_LOOK : CUR_WALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 		}
 		return;
 
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 5911397094b..b6f2487b975 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -318,23 +318,23 @@ extern Globals *g_globals;
 
 #define _G(FIELD) g_globals->_##FIELD
 
-void cursor_wahl(int16 nr);
+void cursorChoice(int16 nr);
 
-void hide_cur();
+void hideCur();
 
-void show_cur();
+void showCur();
 
 void alloc_buffers();
 void free_buffers();
 
-bool main_loop(int16 mode);
+bool mainLoop(int16 mode);
 
 void set_up_screen(SetupScreenMode mode);
 
 void kb_mov(int16 mode);
 
 void kb_cur_action(int16 key, int16 mode);
-void maus_action();
+void mouseAction();
 
 void obj_auswerten(int16 test_nr, int16 txt_nr);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 4aec61424bf..c468ce0fefa 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -54,7 +54,7 @@ void game_main() {
 	_G(room_start_nr) = 0;
 	standard_init();
 	_G(out)->cls();
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 	_G(workptr) = _G(workpage) + 4l;
 
 	int saveSlot = ConfMan.getInt("save_slot");
@@ -101,7 +101,7 @@ void free_buffers() {
 	free(_G(workpage));
 }
 
-void cursor_wahl(int16 nr) {
+void cursorChoice(int16 nr) {
 	int16 ok = true;
 	if (nr != CUR_USER) {
 		_G(curblk).sprite = _G(curtaf)->image;
@@ -222,13 +222,13 @@ void cursor_wahl(int16 nr) {
 		cur_move = true;
 		_G(cur)->set_cur_ani(&_G(curani));
 		int16 *xy = (int16 *)_G(curblk).sprite[_G(curani).ani_anf];
-		_G(spieler).CurBreite = xy[0];
-		_G(spieler).CurHoehe = xy[1];
+		_G(spieler)._curWidth = xy[0];
+		_G(spieler)._curHeight = xy[1];
 		_G(in)->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
 	}
 }
 
-void hide_cur() {
+void hideCur() {
 	if (!_G(cur_hide_flag)) {
 		_G(cur_hide_flag) = true;
 		_G(flags).ShowAtsInvTxt = false;
@@ -237,62 +237,34 @@ void hide_cur() {
 	}
 }
 
-void show_cur() {
+void showCur() {
 	_G(flags).ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
 	_G(flags).CursorStatus = true;
 }
 
-void test_menu() {
-	_G(menu_lauflicht) = 0;
-	_G(inv_disp_ok) = false;
-	_G(spieler).inv_cur = false;
-	_G(menu_display) = 0;
-	_G(cur_display) = true;
-	_G(cur)->show_cur();
-	_G(spieler_vector)[P_CHEWY].Phase = 6;
-	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[_G(spieler_vector)[P_CHEWY].Phase];
-	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
-	_G(spieler_vector)[P_CHEWY].Count = 0;
-	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
-	_G(flags).main_maus_flag = false;
-	_G(tmp_menu_item) = false;
-	_G(maus_links_click) = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(txt_aus_click) = false;
-	_G(fx_blend) = BLEND3;
-	_G(auto_obj) = 0;
-	_G(flags).MainInput = true;
-	_G(flags).ShowAtsInvTxt = true;
-	enter_room(-1);
-	_G(uhr)->reset_timer(0, 0);
-	bool endLoopFl = false;
-	while (!endLoopFl)
-		endLoopFl = main_loop(DO_SETUP);
-}
-
-void menu_entry() {
+void menuEntry() {
 	_G(det)->freeze_ani();
 	_G(uhr)->set_all_status(TIMER_FREEZE);
 }
 
-void menu_exit() {
+void menuExit() {
 	_G(det)->unfreeze_ani();
 	_G(uhr)->set_all_status(TIMER_UNFREEZE);
 	_G(uhr)->reset_timer(0, 0);
 	_G(FrameSpeed) = 0;
 }
 
-bool main_loop(int16 mode) {
-	bool ende = false;
+bool mainLoop(int16 mode) {
+	bool retValue = false;
 
-	maus_action();
+	mouseAction();
 	if (_G(flags).MainInput) {
 		switch (_G(kbinfo).scan_code) {
 		case Common::KEYCODE_F1:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_WALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			if (_G(menu_display) == MENU_EINBLENDEN)
 				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
@@ -300,7 +272,7 @@ bool main_loop(int16 mode) {
 		case Common::KEYCODE_F2:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_USE;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			if (_G(menu_display) == MENU_EINBLENDEN)
 				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
@@ -308,7 +280,7 @@ bool main_loop(int16 mode) {
 		case Common::KEYCODE_F3:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_LOOK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			if (_G(menu_display) == MENU_EINBLENDEN)
 				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
@@ -316,7 +288,7 @@ bool main_loop(int16 mode) {
 		case Common::KEYCODE_F4:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_TALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			if (_G(menu_display) == MENU_EINBLENDEN)
 				_G(menu_display) = MENU_AUSBLENDEN;
 			break;
@@ -327,19 +299,19 @@ bool main_loop(int16 mode) {
 			_G(maus_old_x) = _G(minfo).x;
 			_G(maus_old_y) = _G(minfo).y;
 			_G(menu_item) = CUR_USE;
-			menu_entry();
+			menuEntry();
 			Dialogs::Inventory::menu();
-			menu_exit();
+			menuExit();
 			_G(menu_flag) = MENU_AUSBLENDEN;
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
 				_G(menu_item) = _G(tmp_menu_item);
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				_G(spieler).inv_cur = false;
 			} else {
 				_G(menu_item) = CUR_USE;
-				cursor_wahl(CUR_AK_INVENT);
+				cursorChoice(CUR_AK_INVENT);
 
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
@@ -353,15 +325,15 @@ bool main_loop(int16 mode) {
 			_G(out)->set_pointer(_G(screen0));
 			_G(out)->set_fontadr(_G(font6x8));
 			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
-			cursor_wahl(CUR_SAVE);
+			cursorChoice(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
-				ende = true;
+				retValue = true;
 				_G(fx_blend) = BLEND4;
 			}
 			if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
-				cursor_wahl(CUR_AK_INVENT);
+				cursorChoice(CUR_AK_INVENT);
 			} else
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 			_G(cur_display) = true;
 			_G(flags).SaveMenu = false;
 			_G(cur)->show_cur();
@@ -370,7 +342,7 @@ bool main_loop(int16 mode) {
 
 		case Common::KEYCODE_ESCAPE:
 			if (_G(menu_display) == 0) {
-				menu_entry();
+				menuEntry();
 				_G(tmp_menu_item) = _G(menu_item);
 				_G(maus_old_x) = _G(minfo).x;
 				_G(maus_old_y) = _G(minfo).y;
@@ -379,13 +351,13 @@ bool main_loop(int16 mode) {
 				_G(cur_display) = false;
 				_G(cur)->move(_G(maus_menu_x), 100);
 			} else {
-				menu_exit();
+				menuExit();
 				_G(menu_item) = _G(tmp_menu_item);
 				_G(menu_display) = MENU_AUSBLENDEN;
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
-					cursor_wahl(CUR_AK_INVENT);
+					cursorChoice(CUR_AK_INVENT);
 				} else
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 			}
 			break;
 
@@ -394,19 +366,19 @@ bool main_loop(int16 mode) {
 			case CUR_INVENT:
 
 				_G(menu_item) = CUR_USE;
-				menu_entry();
+				menuEntry();
 				Dialogs::Inventory::menu();
-				menu_exit();
+				menuExit();
 				_G(menu_flag) = MENU_AUSBLENDEN;
 				_G(menu_display) = 0;
 				_G(cur_display) = true;
 				if (_G(spieler).AkInvent == -1) {
 					_G(menu_item) = _G(tmp_menu_item);
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 					_G(spieler).inv_cur = false;
 				} else {
 					_G(menu_item) = CUR_USE;
-					cursor_wahl(CUR_AK_INVENT);
+					cursorChoice(CUR_AK_INVENT);
 					get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 				}
 				break;
@@ -421,10 +393,10 @@ bool main_loop(int16 mode) {
 				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
 
 				_G(out)->set_pointer(_G(screen0));
-				cursor_wahl(CUR_SAVE);
+				cursorChoice(CUR_SAVE);
 				int16 ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
-					ende = true;
+					retValue = true;
 					_G(fx_blend) = BLEND4;
 				}
 
@@ -433,9 +405,9 @@ bool main_loop(int16 mode) {
 				_G(menu_display) = MENU_AUSBLENDEN;
 
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
-					cursor_wahl(CUR_AK_INVENT);
+					cursorChoice(CUR_AK_INVENT);
 				} else
-					cursor_wahl(_G(tmp_menu_item));
+					cursorChoice(_G(tmp_menu_item));
 				_G(cur_display) = true;
 
 				_G(flags).SaveMenu = false;
@@ -445,7 +417,7 @@ bool main_loop(int16 mode) {
 
 			default:
 				if (_G(menu_display) != 0) {
-					menu_exit();
+					menuExit();
 					_G(menu_flag) = MENU_AUSBLENDEN;
 					_G(menu_display) = 0;
 					_G(cur_display) = true;
@@ -453,7 +425,7 @@ bool main_loop(int16 mode) {
 					_G(minfo).x = _G(maus_old_x);
 					_G(minfo).y = _G(maus_old_y);
 					_G(spieler).inv_cur = false;
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 				}
 				break;
 			}
@@ -484,7 +456,7 @@ bool main_loop(int16 mode) {
 		}
 
 		if (_G(menu_display) == MENU_AUSBLENDEN) {
-			menu_exit();
+			menuExit();
 			_G(menu_flag) = MENU_AUSBLENDEN;
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
@@ -498,7 +470,7 @@ bool main_loop(int16 mode) {
 	if (mode == DO_SETUP)
 		set_up_screen(DO_MAIN_LOOP);
 
-	return ende;
+	return retValue;
 }
 
 static void showWalkAreas() {
@@ -770,7 +742,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 						_G(spieler).inv_cur = false;
 						_G(menu_item) = CUR_WALK;
-						cursor_wahl(_G(menu_item));
+						cursorChoice(_G(menu_item));
 						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 
 						if (_G(spieler).AkInvent != -1)
@@ -790,7 +762,7 @@ void kb_mov(int16 mode) {
 	while (!ende) {
 		switch (_G(in)->get_switch_code()) {
 		case Common::KEYCODE_RIGHT:
-			if (_G(minfo).x < 320 - _G(spieler).CurBreite)
+			if (_G(minfo).x < 320 - _G(spieler)._curWidth)
 				_G(minfo).x += 2;
 			break;
 
@@ -805,7 +777,7 @@ void kb_mov(int16 mode) {
 			break;
 
 		case Common::KEYCODE_DOWN:
-			if (_G(minfo).y < 210 - _G(spieler).CurHoehe)
+			if (_G(minfo).y < 210 - _G(spieler)._curHeight)
 				_G(minfo).y += 2;
 			break;
 
@@ -866,7 +838,7 @@ void kb_cur_action(int16 key, int16 mode) {
 	}
 }
 
-void maus_action() {
+void mouseAction() {
 	int16 x = _G(minfo).x;
 	int16 y = _G(minfo).y;
 	if (x > invent_display[_G(spieler).InvDisp][0] &&
@@ -874,12 +846,12 @@ void maus_action() {
 	        y > invent_display[_G(spieler).InvDisp][1] &&
 	        y < invent_display[_G(spieler).InvDisp][1] + 48) {
 		if (!_G(spieler).inv_cur && !_G(inv_disp_ok) && _G(spieler).AkInvent != -1) {
-			cursor_wahl(CUR_USE);
+			cursorChoice(CUR_USE);
 		}
 		_G(inv_disp_ok) = true;
 	} else {
 		if (!_G(spieler).inv_cur && _G(inv_disp_ok)) {
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 		}
 		_G(inv_disp_ok) = false;
 	}
@@ -898,11 +870,11 @@ void maus_action() {
 						if (_G(inv_disp_ok)) {
 							if (_G(spieler).inv_cur) {
 								_G(menu_item) = CUR_USE;
-								cursor_wahl(_G(menu_item));
+								cursorChoice(_G(menu_item));
 								_G(spieler).inv_cur = false;
 							} else {
 								_G(menu_item) = CUR_USE;
-								cursor_wahl(CUR_AK_INVENT);
+								cursorChoice(CUR_AK_INVENT);
 								_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 							}
 						} else if (!_G(flags).MausLinks)
@@ -928,7 +900,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case INVENTAR_NORMAL:
 		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
-			hide_cur();
+			hideCur();
 			if (_G(flags).InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 					_G(maus_links_click) = false;
@@ -942,7 +914,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 			}
-			show_cur();
+			showCur();
 		}
 		break;
 
@@ -950,7 +922,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		ret = _G(obj)->action_iib_sib(_G(spieler).AkInvent, test_nr);
 		if (ret != NO_ACTION) {
 			_G(maus_links_click) = false;
-			hide_cur();
+			hideCur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
@@ -973,12 +945,12 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
-			show_cur();
+			showCur();
 			sib_event_inv(test_nr);
 
 			if (!_G(spieler).inv_cur) {
 				_G(menu_item) = _G(menu_item_vorwahl);
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 			}
 			_G(obj)->calc_all_static_detail();
 		}
@@ -988,7 +960,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		ret = _G(obj)->calc_static_use(test_nr);
 		if (ret == OBJECT_1) {
 			_G(maus_links_click) = false;
-			hide_cur();
+			hideCur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
@@ -1018,7 +990,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				action_flag = true;
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
-			show_cur();
+			showCur();
 			int16 sib_ret = sib_event_no_inv(test_nr);
 
 			_G(obj)->calc_all_static_detail();
@@ -1027,12 +999,12 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 				if (sib_ret || action_flag) {
 					_G(menu_item) = _G(menu_item_vorwahl);
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 				}
 			}
 		} else if (ret == SIB_GET_INV) {
 			_G(maus_links_click) = false;
-			hide_cur();
+			hideCur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
@@ -1061,12 +1033,12 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
 			_G(obj)->calc_rsi_flip_flop(test_nr);
 			_G(menu_item_vorwahl) = CUR_WALK;
-			show_cur();
+			showCur();
 			sib_event_no_inv(test_nr);
 			_G(obj)->calc_all_static_detail();
 			if (!_G(spieler).inv_cur) {
 				_G(menu_item) = _G(menu_item_vorwahl);
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 			}
 		} else if (ret == NO_ACTION) {
 			txt_nr = _G(obj)->sib_txt_nr(test_nr);
@@ -1662,7 +1634,7 @@ void calc_ani_timer() {
 
 void get_user_key(int16 mode) {
 	_G(flags).StopAutoObj = true;
-	maus_action();
+	mouseAction();
 	_G(maus_links_click) = false;
 
 	if (!_G(inv_disp_ok)) {
@@ -1681,11 +1653,11 @@ void get_user_key(int16 mode) {
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
 				_G(menu_item) = _G(tmp_menu_item);
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				_G(spieler).inv_cur = false;
 			} else {
 				_G(menu_item) = CUR_USE;
-				cursor_wahl(CUR_AK_INVENT);
+				cursorChoice(CUR_AK_INVENT);
 
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
@@ -1719,7 +1691,7 @@ void del_inventar(int16 nr) {
 	_G(spieler).inv_cur = false;
 	_G(menu_item) = CUR_WALK;
 	_G(spieler).AkInvent = -1;
-	cursor_wahl(_G(menu_item));
+	cursorChoice(_G(menu_item));
 	del_invent_slot(nr);
 	_G(maus_links_click) = false;
 }
@@ -1742,22 +1714,22 @@ void check_mouse_ausgang(int16 x, int16 y) {
 		switch (attr) {
 		case AUSGANG_LINKS:
 			_G(cur_ausgang_flag) = AUSGANG_LINKS;
-			cursor_wahl(CUR_AUSGANG_LINKS);
+			cursorChoice(CUR_AUSGANG_LINKS);
 			break;
 
 		case AUSGANG_RECHTS:
 			_G(cur_ausgang_flag) = AUSGANG_RECHTS;
-			cursor_wahl(CUR_AUSGANG_RECHTS);
+			cursorChoice(CUR_AUSGANG_RECHTS);
 			break;
 
 		case AUSGANG_OBEN:
 			_G(cur_ausgang_flag) = AUSGANG_OBEN;
-			cursor_wahl(CUR_AUSGANG_OBEN);
+			cursorChoice(CUR_AUSGANG_OBEN);
 			break;
 
 		case AUSGANG_UNTEN:
 			_G(cur_ausgang_flag) = AUSGANG_UNTEN;
-			cursor_wahl(CUR_AUSGANG_UNTEN);
+			cursorChoice(CUR_AUSGANG_UNTEN);
 			break;
 
 		default:
@@ -1766,7 +1738,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 		}
 
 		if (_G(cur_ausgang_flag) && !found) {
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			_G(cur_ausgang_flag) = false;
 		}
 	}
@@ -1781,7 +1753,7 @@ void calc_ausgang(int16 x, int16 y) {
 			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
 				_G(flags).ShowAtsInvTxt = false;
 				_G(menu_item) = CUR_DISK;
-				cursor_wahl(CUR_DISK);
+				cursorChoice(CUR_DISK);
 				set_up_screen(DO_SETUP);
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
@@ -1810,7 +1782,7 @@ void calc_ausgang(int16 x, int16 y) {
 				_G(spieler_vector)[P_CHEWY].Yzoom = 0;
 				_G(flags).ShowAtsInvTxt = true;
 				_G(menu_item) = CUR_WALK;
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				_G(flags).ExitMov = false;
 				enter_room(nr);
 			}
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index c748c4208f9..3bbe32cdce8 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -23,8 +23,6 @@
 #define CHEWY_MAIN_H
 
 #include "graphics/surface.h"
-#include "common/rect.h"
-#include "chewy/defines.h"
 #include "chewy/globals.h"
 
 namespace Chewy {
@@ -32,15 +30,14 @@ namespace Chewy {
 void game_main();
 void free_buffers();
 void plot_main_menu();
-void test_menu();
 void palcopy(byte *dipal, const byte *sipal, int16 distart,
              int16 sistart, int16 anz);
 short calc_maus_txt(int16 x, int16 y, int16 mode);
 void calc_ani_timer();
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr);
 int16 get_ani_richtung(int16 zustand);
-void menu_entry();
-void menu_exit();
+void menuEntry();
+void menuExit();
 
 
 class ChewyFont {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 978c7101c66..923c367c400 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -322,7 +322,7 @@ void cur_2_inventory() {
 		invent_2_slot(_G(spieler).AkInvent);
 		_G(spieler).AkInvent = -1;
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 	}
 	_G(spieler).inv_cur = false;
 }
@@ -332,7 +332,7 @@ void inventory_2_cur(int16 nr) {
 		del_invent_slot(nr);
 		_G(menu_item) = CUR_USE;
 		_G(spieler).AkInvent = nr;
-		cursor_wahl(CUR_AK_INVENT);
+		cursorChoice(CUR_AK_INVENT);
 		get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 	}
 }
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1e51b814123..a5c7941edd1 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -511,7 +511,7 @@ void exit_room(int16 eib_nr) {
 			break;
 		}
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		_G(maus_links_click) = false;
 		break;
 
@@ -2036,11 +2036,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	case 94:
 		_G(det)->show_static_spr(7);
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		start_aad_wait(406, -1);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
 			start_aad_wait(613, -1);
-		show_cur();
+		showCur();
 		break;
 
 	case 100:
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index e2678b46d2f..7c1695c2c1d 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -100,12 +100,12 @@ static const uint8 CHEWY_JM_PHASEN[8][8] = {
 
 void JungleRoom::topEntry() {
 	_G(cur_hide_flag) = 0;
-	hide_cur();
+	hideCur();
 	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
 	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
 	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
-	show_cur();
+	showCur();
 }
 
 void JungleRoom::leftEntry() {
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 28d70e6660c..c703c999a12 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -55,7 +55,7 @@ void Room0::entry() {
 	if (!_G(flags).LoadGame) {
 		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
 		_G(cur_hide_flag) = 0;
-		hide_cur();
+		hideCur();
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 3);
 
 		while (!_G(ani_timer)[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
@@ -65,7 +65,7 @@ void Room0::entry() {
 		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(2, -1);
 
-		show_cur();
+		showCur();
 	}
 }
 
@@ -125,18 +125,18 @@ bool Room0::getPillow() {
 	bool retval = false;
 	
 	if (!_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		_G(flags).AutoAniPlay = true;
 		auto_move(1, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(CUR_WALK);
+		cursorChoice(CUR_WALK);
 		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(det)->hide_static_spr(6);
 
 		_G(flags).AutoAniPlay = false;
-		show_cur();
+		showCur();
 		retval = true;
 	}
 
@@ -146,7 +146,7 @@ bool Room0::getPillow() {
 bool Room0::pullSlime() {
 	bool retval = false;
 	if (!_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		
 		_G(flags).AutoAniPlay = true;
 		auto_move(2, P_CHEWY);
@@ -157,11 +157,11 @@ bool Room0::pullSlime() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(CUR_WALK);
+		cursorChoice(CUR_WALK);
 		_G(atds)->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
 
 		_G(flags).AutoAniPlay = false;
-		show_cur();
+		showCur();
 		retval = true;
 	}
 
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index abdd87c0389..7ead055745f 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -95,7 +95,7 @@ void Room3::entry() {
 }
 
 void Room3::terminal() {
-	show_cur();
+	showCur();
 	_G(auto_obj) = 0;
 	switch (Room4::sonde_comp()) {
 	case 0:
@@ -181,7 +181,7 @@ void Room3::sonde_knarre() {
 		{ {   4, 100, 180 }, 1, 3 },
 		{ {  13,  45,  75 }, 1, 3 }
 	};
-	hide_cur();
+	hideCur();
 	RoomDetailInfo *rdi = _G(det)->get_room_detail_info();
 
 	_G(det)->load_taf_seq(162, 17, nullptr);
@@ -270,7 +270,7 @@ void Room3::sonde_knarre() {
 	_G(zoom_horizont) = tmp;
 	init_sonde();
 
-	show_cur();
+	showCur();
 }
 
 void Room3::probeTransfer() {
@@ -293,7 +293,7 @@ void Room3::probeTransfer() {
 	};
 
 	_G(flags).AniUserAction = false;
-	hide_cur();
+	hideCur();
 	_G(det)->get_room_detail_info();
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
@@ -384,7 +384,7 @@ void Room3::probeTransfer() {
 
 		switch (i) {
 		case 0:
-			show_cur();
+			showCur();
 			start_aad(52);
 			_G(flags).AniUserAction = true;
 			spr_nr = 141;
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index e250d187094..a02cd03be69 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -59,7 +59,7 @@ int16 Room4::sonde_comp() {
 
 	start_aad(46);
 	while (!ende) {
-		maus_action();
+		mouseAction();
 		if (_G(maus_links_click)) {
 			switch (_G(in)->mouseVector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
@@ -101,9 +101,9 @@ int16 Room4::sonde_comp() {
 			_G(curani).ani_anf = HAND_NORMAL;
 			_G(curani).ani_end = HAND_NORMAL;
 		}
-		cursor_wahl(CUR_USER);
-		_G(spieler).CurHoehe = 16;
-		_G(in)->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
+		cursorChoice(CUR_USER);
+		_G(spieler)._curHeight = 16;
+		_G(in)->rectangle(0, 123, 320 - _G(spieler)._curWidth, 194);
 
 		if (_G(minfo).y < 124)
 			_G(minfo).y = 123;
@@ -116,7 +116,7 @@ int16 Room4::sonde_comp() {
 	clear_prog_ani();
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(_G(menu_item));
+	cursorChoice(_G(menu_item));
 
 	_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index f08c68e5656..eefc790d7d1 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -65,7 +65,7 @@ void Room6::entry() {
 			++_G(spieler).R6RaumBetreten;
 
 		if (_G(spieler).R6RaumBetreten == 2) {
-			hide_cur();
+			hideCur();
 			_G(det)->stop_detail(7);
 			init_robo();
 			wait_auto_obj(0);
@@ -73,7 +73,7 @@ void Room6::entry() {
 			_G(obj)->show_sib(SIB_BOLA_KNOPF_R6);
 			_G(obj)->hide_sib(SIB_BOLA_R6);
 			_G(atds)->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
-			show_cur();
+			showCur();
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 19c1f97af01..daee225ebeb 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -52,7 +52,7 @@ void Room7::haken(int16 sib_nr) {
 	del_inventar(8);
 	_G(spieler).AkInvent = -1;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(_G(menu_item));
+	cursorChoice(_G(menu_item));
 
 	if (_G(spieler).R7RHaken) {
 		_G(spieler).R7SeilOk = true;
@@ -74,7 +74,7 @@ void Room7::haken(int16 sib_nr) {
 }
 
 void Room7::klingel() {
-	hide_cur();
+	hideCur();
 	
 	if ((!_G(spieler).R7BellCount) ||
 		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft && !_G(spieler).R7SeilOk)) {
@@ -166,7 +166,7 @@ void Room7::klingel() {
 
 	++_G(spieler).R7BellCount;
 
-	show_cur();
+	showCur();
 }
 
 void Room7::gedAction(int index) {
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index b774d4cd279..fd601712b11 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -69,7 +69,7 @@ void Room8::hole_kohle() {
 	if (_G(spieler).R8Kohle) {
 		start_aad_wait(604, -1);
 	} else {
-		hide_cur();
+		hideCur();
 		_G(spieler).R8Kohle = true;
 		auto_move(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -77,12 +77,12 @@ void Room8::hole_kohle() {
 		cur_2_inventory();
 		invent_2_slot(KOHLE_HEISS_INV);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		show_cur();
+		showCur();
 	}
 }
 
 void Room8::start_verbrennen() {
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).inv_cur) {
 		auto_move(3, P_CHEWY);
@@ -108,14 +108,14 @@ void Room8::start_verbrennen() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 
-	show_cur();
+	showCur();
 }
 
 bool Room8::gips_wurf() {
 	bool actionFl = false;
 	
 	if (is_cur_inventar(GIPS_EIMER_INV)) {
-		hide_cur();
+		hideCur();
 		actionFl = true;
 		_G(det)->load_taf_seq(116, 30, nullptr);
 		auto_move(2, P_CHEWY);
@@ -144,8 +144,8 @@ bool Room8::gips_wurf() {
 		start_detail_wait(20, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
-		cursor_wahl(_G(menu_item));
-		show_cur();
+		cursorChoice(_G(menu_item));
+		showCur();
 	}
 
 	return actionFl;
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 02b203244a8..d119312834c 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -72,7 +72,7 @@ void Room9::gtuer() {
 }
 
 void Room9::surimy() {
-	hide_cur();
+	hideCur();
 	_G(spieler).R9Surimy = true;
 	const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 	stop_person(P_CHEWY);
@@ -86,7 +86,7 @@ void Room9::surimy() {
 	_G(spieler_vector)[P_CHEWY].Count = tmp;
 	get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 	_G(mov)->continue_auto_go();
-	show_cur();
+	showCur();
 }
 
 void Room9::surimy_ani() {
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 3ecc30d8bb8..28216cb7836 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -39,10 +39,10 @@ void Room10::entry() {
 		flic_cut(FCUT_003);
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
-		hide_cur();
+		hideCur();
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(101, 0);
-		show_cur();
+		showCur();
 
 	} else if (_G(spieler).R10SurimyOk) {
 		_G(room)->set_timer_status(3, TIMER_STOP);
@@ -50,7 +50,7 @@ void Room10::entry() {
 }
 
 void Room10::get_surimy() {
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 	start_aad(104, 0);
 	flic_cut(FCUT_005);
@@ -60,7 +60,7 @@ void Room10::get_surimy() {
 	invent_2_slot(18);
 
 	del_inventar(_G(spieler).AkInvent);
-	show_cur();
+	showCur();
 }
 
 int16 Room10::cut_serv(int16 frame) {
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 03ab624601a..0c42826ba27 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -109,7 +109,7 @@ void Room11::talk_debug() {
 		auto_move(8, P_CHEWY);
 		start_ads_wait(5);
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(CUR_WALK);
+		cursorChoice(CUR_WALK);
 
 		_G(flags).AutoAniPlay = false;
 	}
@@ -117,7 +117,7 @@ void Room11::talk_debug() {
 
 void Room11::chewy_bo_use() {
 	if (_G(spieler).R12ChewyBork) {
-		hide_cur();
+		hideCur();
 		_G(flags).AutoAniPlay = true;
 
 		stop_person(P_CHEWY);
@@ -129,7 +129,7 @@ void Room11::chewy_bo_use() {
 		auto_move(6, P_CHEWY);
 
 		_G(flags).AutoAniPlay = false;
-		show_cur();
+		showCur();
 	}
 }
 
@@ -143,7 +143,7 @@ int16 Room11::scanner() {
 			actionFl = true;
 			start_aad_wait(13, -1);
 		} else if (is_cur_inventar(BORK_INV)) {
-			hide_cur();
+			hideCur();
 			set_up_screen(DO_SETUP);
 			actionFl = true;
 
@@ -153,9 +153,9 @@ int16 Room11::scanner() {
 			_G(spieler).R11TerminalOk = true;
 			cur_2_inventory();
 			_G(menu_item) = CUR_TALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			start_aad_wait(12, -1);
-			show_cur();
+			showCur();
 			load_ads_dia(3);
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
@@ -166,7 +166,7 @@ int16 Room11::scanner() {
 				actionFl = true;
 				start_aad_wait(12, -1);
 				_G(menu_item) = CUR_TALK;
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				load_ads_dia(3);
 			}
 		}
@@ -182,8 +182,8 @@ void Room11::get_card() {
 		_G(obj)->addInventory(_G(spieler).R11IdCardNr, &_G(room_blk));
 
 		_G(spieler).AkInvent = _G(spieler).R11IdCardNr;
-		cursor_wahl(CUR_AK_INVENT);
-		cursor_wahl(CUR_AK_INVENT);
+		cursorChoice(CUR_AK_INVENT);
+		cursorChoice(CUR_AK_INVENT);
 		_G(det)->stop_detail(0);
 		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
 		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index ac5f37e2242..0bfdaddd14a 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -69,7 +69,7 @@ void Room12::entry() {
 
 	if (!_G(spieler).R12Betreten) {
 		_G(spieler).R12Betreten = true;
-		hide_cur();
+		hideCur();
 
 		for (int16 i = 7; i < 10; i++)
 			_G(det)->show_static_spr(i);
@@ -88,7 +88,7 @@ void Room12::entry() {
 		auto_move(5, P_CHEWY);
 		start_spz(CH_TALK12, 255, false, 0);
 		start_aad_wait(109, -1);
-		show_cur();
+		showCur();
 
 	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
@@ -125,7 +125,7 @@ void Room12::init_bork() {
 			init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 5, (const MovLine *)R12_BORK_MPKT);
 
 			if (!_G(spieler).R12TalismanOk) {
-				hide_cur();
+				hideCur();
 				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
 				auto_move(5, P_CHEWY);
 				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
@@ -139,7 +139,7 @@ void Room12::init_bork() {
 				}
 
 				wait_auto_obj(R12_BORK_OBJ);
-				show_cur();
+				showCur();
 			} else {
 				bork_ok();
 			}
@@ -156,7 +156,7 @@ void Room12::talk_bork() {
 }
 
 void Room12::bork_ok() {
-	hide_cur();
+	hideCur();
 	_G(flags).MausLinks = true;
 	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
 	auto_move(5, P_CHEWY);
@@ -186,7 +186,7 @@ void Room12::bork_ok() {
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
 	_G(flags).MausLinks = false;
-	show_cur();
+	showCur();
 }
 
 int16 Room12::use_terminal() {
@@ -211,7 +211,7 @@ int16 Room12::use_terminal() {
 				_G(atds)->set_ats_str(118, 0, ATS_DATEI);
 				_G(det)->hide_static_spr(12);
 				_G(menu_item) = CUR_WALK;
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				set_person_pos(108, 90, P_CHEWY, -1);
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 00490f3b8dc..9397cd3641f 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -120,9 +120,9 @@ void Room14::talk_eremit()  {
 			load_ads_dia(0);
 			_G(obj)->show_sib(46);
 		} else {
-			hide_cur();
+			hideCur();
 			start_aad_wait(24, -1);
-			show_cur();
+			showCur();
 			_G(flags).AutoAniPlay = false;
 		}
 	}
@@ -154,7 +154,7 @@ void Room14::feuer() {
 	_G(spieler).R14Feuer = true;
 	_G(cur_hide_flag) = false;
 	_G(flags).AutoAniPlay = true;
-	hide_cur();
+	hideCur();
 
 	if (is_cur_inventar(BWAFFE_INV)) {
 		auto_move(5, P_CHEWY);
@@ -191,7 +191,7 @@ void Room14::feuer() {
 	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
 	_G(spieler).R14FluxoFlex = true;
 	_G(flags).AutoAniPlay = false;
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 14a56fa9f4a..4359fa2c63c 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -139,7 +139,7 @@ int16 Room17::use_seil() {
 
 	if (!_G(flags).AutoAniPlay && _G(spieler).R17Location == 1 && is_cur_inventar(SEIL_INV)) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 
 		del_inventar(_G(spieler).AkInvent);
 		_G(flags).AutoAniPlay = true;
@@ -154,7 +154,7 @@ int16 Room17::use_seil() {
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(119, -1);
 
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -212,7 +212,7 @@ void Room17::calc_seil() {
 			_G(auto_mov_obj)[CHEWY_OBJ].Id = AUTO_OBJ0;
 			_G(auto_mov_vector)[CHEWY_OBJ].Delay = _G(spieler).DelaySpeed;
 			_G(auto_mov_obj)[CHEWY_OBJ].Mode = true;
-			hide_cur();
+			hideCur();
 
 			if (_G(spieler).R17Location == 1) {
 				kletter_down();
@@ -223,9 +223,9 @@ void Room17::calc_seil() {
 			}
 
 			_G(menu_item) = CUR_WALK;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			wait_auto_obj(CHEWY_OBJ);
-			show_cur();
+			showCur();
 			set_person_spr(P_LEFT, P_CHEWY);
 			_G(spieler).ScrollyStep = 1;
 			_G(spieler).PersonHide[P_CHEWY] = false;
@@ -270,7 +270,7 @@ void Room17::close_door() {
 int16 Room17::energie_hebel() {
 	int16 action_flag = false;
 
-	hide_cur();
+	hideCur();
 	auto_move(7, P_CHEWY);
 
 	if (!_G(spieler).R17HebelOk) {
@@ -308,13 +308,13 @@ int16 Room17::energie_hebel() {
 		}
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
 int16 Room17::get_oel() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
@@ -333,7 +333,7 @@ int16 Room17::get_oel() {
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index b93e44c7a02..3bb7a75cc75 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -133,7 +133,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 			_G(det)->show_static_spr(16);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
-			hide_cur();
+			hideCur();
 			_G(det)->hide_static_spr(17);
 			start_detail_wait(9, 1, ANI_VOR);
 			_G(det)->show_static_spr(17);
@@ -151,7 +151,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 				monitor();
 			}
 
-			show_cur();
+			showCur();
 			_G(uhr)->reset_timer(_G(timer_nr)[1], 15);
 		}
 
@@ -204,7 +204,7 @@ int16 Room18::sonden_moni() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		auto_move(8, P_CHEWY);
 		start_detail_wait(3, 1, ANI_VOR);
 		_G(det)->show_static_spr(10);
@@ -218,7 +218,7 @@ int16 Room18::sonden_moni() {
 		for (int16 i = 0; i < 5; i++)
 			_G(det)->hide_static_spr(i + 10);
 
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
@@ -229,7 +229,7 @@ int16 Room18::calc_surimy() {
 	if (is_cur_inventar(SURIMY_INV)) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
 		_G(det)->load_taf_seq(245, 50, nullptr);
@@ -318,7 +318,7 @@ int16 Room18::calc_surimy() {
 			_G(atds)->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
 
 		_G(atds)->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATEI);
-		show_cur();
+		showCur();
 		_G(det)->del_taf_tbl(245, 50, nullptr);
 	}
 
@@ -331,10 +331,10 @@ int16 Room18::calc_schalter() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		auto_move(6, P_CHEWY);
 		monitor();
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -346,7 +346,7 @@ short Room18::use_cart_moni() {
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		auto_move(9, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -368,7 +368,7 @@ short Room18::use_cart_moni() {
 			}
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -380,10 +380,10 @@ int16 Room18::go_cyberspace() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R18Gitter) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		auto_move(7, P_CHEWY);
 		cur_2_inventory();
-		show_cur();
+		showCur();
 
 		switch_room(24);
 	}
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 4ee95c35a0b..721db5a20a5 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -81,7 +81,7 @@ int16 Room22::chewy_amboss() {
 	if (!_G(spieler).R22ChewyPlatt && !_G(spieler).inv_cur && !_G(flags).AutoAniPlay) {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
-		hide_cur();
+		hideCur();
 
 		auto_move(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -94,7 +94,7 @@ int16 Room22::chewy_amboss() {
 		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
 		_G(flags).AutoAniPlay = false;
 
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
@@ -104,7 +104,7 @@ void Room22::bork(int16 t_nr) {
 		_G(flags).AutoAniPlay = true;
 
 		if (!_G(spieler).R22BorkPlatt) {
-			hide_cur();
+			hideCur();
 			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(10, -1);
 			auto_move(3, P_CHEWY);
@@ -128,7 +128,7 @@ void Room22::bork(int16 t_nr) {
 				bork_walk2();
 			}
 
-			show_cur();
+			showCur();
 		}
 
 		_G(uhr)->reset_timer(t_nr, 0);
@@ -174,7 +174,7 @@ void Room22::get_bork() {
 
 		_G(spieler).R22GetBork = true;
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 	}
 }
 
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 52dd0ccdc0b..a16e3122c8c 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -77,7 +77,7 @@ int16 Room23::start_gleiter() {
 			}
 
 			if (start_ok) {
-				hide_cur();
+				hideCur();
 				start_ani_block(4, ABLOCK15);
 				wait_show_screen(30);
 
@@ -119,7 +119,7 @@ int16 Room23::start_gleiter() {
 					switch_room(_G(spieler).R23GleiterExit);
 				}
 
-				show_cur();
+				showCur();
 			}
 		}
 	}
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 59a86c59498..9588b5964f4 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -45,7 +45,7 @@ void Room24::entry() {
 	_G(curani).ani_anf = 7;
 	_G(curani).ani_end = 10;
 	_G(menu_item) = CUR_USER;
-	cursor_wahl(CUR_USER);
+	cursorChoice(CUR_USER);
 
 	if (_G(spieler).R16F5Exit)
 		_G(det)->show_static_spr(10);
@@ -64,7 +64,7 @@ void Room24::entry() {
 void Room24::xit() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(_G(menu_item));
+	cursorChoice(_G(menu_item));
 	set_person_pos(263, 144, P_CHEWY, -1);
 	_G(spieler).scrollx = 88;
 	_G(maus_links_click) = false;
@@ -125,7 +125,7 @@ void Room24::calc_hebel_spr() {
 
 void Room24::calc_animation(int16 kristall_nr) {
 	if (kristall_nr != 255) {
-		hide_cur();
+		hideCur();
 
 		if (KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 20) {
 			int16 ani_nr = _G(spieler).R24KristallLast[kristall_nr] == 13 ? 7 : 8;
@@ -145,7 +145,7 @@ void Room24::calc_animation(int16 kristall_nr) {
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	for (int16 i = 0; i < 6; i++)
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 34871cb9d8a..f02836a3be6 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -57,7 +57,7 @@ void Room25::entry() {
 	}
 
 	if (!_G(spieler).R25FirstEntry) {
-		hide_cur();
+		hideCur();
 
 		if (_G(obj)->checkInventory(TRANSLATOR_INV)) {
 			_G(obj)->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
@@ -67,7 +67,7 @@ void Room25::entry() {
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_WALK;
 			_G(spieler).AkInvent = -1;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 		}
 
 		_G(spieler).R25FirstEntry = true;
@@ -79,7 +79,7 @@ void Room25::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(64, -1);
-		show_cur();
+		showCur();
 
 	} else if (_G(spieler).R25GleiterExit && !_G(flags).LoadGame) {
 		set_person_pos(127, 122, P_CHEWY, P_LEFT);
@@ -95,7 +95,7 @@ void Room25::entry() {
 
 int16 Room25::gleiter_loesch() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).R25GleiteLoesch && _G(spieler).R29Schlauch2) {
 		if (!_G(spieler).inv_cur) {
@@ -125,7 +125,7 @@ int16 Room25::gleiter_loesch() {
 		}
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
@@ -134,9 +134,9 @@ int16 Room25::use_gleiter() {
 
 	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		auto_move(3, P_CHEWY);
-		show_cur();
+		showCur();
 
 		_G(spieler).R23GleiterExit = 25;
 		Room23::cockpit();
@@ -146,7 +146,7 @@ int16 Room25::use_gleiter() {
 
 void Room25::xit_gleiter() {
 	if (!_G(spieler).R25SurimyLauf) {
-		hide_cur();
+		hideCur();
 		_G(spieler).R25SurimyLauf = true;
 		_G(det)->load_taf_seq(56, 8, nullptr);
 		_G(auto_obj) = 1;
@@ -167,7 +167,7 @@ void Room25::xit_gleiter() {
 		wait_auto_obj(SURIMY_OBJ);
 		_G(auto_obj) = 0;
 
-		show_cur();
+		showCur();
 	}
 }
 
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index c805c2ea7d7..43e966b47a3 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -43,7 +43,7 @@ void Room27::entry() {
 
 void Room27::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
@@ -59,27 +59,27 @@ void Room27::xit(int16 eib_nr) {
 		}
 	}
 
-	show_cur();
+	showCur();
 }
 
 void Room27::get_surimy() {
 	_G(obj)->calc_all_static_detail();
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		start_aad_wait(171, -1);
 	}
 
-	show_cur();
+	showCur();
 	_G(obj)->hide_sib(SIB_SURIMY_R27);
 }
 
 void Room27::talk_howard() {
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 	start_aad_wait(173, -1);
-	show_cur();
+	showCur();
 }
 
 void Room27::howard_ged() {
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index f2615d37e39..b9463092808 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -48,7 +48,7 @@ void Room28::entry(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
-		hide_cur();
+		hideCur();
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).R40Wettbewerb) {
@@ -134,14 +134,14 @@ void Room28::entry(int16 eib_nr) {
 			}
 		}
 
-		show_cur();
+		showCur();
 	}
 }
 
 void Room28::xit(int16 eib_nr) {
 	_G(spieler).R28PostCar = false;
 	_G(spieler).ScrollxStep = 1;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
 		_G(SetUpScreenFunc) = nullptr;
@@ -155,7 +155,7 @@ void Room28::xit(int16 eib_nr) {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 	}
 
-	show_cur();
+	showCur();
 }
 
 void Room28::gedAction(int index) {
@@ -164,7 +164,7 @@ void Room28::gedAction(int index) {
 }
 
 void Room28::haendler() {
-	hide_cur();
+	hideCur();
 	_G(SetUpScreenFunc) = nullptr;
 	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
@@ -190,7 +190,7 @@ void Room28::haendler() {
 	start_aad_wait(198, -1);
 	_G(SetUpScreenFunc) = setup_func;
 	auto_move(4, P_CHEWY);
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	set_person_spr(P_RIGHT, P_CHEWY);
 	_G(det)->del_static_ani(4);
@@ -211,7 +211,7 @@ void Room28::use_surimy() {
 	int16 ani_nr;
 
 	if (!_G(spieler).R28SurimyCar) {
-		hide_cur();
+		hideCur();
 		_G(flags).NoScroll = true;
 		auto_scroll(0, 0);
 		_G(spieler).R28SurimyCar = true;
@@ -233,11 +233,11 @@ void Room28::use_surimy() {
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
 	_G(flags).NoScroll = false;
-	show_cur();
+	showCur();
 }
 
 void Room28::set_pump() {
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
 		if (!_G(flags).AutoAniPlay) {
@@ -283,13 +283,13 @@ void Room28::set_pump() {
 		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
 	}
 
-	show_cur();
+	showCur();
 }
 
 void Room28::get_pump() {
 
 	if (_G(spieler).R28ChewyPump) {
-		hide_cur();
+		hideCur();
 
 		stop_person(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
@@ -309,7 +309,7 @@ void Room28::get_pump() {
 			start_aad_wait(138, -1);
 		}
 
-		show_cur();
+		showCur();
 	}
 }
 
@@ -318,7 +318,7 @@ int16 Room28::use_breifkasten() {
 
 	if (_G(spieler).R28Briefkasten && !_G(spieler).inv_cur) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		_G(spieler).R28Briefkasten = false;
 		auto_move(7, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -329,7 +329,7 @@ int16 Room28::use_breifkasten() {
 		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		start_aad_wait(179, -1);
 		_G(atds)->set_ats_str(206, 0, ATS_DATEI);
-		show_cur();
+		showCur();
 		invent_2_slot(MANUSKRIPT_INV);
 		_G(spieler).R28Manuskript = true;
 	}
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 151da43ac33..ac669922950 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -69,7 +69,7 @@ int16 Room29::use_pumpe() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).R29Pumpe) {
-		hide_cur();
+		hideCur();
 
 		if (is_cur_inventar(SCHLAUCH_INV)) {
 			action_flag = true;
@@ -85,7 +85,7 @@ int16 Room29::use_pumpe() {
 			start_aad_wait(62, -1);
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -95,13 +95,13 @@ int16 Room29::get_schlauch() {
 	int16 action_flag = false;
 	if (_G(spieler).R29Schlauch1 && !_G(spieler).inv_cur) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		new_invent_2_cur(PUMPE_INV);
 
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
@@ -111,7 +111,7 @@ bool Room29::use_schlauch() {
 
 	if (is_cur_inventar(PUMPE_INV)) {
 		result = true;
-		hide_cur();
+		hideCur();
 
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
@@ -128,7 +128,7 @@ bool Room29::use_schlauch() {
 		del_inventar(PUMPE_INV);
 		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		show_cur();
+		showCur();
 	}
 
 	return result;
@@ -136,7 +136,7 @@ bool Room29::use_schlauch() {
 
 void Room29::schlitz_sitz() {
 	if (!_G(spieler).R29AutoSitz) {
-		hide_cur();
+		hideCur();
 		_G(spieler).R29AutoSitz = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(det)->hide_static_spr(4);
@@ -153,7 +153,7 @@ void Room29::schlitz_sitz() {
 		_G(maus_links_click) = false;
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
-		show_cur();
+		showCur();
 	}
 }
 
@@ -161,7 +161,7 @@ int16 Room29::zaun_sprung() {
 	int16 action_flag = false;
 
 	if (_G(spieler).R29AutoSitz && !_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		
 		action_flag = true;
 		auto_move(3, P_CHEWY);
@@ -171,7 +171,7 @@ int16 Room29::zaun_sprung() {
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
 
-		show_cur();
+		showCur();
 		switch_room(37);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 4322ee7c8db..4e366b98a7c 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -49,7 +49,7 @@ void Room31::entry() {
 void Room31::surimy_go() {
 	if (!_G(spieler).R39ScriptOk && _G(spieler).R25SurimyLauf) {
 		if (_G(spieler).R31SurimyGo >= 3) {
-			hide_cur();
+			hideCur();
 			_G(spieler).R31SurimyGo = 0;
 			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
@@ -65,7 +65,7 @@ void Room31::surimy_go() {
 			start_aad_wait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
-			show_cur();
+			showCur();
 		} else {
 			++_G(spieler).R31SurimyGo;
 		}
@@ -96,13 +96,13 @@ int16 Room31::open_luke() {
 	
 	if (!_G(spieler).inv_cur && _G(spieler).R31KlappeZu) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = false;
 		g_engine->_sound->playSound(3);
 		calc_luke();
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -113,13 +113,13 @@ int16 Room31::close_luke_proc1() {
 
 	if (!_G(spieler).inv_cur && !_G(spieler).R31KlappeZu) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		g_engine->_sound->playSound(3);
 		calc_luke();
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -127,14 +127,14 @@ int16 Room31::close_luke_proc1() {
 
 void Room31::close_luke_proc3() {
 	if (!_G(spieler).R31KlappeZu) {
-		hide_cur();
+		hideCur();
 		auto_move(2, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		g_engine->_sound->playSound(3);
 		g_engine->_sound->playSound(3, 1, false);
 		calc_luke();
-		show_cur();
+		showCur();
 	}
 }
 
@@ -143,7 +143,7 @@ int16 Room31::use_topf() {
 	int16 ani_nr = 0;
 	int16 action_flag = false;
 
-	hide_cur();
+	hideCur();
 	if (_G(spieler).inv_cur) {
 		if (_G(spieler).R31PflanzeWeg) {
 			if (is_cur_inventar(K_KERNE_INV)) {
@@ -210,7 +210,7 @@ int16 Room31::use_topf() {
 		action_flag = true;
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 90a99679ab8..e2b80ba0e58 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -38,7 +38,7 @@ int16 Room32::use_howard() {
 	int16 dia_nr = 0;
 	int16 ani_nr = 0;
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (is_cur_inventar(TRICHTER_INV)) {
 		if (_G(spieler).R33MunterGet) {
@@ -86,7 +86,7 @@ int16 Room32::use_howard() {
 		action_flag = true;
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
@@ -94,7 +94,7 @@ void Room32::use_schreibmaschine() {
 	int16 dia_nr = -1;
 	int16 ani_nr = -1;
 
-	hide_cur();
+	hideCur();
 	if (_G(spieler).R32HowardWeg) {
 		if (_G(spieler).inv_cur) {
 			switch (_G(spieler).AkInvent) {
@@ -145,7 +145,7 @@ void Room32::use_schreibmaschine() {
 
 	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room32::get_script() {
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 6208ef54153..cbbfcb7a66d 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -43,7 +43,7 @@ void Room33::entry() {
 void Room33::surimy_go() {
 	if (!_G(spieler).R39ScriptOk && _G(spieler).R25SurimyLauf) {
 		if (_G(spieler).R33SurimyGo >= 4) {
-			hide_cur();
+			hideCur();
 			_G(spieler).R33SurimyGo = 0;
 			_G(det)->load_taf_seq(39, 8, nullptr);
 			_G(auto_obj) = 1;
@@ -59,7 +59,7 @@ void Room33::surimy_go() {
 			start_aad_wait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
-			show_cur();
+			showCur();
 		} else {
 			++_G(spieler).R33SurimyGo;
 		}
@@ -69,11 +69,11 @@ void Room33::surimy_go() {
 void Room33::look_schublade() {
 	if (!_G(spieler).R33SchubFirst) {
 		_G(spieler).R33SchubFirst = true;
-		hide_cur();
+		hideCur();
 		auto_move(1, P_CHEWY);
 		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -81,7 +81,7 @@ int16 Room33::use_schublade() {
 	int16 action_flag = false;
 
 	if (_G(spieler).R33SchubFirst && !_G(spieler).inv_cur && !_G(spieler).R33Messer) {
-		hide_cur();
+		hideCur();
 		action_flag = true;
 		_G(spieler).R33Messer = true;
 
@@ -90,7 +90,7 @@ int16 Room33::use_schublade() {
 		_G(atds)->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
 		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
 		invent_2_slot(MESSER_INV);
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -99,7 +99,7 @@ int16 Room33::use_schublade() {
 void Room33::use_maschine() {
 	int16 dia_nr;
 	int16 ani_nr;
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).R33MunterOk) {
 		auto_move(4, P_CHEWY);
@@ -181,7 +181,7 @@ void Room33::use_maschine() {
 		start_aad_wait(70, -1);
 	}
 
-	show_cur();
+	showCur();
 }
 
 bool Room33::calc_muntermacher() {
@@ -200,7 +200,7 @@ int16 Room33::get_munter() {
 
 	if (!_G(spieler).inv_cur && !_G(spieler).R33MunterGet && _G(spieler).R33MunterOk) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		_G(spieler).R33MunterGet = true;
 		auto_move(4, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -209,7 +209,7 @@ int16 Room33::get_munter() {
 		_G(det)->hide_static_spr(3);
 		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 		start_aad_wait(72, -1);
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 4e0d1ba4458..4c80adeb842 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -40,11 +40,11 @@ bool Room34::use_kuehlschrank() {
 		result = true;
 
 		if (!_G(flags).LoadGame) {
-			hide_cur();
+			hideCur();
 			auto_move(3, P_CHEWY);
 			_G(maus_links_click) = false;
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O, 1, false, P_CHEWY);
-			show_cur();
+			showCur();
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 08084026556..ab7cb372b6d 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -42,7 +42,7 @@ void Room35::entry() {
 
 int16 Room35::schublade() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).ChewyAni != CHEWY_ROCKER && !_G(spieler).inv_cur) {
 		if (!_G(spieler).R35Schublade) {
@@ -67,13 +67,13 @@ int16 Room35::schublade() {
 		}
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
 int16 Room35::use_cat() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).ChewyAni != CHEWY_ROCKER) {
 		if (is_cur_inventar(TRANSLATOR_INV)) {
@@ -112,12 +112,12 @@ int16 Room35::use_cat() {
 		}
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
 void Room35::talk_cat() {
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 
 	if (_G(spieler).R35TransCat) {
@@ -130,7 +130,7 @@ void Room35::talk_cat() {
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(36);
-		show_cur();
+		showCur();
 		start_ads_wait(dia_nr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		switch_room(35);
@@ -140,7 +140,7 @@ void Room35::talk_cat() {
 		start_aad_wait(96, -1);
 	}
 
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 847ba6b960f..e4c92ab716c 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -106,7 +106,7 @@ short Room37::use_wippe() {
 		action_flag = true;
 
 		if (is_cur_inventar(H_FUTTER_INV)) {
-			hide_cur();
+			hideCur();
 			auto_move(0, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(129, 0);
@@ -115,7 +115,7 @@ short Room37::use_wippe() {
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_047);
 			_G(flags).NoScroll = false;
-			show_cur();
+			showCur();
 			_G(spieler).scrollx = 269;
 			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
 			switch_room(29);
@@ -170,7 +170,7 @@ int16 Room37::use_glas() {
 		action_flag = true;
 		if (is_cur_inventar(ANGEL2_INV)) {
 			_G(flags).NoScroll = true;
-			hide_cur();
+			hideCur();
 			auto_move(5, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(146, 0);
@@ -188,7 +188,7 @@ int16 Room37::use_glas() {
 			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(146, -1);
-			show_cur();
+			showCur();
 			_G(flags).NoScroll = false;
 			g_engine->_sound->playSound(3);
 		} else {
@@ -202,7 +202,7 @@ int16 Room37::use_glas() {
 void Room37::dog_bell() {
 	int16 dia_nr = -1;
 	int16 ani_nr = 0;
-	hide_cur();
+	hideCur();
 
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
@@ -265,19 +265,19 @@ void Room37::dog_bell() {
 	}
 
 	_G(flags).NoScroll = false;
-	show_cur();
+	showCur();
 }
 
 void Room37::talk_hahn() {
-	hide_cur();
+	hideCur();
 	auto_move(7, P_CHEWY);
-	show_cur();
+	showCur();
 
 	if (!_G(spieler).R37TransHahn) {
 		_G(cur_hide_flag) = 0;
-		hide_cur();
+		hideCur();
 		start_aad_wait(145, -1);
-		show_cur();
+		showCur();
 	} else {
 		hahn_dia();
 	}
@@ -285,21 +285,21 @@ void Room37::talk_hahn() {
 
 void Room37::use_hahn() {
 	if (is_cur_inventar(TRANSLATOR_INV)) {
-		hide_cur();
+		hideCur();
 		auto_move(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
 		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 		flic_cut(FCUT_052);
 		cur_2_inventory();
 		_G(menu_item) = CUR_TALK;
-		cursor_wahl(_G(menu_item));
-		show_cur();
+		cursorChoice(_G(menu_item));
+		showCur();
 		hahn_dia();
 
 	} else if (_G(spieler).R37TransHahn) {
 		if (is_cur_inventar(GEBISS_INV)) {
 			_G(spieler).R37Kloppe = true;
-			hide_cur();
+			hideCur();
 			auto_move(6, P_CHEWY);
 			load_room_music(256);
 			_G(room)->set_timer_status(7, TIMER_STOP);
@@ -333,7 +333,7 @@ void Room37::use_hahn() {
 			start_aad_wait(141, -1);
 			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
-			show_cur();
+			showCur();
 		}
 	} else if (_G(spieler).inv_cur) {
 		start_aad_wait(143, -1);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 1c3640b1b7b..f2647734078 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -78,7 +78,7 @@ short Room39::use_howard() {
 		int16 dia_nr;
 		if (_G(spieler).inv_cur) {
 			if (is_cur_inventar(MANUSKRIPT_INV)) {
-				hide_cur();
+				hideCur();
 				_G(spieler).R39HowardWach = true;
 				_G(spieler).R39ScriptOk = true;
 				auto_move(3, P_CHEWY);
@@ -99,7 +99,7 @@ short Room39::use_howard() {
 				_G(det)->set_static_ani(5, -1);
 				_G(atds)->set_ats_str(62, 1, ATS_DATEI);
 				start_aad_wait(169, -1);
-				show_cur();
+				showCur();
 
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
 				_G(spieler).PersonDiaRoom[P_HOWARD] = true;;
@@ -126,7 +126,7 @@ short Room39::use_howard() {
 			action_flag = true;
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -162,7 +162,7 @@ void Room39::ok() {
 	switch_room(27);
 	start_aad_wait(192, -1);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(_G(menu_item));
+	cursorChoice(_G(menu_item));
 }
 
 int16 Room39::use_tv() {
@@ -170,7 +170,7 @@ int16 Room39::use_tv() {
 	int16 ani_nr = -1;
 	int16 action_flag = false;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	int16 cls_flag = false;
 
@@ -283,7 +283,7 @@ int16 Room39::use_tv() {
 		action_flag = true;
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 57f86c8c270..4c9e150ee3f 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -95,7 +95,7 @@ void Room40::entry(int16 eib_nr) {
 }
 
 void Room40::xit(int16 eib_nr) {
-	hide_cur();
+	hideCur();
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).R40PoliceAb = false;
 	_G(spieler).R40HoUse = false;
@@ -146,7 +146,7 @@ void Room40::xit(int16 eib_nr) {
 	}
 
 	_G(spieler_mi)[P_HOWARD].Mode = false;
-	show_cur();
+	showCur();
 }
 
 bool Room40::timer(int16 t_nr, int16 ani_nr) {
@@ -160,7 +160,7 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 
 void Room40::move_train(int16 mode) {
 	_G(spieler).R40TrainMove = false;
-	hide_cur();
+	hideCur();
 	auto_move(9, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(232, 0);
@@ -209,7 +209,7 @@ void Room40::move_train(int16 mode) {
 	}
 	
 	_G(flags).NoScroll = false;
-	show_cur();
+	showCur();
 }
 
 void Room40::setup_func() {
@@ -279,7 +279,7 @@ void Room40::setup_func() {
 			if (_G(det)->get_ani_status(POLICE_FLASCHE) == false) {
 				_G(det)->hide_static_spr(0);
 				if (_G(spieler).R40DuengerTele) {
-					hide_cur();
+					hideCur();
 					_G(spieler).R40PoliceWeg = true;
 					_G(det)->start_detail(17, 255, ANI_VOR);
 					start_aad_wait(226, -1);
@@ -290,7 +290,7 @@ void Room40::setup_func() {
 					_G(person_end_phase)[P_HOWARD] = P_RIGHT;
 					start_aad_wait(224, -1);
 					_G(spieler).R40PoliceWeg = true;
-					show_cur();
+					showCur();
 
 					_G(flags).MausLinks = false;
 					_G(flags).MainInput = true;
@@ -314,7 +314,7 @@ int16 Room40::use_mr_pumpkin() {
 	int16 action_ret = false;
 
 	if (_G(menu_item) != CUR_HOWARD) {
-		hide_cur();
+		hideCur();
 
 		if (!_G(spieler).inv_cur) {
 			action_ret = use_schalter(205);
@@ -337,7 +337,7 @@ int16 Room40::use_mr_pumpkin() {
 					if (_G(spieler).R40PoliceWeg == false)
 						use_schalter(227);
 					else {
-						hide_cur();
+						hideCur();
 						auto_move(8, P_CHEWY);
 						start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
 						del_inventar(_G(spieler).AkInvent);
@@ -359,7 +359,7 @@ int16 Room40::use_mr_pumpkin() {
 			}
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
@@ -371,7 +371,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 	if (_G(menu_item) != CUR_HOWARD &&_G(spieler).R40PoliceWeg == false) {
 		action_flag = true;
 
-		hide_cur();
+		hideCur();
 		auto_move(8, P_CHEWY);
 
 		if (_G(spieler).R40PoliceAniStatus != 255) {
@@ -405,7 +405,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		_G(det)->show_static_spr(15);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -413,21 +413,21 @@ int16 Room40::use_schalter(int16 aad_nr) {
 
 void Room40::talk_police() {
 	if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
-		hide_cur();
+		hideCur();
 		_G(spieler).R40PoliceStart = false;
 		_G(room)->set_timer_status(255, TIMER_STOP);
 		auto_move(7, P_CHEWY);
 		start_aad_wait(203, -1);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-		show_cur();
+		showCur();
 	}
 }
 
 void Room40::talk_handler() {
 	if (!_G(spieler).R40HaendlerOk) {
 		_G(spieler).flags38_2 = true;
-		hide_cur();
+		hideCur();
 		auto_move(6, P_CHEWY);
 		_G(det)->del_static_ani(4);
 		_G(room)->set_timer_status(4, TIMER_STOP);
@@ -436,7 +436,7 @@ void Room40::talk_handler() {
 		_G(det)->set_static_ani(4, -1);
 		_G(det)->del_static_ani(3);
 		_G(room)->set_timer_status(4, TIMER_START);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -448,7 +448,7 @@ int16 Room40::use_haendler() {
 		if (!_G(spieler).flags38_2) {
 			start_aad_wait(612, -1);
 		} else {
-			hide_cur();
+			hideCur();
 			invent_2_slot(DUENGER_INV);
 			_G(spieler).R40HoUse = true;
 			_G(spieler).R40HaendlerOk = true;
@@ -492,8 +492,8 @@ int16 Room40::use_haendler() {
 			}
 
 			_G(menu_item) = CUR_WALK;
-			cursor_wahl(_G(menu_item));
-			show_cur();
+			cursorChoice(_G(menu_item));
+			showCur();
 			_G(flags).NoScroll = false;
 			_G(flags).MausLinks = false;
 			_G(spieler).R40HoUse = false;
@@ -508,7 +508,7 @@ int16 Room40::use_bmeister() {
 
 	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		_G(spieler).R40HoUse = true;
 		auto_move(9, P_CHEWY);
 		auto_move(11, P_HOWARD);
@@ -518,21 +518,21 @@ int16 Room40::use_bmeister() {
 		_G(spieler).R40HoUse = false;
 		_G(flags).NoScroll = false;
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
-		show_cur();
+		cursorChoice(_G(menu_item));
+		showCur();
 
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
 		if (_G(spieler).flags37_80) {
 			start_aad_wait(605, -1);
 		} else {
-			hide_cur();
+			hideCur();
 			_G(spieler).R40HoUse = true;
 			new_invent_2_cur(HOTEL_INV);
 			bmeister_dia(237);
 			_G(spieler).flags37_80 = true;
 			_G(flags).NoScroll = false;
-			show_cur();
+			showCur();
 		}
 	}
 
@@ -575,7 +575,7 @@ bool Room40::use_police() {
 		if (!_G(spieler).R40PoliceWeg && _G(spieler).R40PoliceAniStatus == 255) {
 			result = true;
 			_G(spieler).R40PoliceAb = true;
-			hide_cur();
+			hideCur();
 			_G(spieler).R40PoliceStart = false;
 			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(spieler).R40HoUse = true;
@@ -588,8 +588,8 @@ bool Room40::use_police() {
 			start_aad_wait(218, -1);
 			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 			_G(menu_item) = CUR_WALK;
-			cursor_wahl(_G(menu_item));
-			show_cur();
+			cursorChoice(_G(menu_item));
+			showCur();
 			_G(flags).MausLinks = false;
 		}
 	} else {
@@ -604,7 +604,7 @@ int16 Room40::use_tele() {
 
 	if (!_G(spieler).inv_cur && _G(spieler).R40PoliceWeg == false) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 
 		int16 dia_nr1 = -1;
 		if (!_G(spieler).R40PoliceAb) {
@@ -654,7 +654,7 @@ int16 Room40::use_tele() {
 		}
 
 		if (dia_nr1 != 223)
-			show_cur();
+			showCur();
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index dd966a4322a..bcba7bd8416 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -36,7 +36,7 @@ static const AniBlock ABLOCK32[2] = {
 
 
 void Room41::entry() {
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).R41LolaOk) {
 		g_engine->_sound->playSound(6);
@@ -67,7 +67,7 @@ void Room41::entry() {
 		set_person_pos(241, 113, P_HOWARD, P_RIGHT);
 
 	_G(SetUpScreenFunc) = setup_func;
-	show_cur();
+	showCur();
 }
 
 void Room41::xit() {
@@ -98,7 +98,7 @@ void Room41::talk_hoggy1() {
 		first_talk();
 
 	} else if (!_G(spieler).R41Einbruch) {
-		show_cur();
+		showCur();
 		start_ads_wait(11);
 
 	} else if (_G(spieler).R41Einbruch) {
@@ -153,7 +153,7 @@ void Room41::first_talk() {
 }
 
 void Room41::start_hoggy() {
-	show_cur();
+	showCur();
 
 	for (int16 i = 0; i < 2; i++) {
 		_G(room)->set_timer_status(i, TIMER_START);
@@ -163,7 +163,7 @@ void Room41::start_hoggy() {
 }
 
 void Room41::stop_hoggy() {
-	hide_cur();
+	hideCur();
 
 	for (int16 i = 0; i < 2; i++) {
 		_G(room)->set_timer_status(i, TIMER_STOP);
@@ -191,7 +191,7 @@ int16 Room41::use_lola() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur && !_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo) {
-		hide_cur();
+		hideCur();
 		action_flag = true;
 		_G(spieler).R41LolaOk = true;
 		auto_move(4, P_CHEWY);
@@ -203,7 +203,7 @@ int16 Room41::use_lola() {
 		_G(atds)->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(267, 1, ATS_DATEI);
 		_G(atds)->hide_item(11, 0, 3);
-		show_cur();
+		showCur();
 	}
 
 	return action_flag;
@@ -211,7 +211,7 @@ int16 Room41::use_lola() {
 
 int16 Room41::use_brief() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 
 	if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
@@ -234,7 +234,7 @@ int16 Room41::use_brief() {
 		_G(spieler).R42BriefOk = true;
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index c8dc91b86a7..865b7d3ed58 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -76,7 +76,7 @@ void Room42::setup_func() {
 }
 
 void Room42::get_kuerbis(int16 aad_nr) {
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(7, 1, ANI_RUECK);
@@ -87,7 +87,7 @@ void Room42::get_kuerbis(int16 aad_nr) {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(7, 1, ANI_VOR);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	show_cur();
+	showCur();
 }
 
 int16 Room42::use_psack() {
@@ -96,7 +96,7 @@ int16 Room42::use_psack() {
 	if (_G(menu_item) == CUR_HOWARD)
 		return action_flag;
 
-	hide_cur();
+	hideCur();
 	if (!_G(spieler).R42BeamterWach && !_G(spieler).inv_cur) {
 		action_flag = true;
 		get_kuerbis(136);
@@ -136,7 +136,7 @@ int16 Room42::use_psack() {
 		start_aad_wait(182, -1);
 	}
 
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
@@ -146,13 +146,13 @@ int16 Room42::use_beamter() {
 	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
 		_G(atds)->set_ats_str(264, 2, ATS_DATEI);
-		hide_cur();
+		hideCur();
 		auto_move(4, P_CHEWY);
 		start_aad_wait(184, -1);
 		_G(spieler).R42HoToBeamter = true;
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
-		show_cur();
+		cursorChoice(_G(menu_item));
+		showCur();
 		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
 		_G(flags).MausLinks = false;
 	}
@@ -176,7 +176,7 @@ void Room42::talk_beamter() {
 }
 
 void Room42::dia_beamter(int16 str_end_nr) {
-	hide_cur();
+	hideCur();
 
 	if (str_end_nr != 4) {
 		while (_G(atds)->aad_get_status() != -1) {
@@ -232,7 +232,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 	_G(det)->stop_detail(6);
 	_G(flags).NoDiaBox = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index fb8d302b8c0..931fe31bee5 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -36,7 +36,7 @@ void Room43::night_small() {
 	switch_room(43);
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
-	hide_cur();
+	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(188, -1);
@@ -62,7 +62,7 @@ void Room43::night_small() {
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	show_cur();
+	showCur();
 	show_person();
 }
 
@@ -73,7 +73,7 @@ void Room43::catch_pg() {
 	switch_room(43);
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
-	hide_cur();
+	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
 	start_aad_wait(234, -1);
@@ -89,7 +89,7 @@ void Room43::catch_pg() {
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	show_cur();
+	showCur();
 	show_person();
 }
 
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 834060ee7f7..add26e5f33c 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -167,7 +167,7 @@ void Room45::setup_func() {
 
 int16 Room45::use_taxi() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 
 	if (!_G(spieler).inv_cur) {
@@ -192,7 +192,7 @@ int16 Room45::use_taxi() {
 		talk_taxi(400);
 	}
 
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
@@ -236,7 +236,7 @@ void Room45::taxi_mov() {
 
 int16 Room45::use_boy() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 
 	if (!_G(spieler).R45MagOk) {
@@ -256,13 +256,13 @@ int16 Room45::use_boy() {
 		start_aad_wait(259, -1);
 	}
 
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
 void Room45::talk_boy() {
 	int16 aad_nr;
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).R45MagOk) {
 		auto_move(2, P_CHEWY);
@@ -272,7 +272,7 @@ void Room45::talk_boy() {
 	}
 
 	start_aad_wait(aad_nr, -1);
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index cdff8bb88a6..ce6bfae117d 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -47,7 +47,7 @@ void Room46::entry(int16 eib_nr) {
 
 		if (_G(spieler).flags33_8) {
 			_G(maus_links_click) = false;
-			hide_cur();
+			hideCur();
 			set_person_pos(175, 73, P_HOWARD, P_LEFT);
 			set_person_pos(147, 109, P_CHEWY, P_LEFT);
 			_G(spieler).flags33_8 = false;
@@ -62,7 +62,7 @@ void Room46::entry(int16 eib_nr) {
 			start_spz(65, 255, false, P_CHEWY);
 			start_aad_wait(495, -1);
 			_G(spieler).room_e_obj[78].Exit = 90;
-			show_cur();
+			showCur();
 		}
 	}
 
@@ -97,7 +97,7 @@ void Room46::setup_func() {
 }
 
 void Room46::bodo() {
-	hide_cur();
+	hideCur();
 	_G(det)->show_static_spr(0);
 	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 	start_aad_wait(240, -1);
@@ -146,7 +146,7 @@ void Room46::bodo() {
 	invent_2_slot(UHR_INV);
 	invent_2_slot(RING_INV);
 	_G(spieler).R46GetLeder = true;
-	show_cur();
+	showCur();
 }
 
 void Room46::kloppe() {
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 34b971d30d1..909c84d8356 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -33,7 +33,7 @@ void Room48::entry() {
 	_G(maus_links_click) = false;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	show_cur();
+	showCur();
 	calc_pic();
 	_G(SetUpScreenFunc) = setup_func;
 	_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
@@ -74,13 +74,13 @@ void Room48::calc_pic() {
 void Room48::frage() {
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
-		hide_cur();
+		hideCur();
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(det)->show_static_spr(6);
 		start_detail_wait(1, 1, ANI_RUECK);
 		_G(det)->hide_static_spr(6);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-		show_cur();
+		showCur();
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -93,7 +93,7 @@ void Room48::setup_func() {
 		if (_G(menu_display) == 0) {
 			_G(menu_item) = CUR_USE;
 			cur_2_inventory();
-			cursor_wahl(CUR_ZEIGE);
+			cursorChoice(CUR_ZEIGE);
 			const int16 idx = _G(det)->maus_vector(_G(minfo).x, _G(minfo).y);
 
 			if (idx != -1) {
@@ -131,7 +131,7 @@ void Room48::setup_func() {
 						if (r_nr != -1) {
 							_G(SetUpScreenFunc) = nullptr;
 							_G(det)->hide_static_spr(1 + idx);
-							hide_cur();
+							hideCur();
 							_G(room)->set_timer_status(255, TIMER_STOP);
 							_G(room)->set_timer_status(0, TIMER_STOP);
 							_G(det)->stop_detail(0);
@@ -139,8 +139,8 @@ void Room48::setup_func() {
 							start_detail_wait(2, 1, ANI_VOR);
 							g_engine->_sound->stopSound(0);
 							_G(menu_item) = CUR_WALK;
-							cursor_wahl(_G(menu_item));
-							show_cur();
+							cursorChoice(_G(menu_item));
+							showCur();
 							_G(spieler).R48TaxiEntry = true;
 							_G(maus_links_click) = false;
 							set_up_screen(DO_SETUP);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index c19ccefbf00..5366be43c0f 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -114,7 +114,7 @@ void Room49::calc_boy_ani() {
 
 void Room49::calc_boy() {
 	if (!_G(spieler).R49WegFrei) {
-		hide_cur();
+		hideCur();
 		_G(room)->set_timer_status(255, TIMER_STOP);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
@@ -143,7 +143,7 @@ void Room49::calc_boy() {
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		_G(room)->set_timer_status(255, TIMER_START);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -152,13 +152,13 @@ int16 Room49::use_boy() {
 
 	if (is_cur_inventar(SPARK_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(3, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		talk_boy(265);
 		_G(spieler).R49WegFrei = true;
 		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
-		show_cur();
+		showCur();
 
 	} else if (is_cur_inventar(CIGAR_INV)) {
 		action_ret = true;
@@ -169,7 +169,7 @@ int16 Room49::use_boy() {
 }
 
 void Room49::use_boy_cigar() {
-	hide_cur();
+	hideCur();
 	del_inventar(_G(spieler).AkInvent);
 	talk_boy(263);
 	_G(SetUpScreenFunc) = nullptr;
@@ -201,7 +201,7 @@ void Room49::use_boy_cigar() {
 
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).R49BoyWeg = true;
-	show_cur();
+	showCur();
 }
 
 void Room49::talk_boy() {
@@ -243,7 +243,7 @@ int16 Room49::use_taxi() {
 
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		start_ani_block(2, ABLOCK34);
 		_G(det)->show_static_spr(7);
 		auto_move(2, P_CHEWY);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index d4a08c36f63..1c633be61f7 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -40,7 +40,7 @@ void Room50::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).flags32_10) {
-		hide_cur();
+		hideCur();
 		stop_page();
 		_G(maus_links_click) = false;
 		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
@@ -50,7 +50,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_108);
-		show_cur();
+		showCur();
 		switch_room(51);
 
 	} else {
@@ -140,7 +140,7 @@ void Room50::calc_treppe() {
 		_G(flags).AutoAniPlay = true;
 
 		if (!_G(spieler).R50KeyOK) {
-			hide_cur();
+			hideCur();
 			stop_person(P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
@@ -164,7 +164,7 @@ int16 Room50::use_gutschein() {
 	if (is_cur_inventar(HOTEL_INV)) {
 		action_ret = true;
 		if (!_G(spieler).R50KeyOK) {
-			hide_cur();
+			hideCur();
 			auto_move(3, P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
@@ -185,7 +185,7 @@ int16 Room50::use_gum() {
 
 	if (is_cur_inventar(GUM_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		_G(spieler).R50KeyOK = true;
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_wasser = false;
@@ -223,7 +223,7 @@ int16 Room50::use_gum() {
 		_G(atds)->set_ats_str(323, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(327, 1, ATS_DATEI);
 		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
@@ -243,7 +243,7 @@ void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 	if (!_G(spieler).R50KeyOK)
 		_G(room)->set_timer_status(1, TIMER_START);
 
-	show_cur();
+	showCur();
 }
 
 void Room50::setup_func() {
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 53ce5f55c11..d9a56230878 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -62,7 +62,7 @@ void Room51::entry() {
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->show_static_spr(17);
 		_index = 0;
-		hide_cur();
+		hideCur();
 
 		for (int i = 0; i < 2; ++i) {
 			_enemyFlag[i] = false;
@@ -87,11 +87,11 @@ void Room51::entry() {
 			}
 
 			if (!_G(spieler).R51FirstEntry) {
-				hide_cur();
+				hideCur();
 				_G(spieler).R51FirstEntry = true;
 				set_person_spr(P_LEFT, P_CHEWY);
 				start_aad_wait(283, -1);
-				show_cur();
+				showCur();
 			}
 
 			_G(SetUpScreenFunc) = setup_func;
@@ -109,8 +109,8 @@ void Room51::xit(int16 eib_nr) {
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
 		_G(menu_item) = CUR_WALK;
-		cursor_wahl(_G(menu_item));
-		show_cur();
+		cursorChoice(_G(menu_item));
+		showCur();
 
 	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 		if (eib_nr == 85) {
@@ -209,7 +209,7 @@ int16 Room51::use_door(int16 txt_nr) {
 	int16 action_ret = false;
 
 	if (is_cur_inventar(KEY_INV)) {
-		hide_cur();
+		hideCur();
 		action_ret = true;
 
 		switch (txt_nr) {
@@ -228,7 +228,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
-				show_cur();
+				showCur();
 				switch_room(52);
 			}
 			break;
@@ -339,7 +339,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			break;
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index d1a67f7fada..415a529b5ae 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -70,7 +70,7 @@ void Room52::gedAction(int index) {
 
 int16 Room52::use_hot_dog() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 
 	if (is_cur_inventar(BURGER_INV)) {
 		action_ret = true;
@@ -114,7 +114,7 @@ int16 Room52::use_hot_dog() {
 		_G(spieler).R52KakerWeg = true;
 	}
 
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
@@ -129,9 +129,9 @@ void Room52::kaker_platt() {
 	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg && !_G(flags).ExitMov) {
 		_G(spieler).R52KakerJoke = true;
 		stop_person(P_CHEWY);
-		hide_cur();
+		hideCur();
 		start_aad_wait(289, -1);
-		show_cur();
+		showCur();
 	}
 }
 
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 369e64c311c..8b0c8eef52a 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -41,13 +41,13 @@ static const AniBlock ABLOCK35[7] = {
 
 
 void Room53::entry() {
-	hide_cur();
+	hideCur();
 	_G(obj)->hide_sib(SIB_VISIT_R53);
 	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 	start_detail_wait(0, 1, ANI_VOR);
 	_G(det)->set_static_ani(1, -1);
 	_G(timer_nr)[0] = _G(room)->set_timer(1, 7);
-	show_cur();
+	showCur();
 }
 
 void Room53::man_go() {
@@ -60,7 +60,7 @@ void Room53::man_go() {
 }
 
 void Room53::talk_man() {
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
@@ -70,7 +70,7 @@ void Room53::talk_man() {
 	_G(det)->del_static_ani(3);
 	start_detail_wait(4, 1, ANI_VOR);
 	man_go();
-	show_cur();
+	showCur();
 }
 
 int16 Room53::use_man() {
@@ -78,7 +78,7 @@ int16 Room53::use_man() {
 
 	if (is_cur_inventar(BESTELL_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		_G(spieler).R53Kostuem = true;
 		del_inventar(_G(spieler).AkInvent);
 		auto_move(2, P_CHEWY);
@@ -89,7 +89,7 @@ int16 Room53::use_man() {
 		_G(obj)->addInventory(JMKOST_INV, &_G(room_blk));
 		inventory_2_cur(JMKOST_INV);
 		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 06a720699bb..72eacf60fd6 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -72,7 +72,7 @@ void Room54::entry(int16 eib_nr) {
 
 		if (_G(spieler).R55ExitDia) {
 			start_aad_wait(_G(spieler).R55ExitDia, -1);
-			show_cur();
+			showCur();
 			_G(spieler).R55ExitDia = false;
 		}
 
@@ -127,7 +127,7 @@ int16 Room54::use_schalter() {
 	int16 action_ret = false;
 
 	if (!_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		action_ret = true;
 
 		if (!_G(spieler).R54FputzerWeg) {
@@ -177,14 +177,14 @@ int16 Room54::use_schalter() {
 			start_aad_wait(297, -1);
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
 }
 
 void Room54::talk_verkauf() {
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).R54HotDogOk) {
 		if (_G(spieler).R45MagOk) {
@@ -221,12 +221,12 @@ void Room54::talk_verkauf() {
 		start_aad_wait(313, -1);
 	}
 
-	show_cur();
+	showCur();
 }
 
 int16 Room54::use_zelle() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).inv_cur) {
 		if (is_cur_inventar(JMKOST_INV)) {
@@ -264,7 +264,7 @@ int16 Room54::use_zelle() {
 		start_aad_wait(319, -1);
 	}
 
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
@@ -278,7 +278,7 @@ int16 Room54::use_azug() {
 
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 
 		if (!_G(spieler).R54LiftOk) {
 			if (_G(spieler).R54FputzerWeg) {
@@ -319,7 +319,7 @@ int16 Room54::use_azug() {
 			start_aad_wait(314, -1);
 		}
 
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
@@ -368,7 +368,7 @@ short Room54::use_taxi() {
 
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(7, P_CHEWY);
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 3d82d24506e..f201649cf5f 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -88,7 +88,7 @@ void Room55::entry() {
 
 			_G(det)->show_static_spr(8);
 			auto_move(1, P_CHEWY);
-			hide_cur();
+			hideCur();
 			_G(det)->hide_static_spr(8);
 
 			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
@@ -104,7 +104,7 @@ void Room55::entry() {
 				}
 			}
 
-			show_cur();
+			showCur();
 		}
 	}
 }
@@ -129,7 +129,7 @@ void Room55::gedAction(int index) {
 
 int16 Room55::use_stapel1() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 	
 	if (!_G(spieler).inv_cur) {
 		if (!_G(spieler).R55ScriptWeg) {
@@ -159,7 +159,7 @@ int16 Room55::use_stapel1() {
 			start_aad_wait(326, -1);
 		}
 	}
-	show_cur();
+	showCur();
 
 	return action_ret;
 }
@@ -169,9 +169,9 @@ int16 Room55::use_stapel2() {
 
 	if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		start_aad_wait(327, -1);
-		show_cur();
+		showCur();
 	}
 
 	return action_ret;
@@ -184,7 +184,7 @@ int16 Room55::use_telefon() {
 		action_ret = true;
 		if (_G(spieler).R55EscScriptOk) {
 			if (!_G(spieler).R55RaumOk) {
-				hide_cur();
+				hideCur();
 				_G(spieler).R55RaumOk = true;
 				auto_move(6, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
@@ -248,7 +248,7 @@ int16 Room55::use_telefon() {
 				load_chewy_taf(CHEWY_ROCKER);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 				_G(spieler_mi)[P_HOWARD].Mode = false;
-				show_cur();
+				showCur();
 				_G(spieler).R55R54First = true;
 				_G(spieler).R55ExitDia = 337;
 				_G(spieler).room_e_obj[89].Attribut = 255;
@@ -257,14 +257,14 @@ int16 Room55::use_telefon() {
 
 				switch_room(54);
 			} else {
-				hide_cur();
+				hideCur();
 				start_aad_wait(332, -1);
-				show_cur();
+				showCur();
 			}
 		} else {
-			hide_cur();
+			hideCur();
 			start_aad_wait(328, -1);
-			show_cur();
+			showCur();
 		}
 	}
 
@@ -279,7 +279,7 @@ void Room55::get_job() {
 	_G(spieler).scrolly = 0;
 	switch_room(61);
 
-	show_cur();
+	showCur();
 	start_ads_wait(15);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(flags).LoadGame = true;
@@ -363,7 +363,7 @@ int16 Room55::use_kammeraus() {
 		if (!_G(spieler).R52KakerWeg)
 			start_aad_wait(325, -1);
 		else if (!_G(spieler).R55SekWeg) {
-			hide_cur();
+			hideCur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(5, 1, ANI_VOR);
 			_G(det)->show_static_spr(10);
@@ -382,7 +382,7 @@ int16 Room55::use_kammeraus() {
 			_G(atds)->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATEI);
 			strasse(1);
-			show_cur();
+			showCur();
 		}
 	}
 
@@ -424,7 +424,7 @@ void Room55::talk_line() {
 	if (_G(spieler).R55Location != 0 || _G(spieler).ChewyAni != CHEWY_ROCKER)
 		return;
 	
-	hide_cur();
+	hideCur();
 
 	int16 aad_nr = 0;
 	if (!_G(spieler).R55SekWeg) {
@@ -459,7 +459,7 @@ void Room55::talk_line() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 54;
 	_G(spieler_mi)[P_HOWARD].Mode = false;
 	switch_room(54);
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 7e879575dfb..94794b23e2a 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -45,7 +45,7 @@ void Room56::entry() {
 
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
-			hide_cur();
+			hideCur();
 			_G(spieler).R48TaxiEntry = false;
 			_G(spieler).scrollx = 0;
 			_G(spieler).scrolly = 0;
@@ -79,7 +79,7 @@ void Room56::entry() {
 			auto_move(1, P_CHEWY);
 			_G(spieler_mi)[P_CHEWY].Mode = false;
 			_G(maus_links_click) = false;
-			show_cur();
+			showCur();
 		} else if (_G(spieler).R62Flucht && !_G(spieler).flags32_10) {
 			_G(maus_links_click) = false;
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
@@ -98,9 +98,9 @@ void Room56::entry() {
 			_G(det)->set_static_ani(3, -1);
 			_G(maus_links_click) = false;
 			_G(atds)->stop_aad();
-			hide_cur();
+			hideCur();
 			start_aad_wait(306, -1);
-			show_cur();
+			showCur();
 			flic_cut(FCUT_076);
 			esi = 1;
 			cur_2_inventory();
@@ -130,7 +130,7 @@ void Room56::entry() {
 					_G(spieler).flags35_2 = true;
 					esi = 3;
 				} else {
-					hide_cur();
+					hideCur();
 					_G(spieler).scrollx = _G(spieler).scrolly = 0;
 					_G(zoom_horizont) = 0;
 					set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
@@ -143,7 +143,7 @@ void Room56::entry() {
 					auto_move(1, P_CHEWY);
 					_G(spieler_mi)[P_CHEWY].Mode = false;
 				}
-				show_cur();
+				showCur();
 			} else {
 				esi = 2;
 			}
@@ -208,7 +208,7 @@ int16 Room56::use_taxi() {
 	int16 action_ret = false;
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(1, P_CHEWY);
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->playSound(7, 1);
@@ -228,7 +228,7 @@ int16 Room56::use_taxi() {
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
-		show_cur();
+		showCur();
 		switch_room(48);
 	}
 	return action_ret;
@@ -239,9 +239,9 @@ void Room56::talk_man() {
 	if (!_G(spieler).R56AbfahrtOk) {
 		start_ads_wait(16);
 	} else if (!_G(spieler).R62Flucht) {
-		hide_cur();
+		hideCur();
 		start_aad_wait(343, -1);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -251,7 +251,7 @@ int16 Room56::use_man() {
 		return action_ret;
 	
 	action_ret = true;
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 	_G(room)->set_timer_status(0, TIMER_STOP);
@@ -277,7 +277,7 @@ int16 Room56::use_man() {
 	_G(room)->set_timer_status(0, TIMER_START);
 	_G(det)->set_static_ani(0, -1);
 
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
@@ -286,7 +286,7 @@ int16 Room56::use_kneipe() {
 	if (!_G(spieler).flags32_10) {
 		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && _G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
 			action_ret = true;
-			hide_cur();
+			hideCur();
 			if (_G(spieler).R56Kneipe) {
 				start_aad_wait(344, -1);
 			} else {
@@ -323,10 +323,10 @@ int16 Room56::use_kneipe() {
 					start_aad_wait(309, -1);
 				}
 			}
-			show_cur();
+			showCur();
 		}
 	} else if (is_cur_inventar(18)) {
-		hide_cur();
+		hideCur();
 		if (_G(spieler).flags34_10) {
 			_G(spieler).flags33_80 = true;
 			auto_move(4, P_CHEWY);
@@ -343,9 +343,9 @@ int16 Room56::use_kneipe() {
 		} else {
 			start_aad_wait(518, -1);
 		}
-		show_cur();
+		showCur();
 	} else if (_G(menu_item) == 0 || _G(menu_item) == 2 || (_G(menu_item) == 1 && !_G(spieler).inv_cur)){
-		hide_cur();
+		hideCur();
 		action_ret = 1;
 		_G(maus_links_click) = false;
 		auto_move(4, P_CHEWY);
@@ -358,7 +358,7 @@ int16 Room56::use_kneipe() {
 
 		set_up_screen(NO_SETUP);
 		_G(fx_blend) = BLEND3;
-		show_cur();
+		showCur();
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->playSound(9);
 	}
@@ -441,9 +441,9 @@ void Room56::setup_func() {
 	
 	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
 		if (_G(minfo).x + _G(spieler).scrollx >= 157 && _G(minfo).x + _G(spieler).scrollx <= 204 && _G(minfo).y >= 28 && _G(minfo).y <= 89)
-			cursor_wahl(CUR_AUSGANG_OBEN);
+			cursorChoice(CUR_AUSGANG_OBEN);
 		else
-			cursor_wahl(CUR_WALK);
+			cursorChoice(CUR_WALK);
 	}
 }
 
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 13c90aa3914..e9bb8915190 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -41,7 +41,7 @@ void Room57::entry() {
 		_G(det)->hide_static_spr(4);
 	
 	if (!_G(flags).LoadGame &&_G(spieler).R48TaxiEntry) {
-		hide_cur();
+		hideCur();
 		_G(spieler).R48TaxiEntry = false;
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
@@ -49,7 +49,7 @@ void Room57::entry() {
 		set_person_pos(40, 160, P_CHEWY, P_RIGHT);
 		auto_move(2, P_CHEWY);
 		_G(maus_links_click) = false;
-		show_cur();
+		showCur();
 	}
 }
 
@@ -81,7 +81,7 @@ int16 Room57::use_taxi() {
 	int16 action_ret = false;
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(3, P_CHEWY);
 		g_engine->_sound->playSound(3, 0);
 		g_engine->_sound->playSound(3);
@@ -113,7 +113,7 @@ int16 Room57::use_pfoertner() {
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
 	_G(det)->set_static_ani(3, -1);
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	if (is_cur_inventar(CUTMAG_INV)) {
 		action_ret = true;
@@ -147,14 +147,14 @@ int16 Room57::use_pfoertner() {
 		}
 		_G(SetUpScreenFunc) = setup_func;
 	}
-	show_cur();
+	showCur();
 	_G(room)->set_timer_status(1, TIMER_START);
 	_G(det)->set_static_ani(1, -1);
 	return action_ret;
 }
 
 void Room57::talk_pfoertner() {
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
@@ -167,7 +167,7 @@ void Room57::talk_pfoertner() {
 	start_aad_wait(aad_nr, -1);
 	_G(room)->set_timer_status(1, TIMER_START);
 	_G(det)->set_static_ani(1, -1);
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index a62bbf49b82..8b1216dc43a 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -69,7 +69,7 @@ void Room58::look_cut_mag(int16 r_nr) {
 void Room58::setup_func() {
 	if (_G(menu_item) != CUR_LOOK) {
 		_G(menu_item) = CUR_LOOK;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 	}
 }
 
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 7e7443eece4..e30232e49e3 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -36,7 +36,7 @@ void Room62::entry() {
 	if (!_G(spieler).R62FirstEntry) {
 		_G(spieler).R62TShow = false;
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		_G(spieler).R62FirstEntry = true;
 		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
 		_G(det)->start_detail(6, 255, ANI_VOR);
@@ -65,7 +65,7 @@ void Room62::entry() {
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(det)->del_static_ani(5);
 		start_detail_wait(7, 1, ANI_VOR);
-		show_cur();
+		showCur();
 		_G(spieler).R64Moni1Ani = 3;
 		_G(spieler).R64Moni2Ani = 4;
 		set_person_pos(187, 43, P_CHEWY, P_RIGHT);
@@ -99,7 +99,7 @@ int16 Room62::use_laura() {
 	int16 action_ret = false;
 	if (is_cur_inventar(GERAET_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(2, P_CHEWY);
 		auto_scroll(0, 0);
 		_G(SetUpScreenFunc) = nullptr;
@@ -111,7 +111,7 @@ int16 Room62::use_laura() {
 		start_aad_wait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077);
-		show_cur();
+		showCur();
 		_G(spieler).R64Moni1Ani = 0;
 		_G(spieler).R64Moni2Ani = 0;
 		_G(spieler).R62TShow = false;
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 48c52d64748..459b5a9cef6 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -37,7 +37,7 @@ void Room63::entry() {
 		_G(det)->del_static_ani(5);
 	if (!_G(spieler).R63Uhr) {
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		_G(det)->start_detail(12, 255, ANI_VOR);
 		_G(det)->start_detail(10, 255, ANI_VOR);
 		_G(det)->start_detail(18, 255, ANI_VOR);
@@ -48,7 +48,7 @@ void Room63::entry() {
 		start_aad_wait(355, -1);
 		_G(det)->stop_detail(11);
 		_G(det)->start_detail(10, 255, ANI_VOR);
-		show_cur();
+		showCur();
 	} else if (!_G(spieler).R63Feuer) {
 		_G(det)->show_static_spr(10);
 		_G(det)->show_static_spr(12);
@@ -71,7 +71,7 @@ void Room63::setup_func() {
 
 	cur_2_inventory();
 	_G(menu_item) = CUR_USE;
-	cursor_wahl(CUR_USE);
+	cursorChoice(CUR_USE);
 	
 	switch (_G(r63ChewyAni)) {
 	case 0:
@@ -148,7 +148,7 @@ void Room63::bork_platt() {
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_079);
 	_G(fx_blend) = BLEND3;
-	show_cur();
+	showCur();
 	_G(flags).MainInput = true;
 	_G(spieler).R62Flucht = true;
 	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
@@ -156,7 +156,7 @@ void Room63::bork_platt() {
 }
 
 void Room63::talk_hunter() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
 		_G(det)->hide_static_spr(10);
@@ -166,11 +166,11 @@ void Room63::talk_hunter() {
 		_G(det)->show_static_spr(10);
 		_G(det)->stop_detail(10);
 	}
-	show_cur();
+	showCur();
 }
 
 void Room63::talk_regie() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
 		_G(det)->hide_static_spr(12);
@@ -183,21 +183,21 @@ void Room63::talk_regie() {
 	} else {
 		_G(det)->start_detail(18, 255, ANI_VOR);
 	}
-	show_cur();
+	showCur();
 }
 
 void Room63::talk_fx_man() {
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	start_aad_wait(358, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room63::use_fx_man() {
 	int16 action_ret = false;
 	if (is_cur_inventar(MASKE_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(1, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		remove_inventory(34);
@@ -210,7 +210,7 @@ int16 Room63::use_fx_man() {
 		start_detail_wait(8, 1, ANI_VOR);
 		_G(spieler).R63FxMannWeg = true;
 		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
-		show_cur();
+		showCur();
 	}
 	return action_ret;
 }
@@ -222,10 +222,10 @@ int16 Room63::use_schalter() {
 		if (_G(spieler).R63FxMannWeg) {
 			if (_G(spieler).R62LauraVerwandlung) {
 				_G(r63Schalter) = true;
-				hide_cur();
+				hideCur();
 				_G(flags).MainInput = false;
 			} else {
-				hide_cur();
+				hideCur();
 				auto_move(1, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 				_G(det)->show_static_spr(2);
@@ -239,12 +239,12 @@ int16 Room63::use_schalter() {
 				_G(det)->hide_static_spr(2);
 				start_aad_wait(364, -1);
 				_G(atds)->set_ats_str(385, 1, ATS_DATEI);
-				show_cur();
+				showCur();
 			}
 		} else {
-			hide_cur();
+			hideCur();
 			start_aad_wait(363, -1);
-			show_cur();
+			showCur();
 		}
 	}
 	return action_ret;
@@ -264,7 +264,7 @@ int16 Room63::use_girl() {
 	int16 action_ret = false;
 	if (is_cur_inventar(UHR_INV)) {
 		action_ret = true;
-		hide_cur();
+		hideCur();
 		auto_move(2, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->stop_detail(12);
@@ -285,7 +285,7 @@ int16 Room63::use_girl() {
 		_G(atds)->set_ats_str(382, 1, ATS_DATEI);
 		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
 		start_aad_wait(367, -1);
-		show_cur();
+		showCur();
 	}
 	return action_ret;
 }
@@ -295,7 +295,7 @@ int16 Room63::use_aschenbecher() {
 	if (is_cur_inventar(ASCHE_INV)) {
 		action_ret = true;
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		if (_G(spieler).R63Uhr) {
 			if (_G(spieler).R63FxMannWeg) {
 				auto_move(5, P_CHEWY);
@@ -325,7 +325,7 @@ int16 Room63::use_aschenbecher() {
 		} else
 			start_aad_wait(366, -1);
 		
-		show_cur();
+		showCur();
 	}
 	return action_ret;
 }
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 3d52e8b5cea..68448efa438 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -48,9 +48,9 @@ void Room64::entry() {
 			_G(atds)->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
-			hide_cur();
+			hideCur();
 			start_aad_wait(354, -1);
-			show_cur();
+			showCur();
 		}
 	} else
 		chewy_entry();
@@ -69,11 +69,11 @@ int16 Room64::cut_sev(int16 frame) {
 void Room64::chewy_entry() {
 	calc_monitor();
 	if (!_G(flags).LoadGame) {
-		hide_cur();
+		hideCur();
 		_G(det)->show_static_spr(3);
 		auto_move(2, P_CHEWY);
 		_G(det)->hide_static_spr(3);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -138,7 +138,7 @@ void Room64::talk_man() {
 
 void Room64::talk_man(int16 aad_nr) {
 	if (!_G(spieler).R64ManWeg) {
-		hide_cur();
+		hideCur();
 		auto_move(4, P_CHEWY);
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
@@ -148,13 +148,13 @@ void Room64::talk_man(int16 aad_nr) {
 		_G(det)->del_static_ani(2);
 		_G(room)->set_timer_status(1, TIMER_START);
 		_G(det)->set_static_ani(1, -1);
-		show_cur();
+		showCur();
 	}
 }
 
 int16 Room64::use_tasche() {
 	int16 action_ret = false;
-	hide_cur();
+	hideCur();
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R64ManWeg) {
 			if (!_G(atds)->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
@@ -164,7 +164,7 @@ int16 Room64::use_tasche() {
 				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
 				start_aad_wait(353, -1);
 			} else {
-				show_cur();
+				showCur();
 				return 0;
 			}
 		} else {
@@ -181,7 +181,7 @@ int16 Room64::use_tasche() {
 		
 		action_ret = true;
 	}
-	show_cur();
+	showCur();
 	return action_ret;
 }
 
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index b9801065cfd..69ae44a9a28 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -47,9 +47,9 @@ void Room65::entry() {
 	_G(spieler_vector)[P_HOWARD].Xypos[1] = 10;
 	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		start_aad_wait(_G(spieler).PersonDia[P_HOWARD], -1);
-		show_cur();
+		showCur();
 	} else {
 		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
 	}
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index c93e8f80906..fb511f19682 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -42,7 +42,7 @@ void Room66::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(4);
 		_G(det)->show_static_spr(8);
 		_G(cur_hide_flag) = false;
-		hide_cur();
+		hideCur();
 		_G(spieler).flags26_4 = true;
 		_G(spieler).scrollx = 476;
 		set_person_pos(598, 101, P_CHEWY, P_RIGHT);
@@ -63,7 +63,7 @@ void Room66::entry(int16 eib_nr) {
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(404, -1);
 		start_aad_wait(415, -1);
-		show_cur();
+		showCur();
 	} else if (!_G(flags).LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
 		switch (eib_nr) {
 		case 96:
@@ -148,10 +148,10 @@ void Room66::setup_func() {
 }
 
 void Room66::talk1() {
-	hide_cur();
+	hideCur();
 	auto_move(5, P_CHEWY);
 	start_aad_wait(407, -1);
-	show_cur();
+	showCur();
 }
 
 void Room66::talk2() {
@@ -167,12 +167,12 @@ void Room66::talk4() {
 }
 
 int Room66::proc2() {
-	hide_cur();
+	hideCur();
 	auto_move(0, P_CHEWY);
 	_G(spieler).flags26_40 = true;
 	_G(spieler).room_e_obj[100].Attribut = 3;
 	_G(atds)->set_ats_str(423, 1, ANI_GO);
-	show_cur();
+	showCur();
 	
 	return 0;
 }
@@ -181,7 +181,7 @@ int Room66::proc7() {
 	if (!is_cur_inventar(ARTE_INV))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(7, P_CHEWY);
 	if (_G(spieler).flags26_10) {
 		del_inventar(_G(spieler).AkInvent);
@@ -193,16 +193,16 @@ int Room66::proc7() {
 
 	proc8(7, 2, 3, 411 + (_G(spieler).flags26_10 ? 1 : 0));
 	_G(cur_hide_flag) = 0;
-	hide_cur();
+	hideCur();
 	if (_G(spieler).flags26_20)
 		start_detail_wait(4, 1, ANI_VOR);
-	show_cur();
+	showCur();
 
 	return 1;
 }
 
 void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, int transitionDiaNr) {
-	hide_cur();
+	hideCur();
 
 	if (chewyAutoMovNr != -1)
 		auto_move(chewyAutoMovNr, P_CHEWY);
@@ -214,7 +214,7 @@ void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, in
 	_G(det)->del_static_ani(transitionAniNr);
 	_G(det)->set_static_ani(restartAniNr, -1);
 	_G(room)->set_timer_status(restartAniNr, TIMER_START);
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 66fb51470ab..a52f71e3a65 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -42,7 +42,7 @@ void Room67::entry() {
 	} else
 		_G(det)->show_static_spr(0);
 	if (!_G(flags).LoadGame) {
-		hide_cur();
+		hideCur();
 		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
 			set_person_pos(12, 100, P_HOWARD, P_RIGHT);
@@ -50,7 +50,7 @@ void Room67::entry() {
 			go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
 		}
 		auto_move(7, P_CHEWY);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -79,7 +79,7 @@ void Room67::setup_func() {
 int16 Room67::use_grammo() {
 	int16 action_flag = false;
 	if (is_cur_inventar(SCHALL_INV)) {
-		hide_cur();
+		hideCur();
 		action_flag = true;
 		auto_move(6, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -91,22 +91,22 @@ int16 Room67::use_grammo() {
 
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->stop_detail(0);
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
 
 void Room67::look_brief() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	start_aad_wait(379, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room67::use_kommode() {
 	int16 action_flag = false;
 	if (!_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		if (!_G(spieler).R67KommodeAuf) {
 			action_flag = true;
 			_G(spieler).R67KommodeAuf = true;
@@ -122,28 +122,28 @@ int16 Room67::use_kommode() {
 			_G(atds)->set_ats_str(400, 2, ATS_DATEI);
 			new_invent_2_cur(GALA_INV);
 		}
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
 
 void Room67::kostuem_aad(int16 aad_nr) {
-	hide_cur();
+	hideCur();
 	if (_G(spieler).DiaAMov != -1) {
 		auto_move(_G(spieler).DiaAMov, P_CHEWY);
 	}
 	start_aad_wait(aad_nr, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room67::talk_papagei() {
 	int16 action_flag = false;
 	if (!_G(spieler).R67PapageiWeg && !_G(spieler).inv_cur) {
 		action_flag = true;
-		hide_cur();
+		hideCur();
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		if (_G(menu_item) == CUR_HOWARD) {
-			show_cur();
+			showCur();
 
 			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
 			_G(ssi)[2].Y = 10;
@@ -155,7 +155,7 @@ int16 Room67::talk_papagei() {
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_TALK) {
 			auto_move(5, P_CHEWY);
-			show_cur();
+			showCur();
 
 			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
 			_G(ssi)[2].Y = 10;
@@ -163,7 +163,7 @@ int16 Room67::talk_papagei() {
 			start_ads_wait(18);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_USE) {
-			hide_cur();
+			hideCur();
 			auto_move(4, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(spieler).R67PapageiWeg = true;
@@ -171,10 +171,10 @@ int16 Room67::talk_papagei() {
 			_G(det)->del_static_ani(1);
 			_G(det)->show_static_spr(0);
 			invent_2_slot(PAPAGEI_INV);
-			show_cur();
+			showCur();
 			_G(atds)->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
 		}
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 300aa89825a..e7611e7dae6 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -61,13 +61,13 @@ void Room68::entry() {
 		_G(det)->hide_static_spr(3);
 	
 	if (!_G(flags).LoadGame) {
-		hide_cur();
+		hideCur();
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
 			set_person_pos(524, 51, P_HOWARD, P_LEFT);
 			set_person_pos(550, 54, P_NICHELLE, P_LEFT);
 		}
 		auto_move(7, P_CHEWY);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -148,10 +148,10 @@ void Room68::setup_func() {
 }
 
 void Room68::look_kaktus() {
-	hide_cur();
+	hideCur();
 	auto_move(6, P_CHEWY);
 	start_aad_wait(383, -1);
-	show_cur();
+	showCur();
 }
 
 void Room68::talk_indigo() {
@@ -159,7 +159,7 @@ void Room68::talk_indigo() {
 }
 
 void Room68::talk_indigo(int16 aad_nr) {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	_G(room)->set_timer_status(8, TIMER_STOP);
 	_G(det)->del_static_ani(8);
@@ -175,22 +175,22 @@ void Room68::talk_indigo(int16 aad_nr) {
 	}
 	_G(room)->set_timer_status(8, TIMER_START);
 	_G(det)->set_static_ani(8, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room68::use_indigo() {
 	int16 action_flag = false;
-	hide_cur();
+	hideCur();
 	if (is_cur_inventar(CLINT_500_INV)) {
 		action_flag = true;
 		if (_G(spieler).R68Lied) {
-			hide_cur();
+			hideCur();
 			auto_move(3, P_CHEWY);
 			auto_scroll(78, 0);
 			del_inventar(_G(spieler).AkInvent);
 			talk_indigo(394);
 			_G(cur_hide_flag) = false;
-			hide_cur();
+			hideCur();
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
@@ -199,7 +199,7 @@ int16 Room68::use_indigo() {
 			_G(det)->set_static_ani(12, -1);
 			talk_indigo(398);
 			_G(cur_hide_flag) = false;
-			hide_cur();
+			hideCur();
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
@@ -215,35 +215,35 @@ int16 Room68::use_indigo() {
 		action_flag = true;
 		start_aad_wait(393, -1);
 	}
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
 void Room68::talk_keeper() {
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	_G(room)->set_timer_status(20, TIMER_STOP);
 	_G(det)->del_static_ani(20);
 	start_detail_wait(15, 1, ANI_VOR);
 	_G(det)->set_static_ani(16, -1);
-	show_cur();
+	showCur();
 	_G(ssi)[3].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
 	_G(ssi)[3].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 	_G(atds)->set_split_win(3, &_G(ssi)[3]);
 	start_ads_wait(20);
 	_G(cur_hide_flag) = false;
-	hide_cur();
+	hideCur();
 	_G(det)->del_static_ani(16);
 	start_detail_wait(15, 1, ANI_RUECK);
 	_G(room)->set_timer_status(20, TIMER_START);
 	_G(det)->set_static_ani(20, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room68::use_papagei() {
 	int16 action_flag = false;
 	if (is_cur_inventar(PAPAGEI_INV)) {
-		hide_cur();
+		hideCur();
 		action_flag = true;
 		_G(spieler).R68Papagei = true;
 		del_inventar(_G(spieler).AkInvent);
@@ -253,7 +253,7 @@ int16 Room68::use_papagei() {
 		_G(det)->start_detail(21, 255, ANI_VOR);
 		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(407, 1, ATS_DATEI);
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
@@ -269,14 +269,14 @@ void Room68::calc_diva() {
 				_G(det)->start_detail(18, 255, ANI_VOR);
 			}
 		} else if (!_G(spieler).R68Gutschein && !is_chewy_busy()) {
-			hide_cur();
+			hideCur();
 			_G(spieler).R68Gutschein = true;
 			auto_move(4, P_CHEWY);
 			start_aad_wait(386, -1);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			new_invent_2_cur(BAR_GUT_INV);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-			show_cur();
+			showCur();
 		}
 	}
 }
@@ -284,7 +284,7 @@ void Room68::calc_diva() {
 int16 Room68::use_keeper() {
 	int16 action_flag = false;
 	if (is_cur_inventar(BAR_GUT_INV)) {
-		hide_cur();
+		hideCur();
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
 		auto_move(2, P_CHEWY);
@@ -295,14 +295,14 @@ int16 Room68::use_keeper() {
 		_G(room)->set_timer_status(20, TIMER_START);
 		_G(det)->set_static_ani(20, -1);
 		new_invent_2_cur(B_MARY_INV);
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
 
 int16 Room68::use_diva() {
 	int16 action_flag;
-	hide_cur();
+	hideCur();
 	if (is_cur_inventar(B_MARY_INV)) {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
@@ -330,12 +330,12 @@ int16 Room68::use_diva() {
 		start_aad_wait(402, -1);
 	} else
 		action_flag = use_papagei();
-	show_cur();
+	showCur();
 	return action_flag;
 }
 
 void Room68::kostuem_aad(int16 aad_nr) {
-	hide_cur();
+	hideCur();
 	if (_G(spieler).DiaAMov != -1) {
 		auto_move(_G(spieler).DiaAMov, P_CHEWY);
 	}
@@ -421,13 +421,13 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			load_room_music(_G(spieler).PersonRoomNr[0]);
 		}
 	}
-	show_cur();
+	showCur();
 }
 
 void Room68::talk_papagei() {
-	hide_cur();
+	hideCur();
 	auto_move(5, P_CHEWY);
-	show_cur();
+	showCur();
 
 	_G(ssi)[2].X = 60;
 	_G(ssi)[2].Y = 80;
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 9f52bc950f6..6d36d12a9a8 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -49,7 +49,7 @@ void Room69::entry(int16 eib_nr) {
 		return;
 
 	_G(cur_hide_flag) = false;
-	hide_cur();
+	hideCur();
 
 	if (eib_nr == 102)
 		proc1();
@@ -58,7 +58,7 @@ void Room69::entry(int16 eib_nr) {
 		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
 		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
 		go_auto_xy(351, 97, P_HOWARD, ANI_WAIT);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -76,16 +76,16 @@ void Room69::setup_func() {
 }
 
 void Room69::look_schild() {
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	start_aad_wait(382, -1);
-	show_cur();
+	showCur();
 }
 
 int16 Room69::use_bruecke() {
 	int16 action_flag = false;
 	if (!_G(spieler).inv_cur) {
-		hide_cur();
+		hideCur();
 		action_flag = true;
 
 		if (!_G(spieler).R68KarteDa) {
@@ -116,7 +116,7 @@ int16 Room69::use_bruecke() {
 			_G(spieler_mi)[P_CHEWY].Mode = false;
 			switch_room(70);
 		}
-		show_cur();
+		showCur();
 	}
 	return action_flag;
 }
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 61f1e8836bf..bfc5b169b1e 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -157,7 +157,7 @@ int Room71::proc1() {
 		return 0;
 	}
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(256, 0);
@@ -187,7 +187,7 @@ int Room71::proc1() {
 	if (!_G(spieler).R71LeopardVined)
 		start_aad_wait(432, -1);
 
-	show_cur();
+	showCur();
 	_G(flags).NoScroll = false;
 	return 1;
 }
@@ -221,7 +221,7 @@ void Room71::proc2() {
 	_G(spieler).R71LeopardVined = true;
 	_G(flags).NoScroll = false;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 	start_aad_wait(434, -1);
 }
 
@@ -261,7 +261,7 @@ int Room71::proc6() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(3);
@@ -278,12 +278,12 @@ int Room71::proc6() {
 	auto_move(3, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	
-	show_cur();
+	showCur();
 	return 1;
 }
 
 void Room71::proc7() {
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 	start_aad_wait(429, -1);
 	_G(SetUpScreenFunc) = nullptr;
@@ -300,7 +300,7 @@ void Room71::proc7() {
 	_G(flags).NoScroll = false;
 	start_aad_wait(432, -1);
 
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 29e54ebdead..de1e826ca46 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -45,7 +45,7 @@ void Room72::entry(int16 eib_nr) {
 		_G(spieler).ZoomXy[P_NICHELLE][1] = 40;
 		_G(zoom_horizont) = 140;
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		hide_cur();
+		hideCur();
 	}
 
 	_G(flags).ZoomMov = true;
@@ -97,7 +97,7 @@ void Room72::proc1(int16 flicNr) {
 	set_up_screen(DO_SETUP);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	show_cur();
+	showCur();
 	switch_room(76);
 }
 
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 18af711b22f..b57b8ed99fc 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -83,7 +83,7 @@ int Room73::proc1() {
 	if (_G(spieler).inv_cur && !_G(spieler).flags28_20)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	_G(spieler).flags28_20 = true;
 	auto_move(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
@@ -91,7 +91,7 @@ int Room73::proc1() {
 	_G(atds)->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(430, 1, ATS_DATEI);
 	_G(det)->show_static_spr(3);
-	show_cur();
+	showCur();
 
 	return 1;	
 }
@@ -100,7 +100,7 @@ int Room73::proc2() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	_G(spieler).flags28_40 = true;
 	auto_move(4, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
@@ -108,7 +108,7 @@ int Room73::proc2() {
 	_G(det)->hide_static_spr(4);
 	_G(atds)->set_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
 	new_invent_2_cur(99);
-	show_cur();
+	showCur();
 
 	return 1;
 }
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index b30c116d660..1f66ade9991 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -89,7 +89,7 @@ void Room74::xit(int16 eib_nr) {
 
 int Room74::proc1() {
 	int retVal = 0;
-	hide_cur();
+	hideCur();
 
 	if (is_cur_inventar(MACHETE_INV)) {
 		retVal = 1;
@@ -110,7 +110,7 @@ int Room74::proc1() {
 		new_invent_2_cur(RUBBER_INV);
 	}
 
-	show_cur();
+	showCur();
 	return retVal;
 }
 
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index adbbb12bdad..4419d325745 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -85,12 +85,12 @@ void Room75::xit(int16 eib_nr) {
 
 void Room75::proc1() {
 	_G(cur_hide_flag) = 0;
-	hide_cur();
+	hideCur();
 	set_person_pos(363, 110, P_CHEWY, P_LEFT);
 	set_person_pos(322, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(317, 96, P_HOWARD, P_RIGHT);
 	go_auto_xy(318, 110, P_NICHELLE, ANI_WAIT);
-	show_cur();
+	showCur();
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 43c932a78b5..6d3a2b58b82 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -65,7 +65,7 @@ void Room76::entry() {
 		return;
 
 	if (!_G(spieler).flags29_2) {
-		hide_cur();
+		hideCur();
 		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).flags29_2 = true;
@@ -74,7 +74,7 @@ void Room76::entry() {
 		proc5();
 
 	} else if (!_G(spieler).r76State) {
-		hide_cur();
+		hideCur();
 		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).r76State = -1;
@@ -99,16 +99,16 @@ void Room76::setup_func() {
 }
 
 void Room76::talk1() {
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 	auto_scroll(172, 0);
 	const int diaNr = 425 + (_G(spieler).flags32_4 ? 1 : 0);
 	start_aad_wait(diaNr, -1);
-	show_cur();
+	showCur();
 }
 
 void Room76::talk2() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	int diaNr;
 	if (!_G(spieler).flags29_8)
@@ -122,7 +122,7 @@ void Room76::talk2() {
 	if (diaNr == 421)
 		proc5();
 
-	show_cur();
+	showCur();
 }
 
 void Room76::proc3(int diaNr) {
@@ -146,7 +146,7 @@ void Room76::proc5() {
 	go_auto_xy(669, 127, P_CHEWY, ANI_WAIT);
 	wait_show_screen(20);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	show_cur();
+	showCur();
 	set_person_pos(30, 150, P_CHEWY, P_RIGHT);
 	switch_room(78);
 }
@@ -155,7 +155,7 @@ int Room76::proc6() {
 	int retVal = 0;
 
 	if (is_cur_inventar(93)) {
-		hide_cur();
+		hideCur();
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).flags29_8 = true;
 		retVal = 1;
@@ -167,13 +167,13 @@ int Room76::proc6() {
 		_G(det)->set_static_ani(2, -1);
 		start_detail_wait(9, 1, ANI_VOR);
 		start_detail_wait(10, 1, ANI_VOR);
-		show_cur();
+		showCur();
 	} else if (is_cur_inventar(94)) {
-		hide_cur();
+		hideCur();
 		retVal = 1;
 		set_person_spr(P_RIGHT, P_CHEWY);
 		start_aad_wait(436, 1);
-		show_cur();
+		showCur();
 	}
 
 	return retVal;
@@ -184,7 +184,7 @@ int Room76::proc7() {
 		return 0;
 	
 	if (_G(spieler).flags29_4) {
-		hide_cur();
+		hideCur();
 		auto_move(6, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
@@ -205,18 +205,18 @@ int Room76::proc7() {
 			_G(det)->show_static_spr(8 + i);
 
 		start_aad_wait(427, -1);
-		show_cur();
+		showCur();
 		start_ads_wait(21);
-		hide_cur();
+		hideCur();
 		start_aad_wait(428, -1);
-		show_cur();
+		showCur();
 		_G(spieler).flags29_80 = true;
 		switch_room(78);
 	} else {
-		hide_cur();
+		hideCur();
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		start_aad_wait(577, -1);
-		show_cur();
+		showCur();
 	}
 
 	return 1;
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 2636d5a3898..98c8619c90c 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -55,11 +55,11 @@ void Room77::entry() {
 
 	} else if (_G(spieler).r76State == 1) {
 		_G(spieler).r76State = -1;
-		hide_cur();
+		hideCur();
 		_G(spieler).scrollx = 62;
 		set_person_pos(158, 127, P_CHEWY, P_RIGHT);
 		start_aad_wait(440, -1);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -71,7 +71,7 @@ int Room77::proc1() {
 	if (_G(spieler).flags29_4 || !is_cur_inventar(103))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	int diaNr, aniId;
 	if (_G(spieler).flags29_8) {
@@ -89,7 +89,7 @@ int Room77::proc1() {
 	cur_2_inventory();
 	start_spz(aniId, 255, false, P_CHEWY);
 	start_aad_wait(diaNr, -1);
-	show_cur();
+	showCur();
 	if (_G(spieler).flags29_10)
 		remove_inventory(103);
 
@@ -100,7 +100,7 @@ int Room77::proc2() {
 	if (_G(spieler).flags29_4 || !is_cur_inventar(100))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 
 	int diaNr, aniId;
@@ -120,7 +120,7 @@ int Room77::proc2() {
 	start_spz(aniId, 255, false, P_CHEWY);
 	start_aad_wait(diaNr, -1);
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index df8ca6e5701..379ba3b23d9 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -33,7 +33,7 @@ void Room78::entry() {
 	_G(spieler).r76State = -1;
 	g_engine->_sound->playSound(0, 1);
 	g_engine->_sound->playSound(0, 1, false);
-	hide_cur();
+	hideCur();
 	_G(spieler).ScrollxStep = 1;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_HOWARD] = true;
@@ -125,7 +125,7 @@ void Room78::entry() {
 	}
 
 	switch_room(destRoom);
-	show_cur();
+	showCur();
 }
 
 void Room78::xit() {
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index f5d82039f6b..7814e23884d 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -45,11 +45,11 @@ void Room79::entry() {
 		set_person_pos(568, 65, P_HOWARD, P_LEFT);
 		set_person_pos(534, 75, P_NICHELLE, P_LEFT);
 		_G(spieler).scrollx = 300;
-		hide_cur();
+		hideCur();
 		start_aad_wait(484, -1);
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10026;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
-		show_cur();
+		showCur();
 	}
 
 	_G(SetUpScreenFunc) = setup_func;
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 5806dcd68e1..f1eb5e92b2f 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -78,7 +78,7 @@ void Room80::setup_func() {
 
 	_G(menu_item) = CUR_USE;
 	cur_2_inventory();
-	cursor_wahl(CUR_ZEIGE);
+	cursorChoice(CUR_ZEIGE);
 	int vec = _G(det)->maus_vector(_G(spieler).scrollx + _G(minfo).x, _G(minfo).y);
 	if (vec == -1)
 		return;
@@ -117,7 +117,7 @@ void Room80::setup_func() {
 	_G(SetUpScreenFunc) = nullptr;
 	_G(det)->hide_static_spr(vec);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 	_G(spieler).flags30_1 = true;
 	_G(maus_links_click) = false;
 	set_up_screen(DO_SETUP);
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 2549736883d..07470f1f9e0 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -65,7 +65,7 @@ void Room81::xit(int16 eib_nr) {
 
 void Room81::proc1() {
 	int diaNr = -1;
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	if (!_G(spieler).flags30_2)
 		diaNr = 458;
@@ -102,7 +102,7 @@ void Room81::proc1() {
 		start_aad_wait(diaNr, -1);
 	}
 
-	show_cur();
+	showCur();
 }
 
 int Room81::proc2() {
@@ -110,7 +110,7 @@ int Room81::proc2() {
 	int diaNr = -1;
 	int aniId = -1;
 
-	hide_cur();
+	hideCur();
 	if (is_cur_inventar(110)) {
 		auto_move(1, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
@@ -133,7 +133,7 @@ int Room81::proc2() {
 		proc3();
 	}
 
-	show_cur();
+	showCur();
 	return retVal;
 }
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index a315bc614cc..674ee57f4ca 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -132,10 +132,10 @@ void Room82::talk1() {
 }
 
 void Room82::talk2() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	start_aad_wait(453, -1);
-	show_cur();
+	showCur();
 }
 
 void Room82::talk3() {
@@ -146,7 +146,7 @@ int Room82::proc3() {
 	if (!is_cur_inventar(FOOD_CERTIFICATE_INV))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(4, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(room)->set_timer_status(0, TIMER_STOP);
@@ -158,13 +158,13 @@ int Room82::proc3() {
 
 	del_inventar(_G(spieler).AkInvent);
 	new_invent_2_cur(104);
-	show_cur();
+	showCur();
 
 	return 1;
 }
 
 void Room82::proc4() {
-	hide_cur();
+	hideCur();
 	_G(spieler).flags30_8 = true;
 	auto_move(5, P_CHEWY);
 	_G(flags).NoScroll = true;
@@ -184,14 +184,14 @@ void Room82::proc4() {
 	_G(room)->set_timer_status(7, TIMER_START);
 	_G(flags).NoScroll = false;
 
-	show_cur();
+	showCur();
 }
 
 int Room82::proc6() {
 	if (!is_cur_inventar(105) && !is_cur_inventar(106))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 
 	if (_G(spieler).flags30_10) {
@@ -215,12 +215,12 @@ int Room82::proc6() {
 		start_aad_wait(276, -1);
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
 void Room82::proc8() {
-	hide_cur();
+	hideCur();
 	_G(spieler).flags30_10 = true;
 	start_aad_wait(447, -1);
 	auto_move(6, P_CHEWY);
@@ -237,7 +237,7 @@ void Room82::proc8() {
 	_G(det)->del_static_ani(4);
 	start_detail_wait(6, 2, ANI_VOR);
 	_G(det)->set_static_ani(4, -1);
-	show_cur();
+	showCur();
 }
 
 int Room82::proc9() {
@@ -249,7 +249,7 @@ int Room82::proc9() {
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 	switch_room(88);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 
 	return 1;
 }
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index e4e1a9847d7..430a9642755 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -92,7 +92,7 @@ void Room84::entry() {
 			}
 		}
 	} else if (_G(spieler).flags32_20) {
-		hide_cur();
+		hideCur();
 		set_person_pos(347, 130, P_CHEWY, P_RIGHT);
 		set_person_pos(408, 113, P_HOWARD, P_LEFT);
 		_G(spieler).scrollx = 250;
@@ -101,7 +101,7 @@ void Room84::entry() {
 		_G(spieler).room_e_obj[125].Attribut = 255;
 		_G(atds)->set_ats_str(485, 2, ATS_DATEI);
 		start_aad_wait(477, -1);
-		show_cur();
+		showCur();
 	} else {
 		set_person_pos(263, 136, P_CHEWY, P_LEFT);
 		set_person_pos(238, 113, P_HOWARD, P_RIGHT);
@@ -135,7 +135,7 @@ void Room84::setup_func() {
 	if (_G(spieler).R84GoonsPresent && !_flag) {
 		_flag = true;
 		_G(spieler).flags30_80 = true;
-		hide_cur();
+		hideCur();
 		auto_move(4, P_CHEWY);
 		_G(flags).NoScroll = true;
 		set_person_spr(P_LEFT, P_CHEWY);
@@ -149,7 +149,7 @@ void Room84::setup_func() {
 		_G(det)->set_static_ani(3, -1);
 		start_aad_wait(456, -1);
 		_G(flags).NoScroll = false;
-		show_cur();
+		showCur();
 	}
 
 	const int posX = _G(spieler_vector)[P_CHEWY].Xypos[0];
@@ -188,7 +188,7 @@ int Room84::proc4() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(5, P_CHEWY);
 
 	if (_G(spieler).flags32_10) {
@@ -201,8 +201,8 @@ int Room84::proc4() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
 	switch_room(88);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
-	show_cur();
+	cursorChoice(CUR_WALK);
+	showCur();
 
 	return 1;
 }
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index a904315671a..fe63d638a7b 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -57,7 +57,7 @@ void Room85::entry(int16 eib_nr) {
 		return;
 
 	if (_G(spieler).flags30_1 || eib_nr == 124) {
-		hide_cur();
+		hideCur();
 		set_person_pos(278, 157, P_CHEWY, P_RIGHT);
 		set_person_pos(296, 142, P_HOWARD, P_RIGHT);
 		set_person_pos(322, 142, P_NICHELLE, P_RIGHT);
@@ -70,14 +70,14 @@ void Room85::entry(int16 eib_nr) {
 			set_person_pos(195, 146, P_CHEWY, P_RIGHT);
 			set_person_pos(186, 142, P_HOWARD, P_RIGHT);
 		}
-		show_cur();
+		showCur();
 	} else if (!_G(spieler.flags32_20)) {
 		set_person_pos(148, 152, P_CHEWY, P_RIGHT);
 		set_person_pos(98, 142, P_HOWARD, P_RIGHT);
 		set_person_pos(128, 142, P_NICHELLE, P_RIGHT);
 		_G(spieler).scrollx = 0;
 	} else {
-		hide_cur();
+		hideCur();
 		_G(spieler).scrollx = 0;
 		set_person_pos(133, 152, P_CHEWY, P_RIGHT);
 		_G(spieler).room_e_obj[127].Attribut = 255;
@@ -98,7 +98,7 @@ void Room85::entry(int16 eib_nr) {
 		register_cutscene(25);
 
 		switch_room(84);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -163,7 +163,7 @@ int Room85::proc2() {
 	remove_inventory(87);
 	switch_room(89);
 	
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index cb20be2d0eb..1ca33173b47 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -62,7 +62,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(spieler).scrollx = 164;
 	} else {
 		_G(spieler_mi)[P_CHEWY].Vorschub = 16;
-		hide_cur();
+		hideCur();
 		_G(flags).ZoomMov = false;
 		_G(spieler).scrollx = 246;
 		_G(spieler).ScrollxStep = 8;
@@ -89,7 +89,7 @@ void Room86::entry(int16 eib_nr) {
 		auto_move(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
 		switch_room(85);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -145,7 +145,7 @@ int Room86::proc2() {
 	if (!is_cur_inventar(94))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->start_detail(0, 255, false);
@@ -162,7 +162,7 @@ int Room86::proc2() {
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
 	start_aad_wait(468, -1);
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 78d9d9c04fd..4fa1319b698 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -109,7 +109,7 @@ int Room87::proc2(int16 txt_nr) {
 	if (!is_cur_inventar(107) && !is_cur_inventar(108))
 		return 0;
 
-	hide_cur();
+	hideCur();
 
 	int diaNr = 0;
 	int movNr;
@@ -139,7 +139,7 @@ int Room87::proc2(int16 txt_nr) {
 		if (_G(spieler).flags32_4 && _G(spieler).flags32_8)
 			_G(atds)->del_steuer_bit(502, ATS_AKTIV_BIT, ATS_DATEI);
 	}
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -152,7 +152,7 @@ int Room87::proc4() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	flic_cut(FCUT_093);
 	flic_cut(FCUT_094);
@@ -171,7 +171,7 @@ int Room87::proc4() {
 	_G(spieler).flags32_10 = true;
 
 	switch_room(86);
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index cd3eb96dcda..4752453da76 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -58,12 +58,12 @@ int Room88::proc1() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(0, P_CHEWY);
 	switch_room(_G(spieler).r88DestRoom);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
-	show_cur();
+	cursorChoice(CUR_WALK);
+	showCur();
 	
 	return 1;
 }
@@ -72,7 +72,7 @@ int Room88::proc2() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->show_static_spr(0);
@@ -83,7 +83,7 @@ int Room88::proc2() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(0);
 	
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -91,11 +91,11 @@ int Room88::proc3() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 
 	if (!_G(spieler).flags30_80 || _G(spieler).R88UsedMonkey) {
-		hide_cur();
+		hideCur();
 		if (_G(spieler).flags32_10) {
 			start_aad_wait(480, -1);
 			_G(out)->set_pointer(nullptr);
@@ -128,7 +128,7 @@ int Room88::proc3() {
 		_G(spieler).flags32_1 = true;
 		_G(out)->raster_col(0, 0, 0, 0);
 		switch_room(80);
-		hide_cur();
+		hideCur();
 		start_detail_wait(1, 1, ANI_VOR);
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
@@ -145,7 +145,7 @@ int Room88::proc3() {
 		_G(spieler).flags32_1 = false;
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 04e0725bf04..fca8c718558 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -53,7 +53,7 @@ void Room89::entry() {
 	}
 
 	if (_G(spieler).flags35_2) {
-		hide_cur();
+		hideCur();
 		_G(spieler).flags35_2 = false;
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 537;
@@ -70,10 +70,10 @@ void Room89::entry() {
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 538;
 		switch_room(92);
-		show_cur();
+		showCur();
 	} else if (_G(spieler).flags35_4) {
 		// End sequence
-		hide_cur();
+		hideCur();
 		set_person_pos(138, 82, P_CHEWY, P_RIGHT);
 		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
 		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
@@ -171,7 +171,7 @@ int Room89::proc2() {
 	if (_G(spieler).inv_cur || _G(spieler.flags33_2))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	_G(spieler).flags33_2 = true;
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 489;
@@ -186,7 +186,7 @@ int Room89::proc2() {
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 487;
 	switch_room(92);
-	show_cur();
+	showCur();
 
 	return 1;
 }
@@ -195,7 +195,7 @@ int Room89::proc4() {
 	if (_G(spieler).inv_cur || _G(spieler).flags32_80)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 
@@ -213,7 +213,7 @@ int Room89::proc4() {
 		_G(atds)->set_ats_str(514, 1, ATS_DATEI);
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -224,12 +224,12 @@ int Room89::proc5() {
 	if (!_G(spieler).flags32_80 || !_G(spieler).flags33_1 || !_G(spieler).flags33_2)
 		Room66::proc8(-1, 2, 3, 493);
 	else {
-		hide_cur();
+		hideCur();
 		Room66::proc8(-1, 2, 3, 486);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 488;
 		switch_room(92);
-		show_cur();
+		showCur();
 	}
 	
 	return 1;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 945b4c0891c..f81458ca584 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -61,7 +61,7 @@ void Room90::entry(int16 eib_nr) {
 		}
 	}
 
-	hide_cur();
+	hideCur();
 	_G(HowardMov) = 1;
 
 	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
@@ -101,7 +101,7 @@ void Room90::entry(int16 eib_nr) {
 	}
 
 	_G(HowardMov) = 0;
-	show_cur();
+	showCur();
 }
 
 void Room90::xit(int16 eib_nr) {
@@ -226,9 +226,9 @@ void Room90::proc2() {
 			start_spz(65, 255, false, P_CHEWY);
 		}
 
-		hide_cur();
+		hideCur();
 		start_aad_wait(-1, diaNr);
-		show_cur();
+		showCur();
 	}
 	_G(flags).AutoAniPlay = false;
 }
@@ -237,7 +237,7 @@ int Room90::getHubcaps() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	start_aad_wait(515, -1);
 	start_spz_wait(14, 1, false, P_CHEWY);
@@ -274,7 +274,7 @@ int Room90::getHubcaps() {
 	_G(spieler).flags35_1 = false;
 	_G(atds)->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
-	show_cur();
+	showCur();
 
 	return 1;
 }	
@@ -283,7 +283,7 @@ int Room90::shootControlUnit() {
 	if (!is_cur_inventar(111))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	del_inventar(_G(spieler).AkInvent);
 	_G(HowardMov) = 2;
 	_G(flags).ZoomMov = false;
@@ -311,7 +311,7 @@ int Room90::shootControlUnit() {
 	_G(atds)->del_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(flags).ZoomMov = true;
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -326,7 +326,7 @@ int Room90::useSurimyOnWreck() {
 		return 0;
 
 	_G(spieler).flags34_10 = true;
-	hide_cur();
+	hideCur();
 	cur_2_inventory();
 	auto_move(6, P_CHEWY);
 	_G(maus_links_click) = false;
@@ -342,7 +342,7 @@ int Room90::useSurimyOnWreck() {
 	start_aad_wait(519, -1);
 	_G(atds)->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 4e5a6884d65..eff2e2a8f06 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -44,7 +44,7 @@ void Room91::entry() {
 		return;
 
 	_G(spieler).scrollx = 320;
-	hide_cur();
+	hideCur();
 
 	if (_G(spieler).flags34_1) {
 		set_person_pos(499, 106, P_CHEWY, P_RIGHT);
@@ -71,7 +71,7 @@ void Room91::entry() {
 		_G(det)->start_detail(5, 2, false);
 	}
 
-	show_cur();
+	showCur();
 }
 
 void Room91::xit(int16 eib_nr) {
@@ -104,7 +104,7 @@ void Room91::setup_func() {
 		
 		_G(menu_item) = CUR_USE;
 		cur_2_inventory();
-		cursor_wahl(CUR_22);
+		cursorChoice(CUR_22);
 
 		if (_G(maus_links_click) == 0 || _click)
 			return;
@@ -113,7 +113,7 @@ void Room91::setup_func() {
 		_G(maus_links_click) = oldClick;
 		_click = 1;
 		const int aniNr = 1 + (_G(minfo).y <= 100 ? 1 : 0);
-		hide_cur();
+		hideCur();
 		_G(det)->stop_detail(0);
 		start_detail_wait(aniNr, 1, ANI_VOR);
 		_click = oldClick;
@@ -122,11 +122,11 @@ void Room91::setup_func() {
 		_G(det)->start_detail(7, 1, false);
 		start_spz_wait(62, 1, false, P_HOWARD);
 		_G(spieler).SVal3 += 1;
-		show_cur();
+		showCur();
 		if (_G(spieler).SVal3 == 4) {
 			_G(det)->stop_detail(0);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			hide_cur();
+			hideCur();
 			auto_move(1, P_CHEWY);
 			stop_spz();
 			start_aad_wait(505, -1);
@@ -135,7 +135,7 @@ void Room91::setup_func() {
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 			_G(spieler).flags34_4 = false;
-			show_cur();
+			showCur();
 			switch_room(50);
 		}
 	}
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 20bcc51c7af..4e8c39282bf 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -32,7 +32,7 @@ void Room92::entry() {
 	const int oldScrollX = _G(spieler.scrollx);
 	_G(spieler).scrollx = 0;
 	cur_2_inventory();
-	hide_cur();
+	hideCur();
 	hide_person();
 	start_aad_wait(_G(spieler).SVal2, -1);
 	switch (_G(spieler).SVal2) {
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index 92d71b414e3..cd025f59bf5 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -44,7 +44,7 @@ void Room93::entry() {
 
 	if (!_G(spieler).flags37_40) {
 		_G(det)->del_static_ani(1);
-		hide_cur();
+		hideCur();
 		start_detail_wait(3, 1, ANI_GO);
 		_G(det)->set_static_ani(0, -1);
 		start_aad_wait(549, -1);
@@ -57,7 +57,7 @@ void Room93::entry() {
 		start_detail_wait(6, 1, ANI_GO);
 		start_detail_wait(2, 1, ANI_VOR);
 		set_up_screen(DO_SETUP);
-		show_cur();
+		showCur();
 	}
 
 	_G(spieler).flags35_40 = true;
@@ -69,7 +69,7 @@ void Room93::xit() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 94;
 	_G(spieler).scrollx = _G(spieler).r94Scrollx;
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 8a94080d1cb..c438561c04a 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -84,11 +84,11 @@ void Room94::entry() {
 			_G(flags).NoScroll = false;
 		}
 	} else {
-		hide_cur();
+		hideCur();
 		_G(spieler).scrollx = 120;
 		set_person_pos(255, 86, P_HOWARD, P_LEFT);
 		auto_move(3, P_CHEWY);
-		show_cur();
+		showCur();
 	}
 }
 
@@ -120,16 +120,16 @@ void Room94::gedAction(int index) {
 }
 
 void Room94::talk1() {
-	hide_cur();
+	hideCur();
 	Room66::proc8(3, 3, 2, 552);
-	show_cur();
+	showCur();
 }
 
 int Room94::giveGhostBottle() {
 	if (!is_cur_inventar(LIKOER2_INV))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	auto_scroll(216, 0);
 	del_inventar(_G(spieler).AkInvent);
@@ -143,7 +143,7 @@ int Room94::giveGhostBottle() {
 	_G(det)->stop_detail(5);
 	_G(det)->show_static_spr(5);
 	Room66::proc8(3, 3, 2, 617);
-	hide_cur();
+	hideCur();
 	_G(det)->hide_static_spr(5);
 	_G(det)->start_detail(5, 255, false);
 	start_aad_wait(622, -1);
@@ -157,7 +157,7 @@ int Room94::giveGhostBottle() {
 	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATEI);
 	new_invent_2_cur(114);
 	
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index f280f92ab9f..83482cb952b 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -44,7 +44,7 @@ void Room95::entry(int16 eib_nr) {
 	if (_G(flags).LoadGame)
 		return;
 
-	hide_cur();
+	hideCur();
 	if (eib_nr == 138) {
 		set_person_pos(-20, 120, P_HOWARD, ANI_GO);
 		auto_move(2, P_CHEWY);
@@ -52,7 +52,7 @@ void Room95::entry(int16 eib_nr) {
 		set_person_pos(473, 83, P_HOWARD, P_RIGHT);
 	}
 
-	show_cur();
+	showCur();
 }
 
 void Room95::xit(int16 eib_nr) {
@@ -88,7 +88,7 @@ void Room95::setup_func() {
 }
 
 int Room95::proc2() {
-	hide_cur();
+	hideCur();
 	auto_move(3, P_CHEWY);
 	if (is_cur_inventar(113)) {
 		del_inventar(_G(spieler).AkInvent);
@@ -97,12 +97,12 @@ int Room95::proc2() {
 		_G(spieler).flags35_20 = true;
 		_G(det)->show_static_spr(10);
 
-		show_cur();
+		showCur();
 		return 1;
 	}
 
 	if (_G(spieler).inv_cur) {
-		show_cur();
+		showCur();
 		return 0;
 	}
 
@@ -119,7 +119,7 @@ int Room95::proc2() {
 		start_aad_wait(548, -1);
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index f5793dd3c54..a89746fb006 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -42,11 +42,11 @@ void Room96::entry() {
 	if (_G(flags).LoadGame)
 		return;
 
-	hide_cur();
+	hideCur();
 	set_person_pos(93, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(116, 74, P_CHEWY, P_RIGHT);
 	auto_move(1, P_CHEWY);
-	show_cur();
+	showCur();
 }
 
 void Room96::xit(int16 eib_nr) {
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 2f616fd0031..f266743a36d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -105,7 +105,7 @@ void Room97::entry() {
 		return;
 
 	if (_G(spieler).flags37_8) {
-		hide_cur();
+		hideCur();
 		_G(out)->set_pointer(nullptr);
 		_G(out)->cls();
 
@@ -115,7 +115,7 @@ void Room97::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(19, 1, ANI_VOR);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		show_cur();
+		showCur();
 		switch_room(89);
 	} else {
 		_G(spieler).scrollx = 800;
@@ -200,9 +200,9 @@ void Room97::setup_func() {
 
 	if (_G(spieler).flags37_1 && _G(menu_item) == CUR_WALK) {
 		if (_G(spieler).scrollx + _G(minfo).x >= 487 && _G(spieler).scrollx + _G(minfo).x <= 522 && _G(minfo).y >= 23 && _G(minfo).y <= 59)
-			cursor_wahl(CUR_AUSGANG_OBEN);
+			cursorChoice(CUR_AUSGANG_OBEN);
 		else
-			cursor_wahl(CUR_WALK);
+			cursorChoice(CUR_WALK);
 	}
 
 	calc_person_look();
@@ -262,7 +262,7 @@ void Room97::proc2() {
 
 	_G(flags).AutoAniPlay = true;
 	stop_person(P_CHEWY);
-	hide_cur();
+	hideCur();
 	_G(Sdi)[6].z_ebene = 6;
 	_G(Sdi)[24].z_ebene = 6;
 	_G(spieler).flags36_1 = false;
@@ -275,7 +275,7 @@ void Room97::proc2() {
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(Sdi)[6].z_ebene = 166;
 	_G(Sdi)[24].z_ebene = 157;
-	show_cur();
+	showCur();
 	_G(flags).AutoAniPlay = false;
 }
 
@@ -284,7 +284,7 @@ void Room97::proc3() {
 		return;
 
 	_G(flags).AutoAniPlay = true;
-	hide_cur();
+	hideCur();
 	stop_person(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	
@@ -324,7 +324,7 @@ void Room97::proc3() {
 		_G(Sdi)[24].z_ebene = 157;
 		_G(spieler).flags36_80 = true;
 	}
-	show_cur();
+	showCur();
 	_G(flags).AutoAniPlay = false;
 }
 
@@ -334,7 +334,7 @@ void Room97::proc4() {
 
 	if (!_G(spieler).flags35_80) {
 		_G(flags).AutoAniPlay = true;
-		hide_cur();
+		hideCur();
 		_G(spieler_mi)[P_CHEWY].Mode = true;
 		stop_person(P_CHEWY);
 		g_engine->_sound->playSound(9, 0);
@@ -371,7 +371,7 @@ void Room97::proc4() {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
 		_G(HowardMov) = 0;
-		show_cur();
+		showCur();
 	}
 		
 	_G(flags).AutoAniPlay = false;
@@ -381,7 +381,7 @@ int Room97::proc5() {
 	if (!is_cur_inventar(114))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(0, P_CHEWY);
 	auto_scroll(800, 0);
 	
@@ -407,7 +407,7 @@ int Room97::proc5() {
 	g_engine->_sound->stopSound(0);
 	start_detail_wait(9, 0, ANI_GO);
 	
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -415,7 +415,7 @@ int Room97::proc6() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	go_auto_xy(298, 120, P_CHEWY, ANI_WAIT);
@@ -441,7 +441,7 @@ int Room97::proc6() {
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).flags36_8 = true;
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -449,7 +449,7 @@ int Room97::proc7() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = true;
@@ -464,7 +464,7 @@ int Room97::proc7() {
 	auto_move(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -472,7 +472,7 @@ int Room97::proc8() {
 	if (!is_cur_inventar(94))
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(2, P_CHEWY);
 	int diaNr = -1;
 	if (!_G(spieler).flags36_2)
@@ -522,7 +522,7 @@ int Room97::proc8() {
 		start_aad_wait(diaNr, -1);
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -530,7 +530,7 @@ int Room97::proc9() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(5, P_CHEWY);
 	
 	if (!_G(spieler).flags36_20) {
@@ -550,7 +550,7 @@ int Room97::proc9() {
 		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -558,7 +558,7 @@ int Room97::proc10() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 	auto_move(8, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	g_engine->_sound->playSound(7, 0);
@@ -568,9 +568,9 @@ int Room97::proc10() {
 	_G(spieler).flags37_1 = true;
 	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(menu_item) = CUR_WALK;
-	cursor_wahl(CUR_WALK);
+	cursorChoice(CUR_WALK);
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -578,7 +578,7 @@ int Room97::proc11() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	hide_cur();
+	hideCur();
 
 	if (!_G(spieler).flags37_2) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
@@ -602,10 +602,10 @@ int Room97::proc11() {
 		cur_2_inventory();
 		_G(spieler).flags37_8 = true;
 		switch_room(92);
-		show_cur(); // probably useless, but present in the original
+		showCur(); // probably useless, but present in the original
 	}
 
-	show_cur();
+	showCur();
 	return 1;
 }
 
@@ -620,7 +620,7 @@ void Room97::proc12() {
 		return;
 
 	_G(flags).AutoAniPlay = true;
-	hide_cur();
+	hideCur();
 	stop_person(P_CHEWY);
 	_G(det)->show_static_spr(26);
 	go_auto_xy(481, 39, P_CHEWY, ANI_WAIT);
@@ -631,7 +631,7 @@ void Room97::proc12() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(det)->hide_static_spr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	show_cur();
+	showCur();
 	_G(flags).AutoAniPlay = false;
 }
 
@@ -640,7 +640,7 @@ void Room97::proc13() {
 		return;
 
 	_G(flags).AutoAniPlay = true;
-	hide_cur();
+	hideCur();
 	stop_person(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(det)->show_static_spr(26);
@@ -652,7 +652,7 @@ void Room97::proc13() {
 	auto_move(6, P_CHEWY);
 	_G(det)->hide_static_spr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	show_cur();
+	showCur();
 	_G(flags).AutoAniPlay = false;
 }
 
@@ -661,10 +661,10 @@ int Room97::throwSlime() {
 		return 0;
 
 	_slimeThrown = true;
-	hide_cur();
+	hideCur();
 	del_inventar(_G(spieler).AkInvent);
 	_G(menu_item) = CUR_USE;
-	cursor_wahl(CUR_USE);
+	cursorChoice(CUR_USE);
 	
 	return 1;
 }
@@ -676,7 +676,7 @@ void Room97::sensorAnim() {
 	_G(flags).AutoAniPlay = true;
 	stop_person(P_CHEWY);
 	_G(menu_item) = CUR_USE;
-	cursor_wahl(CUR_USE);
+	cursorChoice(CUR_USE);
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
 	_slimeThrown = false;
@@ -693,7 +693,7 @@ void Room97::sensorAnim() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	hide_cur();
+	hideCur();
 	if (!_slimeThrown) {
 		start_detail_wait(17, 1, ANI_VOR);
 		_G(det)->start_detail(16, 1, true);
@@ -739,7 +739,7 @@ void Room97::sensorAnim() {
 	}
 
 	_G(atds)->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
-	show_cur();
+	showCur();
 	_G(flags).AutoAniPlay = false;
 }
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 438c4a2bf63..de4e53f61a8 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -560,7 +560,7 @@ void start_aad(int16 dia_nr, int16 ssi_nr) {
 void start_ads_wait(int16 dia_nr) {
 	if (!_G(flags).AdsDialog) {
 		_G(menu_item) = CUR_TALK;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		load_ads_dia(dia_nr);
 		while (_G(flags).AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 873ac776e1b..799b283367b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -154,12 +154,12 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 77:
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
-							hide_cur();
+							hideCur();
 							auto_move(3, P_CHEWY);
 							flic_cut(FCUT_004);
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
-							show_cur();
+							showCur();
 						} else {
 							action_ret = false;
 						}
@@ -2200,7 +2200,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case KNOCHEN_INV:
 		del_inventar(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = ANGEL2_INV;
 		_G(obj)->changeInventory(test_nr, ANGEL2_INV, &_G(room_blk));
@@ -2218,7 +2218,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		if (_G(spieler).AkInvent == 40) {
 			del_inventar(_G(spieler).AkInvent);
 			_G(menu_item) = CUR_USE;
-			cursor_wahl(_G(menu_item));
+			cursorChoice(_G(menu_item));
 			invent_2_slot(K_MASKE_INV);
 			invent_2_slot(K_FLEISCH_INV);
 			invent_2_slot(K_KERNE_INV);
@@ -2231,7 +2231,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case BRIEF_INV:
 		del_inventar(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		_G(spieler).R42BriefMarke = true;
 		ret = del_invent_slot(BRIEF_INV);
 		_G(spieler).InventSlot[ret] = BRIEF2_INV;
@@ -2241,7 +2241,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case FLASCHE_INV:
 		del_inventar(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		// fall through
 
 	case WOLLE_INV:
@@ -2254,7 +2254,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case PIRANHA_INV:
 		del_inventar(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(_G(menu_item));
+		cursorChoice(_G(menu_item));
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = B_MARY2_INV;
 		_G(obj)->changeInventory(test_nr, B_MARY2_INV, &_G(room_blk));
@@ -2279,7 +2279,7 @@ void calc_inv_use_txt(int16 test_nr) {
 	case 104:
 		del_inventar(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(CUR_USE);
+		cursorChoice(CUR_USE);
 
 		ret = del_invent_slot(test_nr);
 		_G(spieler).InventSlot[ret] = 110;
@@ -2290,7 +2290,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		del_inventar(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(105, 0, 1, 6);
 		_G(menu_item) = CUR_USE;
-		cursor_wahl(CUR_USE);
+		cursorChoice(CUR_USE);
 		break;
 
 	case 106:
@@ -2416,7 +2416,7 @@ int16 calc_person_txt(int16 p_nr) {
 			case 40:
 				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 					_G(menu_item) = CUR_HOWARD;
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 					txt_nr = 30000;
 				}
 				break;
@@ -2424,14 +2424,14 @@ int16 calc_person_txt(int16 p_nr) {
 			case 67:
 			case 71:
 				_G(menu_item) = CUR_HOWARD;
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				txt_nr = 30000;
 				break;
 
 			case 42:
 				if (!_G(spieler).R42MarkeOk && !_G(spieler).R42HoToBeamter) {
 					_G(menu_item) = CUR_HOWARD;
-					cursor_wahl(_G(menu_item));
+					cursorChoice(_G(menu_item));
 					txt_nr = 30000;
 				}
 				break;
@@ -2455,7 +2455,7 @@ int16 calc_person_txt(int16 p_nr) {
 			case 67:
 			case 71:
 				_G(menu_item) = CUR_NICHELLE;
-				cursor_wahl(_G(menu_item));
+				cursorChoice(_G(menu_item));
 				txt_nr = 30000;
 				break;
 
@@ -2769,7 +2769,7 @@ void calc_person_dia(int16 p_nr) {
 				_G(stopAutoMove)[i] = false;
 			}
 
-			show_cur();
+			showCur();
 		} else {
 			_G(room_blk).AadLoad = false;
 			_G(room_blk).AtsLoad = false;
@@ -2784,10 +2784,10 @@ void calc_person_dia(int16 p_nr) {
 			} else if (p_nr == P_NICHELLE) {
 				if (_G(spieler).PersonDia[P_NICHELLE] < 10000) {
 					_G(cur_hide_flag) = false;
-					hide_cur();
+					hideCur();
 					start_aad_wait(_G(spieler).PersonDia[P_NICHELLE], -1);
 					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE];
-					show_cur();
+					showCur();
 				} else {
 					start_ads_wait(_G(spieler).PersonDia[P_NICHELLE] - 10000);
 				}
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 84464f05a9d..36b6f160caa 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -68,8 +68,8 @@ bool Spieler::synchronize(Common::Serializer &s) {
 
 	s.syncAsSint16LE(AkInvent);
 	s.syncAsByte(inv_cur);
-	s.syncAsSint16LE(CurBreite);
-	s.syncAsSint16LE(CurHoehe);
+	s.syncAsSint16LE(_curWidth);
+	s.syncAsSint16LE(_curHeight);
 
 	for (int i = 0; i < MAX_MOV_OBJ; ++i)
 		room_m_obj[i].synchronize(s);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index b7a5b50f879..9a0cbb4bc9e 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -407,8 +407,8 @@ struct Spieler : public SpielerFlags {
 
 	int16 AkInvent = 0;
 	bool inv_cur = 0;
-	int16 CurBreite = 0;
-	int16 CurHoehe = 0;
+	int16 _curWidth = 0;
+	int16 _curHeight = 0;
 
 	RoomMovObject room_m_obj[MAX_MOV_OBJ];
 	RoomStaticInventory room_s_obj[MAX_FEST_OBJ];


Commit: 94f5cf50858dec1d6178ee54a3e9ae99623525fa
    https://github.com/scummvm/scummvm/commit/94f5cf50858dec1d6178ee54a3e9ae99623525fa
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: Fix an endianness issue in cursorChoice

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index c468ce0fefa..545aa96bf11 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -221,10 +221,9 @@ void cursorChoice(int16 nr) {
 	if (ok) {
 		cur_move = true;
 		_G(cur)->set_cur_ani(&_G(curani));
-		int16 *xy = (int16 *)_G(curblk).sprite[_G(curani).ani_anf];
-		_G(spieler)._curWidth = xy[0];
-		_G(spieler)._curHeight = xy[1];
-		_G(in)->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
+		_G(spieler)._curWidth = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf]);
+		_G(spieler)._curHeight = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf] + 2);
+		_G(in)->rectangle(0, 0, 320 - _G(spieler)._curWidth, 210 - _G(spieler)._curHeight);
 	}
 }
 


Commit: fcce6ef9ddef0de7b7ab3c7900da2f1f853f0ea6
    https://github.com/scummvm/scummvm/commit/fcce6ef9ddef0de7b7ab3c7900da2f1f853f0ea6
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: Add German exit message

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/files.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 117b6ed784c..a7a0adfdd98 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -183,7 +183,8 @@ enum SetupScreenMode {
 
 #define ADSH_TMP "adsh.tmp"
 
-#define QUIT_MSG "QUIT ?? Y/N "
+#define QUIT_MSG_EN "QUIT ?? Y/N "
+#define QUIT_MSG_DE "BEENDEN ?? J/N "
 
 #define MAX_PERSON 3
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 652b60d2391..7b45ba33e46 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -50,12 +50,10 @@ static const int16 FILE_ICONS[8 * 4] = {
 
 int16 Files::execute(bool isInGame) {
 	int16 key = 0;
-	int16 i, j;
 	Common::Point pt[8];
 	int16 mode[9];
 	bool visibility[8];
 	int16 ret = 0;
-	int16 line;
 	bool flag = false;
 
 	if (!ConfMan.getBool("original_menus")) {
@@ -80,7 +78,7 @@ int16 Files::execute(bool isInGame) {
 	showCur();
 
 	pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
-	for (i = SAVE; i <= W7; i++)
+	for (int16 i = SAVE; i <= W7; i++)
 		pt[i] = Common::Point(5, 5);
 
 	Common::fill(visibility, visibility + 8, true);
@@ -102,7 +100,7 @@ int16 Files::execute(bool isInGame) {
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 		// Draw the buttons at the bottom
-		for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
+		for (int16 i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
 			if (visibility[j]) {
 				if (!mode[j])
 					// Not pressed
@@ -118,7 +116,7 @@ int16 Files::execute(bool isInGame) {
 
 		// Write the list of savegame slots
 		char *tmp = fnames + (text_off * 40);
-		for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
+		for (int16 i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
 			if (i != active_slot) {
 				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
 				_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
@@ -144,7 +142,7 @@ int16 Files::execute(bool isInGame) {
 		if (mode[QUIT])
 			--mode[QUIT];
 		if (mode[QUIT] == 1) {
-			_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
+			_G(out)->printxy(120, 138, 255, 300, 0, g_engine->getLanguage() == Common::Language::DE_DEU ? QUIT_MSG_DE : QUIT_MSG_EN);
 			_G(out)->back2screen(_G(workpage));
 			_G(in)->alter_kb_handler();
 
@@ -177,8 +175,8 @@ int16 Files::execute(bool isInGame) {
 			case 1:
 				key = Common::KEYCODE_DOWN;
 				break;
-			case 2:
-				line = (_G(minfo).y - 68) / 10;
+			case 2: {
+				int16 line = (_G(minfo).y - 68) / 10;
 				if (line == active_slot)
 					key = Common::KEYCODE_RETURN;
 				else
@@ -188,6 +186,7 @@ int16 Files::execute(bool isInGame) {
 
 				if (!isInGame)
 					goto enter;
+				}
 				break;
 			case 3:
 				key = Common::KEYCODE_F1;


Commit: 891648a851c1fe195292e4c96a7a7a03a933afe9
    https://github.com/scummvm/scummvm/commit/891648a851c1fe195292e4c96a7a7a03a933afe9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:41-08:00

Commit Message:
CHEWY: Fix German intro number

Changed paths:
    engines/chewy/dialogs/main_menu.cpp


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 5c921bb382f..4eab29230d3 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -46,7 +46,7 @@ void MainMenu::execute() {
 
 		// NOTE: Originally, this was set to play video 200, but this actually
 		// jumped to the very last video in the file, so we play it explicitly
-		flic_cut(FCUT_160);
+		flic_cut(g_engine->getLanguage() == Common::Language::DE_DEU ? FCUT_155 : FCUT_160);
 		_G(sndPlayer)->stopMod();
 	}
 


Commit: 19234c3315ac2f0fba9697fa5f9d332398509592
    https://github.com/scummvm/scummvm/commit/19234c3315ac2f0fba9697fa5f9d332398509592
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:42-08:00

Commit Message:
CHEWY: Fix incorrect text replacement

Changed paths:
    engines/chewy/rooms/room89.cpp


diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index fca8c718558..b4b7b1d10fe 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -112,7 +112,7 @@ void Room89::entry() {
 		_G(out)->cls();
 		// Those strings are also displayed in the the German version
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
-		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Common::KEYCODE_ESCAPE from F5");
+		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Esc from F5");
 		_G(out)->sprite_save(_G(Ci).TempArea, 0, 0, 320, 200, 320);
 		edi = -300;
 		int var30 = -200;


Commit: 8e2ea2c8d545eacae16a388b0cdbbbe597ba3c0d
    https://github.com/scummvm/scummvm/commit/8e2ea2c8d545eacae16a388b0cdbbbe597ba3c0d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:42-08:00

Commit Message:
CHEWY: Refactor text printing and font handling code

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/data.cpp
    engines/chewy/data.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/flic.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/memory.cpp
    engines/chewy/memory.h
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 3874da0e6a3..3ecb4f42e79 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -26,6 +26,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
@@ -107,12 +108,6 @@ Atdsys::~Atdsys() {
 		free(_invUseMem);
 }
 
-void Atdsys::set_font(byte *font_adr, int16 fvorx, int16 fhoehe) {
-	_atdsv.Font = font_adr;
-	_atdsv.Fvorx = fvorx;
-	_atdsv.Fhoehe = fhoehe;
-}
-
 void Atdsys::set_delay(int16 *delay, int16 silent) {
 	_atdsv.Delay = delay;
 	_atdsv.Silent = silent;
@@ -590,12 +585,10 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 
 		if (_atsv.SilentCount <= 0) {
 			char *tmp_ptr = _atsv.Ptr;
-			_G(out)->set_fontadr(_atdsv.Font);
-			_G(out)->set_vorschub(_atdsv.Fvorx, 0);
 			_atsSsi = _ssi[0];
 			_atsSsi.Str = tmp_ptr;
-			_atsSsi.Fvorx = _atdsv.Fvorx;
-			_atsSsi.FHoehe = _atdsv.Fhoehe;
+			_atsSsi.Fvorx = _G(fontMgr)->getFont()->getDataWidth();
+			_atsSsi.FHoehe = _G(fontMgr)->getFont()->getDataHeight();
 			_atsSsi.X = x - scrx;
 			_atsSsi.Y = y - scry;
 			char *start_ptr = tmp_ptr;
@@ -935,8 +928,6 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 
 		if (_aadv.SilentCount <= 0) {
 			char *tmp_ptr = _aadv.Ptr;
-			_G(out)->set_fontadr(_atdsv.Font);
-			_G(out)->set_vorschub(_atdsv.Fvorx, 0);
 			_ssi[_aadv.StrHeader->AkPerson].Str = tmp_ptr;
 			if (_aadv.Person[_aadv.StrHeader->AkPerson].X != -1) {
 				_ssi[_aadv.StrHeader->AkPerson].X = _aadv.Person[_aadv.StrHeader->AkPerson].X - scrx;
@@ -944,8 +935,8 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 			if (_aadv.Person[_aadv.StrHeader->AkPerson].Y != -1) {
 				_ssi[_aadv.StrHeader->AkPerson].Y = _aadv.Person[_aadv.StrHeader->AkPerson].Y - scry;
 			}
-			_ssi[_aadv.StrHeader->AkPerson].Fvorx = _atdsv.Fvorx;
-			_ssi[_aadv.StrHeader->AkPerson].FHoehe = _atdsv.Fhoehe;
+			_ssi[_aadv.StrHeader->AkPerson].Fvorx = _G(fontMgr)->getFont()->getDataWidth();
+			_ssi[_aadv.StrHeader->AkPerson].FHoehe = _G(fontMgr)->getFont()->getDataHeight();
 			char *start_ptr = tmp_ptr;
 			int16 txt_len;
 			aad_get_zeilen(start_ptr, &txt_len);
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index bf7e816a1e2..b05bf24e754 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -108,9 +108,6 @@ struct AdsBlock {
 };
 
 struct AtdsVar {
-	byte *Font = nullptr;
-	int16 Fvorx = 0;
-	int16 Fhoehe = 0;
 	int16 Silent = 0;
 	int16 *Delay = 0;
 	int16 DiaNr = 0;
@@ -255,7 +252,6 @@ public:
 	Atdsys();
 	~Atdsys();
 
-	void set_font(byte *font_adr, int16 fvorx, int16 fhoehe);
 	void set_delay(int16 *delay, int16 silent);
 	void setHasSpeech(bool hasSpeech);
 	void updateSoundSettings();
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 35dea596253..1ffdb11dbd9 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -58,33 +58,6 @@ uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 	return nr;
 }
 
-void Data::load_tff(const char *fname, byte *speicher) {
-	strncpy(_filename, fname, MAXPATH - 5);
-	_filename[MAXPATH - 5] = '\0';
-
-	if (speicher) {
-		if (!strchr(_filename, '.'))
-			strcat(_filename, ".tff");
-
-		Common::File f;
-		if (f.open(_filename)) {
-			TffHeader *tff = (TffHeader *)speicher;
-			if (tff->load(&f)) {
-				uint32 size = tff->size;
-				if (f.read(speicher + sizeof(TffHeader), size) != size) {
-					error("load_tff error");
-				}
-			}
-
-			f.close();
-		} else {
-			error("load_tff error");
-		}
-	} else {
-		error("load_tff error");
-	}
-}
-
 uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
 	ChunkHead ch;
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 36d7b3e1906..2b227d7385b 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -39,7 +39,6 @@ public:
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	uint32 load_tmf(Stream *stream, TmfHeader *song);
 
-	void load_tff(const char *fname, byte *speicher);
 	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
 
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index c53e71b0519..ec49ef92cb4 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -23,6 +23,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
@@ -51,8 +52,7 @@ void Cinema::execute() {
 	Common::Array<int> cutscenes;
 	getCutscenes(cutscenes);
 
-	_G(out)->set_fontadr(_G(font6x8));
-	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+	_G(fontMgr)->setFont(_G(font6));
 	_G(atds)->load_atds(98, 1);
 
 	_G(room)->open_handle(GBOOK, 0);
@@ -74,7 +74,7 @@ void Cinema::execute() {
 
 				if (i == selected)
 					_G(out)->box_fill(37, yp, 308, yp + 10, 42);
-				_G(out)->printxy(40, yp, 14, 300, 0, "%s", csName);
+				_G(out)->printxy(40, yp, 14, 300, 0, csName);
 			}
 		} else {
 			// No cut-scene seen yet
@@ -164,8 +164,7 @@ void Cinema::execute() {
 			_G(flc)->set_custom_user_function(cut_serv);
 			flic_cut(CINEMA_FLICS[topIndex + selected]);
 			_G(flc)->remove_custom_user_function();
-			_G(out)->set_fontadr(_G(font6x8));
-			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+			_G(fontMgr)->setFont(_G(font6));
 			showCur();
 			delay = 0;
 			flag = false;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 4adb49bf771..c63ba6e22b0 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -23,6 +23,8 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
+#include "chewy/text.h"
 
 namespace Chewy {
 namespace Dialogs {
@@ -241,12 +243,10 @@ void Credits::execute() {
 
 			if (CREDITS_TYPE[i]) {
 				fontCol = 32;
-				_G(out)->set_fontadr(_G(font6x8));
-				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+				_G(fontMgr)->setFont(_G(font6));
 			} else {
 				fontCol = 1;
-				_G(out)->set_fontadr(_G(font8x8));
-				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+				_G(fontMgr)->setFont(_G(font8));
 			}
 			stillScrolling = true;
 
@@ -261,8 +261,7 @@ void Credits::execute() {
 		_G(out)->back2screen(_G(workpage));
 	}
 
-	_G(out)->set_fontadr(_G(font8x8));
-	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvorx8x8));
+	_G(fontMgr)->setFont(_G(font8));
 	_G(room)->open_handle("back/episode1.tgp", R_GEPDATEI);
 
 	_G(room)->set_ak_pal(&_G(room_blk));
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 7b45ba33e46..9b05f297b3c 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -117,12 +117,13 @@ int16 Files::execute(bool isInGame) {
 		// Write the list of savegame slots
 		char *tmp = fnames + (text_off * 40);
 		for (int16 i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
+			Common::String slot = Common::String::format("%2d.", text_off + i);
 			if (i != active_slot) {
-				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
+				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, slot.c_str());
 				_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
 			} else {
 				_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
-				_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
+				_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, slot.c_str());
 				_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
 			}
 		}
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 71527198912..84928683e46 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -25,6 +25,7 @@
 #include "chewy/events.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/menus.h"
 
 namespace Chewy {
@@ -407,7 +408,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		txt_name_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
 		txt_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
 		xoff = strlen(txt_name_adr);
-		xoff *= _G(fvorx8x8);
+		xoff *= _G(font8)->getDataWidth();
 		xoff = (254 - xoff) / 2;
 		txt_zeilen = 2;
 		yoff = 10;
@@ -504,15 +505,13 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 		set_up_screen(NO_SETUP);
 		plot_menu();
-		_G(out)->set_fontadr(_G(font8x8));
-		_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+		_G(fontMgr)->setFont(_G(font8));
 
 		if (mode == INV_ATS_MODE)
 			_G(out)->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
 				_G(scr_width), txt_name_adr);
 
-		_G(out)->set_fontadr(_G(font6x8));
-		_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+		_G(fontMgr)->setFont(_G(font6));
 
 		if (txt_anz > txt_zeilen) {
 			if (txt_start > 0) {
@@ -536,7 +535,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		int16 k = 0;
 		for (int16 i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-				_G(scr_width), "%s", _G(txt)->str_pos(txt_adr, i));
+				_G(scr_width), _G(txt)->str_pos(txt_adr, i));
 			++k;
 		}
 
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 4eab29230d3..a06560d2a8f 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -231,8 +231,7 @@ bool MainMenu::loadGame() {
 	_G(flags).SaveMenu = true;
 	savePersonAni();
 	_G(out)->set_pointer(_G(screen0));
-	_G(out)->set_fontadr(_G(font6x8));
-	_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+	_G(fontMgr)->setFont(_G(font6));
 	cursorChoice(CUR_SAVE);
 	_G(cur)->move(152, 92);
 	_G(minfo).x = 152;
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index d34866f0938..684eaf5fcb5 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -93,7 +93,8 @@ void Options::execute(TafInfo *ti) {
 			8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
 		_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
-		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
+		Common::String fps = Common::String::format("%d", _G(spieler).FramesPerSecond << 1);
+		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, fps.c_str());
 
 		if (_G(spieler).SoundSwitch) {
 			_G(out)->sprite_set(ti->image[mund_ani],
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 0408ecad358..6a313620e17 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -554,10 +554,12 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			_G(out)->cls();
 			break;
 
-		default:
-			_G(out)->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
+		default: {
+			Common::String err = Common::String::format("Unknown Chunk %d ", chead.type);
+			_G(out)->printxy(0, 10, 255, 0, 0, err.c_str());
 			break;
 		}
+		}
 	}
 }
 
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index b6f2487b975..992119971cc 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -129,12 +129,6 @@ public:
 	BlendMode _fx_blend = BLEND_NONE;
 	void (*_SetUpScreenFunc)() = nullptr;
 
-	byte *_font6x8 = nullptr;
-	byte *_font8x8 = nullptr;
-	int16 _fvorx6x8 = 0;
-	int16 _fvorx8x8 = 0;
-	int16 _fvory6x8 = 0;
-	short _fvory8x8 = 0;
 	int16 _FrameSpeed = 0;
 	int16 _FrameSpeedTmp = 0;
 
@@ -285,13 +279,10 @@ public:
 	bool _screenHasDefault = false;
 	byte *_screenDefaultP = nullptr;
 	int _spriteWidth = 0;
-	byte *_fontAddr = nullptr;
-	size_t _fontWidth = 0, _fontHeight = 0;
-	int _fontFirst = 0, _fontLast = 0;
 
 	// mcga_graphics.cpp
 	int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
-	int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
+	int16 _gcurx = 0, _gcury = 0;
 	int16 _scr_w = 0, _scr_h = SCREEN_HEIGHT;
 
 	// menus.cpp
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 5c91b61eb91..2d5033e5e08 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -25,12 +25,11 @@
 #include "chewy/defines.h"
 #include "chewy/file.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/sound.h"
 
 namespace Chewy {
 
-static void font_load();
-
 void standard_init() {
 	_G(mem) = new Memory();
 	_G(out) = new McgaGraphics();
@@ -89,7 +88,6 @@ void standard_init() {
 	_G(pal)[767] = 63;
 	_G(out)->einblenden(_G(pal), 0);
 	_G(room)->set_timer_start(1);
-	font_load();
 
 	_G(out)->cls();
 	_G(in)->neuer_kb_handler(&_G(kbinfo));
@@ -261,30 +259,6 @@ void new_game() {
 	load_chewy_taf(CHEWY_NORMAL);
 }
 
-static void font_load() {
-
-	// Load the 8x8 font
-	_G(mem)->tff_adr(FONT8x8, &_G(font8x8));
-	_G(out)->set_fontadr(_G(font8x8));
-
-	int16 vorx;
-	int16 vory;
-	int16 fntbr;
-	int16 fnth;
-	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
-	_G(fvorx8x8) = vorx;
-	_G(fvory8x8) = vory;
-
-	// Load the 6x8 font
-	_G(mem)->tff_adr(FONT6x8, &_G(font6x8));
-	_G(out)->set_fontadr(_G(font6x8));
-	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
-	_G(fvorx6x8) = vorx - 2;
-	_G(fvory6x8) = vory;
-	_G(out)->set_vorschub(_G(fvorx6x8), vory);
-	_G(atds)->set_font(_G(font8x8), _G(fvorx8x8), 10);
-}
-
 void init_load() {
 	_G(AkChewyTaf) = 0;
 	load_chewy_taf(CHEWY_NORMAL);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 545aa96bf11..f74ac734938 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -50,6 +50,7 @@ void game_main() {
 	_G(font6) = new ChewyFont("TXT/6X8.TFF");
 	_G(font6)->setDisplaySize(_G(font6)->getDataWidth() - 2, _G(font6)->getDataHeight());
 	_G(font8)->setDeltaX(10);
+	_G(fontMgr)->setFont(_G(font8)); // set default font
 
 	_G(room_start_nr) = 0;
 	standard_init();
@@ -87,8 +88,6 @@ void free_buffers() {
 	for (int16 i = 0; i < MAX_PERSON; i++)
 		free((char *)_G(PersonTaf)[i]);
 	free((char *)_G(spz_tinfo));
-	free(_G(font6x8));
-	free(_G(font8x8));
 	free(_G(spblende));
 	free((char *)_G(menutaf));
 	free((char *)_G(chewy));
@@ -322,8 +321,7 @@ bool mainLoop(int16 mode) {
 			_G(flags).SaveMenu = true;
 
 			_G(out)->set_pointer(_G(screen0));
-			_G(out)->set_fontadr(_G(font6x8));
-			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+			_G(fontMgr)->setFont(_G(font6));
 			cursorChoice(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
 				retValue = true;
@@ -388,8 +386,7 @@ bool mainLoop(int16 mode) {
 				_G(cur)->move(152, 92);
 				_G(minfo).x = 152;
 				_G(minfo).y = 92;
-				_G(out)->set_fontadr(_G(font6x8));
-				_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+				_G(fontMgr)->setFont(_G(font6));
 
 				_G(out)->set_pointer(_G(screen0));
 				cursorChoice(CUR_SAVE);
@@ -703,8 +700,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			}
 
 			if (str_adr) {
-				_G(out)->set_fontadr(_G(font8x8));
-				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_adr, anz);
@@ -1444,8 +1440,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					char *str_ = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
 						ret = txt_nr;
-						_G(out)->set_fontadr(_G(font8x8));
-						_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+						_G(fontMgr)->setFont(_G(font8));
 						calc_txt_xy(&x, &y, str_, anz);
 						for (int16 i = 0; i < anz; i++)
 							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
@@ -1509,8 +1504,7 @@ void calc_mouse_person(int16 x, int16 y) {
 		int16 p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
 			if (!_G(spieler).PersonHide[p_nr]) {
-				_G(out)->set_fontadr(_G(font8x8));
-				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+				_G(fontMgr)->setFont(_G(font8));
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
 				print_shad(x, y, 255, 300, 0, _G(scr_width), str_);
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 3bbe32cdce8..439624d2842 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -49,8 +49,10 @@ public:
 	void setDisplaySize(uint16 width, uint16 height);
 	void setDeltaX(uint16 deltaX);
 
-	uint16 getDataWidth() { return _dataWidth; }
-	uint16 getDataHeight() { return _dataHeight; }
+	uint16 getDataWidth() const { return _dataWidth; }
+	uint16 getDataHeight() const { return _dataHeight; }
+	uint16 getFirst() const { return _first; }
+	uint16 getLast() const { return _last; }
 
 private:
 	uint16 _count, _first, _last;
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 73c10bbea98..6d457818479 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -21,8 +21,10 @@
 
 #include "common/system.h"
 #include "graphics/palette.h"
+#include "graphics/surface.h"
 #include "chewy/chewy.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/mcga.h"
 
 namespace Chewy {
@@ -254,51 +256,39 @@ void mspr_set_mcga(byte *sptr, int16 x, int16 y, int16 scrWidth) {
 	}
 }
 
-void setfont(byte *addr, int16 width, int16 height, int16 first, int16 last) {
-	_G(fontAddr) = addr;
-	_G(fontWidth) = width;
-	_G(fontHeight) = height;
-	_G(fontFirst) = first;
-	_G(fontLast) = last;
-}
-
 void upd_scr() {
 	g_screen->markAllDirty();
 	g_screen->update();
 }
 
 void vors() {
-	_G(gcurx) += _G(fvorx);
-	_G(gcury) += _G(fvory);
+	_G(gcurx) += _G(fontMgr)->getFont()->getDataWidth();
+	_G(gcury) += _G(fontMgr)->getFont()->getDataHeight();
 }
 
 void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
-	size_t charSize = (_G(fontWidth) / 8) * _G(fontHeight);
-	byte *charSrcP = _G(fontAddr) + (c - _G(fontFirst)) * charSize;
-
-	if (scrWidth == 0)
-		scrWidth = SCREEN_WIDTH;
-	byte *destP = SCREEN + (y * scrWidth) + x;
-
-	for (size_t yp = 0; yp < _G(fontHeight); ++yp, destP += scrWidth) {
-		byte *destLineP = destP;
-
-		for (size_t byteCtr = 0; byteCtr < (_G(fontWidth) / 8); ++byteCtr) {
-			byte bits = *charSrcP++;
-
-			// Iterate through the 8 bits
-			for (size_t xp = 0; xp < 8; ++xp, ++destLineP, bits <<= 1) {
-				if (bits & 0x80)
-					*destLineP = fgCol;
-				else if (bgCol <= 0xff)
-					*destLineP = bgCol;
+	ChewyFont *font = _G(fontMgr)->getFont();
+	Graphics::Surface *textSurface = font->getLine(Common::String(c));
+	byte *data = (byte *)textSurface->getPixels();
+
+	for (uint curX = 0; curX < textSurface->pitch; curX++) {
+		for (uint curY = 0; curY < textSurface->h; curY++) {
+			if (curX + x < 320 && curY + y < 200) {
+				byte *src = data + (curY * textSurface->pitch) + curX;
+				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);
+				if (*src != 0xFF)
+					*dst = fgCol;
+				else if (*src == 0xFF && bgCol < 0xFF)
+					*dst = bgCol;
 			}
 		}
 	}
 
-	if (SCREEN == (byte *)g_screen->getPixels())
-		g_screen->addDirtyRect(Common::Rect(
-			x, y, x + _G(fontWidth), y + _G(fontHeight)));
+	g_screen->addDirtyRect(Common::Rect(
+		x, y, x + textSurface->pitch, y + textSurface->h));
+
+	textSurface->free();
+	delete textSurface;
 }
 
 void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 7098d7d0479..3f250b83dfa 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -58,8 +58,6 @@ void zoom_set(byte *source, int16 x, int16 y, int16 xdiff,
 
 void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth);
 void putz(unsigned char c, int16 fgCol, int16 bgCol, int16 scrWidth);
-void setfont(byte *addr, int16 width, int16 height, int16 first,
-             int16 last);
 void vors();
 
 void upd_scr();
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 4d28f751095..17f96361c49 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -23,6 +23,7 @@
 #include "chewy/chewy.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/mcga_graphics.h"
 #include "chewy/mcga.h"
 
@@ -353,15 +354,6 @@ void McgaGraphics::map_spr2screen(byte *sptr, int16 x, int16 y) {
 		map_spr_2screen(sptr, x, y);
 }
 
-void McgaGraphics::set_fontadr(byte *adr) {
-	TffHeader *tff = (TffHeader *)adr;
-
-	setfont(adr + sizeof(TffHeader), tff->width, tff->height,
-	        tff->first, tff->last);
-	_G(fvorx) = tff->width;
-	_G(fvory) = 0;
-}
-
 int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth,
                           const char *string, ...) {
 	int16 i, j, stelle, stellemax, mode = 0;
@@ -398,11 +390,13 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 	move(x, y);
 	i = 0;
 
+	ChewyFont *font = _G(fontMgr)->getFont();
+
 	while (!ende) {
 		zeichen = string[i];
 		++i;
 
-		if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
+		if ((zeichen >= font->getFirst()) && (zeichen <= font->getLast()) && (zeichen != 127)) {
 			if (zeichen == '%') {
 				zeichen = string[i];
 				++i;
@@ -562,7 +556,8 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 								break;
 							}
 						}
-						plot_scan_cur((x + (disp_akt)*_G(fvorx)), _G(gcury), cur_col, 300, scrwidth, cursor_z);
+						const uint16 fontWidth = _G(fontMgr)->getFont()->getDataWidth();
+						plot_scan_cur((x + (disp_akt)*fontWidth), _G(gcury), cur_col, 300, scrwidth, cursor_z);
 						if (_svga == ON)
 							upd_scr();
 						for (delay_flag = 0; (delay_flag < 10) && (!kbhit()); delay_flag++) {
@@ -599,8 +594,9 @@ int16 McgaGraphics::scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_c
 							getch();
 
 						if (stelle > 0) {
+							const uint16 fontWidth = _G(fontMgr)->getFont()->getDataWidth();
 							strcpy(zstring + stelle - 1, zstring + stelle);
-							plot_scan_cur((x + disp_akt * _G(fvorx)), _G(gcury), bcol, bcol, scrwidth, cursor_z);
+							plot_scan_cur((x + disp_akt * fontWidth), _G(gcury), bcol, bcol, scrwidth, cursor_z);
 							if (_svga == ON)
 								upd_scr();
 							--stelle;
@@ -800,522 +796,29 @@ void McgaGraphics::plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16
 	putz(cursor_z, fcol, bcol, scrwidth);
 }
 
-void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string, ...) {
-	int16 i = 0, k = 0, l;
-	char zstring[35];
-	int16 diff;
-	char *tempptr;
-	va_list parptr;
-	va_start(parptr, string);
-	_crlfx = x;
-	_crlfy = y + _fontH + 2;
-	_G(gcurx) = x;
-	_G(gcury) = y;
-	i = 0;
-
-	unsigned char nextChar;
-	do {
-		nextChar = (unsigned char)string[i];
-		++i;
-		if ((nextChar < 32) || (nextChar == 127)) {
-			switch (nextChar) {
-			case 8:
-				_G(gcurx) -= _G(fvorx);
-				_G(gcury) -= _G(fvory);
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			case 10:
-				_G(gcury) = _crlfy;
-				_G(gcurx) = _crlfx;
-				_crlfx = _G(gcurx);
-				_crlfy = _G(gcury) + _fontH + 2;
-				break;
-
-			case 13:
-				_G(gcurx) = _crlfx;
-				break;
-
-			case 127 :
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			default :
-				if (nextChar >= _G(fontFirst))
-					putz(nextChar, fgCol, bgCol, scrwidth);
-				break;
-			}
-		} else if ((nextChar >= _G(fontFirst)) && (nextChar <= _G(fontLast))) {
-			if (nextChar != '%') {
-				putz(nextChar, fgCol, bgCol, scrwidth);
-				vors();
-			} else {
-				nextChar = string[i];
-				int16 count = 0;
-				if ((nextChar >= 0x30) && (nextChar <= 0x39))
-					count = atoi(string + i);
-				while ((nextChar >= 0x30) && (nextChar <= 0x39)) {
-					++i;
-					nextChar = string[i];
-				}
-				++i;
-				switch (nextChar) {
-				case '%':
-					putz(nextChar, fgCol, bgCol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (nextChar == 'd') {
-						int16 izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uint16 uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						long lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						uint32 luzahl = va_arg(parptr, uint32);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					} else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-					break;
-
-				default:
-					break;
-				}
-			}
-		}
-	} while ((i < MAXSTRING) && (nextChar != 0));
-	va_end(parptr);
-}
-
-void McgaGraphics::speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string) {
-	char zeichen;
-	_G(gcurx) = x;
-	_G(gcury) = y;
-	int16 i = 0;
-	do {
-		zeichen = string[i];
-		++i;
-		if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
-			putz(zeichen, fgCol, bgCol, scrwidth);
-			vors();
-		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
-}
-
-void McgaGraphics::print(int16 fgCol, int16 bgCol, int16 scrwidth, const char *string, ...) {
-	int16 k = 0, l;
-	char zeichen, zstring[35];
-	char *tempptr;
-	int16 diff;
-	va_list parptr;
-	va_start(parptr, string);
-	_crlfx = _G(gcurx);
-	_crlfy = _G(gcury) + _fontH + 2;
-	int16 i = 0;
-	do {
-		zeichen = string[i];
-		++i;
-		if ((zeichen > 0 && zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
-			case 8:
-				_G(gcurx) -= _G(fvorx);
-				_G(gcury) -= _G(fvory);
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			case 10:
-				_G(gcury) = _crlfy;
-				_G(gcurx) = _crlfx;
-				_crlfx = _G(gcurx);
-				_crlfy = _G(gcury) + _fontH + 2;
-				break;
-
-			case 13:
-				_G(gcurx) = _crlfx;
-				break;
-
-			case 127 :
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			default :
-				if (zeichen >= _G(fontFirst)) {
-					putz(zeichen, fgCol, bgCol, scrwidth);
-					vors();
-				}
-				break;
-			}
-		} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 0)) {
-			if (zeichen != '%') {
-				putz(zeichen, fgCol, bgCol, scrwidth);
-				vors();
-			} else {
-				zeichen = string[i];
-				int16 count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
-					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
-					++i;
-					zeichen = string[i];
-				}
-				++i;
-				switch (zeichen) {
-				case '%':
-					putz(zeichen, fgCol, bgCol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (zeichen == 'd') {
-						int16 izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uint16 uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						long lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						uint32 luzahl = va_arg(parptr, unsigned long);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					} else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-
-					break;
-
-				default:
-					break;
-				}
-			}
-		}
-	} while ((i < MAXSTRING) && (zeichen != 0));
-
-	va_end(parptr);
-}
-
-void McgaGraphics::printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
-                           int16 scrwidth, const char *string, ...) {
-	int16 i = 0, k = 0, l;
-	char zstring[35];
-	char *tempptr;
-	int16 diff;
-	va_list parptr;
-	va_start(parptr, string);
-	_G(gcurx) = x;
-	_G(gcury) = y;
-	_crlfx = _G(gcurx);
-	_crlfy = y + _fontH + 2;
-	for (i = 0; i < menge;) {
-		char zeichen = string[i];
-		++i;
-		if ((zeichen < 32) || (zeichen == 127)) {
-			switch (zeichen) {
-			case 8:
-				_G(gcurx) -= _G(fvorx);
-				_G(gcury) -= _G(fvory);
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			case 10:
-				_G(gcury) = _crlfy;
-				_G(gcurx) = _crlfx;
-				_crlfx = _G(gcurx);
-				_crlfy = _G(gcury) + _fontH + 2;
-				break;
-
-			case 13:
-				_G(gcurx) = _crlfx;
-				break;
-
-			case 127 :
-				putz(32, fgCol, bgCol, scrwidth);
-				break;
-
-			default :
-				if (zeichen >= _G(fontFirst))
-					putz(zeichen, fgCol, bgCol, scrwidth);
-				break;
-			}
-		} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast))) {
-			if (zeichen != '%') {
-				putz(zeichen, fgCol, bgCol, scrwidth);
-				vors();
-			} else {
-				zeichen = string[i];
-				int16 count = 0;
-				if ((zeichen >= 0x30) && (zeichen <= 0x39))
-					count = atoi(string + i);
-				while ((zeichen >= 0x30) && (zeichen <= 0x39)) {
-					++i;
-					zeichen = string[i];
-				}
-				++i;
-				switch (zeichen) {
-				case '%':
-					putz(zeichen, fgCol, bgCol, scrwidth);
-					vors();
-					break;
-
-				case 'd':
-				case 'u':
-					if (zeichen == 'd') {
-						int16 izahl = va_arg(parptr, int);
-						itoa(izahl, zstring, 10);
-					} else {
-						uint16 uzahl = va_arg(parptr, unsigned int);
-						itoa(uzahl, zstring, 10);
-					}
-					k = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 'l':
-					if (string[i] != 'u') {
-						long lzahl = va_arg(parptr, long);
-						ltoa(lzahl, zstring, 10);
-					} else {
-						uint32 luzahl = va_arg(parptr, uint32);
-						ultoa(luzahl, zstring, 10);
-						++i;
-					} k
-					    = 0;
-					if (count) {
-						diff = check_stellen_anz(zstring, &k, count);
-						for (l = 0; l < diff; l++) {
-							putz(0x30, fgCol, bgCol, scrwidth);
-							vors();
-						}
-					}
-					while (zstring[k] != 0) {
-						putz(zstring[k], fgCol, bgCol, scrwidth);
-						vors();
-						++k;
-					}
-					break;
-
-				case 's':
-					tempptr = va_arg(parptr, char *);
-					if (!count) {
-						while (*tempptr != 0) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-					else {
-						for (l = 0; l < count; l++) {
-							putz(*tempptr, fgCol, bgCol, scrwidth);
-							++tempptr;
-							vors();
-						}
-					}
-
-					break;
-
-				default:
-					break;
-				}
+void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth, const char *string) {
+	ChewyFont *font = _G(fontMgr)->getFont();
+	Graphics::Surface *textSurface = font->getLine(string);
+	byte *data = (byte *)textSurface->getPixels();
+
+	for (uint curX = 0; curX < textSurface->pitch; curX++) {
+		for (uint curY = 0; curY < textSurface->h; curY++) {
+			if (curX + x < 320 && curY + y < 200) {
+				byte *src = data + (curY * textSurface->pitch) + curX;
+				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);
+				if (*src != 0xFF)
+					*dst = fgCol;
+				else if (*src == 0xFF && bgCol < 0xFF)
+					*dst = bgCol;
 			}
 		}
 	}
-	va_end(parptr);
-}
-
-void McgaGraphics::printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
-	_crlfx = x;
-	_crlfy = y + _fontH + 2;
-	if ((zeichen < 32) || (zeichen == 127)) {
-		switch (zeichen) {
-		case 8:
-			x -= _G(fvorx);
-			y -= _G(fvory);
-			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
-			break;
 
-		case 10:
-			_G(gcury) = _crlfy;
-			_G(gcurx) = _crlfx;
-			_crlfx = _G(gcurx);
-			_crlfy = _G(gcury) + _fontH + 2;
-			break;
-
-		case 13:
-			_G(gcurx) = _crlfx;
-			_G(gcury) = _crlfy;
-			break;
+	g_screen->addDirtyRect(Common::Rect(
+		x, y, x + textSurface->pitch, y + textSurface->h));
 
-		case 127:
-			putcxy(x, y, 32, fgCol, bgCol, scrwidth);
-			break;
-
-		default:
-			break;
-		}
-	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
-		putcxy(x, y, zeichen, fgCol, bgCol, scrwidth);
-		vors();
-	}
-}
-
-void McgaGraphics::printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth) {
-	_crlfx = _G(gcurx);
-	_crlfy = _G(gcury) + _fontH + 2;
-	if ((zeichen < 32) || (zeichen == 127)) {
-		switch (zeichen) {
-		case 8:
-			_G(gcurx) -= _G(fvorx);
-			_G(gcury) -= _G(fvory);
-			putz(32, fgCol, bgCol, scrwidth);
-			break;
-
-		case 10:
-			_G(gcury) = _crlfy;
-			_G(gcurx) = _crlfx;
-			_crlfx = _G(gcurx);
-			_crlfy = _G(gcury) + _fontH + 2;
-			break;
-
-		case 13:
-			_G(gcurx) = _crlfx;
-			_G(gcury) = _crlfy;
-			break;
-
-		case 127:
-			putz(32, fgCol, bgCol, scrwidth);
-			break;
-
-		default:
-			break;
-		}
-	} else if ((zeichen >= _G(fontFirst)) && (zeichen <= _G(fontLast)) && (zeichen != 127)) {
-		putz(zeichen, fgCol, bgCol, scrwidth);
-		vors();
-	}
-}
-
-void McgaGraphics::set_vorschub(int16 x, int16 y) {
-	if (_G(fvorx) != -255)
-		_G(fvorx) = x;
-	if (_G(fvory) != -255)
-		_G(fvory) = y;
-}
-
-void McgaGraphics::get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth) {
-	*vorx = _G(fvorx);
-	*vory = _G(fvory);
-	*fntbr = _fontBr;
-	*fnth = _fontH;
+	textSurface->free();
+	delete textSurface;
 }
 
 void McgaGraphics::vorschub() {
@@ -1393,8 +896,4 @@ void McgaGraphics::ultoa(uint32 N, char *str, int base) {
 	sprintf(str, "%u", N);
 }
 
-void McgaGraphics::itoa(int N, char *str, int base) {
-	sprintf(str, "%d", N);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 2db01d71d5a..08f4044746e 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -79,24 +79,13 @@ public:
 	               int16 ydiff, int16 scrwidth);
 	void map_spr2screen(byte *sptr, int16 x, int16 y);
 
-	void set_fontadr(byte *adr);
 	void plot_scan_cur(int16 x, int16 y, int16 fcol, int16 bcol, int16 scrwidth,
 	                   char cursor);
 	int16 scanxy(int16 x, int16 y, int16 fcol, int16 bcol, int16 cur_col, int16 scrwidth, const char *string, ...);
 	void printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
-	    const char *format, ...);
-	void speed_printxy(int16 x, int16 y, int16 fgCol, int16 bgCol,
-	    int16 scrwidth, const char *string);
-	void print(int16 fgCol, int16 bgCol, int16 scrwidth, const char *format, ...);
-	void printnxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 menge,
-	    int16 scrwidth, const char *format, ...);
-	void printcharxy(int16 x, int16 y, char zeichen, int16 fgCol, int16 bgCol,
-	    int16 scrwidth);
-	void printchar(char zeichen, int16 fgCol, int16 bgCol, int16 scrwidth);
+	    const char *format);
 	void vorschub();
-	void set_vorschub(int16 x, int16 y);
 	void move(int16 x, int16 y);
-	void get_fontinfo(int16 *vorx, int16 *vory, int16 *fntbr, int16 *fnth);
 	void update_screen();
 
 private:
@@ -117,7 +106,6 @@ private:
 
 	void ltoa(long N, char *str, int base);
 	void ultoa(uint32 N, char *str, int base);
-	void itoa(int N, char *str, int base);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index e4c45ff3ace..15790820629 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -97,11 +97,4 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	return ts_info;
 }
 
-void Memory::tff_adr(const char *filename, byte **speicher) {
-	uint32 size = file->size(filename, TFFDATEI);
-
-	*speicher = (byte *)MALLOC(size);
-	file->load_tff(filename, *speicher);
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/memory.h b/engines/chewy/memory.h
index dd18a39fc1a..5d0476d77b1 100644
--- a/engines/chewy/memory.h
+++ b/engines/chewy/memory.h
@@ -34,7 +34,6 @@ public:
 
 	TafInfo *taf_adr(const char *filename);
 	TafSeqInfo *taf_seq_adr(int16 image_start, int16 image_anz);
-	void tff_adr(const char *filename, byte **speicher);
 
 	Data *file;
 };
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 923c367c400..fc6e94af6f9 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -22,6 +22,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/menus.h"
 #include "chewy/dialogs/inventory.h"
 
@@ -93,15 +94,13 @@ void maus_mov_menu() {
 }
 
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
-	int16 vorx, vory, fntbr, fnth;
-	_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
 	int16 len = 0;
 	for (int16 i = 0; i < txt_anz; i++) {
 		int16 tmp_len = strlen(_G(txt)->str_pos((char *)txt_adr, i));
 		if (tmp_len > len)
 			len = tmp_len;
 	}
-	len = len * vorx;
+	len = len * _G(fontMgr)->getFont()->getDataWidth();
 	int16 pix_len = len / 2;
 	*x = *x - pix_len + 12;
 	if (*x > (SCREEN_WIDTH - len))
@@ -214,7 +213,7 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 		if (x_pix < tmp)
 			x_pix = tmp;
 	}
-	x_pix *= _G(fvorx6x8);
+	x_pix *= _G(font8)->getDataWidth();
 	x_pix += 12;
 	tmp = x_pix;
 	if (x_pix % 16)
@@ -253,8 +252,7 @@ void ads_menu() {
 			_G(cur_display) = true;
 
 			build_menu(ADS_WIN);
-			_G(out)->set_fontadr(_G(font6x8));
-			_G(out)->set_vorschub(_G(fvorx6x8), _G(fvory6x8));
+			_G(fontMgr)->setFont(_G(font6));
 			if (_G(ads_item_anz) > 4)
 				cur_y_start = 190;
 			else
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index a5c7941edd1..b6d3a3859aa 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -26,6 +26,7 @@
 #include "chewy/globals.h"
 #include "chewy/ani_dat.h"
 #include "chewy/rooms/rooms.h"
+#include "chewy/main.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
 #include "chewy/video/video_player.h"
@@ -775,17 +776,16 @@ void exit_room(int16 eib_nr) {
 }
 
 void print_rows(int16 id) {
-	_G(out)->set_fontadr(_G(font8x8));
-	_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+	_G(fontMgr)->setFont(_G(font8));
 	int16 txt_anz;
 	char *txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
 	_G(out)->set_pointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
 		char *s = _G(txt)->str_pos(txtStr, i);
-		int16 len = (strlen(s) * _G(fvorx8x8)) / 2;
+		int16 len = (strlen(s) * _G(fontMgr)->getFont()->getDataWidth()) / 2;
 
-		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
+		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, s);
 	}
 }
 
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index c703c999a12..00d1f88d3c0 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -22,6 +22,7 @@
 #include "chewy/defines.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
+#include "chewy/main.h"
 #include "chewy/room.h"
 #include "chewy/rooms/room00.h"
 #include "chewy/sound.h"
@@ -305,8 +306,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != 0) {
-				_G(out)->set_fontadr(_G(font8x8));
-				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
@@ -544,8 +544,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
 			if (str_ != nullptr) {
-				_G(out)->set_fontadr(_G(font8x8));
-				_G(out)->set_vorschub(_G(fvorx8x8), _G(fvory8x8));
+				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);


Commit: 1bc86dc79928164ffd69ec0d84cf87c986602902
    https://github.com/scummvm/scummvm/commit/1bc86dc79928164ffd69ec0d84cf87c986602902
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:42-08:00

Commit Message:
CHEWY: Remove unused functions

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 6d457818479..7469003914e 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -107,26 +107,10 @@ void mem2mcga(const byte *ptr) {
 	g_screen->markAllDirty();
 }
 
-void mcga2mem(byte *ptr) {
-	const byte *srcP = SCREEN;
-	*((uint16 *)ptr) = SCREEN_WIDTH;
-	*((uint16 *)(ptr + 2)) = SCREEN_HEIGHT;
-
-	Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), ptr + 4);
-}
-
 void mem2mem(const byte *ptr1, byte *ptr2) {
 	Common::copy(ptr1, ptr1 + (SCREEN_WIDTH * SCREEN_HEIGHT), ptr2);
 }
 
-void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske) {
-	for (int i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; ++i, ++ptr1, ++ptr2) {
-		byte pixel = *ptr1;
-		if (pixel != maske)
-			*ptr2 = pixel;
-	}
-}
-
 void map_spr_2screen(const byte *sptr, int16 x, int16 y) {
 	const int width = *((const int16 *)sptr);
 	sptr += 4 + y * width + x;
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 3f250b83dfa..c54f27b737d 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -44,9 +44,7 @@ uint8 getpix(int16 x, int16 y);
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 
 void mem2mcga(const byte *ptr);
-void mcga2mem(byte *ptr);
 void mem2mem(const byte *ptr1, byte *ptr2);
-void mem2mem_masked(const byte *ptr1, byte *ptr2, int16 maske);
 
 void map_spr_2screen(const byte *sptr, int16 x, int16 y);
 void spr_save_mcga(byte *sptr, int16 x, int16 y, int16 width,
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 17f96361c49..5634e6bfc8c 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -258,46 +258,6 @@ void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1, int16 col1, int
 	linie(x, y, x, y1 + 1, col1);
 }
 
-void McgaGraphics::kreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 b = 0, alt = 0;
-	for (int16 w = 0; w <= 91; w++) {
-		int16 a = (int16)(_sines[w] * ((float)r * 0.85));
-		if ((a - alt) > 1) {
-			int16 diff = a - alt;
-			for (int16 i = 0; i <= diff; i++) {
-				setpixel_mcga(x - b, (y - (alt + i)), farbe);
-				setpixel_mcga(x + b, (y - (alt + i)), farbe);
-				setpixel_mcga(x - b, (y + (alt + i)), farbe);
-				setpixel_mcga(x + b, (y + (alt + i)), farbe);
-			}
-		}
-		b = (int16)(_cosines[w] * (float)r);
-		setpixel_mcga(x - b, y - a, farbe);
-		setpixel_mcga(x + b, y - a, farbe);
-		setpixel_mcga(x - b, y + a, farbe);
-		setpixel_mcga(x + b, y + a, farbe);
-		alt = a;
-	}
-}
-
-void McgaGraphics::fkreis(int16 x, int16 y, int16 r, int16 farbe) {
-	int16 b = 0, alt = 0, i = 0, diff;
-	for (int16 w = 0; w <= 90; w++) {
-		int16 a = (int16)(_sines[w] * ((float)r * 0.85));
-		if ((a - alt) > 1) {
-			diff = a - alt;
-			for (i = 0; i < diff; i++) {
-				line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
-				line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
-			}
-		}
-		b = (int16)(_cosines[w] * ((float)r));
-		line_mcga(x - b, (y - (alt + i)), x + b, (y - (alt + i)), farbe);
-		line_mcga(x - b, (y + (alt + i)), x + b, (y + (alt + i)), farbe);
-		alt = a;
-	}
-}
-
 void McgaGraphics::back2screen(byte *ptr) {
 	mem2mcga(ptr);
 }
@@ -306,14 +266,6 @@ void McgaGraphics::back2back(byte *ptr1, byte *ptr2) {
 	mem2mem(ptr1, ptr2);
 }
 
-void McgaGraphics::back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske) {
-	mem2mem_masked(ptr1, ptr2, maske);
-}
-
-void McgaGraphics::screen2back(byte *ptr) {
-	mcga2mem(ptr);
-}
-
 void McgaGraphics::sprite_save(byte *sptr, int16 x, int16 y, int16 breite, int16 hoehe, int16 scrwidth) {
 	if (breite < 4)
 		breite = 4;
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 08f4044746e..b0209e0ca72 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -63,13 +63,9 @@ public:
 	void box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 	void pop_box(int16 x, int16 y, int16 x1, int16 y1,
 	             int16 col1, int16 col2, int16 back_col);
-	void kreis(int16 x, int16 y, int16 r, int16 farbe);
-	void fkreis(int16 x, int16 y, int16 r, int16 farbe);
 
 	void back2screen(byte *ptr);
-	void screen2back(byte *ptr);
 	void back2back(byte *ptr1, byte *ptr2);
-	void back2back_maskiert(byte *ptr1, byte *ptr2, int16 maske);
 
 	void sprite_save(byte *sptr, int16 x, int16 y, int16 breite,
 	                 int16 hoehe, int16 scrwidth);


Commit: 2cb5267002375c1f0a8004e24d1780661891225c
    https://github.com/scummvm/scummvm/commit/2cb5267002375c1f0a8004e24d1780661891225c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:42-08:00

Commit Message:
CHEWY: Remove more unused functions

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 7469003914e..accaf871d9c 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -89,10 +89,6 @@ void clear_mcga() {
 		Common::fill(SCREEN, SCREEN + SCREEN_WIDTH * SCREEN_HEIGHT, 0);
 }
 
-void setpixel_mcga(int16 x, int16 y, int16 farbe) {
-	line_mcga(x, y, x, y, farbe);
-}
-
 uint8 getpix(int16 x, int16 y) {
 	return *(byte *)SCREEN_S.getBasePtr(x, y);
 }
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index c54f27b737d..248e691163e 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -39,7 +39,6 @@ void rastercol(int16 color, int16 r, int16 g, int16 b);
 void set_palpart(const byte *palette, int16 startcol, int16 anz);
 
 void clear_mcga();
-void setpixel_mcga(int16 x, int16 y, int16 farbe);
 uint8 getpix(int16 x, int16 y);
 void line_mcga(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 5634e6bfc8c..5c24e2bd394 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -72,29 +72,9 @@ byte *McgaGraphics::get_zeiger() {
 	return get_dispoff();
 }
 
-void McgaGraphics::set_mono() {
-	_mono = true;
-}
-
-void McgaGraphics::calc_mono(byte *palette, int16 startcol, int16 anz) {
-	int16 k = startcol * 3;
-	for (int16 i = 0; i < anz; i++) {
-		uint8 r = palette[k];
-		uint8 g = palette[k + 1];
-		uint8 b = palette[k + 2];
-		uint8 grau = (((float)r) * 0.30) + (((float)g) * 0.59) + (((float)b) * 0.11);
-		palette[k] = grau;
-		palette[k + 1] = grau;
-		palette[k + 2] = grau;
-		k += 3;
-	}
-}
-
 void McgaGraphics::set_palette(byte *palette) {
 	for (int16 i = 0; i < 768; i++)
 		_palTable[i] = palette[i];
-	if (_mono)
-		calc_mono(palette, 0, 256);
 	setpalette(palette);
 }
 
@@ -111,14 +91,10 @@ void McgaGraphics::raster_col(int16 c, int16 r, int16 g, int16 b) {
 	_palTable[index] = r;
 	_palTable[index + 1] = g;
 	_palTable[index + 2] = b;
-	if (_mono)
-		calc_mono(_palTable, c, 1);
 	rastercol(c, r, g, b);
 }
 
 void McgaGraphics::einblenden(byte *palette, int16 frames) {
-	if (_mono)
-		calc_mono(palette, 0, 256);
 	for (int16 j = 63; j >= 0; j--) {
 		int16 k = 0;
 		for (int16 i = 0; i < 256; i++) {
@@ -140,28 +116,6 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 	}
 }
 
-void McgaGraphics::aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen, int16 frames) {
-	if (_mono)
-		calc_mono(palette, startcol, anz);
-	for (int16 j = stufen; j >= 0; j--) {
-		int16 endcol = startcol + anz;
-		int16 k = startcol * 3;
-		for (int16 i = startcol; i < endcol; i++) {
-			int16 r = _palTable[k];
-			int16 g = _palTable[k + 1];
-			int16 b = _palTable[k + 2];
-			if ((r + 1) <= palette[k]) ++r;
-			if ((g + 1) <= palette[k + 1]) ++g;
-			if ((b + 1) <= palette[k + 2]) ++b;
-			_palTable[k] = r;
-			_palTable[k + 1] = g;
-			_palTable[k + 2] = b;
-			k += 3;
-		}
-		set_palpart(_palTable, startcol, anz);
-	}
-}
-
 void McgaGraphics::ausblenden(int16 frames) {
 	for (int16 j = 0; j < 64; j++) {
 		int16 k = 0;
@@ -181,26 +135,6 @@ void McgaGraphics::ausblenden(int16 frames) {
 	}
 }
 
-void McgaGraphics::abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames) {
-	int16 endcol = startcol + anz;
-	for (int16 j = 0; j < stufen; j++) {
-		int16 k = startcol * 3;
-		for (int16 i = startcol; i < endcol; i++) {
-			int16 r = _palTable[k];
-			int16 g = _palTable[k + 1];
-			int16 b = _palTable[k + 2];
-			if (r > 0) --r;
-			if (g > 0) --g;
-			if (b > 0) --b;
-			_palTable[k] = r;
-			_palTable[k + 1] = g;
-			_palTable[k + 2] = b;
-			k += 3;
-		}
-		set_palpart(_palTable, startcol, anz);
-	}
-}
-
 void McgaGraphics::set_teilpalette(const byte *palette, int16 startcol, int16 anz) {
 	int16 k = startcol * 3;
 	int16 endcol = startcol + anz;
@@ -210,8 +144,6 @@ void McgaGraphics::set_teilpalette(const byte *palette, int16 startcol, int16 an
 		_palTable[k + 2] = palette[k + 2];
 		k += 3;
 	}
-	if (_mono)
-		calc_mono(_palTable, startcol, anz);
 	set_palpart(_palTable, startcol, anz);
 }
 
@@ -219,10 +151,6 @@ void McgaGraphics::cls() {
 	clear_mcga();
 }
 
-void McgaGraphics::punkt(int16 xpos, int16 ypos, int16 farbn) {
-	setpixel_mcga(xpos, ypos, farbn);
-}
-
 uint8 McgaGraphics::get_pixel(int16 xpos, int16 ypos) {
 	uint8 pix = getpix(xpos, ypos);
 
@@ -783,51 +711,22 @@ void McgaGraphics::move(int16 x, int16 y) {
 }
 
 void McgaGraphics::init_mausmode(MouseInfo *mInfo) {
-	_mausMode = true;
 	_mInfo = mInfo;
 }
 
-void McgaGraphics::exit_mausmode() {
-	_mausMode = false;
-	_mInfo = nullptr;
-}
-
 int16 McgaGraphics::devices() {
 	int16 i = 0;
-	if (_mausMode != false) {
-		// TODO: This is wrong. 'i' should be initialized to "button status" (BX after a call to Int33h/03
-		if (i > 1) {
-			i = 27;
-		} else if (i == 1)
-			i = 13;
-		else
-			i = 0;
-	}
+	// TODO: This is wrong. 'i' should be initialized to "button status" (BX after a call to Int33h/03
+	if (i > 1) {
+		i = 27;
+	} else if (i == 1)
+		i = 13;
+	else
+		i = 0;
 
 	return i;
 }
 
-int16 McgaGraphics::check_stellen_anz(char *zstring, int16 *pos, int16 stellen) {
-	int16 diff;
-	int16 k = 0;
-	while (zstring[k] != 0)
-		++k;
-
-	if (k >= stellen) {
-		while ((k) && (stellen)) {
-			--k;
-			--stellen;
-		}
-		diff = 0;
-	} else {
-		diff = stellen - k;
-		k = 0;
-	}
-	*pos = k;
-
-	return diff;
-}
-
 void McgaGraphics::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 ydiff_, int16 scrwidth) {
 	if (xdiff_ || ydiff_)
 		zoom_set(sptr, x, y, xdiff_, ydiff_, scrwidth);
@@ -835,11 +734,6 @@ void McgaGraphics::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 y
 		mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
-void McgaGraphics::update_screen() {
-	if (_svga == ON)
-		upd_scr();
-}
-
 void McgaGraphics::ltoa(long N, char *str, int base) {
 	sprintf(str, "%ld", N);
 }
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index b0209e0ca72..8133d7df27e 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -36,27 +36,20 @@ public:
 	void init();
 	void set_writemode(char wm);
 	void init_mausmode(MouseInfo *mInfo);
-	void exit_mausmode();
 
 	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
 	void set_pointer(byte *ptr);
 	byte *get_zeiger();
 
-	void set_mono();
-	void calc_mono(byte *palette, int16 startcol, int16 anz);
 	void set_palette(byte *palette);
 	void palette_save(byte *palette = nullptr);
 	void rest_palette();
 	void raster_col(int16 c, int16 r, int16 g, int16 b);
 	void einblenden(byte *palette, int16 frames);
-	void aufhellen(byte *palette, int16 startcol, int16 anz, int16 stufen,
-	               int16 frames);
 	void ausblenden(int16 frames);
-	void abblenden(int16 startcol, int16 anz, int16 stufen, int16 frames);
 	void set_teilpalette(const byte *palette, int16 startcol, int16 anz);
 
 	void cls();
-	void punkt(int16 xpos, int16 ypos, int16 farbn);
 	uint8 get_pixel(int16 xpos, int16 ypos);
 	void linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 	void box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
@@ -82,18 +75,14 @@ public:
 	    const char *format);
 	void vorschub();
 	void move(int16 x, int16 y);
-	void update_screen();
 
 private:
-	int16 check_stellen_anz(char *zstring, int16 *pos, int16 stellen);
 	int16 devices();
 
 	float _sines[360];
 	float _cosines[360];
 	byte _palTable[PALETTE_SIZE];
 	uint8 _writeMode = 0;
-	bool _mono = false;
-	bool _mausMode = false;
 	int16 _crlfx = 0, _crlfy = 0;
 	int16 _fontBr = 0, _fontH = 0;
 	uint8 _svga = 0;


Commit: ee46ccf2a11f5845aef241f5218d1bccc2759c86
    https://github.com/scummvm/scummvm/commit/ee46ccf2a11f5845aef241f5218d1bccc2759c86
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:42-08:00

Commit Message:
CHEWY: Fix drawing overlay elements (e.g. subtitles) on videos

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room10.h
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index b6d3a3859aa..6e4dd76d12f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -943,16 +943,6 @@ void flic_cut(int16 nr) {
 
 	if (_G(Ci).Handle) {
 		switch (nr) {
-		case FCUT_005:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room10::cut_serv);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
 
 		case FCUT_009:
 #ifndef NEW_VIDEO_CODE
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 28216cb7836..1493b6d78cf 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -63,13 +63,5 @@ void Room10::get_surimy() {
 	showCur();
 }
 
-int16 Room10::cut_serv(int16 frame) {
-	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-	if (frame == 31)
-		start_aad(107, 0);
-
-	return 0;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room10.h b/engines/chewy/rooms/room10.h
index 6c0c8cb65f5..f93c83f8868 100644
--- a/engines/chewy/rooms/room10.h
+++ b/engines/chewy/rooms/room10.h
@@ -29,8 +29,6 @@ class Room10 {
 public:
 	static void entry();
 	static void get_surimy();
-
-	static int16 cut_serv(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index e2ad47a8a86..98bb6434cb8 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -50,6 +50,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 	bool skipVideo = false;
 	byte curPalette[256 * 3];
 	uint32 curFrame = 0;
+	bool customExit = false;
 
 	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
 	//save_palette(curPalette);
@@ -62,18 +63,22 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 
 	cfoDecoder->start();
 
-	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && handleCustom(num, curFrame)) {
+	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && !customExit) {
 		if (cfoDecoder->needsUpdate()) {
 			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
 			if (frame) {
-				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
+				byte *srcP = (byte *)frame->getPixels();
+				byte *destP = (byte *)g_screen->getPixels();
+				Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
+				g_screen->markAllDirty();
+				customExit = !handleCustom(num, curFrame);
 				curFrame = cfoDecoder->getCurFrame();
 
 				if (cfoDecoder->hasDirtyPalette())
 					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
-				//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
+					//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
 
-				g_system->updateScreen();
+				g_screen->update();
 			}
 		}
 
@@ -104,14 +109,9 @@ bool VideoPlayer::handleCustom(uint num, uint frame) {
 		return (frame == 40) ? false : true;
 	case FCUT_005:
 		// Room10::cut_serv
-		// TODO: The text functions print to an overlay buffer
 		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-		if (frame == 31) {
+		if (frame == 31)
 			start_aad(107, 0);
-			//TextEntryList *text = _G(txt)->getDialog(107, 0);
-			//g_engine->_sound->playSpeech(text->front().speechId);
-			//delete text;
-		}
 		break;
 	case FCUT_094:
 		//Room87::proc3


Commit: 3fc3959f7fb12fb28f48a0d2cbe10255fedee8a2
    https://github.com/scummvm/scummvm/commit/3fc3959f7fb12fb28f48a0d2cbe10255fedee8a2
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Various fixes in flic_cut()

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 6e4dd76d12f..7d72cdcc356 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1304,6 +1304,7 @@ void flic_cut(int16 nr) {
 				SHOULD_QUIT_RETURN;
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 12);
+				_G(fx)->border(_G(workpage), 100, 0, 0);
 				ret = _G(flc)->custom_play(&_G(Ci));
 #else
 				g_engine->_video->playVideo(i + 12);
@@ -1311,22 +1312,22 @@ void flic_cut(int16 nr) {
 			}
 
 #ifndef NEW_VIDEO_CODE
-			if (ret != -1) {
+			if (ret == 0) {
 				_G(out)->cls();
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_016);
-				_G(fx)->border(_G(workpage), 100, 0, 0);
+				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_017);
+				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
 			_G(out)->cls();
-			_G(fx)->border(_G(workpage), 100, 0, 0);
+			g_engine->_video->playVideo(17);
 #endif
 			break;
 
 		case 1015:
 			for (i = 0; i < 2 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 15);
+				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
 				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
@@ -1531,7 +1532,7 @@ void flic_cut(int16 nr) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 102);
-				_G(flc)->custom_play(&_G(Ci));
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				g_engine->_video->playVideo(i + 102);
@@ -1577,7 +1578,7 @@ void flic_cut(int16 nr) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1106[i]);
 				_G(out)->cls();
-				_G(flc)->custom_play(&_G(Ci));
+				ret = _G(flc)->custom_play(&_G(Ci));
 				SHOULD_QUIT_RETURN;
 #else
 				g_engine->_video->playVideo(FLIC_CUT_1106[i]);
@@ -1586,16 +1587,20 @@ void flic_cut(int16 nr) {
 			break;
 
 		case 1107:
-			ret = g_engine->_video->playVideo(FCUT_107) ? 0 : -1;
-
 #ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_109);
+			ret = _G(flc)->custom_play(&_G(Ci));
 			if (ret != -1) {
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_109);
 				_G(fx)->border(_G(workpage), 100, 0, 0);
+				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
-			_G(fx)->border(_G(workpage), 100, 0, 0);
-			//playVideo(109);
+			ret = g_engine->_video->playVideo(FCUT_107) ? 0 : -1;
+			if (ret != -1) {
+				_G(fx)->border(_G(workpage), 100, 0, 0);
+				playVideo(109);
+			}
 #endif
 			break;
 
@@ -1656,12 +1661,14 @@ void flic_cut(int16 nr) {
 
 		case 1117:
 #ifndef NEW_VIDEO_CODE
-			if (_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_117) != (uint16)-1) {
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_117);
+			if (_G(flc)->custom_play(&_G(Ci)) != -1) {
 				_G(fx)->border(_G(workpage), 100, 0, 0);
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_119);
 				_G(flc)->custom_play(&_G(Ci));
 			}
 #else
+			g_engine->_video->playVideo(FCUT_117);
 			_G(fx)->border(_G(workpage), 100, 0, 0);
 			g_engine->_video->playVideo(FCUT_119);
 #endif


Commit: 8d83a363fbe90d35b11b62b800a769bc4e44b775
    https://github.com/scummvm/scummvm/commit/8d83a363fbe90d35b11b62b800a769bc4e44b775
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Fix incorrect busy status for Chewy in is_chewy_busy()

Changed paths:
    engines/chewy/main.cpp


diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index f74ac734938..7d96de3026a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -1933,7 +1933,7 @@ void set_person_rnr() {
 
 bool is_chewy_busy() {
 	bool ret = true;
-	if (!_G(atds)->ats_get_status()) {
+	if (_G(atds)->ats_get_status() == DISPLAY_NONE) {
 		if (_G(atds)->aad_get_status() == -1) {
 			if (_G(atds)->ads_get_status() == -1) {
 				if (!_G(mov)->auto_go_status()) {


Commit: 84a0dfb35d50b2efa2310e9ddf4371e0f1953097
    https://github.com/scummvm/scummvm/commit/84a0dfb35d50b2efa2310e9ddf4371e0f1953097
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Explicitly mark AtsBlock as packed

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 3ecb4f42e79..f42f5f8a6c4 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -146,7 +146,7 @@ SplitStringRet *Atdsys::split_string(SplitStringInit *ssi_) {
 	_ssret.StrPtr = _splitPtr;
 	_ssret.X = _splitX;
 	int16 zeichen_anz = (ssi_->Width / ssi_->Fvorx) + 1;
-	memset(_splitPtr, 0, sizeof(char *)*MAX_STR_SPLIT);
+	memset(_splitPtr, 0, sizeof(char *) * MAX_STR_SPLIT);
 	calc_txt_win(ssi_);
 	char *str_adr = ssi_->Str;
 	int16 count = 0;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index b05bf24e754..a0abfcfe9bd 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -100,12 +100,14 @@ struct AdsDiaHeaders {
 	int16 Anz;
 };
 
+#include "common/pack-start.h"	// START STRUCT PACKING
 struct AdsBlock {
 	bool Show[ADS_MAX_BL_EIN];
 
 	uint8 Next[ADS_MAX_BL_EIN];
 	uint8 Steuer[ADS_MAX_BL_EIN];
-};
+} PACKED_STRUCT;
+#include "common/pack-end.h"	// END STRUCT PACKING
 
 struct AtdsVar {
 	int16 Silent = 0;


Commit: 0c80d40d955987c1ccdf11ffd9f9df6e2ca5caf6
    https://github.com/scummvm/scummvm/commit/0c80d40d955987c1ccdf11ffd9f9df6e2ca5caf6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Fix compiler warnings

Changed paths:
    engines/chewy/mcga.cpp
    engines/chewy/mcga_graphics.cpp


diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index accaf871d9c..9257736e054 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -251,8 +251,8 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 	Graphics::Surface *textSurface = font->getLine(Common::String(c));
 	byte *data = (byte *)textSurface->getPixels();
 
-	for (uint curX = 0; curX < textSurface->pitch; curX++) {
-		for (uint curY = 0; curY < textSurface->h; curY++) {
+	for (int curX = 0; curX < textSurface->pitch; curX++) {
+		for (int curY = 0; curY < textSurface->h; curY++) {
 			if (curX + x < 320 && curY + y < 200) {
 				byte *src = data + (curY * textSurface->pitch) + curX;
 				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 5c24e2bd394..88511c47d9e 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -681,8 +681,8 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 	Graphics::Surface *textSurface = font->getLine(string);
 	byte *data = (byte *)textSurface->getPixels();
 
-	for (uint curX = 0; curX < textSurface->pitch; curX++) {
-		for (uint curY = 0; curY < textSurface->h; curY++) {
+	for (int curX = 0; curX < textSurface->pitch; curX++) {
+		for (int curY = 0; curY < textSurface->h; curY++) {
 			if (curX + x < 320 && curY + y < 200) {
 				byte *src = data + (curY * textSurface->pitch) + curX;
 				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);


Commit: 5b0afcffa6ae832e843b093cba1a4dee32e93512
    https://github.com/scummvm/scummvm/commit/5b0afcffa6ae832e843b093cba1a4dee32e93512
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Change AadInfo * to AadInfoArray

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index f42f5f8a6c4..12b72cb849f 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -47,13 +47,18 @@ bool InvUse::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool AadInfo::load(const void *src) {
-	Common::MemoryReadStream rs((const byte *)src, 6);
+void AadInfo::load(Common::SeekableReadStream *src) {
+	X = src->readSint16LE();
+	Y = src->readSint16LE();
+	Color = src->readSint16LE();
+}
 
-	X = rs.readSint16LE();
-	Y = rs.readSint16LE();
-	Color = rs.readSint16LE();
-	return true;
+void AadInfoArray::load(const void *data, size_t count) {
+	resize(count);
+	Common::MemoryReadStream src((const byte *)data, count * AadInfo::SIZE());
+
+	for (uint i = 0; i < count; ++i)
+		(*this)[i].load(&src);
 }
 
 bool AadTxtHeader::load(const void *src) {
@@ -871,8 +876,9 @@ int16 Atdsys::start_aad(int16 dia_nr) {
 		_aadv.Ptr = _atdsmem[AAD_HANDLE];
 		aad_search_dia(dia_nr, &_aadv.Ptr);
 		if (_aadv.Ptr) {
-			_aadv.Person = (AadInfo *)_aadv.Ptr;
+			_aadv.Person.load(_aadv.Ptr, _aadv.TxtHeader->PerAnz);
 			_aadv.Ptr += _aadv.TxtHeader->PerAnz * sizeof(AadInfo);
+
 			_aadv.Dialog = true;
 			_aadv.StrNr = 0;
 			_aadv.StrHeader = (AadStrHeader *)_aadv.Ptr;
@@ -1105,18 +1111,20 @@ bool  Atdsys::ads_start(int16 dia_nr) {
 
 	load_atds(dia_nr, ADS_DATEI);
 	bool ende = false;
+
 	if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
 		    _atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
 		    _atdsmem[ADS_HANDLE][2] == (char)BLOCKENDE)
 		ende = true;
+
 	if (!ende) {
 		_adsv.Ptr = _atdsmem[ADS_HANDLE];
 		_adsv.TxtHeader = (AdsTxtHeader *)_adsv.Ptr;
 		if (_adsv.TxtHeader->DiaNr == dia_nr) {
 			ret = true;
-			_adsv.Ptr += sizeof(AdsTxtHeader);
-			_adsv.Person = (AadInfo *) _adsv.Ptr;
-			_adsv.Ptr += _adsv.TxtHeader->PerAnz * sizeof(AadInfo);
+			_adsv.Ptr += AdsTxtHeader::SIZE();
+			_adsv.Person.load(_adsv.Ptr, _adsv.TxtHeader->PerAnz);
+			_adsv.Ptr += _adsv.TxtHeader->PerAnz * AadInfo::SIZE();
 			_adsv.Dialog = dia_nr;
 			_adsv.StrNr = 0;
 			_adsStack[0] = 0;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index a0abfcfe9bd..48aeb66c1b2 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -144,9 +144,14 @@ struct AadInfo {
 	int16 Y;
 	int16 Color;
 
-	bool load(const void *src);
+	AadInfo() : X(0), Y(0), Color(0) {}
+	void load(Common::SeekableReadStream *src);
 	static constexpr int SIZE() { return 6; }
 };
+class AadInfoArray : public Common::Array<AadInfo> {
+public:
+	void load(const void *data, size_t count);
+};
 
 struct AadTxtHeader {
 	int16 DiaNr;
@@ -168,7 +173,7 @@ struct AadVar {
 
 	AadTxtHeader *TxtHeader;
 	AadStrHeader *StrHeader;
-	AadInfo *Person;
+	AadInfoArray Person;
 	char *Ptr;
 	int16 StrNr;
 	int16 _delayCount;
@@ -180,13 +185,14 @@ struct AdsTxtHeader {
 	int16 PerAnz;
 	int16 AMov;
 	int16 CurNr;
+	static constexpr int SIZE() { return 8; }
 };
 
 struct AdsVar {
 	int16 Dialog;
 	int16 AutoDia;
 	AdsTxtHeader *TxtHeader;
-	AadInfo *Person;
+	AadInfoArray Person;
 	char *Ptr;
 	char *BlkPtr;
 	int16 StrNr;


Commit: c8fa407e934609927587122ceb744c147d9b1529
    https://github.com/scummvm/scummvm/commit/c8fa407e934609927587122ceb744c147d9b1529
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Fix bad direct cast to a AdsTxtHeader pointer

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 12b72cb849f..2c87223b013 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -71,6 +71,16 @@ bool AadTxtHeader::load(const void *src) {
 	return true;
 }
 
+bool AdsTxtHeader::load(const void *src) {
+	Common::MemoryReadStream rs((const byte *)src, 8);
+
+	DiaNr = rs.readSint16LE();
+	PerAnz = rs.readSint16LE();
+	AMov = rs.readSint16LE();
+	CurNr = rs.readSint16LE();
+	return true;
+}
+
 bool AtsStrHeader::load(Common::SeekableReadStream *src) {
 	VocNr = src->readUint16LE();
 	return true;
@@ -1119,12 +1129,13 @@ bool  Atdsys::ads_start(int16 dia_nr) {
 
 	if (!ende) {
 		_adsv.Ptr = _atdsmem[ADS_HANDLE];
-		_adsv.TxtHeader = (AdsTxtHeader *)_adsv.Ptr;
-		if (_adsv.TxtHeader->DiaNr == dia_nr) {
+		_adsv.TxtHeader.load(_adsv.Ptr);
+
+		if (_adsv.TxtHeader.DiaNr == dia_nr) {
 			ret = true;
 			_adsv.Ptr += AdsTxtHeader::SIZE();
-			_adsv.Person.load(_adsv.Ptr, _adsv.TxtHeader->PerAnz);
-			_adsv.Ptr += _adsv.TxtHeader->PerAnz * AadInfo::SIZE();
+			_adsv.Person.load(_adsv.Ptr, _adsv.TxtHeader.PerAnz);
+			_adsv.Ptr += _adsv.TxtHeader.PerAnz * AadInfo::SIZE();
 			_adsv.Dialog = dia_nr;
 			_adsv.StrNr = 0;
 			_adsStack[0] = 0;
@@ -1301,7 +1312,7 @@ int16 Atdsys::start_ads_auto_dia(char *item_adr) {
 		int16 txt_len;
 		aad_get_zeilen(_aadv.Ptr, &txt_len);
 		_aadv._delayCount = get_delay(txt_len);
-		_atdsv.DiaNr = _adsv.TxtHeader->DiaNr + 10000;
+		_atdsv.DiaNr = _adsv.TxtHeader.DiaNr + 10000;
 
 		if (_atdsv.aad_str != nullptr)
 			_atdsv.aad_str(_atdsv.DiaNr, 0, _aadv.StrHeader->AkPerson, AAD_STR_START);
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 48aeb66c1b2..440ab648dd5 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -185,13 +185,15 @@ struct AdsTxtHeader {
 	int16 PerAnz;
 	int16 AMov;
 	int16 CurNr;
+
+	bool load(const void *src);
 	static constexpr int SIZE() { return 8; }
 };
 
 struct AdsVar {
 	int16 Dialog;
 	int16 AutoDia;
-	AdsTxtHeader *TxtHeader;
+	AdsTxtHeader TxtHeader;
 	AadInfoArray Person;
 	char *Ptr;
 	char *BlkPtr;


Commit: ecd5d11eac175fa283be510cfac43d47cd3b02c7
    https://github.com/scummvm/scummvm/commit/ecd5d11eac175fa283be510cfac43d47cd3b02c7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:43-08:00

Commit Message:
CHEWY: Janitorial

Changed paths:
    engines/chewy/atds.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 2c87223b013..6bc060a05de 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -341,8 +341,9 @@ void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chu
 				if (Ch.size) {
 					if (!rs->read(_invUseMem, Ch.size)) {
 						error("Error reading from %s", fname);
-					} else
+					} else {
 						crypt(_invUseMem, Ch.size);
+					}
 				}
 				_invUseMem[Ch.size] = (char)BLOCKENDE;
 				_invUseMem[Ch.size + 1] = (char)BLOCKENDE;
@@ -423,8 +424,9 @@ void Atdsys::load_atds(int16 chunk_nr, int16 mode) {
 			if (Ch.size) {
 				if (stream->read(txt_adr, Ch.size) != Ch.size) {
 					error("load_atds error");
-				} else if (mode != ADH_DATEI)
+				} else if (mode != ADH_DATEI) {
 					crypt(txt_adr, Ch.size);
+				}
 			}
 			txt_adr[Ch.size] = (char)BLOCKENDE;
 			txt_adr[Ch.size + 1] = (char)BLOCKENDE;
@@ -645,10 +647,12 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 					_printDelayCount1 = _atsv.DelayCount / 10;
 					_atsv.SilentCount = _atdsv.Silent;
 				}
-			} else
+			} else {
 				--_atsv.DelayCount;
-		} else
+			}
+		} else {
 			--_atsv.SilentCount;
+		}
 	}
 }
 
@@ -1170,7 +1174,7 @@ int16 Atdsys::check_item(int16 block_nr, int16 item_nr) {
 
 char **Atdsys::ads_item_ptr(int16 block_nr, int16 *anzahl) {
 	*anzahl = 0;
-	memset(_ePtr, 0, sizeof(char *)*ADS_MAX_BL_EIN);
+	memset(_ePtr, 0, sizeof(char *) * ADS_MAX_BL_EIN);
 	if (_adsv.Dialog != -1) {
 		_adsv.BlkPtr = _adsv.Ptr;
 		ads_search_block(block_nr, &_adsv.BlkPtr);
@@ -1256,9 +1260,11 @@ int16 Atdsys::return_block(AdsBlock *ab) {
 		if (anz) {
 			ret = blk_nr;
 			ende = true;
-		} else
+		} else {
 			--_adsStackPtr;
+		}
 	}
+
 	++_adsStackPtr;
 	return ret;
 }


Commit: 41040952418cb6363c9b34d02efb8a7c8f49c46d
    https://github.com/scummvm/scummvm/commit/41040952418cb6363c9b34d02efb8a7c8f49c46d
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: Remove initialization of menu_first not present in the binary (and useless)

Changed paths:
    engines/chewy/dialogs/inventory.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 84928683e46..afad788881b 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -294,7 +294,6 @@ void Inventory::menu() {
 
 			case Common::KEYCODE_ESCAPE:
 				if (!menu_first) {
-					menu_first = true;
 					_G(cur)->show_cur();
 					while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 						set_up_screen(NO_SETUP);
@@ -363,9 +362,9 @@ void Inventory::menu() {
 				_G(cur)->plot_cur();
 			_G(out)->set_pointer(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
-				_G(fx)->blende1(_G(workptr), _G(screen0), 0, 200, 0, 300);
+				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
-				_G(fx)->blende1(_G(workptr), _G(screen0), 0, 200, 1, 300);
+				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 1, 300);
 			menu_flag1 = false;
 			_G(out)->set_clip(0, 0, 320, 200);
 			_G(out)->back2screen(_G(workpage));


Commit: cb3983d10222f65fb598c0405c643a4171e10213
    https://github.com/scummvm/scummvm/commit/cb3983d10222f65fb598c0405c643a4171e10213
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: More janitorial work in Inventory::menu()

Changed paths:
    engines/chewy/dialogs/inventory.cpp


diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index afad788881b..93db09189fa 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -127,9 +127,9 @@ void Inventory::plot_menu() {
 void Inventory::menu() {
 	keyVal = 0;
 	_G(flags).InventMenu = true;
-	int16 disp_tmp = _G(spieler).DispFlag;
+	const int16 oldDispFlag = _G(spieler).DispFlag;
 	_G(spieler).DispFlag = false;
-	int16 ani_tmp = _G(flags).AutoAniPlay;
+	const uint16 oldAutoAniPlay = _G(flags).AutoAniPlay;
 	_G(flags).AutoAniPlay = true;
 	_G(flags).StopAutoObj = true;
 	_G(menu_display) = 0;
@@ -157,7 +157,7 @@ void Inventory::menu() {
 	}
 
 	int16 ret_look = -1;
-	int16 menu_first = false;
+	bool menuFirstFl = false;
 	_G(show_invent_menu) = 1;
 
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
@@ -218,35 +218,27 @@ void Inventory::menu() {
 					k += _G(spieler).InventY * 5;
 					if (_G(invent_cur_mode) == CUR_USE) {
 						if (_G(spieler).AkInvent == -1) {
-							if (_G(spieler).InventSlot[k] != -1) {
-								if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
-									_G(menu_item) = CUR_USE;
-									_G(spieler).AkInvent = _G(spieler).InventSlot[k];
-									cursorChoice(CUR_AK_INVENT);
-									del_invent_slot(_G(spieler).InventSlot[k]);
-								}
-							}
-						} else {
-							if (_G(spieler).InventSlot[k] != -1)
-								obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
-							else {
-								_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
-								_G(obj)->sort();
-								_G(spieler).AkInvent = -1;
-								_G(menu_item) = _G(invent_cur_mode);
-								cursorChoice(_G(invent_cur_mode));
-							}
-						}
-					} else if (_G(invent_cur_mode) == CUR_LOOK) {
-						if (_G(spieler).InventSlot[k] != -1) {
-							if (calc_use_invent(_G(spieler).InventSlot[k]) == false) {
+							if (_G(spieler).InventSlot[k] != -1 && calc_use_invent(_G(spieler).InventSlot[k]) == false) {
+								_G(menu_item) = CUR_USE;
 								_G(spieler).AkInvent = _G(spieler).InventSlot[k];
-								ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
-								_G(spieler).AkInvent = -1;
-								cursorChoice(_G(invent_cur_mode));
-								taste_flag = Common::KEYCODE_ESCAPE;
+								cursorChoice(CUR_AK_INVENT);
+								del_invent_slot(_G(spieler).InventSlot[k]);
 							}
+						} else if (_G(spieler).InventSlot[k] != -1)
+							obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
+						else {
+							_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
+							_G(obj)->sort();
+							_G(spieler).AkInvent = -1;
+							_G(menu_item) = _G(invent_cur_mode);
+							cursorChoice(_G(invent_cur_mode));
 						}
+					} else if (_G(invent_cur_mode) == CUR_LOOK && _G(spieler).InventSlot[k] != -1 && calc_use_invent(_G(spieler).InventSlot[k]) == false) {
+						_G(spieler).AkInvent = _G(spieler).InventSlot[k];
+						ret_look = look(_G(spieler).InventSlot[k], INV_ATS_MODE, -1);
+						_G(spieler).AkInvent = -1;
+						cursorChoice(_G(invent_cur_mode));
+						taste_flag = Common::KEYCODE_ESCAPE;
 					}
 					break;
 
@@ -293,7 +285,7 @@ void Inventory::menu() {
 				break;
 
 			case Common::KEYCODE_ESCAPE:
-				if (!menu_first) {
+				if (!menuFirstFl) {
 					_G(cur)->show_cur();
 					while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 						set_up_screen(NO_SETUP);
@@ -346,7 +338,7 @@ void Inventory::menu() {
 			default:
 				break;
 			}
-			menu_first = true;
+			menuFirstFl = true;
 		}
 
 		if (_G(show_invent_menu) != 2) {
@@ -383,8 +375,8 @@ void Inventory::menu() {
 	}
 
 	_G(flags).InventMenu = false;
-	_G(flags).AutoAniPlay = ani_tmp;
-	_G(spieler).DispFlag = disp_tmp;
+	_G(flags).AutoAniPlay = oldAutoAniPlay;
+	_G(spieler).DispFlag = oldDispFlag;
 	_G(menu_display) = _G(tmp_menu);
 	_G(flags).StopAutoObj = false;
 }


Commit: 97cde7eba9d3d4206c7fa500660aef70165a0074
    https://github.com/scummvm/scummvm/commit/97cde7eba9d3d4206c7fa500660aef70165a0074
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: Use the new video playing code for special videos 9 and 10

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room11.h
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7d72cdcc356..439f990c423 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -930,6 +930,7 @@ void flic_cut(int16 nr) {
 		FCUT_113, FCUT_106, FCUT_103, FCUT_118, FCUT_120
 	};
 	int16 i, ret = 0;
+	bool keepPlaying = true;
 
 	_G(out)->set_pointer(nullptr);
 	_G(det)->disable_room_sound();
@@ -943,48 +944,11 @@ void flic_cut(int16 nr) {
 
 	if (_G(Ci).Handle) {
 		switch (nr) {
-
-		case FCUT_009:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room11::cut_serv);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
-
-		case FCUT_010:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room11::cut_serv_2);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
-
 		case FCUT_SPACECHASE_18:
-		case FCUT_SPACECHASE_19:
-		case FCUT_SPACECHASE_20:
-		case FCUT_SPACECHASE_21:
-		case FCUT_SPACECHASE_22:
-		case FCUT_SPACECHASE_23:
-		case FCUT_SPACECHASE_24:
-		case FCUT_SPACECHASE_25:
-		case FCUT_SPACECHASE_26:
-		case FCUT_SPACECHASE_27:
-		case FCUT_SPACECHASE_28:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
-			nr = FCUT_SPACECHASE_18;
 			_G(sndPlayer)->setLoopMode(1);
 
-			for (i = 0; i < 11; i++) {
-				g_engine->_video->playVideo(FCUT_SPACECHASE_18 + i);
-				SHOULD_QUIT_RETURN;
+			for (i = 0; i < 11 && keepPlaying; i++) {
+				keepPlaying = g_engine->_video->playVideo(FCUT_SPACECHASE_18 + i);
 			}
 
 			_G(sndPlayer)->fadeOut(0);
@@ -1001,12 +965,6 @@ void flic_cut(int16 nr) {
 		case FCUT_037:
 		case FCUT_040:
 			// TV
-
-			if (nr == FCUT_034) {
-				_G(sndPlayer)->stopMod();
-				_G(currentSong) = -1;
-			}
-
 			if (nr != FCUT_036)
 				_G(flc)->set_custom_user_function(Room39::setup_func);
 
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 0c42826ba27..9b43cb7e6f8 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -204,36 +204,5 @@ void Room11::put_card() {
 	}
 }
 
-int16 Room11::cut_serv(int16 frame) {
-	if (_G(spieler).R11DoorRightF)
-		_G(det)->plot_static_details(0, 0, 0, 0);
-
-	if (_G(spieler).R11DoorRightB)
-		_G(det)->plot_static_details(0, 0, 6, 6);
-
-	if (_G(spieler).R45MagOk)
-		_G(det)->plot_static_details(0, 0, 7, 7);
-
-	return 0;
-}
-
-int16 Room11::cut_serv_2(int16 frame) {
-	if (_G(spieler).R11DoorRightF)
-		_G(det)->plot_static_details(0, 0, 0, 0);
-
-	if (_G(spieler).R11DoorRightB)
-		_G(det)->plot_static_details(0, 0, 6, 6);
-
-	if (_G(spieler).R6DoorRightB)
-		_G(det)->plot_static_details(0, 0, 7, 7);
-
-	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-
-	if (frame == 43)
-		start_aad(106, 0);
-
-	return 0;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room11.h b/engines/chewy/rooms/room11.h
index 637172524e2..0bebe9c575f 100644
--- a/engines/chewy/rooms/room11.h
+++ b/engines/chewy/rooms/room11.h
@@ -39,9 +39,6 @@ public:
 	static void put_card();
 	static int16 scanner();
 	static void talk_debug();
-
-	static int16 cut_serv(int16 frame);
-	static int16 cut_serv_2(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 98bb6434cb8..d95b787d7f8 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -50,7 +50,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 	bool skipVideo = false;
 	byte curPalette[256 * 3];
 	uint32 curFrame = 0;
-	bool customExit = false;
+	bool keepPlaying = true;
 
 	g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
 	//save_palette(curPalette);
@@ -63,7 +63,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 
 	cfoDecoder->start();
 
-	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && !customExit) {
+	while (!g_engine->shouldQuit() && !cfoDecoder->endOfVideo() && !skipVideo && keepPlaying) {
 		if (cfoDecoder->needsUpdate()) {
 			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
 			if (frame) {
@@ -71,7 +71,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 				byte *destP = (byte *)g_screen->getPixels();
 				Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
 				g_screen->markAllDirty();
-				customExit = !handleCustom(num, curFrame);
+				keepPlaying = handleCustom(num, curFrame);
 				curFrame = cfoDecoder->getCurFrame();
 
 				if (cfoDecoder->hasDirtyPalette())
@@ -83,7 +83,10 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 		}
 
 		while (g_system->getEventManager()->pollEvent(event)) {
-			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
+			// FIXME: We ignore mouse events because the game checks
+			// for left mouse down, instead of up, so releasing the
+			// mouse button results in video skipping
+			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) /*|| event.type == Common::EVENT_LBUTTONUP*/)
 				skipVideo = true;
 		}
 
@@ -113,6 +116,24 @@ bool VideoPlayer::handleCustom(uint num, uint frame) {
 		if (frame == 31)
 			start_aad(107, 0);
 		break;
+	case FCUT_009:
+	case FCUT_010:
+		// Room11::cut_serv and Room11::cut_serv_2
+		if (_G(spieler).R11DoorRightF)
+			_G(det)->plot_static_details(0, 0, 0, 0);
+
+		if (_G(spieler).R11DoorRightB)
+			_G(det)->plot_static_details(0, 0, 6, 6);
+
+		if (_G(spieler).R6DoorRightB)
+			_G(det)->plot_static_details(0, 0, 7, 7);
+
+		if (num == FCUT_010) {
+			_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+			if (frame == 43)
+				start_aad(106, 0);
+		}
+		break;
 	case FCUT_094:
 		//Room87::proc3
 		return (frame >= 12) ? false : true;


Commit: 03de363e36b503770e621a0ffe56c45558a2d29b
    https://github.com/scummvm/scummvm/commit/03de363e36b503770e621a0ffe56c45558a2d29b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: Unify switch cases in room 39

Changed paths:
    engines/chewy/rooms/room39.cpp


diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index f2647734078..86612082a50 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -363,10 +363,10 @@ int16 Room39::setup_func(int16 frame) {
 	int16 action_ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 
 	if (_flag) {
-		if (frame == 121)
-			start_aad(599, -1);
-
 		switch (frame) {
+		case 121:
+			start_aad(599, -1);
+			break;
 		case 247:
 			start_aad(600, -1);
 			break;


Commit: 60f8257fdd6323044a945fecc3733b071c698070
    https://github.com/scummvm/scummvm/commit/60f8257fdd6323044a945fecc3733b071c698070
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: Remove superfluous mouse handling code

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/ngstypes.h
    engines/chewy/rooms/room04.cpp


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index db1bcea3e60..46643ccc4dd 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -32,16 +32,11 @@ Cursor::Cursor(McgaGraphics *iout, InputMgr *iin, CurBlk *curblkp) {
 	_curblk = curblkp;
 	_inzeig = _in->get_in_zeiger();
 
-	if (!_inzeig->minfo) {
-		_maus_da = false;
-	} else {
-		_maus_da = true;
-		_minfo = _inzeig->minfo;
-		_sichtbar = false;
-		_ani = nullptr;
-		_cur_aufruf = false;
-		_ani_count = false;
-	}
+	_maus_da = true;
+	_sichtbar = false;
+	_ani = nullptr;
+	_cur_aufruf = false;
+	_ani_count = false;
 }
 
 Cursor::~Cursor() {
@@ -56,13 +51,13 @@ void Cursor::plot_cur() {
 
 				_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
 
-				_out->sprite_save(_curblk->cur_back, (_minfo->x + _curblk->page_off_x),
-				                  (_minfo->y + _curblk->page_off_y), _curblk->xsize,
+				_out->sprite_save(_curblk->cur_back, (_G(minfo).x + _curblk->page_off_x),
+				                  (_G(minfo).y + _curblk->page_off_y), _curblk->xsize,
 				                  _curblk->ysize, _scrWidth);
 			}
 
-			_cur_x_old = (_minfo->x + _curblk->page_off_x);
-			_cur_y_old = (_minfo->y + _curblk->page_off_y);
+			_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
+			_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
 		}
 
 		_cur_aufruf -= 1;
@@ -84,17 +79,17 @@ void Cursor::show_cur() {
 		_sichtbar = true;
 		mouse_active = true;
 
-		_minfo->x = g_events->_mousePos.x;
-		_minfo->y = g_events->_mousePos.y;
+		_G(minfo).x = g_events->_mousePos.x;
+		_G(minfo).y = g_events->_mousePos.y;
 
 		if (!_curblk->no_back) {
-			_out->sprite_save(_curblk->cur_back, (_minfo->x + _curblk->page_off_x),
-			    (_minfo->y + _curblk->page_off_y), _curblk->xsize,
+			_out->sprite_save(_curblk->cur_back, (_G(minfo).x + _curblk->page_off_x),
+			    (_G(minfo).y + _curblk->page_off_y), _curblk->xsize,
 			    _curblk->ysize, _scrWidth);
 		}
 
-		_cur_x_old = (_minfo->x + _curblk->page_off_x);
-		_cur_y_old = (_minfo->y + _curblk->page_off_y);
+		_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
+		_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
 		cur_move = true;
 		plot_cur();
 	}
@@ -119,10 +114,10 @@ void Cursor::move(int16 x, int16 y) {
 	if (_maus_da) {
 		mouse_active = true;
 
-		_minfo->x = x;
-		_minfo->y = y;
-		_cur_x_old = (_minfo->x + _curblk->page_off_x);
-		_cur_y_old = (_minfo->y + _curblk->page_off_y);
+		_G(minfo).x = x;
+		_G(minfo).y = y;
+		_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
+		_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
 		_in->move_mouse(x, y);
 		if (_sichtbar)
 			cur_move = true;
@@ -136,7 +131,7 @@ void Cursor::wait_taste_los(bool maus_plot) {
 	int16 is_mouse = 0;
 	if (_maus_da) {
 		g_events->update();
-		is_mouse = _minfo->button;
+		is_mouse = _G(minfo).button;
 	}
 
 	if (!is_mouse)
@@ -151,7 +146,7 @@ void Cursor::wait_taste_los(bool maus_plot) {
 			switch_code = 2;
 
 			g_events->update();
-			stay = _minfo->button;
+			stay = _G(minfo).button;
 		}
 
 		if (maus_plot)
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index cf83c7f5530..dc964cf1dfd 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -42,7 +42,6 @@ public:
 
 	McgaGraphics *_out = nullptr;
 	InputMgr *_in = nullptr;
-	MouseInfo *_minfo = nullptr;
 	KbdMouseInfo *_inzeig = nullptr;
 	CurBlk *_curblk = nullptr;
 	CurAni *_ani = nullptr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 2d5033e5e08..84dad981011 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -56,8 +56,6 @@ void standard_init() {
 	_G(screen0) = (byte *)g_screen->getPixels();
 	_G(in)->neuer_kb_handler(&_G(kbinfo));
 
-	_G(in)->rectangle(0, 0, 320, 210);
-	_G(in)->neuer_maushandler(&_G(minfo));
 	_G(out)->init_mausmode(&_G(minfo));
 	_G(curblk).page_off_x = 0;
 	_G(curblk).page_off_y = 0;
@@ -284,7 +282,6 @@ void init_load() {
 void tidy() {
 	sound_exit();
 	_G(in)->alter_kb_handler();
-	_G(in)->init();
 	free_buffers();
 	_G(obj)->free_inv_spr(&_G(inv_spr)[0]);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 7d96de3026a..d3fc965fd79 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -222,7 +222,6 @@ void cursorChoice(int16 nr) {
 		_G(cur)->set_cur_ani(&_G(curani));
 		_G(spieler)._curWidth = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf]);
 		_G(spieler)._curHeight = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf] + 2);
-		_G(in)->rectangle(0, 0, 320 - _G(spieler)._curWidth, 210 - _G(spieler)._curHeight);
 	}
 }
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index ff2fc838d09..8f0a14ac0a6 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -22,6 +22,7 @@
 #include "common/textconsole.h"
 #include "chewy/mouse.h"
 #include "chewy/events.h"
+#include "chewy/globals.h"
 
 namespace Chewy {
 
@@ -42,26 +43,16 @@ void set_old_kb_handler() {
 }
 
 InputMgr::InputMgr() {
-	_mouseInfoBlk = nullptr;
 	_kbInfoBlk = nullptr;
 }
 
 InputMgr::~InputMgr() {
 }
 
-int InputMgr::init() {
-	// ScummVM supports three buttons
-	return 3;
-}
-
 void InputMgr::move_mouse(int16 x, int16 y) {
 	g_events->warpMouse(Common::Point(x, y));
 }
 
-void InputMgr::rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax) {
-	// Mouse clip rectangle isn't supported in ScummVM
-}
-
 int16 InputMgr::mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 	int16 i = -1;
 	for (int16 j = 0; (j < anz * 4) && (i == -1); j += 4) {
@@ -88,12 +79,7 @@ void InputMgr::alter_kb_handler() {
 #endif
 }
 
-void InputMgr::neuer_maushandler(MouseInfo *mpos) {
-	_mouseInfoBlk = mpos;
-}
-
 KbdMouseInfo *InputMgr::get_in_zeiger() {
-	_inzeig.minfo = _mouseInfoBlk;
 	_inzeig.kbinfo = _kbInfoBlk;
 
 	return &_inzeig;
@@ -102,14 +88,12 @@ KbdMouseInfo *InputMgr::get_in_zeiger() {
 int16 InputMgr::get_switch_code() {
 	int16 switch_code = 0;
 
-	if (_mouseInfoBlk) {
-		if (_mouseInfoBlk->button == 2) {
-			switch_code = Common::KEYCODE_ESCAPE;
-		} else if (_mouseInfoBlk->button == 1)
-			switch_code = 255;
-		else if (_mouseInfoBlk->button == 4)
-			switch_code = 254;
-	}
+	if (_G(minfo).button == 2) {
+		switch_code = Common::KEYCODE_ESCAPE;
+	} else if (_G(minfo).button == 1)
+		switch_code = 255;
+	else if (_G(minfo).button == 4)
+		switch_code = 254;
 
 	if (_kbInfoBlk)
 		if (_kbInfoBlk->key_code != 0)
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 93b2653f9e1..bd644aac025 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -38,13 +38,10 @@ public:
 	InputMgr();
 	~InputMgr();
 
-	int init();
 	void move_mouse(int16 x, int16 y);
-	void rectangle(int16 xmin, int16 ymin, int16 xmax, int16 ymax);
 
 	void neuer_kb_handler(KbdInfo *key);
 	void alter_kb_handler();
-	void neuer_maushandler(MouseInfo *mpos);
 	int16 mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
 	KbdMouseInfo *get_in_zeiger();
@@ -53,7 +50,6 @@ public:
 	int16 _hotkey = 0;
 
 private:
-	MouseInfo *_mouseInfoBlk = nullptr;
 	KbdInfo *_kbInfoBlk = nullptr;
 	KbdMouseInfo _inzeig;
 };
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 753afcc32bf..d212ed7dd88 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -133,7 +133,6 @@ struct KbdInfo {
 };
 
 struct KbdMouseInfo {
-	MouseInfo *minfo = nullptr;
 	KbdInfo *kbinfo = nullptr;
 };
 
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index a02cd03be69..be7cf043392 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -103,7 +103,6 @@ int16 Room4::sonde_comp() {
 		}
 		cursorChoice(CUR_USER);
 		_G(spieler)._curHeight = 16;
-		_G(in)->rectangle(0, 123, 320 - _G(spieler)._curWidth, 194);
 
 		if (_G(minfo).y < 124)
 			_G(minfo).y = 123;


Commit: 37149b2bc8ba2d2a1b37966df22b6ffcc1bce831
    https://github.com/scummvm/scummvm/commit/37149b2bc8ba2d2a1b37966df22b6ffcc1bce831
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: Fix crash when entering room 21

Changed paths:
    engines/chewy/rooms/room21.cpp


diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index cad6b175524..4919d6b5276 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -165,7 +165,7 @@ void Room21::setup_func() {
 void Room21::chewy_kolli() {
 	int16 kolli = false;
 
-	for (int16 i = 0; i < 3 && !kolli; i++) {
+	for (int16 i = 0; i < _G(auto_obj) && !kolli; i++) {
 		int16 spr_nr = _G(mov_phasen)[i].Phase[_G(auto_mov_vector)[i].Phase][0] + _G(auto_mov_vector)[i].PhNr;
 		int16 *xy = (int16 *)_G(room_blk).DetImage[spr_nr];
 		int16 *Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);


Commit: a248e9b8da54d09fdf3cbc4cd510afd9969ade57
    https://github.com/scummvm/scummvm/commit/a248e9b8da54d09fdf3cbc4cd510afd9969ade57
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:44-08:00

Commit Message:
CHEWY: More fixes for CppCheck warnings

Changed paths:
    engines/chewy/flic.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga_graphics.cpp


diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index 6a313620e17..b47598e90f6 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -74,12 +74,10 @@ void decode_rle(byte *vscr, const byte *dbuf, int br, int h) {
 			if (len < 0) {
 				// Copy a number of bytes specified in lower 7 bits
 				len = -len;
-				if (len) {
-					Common::copy(dbuf, dbuf + len, dest);
-					dbuf += len;
-					dest += len;
-					x += len;
-				}
+				Common::copy(dbuf, dbuf + len, dest);
+				dbuf += len;
+				dest += len;
+				x += len;
 			} else {
 				// Run length in the lower 7 bits of the next byte
 				byte v = *dbuf++;
@@ -110,9 +108,9 @@ int16 Flic::decode_frame() {
 	int16 action_ret = 0;
 
 	byte *tmp_buf = _loadBuffer;
-	bool update_flag = false;
 	if (_frameHeader.chunks != 0) {
 		_fadeFlag = false;
+		bool update_flag = false;
 		for (uint16 i = 0; i < _frameHeader.chunks; i++) {
 			Common::MemoryReadStream rs(tmp_buf, ChunkHead::SIZE());
 			chunk_header.load(&rs);
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 9257736e054..687c87855d6 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -258,7 +258,7 @@ void putcxy(int16 x, int16 y, unsigned char c, int16 fgCol, int16 bgCol, int16 s
 				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);
 				if (*src != 0xFF)
 					*dst = fgCol;
-				else if (*src == 0xFF && bgCol < 0xFF)
+				else if (bgCol < 0xFF)
 					*dst = bgCol;
 			}
 		}
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 88511c47d9e..af84f800499 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -688,7 +688,7 @@ void McgaGraphics::printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scr
 				byte *dst = (byte *)_G(currentScreen).getBasePtr(curX + x, curY + y);
 				if (*src != 0xFF)
 					*dst = fgCol;
-				else if (*src == 0xFF && bgCol < 0xFF)
+				else if (bgCol < 0xFF)
 					*dst = bgCol;
 			}
 		}


Commit: 56616bac2f3222d2c5406a3a59d4f79894e64b48
    https://github.com/scummvm/scummvm/commit/56616bac2f3222d2c5406a3a59d4f79894e64b48
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Some renaming

Changed paths:
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/flic.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mcga.cpp
    engines/chewy/mcga.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/mouse.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 46643ccc4dd..da66bc0ae87 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -127,31 +127,4 @@ void Cursor::move(int16 x, int16 y) {
 	}
 }
 
-void Cursor::wait_taste_los(bool maus_plot) {
-	int16 is_mouse = 0;
-	if (_maus_da) {
-		g_events->update();
-		is_mouse = _G(minfo).button;
-	}
-
-	if (!is_mouse)
-		_in->_hotkey = 0;
-
-	int16 stay = 1;
-	int16 switch_code = 1;
-
-	while ((switch_code != 0) && (stay)) {
-		switch_code = _in->get_switch_code();
-		if (is_mouse) {
-			switch_code = 2;
-
-			g_events->update();
-			stay = _G(minfo).button;
-		}
-
-		if (maus_plot)
-			plot_cur();
-	}
-}
-
 } // namespace Chewy
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index dc964cf1dfd..4807f5d7085 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -24,6 +24,7 @@
 
 #include "chewy/mcga_graphics.h"
 #include "chewy/ngstypes.h"
+#include "chewy/mouse.h"
 
 namespace Chewy {
 
@@ -38,7 +39,6 @@ public:
 	void hide_cur();
 	void set_cur_ani(CurAni *ani);
 	void move(int16 x, int16 y);
-	void wait_taste_los(bool maus_plot);
 
 	McgaGraphics *_out = nullptr;
 	InputMgr *_in = nullptr;
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index ec49ef92cb4..36d22f228d6 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -62,7 +62,7 @@ void Cinema::execute() {
 	_G(kbinfo).scan_code = 0;
 
 	for (bool endLoop = false; !endLoop;) {
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
 
 		if (!cutscenes.empty()) {
@@ -157,7 +157,7 @@ void Cinema::execute() {
 		case Common::KEYCODE_RETURN:
 			hideCur();
 			_G(out)->cls();
-			_G(out)->set_pointer(_G(screen0));
+			_G(out)->setPointer(_G(screen0));
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			print_rows(546 + topIndex);
 
@@ -184,7 +184,7 @@ void Cinema::execute() {
 
 			if (flag) {
 				flag = false;
-				_G(out)->set_pointer(_G(screen0));
+				_G(out)->setPointer(_G(screen0));
 				_G(room)->set_ak_pal(&_G(room_blk));
 				_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			} else {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index c63ba6e22b0..9ce69b4c322 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -199,7 +199,7 @@ void Credits::execute() {
 	_G(room)->load_tgp(5, &_G(room_blk), 1, 0, GBOOK);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(out)->set_pointer(_G(screen0));
+	_G(out)->setPointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
@@ -221,7 +221,7 @@ void Credits::execute() {
 			break;
 
 		// Display the starfield background
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 			_G(spieler).scrollx, _G(spieler).scrolly);
 
@@ -257,7 +257,7 @@ void Credits::execute() {
 		if (!stillScrolling)
 			break;
 
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->back2screen(_G(workpage));
 	}
 
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 9b05f297b3c..27025d1138f 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -66,15 +66,15 @@ int16 Files::execute(bool isInGame) {
 
 	_G(room)->open_handle(GBOOK, 0);
 	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->set_pointer(_G(screen0));
+	_G(out)->setPointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	char *fnames = _G(iog)->io_init(&_G(ioptr));
 	fnames += 1;
  
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	showCur();
 
 	pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
@@ -271,13 +271,13 @@ enter:
 				}
 			} else if (mode[SAVE]) {
 				_G(out)->back2screen(_G(workpage));
-				_G(out)->set_pointer(_G(screen0));
+				_G(out)->setPointer(_G(screen0));
 				_G(in)->alter_kb_handler();
 				tmp = fnames + ((text_off + active_slot) * 40);
 				key = _G(out)->scanxy(70, 68 + (active_slot * 10),
 					255, 42, 14, 0, "%36s36", tmp);
 				_G(in)->neuer_kb_handler(&_G(kbinfo));
-				_G(out)->set_pointer(_G(workptr));
+				_G(out)->setPointer(_G(workptr));
 				if (key != Common::KEYCODE_ESCAPE) {
 					_G(iog)->save_entry(text_off + active_slot,
 						_G(ioptr).save_path);
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 93db09189fa..df078a0d733 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -51,7 +51,7 @@ int Inventory::keyVal;
 
 
 void Inventory::plot_menu() {
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	build_menu(WIN_INVENTAR);
 
 	for (int16 j = 0; j < 3; j++) {
@@ -352,13 +352,13 @@ void Inventory::menu() {
 			}
 			if (menu_flag1 == false)
 				_G(cur)->plot_cur();
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			if (menu_flag1 == MENU_EINBLENDEN) {
 				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 0, 300);
 			} else if (menu_flag1 == MENU_AUSBLENDEN)
 				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 1, 300);
 			menu_flag1 = false;
-			_G(out)->set_clip(0, 0, 320, 200);
+			_G(out)->setClip(0, 0, 320, 200);
 			_G(out)->back2screen(_G(workpage));
 		} else {
 			showCur();
@@ -649,11 +649,11 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = 0;
 
 	_G(room)->load_tgp(DIARY_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 	_G(out)->back2screen(_G(workpage));
 	_G(room)->set_ak_pal(&_G(room_blk));
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
 	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
@@ -670,7 +670,7 @@ void Inventory::showDiary() {
 	_G(spieler).scrolly = scrolly;
 	set_up_screen(NO_SETUP);
 	plot_menu();
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 }
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index a06560d2a8f..6c3c4faa1ff 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -74,7 +74,7 @@ void MainMenu::execute() {
 		load_room_music(98);
 		_G(fx)->border(_G(workpage), 100, 0, 0);
 
-		_G(out)->set_palette(_G(pal));
+		_G(out)->setPalette(_G(pal));
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		showCur();
 
@@ -94,7 +94,7 @@ void MainMenu::execute() {
 
 		case MM_VIEW_INTRO:
 			_G(fx)->border(_G(workpage), 100, 0, 0);
-			_G(out)->set_pointer(_G(workptr));
+			_G(out)->setPointer(_G(workptr));
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_135);
 			break;
@@ -113,7 +113,7 @@ void MainMenu::execute() {
 			break;
 
 		case MM_QUIT:
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			done = true;
 			break;
@@ -150,13 +150,13 @@ void MainMenu::animate() {
 	}
 
 	++_G(FrameSpeed);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage],
 		_G(spieler).scrollx, _G(spieler).scrolly);
 
 	if (_G(SetUpScreenFunc) && !_G(menu_display) && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 	}
 
 	sprite_engine();
@@ -165,7 +165,7 @@ void MainMenu::animate() {
 	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(out)->back2screen(_G(workpage));
 
 	g_screen->update();
@@ -230,7 +230,7 @@ void MainMenu::startGame() {
 bool MainMenu::loadGame() {
 	_G(flags).SaveMenu = true;
 	savePersonAni();
-	_G(out)->set_pointer(_G(screen0));
+	_G(out)->setPointer(_G(screen0));
 	_G(fontMgr)->setFont(_G(font6));
 	cursorChoice(CUR_SAVE);
 	_G(cur)->move(152, 92);
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 684eaf5fcb5..a9d90175b82 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -59,13 +59,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
 void Options::execute(TafInfo *ti) {
 	long akt_clock = 0, stop_clock = 0;
 	_G(room)->load_tgp(0, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->set_pointer(_G(screen0));
+	_G(out)->setPointer(_G(screen0));
 
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	int16 key = 0;
 	int16 surimy_ani = SURIMY_START;
 	int16 mund_ani = MUND_START;
@@ -264,12 +264,12 @@ void Options::execute(TafInfo *ti) {
 	}
 
 	_G(room)->load_tgp(1, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], 0, 0);
-	_G(out)->set_pointer(_G(screen0));
+	_G(out)->setPointer(_G(screen0));
 	_G(room)->set_ak_pal(&_G(room_blk));
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index 65e79340aa7..aea85366f9a 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -43,7 +43,7 @@ void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 				x = rnd_zeiger[i] * 8;
 			_G(out)->box_fill(x, y, x + 8, y + 8, col);
 		}
-		_G(out)->set_palette(palette);
+		_G(out)->setPalette(palette);
 	}
 	for (int16 i = 0; i < 1000; i++) {
 		int16 x;
@@ -52,9 +52,9 @@ void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 			x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 		else
 			x = rnd_zeiger[i] * 8;
-		_G(out)->set_pointer(sram_speicher);
+		_G(out)->setPointer(sram_speicher);
 		_G(out)->sprite_save(sp, x, y, 8, 8, 0);
-		_G(out)->set_pointer(screen);
+		_G(out)->setPointer(screen);
 		_G(out)->sprite_set(sp, x, y, 0);
 	}
 	free(sp);
@@ -75,34 +75,34 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 			for (int16 y1 = 24 - i; y1 >= i; y1--)
 				_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
 		}
-		_G(out)->set_palette(palette);
+		_G(out)->setPalette(palette);
 	}
 	switch (mode) {
 	case 0:
 		for (i = 13; i >= 0; i--) {
 			int16 x, y, x1;
 			for (x = i; x < 39 - i; x++) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 			}
 			for (y = i; y < 24 - i; y++) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 			}
 			for (x1 = 39 - i; x1 > i; x1--) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 			}
 			for (int16 y1 = 24 - i; y1 > i; y1--) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 			}
 		}
@@ -112,27 +112,27 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 		for (i = 0; i < 13; i++) {
 			int16 x, y, x1;
 			for (x = i; x < 39 - i; x++) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
 			}
 			for (y = i; y < 24 - i; y++) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
 			}
 			for (x1 = 39 - i; x1 > i; x1--) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
 			}
 			for (int16 y1 = 24 - i; y1 > i; y1--) {
-				_G(out)->set_pointer(sram_speicher);
+				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
-				_G(out)->set_pointer(screen);
+				_G(out)->setPointer(screen);
 				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
 			}
 		}
@@ -147,14 +147,14 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	if (mode) {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			_G(out)->set_pointer(workpage_ + 4);
+			_G(out)->setPointer(workpage_ + 4);
 			_G(out)->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
 			_G(out)->box_fill(x + 160, 0, x + 168, 200, farbe);
 			_G(out)->back2screen(workpage_);
 		}
 	} else {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
-			_G(out)->set_pointer(workpage_ + 4);
+			_G(out)->setPointer(workpage_ + 4);
 			_G(out)->box_fill(x, 0, x + 8, 200, farbe);
 			_G(out)->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
 			_G(out)->back2screen(workpage_);
@@ -165,14 +165,14 @@ void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 void Effect::spr_blende(byte *wrkPage, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
-			_G(out)->set_pointer(wrkPage + 4);
+			_G(out)->setPointer(wrkPage + 4);
 			_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
 			_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
 			_G(out)->back2screen(wrkPage);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
-			_G(out)->set_pointer(wrkPage + 4);
+			_G(out)->setPointer(wrkPage + 4);
 			_G(out)->box_fill(0, i, 320, i + 8, col);
 			_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
 			_G(out)->back2screen(wrkPage);
diff --git a/engines/chewy/flic.cpp b/engines/chewy/flic.cpp
index b47598e90f6..aa5ea950f56 100644
--- a/engines/chewy/flic.cpp
+++ b/engines/chewy/flic.cpp
@@ -146,9 +146,9 @@ int16 Flic::decode_frame() {
 				break;
 
 			case CLS:
-				_G(out)->set_pointer(_virtScreen);
+				_G(out)->setPointer(_virtScreen);
 				_G(out)->cls();
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 
 				update_flag = true;
 				break;
@@ -171,9 +171,9 @@ int16 Flic::decode_frame() {
 		}
 		if (update_flag != false) {
 			if (_flicUser) {
-				_G(out)->set_pointer(_virtScreen);
+				_G(out)->setPointer(_virtScreen);
 				action_ret = _flicUser(_currentFrame);
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 			}
 			_G(out)->back2screen(_virtScreen - 4);
 			if (_fadeFlag != false) {
@@ -200,10 +200,10 @@ void Flic::col256_chunk(byte *tmp) {
 		for (int i = 0; i < PALETTE_SIZE; i++)
 			tmp[i] >>= 2;
 		if (_fadeFlag == false)
-			_G(out)->set_palette(tmp);
+			_G(out)->setPalette(tmp);
 		else {
 			memset(_fadePal, 0, PALETTE_SIZE);
-			_G(out)->set_palette(_fadePal);
+			_G(out)->setPalette(_fadePal);
 			memcpy(_fadePal, tmp, PALETTE_SIZE);
 		}
 	} else {
@@ -233,10 +233,10 @@ void Flic::col64_chunk(byte *tmp) {
 
 	if (!tmp[1]) {
 		if (_fadeFlag == false)
-			_G(out)->set_palette(tmp + 2);
+			_G(out)->setPalette(tmp + 2);
 		else {
 			memset(_fadePal, 0, PALETTE_SIZE);
-			_G(out)->set_palette(_fadePal);
+			_G(out)->setPalette(_fadePal);
 			memcpy(_fadePal, tmp + 2, PALETTE_SIZE);
 		}
 	} else {
@@ -546,9 +546,9 @@ void Flic::decode_custom_frame(Common::SeekableReadStream *handle) {
 			break;
 
 		case CLEAR_SCREEN:
-			_G(out)->set_pointer(_virtScreen);
+			_G(out)->setPointer(_virtScreen);
 			_G(out)->cls();
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			break;
 
@@ -598,9 +598,9 @@ int16 Flic::decode_cframe() {
 				break;
 
 			case CLS:
-				_G(out)->set_pointer(_virtScreen);
+				_G(out)->setPointer(_virtScreen);
 				_G(out)->cls();
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 
 				update_flag = true;
 				break;
@@ -628,9 +628,9 @@ int16 Flic::decode_cframe() {
 		if (update_flag != false) {
 			if (_customUser) {
 				_G(out)->back2back(_virtScreen, _loadBuffer);
-				_G(out)->set_pointer(_virtScreen);
+				_G(out)->setPointer(_virtScreen);
 				action_ret = _customUser(_currentFrame);
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 				_G(out)->back2screen(_virtScreen - 4);
 				_G(out)->back2back(_loadBuffer, _virtScreen);
 			} else
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 84dad981011..fcdbc90123b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -49,14 +49,14 @@ void standard_init() {
 
 	_G(out)->init();
 	_G(out)->cls();
-	_G(out)->palette_save();
-	_G(out)->set_clip(0, 0, 320, 200);
-	_G(out)->set_writemode(0);
+	_G(out)->savePalette();
+	_G(out)->setClip(0, 0, 320, 200);
+	_G(out)->setWriteMode(0);
 	_G(scr_width) = 0;
 	_G(screen0) = (byte *)g_screen->getPixels();
 	_G(in)->neuer_kb_handler(&_G(kbinfo));
 
-	_G(out)->init_mausmode(&_G(minfo));
+	_G(out)->initMouseMode(&_G(minfo));
 	_G(curblk).page_off_x = 0;
 	_G(curblk).page_off_y = 0;
 	_G(curblk).xsize = 16;
@@ -276,7 +276,7 @@ void init_load() {
 	f.close();
 
 	_G(room)->load_room(&_G(room_blk), _G(room_start_nr), &_G(spieler));
-	_G(out)->set_palette(_G(pal));
+	_G(out)->setPalette(_G(pal));
 }
 
 void tidy() {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index d3fc965fd79..0c2f7555fa8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -319,7 +319,7 @@ bool mainLoop(int16 mode) {
 		case Common::KEYCODE_F6:
 			_G(flags).SaveMenu = true;
 
-			_G(out)->set_pointer(_G(screen0));
+			_G(out)->setPointer(_G(screen0));
 			_G(fontMgr)->setFont(_G(font6));
 			cursorChoice(CUR_SAVE);
 			if (Dialogs::Files::execute(true) == 1) {
@@ -333,7 +333,7 @@ bool mainLoop(int16 mode) {
 			_G(cur_display) = true;
 			_G(flags).SaveMenu = false;
 			_G(cur)->show_cur();
-			_G(out)->set_pointer(_G(workptr));
+			_G(out)->setPointer(_G(workptr));
 			break;
 
 		case Common::KEYCODE_ESCAPE:
@@ -387,7 +387,7 @@ bool mainLoop(int16 mode) {
 				_G(minfo).y = 92;
 				_G(fontMgr)->setFont(_G(font6));
 
-				_G(out)->set_pointer(_G(screen0));
+				_G(out)->setPointer(_G(screen0));
 				cursorChoice(CUR_SAVE);
 				int16 ret = Dialogs::Files::execute(true);
 				if (ret == IOG_END) {
@@ -395,7 +395,7 @@ bool mainLoop(int16 mode) {
 					_G(fx_blend) = BLEND4;
 				}
 
-				_G(out)->set_pointer(_G(workptr));
+				_G(out)->setPointer(_G(workptr));
 				_G(menu_item) = _G(tmp_menu_item);
 				_G(menu_display) = MENU_AUSBLENDEN;
 
@@ -507,7 +507,7 @@ void set_up_screen(SetupScreenMode mode) {
 		_G(det)->set_global_delay(_G(spieler).DelaySpeed);
 	}
 	++_G(FrameSpeed);
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 
 	for (i = 0; i < MAX_PERSON; i++)
@@ -515,7 +515,7 @@ void set_up_screen(SetupScreenMode mode) {
 
 	if (_G(SetUpScreenFunc) && _G(menu_display) == 0 && !_G(flags).InventMenu) {
 		_G(SetUpScreenFunc)();
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 	}
 
 	sprite_engine();
@@ -634,7 +634,7 @@ void set_up_screen(SetupScreenMode mode) {
 	_G(maus_links_click) = false;
 	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		switch (_G(fx_blend)) {
 		case BLEND1:
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
@@ -649,9 +649,9 @@ void set_up_screen(SetupScreenMode mode) {
 			break;
 
 		case BLEND4:
-			_G(out)->set_pointer(_G(workptr));
+			_G(out)->setPointer(_G(workptr));
 			_G(out)->cls();
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 			break;
 
diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp
index 687c87855d6..6cc4d04764e 100644
--- a/engines/chewy/mcga.cpp
+++ b/engines/chewy/mcga.cpp
@@ -54,7 +54,7 @@ void setScummVMPalette(const byte *palette, uint start, uint count) {
 	g_system->getPaletteManager()->setPalette(tempPal, start, count);
 }
 
-void setpalette(const byte *palette) {
+void set_palette(const byte *palette) {
 	setScummVMPalette(palette, 0, PALETTE_COUNT);
 }
 
@@ -66,7 +66,7 @@ void save_palette(byte *palette) {
 }
 
 void restore_palette() {
-	setpalette(_G(saved_palette));
+	set_palette(_G(saved_palette));
 }
 
 void rastercol(int16 color, int16 r, int16 g, int16 b) {
diff --git a/engines/chewy/mcga.h b/engines/chewy/mcga.h
index 248e691163e..1c65753bf2f 100644
--- a/engines/chewy/mcga.h
+++ b/engines/chewy/mcga.h
@@ -32,7 +32,7 @@ void init_mcga();
 byte *get_dispoff();
 
 void setScummVMPalette(const byte *palette, uint start, uint count);
-void setpalette(const byte *palette);
+void set_palette(const byte *palette);
 void save_palette(byte *palette);
 void restore_palette();
 void rastercol(int16 color, int16 r, int16 g, int16 b);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index af84f800499..6caec7471bf 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -47,18 +47,18 @@ void McgaGraphics::init() {
 	init_mcga();
 }
 
-void McgaGraphics::set_writemode(char wm) {
+void McgaGraphics::setWriteMode(char wm) {
 	_writeMode = wm;
 }
 
-void McgaGraphics::set_clip(int16 x1, int16 y1, int16 x2, int16 y2) {
+void McgaGraphics::setClip(int16 x1, int16 y1, int16 x2, int16 y2) {
 	_G(clipx1) = x1;
 	_G(clipx2) = x2;
 	_G(clipy1) = y1;
 	_G(clipy2) = y2;
 }
 
-void McgaGraphics::set_pointer(byte *ptr) {
+void McgaGraphics::setPointer(byte *ptr) {
 	if (ptr) {
 		_G(currentScreen) = ptr;
 	} else if (_G(screenHasDefault)) {
@@ -68,17 +68,17 @@ void McgaGraphics::set_pointer(byte *ptr) {
 	}
 }
 
-byte *McgaGraphics::get_zeiger() {
+byte *McgaGraphics::getPointer() {
 	return get_dispoff();
 }
 
-void McgaGraphics::set_palette(byte *palette) {
+void McgaGraphics::setPalette(byte *palette) {
 	for (int16 i = 0; i < 768; i++)
 		_palTable[i] = palette[i];
-	setpalette(palette);
+	set_palette(palette);
 }
 
-void McgaGraphics::palette_save(byte *palette) {
+void McgaGraphics::savePalette(byte *palette) {
 	save_palette(palette);
 }
 
@@ -112,7 +112,7 @@ void McgaGraphics::einblenden(byte *palette, int16 frames) {
 				_palTable[k + 2] = b1;
 			k += 3;
 		}
-		setpalette(_palTable);
+		set_palette(_palTable);
 	}
 }
 
@@ -131,7 +131,7 @@ void McgaGraphics::ausblenden(int16 frames) {
 			_palTable[k + 2] = b;
 			k += 3;
 		}
-		setpalette(_palTable);
+		set_palette(_palTable);
 	}
 }
 
@@ -710,7 +710,7 @@ void McgaGraphics::move(int16 x, int16 y) {
 	_G(gcury) = y;
 }
 
-void McgaGraphics::init_mausmode(MouseInfo *mInfo) {
+void McgaGraphics::initMouseMode(MouseInfo *mInfo) {
 	_mInfo = mInfo;
 }
 
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 8133d7df27e..b70739bbf29 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -23,7 +23,6 @@
 #define CHEWY_MCGA_GRAPHICS_H
 
 #include "graphics/screen.h"
-#include "chewy/mouse.h"
 #include "chewy/ngstypes.h"
 
 namespace Chewy {
@@ -34,15 +33,15 @@ public:
 	~McgaGraphics();
 
 	void init();
-	void set_writemode(char wm);
-	void init_mausmode(MouseInfo *mInfo);
+	void setWriteMode(char wm);
+	void initMouseMode(MouseInfo *mInfo);
 
-	void set_clip(int16 x1, int16 y1, int16 x2, int16 y2);
-	void set_pointer(byte *ptr);
-	byte *get_zeiger();
+	void setClip(int16 x1, int16 y1, int16 x2, int16 y2);
+	void setPointer(byte *ptr);
+	byte *getPointer();
 
-	void set_palette(byte *palette);
-	void palette_save(byte *palette = nullptr);
+	void setPalette(byte *palette);
+	void savePalette(byte *palette = nullptr);
 	void rest_palette();
 	void raster_col(int16 c, int16 r, int16 g, int16 b);
 	void einblenden(byte *palette, int16 frames);
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index bd644aac025..8072dbbd68a 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -29,9 +29,8 @@ namespace Chewy {
 void set_new_kb_handler(KbdInfo *key);
 void set_old_kb_handler();
 
-extern bool mouse_links_los;
 extern bool mouse_active;
-extern bool cur_move;
+extern bool _cursorMoveFl;
 
 class InputMgr {
 public:
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 439f990c423..30e8af6ecd0 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -779,7 +779,7 @@ void print_rows(int16 id) {
 	_G(fontMgr)->setFont(_G(font8));
 	int16 txt_anz;
 	char *txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
 		char *s = _G(txt)->str_pos(txtStr, i);
@@ -856,7 +856,7 @@ static void flic_proc1() {
 		else if (VALS1[i] == 143)
 			load_room_music(260);
 		if (VALS2[i]) {
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 		}
 
@@ -883,7 +883,7 @@ static void flic_proc1() {
 
 	_G(flc)->remove_custom_user_function();
 	if (ret == -1) {
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(out)->raster_col(254, 62, 35, 7);
 		start_aad(595);
@@ -896,7 +896,7 @@ static void flic_proc1() {
 		}
 	}
 
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(out)->cls();
 }
 
@@ -932,7 +932,7 @@ void flic_cut(int16 nr) {
 	int16 i, ret = 0;
 	bool keepPlaying = true;
 
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(det)->disable_room_sound();
 	g_engine->_sound->stopAllSounds();
 	g_events->delay(50);
@@ -1190,7 +1190,7 @@ void flic_cut(int16 nr) {
 				SHOULD_QUIT_RETURN;
 
 				if (i == 0 || i == 1) {
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 				}
 			}
@@ -1658,11 +1658,11 @@ void flic_cut(int16 nr) {
 	}
 
 	if (!_G(flags).NoPalAfterFlc)
-		_G(out)->set_palette(_G(pal));
+		_G(out)->setPalette(_G(pal));
 
 	_G(atds)->stop_aad();
 	_G(atds)->stop_ats();
-	_G(out)->set_pointer(_G(workptr));
+	_G(out)->setPointer(_G(workptr));
 	_G(flags).NoPalAfterFlc = false;
 }
 
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 1493b6d78cf..9199282f459 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -30,9 +30,9 @@ namespace Rooms {
 
 void Room10::entry() {
 	if (!_G(spieler).R10Surimy) {
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index a16e3122c8c..82eee61c8df 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -85,7 +85,7 @@ int16 Room23::start_gleiter() {
 					_G(det)->stop_detail(i);
 
 				if (_G(spieler).R23GleiterExit == 14) {
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					_G(flags).NoPalAfterFlc = true;
 					flic_cut(FCUT_011);
@@ -104,7 +104,7 @@ int16 Room23::start_gleiter() {
 					_G(maus_links_click) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_SPACECHASE_18);
 					_G(spieler).R23GleiterExit = 25;
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index b9463092808..355060f5e0c 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -103,7 +103,7 @@ void Room28::entry(int16 eib_nr) {
 			case 77:
 				if (_G(spieler).R28PostCar) {
 					_G(spieler).R28PostCar = false;
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_063);
 					_G(spieler).R28ChewyPump = false;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 86612082a50..43a9322cc3a 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -182,7 +182,7 @@ int16 Room39::use_tv() {
 			_G(spieler).R39TvKanal = -1;
 
 		_G(flags).NoPalAfterFlc = true;
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_042);
 		++_G(spieler).R39TvKanal;
@@ -222,16 +222,16 @@ int16 Room39::use_tv() {
 			flic_cut(FCUT_041);
 			_G(spieler).R39TvKanal = 0;
 			_G(spieler).R39ClintNews = 0;
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
-			_G(out)->set_palette(_G(pal));
+			_G(out)->setPalette(_G(pal));
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(TV_FLIC[0]);
 
 			_G(out)->cls();
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
-			_G(out)->set_palette(_G(pal));
+			_G(out)->setPalette(_G(pal));
 			set_tv();
 			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
 			start_aad_wait(80, -1);
@@ -270,9 +270,9 @@ int16 Room39::use_tv() {
 
 	if (cls_flag) {
 		_G(out)->cls();
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
-		_G(out)->set_palette(_G(pal));
+		_G(out)->setPalette(_G(pal));
 		_G(flags).NoPalAfterFlc = false;
 	}
 
@@ -307,9 +307,9 @@ void Room39::look_tv(bool cls_mode) {
 			}
 
 			if (cls_mode) {
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
-				_G(out)->set_palette(_G(pal));
+				_G(out)->setPalette(_G(pal));
 				_G(flags).NoPalAfterFlc = true;
 			}
 
@@ -324,9 +324,9 @@ void Room39::look_tv(bool cls_mode) {
 
 			if (cls_mode) {
 				_G(out)->cls();
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
-				_G(out)->set_palette(_G(pal));
+				_G(out)->setPalette(_G(pal));
 				_G(flags).NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TransMensch && dia_nr == 85)
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 4c9e150ee3f..2e56048cf60 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -481,7 +481,7 @@ int16 Room40::use_haendler() {
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 				_G(flags).NoScroll = false;
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
 				switch_room(28);
 				_G(SetUpScreenFunc) = setup_func;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index ce6bfae117d..450bde8acc7 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -131,7 +131,7 @@ void Room46::bodo() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_VOR);
 	flic_cut(FCUT_065);
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	register_cutscene(16);
 	
@@ -154,7 +154,7 @@ void Room46::kloppe() {
 		_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_065);
 		_G(flc)->custom_play(&_G(Ci));
 		
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		start_aad(244 + i, -1);
 		int16 delay = _G(spieler).DelaySpeed * 50;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 1c633be61f7..aa12f92054f 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -46,7 +46,7 @@ void Room50::entry(int16 eib_nr) {
 		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
 		set_person_pos(92, 123, P_CHEWY, P_LEFT);
 		start_aad_wait(510, -1);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_108);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index d9a56230878..5257bbdac1e 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -170,7 +170,7 @@ void Room51::setup_func() {
 				start_aad_wait(514, -1);
 				wait_show_screen(5);
 				_G(flags).NoPalAfterFlc = true;
-				_G(out)->set_pointer(nullptr);
+				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
 				flic_cut(FCUT_115);
 				register_cutscene(28);
@@ -256,7 +256,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					start_aad_wait(290, -1);
 					g_engine->_sound->stopSound(0);
 					_G(out)->ausblenden(1);
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
 					_G(flags).NoPalAfterFlc = true;
@@ -282,7 +282,7 @@ int16 Room51::use_door(int16 txt_nr) {
 		case 331:
 		case 334:
 			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_114);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 94794b23e2a..ccc16798a8a 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -120,7 +120,7 @@ void Room56::entry() {
 				_G(atds)->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(spieler).room_e_obj[137].Attribut = 3;
 				if (_G(spieler).flags33_80) {
-					_G(out)->set_pointer(nullptr);
+					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_113);
 					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
@@ -160,19 +160,19 @@ void Room56::entry() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
 		_G(spieler).r88DestRoom = 82;
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_116);
 		register_cutscene(21);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
 		switch_room(66);
 		break;
 	case 2:
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_110);
 		_G(spieler).flags34_20 = true;
@@ -350,7 +350,7 @@ int16 Room56::use_kneipe() {
 		_G(maus_links_click) = false;
 		auto_move(4, P_CHEWY);
 		start_aad_wait(521, -1);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_112);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 6d3a2b58b82..3011220bdd4 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -196,7 +196,7 @@ int Room76::proc7() {
 		start_aad_wait(443, -1);
 		_G(spieler).scrollx = 0;
 		_G(fx_blend) = BLEND3;
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
 		_G(det)->set_static_ani(2, -1);
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index fe63d638a7b..67da2e4ee37 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -85,7 +85,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(6);
 		start_aad_wait(474, -1);
 		flic_cut(FCUT_090);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_091);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 1ca33173b47..ac09d3b35c0 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -191,7 +191,7 @@ void Room86::proc3(bool cond) {
 		set_up_screen(NO_SETUP);
 		_G(det)->set_static_pos(0, 352, destY, false, false);
 		destY += deltaY;
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->back2screen(_G(workpage));
 	}
 
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 4752453da76..ca23225de87 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -98,11 +98,11 @@ int Room88::proc3() {
 		hideCur();
 		if (_G(spieler).flags32_10) {
 			start_aad_wait(480, -1);
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_087);
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
 			switch_room(84);
@@ -120,7 +120,7 @@ int Room88::proc3() {
 			start_detail_wait(aniNr, 1, ANI_GO);
 		}
 
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_088);
@@ -130,7 +130,7 @@ int Room88::proc3() {
 		switch_room(80);
 		hideCur();
 		start_detail_wait(1, 1, ANI_VOR);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_086);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index b4b7b1d10fe..4ae86d65f98 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -59,11 +59,11 @@ void Room89::entry() {
 		_G(spieler).SVal2 = 537;
 		switch_room(92);
 		start_aad_wait(490, -1);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_103);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_118);
@@ -78,7 +78,7 @@ void Room89::entry() {
 		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
 		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
 		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_117);
@@ -86,7 +86,7 @@ void Room89::entry() {
 
 		_G(fx_blend) = BLEND3;
 		Room66::proc8(-1, 2, 3, 563);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_119);
@@ -98,17 +98,17 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
-			_G(out)->set_pointer(_G(workptr));
+			_G(out)->setPointer(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
 		}
 
 		// Unsquish out thanks for playing screen
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->cls();
 		// Those strings are also displayed in the the German version
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
@@ -120,10 +120,10 @@ void Room89::entry() {
 		for (int esi = 0; esi < 100; ++esi) {
 			edi += 3;
 			var30 += 2;
-			_G(out)->set_pointer(_G(workptr));
+			_G(out)->setPointer(_G(workptr));
 			_G(out)->cls();
 			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
 			SHOULD_QUIT_RETURN;
@@ -131,16 +131,16 @@ void Room89::entry() {
 
 		g_events->delay(3000);
 		_G(out)->ausblenden(2);
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->cls();
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 
 		Dialogs::Credits::execute();
 		
 		_G(spieler).SVal4 = 1;
 		_G(out)->ausblenden(2);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 	}
 
@@ -177,7 +177,7 @@ int Room89::proc2() {
 	_G(spieler).SVal2 = 489;
 	switch_room(92);
 	start_aad_wait(490, -1);
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_102);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index f81458ca584..687d30dc3c1 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -330,7 +330,7 @@ int Room90::useSurimyOnWreck() {
 	cur_2_inventory();
 	auto_move(6, P_CHEWY);
 	_G(maus_links_click) = false;
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	flic_cut(FCUT_109);
 	register_cutscene(29);
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 4e8c39282bf..8cc707eed92 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -37,11 +37,11 @@ void Room92::entry() {
 	start_aad_wait(_G(spieler).SVal2, -1);
 	switch (_G(spieler).SVal2) {
 	case 487:
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_103);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
 		show_person();
@@ -50,20 +50,20 @@ void Room92::entry() {
 	case 488:
 		_G(flags).StaticUseTxt = true;
 		flic_cut(FCUT_106);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_105);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_104);
 		register_cutscene(27);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_103);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
 		_G(spieler).flags33_8 = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index c438561c04a..ec638d64b2c 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -53,7 +53,7 @@ void Room94::entry() {
 		_G(spieler).scrollx = 0;
 		set_person_pos(156, 149, P_CHEWY, P_RIGHT);
 		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_120);
 		register_cutscene(30);
@@ -72,7 +72,7 @@ void Room94::entry() {
 		if (_G(spieler).flags37_40) {
 			_G(spieler).flags37_40 = true;
 			_G(flags).NoScroll = true;
-			_G(out)->set_pointer(nullptr);
+			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			flic_cut(FCUT_121);
 			register_cutscene(32);
@@ -133,7 +133,7 @@ int Room94::giveGhostBottle() {
 	auto_move(2, P_CHEWY);
 	auto_scroll(216, 0);
 	del_inventar(_G(spieler).AkInvent);
-	_G(out)->set_pointer(nullptr);
+	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_062);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 83482cb952b..65bf64f740c 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -107,7 +107,7 @@ int Room95::proc2() {
 	}
 
 	if (_G(spieler).flags35_20) {
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_133);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index f266743a36d..767631e65e9 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -106,7 +106,7 @@ void Room97::entry() {
 
 	if (_G(spieler).flags37_8) {
 		hideCur();
-		_G(out)->set_pointer(nullptr);
+		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 
 		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 799b283367b..8590e0ec9fd 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2177,7 +2177,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).scrolly = 0;
 
 		_G(room)->load_tgp(BUCH_START, &_G(room_blk), GBOOK_TGP, 0, GBOOK);
-		_G(out)->set_pointer(_G(workptr));
+		_G(out)->setPointer(_G(workptr));
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->back2screen(_G(workpage));
 


Commit: 3f5f2c0bbfbc0c325710b87c75cf86449da8c780
    https://github.com/scummvm/scummvm/commit/3f5f2c0bbfbc0c325710b87c75cf86449da8c780
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Allow rewinding of CFO videos

This functionality is used in cases such as the TV videos, which keep
looping until the current dialog is finished

Changed paths:
    engines/chewy/video/cfo_decoder.h


diff --git a/engines/chewy/video/cfo_decoder.h b/engines/chewy/video/cfo_decoder.h
index b7f08e784ef..77bcc78ac7c 100644
--- a/engines/chewy/video/cfo_decoder.h
+++ b/engines/chewy/video/cfo_decoder.h
@@ -49,9 +49,6 @@ private:
 
 		void readHeader() override;
 
-		bool isRewindable() const override { return false; }
-		bool rewind() override { return false; }
-
 		const ::Graphics::Surface *decodeNextFrame() override;
 
 	private:


Commit: b9aabf33533765a3cd4755ba3a00a01bb1430015
    https://github.com/scummvm/scummvm/commit/b9aabf33533765a3cd4755ba3a00a01bb1430015
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Switch the TV videos to the new video code

This also adds handling for rewindable videos, which keep looping
until the current dialog finishes. Furthermore, events are now
correctly pushed to the engine code

Changed paths:
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room39.h
    engines/chewy/types.h
    engines/chewy/video/video_player.cpp
    engines/chewy/video/video_player.h


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 30e8af6ecd0..88e41b4bb37 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -958,43 +958,6 @@ void flic_cut(int16 nr) {
 			_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 			break;
 
-		case FCUT_032:
-		case FCUT_034:
-		case FCUT_035:
-		case FCUT_036:
-		case FCUT_037:
-		case FCUT_040:
-			// TV
-			if (nr != FCUT_036)
-				_G(flc)->set_custom_user_function(Room39::setup_func);
-
-			do {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-				ret = _G(flc)->custom_play(&_G(Ci));			
-#else
-				ret = g_engine->_video->playVideo(nr) ? 0 : -1;
-#endif
-				SHOULD_QUIT_RETURN;
-			} while (_G(atds)->aad_get_status() != -1 && ret != -1);
-
-			if (nr != FCUT_036)
-				_G(flc)->remove_custom_user_function();
-			break;
-
-		case FCUT_038:
-		case FCUT_039:
-			// TV
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_custom_user_function(Room39::setup_func);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_custom_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
-
 		case FCUT_047:
 		case FCUT_048:
 #ifndef NEW_VIDEO_CODE
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 355060f5e0c..d3571c0e8b9 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -261,7 +261,7 @@ void Room28::set_pump() {
 			load_chewy_taf(CHEWY_PUMPKIN);
 			_G(spieler).R28ChewyPump = true;
 
-			if (_G(spieler).R39TransMensch) {
+			if (_G(spieler).R39TranslatorUsed) {
 				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 			} else {
 				_G(atds)->set_ats_str(209, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 43a9322cc3a..a1d9cd6d123 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -50,8 +50,6 @@ static const AniBlock ABLOCK29[2] = {
 	{ 9, 4, ANI_VOR, ANI_WAIT, 0 },
 };
 
-bool Room39::_flag;
-
 void Room39::entry() {
 	if (!_G(spieler).R41Einbruch) {
 		if (_G(spieler).R39HowardDa) {
@@ -197,7 +195,7 @@ int16 Room39::use_tv() {
 		set_tv();
 		cls_flag = true;
 
-		if (!_G(spieler).R39TransMensch) {
+		if (!_G(spieler).R39TranslatorUsed) {
 			ani_nr = CH_TALK11;
 			dia_nr = 78;
 		} else if (!_G(spieler).R39TvKanal && _G(spieler).R39ClintNews < 3) {
@@ -217,7 +215,7 @@ int16 Room39::use_tv() {
 		action_flag = true;
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
-			_G(spieler).R39TransMensch = true;
+			_G(spieler).R39TranslatorUsed = true;
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_041);
 			_G(spieler).R39TvKanal = 0;
@@ -248,7 +246,7 @@ int16 Room39::use_tv() {
 	} else if (is_cur_inventar(RECORDER_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 		action_flag = true;
 		if (_G(spieler).R39TvOn) {
-			if (_G(spieler).R39TransMensch) {
+			if (_G(spieler).R39TranslatorUsed) {
 				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
 				start_aad_wait(98, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
@@ -288,8 +286,6 @@ int16 Room39::use_tv() {
 }
 
 void Room39::look_tv(bool cls_mode) {
-	_flag = false;
-
 	if (_G(spieler).R39TvOn) {
 		if (!_G(flags).AutoAniPlay) {
 			_G(flags).AutoAniPlay = true;
@@ -313,11 +309,9 @@ void Room39::look_tv(bool cls_mode) {
 				_G(flags).NoPalAfterFlc = true;
 			}
 
-			if (_G(spieler).R39TransMensch) {
+			if (_G(spieler).R39TranslatorUsed) {
 				if (dia_nr != 85)
 					start_aad(dia_nr, -1);
-				else
-					_flag = true;
 			}
 
 			flic_cut(flic_nr);
@@ -329,7 +323,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(out)->setPalette(_G(pal));
 				_G(flags).NoPalAfterFlc = false;
 
-				if (_G(spieler).R39TransMensch && dia_nr == 85)
+				if (_G(spieler).R39TranslatorUsed && dia_nr == 85)
 					start_aad_wait(dia_nr, -1);
 			}
 		}
@@ -351,7 +345,7 @@ void Room39::set_tv() {
 			_G(det)->show_static_spr(_G(spieler).R39TvKanal + 4);
 		}
 
-		if (_G(spieler).R39TransMensch) {
+		if (_G(spieler).R39TranslatorUsed) {
 			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
 		} else {
 			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -359,40 +353,5 @@ void Room39::set_tv() {
 	}
 }
 
-int16 Room39::setup_func(int16 frame) {
-	int16 action_ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
-
-	if (_flag) {
-		switch (frame) {
-		case 121:
-			start_aad(599, -1);
-			break;
-		case 247:
-			start_aad(600, -1);
-			break;
-		case 267:
-			start_aad(601, 0);
-			break;
-		case 297:
-			_G(in)->_hotkey = 1;
-			break;
-		case 171:
-		case 266:
-		case 370:
-			_G(atds)->stop_aad();
-			break;
-		default:
-			break;
-		}
-	}
-
-	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
-
-	if (!_flag && _G(atds)->aad_get_status() == -1)
-		action_ret = -1;
-
-	return action_ret;
-}
-
 } // namespace Rooms
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
index 516dcc34f29..cf4d5597ce3 100644
--- a/engines/chewy/rooms/room39.h
+++ b/engines/chewy/rooms/room39.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room39 {
 private:
-	static bool _flag;
+	static bool _watchingGaspHorrorShow;
 
 	static void ok();
 	static void set_tv();
@@ -38,8 +38,6 @@ public:
 	static short use_howard();
 	static void talk_howard();
 	static void look_tv(bool cls_mode);
-
-	static int16 setup_func(int16 frame);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 9a0cbb4bc9e..7d753be66e0 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -172,7 +172,7 @@ struct SpielerFlags {
 	bool R37HundScham : 1;
 	bool R37Kloppe : 1;
 	bool R37Mes : 1;
-	bool R39TransMensch : 1;
+	bool R39TranslatorUsed : 1;
 	bool R39TvOn : 1;
 	bool R39ScriptOk : 1;
 
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index d95b787d7f8..bdb91ca8d6a 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -21,6 +21,7 @@
 
 #include "chewy/video/cfo_decoder.h"
 #include "chewy/video/video_player.h"
+#include "chewy/events.h"
 #include "chewy/globals.h"
 #include "chewy/resource.h"
 #include "chewy/sound.h"
@@ -71,26 +72,30 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 				byte *destP = (byte *)g_screen->getPixels();
 				Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
 				g_screen->markAllDirty();
-				keepPlaying = handleCustom(num, curFrame);
-				curFrame = cfoDecoder->getCurFrame();
 
 				if (cfoDecoder->hasDirtyPalette())
 					g_system->getPaletteManager()->setPalette(cfoDecoder->getPalette(), 0, 256);
 					//setScummVMPalette(cfoDecoder->getPalette(), 0, 256);
 
+				keepPlaying = handleCustom(num, curFrame, cfoDecoder);
+				curFrame = cfoDecoder->getCurFrame();
+				
 				g_screen->update();
 			}
 		}
 
-		while (g_system->getEventManager()->pollEvent(event)) {
-			// FIXME: We ignore mouse events because the game checks
-			// for left mouse down, instead of up, so releasing the
-			// mouse button results in video skipping
-			if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) /*|| event.type == Common::EVENT_LBUTTONUP*/)
-				skipVideo = true;
-		}
+		g_events->update();
 
-		g_system->delayMillis(10);
+		// FIXME: We ignore mouse events because the game checks
+		// for left mouse down, instead of up, so releasing the
+		// mouse button results in video skipping
+		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
+			skipVideo = true;
+
+		// Clear any pending keys
+		_G(in)->_hotkey = 0;
+		_G(kbinfo).key_code = '\0';
+		_G(kbinfo).scan_code = 0;
 	}
 
 	cfoDecoder->close();
@@ -105,7 +110,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 	return !skipVideo;
 }
 
-bool VideoPlayer::handleCustom(uint num, uint frame) {
+bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 	switch (num) {
 	case FCUT_004:
 		// Room6::cut_serv1
@@ -134,11 +139,52 @@ bool VideoPlayer::handleCustom(uint num, uint frame) {
 				start_aad(106, 0);
 		}
 		break;
+	case FCUT_032:
+	case FCUT_034:
+	case FCUT_035:
+	case FCUT_036:
+	case FCUT_037:
+	case FCUT_038:
+	case FCUT_039:
+	case FCUT_040:
+		// Room39::setup_func
+		if (!_G(spieler).R39TranslatorUsed)
+			return false;
+
+		if (num == FCUT_034) {
+			switch (frame) {
+			case 121:
+				start_aad(599, -1);
+				break;
+			case 247:
+				start_aad(600, -1);
+				break;
+			case 267:
+				start_aad(601, 0);
+				break;
+			case 297:
+				_G(in)->_hotkey = 1;
+				break;
+			case 171:
+			case 266:
+			case 370:
+				_G(atds)->stop_aad();
+				break;
+			default:
+				break;
+			}
+		}
+
+		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+
+		if (cfoDecoder->endOfVideo() && _G(atds)->aad_get_status() != -1)
+			cfoDecoder->rewind();
+		break;
 	case FCUT_094:
-		//Room87::proc3
+		// Room87::proc3
 		return (frame >= 12) ? false : true;
 	case FCUT_112:
-		//Room56::proc1
+		// Room56::proc1
 		return (_G(in)->get_switch_code() == 1) ? false : true;
 	default:
 		return true;
diff --git a/engines/chewy/video/video_player.h b/engines/chewy/video/video_player.h
index c6e5d138e7b..e71e9435753 100644
--- a/engines/chewy/video/video_player.h
+++ b/engines/chewy/video/video_player.h
@@ -24,17 +24,20 @@
 
 namespace Chewy {
 
+class CfoDecoder;
+
 class VideoPlayer {
 public:
 	/**
 	 * @Plays a video file
 	 * @param num - the video file number
+	 * @param stopMusic - stop music before starting the video
 	 * @return - true if played, false if skipped
 	*/
 	bool playVideo(uint num, bool stopMusic = true);
 
 private:
-	bool handleCustom(uint num, uint frame);
+	bool handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder);
 };
 
 } // End of namespace Chewy


Commit: 3a8e151d93ef2c11c924b60930a23e4d60fbb6fb
    https://github.com/scummvm/scummvm/commit/3a8e151d93ef2c11c924b60930a23e4d60fbb6fb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Cleanup of the TV video code

Changed paths:
    engines/chewy/rooms/room39.h
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/rooms/room39.h b/engines/chewy/rooms/room39.h
index cf4d5597ce3..3544a4efdd3 100644
--- a/engines/chewy/rooms/room39.h
+++ b/engines/chewy/rooms/room39.h
@@ -27,8 +27,6 @@ namespace Rooms {
 
 class Room39 {
 private:
-	static bool _watchingGaspHorrorShow;
-
 	static void ok();
 	static void set_tv();
 
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index bdb91ca8d6a..0ba12e88027 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -140,7 +140,6 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		}
 		break;
 	case FCUT_032:
-	case FCUT_034:
 	case FCUT_035:
 	case FCUT_036:
 	case FCUT_037:
@@ -151,35 +150,40 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		if (!_G(spieler).R39TranslatorUsed)
 			return false;
 
-		if (num == FCUT_034) {
-			switch (frame) {
-			case 121:
-				start_aad(599, -1);
-				break;
-			case 247:
-				start_aad(600, -1);
-				break;
-			case 267:
-				start_aad(601, 0);
-				break;
-			case 297:
-				_G(in)->_hotkey = 1;
-				break;
-			case 171:
-			case 266:
-			case 370:
-				_G(atds)->stop_aad();
-				break;
-			default:
-				break;
-			}
-		}
-
 		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 
 		if (cfoDecoder->endOfVideo() && _G(atds)->aad_get_status() != -1)
 			cfoDecoder->rewind();
 		break;
+	case FCUT_034:
+		// Room39::setup_func
+		if (!_G(spieler).R39TranslatorUsed)
+			return false;
+
+		switch (frame) {
+		case 121:
+			start_aad(599, -1);
+			break;
+		case 247:
+			start_aad(600, -1);
+			break;
+		case 267:
+			start_aad(601, 0);
+			break;
+		case 297:
+			_G(in)->_hotkey = 1;
+			break;
+		case 171:
+		case 266:
+		case 370:
+			_G(atds)->stop_aad();
+			break;
+		default:
+			break;
+		}
+
+		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+		break;
 	case FCUT_094:
 		// Room87::proc3
 		return (frame >= 12) ? false : true;


Commit: b3fc15feebba44373b8da599f1347f530922442c
    https://github.com/scummvm/scummvm/commit/b3fc15feebba44373b8da599f1347f530922442c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Some renaming

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/cursor.cpp
    engines/chewy/cursor.h
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/events.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/ngstypes.h
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 6bc060a05de..4dd3804974e 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -112,7 +112,7 @@ Atdsys::Atdsys() {
 		_ssi[i] = init_ssi;
 	_invBlockNr = -1;
 	_invUseMem = nullptr;
-	_inzeig = _G(in)->get_in_zeiger();
+	_inzeig = _G(in)->getPointer();
 }
 
 Atdsys::~Atdsys() {
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index da66bc0ae87..12329bee153 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -30,23 +30,22 @@ Cursor::Cursor(McgaGraphics *iout, InputMgr *iin, CurBlk *curblkp) {
 	_in = iin;
 	_scrWidth = _G(scr_w);
 	_curblk = curblkp;
-	_inzeig = _in->get_in_zeiger();
+	_pointer = _in->getPointer();
 
-	_maus_da = true;
-	_sichtbar = false;
+	_visible = false;
 	_ani = nullptr;
-	_cur_aufruf = false;
-	_ani_count = false;
+	_curAniCountdown = 0;
+	_aniCount = 0;
 }
 
 Cursor::~Cursor() {
 }
 
 void Cursor::plot_cur() {
-	if (_maus_da && _sichtbar) {
-		if (cur_move) {
+	if (_visible) {
+		if (_cursorMoveFl) {
 			mouse_active = true;
-			cur_move = false;
+			_cursorMoveFl = false;
 			if (!_curblk->no_back) {
 
 				_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
@@ -60,23 +59,23 @@ void Cursor::plot_cur() {
 			_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
 		}
 
-		_cur_aufruf -= 1;
-		if ((_cur_aufruf <= 0) && (_ani != nullptr)) {
-			_cur_aufruf = _ani->delay;
-			++_ani_count;
-			if (_ani_count > _ani->ani_end)
-				_ani_count = _ani->ani_anf;
+		--_curAniCountdown;
+		if (_curAniCountdown <= 0 && _ani != nullptr) {
+			_curAniCountdown = _ani->_delay;
+			++_aniCount;
+			if (_aniCount > _ani->_end)
+				_aniCount = _ani->_start;
 		}
 
-		_out->sprite_set(_curblk->sprite[_ani_count], _cur_x_old, _cur_y_old,
+		_out->sprite_set(_curblk->sprite[_aniCount], _cur_x_old, _cur_y_old,
 		                 _scrWidth);
 		mouse_active = false;
 	}
 }
 
 void Cursor::show_cur() {
-	if ((_maus_da) && (!_sichtbar)) {
-		_sichtbar = true;
+	if (!_visible) {
+		_visible = true;
 		mouse_active = true;
 
 		_G(minfo).x = g_events->_mousePos.x;
@@ -90,41 +89,39 @@ void Cursor::show_cur() {
 
 		_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
 		_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
-		cur_move = true;
+		_cursorMoveFl = true;
 		plot_cur();
 	}
 }
 
 void Cursor::hide_cur() {
-	if ((_maus_da) && (_sichtbar)) {
+	if (_visible) {
 		if (!_curblk->no_back) {
 			_out->blockcopy(_curblk->cur_back, _cur_x_old, _cur_y_old, _scrWidth);
 		}
-		_sichtbar = false;
+		_visible = false;
 	}
 }
 
 void Cursor::set_cur_ani(CurAni *ani1) {
 	_ani = ani1;
-	_cur_aufruf = 0;
-	_ani_count = _ani->ani_anf;
+	_curAniCountdown = 0;
+	_aniCount = _ani->_start;
 }
 
 void Cursor::move(int16 x, int16 y) {
-	if (_maus_da) {
-		mouse_active = true;
-
-		_G(minfo).x = x;
-		_G(minfo).y = y;
-		_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
-		_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
-		_in->move_mouse(x, y);
-		if (_sichtbar)
-			cur_move = true;
-		else
-			cur_move = false;
-		mouse_active = false;
-	}
+	mouse_active = true;
+
+	_G(minfo).x = x;
+	_G(minfo).y = y;
+	_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
+	_cur_y_old = (_G(minfo).y + _curblk->page_off_y);
+	_in->setMousePos(x, y);
+	if (_visible)
+		_cursorMoveFl = true;
+	else
+		_cursorMoveFl = false;
+	mouse_active = false;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index 4807f5d7085..0a760af1f8d 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -42,16 +42,15 @@ public:
 
 	McgaGraphics *_out = nullptr;
 	InputMgr *_in = nullptr;
-	KbdMouseInfo *_inzeig = nullptr;
+	KbdMouseInfo *_pointer = nullptr;
 	CurBlk *_curblk = nullptr;
 	CurAni *_ani = nullptr;
 	int _scrWidth = 0;
 	int16 _cur_x_old = 0;
 	int16 _cur_y_old = 0;
-	int16 _cur_aufruf = 0;
-	int16 _ani_count = 0;
-	uint8 _maus_da = 0;
-	bool _sichtbar = false;
+	int16 _curAniCountdown = 0;
+	int16 _aniCount = 0;
+	bool _visible = false;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index df078a0d733..f9f86619268 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -660,7 +660,7 @@ void Inventory::showDiary() {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
-	while (_G(in)->get_switch_code() != 0) {
+	while (_G(in)->get_switch_code() != Common::KEYCODE_INVALID) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index b3042d60b1f..9220f79eb99 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -115,8 +115,8 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 	}
 
 	// Set mouse position
-	if (!cur_move) {
-		cur_move = true;
+	if (!_cursorMoveFl) {
+		_cursorMoveFl = true;
 		_G(minfo).x = event.mouse.x;
 		_G(minfo).y = event.mouse.y;
 	}
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index fcdbc90123b..b053e759473 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -69,9 +69,9 @@ void standard_init() {
 	_G(curblk).sprite = _G(curtaf)->image;
 	_G(curblk).cur_back = _G(cur_back);
 	_G(curblk).no_back = true;
-	_G(curani).ani_anf = 0;
-	_G(curani).ani_end = 0;
-	_G(curani).delay = 0;
+	_G(curani)._start = 0;
+	_G(curani)._end = 0;
+	_G(curani)._delay = 0;
 	
 	_G(cur) = new Cursor(_G(out), _G(in), &_G(curblk));
 	_G(cur)->set_cur_ani(&_G(curani));
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 0c2f7555fa8..cc65f694ca6 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -104,109 +104,109 @@ void cursorChoice(int16 nr) {
 	int16 ok = true;
 	if (nr != CUR_USER) {
 		_G(curblk).sprite = _G(curtaf)->image;
-		_G(curani).delay = (1 + _G(spieler).DelaySpeed) * 5;
+		_G(curani)._delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
 	case CUR_WALK:
-		_G(curani).ani_anf = 0;
-		_G(curani).ani_end = 3;
+		_G(curani)._start = 0;
+		_G(curani)._end = 3;
 		break;
 
 	case CUR_NO_WALK:
-		_G(curani).ani_anf = 8;
-		_G(curani).ani_end = 8;
+		_G(curani)._start = 8;
+		_G(curani)._end = 8;
 		break;
 
 	case CUR_USE:
-		_G(curani).ani_anf = 4;
-		_G(curani).ani_end = 7;
+		_G(curani)._start = 4;
+		_G(curani)._end = 7;
 		break;
 
 	case CUR_NO_USE:
-		_G(curani).ani_anf = 4;
-		_G(curani).ani_end = 4;
+		_G(curani)._start = 4;
+		_G(curani)._end = 4;
 		break;
 
 	case CUR_NOPE:
-		_G(curani).ani_anf = 9;
-		_G(curani).ani_end = 12;
+		_G(curani)._start = 9;
+		_G(curani)._end = 12;
 		break;
 
 	case CUR_LOOK:
-		_G(curani).ani_anf = 13;
-		_G(curani).ani_end = 16;
+		_G(curani)._start = 13;
+		_G(curani)._end = 16;
 		break;
 
 	case CUR_NO_LOOK:
-		_G(curani).ani_anf = 16;
-		_G(curani).ani_end = 16;
+		_G(curani)._start = 16;
+		_G(curani)._end = 16;
 		break;
 
 	case CUR_TALK:
-		_G(curani).ani_anf = 17;
-		_G(curani).ani_end = 20;
+		_G(curani)._start = 17;
+		_G(curani)._end = 20;
 		break;
 
 	case CUR_NO_TALK:
-		_G(curani).ani_anf = 17;
-		_G(curani).ani_end = 17;
+		_G(curani)._start = 17;
+		_G(curani)._end = 17;
 		break;
 
 	case CUR_INVENT:
-		_G(curani).ani_anf = 21;
-		_G(curani).ani_end = 24;
+		_G(curani)._start = 21;
+		_G(curani)._end = 24;
 		break;
 
 	case CUR_AK_INVENT:
-		_G(curani).ani_anf = _G(spieler).AkInvent;
-		_G(curani).ani_end = _G(spieler).AkInvent;
+		_G(curani)._start = _G(spieler).AkInvent;
+		_G(curani)._end = _G(spieler).AkInvent;
 		_G(curblk).sprite = &_G(inv_spr)[0];
 		_G(spieler).inv_cur = true;
 		break;
 
 	case CUR_SAVE:
-		_G(curani).ani_anf = 25;
-		_G(curani).ani_end = 25;
+		_G(curani)._start = 25;
+		_G(curani)._end = 25;
 		break;
 
 	case CUR_AUSGANG_LINKS:
-		_G(curani).ani_anf = AUSGANG_LINKS_SPR;
-		_G(curani).ani_end = AUSGANG_LINKS_SPR;
+		_G(curani)._start = AUSGANG_LINKS_SPR;
+		_G(curani)._end = AUSGANG_LINKS_SPR;
 		break;
 
 	case CUR_AUSGANG_RECHTS:
-		_G(curani).ani_anf = AUSGANG_RECHTS_SPR;
-		_G(curani).ani_end = AUSGANG_RECHTS_SPR;
+		_G(curani)._start = AUSGANG_RECHTS_SPR;
+		_G(curani)._end = AUSGANG_RECHTS_SPR;
 		break;
 
 	case CUR_AUSGANG_OBEN:
-		_G(curani).ani_anf = AUSGANG_OBEN_SPR;
-		_G(curani).ani_end = AUSGANG_OBEN_SPR;
+		_G(curani)._start = AUSGANG_OBEN_SPR;
+		_G(curani)._end = AUSGANG_OBEN_SPR;
 		break;
 
 	case CUR_AUSGANG_UNTEN:
-		_G(curani).ani_anf = AUSGANG_UNTEN_SPR;
-		_G(curani).ani_end = AUSGANG_UNTEN_SPR;
+		_G(curani)._start = AUSGANG_UNTEN_SPR;
+		_G(curani)._end = AUSGANG_UNTEN_SPR;
 		break;
 
 	case CUR_DISK:
-		_G(curani).ani_anf = 30;
-		_G(curani).ani_end = 30;
+		_G(curani)._start = 30;
+		_G(curani)._end = 30;
 		break;
 
 	case CUR_HOWARD:
-		_G(curani).ani_anf = 31;
-		_G(curani).ani_end = 31;
+		_G(curani)._start = 31;
+		_G(curani)._end = 31;
 		break;
 
 	case CUR_NICHELLE:
-		_G(curani).ani_anf = 37;
-		_G(curani).ani_end = 37;
+		_G(curani)._start = 37;
+		_G(curani)._end = 37;
 		break;
 
 	case CUR_ZEIGE:
-		_G(curani).ani_anf = 9;
-		_G(curani).ani_end = 9;
+		_G(curani)._start = 9;
+		_G(curani)._end = 9;
 		break;
 	case CUR_USER:
 
@@ -218,10 +218,10 @@ void cursorChoice(int16 nr) {
 	}
 
 	if (ok) {
-		cur_move = true;
+		_cursorMoveFl = true;
 		_G(cur)->set_cur_ani(&_G(curani));
-		_G(spieler)._curWidth = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf]);
-		_G(spieler)._curHeight = READ_LE_INT16(_G(curblk).sprite[_G(curani).ani_anf] + 2);
+		_G(spieler)._curWidth = READ_LE_INT16(_G(curblk).sprite[_G(curani)._start]);
+		_G(spieler)._curHeight = READ_LE_INT16(_G(curblk).sprite[_G(curani)._start] + 2);
 	}
 }
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 8f0a14ac0a6..37f250c2a00 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -31,7 +31,7 @@ bool mouse_links_los;
 bool mouse_active;
 // end of externals
 
-bool cur_move;
+bool _cursorMoveFl;
 
 
 void set_new_kb_handler(KbdInfo *key) {
@@ -49,7 +49,7 @@ InputMgr::InputMgr() {
 InputMgr::~InputMgr() {
 }
 
-void InputMgr::move_mouse(int16 x, int16 y) {
+void InputMgr::setMousePos(int16 x, int16 y) {
 	g_events->warpMouse(Common::Point(x, y));
 }
 
@@ -79,7 +79,7 @@ void InputMgr::alter_kb_handler() {
 #endif
 }
 
-KbdMouseInfo *InputMgr::get_in_zeiger() {
+KbdMouseInfo *InputMgr::getPointer() {
 	_inzeig.kbinfo = _kbInfoBlk;
 
 	return &_inzeig;
@@ -95,13 +95,12 @@ int16 InputMgr::get_switch_code() {
 	else if (_G(minfo).button == 4)
 		switch_code = 254;
 
-	if (_kbInfoBlk)
-		if (_kbInfoBlk->key_code != 0)
-			switch_code = (int16)_kbInfoBlk->key_code;
+	if (_kbInfoBlk && _kbInfoBlk->key_code != 0)
+		switch_code = (int16)_kbInfoBlk->key_code;
 
-	if (_hotkey != 0) {
-		switch_code = (int16)_hotkey;
-		_hotkey = 0;
+	if (_hotkey != Common::KEYCODE_INVALID) {
+		switch_code = _hotkey;
+		_hotkey = Common::KEYCODE_INVALID;
 	}
 
 	return switch_code;
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 8072dbbd68a..713455a27b0 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -37,16 +37,16 @@ public:
 	InputMgr();
 	~InputMgr();
 
-	void move_mouse(int16 x, int16 y);
+	void setMousePos(int16 x, int16 y);
 
 	void neuer_kb_handler(KbdInfo *key);
 	void alter_kb_handler();
 	int16 mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
-	KbdMouseInfo *get_in_zeiger();
+	KbdMouseInfo *getPointer();
 	int16 get_switch_code();
 
-	int16 _hotkey = 0;
+	int16 _hotkey = Common::KEYCODE_INVALID;
 
 private:
 	KbdInfo *_kbInfoBlk = nullptr;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index d212ed7dd88..6064fa943fd 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -209,9 +209,9 @@ struct CurBlk {
 };
 
 struct CurAni {
-	uint8 ani_anf = 0;
-	uint8 ani_end = 0;
-	int16 delay = 0;
+	uint8 _start = 0;
+	uint8 _end = 0;
+	int16 _delay = 0;
 };
 
 struct FCurBlk {
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index be7cf043392..c6d206c4517 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -95,11 +95,11 @@ int16 Room4::sonde_comp() {
 		_G(spr_info)[0].Y = CUR_POS[cur_x][1];
 
 		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
-			_G(curani).ani_anf = HAND_CLICK;
-			_G(curani).ani_end = HAND_CLICK;
+			_G(curani)._start = HAND_CLICK;
+			_G(curani)._end = HAND_CLICK;
 		} else {
-			_G(curani).ani_anf = HAND_NORMAL;
-			_G(curani).ani_end = HAND_NORMAL;
+			_G(curani)._start = HAND_NORMAL;
+			_G(curani)._end = HAND_NORMAL;
 		}
 		cursorChoice(CUR_USER);
 		_G(spieler)._curHeight = 16;
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 9588b5964f4..cd42c7b7145 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -42,8 +42,8 @@ void Room24::entry() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	_G(curblk).sprite = _G(room_blk).DetImage;
-	_G(curani).ani_anf = 7;
-	_G(curani).ani_end = 10;
+	_G(curani)._start = 7;
+	_G(curani)._end = 10;
 	_G(menu_item) = CUR_USER;
 	cursorChoice(CUR_USER);
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 450bde8acc7..010d719f447 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -165,7 +165,7 @@ void Room46::kloppe() {
 			continue;
 		}
 		
-		while (_G(in)->get_switch_code() == 0 && delay) {
+		while (_G(in)->get_switch_code() == Common::KEYCODE_INVALID && delay) {
 			--delay;
 			SHOULD_QUIT_RETURN;
 		}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 8590e0ec9fd..68f53ec9b5d 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2185,7 +2185,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}
-		while (_G(in)->get_switch_code() != 0) {
+		while (_G(in)->get_switch_code() != Common::KEYCODE_INVALID) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}


Commit: f3baadd733124a76c03843fc7fdccb04897fc1d7
    https://github.com/scummvm/scummvm/commit/f3baadd733124a76c03843fc7fdccb04897fc1d7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:45-08:00

Commit Message:
CHEWY: Fix shooting dolls cutscene in room 94

Changed paths:
    engines/chewy/rooms/room94.cpp


diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index ec638d64b2c..4698d834ba5 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -48,6 +48,7 @@ void Room94::entry() {
 		return;
 
 	if (_G(spieler).flags35_8) {
+		// Initial arrival at Ghost Town
 		_G(zoom_horizont) = 140;
 		_G(spieler).flags35_8 = false;
 		_G(spieler).scrollx = 0;
@@ -65,11 +66,13 @@ void Room94::entry() {
 	}
 
 	if (_G(spieler).flags35_40) {
+		// Ghost shooting dolls during initial arrival
 		set_person_pos(373, 122, P_CHEWY, P_LEFT);
 		set_person_pos(393, 94, P_HOWARD, P_LEFT);
 		_G(spieler).flags35_40 = false;
 		_G(spieler).scrollx = 150;
-		if (_G(spieler).flags37_40) {
+
+		if (!_G(spieler).flags37_40) {
 			_G(spieler).flags37_40 = true;
 			_G(flags).NoScroll = true;
 			_G(out)->setPointer(nullptr);
@@ -84,6 +87,7 @@ void Room94::entry() {
 			_G(flags).NoScroll = false;
 		}
 	} else {
+		// Normal scene entry after having dealt with Ghost
 		hideCur();
 		_G(spieler).scrollx = 120;
 		set_person_pos(255, 86, P_HOWARD, P_LEFT);


Commit: 5c6b2587163b7b2172264ffb545a32965c6d0c32
    https://github.com/scummvm/scummvm/commit/5c6b2587163b7b2172264ffb545a32965c6d0c32
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Room 56 entry cleanup

Changed paths:
    engines/chewy/rooms/room56.cpp


diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index ccc16798a8a..92ed79bf9bb 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -33,8 +33,9 @@ void Room56::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
-	int esi = 0; //TODO: rename this variable
 	_G(spieler_mi)[P_HOWARD].Mode = true;
+	int mode = 0;
+
 	if (_G(spieler).flags32_10) {
 		_G(det)->show_static_spr(10);
 		_G(room)->set_timer_status(0, TIMER_STOP);
@@ -102,7 +103,7 @@ void Room56::entry() {
 			start_aad_wait(306, -1);
 			showCur();
 			flic_cut(FCUT_076);
-			esi = 1;
+			mode = 1;
 			cur_2_inventory();
 			remove_inventory(56);
 			remove_inventory(66);
@@ -113,7 +114,7 @@ void Room56::entry() {
 		} else if (_G(spieler).flags32_10) {
 			if (!_G(spieler).flags34_8) {
 				_G(spieler).flags34_8 = true;
-				esi = 2;
+				mode = 2;
 			} else if (_G(spieler).flags34_40) {
 				_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
 				_G(atds)->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATEI);
@@ -128,7 +129,7 @@ void Room56::entry() {
 					_G(spieler).mi[P_HOWARD] = 0;
 					_G(spieler).SVal2 = 0;
 					_G(spieler).flags35_2 = true;
-					esi = 3;
+					mode = 3;
 				} else {
 					hideCur();
 					_G(spieler).scrollx = _G(spieler).scrolly = 0;
@@ -145,17 +146,18 @@ void Room56::entry() {
 				}
 				showCur();
 			} else {
-				esi = 2;
+				mode = 2;
 			}
 		}
 	}
+
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(zoom_horizont) = 114;
 	_G(room)->set_zoom(70);
 
-	switch(esi) {
+	switch(mode) {
 	case 1:
 		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;


Commit: eddb5b6db80906d135ddbbe4f7c032e376aa7b35
    https://github.com/scummvm/scummvm/commit/eddb5b6db80906d135ddbbe4f7c032e376aa7b35
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Fix Howard zooming when entering room 56

Changed paths:
    engines/chewy/rooms/room56.cpp


diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 92ed79bf9bb..faf31df6acf 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -138,7 +138,7 @@ void Room56::entry() {
 					set_person_pos(3, 42, P_CHEWY, P_RIGHT);
 					_G(room)->set_zoom(23);
 					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
-					_G(spieler).ZoomXy[P_HOWARD][0] = 37;
+					_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 					_G(SetUpScreenFunc) = setup_func;
 					_G(spieler_mi)[P_CHEWY].Mode = true;
 					auto_move(1, P_CHEWY);


Commit: da2905f8fe5fc272d3a5be426a9cd6f2365924da
    https://github.com/scummvm/scummvm/commit/da2905f8fe5fc272d3a5be426a9cd6f2365924da
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Add enums for the cinema videos

Changed paths:
    engines/chewy/dialogs/cinema.cpp


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 36d22f228d6..b14605ad678 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -38,9 +38,13 @@ static const int16 CINEMA_TBL[4 * 3] = {
 };
 
 static const uint8 CINEMA_FLICS[35] = {
-	0, 2, 6, 9, 15, 12, 11, 18, 3, 48, 31, 44,
-	55, 58, 45, 65, 67, 68, 69, 80, 74, 83, 84, 88,
-	93, 87, 106, 108, 107, 113, 110, 121, 123, 122, 117
+	FCUT_000, FCUT_002, FCUT_006, FCUT_009, FCUT_015,
+	FCUT_012, FCUT_011, FCUT_SPACECHASE_18, FCUT_003, FCUT_048,
+	FCUT_031, FCUT_044, FCUT_055, FCUT_058, FCUT_045,
+	FCUT_065, FCUT_067, FCUT_068, FCUT_069, FCUT_080,
+	FCUT_074, FCUT_083, FCUT_084, FCUT_088, FCUT_093,
+	FCUT_087, FCUT_106, FCUT_108, FCUT_107, FCUT_113,
+	FCUT_110, FCUT_121, FCUT_123, FCUT_122, FCUT_117
 };
 
 void Cinema::execute() {


Commit: c8fa3c2538627dd8ee519de33bf3744d6bbd78a8
    https://github.com/scummvm/scummvm/commit/c8fa3c2538627dd8ee519de33bf3744d6bbd78a8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Remove special video cases for video IDs over 1000

These are unused throughout the engine, and are probably a leftover

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 88e41b4bb37..d894dd2df7f 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -906,29 +906,7 @@ void flic_cut(int16 nr) {
 		FCUT_128, FCUT_129, FCUT_130, FCUT_131, FCUT_132,
 		FCUT_133, FCUT_127, FCUT_158
 	};
-	static const int16 FLIC_CUT_1045[] = {
-		FCUT_030, FCUT_047, FCUT_041, FCUT_034, FCUT_045,
-		FCUT_052, FCUT_053, FCUT_057, FCUT_064, FCUT_063,
-		FCUT_062
-	};
-	static const int16 FLIC_CUT_1074[] = {
-		FCUT_073, FCUT_114, FCUT_074, FCUT_075
-	};
-	static const int16 FLIC_CUT_1080[] = {
-		FCUT_080, FCUT_078, FCUT_077, FCUT_081, FCUT_082,
-		FCUT_079, FCUT_076, FCUT_116
-	};
-	static const int16 FLIC_CUT_1093[] = {
-		FCUT_093, FCUT_094, FCUT_095, FCUT_096, FCUT_097,
-		FCUT_098, FCUT_099, FCUT_100, FCUT_092, FCUT_090,
-		FCUT_091, FCUT_089
-	};
-	static const int16 FLIC_CUT_1106[] = {
-		FCUT_106, FCUT_105, FCUT_104
-	};
-	static const int16 FLIC_CUT_1113[] = {
-		FCUT_113, FCUT_106, FCUT_103, FCUT_118, FCUT_120
-	};
+
 	int16 i, ret = 0;
 	bool keepPlaying = true;
 
@@ -1174,429 +1152,8 @@ void flic_cut(int16 nr) {
 #endif
 			break;
 
-		case 1003:
-			_G(fx)->border(_G(workpage), 100, 0, 0);
-			print_rows(590);
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, 1);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_000);
-#endif
-
-			if (ret != -1) {
-				for (i = 0; i < 3 && ret != -1; ++i) {
-					_G(fx)->border(_G(workpage), 100, 0, 0);
-					print_rows(591);
-#ifndef NEW_VIDEO_CODE
-					_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 3);
-					ret = _G(flc)->custom_play(&_G(Ci));
-					SHOULD_QUIT_RETURN;
-#else
-					g_engine->_video->playVideo(i + 3);
-#endif
-				}
-			}
-			break;
-
-		case 1006:
-			for (i = 0; i < 3 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 6);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + 6);
-#endif
-			}
-			break;
-
-		case 1009:
-			for (i = 0; i < 2; ++i) {
-				g_engine->_video->playVideo(i + 9);
-				SHOULD_QUIT_RETURN;
-			}
-			break;
-
-		case 1012:
-			for (i = 0; i < 3 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				SHOULD_QUIT_RETURN;
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 12);
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				ret = _G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(i + 12);
-#endif
-			}
-
-#ifndef NEW_VIDEO_CODE
-			if (ret == 0) {
-				_G(out)->cls();
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_017);
-				_G(flc)->custom_play(&_G(Ci));
-			}
-#else
-			_G(out)->cls();
-			g_engine->_video->playVideo(17);
-#endif
-			break;
-
-		case 1015:
-			for (i = 0; i < 2 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 15);
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + 15);
-#endif
-			}
-			break;
-
-		case 1045:
-			for (i = 0; i < 11 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				print_rows(594);
-				if (FLIC_CUT_1045[i] == 53) {
-					_G(sndPlayer)->stopMod();
-					_G(currentSong) = -1;
-					load_room_music(256);
-				}
-
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1045[i]);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FLIC_CUT_1045[i]);
-#endif
-
-				if (FLIC_CUT_1045[i] == 53) {
-					_G(sndPlayer)->stopMod();
-				}
-			}
-			break;
-
-		case 1031:
-			g_engine->_video->playVideo(FCUT_031);
-
-			if (ret != -1) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_043);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_043);
-#endif
-			}
-			break;
-
-		case 1048:
-			ret = g_engine->_video->playVideo(FCUT_050) ? 0 : -1;
-
-			if (ret != -1) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_048);
-				ret = _G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_048);
-#endif
-			}
-			if (ret != -1)
-				ret = g_engine->_video->playVideo(FCUT_049) ? 0 : -1;
-
-#ifndef NEW_VIDEO_CODE
-			if (ret != -1) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				ret = _G(flc)->custom_play(&_G(Ci));
-			}
-			if (ret != -1) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 54);
-			}
-#else
-			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->_video->playVideo(nr);
-#endif
-			break;
-
-		case 1055:
-			for (i = 0; i < 2 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 55);
-				ret = _G(flc)->custom_play(&_G(Ci)) ? 0 : -1;
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + 55);
-#endif
-			}
-
-			if (ret != -1) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, 46);
-#endif
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-			}
-			break;
-
-		case 1058:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
-			load_room_music(255);
-			ret = g_engine->_video->playVideo(FCUT_058) ? 0 : -1;
-
-			if (ret != -1)
-				ret = g_engine->_video->playVideo(FCUT_059) ? 0 : -1;
-
-			if (ret != -1)
-				ret = g_engine->_video->playVideo(FCUT_060) ? 0 : -1;
-
-			if (ret != -1) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_061);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_061);
-#endif
-			}
-			if (ret != -1) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_062);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_062);
-#endif
-			}
-			break;
-
-		case 1065:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
-			load_room_music(256);
-
-			for (i = 0; i < 2 && ret != -1; ++i) {
-				ret = g_engine->_video->playVideo(i + 65, false) ? 0 : -1;
-				SHOULD_QUIT_RETURN;
-			}
-			break;
-
-		case 1068:
-			ret = g_engine->_video->playVideo(FCUT_068) ? 0 : -1;
-
-			if (ret != -1) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_070);
-				_G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FCUT_070);
-#endif
-			}
-			break;
-
-		case 1069:
-			ret = g_engine->_video->playVideo(FCUT_069) ? 0 : -1;
-
-			for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 71);
-				ret = _G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(i + 71);
-#endif
-			}
-			break;
-
-		case 1074:
-			for (i = 0; i < 4 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				print_rows(605);
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + FLIC_CUT_1074[i]);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + FLIC_CUT_1074[i]);
-#endif
-			}
-			break;
-
-		case 1080:
-			for (i = 0; i < 8 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1080[i]);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FLIC_CUT_1080[i]);
-#endif
-			}
-			break;
-
-		case 1087:
-			ret = g_engine->_video->playVideo(FCUT_087) ? 0 : -1;
-
-			for (i = 0; i < 2 && ret != -1; ++i) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, i + 102);
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(i + 102);
-#endif
-			}
-			break;
-
-		case 1088:
-			ret = g_engine->_video->playVideo(FCUT_088) ? 0 : -1;
-
-			if (ret != -1) {
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_086);
-				_G(flc)->custom_play(&_G(Ci));
-#else
-				g_engine->_video->playVideo(FCUT_086);
-#endif
-				_G(sndPlayer)->stopMod();
-			}
-			break;
-
-		case 1093:
-			for (i = 0; i < 12 && ret != -1; ++i) {
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1093[i]);
-				switch (FLIC_CUT_1093[i]) {
-				case 90:
-				case 91:
-				case 92:
-					_G(out)->cls();
-					break;
-				default:
-					break;
-				}
-
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-			}
-			break;
-
-		case 1106:
-			for (i = 0; i < 3 && ret == -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1106[i]);
-				_G(out)->cls();
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FLIC_CUT_1106[i]);
-#endif
-			}
-			break;
-
-		case 1107:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_109);
-			ret = _G(flc)->custom_play(&_G(Ci));
-			if (ret != -1) {
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_109);
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				_G(flc)->custom_play(&_G(Ci));
-			}
-#else
-			ret = g_engine->_video->playVideo(FCUT_107) ? 0 : -1;
-			if (ret != -1) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				playVideo(109);
-			}
-#endif
-			break;
-
-		case 1108:
-			ret = g_engine->_video->playVideo(FCUT_108) ? 0 : -1;
-
-#ifndef NEW_VIDEO_CODE
-			if (ret != -1) {
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_115);
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(flc)->custom_play(&_G(Ci));
-			}
-#else
-			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->_video->playVideo(FCUT_115);
-#endif
-			break;
-
-		case 1110:
-			_G(sndPlayer)->stopMod();
-			_G(currentSong) = -1;
-			load_room_music(257);
-			g_engine->_sound->setMusicVolume(20 * Audio::Mixer::kMaxChannelVolume / 120);
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_110);
-			ret = _G(flc)->custom_play(&_G(Ci));
-#else
-			g_engine->_video->playVideo(FCUT_110);
-#endif
-
-#ifndef NEW_VIDEO_CODE
-			if (ret != -1) {
-				g_engine->_sound->setMusicVolume(63 * Audio::Mixer::kMaxChannelVolume / 120);
-				_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_112);
-				_G(flc)->custom_play(&_G(Ci));
-			}
-#else
-			_G(sndPlayer)->setMusicMasterVol(63);
-			_G(fx)->spr_blende(_G(workpage), 100, false, 0);
-			g_engine->_video->playVideo(FCUT_112);
-#endif
-			_G(sndPlayer)->stopMod();
-			break;
-
-		case 1113:
-			for (i = 0; i < 5 && ret != -1; ++i) {
-#ifndef NEW_VIDEO_CODE
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FLIC_CUT_1113[i]);
-				_G(out)->cls();
-				ret = _G(flc)->custom_play(&_G(Ci));
-				SHOULD_QUIT_RETURN;
-#else
-				g_engine->_video->playVideo(FLIC_CUT_1113[i]);
-#endif
-			}
-			break;
-
-		case 1117:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_117);
-			if (_G(flc)->custom_play(&_G(Ci)) != -1) {
-				_G(fx)->border(_G(workpage), 100, 0, 0);
-				_G(mem)->file->select_pool_item(_G(Ci).Handle, FCUT_119);
-				_G(flc)->custom_play(&_G(Ci));
-			}
-#else
-			g_engine->_video->playVideo(FCUT_117);
-			_G(fx)->border(_G(workpage), 100, 0, 0);
-			g_engine->_video->playVideo(FCUT_119);
-#endif
-			break;
-
 		default:
-			g_engine->_video->playVideo(nr < 1000 ? nr : nr - 1000);
+			g_engine->_video->playVideo(nr);
 			break;
 		}
 


Commit: 06bd3eeca960fedb4eac3a8de6c9b1534d56c349
    https://github.com/scummvm/scummvm/commit/06bd3eeca960fedb4eac3a8de6c9b1534d56c349
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Cleanup video callbacks

Changed paths:
    engines/chewy/rooms/room37.cpp
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index e4c92ab716c..9077135730e 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -131,24 +131,22 @@ short Room37::use_wippe() {
 }
 
 int16 Room37::cut_serv1(int16 frame) {
+	const int16 scrollx = _G(spieler).scrollx;
+	const int16 scrolly = _G(spieler).scrolly;
+
 	if (!_G(spieler).R37Kloppe) {
-		int16 static_nr;
-		int16 static_nr1;
 		if (!_G(spieler).R37Gebiss) {
-			static_nr = 9;
-			static_nr1 = 11;
+			_G(det)->plot_static_details(scrollx, scrolly, 9, 9);
+			_G(det)->plot_static_details(scrollx, scrolly, 11, 11);
 			_G(det)->show_static_spr(11);
 		} else {
-			static_nr = 8;
-			static_nr1 = 0;
+			_G(det)->plot_static_details(scrollx, scrolly, 8, 8);
+			_G(det)->plot_static_details(scrollx, scrolly, 0, 0);
 		}
-
-		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr, static_nr);
-		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, static_nr1, static_nr1);
 	}
 
-	_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 7, 7);
-	_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, 14, 14);
+	_G(det)->plot_static_details(scrollx, scrolly, 7, 7);
+	_G(det)->plot_static_details(scrollx, scrolly, 14, 14);
 	return 0;
 }
 
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 0ba12e88027..c42b8db9b4a 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -111,13 +111,16 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 }
 
 bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
+	const int16 scrollx = _G(spieler).scrollx;
+	const int16 scrolly = _G(spieler).scrolly;
+
 	switch (num) {
 	case FCUT_004:
 		// Room6::cut_serv1
 		return (frame == 40) ? false : true;
 	case FCUT_005:
 		// Room10::cut_serv
-		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+		_G(atds)->print_aad(scrollx, scrolly);
 		if (frame == 31)
 			start_aad(107, 0);
 		break;
@@ -134,7 +137,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 			_G(det)->plot_static_details(0, 0, 7, 7);
 
 		if (num == FCUT_010) {
-			_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+			_G(atds)->print_aad(scrollx, scrolly);
 			if (frame == 43)
 				start_aad(106, 0);
 		}
@@ -150,7 +153,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		if (!_G(spieler).R39TranslatorUsed)
 			return false;
 
-		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+		_G(atds)->print_aad(scrollx, scrolly);
 
 		if (cfoDecoder->endOfVideo() && _G(atds)->aad_get_status() != -1)
 			cfoDecoder->rewind();
@@ -182,7 +185,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 			break;
 		}
 
-		_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
+		_G(atds)->print_aad(scrollx, scrolly);
 		break;
 	case FCUT_094:
 		// Room87::proc3


Commit: d20703122da22583089f9ed629497448e8fd845e
    https://github.com/scummvm/scummvm/commit/d20703122da22583089f9ed629497448e8fd845e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:46-08:00

Commit Message:
CHEWY: Renaming

Changed paths:
    engines/chewy/defines.h
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index a7a0adfdd98..c9b25b5c702 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -126,8 +126,8 @@ enum SetupScreenMode {
 #define MAX_TIMER_OBJ 10
 #define MAX_ROOM_TIMER 10
 
-#define ANI_VOR 0
-#define ANI_RUECK 1
+#define ANI_FRONT 0
+#define ANI_BACK 1
 #define ANI_WAIT 0
 #define ANI_GO 1
 #define MAX_PROG_ANI 10
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 6c3c4faa1ff..8f73f49fe98 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -161,7 +161,7 @@ void MainMenu::animate() {
 
 	sprite_engine();
 	kb_mov(1);
-	calc_maus_txt(_G(minfo).x, _G(minfo).y, 1);
+	calcMouseTxt(_G(minfo).x, _G(minfo).y, 1);
 	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 992119971cc..63075f31efe 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -331,10 +331,10 @@ void obj_auswerten(int16 test_nr, int16 txt_nr);
 
 void swap_if_l(int16 *x1, int16 *x2);
 
-void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol,
-	int16 scr_w, char *txtptr);
+void printShadowed(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 shadowFgCol,
+	int16 scrWidth, char *txtPtr);
 
-bool auto_move(int16 mov_nr, int16 p_nr);
+bool autoMove(int16 movNr, int16 playerNum);
 void get_user_key(int16 mode);
 void clear_prog_ani();
 
@@ -360,7 +360,7 @@ void check_mouse_ausgang(int16 x, int16 y);
 
 void calc_ausgang(int16 x, int16 y);
 
-void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode);
+void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode);
 
 void calc_auto_go();
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index cc65f694ca6..9c94ae5f18a 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -599,7 +599,7 @@ void set_up_screen(SetupScreenMode mode) {
 			txt_nr = _G(obj)->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
 		} else {
-			int16 tmp = calc_maus_txt(_G(minfo).x, _G(minfo).y, mode);
+			int16 tmp = calcMouseTxt(_G(minfo).x, _G(minfo).y, mode);
 			if (tmp == -1 || tmp == 255) {
 
 				nr = _G(obj)->is_sib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
@@ -704,7 +704,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_adr, anz);
 				for (int16 i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
 			}
 		}
 	}
@@ -719,7 +719,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				if (txt_mode == INVENTAR_NORMAL) {
 					if (!_G(flags).ChAutoMov) {
 						_G(maus_links_click) = false;
-						auto_move(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
+						autoMove(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
 						Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 
 						if (_G(spieler).AkInvent != -1)
@@ -728,7 +728,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 							invent_2_slot(nr);
 						} else {
 							_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[nr].HeldHide;
-							play_scene_ani(_G(spieler).room_m_obj[nr].AniFlag, ANI_VOR);
+							play_scene_ani(_G(spieler).room_m_obj[nr].AniFlag, ANI_FRONT);
 							invent_2_slot(nr);
 
 							_G(spieler).PersonHide[P_CHEWY] = false;
@@ -898,13 +898,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			if (_G(flags).InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 					_G(maus_links_click) = false;
-					auto_move(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
+					autoMove(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
 				}
 				txt_nr = _G(obj)->iib_txt_nr(test_nr);
 				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
 				if (_G(spieler).room_m_obj[test_nr].AniFlag != 255) {
 					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[test_nr].HeldHide;
-					play_scene_ani(_G(spieler).room_m_obj[test_nr].AniFlag, ANI_VOR);
+					play_scene_ani(_G(spieler).room_m_obj[test_nr].AniFlag, ANI_FRONT);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 			}
@@ -918,13 +918,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			_G(maus_links_click) = false;
 			hideCur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
-				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
 				if (ani_nr >= 150) {
@@ -957,13 +957,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			hideCur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
 
-				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
 
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
@@ -1000,13 +1000,13 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			_G(maus_links_click) = false;
 			hideCur();
 			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
-				auto_move(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
 			}
 			txt_nr = _G(obj)->sib_txt_nr(test_nr);
 			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
 				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = get_ani_richtung((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
 
 				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
 
@@ -1077,12 +1077,12 @@ void swap_if_l(int16 *x1, int16 *x2) {
 	}
 }
 
-void palcopy(byte *dipal, const byte *sipal, int16 distart, int16 sistart, int16 anz) {
-	int16 j = sistart;
-	for (int16 i = distart; i < distart + anz; i++) {
-		dipal[i * 3] = sipal[j * 3];
-		dipal[i * 3 + 1] = sipal[j * 3 + 1];
-		dipal[i * 3 + 2] = sipal[j * 3 + 2];
+void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex, int16 srcStartIndex, int16 colorNbr) {
+	int16 j = srcStartIndex;
+	for (int16 i = destStartIndex; i < destStartIndex + colorNbr; ++i) {
+		destPal[i * 3] = srcPal[j * 3];
+		destPal[i * 3 + 1] = srcPal[j * 3 + 1];
+		destPal[i * 3 + 2] = srcPal[j * 3 + 2];
 		++j;
 	}
 }
@@ -1181,27 +1181,27 @@ void check_shad(int16 g_idx, int16 mode) {
 	}
 }
 
-void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w, char *txtptr) {
-	_G(out)->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
-	_G(out)->printxy(x, y, fcol, bcol, scr_w, txtptr);
+void printShadowed(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 shadowFgCol, int16 scrWidth, char *txtPtr) {
+	_G(out)->printxy(x + 1, y + 1, shadowFgCol, bgCol, scrWidth, txtPtr);
+	_G(out)->printxy(x, y, fgCol, bgCol, scrWidth, txtPtr);
 }
 
-bool auto_move(int16 mov_nr, int16 p_nr) {
-	bool move_status = false;
-	if (mov_nr < MAX_AUTO_MOV) {
+bool autoMove(int16 movNr, int16 playerNum) {
+	bool movingFl = false;
+	if (movNr < MAX_AUTO_MOV) {
 		if (!_G(flags).ChAutoMov) {
 			int16 key = false;
-			move_status = true;
+			movingFl = true;
 			_G(flags).ChAutoMov = true;
-			_G(auto_p_nr) = p_nr;
+			_G(auto_p_nr) = playerNum;
 			int16 tmp = _G(maus_links_click);
 			_G(maus_links_click) = false;
-			_G(gpkt).Dx = _G(Rdi)->AutoMov[mov_nr].X -
-						  _G(spieler_mi)[p_nr].HotMovX + _G(spieler_mi)[p_nr].HotX;
-			_G(gpkt).Dy = _G(Rdi)->AutoMov[mov_nr].Y -
-						  _G(spieler_mi)[p_nr].HotMovY + _G(spieler_mi)[p_nr].HotY;
-			_G(gpkt).Sx = _G(spieler_vector)[p_nr].Xypos[0] + _G(spieler_mi)[p_nr].HotX;
-			_G(gpkt).Sy = _G(spieler_vector)[p_nr].Xypos[1] + _G(spieler_mi)[p_nr].HotY;
+			_G(gpkt).Dx = _G(Rdi)->AutoMov[movNr].X -
+						  _G(spieler_mi)[playerNum].HotMovX + _G(spieler_mi)[playerNum].HotX;
+			_G(gpkt).Dy = _G(Rdi)->AutoMov[movNr].Y -
+						  _G(spieler_mi)[playerNum].HotMovY + _G(spieler_mi)[playerNum].HotY;
+			_G(gpkt).Sx = _G(spieler_vector)[playerNum].Xypos[0] + _G(spieler_mi)[playerNum].HotX;
+			_G(gpkt).Sy = _G(spieler_vector)[playerNum].Xypos[1] + _G(spieler_mi)[playerNum].HotY;
 			_G(gpkt).Breite = _G(room)->_gedXAnz[_G(room_blk).AkAblage];
 			_G(gpkt).Hoehe = _G(room)->_gedYAnz[_G(room_blk).AkAblage];
 			_G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage];
@@ -1209,14 +1209,14 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			_G(gpkt).AkMovEbene = _G(ged_mov_ebene);
 			_G(mov)->goto_xy(&_G(gpkt));
 
-			_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
-			_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
-			_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
-			_G(spieler_mi)[p_nr].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[p_nr].HotY;
-			_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart,
-				_G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
-			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
-			_G(spieler_vector)[p_nr].DelayCount = 0;
+			_G(spieler_mi)[playerNum].XyzStart[0] = _G(spieler_vector)[playerNum].Xypos[0];
+			_G(spieler_mi)[playerNum].XyzStart[1] = _G(spieler_vector)[playerNum].Xypos[1];
+			_G(spieler_mi)[playerNum].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[playerNum].HotX;
+			_G(spieler_mi)[playerNum].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[playerNum].HotY;
+			_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[playerNum].XyzStart,
+				_G(spieler_mi)[playerNum].Vorschub, &_G(spieler_vector)[playerNum]);
+			get_phase(&_G(spieler_vector)[playerNum], &_G(spieler_mi)[playerNum]);
+			_G(spieler_vector)[playerNum].DelayCount = 0;
 
 			if (_G(mov)->auto_go_status()) {
 				while (_G(mov)->auto_go_status()) {
@@ -1226,7 +1226,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							key = Common::KEYCODE_ESCAPE;
 							_G(mov)->stop_auto_go();
-							move_status = false;
+							movingFl = false;
 						}
 					}
 					set_up_screen(DO_SETUP);
@@ -1234,26 +1234,26 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 			}
 			if (_G(flags).ChAutoMov) {
 				bool endLoopFl = false;
-				_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
-				_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
-				_G(spieler_mi)[p_nr].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[p_nr].HotX;
-				_G(spieler_mi)[p_nr].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[p_nr].HotY;
-				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart, _G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
-				get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
+				_G(spieler_mi)[playerNum].XyzStart[0] = _G(spieler_vector)[playerNum].Xypos[0];
+				_G(spieler_mi)[playerNum].XyzStart[1] = _G(spieler_vector)[playerNum].Xypos[1];
+				_G(spieler_mi)[playerNum].XyzEnd[0] = _G(gpkt).Dx - _G(spieler_mi)[playerNum].HotX;
+				_G(spieler_mi)[playerNum].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[playerNum].HotY;
+				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[playerNum].XyzStart, _G(spieler_mi)[playerNum].Vorschub, &_G(spieler_vector)[playerNum]);
+				get_phase(&_G(spieler_vector)[playerNum], &_G(spieler_mi)[playerNum]);
 				while (!endLoopFl) {
 					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
 						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
-							_G(spieler_vector)[p_nr].Count = 0;
-							move_status = false;
+							_G(spieler_vector)[playerNum].Count = 0;
+							movingFl = false;
 						}
 					}
-					if (!_G(spieler_vector)[p_nr].Count) {
-						if (move_status) {
+					if (!_G(spieler_vector)[playerNum].Count) {
+						if (movingFl) {
 							if (_G(flags).ExitMov == false && _G(flags).ChAutoMov) {
 
-								set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
-								               _G(spieler_mi)[p_nr].XyzEnd[1],
-								               p_nr, _G(Rdi)->AutoMov[mov_nr].SprNr);
+								set_person_pos(_G(spieler_mi)[playerNum].XyzEnd[0],
+								               _G(spieler_mi)[playerNum].XyzEnd[1],
+								               playerNum, _G(Rdi)->AutoMov[movNr].SprNr);
 							}
 						}
 						endLoopFl = true;
@@ -1268,38 +1268,37 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
 		}
 	}
 
-	return move_status;
+	return movingFl;
 }
 
-void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
-	if (!_G(stopAutoMove)[p_nr] &&
-	    _G(spieler).PersonRoomNr[p_nr] == _G(spieler).PersonRoomNr[P_CHEWY]) {
+void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
+	if (!_G(stopAutoMove)[personNum] && _G(spieler).PersonRoomNr[personNum] == _G(spieler).PersonRoomNr[P_CHEWY]) {
 		int16 move_status = true;
 		int16 tmp = _G(maus_links_click);
 		_G(maus_links_click) = false;
 
-		_G(spieler_mi)[p_nr].XyzStart[0] = _G(spieler_vector)[p_nr].Xypos[0];
-		_G(spieler_mi)[p_nr].XyzStart[1] = _G(spieler_vector)[p_nr].Xypos[1];
-		_G(spieler_mi)[p_nr].XyzEnd[0] = x;
-		_G(spieler_mi)[p_nr].XyzEnd[1] = y;
-		_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[p_nr].XyzStart,
-			_G(spieler_mi)[p_nr].Vorschub, &_G(spieler_vector)[p_nr]);
+		_G(spieler_mi)[personNum].XyzStart[0] = _G(spieler_vector)[personNum].Xypos[0];
+		_G(spieler_mi)[personNum].XyzStart[1] = _G(spieler_vector)[personNum].Xypos[1];
+		_G(spieler_mi)[personNum].XyzEnd[0] = x;
+		_G(spieler_mi)[personNum].XyzEnd[1] = y;
+		_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[personNum].XyzStart,
+			_G(spieler_mi)[personNum].Vorschub, &_G(spieler_vector)[personNum]);
 
-		if (_G(spieler_vector)[p_nr].Count)
-			get_phase(&_G(spieler_vector)[p_nr], &_G(spieler_mi)[p_nr]);
+		if (_G(spieler_vector)[personNum].Count)
+			get_phase(&_G(spieler_vector)[personNum], &_G(spieler_mi)[personNum]);
 		if (mode == ANI_WAIT) {
 			bool endLoopFl = false;
 			while (!endLoopFl) {
 				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
 					if (_G(flags).ExitMov || _G(flags).BreakAMov) {
-						_G(spieler_vector)[p_nr].Count = 0;
+						_G(spieler_vector)[personNum].Count = 0;
 						move_status = false;
 					}
 				}
-				if (!_G(spieler_vector)[p_nr].Count) {
+				if (!_G(spieler_vector)[personNum].Count) {
 					if (move_status) {
-						set_person_pos(_G(spieler_mi)[p_nr].XyzEnd[0],
-						               _G(spieler_mi)[p_nr].XyzEnd[1], p_nr, -1);
+						set_person_pos(_G(spieler_mi)[personNum].XyzEnd[0],
+						               _G(spieler_mi)[personNum].XyzEnd[1], personNum, -1);
 					}
 					endLoopFl = true;
 				}
@@ -1312,12 +1311,12 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
 	}
 }
 
-int16 get_ani_richtung(int16 zustand) {
-	int16 ret = ANI_VOR;
+int16 getAniDirection(int16 zustand) {
+	int16 ret = ANI_FRONT;
 	switch (zustand) {
 	case OBJZU_ZU:
 	case OBJZU_VERSCHLOSSEN:
-		ret = ANI_RUECK;
+		ret = ANI_BACK;
 		break;
 	default:
 		break;
@@ -1325,28 +1324,28 @@ int16 get_ani_richtung(int16 zustand) {
 	return ret;
 }
 
-int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
-	int16 txt_mode = 0;
+int16 calcMouseText(int16 x, int16 y, int16 mode) {
+	int16 txtMode = 0;
 	int16 ret = -1;
 
 	if (mode == DO_SETUP) {
 		if (_G(flags).ShowAtsInvTxt) {
 			int16 inv_no_use_mode = AUTO_OBJ;
 			int16 idx;
-			int16 txt_nr = calc_mouse_mov_obj(&idx);
+			int16 txtNr = calc_mouse_mov_obj(&idx);
 
-			if (txt_nr == -1) {
+			if (txtNr == -1) {
 				idx = _G(det)->maus_vector(x + _G(spieler).scrollx, y + _G(spieler).scrolly);
 				if (idx != -1) {
-					txt_nr = _G(Rdi)->mtxt[idx];
+					txtNr = _G(Rdi)->mtxt[idx];
 					inv_no_use_mode = DETEDIT_REC;
 				}
 			}
 
-			if (txt_nr != -1) {
+			if (txtNr != -1) {
 				ret = -1;
-				bool disp_flag = true;
-				bool action_flag = false;
+				bool dispFl = true;
+				bool actionFl = false;
 
 				if (_G(maus_links_click) && !_G(flags).MausTxt) {
 					int16 ok = true;
@@ -1354,24 +1353,24 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 
 					switch (_G(menu_item)) {
 					case CUR_LOOK:
-						txt_mode = TXT_MARK_LOOK;
+						txtMode = TXT_MARK_LOOK;
 						break;
 
 					case CUR_NICHELLE:
 					case CUR_HOWARD:
 					case CUR_USER:
 					case CUR_USE:
-						txt_mode = TXT_MARK_USE;
+						txtMode = TXT_MARK_USE;
 						if (_G(spieler).inv_cur)
 							ok = false;
 						break;
 
 					case CUR_WALK:
-						txt_mode = TXT_MARK_WALK;
+						txtMode = TXT_MARK_WALK;
 						break;
 
 					case CUR_TALK:
-						txt_mode = TXT_MARK_TALK;
+						txtMode = TXT_MARK_TALK;
 						break;
 
 					default:
@@ -1379,7 +1378,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					}
 
 					int16 action_ret = 0;
-					if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+					if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
@@ -1388,34 +1387,34 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 						}
 					}
 
-					if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
-						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_VOR);
+					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATEI)) {
+						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_VOR);
 					}
 					
-					if (ok && !_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-						if (start_ats_wait(txt_nr, txt_mode, 14, ATS_DATEI))
-							disp_flag = false;
+					if (ok && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
+						if (start_ats_wait(txtNr, txtMode, 14, ATS_DATEI))
+							dispFl = false;
 					} else {
 						ret = -1;
 					}
 					
-					if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
-						action_ret = ats_action(txt_nr, txt_mode, ATS_ACTION_NACH);
-						action_flag = true;
+					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATEI)) {
+						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_NACH);
+						actionFl = true;
 						if (action_ret)
 							ret = 1;
 					}
 					
 					if (!ok && !action_ret) {
-						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
-							action_flag = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
-							if (action_flag)
-								ret = txt_nr;
+						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
+							actionFl = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
+							if (actionFl)
+								ret = txtNr;
 						}
 					}
 					
-					if (ok && !action_ret && txt_mode == TXT_MARK_USE && disp_flag) {
-						if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+					if (ok && !action_ret && txtMode == TXT_MARK_USE && dispFl) {
+						if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
 							if (_G(menu_item) != CUR_WALK) {
 								if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
@@ -1423,9 +1422,9 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 									set_person_spr(P_LEFT, P_CHEWY);
 							}
 							int16 r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
-							action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
-							if (action_flag)
-								ret = txt_nr;
+							actionFl = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+							if (actionFl)
+								ret = txtNr;
 						}
 					}
 
@@ -1434,15 +1433,15 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
 					ret = -1;
 				}
 
-				if (disp_flag && !action_flag) {
+				if (dispFl && !actionFl) {
 					int16 anz;
-					char *str_ = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
+					char *str_ = _G(atds)->ats_get_txt(txtNr, TXT_MARK_NAME, &anz, ATS_DATEI);
 					if (str_ != 0) {
-						ret = txt_nr;
+						ret = txtNr;
 						_G(fontMgr)->setFont(_G(font8));
 						calc_txt_xy(&x, &y, str_, anz);
 						for (int16 i = 0; i < anz; i++)
-							print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+							printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 					}
 				}
 			} else {
@@ -1506,7 +1505,7 @@ void calc_mouse_person(int16 x, int16 y) {
 				_G(fontMgr)->setFont(_G(font8));
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
-				print_shad(x, y, 255, 300, 0, _G(scr_width), str_);
+				printShadowed(x, y, 255, 300, 0, _G(scr_width), str_);
 				if (_G(maus_links_click) == 1) {
 					int16 def_nr = -1;
 					if (!_G(spieler).inv_cur) {
@@ -1742,7 +1741,7 @@ void calc_ausgang(int16 x, int16 y) {
 		int16 nr = _G(obj)->is_exit(x, y);
 		if (nr != -1) {
 			_G(flags).ExitMov = true;
-			if (auto_move(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
+			if (autoMove(_G(spieler).room_e_obj[nr].AutoMov, P_CHEWY) == true) {
 				_G(flags).ShowAtsInvTxt = false;
 				_G(menu_item) = CUR_DISK;
 				cursorChoice(CUR_DISK);
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 439624d2842..b548637c7ec 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -30,12 +30,12 @@ namespace Chewy {
 void game_main();
 void free_buffers();
 void plot_main_menu();
-void palcopy(byte *dipal, const byte *sipal, int16 distart,
-             int16 sistart, int16 anz);
-short calc_maus_txt(int16 x, int16 y, int16 mode);
+void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex,
+             int16 srcStartIndex, int16 colorNbr);
+short calcMouseTxt(int16 x, int16 y, int16 mode);
 void calc_ani_timer();
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr);
-int16 get_ani_richtung(int16 zustand);
+int16 getAniDirection(int16 zustand);
 void menuEntry();
 void menuExit();
 
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index a367c384e79..18d727d6c96 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -346,9 +346,9 @@ void Object::calc_static_detail(int16 det_nr) {
 							n = nr - 40;
 							AniDetailInfo *adi = _G(det)->get_ani_detail(n);
 							if (adi->repeat)
-								_G(det)->start_detail(n, 0, ANI_VOR);
+								_G(det)->start_detail(n, 0, ANI_FRONT);
 							else
-								_G(det)->start_detail(n, 1, ANI_VOR);
+								_G(det)->start_detail(n, 1, ANI_FRONT);
 						} else
 							_G(det)->show_static_spr(nr);
 						++i;
@@ -358,9 +358,9 @@ void Object::calc_static_detail(int16 det_nr) {
 				n = nr - 40;
 				AniDetailInfo *adi = _G(det)->get_ani_detail(n);
 				if (adi->repeat)
-					_G(det)->start_detail(n, 0, ANI_VOR);
+					_G(det)->start_detail(n, 0, ANI_FRONT);
 				else
-					_G(det)->start_detail(n, 1, ANI_VOR);
+					_G(det)->start_detail(n, 1, ANI_FRONT);
 			} else {
 				_G(det)->show_static_spr(nr);
 			}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index d894dd2df7f..ec1bc5cd6e8 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -56,7 +56,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 
 	case ROOM_8_17:
 		start_aad(100, 0);
-		_G(det)->start_detail(21, 4, ANI_VOR);
+		_G(det)->start_detail(21, 4, ANI_FRONT);
 		break;
 
 	case ROOM_18_20:
@@ -125,7 +125,7 @@ void timer_action(int16 t_nr) {
 #undef TIMER
 
 	if (default_flag && _G(flags).AutoAniPlay == false) {
-		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
+		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
 		_G(uhr)->reset_timer(t_nr, 0);
 	}
 
@@ -728,7 +728,7 @@ void exit_room(int16 eib_nr) {
 
 	if (x != -1 && y != -1) {
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		go_auto_xy(x, y, P_CHEWY, ANI_WAIT);
+		goAutoXy(x, y, P_CHEWY, ANI_WAIT);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 	}
 
@@ -1301,7 +1301,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		if (_G(spieler).R7SeilLeft) {
 			if (_G(spieler).R7RHaken) {
 				_G(spieler).R7SeilOk = true;
-				auto_move(4, P_CHEWY);
+				autoMove(4, P_CHEWY);
 				_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 				_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
 				_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -1338,7 +1338,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				_G(det)->start_detail(i, 255, ANI_VOR);
+				_G(det)->start_detail(i, 255, ANI_FRONT);
 		} else {
 			for (int i = 0; i < 5; ++i)
 				_G(det)->stop_detail(i);
@@ -1478,7 +1478,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(det)->del_static_ani(6);
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(spieler).R40Geld = true;
-		start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(201, -1);
 		break;
 
@@ -1539,7 +1539,7 @@ void sib_event_inv(int16 sib_nr) {
 			cur_2_inventory();
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
-			_G(det)->start_detail(6, 255, ANI_VOR);
+			_G(det)->start_detail(6, 255, ANI_FRONT);
 			_G(atds)->set_ats_str(27, 1, ATS_DATEI);
 			_G(atds)->set_ats_str(30, 1, ATS_DATEI);
 		}
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 7c1695c2c1d..ef48bedaeb0 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -104,7 +104,7 @@ void JungleRoom::topEntry() {
 	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
 	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
-	go_auto_xy(266, 113, P_HOWARD, ANI_WAIT);
+	goAutoXy(266, 113, P_HOWARD, ANI_WAIT);
 	showCur();
 }
 
@@ -140,8 +140,8 @@ void JungleRoom::setup_func() {
 		nicDestX = 543;
 	}
 
-	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, 111, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
 Room::Room() {
@@ -217,7 +217,7 @@ void Room::add_timer_new_room() {
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
-			_G(det)->start_detail(i, 0, ANI_VOR);
+			_G(det)->start_detail(i, 0, ANI_FRONT);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 00d1f88d3c0..985fb095165 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -63,7 +63,7 @@ void Room0::entry() {
 			set_up_screen(DO_SETUP);
 		}
 
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(2, -1);
 
 		showCur();
@@ -83,7 +83,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			_G(flags).AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
 				start_aad_wait(42, -1);
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 				set_person_spr(P_LEFT, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
@@ -106,7 +106,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 					++_G(spieler).R0FueterLab;
 				}
 
-				auto_move(3, P_CHEWY);
+				autoMove(3, P_CHEWY);
 				set_person_pos(191, 120, P_CHEWY, P_LEFT);
 			}
 
@@ -128,7 +128,7 @@ bool Room0::getPillow() {
 	if (!_G(spieler).inv_cur) {
 		hideCur();
 		_G(flags).AutoAniPlay = true;
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(0);
 		_G(menu_item) = CUR_WALK;
@@ -150,10 +150,10 @@ bool Room0::pullSlime() {
 		hideCur();
 		
 		_G(flags).AutoAniPlay = true;
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(3, 1, ANI_VOR);
-		start_detail_wait(17, 2, ANI_VOR);
+		start_detail_wait(3, 1, ANI_FRONT);
+		start_detail_wait(17, 2, ANI_FRONT);
 		set_person_pos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
@@ -180,7 +180,7 @@ void Room0::eyeAnim() {
 			start_aad(124);
 			checkSlimeEye();
 			eyeSlimeBack();
-			auto_move(FUETTER_POS, P_CHEWY);
+			autoMove(FUETTER_POS, P_CHEWY);
 			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		} else {
 			eyeShoot();
@@ -311,7 +311,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
@@ -329,7 +329,7 @@ void Room0::eyeShoot() {
 	adi->ani_count = 47;
 
 	bool ende = false;
-	_G(det)->start_detail(CH_BLITZ, 1, ANI_VOR);
+	_G(det)->start_detail(CH_BLITZ, 1, ANI_FRONT);
 
 	while (!ende) {
 		clear_prog_ani();
@@ -360,7 +360,7 @@ void Room0::eyeShoot() {
 		}
 	}
 
-	_G(det)->start_detail(STERNE_STEHEN, 255, ANI_VOR);
+	_G(det)->start_detail(STERNE_STEHEN, 255, ANI_FRONT);
 	clear_prog_ani();
 	_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 	_G(spr_info)[0].ZEbene = 190;
@@ -514,7 +514,7 @@ void Room0::feederStart(int16 mode) {
 	_G(flags).AniUserAction = false;
 
 	if (mode) {
-		_G(det)->start_detail(FLAP_DETAIL, 1, ANI_RUECK);
+		_G(det)->start_detail(FLAP_DETAIL, 1, ANI_BACK);
 		while (_G(det)->get_ani_status(FLAP_DETAIL))
 			set_ani_screen();
 
@@ -549,7 +549,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
-					print_shad(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
@@ -616,7 +616,7 @@ void Room0::checkFeed() {
 	}
 
 	adi->ani_count = 138;
-	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_VOR);
+	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_FRONT);
 
 	ende = false;
 	while (!ende) {
@@ -662,7 +662,7 @@ void Room0::checkPillow() {
 
 	bool ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, ANI_VOR);
+	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, ANI_FRONT);
 	bool mode = false;
 
 	while (!ende) {
@@ -702,7 +702,7 @@ void Room0::checkPillow() {
 }
 
 void Room0::trapDoorOpen() {
-	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_VOR);
+	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_FRONT);
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -723,7 +723,7 @@ void Room0::trapDoorOpen() {
 }
 
 void Room0::trapDoorClose() {
-	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_RUECK);
+	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_BACK);
 
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
@@ -741,7 +741,7 @@ void Room0::feederAni() {
 		if (_G(spieler).R0PillowThrow) {
 			checkPillow();
 			feederStart(1);
-			auto_move(VERSTECK_POS, P_CHEWY);
+			autoMove(VERSTECK_POS, P_CHEWY);
 			set_up_screen(DO_SETUP);
 			_G(out)->cls();
 			flic_cut(FCUT_000);
@@ -766,7 +766,7 @@ void Room0::feederAni() {
 
 	if (action) {
 		checkFeed();
-		start_spz(CH_EKEL, 3, ANI_VOR, P_CHEWY);
+		start_spz(CH_EKEL, 3, ANI_FRONT, P_CHEWY);
 		start_aad(55);
 		feederStart(1);
 	}
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 3259b14a956..9a73f7d6d05 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room1::gottenCard() {
 	_G(det)->hide_static_spr(2);
-	start_detail_wait(4, 1, ANI_VOR);
+	start_detail_wait(4, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
 	int16 tmp;
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 0ef47330420..60778a5b222 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -32,19 +32,19 @@ namespace Rooms {
 #define GITTER_BLITZEN 7
 
 static const AniBlock ABLOCK4[2] = {
-	{ GITTER_BLITZEN, 3, ANI_VOR, ANI_WAIT, 0 },
-	{ GITTER_BLITZEN, 12, ANI_VOR, ANI_GO, 0 }
+	{ GITTER_BLITZEN, 3, ANI_FRONT, ANI_WAIT, 0 },
+	{ GITTER_BLITZEN, 12, ANI_FRONT, ANI_GO, 0 }
 };
 
 
 void Room2::entry() {
 	if (!_G(spieler).R2ElectrocutedBork)
-		_G(det)->start_detail(5, 255, ANI_VOR);
+		_G(det)->start_detail(5, 255, ANI_FRONT);
 }
 
 void Room2::jump_out_r1(int16 nr) {
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(nr, 1, ANI_VOR);
+	start_detail_wait(nr, 1, ANI_FRONT);
 	set_up_screen(DO_SETUP);
 	_G(det)->stop_detail(6);
 	set_person_pos(32, 127, P_CHEWY, P_LEFT);
@@ -55,12 +55,12 @@ void Room2::jump_out_r1(int16 nr) {
 }
 
 void Room2::electrifyWalkway1() {
-	_G(det)->start_detail(ANI_5, 255, ANI_VOR);
-	start_spz(CH_TALK6, 255, false, ANI_VOR);
+	_G(det)->start_detail(ANI_5, 255, ANI_FRONT);
+	start_spz(CH_TALK6, 255, false, ANI_FRONT);
 	start_aad_wait(49, -1);
 	_G(det)->stop_detail(ANI_5);
 
-	_G(det)->start_detail(GITTER_BLITZEN, 12, ANI_VOR);
+	_G(det)->start_detail(GITTER_BLITZEN, 12, ANI_FRONT);
 	_G(spieler).R2ElectrocutedBork = true;
 	del_inventar(_G(spieler).AkInvent);
 
@@ -81,7 +81,7 @@ void Room2::gedAction(int index) {
 	if (index == 0) {
 		_G(det)->stop_detail(5);
 		if (!_G(spieler).R2ElectrocutedBork)
-			_G(det)->start_detail(6, 2, ANI_VOR);
+			_G(det)->start_detail(6, 2, ANI_FRONT);
 		else
 			start_ani_block(2, ABLOCK4);
 
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 7ead055745f..5878f42c781 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -62,30 +62,30 @@ static const int16 SONDE_PHASEN[4][2] = {
 };
 
 static const AniBlock ABLOCK0[5] = {
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 7, 3, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 7, 3, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
 static const AniBlock ABLOCK1[2] = {
-	{ 10, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 10, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 13, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 static const AniBlock ABLOCK2[2] = {
-	{ 12, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ GITTER_BLITZEN, 1, ANI_VOR, ANI_GO, 0 }
+	{ 12, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ GITTER_BLITZEN, 1, ANI_FRONT, ANI_GO, 0 }
 };
 
 static const AniBlock ABLOCK3[2] = {
-	{  4, 2, ANI_VOR, ANI_GO, 0 },
-	{ 11, 255, ANI_VOR, ANI_GO, 0 }
+	{  4, 2, ANI_FRONT, ANI_GO, 0 },
+	{ 11, 255, ANI_FRONT, ANI_GO, 0 }
 };
 
 static const AniBlock ablock5[3] = {
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 8, 9, ANI_VOR, ANI_GO, 0 },
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 8, 9, ANI_FRONT, ANI_GO, 0 },
+	{ 1, 1, ANI_FRONT, ANI_WAIT, 0 },
 
 };
 
@@ -113,7 +113,7 @@ void Room3::terminal() {
 				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_VOR);
+			start_detail_wait(8, 1, ANI_FRONT);
 			set_up_screen(DO_SETUP);
 			_G(det)->stop_detail(6);
 			clear_prog_ani();
@@ -199,13 +199,13 @@ void Room3::sonde_knarre() {
 	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
-	_G(det)->start_detail(SONDE_SHOOT, 1, ANI_VOR);
+	_G(det)->start_detail(SONDE_SHOOT, 1, ANI_FRONT);
 	int16 ende = 0;
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(det)->start_detail(KOPF_SCHUSS, 1, ANI_VOR);
+			_G(det)->start_detail(KOPF_SCHUSS, 1, ANI_FRONT);
 		}
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		_G(spr_info)[0].ZEbene = 0;
@@ -218,7 +218,7 @@ void Room3::sonde_knarre() {
 		}
 		
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178)
-			_G(det)->start_detail(SONDE_RET, 3, ANI_RUECK);
+			_G(det)->start_detail(SONDE_RET, 3, ANI_BACK);
 		
 		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28)
 			ende = 1;
@@ -228,7 +228,7 @@ void Room3::sonde_knarre() {
 	}
 
 	clear_prog_ani();
-	_G(det)->start_detail(SONDE_RAUCH, 3, ANI_VOR);
+	_G(det)->start_detail(SONDE_RAUCH, 3, ANI_FRONT);
 	ende = 0;
 	while (_G(det)->get_ani_status(SONDE_RAUCH)) {
 
@@ -247,7 +247,7 @@ void Room3::sonde_knarre() {
 	start_spz(15, 255, false, P_CHEWY);
 	start_aad_wait(53, -1);
 	clear_prog_ani();
-	_G(det)->start_detail(SONDE_REIN, 1, ANI_RUECK);
+	_G(det)->start_detail(SONDE_REIN, 1, ANI_BACK);
 	while (_G(det)->get_ani_status(SONDE_REIN)) {
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
@@ -313,7 +313,7 @@ void Room3::probeTransfer() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(det)->start_detail(SONDE_GREIF, 1, ANI_VOR);
+	_G(det)->start_detail(SONDE_GREIF, 1, ANI_FRONT);
 	while (_G(det)->get_ani_status(SONDE_GREIF)) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 073f82016f2..0d3347b8e34 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -31,18 +31,18 @@ namespace Rooms {
 
 void Room5::entry() {
 	if (_G(spieler).R5Terminal)
-		_G(det)->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
 }
 
 void Room5::pushButton() {
 	if (_G(spieler).R5Terminal) {
 		int16 str_nr;
 		if (_G(spieler).R5Tuer == false) {
-			start_detail_wait(9, 1, ANI_VOR);
+			start_detail_wait(9, 1, ANI_FRONT);
 			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
 			str_nr = 1;
 		} else {
-			start_detail_wait(9, 1, ANI_RUECK);
+			start_detail_wait(9, 1, ANI_BACK);
 			_G(spieler).room_e_obj[6].Attribut = 255;
 			str_nr = 0;
 		}
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index eefc790d7d1..c1fe7993320 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -42,14 +42,14 @@ static const MovLine ROBO_MPKT[3] = {
 };
 
 static const AniBlock ABLOCK6[3] = {
-	{  3, 1, ANI_VOR, ANI_GO, 0 },
-	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 14, 4, ANI_VOR, ANI_GO, 0 },
+	{  3, 1, ANI_FRONT, ANI_GO, 0 },
+	{ 13, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 14, 4, ANI_FRONT, ANI_GO, 0 },
 };
 
 static const AniBlock ABLOCK7[2] = {
-	{ 1, 2, ANI_VOR, ANI_WAIT, 0 },
-	{ 2, 1, ANI_VOR, ANI_GO, 0 },
+	{ 1, 2, ANI_FRONT, ANI_WAIT, 0 },
+	{ 2, 1, ANI_FRONT, ANI_GO, 0 },
 };
 
 
@@ -59,7 +59,7 @@ void Room6::entry() {
 	_G(zoom_mov_fak) = 2;
 
 	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
-		_G(det)->start_detail(7, 255, ANI_VOR);
+		_G(det)->start_detail(7, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
 		if (!_G(flags).LoadGame)
 			++_G(spieler).R6RaumBetreten;
@@ -94,7 +94,7 @@ void Room6::init_robo() {
 void Room6::bola_knopf() {
 	if (!_G(spieler).R6BolaBecher) {
 		_G(det)->hide_static_spr(0);
-		start_detail_wait(0, 1, ANI_VOR);
+		start_detail_wait(0, 1, ANI_FRONT);
 		if (_G(spieler).R6BolaOk) {
 			_G(spieler).R6BolaBecher = true;
 			_G(det)->show_static_spr(0);
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index daee225ebeb..b8bb1816563 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -29,16 +29,16 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK10[4] = {
-	{ 15, 2, ANI_VOR, ANI_WAIT, 0 },
-	{ 16, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 17, 2, ANI_VOR, ANI_WAIT, 0 },
-	{ 18, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 15, 2, ANI_FRONT, ANI_WAIT, 0 },
+	{ 16, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 17, 2, ANI_FRONT, ANI_WAIT, 0 },
+	{ 18, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 static const AniBlock ABLOCK25[3] = {
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 5, 255, ANI_VOR, ANI_GO, 0 },
-	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 1, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 5, 255, ANI_FRONT, ANI_GO, 0 },
+	{ 4, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -83,8 +83,8 @@ void Room7::klingel() {
 		start_ani_block(3, ABLOCK25);
 
 		_G(det)->show_static_spr(7);
-		start_detail_wait(12, 1, ANI_VOR);
-		start_detail_wait(11, 1, ANI_VOR);
+		start_detail_wait(12, 1, ANI_FRONT);
+		start_detail_wait(11, 1, ANI_FRONT);
 		_G(det)->hide_static_spr(7);
 		_G(det)->stop_detail(5);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
@@ -94,26 +94,26 @@ void Room7::klingel() {
 		start_aad(6, 0);
 		start_ani_block(3, ABLOCK25);
 		_G(det)->show_static_spr(7);
-		start_detail_wait(10, 1, ANI_VOR);
-		_G(det)->start_detail(13, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_FRONT);
+		_G(det)->start_detail(13, 1, ANI_FRONT);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).NoScroll = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
-		_G(det)->start_detail(0, 255, ANI_VOR);
-		start_detail_wait(13, 1, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
+		start_detail_wait(13, 1, ANI_FRONT);
 		flic_cut(FCUT_001);
 		_G(det)->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 		set_person_pos(114, 138, P_CHEWY, -1);
 
-		start_detail_frame(19, 1, ANI_VOR, 6);
-		start_detail_frame(9, 1, ANI_VOR, 4);
+		start_detail_frame(19, 1, ANI_FRONT, 6);
+		start_detail_frame(9, 1, ANI_FRONT, 4);
 		_G(det)->show_static_spr(9);
 		wait_detail(9);
 		_G(det)->hide_static_spr(9);
@@ -130,15 +130,15 @@ void Room7::klingel() {
 		start_ani_block(3, ABLOCK25);
 		_G(det)->show_static_spr(7);
 		_G(det)->load_taf_seq(192, 74, nullptr);
-		_G(det)->start_detail(14, 1, ANI_VOR);
+		_G(det)->start_detail(14, 1, ANI_FRONT);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		_G(flags).NoScroll = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 		wait_detail(14);
 		start_ani_block(4, ABLOCK10);
 		_G(det)->hide_static_spr(7);
@@ -152,7 +152,7 @@ void Room7::klingel() {
 		_G(spieler).R7BorkFlug = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(8, 0);
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		_G(obj)->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		_G(flags).NoPalAfterFlc = false;
@@ -173,7 +173,7 @@ void Room7::gedAction(int index) {
 	if (index == 0 && _G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		set_person_pos(180, 124, P_CHEWY, P_LEFT);
-		start_detail_wait(20, 1, ANI_VOR);
+		start_detail_wait(20, 1, ANI_FRONT);
 		_G(det)->show_static_spr(10);
 		wait_show_screen(10 * _G(spieler).DelaySpeed);
 		_G(det)->hide_static_spr(10);
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index fd601712b11..bae684abc10 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -31,13 +31,13 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK12[2] = {
-	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 9, 2, ANI_VOR, ANI_GO, 0 },
+	{ 8, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 9, 2, ANI_FRONT, ANI_GO, 0 },
 };
 
 static const AniBlock ABLOCK13[2] = {
-	{10, 1, ANI_VOR, ANI_WAIT, 0},
-	{11, 255, ANI_VOR, ANI_GO, 0},
+	{10, 1, ANI_FRONT, ANI_WAIT, 0},
+	{11, 255, ANI_FRONT, ANI_GO, 0},
 };
 
 void Room8::entry() {
@@ -52,12 +52,12 @@ void Room8::entry() {
 void Room8::start_folter() {
 	_G(atds)->set_ats_str(67, 1, ATS_DATEI);
 	_G(det)->stop_detail(19);
-	_G(det)->start_detail(13, 255, ANI_VOR);
+	_G(det)->start_detail(13, 255, ANI_FRONT);
 }
 
 void Room8::stop_folter() {
 	_G(atds)->set_ats_str(67, 0, ATS_DATEI);
-	_G(det)->start_detail(19, 255, ANI_VOR);
+	_G(det)->start_detail(19, 255, ANI_FRONT);
 
 	_G(det)->stop_detail(13);
 
@@ -71,9 +71,9 @@ void Room8::hole_kohle() {
 	} else {
 		hideCur();
 		_G(spieler).R8Kohle = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_VOR);
+		start_detail_wait(12, 1, ANI_FRONT);
 		cur_2_inventory();
 		invent_2_slot(KOHLE_HEISS_INV);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -85,7 +85,7 @@ void Room8::start_verbrennen() {
 	hideCur();
 
 	if (!_G(spieler).inv_cur) {
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		start_aad(102, 0);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK12);
@@ -118,16 +118,16 @@ bool Room8::gips_wurf() {
 		hideCur();
 		actionFl = true;
 		_G(det)->load_taf_seq(116, 30, nullptr);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(maus_links_click) = false;
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
-		start_detail_frame(5, 1, ANI_VOR, 16);
-		start_detail_wait(6, 1, ANI_VOR);
+		start_detail_frame(5, 1, ANI_FRONT, 16);
+		start_detail_wait(6, 1, ANI_FRONT);
 		_G(obj)->show_sib(33);
 		_G(det)->show_static_spr(14);
 		wait_detail(5);
@@ -135,13 +135,13 @@ bool Room8::gips_wurf() {
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
 		_G(obj)->setInventory(MASKE_INV, 181, 251, 8, &_G(room_blk));
 		_G(det)->del_taf_tbl(116, 30, nullptr);
-		auto_move(8, P_CHEWY);
+		autoMove(8, P_CHEWY);
 		_G(flags).AtsAction = false;
 		_G(menu_item) = CUR_USE;
 		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
 		_G(flags).AtsAction = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(20, 1, ANI_VOR);
+		start_detail_wait(20, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
 		cursorChoice(_G(menu_item));
@@ -155,7 +155,7 @@ void Room8::open_gdoor() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->show_static_spr(17);
 	set_up_screen(DO_SETUP);
-	start_detail_wait(7, 1, ANI_VOR);
+	start_detail_wait(7, 1, ANI_FRONT);
 	_G(det)->show_static_spr(15);
 	_G(det)->hide_static_spr(17);
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -167,7 +167,7 @@ void Room8::open_gdoor() {
 }
 
 void Room8::talk_nimoy() {
-	auto_move(9, P_CHEWY);
+	autoMove(9, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(0, 120);
 	if (_G(spieler).R8Folter) {
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index d119312834c..4afe2c1b962 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -62,7 +62,7 @@ void Room9::entry() {
 void Room9::gtuer() {
 	_G(spieler).R9Gitter = true;
 	_G(det)->show_static_spr(5);
-	start_detail_wait(6, 1, ANI_VOR);
+	start_detail_wait(6, 1, ANI_FRONT);
 	set_person_pos(74, 93, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
@@ -101,11 +101,11 @@ void Room9::surimy_ani() {
 	_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
-	start_detail_frame(0, 1, ANI_VOR, 15);
-	_G(det)->start_detail(2, 1, ANI_VOR);
+	start_detail_frame(0, 1, ANI_FRONT, 15);
+	_G(det)->start_detail(2, 1, ANI_FRONT);
 	wait_detail(0);
-	start_detail_wait(1, 1, ANI_VOR);
-	start_spz(CH_EKEL, 2, ANI_VOR, P_CHEWY);
+	start_detail_wait(1, 1, ANI_FRONT);
+	start_spz(CH_EKEL, 2, ANI_FRONT, P_CHEWY);
 	_G(det)->hide_static_spr(4);
 	_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 9199282f459..d140772e8d4 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -38,7 +38,7 @@ void Room10::entry() {
 		_G(fx_blend) = BLEND_NONE;
 		flic_cut(FCUT_003);
 		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		hideCur();
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(101, 0);
@@ -51,7 +51,7 @@ void Room10::entry() {
 
 void Room10::get_surimy() {
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	start_aad(104, 0);
 	flic_cut(FCUT_005);
 	_G(spieler).R10SurimyOk = true;
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 9b43cb7e6f8..7c10593667e 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -30,13 +30,13 @@ namespace Chewy {
 namespace Rooms {
 
 AniBlock ABLOCK17[2] = {
-	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 9, 255, ANI_VOR, ANI_GO, 0 },
+	{ 8, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 9, 255, ANI_FRONT, ANI_GO, 0 },
 };
 
 AniBlock ABLOCK18[2] = {
-	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 7, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 7, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 7, 1, ANI_BACK, ANI_WAIT, 0 },
 };
 
 
@@ -63,13 +63,13 @@ void Room11::entry() {
 
 		if (!_G(flags).LoadGame) {
 			start_ani_block(2, ABLOCK17);
-			auto_move(8, P_CHEWY);
+			autoMove(8, P_CHEWY);
 			start_aad_wait(31, -1);
 			_G(det)->stop_detail(9);
 		}
 		_G(det)->show_static_spr(8);
 		if (!_G(flags).LoadGame)
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 	}
 }
@@ -106,7 +106,7 @@ void Room11::bork_zwinkert() {
 void Room11::talk_debug() {
 	if (_G(spieler).R12ChewyBork) {
 		_G(flags).AutoAniPlay = true;
-		auto_move(8, P_CHEWY);
+		autoMove(8, P_CHEWY);
 		start_ads_wait(5);
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
@@ -126,7 +126,7 @@ void Room11::chewy_bo_use() {
 		start_aad_wait(32, -1);
 		_G(det)->stop_detail(9);
 		_G(det)->show_static_spr(8);
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 
 		_G(flags).AutoAniPlay = false;
 		showCur();
@@ -137,7 +137,7 @@ int16 Room11::scanner() {
 	int16 actionFl = false;
 
 	if (!_G(spieler).R12ChewyBork) {
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 
 		if (!_G(spieler).R11CardOk) {
 			actionFl = true;
@@ -194,7 +194,7 @@ void Room11::put_card() {
 	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
 		del_inventar(_G(spieler).R11IdCardNr);
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R11CardOk = true;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 0bfdaddd14a..9b2fd4e3913 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -58,8 +58,8 @@ static const MovLine R12_BORK_MPKT2[3] = {
 };
 
 static const AniBlock ABLOCK16[2] = {
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 1, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 1, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -85,7 +85,7 @@ void Room12::entry() {
 		_G(obj)->show_sib(SIB_TALISMAN_R12);
 		_G(obj)->calc_rsi_flip_flop(SIB_TALISMAN_R12);
 		_G(obj)->calc_all_static_detail();
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		start_spz(CH_TALK12, 255, false, 0);
 		start_aad_wait(109, -1);
 		showCur();
@@ -127,14 +127,14 @@ void Room12::init_bork() {
 			if (!_G(spieler).R12TalismanOk) {
 				hideCur();
 				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
 
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
 					_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 					wait_show_screen(10);
-					start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+					start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 					start_aad_wait(14, -1);
 				}
 
@@ -159,7 +159,7 @@ void Room12::bork_ok() {
 	hideCur();
 	_G(flags).MausLinks = true;
 	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
 	_G(spieler).R12BorkTalk = true;
 
@@ -170,7 +170,7 @@ void Room12::bork_ok() {
 
 	_G(spieler).R12BorkInRohr = true;
 	_G(det)->set_detail_pos(3, 170, 145);
-	_G(det)->start_detail(3, 255, ANI_VOR);
+	_G(det)->start_detail(3, 255, ANI_FRONT);
 	start_aad_wait(57, -1);
 	_G(det)->stop_detail(3);
 
@@ -179,7 +179,7 @@ void Room12::bork_ok() {
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
 	_G(det)->hide_static_spr(10);
-	start_detail_wait(4, 1, ANI_VOR);
+	start_detail_wait(4, 1, ANI_FRONT);
 	_G(talk_hide_static) = -1;
 	_G(det)->show_static_spr(12);
 	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
@@ -195,7 +195,7 @@ int16 Room12::use_terminal() {
 		action_flag = true;
 
 		if (!_G(spieler).R12ChewyBork) {
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 			start_aad_wait(110, -1);
 
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
@@ -215,7 +215,7 @@ int16 Room12::use_terminal() {
 				set_person_pos(108, 90, P_CHEWY, -1);
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
-				auto_move(4, P_CHEWY);
+				autoMove(4, P_CHEWY);
 				start_spz(68, 255, false, P_CHEWY);
 				start_aad_wait(113, 0);
 
@@ -251,7 +251,7 @@ int16 Room12::chewy_trans() {
 	if (!_G(spieler).inv_cur && _G(spieler).R12TransOn) {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
-		auto_move(9, P_CHEWY);
+		autoMove(9, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK16);
 		set_person_pos(108, 82, P_CHEWY, P_RIGHT);
@@ -273,7 +273,7 @@ int16 Room12::useTransformerTube() {
 			_G(uhr)->enable_timer();
 			_G(atds)->set_ats_str(117, 1, AAD_DATEI);
 		} else {
-			auto_move(7, P_CHEWY);
+			autoMove(7, P_CHEWY);
 			start_aad_wait(29, -1);
 		}
 	}
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index d5804f0a990..d523e2a8f09 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -120,9 +120,9 @@ void Room13::talk_bork() {
 		_G(auto_mov_vector)[R13_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 		_G(auto_mov_obj)[R13_BORK_OBJ].Mode = true;
 		init_auto_obj(R13_BORK_OBJ, &R13_BORK_PHASEN[0][0], 3, (const MovLine *)R13_BORK_MPKT);
-		auto_move(9, P_CHEWY);
+		autoMove(9, P_CHEWY);
 		wait_auto_obj(R13_BORK_OBJ);
-		auto_move(11, P_CHEWY);
+		autoMove(11, P_CHEWY);
 		_G(flags).NoScroll = true;
 		auto_scroll(41, 0);
 
@@ -159,16 +159,16 @@ void Room13::jmp_band() {
 			_G(spieler).room_e_obj[25].Attribut = 255;
 			_G(atds)->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(spieler).R13Band = true;
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_VOR);
+			start_detail_wait(8, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
 
 		} else {
 			_G(spieler).R13Surf = true;
 			_G(maus_links_click) = false;
-			auto_move(12, P_CHEWY);
+			autoMove(12, P_CHEWY);
 			start_aad_wait(117, -1);
 			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
@@ -203,9 +203,9 @@ void Room13::jmp_boden() {
 		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R13Band = false;
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		set_person_pos(176, 138, P_CHEWY, P_LEFT);
 	}
@@ -221,9 +221,9 @@ int16 Room13::monitor_knopf() {
 
 		} else if (!_G(spieler).R12ChewyBork) {
 			action_flag = true;
-			auto_move(8, P_CHEWY);
+			autoMove(8, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(6, 1, ANI_VOR);
+			start_detail_wait(6, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			if (_G(spieler).R13MonitorStatus)
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 9397cd3641f..cdc8f17c912 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -61,10 +61,10 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!_G(flags).AutoAniPlay && !_G(spieler).R14Feuer) {
 		_G(flags).AutoAniPlay = true;
 		_G(det)->hide_static_spr(9);
-		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_VOR);
+		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
 		_G(uhr)->reset_timer(t_nr, 0);
 		_G(det)->show_static_spr(9);
-		_G(det)->start_detail(7, 1, ANI_VOR);
+		_G(det)->start_detail(7, 1, ANI_FRONT);
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -73,9 +73,9 @@ int16 Room14::use_schrott() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur) {
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_VOR);
+		start_detail_wait(12, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Waffe) {
@@ -93,12 +93,12 @@ int16 Room14::use_gleiter() {
 
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 
 		if (!_G(spieler).R14GleiterAuf) {
 			_G(spieler).R14GleiterAuf = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(10, 1, ANI_VOR);
+			start_detail_wait(10, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(det)->show_static_spr(6);
 			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
@@ -113,7 +113,7 @@ int16 Room14::use_gleiter() {
 
 void Room14::talk_eremit()  {
 	if (!_G(spieler).R14Feuer) {
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(flags).AutoAniPlay = true;
 
 		if (_G(spieler).R14Translator) {
@@ -132,9 +132,9 @@ int16 Room14::use_schleim() {
 	int16 action_flag = false;
 
 	if (!_G(spieler).inv_cur) {
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(11, 1, ANI_VOR);
+		start_detail_wait(11, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Sicherung) {
@@ -157,35 +157,35 @@ void Room14::feuer() {
 	hideCur();
 
 	if (is_cur_inventar(BWAFFE_INV)) {
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		waffe = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(8, 1, ANI_VOR, 11);
-		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_frame(8, 1, ANI_FRONT, 11);
+		start_detail_wait(9, 1, ANI_FRONT);
 		wait_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		_G(det)->hide_static_spr(9);
-		start_detail_frame(2, 1, ANI_VOR, 9);
+		start_detail_frame(2, 1, ANI_FRONT, 9);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_VOR);
+		start_detail_wait(13, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_detail(2);
-		start_detail_wait(5, 1, ANI_VOR);
+		start_detail_wait(5, 1, ANI_FRONT);
 		_G(det)->show_static_spr(9);
 	}
 
 	del_inventar(tmp);
-	_G(det)->start_detail(6, 255, ANI_VOR);
+	_G(det)->start_detail(6, 255, ANI_FRONT);
 	wait_show_screen(40);
 
 	if (waffe)
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 
 	start_aad_wait(26, -1);
 	_G(det)->hide_static_spr(9);
-	start_detail_wait(3, 1, ANI_VOR);
+	start_detail_wait(3, 1, ANI_FRONT);
 	_G(det)->show_static_spr(9);
 	invent_2_slot(FLUXO_INV);
 	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index ab91ab7c243..6c0a16a64e9 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -48,7 +48,7 @@ int16 Room16::use_gleiter() {
 
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(spieler).R23GleiterExit = 16;
 		Room23::cockpit();
 	}
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 4359fa2c63c..47be4cdf92e 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -52,9 +52,9 @@ static const MovLine CHEWY_MPKT1[2] = {
 
 void Room17::entry() {
 	if (!_G(spieler).R17EnergieOut) {
-		_G(det)->start_detail(1, 255, ANI_VOR);
+		_G(det)->start_detail(1, 255, ANI_FRONT);
 		for (int i = 0; i < 3; ++i)
-			_G(det)->start_detail(6 + i, 255, ANI_VOR);
+			_G(det)->start_detail(6 + i, 255, ANI_FRONT);
 	}
 
 	plot_seil();
@@ -143,9 +143,9 @@ int16 Room17::use_seil() {
 
 		del_inventar(_G(spieler).AkInvent);
 		_G(flags).AutoAniPlay = true;
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_FRONT);
 		_G(spieler).R17Seil = true;
 		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
 		plot_seil();
@@ -168,10 +168,10 @@ void Room17::plot_seil() {
 }
 
 void Room17::kletter_down() {
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	_G(det)->load_taf_seq(177, 1, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(14, 1, ANI_VOR);
+	start_detail_wait(14, 1, ANI_FRONT);
 	_G(flags).ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
@@ -184,10 +184,10 @@ void Room17::kletter_down() {
 }
 
 void Room17::kletter_up() {
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 	_G(det)->load_taf_seq(141, 4, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(11, 1, ANI_VOR);
+	start_detail_wait(11, 1, ANI_FRONT);
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollyStep = 1;
@@ -244,7 +244,7 @@ void Room17::door_kommando(int16 mode) {
 			if (!_G(spieler).R17DoorKommand) {
 				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
 				_G(spieler).R17DoorKommand = true;
-				start_detail_wait(4, 1, ANI_VOR);
+				start_detail_wait(4, 1, ANI_FRONT);
 				stop_person(P_CHEWY);
 				_G(det)->show_static_spr(7);
 			}
@@ -263,7 +263,7 @@ void Room17::close_door() {
 		_G(spieler).R17DoorKommand = false;
 		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
 		_G(det)->hide_static_spr(7);
-		_G(det)->start_detail(4, 1, ANI_RUECK);
+		_G(det)->start_detail(4, 1, ANI_BACK);
 	}
 }
 
@@ -271,7 +271,7 @@ int16 Room17::energie_hebel() {
 	int16 action_flag = false;
 
 	hideCur();
-	auto_move(7, P_CHEWY);
+	autoMove(7, P_CHEWY);
 
 	if (!_G(spieler).R17HebelOk) {
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
@@ -291,10 +291,10 @@ int16 Room17::energie_hebel() {
 		_G(spieler).R17EnergieOut ^= 1;
 
 		if (!_G(spieler).R17EnergieOut) {
-			_G(det)->start_detail(1, 255, ANI_VOR);
+			_G(det)->start_detail(1, 255, ANI_FRONT);
 
 			for (int i = 0; i < 3; ++i)
-				_G(det)->start_detail(i + 6, 255, ANI_VOR);
+				_G(det)->start_detail(i + 6, 255, ANI_FRONT);
 		}
 
 		_G(atds)->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
@@ -318,15 +318,15 @@ int16 Room17::get_oel() {
 
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_EKEL, 3, false, P_CHEWY);
 		start_aad_wait(60, -1);
 	} else if (is_cur_inventar(BECHER_LEER_INV)) {
 		action_flag = true;
 		close_door();
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_VOR);
+		start_detail_wait(13, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
 		_G(obj)->addInventory(BECHER_VOLL_INV, &_G(room_blk));
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 3bb7a75cc75..48e9dd5860e 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -59,30 +59,30 @@ static const MovLine SURIMY_MPKT3[2] = {
 };
 
 static const AniBlock ABLOCK20[3] = {
-	{ 5, 3, ANI_VOR, ANI_GO, 0 },
-	{ 6, 3, ANI_VOR, ANI_GO, 0 },
-	{ 7, 3, ANI_VOR, ANI_WAIT, 0 }
+	{ 5, 3, ANI_FRONT, ANI_GO, 0 },
+	{ 6, 3, ANI_FRONT, ANI_GO, 0 },
+	{ 7, 3, ANI_FRONT, ANI_WAIT, 0 }
 };
 
 
 static const AniBlock ABLOCK21[2] = {
-	{  8, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 23, 255, ANI_RUECK, ANI_GO, 0 },
+	{  8, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 23, 255, ANI_BACK, ANI_GO, 0 },
 };
 
 static const AniBlock ABLOCK22[2] = {
-	{ 13, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 14, 13, ANI_VOR, ANI_GO, 0 },
+	{ 13, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 14, 13, ANI_FRONT, ANI_GO, 0 },
 };
 
 static const AniBlock ABLOCK23[2] = {
-	{ 11, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 12, 1, ANI_VOR, ANI_GO, 0 },
+	{ 11, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 12, 1, ANI_FRONT, ANI_GO, 0 },
 };
 
 static const AniBlock ABLOCK24[2] = {
-	{ 15, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 16, 7, ANI_VOR, ANI_GO, 0 },
+	{ 15, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 16, 7, ANI_FRONT, ANI_GO, 0 },
 };
 
 
@@ -129,20 +129,20 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 
 		if (t_nr == _G(timer_nr)[0]) {
 			_G(det)->hide_static_spr(16);
-			start_detail_wait(10, 1, ANI_VOR);
+			start_detail_wait(10, 1, ANI_FRONT);
 			_G(det)->show_static_spr(16);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
 			hideCur();
 			_G(det)->hide_static_spr(17);
-			start_detail_wait(9, 1, ANI_VOR);
+			start_detail_wait(9, 1, ANI_FRONT);
 			_G(det)->show_static_spr(17);
 
 			if (!_G(spieler).R18SondeMoni) {
 				_G(spieler).R18SondeMoni = true;
-				start_detail_wait(2, 1, ANI_VOR);
+				start_detail_wait(2, 1, ANI_FRONT);
 				_G(det)->show_static_spr(9);
-				start_detail_wait(4, 1, ANI_VOR);
+				start_detail_wait(4, 1, ANI_FRONT);
 				_G(det)->show_static_spr(11);
 				wait_show_screen(50);
 				_G(det)->hide_static_spr(9);
@@ -164,7 +164,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 void Room18::gedAction(int index) {
 	if (!index && !_G(spieler).R18SurimyWurf) {
 		stop_person(P_CHEWY);
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		start_aad(40, 0);
 	}
 }
@@ -205,8 +205,8 @@ int16 Room18::sonden_moni() {
 		action_flag = true;
 
 		hideCur();
-		auto_move(8, P_CHEWY);
-		start_detail_wait(3, 1, ANI_VOR);
+		autoMove(8, P_CHEWY);
+		start_detail_wait(3, 1, ANI_FRONT);
 		_G(det)->show_static_spr(10);
 		start_ani_block(3, ABLOCK20);
 
@@ -244,15 +244,15 @@ int16 Room18::calc_surimy() {
 		_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 
 		if (_G(spieler_vector)[P_CHEWY].Xypos[1] < 150) {
-			start_detail_frame(18, 1, ANI_VOR, 8);
+			start_detail_frame(18, 1, ANI_FRONT, 8);
 
 			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT3);
 			wait_detail(18);
 		} else {
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			stop_person(P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_frame(17, 1, ANI_VOR, 12);
+			start_detail_frame(17, 1, ANI_FRONT, 12);
 			_G(maus_links_click) = false;
 
 			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
@@ -264,8 +264,8 @@ int16 Room18::calc_surimy() {
 
 		_G(det)->set_detail_pos(21, 392, 170);
 		_G(det)->set_detail_pos(22, 447, 154);
-		start_detail_frame(21, 1, ANI_VOR, 14);
-		_G(det)->start_detail(22, 1, ANI_VOR);
+		start_detail_frame(21, 1, ANI_FRONT, 14);
+		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
 		_G(det)->set_static_pos(26, 392, 170, false, true);
 		_G(det)->show_static_spr(26);
@@ -290,8 +290,8 @@ int16 Room18::calc_surimy() {
 
 		_G(det)->set_detail_pos(21, 143, 170);
 		_G(det)->set_detail_pos(22, 198, 154);
-		start_detail_frame(21, 1, ANI_VOR, 14);
-		_G(det)->start_detail(22, 1, ANI_VOR);
+		start_detail_frame(21, 1, ANI_FRONT, 14);
+		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
 		_G(det)->set_static_pos(26, 143, 170, false, true);
 		_G(det)->show_static_spr(26);
@@ -332,7 +332,7 @@ int16 Room18::calc_schalter() {
 		action_flag = true;
 
 		hideCur();
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		monitor();
 		showCur();
 	}
@@ -347,7 +347,7 @@ short Room18::use_cart_moni() {
 		action_flag = true;
 
 		hideCur();
-		auto_move(9, P_CHEWY);
+		autoMove(9, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartTerminal ^= 1;
@@ -355,10 +355,10 @@ short Room18::use_cart_moni() {
 		if (!_G(spieler).R18CartTerminal) {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
 			_G(det)->hide_static_spr(23);
-			start_detail_wait(20, 1, ANI_RUECK);
+			start_detail_wait(20, 1, ANI_BACK);
 		} else {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
-			start_detail_wait(20, 1, ANI_VOR);
+			start_detail_wait(20, 1, ANI_FRONT);
 			_G(det)->show_static_spr(23);
 
 			if (_G(spieler).R18CartFach) {
@@ -381,7 +381,7 @@ int16 Room18::go_cyberspace() {
 		action_flag = true;
 
 		hideCur();
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		cur_2_inventory();
 		showCur();
 
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 4919d6b5276..a8050f3f4e1 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -57,9 +57,9 @@ static const MovLine SPINNE_MPKT2[2] = {
 };
 
 static const AniBlock ABLOCK19[3] = {
-	{ 12, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 13, 4, ANI_VOR, ANI_WAIT, 0 },
-	{ 14, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 12, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 13, 4, ANI_FRONT, ANI_WAIT, 0 },
+	{ 14, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 void Room21::entry() {
@@ -90,7 +90,7 @@ void Room21::calc_laser() {
 		_G(atds)->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		_G(spieler).R21Laser1Weg = false;
-		_G(det)->start_detail(3, 255, ANI_VOR);
+		_G(det)->start_detail(3, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
 	}
@@ -109,7 +109,7 @@ void Room21::calc_laser() {
 		_G(obj)->hide_sib(SIB_SEIL_R21);
 		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(spieler).R21Laser2Weg = false;
-		_G(det)->start_detail(4, 255, ANI_VOR);
+		_G(det)->start_detail(4, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 }
@@ -195,7 +195,7 @@ void Room21::chewy_kolli() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
 		_G(det)->set_detail_pos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
-		start_detail_wait(ani_nr, 1, ANI_VOR);
+		start_detail_wait(ani_nr, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		_G(spieler_vector)[P_CHEWY].Count = tmp;
@@ -232,7 +232,7 @@ void Room21::use_gitter_energie() {
 
 	switch_room(17);
 	_G(det)->hide_static_spr(5);
-	start_detail_wait(9, 1, ANI_VOR);
+	start_detail_wait(9, 1, ANI_FRONT);
 	_G(spieler).R17GitterWeg = true;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 }
@@ -244,7 +244,7 @@ int16 Room21::use_fenster() {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
 		_G(spieler).R18Gitter = true;
-		auto_move(13, P_CHEWY);
+		autoMove(13, P_CHEWY);
 		set_person_pos(541, 66, P_CHEWY, P_LEFT);
 		switch_room(18);
 
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 721db5a20a5..98648f6818f 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -54,8 +54,8 @@ static const MovLine BORK_MPKT2[2] = {
 };
 
 AniBlock ABLOCK14[2] = {
-	{0, 1, ANI_VOR, ANI_WAIT, 0},
-	{3, 255, ANI_VOR, ANI_GO, 0},
+	{0, 1, ANI_FRONT, ANI_WAIT, 0},
+	{3, 255, ANI_FRONT, ANI_GO, 0},
 };
 
 
@@ -83,11 +83,11 @@ int16 Room22::chewy_amboss() {
 		_G(flags).AutoAniPlay = true;
 		hideCur();
 
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(flags).NoPalAfterFlc = false;
 		flic_cut(FCUT_006);
 		_G(spieler).R22ChewyPlatt = true;
@@ -105,9 +105,9 @@ void Room22::bork(int16 t_nr) {
 
 		if (!_G(spieler).R22BorkPlatt) {
 			hideCur();
-			start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(10, -1);
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(auto_obj) = 1;
 			_G(mov_phasen)[BORK_OBJ].AtsText = 0;
 			_G(mov_phasen)[BORK_OBJ].Lines = 2;
@@ -140,7 +140,7 @@ void Room22::bork_walk1() {
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT);
 	wait_auto_obj(BORK_OBJ);
 
-	start_detail_wait(2, 1, ANI_VOR);
+	start_detail_wait(2, 1, ANI_FRONT);
 
 	_G(mov_phasen)[BORK_OBJ].Repeat = 1;
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT1);
@@ -161,7 +161,7 @@ void Room22::bork_walk2() {
 
 void Room22::get_bork() {
 	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(det)->hide_static_spr(4);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK14);
@@ -184,7 +184,7 @@ int16 Room22::malen() {
 	if (!_G(flags).AutoAniPlay && is_cur_inventar(17)) {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
-		auto_move(8, P_CHEWY);
+		autoMove(8, P_CHEWY);
 		flic_cut(FCUT_007);
 		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(spieler).R22Paint = true;
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 82eee61c8df..a0cade676ac 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -29,10 +29,10 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK15[4] = {
-	{ 0, 2, ANI_VOR, ANI_GO, 0 },
-	{ 1, 255, ANI_VOR, ANI_GO, 0 },
-	{ 2, 255, ANI_VOR, ANI_GO, 0 },
-	{ 3, 255, ANI_VOR, ANI_GO, 0 },
+	{ 0, 2, ANI_FRONT, ANI_GO, 0 },
+	{ 1, 255, ANI_FRONT, ANI_GO, 0 },
+	{ 2, 255, ANI_FRONT, ANI_GO, 0 },
+	{ 3, 255, ANI_FRONT, ANI_GO, 0 },
 };
 
 
@@ -96,7 +96,7 @@ int16 Room23::start_gleiter() {
 
 					switch_room(_G(spieler).R23GleiterExit);
 					start_spz_wait(CH_WONDER1, 2, false, P_CHEWY);
-					start_spz(CH_TALK2, 255, ANI_VOR, P_CHEWY);
+					start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
 
 					_G(spieler).DelaySpeed = 10;
 					start_aad_wait(59, -1);
@@ -134,7 +134,7 @@ void Room23::use_cartridge() {
 	if (_G(spieler).R18CartSave) {
 		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(111, 2, ATS_DATEI);
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 		_G(det)->show_static_spr(3);
 	} else {
 		_G(atds)->set_ats_str(111, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index cd42c7b7145..5e8ae52b681 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -57,7 +57,7 @@ void Room24::entry() {
 
 	for (int16 i = 0; i < 3; i++) {
 		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
-			_G(det)->start_detail(5 + i * 4, 255, ANI_RUECK);
+			_G(det)->start_detail(5 + i * 4, 255, ANI_BACK);
 	}
 }
 
@@ -89,7 +89,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		_G(spieler).R16F5Exit = true;
 		g_engine->_sound->playSound(1, 0);
 		g_engine->_sound->stopSound(1);
-		_G(det)->start_detail(1, 1, ANI_VOR);
+		_G(det)->start_detail(1, 1, ANI_FRONT);
 		_G(det)->show_static_spr(10);
 		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
 
@@ -97,7 +97,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		_G(det)->hide_static_spr(10);
 		g_engine->_sound->playSound(1, 1);
 		g_engine->_sound->stopSound(0);
-		_G(det)->start_detail(1, 1, ANI_RUECK);
+		_G(det)->start_detail(1, 1, ANI_BACK);
 		_G(spieler).R16F5Exit = false;
 		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
 	}
@@ -132,17 +132,17 @@ void Room24::calc_animation(int16 kristall_nr) {
 			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
 			g_engine->_sound->stopSound(0);
 			_G(det)->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_RUECK);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_RUECK);
-			_G(det)->start_detail(5 + kristall_nr * 4, 255, ANI_RUECK);
+			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_BACK);
+			start_detail_wait(6 + kristall_nr * 4, 1, ANI_BACK);
+			_G(det)->start_detail(5 + kristall_nr * 4, 255, ANI_BACK);
 
 		} else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 			int16 ani_nr = KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13 ? 7 : 8;
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(5 + ani_nr + kristall_nr * 4, 0);
 			_G(det)->stop_detail(5 + kristall_nr * 4);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_VOR);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_VOR);
+			start_detail_wait(6 + kristall_nr * 4, 1, ANI_FRONT);
+			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_FRONT);
 		}
 
 		showCur();
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index f02836a3be6..c901230b9e1 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -48,7 +48,7 @@ void Room25::entry() {
 		g_engine->_sound->playSound(0, 0);
 
 		for (int i = 0; i < 9; ++i)
-			_G(det)->start_detail(i, 255, ANI_VOR);
+			_G(det)->start_detail(i, 255, ANI_FRONT);
 	}
 
 	if (!_G(spieler).R29Schlauch2) {
@@ -77,7 +77,7 @@ void Room25::entry() {
 		_G(fx_blend) = BLEND_NONE;
 		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_spz(CH_TALK11, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK11, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(64, -1);
 		showCur();
 
@@ -101,7 +101,7 @@ int16 Room25::gleiter_loesch() {
 		if (!_G(spieler).inv_cur) {
 			action_flag = true;
 			_G(spieler).R25GleiteLoesch = true;
-			auto_move(2, P_CHEWY);
+			autoMove(2, P_CHEWY);
 			flic_cut(FCUT_030);
 			_G(obj)->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
 			_G(atds)->set_ats_str(219, 1, ATS_DATEI);
@@ -115,7 +115,7 @@ int16 Room25::gleiter_loesch() {
 	} else if (_G(spieler).R25GleiteLoesch) {
 		if (is_cur_inventar(MILCH_LEER_INV)) {
 			action_flag = true;
-			auto_move(2, P_CHEWY);
+			autoMove(2, P_CHEWY);
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
 			del_inventar(_G(spieler).AkInvent);
@@ -135,7 +135,7 @@ int16 Room25::use_gleiter() {
 	if (!_G(spieler).inv_cur && _G(spieler).R25GleiteLoesch) {
 		action_flag = true;
 		hideCur();
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		showCur();
 
 		_G(spieler).R23GleiterExit = 25;
@@ -161,7 +161,7 @@ void Room25::xit_gleiter() {
 		_G(fx_blend) = BLEND1;
 		set_up_screen(DO_SETUP);
 
-		start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(65, -1);
 		_G(fx_blend) = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 43e966b47a3..5d586d51ba9 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -50,7 +50,7 @@ void Room27::xit(int16 eib_nr) {
 			start_aad_wait(175, -1);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(2, 1, ANI_VOR);
+			start_detail_wait(2, 1, ANI_FRONT);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
 		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
@@ -65,7 +65,7 @@ void Room27::xit(int16 eib_nr) {
 void Room27::get_surimy() {
 	_G(obj)->calc_all_static_detail();
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		start_aad_wait(171, -1);
@@ -77,7 +77,7 @@ void Room27::get_surimy() {
 
 void Room27::talk_howard() {
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	start_aad_wait(173, -1);
 	showCur();
 }
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index d3571c0e8b9..23bc5b61cc1 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -62,13 +62,13 @@ void Room28::entry(int16 eib_nr) {
 				if (!_G(spieler).R28EntryHaus) {
 					_G(spieler).R28EntryHaus = true;
 					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
-					auto_move(3, P_HOWARD);
-					go_auto_xy(320, _G(spieler_vector)[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
+					autoMove(3, P_HOWARD);
+					goAutoXy(320, _G(spieler_vector)[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
 					start_aad_wait(176, -1);
 				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
 					_G(spieler).R28RKuerbis = true;
 					_G(spieler).ScrollxStep = 2;
-					auto_move(6, P_CHEWY);
+					autoMove(6, P_CHEWY);
 					wait_show_screen(10);
 					start_aad_wait(194, -1);
 					_G(spieler).room_e_obj[62].Attribut = 255;
@@ -117,15 +117,15 @@ void Room28::entry(int16 eib_nr) {
 					_G(fx_blend) = BLEND_NONE;
 					_G(flags).ExitMov = false;
 					_G(spieler_mi)[P_HOWARD].Mode = true;
-					go_auto_xy(420, 113, P_HOWARD, ANI_WAIT);
+					goAutoXy(420, 113, P_HOWARD, ANI_WAIT);
 					_G(spieler_mi)[P_HOWARD].Mode = false;
 					set_person_pos(440, 146, P_CHEWY, P_LEFT);
 					start_aad_wait(193, -1);
 				} else {
 					set_person_pos(480, 100, P_HOWARD, P_LEFT);
-					go_auto_xy(420, 113, P_HOWARD, ANI_GO);
+					goAutoXy(420, 113, P_HOWARD, ANI_GO);
 					_G(flags).ExitMov = false;
-					auto_move(6, P_CHEWY);
+					autoMove(6, P_CHEWY);
 				}
 				break;
 
@@ -151,7 +151,7 @@ void Room28::xit(int16 eib_nr) {
 		}
 
 		_G(flags).ExitMov = false;
-		auto_move(6, P_HOWARD);
+		autoMove(6, P_HOWARD);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
 	}
 
@@ -189,9 +189,9 @@ void Room28::haendler() {
 	_G(det)->set_static_ani(4, -1);
 	start_aad_wait(198, -1);
 	_G(SetUpScreenFunc) = setup_func;
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	set_person_spr(P_RIGHT, P_CHEWY);
 	_G(det)->del_static_ani(4);
 	wait_show_screen(28);
@@ -203,7 +203,7 @@ void Room28::setup_func() {
 	calc_person_look();
 
 	int16 x = (_G(spieler_vector)[P_CHEWY].Xypos[0] > 350) ? 420 : 320;
-	go_auto_xy(x, 113, P_HOWARD, ANI_GO);
+	goAutoXy(x, 113, P_HOWARD, ANI_GO);
 }
 
 void Room28::use_surimy() {
@@ -230,7 +230,7 @@ void Room28::use_surimy() {
 	}
 
 	_G(obj)->calc_all_static_detail();
-	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
 	_G(flags).NoScroll = false;
 	showCur();
@@ -243,7 +243,7 @@ void Room28::set_pump() {
 		if (!_G(flags).AutoAniPlay) {
 			_G(flags).AutoAniPlay = true;
 			if (_G(spieler_vector)[P_CHEWY].Xypos[0] < 380)
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
@@ -255,7 +255,7 @@ void Room28::set_pump() {
 				++_G(spieler).R28PumpTxt1;
 			}
 
-			start_detail_wait(tmp, 1, ANI_VOR);
+			start_detail_wait(tmp, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			load_chewy_taf(CHEWY_PUMPKIN);
@@ -296,7 +296,7 @@ void Room28::get_pump() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
 		_G(det)->set_detail_pos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
-		start_detail_wait(tmp, 1, ANI_RUECK);
+		start_detail_wait(tmp, 1, ANI_BACK);
 
 		invent_2_slot(K_MASKE_INV);
 		_G(atds)->set_ats_str(209, 0, ATS_DATEI);
@@ -305,7 +305,7 @@ void Room28::get_pump() {
 		load_chewy_taf(CHEWY_NORMAL);
 
 		if (_G(spieler).R28PumpTxt1 < 3) {
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(138, -1);
 		}
 
@@ -320,13 +320,13 @@ int16 Room28::use_breifkasten() {
 		action_flag = true;
 		hideCur();
 		_G(spieler).R28Briefkasten = false;
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->hide_static_spr(8);
 		_G(det)->hide_static_spr(9);
 		_G(det)->show_static_spr(7);
-		auto_move(8, P_CHEWY);
-		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		autoMove(8, P_CHEWY);
+		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(179, -1);
 		_G(atds)->set_ats_str(206, 0, ATS_DATEI);
 		showCur();
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index ac669922950..a327751ec42 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -28,17 +28,17 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK26[3] = {
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 0, 1, ANI_BACK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 static const AniBlock ABLOCK27[5] = {
-	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 0, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_BACK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 0, 1, ANI_BACK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 0, 1, ANI_BACK, ANI_WAIT, 0 },
 };
 
 
@@ -75,7 +75,7 @@ int16 Room29::use_pumpe() {
 			action_flag = true;
 			_G(spieler).R29Pumpe = true;
 			_G(spieler).R29Schlauch1 = true;
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->show_static_spr(7);
 			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
@@ -97,7 +97,7 @@ int16 Room29::get_schlauch() {
 		action_flag = true;
 		hideCur();
 
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		new_invent_2_cur(PUMPE_INV);
 
@@ -113,11 +113,11 @@ bool Room29::use_schlauch() {
 		result = true;
 		hideCur();
 
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(det)->hide_static_spr(7);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 		_G(det)->show_static_spr(8);
 		_G(det)->show_static_spr(10);
 		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
@@ -144,7 +144,7 @@ void Room29::schlitz_sitz() {
 		start_ani_block(3, ABLOCK26);
 		_G(det)->show_static_spr(9);
 		_G(det)->hide_static_spr(11);
-		_G(det)->start_detail(2, 255, ANI_VOR);
+		_G(det)->start_detail(2, 255, ANI_FRONT);
 		start_aad_wait(63, -1);
 
 		_G(det)->stop_detail(2);
@@ -164,9 +164,9 @@ int16 Room29::zaun_sprung() {
 		hideCur();
 		
 		action_flag = true;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(3, 1, ANI_VOR, 7);
+		start_detail_frame(3, 1, ANI_FRONT, 7);
 		_G(det)->hide_static_spr(9);
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 4e366b98a7c..be33ccee3cb 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -35,9 +35,9 @@ static const MovLine SURIMY_MPKT[2] = {
 };
 
 static const AniBlock ABLOCK30[3] = {
-	{ 0, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 1, 4, ANI_VOR, ANI_WAIT, 0 },
-	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 1, 4, ANI_FRONT, ANI_WAIT, 0 },
+	{ 2, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -61,7 +61,7 @@ void Room31::surimy_go() {
 			_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
@@ -97,7 +97,7 @@ int16 Room31::open_luke() {
 	if (!_G(spieler).inv_cur && _G(spieler).R31KlappeZu) {
 		action_flag = true;
 		hideCur();
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = false;
 		g_engine->_sound->playSound(3);
@@ -114,7 +114,7 @@ int16 Room31::close_luke_proc1() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R31KlappeZu) {
 		action_flag = true;
 		hideCur();
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		g_engine->_sound->playSound(3);
@@ -128,7 +128,7 @@ int16 Room31::close_luke_proc1() {
 void Room31::close_luke_proc3() {
 	if (!_G(spieler).R31KlappeZu) {
 		hideCur();
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(spieler).R31KlappeZu = true;
 		g_engine->_sound->playSound(3);
@@ -148,7 +148,7 @@ int16 Room31::use_topf() {
 		if (_G(spieler).R31PflanzeWeg) {
 			if (is_cur_inventar(K_KERNE_INV)) {
 				_G(spieler).R31KoernerDa = true;
-				auto_move(1, P_CHEWY);
+				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
@@ -158,7 +158,7 @@ int16 Room31::use_topf() {
 			} else if (is_cur_inventar(MILCH_WAS_INV)) {
 				if (_G(spieler).R31KoernerDa) {
 					_G(spieler).R31Wasser = true;
-					auto_move(1, P_CHEWY);
+					autoMove(1, P_CHEWY);
 					_G(spieler).PersonHide[P_CHEWY] = true;
 					start_ani_block(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
@@ -180,7 +180,7 @@ int16 Room31::use_topf() {
 							dia_nr = 180;
 						} else {
 							close_luke_proc3();
-							auto_move(3, P_CHEWY);
+							autoMove(3, P_CHEWY);
 							flic_cut(FCUT_046);
 							register_cutscene(13);
 							_G(spieler).R31SurFurz = true;
@@ -205,7 +205,7 @@ int16 Room31::use_topf() {
 	}
 	
 	if (dia_nr != -1) {
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index e2b80ba0e58..b48a9b8abe9 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -42,30 +42,30 @@ int16 Room32::use_howard() {
 
 	if (is_cur_inventar(TRICHTER_INV)) {
 		if (_G(spieler).R33MunterGet) {
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			cur_2_inventory();
 			remove_inventory(MUNTER_INV);
 			register_cutscene(11);
 			flic_cut(FCUT_043);
 			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
-			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(75, -1);
 			wait_show_screen(5);
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			wait_show_screen(10);
-			start_spz(CH_TALK12, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(125, -1);
 			wait_show_screen(10);
 
 			_G(det)->hide_static_spr(0);
-			start_detail_frame(0, 1, ANI_VOR, 9);
-			start_detail_wait(1, 1, ANI_RUECK);
+			start_detail_frame(0, 1, ANI_FRONT, 9);
+			start_detail_wait(1, 1, ANI_BACK);
 			_G(det)->show_static_spr(7);
 			_G(det)->show_static_spr(6);
 			wait_show_screen(20);
 			_G(det)->hide_static_spr(7);
-			start_detail_wait(1, 1, ANI_VOR);
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_detail_wait(1, 1, ANI_FRONT);
+			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			ani_nr = CH_TALK3;
 			dia_nr = 164;
 			_G(spieler).R32HowardWeg = true;
@@ -81,7 +81,7 @@ int16 Room32::use_howard() {
 	}
 
 	if (dia_nr) {
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
@@ -104,7 +104,7 @@ void Room32::use_schreibmaschine() {
 						ani_nr = CH_TALK12;
 						dia_nr = 87;
 					} else {
-						auto_move(3, P_CHEWY);
+						autoMove(3, P_CHEWY);
 						_G(spieler).R32UseSchreib = true;
 						cur_2_inventory();
 						flic_cut(FCUT_044);
@@ -119,7 +119,7 @@ void Room32::use_schreibmaschine() {
 				break;
 
 			case PAPIER_INV:
-				auto_move(2, P_CHEWY);
+				autoMove(2, P_CHEWY);
 				_G(spieler).R32PapierOk = true;
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
@@ -143,7 +143,7 @@ void Room32::use_schreibmaschine() {
 		dia_nr = 92;
 	}
 
-	start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 	start_aad_wait(dia_nr, -1);
 	showCur();
 }
@@ -154,12 +154,12 @@ int16 Room32::get_script() {
 	if (!_G(spieler).inv_cur && !_G(spieler).R32Script && _G(spieler).R32UseSchreib) {
 		action_flag = true;
 		_G(spieler).R32Script = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		invent_2_slot(MANUSKRIPT_INV);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(det)->hide_static_spr(5);
 		_G(atds)->set_ats_str(203, 0, ATS_DATEI);
-		start_spz(CH_TALK3, 1, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK3, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(91, -1);
 	}
 
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index cbbfcb7a66d..b3895cfe347 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -55,7 +55,7 @@ void Room33::surimy_go() {
 			_G(auto_mov_vector)[SURIMY_OBJ].Delay = _G(spieler).DelaySpeed + 2;
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
@@ -70,7 +70,7 @@ void Room33::look_schublade() {
 	if (!_G(spieler).R33SchubFirst) {
 		_G(spieler).R33SchubFirst = true;
 		hideCur();
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
 		showCur();
@@ -88,7 +88,7 @@ int16 Room33::use_schublade() {
 		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
 		_G(atds)->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
-		start_spz(CH_LGET_O, 1, ANI_VOR, P_CHEWY);
+		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
 		invent_2_slot(MESSER_INV);
 		showCur();
 	}
@@ -102,7 +102,7 @@ void Room33::use_maschine() {
 	hideCur();
 
 	if (!_G(spieler).R33MunterOk) {
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 
 		bool hocker = false;
 		if (_G(spieler).inv_cur) {
@@ -134,7 +134,7 @@ void Room33::use_maschine() {
 
 			if (action) {
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(0, 1, ANI_VOR);
+				start_detail_wait(0, 1, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				set_person_pos(128, 65, P_CHEWY, P_LEFT);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -157,22 +157,22 @@ void Room33::use_maschine() {
 			dia_nr = 66;
 		}
 
-		start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(2, 1, ANI_VOR);
+			start_detail_wait(2, 1, ANI_FRONT);
 			flic_cut(FCUT_031);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(71, -1);
 			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 
 		if (hocker) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(1, 1, ANI_VOR);
+			start_detail_wait(1, 1, ANI_FRONT);
 			set_person_pos(64, 100, P_CHEWY, P_LEFT);
 		}
 
@@ -202,12 +202,12 @@ int16 Room33::get_munter() {
 		action_flag = true;
 		hideCur();
 		_G(spieler).R33MunterGet = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(MUNTER_INV);
 		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(det)->hide_static_spr(3);
-		start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(72, -1);
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 4c80adeb842..086629df6bd 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -41,7 +41,7 @@ bool Room34::use_kuehlschrank() {
 
 		if (!_G(flags).LoadGame) {
 			hideCur();
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(maus_links_click) = false;
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O, 1, false, P_CHEWY);
 			showCur();
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index ab7cb372b6d..d230f38d801 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -30,8 +30,8 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK28[2] = {
-	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 5, 3, ANI_VOR, ANI_WAIT, 0 },
+	{ 4, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 5, 3, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -47,20 +47,20 @@ int16 Room35::schublade() {
 	if (_G(spieler).ChewyAni != CHEWY_ROCKER && !_G(spieler).inv_cur) {
 		if (!_G(spieler).R35Schublade) {
 			action_flag = true;
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->show_static_spr(1);
 			_G(spieler).R35Schublade = true;
 			_G(atds)->set_ats_str(234, 1, ATS_DATEI);
 		} else if (!_G(spieler).R35Falle) {
 			action_flag = true;
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(spieler).R35Falle = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_ani_block(2, ABLOCK28);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			set_person_pos(33, 90, P_CHEWY, P_LEFT);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(93, -1);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(atds)->set_ats_str(234, 2, ATS_DATEI);
@@ -78,24 +78,24 @@ int16 Room35::use_cat() {
 	if (_G(spieler).ChewyAni != CHEWY_ROCKER) {
 		if (is_cur_inventar(TRANSLATOR_INV)) {
 			action_flag = true;
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			_G(spieler).R35TransCat = true;
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			flic_cut(FCUT_045);
-			start_spz(CH_TRANS, 1, ANI_VOR, P_CHEWY);
+			start_spz(CH_TRANS, 1, ANI_FRONT, P_CHEWY);
 			start_aad_wait(94, -1);
 		} else if (is_cur_inventar(PUTENKEULE_INV)) {
 			action_flag = true;
 			disable_timer();
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			_G(spieler).R35CatEat = true;
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(_G(spieler).AkInvent);
 			_G(det)->stop_detail(0);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(1, 1, ANI_VOR);
-			_G(det)->start_detail(2, 1, ANI_VOR);
-			start_detail_wait(3, 1, ANI_VOR);
+			start_detail_wait(1, 1, ANI_FRONT);
+			_G(det)->start_detail(2, 1, ANI_FRONT);
+			start_detail_wait(3, 1, ANI_FRONT);
 			_G(obj)->show_sib(SIB_KNOCHEN_R35);
 			_G(obj)->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
 			_G(det)->show_static_spr(7);
@@ -107,7 +107,7 @@ int16 Room35::use_cat() {
 
 			_G(det)->set_static_ani(0, -1);
 			enable_timer();
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(95, -1);
 		}
 	}
@@ -118,7 +118,7 @@ int16 Room35::use_cat() {
 
 void Room35::talk_cat() {
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 
 	if (_G(spieler).R35TransCat) {
 		int16 dia_nr;
@@ -136,7 +136,7 @@ void Room35::talk_cat() {
 		switch_room(35);
 
 	} else {
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(96, -1);
 	}
 
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 9077135730e..1e38456802a 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -31,9 +31,9 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK31[3] = {
-	{ 0, 1, ANI_VOR, ANI_GO, 0 },
-	{ 1, 2, ANI_VOR, ANI_GO, 0 },
-	{ 5, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 0, 1, ANI_FRONT, ANI_GO, 0 },
+	{ 1, 2, ANI_FRONT, ANI_GO, 0 },
+	{ 5, 1, ANI_BACK, ANI_WAIT, 0 },
 };
 
 
@@ -80,7 +80,7 @@ void Room37::gedAction(int index) {
 		if (_G(spieler).R37Kloppe && !_G(spieler).R37Mes) {
 			stop_person(P_CHEWY);
 			_G(spieler).R37Mes = true;
-			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(142, -1);
 		}
 	}
@@ -93,7 +93,7 @@ void Room37::setup_func() {
 			(_G(minfo).x + _G(spieler).scrollx > 482)) {
 			// Don't allow moving into chicken coop area
 			// until the rooster has left
-			auto_move(7, P_CHEWY);
+			autoMove(7, P_CHEWY);
 			_G(maus_links_click) = false;
 		}
 	}
@@ -107,10 +107,10 @@ short Room37::use_wippe() {
 
 		if (is_cur_inventar(H_FUTTER_INV)) {
 			hideCur();
-			auto_move(0, P_CHEWY);
+			autoMove(0, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(129, 0);
-			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_047);
@@ -122,7 +122,7 @@ short Room37::use_wippe() {
 			_G(maus_links_click) = false;
 
 		} else {
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(160, -1);
 		}
 	}
@@ -169,10 +169,10 @@ int16 Room37::use_glas() {
 		if (is_cur_inventar(ANGEL2_INV)) {
 			_G(flags).NoScroll = true;
 			hideCur();
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(146, 0);
-			start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_048);
@@ -184,13 +184,13 @@ int16 Room37::use_glas() {
 			_G(atds)->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(obj)->show_sib(SIB_HFUTTER2_R37);
 			_G(spieler).R37Gebiss = true;
-			start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(146, -1);
 			showCur();
 			_G(flags).NoScroll = false;
 			g_engine->_sound->playSound(3);
 		} else {
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 		}
 	}
 
@@ -215,13 +215,13 @@ void Room37::dog_bell() {
 			disable_timer();
 			_G(det)->stop_detail(3);
 			_G(det)->del_static_ani(3);
-			start_detail_wait(5, 1, ANI_VOR);
+			start_detail_wait(5, 1, ANI_FRONT);
 			_G(det)->hide_static_spr(9);
-			start_detail_wait(6, 1, ANI_VOR);
+			start_detail_wait(6, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(det)->start_detail(11, 255, ANI_VOR);
+			_G(det)->start_detail(11, 255, ANI_FRONT);
 			flic_cut(FCUT_050);
-			start_detail_wait(6, 1, ANI_RUECK);
+			start_detail_wait(6, 1, ANI_BACK);
 			_G(det)->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
@@ -242,7 +242,7 @@ void Room37::dog_bell() {
 			_G(room)->set_timer_status(3, TIMER_STOP);
 			_G(det)->del_static_ani(3);
 			_G(det)->stop_detail(3);
-			start_detail_wait(4, 1, ANI_VOR);
+			start_detail_wait(4, 1, ANI_FRONT);
 			flic_cut(FCUT_051);
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054);
@@ -257,7 +257,7 @@ void Room37::dog_bell() {
 		_G(flags).AutoAniPlay = false;
 
 		if (dia_nr != -1) {
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(dia_nr, -1);
 		}
 	}
@@ -268,7 +268,7 @@ void Room37::dog_bell() {
 
 void Room37::talk_hahn() {
 	hideCur();
-	auto_move(7, P_CHEWY);
+	autoMove(7, P_CHEWY);
 	showCur();
 
 	if (!_G(spieler).R37TransHahn) {
@@ -284,7 +284,7 @@ void Room37::talk_hahn() {
 void Room37::use_hahn() {
 	if (is_cur_inventar(TRANSLATOR_INV)) {
 		hideCur();
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
 		start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 		flic_cut(FCUT_052);
@@ -298,12 +298,12 @@ void Room37::use_hahn() {
 		if (is_cur_inventar(GEBISS_INV)) {
 			_G(spieler).R37Kloppe = true;
 			hideCur();
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 			load_room_music(256);
 			_G(room)->set_timer_status(7, TIMER_STOP);
 			_G(det)->stop_detail(7);
 			_G(det)->del_static_ani(7);
-			_G(det)->start_detail(9, 1, ANI_VOR);
+			_G(det)->start_detail(9, 1, ANI_FRONT);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(GEBISS_INV);
 			_G(flags).NoScroll = true;
@@ -314,10 +314,10 @@ void Room37::use_hahn() {
 				SHOULD_QUIT_RETURN;
 			}
 
-			_G(det)->start_detail(4, 1, ANI_VOR);
+			_G(det)->start_detail(4, 1, ANI_FRONT);
 			_G(det)->hide_static_spr(0);
-			_G(det)->start_detail(10, 10, ANI_VOR);
-			auto_move(8, P_CHEWY);
+			_G(det)->start_detail(10, 10, ANI_FRONT);
+			autoMove(8, P_CHEWY);
 			flic_cut(FCUT_053);
 			_G(det)->stop_detail(10);
 
@@ -327,7 +327,7 @@ void Room37::use_hahn() {
 			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(det)->hide_static_spr(8);
-			start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(141, -1);
 			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index a1d9cd6d123..9978559a621 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -40,14 +40,14 @@ static const uint8 TV_FLIC[] = {
 };
 
 static const AniBlock ABLOCK33[2] = {
-	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 3, 255, ANI_VOR, ANI_GO, 0 },
+	{ 2, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 3, 255, ANI_FRONT, ANI_GO, 0 },
 };
 
 
 static const AniBlock ABLOCK29[2] = {
-	{ 8, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 9, 4, ANI_VOR, ANI_WAIT, 0 },
+	{ 8, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 9, 4, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 void Room39::entry() {
@@ -55,7 +55,7 @@ void Room39::entry() {
 		if (_G(spieler).R39HowardDa) {
 			_G(det)->show_static_spr(10);
 			if (!_G(spieler).R39HowardWach)
-				_G(det)->start_detail(1, 255, ANI_VOR);
+				_G(det)->start_detail(1, 255, ANI_FRONT);
 			else
 				_G(det)->set_static_ani(5, -1);
 
@@ -79,21 +79,21 @@ short Room39::use_howard() {
 				hideCur();
 				_G(spieler).R39HowardWach = true;
 				_G(spieler).R39ScriptOk = true;
-				auto_move(3, P_CHEWY);
+				autoMove(3, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				_G(det)->start_detail(6, 255, ANI_VOR);
+				_G(det)->start_detail(6, 255, ANI_FRONT);
 				start_aad_wait(170, -1);
 				_G(det)->stop_detail(6);
-				start_detail_wait(7, 1, ANI_VOR);
+				start_detail_wait(7, 1, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 
 				del_inventar(_G(spieler).AkInvent);
 				_G(det)->stop_detail(1);
 				start_ani_block(2, ABLOCK33);
-				start_spz(CH_TALK6, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 				start_aad_wait(167, -1);
 				_G(det)->stop_detail(3);
-				start_detail_wait(4, 1, ANI_VOR);
+				start_detail_wait(4, 1, ANI_FRONT);
 				_G(det)->set_static_ani(5, -1);
 				_G(atds)->set_ats_str(62, 1, ATS_DATEI);
 				start_aad_wait(169, -1);
@@ -119,7 +119,7 @@ short Room39::use_howard() {
 		}
 
 		if (dia_nr != -1) {
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(dia_nr, -1);
 			action_flag = true;
 		}
@@ -132,7 +132,7 @@ short Room39::use_howard() {
 
 void Room39::talk_howard() {
 	if (_G(spieler).R39HowardWach) {
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 		calc_person_dia(P_HOWARD);
@@ -141,7 +141,7 @@ void Room39::talk_howard() {
 			ok();
 		}
 	} else {
-		start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(168, -1);
 	}
 }
@@ -169,7 +169,7 @@ int16 Room39::use_tv() {
 	int16 action_flag = false;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	int16 cls_flag = false;
 
 	if (is_cur_inventar(ZAPPER_INV)) {
@@ -231,7 +231,7 @@ int16 Room39::use_tv() {
 			_G(out)->cls();
 			_G(out)->setPalette(_G(pal));
 			set_tv();
-			start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_TRANS, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(80, -1);
 
 			ani_nr = CH_TRANS;
@@ -247,7 +247,7 @@ int16 Room39::use_tv() {
 		action_flag = true;
 		if (_G(spieler).R39TvOn) {
 			if (_G(spieler).R39TranslatorUsed) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 				start_aad_wait(98, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				start_ani_block(2, ABLOCK29);
@@ -276,7 +276,7 @@ int16 Room39::use_tv() {
 
 	if (dia_nr != -1) {
 		if (ani_nr != -1)
-			start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(dia_nr, -1);
 		action_flag = true;
 	}
@@ -339,7 +339,7 @@ void Room39::set_tv() {
 
 	if (_G(spieler).R39TvOn) {
 		if (_G(spieler).R39TvKanal == 2) {
-			_G(det)->start_detail(0, 255, ANI_VOR);
+			_G(det)->start_detail(0, 255, ANI_FRONT);
 		} else {
 			_G(det)->stop_detail(0);
 			_G(det)->show_static_spr(_G(spieler).R39TvKanal + 4);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 2e56048cf60..7a8fbf8dd86 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -75,7 +75,7 @@ void Room40::entry(int16 eib_nr) {
 			switch (eib_nr) {
 			case 69:
 				set_person_pos(30, 105, P_HOWARD, P_RIGHT);
-				go_auto_xy(158, 99, P_HOWARD, ANI_GO);
+				goAutoXy(158, 99, P_HOWARD, ANI_GO);
 				break;
 
 			case 73:
@@ -161,7 +161,7 @@ bool Room40::timer(int16 t_nr, int16 ani_nr) {
 void Room40::move_train(int16 mode) {
 	_G(spieler).R40TrainMove = false;
 	hideCur();
-	auto_move(9, P_CHEWY);
+	autoMove(9, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(232, 0);
 
@@ -171,7 +171,7 @@ void Room40::move_train(int16 mode) {
 	int16 lx = -40;
 	int16 ax = -230;
 
-	_G(det)->start_detail(7, 20, ANI_VOR);
+	_G(det)->start_detail(7, 20, ANI_FRONT);
 	_G(det)->show_static_spr(11);
 
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
@@ -235,7 +235,7 @@ void Room40::setup_func() {
 			y = _G(spieler_vector)[P_HOWARD].Xypos[1];
 		}
 
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		goAutoXy(x, y, P_HOWARD, ANI_GO);
 	}
 
 	if (_G(spieler).R40PoliceWeg == false) {
@@ -245,14 +245,14 @@ void Room40::setup_func() {
 			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 			_G(det)->hide_static_spr(15);
-			_G(det)->start_detail(POLICE_LEFT, 1, ANI_VOR);
+			_G(det)->start_detail(POLICE_LEFT, 1, ANI_FRONT);
 			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 
 		switch (_G(spieler).R40PoliceAniStatus) {
 		case POLICE_LEFT:
 			if (_G(det)->get_ani_status(POLICE_LEFT) == false) {
-				_G(det)->start_detail(POLICE_OFFEN, 1, ANI_VOR);
+				_G(det)->start_detail(POLICE_OFFEN, 1, ANI_FRONT);
 				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
 			}
 			break;
@@ -260,7 +260,7 @@ void Room40::setup_func() {
 		case POLICE_OFFEN:
 			if (_G(det)->get_ani_status(POLICE_OFFEN) == false) {
 				_G(det)->show_static_spr(0);
-				_G(det)->start_detail(POLICE_FLASCHE, 1, ANI_VOR);
+				_G(det)->start_detail(POLICE_FLASCHE, 1, ANI_FRONT);
 				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
 			}
 			break;
@@ -281,12 +281,12 @@ void Room40::setup_func() {
 				if (_G(spieler).R40DuengerTele) {
 					hideCur();
 					_G(spieler).R40PoliceWeg = true;
-					_G(det)->start_detail(17, 255, ANI_VOR);
+					_G(det)->start_detail(17, 255, ANI_FRONT);
 					start_aad_wait(226, -1);
 					_G(det)->stop_detail(17);
 					_G(spieler).R40HoUse = true;
 					_G(person_end_phase)[P_CHEWY] = P_RIGHT;
-					start_detail_wait(10, 1, ANI_VOR);
+					start_detail_wait(10, 1, ANI_FRONT);
 					_G(person_end_phase)[P_HOWARD] = P_RIGHT;
 					start_aad_wait(224, -1);
 					_G(spieler).R40PoliceWeg = true;
@@ -298,7 +298,7 @@ void Room40::setup_func() {
 					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
 
 				} else {
-					_G(det)->start_detail(POLICE_RIGHT, 1, ANI_VOR);
+					_G(det)->start_detail(POLICE_RIGHT, 1, ANI_FRONT);
 					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
 				}
 			}
@@ -323,10 +323,10 @@ int16 Room40::use_mr_pumpkin() {
 			switch (_G(spieler).AkInvent) {
 			case CENT_INV:
 				action_ret = true;
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
-				start_detail_wait(15, 1, ANI_VOR);
-				start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+				start_detail_wait(15, 1, ANI_FRONT);
+				start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
 				start_aad_wait(200, -1);
 				break;
 
@@ -338,7 +338,7 @@ int16 Room40::use_mr_pumpkin() {
 						use_schalter(227);
 					else {
 						hideCur();
-						auto_move(8, P_CHEWY);
+						autoMove(8, P_CHEWY);
 						start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
 						del_inventar(_G(spieler).AkInvent);
 						_G(out)->ausblenden(1);
@@ -372,10 +372,10 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		action_flag = true;
 
 		hideCur();
-		auto_move(8, P_CHEWY);
+		autoMove(8, P_CHEWY);
 
 		if (_G(spieler).R40PoliceAniStatus != 255) {
-			start_spz(CH_PUMP_TALK, 255, ANI_VOR, P_CHEWY);
+			start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(204, -1);
 
 			while (_G(spieler).R40PoliceAniStatus != 255) {
@@ -392,16 +392,16 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		if (_G(spieler).R40PoliceAb) {
 			_G(spieler).R40PoliceAb = false;
 			stop_spz();
-			go_auto_xy(308, 100, P_HOWARD, ANI_WAIT);
+			goAutoXy(308, 100, P_HOWARD, ANI_WAIT);
 			_G(spieler).R40HoUse = false;
 		}
 
 		_G(det)->hide_static_spr(15);
-		start_detail_wait(12, 1, ANI_VOR);
+		start_detail_wait(12, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
 		start_aad_wait(aad_nr, -1);
 		_G(det)->del_static_ani(14);
-		start_detail_wait(13, 1, ANI_VOR);
+		start_detail_wait(13, 1, ANI_FRONT);
 		_G(det)->show_static_spr(15);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
@@ -416,7 +416,7 @@ void Room40::talk_police() {
 		hideCur();
 		_G(spieler).R40PoliceStart = false;
 		_G(room)->set_timer_status(255, TIMER_STOP);
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		start_aad_wait(203, -1);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
@@ -428,7 +428,7 @@ void Room40::talk_handler() {
 	if (!_G(spieler).R40HaendlerOk) {
 		_G(spieler).flags38_2 = true;
 		hideCur();
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(det)->del_static_ani(4);
 		_G(room)->set_timer_status(4, TIMER_STOP);
 		_G(det)->set_static_ani(3, -1);
@@ -455,10 +455,10 @@ int16 Room40::use_haendler() {
 			_G(spieler).R40TeilKarte = true;
 			_G(spieler).R40DuengerMit = true;
 			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
-			auto_move(10, P_CHEWY);
-			auto_move(11, P_HOWARD);
+			autoMove(10, P_CHEWY);
+			autoMove(11, P_HOWARD);
 			start_aad_wait(208, -1);
-			auto_move(6, P_HOWARD);
+			autoMove(6, P_HOWARD);
 			_G(flags).NoScroll = true;
 
 			auto_scroll(270, 0);
@@ -487,7 +487,7 @@ int16 Room40::use_haendler() {
 				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
-				auto_move(11, P_HOWARD);
+				autoMove(11, P_HOWARD);
 				start_aad_wait(210, -1);
 			}
 
@@ -510,8 +510,8 @@ int16 Room40::use_bmeister() {
 		action_flag = true;
 		hideCur();
 		_G(spieler).R40HoUse = true;
-		auto_move(9, P_CHEWY);
-		auto_move(11, P_HOWARD);
+		autoMove(9, P_CHEWY);
+		autoMove(11, P_HOWARD);
 		start_aad_wait(214, -1);
 		bmeister_dia(215);
 		start_aad_wait(216, -1);
@@ -540,14 +540,14 @@ int16 Room40::use_bmeister() {
 }
 
 void Room40::bmeister_dia(int16 aad_nr) {
-	auto_move(7, P_CHEWY);
-	auto_move(12, P_HOWARD);
+	autoMove(7, P_CHEWY);
+	autoMove(12, P_HOWARD);
 	_G(flags).NoScroll = true;
 	auto_scroll(206, 0);
 	_G(det)->del_static_ani(0);
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->stop_detail(0);
-	start_detail_wait(1, 1, ANI_VOR);
+	start_detail_wait(1, 1, ANI_FRONT);
 	_G(det)->set_static_ani(2, -1);
 
 	if (aad_nr == 237) {
@@ -564,8 +564,8 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	_G(room)->set_timer_status(0, TIMER_START);
 	_G(det)->set_static_ani(0, -1);
 	_G(det)->del_static_ani(2);
-	auto_move(11, P_HOWARD);
-	auto_move(9, P_CHEWY);
+	autoMove(11, P_HOWARD);
+	autoMove(9, P_CHEWY);
 }
 
 bool Room40::use_police() {
@@ -579,14 +579,14 @@ bool Room40::use_police() {
 			_G(spieler).R40PoliceStart = false;
 			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(spieler).R40HoUse = true;
-			auto_move(9, P_CHEWY);
-			auto_move(11, P_HOWARD);
+			autoMove(9, P_CHEWY);
+			autoMove(11, P_HOWARD);
 			start_aad_wait(217, -1);
-			auto_move(8, P_CHEWY);
-			go_auto_xy(300, 120, P_HOWARD, ANI_WAIT);
+			autoMove(8, P_CHEWY);
+			goAutoXy(300, 120, P_HOWARD, ANI_WAIT);
 			_G(person_end_phase)[P_HOWARD] = P_RIGHT;
 			start_aad_wait(218, -1);
-			start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+			start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 			_G(menu_item) = CUR_WALK;
 			cursorChoice(_G(menu_item));
 			showCur();
@@ -612,7 +612,7 @@ int16 Room40::use_tele() {
 			_G(spieler).R40HoUse = false;
 
 		} else {
-			auto_move(13, P_CHEWY);
+			autoMove(13, P_CHEWY);
 			_G(det)->show_static_spr(0);
 
 			int16 dia_nr;
@@ -625,9 +625,9 @@ int16 Room40::use_tele() {
 			}
 
 			start_aad_wait(dia_nr, -1);
-			auto_move(11, P_HOWARD);
+			autoMove(11, P_HOWARD);
 			_G(det)->hide_static_spr(0);
-			auto_move(9, P_CHEWY);
+			autoMove(9, P_CHEWY);
 			start_aad_wait(dia_nr1, -1);
 			_G(spieler).R40HoUse = false;
 			int16 timer_wert = 0;
@@ -640,7 +640,7 @@ int16 Room40::use_tele() {
 				}
 
 				invent_2_slot(LIKOER_INV);
-				auto_move(1, P_CHEWY);
+				autoMove(1, P_CHEWY);
 				_G(spieler).R40DuengerMit = false;
 				_G(spieler).R40DuengerTele = true;
 				_G(flags).MausLinks = true;
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index bcba7bd8416..a29ed6e8a62 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -30,8 +30,8 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK32[2] = {
-	{ 6, 255, ANI_VOR, ANI_GO, 0 },
-	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 255, ANI_FRONT, ANI_GO, 0 },
+	{ 2, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -49,7 +49,7 @@ void Room41::entry() {
 			_G(det)->set_static_ani(0, -1);
 			start_aad_wait(127, -1);
 		} else {
-			_G(det)->start_detail(6, 255, ANI_VOR);
+			_G(det)->start_detail(6, 255, ANI_FRONT);
 		}
 	}
 
@@ -83,16 +83,16 @@ void Room41::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
 		if (_G(spieler_vector)->Xypos[P_HOWARD] == 160) {
-			go_auto_xy(258, 75, P_HOWARD, ANI_GO);
+			goAutoXy(258, 75, P_HOWARD, ANI_GO);
 		} else {
-			go_auto_xy(246, 120, P_HOWARD, ANI_GO);
+			goAutoXy(246, 120, P_HOWARD, ANI_GO);
 		}
 	}
 }
 
 void Room41::talk_hoggy1() {
 	stop_hoggy();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 
 	if (!_G(spieler).R41FirstTalk) {
 		first_talk();
@@ -109,7 +109,7 @@ void Room41::talk_hoggy1() {
 		} else if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 		} else {
 			start_aad_wait(130, -1);
@@ -123,7 +123,7 @@ void Room41::talk_hoggy1() {
 
 void Room41::talk_hoggy2() {
 	stop_hoggy();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	if (!_G(spieler).R41FirstTalk) {
 		first_talk();
@@ -132,7 +132,7 @@ void Room41::talk_hoggy2() {
 		if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
 			start_aad_wait(131, -1);
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 
 		} else {
@@ -179,7 +179,7 @@ int16 Room41::use_kasse() {
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		stop_hoggy();
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		start_aad_wait(133, -1);
 		start_hoggy();
 	}
@@ -194,7 +194,7 @@ int16 Room41::use_lola() {
 		hideCur();
 		action_flag = true;
 		_G(spieler).R41LolaOk = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		g_engine->_sound->stopSound(0);
 		flic_cut(FCUT_057);
 		set_person_pos(127, 112, P_CHEWY, P_LEFT);
@@ -216,13 +216,13 @@ int16 Room41::use_brief() {
 	if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
 		stop_hoggy();
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		start_aad_wait(126, -1);
 		start_hoggy();
 
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		stop_hoggy();
 		start_aad_wait(186, -1);
@@ -246,7 +246,7 @@ void Room41::sub_dia() {
 		start_aad_wait(163, -1);
 		_G(atds)->hide_item(11, 0, 2);
 		stop_ads_dialog();
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		new_invent_2_cur(PAPIER_INV);
 
 	} else {
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 865b7d3ed58..39a4c947ec0 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -33,7 +33,7 @@ namespace Rooms {
 void Room42::entry() {
 	if (!_G(spieler).R42BeamterWach) {
 		g_engine->_sound->playSound(0);
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
@@ -77,15 +77,15 @@ void Room42::setup_func() {
 
 void Room42::get_kuerbis(int16 aad_nr) {
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_RUECK);
+	start_detail_wait(7, 1, ANI_BACK);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	start_spz(CH_TALK5, 255, ANI_VOR, P_CHEWY);
+	start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 	start_aad_wait(aad_nr, -1);
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_VOR);
+	start_detail_wait(7, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	showCur();
 }
@@ -102,25 +102,25 @@ int16 Room42::use_psack() {
 		get_kuerbis(136);
 	} else if (_G(spieler).R42HoToBeamter && !_G(spieler).inv_cur && !_G(spieler).R42MarkeOk) {
 		action_flag = true;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_aad_wait(187, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_wait(9, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		new_invent_2_cur(BMARKE_INV);
 		start_aad_wait(181, -1);
 		_G(spieler).R42MarkeOk = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		start_aad_wait(185, -1);
 		_G(spieler).R42HoToBeamter = false;
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_VOR);
+		start_detail_wait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
 		start_aad_wait(183, -1);
@@ -147,13 +147,13 @@ int16 Room42::use_beamter() {
 		action_flag = true;
 		_G(atds)->set_ats_str(264, 2, ATS_DATEI);
 		hideCur();
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		start_aad_wait(184, -1);
 		_G(spieler).R42HoToBeamter = true;
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(_G(menu_item));
 		showCur();
-		start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+		start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 		_G(flags).MausLinks = false;
 	}
 
@@ -162,7 +162,7 @@ int16 Room42::use_beamter() {
 
 void Room42::talk_beamter() {
 	int16 dia_nr;
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 
 	if (!_G(spieler).R42BeamterWach) {
 		dia_nr = 10;
@@ -189,16 +189,16 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 		switch (str_end_nr) {
 		case 1:
-			start_detail_wait(3, 4, ANI_VOR);
+			start_detail_wait(3, 4, ANI_FRONT);
 			break;
 
 		case 2:
 			g_engine->_sound->playSound(4);
-			start_detail_wait(4, 13, ANI_VOR);
+			start_detail_wait(4, 13, ANI_FRONT);
 			break;
 
 		case 3:
-			start_detail_wait(5, 2, ANI_VOR);
+			start_detail_wait(5, 2, ANI_FRONT);
 			break;
 
 		default:
@@ -212,8 +212,8 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 		_G(det)->stop_detail(0);
 		g_engine->_sound->stopSound(0);
-		start_detail_wait(1, 1, ANI_VOR);
-		_G(det)->start_detail(2, 255, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
+		_G(det)->start_detail(2, 255, ANI_FRONT);
 
 		while (_G(atds)->aad_get_status() != -1) {
 			set_up_screen(DO_SETUP);
@@ -221,13 +221,13 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		}
 
 		_G(det)->stop_detail(2);
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
 	}
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->start_detail(6, 255, ANI_VOR);
+	_G(det)->start_detail(6, 255, ANI_FRONT);
 	start_aad_wait(135, -1);
 	_G(det)->stop_detail(6);
 	_G(flags).NoDiaBox = false;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index add26e5f33c..fe7bdcb21e6 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -133,7 +133,7 @@ void Room45::setup_func() {
 							x = 0;
 						}
 						_G(det)->set_detail_pos(3 + i, x, y);
-						_G(det)->start_detail(3 + i, 255, ANI_VOR);
+						_G(det)->start_detail(3 + i, 255, ANI_FRONT);
 					}
 				}
 			}
@@ -160,7 +160,7 @@ void Room45::setup_func() {
 				y = 122;
 			}
 
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+			goAutoXy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
 }
@@ -168,7 +168,7 @@ void Room45::setup_func() {
 int16 Room45::use_taxi() {
 	int16 action_ret = false;
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).ChewyAni == CHEWY_PUMPKIN) {
@@ -199,11 +199,11 @@ int16 Room45::use_taxi() {
 void Room45::talk_taxi(int16 aad_nr) {
 	_G(room)->set_timer_status(12, TIMER_STOP);
 	_G(det)->del_static_ani(12);
-	start_detail_wait(13, 1, ANI_VOR);
+	start_detail_wait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
 	start_aad_wait(aad_nr, -1);
 	_G(det)->del_static_ani(14);
-	start_detail_wait(13, 1, ANI_RUECK);
+	start_detail_wait(13, 1, ANI_BACK);
 	_G(det)->set_static_ani(12, -1);
 	_G(room)->set_timer_status(12, TIMER_START);
 }
@@ -214,12 +214,12 @@ void Room45::taxi_mov() {
 	_G(det)->del_static_ani(12);
 	g_engine->_sound->playSound(15, 1);
 	_G(det)->show_static_spr(11);
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		go_auto_xy(93, 127, P_HOWARD, ANI_WAIT);
+		goAutoXy(93, 127, P_HOWARD, ANI_WAIT);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
@@ -229,7 +229,7 @@ void Room45::taxi_mov() {
 	g_engine->_sound->playSound(15, 2);
 	g_engine->_sound->playSound(15, 2, false);
 	g_engine->_sound->playSound(15, 0);
-	start_detail_wait(15, 1, ANI_VOR);
+	start_detail_wait(15, 1, ANI_FRONT);
 	g_engine->_sound->stopSound(0);
 	switch_room(48);
 }
@@ -237,7 +237,7 @@ void Room45::taxi_mov() {
 int16 Room45::use_boy() {
 	int16 action_ret = false;
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	if (!_G(spieler).R45MagOk) {
 		if (is_cur_inventar(DOLLAR175_INV)) {
@@ -247,7 +247,7 @@ int16 Room45::use_boy() {
 			start_aad_wait(258, -1);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(1, 1, ANI_VOR);
+			start_detail_wait(1, 1, ANI_FRONT);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(0, -1);
 			_G(spieler).R45MagOk = true;
@@ -265,7 +265,7 @@ void Room45::talk_boy() {
 	hideCur();
 
 	if (!_G(spieler).R45MagOk) {
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		aad_nr = 257;
 	} else {
 		aad_nr = 259;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 010d719f447..32a0641b538 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -36,7 +36,7 @@ void Room46::entry(int16 eib_nr) {
 
 		if (eib_nr == 79) {
 			set_person_pos(140, 90, P_HOWARD, P_LEFT);
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			set_person_spr(P_LEFT, P_CHEWY);
 		}
 	}
@@ -93,7 +93,7 @@ void Room46::setup_func() {
 		y = 200;
 	}
 
-	go_auto_xy(x, y, P_HOWARD, ANI_GO);
+	goAutoXy(x, y, P_HOWARD, ANI_GO);
 }
 
 void Room46::bodo() {
@@ -102,34 +102,34 @@ void Room46::bodo() {
 	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 	start_aad_wait(240, -1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(42, 76, P_CHEWY, ANI_WAIT);
+	goAutoXy(42, 76, P_CHEWY, ANI_WAIT);
 	start_aad_wait(250, -1);
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	set_person_spr(P_RIGHT, P_CHEWY);
 	start_aad_wait(251, -1);
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	start_detail_wait(0, 1, ANI_VOR);
-	_G(det)->start_detail(5, 255, ANI_VOR);
+	start_detail_wait(0, 1, ANI_FRONT);
+	_G(det)->start_detail(5, 255, ANI_FRONT);
 	start_aad_wait(241, -1);
 	_G(det)->stop_detail(5);
 	_G(det)->show_static_spr(5);
 	start_aad_wait(609, -1);
 	_G(det)->hide_static_spr(5);
-	start_detail_wait(2, 1, ANI_VOR);
-	start_detail_wait(3, 1, ANI_VOR);
-	_G(det)->start_detail(4, 255, ANI_VOR);
+	start_detail_wait(2, 1, ANI_FRONT);
+	start_detail_wait(3, 1, ANI_FRONT);
+	_G(det)->start_detail(4, 255, ANI_FRONT);
 	start_aad_wait(242, -1);
 	_G(det)->stop_detail(4);
 
 	_G(det)->show_static_spr(6);
 	start_aad_wait(610, -1);
 	_G(det)->hide_static_spr(6);
-	start_detail_wait(6, 1, ANI_VOR);
+	start_detail_wait(6, 1, ANI_FRONT);
 	_G(det)->show_static_spr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(1, 1, ANI_VOR);
+	start_detail_wait(1, 1, ANI_FRONT);
 	flic_cut(FCUT_065);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
@@ -188,7 +188,7 @@ int16 Room46::use_schloss() {
 		action_ret = true;
 
 		if (!_G(spieler).R46GetLeder) {
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			switch_room(47);
 		} else {
 			start_aad_wait(252, -1);
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 909c84d8356..28c600a1ba3 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -75,9 +75,9 @@ void Room48::frage() {
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
 		hideCur();
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		_G(det)->show_static_spr(6);
-		start_detail_wait(1, 1, ANI_RUECK);
+		start_detail_wait(1, 1, ANI_BACK);
 		_G(det)->hide_static_spr(6);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		showCur();
@@ -136,7 +136,7 @@ void Room48::setup_func() {
 							_G(room)->set_timer_status(0, TIMER_STOP);
 							_G(det)->stop_detail(0);
 							_G(det)->del_static_ani(0);
-							start_detail_wait(2, 1, ANI_VOR);
+							start_detail_wait(2, 1, ANI_FRONT);
 							g_engine->_sound->stopSound(0);
 							_G(menu_item) = CUR_WALK;
 							cursorChoice(_G(menu_item));
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 5366be43c0f..6f129d83377 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -30,8 +30,8 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK34[2] = {
-	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 7, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 6, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -63,7 +63,7 @@ void Room49::entry(int16 eib_nr) {
 			_G(maus_links_click) = false;
 			_G(spieler).scrollx = 320;
 			_G(spieler).scrolly = 0;
-			_G(det)->start_detail(5, 1, ANI_VOR);
+			_G(det)->start_detail(5, 1, ANI_FRONT);
 		} else if (eib_nr == 83) {
 			set_person_pos(377, 78, P_HOWARD, P_LEFT);
 		}
@@ -108,7 +108,7 @@ void Room49::calc_boy_ani() {
 	}
 
 	_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-	_G(det)->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_VOR);
+	_G(det)->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_FRONT);
 	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 }
 
@@ -127,15 +127,15 @@ void Room49::calc_boy() {
 		_G(SetUpScreenFunc) = nullptr;
 		start_aad_wait(262, -1);
 		_G(SetUpScreenFunc) = nullptr;
-		auto_move(3, P_CHEWY);
-		go_auto_xy(374, 79, P_HOWARD, ANI_WAIT);
+		autoMove(3, P_CHEWY);
+		goAutoXy(374, 79, P_HOWARD, ANI_WAIT);
 		set_person_spr(P_LEFT, P_HOWARD);
 		_G(det)->del_static_ani(2);
-		start_detail_wait(3, 1, ANI_VOR);
+		start_detail_wait(3, 1, ANI_FRONT);
 
 		_G(det)->show_static_spr(9);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		start_detail_wait(8, 1, ANI_VOR);
+		start_detail_wait(8, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(det)->hide_static_spr(9);
 		start_detail_wait(4, 1, ANI_GO);
@@ -153,7 +153,7 @@ int16 Room49::use_boy() {
 	if (is_cur_inventar(SPARK_INV)) {
 		action_ret = true;
 		hideCur();
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		talk_boy(265);
 		_G(spieler).R49WegFrei = true;
@@ -173,11 +173,11 @@ void Room49::use_boy_cigar() {
 	del_inventar(_G(spieler).AkInvent);
 	talk_boy(263);
 	_G(SetUpScreenFunc) = nullptr;
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 
 	const int16 zoom = _G(room)->_roomInfo->ZoomFak;
 	_G(room)->set_zoom(zoom);
-	go_auto_xy(416, 79, P_HOWARD, ANI_WAIT);
+	goAutoXy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
 	_G(flags).NoScroll = true;
 
@@ -206,7 +206,7 @@ void Room49::use_boy_cigar() {
 
 void Room49::talk_boy() {
 	if (!_G(spieler).R49BoyWeg) {
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		talk_boy(266 + (_G(spieler).R49WegFrei ? 1 : 0));
 	}
 }
@@ -246,20 +246,20 @@ int16 Room49::use_taxi() {
 		hideCur();
 		start_ani_block(2, ABLOCK34);
 		_G(det)->show_static_spr(7);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
-			go_auto_xy(507, 74, P_HOWARD, ANI_WAIT);
-			go_auto_xy(490, 58, P_HOWARD, ANI_WAIT);
+			goAutoXy(507, 74, P_HOWARD, ANI_WAIT);
+			goAutoXy(490, 58, P_HOWARD, ANI_WAIT);
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 
 		_G(det)->hide_static_spr(7);
-		start_detail_wait(5, 1, ANI_VOR);
+		start_detail_wait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
@@ -287,7 +287,7 @@ void Room49::setup_func() {
 			y = 90;
 		}
 
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		goAutoXy(x, y, P_HOWARD, ANI_GO);
 	}
 }
 
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index aa12f92054f..a2eda15c566 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -29,8 +29,8 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK36[2] = {
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 6, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 7, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 bool Room50::_wasser;
@@ -57,7 +57,7 @@ void Room50::entry(int16 eib_nr) {
 		if (_G(spieler).R50Zigarre) {
 			stop_cigar();
 		} else {
-			_G(det)->start_detail(0, 255, ANI_VOR);
+			_G(det)->start_detail(0, 255, ANI_FRONT);
 		}
 
 		if (!_G(spieler).R50KeyOK) {
@@ -118,7 +118,7 @@ void Room50::stop_cigar() {
 void Room50::calc_wasser() {
 	if (!_wasser) {
 		stop_page();
-		_G(det)->start_detail(4, 1, ANI_VOR);
+		_G(det)->start_detail(4, 1, ANI_FRONT);
 		_wasser = true;
 	}
 }
@@ -149,7 +149,7 @@ void Room50::calc_treppe() {
 			stop_page();
 			_G(det)->set_static_ani(5, -1);
 			start_aad_wait(272, -1);
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			aad_page(273, 5);
 			_G(flags).NoScroll = false;
 		}
@@ -165,7 +165,7 @@ int16 Room50::use_gutschein() {
 		action_ret = true;
 		if (!_G(spieler).R50KeyOK) {
 			hideCur();
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
 			stop_page();
@@ -190,30 +190,30 @@ int16 Room50::use_gum() {
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_wasser = false;
 		stop_page();
-		start_detail_wait(6, 1, ANI_VOR);
+		start_detail_wait(6, 1, ANI_FRONT);
 		_G(det)->set_static_ani(5, -1);
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		go_auto_xy(75, 92, P_CHEWY, ANI_WAIT);
+		goAutoXy(75, 92, P_CHEWY, ANI_WAIT);
 		_G(SetUpScreenFunc) = nullptr;
-		go_auto_xy(112, 57, P_HOWARD, ANI_WAIT);
+		goAutoXy(112, 57, P_HOWARD, ANI_WAIT);
 
 		set_person_spr(P_LEFT, P_HOWARD);
 		del_inventar(_G(spieler).AkInvent);
 		hide_person();
-		start_detail_wait(2, 1, ANI_VOR);
+		start_detail_wait(2, 1, ANI_FRONT);
 		_G(det)->show_static_spr(4);
-		start_detail_wait(2, 1, ANI_RUECK);
+		start_detail_wait(2, 1, ANI_BACK);
 		show_person();
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(275, -1);
 		_G(det)->del_static_ani(5);
-		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_wait(9, 1, ANI_FRONT);
 		_G(det)->del_static_ani(5);
 		_G(det)->set_static_ani(10, -1);
 		start_aad_wait(277, -1);
 		_G(SetUpScreenFunc) = setup_func;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
 		_G(det)->del_static_ani(10);
 		go_page();
@@ -237,7 +237,7 @@ void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 	_G(det)->set_static_ani(ani_nr, -1);
 	start_aad_wait(aad_nr, -1);
 	_G(det)->del_static_ani(ani_nr);
-	start_detail_wait(6, 1, ANI_RUECK);
+	start_detail_wait(6, 1, ANI_BACK);
 	go_page();
 
 	if (!_G(spieler).R50KeyOK)
@@ -271,9 +271,9 @@ void Room50::setup_func() {
 		if (_G(HowardMov) && _G(flags).ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
 			_G(HowardMov) = 0;
-			auto_move(4, P_HOWARD);
+			autoMove(4, P_HOWARD);
 		} else {
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+			goAutoXy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5257bbdac1e..8cffa9edf77 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -32,11 +32,11 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK37[5] = {
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 7, 3, ANI_VOR, ANI_WAIT, 0 },
-	{ 6, 1, ANI_RUECK, ANI_WAIT, 0 },
-	{ 5, 1, ANI_RUECK, ANI_WAIT, 0 },
-	{ 2, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 6, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 7, 3, ANI_FRONT, ANI_WAIT, 0 },
+	{ 6, 1, ANI_BACK, ANI_WAIT, 0 },
+	{ 5, 1, ANI_BACK, ANI_WAIT, 0 },
+	{ 2, 1, ANI_BACK, ANI_WAIT, 0 },
 };
 
 bool Room51::_flag;
@@ -76,7 +76,7 @@ void Room51::entry() {
 		_G(det)->hide_static_spr(17);
 
 		for (int i = 0; i < 2; i++)
-			_G(det)->start_detail(3 + i, 1, ANI_VOR);
+			_G(det)->start_detail(3 + i, 1, ANI_FRONT);
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
@@ -146,7 +146,7 @@ void Room51::setup_func() {
 		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
-			start_detail_wait(8, 1, ANI_VOR);
+			start_detail_wait(8, 1, ANI_FRONT);
 			_flag = false;
 			++_index;
 
@@ -198,9 +198,9 @@ void Room51::setup_func() {
 		if (_G(HowardMov) && _G(flags).ExitMov) {
 			_G(SetUpScreenFunc) = nullptr;
 			_G(HowardMov) = 0;
-			auto_move(9, P_HOWARD);
+			autoMove(9, P_HOWARD);
 		} else {
-			go_auto_xy(x, y, P_HOWARD, ANI_GO);
+			goAutoXy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
 }
@@ -214,12 +214,12 @@ int16 Room51::use_door(int16 txt_nr) {
 
 		switch (txt_nr) {
 		case 329:
-			auto_move(8, P_CHEWY);
+			autoMove(8, P_CHEWY);
 			_G(SetUpScreenFunc) = nullptr;
 			_G(det)->show_static_spr(0);
 
 			if (!_G(spieler).R51HotelRoom) {
-				auto_move(11, P_HOWARD);
+				autoMove(11, P_HOWARD);
 				set_person_spr(P_LEFT, P_HOWARD);
 				_G(spieler).R51HotelRoom = true;
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
@@ -234,18 +234,18 @@ int16 Room51::use_door(int16 txt_nr) {
 			break;
 
 		case 330:
-			auto_move(9, P_CHEWY);
+			autoMove(9, P_CHEWY);
 
 			if (!_G(spieler).R51KillerWeg) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(2);
 				_G(det)->show_static_spr(1);
-				start_detail_wait(2, 1, ANI_VOR);
-				_G(det)->start_detail(5, 255, ANI_VOR);
+				start_detail_wait(2, 1, ANI_FRONT);
+				_G(det)->start_detail(5, 255, ANI_FRONT);
 
 				if (!_G(spieler).R52HotDogOk) {
 					start_aad_wait(287, -1);
-					auto_move(12, P_CHEWY);
+					autoMove(12, P_CHEWY);
 					_G(det)->stop_detail(5);
 					start_ani_block(5, ABLOCK37);
 					_G(det)->hide_static_spr(1);
@@ -281,7 +281,7 @@ int16 Room51::use_door(int16 txt_nr) {
 
 		case 331:
 		case 334:
-			auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
+			autoMove((txt_nr == 331) ? 10 : 7, P_CHEWY);
 			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
@@ -293,19 +293,19 @@ int16 Room51::use_door(int16 txt_nr) {
 			break;
 
 		case 332:
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 			start_aad_wait(286, -1);
 			break;
 
 		case 333:
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
 				_G(det)->show_static_spr(3);
 				start_aad_wait(278, -1);
-				start_detail_frame(0, 1, ANI_VOR, 3);
-				start_spz(HO_BRILL_JMP, 1, ANI_VOR, P_HOWARD);
+				start_detail_frame(0, 1, ANI_FRONT, 3);
+				start_spz(HO_BRILL_JMP, 1, ANI_FRONT, P_HOWARD);
 				wait_detail(0);
 
 				_G(det)->show_static_spr(14);
@@ -319,7 +319,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			case 1:
 				_G(det)->show_static_spr(3);
 				start_aad_wait(280, -1);
-				start_detail_wait(1, 1, ANI_VOR);
+				start_detail_wait(1, 1, ANI_FRONT);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_KAPPE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_KAPPE_R51);
@@ -353,12 +353,12 @@ int16 Room51::cut_serv(int16 frame) {
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
 		if (!_enemyFlag[obj_nr - 9]) {
-			_G(det)->start_detail(obj_nr, 1, ANI_VOR);
+			_G(det)->start_detail(obj_nr, 1, ANI_FRONT);
 			_enemyFlag[obj_nr - 9] = true;
 
 		} else if (!_G(det)->get_ani_status(obj_nr)) {
 			_G(det)->start_detail(obj_nr, 1, ANI_GO);
-			_G(det)->start_detail(obj_nr + 2, 1, ANI_VOR);
+			_G(det)->start_detail(obj_nr + 2, 1, ANI_FRONT);
 			_G(uhr)->reset_timer(t_nr, 0);
 			_enemyFlag[obj_nr - 9] = false;
 		}
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 415a529b5ae..6237c717ca8 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -49,7 +49,7 @@ void Room52::entry() {
 		_G(spieler).R52TuerAuf = true;
 		set_person_pos(20, 50, P_HOWARD, P_LEFT);
 		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(spieler).R52TuerAuf = false;
 		_G(det)->hide_static_spr(4);
 		check_shad(2, 1);
@@ -74,28 +74,28 @@ int16 Room52::use_hot_dog() {
 
 	if (is_cur_inventar(BURGER_INV)) {
 		action_ret = true;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 		_G(det)->show_static_spr(0);
 		del_inventar(_G(spieler).AkInvent);
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
 		plot_armee(20);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
 		_G(atds)->set_ats_str(341, 1, ATS_DATEI);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(288, -1);
 
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
 		g_engine->_sound->playSound(7, 0);
 		g_engine->_sound->playSound(7);
-		_G(det)->start_detail(8, 255, ANI_VOR);
+		_G(det)->start_detail(8, 255, ANI_FRONT);
 
 		for (int16 i = 0; i < 5; i++) {
 			wait_show_screen(20);
@@ -105,7 +105,7 @@ int16 Room52::use_hot_dog() {
 		g_engine->_sound->stopSound(0);
 		_G(det)->stop_detail(0);
 		_G(det)->stop_detail(8);
-		start_detail_wait(7, 1, ANI_RUECK);
+		start_detail_wait(7, 1, ANI_BACK);
 		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
@@ -121,7 +121,7 @@ int16 Room52::use_hot_dog() {
 void Room52::plot_armee(int16 frame) {
 	for (int16 i = 0; i < 5; i++) {
 		wait_show_screen(frame);
-		_G(det)->start_detail(2 + i, 255, ANI_VOR);
+		_G(det)->start_detail(2 + i, 255, ANI_FRONT);
 	}
 }
 
@@ -139,7 +139,7 @@ void Room52::setup_func() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
 		const int16 y = (_G(spieler_vector)[P_CHEWY].Xypos[1] < 97) ? 44 : 87;
-		go_auto_xy(1, y, P_HOWARD, ANI_GO);
+		goAutoXy(1, y, P_HOWARD, ANI_GO);
 	}
 }
 
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 8b0c8eef52a..8fade2454da 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -30,13 +30,13 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK35[7] = {
-	{ 2, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 7, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 8, 3, ANI_VOR, ANI_WAIT, 0 },
-	{ 4, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 9, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 2, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 7, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 8, 3, ANI_FRONT, ANI_WAIT, 0 },
+	{ 4, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 5, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 9, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 5, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 
@@ -44,7 +44,7 @@ void Room53::entry() {
 	hideCur();
 	_G(obj)->hide_sib(SIB_VISIT_R53);
 	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
-	start_detail_wait(0, 1, ANI_VOR);
+	start_detail_wait(0, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
 	_G(timer_nr)[0] = _G(room)->set_timer(1, 7);
 	showCur();
@@ -53,7 +53,7 @@ void Room53::entry() {
 void Room53::man_go() {
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
-	start_detail_wait(5, 1, ANI_VOR);
+	start_detail_wait(5, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
 	if (!_G(spieler).R53Visit)
 		_G(obj)->show_sib(SIB_VISIT_R53);
@@ -61,14 +61,14 @@ void Room53::man_go() {
 
 void Room53::talk_man() {
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
-	start_detail_wait(2, 1, ANI_VOR);
+	start_detail_wait(2, 1, ANI_FRONT);
 	_G(det)->set_static_ani(3, -1);
 	start_aad_wait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
 	_G(det)->del_static_ani(3);
-	start_detail_wait(4, 1, ANI_VOR);
+	start_detail_wait(4, 1, ANI_FRONT);
 	man_go();
 	showCur();
 }
@@ -81,7 +81,7 @@ int16 Room53::use_man() {
 		hideCur();
 		_G(spieler).R53Kostuem = true;
 		del_inventar(_G(spieler).AkInvent);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_aad_wait(271, -1);
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 72eacf60fd6..5608a0d5da7 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -118,7 +118,7 @@ void Room54::setup_func() {
 			}
 
 			if (!_G(flags).SaveMenu)
-				go_auto_xy(x, y, P_HOWARD, ANI_GO);
+				goAutoXy(x, y, P_HOWARD, ANI_GO);
 		}
 	}
 }
@@ -131,38 +131,38 @@ int16 Room54::use_schalter() {
 		action_ret = true;
 
 		if (!_G(spieler).R54FputzerWeg) {
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			_G(spieler).R54HowardVorne = 255;
-			go_auto_xy(127, 76, P_HOWARD, ANI_WAIT);
-			go_auto_xy(14, 72, P_HOWARD, ANI_GO);
+			goAutoXy(127, 76, P_HOWARD, ANI_WAIT);
+			goAutoXy(14, 72, P_HOWARD, ANI_GO);
 			start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 			_G(det)->show_static_spr(0);
-			auto_move(2, P_CHEWY);
+			autoMove(2, P_CHEWY);
 			g_engine->_sound->playSound(1, 0);
 			g_engine->_sound->playSound(0, 1);
 			g_engine->_sound->stopSound(2);
 
-			start_detail_wait(1, 1, ANI_VOR);
-			_G(det)->start_detail(3, 255, ANI_VOR);
+			start_detail_wait(1, 1, ANI_FRONT);
+			_G(det)->start_detail(3, 255, ANI_FRONT);
 			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
 			_G(det)->stop_detail(3);
 			++_G(spieler).R54LiftCount;
 
 			int16 aad_nr;
 			if (_G(spieler).R54LiftCount < 3) {
-				start_detail_wait(2, 1, ANI_VOR);
+				start_detail_wait(2, 1, ANI_FRONT);
 				_G(det)->hide_static_spr(0);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->stopSound(1);
 				g_engine->_sound->playSound(1, 2);
-				start_detail_wait(1, 1, ANI_RUECK);
+				start_detail_wait(1, 1, ANI_BACK);
 				g_engine->_sound->stopSound(2);
 				aad_nr = 295;
 
 			} else {
-				start_detail_wait(5, 1, ANI_VOR);
+				start_detail_wait(5, 1, ANI_FRONT);
 				_G(det)->show_static_spr(9);
-				start_detail_wait(4, 1, ANI_VOR);
+				start_detail_wait(4, 1, ANI_FRONT);
 				aad_nr = 296;
 				_G(spieler).R54FputzerWeg = true;
 				_G(atds)->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
@@ -195,24 +195,24 @@ void Room54::talk_verkauf() {
 		}
 
 		_G(spieler).R54HotDogOk = true;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
 		start_aad_wait(299, -1);
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(det)->del_static_ani(6);
-		start_detail_wait(7, 1, ANI_VOR);
-		_G(det)->start_detail(8, 255, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
+		_G(det)->start_detail(8, 255, ANI_FRONT);
 		start_aad_wait(310, -1);
 
 		_G(det)->stop_detail(8);
-		start_detail_wait(9, 1, ANI_VOR);
-		start_detail_wait(10, 1, ANI_VOR);
-		_G(det)->start_detail(11, 255, ANI_VOR);
+		start_detail_wait(9, 1, ANI_FRONT);
+		start_detail_wait(10, 1, ANI_FRONT);
+		_G(det)->start_detail(11, 255, ANI_FRONT);
 		start_aad_wait(311, -1);
 		_G(det)->stop_detail(11);
 		_G(room)->set_timer_status(6, TIMER_START);
 		_G(det)->set_static_ani(6, -1);
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 
 		start_aad(_G(spieler).R45MagOk ? 312 : 578, -1);
 		_G(obj)->addInventory(BURGER_INV, &_G(room_blk));
@@ -235,11 +235,11 @@ int16 Room54::use_zelle() {
 			if (!_G(spieler).R54Schild) {
 				start_aad_wait(318, -1);
 			} else {
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 				_G(spieler).R54HowardVorne = 1;
 				_G(SetUpScreenFunc) = nullptr;
 				auto_scroll(176, 0);
-				go_auto_xy(239, 101, P_HOWARD, ANI_WAIT);
+				goAutoXy(239, 101, P_HOWARD, ANI_WAIT);
 				flic_cut(FCUT_069);
 
 				del_inventar(_G(spieler).AkInvent);
@@ -250,7 +250,7 @@ int16 Room54::use_zelle() {
 				set_person_pos(283, 93, P_CHEWY, P_LEFT);
 				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
 				start_aad_wait(315, -1);
-				go_auto_xy(241, 74, P_CHEWY, ANI_WAIT);
+				goAutoXy(241, 74, P_CHEWY, ANI_WAIT);
 				start_aad_wait(316, -1);
 
 				_G(spieler_mi)[P_HOWARD].Mode = true;
@@ -259,7 +259,7 @@ int16 Room54::use_zelle() {
 		}
 	} else {
 		action_ret = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
 		start_aad_wait(319, -1);
 	}
@@ -282,14 +282,14 @@ int16 Room54::use_azug() {
 
 		if (!_G(spieler).R54LiftOk) {
 			if (_G(spieler).R54FputzerWeg) {
-				auto_move(8, P_CHEWY);
+				autoMove(8, P_CHEWY);
 				_G(spieler).R54HowardVorne = 0;
 				start_aad_wait(298, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				_G(det)->show_static_spr(12);
 				_G(spieler).R55Location = true;
 				_G(SetUpScreenFunc) = nullptr;
-				go_auto_xy(91, 62, P_HOWARD, ANI_WAIT);
+				goAutoXy(91, 62, P_HOWARD, ANI_WAIT);
 				g_engine->_sound->playSound(1, 0);
 				g_engine->_sound->playSound(1);
 
@@ -369,13 +369,13 @@ short Room54::use_taxi() {
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hideCur();
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 			if (_G(spieler).R54HowardVorne) {
 				_G(spieler).R54HowardVorne = 0;
-				go_auto_xy(290, 61, P_HOWARD, ANI_WAIT);
+				goAutoXy(290, 61, P_HOWARD, ANI_WAIT);
 			}
 
 			_G(spieler).PersonHide[P_HOWARD] = true;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index f201649cf5f..5f7a60ac59f 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -39,7 +39,7 @@ void Room55::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
 
 	if (!_G(spieler).R54FputzerWeg)
-		_G(det)->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
 
 	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
 		_G(det)->hide_static_spr(6);
@@ -48,8 +48,8 @@ void Room55::entry() {
 		_G(det)->hide_static_spr(0);
 
 	if (!_G(spieler).R55SekWeg) {
-		_G(det)->start_detail(8, 255, ANI_VOR);
-		_G(det)->start_detail(9, 255, ANI_VOR);
+		_G(det)->start_detail(8, 255, ANI_FRONT);
+		_G(det)->start_detail(9, 255, ANI_FRONT);
 		_G(spieler).R55Entry ^= 1;
 		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
 		_G(timer_nr)[0] = _G(room)->set_timer(aniNr, 10);
@@ -75,7 +75,7 @@ void Room55::entry() {
 		if (_G(spieler).R55Location) {
 			_G(spieler).scrollx = 136;
 			set_person_pos(404, 66, P_CHEWY, P_RIGHT);
-			start_detail_wait(3, 1, ANI_VOR);
+			start_detail_wait(3, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(zoom_horizont) = 1;
 			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
@@ -87,7 +87,7 @@ void Room55::entry() {
 			}
 
 			_G(det)->show_static_spr(8);
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			hideCur();
 			_G(det)->hide_static_spr(8);
 
@@ -135,9 +135,9 @@ int16 Room55::use_stapel1() {
 		if (!_G(spieler).R55ScriptWeg) {
 			action_ret = true;
 			_G(spieler).R55ScriptWeg = true;
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			_G(det)->hide_static_spr(0);
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			_G(det)->show_static_spr(1);
 			_G(atds)->set_ats_str(354, 1, ATS_DATEI);
 			_G(atds)->set_ats_str(355, 1, ATS_DATEI);
@@ -150,7 +150,7 @@ int16 Room55::use_stapel1() {
 		action_ret = true;
 
 		if (_G(spieler).R55ScriptWeg) {
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			_G(spieler).R55EscScriptOk = true;
 			_G(det)->show_static_spr(0);
 			del_inventar(_G(spieler).AkInvent);
@@ -186,29 +186,29 @@ int16 Room55::use_telefon() {
 			if (!_G(spieler).R55RaumOk) {
 				hideCur();
 				_G(spieler).R55RaumOk = true;
-				auto_move(6, P_CHEWY);
+				autoMove(6, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(10, 1, ANI_VOR);
-				_G(det)->start_detail(11, 255, ANI_VOR);
+				start_detail_wait(10, 1, ANI_FRONT);
+				_G(det)->start_detail(11, 255, ANI_FRONT);
 				start_aad_wait(329, -1);
 				_G(det)->stop_detail(11);
-				start_detail_wait(10, 1, ANI_RUECK);
+				start_detail_wait(10, 1, ANI_BACK);
 
 				_G(spieler).PersonHide[P_CHEWY] = false;
-				auto_move(7, P_CHEWY);
+				autoMove(7, P_CHEWY);
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_aad_wait(330, -1);
 				_G(det)->show_static_spr(8);
-				start_detail_wait(0, 1, ANI_VOR);
-				_G(det)->start_detail(1, 255, ANI_VOR);
+				start_detail_wait(0, 1, ANI_FRONT);
+				_G(det)->start_detail(1, 255, ANI_FRONT);
 				start_aad_wait(331, -1);
 				_G(det)->stop_detail(1);
 
 				_G(det)->show_static_spr(16);
 				start_aad_wait(608, -1);
 				_G(det)->hide_static_spr(16);
-				start_detail_wait(2, 1, ANI_VOR);
+				start_detail_wait(2, 1, ANI_FRONT);
 				_G(det)->hide_static_spr(0);
 				_G(det)->hide_static_spr(8);
 				_G(atds)->set_ats_str(354, 1, ATS_DATEI);
@@ -326,16 +326,16 @@ void Room55::rock2mans() {
 }
 
 void Room55::verleger_mov(int16 mode) {
-	start_detail_wait(7, 1, ANI_VOR);
+	start_detail_wait(7, 1, ANI_FRONT);
 	_G(det)->show_static_spr(11);
-	start_detail_wait(13, 1, ANI_VOR);
-	start_detail_wait(14, 1, ANI_VOR);
+	start_detail_wait(13, 1, ANI_FRONT);
+	start_detail_wait(14, 1, ANI_FRONT);
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS)
-		start_spz(CH_JM_TITS, 1, ANI_VOR, P_CHEWY);
+		start_spz(CH_JM_TITS, 1, ANI_FRONT, P_CHEWY);
 	
 	if (mode)
-		start_detail_wait(15, 1, ANI_VOR);
+		start_detail_wait(15, 1, ANI_FRONT);
 
 	_G(det)->set_static_ani(16, -1);
 }
@@ -347,7 +347,7 @@ void Room55::strasse(int16 mode) {
 		_G(det)->del_static_ani(4);
 		_G(det)->stop_detail(4);
 		_G(atds)->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
-		start_detail_wait(3, 1, ANI_RUECK);
+		start_detail_wait(3, 1, ANI_BACK);
 
 		_G(spieler).scrollx = 0;
 		switch_room(54);
@@ -365,7 +365,7 @@ int16 Room55::use_kammeraus() {
 		else if (!_G(spieler).R55SekWeg) {
 			hideCur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(5, 1, ANI_VOR);
+			start_detail_wait(5, 1, ANI_FRONT);
 			_G(det)->show_static_spr(10);
 			flic_cut(FCUT_070);
 			register_cutscene(18);
@@ -416,7 +416,7 @@ void Room55::setup_func() {
 			y = 110;
 		}
 
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		goAutoXy(x, y, P_HOWARD, ANI_GO);
 	}
 }
 
@@ -428,7 +428,7 @@ void Room55::talk_line() {
 
 	int16 aad_nr = 0;
 	if (!_G(spieler).R55SekWeg) {
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(flags).NoScroll = true;
 		auto_scroll(136, 0);
 		aad_nr = 320;
@@ -437,10 +437,10 @@ void Room55::talk_line() {
 		_G(room)->set_timer_status(aniNr, TIMER_STOP);
 		_G(det)->stop_detail(aniNr);
 		_G(det)->del_static_ani(aniNr);
-		start_detail_wait(22, 1, ANI_VOR);
+		start_detail_wait(22, 1, ANI_FRONT);
 		_G(det)->set_static_ani(21, -1);
 	} else if (!_G(spieler).R55RaumOk) {
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		aad_nr = 323;
 		_G(spieler).R55ExitDia = 324;
 	}
@@ -449,10 +449,10 @@ void Room55::talk_line() {
 
 	if (_G(spieler).R55SekWeg) {
 		_G(det)->del_static_ani(16);
-		start_detail_wait(14, 1, ANI_VOR);
+		start_detail_wait(14, 1, ANI_FRONT);
 	} else {
 		_G(det)->del_static_ani(21);
-		start_detail_wait(22, 1, ANI_VOR);
+		start_detail_wait(22, 1, ANI_FRONT);
 	}
 
 	_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index faf31df6acf..5aeaa0b7ac3 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -40,7 +40,7 @@ void Room56::entry() {
 		_G(det)->show_static_spr(10);
 		_G(room)->set_timer_status(0, TIMER_STOP);
 		_G(det)->del_static_ani(0);
-		_G(det)->start_detail(13, 255, ANI_VOR);
+		_G(det)->start_detail(13, 255, ANI_FRONT);
 	} else
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 25);
 
@@ -58,11 +58,11 @@ void Room56::entry() {
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(7, 1);
-			start_detail_wait(7, 1, ANI_RUECK);
-			start_detail_wait(8, 1, ANI_VOR);
+			start_detail_wait(7, 1, ANI_BACK);
+			start_detail_wait(8, 1, ANI_FRONT);
 			g_engine->_sound->stopSound(1);
 			g_engine->_sound->playSound(7, 0);
-			start_detail_wait(7, 1, ANI_VOR);
+			start_detail_wait(7, 1, ANI_FRONT);
 			set_up_screen(DO_SETUP);
 
 			if (!_G(spieler).R56GetTabak) {
@@ -77,7 +77,7 @@ void Room56::entry() {
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(SetUpScreenFunc) = setup_func;
 			_G(spieler_mi)[P_CHEWY].Mode = true;
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			_G(spieler_mi)[P_CHEWY].Mode = false;
 			_G(maus_links_click) = false;
 			showCur();
@@ -141,7 +141,7 @@ void Room56::entry() {
 					_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 					_G(SetUpScreenFunc) = setup_func;
 					_G(spieler_mi)[P_CHEWY].Mode = true;
-					auto_move(1, P_CHEWY);
+					autoMove(1, P_CHEWY);
 					_G(spieler_mi)[P_CHEWY].Mode = false;
 				}
 				showCur();
@@ -211,17 +211,17 @@ int16 Room56::use_taxi() {
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hideCur();
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->playSound(7, 1);
-		start_detail_wait(7, 1, ANI_RUECK);
-		_G(det)->start_detail(8, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_BACK);
+		_G(det)->start_detail(8, 1, ANI_FRONT);
 		_G(zoom_horizont) = 0;
 		_G(room)->set_zoom(23);
 		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 37;
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		go_auto_xy(3, 42, P_CHEWY, ANI_WAIT);
+		goAutoXy(3, 42, P_CHEWY, ANI_WAIT);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -237,7 +237,7 @@ int16 Room56::use_taxi() {
 }
 
 void Room56::talk_man() {
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	if (!_G(spieler).R56AbfahrtOk) {
 		start_ads_wait(16);
 	} else if (!_G(spieler).R62Flucht) {
@@ -254,13 +254,13 @@ int16 Room56::use_man() {
 	
 	action_ret = true;
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
 
 	if (!_G(spieler).R56WhiskyMix) {
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(5, -1);
 		start_aad_wait(304, -1);
@@ -270,7 +270,7 @@ int16 Room56::use_man() {
 	} else {
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R56AbfahrtOk = true;
-		start_detail_wait(6, 1, ANI_VOR);
+		start_detail_wait(6, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(1, -1);
 		start_aad_wait(305, -1);
@@ -293,18 +293,18 @@ int16 Room56::use_kneipe() {
 				start_aad_wait(344, -1);
 			} else {
 				_G(SetUpScreenFunc) = nullptr;
-				auto_move(4, P_CHEWY);
+				autoMove(4, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				go_auto_xy(160, 58, P_HOWARD, ANI_VOR);
+				goAutoXy(160, 58, P_HOWARD, ANI_FRONT);
 				_G(spieler).PersonHide[P_HOWARD] = true;
 				_G(spieler).R56Kneipe = true;
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
-				start_detail_wait(12, 3, ANI_VOR);
+				start_detail_wait(12, 3, ANI_FRONT);
 				flic_cut(FCUT_075);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
-				_G(det)->start_detail(10, 6, ANI_VOR);
+				_G(det)->start_detail(10, 6, ANI_FRONT);
 				start_aad_wait(307, -1);
 				_G(det)->stop_detail(10);
 				g_engine->_sound->playSound(10, 0);
@@ -331,7 +331,7 @@ int16 Room56::use_kneipe() {
 		hideCur();
 		if (_G(spieler).flags34_10) {
 			_G(spieler).flags33_80 = true;
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			flic_cut(FCUT_111);
 			_G(fx_blend) = BLEND3;
 			start_aad_wait(522, -1);
@@ -350,7 +350,7 @@ int16 Room56::use_kneipe() {
 		hideCur();
 		action_ret = 1;
 		_G(maus_links_click) = false;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		start_aad_wait(521, -1);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -379,7 +379,7 @@ int16 Room56::proc1(int16 key) {
 void Room56::start_flug() {
 	if (!_G(spieler).flags32_10 && !_G(r56koch_flug)) {
 		_G(r56koch_flug) = 12;
-		_G(det)->start_detail(_G(r56koch_flug), 1, ANI_VOR);
+		_G(det)->start_detail(_G(r56koch_flug), 1, ANI_FRONT);
 	}
 }
 
@@ -400,14 +400,14 @@ void Room56::setup_func() {
 
 		case 11:
 			if (_G(det)->get_ani_status(11) == false) {
-				_G(det)->start_detail(10, 1, ANI_VOR);
+				_G(det)->start_detail(10, 1, ANI_FRONT);
 				_G(r56koch_flug) = 10;
 			}
 			break;
 
 		case 12:
 			if (_G(det)->get_ani_status(12) == false) {
-				_G(det)->start_detail(11, 1, ANI_VOR);
+				_G(det)->start_detail(11, 1, ANI_FRONT);
 				_G(r56koch_flug) = 11;
 			}
 			break;
@@ -435,7 +435,7 @@ void Room56::setup_func() {
 			x = 308;
 			y = 97;
 		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		goAutoXy(x, y, P_HOWARD, ANI_GO);
 	}
 
 	if (_G(spieler).flags32_10)
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index e9bb8915190..90b05087252 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -47,7 +47,7 @@ void Room57::entry() {
 		_G(spieler).scrolly = 0;
 		set_person_pos(4, 144, P_HOWARD, P_LEFT);
 		set_person_pos(40, 160, P_CHEWY, P_RIGHT);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(maus_links_click) = false;
 		showCur();
 	}
@@ -73,7 +73,7 @@ void Room57::setup_func() {
 			x = 176;
 			y = 142;
 		}
-		go_auto_xy(x, y, P_HOWARD, ANI_GO);
+		goAutoXy(x, y, P_HOWARD, ANI_GO);
 	}
 }
 
@@ -82,16 +82,16 @@ int16 Room57::use_taxi() {
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hideCur();
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		g_engine->_sound->playSound(3, 0);
 		g_engine->_sound->playSound(3);
 		_G(det)->show_static_spr(7);
-		go_auto_xy(16, 160, P_CHEWY, ANI_WAIT);
+		goAutoXy(16, 160, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
 			_G(SetUpScreenFunc) = nullptr;
-			go_auto_xy(11, 144, P_HOWARD, ANI_WAIT);
+			goAutoXy(11, 144, P_HOWARD, ANI_WAIT);
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
@@ -101,7 +101,7 @@ int16 Room57::use_taxi() {
 		g_engine->_sound->playSound(3);
 		_G(room)->set_timer_status(3, TIMER_STOP);
 		_G(det)->del_static_ani(3);
-		start_detail_wait(5, 1, ANI_VOR);
+		start_detail_wait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
@@ -114,7 +114,7 @@ int16 Room57::use_pfoertner() {
 	_G(det)->del_static_ani(1);
 	_G(det)->set_static_ani(3, -1);
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	if (is_cur_inventar(CUTMAG_INV)) {
 		action_ret = true;
 		if (_G(spieler).flags37_10)
@@ -130,10 +130,10 @@ int16 Room57::use_pfoertner() {
 	} else if (is_cur_inventar(EINLAD_INV)) {
 		action_ret = true;
 		_G(SetUpScreenFunc) = nullptr;
-		go_auto_xy(132, 130, P_HOWARD, ANI_WAIT);
+		goAutoXy(132, 130, P_HOWARD, ANI_WAIT);
 		if (_G(spieler).R56AbfahrtOk) {
 			start_aad_wait(341, -1);
-			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
+			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
@@ -143,7 +143,7 @@ int16 Room57::use_pfoertner() {
 			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
 		} else {
 			start_aad_wait(349, -1);
-			go_auto_xy(176, 130, P_HOWARD, ANI_WAIT);
+			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 		}
 		_G(SetUpScreenFunc) = setup_func;
 	}
@@ -155,7 +155,7 @@ int16 Room57::use_pfoertner() {
 
 void Room57::talk_pfoertner() {
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
 	_G(det)->set_static_ani(3, -1);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index e30232e49e3..a61bf337551 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -39,32 +39,32 @@ void Room62::entry() {
 		hideCur();
 		_G(spieler).R62FirstEntry = true;
 		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
-		_G(det)->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
 		start_aad_wait(345, -1);
 		_G(det)->stop_detail(6);
 		_G(det)->set_static_ani(5, -1);
-		go_auto_xy(199, 59, P_HOWARD, ANI_WAIT);
+		goAutoXy(199, 59, P_HOWARD, ANI_WAIT);
 		set_person_spr(0, P_HOWARD);
 		_G(det)->del_static_ani(5);
-		_G(det)->start_detail(5, 255, ANI_VOR);
+		_G(det)->start_detail(5, 255, ANI_FRONT);
 		start_aad_wait(346, -1);
 		_G(det)->stop_detail(5);
-		_G(det)->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
 		start_aad_wait(347, -1);
 		_G(det)->stop_detail(6);
-		start_detail_wait(7, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
 		_G(det)->set_static_ani(5, -1);
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 		start_aad_wait(348, -1);
 		_G(det)->stop_detail(0);
 		_G(det)->del_static_ani(0);
-		_G(det)->start_detail(1, 1, ANI_VOR);
-		auto_move(0, P_CHEWY);
+		_G(det)->start_detail(1, 1, ANI_FRONT);
+		autoMove(0, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		go_auto_xy(160, 240, P_CHEWY, ANI_WAIT);
+		goAutoXy(160, 240, P_CHEWY, ANI_WAIT);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(det)->del_static_ani(5);
-		start_detail_wait(7, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
 		showCur();
 		_G(spieler).R64Moni1Ani = 3;
 		_G(spieler).R64Moni2Ani = 4;
@@ -90,7 +90,7 @@ void Room62::setup_func() {
 			_G(r62TalkAni) = 8;
 		else
 			_G(r62TalkAni) = 4;
-		_G(det)->start_detail(_G(r62TalkAni), 255, ANI_VOR);
+		_G(det)->start_detail(_G(r62TalkAni), 255, ANI_FRONT);
 	} else
 		--_G(r62Delay);
 }
@@ -100,14 +100,14 @@ int16 Room62::use_laura() {
 	if (is_cur_inventar(GERAET_INV)) {
 		action_ret = true;
 		hideCur();
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		auto_scroll(0, 0);
 		_G(SetUpScreenFunc) = nullptr;
 		_G(det)->del_static_ani(8);
 		_G(det)->stop_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->start_detail(2, 255, ANI_VOR);
-		_G(det)->start_detail(6, 255, ANI_VOR);
+		_G(det)->start_detail(2, 255, ANI_FRONT);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
 		start_aad_wait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 459b5a9cef6..f9416897cc8 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -38,16 +38,16 @@ void Room63::entry() {
 	if (!_G(spieler).R63Uhr) {
 		_G(cur_hide_flag) = false;
 		hideCur();
-		_G(det)->start_detail(12, 255, ANI_VOR);
-		_G(det)->start_detail(10, 255, ANI_VOR);
-		_G(det)->start_detail(18, 255, ANI_VOR);
-		auto_move(4, P_CHEWY);
+		_G(det)->start_detail(12, 255, ANI_FRONT);
+		_G(det)->start_detail(10, 255, ANI_FRONT);
+		_G(det)->start_detail(18, 255, ANI_FRONT);
+		autoMove(4, P_CHEWY);
 		_G(det)->stop_detail(10);
-		_G(det)->start_detail(11, 255, ANI_VOR);
+		_G(det)->start_detail(11, 255, ANI_FRONT);
 		auto_scroll(58, 0);
 		start_aad_wait(355, -1);
 		_G(det)->stop_detail(11);
-		_G(det)->start_detail(10, 255, ANI_VOR);
+		_G(det)->start_detail(10, 255, ANI_FRONT);
 		showCur();
 	} else if (!_G(spieler).R63Feuer) {
 		_G(det)->show_static_spr(10);
@@ -61,7 +61,7 @@ void Room63::entry() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).room_e_obj[95].Attribut = 255;
 		_G(r63ChewyAni) = 0;
-		_G(det)->start_detail(0, 1, ANI_VOR);
+		_G(det)->start_detail(0, 1, ANI_FRONT);
 	}
 }
 
@@ -79,7 +79,7 @@ void Room63::setup_func() {
 			if (_G(r63RunDia) < 4)
 				++_G(r63RunDia);
 			start_aad(370 + _G(r63RunDia));
-			_G(det)->start_detail(1, 1, ANI_VOR);
+			_G(det)->start_detail(1, 1, ANI_FRONT);
 			_G(r63ChewyAni) = 1;
 		}
 		break;
@@ -88,8 +88,8 @@ void Room63::setup_func() {
 		if (_G(det)->get_ani_status(1) == false) {
 			_G(spieler).ScrollxStep = 4;
 			set_person_pos(0, 0, P_CHEWY, P_RIGHT);
-			_G(det)->start_detail(22, 1, ANI_VOR);
-			_G(det)->start_detail(2, 1, ANI_VOR);
+			_G(det)->start_detail(22, 1, ANI_FRONT);
+			_G(det)->start_detail(2, 1, ANI_FRONT);
 			_G(atds)->stop_aad();
 			_G(r63ChewyAni) = 2;
 		}
@@ -97,7 +97,7 @@ void Room63::setup_func() {
 
 	case 2:
 		if (_G(det)->get_ani_status(2) == false) {
-			_G(det)->start_detail(3, 1, ANI_VOR);
+			_G(det)->start_detail(3, 1, ANI_FRONT);
 			_G(r63ChewyAni) = 3;
 		}
 		break;
@@ -115,7 +115,7 @@ void Room63::setup_func() {
 				_G(flags).NoScroll = false;
 				_G(spieler).ScrollxStep = 4;
 				if (!_G(r63Schalter)) {
-					_G(det)->start_detail(0, 1, ANI_VOR);
+					_G(det)->start_detail(0, 1, ANI_FRONT);
 					_G(r63ChewyAni) = 0;
 				} else
 					bork_platt();
@@ -138,10 +138,10 @@ void Room63::bork_platt() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	check_shad(4, 1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	start_aad_wait(370, -1);
-	start_detail_wait(4, 1, ANI_VOR);
+	start_detail_wait(4, 1, ANI_FRONT);
 	_G(det)->show_static_spr(13);
 	start_aad_wait(361, -1);
 	_G(out)->cls();
@@ -157,10 +157,10 @@ void Room63::bork_platt() {
 
 void Room63::talk_hunter() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
 		_G(det)->hide_static_spr(10);
-	_G(det)->start_detail(10, 255, ANI_VOR);
+	_G(det)->start_detail(10, 255, ANI_FRONT);
 	start_aad_wait(356, -1);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->show_static_spr(10);
@@ -171,24 +171,24 @@ void Room63::talk_hunter() {
 
 void Room63::talk_regie() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
 		_G(det)->hide_static_spr(12);
 	_G(det)->stop_detail(18);
-	_G(det)->start_detail(19, 255, ANI_VOR);
+	_G(det)->start_detail(19, 255, ANI_FRONT);
 	start_aad_wait(357, -1);
 	_G(det)->stop_detail(19);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->show_static_spr(12);
 	} else {
-		_G(det)->start_detail(18, 255, ANI_VOR);
+		_G(det)->start_detail(18, 255, ANI_FRONT);
 	}
 	showCur();
 }
 
 void Room63::talk_fx_man() {
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	start_aad_wait(358, -1);
 	showCur();
 }
@@ -198,16 +198,16 @@ int16 Room63::use_fx_man() {
 	if (is_cur_inventar(MASKE_INV)) {
 		action_ret = true;
 		hideCur();
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		remove_inventory(34);
 		start_aad_wait(359, -1);
 		_G(det)->del_static_ani(5);
-		start_detail_wait(6, 1, ANI_VOR);
-		_G(det)->start_detail(7, 255, ANI_VOR);
+		start_detail_wait(6, 1, ANI_FRONT);
+		_G(det)->start_detail(7, 255, ANI_FRONT);
 		start_aad_wait(362, -1);
 		_G(det)->stop_detail(7);
-		start_detail_wait(8, 1, ANI_VOR);
+		start_detail_wait(8, 1, ANI_FRONT);
 		_G(spieler).R63FxMannWeg = true;
 		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
 		showCur();
@@ -226,15 +226,15 @@ int16 Room63::use_schalter() {
 				_G(flags).MainInput = false;
 			} else {
 				hideCur();
-				auto_move(1, P_CHEWY);
+				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 				_G(det)->show_static_spr(2);
 				set_person_spr(P_LEFT, P_CHEWY);
-				start_detail_wait(21, 1, ANI_VOR);
+				start_detail_wait(21, 1, ANI_FRONT);
 				_G(det)->show_static_spr(14);
 				wait_show_screen(18);
 				_G(det)->hide_static_spr(14);
-				start_detail_wait(24, 1, ANI_VOR);
+				start_detail_wait(24, 1, ANI_FRONT);
 				_G(det)->show_static_spr(1);
 				_G(det)->hide_static_spr(2);
 				start_aad_wait(364, -1);
@@ -251,13 +251,13 @@ int16 Room63::use_schalter() {
 }
 
 void Room63::talk_girl() {
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(det)->stop_detail(12);
-	start_detail_wait(13, 1, ANI_VOR);
+	start_detail_wait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
 	start_ads_wait(17);
 	_G(det)->del_static_ani(14);
-	_G(det)->start_detail(12, 255, ANI_VOR);
+	_G(det)->start_detail(12, 255, ANI_FRONT);
 }
 
 int16 Room63::use_girl() {
@@ -265,17 +265,17 @@ int16 Room63::use_girl() {
 	if (is_cur_inventar(UHR_INV)) {
 		action_ret = true;
 		hideCur();
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->stop_detail(12);
-		start_detail_wait(13, 1, ANI_VOR);
+		start_detail_wait(13, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
 		start_aad_wait(365, -1);
 		_G(det)->del_static_ani(14);
-		_G(det)->start_detail(15, 255, ANI_VOR);
+		_G(det)->start_detail(15, 255, ANI_FRONT);
 		start_aad_wait(360, -1);
 		_G(det)->stop_detail(15);
-		start_detail_wait(16, 1, ANI_VOR);
+		start_detail_wait(16, 1, ANI_FRONT);
 		_G(spieler).R63Uhr = true;
 		_G(det)->stop_detail(10);
 		_G(det)->stop_detail(18);
@@ -298,15 +298,15 @@ int16 Room63::use_aschenbecher() {
 		hideCur();
 		if (_G(spieler).R63Uhr) {
 			if (_G(spieler).R63FxMannWeg) {
-				auto_move(5, P_CHEWY);
+				autoMove(5, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
 				_G(flags).NoScroll = true;
 				auto_scroll(70, 0);
-				auto_move(1, P_CHEWY);
+				autoMove(1, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				_G(det)->start_detail(20, 255, ANI_VOR);
-				_G(det)->start_detail(10, 255, ANI_VOR);
-				_G(det)->start_detail(18, 255, ANI_VOR);
+				_G(det)->start_detail(20, 255, ANI_FRONT);
+				_G(det)->start_detail(10, 255, ANI_FRONT);
+				_G(det)->start_detail(18, 255, ANI_FRONT);
 				_G(det)->hide_static_spr(10);
 				_G(det)->hide_static_spr(12);
 				start_aad_wait(368, -1);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 68448efa438..0d50734a475 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -71,7 +71,7 @@ void Room64::chewy_entry() {
 	if (!_G(flags).LoadGame) {
 		hideCur();
 		_G(det)->show_static_spr(3);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(det)->hide_static_spr(3);
 		showCur();
 	}
@@ -91,7 +91,7 @@ void Room64::calc_monitor() {
 
 	case 5:
 		str_nr = 1;
-		_G(det)->start_detail(5, 255, ANI_VOR);
+		_G(det)->start_detail(5, 255, ANI_FRONT);
 		break;
 
 	default:
@@ -127,7 +127,7 @@ void Room64::setup_func() {
 			_G(r64TalkAni) = _G(spieler).R64Moni2Ani;
 
 		if (_G(r64TalkAni) != 0)
-			_G(det)->start_detail(_G(r64TalkAni), 255, ANI_VOR);
+			_G(det)->start_detail(_G(r64TalkAni), 255, ANI_FRONT);
 	} else
 		--_G(r62Delay);
 }
@@ -139,7 +139,7 @@ void Room64::talk_man() {
 void Room64::talk_man(int16 aad_nr) {
 	if (!_G(spieler).R64ManWeg) {
 		hideCur();
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
 		_G(det)->stop_detail(1);
@@ -158,7 +158,7 @@ int16 Room64::use_tasche() {
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R64ManWeg) {
 			if (!_G(atds)->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
-				auto_move(3, P_CHEWY);
+				autoMove(3, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				new_invent_2_cur(GERAET_INV);
 				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
@@ -168,7 +168,7 @@ int16 Room64::use_tasche() {
 				return 0;
 			}
 		} else {
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_G(det)->del_static_ani(1);
 			_G(det)->stop_detail(1);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 69ae44a9a28..72c08c49d70 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -102,7 +102,7 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 
 				}
 				if (ani_nr != -1)
-					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+					start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -112,13 +112,13 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 			if (mode == AAD_STR_START) {
 				switch (_G(spieler).mi[1]) {
 				case 2:
-					start_spz(50, 255, ANI_VOR, P_HOWARD);
+					start_spz(50, 255, ANI_FRONT, P_HOWARD);
 					break;
 				case 3:
-					start_spz(57, 255, ANI_VOR, P_HOWARD);
+					start_spz(57, 255, ANI_FRONT, P_HOWARD);
 					break;
 				default:
-					start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+					start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 					break;
 				}
 			} else {
@@ -128,7 +128,7 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 
 		case 3:
 			if (mode == AAD_STR_START) {
-				start_spz(NI_TALK_L, 255, ANI_VOR, P_NICHELLE);
+				start_spz(NI_TALK_L, 255, ANI_FRONT, P_NICHELLE);
 			} else {
 				stop_spz();
 			}
@@ -138,7 +138,7 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 			break;
 		}
 	} else if (mode == AAD_STR_START) {
-		_G(det)->start_detail(person_nr, 255, ANI_VOR);
+		_G(det)->start_detail(person_nr, 255, ANI_FRONT);
 	} else {
 		_G(det)->stop_detail(person_nr);
 	}
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index fb511f19682..55292ff1a03 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -49,15 +49,15 @@ void Room66::entry(int16 eib_nr) {
 		set_person_pos(644, 82, P_NICHELLE, P_LEFT);
 		set_person_pos(623, 81, P_HOWARD, P_LEFT);
 		start_aad_wait(413, -1);
-		auto_move(9, P_CHEWY);
+		autoMove(9, P_CHEWY);
 		_G(SetUpScreenFunc) = setup_func;
 		start_aad_wait(403, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(0, 1, ANI_VOR);
+		start_detail_wait(0, 1, ANI_FRONT);
 		_G(det)->show_static_spr(14);
 		wait_show_screen(15);
 		_G(det)->hide_static_spr(14);
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
@@ -136,8 +136,8 @@ void Room66::setup_func() {
 		esi = 690;
 	}
 
-	go_auto_xy(edx, 114, P_HOWARD, ANI_GO);
-	go_auto_xy(esi, 114, P_NICHELLE, ANI_GO);
+	goAutoXy(edx, 114, P_HOWARD, ANI_GO);
+	goAutoXy(esi, 114, P_NICHELLE, ANI_GO);
 
 	if (posX >= 500 || _G(spieler).flags26_8)
 		return;
@@ -149,7 +149,7 @@ void Room66::setup_func() {
 
 void Room66::talk1() {
 	hideCur();
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	start_aad_wait(407, -1);
 	showCur();
 }
@@ -168,7 +168,7 @@ void Room66::talk4() {
 
 int Room66::proc2() {
 	hideCur();
-	auto_move(0, P_CHEWY);
+	autoMove(0, P_CHEWY);
 	_G(spieler).flags26_40 = true;
 	_G(spieler).room_e_obj[100].Attribut = 3;
 	_G(atds)->set_ats_str(423, 1, ANI_GO);
@@ -182,7 +182,7 @@ int Room66::proc7() {
 		return 0;
 
 	hideCur();
-	auto_move(7, P_CHEWY);
+	autoMove(7, P_CHEWY);
 	if (_G(spieler).flags26_10) {
 		del_inventar(_G(spieler).AkInvent);
 		invent_2_slot(92);
@@ -195,7 +195,7 @@ int Room66::proc7() {
 	_G(cur_hide_flag) = 0;
 	hideCur();
 	if (_G(spieler).flags26_20)
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 	showCur();
 
 	return 1;
@@ -205,7 +205,7 @@ void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, in
 	hideCur();
 
 	if (chewyAutoMovNr != -1)
-		auto_move(chewyAutoMovNr, P_CHEWY);
+		autoMove(chewyAutoMovNr, P_CHEWY);
 
 	_G(room)->set_timer_status(restartAniNr, TIMER_STOP);
 	_G(det)->del_static_ani(restartAniNr);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index a52f71e3a65..ba4626f39f3 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -47,9 +47,9 @@ void Room67::entry() {
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
 			set_person_pos(12, 100, P_HOWARD, P_RIGHT);
 			set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
-			go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+			goAutoXy(214, 112, P_NICHELLE, ANI_GO);
 		}
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		showCur();
 	}
 }
@@ -72,8 +72,8 @@ void Room67::setup_func() {
 	} else {
 		x = 137;
 	}
-	go_auto_xy(x, y, P_HOWARD, ANI_GO);
-	go_auto_xy(214, 112, P_NICHELLE, ANI_GO);
+	goAutoXy(x, y, P_HOWARD, ANI_GO);
+	goAutoXy(214, 112, P_NICHELLE, ANI_GO);
 }
 
 int16 Room67::use_grammo() {
@@ -81,9 +81,9 @@ int16 Room67::use_grammo() {
 	if (is_cur_inventar(SCHALL_INV)) {
 		hideCur();
 		action_flag = true;
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-		_G(det)->start_detail(0, 255, ANI_VOR);
+		_G(det)->start_detail(0, 255, ANI_FRONT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67)
 			start_aad_wait(376, -1);
 		else
@@ -98,7 +98,7 @@ int16 Room67::use_grammo() {
 
 void Room67::look_brief() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_aad_wait(379, -1);
 	showCur();
 }
@@ -110,14 +110,14 @@ int16 Room67::use_kommode() {
 		if (!_G(spieler).R67KommodeAuf) {
 			action_flag = true;
 			_G(spieler).R67KommodeAuf = true;
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->show_static_spr(9);
 			_G(atds)->set_ats_str(400, 1, ATS_DATEI);
 		} else if (!_G(spieler).R67KostuemWeg) {
 			action_flag = true;
 			_G(spieler).R67KostuemWeg = true;
-			auto_move(6, P_CHEWY);
+			autoMove(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(atds)->set_ats_str(400, 2, ATS_DATEI);
 			new_invent_2_cur(GALA_INV);
@@ -130,7 +130,7 @@ int16 Room67::use_kommode() {
 void Room67::kostuem_aad(int16 aad_nr) {
 	hideCur();
 	if (_G(spieler).DiaAMov != -1) {
-		auto_move(_G(spieler).DiaAMov, P_CHEWY);
+		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
 	start_aad_wait(aad_nr, -1);
 	showCur();
@@ -154,7 +154,7 @@ int16 Room67::talk_papagei() {
 			start_aad_wait(380, -1);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_TALK) {
-			auto_move(5, P_CHEWY);
+			autoMove(5, P_CHEWY);
 			showCur();
 
 			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
@@ -164,7 +164,7 @@ int16 Room67::talk_papagei() {
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_USE) {
 			hideCur();
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(spieler).R67PapageiWeg = true;
 			_G(det)->stop_detail(1);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index e7611e7dae6..3880b4bbc90 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -30,14 +30,14 @@ namespace Chewy {
 namespace Rooms {
 
 static const AniBlock ABLOCK38[2] = {
-	{ 5, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 6, 1, ANI_VOR, ANI_WAIT, 0 },
+	{ 5, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 6, 1, ANI_FRONT, ANI_WAIT, 0 },
 };
 
 static const AniBlock ABLOCK39[3] = {
-	{ 15, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 17, 1, ANI_VOR, ANI_WAIT, 0 },
-	{ 15, 1, ANI_RUECK, ANI_WAIT, 0 },
+	{ 15, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 17, 1, ANI_FRONT, ANI_WAIT, 0 },
+	{ 15, 1, ANI_BACK, ANI_WAIT, 0 },
 };
 
 
@@ -51,7 +51,7 @@ void Room68::entry() {
 	
 	if (_G(spieler).R68Papagei) {
 		_G(det)->show_static_spr(12);
-		_G(det)->start_detail(21, 255, ANI_VOR);
+		_G(det)->start_detail(21, 255, ANI_FRONT);
 	}
 
 	if (!_G(spieler).R68DivaWeg) {
@@ -66,7 +66,7 @@ void Room68::entry() {
 			set_person_pos(524, 51, P_HOWARD, P_LEFT);
 			set_person_pos(550, 54, P_NICHELLE, P_LEFT);
 		}
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		showCur();
 	}
 }
@@ -93,7 +93,7 @@ void Room68::setup_func() {
 	case 0:
 		if (_G(det)->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = 1;
-			_G(det)->start_detail(_G(r68HohesC), 1, ANI_VOR);
+			_G(det)->start_detail(_G(r68HohesC), 1, ANI_FRONT);
 		}
 		break;
 
@@ -103,18 +103,18 @@ void Room68::setup_func() {
 			if (_G(spieler).SpeechSwitch) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(_G(r68HohesC));
-				_G(det)->start_detail(_G(r68HohesC), 255, ANI_VOR);
+				_G(det)->start_detail(_G(r68HohesC), 255, ANI_FRONT);
 
 				// TODO
 				//while (_G(sndPlayer)->getSampleStatus(1) == 4)
 				//	set_up_screen(DO_SETUP);
 				_G(det)->stop_detail(_G(r68HohesC));
 			} else {
-				_G(det)->start_detail(_G(r68HohesC), 3, ANI_VOR);
+				_G(det)->start_detail(_G(r68HohesC), 3, ANI_FRONT);
 			}
 			
 			
-			_G(det)->start_detail(_G(r68HohesC), 3, ANI_VOR);
+			_G(det)->start_detail(_G(r68HohesC), 3, ANI_FRONT);
 		}
 		break;
 
@@ -143,13 +143,13 @@ void Room68::setup_func() {
 		ho_x = 320;
 		ni_x = 350;
 	}
-	go_auto_xy(ho_x, ho_y, P_HOWARD, ANI_GO);
-	go_auto_xy(ni_x, ni_y, P_NICHELLE, ANI_GO);
+	goAutoXy(ho_x, ho_y, P_HOWARD, ANI_GO);
+	goAutoXy(ni_x, ni_y, P_NICHELLE, ANI_GO);
 }
 
 void Room68::look_kaktus() {
 	hideCur();
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 	start_aad_wait(383, -1);
 	showCur();
 }
@@ -160,7 +160,7 @@ void Room68::talk_indigo() {
 
 void Room68::talk_indigo(int16 aad_nr) {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	_G(room)->set_timer_status(8, TIMER_STOP);
 	_G(det)->del_static_ani(8);
 	if (aad_nr == -1) {
@@ -185,7 +185,7 @@ int16 Room68::use_indigo() {
 		action_flag = true;
 		if (_G(spieler).R68Lied) {
 			hideCur();
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			auto_scroll(78, 0);
 			del_inventar(_G(spieler).AkInvent);
 			talk_indigo(394);
@@ -194,8 +194,8 @@ int16 Room68::use_indigo() {
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
-			start_detail_wait(13, 3, ANI_VOR);
-			start_detail_wait(25, 1, ANI_VOR);
+			start_detail_wait(13, 3, ANI_FRONT);
+			start_detail_wait(25, 1, ANI_FRONT);
 			_G(det)->set_static_ani(12, -1);
 			talk_indigo(398);
 			_G(cur_hide_flag) = false;
@@ -203,7 +203,7 @@ int16 Room68::use_indigo() {
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
-			start_detail_wait(26, 1, ANI_VOR);
+			start_detail_wait(26, 1, ANI_FRONT);
 			_G(room)->set_timer_status(8, TIMER_START);
 			_G(det)->set_static_ani(8, -1);
 			new_invent_2_cur(KARTE_INV);
@@ -221,10 +221,10 @@ int16 Room68::use_indigo() {
 
 void Room68::talk_keeper() {
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(room)->set_timer_status(20, TIMER_STOP);
 	_G(det)->del_static_ani(20);
-	start_detail_wait(15, 1, ANI_VOR);
+	start_detail_wait(15, 1, ANI_FRONT);
 	_G(det)->set_static_ani(16, -1);
 	showCur();
 	_G(ssi)[3].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
@@ -234,7 +234,7 @@ void Room68::talk_keeper() {
 	_G(cur_hide_flag) = false;
 	hideCur();
 	_G(det)->del_static_ani(16);
-	start_detail_wait(15, 1, ANI_RUECK);
+	start_detail_wait(15, 1, ANI_BACK);
 	_G(room)->set_timer_status(20, TIMER_START);
 	_G(det)->set_static_ani(20, -1);
 	showCur();
@@ -247,10 +247,10 @@ int16 Room68::use_papagei() {
 		action_flag = true;
 		_G(spieler).R68Papagei = true;
 		del_inventar(_G(spieler).AkInvent);
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->show_static_spr(12);
-		_G(det)->start_detail(21, 255, ANI_VOR);
+		_G(det)->start_detail(21, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(407, 1, ATS_DATEI);
 		showCur();
@@ -265,13 +265,13 @@ void Room68::calc_diva() {
 				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 				_G(r68HohesC) = 0;
 				_G(det)->hide_static_spr(3);
-				_G(det)->start_detail(_G(r68HohesC), 1, ANI_RUECK);
-				_G(det)->start_detail(18, 255, ANI_VOR);
+				_G(det)->start_detail(_G(r68HohesC), 1, ANI_BACK);
+				_G(det)->start_detail(18, 255, ANI_FRONT);
 			}
 		} else if (!_G(spieler).R68Gutschein && !is_chewy_busy()) {
 			hideCur();
 			_G(spieler).R68Gutschein = true;
-			auto_move(4, P_CHEWY);
+			autoMove(4, P_CHEWY);
 			start_aad_wait(386, -1);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			new_invent_2_cur(BAR_GUT_INV);
@@ -287,7 +287,7 @@ int16 Room68::use_keeper() {
 		hideCur();
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = true;
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(room)->set_timer_status(20, TIMER_STOP);
 		_G(det)->del_static_ani(20);
@@ -306,16 +306,16 @@ int16 Room68::use_diva() {
 	if (is_cur_inventar(B_MARY_INV)) {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		_G(det)->hide_static_spr(3);
-		start_detail_wait(4, 1, ANI_VOR);
+		start_detail_wait(4, 1, ANI_FRONT);
 		_G(spieler).R68Gutschein = false;
 		_G(det)->show_static_spr(3);
 	} else if (is_cur_inventar(B_MARY2_INV)) {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(det)->hide_static_spr(3);
 		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ABLOCK38);
@@ -323,7 +323,7 @@ int16 Room68::use_diva() {
 		_G(det)->del_static_ani(18);
 		register_cutscene(22);
 		_G(det)->del_static_ani(18);
-		start_detail_wait(7, 1, ANI_VOR);
+		start_detail_wait(7, 1, ANI_FRONT);
 		_G(atds)->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATEI);
 		set_person_spr(P_RIGHT, P_CHEWY);
@@ -337,7 +337,7 @@ int16 Room68::use_diva() {
 void Room68::kostuem_aad(int16 aad_nr) {
 	hideCur();
 	if (_G(spieler).DiaAMov != -1) {
-		auto_move(_G(spieler).DiaAMov, P_CHEWY);
+		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
 
 	start_aad_wait(aad_nr, -1);
@@ -352,19 +352,19 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		
 		_G(SetUpScreenFunc) = nullptr;
 		del_inventar(_G(spieler).AkInvent);
-		go_auto_xy(150, -13, P_NICHELLE, ANI_WAIT);
+		goAutoXy(150, -13, P_NICHELLE, ANI_WAIT);
 		_G(spieler).PersonHide[P_NICHELLE] = true;
-		go_auto_xy(161, 59, P_HOWARD, ANI_GO);
-		auto_move(4, P_CHEWY);
+		goAutoXy(161, 59, P_HOWARD, ANI_GO);
+		autoMove(4, P_CHEWY);
 		start_aad_wait(390, -1);
-		start_detail_wait(22, 1, ANI_VOR);
+		start_detail_wait(22, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		_G(det)->start_detail(27, 255, ANI_VOR);
+		_G(det)->start_detail(27, 255, ANI_FRONT);
 
 		if (_G(spieler).DisplayText)
-			start_detail_wait(23, 3, ANI_VOR);
+			start_detail_wait(23, 3, ANI_FRONT);
 		else {
-			_G(det)->start_detail(23, 255, ANI_VOR);
+			_G(det)->start_detail(23, 255, ANI_FRONT);
 			g_engine->_sound->playSound(109, 1, false);
 			wait_show_screen(2);
 
@@ -377,7 +377,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			g_engine->_sound->playSound(108, 1, false);
 		}
 		
-		_G(det)->start_detail(24, 255, ANI_VOR);
+		_G(det)->start_detail(24, 255, ANI_FRONT);
 		set_person_pos(26, 40, P_NICHELLE, P_RIGHT);
 		if (_G(spieler).DisplayText) {
 			start_aad_wait(391, -1);
@@ -389,14 +389,14 @@ void Room68::kostuem_aad(int16 aad_nr) {
 
 		_G(room)->set_timer_status(8, TIMER_STOP);
 		_G(det)->del_static_ani(8);
-		start_detail_wait(10, 1, ANI_VOR);
-		_G(det)->start_detail(11, 255, ANI_VOR);
+		start_detail_wait(10, 1, ANI_FRONT);
+		_G(det)->start_detail(11, 255, ANI_FRONT);
 		start_aad_wait(396, -1);
 		_G(det)->stop_detail(11);
 		_G(det)->set_static_ani(12, -1);
 		start_aad_wait(611, -1);
 		_G(det)->del_static_ani(12);
-		_G(det)->start_detail(14, 255, ANI_VOR);
+		_G(det)->start_detail(14, 255, ANI_FRONT);
 		start_aad_wait(395, -1);
 		_G(det)->stop_detail(14);
 		_G(room)->set_timer_status(8, TIMER_START);
@@ -410,7 +410,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(det)->stop_detail(24);
 		_G(det)->show_static_spr(13);
 		_G(spieler).R68Lied = true;
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		auto_scroll(216, 0);
 		_G(det)->hide_static_spr(13);
 		_G(spieler).PersonHide[P_NICHELLE] = false;
@@ -426,7 +426,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 
 void Room68::talk_papagei() {
 	hideCur();
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	showCur();
 
 	_G(ssi)[2].X = 60;
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 6d36d12a9a8..3ef062feaae 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -57,7 +57,7 @@ void Room69::entry(int16 eib_nr) {
 		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
 		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
 		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
-		go_auto_xy(351, 97, P_HOWARD, ANI_WAIT);
+		goAutoXy(351, 97, P_HOWARD, ANI_WAIT);
 		showCur();
 	}
 }
@@ -77,7 +77,7 @@ void Room69::setup_func() {
 
 void Room69::look_schild() {
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	start_aad_wait(382, -1);
 	showCur();
 }
@@ -91,24 +91,24 @@ int16 Room69::use_bruecke() {
 		if (!_G(spieler).R68KarteDa) {
 			calc_person_dia(P_HOWARD);
 		} else {
-			auto_move(3, P_CHEWY);
+			autoMove(3, P_CHEWY);
 			_G(spieler_mi)[P_CHEWY].Mode = true;
-			go_auto_xy(253, 103, P_CHEWY, ANI_WAIT);
-			go_auto_xy(141, 103, P_CHEWY, ANI_WAIT);
+			goAutoXy(253, 103, P_CHEWY, ANI_WAIT);
+			goAutoXy(141, 103, P_CHEWY, ANI_WAIT);
 
 			if (_G(spieler).PersonRoomNr[P_NICHELLE] == 69)
-				go_auto_xy(255, 84, 2, ANI_GO);
+				goAutoXy(255, 84, 2, ANI_GO);
 			
-			go_auto_xy(82, 95, P_CHEWY, ANI_WAIT);
-			go_auto_xy(46, 83, P_CHEWY, ANI_WAIT);
+			goAutoXy(82, 95, P_CHEWY, ANI_WAIT);
+			goAutoXy(46, 83, P_CHEWY, ANI_WAIT);
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 69) {
-				go_auto_xy(258, 86, P_HOWARD, ANI_GO);
-				go_auto_xy(147, 84, P_NICHELLE, ANI_WAIT);
-				go_auto_xy(140, 86, P_HOWARD, ANI_GO);
-				go_auto_xy(94, 77, P_NICHELLE, ANI_WAIT);
-				go_auto_xy(94, 82, P_HOWARD, ANI_GO);
-				go_auto_xy(59, 68, P_NICHELLE, ANI_WAIT);
+				goAutoXy(258, 86, P_HOWARD, ANI_GO);
+				goAutoXy(147, 84, P_NICHELLE, ANI_WAIT);
+				goAutoXy(140, 86, P_HOWARD, ANI_GO);
+				goAutoXy(94, 77, P_NICHELLE, ANI_WAIT);
+				goAutoXy(94, 82, P_HOWARD, ANI_GO);
+				goAutoXy(59, 68, P_NICHELLE, ANI_WAIT);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 70;
 				_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
 			}
@@ -127,19 +127,19 @@ void Room69::proc1() {
 	set_person_pos(46, 83, P_CHEWY, P_RIGHT);
 	set_person_pos(59, 68, P_NICHELLE, P_RIGHT);
 	set_person_pos(94, 82, P_HOWARD, P_RIGHT);
-	go_auto_xy(59, 68, P_NICHELLE, ANI_GO);
-	go_auto_xy(94, 82, P_HOWARD, ANI_WAIT);
-	go_auto_xy(94, 77, P_NICHELLE, ANI_GO);
-	go_auto_xy(140, 86, P_HOWARD, ANI_WAIT);
-	go_auto_xy(82, 95, P_CHEWY, _G(spieler).PersonRoomNr[P_HOWARD] == 69 ? ANI_GO : ANI_WAIT);
-	go_auto_xy(147, 84, P_NICHELLE, ANI_GO);
-	go_auto_xy(278, 86, P_HOWARD, ANI_WAIT);
-	go_auto_xy(255, 84, P_NICHELLE, ANI_WAIT);
-	go_auto_xy(237, 101, P_NICHELLE, ANI_GO);
-	go_auto_xy(351, 97, P_HOWARD, ANI_GO);
-	go_auto_xy(141, 109, P_CHEWY, ANI_GO);
-	go_auto_xy(253, 106, P_CHEWY, ANI_WAIT);
-	auto_move(3, P_CHEWY);
+	goAutoXy(59, 68, P_NICHELLE, ANI_GO);
+	goAutoXy(94, 82, P_HOWARD, ANI_WAIT);
+	goAutoXy(94, 77, P_NICHELLE, ANI_GO);
+	goAutoXy(140, 86, P_HOWARD, ANI_WAIT);
+	goAutoXy(82, 95, P_CHEWY, _G(spieler).PersonRoomNr[P_HOWARD] == 69 ? ANI_GO : ANI_WAIT);
+	goAutoXy(147, 84, P_NICHELLE, ANI_GO);
+	goAutoXy(278, 86, P_HOWARD, ANI_WAIT);
+	goAutoXy(255, 84, P_NICHELLE, ANI_WAIT);
+	goAutoXy(237, 101, P_NICHELLE, ANI_GO);
+	goAutoXy(351, 97, P_HOWARD, ANI_GO);
+	goAutoXy(141, 109, P_CHEWY, ANI_GO);
+	goAutoXy(253, 106, P_CHEWY, ANI_WAIT);
+	autoMove(3, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 }
 
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index bfc5b169b1e..698b6918886 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -53,7 +53,7 @@ void Room71::entry(int16 eib_nr) {
 		_G(timer_nr)[0] = _G(room)->set_timer(0, 10);
 		_G(det)->set_static_ani(0, -1);
 	} else if (_G(spieler).R71LeopardVined) {
-		_G(det)->start_detail(2, 255, ANI_VOR);
+		_G(det)->start_detail(2, 255, ANI_FRONT);
 		_G(det)->show_static_spr(8);
 		_G(det)->hide_static_spr(2);
 		_G(det)->hide_static_spr(3);
@@ -146,8 +146,8 @@ void Room71::setup_func() {
 			nicDestY = 31;
 		}
 
-		go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
-		go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
+		goAutoXy(howDestX, howDestY, P_HOWARD, ANI_GO);
+		goAutoXy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 	}
 }
 
@@ -158,7 +158,7 @@ int Room71::proc1() {
 	}
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(256, 0);
 	_delay = 0;
@@ -196,8 +196,8 @@ void Room71::proc2() {
 	start_aad_wait(432, -1);
 	start_aad_wait(433, -1);
 	_G(SetUpScreenFunc) = nullptr;
-	go_auto_xy(518, 35, P_HOWARD, ANI_GO);
-	go_auto_xy(568, 36, P_NICHELLE, ANI_WAIT);
+	goAutoXy(518, 35, P_HOWARD, ANI_GO);
+	goAutoXy(568, 36, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
 	_G(flags).NoScroll = true;
 	auto_scroll(284, 0);
@@ -209,7 +209,7 @@ void Room71::proc2() {
 	_G(det)->start_detail(5, 255, false);
 	auto_scroll(160, 0);
 	_G(det)->hide_static_spr(5);
-	start_detail_wait(1, 1, ANI_VOR);
+	start_detail_wait(1, 1, ANI_FRONT);
 	_G(det)->start_detail(2, 255, false);
 	_G(det)->stop_detail(5);
 	_G(det)->show_static_spr(8);
@@ -228,7 +228,7 @@ void Room71::proc2() {
 void Room71::proc3() {
 	start_aad_wait(431, -1);
 	_G(SetUpScreenFunc) = nullptr;
-	go_auto_xy(510, 34, P_NICHELLE, ANI_WAIT);
+	goAutoXy(510, 34, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
@@ -240,7 +240,7 @@ void Room71::proc3() {
 void Room71::proc4() {
 	start_aad_wait(430, -1);
 	_G(SetUpScreenFunc) = nullptr;
-	go_auto_xy(518, 35, P_HOWARD, ANI_WAIT);
+	goAutoXy(518, 35, P_HOWARD, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).PersonHide[P_HOWARD] = true;
@@ -252,7 +252,7 @@ void Room71::proc4() {
 void Room71::proc5(int16 val) {
 	_state = 1 + (_G(spieler).flags28_4 ? 1 : 0);
 	_G(det)->hide_static_spr(2);
-	start_detail_wait(val, 5, ANI_VOR);
+	start_detail_wait(val, 5, ANI_FRONT);
 	_G(det)->show_static_spr(2);
 	_state = 0;
 }
@@ -262,12 +262,12 @@ int Room71::proc6() {
 		return 0;
 
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(3);
 	_G(det)->show_static_spr(4);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(244, 44, P_CHEWY, ANI_WAIT);
+	goAutoXy(244, 44, P_CHEWY, ANI_WAIT);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(4);
 	_G(det)->show_static_spr(5);
@@ -275,7 +275,7 @@ int Room71::proc6() {
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
 	_G(atds)->set_steuer_bit(443, ATS_AKTIV_BIT, ATS_DATEI);
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	
 	showCur();
@@ -284,11 +284,11 @@ int Room71::proc6() {
 
 void Room71::proc7() {
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	start_aad_wait(429, -1);
 	_G(SetUpScreenFunc) = nullptr;
 	set_person_spr(P_LEFT, P_CHEWY);
-	go_auto_xy(323, 28, P_NICHELLE, ANI_WAIT);
+	goAutoXy(323, 28, P_NICHELLE, ANI_WAIT);
 	_G(flags).NoScroll = true;
 	auto_scroll(200, 0);
 	_G(spieler).PersonHide[P_NICHELLE] = true;
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index de1e826ca46..7ba6bc42f9d 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -59,9 +59,9 @@ void Room72::entry(int16 eib_nr) {
 		set_person_pos(50, 129, P_CHEWY, P_RIGHT);
 		set_person_pos(15, 103, P_HOWARD, P_RIGHT);
 		set_person_pos(-15, 102, P_NICHELLE, P_RIGHT);
-		go_auto_xy(185, 130, P_CHEWY, ANI_GO);
-		go_auto_xy(147, 103, P_HOWARD, ANI_GO);
-		go_auto_xy(120, 104, P_NICHELLE, ANI_WAIT);
+		goAutoXy(185, 130, P_CHEWY, ANI_GO);
+		goAutoXy(147, 103, P_HOWARD, ANI_GO);
+		goAutoXy(120, 104, P_NICHELLE, ANI_WAIT);
 		proc1(84);
 		register_cutscene(23);
 		break;
@@ -69,9 +69,9 @@ void Room72::entry(int16 eib_nr) {
 		set_person_pos(213, 129, P_CHEWY, P_LEFT);
 		set_person_pos(262, 103, P_HOWARD, P_LEFT);
 		set_person_pos(293, 102, P_NICHELLE, P_LEFT);
-		go_auto_xy(120, 130, P_CHEWY, ANI_GO);
-		go_auto_xy(154, 102, P_HOWARD, ANI_GO);
-		go_auto_xy(186, 102, P_NICHELLE, ANI_WAIT);
+		goAutoXy(120, 130, P_CHEWY, ANI_GO);
+		goAutoXy(154, 102, P_HOWARD, ANI_GO);
+		goAutoXy(186, 102, P_NICHELLE, ANI_WAIT);
 		proc1(85);
 		register_cutscene(23);
 		break;
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index b57b8ed99fc..5bcf3e9e454 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -85,7 +85,7 @@ int Room73::proc1() {
 
 	hideCur();
 	_G(spieler).flags28_20 = true;
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(atds)->del_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATEI);
@@ -102,7 +102,7 @@ int Room73::proc2() {
 
 	hideCur();
 	_G(spieler).flags28_40 = true;
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(3);
 	_G(det)->hide_static_spr(4);
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 1f66ade9991..45e4306e980 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -94,9 +94,9 @@ int Room74::proc1() {
 	if (is_cur_inventar(MACHETE_INV)) {
 		retVal = 1;
 		_G(spieler).R74CutRubberPlant = true;
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		set_person_pos(272, 116, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(det)->start_detail(0, 255, false);
@@ -105,7 +105,7 @@ int Room74::proc1() {
 
 	} else if (!_G(spieler).inv_cur && _G(spieler).R74CutRubberPlant) {
 		_G(atds)->set_steuer_bit(435, ATS_AKTIV_BIT, ATS_DATEI);
-		auto_move(5, P_CHEWY);
+		autoMove(5, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		new_invent_2_cur(RUBBER_INV);
 	}
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 4419d325745..13f47780bec 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -89,7 +89,7 @@ void Room75::proc1() {
 	set_person_pos(363, 110, P_CHEWY, P_LEFT);
 	set_person_pos(322, 85, P_NICHELLE, P_RIGHT);
 	set_person_pos(317, 96, P_HOWARD, P_RIGHT);
-	go_auto_xy(318, 110, P_NICHELLE, ANI_WAIT);
+	goAutoXy(318, 110, P_NICHELLE, ANI_WAIT);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 3011220bdd4..154f977159e 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -100,7 +100,7 @@ void Room76::setup_func() {
 
 void Room76::talk1() {
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	auto_scroll(172, 0);
 	const int diaNr = 425 + (_G(spieler).flags32_4 ? 1 : 0);
 	start_aad_wait(diaNr, -1);
@@ -109,7 +109,7 @@ void Room76::talk1() {
 
 void Room76::talk2() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	int diaNr;
 	if (!_G(spieler).flags29_8)
 		diaNr = 423;
@@ -128,8 +128,8 @@ void Room76::talk2() {
 void Room76::proc3(int diaNr) {
 	start_aad_wait(diaNr, -1);
 	_G(det)->del_static_ani(2);
-	start_detail_wait(3, 1, ANI_VOR);
-	start_detail_wait(4, 2, ANI_VOR);
+	start_detail_wait(3, 1, ANI_FRONT);
+	start_detail_wait(4, 2, ANI_FRONT);
 	_G(det)->set_static_ani(2, -1);
 }
 
@@ -139,11 +139,11 @@ void Room76::proc5() {
 	_G(det)->start_detail(6, 1, false);
 	_G(flags).NoScroll = false;
 	wait_show_screen(15);
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	_G(det)->hide_static_spr(10);
 	_G(det)->start_detail(13, 1, false);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(669, 127, P_CHEWY, ANI_WAIT);
+	goAutoXy(669, 127, P_CHEWY, ANI_WAIT);
 	wait_show_screen(20);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
@@ -159,14 +159,14 @@ int Room76::proc6() {
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).flags29_8 = true;
 		retVal = 1;
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		proc3(424);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(det)->del_static_ani(2);
-		start_detail_wait(5, 1, ANI_VOR);
+		start_detail_wait(5, 1, ANI_FRONT);
 		_G(det)->set_static_ani(2, -1);
-		start_detail_wait(9, 1, ANI_VOR);
-		start_detail_wait(10, 1, ANI_VOR);
+		start_detail_wait(9, 1, ANI_FRONT);
+		start_detail_wait(10, 1, ANI_FRONT);
 		showCur();
 	} else if (is_cur_inventar(94)) {
 		hideCur();
@@ -185,7 +185,7 @@ int Room76::proc7() {
 	
 	if (_G(spieler).flags29_4) {
 		hideCur();
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		invent_2_slot(106);
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 98c8619c90c..2bd9711b311 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -72,7 +72,7 @@ int Room77::proc1() {
 		return 0;
 
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	int diaNr, aniId;
 	if (_G(spieler).flags29_8) {
 		start_spz_wait(14, 1, false, P_CHEWY);
@@ -101,7 +101,7 @@ int Room77::proc2() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	int diaNr, aniId;
 	if (_G(spieler).flags29_8) {
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 379ba3b23d9..ae78a265f3e 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -98,7 +98,7 @@ void Room78::entry() {
 						if (flag1 == 0) {
 							_G(det)->start_detail(5, 1, false);
 						} else {
-							start_detail_wait(5, 1, ANI_VOR);
+							start_detail_wait(5, 1, ANI_FRONT);
 						}
 					} else {
 						if (det4DestX <= 0)
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 7814e23884d..7ce0f7bc85e 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -91,8 +91,8 @@ void Room79::setup_func() {
 		nicDestY = 75;
 	}
 
-	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 07470f1f9e0..d7b0867a300 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -66,31 +66,31 @@ void Room81::xit(int16 eib_nr) {
 void Room81::proc1() {
 	int diaNr = -1;
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	if (!_G(spieler).flags30_2)
 		diaNr = 458;
 	else if (_G(spieler).flags30_4)
 		diaNr = 460;
 	else {
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
-		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
-		go_auto_xy(171, 93, P_CHEWY, ANI_WAIT);
-		go_auto_xy(143, 62, P_CHEWY, ANI_WAIT);
-		go_auto_xy(112, 60, P_CHEWY, ANI_WAIT);
+		goAutoXy(222, 97, P_CHEWY, ANI_WAIT);
+		goAutoXy(100, 96, P_CHEWY, ANI_WAIT);
+		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
+		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
+		goAutoXy(112, 60, P_CHEWY, ANI_WAIT);
 		start_aad_wait(461, -1);
-		go_auto_xy(143, 62, P_CHEWY, ANI_WAIT);
+		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(0, 1, ANI_VOR);
+		start_detail_wait(0, 1, ANI_FRONT);
 		_G(det)->start_detail(1, 255, false);
 		start_aad_wait(459, -1);
 		_G(det)->stop_detail(1);
 		start_detail_wait(0, 1, ANI_GO);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		go_auto_xy(171, 93, P_CHEWY, ANI_WAIT);
-		go_auto_xy(100, 96, P_CHEWY, ANI_WAIT);
-		go_auto_xy(222, 97, P_CHEWY, ANI_WAIT);
-		auto_move(1, P_CHEWY);
+		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
+		goAutoXy(100, 96, P_CHEWY, ANI_WAIT);
+		goAutoXy(222, 97, P_CHEWY, ANI_WAIT);
+		autoMove(1, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		invent_2_slot(DIARY_INV);
 		_G(spieler).R84GoonsPresent = true;
@@ -112,7 +112,7 @@ int Room81::proc2() {
 
 	hideCur();
 	if (is_cur_inventar(110)) {
-		auto_move(1, P_CHEWY);
+		autoMove(1, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		aniId = 5;
 		diaNr = 462;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 674ee57f4ca..b1e70db2a20 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -104,8 +104,8 @@ void Room82::setup_func() {
 		nicDestX = 543;
 	}
 
-	go_auto_xy(howDestX, 111, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, 111, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
 void Room82::talk1() {
@@ -133,7 +133,7 @@ void Room82::talk1() {
 
 void Room82::talk2() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_aad_wait(453, -1);
 	showCur();
 }
@@ -147,12 +147,12 @@ int Room82::proc3() {
 		return 0;
 
 	hideCur();
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
-	start_detail_wait(2, 1, ANI_VOR);
-	start_detail_wait(3, 1, ANI_VOR);
+	start_detail_wait(2, 1, ANI_FRONT);
+	start_detail_wait(3, 1, ANI_FRONT);
 	_G(det)->set_static_ani(0, -1);
 	start_spz_wait(13, 1, false, P_CHEWY);
 
@@ -166,7 +166,7 @@ int Room82::proc3() {
 void Room82::proc4() {
 	hideCur();
 	_G(spieler).flags30_8 = true;
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	_G(flags).NoScroll = true;
 	auto_scroll(270, 0);
 	_G(room)->set_timer_status(7, TIMER_STOP);
@@ -192,7 +192,7 @@ int Room82::proc6() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	if (_G(spieler).flags30_10) {
 		start_aad_wait(450, -1);
@@ -223,7 +223,7 @@ void Room82::proc8() {
 	hideCur();
 	_G(spieler).flags30_10 = true;
 	start_aad_wait(447, -1);
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 
 	while (_G(spieler_vector)[P_NICHELLE].Count != 0)
 		set_up_screen(DO_SETUP);
@@ -235,7 +235,7 @@ void Room82::proc8() {
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	start_aad_wait(448, -1);
 	_G(det)->del_static_ani(4);
-	start_detail_wait(6, 2, ANI_VOR);
+	start_detail_wait(6, 2, ANI_FRONT);
 	_G(det)->set_static_ani(4, -1);
 	showCur();
 }
@@ -244,7 +244,7 @@ int Room82::proc9() {
 	if (_G(spieler).inv_cur || !_G(spieler).flags30_40)
 		return 0;
 
-	auto_move(7, P_CHEWY);
+	autoMove(7, P_CHEWY);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 	switch_room(88);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 430a9642755..5366b2a79d0 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -136,7 +136,7 @@ void Room84::setup_func() {
 		_flag = true;
 		_G(spieler).flags30_80 = true;
 		hideCur();
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(flags).NoScroll = true;
 		set_person_spr(P_LEFT, P_CHEWY);
 		auto_scroll(150, 0);
@@ -145,7 +145,7 @@ void Room84::setup_func() {
 		start_aad_wait(455, -1);
 		_G(det)->del_static_ani(4);
 		start_spz(62, 1, false, P_HOWARD);
-		start_detail_wait(5, 1, ANI_VOR);
+		start_detail_wait(5, 1, ANI_FRONT);
 		_G(det)->set_static_ani(3, -1);
 		start_aad_wait(456, -1);
 		_G(flags).NoScroll = false;
@@ -167,12 +167,12 @@ void Room84::setup_func() {
 		nicDestX = 523;
 	}
 
-	go_auto_xy(howDestX, 113, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, 110, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, 113, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, 110, P_NICHELLE, ANI_GO);
 }
 
 void Room84::talk1() {
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	_G(flags).NoScroll = true;
 	set_person_spr(P_LEFT, P_CHEWY);
 	auto_scroll(150, 0);
@@ -189,11 +189,11 @@ int Room84::proc4() {
 		return 0;
 
 	hideCur();
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 
 	if (_G(spieler).flags32_10) {
 		_G(det)->stop_detail(7);
-		start_detail_wait(8, 1, ANI_VOR);
+		start_detail_wait(8, 1, ANI_FRONT);
 	} else {
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 	}
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 67da2e4ee37..ce9e7cb1e23 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -145,17 +145,17 @@ void Room85::setup_func() {
 		nicDestX = 128;
 	}
 
-	go_auto_xy(howDestX, 142, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, 142, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, 142, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, 142, P_NICHELLE, ANI_GO);
 }
 
 int Room85::proc2() {
 	if (_G(spieler).inv_cur)
 		return 0;
 
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(det)->stop_detail(1);
-	start_detail_wait(2, 1, ANI_VOR);
+	start_detail_wait(2, 1, ANI_FRONT);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 89;
 	cur_2_inventory();
 	remove_inventory(109);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index ac09d3b35c0..c483c551b51 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -69,7 +69,7 @@ void Room86::entry(int16 eib_nr) {
 		set_person_pos(443, 66, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 84;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 0;
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 		_G(flags).NoScroll = true;
 		_G(spieler.ScrollxStep = 2);
 		auto_scroll(30, 0);
@@ -80,13 +80,13 @@ void Room86::entry(int16 eib_nr) {
 		_G(det)->show_static_spr(4);
 		_G(det)->show_static_spr(5);
 		invent_2_slot(94);
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		_G(flags).NoScroll = true;
 		auto_scroll(246, 0);
 		proc3(false);
 		flic_cut(FCUT_092);
 		_G(flags).NoScroll = false;
-		auto_move(0, P_CHEWY);
+		autoMove(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
 		switch_room(85);
 		showCur();
@@ -137,8 +137,8 @@ void Room86::setup_func() {
 		nicDestX = 134;
 	}
 
-	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 int Room86::proc2() {
@@ -146,13 +146,13 @@ int Room86::proc2() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->start_detail(0, 255, false);
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
 	del_inventar(_G(spieler).AkInvent);
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	proc3(true);
 	_G(atds)->del_steuer_bit(499, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(497, 1, ATS_DATEI);
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 4fa1319b698..1c606c8978c 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -49,7 +49,7 @@ void Room87::entry() {
 
 	set_person_pos(11, 70, P_HOWARD, P_RIGHT);
 	set_person_pos(-3, 81, P_NICHELLE, P_RIGHT);
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 }
 
 void Room87::setup_func() {
@@ -79,8 +79,8 @@ void Room87::setup_func() {
 		nicDestY = 81;
 	}
 
-	go_auto_xy(howDestX, howDestY, P_HOWARD, ANI_GO);
-	go_auto_xy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
+	goAutoXy(howDestX, howDestY, P_HOWARD, ANI_GO);
+	goAutoXy(nicDestX, nicDestY, P_NICHELLE, ANI_GO);
 }
 
 void Room87::xit(int16 eib_nr) {
@@ -93,9 +93,9 @@ void Room87::xit(int16 eib_nr) {
 	_G(HowardMov) = 1;
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 2;
-	go_auto_xy(20, 56, P_CHEWY, ANI_WAIT);
-	go_auto_xy(31, 56, P_CHEWY, ANI_WAIT);
-	go_auto_xy(9, 53, P_CHEWY, ANI_WAIT);
+	goAutoXy(20, 56, P_CHEWY, ANI_WAIT);
+	goAutoXy(31, 56, P_CHEWY, ANI_WAIT);
+	goAutoXy(9, 53, P_CHEWY, ANI_WAIT);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).ScrollxStep = 1;
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 87)
@@ -131,7 +131,7 @@ int Room87::proc2(int16 txt_nr) {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
 		start_aad_wait(diaNr, -1);
 	} else {
-		auto_move(movNr, P_CHEWY);
+		autoMove(movNr, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(atds)->set_ats_str(txt_nr, 1, ATS_DATEI);
@@ -153,7 +153,7 @@ int Room87::proc4() {
 		return 0;
 
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	flic_cut(FCUT_093);
 	flic_cut(FCUT_094);
 	start_aad(472);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index ca23225de87..31e9d5d3862 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -59,7 +59,7 @@ int Room88::proc1() {
 		return 0;
 
 	hideCur();
-	auto_move(0, P_CHEWY);
+	autoMove(0, P_CHEWY);
 	switch_room(_G(spieler).r88DestRoom);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
@@ -73,10 +73,10 @@ int Room88::proc2() {
 		return 0;
 
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->show_static_spr(0);
-	start_detail_wait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_VOR);
+	start_detail_wait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_FRONT);
 	_G(det)->hide_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
 	_G(spieler).flags31_10 = false;
 	_G(det)->show_static_spr(1 + (!_G(spieler).flags30_10 ? 1 : 0));
@@ -92,7 +92,7 @@ int Room88::proc3() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 
 	if (!_G(spieler).flags30_80 || _G(spieler).R88UsedMonkey) {
 		hideCur();
@@ -116,7 +116,7 @@ int Room88::proc3() {
 		const int aniNr = 1 + (_G(spieler).flags31_10 ? 1 : 0);
 
 		for (int i = 0; i < 3; ++i) {
-			start_detail_wait(aniNr, 1, ANI_VOR);
+			start_detail_wait(aniNr, 1, ANI_FRONT);
 			start_detail_wait(aniNr, 1, ANI_GO);
 		}
 
@@ -129,7 +129,7 @@ int Room88::proc3() {
 		_G(out)->raster_col(0, 0, 0, 0);
 		switch_room(80);
 		hideCur();
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 4ae86d65f98..3430f5d2f97 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -160,7 +160,7 @@ void Room89::setup_func() {
 	else
 		destX = 116;
 
-	go_auto_xy(destX, 114, P_HOWARD, ANI_GO);
+	goAutoXy(destX, 114, P_HOWARD, ANI_GO);
 }
 
 void Room89::talk1() {
@@ -196,7 +196,7 @@ int Room89::proc4() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 
 	if (_G(spieler).flags33_4) {
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 687d30dc3c1..2feaeb63c96 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -79,11 +79,11 @@ void Room90::entry(int16 eib_nr) {
 	if (!_G(spieler).flags33_10) {
 		_G(flags).ZoomMov = false;
 		start_aad_wait(498, -1);
-		go_auto_xy(-20, 121, P_HOWARD, ANI_GO);
-		auto_move(1, P_CHEWY);
-		start_detail_frame(2, 1, ANI_VOR, 3);
+		goAutoXy(-20, 121, P_HOWARD, ANI_GO);
+		autoMove(1, P_CHEWY);
+		start_detail_frame(2, 1, ANI_FRONT, 3);
 		_G(det)->start_detail(0, 1, false);
-		start_detail_wait(1, 1, ANI_VOR);
+		start_detail_wait(1, 1, ANI_FRONT);
 		_G(spieler).flags33_10 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
 		switch_room(91);
@@ -177,7 +177,7 @@ void Room90::setup_func() {
 	if (_G(HowardMov) == 2)
 		destX = 18;
 
-	go_auto_xy(destX, 132, P_HOWARD, ANI_GO);
+	goAutoXy(destX, 132, P_HOWARD, ANI_GO);
 }
 
 void Room90::proc2() {
@@ -238,7 +238,7 @@ int Room90::getHubcaps() {
 		return 0;
 
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	start_aad_wait(515, -1);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	start_spz_wait(43, 1, false, P_CHEWY);
@@ -254,7 +254,7 @@ int Room90::getHubcaps() {
 	start_aad_wait(516, -1);
 	_G(spieler).flags34_40 = true;
 	_G(spieler).flags35_1 = true;
-	auto_move(4, P_CHEWY);
+	autoMove(4, P_CHEWY);
 	auto_scroll(176, 0);
 	_G(det)->set_detail_pos(12, 495, 15);
 	_G(det)->start_detail(12, 255, false);
@@ -287,12 +287,12 @@ int Room90::shootControlUnit() {
 	del_inventar(_G(spieler).AkInvent);
 	_G(HowardMov) = 2;
 	_G(flags).ZoomMov = false;
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(232, 142, P_CHEWY, ANI_WAIT);
+	goAutoXy(232, 142, P_CHEWY, ANI_WAIT);
 	_G(flags).NoScroll = true;
 	auto_scroll(176, 0);
-	start_detail_wait(13, 1, ANI_VOR);
+	start_detail_wait(13, 1, ANI_FRONT);
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_107);
 	_G(spieler).scrollx = 0;
@@ -328,7 +328,7 @@ int Room90::useSurimyOnWreck() {
 	_G(spieler).flags34_10 = true;
 	hideCur();
 	cur_2_inventory();
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 	_G(maus_links_click) = false;
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index eff2e2a8f06..8bfdddfa8c7 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -91,13 +91,13 @@ void Room91::setup_func() {
 		calc_person_look();
 		const int xyPos = _G(spieler_vector)[0].Xypos[0];
 		if (xyPos < 130)
-			go_auto_xy(40, 97, P_HOWARD, ANI_GO);
+			goAutoXy(40, 97, P_HOWARD, ANI_GO);
 		else if (xyPos < 312)
-			go_auto_xy(221, 94, P_HOWARD, ANI_GO);
+			goAutoXy(221, 94, P_HOWARD, ANI_GO);
 		else if (xyPos < 445)
-			go_auto_xy(342, 93, P_HOWARD, ANI_GO);
+			goAutoXy(342, 93, P_HOWARD, ANI_GO);
 		else
-			go_auto_xy(536, 90, P_HOWARD, ANI_GO);
+			goAutoXy(536, 90, P_HOWARD, ANI_GO);
 	} else {
 		if (_G(menu_display))
 			return;
@@ -115,7 +115,7 @@ void Room91::setup_func() {
 		const int aniNr = 1 + (_G(minfo).y <= 100 ? 1 : 0);
 		hideCur();
 		_G(det)->stop_detail(0);
-		start_detail_wait(aniNr, 1, ANI_VOR);
+		start_detail_wait(aniNr, 1, ANI_FRONT);
 		_click = oldClick;
 		_G(det)->start_detail(0, 255, false);
 		_G(det)->start_detail(aniNr + 2, 1, false);
@@ -127,11 +127,11 @@ void Room91::setup_func() {
 			_G(det)->stop_detail(0);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			hideCur();
-			auto_move(1, P_CHEWY);
+			autoMove(1, P_CHEWY);
 			stop_spz();
 			start_aad_wait(505, -1);
 			_G(spieler).PersonHide[P_HOWARD] = true;
-			start_detail_wait(9, 1, ANI_VOR);
+			start_detail_wait(9, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 			_G(spieler).flags34_4 = false;
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index cd025f59bf5..ec0d8b1f83b 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -38,7 +38,7 @@ void Room93::entry() {
 	_G(det)->set_static_ani(0, -1);
 	start_aad_wait(616, -1);
 	_G(det)->del_static_ani(0);
-	start_detail_wait(3, 1, ANI_VOR);
+	start_detail_wait(3, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
 	start_ads_wait(27);
 
@@ -49,13 +49,13 @@ void Room93::entry() {
 		_G(det)->set_static_ani(0, -1);
 		start_aad_wait(549, -1);
 		_G(det)->del_static_ani(0);
-		start_detail_wait(3, 1, ANI_VOR);
-		start_detail_wait(6, 1, ANI_VOR);
+		start_detail_wait(3, 1, ANI_FRONT);
+		start_detail_wait(6, 1, ANI_FRONT);
 		_G(det)->set_static_ani(7, -1);
 		start_aad_wait(550, -1);
 		_G(det)->del_static_ani(7);
 		start_detail_wait(6, 1, ANI_GO);
-		start_detail_wait(2, 1, ANI_VOR);
+		start_detail_wait(2, 1, ANI_FRONT);
 		set_up_screen(DO_SETUP);
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 4698d834ba5..b9ce2f08c6a 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -91,7 +91,7 @@ void Room94::entry() {
 		hideCur();
 		_G(spieler).scrollx = 120;
 		set_person_pos(255, 86, P_HOWARD, P_LEFT);
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		showCur();
 	}
 }
@@ -115,7 +115,7 @@ void Room94::setup_func() {
 		destY = 86;
 	}
 	
-	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
+	goAutoXy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 void Room94::gedAction(int index) {
@@ -134,7 +134,7 @@ int Room94::giveGhostBottle() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	auto_scroll(216, 0);
 	del_inventar(_G(spieler).AkInvent);
 	_G(out)->setPointer(nullptr);
@@ -155,7 +155,7 @@ int Room94::giveGhostBottle() {
 	_G(det)->start_detail(6, 1, false);	
 	_G(room)->set_timer_status(3, TIMER_STOP);
 	_G(det)->del_static_ani(3);
-	start_detail_wait(4, 1, ANI_VOR);
+	start_detail_wait(4, 1, ANI_FRONT);
 	_G(spieler).flags35_10 = true;
 	_G(spieler).room_e_obj[138].Attribut = AUSGANG_OBEN;
 	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 65bf64f740c..42c110aba1c 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -47,7 +47,7 @@ void Room95::entry(int16 eib_nr) {
 	hideCur();
 	if (eib_nr == 138) {
 		set_person_pos(-20, 120, P_HOWARD, ANI_GO);
-		auto_move(2, P_CHEWY);
+		autoMove(2, P_CHEWY);
 	} else {
 		set_person_pos(473, 83, P_HOWARD, P_RIGHT);
 	}
@@ -84,12 +84,12 @@ void Room95::setup_func() {
 		destY = 83;
 	}
 
-	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
+	goAutoXy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 int Room95::proc2() {
 	hideCur();
-	auto_move(3, P_CHEWY);
+	autoMove(3, P_CHEWY);
 	if (is_cur_inventar(113)) {
 		del_inventar(_G(spieler).AkInvent);
 
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index a89746fb006..f9e53bb588d 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -45,7 +45,7 @@ void Room96::entry() {
 	hideCur();
 	set_person_pos(93, 62, P_HOWARD, P_RIGHT);
 	set_person_pos(116, 74, P_CHEWY, P_RIGHT);
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	showCur();
 }
 
@@ -70,7 +70,7 @@ void Room96::setup_func() {
 		destY = 60;
 	}
 
-	go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
+	goAutoXy(destX, destY, P_HOWARD, ANI_GO);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 767631e65e9..21fddbb676b 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -65,14 +65,14 @@ void Room97::entry() {
 	}
 	
 	if (_G(spieler).flags36_10) {
-		_G(det)->start_detail(11, 255, ANI_VOR);
+		_G(det)->start_detail(11, 255, ANI_FRONT);
 		_G(det)->stop_detail(5);
-		_G(det)->start_detail(6, 255, ANI_VOR);
-		_G(det)->start_detail(12, 255, ANI_VOR);
+		_G(det)->start_detail(6, 255, ANI_FRONT);
+		_G(det)->start_detail(12, 255, ANI_FRONT);
 	}
 
 	if (_G(spieler).flags36_40) {
-		_G(det)->start_detail(14, 255, ANI_VOR);
+		_G(det)->start_detail(14, 255, ANI_FRONT);
 		_G(det)->show_static_spr(13);
 		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
@@ -83,7 +83,7 @@ void Room97::entry() {
 		_G(det)->set_detail_pos(27, 272, 110);
 		for (int i = 0; i < 2; ++i) {
 			_G(det)->stop_detail(23 + i);
-			_G(det)->start_detail(27 + i, 255, ANI_VOR);
+			_G(det)->start_detail(27 + i, 255, ANI_FRONT);
 		}
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->stopSound(0);
@@ -113,7 +113,7 @@ void Room97::entry() {
 		_G(spieler).SVal2 = 0;
 		_G(spieler).flags35_4 = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(19, 1, ANI_VOR);
+		start_detail_wait(19, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		showCur();
 		switch_room(89);
@@ -232,7 +232,7 @@ void Room97::setup_func() {
 		}
 
 		if (_G(HowardMov) != 1)
-			go_auto_xy(destX, destY, P_HOWARD, ANI_GO);
+			goAutoXy(destX, destY, P_HOWARD, ANI_GO);
 	}
 
 	if (!_bool18DB32)
@@ -253,7 +253,7 @@ void Room97::setup_func() {
 	}	
 	
 	if (destX != -1)
-		go_auto_xy(destX, destY, P_NICHELLE, ANI_GO);
+		goAutoXy(destX, destY, P_NICHELLE, ANI_GO);
 }
 
 void Room97::proc2() {
@@ -267,11 +267,11 @@ void Room97::proc2() {
 	_G(Sdi)[24].z_ebene = 6;
 	_G(spieler).flags36_1 = false;
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(455, 59, P_CHEWY, ANI_WAIT);
-	go_auto_xy(496, 99, P_CHEWY, ANI_WAIT);
-	go_auto_xy(530, 99, P_CHEWY, ANI_WAIT);
-	go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
-	go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
+	goAutoXy(455, 59, P_CHEWY, ANI_WAIT);
+	goAutoXy(496, 99, P_CHEWY, ANI_WAIT);
+	goAutoXy(530, 99, P_CHEWY, ANI_WAIT);
+	goAutoXy(572, 139, P_CHEWY, ANI_WAIT);
+	goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(Sdi)[6].z_ebene = 166;
 	_G(Sdi)[24].z_ebene = 157;
@@ -291,32 +291,32 @@ void Room97::proc3() {
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(557, -1);
-		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
+		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else if (!_G(spieler).flags36_40) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(568, -1);
-		go_auto_xy(588, 129, P_CHEWY, ANI_WAIT);
+		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
 		_G(HowardMov) = 1;
-		go_auto_xy(572, 139, P_CHEWY, ANI_WAIT);
+		goAutoXy(572, 139, P_CHEWY, ANI_WAIT);
 		_G(Sdi)[6].z_ebene = 6;
 		_G(Sdi)[24].z_ebene = 6;
 
-		go_auto_xy(530, 99, P_CHEWY, ANI_WAIT);
-		go_auto_xy(496, 99, P_CHEWY, ANI_WAIT);
-		go_auto_xy(455, 59, P_CHEWY, ANI_WAIT);
-		go_auto_xy(440, 52, P_CHEWY, ANI_WAIT);
+		goAutoXy(530, 99, P_CHEWY, ANI_WAIT);
+		goAutoXy(496, 99, P_CHEWY, ANI_WAIT);
+		goAutoXy(455, 59, P_CHEWY, ANI_WAIT);
+		goAutoXy(440, 52, P_CHEWY, ANI_WAIT);
 		if (!_G(spieler).flags36_80) {
-			go_auto_xy(572, 122, P_HOWARD, ANI_WAIT);
-			go_auto_xy(526, 83, P_HOWARD, ANI_WAIT);
-			go_auto_xy(500, 83, P_HOWARD, ANI_WAIT);
+			goAutoXy(572, 122, P_HOWARD, ANI_WAIT);
+			goAutoXy(526, 83, P_HOWARD, ANI_WAIT);
+			goAutoXy(500, 83, P_HOWARD, ANI_WAIT);
 		}
 
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		if (!_G(spieler).flags36_80) {
-			go_auto_xy(442, 35, P_HOWARD, ANI_WAIT);
-			go_auto_xy(497, 31, P_HOWARD, ANI_WAIT);
+			goAutoXy(442, 35, P_HOWARD, ANI_WAIT);
+			goAutoXy(497, 31, P_HOWARD, ANI_WAIT);
 			start_aad_wait(562, -1);
 		}
 		_G(spieler_mi)[P_CHEWY].Mode = false;
@@ -339,7 +339,7 @@ void Room97::proc4() {
 		stop_person(P_CHEWY);
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->stopSound(1);
-		start_detail_wait(9, 1, ANI_VOR);
+		start_detail_wait(9, 1, ANI_FRONT);
 		_G(det)->show_static_spr(21);
 
 		while (_G(spieler_vector)[P_HOWARD].Xypos[0] > 996) {
@@ -350,22 +350,22 @@ void Room97::proc4() {
 		_G(det)->show_static_spr(2);
 		_G(HowardMov) = 1;
 		
-		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
-		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
-		go_auto_xy(1037, 90, P_CHEWY, ANI_WAIT);
+		goAutoXy(967, 111, P_CHEWY, ANI_WAIT);
+		goAutoXy(1008, 93, P_CHEWY, ANI_WAIT);
+		goAutoXy(1037, 90, P_CHEWY, ANI_WAIT);
 
-		go_auto_xy(995, 77, P_HOWARD, ANI_WAIT);
-		go_auto_xy(1047, 87, P_HOWARD, ANI_WAIT);
+		goAutoXy(995, 77, P_HOWARD, ANI_WAIT);
+		goAutoXy(1047, 87, P_HOWARD, ANI_WAIT);
 
-		start_detail_wait(29, 1, ANI_VOR);
+		start_detail_wait(29, 1, ANI_FRONT);
 		_G(det)->hide_static_spr(21);
 		g_engine->_sound->playSound(9, 1);
 		g_engine->_sound->stopSound(0);
-		start_detail_wait(9, 0, ANI_RUECK);
+		start_detail_wait(9, 0, ANI_BACK);
 
-		go_auto_xy(1008, 93, P_CHEWY, ANI_WAIT);
-		go_auto_xy(967, 111, P_CHEWY, ANI_WAIT);
-		go_auto_xy(995, 82, P_HOWARD, ANI_WAIT);
+		goAutoXy(1008, 93, P_CHEWY, ANI_WAIT);
+		goAutoXy(967, 111, P_CHEWY, ANI_WAIT);
+		goAutoXy(995, 82, P_HOWARD, ANI_WAIT);
 		_G(det)->hide_static_spr(2);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
@@ -382,7 +382,7 @@ int Room97::proc5() {
 		return 0;
 
 	hideCur();
-	auto_move(0, P_CHEWY);
+	autoMove(0, P_CHEWY);
 	auto_scroll(800, 0);
 	
 	while (_G(spieler_vector)[P_HOWARD].Xypos[0] < 1080) {
@@ -416,17 +416,17 @@ int Room97::proc6() {
 		return 0;
 
 	hideCur();
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	go_auto_xy(298, 120, P_CHEWY, ANI_WAIT);
+	goAutoXy(298, 120, P_CHEWY, ANI_WAIT);
 	set_person_spr(P_LEFT, P_CHEWY);
 	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 	_G(det)->hide_static_spr(15);
-	start_detail_wait(1, 1, ANI_VOR);
+	start_detail_wait(1, 1, ANI_FRONT);
 	_G(det)->show_static_spr(28);
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	_G(det)->hide_static_spr(18);
-	start_detail_wait(15, 1, ANI_VOR);
+	start_detail_wait(15, 1, ANI_FRONT);
 	_G(det)->show_static_spr(17);
 	start_spz(CH_TALK5, 255, false, P_CHEWY);
 	start_aad_wait(558, -1);
@@ -450,18 +450,18 @@ int Room97::proc7() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->hide_static_spr(17);
-	start_detail_wait(22, 1, ANI_VOR);
+	start_detail_wait(22, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(530, 2, ATS_DATEI);
 	new_invent_2_cur(SLIME_INV);
 	_G(spieler).flags36_4 = true;
 	set_person_pos(304, 102, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	auto_move(1, P_CHEWY);
+	autoMove(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 
 	showCur();
@@ -473,7 +473,7 @@ int Room97::proc8() {
 		return 0;
 
 	hideCur();
-	auto_move(2, P_CHEWY);
+	autoMove(2, P_CHEWY);
 	int diaNr = -1;
 	if (!_G(spieler).flags36_2)
 		diaNr = 559;
@@ -491,18 +491,18 @@ int Room97::proc8() {
 		_G(atds)->set_ats_str(532, 1, ATS_DATEI);
 		_G(det)->start_detail(6, 255, false);
 		_G(det)->hide_static_spr(14);
-		auto_move(3, P_CHEWY);
+		autoMove(3, P_CHEWY);
 		auto_scroll(406, 0);
 		wait_show_screen(40);
 		_G(det)->stop_detail(24);
 		g_engine->_sound->playSound(26, 0);
 		g_engine->_sound->playSound(26);
-		start_detail_wait(25, 1, ANI_VOR);
+		start_detail_wait(25, 1, ANI_FRONT);
 		_G(det)->start_detail(26, 255, false);
 		_G(det)->stop_detail(23);
 		_G(det)->start_detail(27, 255, false);
 		wait_show_screen(80);
-		auto_move(4, P_CHEWY);
+		autoMove(4, P_CHEWY);
 		auto_scroll(646, 0);
 		start_aad_wait(566, -1);
 		wait_show_screen(60);
@@ -531,16 +531,16 @@ int Room97::proc9() {
 		return 0;
 
 	hideCur();
-	auto_move(5, P_CHEWY);
+	autoMove(5, P_CHEWY);
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(556, -1);
 	} else {
 		start_spz_wait(13, 1, false, P_CHEWY);
-		start_detail_wait(0, 1, ANI_VOR);
+		start_detail_wait(0, 1, ANI_FRONT);
 		_G(det)->show_static_spr(13);
-		start_detail_wait(13, 1, ANI_VOR);
+		start_detail_wait(13, 1, ANI_FRONT);
 		_G(det)->start_detail(14, 255, false);
 		start_aad_wait(555, -1);
 		_G(spieler).flags36_40 = true;
@@ -559,11 +559,11 @@ int Room97::proc10() {
 		return 0;
 
 	hideCur();
-	auto_move(8, P_CHEWY);
+	autoMove(8, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	g_engine->_sound->playSound(7, 0);
 	g_engine->_sound->stopSound(1);
-	start_detail_wait(7, 1, ANI_VOR);
+	start_detail_wait(7, 1, ANI_FRONT);
 	_G(det)->show_static_spr(19);
 	_G(spieler).flags37_1 = true;
 	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
@@ -584,16 +584,16 @@ int Room97::proc11() {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(569, -1);
 	} else {
-		auto_move(9, P_CHEWY);
+		autoMove(9, P_CHEWY);
 		start_aad_wait(570, -1);
 		start_spz_wait(13, 1, false, P_CHEWY);
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(571, -1);
 		g_engine->_sound->playSound(4, 0);
 		g_engine->_sound->playSound(4);
 		_G(det)->start_detail(4, 1, false);
-		auto_move(12, P_CHEWY);
+		autoMove(12, P_CHEWY);
 		start_spz_wait(64, 1, false, P_CHEWY);
 		start_spz(65, 255, false, P_CHEWY);
 		start_aad_wait(561, -1);
@@ -623,7 +623,7 @@ void Room97::proc12() {
 	hideCur();
 	stop_person(P_CHEWY);
 	_G(det)->show_static_spr(26);
-	go_auto_xy(481, 39, P_CHEWY, ANI_WAIT);
+	goAutoXy(481, 39, P_CHEWY, ANI_WAIT);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(327, 42, P_CHEWY, P_LEFT);
 	wait_show_screen(50);
@@ -649,7 +649,7 @@ void Room97::proc13() {
 	wait_show_screen(50);
 	set_person_pos(488, 41, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	auto_move(6, P_CHEWY);
+	autoMove(6, P_CHEWY);
 	_G(det)->hide_static_spr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
@@ -695,7 +695,7 @@ void Room97::sensorAnim() {
 
 	hideCur();
 	if (!_slimeThrown) {
-		start_detail_wait(17, 1, ANI_VOR);
+		start_detail_wait(17, 1, ANI_FRONT);
 		_G(det)->start_detail(16, 1, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(20, 1, false);
@@ -706,25 +706,25 @@ void Room97::sensorAnim() {
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->show_static_spr(27);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(21, 1, ANI_VOR);
+		start_detail_wait(21, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(det)->hide_static_spr(27);
-		start_detail_wait(18, 1, ANI_VOR);
+		start_detail_wait(18, 1, ANI_FRONT);
 
 		g_engine->_sound->playSound(8, 0);
 		g_engine->_sound->stopSound(1);
-		start_detail_wait(8, 1, ANI_VOR);
+		start_detail_wait(8, 1, ANI_FRONT);
 		_G(det)->show_static_spr(20);
-		auto_move(10, P_CHEWY);
+		autoMove(10, P_CHEWY);
 		auto_scroll(60, 0);
 		start_aad_wait(544, -1);
 		_bool18DB32 = true;
-		auto_move(11, P_CHEWY);
+		autoMove(11, P_CHEWY);
 		_bool18DB32 = false;
 		_G(flags).AutoAniPlay = false;
 		proc13();
 		_G(flags).AutoAniPlay = true;
-		auto_move(7, P_CHEWY);
+		autoMove(7, P_CHEWY);
 
 		while (_G(spieler).scrollx < 368) {
 			set_up_screen(DO_SETUP);
@@ -733,7 +733,7 @@ void Room97::sensorAnim() {
 
 		_G(det)->show_static_spr(26);
 		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
-		go_auto_xy(477, 29, P_NICHELLE, ANI_WAIT);
+		goAutoXy(477, 29, P_NICHELLE, ANI_WAIT);
 		_G(det)->hide_static_spr(26);
 		_G(spieler).flags37_2 = true;
 	}
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index de4e53f61a8..25abd1be201 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -406,7 +406,7 @@ void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	_G(maus_links_click) = false;
 	_G(det)->start_detail(ani_nr, rep, mode);
 	AniDetailInfo *adi = _G(det)->get_ani_detail(ani_nr);
-	if (mode == ANI_VOR)
+	if (mode == ANI_FRONT)
 		frame = adi->ani_count + frame;
 	else
 		frame = adi->ani_count - frame;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 68f53ec9b5d..30cbd6228e8 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -75,12 +75,12 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_LOOK:
 					switch (txt_nr) {
 					case 229:
-						auto_move(2, P_CHEWY);
+						autoMove(2, P_CHEWY);
 						Room39::look_tv(true);
 						break;
 
 					case 268:
-						auto_move(3, P_CHEWY);
+						autoMove(3, P_CHEWY);
 						break;
 
 					case 294:
@@ -144,7 +144,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 73:
 						if (!_G(spieler).R9Gitter) {
 							_G(spieler).PersonHide[P_CHEWY] = true;
-							start_detail_wait(5, 1, ANI_VOR);
+							start_detail_wait(5, 1, ANI_FRONT);
 							_G(spieler).PersonHide[P_CHEWY] = false;
 						} else {
 							action_ret = false;
@@ -155,7 +155,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 77:
 						if (!_G(spieler).R10SurimyOk && !_G(spieler).inv_cur) {
 							hideCur();
-							auto_move(3, P_CHEWY);
+							autoMove(3, P_CHEWY);
 							flic_cut(FCUT_004);
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
 							start_aad_wait(108, 0);
@@ -171,7 +171,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 80:
 						if (_G(spieler).inv_cur)
-							auto_move(3, P_CHEWY);
+							autoMove(3, P_CHEWY);
 						break;
 
 					case 81:
@@ -192,7 +192,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 104:
 						if (is_cur_inventar(TRANSLATOR_INV)) {
-							auto_move(6, P_CHEWY);
+							autoMove(6, P_CHEWY);
 							_G(spieler).R14Translator = true;
 							start_aad_wait(25, -1);
 						} else
@@ -825,9 +825,9 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				case TXT_MARK_TALK:
 					switch (txt_nr) {
 					case 11:
-						auto_move(3, P_CHEWY);
+						autoMove(3, P_CHEWY);
 						_G(det)->stop_detail(5);
-						_G(det)->start_detail(6, 2, ANI_VOR);
+						_G(det)->start_detail(6, 2, ANI_FRONT);
 						Room2::jump_out_r1(9);
 						break;
 
@@ -845,7 +845,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 122:
 						if (!_G(spieler).R13BorkOk) {
-							auto_move(10, P_CHEWY);
+							autoMove(10, P_CHEWY);
 							Room13::talk_bork();
 						}
 						break;
@@ -1035,11 +1035,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 391:
-						auto_move(2, P_CHEWY);
+						autoMove(2, P_CHEWY);
 						break;
 
 					case 431:
-						auto_move(3, P_CHEWY);
+						autoMove(3, P_CHEWY);
 						break;
 
 					default:
@@ -1056,15 +1056,15 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 124:
 						if (!_G(spieler).R16F5Exit)
-							auto_move(5, P_CHEWY);
+							autoMove(5, P_CHEWY);
 						break;
 
 					case 134:
-						auto_move(10, P_CHEWY);
+						autoMove(10, P_CHEWY);
 						break;
 
 					case 210:
-						auto_move(1, P_CHEWY);
+						autoMove(1, P_CHEWY);
 						break;
 
 					case 225:
@@ -1208,7 +1208,7 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 
 				if (str_end_nr == 1) {
 					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_detail_wait(28, 3, ANI_VOR);
+					start_detail_wait(28, 3, ANI_FRONT);
 
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
@@ -1230,13 +1230,13 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 		break;
 
 	case 5:
-		auto_move(6, P_CHEWY);
+		autoMove(6, P_CHEWY);
 		break;
 
 	case 22:
 		if (str_end_nr == 1) {
 			_G(det)->del_static_ani(3);
-			start_detail_wait(5, 1, ANI_VOR);
+			start_detail_wait(5, 1, ANI_FRONT);
 			_G(det)->set_static_ani(3, -1);
 			start_aad_wait(456, -1);
 		}
@@ -1361,7 +1361,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			}
 
 			if (ani_nr != -1)
-				start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+				start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 
 		} else {
 			stop_spz();
@@ -1372,7 +1372,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case 249:
 		if (person_nr == 0) {
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK4, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK4, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1385,7 +1385,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R8_NIMOYANER2_DIA:
 		if (person_nr <= P_CHEWY) {
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1438,7 +1438,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		switch (person_nr) {
 		case 0:
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1478,7 +1478,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 		case 0:
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1507,7 +1507,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		switch (person_nr) {
 		case 0:
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1515,7 +1515,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 		case 1:
 			if (mode == AAD_STR_START) {
-				_G(det)->start_detail(5, 255, ANI_VOR);
+				_G(det)->start_detail(5, 255, ANI_FRONT);
 			} else {
 				_G(det)->stop_detail(5);
 			}
@@ -1550,7 +1550,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				else
 					ani_nr = CH_TALK3;
 
-				start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+				start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1569,7 +1569,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			}
 			for (int16 i = 0; i < anz; i++) {
 				if (mode == AAD_STR_START) {
-					_G(det)->start_detail(tmp, 255, ANI_VOR);
+					_G(det)->start_detail(tmp, 255, ANI_FRONT);
 				} else {
 					_G(det)->stop_detail(tmp);
 				}
@@ -1751,7 +1751,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 				}
 				if (ani_nr != -1)
-					start_spz(ani_nr, 255, ANI_VOR, P_CHEWY);
+					start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
 
 			} else {
 				stop_spz();
@@ -1762,13 +1762,13 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			if (mode == AAD_STR_START) {
 				switch (_G(spieler).mi[1]) {
 				case 2:
-					start_spz(50, 255, ANI_VOR, P_HOWARD);
+					start_spz(50, 255, ANI_FRONT, P_HOWARD);
 					break;
 				case 3:
-					start_spz(57, 255, ANI_VOR, P_HOWARD);
+					start_spz(57, 255, ANI_FRONT, P_HOWARD);
 					break;
 				default:
-					start_spz(HO_TALK_L, 255, ANI_VOR, P_HOWARD);
+					start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 					break;
 				}
 			} else {
@@ -2111,7 +2111,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 	case R61_VERLAG_DIA:
 		if (mode == AAD_STR_START) {
-			_G(det)->start_detail(person_nr, 255, ANI_VOR);
+			_G(det)->start_detail(person_nr, 255, ANI_FRONT);
 		} else {
 			_G(det)->stop_detail(person_nr);
 		}
@@ -2121,7 +2121,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		switch (person_nr) {
 		case 0:
 			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_VOR, P_CHEWY);
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -2151,12 +2151,12 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	}
 
 	if (altes_format) {
-		_G(det)->start_detail(_G(talk_start_ani), 255, ANI_VOR);
+		_G(det)->start_detail(_G(talk_start_ani), 255, ANI_FRONT);
 		_G(det)->stop_detail(talk_stop_ani);
 		_G(det)->hide_static_spr(_G(talk_hide_static));
 		_G(det)->show_static_spr(talk_show_static);
 	} else {
-		_G(det)->start_detail(talk_ani, 255, ANI_VOR);
+		_G(det)->start_detail(talk_ani, 255, ANI_FRONT);
 		_G(det)->stop_detail(stop_ani);
 	}
 }
@@ -2753,7 +2753,7 @@ void calc_person_dia(int16 p_nr) {
 
 		if (!room_nr) {
 			if (_G(spieler).DiaAMov != -1)
-				auto_move(_G(spieler).DiaAMov, P_CHEWY);
+				autoMove(_G(spieler).DiaAMov, P_CHEWY);
 
 			int16 tmp[3];
 			for (int i = 0; i < 3; ++i) {


Commit: 6c14ba9e807a890c1787146074f1f92b3d3a946d
    https://github.com/scummvm/scummvm/commit/6c14ba9e807a890c1787146074f1f92b3d3a946d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: Remove obsolete functions

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/data.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 1ffdb11dbd9..e17fd975826 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -93,51 +93,6 @@ uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	return size;
 }
 
-// Only used in 1 place, will be removed eventually:
-// tff_adr() with type TFFDATEI
-uint32 Data::size(const char *fname, int16 typ) {
-	uint32 size = 0;
-
-	strncpy(_filename, fname, MAXPATH - 5);
-	_filename[MAXPATH - 5] = '\0';
-
-	if (!strchr(_filename, '.') && typ == TFFDATEI) {
-		strcat(_filename, ".tff");
-	}
-
-	// SCUMMVM: Note to self, use sizeof(structures) for
-	// allocating size, not custom ::SIZE() functions
-	Common::File f;
-	if (f.open(_filename)) {
-		switch (typ) {
-		case TFFDATEI: {
-			TffHeader tff;
-			if (tff.load(&f)) {
-				int16 id = get_id(tff.id);
-				if (id == TFFDATEI) {
-					size = tff.size + sizeof(TffHeader);
-				} else {
-					error("size error");
-				}
-			} else {
-				error("size error");
-			}
-			}
-			break;
-		default:
-			size = (uint32)f.size();
-			break;
-		}
-
-		f.close();
-	} else {
-		error("size error");
-		size = 0;
-	}
-
-	return size;
-}
-
 uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
 	NewPhead Nph;
 	uint32 size = 0;
@@ -173,14 +128,6 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 	return size;
 }
 
-int16 Data::get_id(char *id_code) {
-	int16 id = -1;
-	if (!(scumm_strnicmp(id_code, "TFF", 3)))
-		id = TFFDATEI;
-
-	return id;
-}
-
 void Data::fcopy(const char *d_fname, const char *s_fname) {
 	assert(!strcmp(d_fname, ADSH_TMP));
 
diff --git a/engines/chewy/data.h b/engines/chewy/data.h
index 2b227d7385b..ea38942b0c9 100644
--- a/engines/chewy/data.h
+++ b/engines/chewy/data.h
@@ -39,10 +39,7 @@ public:
 	uint16 select_pool_item(Stream *stream, uint16 nr);
 	uint32 load_tmf(Stream *stream, TmfHeader *song);
 
-	uint32 size(const char *fname, int16 typ);
 	uint32 get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz);
-
-	short get_id(char *id_code);
 	void fcopy(const char *d_fname, const char *s_fname);
 };
 


Commit: e66abfa8e0c615ab2250699c5faa4b49fcbdca78
    https://github.com/scummvm/scummvm/commit/e66abfa8e0c615ab2250699c5faa4b49fcbdca78
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: Fix compilation

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 8f73f49fe98..5710aac2b07 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -161,7 +161,7 @@ void MainMenu::animate() {
 
 	sprite_engine();
 	kb_mov(1);
-	calcMouseTxt(_G(minfo).x, _G(minfo).y, 1);
+	calcMouseText(_G(minfo).x, _G(minfo).y, 1);
 	_G(cur)->plot_cur();
 	_G(maus_links_click) = false;
 	_G(menu_flag) = 0;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 9c94ae5f18a..4690a0c22be 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -599,7 +599,7 @@ void set_up_screen(SetupScreenMode mode) {
 			txt_nr = _G(obj)->iib_txt_nr(nr);
 			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
 		} else {
-			int16 tmp = calcMouseTxt(_G(minfo).x, _G(minfo).y, mode);
+			int16 tmp = calcMouseText(_G(minfo).x, _G(minfo).y, mode);
 			if (tmp == -1 || tmp == 255) {
 
 				nr = _G(obj)->is_sib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index b548637c7ec..52752a0f449 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -32,7 +32,7 @@ void free_buffers();
 void plot_main_menu();
 void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex,
              int16 srcStartIndex, int16 colorNbr);
-short calcMouseTxt(int16 x, int16 y, int16 mode);
+short calcMouseText(int16 x, int16 y, int16 mode);
 void calc_ani_timer();
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr);
 int16 getAniDirection(int16 zustand);


Commit: 3b86f9e94e18802e476046baff23c1f421299a0b
    https://github.com/scummvm/scummvm/commit/3b86f9e94e18802e476046baff23c1f421299a0b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: Some more renaming

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/ngstypes.h
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 93bfe045ec2..b4c9af5a40e 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -254,10 +254,10 @@ TafInfo *Detail::init_taf_tbl(const char *fname_) {
 
 	Tt = (TafInfo *)tmp;
 	Tt->anzahl = anz;
-	Tt->korrektur = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
+	Tt->_correction = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
 	Tt->image = (byte **)(tmp + sizeof(TafInfo));
-	memcpy(Tt->korrektur, (byte *)res->getSpriteCorrectionsTable(), Tt->anzahl * 2 * sizeof(int16));
-	Tt->palette = 0;
+	memcpy(Tt->_correction, (byte *)res->getSpriteCorrectionsTable(), Tt->anzahl * 2 * sizeof(int16));
+	Tt->palette = nullptr;
 
 	delete res;
 
@@ -271,7 +271,7 @@ void Detail::del_taf_tbl(TafInfo *Tt) {
 	for (int16 i = 0; i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
 	}
-	free((char *) Tt->korrektur);
+	free((char *) Tt->_correction);
 	free((char *) Tt);
 }
 
@@ -280,7 +280,7 @@ void Detail::del_taf_tbl(int16 start, int16 anz, TafInfo *Tt) {
 		Tt = _rdi.dptr;
 	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
 		free(Tt->image[i]);
-		Tt->image[i] = 0;
+		Tt->image[i] = nullptr;
 	}
 }
 
@@ -299,39 +299,37 @@ void Detail::load_taf_seq(int16 spr_nr, int16 spr_anz, TafInfo *Tt) {
 	delete res;
 }
 
-void Detail::set_static_spr(int16 nr, int16 spr_nr) {
-	_rdi.Sinfo[nr].SprNr = spr_nr;
+void Detail::setStaticSpr(int16 nr, int16 sprNr) {
+	_rdi.Sinfo[nr].SprNr = sprNr;
 }
 
-void Detail::hide_static_spr(int16 nr) {
+void Detail::hideStaticSpr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
 		_rdi.Sinfo[nr].Hide = true;
 }
 
-void Detail::show_static_spr(int16 nr) {
+void Detail::showStaticSpr(int16 nr) {
 	if (nr >= 0 && nr < MAXDETAILS)
 		_rdi.Sinfo[nr].Hide = false;
 }
 
-byte *Detail::get_static_image(int16 det_nr) {
-	byte *ret;
-	int16 index = _rdi.Sinfo[det_nr].SprNr;
-	if (index == -1)
-		ret = nullptr;
-	else
+byte *Detail::getStaticImage(int16 detNr) {
+	byte *ret = nullptr;
+	int16 index = _rdi.Sinfo[detNr].SprNr;
+	if (index != -1)
 		ret = _rdi.dptr->image[index];
 	return ret;
 }
 
-void Detail::set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag) {
-	if (korr_flag) {
-		int16 *Cxy = _rdi.dptr->korrektur + (_rdi.Sinfo[det_nr].SprNr << 1);
+void Detail::setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag) {
+	if (correctionFlag) {
+		int16 *Cxy = _rdi.dptr->_correction + (_rdi.Sinfo[detNr].SprNr << 1);
 		x += Cxy[0];
 		y += Cxy[1];
 	}
-	_rdi.Sinfo[det_nr].x = x;
-	_rdi.Sinfo[det_nr].y = y;
-	_rdi.Sinfo[det_nr].Hide = hide;
+	_rdi.Sinfo[detNr].x = x;
+	_rdi.Sinfo[detNr].y = y;
+	_rdi.Sinfo[detNr].Hide = hideFl;
 }
 
 void Detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
@@ -363,7 +361,7 @@ AniDetailInfo *Detail::get_ani_detail(int16 ani_nr) {
 }
 
 int16 *Detail::get_korrektur_tbl() {
-	int16 *ret = _rdi.dptr->korrektur;
+	int16 *ret = _rdi.dptr->_correction;
 	return ret;
 }
 
@@ -412,7 +410,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->_correction + (sprnr << 1);
 			int16 kx = Cxy[0];
 			int16 ky = Cxy[1];
 			if (zoomx != 0 || zoomy != 0)
@@ -573,7 +571,7 @@ SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 		spr_nr = adiptr->start_ani;
 	if (spr_nr > adiptr->end_ani)
 		spr_nr = adiptr->end_ani - 1;
-	int16 *Cxy = _rdi.dptr->korrektur + (spr_nr << 1);
+	int16 *Cxy = _rdi.dptr->_correction + (spr_nr << 1);
 	int16 *Xy = (int16 *)_rdi.dptr->image[spr_nr];
 	_sprInfo.Image = _rdi.dptr->image[spr_nr];
 	_sprInfo.X = adiptr->x + Cxy[0] - scrx;
@@ -715,7 +713,7 @@ int16 Detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = _rdi.dptr->korrektur + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->_correction + (sprnr << 1);
 			int16 x = adiptr->x + Cxy[0] - scrx;
 			int16 y = adiptr->y + Cxy[1] - scry;
 			int16 *Xy;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index ecec287fa9a..ab478c16dc1 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -193,13 +193,13 @@ public:
 
 	void load_rdi_taf(const char *fname, int16 load_flag);
 
-	void set_static_spr(int16 nr, int16 spr_nr);
-	byte *get_static_image(int16 det_nr);
+	void setStaticSpr(int16 nr, int16 sprNr);
+	byte *getStaticImage(int16 detNr);
 
-	void set_static_pos(int16 det_nr, int16 x, int16 y, bool hide, bool korr_flag);
+	void setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag);
 	void set_detail_pos(int16 det_nr, int16 x, int16 y);
-	void hide_static_spr(int16 nr);
-	void show_static_spr(int16 nr);
+	void hideStaticSpr(int16 nr);
+	void showStaticSpr(int16 nr);
 	void freeze_ani();
 	void unfreeze_ani();
 	void get_ani_werte(int16 ani_nr, int16 *start, int16 *end);
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 27025d1138f..665b99e20bf 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -105,12 +105,12 @@ int16 Files::execute(bool isInGame) {
 				if (!mode[j])
 					// Not pressed
 					_G(out)->sprite_set(
-						ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
-						76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
+						ti->image[i], 16 + ti->_correction[i << 1] + pt[j].x,
+						76 + ti->_correction[(i << 1) + 1] + pt[j].y, 0);
 				else
 					// Pressed
-					_G(out)->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
-						76 + ti->korrektur[(i << 1) + 1], 0);
+					_G(out)->sprite_set(ti->image[i], 16 + ti->_correction[i << 1],
+						76 + ti->_correction[(i << 1) + 1], 0);
 			}
 		}
 
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index a9d90175b82..b8e1ae5672a 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -89,8 +89,8 @@ void Options::execute(TafInfo *ti) {
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
-		_G(out)->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
-			8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
+		_G(out)->sprite_set(ti->image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
+			8 + ti->_correction[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
 		_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
 		Common::String fps = Common::String::format("%d", _G(spieler).FramesPerSecond << 1);
@@ -98,18 +98,18 @@ void Options::execute(TafInfo *ti) {
 
 		if (_G(spieler).SoundSwitch) {
 			_G(out)->sprite_set(ti->image[mund_ani],
-				18 + ti->korrektur[mund_ani << 1],
-				8 + ti->korrektur[(mund_ani << 1) + 1], 0);
+				18 + ti->_correction[mund_ani << 1],
+				8 + ti->_correction[(mund_ani << 1) + 1], 0);
 			_G(out)->sprite_set(ti->image[SCHNULL_OFF],
-				18 + ti->korrektur[SCHNULL_OFF << 1],
-				8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
+				18 + ti->_correction[SCHNULL_OFF << 1],
+				8 + ti->_correction[(SCHNULL_OFF << 1) + 1], 0);
 		} else {
 			_G(out)->sprite_set(ti->image[SCHNULLER],
-				18 + ti->korrektur[SCHNULLER << 1],
-				8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
+				18 + ti->_correction[SCHNULLER << 1],
+				8 + ti->_correction[(SCHNULLER << 1) + 1], 0);
 			_G(out)->sprite_set(ti->image[SCHNULL_BAND],
-				18 + ti->korrektur[SCHNULL_BAND << 1],
-				8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
+				18 + ti->_correction[SCHNULL_BAND << 1],
+				8 + ti->_correction[(SCHNULL_BAND << 1) + 1], 0);
 		}
 		_G(out)->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
 		_G(out)->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
@@ -120,31 +120,31 @@ void Options::execute(TafInfo *ti) {
 		_G(out)->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
 		if (_G(spieler).MusicSwitch) {
 			_G(out)->sprite_set(ti->image[MUSIC_ON1],
-				18 + ti->korrektur[MUSIC_ON1 << 1],
-				8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
+				18 + ti->_correction[MUSIC_ON1 << 1],
+				8 + ti->_correction[(MUSIC_ON1 << 1) + 1], 0);
 			_G(out)->sprite_set(ti->image[MUSIC_ON2],
-				18 + ti->korrektur[MUSIC_ON2 << 1],
-				8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
+				18 + ti->_correction[MUSIC_ON2 << 1],
+				8 + ti->_correction[(MUSIC_ON2 << 1) + 1], 0);
 		} else
 			_G(out)->sprite_set(ti->image[MUSIC_OFF],
-				18 + ti->korrektur[MUSIC_OFF << 1],
-				8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
+				18 + ti->_correction[MUSIC_OFF << 1],
+				8 + ti->_correction[(MUSIC_OFF << 1) + 1], 0);
 
 		if (_G(spieler).DisplayText) {
 			_G(out)->sprite_set(ti->image[tdisp_ani],
-				18 + ti->korrektur[tdisp_ani << 1],
-				8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
+				18 + ti->_correction[tdisp_ani << 1],
+				8 + ti->_correction[(tdisp_ani << 1) + 1], 0);
 			_G(out)->sprite_set(ti->image[TDISP_EIN],
-				18 + ti->korrektur[TDISP_EIN << 1],
-				8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
+				18 + ti->_correction[TDISP_EIN << 1],
+				8 + ti->_correction[(TDISP_EIN << 1) + 1], 0);
 		} else
 			_G(out)->sprite_set(ti->image[TDISP_AUS],
-				18 + ti->korrektur[TDISP_AUS << 1],
-				8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
+				18 + ti->_correction[TDISP_AUS << 1],
+				8 + ti->_correction[(TDISP_AUS << 1) + 1], 0);
 
 		_G(out)->sprite_set(ti->image[EXIT],
-			18 + ti->korrektur[EXIT << 1],
-			8 + ti->korrektur[(EXIT << 1) + 1], 0);
+			18 + ti->_correction[EXIT << 1],
+			8 + ti->_correction[(EXIT << 1) + 1], 0);
 
 		key = _G(in)->get_switch_code();
 		if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 15790820629..c3623a8ec2f 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -54,8 +54,8 @@ TafInfo *Memory::taf_adr(const char *filename) {
 		imgPtr += res->getSpriteData(i, &tinfo->image[i], false);
 	}
 
-	tinfo->korrektur = (int16 *)(tmp1 + (size + 768l));
-	memcpy(tinfo->korrektur, res->getSpriteCorrectionsTable(), imageCount * 2 * sizeof(int16));
+	tinfo->_correction = (int16 *)(tmp1 + (size + 768l));
+	memcpy(tinfo->_correction, res->getSpriteCorrectionsTable(), imageCount * 2 * sizeof(int16));
 
 	delete res;
 
@@ -81,7 +81,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	ts_info = (TafSeqInfo *)tmp1;
 	ts_info->anzahl = image_anz;
 	ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
-	ts_info->korrektur = (int16 *)(tmp1 + size);
+	ts_info->_correction = (int16 *)(tmp1 + size);
 	byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
 
 	for (int16 i = 0; i < image_anz; i++) {
@@ -90,7 +90,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 	}
 
 	uint16 *correctionsTable = res->getSpriteCorrectionsTable() + image_start * 2;
-	memcpy(ts_info->korrektur, correctionsTable, image_anz * 2 * sizeof(int16));
+	memcpy(ts_info->_correction, correctionsTable, image_anz * 2 * sizeof(int16));
 
 	delete res;
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index fc6e94af6f9..130ba6c3973 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -38,7 +38,7 @@ void plot_main_menu() {
 	}
 
 	maus_mov_menu();
-	int16 *korrektur = (int16 *)_G(menutaf)->korrektur;
+	int16 *korrektur = (int16 *)_G(menutaf)->_correction;
 
 	for (int16 i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
@@ -286,7 +286,7 @@ void ads_menu() {
 					                                  &_G(ads_item_anz));
 				}
 				_G(det)->stop_detail(_G(talk_start_ani));
-				_G(det)->show_static_spr(_G(talk_hide_static));
+				_G(det)->showStaticSpr(_G(talk_hide_static));
 				_G(talk_start_ani) = -1;
 				_G(talk_hide_static) = -1;
 				if (_G(flags).AdsDialog == false) {
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 6064fa943fd..01b879c0e9a 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -35,13 +35,13 @@ namespace Chewy {
 struct TafInfo {
 	int16 anzahl = 0;
 	byte *palette = nullptr;
-	int16 *korrektur = nullptr;
+	int16 *_correction = nullptr;
 	byte **image = nullptr;
 };
 
 struct TafSeqInfo {
 	int16 anzahl = 0;
-	int16 *korrektur = nullptr;
+	int16 *_correction = nullptr;
 	byte **image = nullptr;
 };
 
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index 18d727d6c96..15efd8537ca 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -350,7 +350,7 @@ void Object::calc_static_detail(int16 det_nr) {
 							else
 								_G(det)->start_detail(n, 1, ANI_FRONT);
 						} else
-							_G(det)->show_static_spr(nr);
+							_G(det)->showStaticSpr(nr);
 						++i;
 					}
 				}
@@ -362,7 +362,7 @@ void Object::calc_static_detail(int16 det_nr) {
 				else
 					_G(det)->start_detail(n, 1, ANI_FRONT);
 			} else {
-				_G(det)->show_static_spr(nr);
+				_G(det)->showStaticSpr(nr);
 			}
 		}
 
@@ -381,14 +381,14 @@ void Object::calc_static_detail(int16 det_nr) {
 						if (nr >= 40)
 							_G(det)->stop_detail(nr - 40);
 						else
-							_G(det)->hide_static_spr(nr);
+							_G(det)->hideStaticSpr(nr);
 						++i;
 					}
 				}
 			} else if (nr >= 40)
 				_G(det)->stop_detail(nr - 40);
 			else {
-				_G(det)->hide_static_spr(nr);
+				_G(det)->hideStaticSpr(nr);
 			}
 		}
 	}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ec1bc5cd6e8..3cc1974d714 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -667,7 +667,7 @@ void exit_room(int16 eib_nr) {
 	case 75:
 		x = 160;
 		y = 200;
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 		break;
 
 	case 84:
@@ -683,20 +683,20 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 86:
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 44;
 		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		_G(HowardMov) = 2;
 		break;
 
 	case 90:
-		_G(det)->show_static_spr(8);
+		_G(det)->showStaticSpr(8);
 		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 60;
 		y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		break;
 
 	case 94:
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 		x = _G(spieler_vector)[P_CHEWY].Xypos[0] - 40;
 		y = _G(spieler_vector)[P_CHEWY].Xypos[1] - 10;
 		break;
@@ -704,7 +704,7 @@ void exit_room(int16 eib_nr) {
 	case 127:
 		x = 196;
 		y = 133;
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 		break;
 
 	case 132:
@@ -1509,7 +1509,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case 94:
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		_G(cur_hide_flag) = false;
 		hideCur();
 		start_aad_wait(406, -1);
@@ -1563,7 +1563,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_BOLA_KNOPF_R6:
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R6BolaSchild = true;
-		_G(det)->show_static_spr(2);
+		_G(det)->showStaticSpr(2);
 		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 		_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
 		_G(obj)->show_sib(SIB_BOLA_R6);
@@ -1651,7 +1651,7 @@ void sib_event_inv(int16 sib_nr) {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		_G(atds)->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
 
 		if (_G(spieler).R18CartTerminal) {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index ef48bedaeb0..27ff479d654 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -188,7 +188,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
 		Rb->Fti = _G(det)->get_taf_info();
 		Rb->DetImage = Rb->Fti->image;
-		Rb->DetKorrekt = Rb->Fti->korrektur;
+		Rb->DetKorrekt = Rb->Fti->_correction;
 	}
 	_G(obj)->calc_all_static_detail();
 	load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
@@ -539,7 +539,7 @@ void load_chewy_taf(int16 taf_nr) {
 			_G(spieler).ChewyAni = taf_nr;
 			_G(AkChewyTaf) = taf_nr;
 			_G(chewy) = _G(mem)->taf_adr(fname_);
-			_G(chewy_kor) = _G(chewy)->korrektur;
+			_G(chewy_kor) = _G(chewy)->_correction;
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 985fb095165..7875aa216d4 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -51,7 +51,7 @@ namespace Rooms {
 
 void Room0::entry() {
 	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->checkInventory(0))
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 
 	if (!_G(flags).LoadGame) {
 		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
@@ -134,7 +134,7 @@ bool Room0::getPillow() {
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
 		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 
 		_G(flags).AutoAniPlay = false;
 		showCur();
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 9a73f7d6d05..038e303fea7 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room1::gottenCard() {
-	_G(det)->hide_static_spr(2);
+	_G(det)->hideStaticSpr(2);
 	start_detail_wait(4, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index c1fe7993320..664bf23b48c 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -93,11 +93,11 @@ void Room6::init_robo() {
 
 void Room6::bola_knopf() {
 	if (!_G(spieler).R6BolaBecher) {
-		_G(det)->hide_static_spr(0);
+		_G(det)->hideStaticSpr(0);
 		start_detail_wait(0, 1, ANI_FRONT);
 		if (_G(spieler).R6BolaOk) {
 			_G(spieler).R6BolaBecher = true;
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 			start_ani_block(2, ABLOCK7);
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
 			wait_detail(2);
@@ -116,7 +116,7 @@ void Room6::bola_knopf() {
 				}
 				set_up_screen(DO_SETUP);
 			}
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 			++_G(spieler).R6BolaJoke;
 			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
 			start_spz(CH_TALK5, 244, false, 0);
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index b8bb1816563..aec2b27158d 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -82,10 +82,10 @@ void Room7::klingel() {
 		start_aad(5, 0);
 		start_ani_block(3, ABLOCK25);
 
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		start_detail_wait(12, 1, ANI_FRONT);
 		start_detail_wait(11, 1, ANI_FRONT);
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(5);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -93,7 +93,7 @@ void Room7::klingel() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(6, 0);
 		start_ani_block(3, ABLOCK25);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		start_detail_wait(10, 1, ANI_FRONT);
 		_G(det)->start_detail(13, 1, ANI_FRONT);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
@@ -114,21 +114,21 @@ void Room7::klingel() {
 
 		start_detail_frame(19, 1, ANI_FRONT, 6);
 		start_detail_frame(9, 1, ANI_FRONT, 4);
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 		wait_detail(9);
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 		_G(obj)->show_sib(SIB_SCHLOTT_R7);
 		_G(obj)->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).NoScroll = false;
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 
 	} else if (!_G(spieler).R7SeilOk) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
 		start_ani_block(3, ABLOCK25);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		_G(det)->load_taf_seq(192, 74, nullptr);
 		_G(det)->start_detail(14, 1, ANI_FRONT);
 		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
@@ -141,7 +141,7 @@ void Room7::klingel() {
 		_G(det)->start_detail(0, 255, ANI_FRONT);
 		wait_detail(14);
 		start_ani_block(4, ABLOCK10);
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(0);
 		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -174,9 +174,9 @@ void Room7::gedAction(int index) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		set_person_pos(180, 124, P_CHEWY, P_LEFT);
 		start_detail_wait(20, 1, ANI_FRONT);
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 		wait_show_screen(10 * _G(spieler).DelaySpeed);
-		_G(det)->hide_static_spr(10);
+		_G(det)->hideStaticSpr(10);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).R7ChewyFlug = false;
 	}
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index bae684abc10..f2e12162b9c 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -129,7 +129,7 @@ bool Room8::gips_wurf() {
 		start_detail_frame(5, 1, ANI_FRONT, 16);
 		start_detail_wait(6, 1, ANI_FRONT);
 		_G(obj)->show_sib(33);
-		_G(det)->show_static_spr(14);
+		_G(det)->showStaticSpr(14);
 		wait_detail(5);
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
@@ -153,11 +153,11 @@ bool Room8::gips_wurf() {
 
 void Room8::open_gdoor() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->show_static_spr(17);
+	_G(det)->showStaticSpr(17);
 	set_up_screen(DO_SETUP);
 	start_detail_wait(7, 1, ANI_FRONT);
-	_G(det)->show_static_spr(15);
-	_G(det)->hide_static_spr(17);
+	_G(det)->showStaticSpr(15);
+	_G(det)->hideStaticSpr(17);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(204, 274, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 4afe2c1b962..f89277f4a8e 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -51,17 +51,17 @@ void Room9::entry() {
 	if (!_G(spieler).R9Gitter)
 		set_person_pos(138, 91, P_CHEWY, P_LEFT);
 	else
-		_G(det)->show_static_spr(5);
+		_G(det)->showStaticSpr(5);
 
 	if (_G(spieler).R9Surimy) {
-		_G(det)->hide_static_spr(4);
+		_G(det)->hideStaticSpr(4);
 		_G(room)->set_timer_status(7, TIMER_STOP);
 	}
 }
 
 void Room9::gtuer() {
 	_G(spieler).R9Gitter = true;
-	_G(det)->show_static_spr(5);
+	_G(det)->showStaticSpr(5);
 	start_detail_wait(6, 1, ANI_FRONT);
 	set_person_pos(74, 93, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
@@ -77,7 +77,7 @@ void Room9::surimy() {
 	const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 	stop_person(P_CHEWY);
 	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(det)->hide_static_spr(4);
+	_G(det)->hideStaticSpr(4);
 	_G(room)->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
@@ -106,7 +106,7 @@ void Room9::surimy_ani() {
 	wait_detail(0);
 	start_detail_wait(1, 1, ANI_FRONT);
 	start_spz(CH_EKEL, 2, ANI_FRONT, P_CHEWY);
-	_G(det)->hide_static_spr(4);
+	_G(det)->hideStaticSpr(4);
 	_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT1);
 	wait_auto_obj(SURIMY_OBJ);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 7c10593667e..e0f06e04544 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -67,7 +67,7 @@ void Room11::entry() {
 			start_aad_wait(31, -1);
 			_G(det)->stop_detail(9);
 		}
-		_G(det)->show_static_spr(8);
+		_G(det)->showStaticSpr(8);
 		if (!_G(flags).LoadGame)
 			autoMove(6, P_CHEWY);
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
@@ -95,10 +95,10 @@ void Room11::gedAction(int index) {
 void Room11::bork_zwinkert() {
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
-		_G(det)->hide_static_spr(8);
+		_G(det)->hideStaticSpr(8);
 		start_ani_block(2, ABLOCK18);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-		_G(det)->show_static_spr(8);
+		_G(det)->showStaticSpr(8);
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -121,11 +121,11 @@ void Room11::chewy_bo_use() {
 		_G(flags).AutoAniPlay = true;
 
 		stop_person(P_CHEWY);
-		_G(det)->hide_static_spr(8);
+		_G(det)->hideStaticSpr(8);
 		start_ani_block(2, ABLOCK17);
 		start_aad_wait(32, -1);
 		_G(det)->stop_detail(9);
-		_G(det)->show_static_spr(8);
+		_G(det)->showStaticSpr(8);
 		autoMove(6, P_CHEWY);
 
 		_G(flags).AutoAniPlay = false;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 9b2fd4e3913..0f0d28bafc1 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -72,7 +72,7 @@ void Room12::entry() {
 		hideCur();
 
 		for (int16 i = 7; i < 10; i++)
-			_G(det)->show_static_spr(i);
+			_G(det)->showStaticSpr(i);
 
 		_G(flags).NoScroll = true;
 		auto_scroll(60, 0);
@@ -80,7 +80,7 @@ void Room12::entry() {
 		_G(flags).NoScroll = false;
 
 		for (int16 i = 7; i < 10; i++)
-			_G(det)->hide_static_spr(i);
+			_G(det)->hideStaticSpr(i);
 
 		_G(obj)->show_sib(SIB_TALISMAN_R12);
 		_G(obj)->calc_rsi_flip_flop(SIB_TALISMAN_R12);
@@ -93,7 +93,7 @@ void Room12::entry() {
 	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 20);
 	else if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk)
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(12);
 }
 
 bool Room12::timer(int16 t_nr, int16 ani_nr) {
@@ -178,10 +178,10 @@ void Room12::bork_ok() {
 	_G(mov_phasen)[R12_BORK_OBJ].Lines = 3;
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
-	_G(det)->hide_static_spr(10);
+	_G(det)->hideStaticSpr(10);
 	start_detail_wait(4, 1, ANI_FRONT);
 	_G(talk_hide_static) = -1;
-	_G(det)->show_static_spr(12);
+	_G(det)->showStaticSpr(12);
 	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
@@ -209,7 +209,7 @@ int16 Room12::use_terminal() {
 				load_chewy_taf(CHEWY_BORK);
 				_G(flags).NoScroll = false;
 				_G(atds)->set_ats_str(118, 0, ATS_DATEI);
-				_G(det)->hide_static_spr(12);
+				_G(det)->hideStaticSpr(12);
 				_G(menu_item) = CUR_WALK;
 				cursorChoice(_G(menu_item));
 				set_person_pos(108, 90, P_CHEWY, -1);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index d523e2a8f09..e49d1e4f623 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -54,10 +54,10 @@ void Room13::entry() {
 		start_aad_wait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
-			_G(det)->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+			_G(det)->showStaticSpr(11 - _G(spieler).R13MonitorStatus);
 
 		if (!_G(spieler).R13BorkOk) {
-			_G(det)->show_static_spr(12);
+			_G(det)->showStaticSpr(12);
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			_G(spieler).R13Bandlauf = true;
 
@@ -80,7 +80,7 @@ void Room13::entry() {
 		}
 
 		if (_G(spieler).R21GitterMuell)
-			_G(det)->hide_static_spr(6);
+			_G(det)->hideStaticSpr(6);
 	}
 }
 
@@ -101,15 +101,15 @@ void Room13::talk_bork() {
 	if (!_G(spieler).R13BorkOk) {
 		_G(spieler).R13BorkOk = true;
 		_G(spieler).R12ChewyBork = false;
-		_G(det)->show_static_spr(13);
+		_G(det)->showStaticSpr(13);
 		_G(det)->set_detail_pos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
-		_G(det)->set_static_pos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
+		_G(det)->setStaticPos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
 		_G(det)->stop_detail(9);
 		_G(det)->load_taf_seq(86, 12, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(det)->hide_static_spr(12);
+		_G(det)->hideStaticSpr(12);
 		_G(auto_obj) = 1;
 
 		_G(mov_phasen)[R13_BORK_OBJ].AtsText = 122;
@@ -227,13 +227,13 @@ int16 Room13::monitor_knopf() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			if (_G(spieler).R13MonitorStatus)
-				_G(det)->hide_static_spr(11 - _G(spieler).R13MonitorStatus);
+				_G(det)->hideStaticSpr(11 - _G(spieler).R13MonitorStatus);
 
 			++_G(spieler).R13MonitorStatus;
 			if (_G(spieler).R13MonitorStatus > 4)
 				_G(spieler).R13MonitorStatus = 0;
 			else
-				_G(det)->show_static_spr(11 - _G(spieler).R13MonitorStatus);
+				_G(det)->showStaticSpr(11 - _G(spieler).R13MonitorStatus);
 
 			_G(atds)->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
 		}
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index cdc8f17c912..67c6d61aac0 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -40,7 +40,7 @@ void Room14::entry() {
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R14GleiterAuf) {
 			set_person_pos(381, 264, P_CHEWY, P_LEFT);
-			_G(det)->show_static_spr(6);
+			_G(det)->showStaticSpr(6);
 			_G(spieler).scrollx = 160;
 			_G(spieler).scrolly = 120;
 		} else {
@@ -60,10 +60,10 @@ bool Room14::timer(int16 t_nr, int16 ani_nr) {
 void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!_G(flags).AutoAniPlay && !_G(spieler).R14Feuer) {
 		_G(flags).AutoAniPlay = true;
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
 		_G(uhr)->reset_timer(t_nr, 0);
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 		_G(det)->start_detail(7, 1, ANI_FRONT);
 		_G(flags).AutoAniPlay = false;
 	}
@@ -100,7 +100,7 @@ int16 Room14::use_gleiter() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(10, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(det)->show_static_spr(6);
+			_G(det)->showStaticSpr(6);
 			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
 		} else {
 			_G(spieler).R23GleiterExit = 14;
@@ -166,14 +166,14 @@ void Room14::feuer() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
 		autoMove(7, P_CHEWY);
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 		start_detail_frame(2, 1, ANI_FRONT, 9);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(13, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_detail(2);
 		start_detail_wait(5, 1, ANI_FRONT);
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 	}
 
 	del_inventar(tmp);
@@ -184,9 +184,9 @@ void Room14::feuer() {
 		autoMove(7, P_CHEWY);
 
 	start_aad_wait(26, -1);
-	_G(det)->hide_static_spr(9);
+	_G(det)->hideStaticSpr(9);
 	start_detail_wait(3, 1, ANI_FRONT);
-	_G(det)->show_static_spr(9);
+	_G(det)->showStaticSpr(9);
 	invent_2_slot(FLUXO_INV);
 	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
 	_G(spieler).R14FluxoFlex = true;
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index 6c0a16a64e9..36f53032646 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -33,11 +33,11 @@ void Room16::entry() {
 	_G(zoom_horizont) = 140;
 
 	if (!_G(spieler).R16F5Exit) {
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 		_G(spieler).room_e_obj[32].Attribut = 255;
 		_G(atds)->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		_G(det)->hide_static_spr(4);
+		_G(det)->hideStaticSpr(4);
 		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
 		_G(atds)->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
 	}
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 47be4cdf92e..789f9071e89 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -60,10 +60,10 @@ void Room17::entry() {
 	plot_seil();
 
 	if (_G(spieler).R17GitterWeg)
-		_G(det)->hide_static_spr(5);
+		_G(det)->hideStaticSpr(5);
 
 	if (_G(spieler).R17DoorKommand)
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 
 	if (_G(spieler).R17Location == 1) {
 		_G(flags).ZoomMov = true;
@@ -163,7 +163,7 @@ int16 Room17::use_seil() {
 void Room17::plot_seil() {
 	if (_G(spieler).R17Seil) {
 		for (int16 i = 0; i < 3; i++)
-			_G(det)->show_static_spr(8 + i);
+			_G(det)->showStaticSpr(8 + i);
 	}
 }
 
@@ -246,7 +246,7 @@ void Room17::door_kommando(int16 mode) {
 				_G(spieler).R17DoorKommand = true;
 				start_detail_wait(4, 1, ANI_FRONT);
 				stop_person(P_CHEWY);
-				_G(det)->show_static_spr(7);
+				_G(det)->showStaticSpr(7);
 			}
 		} else {
 			close_door();
@@ -262,7 +262,7 @@ void Room17::close_door() {
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).R17DoorKommand = false;
 		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		_G(det)->start_detail(4, 1, ANI_BACK);
 	}
 }
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 48e9dd5860e..0b781a69fba 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -92,20 +92,20 @@ void Room18::entry() {
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R18CartTerminal)
-		_G(det)->show_static_spr(23);
+		_G(det)->showStaticSpr(23);
 
 	if (!_G(spieler).R18SurimyWurf) {
 		init_borks();
 	} else {
 		for (int16 i = 0; i < 5; i++)
-			_G(det)->hide_static_spr(BORK_SPR[i]);
+			_G(det)->hideStaticSpr(BORK_SPR[i]);
 
 		for (int16 i = 0; i < (4 - (_G(spieler).R18Krone ? 1 : 0)); i++)
-			_G(det)->show_static_spr(BORK_SPR1[i]);
+			_G(det)->showStaticSpr(BORK_SPR1[i]);
 	}
 
 	if (_G(spieler).R16F5Exit)
-		_G(det)->hide_static_spr(19);
+		_G(det)->hideStaticSpr(19);
 	
 	if (_G(spieler).R17EnergieOut) {
 		_G(det)->stop_detail(0);
@@ -128,25 +128,25 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 		_G(flags).AutoAniPlay = true;
 
 		if (t_nr == _G(timer_nr)[0]) {
-			_G(det)->hide_static_spr(16);
+			_G(det)->hideStaticSpr(16);
 			start_detail_wait(10, 1, ANI_FRONT);
-			_G(det)->show_static_spr(16);
+			_G(det)->showStaticSpr(16);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
 			hideCur();
-			_G(det)->hide_static_spr(17);
+			_G(det)->hideStaticSpr(17);
 			start_detail_wait(9, 1, ANI_FRONT);
-			_G(det)->show_static_spr(17);
+			_G(det)->showStaticSpr(17);
 
 			if (!_G(spieler).R18SondeMoni) {
 				_G(spieler).R18SondeMoni = true;
 				start_detail_wait(2, 1, ANI_FRONT);
-				_G(det)->show_static_spr(9);
+				_G(det)->showStaticSpr(9);
 				start_detail_wait(4, 1, ANI_FRONT);
-				_G(det)->show_static_spr(11);
+				_G(det)->showStaticSpr(11);
 				wait_show_screen(50);
-				_G(det)->hide_static_spr(9);
-				_G(det)->hide_static_spr(11);
+				_G(det)->hideStaticSpr(9);
+				_G(det)->hideStaticSpr(11);
 			} else {
 				monitor();
 			}
@@ -171,10 +171,10 @@ void Room18::gedAction(int index) {
 
 void Room18::init_borks() {
 	for (int16 i = 0; i < 5; i++)
-		_G(det)->show_static_spr(BORK_SPR[i]);
+		_G(det)->showStaticSpr(BORK_SPR[i]);
 	
 	for (int16 i = 0; i < 4; i++)
-		_G(det)->hide_static_spr(BORK_SPR1[i]);
+		_G(det)->hideStaticSpr(BORK_SPR1[i]);
 
 	_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 	_G(timer_nr)[1] = _G(room)->set_timer(255, 15);
@@ -207,16 +207,16 @@ int16 Room18::sonden_moni() {
 		hideCur();
 		autoMove(8, P_CHEWY);
 		start_detail_wait(3, 1, ANI_FRONT);
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 		start_ani_block(3, ABLOCK20);
 
 		for (int16 i = 0; i < 3; i++)
-			_G(det)->show_static_spr(i + 12);
+			_G(det)->showStaticSpr(i + 12);
 
 		wait_show_screen(40);
 
 		for (int16 i = 0; i < 5; i++)
-			_G(det)->hide_static_spr(i + 10);
+			_G(det)->hideStaticSpr(i + 10);
 
 		showCur();
 	}
@@ -267,20 +267,20 @@ int16 Room18::calc_surimy() {
 		start_detail_frame(21, 1, ANI_FRONT, 14);
 		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
-		_G(det)->set_static_pos(26, 392, 170, false, true);
-		_G(det)->show_static_spr(26);
+		_G(det)->setStaticPos(26, 392, 170, false, true);
+		_G(det)->showStaticSpr(26);
 
-		_G(det)->hide_static_spr(24);
+		_G(det)->hideStaticSpr(24);
 		start_ani_block(2, ABLOCK22);
-		_G(det)->show_static_spr(20);
+		_G(det)->showStaticSpr(20);
 
 		for (int16 i = 0; i < 3; i++)
-			_G(det)->hide_static_spr(i + 15);
+			_G(det)->hideStaticSpr(i + 15);
 
 		start_ani_block(2, ABLOCK23);
-		_G(det)->show_static_spr(18);
-		_G(det)->show_static_spr(19);
-		_G(det)->hide_static_spr(26);
+		_G(det)->showStaticSpr(18);
+		_G(det)->showStaticSpr(19);
+		_G(det)->hideStaticSpr(26);
 
 		_G(flags).NoScroll = true;
 		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
@@ -293,14 +293,14 @@ int16 Room18::calc_surimy() {
 		start_detail_frame(21, 1, ANI_FRONT, 14);
 		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
-		_G(det)->set_static_pos(26, 143, 170, false, true);
-		_G(det)->show_static_spr(26);
+		_G(det)->setStaticPos(26, 143, 170, false, true);
+		_G(det)->showStaticSpr(26);
 
-		_G(det)->hide_static_spr(25);
+		_G(det)->hideStaticSpr(25);
 		start_ani_block(2, ABLOCK24);
-		_G(det)->show_static_spr(21);
+		_G(det)->showStaticSpr(21);
 
-		_G(det)->hide_static_spr(26);
+		_G(det)->hideStaticSpr(26);
 		_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT2);
 		auto_scroll(0, 0);
@@ -354,12 +354,12 @@ short Room18::use_cart_moni() {
 
 		if (!_G(spieler).R18CartTerminal) {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
-			_G(det)->hide_static_spr(23);
+			_G(det)->hideStaticSpr(23);
 			start_detail_wait(20, 1, ANI_BACK);
 		} else {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
 			start_detail_wait(20, 1, ANI_FRONT);
-			_G(det)->show_static_spr(23);
+			_G(det)->showStaticSpr(23);
 
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index a8050f3f4e1..aad43d15cdf 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -231,7 +231,7 @@ void Room21::use_gitter_energie() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 
 	switch_room(17);
-	_G(det)->hide_static_spr(5);
+	_G(det)->hideStaticSpr(5);
 	start_detail_wait(9, 1, ANI_FRONT);
 	_G(spieler).R17GitterWeg = true;
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 98648f6818f..23591b6b6be 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -64,7 +64,7 @@ void Room22::entry() {
 		_G(det)->load_taf_seq(36, 21, nullptr);
 		_G(room)->set_timer(255, 15);
 	} else if (!_G(spieler).R22GetBork) {
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 	}
 }
 
@@ -153,7 +153,7 @@ void Room22::bork_walk2() {
 
 	flic_cut(FCUT_008);
 	register_cutscene(3);
-	_G(det)->show_static_spr(4);
+	_G(det)->showStaticSpr(4);
 	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).R22BorkPlatt = true;
 	_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
@@ -162,7 +162,7 @@ void Room22::bork_walk2() {
 void Room22::get_bork() {
 	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
 		autoMove(4, P_CHEWY);
-		_G(det)->hide_static_spr(4);
+		_G(det)->hideStaticSpr(4);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_ani_block(2, ABLOCK14);
 		set_person_pos(171, 120, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index a0cade676ac..a6af5c99c9c 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -48,9 +48,9 @@ void Room23::cockpit() {
 	switch_room(23);
 
 	if (!_G(spieler).R23Cartridge || !_G(spieler).R25GleiteLoesch)
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 	else
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 }
 
 int16 Room23::start_gleiter() {
@@ -135,7 +135,7 @@ void Room23::use_cartridge() {
 		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(111, 2, ATS_DATEI);
 		start_detail_wait(4, 1, ANI_FRONT);
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 	} else {
 		_G(atds)->set_ats_str(111, 1, ATS_DATEI);
 	}
@@ -148,7 +148,7 @@ void Room23::get_cartridge() {
 	_G(atds)->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
 
 	_G(spieler).R23Cartridge = false;
-	_G(det)->hide_static_spr(3);
+	_G(det)->hideStaticSpr(3);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 5e8ae52b681..90a3358297a 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -48,9 +48,9 @@ void Room24::entry() {
 	cursorChoice(CUR_USER);
 
 	if (_G(spieler).R16F5Exit)
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 	else
-		_G(det)->hide_static_spr(10);
+		_G(det)->hideStaticSpr(10);
 
 	calc_hebel_spr();
 	calc_animation(255);
@@ -90,11 +90,11 @@ void Room24::use_hebel(int16 txt_nr) {
 		g_engine->_sound->playSound(1, 0);
 		g_engine->_sound->stopSound(1);
 		_G(det)->start_detail(1, 1, ANI_FRONT);
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
 
 	} else if (_G(spieler).R16F5Exit) {
-		_G(det)->hide_static_spr(10);
+		_G(det)->hideStaticSpr(10);
 		g_engine->_sound->playSound(1, 1);
 		g_engine->_sound->stopSound(0);
 		_G(det)->start_detail(1, 1, ANI_BACK);
@@ -116,9 +116,9 @@ void Room24::calc_hebel_spr() {
 
 	for (int16 i = 0; i < 3; i++) {
 		for (int16 j = 0; j < 3; j++)
-			_G(det)->hide_static_spr(1 + j + i * 3);
+			_G(det)->hideStaticSpr(1 + j + i * 3);
 
-		_G(det)->show_static_spr(1 + _G(spieler).R24Hebel[i] + i * 3);
+		_G(det)->showStaticSpr(1 + _G(spieler).R24Hebel[i] + i * 3);
 		_G(atds)->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
 	}
 }
@@ -131,7 +131,7 @@ void Room24::calc_animation(int16 kristall_nr) {
 			int16 ani_nr = _G(spieler).R24KristallLast[kristall_nr] == 13 ? 7 : 8;
 			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
 			g_engine->_sound->stopSound(0);
-			_G(det)->hide_static_spr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
+			_G(det)->hideStaticSpr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
 			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_BACK);
 			start_detail_wait(6 + kristall_nr * 4, 1, ANI_BACK);
 			_G(det)->start_detail(5 + kristall_nr * 4, 255, ANI_BACK);
@@ -149,10 +149,10 @@ void Room24::calc_animation(int16 kristall_nr) {
 	}
 
 	for (int16 i = 0; i < 6; i++)
-		_G(det)->hide_static_spr(13 + i);
+		_G(det)->hideStaticSpr(13 + i);
 
 	for (int16 i = 0; i < 3; i++) {
-		_G(det)->show_static_spr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
+		_G(det)->showStaticSpr(KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] + i * 2);
 		_G(spieler).R24KristallLast[i] = KRISTALL_SPR[i][_G(spieler).R24Hebel[i]];
 	}
 }
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index c901230b9e1..c64d0a6e9b9 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -52,8 +52,8 @@ void Room25::entry() {
 	}
 
 	if (!_G(spieler).R29Schlauch2) {
-		_G(det)->hide_static_spr(0);
-		_G(det)->hide_static_spr(1);
+		_G(det)->hideStaticSpr(0);
+		_G(det)->hideStaticSpr(1);
 	}
 
 	if (!_G(spieler).R25FirstEntry) {
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 23bc5b61cc1..16ef52d5e89 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -36,13 +36,13 @@ void Room28::entry(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R28RKuerbis)
-		_G(det)->show_static_spr(6);
+		_G(det)->showStaticSpr(6);
 
 	if (_G(spieler).R28Briefkasten) {
-		_G(det)->show_static_spr(8);
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(8);
+		_G(det)->showStaticSpr(9);
 	} else {
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
@@ -77,7 +77,7 @@ void Room28::entry(int16 eib_nr) {
 
 					auto_scroll(0, 0);
 					flic_cut(FCUT_064);
-					_G(det)->show_static_spr(6);
+					_G(det)->showStaticSpr(6);
 
 					if (!_G(spieler).R40TeilKarte) {
 						_G(out)->ausblenden(0);
@@ -322,9 +322,9 @@ int16 Room28::use_breifkasten() {
 		_G(spieler).R28Briefkasten = false;
 		autoMove(7, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-		_G(det)->hide_static_spr(8);
-		_G(det)->hide_static_spr(9);
-		_G(det)->show_static_spr(7);
+		_G(det)->hideStaticSpr(8);
+		_G(det)->hideStaticSpr(9);
+		_G(det)->showStaticSpr(7);
 		autoMove(8, P_CHEWY);
 		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(179, -1);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index a327751ec42..a4f98c7c08c 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -44,17 +44,17 @@ static const AniBlock ABLOCK27[5] = {
 
 void Room29::entry() {
 	if (_G(spieler).R29Schlauch1) {
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 	} else if (_G(spieler).R29Schlauch2) {
-		_G(det)->show_static_spr(8);
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(8);
+		_G(det)->showStaticSpr(10);
 	}
 
 	if (_G(spieler).R29AutoSitz) {
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
 			_G(atds)->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
 		else
-			_G(det)->show_static_spr(9);
+			_G(det)->showStaticSpr(9);
 	}
 
 	_G(spieler).ScrollxStep = 2;
@@ -77,7 +77,7 @@ int16 Room29::use_pumpe() {
 			_G(spieler).R29Schlauch1 = true;
 			autoMove(1, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			_G(det)->show_static_spr(7);
+			_G(det)->showStaticSpr(7);
 			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
@@ -115,11 +115,11 @@ bool Room29::use_schlauch() {
 
 		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(4, 1, ANI_FRONT);
-		_G(det)->show_static_spr(8);
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(8);
+		_G(det)->showStaticSpr(10);
 		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(218, 1, ATS_DATEI);
 
@@ -139,11 +139,11 @@ void Room29::schlitz_sitz() {
 		hideCur();
 		_G(spieler).R29AutoSitz = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->hide_static_spr(4);
-		_G(det)->show_static_spr(11);
+		_G(det)->hideStaticSpr(4);
+		_G(det)->showStaticSpr(11);
 		start_ani_block(3, ABLOCK26);
-		_G(det)->show_static_spr(9);
-		_G(det)->hide_static_spr(11);
+		_G(det)->showStaticSpr(9);
+		_G(det)->hideStaticSpr(11);
 		_G(det)->start_detail(2, 255, ANI_FRONT);
 		start_aad_wait(63, -1);
 
@@ -167,7 +167,7 @@ int16 Room29::zaun_sprung() {
 		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_frame(3, 1, ANI_FRONT, 7);
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 		start_ani_block(5, ABLOCK27);
 		set_up_screen(DO_SETUP);
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index be33ccee3cb..80c2a237c9d 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -75,7 +75,7 @@ void Room31::surimy_go() {
 void Room31::calc_luke() {
 	if (!_G(spieler).R31KlappeZu) {
 		for (int16 i = 0; i < 3; i++)
-			_G(det)->show_static_spr(5 + i);
+			_G(det)->showStaticSpr(5 + i);
 
 		_G(atds)->set_ats_str(244, 1, ATS_DATEI);
 		_G(atds)->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
@@ -83,7 +83,7 @@ void Room31::calc_luke() {
 
 	} else {
 		for (int16 i = 0; i < 3; i++)
-			_G(det)->hide_static_spr(5 + i);
+			_G(det)->hideStaticSpr(5 + i);
 
 		_G(atds)->set_ats_str(244, 0, ATS_DATEI);
 		_G(atds)->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index b48a9b8abe9..f205182be6d 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -29,9 +29,9 @@ namespace Rooms {
 
 void Room32::entry() {
 	if (_G(spieler).R32HowardWeg)
-		_G(det)->hide_static_spr(0);
+		_G(det)->hideStaticSpr(0);
 	if (!_G(spieler).R32Script && _G(spieler).R32UseSchreib)
-		_G(det)->show_static_spr(5);
+		_G(det)->showStaticSpr(5);
 }
 
 int16 Room32::use_howard() {
@@ -57,13 +57,13 @@ int16 Room32::use_howard() {
 			start_aad_wait(125, -1);
 			wait_show_screen(10);
 
-			_G(det)->hide_static_spr(0);
+			_G(det)->hideStaticSpr(0);
 			start_detail_frame(0, 1, ANI_FRONT, 9);
 			start_detail_wait(1, 1, ANI_BACK);
-			_G(det)->show_static_spr(7);
-			_G(det)->show_static_spr(6);
+			_G(det)->showStaticSpr(7);
+			_G(det)->showStaticSpr(6);
 			wait_show_screen(20);
-			_G(det)->hide_static_spr(7);
+			_G(det)->hideStaticSpr(7);
 			start_detail_wait(1, 1, ANI_FRONT);
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			ani_nr = CH_TALK3;
@@ -109,7 +109,7 @@ void Room32::use_schreibmaschine() {
 						cur_2_inventory();
 						flic_cut(FCUT_044);
 						register_cutscene(12);
-						_G(det)->show_static_spr(5);
+						_G(det)->showStaticSpr(5);
 						_G(atds)->set_ats_str(203, 1, ATS_DATEI);
 						ani_nr = CH_TALK3;
 						dia_nr = 88;
@@ -157,7 +157,7 @@ int16 Room32::get_script() {
 		autoMove(4, P_CHEWY);
 		invent_2_slot(MANUSKRIPT_INV);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
-		_G(det)->hide_static_spr(5);
+		_G(det)->hideStaticSpr(5);
 		_G(atds)->set_ats_str(203, 0, ATS_DATEI);
 		start_spz(CH_TALK3, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(91, -1);
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index b3895cfe347..60d29693214 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -36,7 +36,7 @@ static const MovLine SURIMY_MPKT[2] = {
 
 void Room33::entry() {
 	if (_G(spieler).R33MunterGet)
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 	surimy_go();
 }
 
@@ -206,7 +206,7 @@ int16 Room33::get_munter() {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(MUNTER_INV);
 		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 		start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(72, -1);
 		showCur();
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index d230f38d801..f4e005febce 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -37,7 +37,7 @@ static const AniBlock ABLOCK28[2] = {
 
 void Room35::entry() {
 	if (_G(spieler).R35Schublade)
-		_G(det)->show_static_spr(1);
+		_G(det)->showStaticSpr(1);
 }
 
 int16 Room35::schublade() {
@@ -49,7 +49,7 @@ int16 Room35::schublade() {
 			action_flag = true;
 			autoMove(3, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			_G(det)->show_static_spr(1);
+			_G(det)->showStaticSpr(1);
 			_G(spieler).R35Schublade = true;
 			_G(atds)->set_ats_str(234, 1, ATS_DATEI);
 		} else if (!_G(spieler).R35Falle) {
@@ -98,7 +98,7 @@ int16 Room35::use_cat() {
 			start_detail_wait(3, 1, ANI_FRONT);
 			_G(obj)->show_sib(SIB_KNOCHEN_R35);
 			_G(obj)->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
-			_G(det)->show_static_spr(7);
+			_G(det)->showStaticSpr(7);
 			_G(atds)->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
 
 			while (_G(det)->get_ani_status(2) && !SHOULD_QUIT) {
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 1e38456802a..8ff7dce6c7e 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -62,12 +62,12 @@ void Room37::entry() {
 	}
 
 	if (_G(spieler).R37Gebiss) {
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 
 		if (_G(spieler).R37Kloppe) {
-			_G(det)->hide_static_spr(8);
+			_G(det)->hideStaticSpr(8);
 		} else if (_G(spieler).R37HundScham) {
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 		}
 	}
 }
@@ -138,7 +138,7 @@ int16 Room37::cut_serv1(int16 frame) {
 		if (!_G(spieler).R37Gebiss) {
 			_G(det)->plot_static_details(scrollx, scrolly, 9, 9);
 			_G(det)->plot_static_details(scrollx, scrolly, 11, 11);
-			_G(det)->show_static_spr(11);
+			_G(det)->showStaticSpr(11);
 		} else {
 			_G(det)->plot_static_details(scrollx, scrolly, 8, 8);
 			_G(det)->plot_static_details(scrollx, scrolly, 0, 0);
@@ -153,8 +153,8 @@ int16 Room37::cut_serv1(int16 frame) {
 int16 Room37::cut_serv2(int16 frame) {
 	static const int16 STATIC_NR[] = { 7, 14, 12, 10 };
 
-	_G(det)->show_static_spr(12);
-	_G(det)->show_static_spr(10);
+	_G(det)->showStaticSpr(12);
+	_G(det)->showStaticSpr(10);
 	for (short i = 0; i < 4; i++)
 		_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, STATIC_NR[i], STATIC_NR[i]);
 
@@ -178,7 +178,7 @@ int16 Room37::use_glas() {
 			flic_cut(FCUT_048);
 			flic_cut(FCUT_049);
 			invent_2_slot(GEBISS_INV);
-			_G(det)->hide_static_spr(9);
+			_G(det)->hideStaticSpr(9);
 			_G(atds)->set_ats_str(250, 1, ATS_DATEI);
 			_G(atds)->set_ats_str(256, 1, ATS_DATEI);
 			_G(atds)->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
@@ -216,7 +216,7 @@ void Room37::dog_bell() {
 			_G(det)->stop_detail(3);
 			_G(det)->del_static_ani(3);
 			start_detail_wait(5, 1, ANI_FRONT);
-			_G(det)->hide_static_spr(9);
+			_G(det)->hideStaticSpr(9);
 			start_detail_wait(6, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(det)->start_detail(11, 255, ANI_FRONT);
@@ -225,7 +225,7 @@ void Room37::dog_bell() {
 			_G(det)->stop_detail(11);
 			set_person_pos(326, 85, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(det)->show_static_spr(9);
+			_G(det)->showStaticSpr(9);
 			start_ani_block(3, ABLOCK31);
 			_G(det)->set_static_ani(3, -1);
 			g_engine->_sound->playSound(3, 0);
@@ -247,7 +247,7 @@ void Room37::dog_bell() {
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054);
 			register_cutscene(10);
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 
 			_G(spieler).R37HundScham = true;
 			dia_nr = 148;
@@ -315,7 +315,7 @@ void Room37::use_hahn() {
 			}
 
 			_G(det)->start_detail(4, 1, ANI_FRONT);
-			_G(det)->hide_static_spr(0);
+			_G(det)->hideStaticSpr(0);
 			_G(det)->start_detail(10, 10, ANI_FRONT);
 			autoMove(8, P_CHEWY);
 			flic_cut(FCUT_053);
@@ -326,7 +326,7 @@ void Room37::use_hahn() {
 			_G(atds)->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
 			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(det)->hide_static_spr(8);
+			_G(det)->hideStaticSpr(8);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(141, -1);
 			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 9978559a621..ccb72f7c64a 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -53,7 +53,7 @@ static const AniBlock ABLOCK29[2] = {
 void Room39::entry() {
 	if (!_G(spieler).R41Einbruch) {
 		if (_G(spieler).R39HowardDa) {
-			_G(det)->show_static_spr(10);
+			_G(det)->showStaticSpr(10);
 			if (!_G(spieler).R39HowardWach)
 				_G(det)->start_detail(1, 255, ANI_FRONT);
 			else
@@ -335,14 +335,14 @@ void Room39::look_tv(bool cls_mode) {
 
 void Room39::set_tv() {
 	for (int16 i = 0; i < 6; i++)
-		_G(det)->hide_static_spr(i + 4);
+		_G(det)->hideStaticSpr(i + 4);
 
 	if (_G(spieler).R39TvOn) {
 		if (_G(spieler).R39TvKanal == 2) {
 			_G(det)->start_detail(0, 255, ANI_FRONT);
 		} else {
 			_G(det)->stop_detail(0);
-			_G(det)->show_static_spr(_G(spieler).R39TvKanal + 4);
+			_G(det)->showStaticSpr(_G(spieler).R39TvKanal + 4);
 		}
 
 		if (_G(spieler).R39TranslatorUsed) {
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 7a8fbf8dd86..81c68301719 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -57,7 +57,7 @@ void Room40::entry(int16 eib_nr) {
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 		_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
-		_G(det)->hide_static_spr(15);
+		_G(det)->hideStaticSpr(15);
 	}
 
 	_G(spieler).R40PoliceAniStatus = 255;
@@ -172,20 +172,20 @@ void Room40::move_train(int16 mode) {
 	int16 ax = -230;
 
 	_G(det)->start_detail(7, 20, ANI_FRONT);
-	_G(det)->show_static_spr(11);
+	_G(det)->showStaticSpr(11);
 
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(12);
 
 	g_engine->_sound->playSound(7, 0);
 	int16 delay = 0;
 
 	while (ax < 560) {
 		_G(det)->set_detail_pos(7, lx, 46);
-		_G(det)->set_static_pos(11, ax, 62, false, false);
+		_G(det)->setStaticPos(11, ax, 62, false, false);
 
 		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
-			_G(det)->set_static_pos(12, ax, 62, false, true);
+			_G(det)->setStaticPos(12, ax, 62, false, true);
 
 		if (!delay) {
 			lx += SPEED;
@@ -200,8 +200,8 @@ void Room40::move_train(int16 mode) {
 	}
 
 	_G(det)->stop_detail(7);
-	_G(det)->hide_static_spr(11);
-	_G(det)->hide_static_spr(12);
+	_G(det)->hideStaticSpr(11);
+	_G(det)->hideStaticSpr(12);
 
 	if (!mode) {
 		start_aad_wait(207, -1);
@@ -244,7 +244,7 @@ void Room40::setup_func() {
 			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
 			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-			_G(det)->hide_static_spr(15);
+			_G(det)->hideStaticSpr(15);
 			_G(det)->start_detail(POLICE_LEFT, 1, ANI_FRONT);
 			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 		}
@@ -259,7 +259,7 @@ void Room40::setup_func() {
 
 		case POLICE_OFFEN:
 			if (_G(det)->get_ani_status(POLICE_OFFEN) == false) {
-				_G(det)->show_static_spr(0);
+				_G(det)->showStaticSpr(0);
 				_G(det)->start_detail(POLICE_FLASCHE, 1, ANI_FRONT);
 				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
 			}
@@ -267,7 +267,7 @@ void Room40::setup_func() {
 
 		case POLICE_RIGHT:
 			if (_G(det)->get_ani_status(POLICE_RIGHT) == false) {
-				_G(det)->show_static_spr(15);
+				_G(det)->showStaticSpr(15);
 				_G(spieler).R40PoliceAniStatus = 255;
 				_G(room)->set_timer_status(255, TIMER_START);
 				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
@@ -277,7 +277,7 @@ void Room40::setup_func() {
 
 		case POLICE_FLASCHE:
 			if (_G(det)->get_ani_status(POLICE_FLASCHE) == false) {
-				_G(det)->hide_static_spr(0);
+				_G(det)->hideStaticSpr(0);
 				if (_G(spieler).R40DuengerTele) {
 					hideCur();
 					_G(spieler).R40PoliceWeg = true;
@@ -396,13 +396,13 @@ int16 Room40::use_schalter(int16 aad_nr) {
 			_G(spieler).R40HoUse = false;
 		}
 
-		_G(det)->hide_static_spr(15);
+		_G(det)->hideStaticSpr(15);
 		start_detail_wait(12, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
 		start_aad_wait(aad_nr, -1);
 		_G(det)->del_static_ani(14);
 		start_detail_wait(13, 1, ANI_FRONT);
-		_G(det)->show_static_spr(15);
+		_G(det)->showStaticSpr(15);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		showCur();
@@ -613,7 +613,7 @@ int16 Room40::use_tele() {
 
 		} else {
 			autoMove(13, P_CHEWY);
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 
 			int16 dia_nr;
 			if (!_G(spieler).R40DuengerMit) {
@@ -626,7 +626,7 @@ int16 Room40::use_tele() {
 
 			start_aad_wait(dia_nr, -1);
 			autoMove(11, P_HOWARD);
-			_G(det)->hide_static_spr(0);
+			_G(det)->hideStaticSpr(0);
 			autoMove(9, P_CHEWY);
 			start_aad_wait(dia_nr1, -1);
 			_G(spieler).R40HoUse = false;
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index a29ed6e8a62..24927e624c2 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -55,8 +55,8 @@ void Room41::entry() {
 
 	if (_G(spieler).R41Einbruch) {
 		_G(atds)->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(det)->show_static_spr(6);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(6);
+		_G(det)->showStaticSpr(7);
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index fe7bdcb21e6..f863a64b356 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -213,7 +213,7 @@ void Room45::taxi_mov() {
 	_G(room)->set_timer_status(12, TIMER_STOP);
 	_G(det)->del_static_ani(12);
 	g_engine->_sound->playSound(15, 1);
-	_G(det)->show_static_spr(11);
+	_G(det)->showStaticSpr(11);
 	autoMove(3, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -225,7 +225,7 @@ void Room45::taxi_mov() {
 		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 	}
 
-	_G(det)->hide_static_spr(11);
+	_G(det)->hideStaticSpr(11);
 	g_engine->_sound->playSound(15, 2);
 	g_engine->_sound->playSound(15, 2, false);
 	g_engine->_sound->playSound(15, 0);
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 32a0641b538..53d0f5e239b 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -98,7 +98,7 @@ void Room46::setup_func() {
 
 void Room46::bodo() {
 	hideCur();
-	_G(det)->show_static_spr(0);
+	_G(det)->showStaticSpr(0);
 	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 	start_aad_wait(240, -1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -114,20 +114,20 @@ void Room46::bodo() {
 	_G(det)->start_detail(5, 255, ANI_FRONT);
 	start_aad_wait(241, -1);
 	_G(det)->stop_detail(5);
-	_G(det)->show_static_spr(5);
+	_G(det)->showStaticSpr(5);
 	start_aad_wait(609, -1);
-	_G(det)->hide_static_spr(5);
+	_G(det)->hideStaticSpr(5);
 	start_detail_wait(2, 1, ANI_FRONT);
 	start_detail_wait(3, 1, ANI_FRONT);
 	_G(det)->start_detail(4, 255, ANI_FRONT);
 	start_aad_wait(242, -1);
 	_G(det)->stop_detail(4);
 
-	_G(det)->show_static_spr(6);
+	_G(det)->showStaticSpr(6);
 	start_aad_wait(610, -1);
-	_G(det)->hide_static_spr(6);
+	_G(det)->hideStaticSpr(6);
 	start_detail_wait(6, 1, ANI_FRONT);
-	_G(det)->show_static_spr(3);
+	_G(det)->showStaticSpr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	start_detail_wait(1, 1, ANI_FRONT);
 	flic_cut(FCUT_065);
@@ -136,8 +136,8 @@ void Room46::bodo() {
 	register_cutscene(16);
 	
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(det)->hide_static_spr(0);
-	_G(det)->hide_static_spr(3);
+	_G(det)->hideStaticSpr(0);
+	_G(det)->hideStaticSpr(3);
 	load_chewy_taf(CHEWY_ROCKER);
 	_G(spieler).R28ChewyPump = false;
 	
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 99f688b5eb2..58956a272a6 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -86,16 +86,16 @@ int16 Room47::use_knopf(int16 txt_nr) {
 
 void Room47::set_detail() {
 	for (int16 i = 0; i < 10; i++)
-		_G(det)->hide_static_spr(i);
+		_G(det)->hideStaticSpr(i);
 
 	for (int16 i = 0; i < 3; i++) {
-		_G(det)->show_static_spr(_G(spieler).R47Schloss[i]);
-		_G(det)->set_static_pos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i, false, true);
+		_G(det)->showStaticSpr(_G(spieler).R47Schloss[i]);
+		_G(det)->setStaticPos(_G(spieler).R47Schloss[i], 124 + i * 30, 96 - i, false, true);
 		_G(det)->plot_static_details(0, 0, _G(spieler).R47Schloss[i], _G(spieler).R47Schloss[i]);
 	}
 
 	for (int16 i = 0; i < 10; i++)
-		_G(det)->hide_static_spr(i);
+		_G(det)->hideStaticSpr(i);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 28c600a1ba3..8ad4060d654 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -61,13 +61,13 @@ void Room48::calc_pic() {
 	if (_G(obj)->checkInventory(VCARD_INV)) {
 		_G(spieler).R48Auswahl[3] = 1;
 		_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 	}
 
 	if (_G(obj)->checkInventory(KAPPE_INV)) {
 		_G(spieler).R48Auswahl[4] = 1;
 		_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 	}
 }
 
@@ -76,9 +76,9 @@ void Room48::frage() {
 		_G(flags).AutoAniPlay = true;
 		hideCur();
 		start_detail_wait(1, 1, ANI_FRONT);
-		_G(det)->show_static_spr(6);
+		_G(det)->showStaticSpr(6);
 		start_detail_wait(1, 1, ANI_BACK);
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		showCur();
 		_G(flags).AutoAniPlay = false;
@@ -87,7 +87,7 @@ void Room48::frage() {
 
 void Room48::setup_func() {
 	for (int16 i = 0; i < 5; i++)
-		_G(det)->hide_static_spr(1 + i);
+		_G(det)->hideStaticSpr(1 + i);
 
 	if (_G(flags).ShowAtsInvTxt) {
 		if (_G(menu_display) == 0) {
@@ -98,7 +98,7 @@ void Room48::setup_func() {
 
 			if (idx != -1) {
 				if (_G(spieler).R48Auswahl[idx]) {
-					_G(det)->show_static_spr(1 + idx);
+					_G(det)->showStaticSpr(1 + idx);
 
 					if (_G(maus_links_click)) {
 						int16 r_nr;
@@ -130,7 +130,7 @@ void Room48::setup_func() {
 
 						if (r_nr != -1) {
 							_G(SetUpScreenFunc) = nullptr;
-							_G(det)->hide_static_spr(1 + idx);
+							_G(det)->hideStaticSpr(1 + idx);
 							hideCur();
 							_G(room)->set_timer_status(255, TIMER_STOP);
 							_G(room)->set_timer_status(0, TIMER_STOP);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 6f129d83377..5d5f3ce2a50 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -46,7 +46,7 @@ void Room49::entry(int16 eib_nr) {
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 2);
 	} else {
 		_G(det)->del_static_ani(0);
-		_G(det)->hide_static_spr(5);
+		_G(det)->hideStaticSpr(5);
 		_G(det)->del_static_ani(0);
 		_G(det)->del_static_ani(1);
 	}
@@ -133,11 +133,11 @@ void Room49::calc_boy() {
 		_G(det)->del_static_ani(2);
 		start_detail_wait(3, 1, ANI_FRONT);
 
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		start_detail_wait(8, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = false;
-		_G(det)->hide_static_spr(9);
+		_G(det)->hideStaticSpr(9);
 		start_detail_wait(4, 1, ANI_GO);
 
 		_G(SetUpScreenFunc) = setup_func;
@@ -245,7 +245,7 @@ int16 Room49::use_taxi() {
 		action_ret = true;
 		hideCur();
 		start_ani_block(2, ABLOCK34);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -258,7 +258,7 @@ int16 Room49::use_taxi() {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
 
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		start_detail_wait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index a2eda15c566..6cbbc66f64f 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -64,7 +64,7 @@ void Room50::entry(int16 eib_nr) {
 			_G(timer_nr)[0] = _G(room)->set_timer(1, 8);
 			_wasser = false;
 		} else {
-			_G(det)->show_static_spr(4);
+			_G(det)->showStaticSpr(4);
 		}
 
 		_G(SetUpScreenFunc) = setup_func;
@@ -202,7 +202,7 @@ int16 Room50::use_gum() {
 		del_inventar(_G(spieler).AkInvent);
 		hide_person();
 		start_detail_wait(2, 1, ANI_FRONT);
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 		start_detail_wait(2, 1, ANI_BACK);
 		show_person();
 		set_person_spr(P_LEFT, P_CHEWY);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 8cffa9edf77..e8f27afc7da 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -60,7 +60,7 @@ void Room51::entry() {
 		set_person_pos(34, 120, P_HOWARD, P_RIGHT);
 		set_person_pos(234, 69, P_CHEWY, P_LEFT);
 		_G(SetUpScreenFunc) = setup_func;
-		_G(det)->show_static_spr(17);
+		_G(det)->showStaticSpr(17);
 		_index = 0;
 		hideCur();
 
@@ -73,7 +73,7 @@ void Room51::entry() {
 		_flag = false;
 
 	} else {
-		_G(det)->hide_static_spr(17);
+		_G(det)->hideStaticSpr(17);
 
 		for (int i = 0; i < 2; i++)
 			_G(det)->start_detail(3 + i, 1, ANI_FRONT);
@@ -141,7 +141,7 @@ void Room51::setup_func() {
 		if (_tmpy < 81)
 			_tmpy = 81;
 
-		_G(det)->set_static_pos(17, _tmpx, _tmpy, false, false);
+		_G(det)->setStaticPos(17, _tmpx, _tmpy, false, false);
 
 		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
@@ -216,7 +216,7 @@ int16 Room51::use_door(int16 txt_nr) {
 		case 329:
 			autoMove(8, P_CHEWY);
 			_G(SetUpScreenFunc) = nullptr;
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 
 			if (!_G(spieler).R51HotelRoom) {
 				autoMove(11, P_HOWARD);
@@ -239,7 +239,7 @@ int16 Room51::use_door(int16 txt_nr) {
 			if (!_G(spieler).R51KillerWeg) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(2);
-				_G(det)->show_static_spr(1);
+				_G(det)->showStaticSpr(1);
 				start_detail_wait(2, 1, ANI_FRONT);
 				_G(det)->start_detail(5, 255, ANI_FRONT);
 
@@ -248,7 +248,7 @@ int16 Room51::use_door(int16 txt_nr) {
 					autoMove(12, P_CHEWY);
 					_G(det)->stop_detail(5);
 					start_ani_block(5, ABLOCK37);
-					_G(det)->hide_static_spr(1);
+					_G(det)->hideStaticSpr(1);
 					g_engine->_sound->stopSound(0);
 					start_aad_wait(284, -1);
 				} else {
@@ -260,15 +260,15 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(out)->cls();
 					_G(out)->einblenden(_G(pal), 0);
 					_G(flags).NoPalAfterFlc = true;
-					_G(det)->show_static_spr(16);
+					_G(det)->showStaticSpr(16);
 					flic_cut(FCUT_068);
 
-					_G(det)->hide_static_spr(16);
+					_G(det)->hideStaticSpr(16);
 					_G(flags).NoPalAfterFlc = false;
 					_G(det)->stop_detail(5);
 					_G(obj)->show_sib(SIB_AUSRUEST_R52);
 					_G(obj)->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
-					_G(det)->hide_static_spr(1);
+					_G(det)->hideStaticSpr(1);
 
 					_G(fx_blend) = BLEND3;
 					set_up_screen(DO_SETUP);
@@ -302,29 +302,29 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
-				_G(det)->show_static_spr(3);
+				_G(det)->showStaticSpr(3);
 				start_aad_wait(278, -1);
 				start_detail_frame(0, 1, ANI_FRONT, 3);
 				start_spz(HO_BRILL_JMP, 1, ANI_FRONT, P_HOWARD);
 				wait_detail(0);
 
-				_G(det)->show_static_spr(14);
+				_G(det)->showStaticSpr(14);
 				start_aad_wait(279, -1);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_FLASCHE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_FLASCHE_R51);
-				_G(det)->hide_static_spr(3);
+				_G(det)->hideStaticSpr(3);
 				break;
 
 			case 1:
-				_G(det)->show_static_spr(3);
+				_G(det)->showStaticSpr(3);
 				start_aad_wait(280, -1);
 				start_detail_wait(1, 1, ANI_FRONT);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_KAPPE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_KAPPE_R51);
-				_G(det)->hide_static_spr(3);
-				_G(det)->show_static_spr(15);
+				_G(det)->hideStaticSpr(3);
+				_G(det)->showStaticSpr(15);
 				break;
 
 			default:
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 6237c717ca8..2e336d53fc8 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -45,13 +45,13 @@ void Room52::entry() {
 		_G(det)->stop_detail(0);
 
 	if (!_G(flags).LoadGame) {
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 		_G(spieler).R52TuerAuf = true;
 		set_person_pos(20, 50, P_HOWARD, P_LEFT);
 		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
 		autoMove(2, P_CHEWY);
 		_G(spieler).R52TuerAuf = false;
-		_G(det)->hide_static_spr(4);
+		_G(det)->hideStaticSpr(4);
 		check_shad(2, 1);
 	}
 }
@@ -76,7 +76,7 @@ int16 Room52::use_hot_dog() {
 		action_ret = true;
 		autoMove(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 		del_inventar(_G(spieler).AkInvent);
 		autoMove(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 5608a0d5da7..ad25d9a8aeb 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -39,7 +39,7 @@ void Room54::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 66;
 
 	if (_G(spieler).R54FputzerWeg)
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
@@ -136,7 +136,7 @@ int16 Room54::use_schalter() {
 			goAutoXy(127, 76, P_HOWARD, ANI_WAIT);
 			goAutoXy(14, 72, P_HOWARD, ANI_GO);
 			start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 			autoMove(2, P_CHEWY);
 			g_engine->_sound->playSound(1, 0);
 			g_engine->_sound->playSound(0, 1);
@@ -151,7 +151,7 @@ int16 Room54::use_schalter() {
 			int16 aad_nr;
 			if (_G(spieler).R54LiftCount < 3) {
 				start_detail_wait(2, 1, ANI_FRONT);
-				_G(det)->hide_static_spr(0);
+				_G(det)->hideStaticSpr(0);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->stopSound(1);
 				g_engine->_sound->playSound(1, 2);
@@ -161,7 +161,7 @@ int16 Room54::use_schalter() {
 
 			} else {
 				start_detail_wait(5, 1, ANI_FRONT);
-				_G(det)->show_static_spr(9);
+				_G(det)->showStaticSpr(9);
 				start_detail_wait(4, 1, ANI_FRONT);
 				aad_nr = 296;
 				_G(spieler).R54FputzerWeg = true;
@@ -286,7 +286,7 @@ int16 Room54::use_azug() {
 				_G(spieler).R54HowardVorne = 0;
 				start_aad_wait(298, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				_G(det)->show_static_spr(12);
+				_G(det)->showStaticSpr(12);
 				_G(spieler).R55Location = true;
 				_G(SetUpScreenFunc) = nullptr;
 				goAutoXy(91, 62, P_HOWARD, ANI_WAIT);
@@ -298,8 +298,8 @@ int16 Room54::use_azug() {
 				int16 delay = 0;
 
 				while (ch_y > -48) {
-					_G(det)->set_static_pos(12, 125, ch_y, false, false);
-					_G(det)->set_static_pos(9, 122, ay, false, false);
+					_G(det)->setStaticPos(12, 125, ch_y, false, false);
+					_G(det)->setStaticPos(9, 122, ay, false, false);
 
 					if (!delay) {
 						ch_y -= 3;
@@ -330,7 +330,7 @@ void Room54::aufzug_ab() {
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
 	_G(SetUpScreenFunc) = setup_func;
-	_G(det)->show_static_spr(12);
+	_G(det)->showStaticSpr(12);
 	g_engine->_sound->playSound(1, 0);
 	g_engine->_sound->playSound(1);
 
@@ -339,8 +339,8 @@ void Room54::aufzug_ab() {
 	int16 delay = 0;
 
 	while (ch_y < 68) {
-		_G(det)->set_static_pos(12, 125, ch_y, false, false);
-		_G(det)->set_static_pos(9, 122, ay, false, false);
+		_G(det)->setStaticPos(12, 125, ch_y, false, false);
+		_G(det)->setStaticPos(9, 122, ay, false, false);
 
 		if (!delay) {
 			ch_y += 3;
@@ -355,7 +355,7 @@ void Room54::aufzug_ab() {
 	}
 
 	g_engine->_sound->stopSound(0);
-	_G(det)->hide_static_spr(12);
+	_G(det)->hideStaticSpr(12);
 	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 5f7a60ac59f..ee10078ad13 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -42,10 +42,10 @@ void Room55::entry() {
 		_G(det)->start_detail(6, 255, ANI_FRONT);
 
 	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 
 	if (_G(spieler).R55RaumOk || _G(spieler).R55ScriptWeg)
-		_G(det)->hide_static_spr(0);
+		_G(det)->hideStaticSpr(0);
 
 	if (!_G(spieler).R55SekWeg) {
 		_G(det)->start_detail(8, 255, ANI_FRONT);
@@ -69,7 +69,7 @@ void Room55::entry() {
 	}
 
 	if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk)
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R55Location) {
@@ -86,10 +86,10 @@ void Room55::entry() {
 				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
 			}
 
-			_G(det)->show_static_spr(8);
+			_G(det)->showStaticSpr(8);
 			autoMove(1, P_CHEWY);
 			hideCur();
-			_G(det)->hide_static_spr(8);
+			_G(det)->hideStaticSpr(8);
 
 			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
 				set_person_spr(P_LEFT, P_CHEWY);
@@ -136,9 +136,9 @@ int16 Room55::use_stapel1() {
 			action_ret = true;
 			_G(spieler).R55ScriptWeg = true;
 			autoMove(4, P_CHEWY);
-			_G(det)->hide_static_spr(0);
+			_G(det)->hideStaticSpr(0);
 			autoMove(5, P_CHEWY);
-			_G(det)->show_static_spr(1);
+			_G(det)->showStaticSpr(1);
 			_G(atds)->set_ats_str(354, 1, ATS_DATEI);
 			_G(atds)->set_ats_str(355, 1, ATS_DATEI);
 
@@ -152,7 +152,7 @@ int16 Room55::use_stapel1() {
 		if (_G(spieler).R55ScriptWeg) {
 			autoMove(4, P_CHEWY);
 			_G(spieler).R55EscScriptOk = true;
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 			del_inventar(_G(spieler).AkInvent);
 			_G(atds)->set_ats_str(354, 2, ATS_DATEI);
 		} else {
@@ -199,18 +199,18 @@ int16 Room55::use_telefon() {
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
 				start_aad_wait(330, -1);
-				_G(det)->show_static_spr(8);
+				_G(det)->showStaticSpr(8);
 				start_detail_wait(0, 1, ANI_FRONT);
 				_G(det)->start_detail(1, 255, ANI_FRONT);
 				start_aad_wait(331, -1);
 				_G(det)->stop_detail(1);
 
-				_G(det)->show_static_spr(16);
+				_G(det)->showStaticSpr(16);
 				start_aad_wait(608, -1);
-				_G(det)->hide_static_spr(16);
+				_G(det)->hideStaticSpr(16);
 				start_detail_wait(2, 1, ANI_FRONT);
-				_G(det)->hide_static_spr(0);
-				_G(det)->hide_static_spr(8);
+				_G(det)->hideStaticSpr(0);
+				_G(det)->hideStaticSpr(8);
 				_G(atds)->set_ats_str(354, 1, ATS_DATEI);
 				flic_cut(FCUT_071);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
@@ -327,7 +327,7 @@ void Room55::rock2mans() {
 
 void Room55::verleger_mov(int16 mode) {
 	start_detail_wait(7, 1, ANI_FRONT);
-	_G(det)->show_static_spr(11);
+	_G(det)->showStaticSpr(11);
 	start_detail_wait(13, 1, ANI_FRONT);
 	start_detail_wait(14, 1, ANI_FRONT);
 
@@ -366,7 +366,7 @@ int16 Room55::use_kammeraus() {
 			hideCur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			start_detail_wait(5, 1, ANI_FRONT);
-			_G(det)->show_static_spr(10);
+			_G(det)->showStaticSpr(10);
 			flic_cut(FCUT_070);
 			register_cutscene(18);
 		
@@ -374,7 +374,7 @@ int16 Room55::use_kammeraus() {
 			_G(room)->set_timer_status(aniNr, TIMER_STOP);
 			_G(det)->stop_detail(aniNr);
 			_G(det)->del_static_ani(aniNr);
-			_G(det)->hide_static_spr(10);
+			_G(det)->hideStaticSpr(10);
 			_G(spieler).R55ExitDia = 322;
 			_G(spieler).R55SekWeg = true;
 			_G(atds)->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 5aeaa0b7ac3..24f01ae6983 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -37,7 +37,7 @@ void Room56::entry() {
 	int mode = 0;
 
 	if (_G(spieler).flags32_10) {
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 		_G(room)->set_timer_status(0, TIMER_STOP);
 		_G(det)->del_static_ani(0);
 		_G(det)->start_detail(13, 255, ANI_FRONT);
@@ -52,7 +52,7 @@ void Room56::entry() {
 			_G(spieler).scrolly = 0;
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			_G(spieler).PersonHide[P_HOWARD] = true;
-			_G(det)->hide_static_spr(2);
+			_G(det)->hideStaticSpr(2);
 			_G(zoom_horizont) = 0;
 			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
 			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
@@ -67,7 +67,7 @@ void Room56::entry() {
 
 			if (!_G(spieler).R56GetTabak) {
 				flic_cut(FCUT_074);
-				_G(det)->show_static_spr(2);
+				_G(det)->showStaticSpr(2);
 			}
 
 			_G(room)->set_zoom(23);
@@ -92,8 +92,8 @@ void Room56::entry() {
 			set_person_pos(429, 146, P_CHEWY, P_LEFT);
 			_G(spieler).scrollx = 262;
 			_G(spieler).PersonHide[P_HOWARD] = false;
-			_G(det)->show_static_spr(9);
-			_G(det)->show_static_spr(8);
+			_G(det)->showStaticSpr(9);
+			_G(det)->showStaticSpr(8);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			_G(det)->set_static_ani(3, -1);
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 90b05087252..de53fde3c4f 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -38,7 +38,7 @@ void Room57::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	if (_G(spieler).R57StudioAuf)
-		_G(det)->hide_static_spr(4);
+		_G(det)->hideStaticSpr(4);
 	
 	if (!_G(flags).LoadGame &&_G(spieler).R48TaxiEntry) {
 		hideCur();
@@ -85,7 +85,7 @@ int16 Room57::use_taxi() {
 		autoMove(3, P_CHEWY);
 		g_engine->_sound->playSound(3, 0);
 		g_engine->_sound->playSound(3);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		goAutoXy(16, 160, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
@@ -96,7 +96,7 @@ int16 Room57::use_taxi() {
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
 		}
-		_G(det)->hide_static_spr(7);
+		_G(det)->hideStaticSpr(7);
 		g_engine->_sound->playSound(3, 1);
 		g_engine->_sound->playSound(3);
 		_G(room)->set_timer_status(3, TIMER_STOP);
@@ -137,7 +137,7 @@ int16 Room57::use_pfoertner() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
-			_G(det)->hide_static_spr(4);
+			_G(det)->hideStaticSpr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
 			g_engine->_sound->stopSound(0);
 			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index f9416897cc8..dbd4713dd1b 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -50,8 +50,8 @@ void Room63::entry() {
 		_G(det)->start_detail(10, 255, ANI_FRONT);
 		showCur();
 	} else if (!_G(spieler).R63Feuer) {
-		_G(det)->show_static_spr(10);
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(10);
+		_G(det)->showStaticSpr(12);
 	} else if (_G(spieler).R62LauraVerwandlung) {
 		_G(atds)->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(SetUpScreenFunc) = setup_func;
@@ -142,7 +142,7 @@ void Room63::bork_platt() {
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	start_aad_wait(370, -1);
 	start_detail_wait(4, 1, ANI_FRONT);
-	_G(det)->show_static_spr(13);
+	_G(det)->showStaticSpr(13);
 	start_aad_wait(361, -1);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
@@ -159,11 +159,11 @@ void Room63::talk_hunter() {
 	hideCur();
 	autoMove(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
-		_G(det)->hide_static_spr(10);
+		_G(det)->hideStaticSpr(10);
 	_G(det)->start_detail(10, 255, ANI_FRONT);
 	start_aad_wait(356, -1);
 	if (_G(spieler).R63Uhr) {
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 		_G(det)->stop_detail(10);
 	}
 	showCur();
@@ -173,13 +173,13 @@ void Room63::talk_regie() {
 	hideCur();
 	autoMove(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
-		_G(det)->hide_static_spr(12);
+		_G(det)->hideStaticSpr(12);
 	_G(det)->stop_detail(18);
 	_G(det)->start_detail(19, 255, ANI_FRONT);
 	start_aad_wait(357, -1);
 	_G(det)->stop_detail(19);
 	if (_G(spieler).R63Uhr) {
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(12);
 	} else {
 		_G(det)->start_detail(18, 255, ANI_FRONT);
 	}
@@ -228,15 +228,15 @@ int16 Room63::use_schalter() {
 				hideCur();
 				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
-				_G(det)->show_static_spr(2);
+				_G(det)->showStaticSpr(2);
 				set_person_spr(P_LEFT, P_CHEWY);
 				start_detail_wait(21, 1, ANI_FRONT);
-				_G(det)->show_static_spr(14);
+				_G(det)->showStaticSpr(14);
 				wait_show_screen(18);
-				_G(det)->hide_static_spr(14);
+				_G(det)->hideStaticSpr(14);
 				start_detail_wait(24, 1, ANI_FRONT);
-				_G(det)->show_static_spr(1);
-				_G(det)->hide_static_spr(2);
+				_G(det)->showStaticSpr(1);
+				_G(det)->hideStaticSpr(2);
 				start_aad_wait(364, -1);
 				_G(atds)->set_ats_str(385, 1, ATS_DATEI);
 				showCur();
@@ -279,8 +279,8 @@ int16 Room63::use_girl() {
 		_G(spieler).R63Uhr = true;
 		_G(det)->stop_detail(10);
 		_G(det)->stop_detail(18);
-		_G(det)->show_static_spr(10);
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(10);
+		_G(det)->showStaticSpr(12);
 		_G(atds)->set_ats_str(381, 1, ATS_DATEI);
 		_G(atds)->set_ats_str(382, 1, ATS_DATEI);
 		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
@@ -307,8 +307,8 @@ int16 Room63::use_aschenbecher() {
 				_G(det)->start_detail(20, 255, ANI_FRONT);
 				_G(det)->start_detail(10, 255, ANI_FRONT);
 				_G(det)->start_detail(18, 255, ANI_FRONT);
-				_G(det)->hide_static_spr(10);
-				_G(det)->hide_static_spr(12);
+				_G(det)->hideStaticSpr(10);
+				_G(det)->hideStaticSpr(12);
 				start_aad_wait(368, -1);
 				flic_cut(FCUT_080);
 				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 0d50734a475..78ca014ff0c 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -70,9 +70,9 @@ void Room64::chewy_entry() {
 	calc_monitor();
 	if (!_G(flags).LoadGame) {
 		hideCur();
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 		autoMove(2, P_CHEWY);
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 		showCur();
 	}
 }
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 55292ff1a03..ba49c6db886 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -39,8 +39,8 @@ void Room66::entry(int16 eib_nr) {
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	if (!_G(spieler).flags26_4) {
-		_G(det)->show_static_spr(4);
-		_G(det)->show_static_spr(8);
+		_G(det)->showStaticSpr(4);
+		_G(det)->showStaticSpr(8);
 		_G(cur_hide_flag) = false;
 		hideCur();
 		_G(spieler).flags26_4 = true;
@@ -54,9 +54,9 @@ void Room66::entry(int16 eib_nr) {
 		start_aad_wait(403, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(0, 1, ANI_FRONT);
-		_G(det)->show_static_spr(14);
+		_G(det)->showStaticSpr(14);
 		wait_show_screen(15);
-		_G(det)->hide_static_spr(14);
+		_G(det)->hideStaticSpr(14);
 		start_detail_wait(1, 1, ANI_FRONT);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index ba4626f39f3..b6c881d9f1f 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -35,12 +35,12 @@ void Room67::entry() {
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	_G(spieler).DiaAMov = 7;
 	if (_G(spieler).R67KommodeAuf)
-		_G(det)->show_static_spr(9);
+		_G(det)->showStaticSpr(9);
 	if (!_G(spieler).R67PapageiWeg) {
 		_G(timer_nr)[0] = _G(room)->set_timer(1, 10);
 		_G(det)->set_static_ani(1, -1);
 	} else
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 	if (!_G(flags).LoadGame) {
 		hideCur();
 		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
@@ -112,7 +112,7 @@ int16 Room67::use_kommode() {
 			_G(spieler).R67KommodeAuf = true;
 			autoMove(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			_G(det)->show_static_spr(9);
+			_G(det)->showStaticSpr(9);
 			_G(atds)->set_ats_str(400, 1, ATS_DATEI);
 		} else if (!_G(spieler).R67KostuemWeg) {
 			action_flag = true;
@@ -169,7 +169,7 @@ int16 Room67::talk_papagei() {
 			_G(spieler).R67PapageiWeg = true;
 			_G(det)->stop_detail(1);
 			_G(det)->del_static_ani(1);
-			_G(det)->show_static_spr(0);
+			_G(det)->showStaticSpr(0);
 			invent_2_slot(PAPAGEI_INV);
 			showCur();
 			_G(atds)->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 3880b4bbc90..eea8c49b7cc 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -50,7 +50,7 @@ void Room68::entry() {
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 	
 	if (_G(spieler).R68Papagei) {
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(12);
 		_G(det)->start_detail(21, 255, ANI_FRONT);
 	}
 
@@ -58,7 +58,7 @@ void Room68::entry() {
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
 		_G(det)->set_static_ani(18, -1);
 	} else
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 	
 	if (!_G(flags).LoadGame) {
 		hideCur();
@@ -122,7 +122,7 @@ void Room68::setup_func() {
 		if (_G(det)->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = -1;
 			_G(det)->stop_detail(18);
-			_G(det)->show_static_spr(3);
+			_G(det)->showStaticSpr(3);
 			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 		}
 		break;
@@ -249,7 +249,7 @@ int16 Room68::use_papagei() {
 		del_inventar(_G(spieler).AkInvent);
 		autoMove(5, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-		_G(det)->show_static_spr(12);
+		_G(det)->showStaticSpr(12);
 		_G(det)->start_detail(21, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(407, 1, ATS_DATEI);
@@ -264,7 +264,7 @@ void Room68::calc_diva() {
 			if (_G(r68HohesC) == -1) {
 				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
 				_G(r68HohesC) = 0;
-				_G(det)->hide_static_spr(3);
+				_G(det)->hideStaticSpr(3);
 				_G(det)->start_detail(_G(r68HohesC), 1, ANI_BACK);
 				_G(det)->start_detail(18, 255, ANI_FRONT);
 			}
@@ -308,15 +308,15 @@ int16 Room68::use_diva() {
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
 		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 		start_detail_wait(4, 1, ANI_FRONT);
 		_G(spieler).R68Gutschein = false;
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 	} else if (is_cur_inventar(B_MARY2_INV)) {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
-		_G(det)->hide_static_spr(3);
+		_G(det)->hideStaticSpr(3);
 		_G(spieler).R68DivaWeg = true;
 		start_ani_block(2, ABLOCK38);
 		flic_cut(FCUT_083);
@@ -408,11 +408,11 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(det)->stop_detail(27);
 		_G(det)->stop_detail(24);
-		_G(det)->show_static_spr(13);
+		_G(det)->showStaticSpr(13);
 		_G(spieler).R68Lied = true;
 		autoMove(1, P_CHEWY);
 		auto_scroll(216, 0);
-		_G(det)->hide_static_spr(13);
+		_G(det)->hideStaticSpr(13);
 		_G(spieler).PersonHide[P_NICHELLE] = false;
 		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
 
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 698b6918886..8c14da1a0fa 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -54,12 +54,12 @@ void Room71::entry(int16 eib_nr) {
 		_G(det)->set_static_ani(0, -1);
 	} else if (_G(spieler).R71LeopardVined) {
 		_G(det)->start_detail(2, 255, ANI_FRONT);
-		_G(det)->show_static_spr(8);
-		_G(det)->hide_static_spr(2);
-		_G(det)->hide_static_spr(3);
+		_G(det)->showStaticSpr(8);
+		_G(det)->hideStaticSpr(2);
+		_G(det)->hideStaticSpr(3);
 	} else if (_G(spieler).flags28_4) {
-		_G(det)->show_static_spr(5);
-		_G(det)->hide_static_spr(3);
+		_G(det)->showStaticSpr(5);
+		_G(det)->hideStaticSpr(3);
 	}
 
 	if (_G(flags).LoadGame)
@@ -109,9 +109,9 @@ void Room71::setup_func() {
 			_delay = (_G(spieler).DelaySpeed + 1) / 2;
 
 			if (_state == 1) {
-				_G(det)->set_static_pos(3, 244 + g_engine->_rnd.getRandomNumber(4), -1 * g_engine->_rnd.getRandomNumber(4), false, false);				
+				_G(det)->setStaticPos(3, 244 + g_engine->_rnd.getRandomNumber(4), -1 * g_engine->_rnd.getRandomNumber(4), false, false);				
 			} else {
-				_G(det)->set_static_pos(5, 198 + g_engine->_rnd.getRandomNumber(3), -1 * g_engine->_rnd.getRandomNumber(3), false, false);
+				_G(det)->setStaticPos(5, 198 + g_engine->_rnd.getRandomNumber(3), -1 * g_engine->_rnd.getRandomNumber(3), false, false);
 			}
 		}
 
@@ -205,14 +205,14 @@ void Room71::proc2() {
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	proc5(5);
-	_G(det)->hide_static_spr(2);
+	_G(det)->hideStaticSpr(2);
 	_G(det)->start_detail(5, 255, false);
 	auto_scroll(160, 0);
-	_G(det)->hide_static_spr(5);
+	_G(det)->hideStaticSpr(5);
 	start_detail_wait(1, 1, ANI_FRONT);
 	_G(det)->start_detail(2, 255, false);
 	_G(det)->stop_detail(5);
-	_G(det)->show_static_spr(8);
+	_G(det)->showStaticSpr(8);
 	_G(atds)->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_steuer_bit(446, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(spieler).PersonHide[P_HOWARD] = false;
@@ -251,9 +251,9 @@ void Room71::proc4() {
 
 void Room71::proc5(int16 val) {
 	_state = 1 + (_G(spieler).flags28_4 ? 1 : 0);
-	_G(det)->hide_static_spr(2);
+	_G(det)->hideStaticSpr(2);
 	start_detail_wait(val, 5, ANI_FRONT);
-	_G(det)->show_static_spr(2);
+	_G(det)->showStaticSpr(2);
 	_state = 0;
 }
 
@@ -264,13 +264,13 @@ int Room71::proc6() {
 	hideCur();
 	autoMove(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(det)->hide_static_spr(3);
-	_G(det)->show_static_spr(4);
+	_G(det)->hideStaticSpr(3);
+	_G(det)->showStaticSpr(4);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(244, 44, P_CHEWY, ANI_WAIT);
 	start_spz_wait(14, 1, false, P_CHEWY);
-	_G(det)->hide_static_spr(4);
-	_G(det)->show_static_spr(5);
+	_G(det)->hideStaticSpr(4);
+	_G(det)->showStaticSpr(5);
 	_G(spieler).flags28_4 = true;
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 7ba6bc42f9d..160c8b5f3c5 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -37,7 +37,7 @@ void Room72::entry(int16 eib_nr) {
 	
 	if (_G(spieler).flags28_10) {
 		_G(zoom_horizont) = 110;
-		_G(det)->hide_static_spr(0);
+		_G(det)->hideStaticSpr(0);
 	} else {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 20;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
@@ -93,7 +93,7 @@ void Room72::proc1(int16 flicNr) {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->hide_static_spr(0);
+	_G(det)->hideStaticSpr(0);
 	set_up_screen(DO_SETUP);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 5bcf3e9e454..43fbf1a378b 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -43,7 +43,7 @@ void Room73::entry(int16 eib_nr) {
 	_G(zoom_mov_fak) = 3;
 	_G(SetUpScreenFunc) = setup_func;
 	if (_G(spieler).flags28_20)
-		_G(det)->show_static_spr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
+		_G(det)->showStaticSpr(3+ (_G(spieler).R63Feuer ? 1 : 0)); // flags25_40
 
 	if (_G(flags).LoadGame)
 		return;
@@ -90,7 +90,7 @@ int Room73::proc1() {
 	_G(atds)->del_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(430, 1, ATS_DATEI);
-	_G(det)->show_static_spr(3);
+	_G(det)->showStaticSpr(3);
 	showCur();
 
 	return 1;	
@@ -104,8 +104,8 @@ int Room73::proc2() {
 	_G(spieler).flags28_40 = true;
 	autoMove(4, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(det)->hide_static_spr(3);
-	_G(det)->hide_static_spr(4);
+	_G(det)->hideStaticSpr(3);
+	_G(det)->hideStaticSpr(4);
 	_G(atds)->set_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
 	new_invent_2_cur(99);
 	showCur();
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 154f977159e..ec081904597 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -54,7 +54,7 @@ void Room76::entry() {
 	} else {
 		_G(det)->del_static_ani(2);
 		for (int i = 0; i < 3; ++i)
-			_G(det)->hide_static_spr(8 + i);
+			_G(det)->hideStaticSpr(8 + i);
 
 		_G(atds)->set_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
@@ -140,7 +140,7 @@ void Room76::proc5() {
 	_G(flags).NoScroll = false;
 	wait_show_screen(15);
 	autoMove(5, P_CHEWY);
-	_G(det)->hide_static_spr(10);
+	_G(det)->hideStaticSpr(10);
 	_G(det)->start_detail(13, 1, false);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(669, 127, P_CHEWY, ANI_WAIT);
@@ -202,7 +202,7 @@ int Room76::proc7() {
 		_G(det)->set_static_ani(2, -1);
 
 		for (int i = 0; i < 3; ++i)
-			_G(det)->show_static_spr(8 + i);
+			_G(det)->showStaticSpr(8 + i);
 
 		start_aad_wait(427, -1);
 		showCur();
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 2bd9711b311..870e11cf4cb 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -43,7 +43,7 @@ void Room77::entry() {
 		_G(det)->set_static_ani(0, -1);
 
 		for (int i = 0; i < 3; ++i) {
-			_G(det)->show_static_spr(2 + i);
+			_G(det)->showStaticSpr(2 + i);
 			_G(atds)->del_steuer_bit(460 + i, ATS_AKTIV_BIT, ATS_DATEI);
 		}
 	}
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index f1eb5e92b2f..5522f039ba0 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -62,16 +62,16 @@ void Room80::entry() {
 	_G(zoom_horizont) = 0;
 
 	if (_G(spieler).r88DestRoom == 84)
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 	else
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 
 	_G(SetUpScreenFunc) = setup_func;
 }
 
 void Room80::setup_func() {
 	for (int i = 0; i < 3; ++i)
-		_G(det)->hide_static_spr(i);
+		_G(det)->hideStaticSpr(i);
 
 	if (_G(spieler).flags32_1 || !_G(flags).ShowAtsInvTxt || _G(menu_display))
 		return;
@@ -88,7 +88,7 @@ void Room80::setup_func() {
 			return;
 	}
 
-	_G(det)->show_static_spr(vec);
+	_G(det)->showStaticSpr(vec);
 	if (!_G(maus_links_click))
 		return;
 
@@ -115,7 +115,7 @@ void Room80::setup_func() {
 		return;
 
 	_G(SetUpScreenFunc) = nullptr;
-	_G(det)->hide_static_spr(vec);
+	_G(det)->hideStaticSpr(vec);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 	_G(spieler).flags30_1 = true;
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index d7b0867a300..2db16d4f1d3 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -38,7 +38,7 @@ void Room81::entry() {
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).DiaAMov = 0;
 	if (_G(spieler).r88DestRoom == 84) {
-		_G(det)->show_static_spr(0);
+		_G(det)->showStaticSpr(0);
 		_G(atds)->del_steuer_bit(488, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index b1e70db2a20..408eec0974f 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -39,13 +39,13 @@ void Room82::entry() {
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
 
 	if (_G(spieler).R88UsedMonkey) {
-		_G(det)->show_static_spr(6);
+		_G(det)->showStaticSpr(6);
 		_G(atds)->set_steuer_bit(473, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_steuer_bit(467, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
 	if (_G(spieler).flags37_20)
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 
 	if (_G(flags).LoadGame) {
 		_G(SetUpScreenFunc) = setup_func;
@@ -201,7 +201,7 @@ int Room82::proc6() {
 		_G(atds)->enableEvents(false);
 		start_aad_wait(598, -1);
 		_G(atds)->enableEvents(true);
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		_G(fx_blend) = BLEND3;
 		set_up_screen(DO_SETUP);
 		Room66::proc8(2, 7, 7, 451);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 5366b2a79d0..6df5c585a3f 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -59,7 +59,7 @@ void Room84::entry() {
 	}
 
 	if (_G(spieler).r88DestRoom == 84) {
-		_G(det)->show_static_spr(7);
+		_G(det)->showStaticSpr(7);
 		_G(atds)->del_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->del_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
 	}
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index ce9e7cb1e23..0284a01d595 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -49,7 +49,7 @@ void Room85::entry(int16 eib_nr) {
 	_G(zoom_mov_fak) = 1;
 
 	if (_G(spieler).flags32_10) {
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 		_G(atds)->del_steuer_bit(495, ATS_AKTIV_BIT, ATS_DATEI);
 	}
 
@@ -81,15 +81,15 @@ void Room85::entry(int16 eib_nr) {
 		_G(spieler).scrollx = 0;
 		set_person_pos(133, 152, P_CHEWY, P_RIGHT);
 		_G(spieler).room_e_obj[127].Attribut = 255;
-		_G(det)->show_static_spr(5);
-		_G(det)->show_static_spr(6);
+		_G(det)->showStaticSpr(5);
+		_G(det)->showStaticSpr(6);
 		start_aad_wait(474, -1);
 		flic_cut(FCUT_090);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_091);
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 		_G(spieler).scrollx = 25;
 		_G(fx_blend) = BLEND3;
 		start_aad_wait(475, -1);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index c483c551b51..8d24e47fd45 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -42,8 +42,8 @@ void Room86::entry(int16 eib_nr) {
 	_G(spieler).DiaAMov = 0;
 	if (_G(spieler).flags32_2) {
 		_G(det)->start_detail(0, 255, false);
-		_G(det)->set_static_pos(0, 352, 107, false, false);
-		_G(det)->show_static_spr(0);
+		_G(det)->setStaticPos(0, 352, 107, false, false);
+		_G(det)->showStaticSpr(0);
 	}
 
 	if (_G(flags).LoadGame)
@@ -77,8 +77,8 @@ void Room86::entry(int16 eib_nr) {
 		_G(flags).NoScroll = false;
 		_G(spieler_mi)[P_CHEWY].Vorschub = 8;
 		_G(det)->stop_detail(0);
-		_G(det)->show_static_spr(4);
-		_G(det)->show_static_spr(5);
+		_G(det)->showStaticSpr(4);
+		_G(det)->showStaticSpr(5);
 		invent_2_slot(94);
 		autoMove(4, P_CHEWY);
 		_G(flags).NoScroll = true;
@@ -180,8 +180,8 @@ void Room86::proc3(bool cond) {
 	if (_G(flags).NoScroll)
 		auto_scroll(196, 0);
 
-	_G(det)->set_static_pos(0, 352, destY, false, false);
-	_G(det)->show_static_spr(0);
+	_G(det)->setStaticPos(0, 352, destY, false, false);
+	_G(det)->showStaticSpr(0);
 	g_engine->_sound->playSound(0, 1);
 	g_engine->_sound->playSound(0, 2);
 	g_engine->_sound->playSound(0, 1, false);
@@ -189,7 +189,7 @@ void Room86::proc3(bool cond) {
 
 	for (int i = 0; i < 48; ++i) {
 		set_up_screen(NO_SETUP);
-		_G(det)->set_static_pos(0, 352, destY, false, false);
+		_G(det)->setStaticPos(0, 352, destY, false, false);
 		destY += deltaY;
 		_G(out)->setPointer(nullptr);
 		_G(out)->back2screen(_G(workpage));
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 1c606c8978c..e63cfe44a29 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -39,10 +39,10 @@ void Room87::entry() {
 	_G(spieler).ZoomXy[P_NICHELLE][1] = 28;
 	_G(zoom_horizont) = 176;
 	if (_G(spieler).flags32_4)
-		_G(det)->show_static_spr(3);
+		_G(det)->showStaticSpr(3);
 
 	if (_G(spieler).flags32_8)
-		_G(det)->show_static_spr(4);
+		_G(det)->showStaticSpr(4);
 
 	if (_G(flags).LoadGame)
 		return;
@@ -135,7 +135,7 @@ int Room87::proc2(int16 txt_nr) {
 		del_inventar(_G(spieler).AkInvent);
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(atds)->set_ats_str(txt_nr, 1, ATS_DATEI);
-		_G(det)->show_static_spr(movNr);
+		_G(det)->showStaticSpr(movNr);
 		if (_G(spieler).flags32_4 && _G(spieler).flags32_8)
 			_G(atds)->del_steuer_bit(502, ATS_AKTIV_BIT, ATS_DATEI);
 	}
@@ -159,7 +159,7 @@ int Room87::proc4() {
 	start_aad(472);
 	flic_cut(FCUT_095);
 	flic_cut(FCUT_096);
-	_G(det)->hide_static_spr(2);
+	_G(det)->hideStaticSpr(2);
 	_G(det)->start_detail(2, 255, false);
 	start_aad_wait(471, -1);
 	flic_cut(FCUT_097);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 31e9d5d3862..c24509ac49a 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -34,7 +34,7 @@ void Room88::entry() {
 	set_person_pos(59, 107, P_HOWARD, P_RIGHT);
 	set_person_pos(91, 110, P_NICHELLE, P_RIGHT);
 	
-	_G(det)->show_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
+	_G(det)->showStaticSpr(1 + (_G(spieler).flags30_10 ? 1 : 0));
 	if (_G(spieler).r88DestRoom == 0)
 		_G(spieler).r88DestRoom = 82;
 
@@ -75,13 +75,13 @@ int Room88::proc2() {
 	hideCur();
 	autoMove(1, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(det)->show_static_spr(0);
+	_G(det)->showStaticSpr(0);
 	start_detail_wait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_FRONT);
-	_G(det)->hide_static_spr(1 + (_G(spieler).flags30_10 ? 1 : 0));
+	_G(det)->hideStaticSpr(1 + (_G(spieler).flags30_10 ? 1 : 0));
 	_G(spieler).flags31_10 = false;
-	_G(det)->show_static_spr(1 + (!_G(spieler).flags30_10 ? 1 : 0));
+	_G(det)->showStaticSpr(1 + (!_G(spieler).flags30_10 ? 1 : 0));
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(det)->hide_static_spr(0);
+	_G(det)->hideStaticSpr(0);
 	
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 3430f5d2f97..04b0272ec7d 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -36,9 +36,9 @@ void Room89::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(timer_nr)[0] = _G(room)->set_timer(2, 10);
 	if (_G(spieler).flags33_4) {
-		_G(det)->show_static_spr(5);
+		_G(det)->showStaticSpr(5);
 		if (!_G(spieler).flags32_80)
-			_G(det)->show_static_spr(6);
+			_G(det)->showStaticSpr(6);
 	}
 
 	if (_G(flags).LoadGame) {
@@ -202,13 +202,13 @@ int Room89::proc4() {
 	if (_G(spieler).flags33_4) {
 		_G(atds)->set_ats_str(514, 2, ATS_DATEI);
 		_G(spieler).flags32_80 = true;
-		_G(det)->hide_static_spr(6);
+		_G(det)->hideStaticSpr(6);
 		new_invent_2_cur(111);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(491, -1);
 	} else {
-		_G(det)->show_static_spr(5);
-		_G(det)->show_static_spr(6);
+		_G(det)->showStaticSpr(5);
+		_G(det)->showStaticSpr(6);
 		_G(spieler).flags33_4 = true;
 		_G(atds)->set_ats_str(514, 1, ATS_DATEI);
 	}
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 2feaeb63c96..4a2cc486fa4 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -72,8 +72,8 @@ void Room90::entry(int16 eib_nr) {
 	}
 
 	if (_G(spieler).flags33_40 && !_G(spieler).flags34_10) {
-		_G(det)->show_static_spr(4);
-		_G(det)->show_static_spr(5);
+		_G(det)->showStaticSpr(4);
+		_G(det)->showStaticSpr(5);
 	}
 
 	if (!_G(spieler).flags33_10) {
@@ -298,8 +298,8 @@ int Room90::shootControlUnit() {
 	_G(spieler).scrollx = 0;
 	set_person_pos(76, 145, P_CHEWY, P_LEFT);
 	_G(maus_links_click) = false;
-	_G(det)->show_static_spr(4);
-	_G(det)->show_static_spr(5);
+	_G(det)->showStaticSpr(4);
+	_G(det)->showStaticSpr(5);
 	set_up_screen(NO_SETUP);
 	_G(fx_blend) = BLEND3;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
@@ -335,8 +335,8 @@ int Room90::useSurimyOnWreck() {
 	flic_cut(FCUT_109);
 	register_cutscene(29);
 
-	_G(det)->hide_static_spr(4);
-	_G(det)->hide_static_spr(5);
+	_G(det)->hideStaticSpr(4);
+	_G(det)->hideStaticSpr(5);
 	_G(spieler).scrollx = 176;
 	start_spz(45, 255, false, P_CHEWY);
 	start_aad_wait(519, -1);
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index b9ce2f08c6a..bb5fff0bf80 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -145,10 +145,10 @@ int Room94::giveGhostBottle() {
 	_G(det)->start_detail(5, 255, false);
 	start_aad_wait(541, -1);
 	_G(det)->stop_detail(5);
-	_G(det)->show_static_spr(5);
+	_G(det)->showStaticSpr(5);
 	Room66::proc8(3, 3, 2, 617);
 	hideCur();
-	_G(det)->hide_static_spr(5);
+	_G(det)->hideStaticSpr(5);
 	_G(det)->start_detail(5, 255, false);
 	start_aad_wait(622, -1);
 	_G(det)->stop_detail(5);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 42c110aba1c..39de4dd09d3 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -39,7 +39,7 @@ void Room95::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (_G(spieler).flags35_20)
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 
 	if (_G(flags).LoadGame)
 		return;
@@ -95,7 +95,7 @@ int Room95::proc2() {
 
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(spieler).flags35_20 = true;
-		_G(det)->show_static_spr(10);
+		_G(det)->showStaticSpr(10);
 
 		showCur();
 		return 1;
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 21fddbb676b..4327f965a50 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -54,14 +54,14 @@ void Room97::entry() {
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 97;
 	_G(zoom_mov_fak) = 0;
 	_G(spieler).ScrollxStep = 2;
-	_G(det)->hide_static_spr(14);
+	_G(det)->hideStaticSpr(14);
 
 	if (_G(spieler).flags36_2) {
-		_G(det)->hide_static_spr(14);
-		_G(det)->hide_static_spr(18);
+		_G(det)->hideStaticSpr(14);
+		_G(det)->hideStaticSpr(18);
 
 		if (!_G(spieler).flags36_4)
-			_G(det)->show_static_spr(17);
+			_G(det)->showStaticSpr(17);
 	}
 	
 	if (_G(spieler).flags36_10) {
@@ -73,7 +73,7 @@ void Room97::entry() {
 
 	if (_G(spieler).flags36_40) {
 		_G(det)->start_detail(14, 255, ANI_FRONT);
-		_G(det)->show_static_spr(13);
+		_G(det)->showStaticSpr(13);
 		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
 	} else {
 		_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
@@ -91,10 +91,10 @@ void Room97::entry() {
 	}
 
 	if (_G(spieler).flags37_1)
-		_G(det)->show_static_spr(19);
+		_G(det)->showStaticSpr(19);
 
 	if (_G(spieler).flags37_4)
-		_G(det)->show_static_spr(20);
+		_G(det)->showStaticSpr(20);
 
 	_word18DB2E = 0;
 	_word18DB34 = 332;
@@ -190,11 +190,11 @@ void Room97::setup_func() {
 				_word18DB38 -= 2;
 		}
 
-		_G(det)->set_static_pos(16, 699, _word18DB38, false, false);
+		_G(det)->setStaticPos(16, 699, _word18DB38, false, false);
 		if (_G(spieler).flags36_10) {
 			_G(det)->set_detail_pos(12, _word18DB34, _word18DB36);
 		} else {
-			_G(det)->set_static_pos(14, _word18DB34, _word18DB36, false, false);
+			_G(det)->setStaticPos(14, _word18DB34, _word18DB36, false, false);
 		}
 	}
 
@@ -340,14 +340,14 @@ void Room97::proc4() {
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->stopSound(1);
 		start_detail_wait(9, 1, ANI_FRONT);
-		_G(det)->show_static_spr(21);
+		_G(det)->showStaticSpr(21);
 
 		while (_G(spieler_vector)[P_HOWARD].Xypos[0] > 996) {
 			set_up_screen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
-		_G(det)->show_static_spr(2);
+		_G(det)->showStaticSpr(2);
 		_G(HowardMov) = 1;
 		
 		goAutoXy(967, 111, P_CHEWY, ANI_WAIT);
@@ -358,7 +358,7 @@ void Room97::proc4() {
 		goAutoXy(1047, 87, P_HOWARD, ANI_WAIT);
 
 		start_detail_wait(29, 1, ANI_FRONT);
-		_G(det)->hide_static_spr(21);
+		_G(det)->hideStaticSpr(21);
 		g_engine->_sound->playSound(9, 1);
 		g_engine->_sound->stopSound(0);
 		start_detail_wait(9, 0, ANI_BACK);
@@ -366,7 +366,7 @@ void Room97::proc4() {
 		goAutoXy(1008, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(967, 111, P_CHEWY, ANI_WAIT);
 		goAutoXy(995, 82, P_HOWARD, ANI_WAIT);
-		_G(det)->hide_static_spr(2);
+		_G(det)->hideStaticSpr(2);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
 		start_aad_wait(553, -1);
@@ -399,10 +399,10 @@ int Room97::proc5() {
 	set_person_pos(822, 98, P_CHEWY, P_LEFT);
 	set_person_pos(861, 81, P_HOWARD, P_LEFT);
 	del_inventar(_G(spieler).AkInvent);
-	_G(det)->show_static_spr(21);
+	_G(det)->showStaticSpr(21);
 	_G(spieler).flags35_80 = true;
 	start_aad_wait(546, -1);
-	_G(det)->hide_static_spr(21);
+	_G(det)->hideStaticSpr(21);
 	g_engine->_sound->playSound(9, 1);
 	g_engine->_sound->stopSound(0);
 	start_detail_wait(9, 0, ANI_GO);
@@ -421,18 +421,18 @@ int Room97::proc6() {
 	goAutoXy(298, 120, P_CHEWY, ANI_WAIT);
 	set_person_spr(P_LEFT, P_CHEWY);
 	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-	_G(det)->hide_static_spr(15);
+	_G(det)->hideStaticSpr(15);
 	start_detail_wait(1, 1, ANI_FRONT);
-	_G(det)->show_static_spr(28);
+	_G(det)->showStaticSpr(28);
 	autoMove(1, P_CHEWY);
-	_G(det)->hide_static_spr(18);
+	_G(det)->hideStaticSpr(18);
 	start_detail_wait(15, 1, ANI_FRONT);
-	_G(det)->show_static_spr(17);
+	_G(det)->showStaticSpr(17);
 	start_spz(CH_TALK5, 255, false, P_CHEWY);
 	start_aad_wait(558, -1);
-	_G(det)->hide_static_spr(28);
+	_G(det)->hideStaticSpr(28);
 	_G(det)->stop_detail(5);
-	_G(det)->show_static_spr(15);
+	_G(det)->showStaticSpr(15);
 	_G(spieler).flags36_2 = true;
 	_G(atds)->del_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_steuer_bit(531, ATS_AKTIV_BIT, ATS_DATEI);
@@ -453,7 +453,7 @@ int Room97::proc7() {
 	autoMove(2, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->hide_static_spr(17);
+	_G(det)->hideStaticSpr(17);
 	start_detail_wait(22, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(atds)->set_ats_str(530, 2, ATS_DATEI);
@@ -490,7 +490,7 @@ int Room97::proc8() {
 		_G(atds)->del_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_ats_str(532, 1, ATS_DATEI);
 		_G(det)->start_detail(6, 255, false);
-		_G(det)->hide_static_spr(14);
+		_G(det)->hideStaticSpr(14);
 		autoMove(3, P_CHEWY);
 		auto_scroll(406, 0);
 		wait_show_screen(40);
@@ -539,7 +539,7 @@ int Room97::proc9() {
 	} else {
 		start_spz_wait(13, 1, false, P_CHEWY);
 		start_detail_wait(0, 1, ANI_FRONT);
-		_G(det)->show_static_spr(13);
+		_G(det)->showStaticSpr(13);
 		start_detail_wait(13, 1, ANI_FRONT);
 		_G(det)->start_detail(14, 255, false);
 		start_aad_wait(555, -1);
@@ -564,7 +564,7 @@ int Room97::proc10() {
 	g_engine->_sound->playSound(7, 0);
 	g_engine->_sound->stopSound(1);
 	start_detail_wait(7, 1, ANI_FRONT);
-	_G(det)->show_static_spr(19);
+	_G(det)->showStaticSpr(19);
 	_G(spieler).flags37_1 = true;
 	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
 	_G(menu_item) = CUR_WALK;
@@ -622,14 +622,14 @@ void Room97::proc12() {
 	_G(flags).AutoAniPlay = true;
 	hideCur();
 	stop_person(P_CHEWY);
-	_G(det)->show_static_spr(26);
+	_G(det)->showStaticSpr(26);
 	goAutoXy(481, 39, P_CHEWY, ANI_WAIT);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(327, 42, P_CHEWY, P_LEFT);
 	wait_show_screen(50);
 	set_person_pos(347, 42, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(det)->hide_static_spr(26);
+	_G(det)->hideStaticSpr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
 	_G(flags).AutoAniPlay = false;
@@ -643,14 +643,14 @@ void Room97::proc13() {
 	hideCur();
 	stop_person(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	_G(det)->show_static_spr(26);
+	_G(det)->showStaticSpr(26);
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	set_person_pos(508, 41, P_CHEWY, P_LEFT);
 	wait_show_screen(50);
 	set_person_pos(488, 41, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	autoMove(6, P_CHEWY);
-	_G(det)->hide_static_spr(26);
+	_G(det)->hideStaticSpr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
 	_G(flags).AutoAniPlay = false;
@@ -704,17 +704,17 @@ void Room97::sensorAnim() {
 	} else {
 		_G(spieler).flags37_4 = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(det)->show_static_spr(27);
+		_G(det)->showStaticSpr(27);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(21, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(det)->hide_static_spr(27);
+		_G(det)->hideStaticSpr(27);
 		start_detail_wait(18, 1, ANI_FRONT);
 
 		g_engine->_sound->playSound(8, 0);
 		g_engine->_sound->stopSound(1);
 		start_detail_wait(8, 1, ANI_FRONT);
-		_G(det)->show_static_spr(20);
+		_G(det)->showStaticSpr(20);
 		autoMove(10, P_CHEWY);
 		auto_scroll(60, 0);
 		start_aad_wait(544, -1);
@@ -731,10 +731,10 @@ void Room97::sensorAnim() {
 			SHOULD_QUIT_RETURN;
 		}
 
-		_G(det)->show_static_spr(26);
+		_G(det)->showStaticSpr(26);
 		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
 		goAutoXy(477, 29, P_NICHELLE, ANI_WAIT);
-		_G(det)->hide_static_spr(26);
+		_G(det)->hideStaticSpr(26);
 		_G(spieler).flags37_2 = true;
 	}
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 25abd1be201..d2f1dc958fc 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -165,9 +165,9 @@ void sprite_engine() {
 					                _G(scr_width));
 				} else {
 					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[P_CHEWY].PhNr];
-					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->korrektur[spr_nr * 2] -
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->_correction[spr_nr * 2] -
 					    _G(spieler).scrollx;
-					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->korrektur[spr_nr * 2 + 1] -
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->_correction[spr_nr * 2 + 1] -
 					    _G(spieler).scrolly;
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1],
 					          (int16)_G(room)->_roomInfo->ZoomFak,
@@ -194,8 +194,8 @@ void sprite_engine() {
 					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[p_nr].PhNr];
 				}
 
-				x = _G(spieler_mi)[p_nr].XyzStart[0] + ts_info->korrektur[spr_nr * 2] - _G(spieler).scrollx;
-				y = _G(spieler_mi)[p_nr].XyzStart[1] + ts_info->korrektur[spr_nr * 2 + 1] - _G(spieler).scrolly;
+				x = _G(spieler_mi)[p_nr].XyzStart[0] + ts_info->_correction[spr_nr * 2] - _G(spieler).scrollx;
+				y = _G(spieler_mi)[p_nr].XyzStart[1] + ts_info->_correction[spr_nr * 2 + 1] - _G(spieler).scrolly;
 				calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1], _G(spieler).ZoomXy[p_nr][0],_G(spieler).ZoomXy[p_nr][1], &_G(spieler_vector)[p_nr]);
 				_G(out)->scale_set(ts_info->image[spr_nr], x, y, _G(spieler_vector)[p_nr].Xzoom, _G(spieler_vector)[p_nr].Yzoom, _G(scr_width));
 			}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 30cbd6228e8..f236b334011 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -285,7 +285,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 165:
 						if (_G(spieler).R16F5Exit) {
 							invent_2_slot(29);
-							_G(det)->hide_static_spr(19);
+							_G(det)->hideStaticSpr(19);
 							_G(atds)->set_steuer_bit(158, ATS_AKTIV_BIT, ATS_DATEI);
 						}
 						switch_room(18);
@@ -2153,8 +2153,8 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	if (altes_format) {
 		_G(det)->start_detail(_G(talk_start_ani), 255, ANI_FRONT);
 		_G(det)->stop_detail(talk_stop_ani);
-		_G(det)->hide_static_spr(_G(talk_hide_static));
-		_G(det)->show_static_spr(talk_show_static);
+		_G(det)->hideStaticSpr(_G(talk_hide_static));
+		_G(det)->showStaticSpr(talk_show_static);
 	} else {
 		_G(det)->start_detail(talk_ani, 255, ANI_FRONT);
 		_G(det)->stop_detail(stop_ani);


Commit: c7284144a8e738c8e63f1c0a738adfdf6466af91
    https://github.com/scummvm/scummvm/commit/c7284144a8e738c8e63f1c0a738adfdf6466af91
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: Remove flic_cut switch cases that were unused

Double-checked in the disassembly of the release game,
and confirmed they weren't used

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 3cc1974d714..c5c01d4ee27 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1019,36 +1019,6 @@ void flic_cut(int16 nr) {
 			_G(currentSong) = -1;
 			break;
 
-		case FCUT_068:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_flic_user_function(Room51::cut_serv);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_flic_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-
-		case FCUT_069:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_flic_user_function(Room54::cut_serv);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_flic_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-
-		case FCUT_070:
-#ifndef NEW_VIDEO_CODE
-			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
-			_G(flc)->set_flic_user_function(Room55::cut_serv);
-			_G(flc)->custom_play(&_G(Ci));
-			_G(flc)->remove_flic_user_function();
-#else
-			g_engine->_video->playVideo(nr);
-#endif
-
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;


Commit: 3073043a0d10d24e11b077bac75ba26bba359d29
    https://github.com/scummvm/scummvm/commit/3073043a0d10d24e11b077bac75ba26bba359d29
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: Fix compiler warnings

Changed paths:
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index c42b8db9b4a..e84856be483 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -46,8 +46,8 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 		return false;
 	}
 
-	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
-	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
+//	uint16 x = (g_system->getWidth() - cfoDecoder->getWidth()) / 2;
+//	uint16 y = (g_system->getHeight() - cfoDecoder->getHeight()) / 2;
 	bool skipVideo = false;
 	byte curPalette[256 * 3];
 	uint32 curFrame = 0;
@@ -68,7 +68,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 		if (cfoDecoder->needsUpdate()) {
 			const ::Graphics::Surface *frame = cfoDecoder->decodeNextFrame();
 			if (frame) {
-				byte *srcP = (byte *)frame->getPixels();
+				const byte *srcP = (const byte *)frame->getPixels();
 				byte *destP = (byte *)g_screen->getPixels();
 				Common::copy(srcP, srcP + (SCREEN_WIDTH * SCREEN_HEIGHT), destP);
 				g_screen->markAllDirty();


Commit: e919953073ea39bff7fbb6278e952065b1bf9cef
    https://github.com/scummvm/scummvm/commit/e919953073ea39bff7fbb6278e952065b1bf9cef
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:47-08:00

Commit Message:
CHEWY: renaming, add some missing breaks in flic_cut

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index b4c9af5a40e..fbd8df7a215 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -27,19 +27,19 @@
 
 namespace Chewy {
 
-bool RaumInfo::load(Common::SeekableReadStream *src) {
-	RoomNr = src->readByte();
+bool RoomInfo::load(Common::SeekableReadStream *src) {
+	_roomNr = src->readByte();
 	BildNr = src->readByte();
 	AutoMovAnz = src->readByte();
 	TafLoad = src->readByte();
 	src->read(TafName, 14);
-	ZoomFak = src->readByte();
+	_zoomFactor = src->readByte();
 	Dummy = src->readByte();
 
 	return true;
 }
 
-bool RaumAutoMov::load(Common::SeekableReadStream *src) {
+bool RoomAutoMov::load(Common::SeekableReadStream *src) {
 	X = src->readSint16LE();
 	Y = src->readSint16LE();
 	SprNr = src->readByte();
@@ -170,8 +170,8 @@ void Detail::load_rdi(const char *fname_, int16 room_nr) {
 	TafInfo *tmprdi = _rdi.dptr;
 
 	if (fname_ && f.open(fname_)) {
-		if (_rdi_datei_header.load(&f)) {
-			if (!scumm_strnicmp(_rdi_datei_header.Id, "RDI", 3)) {
+		if (_rdiDataHeader.load(&f)) {
+			if (!scumm_strnicmp(_rdiDataHeader.Id, "RDI", 3)) {
 				f.seek(room_nr * RoomDetailInfo::SIZE(), SEEK_CUR);
 
 				if (!_rdi.load(&f)) {
@@ -284,15 +284,15 @@ void Detail::del_taf_tbl(int16 start, int16 anz, TafInfo *Tt) {
 	}
 }
 
-void Detail::load_taf_seq(int16 spr_nr, int16 spr_anz, TafInfo *Tt) {
+void Detail::load_taf_seq(int16 sprNr, int16 sprCount, TafInfo *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
 
 	SpriteResource *res = new SpriteResource(_tafName);
 
-	for (int16 i = 0; i < spr_anz; i++) {
-		if (!Tt->image[spr_nr + i]) {
-			res->getSpriteData(spr_nr + i, &Tt->image[spr_nr + i], true);
+	for (int16 i = 0; i < sprCount; i++) {
+		if (!Tt->image[sprNr + i]) {
+			res->getSpriteData(sprNr + i, &Tt->image[sprNr + i], true);
 		}
 	}
 
@@ -315,7 +315,7 @@ void Detail::showStaticSpr(int16 nr) {
 
 byte *Detail::getStaticImage(int16 detNr) {
 	byte *ret = nullptr;
-	int16 index = _rdi.Sinfo[detNr].SprNr;
+	const int16 index = _rdi.Sinfo[detNr].SprNr;
 	if (index != -1)
 		ret = _rdi.dptr->image[index];
 	return ret;
@@ -323,7 +323,7 @@ byte *Detail::getStaticImage(int16 detNr) {
 
 void Detail::setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag) {
 	if (correctionFlag) {
-		int16 *Cxy = _rdi.dptr->_correction + (_rdi.Sinfo[detNr].SprNr << 1);
+		int16 *Cxy = &_rdi.dptr->_correction[_rdi.Sinfo[detNr].SprNr];
 		x += Cxy[0];
 		y += Cxy[1];
 	}
@@ -332,35 +332,35 @@ void Detail::setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool corre
 	_rdi.Sinfo[detNr].Hide = hideFl;
 }
 
-void Detail::set_detail_pos(int16 det_nr, int16 x, int16 y) {
-	_rdi.Ainfo[det_nr].x = x;
-	_rdi.Ainfo[det_nr].y = y;
+void Detail::setSetailPos(int16 detNr, int16 x, int16 y) {
+	_rdi.Ainfo[detNr].x = x;
+	_rdi.Ainfo[detNr].y = y;
 }
 
-void Detail::get_ani_werte(int16 ani_nr, int16 *start, int16 *end) {
-	*start = _rdi.Ainfo[ani_nr].start_ani;
-	*end = _rdi.Ainfo[ani_nr].end_ani;
+void Detail::getAniValues(int16 aniNr, int16 *start, int16 *end) {
+	*start = _rdi.Ainfo[aniNr].start_ani;
+	*end = _rdi.Ainfo[aniNr].end_ani;
 }
 
-void Detail::set_ani(int16 ani_nr, int16 start, int16 end) {
+void Detail::setAni(int16 aniNr, int16 start, int16 end) {
 	if (start > end)
 		SWAP(start, end);
 
-	_rdi.Ainfo[ani_nr].start_ani = start;
-	_rdi.Ainfo[ani_nr].end_ani = end;
+	_rdi.Ainfo[aniNr].start_ani = start;
+	_rdi.Ainfo[aniNr].end_ani = end;
 }
 
-byte *Detail::get_image(int16 spr_nr) {
-	byte *ret = _rdi.dptr->image[spr_nr];
+byte *Detail::getImage(int16 sprNr) {
+	byte *ret = _rdi.dptr->image[sprNr];
 	return ret;
 }
 
-AniDetailInfo *Detail::get_ani_detail(int16 ani_nr) {
-	AniDetailInfo *ret = &_rdi.Ainfo[ani_nr];
+AniDetailInfo *Detail::getAniDetail(int16 aniNr) {
+	AniDetailInfo *ret = &_rdi.Ainfo[aniNr];
 	return ret;
 }
 
-int16 *Detail::get_korrektur_tbl() {
+int16 *Detail::getCorrectionArray() {
 	int16 *ret = _rdi.dptr->_correction;
 	return ret;
 }
@@ -374,11 +374,11 @@ TafInfo *Detail::get_taf_info() {
 	return ret;
 }
 
-RoomDetailInfo *Detail::get_room_detail_info() {
+RoomDetailInfo *Detail::getRoomDetailInfo() {
 	return &_rdi;
 }
 
-void Detail::freeze_ani() {
+void Detail::freezeAni() {
 	_aniFreezeflag = true;
 }
 
@@ -656,7 +656,7 @@ void Detail::clear_detail_sound(int16 nr) {
 		sdb->repeats[i] = 0;
 		sdb->stereo[i] = 0;
 	}
-	remove_unused_samples();
+	removeUnusedSamples();
 }
 
 void Detail::disable_room_sound() {
@@ -689,7 +689,7 @@ void Detail::clear_room_sound() {
 	}
 }
 
-void Detail::remove_unused_samples() {
+void Detail::removeUnusedSamples() {
 	for (int16 k = 0; k < MAXDETAILS * MAX_SOUNDS; k++) {
 		if (_rdi.tvp_index[k] != -1) {
 			bool found = false;
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index ab478c16dc1..91dc765b543 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -34,13 +34,13 @@ namespace Chewy {
 
 #define MAX_AUTO_MOV 20
 
-struct RaumInfo {
-	uint8 RoomNr;
+struct RoomInfo {
+	uint8 _roomNr;
 	uint8 BildNr;
 	uint8 AutoMovAnz;
 	uint8 TafLoad;
 	char TafName[14];
-	uint8 ZoomFak;
+	uint8 _zoomFactor;
 	uint8 Dummy;
 
 	bool load(Common::SeekableReadStream *src);
@@ -49,7 +49,7 @@ struct RaumInfo {
 	}
 };
 
-struct RaumAutoMov {
+struct RoomAutoMov {
 	int16 X;
 	int16 Y;
 	uint8 SprNr;
@@ -138,8 +138,8 @@ struct RoomDetailInfo {
 	StaticDetailInfo Sinfo[MAXDETAILS];
 	int16 mvect[MAX_M_ITEMS * 4] = { 0 };
 	int16 mtxt[MAX_M_ITEMS] = { 0 };
-	RaumInfo Ri;
-	RaumAutoMov AutoMov[MAX_AUTO_MOV];
+	RoomInfo Ri;
+	RoomAutoMov AutoMov[MAX_AUTO_MOV];
 	int16 tvp_index[MAXDETAILS * MAX_SOUNDS] = { 0 };
 	byte *sample[MAXDETAILS * MAX_SOUNDS] = { 0 };
 
@@ -150,8 +150,8 @@ struct RoomDetailInfo {
 			(StaticDetailInfo::SIZE() * MAXDETAILS) +
 			(2 * MAX_M_ITEMS * 4) +
 			(2 * MAX_M_ITEMS) +
-			RaumInfo::SIZE() +
-			(RaumAutoMov::SIZE() * MAX_AUTO_MOV) +
+			RoomInfo::SIZE() +
+			(RoomAutoMov::SIZE() * MAX_AUTO_MOV) +
 			(2 * MAXDETAILS * MAX_SOUNDS) +
 			(4 * MAXDETAILS * MAX_SOUNDS);
 	}
@@ -197,19 +197,19 @@ public:
 	byte *getStaticImage(int16 detNr);
 
 	void setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag);
-	void set_detail_pos(int16 det_nr, int16 x, int16 y);
+	void setSetailPos(int16 detNr, int16 x, int16 y);
 	void hideStaticSpr(int16 nr);
 	void showStaticSpr(int16 nr);
-	void freeze_ani();
+	void freezeAni();
 	void unfreeze_ani();
-	void get_ani_werte(int16 ani_nr, int16 *start, int16 *end);
-	void set_ani(int16 ani_nr, int16 start, int16 end);
-	byte *get_image(int16 spr_nr);
-	AniDetailInfo *get_ani_detail(int16 ani_nr);
-	int16 *get_korrektur_tbl();
+	void getAniValues(int16 aniNr, int16 *start, int16 *end);
+	void setAni(int16 aniNr, int16 start, int16 end);
+	byte *getImage(int16 sprNr);
+	AniDetailInfo *getAniDetail(int16 aniNr);
+	int16 *getCorrectionArray();
 	void init_taf(TafInfo *dptr);
 	TafInfo *get_taf_info();
-	RoomDetailInfo *get_room_detail_info();
+	RoomDetailInfo *getRoomDetailInfo();
 
 	void set_static_ani(int16 ani_nr, int16 static_nr);
 
@@ -236,7 +236,7 @@ public:
 
 	void del_taf_tbl(int16 start, int16 anz, TafInfo *Tt);
 
-	void load_taf_seq(int16 spr_nr, int16 spr_anz, TafInfo *Tt);
+	void load_taf_seq(int16 sprNr, int16 sprCount, TafInfo *Tt);
 	void load_taf_tbl(TafInfo *fti);
 
 	void del_dptr();
@@ -259,14 +259,14 @@ public:
 private:
 	void load_taf_ani_sprite(int16 nr);
 
-	void remove_unused_samples();
+	void removeUnusedSamples();
 	RoomDetailInfo _rdi;
-	RdiDateiHeader _rdi_datei_header;
+	RdiDateiHeader _rdiDataHeader;
 	SprInfo _sprInfo;
 
 	int16 _globalDelay = 0;
-	int16 _aniFreezeflag = 0;
-	int16 _fullTaf = 0;
+	bool _aniFreezeflag = false;
+	bool _fullTaf = false;
 	char _tafName[80];
 	byte *_tafLoadBuffer = nullptr;
 	int16 _directTafAni = 0;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 63075f31efe..0b5f57eaa29 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -484,7 +484,7 @@ void wait_show_screen(int16 frames);
 
 void zoom_mov_anpass(ObjMov *om, MovInfo *mi);
 
-void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y,
+void calc_zoom(int16 y, int16 zoomFactorX, int16 zoomFactorY,
                ObjMov *om);
 
 void load_chewy_taf(int16 taf_nr);
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index b053e759473..42e464a784c 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -108,7 +108,7 @@ void standard_init() {
 }
 
 void var_init() {
-	_G(Rdi) = _G(det)->get_room_detail_info();
+	_G(Rdi) = _G(det)->getRoomDetailInfo();
 	_G(Sdi) = &_G(Rdi)->Sinfo[0];
 	_G(Adi) = &_G(Rdi)->Ainfo[0];
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 4690a0c22be..3b3c450622e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -241,7 +241,7 @@ void showCur() {
 }
 
 void menuEntry() {
-	_G(det)->freeze_ani();
+	_G(det)->freezeAni();
 	_G(uhr)->set_all_status(TIMER_FREEZE);
 }
 
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index 15efd8537ca..f9b9c0852e9 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -344,7 +344,7 @@ void Object::calc_static_detail(int16 det_nr) {
 
 						if (nr >= 40) {
 							n = nr - 40;
-							AniDetailInfo *adi = _G(det)->get_ani_detail(n);
+							AniDetailInfo *adi = _G(det)->getAniDetail(n);
 							if (adi->repeat)
 								_G(det)->start_detail(n, 0, ANI_FRONT);
 							else
@@ -356,7 +356,7 @@ void Object::calc_static_detail(int16 det_nr) {
 				}
 			} else if (nr >= 40) {
 				n = nr - 40;
-				AniDetailInfo *adi = _G(det)->get_ani_detail(n);
+				AniDetailInfo *adi = _G(det)->getAniDetail(n);
 				if (adi->repeat)
 					_G(det)->start_detail(n, 0, ANI_FRONT);
 				else
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c5c01d4ee27..4c1dc20dbdb 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -322,8 +322,8 @@ void enter_room(int16 eib_nr) {
 
 	_G(flags).ZoomMov = false;
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)_G(room)->_roomInfo->ZoomFak;
-	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)_G(room)->_roomInfo->ZoomFak;
+	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)_G(room)->_roomInfo->_zoomFactor;
+	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)_G(room)->_roomInfo->_zoomFactor;
 
 	_G(uhr)->reset_timer(0, 0);
 	_G(flags).AutoAniPlay = false;
@@ -1034,7 +1034,7 @@ void flic_cut(int16 nr) {
 #else
 			g_engine->_video->playVideo(nr);
 #endif
-
+			break;
 		case FCUT_083:
 		case 1083:
 			for (i = 0; i < 2 && ret != -1; ++i) {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 27ff479d654..62d681038df 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -179,7 +179,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 
 	if (player->SoundSwitch == false)
 		_G(det)->disable_room_sound();
-	RoomDetailInfo *Rdi_ = _G(det)->get_room_detail_info();
+	RoomDetailInfo *Rdi_ = _G(det)->getRoomDetailInfo();
 	_roomInfo = &Rdi_->Ri;
 	if (_roomInfo->TafLoad != 255) {
 		char tmp_str[MAXPATH];
@@ -199,10 +199,10 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	add_timer_new_room();
 
 	if (Rb->AtsLoad)
-		_G(atds)->load_atds(_roomInfo->RoomNr, ATS_DATEI);
+		_G(atds)->load_atds(_roomInfo->_roomNr, ATS_DATEI);
 
 	if (Rb->AadLoad)
-		_G(atds)->load_atds(_roomInfo->RoomNr, AAD_DATEI);
+		_G(atds)->load_atds(_roomInfo->_roomNr, AAD_DATEI);
 }
 
 void Room::set_timer_start(int16 timer_start) {
@@ -213,7 +213,7 @@ void Room::add_timer_new_room() {
 	_roomTimer.TimerAnz = 0;
 
 	for (int i = 0; i < MAXDETAILS && _roomTimer.TimerAnz < MAX_ROOM_TIMER; i++) {
-		AniDetailInfo *adi = _G(det)->get_ani_detail(i);
+		AniDetailInfo *adi = _G(det)->getAniDetail(i);
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
@@ -253,7 +253,7 @@ void Room::set_timer_status(int16 ani_nr, int16 status) {
 }
 
 void Room::set_zoom(int16 zoom) {
-	_roomInfo->ZoomFak = (uint8)zoom;
+	_roomInfo->_zoomFactor = (uint8)zoom;
 }
 
 void Room::set_pal(const byte *src_pal, byte *dest_pal) {
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 40b0c1060e4..8b95fdd4d42 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -101,7 +101,7 @@ public:
 	void calc_invent(RaumBlk *Rb, Spieler *player);
 
 	RaumTimer _roomTimer;
-	RaumInfo *_roomInfo;
+	RoomInfo *_roomInfo;
 	GedChunkHeader _gedInfo[MAX_ABLAGE];
 	int16 _gedXAnz[MAX_ABLAGE];
 	int16 _gedYAnz[MAX_ABLAGE];
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 7875aa216d4..8d147c1e1a7 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -191,7 +191,7 @@ void Room0::eyeAnim() {
 }
 
 void Room0::eyeStart(EyeMode mode) {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->getAniDetail(SCHLAUCH_DETAIL);
 	if (mode == EYE_START)
 		adi->ani_count = adi->start_ani;
 	else
@@ -265,7 +265,7 @@ void Room0::eyeStart(EyeMode mode) {
 }
 
 void Room0::eyeWait() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->getAniDetail(SCHLAUCH_DETAIL);
 	adi->ani_count = 39;
 	adi->delay_count = 15;
 	_G(flags).AniUserAction = true;
@@ -325,7 +325,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 }
 
 void Room0::eyeShoot() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->getAniDetail(SCHLAUCH_DETAIL);
 	adi->ani_count = 47;
 
 	bool ende = false;
@@ -376,7 +376,7 @@ void Room0::eyeShoot() {
 }
 
 void Room0::eyeSlimeBack() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(SCHLAUCH_DETAIL);
+	AniDetailInfo *adi = _G(det)->getAniDetail(SCHLAUCH_DETAIL);
 	adi->ani_count = 53;
 
 	bool ende = false;
@@ -416,7 +416,7 @@ void Room0::eyeSlimeBack() {
 }
 
 void Room0::checkSlimeEye() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(CH_WIRFT_SCHLEIM);
+	AniDetailInfo *adi = _G(det)->getAniDetail(CH_WIRFT_SCHLEIM);
 	adi->ani_count = adi->start_ani;
 	if (adi->load_flag) {
 		_G(det)->load_taf_seq(adi->start_ani, (adi->end_ani - adi->start_ani) + 1, nullptr);
@@ -452,7 +452,7 @@ void Room0::checkSlimeEye() {
 }
 
 void Room0::feederStart(int16 mode) {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->getAniDetail(FUETTER_SCHLAUCH);
 	if (!mode)
 		adi->ani_count = adi->start_ani;
 	else
@@ -563,7 +563,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 }
 
 void Room0::checkFeed() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->getAniDetail(FUETTER_SCHLAUCH);
 	adi->ani_count = 136;
 
 	int16 i = 152;
@@ -657,7 +657,7 @@ void Room0::checkFeed() {
 }
 
 void Room0::checkPillow() {
-	AniDetailInfo *adi = _G(det)->get_ani_detail(FUETTER_SCHLAUCH);
+	AniDetailInfo *adi = _G(det)->getAniDetail(FUETTER_SCHLAUCH);
 	adi->ani_count = 161;
 
 	bool ende = false;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 5878f42c781..423a316478f 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -182,7 +182,7 @@ void Room3::sonde_knarre() {
 		{ {  13,  45,  75 }, 1, 3 }
 	};
 	hideCur();
-	RoomDetailInfo *rdi = _G(det)->get_room_detail_info();
+	RoomDetailInfo *rdi = _G(det)->getRoomDetailInfo();
 
 	_G(det)->load_taf_seq(162, 17, nullptr);
 	int16 tmp = _G(zoom_horizont);
@@ -294,7 +294,7 @@ void Room3::probeTransfer() {
 
 	_G(flags).AniUserAction = false;
 	hideCur();
-	_G(det)->get_room_detail_info();
+	_G(det)->getRoomDetailInfo();
 	int16 tmp = _G(zoom_horizont);
 	_G(zoom_horizont) = 100;
 	int16 anistart = false;
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 0f0d28bafc1..97195ec4bf1 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -118,7 +118,7 @@ void Room12::init_bork() {
 			_G(mov_phasen)[R12_BORK_OBJ].AtsText = 120;
 			_G(mov_phasen)[R12_BORK_OBJ].Lines = 5;
 			_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
-			_G(mov_phasen)[R12_BORK_OBJ].ZoomFak = (int16)_G(room)->_roomInfo->ZoomFak + 20;
+			_G(mov_phasen)[R12_BORK_OBJ].ZoomFak = (int16)_G(room)->_roomInfo->_zoomFactor + 20;
 			_G(auto_mov_obj)[R12_BORK_OBJ].Id = AUTO_OBJ0;
 			_G(auto_mov_vector)[R12_BORK_OBJ].Delay = _G(spieler).DelaySpeed;
 			_G(auto_mov_obj)[R12_BORK_OBJ].Mode = true;
@@ -169,7 +169,7 @@ void Room12::bork_ok() {
 	wait_auto_obj(R12_BORK_OBJ);
 
 	_G(spieler).R12BorkInRohr = true;
-	_G(det)->set_detail_pos(3, 170, 145);
+	_G(det)->setSetailPos(3, 170, 145);
 	_G(det)->start_detail(3, 255, ANI_FRONT);
 	start_aad_wait(57, -1);
 	_G(det)->stop_detail(3);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index e49d1e4f623..3c92adc2599 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -102,7 +102,7 @@ void Room13::talk_bork() {
 		_G(spieler).R13BorkOk = true;
 		_G(spieler).R12ChewyBork = false;
 		_G(det)->showStaticSpr(13);
-		_G(det)->set_detail_pos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
+		_G(det)->setSetailPos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		_G(det)->setStaticPos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad_wait(33, -1);
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 0b781a69fba..70e6eb851eb 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -262,8 +262,8 @@ int16 Room18::calc_surimy() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		wait_auto_obj(SURIMY_OBJ);
 
-		_G(det)->set_detail_pos(21, 392, 170);
-		_G(det)->set_detail_pos(22, 447, 154);
+		_G(det)->setSetailPos(21, 392, 170);
+		_G(det)->setSetailPos(22, 447, 154);
 		start_detail_frame(21, 1, ANI_FRONT, 14);
 		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
@@ -288,8 +288,8 @@ int16 Room18::calc_surimy() {
 		auto_scroll(70, 0);
 		wait_auto_obj(SURIMY_OBJ);
 
-		_G(det)->set_detail_pos(21, 143, 170);
-		_G(det)->set_detail_pos(22, 198, 154);
+		_G(det)->setSetailPos(21, 143, 170);
+		_G(det)->setSetailPos(22, 198, 154);
 		start_detail_frame(21, 1, ANI_FRONT, 14);
 		_G(det)->start_detail(22, 1, ANI_FRONT);
 		wait_detail(21);
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index aad43d15cdf..87d524ab863 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -194,7 +194,7 @@ void Room21::chewy_kolli() {
 		_G(flags).AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
-		_G(det)->set_detail_pos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
+		_G(det)->setSetailPos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		start_detail_wait(ani_nr, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
@@ -212,7 +212,7 @@ void Room21::salto() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
 		for (int16 i = 0; i < 3; i++) {
-			_G(det)->set_detail_pos(12 + i, _G(spieler_vector)[P_CHEWY].Xypos[0],
+			_G(det)->setSetailPos(12 + i, _G(spieler_vector)[P_CHEWY].Xypos[0],
 				_G(spieler_vector)[P_CHEWY].Xypos[1]);
 		}
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 16ef52d5e89..9d6566d5c07 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -248,7 +248,7 @@ void Room28::set_pump() {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
 			del_inventar(K_MASKE_INV);
-			_G(det)->set_detail_pos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
+			_G(det)->setSetailPos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 
 			if (_G(spieler).R28PumpTxt1 < 3) {
 				start_aad(137);
@@ -295,7 +295,7 @@ void Room28::get_pump() {
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
-		_G(det)->set_detail_pos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
+		_G(det)->setSetailPos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		start_detail_wait(tmp, 1, ANI_BACK);
 
 		invent_2_slot(K_MASKE_INV);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 81c68301719..ee82f8a01f0 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -181,7 +181,7 @@ void Room40::move_train(int16 mode) {
 	int16 delay = 0;
 
 	while (ax < 560) {
-		_G(det)->set_detail_pos(7, lx, 46);
+		_G(det)->setSetailPos(7, lx, 46);
 		_G(det)->setStaticPos(11, ax, 62, false, false);
 
 		if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index f863a64b356..8c27352793a 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -119,7 +119,7 @@ void Room45::setup_func() {
 							_G(det)->stop_detail(3 + i);
 						}
 					}
-					_G(det)->set_detail_pos(3 + i, x, y);
+					_G(det)->setSetailPos(3 + i, x, y);
 				} else {
 					++_G(r45_pinfo)[i][2];
 
@@ -132,7 +132,7 @@ void Room45::setup_func() {
 						} else {
 							x = 0;
 						}
-						_G(det)->set_detail_pos(3 + i, x, y);
+						_G(det)->setSetailPos(3 + i, x, y);
 						_G(det)->start_detail(3 + i, 255, ANI_FRONT);
 					}
 				}
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 5d5f3ce2a50..2527577c1ec 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -175,7 +175,7 @@ void Room49::use_boy_cigar() {
 	_G(SetUpScreenFunc) = nullptr;
 	autoMove(5, P_CHEWY);
 
-	const int16 zoom = _G(room)->_roomInfo->ZoomFak;
+	const int16 zoom = _G(room)->_roomInfo->_zoomFactor;
 	_G(room)->set_zoom(zoom);
 	goAutoXy(416, 79, P_HOWARD, ANI_WAIT);
 	set_person_spr(P_LEFT, P_HOWARD);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index e8f27afc7da..6a0857bc9a3 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -145,7 +145,7 @@ void Room51::setup_func() {
 
 		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
-			_G(det)->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
+			_G(det)->setSetailPos(8, _tmpx - 20, _tmpy + 41);
 			start_detail_wait(8, 1, ANI_FRONT);
 			_flag = false;
 			++_index;
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 78ca014ff0c..7af8113ac85 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -61,7 +61,7 @@ int16 Room64::cut_sev(int16 frame) {
 	const int16 x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
 	const int16 y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
-	calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak, (int16)_G(room)->_roomInfo->ZoomFak, &_G(spieler_vector)[P_CHEWY]);
+	calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor, (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
 	_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
 	return 0;
 }
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index ae78a265f3e..7ace3d82744 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -49,7 +49,7 @@ void Room78::entry() {
 
 		int destX = 592;
 		while (destX > 0) {
-			_G(det)->set_detail_pos(3, destX, 77);
+			_G(det)->setSetailPos(3, destX, 77);
 			if (delay)
 				--delay;
 			else {
@@ -71,8 +71,8 @@ void Room78::entry() {
 		bool flag2 = false;
 
 		while (exitLoopFlag == 0) {
-			_G(det)->set_detail_pos(0, det0DestX, 93);
-			_G(det)->set_detail_pos(4, det4DestX, 57);
+			_G(det)->setSetailPos(0, det0DestX, 93);
+			_G(det)->setSetailPos(4, det4DestX, 57);
 			
 			if (delay)
 				--delay;
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 4a2cc486fa4..a3e3883f864 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -65,7 +65,7 @@ void Room90::entry(int16 eib_nr) {
 	_G(HowardMov) = 1;
 
 	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
-		_G(det)->set_detail_pos(12, 329, 15);
+		_G(det)->setSetailPos(12, 329, 15);
 		_G(det)->start_detail(12, 255, false);
 		g_engine->_sound->playSound(12, 0);
 		g_engine->_sound->playSound(12);
@@ -137,7 +137,7 @@ void Room90::setup_func() {
 						_G(det)->stop_detail(i + 4);
 					}
 				}
-				_G(det)->set_detail_pos(i + 4, destX, destY);
+				_G(det)->setSetailPos(i + 4, destX, destY);
 			} else {
 				++_G(spieler).r90_Array187030[i][2];
 				if (_G(spieler).r90_Array187030[i][2] < _G(spieler).r90_Array187030[i][3])
@@ -150,7 +150,7 @@ void Room90::setup_func() {
 				else
 					destX = 500;
 
-				_G(det)->set_detail_pos(i + 4, destX, _G(Adi)[i + 4].y);
+				_G(det)->setSetailPos(i + 4, destX, _G(Adi)[i + 4].y);
 				
 				if (!_G(spieler).flags34_40)
 					_G(det)->start_detail(i + 4, 255, false);
@@ -256,7 +256,7 @@ int Room90::getHubcaps() {
 	_G(spieler).flags35_1 = true;
 	autoMove(4, P_CHEWY);
 	auto_scroll(176, 0);
-	_G(det)->set_detail_pos(12, 495, 15);
+	_G(det)->setSetailPos(12, 495, 15);
 	_G(det)->start_detail(12, 255, false);
 	g_engine->_sound->playSound(12, 0);
 	g_engine->_sound->playSound(12);
@@ -265,7 +265,7 @@ int Room90::getHubcaps() {
 
 	while (destX > 329) {
 		destX -= 2;
-		_G(det)->set_detail_pos(12, destX, 15);
+		_G(det)->setSetailPos(12, destX, 15);
 		set_up_screen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 4327f965a50..dba34410999 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -80,7 +80,7 @@ void Room97::entry() {
 	}
 
 	if (_G(spieler).flags36_20) {
-		_G(det)->set_detail_pos(27, 272, 110);
+		_G(det)->setSetailPos(27, 272, 110);
 		for (int i = 0; i < 2; ++i) {
 			_G(det)->stop_detail(23 + i);
 			_G(det)->start_detail(27 + i, 255, ANI_FRONT);
@@ -192,7 +192,7 @@ void Room97::setup_func() {
 
 		_G(det)->setStaticPos(16, 699, _word18DB38, false, false);
 		if (_G(spieler).flags36_10) {
-			_G(det)->set_detail_pos(12, _word18DB34, _word18DB36);
+			_G(det)->setSetailPos(12, _word18DB34, _word18DB36);
 		} else {
 			_G(det)->setStaticPos(14, _word18DB34, _word18DB36, false, false);
 		}
@@ -511,7 +511,7 @@ int Room97::proc8() {
 		_G(det)->stop_detail(27);
 		_G(spieler).flags36_20 = true;
 		_G(det)->start_detail(28, 255, false);
-		_G(det)->set_detail_pos(27, 272, 110);
+		_G(det)->setSetailPos(27, 272, 110);
 		_G(det)->start_detail(27, 255, false);
 		_G(atds)->set_steuer_bit(533, ATS_AKTIV_BIT, ATS_DATEI);
 		_G(atds)->set_steuer_bit(534, ATS_AKTIV_BIT, ATS_DATEI);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index d2f1dc958fc..d801dfb9df5 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -131,7 +131,7 @@ void sprite_engine() {
 			if (_G(Adi)[nr].zoom) {
 
 				y = _G(Adi)[nr].y;
-				calc_zoom(y, (int16)_G(room)->_roomInfo->ZoomFak, (int16)_G(room)->_roomInfo->ZoomFak, &detmov);
+				calc_zoom(y, (int16)_G(room)->_roomInfo->_zoomFactor, (int16)_G(room)->_roomInfo->_zoomFactor, &detmov);
 			} else {
 				detmov.Xzoom = 0;
 				detmov.Yzoom = 0;
@@ -156,8 +156,8 @@ void sprite_engine() {
 					spr_nr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
 					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
 					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
-					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->ZoomFak,
-					          (int16)_G(room)->_roomInfo->ZoomFak, &_G(spieler_vector)[P_CHEWY]);
+					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor,
+					          (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
 
 					_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
@@ -170,8 +170,8 @@ void sprite_engine() {
 					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->_correction[spr_nr * 2 + 1] -
 					    _G(spieler).scrolly;
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1],
-					          (int16)_G(room)->_roomInfo->ZoomFak,
-					          (int16)_G(room)->_roomInfo->ZoomFak,
+					          (int16)_G(room)->_roomInfo->_zoomFactor,
+					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          &_G(spieler_vector)[P_CHEWY]);
 
 					_G(out)->scale_set(_G(spz_tinfo)->image[spr_nr], x, y,
@@ -405,7 +405,7 @@ void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
 	_G(tmp_maus_links) = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(det)->start_detail(ani_nr, rep, mode);
-	AniDetailInfo *adi = _G(det)->get_ani_detail(ani_nr);
+	AniDetailInfo *adi = _G(det)->getAniDetail(ani_nr);
 	if (mode == ANI_FRONT)
 		frame = adi->ani_count + frame;
 	else
@@ -694,18 +694,18 @@ int16 auto_obj_status(int16 nr) {
 	return status;
 }
 
-void calc_zoom(int16 y, int16 zoomfak_x, int16 zoomfak_y, ObjMov *om) {
-	float zoom_fak_x = (float)zoomfak_x / (float)100.0;
-	zoom_fak_x = -zoom_fak_x;
-	float zoom_fak_y = (float)zoomfak_y / (float)100.0;
-	zoom_fak_y = -zoom_fak_y;
+void calc_zoom(int16 y, int16 zoomFactorX, int16 zoomFactorY, ObjMov *om) {
+	float factorX = (float)zoomFactorX / (float)100.0;
+	factorX = -factorX;
+	float factorY = (float)zoomFactorY / (float)100.0;
+	factorY = -factorY;
 	if (!_G(zoom_horizont)) {
-		om->Xzoom = -zoomfak_x;
-		om->Yzoom = -zoomfak_y;
+		om->Xzoom = -zoomFactorX;
+		om->Yzoom = -zoomFactorY;
 	} else {
 		if (y < _G(zoom_horizont)) {
-			om->Xzoom = (_G(zoom_horizont) - y) * zoom_fak_x;
-			om->Yzoom = (_G(zoom_horizont) - y) * zoom_fak_y;
+			om->Xzoom = (_G(zoom_horizont) - y) * factorX;
+			om->Yzoom = (_G(zoom_horizont) - y) * factorY;
 		} else {
 			om->Xzoom = 0;
 			om->Yzoom = 0;


Commit: ef70d3ef5652ab073264ccbe4febc78ba5f827bd
    https://github.com/scummvm/scummvm/commit/ef70d3ef5652ab073264ccbe4febc78ba5f827bd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:48-08:00

Commit Message:
CHEWY: more renaming

Changed paths:
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/text.cpp
    engines/chewy/text.h
    engines/chewy/timer.cpp
    engines/chewy/timer.h


diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index b14605ad678..09ae2ca03b4 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -203,7 +203,7 @@ void Cinema::execute() {
 	_G(room)->open_handle(EPISODE1, 0);
 	_G(room)->set_ak_pal(&_G(room_blk));
 	hideCur();
-	_G(uhr)->reset_timer(0, 5);
+	_G(uhr)->resetTimer(0, 5);
 }
 
 int16 Cinema::cut_serv(int16 frame) {
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 9ce69b4c322..3080cb6cccf 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -266,7 +266,7 @@ void Credits::execute() {
 
 	_G(room)->set_ak_pal(&_G(room_blk));
 	hideCur();
-	_G(uhr)->reset_timer(0, 5);
+	_G(uhr)->resetTimer(0, 5);
 }
 
 } // namespace Dialogs
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index f9f86619268..21820138703 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -526,7 +526,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		int16 k = 0;
 		for (int16 i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
 			_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
-				_G(scr_width), _G(txt)->str_pos(txt_adr, i));
+				_G(scr_width), _G(txt)->strPos(txt_adr, i));
 			++k;
 		}
 
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 5710aac2b07..433fb234bc9 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -141,8 +141,8 @@ void MainMenu::screenFunc() {
 }
 
 void MainMenu::animate() {
-	if (_G(ani_timer)->TimeFlag) {
-		_G(uhr)->reset_timer(0, 0);
+	if (_G(ani_timer)->_timeFlag) {
+		_G(uhr)->resetTimer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		_G(spieler_vector)->Delay = _G(spieler).DelaySpeed + _G(spz_delay)[0];
 		_G(FrameSpeed) = 0;
@@ -266,7 +266,7 @@ void MainMenu::playGame() {
 	_G(flags).ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
 	_G(spieler_vector)[P_CHEWY].Count = 0;
-	_G(uhr)->reset_timer(0, 0);
+	_G(uhr)->resetTimer(0, 0);
 	_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
 
 	while (!SHOULD_QUIT && !mainLoop(1)) {
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 42e464a784c..a21972959b7 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -100,7 +100,7 @@ void standard_init() {
 	_G(pal)[767] = 63;
 	_G(out)->einblenden(_G(pal), 0);
 	_G(out)->cls();
-	_G(uhr)->set_new_timer(0, 5, SEC_10_MODE);
+	_G(uhr)->setNewTimer(0, 5, SEC_10_MODE);
 
 	_G(curblk).cur_back = _G(cur_back);
 	sound_init();
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 3b3c450622e..eb9f392232e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -242,13 +242,13 @@ void showCur() {
 
 void menuEntry() {
 	_G(det)->freezeAni();
-	_G(uhr)->set_all_status(TIMER_FREEZE);
+	_G(uhr)->setAllStatus(TIMER_FREEZE);
 }
 
 void menuExit() {
 	_G(det)->unfreeze_ani();
-	_G(uhr)->set_all_status(TIMER_UNFREEZE);
-	_G(uhr)->reset_timer(0, 0);
+	_G(uhr)->setAllStatus(TIMER_UNFREEZE);
+	_G(uhr)->resetTimer(0, 0);
 	_G(FrameSpeed) = 0;
 }
 
@@ -497,10 +497,10 @@ void set_up_screen(SetupScreenMode mode) {
 	if (isMainLoop)
 		mode = DO_SETUP;
 
-	_G(uhr)->calc_timer();
+	_G(uhr)->calcTimer();
 
-	if (_G(ani_timer)[0].TimeFlag) {
-		_G(uhr)->reset_timer(0, 0);
+	if (_G(ani_timer)[0]._timeFlag) {
+		_G(uhr)->resetTimer(0, 0);
 		_G(spieler).DelaySpeed = _G(FrameSpeed) / _G(spieler).FramesPerSecond;
 		_G(spieler_vector)[P_CHEWY].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[P_CHEWY];
 		_G(FrameSpeed) = 0;
@@ -704,7 +704,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_adr, anz);
 				for (int16 i = 0; i < anz; i++)
-					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos(str_adr, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos(str_adr, i));
 			}
 		}
 	}
@@ -1441,7 +1441,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 						_G(fontMgr)->setFont(_G(font8));
 						calc_txt_xy(&x, &y, str_, anz);
 						for (int16 i = 0; i < anz; i++)
-							printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+							printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 					}
 				}
 			} else {
@@ -1618,7 +1618,7 @@ int16 calc_mouse_mov_obj(int16 *auto_nr) {
 void calc_ani_timer() {
 	for (int16 i = _G(room)->_roomTimer.TimerStart;
 	     i < _G(room)->_roomTimer.TimerStart + _G(room)->_roomTimer.TimerAnz; i++) {
-		if (_G(ani_timer)[i].TimeFlag)
+		if (_G(ani_timer)[i]._timeFlag)
 			timer_action(i);
 	}
 }
@@ -1869,12 +1869,12 @@ void auto_scroll(int16 scrx, int16 scry) {
 }
 
 void disable_timer() {
-	_G(uhr)->disable_timer();
+	_G(uhr)->disableTimer();
 	_G(FrameSpeedTmp) = _G(FrameSpeed);
 }
 
 void enable_timer() {
-	_G(uhr)->enable_timer();
+	_G(uhr)->enableTimer();
 	_G(FrameSpeed) = _G(FrameSpeedTmp);
 }
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 130ba6c3973..674b3add13f 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -96,7 +96,7 @@ void maus_mov_menu() {
 void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
 	int16 len = 0;
 	for (int16 i = 0; i < txt_anz; i++) {
-		int16 tmp_len = strlen(_G(txt)->str_pos((char *)txt_adr, i));
+		int16 tmp_len = strlen(_G(txt)->strPos((char *)txt_adr, i));
 		if (tmp_len > len)
 			len = tmp_len;
 	}
@@ -209,7 +209,7 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 
 	int16 x_pix = 0;
 	for (int16 i = 0; i < zeilen_anz; i++) {
-		tmp = strlen(_G(txt)->str_pos(text, i));
+		tmp = strlen(_G(txt)->strPos(text, i));
 		if (x_pix < tmp)
 			x_pix = tmp;
 	}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 4c1dc20dbdb..232954bde58 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -126,7 +126,7 @@ void timer_action(int16 t_nr) {
 
 	if (default_flag && _G(flags).AutoAniPlay == false) {
 		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
-		_G(uhr)->reset_timer(t_nr, 0);
+		_G(uhr)->resetTimer(t_nr, 0);
 	}
 
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
@@ -325,7 +325,7 @@ void enter_room(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_CHEWY][0] = (int16)_G(room)->_roomInfo->_zoomFactor;
 	_G(spieler).ZoomXy[P_CHEWY][1] = (int16)_G(room)->_roomInfo->_zoomFactor;
 
-	_G(uhr)->reset_timer(0, 0);
+	_G(uhr)->resetTimer(0, 0);
 	_G(flags).AutoAniPlay = false;
 	_G(SetUpScreenFunc) = nullptr;
 	_G(HowardMov) = 0;
@@ -782,7 +782,7 @@ void print_rows(int16 id) {
 	_G(out)->setPointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
-		char *s = _G(txt)->str_pos(txtStr, i);
+		char *s = _G(txt)->strPos(txtStr, i);
 		int16 len = (strlen(s) * _G(fontMgr)->getFont()->getDataWidth()) / 2;
 
 		_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, s);
@@ -1144,7 +1144,7 @@ void flic_cut(int16 nr) {
 		if (_G(spieler).SpeechSwitch)
 			_G(det)->enable_room_sound();
 
-		_G(uhr)->reset_timer(0, 0);
+		_G(uhr)->resetTimer(0, 0);
 	}
 
 	if (!_G(flags).NoPalAfterFlc)
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 62d681038df..5b53ca051ff 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -224,7 +224,7 @@ void Room::add_timer_new_room() {
 
 void Room::del_timer_old_room() {
 	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
-		_G(uhr)->set_status(_roomTimer.TimerNr[i], TIMER_STOP);
+		_G(uhr)->setStatus(_roomTimer.TimerNr[i], TIMER_STOP);
 
 	}
 
@@ -234,7 +234,7 @@ void Room::del_timer_old_room() {
 int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 
 	int16 timer_nr_ = _roomTimer.TimerStart + _roomTimer.TimerAnz;
-	int16 ret = _G(uhr)->set_new_timer(timer_nr_, timer_end, SEC_MODE);
+	int16 ret = _G(uhr)->setNewTimer(timer_nr_, timer_end, SEC_MODE);
 	if (ret != -1) {
 		_roomTimer.ObjNr[_roomTimer.TimerAnz] = ani_nr;
 		_roomTimer.TimerNr[_roomTimer.TimerAnz] = timer_nr_;
@@ -247,7 +247,7 @@ int16 Room::set_timer(int16 ani_nr, int16 timer_end) {
 void Room::set_timer_status(int16 ani_nr, int16 status) {
 	for (int i = 0; i < _roomTimer.TimerAnz; i++) {
 		if (_roomTimer.ObjNr[i] == ani_nr) {
-			_G(uhr)->set_status(_roomTimer.TimerNr[i], status);
+			_G(uhr)->setStatus(_roomTimer.TimerNr[i], status);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 8d147c1e1a7..38ed4e2418b 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -59,7 +59,7 @@ void Room0::entry() {
 		hideCur();
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 3);
 
-		while (!_G(ani_timer)[_G(timer_nr)[0]].TimeFlag && !SHOULD_QUIT) {
+		while (!_G(ani_timer)[_G(timer_nr)[0]]._timeFlag && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
 
@@ -74,7 +74,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 	bool retval = false;
 	if (ani_nr == 1) {
 		if (_G(timer_action_ctr) > 0) {
-			_G(uhr)->reset_timer(t_nr, 0);
+			_G(uhr)->resetTimer(t_nr, 0);
 			--_G(timer_action_ctr);
 		} else if (!is_chewy_busy()) {
 			if (!_G(spieler).R0FueterLab)
@@ -113,7 +113,7 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			if (!_G(spieler).R0PillowThrow)
 				feederAni();
 
-			_G(uhr)->reset_timer(t_nr, 0);
+			_G(uhr)->resetTimer(t_nr, 0);
 			_G(flags).AutoAniPlay = false;
 		}
 	} else if (t_nr == 3)
@@ -311,7 +311,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
-					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
@@ -549,7 +549,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				int16 y = _G(minfo).y;
 				calc_txt_xy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
-					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->str_pos((char *)str_, i));
+					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
 		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index e0f06e04544..440ad8dfec2 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -97,7 +97,7 @@ void Room11::bork_zwinkert() {
 		_G(flags).AutoAniPlay = true;
 		_G(det)->hideStaticSpr(8);
 		start_ani_block(2, ABLOCK18);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		_G(det)->showStaticSpr(8);
 		_G(flags).AutoAniPlay = false;
 	}
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 97195ec4bf1..206579245dd 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -132,7 +132,7 @@ void Room12::init_bork() {
 
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
-					_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+					_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 					wait_show_screen(10);
 					start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 					start_aad_wait(14, -1);
@@ -145,7 +145,7 @@ void Room12::init_bork() {
 			}
 		}
 
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 	}
 }
 
@@ -224,7 +224,7 @@ int16 Room12::use_terminal() {
 
 			} else {
 				_G(spieler).R12TransOn = true;
-				_G(uhr)->reset_timer(_G(timer_nr)[1], 0);
+				_G(uhr)->resetTimer(_G(timer_nr)[1], 0);
 			}
 		} else {
 			start_aad(114, 0);
@@ -237,7 +237,7 @@ int16 Room12::use_terminal() {
 void Room12::use_linke_rohr() {
 	_G(spieler).R12TalismanOk = false;
 	_G(spieler).R12KetteLinks = true;
-	_G(uhr)->disable_timer();
+	_G(uhr)->disableTimer();
 	_G(obj)->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 	_G(obj)->calc_all_static_detail();
@@ -270,7 +270,7 @@ int16 Room12::useTransformerTube() {
 
 		if (_G(spieler).R12KetteLinks) {
 			_G(spieler).R12KetteLinks = false;
-			_G(uhr)->enable_timer();
+			_G(uhr)->enableTimer();
 			_G(atds)->set_ats_str(117, 1, AAD_DATEI);
 		} else {
 			autoMove(7, P_CHEWY);
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 67c6d61aac0..9c34d907f31 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -62,7 +62,7 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 		_G(flags).AutoAniPlay = true;
 		_G(det)->hideStaticSpr(9);
 		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
-		_G(uhr)->reset_timer(t_nr, 0);
+		_G(uhr)->resetTimer(t_nr, 0);
 		_G(det)->showStaticSpr(9);
 		_G(det)->start_detail(7, 1, ANI_FRONT);
 		_G(flags).AutoAniPlay = false;
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 789f9071e89..bf73825686d 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -111,7 +111,7 @@ bool Room17::timer(int16 t_nr, int16 ani_nr) {
 	if (_G(room)->_roomTimer.ObjNr[ani_nr] == 2 ||
 		_G(room)->_roomTimer.ObjNr[ani_nr] == 3) {
 		if (_G(spieler).R17EnergieOut)
-			_G(uhr)->reset_timer(t_nr, 0);
+			_G(uhr)->resetTimer(t_nr, 0);
 		else
 			return true;
 	}
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 70e6eb851eb..5239be70b1b 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -131,7 +131,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 			_G(det)->hideStaticSpr(16);
 			start_detail_wait(10, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(16);
-			_G(uhr)->reset_timer(_G(timer_nr)[0], 10);
+			_G(uhr)->resetTimer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
 			hideCur();
 			_G(det)->hideStaticSpr(17);
@@ -152,7 +152,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 			}
 
 			showCur();
-			_G(uhr)->reset_timer(_G(timer_nr)[1], 15);
+			_G(uhr)->resetTimer(_G(timer_nr)[1], 15);
 		}
 
 		_G(flags).AutoAniPlay = false;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 87d524ab863..83943c2ab36 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -142,7 +142,7 @@ void Room21::init_spinne() {
 void Room21::restart_spinne2() {
 	_G(mov_phasen)[SPINNE2_OBJ].Repeat = 1;
 	init_auto_obj(SPINNE2_OBJ, &SPINNE_PHASEN[0][0], _G(mov_phasen)[SPINNE2_OBJ].Lines, (const MovLine *)SPINNE_MPKT1);
-	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+	_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 	_G(e_streifen) = false;
 }
 
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 23591b6b6be..10e3e450ee8 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -131,7 +131,7 @@ void Room22::bork(int16 t_nr) {
 			showCur();
 		}
 
-		_G(uhr)->reset_timer(t_nr, 0);
+		_G(uhr)->resetTimer(t_nr, 0);
 		_G(flags).AutoAniPlay = false;
 	}
 }
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index ee82f8a01f0..7d9dddca13c 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -114,12 +114,12 @@ void Room40::xit(int16 eib_nr) {
 				_G(spieler).room_e_obj[72].Exit = 45;
 				_G(obj)->hide_sib(SIB_MUENZE_R40);
 
-				_G(uhr)->disable_timer();
+				_G(uhr)->disableTimer();
 				_G(out)->ausblenden(0);
 				hide_person();
 				set_up_screen(DO_SETUP);
 				_G(out)->einblenden(_G(pal), 0);
-				_G(uhr)->enable_timer();
+				_G(uhr)->enableTimer();
 
 				_G(maus_links_click) = false;
 				start_aad_wait(238, -1);
@@ -243,7 +243,7 @@ void Room40::setup_func() {
 			_G(spieler).R40PoliceStart = false;
 			_G(spieler).R40PoliceAniStatus = POLICE_LEFT;
 			_G(room)->set_timer_status(255, TIMER_STOP);
-			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 			_G(det)->hideStaticSpr(15);
 			_G(det)->start_detail(POLICE_LEFT, 1, ANI_FRONT);
 			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
@@ -270,7 +270,7 @@ void Room40::setup_func() {
 				_G(det)->showStaticSpr(15);
 				_G(spieler).R40PoliceAniStatus = 255;
 				_G(room)->set_timer_status(255, TIMER_START);
-				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+				_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 				_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
 			}
 			break;
@@ -404,7 +404,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		start_detail_wait(13, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(15);
 		_G(room)->set_timer_status(255, TIMER_START);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
 	}
 
@@ -419,7 +419,7 @@ void Room40::talk_police() {
 		autoMove(7, P_CHEWY);
 		start_aad_wait(203, -1);
 		_G(room)->set_timer_status(255, TIMER_START);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
 	}
 }
@@ -650,7 +650,7 @@ int16 Room40::use_tele() {
 
 			_G(spieler).R40PoliceAb = false;
 			_G(room)->set_timer_status(255, TIMER_START);
-			_G(uhr)->reset_timer(_G(timer_nr)[0], timer_wert);
+			_G(uhr)->resetTimer(_G(timer_nr)[0], timer_wert);
 		}
 
 		if (dia_nr1 != 223)
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 8ad4060d654..e7e9924748e 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -79,7 +79,7 @@ void Room48::frage() {
 		_G(det)->showStaticSpr(6);
 		start_detail_wait(1, 1, ANI_BACK);
 		_G(det)->hideStaticSpr(6);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
 		_G(flags).AutoAniPlay = false;
 	}
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 2527577c1ec..586c5252e1c 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -109,14 +109,14 @@ void Room49::calc_boy_ani() {
 
 	_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 	_G(det)->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_FRONT);
-	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+	_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 }
 
 void Room49::calc_boy() {
 	if (!_G(spieler).R49WegFrei) {
 		hideCur();
 		_G(room)->set_timer_status(255, TIMER_STOP);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		stop_person(P_CHEWY);
 		stop_person(P_HOWARD);
 		_G(person_end_phase)[P_CHEWY] = P_LEFT;
@@ -186,7 +186,7 @@ void Room49::use_boy_cigar() {
 	register_cutscene(17);
 	
 	_G(room)->set_timer_status(255, TIMER_STOP);
-	_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+	_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 	_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 	_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
@@ -214,7 +214,7 @@ void Room49::talk_boy() {
 void Room49::talk_boy(int16 aad_nr) {
 	if (!_G(spieler).R49BoyWeg) {
 		_G(room)->set_timer_status(255, TIMER_STOP);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 6a0857bc9a3..1f91a3010be 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -359,7 +359,7 @@ void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 		} else if (!_G(det)->get_ani_status(obj_nr)) {
 			_G(det)->start_detail(obj_nr, 1, ANI_GO);
 			_G(det)->start_detail(obj_nr + 2, 1, ANI_FRONT);
-			_G(uhr)->reset_timer(t_nr, 0);
+			_G(uhr)->resetTimer(t_nr, 0);
 			_enemyFlag[obj_nr - 9] = false;
 		}
 	}
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 24f01ae6983..9852dfabf84 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -394,7 +394,7 @@ void Room56::setup_func() {
 			if (_G(det)->get_ani_status(10) == false) {
 				_G(r56koch_flug) = 0;
 
-				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+				_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 			}
 			break;
 
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index eea8c49b7cc..632ee16f45a 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -123,7 +123,7 @@ void Room68::setup_func() {
 			_G(r68HohesC) = -1;
 			_G(det)->stop_detail(18);
 			_G(det)->showStaticSpr(3);
-			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		}
 		break;
 
@@ -262,7 +262,7 @@ void Room68::calc_diva() {
 	if (!_G(spieler).R68DivaWeg) {
 		if (!_G(spieler).R68Papagei) {
 			if (_G(r68HohesC) == -1) {
-				_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+				_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 				_G(r68HohesC) = 0;
 				_G(det)->hideStaticSpr(3);
 				_G(det)->start_detail(_G(r68HohesC), 1, ANI_BACK);
@@ -275,7 +275,7 @@ void Room68::calc_diva() {
 			start_aad_wait(386, -1);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			new_invent_2_cur(BAR_GUT_INV);
-			_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 			showCur();
 		}
 	}
@@ -307,7 +307,7 @@ int16 Room68::use_diva() {
 		del_inventar(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
-		_G(uhr)->reset_timer(_G(timer_nr)[0], 0);
+		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		_G(det)->hideStaticSpr(3);
 		start_detail_wait(4, 1, ANI_FRONT);
 		_G(spieler).R68Gutschein = false;
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index df088d6fd6b..1c352acfed4 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -51,11 +51,11 @@ TextEntryList *Text::getDialog(uint dialogNum, uint entryNum) {
 			TextEntry curDialog;
 			ptr++; // current entry
 			ptr += 2;
-			curDialog.speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
+			curDialog._speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
 			ptr += 2;
 
 			do {
-				curDialog.text += *ptr++;
+				curDialog._text += *ptr++;
 
 				if (*ptr == 0 && *(ptr + 1) != kEndText) {
 					// TODO: Split lines
@@ -96,12 +96,12 @@ TextEntry *Text::getText(uint dialogNum, uint entryNum) {
 
 	for (uint i = 0; i <= entryNum; i++) {
 		ptr += 13;
-		d->speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
+		d->_speechId = READ_LE_UINT16(ptr) - VOICE_OFFSET;
 		ptr += 2;
 
 		do {
 			if (i == entryNum)
-				d->text += *ptr++;
+				d->_text += *ptr++;
 			else
 				ptr++;
 
@@ -141,20 +141,16 @@ TextEntry *Text::getText(uint dialogNum, uint entryNum) {
 
 
 void Text::crypt(char *txt, uint32 size) {
-	uint8 *sp;
-	uint32 i;
-	sp = (uint8 *)txt;
-	for (i = 0; i < size; i++) {
+	uint8 *sp = (uint8 *)txt;
+	for (uint32 i = 0; i < size; i++) {
 		*sp = -(*sp);
 		++sp;
 	}
 }
 
-char *Text::str_pos(char *txt_adr, int16 pos) {
-	char *ptr;
-	int16 i;
-	ptr = txt_adr;
-	for (i = 0; i < pos;) {
+char *Text::strPos(char *txtAdr, int16 pos) {
+	char *ptr = txtAdr;
+	for (int16 i = 0; i < pos;) {
 		if (*ptr == 0)
 			++i;
 		++ptr;
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index dba7d4f4cdd..f650fb9715f 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -59,8 +59,8 @@ enum TextEntryMarkers {
 #define VOICE_OFFSET 20
 
 struct TextEntry {
-	int16 speechId;
-	Common::String text;
+	int16 _speechId;
+	Common::String _text;
 };
 
 typedef Common::List<TextEntry> TextEntryList;
@@ -85,7 +85,7 @@ public:
 	TextEntry *getText(uint dialogNum, uint entryNum);
 
 	void crypt(char *txt, uint32 size);
-	char *str_pos(char *txt_adr, int16 pos);
+	char *strPos(char *txtAdr, int16 pos);
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index fd2c6285acf..8808d7d2612 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -33,7 +33,7 @@ Timer::Timer(int16 max_t, TimerBlk *t) {
 	_timerMax = max_t;
 	_G(timer_int) = false;
 	_G(timer_suspend) = false;
-	set_all_status(TIMER_STOP);
+	setAllStatus(TIMER_STOP);
 }
 
 Timer::~Timer() {
@@ -48,97 +48,90 @@ float timer_freq[6] = {
 	65520.0f
 };
 
-void Timer::calc_timer() {
-	int16 i;
-	int16 count;
-	int ak_time;
-	float freq;
-	ak_time = _G(timer_count);
-	for (i = 0; i < _timerMax; i++) {
-		if (_timerBlk[i].TimeStatus != TIMER_STOP) {
-			freq = timer_freq[_timerBlk[i].TimeMode];
+void Timer::calcTimer() {
+	int ak_time = _G(timer_count);
+	for (int16 i = 0; i < _timerMax; i++) {
+		if (_timerBlk[i]._timeStatus != TIMER_STOP) {
+			float freq = timer_freq[_timerBlk[i]._timeMode];
 
-			_timerBlk[i].TimeLast = ((float)ak_time - (float)_timerBlk[i].TimeLast);
+			_timerBlk[i]._timeLast = ((float)ak_time - (float)_timerBlk[i]._timeLast);
 
-			count = (int16)((float)_timerBlk[i].TimeLast / (float)freq);
-			if (_timerBlk[i].TimeStatus == TIMER_START)
-				_timerBlk[i].TimeCount += count;
+			int16 count = (int16)((float)_timerBlk[i]._timeLast / (float)freq);
+			if (_timerBlk[i]._timeStatus == TIMER_START)
+				_timerBlk[i]._timeCount += count;
 
-			_timerBlk[i].TimeLast = (float)ak_time - (float)(_timerBlk[i].TimeLast -
+			_timerBlk[i]._timeLast = (float)ak_time - (float)(_timerBlk[i]._timeLast -
 			                        (float)((float)count * (float)freq));
 
-			if (_timerBlk[i].TimeCount >= _timerBlk[i].TimeEnd) {
-				++_timerBlk[i].TimeFlag;
-				_timerBlk[i].TimeCount = 0;
+			if (_timerBlk[i]._timeCount >= _timerBlk[i]._timeEnd) {
+				++_timerBlk[i]._timeFlag;
+				_timerBlk[i]._timeCount = 0;
 			}
 		}
 	}
 }
 
-int16 Timer::set_new_timer(int16 timer_nr, int16 timer_end_wert, int16 timer_mode) {
+int16 Timer::setNewTimer(int16 timerNr, int16 timerEndValue, int16 timerMode) {
 	int16 ret;
-	if (timer_nr < _timerMax) {
-		ret = true;
-		_timerBlk[timer_nr].TimeCount = 0;
-		_timerBlk[timer_nr].TimeEnd = timer_end_wert;
-		_timerBlk[timer_nr].TimeFlag = 0;
-		_timerBlk[timer_nr].TimeLast = _G(timer_count);
-		_timerBlk[timer_nr].TimeMode = timer_mode;
-		_timerBlk[timer_nr].TimeStatus = true;
+	if (timerNr < _timerMax) {
+		ret = 1;
+		_timerBlk[timerNr]._timeCount = 0;
+		_timerBlk[timerNr]._timeEnd = timerEndValue;
+		_timerBlk[timerNr]._timeFlag = 0;
+		_timerBlk[timerNr]._timeLast = _G(timer_count);
+		_timerBlk[timerNr]._timeMode = timerMode;
+		_timerBlk[timerNr]._timeStatus = true;
 	} else
 		ret = -1;
 	return ret;
 }
 
-void Timer::reset_timer(int16 timer_nr, int16 timer_wert) {
-	if (timer_nr < _timerMax) {
-		_timerBlk[timer_nr].TimeCount = 0;
-		_timerBlk[timer_nr].TimeFlag = 0;
-		_timerBlk[timer_nr].TimeLast = _G(timer_count);
-		if (timer_wert)
-			_timerBlk[timer_nr].TimeEnd = timer_wert;
+void Timer::resetTimer(int16 timerNr, int16 timerValue) {
+	if (timerNr < _timerMax) {
+		_timerBlk[timerNr]._timeCount = 0;
+		_timerBlk[timerNr]._timeFlag = 0;
+		_timerBlk[timerNr]._timeLast = _G(timer_count);
+		if (timerValue)
+			_timerBlk[timerNr]._timeEnd = timerValue;
 	}
 }
 
-void Timer::reset_all_timer() {
-	int16 i;
-	for (i = 0; i < _timerMax; i++) {
-		_timerBlk[i].TimeCount = 0;
-		_timerBlk[i].TimeFlag = 0;
-		_timerBlk[i].TimeLast = _G(timer_count);
+void Timer::resetAllTimer() {
+	for (int16 i = 0; i < _timerMax; i++) {
+		_timerBlk[i]._timeCount = 0;
+		_timerBlk[i]._timeFlag = 0;
+		_timerBlk[i]._timeLast = _G(timer_count);
 	}
 }
 
-void Timer::set_status(int16 timer_nr, int16 status) {
-	if (timer_nr < _timerMax) {
-		_timerBlk[timer_nr].TimeStatus = status;
+void Timer::setStatus(int16 timerNr, int16 status) {
+	if (timerNr < _timerMax) {
+		_timerBlk[timerNr]._timeStatus = status;
 	}
 }
 
-void Timer::set_all_status(int16 status) {
-	int16 i;
+void Timer::setAllStatus(int16 status) {
 	if (status == TIMER_FREEZE) {
-		for (i = 0; i < _timerMax; i++) {
-			if (_timerBlk[i].TimeStatus != TIMER_STOP)
-				_timerBlk[i].TimeStatus = TIMER_FREEZE;
+		for (int16 i = 0; i < _timerMax; i++) {
+			if (_timerBlk[i]._timeStatus != TIMER_STOP)
+				_timerBlk[i]._timeStatus = TIMER_FREEZE;
 		}
-	}
-	else if (status == TIMER_UNFREEZE) {
-		for (i = 0; i < _timerMax; i++) {
-			if (_timerBlk[i].TimeStatus != TIMER_STOP)
-				_timerBlk[i].TimeStatus = TIMER_START;
+	} else if (status == TIMER_UNFREEZE) {
+		for (int16 i = 0; i < _timerMax; i++) {
+			if (_timerBlk[i]._timeStatus != TIMER_STOP)
+				_timerBlk[i]._timeStatus = TIMER_START;
 		}
 	} else {
-		for (i = 0; i < _timerMax; i++)
-			_timerBlk[i].TimeStatus = status;
+		for (int16 i = 0; i < _timerMax; i++)
+			_timerBlk[i]._timeStatus = status;
 	}
 }
 
-void Timer::disable_timer() {
+void Timer::disableTimer() {
 	_G(timer_suspend) = true;
 }
 
-void Timer::enable_timer() {
+void Timer::enableTimer() {
 	_G(timer_suspend) = false;
 }
 
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 7864907d453..314e7494a09 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -38,31 +38,30 @@ namespace Chewy {
 #define TIMER_UNFREEZE 3
 
 struct TimerBlk {
-	int16 TimeCount;
+	int16 _timeCount;
 
-	int16 TimeEnd;
-	float TimeLast;
-	int16 TimeFlag;
+	int16 _timeEnd;
+	float _timeLast;
+	int16 _timeFlag;
 
-	int16 TimeMode;
+	int16 _timeMode;
 
-	int16 TimeStatus;
+	int16 _timeStatus;
 };
 
 class Timer {
 public:
-	Timer(int16 max_timer, TimerBlk *t);
+	Timer(int16 maxTimer, TimerBlk *t);
 	~Timer();
 
-	void calc_timer();
-	int16 set_new_timer(int16 timer_nr, int16 timer_end_wert,
-	                    int16 timer_mode);
-	void reset_timer(int16 timer_nr, int16 timer_wert);
-	void reset_all_timer();
-	void set_status(int16 timer_nr, int16 status);
-	void set_all_status(int16 status);
-	void disable_timer();
-	void enable_timer();
+	void calcTimer();
+	int16 setNewTimer(int16 timerNr, int16 timerEndValue, int16 timerMode);
+	void resetTimer(int16 timerNr, int16 timerValue);
+	void resetAllTimer();
+	void setStatus(int16 timerNr, int16 status);
+	void setAllStatus(int16 status);
+	void disableTimer();
+	void enableTimer();
 
 private:
 	TimerBlk *_timerBlk;


Commit: c66842250601b6d746dfef24bfa2a57440fd3f8e
    https://github.com/scummvm/scummvm/commit/c66842250601b6d746dfef24bfa2a57440fd3f8e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:48-08:00

Commit Message:
CHEWY: Revert 'Remove flic_cut switch cases that were unused'

This reverts commit c56d27bffea081e201f19ef408645596d0281a15.

The code is actually part of the refactoring cleanup

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 232954bde58..7b9e7772bd4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1019,6 +1019,36 @@ void flic_cut(int16 nr) {
 			_G(currentSong) = -1;
 			break;
 
+		case FCUT_068:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room51::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->_video->playVideo(nr);
+#endif
+
+		case FCUT_069:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room54::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->_video->playVideo(nr);
+#endif
+
+		case FCUT_070:
+#ifndef NEW_VIDEO_CODE
+			_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
+			_G(flc)->set_flic_user_function(Room55::cut_serv);
+			_G(flc)->custom_play(&_G(Ci));
+			_G(flc)->remove_flic_user_function();
+#else
+			g_engine->_video->playVideo(nr);
+#endif
+
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();
 			_G(currentSong) = -1;


Commit: 30ff8c38dc3682fe1309c8affc94a785ee1d9caf
    https://github.com/scummvm/scummvm/commit/30ff8c38dc3682fe1309c8affc94a785ee1d9caf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:48-08:00

Commit Message:
CHEWY: Add missing breaks to re-added switch cases

Changed paths:
    engines/chewy/r_event.cpp


diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7b9e7772bd4..af57f886f57 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1028,6 +1028,7 @@ void flic_cut(int16 nr) {
 #else
 			g_engine->_video->playVideo(nr);
 #endif
+			break;
 
 		case FCUT_069:
 #ifndef NEW_VIDEO_CODE
@@ -1038,6 +1039,7 @@ void flic_cut(int16 nr) {
 #else
 			g_engine->_video->playVideo(nr);
 #endif
+			break;
 
 		case FCUT_070:
 #ifndef NEW_VIDEO_CODE
@@ -1048,6 +1050,7 @@ void flic_cut(int16 nr) {
 #else
 			g_engine->_video->playVideo(nr);
 #endif
+			break;
 
 		case FCUT_071:
 			_G(sndPlayer)->stopMod();


Commit: 873bb787240c8a2aa05615d11f1eadde9b413c01
    https://github.com/scummvm/scummvm/commit/873bb787240c8a2aa05615d11f1eadde9b413c01
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-03-03T18:36:48-08:00

Commit Message:
CHEWY: Header define fixes

Changed paths:
    engines/chewy/globals.h
    engines/chewy/io_game.h


diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 0b5f57eaa29..2874533abd5 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_GLOBAL_H
-#define CHEWY_GLOBAL_H
+#ifndef CHEWY_GLOBALS_H
+#define CHEWY_GLOBALS_H
 
 #include "common/array.h"
 #include "chewy/chewy.h"
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 711f679b2f4..c9f40e7b31f 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef CHEWY_IOGame2_H
-#define CHEWY_IOGame2_H
+#ifndef CHEWY_IO_GAME_H
+#define CHEWY_IO_GAME_H
 
 #include "chewy/mcga.h"
 #include "chewy/cursor.h"


Commit: 8aec52fd822167383f02dcf9b6302dda656cb488
    https://github.com/scummvm/scummvm/commit/8aec52fd822167383f02dcf9b6302dda656cb488
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:48-08:00

Commit Message:
CHEWY; Some more renaming

Changed paths:
    engines/chewy/ani_dat.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/data.cpp
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/ngsdefs.h
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room59.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/t_event.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 40bacf5328f..5c792d24ace 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -24,8 +24,8 @@
 
 namespace Chewy {
 
-#define SIB_KABEL_R1 1
-#define SIB_MONOKEL 6
+#define SIB_CABLE_R1 1
+#define SIB_MONOCLE 6
 #define SIB_GBUCH 7
 #define SIB_TERMINAL_R5 8
 #define SIB_KNOPF_R5 9
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 4dd3804974e..3703ef5b011 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -328,7 +328,7 @@ void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chu
 		_atdsmem[mode] = tmp_adr;
 		_atdspooloff[mode] = chunk_start;
 		switch (mode) {
-		case INV_USE_DATEI:
+		case INV_USE_DATA:
 			_G(mem)->file->select_pool_item(rs, _atdspooloff[mode]);
 			rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
 
@@ -357,7 +357,7 @@ void Atdsys::set_handle(const char *fname, int16 mode, Stream *handle, int16 chu
 void Atdsys::open_handle(const char *fname, int16 mode) {
 	char *tmp_adr = nullptr;
 
-	if (mode != INV_IDX_DATEI)
+	if (mode != INV_IDX_DATA)
 		tmp_adr = atds_adr(fname, 0, 20000);
 	Common::File *f = new Common::File();
 	f->open(fname);
@@ -367,11 +367,11 @@ void Atdsys::open_handle(const char *fname, int16 mode) {
 		_atdsmem[mode] = tmp_adr;
 
 		switch (mode) {
-		case ADH_DATEI:
+		case ADH_DATA:
 			_adsBlock = (AdsBlock *)_atdsmem[ADH_HANDLE];
 			break;
 
-		case INV_IDX_DATEI:
+		case INV_IDX_DATA:
 			_atdsmem[INV_IDX_HANDLE] = (char *)MALLOC(INV_STRC_ANZ * sizeof(InvUse));
 			break;
 
@@ -424,7 +424,7 @@ void Atdsys::load_atds(int16 chunk_nr, int16 mode) {
 			if (Ch.size) {
 				if (stream->read(txt_adr, Ch.size) != Ch.size) {
 					error("load_atds error");
-				} else if (mode != ADH_DATEI) {
+				} else if (mode != ADH_DATA) {
 					crypt(txt_adr, Ch.size);
 				}
 			}
@@ -474,11 +474,11 @@ void Atdsys::crypt(char *txt, uint32 size) {
 
 void Atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 	switch (mode) {
-	case ATS_DATEI:
+	case ATS_DATA:
 		_ats_st_header[0] = atsheader;
 		break;
 
-	case INV_USE_DATEI:
+	case INV_USE_DATA:
 		_ats_st_header[1] = atsheader;
 		break;
 
@@ -486,7 +486,7 @@ void Atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 		_ats_st_header[2] = atsheader;
 		break;
 
-	case INV_ATS_DATEI:
+	case INV_ATS_DATA:
 		_ats_st_header[3] = atsheader;
 		break;
 
@@ -497,12 +497,12 @@ void Atdsys::init_ats_mode(int16 mode, uint8 *atsheader) {
 
 void Atdsys::set_ats_mem(int16 mode) {
 	switch (mode) {
-	case ATS_DATEI:
+	case ATS_DATA:
 		_ats_sheader = _ats_st_header[0];
 		_atsmem = _atdsmem[mode];
 		break;
 
-	case INV_USE_DATEI:
+	case INV_USE_DATA:
 		_ats_sheader = _ats_st_header[1];
 		_atsmem = _atdsmem[mode];
 		break;
@@ -512,7 +512,7 @@ void Atdsys::set_ats_mem(int16 mode) {
 		_atsmem = _invUseMem;
 		break;
 
-	case INV_ATS_DATEI:
+	case INV_ATS_DATA:
 		_ats_sheader = _ats_st_header[3];
 		_atsmem = _atdsmem[mode];
 		break;
@@ -1123,7 +1123,7 @@ void Atdsys::aad_search_dia(int16 dia_nr, char **ptr) {
 bool  Atdsys::ads_start(int16 dia_nr) {
 	bool ret = false;
 
-	load_atds(dia_nr, ADS_DATEI);
+	load_atds(dia_nr, ADS_DATA);
 	bool ende = false;
 
 	if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
@@ -1336,7 +1336,7 @@ void Atdsys::hide_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = false;
 	} else {
-		load_atds(dia_nr, ADH_DATEI);
+		load_atds(dia_nr, ADH_DATA);
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = false;
 		save_ads_header(dia_nr);
@@ -1348,7 +1348,7 @@ void Atdsys::show_item(int16 dia_nr, int16 blk_nr, int16 item_nr) {
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = true;
 	} else {
-		load_atds(dia_nr, ADH_DATEI);
+		load_atds(dia_nr, ADH_DATA);
 		if (check_item(blk_nr, item_nr))
 			_adsBlock[blk_nr].Show[item_nr] = true;
 		save_ads_header(dia_nr);
@@ -1360,7 +1360,7 @@ int16 Atdsys::calc_inv_no_use(int16 cur_inv, int16 test_nr, int16 mode) {
 	if (cur_inv != -1) {
 		if (_invBlockNr != cur_inv) {
 			_invBlockNr = cur_inv + 1;
-			load_atds(_invBlockNr + _atdspooloff[mode], INV_USE_DATEI);
+			load_atds(_invBlockNr + _atdspooloff[mode], INV_USE_DATA);
 
 			Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
 				_atdshandle[INV_IDX_HANDLE]);
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 440ab648dd5..adf5adf253c 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -22,8 +22,6 @@
 #ifndef CHEWY_ATDS_H
 #define CHEWY_ATDS_H
 
-#include "chewy/file.h"
-
 namespace Chewy {
 
 #define ATDS_VOC_OFFSET 20
@@ -32,13 +30,13 @@ namespace Chewy {
 
 #define AAD_STR_START 0
 #define AAD_STR_END 1
-#define AAD_DATEI 0
-#define ATS_DATEI 1
-#define ADS_DATEI 2
-#define ADH_DATEI 3
-#define INV_USE_DATEI 4
-#define INV_IDX_DATEI 5
-#define INV_ATS_DATEI 6
+#define AAD_DATA 0
+#define ATS_DATA 1
+#define ADS_DATA 2
+#define ADH_DATA 3
+#define INV_USE_DATA 4
+#define INV_IDX_DATA 5
+#define INV_ATS_DATA 6
 
 #define MAX_HANDLE 8
 #define AAD_HANDLE 0
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index e17fd975826..4be7c73d7e3 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -41,17 +41,16 @@ uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 
 	if (rs) {
 		rs->seek(0, SEEK_SET);
-		if (!ph.load(rs)) {
+		if (!ph.load(rs))
 			error("select_pool_item error");
-		} else {
-			if (!strncmp(ph.id, "NGS", 3)) {
-				if (nr >= ph.PoolAnz)
-					nr = ph.PoolAnz - 1;
-
-				rs->seek(-(int)((ph.PoolAnz - nr) * sizeof(uint32)), SEEK_END);
-				uint32 tmp1 = rs->readUint32LE();
-				rs->seek(tmp1, SEEK_SET);
-			}
+
+		if (!strncmp(ph.id, "NGS", 3)) {
+			if (nr >= ph.PoolAnz)
+				nr = ph.PoolAnz - 1;
+
+			rs->seek(-(int)((ph.PoolAnz - nr) * sizeof(uint32)), SEEK_END);
+			uint32 tmp1 = rs->readUint32LE();
+			rs->seek(tmp1, SEEK_SET);
 		}
 	}
 
@@ -65,27 +64,24 @@ uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 
 	if (rs) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
-		if (!ch.load(rs)) {
+		if (!ch.load(rs))
+			error("load_tmf error");
+
+		if (ch.type != TMFDATA)
 			error("load_tmf error");
-		} else {
-			if (ch.type == TMFDATEI) {
-				assert(ch.size > (uint32)TmfHeader::SIZE());
-
-				if (!song->load(rs)) {
-					error("load_tmf error");
-				} else {
-					size = ch.size + sizeof(TmfHeader);
-					byte *speicher = (byte *)song + sizeof(TmfHeader);
-					speicher += ((uint32)song->pattern_anz) * 1024l;
-					for (int16 i = 0; i < 31; ++i) {
-						if (song->instrument[i].laenge) {
-							song->ipos[i] = speicher;
-							speicher += song->instrument[i].laenge;
-						}
-					}
-				}
-			} else {
-				error("load_tmf error");
+
+		assert(ch.size > (uint32)TmfHeader::SIZE());
+
+		if (!song->load(rs))
+			error("load_tmf error");
+
+		size = ch.size + sizeof(TmfHeader);
+		byte *speicher = (byte *)song + sizeof(TmfHeader);
+		speicher += ((uint32)song->pattern_anz) * 1024l;
+		for (int16 i = 0; i < 31; ++i) {
+			if (song->instrument[i].laenge) {
+				song->ipos[i] = speicher;
+				speicher += song->instrument[i].laenge;
 			}
 		}
 	}
@@ -98,33 +94,30 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
 	uint32 size = 0;
 
 	Common::File f;
-	if (f.open(fname)) {
-		if (!Nph.load(&f)) {
-			error("get_poolsize error");
-		} else {
-			if (!strncmp(Nph.id, "NGS", 3)) {
-				select_pool_item(&f, chunk_start);
-				f.seek(-ChunkHead::SIZE(), SEEK_CUR);
-
-				for (int16 i = chunk_start; (i < Nph.PoolAnz) && i < (chunk_start + chunk_anz); i++) {
-					ChunkHead ch;
-					if (!ch.load(&f)) {
-						error("get_poolsize error");
-					} else {
-						if (ch.size > size)
-							size = ch.size;
-
-						f.seek(ch.size, SEEK_CUR);
-					}
-				}
-			}
-		}
+	if (!f.open(fname))
+		error("get_poolsize error");
 
-		f.close();
-	} else {
+	if (!Nph.load(&f))
 		error("get_poolsize error");
+
+	if (!strncmp(Nph.id, "NGS", 3)) {
+		select_pool_item(&f, chunk_start);
+		f.seek(-ChunkHead::SIZE(), SEEK_CUR);
+
+		for (int16 i = chunk_start; (i < Nph.PoolAnz) && i < (chunk_start + chunk_anz); i++) {
+			ChunkHead ch;
+			if (!ch.load(&f))
+				error("get_poolsize error");
+
+			if (ch.size > size)
+				size = ch.size;
+
+			f.seek(ch.size, SEEK_CUR);
+		}
 	}
 
+	f.close();
+
 	return size;
 }
 
@@ -132,13 +125,12 @@ void Data::fcopy(const char *d_fname, const char *s_fname) {
 	assert(!strcmp(d_fname, ADSH_TMP));
 
 	Common::File f;
-	if (f.open(s_fname)) {
-		Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
-		ws->writeStream(&f);
-		delete ws;
-	} else {
+	if (!f.open(s_fname))
 		error("Could not find - %s", s_fname);
-	}
+
+	Common::SeekableWriteStream *ws = g_engine->_tempFiles.createWriteStreamForMember(ADSH_TMP);
+	ws->writeStream(&f);
+	delete ws;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index fbd8df7a215..1efd26cb3ab 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -126,8 +126,8 @@ bool RoomDetailInfo::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool RdiDateiHeader::load(Common::SeekableReadStream *src) {
-	src->read(Id, 4);
+bool RdiDataHeader::load(Common::SeekableReadStream *src) {
+	src->read(_id, 4);
 	Anz = src->readSint16LE();
 
 	return true;
@@ -171,7 +171,7 @@ void Detail::load_rdi(const char *fname_, int16 room_nr) {
 
 	if (fname_ && f.open(fname_)) {
 		if (_rdiDataHeader.load(&f)) {
-			if (!scumm_strnicmp(_rdiDataHeader.Id, "RDI", 3)) {
+			if (!scumm_strnicmp(_rdiDataHeader._id, "RDI", 3)) {
 				f.seek(room_nr * RoomDetailInfo::SIZE(), SEEK_CUR);
 
 				if (!_rdi.load(&f)) {
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 91dc765b543..1b2a66c5899 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -157,8 +157,8 @@ struct RoomDetailInfo {
 	}
 };
 
-struct RdiDateiHeader {
-	char Id[4];
+struct RdiDataHeader {
+	char _id[4];
 	int16 Anz;
 
 	bool load(Common::SeekableReadStream *src);
@@ -261,7 +261,7 @@ private:
 
 	void removeUnusedSamples();
 	RoomDetailInfo _rdi;
-	RdiDateiHeader _rdiDataHeader;
+	RdiDataHeader _rdiDataHeader;
 	SprInfo _sprInfo;
 
 	int16 _globalDelay = 0;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 3080cb6cccf..7f7086f2527 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -262,7 +262,7 @@ void Credits::execute() {
 	}
 
 	_G(fontMgr)->setFont(_G(font8));
-	_G(room)->open_handle("back/episode1.tgp", R_GEPDATEI);
+	_G(room)->open_handle("back/episode1.tgp", R_GEP_DATA);
 
 	_G(room)->set_ak_pal(&_G(room_blk));
 	hideCur();
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 21820138703..c9857e49540 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -395,9 +395,9 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	bool mouseFl = true;
 
 	if (mode == INV_ATS_MODE) {
-		_G(atds)->load_atds(invent_nr, INV_ATS_DATEI);
-		txt_name_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATEI);
-		txt_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATEI);
+		_G(atds)->load_atds(invent_nr, INV_ATS_DATA);
+		txt_name_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_NAME, &txt_anz, INV_ATS_DATA);
+		txt_adr = _G(atds)->ats_get_txt(invent_nr, TXT_MARK_LOOK, &txt_anz, INV_ATS_DATA);
 		xoff = strlen(txt_name_adr);
 		xoff *= _G(font8)->getDataWidth();
 		xoff = (254 - xoff) / 2;
@@ -411,7 +411,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		if (ats_nr >= 15000) {
 			txt_adr = _G(atds)->ats_get_txt(ats_nr - 15000, TXT_MARK_USE, &txt_anz, INV_USE_DEF);
 		} else {
-			txt_adr = _G(atds)->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATEI);
+			txt_adr = _G(atds)->ats_get_txt(ats_nr, TXT_MARK_USE, &txt_anz, INV_USE_DATA);
 		}
 		if (!txt_adr) {
 			endLoop = true;
@@ -582,14 +582,14 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 					break;
 				}
 
-				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI)) {
+				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATA)) {
 					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
 				}
 				if (ok) {
-					start_ats_wait(txt_nr, m_mode, 14, ATS_DATEI);
+					start_ats_wait(txt_nr, m_mode, 14, ATS_DATA);
 				}
 
-				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATEI))
+				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATA))
 					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
 				if (_G(menu_item) == CUR_USE)
 					_G(flags).StaticUseTxt = true;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index a21972959b7..a749572008b 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -184,30 +184,30 @@ void init_room() {
 	_G(room_blk).AtsLoad = true;
 	strcpy(_G(room_blk).RoomDir, "room/");
 
-	_G(room)->open_handle(EPISODE1_GEP, R_GEPDATEI);
+	_G(room)->open_handle(EPISODE1_GEP, R_GEP_DATA);
 }
 
 void init_atds() {
 	// Close any prior handles
-	_G(atds)->close_handle(AAD_DATEI);
-	_G(atds)->close_handle(ATS_DATEI);
-	_G(atds)->close_handle(ADS_DATEI);
-	_G(atds)->close_handle(INV_USE_DATEI);
-	_G(atds)->close_handle(INV_ATS_DATEI);
+	_G(atds)->close_handle(AAD_DATA);
+	_G(atds)->close_handle(ATS_DATA);
+	_G(atds)->close_handle(ADS_DATA);
+	_G(atds)->close_handle(INV_USE_DATA);
+	_G(atds)->close_handle(INV_ATS_DATA);
 	_G(atds)->close_handle(ATDS_HANDLE);
 
 	// New set up
 	Stream *handle = _G(atds)->pool_handle(ATDS_TXT);
-	_G(atds)->set_handle(ATDS_TXT, ATS_DATEI, handle, ATS_TAP_OFF, ATS_TAP_MAX);
-	_G(atds)->init_ats_mode(ATS_DATEI, _G(spieler).Ats);
-	_G(atds)->set_handle(ATDS_TXT, INV_ATS_DATEI, handle, INV_TAP_OFF, INV_TAP_MAX);
-	_G(atds)->init_ats_mode(INV_ATS_DATEI, _G(spieler).InvAts);
-	_G(atds)->set_handle(ATDS_TXT, AAD_DATEI, handle, AAD_TAP_OFF, AAD_TAP_MAX);
-	_G(atds)->set_handle(ATDS_TXT, ADS_DATEI, handle, ADS_TAP_OFF, ADS_TAP_MAX);
-	_G(atds)->set_handle(ATDS_TXT, INV_USE_DATEI, handle, USE_TAP_OFF, USE_TAP_MAX);
-	_G(atds)->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
+	_G(atds)->set_handle(ATDS_TXT, ATS_DATA, handle, ATS_TAP_OFF, ATS_TAP_MAX);
+	_G(atds)->init_ats_mode(ATS_DATA, _G(spieler).Ats);
+	_G(atds)->set_handle(ATDS_TXT, INV_ATS_DATA, handle, INV_TAP_OFF, INV_TAP_MAX);
+	_G(atds)->init_ats_mode(INV_ATS_DATA, _G(spieler).InvAts);
+	_G(atds)->set_handle(ATDS_TXT, AAD_DATA, handle, AAD_TAP_OFF, AAD_TAP_MAX);
+	_G(atds)->set_handle(ATDS_TXT, ADS_DATA, handle, ADS_TAP_OFF, ADS_TAP_MAX);
+	_G(atds)->set_handle(ATDS_TXT, INV_USE_DATA, handle, USE_TAP_OFF, USE_TAP_MAX);
+	_G(atds)->init_ats_mode(INV_USE_DATA, _G(spieler).InvUse);
 	_G(atds)->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
-	_G(atds)->open_handle(INV_USE_IDX, INV_IDX_DATEI);
+	_G(atds)->open_handle(INV_USE_IDX, INV_IDX_DATA);
 	_G(mem)->file->fcopy(ADSH_TMP, "txt/diah.adh");
 	_G(atds)->open_handle(ADSH_TMP, 3);
 	_G(spieler).AadSilent = 10;
@@ -336,7 +336,7 @@ void sound_init() {
 	g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
 	g_engine->_sound->setSoundVolume(_G(spieler).SoundVol * Audio::Mixer::kMaxChannelVolume / 120);
 
-	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, R_VOCDATEI);
+	_G(music_handle) = _G(room)->open_handle(DETAIL_TVP, R_VOC_DATA);
 
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(_G(music_handle));
 	assert(rs);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index eb9f392232e..df19e5d8193 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -692,7 +692,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
 			case INVENTAR_STATIC:
-				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
+				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATA);
 				break;
 			default:
 				break;
@@ -1378,7 +1378,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 
 					int16 action_ret = 0;
-					if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
+					if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 								set_person_spr(P_RIGHT, P_CHEWY);
@@ -1387,18 +1387,18 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 						}
 					}
 
-					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATEI)) {
+					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATA)) {
 						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_VOR);
 					}
 					
-					if (ok && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
-						if (start_ats_wait(txtNr, txtMode, 14, ATS_DATEI))
+					if (ok && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
+						if (start_ats_wait(txtNr, txtMode, 14, ATS_DATA))
 							dispFl = false;
 					} else {
 						ret = -1;
 					}
 					
-					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATEI)) {
+					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATA)) {
 						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_NACH);
 						actionFl = true;
 						if (action_ret)
@@ -1406,7 +1406,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (!ok && !action_ret) {
-						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
+						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
 							actionFl = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
 							if (actionFl)
 								ret = txtNr;
@@ -1414,7 +1414,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (ok && !action_ret && txtMode == TXT_MARK_USE && dispFl) {
-						if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATEI)) {
+						if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
 							if (_G(menu_item) != CUR_WALK) {
 								if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
 									set_person_spr(P_RIGHT, P_CHEWY);
@@ -1435,7 +1435,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 
 				if (dispFl && !actionFl) {
 					int16 anz;
-					char *str_ = _G(atds)->ats_get_txt(txtNr, TXT_MARK_NAME, &anz, ATS_DATEI);
+					char *str_ = _G(atds)->ats_get_txt(txtNr, TXT_MARK_NAME, &anz, ATS_DATA);
 					if (str_ != 0) {
 						ret = txtNr;
 						_G(fontMgr)->setFont(_G(font8));
@@ -1581,7 +1581,7 @@ void calc_mouse_person(int16 x, int16 y) {
 									else
 										set_person_spr(P_LEFT, P_CHEWY);
 								}
-								if (!start_ats_wait(txt_nr, mode, 14, ATS_DATEI))
+								if (!start_ats_wait(txt_nr, mode, 14, ATS_DATA))
 									start_ats_wait(def_nr, TXT_MARK_USE, 14, INV_USE_DEF);
 							}
 						}
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index 4d8ef86344f..e01cc7f72c4 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -47,13 +47,9 @@ namespace Chewy {
 
 #define MAXDIRS 50
 #define MAXFNAMEN 50
-#define GRAFIK 1
-#define SPEICHER 2
-#define DATEI 3
 #define MOD15 10
 #define TYPE_ANZ 27
-#define TFFDATEI 3
-#define TMFDATEI 6
+#define TMFDATA 6
 #define SCREENSAVE 0
 #define SPRITESAVE 1
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index af57f886f57..1617f5d6a0d 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -462,7 +462,7 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 11:
-		_G(atds)->set_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
 	case 13:
@@ -778,7 +778,7 @@ void exit_room(int16 eib_nr) {
 void print_rows(int16 id) {
 	_G(fontMgr)->setFont(_G(font8));
 	int16 txt_anz;
-	char *txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
+	char *txtStr = _G(atds)->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATA);
 	_G(out)->setPointer(nullptr);
 
 	for (int i = 0; i < txt_anz; ++i) {
@@ -846,7 +846,7 @@ static void flic_proc1() {
 	};
 	int16 ret = 0;
 
-	_G(atds)->load_atds(98, AAD_DATEI);
+	_G(atds)->load_atds(98, AAD_DATA);
 	_G(flc)->set_custom_user_function(flic_user_function);
 	load_room_music(258);
 
@@ -1196,9 +1196,9 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
 		_G(det)->start_detail(ani_nr, 1, flag);
 	flag ^= 1;
 	if (ats_nr1 != -1)
-		_G(atds)->set_ats_str(ats_nr1, flag, ATS_DATEI);
+		_G(atds)->set_ats_str(ats_nr1, flag, ATS_DATA);
 	if (ats_nr2 != -1)
-		_G(atds)->set_ats_str(ats_nr2, flag, ATS_DATEI);
+		_G(atds)->set_ats_str(ats_nr2, flag, ATS_DATA);
 	if (flag) {
 		if (eib_nr1 != -1)
 			_G(spieler).room_e_obj[eib_nr1].Attribut = spr_nr1;
@@ -1220,30 +1220,30 @@ int16 sib_event_no_inv(int16 sib_nr) {
 	int16 ret = true;
 
 	switch (sib_nr) {
-	case SIB_KABEL_R1:
-		_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATEI);
+	case SIB_CABLE_R1:
+		_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 1, ATS_DATA);
 		break;
 
-	case SIB_MONOKEL:
-		_G(spieler).R0Monokel = true;
-		_G(obj)->hide_sib(SIB_MONOKEL);
+	case SIB_MONOCLE:
+		_G(spieler).R0Monocle = true;
+		_G(obj)->hide_sib(SIB_MONOCLE);
 		if (_G(spieler).R0GBuch)
-			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
 	case SIB_GBUCH:
 		_G(spieler).R0GBuch = true;
 		_G(obj)->hide_sib(SIB_GBUCH);
-		if (_G(spieler).R0Monokel)
-			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATEI);
+		if (_G(spieler).R0Monocle)
+			_G(atds)->del_steuer_bit(12, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
 	case SIB_TERMINAL_R5:
 		if (_G(spieler).R5Terminal) {
 			_G(spieler).R5Terminal = 0;
 			_G(det)->stop_detail(6);
-			_G(atds)->set_ats_str(27, TXT_MARK_LOOK, 0, ATS_DATEI);
-			_G(atds)->set_ats_str(30, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(27, TXT_MARK_LOOK, 0, ATS_DATA);
+			_G(atds)->set_ats_str(30, TXT_MARK_LOOK, 0, ATS_DATA);
 		}
 		break;
 
@@ -1256,7 +1256,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_BOLA_SCHACHT:
-		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATA);
 		break;
 
 	case SIB_BOLA_KNOPF_R6:
@@ -1273,11 +1273,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(spieler).R7Hebel ^= 1;
 
 		if (!_G(spieler).R7Hebel)
-			_G(atds)->set_ats_str(50, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 0, ATS_DATA);
 		else if (!_G(spieler).R7BorkFlug)
-			_G(atds)->set_ats_str(50, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 1, ATS_DATA);
 		else
-			_G(atds)->set_ats_str(50, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(50, 2, ATS_DATA);
 		break;
 
 	case SIB_KLINGEL_R7:
@@ -1307,9 +1307,9 @@ int16 sib_event_no_inv(int16 sib_nr) {
 				autoMove(4, P_CHEWY);
 				_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 				_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
-				_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
-				_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
-				_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATA);
+				_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATA);
+				_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATA);
 				start_aad(9);
 			} else {
 				_G(obj)->set_rsi_flip_flop(SIB_LHAKEN_R7, 2);
@@ -1347,9 +1347,9 @@ int16 sib_event_no_inv(int16 sib_nr) {
 				_G(det)->stop_detail(i);
 		}
 
-		_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-		_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-		_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+		_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
+		_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
+		_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 		break;
 
 	case SIB_CARTRIDGE_R23:
@@ -1358,12 +1358,12 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = false;
-		_G(atds)->set_ats_str(112, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(112, 0, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
-		_G(atds)->set_ats_str(113, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(113, 1, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
@@ -1374,7 +1374,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_GITTER_R16:
-		_G(atds)->set_ats_str(125, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(125, 1, ATS_DATA);
 		_G(spieler).room_e_obj[33].Attribut = AUSGANG_OBEN;
 		break;
 
@@ -1382,25 +1382,25 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(det)->start_detail(0, 1, _G(spieler).R21Hebel1);
 		_G(spieler).R21Hebel1 ^= 1;
 		Room21::calc_laser();
-		_G(atds)->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATEI);
+		_G(atds)->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATA);
 		break;
 
 	case SIB_SCHALTER2_R21:
 		_G(det)->start_detail(1, 1, _G(spieler).R21Hebel2);
 		_G(spieler).R21Hebel2 ^= 1;
 		Room21::calc_laser();
-		_G(atds)->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATEI);
+		_G(atds)->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATA);
 		break;
 
 	case SIB_SCHALTER3_R21:
 		_G(det)->start_detail(2, 1, _G(spieler).R21Hebel3);
 		_G(spieler).R21Hebel3 ^= 1;
 		Room21::calc_laser();
-		_G(atds)->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATEI);
+		_G(atds)->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATA);
 		break;
 
 	case SIB_SEIL_R21:
-		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
 	case SIB_GITTER1_R21:
@@ -1408,7 +1408,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_CART1_R18:
-		_G(atds)->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
 	case SIB_TUERKNOPF_R18:
@@ -1434,7 +1434,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = 0;
 		cur_2_inventory();
-		_G(atds)->set_ats_str(157, 1, AAD_DATEI);
+		_G(atds)->set_ats_str(157, 1, AAD_DATA);
 		break;
 
 	case SIB_SCHLAUCH_R26:
@@ -1457,12 +1457,12 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_PUTE_R34:
-		_G(atds)->set_ats_str(226, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(226, 1, ATS_DATA);
 		break;
 
 	case SIB_TOPF_R31:
 		_G(obj)->hide_sib(SIB_TOPF_R31);
-		_G(atds)->set_ats_str(242, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(242, 1, ATS_DATA);
 		_G(spieler).R31PflanzeWeg = true;
 		break;
 
@@ -1495,7 +1495,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_LAMPE_R52:
-		_G(atds)->del_steuer_bit(338, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(338, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R52LichtAn ^= 1;
 		check_shad(2 * (_G(spieler).R52LichtAn + 1), 1);
 		break;
@@ -1543,8 +1543,8 @@ void sib_event_inv(int16 sib_nr) {
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
 			_G(det)->start_detail(6, 255, ANI_FRONT);
-			_G(atds)->set_ats_str(27, 1, ATS_DATEI);
-			_G(atds)->set_ats_str(30, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(27, 1, ATS_DATA);
+			_G(atds)->set_ats_str(30, 1, ATS_DATA);
 		}
 		break;
 
@@ -1618,13 +1618,13 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(atds)->set_ats_str(112, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(112, 1, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
 		del_inventar(_G(spieler).AkInvent);
-		_G(atds)->set_ats_str(113, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(113, 0, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
@@ -1635,7 +1635,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_ROEHRE_R12:
 		_G(spieler).R12TalismanOk = true;
 		del_inventar(_G(spieler).AkInvent);
-		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATA);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(115, 0);
 
@@ -1646,7 +1646,7 @@ void sib_event_inv(int16 sib_nr) {
 	case SIB_GITTER2_R21:
 		_G(spieler).R21GitterMuell = exit_flip_flop(-1, 46, 27, 132, 90, -1,
 			AUSGANG_RECHTS, AUSGANG_RECHTS, _G(spieler).R21GitterMuell);
-		_G(atds)->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATA);
 		break;
 
 	case SIB_CART_FACH_R18:
@@ -1655,11 +1655,11 @@ void sib_event_inv(int16 sib_nr) {
 		_G(spieler).R18CartFach = true;
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->showStaticSpr(7);
-		_G(atds)->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATA);
 
 		if (_G(spieler).R18CartTerminal) {
 			_G(spieler).R18CartSave = true;
-			_G(atds)->set_ats_str(26, 1, INV_ATS_DATEI);
+			_G(atds)->set_ats_str(26, 1, INV_ATS_DATA);
 			start_aad_wait(120, -1);
 		} else {
 			start_aad_wait(121, -1);
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 5b53ca051ff..9a2d157940b 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -199,10 +199,10 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	add_timer_new_room();
 
 	if (Rb->AtsLoad)
-		_G(atds)->load_atds(_roomInfo->_roomNr, ATS_DATEI);
+		_G(atds)->load_atds(_roomInfo->_roomNr, ATS_DATA);
 
 	if (Rb->AadLoad)
-		_G(atds)->load_atds(_roomInfo->_roomNr, AAD_DATEI);
+		_G(atds)->load_atds(_roomInfo->_roomNr, AAD_DATA);
 }
 
 void Room::set_timer_start(int16 timer_start) {
@@ -331,7 +331,7 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 
 		if (mode == GED_LOAD) {
 			Common::SeekableReadStream *gstream = dynamic_cast<Common::SeekableReadStream *>(
-				_roomHandle[R_GEPDATEI]);
+				_roomHandle[R_GEP_DATA]);
 			_G(ged)->load_ged_pool(gstream, &_gedInfo[Rb->AkAblage],
 						        nr, _gedMem[Rb->AkAblage]);
 			_gedXAnz[Rb->AkAblage] = img->width / _gedInfo[Rb->AkAblage].X;
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 8b95fdd4d42..3884079bf36 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -39,9 +39,8 @@ extern const int16 SURIMY_TAF19_PHASEN[4][2];
 #define MAX_ROOM_HANDLE 4
 #define GED_LOAD 1
 
-#define R_VOCDATEI 1
-#define R_GEPDATEI 2
-#define R_SPEZTAF 3
+#define R_VOC_DATA 1
+#define R_GEP_DATA 2
 
 
 class JungleRoom {
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 38ed4e2418b..7a120eaaba0 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -133,7 +133,7 @@ bool Room0::getPillow() {
 		invent_2_slot(0);
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
-		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(174, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->hideStaticSpr(6);
 
 		_G(flags).AutoAniPlay = false;
@@ -159,7 +159,7 @@ bool Room0::pullSlime() {
 		invent_2_slot(1);
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
-		_G(atds)->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(175, ATS_AKTIV_BIT, ATS_DATA);
 
 		_G(flags).AutoAniPlay = false;
 		showCur();
@@ -304,7 +304,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
 			int16 anz;
-			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
+			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATA);
 			if (str_ != 0) {
 				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
@@ -318,7 +318,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
 			} else if (is_cur_inventar(PILLOW_INV)) {
-				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATEI);
+				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
 	}
@@ -542,7 +542,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 	if (mouse_on_prog_ani() == ani_nr) {
 		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
 			int16 anz;
-			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
+			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATA);
 			if (str_ != nullptr) {
 				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
@@ -556,7 +556,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
 			} else if (is_cur_inventar(SLIME_INV)) {
-				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATEI);
+				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
 	}
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 038e303fea7..230c733c1d9 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -32,9 +32,9 @@ void Room1::gottenCard() {
 	_G(det)->hideStaticSpr(2);
 	start_detail_wait(4, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATA);
 	int16 tmp;
-	_G(atds)->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATEI);
+	_G(atds)->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATA);
 }
 
 void Room1::gedAction(int index) {
@@ -53,7 +53,7 @@ void Room1::gedAction(int index) {
 
 		if (flag) {
 			start_aad_wait(54, -1);
-			_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATA);
 			_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
 			_G(obj)->calc_rsi_flip_flop(KABELABDECKUNG);
 			_G(obj)->calc_all_static_detail();
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 60778a5b222..012d3070702 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -64,12 +64,12 @@ void Room2::electrifyWalkway1() {
 	_G(spieler).R2ElectrocutedBork = true;
 	del_inventar(_G(spieler).AkInvent);
 
-	_G(atds)->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATEI);
-	_G(atds)->set_ats_str(11, 1, ATS_DATEI);
+	_G(atds)->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(19, ATS_COUNT_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(25, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_steuer_bit(8, ATS_COUNT_BIT, ATS_DATA);
+	_G(atds)->set_ats_str(11, 1, ATS_DATA);
 }
 
 void Room2::electrifyWalkway2() {
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 423a316478f..237774ace47 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -306,7 +306,7 @@ void Room3::probeTransfer() {
 	_G(auto_mov_vector)[SONDE_OBJ].Delay = _G(spieler).DelaySpeed;
 	_G(auto_mov_obj)[SONDE_OBJ].Mode = true;
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 2, (const MovLine *)SONDE_MPKT1);
-	_G(atds)->set_ats_str(24, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_ats_str(24, ATS_AKTIV_BIT, ATS_DATA);
 	
 	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1) {
 		set_ani_screen();
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 0d3347b8e34..0cbfc49bce8 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -46,7 +46,7 @@ void Room5::pushButton() {
 			_G(spieler).room_e_obj[6].Attribut = 255;
 			str_nr = 0;
 		}
-		_G(atds)->set_ats_str(29, str_nr, ATS_DATEI);
+		_G(atds)->set_ats_str(29, str_nr, ATS_DATA);
 		_G(spieler).R5Tuer ^= 1;
 		_G(obj)->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else {
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 664bf23b48c..30826351b81 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -60,7 +60,7 @@ void Room6::entry() {
 
 	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
 		_G(det)->start_detail(7, 255, ANI_FRONT);
-		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATA);
 		if (!_G(flags).LoadGame)
 			++_G(spieler).R6RaumBetreten;
 
@@ -72,7 +72,7 @@ void Room6::entry() {
 			_G(spieler).R6BolaOk = true;
 			_G(obj)->show_sib(SIB_BOLA_KNOPF_R6);
 			_G(obj)->hide_sib(SIB_BOLA_R6);
-			_G(atds)->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATA);
 			showCur();
 		}
 	}
@@ -102,8 +102,8 @@ void Room6::bola_knopf() {
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
 			wait_detail(2);
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
-			_G(atds)->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATA);
+			_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATA);
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 			_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
 		} else {
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index aec2b27158d..7cbe25078c8 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -60,8 +60,8 @@ void Room7::haken(int16 sib_nr) {
 			_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 			_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
 		}
-		_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATA);
 		dia_nr = 9;
 	} else {
 		_G(spieler).R7SeilLeft = true;
@@ -69,7 +69,7 @@ void Room7::haken(int16 sib_nr) {
 	}
 
 	_G(obj)->calc_all_static_detail();
-	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATA);
 	start_aad_wait(dia_nr, -1);
 }
 
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index f2e12162b9c..f365b6601a9 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -46,17 +46,17 @@ void Room8::entry() {
 		start_folter();
 	else
 		stop_folter();
-	_G(atds)->set_ats_str(60, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(60, 0, ATS_DATA);
 }
 
 void Room8::start_folter() {
-	_G(atds)->set_ats_str(67, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(67, 1, ATS_DATA);
 	_G(det)->stop_detail(19);
 	_G(det)->start_detail(13, 255, ANI_FRONT);
 }
 
 void Room8::stop_folter() {
-	_G(atds)->set_ats_str(67, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(67, 0, ATS_DATA);
 	_G(det)->start_detail(19, 255, ANI_FRONT);
 
 	_G(det)->stop_detail(13);
@@ -104,7 +104,7 @@ void Room8::start_verbrennen() {
 		_G(det)->stop_detail(9);
 		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
 		start_ani_block(2, ABLOCK13);
-		_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
 
@@ -160,7 +160,7 @@ void Room8::open_gdoor() {
 	_G(det)->hideStaticSpr(17);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	set_person_pos(204, 274, P_CHEWY, P_LEFT);
-	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATA);
 	_G(obj)->hide_sib(31);
 	_G(spieler).R8GTuer = true;
 	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index f89277f4a8e..cccd4cec5a2 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -64,11 +64,11 @@ void Room9::gtuer() {
 	_G(det)->showStaticSpr(5);
 	start_detail_wait(6, 1, ANI_FRONT);
 	set_person_pos(74, 93, P_CHEWY, P_LEFT);
-	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATA);
 	_G(obj)->show_sib(34);
-	_G(atds)->set_ats_str(73, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(73, 1, ATS_DATA);
 }
 
 void Room9::surimy() {
@@ -76,7 +76,7 @@ void Room9::surimy() {
 	_G(spieler).R9Surimy = true;
 	const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 	stop_person(P_CHEWY);
-	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATA);
 	_G(det)->hideStaticSpr(4);
 	_G(room)->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index d140772e8d4..01b828e954d 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -56,7 +56,7 @@ void Room10::get_surimy() {
 	flic_cut(FCUT_005);
 	_G(spieler).R10SurimyOk = true;
 	_G(room)->set_timer_status(3, TIMER_STOP);
-	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATA);
 	invent_2_slot(18);
 
 	del_inventar(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 440ad8dfec2..bcb340db889 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -59,7 +59,7 @@ void Room11::entry() {
 		_G(obj)->hide_sib(SIB_TKNOPF3_R11);
 		_G(spieler).room_e_obj[20].Attribut = 255;
 		_G(spieler).room_e_obj[21].Attribut = 255;
-		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATA);
 
 		if (!_G(flags).LoadGame) {
 			start_ani_block(2, ABLOCK17);
@@ -185,8 +185,8 @@ void Room11::get_card() {
 		cursorChoice(CUR_AK_INVENT);
 		cursorChoice(CUR_AK_INVENT);
 		_G(det)->stop_detail(0);
-		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATEI);
-		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATA);
+		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATA);
 	}
 }
 
@@ -195,8 +195,8 @@ void Room11::put_card() {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
 		del_inventar(_G(spieler).R11IdCardNr);
 		_G(det)->start_detail(0, 255, ANI_FRONT);
-		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATA);
+		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(spieler).R11CardOk = true;
 
 		if (!_G(spieler).R11TerminalOk)
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 206579245dd..5589761aa17 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -182,7 +182,7 @@ void Room12::bork_ok() {
 	start_detail_wait(4, 1, ANI_FRONT);
 	_G(talk_hide_static) = -1;
 	_G(det)->showStaticSpr(12);
-	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATEI);
+	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATA);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
 	_G(flags).MausLinks = false;
@@ -208,7 +208,7 @@ int16 Room12::use_terminal() {
 
 				load_chewy_taf(CHEWY_BORK);
 				_G(flags).NoScroll = false;
-				_G(atds)->set_ats_str(118, 0, ATS_DATEI);
+				_G(atds)->set_ats_str(118, 0, ATS_DATA);
 				_G(det)->hideStaticSpr(12);
 				_G(menu_item) = CUR_WALK;
 				cursorChoice(_G(menu_item));
@@ -241,8 +241,8 @@ void Room12::use_linke_rohr() {
 	_G(obj)->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 	_G(obj)->calc_all_static_detail();
-	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATEI);
-	_G(atds)->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 0, ATS_DATA);
+	_G(atds)->set_ats_str(117, TXT_MARK_LOOK, 1, ATS_DATA);
 	start_aad(111, 0);
 }
 
@@ -271,7 +271,7 @@ int16 Room12::useTransformerTube() {
 		if (_G(spieler).R12KetteLinks) {
 			_G(spieler).R12KetteLinks = false;
 			_G(uhr)->enableTimer();
-			_G(atds)->set_ats_str(117, 1, AAD_DATEI);
+			_G(atds)->set_ats_str(117, 1, AAD_DATA);
 		} else {
 			autoMove(7, P_CHEWY);
 			start_aad_wait(29, -1);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 3c92adc2599..db7295b7f7e 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -61,11 +61,11 @@ void Room13::entry() {
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			_G(spieler).R13Bandlauf = true;
 
-			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 
-			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 
-			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 		}
 
 		if (_G(spieler).R13Bandlauf) {
@@ -75,7 +75,7 @@ void Room13::entry() {
 		
 		if (!_G(flags).LoadGame && _G(spieler).R13Band) {
 			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-			_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 			_G(spieler).R13Band = false;
 		}
 
@@ -86,7 +86,7 @@ void Room13::entry() {
 
 void Room13::xit() {
 	_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-	_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).R13Band = false;
 }
 
@@ -133,8 +133,8 @@ void Room13::talk_bork() {
 		_G(auto_obj) = 0;
 		_G(flags).NoScroll = false;
 
-		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATA);
 		_G(obj)->show_sib(SIB_BANDKNOPF_R13);
 		set_person_pos(153, 138, P_CHEWY, P_LEFT);
 
@@ -157,7 +157,7 @@ void Room13::jmp_band() {
 		if (!_G(spieler).R13Bandlauf) {
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			_G(spieler).room_e_obj[25].Attribut = 255;
-			_G(atds)->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 			_G(spieler).R13Band = true;
 			autoMove(3, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -177,9 +177,9 @@ void Room13::jmp_band() {
 			set_person_pos(195, 226, P_CHEWY, P_LEFT);
 
 			_G(spieler).R13Bandlauf = false;
-			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
-			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATEI);
+			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
+			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
+			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 			_G(obj)->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
 			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
 			switch_room(14);
@@ -201,7 +201,7 @@ void Room13::jmp_boden() {
 			_G(obj)->show_sib(SIB_BANDKNOPF_R13);
 
 		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
-		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R13Band = false;
 		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -235,7 +235,7 @@ int16 Room13::monitor_knopf() {
 			else
 				_G(det)->showStaticSpr(11 - _G(spieler).R13MonitorStatus);
 
-			_G(atds)->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATEI);
+			_G(atds)->set_ats_str(96, TXT_MARK_LOOK, _G(spieler).R13MonitorStatus, ATS_DATA);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 9c34d907f31..90938af2bf9 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -101,7 +101,7 @@ int16 Room14::use_gleiter() {
 			start_detail_wait(10, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(det)->showStaticSpr(6);
-			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATA);
 		} else {
 			_G(spieler).R23GleiterExit = 14;
 			Room23::cockpit();
@@ -188,7 +188,7 @@ void Room14::feuer() {
 	start_detail_wait(3, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(9);
 	invent_2_slot(FLUXO_INV);
-	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATA);
 	_G(spieler).R14FluxoFlex = true;
 	_G(flags).AutoAniPlay = false;
 	showCur();
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index 36f53032646..eefbdbf42a5 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -35,11 +35,11 @@ void Room16::entry() {
 	if (!_G(spieler).R16F5Exit) {
 		_G(det)->showStaticSpr(4);
 		_G(spieler).room_e_obj[32].Attribut = 255;
-		_G(atds)->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		_G(det)->hideStaticSpr(4);
 		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
-		_G(atds)->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index bf73825686d..51511298d78 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -147,7 +147,7 @@ int16 Room17::use_seil() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_detail_wait(10, 1, ANI_FRONT);
 		_G(spieler).R17Seil = true;
-		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATA);
 		plot_seil();
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
@@ -253,7 +253,7 @@ void Room17::door_kommando(int16 mode) {
 		}
 
 		_G(flags).AutoAniPlay = false;
-		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATEI);
+		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand, ATS_DATA);
 	}
 }
 
@@ -261,7 +261,7 @@ void Room17::close_door() {
 	if (_G(spieler).R17DoorKommand) {
 		_G(spieler).room_e_obj[36].Attribut = 255;
 		_G(spieler).R17DoorKommand = false;
-		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATEI);
+		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATA);
 		_G(det)->hideStaticSpr(7);
 		_G(det)->start_detail(4, 1, ANI_BACK);
 	}
@@ -297,8 +297,8 @@ int16 Room17::energie_hebel() {
 				_G(det)->start_detail(i + 6, 255, ANI_FRONT);
 		}
 
-		_G(atds)->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
-		_G(atds)->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATEI);
+		_G(atds)->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATA);
+		_G(atds)->set_ats_str(140, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATA);
 		g_engine->_sound->playSound(12);
 
 		if (_G(spieler).R17EnergieOut) {
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 5239be70b1b..d9209431436 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -88,7 +88,7 @@ static const AniBlock ABLOCK24[2] = {
 
 void Room18::entry() {
 	_G(spieler).R18MoniSwitch = false;
-	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATEI);
+	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, 0, ATS_DATA);
 	_G(spieler).ScrollxStep = 2;
 
 	if (_G(spieler).R18CartTerminal)
@@ -109,9 +109,9 @@ void Room18::entry() {
 	
 	if (_G(spieler).R17EnergieOut) {
 		_G(det)->stop_detail(0);
-		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATA);
 	} else {
-		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATA);
 	}
 
 	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
@@ -192,10 +192,10 @@ void Room18::monitor() {
 		nr = (_G(spieler).R17EnergieOut) ? 2 : 1;
 	} else {
 		_G(det)->stop_detail(23);
-		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATA);
 	}
 
-	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATEI);
+	_G(atds)->set_ats_str(151, TXT_MARK_LOOK, nr, ATS_DATA);
 }
 
 int16 Room18::sonden_moni() {
@@ -311,13 +311,13 @@ int16 Room18::calc_surimy() {
 		_G(spieler).ScrollxStep = 2;
 		_G(auto_obj) = 0;
 
-		_G(atds)->set_ats_str(153, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(153, 1, ATS_DATA);
+		_G(atds)->set_ats_str(149, TXT_MARK_LOOK, 1, ATS_DATA);
 
 		for (int16 i = 0; i < 3; i++)
-			_G(atds)->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(158 + i, ATS_AKTIV_BIT, ATS_DATA);
 
-		_G(atds)->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(179, ATS_AKTIV_BIT, ATS_DATA);
 		showCur();
 		_G(det)->del_taf_tbl(245, 50, nullptr);
 	}
@@ -353,17 +353,17 @@ short Room18::use_cart_moni() {
 		_G(spieler).R18CartTerminal ^= 1;
 
 		if (!_G(spieler).R18CartTerminal) {
-			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATA);
 			_G(det)->hideStaticSpr(23);
 			start_detail_wait(20, 1, ANI_BACK);
 		} else {
-			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATA);
 			start_detail_wait(20, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(23);
 
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
-				_G(atds)->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATEI);
+				_G(atds)->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATA);
 				start_aad_wait(120, -1);
 			}
 		}
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 83943c2ab36..cbc5e0b884c 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -86,31 +86,31 @@ void Room21::calc_laser() {
 	if (_G(spieler).R21Hebel1 && !_G(spieler).R21Hebel2 && _G(spieler).R21Hebel3) {
 		_G(spieler).R21Laser1Weg = true;
 		_G(det)->stop_detail(3);
-		_G(atds)->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		_G(spieler).R21Laser1Weg = false;
 		_G(det)->start_detail(3, 255, ANI_FRONT);
-		_G(atds)->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (!_G(spieler).R21Hebel1 && _G(spieler).R21Hebel2 && !_G(spieler).R21Hebel3) {
 		if (!_G(obj)->checkInventory(SEIL_INV) && !_G(spieler).R17Seil) {
 			_G(obj)->show_sib(SIB_SEIL_R21);
-			_G(atds)->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		_G(spieler).R21Laser2Weg = true;
 		_G(det)->stop_detail(4);
-		_G(atds)->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATA);
 
 	} else {
 		_G(obj)->hide_sib(SIB_SEIL_R21);
-		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R21Laser2Weg = false;
 		_G(det)->start_detail(4, 255, ANI_FRONT);
-		_G(atds)->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
 
@@ -205,7 +205,7 @@ void Room21::chewy_kolli() {
 }
 
 void Room21::salto() {
-	if (!_G(spieler).inv_cur && _G(atds)->get_ats_str(134, TXT_MARK_USE, ATS_DATEI) == 8
+	if (!_G(spieler).inv_cur && _G(atds)->get_ats_str(134, TXT_MARK_USE, ATS_DATA) == 8
 		&& !_G(spieler).R21Salto && !_G(flags).AutoAniPlay) {
 		_G(spieler).R21Salto = true;
 		_G(flags).AutoAniPlay = true;
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 10e3e450ee8..003e33b5f26 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -91,7 +91,7 @@ int16 Room22::chewy_amboss() {
 		_G(flags).NoPalAfterFlc = false;
 		flic_cut(FCUT_006);
 		_G(spieler).R22ChewyPlatt = true;
-		_G(atds)->set_ats_str(79, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(79, 1, ATS_DATA);
 		_G(flags).AutoAniPlay = false;
 
 		showCur();
@@ -121,7 +121,7 @@ void Room22::bork(int16 t_nr) {
 				bork_walk1();
 			} else {
 				if (!_G(spieler).R22ChewyPlatt) {
-					_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+					_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATA);
 					_G(spieler).R22ChewyPlatt = true;
 				}
 
@@ -154,9 +154,9 @@ void Room22::bork_walk2() {
 	flic_cut(FCUT_008);
 	register_cutscene(3);
 	_G(det)->showStaticSpr(4);
-	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).R22BorkPlatt = true;
-	_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATA);
 }
 
 void Room22::get_bork() {
@@ -169,7 +169,7 @@ void Room22::get_bork() {
 		start_aad_wait(11, -1);
 		_G(det)->stop_detail(3);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATA);
 		invent_2_slot(BORK_INV);
 
 		_G(spieler).R22GetBork = true;
@@ -186,7 +186,7 @@ int16 Room22::malen() {
 		_G(flags).AutoAniPlay = true;
 		autoMove(8, P_CHEWY);
 		flic_cut(FCUT_007);
-		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(82, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(spieler).R22Paint = true;
 		_G(obj)->calc_rsi_flip_flop(SIB_PAINT_R22);
 		_G(obj)->hide_sib(SIB_PAINT_R22);
@@ -196,7 +196,7 @@ int16 Room22::malen() {
 
 		if (!_G(spieler).R22ChewyPlatt) {
 			_G(spieler).R22ChewyPlatt = true;
-			_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(79, ATS_AKTIV_BIT, ATS_DATA);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index a6af5c99c9c..01a51856d7d 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -132,20 +132,20 @@ void Room23::use_cartridge() {
 	_G(spieler).R23Cartridge = true;
 
 	if (_G(spieler).R18CartSave) {
-		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(111, 2, ATS_DATEI);
+		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(111, 2, ATS_DATA);
 		start_detail_wait(4, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(3);
 	} else {
-		_G(atds)->set_ats_str(111, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(111, 1, ATS_DATA);
 	}
 
 	_G(menu_item_vorwahl) = CUR_USE;
 }
 
 void Room23::get_cartridge() {
-	_G(atds)->set_ats_str(111, 0, ATS_DATEI);
-	_G(atds)->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_ats_str(111, 0, ATS_DATA);
+	_G(atds)->set_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATA);
 
 	_G(spieler).R23Cartridge = false;
 	_G(det)->hideStaticSpr(3);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 90a3358297a..3d6ff9238fa 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -91,7 +91,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		g_engine->_sound->stopSound(1);
 		_G(det)->start_detail(1, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(10);
-		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATA);
 
 	} else if (_G(spieler).R16F5Exit) {
 		_G(det)->hideStaticSpr(10);
@@ -99,7 +99,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		g_engine->_sound->stopSound(0);
 		_G(det)->start_detail(1, 1, ANI_BACK);
 		_G(spieler).R16F5Exit = false;
-		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATA);
 	}
 }
 
@@ -119,7 +119,7 @@ void Room24::calc_hebel_spr() {
 			_G(det)->hideStaticSpr(1 + j + i * 3);
 
 		_G(det)->showStaticSpr(1 + _G(spieler).R24Hebel[i] + i * 3);
-		_G(atds)->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATEI);
+		_G(atds)->set_ats_str(166 + i, TXT_MARK_NAME, _G(spieler).R24Hebel[i], ATS_DATA);
 	}
 }
 
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index c64d0a6e9b9..d331a9af801 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -61,7 +61,7 @@ void Room25::entry() {
 
 		if (_G(obj)->checkInventory(TRANSLATOR_INV)) {
 			_G(obj)->calc_rsi_flip_flop(SIB_TRANSLATOR_23);
-			_G(atds)->set_ats_str(113, 0, ATS_DATEI);
+			_G(atds)->set_ats_str(113, 0, ATS_DATA);
 
 			remove_inventory(TRANSLATOR_INV);
 			_G(spieler).inv_cur = false;
@@ -104,8 +104,8 @@ int16 Room25::gleiter_loesch() {
 			autoMove(2, P_CHEWY);
 			flic_cut(FCUT_030);
 			_G(obj)->calc_rsi_flip_flop(SIB_SCHLAUCH_R25);
-			_G(atds)->set_ats_str(219, 1, ATS_DATEI);
-			_G(atds)->set_ats_str(187, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(219, 1, ATS_DATA);
+			_G(atds)->set_ats_str(187, 1, ATS_DATA);
 			g_engine->_sound->stopSound(0);
 
 			for (int i = 0; i < 9; ++i)
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 5d586d51ba9..d63d69ee63e 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -32,9 +32,9 @@ void Room27::entry() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		_G(timer_nr)[0] = _G(room)->set_timer(0, 5);
 		_G(det)->set_static_ani(0, -1);
-		_G(atds)->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
-		_G(atds)->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	_G(spieler).PersonHide[P_HOWARD] = true;
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 9d6566d5c07..d46e8ec5d3f 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -72,7 +72,7 @@ void Room28::entry(int16 eib_nr) {
 					wait_show_screen(10);
 					start_aad_wait(194, -1);
 					_G(spieler).room_e_obj[62].Attribut = 255;
-					_G(atds)->set_ats_str(208, 1, ATS_DATEI);
+					_G(atds)->set_ats_str(208, 1, ATS_DATA);
 					_G(flags).NoScroll = true;
 
 					auto_scroll(0, 0);
@@ -108,7 +108,7 @@ void Room28::entry(int16 eib_nr) {
 					flic_cut(FCUT_063);
 					_G(spieler).R28ChewyPump = false;
 					invent_2_slot(K_MASKE_INV);
-					_G(atds)->set_ats_str(209, 0, ATS_DATEI);
+					_G(atds)->set_ats_str(209, 0, ATS_DATA);
 					_G(spieler).room_e_obj[69].Attribut = 255;
 					load_chewy_taf(CHEWY_NORMAL);
 
@@ -168,7 +168,7 @@ void Room28::haendler() {
 	_G(SetUpScreenFunc) = nullptr;
 	_G(spieler).R28ChewyPump = true;
 	del_inventar(K_MASKE_INV);
-	_G(atds)->set_ats_str(209, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(209, 1, ATS_DATA);
 	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
 
@@ -220,8 +220,8 @@ void Room28::use_surimy() {
 		flic_cut(FCUT_056);
 		ani_nr = CH_TALK3;
 		dia_nr = 140;
-		_G(atds)->set_ats_str(205, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(222, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(205, 1, ATS_DATA);
+		_G(atds)->set_ats_str(222, 1, ATS_DATA);
 
 	} else {
 		ani_nr = CH_TALK5;
@@ -264,7 +264,7 @@ void Room28::set_pump() {
 			if (_G(spieler).R39TranslatorUsed) {
 				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 			} else {
-				_G(atds)->set_ats_str(209, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(209, 1, ATS_DATA);
 			}
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
@@ -299,7 +299,7 @@ void Room28::get_pump() {
 		start_detail_wait(tmp, 1, ANI_BACK);
 
 		invent_2_slot(K_MASKE_INV);
-		_G(atds)->set_ats_str(209, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(209, 0, ATS_DATA);
 		_G(spieler).room_e_obj[69].Attribut = 255;
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		load_chewy_taf(CHEWY_NORMAL);
@@ -328,7 +328,7 @@ int16 Room28::use_breifkasten() {
 		autoMove(8, P_CHEWY);
 		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(179, -1);
-		_G(atds)->set_ats_str(206, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(206, 0, ATS_DATA);
 		showCur();
 		invent_2_slot(MANUSKRIPT_INV);
 		_G(spieler).R28Manuskript = true;
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index a4f98c7c08c..f12ad7e7f23 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -52,7 +52,7 @@ void Room29::entry() {
 
 	if (_G(spieler).R29AutoSitz) {
 		if (_G(spieler).ChewyAni == CHEWY_ROCKER)
-			_G(atds)->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
 		else
 			_G(det)->showStaticSpr(9);
 	}
@@ -78,7 +78,7 @@ int16 Room29::use_pumpe() {
 			autoMove(1, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->showStaticSpr(7);
-			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATA);
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
 			action_flag = true;
@@ -120,8 +120,8 @@ bool Room29::use_schlauch() {
 		start_detail_wait(4, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(8);
 		_G(det)->showStaticSpr(10);
-		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(218, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(218, 1, ATS_DATA);
 
 		_G(spieler).R29Schlauch1 = false;
 		_G(spieler).R29Schlauch2 = true;
@@ -148,7 +148,7 @@ void Room29::schlitz_sitz() {
 		start_aad_wait(63, -1);
 
 		_G(det)->stop_detail(2);
-		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(maus_links_click) = false;
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 80c2a237c9d..290bf37ec1c 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -77,16 +77,16 @@ void Room31::calc_luke() {
 		for (int16 i = 0; i < 3; i++)
 			_G(det)->showStaticSpr(5 + i);
 
-		_G(atds)->set_ats_str(244, 1, ATS_DATEI);
-		_G(atds)->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(244, 1, ATS_DATA);
+		_G(atds)->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
 
 	} else {
 		for (int16 i = 0; i < 3; i++)
 			_G(det)->hideStaticSpr(5 + i);
 
-		_G(atds)->set_ats_str(244, 0, ATS_DATEI);
-		_G(atds)->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(244, 0, ATS_DATA);
+		_G(atds)->set_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).room_e_obj[75].Attribut = 255;
 	}
 }
@@ -153,7 +153,7 @@ int16 Room31::use_topf() {
 				del_inventar(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
-				_G(atds)->set_ats_str(242, 2, ATS_DATEI);
+				_G(atds)->set_ats_str(242, 2, ATS_DATA);
 
 			} else if (is_cur_inventar(MILCH_WAS_INV)) {
 				if (_G(spieler).R31KoernerDa) {
@@ -167,7 +167,7 @@ int16 Room31::use_topf() {
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
 					dia_nr = 151;
-					_G(atds)->set_ats_str(242, 3, ATS_DATEI);
+					_G(atds)->set_ats_str(242, 3, ATS_DATA);
 				} else {
 					ani_nr = CH_TALK5;
 					dia_nr = 152;
@@ -186,7 +186,7 @@ int16 Room31::use_topf() {
 							_G(spieler).R31SurFurz = true;
 							ani_nr = CH_TALK6;
 							dia_nr = 156;
-							_G(atds)->set_ats_str(242, 4, ATS_DATEI);
+							_G(atds)->set_ats_str(242, 4, ATS_DATA);
 							cur_2_inventory();
 						}
 					} else {
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index f205182be6d..084f946ae3f 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -47,7 +47,7 @@ int16 Room32::use_howard() {
 			remove_inventory(MUNTER_INV);
 			register_cutscene(11);
 			flic_cut(FCUT_043);
-			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATA);
 			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(75, -1);
 			wait_show_screen(5);
@@ -110,10 +110,10 @@ void Room32::use_schreibmaschine() {
 						flic_cut(FCUT_044);
 						register_cutscene(12);
 						_G(det)->showStaticSpr(5);
-						_G(atds)->set_ats_str(203, 1, ATS_DATEI);
+						_G(atds)->set_ats_str(203, 1, ATS_DATA);
 						ani_nr = CH_TALK3;
 						dia_nr = 88;
-						_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATEI);
+						_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 0, ATS_DATA);
 					}
 				}
 				break;
@@ -123,7 +123,7 @@ void Room32::use_schreibmaschine() {
 				_G(spieler).R32PapierOk = true;
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
-				_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATA);
 				ani_nr = CH_TALK3;
 				dia_nr = 86;
 				break;
@@ -158,7 +158,7 @@ int16 Room32::get_script() {
 		invent_2_slot(MANUSKRIPT_INV);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(det)->hideStaticSpr(5);
-		_G(atds)->set_ats_str(203, 0, ATS_DATEI);
+		_G(atds)->set_ats_str(203, 0, ATS_DATA);
 		start_spz(CH_TALK3, 1, ANI_FRONT, P_CHEWY);
 		start_aad_wait(91, -1);
 	}
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 60d29693214..db29cf0cb20 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -71,8 +71,8 @@ void Room33::look_schublade() {
 		_G(spieler).R33SchubFirst = true;
 		hideCur();
 		autoMove(1, P_CHEWY);
-		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 1, ATS_DATA);
+		_G(atds)->set_ats_str(210, TXT_MARK_USE, 1, ATS_DATA);
 		showCur();
 	}
 }
@@ -85,9 +85,9 @@ int16 Room33::use_schublade() {
 		action_flag = true;
 		_G(spieler).R33Messer = true;
 
-		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATEI);
-		_G(atds)->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(210, TXT_MARK_NAME, 0, ATS_DATA);
+		_G(atds)->set_ats_str(210, TXT_MARK_LOOK, 1, ATS_DATA);
+		_G(atds)->set_ats_str(210, TXT_MARK_USE, 2, ATS_DATA);
 		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
 		invent_2_slot(MESSER_INV);
 		showCur();
@@ -167,7 +167,7 @@ void Room33::use_maschine() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(71, -1);
-			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		if (hocker) {
@@ -205,7 +205,7 @@ int16 Room33::get_munter() {
 		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		invent_2_slot(MUNTER_INV);
-		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->hideStaticSpr(3);
 		start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 		start_aad_wait(72, -1);
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index f4e005febce..d43175ee687 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -51,7 +51,7 @@ int16 Room35::schublade() {
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->showStaticSpr(1);
 			_G(spieler).R35Schublade = true;
-			_G(atds)->set_ats_str(234, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(234, 1, ATS_DATA);
 		} else if (!_G(spieler).R35Falle) {
 			action_flag = true;
 			autoMove(3, P_CHEWY);
@@ -63,7 +63,7 @@ int16 Room35::schublade() {
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(93, -1);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(atds)->set_ats_str(234, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(234, 2, ATS_DATA);
 		}
 	}
 
@@ -99,7 +99,7 @@ int16 Room35::use_cat() {
 			_G(obj)->show_sib(SIB_KNOCHEN_R35);
 			_G(obj)->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
 			_G(det)->showStaticSpr(7);
-			_G(atds)->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATA);
 
 			while (_G(det)->get_ani_status(2) && !SHOULD_QUIT) {
 				set_up_screen(DO_SETUP);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 8ff7dce6c7e..43f000aa285 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -179,9 +179,9 @@ int16 Room37::use_glas() {
 			flic_cut(FCUT_049);
 			invent_2_slot(GEBISS_INV);
 			_G(det)->hideStaticSpr(9);
-			_G(atds)->set_ats_str(250, 1, ATS_DATEI);
-			_G(atds)->set_ats_str(256, 1, ATS_DATEI);
-			_G(atds)->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_ats_str(250, 1, ATS_DATA);
+			_G(atds)->set_ats_str(256, 1, ATS_DATA);
+			_G(atds)->del_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATA);
 			_G(obj)->show_sib(SIB_HFUTTER2_R37);
 			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
@@ -323,9 +323,9 @@ void Room37::use_hahn() {
 
 			_G(spieler).scrollx = 320;
 			_G(flags).NoScroll = false;
-			_G(atds)->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(251, ATS_AKTIV_BIT, ATS_DATA);
+			_G(atds)->set_steuer_bit(250, ATS_AKTIV_BIT, ATS_DATA);
+			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATA);
 			_G(det)->hideStaticSpr(8);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			start_aad_wait(141, -1);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index ccb72f7c64a..6152b9f31a6 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -59,10 +59,10 @@ void Room39::entry() {
 			else
 				_G(det)->set_static_ani(5, -1);
 
-			_G(atds)->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATA);
 		}
 	} else {
-		_G(atds)->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(62, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	set_tv();
@@ -95,7 +95,7 @@ short Room39::use_howard() {
 				_G(det)->stop_detail(3);
 				start_detail_wait(4, 1, ANI_FRONT);
 				_G(det)->set_static_ani(5, -1);
-				_G(atds)->set_ats_str(62, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(62, 1, ATS_DATA);
 				start_aad_wait(169, -1);
 				showCur();
 
@@ -254,7 +254,7 @@ int16 Room39::use_tv() {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
-				_G(atds)->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATEI);
+				_G(atds)->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATA);
 				_G(spieler).R39TvRecord = _G(spieler).R39TvKanal + 1;
 			} else {
 				ani_nr = CH_TALK12;
@@ -346,9 +346,9 @@ void Room39::set_tv() {
 		}
 
 		if (_G(spieler).R39TranslatorUsed) {
-			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATEI);
+			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 2 + _G(spieler).R39TvKanal, ATS_DATA);
 		} else {
-			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(229, TXT_MARK_LOOK, 1, ATS_DATA);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 7d9dddca13c..1e0cb2dc53b 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -55,7 +55,7 @@ void Room40::entry(int16 eib_nr) {
 
 	if (_G(spieler).R40PoliceWeg == false) {
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 10);
-		_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		_G(det)->hideStaticSpr(15);
 	}
@@ -246,7 +246,7 @@ void Room40::setup_func() {
 			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 			_G(det)->hideStaticSpr(15);
 			_G(det)->start_detail(POLICE_LEFT, 1, ANI_FRONT);
-			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		switch (_G(spieler).R40PoliceAniStatus) {
@@ -271,7 +271,7 @@ void Room40::setup_func() {
 				_G(spieler).R40PoliceAniStatus = 255;
 				_G(room)->set_timer_status(255, TIMER_START);
 				_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
-				_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->del_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATA);
 			}
 			break;
 
@@ -295,7 +295,7 @@ void Room40::setup_func() {
 					_G(flags).MausLinks = false;
 					_G(flags).MainInput = true;
 					_G(spieler).R40HoUse = false;
-					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATEI);
+					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATA);
 
 				} else {
 					_G(det)->start_detail(POLICE_RIGHT, 1, ANI_FRONT);
@@ -454,7 +454,7 @@ int16 Room40::use_haendler() {
 			_G(spieler).R40HaendlerOk = true;
 			_G(spieler).R40TeilKarte = true;
 			_G(spieler).R40DuengerMit = true;
-			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATA);
 			autoMove(10, P_CHEWY);
 			autoMove(11, P_HOWARD);
 			start_aad_wait(208, -1);
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 24927e624c2..0238e2967f1 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -54,13 +54,13 @@ void Room41::entry() {
 	}
 
 	if (_G(spieler).R41Einbruch) {
-		_G(atds)->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(271, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->showStaticSpr(6);
 		_G(det)->showStaticSpr(7);
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
-		_G(atds)->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(269, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (!_G(flags).LoadGame)
@@ -148,8 +148,8 @@ void Room41::talk_hoggy2() {
 void Room41::first_talk() {
 	_G(spieler).R41FirstTalk = true;
 	start_aad_wait(134, -1);
-	_G(atds)->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATEI);
-	_G(atds)->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATA);
+	_G(atds)->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATA);
 }
 
 void Room41::start_hoggy() {
@@ -200,8 +200,8 @@ int16 Room41::use_lola() {
 		set_person_pos(127, 112, P_CHEWY, P_LEFT);
 		_G(det)->stop_detail(6);
 
-		_G(atds)->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(267, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(267, 1, ATS_DATA);
 		_G(atds)->hide_item(11, 0, 3);
 		showCur();
 	}
@@ -227,7 +227,7 @@ int16 Room41::use_brief() {
 		stop_hoggy();
 		start_aad_wait(186, -1);
 		start_hoggy();
-		_G(atds)->set_ats_str(206, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
 		_G(spieler).R40TrainMove = true;
 		_G(spieler).R28PostCar = true;
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 39a4c947ec0..4f06a721766 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -49,8 +49,8 @@ void Room42::entry() {
 			_G(SetUpScreenFunc) = setup_func;
 
 			set_person_pos(80, 43, P_HOWARD, P_LEFT);
-			_G(atds)->set_ats_str(263, 1, ATS_DATEI);
-			_G(atds)->set_ats_str(264, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(263, 1, ATS_DATA);
+			_G(atds)->set_ats_str(264, 1, ATS_DATA);
 		}
 
 		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && !_G(spieler).R42BriefOk)
@@ -63,7 +63,7 @@ void Room42::entry() {
 
 void Room42::xit() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
-		_G(atds)->set_ats_str(264, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(264, 1, ATS_DATA);
 		stop_spz();
 		_G(spieler).R42HoToBeamter = false;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
@@ -125,7 +125,7 @@ int16 Room42::use_psack() {
 		del_inventar(_G(spieler).AkInvent);
 		start_aad_wait(183, -1);
 		_G(obj)->calc_rsi_flip_flop(SIB_BKASTEN_R28);
-		_G(atds)->set_ats_str(206, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
 		_G(spieler).R40TrainMove = true;
 		_G(spieler).R28PostCar = true;
@@ -145,7 +145,7 @@ int16 Room42::use_beamter() {
 
 	if (_G(menu_item) == CUR_HOWARD) {
 		action_flag = true;
-		_G(atds)->set_ats_str(264, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(264, 2, ATS_DATA);
 		hideCur();
 		autoMove(4, P_CHEWY);
 		start_aad_wait(184, -1);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 8c27352793a..3bd25702394 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -243,7 +243,7 @@ int16 Room45::use_boy() {
 		if (is_cur_inventar(DOLLAR175_INV)) {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
-			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATEI);
+			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATA);
 			start_aad_wait(258, -1);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index e7e9924748e..53f21624437 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -50,7 +50,7 @@ bool Room48::timer(int16 t_nr, int16 ani_nr) {
 
 void Room48::calc_pic() {
 	for (int16 i = 0; i < 2; i++) {
-		_G(atds)->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(312 + i, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R48Auswahl[3 + i] = 0;
 	}
 
@@ -60,13 +60,13 @@ void Room48::calc_pic() {
 
 	if (_G(obj)->checkInventory(VCARD_INV)) {
 		_G(spieler).R48Auswahl[3] = 1;
-		_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(312, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->showStaticSpr(4);
 	}
 
 	if (_G(obj)->checkInventory(KAPPE_INV)) {
 		_G(spieler).R48Auswahl[4] = 1;
-		_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(313, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->showStaticSpr(4);
 	}
 }
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 586c5252e1c..97a8c62bd91 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -197,7 +197,7 @@ void Room49::use_boy_cigar() {
 
 	_G(obj)->addInventory(GUM_INV, &_G(room_blk));
 	inventory_2_cur(GUM_INV);
-	_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(318, ATS_AKTIV_BIT, ATS_DATA);
 
 	_G(SetUpScreenFunc) = setup_func;
 	_G(spieler).R49BoyWeg = true;
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 6cbbc66f64f..5fdeebd6ce7 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -110,7 +110,7 @@ void Room50::gedAction(int index) {
 void Room50::stop_cigar() {
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
-	_G(atds)->set_ats_str(328, 1, ATS_DATEI);
+	_G(atds)->set_ats_str(328, 1, ATS_DATA);
 	_G(det)->stop_detail(0);
 	_G(spieler).R50Zigarre = true;
 }
@@ -220,8 +220,8 @@ int16 Room50::use_gum() {
 
 		_G(obj)->addInventory(KEY_INV, &_G(room_blk));
 		inventory_2_cur(KEY_INV);
-		_G(atds)->set_ats_str(323, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(327, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(323, 1, ATS_DATA);
+		_G(atds)->set_ats_str(327, 1, ATS_DATA);
 		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 1f91a3010be..612e7f9672e 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -224,7 +224,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				_G(spieler).R51HotelRoom = true;
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
 				start_aad_wait(285, -1);
-				_G(atds)->set_ats_str(329, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(329, 1, ATS_DATA);
 				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 2e336d53fc8..5308b279567 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -83,7 +83,7 @@ int16 Room52::use_hot_dog() {
 		plot_armee(20);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
-		_G(atds)->set_ats_str(341, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(341, 1, ATS_DATA);
 		autoMove(2, P_CHEWY);
 		set_person_spr(P_LEFT, P_CHEWY);
 		start_aad_wait(288, -1);
@@ -108,9 +108,9 @@ int16 Room52::use_hot_dog() {
 		start_detail_wait(7, 1, ANI_BACK);
 		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATA);
 		start_aad_wait(303, -1);
-		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATEI);
+		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATA);
 		_G(spieler).R52KakerWeg = true;
 	}
 
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 8fade2454da..84c4ec5b4b2 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -43,7 +43,7 @@ static const AniBlock ABLOCK35[7] = {
 void Room53::entry() {
 	hideCur();
 	_G(obj)->hide_sib(SIB_VISIT_R53);
-	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
 	start_detail_wait(0, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
 	_G(timer_nr)[0] = _G(room)->set_timer(1, 7);
@@ -54,7 +54,7 @@ void Room53::man_go() {
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
 	start_detail_wait(5, 1, ANI_FRONT);
-	_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
 	if (!_G(spieler).R53Visit)
 		_G(obj)->show_sib(SIB_VISIT_R53);
 }
@@ -88,7 +88,7 @@ int16 Room53::use_man() {
 		start_ani_block(7, ABLOCK35);
 		_G(obj)->addInventory(JMKOST_INV, &_G(room_blk));
 		inventory_2_cur(JMKOST_INV);
-		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index ad25d9a8aeb..8e94446a0d3 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -165,9 +165,9 @@ int16 Room54::use_schalter() {
 				start_detail_wait(4, 1, ANI_FRONT);
 				aad_nr = 296;
 				_G(spieler).R54FputzerWeg = true;
-				_G(atds)->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
-				_G(atds)->set_ats_str(349, 1, ATS_DATEI);
-				_G(atds)->set_ats_str(351, 1, ATS_DATEI);
+				_G(atds)->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATA);
+				_G(atds)->set_ats_str(349, 1, ATS_DATA);
+				_G(atds)->set_ats_str(351, 1, ATS_DATA);
 			}
 
 			start_aad_wait(aad_nr, -1);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index ee10078ad13..faf2c0bbe9f 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -78,7 +78,7 @@ void Room55::entry() {
 			start_detail_wait(3, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(zoom_horizont) = 1;
-			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATA);
 		} else {
 			_G(spieler).scrollx = 0;
 
@@ -139,8 +139,8 @@ int16 Room55::use_stapel1() {
 			_G(det)->hideStaticSpr(0);
 			autoMove(5, P_CHEWY);
 			_G(det)->showStaticSpr(1);
-			_G(atds)->set_ats_str(354, 1, ATS_DATEI);
-			_G(atds)->set_ats_str(355, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(354, 1, ATS_DATA);
+			_G(atds)->set_ats_str(355, 1, ATS_DATA);
 
 		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
@@ -154,7 +154,7 @@ int16 Room55::use_stapel1() {
 			_G(spieler).R55EscScriptOk = true;
 			_G(det)->showStaticSpr(0);
 			del_inventar(_G(spieler).AkInvent);
-			_G(atds)->set_ats_str(354, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(354, 2, ATS_DATA);
 		} else {
 			start_aad_wait(326, -1);
 		}
@@ -211,7 +211,7 @@ int16 Room55::use_telefon() {
 				start_detail_wait(2, 1, ANI_FRONT);
 				_G(det)->hideStaticSpr(0);
 				_G(det)->hideStaticSpr(8);
-				_G(atds)->set_ats_str(354, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(354, 1, ATS_DATA);
 				flic_cut(FCUT_071);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 
@@ -289,9 +289,9 @@ void Room55::get_job() {
 	int16 r_nr;
 	if (_G(spieler).R55Job) {
 		r_nr = 55;
-		_G(atds)->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(357, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(354, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(355, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		r_nr = 54;
 		mans2rock();
@@ -346,7 +346,7 @@ void Room55::strasse(int16 mode) {
 		_G(room)->set_timer_status(4, TIMER_STOP);
 		_G(det)->del_static_ani(4);
 		_G(det)->stop_detail(4);
-		_G(atds)->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATA);
 		start_detail_wait(3, 1, ANI_BACK);
 
 		_G(spieler).scrollx = 0;
@@ -377,10 +377,10 @@ int16 Room55::use_kammeraus() {
 			_G(det)->hideStaticSpr(10);
 			_G(spieler).R55ExitDia = 322;
 			_G(spieler).R55SekWeg = true;
-			_G(atds)->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATA);
 			del_inventar(_G(spieler).AkInvent);
-			_G(atds)->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATEI);
-			_G(atds)->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATA);
+			_G(atds)->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATA);
 			strasse(1);
 			showCur();
 		}
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 9852dfabf84..3f9beb7d48b 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -116,9 +116,9 @@ void Room56::entry() {
 				_G(spieler).flags34_8 = true;
 				mode = 2;
 			} else if (_G(spieler).flags34_40) {
-				_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
-				_G(atds)->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATEI);
-				_G(atds)->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA);
+				_G(atds)->set_steuer_bit(367, ATS_AKTIV_BIT, ATS_DATA);
+				_G(atds)->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATA);
 				_G(spieler).room_e_obj[137].Attribut = 3;
 				if (_G(spieler).flags33_80) {
 					_G(out)->setPointer(nullptr);
@@ -286,7 +286,7 @@ int16 Room56::use_man() {
 int16 Room56::use_kneipe() {
 	int16 action_ret = false;
 	if (!_G(spieler).flags32_10) {
-		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && _G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) == 0) {
+		if (_G(menu_item) == CUR_WALK && !_G(spieler).inv_cur && _G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA) == 0) {
 			action_ret = true;
 			hideCur();
 			if (_G(spieler).R56Kneipe) {
@@ -441,7 +441,7 @@ void Room56::setup_func() {
 	if (_G(spieler).flags32_10)
 		return;
 	
-	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI) && _G(menu_item) == CUR_WALK) {
+	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA) && _G(menu_item) == CUR_WALK) {
 		if (_G(minfo).x + _G(spieler).scrollx >= 157 && _G(minfo).x + _G(spieler).scrollx <= 204 && _G(minfo).y >= 28 && _G(minfo).y <= 89)
 			cursorChoice(CUR_AUSGANG_OBEN);
 		else
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index de53fde3c4f..6956a1352f3 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -140,7 +140,7 @@ int16 Room57::use_pfoertner() {
 			_G(det)->hideStaticSpr(4);
 			start_detail_wait(6, 1, ANI_WAIT);
 			g_engine->_sound->stopSound(0);
-			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATA);
 		} else {
 			start_aad_wait(349, -1);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
index a1466bc5c32..b9cbae866c7 100644
--- a/engines/chewy/rooms/room59.cpp
+++ b/engines/chewy/rooms/room59.cpp
@@ -30,8 +30,8 @@ namespace Rooms {
 
 void Room59::look_poster() {
 	if (!_G(spieler).R59PosterWeg) {
-		_G(atds)->set_ats_str(302, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(301, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(302, 1, ATS_DATA);
+		_G(atds)->set_ats_str(301, 1, ATS_DATA);
 		_G(spieler).R59PosterWeg = true;
 		invent_2_slot(SPARK_INV);
 		switch_room(60);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index dbd4713dd1b..b5dd906c603 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -53,7 +53,7 @@ void Room63::entry() {
 		_G(det)->showStaticSpr(10);
 		_G(det)->showStaticSpr(12);
 	} else if (_G(spieler).R62LauraVerwandlung) {
-		_G(atds)->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(383, ATS_AKTIV_BIT, ATS_DATA);
 		_G(SetUpScreenFunc) = setup_func;
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
@@ -209,7 +209,7 @@ int16 Room63::use_fx_man() {
 		_G(det)->stop_detail(7);
 		start_detail_wait(8, 1, ANI_FRONT);
 		_G(spieler).R63FxMannWeg = true;
-		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATA);
 		showCur();
 	}
 	return action_ret;
@@ -238,7 +238,7 @@ int16 Room63::use_schalter() {
 				_G(det)->showStaticSpr(1);
 				_G(det)->hideStaticSpr(2);
 				start_aad_wait(364, -1);
-				_G(atds)->set_ats_str(385, 1, ATS_DATEI);
+				_G(atds)->set_ats_str(385, 1, ATS_DATA);
 				showCur();
 			}
 		} else {
@@ -281,9 +281,9 @@ int16 Room63::use_girl() {
 		_G(det)->stop_detail(18);
 		_G(det)->showStaticSpr(10);
 		_G(det)->showStaticSpr(12);
-		_G(atds)->set_ats_str(381, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(382, 1, ATS_DATEI);
-		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_ats_str(381, 1, ATS_DATA);
+		_G(atds)->set_ats_str(382, 1, ATS_DATA);
+		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATA);
 		start_aad_wait(367, -1);
 		showCur();
 	}
@@ -311,9 +311,9 @@ int16 Room63::use_aschenbecher() {
 				_G(det)->hideStaticSpr(12);
 				start_aad_wait(368, -1);
 				flic_cut(FCUT_080);
-				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATEI);
-				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATEI);
-				_G(atds)->set_ats_str(383, 1, ATS_DATEI);
+				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATA);
+				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATA);
+				_G(atds)->set_ats_str(383, 1, ATS_DATA);
 				_G(spieler).R63Feuer = true;
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				_G(spieler).scrollx = 0;
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 7af8113ac85..3400019d662 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -45,7 +45,7 @@ void Room64::entry() {
 			_G(spieler).R64ManWeg = true;
 			_G(det)->del_static_ani(1);
 			_G(room)->set_timer_status(1, TIMER_STOP);
-			_G(atds)->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(376, ATS_AKTIV_BIT, ATS_DATA);
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
 			hideCur();
@@ -98,7 +98,7 @@ void Room64::calc_monitor() {
 		break;
 	}
 
-	_G(atds)->set_ats_str(373, str_nr, ATS_DATEI);
+	_G(atds)->set_ats_str(373, str_nr, ATS_DATA);
 	switch (_G(spieler).R64Moni2Ani) {
 	case 0:
 		str_nr = 1;
@@ -112,7 +112,7 @@ void Room64::calc_monitor() {
 	default:
 		break;
 	}
-	_G(atds)->set_ats_str(374, str_nr, ATS_DATEI);
+	_G(atds)->set_ats_str(374, str_nr, ATS_DATA);
 }
 
 void Room64::setup_func() {
@@ -157,11 +157,11 @@ int16 Room64::use_tasche() {
 	hideCur();
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R64ManWeg) {
-			if (!_G(atds)->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI)) {
+			if (!_G(atds)->get_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATA)) {
 				autoMove(3, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				new_invent_2_cur(GERAET_INV);
-				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATEI);
+				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATA);
 				start_aad_wait(353, -1);
 			} else {
 				showCur();
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index ba49c6db886..cdc6d1745ce 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -88,8 +88,8 @@ void Room66::entry(int16 eib_nr) {
 
 void Room66::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
-	_G(atds)->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATA);
 	if (_G(spieler).PersonRoomNr[P_HOWARD] != 66)
 		return;
 
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index b6c881d9f1f..e1dc5f43ad1 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -113,13 +113,13 @@ int16 Room67::use_kommode() {
 			autoMove(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->showStaticSpr(9);
-			_G(atds)->set_ats_str(400, 1, ATS_DATEI);
+			_G(atds)->set_ats_str(400, 1, ATS_DATA);
 		} else if (!_G(spieler).R67KostuemWeg) {
 			action_flag = true;
 			_G(spieler).R67KostuemWeg = true;
 			autoMove(6, P_CHEWY);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			_G(atds)->set_ats_str(400, 2, ATS_DATEI);
+			_G(atds)->set_ats_str(400, 2, ATS_DATA);
 			new_invent_2_cur(GALA_INV);
 		}
 		showCur();
@@ -172,7 +172,7 @@ int16 Room67::talk_papagei() {
 			_G(det)->showStaticSpr(0);
 			invent_2_slot(PAPAGEI_INV);
 			showCur();
-			_G(atds)->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->set_steuer_bit(394, ATS_AKTIV_BIT, ATS_DATA);
 		}
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 632ee16f45a..11a9938df24 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -251,8 +251,8 @@ int16 Room68::use_papagei() {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->showStaticSpr(12);
 		_G(det)->start_detail(21, 255, ANI_FRONT);
-		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(407, 1, ATS_DATEI);
+		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(407, 1, ATS_DATA);
 		showCur();
 	}
 	return action_flag;
@@ -324,8 +324,8 @@ int16 Room68::use_diva() {
 		register_cutscene(22);
 		_G(det)->del_static_ani(18);
 		start_detail_wait(7, 1, ANI_FRONT);
-		_G(atds)->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATA);
 		set_person_spr(P_RIGHT, P_CHEWY);
 		start_aad_wait(402, -1);
 	} else
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 8c14da1a0fa..9f68705dea7 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -213,8 +213,8 @@ void Room71::proc2() {
 	_G(det)->start_detail(2, 255, false);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(8);
-	_G(atds)->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_steuer_bit(446, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_steuer_bit(446, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).PersonHide[P_HOWARD] = false;
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
@@ -274,7 +274,7 @@ int Room71::proc6() {
 	_G(spieler).flags28_4 = true;
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
-	_G(atds)->set_steuer_bit(443, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(443, ATS_AKTIV_BIT, ATS_DATA);
 	autoMove(3, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 160c8b5f3c5..0240738297c 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -85,7 +85,7 @@ void Room72::xit(int16 eib_nr) {
 }
 
 void Room72::proc1(int16 flicNr) {
-	_G(atds)->set_steuer_bit(389, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(389, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).flags28_10 = true;
 	wait_show_screen(7);
 	start_aad_wait(437, -1);
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index 43fbf1a378b..ae9b563a6f6 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -87,9 +87,9 @@ int Room73::proc1() {
 	_G(spieler).flags28_20 = true;
 	autoMove(3, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(atds)->del_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_ats_str(430, 1, ATS_DATEI);
+	_G(atds)->del_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(432, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_ats_str(430, 1, ATS_DATA);
 	_G(det)->showStaticSpr(3);
 	showCur();
 
@@ -106,7 +106,7 @@ int Room73::proc2() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->hideStaticSpr(3);
 	_G(det)->hideStaticSpr(4);
-	_G(atds)->set_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(433, ATS_AKTIV_BIT, ATS_DATA);
 	new_invent_2_cur(99);
 	showCur();
 
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 45e4306e980..615238689ba 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -101,10 +101,10 @@ int Room74::proc1() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(det)->start_detail(0, 255, false);
 		_G(spieler).flags29_1 = true;
-		_G(atds)->set_ats_str(435, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(435, 1, ATS_DATA);
 
 	} else if (!_G(spieler).inv_cur && _G(spieler).R74CutRubberPlant) {
-		_G(atds)->set_steuer_bit(435, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(435, ATS_AKTIV_BIT, ATS_DATA);
 		autoMove(5, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		new_invent_2_cur(RUBBER_INV);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index ec081904597..1a02387243f 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -47,18 +47,18 @@ void Room76::entry() {
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 
 	if (!_G(spieler).flags29_4) {
-		_G(atds)->del_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATA);
 
 	} else {
 		_G(det)->del_static_ani(2);
 		for (int i = 0; i < 3; ++i)
 			_G(det)->hideStaticSpr(8 + i);
 
-		_G(atds)->set_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(457, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(458, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(flags).LoadGame)
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 870e11cf4cb..22ec2047c37 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -36,7 +36,7 @@ void Room77::entry() {
 	_G(spieler).ScrollxStep = 2;
 	if (_G(spieler).r76State == 1) {
 		_G(spieler).flags29_4 = true;
-		_G(atds)->set_ats_str(452, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(452, 1, ATS_DATA);
 	}
 
 	if (_G(spieler).flags29_4) {
@@ -44,7 +44,7 @@ void Room77::entry() {
 
 		for (int i = 0; i < 3; ++i) {
 			_G(det)->showStaticSpr(2 + i);
-			_G(atds)->del_steuer_bit(460 + i, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(460 + i, ATS_AKTIV_BIT, ATS_DATA);
 		}
 	}
 
@@ -76,7 +76,7 @@ int Room77::proc1() {
 	int diaNr, aniId;
 	if (_G(spieler).flags29_8) {
 		start_spz_wait(14, 1, false, P_CHEWY);
-		_G(atds)->set_ats_str(463, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(463, 1, ATS_DATA);
 		_G(spieler).flags29_10 = true;
 		_G(spieler).flags29_40 = true;
 		diaNr = 441;
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 5522f039ba0..e004d6b8183 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -40,9 +40,9 @@ void Room80::entry() {
 	g_engine->_sound->playSound(0, 2, false);
 
 	if (_G(spieler).gottenDiary) {
-		_G(atds)->del_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
-		_G(atds)->set_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(476, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(spieler).flags32_1) {
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 2db16d4f1d3..8253970655f 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -39,7 +39,7 @@ void Room81::entry() {
 	_G(spieler).DiaAMov = 0;
 	if (_G(spieler).r88DestRoom == 84) {
 		_G(det)->showStaticSpr(0);
-		_G(atds)->del_steuer_bit(488, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(488, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	proc3();
@@ -147,8 +147,8 @@ void Room81::proc3() {
 		_G(det)->start_detail(3 + i, 255, false);
 
 	_G(det)->stop_detail(2);
-	_G(atds)->del_steuer_bit(486, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_steuer_bit(490, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(486, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_steuer_bit(490, ATS_AKTIV_BIT, ATS_DATA);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 408eec0974f..52a074c7455 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -40,8 +40,8 @@ void Room82::entry() {
 
 	if (_G(spieler).R88UsedMonkey) {
 		_G(det)->showStaticSpr(6);
-		_G(atds)->set_steuer_bit(473, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(467, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(473, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(467, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(spieler).flags37_20)
@@ -124,8 +124,8 @@ void Room82::talk1() {
 		transitionAniNr = 7;
 
 		_G(spieler).flags30_40 = true;
-		_G(atds)->set_ats_str(473, 1, ATS_DATEI);
-		_G(atds)->set_ats_str(467, 1, ATS_DATEI);		
+		_G(atds)->set_ats_str(473, 1, ATS_DATA);
+		_G(atds)->set_ats_str(467, 1, ATS_DATA);		
 	}
 
 	Room66::proc8(2, 7, transitionAniNr, transitionDiaNr);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 6df5c585a3f..ae1a28479b1 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -46,28 +46,28 @@ void Room84::entry() {
 		_G(det)->del_static_ani(3);
 		_G(det)->stop_detail(0);
 		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
-		_G(atds)->set_steuer_bit(478, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(479, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(485, 1, ATS_DATEI);	
+		_G(atds)->set_steuer_bit(478, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(479, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(485, 1, ATS_DATA);	
 	}
 
 	if (_G(spieler).flags32_10) {
 		_G(det)->start_detail(7, 255, false);
-		_G(atds)->del_steuer_bit(504, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(504, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).room_e_obj[124].Attribut = 255;
-		_G(atds)->set_ats_str(485, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(485, 2, ATS_DATA);
 	}
 
 	if (_G(spieler).r88DestRoom == 84) {
 		_G(det)->showStaticSpr(7);
-		_G(atds)->del_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(spieler).flags32_40) {
-		_G(atds)->set_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(485, 1, ATS_DATEI);		
+		_G(atds)->set_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(485, 1, ATS_DATA);		
 		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
 	}
 
@@ -99,7 +99,7 @@ void Room84::entry() {
 		_G(spieler).flags32_20 = false;
 		_G(spieler).room_e_obj[124].Attribut = 255;
 		_G(spieler).room_e_obj[125].Attribut = 255;
-		_G(atds)->set_ats_str(485, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(485, 2, ATS_DATA);
 		start_aad_wait(477, -1);
 		showCur();
 	} else {
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 0284a01d595..c75316da5ba 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -50,7 +50,7 @@ void Room85::entry(int16 eib_nr) {
 
 	if (_G(spieler).flags32_10) {
 		_G(det)->showStaticSpr(4);
-		_G(atds)->del_steuer_bit(495, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(495, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(flags).LoadGame)
@@ -65,7 +65,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 78;
 		if (_G(spieler).flags32_40) {
-			_G(atds)->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATA);
 			_G(det)->start_detail(1, 255, false);
 			set_person_pos(195, 146, P_CHEWY, P_RIGHT);
 			set_person_pos(186, 142, P_HOWARD, P_RIGHT);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 8d24e47fd45..0307dbd709e 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -154,9 +154,9 @@ int Room86::proc2() {
 	del_inventar(_G(spieler).AkInvent);
 	autoMove(3, P_CHEWY);
 	proc3(true);
-	_G(atds)->del_steuer_bit(499, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_ats_str(497, 1, ATS_DATEI);
-	_G(atds)->set_ats_str(498, 1, ATS_DATEI);
+	_G(atds)->del_steuer_bit(499, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_ats_str(497, 1, ATS_DATA);
+	_G(atds)->set_ats_str(498, 1, ATS_DATA);
 	_G(spieler).flags32_2 = true;
 	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index e63cfe44a29..a8017d3a18d 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -134,10 +134,10 @@ int Room87::proc2(int16 txt_nr) {
 		autoMove(movNr, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		start_spz_wait(14, 1, false, P_CHEWY);
-		_G(atds)->set_ats_str(txt_nr, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(txt_nr, 1, ATS_DATA);
 		_G(det)->showStaticSpr(movNr);
 		if (_G(spieler).flags32_4 && _G(spieler).flags32_8)
-			_G(atds)->del_steuer_bit(502, ATS_AKTIV_BIT, ATS_DATEI);
+			_G(atds)->del_steuer_bit(502, ATS_AKTIV_BIT, ATS_DATA);
 	}
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index c24509ac49a..e4dae6e69b4 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -42,7 +42,7 @@ void Room88::entry() {
 
 	if (_G(spieler).flags32_10) {
 		_G(det)->start_detail(4, 255, false);
-		_G(atds)->del_steuer_bit(505, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(505, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
 
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 04b0272ec7d..8eb6aad4fe6 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -200,7 +200,7 @@ int Room89::proc4() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 
 	if (_G(spieler).flags33_4) {
-		_G(atds)->set_ats_str(514, 2, ATS_DATEI);
+		_G(atds)->set_ats_str(514, 2, ATS_DATA);
 		_G(spieler).flags32_80 = true;
 		_G(det)->hideStaticSpr(6);
 		new_invent_2_cur(111);
@@ -210,7 +210,7 @@ int Room89::proc4() {
 		_G(det)->showStaticSpr(5);
 		_G(det)->showStaticSpr(6);
 		_G(spieler).flags33_4 = true;
-		_G(atds)->set_ats_str(514, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(514, 1, ATS_DATA);
 	}
 
 	showCur();
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index a3e3883f864..372fdd6fea3 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -272,8 +272,8 @@ int Room90::getHubcaps() {
 
 	start_aad_wait(517, -1);
 	_G(spieler).flags35_1 = false;
-	_G(atds)->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATA);
 	showCur();
 
 	return 1;
@@ -307,8 +307,8 @@ int Room90::shootControlUnit() {
 	_G(HowardMov) = 0;
 	_G(spieler).flags33_40 = true;
 	_G(det)->stop_detail(12);
-	_G(atds)->set_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->del_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->del_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATA);
 	_G(flags).ZoomMov = true;
 
 	showCur();
@@ -340,7 +340,7 @@ int Room90::useSurimyOnWreck() {
 	_G(spieler).scrollx = 176;
 	start_spz(45, 255, false, P_CHEWY);
 	start_aad_wait(519, -1);
-	_G(atds)->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATA);
 
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index bb5fff0bf80..00cb1981813 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -158,7 +158,7 @@ int Room94::giveGhostBottle() {
 	start_detail_wait(4, 1, ANI_FRONT);
 	_G(spieler).flags35_10 = true;
 	_G(spieler).room_e_obj[138].Attribut = AUSGANG_OBEN;
-	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATA);
 	new_invent_2_cur(114);
 	
 	showCur();
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index dba34410999..e4868c1eeb6 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -74,9 +74,9 @@ void Room97::entry() {
 	if (_G(spieler).flags36_40) {
 		_G(det)->start_detail(14, 255, ANI_FRONT);
 		_G(det)->showStaticSpr(13);
-		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
-		_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (_G(spieler).flags36_20) {
@@ -434,10 +434,10 @@ int Room97::proc6() {
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(15);
 	_G(spieler).flags36_2 = true;
-	_G(atds)->del_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_steuer_bit(531, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_ats_str(530, 1, ATS_DATEI);
-	_G(atds)->set_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_steuer_bit(531, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_ats_str(530, 1, ATS_DATA);
+	_G(atds)->set_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).flags36_8 = true;
 
@@ -455,8 +455,8 @@ int Room97::proc7() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->hideStaticSpr(17);
 	start_detail_wait(22, 1, ANI_FRONT);
-	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATEI);
-	_G(atds)->set_ats_str(530, 2, ATS_DATEI);
+	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATA);
+	_G(atds)->set_ats_str(530, 2, ATS_DATA);
 	new_invent_2_cur(SLIME_INV);
 	_G(spieler).flags36_4 = true;
 	set_person_pos(304, 102, P_CHEWY, P_RIGHT);
@@ -486,9 +486,9 @@ int Room97::proc8() {
 		_G(spieler).flags36_10 = true;
 		_G(spieler).flags36_8 = false;
 		_G(det)->start_detail(12, 255, false);
-		_G(atds)->set_ats_str(530, 3, ATS_DATEI);
-		_G(atds)->del_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_ats_str(532, 1, ATS_DATEI);
+		_G(atds)->set_ats_str(530, 3, ATS_DATA);
+		_G(atds)->del_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_ats_str(532, 1, ATS_DATA);
 		_G(det)->start_detail(6, 255, false);
 		_G(det)->hideStaticSpr(14);
 		autoMove(3, P_CHEWY);
@@ -513,8 +513,8 @@ int Room97::proc8() {
 		_G(det)->start_detail(28, 255, false);
 		_G(det)->setSetailPos(27, 272, 110);
 		_G(det)->start_detail(27, 255, false);
-		_G(atds)->set_steuer_bit(533, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->set_steuer_bit(534, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(533, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->set_steuer_bit(534, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (diaNr != -1) {
@@ -544,10 +544,10 @@ int Room97::proc9() {
 		_G(det)->start_detail(14, 255, false);
 		start_aad_wait(555, -1);
 		_G(spieler).flags36_40 = true;
-		_G(atds)->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(535, ATS_AKTIV_BIT, ATS_DATEI);
-		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+		_G(atds)->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(535, ATS_AKTIV_BIT, ATS_DATA);
+		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	showCur();
@@ -566,7 +566,7 @@ int Room97::proc10() {
 	start_detail_wait(7, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(19);
 	_G(spieler).flags37_1 = true;
-	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 
@@ -678,7 +678,7 @@ void Room97::sensorAnim() {
 	_G(menu_item) = CUR_USE;
 	cursorChoice(CUR_USE);
 	set_person_pos(294, 42, P_CHEWY, P_LEFT);
-	_G(atds)->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATA);
 	_slimeThrown = false;
 	_G(det)->start_detail(16, 1, 0);
 	
@@ -738,7 +738,7 @@ void Room97::sensorAnim() {
 		_G(spieler).flags37_2 = true;
 	}
 
-	_G(atds)->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATEI);
+	_G(atds)->set_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATA);
 	showCur();
 	_G(flags).AutoAniPlay = false;
 }
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index f236b334011..6afbad41778 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -34,7 +34,7 @@ int16 load_ads_dia(int16 dia_nr) {
 	if (_G(flags).AdsDialog == false) {
 		bool tmp = _G(atds)->ads_start(dia_nr);
 		if (tmp == true) {
-			_G(atds)->load_atds(dia_nr, ADH_DATEI);
+			_G(atds)->load_atds(dia_nr, ADH_DATA);
 			ret = true;
 			_G(ads_blk_nr) = 0;
 			_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr), &_G(ads_item_anz));
@@ -66,7 +66,7 @@ void set_ssi_xy() {
 
 int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 	int16 action_ret;
-	if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATEI)) {
+	if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATA)) {
 		action_ret = true;
 		if (_G(flags).AtsAction == false) {
 			_G(flags).AtsAction = true;
@@ -286,7 +286,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						if (_G(spieler).R16F5Exit) {
 							invent_2_slot(29);
 							_G(det)->hideStaticSpr(19);
-							_G(atds)->set_steuer_bit(158, ATS_AKTIV_BIT, ATS_DATEI);
+							_G(atds)->set_steuer_bit(158, ATS_AKTIV_BIT, ATS_DATA);
 						}
 						switch_room(18);
 						break;
@@ -1073,7 +1073,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 267:
 						if (!_G(spieler).R41LolaOk && _G(spieler).R41RepairInfo)
-							_G(atds)->set_ats_str(267, 1, ATS_DATEI);
+							_G(atds)->set_ats_str(267, 1, ATS_DATA);
 						break;
 
 					case 283:
@@ -1181,7 +1181,7 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 			if (blk_nr == 0) {
 				if (str_end_nr == 2) {
 					if (!_G(spieler).R56Kneipe)
-						_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATEI);
+						_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA);
 				}
 			}
 			break;
@@ -2246,7 +2246,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case WOLLE_INV:
 		remove_inventory(WOLLE_INV);
-		_G(atds)->set_ats_str(FLASCHE_INV, 1, INV_ATS_DATEI);
+		_G(atds)->set_ats_str(FLASCHE_INV, 1, INV_ATS_DATA);
 		_G(spieler).R56WhiskyMix = true;
 		break;
 
@@ -2266,13 +2266,13 @@ void calc_inv_use_txt(int16 test_nr) {
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		_G(flags).InventMenu = true;
-		_G(atds)->set_ats_str(88, 1, INV_ATS_DATEI);
+		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
 	case 88:
 		_G(spieler).flags26_10 = true;
 		start_aad_wait(350, -1);
-		_G(atds)->set_ats_str(88, 1, INV_ATS_DATEI);
+		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
 	case 102:
@@ -2309,7 +2309,7 @@ static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 	const char *s = _G(atds)->ats_get_txt(31, TXT_MARK_USE, &txt_anz, 16);
 	_G(calc_inv_text_str1) = Common::String::format("%s ", s);
 
-	_G(atds)->load_atds(cur_inv, INV_ATS_DATEI);
+	_G(atds)->load_atds(cur_inv, INV_ATS_DATA);
 
 	s = _G(atds)->ats_get_txt(cur_inv, TXT_MARK_NAME, &txt_anz, 6);
 	_G(calc_inv_text_str1) += s;
@@ -2317,7 +2317,7 @@ static void calc_inv_get_text(int16 cur_inv, int16 test_nr) {
 	s = _G(atds)->ats_get_txt(32, TXT_MARK_USE, &txt_anz, 16);
 	_G(calc_inv_text_str2) = Common::String::format("%s ", s);
 
-	_G(atds)->load_atds(test_nr, INV_ATS_DATEI);
+	_G(atds)->load_atds(test_nr, INV_ATS_DATA);
 
 	s = _G(atds)->ats_get_txt(test_nr, TXT_MARK_NAME, &txt_anz, 6);
 	_G(calc_inv_text_str2) += s;
@@ -2365,7 +2365,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 				if (txt_nr >= 15000) {
 					ret = start_ats_wait(txt_nr - 15000, TXT_MARK_USE, 14, INV_USE_DEF);
 				} else {
-					ret = start_ats_wait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATEI);
+					ret = start_ats_wait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATA);
 				}
 			} else {
 				Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, txt_nr);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7d753be66e0..4edfea33e00 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -34,7 +34,7 @@ namespace Chewy {
 struct SpielerFlags {
 	bool R0SlimeUsed : 1;
 	bool R0PillowThrow : 1;
-	bool R0Monokel : 1;
+	bool R0Monocle : 1;
 	bool R0GBuch : 1;
 	bool R2ElectrocutedBork : 1;
 	bool R2FussSchleim : 1;


Commit: beec516ffbad5ab38278c3341c7191844ca8c33e
    https://github.com/scummvm/scummvm/commit/beec516ffbad5ab38278c3341c7191844ca8c33e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:49-08:00

Commit Message:
CHEWY: Some more renaming

Changed paths:
    engines/chewy/data.cpp
    engines/chewy/defines.h
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/menus.cpp
    engines/chewy/object_extra.h
    engines/chewy/room.h
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/temp_file.cpp
    engines/chewy/text.cpp
    engines/chewy/timer.cpp
    engines/chewy/timer.h
    engines/chewy/types.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 4be7c73d7e3..7c0e4d9577d 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -37,10 +37,10 @@ Data::~Data() {
 
 uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream);
-	NewPhead ph;
 
 	if (rs) {
 		rs->seek(0, SEEK_SET);
+		NewPhead ph;
 		if (!ph.load(rs))
 			error("select_pool_item error");
 
@@ -59,11 +59,11 @@ uint16 Data::select_pool_item(Stream *stream, uint16 nr) {
 
 uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 	Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
-	ChunkHead ch;
 	uint32 size = 0;
 
 	if (rs) {
 		rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
+		ChunkHead ch;
 		if (!ch.load(rs))
 			error("load_tmf error");
 
@@ -90,13 +90,13 @@ uint32 Data::load_tmf(Stream *handle, TmfHeader *song) {
 }
 
 uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz) {
-	NewPhead Nph;
 	uint32 size = 0;
 
 	Common::File f;
 	if (!f.open(fname))
 		error("get_poolsize error");
 
+	NewPhead Nph;
 	if (!Nph.load(&f))
 		error("get_poolsize error");
 
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index c9b25b5c702..9e2ad7b5756 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -134,7 +134,7 @@ enum SetupScreenMode {
 
 #define INVENTAR_NORMAL 0
 
-#define INVENTAR_STATIC 1
+#define INVENTORY_STATIC 1
 #define STATIC_USE 2
 
 #define DETEDIT_REC 3
@@ -298,7 +298,7 @@ enum SetupScreenMode {
 #define SLIME_INV 1
 #define RED_CARD_INV 2
 #define KABEL_INV 3
-#define MONOKEL_INV 4
+#define MONOCLE_INV 4
 #define GBUCH_INV 5
 #define GBUCH_OPEN_INV 6
 #define DEFEKT_INV 7
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index c9857e49540..c347fd849df 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -225,7 +225,7 @@ void Inventory::menu() {
 								del_invent_slot(_G(spieler).InventSlot[k]);
 							}
 						} else if (_G(spieler).InventSlot[k] != -1)
-							obj_auswerten(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
+							evaluateObj(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
 						else {
 							_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
 							_G(obj)->sort();
@@ -554,7 +554,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 		if (txt_nr != -1) {
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
-			case INVENTAR_STATIC:
+			case INVENTORY_STATIC:
 				ok = true;
 				switch (_G(menu_item)) {
 				case CUR_LOOK:
@@ -583,14 +583,14 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 				}
 
 				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATA)) {
-					ats_action(txt_nr, m_mode, ATS_ACTION_VOR);
+					atsAction(txt_nr, m_mode, ATS_ACTION_VOR);
 				}
 				if (ok) {
 					start_ats_wait(txt_nr, m_mode, 14, ATS_DATA);
 				}
 
 				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATA))
-					ats_action(txt_nr, m_mode, ATS_ACTION_NACH);
+					atsAction(txt_nr, m_mode, ATS_ACTION_NACH);
 				if (_G(menu_item) == CUR_USE)
 					_G(flags).StaticUseTxt = true;
 				break;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 2874533abd5..ac71af8647a 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -327,7 +327,7 @@ void kb_mov(int16 mode);
 void kb_cur_action(int16 key, int16 mode);
 void mouseAction();
 
-void obj_auswerten(int16 test_nr, int16 txt_nr);
+void evaluateObj(int16 testNr, int16 txt_nr);
 
 void swap_if_l(int16 *x1, int16 *x2);
 
@@ -344,7 +344,7 @@ void del_inventar(int16 nr);
 
 bool is_cur_inventar(int16 nr);
 
-void check_shad(int16 g_idx, int16 mode);
+void check_shad(int16 palIdx, int16 mode);
 
 void get_scroll_off(int16 x, int16 y, int16 pic_x, int16 pic_y,
                     int16 *sc_x, int16 *sc_y);
@@ -450,17 +450,17 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
                         int16 ats_nr1, int16 ats_nr2, int16 sib_nr,
                         int16 spr_nr1, int16 spr_nr2, int16 flag);
 
-int16 load_ads_dia(int16 dia_nr);
+int16 loadAdsDia(int16 diaNr);
 
-void set_ssi_xy();
+void setSsiPos();
 
-int16 ats_action(int16 txt_nr, int16 txt_mode, int16 MODE);
+int16 atsAction(int16 txtNr, int16 txtMode, int16 MODE);
 
-void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr);
+void adsAction(int16 diaNr, int16 blkNr, int16 strEndNr);
 
-void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr);
+void ads_ende(int16 diaNr, int16 blkNr, int16 strEndNr);
 
-void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr,
+void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr,
                        int16 mode);
 void calc_inv_use_txt(int16 test_nr);
 bool calc_inv_no_use(int16 test_nr, int16 mode);
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index a749572008b..c21b67540a3 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -216,7 +216,7 @@ void init_atds() {
 	_G(atds)->set_delay(&_G(spieler).DelaySpeed, _G(spieler).AadSilent);
 	for (int16 i = 0; i < AAD_MAX_PERSON; i++)
 		_G(atds)->set_split_win(i, &_G(ssi)[i]);
-	_G(atds)->set_string_end_func(&atds_string_start);
+	_G(atds)->set_string_end_func(&atdsStringStart);
 }
 
 void new_game() {
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index df19e5d8193..d57bada9e89 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -605,7 +605,7 @@ void set_up_screen(SetupScreenMode mode) {
 				nr = _G(obj)->is_sib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 				if (nr != -1) {
 					txt_nr = _G(obj)->sib_txt_nr(nr);
-					mous_obj_action(nr, mode, INVENTAR_STATIC, txt_nr);
+					mous_obj_action(nr, mode, INVENTORY_STATIC, txt_nr);
 				} else
 					calc_mouse_person(_G(minfo).x, _G(minfo).y);
 			}
@@ -691,7 +691,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 
 			switch (txt_mode) {
 			case INVENTAR_NORMAL:
-			case INVENTAR_STATIC:
+			case INVENTORY_STATIC:
 				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATA);
 				break;
 			default:
@@ -714,7 +714,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 		else {
 			if (_G(spieler).inv_cur) {
-				obj_auswerten(nr, txt_mode);
+				evaluateObj(nr, txt_mode);
 			} else {
 				if (txt_mode == INVENTAR_NORMAL) {
 					if (!_G(flags).ChAutoMov) {
@@ -743,8 +743,8 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
 
 					}
-				} else if (txt_mode == INVENTAR_STATIC) {
-					obj_auswerten(nr, STATIC_USE);
+				} else if (txt_mode == INVENTORY_STATIC) {
+					evaluateObj(nr, STATIC_USE);
 				}
 			}
 		}
@@ -883,7 +883,7 @@ void mouseAction() {
 	}
 }
 
-void obj_auswerten(int16 test_nr, int16 mode) {
+void evaluateObj(int16 testNr, int16 mode) {
 	int16 ani_nr;
 	int16 txt_nr;
 	int16 tmp = _G(spieler).AkInvent;
@@ -892,19 +892,19 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 
 	switch (mode) {
 	case INVENTAR_NORMAL:
-		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, test_nr);
+		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, testNr);
 		if (ret != NO_ACTION) {
 			hideCur();
 			if (_G(flags).InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 					_G(maus_links_click) = false;
-					autoMove(_G(spieler).room_m_obj[test_nr].AutoMov, P_CHEWY);
+					autoMove(_G(spieler).room_m_obj[testNr].AutoMov, P_CHEWY);
 				}
-				txt_nr = _G(obj)->iib_txt_nr(test_nr);
+				txt_nr = _G(obj)->iib_txt_nr(testNr);
 				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
-				if (_G(spieler).room_m_obj[test_nr].AniFlag != 255) {
-					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[test_nr].HeldHide;
-					play_scene_ani(_G(spieler).room_m_obj[test_nr].AniFlag, ANI_FRONT);
+				if (_G(spieler).room_m_obj[testNr].AniFlag != 255) {
+					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[testNr].HeldHide;
+					play_scene_ani(_G(spieler).room_m_obj[testNr].AniFlag, ANI_FRONT);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
 			}
@@ -912,27 +912,27 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		}
 		break;
 
-	case INVENTAR_STATIC:
-		ret = _G(obj)->action_iib_sib(_G(spieler).AkInvent, test_nr);
+	case INVENTORY_STATIC:
+		ret = _G(obj)->action_iib_sib(_G(spieler).AkInvent, testNr);
 		if (ret != NO_ACTION) {
 			_G(maus_links_click) = false;
 			hideCur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
-				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+				autoMove(_G(spieler).room_s_obj[testNr].AutoMov, P_CHEWY);
 			}
-			txt_nr = _G(obj)->sib_txt_nr(test_nr);
-			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
-			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
-				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
+			txt_nr = _G(obj)->sib_txt_nr(testNr);
+			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
+			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
+				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					_G(obj)->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(testNr);
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
@@ -940,7 +940,7 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
 			showCur();
-			sib_event_inv(test_nr);
+			sib_event_inv(testNr);
 
 			if (!_G(spieler).inv_cur) {
 				_G(menu_item) = _G(menu_item_vorwahl);
@@ -951,41 +951,41 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		break;
 
 	case STATIC_USE:
-		ret = _G(obj)->calc_static_use(test_nr);
+		ret = _G(obj)->calc_static_use(testNr);
 		if (ret == OBJECT_1) {
 			_G(maus_links_click) = false;
 			hideCur();
-			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
+			if (_G(spieler).room_s_obj[testNr].AutoMov != 255) {
 
-				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+				autoMove(_G(spieler).room_s_obj[testNr].AutoMov, P_CHEWY);
 			}
-			txt_nr = _G(obj)->sib_txt_nr(test_nr);
-			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
-			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+			txt_nr = _G(obj)->sib_txt_nr(testNr);
+			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
+			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
 
-				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
+				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					_G(obj)->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(testNr);
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 
-			if (_G(spieler).room_s_obj[test_nr].InvNr != -1) {
-				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
+			if (_G(spieler).room_s_obj[testNr].InvNr != -1) {
+				invent_2_slot(_G(spieler).room_s_obj[testNr].InvNr);
 				action_flag = true;
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
 			showCur();
-			int16 sib_ret = sib_event_no_inv(test_nr);
+			int16 sib_ret = sib_event_no_inv(testNr);
 
 			_G(obj)->calc_all_static_detail();
 
@@ -999,23 +999,23 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 		} else if (ret == SIB_GET_INV) {
 			_G(maus_links_click) = false;
 			hideCur();
-			if (_G(spieler).room_s_obj[test_nr].AutoMov != 255) {
-				autoMove(_G(spieler).room_s_obj[test_nr].AutoMov, P_CHEWY);
+			if (_G(spieler).room_s_obj[testNr].AutoMov != 255) {
+				autoMove(_G(spieler).room_s_obj[testNr].AutoMov, P_CHEWY);
 			}
-			txt_nr = _G(obj)->sib_txt_nr(test_nr);
-			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
-			if (_G(spieler).room_s_obj[test_nr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[test_nr].HeldHide;
-				tmp = getAniDirection((int16)_G(spieler).room_s_obj[test_nr].ZustandAk);
+			txt_nr = _G(obj)->sib_txt_nr(testNr);
+			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
+			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
+				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
 
-				ani_nr = _G(spieler).room_s_obj[test_nr].AniFlag;
+				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
 
 				if (ani_nr >= 150) {
 					start_spz_wait(ani_nr - 150, 1, false, P_CHEWY);
 					ani_nr = -1;
 				} else if (ani_nr >= 100) {
 					ani_nr -= 100;
-					_G(obj)->calc_static_detail(test_nr);
+					_G(obj)->calc_static_detail(testNr);
 				}
 				if (ani_nr != -1) {
 					play_scene_ani(ani_nr, tmp);
@@ -1023,20 +1023,20 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 
-			if (_G(spieler).room_s_obj[test_nr].InvNr != -1)
-				invent_2_slot(_G(spieler).room_s_obj[test_nr].InvNr);
-			_G(obj)->calc_rsi_flip_flop(test_nr);
+			if (_G(spieler).room_s_obj[testNr].InvNr != -1)
+				invent_2_slot(_G(spieler).room_s_obj[testNr].InvNr);
+			_G(obj)->calc_rsi_flip_flop(testNr);
 			_G(menu_item_vorwahl) = CUR_WALK;
 			showCur();
-			sib_event_no_inv(test_nr);
+			sib_event_no_inv(testNr);
 			_G(obj)->calc_all_static_detail();
 			if (!_G(spieler).inv_cur) {
 				_G(menu_item) = _G(menu_item_vorwahl);
 				cursorChoice(_G(menu_item));
 			}
 		} else if (ret == NO_ACTION) {
-			txt_nr = _G(obj)->sib_txt_nr(test_nr);
-			Dialogs::Inventory::look_screen(INVENTAR_STATIC, txt_nr);
+			txt_nr = _G(obj)->sib_txt_nr(testNr);
+			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
 		}
 		break;
 
@@ -1048,14 +1048,14 @@ void obj_auswerten(int16 test_nr, int16 mode) {
 	case OBJECT_1:
 	case OBJECT_2:
 		if (mode == INVENTAR_NORMAL)
-			calc_inv_use_txt(test_nr);
+			calc_inv_use_txt(testNr);
 		break;
 
 	case NO_ACTION:
 		if (mode == STATIC_USE && _G(flags).StaticUseTxt == true)
 			_G(flags).StaticUseTxt = false;
 		else if (mode != STATIC_USE)
-			calc_inv_no_use(test_nr, mode);
+			calc_inv_no_use(testNr, mode);
 
 		break;
 
@@ -1087,7 +1087,7 @@ void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex, int16 srcS
 	}
 }
 
-void check_shad(int16 g_idx, int16 mode) {
+void check_shad(int16 palIdx, int16 mode) {
 	static const uint8 PAL_0[] = {
 		0, 0, 0,
 		39, 0, 26,
@@ -1151,7 +1151,7 @@ void check_shad(int16 g_idx, int16 mode) {
 		45, 6, 32
 	};
 
-	switch (g_idx) {
+	switch (palIdx) {
 	case 1:
 		if (mode)
 			_G(out)->set_teilpalette(PAL_1, 1, 11);
@@ -1311,11 +1311,11 @@ void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
 	}
 }
 
-int16 getAniDirection(int16 zustand) {
+int16 getAniDirection(int16 status) {
 	int16 ret = ANI_FRONT;
-	switch (zustand) {
+	switch (status) {
 	case OBJZU_ZU:
-	case OBJZU_VERSCHLOSSEN:
+	case OBJZU_LOCKED:
 		ret = ANI_BACK;
 		break;
 	default:
@@ -1388,7 +1388,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 
 					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATA)) {
-						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_VOR);
+						action_ret = atsAction(txtNr, txtMode, ATS_ACTION_VOR);
 					}
 					
 					if (ok && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
@@ -1399,7 +1399,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (_G(atds)->get_steuer_bit(txtNr, ATS_ACTION_BIT, ATS_DATA)) {
-						action_ret = ats_action(txtNr, txtMode, ATS_ACTION_NACH);
+						action_ret = atsAction(txtNr, txtMode, ATS_ACTION_NACH);
 						actionFl = true;
 						if (action_ret)
 							ret = 1;
@@ -1497,7 +1497,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 void calc_mouse_person(int16 x, int16 y) {
 	int16 mode = 0;
 	char ch_txt[MAX_PERSON][9] = {"Chewy", "Howard", "Nichelle"};
-	int16 dia_nr = -1;
+	int16 diaNr = -1;
 	if (_G(flags).ShowAtsInvTxt && !_G(flags).InventMenu) {
 		int16 p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
@@ -1555,7 +1555,7 @@ void calc_mouse_person(int16 x, int16 y) {
 							switch (p_nr) {
 							case P_HOWARD:
 							case P_NICHELLE:
-								dia_nr = true;
+								diaNr = true;
 								calc_person_dia(p_nr);
 								break;
 
@@ -1573,7 +1573,7 @@ void calc_mouse_person(int16 x, int16 y) {
 							break;
 
 						}
-						if (dia_nr == -1) {
+						if (diaNr == -1) {
 							if (txt_nr != 30000) {
 								if (_G(menu_item) != CUR_WALK) {
 									if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 52752a0f449..167d1073333 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -35,7 +35,7 @@ void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex,
 short calcMouseText(int16 x, int16 y, int16 mode);
 void calc_ani_timer();
 void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr);
-int16 getAniDirection(int16 zustand);
+int16 getAniDirection(int16 status);
 void menuEntry();
 void menuExit();
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 674b3add13f..245d9c449f6 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/detail.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
 #include "chewy/main.h"
@@ -275,12 +276,12 @@ void ads_menu() {
 				_G(minfo).y = 159;
 				AdsNextBlk *an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
 				if (an_blk->BlkNr == -1) {
-					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
+					adsAction(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					ads_ende(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					stop_ads_dialog();
 				} else {
 					an_blk = _G(atds)->calc_next_block(_G(ads_blk_nr), cur_y);
-					ads_action(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
+					adsAction(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					_G(ads_blk_nr) = an_blk->BlkNr;
 					_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr),
 					                                  &_G(ads_item_anz));
diff --git a/engines/chewy/object_extra.h b/engines/chewy/object_extra.h
index 32e47beb1e0..23c59c20399 100644
--- a/engines/chewy/object_extra.h
+++ b/engines/chewy/object_extra.h
@@ -31,7 +31,7 @@ namespace Chewy {
 #define OBJZU_ZU 1
 #define OBJZU_AN 2
 #define OBJZU_AUS 3
-#define OBJZU_VERSCHLOSSEN 5
+#define OBJZU_LOCKED 5
 #define OBJZU_GEOEFFNET 6
 #define OBJZU_NASS 7
 #define OBJZU_TROCKEN 8
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 3884079bf36..7cbc25327da 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -22,6 +22,7 @@
 #ifndef CHEWY_ROOM_H
 #define CHEWY_ROOM_H
 
+#include "chewy/detail.h"
 #include "chewy/object_extra.h"
 
 namespace Chewy {
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index f365b6601a9..410e2c97083 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -174,12 +174,12 @@ void Room8::talk_nimoy() {
 		int16 diaNr = _G(spieler).R8GipsWurf ? 2 : 1;
 
 		if (!_G(spieler).R8GTuer)
-			load_ads_dia(diaNr);
+			loadAdsDia(diaNr);
 		else
 			start_aad_wait(61, -1);
 	} else {
 		start_aad_wait(603, -1);
-		load_ads_dia(6);
+		loadAdsDia(6);
 	}
 
 	_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index bcb340db889..cf09dfdd9e6 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -156,7 +156,7 @@ int16 Room11::scanner() {
 			cursorChoice(_G(menu_item));
 			start_aad_wait(12, -1);
 			showCur();
-			load_ads_dia(3);
+			loadAdsDia(3);
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
@@ -167,7 +167,7 @@ int16 Room11::scanner() {
 				start_aad_wait(12, -1);
 				_G(menu_item) = CUR_TALK;
 				cursorChoice(_G(menu_item));
-				load_ads_dia(3);
+				loadAdsDia(3);
 			}
 		}
 	}
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 90938af2bf9..8bf076b7b3c 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -117,7 +117,7 @@ void Room14::talk_eremit()  {
 		_G(flags).AutoAniPlay = true;
 
 		if (_G(spieler).R14Translator) {
-			load_ads_dia(0);
+			loadAdsDia(0);
 			_G(obj)->show_sib(46);
 		} else {
 			hideCur();
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 0307dbd709e..fbb680c1ac9 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/detail.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
 #include "chewy/room.h"
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index e4dae6e69b4..7e507aaa608 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "chewy/defines.h"
+#include "chewy/detail.h"
 #include "chewy/events.h"
 #include "chewy/globals.h"
 #include "chewy/room.h"
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index d801dfb9df5..9b38c939bff 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -22,6 +22,7 @@
 #include "chewy/defines.h"
 #include "chewy/globals.h"
 #include "chewy/sound.h"
+#include "chewy/detail.h"
 
 namespace Chewy {
 
@@ -451,7 +452,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 	_G(maus_links_click) = false;
 	_G(talk_start_ani) = -1;
 	_G(talk_hide_static) = -1;
-	set_ssi_xy();
+	setSsiPos();
 	_G(atds)->start_aad(dia_nr);
 
 	while (!SHOULD_QUIT && (
@@ -470,7 +471,7 @@ void start_aad_wait(int16 dia_nr, int16 str_nr) {
 
 void start_aad(int16 dia_nr) {
 	g_engine->_sound->waitForSpeechToFinish();
-	set_ssi_xy();
+	setSsiPos();
 	_G(atds)->start_aad(dia_nr);
 }
 
@@ -486,7 +487,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 		_G(flags).AtsText = true;
 		if (txt_nr != -1) {
 			if (_G(menu_item) != CUR_WALK)
-				atds_string_start(30000, 0, 0, AAD_STR_START);
+				atdsStringStart(30000, 0, 0, AAD_STR_START);
 
 			ret = _G(atds)->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
 
@@ -514,7 +515,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 			}
 
 			if (_G(menu_item) != CUR_WALK)
-				atds_string_start(30000, 0, 0, AAD_STR_END);
+				atdsStringStart(30000, 0, 0, AAD_STR_END);
 		}
 
 		_G(flags).AtsText = false;
@@ -561,7 +562,7 @@ void start_ads_wait(int16 dia_nr) {
 	if (!_G(flags).AdsDialog) {
 		_G(menu_item) = CUR_TALK;
 		cursorChoice(_G(menu_item));
-		load_ads_dia(dia_nr);
+		loadAdsDia(dia_nr);
 		while (_G(flags).AdsDialog && !SHOULD_QUIT) {
 			set_up_screen(DO_SETUP);
 		}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 6afbad41778..558c741b675 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -28,13 +28,13 @@
 
 namespace Chewy {
 
-int16 load_ads_dia(int16 dia_nr) {
+int16 loadAdsDia(int16 diaNr) {
 	int16 ret = false;
 
 	if (_G(flags).AdsDialog == false) {
-		bool tmp = _G(atds)->ads_start(dia_nr);
+		bool tmp = _G(atds)->ads_start(diaNr);
 		if (tmp == true) {
-			_G(atds)->load_atds(dia_nr, ADH_DATA);
+			_G(atds)->load_atds(diaNr, ADH_DATA);
 			ret = true;
 			_G(ads_blk_nr) = 0;
 			_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr), &_G(ads_item_anz));
@@ -43,8 +43,8 @@ int16 load_ads_dia(int16 dia_nr) {
 			_G(ads_tmp_dsp) = _G(spieler).DispFlag;
 			_G(spieler).DispFlag = false;
 
-			set_ssi_xy();
-			_G(ads_dia_nr) = dia_nr;
+			setSsiPos();
+			_G(ads_dia_nr) = diaNr;
 			_G(talk_start_ani) = -1;
 			_G(talk_hide_static) = -1;
 		}
@@ -52,7 +52,7 @@ int16 load_ads_dia(int16 dia_nr) {
 	return ret;
 }
 
-void set_ssi_xy() {
+void setSsiPos() {
 	int16 tmp = 0;
 
 	for (int16 i = 0; i < MAX_PERSON; i++) {
@@ -64,16 +64,16 @@ void set_ssi_xy() {
 	}
 }
 
-int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
-	int16 action_ret;
-	if (!_G(atds)->get_steuer_bit(txt_nr, ATS_AKTIV_BIT, ATS_DATA)) {
-		action_ret = true;
+int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
+	int16 retValue;
+	if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
+		retValue = true;
 		if (_G(flags).AtsAction == false) {
 			_G(flags).AtsAction = true;
 			if (mode == ATS_ACTION_NACH) {
-				switch (txt_mode) {
+				switch (txtMode) {
 				case TXT_MARK_LOOK:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 229:
 						autoMove(2, P_CHEWY);
 						Room39::look_tv(true);
@@ -118,20 +118,20 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 
 					}
 					break;
 
 				case TXT_MARK_USE:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 62:
-						action_ret = Room39::use_howard();
+						retValue = Room39::use_howard();
 						break;
 
 					case 67:
-						action_ret = Room8::gips_wurf();
+						retValue = Room8::gips_wurf();
 						break;
 
 					case 71:
@@ -147,7 +147,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							start_detail_wait(5, 1, ANI_FRONT);
 							_G(spieler).PersonHide[P_CHEWY] = false;
 						} else {
-							action_ret = false;
+							retValue = false;
 						}
 						break;
 
@@ -161,12 +161,12 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							start_aad_wait(108, 0);
 							showCur();
 						} else {
-							action_ret = false;
+							retValue = false;
 						}
 						break;
 
 					case 79:
-						action_ret = Room22::chewy_amboss();
+						retValue = Room22::chewy_amboss();
 						break;
 
 					case 80:
@@ -179,15 +179,15 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 82:
-						action_ret = Room22::malen();
+						retValue = Room22::malen();
 						break;
 
 					case 84:
-						action_ret = Room11::scanner();
+						retValue = Room11::scanner();
 						break;
 
 					case 92:
-						action_ret = Room13::monitor_knopf();
+						retValue = Room13::monitor_knopf();
 						break;
 
 					case 104:
@@ -196,23 +196,23 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 							_G(spieler).R14Translator = true;
 							start_aad_wait(25, -1);
 						} else
-							action_ret = false;
+							retValue = false;
 						break;
 
 					case 107:
-						action_ret = Room14::use_gleiter();
+						retValue = Room14::use_gleiter();
 						break;
 
 					case 108:
-						action_ret = Room14::use_schrott();
+						retValue = Room14::use_schrott();
 						break;
 
 					case 109:
-						action_ret = Room14::use_schleim();
+						retValue = Room14::use_schleim();
 						break;
 
 					case 110:
-						action_ret = Room23::start_gleiter();
+						retValue = Room23::start_gleiter();
 						break;
 
 					case 114:
@@ -220,23 +220,23 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 117:
-						action_ret = Room12::chewy_trans();
+						retValue = Room12::chewy_trans();
 						break;
 
 					case 118:
-						action_ret = Room12::useTransformerTube();
+						retValue = Room12::useTransformerTube();
 						break;
 
 					case 119:
-						action_ret = Room12::use_terminal();
+						retValue = Room12::use_terminal();
 						break;
 
 					case 123:
-						action_ret = Room16::use_gleiter();
+						retValue = Room16::use_gleiter();
 						break;
 
 					case 133:
-						action_ret = Room21::use_fenster();
+						retValue = Room21::use_fenster();
 						break;
 
 					case 134:
@@ -244,7 +244,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 137:
-						action_ret = Room17::use_seil();
+						retValue = Room17::use_seil();
 						break;
 
 					case 139:
@@ -252,34 +252,34 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 142:
-						action_ret = Room17::energie_hebel();
+						retValue = Room17::energie_hebel();
 						break;
 
 					case 146:
-						action_ret = Room17::get_oel();
+						retValue = Room17::get_oel();
 						break;
 
 					case 149:
 					case 153:
-						action_ret = Room18::calc_surimy();
+						retValue = Room18::calc_surimy();
 						break;
 
 					case 154:
-						action_ret = Room18::use_cart_moni();
+						retValue = Room18::use_cart_moni();
 						break;
 
 					case 158:
-						action_ret = Room18::go_cyberspace();
+						retValue = Room18::go_cyberspace();
 						break;
 
 					case 159:
-						action_ret = Room18::calc_schalter();
+						retValue = Room18::calc_schalter();
 						break;
 
 					case 161:
 					case 162:
 					case 163:
-						Room24::use_hebel(txt_nr);
+						Room24::use_hebel(txtNr);
 						break;
 
 					case 165:
@@ -292,55 +292,55 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 174:
-						action_ret = Room0::getPillow();
+						retValue = Room0::getPillow();
 						break;
 
 					case 175:
-						action_ret = Room0::pullSlime();
+						retValue = Room0::pullSlime();
 						break;
 
 					case 179:
-						action_ret = Room18::sonden_moni();
+						retValue = Room18::sonden_moni();
 						break;
 
 					case 187:
-						action_ret = Room25::use_gleiter();
+						retValue = Room25::use_gleiter();
 						break;
 
 					case 203:
-						action_ret = Room32::get_script();
+						retValue = Room32::get_script();
 						break;
 
 					case 206:
-						action_ret = Room28::use_breifkasten();
+						retValue = Room28::use_breifkasten();
 						break;
 
 					case 210:
-						action_ret = Room33::use_schublade();
+						retValue = Room33::use_schublade();
 						break;
 
 					case 212:
-						action_ret = Room29::zaun_sprung();
+						retValue = Room29::zaun_sprung();
 						break;
 
 					case 215:
-						action_ret = Room29::use_schlauch();
+						retValue = Room29::use_schlauch();
 						break;
 
 					case 216:
-						action_ret = Room29::use_pumpe();
+						retValue = Room29::use_pumpe();
 						break;
 
 					case 218:
-						action_ret = Room29::get_schlauch();
+						retValue = Room29::get_schlauch();
 						break;
 
 					case 219:
-						action_ret = Room25::gleiter_loesch();
+						retValue = Room25::gleiter_loesch();
 						break;
 
 					case 220:
-						action_ret = Room34::use_kuehlschrank();
+						retValue = Room34::use_kuehlschrank();
 						break;
 
 					case 221:
@@ -352,11 +352,11 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 229:
-						action_ret = Room39::use_tv();
+						retValue = Room39::use_tv();
 						break;
 
 					case 230:
-						action_ret = Room32::use_howard();
+						retValue = Room32::use_howard();
 						break;
 
 					case 231:
@@ -364,27 +364,27 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 234:
-						action_ret = Room35::schublade();
+						retValue = Room35::schublade();
 						break;
 
 					case 235:
-						action_ret = Room35::use_cat();
+						retValue = Room35::use_cat();
 						break;
 
 					case 242:
-						action_ret = Room31::use_topf();
+						retValue = Room31::use_topf();
 						break;
 
 					case 244:
-						action_ret = Room31::open_luke();
+						retValue = Room31::open_luke();
 						break;
 
 					case 245:
-						action_ret = Room31::close_luke_proc1();
+						retValue = Room31::close_luke_proc1();
 						break;
 
 					case 249:
-						action_ret = Room37::use_wippe();
+						retValue = Room37::use_wippe();
 						break;
 
 					case 251:
@@ -392,53 +392,53 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 256:
-						action_ret = Room37::use_glas();
+						retValue = Room37::use_glas();
 						break;
 
 					case 263:
-						action_ret = Room42::use_beamter();
+						retValue = Room42::use_beamter();
 						break;
 
 					case 264:
-						action_ret = Room42::use_psack();
+						retValue = Room42::use_psack();
 						break;
 
 					case 266:
-						action_ret = Room41::use_brief();
+						retValue = Room41::use_brief();
 						break;
 
 					case 267:
-						action_ret = Room41::use_lola();
+						retValue = Room41::use_lola();
 						break;
 
 					case 269:
-						action_ret = Room41::use_kasse();
+						retValue = Room41::use_kasse();
 						break;
 
 					case 275:
-						action_ret = Room40::use_police();
+						retValue = Room40::use_police();
 						break;
 
 					case 276:
-						action_ret = Room40::use_tele();
+						retValue = Room40::use_tele();
 						break;
 
 					case 278:
-						action_ret = Room40::use_mr_pumpkin();
+						retValue = Room40::use_mr_pumpkin();
 						break;
 
 					case 284:
-						action_ret = Room40::use_bmeister();
+						retValue = Room40::use_bmeister();
 						break;
 
 					case 286:
 					case 292:
 					case 293:
-						Room47::use_knopf(txt_nr);
+						Room47::use_knopf(txtNr);
 						break;
 
 					case 288:
-						action_ret = Room46::use_schloss();
+						retValue = Room46::use_schloss();
 						break;
 
 					case 294:
@@ -447,27 +447,27 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 
 					case 295:
 					case 297:
-						action_ret = Room45::use_boy();
+						retValue = Room45::use_boy();
 						break;
 
 					case 315:
-						action_ret = Room49::use_taxi();
+						retValue = Room49::use_taxi();
 						break;
 
 					case 318:
-						action_ret = Room49::use_boy();
+						retValue = Room49::use_boy();
 						break;
 
 					case 319:
-						action_ret = Room53::use_man();
+						retValue = Room53::use_man();
 						break;
 
 					case 323:
-						action_ret = Room50::use_gutschein();
+						retValue = Room50::use_gutschein();
 						break;
 
 					case 327:
-						action_ret = Room50::use_gum();
+						retValue = Room50::use_gum();
 						break;
 
 					case 329:
@@ -476,7 +476,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 					case 332:
 					case 333:
 					case 334:
-						action_ret = Room51::use_door(txt_nr);
+						retValue = Room51::use_door(txtNr);
 						break;
 
 					case 340:
@@ -484,50 +484,50 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 341:
-						action_ret = Room52::use_hot_dog();
+						retValue = Room52::use_hot_dog();
 						break;
 
 					case 343:
-						action_ret = Room54::use_zelle();
+						retValue = Room54::use_zelle();
 						break;
 
 					case 344:
-						action_ret = Room57::use_pfoertner();
+						retValue = Room57::use_pfoertner();
 						break;
 
 					case 345:
-						action_ret = Room54::use_azug();
+						retValue = Room54::use_azug();
 						break;
 
 					case 346:
-						action_ret = Room54::use_schalter();
+						retValue = Room54::use_schalter();
 						break;
 
 					case 347:
 					case 387:
-						action_ret = Room54::use_taxi();
+						retValue = Room54::use_taxi();
 						break;
 
 					case 351:
 					case 352:
-						action_ret = Room55::use_kammeraus();
+						retValue = Room55::use_kammeraus();
 						break;
 
 					case 354:
-						action_ret = Room55::use_stapel1();
+						retValue = Room55::use_stapel1();
 						break;
 
 					case 355:
-						action_ret = Room55::use_stapel2();
+						retValue = Room55::use_stapel2();
 						break;
 
 					case 357:
-						action_ret = Room55::use_telefon();
+						retValue = Room55::use_telefon();
 						break;
 
 					case 360:
 					case 388:
-						action_ret = Room57::use_taxi();
+						retValue = Room57::use_taxi();
 						break;
 
 					case 362:
@@ -535,131 +535,131 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 366:
-						action_ret = Room56::use_man();
+						retValue = Room56::use_man();
 						break;
 
 					case 367:
-						action_ret = Room56::use_taxi();
+						retValue = Room56::use_taxi();
 						break;
 
 					case 371:
-						action_ret = Room62::use_laura();
+						retValue = Room62::use_laura();
 						break;
 
 					case 375:
-						action_ret = Room64::use_tasche();
+						retValue = Room64::use_tasche();
 						break;
 
 					case 380:
-						action_ret = Room63::use_girl();
+						retValue = Room63::use_girl();
 						break;
 
 					case 383:
-						action_ret = Room63::use_aschenbecher();
+						retValue = Room63::use_aschenbecher();
 						break;
 
 					case 384:
-						action_ret = Room63::use_fx_man();
+						retValue = Room63::use_fx_man();
 						break;
 
 					case 385:
-						action_ret = Room63::use_schalter();
+						retValue = Room63::use_schalter();
 						break;
 
 					case 386:
-						action_ret = Room45::use_taxi();
+						retValue = Room45::use_taxi();
 						break;
 
 					case 394:
-						action_ret = Room67::talk_papagei();
+						retValue = Room67::talk_papagei();
 						break;
 
 					case 399:
-						action_ret = Room67::use_grammo();
+						retValue = Room67::use_grammo();
 						break;
 
 					case 400:
-						action_ret = Room67::use_kommode();
+						retValue = Room67::use_kommode();
 						break;
 
 					case 403:
 					case 405:
-						action_ret = Room69::use_bruecke();
+						retValue = Room69::use_bruecke();
 						break;
 
 					case 406:
-						action_ret = Room68::use_papagei();
+						retValue = Room68::use_papagei();
 						break;
 
 					case 407:
-						action_ret = Room68::use_diva();
+						retValue = Room68::use_diva();
 						break;
 
 					case 410:
-						action_ret = Room68::use_keeper();
+						retValue = Room68::use_keeper();
 						break;
 
 					case 414:
-						action_ret = Room68::use_indigo();
+						retValue = Room68::use_indigo();
 						break;
 
 					case 425:
-						action_ret = Room66::proc7();
+						retValue = Room66::proc7();
 						break;
 
 					case 430:
-						action_ret = Room73::proc1();
+						retValue = Room73::proc1();
 						break;
 
 					case 433:
-						action_ret = Room73::proc2();
+						retValue = Room73::proc2();
 						break;
 
 					case 435:
-						action_ret = Room74::proc1();
+						retValue = Room74::proc1();
 						break;
 
 					case 442:
-						action_ret = Room71::proc1();
+						retValue = Room71::proc1();
 						break;
 
 					case 443:
-						action_ret = Room71::proc6();
+						retValue = Room71::proc6();
 						break;
 
 					case 452:
-						action_ret = Room76::proc7();
+						retValue = Room76::proc7();
 						break;
 
 					case 458:
-						action_ret = Room76::proc6();
+						retValue = Room76::proc6();
 						break;
 
 					case 463:
-						action_ret = Room77::proc1();
+						retValue = Room77::proc1();
 						break;
 
 					case 464:
-						action_ret = Room77::proc2();
+						retValue = Room77::proc2();
 						break;
 
 					case 467:
 					case 473:
-						action_ret = Room82::proc9();
+						retValue = Room82::proc9();
 						break;
 
 					case 468:
-						action_ret = Room82::proc6();
+						retValue = Room82::proc6();
 						break;
 
 					case 471:
-						action_ret = Room82::proc3();
+						retValue = Room82::proc3();
 						break;
 
 
 					case 481:
 					case 482:
-						action_ret = Room84::proc4();
+						retValue = Room84::proc4();
 						break;
 
 					case 487:
@@ -667,111 +667,111 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 490:
-						action_ret = Room81::proc2();
+						retValue = Room81::proc2();
 						break;
 
 					case 492:
-						action_ret = Room88::proc2();
+						retValue = Room88::proc2();
 						break;
 
 					case 493:
-						action_ret = Room88::proc3();
+						retValue = Room88::proc3();
 						break;
 
 					case 494:
-						action_ret = Room88::proc1();
+						retValue = Room88::proc1();
 						break;
 
 					case 495:
-						action_ret = Room85::proc2();
+						retValue = Room85::proc2();
 						break;
 
 					case 497:
-						action_ret = Room86::proc2();
+						retValue = Room86::proc2();
 						break;
 
 					case 501:
 					case 503:
-						action_ret = Room87::proc2(txt_nr);
+						retValue = Room87::proc2(txtNr);
 						break;
 
 					case 502:
-						action_ret = Room87::proc4();
+						retValue = Room87::proc4();
 						break;
 
 					case 508:
-						action_ret = Room89::proc2();
+						retValue = Room89::proc2();
 						break;
 
 					case 509:
-						action_ret = Room89::proc5();
+						retValue = Room89::proc5();
 						break;
 
 					case 514:
-						action_ret = Room89::proc4();
+						retValue = Room89::proc4();
 						break;
 
 					case 517:
-						action_ret = Room90::getHubcaps();
+						retValue = Room90::getHubcaps();
 						break;
 
 					case 519:
-						action_ret = Room90::shootControlUnit();
+						retValue = Room90::shootControlUnit();
 						break;
 
 					case 520:
-						action_ret = Room90::useSurimyOnWreck();
+						retValue = Room90::useSurimyOnWreck();
 						break;
 
 					case 522:
-						action_ret = Room94::giveGhostBottle();
+						retValue = Room94::giveGhostBottle();
 						break;
 
 					case 525:
-						action_ret = Room95::proc2();
+						retValue = Room95::proc2();
 						break;
 
 					case 530:
-						action_ret = Room97::proc8();
+						retValue = Room97::proc8();
 						break;
 
 					case 531:
-						action_ret = Room97::proc6();
+						retValue = Room97::proc6();
 						break;
 
 					case 535:
-						action_ret = Room97::proc11();
+						retValue = Room97::proc11();
 						break;
 
 					case 538:
-						action_ret = Room97::proc7();
+						retValue = Room97::proc7();
 						break;
 
 					case 539:
-						action_ret = Room97::proc9();
+						retValue = Room97::proc9();
 						break;
 
 					case 541:
-						action_ret = Room97::throwSlime();
+						retValue = Room97::throwSlime();
 						break;
 
 					case 542:
-						action_ret = Room97::proc5();
+						retValue = Room97::proc5();
 						break;
 
 					case 543:
-						action_ret = Room97::proc10();
+						retValue = Room97::proc10();
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 
 					}
 					break;
 
 				case TXT_MARK_WALK:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 94:
 						Room13::jmp_band();
 						break;
@@ -802,12 +802,12 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 362:
-						action_ret = Room56::use_kneipe();
+						retValue = Room56::use_kneipe();
 						break;
 
 					case 403:
 					case 405:
-						action_ret = Room69::use_bruecke();
+						retValue = Room69::use_bruecke();
 						break;
 
 					case 487:
@@ -816,14 +816,14 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 						
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 
 					}
 					break;
 
 				case TXT_MARK_TALK:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 11:
 						autoMove(3, P_CHEWY);
 						_G(det)->stop_detail(5);
@@ -936,7 +936,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 394:
-						action_ret = Room67::talk_papagei();
+						retValue = Room67::talk_papagei();
 						break;
 
 					case 408:
@@ -1013,7 +1013,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 					}
 					break;
@@ -1023,9 +1023,9 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 				}
 
 			} else if (mode == ATS_ACTION_VOR) {
-				switch (txt_mode) {
+				switch (txtMode) {
 				case TXT_MARK_LOOK:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 210:
 						Room33::look_schublade();
 						break;
@@ -1043,13 +1043,13 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 					}
 					break;
 
 				case TXT_MARK_USE:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 90:
 						_G(atds)->set_ats_str(90, TXT_MARK_USE, _G(spieler).R13Band);
 						break;
@@ -1068,7 +1068,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 225:
-						action_ret = Room33::get_munter();
+						retValue = Room33::get_munter();
 						break;
 
 					case 267:
@@ -1077,25 +1077,25 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					case 283:
-						action_ret = Room40::use_haendler();
+						retValue = Room40::use_haendler();
 						break;
 
 					case 423:
-						action_ret = Room66::proc2();
+						retValue = Room66::proc2();
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 					}
 					break;
 
 				case TXT_MARK_WALK:
-					action_ret = false;
+					retValue = false;
 					break;
 
 				case TXT_MARK_TALK:
-					switch (txt_nr) {
+					switch (txtNr) {
 					case 104:
 						Room14::talk_eremit();
 						break;
@@ -1109,7 +1109,7 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 						break;
 
 					default:
-						action_ret = false;
+						retValue = false;
 						break;
 
 					}
@@ -1123,26 +1123,26 @@ int16 ats_action(int16 txt_nr, int16 txt_mode, int16 mode) {
 			_G(flags).AtsAction = false;
 		}
 	} else {
-		action_ret = false;
+		retValue = false;
 	}
 
-	return action_ret;
+	return retValue;
 }
 
-void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
+void adsAction(int16 diaNr, int16 blkNr, int16 strEndNr) {
 	if (_G(flags).AdsAction == false) {
 		_G(flags).AdsAction = true;
 
-		switch (dia_nr) {
+		switch (diaNr) {
 		case 2:
-			if (blk_nr == 4 && str_end_nr == 0) {
+			if (blkNr == 4 && strEndNr == 0) {
 
 				_G(obj)->show_sib(31);
 			}
 			break;
 
 		case 3:
-			if (str_end_nr == 1) {
+			if (strEndNr == 1) {
 				if (_G(spieler).R11IdCardNr == RED_CARD_INV)
 					_G(spieler).R11IdCardNr = YEL_CARD_INV;
 				else
@@ -1151,67 +1151,55 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 			break;
 
 		case 10:
-			Room42::dia_beamter(str_end_nr);
+			Room42::dia_beamter(strEndNr);
 			break;
 
 		case 11:
-			if (blk_nr == 3) {
+			if (blkNr == 3) {
 				Room41::sub_dia();
-			} else if (blk_nr == 0 && str_end_nr == 3) {
+			} else if (blkNr == 0 && strEndNr == 3) {
 				_G(spieler).R41RepairInfo = true;
 				stop_ads_dialog();
 			}
 			break;
 
 		case 12:
-			if (str_end_nr == 1) {
+			if (strEndNr == 1) {
 				_G(spieler).R41HowardDiaOK = true;
-
 			}
 			break;
 
 		case 15:
-			if (blk_nr == 1 && str_end_nr == 0) {
+			if (blkNr == 1 && strEndNr == 0) {
 				_G(spieler).R55Job = true;
 				stop_ads_dialog();
 			}
 			break;
 
 		case 16:
-			if (blk_nr == 0) {
-				if (str_end_nr == 2) {
-					if (!_G(spieler).R56Kneipe)
-						_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA);
-				}
-			}
+			if (blkNr == 0 && strEndNr == 2 && !_G(spieler).R56Kneipe)
+				_G(atds)->del_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA);
+
 			break;
 
 		case 17:
-			if (blk_nr == 0) {
-				if (str_end_nr == 2) {
-					_G(atds)->show_item(17, 0, 1);
-				}
-			}
+			if (blkNr == 0 && strEndNr == 2)
+				_G(atds)->show_item(17, 0, 1);
+
 			break;
 
 		case 18:
 		case 19:
-			if (blk_nr == 0) {
-				if (str_end_nr == 4) {
-					_G(spieler).R67LiedOk = true;
-				}
-			}
+			if (blkNr == 0 && strEndNr == 4)
+				_G(spieler).R67LiedOk = true;
+
 			break;
 
 		case 20:
-			if (blk_nr == 0) {
-
-				if (str_end_nr == 1) {
-					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_detail_wait(28, 3, ANI_FRONT);
-
-					_G(spieler).PersonHide[P_CHEWY] = false;
-				}
+			if (blkNr == 0 && strEndNr == 1) {
+				_G(spieler).PersonHide[P_CHEWY] = true;
+				start_detail_wait(28, 3, ANI_FRONT);
+				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 			break;
 
@@ -1223,8 +1211,8 @@ void ads_action(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 	}
 }
 
-void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
-	switch (dia_nr) {
+void ads_ende(int16 diaNr, int16 blkNr, int16 strEndNr) {
+	switch (diaNr) {
 	case 0:
 		_G(flags).AutoAniPlay = false;
 		break;
@@ -1234,7 +1222,7 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 		break;
 
 	case 22:
-		if (str_end_nr == 1) {
+		if (strEndNr == 1) {
 			_G(det)->del_static_ani(3);
 			start_detail_wait(5, 1, ANI_FRONT);
 			_G(det)->set_static_ani(3, -1);
@@ -1247,7 +1235,7 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 	}
 }
 
-#define R14_EREMIT_DIA 10000
+#define R14_HERMIT_DIA 10000
 #define R8_NIMOYANER1_DIA 10001
 #define R8_NIMOYANER2_DIA 10002
 #define R12_BORK_DIA 10004
@@ -1271,27 +1259,27 @@ void ads_ende(int16 dia_nr, int16 blk_nr, int16 str_end_nr) {
 
 #define START_STOP_TMP \
 	if (mode == AAD_STR_START) \
-		talk_ani = tmp; \
+		talkAni = tmp; \
 	else \
 		_G(det)->stop_detail(tmp)
 
 #define START_STOP(NUM) \
 	if (mode == AAD_STR_START) \
-		talk_ani = NUM; \
+		talkAni = NUM; \
 	else \
 		_G(det)->stop_detail(NUM) \
 
 
-void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
-	int16 talk_stop_ani = -1;
-	int16 talk_show_static = -1;
-	int16 ani_nr;
-	int16 talk_ani = -1;
-	int16 stop_ani = -1;
-	int16 altes_format = false;
+void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
+	int16 talkStopAni = -1;
+	int16 talkShowStatic = -1;
+	int16 aniNr;
+	int16 talkAni = -1;
+	int16 stopAni = -1;
+	bool oldFormat = false;
 	int16 tmp = -1;
 
-	switch (dia_nr) {
+	switch (diaNr) {
 	case 30000:
 	case 25:
 	case 34:
@@ -1332,36 +1320,36 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		if (mode == AAD_STR_START) {
 			switch (_G(spieler).ChewyAni) {
 			case CHEWY_NORMAL:
-				ani_nr = CH_TALK3;
+				aniNr = CH_TALK3;
 				break;
 
 			case CHEWY_BORK:
-				ani_nr = 68;
+				aniNr = 68;
 				break;
 
 			case CHEWY_PUMPKIN:
-				ani_nr = CH_PUMP_TALK;
+				aniNr = CH_PUMP_TALK;
 				break;
 
 			case CHEWY_ROCKER:
-				ani_nr = CH_ROCK_TALK1;
+				aniNr = CH_ROCK_TALK1;
 				break;
 
 			case CHEWY_JMANS:
-				ani_nr = CH_JM_TALK;
+				aniNr = CH_JM_TALK;
 				break;
 
 			case CHEWY_ANI7:
-				ani_nr = 46;
+				aniNr = 46;
 				break;
 
 			default:
-				ani_nr = -1;
+				aniNr = -1;
 				break;
 			}
 
-			if (ani_nr != -1)
-				start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
+			if (aniNr != -1)
+				start_spz(aniNr, 255, ANI_FRONT, P_CHEWY);
 
 		} else {
 			stop_spz();
@@ -1370,7 +1358,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 	case R8_NIMOYANER3_DIA:
 	case 249:
-		if (person_nr == 0) {
+		if (personNr == 0) {
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK4, 255, ANI_FRONT, P_CHEWY);
 			} else {
@@ -1380,62 +1368,61 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		break;
 
 	case 61:
-	case R14_EREMIT_DIA:
+	case R14_HERMIT_DIA:
 	case R8_NIMOYANER1_DIA:
 	case R8_NIMOYANER2_DIA:
-		if (person_nr <= P_CHEWY) {
+		if (personNr <= P_CHEWY) {
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
-		} else if (person_nr == P_HOWARD) {
+		} else if (personNr == P_HOWARD) {
 			START_STOP(15);
 		}
 		break;
 
 	case R11_BORK_DIA:
-		altes_format = true;
-		switch (person_nr) {
-		case 1:
+		oldFormat = true;
+		if (personNr == 1) {
 			if (mode == AAD_STR_START) {
 				_G(talk_start_ani) = 9;
 				_G(talk_hide_static) = 8;
 			} else {
-				talk_stop_ani = 9;
-				talk_show_static = 8;
+				talkStopAni = 9;
+				talkShowStatic = 8;
 				_G(talk_start_ani) = -1;
 				_G(talk_hide_static) = -1;
 			}
-			break;
-
 		}
 		break;
 
 	case R13_BORK_DIA:
-		altes_format = true;
-		switch (person_nr) {
+		oldFormat = true;
+		switch (personNr) {
 		case 0:
-			talk_stop_ani = 9;
+			talkStopAni = 9;
 			_G(talk_start_ani) = 10;
-			talk_show_static = 13;
+			talkShowStatic = 13;
 			_G(talk_hide_static) = 12;
 			break;
 
 		case 1:
 			_G(talk_start_ani) = 9;
-			talk_stop_ani = 10;
+			talkStopAni = 10;
 			_G(talk_hide_static) = 13;
-			talk_show_static = 12;
+			talkShowStatic = 12;
 			break;
 
+		default:
+			break;
 		}
 		break;
 
 	case 24:
 	case 26:
-		altes_format = true;
-		switch (person_nr) {
+		oldFormat = true;
+		switch (personNr) {
 		case 0:
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
@@ -1449,13 +1436,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				_G(talk_start_ani) = 4;
 				_G(talk_hide_static) = 9;
 			} else {
-				talk_stop_ani = 4;
-				talk_show_static = 9;
+				talkStopAni = 4;
+				talkShowStatic = 9;
 				_G(talk_start_ani) = -1;
 				_G(talk_hide_static) = -1;
 			}
 			break;
 
+		default:
+			break;
 		}
 		break;
 
@@ -1463,12 +1452,20 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case 173:
 	case 174:
 	case 175:
-		switch (person_nr) {
+		switch (personNr) {
+		case 0:
+			if (mode == AAD_STR_START) {
+				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
+			} else {
+				stop_spz();
+			}
+			break;
+
 		case 1:
 			if (mode == AAD_STR_START) {
 				_G(room)->set_timer_status(0, TIMER_STOP);
 				_G(det)->del_static_ani(0);
-				talk_ani = 1;
+				talkAni = 1;
 			} else {
 				_G(room)->set_timer_status(0, TIMER_START);
 				_G(det)->stop_detail(1);
@@ -1476,12 +1473,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 			}
 			break;
 
-		case 0:
-			if (mode == AAD_STR_START) {
-				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			} else {
-				stop_spz();
-			}
+		default:
 			break;
 		}
 		break;
@@ -1489,11 +1481,11 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R35_CAT_DIA2:
 	case R35_CAT_DIA1:
 	case R37_HAHN_DIA:
-		if (person_nr == 1) {
+		if (personNr == 1) {
 			if (mode == AAD_STR_START) {
 				_G(room)->set_timer_status(1, TIMER_STOP);
 				_G(det)->del_static_ani(1);
-				talk_ani = 0;
+				talkAni = 0;
 			} else {
 				_G(room)->set_timer_status(1, TIMER_START);
 				_G(det)->stop_detail(0);
@@ -1504,7 +1496,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 	case 169:
 
-		switch (person_nr) {
+		switch (personNr) {
 		case 0:
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
@@ -1540,17 +1532,17 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case 163:
 	case 186:
 	case R41_HOOGY_DIA:
-		switch (person_nr) {
+		switch (personNr) {
 		case P_CHEWY:
 			if (mode == AAD_STR_START) {
 				if (_G(spieler).R28ChewyPump)
-					ani_nr = CH_PUMP_TALK;
+					aniNr = CH_PUMP_TALK;
 				else if (_G(spieler).ChewyAni == CHEWY_ROCKER)
-					ani_nr = CH_ROCK_TALK1;
+					aniNr = CH_ROCK_TALK1;
 				else
-					ani_nr = CH_TALK3;
+					aniNr = CH_TALK3;
 
-				start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
+				start_spz(aniNr, 255, ANI_FRONT, P_CHEWY);
 			} else {
 				stop_spz();
 			}
@@ -1559,15 +1551,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		case P_HOWARD:
 		case P_NICHELLE:
 		case P_4: {
-			int16 anz;
-			if (person_nr == 4) {
-				anz = 2;
+			int16 nbr;
+			if (personNr == 4) {
+				nbr = 2;
 				tmp = 3;
 			} else {
-				anz = 1;
-				tmp = person_nr + 2;
+				nbr = 1;
+				tmp = personNr + 2;
 			}
-			for (int16 i = 0; i < anz; i++) {
+			for (int16 i = 0; i < nbr; i++) {
 				if (mode == AAD_STR_START) {
 					_G(det)->start_detail(tmp, 255, ANI_FRONT);
 				} else {
@@ -1717,41 +1709,41 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 	case R63_GIRL_DIA:
 	case R67_PAPA1_DIA:
 	case R67_PAPA2_DIA:
-		switch (person_nr) {
+		switch (personNr) {
 		case P_CHEWY:
 			if (mode == AAD_STR_START) {
 				switch (_G(spieler).ChewyAni) {
 				case CHEWY_NORMAL:
-					ani_nr = CH_TALK3;
+					aniNr = CH_TALK3;
 					break;
 
 				case CHEWY_BORK:
-					ani_nr = 68;
+					aniNr = 68;
 					break;
 
 				case CHEWY_PUMPKIN:
-					ani_nr = CH_PUMP_TALK;
+					aniNr = CH_PUMP_TALK;
 					break;
 
 				case CHEWY_ROCKER:
-					ani_nr = CH_ROCK_TALK1;
+					aniNr = CH_ROCK_TALK1;
 					break;
 
 				case CHEWY_JMANS:
-					ani_nr = CH_JM_TALK;
+					aniNr = CH_JM_TALK;
 					break;
 
 				case CHEWY_ANI7:
-					ani_nr = 46;
+					aniNr = 46;
 					break;
 
 				default:
-					ani_nr = -1;
+					aniNr = -1;
 					break;
 
 				}
-				if (ani_nr != -1)
-					start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
+				if (aniNr != -1)
+					start_spz(aniNr, 255, ANI_FRONT, P_CHEWY);
 
 			} else {
 				stop_spz();
@@ -1787,11 +1779,11 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		case P_NICHELLE:
 			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
 			case 28:
-				START_STOP(dia_nr - 194);
+				START_STOP(diaNr - 194);
 				break;
 
 			case 40:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 202:
 				case 209:
 				case 211:
@@ -1822,7 +1814,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				if (mode == AAD_STR_START) {
 					_G(room)->set_timer_status(8, TIMER_STOP);
 					_G(det)->del_static_ani(8);
-					talk_ani = 2;
+					talkAni = 2;
 				} else {
 					_G(room)->set_timer_status(8, TIMER_START);
 					_G(det)->stop_detail(2);
@@ -1831,14 +1823,14 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 45:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 257:
 				case 258:
 				case 259:
 					if (mode == AAD_STR_START) {
 						_G(room)->set_timer_status(0, TIMER_STOP);
 						_G(det)->del_static_ani(0);
-						talk_ani = 2;
+						talkAni = 2;
 					} else {
 						_G(room)->set_timer_status(0, TIMER_START);
 						_G(det)->stop_detail(2);
@@ -1864,7 +1856,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 50:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 272:
 				case 273:
 				case 275:
@@ -1891,7 +1883,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 55:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 323:
 					tmp = 16;
 					break;
@@ -1912,7 +1904,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 56:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 304:
 					tmp = 5;
 					break;
@@ -1939,7 +1931,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 63:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 358:
 					tmp = 5;
 					break;
@@ -1958,16 +1950,15 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 			case 67:
 				if (mode == AAD_STR_START) {
-					if (dia_nr != 376)
-						talk_ani = 1;
-				} else {
-					if (dia_nr != 376)
-						_G(det)->stop_detail(1);
-				}
+					if (diaNr != 376)
+						talkAni = 1;
+				} else if (diaNr != 376)
+					_G(det)->stop_detail(1);
+
 				break;
 
 			case 68:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 384:
 				case 385:
 					tmp = 9;
@@ -1991,7 +1982,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 82:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 446:
 					tmp = 8;
 					break;
@@ -2017,13 +2008,13 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 84:
-				if (dia_nr == 477 || dia_nr == 478 || dia_nr == 481) {
+				if (diaNr == 477 || diaNr == 478 || diaNr == 481) {
 					if (mode == AAD_STR_START) {
-						talk_ani = 6;
-						stop_ani = 7;
+						talkAni = 6;
+						stopAni = 7;
 					} else {
-						talk_ani = 7;
-						stop_ani = 6;
+						talkAni = 7;
+						stopAni = 6;
 					}
 				
 					START_STOP_TMP;
@@ -2032,30 +2023,30 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 			case 85:
 				if (mode == AAD_STR_START) {
-					talk_ani = 0;
+					talkAni = 0;
 				} else {
-					talk_ani = 1;
-					stop_ani = 0;
+					talkAni = 1;
+					stopAni = 0;
 				}
 				break;
 
 			case 87:
 				if (mode == AAD_STR_START) {
-					talk_ani = 1;
-					stop_ani = 2;
+					talkAni = 1;
+					stopAni = 2;
 				} else {
-					talk_ani = 2;
-					stop_ani = 1;
+					talkAni = 2;
+					stopAni = 1;
 				}
 				break;
 
 			case 88:
 				if (mode == AAD_STR_START) {
-					talk_ani = 3;
-					stop_ani = 4;
+					talkAni = 3;
+					stopAni = 4;
 				} else {
-					talk_ani = 4;
-					stop_ani = 3;
+					talkAni = 4;
+					stopAni = 3;
 				}
 				break;
 
@@ -2064,7 +2055,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 93:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 549:
 				case 616:
 					START_STOP(0);
@@ -2084,7 +2075,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 				break;
 
 			case 94:
-				switch (dia_nr) {
+				switch (diaNr) {
 				case 539:
 				case 551:
 					START_STOP(0);
@@ -2111,14 +2102,14 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 
 	case R61_VERLAG_DIA:
 		if (mode == AAD_STR_START) {
-			_G(det)->start_detail(person_nr, 255, ANI_FRONT);
+			_G(det)->start_detail(personNr, 255, ANI_FRONT);
 		} else {
-			_G(det)->stop_detail(person_nr);
+			_G(det)->stop_detail(personNr);
 		}
 		break;
 
 	case R68_KEEPER_DIA:
-		switch (person_nr) {
+		switch (personNr) {
 		case 0:
 			if (mode == AAD_STR_START) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
@@ -2134,7 +2125,7 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		case 3:
 			if (mode == AAD_STR_START) {
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				talk_ani = 29;
+				talkAni = 29;
 			} else {
 				_G(det)->stop_detail(29);
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -2150,14 +2141,14 @@ void atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode)
 		break;
 	}
 
-	if (altes_format) {
+	if (oldFormat) {
 		_G(det)->start_detail(_G(talk_start_ani), 255, ANI_FRONT);
-		_G(det)->stop_detail(talk_stop_ani);
+		_G(det)->stop_detail(talkStopAni);
 		_G(det)->hideStaticSpr(_G(talk_hide_static));
-		_G(det)->showStaticSpr(talk_show_static);
+		_G(det)->showStaticSpr(talkShowStatic);
 	} else {
-		_G(det)->start_detail(talk_ani, 255, ANI_FRONT);
-		_G(det)->stop_detail(stop_ani);
+		_G(det)->start_detail(talkAni, 255, ANI_FRONT);
+		_G(det)->stop_detail(stopAni);
 	}
 }
 
@@ -2170,7 +2161,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	switch (test_nr) {
 	case GBUCH_OPEN_INV:
-	case MONOKEL_INV:
+	case MONOCLE_INV:
 		scrollx = _G(spieler).scrollx;
 		scrolly = _G(spieler).scrolly;
 		_G(spieler).scrollx = 0;
@@ -2333,7 +2324,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 		inv_mode = IUID_IIB;
 		break;
 
-	case INVENTAR_STATIC:
+	case INVENTORY_STATIC:
 		inv_mode = IUID_SIB;
 		break;
 
@@ -2794,7 +2785,7 @@ void calc_person_dia(int16 p_nr) {
 			}
 		}
 
-		_G(atds)->set_string_end_func(&atds_string_start);
+		_G(atds)->set_string_end_func(&atdsStringStart);
 		break;
 
 	default:
diff --git a/engines/chewy/temp_file.cpp b/engines/chewy/temp_file.cpp
index 8a68ebf9340..45db3760ce4 100644
--- a/engines/chewy/temp_file.cpp
+++ b/engines/chewy/temp_file.cpp
@@ -97,8 +97,7 @@ void TempFileArchive::FileProxy::finalize() {
 TempFileArchive::TempFileArchive() {
 }
 
-const TempFileArchive::Entry *TempFileArchive::getEntry(
-		const Common::String &name) const {
+const TempFileArchive::Entry *TempFileArchive::getEntry(const Common::String &name) const {
 	for (EntryList::const_iterator it = _files.begin(); it != _files.end(); ++it) {
 		const Entry &e = *it;
 		if (e._name.equalsIgnoreCase(name))
@@ -132,8 +131,7 @@ const Common::ArchiveMemberPtr TempFileArchive::getMember(const Common::Path &pa
 	return Common::ArchiveMemberPtr();
 }
 
-Common::SeekableReadStream *TempFileArchive::createReadStreamForMember(
-		const Common::Path &path) const {
+Common::SeekableReadStream *TempFileArchive::createReadStreamForMember(const Common::Path &path) const {
 	const Entry *entry = getEntry(path.toString());
 	if (!entry)
 		return nullptr;
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 1c352acfed4..111c5b7c04b 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -86,7 +86,6 @@ TextEntry *Text::getText(uint dialogNum, uint entryNum) {
 	TextEntry *d = new TextEntry();
 	bool isText = (dialogNum >= kADSTextMax && dialogNum < kADSTextMax + kATSTextMax);
 	bool isAutoDialog = (dialogNum >= kADSTextMax + kATSTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax);
-	//bool isInvText = (dialogNum >= kADSTextMax + kATSTextMax + kAADTextMax && dialogNum < kADSTextMax + kATSTextMax + kAADTextMax + kINVTextMax);
 
 	byte *data = getChunkData(dialogNum);
 	byte *ptr = data;
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 8808d7d2612..0825cf30846 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -72,7 +72,8 @@ void Timer::calcTimer() {
 }
 
 int16 Timer::setNewTimer(int16 timerNr, int16 timerEndValue, int16 timerMode) {
-	int16 ret;
+	int16 ret = -1;
+
 	if (timerNr < _timerMax) {
 		ret = 1;
 		_timerBlk[timerNr]._timeCount = 0;
@@ -81,8 +82,8 @@ int16 Timer::setNewTimer(int16 timerNr, int16 timerEndValue, int16 timerMode) {
 		_timerBlk[timerNr]._timeLast = _G(timer_count);
 		_timerBlk[timerNr]._timeMode = timerMode;
 		_timerBlk[timerNr]._timeStatus = true;
-	} else
-		ret = -1;
+	}
+
 	return ret;
 }
 
diff --git a/engines/chewy/timer.h b/engines/chewy/timer.h
index 314e7494a09..a50783dd309 100644
--- a/engines/chewy/timer.h
+++ b/engines/chewy/timer.h
@@ -24,12 +24,8 @@
 
 namespace Chewy {
 
-#define SEC_1000_MODE 0
-#define SEC_100_MODE 1
 #define SEC_10_MODE 2
 #define SEC_MODE 3
-#define MIN_MODE 4
-#define STD_MODE 5
 
 #define TIMER_STOP 0
 #define TIMER_START 1
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 36b6f160caa..7b0397016e9 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "chewy/types.h"
+#include "chewy/detail.h"
 #include "common/algorithm.h"
 
 namespace Chewy {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 4edfea33e00..7d1fca32f50 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -25,7 +25,6 @@
 #include "common/serializer.h"
 #include "chewy/defines.h"
 #include "chewy/object_extra.h"
-#include "chewy/detail.h"
 
 namespace Chewy {
 


Commit: 266b30eb55bc4547c686f9c6aedc8a706e65682b
    https://github.com/scummvm/scummvm/commit/266b30eb55bc4547c686f9c6aedc8a706e65682b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:49-08:00

Commit Message:
CHEWY: More renaming

Changed paths:
    engines/chewy/chewy.cpp
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sound.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index a3185317337..464cf188e77 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -126,7 +126,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 		_G(obj)->sort();
 
 		for (int i = 0; i < MAX_PERSON; i++) {
-			set_person_pos(_G(spieler).X[i], _G(spieler).Y[i], i, _G(spieler).Phase[i]);
+			setPersonPos(_G(spieler).X[i], _G(spieler).Y[i], i, _G(spieler).Phase[i]);
 		}
 
 		_G(auto_obj) = 0;
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 1efd26cb3ab..d63b9681e44 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -502,7 +502,7 @@ void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 	}
 }
 
-void Detail::start_detail(int16 nr, int16 rep, int16 reverse) {
+void Detail::startDetail(int16 nr, int16 rep, int16 reverse) {
 	if (nr != -1) {
 		AniDetailInfo *adiptr;
 		adiptr = &_rdi.Ainfo[nr];
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index 1b2a66c5899..f2707b8e657 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -215,7 +215,7 @@ public:
 
 	void del_static_ani(int16 ani_nr);
 	void set_ani_delay(int16 nr, int16 del);
-	void start_detail(int16 nr, int16 rep, int16 reverse);
+	void startDetail(int16 nr, int16 rep, int16 reverse);
 	void stop_detail(int16 nr);
 	void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
 	                      int16 zoomx, int16 zoomy);
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index c347fd849df..d79636d10e6 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -288,7 +288,7 @@ void Inventory::menu() {
 				if (!menuFirstFl) {
 					_G(cur)->show_cur();
 					while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
-						set_up_screen(NO_SETUP);
+						setupScreen(NO_SETUP);
 						inv_rand_x = -1;
 						inv_rand_y = -1;
 						plot_menu();
@@ -342,7 +342,7 @@ void Inventory::menu() {
 		}
 
 		if (_G(show_invent_menu) != 2) {
-			set_up_screen(NO_SETUP);
+			setupScreen(NO_SETUP);
 			_G(cur)->move(_G(minfo).x, _G(minfo).y);
 			_G(cur)->show_cur();
 			if (menu_flag1 != MENU_AUSBLENDEN) {
@@ -369,7 +369,7 @@ void Inventory::menu() {
 	_G(minfo).x = _G(maus_old_x);
 	_G(minfo).y = _G(maus_old_y);
 	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
 		_G(out)->back2screen(_G(workpage));
 	}
@@ -494,7 +494,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		}
 
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		plot_menu();
 		_G(fontMgr)->setFont(_G(font8));
 
@@ -536,7 +536,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	}
 
 	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		plot_menu();
 		_G(cur)->plot_cur();
 		_G(out)->back2screen(_G(workpage));
@@ -586,7 +586,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 					atsAction(txt_nr, m_mode, ATS_ACTION_VOR);
 				}
 				if (ok) {
-					start_ats_wait(txt_nr, m_mode, 14, ATS_DATA);
+					startAtsWait(txt_nr, m_mode, 14, ATS_DATA);
 				}
 
 				if (_G(atds)->get_steuer_bit(txt_nr, ATS_ACTION_BIT, ATS_DATA))
@@ -668,7 +668,7 @@ void Inventory::showDiary() {
 	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
-	set_up_screen(NO_SETUP);
+	setupScreen(NO_SETUP);
 	plot_menu();
 	_G(out)->setPointer(nullptr);
 	_G(room)->set_ak_pal(&_G(room_blk));
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 433fb234bc9..bc5227a2c3a 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -159,7 +159,7 @@ void MainMenu::animate() {
 		_G(out)->setPointer(_G(workptr));
 	}
 
-	sprite_engine();
+	spriteEngine();
 	kb_mov(1);
 	calcMouseText(_G(minfo).x, _G(minfo).y, 1);
 	_G(cur)->plot_cur();
@@ -218,7 +218,7 @@ void MainMenu::startGame() {
 
 	_G(spieler_vector)[P_CHEWY].Phase = 6;
 	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
-	set_person_pos(160, 80, P_CHEWY, P_RIGHT);
+	setPersonPos(160, 80, P_CHEWY, P_RIGHT);
 	_G(fx_blend) = BLEND3;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index ac71af8647a..07a19187eff 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -297,7 +297,6 @@ public:
 	int16 _z_count = 0;
 	ZObjSort _z_obj_sort[MAX_ZOBJ];
 	char _new_vector = false;
-	int16 _tmp_maus_links = 0;
 
 	// timer.cpp
 	bool _timer_int = false;
@@ -320,7 +319,7 @@ void free_buffers();
 
 bool mainLoop(int16 mode);
 
-void set_up_screen(SetupScreenMode mode);
+void setupScreen(SetupScreenMode mode);
 
 void kb_mov(int16 mode);
 
@@ -467,20 +466,20 @@ bool calc_inv_no_use(int16 test_nr, int16 mode);
 int16 calc_person_txt(int16 p_nr);
 int16 calc_person_click(int16 p_nr);
 void calc_person_dia(int16 p_nr);
-void sprite_engine();
+void spriteEngine();
 
 void calc_z_ebene();
 
-void start_ani_block(int16 anz, const AniBlock *ab);
+void startAniBlock(int16 nr, const AniBlock *ab);
 
-void start_detail_wait(int16 ani_nr, int16 rep, int16 mode);
+void startSetailWait(int16 aniNr, int16 rep, int16 mode);
 
-void start_detail_frame(int16 ani_nr, int16 rep, int16 mode,
+void startDetailFrame(int16 aniNr, int16 rep, int16 mode,
                         int16 frame);
 
-void wait_detail(int16 det_nr);
+void waitDetail(int16 detNr);
 
-void wait_show_screen(int16 frames);
+void waitShowScreen(int16 frames);
 
 void zoom_mov_anpass(ObjMov *om, MovInfo *mi);
 
@@ -489,13 +488,13 @@ void calc_zoom(int16 y, int16 zoomFactorX, int16 zoomFactorY,
 
 void load_chewy_taf(int16 taf_nr);
 
-bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode);
-void start_aad_wait(int16 dia_nr, int16 str_nr);
+bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode);
+void startAadWait(int16 diaNr, int16 strNr);
 
-void start_aad(int16 dia_nr);
-void aad_wait(int16 str_nr);
-void start_ads_wait(int16 dia_nr);
-void start_aad(int16 dia_nr, int16 ssi_nr);
+void start_aad(int16 diaNr);
+void aadWait(int16 strNr);
+void start_ads_wait(int16 diaNr);
+void start_aad(int16 diaNr, int16 ssiNr);
 void wait_auto_obj(int16 nr);
 
 void stop_auto_obj(int16 nr);
@@ -522,11 +521,11 @@ void stop_spz();
 
 void calc_person_spz_ani(ObjMov *om);
 
-void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung);
+void setPersonPos(int16 x, int16 y, int16 personNr, int16 direction);
 
-void set_person_spr(int16 nr, int16 p_nr);
+void setPersonSpr(int16 nr, int16 personNr);
 
-void stop_person(int16 p_nr);
+void stopPerson(int16 personNr);
 
 void mov_objekt(ObjMov *om, MovInfo *mi);
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index d57bada9e89..0f4da3f0de6 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -463,7 +463,7 @@ bool mainLoop(int16 mode) {
 
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	if (mode == DO_SETUP)
-		set_up_screen(DO_MAIN_LOOP);
+		setupScreen(DO_MAIN_LOOP);
 
 	return retValue;
 }
@@ -489,7 +489,7 @@ static void showWalkAreas() {
 	}
 }
 
-void set_up_screen(SetupScreenMode mode) {
+void setupScreen(SetupScreenMode mode) {
 	int16 i;
 	int16 txt_nr;
 
@@ -518,7 +518,7 @@ void set_up_screen(SetupScreenMode mode) {
 		_G(out)->setPointer(_G(workptr));
 	}
 
-	sprite_engine();
+	spriteEngine();
 	if (_G(menu_display) == MENU_EINBLENDEN || _G(flags).InventMenu) {
 		if (!_G(flags).InventMenu)
 			plot_main_menu();
@@ -784,7 +784,7 @@ void kb_mov(int16 mode) {
 		if (mode)
 			ende = true;
 		else
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
 }
@@ -1229,7 +1229,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 							movingFl = false;
 						}
 					}
-					set_up_screen(DO_SETUP);
+					setupScreen(DO_SETUP);
 				}
 			}
 			if (_G(flags).ChAutoMov) {
@@ -1251,14 +1251,14 @@ bool autoMove(int16 movNr, int16 playerNum) {
 						if (movingFl) {
 							if (_G(flags).ExitMov == false && _G(flags).ChAutoMov) {
 
-								set_person_pos(_G(spieler_mi)[playerNum].XyzEnd[0],
+								setPersonPos(_G(spieler_mi)[playerNum].XyzEnd[0],
 								               _G(spieler_mi)[playerNum].XyzEnd[1],
 								               playerNum, _G(Rdi)->AutoMov[movNr].SprNr);
 							}
 						}
 						endLoopFl = true;
 					}
-					set_up_screen(DO_SETUP);
+					setupScreen(DO_SETUP);
 					SHOULD_QUIT_RETURN0;
 				}
 			}
@@ -1297,12 +1297,12 @@ void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
 				}
 				if (!_G(spieler_vector)[personNum].Count) {
 					if (move_status) {
-						set_person_pos(_G(spieler_mi)[personNum].XyzEnd[0],
+						setPersonPos(_G(spieler_mi)[personNum].XyzEnd[0],
 						               _G(spieler_mi)[personNum].XyzEnd[1], personNum, -1);
 					}
 					endLoopFl = true;
 				}
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				SHOULD_QUIT_RETURN;
 			}
 		}
@@ -1381,9 +1381,9 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
 						if (_G(menu_item) != CUR_WALK && _G(menu_item) != CUR_USE) {
 							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
-								set_person_spr(P_RIGHT, P_CHEWY);
+								setPersonSpr(P_RIGHT, P_CHEWY);
 							else
-								set_person_spr(P_LEFT, P_CHEWY);
+								setPersonSpr(P_LEFT, P_CHEWY);
 						}
 					}
 
@@ -1392,7 +1392,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					}
 					
 					if (ok && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
-						if (start_ats_wait(txtNr, txtMode, 14, ATS_DATA))
+						if (startAtsWait(txtNr, txtMode, 14, ATS_DATA))
 							dispFl = false;
 					} else {
 						ret = -1;
@@ -1417,12 +1417,12 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 						if (!_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
 							if (_G(menu_item) != CUR_WALK) {
 								if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
-									set_person_spr(P_RIGHT, P_CHEWY);
+									setPersonSpr(P_RIGHT, P_CHEWY);
 								else
-									set_person_spr(P_LEFT, P_CHEWY);
+									setPersonSpr(P_LEFT, P_CHEWY);
 							}
 							int16 r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1);
-							actionFl = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+							actionFl = startAtsWait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 							if (actionFl)
 								ret = txtNr;
 						}
@@ -1577,20 +1577,20 @@ void calc_mouse_person(int16 x, int16 y) {
 							if (txt_nr != 30000) {
 								if (_G(menu_item) != CUR_WALK) {
 									if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
-										set_person_spr(P_RIGHT, P_CHEWY);
+										setPersonSpr(P_RIGHT, P_CHEWY);
 									else
-										set_person_spr(P_LEFT, P_CHEWY);
+										setPersonSpr(P_LEFT, P_CHEWY);
 								}
-								if (!start_ats_wait(txt_nr, mode, 14, ATS_DATA))
-									start_ats_wait(def_nr, TXT_MARK_USE, 14, INV_USE_DEF);
+								if (!startAtsWait(txt_nr, mode, 14, ATS_DATA))
+									startAtsWait(def_nr, TXT_MARK_USE, 14, INV_USE_DEF);
 							}
 						}
 					} else {
 						if (_G(menu_item) != CUR_WALK) {
 							if (x + _G(spieler).scrollx > _G(spieler_vector)[P_CHEWY].Xypos[0])
-								set_person_spr(P_RIGHT, P_CHEWY);
+								setPersonSpr(P_RIGHT, P_CHEWY);
 							else
-								set_person_spr(P_LEFT, P_CHEWY);
+								setPersonSpr(P_LEFT, P_CHEWY);
 						}
 						calc_inv_no_use(p_nr, SPIELER_OBJ);
 					}
@@ -1674,7 +1674,7 @@ void clear_prog_ani() {
 void set_ani_screen() {
 	if (_G(flags).AniUserAction)
 		get_user_key(NO_SETUP);
-	set_up_screen(DO_SETUP);
+	setupScreen(DO_SETUP);
 }
 
 void del_inventar(int16 nr) {
@@ -1745,12 +1745,12 @@ void calc_ausgang(int16 x, int16 y) {
 				_G(flags).ShowAtsInvTxt = false;
 				_G(menu_item) = CUR_DISK;
 				cursorChoice(CUR_DISK);
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
 				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
 				_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-				set_person_pos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
+				setPersonPos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               _G(spieler_mi)[_G(auto_p_nr)].HotMovX,
 				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - _G(spieler_mi)[_G(auto_p_nr)].HotMovY
 				               , P_CHEWY, -1);
@@ -1765,7 +1765,7 @@ void calc_ausgang(int16 x, int16 y) {
 				                               _G(room)->_gedXAnz[_G(room_blk).AkAblage],
 				                               _G(ged_mem)[_G(room_blk).AkAblage]);
 				check_shad(u_idx, 0);
-				set_person_spr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
+				setPersonSpr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
 				_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 				_G(fx_blend) = BLEND1;
 				_G(auto_obj) = 0;
@@ -1778,7 +1778,7 @@ void calc_ausgang(int16 x, int16 y) {
 				enter_room(nr);
 			}
 			_G(flags).ExitMov = false;
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 	}
 }
@@ -1862,7 +1862,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 			_G(spieler).scrolly += _G(spieler).ScrollyStep;
 		if (scrx == _G(spieler).scrollx && scry == _G(spieler).scrolly)
 			endLoopFl = true;
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
 	_G(maus_links_click) = tmpMouseClick;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 245d9c449f6..5a56d5f6436 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -304,7 +304,7 @@ void ads_menu() {
 }
 
 void stop_ads_dialog() {
-	aad_wait(-1);
+	aadWait(-1);
 	_G(spieler).DispFlag = _G(ads_tmp_dsp);
 	_G(cur_display) = true;
 	_G(flags).ShowAtsInvTxt = true;
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index f9b9c0852e9..013f5d7cc8c 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -346,9 +346,9 @@ void Object::calc_static_detail(int16 det_nr) {
 							n = nr - 40;
 							AniDetailInfo *adi = _G(det)->getAniDetail(n);
 							if (adi->repeat)
-								_G(det)->start_detail(n, 0, ANI_FRONT);
+								_G(det)->startDetail(n, 0, ANI_FRONT);
 							else
-								_G(det)->start_detail(n, 1, ANI_FRONT);
+								_G(det)->startDetail(n, 1, ANI_FRONT);
 						} else
 							_G(det)->showStaticSpr(nr);
 						++i;
@@ -358,9 +358,9 @@ void Object::calc_static_detail(int16 det_nr) {
 				n = nr - 40;
 				AniDetailInfo *adi = _G(det)->getAniDetail(n);
 				if (adi->repeat)
-					_G(det)->start_detail(n, 0, ANI_FRONT);
+					_G(det)->startDetail(n, 0, ANI_FRONT);
 				else
-					_G(det)->start_detail(n, 1, ANI_FRONT);
+					_G(det)->startDetail(n, 1, ANI_FRONT);
 			} else {
 				_G(det)->showStaticSpr(nr);
 			}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 1617f5d6a0d..fe00f364784 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -56,7 +56,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 
 	case ROOM_8_17:
 		start_aad(100, 0);
-		_G(det)->start_detail(21, 4, ANI_FRONT);
+		_G(det)->startDetail(21, 4, ANI_FRONT);
 		break;
 
 	case ROOM_18_20:
@@ -67,7 +67,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 	}
 
-	start_detail_wait(nr, 1, mode);
+	startSetailWait(nr, 1, mode);
 
 	switch (r_nr) {
 	case ROOM_1_1:
@@ -125,7 +125,7 @@ void timer_action(int16 t_nr) {
 #undef TIMER
 
 	if (default_flag && _G(flags).AutoAniPlay == false) {
-		_G(det)->start_detail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
+		_G(det)->startDetail(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
 		_G(uhr)->resetTimer(t_nr, 0);
 	}
 
@@ -501,7 +501,7 @@ void exit_room(int16 eib_nr) {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		switch (_G(spieler).R23GleiterExit) {
 		case 16:
-			set_person_pos(126, 110, P_CHEWY, P_RIGHT);
+			setPersonPos(126, 110, P_CHEWY, P_RIGHT);
 			break;
 
 		case 25:
@@ -633,9 +633,9 @@ void exit_room(int16 eib_nr) {
 	case 50:
 	case 65:
 	case 126:
-		set_person_pos(_G(spieler_vector)[P_CHEWY].Xypos[0],
+		setPersonPos(_G(spieler_vector)[P_CHEWY].Xypos[0],
 		               _G(spieler_vector)[P_CHEWY].Xypos[1], P_CHEWY, P_RIGHT);
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		break;
 
 	case 8:
@@ -649,9 +649,9 @@ void exit_room(int16 eib_nr) {
 	case 36:
 	case 71:
 	case 96:
-		set_person_pos(_G(spieler_vector)[P_CHEWY].Xypos[0],
+		setPersonPos(_G(spieler_vector)[P_CHEWY].Xypos[0],
 		               _G(spieler_vector)[P_CHEWY].Xypos[1], P_CHEWY, P_LEFT);
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		break;
 
 	case 62:
@@ -1193,7 +1193,7 @@ uint16 exit_flip_flop(int16 ani_nr, int16 eib_nr1, int16 eib_nr2,
                         int16 ats_nr1, int16 ats_nr2, int16 sib_nr,
                         int16 spr_nr1, int16 spr_nr2, int16 flag) {
 	if (ani_nr != -1)
-		_G(det)->start_detail(ani_nr, 1, flag);
+		_G(det)->startDetail(ani_nr, 1, flag);
 	flag ^= 1;
 	if (ats_nr1 != -1)
 		_G(atds)->set_ats_str(ats_nr1, flag, ATS_DATA);
@@ -1341,7 +1341,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				_G(det)->start_detail(i, 255, ANI_FRONT);
+				_G(det)->startDetail(i, 255, ANI_FRONT);
 		} else {
 			for (int i = 0; i < 5; ++i)
 				_G(det)->stop_detail(i);
@@ -1379,21 +1379,21 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_SCHALTER1_R21:
-		_G(det)->start_detail(0, 1, _G(spieler).R21Hebel1);
+		_G(det)->startDetail(0, 1, _G(spieler).R21Hebel1);
 		_G(spieler).R21Hebel1 ^= 1;
 		Room21::calc_laser();
 		_G(atds)->set_ats_str(126, TXT_MARK_LOOK, _G(spieler).R21Hebel1, ATS_DATA);
 		break;
 
 	case SIB_SCHALTER2_R21:
-		_G(det)->start_detail(1, 1, _G(spieler).R21Hebel2);
+		_G(det)->startDetail(1, 1, _G(spieler).R21Hebel2);
 		_G(spieler).R21Hebel2 ^= 1;
 		Room21::calc_laser();
 		_G(atds)->set_ats_str(127, TXT_MARK_LOOK, _G(spieler).R21Hebel2, ATS_DATA);
 		break;
 
 	case SIB_SCHALTER3_R21:
-		_G(det)->start_detail(2, 1, _G(spieler).R21Hebel3);
+		_G(det)->startDetail(2, 1, _G(spieler).R21Hebel3);
 		_G(spieler).R21Hebel3 ^= 1;
 		Room21::calc_laser();
 		_G(atds)->set_ats_str(128, TXT_MARK_LOOK, _G(spieler).R21Hebel3, ATS_DATA);
@@ -1482,7 +1482,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(spieler).R40Geld = true;
 		start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(201, -1);
+		startAadWait(201, -1);
 		break;
 
 	case SIB_VISIT_R53:
@@ -1515,9 +1515,9 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(det)->showStaticSpr(7);
 		_G(cur_hide_flag) = false;
 		hideCur();
-		start_aad_wait(406, -1);
+		startAadWait(406, -1);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
-			start_aad_wait(613, -1);
+			startAadWait(613, -1);
 		showCur();
 		break;
 
@@ -1542,7 +1542,7 @@ void sib_event_inv(int16 sib_nr) {
 			cur_2_inventory();
 			del_inventar(RED_CARD_INV);
 			start_aad(103, -1);
-			_G(det)->start_detail(6, 255, ANI_FRONT);
+			_G(det)->startDetail(6, 255, ANI_FRONT);
 			_G(atds)->set_ats_str(27, 1, ATS_DATA);
 			_G(atds)->set_ats_str(30, 1, ATS_DATA);
 		}
@@ -1637,7 +1637,7 @@ void sib_event_inv(int16 sib_nr) {
 		del_inventar(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATA);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(115, 0);
+		startAadWait(115, 0);
 
 		if (_G(spieler).R12TransOn)
 			Room12::use_linke_rohr();
@@ -1660,9 +1660,9 @@ void sib_event_inv(int16 sib_nr) {
 		if (_G(spieler).R18CartTerminal) {
 			_G(spieler).R18CartSave = true;
 			_G(atds)->set_ats_str(26, 1, INV_ATS_DATA);
-			start_aad_wait(120, -1);
+			startAadWait(120, -1);
 		} else {
-			start_aad_wait(121, -1);
+			startAadWait(121, -1);
 		}
 		break;
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 9a2d157940b..7dd131d76bc 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -101,23 +101,23 @@ static const uint8 CHEWY_JM_PHASEN[8][8] = {
 void JungleRoom::topEntry() {
 	_G(cur_hide_flag) = 0;
 	hideCur();
-	set_person_pos(236, 110, P_CHEWY, P_RIGHT);
-	set_person_pos(263, 85, P_NICHELLE, P_RIGHT);
-	set_person_pos(285, 78, P_HOWARD, P_RIGHT);
+	setPersonPos(236, 110, P_CHEWY, P_RIGHT);
+	setPersonPos(263, 85, P_NICHELLE, P_RIGHT);
+	setPersonPos(285, 78, P_HOWARD, P_RIGHT);
 	goAutoXy(266, 113, P_HOWARD, ANI_WAIT);
 	showCur();
 }
 
 void JungleRoom::leftEntry() {
-	set_person_pos(31, 118, P_CHEWY, P_RIGHT);
-	set_person_pos(71, 104, P_NICHELLE, P_RIGHT);
-	set_person_pos(6, 111, P_HOWARD, P_RIGHT);
+	setPersonPos(31, 118, P_CHEWY, P_RIGHT);
+	setPersonPos(71, 104, P_NICHELLE, P_RIGHT);
+	setPersonPos(6, 111, P_HOWARD, P_RIGHT);
 }
 
 void JungleRoom::rightEntry() {
-	set_person_pos(587, 114, P_CHEWY, P_LEFT);
-	set_person_pos(613, 103, P_NICHELLE, P_LEFT);
-	set_person_pos(561, 112, P_HOWARD, P_LEFT);
+	setPersonPos(587, 114, P_CHEWY, P_LEFT);
+	setPersonPos(613, 103, P_NICHELLE, P_LEFT);
+	setPersonPos(561, 112, P_HOWARD, P_LEFT);
 }
 
 void JungleRoom::setup_func() {
@@ -217,7 +217,7 @@ void Room::add_timer_new_room() {
 		if (adi->timer_start != 0) {
 			set_timer(i, adi->timer_start);
 		} else if (adi->start_flag || adi->repeat) {
-			_G(det)->start_detail(i, 0, ANI_FRONT);
+			_G(det)->startDetail(i, 0, ANI_FRONT);
 		}
 	}
 }
@@ -550,7 +550,7 @@ void switch_room(int16 nr) {
 	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
 	_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 	enter_room(-1);
-	set_up_screen(DO_SETUP);
+	setupScreen(DO_SETUP);
 }
 
 void calc_person_look() {
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 7a120eaaba0..07461f531c1 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -54,17 +54,17 @@ void Room0::entry() {
 		_G(det)->hideStaticSpr(6);
 
 	if (!_G(flags).LoadGame) {
-		set_person_pos(150, 100, P_CHEWY, P_RIGHT);
+		setPersonPos(150, 100, P_CHEWY, P_RIGHT);
 		_G(cur_hide_flag) = 0;
 		hideCur();
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 3);
 
 		while (!_G(ani_timer)[_G(timer_nr)[0]]._timeFlag && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(2, -1);
+		startAadWait(2, -1);
 
 		showCur();
 	}
@@ -82,32 +82,32 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 
 			_G(flags).AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
-				start_aad_wait(42, -1);
+				startAadWait(42, -1);
 				autoMove(5, P_CHEWY);
-				set_person_spr(P_LEFT, P_CHEWY);
+				setPersonSpr(P_LEFT, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
 					start_spz(CH_TALK3, 255, false, P_CHEWY);
 					if (_G(spieler).R0FueterLab)
-						start_aad_wait(618, -1);
+						startAadWait(618, -1);
 					else
-						start_aad_wait(43, -1);
+						startAadWait(43, -1);
 
 					++_G(spieler).R0FueterLab;
 				}
 
 				eyeAnim();
 			} else if (!_G(spieler).R0PillowThrow) {
-				start_aad_wait(42, -1);
+				startAadWait(42, -1);
 				start_spz(CH_TALK3, 255, false, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
-					start_aad_wait(43, -1);
+					startAadWait(43, -1);
 					++_G(spieler).R0FueterLab;
 				}
 
 				autoMove(3, P_CHEWY);
-				set_person_pos(191, 120, P_CHEWY, P_LEFT);
+				setPersonPos(191, 120, P_CHEWY, P_LEFT);
 			}
 
 			if (!_G(spieler).R0PillowThrow)
@@ -152,9 +152,9 @@ bool Room0::pullSlime() {
 		_G(flags).AutoAniPlay = true;
 		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(3, 1, ANI_FRONT);
-		start_detail_wait(17, 2, ANI_FRONT);
-		set_person_pos(222, 106, P_CHEWY, P_LEFT);
+		startSetailWait(3, 1, ANI_FRONT);
+		startSetailWait(17, 2, ANI_FRONT);
+		setPersonPos(222, 106, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(1);
 		_G(menu_item) = CUR_WALK;
@@ -181,10 +181,10 @@ void Room0::eyeAnim() {
 			checkSlimeEye();
 			eyeSlimeBack();
 			autoMove(FUETTER_POS, P_CHEWY);
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+			setPersonPos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		} else {
 			eyeShoot();
-			set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+			setPersonPos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 			eyeStart(EYE_END);
 		}
 	}
@@ -233,7 +233,7 @@ void Room0::eyeStart(EyeMode mode) {
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		_G(spr_info)[3].ZEbene = 193;
 		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		SHOULD_QUIT_RETURN;
 
 		_G(cur)->plot_cur();
@@ -280,7 +280,7 @@ void Room0::eyeWait() {
 		_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
 		_G(spr_info)[2].ZEbene = 192;
 		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
 		calcEyeClick(2);
 		_G(out)->back2screen(_G(workpage));
@@ -318,7 +318,7 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
 			} else if (is_cur_inventar(PILLOW_INV)) {
-				start_ats_wait(172, TXT_MARK_WALK, 14, ATS_DATA);
+				startAtsWait(172, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
 	}
@@ -329,7 +329,7 @@ void Room0::eyeShoot() {
 	adi->ani_count = 47;
 
 	bool ende = false;
-	_G(det)->start_detail(CH_BLITZ, 1, ANI_FRONT);
+	_G(det)->startDetail(CH_BLITZ, 1, ANI_FRONT);
 
 	while (!ende) {
 		clear_prog_ani();
@@ -349,7 +349,7 @@ void Room0::eyeShoot() {
 				ende = true;
 		}
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 
 		if (adi->delay_count > 0)
@@ -360,7 +360,7 @@ void Room0::eyeShoot() {
 		}
 	}
 
-	_G(det)->start_detail(STERNE_STEHEN, 255, ANI_FRONT);
+	_G(det)->startDetail(STERNE_STEHEN, 255, ANI_FRONT);
 	clear_prog_ani();
 	_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
 	_G(spr_info)[0].ZEbene = 190;
@@ -369,9 +369,9 @@ void Room0::eyeShoot() {
 	_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
 	_G(spr_info)[2].ZEbene = 192;
 
-	wait_show_screen(30);
+	waitShowScreen(30);
 	clear_prog_ani();
-	set_person_pos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+	setPersonPos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 }
 
@@ -433,7 +433,7 @@ void Room0::checkSlimeEye() {
 		_G(spr_info)[2].ZEbene = 192;
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
 		_G(spr_info)[3].ZEbene = 193;
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 
 		if (adi->delay_count > 0)
 			--adi->delay_count;
@@ -488,7 +488,7 @@ void Room0::feederStart(int16 mode) {
 		EVENTS_UPDATE;
 		SHOULD_QUIT_RETURN;
 
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
 		if (!mode)
 			calcPillowClick(1);
@@ -514,7 +514,7 @@ void Room0::feederStart(int16 mode) {
 	_G(flags).AniUserAction = false;
 
 	if (mode) {
-		_G(det)->start_detail(FLAP_DETAIL, 1, ANI_BACK);
+		_G(det)->startDetail(FLAP_DETAIL, 1, ANI_BACK);
 		while (_G(det)->get_ani_status(FLAP_DETAIL))
 			set_ani_screen();
 
@@ -529,7 +529,7 @@ void Room0::feederExtend() {
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
 		_G(spr_info)[1].ZEbene = 191;
 		get_user_key(NO_SETUP);
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
 		calcPillowClick(1);
 		_G(out)->back2screen(_G(workpage));
@@ -556,7 +556,7 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				del_inventar(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
 			} else if (is_cur_inventar(SLIME_INV)) {
-				start_ats_wait(173, TXT_MARK_WALK, 14, ATS_DATA);
+				startAtsWait(173, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
 	}
@@ -616,7 +616,7 @@ void Room0::checkFeed() {
 	}
 
 	adi->ani_count = 138;
-	_G(det)->start_detail(CH_NACH_FUETTERN, 2, ANI_FRONT);
+	_G(det)->startDetail(CH_NACH_FUETTERN, 2, ANI_FRONT);
 
 	ende = false;
 	while (!ende) {
@@ -662,7 +662,7 @@ void Room0::checkPillow() {
 
 	bool ende = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->start_detail(CH_WIRFT_KISSEN, 1, ANI_FRONT);
+	_G(det)->startDetail(CH_WIRFT_KISSEN, 1, ANI_FRONT);
 	bool mode = false;
 
 	while (!ende) {
@@ -670,7 +670,7 @@ void Room0::checkPillow() {
 		if (!_G(det)->get_ani_status(CH_WIRFT_KISSEN)) {
 			mode = true;
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
+			setPersonPos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
@@ -683,7 +683,7 @@ void Room0::checkPillow() {
 			_G(spr_info)[2].ZEbene = 192;
 		}
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 
 		if (mode) {
@@ -702,7 +702,7 @@ void Room0::checkPillow() {
 }
 
 void Room0::trapDoorOpen() {
-	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_FRONT);
+	_G(det)->startDetail(FLAP_DETAIL, 1, ANI_FRONT);
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -723,7 +723,7 @@ void Room0::trapDoorOpen() {
 }
 
 void Room0::trapDoorClose() {
-	_G(det)->start_detail(FLAP_DETAIL, 1, ANI_BACK);
+	_G(det)->startDetail(FLAP_DETAIL, 1, ANI_BACK);
 
 	while (_G(det)->get_ani_status(FLAP_DETAIL)) {
 		set_ani_screen();
@@ -742,7 +742,7 @@ void Room0::feederAni() {
 			checkPillow();
 			feederStart(1);
 			autoMove(VERSTECK_POS, P_CHEWY);
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			_G(out)->cls();
 			flic_cut(FCUT_000);
 
@@ -750,13 +750,13 @@ void Room0::feederAni() {
 
 			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
 			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
-			set_person_pos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
+			setPersonPos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
 			               _G(Rdi)->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
 			_G(spieler_vector)[P_CHEWY].DelayCount = 0;
 
 			check_shad(4, 0);
 			_G(fx_blend) = BLEND1;
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		} else {
 			action = true;
 		}
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 230c733c1d9..4bb7da6255f 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room1::gottenCard() {
 	_G(det)->hideStaticSpr(2);
-	start_detail_wait(4, 1, ANI_FRONT);
+	startSetailWait(4, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATA);
 	int16 tmp;
@@ -52,7 +52,7 @@ void Room1::gedAction(int index) {
 		}
 
 		if (flag) {
-			start_aad_wait(54, -1);
+			startAadWait(54, -1);
 			_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATA);
 			_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
 			_G(obj)->calc_rsi_flip_flop(KABELABDECKUNG);
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 012d3070702..54bc1279ea8 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -39,15 +39,15 @@ static const AniBlock ABLOCK4[2] = {
 
 void Room2::entry() {
 	if (!_G(spieler).R2ElectrocutedBork)
-		_G(det)->start_detail(5, 255, ANI_FRONT);
+		_G(det)->startDetail(5, 255, ANI_FRONT);
 }
 
 void Room2::jump_out_r1(int16 nr) {
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(nr, 1, ANI_FRONT);
-	set_up_screen(DO_SETUP);
+	startSetailWait(nr, 1, ANI_FRONT);
+	setupScreen(DO_SETUP);
 	_G(det)->stop_detail(6);
-	set_person_pos(32, 127, P_CHEWY, P_LEFT);
+	setPersonPos(32, 127, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	clear_prog_ani();
 	switch_room(1);
@@ -55,12 +55,12 @@ void Room2::jump_out_r1(int16 nr) {
 }
 
 void Room2::electrifyWalkway1() {
-	_G(det)->start_detail(ANI_5, 255, ANI_FRONT);
+	_G(det)->startDetail(ANI_5, 255, ANI_FRONT);
 	start_spz(CH_TALK6, 255, false, ANI_FRONT);
-	start_aad_wait(49, -1);
+	startAadWait(49, -1);
 	_G(det)->stop_detail(ANI_5);
 
-	_G(det)->start_detail(GITTER_BLITZEN, 12, ANI_FRONT);
+	_G(det)->startDetail(GITTER_BLITZEN, 12, ANI_FRONT);
 	_G(spieler).R2ElectrocutedBork = true;
 	del_inventar(_G(spieler).AkInvent);
 
@@ -74,16 +74,16 @@ void Room2::electrifyWalkway1() {
 
 void Room2::electrifyWalkway2() {
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
-	start_aad_wait(47, -1);
+	startAadWait(47, -1);
 }
 
 void Room2::gedAction(int index) {
 	if (index == 0) {
 		_G(det)->stop_detail(5);
 		if (!_G(spieler).R2ElectrocutedBork)
-			_G(det)->start_detail(6, 2, ANI_FRONT);
+			_G(det)->startDetail(6, 2, ANI_FRONT);
 		else
-			start_ani_block(2, ABLOCK4);
+			startAniBlock(2, ABLOCK4);
 
 		jump_out_r1(9);
 	}
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 237774ace47..a1b41eec228 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -107,34 +107,34 @@ void Room3::terminal() {
 
 		if (!_G(spieler).R2ElectrocutedBork) {
 			_G(det)->stop_detail(5);
-			start_ani_block(2, ABLOCK3);
+			startAniBlock(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
 				_G(spieler).R2FussSchleim = false;
 				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_FRONT);
-			set_up_screen(DO_SETUP);
+			startSetailWait(8, 1, ANI_FRONT);
+			setupScreen(DO_SETUP);
 			_G(det)->stop_detail(6);
 			clear_prog_ani();
 			switch_room(1);
-			start_ani_block(2, ABLOCK0);
-			set_person_pos(92, 131, P_CHEWY, P_LEFT);
+			startAniBlock(2, ABLOCK0);
+			setPersonPos(92, 131, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		} else if (!_G(spieler).R2FussSchleim) {
-			start_ani_block(2, ABLOCK2);
+			startAniBlock(2, ABLOCK2);
 			Room2::jump_out_r1(9);
-			start_aad_wait(45, -1);
+			startAadWait(45, -1);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ABLOCK1);
+			startAniBlock(2, ABLOCK1);
 			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
 			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
 			_G(fx_blend) = BLEND1;
-			start_ani_block(3, ablock5);
-			set_person_pos(91, 107, P_CHEWY, P_LEFT);
+			startAniBlock(3, ablock5);
+			setPersonPos(91, 107, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		}
 		clear_prog_ani();
@@ -144,10 +144,10 @@ void Room3::terminal() {
 		_G(auto_obj) = 1;
 		_G(maus_links_click) = false;
 		_G(minfo).button = 0;
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		start_spz(15, 255, false, P_CHEWY);
-		start_aad_wait(51, -1);
-		set_up_screen(DO_SETUP);
+		startAadWait(51, -1);
+		setupScreen(DO_SETUP);
 		break;
 
 	case 2:
@@ -199,13 +199,13 @@ void Room3::sonde_knarre() {
 	while (_G(mov_phasen)[SONDE_OBJ].Repeat != -1)
 		set_ani_screen();
 
-	_G(det)->start_detail(SONDE_SHOOT, 1, ANI_FRONT);
+	_G(det)->startDetail(SONDE_SHOOT, 1, ANI_FRONT);
 	int16 ende = 0;
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(det)->start_detail(KOPF_SCHUSS, 1, ANI_FRONT);
+			_G(det)->startDetail(KOPF_SCHUSS, 1, ANI_FRONT);
 		}
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
 		_G(spr_info)[0].ZEbene = 0;
@@ -218,7 +218,7 @@ void Room3::sonde_knarre() {
 		}
 		
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178)
-			_G(det)->start_detail(SONDE_RET, 3, ANI_BACK);
+			_G(det)->startDetail(SONDE_RET, 3, ANI_BACK);
 		
 		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28)
 			ende = 1;
@@ -228,7 +228,7 @@ void Room3::sonde_knarre() {
 	}
 
 	clear_prog_ani();
-	_G(det)->start_detail(SONDE_RAUCH, 3, ANI_FRONT);
+	_G(det)->startDetail(SONDE_RAUCH, 3, ANI_FRONT);
 	ende = 0;
 	while (_G(det)->get_ani_status(SONDE_RAUCH)) {
 
@@ -245,9 +245,9 @@ void Room3::sonde_knarre() {
 	}
 
 	start_spz(15, 255, false, P_CHEWY);
-	start_aad_wait(53, -1);
+	startAadWait(53, -1);
 	clear_prog_ani();
-	_G(det)->start_detail(SONDE_REIN, 1, ANI_BACK);
+	_G(det)->startDetail(SONDE_REIN, 1, ANI_BACK);
 	while (_G(det)->get_ani_status(SONDE_REIN)) {
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
@@ -313,7 +313,7 @@ void Room3::probeTransfer() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(det)->start_detail(SONDE_GREIF, 1, ANI_FRONT);
+	_G(det)->startDetail(SONDE_GREIF, 1, ANI_FRONT);
 	while (_G(det)->get_ani_status(SONDE_GREIF)) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index c6d206c4517..43332ae5a07 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -107,7 +107,7 @@ int16 Room4::sonde_comp() {
 		if (_G(minfo).y < 124)
 			_G(minfo).y = 123;
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
 	g_events->delay(500);
@@ -122,7 +122,7 @@ int16 Room4::sonde_comp() {
 	_G(minfo).button = 0;
 	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
 	_G(room)->load_room(&_G(room_blk), 3, &_G(spieler));
-	set_person_pos(110, 139, P_CHEWY, P_LEFT);
+	setPersonPos(110, 139, P_CHEWY, P_LEFT);
 
 	_G(fx_blend) = BLEND1;
 	_G(atds)->stop_aad();
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 0cbfc49bce8..844939da70f 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -31,18 +31,18 @@ namespace Rooms {
 
 void Room5::entry() {
 	if (_G(spieler).R5Terminal)
-		_G(det)->start_detail(6, 255, ANI_FRONT);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
 }
 
 void Room5::pushButton() {
 	if (_G(spieler).R5Terminal) {
 		int16 str_nr;
 		if (_G(spieler).R5Tuer == false) {
-			start_detail_wait(9, 1, ANI_FRONT);
+			startSetailWait(9, 1, ANI_FRONT);
 			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
 			str_nr = 1;
 		} else {
-			start_detail_wait(9, 1, ANI_BACK);
+			startSetailWait(9, 1, ANI_BACK);
 			_G(spieler).room_e_obj[6].Attribut = 255;
 			str_nr = 0;
 		}
@@ -50,7 +50,7 @@ void Room5::pushButton() {
 		_G(spieler).R5Tuer ^= 1;
 		_G(obj)->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else {
-		start_aad_wait(1, -1);
+		startAadWait(1, -1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 30826351b81..8a01f0c242b 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -59,7 +59,7 @@ void Room6::entry() {
 	_G(zoom_mov_fak) = 2;
 
 	if (_G(spieler).R6BolaSchild && _G(spieler).R6RaumBetreten < 2) {
-		_G(det)->start_detail(7, 255, ANI_FRONT);
+		_G(det)->startDetail(7, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATA);
 		if (!_G(flags).LoadGame)
 			++_G(spieler).R6RaumBetreten;
@@ -94,13 +94,13 @@ void Room6::init_robo() {
 void Room6::bola_knopf() {
 	if (!_G(spieler).R6BolaBecher) {
 		_G(det)->hideStaticSpr(0);
-		start_detail_wait(0, 1, ANI_FRONT);
+		startSetailWait(0, 1, ANI_FRONT);
 		if (_G(spieler).R6BolaOk) {
 			_G(spieler).R6BolaBecher = true;
 			_G(det)->showStaticSpr(0);
-			start_ani_block(2, ABLOCK7);
+			startAniBlock(2, ABLOCK7);
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_FLECK_R6);
-			wait_detail(2);
+			waitDetail(2);
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
 			_G(atds)->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATA);
 			_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATA);
@@ -108,19 +108,19 @@ void Room6::bola_knopf() {
 			_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(3, ABLOCK6);
+			startAniBlock(3, ABLOCK6);
 			while (_G(det)->get_ani_status(3) && !SHOULD_QUIT) {
 				if (!_G(det)->get_ani_status(14)) {
-					set_person_pos(220, 89, P_CHEWY, P_LEFT);
+					setPersonPos(220, 89, P_CHEWY, P_LEFT);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 				}
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 			}
 			_G(det)->showStaticSpr(0);
 			++_G(spieler).R6BolaJoke;
 			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
 			start_spz(CH_TALK5, 244, false, 0);
-			start_aad_wait(diaNr, -1);
+			startAadWait(diaNr, -1);
 		}
 		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 	}
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 7cbe25078c8..1ecdac179ee 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -70,7 +70,7 @@ void Room7::haken(int16 sib_nr) {
 
 	_G(obj)->calc_all_static_detail();
 	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATA);
-	start_aad_wait(dia_nr, -1);
+	startAadWait(dia_nr, -1);
 }
 
 void Room7::klingel() {
@@ -80,23 +80,23 @@ void Room7::klingel() {
 		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft && !_G(spieler).R7SeilOk)) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(5, 0);
-		start_ani_block(3, ABLOCK25);
+		startAniBlock(3, ABLOCK25);
 
 		_G(det)->showStaticSpr(7);
-		start_detail_wait(12, 1, ANI_FRONT);
-		start_detail_wait(11, 1, ANI_FRONT);
+		startSetailWait(12, 1, ANI_FRONT);
+		startSetailWait(11, 1, ANI_FRONT);
 		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(5);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else if (_G(spieler).R7BellCount == 1) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(6, 0);
-		start_ani_block(3, ABLOCK25);
+		startAniBlock(3, ABLOCK25);
 		_G(det)->showStaticSpr(7);
-		start_detail_wait(10, 1, ANI_FRONT);
-		_G(det)->start_detail(13, 1, ANI_FRONT);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		startSetailWait(10, 1, ANI_FRONT);
+		_G(det)->startDetail(13, 1, ANI_FRONT);
+		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -104,18 +104,18 @@ void Room7::klingel() {
 		autoMove(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 
-		_G(det)->start_detail(0, 255, ANI_FRONT);
-		start_detail_wait(13, 1, ANI_FRONT);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
+		startSetailWait(13, 1, ANI_FRONT);
 		flic_cut(FCUT_001);
 		_G(det)->stop_detail(0);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
-		set_person_pos(114, 138, P_CHEWY, -1);
+		setPersonPos(114, 138, P_CHEWY, -1);
 
-		start_detail_frame(19, 1, ANI_FRONT, 6);
-		start_detail_frame(9, 1, ANI_FRONT, 4);
+		startDetailFrame(19, 1, ANI_FRONT, 6);
+		startDetailFrame(9, 1, ANI_FRONT, 4);
 		_G(det)->showStaticSpr(9);
-		wait_detail(9);
+		waitDetail(9);
 		_G(det)->hideStaticSpr(9);
 		_G(obj)->show_sib(SIB_SCHLOTT_R7);
 		_G(obj)->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
@@ -127,23 +127,23 @@ void Room7::klingel() {
 	} else if (!_G(spieler).R7SeilOk) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(7, 0);
-		start_ani_block(3, ABLOCK25);
+		startAniBlock(3, ABLOCK25);
 		_G(det)->showStaticSpr(7);
 		_G(det)->load_taf_seq(192, 74, nullptr);
-		_G(det)->start_detail(14, 1, ANI_FRONT);
-		set_person_pos(95, 94, P_CHEWY, P_RIGHT);
+		_G(det)->startDetail(14, 1, ANI_FRONT);
+		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		_G(flags).NoScroll = true;
 		autoMove(6, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->start_detail(0, 255, ANI_FRONT);
-		wait_detail(14);
-		start_ani_block(4, ABLOCK10);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
+		waitDetail(14);
+		startAniBlock(4, ABLOCK10);
 		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(0);
-		set_person_pos(181, 130, P_CHEWY, P_RIGHT);
+		setPersonPos(181, 130, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).NoScroll = false;
 		_G(det)->del_taf_tbl(192, 74, nullptr);
@@ -152,13 +152,13 @@ void Room7::klingel() {
 		_G(spieler).R7BorkFlug = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		start_aad(8, 0);
-		start_detail_wait(1, 1, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
 		_G(obj)->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		_G(flags).NoPalAfterFlc = false;
 		register_cutscene(2);
 		flic_cut(FCUT_002);
-		set_person_pos(201, 117, P_CHEWY, P_LEFT);
+		setPersonPos(201, 117, P_CHEWY, P_LEFT);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -172,10 +172,10 @@ void Room7::klingel() {
 void Room7::gedAction(int index) {
 	if (index == 0 && _G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		set_person_pos(180, 124, P_CHEWY, P_LEFT);
-		start_detail_wait(20, 1, ANI_FRONT);
+		setPersonPos(180, 124, P_CHEWY, P_LEFT);
+		startSetailWait(20, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(10);
-		wait_show_screen(10 * _G(spieler).DelaySpeed);
+		waitShowScreen(10 * _G(spieler).DelaySpeed);
 		_G(det)->hideStaticSpr(10);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).R7ChewyFlug = false;
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 410e2c97083..cfbcb3008e4 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -52,12 +52,12 @@ void Room8::entry() {
 void Room8::start_folter() {
 	_G(atds)->set_ats_str(67, 1, ATS_DATA);
 	_G(det)->stop_detail(19);
-	_G(det)->start_detail(13, 255, ANI_FRONT);
+	_G(det)->startDetail(13, 255, ANI_FRONT);
 }
 
 void Room8::stop_folter() {
 	_G(atds)->set_ats_str(67, 0, ATS_DATA);
-	_G(det)->start_detail(19, 255, ANI_FRONT);
+	_G(det)->startDetail(19, 255, ANI_FRONT);
 
 	_G(det)->stop_detail(13);
 
@@ -67,13 +67,13 @@ void Room8::stop_folter() {
 
 void Room8::hole_kohle() {
 	if (_G(spieler).R8Kohle) {
-		start_aad_wait(604, -1);
+		startAadWait(604, -1);
 	} else {
 		hideCur();
 		_G(spieler).R8Kohle = true;
 		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_FRONT);
+		startSetailWait(12, 1, ANI_FRONT);
 		cur_2_inventory();
 		invent_2_slot(KOHLE_HEISS_INV);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -88,10 +88,10 @@ void Room8::start_verbrennen() {
 		autoMove(3, P_CHEWY);
 		start_aad(102, 0);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ABLOCK12);
+		startAniBlock(2, ABLOCK12);
 
 		while (_G(det)->get_ani_status(9)) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
 			if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
@@ -102,8 +102,8 @@ void Room8::start_verbrennen() {
 		}
 
 		_G(det)->stop_detail(9);
-		set_person_pos(129, 246, P_CHEWY, P_RIGHT);
-		start_ani_block(2, ABLOCK13);
+		setPersonPos(129, 246, P_CHEWY, P_RIGHT);
+		startAniBlock(2, ABLOCK13);
 		_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	}
@@ -123,14 +123,14 @@ bool Room8::gips_wurf() {
 
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		del_inventar(GIPS_EIMER_INV);
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
-		start_detail_frame(5, 1, ANI_FRONT, 16);
-		start_detail_wait(6, 1, ANI_FRONT);
+		startDetailFrame(5, 1, ANI_FRONT, 16);
+		startSetailWait(6, 1, ANI_FRONT);
 		_G(obj)->show_sib(33);
 		_G(det)->showStaticSpr(14);
-		wait_detail(5);
+		waitDetail(5);
 		_G(spieler).R8GipsWurf = true;
 		_G(spieler).room_m_obj[MASKE_INV].ZEbene = 0;
 		_G(obj)->setInventory(MASKE_INV, 181, 251, 8, &_G(room_blk));
@@ -141,7 +141,7 @@ bool Room8::gips_wurf() {
 		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
 		_G(flags).AtsAction = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(20, 1, ANI_FRONT);
+		startSetailWait(20, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
 		cursorChoice(_G(menu_item));
@@ -154,12 +154,12 @@ bool Room8::gips_wurf() {
 void Room8::open_gdoor() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->showStaticSpr(17);
-	set_up_screen(DO_SETUP);
-	start_detail_wait(7, 1, ANI_FRONT);
+	setupScreen(DO_SETUP);
+	startSetailWait(7, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(15);
 	_G(det)->hideStaticSpr(17);
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	set_person_pos(204, 274, P_CHEWY, P_LEFT);
+	setPersonPos(204, 274, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATA);
 	_G(obj)->hide_sib(31);
 	_G(spieler).R8GTuer = true;
@@ -176,9 +176,9 @@ void Room8::talk_nimoy() {
 		if (!_G(spieler).R8GTuer)
 			loadAdsDia(diaNr);
 		else
-			start_aad_wait(61, -1);
+			startAadWait(61, -1);
 	} else {
-		start_aad_wait(603, -1);
+		startAadWait(603, -1);
 		loadAdsDia(6);
 	}
 
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index cccd4cec5a2..0a8ddbe3ee3 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -49,7 +49,7 @@ void Room9::entry() {
 	_G(spieler).R7ChewyFlug = false;
 
 	if (!_G(spieler).R9Gitter)
-		set_person_pos(138, 91, P_CHEWY, P_LEFT);
+		setPersonPos(138, 91, P_CHEWY, P_LEFT);
 	else
 		_G(det)->showStaticSpr(5);
 
@@ -62,8 +62,8 @@ void Room9::entry() {
 void Room9::gtuer() {
 	_G(spieler).R9Gitter = true;
 	_G(det)->showStaticSpr(5);
-	start_detail_wait(6, 1, ANI_FRONT);
-	set_person_pos(74, 93, P_CHEWY, P_LEFT);
+	startSetailWait(6, 1, ANI_FRONT);
+	setPersonPos(74, 93, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(74, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->del_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->del_steuer_bit(76, ATS_AKTIV_BIT, ATS_DATA);
@@ -75,13 +75,13 @@ void Room9::surimy() {
 	hideCur();
 	_G(spieler).R9Surimy = true;
 	const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(atds)->set_steuer_bit(75, ATS_AKTIV_BIT, ATS_DATA);
 	_G(det)->hideStaticSpr(4);
 	_G(room)->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
-	start_aad_wait(56, -1);
+	startAadWait(56, -1);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	_G(spieler_vector)[P_CHEWY].Count = tmp;
 	get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
@@ -101,10 +101,10 @@ void Room9::surimy_ani() {
 	_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 	init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 	wait_auto_obj(SURIMY_OBJ);
-	start_detail_frame(0, 1, ANI_FRONT, 15);
-	_G(det)->start_detail(2, 1, ANI_FRONT);
-	wait_detail(0);
-	start_detail_wait(1, 1, ANI_FRONT);
+	startDetailFrame(0, 1, ANI_FRONT, 15);
+	_G(det)->startDetail(2, 1, ANI_FRONT);
+	waitDetail(0);
+	startSetailWait(1, 1, ANI_FRONT);
 	start_spz(CH_EKEL, 2, ANI_FRONT, P_CHEWY);
 	_G(det)->hideStaticSpr(4);
 	_G(mov_phasen)[SURIMY_OBJ].Repeat = 1;
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 01b828e954d..cdb382aac8e 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -37,11 +37,11 @@ void Room10::entry() {
 		_G(spieler).R10Surimy = true;
 		_G(fx_blend) = BLEND_NONE;
 		flic_cut(FCUT_003);
-		set_person_pos(0, 130, P_CHEWY, P_RIGHT);
+		setPersonPos(0, 130, P_CHEWY, P_RIGHT);
 		autoMove(2, P_CHEWY);
 		hideCur();
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(101, 0);
+		startAadWait(101, 0);
 		showCur();
 
 	} else if (_G(spieler).R10SurimyOk) {
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index cf09dfdd9e6..c0facbb60b9 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -62,9 +62,9 @@ void Room11::entry() {
 		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATA);
 
 		if (!_G(flags).LoadGame) {
-			start_ani_block(2, ABLOCK17);
+			startAniBlock(2, ABLOCK17);
 			autoMove(8, P_CHEWY);
-			start_aad_wait(31, -1);
+			startAadWait(31, -1);
 			_G(det)->stop_detail(9);
 		}
 		_G(det)->showStaticSpr(8);
@@ -96,7 +96,7 @@ void Room11::bork_zwinkert() {
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
 		_G(det)->hideStaticSpr(8);
-		start_ani_block(2, ABLOCK18);
+		startAniBlock(2, ABLOCK18);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		_G(det)->showStaticSpr(8);
 		_G(flags).AutoAniPlay = false;
@@ -120,10 +120,10 @@ void Room11::chewy_bo_use() {
 		hideCur();
 		_G(flags).AutoAniPlay = true;
 
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		_G(det)->hideStaticSpr(8);
-		start_ani_block(2, ABLOCK17);
-		start_aad_wait(32, -1);
+		startAniBlock(2, ABLOCK17);
+		startAadWait(32, -1);
 		_G(det)->stop_detail(9);
 		_G(det)->showStaticSpr(8);
 		autoMove(6, P_CHEWY);
@@ -141,10 +141,10 @@ int16 Room11::scanner() {
 
 		if (!_G(spieler).R11CardOk) {
 			actionFl = true;
-			start_aad_wait(13, -1);
+			startAadWait(13, -1);
 		} else if (is_cur_inventar(BORK_INV)) {
 			hideCur();
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			actionFl = true;
 
 			start_aad(105, 0);
@@ -154,17 +154,17 @@ int16 Room11::scanner() {
 			cur_2_inventory();
 			_G(menu_item) = CUR_TALK;
 			cursorChoice(_G(menu_item));
-			start_aad_wait(12, -1);
+			startAadWait(12, -1);
 			showCur();
 			loadAdsDia(3);
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
 				flic_cut(FCUT_009);
-				start_aad_wait(20, -1);
+				startAadWait(20, -1);
 			} else {
 				actionFl = true;
-				start_aad_wait(12, -1);
+				startAadWait(12, -1);
 				_G(menu_item) = CUR_TALK;
 				cursorChoice(_G(menu_item));
 				loadAdsDia(3);
@@ -194,13 +194,13 @@ void Room11::put_card() {
 	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
 		del_inventar(_G(spieler).R11IdCardNr);
-		_G(det)->start_detail(0, 255, ANI_FRONT);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
 		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(spieler).R11CardOk = true;
 
 		if (!_G(spieler).R11TerminalOk)
-			start_aad_wait(16, -1);
+			startAadWait(16, -1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 5589761aa17..eefb38cc69d 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -87,7 +87,7 @@ void Room12::entry() {
 		_G(obj)->calc_all_static_detail();
 		autoMove(5, P_CHEWY);
 		start_spz(CH_TALK12, 255, false, 0);
-		start_aad_wait(109, -1);
+		startAadWait(109, -1);
 		showCur();
 
 	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
@@ -102,7 +102,7 @@ bool Room12::timer(int16 t_nr, int16 ani_nr) {
 			init_bork();
 	} else if (t_nr == _G(timer_nr)[1] && _G(spieler).R12TransOn) {
 		_G(spieler).R12TransOn = false;
-		start_aad_wait(30, -1);
+		startAadWait(30, -1);
 	}
 
 	return false;
@@ -133,9 +133,9 @@ void Room12::init_bork() {
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
 					_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
-					wait_show_screen(10);
+					waitShowScreen(10);
 					start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-					start_aad_wait(14, -1);
+					startAadWait(14, -1);
 				}
 
 				wait_auto_obj(R12_BORK_OBJ);
@@ -151,7 +151,7 @@ void Room12::init_bork() {
 
 void Room12::talk_bork() {
 	if (!_G(spieler).R12TalismanOk) {
-		start_aad_wait(28, -1);
+		startAadWait(28, -1);
 	}
 }
 
@@ -170,8 +170,8 @@ void Room12::bork_ok() {
 
 	_G(spieler).R12BorkInRohr = true;
 	_G(det)->setSetailPos(3, 170, 145);
-	_G(det)->start_detail(3, 255, ANI_FRONT);
-	start_aad_wait(57, -1);
+	_G(det)->startDetail(3, 255, ANI_FRONT);
+	startAadWait(57, -1);
 	_G(det)->stop_detail(3);
 
 	_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
@@ -179,7 +179,7 @@ void Room12::bork_ok() {
 	init_auto_obj(R12_BORK_OBJ, &R12_BORK_PHASEN[0][0], 3, (const MovLine *)R12_BORK_MPKT2);
 	wait_auto_obj(R12_BORK_OBJ);
 	_G(det)->hideStaticSpr(10);
-	start_detail_wait(4, 1, ANI_FRONT);
+	startSetailWait(4, 1, ANI_FRONT);
 	_G(talk_hide_static) = -1;
 	_G(det)->showStaticSpr(12);
 	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATA);
@@ -196,11 +196,11 @@ int16 Room12::use_terminal() {
 
 		if (!_G(spieler).R12ChewyBork) {
 			autoMove(6, P_CHEWY);
-			start_aad_wait(110, -1);
+			startAadWait(110, -1);
 
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
 				start_spz(CH_TALK5, 255, false, P_CHEWY);
-				start_aad_wait(112, -1);
+				startAadWait(112, -1);
 				_G(flags).NoScroll = true;
 				auto_scroll(46, 0);
 				flic_cut(FCUT_016);
@@ -212,12 +212,12 @@ int16 Room12::use_terminal() {
 				_G(det)->hideStaticSpr(12);
 				_G(menu_item) = CUR_WALK;
 				cursorChoice(_G(menu_item));
-				set_person_pos(108, 90, P_CHEWY, -1);
+				setPersonPos(108, 90, P_CHEWY, -1);
 				_G(spieler).R12ChewyBork = true;
 				_G(spieler).R12RaumOk = true;
 				autoMove(4, P_CHEWY);
 				start_spz(68, 255, false, P_CHEWY);
-				start_aad_wait(113, 0);
+				startAadWait(113, 0);
 
 			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
 				use_linke_rohr();
@@ -253,8 +253,8 @@ int16 Room12::chewy_trans() {
 		_G(flags).AutoAniPlay = true;
 		autoMove(9, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ABLOCK16);
-		set_person_pos(108, 82, P_CHEWY, P_RIGHT);
+		startAniBlock(2, ABLOCK16);
+		setPersonPos(108, 82, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(spieler).R12TransOn = false;
 		_G(flags).AutoAniPlay = false;
@@ -274,7 +274,7 @@ int16 Room12::useTransformerTube() {
 			_G(atds)->set_ats_str(117, 1, AAD_DATA);
 		} else {
 			autoMove(7, P_CHEWY);
-			start_aad_wait(29, -1);
+			startAadWait(29, -1);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index db7295b7f7e..42c97109e2c 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -48,10 +48,10 @@ void Room13::entry() {
 	if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
 		_G(out)->cls();
 		flic_cut(FCUT_012);
-		set_person_pos(106, 65, P_CHEWY, P_RIGHT);
+		setPersonPos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		start_aad_wait(27, -1);
+		startAadWait(27, -1);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
 			_G(det)->showStaticSpr(11 - _G(spieler).R13MonitorStatus);
@@ -70,7 +70,7 @@ void Room13::entry() {
 
 		if (_G(spieler).R13Bandlauf) {
 			for (int i = 0; i < 5; ++i)
-				_G(det)->start_detail(i, 255, false);
+				_G(det)->startDetail(i, 255, false);
 		}
 		
 		if (!_G(flags).LoadGame && _G(spieler).R13Band) {
@@ -92,7 +92,7 @@ void Room13::xit() {
 
 void Room13::gedAction(int index) {
 	if (index == 2 && _G(spieler).R12ChewyBork) {
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		talk_bork();
 	}
 }
@@ -105,7 +105,7 @@ void Room13::talk_bork() {
 		_G(det)->setSetailPos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		_G(det)->setStaticPos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_aad_wait(33, -1);
+		startAadWait(33, -1);
 		_G(det)->stop_detail(9);
 		_G(det)->load_taf_seq(86, 12, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -127,7 +127,7 @@ void Room13::talk_bork() {
 		auto_scroll(41, 0);
 
 		start_spz(68, 255, false, P_CHEWY);
-		start_aad_wait(248, -1);
+		startAadWait(248, -1);
 		flic_cut(FCUT_013);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
@@ -136,10 +136,10 @@ void Room13::talk_bork() {
 		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATA);
 		_G(obj)->show_sib(SIB_BANDKNOPF_R13);
-		set_person_pos(153, 138, P_CHEWY, P_LEFT);
+		setPersonPos(153, 138, P_CHEWY, P_LEFT);
 
-		start_aad_wait(34, -1);
-		start_aad_wait(249, -1);
+		startAadWait(34, -1);
+		startAadWait(249, -1);
 
 		_G(obj)->show_sib(SIB_TKNOPF1_R11);
 		_G(obj)->show_sib(SIB_SCHLITZ_R11);
@@ -161,20 +161,20 @@ void Room13::jmp_band() {
 			_G(spieler).R13Band = true;
 			autoMove(3, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(8, 1, ANI_FRONT);
+			startSetailWait(8, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(292, 98, P_CHEWY, P_RIGHT);
+			setPersonPos(292, 98, P_CHEWY, P_RIGHT);
 
 		} else {
 			_G(spieler).R13Surf = true;
 			_G(maus_links_click) = false;
 			autoMove(12, P_CHEWY);
-			start_aad_wait(117, -1);
+			startAadWait(117, -1);
 			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
 			flic_cut(FCUT_014);
 			_G(flags).NoScroll = false;
-			set_person_pos(195, 226, P_CHEWY, P_LEFT);
+			setPersonPos(195, 226, P_CHEWY, P_LEFT);
 
 			_G(spieler).R13Bandlauf = false;
 			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
@@ -189,7 +189,7 @@ void Room13::jmp_band() {
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			wait_show_screen(20);
+			waitShowScreen(20);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 		}
 	}
@@ -205,9 +205,9 @@ void Room13::jmp_boden() {
 		_G(spieler).R13Band = false;
 		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		set_person_pos(176, 138, P_CHEWY, P_LEFT);
+		setPersonPos(176, 138, P_CHEWY, P_LEFT);
 	}
 }
 
@@ -217,13 +217,13 @@ int16 Room13::monitor_knopf() {
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R13Band) {
 			action_flag = true;
-			start_aad_wait(620, -1);
+			startAadWait(620, -1);
 
 		} else if (!_G(spieler).R12ChewyBork) {
 			action_flag = true;
 			autoMove(8, P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(6, 1, ANI_FRONT);
+			startSetailWait(6, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			if (_G(spieler).R13MonitorStatus)
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 8bf076b7b3c..dda730c9a5b 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -39,7 +39,7 @@ void Room14::entry() {
 
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R14GleiterAuf) {
-			set_person_pos(381, 264, P_CHEWY, P_LEFT);
+			setPersonPos(381, 264, P_CHEWY, P_LEFT);
 			_G(det)->showStaticSpr(6);
 			_G(spieler).scrollx = 160;
 			_G(spieler).scrolly = 120;
@@ -61,10 +61,10 @@ void Room14::eremit_feuer(int16 t_nr, int16 ani_nr) {
 	if (!_G(flags).AutoAniPlay && !_G(spieler).R14Feuer) {
 		_G(flags).AutoAniPlay = true;
 		_G(det)->hideStaticSpr(9);
-		start_detail_wait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
+		startSetailWait(_G(room)->_roomTimer.ObjNr[ani_nr], 1, ANI_FRONT);
 		_G(uhr)->resetTimer(t_nr, 0);
 		_G(det)->showStaticSpr(9);
-		_G(det)->start_detail(7, 1, ANI_FRONT);
+		_G(det)->startDetail(7, 1, ANI_FRONT);
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -75,13 +75,13 @@ int16 Room14::use_schrott() {
 	if (!_G(spieler).inv_cur) {
 		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(12, 1, ANI_FRONT);
+		startSetailWait(12, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Waffe) {
 			action_flag = true;
 			_G(spieler).R14Waffe = true;
-			start_aad_wait(21, -1);
+			startAadWait(21, -1);
 			invent_2_slot(BWAFFE_INV);
 		}
 	}
@@ -98,7 +98,7 @@ int16 Room14::use_gleiter() {
 		if (!_G(spieler).R14GleiterAuf) {
 			_G(spieler).R14GleiterAuf = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(10, 1, ANI_FRONT);
+			startSetailWait(10, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(det)->showStaticSpr(6);
 			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATA);
@@ -121,7 +121,7 @@ void Room14::talk_eremit()  {
 			_G(obj)->show_sib(46);
 		} else {
 			hideCur();
-			start_aad_wait(24, -1);
+			startAadWait(24, -1);
 			showCur();
 			_G(flags).AutoAniPlay = false;
 		}
@@ -134,13 +134,13 @@ int16 Room14::use_schleim() {
 	if (!_G(spieler).inv_cur) {
 		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(11, 1, ANI_FRONT);
+		startSetailWait(11, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Sicherung) {
 			action_flag = true;
 			_G(spieler).R14Sicherung = true;
-			start_aad_wait(22, -1);
+			startAadWait(22, -1);
 			invent_2_slot(SICHERUNG_INV);
 		}
 	}
@@ -160,32 +160,32 @@ void Room14::feuer() {
 		autoMove(5, P_CHEWY);
 		waffe = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(8, 1, ANI_FRONT, 11);
-		start_detail_wait(9, 1, ANI_FRONT);
-		wait_detail(8);
+		startDetailFrame(8, 1, ANI_FRONT, 11);
+		startSetailWait(9, 1, ANI_FRONT);
+		waitDetail(8);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
 		autoMove(7, P_CHEWY);
 		_G(det)->hideStaticSpr(9);
-		start_detail_frame(2, 1, ANI_FRONT, 9);
+		startDetailFrame(2, 1, ANI_FRONT, 9);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_FRONT);
+		startSetailWait(13, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		wait_detail(2);
-		start_detail_wait(5, 1, ANI_FRONT);
+		waitDetail(2);
+		startSetailWait(5, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(9);
 	}
 
 	del_inventar(tmp);
-	_G(det)->start_detail(6, 255, ANI_FRONT);
-	wait_show_screen(40);
+	_G(det)->startDetail(6, 255, ANI_FRONT);
+	waitShowScreen(40);
 
 	if (waffe)
 		autoMove(7, P_CHEWY);
 
-	start_aad_wait(26, -1);
+	startAadWait(26, -1);
 	_G(det)->hideStaticSpr(9);
-	start_detail_wait(3, 1, ANI_FRONT);
+	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(9);
 	invent_2_slot(FLUXO_INV);
 	_G(atds)->set_ats_str(105, TXT_MARK_LOOK, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 51511298d78..166dc3e715f 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -52,9 +52,9 @@ static const MovLine CHEWY_MPKT1[2] = {
 
 void Room17::entry() {
 	if (!_G(spieler).R17EnergieOut) {
-		_G(det)->start_detail(1, 255, ANI_FRONT);
+		_G(det)->startDetail(1, 255, ANI_FRONT);
 		for (int i = 0; i < 3; ++i)
-			_G(det)->start_detail(6 + i, 255, ANI_FRONT);
+			_G(det)->startDetail(6 + i, 255, ANI_FRONT);
 	}
 
 	plot_seil();
@@ -72,7 +72,7 @@ void Room17::entry() {
 		_G(zoom_horizont) = 0;
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 60;
-		set_person_pos(242, 146, P_CHEWY, P_LEFT);
+		setPersonPos(242, 146, P_CHEWY, P_LEFT);
 		xit();
 	} else if (_G(spieler).R17Location == 3) {
 		_G(room)->set_zoom(32);
@@ -145,14 +145,14 @@ int16 Room17::use_seil() {
 		_G(flags).AutoAniPlay = true;
 		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_FRONT);
+		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).R17Seil = true;
 		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATA);
 		plot_seil();
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(119, -1);
+		startAadWait(119, -1);
 
 		showCur();
 	}
@@ -171,7 +171,7 @@ void Room17::kletter_down() {
 	autoMove(5, P_CHEWY);
 	_G(det)->load_taf_seq(177, 1, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(14, 1, ANI_FRONT);
+	startSetailWait(14, 1, ANI_FRONT);
 	_G(flags).ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
 	_G(spieler).ScrollyStep = 2;
@@ -180,14 +180,14 @@ void Room17::kletter_down() {
 	_G(zoom_horizont) = 399;
 	_G(auto_obj) = 1;
 	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], _G(mov_phasen)[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT);
-	set_person_pos(242, 350, P_CHEWY, P_LEFT);
+	setPersonPos(242, 350, P_CHEWY, P_LEFT);
 }
 
 void Room17::kletter_up() {
 	autoMove(6, P_CHEWY);
 	_G(det)->load_taf_seq(141, 4, nullptr);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(11, 1, ANI_FRONT);
+	startSetailWait(11, 1, ANI_FRONT);
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
 	_G(spieler).ScrollyStep = 1;
@@ -195,13 +195,13 @@ void Room17::kletter_up() {
 	_G(zoom_horizont) = 0;
 	_G(auto_obj) = 1;
 	init_auto_obj(CHEWY_OBJ, &CHEWY_PHASEN[0][0], _G(mov_phasen)[CHEWY_OBJ].Lines, (const MovLine *)CHEWY_MPKT1);
-	set_person_pos(243, 146, P_CHEWY, P_LEFT);
+	setPersonPos(243, 146, P_CHEWY, P_LEFT);
 }
 
 void Room17::calc_seil() {
 	if (_G(spieler).R17Seil) {
 		if (_G(spieler).R17Location == 2) {
-			start_aad_wait(619, -1);
+			startAadWait(619, -1);
 		} else if (!_G(flags).AutoAniPlay && !_G(spieler).inv_cur) {
 			close_door();
 			_G(flags).AutoAniPlay = true;
@@ -226,7 +226,7 @@ void Room17::calc_seil() {
 			cursorChoice(_G(menu_item));
 			wait_auto_obj(CHEWY_OBJ);
 			showCur();
-			set_person_spr(P_LEFT, P_CHEWY);
+			setPersonSpr(P_LEFT, P_CHEWY);
 			_G(spieler).ScrollyStep = 1;
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(flags).AutoAniPlay = false;
@@ -244,8 +244,8 @@ void Room17::door_kommando(int16 mode) {
 			if (!_G(spieler).R17DoorKommand) {
 				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
 				_G(spieler).R17DoorKommand = true;
-				start_detail_wait(4, 1, ANI_FRONT);
-				stop_person(P_CHEWY);
+				startSetailWait(4, 1, ANI_FRONT);
+				stopPerson(P_CHEWY);
 				_G(det)->showStaticSpr(7);
 			}
 		} else {
@@ -263,7 +263,7 @@ void Room17::close_door() {
 		_G(spieler).R17DoorKommand = false;
 		_G(atds)->set_ats_str(144, _G(spieler).R17DoorKommand ? 1 : 0, ATS_DATA);
 		_G(det)->hideStaticSpr(7);
-		_G(det)->start_detail(4, 1, ANI_BACK);
+		_G(det)->startDetail(4, 1, ANI_BACK);
 	}
 }
 
@@ -277,10 +277,10 @@ int16 Room17::energie_hebel() {
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
-			start_aad_wait(38, -1);
+			startAadWait(38, -1);
 			action_flag = true;
 		} else if (!_G(spieler).inv_cur) {
-			start_aad_wait(37, -1);
+			startAadWait(37, -1);
 			action_flag = true;
 		}
 
@@ -291,10 +291,10 @@ int16 Room17::energie_hebel() {
 		_G(spieler).R17EnergieOut ^= 1;
 
 		if (!_G(spieler).R17EnergieOut) {
-			_G(det)->start_detail(1, 255, ANI_FRONT);
+			_G(det)->startDetail(1, 255, ANI_FRONT);
 
 			for (int i = 0; i < 3; ++i)
-				_G(det)->start_detail(i + 6, 255, ANI_FRONT);
+				_G(det)->startDetail(i + 6, 255, ANI_FRONT);
 		}
 
 		_G(atds)->set_ats_str(142, _G(spieler).R17EnergieOut ? 1 : 0, ATS_DATA);
@@ -320,13 +320,13 @@ int16 Room17::get_oel() {
 		action_flag = true;
 		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_EKEL, 3, false, P_CHEWY);
-		start_aad_wait(60, -1);
+		startAadWait(60, -1);
 	} else if (is_cur_inventar(BECHER_LEER_INV)) {
 		action_flag = true;
 		close_door();
 		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(13, 1, ANI_FRONT);
+		startSetailWait(13, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
 		_G(obj)->addInventory(BECHER_VOLL_INV, &_G(room_blk));
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index d9209431436..5a9076f7a02 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -115,7 +115,7 @@ void Room18::entry() {
 	}
 
 	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
-		start_aad_wait(39, -1);
+		startAadWait(39, -1);
 		_G(spieler).R18FirstEntry = true;
 	}
 
@@ -129,22 +129,22 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 
 		if (t_nr == _G(timer_nr)[0]) {
 			_G(det)->hideStaticSpr(16);
-			start_detail_wait(10, 1, ANI_FRONT);
+			startSetailWait(10, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(16);
 			_G(uhr)->resetTimer(_G(timer_nr)[0], 10);
 		} else if (t_nr == _G(timer_nr)[1]) {
 			hideCur();
 			_G(det)->hideStaticSpr(17);
-			start_detail_wait(9, 1, ANI_FRONT);
+			startSetailWait(9, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(17);
 
 			if (!_G(spieler).R18SondeMoni) {
 				_G(spieler).R18SondeMoni = true;
-				start_detail_wait(2, 1, ANI_FRONT);
+				startSetailWait(2, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(9);
-				start_detail_wait(4, 1, ANI_FRONT);
+				startSetailWait(4, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(11);
-				wait_show_screen(50);
+				waitShowScreen(50);
 				_G(det)->hideStaticSpr(9);
 				_G(det)->hideStaticSpr(11);
 			} else {
@@ -163,7 +163,7 @@ bool Room18::timer(int16 t_nr, int16 ani_nr) {
 
 void Room18::gedAction(int index) {
 	if (!index && !_G(spieler).R18SurimyWurf) {
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		autoMove(1, P_CHEWY);
 		start_aad(40, 0);
 	}
@@ -188,7 +188,7 @@ void Room18::monitor() {
 
 	int16 nr = 0;
 	if (_G(spieler).R18MoniSwitch) {
-		start_ani_block(2, ABLOCK21);
+		startAniBlock(2, ABLOCK21);
 		nr = (_G(spieler).R17EnergieOut) ? 2 : 1;
 	} else {
 		_G(det)->stop_detail(23);
@@ -206,14 +206,14 @@ int16 Room18::sonden_moni() {
 
 		hideCur();
 		autoMove(8, P_CHEWY);
-		start_detail_wait(3, 1, ANI_FRONT);
+		startSetailWait(3, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(10);
-		start_ani_block(3, ABLOCK20);
+		startAniBlock(3, ABLOCK20);
 
 		for (int16 i = 0; i < 3; i++)
 			_G(det)->showStaticSpr(i + 12);
 
-		wait_show_screen(40);
+		waitShowScreen(40);
 
 		for (int16 i = 0; i < 5; i++)
 			_G(det)->hideStaticSpr(i + 10);
@@ -244,19 +244,19 @@ int16 Room18::calc_surimy() {
 		_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 
 		if (_G(spieler_vector)[P_CHEWY].Xypos[1] < 150) {
-			start_detail_frame(18, 1, ANI_FRONT, 8);
+			startDetailFrame(18, 1, ANI_FRONT, 8);
 
 			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT3);
-			wait_detail(18);
+			waitDetail(18);
 		} else {
 			autoMove(1, P_CHEWY);
-			stop_person(P_CHEWY);
+			stopPerson(P_CHEWY);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_frame(17, 1, ANI_FRONT, 12);
+			startDetailFrame(17, 1, ANI_FRONT, 12);
 			_G(maus_links_click) = false;
 
 			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
-			wait_detail(17);
+			waitDetail(17);
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -264,20 +264,20 @@ int16 Room18::calc_surimy() {
 
 		_G(det)->setSetailPos(21, 392, 170);
 		_G(det)->setSetailPos(22, 447, 154);
-		start_detail_frame(21, 1, ANI_FRONT, 14);
-		_G(det)->start_detail(22, 1, ANI_FRONT);
-		wait_detail(21);
+		startDetailFrame(21, 1, ANI_FRONT, 14);
+		_G(det)->startDetail(22, 1, ANI_FRONT);
+		waitDetail(21);
 		_G(det)->setStaticPos(26, 392, 170, false, true);
 		_G(det)->showStaticSpr(26);
 
 		_G(det)->hideStaticSpr(24);
-		start_ani_block(2, ABLOCK22);
+		startAniBlock(2, ABLOCK22);
 		_G(det)->showStaticSpr(20);
 
 		for (int16 i = 0; i < 3; i++)
 			_G(det)->hideStaticSpr(i + 15);
 
-		start_ani_block(2, ABLOCK23);
+		startAniBlock(2, ABLOCK23);
 		_G(det)->showStaticSpr(18);
 		_G(det)->showStaticSpr(19);
 		_G(det)->hideStaticSpr(26);
@@ -290,14 +290,14 @@ int16 Room18::calc_surimy() {
 
 		_G(det)->setSetailPos(21, 143, 170);
 		_G(det)->setSetailPos(22, 198, 154);
-		start_detail_frame(21, 1, ANI_FRONT, 14);
-		_G(det)->start_detail(22, 1, ANI_FRONT);
-		wait_detail(21);
+		startDetailFrame(21, 1, ANI_FRONT, 14);
+		_G(det)->startDetail(22, 1, ANI_FRONT);
+		waitDetail(21);
 		_G(det)->setStaticPos(26, 143, 170, false, true);
 		_G(det)->showStaticSpr(26);
 
 		_G(det)->hideStaticSpr(25);
-		start_ani_block(2, ABLOCK24);
+		startAniBlock(2, ABLOCK24);
 		_G(det)->showStaticSpr(21);
 
 		_G(det)->hideStaticSpr(26);
@@ -348,23 +348,23 @@ short Room18::use_cart_moni() {
 
 		hideCur();
 		autoMove(9, P_CHEWY);
-		set_person_spr(P_LEFT, P_CHEWY);
+		setPersonSpr(P_LEFT, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartTerminal ^= 1;
 
 		if (!_G(spieler).R18CartTerminal) {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 0, ATS_DATA);
 			_G(det)->hideStaticSpr(23);
-			start_detail_wait(20, 1, ANI_BACK);
+			startSetailWait(20, 1, ANI_BACK);
 		} else {
 			_G(atds)->set_ats_str(147, TXT_MARK_LOOK, 1, ATS_DATA);
-			start_detail_wait(20, 1, ANI_FRONT);
+			startSetailWait(20, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(23);
 
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
 				_G(atds)->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATA);
-				start_aad_wait(120, -1);
+				startAadWait(120, -1);
 			}
 		}
 
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index cbc5e0b884c..c06f18a6c87 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -90,7 +90,7 @@ void Room21::calc_laser() {
 		_G(atds)->del_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		_G(spieler).R21Laser1Weg = false;
-		_G(det)->start_detail(3, 255, ANI_FRONT);
+		_G(det)->startDetail(3, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(134, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(133, ATS_AKTIV_BIT, ATS_DATA);
 	}
@@ -109,7 +109,7 @@ void Room21::calc_laser() {
 		_G(obj)->hide_sib(SIB_SEIL_R21);
 		_G(atds)->set_steuer_bit(129, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R21Laser2Weg = false;
-		_G(det)->start_detail(4, 255, ANI_FRONT);
+		_G(det)->startDetail(4, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(135, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
@@ -190,12 +190,12 @@ void Room21::chewy_kolli() {
 
 	if (kolli && !_G(flags).AutoAniPlay) {
 		const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		_G(flags).AutoAniPlay = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
 		_G(det)->setSetailPos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
-		start_detail_wait(ani_nr, 1, ANI_FRONT);
+		startSetailWait(ani_nr, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		_G(spieler_vector)[P_CHEWY].Count = tmp;
@@ -216,9 +216,9 @@ void Room21::salto() {
 				_G(spieler_vector)[P_CHEWY].Xypos[1]);
 		}
 
-		start_ani_block(3, ABLOCK19);
+		startAniBlock(3, ABLOCK19);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_aad_wait(36, -1);
+		startAadWait(36, -1);
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -232,7 +232,7 @@ void Room21::use_gitter_energie() {
 
 	switch_room(17);
 	_G(det)->hideStaticSpr(5);
-	start_detail_wait(9, 1, ANI_FRONT);
+	startSetailWait(9, 1, ANI_FRONT);
 	_G(spieler).R17GitterWeg = true;
 	_G(spieler).PersonHide[P_CHEWY] = false;
 }
@@ -245,11 +245,11 @@ int16 Room21::use_fenster() {
 		_G(flags).AutoAniPlay = true;
 		_G(spieler).R18Gitter = true;
 		autoMove(13, P_CHEWY);
-		set_person_pos(541, 66, P_CHEWY, P_LEFT);
+		setPersonPos(541, 66, P_CHEWY, P_LEFT);
 		switch_room(18);
 
 		if (!_G(spieler).R18FirstEntry) {
-			start_aad_wait(39, -1);
+			startAadWait(39, -1);
 			_G(spieler).R18FirstEntry = true;
 		}
 
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 003e33b5f26..bbb05e9fe12 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -85,7 +85,7 @@ int16 Room22::chewy_amboss() {
 
 		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(1, 1, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		autoMove(2, P_CHEWY);
 		_G(flags).NoPalAfterFlc = false;
@@ -106,7 +106,7 @@ void Room22::bork(int16 t_nr) {
 		if (!_G(spieler).R22BorkPlatt) {
 			hideCur();
 			start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(10, -1);
+			startAadWait(10, -1);
 			autoMove(3, P_CHEWY);
 			_G(auto_obj) = 1;
 			_G(mov_phasen)[BORK_OBJ].AtsText = 0;
@@ -140,7 +140,7 @@ void Room22::bork_walk1() {
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT);
 	wait_auto_obj(BORK_OBJ);
 
-	start_detail_wait(2, 1, ANI_FRONT);
+	startSetailWait(2, 1, ANI_FRONT);
 
 	_G(mov_phasen)[BORK_OBJ].Repeat = 1;
 	init_auto_obj(BORK_OBJ, &BORK_PHASEN[0][0], _G(mov_phasen)[BORK_OBJ].Lines, (const MovLine *)BORK_MPKT1);
@@ -164,9 +164,9 @@ void Room22::get_bork() {
 		autoMove(4, P_CHEWY);
 		_G(det)->hideStaticSpr(4);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_ani_block(2, ABLOCK14);
-		set_person_pos(171, 120, P_CHEWY, P_LEFT);
-		start_aad_wait(11, -1);
+		startAniBlock(2, ABLOCK14);
+		setPersonPos(171, 120, P_CHEWY, P_LEFT);
+		startAadWait(11, -1);
 		_G(det)->stop_detail(3);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 01a51856d7d..c994ea22b57 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -38,7 +38,7 @@ static const AniBlock ABLOCK15[4] = {
 
 void Room23::entry() {
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	set_person_pos(135, 69, P_CHEWY, -1);
+	setPersonPos(135, 69, P_CHEWY, -1);
 }
 
 void Room23::cockpit() {
@@ -59,27 +59,27 @@ int16 Room23::start_gleiter() {
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		if (!_G(spieler).R23FluxoFlex)
-			start_aad_wait(23, -1);
+			startAadWait(23, -1);
 		else {
 			bool start_ok = true;
 
 			if (_G(spieler).R23GleiterExit == 16) {
 				if (!_G(spieler).R16F5Exit) {
 					start_ok = false;
-					start_aad_wait(35, -1);
+					startAadWait(35, -1);
 				} else if (!_G(spieler).R23Cartridge || !_G(spieler).R18CartSave) {
 					start_ok = false;
-					start_aad_wait(41, -1);
+					startAadWait(41, -1);
 				} else if (!_G(spieler).R17EnergieOut) {
 					start_ok = false;
-					start_aad_wait(300, -1);
+					startAadWait(300, -1);
 				}
 			}
 
 			if (start_ok) {
 				hideCur();
-				start_ani_block(4, ABLOCK15);
-				wait_show_screen(30);
+				startAniBlock(4, ABLOCK15);
+				waitShowScreen(30);
 
 				for (int16 i = 0; i < 4; i++)
 					_G(det)->stop_detail(i);
@@ -92,15 +92,15 @@ int16 Room23::start_gleiter() {
 					register_cutscene(7);
 					_G(out)->cls();
 					_G(spieler).R23GleiterExit = 16;
-					set_person_pos(126, 110, P_CHEWY, P_RIGHT);
+					setPersonPos(126, 110, P_CHEWY, P_RIGHT);
 
 					switch_room(_G(spieler).R23GleiterExit);
 					start_spz_wait(CH_WONDER1, 2, false, P_CHEWY);
 					start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
 
 					_G(spieler).DelaySpeed = 10;
-					start_aad_wait(59, -1);
-					stop_person(P_CHEWY);
+					startAadWait(59, -1);
+					stopPerson(P_CHEWY);
 					_G(maus_links_click) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
@@ -134,7 +134,7 @@ void Room23::use_cartridge() {
 	if (_G(spieler).R18CartSave) {
 		_G(atds)->del_steuer_bit(171, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(111, 2, ATS_DATA);
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(3);
 	} else {
 		_G(atds)->set_ats_str(111, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 3d6ff9238fa..87401e96bcb 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -38,7 +38,7 @@ static const uint8 KRISTALL_SPR[3][3] = {
 void Room24::entry() {
 	_G(flags).MainInput = false;
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	set_person_pos(0, 0, P_CHEWY, -1);
+	setPersonPos(0, 0, P_CHEWY, -1);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	_G(curblk).sprite = _G(room_blk).DetImage;
@@ -57,7 +57,7 @@ void Room24::entry() {
 
 	for (int16 i = 0; i < 3; i++) {
 		if (KRISTALL_SPR[i][_G(spieler).R24Hebel[i]] == 20)
-			_G(det)->start_detail(5 + i * 4, 255, ANI_BACK);
+			_G(det)->startDetail(5 + i * 4, 255, ANI_BACK);
 	}
 }
 
@@ -65,7 +65,7 @@ void Room24::xit() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
-	set_person_pos(263, 144, P_CHEWY, -1);
+	setPersonPos(263, 144, P_CHEWY, -1);
 	_G(spieler).scrollx = 88;
 	_G(maus_links_click) = false;
 	_G(flags).MainInput = true;
@@ -89,7 +89,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		_G(spieler).R16F5Exit = true;
 		g_engine->_sound->playSound(1, 0);
 		g_engine->_sound->stopSound(1);
-		_G(det)->start_detail(1, 1, ANI_FRONT);
+		_G(det)->startDetail(1, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(10);
 		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 1, ATS_DATA);
 
@@ -97,7 +97,7 @@ void Room24::use_hebel(int16 txt_nr) {
 		_G(det)->hideStaticSpr(10);
 		g_engine->_sound->playSound(1, 1);
 		g_engine->_sound->stopSound(0);
-		_G(det)->start_detail(1, 1, ANI_BACK);
+		_G(det)->startDetail(1, 1, ANI_BACK);
 		_G(spieler).R16F5Exit = false;
 		_G(atds)->set_ats_str(164, TXT_MARK_NAME, 0, ATS_DATA);
 	}
@@ -132,17 +132,17 @@ void Room24::calc_animation(int16 kristall_nr) {
 			g_engine->_sound->playSound(ani_nr + kristall_nr * 4, 0);
 			g_engine->_sound->stopSound(0);
 			_G(det)->hideStaticSpr(_G(spieler).R24KristallLast[kristall_nr] + kristall_nr * 2);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_BACK);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_BACK);
-			_G(det)->start_detail(5 + kristall_nr * 4, 255, ANI_BACK);
+			startSetailWait(ani_nr + kristall_nr * 4, 1, ANI_BACK);
+			startSetailWait(6 + kristall_nr * 4, 1, ANI_BACK);
+			_G(det)->startDetail(5 + kristall_nr * 4, 255, ANI_BACK);
 
 		} else if (_G(spieler).R24KristallLast[kristall_nr] == 20) {
 			int16 ani_nr = KRISTALL_SPR[kristall_nr][_G(spieler).R24Hebel[kristall_nr]] == 13 ? 7 : 8;
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(5 + ani_nr + kristall_nr * 4, 0);
 			_G(det)->stop_detail(5 + kristall_nr * 4);
-			start_detail_wait(6 + kristall_nr * 4, 1, ANI_FRONT);
-			start_detail_wait(ani_nr + kristall_nr * 4, 1, ANI_FRONT);
+			startSetailWait(6 + kristall_nr * 4, 1, ANI_FRONT);
+			startSetailWait(ani_nr + kristall_nr * 4, 1, ANI_FRONT);
 		}
 
 		showCur();
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index d331a9af801..0ac9e288d47 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -48,7 +48,7 @@ void Room25::entry() {
 		g_engine->_sound->playSound(0, 0);
 
 		for (int i = 0; i < 9; ++i)
-			_G(det)->start_detail(i, 255, ANI_FRONT);
+			_G(det)->startDetail(i, 255, ANI_FRONT);
 	}
 
 	if (!_G(spieler).R29Schlauch2) {
@@ -75,14 +75,14 @@ void Room25::entry() {
 		flic_cut(FCUT_029);
 		g_engine->_sound->playSound(0, 0);
 		_G(fx_blend) = BLEND_NONE;
-		set_person_pos(219, 141, P_CHEWY, P_RIGHT);
+		setPersonPos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(64, -1);
+		startAadWait(64, -1);
 		showCur();
 
 	} else if (_G(spieler).R25GleiterExit && !_G(flags).LoadGame) {
-		set_person_pos(127, 122, P_CHEWY, P_LEFT);
+		setPersonPos(127, 122, P_CHEWY, P_LEFT);
 
 		if (!_G(spieler).R25SurimyGo) {
 			_G(spieler).R25SurimyGo = 1;
@@ -121,7 +121,7 @@ int16 Room25::gleiter_loesch() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(obj)->addInventory(MILCH_WAS_INV, &_G(room_blk));
 			inventory_2_cur(MILCH_WAS_INV);
-			start_aad_wait(253, -1);
+			startAadWait(253, -1);
 		}
 	}
 
@@ -159,10 +159,10 @@ void Room25::xit_gleiter() {
 		_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 		init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 		_G(fx_blend) = BLEND1;
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 
 		start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(65, -1);
+		startAadWait(65, -1);
 		_G(fx_blend) = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
 		_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index d63d69ee63e..1b35fc6c90f 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -47,15 +47,15 @@ void Room27::xit(int16 eib_nr) {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
-			start_aad_wait(175, -1);
+			startAadWait(175, -1);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(2, 1, ANI_FRONT);
+			startSetailWait(2, 1, ANI_FRONT);
 			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
 			_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
 		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
 			++_G(spieler).R27HowardGed;
-			start_aad_wait(174, -1);
+			startAadWait(174, -1);
 		}
 	}
 
@@ -68,7 +68,7 @@ void Room27::get_surimy() {
 	autoMove(4, P_CHEWY);
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		start_aad_wait(171, -1);
+		startAadWait(171, -1);
 	}
 
 	showCur();
@@ -78,7 +78,7 @@ void Room27::get_surimy() {
 void Room27::talk_howard() {
 	hideCur();
 	autoMove(4, P_CHEWY);
-	start_aad_wait(173, -1);
+	startAadWait(173, -1);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index d46e8ec5d3f..f0d4241bf4c 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -61,16 +61,16 @@ void Room28::entry(int16 eib_nr) {
 			case 55:
 				if (!_G(spieler).R28EntryHaus) {
 					_G(spieler).R28EntryHaus = true;
-					set_person_pos(232, 100, P_HOWARD, P_RIGHT);
+					setPersonPos(232, 100, P_HOWARD, P_RIGHT);
 					autoMove(3, P_HOWARD);
 					goAutoXy(320, _G(spieler_vector)[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
-					start_aad_wait(176, -1);
+					startAadWait(176, -1);
 				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
 					_G(spieler).R28RKuerbis = true;
 					_G(spieler).ScrollxStep = 2;
 					autoMove(6, P_CHEWY);
-					wait_show_screen(10);
-					start_aad_wait(194, -1);
+					waitShowScreen(10);
+					startAadWait(194, -1);
 					_G(spieler).room_e_obj[62].Attribut = 255;
 					_G(atds)->set_ats_str(208, 1, ATS_DATA);
 					_G(flags).NoScroll = true;
@@ -82,7 +82,7 @@ void Room28::entry(int16 eib_nr) {
 					if (!_G(spieler).R40TeilKarte) {
 						_G(out)->ausblenden(0);
 						_G(out)->set_teilpalette(_G(pal), 255, 1);
-						start_aad_wait(607, -1);
+						startAadWait(607, -1);
 						_G(fx_blend) = BLEND3;
 					}
 
@@ -91,8 +91,8 @@ void Room28::entry(int16 eib_nr) {
 					if (_G(spieler).R40TeilKarte) {
 						haendler();
 					} else {
-						wait_show_screen(60);
-						start_aad_wait(195, -1);
+						waitShowScreen(60);
+						startAadWait(195, -1);
 					}
 
 					_G(spieler).ScrollxStep = 2;
@@ -112,17 +112,17 @@ void Room28::entry(int16 eib_nr) {
 					_G(spieler).room_e_obj[69].Attribut = 255;
 					load_chewy_taf(CHEWY_NORMAL);
 
-					set_person_pos(480, 118, P_HOWARD, P_LEFT);
-					set_person_pos(440, 146, P_CHEWY, P_RIGHT);
+					setPersonPos(480, 118, P_HOWARD, P_LEFT);
+					setPersonPos(440, 146, P_CHEWY, P_RIGHT);
 					_G(fx_blend) = BLEND_NONE;
 					_G(flags).ExitMov = false;
 					_G(spieler_mi)[P_HOWARD].Mode = true;
 					goAutoXy(420, 113, P_HOWARD, ANI_WAIT);
 					_G(spieler_mi)[P_HOWARD].Mode = false;
-					set_person_pos(440, 146, P_CHEWY, P_LEFT);
-					start_aad_wait(193, -1);
+					setPersonPos(440, 146, P_CHEWY, P_LEFT);
+					startAadWait(193, -1);
 				} else {
-					set_person_pos(480, 100, P_HOWARD, P_LEFT);
+					setPersonPos(480, 100, P_HOWARD, P_LEFT);
 					goAutoXy(420, 113, P_HOWARD, ANI_GO);
 					_G(flags).ExitMov = false;
 					autoMove(6, P_CHEWY);
@@ -146,7 +146,7 @@ void Room28::xit(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
 		_G(SetUpScreenFunc) = nullptr;
 		if (!_G(spieler).R28ExitTown) {
-			start_aad_wait(178, -1);
+			startAadWait(178, -1);
 			_G(spieler).R28ExitTown = true;
 		}
 
@@ -172,30 +172,30 @@ void Room28::haendler() {
 	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
 
-	set_person_pos(480, 113, P_HOWARD, P_RIGHT);
-	set_person_pos(490, 146, P_CHEWY, P_RIGHT);
+	setPersonPos(480, 113, P_HOWARD, P_RIGHT);
+	setPersonPos(490, 146, P_CHEWY, P_RIGHT);
 	_G(det)->set_static_ani(2, -1);
 
 	while (_G(spieler).scrollx < 300) {
 		SHOULD_QUIT_RETURN;
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 	}
 
-	start_aad_wait(196, -1);
+	startAadWait(196, -1);
 	_G(det)->del_static_ani(2);
 	_G(det)->set_static_ani(3, -1);
-	start_aad_wait(197, -1);
+	startAadWait(197, -1);
 	_G(det)->del_static_ani(3);
 	_G(det)->set_static_ani(4, -1);
-	start_aad_wait(198, -1);
+	startAadWait(198, -1);
 	_G(SetUpScreenFunc) = setup_func;
 	autoMove(4, P_CHEWY);
 	hideCur();
 	autoMove(3, P_CHEWY);
-	set_person_spr(P_RIGHT, P_CHEWY);
+	setPersonSpr(P_RIGHT, P_CHEWY);
 	_G(det)->del_static_ani(4);
-	wait_show_screen(28);
-	start_aad_wait(199, -1);
+	waitShowScreen(28);
+	startAadWait(199, -1);
 	invent_2_slot(DOLLAR175_INV);
 }
 
@@ -231,7 +231,7 @@ void Room28::use_surimy() {
 
 	_G(obj)->calc_all_static_detail();
 	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-	start_aad_wait(dia_nr, -1);
+	startAadWait(dia_nr, -1);
 	_G(flags).NoScroll = false;
 	showCur();
 }
@@ -255,7 +255,7 @@ void Room28::set_pump() {
 				++_G(spieler).R28PumpTxt1;
 			}
 
-			start_detail_wait(tmp, 1, ANI_FRONT);
+			startSetailWait(tmp, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 
 			load_chewy_taf(CHEWY_PUMPKIN);
@@ -268,11 +268,11 @@ void Room28::set_pump() {
 			}
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
-				stop_person(P_HOWARD);
+				stopPerson(P_HOWARD);
 				_G(SetUpScreenFunc) = nullptr;
 				g_engine->_sound->waitForSpeechToFinish();
 
-				start_aad_wait(177, -1);
+				startAadWait(177, -1);
 				_G(SetUpScreenFunc) = setup_func;
 				++_G(spieler).R28PumpTxt;
 			}
@@ -280,7 +280,7 @@ void Room28::set_pump() {
 			_G(flags).AutoAniPlay = false;
 		}
 	} else {
-		start_ats_wait(20, TXT_MARK_USE, 14, INV_USE_DEF);
+		startAtsWait(20, TXT_MARK_USE, 14, INV_USE_DEF);
 	}
 
 	showCur();
@@ -291,12 +291,12 @@ void Room28::get_pump() {
 	if (_G(spieler).R28ChewyPump) {
 		hideCur();
 
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
 		_G(det)->setSetailPos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
-		start_detail_wait(tmp, 1, ANI_BACK);
+		startSetailWait(tmp, 1, ANI_BACK);
 
 		invent_2_slot(K_MASKE_INV);
 		_G(atds)->set_ats_str(209, 0, ATS_DATA);
@@ -306,7 +306,7 @@ void Room28::get_pump() {
 
 		if (_G(spieler).R28PumpTxt1 < 3) {
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(138, -1);
+			startAadWait(138, -1);
 		}
 
 		showCur();
@@ -327,7 +327,7 @@ int16 Room28::use_breifkasten() {
 		_G(det)->showStaticSpr(7);
 		autoMove(8, P_CHEWY);
 		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
-		start_aad_wait(179, -1);
+		startAadWait(179, -1);
 		_G(atds)->set_ats_str(206, 0, ATS_DATA);
 		showCur();
 		invent_2_slot(MANUSKRIPT_INV);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index f12ad7e7f23..95b367aa131 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -82,7 +82,7 @@ int16 Room29::use_pumpe() {
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
 			action_flag = true;
-			start_aad_wait(62, -1);
+			startAadWait(62, -1);
 		}
 
 		showCur();
@@ -117,7 +117,7 @@ bool Room29::use_schlauch() {
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(det)->hideStaticSpr(7);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(8);
 		_G(det)->showStaticSpr(10);
 		_G(atds)->del_steuer_bit(219, ATS_AKTIV_BIT, ATS_DATA);
@@ -126,7 +126,7 @@ bool Room29::use_schlauch() {
 		_G(spieler).R29Schlauch1 = false;
 		_G(spieler).R29Schlauch2 = true;
 		del_inventar(PUMPE_INV);
-		set_person_pos(308, 105, P_CHEWY, P_RIGHT);
+		setPersonPos(308, 105, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		showCur();
 	}
@@ -141,11 +141,11 @@ void Room29::schlitz_sitz() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(det)->hideStaticSpr(4);
 		_G(det)->showStaticSpr(11);
-		start_ani_block(3, ABLOCK26);
+		startAniBlock(3, ABLOCK26);
 		_G(det)->showStaticSpr(9);
 		_G(det)->hideStaticSpr(11);
-		_G(det)->start_detail(2, 255, ANI_FRONT);
-		start_aad_wait(63, -1);
+		_G(det)->startDetail(2, 255, ANI_FRONT);
+		startAadWait(63, -1);
 
 		_G(det)->stop_detail(2);
 		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
@@ -166,10 +166,10 @@ int16 Room29::zaun_sprung() {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_frame(3, 1, ANI_FRONT, 7);
+		startDetailFrame(3, 1, ANI_FRONT, 7);
 		_G(det)->hideStaticSpr(9);
-		start_ani_block(5, ABLOCK27);
-		set_up_screen(DO_SETUP);
+		startAniBlock(5, ABLOCK27);
+		setupScreen(DO_SETUP);
 
 		showCur();
 		switch_room(37);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 290bf37ec1c..aaac3d2005d 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -62,7 +62,7 @@ void Room31::surimy_go() {
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(157, -1);
+			startAadWait(157, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			showCur();
@@ -160,7 +160,7 @@ int16 Room31::use_topf() {
 					_G(spieler).R31Wasser = true;
 					autoMove(1, P_CHEWY);
 					_G(spieler).PersonHide[P_CHEWY] = true;
-					start_ani_block(3, ABLOCK30);
+					startAniBlock(3, ABLOCK30);
 					_G(spieler).PersonHide[P_CHEWY] = false;
 					del_inventar(_G(spieler).AkInvent);
 					_G(obj)->addInventory(MILCH_LEER_INV, &_G(room_blk));
@@ -206,7 +206,7 @@ int16 Room31::use_topf() {
 	
 	if (dia_nr != -1) {
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
+		startAadWait(dia_nr, -1);
 		action_flag = true;
 	}
 
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 084f946ae3f..a8360aaf6fa 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -49,22 +49,22 @@ int16 Room32::use_howard() {
 			flic_cut(FCUT_043);
 			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATA);
 			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(75, -1);
-			wait_show_screen(5);
+			startAadWait(75, -1);
+			waitShowScreen(5);
 			autoMove(5, P_CHEWY);
-			wait_show_screen(10);
+			waitShowScreen(10);
 			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(125, -1);
-			wait_show_screen(10);
+			startAadWait(125, -1);
+			waitShowScreen(10);
 
 			_G(det)->hideStaticSpr(0);
-			start_detail_frame(0, 1, ANI_FRONT, 9);
-			start_detail_wait(1, 1, ANI_BACK);
+			startDetailFrame(0, 1, ANI_FRONT, 9);
+			startSetailWait(1, 1, ANI_BACK);
 			_G(det)->showStaticSpr(7);
 			_G(det)->showStaticSpr(6);
-			wait_show_screen(20);
+			waitShowScreen(20);
 			_G(det)->hideStaticSpr(7);
-			start_detail_wait(1, 1, ANI_FRONT);
+			startSetailWait(1, 1, ANI_FRONT);
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			ani_nr = CH_TALK3;
 			dia_nr = 164;
@@ -82,7 +82,7 @@ int16 Room32::use_howard() {
 
 	if (dia_nr) {
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
+		startAadWait(dia_nr, -1);
 		action_flag = true;
 	}
 
@@ -144,7 +144,7 @@ void Room32::use_schreibmaschine() {
 	}
 
 	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-	start_aad_wait(dia_nr, -1);
+	startAadWait(dia_nr, -1);
 	showCur();
 }
 
@@ -160,7 +160,7 @@ int16 Room32::get_script() {
 		_G(det)->hideStaticSpr(5);
 		_G(atds)->set_ats_str(203, 0, ATS_DATA);
 		start_spz(CH_TALK3, 1, ANI_FRONT, P_CHEWY);
-		start_aad_wait(91, -1);
+		startAadWait(91, -1);
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index db29cf0cb20..bed940d4d66 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -56,7 +56,7 @@ void Room33::surimy_go() {
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(158, -1);
+			startAadWait(158, -1);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			showCur();
@@ -134,9 +134,9 @@ void Room33::use_maschine() {
 
 			if (action) {
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(0, 1, ANI_FRONT);
+				startSetailWait(0, 1, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
-				set_person_pos(128, 65, P_CHEWY, P_LEFT);
+				setPersonPos(128, 65, P_CHEWY, P_LEFT);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				hocker = true;
 				del_inventar(_G(spieler).AkInvent);
@@ -158,27 +158,27 @@ void Room33::use_maschine() {
 		}
 
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
+		startAadWait(dia_nr, -1);
 
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(2, 1, ANI_FRONT);
+			startSetailWait(2, 1, ANI_FRONT);
 			flic_cut(FCUT_031);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(71, -1);
+			startAadWait(71, -1);
 			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		if (hocker) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(1, 1, ANI_FRONT);
-			set_person_pos(64, 100, P_CHEWY, P_LEFT);
+			startSetailWait(1, 1, ANI_FRONT);
+			setPersonPos(64, 100, P_CHEWY, P_LEFT);
 		}
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
-		start_aad_wait(70, -1);
+		startAadWait(70, -1);
 	}
 
 	showCur();
@@ -208,7 +208,7 @@ int16 Room33::get_munter() {
 		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->hideStaticSpr(3);
 		start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(72, -1);
+		startAadWait(72, -1);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index 086629df6bd..b1b4865ea96 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -54,7 +54,7 @@ bool Room34::use_kuehlschrank() {
 			switch_room(34);
 		}
 
-		set_person_pos(160, 70, P_CHEWY, -1);
+		setPersonPos(160, 70, P_CHEWY, -1);
 	}
 
 	return result;
@@ -62,7 +62,7 @@ bool Room34::use_kuehlschrank() {
 
 void Room34::xit_kuehlschrank() {
 	_G(spieler).PersonHide[P_CHEWY] = false;
-	set_person_pos(54, 111, P_CHEWY, -1);
+	setPersonPos(54, 111, P_CHEWY, -1);
 	switch_room(33);
 	_G(flags).ChewyDontGo = false;
 	_G(maus_links_click) = false;
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index d43175ee687..380a56317a3 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -57,11 +57,11 @@ int16 Room35::schublade() {
 			autoMove(3, P_CHEWY);
 			_G(spieler).R35Falle = true;
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_ani_block(2, ABLOCK28);
+			startAniBlock(2, ABLOCK28);
 			_G(spieler).PersonHide[P_CHEWY] = false;
-			set_person_pos(33, 90, P_CHEWY, P_LEFT);
+			setPersonPos(33, 90, P_CHEWY, P_LEFT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(93, -1);
+			startAadWait(93, -1);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(atds)->set_ats_str(234, 2, ATS_DATA);
 		}
@@ -83,7 +83,7 @@ int16 Room35::use_cat() {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			flic_cut(FCUT_045);
 			start_spz(CH_TRANS, 1, ANI_FRONT, P_CHEWY);
-			start_aad_wait(94, -1);
+			startAadWait(94, -1);
 		} else if (is_cur_inventar(PUTENKEULE_INV)) {
 			action_flag = true;
 			disable_timer();
@@ -93,22 +93,22 @@ int16 Room35::use_cat() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(det)->stop_detail(0);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(1, 1, ANI_FRONT);
-			_G(det)->start_detail(2, 1, ANI_FRONT);
-			start_detail_wait(3, 1, ANI_FRONT);
+			startSetailWait(1, 1, ANI_FRONT);
+			_G(det)->startDetail(2, 1, ANI_FRONT);
+			startSetailWait(3, 1, ANI_FRONT);
 			_G(obj)->show_sib(SIB_KNOCHEN_R35);
 			_G(obj)->calc_rsi_flip_flop(SIB_KNOCHEN_R35);
 			_G(det)->showStaticSpr(7);
 			_G(atds)->del_steuer_bit(237, ATS_AKTIV_BIT, ATS_DATA);
 
 			while (_G(det)->get_ani_status(2) && !SHOULD_QUIT) {
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 			}
 
 			_G(det)->set_static_ani(0, -1);
 			enable_timer();
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(95, -1);
+			startAadWait(95, -1);
 		}
 	}
 
@@ -137,7 +137,7 @@ void Room35::talk_cat() {
 
 	} else {
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(96, -1);
+		startAadWait(96, -1);
 	}
 
 	showCur();
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 43f000aa285..b36ab8ee898 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -47,7 +47,7 @@ void Room37::entry() {
 
 	if (!_G(flags).LoadGame) {
 		_G(spieler).scrollx = 124;
-		set_person_pos(219, 66, P_CHEWY, P_RIGHT);
+		setPersonPos(219, 66, P_CHEWY, P_RIGHT);
 	}
 
 	if (!_G(spieler).R37Kloppe) {
@@ -78,10 +78,10 @@ void Room37::gedAction(int index) {
 
 	} else if (index == 1) {
 		if (_G(spieler).R37Kloppe && !_G(spieler).R37Mes) {
-			stop_person(P_CHEWY);
+			stopPerson(P_CHEWY);
 			_G(spieler).R37Mes = true;
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(142, -1);
+			startAadWait(142, -1);
 		}
 	}
 }
@@ -111,19 +111,19 @@ short Room37::use_wippe() {
 			_G(flags).NoScroll = true;
 			auto_scroll(129, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(159, -1);
+			startAadWait(159, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_047);
 			_G(flags).NoScroll = false;
 			showCur();
 			_G(spieler).scrollx = 269;
-			set_person_pos(388, 119, P_CHEWY, P_RIGHT);
+			setPersonPos(388, 119, P_CHEWY, P_RIGHT);
 			switch_room(29);
 			_G(maus_links_click) = false;
 
 		} else {
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(160, -1);
+			startAadWait(160, -1);
 		}
 	}
 
@@ -173,7 +173,7 @@ int16 Room37::use_glas() {
 			_G(flags).NoScroll = true;
 			auto_scroll(146, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(147, -1);
+			startAadWait(147, -1);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_048);
 			flic_cut(FCUT_049);
@@ -185,7 +185,7 @@ int16 Room37::use_glas() {
 			_G(obj)->show_sib(SIB_HFUTTER2_R37);
 			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(146, -1);
+			startAadWait(146, -1);
 			showCur();
 			_G(flags).NoScroll = false;
 			g_engine->_sound->playSound(3);
@@ -207,26 +207,26 @@ void Room37::dog_bell() {
 		g_engine->_sound->stopSound(0); // nr 3, sslot 0
 
 		if (!_G(spieler).R37Gebiss) {
-			stop_person(P_CHEWY);
+			stopPerson(P_CHEWY);
 			_G(flags).ChAutoMov = false;
-			set_person_spr(P_LEFT, P_CHEWY);
+			setPersonSpr(P_LEFT, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(178, 0);
 			disable_timer();
 			_G(det)->stop_detail(3);
 			_G(det)->del_static_ani(3);
-			start_detail_wait(5, 1, ANI_FRONT);
+			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->hideStaticSpr(9);
-			start_detail_wait(6, 1, ANI_FRONT);
+			startSetailWait(6, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(det)->start_detail(11, 255, ANI_FRONT);
+			_G(det)->startDetail(11, 255, ANI_FRONT);
 			flic_cut(FCUT_050);
-			start_detail_wait(6, 1, ANI_BACK);
+			startSetailWait(6, 1, ANI_BACK);
 			_G(det)->stop_detail(11);
-			set_person_pos(326, 85, P_CHEWY, P_LEFT);
+			setPersonPos(326, 85, P_CHEWY, P_LEFT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(det)->showStaticSpr(9);
-			start_ani_block(3, ABLOCK31);
+			startAniBlock(3, ABLOCK31);
 			_G(det)->set_static_ani(3, -1);
 			g_engine->_sound->playSound(3, 0);
 //			g_engine->_sound->playSound(3);
@@ -235,14 +235,14 @@ void Room37::dog_bell() {
 			ani_nr = CH_TALK12;
 
 		} else if (!_G(spieler).R37HundScham) {
-			stop_person(P_CHEWY);
-			set_person_spr(P_LEFT, P_CHEWY);
+			stopPerson(P_CHEWY);
+			setPersonSpr(P_LEFT, P_CHEWY);
 			_G(flags).NoScroll = true;
 			auto_scroll(178, 0);
 			_G(room)->set_timer_status(3, TIMER_STOP);
 			_G(det)->del_static_ani(3);
 			_G(det)->stop_detail(3);
-			start_detail_wait(4, 1, ANI_FRONT);
+			startSetailWait(4, 1, ANI_FRONT);
 			flic_cut(FCUT_051);
 			_G(spieler).scrollx = 104;
 			flic_cut(FCUT_054);
@@ -258,7 +258,7 @@ void Room37::dog_bell() {
 
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(dia_nr, -1);
+			startAadWait(dia_nr, -1);
 		}
 	}
 
@@ -274,7 +274,7 @@ void Room37::talk_hahn() {
 	if (!_G(spieler).R37TransHahn) {
 		_G(cur_hide_flag) = 0;
 		hideCur();
-		start_aad_wait(145, -1);
+		startAadWait(145, -1);
 		showCur();
 	} else {
 		hahn_dia();
@@ -303,20 +303,20 @@ void Room37::use_hahn() {
 			_G(room)->set_timer_status(7, TIMER_STOP);
 			_G(det)->stop_detail(7);
 			_G(det)->del_static_ani(7);
-			_G(det)->start_detail(9, 1, ANI_FRONT);
+			_G(det)->startDetail(9, 1, ANI_FRONT);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			del_inventar(GEBISS_INV);
 			_G(flags).NoScroll = true;
 			auto_scroll(177, 0);
 
 			while (_G(det)->get_ani_status(9)) {
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				SHOULD_QUIT_RETURN;
 			}
 
-			_G(det)->start_detail(4, 1, ANI_FRONT);
+			_G(det)->startDetail(4, 1, ANI_FRONT);
 			_G(det)->hideStaticSpr(0);
-			_G(det)->start_detail(10, 10, ANI_FRONT);
+			_G(det)->startDetail(10, 10, ANI_FRONT);
 			autoMove(8, P_CHEWY);
 			flic_cut(FCUT_053);
 			_G(det)->stop_detail(10);
@@ -328,13 +328,13 @@ void Room37::use_hahn() {
 			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATA);
 			_G(det)->hideStaticSpr(8);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(141, -1);
+			startAadWait(141, -1);
 			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
 			showCur();
 		}
 	} else if (_G(spieler).inv_cur) {
-		start_aad_wait(143, -1);
+		startAadWait(143, -1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 6152b9f31a6..138470a8d46 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -55,7 +55,7 @@ void Room39::entry() {
 		if (_G(spieler).R39HowardDa) {
 			_G(det)->showStaticSpr(10);
 			if (!_G(spieler).R39HowardWach)
-				_G(det)->start_detail(1, 255, ANI_FRONT);
+				_G(det)->startDetail(1, 255, ANI_FRONT);
 			else
 				_G(det)->set_static_ani(5, -1);
 
@@ -81,22 +81,22 @@ short Room39::use_howard() {
 				_G(spieler).R39ScriptOk = true;
 				autoMove(3, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				_G(det)->start_detail(6, 255, ANI_FRONT);
-				start_aad_wait(170, -1);
+				_G(det)->startDetail(6, 255, ANI_FRONT);
+				startAadWait(170, -1);
 				_G(det)->stop_detail(6);
-				start_detail_wait(7, 1, ANI_FRONT);
+				startSetailWait(7, 1, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 
 				del_inventar(_G(spieler).AkInvent);
 				_G(det)->stop_detail(1);
-				start_ani_block(2, ABLOCK33);
+				startAniBlock(2, ABLOCK33);
 				start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-				start_aad_wait(167, -1);
+				startAadWait(167, -1);
 				_G(det)->stop_detail(3);
-				start_detail_wait(4, 1, ANI_FRONT);
+				startSetailWait(4, 1, ANI_FRONT);
 				_G(det)->set_static_ani(5, -1);
 				_G(atds)->set_ats_str(62, 1, ATS_DATA);
-				start_aad_wait(169, -1);
+				startAadWait(169, -1);
 				showCur();
 
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
@@ -120,7 +120,7 @@ short Room39::use_howard() {
 
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(dia_nr, -1);
+			startAadWait(dia_nr, -1);
 			action_flag = true;
 		}
 
@@ -142,7 +142,7 @@ void Room39::talk_howard() {
 		}
 	} else {
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(168, -1);
+		startAadWait(168, -1);
 	}
 }
 
@@ -158,7 +158,7 @@ void Room39::ok() {
 	invent_2_slot(BRIEF_INV);
 
 	switch_room(27);
-	start_aad_wait(192, -1);
+	startAadWait(192, -1);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
 }
@@ -232,7 +232,7 @@ int16 Room39::use_tv() {
 			_G(out)->setPalette(_G(pal));
 			set_tv();
 			start_spz(CH_TRANS, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(80, -1);
+			startAadWait(80, -1);
 
 			ani_nr = CH_TRANS;
 			dia_nr = 77;
@@ -248,9 +248,9 @@ int16 Room39::use_tv() {
 		if (_G(spieler).R39TvOn) {
 			if (_G(spieler).R39TranslatorUsed) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-				start_aad_wait(98, -1);
+				startAadWait(98, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_ani_block(2, ABLOCK29);
+				startAniBlock(2, ABLOCK29);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
@@ -277,7 +277,7 @@ int16 Room39::use_tv() {
 	if (dia_nr != -1) {
 		if (ani_nr != -1)
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		start_aad_wait(dia_nr, -1);
+		startAadWait(dia_nr, -1);
 		action_flag = true;
 	}
 
@@ -324,7 +324,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(flags).NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TranslatorUsed && dia_nr == 85)
-					start_aad_wait(dia_nr, -1);
+					startAadWait(dia_nr, -1);
 			}
 		}
 
@@ -339,7 +339,7 @@ void Room39::set_tv() {
 
 	if (_G(spieler).R39TvOn) {
 		if (_G(spieler).R39TvKanal == 2) {
-			_G(det)->start_detail(0, 255, ANI_FRONT);
+			_G(det)->startDetail(0, 255, ANI_FRONT);
 		} else {
 			_G(det)->stop_detail(0);
 			_G(det)->showStaticSpr(_G(spieler).R39TvKanal + 4);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 1e0cb2dc53b..5a1e9e62b1e 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -74,14 +74,14 @@ void Room40::entry(int16 eib_nr) {
 		if (!_G(flags).LoadGame) {
 			switch (eib_nr) {
 			case 69:
-				set_person_pos(30, 105, P_HOWARD, P_RIGHT);
+				setPersonPos(30, 105, P_HOWARD, P_RIGHT);
 				goAutoXy(158, 99, P_HOWARD, ANI_GO);
 				break;
 
 			case 73:
 			case 74:
 			case 87:
-				set_person_pos(158, 93, P_HOWARD, P_LEFT);
+				setPersonPos(158, 93, P_HOWARD, P_LEFT);
 				break;
 			default:
 				break;
@@ -117,12 +117,12 @@ void Room40::xit(int16 eib_nr) {
 				_G(uhr)->disableTimer();
 				_G(out)->ausblenden(0);
 				hide_person();
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				_G(out)->einblenden(_G(pal), 0);
 				_G(uhr)->enableTimer();
 
 				_G(maus_links_click) = false;
-				start_aad_wait(238, -1);
+				startAadWait(238, -1);
 				move_train(1);
 				register_cutscene(15);
 				
@@ -166,12 +166,12 @@ void Room40::move_train(int16 mode) {
 	auto_scroll(232, 0);
 
 	if (!mode)
-		start_aad_wait(206, -1);
+		startAadWait(206, -1);
 
 	int16 lx = -40;
 	int16 ax = -230;
 
-	_G(det)->start_detail(7, 20, ANI_FRONT);
+	_G(det)->startDetail(7, 20, ANI_FRONT);
 	_G(det)->showStaticSpr(11);
 
 	if (mode && _G(spieler).ChewyAni == CHEWY_PUMPKIN)
@@ -195,7 +195,7 @@ void Room40::move_train(int16 mode) {
 			--delay;
 		}
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
 
@@ -204,7 +204,7 @@ void Room40::move_train(int16 mode) {
 	_G(det)->hideStaticSpr(12);
 
 	if (!mode) {
-		start_aad_wait(207, -1);
+		startAadWait(207, -1);
 		auto_scroll(180, 0);
 	}
 	
@@ -245,14 +245,14 @@ void Room40::setup_func() {
 			_G(room)->set_timer_status(255, TIMER_STOP);
 			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 			_G(det)->hideStaticSpr(15);
-			_G(det)->start_detail(POLICE_LEFT, 1, ANI_FRONT);
+			_G(det)->startDetail(POLICE_LEFT, 1, ANI_FRONT);
 			_G(atds)->set_steuer_bit(275, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		switch (_G(spieler).R40PoliceAniStatus) {
 		case POLICE_LEFT:
 			if (_G(det)->get_ani_status(POLICE_LEFT) == false) {
-				_G(det)->start_detail(POLICE_OFFEN, 1, ANI_FRONT);
+				_G(det)->startDetail(POLICE_OFFEN, 1, ANI_FRONT);
 				_G(spieler).R40PoliceAniStatus = POLICE_OFFEN;
 			}
 			break;
@@ -260,7 +260,7 @@ void Room40::setup_func() {
 		case POLICE_OFFEN:
 			if (_G(det)->get_ani_status(POLICE_OFFEN) == false) {
 				_G(det)->showStaticSpr(0);
-				_G(det)->start_detail(POLICE_FLASCHE, 1, ANI_FRONT);
+				_G(det)->startDetail(POLICE_FLASCHE, 1, ANI_FRONT);
 				_G(spieler).R40PoliceAniStatus = POLICE_FLASCHE;
 			}
 			break;
@@ -281,14 +281,14 @@ void Room40::setup_func() {
 				if (_G(spieler).R40DuengerTele) {
 					hideCur();
 					_G(spieler).R40PoliceWeg = true;
-					_G(det)->start_detail(17, 255, ANI_FRONT);
-					start_aad_wait(226, -1);
+					_G(det)->startDetail(17, 255, ANI_FRONT);
+					startAadWait(226, -1);
 					_G(det)->stop_detail(17);
 					_G(spieler).R40HoUse = true;
 					_G(person_end_phase)[P_CHEWY] = P_RIGHT;
-					start_detail_wait(10, 1, ANI_FRONT);
+					startSetailWait(10, 1, ANI_FRONT);
 					_G(person_end_phase)[P_HOWARD] = P_RIGHT;
-					start_aad_wait(224, -1);
+					startAadWait(224, -1);
 					_G(spieler).R40PoliceWeg = true;
 					showCur();
 
@@ -298,7 +298,7 @@ void Room40::setup_func() {
 					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATA);
 
 				} else {
-					_G(det)->start_detail(POLICE_RIGHT, 1, ANI_FRONT);
+					_G(det)->startDetail(POLICE_RIGHT, 1, ANI_FRONT);
 					_G(spieler).R40PoliceAniStatus = POLICE_RIGHT;
 				}
 			}
@@ -325,9 +325,9 @@ int16 Room40::use_mr_pumpkin() {
 				action_ret = true;
 				autoMove(5, P_CHEWY);
 				del_inventar(_G(spieler).AkInvent);
-				start_detail_wait(15, 1, ANI_FRONT);
+				startSetailWait(15, 1, ANI_FRONT);
 				start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-				start_aad_wait(200, -1);
+				startAadWait(200, -1);
 				break;
 
 			case RECORDER_INV:
@@ -347,10 +347,10 @@ int16 Room40::use_mr_pumpkin() {
 						_G(obj)->addInventory(LIKOER2_INV, &_G(room_blk));
 						inventory_2_cur(LIKOER2_INV);
 						switch_room(40);
-						start_aad_wait(236, -1);
+						startAadWait(236, -1);
 					}
 				} else {
-					start_aad_wait(228 + _G(spieler).R39TvRecord, -1);
+					startAadWait(228 + _G(spieler).R39TvRecord, -1);
 				}
 				break;
 
@@ -376,10 +376,10 @@ int16 Room40::use_schalter(int16 aad_nr) {
 
 		if (_G(spieler).R40PoliceAniStatus != 255) {
 			start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-			start_aad_wait(204, -1);
+			startAadWait(204, -1);
 
 			while (_G(spieler).R40PoliceAniStatus != 255) {
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				SHOULD_QUIT_RETURN0;
 			}
 		}
@@ -397,11 +397,11 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		}
 
 		_G(det)->hideStaticSpr(15);
-		start_detail_wait(12, 1, ANI_FRONT);
+		startSetailWait(12, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
-		start_aad_wait(aad_nr, -1);
+		startAadWait(aad_nr, -1);
 		_G(det)->del_static_ani(14);
-		start_detail_wait(13, 1, ANI_FRONT);
+		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(15);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
@@ -417,7 +417,7 @@ void Room40::talk_police() {
 		_G(spieler).R40PoliceStart = false;
 		_G(room)->set_timer_status(255, TIMER_STOP);
 		autoMove(7, P_CHEWY);
-		start_aad_wait(203, -1);
+		startAadWait(203, -1);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
@@ -432,7 +432,7 @@ void Room40::talk_handler() {
 		_G(det)->del_static_ani(4);
 		_G(room)->set_timer_status(4, TIMER_STOP);
 		_G(det)->set_static_ani(3, -1);
-		start_aad_wait(202, -1);
+		startAadWait(202, -1);
 		_G(det)->set_static_ani(4, -1);
 		_G(det)->del_static_ani(3);
 		_G(room)->set_timer_status(4, TIMER_START);
@@ -446,7 +446,7 @@ int16 Room40::use_haendler() {
 	if (_G(menu_item) == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
 		if (!_G(spieler).flags38_2) {
-			start_aad_wait(612, -1);
+			startAadWait(612, -1);
 		} else {
 			hideCur();
 			invent_2_slot(DUENGER_INV);
@@ -457,7 +457,7 @@ int16 Room40::use_haendler() {
 			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATA);
 			autoMove(10, P_CHEWY);
 			autoMove(11, P_HOWARD);
-			start_aad_wait(208, -1);
+			startAadWait(208, -1);
 			autoMove(6, P_HOWARD);
 			_G(flags).NoScroll = true;
 
@@ -465,18 +465,18 @@ int16 Room40::use_haendler() {
 			_G(det)->del_static_ani(4);
 			_G(room)->set_timer_status(4, TIMER_STOP);
 			_G(det)->set_static_ani(3, -1);
-			start_aad_wait(209, -1);
+			startAadWait(209, -1);
 			_G(det)->del_static_ani(3);
 			_G(det)->set_static_ani(5, -1);
-			start_aad_wait(213, -1);
+			startAadWait(213, -1);
 
 			if (_G(spieler).R28RKuerbis) {
 				_G(det)->del_static_ani(5);
 				_G(det)->set_static_ani(3, -1);
-				start_aad_wait(211, -1);
+				startAadWait(211, -1);
 				_G(out)->ausblenden(0);
 				_G(out)->set_teilpalette(_G(pal), 255, 1);
-				start_aad_wait(212, -1);
+				startAadWait(212, -1);
 				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
@@ -488,7 +488,7 @@ int16 Room40::use_haendler() {
 
 			} else {
 				autoMove(11, P_HOWARD);
-				start_aad_wait(210, -1);
+				startAadWait(210, -1);
 			}
 
 			_G(menu_item) = CUR_WALK;
@@ -512,9 +512,9 @@ int16 Room40::use_bmeister() {
 		_G(spieler).R40HoUse = true;
 		autoMove(9, P_CHEWY);
 		autoMove(11, P_HOWARD);
-		start_aad_wait(214, -1);
+		startAadWait(214, -1);
 		bmeister_dia(215);
-		start_aad_wait(216, -1);
+		startAadWait(216, -1);
 		_G(spieler).R40HoUse = false;
 		_G(flags).NoScroll = false;
 		_G(menu_item) = CUR_WALK;
@@ -524,7 +524,7 @@ int16 Room40::use_bmeister() {
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
 		if (_G(spieler).flags37_80) {
-			start_aad_wait(605, -1);
+			startAadWait(605, -1);
 		} else {
 			hideCur();
 			_G(spieler).R40HoUse = true;
@@ -547,17 +547,17 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	_G(det)->del_static_ani(0);
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->stop_detail(0);
-	start_detail_wait(1, 1, ANI_FRONT);
+	startSetailWait(1, 1, ANI_FRONT);
 	_G(det)->set_static_ani(2, -1);
 
 	if (aad_nr == 237) {
-		start_aad_wait(aad_nr, -1);
+		startAadWait(aad_nr, -1);
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_062);
 		_G(fx_blend) = BLEND3;
-		start_aad_wait(375, -1);
+		startAadWait(375, -1);
 	} else {
-		start_aad_wait(aad_nr, -1);
+		startAadWait(aad_nr, -1);
 	}
 
 	_G(flags).NoPalAfterFlc = false;
@@ -581,11 +581,11 @@ bool Room40::use_police() {
 			_G(spieler).R40HoUse = true;
 			autoMove(9, P_CHEWY);
 			autoMove(11, P_HOWARD);
-			start_aad_wait(217, -1);
+			startAadWait(217, -1);
 			autoMove(8, P_CHEWY);
 			goAutoXy(300, 120, P_HOWARD, ANI_WAIT);
 			_G(person_end_phase)[P_HOWARD] = P_RIGHT;
-			start_aad_wait(218, -1);
+			startAadWait(218, -1);
 			start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 			_G(menu_item) = CUR_WALK;
 			cursorChoice(_G(menu_item));
@@ -593,7 +593,7 @@ bool Room40::use_police() {
 			_G(flags).MausLinks = false;
 		}
 	} else {
-		start_aad_wait(225, -1);
+		startAadWait(225, -1);
 	}
 
 	return result;
@@ -608,7 +608,7 @@ int16 Room40::use_tele() {
 
 		int16 dia_nr1 = -1;
 		if (!_G(spieler).R40PoliceAb) {
-			start_aad_wait(219, -1);
+			startAadWait(219, -1);
 			_G(spieler).R40HoUse = false;
 
 		} else {
@@ -624,11 +624,11 @@ int16 Room40::use_tele() {
 				dia_nr1 = 223;
 			}
 
-			start_aad_wait(dia_nr, -1);
+			startAadWait(dia_nr, -1);
 			autoMove(11, P_HOWARD);
 			_G(det)->hideStaticSpr(0);
 			autoMove(9, P_CHEWY);
-			start_aad_wait(dia_nr1, -1);
+			startAadWait(dia_nr1, -1);
 			_G(spieler).R40HoUse = false;
 			int16 timer_wert = 0;
 
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 0238e2967f1..f3f9af9b083 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -44,12 +44,12 @@ void Room41::entry() {
 		if (!_G(flags).LoadGame) {
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
-			start_ani_block(2, ABLOCK32);
+			startAniBlock(2, ABLOCK32);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(0, -1);
-			start_aad_wait(127, -1);
+			startAadWait(127, -1);
 		} else {
-			_G(det)->start_detail(6, 255, ANI_FRONT);
+			_G(det)->startDetail(6, 255, ANI_FRONT);
 		}
 	}
 
@@ -64,7 +64,7 @@ void Room41::entry() {
 	}
 
 	if (!_G(flags).LoadGame)
-		set_person_pos(241, 113, P_HOWARD, P_RIGHT);
+		setPersonPos(241, 113, P_HOWARD, P_RIGHT);
 
 	_G(SetUpScreenFunc) = setup_func;
 	showCur();
@@ -104,18 +104,18 @@ void Room41::talk_hoggy1() {
 	} else if (_G(spieler).R41Einbruch) {
 		if (!_G(spieler).R41BruchInfo) {
 			_G(spieler).R41BruchInfo = true;
-			start_aad_wait(132, -1);
-			start_aad_wait(128, -1);
+			startAadWait(132, -1);
+			startAadWait(128, -1);
 		} else if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
-			start_aad_wait(131, -1);
+			startAadWait(131, -1);
 			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 		} else {
-			start_aad_wait(130, -1);
+			startAadWait(130, -1);
 		}
 	} else {
-		start_aad_wait(130, -1);
+		startAadWait(130, -1);
 	}
 
 	start_hoggy();
@@ -131,15 +131,15 @@ void Room41::talk_hoggy2() {
 	} else if (_G(spieler).R41BruchInfo) {
 		if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
-			start_aad_wait(131, -1);
+			startAadWait(131, -1);
 			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 
 		} else {
-			start_aad_wait(129, -1);
+			startAadWait(129, -1);
 		}
 	} else {
-		start_aad_wait(129, -1);
+		startAadWait(129, -1);
 	}
 
 	start_hoggy();
@@ -147,7 +147,7 @@ void Room41::talk_hoggy2() {
 
 void Room41::first_talk() {
 	_G(spieler).R41FirstTalk = true;
-	start_aad_wait(134, -1);
+	startAadWait(134, -1);
 	_G(atds)->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATA);
 	_G(atds)->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATA);
 }
@@ -180,7 +180,7 @@ int16 Room41::use_kasse() {
 		action_flag = true;
 		stop_hoggy();
 		autoMove(1, P_CHEWY);
-		start_aad_wait(133, -1);
+		startAadWait(133, -1);
 		start_hoggy();
 	}
 
@@ -197,7 +197,7 @@ int16 Room41::use_lola() {
 		autoMove(4, P_CHEWY);
 		g_engine->_sound->stopSound(0);
 		flic_cut(FCUT_057);
-		set_person_pos(127, 112, P_CHEWY, P_LEFT);
+		setPersonPos(127, 112, P_CHEWY, P_LEFT);
 		_G(det)->stop_detail(6);
 
 		_G(atds)->del_steuer_bit(267, ATS_AKTIV_BIT, ATS_DATA);
@@ -217,7 +217,7 @@ int16 Room41::use_brief() {
 		action_flag = true;
 		stop_hoggy();
 		autoMove(6, P_CHEWY);
-		start_aad_wait(126, -1);
+		startAadWait(126, -1);
 		start_hoggy();
 
 	} else if (is_cur_inventar(BRIEF2_INV)) {
@@ -225,7 +225,7 @@ int16 Room41::use_brief() {
 		autoMove(6, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		stop_hoggy();
-		start_aad_wait(186, -1);
+		startAadWait(186, -1);
 		start_hoggy();
 		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
@@ -239,18 +239,18 @@ int16 Room41::use_brief() {
 }
 
 void Room41::sub_dia() {
-	aad_wait(-1);
-	start_aad_wait(161, -1);
+	aadWait(-1);
+	startAadWait(161, -1);
 
 	if (_G(spieler).R41LolaOk) {
-		start_aad_wait(163, -1);
+		startAadWait(163, -1);
 		_G(atds)->hide_item(11, 0, 2);
 		stop_ads_dialog();
 		autoMove(5, P_CHEWY);
 		new_invent_2_cur(PAPIER_INV);
 
 	} else {
-		start_aad_wait(162, -1);
+		startAadWait(162, -1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 4f06a721766..a0bacebf8c2 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -33,7 +33,7 @@ namespace Rooms {
 void Room42::entry() {
 	if (!_G(spieler).R42BeamterWach) {
 		g_engine->_sound->playSound(0);
-		_G(det)->start_detail(0, 255, ANI_FRONT);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
 	}
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
@@ -48,16 +48,16 @@ void Room42::entry() {
 
 			_G(SetUpScreenFunc) = setup_func;
 
-			set_person_pos(80, 43, P_HOWARD, P_LEFT);
+			setPersonPos(80, 43, P_HOWARD, P_LEFT);
 			_G(atds)->set_ats_str(263, 1, ATS_DATA);
 			_G(atds)->set_ats_str(264, 1, ATS_DATA);
 		}
 
 		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && !_G(spieler).R42BriefOk)
-			start_aad_wait(302, -1);
+			startAadWait(302, -1);
 
 		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk)
-			start_aad_wait(301, -1);
+			startAadWait(301, -1);
 	}
 }
 
@@ -79,13 +79,13 @@ void Room42::get_kuerbis(int16 aad_nr) {
 	hideCur();
 	autoMove(1, P_CHEWY);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_BACK);
+	startSetailWait(7, 1, ANI_BACK);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(7, 1, ANI_FRONT);
+	startSetailWait(7, 1, ANI_FRONT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	showCur();
 }
@@ -104,26 +104,26 @@ int16 Room42::use_psack() {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_FRONT);
+		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		start_aad_wait(187, -1);
+		startAadWait(187, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(9, 1, ANI_FRONT);
+		startSetailWait(9, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		new_invent_2_cur(BMARKE_INV);
-		start_aad_wait(181, -1);
+		startAadWait(181, -1);
 		_G(spieler).R42MarkeOk = true;
 		autoMove(4, P_CHEWY);
-		start_aad_wait(185, -1);
+		startAadWait(185, -1);
 		_G(spieler).R42HoToBeamter = false;
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(10, 1, ANI_FRONT);
+		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
-		start_aad_wait(183, -1);
+		startAadWait(183, -1);
 		_G(obj)->calc_rsi_flip_flop(SIB_BKASTEN_R28);
 		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
@@ -133,7 +133,7 @@ int16 Room42::use_psack() {
 
 	} else if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
-		start_aad_wait(182, -1);
+		startAadWait(182, -1);
 	}
 
 	showCur();
@@ -148,7 +148,7 @@ int16 Room42::use_beamter() {
 		_G(atds)->set_ats_str(264, 2, ATS_DATA);
 		hideCur();
 		autoMove(4, P_CHEWY);
-		start_aad_wait(184, -1);
+		startAadWait(184, -1);
 		_G(spieler).R42HoToBeamter = true;
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(_G(menu_item));
@@ -180,7 +180,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 	if (str_end_nr != 4) {
 		while (_G(atds)->aad_get_status() != -1) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
@@ -189,16 +189,16 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 		switch (str_end_nr) {
 		case 1:
-			start_detail_wait(3, 4, ANI_FRONT);
+			startSetailWait(3, 4, ANI_FRONT);
 			break;
 
 		case 2:
 			g_engine->_sound->playSound(4);
-			start_detail_wait(4, 13, ANI_FRONT);
+			startSetailWait(4, 13, ANI_FRONT);
 			break;
 
 		case 3:
-			start_detail_wait(5, 2, ANI_FRONT);
+			startSetailWait(5, 2, ANI_FRONT);
 			break;
 
 		default:
@@ -206,29 +206,29 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		}
 	} else {
 		while (_G(atds)->aad_get_status() < 2) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
 		_G(det)->stop_detail(0);
 		g_engine->_sound->stopSound(0);
-		start_detail_wait(1, 1, ANI_FRONT);
-		_G(det)->start_detail(2, 255, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
+		_G(det)->startDetail(2, 255, ANI_FRONT);
 
 		while (_G(atds)->aad_get_status() != -1) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
 		_G(det)->stop_detail(2);
-		_G(det)->start_detail(0, 255, ANI_FRONT);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
 		g_engine->_sound->playSound(0, 0);
 		g_engine->_sound->playSound(0);
 	}
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(det)->start_detail(6, 255, ANI_FRONT);
-	start_aad_wait(135, -1);
+	_G(det)->startDetail(6, 255, ANI_FRONT);
+	startAadWait(135, -1);
 	_G(det)->stop_detail(6);
 	_G(flags).NoDiaBox = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index 931fe31bee5..d0f24f66440 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -39,11 +39,11 @@ void Room43::night_small() {
 	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
-	start_aad_wait(188, -1);
+	startAadWait(188, -1);
 	auto_scroll(320, 0);
-	start_aad_wait(189, -1);
+	startAadWait(189, -1);
 	auto_scroll(0, 0);
-	start_aad_wait(190, -1);
+	startAadWait(190, -1);
 	_G(spieler).ScrollxStep = 16;
 	auto_scroll(192, 0);
 
@@ -55,7 +55,7 @@ void Room43::night_small() {
 	}
 
 	_G(spieler).scrollx = 194;
-	start_aad_wait(191, -1);
+	startAadWait(191, -1);
 	flic_cut(FCUT_058);
 	g_engine->_sound->stopSound(0);
 	_G(flags).NoScroll = false;
@@ -76,9 +76,9 @@ void Room43::catch_pg() {
 	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
-	start_aad_wait(234, -1);
+	startAadWait(234, -1);
 	auto_scroll(194, 0);
-	start_aad_wait(235, -1);
+	startAadWait(235, -1);
 	_G(spieler).R43GetPgLady = true;
 	flic_cut(FCUT_058);
 
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index cfc9e74063b..539c66f2edc 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -39,7 +39,7 @@ void Room44::look_news() {
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
 	_G(room)->load_room(&_G(room_blk), 44, &_G(spieler));
 
-	start_aad_wait(172, -1);
+	startAadWait(172, -1);
 	_G(spieler).scrollx = tmpsx;
 	_G(spieler).scrolly = tmpsy;
 	switch_room(tmproom);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 3bd25702394..a6819b9ddf5 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -71,8 +71,8 @@ void Room45::entry(int16 eib_nr) {
 			}
 		}
 
-		set_person_pos(ch_x, ch_y, P_CHEWY, P_LEFT);
-		set_person_pos(ho_x, ho_y, P_HOWARD, P_LEFT);
+		setPersonPos(ch_x, ch_y, P_CHEWY, P_LEFT);
+		setPersonPos(ho_x, ho_y, P_HOWARD, P_LEFT);
 	}
 }
 
@@ -133,7 +133,7 @@ void Room45::setup_func() {
 							x = 0;
 						}
 						_G(det)->setSetailPos(3 + i, x, y);
-						_G(det)->start_detail(3 + i, 255, ANI_FRONT);
+						_G(det)->startDetail(3 + i, 255, ANI_FRONT);
 					}
 				}
 			}
@@ -199,11 +199,11 @@ int16 Room45::use_taxi() {
 void Room45::talk_taxi(int16 aad_nr) {
 	_G(room)->set_timer_status(12, TIMER_STOP);
 	_G(det)->del_static_ani(12);
-	start_detail_wait(13, 1, ANI_FRONT);
+	startSetailWait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 	_G(det)->del_static_ani(14);
-	start_detail_wait(13, 1, ANI_BACK);
+	startSetailWait(13, 1, ANI_BACK);
 	_G(det)->set_static_ani(12, -1);
 	_G(room)->set_timer_status(12, TIMER_START);
 }
@@ -229,7 +229,7 @@ void Room45::taxi_mov() {
 	g_engine->_sound->playSound(15, 2);
 	g_engine->_sound->playSound(15, 2, false);
 	g_engine->_sound->playSound(15, 0);
-	start_detail_wait(15, 1, ANI_FRONT);
+	startSetailWait(15, 1, ANI_FRONT);
 	g_engine->_sound->stopSound(0);
 	switch_room(48);
 }
@@ -244,16 +244,16 @@ int16 Room45::use_boy() {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
 			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATA);
-			start_aad_wait(258, -1);
+			startAadWait(258, -1);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
-			start_detail_wait(1, 1, ANI_FRONT);
+			startSetailWait(1, 1, ANI_FRONT);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(0, -1);
 			_G(spieler).R45MagOk = true;
 		}
 	} else {
-		start_aad_wait(259, -1);
+		startAadWait(259, -1);
 	}
 
 	showCur();
@@ -271,7 +271,7 @@ void Room45::talk_boy() {
 		aad_nr = 259;
 	}
 
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 53d0f5e239b..d484769d076 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -35,9 +35,9 @@ void Room46::entry(int16 eib_nr) {
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (eib_nr == 79) {
-			set_person_pos(140, 90, P_HOWARD, P_LEFT);
+			setPersonPos(140, 90, P_HOWARD, P_LEFT);
 			autoMove(3, P_CHEWY);
-			set_person_spr(P_LEFT, P_CHEWY);
+			setPersonSpr(P_LEFT, P_CHEWY);
 		}
 	}
 
@@ -48,19 +48,19 @@ void Room46::entry(int16 eib_nr) {
 		if (_G(spieler).flags33_8) {
 			_G(maus_links_click) = false;
 			hideCur();
-			set_person_pos(175, 73, P_HOWARD, P_LEFT);
-			set_person_pos(147, 109, P_CHEWY, P_LEFT);
+			setPersonPos(175, 73, P_HOWARD, P_LEFT);
+			setPersonPos(147, 109, P_CHEWY, P_LEFT);
 			_G(spieler).flags33_8 = false;
 			_G(spieler).SVal1 = 46;
-			wait_show_screen(10);
+			waitShowScreen(10);
 
 			start_spz_wait(64, 1, false, P_CHEWY);
 			start_spz(65, 255, false, P_CHEWY);
-			start_aad_wait(494, -1);
+			startAadWait(494, -1);
 			_G(spieler).SVal2 = 504;
 			switch_room(92);
 			start_spz(65, 255, false, P_CHEWY);
-			start_aad_wait(495, -1);
+			startAadWait(495, -1);
 			_G(spieler).room_e_obj[78].Exit = 90;
 			showCur();
 		}
@@ -100,36 +100,36 @@ void Room46::bodo() {
 	hideCur();
 	_G(det)->showStaticSpr(0);
 	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
-	start_aad_wait(240, -1);
+	startAadWait(240, -1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(42, 76, P_CHEWY, ANI_WAIT);
-	start_aad_wait(250, -1);
+	startAadWait(250, -1);
 	autoMove(1, P_CHEWY);
-	set_person_spr(P_RIGHT, P_CHEWY);
-	start_aad_wait(251, -1);
+	setPersonSpr(P_RIGHT, P_CHEWY);
+	startAadWait(251, -1);
 	autoMove(2, P_CHEWY);
 
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	start_detail_wait(0, 1, ANI_FRONT);
-	_G(det)->start_detail(5, 255, ANI_FRONT);
-	start_aad_wait(241, -1);
+	startSetailWait(0, 1, ANI_FRONT);
+	_G(det)->startDetail(5, 255, ANI_FRONT);
+	startAadWait(241, -1);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(5);
-	start_aad_wait(609, -1);
+	startAadWait(609, -1);
 	_G(det)->hideStaticSpr(5);
-	start_detail_wait(2, 1, ANI_FRONT);
-	start_detail_wait(3, 1, ANI_FRONT);
-	_G(det)->start_detail(4, 255, ANI_FRONT);
-	start_aad_wait(242, -1);
+	startSetailWait(2, 1, ANI_FRONT);
+	startSetailWait(3, 1, ANI_FRONT);
+	_G(det)->startDetail(4, 255, ANI_FRONT);
+	startAadWait(242, -1);
 	_G(det)->stop_detail(4);
 
 	_G(det)->showStaticSpr(6);
-	start_aad_wait(610, -1);
+	startAadWait(610, -1);
 	_G(det)->hideStaticSpr(6);
-	start_detail_wait(6, 1, ANI_FRONT);
+	startSetailWait(6, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(3);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	start_detail_wait(1, 1, ANI_FRONT);
+	startSetailWait(1, 1, ANI_FRONT);
 	flic_cut(FCUT_065);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
@@ -141,8 +141,8 @@ void Room46::bodo() {
 	load_chewy_taf(CHEWY_ROCKER);
 	_G(spieler).R28ChewyPump = false;
 	
-	set_person_pos(213, 118, P_CHEWY, P_RIGHT);
-	start_aad_wait(243, -1);
+	setPersonPos(213, 118, P_CHEWY, P_RIGHT);
+	startAadWait(243, -1);
 	invent_2_slot(UHR_INV);
 	invent_2_slot(RING_INV);
 	_G(spieler).R46GetLeder = true;
@@ -191,7 +191,7 @@ int16 Room46::use_schloss() {
 			autoMove(1, P_CHEWY);
 			switch_room(47);
 		} else {
-			start_aad_wait(252, -1);
+			startAadWait(252, -1);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index 58956a272a6..c03b8cb3fa6 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -30,7 +30,7 @@ namespace Rooms {
 
 void Room47::entry() {
 	hide_person();
-	set_person_pos(40, 170, P_CHEWY, P_RIGHT);
+	setPersonPos(40, 170, P_CHEWY, P_RIGHT);
 	_G(SetUpScreenFunc) = set_detail;
 	_G(flags).MainInput = false;
 }
@@ -38,7 +38,7 @@ void Room47::entry() {
 void Room47::xit() {
 	_G(flags).MainInput = true;
 	show_person();
-	set_person_pos(114, 102, P_CHEWY, P_LEFT);
+	setPersonPos(114, 102, P_CHEWY, P_LEFT);
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 }
 
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 53f21624437..7269981a559 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -75,9 +75,9 @@ void Room48::frage() {
 	if (!_G(flags).AutoAniPlay) {
 		_G(flags).AutoAniPlay = true;
 		hideCur();
-		start_detail_wait(1, 1, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(6);
-		start_detail_wait(1, 1, ANI_BACK);
+		startSetailWait(1, 1, ANI_BACK);
 		_G(det)->hideStaticSpr(6);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
@@ -136,14 +136,14 @@ void Room48::setup_func() {
 							_G(room)->set_timer_status(0, TIMER_STOP);
 							_G(det)->stop_detail(0);
 							_G(det)->del_static_ani(0);
-							start_detail_wait(2, 1, ANI_FRONT);
+							startSetailWait(2, 1, ANI_FRONT);
 							g_engine->_sound->stopSound(0);
 							_G(menu_item) = CUR_WALK;
 							cursorChoice(_G(menu_item));
 							showCur();
 							_G(spieler).R48TaxiEntry = true;
 							_G(maus_links_click) = false;
-							set_up_screen(DO_SETUP);
+							setupScreen(DO_SETUP);
 
 							for (int16 i = 0; i < MAX_PERSON; i++) {
 								if (_G(spieler).R48TaxiPerson[i]) {
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 97a8c62bd91..08df58487ae 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -58,14 +58,14 @@ void Room49::entry(int16 eib_nr) {
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
-			set_person_pos(527, 76, P_HOWARD, P_LEFT);
-			set_person_pos(491, 98, P_CHEWY, P_LEFT);
+			setPersonPos(527, 76, P_HOWARD, P_LEFT);
+			setPersonPos(491, 98, P_CHEWY, P_LEFT);
 			_G(maus_links_click) = false;
 			_G(spieler).scrollx = 320;
 			_G(spieler).scrolly = 0;
-			_G(det)->start_detail(5, 1, ANI_FRONT);
+			_G(det)->startDetail(5, 1, ANI_FRONT);
 		} else if (eib_nr == 83) {
-			set_person_pos(377, 78, P_HOWARD, P_LEFT);
+			setPersonPos(377, 78, P_HOWARD, P_LEFT);
 		}
 	}
 }
@@ -79,7 +79,7 @@ void Room49::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		} else if (eib_nr == 81) {
 			_G(SetUpScreenFunc) = nullptr;
-			start_aad_wait(268, -1);
+			startAadWait(268, -1);
 		}
 	}
 }
@@ -108,7 +108,7 @@ void Room49::calc_boy_ani() {
 	}
 
 	_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
-	_G(det)->start_detail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_FRONT);
+	_G(det)->startDetail(_G(spieler).R49BoyAni ? 1 : 0, 1, ANI_FRONT);
 	_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 }
 
@@ -117,28 +117,28 @@ void Room49::calc_boy() {
 		hideCur();
 		_G(room)->set_timer_status(255, TIMER_STOP);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
-		stop_person(P_CHEWY);
-		stop_person(P_HOWARD);
+		stopPerson(P_CHEWY);
+		stopPerson(P_HOWARD);
 		_G(person_end_phase)[P_CHEWY] = P_LEFT;
 		_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 		_G(det)->del_static_ani(_G(spieler).R49BoyAni ? 1 : 0);
 		_G(det)->set_static_ani(2, -1);
 
 		_G(SetUpScreenFunc) = nullptr;
-		start_aad_wait(262, -1);
+		startAadWait(262, -1);
 		_G(SetUpScreenFunc) = nullptr;
 		autoMove(3, P_CHEWY);
 		goAutoXy(374, 79, P_HOWARD, ANI_WAIT);
-		set_person_spr(P_LEFT, P_HOWARD);
+		setPersonSpr(P_LEFT, P_HOWARD);
 		_G(det)->del_static_ani(2);
-		start_detail_wait(3, 1, ANI_FRONT);
+		startSetailWait(3, 1, ANI_FRONT);
 
 		_G(det)->showStaticSpr(9);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		start_detail_wait(8, 1, ANI_FRONT);
+		startSetailWait(8, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = false;
 		_G(det)->hideStaticSpr(9);
-		start_detail_wait(4, 1, ANI_GO);
+		startSetailWait(4, 1, ANI_GO);
 
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
@@ -178,7 +178,7 @@ void Room49::use_boy_cigar() {
 	const int16 zoom = _G(room)->_roomInfo->_zoomFactor;
 	_G(room)->set_zoom(zoom);
 	goAutoXy(416, 79, P_HOWARD, ANI_WAIT);
-	set_person_spr(P_LEFT, P_HOWARD);
+	setPersonSpr(P_LEFT, P_HOWARD);
 	_G(flags).NoScroll = true;
 
 	auto_scroll(164, 0);
@@ -191,8 +191,8 @@ void Room49::use_boy_cigar() {
 	_G(det)->stop_detail(_G(spieler).R49BoyAni ? 1 : 0);
 
 	_G(flags).NoScroll = false;
-	set_person_spr(P_RIGHT, P_CHEWY);
-	start_aad_wait(264, -1);
+	setPersonSpr(P_RIGHT, P_CHEWY);
+	startAadWait(264, -1);
 	_G(room)->set_zoom(zoom);
 
 	_G(obj)->addInventory(GUM_INV, &_G(room_blk));
@@ -220,8 +220,8 @@ void Room49::talk_boy(int16 aad_nr) {
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
 		_G(det)->set_static_ani(2, -1);
 		_G(SetUpScreenFunc) = nullptr;
-		stop_person(P_HOWARD);
-		start_aad_wait(aad_nr, -1);
+		stopPerson(P_HOWARD);
+		startAadWait(aad_nr, -1);
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->del_static_ani(2);
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
@@ -232,8 +232,8 @@ void Room49::talk_boy(int16 aad_nr) {
 void Room49::look_hotel() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		_G(SetUpScreenFunc) = nullptr;
-		stop_person(P_HOWARD);
-		start_aad_wait(261, -1);
+		stopPerson(P_HOWARD);
+		startAadWait(261, -1);
 		_G(SetUpScreenFunc) = setup_func;
 	}
 }
@@ -244,7 +244,7 @@ int16 Room49::use_taxi() {
 	if (!_G(spieler).inv_cur) {
 		action_ret = true;
 		hideCur();
-		start_ani_block(2, ABLOCK34);
+		startAniBlock(2, ABLOCK34);
 		_G(det)->showStaticSpr(7);
 		autoMove(2, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
@@ -259,7 +259,7 @@ int16 Room49::use_taxi() {
 		}
 
 		_G(det)->hideStaticSpr(7);
-		start_detail_wait(5, 1, ANI_FRONT);
+		startSetailWait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 5fdeebd6ce7..383874861ce 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -43,9 +43,9 @@ void Room50::entry(int16 eib_nr) {
 		hideCur();
 		stop_page();
 		_G(maus_links_click) = false;
-		set_person_pos(1, 64, P_HOWARD, P_RIGHT);
-		set_person_pos(92, 123, P_CHEWY, P_LEFT);
-		start_aad_wait(510, -1);
+		setPersonPos(1, 64, P_HOWARD, P_RIGHT);
+		setPersonPos(92, 123, P_CHEWY, P_LEFT);
+		startAadWait(510, -1);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
@@ -57,7 +57,7 @@ void Room50::entry(int16 eib_nr) {
 		if (_G(spieler).R50Zigarre) {
 			stop_cigar();
 		} else {
-			_G(det)->start_detail(0, 255, ANI_FRONT);
+			_G(det)->startDetail(0, 255, ANI_FRONT);
 		}
 
 		if (!_G(spieler).R50KeyOK) {
@@ -74,9 +74,9 @@ void Room50::entry(int16 eib_nr) {
 
 			if (!_G(flags).LoadGame) {
 				if (eib_nr == 85)
-					set_person_pos(298, 56, P_HOWARD, P_RIGHT);
+					setPersonPos(298, 56, P_HOWARD, P_RIGHT);
 				else
-					set_person_pos(1, 64, P_HOWARD, P_RIGHT);
+					setPersonPos(1, 64, P_HOWARD, P_RIGHT);
 			}
 		}
 	}
@@ -118,7 +118,7 @@ void Room50::stop_cigar() {
 void Room50::calc_wasser() {
 	if (!_wasser) {
 		stop_page();
-		_G(det)->start_detail(4, 1, ANI_FRONT);
+		_G(det)->startDetail(4, 1, ANI_FRONT);
 		_wasser = true;
 	}
 }
@@ -141,14 +141,14 @@ void Room50::calc_treppe() {
 
 		if (!_G(spieler).R50KeyOK) {
 			hideCur();
-			stop_person(P_CHEWY);
+			stopPerson(P_CHEWY);
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
 			_G(flags).NoScroll = true;
 			auto_scroll(40, 0);
 			stop_page();
 			_G(det)->set_static_ani(5, -1);
-			start_aad_wait(272, -1);
+			startAadWait(272, -1);
 			autoMove(3, P_CHEWY);
 			aad_page(273, 5);
 			_G(flags).NoScroll = false;
@@ -170,10 +170,10 @@ int16 Room50::use_gutschein() {
 			_wasser = false;
 			stop_page();
 			del_inventar(_G(spieler).AkInvent);
-			start_ani_block(2, ABLOCK36);
+			startAniBlock(2, ABLOCK36);
 			aad_page(274, 8);
 		} else {
-			start_aad_wait(276, -1);
+			startAadWait(276, -1);
 		}
 	}
 
@@ -190,7 +190,7 @@ int16 Room50::use_gum() {
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_wasser = false;
 		stop_page();
-		start_detail_wait(6, 1, ANI_FRONT);
+		startSetailWait(6, 1, ANI_FRONT);
 		_G(det)->set_static_ani(5, -1);
 		autoMove(3, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -198,20 +198,20 @@ int16 Room50::use_gum() {
 		_G(SetUpScreenFunc) = nullptr;
 		goAutoXy(112, 57, P_HOWARD, ANI_WAIT);
 
-		set_person_spr(P_LEFT, P_HOWARD);
+		setPersonSpr(P_LEFT, P_HOWARD);
 		del_inventar(_G(spieler).AkInvent);
 		hide_person();
-		start_detail_wait(2, 1, ANI_FRONT);
+		startSetailWait(2, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(4);
-		start_detail_wait(2, 1, ANI_BACK);
+		startSetailWait(2, 1, ANI_BACK);
 		show_person();
-		set_person_spr(P_LEFT, P_CHEWY);
-		start_aad_wait(275, -1);
+		setPersonSpr(P_LEFT, P_CHEWY);
+		startAadWait(275, -1);
 		_G(det)->del_static_ani(5);
-		start_detail_wait(9, 1, ANI_FRONT);
+		startSetailWait(9, 1, ANI_FRONT);
 		_G(det)->del_static_ani(5);
 		_G(det)->set_static_ani(10, -1);
-		start_aad_wait(277, -1);
+		startAadWait(277, -1);
 		_G(SetUpScreenFunc) = setup_func;
 		autoMove(3, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -230,14 +230,14 @@ int16 Room50::use_gum() {
 }
 
 void Room50::talk_page() {
-	start_aad_wait(276, -1);
+	startAadWait(276, -1);
 }
 
 void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 	_G(det)->set_static_ani(ani_nr, -1);
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 	_G(det)->del_static_ani(ani_nr);
-	start_detail_wait(6, 1, ANI_BACK);
+	startSetailWait(6, 1, ANI_BACK);
 	go_page();
 
 	if (!_G(spieler).R50KeyOK)
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 612e7f9672e..5e6699c778c 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -57,8 +57,8 @@ void Room51::entry() {
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 0;
-		set_person_pos(34, 120, P_HOWARD, P_RIGHT);
-		set_person_pos(234, 69, P_CHEWY, P_LEFT);
+		setPersonPos(34, 120, P_HOWARD, P_RIGHT);
+		setPersonPos(234, 69, P_CHEWY, P_LEFT);
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->showStaticSpr(17);
 		_index = 0;
@@ -76,21 +76,21 @@ void Room51::entry() {
 		_G(det)->hideStaticSpr(17);
 
 		for (int i = 0; i < 2; i++)
-			_G(det)->start_detail(3 + i, 1, ANI_FRONT);
+			_G(det)->startDetail(3 + i, 1, ANI_FRONT);
 
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 
 			if (!_G(flags).LoadGame) {
-				set_person_pos(88, 93, P_HOWARD, P_RIGHT);
+				setPersonPos(88, 93, P_HOWARD, P_RIGHT);
 			}
 
 			if (!_G(spieler).R51FirstEntry) {
 				hideCur();
 				_G(spieler).R51FirstEntry = true;
-				set_person_spr(P_LEFT, P_CHEWY);
-				start_aad_wait(283, -1);
+				setPersonSpr(P_LEFT, P_CHEWY);
+				startAadWait(283, -1);
 				showCur();
 			}
 
@@ -146,29 +146,29 @@ void Room51::setup_func() {
 		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->setSetailPos(8, _tmpx - 20, _tmpy + 41);
-			start_detail_wait(8, 1, ANI_FRONT);
+			startSetailWait(8, 1, ANI_FRONT);
 			_flag = false;
 			++_index;
 
 			switch (_index) {
 			case 2:
-				start_aad_wait(512, -1);
+				startAadWait(512, -1);
 				_index = 1000;
 				break;
 
 			case 1006:
-				start_aad_wait(513, -1);
+				startAadWait(513, -1);
 				_index = 2000;
 				break;
 
 			case 2003:
-				start_aad_wait(615, -1);
+				startAadWait(615, -1);
 				_index = 10000;
 				break;
 
 			case 10012:
-				start_aad_wait(514, -1);
-				wait_show_screen(5);
+				startAadWait(514, -1);
+				waitShowScreen(5);
 				_G(flags).NoPalAfterFlc = true;
 				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
@@ -220,10 +220,10 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			if (!_G(spieler).R51HotelRoom) {
 				autoMove(11, P_HOWARD);
-				set_person_spr(P_LEFT, P_HOWARD);
+				setPersonSpr(P_LEFT, P_HOWARD);
 				_G(spieler).R51HotelRoom = true;
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
-				start_aad_wait(285, -1);
+				startAadWait(285, -1);
 				_G(atds)->set_ats_str(329, 1, ATS_DATA);
 				_G(SetUpScreenFunc) = setup_func;
 
@@ -240,20 +240,20 @@ int16 Room51::use_door(int16 txt_nr) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(2);
 				_G(det)->showStaticSpr(1);
-				start_detail_wait(2, 1, ANI_FRONT);
-				_G(det)->start_detail(5, 255, ANI_FRONT);
+				startSetailWait(2, 1, ANI_FRONT);
+				_G(det)->startDetail(5, 255, ANI_FRONT);
 
 				if (!_G(spieler).R52HotDogOk) {
-					start_aad_wait(287, -1);
+					startAadWait(287, -1);
 					autoMove(12, P_CHEWY);
 					_G(det)->stop_detail(5);
-					start_ani_block(5, ABLOCK37);
+					startAniBlock(5, ABLOCK37);
 					_G(det)->hideStaticSpr(1);
 					g_engine->_sound->stopSound(0);
-					start_aad_wait(284, -1);
+					startAadWait(284, -1);
 				} else {
 					_G(spieler).R51KillerWeg = true;
-					start_aad_wait(290, -1);
+					startAadWait(290, -1);
 					g_engine->_sound->stopSound(0);
 					_G(out)->ausblenden(1);
 					_G(out)->setPointer(nullptr);
@@ -271,11 +271,11 @@ int16 Room51::use_door(int16 txt_nr) {
 					_G(det)->hideStaticSpr(1);
 
 					_G(fx_blend) = BLEND3;
-					set_up_screen(DO_SETUP);
-					start_aad_wait(291, -1);
+					setupScreen(DO_SETUP);
+					startAadWait(291, -1);
 				}
 			} else {
-				start_aad_wait(401, -1);
+				startAadWait(401, -1);
 			}
 			break;
 
@@ -286,15 +286,15 @@ int16 Room51::use_door(int16 txt_nr) {
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
 			flic_cut(FCUT_114);
-			set_person_pos(115, 144, P_CHEWY, P_LEFT);
+			setPersonPos(115, 144, P_CHEWY, P_LEFT);
 			_G(fx_blend) = BLEND3;
-			set_up_screen(NO_SETUP);
-			start_aad_wait(564, -1);
+			setupScreen(NO_SETUP);
+			startAadWait(564, -1);
 			break;
 
 		case 332:
 			autoMove(6, P_CHEWY);
-			start_aad_wait(286, -1);
+			startAadWait(286, -1);
 			break;
 
 		case 333:
@@ -303,13 +303,13 @@ int16 Room51::use_door(int16 txt_nr) {
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
 				_G(det)->showStaticSpr(3);
-				start_aad_wait(278, -1);
-				start_detail_frame(0, 1, ANI_FRONT, 3);
+				startAadWait(278, -1);
+				startDetailFrame(0, 1, ANI_FRONT, 3);
 				start_spz(HO_BRILL_JMP, 1, ANI_FRONT, P_HOWARD);
-				wait_detail(0);
+				waitDetail(0);
 
 				_G(det)->showStaticSpr(14);
-				start_aad_wait(279, -1);
+				startAadWait(279, -1);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_FLASCHE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_FLASCHE_R51);
@@ -318,8 +318,8 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			case 1:
 				_G(det)->showStaticSpr(3);
-				start_aad_wait(280, -1);
-				start_detail_wait(1, 1, ANI_FRONT);
+				startAadWait(280, -1);
+				startSetailWait(1, 1, ANI_FRONT);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_KAPPE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_KAPPE_R51);
@@ -328,9 +328,9 @@ int16 Room51::use_door(int16 txt_nr) {
 				break;
 
 			default:
-				start_aad_wait(281, -1);
+				startAadWait(281, -1);
 				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
-					start_aad_wait(282, -1);
+					startAadWait(282, -1);
 				break;
 			}
 			break;
@@ -353,12 +353,12 @@ int16 Room51::cut_serv(int16 frame) {
 void Room51::timer_action(int16 t_nr, int16 obj_nr) {
 	if (obj_nr == 9 || obj_nr == 10) {
 		if (!_enemyFlag[obj_nr - 9]) {
-			_G(det)->start_detail(obj_nr, 1, ANI_FRONT);
+			_G(det)->startDetail(obj_nr, 1, ANI_FRONT);
 			_enemyFlag[obj_nr - 9] = true;
 
 		} else if (!_G(det)->get_ani_status(obj_nr)) {
-			_G(det)->start_detail(obj_nr, 1, ANI_GO);
-			_G(det)->start_detail(obj_nr + 2, 1, ANI_FRONT);
+			_G(det)->startDetail(obj_nr, 1, ANI_GO);
+			_G(det)->startDetail(obj_nr + 2, 1, ANI_FRONT);
 			_G(uhr)->resetTimer(t_nr, 0);
 			_enemyFlag[obj_nr - 9] = false;
 		}
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 5308b279567..c560b259f35 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -47,8 +47,8 @@ void Room52::entry() {
 	if (!_G(flags).LoadGame) {
 		_G(det)->showStaticSpr(4);
 		_G(spieler).R52TuerAuf = true;
-		set_person_pos(20, 50, P_HOWARD, P_LEFT);
-		set_person_pos(35, 74, P_CHEWY, P_RIGHT);
+		setPersonPos(20, 50, P_HOWARD, P_LEFT);
+		setPersonPos(35, 74, P_CHEWY, P_RIGHT);
 		autoMove(2, P_CHEWY);
 		_G(spieler).R52TuerAuf = false;
 		_G(det)->hideStaticSpr(4);
@@ -85,31 +85,31 @@ int16 Room52::use_hot_dog() {
 		g_engine->_sound->playSound(0);
 		_G(atds)->set_ats_str(341, 1, ATS_DATA);
 		autoMove(2, P_CHEWY);
-		set_person_spr(P_LEFT, P_CHEWY);
-		start_aad_wait(288, -1);
+		setPersonSpr(P_LEFT, P_CHEWY);
+		startAadWait(288, -1);
 
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
 		autoMove(5, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(7, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_FRONT);
 		g_engine->_sound->playSound(7, 0);
 		g_engine->_sound->playSound(7);
-		_G(det)->start_detail(8, 255, ANI_FRONT);
+		_G(det)->startDetail(8, 255, ANI_FRONT);
 
 		for (int16 i = 0; i < 5; i++) {
-			wait_show_screen(20);
+			waitShowScreen(20);
 			_G(det)->stop_detail(2 + i);
 		}
 
 		g_engine->_sound->stopSound(0);
 		_G(det)->stop_detail(0);
 		_G(det)->stop_detail(8);
-		start_detail_wait(7, 1, ANI_BACK);
+		startSetailWait(7, 1, ANI_BACK);
 		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATA);
-		start_aad_wait(303, -1);
+		startAadWait(303, -1);
 		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATA);
 		_G(spieler).R52KakerWeg = true;
 	}
@@ -120,17 +120,17 @@ int16 Room52::use_hot_dog() {
 
 void Room52::plot_armee(int16 frame) {
 	for (int16 i = 0; i < 5; i++) {
-		wait_show_screen(frame);
-		_G(det)->start_detail(2 + i, 255, ANI_FRONT);
+		waitShowScreen(frame);
+		_G(det)->startDetail(2 + i, 255, ANI_FRONT);
 	}
 }
 
 void Room52::kaker_platt() {
 	if (!_G(spieler).R52KakerJoke && _G(spieler).R52HotDogOk && !_G(spieler).R52KakerWeg && !_G(flags).ExitMov) {
 		_G(spieler).R52KakerJoke = true;
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		hideCur();
-		start_aad_wait(289, -1);
+		startAadWait(289, -1);
 		showCur();
 	}
 }
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 84c4ec5b4b2..9d6b6038ffe 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -44,7 +44,7 @@ void Room53::entry() {
 	hideCur();
 	_G(obj)->hide_sib(SIB_VISIT_R53);
 	_G(atds)->del_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
-	start_detail_wait(0, 1, ANI_FRONT);
+	startSetailWait(0, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
 	_G(timer_nr)[0] = _G(room)->set_timer(1, 7);
 	showCur();
@@ -53,7 +53,7 @@ void Room53::entry() {
 void Room53::man_go() {
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
-	start_detail_wait(5, 1, ANI_FRONT);
+	startSetailWait(5, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
 	if (!_G(spieler).R53Visit)
 		_G(obj)->show_sib(SIB_VISIT_R53);
@@ -64,11 +64,11 @@ void Room53::talk_man() {
 	autoMove(2, P_CHEWY);
 	_G(room)->set_timer_status(1, TIMER_STOP);
 	_G(det)->del_static_ani(1);
-	start_detail_wait(2, 1, ANI_FRONT);
+	startSetailWait(2, 1, ANI_FRONT);
 	_G(det)->set_static_ani(3, -1);
-	start_aad_wait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
+	startAadWait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
 	_G(det)->del_static_ani(3);
-	start_detail_wait(4, 1, ANI_FRONT);
+	startSetailWait(4, 1, ANI_FRONT);
 	man_go();
 	showCur();
 }
@@ -82,10 +82,10 @@ int16 Room53::use_man() {
 		_G(spieler).R53Kostuem = true;
 		del_inventar(_G(spieler).AkInvent);
 		autoMove(2, P_CHEWY);
-		start_aad_wait(271, -1);
+		startAadWait(271, -1);
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
-		start_ani_block(7, ABLOCK35);
+		startAniBlock(7, ABLOCK35);
 		_G(obj)->addInventory(JMKOST_INV, &_G(room_blk));
 		inventory_2_cur(JMKOST_INV);
 		_G(atds)->set_steuer_bit(319, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 8e94446a0d3..4dc7607ecce 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -49,10 +49,10 @@ void Room54::entry(int16 eib_nr) {
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = 0;
-				set_person_pos(290, 61, P_HOWARD, P_RIGHT);
+				setPersonPos(290, 61, P_HOWARD, P_RIGHT);
 			}
 
-			set_person_pos(300, 80, P_CHEWY, P_LEFT);
+			setPersonPos(300, 80, P_CHEWY, P_LEFT);
 			_G(maus_links_click) = false;
 			_G(spieler).scrollx = 134;
 			_G(spieler).scrolly = 0;
@@ -63,15 +63,15 @@ void Room54::entry(int16 eib_nr) {
 		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = 0;
-				set_person_pos(212, 61, P_HOWARD, P_RIGHT);
+				setPersonPos(212, 61, P_HOWARD, P_RIGHT);
 			}
 
 			_G(spieler).scrollx = 66;
-			set_person_pos(241, 85, P_CHEWY, P_LEFT);
+			setPersonPos(241, 85, P_CHEWY, P_LEFT);
 		}
 
 		if (_G(spieler).R55ExitDia) {
-			start_aad_wait(_G(spieler).R55ExitDia, -1);
+			startAadWait(_G(spieler).R55ExitDia, -1);
 			showCur();
 			_G(spieler).R55ExitDia = false;
 		}
@@ -142,27 +142,27 @@ int16 Room54::use_schalter() {
 			g_engine->_sound->playSound(0, 1);
 			g_engine->_sound->stopSound(2);
 
-			start_detail_wait(1, 1, ANI_FRONT);
-			_G(det)->start_detail(3, 255, ANI_FRONT);
-			start_aad_wait(292 + _G(spieler).R54LiftCount, -1);
+			startSetailWait(1, 1, ANI_FRONT);
+			_G(det)->startDetail(3, 255, ANI_FRONT);
+			startAadWait(292 + _G(spieler).R54LiftCount, -1);
 			_G(det)->stop_detail(3);
 			++_G(spieler).R54LiftCount;
 
 			int16 aad_nr;
 			if (_G(spieler).R54LiftCount < 3) {
-				start_detail_wait(2, 1, ANI_FRONT);
+				startSetailWait(2, 1, ANI_FRONT);
 				_G(det)->hideStaticSpr(0);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->stopSound(1);
 				g_engine->_sound->playSound(1, 2);
-				start_detail_wait(1, 1, ANI_BACK);
+				startSetailWait(1, 1, ANI_BACK);
 				g_engine->_sound->stopSound(2);
 				aad_nr = 295;
 
 			} else {
-				start_detail_wait(5, 1, ANI_FRONT);
+				startSetailWait(5, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(9);
-				start_detail_wait(4, 1, ANI_FRONT);
+				startSetailWait(4, 1, ANI_FRONT);
 				aad_nr = 296;
 				_G(spieler).R54FputzerWeg = true;
 				_G(atds)->del_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATA);
@@ -170,11 +170,11 @@ int16 Room54::use_schalter() {
 				_G(atds)->set_ats_str(351, 1, ATS_DATA);
 			}
 
-			start_aad_wait(aad_nr, -1);
+			startAadWait(aad_nr, -1);
 			_G(spieler).R54HowardVorne = 0;
 
 		} else {
-			start_aad_wait(297, -1);
+			startAadWait(297, -1);
 		}
 
 		showCur();
@@ -197,18 +197,18 @@ void Room54::talk_verkauf() {
 		_G(spieler).R54HotDogOk = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
-		start_aad_wait(299, -1);
+		startAadWait(299, -1);
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(det)->del_static_ani(6);
-		start_detail_wait(7, 1, ANI_FRONT);
-		_G(det)->start_detail(8, 255, ANI_FRONT);
-		start_aad_wait(310, -1);
+		startSetailWait(7, 1, ANI_FRONT);
+		_G(det)->startDetail(8, 255, ANI_FRONT);
+		startAadWait(310, -1);
 
 		_G(det)->stop_detail(8);
-		start_detail_wait(9, 1, ANI_FRONT);
-		start_detail_wait(10, 1, ANI_FRONT);
-		_G(det)->start_detail(11, 255, ANI_FRONT);
-		start_aad_wait(311, -1);
+		startSetailWait(9, 1, ANI_FRONT);
+		startSetailWait(10, 1, ANI_FRONT);
+		_G(det)->startDetail(11, 255, ANI_FRONT);
+		startAadWait(311, -1);
 		_G(det)->stop_detail(11);
 		_G(room)->set_timer_status(6, TIMER_START);
 		_G(det)->set_static_ani(6, -1);
@@ -218,7 +218,7 @@ void Room54::talk_verkauf() {
 		_G(obj)->addInventory(BURGER_INV, &_G(room_blk));
 		inventory_2_cur(BURGER_INV);
 	} else {
-		start_aad_wait(313, -1);
+		startAadWait(313, -1);
 	}
 
 	showCur();
@@ -233,7 +233,7 @@ int16 Room54::use_zelle() {
 			action_ret = true;
 
 			if (!_G(spieler).R54Schild) {
-				start_aad_wait(318, -1);
+				startAadWait(318, -1);
 			} else {
 				autoMove(5, P_CHEWY);
 				_G(spieler).R54HowardVorne = 1;
@@ -247,11 +247,11 @@ int16 Room54::use_zelle() {
 				load_chewy_taf(CHEWY_JMANS);
 				_G(zoom_horizont) = 90;
 
-				set_person_pos(283, 93, P_CHEWY, P_LEFT);
-				set_person_pos(238, 99, P_HOWARD, P_RIGHT);
-				start_aad_wait(315, -1);
+				setPersonPos(283, 93, P_CHEWY, P_LEFT);
+				setPersonPos(238, 99, P_HOWARD, P_RIGHT);
+				startAadWait(315, -1);
 				goAutoXy(241, 74, P_CHEWY, ANI_WAIT);
-				start_aad_wait(316, -1);
+				startAadWait(316, -1);
 
 				_G(spieler_mi)[P_HOWARD].Mode = true;
 				switch_room(55);
@@ -261,7 +261,7 @@ int16 Room54::use_zelle() {
 		action_ret = true;
 		autoMove(6, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
-		start_aad_wait(319, -1);
+		startAadWait(319, -1);
 	}
 
 	showCur();
@@ -284,7 +284,7 @@ int16 Room54::use_azug() {
 			if (_G(spieler).R54FputzerWeg) {
 				autoMove(8, P_CHEWY);
 				_G(spieler).R54HowardVorne = 0;
-				start_aad_wait(298, -1);
+				startAadWait(298, -1);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				_G(det)->showStaticSpr(12);
 				_G(spieler).R55Location = true;
@@ -309,14 +309,14 @@ int16 Room54::use_azug() {
 						--delay;
 					}
 
-					set_up_screen(DO_SETUP);
+					setupScreen(DO_SETUP);
 					SHOULD_QUIT_RETURN0;
 				}
 
 				switch_room(55);
 			}
 		} else {
-			start_aad_wait(314, -1);
+			startAadWait(314, -1);
 		}
 
 		showCur();
@@ -326,8 +326,8 @@ int16 Room54::use_azug() {
 }
 
 void Room54::aufzug_ab() {
-	set_person_pos(91, 62, P_HOWARD, P_RIGHT);
-	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
+	setPersonPos(91, 62, P_HOWARD, P_RIGHT);
+	setPersonPos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).scrollx = 0;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(det)->showStaticSpr(12);
@@ -350,16 +350,16 @@ void Room54::aufzug_ab() {
 			--delay;
 		}
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
 
 	g_engine->_sound->stopSound(0);
 	_G(det)->hideStaticSpr(12);
-	set_person_pos(99, 82, P_CHEWY, P_RIGHT);
+	setPersonPos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(maus_links_click) = false;
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(spieler).R55Location = false;
 }
 
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index faf2c0bbe9f..e27e2421977 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -39,7 +39,7 @@ void Room55::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 22;
 
 	if (!_G(spieler).R54FputzerWeg)
-		_G(det)->start_detail(6, 255, ANI_FRONT);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
 
 	if (_G(spieler).R54FputzerWeg && !_G(spieler).R55Location)
 		_G(det)->hideStaticSpr(6);
@@ -48,8 +48,8 @@ void Room55::entry() {
 		_G(det)->hideStaticSpr(0);
 
 	if (!_G(spieler).R55SekWeg) {
-		_G(det)->start_detail(8, 255, ANI_FRONT);
-		_G(det)->start_detail(9, 255, ANI_FRONT);
+		_G(det)->startDetail(8, 255, ANI_FRONT);
+		_G(det)->startDetail(9, 255, ANI_FRONT);
 		_G(spieler).R55Entry ^= 1;
 		const int aniNr = 19 + (_G(spieler).R55Entry ? 1 : 0);
 		_G(timer_nr)[0] = _G(room)->set_timer(aniNr, 10);
@@ -64,7 +64,7 @@ void Room55::entry() {
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
-		set_person_pos(51, 75, P_CHEWY, P_RIGHT);
+		setPersonPos(51, 75, P_CHEWY, P_RIGHT);
 		_G(room)->set_zoom(10);
 	}
 
@@ -74,8 +74,8 @@ void Room55::entry() {
 	if (!_G(flags).LoadGame) {
 		if (_G(spieler).R55Location) {
 			_G(spieler).scrollx = 136;
-			set_person_pos(404, 66, P_CHEWY, P_RIGHT);
-			start_detail_wait(3, 1, ANI_FRONT);
+			setPersonPos(404, 66, P_CHEWY, P_RIGHT);
+			startSetailWait(3, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(zoom_horizont) = 1;
 			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATA);
@@ -83,7 +83,7 @@ void Room55::entry() {
 			_G(spieler).scrollx = 0;
 
 			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
-				set_person_pos(21, 77, P_HOWARD, P_RIGHT);
+				setPersonPos(21, 77, P_HOWARD, P_RIGHT);
 			}
 
 			_G(det)->showStaticSpr(8);
@@ -92,7 +92,7 @@ void Room55::entry() {
 			_G(det)->hideStaticSpr(8);
 
 			if (_G(spieler).R55SekWeg && !_G(spieler).R55Job) {
-				set_person_spr(P_LEFT, P_CHEWY);
+				setPersonSpr(P_LEFT, P_CHEWY);
 
 				if (_G(spieler).ChewyAni == CHEWY_ROCKER) {
 					verleger_mov(0);
@@ -144,7 +144,7 @@ int16 Room55::use_stapel1() {
 
 		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
-			start_aad_wait(333, -1);
+			startAadWait(333, -1);
 		}
 	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
@@ -156,7 +156,7 @@ int16 Room55::use_stapel1() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(atds)->set_ats_str(354, 2, ATS_DATA);
 		} else {
-			start_aad_wait(326, -1);
+			startAadWait(326, -1);
 		}
 	}
 	showCur();
@@ -170,7 +170,7 @@ int16 Room55::use_stapel2() {
 	if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
 		hideCur();
-		start_aad_wait(327, -1);
+		startAadWait(327, -1);
 		showCur();
 	}
 
@@ -188,40 +188,40 @@ int16 Room55::use_telefon() {
 				_G(spieler).R55RaumOk = true;
 				autoMove(6, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(10, 1, ANI_FRONT);
-				_G(det)->start_detail(11, 255, ANI_FRONT);
-				start_aad_wait(329, -1);
+				startSetailWait(10, 1, ANI_FRONT);
+				_G(det)->startDetail(11, 255, ANI_FRONT);
+				startAadWait(329, -1);
 				_G(det)->stop_detail(11);
-				start_detail_wait(10, 1, ANI_BACK);
+				startSetailWait(10, 1, ANI_BACK);
 
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				autoMove(7, P_CHEWY);
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
-				start_aad_wait(330, -1);
+				startAadWait(330, -1);
 				_G(det)->showStaticSpr(8);
-				start_detail_wait(0, 1, ANI_FRONT);
-				_G(det)->start_detail(1, 255, ANI_FRONT);
-				start_aad_wait(331, -1);
+				startSetailWait(0, 1, ANI_FRONT);
+				_G(det)->startDetail(1, 255, ANI_FRONT);
+				startAadWait(331, -1);
 				_G(det)->stop_detail(1);
 
 				_G(det)->showStaticSpr(16);
-				start_aad_wait(608, -1);
+				startAadWait(608, -1);
 				_G(det)->hideStaticSpr(16);
-				start_detail_wait(2, 1, ANI_FRONT);
+				startSetailWait(2, 1, ANI_FRONT);
 				_G(det)->hideStaticSpr(0);
 				_G(det)->hideStaticSpr(8);
 				_G(atds)->set_ats_str(354, 1, ATS_DATA);
 				flic_cut(FCUT_071);
 				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
 
-				set_person_pos(178, 75, P_CHEWY, P_LEFT);
-				set_person_pos(66, 73, P_HOWARD, P_RIGHT);
+				setPersonPos(178, 75, P_CHEWY, P_LEFT);
+				setPersonPos(66, 73, P_HOWARD, P_RIGHT);
 				_G(SetUpScreenFunc) = nullptr;
 				_G(det)->set_static_ani(18, -1);
-				start_aad_wait(334, -1);
-				start_aad_wait(335, -1);
-				start_aad_wait(336, -1);
+				startAadWait(334, -1);
+				startAadWait(335, -1);
+				startAadWait(336, -1);
 				const int16 tmp_delay = _G(spieler).DelaySpeed;
 
 				for (int16 i = 0; i < 7; i++) {
@@ -234,7 +234,7 @@ int16 Room55::use_telefon() {
 						--delay;
 					}
 
-					set_up_screen(DO_SETUP);
+					setupScreen(DO_SETUP);
 					SHOULD_QUIT_RETURN0;
 				}
 
@@ -258,12 +258,12 @@ int16 Room55::use_telefon() {
 				switch_room(54);
 			} else {
 				hideCur();
-				start_aad_wait(332, -1);
+				startAadWait(332, -1);
 				showCur();
 			}
 		} else {
 			hideCur();
-			start_aad_wait(328, -1);
+			startAadWait(328, -1);
 			showCur();
 		}
 	}
@@ -303,7 +303,7 @@ void Room55::get_job() {
 	if (r_nr == 54)
 		_G(flags).LoadGame = false;
 
-	set_person_pos(118, 96, P_CHEWY, P_LEFT);
+	setPersonPos(118, 96, P_CHEWY, P_LEFT);
 	switch_room(r_nr);
 	_G(flags).LoadGame = false;
 }
@@ -326,16 +326,16 @@ void Room55::rock2mans() {
 }
 
 void Room55::verleger_mov(int16 mode) {
-	start_detail_wait(7, 1, ANI_FRONT);
+	startSetailWait(7, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(11);
-	start_detail_wait(13, 1, ANI_FRONT);
-	start_detail_wait(14, 1, ANI_FRONT);
+	startSetailWait(13, 1, ANI_FRONT);
+	startSetailWait(14, 1, ANI_FRONT);
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS)
 		start_spz(CH_JM_TITS, 1, ANI_FRONT, P_CHEWY);
 	
 	if (mode)
-		start_detail_wait(15, 1, ANI_FRONT);
+		startSetailWait(15, 1, ANI_FRONT);
 
 	_G(det)->set_static_ani(16, -1);
 }
@@ -347,7 +347,7 @@ void Room55::strasse(int16 mode) {
 		_G(det)->del_static_ani(4);
 		_G(det)->stop_detail(4);
 		_G(atds)->set_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATA);
-		start_detail_wait(3, 1, ANI_BACK);
+		startSetailWait(3, 1, ANI_BACK);
 
 		_G(spieler).scrollx = 0;
 		switch_room(54);
@@ -361,11 +361,11 @@ int16 Room55::use_kammeraus() {
 		action_ret = true;
 
 		if (!_G(spieler).R52KakerWeg)
-			start_aad_wait(325, -1);
+			startAadWait(325, -1);
 		else if (!_G(spieler).R55SekWeg) {
 			hideCur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
-			start_detail_wait(5, 1, ANI_FRONT);
+			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(10);
 			flic_cut(FCUT_070);
 			register_cutscene(18);
@@ -437,7 +437,7 @@ void Room55::talk_line() {
 		_G(room)->set_timer_status(aniNr, TIMER_STOP);
 		_G(det)->stop_detail(aniNr);
 		_G(det)->del_static_ani(aniNr);
-		start_detail_wait(22, 1, ANI_FRONT);
+		startSetailWait(22, 1, ANI_FRONT);
 		_G(det)->set_static_ani(21, -1);
 	} else if (!_G(spieler).R55RaumOk) {
 		autoMove(3, P_CHEWY);
@@ -445,14 +445,14 @@ void Room55::talk_line() {
 		_G(spieler).R55ExitDia = 324;
 	}
 
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 
 	if (_G(spieler).R55SekWeg) {
 		_G(det)->del_static_ani(16);
-		start_detail_wait(14, 1, ANI_FRONT);
+		startSetailWait(14, 1, ANI_FRONT);
 	} else {
 		_G(det)->del_static_ani(21);
-		start_detail_wait(22, 1, ANI_FRONT);
+		startSetailWait(22, 1, ANI_FRONT);
 	}
 
 	_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 3f9beb7d48b..0e2cb14324a 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -40,7 +40,7 @@ void Room56::entry() {
 		_G(det)->showStaticSpr(10);
 		_G(room)->set_timer_status(0, TIMER_STOP);
 		_G(det)->del_static_ani(0);
-		_G(det)->start_detail(13, 255, ANI_FRONT);
+		_G(det)->startDetail(13, 255, ANI_FRONT);
 	} else
 		_G(timer_nr)[0] = _G(room)->set_timer(255, 25);
 
@@ -54,16 +54,16 @@ void Room56::entry() {
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			_G(det)->hideStaticSpr(2);
 			_G(zoom_horizont) = 0;
-			set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
-			set_person_pos(3, 42, P_CHEWY, P_RIGHT);
+			setPersonPos(-6, 16, P_HOWARD, P_RIGHT);
+			setPersonPos(3, 42, P_CHEWY, P_RIGHT);
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(7, 1);
-			start_detail_wait(7, 1, ANI_BACK);
-			start_detail_wait(8, 1, ANI_FRONT);
+			startSetailWait(7, 1, ANI_BACK);
+			startSetailWait(8, 1, ANI_FRONT);
 			g_engine->_sound->stopSound(1);
 			g_engine->_sound->playSound(7, 0);
-			start_detail_wait(7, 1, ANI_FRONT);
-			set_up_screen(DO_SETUP);
+			startSetailWait(7, 1, ANI_FRONT);
+			setupScreen(DO_SETUP);
 
 			if (!_G(spieler).R56GetTabak) {
 				flic_cut(FCUT_074);
@@ -88,8 +88,8 @@ void Room56::entry() {
 			_G(zoom_horizont) = 114;
 			_G(room)->set_zoom(70);
 			_G(spieler).R62Flucht = false;
-			set_person_pos(308, 97, P_HOWARD, P_RIGHT);
-			set_person_pos(429, 146, P_CHEWY, P_LEFT);
+			setPersonPos(308, 97, P_HOWARD, P_RIGHT);
+			setPersonPos(429, 146, P_CHEWY, P_LEFT);
 			_G(spieler).scrollx = 262;
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(det)->showStaticSpr(9);
@@ -100,7 +100,7 @@ void Room56::entry() {
 			_G(maus_links_click) = false;
 			_G(atds)->stop_aad();
 			hideCur();
-			start_aad_wait(306, -1);
+			startAadWait(306, -1);
 			showCur();
 			flic_cut(FCUT_076);
 			mode = 1;
@@ -134,8 +134,8 @@ void Room56::entry() {
 					hideCur();
 					_G(spieler).scrollx = _G(spieler).scrolly = 0;
 					_G(zoom_horizont) = 0;
-					set_person_pos(-6, 16, P_HOWARD, P_RIGHT);
-					set_person_pos(3, 42, P_CHEWY, P_RIGHT);
+					setPersonPos(-6, 16, P_HOWARD, P_RIGHT);
+					setPersonPos(3, 42, P_CHEWY, P_RIGHT);
 					_G(room)->set_zoom(23);
 					_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 					_G(spieler).ZoomXy[P_HOWARD][1] = 37;
@@ -214,8 +214,8 @@ int16 Room56::use_taxi() {
 		autoMove(1, P_CHEWY);
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->playSound(7, 1);
-		start_detail_wait(7, 1, ANI_BACK);
-		_G(det)->start_detail(8, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_BACK);
+		_G(det)->startDetail(8, 1, ANI_FRONT);
 		_G(zoom_horizont) = 0;
 		_G(room)->set_zoom(23);
 		_G(spieler).ZoomXy[P_HOWARD][0] = 17;
@@ -242,7 +242,7 @@ void Room56::talk_man() {
 		start_ads_wait(16);
 	} else if (!_G(spieler).R62Flucht) {
 		hideCur();
-		start_aad_wait(343, -1);
+		startAadWait(343, -1);
 		showCur();
 	}
 }
@@ -260,20 +260,20 @@ int16 Room56::use_man() {
 	_G(det)->del_static_ani(0);
 
 	if (!_G(spieler).R56WhiskyMix) {
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(5, -1);
-		start_aad_wait(304, -1);
+		startAadWait(304, -1);
 		_G(det)->del_static_ani(5);
 		_G(room)->set_timer_status(0, TIMER_START);
 		_G(det)->set_static_ani(0, -1);
 	} else {
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).R56AbfahrtOk = true;
-		start_detail_wait(6, 1, ANI_FRONT);
+		startSetailWait(6, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(1, -1);
-		start_aad_wait(305, -1);
+		startAadWait(305, -1);
 		_G(det)->del_static_ani(1);
 	}
 	_G(room)->set_timer_status(0, TIMER_START);
@@ -290,7 +290,7 @@ int16 Room56::use_kneipe() {
 			action_ret = true;
 			hideCur();
 			if (_G(spieler).R56Kneipe) {
-				start_aad_wait(344, -1);
+				startAadWait(344, -1);
 			} else {
 				_G(SetUpScreenFunc) = nullptr;
 				autoMove(4, P_CHEWY);
@@ -300,29 +300,29 @@ int16 Room56::use_kneipe() {
 				_G(spieler).R56Kneipe = true;
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
-				start_detail_wait(12, 3, ANI_FRONT);
+				startSetailWait(12, 3, ANI_FRONT);
 				flic_cut(FCUT_075);
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
-				_G(det)->start_detail(10, 6, ANI_FRONT);
-				start_aad_wait(307, -1);
+				_G(det)->startDetail(10, 6, ANI_FRONT);
+				startAadWait(307, -1);
 				_G(det)->stop_detail(10);
 				g_engine->_sound->playSound(10, 0);
 				_G(out)->ausblenden(0);
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				_G(spieler).PersonHide[P_HOWARD] = false;
 				_G(spieler).scrollx = 0;
-				set_person_pos(23, 70, P_HOWARD, P_RIGHT);
-				set_person_pos(50, 81, P_CHEWY, P_LEFT);
+				setPersonPos(23, 70, P_HOWARD, P_RIGHT);
+				setPersonPos(50, 81, P_CHEWY, P_LEFT);
 				_G(fx_blend) = BLEND3;
-				start_aad_wait(308, -1);
+				startAadWait(308, -1);
 
 				_G(SetUpScreenFunc) = setup_func;
 				_G(flags).NoScroll = false;
 				if (_G(obj)->checkInventory(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
-					start_aad_wait(309, -1);
+					startAadWait(309, -1);
 				}
 			}
 			showCur();
@@ -334,16 +334,16 @@ int16 Room56::use_kneipe() {
 			autoMove(4, P_CHEWY);
 			flic_cut(FCUT_111);
 			_G(fx_blend) = BLEND3;
-			start_aad_wait(522, -1);
+			startAadWait(522, -1);
 			start_spz_wait(66, 1, false, P_CHEWY);
 			start_spz(67, 255, false, P_CHEWY);
-			start_aad_wait(524, -1);
+			startAadWait(524, -1);
 			_G(spieler).SVal1 = 56;
 			_G(spieler).SVal2 = 523;
 			cur_2_inventory();
 			switch_room(92);
 		} else {
-			start_aad_wait(518, -1);
+			startAadWait(518, -1);
 		}
 		showCur();
 	} else if (_G(menu_item) == 0 || _G(menu_item) == 2 || (_G(menu_item) == 1 && !_G(spieler).inv_cur)){
@@ -351,14 +351,14 @@ int16 Room56::use_kneipe() {
 		action_ret = 1;
 		_G(maus_links_click) = false;
 		autoMove(4, P_CHEWY);
-		start_aad_wait(521, -1);
+		startAadWait(521, -1);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_112);
 		register_cutscene(31);
 
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(fx_blend) = BLEND3;
 		showCur();
 		g_engine->_sound->playSound(9, 0);
@@ -379,7 +379,7 @@ int16 Room56::proc1(int16 key) {
 void Room56::start_flug() {
 	if (!_G(spieler).flags32_10 && !_G(r56koch_flug)) {
 		_G(r56koch_flug) = 12;
-		_G(det)->start_detail(_G(r56koch_flug), 1, ANI_FRONT);
+		_G(det)->startDetail(_G(r56koch_flug), 1, ANI_FRONT);
 	}
 }
 
@@ -400,14 +400,14 @@ void Room56::setup_func() {
 
 		case 11:
 			if (_G(det)->get_ani_status(11) == false) {
-				_G(det)->start_detail(10, 1, ANI_FRONT);
+				_G(det)->startDetail(10, 1, ANI_FRONT);
 				_G(r56koch_flug) = 10;
 			}
 			break;
 
 		case 12:
 			if (_G(det)->get_ani_status(12) == false) {
-				_G(det)->start_detail(11, 1, ANI_FRONT);
+				_G(det)->startDetail(11, 1, ANI_FRONT);
 				_G(r56koch_flug) = 11;
 			}
 			break;
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 6956a1352f3..254a14b395b 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -45,8 +45,8 @@ void Room57::entry() {
 		_G(spieler).R48TaxiEntry = false;
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
-		set_person_pos(4, 144, P_HOWARD, P_LEFT);
-		set_person_pos(40, 160, P_CHEWY, P_RIGHT);
+		setPersonPos(4, 144, P_HOWARD, P_LEFT);
+		setPersonPos(40, 160, P_CHEWY, P_RIGHT);
 		autoMove(2, P_CHEWY);
 		_G(maus_links_click) = false;
 		showCur();
@@ -101,7 +101,7 @@ int16 Room57::use_taxi() {
 		g_engine->_sound->playSound(3);
 		_G(room)->set_timer_status(3, TIMER_STOP);
 		_G(det)->del_static_ani(3);
-		start_detail_wait(5, 1, ANI_FRONT);
+		startSetailWait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
 		switch_room(48);
 	}
@@ -118,31 +118,31 @@ int16 Room57::use_pfoertner() {
 	if (is_cur_inventar(CUTMAG_INV)) {
 		action_ret = true;
 		if (_G(spieler).flags37_10)
-			start_aad_wait(596, -1);
+			startAadWait(596, -1);
 		else {
 			_G(spieler).flags37_10 = true;
-			start_aad_wait(339, -1);
+			startAadWait(339, -1);
 			new_invent_2_cur(BESTELL_INV);
 		}
 	} else if (is_cur_inventar(JMKOST_INV)) {
 		action_ret = true;
-		start_aad_wait(340, -1);
+		startAadWait(340, -1);
 	} else if (is_cur_inventar(EINLAD_INV)) {
 		action_ret = true;
 		_G(SetUpScreenFunc) = nullptr;
 		goAutoXy(132, 130, P_HOWARD, ANI_WAIT);
 		if (_G(spieler).R56AbfahrtOk) {
-			start_aad_wait(341, -1);
+			startAadWait(341, -1);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
 			_G(det)->hideStaticSpr(4);
-			start_detail_wait(6, 1, ANI_WAIT);
+			startSetailWait(6, 1, ANI_WAIT);
 			g_engine->_sound->stopSound(0);
 			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATA);
 		} else {
-			start_aad_wait(349, -1);
+			startAadWait(349, -1);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 		}
 		_G(SetUpScreenFunc) = setup_func;
@@ -164,7 +164,7 @@ void Room57::talk_pfoertner() {
 		aad_nr = 338;
 	} else
 		aad_nr = 342;
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 	_G(room)->set_timer_status(1, TIMER_START);
 	_G(det)->set_static_ani(1, -1);
 	showCur();
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index a61bf337551..5908b78ce8f 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -38,37 +38,37 @@ void Room62::entry() {
 		_G(cur_hide_flag) = false;
 		hideCur();
 		_G(spieler).R62FirstEntry = true;
-		set_person_pos(49, 113, P_HOWARD, P_RIGHT);
-		_G(det)->start_detail(6, 255, ANI_FRONT);
-		start_aad_wait(345, -1);
+		setPersonPos(49, 113, P_HOWARD, P_RIGHT);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
+		startAadWait(345, -1);
 		_G(det)->stop_detail(6);
 		_G(det)->set_static_ani(5, -1);
 		goAutoXy(199, 59, P_HOWARD, ANI_WAIT);
-		set_person_spr(0, P_HOWARD);
+		setPersonSpr(0, P_HOWARD);
 		_G(det)->del_static_ani(5);
-		_G(det)->start_detail(5, 255, ANI_FRONT);
-		start_aad_wait(346, -1);
+		_G(det)->startDetail(5, 255, ANI_FRONT);
+		startAadWait(346, -1);
 		_G(det)->stop_detail(5);
-		_G(det)->start_detail(6, 255, ANI_FRONT);
-		start_aad_wait(347, -1);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
+		startAadWait(347, -1);
 		_G(det)->stop_detail(6);
-		start_detail_wait(7, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_FRONT);
 		_G(det)->set_static_ani(5, -1);
-		_G(det)->start_detail(0, 255, ANI_FRONT);
-		start_aad_wait(348, -1);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
+		startAadWait(348, -1);
 		_G(det)->stop_detail(0);
 		_G(det)->del_static_ani(0);
-		_G(det)->start_detail(1, 1, ANI_FRONT);
+		_G(det)->startDetail(1, 1, ANI_FRONT);
 		autoMove(0, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
 		goAutoXy(160, 240, P_CHEWY, ANI_WAIT);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(det)->del_static_ani(5);
-		start_detail_wait(7, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_FRONT);
 		showCur();
 		_G(spieler).R64Moni1Ani = 3;
 		_G(spieler).R64Moni2Ani = 4;
-		set_person_pos(187, 43, P_CHEWY, P_RIGHT);
+		setPersonPos(187, 43, P_CHEWY, P_RIGHT);
 		_G(spieler).R62TShow = true;
 		switch_room(64);
 	} else {
@@ -90,7 +90,7 @@ void Room62::setup_func() {
 			_G(r62TalkAni) = 8;
 		else
 			_G(r62TalkAni) = 4;
-		_G(det)->start_detail(_G(r62TalkAni), 255, ANI_FRONT);
+		_G(det)->startDetail(_G(r62TalkAni), 255, ANI_FRONT);
 	} else
 		--_G(r62Delay);
 }
@@ -106,9 +106,9 @@ int16 Room62::use_laura() {
 		_G(det)->del_static_ani(8);
 		_G(det)->stop_detail(8);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->start_detail(2, 255, ANI_FRONT);
-		_G(det)->start_detail(6, 255, ANI_FRONT);
-		start_aad_wait(399, -1);
+		_G(det)->startDetail(2, 255, ANI_FRONT);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
+		startAadWait(399, -1);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077);
 		showCur();
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index b5dd906c603..93d0cd6d9ce 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -38,16 +38,16 @@ void Room63::entry() {
 	if (!_G(spieler).R63Uhr) {
 		_G(cur_hide_flag) = false;
 		hideCur();
-		_G(det)->start_detail(12, 255, ANI_FRONT);
-		_G(det)->start_detail(10, 255, ANI_FRONT);
-		_G(det)->start_detail(18, 255, ANI_FRONT);
+		_G(det)->startDetail(12, 255, ANI_FRONT);
+		_G(det)->startDetail(10, 255, ANI_FRONT);
+		_G(det)->startDetail(18, 255, ANI_FRONT);
 		autoMove(4, P_CHEWY);
 		_G(det)->stop_detail(10);
-		_G(det)->start_detail(11, 255, ANI_FRONT);
+		_G(det)->startDetail(11, 255, ANI_FRONT);
 		auto_scroll(58, 0);
-		start_aad_wait(355, -1);
+		startAadWait(355, -1);
 		_G(det)->stop_detail(11);
-		_G(det)->start_detail(10, 255, ANI_FRONT);
+		_G(det)->startDetail(10, 255, ANI_FRONT);
 		showCur();
 	} else if (!_G(spieler).R63Feuer) {
 		_G(det)->showStaticSpr(10);
@@ -57,11 +57,11 @@ void Room63::entry() {
 		_G(SetUpScreenFunc) = setup_func;
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
-		set_person_pos(424, 78, P_CHEWY, P_LEFT);
+		setPersonPos(424, 78, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(spieler).room_e_obj[95].Attribut = 255;
 		_G(r63ChewyAni) = 0;
-		_G(det)->start_detail(0, 1, ANI_FRONT);
+		_G(det)->startDetail(0, 1, ANI_FRONT);
 	}
 }
 
@@ -79,7 +79,7 @@ void Room63::setup_func() {
 			if (_G(r63RunDia) < 4)
 				++_G(r63RunDia);
 			start_aad(370 + _G(r63RunDia));
-			_G(det)->start_detail(1, 1, ANI_FRONT);
+			_G(det)->startDetail(1, 1, ANI_FRONT);
 			_G(r63ChewyAni) = 1;
 		}
 		break;
@@ -87,9 +87,9 @@ void Room63::setup_func() {
 	case 1:
 		if (_G(det)->get_ani_status(1) == false) {
 			_G(spieler).ScrollxStep = 4;
-			set_person_pos(0, 0, P_CHEWY, P_RIGHT);
-			_G(det)->start_detail(22, 1, ANI_FRONT);
-			_G(det)->start_detail(2, 1, ANI_FRONT);
+			setPersonPos(0, 0, P_CHEWY, P_RIGHT);
+			_G(det)->startDetail(22, 1, ANI_FRONT);
+			_G(det)->startDetail(2, 1, ANI_FRONT);
 			_G(atds)->stop_aad();
 			_G(r63ChewyAni) = 2;
 		}
@@ -97,7 +97,7 @@ void Room63::setup_func() {
 
 	case 2:
 		if (_G(det)->get_ani_status(2) == false) {
-			_G(det)->start_detail(3, 1, ANI_FRONT);
+			_G(det)->startDetail(3, 1, ANI_FRONT);
 			_G(r63ChewyAni) = 3;
 		}
 		break;
@@ -111,11 +111,11 @@ void Room63::setup_func() {
 				_G(spieler).ScrollxStep = 16;
 				_G(spieler).scrollx -= _G(spieler).scrollx % 16;
 				auto_scroll(176, 0);
-				set_person_pos(424, 78, P_CHEWY, P_LEFT);
+				setPersonPos(424, 78, P_CHEWY, P_LEFT);
 				_G(flags).NoScroll = false;
 				_G(spieler).ScrollxStep = 4;
 				if (!_G(r63Schalter)) {
-					_G(det)->start_detail(0, 1, ANI_FRONT);
+					_G(det)->startDetail(0, 1, ANI_FRONT);
 					_G(r63ChewyAni) = 0;
 				} else
 					bork_platt();
@@ -140,10 +140,10 @@ void Room63::bork_platt() {
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	autoMove(6, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	start_aad_wait(370, -1);
-	start_detail_wait(4, 1, ANI_FRONT);
+	startAadWait(370, -1);
+	startSetailWait(4, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(13);
-	start_aad_wait(361, -1);
+	startAadWait(361, -1);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_079);
@@ -160,8 +160,8 @@ void Room63::talk_hunter() {
 	autoMove(3, P_CHEWY);
 	if (_G(spieler).R63Uhr)
 		_G(det)->hideStaticSpr(10);
-	_G(det)->start_detail(10, 255, ANI_FRONT);
-	start_aad_wait(356, -1);
+	_G(det)->startDetail(10, 255, ANI_FRONT);
+	startAadWait(356, -1);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->showStaticSpr(10);
 		_G(det)->stop_detail(10);
@@ -175,13 +175,13 @@ void Room63::talk_regie() {
 	if (_G(spieler).R63Uhr)
 		_G(det)->hideStaticSpr(12);
 	_G(det)->stop_detail(18);
-	_G(det)->start_detail(19, 255, ANI_FRONT);
-	start_aad_wait(357, -1);
+	_G(det)->startDetail(19, 255, ANI_FRONT);
+	startAadWait(357, -1);
 	_G(det)->stop_detail(19);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->showStaticSpr(12);
 	} else {
-		_G(det)->start_detail(18, 255, ANI_FRONT);
+		_G(det)->startDetail(18, 255, ANI_FRONT);
 	}
 	showCur();
 }
@@ -189,7 +189,7 @@ void Room63::talk_regie() {
 void Room63::talk_fx_man() {
 	hideCur();
 	autoMove(1, P_CHEWY);
-	start_aad_wait(358, -1);
+	startAadWait(358, -1);
 	showCur();
 }
 
@@ -201,13 +201,13 @@ int16 Room63::use_fx_man() {
 		autoMove(1, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		remove_inventory(34);
-		start_aad_wait(359, -1);
+		startAadWait(359, -1);
 		_G(det)->del_static_ani(5);
-		start_detail_wait(6, 1, ANI_FRONT);
-		_G(det)->start_detail(7, 255, ANI_FRONT);
-		start_aad_wait(362, -1);
+		startSetailWait(6, 1, ANI_FRONT);
+		_G(det)->startDetail(7, 255, ANI_FRONT);
+		startAadWait(362, -1);
 		_G(det)->stop_detail(7);
-		start_detail_wait(8, 1, ANI_FRONT);
+		startSetailWait(8, 1, ANI_FRONT);
 		_G(spieler).R63FxMannWeg = true;
 		_G(atds)->set_steuer_bit(384, ATS_AKTIV_BIT, ATS_DATA);
 		showCur();
@@ -229,21 +229,21 @@ int16 Room63::use_schalter() {
 				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_ROCK_GET2, 1, false, P_CHEWY);
 				_G(det)->showStaticSpr(2);
-				set_person_spr(P_LEFT, P_CHEWY);
-				start_detail_wait(21, 1, ANI_FRONT);
+				setPersonSpr(P_LEFT, P_CHEWY);
+				startSetailWait(21, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(14);
-				wait_show_screen(18);
+				waitShowScreen(18);
 				_G(det)->hideStaticSpr(14);
-				start_detail_wait(24, 1, ANI_FRONT);
+				startSetailWait(24, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(1);
 				_G(det)->hideStaticSpr(2);
-				start_aad_wait(364, -1);
+				startAadWait(364, -1);
 				_G(atds)->set_ats_str(385, 1, ATS_DATA);
 				showCur();
 			}
 		} else {
 			hideCur();
-			start_aad_wait(363, -1);
+			startAadWait(363, -1);
 			showCur();
 		}
 	}
@@ -253,11 +253,11 @@ int16 Room63::use_schalter() {
 void Room63::talk_girl() {
 	autoMove(2, P_CHEWY);
 	_G(det)->stop_detail(12);
-	start_detail_wait(13, 1, ANI_FRONT);
+	startSetailWait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
 	start_ads_wait(17);
 	_G(det)->del_static_ani(14);
-	_G(det)->start_detail(12, 255, ANI_FRONT);
+	_G(det)->startDetail(12, 255, ANI_FRONT);
 }
 
 int16 Room63::use_girl() {
@@ -268,14 +268,14 @@ int16 Room63::use_girl() {
 		autoMove(2, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->stop_detail(12);
-		start_detail_wait(13, 1, ANI_FRONT);
+		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
-		start_aad_wait(365, -1);
+		startAadWait(365, -1);
 		_G(det)->del_static_ani(14);
-		_G(det)->start_detail(15, 255, ANI_FRONT);
-		start_aad_wait(360, -1);
+		_G(det)->startDetail(15, 255, ANI_FRONT);
+		startAadWait(360, -1);
 		_G(det)->stop_detail(15);
-		start_detail_wait(16, 1, ANI_FRONT);
+		startSetailWait(16, 1, ANI_FRONT);
 		_G(spieler).R63Uhr = true;
 		_G(det)->stop_detail(10);
 		_G(det)->stop_detail(18);
@@ -284,7 +284,7 @@ int16 Room63::use_girl() {
 		_G(atds)->set_ats_str(381, 1, ATS_DATA);
 		_G(atds)->set_ats_str(382, 1, ATS_DATA);
 		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATA);
-		start_aad_wait(367, -1);
+		startAadWait(367, -1);
 		showCur();
 	}
 	return action_ret;
@@ -304,12 +304,12 @@ int16 Room63::use_aschenbecher() {
 				auto_scroll(70, 0);
 				autoMove(1, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				_G(det)->start_detail(20, 255, ANI_FRONT);
-				_G(det)->start_detail(10, 255, ANI_FRONT);
-				_G(det)->start_detail(18, 255, ANI_FRONT);
+				_G(det)->startDetail(20, 255, ANI_FRONT);
+				_G(det)->startDetail(10, 255, ANI_FRONT);
+				_G(det)->startDetail(18, 255, ANI_FRONT);
 				_G(det)->hideStaticSpr(10);
 				_G(det)->hideStaticSpr(12);
-				start_aad_wait(368, -1);
+				startAadWait(368, -1);
 				flic_cut(FCUT_080);
 				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATA);
 				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATA);
@@ -317,13 +317,13 @@ int16 Room63::use_aschenbecher() {
 				_G(spieler).R63Feuer = true;
 				_G(spieler).PersonHide[P_CHEWY] = false;
 				_G(spieler).scrollx = 0;
-				set_person_pos(187, 42, P_CHEWY, P_RIGHT);
+				setPersonPos(187, 42, P_CHEWY, P_RIGHT);
 				switch_room(64);
 				_G(flags).NoScroll = false;
 			} else
-				start_aad_wait(369, -1);
+				startAadWait(369, -1);
 		} else
-			start_aad_wait(366, -1);
+			startAadWait(366, -1);
 		
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 3400019d662..7295e93320a 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -34,7 +34,7 @@ void Room64::entry() {
 	_G(r64TalkAni) = _G(spieler).R64Moni1Ani;
 
 	if (_G(spieler).flags38_1)
-		_G(det)->start_detail(0, 255, false);
+		_G(det)->startDetail(0, 255, false);
 	
 	if (!_G(spieler).R64ManWeg) {
 		_G(timer_nr)[0] = _G(room)->set_timer(1, 10);
@@ -49,7 +49,7 @@ void Room64::entry() {
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
 			hideCur();
-			start_aad_wait(354, -1);
+			startAadWait(354, -1);
 			showCur();
 		}
 	} else
@@ -91,7 +91,7 @@ void Room64::calc_monitor() {
 
 	case 5:
 		str_nr = 1;
-		_G(det)->start_detail(5, 255, ANI_FRONT);
+		_G(det)->startDetail(5, 255, ANI_FRONT);
 		break;
 
 	default:
@@ -127,7 +127,7 @@ void Room64::setup_func() {
 			_G(r64TalkAni) = _G(spieler).R64Moni2Ani;
 
 		if (_G(r64TalkAni) != 0)
-			_G(det)->start_detail(_G(r64TalkAni), 255, ANI_FRONT);
+			_G(det)->startDetail(_G(r64TalkAni), 255, ANI_FRONT);
 	} else
 		--_G(r62Delay);
 }
@@ -144,7 +144,7 @@ void Room64::talk_man(int16 aad_nr) {
 		_G(det)->del_static_ani(1);
 		_G(det)->stop_detail(1);
 		_G(det)->set_static_ani(2, -1);
-		start_aad_wait(aad_nr, -1);
+		startAadWait(aad_nr, -1);
 		_G(det)->del_static_ani(2);
 		_G(room)->set_timer_status(1, TIMER_START);
 		_G(det)->set_static_ani(1, -1);
@@ -162,7 +162,7 @@ int16 Room64::use_tasche() {
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				new_invent_2_cur(GERAET_INV);
 				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATA);
-				start_aad_wait(353, -1);
+				startAadWait(353, -1);
 			} else {
 				showCur();
 				return 0;
@@ -172,8 +172,8 @@ int16 Room64::use_tasche() {
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_G(det)->del_static_ani(1);
 			_G(det)->stop_detail(1);
-			_G(det)->start_detail(6, 255, false);
-			start_aad_wait(352, -1);
+			_G(det)->startDetail(6, 255, false);
+			startAadWait(352, -1);
 			_G(det)->stop_detail(6);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(1, -1);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 72c08c49d70..dcbbfe642ff 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -48,7 +48,7 @@ void Room65::entry() {
 	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
 		_G(cur_hide_flag) = false;
 		hideCur();
-		start_aad_wait(_G(spieler).PersonDia[P_HOWARD], -1);
+		startAadWait(_G(spieler).PersonDia[P_HOWARD], -1);
 		showCur();
 	} else {
 		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
@@ -62,8 +62,8 @@ void Room65::xit() {
 	_G(spieler).scrollx = _G(r65tmp_scrollx);
 	_G(spieler).scrolly = _G(r65tmp_scrolly);
 	set_person_rnr();
-	set_person_pos(_G(r65tmp_ch_x), _G(r65tmp_ch_y), P_CHEWY, -1);
-	set_person_pos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
+	setPersonPos(_G(r65tmp_ch_x), _G(r65tmp_ch_y), P_CHEWY, -1);
+	setPersonPos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
 	_G(room_blk).AadLoad = true;
 	_G(room_blk).AtsLoad = true;
 	_G(maus_links_click) = false;
@@ -138,7 +138,7 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
 			break;
 		}
 	} else if (mode == AAD_STR_START) {
-		_G(det)->start_detail(person_nr, 255, ANI_FRONT);
+		_G(det)->startDetail(person_nr, 255, ANI_FRONT);
 	} else {
 		_G(det)->stop_detail(person_nr);
 	}
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index cdc6d1745ce..4b829f4865b 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -45,38 +45,38 @@ void Room66::entry(int16 eib_nr) {
 		hideCur();
 		_G(spieler).flags26_4 = true;
 		_G(spieler).scrollx = 476;
-		set_person_pos(598, 101, P_CHEWY, P_RIGHT);
-		set_person_pos(644, 82, P_NICHELLE, P_LEFT);
-		set_person_pos(623, 81, P_HOWARD, P_LEFT);
-		start_aad_wait(413, -1);
+		setPersonPos(598, 101, P_CHEWY, P_RIGHT);
+		setPersonPos(644, 82, P_NICHELLE, P_LEFT);
+		setPersonPos(623, 81, P_HOWARD, P_LEFT);
+		startAadWait(413, -1);
 		autoMove(9, P_CHEWY);
 		_G(SetUpScreenFunc) = setup_func;
-		start_aad_wait(403, -1);
+		startAadWait(403, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(0, 1, ANI_FRONT);
+		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(14);
-		wait_show_screen(15);
+		waitShowScreen(15);
 		_G(det)->hideStaticSpr(14);
-		start_detail_wait(1, 1, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		start_aad_wait(404, -1);
-		start_aad_wait(415, -1);
+		startAadWait(404, -1);
+		startAadWait(415, -1);
 		showCur();
 	} else if (!_G(flags).LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
 		switch (eib_nr) {
 		case 96:
-			set_person_pos(488, 114, P_HOWARD, P_RIGHT);
-			set_person_pos(520, 114, P_NICHELLE, P_RIGHT);
+			setPersonPos(488, 114, P_HOWARD, P_RIGHT);
+			setPersonPos(520, 114, P_NICHELLE, P_RIGHT);
 			break;
 		case 97:
-			set_person_pos(22, 114, P_HOWARD, P_RIGHT);
-			set_person_pos(50, 114, P_NICHELLE, P_RIGHT);
+			setPersonPos(22, 114, P_HOWARD, P_RIGHT);
+			setPersonPos(50, 114, P_NICHELLE, P_RIGHT);
 			break;
 		case 101:
-			set_person_pos(150, 114, P_HOWARD, P_RIGHT);
-			set_person_pos(182, 114, P_NICHELLE, P_RIGHT);
+			setPersonPos(150, 114, P_HOWARD, P_RIGHT);
+			setPersonPos(182, 114, P_NICHELLE, P_RIGHT);
 			break;
 		default:
 			break;
@@ -143,14 +143,14 @@ void Room66::setup_func() {
 		return;
 
 	_G(spieler).flags26_8 = true;
-	_G(det)->start_detail(9, 5, false);
-	start_aad_wait(405, -1);
+	_G(det)->startDetail(9, 5, false);
+	startAadWait(405, -1);
 }
 
 void Room66::talk1() {
 	hideCur();
 	autoMove(5, P_CHEWY);
-	start_aad_wait(407, -1);
+	startAadWait(407, -1);
 	showCur();
 }
 
@@ -195,7 +195,7 @@ int Room66::proc7() {
 	_G(cur_hide_flag) = 0;
 	hideCur();
 	if (_G(spieler).flags26_20)
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 	showCur();
 
 	return 1;
@@ -210,7 +210,7 @@ void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, in
 	_G(room)->set_timer_status(restartAniNr, TIMER_STOP);
 	_G(det)->del_static_ani(restartAniNr);
 	_G(det)->set_static_ani(transitionAniNr, -1);
-	start_aad_wait(transitionDiaNr, -1);
+	startAadWait(transitionDiaNr, -1);
 	_G(det)->del_static_ani(transitionAniNr);
 	_G(det)->set_static_ani(restartAniNr, -1);
 	_G(room)->set_timer_status(restartAniNr, TIMER_START);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index e1dc5f43ad1..0a8dd7091f2 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -43,10 +43,10 @@ void Room67::entry() {
 		_G(det)->showStaticSpr(0);
 	if (!_G(flags).LoadGame) {
 		hideCur();
-		set_person_pos(102, 132, P_CHEWY, P_RIGHT);
+		setPersonPos(102, 132, P_CHEWY, P_RIGHT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
-			set_person_pos(12, 100, P_HOWARD, P_RIGHT);
-			set_person_pos(47, 106, P_NICHELLE, P_RIGHT);
+			setPersonPos(12, 100, P_HOWARD, P_RIGHT);
+			setPersonPos(47, 106, P_NICHELLE, P_RIGHT);
 			goAutoXy(214, 112, P_NICHELLE, ANI_GO);
 		}
 		autoMove(7, P_CHEWY);
@@ -83,11 +83,11 @@ int16 Room67::use_grammo() {
 		action_flag = true;
 		autoMove(6, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-		_G(det)->start_detail(0, 255, ANI_FRONT);
+		_G(det)->startDetail(0, 255, ANI_FRONT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67)
-			start_aad_wait(376, -1);
+			startAadWait(376, -1);
 		else
-			start_aad_wait(614, -1);
+			startAadWait(614, -1);
 
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->stop_detail(0);
@@ -99,7 +99,7 @@ int16 Room67::use_grammo() {
 void Room67::look_brief() {
 	hideCur();
 	autoMove(3, P_CHEWY);
-	start_aad_wait(379, -1);
+	startAadWait(379, -1);
 	showCur();
 }
 
@@ -132,7 +132,7 @@ void Room67::kostuem_aad(int16 aad_nr) {
 	if (_G(spieler).DiaAMov != -1) {
 		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 	showCur();
 }
 
@@ -151,7 +151,7 @@ int16 Room67::talk_papagei() {
 			start_ads_wait(19);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_NICHELLE) {
-			start_aad_wait(380, -1);
+			startAadWait(380, -1);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_TALK) {
 			autoMove(5, P_CHEWY);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 11a9938df24..59a9458f2d2 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -51,7 +51,7 @@ void Room68::entry() {
 	
 	if (_G(spieler).R68Papagei) {
 		_G(det)->showStaticSpr(12);
-		_G(det)->start_detail(21, 255, ANI_FRONT);
+		_G(det)->startDetail(21, 255, ANI_FRONT);
 	}
 
 	if (!_G(spieler).R68DivaWeg) {
@@ -63,8 +63,8 @@ void Room68::entry() {
 	if (!_G(flags).LoadGame) {
 		hideCur();
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
-			set_person_pos(524, 51, P_HOWARD, P_LEFT);
-			set_person_pos(550, 54, P_NICHELLE, P_LEFT);
+			setPersonPos(524, 51, P_HOWARD, P_LEFT);
+			setPersonPos(550, 54, P_NICHELLE, P_LEFT);
 		}
 		autoMove(7, P_CHEWY);
 		showCur();
@@ -93,7 +93,7 @@ void Room68::setup_func() {
 	case 0:
 		if (_G(det)->get_ani_status(_G(r68HohesC)) == false) {
 			_G(r68HohesC) = 1;
-			_G(det)->start_detail(_G(r68HohesC), 1, ANI_FRONT);
+			_G(det)->startDetail(_G(r68HohesC), 1, ANI_FRONT);
 		}
 		break;
 
@@ -103,18 +103,18 @@ void Room68::setup_func() {
 			if (_G(spieler).SpeechSwitch) {
 				g_engine->_sound->playSound(2, 0);
 				g_engine->_sound->playSound(_G(r68HohesC));
-				_G(det)->start_detail(_G(r68HohesC), 255, ANI_FRONT);
+				_G(det)->startDetail(_G(r68HohesC), 255, ANI_FRONT);
 
 				// TODO
 				//while (_G(sndPlayer)->getSampleStatus(1) == 4)
-				//	set_up_screen(DO_SETUP);
+				//	setupScreen(DO_SETUP);
 				_G(det)->stop_detail(_G(r68HohesC));
 			} else {
-				_G(det)->start_detail(_G(r68HohesC), 3, ANI_FRONT);
+				_G(det)->startDetail(_G(r68HohesC), 3, ANI_FRONT);
 			}
 			
 			
-			_G(det)->start_detail(_G(r68HohesC), 3, ANI_FRONT);
+			_G(det)->startDetail(_G(r68HohesC), 3, ANI_FRONT);
 		}
 		break;
 
@@ -150,7 +150,7 @@ void Room68::setup_func() {
 void Room68::look_kaktus() {
 	hideCur();
 	autoMove(6, P_CHEWY);
-	start_aad_wait(383, -1);
+	startAadWait(383, -1);
 	showCur();
 }
 
@@ -165,12 +165,12 @@ void Room68::talk_indigo(int16 aad_nr) {
 	_G(det)->del_static_ani(8);
 	if (aad_nr == -1) {
 		_G(det)->set_static_ani(9, -1);
-		start_aad_wait(384 + (int16)_G(spieler).R68IndigoDia, -1);
+		startAadWait(384 + (int16)_G(spieler).R68IndigoDia, -1);
 		_G(spieler).R68IndigoDia ^= 1;
 		_G(det)->del_static_ani(9);
 	} else {
 		_G(det)->set_static_ani(12, -1);
-		start_aad_wait(aad_nr, -1);
+		startAadWait(aad_nr, -1);
 		_G(det)->del_static_ani(12);
 	}
 	_G(room)->set_timer_status(8, TIMER_START);
@@ -194,8 +194,8 @@ int16 Room68::use_indigo() {
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
-			start_detail_wait(13, 3, ANI_FRONT);
-			start_detail_wait(25, 1, ANI_FRONT);
+			startSetailWait(13, 3, ANI_FRONT);
+			startSetailWait(25, 1, ANI_FRONT);
 			_G(det)->set_static_ani(12, -1);
 			talk_indigo(398);
 			_G(cur_hide_flag) = false;
@@ -203,7 +203,7 @@ int16 Room68::use_indigo() {
 			_G(room)->set_timer_status(8, TIMER_STOP);
 			_G(det)->del_static_ani(8);
 			_G(det)->stop_detail(8);
-			start_detail_wait(26, 1, ANI_FRONT);
+			startSetailWait(26, 1, ANI_FRONT);
 			_G(room)->set_timer_status(8, TIMER_START);
 			_G(det)->set_static_ani(8, -1);
 			new_invent_2_cur(KARTE_INV);
@@ -213,7 +213,7 @@ int16 Room68::use_indigo() {
 		}
 	} else if (is_cur_inventar(CLINT_1500_INV) || is_cur_inventar(CLINT_3000_INV)) {
 		action_flag = true;
-		start_aad_wait(393, -1);
+		startAadWait(393, -1);
 	}
 	showCur();
 	return action_flag;
@@ -224,7 +224,7 @@ void Room68::talk_keeper() {
 	autoMove(2, P_CHEWY);
 	_G(room)->set_timer_status(20, TIMER_STOP);
 	_G(det)->del_static_ani(20);
-	start_detail_wait(15, 1, ANI_FRONT);
+	startSetailWait(15, 1, ANI_FRONT);
 	_G(det)->set_static_ani(16, -1);
 	showCur();
 	_G(ssi)[3].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
@@ -234,7 +234,7 @@ void Room68::talk_keeper() {
 	_G(cur_hide_flag) = false;
 	hideCur();
 	_G(det)->del_static_ani(16);
-	start_detail_wait(15, 1, ANI_BACK);
+	startSetailWait(15, 1, ANI_BACK);
 	_G(room)->set_timer_status(20, TIMER_START);
 	_G(det)->set_static_ani(20, -1);
 	showCur();
@@ -250,7 +250,7 @@ int16 Room68::use_papagei() {
 		autoMove(5, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->showStaticSpr(12);
-		_G(det)->start_detail(21, 255, ANI_FRONT);
+		_G(det)->startDetail(21, 255, ANI_FRONT);
 		_G(atds)->del_steuer_bit(408, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(407, 1, ATS_DATA);
 		showCur();
@@ -265,14 +265,14 @@ void Room68::calc_diva() {
 				_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 				_G(r68HohesC) = 0;
 				_G(det)->hideStaticSpr(3);
-				_G(det)->start_detail(_G(r68HohesC), 1, ANI_BACK);
-				_G(det)->start_detail(18, 255, ANI_FRONT);
+				_G(det)->startDetail(_G(r68HohesC), 1, ANI_BACK);
+				_G(det)->startDetail(18, 255, ANI_FRONT);
 			}
 		} else if (!_G(spieler).R68Gutschein && !is_chewy_busy()) {
 			hideCur();
 			_G(spieler).R68Gutschein = true;
 			autoMove(4, P_CHEWY);
-			start_aad_wait(386, -1);
+			startAadWait(386, -1);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			new_invent_2_cur(BAR_GUT_INV);
 			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
@@ -291,7 +291,7 @@ int16 Room68::use_keeper() {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(room)->set_timer_status(20, TIMER_STOP);
 		_G(det)->del_static_ani(20);
-		start_ani_block(3, ABLOCK39);
+		startAniBlock(3, ABLOCK39);
 		_G(room)->set_timer_status(20, TIMER_START);
 		_G(det)->set_static_ani(20, -1);
 		new_invent_2_cur(B_MARY_INV);
@@ -309,7 +309,7 @@ int16 Room68::use_diva() {
 		autoMove(4, P_CHEWY);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		_G(det)->hideStaticSpr(3);
-		start_detail_wait(4, 1, ANI_FRONT);
+		startSetailWait(4, 1, ANI_FRONT);
 		_G(spieler).R68Gutschein = false;
 		_G(det)->showStaticSpr(3);
 	} else if (is_cur_inventar(B_MARY2_INV)) {
@@ -318,16 +318,16 @@ int16 Room68::use_diva() {
 		autoMove(4, P_CHEWY);
 		_G(det)->hideStaticSpr(3);
 		_G(spieler).R68DivaWeg = true;
-		start_ani_block(2, ABLOCK38);
+		startAniBlock(2, ABLOCK38);
 		flic_cut(FCUT_083);
 		_G(det)->del_static_ani(18);
 		register_cutscene(22);
 		_G(det)->del_static_ani(18);
-		start_detail_wait(7, 1, ANI_FRONT);
+		startSetailWait(7, 1, ANI_FRONT);
 		_G(atds)->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATA);
-		set_person_spr(P_RIGHT, P_CHEWY);
-		start_aad_wait(402, -1);
+		setPersonSpr(P_RIGHT, P_CHEWY);
+		startAadWait(402, -1);
 	} else
 		action_flag = use_papagei();
 	showCur();
@@ -340,12 +340,12 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
 
-	start_aad_wait(aad_nr, -1);
+	startAadWait(aad_nr, -1);
 
 	if (!_G(spieler).R68DivaWeg)
-		start_aad_wait(388, -1);
+		startAadWait(388, -1);
 	else if (!_G(spieler).R67LiedOk)
-		start_aad_wait(389, -1);
+		startAadWait(389, -1);
 	else {
 		if (_G(spieler).DisplayText == 0)
 			_G(sndPlayer)->fadeOut(5);
@@ -356,17 +356,17 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(spieler).PersonHide[P_NICHELLE] = true;
 		goAutoXy(161, 59, P_HOWARD, ANI_GO);
 		autoMove(4, P_CHEWY);
-		start_aad_wait(390, -1);
-		start_detail_wait(22, 1, ANI_FRONT);
+		startAadWait(390, -1);
+		startSetailWait(22, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = true;
-		_G(det)->start_detail(27, 255, ANI_FRONT);
+		_G(det)->startDetail(27, 255, ANI_FRONT);
 
 		if (_G(spieler).DisplayText)
-			start_detail_wait(23, 3, ANI_FRONT);
+			startSetailWait(23, 3, ANI_FRONT);
 		else {
-			_G(det)->start_detail(23, 255, ANI_FRONT);
+			_G(det)->startDetail(23, 255, ANI_FRONT);
 			g_engine->_sound->playSound(109, 1, false);
-			wait_show_screen(2);
+			waitShowScreen(2);
 
 			g_engine->_sound->waitForSpeechToFinish();
 
@@ -377,31 +377,31 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			g_engine->_sound->playSound(108, 1, false);
 		}
 		
-		_G(det)->start_detail(24, 255, ANI_FRONT);
-		set_person_pos(26, 40, P_NICHELLE, P_RIGHT);
+		_G(det)->startDetail(24, 255, ANI_FRONT);
+		setPersonPos(26, 40, P_NICHELLE, P_RIGHT);
 		if (_G(spieler).DisplayText) {
-			start_aad_wait(391, -1);
+			startAadWait(391, -1);
 		} else {
-			wait_show_screen(100);
-			start_aad_wait(602, -1);
-			wait_show_screen(100);
+			waitShowScreen(100);
+			startAadWait(602, -1);
+			waitShowScreen(100);
 		}
 
 		_G(room)->set_timer_status(8, TIMER_STOP);
 		_G(det)->del_static_ani(8);
-		start_detail_wait(10, 1, ANI_FRONT);
-		_G(det)->start_detail(11, 255, ANI_FRONT);
-		start_aad_wait(396, -1);
+		startSetailWait(10, 1, ANI_FRONT);
+		_G(det)->startDetail(11, 255, ANI_FRONT);
+		startAadWait(396, -1);
 		_G(det)->stop_detail(11);
 		_G(det)->set_static_ani(12, -1);
-		start_aad_wait(611, -1);
+		startAadWait(611, -1);
 		_G(det)->del_static_ani(12);
-		_G(det)->start_detail(14, 255, ANI_FRONT);
-		start_aad_wait(395, -1);
+		_G(det)->startDetail(14, 255, ANI_FRONT);
+		startAadWait(395, -1);
 		_G(det)->stop_detail(14);
 		_G(room)->set_timer_status(8, TIMER_START);
 		_G(det)->set_static_ani(8, -1);
-		start_aad_wait(392, -1);
+		startAadWait(392, -1);
 
 		g_engine->_sound->waitForSpeechToFinish();
 		
@@ -414,7 +414,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		auto_scroll(216, 0);
 		_G(det)->hideStaticSpr(13);
 		_G(spieler).PersonHide[P_NICHELLE] = false;
-		set_person_pos(150, -13, P_NICHELLE, P_RIGHT);
+		setPersonPos(150, -13, P_NICHELLE, P_RIGHT);
 
 		if (_G(spieler).DisplayText) {
 			_G(currentSong) = -1;
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 3ef062feaae..3f54edc54f2 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -54,9 +54,9 @@ void Room69::entry(int16 eib_nr) {
 	if (eib_nr == 102)
 		proc1();
 	else {
-		set_person_pos(295, 118, P_CHEWY, P_RIGHT);
-		set_person_pos(237, 101, P_NICHELLE, P_RIGHT);
-		set_person_pos(347, 119, P_HOWARD, P_RIGHT);
+		setPersonPos(295, 118, P_CHEWY, P_RIGHT);
+		setPersonPos(237, 101, P_NICHELLE, P_RIGHT);
+		setPersonPos(347, 119, P_HOWARD, P_RIGHT);
 		goAutoXy(351, 97, P_HOWARD, ANI_WAIT);
 		showCur();
 	}
@@ -78,7 +78,7 @@ void Room69::setup_func() {
 void Room69::look_schild() {
 	hideCur();
 	autoMove(1, P_CHEWY);
-	start_aad_wait(382, -1);
+	startAadWait(382, -1);
 	showCur();
 }
 
@@ -124,9 +124,9 @@ int16 Room69::use_bruecke() {
 void Room69::proc1() {
 	_G(spieler).scrollx = 0;
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	set_person_pos(46, 83, P_CHEWY, P_RIGHT);
-	set_person_pos(59, 68, P_NICHELLE, P_RIGHT);
-	set_person_pos(94, 82, P_HOWARD, P_RIGHT);
+	setPersonPos(46, 83, P_CHEWY, P_RIGHT);
+	setPersonPos(59, 68, P_NICHELLE, P_RIGHT);
+	setPersonPos(94, 82, P_HOWARD, P_RIGHT);
 	goAutoXy(59, 68, P_NICHELLE, ANI_GO);
 	goAutoXy(94, 82, P_HOWARD, ANI_WAIT);
 	goAutoXy(94, 77, P_NICHELLE, ANI_GO);
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 9f68705dea7..79be4905b55 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -53,7 +53,7 @@ void Room71::entry(int16 eib_nr) {
 		_G(timer_nr)[0] = _G(room)->set_timer(0, 10);
 		_G(det)->set_static_ani(0, -1);
 	} else if (_G(spieler).R71LeopardVined) {
-		_G(det)->start_detail(2, 255, ANI_FRONT);
+		_G(det)->startDetail(2, 255, ANI_FRONT);
 		_G(det)->showStaticSpr(8);
 		_G(det)->hideStaticSpr(2);
 		_G(det)->hideStaticSpr(3);
@@ -67,14 +67,14 @@ void Room71::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 110:
-		set_person_pos(500, 67, P_CHEWY, P_LEFT);
-		set_person_pos(568, 31, P_NICHELLE, P_LEFT);
-		set_person_pos(538, 35, P_HOWARD, P_LEFT);
+		setPersonPos(500, 67, P_CHEWY, P_LEFT);
+		setPersonPos(568, 31, P_NICHELLE, P_LEFT);
+		setPersonPos(538, 35, P_HOWARD, P_LEFT);
 		break;
 	case 114:
-		set_person_pos(70, 48, P_CHEWY, P_RIGHT);
-		set_person_pos(165, 16, P_NICHELLE, P_RIGHT);
-		set_person_pos(120, 18, P_HOWARD, P_RIGHT);
+		setPersonPos(70, 48, P_CHEWY, P_RIGHT);
+		setPersonPos(165, 16, P_NICHELLE, P_RIGHT);
+		setPersonPos(120, 18, P_HOWARD, P_RIGHT);
 		break;
 	default:
 		break;
@@ -185,7 +185,7 @@ int Room71::proc1() {
 	}
 
 	if (!_G(spieler).R71LeopardVined)
-		start_aad_wait(432, -1);
+		startAadWait(432, -1);
 
 	showCur();
 	_G(flags).NoScroll = false;
@@ -193,8 +193,8 @@ int Room71::proc1() {
 }
 
 void Room71::proc2() {
-	start_aad_wait(432, -1);
-	start_aad_wait(433, -1);
+	startAadWait(432, -1);
+	startAadWait(433, -1);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(518, 35, P_HOWARD, ANI_GO);
 	goAutoXy(568, 36, P_NICHELLE, ANI_WAIT);
@@ -206,11 +206,11 @@ void Room71::proc2() {
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	proc5(5);
 	_G(det)->hideStaticSpr(2);
-	_G(det)->start_detail(5, 255, false);
+	_G(det)->startDetail(5, 255, false);
 	auto_scroll(160, 0);
 	_G(det)->hideStaticSpr(5);
-	start_detail_wait(1, 1, ANI_FRONT);
-	_G(det)->start_detail(2, 255, false);
+	startSetailWait(1, 1, ANI_FRONT);
+	_G(det)->startDetail(2, 255, false);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(8);
 	_G(atds)->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATA);
@@ -222,11 +222,11 @@ void Room71::proc2() {
 	_G(flags).NoScroll = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
-	start_aad_wait(434, -1);
+	startAadWait(434, -1);
 }
 
 void Room71::proc3() {
-	start_aad_wait(431, -1);
+	startAadWait(431, -1);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(510, 34, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
@@ -238,7 +238,7 @@ void Room71::proc3() {
 }
 
 void Room71::proc4() {
-	start_aad_wait(430, -1);
+	startAadWait(430, -1);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(518, 35, P_HOWARD, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
@@ -252,7 +252,7 @@ void Room71::proc4() {
 void Room71::proc5(int16 val) {
 	_state = 1 + (_G(spieler).flags28_4 ? 1 : 0);
 	_G(det)->hideStaticSpr(2);
-	start_detail_wait(val, 5, ANI_FRONT);
+	startSetailWait(val, 5, ANI_FRONT);
 	_G(det)->showStaticSpr(2);
 	_state = 0;
 }
@@ -285,20 +285,20 @@ int Room71::proc6() {
 void Room71::proc7() {
 	hideCur();
 	autoMove(4, P_CHEWY);
-	start_aad_wait(429, -1);
+	startAadWait(429, -1);
 	_G(SetUpScreenFunc) = nullptr;
-	set_person_spr(P_LEFT, P_CHEWY);
+	setPersonSpr(P_LEFT, P_CHEWY);
 	goAutoXy(323, 28, P_NICHELLE, ANI_WAIT);
 	_G(flags).NoScroll = true;
 	auto_scroll(200, 0);
 	_G(spieler).PersonHide[P_NICHELLE] = true;
-	_G(det)->start_detail(7, 255, false);
-	start_aad_wait(624, -1);
+	_G(det)->startDetail(7, 255, false);
+	startAadWait(624, -1);
 	_G(det)->stop_detail(7);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(flags).NoScroll = false;
-	start_aad_wait(432, -1);
+	startAadWait(432, -1);
 
 	showCur();
 }
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 0240738297c..1cbde46067f 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -56,9 +56,9 @@ void Room72::entry(int16 eib_nr) {
 
 	switch (eib_nr) {
 	case 112:
-		set_person_pos(50, 129, P_CHEWY, P_RIGHT);
-		set_person_pos(15, 103, P_HOWARD, P_RIGHT);
-		set_person_pos(-15, 102, P_NICHELLE, P_RIGHT);
+		setPersonPos(50, 129, P_CHEWY, P_RIGHT);
+		setPersonPos(15, 103, P_HOWARD, P_RIGHT);
+		setPersonPos(-15, 102, P_NICHELLE, P_RIGHT);
 		goAutoXy(185, 130, P_CHEWY, ANI_GO);
 		goAutoXy(147, 103, P_HOWARD, ANI_GO);
 		goAutoXy(120, 104, P_NICHELLE, ANI_WAIT);
@@ -66,9 +66,9 @@ void Room72::entry(int16 eib_nr) {
 		register_cutscene(23);
 		break;
 	case 113:
-		set_person_pos(213, 129, P_CHEWY, P_LEFT);
-		set_person_pos(262, 103, P_HOWARD, P_LEFT);
-		set_person_pos(293, 102, P_NICHELLE, P_LEFT);
+		setPersonPos(213, 129, P_CHEWY, P_LEFT);
+		setPersonPos(262, 103, P_HOWARD, P_LEFT);
+		setPersonPos(293, 102, P_NICHELLE, P_LEFT);
 		goAutoXy(120, 130, P_CHEWY, ANI_GO);
 		goAutoXy(154, 102, P_HOWARD, ANI_GO);
 		goAutoXy(186, 102, P_NICHELLE, ANI_WAIT);
@@ -87,14 +87,14 @@ void Room72::xit(int16 eib_nr) {
 void Room72::proc1(int16 flicNr) {
 	_G(atds)->set_steuer_bit(389, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).flags28_10 = true;
-	wait_show_screen(7);
-	start_aad_wait(437, -1);
+	waitShowScreen(7);
+	startAadWait(437, -1);
 	flic_cut(flicNr);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->hideStaticSpr(0);
-	set_up_screen(DO_SETUP);
+	setupScreen(DO_SETUP);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 615238689ba..13239cfda29 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -45,7 +45,7 @@ void Room74::entry(int16 eib_nr) {
 	_G(SetUpScreenFunc) = setup_func;
 
 	if (_G(spieler).flags29_1)
-		_G(det)->start_detail(0, 255, false);
+		_G(det)->startDetail(0, 255, false);
 
 	if (_G(flags).LoadGame)
 		return;
@@ -96,10 +96,10 @@ int Room74::proc1() {
 		_G(spieler).R74CutRubberPlant = true;
 		autoMove(4, P_CHEWY);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(1, 1, ANI_FRONT);
-		set_person_pos(272, 116, P_CHEWY, P_RIGHT);
+		startSetailWait(1, 1, ANI_FRONT);
+		setPersonPos(272, 116, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(det)->start_detail(0, 255, false);
+		_G(det)->startDetail(0, 255, false);
 		_G(spieler).flags29_1 = true;
 		_G(atds)->set_ats_str(435, 1, ATS_DATA);
 
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index 13f47780bec..bfb24c73bee 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -86,9 +86,9 @@ void Room75::xit(int16 eib_nr) {
 void Room75::proc1() {
 	_G(cur_hide_flag) = 0;
 	hideCur();
-	set_person_pos(363, 110, P_CHEWY, P_LEFT);
-	set_person_pos(322, 85, P_NICHELLE, P_RIGHT);
-	set_person_pos(317, 96, P_HOWARD, P_RIGHT);
+	setPersonPos(363, 110, P_CHEWY, P_LEFT);
+	setPersonPos(322, 85, P_NICHELLE, P_RIGHT);
+	setPersonPos(317, 96, P_HOWARD, P_RIGHT);
 	goAutoXy(318, 110, P_NICHELLE, ANI_WAIT);
 	showCur();
 }
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 1a02387243f..e8e1fb284c3 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -41,8 +41,8 @@ void Room76::entry() {
 	_G(SetUpScreenFunc) = setup_func;
 	_state = 0;
 
-	set_person_pos(308, 84, P_NICHELLE, P_RIGHT);
-	set_person_pos(365, 84, P_HOWARD, P_RIGHT);
+	setPersonPos(308, 84, P_NICHELLE, P_RIGHT);
+	setPersonPos(365, 84, P_HOWARD, P_RIGHT);
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 
@@ -69,7 +69,7 @@ void Room76::entry() {
 		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).flags29_2 = true;
-		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
+		setPersonPos(128, 135, P_CHEWY, P_RIGHT);
 		proc3(420);
 		proc5();
 
@@ -78,7 +78,7 @@ void Room76::entry() {
 		_G(flags).NoScroll = true;
 		_G(spieler).scrollx = 122;
 		_G(spieler).r76State = -1;
-		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
+		setPersonPos(128, 135, P_CHEWY, P_RIGHT);
 		proc3(422);
 		_G(flags).NoScroll = false;
 	}
@@ -94,8 +94,8 @@ void Room76::setup_func() {
 		return;
 
 	_state = 0;
-	_G(det)->start_detail(11, 1, false);
-	_G(det)->start_detail(12, 1, false);
+	_G(det)->startDetail(11, 1, false);
+	_G(det)->startDetail(12, 1, false);
 }
 
 void Room76::talk1() {
@@ -103,7 +103,7 @@ void Room76::talk1() {
 	autoMove(4, P_CHEWY);
 	auto_scroll(172, 0);
 	const int diaNr = 425 + (_G(spieler).flags32_4 ? 1 : 0);
-	start_aad_wait(diaNr, -1);
+	startAadWait(diaNr, -1);
 	showCur();
 }
 
@@ -126,28 +126,28 @@ void Room76::talk2() {
 }
 
 void Room76::proc3(int diaNr) {
-	start_aad_wait(diaNr, -1);
+	startAadWait(diaNr, -1);
 	_G(det)->del_static_ani(2);
-	start_detail_wait(3, 1, ANI_FRONT);
-	start_detail_wait(4, 2, ANI_FRONT);
+	startSetailWait(3, 1, ANI_FRONT);
+	startSetailWait(4, 2, ANI_FRONT);
 	_G(det)->set_static_ani(2, -1);
 }
 
 void Room76::proc5() {
 	_state = 1;
 	_G(det)->del_static_ani(2);
-	_G(det)->start_detail(6, 1, false);
+	_G(det)->startDetail(6, 1, false);
 	_G(flags).NoScroll = false;
-	wait_show_screen(15);
+	waitShowScreen(15);
 	autoMove(5, P_CHEWY);
 	_G(det)->hideStaticSpr(10);
-	_G(det)->start_detail(13, 1, false);
+	_G(det)->startDetail(13, 1, false);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(669, 127, P_CHEWY, ANI_WAIT);
-	wait_show_screen(20);
+	waitShowScreen(20);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
-	set_person_pos(30, 150, P_CHEWY, P_RIGHT);
+	setPersonPos(30, 150, P_CHEWY, P_RIGHT);
 	switch_room(78);
 }
 
@@ -163,16 +163,16 @@ int Room76::proc6() {
 		proc3(424);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		_G(det)->del_static_ani(2);
-		start_detail_wait(5, 1, ANI_FRONT);
+		startSetailWait(5, 1, ANI_FRONT);
 		_G(det)->set_static_ani(2, -1);
-		start_detail_wait(9, 1, ANI_FRONT);
-		start_detail_wait(10, 1, ANI_FRONT);
+		startSetailWait(9, 1, ANI_FRONT);
+		startSetailWait(10, 1, ANI_FRONT);
 		showCur();
 	} else if (is_cur_inventar(94)) {
 		hideCur();
 		retVal = 1;
-		set_person_spr(P_RIGHT, P_CHEWY);
-		start_aad_wait(436, 1);
+		setPersonSpr(P_RIGHT, P_CHEWY);
+		startAadWait(436, 1);
 		showCur();
 	}
 
@@ -190,32 +190,32 @@ int Room76::proc7() {
 		del_inventar(_G(spieler).AkInvent);
 		invent_2_slot(106);
 		invent_2_slot(105);
-		start_aad_wait(444, -1);
+		startAadWait(444, -1);
 		_G(out)->ausblenden(0);
 		_G(out)->set_teilpalette(_G(pal), 255, 1);
-		start_aad_wait(443, -1);
+		startAadWait(443, -1);
 		_G(spieler).scrollx = 0;
 		_G(fx_blend) = BLEND3;
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
-		set_person_pos(128, 135, P_CHEWY, P_RIGHT);
+		setPersonPos(128, 135, P_CHEWY, P_RIGHT);
 		_G(det)->set_static_ani(2, -1);
 
 		for (int i = 0; i < 3; ++i)
 			_G(det)->showStaticSpr(8 + i);
 
-		start_aad_wait(427, -1);
+		startAadWait(427, -1);
 		showCur();
 		start_ads_wait(21);
 		hideCur();
-		start_aad_wait(428, -1);
+		startAadWait(428, -1);
 		showCur();
 		_G(spieler).flags29_80 = true;
 		switch_room(78);
 	} else {
 		hideCur();
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		start_aad_wait(577, -1);
+		startAadWait(577, -1);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 22ec2047c37..a3981a2121d 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -57,8 +57,8 @@ void Room77::entry() {
 		_G(spieler).r76State = -1;
 		hideCur();
 		_G(spieler).scrollx = 62;
-		set_person_pos(158, 127, P_CHEWY, P_RIGHT);
-		start_aad_wait(440, -1);
+		setPersonPos(158, 127, P_CHEWY, P_RIGHT);
+		startAadWait(440, -1);
 		showCur();
 	}
 }
@@ -88,7 +88,7 @@ int Room77::proc1() {
 
 	cur_2_inventory();
 	start_spz(aniId, 255, false, P_CHEWY);
-	start_aad_wait(diaNr, -1);
+	startAadWait(diaNr, -1);
 	showCur();
 	if (_G(spieler).flags29_10)
 		remove_inventory(103);
@@ -118,7 +118,7 @@ int Room77::proc2() {
 	}
 
 	start_spz(aniId, 255, false, P_CHEWY);
-	start_aad_wait(diaNr, -1);
+	startAadWait(diaNr, -1);
 
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 7ace3d82744..0079ab77d81 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -39,13 +39,13 @@ void Room78::entry() {
 	_G(spieler).PersonHide[P_HOWARD] = true;
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(spieler).scrollx = 320;
-	set_person_pos(0, 0, P_CHEWY, P_RIGHT);
+	setPersonPos(0, 0, P_CHEWY, P_RIGHT);
 
 	int delay = 0;
 	int destRoom;
 
 	if (_G(spieler).flags29_80) {
-		_G(det)->start_detail(3, 255, false);
+		_G(det)->startDetail(3, 255, false);
 
 		int destX = 592;
 		while (destX > 0) {
@@ -56,14 +56,14 @@ void Room78::entry() {
 				delay = _G(spieler).DelaySpeed / 2;
 				destX -= 4;
 			}
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_101);
 		destRoom = 79;
 	} else {
-		_G(det)->start_detail(0, 255, false);
-		_G(det)->start_detail(4, 255, false);
+		_G(det)->startDetail(0, 255, false);
+		_G(det)->startDetail(4, 255, false);
 		int det0DestX = 608;
 		int det4DestX = 570;
 		bool exitLoopFlag = false;
@@ -85,7 +85,7 @@ void Room78::entry() {
 					} else {
 						flag1 = true;
 						_G(det)->stop_detail(0);
-						_G(det)->start_detail(1, 1, false);
+						_G(det)->startDetail(1, 1, false);
 					}
 				}
 
@@ -96,9 +96,9 @@ void Room78::entry() {
 						flag2 = true;
 						_G(det)->stop_detail(4);
 						if (flag1 == 0) {
-							_G(det)->start_detail(5, 1, false);
+							_G(det)->startDetail(5, 1, false);
 						} else {
-							start_detail_wait(5, 1, ANI_FRONT);
+							startSetailWait(5, 1, ANI_FRONT);
 						}
 					} else {
 						if (det4DestX <= 0)
@@ -112,7 +112,7 @@ void Room78::entry() {
 			if (flag1 && flag2)
 				exitLoopFlag = true;
 
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 
 		if (_G(spieler).flags29_10 && _G(spieler).flags29_20) {
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 7ce0f7bc85e..d1f4c991a6e 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -41,12 +41,12 @@ void Room79::entry() {
 	_G(spieler).PersonRoomNr[P_HOWARD] = 79;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 79;
 	if (!_G(flags).LoadGame) {
-		set_person_pos(459, 114, P_CHEWY, P_LEFT);
-		set_person_pos(568, 65, P_HOWARD, P_LEFT);
-		set_person_pos(534, 75, P_NICHELLE, P_LEFT);
+		setPersonPos(459, 114, P_CHEWY, P_LEFT);
+		setPersonPos(568, 65, P_HOWARD, P_LEFT);
+		setPersonPos(534, 75, P_NICHELLE, P_LEFT);
 		_G(spieler).scrollx = 300;
 		hideCur();
-		start_aad_wait(484, -1);
+		startAadWait(484, -1);
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10026;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 		showCur();
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index e004d6b8183..56839a7301d 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -50,9 +50,9 @@ void Room80::entry() {
 		return;
 	}
 
-	set_person_pos(37, 10, P_CHEWY, P_RIGHT);
-	set_person_pos(22, -1, P_HOWARD, P_RIGHT);
-	set_person_pos(6, 2, P_NICHELLE, P_RIGHT);
+	setPersonPos(37, 10, P_CHEWY, P_RIGHT);
+	setPersonPos(22, -1, P_HOWARD, P_RIGHT);
+	setPersonPos(6, 2, P_NICHELLE, P_RIGHT);
 	_G(spieler).scrollx = 10;
 	_G(flags).NoScroll = true;
 	_G(spieler).ZoomXy[P_HOWARD][0] = 24;
@@ -120,7 +120,7 @@ void Room80::setup_func() {
 	cursorChoice(CUR_WALK);
 	_G(spieler).flags30_1 = true;
 	_G(maus_links_click) = false;
-	set_up_screen(DO_SETUP);
+	setupScreen(DO_SETUP);
 	
 	for (int i = P_CHEWY; i <= P_NICHELLE; ++i) {
 		if (_G(spieler).R79Val[i] != 0) {
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 8253970655f..40cc65e8e47 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -47,9 +47,9 @@ void Room81::entry() {
 	if (_G(flags).LoadGame || !_G(spieler).flags30_1)
 		return;
 
-	set_person_pos(155, 146, P_CHEWY, P_LEFT);
-	set_person_pos(103, 115, P_HOWARD, P_RIGHT);
-	set_person_pos(62, 112, P_NICHELLE, P_RIGHT);
+	setPersonPos(155, 146, P_CHEWY, P_LEFT);
+	setPersonPos(103, 115, P_HOWARD, P_RIGHT);
+	setPersonPos(62, 112, P_NICHELLE, P_RIGHT);
 	_G(spieler).flags30_1 = false;
 	_G(maus_links_click) = false;
 	_G(spieler).scrollx = 0;
@@ -78,14 +78,14 @@ void Room81::proc1() {
 		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
 		goAutoXy(112, 60, P_CHEWY, ANI_WAIT);
-		start_aad_wait(461, -1);
+		startAadWait(461, -1);
 		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(0, 1, ANI_FRONT);
-		_G(det)->start_detail(1, 255, false);
-		start_aad_wait(459, -1);
+		startSetailWait(0, 1, ANI_FRONT);
+		_G(det)->startDetail(1, 255, false);
+		startAadWait(459, -1);
 		_G(det)->stop_detail(1);
-		start_detail_wait(0, 1, ANI_GO);
+		startSetailWait(0, 1, ANI_GO);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(100, 96, P_CHEWY, ANI_WAIT);
@@ -99,7 +99,7 @@ void Room81::proc1() {
 	
 	if (diaNr != -1) {
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		start_aad_wait(diaNr, -1);
+		startAadWait(diaNr, -1);
 	}
 
 	showCur();
@@ -129,7 +129,7 @@ int Room81::proc2() {
 	if (diaNr != -1) {
 		retVal = 1;
 		start_spz(aniId, 255, false, P_CHEWY);
-		start_aad_wait(diaNr, -1);
+		startAadWait(diaNr, -1);
 		proc3();
 	}
 
@@ -139,12 +139,12 @@ int Room81::proc2() {
 
 void Room81::proc3() {
 	if (!_G(spieler).flags30_2) {
-		_G(det)->start_detail(2, 255, false);
+		_G(det)->startDetail(2, 255, false);
 		return;
 	}
 
 	for (int i = 0; i < 3; ++i)
-		_G(det)->start_detail(3 + i, 255, false);
+		_G(det)->startDetail(3 + i, 255, false);
 
 	_G(det)->stop_detail(2);
 	_G(atds)->del_steuer_bit(486, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 52a074c7455..4e02ee335f1 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -53,15 +53,15 @@ void Room82::entry() {
 	}
 
 	if (_G(spieler).flags30_1) {
-		set_person_pos(635, 144, P_CHEWY, P_LEFT);
-		set_person_pos(592, 115, P_HOWARD, P_RIGHT);
-		set_person_pos(543, 110, P_NICHELLE, P_RIGHT);
+		setPersonPos(635, 144, P_CHEWY, P_LEFT);
+		setPersonPos(592, 115, P_HOWARD, P_RIGHT);
+		setPersonPos(543, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(spieler).scrollx = 479;
 	} else if (_G(spieler).flags31_8) {
-		set_person_pos(130, 138, P_CHEWY, P_LEFT);
-		set_person_pos(104, 111, P_HOWARD, P_RIGHT);
-		set_person_pos(153, 110, P_NICHELLE, P_RIGHT);
+		setPersonPos(130, 138, P_CHEWY, P_LEFT);
+		setPersonPos(104, 111, P_HOWARD, P_RIGHT);
+		setPersonPos(153, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags31_8 = false;
 		_G(spieler).scrollx = 0;
 	}
@@ -134,7 +134,7 @@ void Room82::talk1() {
 void Room82::talk2() {
 	hideCur();
 	autoMove(3, P_CHEWY);
-	start_aad_wait(453, -1);
+	startAadWait(453, -1);
 	showCur();
 }
 
@@ -151,8 +151,8 @@ int Room82::proc3() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(room)->set_timer_status(0, TIMER_STOP);
 	_G(det)->del_static_ani(0);
-	start_detail_wait(2, 1, ANI_FRONT);
-	start_detail_wait(3, 1, ANI_FRONT);
+	startSetailWait(2, 1, ANI_FRONT);
+	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->set_static_ani(0, -1);
 	start_spz_wait(13, 1, false, P_CHEWY);
 
@@ -175,7 +175,7 @@ void Room82::proc4() {
 	_G(room)->set_timer_status(4, TIMER_STOP);
 	_G(det)->del_static_ani(4);
 	_G(det)->set_static_ani(5, 3);
-	start_aad_wait(445, -1);
+	startAadWait(445, -1);
 	_G(det)->del_static_ani(5);
 	_G(det)->set_static_ani(4, -1);
 	_G(room)->set_timer_status(4, TIMER_START);
@@ -195,15 +195,15 @@ int Room82::proc6() {
 	autoMove(2, P_CHEWY);
 
 	if (_G(spieler).flags30_10) {
-		start_aad_wait(450, -1);
+		startAadWait(450, -1);
 		_G(out)->ausblenden(0);
 		_G(out)->set_teilpalette(_G(pal), 255, 1);
 		_G(atds)->enableEvents(false);
-		start_aad_wait(598, -1);
+		startAadWait(598, -1);
 		_G(atds)->enableEvents(true);
 		_G(det)->showStaticSpr(7);
 		_G(fx_blend) = BLEND3;
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		Room66::proc8(2, 7, 7, 451);
 		_G(spieler).flags30_20 = true;
 		_G(spieler).flags37_20 = true;
@@ -212,7 +212,7 @@ int Room82::proc6() {
 		remove_inventory(106);
 	} else {
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		start_aad_wait(276, -1);
+		startAadWait(276, -1);
 	}
 
 	showCur();
@@ -222,20 +222,20 @@ int Room82::proc6() {
 void Room82::proc8() {
 	hideCur();
 	_G(spieler).flags30_10 = true;
-	start_aad_wait(447, -1);
+	startAadWait(447, -1);
 	autoMove(6, P_CHEWY);
 
 	while (_G(spieler_vector)[P_NICHELLE].Count != 0)
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 
 	_G(spieler).PersonHide[P_NICHELLE] = true;
-	_G(det)->start_detail(10, 255, false);
-	start_aad_wait(625, -1);
+	_G(det)->startDetail(10, 255, false);
+	startAadWait(625, -1);
 	_G(det)->stop_detail(10);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
-	start_aad_wait(448, -1);
+	startAadWait(448, -1);
 	_G(det)->del_static_ani(4);
-	start_detail_wait(6, 2, ANI_FRONT);
+	startSetailWait(6, 2, ANI_FRONT);
 	_G(det)->set_static_ani(4, -1);
 	showCur();
 }
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index ae1a28479b1..4a28e23e639 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -52,7 +52,7 @@ void Room84::entry() {
 	}
 
 	if (_G(spieler).flags32_10) {
-		_G(det)->start_detail(7, 255, false);
+		_G(det)->startDetail(7, 255, false);
 		_G(atds)->del_steuer_bit(504, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).room_e_obj[124].Attribut = 255;
 		_G(atds)->set_ats_str(485, 2, ATS_DATA);
@@ -74,38 +74,38 @@ void Room84::entry() {
 	if (_G(flags).LoadGame) {
 		; // Nothing. It avoids a deeper level of if, and we need the _G(SetUpScreenFunc) at the end
 	} else if (_G(spieler).flags30_1 || _G(spieler).flags31_8) {
-		set_person_pos(569, 135, P_CHEWY, P_LEFT);
-		set_person_pos(489, 113, P_HOWARD, P_RIGHT);
-		set_person_pos(523, 110, P_NICHELLE, P_RIGHT);
+		setPersonPos(569, 135, P_CHEWY, P_LEFT);
+		setPersonPos(489, 113, P_HOWARD, P_RIGHT);
+		setPersonPos(523, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(spieler).flags31_8 = false;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 319;
 
 		if (_G(spieler).flags32_10) {
-			set_person_pos(347, 130, P_CHEWY, P_RIGHT);
-			set_person_pos(408, 113, P_HOWARD, P_LEFT);
+			setPersonPos(347, 130, P_CHEWY, P_RIGHT);
+			setPersonPos(408, 113, P_HOWARD, P_LEFT);
 			_G(spieler).scrollx = 250;
 			if (_G(spieler).flags32_40) {
-				start_aad_wait(481, -1);
+				startAadWait(481, -1);
 				_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
 			}
 		}
 	} else if (_G(spieler).flags32_20) {
 		hideCur();
-		set_person_pos(347, 130, P_CHEWY, P_RIGHT);
-		set_person_pos(408, 113, P_HOWARD, P_LEFT);
+		setPersonPos(347, 130, P_CHEWY, P_RIGHT);
+		setPersonPos(408, 113, P_HOWARD, P_LEFT);
 		_G(spieler).scrollx = 250;
 		_G(spieler).flags32_20 = false;
 		_G(spieler).room_e_obj[124].Attribut = 255;
 		_G(spieler).room_e_obj[125].Attribut = 255;
 		_G(atds)->set_ats_str(485, 2, ATS_DATA);
-		start_aad_wait(477, -1);
+		startAadWait(477, -1);
 		showCur();
 	} else {
-		set_person_pos(263, 136, P_CHEWY, P_LEFT);
-		set_person_pos(238, 113, P_HOWARD, P_RIGHT);
-		set_person_pos(294, 110, P_NICHELLE, P_RIGHT);
+		setPersonPos(263, 136, P_CHEWY, P_LEFT);
+		setPersonPos(238, 113, P_HOWARD, P_RIGHT);
+		setPersonPos(294, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(spieler).scrollx = 156;
 	}
@@ -138,16 +138,16 @@ void Room84::setup_func() {
 		hideCur();
 		autoMove(4, P_CHEWY);
 		_G(flags).NoScroll = true;
-		set_person_spr(P_LEFT, P_CHEWY);
+		setPersonSpr(P_LEFT, P_CHEWY);
 		auto_scroll(150, 0);
 		_G(det)->del_static_ani(3);
 		_G(det)->set_static_ani(4, -1);
-		start_aad_wait(455, -1);
+		startAadWait(455, -1);
 		_G(det)->del_static_ani(4);
 		start_spz(62, 1, false, P_HOWARD);
-		start_detail_wait(5, 1, ANI_FRONT);
+		startSetailWait(5, 1, ANI_FRONT);
 		_G(det)->set_static_ani(3, -1);
-		start_aad_wait(456, -1);
+		startAadWait(456, -1);
 		_G(flags).NoScroll = false;
 		showCur();
 	}
@@ -174,14 +174,14 @@ void Room84::setup_func() {
 void Room84::talk1() {
 	autoMove(4, P_CHEWY);
 	_G(flags).NoScroll = true;
-	set_person_spr(P_LEFT, P_CHEWY);
+	setPersonSpr(P_LEFT, P_CHEWY);
 	auto_scroll(150, 0);
 	start_ads_wait(22);
 	_G(flags).NoScroll = false;
 }
 
 void Room84::talk2() {
-	start_aad_wait(478, -1);
+	startAadWait(478, -1);
 }
 
 int Room84::proc4() {
@@ -193,7 +193,7 @@ int Room84::proc4() {
 
 	if (_G(spieler).flags32_10) {
 		_G(det)->stop_detail(7);
-		start_detail_wait(8, 1, ANI_FRONT);
+		startSetailWait(8, 1, ANI_FRONT);
 	} else {
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
 	}
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index c75316da5ba..ebb3da906c7 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -58,32 +58,32 @@ void Room85::entry(int16 eib_nr) {
 
 	if (_G(spieler).flags30_1 || eib_nr == 124) {
 		hideCur();
-		set_person_pos(278, 157, P_CHEWY, P_RIGHT);
-		set_person_pos(296, 142, P_HOWARD, P_RIGHT);
-		set_person_pos(322, 142, P_NICHELLE, P_RIGHT);
+		setPersonPos(278, 157, P_CHEWY, P_RIGHT);
+		setPersonPos(296, 142, P_HOWARD, P_RIGHT);
+		setPersonPos(322, 142, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 78;
 		if (_G(spieler).flags32_40) {
 			_G(atds)->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATA);
-			_G(det)->start_detail(1, 255, false);
-			set_person_pos(195, 146, P_CHEWY, P_RIGHT);
-			set_person_pos(186, 142, P_HOWARD, P_RIGHT);
+			_G(det)->startDetail(1, 255, false);
+			setPersonPos(195, 146, P_CHEWY, P_RIGHT);
+			setPersonPos(186, 142, P_HOWARD, P_RIGHT);
 		}
 		showCur();
 	} else if (!_G(spieler.flags32_20)) {
-		set_person_pos(148, 152, P_CHEWY, P_RIGHT);
-		set_person_pos(98, 142, P_HOWARD, P_RIGHT);
-		set_person_pos(128, 142, P_NICHELLE, P_RIGHT);
+		setPersonPos(148, 152, P_CHEWY, P_RIGHT);
+		setPersonPos(98, 142, P_HOWARD, P_RIGHT);
+		setPersonPos(128, 142, P_NICHELLE, P_RIGHT);
 		_G(spieler).scrollx = 0;
 	} else {
 		hideCur();
 		_G(spieler).scrollx = 0;
-		set_person_pos(133, 152, P_CHEWY, P_RIGHT);
+		setPersonPos(133, 152, P_CHEWY, P_RIGHT);
 		_G(spieler).room_e_obj[127].Attribut = 255;
 		_G(det)->showStaticSpr(5);
 		_G(det)->showStaticSpr(6);
-		start_aad_wait(474, -1);
+		startAadWait(474, -1);
 		flic_cut(FCUT_090);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -92,7 +92,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->hideStaticSpr(6);
 		_G(spieler).scrollx = 25;
 		_G(fx_blend) = BLEND3;
-		start_aad_wait(475, -1);
+		startAadWait(475, -1);
 		start_aad(476, -1);
 		flic_cut(FCUT_089);
 		register_cutscene(25);
@@ -155,7 +155,7 @@ int Room85::proc2() {
 
 	autoMove(2, P_CHEWY);
 	_G(det)->stop_detail(1);
-	start_detail_wait(2, 1, ANI_FRONT);
+	startSetailWait(2, 1, ANI_FRONT);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 89;
 	cur_2_inventory();
 	remove_inventory(109);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index fbb680c1ac9..c45965a32f7 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -42,7 +42,7 @@ void Room86::entry(int16 eib_nr) {
 	_G(zoom_horizont) = 110;
 	_G(spieler).DiaAMov = 0;
 	if (_G(spieler).flags32_2) {
-		_G(det)->start_detail(0, 255, false);
+		_G(det)->startDetail(0, 255, false);
 		_G(det)->setStaticPos(0, 352, 107, false, false);
 		_G(det)->showStaticSpr(0);
 	}
@@ -51,15 +51,15 @@ void Room86::entry(int16 eib_nr) {
 		return;
 
 	if (eib_nr == 127) {
-		set_person_pos(82, 56, P_HOWARD, P_RIGHT);
-		set_person_pos(134, 56, P_NICHELLE, P_LEFT);
+		setPersonPos(82, 56, P_HOWARD, P_RIGHT);
+		setPersonPos(134, 56, P_NICHELLE, P_LEFT);
 		return;
 	}
 
 	if (!_G(spieler).flags32_10) {
-		set_person_pos(260, 66, P_CHEWY, P_RIGHT);
-		set_person_pos(298, 44, P_HOWARD, P_LEFT);
-		set_person_pos(320, 42, P_NICHELLE, P_LEFT);
+		setPersonPos(260, 66, P_CHEWY, P_RIGHT);
+		setPersonPos(298, 44, P_HOWARD, P_LEFT);
+		setPersonPos(320, 42, P_NICHELLE, P_LEFT);
 		_G(spieler).scrollx = 164;
 	} else {
 		_G(spieler_mi)[P_CHEWY].Vorschub = 16;
@@ -67,7 +67,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(flags).ZoomMov = false;
 		_G(spieler).scrollx = 246;
 		_G(spieler).ScrollxStep = 8;
-		set_person_pos(443, 66, P_CHEWY, P_RIGHT);
+		setPersonPos(443, 66, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonRoomNr[P_HOWARD] = 84;
 		_G(spieler).PersonRoomNr[P_NICHELLE] = 0;
 		autoMove(2, P_CHEWY);
@@ -149,7 +149,7 @@ int Room86::proc2() {
 	hideCur();
 	autoMove(2, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
-	_G(det)->start_detail(0, 255, false);
+	_G(det)->startDetail(0, 255, false);
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
 	del_inventar(_G(spieler).AkInvent);
@@ -161,7 +161,7 @@ int Room86::proc2() {
 	_G(spieler).flags32_2 = true;
 	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
-	start_aad_wait(468, -1);
+	startAadWait(468, -1);
 
 	showCur();
 	return 1;
@@ -189,7 +189,7 @@ void Room86::proc3(bool cond) {
 	g_engine->_sound->playSound(0, 2, false);
 
 	for (int i = 0; i < 48; ++i) {
-		set_up_screen(NO_SETUP);
+		setupScreen(NO_SETUP);
 		_G(det)->setStaticPos(0, 352, destY, false, false);
 		destY += deltaY;
 		_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index a8017d3a18d..ab2eff561ee 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -47,8 +47,8 @@ void Room87::entry() {
 	if (_G(flags).LoadGame)
 		return;
 
-	set_person_pos(11, 70, P_HOWARD, P_RIGHT);
-	set_person_pos(-3, 81, P_NICHELLE, P_RIGHT);
+	setPersonPos(11, 70, P_HOWARD, P_RIGHT);
+	setPersonPos(-3, 81, P_NICHELLE, P_RIGHT);
 	autoMove(2, P_CHEWY);
 }
 
@@ -129,7 +129,7 @@ int Room87::proc2(int16 txt_nr) {
 
 	if (diaNr) {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
-		start_aad_wait(diaNr, -1);
+		startAadWait(diaNr, -1);
 	} else {
 		autoMove(movNr, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
@@ -160,8 +160,8 @@ int Room87::proc4() {
 	flic_cut(FCUT_095);
 	flic_cut(FCUT_096);
 	_G(det)->hideStaticSpr(2);
-	_G(det)->start_detail(2, 255, false);
-	start_aad_wait(471, -1);
+	_G(det)->startDetail(2, 255, false);
+	startAadWait(471, -1);
 	flic_cut(FCUT_097);
 	flic_cut(FCUT_098);
 	flic_cut(FCUT_099);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 7e507aaa608..91fa5ad90a7 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -31,9 +31,9 @@ namespace Rooms {
 
 void Room88::entry() {
 	_G(spieler).scrollx = 0;
-	set_person_pos(163, 122, P_CHEWY, P_LEFT);
-	set_person_pos(59, 107, P_HOWARD, P_RIGHT);
-	set_person_pos(91, 110, P_NICHELLE, P_RIGHT);
+	setPersonPos(163, 122, P_CHEWY, P_LEFT);
+	setPersonPos(59, 107, P_HOWARD, P_RIGHT);
+	setPersonPos(91, 110, P_NICHELLE, P_RIGHT);
 	
 	_G(det)->showStaticSpr(1 + (_G(spieler).flags30_10 ? 1 : 0));
 	if (_G(spieler).r88DestRoom == 0)
@@ -42,7 +42,7 @@ void Room88::entry() {
 	_G(SetUpScreenFunc) = calc_person_look;
 
 	if (_G(spieler).flags32_10) {
-		_G(det)->start_detail(4, 255, false);
+		_G(det)->startDetail(4, 255, false);
 		_G(atds)->del_steuer_bit(505, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
@@ -77,7 +77,7 @@ int Room88::proc2() {
 	autoMove(1, P_CHEWY);
 	start_spz_wait(13, 1, false, P_CHEWY);
 	_G(det)->showStaticSpr(0);
-	start_detail_wait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_FRONT);
+	startSetailWait(0, 1, _G(spieler).flags30_10 ? ANI_GO : ANI_FRONT);
 	_G(det)->hideStaticSpr(1 + (_G(spieler).flags30_10 ? 1 : 0));
 	_G(spieler).flags31_10 = false;
 	_G(det)->showStaticSpr(1 + (!_G(spieler).flags30_10 ? 1 : 0));
@@ -98,7 +98,7 @@ int Room88::proc3() {
 	if (!_G(spieler).flags30_80 || _G(spieler).R88UsedMonkey) {
 		hideCur();
 		if (_G(spieler).flags32_10) {
-			start_aad_wait(480, -1);
+			startAadWait(480, -1);
 			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
@@ -108,17 +108,17 @@ int Room88::proc3() {
 			_G(spieler).flags32_40 = true;
 			switch_room(84);
 		} else {
-			start_aad_wait(465, -1);
+			startAadWait(465, -1);
 		}
 	} else {
-		start_aad_wait(466, -1);
+		startAadWait(466, -1);
 		start_spz_wait(13, 1, false, P_CHEWY);
 
 		const int aniNr = 1 + (_G(spieler).flags31_10 ? 1 : 0);
 
 		for (int i = 0; i < 3; ++i) {
-			start_detail_wait(aniNr, 1, ANI_FRONT);
-			start_detail_wait(aniNr, 1, ANI_GO);
+			startSetailWait(aniNr, 1, ANI_FRONT);
+			startSetailWait(aniNr, 1, ANI_GO);
 		}
 
 		_G(out)->setPointer(nullptr);
@@ -130,7 +130,7 @@ int Room88::proc3() {
 		_G(out)->raster_col(0, 0, 0, 0);
 		switch_room(80);
 		hideCur();
-		start_detail_wait(1, 1, ANI_FRONT);
+		startSetailWait(1, 1, ANI_FRONT);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 8eb6aad4fe6..71d81449523 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -48,8 +48,8 @@ void Room89::entry() {
 
 	if (_G(spieler).scrollx != 5000) {
 		_G(spieler).scrollx = 0;
-		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
-		set_person_pos(93, 98, P_CHEWY, P_RIGHT);
+		setPersonPos(116, 114, P_HOWARD, P_RIGHT);
+		setPersonPos(93, 98, P_CHEWY, P_RIGHT);
 	}
 
 	if (_G(spieler).flags35_2) {
@@ -58,7 +58,7 @@ void Room89::entry() {
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 537;
 		switch_room(92);
-		start_aad_wait(490, -1);
+		startAadWait(490, -1);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
@@ -74,9 +74,9 @@ void Room89::entry() {
 	} else if (_G(spieler).flags35_4) {
 		// End sequence
 		hideCur();
-		set_person_pos(138, 82, P_CHEWY, P_RIGHT);
-		set_person_pos(116, 114, P_HOWARD, P_RIGHT);
-		set_person_pos(260, 57, P_NICHELLE, P_LEFT);
+		setPersonPos(138, 82, P_CHEWY, P_RIGHT);
+		setPersonPos(116, 114, P_HOWARD, P_RIGHT);
+		setPersonPos(260, 57, P_NICHELLE, P_LEFT);
 		_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -176,7 +176,7 @@ int Room89::proc2() {
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 489;
 	switch_room(92);
-	start_aad_wait(490, -1);
+	startAadWait(490, -1);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
@@ -205,7 +205,7 @@ int Room89::proc4() {
 		_G(det)->hideStaticSpr(6);
 		new_invent_2_cur(111);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(491, -1);
+		startAadWait(491, -1);
 	} else {
 		_G(det)->showStaticSpr(5);
 		_G(det)->showStaticSpr(6);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 372fdd6fea3..87e11d1f059 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -48,13 +48,13 @@ void Room90::entry(int16 eib_nr) {
 		case 78:
 		case 136:
 			_G(spieler).scrollx = 0;
-			set_person_pos(32, 137, P_CHEWY, P_RIGHT);
-			set_person_pos(20, 121, P_HOWARD, P_RIGHT);
+			setPersonPos(32, 137, P_CHEWY, P_RIGHT);
+			setPersonPos(20, 121, P_HOWARD, P_RIGHT);
 			break;
 		case 137:
 			_G(spieler).scrollx = 176;
-			set_person_pos(411, 146, P_CHEWY, P_RIGHT);
-			set_person_pos(440, 132, P_HOWARD, P_RIGHT);
+			setPersonPos(411, 146, P_CHEWY, P_RIGHT);
+			setPersonPos(440, 132, P_HOWARD, P_RIGHT);
 			break;
 		default:
 			break;
@@ -66,7 +66,7 @@ void Room90::entry(int16 eib_nr) {
 
 	if (_G(spieler).flags34_40 && !_G(spieler).flags33_40) {
 		_G(det)->setSetailPos(12, 329, 15);
-		_G(det)->start_detail(12, 255, false);
+		_G(det)->startDetail(12, 255, false);
 		g_engine->_sound->playSound(12, 0);
 		g_engine->_sound->playSound(12);
 	}
@@ -78,26 +78,26 @@ void Room90::entry(int16 eib_nr) {
 
 	if (!_G(spieler).flags33_10) {
 		_G(flags).ZoomMov = false;
-		start_aad_wait(498, -1);
+		startAadWait(498, -1);
 		goAutoXy(-20, 121, P_HOWARD, ANI_GO);
 		autoMove(1, P_CHEWY);
-		start_detail_frame(2, 1, ANI_FRONT, 3);
-		_G(det)->start_detail(0, 1, false);
-		start_detail_wait(1, 1, ANI_FRONT);
+		startDetailFrame(2, 1, ANI_FRONT, 3);
+		_G(det)->startDetail(0, 1, false);
+		startSetailWait(1, 1, ANI_FRONT);
 		_G(spieler).flags33_10 = true;
 		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
 		switch_room(91);
 
 	} else if (!_G(spieler).flags33_20) {
-		start_aad_wait(499, -1);
+		startAadWait(499, -1);
 		_G(spieler).flags33_20 = true;
 
 	} else if (_G(spieler).flags34_20) {
-		set_person_pos(411, 146, P_CHEWY, P_RIGHT);
-		set_person_pos(440, 132, P_HOWARD, P_RIGHT);
+		setPersonPos(411, 146, P_CHEWY, P_RIGHT);
+		setPersonPos(440, 132, P_HOWARD, P_RIGHT);
 		_G(spieler).scrollx = 176;
 		_G(spieler).flags34_20 = false;
-		start_aad_wait(520, -1);
+		startAadWait(520, -1);
 	}
 
 	_G(HowardMov) = 0;
@@ -153,7 +153,7 @@ void Room90::setup_func() {
 				_G(det)->setSetailPos(i + 4, destX, _G(Adi)[i + 4].y);
 				
 				if (!_G(spieler).flags34_40)
-					_G(det)->start_detail(i + 4, 255, false);
+					_G(det)->startDetail(i + 4, 255, false);
 			}
 		}
 	}
@@ -217,7 +217,7 @@ void Room90::proc2() {
 	}
 
 	if (diaNr != -1) {
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		if (_G(spieler).ChewyAni == CHEWY_ANI7) {
 			start_spz_wait(66, 1, false, P_CHEWY);
 			start_spz(67, 255, false, P_CHEWY);
@@ -227,7 +227,7 @@ void Room90::proc2() {
 		}
 
 		hideCur();
-		start_aad_wait(-1, diaNr);
+		startAadWait(-1, diaNr);
 		showCur();
 	}
 	_G(flags).AutoAniPlay = false;
@@ -239,25 +239,25 @@ int Room90::getHubcaps() {
 
 	hideCur();
 	autoMove(3, P_CHEWY);
-	start_aad_wait(515, -1);
+	startAadWait(515, -1);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	start_spz_wait(43, 1, false, P_CHEWY);
 	load_chewy_taf(CHEWY_ANI7);
 
 	while (_G(spieler_vector)[P_HOWARD].Xypos[0] != 176) {
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
 
 	start_spz_wait(47, 1, false, P_HOWARD);
 	_G(spieler).mi[1] = 2;
-	start_aad_wait(516, -1);
+	startAadWait(516, -1);
 	_G(spieler).flags34_40 = true;
 	_G(spieler).flags35_1 = true;
 	autoMove(4, P_CHEWY);
 	auto_scroll(176, 0);
 	_G(det)->setSetailPos(12, 495, 15);
-	_G(det)->start_detail(12, 255, false);
+	_G(det)->startDetail(12, 255, false);
 	g_engine->_sound->playSound(12, 0);
 	g_engine->_sound->playSound(12);
 
@@ -266,11 +266,11 @@ int Room90::getHubcaps() {
 	while (destX > 329) {
 		destX -= 2;
 		_G(det)->setSetailPos(12, destX, 15);
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
 
-	start_aad_wait(517, -1);
+	startAadWait(517, -1);
 	_G(spieler).flags35_1 = false;
 	_G(atds)->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATA);
@@ -292,15 +292,15 @@ int Room90::shootControlUnit() {
 	goAutoXy(232, 142, P_CHEWY, ANI_WAIT);
 	_G(flags).NoScroll = true;
 	auto_scroll(176, 0);
-	start_detail_wait(13, 1, ANI_FRONT);
+	startSetailWait(13, 1, ANI_FRONT);
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_107);
 	_G(spieler).scrollx = 0;
-	set_person_pos(76, 145, P_CHEWY, P_LEFT);
+	setPersonPos(76, 145, P_CHEWY, P_LEFT);
 	_G(maus_links_click) = false;
 	_G(det)->showStaticSpr(4);
 	_G(det)->showStaticSpr(5);
-	set_up_screen(NO_SETUP);
+	setupScreen(NO_SETUP);
 	_G(fx_blend) = BLEND3;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(flags).NoScroll = false;
@@ -339,7 +339,7 @@ int Room90::useSurimyOnWreck() {
 	_G(det)->hideStaticSpr(5);
 	_G(spieler).scrollx = 176;
 	start_spz(45, 255, false, P_CHEWY);
-	start_aad_wait(519, -1);
+	startAadWait(519, -1);
 	_G(atds)->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATA);
 
 	showCur();
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 8bfdddfa8c7..50a0a430db2 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -47,28 +47,28 @@ void Room91::entry() {
 	hideCur();
 
 	if (_G(spieler).flags34_1) {
-		set_person_pos(499, 106, P_CHEWY, P_RIGHT);
-		set_person_pos(536, 90, P_HOWARD, P_RIGHT);
+		setPersonPos(499, 106, P_CHEWY, P_RIGHT);
+		setPersonPos(536, 90, P_HOWARD, P_RIGHT);
 		if (!_G(spieler).flags34_2) {
 			_G(spieler).flags34_2 = true;
-			start_aad_wait(503, -1);
+			startAadWait(503, -1);
 		}
 	} else {
 		_G(flags).MainInput = false;
 		_G(flags).NoScroll = true;
 		_G(spieler).flags34_1 = true;
-		set_person_pos(326, 99, P_CHEWY, P_RIGHT);
-		set_person_pos(312, 75, P_HOWARD, P_RIGHT);
+		setPersonPos(326, 99, P_CHEWY, P_RIGHT);
+		setPersonPos(312, 75, P_HOWARD, P_RIGHT);
 		_G(spieler).SVal3 = 0;
 		_G(spieler).flags34_4 = true;
-		start_aad_wait(502, -1);
+		startAadWait(502, -1);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(det)->start_detail(0, 255, false);
+		_G(det)->startDetail(0, 255, false);
 
 		for (int i = 0; i < 3; ++i) {
 			_G(timer_nr)[i] = _G(room)->set_timer(5 + i, 3 + (2 * i));
 		}
-		_G(det)->start_detail(5, 2, false);
+		_G(det)->startDetail(5, 2, false);
 	}
 
 	showCur();
@@ -115,11 +115,11 @@ void Room91::setup_func() {
 		const int aniNr = 1 + (_G(minfo).y <= 100 ? 1 : 0);
 		hideCur();
 		_G(det)->stop_detail(0);
-		start_detail_wait(aniNr, 1, ANI_FRONT);
+		startSetailWait(aniNr, 1, ANI_FRONT);
 		_click = oldClick;
-		_G(det)->start_detail(0, 255, false);
-		_G(det)->start_detail(aniNr + 2, 1, false);
-		_G(det)->start_detail(7, 1, false);
+		_G(det)->startDetail(0, 255, false);
+		_G(det)->startDetail(aniNr + 2, 1, false);
+		_G(det)->startDetail(7, 1, false);
 		start_spz_wait(62, 1, false, P_HOWARD);
 		_G(spieler).SVal3 += 1;
 		showCur();
@@ -129,9 +129,9 @@ void Room91::setup_func() {
 			hideCur();
 			autoMove(1, P_CHEWY);
 			stop_spz();
-			start_aad_wait(505, -1);
+			startAadWait(505, -1);
 			_G(spieler).PersonHide[P_HOWARD] = true;
-			start_detail_wait(9, 1, ANI_FRONT);
+			startSetailWait(9, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_HOWARD] = false;
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 			_G(spieler).flags34_4 = false;
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 8cc707eed92..4aadbaa685e 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -34,7 +34,7 @@ void Room92::entry() {
 	cur_2_inventory();
 	hideCur();
 	hide_person();
-	start_aad_wait(_G(spieler).SVal2, -1);
+	startAadWait(_G(spieler).SVal2, -1);
 	switch (_G(spieler).SVal2) {
 	case 487:
 		_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index ec0d8b1f83b..bc11bc906e1 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -34,29 +34,29 @@ void Room93::entry() {
 
 	_G(spieler).scrollx = 0;
 	hide_person();
-	start_detail_wait(3, 0, ANI_GO);
+	startSetailWait(3, 0, ANI_GO);
 	_G(det)->set_static_ani(0, -1);
-	start_aad_wait(616, -1);
+	startAadWait(616, -1);
 	_G(det)->del_static_ani(0);
-	start_detail_wait(3, 1, ANI_FRONT);
+	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
 	start_ads_wait(27);
 
 	if (!_G(spieler).flags37_40) {
 		_G(det)->del_static_ani(1);
 		hideCur();
-		start_detail_wait(3, 1, ANI_GO);
+		startSetailWait(3, 1, ANI_GO);
 		_G(det)->set_static_ani(0, -1);
-		start_aad_wait(549, -1);
+		startAadWait(549, -1);
 		_G(det)->del_static_ani(0);
-		start_detail_wait(3, 1, ANI_FRONT);
-		start_detail_wait(6, 1, ANI_FRONT);
+		startSetailWait(3, 1, ANI_FRONT);
+		startSetailWait(6, 1, ANI_FRONT);
 		_G(det)->set_static_ani(7, -1);
-		start_aad_wait(550, -1);
+		startAadWait(550, -1);
 		_G(det)->del_static_ani(7);
-		start_detail_wait(6, 1, ANI_GO);
-		start_detail_wait(2, 1, ANI_FRONT);
-		set_up_screen(DO_SETUP);
+		startSetailWait(6, 1, ANI_GO);
+		startSetailWait(2, 1, ANI_FRONT);
+		setupScreen(DO_SETUP);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 00cb1981813..e582f31dbf0 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -52,8 +52,8 @@ void Room94::entry() {
 		_G(zoom_horizont) = 140;
 		_G(spieler).flags35_8 = false;
 		_G(spieler).scrollx = 0;
-		set_person_pos(156, 149, P_CHEWY, P_RIGHT);
-		set_person_pos(153, 122, P_HOWARD, P_RIGHT);
+		setPersonPos(156, 149, P_CHEWY, P_RIGHT);
+		setPersonPos(153, 122, P_HOWARD, P_RIGHT);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_120);
@@ -67,8 +67,8 @@ void Room94::entry() {
 
 	if (_G(spieler).flags35_40) {
 		// Ghost shooting dolls during initial arrival
-		set_person_pos(373, 122, P_CHEWY, P_LEFT);
-		set_person_pos(393, 94, P_HOWARD, P_LEFT);
+		setPersonPos(373, 122, P_CHEWY, P_LEFT);
+		setPersonPos(393, 94, P_HOWARD, P_LEFT);
 		_G(spieler).flags35_40 = false;
 		_G(spieler).scrollx = 150;
 
@@ -90,7 +90,7 @@ void Room94::entry() {
 		// Normal scene entry after having dealt with Ghost
 		hideCur();
 		_G(spieler).scrollx = 120;
-		set_person_pos(255, 86, P_HOWARD, P_LEFT);
+		setPersonPos(255, 86, P_HOWARD, P_LEFT);
 		autoMove(3, P_CHEWY);
 		showCur();
 	}
@@ -142,20 +142,20 @@ int Room94::giveGhostBottle() {
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_062);
 	_G(fx_blend) = BLEND3;
-	_G(det)->start_detail(5, 255, false);
-	start_aad_wait(541, -1);
+	_G(det)->startDetail(5, 255, false);
+	startAadWait(541, -1);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(5);
 	Room66::proc8(3, 3, 2, 617);
 	hideCur();
 	_G(det)->hideStaticSpr(5);
-	_G(det)->start_detail(5, 255, false);
-	start_aad_wait(622, -1);
+	_G(det)->startDetail(5, 255, false);
+	startAadWait(622, -1);
 	_G(det)->stop_detail(5);
-	_G(det)->start_detail(6, 1, false);	
+	_G(det)->startDetail(6, 1, false);	
 	_G(room)->set_timer_status(3, TIMER_STOP);
 	_G(det)->del_static_ani(3);
-	start_detail_wait(4, 1, ANI_FRONT);
+	startSetailWait(4, 1, ANI_FRONT);
 	_G(spieler).flags35_10 = true;
 	_G(spieler).room_e_obj[138].Attribut = AUSGANG_OBEN;
 	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 39de4dd09d3..ff2df698404 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -46,10 +46,10 @@ void Room95::entry(int16 eib_nr) {
 
 	hideCur();
 	if (eib_nr == 138) {
-		set_person_pos(-20, 120, P_HOWARD, ANI_GO);
+		setPersonPos(-20, 120, P_HOWARD, ANI_GO);
 		autoMove(2, P_CHEWY);
 	} else {
-		set_person_pos(473, 83, P_HOWARD, P_RIGHT);
+		setPersonPos(473, 83, P_HOWARD, P_RIGHT);
 	}
 
 	showCur();
@@ -116,7 +116,7 @@ int Room95::proc2() {
 		switch_room(97);
 	} else {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
-		start_aad_wait(548, -1);
+		startAadWait(548, -1);
 	}
 
 	showCur();
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index f9e53bb588d..be49c03a1b0 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -43,8 +43,8 @@ void Room96::entry() {
 		return;
 
 	hideCur();
-	set_person_pos(93, 62, P_HOWARD, P_RIGHT);
-	set_person_pos(116, 74, P_CHEWY, P_RIGHT);
+	setPersonPos(93, 62, P_HOWARD, P_RIGHT);
+	setPersonPos(116, 74, P_CHEWY, P_RIGHT);
 	autoMove(1, P_CHEWY);
 	showCur();
 }
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index e4868c1eeb6..2e9604e910d 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -65,14 +65,14 @@ void Room97::entry() {
 	}
 	
 	if (_G(spieler).flags36_10) {
-		_G(det)->start_detail(11, 255, ANI_FRONT);
+		_G(det)->startDetail(11, 255, ANI_FRONT);
 		_G(det)->stop_detail(5);
-		_G(det)->start_detail(6, 255, ANI_FRONT);
-		_G(det)->start_detail(12, 255, ANI_FRONT);
+		_G(det)->startDetail(6, 255, ANI_FRONT);
+		_G(det)->startDetail(12, 255, ANI_FRONT);
 	}
 
 	if (_G(spieler).flags36_40) {
-		_G(det)->start_detail(14, 255, ANI_FRONT);
+		_G(det)->startDetail(14, 255, ANI_FRONT);
 		_G(det)->showStaticSpr(13);
 		_G(atds)->del_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
@@ -83,7 +83,7 @@ void Room97::entry() {
 		_G(det)->setSetailPos(27, 272, 110);
 		for (int i = 0; i < 2; ++i) {
 			_G(det)->stop_detail(23 + i);
-			_G(det)->start_detail(27 + i, 255, ANI_FRONT);
+			_G(det)->startDetail(27 + i, 255, ANI_FRONT);
 		}
 		g_engine->_sound->stopSound(0);
 		g_engine->_sound->stopSound(0);
@@ -113,15 +113,15 @@ void Room97::entry() {
 		_G(spieler).SVal2 = 0;
 		_G(spieler).flags35_4 = true;
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(19, 1, ANI_FRONT);
+		startSetailWait(19, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		showCur();
 		switch_room(89);
 	} else {
 		_G(spieler).scrollx = 800;
-		set_person_pos(1067, 98, P_CHEWY, P_LEFT);
-		set_person_pos(1092, 83, P_HOWARD, P_LEFT);
-		set_person_pos(130, 29, P_NICHELLE, P_RIGHT);
+		setPersonPos(1067, 98, P_CHEWY, P_LEFT);
+		setPersonPos(1092, 83, P_HOWARD, P_LEFT);
+		setPersonPos(130, 29, P_NICHELLE, P_RIGHT);
 	}
 }
 
@@ -164,7 +164,7 @@ void Room97::setup_func() {
 	_G(spieler_mi)[P_NICHELLE].Vorschub = 4;
 
 	if (_G(spieler).flags35_80 && _G(spieler_vector)->Xypos[P_CHEWY] > 830)
-		set_person_pos(830, 98, P_CHEWY, P_RIGHT);
+		setPersonPos(830, 98, P_CHEWY, P_RIGHT);
 
 	if (_word18DB2E)
 		--_word18DB2E;
@@ -261,7 +261,7 @@ void Room97::proc2() {
 		return;
 
 	_G(flags).AutoAniPlay = true;
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	hideCur();
 	_G(Sdi)[6].z_ebene = 6;
 	_G(Sdi)[24].z_ebene = 6;
@@ -285,16 +285,16 @@ void Room97::proc3() {
 
 	_G(flags).AutoAniPlay = true;
 	hideCur();
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(557, -1);
+		startAadWait(557, -1);
 		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else if (!_G(spieler).flags36_40) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(568, -1);
+		startAadWait(568, -1);
 		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
@@ -317,7 +317,7 @@ void Room97::proc3() {
 		if (!_G(spieler).flags36_80) {
 			goAutoXy(442, 35, P_HOWARD, ANI_WAIT);
 			goAutoXy(497, 31, P_HOWARD, ANI_WAIT);
-			start_aad_wait(562, -1);
+			startAadWait(562, -1);
 		}
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(Sdi)[6].z_ebene = 166;
@@ -336,14 +336,14 @@ void Room97::proc4() {
 		_G(flags).AutoAniPlay = true;
 		hideCur();
 		_G(spieler_mi)[P_CHEWY].Mode = true;
-		stop_person(P_CHEWY);
+		stopPerson(P_CHEWY);
 		g_engine->_sound->playSound(9, 0);
 		g_engine->_sound->stopSound(1);
-		start_detail_wait(9, 1, ANI_FRONT);
+		startSetailWait(9, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(21);
 
 		while (_G(spieler_vector)[P_HOWARD].Xypos[0] > 996) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
@@ -357,11 +357,11 @@ void Room97::proc4() {
 		goAutoXy(995, 77, P_HOWARD, ANI_WAIT);
 		goAutoXy(1047, 87, P_HOWARD, ANI_WAIT);
 
-		start_detail_wait(29, 1, ANI_FRONT);
+		startSetailWait(29, 1, ANI_FRONT);
 		_G(det)->hideStaticSpr(21);
 		g_engine->_sound->playSound(9, 1);
 		g_engine->_sound->stopSound(0);
-		start_detail_wait(9, 0, ANI_BACK);
+		startSetailWait(9, 0, ANI_BACK);
 
 		goAutoXy(1008, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(967, 111, P_CHEWY, ANI_WAIT);
@@ -369,7 +369,7 @@ void Room97::proc4() {
 		_G(det)->hideStaticSpr(2);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(553, -1);
+		startAadWait(553, -1);
 		_G(HowardMov) = 0;
 		showCur();
 	}
@@ -386,7 +386,7 @@ int Room97::proc5() {
 	auto_scroll(800, 0);
 	
 	while (_G(spieler_vector)[P_HOWARD].Xypos[0] < 1080) {
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN0;
 	}
 
@@ -396,16 +396,16 @@ int Room97::proc5() {
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
 	_G(spieler).scrollx = 720;
-	set_person_pos(822, 98, P_CHEWY, P_LEFT);
-	set_person_pos(861, 81, P_HOWARD, P_LEFT);
+	setPersonPos(822, 98, P_CHEWY, P_LEFT);
+	setPersonPos(861, 81, P_HOWARD, P_LEFT);
 	del_inventar(_G(spieler).AkInvent);
 	_G(det)->showStaticSpr(21);
 	_G(spieler).flags35_80 = true;
-	start_aad_wait(546, -1);
+	startAadWait(546, -1);
 	_G(det)->hideStaticSpr(21);
 	g_engine->_sound->playSound(9, 1);
 	g_engine->_sound->stopSound(0);
-	start_detail_wait(9, 0, ANI_GO);
+	startSetailWait(9, 0, ANI_GO);
 	
 	showCur();
 	return 1;
@@ -419,17 +419,17 @@ int Room97::proc6() {
 	autoMove(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(298, 120, P_CHEWY, ANI_WAIT);
-	set_person_spr(P_LEFT, P_CHEWY);
+	setPersonSpr(P_LEFT, P_CHEWY);
 	start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 	_G(det)->hideStaticSpr(15);
-	start_detail_wait(1, 1, ANI_FRONT);
+	startSetailWait(1, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(28);
 	autoMove(1, P_CHEWY);
 	_G(det)->hideStaticSpr(18);
-	start_detail_wait(15, 1, ANI_FRONT);
+	startSetailWait(15, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(17);
 	start_spz(CH_TALK5, 255, false, P_CHEWY);
-	start_aad_wait(558, -1);
+	startAadWait(558, -1);
 	_G(det)->hideStaticSpr(28);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(15);
@@ -454,12 +454,12 @@ int Room97::proc7() {
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->hideStaticSpr(17);
-	start_detail_wait(22, 1, ANI_FRONT);
+	startSetailWait(22, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->set_ats_str(530, 2, ATS_DATA);
 	new_invent_2_cur(SLIME_INV);
 	_G(spieler).flags36_4 = true;
-	set_person_pos(304, 102, P_CHEWY, P_RIGHT);
+	setPersonPos(304, 102, P_CHEWY, P_RIGHT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	autoMove(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
@@ -481,45 +481,45 @@ int Room97::proc8() {
 		diaNr = 560;
 	else {
 		start_spz_wait(14, 1, false, P_CHEWY);
-		_G(det)->start_detail(11, 255, false);
+		_G(det)->startDetail(11, 255, false);
 		del_inventar(_G(spieler).AkInvent);
 		_G(spieler).flags36_10 = true;
 		_G(spieler).flags36_8 = false;
-		_G(det)->start_detail(12, 255, false);
+		_G(det)->startDetail(12, 255, false);
 		_G(atds)->set_ats_str(530, 3, ATS_DATA);
 		_G(atds)->del_steuer_bit(532, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(532, 1, ATS_DATA);
-		_G(det)->start_detail(6, 255, false);
+		_G(det)->startDetail(6, 255, false);
 		_G(det)->hideStaticSpr(14);
 		autoMove(3, P_CHEWY);
 		auto_scroll(406, 0);
-		wait_show_screen(40);
+		waitShowScreen(40);
 		_G(det)->stop_detail(24);
 		g_engine->_sound->playSound(26, 0);
 		g_engine->_sound->playSound(26);
-		start_detail_wait(25, 1, ANI_FRONT);
-		_G(det)->start_detail(26, 255, false);
+		startSetailWait(25, 1, ANI_FRONT);
+		_G(det)->startDetail(26, 255, false);
 		_G(det)->stop_detail(23);
-		_G(det)->start_detail(27, 255, false);
-		wait_show_screen(80);
+		_G(det)->startDetail(27, 255, false);
+		waitShowScreen(80);
 		autoMove(4, P_CHEWY);
 		auto_scroll(646, 0);
-		start_aad_wait(566, -1);
-		wait_show_screen(60);
-		start_aad_wait(567, -1);
+		startAadWait(566, -1);
+		waitShowScreen(60);
+		startAadWait(567, -1);
 		_G(det)->stop_detail(26);
 		_G(det)->stop_detail(27);
 		_G(spieler).flags36_20 = true;
-		_G(det)->start_detail(28, 255, false);
+		_G(det)->startDetail(28, 255, false);
 		_G(det)->setSetailPos(27, 272, 110);
-		_G(det)->start_detail(27, 255, false);
+		_G(det)->startDetail(27, 255, false);
 		_G(atds)->set_steuer_bit(533, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(534, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
 	if (diaNr != -1) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(diaNr, -1);
+		startAadWait(diaNr, -1);
 	}
 
 	showCur();
@@ -535,14 +535,14 @@ int Room97::proc9() {
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(556, -1);
+		startAadWait(556, -1);
 	} else {
 		start_spz_wait(13, 1, false, P_CHEWY);
-		start_detail_wait(0, 1, ANI_FRONT);
+		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(13);
-		start_detail_wait(13, 1, ANI_FRONT);
-		_G(det)->start_detail(14, 255, false);
-		start_aad_wait(555, -1);
+		startSetailWait(13, 1, ANI_FRONT);
+		_G(det)->startDetail(14, 255, false);
+		startAadWait(555, -1);
 		_G(spieler).flags36_40 = true;
 		_G(atds)->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATA);
@@ -563,7 +563,7 @@ int Room97::proc10() {
 	start_spz_wait(13, 1, false, P_CHEWY);
 	g_engine->_sound->playSound(7, 0);
 	g_engine->_sound->stopSound(1);
-	start_detail_wait(7, 1, ANI_FRONT);
+	startSetailWait(7, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(19);
 	_G(spieler).flags37_1 = true;
 	_G(atds)->set_steuer_bit(543, ATS_AKTIV_BIT, ATS_DATA);
@@ -582,21 +582,21 @@ int Room97::proc11() {
 
 	if (!_G(spieler).flags37_2) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		start_aad_wait(569, -1);
+		startAadWait(569, -1);
 	} else {
 		autoMove(9, P_CHEWY);
-		start_aad_wait(570, -1);
+		startAadWait(570, -1);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		autoMove(7, P_CHEWY);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(571, -1);
+		startAadWait(571, -1);
 		g_engine->_sound->playSound(4, 0);
 		g_engine->_sound->playSound(4);
-		_G(det)->start_detail(4, 1, false);
+		_G(det)->startDetail(4, 1, false);
 		autoMove(12, P_CHEWY);
 		start_spz_wait(64, 1, false, P_CHEWY);
 		start_spz(65, 255, false, P_CHEWY);
-		start_aad_wait(561, -1);
+		startAadWait(561, -1);
 		_G(spieler).SVal1 = 97;
 		_G(spieler).SVal2 = 523;
 		cur_2_inventory();
@@ -611,8 +611,8 @@ int Room97::proc11() {
 
 void Room97::proc12() {
 	if (!_G(spieler).flags37_1) {
-		stop_person(P_CHEWY);
-		set_person_pos(491, 42, P_CHEWY, P_RIGHT);
+		stopPerson(P_CHEWY);
+		setPersonPos(491, 42, P_CHEWY, P_RIGHT);
 		return;
 	}
 
@@ -621,13 +621,13 @@ void Room97::proc12() {
 
 	_G(flags).AutoAniPlay = true;
 	hideCur();
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(det)->showStaticSpr(26);
 	goAutoXy(481, 39, P_CHEWY, ANI_WAIT);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	set_person_pos(327, 42, P_CHEWY, P_LEFT);
-	wait_show_screen(50);
-	set_person_pos(347, 42, P_CHEWY, P_LEFT);
+	setPersonPos(327, 42, P_CHEWY, P_LEFT);
+	waitShowScreen(50);
+	setPersonPos(347, 42, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(det)->hideStaticSpr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
@@ -641,13 +641,13 @@ void Room97::proc13() {
 
 	_G(flags).AutoAniPlay = true;
 	hideCur();
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(det)->showStaticSpr(26);
 	_G(spieler).PersonHide[P_CHEWY] = true;
-	set_person_pos(508, 41, P_CHEWY, P_LEFT);
-	wait_show_screen(50);
-	set_person_pos(488, 41, P_CHEWY, P_LEFT);
+	setPersonPos(508, 41, P_CHEWY, P_LEFT);
+	waitShowScreen(50);
+	setPersonPos(488, 41, P_CHEWY, P_LEFT);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	autoMove(6, P_CHEWY);
 	_G(det)->hideStaticSpr(26);
@@ -674,13 +674,13 @@ void Room97::sensorAnim() {
 		return;
 
 	_G(flags).AutoAniPlay = true;
-	stop_person(P_CHEWY);
+	stopPerson(P_CHEWY);
 	_G(menu_item) = CUR_USE;
 	cursorChoice(CUR_USE);
-	set_person_pos(294, 42, P_CHEWY, P_LEFT);
+	setPersonPos(294, 42, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(541, ATS_AKTIV_BIT, ATS_DATA);
 	_slimeThrown = false;
-	_G(det)->start_detail(16, 1, 0);
+	_G(det)->startDetail(16, 1, 0);
 	
 	while (_G(det)->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
@@ -689,35 +689,35 @@ void Room97::sensorAnim() {
 				_G(maus_links_click) = true;
 		}
 
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
 
 	hideCur();
 	if (!_slimeThrown) {
-		start_detail_wait(17, 1, ANI_FRONT);
-		_G(det)->start_detail(16, 1, true);
+		startSetailWait(17, 1, ANI_FRONT);
+		_G(det)->startDetail(16, 1, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(20, 1, false);
-		set_person_pos(318, 42, P_CHEWY, P_LEFT);
+		startSetailWait(20, 1, false);
+		setPersonPos(318, 42, P_CHEWY, P_LEFT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
 		_G(spieler).flags37_4 = true;
 		del_inventar(_G(spieler).AkInvent);
 		_G(det)->showStaticSpr(27);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		start_detail_wait(21, 1, ANI_FRONT);
+		startSetailWait(21, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(det)->hideStaticSpr(27);
-		start_detail_wait(18, 1, ANI_FRONT);
+		startSetailWait(18, 1, ANI_FRONT);
 
 		g_engine->_sound->playSound(8, 0);
 		g_engine->_sound->stopSound(1);
-		start_detail_wait(8, 1, ANI_FRONT);
+		startSetailWait(8, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(20);
 		autoMove(10, P_CHEWY);
 		auto_scroll(60, 0);
-		start_aad_wait(544, -1);
+		startAadWait(544, -1);
 		_bool18DB32 = true;
 		autoMove(11, P_CHEWY);
 		_bool18DB32 = false;
@@ -727,12 +727,12 @@ void Room97::sensorAnim() {
 		autoMove(7, P_CHEWY);
 
 		while (_G(spieler).scrollx < 368) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
 
 		_G(det)->showStaticSpr(26);
-		set_person_pos(482, 24, P_NICHELLE, P_RIGHT);
+		setPersonPos(482, 24, P_NICHELLE, P_RIGHT);
 		goAutoXy(477, 29, P_NICHELLE, ANI_WAIT);
 		_G(det)->hideStaticSpr(26);
 		_G(spieler).flags37_2 = true;
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 6c4cdc6aa92..0bf762c5017 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -172,7 +172,7 @@ void Sound::playSpeech(int num, bool waitForFinish) {
 	if (waitForFinish) {
 		// Wait for speech to finish
 		while (isSpeechActive() && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 	}
 }
@@ -275,7 +275,7 @@ void Sound::convertTMFToMod(uint8 *tmfData, uint32 tmfSize, uint8 *modData, uint
 void Sound::waitForSpeechToFinish() {
 	if (_G(spieler).SpeechSwitch) {
 		while (g_engine->_sound->isSpeechActive() && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 	}
 }
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 9b38c939bff..bd9d1faf8d1 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -28,7 +28,7 @@ namespace Chewy {
 
 #define ZOBJ_ANI_DETAIL 1
 #define ZOBJ_STATIC_DETAIL 2
-#define ZOBJ_INVENTAR 3
+#define ZOBJ_INVENTORY 3
 #define ZOBJ_AUTO_OBJ 4
 #define ZOBJ_PROGANI 5
 #define ZOBJ_CHEWY 6
@@ -108,9 +108,8 @@ static const int16 SPZ_ANI_PH[][2] = {
 };
 
 
-void sprite_engine() {
+void spriteEngine() {
 	int16 min_zeiger = 0;
-	int16 spr_nr;
 	int16 x, y;
 	ObjMov detmov;
 	TafSeqInfo *ts_info;
@@ -145,7 +144,7 @@ void sprite_engine() {
 			_G(det)->plot_static_details(_G(spieler).scrollx, _G(spieler).scrolly, nr, nr);
 			break;
 
-		case ZOBJ_INVENTAR:
+		case ZOBJ_INVENTORY:
 			_G(out)->sprite_set(_G(inv_spr)[nr],
 			                 _G(spieler).room_m_obj[nr].X - _G(spieler).scrollx,
 			                 _G(spieler).room_m_obj[nr].Y - _G(spieler).scrolly, 0);
@@ -154,28 +153,28 @@ void sprite_engine() {
 		case ZOBJ_CHEWY:
 			if (!_G(spieler).PersonHide[P_CHEWY]) {
 				if (!_G(spz_ani)[P_CHEWY]) {
-					spr_nr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
-					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[spr_nr * 2] - _G(spieler).scrollx;
-					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
+					int16 sprNr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[sprNr * 2] - _G(spieler).scrollx;
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[sprNr * 2 + 1] - _G(spieler).scrolly;
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor,
 					          (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y,
+					_G(out)->scale_set(_G(chewy)->image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
 				} else {
-					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[P_CHEWY].PhNr];
-					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->_correction[spr_nr * 2] -
+					int16 sprNr = _G(spz_spr_nr)[_G(spieler_vector)[P_CHEWY].PhNr];
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->_correction[sprNr * 2] -
 					    _G(spieler).scrollx;
-					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->_correction[spr_nr * 2 + 1] -
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->_correction[sprNr * 2 + 1] -
 					    _G(spieler).scrolly;
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1],
 					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(spz_tinfo)->image[spr_nr], x, y,
+					_G(out)->scale_set(_G(spz_tinfo)->image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
@@ -185,20 +184,21 @@ void sprite_engine() {
 
 		case ZOBJ_HOWARD:
 		case ZOBJ_NICHELLE: {
-			int16 p_nr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
-			if (!_G(spieler).PersonHide[p_nr]) {
-				if (!_G(spz_ani)[p_nr]) {
-					ts_info = _G(PersonTaf)[p_nr];
-					spr_nr = _G(PersonSpr)[p_nr][_G(spieler_vector)[p_nr].PhNr];
+			int16 personNr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
+			if (!_G(spieler).PersonHide[personNr]) {
+				int16 sprNr;
+				if (!_G(spz_ani)[personNr]) {
+					ts_info = _G(PersonTaf)[personNr];
+					sprNr = _G(PersonSpr)[personNr][_G(spieler_vector)[personNr].PhNr];
 				} else {
 					ts_info = _G(spz_tinfo);
-					spr_nr = _G(spz_spr_nr)[_G(spieler_vector)[p_nr].PhNr];
+					sprNr = _G(spz_spr_nr)[_G(spieler_vector)[personNr].PhNr];
 				}
 
-				x = _G(spieler_mi)[p_nr].XyzStart[0] + ts_info->_correction[spr_nr * 2] - _G(spieler).scrollx;
-				y = _G(spieler_mi)[p_nr].XyzStart[1] + ts_info->_correction[spr_nr * 2 + 1] - _G(spieler).scrolly;
-				calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1], _G(spieler).ZoomXy[p_nr][0],_G(spieler).ZoomXy[p_nr][1], &_G(spieler_vector)[p_nr]);
-				_G(out)->scale_set(ts_info->image[spr_nr], x, y, _G(spieler_vector)[p_nr].Xzoom, _G(spieler_vector)[p_nr].Yzoom, _G(scr_width));
+				x = _G(spieler_mi)[personNr].XyzStart[0] + ts_info->_correction[sprNr * 2] - _G(spieler).scrollx;
+				y = _G(spieler_mi)[personNr].XyzStart[1] + ts_info->_correction[sprNr * 2 + 1] - _G(spieler).scrolly;
+				calc_zoom(_G(spieler_mi)[personNr].XyzStart[1], _G(spieler).ZoomXy[personNr][0],_G(spieler).ZoomXy[personNr][1], &_G(spieler_vector)[personNr]);
+				_G(out)->scale_set(ts_info->image[sprNr], x, y, _G(spieler_vector)[personNr].Xzoom, _G(spieler_vector)[personNr].Yzoom, _G(scr_width));
 			}
 			}
 			break;
@@ -207,14 +207,14 @@ void sprite_engine() {
 			break;
 
 		case ZOBJ_AUTO_OBJ: {
-			spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
+			int16 sprNr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
 			         _G(auto_mov_vector)[nr].PhNr;
-			int16 *cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
+			int16 *cxy = _G(room_blk).DetKorrekt + (sprNr << 1);
 			calc_zoom(_G(auto_mov_vector)[nr].Xypos[1],
 			          _G(mov_phasen)[nr].ZoomFak,
 			          _G(mov_phasen)[nr].ZoomFak,
 			          &_G(auto_mov_vector)[nr]);
-			_G(out)->scale_set(_G(room_blk).DetImage[spr_nr],
+			_G(out)->scale_set(_G(room_blk).DetImage[sprNr],
 			                _G(auto_mov_vector)[nr].Xypos[0] + cxy[0] - _G(spieler).scrollx,
 			                _G(auto_mov_vector)[nr].Xypos[1] + cxy[1] - _G(spieler).scrolly,
 			                _G(auto_mov_vector)[nr].Xzoom,
@@ -230,10 +230,9 @@ void sprite_engine() {
 }
 
 void calc_z_ebene() {
-	int16 i;
 	_G(z_count) = 0;
 
-	for (i = 0; i < MAX_PERSON; i++) {
+	for (int16 i = 0; i < MAX_PERSON; i++) {
 		if (_G(spieler).PersonRoomNr[P_CHEWY + i] == _G(spieler).PersonRoomNr[P_CHEWY] &&
 		        _G(spieler_mi)[P_CHEWY + i].Id != NO_MOV_OBJ) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_CHEWY + i;
@@ -244,7 +243,7 @@ void calc_z_ebene() {
 		}
 	}
 
-	for (i = 0; i < MAXDETAILS; i++) {
+	for (int16 i = 0; i < MAXDETAILS; i++) {
 		if (_G(Sdi)[i].SprNr != -1) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_STATIC_DETAIL;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
@@ -259,17 +258,17 @@ void calc_z_ebene() {
 		}
 	}
 
-	for (i = 0; i < _G(obj)->mov_obj_room[0]; i++) {
+	for (int16 i = 0; i < _G(obj)->mov_obj_room[0]; i++) {
 
 		if (_G(spieler).room_m_obj[_G(obj)->mov_obj_room[i + 1]].ZEbene < 2000) {
-			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_INVENTAR;
+			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_INVENTORY;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = _G(obj)->mov_obj_room[i + 1];
 			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spieler).room_m_obj[_G(obj)->mov_obj_room[i + 1]].ZEbene;
 			++_G(z_count);
 		}
 	}
 
-	for (i = 0; i < MAX_PROG_ANI; i++) {
+	for (int16 i = 0; i < MAX_PROG_ANI; i++) {
 		if (_G(spr_info)[i].ZEbene < 200) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_PROGANI;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
@@ -278,7 +277,7 @@ void calc_z_ebene() {
 		}
 	}
 
-	for (i = 0; i < _G(auto_obj); i++) {
+	for (int16 i = 0; i < _G(auto_obj); i++) {
 		if (_G(auto_mov_vector)[i].Xypos[2] < 200) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_AUTO_OBJ;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
@@ -289,54 +288,52 @@ void calc_z_ebene() {
 }
 
 int16 mouse_on_prog_ani() {
-	int16 ani_nr = -1;
-	for (int16 i = 0; i < MAX_PROG_ANI && ani_nr == -1; i++) {
+	int16 aniNr = -1;
+	for (int16 i = 0; i < MAX_PROG_ANI && aniNr == -1; i++) {
 		if (_G(minfo).x >= _G(spr_info)[i].X && _G(minfo).x <= _G(spr_info)[i].X1 &&
 		        _G(minfo).y >= _G(spr_info)[i].Y && _G(minfo).y <= _G(spr_info)[i].Y1) {
-			ani_nr = i;
+			aniNr = i;
 		}
 	}
 
-	return ani_nr;
+	return aniNr;
 }
 
-void set_person_pos(int16 x, int16 y, int16 p_nr, int16 richtung) {
-	if (richtung != -1)
-		set_person_spr(richtung, p_nr);
-	_G(spieler_vector)[p_nr].Xypos[0] = x;
-	_G(spieler_vector)[p_nr].Xypos[1] = y;
-	_G(spieler_mi)[p_nr].XyzStart[0] = x;
-	_G(spieler_mi)[p_nr].XyzStart[1] = y;
-	_G(spieler_vector)[p_nr].Count = 0;
-	_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed;
-	_G(spieler_vector)[p_nr].DelayCount = 0;
-	calc_zoom(_G(spieler_mi)[p_nr].XyzStart[1],
-	          _G(spieler).ZoomXy[p_nr][0],
-	          _G(spieler).ZoomXy[p_nr][1],
-	          &_G(spieler_vector)[p_nr]);
-	int16 tmp_nr = p_nr;
-	if (p_nr >= P_NICHELLE) {
-		++tmp_nr;
+void setPersonPos(int16 x, int16 y, int16 personNr, int16 direction) {
+	if (direction != -1)
+		setPersonSpr(direction, personNr);
+	_G(spieler_vector)[personNr].Xypos[0] = x;
+	_G(spieler_vector)[personNr].Xypos[1] = y;
+	_G(spieler_mi)[personNr].XyzStart[0] = x;
+	_G(spieler_mi)[personNr].XyzStart[1] = y;
+	_G(spieler_vector)[personNr].Count = 0;
+	_G(spieler_vector)[personNr].Delay = _G(spieler).DelaySpeed;
+	_G(spieler_vector)[personNr].DelayCount = 0;
+	calc_zoom(_G(spieler_mi)[personNr].XyzStart[1],
+	          _G(spieler).ZoomXy[personNr][0],
+	          _G(spieler).ZoomXy[personNr][1],
+	          &_G(spieler_vector)[personNr]);
+	int16 tmpNr = personNr;
+	if (personNr >= P_NICHELLE) {
+		++tmpNr;
 	}
-	_G(ssi)[tmp_nr].X = _G(spieler_vector)[p_nr].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[p_nr].HotX;
-	_G(ssi)[tmp_nr].Y = _G(spieler_vector)[p_nr].Xypos[1] - _G(spieler).scrolly;
-	if (!_G(flags).ExitMov) {
-		if (p_nr == P_CHEWY) {
-			int16 u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[p_nr].HotX, y + _G(spieler_mi)[p_nr].HotY,
-			                                 _G(room)->_gedXAnz[_G(room_blk).AkAblage],
-			                                 _G(ged_mem)[_G(room_blk).AkAblage]);
-			check_shad(u_index, 1);
-		}
+	_G(ssi)[tmpNr].X = _G(spieler_vector)[personNr].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[personNr].HotX;
+	_G(ssi)[tmpNr].Y = _G(spieler_vector)[personNr].Xypos[1] - _G(spieler).scrolly;
+	if (!_G(flags).ExitMov && personNr == P_CHEWY) {
+		int16 u_index = _G(ged)->ged_idx(x + _G(spieler_mi)[personNr].HotX, y + _G(spieler_mi)[personNr].HotY,
+		                                 _G(room)->_gedXAnz[_G(room_blk).AkAblage],
+		                                 _G(ged_mem)[_G(room_blk).AkAblage]);
+		check_shad(u_index, 1);
 	}
 }
 
-void set_person_spr(int16 nr, int16 p_nr) {
+void setPersonSpr(int16 nr, int16 personNr) {
 	if (nr == 5 || nr == 4)
 		nr = 0;
 	else if (nr == 10 || nr == 7)
 		nr = 1;
 
-	switch (p_nr) {
+	switch (personNr) {
 	case P_CHEWY:
 		switch (nr) {
 		case P_LEFT:
@@ -353,6 +350,8 @@ void set_person_spr(int16 nr, int16 p_nr) {
 			_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 			break;
 
+		default:
+			break;
 		}
 		break;
 
@@ -360,24 +359,26 @@ void set_person_spr(int16 nr, int16 p_nr) {
 	case P_NICHELLE:
 #define HO_L_STEHEN 0
 #define HO_R_STEHEN 0
-		_G(spieler_vector)[p_nr].PhNr = 0;
-		_G(spieler_vector)[p_nr].PhAnz = 8;
-		_G(person_end_phase)[p_nr] = P_LEFT;
+		_G(spieler_vector)[personNr].PhNr = 0;
+		_G(spieler_vector)[personNr].PhAnz = 8;
+		_G(person_end_phase)[personNr] = P_LEFT;
 		switch (nr) {
 		case P_LEFT:
-			_G(spieler_vector)[p_nr].Phase = HO_L_STEHEN;
-			_G(spieler_vector)[p_nr].PhNr = 0;
-			_G(spieler_vector)[p_nr].PhAnz = 8;
-			_G(person_end_phase)[p_nr] = P_LEFT;
+			_G(spieler_vector)[personNr].Phase = HO_L_STEHEN;
+			_G(spieler_vector)[personNr].PhNr = 0;
+			_G(spieler_vector)[personNr].PhAnz = 8;
+			_G(person_end_phase)[personNr] = P_LEFT;
 			break;
 
 		case P_RIGHT:
-			_G(spieler_vector)[p_nr].Phase = HO_R_STEHEN;
-			_G(spieler_vector)[p_nr].PhNr = 0;
-			_G(spieler_vector)[p_nr].PhAnz = 8;
-			_G(person_end_phase)[p_nr] = P_RIGHT;
+			_G(spieler_vector)[personNr].Phase = HO_R_STEHEN;
+			_G(spieler_vector)[personNr].PhNr = 0;
+			_G(spieler_vector)[personNr].PhAnz = 8;
+			_G(person_end_phase)[personNr] = P_RIGHT;
 			break;
 
+		default:
+			break;
 		}
 		break;
 
@@ -386,120 +387,119 @@ void set_person_spr(int16 nr, int16 p_nr) {
 	}
 }
 
-void stop_person(int16 p_nr) {
+void stopPerson(int16 personNr) {
 	_G(mov)->stop_auto_go();
-	_G(spieler_vector)[p_nr].Count = 0;
+	_G(spieler_vector)[personNr].Count = 0;
 
 }
 
-void start_detail_wait(int16 ani_nr, int16 rep, int16 mode) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void startSetailWait(int16 aniNr, int16 rep, int16 mode) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	_G(det)->start_detail(ani_nr, rep, mode);
-	while (_G(det)->get_ani_status(ani_nr) && !SHOULD_QUIT) {
-		set_up_screen(DO_SETUP);
+	_G(det)->startDetail(aniNr, rep, mode);
+	while (_G(det)->get_ani_status(aniNr) && !SHOULD_QUIT) {
+		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 }
 
-void start_detail_frame(int16 ani_nr, int16 rep, int16 mode, int16 frame) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void startDetailFrame(int16 aniNr, int16 rep, int16 mode, int16 frame) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	_G(det)->start_detail(ani_nr, rep, mode);
-	AniDetailInfo *adi = _G(det)->getAniDetail(ani_nr);
+	_G(det)->startDetail(aniNr, rep, mode);
+	AniDetailInfo *adi = _G(det)->getAniDetail(aniNr);
 	if (mode == ANI_FRONT)
 		frame = adi->ani_count + frame;
 	else
 		frame = adi->ani_count - frame;
-	while (_G(det)->get_ani_status(ani_nr) && adi->ani_count != frame && !SHOULD_QUIT) {
-		set_up_screen(DO_SETUP);
+	while (_G(det)->get_ani_status(aniNr) && adi->ani_count != frame && !SHOULD_QUIT) {
+		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 }
 
-void wait_detail(int16 det_nr) {
-	while (_G(det)->get_ani_status(det_nr) && !SHOULD_QUIT)
-		set_up_screen(DO_SETUP);
+void waitDetail(int16 detNr) {
+	while (_G(det)->get_ani_status(detNr) && !SHOULD_QUIT)
+		setupScreen(DO_SETUP);
 }
 
-void wait_show_screen(int16 frames) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void waitShowScreen(int16 frames) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	if (_G(spieler).DelaySpeed > 0)
 		frames *= _G(spieler).DelaySpeed;
 	while (--frames > 0 && !SHOULD_QUIT) {
 		if (_G(flags).AniUserAction)
 			get_user_key(NO_SETUP);
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 }
 
-void start_ani_block(int16 anz, const AniBlock *ab) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void startAniBlock(int16 nr, const AniBlock *ab) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	for (int16 i = 0; i < anz; i++) {
+	for (int16 i = 0; i < nr; i++) {
 		if (ab[i].Mode == ANI_WAIT)
-			start_detail_wait(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
+			startSetailWait(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 		else
-			_G(det)->start_detail(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
+			_G(det)->startDetail(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 }
 
-void start_aad_wait(int16 dia_nr, int16 str_nr) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void startAadWait(int16 diaNr, int16 strNr) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(talk_start_ani) = -1;
 	_G(talk_hide_static) = -1;
 	setSsiPos();
-	_G(atds)->start_aad(dia_nr);
+	_G(atds)->start_aad(diaNr);
 
 	while (!SHOULD_QUIT && (
 		_G(atds)->aad_get_status() != -1 ||
 		g_engine->_sound->isSpeechActive()
 		)) {
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 	}
 
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 	if (_G(minfo).button)
 		_G(flags).main_maus_flag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	stop_spz();
 }
 
-void start_aad(int16 dia_nr) {
+void start_aad(int16 diaNr) {
 	g_engine->_sound->waitForSpeechToFinish();
 	setSsiPos();
-	_G(atds)->start_aad(dia_nr);
+	_G(atds)->start_aad(diaNr);
 }
 
-bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
-	int16 VocNr;
-	int16 vocx;
+bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 	DisplayMode ret = DISPLAY_NONE;
 
-	_G(tmp_maus_links) = _G(maus_links_click);
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 
 	if (!_G(flags).AtsText) {
 		_G(flags).AtsText = true;
-		if (txt_nr != -1) {
+		if (txtNr != -1) {
 			if (_G(menu_item) != CUR_WALK)
 				atdsStringStart(30000, 0, 0, AAD_STR_START);
 
-			ret = _G(atds)->start_ats(txt_nr, txt_mode, col, mode, &VocNr);
+			int16 VocNr;
+			ret = _G(atds)->start_ats(txtNr, txtMode, col, mode, &VocNr);
 
 			if (ret == DISPLAY_VOC || ret == DISPLAY_ALL) {
-				vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
+				int16 vocx = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 
 				g_engine->_sound->setSoundChannelBalance(0, _G(atds)->getStereoPos(vocx));
 				g_engine->_sound->playSpeech(VocNr,
 					_G(atds)->getAtdDisplay() == DISPLAY_VOC);
 				//warning("FIXME - unknown constant SMP_PLAYING");
 
-				set_up_screen(DO_SETUP);
+				setupScreen(DO_SETUP);
 			}
 
 			if (ret != DISPLAY_NONE) {
@@ -510,7 +510,7 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 							DISPLAY_TXT : DISPLAY_NONE;
 					}
 
-					set_up_screen(DO_SETUP);
+					setupScreen(DO_SETUP);
 				}
 			}
 
@@ -525,57 +525,57 @@ bool start_ats_wait(int16 txt_nr, int16 txt_mode, int16 col, int16 mode) {
 		_G(flags).main_maus_flag = 1;
 
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 
 	return ret != DISPLAY_NONE;
 }
 
-void aad_wait(int16 str_nr) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+void aadWait(int16 strNr) {
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
-	if (str_nr == -1) {
+	if (strNr == -1) {
 		while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 	} else {
-		while (_G(atds)->aad_get_status() < str_nr && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+		while (_G(atds)->aad_get_status() < strNr && !SHOULD_QUIT) {
+			setupScreen(DO_SETUP);
 		}
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 	if (_G(minfo).button)
 		_G(flags).main_maus_flag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
-void start_aad(int16 dia_nr, int16 ssi_nr) {
-	if (ssi_nr == 0) {
+void start_aad(int16 diaNr, int16 ssiNr) {
+	if (ssiNr == 0) {
 		_G(ssi)[0].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
 		_G(ssi)[0].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 		_G(atds)->set_split_win(0, &_G(ssi)[0]);
 	}
 
-	_G(atds)->start_aad(dia_nr);
+	_G(atds)->start_aad(diaNr);
 }
 
-void start_ads_wait(int16 dia_nr) {
+void start_ads_wait(int16 diaNr) {
 	if (!_G(flags).AdsDialog) {
 		_G(menu_item) = CUR_TALK;
 		cursorChoice(_G(menu_item));
-		loadAdsDia(dia_nr);
+		loadAdsDia(diaNr);
 		while (_G(flags).AdsDialog && !SHOULD_QUIT) {
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 		}
 	}
 }
 
 void wait_auto_obj(int16 nr) {
-	_G(tmp_maus_links) = _G(maus_links_click);
+	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	while (_G(mov_phasen)[nr].Repeat != -1 && !SHOULD_QUIT) {
-		set_up_screen(DO_SETUP);
+		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = _G(tmp_maus_links);
+	_G(maus_links_click) = oldMouseLinksClick;
 }
 
 void stop_auto_obj(int16 nr) {
@@ -929,7 +929,7 @@ void calc_person_end_ani(ObjMov *om, int16 p_nr) {
 		_G(ani_stand_count)[p_nr] = 0;
 		om->PhNr = 0;
 		_G(ani_stand_flag)[p_nr] = true;
-		set_person_spr(_G(person_end_phase)[p_nr], p_nr);
+		setPersonSpr(_G(person_end_phase)[p_nr], p_nr);
 	} else if (_G(ani_stand_flag)[p_nr]) {
 		om->Delay = _G(spieler).DelaySpeed + 1;
 		if (om->PhNr < om->PhAnz - 1)
@@ -937,7 +937,7 @@ void calc_person_end_ani(ObjMov *om, int16 p_nr) {
 		else
 			_G(ani_stand_flag)[p_nr] = false;
 	} else {
-		set_person_spr(_G(person_end_phase)[p_nr], p_nr);
+		setPersonSpr(_G(person_end_phase)[p_nr], p_nr);
 		om->PhNr = 0;
 		++_G(ani_stand_count)[p_nr];
 	}
@@ -1032,7 +1032,7 @@ void zoom_mov_anpass(ObjMov *om, MovInfo *mi) {
 void start_spz_wait(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 	if (start_spz(ani_id, count, reverse, p_nr)) {
 		while (_G(spz_count) && !SHOULD_QUIT)
-			set_up_screen(DO_SETUP);
+			setupScreen(DO_SETUP);
 	}
 }
 
@@ -1099,7 +1099,7 @@ void stop_spz() {
 		_G(spz_ani)[_G(spz_p_nr)] = false;
 		_G(spieler_vector)[_G(spz_p_nr)].Count = 0;
 		_G(spieler_vector)[_G(spz_p_nr)].PhNr = 0;
-		set_person_spr(_G(person_end_phase)[_G(spz_p_nr)], _G(spz_p_nr));
+		setPersonSpr(_G(person_end_phase)[_G(spz_p_nr)], _G(spz_p_nr));
 		_G(spz_delay)[_G(spz_p_nr)] = 0;
 	}
 }
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 558c741b675..a8a34509137 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -144,7 +144,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 					case 73:
 						if (!_G(spieler).R9Gitter) {
 							_G(spieler).PersonHide[P_CHEWY] = true;
-							start_detail_wait(5, 1, ANI_FRONT);
+							startSetailWait(5, 1, ANI_FRONT);
 							_G(spieler).PersonHide[P_CHEWY] = false;
 						} else {
 							retValue = false;
@@ -158,7 +158,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 							autoMove(3, P_CHEWY);
 							flic_cut(FCUT_004);
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
-							start_aad_wait(108, 0);
+							startAadWait(108, 0);
 							showCur();
 						} else {
 							retValue = false;
@@ -194,7 +194,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						if (is_cur_inventar(TRANSLATOR_INV)) {
 							autoMove(6, P_CHEWY);
 							_G(spieler).R14Translator = true;
-							start_aad_wait(25, -1);
+							startAadWait(25, -1);
 						} else
 							retValue = false;
 						break;
@@ -778,7 +778,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 
 					case 95:
 						if (_G(spieler).R13Band == true)
-							start_aad_wait(116, -1);
+							startAadWait(116, -1);
 						break;
 
 					case 100:
@@ -827,7 +827,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 					case 11:
 						autoMove(3, P_CHEWY);
 						_G(det)->stop_detail(5);
-						_G(det)->start_detail(6, 2, ANI_FRONT);
+						_G(det)->startDetail(6, 2, ANI_FRONT);
 						Room2::jump_out_r1(9);
 						break;
 
@@ -997,11 +997,11 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 505:
-						start_aad_wait(482, -1);
+						startAadWait(482, -1);
 						break;
 
 					case 506:
-						start_aad_wait(483, -1);
+						startAadWait(483, -1);
 						break;
 
 					case 512:
@@ -1198,7 +1198,7 @@ void adsAction(int16 diaNr, int16 blkNr, int16 strEndNr) {
 		case 20:
 			if (blkNr == 0 && strEndNr == 1) {
 				_G(spieler).PersonHide[P_CHEWY] = true;
-				start_detail_wait(28, 3, ANI_FRONT);
+				startSetailWait(28, 3, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
 			}
 			break;
@@ -1224,9 +1224,9 @@ void ads_ende(int16 diaNr, int16 blkNr, int16 strEndNr) {
 	case 22:
 		if (strEndNr == 1) {
 			_G(det)->del_static_ani(3);
-			start_detail_wait(5, 1, ANI_FRONT);
+			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->set_static_ani(3, -1);
-			start_aad_wait(456, -1);
+			startAadWait(456, -1);
 		}
 		break;
 
@@ -1507,7 +1507,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 
 		case 1:
 			if (mode == AAD_STR_START) {
-				_G(det)->start_detail(5, 255, ANI_FRONT);
+				_G(det)->startDetail(5, 255, ANI_FRONT);
 			} else {
 				_G(det)->stop_detail(5);
 			}
@@ -1561,7 +1561,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 			}
 			for (int16 i = 0; i < nbr; i++) {
 				if (mode == AAD_STR_START) {
-					_G(det)->start_detail(tmp, 255, ANI_FRONT);
+					_G(det)->startDetail(tmp, 255, ANI_FRONT);
 				} else {
 					_G(det)->stop_detail(tmp);
 				}
@@ -2102,7 +2102,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 
 	case R61_VERLAG_DIA:
 		if (mode == AAD_STR_START) {
-			_G(det)->start_detail(personNr, 255, ANI_FRONT);
+			_G(det)->startDetail(personNr, 255, ANI_FRONT);
 		} else {
 			_G(det)->stop_detail(personNr);
 		}
@@ -2142,12 +2142,12 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 	}
 
 	if (oldFormat) {
-		_G(det)->start_detail(_G(talk_start_ani), 255, ANI_FRONT);
+		_G(det)->startDetail(_G(talk_start_ani), 255, ANI_FRONT);
 		_G(det)->stop_detail(talkStopAni);
 		_G(det)->hideStaticSpr(_G(talk_hide_static));
 		_G(det)->showStaticSpr(talkShowStatic);
 	} else {
-		_G(det)->start_detail(talkAni, 255, ANI_FRONT);
+		_G(det)->startDetail(talkAni, 255, ANI_FRONT);
 		_G(det)->stop_detail(stopAni);
 	}
 }
@@ -2215,7 +2215,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			invent_2_slot(K_KERNE_INV);
 		} else if (_G(spieler).AkInvent == 88) {
 			_G(spieler).flags26_10 = true;
-			start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
+			startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		}
 		break;
 
@@ -2255,14 +2255,14 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).flags26_10 = true;
 		_G(flags).InventMenu = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		start_aad_wait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
+		startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
 		_G(flags).InventMenu = true;
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
 	case 88:
 		_G(spieler).flags26_10 = true;
-		start_aad_wait(350, -1);
+		startAadWait(350, -1);
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
@@ -2354,9 +2354,9 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 		if (txt_nr != -1) {
 			if (!_G(flags).InventMenu) {
 				if (txt_nr >= 15000) {
-					ret = start_ats_wait(txt_nr - 15000, TXT_MARK_USE, 14, INV_USE_DEF);
+					ret = startAtsWait(txt_nr - 15000, TXT_MARK_USE, 14, INV_USE_DEF);
 				} else {
-					ret = start_ats_wait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATA);
+					ret = startAtsWait(txt_nr, TXT_MARK_USE, 14, INV_USE_DATA);
 				}
 			} else {
 				Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, txt_nr);
@@ -2372,7 +2372,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 					calc_inv_get_text(_G(spieler).AkInvent, test_nr);
 					Dialogs::Inventory::look(-1, INV_USE_ATS_MODE, RAND_NO_USE[r_val] + 15000);
 				} else {
-					ret = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
+					ret = startAtsWait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF);
 				}
 			}
 		}
@@ -2753,7 +2753,7 @@ void calc_person_dia(int16 p_nr) {
 				_G(stopAutoMove)[i] = true;
 			}
 
-			start_aad_wait(_G(spieler).PersonDia[p_nr], -1);
+			startAadWait(_G(spieler).PersonDia[p_nr], -1);
 
 			for (int i = 0; i < 3; ++i) {
 				_G(spieler).PersonDiaRoom[i] = tmp[i];
@@ -2776,7 +2776,7 @@ void calc_person_dia(int16 p_nr) {
 				if (_G(spieler).PersonDia[P_NICHELLE] < 10000) {
 					_G(cur_hide_flag) = false;
 					hideCur();
-					start_aad_wait(_G(spieler).PersonDia[P_NICHELLE], -1);
+					startAadWait(_G(spieler).PersonDia[P_NICHELLE], -1);
 					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE];
 					showCur();
 				} else {


Commit: 407001362ce51c86a7b6282b71093febec4c2172
    https://github.com/scummvm/scummvm/commit/407001362ce51c86a7b6282b71093febec4c2172
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:49-08:00

Commit Message:
CHEWY: Remove useless parameter in startAadWait()

Changed paths:
    engines/chewy/globals.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp


diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 07a19187eff..0c341dce8c1 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -489,11 +489,11 @@ void calc_zoom(int16 y, int16 zoomFactorX, int16 zoomFactorY,
 void load_chewy_taf(int16 taf_nr);
 
 bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode);
-void startAadWait(int16 diaNr, int16 strNr);
+void startAadWait(int16 diaNr);
 
 void start_aad(int16 diaNr);
 void aadWait(int16 strNr);
-void start_ads_wait(int16 diaNr);
+void startAdsWait(int16 diaNr);
 void start_aad(int16 diaNr, int16 ssiNr);
 void wait_auto_obj(int16 nr);
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index fe00f364784..35715a086da 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -1482,7 +1482,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(spieler).R40Geld = true;
 		start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(201, -1);
+		startAadWait(201);
 		break;
 
 	case SIB_VISIT_R53:
@@ -1515,9 +1515,9 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(det)->showStaticSpr(7);
 		_G(cur_hide_flag) = false;
 		hideCur();
-		startAadWait(406, -1);
+		startAadWait(406);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
-			startAadWait(613, -1);
+			startAadWait(613);
 		showCur();
 		break;
 
@@ -1637,7 +1637,7 @@ void sib_event_inv(int16 sib_nr) {
 		del_inventar(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATA);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(115, 0);
+		startAadWait(115);
 
 		if (_G(spieler).R12TransOn)
 			Room12::use_linke_rohr();
@@ -1660,9 +1660,9 @@ void sib_event_inv(int16 sib_nr) {
 		if (_G(spieler).R18CartTerminal) {
 			_G(spieler).R18CartSave = true;
 			_G(atds)->set_ats_str(26, 1, INV_ATS_DATA);
-			startAadWait(120, -1);
+			startAadWait(120);
 		} else {
-			startAadWait(121, -1);
+			startAadWait(121);
 		}
 		break;
 
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 07461f531c1..5f51e577636 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -64,7 +64,7 @@ void Room0::entry() {
 		}
 
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(2, -1);
+		startAadWait(2);
 
 		showCur();
 	}
@@ -82,27 +82,27 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 
 			_G(flags).AutoAniPlay = true;
 			if (!_G(spieler).R0SlimeUsed) {
-				startAadWait(42, -1);
+				startAadWait(42);
 				autoMove(5, P_CHEWY);
 				setPersonSpr(P_LEFT, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
 					start_spz(CH_TALK3, 255, false, P_CHEWY);
 					if (_G(spieler).R0FueterLab)
-						startAadWait(618, -1);
+						startAadWait(618);
 					else
-						startAadWait(43, -1);
+						startAadWait(43);
 
 					++_G(spieler).R0FueterLab;
 				}
 
 				eyeAnim();
 			} else if (!_G(spieler).R0PillowThrow) {
-				startAadWait(42, -1);
+				startAadWait(42);
 				start_spz(CH_TALK3, 255, false, P_CHEWY);
 
 				if (_G(spieler).R0FueterLab < 3) {
-					startAadWait(43, -1);
+					startAadWait(43);
 					++_G(spieler).R0FueterLab;
 				}
 
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 4bb7da6255f..46795e38659 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -52,7 +52,7 @@ void Room1::gedAction(int index) {
 		}
 
 		if (flag) {
-			startAadWait(54, -1);
+			startAadWait(54);
 			_G(atds)->set_ats_str(8, TXT_MARK_LOOK, 0, ATS_DATA);
 			_G(spieler).room_s_obj[KABELABDECKUNG].ZustandFlipFlop = 2;
 			_G(obj)->calc_rsi_flip_flop(KABELABDECKUNG);
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 54bc1279ea8..3d986d1ddc8 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -57,7 +57,7 @@ void Room2::jump_out_r1(int16 nr) {
 void Room2::electrifyWalkway1() {
 	_G(det)->startDetail(ANI_5, 255, ANI_FRONT);
 	start_spz(CH_TALK6, 255, false, ANI_FRONT);
-	startAadWait(49, -1);
+	startAadWait(49);
 	_G(det)->stop_detail(ANI_5);
 
 	_G(det)->startDetail(GITTER_BLITZEN, 12, ANI_FRONT);
@@ -74,7 +74,7 @@ void Room2::electrifyWalkway1() {
 
 void Room2::electrifyWalkway2() {
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
-	startAadWait(47, -1);
+	startAadWait(47);
 }
 
 void Room2::gedAction(int index) {
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index a1b41eec228..fe313aa70c3 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -124,7 +124,7 @@ void Room3::terminal() {
 		} else if (!_G(spieler).R2FussSchleim) {
 			startAniBlock(2, ABLOCK2);
 			Room2::jump_out_r1(9);
-			startAadWait(45, -1);
+			startAadWait(45);
 		} else {
 			_G(spieler).PersonHide[P_CHEWY] = true;
 			startAniBlock(2, ABLOCK1);
@@ -146,7 +146,7 @@ void Room3::terminal() {
 		_G(minfo).button = 0;
 		stopPerson(P_CHEWY);
 		start_spz(15, 255, false, P_CHEWY);
-		startAadWait(51, -1);
+		startAadWait(51);
 		setupScreen(DO_SETUP);
 		break;
 
@@ -245,7 +245,7 @@ void Room3::sonde_knarre() {
 	}
 
 	start_spz(15, 255, false, P_CHEWY);
-	startAadWait(53, -1);
+	startAadWait(53);
 	clear_prog_ani();
 	_G(det)->startDetail(SONDE_REIN, 1, ANI_BACK);
 	while (_G(det)->get_ani_status(SONDE_REIN)) {
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 844939da70f..91dadee55fc 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -50,7 +50,7 @@ void Room5::pushButton() {
 		_G(spieler).R5Tuer ^= 1;
 		_G(obj)->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else {
-		startAadWait(1, -1);
+		startAadWait(1);
 	}
 }
 
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index 8a01f0c242b..f0fe1217651 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -120,7 +120,7 @@ void Room6::bola_knopf() {
 			++_G(spieler).R6BolaJoke;
 			int16 diaNr = (_G(spieler).R6BolaJoke < 3) ? 3 : 4;
 			start_spz(CH_TALK5, 244, false, 0);
-			startAadWait(diaNr, -1);
+			startAadWait(diaNr);
 		}
 		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
 	}
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 1ecdac179ee..750e8a5b6d9 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -70,7 +70,7 @@ void Room7::haken(int16 sib_nr) {
 
 	_G(obj)->calc_all_static_detail();
 	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATA);
-	startAadWait(dia_nr, -1);
+	startAadWait(dia_nr);
 }
 
 void Room7::klingel() {
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index cfbcb3008e4..48c93f1d421 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -67,7 +67,7 @@ void Room8::stop_folter() {
 
 void Room8::hole_kohle() {
 	if (_G(spieler).R8Kohle) {
-		startAadWait(604, -1);
+		startAadWait(604);
 	} else {
 		hideCur();
 		_G(spieler).R8Kohle = true;
@@ -176,9 +176,9 @@ void Room8::talk_nimoy() {
 		if (!_G(spieler).R8GTuer)
 			loadAdsDia(diaNr);
 		else
-			startAadWait(61, -1);
+			startAadWait(61);
 	} else {
-		startAadWait(603, -1);
+		startAadWait(603);
 		loadAdsDia(6);
 	}
 
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 0a8ddbe3ee3..9d25b9ae0f7 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -81,7 +81,7 @@ void Room9::surimy() {
 	_G(room)->set_timer_status(7, TIMER_STOP);
 	surimy_ani();
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
-	startAadWait(56, -1);
+	startAadWait(56);
 	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
 	_G(spieler_vector)[P_CHEWY].Count = tmp;
 	get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index cdb382aac8e..5f0b01935aa 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -41,7 +41,7 @@ void Room10::entry() {
 		autoMove(2, P_CHEWY);
 		hideCur();
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(101, 0);
+		startAadWait(101);
 		showCur();
 
 	} else if (_G(spieler).R10SurimyOk) {
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index c0facbb60b9..20b62c3bf18 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -64,7 +64,7 @@ void Room11::entry() {
 		if (!_G(flags).LoadGame) {
 			startAniBlock(2, ABLOCK17);
 			autoMove(8, P_CHEWY);
-			startAadWait(31, -1);
+			startAadWait(31);
 			_G(det)->stop_detail(9);
 		}
 		_G(det)->showStaticSpr(8);
@@ -107,7 +107,7 @@ void Room11::talk_debug() {
 	if (_G(spieler).R12ChewyBork) {
 		_G(flags).AutoAniPlay = true;
 		autoMove(8, P_CHEWY);
-		start_ads_wait(5);
+		startAdsWait(5);
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
 
@@ -123,7 +123,7 @@ void Room11::chewy_bo_use() {
 		stopPerson(P_CHEWY);
 		_G(det)->hideStaticSpr(8);
 		startAniBlock(2, ABLOCK17);
-		startAadWait(32, -1);
+		startAadWait(32);
 		_G(det)->stop_detail(9);
 		_G(det)->showStaticSpr(8);
 		autoMove(6, P_CHEWY);
@@ -141,7 +141,7 @@ int16 Room11::scanner() {
 
 		if (!_G(spieler).R11CardOk) {
 			actionFl = true;
-			startAadWait(13, -1);
+			startAadWait(13);
 		} else if (is_cur_inventar(BORK_INV)) {
 			hideCur();
 			setupScreen(DO_SETUP);
@@ -154,17 +154,17 @@ int16 Room11::scanner() {
 			cur_2_inventory();
 			_G(menu_item) = CUR_TALK;
 			cursorChoice(_G(menu_item));
-			startAadWait(12, -1);
+			startAadWait(12);
 			showCur();
 			loadAdsDia(3);
 		} else if (!_G(spieler).inv_cur) {
 			if (!_G(spieler).R11TerminalOk) {
 				actionFl = true;
 				flic_cut(FCUT_009);
-				startAadWait(20, -1);
+				startAadWait(20);
 			} else {
 				actionFl = true;
-				startAadWait(12, -1);
+				startAadWait(12);
 				_G(menu_item) = CUR_TALK;
 				cursorChoice(_G(menu_item));
 				loadAdsDia(3);
@@ -200,7 +200,7 @@ void Room11::put_card() {
 		_G(spieler).R11CardOk = true;
 
 		if (!_G(spieler).R11TerminalOk)
-			startAadWait(16, -1);
+			startAadWait(16);
 	}
 }
 
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index eefb38cc69d..6059af5f7d7 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -87,7 +87,7 @@ void Room12::entry() {
 		_G(obj)->calc_all_static_detail();
 		autoMove(5, P_CHEWY);
 		start_spz(CH_TALK12, 255, false, 0);
-		startAadWait(109, -1);
+		startAadWait(109);
 		showCur();
 
 	} else if (_G(spieler).R12Talisman && !_G(spieler).R12BorkInRohr)
@@ -102,7 +102,7 @@ bool Room12::timer(int16 t_nr, int16 ani_nr) {
 			init_bork();
 	} else if (t_nr == _G(timer_nr)[1] && _G(spieler).R12TransOn) {
 		_G(spieler).R12TransOn = false;
-		startAadWait(30, -1);
+		startAadWait(30);
 	}
 
 	return false;
@@ -135,7 +135,7 @@ void Room12::init_bork() {
 					_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 					waitShowScreen(10);
 					start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-					startAadWait(14, -1);
+					startAadWait(14);
 				}
 
 				wait_auto_obj(R12_BORK_OBJ);
@@ -151,7 +151,7 @@ void Room12::init_bork() {
 
 void Room12::talk_bork() {
 	if (!_G(spieler).R12TalismanOk) {
-		startAadWait(28, -1);
+		startAadWait(28);
 	}
 }
 
@@ -171,7 +171,7 @@ void Room12::bork_ok() {
 	_G(spieler).R12BorkInRohr = true;
 	_G(det)->setSetailPos(3, 170, 145);
 	_G(det)->startDetail(3, 255, ANI_FRONT);
-	startAadWait(57, -1);
+	startAadWait(57);
 	_G(det)->stop_detail(3);
 
 	_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
@@ -196,11 +196,11 @@ int16 Room12::use_terminal() {
 
 		if (!_G(spieler).R12ChewyBork) {
 			autoMove(6, P_CHEWY);
-			startAadWait(110, -1);
+			startAadWait(110);
 
 			if (_G(spieler).R12BorkInRohr && !_G(spieler).R12RaumOk) {
 				start_spz(CH_TALK5, 255, false, P_CHEWY);
-				startAadWait(112, -1);
+				startAadWait(112);
 				_G(flags).NoScroll = true;
 				auto_scroll(46, 0);
 				flic_cut(FCUT_016);
@@ -217,7 +217,7 @@ int16 Room12::use_terminal() {
 				_G(spieler).R12RaumOk = true;
 				autoMove(4, P_CHEWY);
 				start_spz(68, 255, false, P_CHEWY);
-				startAadWait(113, 0);
+				startAadWait(113);
 
 			} else if (_G(spieler).R12TalismanOk && !_G(spieler).R12RaumOk) {
 				use_linke_rohr();
@@ -274,7 +274,7 @@ int16 Room12::useTransformerTube() {
 			_G(atds)->set_ats_str(117, 1, AAD_DATA);
 		} else {
 			autoMove(7, P_CHEWY);
-			startAadWait(29, -1);
+			startAadWait(29);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 42c97109e2c..c6b8dc8be49 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -51,7 +51,7 @@ void Room13::entry() {
 		setPersonPos(106, 65, P_CHEWY, P_RIGHT);
 		switch_room(11);
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		startAadWait(27, -1);
+		startAadWait(27);
 	} else {
 		if (_G(spieler).R13MonitorStatus)
 			_G(det)->showStaticSpr(11 - _G(spieler).R13MonitorStatus);
@@ -105,7 +105,7 @@ void Room13::talk_bork() {
 		_G(det)->setSetailPos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		_G(det)->setStaticPos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
 		_G(spieler).PersonHide[P_CHEWY] = true;
-		startAadWait(33, -1);
+		startAadWait(33);
 		_G(det)->stop_detail(9);
 		_G(det)->load_taf_seq(86, 12, nullptr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -127,7 +127,7 @@ void Room13::talk_bork() {
 		auto_scroll(41, 0);
 
 		start_spz(68, 255, false, P_CHEWY);
-		startAadWait(248, -1);
+		startAadWait(248);
 		flic_cut(FCUT_013);
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(auto_obj) = 0;
@@ -138,8 +138,8 @@ void Room13::talk_bork() {
 		_G(obj)->show_sib(SIB_BANDKNOPF_R13);
 		setPersonPos(153, 138, P_CHEWY, P_LEFT);
 
-		startAadWait(34, -1);
-		startAadWait(249, -1);
+		startAadWait(34);
+		startAadWait(249);
 
 		_G(obj)->show_sib(SIB_TKNOPF1_R11);
 		_G(obj)->show_sib(SIB_SCHLITZ_R11);
@@ -169,7 +169,7 @@ void Room13::jmp_band() {
 			_G(spieler).R13Surf = true;
 			_G(maus_links_click) = false;
 			autoMove(12, P_CHEWY);
-			startAadWait(117, -1);
+			startAadWait(117);
 			_G(flags).NoScroll = true;
 			auto_scroll(76, 0);
 			flic_cut(FCUT_014);
@@ -217,7 +217,7 @@ int16 Room13::monitor_knopf() {
 	if (!_G(spieler).inv_cur) {
 		if (_G(spieler).R13Band) {
 			action_flag = true;
-			startAadWait(620, -1);
+			startAadWait(620);
 
 		} else if (!_G(spieler).R12ChewyBork) {
 			action_flag = true;
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index dda730c9a5b..e32e8970cf8 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -81,7 +81,7 @@ int16 Room14::use_schrott() {
 		if (!_G(spieler).R14Waffe) {
 			action_flag = true;
 			_G(spieler).R14Waffe = true;
-			startAadWait(21, -1);
+			startAadWait(21);
 			invent_2_slot(BWAFFE_INV);
 		}
 	}
@@ -121,7 +121,7 @@ void Room14::talk_eremit()  {
 			_G(obj)->show_sib(46);
 		} else {
 			hideCur();
-			startAadWait(24, -1);
+			startAadWait(24);
 			showCur();
 			_G(flags).AutoAniPlay = false;
 		}
@@ -140,7 +140,7 @@ int16 Room14::use_schleim() {
 		if (!_G(spieler).R14Sicherung) {
 			action_flag = true;
 			_G(spieler).R14Sicherung = true;
-			startAadWait(22, -1);
+			startAadWait(22);
 			invent_2_slot(SICHERUNG_INV);
 		}
 	}
@@ -183,7 +183,7 @@ void Room14::feuer() {
 	if (waffe)
 		autoMove(7, P_CHEWY);
 
-	startAadWait(26, -1);
+	startAadWait(26);
 	_G(det)->hideStaticSpr(9);
 	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(9);
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 166dc3e715f..8dde5c83e2c 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -152,7 +152,7 @@ int16 Room17::use_seil() {
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(119, -1);
+		startAadWait(119);
 
 		showCur();
 	}
@@ -201,7 +201,7 @@ void Room17::kletter_up() {
 void Room17::calc_seil() {
 	if (_G(spieler).R17Seil) {
 		if (_G(spieler).R17Location == 2) {
-			startAadWait(619, -1);
+			startAadWait(619);
 		} else if (!_G(flags).AutoAniPlay && !_G(spieler).inv_cur) {
 			close_door();
 			_G(flags).AutoAniPlay = true;
@@ -277,10 +277,10 @@ int16 Room17::energie_hebel() {
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
-			startAadWait(38, -1);
+			startAadWait(38);
 			action_flag = true;
 		} else if (!_G(spieler).inv_cur) {
-			startAadWait(37, -1);
+			startAadWait(37);
 			action_flag = true;
 		}
 
@@ -320,7 +320,7 @@ int16 Room17::get_oel() {
 		action_flag = true;
 		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_EKEL, 3, false, P_CHEWY);
-		startAadWait(60, -1);
+		startAadWait(60);
 	} else if (is_cur_inventar(BECHER_LEER_INV)) {
 		action_flag = true;
 		close_door();
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 5a9076f7a02..c7cfe56d6e3 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -115,7 +115,7 @@ void Room18::entry() {
 	}
 
 	if (!_G(spieler).R18FirstEntry && !_G(spieler).R18Gitter) {
-		startAadWait(39, -1);
+		startAadWait(39);
 		_G(spieler).R18FirstEntry = true;
 	}
 
@@ -364,7 +364,7 @@ short Room18::use_cart_moni() {
 			if (_G(spieler).R18CartFach) {
 				_G(spieler).R18CartSave = true;
 				_G(atds)->set_ats_str(CARTRIDGE_INV, TXT_MARK_LOOK, 1, INV_ATS_DATA);
-				startAadWait(120, -1);
+				startAadWait(120);
 			}
 		}
 
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index c06f18a6c87..f3bd8c3ff82 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -218,7 +218,7 @@ void Room21::salto() {
 
 		startAniBlock(3, ABLOCK19);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		startAadWait(36, -1);
+		startAadWait(36);
 		_G(flags).AutoAniPlay = false;
 	}
 }
@@ -249,7 +249,7 @@ int16 Room21::use_fenster() {
 		switch_room(18);
 
 		if (!_G(spieler).R18FirstEntry) {
-			startAadWait(39, -1);
+			startAadWait(39);
 			_G(spieler).R18FirstEntry = true;
 		}
 
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index bbb05e9fe12..45a1fb1b6c3 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -106,7 +106,7 @@ void Room22::bork(int16 t_nr) {
 		if (!_G(spieler).R22BorkPlatt) {
 			hideCur();
 			start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(10, -1);
+			startAadWait(10);
 			autoMove(3, P_CHEWY);
 			_G(auto_obj) = 1;
 			_G(mov_phasen)[BORK_OBJ].AtsText = 0;
@@ -166,7 +166,7 @@ void Room22::get_bork() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		startAniBlock(2, ABLOCK14);
 		setPersonPos(171, 120, P_CHEWY, P_LEFT);
-		startAadWait(11, -1);
+		startAadWait(11);
 		_G(det)->stop_detail(3);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index c994ea22b57..05e98ad900a 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -59,20 +59,20 @@ int16 Room23::start_gleiter() {
 	if (!_G(spieler).inv_cur) {
 		action_flag = true;
 		if (!_G(spieler).R23FluxoFlex)
-			startAadWait(23, -1);
+			startAadWait(23);
 		else {
 			bool start_ok = true;
 
 			if (_G(spieler).R23GleiterExit == 16) {
 				if (!_G(spieler).R16F5Exit) {
 					start_ok = false;
-					startAadWait(35, -1);
+					startAadWait(35);
 				} else if (!_G(spieler).R23Cartridge || !_G(spieler).R18CartSave) {
 					start_ok = false;
-					startAadWait(41, -1);
+					startAadWait(41);
 				} else if (!_G(spieler).R17EnergieOut) {
 					start_ok = false;
-					startAadWait(300, -1);
+					startAadWait(300);
 				}
 			}
 
@@ -99,7 +99,7 @@ int16 Room23::start_gleiter() {
 					start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
 
 					_G(spieler).DelaySpeed = 10;
-					startAadWait(59, -1);
+					startAadWait(59);
 					stopPerson(P_CHEWY);
 					_G(maus_links_click) = false;
 
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 0ac9e288d47..499b7fd19f2 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -78,7 +78,7 @@ void Room25::entry() {
 		setPersonPos(219, 141, P_CHEWY, P_RIGHT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(64, -1);
+		startAadWait(64);
 		showCur();
 
 	} else if (_G(spieler).R25GleiterExit && !_G(flags).LoadGame) {
@@ -121,7 +121,7 @@ int16 Room25::gleiter_loesch() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(obj)->addInventory(MILCH_WAS_INV, &_G(room_blk));
 			inventory_2_cur(MILCH_WAS_INV);
-			startAadWait(253, -1);
+			startAadWait(253);
 		}
 	}
 
@@ -162,7 +162,7 @@ void Room25::xit_gleiter() {
 		setupScreen(DO_SETUP);
 
 		start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(65, -1);
+		startAadWait(65);
 		_G(fx_blend) = BLEND_NONE;
 		wait_auto_obj(SURIMY_OBJ);
 		_G(auto_obj) = 0;
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index 1b35fc6c90f..c4e86ffd4f8 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -47,7 +47,7 @@ void Room27::xit(int16 eib_nr) {
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
-			startAadWait(175, -1);
+			startAadWait(175);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			startSetailWait(2, 1, ANI_FRONT);
@@ -55,7 +55,7 @@ void Room27::xit(int16 eib_nr) {
 			_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
 		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
 			++_G(spieler).R27HowardGed;
-			startAadWait(174, -1);
+			startAadWait(174);
 		}
 	}
 
@@ -68,7 +68,7 @@ void Room27::get_surimy() {
 	autoMove(4, P_CHEWY);
 
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
-		startAadWait(171, -1);
+		startAadWait(171);
 	}
 
 	showCur();
@@ -78,7 +78,7 @@ void Room27::get_surimy() {
 void Room27::talk_howard() {
 	hideCur();
 	autoMove(4, P_CHEWY);
-	startAadWait(173, -1);
+	startAadWait(173);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index f0d4241bf4c..fa55cd4c7d7 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -64,13 +64,13 @@ void Room28::entry(int16 eib_nr) {
 					setPersonPos(232, 100, P_HOWARD, P_RIGHT);
 					autoMove(3, P_HOWARD);
 					goAutoXy(320, _G(spieler_vector)[P_HOWARD].Xypos[1], P_HOWARD, ANI_WAIT);
-					startAadWait(176, -1);
+					startAadWait(176);
 				} else if (_G(spieler).R31SurFurz && !_G(spieler).R28RKuerbis) {
 					_G(spieler).R28RKuerbis = true;
 					_G(spieler).ScrollxStep = 2;
 					autoMove(6, P_CHEWY);
 					waitShowScreen(10);
-					startAadWait(194, -1);
+					startAadWait(194);
 					_G(spieler).room_e_obj[62].Attribut = 255;
 					_G(atds)->set_ats_str(208, 1, ATS_DATA);
 					_G(flags).NoScroll = true;
@@ -82,7 +82,7 @@ void Room28::entry(int16 eib_nr) {
 					if (!_G(spieler).R40TeilKarte) {
 						_G(out)->ausblenden(0);
 						_G(out)->set_teilpalette(_G(pal), 255, 1);
-						startAadWait(607, -1);
+						startAadWait(607);
 						_G(fx_blend) = BLEND3;
 					}
 
@@ -92,7 +92,7 @@ void Room28::entry(int16 eib_nr) {
 						haendler();
 					} else {
 						waitShowScreen(60);
-						startAadWait(195, -1);
+						startAadWait(195);
 					}
 
 					_G(spieler).ScrollxStep = 2;
@@ -120,7 +120,7 @@ void Room28::entry(int16 eib_nr) {
 					goAutoXy(420, 113, P_HOWARD, ANI_WAIT);
 					_G(spieler_mi)[P_HOWARD].Mode = false;
 					setPersonPos(440, 146, P_CHEWY, P_LEFT);
-					startAadWait(193, -1);
+					startAadWait(193);
 				} else {
 					setPersonPos(480, 100, P_HOWARD, P_LEFT);
 					goAutoXy(420, 113, P_HOWARD, ANI_GO);
@@ -146,7 +146,7 @@ void Room28::xit(int16 eib_nr) {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
 		_G(SetUpScreenFunc) = nullptr;
 		if (!_G(spieler).R28ExitTown) {
-			startAadWait(178, -1);
+			startAadWait(178);
 			_G(spieler).R28ExitTown = true;
 		}
 
@@ -181,13 +181,13 @@ void Room28::haendler() {
 		setupScreen(DO_SETUP);
 	}
 
-	startAadWait(196, -1);
+	startAadWait(196);
 	_G(det)->del_static_ani(2);
 	_G(det)->set_static_ani(3, -1);
-	startAadWait(197, -1);
+	startAadWait(197);
 	_G(det)->del_static_ani(3);
 	_G(det)->set_static_ani(4, -1);
-	startAadWait(198, -1);
+	startAadWait(198);
 	_G(SetUpScreenFunc) = setup_func;
 	autoMove(4, P_CHEWY);
 	hideCur();
@@ -195,7 +195,7 @@ void Room28::haendler() {
 	setPersonSpr(P_RIGHT, P_CHEWY);
 	_G(det)->del_static_ani(4);
 	waitShowScreen(28);
-	startAadWait(199, -1);
+	startAadWait(199);
 	invent_2_slot(DOLLAR175_INV);
 }
 
@@ -231,7 +231,7 @@ void Room28::use_surimy() {
 
 	_G(obj)->calc_all_static_detail();
 	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-	startAadWait(dia_nr, -1);
+	startAadWait(dia_nr);
 	_G(flags).NoScroll = false;
 	showCur();
 }
@@ -272,7 +272,7 @@ void Room28::set_pump() {
 				_G(SetUpScreenFunc) = nullptr;
 				g_engine->_sound->waitForSpeechToFinish();
 
-				startAadWait(177, -1);
+				startAadWait(177);
 				_G(SetUpScreenFunc) = setup_func;
 				++_G(spieler).R28PumpTxt;
 			}
@@ -306,7 +306,7 @@ void Room28::get_pump() {
 
 		if (_G(spieler).R28PumpTxt1 < 3) {
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(138, -1);
+			startAadWait(138);
 		}
 
 		showCur();
@@ -327,7 +327,7 @@ int16 Room28::use_breifkasten() {
 		_G(det)->showStaticSpr(7);
 		autoMove(8, P_CHEWY);
 		start_spz(CH_LGET_O, 1, ANI_FRONT, P_CHEWY);
-		startAadWait(179, -1);
+		startAadWait(179);
 		_G(atds)->set_ats_str(206, 0, ATS_DATA);
 		showCur();
 		invent_2_slot(MANUSKRIPT_INV);
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 95b367aa131..e1cc8b26aa3 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -82,7 +82,7 @@ int16 Room29::use_pumpe() {
 			del_inventar(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
 			action_flag = true;
-			startAadWait(62, -1);
+			startAadWait(62);
 		}
 
 		showCur();
@@ -145,7 +145,7 @@ void Room29::schlitz_sitz() {
 		_G(det)->showStaticSpr(9);
 		_G(det)->hideStaticSpr(11);
 		_G(det)->startDetail(2, 255, ANI_FRONT);
-		startAadWait(63, -1);
+		startAadWait(63);
 
 		_G(det)->stop_detail(2);
 		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index aaac3d2005d..1efb3cad848 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -62,7 +62,7 @@ void Room31::surimy_go() {
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(157, -1);
+			startAadWait(157);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			showCur();
@@ -206,7 +206,7 @@ int16 Room31::use_topf() {
 	
 	if (dia_nr != -1) {
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(dia_nr, -1);
+		startAadWait(dia_nr);
 		action_flag = true;
 	}
 
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index a8360aaf6fa..40b8f9ce77b 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -49,12 +49,12 @@ int16 Room32::use_howard() {
 			flic_cut(FCUT_043);
 			_G(atds)->set_steuer_bit(230, ATS_AKTIV_BIT, ATS_DATA);
 			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(75, -1);
+			startAadWait(75);
 			waitShowScreen(5);
 			autoMove(5, P_CHEWY);
 			waitShowScreen(10);
 			start_spz(CH_TALK12, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(125, -1);
+			startAadWait(125);
 			waitShowScreen(10);
 
 			_G(det)->hideStaticSpr(0);
@@ -82,7 +82,7 @@ int16 Room32::use_howard() {
 
 	if (dia_nr) {
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(dia_nr, -1);
+		startAadWait(dia_nr);
 		action_flag = true;
 	}
 
@@ -144,7 +144,7 @@ void Room32::use_schreibmaschine() {
 	}
 
 	start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-	startAadWait(dia_nr, -1);
+	startAadWait(dia_nr);
 	showCur();
 }
 
@@ -160,7 +160,7 @@ int16 Room32::get_script() {
 		_G(det)->hideStaticSpr(5);
 		_G(atds)->set_ats_str(203, 0, ATS_DATA);
 		start_spz(CH_TALK3, 1, ANI_FRONT, P_CHEWY);
-		startAadWait(91, -1);
+		startAadWait(91);
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index bed940d4d66..6fa25b06724 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -56,7 +56,7 @@ void Room33::surimy_go() {
 			_G(auto_mov_obj)[SURIMY_OBJ].Mode = true;
 			init_auto_obj(SURIMY_OBJ, &SURIMY_TAF19_PHASEN[0][0], 2, (const MovLine *)SURIMY_MPKT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(158, -1);
+			startAadWait(158);
 			wait_auto_obj(SURIMY_OBJ);
 			_G(auto_obj) = 0;
 			showCur();
@@ -158,7 +158,7 @@ void Room33::use_maschine() {
 		}
 
 		start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(dia_nr, -1);
+		startAadWait(dia_nr);
 
 		if (_G(spieler).R33MunterOk) {
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -166,7 +166,7 @@ void Room33::use_maschine() {
 			flic_cut(FCUT_031);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(71, -1);
+			startAadWait(71);
 			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
@@ -178,7 +178,7 @@ void Room33::use_maschine() {
 
 		_G(spieler).PersonHide[P_CHEWY] = false;
 	} else {
-		startAadWait(70, -1);
+		startAadWait(70);
 	}
 
 	showCur();
@@ -208,7 +208,7 @@ int16 Room33::get_munter() {
 		_G(atds)->set_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		_G(det)->hideStaticSpr(3);
 		start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(72, -1);
+		startAadWait(72);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 380a56317a3..861e72f06e7 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -61,7 +61,7 @@ int16 Room35::schublade() {
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			setPersonPos(33, 90, P_CHEWY, P_LEFT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(93, -1);
+			startAadWait(93);
 			_G(spieler).PersonHide[P_CHEWY] = false;
 			_G(atds)->set_ats_str(234, 2, ATS_DATA);
 		}
@@ -83,7 +83,7 @@ int16 Room35::use_cat() {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
 			flic_cut(FCUT_045);
 			start_spz(CH_TRANS, 1, ANI_FRONT, P_CHEWY);
-			startAadWait(94, -1);
+			startAadWait(94);
 		} else if (is_cur_inventar(PUTENKEULE_INV)) {
 			action_flag = true;
 			disable_timer();
@@ -108,7 +108,7 @@ int16 Room35::use_cat() {
 			_G(det)->set_static_ani(0, -1);
 			enable_timer();
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(95, -1);
+			startAadWait(95);
 		}
 	}
 
@@ -131,13 +131,13 @@ void Room35::talk_cat() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		switch_room(36);
 		showCur();
-		start_ads_wait(dia_nr);
+		startAdsWait(dia_nr);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		switch_room(35);
 
 	} else {
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(96, -1);
+		startAadWait(96);
 	}
 
 	showCur();
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index b36ab8ee898..6776023c0f5 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -81,7 +81,7 @@ void Room37::gedAction(int index) {
 			stopPerson(P_CHEWY);
 			_G(spieler).R37Mes = true;
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(142, -1);
+			startAadWait(142);
 		}
 	}
 }
@@ -111,7 +111,7 @@ short Room37::use_wippe() {
 			_G(flags).NoScroll = true;
 			auto_scroll(129, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(159, -1);
+			startAadWait(159);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_047);
 			_G(flags).NoScroll = false;
@@ -123,7 +123,7 @@ short Room37::use_wippe() {
 
 		} else {
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(160, -1);
+			startAadWait(160);
 		}
 	}
 
@@ -173,7 +173,7 @@ int16 Room37::use_glas() {
 			_G(flags).NoScroll = true;
 			auto_scroll(146, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(147, -1);
+			startAadWait(147);
 			del_inventar(_G(spieler).AkInvent);
 			flic_cut(FCUT_048);
 			flic_cut(FCUT_049);
@@ -185,7 +185,7 @@ int16 Room37::use_glas() {
 			_G(obj)->show_sib(SIB_HFUTTER2_R37);
 			_G(spieler).R37Gebiss = true;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(146, -1);
+			startAadWait(146);
 			showCur();
 			_G(flags).NoScroll = false;
 			g_engine->_sound->playSound(3);
@@ -258,7 +258,7 @@ void Room37::dog_bell() {
 
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(dia_nr, -1);
+			startAadWait(dia_nr);
 		}
 	}
 
@@ -274,7 +274,7 @@ void Room37::talk_hahn() {
 	if (!_G(spieler).R37TransHahn) {
 		_G(cur_hide_flag) = 0;
 		hideCur();
-		startAadWait(145, -1);
+		startAadWait(145);
 		showCur();
 	} else {
 		hahn_dia();
@@ -328,13 +328,13 @@ void Room37::use_hahn() {
 			_G(atds)->set_steuer_bit(256, ATS_AKTIV_BIT, ATS_DATA);
 			_G(det)->hideStaticSpr(8);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(141, -1);
+			startAadWait(141);
 			_G(obj)->addInventory(EIER_INV, &_G(room_blk));
 			inventory_2_cur(EIER_INV);
 			showCur();
 		}
 	} else if (_G(spieler).inv_cur) {
-		startAadWait(143, -1);
+		startAadWait(143);
 	}
 }
 
@@ -345,7 +345,7 @@ void Room37::hahn_dia() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	switch_room(38);
-	start_ads_wait(9);
+	startAdsWait(9);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = tmp_scrollx;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 138470a8d46..cda0511e56e 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -82,7 +82,7 @@ short Room39::use_howard() {
 				autoMove(3, P_CHEWY);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				_G(det)->startDetail(6, 255, ANI_FRONT);
-				startAadWait(170, -1);
+				startAadWait(170);
 				_G(det)->stop_detail(6);
 				startSetailWait(7, 1, ANI_FRONT);
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -91,12 +91,12 @@ short Room39::use_howard() {
 				_G(det)->stop_detail(1);
 				startAniBlock(2, ABLOCK33);
 				start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
-				startAadWait(167, -1);
+				startAadWait(167);
 				_G(det)->stop_detail(3);
 				startSetailWait(4, 1, ANI_FRONT);
 				_G(det)->set_static_ani(5, -1);
 				_G(atds)->set_ats_str(62, 1, ATS_DATA);
-				startAadWait(169, -1);
+				startAadWait(169);
 				showCur();
 
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10012;
@@ -120,7 +120,7 @@ short Room39::use_howard() {
 
 		if (dia_nr != -1) {
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(dia_nr, -1);
+			startAadWait(dia_nr);
 			action_flag = true;
 		}
 
@@ -142,7 +142,7 @@ void Room39::talk_howard() {
 		}
 	} else {
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(168, -1);
+		startAadWait(168);
 	}
 }
 
@@ -158,7 +158,7 @@ void Room39::ok() {
 	invent_2_slot(BRIEF_INV);
 
 	switch_room(27);
-	startAadWait(192, -1);
+	startAadWait(192);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
 }
@@ -232,7 +232,7 @@ int16 Room39::use_tv() {
 			_G(out)->setPalette(_G(pal));
 			set_tv();
 			start_spz(CH_TRANS, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(80, -1);
+			startAadWait(80);
 
 			ani_nr = CH_TRANS;
 			dia_nr = 77;
@@ -248,7 +248,7 @@ int16 Room39::use_tv() {
 		if (_G(spieler).R39TvOn) {
 			if (_G(spieler).R39TranslatorUsed) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
-				startAadWait(98, -1);
+				startAadWait(98);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				startAniBlock(2, ABLOCK29);
 				_G(spieler).PersonHide[P_CHEWY] = false;
@@ -277,7 +277,7 @@ int16 Room39::use_tv() {
 	if (dia_nr != -1) {
 		if (ani_nr != -1)
 			start_spz(ani_nr, 255, ANI_FRONT, P_CHEWY);
-		startAadWait(dia_nr, -1);
+		startAadWait(dia_nr);
 		action_flag = true;
 	}
 
@@ -324,7 +324,7 @@ void Room39::look_tv(bool cls_mode) {
 				_G(flags).NoPalAfterFlc = false;
 
 				if (_G(spieler).R39TranslatorUsed && dia_nr == 85)
-					startAadWait(dia_nr, -1);
+					startAadWait(dia_nr);
 			}
 		}
 
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 5a1e9e62b1e..5f388ad27e9 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -122,7 +122,7 @@ void Room40::xit(int16 eib_nr) {
 				_G(uhr)->enableTimer();
 
 				_G(maus_links_click) = false;
-				startAadWait(238, -1);
+				startAadWait(238);
 				move_train(1);
 				register_cutscene(15);
 				
@@ -166,7 +166,7 @@ void Room40::move_train(int16 mode) {
 	auto_scroll(232, 0);
 
 	if (!mode)
-		startAadWait(206, -1);
+		startAadWait(206);
 
 	int16 lx = -40;
 	int16 ax = -230;
@@ -204,7 +204,7 @@ void Room40::move_train(int16 mode) {
 	_G(det)->hideStaticSpr(12);
 
 	if (!mode) {
-		startAadWait(207, -1);
+		startAadWait(207);
 		auto_scroll(180, 0);
 	}
 	
@@ -282,13 +282,13 @@ void Room40::setup_func() {
 					hideCur();
 					_G(spieler).R40PoliceWeg = true;
 					_G(det)->startDetail(17, 255, ANI_FRONT);
-					startAadWait(226, -1);
+					startAadWait(226);
 					_G(det)->stop_detail(17);
 					_G(spieler).R40HoUse = true;
 					_G(person_end_phase)[P_CHEWY] = P_RIGHT;
 					startSetailWait(10, 1, ANI_FRONT);
 					_G(person_end_phase)[P_HOWARD] = P_RIGHT;
-					startAadWait(224, -1);
+					startAadWait(224);
 					_G(spieler).R40PoliceWeg = true;
 					showCur();
 
@@ -327,7 +327,7 @@ int16 Room40::use_mr_pumpkin() {
 				del_inventar(_G(spieler).AkInvent);
 				startSetailWait(15, 1, ANI_FRONT);
 				start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-				startAadWait(200, -1);
+				startAadWait(200);
 				break;
 
 			case RECORDER_INV:
@@ -347,10 +347,10 @@ int16 Room40::use_mr_pumpkin() {
 						_G(obj)->addInventory(LIKOER2_INV, &_G(room_blk));
 						inventory_2_cur(LIKOER2_INV);
 						switch_room(40);
-						startAadWait(236, -1);
+						startAadWait(236);
 					}
 				} else {
-					startAadWait(228 + _G(spieler).R39TvRecord, -1);
+					startAadWait(228 + _G(spieler).R39TvRecord);
 				}
 				break;
 
@@ -376,7 +376,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 
 		if (_G(spieler).R40PoliceAniStatus != 255) {
 			start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
-			startAadWait(204, -1);
+			startAadWait(204);
 
 			while (_G(spieler).R40PoliceAniStatus != 255) {
 				setupScreen(DO_SETUP);
@@ -399,7 +399,7 @@ int16 Room40::use_schalter(int16 aad_nr) {
 		_G(det)->hideStaticSpr(15);
 		startSetailWait(12, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 		_G(det)->del_static_ani(14);
 		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(15);
@@ -417,7 +417,7 @@ void Room40::talk_police() {
 		_G(spieler).R40PoliceStart = false;
 		_G(room)->set_timer_status(255, TIMER_STOP);
 		autoMove(7, P_CHEWY);
-		startAadWait(203, -1);
+		startAadWait(203);
 		_G(room)->set_timer_status(255, TIMER_START);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
 		showCur();
@@ -432,7 +432,7 @@ void Room40::talk_handler() {
 		_G(det)->del_static_ani(4);
 		_G(room)->set_timer_status(4, TIMER_STOP);
 		_G(det)->set_static_ani(3, -1);
-		startAadWait(202, -1);
+		startAadWait(202);
 		_G(det)->set_static_ani(4, -1);
 		_G(det)->del_static_ani(3);
 		_G(room)->set_timer_status(4, TIMER_START);
@@ -446,7 +446,7 @@ int16 Room40::use_haendler() {
 	if (_G(menu_item) == CUR_HOWARD && !_G(spieler).R40HaendlerOk) {
 		action_flag = true;
 		if (!_G(spieler).flags38_2) {
-			startAadWait(612, -1);
+			startAadWait(612);
 		} else {
 			hideCur();
 			invent_2_slot(DUENGER_INV);
@@ -457,7 +457,7 @@ int16 Room40::use_haendler() {
 			_G(atds)->set_steuer_bit(283, ATS_AKTIV_BIT, ATS_DATA);
 			autoMove(10, P_CHEWY);
 			autoMove(11, P_HOWARD);
-			startAadWait(208, -1);
+			startAadWait(208);
 			autoMove(6, P_HOWARD);
 			_G(flags).NoScroll = true;
 
@@ -465,18 +465,18 @@ int16 Room40::use_haendler() {
 			_G(det)->del_static_ani(4);
 			_G(room)->set_timer_status(4, TIMER_STOP);
 			_G(det)->set_static_ani(3, -1);
-			startAadWait(209, -1);
+			startAadWait(209);
 			_G(det)->del_static_ani(3);
 			_G(det)->set_static_ani(5, -1);
-			startAadWait(213, -1);
+			startAadWait(213);
 
 			if (_G(spieler).R28RKuerbis) {
 				_G(det)->del_static_ani(5);
 				_G(det)->set_static_ani(3, -1);
-				startAadWait(211, -1);
+				startAadWait(211);
 				_G(out)->ausblenden(0);
 				_G(out)->set_teilpalette(_G(pal), 255, 1);
-				startAadWait(212, -1);
+				startAadWait(212);
 				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
 				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
@@ -488,7 +488,7 @@ int16 Room40::use_haendler() {
 
 			} else {
 				autoMove(11, P_HOWARD);
-				startAadWait(210, -1);
+				startAadWait(210);
 			}
 
 			_G(menu_item) = CUR_WALK;
@@ -512,9 +512,9 @@ int16 Room40::use_bmeister() {
 		_G(spieler).R40HoUse = true;
 		autoMove(9, P_CHEWY);
 		autoMove(11, P_HOWARD);
-		startAadWait(214, -1);
+		startAadWait(214);
 		bmeister_dia(215);
-		startAadWait(216, -1);
+		startAadWait(216);
 		_G(spieler).R40HoUse = false;
 		_G(flags).NoScroll = false;
 		_G(menu_item) = CUR_WALK;
@@ -524,7 +524,7 @@ int16 Room40::use_bmeister() {
 	} else if (is_cur_inventar(LIKOER2_INV)) {
 		action_flag = true;
 		if (_G(spieler).flags37_80) {
-			startAadWait(605, -1);
+			startAadWait(605);
 		} else {
 			hideCur();
 			_G(spieler).R40HoUse = true;
@@ -551,13 +551,13 @@ void Room40::bmeister_dia(int16 aad_nr) {
 	_G(det)->set_static_ani(2, -1);
 
 	if (aad_nr == 237) {
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_062);
 		_G(fx_blend) = BLEND3;
-		startAadWait(375, -1);
+		startAadWait(375);
 	} else {
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 	}
 
 	_G(flags).NoPalAfterFlc = false;
@@ -581,11 +581,11 @@ bool Room40::use_police() {
 			_G(spieler).R40HoUse = true;
 			autoMove(9, P_CHEWY);
 			autoMove(11, P_HOWARD);
-			startAadWait(217, -1);
+			startAadWait(217);
 			autoMove(8, P_CHEWY);
 			goAutoXy(300, 120, P_HOWARD, ANI_WAIT);
 			_G(person_end_phase)[P_HOWARD] = P_RIGHT;
-			startAadWait(218, -1);
+			startAadWait(218);
 			start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
 			_G(menu_item) = CUR_WALK;
 			cursorChoice(_G(menu_item));
@@ -593,7 +593,7 @@ bool Room40::use_police() {
 			_G(flags).MausLinks = false;
 		}
 	} else {
-		startAadWait(225, -1);
+		startAadWait(225);
 	}
 
 	return result;
@@ -608,7 +608,7 @@ int16 Room40::use_tele() {
 
 		int16 dia_nr1 = -1;
 		if (!_G(spieler).R40PoliceAb) {
-			startAadWait(219, -1);
+			startAadWait(219);
 			_G(spieler).R40HoUse = false;
 
 		} else {
@@ -624,11 +624,11 @@ int16 Room40::use_tele() {
 				dia_nr1 = 223;
 			}
 
-			startAadWait(dia_nr, -1);
+			startAadWait(dia_nr);
 			autoMove(11, P_HOWARD);
 			_G(det)->hideStaticSpr(0);
 			autoMove(9, P_CHEWY);
-			startAadWait(dia_nr1, -1);
+			startAadWait(dia_nr1);
 			_G(spieler).R40HoUse = false;
 			int16 timer_wert = 0;
 
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index f3f9af9b083..658f369ccf4 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -47,7 +47,7 @@ void Room41::entry() {
 			startAniBlock(2, ABLOCK32);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(0, -1);
-			startAadWait(127, -1);
+			startAadWait(127);
 		} else {
 			_G(det)->startDetail(6, 255, ANI_FRONT);
 		}
@@ -99,23 +99,23 @@ void Room41::talk_hoggy1() {
 
 	} else if (!_G(spieler).R41Einbruch) {
 		showCur();
-		start_ads_wait(11);
+		startAdsWait(11);
 
 	} else if (_G(spieler).R41Einbruch) {
 		if (!_G(spieler).R41BruchInfo) {
 			_G(spieler).R41BruchInfo = true;
-			startAadWait(132, -1);
-			startAadWait(128, -1);
+			startAadWait(132);
+			startAadWait(128);
 		} else if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
-			startAadWait(131, -1);
+			startAadWait(131);
 			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 		} else {
-			startAadWait(130, -1);
+			startAadWait(130);
 		}
 	} else {
-		startAadWait(130, -1);
+		startAadWait(130);
 	}
 
 	start_hoggy();
@@ -131,15 +131,15 @@ void Room41::talk_hoggy2() {
 	} else if (_G(spieler).R41BruchInfo) {
 		if (_G(spieler).R31SurFurz && !_G(spieler).R41KuerbisInfo) {
 			_G(spieler).R41KuerbisInfo = true;
-			startAadWait(131, -1);
+			startAadWait(131);
 			autoMove(5, P_CHEWY);
 			new_invent_2_cur(TICKET_INV);
 
 		} else {
-			startAadWait(129, -1);
+			startAadWait(129);
 		}
 	} else {
-		startAadWait(129, -1);
+		startAadWait(129);
 	}
 
 	start_hoggy();
@@ -147,7 +147,7 @@ void Room41::talk_hoggy2() {
 
 void Room41::first_talk() {
 	_G(spieler).R41FirstTalk = true;
-	startAadWait(134, -1);
+	startAadWait(134);
 	_G(atds)->set_ats_str(266, TXT_MARK_NAME, 1, ATS_DATA);
 	_G(atds)->set_ats_str(265, TXT_MARK_NAME, 1, ATS_DATA);
 }
@@ -180,7 +180,7 @@ int16 Room41::use_kasse() {
 		action_flag = true;
 		stop_hoggy();
 		autoMove(1, P_CHEWY);
-		startAadWait(133, -1);
+		startAadWait(133);
 		start_hoggy();
 	}
 
@@ -217,7 +217,7 @@ int16 Room41::use_brief() {
 		action_flag = true;
 		stop_hoggy();
 		autoMove(6, P_CHEWY);
-		startAadWait(126, -1);
+		startAadWait(126);
 		start_hoggy();
 
 	} else if (is_cur_inventar(BRIEF2_INV)) {
@@ -225,7 +225,7 @@ int16 Room41::use_brief() {
 		autoMove(6, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		stop_hoggy();
-		startAadWait(186, -1);
+		startAadWait(186);
 		start_hoggy();
 		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
@@ -240,17 +240,17 @@ int16 Room41::use_brief() {
 
 void Room41::sub_dia() {
 	aadWait(-1);
-	startAadWait(161, -1);
+	startAadWait(161);
 
 	if (_G(spieler).R41LolaOk) {
-		startAadWait(163, -1);
+		startAadWait(163);
 		_G(atds)->hide_item(11, 0, 2);
 		stop_ads_dialog();
 		autoMove(5, P_CHEWY);
 		new_invent_2_cur(PAPIER_INV);
 
 	} else {
-		startAadWait(162, -1);
+		startAadWait(162);
 	}
 }
 
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index a0bacebf8c2..924830b766b 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -54,10 +54,10 @@ void Room42::entry() {
 		}
 
 		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && !_G(spieler).R42BriefOk)
-			startAadWait(302, -1);
+			startAadWait(302);
 
 		if (_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk)
-			startAadWait(301, -1);
+			startAadWait(301);
 	}
 }
 
@@ -82,7 +82,7 @@ void Room42::get_kuerbis(int16 aad_nr) {
 	startSetailWait(7, 1, ANI_BACK);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	startSetailWait(7, 1, ANI_FRONT);
@@ -106,15 +106,15 @@ int16 Room42::use_psack() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
-		startAadWait(187, -1);
+		startAadWait(187);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		startSetailWait(9, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		new_invent_2_cur(BMARKE_INV);
-		startAadWait(181, -1);
+		startAadWait(181);
 		_G(spieler).R42MarkeOk = true;
 		autoMove(4, P_CHEWY);
-		startAadWait(185, -1);
+		startAadWait(185);
 		_G(spieler).R42HoToBeamter = false;
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
@@ -123,7 +123,7 @@ int16 Room42::use_psack() {
 		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		del_inventar(_G(spieler).AkInvent);
-		startAadWait(183, -1);
+		startAadWait(183);
 		_G(obj)->calc_rsi_flip_flop(SIB_BKASTEN_R28);
 		_G(atds)->set_ats_str(206, 1, ATS_DATA);
 		_G(spieler).R28Briefkasten = true;
@@ -133,7 +133,7 @@ int16 Room42::use_psack() {
 
 	} else if (is_cur_inventar(BRIEF_INV)) {
 		action_flag = true;
-		startAadWait(182, -1);
+		startAadWait(182);
 	}
 
 	showCur();
@@ -148,7 +148,7 @@ int16 Room42::use_beamter() {
 		_G(atds)->set_ats_str(264, 2, ATS_DATA);
 		hideCur();
 		autoMove(4, P_CHEWY);
-		startAadWait(184, -1);
+		startAadWait(184);
 		_G(spieler).R42HoToBeamter = true;
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(_G(menu_item));
@@ -172,7 +172,7 @@ void Room42::talk_beamter() {
 		dia_nr = 14;
 	}
 
-	start_ads_wait(dia_nr);
+	startAdsWait(dia_nr);
 }
 
 void Room42::dia_beamter(int16 str_end_nr) {
@@ -228,7 +228,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 
 	_G(spieler).PersonHide[P_CHEWY] = true;
 	_G(det)->startDetail(6, 255, ANI_FRONT);
-	startAadWait(135, -1);
+	startAadWait(135);
 	_G(det)->stop_detail(6);
 	_G(flags).NoDiaBox = false;
 	_G(spieler).PersonHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index d0f24f66440..de2a6cee2f2 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -39,11 +39,11 @@ void Room43::night_small() {
 	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
-	startAadWait(188, -1);
+	startAadWait(188);
 	auto_scroll(320, 0);
-	startAadWait(189, -1);
+	startAadWait(189);
 	auto_scroll(0, 0);
-	startAadWait(190, -1);
+	startAadWait(190);
 	_G(spieler).ScrollxStep = 16;
 	auto_scroll(192, 0);
 
@@ -55,7 +55,7 @@ void Room43::night_small() {
 	}
 
 	_G(spieler).scrollx = 194;
-	startAadWait(191, -1);
+	startAadWait(191);
 	flic_cut(FCUT_058);
 	g_engine->_sound->stopSound(0);
 	_G(flags).NoScroll = false;
@@ -76,9 +76,9 @@ void Room43::catch_pg() {
 	hideCur();
 	_G(flags).NoScroll = true;
 	_G(spieler).ScrollxStep = 1;
-	startAadWait(234, -1);
+	startAadWait(234);
 	auto_scroll(194, 0);
-	startAadWait(235, -1);
+	startAadWait(235);
 	_G(spieler).R43GetPgLady = true;
 	flic_cut(FCUT_058);
 
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index 539c66f2edc..54b79bcdaf7 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -39,7 +39,7 @@ void Room44::look_news() {
 	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
 	_G(room)->load_room(&_G(room_blk), 44, &_G(spieler));
 
-	startAadWait(172, -1);
+	startAadWait(172);
 	_G(spieler).scrollx = tmpsx;
 	_G(spieler).scrolly = tmpsy;
 	switch_room(tmproom);
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index a6819b9ddf5..6d9b32ac420 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -201,7 +201,7 @@ void Room45::talk_taxi(int16 aad_nr) {
 	_G(det)->del_static_ani(12);
 	startSetailWait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 	_G(det)->del_static_ani(14);
 	startSetailWait(13, 1, ANI_BACK);
 	_G(det)->set_static_ani(12, -1);
@@ -244,7 +244,7 @@ int16 Room45::use_boy() {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
 			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATA);
-			startAadWait(258, -1);
+			startAadWait(258);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			startSetailWait(1, 1, ANI_FRONT);
@@ -253,7 +253,7 @@ int16 Room45::use_boy() {
 			_G(spieler).R45MagOk = true;
 		}
 	} else {
-		startAadWait(259, -1);
+		startAadWait(259);
 	}
 
 	showCur();
@@ -271,7 +271,7 @@ void Room45::talk_boy() {
 		aad_nr = 259;
 	}
 
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index d484769d076..c633a2507b0 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -56,11 +56,11 @@ void Room46::entry(int16 eib_nr) {
 
 			start_spz_wait(64, 1, false, P_CHEWY);
 			start_spz(65, 255, false, P_CHEWY);
-			startAadWait(494, -1);
+			startAadWait(494);
 			_G(spieler).SVal2 = 504;
 			switch_room(92);
 			start_spz(65, 255, false, P_CHEWY);
-			startAadWait(495, -1);
+			startAadWait(495);
 			_G(spieler).room_e_obj[78].Exit = 90;
 			showCur();
 		}
@@ -100,31 +100,31 @@ void Room46::bodo() {
 	hideCur();
 	_G(det)->showStaticSpr(0);
 	_G(person_end_phase)[P_CHEWY] = P_RIGHT;
-	startAadWait(240, -1);
+	startAadWait(240);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	goAutoXy(42, 76, P_CHEWY, ANI_WAIT);
-	startAadWait(250, -1);
+	startAadWait(250);
 	autoMove(1, P_CHEWY);
 	setPersonSpr(P_RIGHT, P_CHEWY);
-	startAadWait(251, -1);
+	startAadWait(251);
 	autoMove(2, P_CHEWY);
 
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	startSetailWait(0, 1, ANI_FRONT);
 	_G(det)->startDetail(5, 255, ANI_FRONT);
-	startAadWait(241, -1);
+	startAadWait(241);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(5);
-	startAadWait(609, -1);
+	startAadWait(609);
 	_G(det)->hideStaticSpr(5);
 	startSetailWait(2, 1, ANI_FRONT);
 	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->startDetail(4, 255, ANI_FRONT);
-	startAadWait(242, -1);
+	startAadWait(242);
 	_G(det)->stop_detail(4);
 
 	_G(det)->showStaticSpr(6);
-	startAadWait(610, -1);
+	startAadWait(610);
 	_G(det)->hideStaticSpr(6);
 	startSetailWait(6, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(3);
@@ -142,7 +142,7 @@ void Room46::bodo() {
 	_G(spieler).R28ChewyPump = false;
 	
 	setPersonPos(213, 118, P_CHEWY, P_RIGHT);
-	startAadWait(243, -1);
+	startAadWait(243);
 	invent_2_slot(UHR_INV);
 	invent_2_slot(RING_INV);
 	_G(spieler).R46GetLeder = true;
@@ -191,7 +191,7 @@ int16 Room46::use_schloss() {
 			autoMove(1, P_CHEWY);
 			switch_room(47);
 		} else {
-			startAadWait(252, -1);
+			startAadWait(252);
 		}
 	}
 
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 08df58487ae..6ec4bc67f66 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -79,7 +79,7 @@ void Room49::xit(int16 eib_nr) {
 			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
 		} else if (eib_nr == 81) {
 			_G(SetUpScreenFunc) = nullptr;
-			startAadWait(268, -1);
+			startAadWait(268);
 		}
 	}
 }
@@ -125,7 +125,7 @@ void Room49::calc_boy() {
 		_G(det)->set_static_ani(2, -1);
 
 		_G(SetUpScreenFunc) = nullptr;
-		startAadWait(262, -1);
+		startAadWait(262);
 		_G(SetUpScreenFunc) = nullptr;
 		autoMove(3, P_CHEWY);
 		goAutoXy(374, 79, P_HOWARD, ANI_WAIT);
@@ -192,7 +192,7 @@ void Room49::use_boy_cigar() {
 
 	_G(flags).NoScroll = false;
 	setPersonSpr(P_RIGHT, P_CHEWY);
-	startAadWait(264, -1);
+	startAadWait(264);
 	_G(room)->set_zoom(zoom);
 
 	_G(obj)->addInventory(GUM_INV, &_G(room_blk));
@@ -221,7 +221,7 @@ void Room49::talk_boy(int16 aad_nr) {
 		_G(det)->set_static_ani(2, -1);
 		_G(SetUpScreenFunc) = nullptr;
 		stopPerson(P_HOWARD);
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 		_G(SetUpScreenFunc) = setup_func;
 		_G(det)->del_static_ani(2);
 		_G(det)->set_static_ani(_G(spieler).R49BoyAni ? 1 : 0, -1);
@@ -233,7 +233,7 @@ void Room49::look_hotel() {
 	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
 		_G(SetUpScreenFunc) = nullptr;
 		stopPerson(P_HOWARD);
-		startAadWait(261, -1);
+		startAadWait(261);
 		_G(SetUpScreenFunc) = setup_func;
 	}
 }
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 383874861ce..fc3d430e5e9 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -45,7 +45,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(maus_links_click) = false;
 		setPersonPos(1, 64, P_HOWARD, P_RIGHT);
 		setPersonPos(92, 123, P_CHEWY, P_LEFT);
-		startAadWait(510, -1);
+		startAadWait(510);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
@@ -148,7 +148,7 @@ void Room50::calc_treppe() {
 			auto_scroll(40, 0);
 			stop_page();
 			_G(det)->set_static_ani(5, -1);
-			startAadWait(272, -1);
+			startAadWait(272);
 			autoMove(3, P_CHEWY);
 			aad_page(273, 5);
 			_G(flags).NoScroll = false;
@@ -173,7 +173,7 @@ int16 Room50::use_gutschein() {
 			startAniBlock(2, ABLOCK36);
 			aad_page(274, 8);
 		} else {
-			startAadWait(276, -1);
+			startAadWait(276);
 		}
 	}
 
@@ -206,12 +206,12 @@ int16 Room50::use_gum() {
 		startSetailWait(2, 1, ANI_BACK);
 		show_person();
 		setPersonSpr(P_LEFT, P_CHEWY);
-		startAadWait(275, -1);
+		startAadWait(275);
 		_G(det)->del_static_ani(5);
 		startSetailWait(9, 1, ANI_FRONT);
 		_G(det)->del_static_ani(5);
 		_G(det)->set_static_ani(10, -1);
-		startAadWait(277, -1);
+		startAadWait(277);
 		_G(SetUpScreenFunc) = setup_func;
 		autoMove(3, P_CHEWY);
 		_G(spieler_mi)[P_CHEWY].Mode = true;
@@ -230,12 +230,12 @@ int16 Room50::use_gum() {
 }
 
 void Room50::talk_page() {
-	startAadWait(276, -1);
+	startAadWait(276);
 }
 
 void Room50::aad_page(int16 aad_nr, int16 ani_nr) {
 	_G(det)->set_static_ani(ani_nr, -1);
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 	_G(det)->del_static_ani(ani_nr);
 	startSetailWait(6, 1, ANI_BACK);
 	go_page();
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5e6699c778c..5b2a661fe21 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -90,7 +90,7 @@ void Room51::entry() {
 				hideCur();
 				_G(spieler).R51FirstEntry = true;
 				setPersonSpr(P_LEFT, P_CHEWY);
-				startAadWait(283, -1);
+				startAadWait(283);
 				showCur();
 			}
 
@@ -152,22 +152,22 @@ void Room51::setup_func() {
 
 			switch (_index) {
 			case 2:
-				startAadWait(512, -1);
+				startAadWait(512);
 				_index = 1000;
 				break;
 
 			case 1006:
-				startAadWait(513, -1);
+				startAadWait(513);
 				_index = 2000;
 				break;
 
 			case 2003:
-				startAadWait(615, -1);
+				startAadWait(615);
 				_index = 10000;
 				break;
 
 			case 10012:
-				startAadWait(514, -1);
+				startAadWait(514);
 				waitShowScreen(5);
 				_G(flags).NoPalAfterFlc = true;
 				_G(out)->setPointer(nullptr);
@@ -223,7 +223,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				setPersonSpr(P_LEFT, P_HOWARD);
 				_G(spieler).R51HotelRoom = true;
 				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
-				startAadWait(285, -1);
+				startAadWait(285);
 				_G(atds)->set_ats_str(329, 1, ATS_DATA);
 				_G(SetUpScreenFunc) = setup_func;
 
@@ -244,16 +244,16 @@ int16 Room51::use_door(int16 txt_nr) {
 				_G(det)->startDetail(5, 255, ANI_FRONT);
 
 				if (!_G(spieler).R52HotDogOk) {
-					startAadWait(287, -1);
+					startAadWait(287);
 					autoMove(12, P_CHEWY);
 					_G(det)->stop_detail(5);
 					startAniBlock(5, ABLOCK37);
 					_G(det)->hideStaticSpr(1);
 					g_engine->_sound->stopSound(0);
-					startAadWait(284, -1);
+					startAadWait(284);
 				} else {
 					_G(spieler).R51KillerWeg = true;
-					startAadWait(290, -1);
+					startAadWait(290);
 					g_engine->_sound->stopSound(0);
 					_G(out)->ausblenden(1);
 					_G(out)->setPointer(nullptr);
@@ -272,10 +272,10 @@ int16 Room51::use_door(int16 txt_nr) {
 
 					_G(fx_blend) = BLEND3;
 					setupScreen(DO_SETUP);
-					startAadWait(291, -1);
+					startAadWait(291);
 				}
 			} else {
-				startAadWait(401, -1);
+				startAadWait(401);
 			}
 			break;
 
@@ -289,12 +289,12 @@ int16 Room51::use_door(int16 txt_nr) {
 			setPersonPos(115, 144, P_CHEWY, P_LEFT);
 			_G(fx_blend) = BLEND3;
 			setupScreen(NO_SETUP);
-			startAadWait(564, -1);
+			startAadWait(564);
 			break;
 
 		case 332:
 			autoMove(6, P_CHEWY);
-			startAadWait(286, -1);
+			startAadWait(286);
 			break;
 
 		case 333:
@@ -303,13 +303,13 @@ int16 Room51::use_door(int16 txt_nr) {
 			switch (_G(spieler).R51DoorCount) {
 			case 0:
 				_G(det)->showStaticSpr(3);
-				startAadWait(278, -1);
+				startAadWait(278);
 				startDetailFrame(0, 1, ANI_FRONT, 3);
 				start_spz(HO_BRILL_JMP, 1, ANI_FRONT, P_HOWARD);
 				waitDetail(0);
 
 				_G(det)->showStaticSpr(14);
-				startAadWait(279, -1);
+				startAadWait(279);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_FLASCHE_R51);
 				_G(obj)->calc_rsi_flip_flop(SIB_FLASCHE_R51);
@@ -318,7 +318,7 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			case 1:
 				_G(det)->showStaticSpr(3);
-				startAadWait(280, -1);
+				startAadWait(280);
 				startSetailWait(1, 1, ANI_FRONT);
 				++_G(spieler).R51DoorCount;
 				_G(obj)->show_sib(SIB_KAPPE_R51);
@@ -328,9 +328,9 @@ int16 Room51::use_door(int16 txt_nr) {
 				break;
 
 			default:
-				startAadWait(281, -1);
+				startAadWait(281);
 				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
-					startAadWait(282, -1);
+					startAadWait(282);
 				break;
 			}
 			break;
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index c560b259f35..ca78194b102 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -86,7 +86,7 @@ int16 Room52::use_hot_dog() {
 		_G(atds)->set_ats_str(341, 1, ATS_DATA);
 		autoMove(2, P_CHEWY);
 		setPersonSpr(P_LEFT, P_CHEWY);
-		startAadWait(288, -1);
+		startAadWait(288);
 
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
@@ -109,7 +109,7 @@ int16 Room52::use_hot_dog() {
 		g_engine->_sound->stopSound(0);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATA);
-		startAadWait(303, -1);
+		startAadWait(303);
 		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATA);
 		_G(spieler).R52KakerWeg = true;
 	}
@@ -130,7 +130,7 @@ void Room52::kaker_platt() {
 		_G(spieler).R52KakerJoke = true;
 		stopPerson(P_CHEWY);
 		hideCur();
-		startAadWait(289, -1);
+		startAadWait(289);
 		showCur();
 	}
 }
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 9d6b6038ffe..56bcf4d15d7 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -66,7 +66,7 @@ void Room53::talk_man() {
 	_G(det)->del_static_ani(1);
 	startSetailWait(2, 1, ANI_FRONT);
 	_G(det)->set_static_ani(3, -1);
-	startAadWait(269 + (_G(spieler).R53Kostuem ? 1 : 0), -1);
+	startAadWait(269 + (_G(spieler).R53Kostuem ? 1 : 0));
 	_G(det)->del_static_ani(3);
 	startSetailWait(4, 1, ANI_FRONT);
 	man_go();
@@ -82,7 +82,7 @@ int16 Room53::use_man() {
 		_G(spieler).R53Kostuem = true;
 		del_inventar(_G(spieler).AkInvent);
 		autoMove(2, P_CHEWY);
-		startAadWait(271, -1);
+		startAadWait(271);
 		_G(room)->set_timer_status(1, TIMER_STOP);
 		_G(det)->del_static_ani(1);
 		startAniBlock(7, ABLOCK35);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 4dc7607ecce..b7f9e05c01b 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -71,7 +71,7 @@ void Room54::entry(int16 eib_nr) {
 		}
 
 		if (_G(spieler).R55ExitDia) {
-			startAadWait(_G(spieler).R55ExitDia, -1);
+			startAadWait(_G(spieler).R55ExitDia);
 			showCur();
 			_G(spieler).R55ExitDia = false;
 		}
@@ -144,7 +144,7 @@ int16 Room54::use_schalter() {
 
 			startSetailWait(1, 1, ANI_FRONT);
 			_G(det)->startDetail(3, 255, ANI_FRONT);
-			startAadWait(292 + _G(spieler).R54LiftCount, -1);
+			startAadWait(292 + _G(spieler).R54LiftCount);
 			_G(det)->stop_detail(3);
 			++_G(spieler).R54LiftCount;
 
@@ -170,11 +170,11 @@ int16 Room54::use_schalter() {
 				_G(atds)->set_ats_str(351, 1, ATS_DATA);
 			}
 
-			startAadWait(aad_nr, -1);
+			startAadWait(aad_nr);
 			_G(spieler).R54HowardVorne = 0;
 
 		} else {
-			startAadWait(297, -1);
+			startAadWait(297);
 		}
 
 		showCur();
@@ -197,18 +197,18 @@ void Room54::talk_verkauf() {
 		_G(spieler).R54HotDogOk = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
-		startAadWait(299, -1);
+		startAadWait(299);
 		_G(room)->set_timer_status(6, TIMER_STOP);
 		_G(det)->del_static_ani(6);
 		startSetailWait(7, 1, ANI_FRONT);
 		_G(det)->startDetail(8, 255, ANI_FRONT);
-		startAadWait(310, -1);
+		startAadWait(310);
 
 		_G(det)->stop_detail(8);
 		startSetailWait(9, 1, ANI_FRONT);
 		startSetailWait(10, 1, ANI_FRONT);
 		_G(det)->startDetail(11, 255, ANI_FRONT);
-		startAadWait(311, -1);
+		startAadWait(311);
 		_G(det)->stop_detail(11);
 		_G(room)->set_timer_status(6, TIMER_START);
 		_G(det)->set_static_ani(6, -1);
@@ -218,7 +218,7 @@ void Room54::talk_verkauf() {
 		_G(obj)->addInventory(BURGER_INV, &_G(room_blk));
 		inventory_2_cur(BURGER_INV);
 	} else {
-		startAadWait(313, -1);
+		startAadWait(313);
 	}
 
 	showCur();
@@ -233,7 +233,7 @@ int16 Room54::use_zelle() {
 			action_ret = true;
 
 			if (!_G(spieler).R54Schild) {
-				startAadWait(318, -1);
+				startAadWait(318);
 			} else {
 				autoMove(5, P_CHEWY);
 				_G(spieler).R54HowardVorne = 1;
@@ -249,9 +249,9 @@ int16 Room54::use_zelle() {
 
 				setPersonPos(283, 93, P_CHEWY, P_LEFT);
 				setPersonPos(238, 99, P_HOWARD, P_RIGHT);
-				startAadWait(315, -1);
+				startAadWait(315);
 				goAutoXy(241, 74, P_CHEWY, ANI_WAIT);
-				startAadWait(316, -1);
+				startAadWait(316);
 
 				_G(spieler_mi)[P_HOWARD].Mode = true;
 				switch_room(55);
@@ -261,7 +261,7 @@ int16 Room54::use_zelle() {
 		action_ret = true;
 		autoMove(6, P_CHEWY);
 		_G(spieler).R54HowardVorne = 1;
-		startAadWait(319, -1);
+		startAadWait(319);
 	}
 
 	showCur();
@@ -284,7 +284,7 @@ int16 Room54::use_azug() {
 			if (_G(spieler).R54FputzerWeg) {
 				autoMove(8, P_CHEWY);
 				_G(spieler).R54HowardVorne = 0;
-				startAadWait(298, -1);
+				startAadWait(298);
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				_G(det)->showStaticSpr(12);
 				_G(spieler).R55Location = true;
@@ -316,7 +316,7 @@ int16 Room54::use_azug() {
 				switch_room(55);
 			}
 		} else {
-			startAadWait(314, -1);
+			startAadWait(314);
 		}
 
 		showCur();
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index e27e2421977..edf54288a74 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -144,7 +144,7 @@ int16 Room55::use_stapel1() {
 
 		} else if (_G(spieler).R55EscScriptOk && !_G(spieler).R55RaumOk) {
 			action_ret = true;
-			startAadWait(333, -1);
+			startAadWait(333);
 		}
 	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
@@ -156,7 +156,7 @@ int16 Room55::use_stapel1() {
 			del_inventar(_G(spieler).AkInvent);
 			_G(atds)->set_ats_str(354, 2, ATS_DATA);
 		} else {
-			startAadWait(326, -1);
+			startAadWait(326);
 		}
 	}
 	showCur();
@@ -170,7 +170,7 @@ int16 Room55::use_stapel2() {
 	if (is_cur_inventar(MANUSKRIPT_INV)) {
 		action_ret = true;
 		hideCur();
-		startAadWait(327, -1);
+		startAadWait(327);
 		showCur();
 	}
 
@@ -190,7 +190,7 @@ int16 Room55::use_telefon() {
 				_G(spieler).PersonHide[P_CHEWY] = true;
 				startSetailWait(10, 1, ANI_FRONT);
 				_G(det)->startDetail(11, 255, ANI_FRONT);
-				startAadWait(329, -1);
+				startAadWait(329);
 				_G(det)->stop_detail(11);
 				startSetailWait(10, 1, ANI_BACK);
 
@@ -198,15 +198,15 @@ int16 Room55::use_telefon() {
 				autoMove(7, P_CHEWY);
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
-				startAadWait(330, -1);
+				startAadWait(330);
 				_G(det)->showStaticSpr(8);
 				startSetailWait(0, 1, ANI_FRONT);
 				_G(det)->startDetail(1, 255, ANI_FRONT);
-				startAadWait(331, -1);
+				startAadWait(331);
 				_G(det)->stop_detail(1);
 
 				_G(det)->showStaticSpr(16);
-				startAadWait(608, -1);
+				startAadWait(608);
 				_G(det)->hideStaticSpr(16);
 				startSetailWait(2, 1, ANI_FRONT);
 				_G(det)->hideStaticSpr(0);
@@ -219,9 +219,9 @@ int16 Room55::use_telefon() {
 				setPersonPos(66, 73, P_HOWARD, P_RIGHT);
 				_G(SetUpScreenFunc) = nullptr;
 				_G(det)->set_static_ani(18, -1);
-				startAadWait(334, -1);
-				startAadWait(335, -1);
-				startAadWait(336, -1);
+				startAadWait(334);
+				startAadWait(335);
+				startAadWait(336);
 				const int16 tmp_delay = _G(spieler).DelaySpeed;
 
 				for (int16 i = 0; i < 7; i++) {
@@ -258,12 +258,12 @@ int16 Room55::use_telefon() {
 				switch_room(54);
 			} else {
 				hideCur();
-				startAadWait(332, -1);
+				startAadWait(332);
 				showCur();
 			}
 		} else {
 			hideCur();
-			startAadWait(328, -1);
+			startAadWait(328);
 			showCur();
 		}
 	}
@@ -280,7 +280,7 @@ void Room55::get_job() {
 	switch_room(61);
 
 	showCur();
-	start_ads_wait(15);
+	startAdsWait(15);
 	_G(spieler).PersonHide[P_CHEWY] = false;
 	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = oldScrollx;
@@ -361,7 +361,7 @@ int16 Room55::use_kammeraus() {
 		action_ret = true;
 
 		if (!_G(spieler).R52KakerWeg)
-			startAadWait(325, -1);
+			startAadWait(325);
 		else if (!_G(spieler).R55SekWeg) {
 			hideCur();
 			_G(spieler).PersonHide[P_CHEWY] = true;
@@ -445,7 +445,7 @@ void Room55::talk_line() {
 		_G(spieler).R55ExitDia = 324;
 	}
 
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 
 	if (_G(spieler).R55SekWeg) {
 		_G(det)->del_static_ani(16);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 0e2cb14324a..1147606fc00 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -100,7 +100,7 @@ void Room56::entry() {
 			_G(maus_links_click) = false;
 			_G(atds)->stop_aad();
 			hideCur();
-			startAadWait(306, -1);
+			startAadWait(306);
 			showCur();
 			flic_cut(FCUT_076);
 			mode = 1;
@@ -239,10 +239,10 @@ int16 Room56::use_taxi() {
 void Room56::talk_man() {
 	autoMove(3, P_CHEWY);
 	if (!_G(spieler).R56AbfahrtOk) {
-		start_ads_wait(16);
+		startAdsWait(16);
 	} else if (!_G(spieler).R62Flucht) {
 		hideCur();
-		startAadWait(343, -1);
+		startAadWait(343);
 		showCur();
 	}
 }
@@ -263,7 +263,7 @@ int16 Room56::use_man() {
 		startSetailWait(4, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(5, -1);
-		startAadWait(304, -1);
+		startAadWait(304);
 		_G(det)->del_static_ani(5);
 		_G(room)->set_timer_status(0, TIMER_START);
 		_G(det)->set_static_ani(0, -1);
@@ -273,7 +273,7 @@ int16 Room56::use_man() {
 		startSetailWait(6, 1, ANI_FRONT);
 
 		_G(det)->set_static_ani(1, -1);
-		startAadWait(305, -1);
+		startAadWait(305);
 		_G(det)->del_static_ani(1);
 	}
 	_G(room)->set_timer_status(0, TIMER_START);
@@ -290,7 +290,7 @@ int16 Room56::use_kneipe() {
 			action_ret = true;
 			hideCur();
 			if (_G(spieler).R56Kneipe) {
-				startAadWait(344, -1);
+				startAadWait(344);
 			} else {
 				_G(SetUpScreenFunc) = nullptr;
 				autoMove(4, P_CHEWY);
@@ -305,7 +305,7 @@ int16 Room56::use_kneipe() {
 				g_engine->_sound->stopSound(0);
 				g_engine->_sound->playSound(9);
 				_G(det)->startDetail(10, 6, ANI_FRONT);
-				startAadWait(307, -1);
+				startAadWait(307);
 				_G(det)->stop_detail(10);
 				g_engine->_sound->playSound(10, 0);
 				_G(out)->ausblenden(0);
@@ -316,13 +316,13 @@ int16 Room56::use_kneipe() {
 				setPersonPos(23, 70, P_HOWARD, P_RIGHT);
 				setPersonPos(50, 81, P_CHEWY, P_LEFT);
 				_G(fx_blend) = BLEND3;
-				startAadWait(308, -1);
+				startAadWait(308);
 
 				_G(SetUpScreenFunc) = setup_func;
 				_G(flags).NoScroll = false;
 				if (_G(obj)->checkInventory(SACKGELD_INV)) {
 					remove_inventory(SACKGELD_INV);
-					startAadWait(309, -1);
+					startAadWait(309);
 				}
 			}
 			showCur();
@@ -334,16 +334,16 @@ int16 Room56::use_kneipe() {
 			autoMove(4, P_CHEWY);
 			flic_cut(FCUT_111);
 			_G(fx_blend) = BLEND3;
-			startAadWait(522, -1);
+			startAadWait(522);
 			start_spz_wait(66, 1, false, P_CHEWY);
 			start_spz(67, 255, false, P_CHEWY);
-			startAadWait(524, -1);
+			startAadWait(524);
 			_G(spieler).SVal1 = 56;
 			_G(spieler).SVal2 = 523;
 			cur_2_inventory();
 			switch_room(92);
 		} else {
-			startAadWait(518, -1);
+			startAadWait(518);
 		}
 		showCur();
 	} else if (_G(menu_item) == 0 || _G(menu_item) == 2 || (_G(menu_item) == 1 && !_G(spieler).inv_cur)){
@@ -351,7 +351,7 @@ int16 Room56::use_kneipe() {
 		action_ret = 1;
 		_G(maus_links_click) = false;
 		autoMove(4, P_CHEWY);
-		startAadWait(521, -1);
+		startAadWait(521);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 254a14b395b..d854a01e9ae 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -118,21 +118,21 @@ int16 Room57::use_pfoertner() {
 	if (is_cur_inventar(CUTMAG_INV)) {
 		action_ret = true;
 		if (_G(spieler).flags37_10)
-			startAadWait(596, -1);
+			startAadWait(596);
 		else {
 			_G(spieler).flags37_10 = true;
-			startAadWait(339, -1);
+			startAadWait(339);
 			new_invent_2_cur(BESTELL_INV);
 		}
 	} else if (is_cur_inventar(JMKOST_INV)) {
 		action_ret = true;
-		startAadWait(340, -1);
+		startAadWait(340);
 	} else if (is_cur_inventar(EINLAD_INV)) {
 		action_ret = true;
 		_G(SetUpScreenFunc) = nullptr;
 		goAutoXy(132, 130, P_HOWARD, ANI_WAIT);
 		if (_G(spieler).R56AbfahrtOk) {
-			startAadWait(341, -1);
+			startAadWait(341);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 			del_inventar(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
@@ -142,7 +142,7 @@ int16 Room57::use_pfoertner() {
 			g_engine->_sound->stopSound(0);
 			_G(atds)->set_steuer_bit(358, ATS_AKTIV_BIT, ATS_DATA);
 		} else {
-			startAadWait(349, -1);
+			startAadWait(349);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 		}
 		_G(SetUpScreenFunc) = setup_func;
@@ -164,7 +164,7 @@ void Room57::talk_pfoertner() {
 		aad_nr = 338;
 	} else
 		aad_nr = 342;
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 	_G(room)->set_timer_status(1, TIMER_START);
 	_G(det)->set_static_ani(1, -1);
 	showCur();
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 5908b78ce8f..1d83d2f113f 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -40,22 +40,22 @@ void Room62::entry() {
 		_G(spieler).R62FirstEntry = true;
 		setPersonPos(49, 113, P_HOWARD, P_RIGHT);
 		_G(det)->startDetail(6, 255, ANI_FRONT);
-		startAadWait(345, -1);
+		startAadWait(345);
 		_G(det)->stop_detail(6);
 		_G(det)->set_static_ani(5, -1);
 		goAutoXy(199, 59, P_HOWARD, ANI_WAIT);
 		setPersonSpr(0, P_HOWARD);
 		_G(det)->del_static_ani(5);
 		_G(det)->startDetail(5, 255, ANI_FRONT);
-		startAadWait(346, -1);
+		startAadWait(346);
 		_G(det)->stop_detail(5);
 		_G(det)->startDetail(6, 255, ANI_FRONT);
-		startAadWait(347, -1);
+		startAadWait(347);
 		_G(det)->stop_detail(6);
 		startSetailWait(7, 1, ANI_FRONT);
 		_G(det)->set_static_ani(5, -1);
 		_G(det)->startDetail(0, 255, ANI_FRONT);
-		startAadWait(348, -1);
+		startAadWait(348);
 		_G(det)->stop_detail(0);
 		_G(det)->del_static_ani(0);
 		_G(det)->startDetail(1, 1, ANI_FRONT);
@@ -108,7 +108,7 @@ int16 Room62::use_laura() {
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(det)->startDetail(2, 255, ANI_FRONT);
 		_G(det)->startDetail(6, 255, ANI_FRONT);
-		startAadWait(399, -1);
+		startAadWait(399);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		flic_cut(FCUT_077);
 		showCur();
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 93d0cd6d9ce..313911c89c3 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -45,7 +45,7 @@ void Room63::entry() {
 		_G(det)->stop_detail(10);
 		_G(det)->startDetail(11, 255, ANI_FRONT);
 		auto_scroll(58, 0);
-		startAadWait(355, -1);
+		startAadWait(355);
 		_G(det)->stop_detail(11);
 		_G(det)->startDetail(10, 255, ANI_FRONT);
 		showCur();
@@ -140,10 +140,10 @@ void Room63::bork_platt() {
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	autoMove(6, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
-	startAadWait(370, -1);
+	startAadWait(370);
 	startSetailWait(4, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(13);
-	startAadWait(361, -1);
+	startAadWait(361);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
 	flic_cut(FCUT_079);
@@ -161,7 +161,7 @@ void Room63::talk_hunter() {
 	if (_G(spieler).R63Uhr)
 		_G(det)->hideStaticSpr(10);
 	_G(det)->startDetail(10, 255, ANI_FRONT);
-	startAadWait(356, -1);
+	startAadWait(356);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->showStaticSpr(10);
 		_G(det)->stop_detail(10);
@@ -176,7 +176,7 @@ void Room63::talk_regie() {
 		_G(det)->hideStaticSpr(12);
 	_G(det)->stop_detail(18);
 	_G(det)->startDetail(19, 255, ANI_FRONT);
-	startAadWait(357, -1);
+	startAadWait(357);
 	_G(det)->stop_detail(19);
 	if (_G(spieler).R63Uhr) {
 		_G(det)->showStaticSpr(12);
@@ -189,7 +189,7 @@ void Room63::talk_regie() {
 void Room63::talk_fx_man() {
 	hideCur();
 	autoMove(1, P_CHEWY);
-	startAadWait(358, -1);
+	startAadWait(358);
 	showCur();
 }
 
@@ -201,11 +201,11 @@ int16 Room63::use_fx_man() {
 		autoMove(1, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
 		remove_inventory(34);
-		startAadWait(359, -1);
+		startAadWait(359);
 		_G(det)->del_static_ani(5);
 		startSetailWait(6, 1, ANI_FRONT);
 		_G(det)->startDetail(7, 255, ANI_FRONT);
-		startAadWait(362, -1);
+		startAadWait(362);
 		_G(det)->stop_detail(7);
 		startSetailWait(8, 1, ANI_FRONT);
 		_G(spieler).R63FxMannWeg = true;
@@ -237,13 +237,13 @@ int16 Room63::use_schalter() {
 				startSetailWait(24, 1, ANI_FRONT);
 				_G(det)->showStaticSpr(1);
 				_G(det)->hideStaticSpr(2);
-				startAadWait(364, -1);
+				startAadWait(364);
 				_G(atds)->set_ats_str(385, 1, ATS_DATA);
 				showCur();
 			}
 		} else {
 			hideCur();
-			startAadWait(363, -1);
+			startAadWait(363);
 			showCur();
 		}
 	}
@@ -255,7 +255,7 @@ void Room63::talk_girl() {
 	_G(det)->stop_detail(12);
 	startSetailWait(13, 1, ANI_FRONT);
 	_G(det)->set_static_ani(14, -1);
-	start_ads_wait(17);
+	startAdsWait(17);
 	_G(det)->del_static_ani(14);
 	_G(det)->startDetail(12, 255, ANI_FRONT);
 }
@@ -270,10 +270,10 @@ int16 Room63::use_girl() {
 		_G(det)->stop_detail(12);
 		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
-		startAadWait(365, -1);
+		startAadWait(365);
 		_G(det)->del_static_ani(14);
 		_G(det)->startDetail(15, 255, ANI_FRONT);
-		startAadWait(360, -1);
+		startAadWait(360);
 		_G(det)->stop_detail(15);
 		startSetailWait(16, 1, ANI_FRONT);
 		_G(spieler).R63Uhr = true;
@@ -284,7 +284,7 @@ int16 Room63::use_girl() {
 		_G(atds)->set_ats_str(381, 1, ATS_DATA);
 		_G(atds)->set_ats_str(382, 1, ATS_DATA);
 		_G(atds)->set_steuer_bit(380, ATS_AKTIV_BIT, ATS_DATA);
-		startAadWait(367, -1);
+		startAadWait(367);
 		showCur();
 	}
 	return action_ret;
@@ -309,7 +309,7 @@ int16 Room63::use_aschenbecher() {
 				_G(det)->startDetail(18, 255, ANI_FRONT);
 				_G(det)->hideStaticSpr(10);
 				_G(det)->hideStaticSpr(12);
-				startAadWait(368, -1);
+				startAadWait(368);
 				flic_cut(FCUT_080);
 				_G(atds)->set_steuer_bit(381, ATS_AKTIV_BIT, ATS_DATA);
 				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATA);
@@ -321,9 +321,9 @@ int16 Room63::use_aschenbecher() {
 				switch_room(64);
 				_G(flags).NoScroll = false;
 			} else
-				startAadWait(369, -1);
+				startAadWait(369);
 		} else
-			startAadWait(366, -1);
+			startAadWait(366);
 		
 		showCur();
 	}
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index 7295e93320a..fe1d5209274 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -49,7 +49,7 @@ void Room64::entry() {
 			_G(spieler).R64Moni1Ani = 5;
 			calc_monitor();
 			hideCur();
-			startAadWait(354, -1);
+			startAadWait(354);
 			showCur();
 		}
 	} else
@@ -144,7 +144,7 @@ void Room64::talk_man(int16 aad_nr) {
 		_G(det)->del_static_ani(1);
 		_G(det)->stop_detail(1);
 		_G(det)->set_static_ani(2, -1);
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 		_G(det)->del_static_ani(2);
 		_G(room)->set_timer_status(1, TIMER_START);
 		_G(det)->set_static_ani(1, -1);
@@ -162,7 +162,7 @@ int16 Room64::use_tasche() {
 				start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 				new_invent_2_cur(GERAET_INV);
 				_G(atds)->set_steuer_bit(375, ATS_AKTIV_BIT, ATS_DATA);
-				startAadWait(353, -1);
+				startAadWait(353);
 			} else {
 				showCur();
 				return 0;
@@ -173,7 +173,7 @@ int16 Room64::use_tasche() {
 			_G(det)->del_static_ani(1);
 			_G(det)->stop_detail(1);
 			_G(det)->startDetail(6, 255, false);
-			startAadWait(352, -1);
+			startAadWait(352);
 			_G(det)->stop_detail(6);
 			_G(room)->set_timer_status(0, TIMER_START);
 			_G(det)->set_static_ani(1, -1);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index dcbbfe642ff..d1b6fa11a6e 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -48,10 +48,10 @@ void Room65::entry() {
 	if (_G(spieler).PersonDia[P_HOWARD] < 10000) {
 		_G(cur_hide_flag) = false;
 		hideCur();
-		startAadWait(_G(spieler).PersonDia[P_HOWARD], -1);
+		startAadWait(_G(spieler).PersonDia[P_HOWARD]);
 		showCur();
 	} else {
-		start_ads_wait(_G(spieler).PersonDia[P_HOWARD] - 10000);
+		startAdsWait(_G(spieler).PersonDia[P_HOWARD] - 10000);
 	}
 	_G(flags).LoadGame = true;
 	show_person();
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 4b829f4865b..f8eb8e8112a 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -48,10 +48,10 @@ void Room66::entry(int16 eib_nr) {
 		setPersonPos(598, 101, P_CHEWY, P_RIGHT);
 		setPersonPos(644, 82, P_NICHELLE, P_LEFT);
 		setPersonPos(623, 81, P_HOWARD, P_LEFT);
-		startAadWait(413, -1);
+		startAadWait(413);
 		autoMove(9, P_CHEWY);
 		_G(SetUpScreenFunc) = setup_func;
-		startAadWait(403, -1);
+		startAadWait(403);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(14);
@@ -61,8 +61,8 @@ void Room66::entry(int16 eib_nr) {
 		load_chewy_taf(CHEWY_NORMAL);
 		_G(spieler).PersonHide[P_CHEWY] = false;
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		startAadWait(404, -1);
-		startAadWait(415, -1);
+		startAadWait(404);
+		startAadWait(415);
 		showCur();
 	} else if (!_G(flags).LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
 		switch (eib_nr) {
@@ -144,13 +144,13 @@ void Room66::setup_func() {
 
 	_G(spieler).flags26_8 = true;
 	_G(det)->startDetail(9, 5, false);
-	startAadWait(405, -1);
+	startAadWait(405);
 }
 
 void Room66::talk1() {
 	hideCur();
 	autoMove(5, P_CHEWY);
-	startAadWait(407, -1);
+	startAadWait(407);
 	showCur();
 }
 
@@ -210,7 +210,7 @@ void Room66::proc8(int chewyAutoMovNr, int restartAniNr, int transitionAniNr, in
 	_G(room)->set_timer_status(restartAniNr, TIMER_STOP);
 	_G(det)->del_static_ani(restartAniNr);
 	_G(det)->set_static_ani(transitionAniNr, -1);
-	startAadWait(transitionDiaNr, -1);
+	startAadWait(transitionDiaNr);
 	_G(det)->del_static_ani(transitionAniNr);
 	_G(det)->set_static_ani(restartAniNr, -1);
 	_G(room)->set_timer_status(restartAniNr, TIMER_START);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 0a8dd7091f2..9d407444921 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -85,9 +85,9 @@ int16 Room67::use_grammo() {
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->startDetail(0, 255, ANI_FRONT);
 		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67)
-			startAadWait(376, -1);
+			startAadWait(376);
 		else
-			startAadWait(614, -1);
+			startAadWait(614);
 
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->stop_detail(0);
@@ -99,7 +99,7 @@ int16 Room67::use_grammo() {
 void Room67::look_brief() {
 	hideCur();
 	autoMove(3, P_CHEWY);
-	startAadWait(379, -1);
+	startAadWait(379);
 	showCur();
 }
 
@@ -132,7 +132,7 @@ void Room67::kostuem_aad(int16 aad_nr) {
 	if (_G(spieler).DiaAMov != -1) {
 		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 	showCur();
 }
 
@@ -148,10 +148,10 @@ int16 Room67::talk_papagei() {
 			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
 			_G(ssi)[2].Y = 10;
 			_G(atds)->set_split_win(2, &_G(ssi)[2]);
-			start_ads_wait(19);
+			startAdsWait(19);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_NICHELLE) {
-			startAadWait(380, -1);
+			startAadWait(380);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_TALK) {
 			autoMove(5, P_CHEWY);
@@ -160,7 +160,7 @@ int16 Room67::talk_papagei() {
 			_G(ssi)[2].X = 270 - _G(spieler).scrollx;
 			_G(ssi)[2].Y = 10;
 			_G(atds)->set_split_win(2, &_G(ssi)[2]);
-			start_ads_wait(18);
+			startAdsWait(18);
 			_G(room)->set_timer_status(1, TIMER_START);
 		} else if (_G(menu_item) == CUR_USE) {
 			hideCur();
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 59a9458f2d2..dd77e8d7482 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -150,7 +150,7 @@ void Room68::setup_func() {
 void Room68::look_kaktus() {
 	hideCur();
 	autoMove(6, P_CHEWY);
-	startAadWait(383, -1);
+	startAadWait(383);
 	showCur();
 }
 
@@ -165,12 +165,12 @@ void Room68::talk_indigo(int16 aad_nr) {
 	_G(det)->del_static_ani(8);
 	if (aad_nr == -1) {
 		_G(det)->set_static_ani(9, -1);
-		startAadWait(384 + (int16)_G(spieler).R68IndigoDia, -1);
+		startAadWait(384 + (int16)_G(spieler).R68IndigoDia);
 		_G(spieler).R68IndigoDia ^= 1;
 		_G(det)->del_static_ani(9);
 	} else {
 		_G(det)->set_static_ani(12, -1);
-		startAadWait(aad_nr, -1);
+		startAadWait(aad_nr);
 		_G(det)->del_static_ani(12);
 	}
 	_G(room)->set_timer_status(8, TIMER_START);
@@ -213,7 +213,7 @@ int16 Room68::use_indigo() {
 		}
 	} else if (is_cur_inventar(CLINT_1500_INV) || is_cur_inventar(CLINT_3000_INV)) {
 		action_flag = true;
-		startAadWait(393, -1);
+		startAadWait(393);
 	}
 	showCur();
 	return action_flag;
@@ -230,7 +230,7 @@ void Room68::talk_keeper() {
 	_G(ssi)[3].X = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(spieler).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
 	_G(ssi)[3].Y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(spieler).scrolly;
 	_G(atds)->set_split_win(3, &_G(ssi)[3]);
-	start_ads_wait(20);
+	startAdsWait(20);
 	_G(cur_hide_flag) = false;
 	hideCur();
 	_G(det)->del_static_ani(16);
@@ -272,7 +272,7 @@ void Room68::calc_diva() {
 			hideCur();
 			_G(spieler).R68Gutschein = true;
 			autoMove(4, P_CHEWY);
-			startAadWait(386, -1);
+			startAadWait(386);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			new_invent_2_cur(BAR_GUT_INV);
 			_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
@@ -327,7 +327,7 @@ int16 Room68::use_diva() {
 		_G(atds)->set_steuer_bit(407, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(412, ATS_AKTIV_BIT, ATS_DATA);
 		setPersonSpr(P_RIGHT, P_CHEWY);
-		startAadWait(402, -1);
+		startAadWait(402);
 	} else
 		action_flag = use_papagei();
 	showCur();
@@ -340,12 +340,12 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		autoMove(_G(spieler).DiaAMov, P_CHEWY);
 	}
 
-	startAadWait(aad_nr, -1);
+	startAadWait(aad_nr);
 
 	if (!_G(spieler).R68DivaWeg)
-		startAadWait(388, -1);
+		startAadWait(388);
 	else if (!_G(spieler).R67LiedOk)
-		startAadWait(389, -1);
+		startAadWait(389);
 	else {
 		if (_G(spieler).DisplayText == 0)
 			_G(sndPlayer)->fadeOut(5);
@@ -356,7 +356,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(spieler).PersonHide[P_NICHELLE] = true;
 		goAutoXy(161, 59, P_HOWARD, ANI_GO);
 		autoMove(4, P_CHEWY);
-		startAadWait(390, -1);
+		startAadWait(390);
 		startSetailWait(22, 1, ANI_FRONT);
 		_G(spieler).PersonHide[P_HOWARD] = true;
 		_G(det)->startDetail(27, 255, ANI_FRONT);
@@ -380,10 +380,10 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(det)->startDetail(24, 255, ANI_FRONT);
 		setPersonPos(26, 40, P_NICHELLE, P_RIGHT);
 		if (_G(spieler).DisplayText) {
-			startAadWait(391, -1);
+			startAadWait(391);
 		} else {
 			waitShowScreen(100);
-			startAadWait(602, -1);
+			startAadWait(602);
 			waitShowScreen(100);
 		}
 
@@ -391,17 +391,17 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		_G(det)->del_static_ani(8);
 		startSetailWait(10, 1, ANI_FRONT);
 		_G(det)->startDetail(11, 255, ANI_FRONT);
-		startAadWait(396, -1);
+		startAadWait(396);
 		_G(det)->stop_detail(11);
 		_G(det)->set_static_ani(12, -1);
-		startAadWait(611, -1);
+		startAadWait(611);
 		_G(det)->del_static_ani(12);
 		_G(det)->startDetail(14, 255, ANI_FRONT);
-		startAadWait(395, -1);
+		startAadWait(395);
 		_G(det)->stop_detail(14);
 		_G(room)->set_timer_status(8, TIMER_START);
 		_G(det)->set_static_ani(8, -1);
-		startAadWait(392, -1);
+		startAadWait(392);
 
 		g_engine->_sound->waitForSpeechToFinish();
 		
@@ -432,7 +432,7 @@ void Room68::talk_papagei() {
 	_G(ssi)[2].X = 60;
 	_G(ssi)[2].Y = 80;
 	_G(atds)->set_split_win(2, &_G(ssi)[2]);
-	start_ads_wait(18);
+	startAdsWait(18);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 3f54edc54f2..67bb0ffd0c9 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -78,7 +78,7 @@ void Room69::setup_func() {
 void Room69::look_schild() {
 	hideCur();
 	autoMove(1, P_CHEWY);
-	startAadWait(382, -1);
+	startAadWait(382);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 79be4905b55..17ada6f523f 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -185,7 +185,7 @@ int Room71::proc1() {
 	}
 
 	if (!_G(spieler).R71LeopardVined)
-		startAadWait(432, -1);
+		startAadWait(432);
 
 	showCur();
 	_G(flags).NoScroll = false;
@@ -193,8 +193,8 @@ int Room71::proc1() {
 }
 
 void Room71::proc2() {
-	startAadWait(432, -1);
-	startAadWait(433, -1);
+	startAadWait(432);
+	startAadWait(433);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(518, 35, P_HOWARD, ANI_GO);
 	goAutoXy(568, 36, P_NICHELLE, ANI_WAIT);
@@ -222,11 +222,11 @@ void Room71::proc2() {
 	_G(flags).NoScroll = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
-	startAadWait(434, -1);
+	startAadWait(434);
 }
 
 void Room71::proc3() {
-	startAadWait(431, -1);
+	startAadWait(431);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(510, 34, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
@@ -238,7 +238,7 @@ void Room71::proc3() {
 }
 
 void Room71::proc4() {
-	startAadWait(430, -1);
+	startAadWait(430);
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(518, 35, P_HOWARD, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
@@ -285,7 +285,7 @@ int Room71::proc6() {
 void Room71::proc7() {
 	hideCur();
 	autoMove(4, P_CHEWY);
-	startAadWait(429, -1);
+	startAadWait(429);
 	_G(SetUpScreenFunc) = nullptr;
 	setPersonSpr(P_LEFT, P_CHEWY);
 	goAutoXy(323, 28, P_NICHELLE, ANI_WAIT);
@@ -293,12 +293,12 @@ void Room71::proc7() {
 	auto_scroll(200, 0);
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(det)->startDetail(7, 255, false);
-	startAadWait(624, -1);
+	startAadWait(624);
 	_G(det)->stop_detail(7);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(flags).NoScroll = false;
-	startAadWait(432, -1);
+	startAadWait(432);
 
 	showCur();
 }
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index 1cbde46067f..a8d31e338b3 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -88,7 +88,7 @@ void Room72::proc1(int16 flicNr) {
 	_G(atds)->set_steuer_bit(389, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).flags28_10 = true;
 	waitShowScreen(7);
-	startAadWait(437, -1);
+	startAadWait(437);
 	flic_cut(flicNr);
 	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
 	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index e8e1fb284c3..72d17d405ad 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -103,7 +103,7 @@ void Room76::talk1() {
 	autoMove(4, P_CHEWY);
 	auto_scroll(172, 0);
 	const int diaNr = 425 + (_G(spieler).flags32_4 ? 1 : 0);
-	startAadWait(diaNr, -1);
+	startAadWait(diaNr);
 	showCur();
 }
 
@@ -126,7 +126,7 @@ void Room76::talk2() {
 }
 
 void Room76::proc3(int diaNr) {
-	startAadWait(diaNr, -1);
+	startAadWait(diaNr);
 	_G(det)->del_static_ani(2);
 	startSetailWait(3, 1, ANI_FRONT);
 	startSetailWait(4, 2, ANI_FRONT);
@@ -172,7 +172,7 @@ int Room76::proc6() {
 		hideCur();
 		retVal = 1;
 		setPersonSpr(P_RIGHT, P_CHEWY);
-		startAadWait(436, 1);
+		startAadWait(436);
 		showCur();
 	}
 
@@ -190,10 +190,10 @@ int Room76::proc7() {
 		del_inventar(_G(spieler).AkInvent);
 		invent_2_slot(106);
 		invent_2_slot(105);
-		startAadWait(444, -1);
+		startAadWait(444);
 		_G(out)->ausblenden(0);
 		_G(out)->set_teilpalette(_G(pal), 255, 1);
-		startAadWait(443, -1);
+		startAadWait(443);
 		_G(spieler).scrollx = 0;
 		_G(fx_blend) = BLEND3;
 		_G(out)->setPointer(nullptr);
@@ -204,18 +204,18 @@ int Room76::proc7() {
 		for (int i = 0; i < 3; ++i)
 			_G(det)->showStaticSpr(8 + i);
 
-		startAadWait(427, -1);
+		startAadWait(427);
 		showCur();
-		start_ads_wait(21);
+		startAdsWait(21);
 		hideCur();
-		startAadWait(428, -1);
+		startAadWait(428);
 		showCur();
 		_G(spieler).flags29_80 = true;
 		switch_room(78);
 	} else {
 		hideCur();
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		startAadWait(577, -1);
+		startAadWait(577);
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index a3981a2121d..6a9583ac76c 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -58,7 +58,7 @@ void Room77::entry() {
 		hideCur();
 		_G(spieler).scrollx = 62;
 		setPersonPos(158, 127, P_CHEWY, P_RIGHT);
-		startAadWait(440, -1);
+		startAadWait(440);
 		showCur();
 	}
 }
@@ -88,7 +88,7 @@ int Room77::proc1() {
 
 	cur_2_inventory();
 	start_spz(aniId, 255, false, P_CHEWY);
-	startAadWait(diaNr, -1);
+	startAadWait(diaNr);
 	showCur();
 	if (_G(spieler).flags29_10)
 		remove_inventory(103);
@@ -118,7 +118,7 @@ int Room77::proc2() {
 	}
 
 	start_spz(aniId, 255, false, P_CHEWY);
-	startAadWait(diaNr, -1);
+	startAadWait(diaNr);
 
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index d1f4c991a6e..0c32eb2a29a 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -46,7 +46,7 @@ void Room79::entry() {
 		setPersonPos(534, 75, P_NICHELLE, P_LEFT);
 		_G(spieler).scrollx = 300;
 		hideCur();
-		startAadWait(484, -1);
+		startAadWait(484);
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10026;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 		showCur();
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 40cc65e8e47..cc1a2c8dd76 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -78,12 +78,12 @@ void Room81::proc1() {
 		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
 		goAutoXy(112, 60, P_CHEWY, ANI_WAIT);
-		startAadWait(461, -1);
+		startAadWait(461);
 		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->startDetail(1, 255, false);
-		startAadWait(459, -1);
+		startAadWait(459);
 		_G(det)->stop_detail(1);
 		startSetailWait(0, 1, ANI_GO);
 		_G(spieler).PersonHide[P_CHEWY] = false;
@@ -99,7 +99,7 @@ void Room81::proc1() {
 	
 	if (diaNr != -1) {
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		startAadWait(diaNr, -1);
+		startAadWait(diaNr);
 	}
 
 	showCur();
@@ -129,7 +129,7 @@ int Room81::proc2() {
 	if (diaNr != -1) {
 		retVal = 1;
 		start_spz(aniId, 255, false, P_CHEWY);
-		startAadWait(diaNr, -1);
+		startAadWait(diaNr);
 		proc3();
 	}
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 4e02ee335f1..0bcc6211aa2 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -134,7 +134,7 @@ void Room82::talk1() {
 void Room82::talk2() {
 	hideCur();
 	autoMove(3, P_CHEWY);
-	startAadWait(453, -1);
+	startAadWait(453);
 	showCur();
 }
 
@@ -175,7 +175,7 @@ void Room82::proc4() {
 	_G(room)->set_timer_status(4, TIMER_STOP);
 	_G(det)->del_static_ani(4);
 	_G(det)->set_static_ani(5, 3);
-	startAadWait(445, -1);
+	startAadWait(445);
 	_G(det)->del_static_ani(5);
 	_G(det)->set_static_ani(4, -1);
 	_G(room)->set_timer_status(4, TIMER_START);
@@ -195,11 +195,11 @@ int Room82::proc6() {
 	autoMove(2, P_CHEWY);
 
 	if (_G(spieler).flags30_10) {
-		startAadWait(450, -1);
+		startAadWait(450);
 		_G(out)->ausblenden(0);
 		_G(out)->set_teilpalette(_G(pal), 255, 1);
 		_G(atds)->enableEvents(false);
-		startAadWait(598, -1);
+		startAadWait(598);
 		_G(atds)->enableEvents(true);
 		_G(det)->showStaticSpr(7);
 		_G(fx_blend) = BLEND3;
@@ -212,7 +212,7 @@ int Room82::proc6() {
 		remove_inventory(106);
 	} else {
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
-		startAadWait(276, -1);
+		startAadWait(276);
 	}
 
 	showCur();
@@ -222,7 +222,7 @@ int Room82::proc6() {
 void Room82::proc8() {
 	hideCur();
 	_G(spieler).flags30_10 = true;
-	startAadWait(447, -1);
+	startAadWait(447);
 	autoMove(6, P_CHEWY);
 
 	while (_G(spieler_vector)[P_NICHELLE].Count != 0)
@@ -230,10 +230,10 @@ void Room82::proc8() {
 
 	_G(spieler).PersonHide[P_NICHELLE] = true;
 	_G(det)->startDetail(10, 255, false);
-	startAadWait(625, -1);
+	startAadWait(625);
 	_G(det)->stop_detail(10);
 	_G(spieler).PersonHide[P_NICHELLE] = false;
-	startAadWait(448, -1);
+	startAadWait(448);
 	_G(det)->del_static_ani(4);
 	startSetailWait(6, 2, ANI_FRONT);
 	_G(det)->set_static_ani(4, -1);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 4a28e23e639..5a751b06ff6 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -87,7 +87,7 @@ void Room84::entry() {
 			setPersonPos(408, 113, P_HOWARD, P_LEFT);
 			_G(spieler).scrollx = 250;
 			if (_G(spieler).flags32_40) {
-				startAadWait(481, -1);
+				startAadWait(481);
 				_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
 			}
 		}
@@ -100,7 +100,7 @@ void Room84::entry() {
 		_G(spieler).room_e_obj[124].Attribut = 255;
 		_G(spieler).room_e_obj[125].Attribut = 255;
 		_G(atds)->set_ats_str(485, 2, ATS_DATA);
-		startAadWait(477, -1);
+		startAadWait(477);
 		showCur();
 	} else {
 		setPersonPos(263, 136, P_CHEWY, P_LEFT);
@@ -142,12 +142,12 @@ void Room84::setup_func() {
 		auto_scroll(150, 0);
 		_G(det)->del_static_ani(3);
 		_G(det)->set_static_ani(4, -1);
-		startAadWait(455, -1);
+		startAadWait(455);
 		_G(det)->del_static_ani(4);
 		start_spz(62, 1, false, P_HOWARD);
 		startSetailWait(5, 1, ANI_FRONT);
 		_G(det)->set_static_ani(3, -1);
-		startAadWait(456, -1);
+		startAadWait(456);
 		_G(flags).NoScroll = false;
 		showCur();
 	}
@@ -176,12 +176,12 @@ void Room84::talk1() {
 	_G(flags).NoScroll = true;
 	setPersonSpr(P_LEFT, P_CHEWY);
 	auto_scroll(150, 0);
-	start_ads_wait(22);
+	startAdsWait(22);
 	_G(flags).NoScroll = false;
 }
 
 void Room84::talk2() {
-	startAadWait(478, -1);
+	startAadWait(478);
 }
 
 int Room84::proc4() {
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index ebb3da906c7..4f09511b173 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -83,7 +83,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(spieler).room_e_obj[127].Attribut = 255;
 		_G(det)->showStaticSpr(5);
 		_G(det)->showStaticSpr(6);
-		startAadWait(474, -1);
+		startAadWait(474);
 		flic_cut(FCUT_090);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -92,7 +92,7 @@ void Room85::entry(int16 eib_nr) {
 		_G(det)->hideStaticSpr(6);
 		_G(spieler).scrollx = 25;
 		_G(fx_blend) = BLEND3;
-		startAadWait(475, -1);
+		startAadWait(475);
 		start_aad(476, -1);
 		flic_cut(FCUT_089);
 		register_cutscene(25);
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index c45965a32f7..b7207c3da28 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -161,7 +161,7 @@ int Room86::proc2() {
 	_G(spieler).flags32_2 = true;
 	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
-	startAadWait(468, -1);
+	startAadWait(468);
 
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index ab2eff561ee..89dcd36d3ae 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -129,7 +129,7 @@ int Room87::proc2(int16 txt_nr) {
 
 	if (diaNr) {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
-		startAadWait(diaNr, -1);
+		startAadWait(diaNr);
 	} else {
 		autoMove(movNr, P_CHEWY);
 		del_inventar(_G(spieler).AkInvent);
@@ -161,7 +161,7 @@ int Room87::proc4() {
 	flic_cut(FCUT_096);
 	_G(det)->hideStaticSpr(2);
 	_G(det)->startDetail(2, 255, false);
-	startAadWait(471, -1);
+	startAadWait(471);
 	flic_cut(FCUT_097);
 	flic_cut(FCUT_098);
 	flic_cut(FCUT_099);
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 91fa5ad90a7..369111227e4 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -98,7 +98,7 @@ int Room88::proc3() {
 	if (!_G(spieler).flags30_80 || _G(spieler).R88UsedMonkey) {
 		hideCur();
 		if (_G(spieler).flags32_10) {
-			startAadWait(480, -1);
+			startAadWait(480);
 			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(flags).NoPalAfterFlc = true;
@@ -108,10 +108,10 @@ int Room88::proc3() {
 			_G(spieler).flags32_40 = true;
 			switch_room(84);
 		} else {
-			startAadWait(465, -1);
+			startAadWait(465);
 		}
 	} else {
-		startAadWait(466, -1);
+		startAadWait(466);
 		start_spz_wait(13, 1, false, P_CHEWY);
 
 		const int aniNr = 1 + (_G(spieler).flags31_10 ? 1 : 0);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index 71d81449523..af64253fd5f 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -58,7 +58,7 @@ void Room89::entry() {
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 537;
 		switch_room(92);
-		startAadWait(490, -1);
+		startAadWait(490);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
@@ -176,7 +176,7 @@ int Room89::proc2() {
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 489;
 	switch_room(92);
-	startAadWait(490, -1);
+	startAadWait(490);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
@@ -205,7 +205,7 @@ int Room89::proc4() {
 		_G(det)->hideStaticSpr(6);
 		new_invent_2_cur(111);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(491, -1);
+		startAadWait(491);
 	} else {
 		_G(det)->showStaticSpr(5);
 		_G(det)->showStaticSpr(6);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 87e11d1f059..17e9790604e 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -78,7 +78,7 @@ void Room90::entry(int16 eib_nr) {
 
 	if (!_G(spieler).flags33_10) {
 		_G(flags).ZoomMov = false;
-		startAadWait(498, -1);
+		startAadWait(498);
 		goAutoXy(-20, 121, P_HOWARD, ANI_GO);
 		autoMove(1, P_CHEWY);
 		startDetailFrame(2, 1, ANI_FRONT, 3);
@@ -89,7 +89,7 @@ void Room90::entry(int16 eib_nr) {
 		switch_room(91);
 
 	} else if (!_G(spieler).flags33_20) {
-		startAadWait(499, -1);
+		startAadWait(499);
 		_G(spieler).flags33_20 = true;
 
 	} else if (_G(spieler).flags34_20) {
@@ -97,7 +97,7 @@ void Room90::entry(int16 eib_nr) {
 		setPersonPos(440, 132, P_HOWARD, P_RIGHT);
 		_G(spieler).scrollx = 176;
 		_G(spieler).flags34_20 = false;
-		startAadWait(520, -1);
+		startAadWait(520);
 	}
 
 	_G(HowardMov) = 0;
@@ -227,7 +227,7 @@ void Room90::proc2() {
 		}
 
 		hideCur();
-		startAadWait(-1, diaNr);
+		startAadWait(diaNr);
 		showCur();
 	}
 	_G(flags).AutoAniPlay = false;
@@ -239,7 +239,7 @@ int Room90::getHubcaps() {
 
 	hideCur();
 	autoMove(3, P_CHEWY);
-	startAadWait(515, -1);
+	startAadWait(515);
 	start_spz_wait(14, 1, false, P_CHEWY);
 	start_spz_wait(43, 1, false, P_CHEWY);
 	load_chewy_taf(CHEWY_ANI7);
@@ -251,7 +251,7 @@ int Room90::getHubcaps() {
 
 	start_spz_wait(47, 1, false, P_HOWARD);
 	_G(spieler).mi[1] = 2;
-	startAadWait(516, -1);
+	startAadWait(516);
 	_G(spieler).flags34_40 = true;
 	_G(spieler).flags35_1 = true;
 	autoMove(4, P_CHEWY);
@@ -270,7 +270,7 @@ int Room90::getHubcaps() {
 		SHOULD_QUIT_RETURN0;
 	}
 
-	startAadWait(517, -1);
+	startAadWait(517);
 	_G(spieler).flags35_1 = false;
 	_G(atds)->set_steuer_bit(517, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->del_steuer_bit(519, ATS_AKTIV_BIT, ATS_DATA);
@@ -339,7 +339,7 @@ int Room90::useSurimyOnWreck() {
 	_G(det)->hideStaticSpr(5);
 	_G(spieler).scrollx = 176;
 	start_spz(45, 255, false, P_CHEWY);
-	startAadWait(519, -1);
+	startAadWait(519);
 	_G(atds)->set_steuer_bit(520, ATS_AKTIV_BIT, ATS_DATA);
 
 	showCur();
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 50a0a430db2..4ea9f603c45 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -51,7 +51,7 @@ void Room91::entry() {
 		setPersonPos(536, 90, P_HOWARD, P_RIGHT);
 		if (!_G(spieler).flags34_2) {
 			_G(spieler).flags34_2 = true;
-			startAadWait(503, -1);
+			startAadWait(503);
 		}
 	} else {
 		_G(flags).MainInput = false;
@@ -61,7 +61,7 @@ void Room91::entry() {
 		setPersonPos(312, 75, P_HOWARD, P_RIGHT);
 		_G(spieler).SVal3 = 0;
 		_G(spieler).flags34_4 = true;
-		startAadWait(502, -1);
+		startAadWait(502);
 		_G(spieler).PersonHide[P_CHEWY] = true;
 		_G(det)->startDetail(0, 255, false);
 
@@ -129,7 +129,7 @@ void Room91::setup_func() {
 			hideCur();
 			autoMove(1, P_CHEWY);
 			stop_spz();
-			startAadWait(505, -1);
+			startAadWait(505);
 			_G(spieler).PersonHide[P_HOWARD] = true;
 			startSetailWait(9, 1, ANI_FRONT);
 			_G(spieler).PersonHide[P_HOWARD] = false;
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 4aadbaa685e..999570f8bcf 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -34,7 +34,7 @@ void Room92::entry() {
 	cur_2_inventory();
 	hideCur();
 	hide_person();
-	startAadWait(_G(spieler).SVal2, -1);
+	startAadWait(_G(spieler).SVal2);
 	switch (_G(spieler).SVal2) {
 	case 487:
 		_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index bc11bc906e1..ef4a5e56156 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -36,23 +36,23 @@ void Room93::entry() {
 	hide_person();
 	startSetailWait(3, 0, ANI_GO);
 	_G(det)->set_static_ani(0, -1);
-	startAadWait(616, -1);
+	startAadWait(616);
 	_G(det)->del_static_ani(0);
 	startSetailWait(3, 1, ANI_FRONT);
 	_G(det)->set_static_ani(1, -1);
-	start_ads_wait(27);
+	startAdsWait(27);
 
 	if (!_G(spieler).flags37_40) {
 		_G(det)->del_static_ani(1);
 		hideCur();
 		startSetailWait(3, 1, ANI_GO);
 		_G(det)->set_static_ani(0, -1);
-		startAadWait(549, -1);
+		startAadWait(549);
 		_G(det)->del_static_ani(0);
 		startSetailWait(3, 1, ANI_FRONT);
 		startSetailWait(6, 1, ANI_FRONT);
 		_G(det)->set_static_ani(7, -1);
-		startAadWait(550, -1);
+		startAadWait(550);
 		_G(det)->del_static_ani(7);
 		startSetailWait(6, 1, ANI_GO);
 		startSetailWait(2, 1, ANI_FRONT);
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index e582f31dbf0..c08aff93899 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -143,14 +143,14 @@ int Room94::giveGhostBottle() {
 	flic_cut(FCUT_062);
 	_G(fx_blend) = BLEND3;
 	_G(det)->startDetail(5, 255, false);
-	startAadWait(541, -1);
+	startAadWait(541);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(5);
 	Room66::proc8(3, 3, 2, 617);
 	hideCur();
 	_G(det)->hideStaticSpr(5);
 	_G(det)->startDetail(5, 255, false);
-	startAadWait(622, -1);
+	startAadWait(622);
 	_G(det)->stop_detail(5);
 	_G(det)->startDetail(6, 1, false);	
 	_G(room)->set_timer_status(3, TIMER_STOP);
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index ff2df698404..e9e3eb222ce 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -116,7 +116,7 @@ int Room95::proc2() {
 		switch_room(97);
 	} else {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
-		startAadWait(548, -1);
+		startAadWait(548);
 	}
 
 	showCur();
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 2e9604e910d..7c0f1d087a0 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -290,11 +290,11 @@ void Room97::proc3() {
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(557, -1);
+		startAadWait(557);
 		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else if (!_G(spieler).flags36_40) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(568, -1);
+		startAadWait(568);
 		goAutoXy(588, 129, P_CHEWY, ANI_WAIT);
 	} else {
 		_G(spieler).flags36_1 = true;
@@ -317,7 +317,7 @@ void Room97::proc3() {
 		if (!_G(spieler).flags36_80) {
 			goAutoXy(442, 35, P_HOWARD, ANI_WAIT);
 			goAutoXy(497, 31, P_HOWARD, ANI_WAIT);
-			startAadWait(562, -1);
+			startAadWait(562);
 		}
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		_G(Sdi)[6].z_ebene = 166;
@@ -369,7 +369,7 @@ void Room97::proc4() {
 		_G(det)->hideStaticSpr(2);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(553, -1);
+		startAadWait(553);
 		_G(HowardMov) = 0;
 		showCur();
 	}
@@ -401,7 +401,7 @@ int Room97::proc5() {
 	del_inventar(_G(spieler).AkInvent);
 	_G(det)->showStaticSpr(21);
 	_G(spieler).flags35_80 = true;
-	startAadWait(546, -1);
+	startAadWait(546);
 	_G(det)->hideStaticSpr(21);
 	g_engine->_sound->playSound(9, 1);
 	g_engine->_sound->stopSound(0);
@@ -429,7 +429,7 @@ int Room97::proc6() {
 	startSetailWait(15, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(17);
 	start_spz(CH_TALK5, 255, false, P_CHEWY);
-	startAadWait(558, -1);
+	startAadWait(558);
 	_G(det)->hideStaticSpr(28);
 	_G(det)->stop_detail(5);
 	_G(det)->showStaticSpr(15);
@@ -504,9 +504,9 @@ int Room97::proc8() {
 		waitShowScreen(80);
 		autoMove(4, P_CHEWY);
 		auto_scroll(646, 0);
-		startAadWait(566, -1);
+		startAadWait(566);
 		waitShowScreen(60);
-		startAadWait(567, -1);
+		startAadWait(567);
 		_G(det)->stop_detail(26);
 		_G(det)->stop_detail(27);
 		_G(spieler).flags36_20 = true;
@@ -519,7 +519,7 @@ int Room97::proc8() {
 
 	if (diaNr != -1) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(diaNr, -1);
+		startAadWait(diaNr);
 	}
 
 	showCur();
@@ -535,14 +535,14 @@ int Room97::proc9() {
 	
 	if (!_G(spieler).flags36_20) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(556, -1);
+		startAadWait(556);
 	} else {
 		start_spz_wait(13, 1, false, P_CHEWY);
 		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(13);
 		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->startDetail(14, 255, false);
-		startAadWait(555, -1);
+		startAadWait(555);
 		_G(spieler).flags36_40 = true;
 		_G(atds)->set_steuer_bit(539, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->del_steuer_bit(537, ATS_AKTIV_BIT, ATS_DATA);
@@ -582,21 +582,21 @@ int Room97::proc11() {
 
 	if (!_G(spieler).flags37_2) {
 		start_spz(CH_TALK5, 255, false, P_CHEWY);
-		startAadWait(569, -1);
+		startAadWait(569);
 	} else {
 		autoMove(9, P_CHEWY);
-		startAadWait(570, -1);
+		startAadWait(570);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		autoMove(7, P_CHEWY);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(571, -1);
+		startAadWait(571);
 		g_engine->_sound->playSound(4, 0);
 		g_engine->_sound->playSound(4);
 		_G(det)->startDetail(4, 1, false);
 		autoMove(12, P_CHEWY);
 		start_spz_wait(64, 1, false, P_CHEWY);
 		start_spz(65, 255, false, P_CHEWY);
-		startAadWait(561, -1);
+		startAadWait(561);
 		_G(spieler).SVal1 = 97;
 		_G(spieler).SVal2 = 523;
 		cur_2_inventory();
@@ -717,7 +717,7 @@ void Room97::sensorAnim() {
 		_G(det)->showStaticSpr(20);
 		autoMove(10, P_CHEWY);
 		auto_scroll(60, 0);
-		startAadWait(544, -1);
+		startAadWait(544);
 		_bool18DB32 = true;
 		autoMove(11, P_CHEWY);
 		_bool18DB32 = false;
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index bd9d1faf8d1..d67699740eb 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -448,7 +448,7 @@ void startAniBlock(int16 nr, const AniBlock *ab) {
 	_G(maus_links_click) = oldMouseLinksClick;
 }
 
-void startAadWait(int16 diaNr, int16 strNr) {
+void startAadWait(int16 diaNr) {
 	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	_G(talk_start_ani) = -1;
@@ -558,7 +558,7 @@ void start_aad(int16 diaNr, int16 ssiNr) {
 	_G(atds)->start_aad(diaNr);
 }
 
-void start_ads_wait(int16 diaNr) {
+void startAdsWait(int16 diaNr) {
 	if (!_G(flags).AdsDialog) {
 		_G(menu_item) = CUR_TALK;
 		cursorChoice(_G(menu_item));
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index a8a34509137..431682816eb 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -158,7 +158,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 							autoMove(3, P_CHEWY);
 							flic_cut(FCUT_004);
 							start_spz(CH_TALK5, -1, false, P_CHEWY);
-							startAadWait(108, 0);
+							startAadWait(108);
 							showCur();
 						} else {
 							retValue = false;
@@ -194,7 +194,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						if (is_cur_inventar(TRANSLATOR_INV)) {
 							autoMove(6, P_CHEWY);
 							_G(spieler).R14Translator = true;
-							startAadWait(25, -1);
+							startAadWait(25);
 						} else
 							retValue = false;
 						break;
@@ -778,7 +778,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 
 					case 95:
 						if (_G(spieler).R13Band == true)
-							startAadWait(116, -1);
+							startAadWait(116);
 						break;
 
 					case 100:
@@ -997,11 +997,11 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 505:
-						startAadWait(482, -1);
+						startAadWait(482);
 						break;
 
 					case 506:
-						startAadWait(483, -1);
+						startAadWait(483);
 						break;
 
 					case 512:
@@ -1226,7 +1226,7 @@ void ads_ende(int16 diaNr, int16 blkNr, int16 strEndNr) {
 			_G(det)->del_static_ani(3);
 			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->set_static_ani(3, -1);
-			startAadWait(456, -1);
+			startAadWait(456);
 		}
 		break;
 
@@ -2215,7 +2215,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			invent_2_slot(K_KERNE_INV);
 		} else if (_G(spieler).AkInvent == 88) {
 			_G(spieler).flags26_10 = true;
-			startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
+			startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350);
 		}
 		break;
 
@@ -2255,14 +2255,14 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).flags26_10 = true;
 		_G(flags).InventMenu = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350, -1);
+		startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350);
 		_G(flags).InventMenu = true;
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
 	case 88:
 		_G(spieler).flags26_10 = true;
-		startAadWait(350, -1);
+		startAadWait(350);
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
 
@@ -2753,7 +2753,7 @@ void calc_person_dia(int16 p_nr) {
 				_G(stopAutoMove)[i] = true;
 			}
 
-			startAadWait(_G(spieler).PersonDia[p_nr], -1);
+			startAadWait(_G(spieler).PersonDia[p_nr]);
 
 			for (int i = 0; i < 3; ++i) {
 				_G(spieler).PersonDiaRoom[i] = tmp[i];
@@ -2776,11 +2776,11 @@ void calc_person_dia(int16 p_nr) {
 				if (_G(spieler).PersonDia[P_NICHELLE] < 10000) {
 					_G(cur_hide_flag) = false;
 					hideCur();
-					startAadWait(_G(spieler).PersonDia[P_NICHELLE], -1);
+					startAadWait(_G(spieler).PersonDia[P_NICHELLE]);
 					_G(stopAutoMove)[P_NICHELLE] = _G(spieler).PersonDiaRoom[P_NICHELLE];
 					showCur();
 				} else {
-					start_ads_wait(_G(spieler).PersonDia[P_NICHELLE] - 10000);
+					startAdsWait(_G(spieler).PersonDia[P_NICHELLE] - 10000);
 				}
 			}
 		}


Commit: 9cd7694d0769f27ce5289568112486ecf746b152
    https://github.com/scummvm/scummvm/commit/9cd7694d0769f27ce5289568112486ecf746b152
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:50-08:00

Commit Message:
CHEWY: Remove unused structure, some renaming

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp
    engines/chewy/rooms/room64.cpp
    engines/chewy/sprite.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index d63b9681e44..ade5d809616 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -253,11 +253,11 @@ TafInfo *Detail::init_taf_tbl(const char *fname_) {
 	byte *tmp = (byte *)MALLOC((int32)anz * sizeof(byte *) + sizeof(TafInfo));
 
 	Tt = (TafInfo *)tmp;
-	Tt->anzahl = anz;
-	Tt->_correction = (int16 *)MALLOC((int32)Tt->anzahl * 2 * sizeof(int16));
-	Tt->image = (byte **)(tmp + sizeof(TafInfo));
-	memcpy(Tt->_correction, (byte *)res->getSpriteCorrectionsTable(), Tt->anzahl * 2 * sizeof(int16));
-	Tt->palette = nullptr;
+	Tt->_count = anz;
+	Tt->_correction = (int16 *)MALLOC((int32)Tt->_count * 2 * sizeof(int16));
+	Tt->_image = (byte **)(tmp + sizeof(TafInfo));
+	memcpy(Tt->_correction, (byte *)res->getSpriteCorrectionsTable(), Tt->_count * 2 * sizeof(int16));
+	Tt->_palette = nullptr;
 
 	delete res;
 
@@ -268,8 +268,8 @@ void Detail::del_taf_tbl(TafInfo *Tt) {
 	if (!Tt) {
 		Tt = _rdi.dptr;
 	}
-	for (int16 i = 0; i < Tt->anzahl; i++) {
-		free(Tt->image[i]);
+	for (int16 i = 0; i < Tt->_count; i++) {
+		free(Tt->_image[i]);
 	}
 	free((char *) Tt->_correction);
 	free((char *) Tt);
@@ -278,9 +278,9 @@ void Detail::del_taf_tbl(TafInfo *Tt) {
 void Detail::del_taf_tbl(int16 start, int16 anz, TafInfo *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
-	for (int16 i = start; i < start + anz && i < Tt->anzahl; i++) {
-		free(Tt->image[i]);
-		Tt->image[i] = nullptr;
+	for (int16 i = start; i < start + anz && i < Tt->_count; i++) {
+		free(Tt->_image[i]);
+		Tt->_image[i] = nullptr;
 	}
 }
 
@@ -291,8 +291,8 @@ void Detail::load_taf_seq(int16 sprNr, int16 sprCount, TafInfo *Tt) {
 	SpriteResource *res = new SpriteResource(_tafName);
 
 	for (int16 i = 0; i < sprCount; i++) {
-		if (!Tt->image[sprNr + i]) {
-			res->getSpriteData(sprNr + i, &Tt->image[sprNr + i], true);
+		if (!Tt->_image[sprNr + i]) {
+			res->getSpriteData(sprNr + i, &Tt->_image[sprNr + i], true);
 		}
 	}
 
@@ -317,7 +317,7 @@ byte *Detail::getStaticImage(int16 detNr) {
 	byte *ret = nullptr;
 	const int16 index = _rdi.Sinfo[detNr].SprNr;
 	if (index != -1)
-		ret = _rdi.dptr->image[index];
+		ret = _rdi.dptr->_image[index];
 	return ret;
 }
 
@@ -351,7 +351,7 @@ void Detail::setAni(int16 aniNr, int16 start, int16 end) {
 }
 
 byte *Detail::getImage(int16 sprNr) {
-	byte *ret = _rdi.dptr->image[sprNr];
+	byte *ret = _rdi.dptr->_image[sprNr];
 	return ret;
 }
 
@@ -421,7 +421,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 				load_taf_ani_sprite(sprnr);
 				_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
 			} else
-				_G(out)->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
+				_G(out)->scale_set(_rdi.dptr->_image[sprnr], x, y, zoomx, zoomy, 0);
 
 			Sound *sound = g_engine->_sound;
 
@@ -496,7 +496,7 @@ void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 		if (_rdi.Sinfo[i].SprNr != -1 && !_rdi.Sinfo[i].Hide) {
 			int16 x = _rdi.Sinfo[i].x - scrx;
 			int16 y = _rdi.Sinfo[i].y - scry;
-			byte *simage = _rdi.dptr->image[_rdi.Sinfo[i].SprNr];
+			byte *simage = _rdi.dptr->_image[_rdi.Sinfo[i].SprNr];
 			_G(out)->sprite_set(simage, x, y, 0);
 		}
 	}
@@ -572,8 +572,8 @@ SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 	if (spr_nr > adiptr->end_ani)
 		spr_nr = adiptr->end_ani - 1;
 	int16 *Cxy = _rdi.dptr->_correction + (spr_nr << 1);
-	int16 *Xy = (int16 *)_rdi.dptr->image[spr_nr];
-	_sprInfo.Image = _rdi.dptr->image[spr_nr];
+	int16 *Xy = (int16 *)_rdi.dptr->_image[spr_nr];
+	_sprInfo.Image = _rdi.dptr->_image[spr_nr];
 	_sprInfo.X = adiptr->x + Cxy[0] - scrx;
 	_sprInfo.Y = adiptr->y + Cxy[1] - scry;
 	_sprInfo.X1 = _sprInfo.X + Xy[0];
@@ -720,7 +720,7 @@ int16 Detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 			if (adiptr->load_flag == 1) {
 				Xy = (int16 *)_tafLoadBuffer;
 			} else {
-				Xy = (int16 *)_rdi.dptr->image[sprnr];
+				Xy = (int16 *)_rdi.dptr->_image[sprnr];
 			}
 			if (mouse_x >= x && mouse_x <= x + Xy[0] &&
 			        mouse_y >= y && mouse_y <= y + Xy[1]) {
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 665b99e20bf..4b0f94a1dd6 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -105,11 +105,11 @@ int16 Files::execute(bool isInGame) {
 				if (!mode[j])
 					// Not pressed
 					_G(out)->sprite_set(
-						ti->image[i], 16 + ti->_correction[i << 1] + pt[j].x,
+						ti->_image[i], 16 + ti->_correction[i << 1] + pt[j].x,
 						76 + ti->_correction[(i << 1) + 1] + pt[j].y, 0);
 				else
 					// Pressed
-					_G(out)->sprite_set(ti->image[i], 16 + ti->_correction[i << 1],
+					_G(out)->sprite_set(ti->_image[i], 16 + ti->_correction[i << 1],
 						76 + ti->_correction[(i << 1) + 1], 0);
 			}
 		}
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index d79636d10e6..1a022b01023 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -98,12 +98,12 @@ void Inventory::plot_menu() {
 			y = 3;
 		else
 			y = 0;
-		_G(out)->sprite_set(_G(curtaf)->image[_G(ani_count)[i]],
+		_G(out)->sprite_set(_G(curtaf)->_image[_G(ani_count)[i]],
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
 	for (int16 i = 0; i < 2; i++) {
-		_G(out)->sprite_set(_G(menutaf)->image[PFEIL_UP + i],
+		_G(out)->sprite_set(_G(menutaf)->_image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index b8e1ae5672a..0eaef3e8c14 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -89,7 +89,7 @@ void Options::execute(TafInfo *ti) {
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
-		_G(out)->sprite_set(ti->image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
+		_G(out)->sprite_set(ti->_image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
 			8 + ti->_correction[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
 		_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
@@ -97,17 +97,17 @@ void Options::execute(TafInfo *ti) {
 		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, fps.c_str());
 
 		if (_G(spieler).SoundSwitch) {
-			_G(out)->sprite_set(ti->image[mund_ani],
+			_G(out)->sprite_set(ti->_image[mund_ani],
 				18 + ti->_correction[mund_ani << 1],
 				8 + ti->_correction[(mund_ani << 1) + 1], 0);
-			_G(out)->sprite_set(ti->image[SCHNULL_OFF],
+			_G(out)->sprite_set(ti->_image[SCHNULL_OFF],
 				18 + ti->_correction[SCHNULL_OFF << 1],
 				8 + ti->_correction[(SCHNULL_OFF << 1) + 1], 0);
 		} else {
-			_G(out)->sprite_set(ti->image[SCHNULLER],
+			_G(out)->sprite_set(ti->_image[SCHNULLER],
 				18 + ti->_correction[SCHNULLER << 1],
 				8 + ti->_correction[(SCHNULLER << 1) + 1], 0);
-			_G(out)->sprite_set(ti->image[SCHNULL_BAND],
+			_G(out)->sprite_set(ti->_image[SCHNULL_BAND],
 				18 + ti->_correction[SCHNULL_BAND << 1],
 				8 + ti->_correction[(SCHNULL_BAND << 1) + 1], 0);
 		}
@@ -119,30 +119,30 @@ void Options::execute(TafInfo *ti) {
 		_G(out)->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
 		_G(out)->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
 		if (_G(spieler).MusicSwitch) {
-			_G(out)->sprite_set(ti->image[MUSIC_ON1],
+			_G(out)->sprite_set(ti->_image[MUSIC_ON1],
 				18 + ti->_correction[MUSIC_ON1 << 1],
 				8 + ti->_correction[(MUSIC_ON1 << 1) + 1], 0);
-			_G(out)->sprite_set(ti->image[MUSIC_ON2],
+			_G(out)->sprite_set(ti->_image[MUSIC_ON2],
 				18 + ti->_correction[MUSIC_ON2 << 1],
 				8 + ti->_correction[(MUSIC_ON2 << 1) + 1], 0);
 		} else
-			_G(out)->sprite_set(ti->image[MUSIC_OFF],
+			_G(out)->sprite_set(ti->_image[MUSIC_OFF],
 				18 + ti->_correction[MUSIC_OFF << 1],
 				8 + ti->_correction[(MUSIC_OFF << 1) + 1], 0);
 
 		if (_G(spieler).DisplayText) {
-			_G(out)->sprite_set(ti->image[tdisp_ani],
+			_G(out)->sprite_set(ti->_image[tdisp_ani],
 				18 + ti->_correction[tdisp_ani << 1],
 				8 + ti->_correction[(tdisp_ani << 1) + 1], 0);
-			_G(out)->sprite_set(ti->image[TDISP_EIN],
+			_G(out)->sprite_set(ti->_image[TDISP_EIN],
 				18 + ti->_correction[TDISP_EIN << 1],
 				8 + ti->_correction[(TDISP_EIN << 1) + 1], 0);
 		} else
-			_G(out)->sprite_set(ti->image[TDISP_AUS],
+			_G(out)->sprite_set(ti->_image[TDISP_AUS],
 				18 + ti->_correction[TDISP_AUS << 1],
 				8 + ti->_correction[(TDISP_AUS << 1) + 1], 0);
 
-		_G(out)->sprite_set(ti->image[EXIT],
+		_G(out)->sprite_set(ti->_image[EXIT],
 			18 + ti->_correction[EXIT << 1],
 			8 + ti->_correction[(EXIT << 1) + 1], 0);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index c21b67540a3..1b56d3d6122 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -63,10 +63,10 @@ void standard_init() {
 	_G(curblk).ysize = 16;
 
 	// WORKAROUND: Moved from init_load because the original
-	// uses _G(curtaf)->image below before _G(curtaf) was initialized
+	// uses _G(curtaf)->_image below before _G(curtaf) was initialized
 	_G(curtaf) = _G(mem)->taf_adr(CURSOR);
 
-	_G(curblk).sprite = _G(curtaf)->image;
+	_G(curblk).sprite = _G(curtaf)->_image;
 	_G(curblk).cur_back = _G(cur_back);
 	_G(curblk).no_back = true;
 	_G(curani)._start = 0;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 0f4da3f0de6..0d1d0d77f78 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -103,7 +103,7 @@ void free_buffers() {
 void cursorChoice(int16 nr) {
 	int16 ok = true;
 	if (nr != CUR_USER) {
-		_G(curblk).sprite = _G(curtaf)->image;
+		_G(curblk).sprite = _G(curtaf)->_image;
 		_G(curani)._delay = (1 + _G(spieler).DelaySpeed) * 5;
 	}
 	switch (nr) {
@@ -614,7 +614,7 @@ void setupScreen(SetupScreenMode mode) {
 			_G(cur)->plot_cur();
 
 			if ((_G(spieler).inv_cur) && (_G(flags).CursorStatus == true))
-				_G(out)->sprite_set(_G(curtaf)->image[_G(pfeil_ani) + 32], _G(minfo).x, _G(minfo).y,
+				_G(out)->sprite_set(_G(curtaf)->_image[_G(pfeil_ani) + 32], _G(minfo).x, _G(minfo).y,
 				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
@@ -1464,21 +1464,21 @@ int16 is_mouse_person(int16 x, int16 y) {
 				if (!_G(spz_ani)[i]) {
 					switch (i) {
 					case P_CHEWY:
-						xy = (int16 *)_G(chewy)->image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
+						xy = (int16 *)_G(chewy)->_image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
 					case P_NICHELLE:
 						if (_G(spieler).PersonRoomNr[i] != _G(spieler).PersonRoomNr[P_CHEWY])
 							check = false;
-						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
+						xy = (int16 *)_G(PersonTaf)[i]->_image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
 
 					default:
 						break;
 					}
 				} else
-					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
+					xy = (int16 *)_G(spz_tinfo)->_image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
 				if (check) {
 					if (x + _G(spieler).scrollx >= _G(spieler_vector)[i].Xypos[0] &&
 					        x + _G(spieler).scrollx <= _G(spieler_vector)[i].Xypos[0] + xy[0] + _G(spieler_vector)[i].Xzoom &&
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index c3623a8ec2f..1c963782a12 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -43,15 +43,15 @@ TafInfo *Memory::taf_adr(const char *filename) {
 
 	byte *tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
 	TafInfo *tinfo = (TafInfo *)tmp1;
-	tinfo->image = (byte **)(tmp1 + sizeof(TafInfo));
-	tinfo->palette = tmp1 + size;
-	tinfo->anzahl = imageCount;
-	memcpy(tinfo->palette, res->getSpritePalette(), PALETTE_SIZE);
+	tinfo->_image = (byte **)(tmp1 + sizeof(TafInfo));
+	tinfo->_palette = tmp1 + size;
+	tinfo->_count = imageCount;
+	memcpy(tinfo->_palette, res->getSpritePalette(), PALETTE_SIZE);
 	byte *imgPtr = tmp1 + sizeof(TafInfo) + kgroesse;
 
 	for (int i = 0; i < imageCount; i++) {
-		tinfo->image[i] = imgPtr;
-		imgPtr += res->getSpriteData(i, &tinfo->image[i], false);
+		tinfo->_image[i] = imgPtr;
+		imgPtr += res->getSpriteData(i, &tinfo->_image[i], false);
 	}
 
 	tinfo->_correction = (int16 *)(tmp1 + (size + 768l));
@@ -79,14 +79,14 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 
 	byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
 	ts_info = (TafSeqInfo *)tmp1;
-	ts_info->anzahl = image_anz;
-	ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
+	ts_info->_count = image_anz;
+	ts_info->_image = (byte **)(tmp1 + sizeof(TafSeqInfo));
 	ts_info->_correction = (int16 *)(tmp1 + size);
 	byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
 
 	for (int16 i = 0; i < image_anz; i++) {
-		ts_info->image[i] = sp_ptr;
-		sp_ptr += res->getSpriteData(i + image_start, &ts_info->image[i], false);
+		ts_info->_image[i] = sp_ptr;
+		sp_ptr += res->getSpriteData(i + image_start, &ts_info->_image[i], false);
 	}
 
 	uint16 *correctionsTable = res->getSpriteCorrectionsTable() + image_start * 2;
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 5a56d5f6436..d6a03f39593 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -57,7 +57,7 @@ void plot_main_menu() {
 				deltaX = -40;
 		}
 
-		_G(out)->scale_set(_G(menutaf)->image[i],
+		_G(out)->scale_set(_G(menutaf)->_image[i],
 			MENU_X + deltaX + korrektur[i * 2],
 		    _G(spieler).MainMenuY + korrektur[i * 2 + 1],
 			zoomx, zoomy, 0);
@@ -74,7 +74,7 @@ void plot_main_menu() {
 			deltaX = 40;
 
 		int img = IMAGES[_G(menu_item)];
-		_G(out)->scale_set(_G(menutaf)->image[img],
+		_G(out)->scale_set(_G(menutaf)->_image[img],
 		    MENU_X + deltaX + korrektur[img * 2] - 5,
 		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
 			zoomx, zoomy, 0);
@@ -149,14 +149,14 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 	xy[3][1] = y + 16 * (yanz - 1);
 
 	for (i = 0; i < 4; i++)
-		_G(out)->sprite_set(_G(menutaf)->image[(int16)sprite_eckenr[i]],
+		_G(out)->sprite_set(_G(menutaf)->_image[(int16)sprite_eckenr[i]],
 		                 xy[i][0], xy[i][1], _G(scr_width));
 
 	int16 s_nr = BAU_MENU_SEITE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yanz - 2; i++) {
-			_G(out)->sprite_set(_G(menutaf)->image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
+			_G(out)->sprite_set(_G(menutaf)->_image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
 		}
 		++s_nr;
 	}
@@ -166,7 +166,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xanz - 2; i++) {
-				_G(out)->sprite_set(_G(menutaf)->image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
+				_G(out)->sprite_set(_G(menutaf)->_image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
 		s_nr -= 3;
@@ -191,15 +191,15 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN], x + i * 16, xy[0][1], _G(scr_width));
+				_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN], x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
-		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
+		_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < mitte; i++)
-			_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_M], x + i * 16, xy[0][1], _G(scr_width));
-		_G(out)->sprite_set(_G(menutaf)->image[BAU_MENU_OBEN_R], x + i * 16, xy[0][1], _G(scr_width));
+			_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_M], x + i * 16, xy[0][1], _G(scr_width));
+		_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_R], x + i * 16, xy[0][1], _G(scr_width));
 	}
 
 	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16, xy[0][1] + 16 + (yanz - 2) * 16, col);
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 7356ada05e4..1d905eeacf4 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -31,18 +31,6 @@ bool NewPhead::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool TffHeader::load(Common::SeekableReadStream *src) {
-	src->read(id, 4);
-	size = src->readUint32LE();
-	count = src->readSint16LE();
-	first = src->readSint16LE();
-	last = src->readSint16LE();
-	width = src->readSint16LE();
-	height = src->readSint16LE();
-
-	return true;
-}
-
 bool Button::load(Common::SeekableReadStream *src) {
 	typ = src->readSint16LE();
 	enable = src->readSint16LE();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 01b879c0e9a..44f7accbd6c 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -33,16 +33,16 @@ namespace Chewy {
 #define MAXKNOPF 400
 
 struct TafInfo {
-	int16 anzahl = 0;
-	byte *palette = nullptr;
+	int16 _count = 0;
+	byte *_palette = nullptr;
 	int16 *_correction = nullptr;
-	byte **image = nullptr;
+	byte **_image = nullptr;
 };
 
 struct TafSeqInfo {
-	int16 anzahl = 0;
+	int16 _count = 0;
 	int16 *_correction = nullptr;
-	byte **image = nullptr;
+	byte **_image = nullptr;
 };
 
 struct NewPhead {
@@ -53,19 +53,6 @@ struct NewPhead {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct TffHeader {
-	char id[4] = { 0 };
-	uint32 size = 0;
-	int16 count = 0;
-	int16 first = 0;
-	int16 last = 0;
-	int16 width = 0;
-	int16 height = 0;
-
-	bool load(Common::SeekableReadStream *src);
-	static constexpr int SIZE() { return 18; }
-};
-
 struct Button {
 	int16 typ = 0;
 	int16 enable = 0;
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 7dd131d76bc..3389ae51d2e 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -187,7 +187,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		strcat(tmp_str, _roomInfo->TafName);
 		_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
 		Rb->Fti = _G(det)->get_taf_info();
-		Rb->DetImage = Rb->Fti->image;
+		Rb->DetImage = Rb->Fti->_image;
 		Rb->DetKorrekt = Rb->Fti->_correction;
 	}
 	_G(obj)->calc_all_static_detail();
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index fe1d5209274..aa2962827c8 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -62,7 +62,7 @@ int16 Room64::cut_sev(int16 frame) {
 	const int16 y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - _G(spieler).scrolly;
 	
 	calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor, (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
-	_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
+	_G(out)->scale_set(_G(chewy)->_image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
 	return 0;
 }
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index d67699740eb..aaca779d517 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -159,7 +159,7 @@ void spriteEngine() {
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor,
 					          (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(chewy)->image[sprNr], x, y,
+					_G(out)->scale_set(_G(chewy)->_image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
@@ -174,7 +174,7 @@ void spriteEngine() {
 					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(spz_tinfo)->image[sprNr], x, y,
+					_G(out)->scale_set(_G(spz_tinfo)->_image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
@@ -198,7 +198,7 @@ void spriteEngine() {
 				x = _G(spieler_mi)[personNr].XyzStart[0] + ts_info->_correction[sprNr * 2] - _G(spieler).scrollx;
 				y = _G(spieler_mi)[personNr].XyzStart[1] + ts_info->_correction[sprNr * 2 + 1] - _G(spieler).scrolly;
 				calc_zoom(_G(spieler_mi)[personNr].XyzStart[1], _G(spieler).ZoomXy[personNr][0],_G(spieler).ZoomXy[personNr][1], &_G(spieler_vector)[personNr]);
-				_G(out)->scale_set(ts_info->image[sprNr], x, y, _G(spieler_vector)[personNr].Xzoom, _G(spieler_vector)[personNr].Yzoom, _G(scr_width));
+				_G(out)->scale_set(ts_info->_image[sprNr], x, y, _G(spieler_vector)[personNr].Xzoom, _G(spieler_vector)[personNr].Yzoom, _G(scr_width));
 			}
 			}
 			break;


Commit: 6ff32ec3913e0c37104a0553257b43cbc0579375
    https://github.com/scummvm/scummvm/commit/6ff32ec3913e0c37104a0553257b43cbc0579375
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:50-08:00

Commit Message:
CHEWY: Remove some unused structures in ngstypes

Changed paths:
    engines/chewy/ngstypes.cpp
    engines/chewy/ngstypes.h


diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
index 1d905eeacf4..9ed3036a0de 100644
--- a/engines/chewy/ngstypes.cpp
+++ b/engines/chewy/ngstypes.cpp
@@ -31,61 +31,6 @@ bool NewPhead::load(Common::SeekableReadStream *src) {
 	return true;
 }
 
-bool Button::load(Common::SeekableReadStream *src) {
-	typ = src->readSint16LE();
-	enable = src->readSint16LE();
-	x1 = src->readSint16LE();
-	y1 = src->readSint16LE();
-	x2 = src->readSint16LE();
-	y2 = src->readSint16LE();
-	spritenr1 = src->readSint16LE();
-	spritenr2 = src->readSint16LE();
-	src->skip(4);
-	storlen = src->readSint16LE();
-	viewspr3 = src->readSint16LE();
-	textptr = src->readSint16LE();
-
-	return true;
-}
-
-bool Menu::load(Common::SeekableReadStream *src) {
-	nr = src->readSint16LE();
-	disp = src->readSint16LE();
-	typ = src->readSint16LE();
-	x = src->readSint16LE();
-	y = src->readSint16LE();
-	width = src->readSint16LE();
-	height = src->readSint16LE();
-	anzknoepfe = src->readSint16LE();
-	src->skip(4 * MAXKNOPF);
-	spritenr = src->readSint16LE();
-	src->readUint32LE();
-	src->readUint32LE();
-
-	return true;
-}
-
-bool Dialogue::load(Common::SeekableReadStream *src) {
-	src->read(id, 4);
-	anzmenue = src->readSint16LE();
-	src->skip(4 * MAXMENUE);
-	src->read(menuetaf, D_GR);
-	src->read(knopftaf, D_GR);
-
-	return true;
-}
-
-bool Dialogue::save(Common::WriteStream *dest) {
-	dest->write(id, 4);
-	dest->writeSint16LE(anzmenue);
-	for (int i = 0; i < MAXMENUE; ++i)
-		dest->writeUint32LE(0);
-	dest->write(menuetaf, D_GR);
-	dest->write(knopftaf, D_GR);
-
-	return true;
-}
-
 bool TmfInst::load(Common::SeekableReadStream *src) {
 	finetune = src->readByte();
 	insvol = src->readByte();
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 44f7accbd6c..2cd9ef2b786 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -53,61 +53,6 @@ struct NewPhead {
 	bool load(Common::SeekableReadStream *src);
 };
 
-struct Button {
-	int16 typ = 0;
-	int16 enable = 0;
-	int16 x1 = 0;
-	int16 y1 = 0;
-	int16 x2 = 0;
-	int16 y2 = 0;
-	int16 spritenr1 = 0;
-	int16 spritenr2 = 0;
-	char *inhalt1 = nullptr;
-	int16 storlen = 0;
-	int16 viewspr3 = 0;
-	int16 textptr = 0;
-
-	bool load(Common::SeekableReadStream *src);
-	static constexpr int SIZE() {
-		return 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 2 + 2 + 2;
-	}
-};
-
-struct Menu {
-	int16 nr = 0;
-	int16 disp = 0;
-	int16 typ = 0;
-	int16 x = 0;
-	int16 y = 0;
-	int16 width = 0;
-	int16 height = 0;
-	int16 anzknoepfe = 0;
-	Button *knopfliste[MAXKNOPF] = { nullptr };
-	int16 spritenr = 0;
-	char *sprite = nullptr;
-	char *spritesave = nullptr;
-
-	bool load(Common::SeekableReadStream *src);
-	static constexpr int SIZE() {
-		return 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 +
-			4 * MAXKNOPF + 2 + 4 + 4;
-	}
-};
-
-struct Dialogue {
-	char id[4] = { 0 };
-	int16 anzmenue = 0;
-	Menu *menueliste[MAXMENUE] = { nullptr };
-	char menuetaf[D_GR] = { '\0' };
-	char knopftaf[D_GR] = { '\0' };
-
-	bool load(Common::SeekableReadStream *src);
-	bool save(Common::WriteStream *dest);
-	static constexpr int SIZE() {
-		return 4 + 2 + 4 * MAXMENUE + D_GR + D_GR;
-	}
-};
-
 struct MouseInfo {
 	int16 x = 0;
 	int16 y = 0;
@@ -201,16 +146,6 @@ struct CurAni {
 	int16 _delay = 0;
 };
 
-struct FCurBlk {
-	int16 page_off_x = 0;
-	int16 page_off_y = 0;
-	uint32 cur_back = 0;
-	int16 xsize = 0;
-	int16 ysize = 0;
-	uint32 *sprite = nullptr;
-	bool no_back = false;
-};
-
 struct FlicHead {
 	uint32 size = 0;
 	uint16 type = 0;


Commit: b27b209021c0481a2796745d8dd7091bec07a05f
    https://github.com/scummvm/scummvm/commit/b27b209021c0481a2796745d8dd7091bec07a05f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:36:50-08:00

Commit Message:
CHEWY: Still renaming

Changed paths:
    engines/chewy/ani_dat.h
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/chewy.cpp
    engines/chewy/debugger.cpp
    engines/chewy/detail.cpp
    engines/chewy/detail.h
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/events.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/mouse.cpp
    engines/chewy/movclass.h
    engines/chewy/ngstypes.h
    engines/chewy/object.cpp
    engines/chewy/r_event.cpp
    engines/chewy/room.cpp
    engines/chewy/room.h
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room00.h
    engines/chewy/rooms/room01.cpp
    engines/chewy/rooms/room02.cpp
    engines/chewy/rooms/room02.h
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room03.h
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room04.h
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room06.cpp
    engines/chewy/rooms/room06.h
    engines/chewy/rooms/room07.cpp
    engines/chewy/rooms/room07.h
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room10.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room13.h
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room27.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room33.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room43.cpp
    engines/chewy/rooms/room44.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room47.cpp
    engines/chewy/rooms/room47.h
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room58.cpp
    engines/chewy/rooms/room59.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room69.cpp
    engines/chewy/rooms/room70.cpp
    engines/chewy/rooms/room71.cpp
    engines/chewy/rooms/room72.cpp
    engines/chewy/rooms/room73.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room75.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room78.cpp
    engines/chewy/rooms/room79.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room88.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room92.cpp
    engines/chewy/rooms/room93.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room96.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/types.cpp
    engines/chewy/types.h
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/ani_dat.h b/engines/chewy/ani_dat.h
index 5c792d24ace..8203ca92b65 100644
--- a/engines/chewy/ani_dat.h
+++ b/engines/chewy/ani_dat.h
@@ -28,21 +28,21 @@ namespace Chewy {
 #define SIB_MONOCLE 6
 #define SIB_GBUCH 7
 #define SIB_TERMINAL_R5 8
-#define SIB_KNOPF_R5 9
+#define SIB_BUTTON_R5 9
 #define SIB_TUERE_R5 10
-#define SIB_TKNOPF1_R6 11
+#define SIB_TBUTTON1_R6 11
 #define SIB_SEIL 12
-#define SIB_TKNOPF2_R6 13
-#define SIB_TKNOPF3_R6 15
+#define SIB_TBUTTON2_R6 13
+#define SIB_TBUTTON3_R6 15
 #define SIB_BOLA_SCHACHT 17
-#define SIB_BOLA_KNOPF_R6 18
+#define SIB_BOLA_BUTTON_R6 18
 #define SIB_BOLA_FLECK_R6 20
 #define SIB_BOLA_R6 21
-#define SIB_TKNOPF1_R7 22
+#define SIB_TBUTTON1_R7 22
 #define SIB_HEBEL_R7 23
 #define SIB_KLINGEL_R7 24
 #define SIB_GIPS_R7 25
-#define SIB_TKNOPF2_R7 26
+#define SIB_TBUTTON2_R7 26
 #define SIB_SCHLOTT_R7 27
 #define SIB_LHAKEN_R7 28
 #define SIB_RHAKEN_R7 29
@@ -55,10 +55,10 @@ namespace Chewy {
 #define SIB_SURIMY_R10 36
 #define SIB_PAINT_R22 37
 #define SIB_SCHLITZ_R11 38
-#define SIB_TKNOPF1_R11 39
-#define SIB_BANDKNOPF_R13 40
-#define SIB_TKNOPF2_R11 41
-#define SIB_TKNOPF3_R11 42
+#define SIB_TBUTTON1_R11 39
+#define SIB_BANDBUTTON_R13 40
+#define SIB_TBUTTON2_R11 41
+#define SIB_TBUTTON3_R11 42
 #define SIB_CARTRIDGE_R23 43
 #define SIB_FLUXO_R23 44
 #define SIB_TRANSLATOR_23 45
@@ -76,7 +76,7 @@ namespace Chewy {
 #define SIB_FLUESSIG_R17 57
 #define SIB_HEBEL_R17 58
 #define SIB_CART1_R18 59
-#define SIB_TUERKNOPF_R18 60
+#define SIB_DOORKNOB_R18 60
 #define SIB_CART_FACH_R18 61
 #define SIB_SCHLAUCH_R25 62
 #define SIB_SCHLAUCH_R26 63
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 3703ef5b011..fea1d30921c 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -587,7 +587,7 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 						_mousePush = true;
 						_atsv.DelayCount = 0;
 						_inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-						_inzeig->kbinfo->key_code = '\0';
+						_inzeig->kbinfo->_keyCode = '\0';
 					}
 				}
 				break;
@@ -884,7 +884,7 @@ void Atdsys::ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str)
 
 int16 Atdsys::start_aad(int16 dia_nr) {
 	if (_aadv.Dialog)
-		stop_aad();
+		stopAad();
 
 	if (_atdsmem[AAD_HANDLE]) {
 		_aadv.Ptr = _atdsmem[AAD_HANDLE];
@@ -914,7 +914,7 @@ int16 Atdsys::start_aad(int16 dia_nr) {
 	return _aadv.Dialog;
 }
 
-void Atdsys::stop_aad() {
+void Atdsys::stopAad() {
 	_aadv.Dialog = false;
 	_aadv.StrNr = -1;
 }
@@ -933,7 +933,7 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 						_mousePush = true;
 						_aadv._delayCount = 0;
 						_inzeig->kbinfo->scan_code = Common::KEYCODE_INVALID;
-						_inzeig->kbinfo->key_code = '\0';
+						_inzeig->kbinfo->_keyCode = '\0';
 					}
 				}
 				break;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index adf5adf253c..0fb03a137a7 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -293,7 +293,7 @@ public:
 	void ats_search_str(int16 *anz, uint8 *status, uint8 steuer, char **str);
 	void set_ats_mem(int16 mode);
 	int16 start_aad(int16 dia_nr);
-	void stop_aad();
+	void stopAad();
 	void print_aad(int16 scrx, int16 scry);
 	int16 aad_get_status();
 	void set_string_end_func(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode));
diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp
index 464cf188e77..1782dc270f4 100644
--- a/engines/chewy/chewy.cpp
+++ b/engines/chewy/chewy.cpp
@@ -115,7 +115,7 @@ Common::Error ChewyEngine::loadGameStream(Common::SeekableReadStream *stream) {
 
 		if (_G(spieler).AkInvent != -1)
 			_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = -1;
-		_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+		_G(room)->loadRoom(&_G(room_blk), _G(spieler)._personRoomNr[P_CHEWY], &_G(spieler));
 		load_chewy_taf(_G(spieler).ChewyAni);
 
 		_G(fx_blend) = BLEND1;
diff --git a/engines/chewy/debugger.cpp b/engines/chewy/debugger.cpp
index 0fa20563521..1dc0aeb83fb 100644
--- a/engines/chewy/debugger.cpp
+++ b/engines/chewy/debugger.cpp
@@ -61,8 +61,8 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) {
 	} else {
 		int roomNum = strToInt(argv[1]);
 		exit_room(-1);
-		_G(spieler).PersonRoomNr[P_CHEWY] = roomNum;
-		_G(room)->load_room(&_G(room_blk), roomNum, &_G(spieler));
+		_G(spieler)._personRoomNr[P_CHEWY] = roomNum;
+		_G(room)->loadRoom(&_G(room_blk), roomNum, &_G(spieler));
 		_G(fx_blend) = BLEND1;
 		enter_room(-1);
 
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index ade5d809616..1d40baad9c8 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -573,13 +573,13 @@ SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 		spr_nr = adiptr->end_ani - 1;
 	int16 *Cxy = _rdi.dptr->_correction + (spr_nr << 1);
 	int16 *Xy = (int16 *)_rdi.dptr->_image[spr_nr];
-	_sprInfo.Image = _rdi.dptr->_image[spr_nr];
-	_sprInfo.X = adiptr->x + Cxy[0] - scrx;
-	_sprInfo.Y = adiptr->y + Cxy[1] - scry;
-	_sprInfo.X1 = _sprInfo.X + Xy[0];
-	_sprInfo.Y1 = _sprInfo.Y + Xy[1];
+	_sprInfo._image = _rdi.dptr->_image[spr_nr];
+	_sprInfo._x = adiptr->x + Cxy[0] - scrx;
+	_sprInfo._y = adiptr->y + Cxy[1] - scry;
+	_sprInfo.X1 = _sprInfo._x + Xy[0];
+	_sprInfo.Y1 = _sprInfo._y + Xy[1];
 	if (mode)
-		_G(out)->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
+		_G(out)->sprite_set(_sprInfo._image, _sprInfo._x, _sprInfo._y, 0);
 
 	Sound *sound = g_engine->_sound;
 
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index f2707b8e657..0c517350d9a 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -67,10 +67,10 @@ struct RoomAutoMov {
 #define MAX_RDI_ROOM 100
 
 struct SprInfo {
-	byte *Image = nullptr;
-	int16 ZEbene = 0;
-	int16 X = 0;
-	int16 Y = 0;
+	byte *_image = nullptr;
+	int16 _zLevel = 0;
+	int16 _x = 0;
+	int16 _y = 0;
 	int16 X1 = 0;
 	int16 Y1 = 0;
 };
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 09ae2ca03b4..2e27a00246c 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -86,7 +86,7 @@ void Cinema::execute() {
 			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), none);
 		}
 
-		if (_G(minfo).button == 1 && !flag) {
+		if (_G(minfo)._button == 1 && !flag) {
 			flag = true;
 			switch (_G(in)->mouseVector(_G(minfo).x, _G(minfo).y, CINEMA_TBL, 3)) {
 			case 0:
@@ -115,10 +115,10 @@ void Cinema::execute() {
 			default:
 				break;
 			}
-		} else if (_G(minfo).button == 2 && !flag) {
+		} else if (_G(minfo)._button == 2 && !flag) {
 			_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 			flag = true;
-		} else if (_G(minfo).button != 1) {
+		} else if (_G(minfo)._button != 1) {
 			flag = false;
 			delay = 0;
 		} else if (flag) {
@@ -180,7 +180,7 @@ void Cinema::execute() {
 
 		// The below are hacks to get the dialog to work in ScummVM
 		_G(kbinfo).scan_code = 0;
-		_G(minfo).button = 0;
+		_G(minfo)._button = 0;
 		txt_anz = 0;
 
 		if (!txt_anz) {
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 4b0f94a1dd6..b8bc9e327c7 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -164,7 +164,7 @@ int16 Files::execute(bool isInGame) {
 			Dialogs::Options::execute(ti);
 		}
 
-		if (!flag && _G(minfo).button == 1) {
+		if (!flag && _G(minfo)._button == 1) {
 			int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, FILE_ICONS, 8);
 			flag = true;
 			key = 0;
@@ -209,7 +209,7 @@ int16 Files::execute(bool isInGame) {
 				break;
 			}
 
-		} else if (flag && _G(minfo).button == 0) {
+		} else if (flag && _G(minfo)._button == 0) {
 			flag = false;
 		}
 
@@ -299,7 +299,7 @@ enter:
 	free(ti);
 
 	_G(room)->open_handle(EPISODE1, 0);
-	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->load_tgp(_G(spieler)._personRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 	_G(fx_blend) = BLEND1;
 	_G(room)->set_ak_pal(&_G(room_blk));
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 1a022b01023..008ae46fdeb 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -148,7 +148,7 @@ void Inventory::menu() {
 
 	int16 menu_flag1 = MENU_EINBLENDEN;
 	int16 taste_flag = 28;
-	_G(kbinfo).key_code = '\0';
+	_G(kbinfo)._keyCode = '\0';
 	bool mouseFl = true;
 
 	for (int16 i = 0; i < 3; i++) {
@@ -161,12 +161,12 @@ void Inventory::menu() {
 	_G(show_invent_menu) = 1;
 
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
-		if (!_G(minfo).button)
+		if (!_G(minfo)._button)
 			mouseFl = false;
-		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN || keyVal) {
+		if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN || keyVal) {
 			if (!mouseFl) {
 				mouseFl = true;
-				_G(kbinfo).key_code = '\0';
+				_G(kbinfo)._keyCode = '\0';
 
 				int16 k = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 				if (keyVal == Common::KEYCODE_F1)
@@ -246,7 +246,7 @@ void Inventory::menu() {
 					break;
 				}
 			}
-		} else if (_G(minfo).button == 2 || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE) {
+		} else if (_G(minfo)._button == 2 || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE) {
 			if (!mouseFl) {
 				_G(in)->_hotkey = Common::KEYCODE_ESCAPE;
 				mouseFl = true;
@@ -263,7 +263,7 @@ void Inventory::menu() {
 		} else if (ret_look == 5) {
 			taste_flag = false;
 			mouseFl = false;
-			_G(minfo).button = 1;
+			_G(minfo)._button = 1;
 			keyVal = Common::KEYCODE_RETURN;
 		}
 
@@ -326,13 +326,13 @@ void Inventory::menu() {
 			case Common::KEYCODE_PAGEUP:
 				if (_G(spieler).InventY > 0)
 					--_G(spieler).InventY;
-				_G(kbinfo).key_code = '\0';
+				_G(kbinfo)._keyCode = '\0';
 				break;
 
 			case Common::KEYCODE_PAGEDOWN:
 				if (_G(spieler).InventY < (MAX_MOV_OBJ / 5) - 3)
 					++_G(spieler).InventY;
-				_G(kbinfo).key_code = '\0';
+				_G(kbinfo)._keyCode = '\0';
 				break;
 
 			default:
@@ -423,11 +423,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	while (!endLoop) {
 		int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
 
-		if (_G(minfo).button) {
-			if (_G(minfo).button == 2) {
+		if (_G(minfo)._button) {
+			if (_G(minfo)._button == 2) {
 				if (!mouseFl)
 					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
-			} else if (_G(minfo).button == 1) {
+			} else if (_G(minfo)._button == 1) {
 				if (!mouseFl) {
 					switch (rect) {
 					case 0:
@@ -665,7 +665,7 @@ void Inventory::showDiary() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
+	_G(room)->load_tgp(_G(spieler)._personRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 	_G(spieler).scrollx = scrollx;
 	_G(spieler).scrolly = scrolly;
 	setupScreen(NO_SETUP);
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index bc5227a2c3a..5eecf4bc822 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -67,15 +67,15 @@ void MainMenu::execute() {
 		cursorChoice(CUR_ZEIGE);
 		_selection = -1;
 		_G(spieler).scrollx = _G(spieler).scrolly = 0;
-		_G(spieler).PersonRoomNr[P_CHEWY] = 98;
-		_G(room)->load_room(&_G(room_blk), 98, &_G(spieler));
+		_G(spieler)._personRoomNr[P_CHEWY] = 98;
+		_G(room)->loadRoom(&_G(room_blk), 98, &_G(spieler));
 
 		_G(currentSong) = -1;
 		load_room_music(98);
 		_G(fx)->border(_G(workpage), 100, 0, 0);
 
 		_G(out)->setPalette(_G(pal));
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		showCur();
 
 		// Wait for a selection to be made on the main menu
@@ -135,7 +135,7 @@ void MainMenu::execute() {
 void MainMenu::screenFunc() {
 	int vec = _G(det)->maus_vector(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 
-	if (_G(in)->get_switch_code() == 28 || _G(minfo).button == 1) {
+	if (_G(in)->get_switch_code() == 28 || _G(minfo)._button == 1) {
 		_selection = vec;
 	}
 }
@@ -213,14 +213,14 @@ void MainMenu::startGame() {
 	_G(spieler).DisplayText = displayText;
 	_G(spieler).soundLoopMode = sndLoopMode;
 
-	_G(spieler).PersonRoomNr[P_CHEWY] = 0;
-	_G(room)->load_room(&_G(room_blk), 0, &_G(spieler));
+	_G(spieler)._personRoomNr[P_CHEWY] = 0;
+	_G(room)->loadRoom(&_G(room_blk), 0, &_G(spieler));
 
 	_G(spieler_vector)[P_CHEWY].Phase = 6;
 	_G(spieler_vector)[P_CHEWY].PhAnz = _G(chewy_ph_anz)[6];
 	setPersonPos(160, 80, P_CHEWY, P_RIGHT);
 	_G(fx_blend) = BLEND3;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 	enter_room(-1);
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 0eaef3e8c14..bff87afc40d 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -147,7 +147,7 @@ void Options::execute(TafInfo *ti) {
 			8 + ti->_correction[(EXIT << 1) + 1], 0);
 
 		key = _G(in)->get_switch_code();
-		if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
+		if ((_G(minfo)._button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
 
 			int16 rect = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, OPTION_ICONS, 9);
@@ -188,7 +188,7 @@ void Options::execute(TafInfo *ti) {
 				} else {
 					_G(spieler).MusicSwitch = true;
 					_G(currentSong) = -1;
-					load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
+					load_room_music(_G(spieler)._personRoomNr[P_CHEWY]);
 				}
 				break;
 			case 6:
@@ -206,7 +206,7 @@ void Options::execute(TafInfo *ti) {
 			default:
 				break;
 			}
-			_G(minfo).button = 0;
+			_G(minfo)._button = 0;
 		}
 		switch (key) {
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 9220f79eb99..d1d46910295 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -65,23 +65,23 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 
 	// Different event types handling
 	if (event.type != Common::EVENT_MOUSEMOVE)
-		_G(minfo).button = 0;
+		_G(minfo)._button = 0;
 
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
 	case Common::EVENT_LBUTTONUP:
 		if (updateOnButtonUp && event.type == Common::EVENT_LBUTTONUP)
-			_G(minfo).button = 1;
+			_G(minfo)._button = 1;
 		if (!updateOnButtonUp && event.type == Common::EVENT_LBUTTONDOWN)
-			_G(minfo).button = 1;
+			_G(minfo)._button = 1;
 		break;
 
 	case Common::EVENT_RBUTTONDOWN:
 	case Common::EVENT_RBUTTONUP:
 		if (updateOnButtonUp && event.type == Common::EVENT_RBUTTONUP)
-			_G(minfo).button = 2;
+			_G(minfo)._button = 2;
 		if (!updateOnButtonUp && event.type == Common::EVENT_RBUTTONDOWN)
-			_G(minfo).button = 2;
+			_G(minfo)._button = 2;
 		break;
 
 	case Common::EVENT_WHEELUP:
@@ -125,13 +125,13 @@ void EventsManager::handleMouseEvent(const Common::Event &event, bool updateOnBu
 void EventsManager::handleKbdEvent(const Common::Event &event) {
 	if (_kbInfo) {
 		if (event.type == Common::EVENT_KEYDOWN) {
-			_kbInfo->key_code = event.kbd.ascii;
+			_kbInfo->_keyCode = event.kbd.ascii;
 			_kbInfo->scan_code = event.kbd.keycode;
 			if (event.kbd.flags & Common::KBD_ALT)
 				_kbInfo->scan_code |= ALT;
 		} else if (event.type == Common::EVENT_KEYUP) {
-			if (event.kbd.ascii == _kbInfo->key_code)
-				_kbInfo->key_code = '\0';
+			if (event.kbd.ascii == _kbInfo->_keyCode)
+				_kbInfo->_keyCode = '\0';
 		}
 	}
 }
@@ -149,10 +149,10 @@ void EventsManager::delay(size_t time) {
 void EventsManager::clearEvents() {
 	if (_kbInfo) {
 		_kbInfo->scan_code = Common::KEYCODE_INVALID;
-		_kbInfo->key_code = '\0';
+		_kbInfo->_keyCode = '\0';
 	}
 
-	_G(minfo).button = 0;
+	_G(minfo)._button = 0;
 }
 
 KbdInfo *EventsManager::setKbdInfo(KbdInfo *kbInfo) {
@@ -171,13 +171,13 @@ void delay(size_t time) {
 }
 
 bool kbhit() {
-	return g_events->_kbInfo && g_events->_kbInfo->key_code != 0;
+	return g_events->_kbInfo && g_events->_kbInfo->_keyCode != 0;
 }
 
 char getch() {
-	if (g_events->_kbInfo && g_events->_kbInfo->key_code) {
-		char c = g_events->_kbInfo->key_code;
-		g_events->_kbInfo->key_code = 0;
+	if (g_events->_kbInfo && g_events->_kbInfo->_keyCode) {
+		char c = g_events->_kbInfo->_keyCode;
+		g_events->_kbInfo->_keyCode = 0;
 		g_events->_kbInfo->scan_code = 0;
 
 		return c;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 0c341dce8c1..36de914daa2 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -339,7 +339,7 @@ void clear_prog_ani();
 
 void set_ani_screen();
 
-void del_inventar(int16 nr);
+void delInventory(int16 nr);
 
 bool is_cur_inventar(int16 nr);
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 1b56d3d6122..ffb6bce5350 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -153,10 +153,10 @@ void var_init() {
 
 		_G(ani_stand_flag)[i] = false;
 		_G(spz_delay)[i] = 0;
-		_G(spieler).PersonRoomNr[i] = -1;
+		_G(spieler)._personRoomNr[i] = -1;
 		_G(spieler).PersonDia[i] = -1;
 	}
-	_G(spieler).PersonRoomNr[P_CHEWY] = _G(room_start_nr);
+	_G(spieler)._personRoomNr[P_CHEWY] = _G(room_start_nr);
 
 	_G(gpkt).Vorschub = _G(spieler_mi)[P_CHEWY].Vorschub;
 	init_room();
@@ -275,7 +275,7 @@ void init_load() {
 	f.read(_G(spblende) + sizeof(uint32), f.size());
 	f.close();
 
-	_G(room)->load_room(&_G(room_blk), _G(room_start_nr), &_G(spieler));
+	_G(room)->loadRoom(&_G(room_blk), _G(room_start_nr), &_G(spieler));
 	_G(out)->setPalette(_G(pal));
 }
 
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 0d1d0d77f78..3868997879e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -41,7 +41,7 @@ static const int16 invent_display[4][2] = {
 	{5, 0}, { 265, 0 }, { 265, 149 }, { 5, 149 }
 };
 
-extern void switch_room(int16 nr);
+extern void switchRoom(int16 nr);
 
 void game_main() {
 	_G(fontMgr) = new FontMgr();
@@ -313,7 +313,7 @@ bool mainLoop(int16 mode) {
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
-			_G(kbinfo).key_code = '\0';
+			_G(kbinfo)._keyCode = '\0';
 			break;
 
 		case Common::KEYCODE_F6:
@@ -567,7 +567,7 @@ void setupScreen(SetupScreenMode mode) {
 						_G(spieler_mi)[P_CHEWY].XyzEnd[1] = _G(gpkt).Dy - _G(spieler_mi)[P_CHEWY].HotY;
 						_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[P_CHEWY].XyzStart, _G(spieler_mi)[P_CHEWY].Vorschub, &_G(spieler_vector)[P_CHEWY]);
 						get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
-						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
+						_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 						_G(auto_p_nr) = P_CHEWY;
 					}
 				}
@@ -727,17 +727,17 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 						if (_G(spieler).room_m_obj[nr].AniFlag == 255) {
 							invent_2_slot(nr);
 						} else {
-							_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[nr].HeldHide;
+							_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_m_obj[nr].HeldHide;
 							play_scene_ani(_G(spieler).room_m_obj[nr].AniFlag, ANI_FRONT);
 							invent_2_slot(nr);
 
-							_G(spieler).PersonHide[P_CHEWY] = false;
+							_G(spieler)._personHide[P_CHEWY] = false;
 						}
 
 						_G(spieler).inv_cur = false;
 						_G(menu_item) = CUR_WALK;
 						cursorChoice(_G(menu_item));
-						_G(spieler_vector)[P_CHEWY].DelayCount = 0;
+						_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 
 						if (_G(spieler).AkInvent != -1)
 							_G(spieler).room_m_obj[_G(spieler).AkInvent].RoomNr = 255;
@@ -850,13 +850,13 @@ void mouseAction() {
 		_G(inv_disp_ok) = false;
 	}
 	if (_G(atds)->aad_get_status() == -1) {
-		if (_G(minfo).button || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+		if (_G(minfo)._button || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 
-			if (_G(minfo).button == 2 || _G(kbinfo).key_code == Common::KEYCODE_ESCAPE) {
+			if (_G(minfo)._button == 2 || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE) {
 				if (!_G(flags).main_maus_flag) {
 					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 				}
-			} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+			} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 				if (!_G(flags).main_maus_flag) {
 					if (_G(menu_display) == MENU_EINBLENDEN)
 						_G(kbinfo).scan_code = Common::KEYCODE_RETURN;
@@ -903,9 +903,9 @@ void evaluateObj(int16 testNr, int16 mode) {
 				txt_nr = _G(obj)->iib_txt_nr(testNr);
 				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
 				if (_G(spieler).room_m_obj[testNr].AniFlag != 255) {
-					_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_m_obj[testNr].HeldHide;
+					_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_m_obj[testNr].HeldHide;
 					play_scene_ani(_G(spieler).room_m_obj[testNr].AniFlag, ANI_FRONT);
-					_G(spieler).PersonHide[P_CHEWY] = false;
+					_G(spieler)._personHide[P_CHEWY] = false;
 				}
 			}
 			showCur();
@@ -923,7 +923,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 			txt_nr = _G(obj)->sib_txt_nr(testNr);
 			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
 				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
 				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
 
@@ -936,7 +936,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 			}
 			_G(menu_item_vorwahl) = CUR_WALK;
 			showCur();
@@ -962,7 +962,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 			txt_nr = _G(obj)->sib_txt_nr(testNr);
 			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
 				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
 
 				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
@@ -976,7 +976,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 				}
 				if (ani_nr != -1)
 					play_scene_ani(ani_nr, tmp);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 			}
 
 			if (_G(spieler).room_s_obj[testNr].InvNr != -1) {
@@ -1005,7 +1005,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 			txt_nr = _G(obj)->sib_txt_nr(testNr);
 			Dialogs::Inventory::look_screen(INVENTORY_STATIC, txt_nr);
 			if (_G(spieler).room_s_obj[testNr].AniFlag != 255) {
-				_G(spieler).PersonHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
+				_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_s_obj[testNr].HeldHide;
 				tmp = getAniDirection((int16)_G(spieler).room_s_obj[testNr].ZustandAk);
 
 				ani_nr = _G(spieler).room_s_obj[testNr].AniFlag;
@@ -1020,7 +1020,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 				if (ani_nr != -1) {
 					play_scene_ani(ani_nr, tmp);
 				}
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 			}
 
 			if (_G(spieler).room_s_obj[testNr].InvNr != -1)
@@ -1216,7 +1216,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 			_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[playerNum].XyzStart,
 				_G(spieler_mi)[playerNum].Vorschub, &_G(spieler_vector)[playerNum]);
 			get_phase(&_G(spieler_vector)[playerNum], &_G(spieler_mi)[playerNum]);
-			_G(spieler_vector)[playerNum].DelayCount = 0;
+			_G(spieler_vector)[playerNum]._delayCount = 0;
 
 			if (_G(mov)->auto_go_status()) {
 				while (_G(mov)->auto_go_status()) {
@@ -1272,7 +1272,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 }
 
 void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
-	if (!_G(stopAutoMove)[personNum] && _G(spieler).PersonRoomNr[personNum] == _G(spieler).PersonRoomNr[P_CHEWY]) {
+	if (!_G(stopAutoMove)[personNum] && _G(spieler)._personRoomNr[personNum] == _G(spieler)._personRoomNr[P_CHEWY]) {
 		int16 move_status = true;
 		int16 tmp = _G(maus_links_click);
 		_G(maus_links_click) = false;
@@ -1407,7 +1407,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					
 					if (!ok && !action_ret) {
 						if (inv_no_use_mode != -1 && !_G(atds)->get_steuer_bit(txtNr, ATS_AKTIV_BIT, ATS_DATA)) {
-							actionFl = calc_inv_no_use(idx + (_G(spieler).PersonRoomNr[P_CHEWY] * 100), inv_no_use_mode);
+							actionFl = calc_inv_no_use(idx + (_G(spieler)._personRoomNr[P_CHEWY] * 100), inv_no_use_mode);
 							if (actionFl)
 								ret = txtNr;
 						}
@@ -1469,7 +1469,7 @@ int16 is_mouse_person(int16 x, int16 y) {
 
 					case P_HOWARD:
 					case P_NICHELLE:
-						if (_G(spieler).PersonRoomNr[i] != _G(spieler).PersonRoomNr[P_CHEWY])
+						if (_G(spieler)._personRoomNr[i] != _G(spieler)._personRoomNr[P_CHEWY])
 							check = false;
 						xy = (int16 *)_G(PersonTaf)[i]->_image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
@@ -1501,7 +1501,7 @@ void calc_mouse_person(int16 x, int16 y) {
 	if (_G(flags).ShowAtsInvTxt && !_G(flags).InventMenu) {
 		int16 p_nr = is_mouse_person(x, y);
 		if (p_nr != -1) {
-			if (!_G(spieler).PersonHide[p_nr]) {
+			if (!_G(spieler)._personHide[p_nr]) {
 				_G(fontMgr)->setFont(_G(font8));
 				char *str_ = ch_txt[p_nr];
 				calc_txt_xy(&x, &y, str_, 1);
@@ -1653,7 +1653,7 @@ void get_user_key(int16 mode) {
 				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
-			_G(kbinfo).key_code = '\0';
+			_G(kbinfo)._keyCode = '\0';
 			break;
 
 		default:
@@ -1666,8 +1666,8 @@ void get_user_key(int16 mode) {
 
 void clear_prog_ani() {
 	for (int16 i = 0; i < MAX_PROG_ANI; i++) {
-		_G(spr_info)[i].Image = nullptr;
-		_G(spr_info)[i].ZEbene = 255;
+		_G(spr_info)[i]._image = nullptr;
+		_G(spr_info)[i]._zLevel = 255;
 	}
 }
 
@@ -1677,7 +1677,7 @@ void set_ani_screen() {
 	setupScreen(DO_SETUP);
 }
 
-void del_inventar(int16 nr) {
+void delInventory(int16 nr) {
 	_G(obj)->delInventory(nr, &_G(room_blk));
 	_G(spieler).inv_cur = false;
 	_G(menu_item) = CUR_WALK;
@@ -1748,8 +1748,8 @@ void calc_ausgang(int16 x, int16 y) {
 				setupScreen(DO_SETUP);
 				_G(cur_hide_flag) = true;
 				exit_room(nr);
-				_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
-				_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+				_G(spieler)._personRoomNr[P_CHEWY] = _G(spieler).room_e_obj[nr].Exit;
+				_G(room)->loadRoom(&_G(room_blk), _G(spieler)._personRoomNr[P_CHEWY], &_G(spieler));
 				setPersonPos(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].X -
 				               _G(spieler_mi)[_G(auto_p_nr)].HotMovX,
 				               _G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].Y - _G(spieler_mi)[_G(auto_p_nr)].HotMovY
@@ -1766,7 +1766,7 @@ void calc_ausgang(int16 x, int16 y) {
 				                               _G(ged_mem)[_G(room_blk).AkAblage]);
 				check_shad(u_idx, 0);
 				setPersonSpr(_G(Rdi)->AutoMov[_G(spieler).room_e_obj[nr].ExitMov].SprNr, P_CHEWY);
-				_G(spieler_vector)[P_CHEWY].DelayCount = 0;
+				_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 				_G(fx_blend) = BLEND1;
 				_G(auto_obj) = 0;
 				_G(spieler_vector)[P_CHEWY].Xzoom = 0;
@@ -1899,8 +1899,8 @@ void calc_auto_go() {
 void hide_person() {
 	for (int16 i = 0; i < MAX_PERSON; i++) {
 
-		if (!_G(spieler).PersonHide[i]) {
-			_G(spieler).PersonHide[i] = true;
+		if (!_G(spieler)._personHide[i]) {
+			_G(spieler)._personHide[i] = true;
 			_G(person_tmp_hide)[i] = true;
 		} else
 			_G(person_tmp_hide)[i] = false;
@@ -1911,20 +1911,20 @@ void show_person() {
 	for (int16 i = 0; i < MAX_PERSON; i++) {
 
 		if (_G(person_tmp_hide)[i])
-			_G(spieler).PersonHide[i] = false;
+			_G(spieler)._personHide[i] = false;
 	}
 }
 
 void save_person_rnr() {
 	for (int16 i = 0; i < MAX_PERSON; i++)
-		_G(person_tmp_room)[i] = _G(spieler).PersonRoomNr[i];
+		_G(person_tmp_room)[i] = _G(spieler)._personRoomNr[i];
 	_G(flags).SavePersonRnr = true;
 }
 
 void set_person_rnr() {
 	if (_G(flags).SavePersonRnr) {
 		for (int16 i = 0; i < MAX_PERSON; i++)
-			_G(spieler).PersonRoomNr[i] = _G(person_tmp_room)[i];
+			_G(spieler)._personRoomNr[i] = _G(person_tmp_room)[i];
 		_G(flags).SavePersonRnr = false;
 	}
 }
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index d6a03f39593..4ef6c320dfc 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -312,7 +312,7 @@ void stop_ads_dialog() {
 	_G(flags).AdsDialog = false;
 	_G(maus_links_click) = false;
 	_G(atds)->stop_ads();
-	if (_G(minfo).button)
+	if (_G(minfo)._button)
 		_G(flags).main_maus_flag = 1;
 }
 
@@ -368,7 +368,7 @@ int16 del_invent_slot(int16 nr) {
 
 void remove_inventory(int16 nr) {
 	if (nr == _G(spieler).AkInvent) {
-		del_inventar(nr);
+		delInventory(nr);
 	} else {
 		_G(obj)->delInventory(nr, &_G(room_blk));
 		del_invent_slot(nr);
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 37f250c2a00..f629d78a652 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -66,7 +66,7 @@ int16 InputMgr::mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz) {
 void InputMgr::neuer_kb_handler(KbdInfo *key) {
 	set_new_kb_handler(key);
 	_kbInfoBlk = key;
-	_kbInfoBlk->key_code = '\0';
+	_kbInfoBlk->_keyCode = '\0';
 }
 
 void InputMgr::alter_kb_handler() {
@@ -88,15 +88,15 @@ KbdMouseInfo *InputMgr::getPointer() {
 int16 InputMgr::get_switch_code() {
 	int16 switch_code = 0;
 
-	if (_G(minfo).button == 2) {
+	if (_G(minfo)._button == 2) {
 		switch_code = Common::KEYCODE_ESCAPE;
-	} else if (_G(minfo).button == 1)
+	} else if (_G(minfo)._button == 1)
 		switch_code = 255;
-	else if (_G(minfo).button == 4)
+	else if (_G(minfo)._button == 4)
 		switch_code = 254;
 
-	if (_kbInfoBlk && _kbInfoBlk->key_code != 0)
-		switch_code = (int16)_kbInfoBlk->key_code;
+	if (_kbInfoBlk && _kbInfoBlk->_keyCode != 0)
+		switch_code = (int16)_kbInfoBlk->_keyCode;
 
 	if (_hotkey != Common::KEYCODE_INVALID) {
 		switch_code = _hotkey;
diff --git a/engines/chewy/movclass.h b/engines/chewy/movclass.h
index 6f8a05b02e7..777027dab40 100644
--- a/engines/chewy/movclass.h
+++ b/engines/chewy/movclass.h
@@ -56,7 +56,7 @@ struct ObjMov {
 
 	int16 Delay = 0;
 
-	int16 DelayCount = 0;
+	int16 _delayCount = 0;
 
 	int16 Phase = 0;
 	int16 PhNr = 0;
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 2cd9ef2b786..243916867c1 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -28,10 +28,6 @@
 
 namespace Chewy {
 
-#define D_GR 16
-#define MAXMENUE 50
-#define MAXKNOPF 400
-
 struct TafInfo {
 	int16 _count = 0;
 	byte *_palette = nullptr;
@@ -56,11 +52,11 @@ struct NewPhead {
 struct MouseInfo {
 	int16 x = 0;
 	int16 y = 0;
-	int16 button = 0;
+	int16 _button = 0;
 };
 
 struct KbdInfo {
-	char key_code = '\0';
+	char _keyCode = '\0';
 	int scan_code = Common::KEYCODE_INVALID;
 };
 
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index 013f5d7cc8c..0e6aef75fe6 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -179,7 +179,7 @@ void Object::sort() {
 			if (_rmo[i].RoomNr == 255) {
 				++spieler_invnr[0];
 				spieler_invnr[spieler_invnr[0]] = i;
-			} else if (_rmo[i].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
+			} else if (_rmo[i].RoomNr == _player->_personRoomNr[P_CHEWY]) {
 				++mov_obj_room[0];
 				mov_obj_room[mov_obj_room[0]] = i;
 			}
@@ -198,7 +198,7 @@ void Object::free_inv_spr(byte **inv_spr_adr) {
 int16 Object::is_sib_mouse(int16 mouse_x, int16 mouse_y) {
 	int16 ret = -1;
 	for (int16 i = 0; i < _maxStaticInventory && ret == -1; i++) {
-		if (_rsi[i].RoomNr == _player->PersonRoomNr[P_CHEWY] && _rsi[i].HideSib == false) {
+		if (_rsi[i].RoomNr == _player->_personRoomNr[P_CHEWY] && _rsi[i].HideSib == false) {
 			if (mouse_x >= _rsi[i].X &&
 			        mouse_x <= (_rsi[i].X + _rsi[i].XOff) &&
 			        mouse_y >= _rsi[i].Y &&
@@ -329,7 +329,7 @@ void Object::calc_static_detail(int16 det_nr) {
 	int16 i;
 	int16 n;
 
-	if (_rsi[det_nr].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
+	if (_rsi[det_nr].RoomNr == _player->_personRoomNr[P_CHEWY]) {
 		int16 nr = _rsi[det_nr].StaticAk;
 		if (nr != -1) {
 			if (nr >= 30000) {
@@ -497,7 +497,7 @@ void Object::changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb) {
 void Object::setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb) {
 	++mov_obj_room[0];
 	mov_obj_room[mov_obj_room[0]] = nr;
-	_player->room_m_obj[nr].RoomNr = _player->PersonRoomNr[P_CHEWY];
+	_player->room_m_obj[nr].RoomNr = _player->_personRoomNr[P_CHEWY];
 	_player->room_m_obj[nr].X = x;
 	_player->room_m_obj[nr].Y = y;
 	_player->room_m_obj[nr].AutoMov = automov;
@@ -517,7 +517,7 @@ bool Object::checkInventory(int16 nr) {
 int16 Object::is_exit(int16 mouse_x, int16 mouse_y) {
 	int16 ret = -1;
 	for (int16 i = 0; i < _maxExit && ret == -1; i++) {
-		if (_roomExit[i].RoomNr == _player->PersonRoomNr[P_CHEWY]) {
+		if (_roomExit[i].RoomNr == _player->_personRoomNr[P_CHEWY]) {
 			if (mouse_x >= _roomExit[i].X &&
 			        mouse_x <= (_roomExit[i].X + _roomExit[i].XOff) &&
 			        mouse_y >= _roomExit[i].Y &&
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 35715a086da..7fe78690ebf 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -47,7 +47,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 #define ROOM_8_17 817
 #define ROOM_9_4 904
 #define ROOM_18_20 1820
-	int16 r_nr = _G(spieler).PersonRoomNr[P_CHEWY] * 100 + nr;
+	int16 r_nr = _G(spieler)._personRoomNr[P_CHEWY] * 100 + nr;
 
 	switch (r_nr) {
 	case ROOM_2_3:
@@ -60,7 +60,7 @@ void play_scene_ani(int16 nr, int16 mode) {
 		break;
 
 	case ROOM_18_20:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		break;
 
 	default:
@@ -101,7 +101,7 @@ void timer_action(int16 t_nr) {
 		return;
 
 #define TIMER(NUM) case NUM: Room##NUM::timer(t_nr, ani_nr); break;
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+	switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 	TIMER(0);
 	TIMER(11);
 	TIMER(12);
@@ -141,7 +141,7 @@ void check_ged_action(int16 index) {
 		_G(flags).GedAction = true;
 
 #define GED_ACTION(NUM) case NUM: Room##NUM::gedAction(index); break;
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		GED_ACTION(1);
 		GED_ACTION(2);
 		GED_ACTION(7);
@@ -180,7 +180,7 @@ void check_ged_action(int16 index) {
 int16 ged_user_func(int16 idx_nr) {
 	switch (idx_nr) {
 	case 40:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		case 8:
 			if (_G(spieler).R8GTuer)
 				idx_nr = 0;
@@ -257,7 +257,7 @@ int16 ged_user_func(int16 idx_nr) {
 		break;
 
 	case 41:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		case 17:
 			if (_G(spieler).R17Location != 2)
 				idx_nr = 0;
@@ -293,7 +293,7 @@ int16 ged_user_func(int16 idx_nr) {
 		break;
 
 	case 42:
-		if (_G(spieler).PersonRoomNr[P_CHEWY] == 97) {
+		if (_G(spieler)._personRoomNr[P_CHEWY] == 97) {
 			if (!_G(spieler).flags37_1)
 				idx_nr = 0;
 		}
@@ -307,9 +307,9 @@ int16 ged_user_func(int16 idx_nr) {
 }
 
 void enter_room(int16 eib_nr) {
-	load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
+	load_room_music(_G(spieler)._personRoomNr[P_CHEWY]);
 	load_chewy_taf(_G(spieler).ChewyAni);
-	_G(atds)->stop_aad();
+	_G(atds)->stopAad();
 	_G(atds)->stop_ats();
 	_G(spieler).DiaAMov = -1;
 	_G(zoom_mov_fak) = 1;
@@ -334,7 +334,7 @@ void enter_room(int16 eib_nr) {
 #define ENTRY(NUM) case NUM: Room##NUM::entry(); break
 #define ENTRY_NR(NUM) case NUM: Room##NUM::entry(eib_nr); break
 
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+	switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 	ENTRY(0);
 	ENTRY(2);
 	ENTRY(3);
@@ -455,7 +455,7 @@ void exit_room(int16 eib_nr) {
 	bool no_exit = false;
 	_G(det)->disable_room_sound();
 
-	switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+	switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 	case 6:
 		if (eib_nr == 8)
 			_G(spieler).R17Location = 2;
@@ -498,7 +498,7 @@ void exit_room(int16 eib_nr) {
 		break;
 
 	case 23:
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		switch (_G(spieler).R23GleiterExit) {
 		case 16:
 			setPersonPos(126, 110, P_CHEWY, P_RIGHT);
@@ -733,14 +733,14 @@ void exit_room(int16 eib_nr) {
 	}
 
 	if (no_exit) {
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		case 40:
 			Room40::xit(eib_nr);
 			break;
 
 		case 42:
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 42)
-				_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 42)
+				_G(spieler)._personRoomNr[P_HOWARD] = 40;
 			break;
 
 		case 50: Room50::xit(eib_nr); break;
@@ -805,9 +805,9 @@ int16 flic_user_function(int16 keys) {
 
 	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	if (_G(flic_val1) == 593 && keys == 35)
-		_G(atds)->stop_aad();
+		_G(atds)->stopAad();
 	if (_G(flic_val1) == 594 && keys == 18)
-		_G(atds)->stop_aad();
+		_G(atds)->stopAad();
 
 	int ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	if (_G(flic_val2) == 140 && keys == 15)
@@ -878,7 +878,7 @@ static void flic_proc1() {
 			flag = VALS4[i] && _G(atds)->aad_get_status() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
-		_G(atds)->stop_aad();
+		_G(atds)->stopAad();
 	}
 
 	_G(flc)->remove_custom_user_function();
@@ -1172,7 +1172,7 @@ void flic_cut(int16 nr) {
 	g_engine->_sound->setMusicVolume(_G(spieler).MusicVol * Audio::Mixer::kMaxChannelVolume / 120);
 
 	if (nr < 1000 && nr != 135) {
-		load_room_music(_G(spieler).PersonRoomNr[0]);
+		load_room_music(_G(spieler)._personRoomNr[0]);
 
 		if (_G(spieler).SpeechSwitch)
 			_G(det)->enable_room_sound();
@@ -1183,7 +1183,7 @@ void flic_cut(int16 nr) {
 	if (!_G(flags).NoPalAfterFlc)
 		_G(out)->setPalette(_G(pal));
 
-	_G(atds)->stop_aad();
+	_G(atds)->stopAad();
 	_G(atds)->stop_ats();
 	_G(out)->setPointer(_G(workptr));
 	_G(flags).NoPalAfterFlc = false;
@@ -1247,7 +1247,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		}
 		break;
 
-	case SIB_KNOPF_R5:
+	case SIB_BUTTON_R5:
 		Room5::pushButton();
 		break;
 
@@ -1259,12 +1259,12 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 0, ATS_DATA);
 		break;
 
-	case SIB_BOLA_KNOPF_R6:
-		Room6::bola_knopf();
+	case SIB_BOLA_BUTTON_R6:
+		Room6::bola_button();
 		break;
 
-	case SIB_TKNOPF1_R7:
-		_G(spieler).R6DoorLeftB = exit_flip_flop(3, 12, 9, 49, 35, SIB_TKNOPF2_R6,
+	case SIB_TBUTTON1_R7:
+		_G(spieler).R6DoorLeftB = exit_flip_flop(3, 12, 9, 49, 35, SIB_TBUTTON2_R6,
 		                                     AUSGANG_OBEN, AUSGANG_LINKS,
 		                                     (int16)_G(spieler).R6DoorLeftB);
 		break;
@@ -1281,7 +1281,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_KLINGEL_R7:
-		Room7::klingel();
+		Room7::bell();
 		break;
 
 	case SIB_GIPS_R7:
@@ -1290,7 +1290,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(obj)->hide_sib(SIB_GIPS_R7);
 		break;
 
-	case SIB_TKNOPF2_R7:
+	case SIB_TBUTTON2_R7:
 		_G(spieler).R7DoorRight = exit_flip_flop(4, 13, 14, 53, 68, SIB_TUER_R8,
 		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
 		                                     (int16)_G(spieler).R7DoorRight);
@@ -1323,7 +1323,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		break;
 
 	case SIB_TUER_R8:
-		_G(spieler).R7DoorRight = exit_flip_flop(-1, 14, 13, 68, 53, SIB_TKNOPF2_R7,
+		_G(spieler).R7DoorRight = exit_flip_flop(-1, 14, 13, 68, 53, SIB_TBUTTON2_R7,
 		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
 		                                     (int16)_G(spieler).R7DoorRight);
 		break;
@@ -1336,7 +1336,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		Room11::get_card();
 		break;
 
-	case SIB_BANDKNOPF_R13:
+	case SIB_BANDBUTTON_R13:
 		_G(spieler).R13Bandlauf ^= 1;
 
 		if (_G(spieler).R13Bandlauf) {
@@ -1411,7 +1411,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(atds)->set_steuer_bit(155, ATS_AKTIV_BIT, ATS_DATA);
 		break;
 
-	case SIB_TUERKNOPF_R18:
+	case SIB_DOORKNOB_R18:
 		if (_G(spieler).R18DoorBruecke) {
 			g_engine->_sound->stopSound(0);
 			g_engine->_sound->playSound(19, 1);
@@ -1421,7 +1421,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		}
 
 		if (!_G(spieler).R6DoorLeftF) {
-			_G(spieler).R6DoorLeftF = exit_flip_flop(-1, 8, -1, 33, -1, SIB_TKNOPF1_R6,
+			_G(spieler).R6DoorLeftF = exit_flip_flop(-1, 8, -1, 33, -1, SIB_TBUTTON1_R6,
 				AUSGANG_LINKS, -1,
 				(int16)_G(spieler).R6DoorLeftF);
 		}
@@ -1516,7 +1516,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 		_G(cur_hide_flag) = false;
 		hideCur();
 		startAadWait(406);
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 66)
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 66)
 			startAadWait(613);
 		showCur();
 		break;
@@ -1540,7 +1540,7 @@ void sib_event_inv(int16 sib_nr) {
 		if (!_G(spieler).R5Terminal) {
 			_G(spieler).R5Terminal = true;
 			cur_2_inventory();
-			del_inventar(RED_CARD_INV);
+			delInventory(RED_CARD_INV);
 			start_aad(103, -1);
 			_G(det)->startDetail(6, 255, ANI_FRONT);
 			_G(atds)->set_ats_str(27, 1, ATS_DATA);
@@ -1548,33 +1548,33 @@ void sib_event_inv(int16 sib_nr) {
 		}
 		break;
 
-	case SIB_TKNOPF1_R6:
+	case SIB_TBUTTON1_R6:
 		_G(spieler).R6DoorLeftF = exit_flip_flop(4, 8, -1, 33, -1, -1,
 			AUSGANG_LINKS, -1, _G(spieler).R6DoorLeftF);
 		break;
 
-	case SIB_TKNOPF2_R6:
-		_G(spieler).R6DoorLeftB = exit_flip_flop(5, 9, 12, 35, 49, SIB_TKNOPF1_R7,
+	case SIB_TBUTTON2_R6:
+		_G(spieler).R6DoorLeftB = exit_flip_flop(5, 9, 12, 35, 49, SIB_TBUTTON1_R7,
 			AUSGANG_LINKS, AUSGANG_OBEN, _G(spieler).R6DoorLeftB);
 		break;
 
-	case SIB_TKNOPF3_R6:
-		_G(spieler).R6DoorRightB = exit_flip_flop(6, 11, 20, 37, 99, SIB_TKNOPF3_R11,
+	case SIB_TBUTTON3_R6:
+		_G(spieler).R6DoorRightB = exit_flip_flop(6, 11, 20, 37, 99, SIB_TBUTTON3_R11,
 			AUSGANG_RECHTS, AUSGANG_LINKS, _G(spieler).R6DoorRightB);
 		break;
 
-	case SIB_BOLA_KNOPF_R6:
-		del_inventar(_G(spieler).AkInvent);
+	case SIB_BOLA_BUTTON_R6:
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).R6BolaSchild = true;
 		_G(det)->showStaticSpr(2);
-		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-		_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
+		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_BUTTON_R6);
+		_G(obj)->hide_sib(SIB_BOLA_BUTTON_R6);
 		_G(obj)->show_sib(SIB_BOLA_R6);
 		break;
 
 	case SIB_LHAKEN_R7:
 	case SIB_RHAKEN_R7:
-		Room7::haken(sib_nr);
+		Room7::hook(sib_nr);
 		break;
 
 	case SIB_GTUER:
@@ -1595,18 +1595,18 @@ void sib_event_inv(int16 sib_nr) {
 		Room11::put_card();
 		break;
 
-	case SIB_TKNOPF1_R11:
+	case SIB_TBUTTON1_R11:
 		_G(spieler).R11DoorRightF = exit_flip_flop(1, 23, -1, 87, -1, -1,
 			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightF);
 		break;
 
-	case SIB_TKNOPF2_R11:
+	case SIB_TBUTTON2_R11:
 		_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
 			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightB);
 		break;
 
-	case SIB_TKNOPF3_R11:
-		_G(spieler).R6DoorRightB = exit_flip_flop(6, 20, 11, 99, 37, SIB_TKNOPF3_R6,
+	case SIB_TBUTTON3_R11:
+		_G(spieler).R6DoorRightB = exit_flip_flop(6, 20, 11, 99, 37, SIB_TBUTTON3_R6,
 			AUSGANG_LINKS, AUSGANG_RECHTS, _G(spieler).R6DoorRightB);
 		break;
 
@@ -1617,13 +1617,13 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_FLUXO_R23:
 		_G(spieler).R23FluxoFlex = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(112, 1, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
 
 	case SIB_TRANSLATOR_23:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(113, 0, ATS_DATA);
 		_G(menu_item_vorwahl) = CUR_USE;
 		break;
@@ -1634,7 +1634,7 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_ROEHRE_R12:
 		_G(spieler).R12TalismanOk = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 1, ATS_DATA);
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		startAadWait(115);
@@ -1653,7 +1653,7 @@ void sib_event_inv(int16 sib_nr) {
 		_G(cur_hide_flag) = false;
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(spieler).R18CartFach = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(det)->showStaticSpr(7);
 		_G(atds)->set_ats_str(157, TXT_MARK_LOOK, 1, ATS_DATA);
 
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 3389ae51d2e..9fa311becbb 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -173,7 +173,7 @@ Stream *Room::open_handle(const char *fname1, int16 mode) {
 	return _roomHandle[mode];
 }
 
-void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
+void Room::loadRoom(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 	clear_prog_ani();
 	_G(det)->load_rdi(Rb->DetFile, room_nr);
 
@@ -187,7 +187,7 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
 		strcat(tmp_str, _roomInfo->TafName);
 		_G(det)->load_rdi_taf(tmp_str, _roomInfo->TafLoad);
 		Rb->Fti = _G(det)->get_taf_info();
-		Rb->DetImage = Rb->Fti->_image;
+		Rb->_detImage = Rb->Fti->_image;
 		Rb->DetKorrekt = Rb->Fti->_correction;
 	}
 	_G(obj)->calc_all_static_detail();
@@ -544,11 +544,11 @@ void load_chewy_taf(int16 taf_nr) {
 	}
 }
 
-void switch_room(int16 nr) {
+void switchRoom(int16 nr) {
 	_G(fx_blend) = BLEND1;
 	exit_room(-1);
-	_G(spieler).PersonRoomNr[P_CHEWY] = nr;
-	_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+	_G(spieler)._personRoomNr[P_CHEWY] = nr;
+	_G(room)->loadRoom(&_G(room_blk), _G(spieler)._personRoomNr[P_CHEWY], &_G(spieler));
 	enter_room(-1);
 	setupScreen(DO_SETUP);
 }
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 7cbc25327da..08eaaf58c20 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -64,7 +64,7 @@ struct RaumBlk {
 
 	char RoomDir[9];
 	int16 AkAblage;
-	byte **DetImage;
+	byte **_detImage;
 	int16 *DetKorrekt;
 	TafInfo *Fti;
 	int16 AadLoad;
@@ -85,7 +85,7 @@ public:
 	~Room();
 
 	Stream *open_handle(const char *fname, int16 mode);
-	void load_room(RaumBlk *Rb, int16 room_nr, Spieler *player);
+	void loadRoom(RaumBlk *Rb, int16 room_nr, Spieler *player);
 	int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const char *fileName);
 	byte *get_ablage(int16 nr);
 	byte **get_ablage();
@@ -126,7 +126,7 @@ private:
 };
 
 extern void load_chewy_taf(int16 taf_nr);
-extern void switch_room(int16 nr);
+extern void switchRoom(int16 nr);
 extern void calc_person_look();
 
 } // namespace Chewy
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 5f51e577636..7491ef8e88a 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -70,11 +70,11 @@ void Room0::entry() {
 	}
 }
 
-bool Room0::timer(int16 t_nr, int16 ani_nr) {
+bool Room0::timer(int16 timerNr, int16 aniNr) {
 	bool retval = false;
-	if (ani_nr == 1) {
+	if (aniNr == 1) {
 		if (_G(timer_action_ctr) > 0) {
-			_G(uhr)->resetTimer(t_nr, 0);
+			_G(uhr)->resetTimer(timerNr, 0);
 			--_G(timer_action_ctr);
 		} else if (!is_chewy_busy()) {
 			if (!_G(spieler).R0FueterLab)
@@ -113,10 +113,10 @@ bool Room0::timer(int16 t_nr, int16 ani_nr) {
 			if (!_G(spieler).R0PillowThrow)
 				feederAni();
 
-			_G(uhr)->resetTimer(t_nr, 0);
+			_G(uhr)->resetTimer(timerNr, 0);
 			_G(flags).AutoAniPlay = false;
 		}
-	} else if (t_nr == 3)
+	} else if (timerNr == 3)
 		retval = true;
 
 	return retval;
@@ -151,11 +151,11 @@ bool Room0::pullSlime() {
 		
 		_G(flags).AutoAniPlay = true;
 		autoMove(2, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(3, 1, ANI_FRONT);
 		startSetailWait(17, 2, ANI_FRONT);
 		setPersonPos(222, 106, P_CHEWY, P_LEFT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		invent_2_slot(1);
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(CUR_WALK);
@@ -219,19 +219,19 @@ void Room0::eyeStart(EyeMode mode) {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		if ((adi->ani_count > 11) && (adi->ani_count < 19)) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH1, ANI_HIDE);
-			_G(spr_info)[1].ZEbene = 191;
+			_G(spr_info)[1]._zLevel = 191;
 		}
 		
 		if (adi->ani_count == 38) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF1, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		}
 
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[3].ZEbene = 193;
+		_G(spr_info)[3]._zLevel = 193;
 		get_user_key(NO_SETUP);
 		setupScreen(NO_SETUP);
 		SHOULD_QUIT_RETURN;
@@ -274,11 +274,11 @@ void Room0::eyeWait() {
 		clear_prog_ani();
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 		_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[2].ZEbene = 192;
+		_G(spr_info)[2]._zLevel = 192;
 		get_user_key(NO_SETUP);
 		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
@@ -300,9 +300,9 @@ void Room0::eyeWait() {
 	clear_prog_ani();
 }
 
-void Room0::calcEyeClick(int16 ani_nr) {
-	if (mouse_on_prog_ani() == ani_nr) {
-		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
+void Room0::calcEyeClick(int16 aniNr) {
+	if (mouse_on_prog_ani() == aniNr) {
+		if (_G(minfo)._button != 1 && _G(kbinfo)._keyCode != Common::KEYCODE_RETURN) {
 			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATA);
 			if (str_ != 0) {
@@ -313,9 +313,9 @@ void Room0::calcEyeClick(int16 ani_nr) {
 				for (int16 i = 0; i < anz; i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
-		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(SLIME_INV)) {
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
 			} else if (is_cur_inventar(PILLOW_INV)) {
 				startAtsWait(172, TXT_MARK_WALK, 14, ATS_DATA);
@@ -333,18 +333,18 @@ void Room0::eyeShoot() {
 
 	while (!ende) {
 		clear_prog_ani();
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 
 		if (adi->ani_count < 53) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		} else {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, 47, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 			if (!_G(det)->get_ani_status(CH_BLITZ))
 				ende = true;
 		}
@@ -363,16 +363,16 @@ void Room0::eyeShoot() {
 	_G(det)->startDetail(STERNE_STEHEN, 255, ANI_FRONT);
 	clear_prog_ani();
 	_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-	_G(spr_info)[0].ZEbene = 190;
+	_G(spr_info)[0]._zLevel = 190;
 	_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-	_G(spr_info)[1].ZEbene = 191;
+	_G(spr_info)[1]._zLevel = 191;
 	_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-	_G(spr_info)[2].ZEbene = 192;
+	_G(spr_info)[2]._zLevel = 192;
 
 	waitShowScreen(30);
 	clear_prog_ani();
 	setPersonPos(199 - CH_HOT_MOV_X, 145 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 }
 
 void Room0::eyeSlimeBack() {
@@ -385,19 +385,19 @@ void Room0::eyeSlimeBack() {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 
 		if ((adi->ani_count > 52) && (adi->ani_count < 59)) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-			_G(spr_info)[1].ZEbene = 191;
+			_G(spr_info)[1]._zLevel = 191;
 		}
 		if (adi->ani_count == 61) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH3, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		}
 
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[3].ZEbene = 193;
+		_G(spr_info)[3]._zLevel = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -424,15 +424,15 @@ void Room0::checkSlimeEye() {
 
 	while (adi->ani_count < adi->end_ani && !SHOULD_QUIT) {
 		clear_prog_ani();
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, SCHLAUCH2, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 		_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SCHLAUCH_DETAIL, KOPF2, ANI_HIDE);
-		_G(spr_info)[2].ZEbene = 192;
+		_G(spr_info)[2]._zLevel = 192;
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, CH_WIRFT_SCHLEIM, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[3].ZEbene = 193;
+		_G(spr_info)[3]._zLevel = 193;
 		setupScreen(DO_SETUP);
 
 		if (adi->delay_count > 0)
@@ -448,7 +448,7 @@ void Room0::checkSlimeEye() {
 	}
 
 	clear_prog_ani();
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 }
 
 void Room0::feederStart(int16 mode) {
@@ -478,9 +478,9 @@ void Room0::feederStart(int16 mode) {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 
 		if (_G(flags).AniUserAction)
 			get_user_key(NO_SETUP);
@@ -525,9 +525,9 @@ void Room0::feederExtend() {
 	for (int16 i = 0; i < 30 && !_G(spieler).R0PillowThrow; i++) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 136, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 		get_user_key(NO_SETUP);
 		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
@@ -538,9 +538,9 @@ void Room0::feederExtend() {
 	clear_prog_ani();
 }
 
-void Room0::calcPillowClick(int16 ani_nr) {
-	if (mouse_on_prog_ani() == ani_nr) {
-		if (_G(minfo).button != 1 && _G(kbinfo).key_code != Common::KEYCODE_RETURN) {
+void Room0::calcPillowClick(int16 aniNr) {
+	if (mouse_on_prog_ani() == aniNr) {
+		if (_G(minfo)._button != 1 && _G(kbinfo)._keyCode != Common::KEYCODE_RETURN) {
 			int16 anz;
 			char *str_ = _G(atds)->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATA);
 			if (str_ != nullptr) {
@@ -551,9 +551,9 @@ void Room0::calcPillowClick(int16 ani_nr) {
 				for (int16 i = 0; i < anz; i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
-		} else if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
 			} else if (is_cur_inventar(SLIME_INV)) {
 				startAtsWait(173, TXT_MARK_WALK, 14, ATS_DATA);
@@ -575,31 +575,31 @@ void Room0::checkFeed() {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 
 		if (adi->ani_count == 136) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			if (!_G(spieler).R0SlimeUsed)
 				_G(det)->stop_detail(16);
 		}
 
 		if (adi->ani_count > 138) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			_G(spr_info)[1].ZEbene = 191;
+			_G(spr_info)[1]._zLevel = 191;
 		}
 		
 		if (adi->ani_count > 141) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, i, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		}
 
 		if (adi->ani_count == 138) {
 			_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			_G(spr_info)[3].ZEbene = 193;
+			_G(spr_info)[3]._zLevel = 193;
 		}
 
 		_G(spr_info)[4] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[4].ZEbene = 194;
+		_G(spr_info)[4]._zLevel = 194;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -622,20 +622,20 @@ void Room0::checkFeed() {
 	while (!ende) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 
 		if (adi->ani_count > 138) {
 			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-			_G(spr_info)[1].ZEbene = 191;
+			_G(spr_info)[1]._zLevel = 191;
 		}
 
 		if (adi->ani_count == 138) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 139, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		}
 
 		_G(spr_info)[3] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-		_G(spr_info)[3].ZEbene = 193;
+		_G(spr_info)[3]._zLevel = 193;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 
@@ -651,7 +651,7 @@ void Room0::checkFeed() {
 		}
 	}
 
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(flags).AniUserAction = false;
 	clear_prog_ani();
 }
@@ -661,7 +661,7 @@ void Room0::checkPillow() {
 	adi->ani_count = 161;
 
 	bool ende = false;
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(det)->startDetail(CH_WIRFT_KISSEN, 1, ANI_FRONT);
 	bool mode = false;
 
@@ -669,18 +669,18 @@ void Room0::checkPillow() {
 		clear_prog_ani();
 		if (!_G(det)->get_ani_status(CH_WIRFT_KISSEN)) {
 			mode = true;
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			setPersonPos(228 - CH_HOT_MOV_X, 143 - CH_HOT_MOV_Y, P_CHEWY, P_LEFT);
 		}
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, 138, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 191;
+		_G(spr_info)[1]._zLevel = 191;
 
 		if (mode) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, FUETTER_SCHLAUCH, adi->ani_count, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 192;
+			_G(spr_info)[2]._zLevel = 192;
 		}
 
 		setupScreen(DO_SETUP);
@@ -712,7 +712,7 @@ void Room0::trapDoorOpen() {
 	for (int16 i = 0; i < 25; i++) {
 		clear_prog_ani();
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, FLAP_DETAIL, FLAP_SPRITE, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 190;
+		_G(spr_info)[0]._zLevel = 190;
 
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
@@ -748,11 +748,11 @@ void Room0::feederAni() {
 
 			register_cutscene(1);
 
-			_G(spieler).PersonRoomNr[P_CHEWY] = 1;
-			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			_G(spieler)._personRoomNr[P_CHEWY] = 1;
+			_G(room)->loadRoom(&_G(room_blk), _G(spieler)._personRoomNr[P_CHEWY], &_G(spieler));
 			setPersonPos(_G(Rdi)->AutoMov[4].X - CH_HOT_MOV_X,
 			               _G(Rdi)->AutoMov[4].Y - CH_HOT_MOV_Y, P_CHEWY, P_RIGHT);
-			_G(spieler_vector)[P_CHEWY].DelayCount = 0;
+			_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 
 			check_shad(4, 0);
 			_G(fx_blend) = BLEND1;
diff --git a/engines/chewy/rooms/room00.h b/engines/chewy/rooms/room00.h
index 6b8223c3cfe..6406c2fe3cd 100644
--- a/engines/chewy/rooms/room00.h
+++ b/engines/chewy/rooms/room00.h
@@ -25,8 +25,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#include "chewy/ngsdefs.h"
-
 /**
  * Prison Cell - Starting room
  */
@@ -62,12 +60,12 @@ private:
 	static void trapDoorOpen();
 	static void trapDoorClose();
 
-	static void calcEyeClick(int16 ani_nr);
+	static void calcEyeClick(int16 aniNr);
 
-	static void calcPillowClick(int16 ani_nr);
+	static void calcPillowClick(int16 aniNr);
 public:
 	static void entry();
-	static bool timer(int16 t_nr, int16 ani_nr);
+	static bool timer(int16 timerNr, int16 aniNr);
 
 	static void eyeAnim();
 	static void feederAni();
diff --git a/engines/chewy/rooms/room01.cpp b/engines/chewy/rooms/room01.cpp
index 46795e38659..6a86e05c1b8 100644
--- a/engines/chewy/rooms/room01.cpp
+++ b/engines/chewy/rooms/room01.cpp
@@ -31,7 +31,7 @@ namespace Rooms {
 void Room1::gottenCard() {
 	_G(det)->hideStaticSpr(2);
 	startSetailWait(4, 1, ANI_FRONT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(atds)->del_steuer_bit(7, ATS_COUNT_BIT, ATS_DATA);
 	int16 tmp;
 	_G(atds)->ats_get_txt(7, TXT_MARK_LOOK, &tmp, ATS_DATA);
@@ -44,7 +44,7 @@ void Room1::gedAction(int index) {
 		bool flag = false;
 		if (_G(spieler).AkInvent == KABEL_INV) {
 			flag = true;
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 		} else if (_G(obj)->checkInventory(KABEL_INV)) {
 			flag = true;
 			_G(obj)->del_obj_use(KABEL_INV);
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 3d986d1ddc8..6b6e68ea6fe 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -29,11 +29,11 @@ namespace Chewy {
 namespace Rooms {
 
 #define ANI_5 5
-#define GITTER_BLITZEN 7
+#define GRID_FLASHING 7
 
 static const AniBlock ABLOCK4[2] = {
-	{ GITTER_BLITZEN, 3, ANI_FRONT, ANI_WAIT, 0 },
-	{ GITTER_BLITZEN, 12, ANI_FRONT, ANI_GO, 0 }
+	{ GRID_FLASHING, 3, ANI_FRONT, ANI_WAIT, 0 },
+	{ GRID_FLASHING, 12, ANI_FRONT, ANI_GO, 0 }
 };
 
 
@@ -43,14 +43,14 @@ void Room2::entry() {
 }
 
 void Room2::jump_out_r1(int16 nr) {
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(nr, 1, ANI_FRONT);
 	setupScreen(DO_SETUP);
 	_G(det)->stop_detail(6);
 	setPersonPos(32, 127, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	clear_prog_ani();
-	switch_room(1);
+	switchRoom(1);
 	check_shad(2, 1);
 }
 
@@ -60,9 +60,9 @@ void Room2::electrifyWalkway1() {
 	startAadWait(49);
 	_G(det)->stop_detail(ANI_5);
 
-	_G(det)->startDetail(GITTER_BLITZEN, 12, ANI_FRONT);
+	_G(det)->startDetail(GRID_FLASHING, 12, ANI_FRONT);
 	_G(spieler).R2ElectrocutedBork = true;
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 
 	_G(atds)->del_steuer_bit(11, ATS_COUNT_BIT, ATS_DATA);
 	_G(atds)->del_steuer_bit(11, ATS_ACTION_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room02.h b/engines/chewy/rooms/room02.h
index e77ee00e748..068cab6907b 100644
--- a/engines/chewy/rooms/room02.h
+++ b/engines/chewy/rooms/room02.h
@@ -25,8 +25,6 @@
 namespace Chewy {
 namespace Rooms {
 
-#include "chewy/ngsdefs.h"
-
 class Room2 {
 public:
 	static void entry();
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index fe313aa70c3..b10e8ae297d 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -31,19 +31,19 @@
 namespace Chewy {
 namespace Rooms {
 
-#define KOPF_SCHUSS 0
+#define HEADSHOT 0
 #define SONDE_ANI 2
 #define SONDE_SHOOT 3
 #define SONDE_RET 4
-#define SONDE_RAUCH 5
-#define SONDE_REIN 6
-#define SONDE_GREIF 7
-#define SONDE_GREIF1 8
+#define SONDE_SMOKE 5
+#define SONDE_CLEAR 6
+#define SONDE_GRAB 7
+#define SONDE_GRAB1 8
 
 #define SONDE_SPR_R 118
 #define SONDE_SPR_L 120
 
-#define GITTER_BLITZEN 7
+#define GRID_FLASHING 7
 
 #define SONDE_OBJ 0
 #define SONDE_OBJ1 1
@@ -74,7 +74,7 @@ static const AniBlock ABLOCK1[2] = {
 
 static const AniBlock ABLOCK2[2] = {
 	{ 12, 1, ANI_FRONT, ANI_WAIT, 0 },
-	{ GITTER_BLITZEN, 1, ANI_FRONT, ANI_GO, 0 }
+	{ GRID_FLASHING, 1, ANI_FRONT, ANI_GO, 0 }
 };
 
 static const AniBlock ABLOCK3[2] = {
@@ -86,24 +86,23 @@ static const AniBlock ablock5[3] = {
 	{ 0, 1, ANI_FRONT, ANI_WAIT, 0 },
 	{ 8, 9, ANI_FRONT, ANI_GO, 0 },
 	{ 1, 1, ANI_FRONT, ANI_WAIT, 0 },
-
 };
 
 
 void Room3::entry() {
-	init_sonde();
+	probeInit();
 }
 
 void Room3::terminal() {
 	showCur();
 	_G(auto_obj) = 0;
-	switch (Room4::sonde_comp()) {
+	switch (Room4::comp_probe()) {
 	case 0:
 		probeTransfer();
-		_G(spr_info)[0].Image = _G(room_blk).DetImage[120];
-		_G(spr_info)[0].X = 250;
-		_G(spr_info)[0].Y = 2;
-		_G(spr_info)[0].ZEbene = 0;
+		_G(spr_info)[0]._image = _G(room_blk)._detImage[120];
+		_G(spr_info)[0]._x = 250;
+		_G(spr_info)[0]._y = 2;
+		_G(spr_info)[0]._zLevel = 0;
 
 		if (!_G(spieler).R2ElectrocutedBork) {
 			_G(det)->stop_detail(5);
@@ -112,30 +111,30 @@ void Room3::terminal() {
 				_G(spieler).R2FussSchleim = false;
 				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
 			}
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(8, 1, ANI_FRONT);
 			setupScreen(DO_SETUP);
 			_G(det)->stop_detail(6);
 			clear_prog_ani();
-			switch_room(1);
+			switchRoom(1);
 			startAniBlock(2, ABLOCK0);
 			setPersonPos(92, 131, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 		} else if (!_G(spieler).R2FussSchleim) {
 			startAniBlock(2, ABLOCK2);
 			Room2::jump_out_r1(9);
 			startAadWait(45);
 		} else {
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startAniBlock(2, ABLOCK1);
-			_G(spieler).PersonRoomNr[P_CHEWY] = 5;
+			_G(spieler)._personRoomNr[P_CHEWY] = 5;
 			clear_prog_ani();
 			_G(auto_obj) = 0;
-			_G(room)->load_room(&_G(room_blk), _G(spieler).PersonRoomNr[P_CHEWY], &_G(spieler));
+			_G(room)->loadRoom(&_G(room_blk), _G(spieler)._personRoomNr[P_CHEWY], &_G(spieler));
 			_G(fx_blend) = BLEND1;
 			startAniBlock(3, ablock5);
 			setPersonPos(91, 107, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 		}
 		clear_prog_ani();
 		break;
@@ -143,7 +142,7 @@ void Room3::terminal() {
 	case 1:
 		_G(auto_obj) = 1;
 		_G(maus_links_click) = false;
-		_G(minfo).button = 0;
+		_G(minfo)._button = 0;
 		stopPerson(P_CHEWY);
 		start_spz(15, 255, false, P_CHEWY);
 		startAadWait(51);
@@ -151,7 +150,7 @@ void Room3::terminal() {
 		break;
 
 	case 2:
-		sonde_knarre();
+		probeCreak();
 		break;
 
 	default:
@@ -159,7 +158,7 @@ void Room3::terminal() {
 	}
 }
 
-void Room3::init_sonde() {
+void Room3::probeInit() {
 	_G(auto_obj) = 1;
 	_G(mov_phasen)[SONDE_OBJ].AtsText = 24;
 	_G(mov_phasen)[SONDE_OBJ].Lines = 3;
@@ -171,7 +170,7 @@ void Room3::init_sonde() {
 	init_auto_obj(SONDE_OBJ, &SONDE_PHASEN[0][0], 3, (const MovLine *)SONDE_MPKT);
 }
 
-void Room3::sonde_knarre() {
+void Room3::probeCreak() {
 	MovLine sonde_mpkt1[3] = {
 		{ { 237,  52, 160 }, 0, 2 },
 		{ {  13,  45,  75 }, 0, 4 },
@@ -204,23 +203,23 @@ void Room3::sonde_knarre() {
 	while (!ende) {
 		clear_prog_ani();
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 170) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(det)->startDetail(KOPF_SCHUSS, 1, ANI_FRONT);
+			_G(spieler)._personHide[P_CHEWY] = true;
+			_G(det)->startDetail(HEADSHOT, 1, ANI_FRONT);
 		}
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 0;
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count >= 13 && rdi->Ainfo[KOPF_SCHUSS].ani_count <= 21) {
-			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, KOPF_SCHUSS, 21, ANI_HIDE);
-			_G(spr_info)[1].ZEbene = 190;
-		} else if (rdi->Ainfo[KOPF_SCHUSS].ani_count > 21 && _G(det)->get_ani_status(SONDE_RET) == 0) {
+		_G(spr_info)[0]._zLevel = 0;
+		if (rdi->Ainfo[HEADSHOT].ani_count >= 13 && rdi->Ainfo[HEADSHOT].ani_count <= 21) {
+			_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, HEADSHOT, 21, ANI_HIDE);
+			_G(spr_info)[1]._zLevel = 190;
+		} else if (rdi->Ainfo[HEADSHOT].ani_count > 21 && _G(det)->get_ani_status(SONDE_RET) == 0) {
 			_G(spr_info)[2] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-			_G(spr_info)[2].ZEbene = 190;
+			_G(spr_info)[2]._zLevel = 190;
 		}
 		
 		if (rdi->Ainfo[SONDE_SHOOT].ani_count == 178)
 			_G(det)->startDetail(SONDE_RET, 3, ANI_BACK);
 		
-		if (rdi->Ainfo[KOPF_SCHUSS].ani_count == 28)
+		if (rdi->Ainfo[HEADSHOT].ani_count == 28)
 			ende = 1;
 
 		set_ani_screen();
@@ -228,18 +227,18 @@ void Room3::sonde_knarre() {
 	}
 
 	clear_prog_ani();
-	_G(det)->startDetail(SONDE_RAUCH, 3, ANI_FRONT);
+	_G(det)->startDetail(SONDE_SMOKE, 3, ANI_FRONT);
 	ende = 0;
-	while (_G(det)->get_ani_status(SONDE_RAUCH)) {
+	while (_G(det)->get_ani_status(SONDE_SMOKE)) {
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 0;
+		_G(spr_info)[0]._zLevel = 0;
 
 		_G(spr_info)[1] = _G(det)->plot_detail_sprite(0, 0, SONDE_RET, 173, ANI_HIDE);
-		_G(spr_info)[1].ZEbene = 190;
+		_G(spr_info)[1]._zLevel = 190;
 		++ende;
 		if (ende == 3)
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 		set_ani_screen();
 		SHOULD_QUIT_RETURN;
 	}
@@ -247,11 +246,11 @@ void Room3::sonde_knarre() {
 	start_spz(15, 255, false, P_CHEWY);
 	startAadWait(53);
 	clear_prog_ani();
-	_G(det)->startDetail(SONDE_REIN, 1, ANI_BACK);
-	while (_G(det)->get_ani_status(SONDE_REIN)) {
+	_G(det)->startDetail(SONDE_CLEAR, 1, ANI_BACK);
+	while (_G(det)->get_ani_status(SONDE_CLEAR)) {
 
 		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_ANI, SONDE_SPR_R, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 0;
+		_G(spr_info)[0]._zLevel = 0;
 		set_ani_screen();
 	}
 
@@ -268,7 +267,7 @@ void Room3::sonde_knarre() {
 
 	_G(det)->del_taf_tbl(162, 17, nullptr);
 	_G(zoom_horizont) = tmp;
-	init_sonde();
+	probeInit();
 
 	showCur();
 }
@@ -313,11 +312,11 @@ void Room3::probeTransfer() {
 		SHOULD_QUIT_RETURN;
 	}
 
-	_G(det)->startDetail(SONDE_GREIF, 1, ANI_FRONT);
-	while (_G(det)->get_ani_status(SONDE_GREIF)) {
+	_G(det)->startDetail(SONDE_GRAB, 1, ANI_FRONT);
+	while (_G(det)->get_ani_status(SONDE_GRAB)) {
 		clear_prog_ani();
-		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GREIF, SONDE_SPR_L, ANI_HIDE);
-		_G(spr_info)[0].ZEbene = 146;
+		_G(spr_info)[0] = _G(det)->plot_detail_sprite(0, 0, SONDE_GRAB, SONDE_SPR_L, ANI_HIDE);
+		_G(spr_info)[0]._zLevel = 146;
 		set_ani_screen();
 
 		SHOULD_QUIT_RETURN;
@@ -349,16 +348,16 @@ void Room3::probeTransfer() {
 
 			if (i == 2 || i == 1) {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
-					if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+					if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 						if (is_cur_inventar(SPINAT_INV)) {
 							_G(ssi)[0].X = 120;
 							_G(ssi)[0].Y = 100;
-							if (_G(spieler).PersonRoomNr[P_CHEWY] == 3)
+							if (_G(spieler)._personRoomNr[P_CHEWY] == 3)
 								start_aad(50);
 							else
 								start_aad(44);
 
-							del_inventar(_G(spieler).AkInvent);
+							delInventory(_G(spieler).AkInvent);
 							_G(spieler).R2FussSchleim = true;
 							_G(mov_phasen)[SONDE_OBJ1].Phase[0][0] = 142;
 							_G(mov_phasen)[SONDE_OBJ1].Phase[0][1] = 149;
@@ -388,7 +387,7 @@ void Room3::probeTransfer() {
 			start_aad(52);
 			_G(flags).AniUserAction = true;
 			spr_nr = 141;
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			_G(det)->load_taf_seq(142, 8, nullptr);
 			break;
 
@@ -396,7 +395,7 @@ void Room3::probeTransfer() {
 			g_engine->_sound->waitForSpeechToFinish();
 			_G(atds)->set_ats_str(24, 0, 1);
 			_G(mov_phasen)[0].AtsText = 544;
-			switch_room(1);
+			switchRoom(1);
 			break;
 
 		case 2:
@@ -404,7 +403,7 @@ void Room3::probeTransfer() {
 			_G(det)->del_taf_tbl(142, 7, nullptr);
 			_G(flags).AniUserAction = false;
 			_G(mov_phasen)[0].AtsText = 24;
-			switch_room(2);
+			switchRoom(2);
 			break;
 
 		default:
diff --git a/engines/chewy/rooms/room03.h b/engines/chewy/rooms/room03.h
index ec6bf21fb47..2091742d546 100644
--- a/engines/chewy/rooms/room03.h
+++ b/engines/chewy/rooms/room03.h
@@ -27,9 +27,9 @@ namespace Rooms {
 
 class Room3 {
 private:
-	static void sonde_knarre();
+	static void probeCreak();
 	static void probeTransfer();
-	static void init_sonde();
+	static void probeInit();
 public:
 	static void entry();
 	static void terminal();
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 43332ae5a07..dc74b3214e1 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -31,10 +31,10 @@ namespace Rooms {
 
 #define HAND_NORMAL 68
 #define HAND_CLICK 69
-#define RAHMEN_ROT 70
-#define RAHMEN_GELB 71
+#define RED_FRAME 70
+#define YELLOW_FRAME 71
 
-int16 Room4::sonde_comp() {
+int16 Room4::comp_probe() {
 	static const int16 CUR_POS[3][2] = {
 		{  83, 106 },
 		{ 136, 103 },
@@ -47,40 +47,40 @@ int16 Room4::sonde_comp() {
 	};
 
 	cur_2_inventory();
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(cur_display) = false;
-	switch_room(4);
+	switchRoom(4);
 	_G(cur_display) = true;
-	int16 ende = 0;
-	_G(curblk).sprite = _G(room_blk).DetImage;
-	int16 cur_x = 1;
-	int16 spr_nr = RAHMEN_ROT;
+	bool endLoop = false;
+	_G(curblk).sprite = _G(room_blk)._detImage;
+	int16 curX = 1;
+	int16 sprNr = RED_FRAME;
 	_G(cur)->move(160, 160);
 
 	start_aad(46);
-	while (!ende) {
+	while (!endLoop) {
 		mouseAction();
 		if (_G(maus_links_click)) {
 			switch (_G(in)->mouseVector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
-				if (cur_x > 0)
-					--cur_x;
+				if (curX > 0)
+					--curX;
 				else
-					cur_x = 2;
+					curX = 2;
 				g_engine->_sound->playSound(0, 1);
 				break;
 
 			case 1:
-				ende = 1;
-				spr_nr = RAHMEN_GELB;
+				endLoop = true;
+				sprNr = YELLOW_FRAME;
 				g_engine->_sound->playSound(0, 0);
 				break;
 
 			case 2:
-				if (cur_x < 2)
-					++cur_x;
+				if (curX < 2)
+					++curX;
 				else
-					cur_x = 0;
+					curX = 0;
 				g_engine->_sound->playSound(0, 2);
 				break;
 
@@ -89,12 +89,12 @@ int16 Room4::sonde_comp() {
 			}
 		}
 
-		_G(spr_info)[0].Image = _G(room_blk).DetImage[spr_nr];
-		_G(spr_info)[0].ZEbene = 0;
-		_G(spr_info)[0].X = CUR_POS[cur_x][0];
-		_G(spr_info)[0].Y = CUR_POS[cur_x][1];
+		_G(spr_info)[0]._image = _G(room_blk)._detImage[sprNr];
+		_G(spr_info)[0]._zLevel = 0;
+		_G(spr_info)[0]._x = CUR_POS[curX][0];
+		_G(spr_info)[0]._y = CUR_POS[curX][1];
 
-		if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+		if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 			_G(curani)._start = HAND_CLICK;
 			_G(curani)._end = HAND_CLICK;
 		} else {
@@ -113,21 +113,21 @@ int16 Room4::sonde_comp() {
 	g_events->delay(500);
 
 	clear_prog_ani();
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
 
-	_G(spieler_vector)[P_CHEWY].DelayCount = 0;
+	_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 	_G(maus_links_click) = false;
-	_G(minfo).button = 0;
-	_G(spieler).PersonRoomNr[P_CHEWY] = 3;
-	_G(room)->load_room(&_G(room_blk), 3, &_G(spieler));
+	_G(minfo)._button = 0;
+	_G(spieler)._personRoomNr[P_CHEWY] = 3;
+	_G(room)->loadRoom(&_G(room_blk), 3, &_G(spieler));
 	setPersonPos(110, 139, P_CHEWY, P_LEFT);
 
 	_G(fx_blend) = BLEND1;
-	_G(atds)->stop_aad();
+	_G(atds)->stopAad();
 
-	return cur_x;
+	return curX;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room04.h b/engines/chewy/rooms/room04.h
index 82fd9b712d3..7c05e799315 100644
--- a/engines/chewy/rooms/room04.h
+++ b/engines/chewy/rooms/room04.h
@@ -27,7 +27,7 @@ namespace Rooms {
 
 class Room4 {
 public:
-	static int16 sonde_comp();
+	static int16 comp_probe();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index 91dadee55fc..d8ce23dcaea 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -36,17 +36,17 @@ void Room5::entry() {
 
 void Room5::pushButton() {
 	if (_G(spieler).R5Terminal) {
-		int16 str_nr;
+		int16 strNr;
 		if (_G(spieler).R5Tuer == false) {
 			startSetailWait(9, 1, ANI_FRONT);
 			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
-			str_nr = 1;
+			strNr = 1;
 		} else {
 			startSetailWait(9, 1, ANI_BACK);
 			_G(spieler).room_e_obj[6].Attribut = 255;
-			str_nr = 0;
+			strNr = 0;
 		}
-		_G(atds)->set_ats_str(29, str_nr, ATS_DATA);
+		_G(atds)->set_ats_str(29, strNr, ATS_DATA);
 		_G(spieler).R5Tuer ^= 1;
 		_G(obj)->calc_rsi_flip_flop(SIB_TUERE_R5);
 	} else {
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index f0fe1217651..8f168deaf25 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -70,7 +70,7 @@ void Room6::entry() {
 			init_robo();
 			wait_auto_obj(0);
 			_G(spieler).R6BolaOk = true;
-			_G(obj)->show_sib(SIB_BOLA_KNOPF_R6);
+			_G(obj)->show_sib(SIB_BOLA_BUTTON_R6);
 			_G(obj)->hide_sib(SIB_BOLA_R6);
 			_G(atds)->set_steuer_bit(44, ATS_AKTIV_BIT, ATS_DATA);
 			showCur();
@@ -91,7 +91,7 @@ void Room6::init_robo() {
 	init_auto_obj(ROBO_OBJ, &ROBO_PHASEN[0][0], 3, (const MovLine *)ROBO_MPKT);
 }
 
-void Room6::bola_knopf() {
+void Room6::bola_button() {
 	if (!_G(spieler).R6BolaBecher) {
 		_G(det)->hideStaticSpr(0);
 		startSetailWait(0, 1, ANI_FRONT);
@@ -104,15 +104,15 @@ void Room6::bola_knopf() {
 			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_SCHACHT);
 			_G(atds)->del_steuer_bit(42, ATS_AKTIV_BIT, ATS_DATA);
 			_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATA);
-			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
-			_G(obj)->hide_sib(SIB_BOLA_KNOPF_R6);
+			_G(obj)->calc_rsi_flip_flop(SIB_BOLA_BUTTON_R6);
+			_G(obj)->hide_sib(SIB_BOLA_BUTTON_R6);
 		} else {
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startAniBlock(3, ABLOCK6);
 			while (_G(det)->get_ani_status(3) && !SHOULD_QUIT) {
 				if (!_G(det)->get_ani_status(14)) {
 					setPersonPos(220, 89, P_CHEWY, P_LEFT);
-					_G(spieler).PersonHide[P_CHEWY] = false;
+					_G(spieler)._personHide[P_CHEWY] = false;
 				}
 				setupScreen(DO_SETUP);
 			}
@@ -122,7 +122,7 @@ void Room6::bola_knopf() {
 			start_spz(CH_TALK5, 244, false, 0);
 			startAadWait(diaNr);
 		}
-		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_KNOPF_R6);
+		_G(obj)->calc_rsi_flip_flop(SIB_BOLA_BUTTON_R6);
 	}
 }
 
diff --git a/engines/chewy/rooms/room06.h b/engines/chewy/rooms/room06.h
index c5bf7a6265c..443402758ad 100644
--- a/engines/chewy/rooms/room06.h
+++ b/engines/chewy/rooms/room06.h
@@ -31,7 +31,7 @@ private:
 
 public:
 	static void entry();
-	static void bola_knopf();
+	static void bola_button();
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index 750e8a5b6d9..1885b1891d4 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -46,39 +46,39 @@ void Room7::entry() {
 	_G(spieler).ScrollxStep = 2;
 }
 
-void Room7::haken(int16 sib_nr) {
-	int16 dia_nr;
+void Room7::hook(int16 sibNr) {
+	int16 diaNr;
 
-	del_inventar(8);
+	delInventory(8);
 	_G(spieler).AkInvent = -1;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
 
 	if (_G(spieler).R7RHaken) {
 		_G(spieler).R7SeilOk = true;
-		if (sib_nr == SIB_LHAKEN_R7) {
+		if (sibNr == SIB_LHAKEN_R7) {
 			_G(obj)->calc_rsi_flip_flop(SIB_LHAKEN_R7);
 			_G(obj)->calc_rsi_flip_flop(SIB_RHAKEN_R7);
 		}
 		_G(atds)->del_steuer_bit(56, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(55, TXT_MARK_LOOK, 1, ATS_DATA);
-		dia_nr = 9;
+		diaNr = 9;
 	} else {
 		_G(spieler).R7SeilLeft = true;
-		dia_nr = 48;
+		diaNr = 48;
 	}
 
 	_G(obj)->calc_all_static_detail();
 	_G(atds)->set_ats_str(54, TXT_MARK_LOOK, 1, ATS_DATA);
-	startAadWait(dia_nr);
+	startAadWait(diaNr);
 }
 
-void Room7::klingel() {
+void Room7::bell() {
 	hideCur();
 	
 	if ((!_G(spieler).R7BellCount) ||
 		(_G(spieler).R7BellCount >= 2 && _G(spieler).R7SeilLeft && !_G(spieler).R7SeilOk)) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		start_aad(5, 0);
 		startAniBlock(3, ABLOCK25);
 
@@ -88,9 +88,9 @@ void Room7::klingel() {
 		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(5);
 		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	} else if (_G(spieler).R7BellCount == 1) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		start_aad(6, 0);
 		startAniBlock(3, ABLOCK25);
 		_G(det)->showStaticSpr(7);
@@ -99,10 +99,10 @@ void Room7::klingel() {
 		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
 
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(flags).NoScroll = true;
 		autoMove(6, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 
 		_G(det)->startDetail(0, 255, ANI_FRONT);
 		startSetailWait(13, 1, ANI_FRONT);
@@ -120,12 +120,12 @@ void Room7::klingel() {
 		_G(obj)->show_sib(SIB_SCHLOTT_R7);
 		_G(obj)->calc_rsi_flip_flop(SIB_SCHLOTT_R7);
 
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(flags).NoScroll = false;
 		_G(det)->hideStaticSpr(7);
 
 	} else if (!_G(spieler).R7SeilOk) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		start_aad(7, 0);
 		startAniBlock(3, ABLOCK25);
 		_G(det)->showStaticSpr(7);
@@ -133,27 +133,27 @@ void Room7::klingel() {
 		_G(det)->startDetail(14, 1, ANI_FRONT);
 		setPersonPos(95, 94, P_CHEWY, P_RIGHT);
 		_G(det)->stop_detail(5);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 
 		_G(flags).NoScroll = true;
 		autoMove(6, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(det)->startDetail(0, 255, ANI_FRONT);
 		waitDetail(14);
 		startAniBlock(4, ABLOCK10);
 		_G(det)->hideStaticSpr(7);
 		_G(det)->stop_detail(0);
 		setPersonPos(181, 130, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(flags).NoScroll = false;
 		_G(det)->del_taf_tbl(192, 74, nullptr);
 
 	} else if (_G(spieler).R7SeilOk && !_G(spieler).R7BorkFlug) {
 		_G(spieler).R7BorkFlug = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		start_aad(8, 0);
 		startSetailWait(1, 1, ANI_FRONT);
-		_G(obj)->set_rsi_flip_flop(SIB_TKNOPF2_R7, 255);
+		_G(obj)->set_rsi_flip_flop(SIB_TBUTTON2_R7, 255);
 		_G(obj)->hide_sib(SIB_KLINGEL_R7);
 		_G(flags).NoPalAfterFlc = false;
 		register_cutscene(2);
@@ -161,7 +161,7 @@ void Room7::klingel() {
 		setPersonPos(201, 117, P_CHEWY, P_LEFT);
 		_G(spieler).scrollx = 0;
 		_G(spieler).scrolly = 0;
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	}
 
 	++_G(spieler).R7BellCount;
@@ -171,13 +171,13 @@ void Room7::klingel() {
 
 void Room7::gedAction(int index) {
 	if (index == 0 && _G(spieler).R7BorkFlug && _G(spieler).R7ChewyFlug) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		setPersonPos(180, 124, P_CHEWY, P_LEFT);
 		startSetailWait(20, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(10);
 		waitShowScreen(10 * _G(spieler).DelaySpeed);
 		_G(det)->hideStaticSpr(10);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(spieler).R7ChewyFlug = false;
 	}
 }
diff --git a/engines/chewy/rooms/room07.h b/engines/chewy/rooms/room07.h
index cbf20d354f0..d6047f93cd8 100644
--- a/engines/chewy/rooms/room07.h
+++ b/engines/chewy/rooms/room07.h
@@ -22,16 +22,14 @@
 #ifndef CHEWY_ROOMS_ROOM7_H
 #define CHEWY_ROOMS_ROOM7_H
 
-#include "chewy/ngsdefs.h"
-
 namespace Chewy {
 namespace Rooms {
 
 class Room7 {
 public:
 	static void entry();
-	static void haken(int16 sib_nr);
-	static void klingel();
+	static void hook(int16 sibNr);
+	static void bell();
 	static void gedAction(int index);
 };
 
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 48c93f1d421..02cfab2cf97 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -72,11 +72,11 @@ void Room8::hole_kohle() {
 		hideCur();
 		_G(spieler).R8Kohle = true;
 		autoMove(4, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(12, 1, ANI_FRONT);
 		cur_2_inventory();
 		invent_2_slot(KOHLE_HEISS_INV);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		showCur();
 	}
 }
@@ -87,14 +87,14 @@ void Room8::start_verbrennen() {
 	if (!_G(spieler).inv_cur) {
 		autoMove(3, P_CHEWY);
 		start_aad(102, 0);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startAniBlock(2, ABLOCK12);
 
 		while (_G(det)->get_ani_status(9)) {
 			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
-			if (_G(minfo).button == 1 || _G(kbinfo).key_code == Common::KEYCODE_RETURN) {
+			if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 				if (_G(minfo).x > 146 && _G(minfo).x < 208 &&
 					_G(minfo).y > 107 && _G(minfo).y < 155)
 					break;
@@ -105,7 +105,7 @@ void Room8::start_verbrennen() {
 		setPersonPos(129, 246, P_CHEWY, P_RIGHT);
 		startAniBlock(2, ABLOCK13);
 		_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATA);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	}
 
 	showCur();
@@ -121,10 +121,10 @@ bool Room8::gips_wurf() {
 		autoMove(2, P_CHEWY);
 		_G(maus_links_click) = false;
 
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		del_inventar(GIPS_EIMER_INV);
+		_G(spieler)._personHide[P_CHEWY] = true;
+		delInventory(GIPS_EIMER_INV);
 		startSetailWait(4, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 
 		startDetailFrame(5, 1, ANI_FRONT, 16);
 		startSetailWait(6, 1, ANI_FRONT);
@@ -140,9 +140,9 @@ bool Room8::gips_wurf() {
 		_G(menu_item) = CUR_USE;
 		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
 		_G(flags).AtsAction = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(20, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		invent_2_slot(MASKE_INV);
 		cursorChoice(_G(menu_item));
 		showCur();
@@ -152,13 +152,13 @@ bool Room8::gips_wurf() {
 }
 
 void Room8::open_gdoor() {
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(det)->showStaticSpr(17);
 	setupScreen(DO_SETUP);
 	startSetailWait(7, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(15);
 	_G(det)->hideStaticSpr(17);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	setPersonPos(204, 274, P_CHEWY, P_LEFT);
 	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATA);
 	_G(obj)->hide_sib(31);
diff --git a/engines/chewy/rooms/room10.cpp b/engines/chewy/rooms/room10.cpp
index 5f0b01935aa..8a8b1f51bab 100644
--- a/engines/chewy/rooms/room10.cpp
+++ b/engines/chewy/rooms/room10.cpp
@@ -59,7 +59,7 @@ void Room10::get_surimy() {
 	_G(atds)->set_ats_str(77, TXT_MARK_LOOK, 1, ATS_DATA);
 	invent_2_slot(18);
 
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 20b62c3bf18..f1fc7cc661f 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -47,16 +47,16 @@ void Room11::entry() {
 
 	if (_G(spieler).R12ChewyBork) {
 		if (!_G(spieler).R11DoorRightB) {
-			_G(obj)->calc_rsi_flip_flop(SIB_TKNOPF2_R11);
+			_G(obj)->calc_rsi_flip_flop(SIB_TBUTTON2_R11);
 			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
 				AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
 			_G(obj)->calc_all_static_detail();
 		}
 
-		_G(obj)->hide_sib(SIB_TKNOPF1_R11);
+		_G(obj)->hide_sib(SIB_TBUTTON1_R11);
 		_G(obj)->hide_sib(SIB_SCHLITZ_R11);
-		_G(obj)->hide_sib(SIB_TKNOPF2_R11);
-		_G(obj)->hide_sib(SIB_TKNOPF3_R11);
+		_G(obj)->hide_sib(SIB_TBUTTON2_R11);
+		_G(obj)->hide_sib(SIB_TBUTTON3_R11);
 		_G(spieler).room_e_obj[20].Attribut = 255;
 		_G(spieler).room_e_obj[21].Attribut = 255;
 		_G(atds)->del_steuer_bit(121, ATS_AKTIV_BIT, ATS_DATA);
@@ -193,7 +193,7 @@ void Room11::get_card() {
 void Room11::put_card() {
 	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
-		del_inventar(_G(spieler).R11IdCardNr);
+		delInventory(_G(spieler).R11IdCardNr);
 		_G(det)->startDetail(0, 255, ANI_FRONT);
 		_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 1, ATS_DATA);
 		_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 6059af5f7d7..225010f180e 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -126,9 +126,9 @@ void Room12::init_bork() {
 
 			if (!_G(spieler).R12TalismanOk) {
 				hideCur();
-				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
+				_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 1000;
 				autoMove(5, P_CHEWY);
-				_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
+				_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 0;
 
 				if (_G(spieler).R12BorkCount < 3) {
 					++_G(spieler).R12BorkCount;
@@ -158,9 +158,9 @@ void Room12::talk_bork() {
 void Room12::bork_ok() {
 	hideCur();
 	_G(flags).MausLinks = true;
-	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 1000;
+	_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 1000;
 	autoMove(5, P_CHEWY);
-	_G(auto_mov_vector)[R12_BORK_OBJ].DelayCount = 0;
+	_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 0;
 	_G(spieler).R12BorkTalk = true;
 
 	_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
@@ -252,10 +252,10 @@ int16 Room12::chewy_trans() {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
 		autoMove(9, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startAniBlock(2, ABLOCK16);
 		setPersonPos(108, 82, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(spieler).R12TransOn = false;
 		_G(flags).AutoAniPlay = false;
 	}
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index c6b8dc8be49..cde31cf0dc3 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -49,7 +49,7 @@ void Room13::entry() {
 		_G(out)->cls();
 		flic_cut(FCUT_012);
 		setPersonPos(106, 65, P_CHEWY, P_RIGHT);
-		switch_room(11);
+		switchRoom(11);
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		startAadWait(27);
 	} else {
@@ -58,7 +58,7 @@ void Room13::entry() {
 
 		if (!_G(spieler).R13BorkOk) {
 			_G(det)->showStaticSpr(12);
-			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
+			_G(obj)->hide_sib(SIB_BANDBUTTON_R13);
 			_G(spieler).R13Bandlauf = true;
 
 			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
@@ -104,11 +104,11 @@ void Room13::talk_bork() {
 		_G(det)->showStaticSpr(13);
 		_G(det)->setSetailPos(10, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		_G(det)->setStaticPos(12, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1], false, true);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startAadWait(33);
 		_G(det)->stop_detail(9);
 		_G(det)->load_taf_seq(86, 12, nullptr);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(det)->hideStaticSpr(12);
 		_G(auto_obj) = 1;
 
@@ -135,16 +135,16 @@ void Room13::talk_bork() {
 
 		_G(atds)->set_steuer_bit(122, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->del_steuer_bit(92, ATS_AKTIV_BIT, ATS_DATA);
-		_G(obj)->show_sib(SIB_BANDKNOPF_R13);
+		_G(obj)->show_sib(SIB_BANDBUTTON_R13);
 		setPersonPos(153, 138, P_CHEWY, P_LEFT);
 
 		startAadWait(34);
 		startAadWait(249);
 
-		_G(obj)->show_sib(SIB_TKNOPF1_R11);
+		_G(obj)->show_sib(SIB_TBUTTON1_R11);
 		_G(obj)->show_sib(SIB_SCHLITZ_R11);
-		_G(obj)->show_sib(SIB_TKNOPF2_R11);
-		_G(obj)->show_sib(SIB_TKNOPF3_R11);
+		_G(obj)->show_sib(SIB_TBUTTON2_R11);
+		_G(obj)->show_sib(SIB_TBUTTON3_R11);
 
 		if (_G(spieler).R6DoorRightB)
 			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
@@ -155,14 +155,14 @@ void Room13::talk_bork() {
 void Room13::jmp_band() {
 	if (!_G(spieler).R13Band && !_G(spieler).R12ChewyBork) {
 		if (!_G(spieler).R13Bandlauf) {
-			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
+			_G(obj)->hide_sib(SIB_BANDBUTTON_R13);
 			_G(spieler).room_e_obj[25].Attribut = 255;
 			_G(atds)->del_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 			_G(spieler).R13Band = true;
 			autoMove(3, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(8, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			setPersonPos(292, 98, P_CHEWY, P_RIGHT);
 
 		} else {
@@ -180,38 +180,38 @@ void Room13::jmp_band() {
 			_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 			_G(atds)->set_ats_str(97, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
 			_G(atds)->set_ats_str(93, TXT_MARK_LOOK, _G(spieler).R13Bandlauf, ATS_DATA);
-			_G(obj)->calc_rsi_flip_flop(SIB_BANDKNOPF_R13);
-			_G(obj)->hide_sib(SIB_BANDKNOPF_R13);
-			switch_room(14);
+			_G(obj)->calc_rsi_flip_flop(SIB_BANDBUTTON_R13);
+			_G(obj)->hide_sib(SIB_BANDBUTTON_R13);
+			switchRoom(14);
 
 			flic_cut(FCUT_017);
 			register_cutscene(6);
 			_G(spieler).scrollx = 92;
 			_G(spieler).scrolly = 120;
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			waitShowScreen(20);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 		}
 	}
 }
 
-void Room13::jmp_boden() {
+void Room13::jmp_floor() {
 	if (_G(spieler).R13Band) {
 		if (!_G(spieler).R13Surf)
-			_G(obj)->show_sib(SIB_BANDKNOPF_R13);
+			_G(obj)->show_sib(SIB_BANDBUTTON_R13);
 
 		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
 		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R13Band = false;
 		autoMove(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(7, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		setPersonPos(176, 138, P_CHEWY, P_LEFT);
 	}
 }
 
-int16 Room13::monitor_knopf() {
+int16 Room13::monitor_button() {
 	int16 action_flag = false;
 	
 	if (!_G(spieler).inv_cur) {
@@ -222,9 +222,9 @@ int16 Room13::monitor_knopf() {
 		} else if (!_G(spieler).R12ChewyBork) {
 			action_flag = true;
 			autoMove(8, P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(6, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 
 			if (_G(spieler).R13MonitorStatus)
 				_G(det)->hideStaticSpr(11 - _G(spieler).R13MonitorStatus);
diff --git a/engines/chewy/rooms/room13.h b/engines/chewy/rooms/room13.h
index c51b456a29f..f0412fd6f53 100644
--- a/engines/chewy/rooms/room13.h
+++ b/engines/chewy/rooms/room13.h
@@ -22,8 +22,6 @@
 #ifndef CHEWY_ROOMS_ROOM13_H
 #define CHEWY_ROOMS_ROOM13_H
 
-#include "chewy/ngsdefs.h"
-
 namespace Chewy {
 namespace Rooms {
 
@@ -33,9 +31,9 @@ public:
 	static void xit();
 	static void gedAction(int index);
 
-	static int16 monitor_knopf();
+	static int16 monitor_button();
 	static void jmp_band();
-	static void jmp_boden();
+	static void jmp_floor();
 	static void talk_bork();
 };
 
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index e32e8970cf8..2bbe54a8086 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -74,9 +74,9 @@ int16 Room14::use_schrott() {
 
 	if (!_G(spieler).inv_cur) {
 		autoMove(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(12, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Waffe) {
 			action_flag = true;
@@ -97,9 +97,9 @@ int16 Room14::use_gleiter() {
 
 		if (!_G(spieler).R14GleiterAuf) {
 			_G(spieler).R14GleiterAuf = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(10, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			_G(det)->showStaticSpr(6);
 			_G(atds)->set_ats_str(107, TXT_MARK_LOOK, 1, ATS_DATA);
 		} else {
@@ -133,9 +133,9 @@ int16 Room14::use_schleim() {
 
 	if (!_G(spieler).inv_cur) {
 		autoMove(2, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(11, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 
 		if (!_G(spieler).R14Sicherung) {
 			action_flag = true;
@@ -159,24 +159,24 @@ void Room14::feuer() {
 	if (is_cur_inventar(BWAFFE_INV)) {
 		autoMove(5, P_CHEWY);
 		waffe = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startDetailFrame(8, 1, ANI_FRONT, 11);
 		startSetailWait(9, 1, ANI_FRONT);
 		waitDetail(8);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	} else {
 		autoMove(7, P_CHEWY);
 		_G(det)->hideStaticSpr(9);
 		startDetailFrame(2, 1, ANI_FRONT, 9);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(13, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		waitDetail(2);
 		startSetailWait(5, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(9);
 	}
 
-	del_inventar(tmp);
+	delInventory(tmp);
 	_G(det)->startDetail(6, 255, ANI_FRONT);
 	waitShowScreen(40);
 
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 8dde5c83e2c..172c1f8dc76 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -141,15 +141,15 @@ int16 Room17::use_seil() {
 		action_flag = true;
 		hideCur();
 
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(flags).AutoAniPlay = true;
 		autoMove(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(10, 1, ANI_FRONT);
 		_G(spieler).R17Seil = true;
 		_G(atds)->del_steuer_bit(139, ATS_AKTIV_BIT, ATS_DATA);
 		plot_seil();
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
 		startAadWait(119);
@@ -170,7 +170,7 @@ void Room17::plot_seil() {
 void Room17::kletter_down() {
 	autoMove(5, P_CHEWY);
 	_G(det)->load_taf_seq(177, 1, nullptr);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(14, 1, ANI_FRONT);
 	_G(flags).ZoomMov = false;
 	_G(zoom_mov_fak) = 1;
@@ -186,7 +186,7 @@ void Room17::kletter_down() {
 void Room17::kletter_up() {
 	autoMove(6, P_CHEWY);
 	_G(det)->load_taf_seq(141, 4, nullptr);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(11, 1, ANI_FRONT);
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 3;
@@ -228,7 +228,7 @@ void Room17::calc_seil() {
 			showCur();
 			setPersonSpr(P_LEFT, P_CHEWY);
 			_G(spieler).ScrollyStep = 1;
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			_G(flags).AutoAniPlay = false;
 			_G(auto_obj) = 0;
 			xit();
@@ -275,7 +275,7 @@ int16 Room17::energie_hebel() {
 
 	if (!_G(spieler).R17HebelOk) {
 		if (is_cur_inventar(BECHER_VOLL_INV)) {
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
 			startAadWait(38);
 			action_flag = true;
@@ -325,10 +325,10 @@ int16 Room17::get_oel() {
 		action_flag = true;
 		close_door();
 		autoMove(4, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(13, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		del_inventar(_G(spieler).AkInvent);
+		_G(spieler)._personHide[P_CHEWY] = false;
+		delInventory(_G(spieler).AkInvent);
 		_G(obj)->addInventory(BECHER_VOLL_INV, &_G(room_blk));
 		inventory_2_cur(BECHER_VOLL_INV);
 	}
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index c7cfe56d6e3..2370d0a9e10 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -230,7 +230,7 @@ int16 Room18::calc_surimy() {
 		action_flag = true;
 
 		hideCur();
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).R18SurimyWurf = true;
 		_G(det)->load_taf_seq(245, 50, nullptr);
 		_G(det)->load_taf_seq(116, 55, nullptr);
@@ -251,7 +251,7 @@ int16 Room18::calc_surimy() {
 		} else {
 			autoMove(1, P_CHEWY);
 			stopPerson(P_CHEWY);
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startDetailFrame(17, 1, ANI_FRONT, 12);
 			_G(maus_links_click) = false;
 
@@ -259,7 +259,7 @@ int16 Room18::calc_surimy() {
 			waitDetail(17);
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		wait_auto_obj(SURIMY_OBJ);
 
 		_G(det)->setSetailPos(21, 392, 170);
@@ -385,7 +385,7 @@ int16 Room18::go_cyberspace() {
 		cur_2_inventory();
 		showCur();
 
-		switch_room(24);
+		switchRoom(24);
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index f3bd8c3ff82..45e7323b9c0 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -167,7 +167,7 @@ void Room21::chewy_kolli() {
 
 	for (int16 i = 0; i < _G(auto_obj) && !kolli; i++) {
 		int16 spr_nr = _G(mov_phasen)[i].Phase[_G(auto_mov_vector)[i].Phase][0] + _G(auto_mov_vector)[i].PhNr;
-		int16 *xy = (int16 *)_G(room_blk).DetImage[spr_nr];
+		int16 *xy = (int16 *)_G(room_blk)._detImage[spr_nr];
 		int16 *Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 		int16 xoff = xy[0];
 		int16 yoff = xy[1];
@@ -192,11 +192,11 @@ void Room21::chewy_kolli() {
 		const int16 tmp = _G(spieler_vector)[P_CHEWY].Count;
 		stopPerson(P_CHEWY);
 		_G(flags).AutoAniPlay = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		int16 ani_nr = (_G(spieler_vector)[P_CHEWY].Xyvo[0] < 0) ? 10 : 11;
 		_G(det)->setSetailPos(ani_nr, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		startSetailWait(ani_nr, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(flags).AutoAniPlay = false;
 		_G(spieler_vector)[P_CHEWY].Count = tmp;
 		get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
@@ -209,7 +209,7 @@ void Room21::salto() {
 		&& !_G(spieler).R21Salto && !_G(flags).AutoAniPlay) {
 		_G(spieler).R21Salto = true;
 		_G(flags).AutoAniPlay = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 
 		for (int16 i = 0; i < 3; i++) {
 			_G(det)->setSetailPos(12 + i, _G(spieler_vector)[P_CHEWY].Xypos[0],
@@ -217,7 +217,7 @@ void Room21::salto() {
 		}
 
 		startAniBlock(3, ABLOCK19);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		startAadWait(36);
 		_G(flags).AutoAniPlay = false;
 	}
@@ -228,13 +228,13 @@ void Room21::use_gitter_energie() {
 		AUSGANG_UNTEN, AUSGANG_OBEN, (int16)_G(spieler).R21GitterEnergie);
 	_G(auto_obj) = 0;
 	_G(spieler).R17Location = 1;
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 
-	switch_room(17);
+	switchRoom(17);
 	_G(det)->hideStaticSpr(5);
 	startSetailWait(9, 1, ANI_FRONT);
 	_G(spieler).R17GitterWeg = true;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 }
 
 int16 Room21::use_fenster() {
@@ -246,7 +246,7 @@ int16 Room21::use_fenster() {
 		_G(spieler).R18Gitter = true;
 		autoMove(13, P_CHEWY);
 		setPersonPos(541, 66, P_CHEWY, P_LEFT);
-		switch_room(18);
+		switchRoom(18);
 
 		if (!_G(spieler).R18FirstEntry) {
 			startAadWait(39);
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index 45a1fb1b6c3..e18d32e4d3b 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -84,9 +84,9 @@ int16 Room22::chewy_amboss() {
 		hideCur();
 
 		autoMove(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(1, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		autoMove(2, P_CHEWY);
 		_G(flags).NoPalAfterFlc = false;
 		flic_cut(FCUT_006);
@@ -163,12 +163,12 @@ void Room22::get_bork() {
 	if (!_G(spieler).R22GetBork && _G(spieler).R22BorkPlatt) {
 		autoMove(4, P_CHEWY);
 		_G(det)->hideStaticSpr(4);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startAniBlock(2, ABLOCK14);
 		setPersonPos(171, 120, P_CHEWY, P_LEFT);
 		startAadWait(11);
 		_G(det)->stop_detail(3);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(81, ATS_AKTIV_BIT, ATS_DATA);
 		invent_2_slot(BORK_INV);
 
@@ -190,7 +190,7 @@ int16 Room22::malen() {
 		_G(spieler).R22Paint = true;
 		_G(obj)->calc_rsi_flip_flop(SIB_PAINT_R22);
 		_G(obj)->hide_sib(SIB_PAINT_R22);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(obj)->calc_all_static_detail();
 		_G(flags).AutoAniPlay = false;
 
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 05e98ad900a..1ae544a6e68 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -37,7 +37,7 @@ static const AniBlock ABLOCK15[4] = {
 
 
 void Room23::entry() {
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	setPersonPos(135, 69, P_CHEWY, -1);
 }
 
@@ -45,7 +45,7 @@ void Room23::cockpit() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	_G(maus_links_click) = false;
-	switch_room(23);
+	switchRoom(23);
 
 	if (!_G(spieler).R23Cartridge || !_G(spieler).R25GleiteLoesch)
 		_G(det)->hideStaticSpr(3);
@@ -94,7 +94,7 @@ int16 Room23::start_gleiter() {
 					_G(spieler).R23GleiterExit = 16;
 					setPersonPos(126, 110, P_CHEWY, P_RIGHT);
 
-					switch_room(_G(spieler).R23GleiterExit);
+					switchRoom(_G(spieler).R23GleiterExit);
 					start_spz_wait(CH_WONDER1, 2, false, P_CHEWY);
 					start_spz(CH_TALK2, 255, ANI_FRONT, P_CHEWY);
 
@@ -116,7 +116,7 @@ int16 Room23::start_gleiter() {
 					remove_inventory(4);
 					remove_inventory(15);
 					remove_inventory(16);
-					switch_room(_G(spieler).R23GleiterExit);
+					switchRoom(_G(spieler).R23GleiterExit);
 				}
 
 				showCur();
@@ -128,7 +128,7 @@ int16 Room23::start_gleiter() {
 }
 
 void Room23::use_cartridge() {
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	_G(spieler).R23Cartridge = true;
 
 	if (_G(spieler).R18CartSave) {
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 87401e96bcb..2bc48dfc745 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -37,11 +37,11 @@ static const uint8 KRISTALL_SPR[3][3] = {
 
 void Room24::entry() {
 	_G(flags).MainInput = false;
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	setPersonPos(0, 0, P_CHEWY, -1);
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(curblk).sprite = _G(room_blk).DetImage;
+	_G(curblk).sprite = _G(room_blk)._detImage;
 	_G(curani)._start = 7;
 	_G(curani)._end = 10;
 	_G(menu_item) = CUR_USER;
@@ -62,7 +62,7 @@ void Room24::entry() {
 }
 
 void Room24::xit() {
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
 	setPersonPos(263, 144, P_CHEWY, -1);
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 499b7fd19f2..31daf72074c 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -71,12 +71,12 @@ void Room25::entry() {
 		}
 
 		_G(spieler).R25FirstEntry = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		flic_cut(FCUT_029);
 		g_engine->_sound->playSound(0, 0);
 		_G(fx_blend) = BLEND_NONE;
 		setPersonPos(219, 141, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		start_spz(CH_TALK11, 255, ANI_FRONT, P_CHEWY);
 		startAadWait(64);
 		showCur();
@@ -118,7 +118,7 @@ int16 Room25::gleiter_loesch() {
 			autoMove(2, P_CHEWY);
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
 
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(obj)->addInventory(MILCH_WAS_INV, &_G(room_blk));
 			inventory_2_cur(MILCH_WAS_INV);
 			startAadWait(253);
diff --git a/engines/chewy/rooms/room27.cpp b/engines/chewy/rooms/room27.cpp
index c4e86ffd4f8..32814b3a1f2 100644
--- a/engines/chewy/rooms/room27.cpp
+++ b/engines/chewy/rooms/room27.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room27::entry() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 27) {
 		_G(timer_nr)[0] = _G(room)->set_timer(0, 5);
 		_G(det)->set_static_ani(0, -1);
 		_G(atds)->del_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATA);
@@ -37,7 +37,7 @@ void Room27::entry() {
 		_G(atds)->set_steuer_bit(274, ATS_AKTIV_BIT, ATS_DATA);
 	}
 
-	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler)._personHide[P_HOWARD] = true;
 	_G(spieler).ScrollxStep = 2;
 }
 
@@ -45,13 +45,13 @@ void Room27::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	hideCur();
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 27) {
 		if (eib_nr == 55) {
 			startAadWait(175);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			startSetailWait(2, 1, ANI_FRONT);
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+			_G(spieler)._personRoomNr[P_HOWARD] = 28;
 			_G(spieler_mi)[P_HOWARD].Id = HOWARD_OBJ;
 		} else if (_G(spieler).R27HowardGed < 3 && eib_nr != -1) {
 			++_G(spieler).R27HowardGed;
@@ -67,7 +67,7 @@ void Room27::get_surimy() {
 	hideCur();
 	autoMove(4, P_CHEWY);
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 27) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 27) {
 		startAadWait(171);
 	}
 
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index fa55cd4c7d7..60b94d19ef6 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -45,7 +45,7 @@ void Room28::entry(int16 eib_nr) {
 		_G(det)->showStaticSpr(7);
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 28) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 		hideCur();
@@ -53,7 +53,7 @@ void Room28::entry(int16 eib_nr) {
 
 		if (_G(spieler).R40Wettbewerb) {
 			_G(spieler).scrollx = 320;
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			haendler();
 			_G(spieler).R40Wettbewerb = false;
 		} else {
@@ -143,7 +143,7 @@ void Room28::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	hideCur();
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 28 && eib_nr == 69) {
 		_G(SetUpScreenFunc) = nullptr;
 		if (!_G(spieler).R28ExitTown) {
 			startAadWait(178);
@@ -152,7 +152,7 @@ void Room28::xit(int16 eib_nr) {
 
 		_G(flags).ExitMov = false;
 		autoMove(6, P_HOWARD);
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+		_G(spieler)._personRoomNr[P_HOWARD] = 40;
 	}
 
 	showCur();
@@ -167,7 +167,7 @@ void Room28::haendler() {
 	hideCur();
 	_G(SetUpScreenFunc) = nullptr;
 	_G(spieler).R28ChewyPump = true;
-	del_inventar(K_MASKE_INV);
+	delInventory(K_MASKE_INV);
 	_G(atds)->set_ats_str(209, 1, ATS_DATA);
 	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
 	load_chewy_taf(CHEWY_PUMPKIN);
@@ -239,15 +239,15 @@ void Room28::use_surimy() {
 void Room28::set_pump() {
 	hideCur();
 
-	if (_G(spieler).PersonRoomNr[P_CHEWY] == 28) {
+	if (_G(spieler)._personRoomNr[P_CHEWY] == 28) {
 		if (!_G(flags).AutoAniPlay) {
 			_G(flags).AutoAniPlay = true;
 			if (_G(spieler_vector)[P_CHEWY].Xypos[0] < 380)
 				autoMove(5, P_CHEWY);
 
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
-			del_inventar(K_MASKE_INV);
+			delInventory(K_MASKE_INV);
 			_G(det)->setSetailPos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 
 			if (_G(spieler).R28PumpTxt1 < 3) {
@@ -256,7 +256,7 @@ void Room28::set_pump() {
 			}
 
 			startSetailWait(tmp, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 
 			load_chewy_taf(CHEWY_PUMPKIN);
 			_G(spieler).R28ChewyPump = true;
@@ -267,7 +267,7 @@ void Room28::set_pump() {
 				_G(atds)->set_ats_str(209, 1, ATS_DATA);
 			}
 
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 28 && _G(spieler).R28PumpTxt < 3) {
 				stopPerson(P_HOWARD);
 				_G(SetUpScreenFunc) = nullptr;
 				g_engine->_sound->waitForSpeechToFinish();
@@ -293,7 +293,7 @@ void Room28::get_pump() {
 
 		stopPerson(P_CHEWY);
 		_G(spieler).R28ChewyPump = false;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		int16 tmp = (_G(person_end_phase)[P_CHEWY] == P_RIGHT) ? 1 : 0;
 		_G(det)->setSetailPos(tmp, _G(spieler_vector)[P_CHEWY].Xypos[0], _G(spieler_vector)[P_CHEWY].Xypos[1]);
 		startSetailWait(tmp, 1, ANI_BACK);
@@ -301,7 +301,7 @@ void Room28::get_pump() {
 		invent_2_slot(K_MASKE_INV);
 		_G(atds)->set_ats_str(209, 0, ATS_DATA);
 		_G(spieler).room_e_obj[69].Attribut = 255;
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		load_chewy_taf(CHEWY_NORMAL);
 
 		if (_G(spieler).R28PumpTxt1 < 3) {
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index e1cc8b26aa3..7afe38e4a72 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -62,7 +62,7 @@ void Room29::entry() {
 
 void Room29::xit() {
 	if (_G(obj)->checkInventory(PUMPE_INV))
-		del_inventar(PUMPE_INV);
+		delInventory(PUMPE_INV);
 }
 
 int16 Room29::use_pumpe() {
@@ -79,7 +79,7 @@ int16 Room29::use_pumpe() {
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 			_G(det)->showStaticSpr(7);
 			_G(atds)->del_steuer_bit(218, ATS_AKTIV_BIT, ATS_DATA);
-			del_inventar(SCHLAUCH_INV);
+			delInventory(SCHLAUCH_INV);
 		} else if (!_G(spieler).inv_cur) {
 			action_flag = true;
 			startAadWait(62);
@@ -116,7 +116,7 @@ bool Room29::use_schlauch() {
 		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_U, 1, false, P_CHEWY);
 		_G(det)->hideStaticSpr(7);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(4, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(8);
 		_G(det)->showStaticSpr(10);
@@ -125,9 +125,9 @@ bool Room29::use_schlauch() {
 
 		_G(spieler).R29Schlauch1 = false;
 		_G(spieler).R29Schlauch2 = true;
-		del_inventar(PUMPE_INV);
+		delInventory(PUMPE_INV);
 		setPersonPos(308, 105, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		showCur();
 	}
 
@@ -138,7 +138,7 @@ void Room29::schlitz_sitz() {
 	if (!_G(spieler).R29AutoSitz) {
 		hideCur();
 		_G(spieler).R29AutoSitz = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(det)->hideStaticSpr(4);
 		_G(det)->showStaticSpr(11);
 		startAniBlock(3, ABLOCK26);
@@ -149,7 +149,7 @@ void Room29::schlitz_sitz() {
 
 		_G(det)->stop_detail(2);
 		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(maus_links_click) = false;
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
@@ -165,15 +165,15 @@ int16 Room29::zaun_sprung() {
 		
 		action_flag = true;
 		autoMove(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startDetailFrame(3, 1, ANI_FRONT, 7);
 		_G(det)->hideStaticSpr(9);
 		startAniBlock(5, ABLOCK27);
 		setupScreen(DO_SETUP);
 
 		showCur();
-		switch_room(37);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		switchRoom(37);
+		_G(spieler)._personHide[P_CHEWY] = false;
 
 	}
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index 1efb3cad848..d2f4421647c 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -150,7 +150,7 @@ int16 Room31::use_topf() {
 				_G(spieler).R31KoernerDa = true;
 				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				ani_nr = CH_TALK3;
 				dia_nr = 150;
 				_G(atds)->set_ats_str(242, 2, ATS_DATA);
@@ -159,10 +159,10 @@ int16 Room31::use_topf() {
 				if (_G(spieler).R31KoernerDa) {
 					_G(spieler).R31Wasser = true;
 					autoMove(1, P_CHEWY);
-					_G(spieler).PersonHide[P_CHEWY] = true;
+					_G(spieler)._personHide[P_CHEWY] = true;
 					startAniBlock(3, ABLOCK30);
-					_G(spieler).PersonHide[P_CHEWY] = false;
-					del_inventar(_G(spieler).AkInvent);
+					_G(spieler)._personHide[P_CHEWY] = false;
+					delInventory(_G(spieler).AkInvent);
 					_G(obj)->addInventory(MILCH_LEER_INV, &_G(room_blk));
 					inventory_2_cur(MILCH_LEER_INV);
 					ani_nr = CH_TALK6;
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 40b8f9ce77b..3210d631abc 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -122,7 +122,7 @@ void Room32::use_schreibmaschine() {
 				autoMove(2, P_CHEWY);
 				_G(spieler).R32PapierOk = true;
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				_G(atds)->set_ats_str(231, TXT_MARK_LOOK, 1, ATS_DATA);
 				ani_nr = CH_TALK3;
 				dia_nr = 86;
diff --git a/engines/chewy/rooms/room33.cpp b/engines/chewy/rooms/room33.cpp
index 6fa25b06724..ea86d50805f 100644
--- a/engines/chewy/rooms/room33.cpp
+++ b/engines/chewy/rooms/room33.cpp
@@ -133,13 +133,13 @@ void Room33::use_maschine() {
 			}
 
 			if (action) {
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				startSetailWait(0, 1, ANI_FRONT);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 				setPersonPos(128, 65, P_CHEWY, P_LEFT);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 				hocker = true;
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				ani_nr = CH_TALK12;
 
 				if (calc_muntermacher()) {
@@ -161,22 +161,22 @@ void Room33::use_maschine() {
 		startAadWait(dia_nr);
 
 		if (_G(spieler).R33MunterOk) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(2, 1, ANI_FRONT);
 			flic_cut(FCUT_031);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 			startAadWait(71);
 			_G(atds)->del_steuer_bit(225, ATS_AKTIV_BIT, ATS_DATA);
 		}
 
 		if (hocker) {
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(1, 1, ANI_FRONT);
 			setPersonPos(64, 100, P_CHEWY, P_LEFT);
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	} else {
 		startAadWait(70);
 	}
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index b1b4865ea96..b6dce90b888 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -47,11 +47,11 @@ bool Room34::use_kuehlschrank() {
 			showCur();
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(flags).ChewyDontGo = true;
 
 		if (!_G(flags).LoadGame) {
-			switch_room(34);
+			switchRoom(34);
 		}
 
 		setPersonPos(160, 70, P_CHEWY, -1);
@@ -61,9 +61,9 @@ bool Room34::use_kuehlschrank() {
 }
 
 void Room34::xit_kuehlschrank() {
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	setPersonPos(54, 111, P_CHEWY, -1);
-	switch_room(33);
+	switchRoom(33);
 	_G(flags).ChewyDontGo = false;
 	_G(maus_links_click) = false;
 }
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 861e72f06e7..85dfe56e986 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -56,13 +56,13 @@ int16 Room35::schublade() {
 			action_flag = true;
 			autoMove(3, P_CHEWY);
 			_G(spieler).R35Falle = true;
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startAniBlock(2, ABLOCK28);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			setPersonPos(33, 90, P_CHEWY, P_LEFT);
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 			startAadWait(93);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			_G(atds)->set_ats_str(234, 2, ATS_DATA);
 		}
 	}
@@ -90,7 +90,7 @@ int16 Room35::use_cat() {
 			autoMove(4, P_CHEWY);
 			_G(spieler).R35CatEat = true;
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(det)->stop_detail(0);
 			_G(det)->del_static_ani(0);
 			startSetailWait(1, 1, ANI_FRONT);
@@ -128,12 +128,12 @@ void Room35::talk_cat() {
 			dia_nr = 8;
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		switch_room(36);
+		_G(spieler)._personHide[P_CHEWY] = true;
+		switchRoom(36);
 		showCur();
 		startAdsWait(dia_nr);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		switch_room(35);
+		_G(spieler)._personHide[P_CHEWY] = false;
+		switchRoom(35);
 
 	} else {
 		start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 6776023c0f5..91a7a077318 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -112,13 +112,13 @@ short Room37::use_wippe() {
 			auto_scroll(129, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 			startAadWait(159);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			flic_cut(FCUT_047);
 			_G(flags).NoScroll = false;
 			showCur();
 			_G(spieler).scrollx = 269;
 			setPersonPos(388, 119, P_CHEWY, P_RIGHT);
-			switch_room(29);
+			switchRoom(29);
 			_G(maus_links_click) = false;
 
 		} else {
@@ -174,7 +174,7 @@ int16 Room37::use_glas() {
 			auto_scroll(146, 0);
 			start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
 			startAadWait(147);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			flic_cut(FCUT_048);
 			flic_cut(FCUT_049);
 			invent_2_slot(GEBISS_INV);
@@ -218,13 +218,13 @@ void Room37::dog_bell() {
 			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->hideStaticSpr(9);
 			startSetailWait(6, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			_G(det)->startDetail(11, 255, ANI_FRONT);
 			flic_cut(FCUT_050);
 			startSetailWait(6, 1, ANI_BACK);
 			_G(det)->stop_detail(11);
 			setPersonPos(326, 85, P_CHEWY, P_LEFT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			_G(det)->showStaticSpr(9);
 			startAniBlock(3, ABLOCK31);
 			_G(det)->set_static_ani(3, -1);
@@ -305,7 +305,7 @@ void Room37::use_hahn() {
 			_G(det)->del_static_ani(7);
 			_G(det)->startDetail(9, 1, ANI_FRONT);
 			start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
-			del_inventar(GEBISS_INV);
+			delInventory(GEBISS_INV);
 			_G(flags).NoScroll = true;
 			auto_scroll(177, 0);
 
@@ -339,18 +339,18 @@ void Room37::use_hahn() {
 }
 
 void Room37::hahn_dia() {
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	int16 tmp_scrollx = _G(spieler).scrollx;
 	int16 tmp_scrolly = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	switch_room(38);
+	switchRoom(38);
 	startAdsWait(9);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = tmp_scrollx;
 	_G(spieler).scrolly = tmp_scrolly;
-	switch_room(37);
+	switchRoom(37);
 	_G(flags).LoadGame = false;
 }
 
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index cda0511e56e..bfb72cb61b5 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -80,14 +80,14 @@ short Room39::use_howard() {
 				_G(spieler).R39HowardWach = true;
 				_G(spieler).R39ScriptOk = true;
 				autoMove(3, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				_G(det)->startDetail(6, 255, ANI_FRONT);
 				startAadWait(170);
 				_G(det)->stop_detail(6);
 				startSetailWait(7, 1, ANI_FRONT);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				_G(det)->stop_detail(1);
 				startAniBlock(2, ABLOCK33);
 				start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
@@ -150,14 +150,14 @@ void Room39::ok() {
 	_G(spieler).R41Einbruch = true;
 
 	Room43::night_small();
-	_G(spieler).PersonRoomNr[P_HOWARD] = 27;
+	_G(spieler)._personRoomNr[P_HOWARD] = 27;
 	_G(obj)->show_sib(SIB_SURIMY_R27);
 	_G(obj)->show_sib(SIB_ZEITUNG_R27);
 	_G(obj)->calc_rsi_flip_flop(SIB_SURIMY_R27);
 	_G(obj)->calc_rsi_flip_flop(SIB_ZEITUNG_R27);
 	invent_2_slot(BRIEF_INV);
 
-	switch_room(27);
+	switchRoom(27);
 	startAadWait(192);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(_G(menu_item));
@@ -249,9 +249,9 @@ int16 Room39::use_tv() {
 			if (_G(spieler).R39TranslatorUsed) {
 				start_spz(CH_TALK3, 255, ANI_FRONT, P_CHEWY);
 				startAadWait(98);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				startAniBlock(2, ABLOCK29);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 				ani_nr = CH_TALK5;
 				dia_nr = 99;
 				_G(atds)->set_ats_str(RECORDER_INV, _G(spieler).R39TvKanal + 1, INV_ATS_DATA);
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 5f388ad27e9..b0292da7948 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -64,10 +64,10 @@ void Room40::entry(int16 eib_nr) {
 	_G(spieler).R40PoliceStart = false;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 41)
+		_G(spieler)._personRoomNr[P_HOWARD] = 40;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 40) {
 		_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 		_G(spieler).ZoomXy[P_HOWARD][1] = 40;
 
@@ -102,15 +102,15 @@ void Room40::xit(int16 eib_nr) {
 	stop_spz();
 	_G(SetUpScreenFunc) = nullptr;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 40) {
 		if (eib_nr == 70 || eib_nr == 77) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+			_G(spieler)._personRoomNr[P_HOWARD] = 28;
 
 		} else if (eib_nr == 72) {
 			if ((_G(obj)->checkInventory(HOTEL_INV) && _G(obj)->checkInventory(TICKET_INV) && _G(spieler).R42BriefOk && _G(spieler).R28Manuskript)
 				|| _G(spieler).R40TrainOk) {
 				_G(spieler).R40TrainOk = true;
-				_G(spieler).PersonRoomNr[P_HOWARD] = 45;
+				_G(spieler)._personRoomNr[P_HOWARD] = 45;
 				_G(spieler).room_e_obj[72].Exit = 45;
 				_G(obj)->hide_sib(SIB_MUENZE_R40);
 
@@ -138,10 +138,10 @@ void Room40::xit(int16 eib_nr) {
 				show_person();
 
 			} else {
-				_G(spieler).PersonRoomNr[P_HOWARD] = 42;
+				_G(spieler)._personRoomNr[P_HOWARD] = 42;
 			}
 		} else {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 41;
+			_G(spieler)._personRoomNr[P_HOWARD] = 41;
 		}
 	}
 
@@ -213,7 +213,7 @@ void Room40::move_train(int16 mode) {
 }
 
 void Room40::setup_func() {
-	if (!_G(spieler).R40HoUse && _G(spieler).PersonRoomNr[P_HOWARD] == 40) {
+	if (!_G(spieler).R40HoUse && _G(spieler)._personRoomNr[P_HOWARD] == 40) {
 		calc_person_look();
 
 		int16 x, y;
@@ -324,7 +324,7 @@ int16 Room40::use_mr_pumpkin() {
 			case CENT_INV:
 				action_ret = true;
 				autoMove(5, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				startSetailWait(15, 1, ANI_FRONT);
 				start_spz(CH_PUMP_TALK, 255, ANI_FRONT, P_CHEWY);
 				startAadWait(200);
@@ -340,13 +340,13 @@ int16 Room40::use_mr_pumpkin() {
 						hideCur();
 						autoMove(8, P_CHEWY);
 						start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
-						del_inventar(_G(spieler).AkInvent);
+						delInventory(_G(spieler).AkInvent);
 						_G(out)->ausblenden(1);
 						Room43::catch_pg();
 						remove_inventory(LIKOER_INV);
 						_G(obj)->addInventory(LIKOER2_INV, &_G(room_blk));
 						inventory_2_cur(LIKOER2_INV);
-						switch_room(40);
+						switchRoom(40);
 						startAadWait(236);
 					}
 				} else {
@@ -479,11 +479,11 @@ int16 Room40::use_haendler() {
 				startAadWait(212);
 				_G(out)->ausblenden(0);
 				_G(spieler).R40Wettbewerb = true;
-				_G(spieler).PersonRoomNr[P_HOWARD] = 28;
+				_G(spieler)._personRoomNr[P_HOWARD] = 28;
 				_G(flags).NoScroll = false;
 				_G(out)->setPointer(nullptr);
 				_G(out)->cls();
-				switch_room(28);
+				switchRoom(28);
 				_G(SetUpScreenFunc) = setup_func;
 
 			} else {
@@ -634,7 +634,7 @@ int16 Room40::use_tele() {
 
 			if (dia_nr1 == 223) {
 				if (is_cur_inventar(DUENGER_INV)) {
-					del_inventar(_G(spieler).AkInvent);
+					delInventory(_G(spieler).AkInvent);
 				} else {
 					remove_inventory(DUENGER_INV);
 				}
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 658f369ccf4..0b562cceb6c 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -80,7 +80,7 @@ void Room41::xit() {
 }
 
 void Room41::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 41) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 41) {
 		calc_person_look();
 		if (_G(spieler_vector)->Xypos[P_HOWARD] == 160) {
 			goAutoXy(258, 75, P_HOWARD, ANI_GO);
@@ -223,7 +223,7 @@ int16 Room41::use_brief() {
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		autoMove(6, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		stop_hoggy();
 		startAadWait(186);
 		start_hoggy();
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 924830b766b..2cd4bd14520 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -36,7 +36,7 @@ void Room42::entry() {
 		_G(det)->startDetail(0, 255, ANI_FRONT);
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 42) {
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (!_G(flags).LoadGame) {
@@ -62,11 +62,11 @@ void Room42::entry() {
 }
 
 void Room42::xit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 42) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 42) {
 		_G(atds)->set_ats_str(264, 1, ATS_DATA);
 		stop_spz();
 		_G(spieler).R42HoToBeamter = false;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+		_G(spieler)._personRoomNr[P_HOWARD] = 40;
 	}
 }
 
@@ -78,15 +78,15 @@ void Room42::setup_func() {
 void Room42::get_kuerbis(int16 aad_nr) {
 	hideCur();
 	autoMove(1, P_CHEWY);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(7, 1, ANI_BACK);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
 	startAadWait(aad_nr);
 
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(7, 1, ANI_FRONT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	showCur();
 }
 
@@ -103,13 +103,13 @@ int16 Room42::use_psack() {
 	} else if (_G(spieler).R42HoToBeamter && !_G(spieler).inv_cur && !_G(spieler).R42MarkeOk) {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(10, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		startAadWait(187);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(9, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		new_invent_2_cur(BMARKE_INV);
 		startAadWait(181);
 		_G(spieler).R42MarkeOk = true;
@@ -119,10 +119,10 @@ int16 Room42::use_psack() {
 	} else if (is_cur_inventar(BRIEF2_INV)) {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(10, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		del_inventar(_G(spieler).AkInvent);
+		_G(spieler)._personHide[P_CHEWY] = false;
+		delInventory(_G(spieler).AkInvent);
 		startAadWait(183);
 		_G(obj)->calc_rsi_flip_flop(SIB_BKASTEN_R28);
 		_G(atds)->set_ats_str(206, 1, ATS_DATA);
@@ -184,7 +184,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 			SHOULD_QUIT_RETURN;
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(flags).NoDiaBox = true;
 
 		switch (str_end_nr) {
@@ -226,12 +226,12 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		g_engine->_sound->playSound(0);
 	}
 
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(det)->startDetail(6, 255, ANI_FRONT);
 	startAadWait(135);
 	_G(det)->stop_detail(6);
 	_G(flags).NoDiaBox = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room43.cpp b/engines/chewy/rooms/room43.cpp
index de2a6cee2f2..30087593989 100644
--- a/engines/chewy/rooms/room43.cpp
+++ b/engines/chewy/rooms/room43.cpp
@@ -33,7 +33,7 @@ void Room43::night_small() {
 	hide_person();
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	switch_room(43);
+	switchRoom(43);
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hideCur();
@@ -70,7 +70,7 @@ void Room43::catch_pg() {
 	hide_person();
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	switch_room(43);
+	switchRoom(43);
 	_G(sndPlayer)->stopMod();
 	g_engine->_sound->playSound(0);
 	hideCur();
diff --git a/engines/chewy/rooms/room44.cpp b/engines/chewy/rooms/room44.cpp
index 54b79bcdaf7..f2b896fefa5 100644
--- a/engines/chewy/rooms/room44.cpp
+++ b/engines/chewy/rooms/room44.cpp
@@ -29,20 +29,20 @@ namespace Chewy {
 namespace Rooms {
 
 void Room44::look_news() {
-	int16 tmproom = _G(spieler).PersonRoomNr[P_CHEWY];
+	int16 tmproom = _G(spieler)._personRoomNr[P_CHEWY];
 	int16 tmpsx = _G(spieler).scrollx;
 	int16 tmpsy = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	hide_person();
 	_G(fx_blend) = BLEND1;
-	_G(spieler).PersonRoomNr[P_CHEWY] = 44;
-	_G(room)->load_room(&_G(room_blk), 44, &_G(spieler));
+	_G(spieler)._personRoomNr[P_CHEWY] = 44;
+	_G(room)->loadRoom(&_G(room_blk), 44, &_G(spieler));
 
 	startAadWait(172);
 	_G(spieler).scrollx = tmpsx;
 	_G(spieler).scrolly = tmpsy;
-	switch_room(tmproom);
+	switchRoom(tmproom);
 	show_person();
 }
 
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 6d9b32ac420..0e94a4c2ea0 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -39,9 +39,9 @@ void Room45::entry(int16 eib_nr) {
 	_G(spieler).ZoomXy[P_HOWARD][0] = 80;
 	_G(spieler).ZoomXy[P_HOWARD][1] = 70;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 46) {
 		_G(spieler_mi)[P_HOWARD].Mode = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 45;
+		_G(spieler)._personRoomNr[P_HOWARD] = 45;
 	}
 
 	_G(spieler_mi)[P_HOWARD].Mode = true;
@@ -79,11 +79,11 @@ void Room45::entry(int16 eib_nr) {
 void Room45::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 45) {
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 
 		if (eib_nr == 87) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 40;
+			_G(spieler)._personRoomNr[P_HOWARD] = 40;
 		}
 	}
 
@@ -141,7 +141,7 @@ void Room45::setup_func() {
 			--_G(r45_delay);
 		}
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 45 && _G(HowardMov) != 2) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 45 && _G(HowardMov) != 2) {
 			calc_person_look();
 			const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
@@ -183,7 +183,7 @@ int16 Room45::use_taxi() {
 		}
 	} else if (is_cur_inventar(RING_INV)) {
 		action_ret = true;
-		del_inventar(RING_INV);
+		delInventory(RING_INV);
 		talk_taxi(256);
 		_G(spieler).R45TaxiOk = true;
 		taxi_mov();
@@ -215,14 +215,14 @@ void Room45::taxi_mov() {
 	g_engine->_sound->playSound(15, 1);
 	_G(det)->showStaticSpr(11);
 	autoMove(3, P_CHEWY);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 45) {
 		goAutoXy(93, 127, P_HOWARD, ANI_WAIT);
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler)._personHide[P_HOWARD] = true;
 		_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+		_G(spieler)._personRoomNr[P_HOWARD] = 48;
 	}
 
 	_G(det)->hideStaticSpr(11);
@@ -231,7 +231,7 @@ void Room45::taxi_mov() {
 	g_engine->_sound->playSound(15, 0);
 	startSetailWait(15, 1, ANI_FRONT);
 	g_engine->_sound->stopSound(0);
-	switch_room(48);
+	switchRoom(48);
 }
 
 int16 Room45::use_boy() {
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index c633a2507b0..27e0b88e70f 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -30,8 +30,8 @@ namespace Chewy {
 namespace Rooms {
 
 void Room46::entry(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 45) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 45) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 46;
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (eib_nr == 79) {
@@ -41,7 +41,7 @@ void Room46::entry(int16 eib_nr) {
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 46) {
 		_G(spieler_mi)[P_HOWARD].Mode = true;
 		_G(SetUpScreenFunc) = setup_func;
 
@@ -58,7 +58,7 @@ void Room46::entry(int16 eib_nr) {
 			start_spz(65, 255, false, P_CHEWY);
 			startAadWait(494);
 			_G(spieler).SVal2 = 504;
-			switch_room(92);
+			switchRoom(92);
 			start_spz(65, 255, false, P_CHEWY);
 			startAadWait(495);
 			_G(spieler).room_e_obj[78].Exit = 90;
@@ -71,7 +71,7 @@ void Room46::entry(int16 eib_nr) {
 }
 
 void Room46::xit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 46) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 46) {
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
@@ -128,14 +128,14 @@ void Room46::bodo() {
 	_G(det)->hideStaticSpr(6);
 	startSetailWait(6, 1, ANI_FRONT);
 	_G(det)->showStaticSpr(3);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	startSetailWait(1, 1, ANI_FRONT);
 	flic_cut(FCUT_065);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	register_cutscene(16);
 	
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(det)->hideStaticSpr(0);
 	_G(det)->hideStaticSpr(3);
 	load_chewy_taf(CHEWY_ROCKER);
@@ -189,7 +189,7 @@ int16 Room46::use_schloss() {
 
 		if (!_G(spieler).R46GetLeder) {
 			autoMove(1, P_CHEWY);
-			switch_room(47);
+			switchRoom(47);
 		} else {
 			startAadWait(252);
 		}
diff --git a/engines/chewy/rooms/room47.cpp b/engines/chewy/rooms/room47.cpp
index c03b8cb3fa6..417d7eeb8ae 100644
--- a/engines/chewy/rooms/room47.cpp
+++ b/engines/chewy/rooms/room47.cpp
@@ -42,7 +42,7 @@ void Room47::xit() {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 }
 
-int16 Room47::use_knopf(int16 txt_nr) {
+int16 Room47::use_button(int16 txt_nr) {
 	int16 k_nr = 0;
 	int16 action_ret = false;
 
diff --git a/engines/chewy/rooms/room47.h b/engines/chewy/rooms/room47.h
index 8745f1da271..5f161dbf374 100644
--- a/engines/chewy/rooms/room47.h
+++ b/engines/chewy/rooms/room47.h
@@ -32,7 +32,7 @@ private:
 public:
 	static void entry();
 	static void xit();
-	static int16 use_knopf(int16 txt_nr);
+	static int16 use_button(int16 txt_nr);
 };
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index 7269981a559..e53d0017e6e 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -147,15 +147,15 @@ void Room48::setup_func() {
 
 							for (int16 i = 0; i < MAX_PERSON; i++) {
 								if (_G(spieler).R48TaxiPerson[i]) {
-									_G(spieler).PersonHide[i] = false;
+									_G(spieler)._personHide[i] = false;
 									_G(spieler).R48TaxiPerson[i] = false;
 								}
 							}
 
-							if (_G(spieler).PersonRoomNr[P_HOWARD] == 48) {
-								_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
+							if (_G(spieler)._personRoomNr[P_HOWARD] == 48) {
+								_G(spieler)._personRoomNr[P_HOWARD] = r_nr;
 							}
-							switch_room(r_nr);
+							switchRoom(r_nr);
 						}
 					}
 				}
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 6ec4bc67f66..a8eb98d78f8 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -73,10 +73,10 @@ void Room49::entry(int16 eib_nr) {
 void Room49::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 49) {
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 		if (eib_nr == 80) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler)._personRoomNr[P_HOWARD] = 50;
 		} else if (eib_nr == 81) {
 			_G(SetUpScreenFunc) = nullptr;
 			startAadWait(268);
@@ -134,9 +134,9 @@ void Room49::calc_boy() {
 		startSetailWait(3, 1, ANI_FRONT);
 
 		_G(det)->showStaticSpr(9);
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler)._personHide[P_HOWARD] = true;
 		startSetailWait(8, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_HOWARD] = false;
+		_G(spieler)._personHide[P_HOWARD] = false;
 		_G(det)->hideStaticSpr(9);
 		startSetailWait(4, 1, ANI_GO);
 
@@ -154,7 +154,7 @@ int16 Room49::use_boy() {
 		action_ret = true;
 		hideCur();
 		autoMove(3, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		talk_boy(265);
 		_G(spieler).R49WegFrei = true;
 		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
@@ -170,7 +170,7 @@ int16 Room49::use_boy() {
 
 void Room49::use_boy_cigar() {
 	hideCur();
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	talk_boy(263);
 	_G(SetUpScreenFunc) = nullptr;
 	autoMove(5, P_CHEWY);
@@ -230,7 +230,7 @@ void Room49::talk_boy(int16 aad_nr) {
 }
 
 void Room49::look_hotel() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 49) {
 		_G(SetUpScreenFunc) = nullptr;
 		stopPerson(P_HOWARD);
 		startAadWait(261);
@@ -247,28 +247,28 @@ int16 Room49::use_taxi() {
 		startAniBlock(2, ABLOCK34);
 		_G(det)->showStaticSpr(7);
 		autoMove(2, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 49) {
 			goAutoXy(507, 74, P_HOWARD, ANI_WAIT);
 			goAutoXy(490, 58, P_HOWARD, ANI_WAIT);
-			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler)._personHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler)._personRoomNr[P_HOWARD] = 48;
 		}
 
 		_G(det)->hideStaticSpr(7);
 		startSetailWait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
-		switch_room(48);
+		switchRoom(48);
 	}
 
 	return action_ret;
 }
 
 void Room49::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 49) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 49) {
 		calc_person_look();
 		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index fc3d430e5e9..6f38622f6d3 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -51,7 +51,7 @@ void Room50::entry(int16 eib_nr) {
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_108);
 		showCur();
-		switch_room(51);
+		switchRoom(51);
 
 	} else {
 		if (_G(spieler).R50Zigarre) {
@@ -69,7 +69,7 @@ void Room50::entry(int16 eib_nr) {
 
 		_G(SetUpScreenFunc) = setup_func;
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 50) {
 			_G(spieler_mi)[P_HOWARD].Mode = true;
 
 			if (!_G(flags).LoadGame) {
@@ -85,11 +85,11 @@ void Room50::entry(int16 eib_nr) {
 void Room50::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 50) {
 		if (eib_nr == 83)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 49;
+			_G(spieler)._personRoomNr[P_HOWARD] = 49;
 		else
-			_G(spieler).PersonRoomNr[P_HOWARD] = 51;
+			_G(spieler)._personRoomNr[P_HOWARD] = 51;
 
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
@@ -169,7 +169,7 @@ int16 Room50::use_gutschein() {
 			_G(room)->set_timer_status(1, TIMER_STOP);
 			_wasser = false;
 			stop_page();
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			startAniBlock(2, ABLOCK36);
 			aad_page(274, 8);
 		} else {
@@ -199,7 +199,7 @@ int16 Room50::use_gum() {
 		goAutoXy(112, 57, P_HOWARD, ANI_WAIT);
 
 		setPersonSpr(P_LEFT, P_HOWARD);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		hide_person();
 		startSetailWait(2, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(4);
@@ -252,7 +252,7 @@ void Room50::setup_func() {
 		go_page();
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 50) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 50) {
 		calc_person_look();
 		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5b2a661fe21..5c2dc7b24a8 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -53,8 +53,8 @@ void Room51::entry() {
 
 	if (_G(spieler).flags32_10) {
 		_G(atds)->enableEvents(false);
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_HOWARD] = true;
 		_G(maus_links_click) = false;
 		_G(spieler).scrollx = 0;
 		setPersonPos(34, 120, P_HOWARD, P_RIGHT);
@@ -78,7 +78,7 @@ void Room51::entry() {
 		for (int i = 0; i < 2; i++)
 			_G(det)->startDetail(3 + i, 1, ANI_FRONT);
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 51) {
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 30;
 
@@ -105,18 +105,18 @@ void Room51::xit(int16 eib_nr) {
 
 	if (_G(spieler).flags32_10) {
 		_G(flags).MainInput = true;
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(spieler).PersonHide[P_HOWARD] = false;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
+		_G(spieler)._personHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_HOWARD] = false;
+		_G(spieler)._personRoomNr[P_HOWARD] = 91;
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(_G(menu_item));
 		showCur();
 
-	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+	} else if (_G(spieler)._personRoomNr[P_HOWARD] == 51) {
 		if (eib_nr == 85) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler)._personRoomNr[P_HOWARD] = 50;
 		} else {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 52;
+			_G(spieler)._personRoomNr[P_HOWARD] = 52;
 		}
 
 		_G(spieler_mi)[P_HOWARD].Mode = false;
@@ -143,7 +143,7 @@ void Room51::setup_func() {
 
 		_G(det)->setStaticPos(17, _tmpx, _tmpy, false, false);
 
-		if ((_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
+		if ((_G(minfo)._button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->setSetailPos(8, _tmpx - 20, _tmpy + 41);
 			startSetailWait(8, 1, ANI_FRONT);
@@ -175,14 +175,14 @@ void Room51::setup_func() {
 				flic_cut(FCUT_115);
 				register_cutscene(28);
 				
-				switch_room(91);
+				switchRoom(91);
 				break;
 
 			default:
 				break;
 			}
 		}
-	} else if (_G(spieler).PersonRoomNr[P_HOWARD] == 51) {
+	} else if (_G(spieler)._personRoomNr[P_HOWARD] == 51) {
 		calc_person_look();
 		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 
@@ -229,7 +229,7 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			} else {
 				showCur();
-				switch_room(52);
+				switchRoom(52);
 			}
 			break;
 
@@ -329,7 +329,7 @@ int16 Room51::use_door(int16 txt_nr) {
 
 			default:
 				startAadWait(281);
-				if (_G(spieler).PersonRoomNr[P_HOWARD] == 51)
+				if (_G(spieler)._personRoomNr[P_HOWARD] == 51)
 					startAadWait(282);
 				break;
 			}
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index ca78194b102..61848cff01b 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -57,8 +57,8 @@ void Room52::entry() {
 }
 
 void Room52::xit() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 51;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 52) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 51;
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
@@ -77,7 +77,7 @@ int16 Room52::use_hot_dog() {
 		autoMove(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
 		_G(det)->showStaticSpr(0);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		autoMove(4, P_CHEWY);
 		_G(spieler).R52HotDogOk = true;
 		plot_armee(20);
@@ -91,7 +91,7 @@ int16 Room52::use_hot_dog() {
 	} else if (is_cur_inventar(KILLER_INV)) {
 		action_ret = true;
 		autoMove(5, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(7, 1, ANI_FRONT);
 		g_engine->_sound->playSound(7, 0);
 		g_engine->_sound->playSound(7);
@@ -107,7 +107,7 @@ int16 Room52::use_hot_dog() {
 		_G(det)->stop_detail(8);
 		startSetailWait(7, 1, ANI_BACK);
 		g_engine->_sound->stopSound(0);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(atds)->set_steuer_bit(341, ATS_AKTIV_BIT, ATS_DATA);
 		startAadWait(303);
 		_G(atds)->set_ats_str(KILLER_INV, 1, INV_ATS_DATA);
@@ -136,7 +136,7 @@ void Room52::kaker_platt() {
 }
 
 void Room52::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 52) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 52) {
 		calc_person_look();
 		const int16 y = (_G(spieler_vector)[P_CHEWY].Xypos[1] < 97) ? 44 : 87;
 		goAutoXy(1, y, P_HOWARD, ANI_GO);
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 56bcf4d15d7..3158de5f90d 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -80,7 +80,7 @@ int16 Room53::use_man() {
 		action_ret = true;
 		hideCur();
 		_G(spieler).R53Kostuem = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		autoMove(2, P_CHEWY);
 		startAadWait(271);
 		_G(room)->set_timer_status(1, TIMER_STOP);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index b7f9e05c01b..c2d39f2850b 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -47,7 +47,7 @@ void Room54::entry(int16 eib_nr) {
 		if (_G(spieler).R48TaxiEntry) {
 			_G(spieler).R48TaxiEntry = false;
 
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = 0;
 				setPersonPos(290, 61, P_HOWARD, P_RIGHT);
 			}
@@ -61,7 +61,7 @@ void Room54::entry(int16 eib_nr) {
 			aufzug_ab();
 
 		} else if (eib_nr == 90 || _G(spieler).R55ExitDia) {
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 54) {
 				_G(spieler).R54HowardVorne = 0;
 				setPersonPos(212, 61, P_HOWARD, P_RIGHT);
 			}
@@ -85,14 +85,14 @@ void Room54::entry(int16 eib_nr) {
 void Room54::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (eib_nr == 89 && _G(spieler).PersonRoomNr[P_HOWARD] == 54) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 55;
+	if (eib_nr == 89 && _G(spieler)._personRoomNr[P_HOWARD] == 54) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 55;
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 	}
 }
 
 void Room54::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 54) {
 		calc_person_look();
 
 		if (_G(spieler).R54HowardVorne != 255) {
@@ -189,7 +189,7 @@ void Room54::talk_verkauf() {
 	if (!_G(spieler).R54HotDogOk) {
 		if (_G(spieler).R45MagOk) {
 			if (_G(spieler).AkInvent == DOLLAR175_INV)
-				del_inventar(DOLLAR175_INV);
+				delInventory(DOLLAR175_INV);
 			else
 				remove_inventory(DOLLAR175_INV);
 		}
@@ -242,7 +242,7 @@ int16 Room54::use_zelle() {
 				goAutoXy(239, 101, P_HOWARD, ANI_WAIT);
 				flic_cut(FCUT_069);
 
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				invent_2_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_JMANS);
 				_G(zoom_horizont) = 90;
@@ -254,7 +254,7 @@ int16 Room54::use_zelle() {
 				startAadWait(316);
 
 				_G(spieler_mi)[P_HOWARD].Mode = true;
-				switch_room(55);
+				switchRoom(55);
 			}
 		}
 	} else {
@@ -285,7 +285,7 @@ int16 Room54::use_azug() {
 				autoMove(8, P_CHEWY);
 				_G(spieler).R54HowardVorne = 0;
 				startAadWait(298);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				_G(det)->showStaticSpr(12);
 				_G(spieler).R55Location = true;
 				_G(SetUpScreenFunc) = nullptr;
@@ -313,7 +313,7 @@ int16 Room54::use_azug() {
 					SHOULD_QUIT_RETURN0;
 				}
 
-				switch_room(55);
+				switchRoom(55);
 			}
 		} else {
 			startAadWait(314);
@@ -357,7 +357,7 @@ void Room54::aufzug_ab() {
 	g_engine->_sound->stopSound(0);
 	_G(det)->hideStaticSpr(12);
 	setPersonPos(99, 82, P_CHEWY, P_RIGHT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(maus_links_click) = false;
 	stopPerson(P_CHEWY);
 	_G(spieler).R55Location = false;
@@ -372,19 +372,19 @@ short Room54::use_taxi() {
 		autoMove(7, P_CHEWY);
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 54) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 54) {
 			if (_G(spieler).R54HowardVorne) {
 				_G(spieler).R54HowardVorne = 0;
 				goAutoXy(290, 61, P_HOWARD, ANI_WAIT);
 			}
 
-			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler)._personHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler)._personRoomNr[P_HOWARD] = 48;
 		}
 
-		_G(spieler).PersonHide[P_CHEWY] = true;
-		switch_room(48);
+		_G(spieler)._personHide[P_CHEWY] = true;
+		switchRoom(48);
 	}
 
 	return action_ret;
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index edf54288a74..673836b3220 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -60,7 +60,7 @@ void Room55::entry() {
 
 	if (_G(spieler).R55Job) {
 		rock2mans();
-		_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+		_G(spieler)._personRoomNr[P_HOWARD] = 54;
 	}
 
 	if (_G(spieler).ChewyAni == CHEWY_JMANS) {
@@ -76,13 +76,13 @@ void Room55::entry() {
 			_G(spieler).scrollx = 136;
 			setPersonPos(404, 66, P_CHEWY, P_RIGHT);
 			startSetailWait(3, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			_G(zoom_horizont) = 1;
 			_G(atds)->del_steuer_bit(340, ATS_AKTIV_BIT, ATS_DATA);
 		} else {
 			_G(spieler).scrollx = 0;
 
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 55) {
 				setPersonPos(21, 77, P_HOWARD, P_RIGHT);
 			}
 
@@ -113,8 +113,8 @@ void Room55::xit(int16 eib_nr) {
 	if (eib_nr == 90) {
 		mans2rock();
 
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 55) {
+			_G(spieler)._personRoomNr[P_HOWARD] = 54;
 			_G(spieler_mi)[P_HOWARD].Mode = false;
 		}
 	}
@@ -153,7 +153,7 @@ int16 Room55::use_stapel1() {
 			autoMove(4, P_CHEWY);
 			_G(spieler).R55EscScriptOk = true;
 			_G(det)->showStaticSpr(0);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(atds)->set_ats_str(354, 2, ATS_DATA);
 		} else {
 			startAadWait(326);
@@ -187,14 +187,14 @@ int16 Room55::use_telefon() {
 				hideCur();
 				_G(spieler).R55RaumOk = true;
 				autoMove(6, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				startSetailWait(10, 1, ANI_FRONT);
 				_G(det)->startDetail(11, 255, ANI_FRONT);
 				startAadWait(329);
 				_G(det)->stop_detail(11);
 				startSetailWait(10, 1, ANI_BACK);
 
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 				autoMove(7, P_CHEWY);
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
@@ -213,7 +213,7 @@ int16 Room55::use_telefon() {
 				_G(det)->hideStaticSpr(8);
 				_G(atds)->set_ats_str(354, 1, ATS_DATA);
 				flic_cut(FCUT_071);
-				_G(spieler).PersonRoomNr[P_HOWARD] = 55;
+				_G(spieler)._personRoomNr[P_HOWARD] = 55;
 
 				setPersonPos(178, 75, P_CHEWY, P_LEFT);
 				setPersonPos(66, 73, P_HOWARD, P_RIGHT);
@@ -246,7 +246,7 @@ int16 Room55::use_telefon() {
 				invent_2_slot(EINLAD_INV);
 				del_invent_slot(LEDER_INV);
 				load_chewy_taf(CHEWY_ROCKER);
-				_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+				_G(spieler)._personRoomNr[P_HOWARD] = 54;
 				_G(spieler_mi)[P_HOWARD].Mode = false;
 				showCur();
 				_G(spieler).R55R54First = true;
@@ -255,7 +255,7 @@ int16 Room55::use_telefon() {
 				_G(spieler).PersonGlobalDia[P_HOWARD] = 10024;
 				_G(spieler).PersonDiaRoom[P_HOWARD] = true;
 
-				switch_room(54);
+				switchRoom(54);
 			} else {
 				hideCur();
 				startAadWait(332);
@@ -272,16 +272,16 @@ int16 Room55::use_telefon() {
 }
 
 void Room55::get_job() {
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	const int16 oldScrollx = _G(spieler).scrollx;
 	const int16 oldScrolly = _G(spieler).scrolly;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	switch_room(61);
+	switchRoom(61);
 
 	showCur();
 	startAdsWait(15);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(flags).LoadGame = true;
 	_G(spieler).scrollx = oldScrollx;
 	_G(spieler).scrolly = oldScrolly;
@@ -297,14 +297,14 @@ void Room55::get_job() {
 		mans2rock();
 	}
 
-	_G(spieler).PersonRoomNr[P_HOWARD] = r_nr;
+	_G(spieler)._personRoomNr[P_HOWARD] = r_nr;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 
 	if (r_nr == 54)
 		_G(flags).LoadGame = false;
 
 	setPersonPos(118, 96, P_CHEWY, P_LEFT);
-	switch_room(r_nr);
+	switchRoom(r_nr);
 	_G(flags).LoadGame = false;
 }
 
@@ -342,7 +342,7 @@ void Room55::verleger_mov(int16 mode) {
 
 void Room55::strasse(int16 mode) {
 	if (!_G(spieler).inv_cur || mode) {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(room)->set_timer_status(4, TIMER_STOP);
 		_G(det)->del_static_ani(4);
 		_G(det)->stop_detail(4);
@@ -350,7 +350,7 @@ void Room55::strasse(int16 mode) {
 		startSetailWait(3, 1, ANI_BACK);
 
 		_G(spieler).scrollx = 0;
-		switch_room(54);
+		switchRoom(54);
 	}
 }
 
@@ -364,7 +364,7 @@ int16 Room55::use_kammeraus() {
 			startAadWait(325);
 		else if (!_G(spieler).R55SekWeg) {
 			hideCur();
-			_G(spieler).PersonHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(5, 1, ANI_FRONT);
 			_G(det)->showStaticSpr(10);
 			flic_cut(FCUT_070);
@@ -378,7 +378,7 @@ int16 Room55::use_kammeraus() {
 			_G(spieler).R55ExitDia = 322;
 			_G(spieler).R55SekWeg = true;
 			_G(atds)->set_steuer_bit(352, ATS_AKTIV_BIT, ATS_DATA);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(atds)->set_steuer_bit(345, ATS_AKTIV_BIT, ATS_DATA);
 			_G(atds)->set_steuer_bit(346, ATS_AKTIV_BIT, ATS_DATA);
 			strasse(1);
@@ -397,7 +397,7 @@ int16 Room55::cut_serv(int16 frame) {
 }
 
 void Room55::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 55) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 55) {
 		calc_person_look();
 		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 
@@ -456,9 +456,9 @@ void Room55::talk_line() {
 	}
 
 	_G(flags).NoScroll = false;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 54;
+	_G(spieler)._personRoomNr[P_HOWARD] = 54;
 	_G(spieler_mi)[P_HOWARD].Mode = false;
-	switch_room(54);
+	switchRoom(54);
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 1147606fc00..ba360e577fb 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -50,8 +50,8 @@ void Room56::entry() {
 			_G(spieler).R48TaxiEntry = false;
 			_G(spieler).scrollx = 0;
 			_G(spieler).scrolly = 0;
-			_G(spieler).PersonHide[P_CHEWY] = true;
-			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler)._personHide[P_CHEWY] = true;
+			_G(spieler)._personHide[P_HOWARD] = true;
 			_G(det)->hideStaticSpr(2);
 			_G(zoom_horizont) = 0;
 			setPersonPos(-6, 16, P_HOWARD, P_RIGHT);
@@ -73,8 +73,8 @@ void Room56::entry() {
 			_G(room)->set_zoom(23);
 			_G(spieler).ZoomXy[P_HOWARD][0] = 17;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 37;
-			_G(spieler).PersonHide[P_CHEWY] = false;
-			_G(spieler).PersonHide[P_HOWARD] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_HOWARD] = false;
 			_G(SetUpScreenFunc) = setup_func;
 			_G(spieler_mi)[P_CHEWY].Mode = true;
 			autoMove(1, P_CHEWY);
@@ -91,14 +91,14 @@ void Room56::entry() {
 			setPersonPos(308, 97, P_HOWARD, P_RIGHT);
 			setPersonPos(429, 146, P_CHEWY, P_LEFT);
 			_G(spieler).scrollx = 262;
-			_G(spieler).PersonHide[P_HOWARD] = false;
+			_G(spieler)._personHide[P_HOWARD] = false;
 			_G(det)->showStaticSpr(9);
 			_G(det)->showStaticSpr(8);
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			_G(det)->set_static_ani(3, -1);
 			_G(maus_links_click) = false;
-			_G(atds)->stop_aad();
+			_G(atds)->stopAad();
 			hideCur();
 			startAadWait(306);
 			showCur();
@@ -124,7 +124,7 @@ void Room56::entry() {
 					_G(out)->setPointer(nullptr);
 					_G(out)->cls();
 					flic_cut(FCUT_113);
-					_G(spieler).PersonRoomNr[P_HOWARD] = 89;
+					_G(spieler)._personRoomNr[P_HOWARD] = 89;
 					load_chewy_taf(CHEWY_NORMAL);
 					_G(spieler).mi[P_HOWARD] = 0;
 					_G(spieler).SVal2 = 0;
@@ -159,8 +159,8 @@ void Room56::entry() {
 
 	switch(mode) {
 	case 1:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+		_G(spieler)._personRoomNr[P_HOWARD] = 66;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 66;
 		_G(spieler).r88DestRoom = 82;
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -171,18 +171,18 @@ void Room56::entry() {
 		_G(out)->cls();
 		_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
 		_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
-		switch_room(66);
+		switchRoom(66);
 		break;
 	case 2:
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 		flic_cut(FCUT_110);
 		_G(spieler).flags34_20 = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
-		switch_room(90);
+		_G(spieler)._personRoomNr[P_HOWARD] = 90;
+		switchRoom(90);
 		break;
 	case 3:
-		switch_room(89);
+		switchRoom(89);
 		break;
 	default:
 		break;
@@ -223,15 +223,15 @@ int16 Room56::use_taxi() {
 		_G(spieler_mi)[P_CHEWY].Mode = true;
 		goAutoXy(3, 42, P_CHEWY, ANI_WAIT);
 		_G(spieler_mi)[P_CHEWY].Mode = false;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
-			_G(spieler).PersonHide[P_HOWARD] = true;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 56) {
+			_G(spieler)._personHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler)._personRoomNr[P_HOWARD] = 48;
 		}
 		showCur();
-		switch_room(48);
+		switchRoom(48);
 	}
 	return action_ret;
 }
@@ -268,7 +268,7 @@ int16 Room56::use_man() {
 		_G(room)->set_timer_status(0, TIMER_START);
 		_G(det)->set_static_ani(0, -1);
 	} else {
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).R56AbfahrtOk = true;
 		startSetailWait(6, 1, ANI_FRONT);
 
@@ -294,9 +294,9 @@ int16 Room56::use_kneipe() {
 			} else {
 				_G(SetUpScreenFunc) = nullptr;
 				autoMove(4, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				goAutoXy(160, 58, P_HOWARD, ANI_FRONT);
-				_G(spieler).PersonHide[P_HOWARD] = true;
+				_G(spieler)._personHide[P_HOWARD] = true;
 				_G(spieler).R56Kneipe = true;
 				_G(flags).NoScroll = true;
 				auto_scroll(0, 0);
@@ -310,8 +310,8 @@ int16 Room56::use_kneipe() {
 				g_engine->_sound->playSound(10, 0);
 				_G(out)->ausblenden(0);
 				setupScreen(DO_SETUP);
-				_G(spieler).PersonHide[P_CHEWY] = false;
-				_G(spieler).PersonHide[P_HOWARD] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_HOWARD] = false;
 				_G(spieler).scrollx = 0;
 				setPersonPos(23, 70, P_HOWARD, P_RIGHT);
 				setPersonPos(50, 81, P_CHEWY, P_LEFT);
@@ -341,7 +341,7 @@ int16 Room56::use_kneipe() {
 			_G(spieler).SVal1 = 56;
 			_G(spieler).SVal2 = 523;
 			cur_2_inventory();
-			switch_room(92);
+			switchRoom(92);
 		} else {
 			startAadWait(518);
 		}
@@ -417,7 +417,7 @@ void Room56::setup_func() {
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 56) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 56) {
 		calc_person_look();
 		const int16 ch_x = _G(spieler_vector)[P_CHEWY].Xypos[0];
 		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index d854a01e9ae..2d429320410 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -54,15 +54,15 @@ void Room57::entry() {
 }
 
 void Room57::xit(int16 eib_nr) {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 57) {
 		_G(spieler_mi)[P_HOWARD].Mode = false;
 		if (eib_nr == 91)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 62;
+			_G(spieler)._personRoomNr[P_HOWARD] = 62;
 	}
 }
 
 void Room57::setup_func() {
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 57) {
 		calc_person_look();
 		const int16 ch_y = _G(spieler_vector)[P_CHEWY].Xypos[1];
 		int16 x, y;
@@ -87,14 +87,14 @@ int16 Room57::use_taxi() {
 		g_engine->_sound->playSound(3);
 		_G(det)->showStaticSpr(7);
 		goAutoXy(16, 160, P_CHEWY, ANI_WAIT);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler).R48TaxiPerson[P_CHEWY] = true;
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 57) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 57) {
 			_G(SetUpScreenFunc) = nullptr;
 			goAutoXy(11, 144, P_HOWARD, ANI_WAIT);
-			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler)._personHide[P_HOWARD] = true;
 			_G(spieler).R48TaxiPerson[P_HOWARD] = true;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 48;
+			_G(spieler)._personRoomNr[P_HOWARD] = 48;
 		}
 		_G(det)->hideStaticSpr(7);
 		g_engine->_sound->playSound(3, 1);
@@ -103,7 +103,7 @@ int16 Room57::use_taxi() {
 		_G(det)->del_static_ani(3);
 		startSetailWait(5, 1, ANI_FRONT);
 		g_engine->_sound->stopSound(0);
-		switch_room(48);
+		switchRoom(48);
 	}
 	return action_ret;
 }
@@ -134,7 +134,7 @@ int16 Room57::use_pfoertner() {
 		if (_G(spieler).R56AbfahrtOk) {
 			startAadWait(341);
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
 			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
 			_G(det)->hideStaticSpr(4);
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index 8b1216dc43a..9a5d56ce20e 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -44,14 +44,14 @@ void Room58::xit() {
 	show_person();
 	set_person_rnr();
 	const int16 tmp = _G(spieler).R58TmpRoom1;
-	_G(spieler).PersonRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
+	_G(spieler)._personRoomNr[P_CHEWY] = _G(spieler).R58TmpRoom;
 
-	switch_room(tmp);
+	switchRoom(tmp);
 }
 
 void Room58::look_cut_mag(int16 r_nr) {
 	_G(spieler).R58TmpRoom = r_nr;
-	_G(spieler).R58TmpRoom1 = _G(spieler).PersonRoomNr[P_CHEWY];;
+	_G(spieler).R58TmpRoom1 = _G(spieler)._personRoomNr[P_CHEWY];;
 
 	_G(spieler).R58TmpSx = _G(spieler).scrollx;
 	_G(spieler).R58TmpSy = _G(spieler).scrolly;
@@ -63,7 +63,7 @@ void Room58::look_cut_mag(int16 r_nr) {
 	_G(spieler).scrolly = 0;
 	_G(flags).MainInput = false;
 	hide_person();
-	switch_room(r_nr);
+	switchRoom(r_nr);
 }
 
 void Room58::setup_func() {
diff --git a/engines/chewy/rooms/room59.cpp b/engines/chewy/rooms/room59.cpp
index b9cbae866c7..d13e0607f0b 100644
--- a/engines/chewy/rooms/room59.cpp
+++ b/engines/chewy/rooms/room59.cpp
@@ -34,7 +34,7 @@ void Room59::look_poster() {
 		_G(atds)->set_ats_str(301, 1, ATS_DATA);
 		_G(spieler).R59PosterWeg = true;
 		invent_2_slot(SPARK_INV);
-		switch_room(60);
+		switchRoom(60);
 	}
 }
 
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 1d83d2f113f..7d72fe89aa7 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -70,10 +70,10 @@ void Room62::entry() {
 		_G(spieler).R64Moni2Ani = 4;
 		setPersonPos(187, 43, P_CHEWY, P_RIGHT);
 		_G(spieler).R62TShow = true;
-		switch_room(64);
+		switchRoom(64);
 	} else {
 		_G(det)->del_static_ani(0);
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler)._personHide[P_HOWARD] = true;
 		_G(det)->set_static_ani(4, -1);
 		_G(det)->set_static_ani(8, -1);
 		_G(r62Delay) = 0;
@@ -105,18 +105,18 @@ int16 Room62::use_laura() {
 		_G(SetUpScreenFunc) = nullptr;
 		_G(det)->del_static_ani(8);
 		_G(det)->stop_detail(8);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(det)->startDetail(2, 255, ANI_FRONT);
 		_G(det)->startDetail(6, 255, ANI_FRONT);
 		startAadWait(399);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		flic_cut(FCUT_077);
 		showCur();
 		_G(spieler).R64Moni1Ani = 0;
 		_G(spieler).R64Moni2Ani = 0;
 		_G(spieler).R62TShow = false;
 		_G(spieler).R62LauraVerwandlung = true;
-		switch_room(63);
+		switchRoom(63);
 	}
 	return action_ret;
 }
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 313911c89c3..461d4be8a51 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -58,7 +58,7 @@ void Room63::entry() {
 		cur_2_inventory();
 		_G(spieler).scrollx = 176;
 		setPersonPos(424, 78, P_CHEWY, P_LEFT);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler).room_e_obj[95].Attribut = 255;
 		_G(r63ChewyAni) = 0;
 		_G(det)->startDetail(0, 1, ANI_FRONT);
@@ -90,7 +90,7 @@ void Room63::setup_func() {
 			setPersonPos(0, 0, P_CHEWY, P_RIGHT);
 			_G(det)->startDetail(22, 1, ANI_FRONT);
 			_G(det)->startDetail(2, 1, ANI_FRONT);
-			_G(atds)->stop_aad();
+			_G(atds)->stopAad();
 			_G(r63ChewyAni) = 2;
 		}
 		break;
@@ -135,7 +135,7 @@ void Room63::bork_platt() {
 	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
 	flic_cut(FCUT_081);
 	flic_cut(FCUT_082);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	check_shad(4, 1);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	autoMove(6, P_CHEWY);
@@ -151,8 +151,8 @@ void Room63::bork_platt() {
 	showCur();
 	_G(flags).MainInput = true;
 	_G(spieler).R62Flucht = true;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 56;
-	switch_room(56);
+	_G(spieler)._personRoomNr[P_HOWARD] = 56;
+	switchRoom(56);
 }
 
 void Room63::talk_hunter() {
@@ -199,7 +199,7 @@ int16 Room63::use_fx_man() {
 		action_ret = true;
 		hideCur();
 		autoMove(1, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		remove_inventory(34);
 		startAadWait(359);
 		_G(det)->del_static_ani(5);
@@ -266,7 +266,7 @@ int16 Room63::use_girl() {
 		action_ret = true;
 		hideCur();
 		autoMove(2, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(det)->stop_detail(12);
 		startSetailWait(13, 1, ANI_FRONT);
 		_G(det)->set_static_ani(14, -1);
@@ -299,11 +299,11 @@ int16 Room63::use_aschenbecher() {
 		if (_G(spieler).R63Uhr) {
 			if (_G(spieler).R63FxMannWeg) {
 				autoMove(5, P_CHEWY);
-				del_inventar(_G(spieler).AkInvent);
+				delInventory(_G(spieler).AkInvent);
 				_G(flags).NoScroll = true;
 				auto_scroll(70, 0);
 				autoMove(1, P_CHEWY);
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				_G(det)->startDetail(20, 255, ANI_FRONT);
 				_G(det)->startDetail(10, 255, ANI_FRONT);
 				_G(det)->startDetail(18, 255, ANI_FRONT);
@@ -315,10 +315,10 @@ int16 Room63::use_aschenbecher() {
 				_G(atds)->set_steuer_bit(382, ATS_AKTIV_BIT, ATS_DATA);
 				_G(atds)->set_ats_str(383, 1, ATS_DATA);
 				_G(spieler).R63Feuer = true;
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 				_G(spieler).scrollx = 0;
 				setPersonPos(187, 42, P_CHEWY, P_RIGHT);
-				switch_room(64);
+				switchRoom(64);
 				_G(flags).NoScroll = false;
 			} else
 				startAadWait(369);
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index d1b6fa11a6e..8c413b1336e 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -55,7 +55,7 @@ void Room65::entry() {
 	}
 	_G(flags).LoadGame = true;
 	show_person();
-	switch_room(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
+	switchRoom(_G(spieler).PersonDiaTmpRoom[P_HOWARD]);
 }
 
 void Room65::xit() {
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index f8eb8e8112a..29d2ca2f385 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -52,19 +52,19 @@ void Room66::entry(int16 eib_nr) {
 		autoMove(9, P_CHEWY);
 		_G(SetUpScreenFunc) = setup_func;
 		startAadWait(403);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->showStaticSpr(14);
 		waitShowScreen(15);
 		_G(det)->hideStaticSpr(14);
 		startSetailWait(1, 1, ANI_FRONT);
 		load_chewy_taf(CHEWY_NORMAL);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
 		startAadWait(404);
 		startAadWait(415);
 		showCur();
-	} else if (!_G(flags).LoadGame && _G(spieler).PersonRoomNr[P_HOWARD] == 66) {
+	} else if (!_G(flags).LoadGame && _G(spieler)._personRoomNr[P_HOWARD] == 66) {
 		switch (eib_nr) {
 		case 96:
 			setPersonPos(488, 114, P_HOWARD, P_RIGHT);
@@ -90,23 +90,23 @@ void Room66::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	_G(atds)->set_steuer_bit(415, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->set_steuer_bit(417, ATS_AKTIV_BIT, ATS_DATA);
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 66)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 66)
 		return;
 
 	switch (eib_nr) {
 	case 98:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 69;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
+		_G(spieler)._personRoomNr[P_HOWARD] = 69;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 69;
 		break;
 
 	case 99:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 68;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 68;
+		_G(spieler)._personRoomNr[P_HOWARD] = 68;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 68;
 		break;
 
 	case 100:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 67;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 67;
+		_G(spieler)._personRoomNr[P_HOWARD] = 67;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 67;
 		break;
 
 	default:
@@ -184,7 +184,7 @@ int Room66::proc7() {
 	hideCur();
 	autoMove(7, P_CHEWY);
 	if (_G(spieler).flags26_10) {
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		invent_2_slot(92);
 		invent_2_slot(93);
 		invent_2_slot(94);
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 9d407444921..5c0beda9bfa 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -44,7 +44,7 @@ void Room67::entry() {
 	if (!_G(flags).LoadGame) {
 		hideCur();
 		setPersonPos(102, 132, P_CHEWY, P_RIGHT);
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 67) {
 			setPersonPos(12, 100, P_HOWARD, P_RIGHT);
 			setPersonPos(47, 106, P_NICHELLE, P_RIGHT);
 			goAutoXy(214, 112, P_NICHELLE, ANI_GO);
@@ -57,9 +57,9 @@ void Room67::entry() {
 void Room67::xit() {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 67) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 67) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 66;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 66;
 	}
 }
 
@@ -84,7 +84,7 @@ int16 Room67::use_grammo() {
 		autoMove(6, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->startDetail(0, 255, ANI_FRONT);
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 67)
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 67)
 			startAadWait(376);
 		else
 			startAadWait(614);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index dd77e8d7482..baf72c178f7 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -62,7 +62,7 @@ void Room68::entry() {
 	
 	if (!_G(flags).LoadGame) {
 		hideCur();
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 68) {
 			setPersonPos(524, 51, P_HOWARD, P_LEFT);
 			setPersonPos(550, 54, P_NICHELLE, P_LEFT);
 		}
@@ -73,9 +73,9 @@ void Room68::entry() {
 
 void Room68::xit() {
 	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 68) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 68) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 66;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 66;
 	}
 }
 
@@ -187,7 +187,7 @@ int16 Room68::use_indigo() {
 			hideCur();
 			autoMove(3, P_CHEWY);
 			auto_scroll(78, 0);
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			talk_indigo(394);
 			_G(cur_hide_flag) = false;
 			hideCur();
@@ -246,7 +246,7 @@ int16 Room68::use_papagei() {
 		hideCur();
 		action_flag = true;
 		_G(spieler).R68Papagei = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		autoMove(5, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
 		_G(det)->showStaticSpr(12);
@@ -285,7 +285,7 @@ int16 Room68::use_keeper() {
 	int16 action_flag = false;
 	if (is_cur_inventar(BAR_GUT_INV)) {
 		hideCur();
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		action_flag = true;
 		autoMove(2, P_CHEWY);
 		start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -304,7 +304,7 @@ int16 Room68::use_diva() {
 	int16 action_flag;
 	hideCur();
 	if (is_cur_inventar(B_MARY_INV)) {
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
 		_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
@@ -313,7 +313,7 @@ int16 Room68::use_diva() {
 		_G(spieler).R68Gutschein = false;
 		_G(det)->showStaticSpr(3);
 	} else if (is_cur_inventar(B_MARY2_INV)) {
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
 		_G(det)->hideStaticSpr(3);
@@ -351,14 +351,14 @@ void Room68::kostuem_aad(int16 aad_nr) {
 			_G(sndPlayer)->fadeOut(5);
 		
 		_G(SetUpScreenFunc) = nullptr;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		goAutoXy(150, -13, P_NICHELLE, ANI_WAIT);
-		_G(spieler).PersonHide[P_NICHELLE] = true;
+		_G(spieler)._personHide[P_NICHELLE] = true;
 		goAutoXy(161, 59, P_HOWARD, ANI_GO);
 		autoMove(4, P_CHEWY);
 		startAadWait(390);
 		startSetailWait(22, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_HOWARD] = true;
+		_G(spieler)._personHide[P_HOWARD] = true;
 		_G(det)->startDetail(27, 255, ANI_FRONT);
 
 		if (_G(spieler).DisplayText)
@@ -405,7 +405,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
 
 		g_engine->_sound->waitForSpeechToFinish();
 		
-		_G(spieler).PersonHide[P_HOWARD] = false;
+		_G(spieler)._personHide[P_HOWARD] = false;
 		_G(det)->stop_detail(27);
 		_G(det)->stop_detail(24);
 		_G(det)->showStaticSpr(13);
@@ -413,12 +413,12 @@ void Room68::kostuem_aad(int16 aad_nr) {
 		autoMove(1, P_CHEWY);
 		auto_scroll(216, 0);
 		_G(det)->hideStaticSpr(13);
-		_G(spieler).PersonHide[P_NICHELLE] = false;
+		_G(spieler)._personHide[P_NICHELLE] = false;
 		setPersonPos(150, -13, P_NICHELLE, P_RIGHT);
 
 		if (_G(spieler).DisplayText) {
 			_G(currentSong) = -1;
-			load_room_music(_G(spieler).PersonRoomNr[0]);
+			load_room_music(_G(spieler)._personRoomNr[0]);
 		}
 	}
 	showCur();
diff --git a/engines/chewy/rooms/room69.cpp b/engines/chewy/rooms/room69.cpp
index 67bb0ffd0c9..deb359c2c6a 100644
--- a/engines/chewy/rooms/room69.cpp
+++ b/engines/chewy/rooms/room69.cpp
@@ -65,9 +65,9 @@ void Room69::entry(int16 eib_nr) {
 void Room69::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 69 && eib_nr == 97) {
-		_G(spieler).PersonRoomNr[P_HOWARD] = 66;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 69 && eib_nr == 97) {
+		_G(spieler)._personRoomNr[P_HOWARD] = 66;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 66;
 	}
 }
 
@@ -96,25 +96,25 @@ int16 Room69::use_bruecke() {
 			goAutoXy(253, 103, P_CHEWY, ANI_WAIT);
 			goAutoXy(141, 103, P_CHEWY, ANI_WAIT);
 
-			if (_G(spieler).PersonRoomNr[P_NICHELLE] == 69)
+			if (_G(spieler)._personRoomNr[P_NICHELLE] == 69)
 				goAutoXy(255, 84, 2, ANI_GO);
 			
 			goAutoXy(82, 95, P_CHEWY, ANI_WAIT);
 			goAutoXy(46, 83, P_CHEWY, ANI_WAIT);
 
-			if (_G(spieler).PersonRoomNr[P_HOWARD] == 69) {
+			if (_G(spieler)._personRoomNr[P_HOWARD] == 69) {
 				goAutoXy(258, 86, P_HOWARD, ANI_GO);
 				goAutoXy(147, 84, P_NICHELLE, ANI_WAIT);
 				goAutoXy(140, 86, P_HOWARD, ANI_GO);
 				goAutoXy(94, 77, P_NICHELLE, ANI_WAIT);
 				goAutoXy(94, 82, P_HOWARD, ANI_GO);
 				goAutoXy(59, 68, P_NICHELLE, ANI_WAIT);
-				_G(spieler).PersonRoomNr[P_HOWARD] = 70;
-				_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
+				_G(spieler)._personRoomNr[P_HOWARD] = 70;
+				_G(spieler)._personRoomNr[P_NICHELLE] = 70;
 			}
 
 			_G(spieler_mi)[P_CHEWY].Mode = false;
-			switch_room(70);
+			switchRoom(70);
 		}
 		showCur();
 	}
@@ -131,7 +131,7 @@ void Room69::proc1() {
 	goAutoXy(94, 82, P_HOWARD, ANI_WAIT);
 	goAutoXy(94, 77, P_NICHELLE, ANI_GO);
 	goAutoXy(140, 86, P_HOWARD, ANI_WAIT);
-	goAutoXy(82, 95, P_CHEWY, _G(spieler).PersonRoomNr[P_HOWARD] == 69 ? ANI_GO : ANI_WAIT);
+	goAutoXy(82, 95, P_CHEWY, _G(spieler)._personRoomNr[P_HOWARD] == 69 ? ANI_GO : ANI_WAIT);
 	goAutoXy(147, 84, P_NICHELLE, ANI_GO);
 	goAutoXy(278, 86, P_HOWARD, ANI_WAIT);
 	goAutoXy(255, 84, P_NICHELLE, ANI_WAIT);
diff --git a/engines/chewy/rooms/room70.cpp b/engines/chewy/rooms/room70.cpp
index 0cfdc37e1d4..46dafe686b8 100644
--- a/engines/chewy/rooms/room70.cpp
+++ b/engines/chewy/rooms/room70.cpp
@@ -64,13 +64,13 @@ void Room70::entry(int16 eib_nr) {
 void Room70::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 70) {
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 70) {
 		if (eib_nr == 102) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 69;
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 69;
+			_G(spieler)._personRoomNr[P_HOWARD] = 69;
+			_G(spieler)._personRoomNr[P_NICHELLE] = 69;
 		} else if (eib_nr == 103 || eib_nr == 104) {
-			_G(spieler).PersonRoomNr[P_HOWARD] = 75;
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 75;
+			_G(spieler)._personRoomNr[P_HOWARD] = 75;
+			_G(spieler)._personRoomNr[P_NICHELLE] = 75;
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 17ada6f523f..671ce94a6ca 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -83,17 +83,17 @@ void Room71::entry(int16 eib_nr) {
 
 void Room71::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 71)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 71)
 		return;
 
 	switch (eib_nr) {
 	case 105:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 74;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 74;
+		_G(spieler)._personRoomNr[P_HOWARD] = 74;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 74;
 		break;
 	case 106:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 73;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 73;
+		_G(spieler)._personRoomNr[P_HOWARD] = 73;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 73;
 	default:
 		break;
 	}
@@ -179,9 +179,9 @@ int Room71::proc1() {
 				_G(spieler).R71Val2 = 1;
 		}
 	} else {
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		proc5(3);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	}
 
 	if (!_G(spieler).R71LeopardVined)
@@ -201,9 +201,9 @@ void Room71::proc2() {
 	_G(SetUpScreenFunc) = setup_func;
 	_G(flags).NoScroll = true;
 	auto_scroll(284, 0);
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(spieler).PersonHide[P_NICHELLE] = true;
-	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_HOWARD] = true;
 	proc5(5);
 	_G(det)->hideStaticSpr(2);
 	_G(det)->startDetail(5, 255, false);
@@ -215,9 +215,9 @@ void Room71::proc2() {
 	_G(det)->showStaticSpr(8);
 	_G(atds)->set_steuer_bit(442, ATS_AKTIV_BIT, ATS_DATA);
 	_G(atds)->set_steuer_bit(446, ATS_AKTIV_BIT, ATS_DATA);
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	_G(spieler).PersonHide[P_NICHELLE] = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_HOWARD] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(spieler).R71LeopardVined = true;
 	_G(flags).NoScroll = false;
 	_G(menu_item) = CUR_WALK;
@@ -230,11 +230,11 @@ void Room71::proc3() {
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(510, 34, P_NICHELLE, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
 	proc5(6);
-	_G(spieler).PersonHide[P_NICHELLE] = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 }
 
 void Room71::proc4() {
@@ -242,11 +242,11 @@ void Room71::proc4() {
 	_G(SetUpScreenFunc) = nullptr;
 	goAutoXy(518, 35, P_HOWARD, ANI_WAIT);
 	_G(SetUpScreenFunc) = setup_func;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(spieler).PersonHide[P_HOWARD] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_HOWARD] = true;
 	proc5(4);
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_HOWARD] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 }
 
 void Room71::proc5(int16 val) {
@@ -291,11 +291,11 @@ void Room71::proc7() {
 	goAutoXy(323, 28, P_NICHELLE, ANI_WAIT);
 	_G(flags).NoScroll = true;
 	auto_scroll(200, 0);
-	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
 	_G(det)->startDetail(7, 255, false);
 	startAadWait(624);
 	_G(det)->stop_detail(7);
-	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
 	_G(SetUpScreenFunc) = setup_func;
 	_G(flags).NoScroll = false;
 	startAadWait(432);
diff --git a/engines/chewy/rooms/room72.cpp b/engines/chewy/rooms/room72.cpp
index a8d31e338b3..473bbfbf885 100644
--- a/engines/chewy/rooms/room72.cpp
+++ b/engines/chewy/rooms/room72.cpp
@@ -90,15 +90,15 @@ void Room72::proc1(int16 flicNr) {
 	waitShowScreen(7);
 	startAadWait(437);
 	flic_cut(flicNr);
-	_G(spieler).PersonRoomNr[P_HOWARD] = 76;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 76;
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personRoomNr[P_HOWARD] = 76;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 76;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(det)->hideStaticSpr(0);
 	setupScreen(DO_SETUP);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
-	switch_room(76);
+	switchRoom(76);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index ae9b563a6f6..a4ddc8ac2a7 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -62,17 +62,17 @@ void Room73::entry(int16 eib_nr) {
 void Room73::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 73)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 73)
 		return;
 
 	switch (eib_nr) {
 	case 110:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 71;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 71;
+		_G(spieler)._personRoomNr[P_HOWARD] = 71;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 71;
 		break;
 	case 111:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 75;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 75;
+		_G(spieler)._personRoomNr[P_HOWARD] = 75;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 75;
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index 13239cfda29..f3e46ee9a04 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -69,17 +69,17 @@ void Room74::entry(int16 eib_nr) {
 void Room74::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 74)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 74)
 		return;
 
 	switch (eib_nr) {
 	case 112:
 	case 113:
-		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 72;
+		_G(spieler)._personRoomNr[P_HOWARD] = _G(spieler)._personRoomNr[P_NICHELLE] = 72;
 		break;
 
 	case 114:
-		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 71;
+		_G(spieler)._personRoomNr[P_HOWARD] = _G(spieler)._personRoomNr[P_NICHELLE] = 71;
 		break;
 
 	default:
@@ -95,10 +95,10 @@ int Room74::proc1() {
 		retVal = 1;
 		_G(spieler).R74CutRubberPlant = true;
 		autoMove(4, P_CHEWY);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(1, 1, ANI_FRONT);
 		setPersonPos(272, 116, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(det)->startDetail(0, 255, false);
 		_G(spieler).flags29_1 = true;
 		_G(atds)->set_ats_str(435, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room75.cpp b/engines/chewy/rooms/room75.cpp
index bfb24c73bee..a967023ba2d 100644
--- a/engines/chewy/rooms/room75.cpp
+++ b/engines/chewy/rooms/room75.cpp
@@ -65,18 +65,18 @@ void Room75::entry(int16 eib_nr) {
 void Room75::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 75)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 75)
 		return;
 
 	switch (eib_nr) {
 	case 115:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 73;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 73;
+		_G(spieler)._personRoomNr[P_HOWARD] = 73;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 73;
 		break;
 	case 116:
 	case 117:
-		_G(spieler).PersonRoomNr[P_HOWARD] = 70;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 70;
+		_G(spieler)._personRoomNr[P_HOWARD] = 70;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 70;
 		break;
 	default:
 		break;
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index 72d17d405ad..ebb46e23d4e 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -43,8 +43,8 @@ void Room76::entry() {
 
 	setPersonPos(308, 84, P_NICHELLE, P_RIGHT);
 	setPersonPos(365, 84, P_HOWARD, P_RIGHT);
-	_G(spieler).PersonHide[P_HOWARD] = true;
-	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_HOWARD] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
 
 	if (!_G(spieler).flags29_4) {
 		_G(atds)->del_steuer_bit(453, ATS_AKTIV_BIT, ATS_DATA);
@@ -148,7 +148,7 @@ void Room76::proc5() {
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
 	setPersonPos(30, 150, P_CHEWY, P_RIGHT);
-	switch_room(78);
+	switchRoom(78);
 }
 
 int Room76::proc6() {
@@ -156,7 +156,7 @@ int Room76::proc6() {
 
 	if (is_cur_inventar(93)) {
 		hideCur();
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).flags29_8 = true;
 		retVal = 1;
 		autoMove(3, P_CHEWY);
@@ -187,7 +187,7 @@ int Room76::proc7() {
 		hideCur();
 		autoMove(6, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		invent_2_slot(106);
 		invent_2_slot(105);
 		startAadWait(444);
@@ -211,7 +211,7 @@ int Room76::proc7() {
 		startAadWait(428);
 		showCur();
 		_G(spieler).flags29_80 = true;
-		switch_room(78);
+		switchRoom(78);
 	} else {
 		hideCur();
 		start_spz(CH_TALK12, 255, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 6a9583ac76c..3decca4f029 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -106,7 +106,7 @@ int Room77::proc2() {
 	int diaNr, aniId;
 	if (_G(spieler).flags29_8) {
 		start_spz_wait(14, 1, false, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(464, 1, 1);
 		_G(spieler).flags29_20 = true;
 		_G(spieler).flags29_40 = true;
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 0079ab77d81..e3ca9f58e84 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -35,9 +35,9 @@ void Room78::entry() {
 	g_engine->_sound->playSound(0, 1, false);
 	hideCur();
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonHide[P_CHEWY] = true;
-	_G(spieler).PersonHide[P_HOWARD] = true;
-	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_HOWARD] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
 	_G(spieler).scrollx = 320;
 	setPersonPos(0, 0, P_CHEWY, P_RIGHT);
 
@@ -124,15 +124,15 @@ void Room78::entry() {
 		}		
 	}
 
-	switch_room(destRoom);
+	switchRoom(destRoom);
 	showCur();
 }
 
 void Room78::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_HOWARD] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room79.cpp b/engines/chewy/rooms/room79.cpp
index 0c32eb2a29a..d9500b2a4c7 100644
--- a/engines/chewy/rooms/room79.cpp
+++ b/engines/chewy/rooms/room79.cpp
@@ -35,11 +35,11 @@ void Room79::entry() {
 	_G(spieler).ScrollxStep = 2;
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_G(spieler_mi)[P_NICHELLE].Mode = true;
-	_G(spieler).PersonHide[P_CHEWY] = false;
-	_G(spieler).PersonHide[P_HOWARD] = false;
-	_G(spieler).PersonHide[P_NICHELLE] = false;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 79;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 79;
+	_G(spieler)._personHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_HOWARD] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
+	_G(spieler)._personRoomNr[P_HOWARD] = 79;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 79;
 	if (!_G(flags).LoadGame) {
 		setPersonPos(459, 114, P_CHEWY, P_LEFT);
 		setPersonPos(568, 65, P_HOWARD, P_LEFT);
@@ -58,9 +58,9 @@ void Room79::entry() {
 void Room79::xit() {
 	_G(spieler).R79Val[P_CHEWY] = 1;
 	_G(spieler).R79Val[P_HOWARD] = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+	_G(spieler)._personRoomNr[P_HOWARD] = 80;
 	_G(spieler).R79Val[P_NICHELLE] = 1;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 80;
 }
 
 void Room79::setup_func() {
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 56839a7301d..8be549d71b4 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -124,19 +124,19 @@ void Room80::setup_func() {
 	
 	for (int i = P_CHEWY; i <= P_NICHELLE; ++i) {
 		if (_G(spieler).R79Val[i] != 0) {
-			_G(spieler).PersonHide[i] = false;
+			_G(spieler)._personHide[i] = false;
 			_G(spieler).R79Val[i] = 0;
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 80)
-		_G(spieler).PersonRoomNr[P_HOWARD] = nextRoom;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 80)
+		_G(spieler)._personRoomNr[P_HOWARD] = nextRoom;
 
-	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 80)
-		_G(spieler).PersonRoomNr[P_NICHELLE] = nextRoom;
+	if (_G(spieler)._personRoomNr[P_NICHELLE] == 80)
+		_G(spieler)._personRoomNr[P_NICHELLE] = nextRoom;
 
 	_G(flags).NoScroll = false;
-	switch_room(nextRoom);
+	switchRoom(nextRoom);
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index cc1a2c8dd76..441adada1d9 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -58,9 +58,9 @@ void Room81::entry() {
 void Room81::xit(int16 eib_nr) {
 	_G(spieler).R79Val[P_CHEWY] = 1;
 	_G(spieler).R79Val[P_HOWARD] = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 80;
+	_G(spieler)._personRoomNr[P_HOWARD] = 80;
 	_G(spieler).R79Val[P_NICHELLE] = 1;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 80;
 }
 
 void Room81::proc1() {
@@ -80,13 +80,13 @@ void Room81::proc1() {
 		goAutoXy(112, 60, P_CHEWY, ANI_WAIT);
 		startAadWait(461);
 		goAutoXy(143, 62, P_CHEWY, ANI_WAIT);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(0, 1, ANI_FRONT);
 		_G(det)->startDetail(1, 255, false);
 		startAadWait(459);
 		_G(det)->stop_detail(1);
 		startSetailWait(0, 1, ANI_GO);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
 		goAutoXy(100, 96, P_CHEWY, ANI_WAIT);
 		goAutoXy(222, 97, P_CHEWY, ANI_WAIT);
@@ -116,7 +116,7 @@ int Room81::proc2() {
 		start_spz_wait(13, 1, false, P_CHEWY);
 		aniId = 5;
 		diaNr = 462;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).flags30_2 = true;
 	} else if (is_cur_inventar(104)) {
 		aniId = 4;
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 0bcc6211aa2..79ec68ab87c 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -82,8 +82,8 @@ void Room82::xit(int16 eib_nr) {
 		_G(spieler).R79Val[P_CHEWY] = 1;
 		_G(spieler).R79Val[P_HOWARD] = 1;
 		_G(spieler).R79Val[P_NICHELLE] = 1;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+		_G(spieler)._personRoomNr[P_HOWARD] = 80;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 80;
 	}
 }
 
@@ -156,7 +156,7 @@ int Room82::proc3() {
 	_G(det)->set_static_ani(0, -1);
 	start_spz_wait(13, 1, false, P_CHEWY);
 
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	new_invent_2_cur(104);
 	showCur();
 
@@ -207,7 +207,7 @@ int Room82::proc6() {
 		Room66::proc8(2, 7, 7, 451);
 		_G(spieler).flags30_20 = true;
 		_G(spieler).flags37_20 = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		remove_inventory(105);
 		remove_inventory(106);
 	} else {
@@ -228,11 +228,11 @@ void Room82::proc8() {
 	while (_G(spieler_vector)[P_NICHELLE].Count != 0)
 		setupScreen(DO_SETUP);
 
-	_G(spieler).PersonHide[P_NICHELLE] = true;
+	_G(spieler)._personHide[P_NICHELLE] = true;
 	_G(det)->startDetail(10, 255, false);
 	startAadWait(625);
 	_G(det)->stop_detail(10);
-	_G(spieler).PersonHide[P_NICHELLE] = false;
+	_G(spieler)._personHide[P_NICHELLE] = false;
 	startAadWait(448);
 	_G(det)->del_static_ani(4);
 	startSetailWait(6, 2, ANI_FRONT);
@@ -245,9 +245,9 @@ int Room82::proc9() {
 		return 0;
 
 	autoMove(7, P_CHEWY);
-	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
-	switch_room(88);
+	_G(spieler)._personRoomNr[P_HOWARD] = 88;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 88;
+	switchRoom(88);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 5a751b06ff6..d602c667d83 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -119,13 +119,13 @@ void Room84::xit(int16 eib_nr) {
 		_G(spieler).R79Val[P_CHEWY] = 1;
 		_G(spieler).R79Val[P_HOWARD] = 1;
 		_G(spieler).R79Val[P_NICHELLE] = 1;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 80;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 80;
+		_G(spieler)._personRoomNr[P_HOWARD] = 80;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 80;
 	} else {
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 84)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 85;
-		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 84)
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 85;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 84)
+			_G(spieler)._personRoomNr[P_HOWARD] = 85;
+		if (_G(spieler)._personRoomNr[P_NICHELLE] == 84)
+			_G(spieler)._personRoomNr[P_NICHELLE] = 85;
 	}
 }
 
@@ -195,11 +195,11 @@ int Room84::proc4() {
 		_G(det)->stop_detail(7);
 		startSetailWait(8, 1, ANI_FRONT);
 	} else {
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 88;
 	}
 
-	_G(spieler).PersonRoomNr[P_HOWARD] = 88;
-	switch_room(88);
+	_G(spieler)._personRoomNr[P_HOWARD] = 88;
+	switchRoom(88);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 	showCur();
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 4f09511b173..3019fa9e8c9 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -97,7 +97,7 @@ void Room85::entry(int16 eib_nr) {
 		flic_cut(FCUT_089);
 		register_cutscene(25);
 
-		switch_room(84);
+		switchRoom(84);
 		showCur();
 	}
 }
@@ -105,18 +105,18 @@ void Room85::entry(int16 eib_nr) {
 void Room85::xit(int16 eib_nr) {
 	switch (eib_nr) {
 	case 126:
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 85)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 84;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 85)
+			_G(spieler)._personRoomNr[P_HOWARD] = 84;
 		
-		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 85)
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 84;
+		if (_G(spieler)._personRoomNr[P_NICHELLE] == 85)
+			_G(spieler)._personRoomNr[P_NICHELLE] = 84;
 		break;
 	case 127:
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 85)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 86;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 85)
+			_G(spieler)._personRoomNr[P_HOWARD] = 86;
 
-		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 85)
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 86;
+		if (_G(spieler)._personRoomNr[P_NICHELLE] == 85)
+			_G(spieler)._personRoomNr[P_NICHELLE] = 86;
 		break;
 	default:
 		break;
@@ -156,12 +156,12 @@ int Room85::proc2() {
 	autoMove(2, P_CHEWY);
 	_G(det)->stop_detail(1);
 	startSetailWait(2, 1, ANI_FRONT);
-	_G(spieler).PersonRoomNr[P_HOWARD] = 89;
+	_G(spieler)._personRoomNr[P_HOWARD] = 89;
 	cur_2_inventory();
 	remove_inventory(109);
 	remove_inventory(98);
 	remove_inventory(87);
-	switch_room(89);
+	switchRoom(89);
 	
 	showCur();
 	return 1;
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index b7207c3da28..fca8ac0502a 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -68,8 +68,8 @@ void Room86::entry(int16 eib_nr) {
 		_G(spieler).scrollx = 246;
 		_G(spieler).ScrollxStep = 8;
 		setPersonPos(443, 66, P_CHEWY, P_RIGHT);
-		_G(spieler).PersonRoomNr[P_HOWARD] = 84;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 0;
+		_G(spieler)._personRoomNr[P_HOWARD] = 84;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 0;
 		autoMove(2, P_CHEWY);
 		_G(flags).NoScroll = true;
 		_G(spieler.ScrollxStep = 2);
@@ -89,7 +89,7 @@ void Room86::entry(int16 eib_nr) {
 		_G(flags).NoScroll = false;
 		autoMove(0, P_CHEWY);
 		_G(spieler).flags32_20 = true;
-		switch_room(85);
+		switchRoom(85);
 		showCur();
 	}
 }
@@ -98,18 +98,18 @@ void Room86::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	switch (eib_nr) {
 	case 128:
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 86)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 85;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 86)
+			_G(spieler)._personRoomNr[P_HOWARD] = 85;
 		
-		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 86)
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 85;
+		if (_G(spieler)._personRoomNr[P_NICHELLE] == 86)
+			_G(spieler)._personRoomNr[P_NICHELLE] = 85;
 		break;
 	case 132:
-		if (_G(spieler).PersonRoomNr[P_HOWARD] == 86)
-			_G(spieler).PersonRoomNr[P_HOWARD] = 87;
+		if (_G(spieler)._personRoomNr[P_HOWARD] == 86)
+			_G(spieler)._personRoomNr[P_HOWARD] = 87;
 
-		if (_G(spieler).PersonRoomNr[P_NICHELLE] == 86)
-			_G(spieler).PersonRoomNr[P_NICHELLE] = 87;
+		if (_G(spieler)._personRoomNr[P_NICHELLE] == 86)
+			_G(spieler)._personRoomNr[P_NICHELLE] = 87;
 		break;
 	default:
 		break;
@@ -152,7 +152,7 @@ int Room86::proc2() {
 	_G(det)->startDetail(0, 255, false);
 	g_engine->_sound->playSound(0, 0);
 	g_engine->_sound->playSound(0);
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	autoMove(3, P_CHEWY);
 	proc3(true);
 	_G(atds)->del_steuer_bit(499, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 89dcd36d3ae..16f41665288 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -98,11 +98,11 @@ void Room87::xit(int16 eib_nr) {
 	goAutoXy(9, 53, P_CHEWY, ANI_WAIT);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	_G(spieler).ScrollxStep = 1;
-	if (_G(spieler).PersonRoomNr[P_HOWARD] == 87)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 86;
+	if (_G(spieler)._personRoomNr[P_HOWARD] == 87)
+		_G(spieler)._personRoomNr[P_HOWARD] = 86;
 
-	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 87)
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 86;
+	if (_G(spieler)._personRoomNr[P_NICHELLE] == 87)
+		_G(spieler)._personRoomNr[P_NICHELLE] = 86;
 }
 
 int Room87::proc2(int16 txt_nr) {
@@ -132,7 +132,7 @@ int Room87::proc2(int16 txt_nr) {
 		startAadWait(diaNr);
 	} else {
 		autoMove(movNr, P_CHEWY);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(atds)->set_ats_str(txt_nr, 1, ATS_DATA);
 		_G(det)->showStaticSpr(movNr);
@@ -170,7 +170,7 @@ int Room87::proc4() {
 	_G(spieler).PersonDiaRoom[P_HOWARD] = false;
 	_G(spieler).flags32_10 = true;
 
-	switch_room(86);
+	switchRoom(86);
 	showCur();
 	return 1;
 }
diff --git a/engines/chewy/rooms/room88.cpp b/engines/chewy/rooms/room88.cpp
index 369111227e4..bf0115f34db 100644
--- a/engines/chewy/rooms/room88.cpp
+++ b/engines/chewy/rooms/room88.cpp
@@ -49,10 +49,10 @@ void Room88::entry() {
 
 void Room88::xit() {
 	_G(spieler).flags31_8 = true;
-	_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).r88DestRoom;
+	_G(spieler)._personRoomNr[P_HOWARD] = _G(spieler).r88DestRoom;
 
-	if (_G(spieler).PersonRoomNr[P_NICHELLE] == 88)
-		_G(spieler).PersonRoomNr[P_NICHELLE] = _G(spieler).PersonRoomNr[P_HOWARD];
+	if (_G(spieler)._personRoomNr[P_NICHELLE] == 88)
+		_G(spieler)._personRoomNr[P_NICHELLE] = _G(spieler)._personRoomNr[P_HOWARD];
 }
 
 int Room88::proc1() {
@@ -61,7 +61,7 @@ int Room88::proc1() {
 
 	hideCur();
 	autoMove(0, P_CHEWY);
-	switch_room(_G(spieler).r88DestRoom);
+	switchRoom(_G(spieler).r88DestRoom);
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 	showCur();
@@ -106,7 +106,7 @@ int Room88::proc3() {
 			_G(out)->setPointer(nullptr);
 			_G(out)->cls();
 			_G(spieler).flags32_40 = true;
-			switch_room(84);
+			switchRoom(84);
 		} else {
 			startAadWait(465);
 		}
@@ -125,10 +125,10 @@ int Room88::proc3() {
 		_G(out)->cls();
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_088);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler).flags32_1 = true;
 		_G(out)->raster_col(0, 0, 0, 0);
-		switch_room(80);
+		switchRoom(80);
 		hideCur();
 		startSetailWait(1, 1, ANI_FRONT);
 		_G(out)->setPointer(nullptr);
@@ -137,10 +137,10 @@ int Room88::proc3() {
 		flic_cut(FCUT_086);
 		register_cutscene(24);
 
-		_G(spieler).PersonHide[P_CHEWY] = false;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 88;
-		_G(spieler).PersonRoomNr[P_NICHELLE] = 88;
-		switch_room(88);
+		_G(spieler)._personHide[P_CHEWY] = false;
+		_G(spieler)._personRoomNr[P_HOWARD] = 88;
+		_G(spieler)._personRoomNr[P_NICHELLE] = 88;
+		switchRoom(88);
 		_G(spieler).r88DestRoom = 84;
 		_G(spieler).R88UsedMonkey = true;
 		_G(spieler).flags32_1 = false;
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index af64253fd5f..d2424671ebc 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -57,7 +57,7 @@ void Room89::entry() {
 		_G(spieler).flags35_2 = false;
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 537;
-		switch_room(92);
+		switchRoom(92);
 		startAadWait(490);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
@@ -69,7 +69,7 @@ void Room89::entry() {
 		flic_cut(FCUT_118);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 538;
-		switch_room(92);
+		switchRoom(92);
 		showCur();
 	} else if (_G(spieler).flags35_4) {
 		// End sequence
@@ -175,7 +175,7 @@ int Room89::proc2() {
 	_G(spieler).flags33_2 = true;
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 489;
-	switch_room(92);
+	switchRoom(92);
 	startAadWait(490);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
@@ -185,7 +185,7 @@ int Room89::proc2() {
 
 	_G(spieler).SVal1 = 89;
 	_G(spieler).SVal2 = 487;
-	switch_room(92);
+	switchRoom(92);
 	showCur();
 
 	return 1;
@@ -228,7 +228,7 @@ int Room89::proc5() {
 		Room66::proc8(-1, 2, 3, 486);
 		_G(spieler).SVal1 = 89;
 		_G(spieler).SVal2 = 488;
-		switch_room(92);
+		switchRoom(92);
 		showCur();
 	}
 	
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 17e9790604e..8a544d50cae 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -36,7 +36,7 @@ void Room90::entry(int16 eib_nr) {
 	_G(spieler_mi)[P_HOWARD].Mode = true;
 	_delay = 0;
 	_G(SetUpScreenFunc) = setup_func;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 90;
+	_G(spieler)._personRoomNr[P_HOWARD] = 90;
 	_G(zoom_horizont) = 150;
 	_G(flags).ZoomMov = true;
 	_G(zoom_mov_fak) = 4;
@@ -85,8 +85,8 @@ void Room90::entry(int16 eib_nr) {
 		_G(det)->startDetail(0, 1, false);
 		startSetailWait(1, 1, ANI_FRONT);
 		_G(spieler).flags33_10 = true;
-		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
-		switch_room(91);
+		_G(spieler)._personRoomNr[P_HOWARD] = 91;
+		switchRoom(91);
 
 	} else if (!_G(spieler).flags33_20) {
 		startAadWait(499);
@@ -107,9 +107,9 @@ void Room90::entry(int16 eib_nr) {
 void Room90::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 	if (eib_nr == 134)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 91;
+		_G(spieler)._personRoomNr[P_HOWARD] = 91;
 	else if (eib_nr == 135)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 56;
+		_G(spieler)._personRoomNr[P_HOWARD] = 56;
 }
 
 void Room90::setup_func() {
@@ -158,7 +158,7 @@ void Room90::setup_func() {
 		}
 	}
 
-	if (_G(spieler).PersonRoomNr[P_HOWARD] != 90 || _G(HowardMov) == 1)
+	if (_G(spieler)._personRoomNr[P_HOWARD] != 90 || _G(HowardMov) == 1)
 		return;
 
 	calc_person_look();
@@ -187,7 +187,7 @@ void Room90::proc2() {
 	_G(flags).AutoAniPlay = true;
 	int diaNr = -1;
 
-	switch (_G(spieler).PersonRoomNr[0]) {
+	switch (_G(spieler)._personRoomNr[0]) {
 	case 46:
 		diaNr = 496;
 		break;
@@ -284,7 +284,7 @@ int Room90::shootControlUnit() {
 		return 0;
 
 	hideCur();
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	_G(HowardMov) = 2;
 	_G(flags).ZoomMov = false;
 	autoMove(5, P_CHEWY);
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 4ea9f603c45..68c6fde6e92 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -62,7 +62,7 @@ void Room91::entry() {
 		_G(spieler).SVal3 = 0;
 		_G(spieler).flags34_4 = true;
 		startAadWait(502);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(det)->startDetail(0, 255, false);
 
 		for (int i = 0; i < 3; ++i) {
@@ -80,7 +80,7 @@ void Room91::xit(int16 eib_nr) {
 	_G(spieler).scrollx = 0;
 
 	if (eib_nr == 136)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 90;
+		_G(spieler)._personRoomNr[P_HOWARD] = 90;
 
 	_G(spieler).flags34_4 = false;
 	_G(flags).NoScroll = false;
@@ -125,18 +125,18 @@ void Room91::setup_func() {
 		showCur();
 		if (_G(spieler).SVal3 == 4) {
 			_G(det)->stop_detail(0);
-			_G(spieler).PersonHide[P_CHEWY] = false;
+			_G(spieler)._personHide[P_CHEWY] = false;
 			hideCur();
 			autoMove(1, P_CHEWY);
 			stop_spz();
 			startAadWait(505);
-			_G(spieler).PersonHide[P_HOWARD] = true;
+			_G(spieler)._personHide[P_HOWARD] = true;
 			startSetailWait(9, 1, ANI_FRONT);
-			_G(spieler).PersonHide[P_HOWARD] = false;
-			_G(spieler).PersonRoomNr[P_HOWARD] = 50;
+			_G(spieler)._personHide[P_HOWARD] = false;
+			_G(spieler)._personRoomNr[P_HOWARD] = 50;
 			_G(spieler).flags34_4 = false;
 			showCur();
-			switch_room(50);
+			switchRoom(50);
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room92.cpp b/engines/chewy/rooms/room92.cpp
index 999570f8bcf..b3b7b50d429 100644
--- a/engines/chewy/rooms/room92.cpp
+++ b/engines/chewy/rooms/room92.cpp
@@ -45,7 +45,7 @@ void Room92::entry() {
 		_G(out)->cls();
 		_G(spieler).scrollx = oldScrollX;
 		show_person();
-		switch_room(_G(spieler).SVal1);
+		switchRoom(_G(spieler).SVal1);
 		break;
 	case 488:
 		_G(flags).StaticUseTxt = true;
@@ -65,23 +65,23 @@ void Room92::entry() {
 		flic_cut(FCUT_103);
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
-		_G(spieler).PersonRoomNr[P_HOWARD] = 46;
+		_G(spieler)._personRoomNr[P_HOWARD] = 46;
 		_G(spieler).flags33_8 = true;
 		show_person();
-		switch_room(46);
+		switchRoom(46);
 		break;
 	case 538:
 		_G(flags).StaticUseTxt = true;
 		flic_cut(FCUT_106);
 		show_person();
-		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+		_G(spieler)._personRoomNr[P_HOWARD] = 94;
 		_G(spieler).flags35_8 = true;
-		switch_room(94);
+		switchRoom(94);
 		break;
 	default:
 		show_person();
 		_G(spieler).scrollx = oldScrollX;
-		switch_room(_G(spieler).SVal1);
+		switchRoom(_G(spieler).SVal1);
 		break;
 	}
 	_G(spieler).SVal2 = 5000;
diff --git a/engines/chewy/rooms/room93.cpp b/engines/chewy/rooms/room93.cpp
index ef4a5e56156..501acce4fee 100644
--- a/engines/chewy/rooms/room93.cpp
+++ b/engines/chewy/rooms/room93.cpp
@@ -62,11 +62,11 @@ void Room93::entry() {
 
 	_G(spieler).flags35_40 = true;
 	show_person();
-	switch_room(94);
+	switchRoom(94);
 }
 
 void Room93::xit() {
-	_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+	_G(spieler)._personRoomNr[P_HOWARD] = 94;
 	_G(spieler).scrollx = _G(spieler).r94Scrollx;
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index c08aff93899..de538ab45ca 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -61,7 +61,7 @@ void Room94::entry() {
 		_G(fx_blend) = BLEND_NONE;
 		Room66::proc8(2, 3, 0, 539);
 		_G(spieler).r94Scrollx = _G(spieler).scrollx;
-		switch_room(93);
+		switchRoom(93);
 		return;
 	}
 
@@ -98,7 +98,7 @@ void Room94::entry() {
 
 void Room94::xit() {
 	_G(spieler).ScrollxStep = 1;
-	_G(spieler).PersonRoomNr[P_HOWARD] = 95;
+	_G(spieler)._personRoomNr[P_HOWARD] = 95;
 }
 
 void Room94::setup_func() {
@@ -120,7 +120,7 @@ void Room94::setup_func() {
 
 void Room94::gedAction(int index) {
 	if (!index && !_G(spieler).flags35_10)
-		switch_room(93);
+		switchRoom(93);
 }
 
 void Room94::talk1() {
@@ -136,7 +136,7 @@ int Room94::giveGhostBottle() {
 	hideCur();
 	autoMove(2, P_CHEWY);
 	auto_scroll(216, 0);
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	_G(flags).NoPalAfterFlc = true;
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index e9e3eb222ce..003e1fc0aa3 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -59,9 +59,9 @@ void Room95::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (eib_nr == 139)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 94;
+		_G(spieler)._personRoomNr[P_HOWARD] = 94;
 	else if (eib_nr == 140)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 96;
+		_G(spieler)._personRoomNr[P_HOWARD] = 96;
 }
 
 void Room95::setup_func() {
@@ -91,7 +91,7 @@ int Room95::proc2() {
 	hideCur();
 	autoMove(3, P_CHEWY);
 	if (is_cur_inventar(113)) {
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(spieler).flags35_20 = true;
@@ -112,8 +112,8 @@ int Room95::proc2() {
 		_G(flags).NoPalAfterFlc = true;
 		flic_cut(FCUT_133);
 		register_cutscene(33);
-		_G(spieler).PersonRoomNr[P_HOWARD] = 97;
-		switch_room(97);
+		_G(spieler)._personRoomNr[P_HOWARD] = 97;
+		switchRoom(97);
 	} else {
 		start_spz(CH_TALK1, 255, false, P_CHEWY);
 		startAadWait(548);
diff --git a/engines/chewy/rooms/room96.cpp b/engines/chewy/rooms/room96.cpp
index be49c03a1b0..024f5333142 100644
--- a/engines/chewy/rooms/room96.cpp
+++ b/engines/chewy/rooms/room96.cpp
@@ -53,7 +53,7 @@ void Room96::xit(int16 eib_nr) {
 	_G(spieler).ScrollxStep = 1;
 
 	if (eib_nr == 141)
-		_G(spieler).PersonRoomNr[P_HOWARD] = 95;
+		_G(spieler)._personRoomNr[P_HOWARD] = 95;
 }
 
 void Room96::setup_func() {
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 7c0f1d087a0..d6a0502f96e 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -51,7 +51,7 @@ void Room97::entry() {
 	_G(spieler).ZoomXy[P_HOWARD][1] = 42;
 
 	_bool18DB32 = false;
-	_G(spieler).PersonRoomNr[P_NICHELLE] = 97;
+	_G(spieler)._personRoomNr[P_NICHELLE] = 97;
 	_G(zoom_mov_fak) = 0;
 	_G(spieler).ScrollxStep = 2;
 	_G(det)->hideStaticSpr(14);
@@ -109,14 +109,14 @@ void Room97::entry() {
 		_G(out)->setPointer(nullptr);
 		_G(out)->cls();
 
-		_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
+		_G(spieler)._personRoomNr[P_HOWARD] = _G(spieler)._personRoomNr[P_NICHELLE] = 89;
 		_G(spieler).SVal2 = 0;
 		_G(spieler).flags35_4 = true;
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(19, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		showCur();
-		switch_room(89);
+		switchRoom(89);
 	} else {
 		_G(spieler).scrollx = 800;
 		setPersonPos(1067, 98, P_CHEWY, P_LEFT);
@@ -398,7 +398,7 @@ int Room97::proc5() {
 	_G(spieler).scrollx = 720;
 	setPersonPos(822, 98, P_CHEWY, P_LEFT);
 	setPersonPos(861, 81, P_HOWARD, P_LEFT);
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	_G(det)->showStaticSpr(21);
 	_G(spieler).flags35_80 = true;
 	startAadWait(546);
@@ -452,7 +452,7 @@ int Room97::proc7() {
 	hideCur();
 	autoMove(2, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	_G(det)->hideStaticSpr(17);
 	startSetailWait(22, 1, ANI_FRONT);
 	_G(atds)->set_steuer_bit(538, ATS_AKTIV_BIT, ATS_DATA);
@@ -460,7 +460,7 @@ int Room97::proc7() {
 	new_invent_2_cur(SLIME_INV);
 	_G(spieler).flags36_4 = true;
 	setPersonPos(304, 102, P_CHEWY, P_RIGHT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	autoMove(1, P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 
@@ -482,7 +482,7 @@ int Room97::proc8() {
 	else {
 		start_spz_wait(14, 1, false, P_CHEWY);
 		_G(det)->startDetail(11, 255, false);
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(spieler).flags36_10 = true;
 		_G(spieler).flags36_8 = false;
 		_G(det)->startDetail(12, 255, false);
@@ -601,7 +601,7 @@ int Room97::proc11() {
 		_G(spieler).SVal2 = 523;
 		cur_2_inventory();
 		_G(spieler).flags37_8 = true;
-		switch_room(92);
+		switchRoom(92);
 		showCur(); // probably useless, but present in the original
 	}
 
@@ -624,11 +624,11 @@ void Room97::proc12() {
 	stopPerson(P_CHEWY);
 	_G(det)->showStaticSpr(26);
 	goAutoXy(481, 39, P_CHEWY, ANI_WAIT);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	setPersonPos(327, 42, P_CHEWY, P_LEFT);
 	waitShowScreen(50);
 	setPersonPos(347, 42, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	_G(det)->hideStaticSpr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
 	showCur();
@@ -644,11 +644,11 @@ void Room97::proc13() {
 	stopPerson(P_CHEWY);
 	_G(spieler_mi)[P_CHEWY].Mode = true;
 	_G(det)->showStaticSpr(26);
-	_G(spieler).PersonHide[P_CHEWY] = true;
+	_G(spieler)._personHide[P_CHEWY] = true;
 	setPersonPos(508, 41, P_CHEWY, P_LEFT);
 	waitShowScreen(50);
 	setPersonPos(488, 41, P_CHEWY, P_LEFT);
-	_G(spieler).PersonHide[P_CHEWY] = false;
+	_G(spieler)._personHide[P_CHEWY] = false;
 	autoMove(6, P_CHEWY);
 	_G(det)->hideStaticSpr(26);
 	_G(spieler_mi)[P_CHEWY].Mode = false;
@@ -662,7 +662,7 @@ int Room97::throwSlime() {
 
 	_slimeThrown = true;
 	hideCur();
-	del_inventar(_G(spieler).AkInvent);
+	delInventory(_G(spieler).AkInvent);
 	_G(menu_item) = CUR_USE;
 	cursorChoice(CUR_USE);
 	
@@ -684,7 +684,7 @@ void Room97::sensorAnim() {
 	
 	while (_G(det)->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
-		if (_G(minfo).button == 1 || _G(in)->get_switch_code() == 28) {
+		if (_G(minfo)._button == 1 || _G(in)->get_switch_code() == 28) {
 			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
@@ -697,17 +697,17 @@ void Room97::sensorAnim() {
 	if (!_slimeThrown) {
 		startSetailWait(17, 1, ANI_FRONT);
 		_G(det)->startDetail(16, 1, true);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(20, 1, false);
 		setPersonPos(318, 42, P_CHEWY, P_LEFT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 	} else {
 		_G(spieler).flags37_4 = true;
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(det)->showStaticSpr(27);
-		_G(spieler).PersonHide[P_CHEWY] = true;
+		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(21, 1, ANI_FRONT);
-		_G(spieler).PersonHide[P_CHEWY] = false;
+		_G(spieler)._personHide[P_CHEWY] = false;
 		_G(det)->hideStaticSpr(27);
 		startSetailWait(18, 1, ANI_FRONT);
 
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index aaca779d517..0f6e5ba09c7 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -151,7 +151,7 @@ void spriteEngine() {
 			break;
 
 		case ZOBJ_CHEWY:
-			if (!_G(spieler).PersonHide[P_CHEWY]) {
+			if (!_G(spieler)._personHide[P_CHEWY]) {
 				if (!_G(spz_ani)[P_CHEWY]) {
 					int16 sprNr = _G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr];
 					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(chewy_kor)[sprNr * 2] - _G(spieler).scrollx;
@@ -185,7 +185,7 @@ void spriteEngine() {
 		case ZOBJ_HOWARD:
 		case ZOBJ_NICHELLE: {
 			int16 personNr = _G(z_obj_sort)[min_zeiger].ObjArt - 6;
-			if (!_G(spieler).PersonHide[personNr]) {
+			if (!_G(spieler)._personHide[personNr]) {
 				int16 sprNr;
 				if (!_G(spz_ani)[personNr]) {
 					ts_info = _G(PersonTaf)[personNr];
@@ -203,7 +203,7 @@ void spriteEngine() {
 			}
 			break;
 		case ZOBJ_PROGANI:
-			_G(out)->sprite_set(_G(spr_info)[nr].Image, _G(spr_info)[nr].X - _G(spieler).scrollx, _G(spr_info)[nr].Y - _G(spieler).scrolly, 0);
+			_G(out)->sprite_set(_G(spr_info)[nr]._image, _G(spr_info)[nr]._x - _G(spieler).scrollx, _G(spr_info)[nr]._y - _G(spieler).scrolly, 0);
 			break;
 
 		case ZOBJ_AUTO_OBJ: {
@@ -214,7 +214,7 @@ void spriteEngine() {
 			          _G(mov_phasen)[nr].ZoomFak,
 			          _G(mov_phasen)[nr].ZoomFak,
 			          &_G(auto_mov_vector)[nr]);
-			_G(out)->scale_set(_G(room_blk).DetImage[sprNr],
+			_G(out)->scale_set(_G(room_blk)._detImage[sprNr],
 			                _G(auto_mov_vector)[nr].Xypos[0] + cxy[0] - _G(spieler).scrollx,
 			                _G(auto_mov_vector)[nr].Xypos[1] + cxy[1] - _G(spieler).scrolly,
 			                _G(auto_mov_vector)[nr].Xzoom,
@@ -233,7 +233,7 @@ void calc_z_ebene() {
 	_G(z_count) = 0;
 
 	for (int16 i = 0; i < MAX_PERSON; i++) {
-		if (_G(spieler).PersonRoomNr[P_CHEWY + i] == _G(spieler).PersonRoomNr[P_CHEWY] &&
+		if (_G(spieler)._personRoomNr[P_CHEWY + i] == _G(spieler)._personRoomNr[P_CHEWY] &&
 		        _G(spieler_mi)[P_CHEWY + i].Id != NO_MOV_OBJ) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_CHEWY + i;
 			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spieler_vector)[P_CHEWY + i].Xypos[1] +
@@ -269,10 +269,10 @@ void calc_z_ebene() {
 	}
 
 	for (int16 i = 0; i < MAX_PROG_ANI; i++) {
-		if (_G(spr_info)[i].ZEbene < 200) {
+		if (_G(spr_info)[i]._zLevel < 200) {
 			_G(z_obj_sort)[_G(z_count)].ObjArt = ZOBJ_PROGANI;
 			_G(z_obj_sort)[_G(z_count)].ObjNr = i;
-			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spr_info)[i].ZEbene;
+			_G(z_obj_sort)[_G(z_count)].ObjZ = _G(spr_info)[i]._zLevel;
 			++_G(z_count);
 		}
 	}
@@ -290,8 +290,8 @@ void calc_z_ebene() {
 int16 mouse_on_prog_ani() {
 	int16 aniNr = -1;
 	for (int16 i = 0; i < MAX_PROG_ANI && aniNr == -1; i++) {
-		if (_G(minfo).x >= _G(spr_info)[i].X && _G(minfo).x <= _G(spr_info)[i].X1 &&
-		        _G(minfo).y >= _G(spr_info)[i].Y && _G(minfo).y <= _G(spr_info)[i].Y1) {
+		if (_G(minfo).x >= _G(spr_info)[i]._x && _G(minfo).x <= _G(spr_info)[i].X1 &&
+		        _G(minfo).y >= _G(spr_info)[i]._y && _G(minfo).y <= _G(spr_info)[i].Y1) {
 			aniNr = i;
 		}
 	}
@@ -308,7 +308,7 @@ void setPersonPos(int16 x, int16 y, int16 personNr, int16 direction) {
 	_G(spieler_mi)[personNr].XyzStart[1] = y;
 	_G(spieler_vector)[personNr].Count = 0;
 	_G(spieler_vector)[personNr].Delay = _G(spieler).DelaySpeed;
-	_G(spieler_vector)[personNr].DelayCount = 0;
+	_G(spieler_vector)[personNr]._delayCount = 0;
 	calc_zoom(_G(spieler_mi)[personNr].XyzStart[1],
 	          _G(spieler).ZoomXy[personNr][0],
 	          _G(spieler).ZoomXy[personNr][1],
@@ -464,7 +464,7 @@ void startAadWait(int16 diaNr) {
 	}
 
 	_G(maus_links_click) = oldMouseLinksClick;
-	if (_G(minfo).button)
+	if (_G(minfo)._button)
 		_G(flags).main_maus_flag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	stop_spz();
@@ -521,7 +521,7 @@ bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 		_G(flags).AtsText = false;
 	}
 
-	if (_G(minfo).button)
+	if (_G(minfo)._button)
 		_G(flags).main_maus_flag = 1;
 
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
@@ -543,7 +543,7 @@ void aadWait(int16 strNr) {
 		}
 	}
 	_G(maus_links_click) = oldMouseLinksClick;
-	if (_G(minfo).button)
+	if (_G(minfo)._button)
 		_G(flags).main_maus_flag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
@@ -616,7 +616,7 @@ void init_auto_obj(int16 auto_nr, const int16 *phasen, int16 lines, const MovLin
 
 	_G(auto_mov_vector)[auto_nr].Count = 0;
 	_G(auto_mov_vector)[auto_nr].StNr = 0;
-	_G(auto_mov_vector)[auto_nr].DelayCount = 0;
+	_G(auto_mov_vector)[auto_nr]._delayCount = 0;
 	new_auto_line(auto_nr);
 }
 
@@ -665,7 +665,7 @@ int16 mouse_auto_obj(int16 nr, int16 xoff, int16 yoff) {
 	if (_G(mov_phasen)[nr].Start == 1) {
 		int16 spr_nr = _G(mov_phasen)[nr].Phase[_G(auto_mov_vector)[nr].Phase][0] +
 		               _G(auto_mov_vector)[nr].PhNr;
-		int16 *xy = (int16 *)_G(room_blk).DetImage[spr_nr];
+		int16 *xy = (int16 *)_G(room_blk)._detImage[spr_nr];
 		int16 *Cxy = _G(room_blk).DetKorrekt + (spr_nr << 1);
 
 		if (!xoff) {
@@ -717,10 +717,10 @@ void calc_zoom(int16 y, int16 zoomFactorX, int16 zoomFactorY, ObjMov *om) {
 void mov_objekt(ObjMov *om, MovInfo *mi) {
 	int16 u_index = 0;
 
-	if (om->DelayCount > 0)
-		--om->DelayCount;
+	if (om->_delayCount > 0)
+		--om->_delayCount;
 	else {
-		om->DelayCount = om->Delay;
+		om->_delayCount = om->Delay;
 		if (om->Count > 0) {
 
 			--om->Count;
@@ -1069,7 +1069,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		_G(spieler_vector)[p_nr].PhNr = 0;
 		_G(spieler_vector)[p_nr].PhAnz = spr_anz;
 		_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
-		_G(spieler_vector)[p_nr].DelayCount = 0;
+		_G(spieler_vector)[p_nr]._delayCount = 0;
 		_G(spz_count) = count;
 		_G(flags).MausLinks = true;
 		ret = true;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 431682816eb..0775d36e10b 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -84,11 +84,11 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 294:
-						switch_room(46);
+						switchRoom(46);
 						break;
 
 					case 299:
-						switch_room(59);
+						switchRoom(59);
 						break;
 
 					case 302:
@@ -143,9 +143,9 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 
 					case 73:
 						if (!_G(spieler).R9Gitter) {
-							_G(spieler).PersonHide[P_CHEWY] = true;
+							_G(spieler)._personHide[P_CHEWY] = true;
 							startSetailWait(5, 1, ANI_FRONT);
-							_G(spieler).PersonHide[P_CHEWY] = false;
+							_G(spieler)._personHide[P_CHEWY] = false;
 						} else {
 							retValue = false;
 						}
@@ -187,7 +187,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 92:
-						retValue = Room13::monitor_knopf();
+						retValue = Room13::monitor_button();
 						break;
 
 					case 104:
@@ -216,7 +216,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 114:
-						switch_room(_G(spieler).R23GleiterExit);
+						switchRoom(_G(spieler).R23GleiterExit);
 						break;
 
 					case 117:
@@ -288,7 +288,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 							_G(det)->hideStaticSpr(19);
 							_G(atds)->set_steuer_bit(158, ATS_AKTIV_BIT, ATS_DATA);
 						}
-						switch_room(18);
+						switchRoom(18);
 						break;
 
 					case 174:
@@ -434,7 +434,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 					case 286:
 					case 292:
 					case 293:
-						Room47::use_knopf(txtNr);
+						Room47::use_button(txtNr);
 						break;
 
 					case 288:
@@ -442,7 +442,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 294:
-						switch_room(46);
+						switchRoom(46);
 						break;
 
 					case 295:
@@ -782,11 +782,11 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 100:
-						Room13::jmp_boden();
+						Room13::jmp_floor();
 						break;
 
 					case 114:
-						switch_room(_G(spieler).R23GleiterExit);
+						switchRoom(_G(spieler).R23GleiterExit);
 						break;
 
 					case 227:
@@ -794,7 +794,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 294:
-						switch_room(46);
+						switchRoom(46);
 						break;
 
 					case 340:
@@ -1197,9 +1197,9 @@ void adsAction(int16 diaNr, int16 blkNr, int16 strEndNr) {
 
 		case 20:
 			if (blkNr == 0 && strEndNr == 1) {
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				startSetailWait(28, 3, ANI_FRONT);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 			}
 			break;
 
@@ -1777,7 +1777,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 			break;
 
 		case P_NICHELLE:
-			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+			switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 			case 28:
 				START_STOP(diaNr - 194);
 				break;
@@ -2124,11 +2124,11 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
 
 		case 3:
 			if (mode == AAD_STR_START) {
-				_G(spieler).PersonHide[P_CHEWY] = true;
+				_G(spieler)._personHide[P_CHEWY] = true;
 				talkAni = 29;
 			} else {
 				_G(det)->stop_detail(29);
-				_G(spieler).PersonHide[P_CHEWY] = false;
+				_G(spieler)._personHide[P_CHEWY] = false;
 			}
 			break;
 
@@ -2181,7 +2181,7 @@ void calc_inv_use_txt(int16 test_nr) {
 			SHOULD_QUIT_RETURN;
 		}
 
-		_G(room)->load_tgp(_G(spieler).PersonRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
+		_G(room)->load_tgp(_G(spieler)._personRoomNr[P_CHEWY], &_G(room_blk), EPISODE1_TGP, GED_LOAD, EPISODE1);
 
 		_G(spieler).scrollx = scrollx;
 		_G(spieler).scrolly = scrolly;
@@ -2189,7 +2189,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case ANGEL_INV:
 	case KNOCHEN_INV:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(_G(menu_item));
 		ret = del_invent_slot(test_nr);
@@ -2207,7 +2207,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case MESSER_INV:
 		if (_G(spieler).AkInvent == 40) {
-			del_inventar(_G(spieler).AkInvent);
+			delInventory(_G(spieler).AkInvent);
 			_G(menu_item) = CUR_USE;
 			cursorChoice(_G(menu_item));
 			invent_2_slot(K_MASKE_INV);
@@ -2215,12 +2215,12 @@ void calc_inv_use_txt(int16 test_nr) {
 			invent_2_slot(K_KERNE_INV);
 		} else if (_G(spieler).AkInvent == 88) {
 			_G(spieler).flags26_10 = true;
-			startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350);
+			startAadWait(_G(spieler)._personRoomNr[P_CHEWY] + 350);
 		}
 		break;
 
 	case BRIEF_INV:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(_G(menu_item));
 		_G(spieler).R42BriefMarke = true;
@@ -2230,7 +2230,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		break;
 
 	case FLASCHE_INV:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(_G(menu_item));
 		// fall through
@@ -2243,7 +2243,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case B_MARY_INV:
 	case PIRANHA_INV:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(_G(menu_item));
 		ret = del_invent_slot(test_nr);
@@ -2255,7 +2255,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(spieler).flags26_10 = true;
 		_G(flags).InventMenu = false;
 		start_spz(CH_TALK6, 255, false, P_CHEWY);
-		startAadWait(_G(spieler).PersonRoomNr[P_CHEWY] + 350);
+		startAadWait(_G(spieler)._personRoomNr[P_CHEWY] + 350);
 		_G(flags).InventMenu = true;
 		_G(atds)->set_ats_str(88, 1, INV_ATS_DATA);
 		break;
@@ -2268,7 +2268,7 @@ void calc_inv_use_txt(int16 test_nr) {
 
 	case 102:
 	case 104:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(CUR_USE);
 
@@ -2278,7 +2278,7 @@ void calc_inv_use_txt(int16 test_nr) {
 		break;
 
 	case 105:
-		del_inventar(_G(spieler).AkInvent);
+		delInventory(_G(spieler).AkInvent);
 		_G(atds)->set_ats_str(105, 0, 1, 6);
 		_G(menu_item) = CUR_USE;
 		cursorChoice(CUR_USE);
@@ -2386,11 +2386,11 @@ int16 calc_person_txt(int16 p_nr) {
 
 	switch (p_nr) {
 	case P_CHEWY:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		case 40:
 		case 41:
 		case 42:
-			txt_nr = 219 + _G(spieler).PersonRoomNr[P_CHEWY];
+			txt_nr = 219 + _G(spieler)._personRoomNr[P_CHEWY];
 			break;
 
 		default:
@@ -2403,7 +2403,7 @@ int16 calc_person_txt(int16 p_nr) {
 	case P_HOWARD:
 		switch (_G(menu_item)) {
 		case CUR_USE:
-			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+			switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 			case 40:
 				if (!_G(spieler).R40HoUse && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 					_G(menu_item) = CUR_HOWARD;
@@ -2433,7 +2433,7 @@ int16 calc_person_txt(int16 p_nr) {
 			break;
 
 		case CUR_LOOK:
-			return (_G(spieler).PersonRoomNr[P_CHEWY] == 89) ? 513 : -1;
+			return (_G(spieler)._personRoomNr[P_CHEWY] == 89) ? 513 : -1;
 
 		default:
 			break;
@@ -2442,7 +2442,7 @@ int16 calc_person_txt(int16 p_nr) {
 
 	case P_NICHELLE:
 		if (_G(menu_item) == CUR_USE) {
-			switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+			switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 			case 67:
 			case 71:
 				_G(menu_item) = CUR_NICHELLE;
@@ -2476,7 +2476,7 @@ int16 calc_person_click(int16 p_nr) {
 			break;
 
 		case CIGAR_INV:
-			if (_G(spieler).PersonRoomNr[P_CHEWY] == 49) {
+			if (_G(spieler)._personRoomNr[P_CHEWY] == 49) {
 				Room49::use_boy_cigar();
 				action_ret = true;
 			}
@@ -2497,7 +2497,7 @@ int16 calc_person_click(int16 p_nr) {
 	case P_HOWARD:
 		switch (_G(spieler).AkInvent) {
 		case GALA_INV:
-			if (_G(spieler).PersonRoomNr[P_CHEWY] == 67) {
+			if (_G(spieler)._personRoomNr[P_CHEWY] == 67) {
 				Room67::kostuem_aad(378);
 				action_ret = true;
 			}
@@ -2512,10 +2512,10 @@ int16 calc_person_click(int16 p_nr) {
 	case P_NICHELLE:
 		switch (_G(spieler).AkInvent) {
 		case GALA_INV:
-			if (_G(spieler).PersonRoomNr[P_CHEWY] == 67) {
+			if (_G(spieler)._personRoomNr[P_CHEWY] == 67) {
 				Room67::kostuem_aad(377);
 				action_ret = true;
-			} else if (_G(spieler).PersonRoomNr[P_CHEWY] == 68) {
+			} else if (_G(spieler)._personRoomNr[P_CHEWY] == 68) {
 				Room68::kostuem_aad(387);
 				action_ret = true;
 			}
@@ -2544,7 +2544,7 @@ void calc_person_dia(int16 p_nr) {
 	switch (p_nr) {
 	case P_HOWARD:
 	case P_NICHELLE:
-		switch (_G(spieler).PersonRoomNr[P_CHEWY]) {
+		switch (_G(spieler)._personRoomNr[P_CHEWY]) {
 		case 28:
 			if (p_nr == P_HOWARD) {
 				if (_G(spieler).ChewyAni != CHEWY_ROCKER)
@@ -2764,12 +2764,12 @@ void calc_person_dia(int16 p_nr) {
 		} else {
 			_G(room_blk).AadLoad = false;
 			_G(room_blk).AtsLoad = false;
-			_G(spieler).PersonDiaTmpRoom[p_nr] = _G(spieler).PersonRoomNr[P_CHEWY];
+			_G(spieler).PersonDiaTmpRoom[p_nr] = _G(spieler)._personRoomNr[P_CHEWY];
 			save_person_rnr();
 
 			if (p_nr == P_HOWARD) {
 				_G(spieler).PersonDiaRoom[P_CHEWY] = true;
-				switch_room(65);
+				switchRoom(65);
 				_G(spieler).PersonDiaRoom[P_CHEWY] = false;
 
 			} else if (p_nr == P_NICHELLE) {
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 7b0397016e9..78e3fdea3db 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -82,8 +82,8 @@ bool Spieler::synchronize(Common::Serializer &s) {
 	syncArray(s, X, MAX_PERSON);
 	syncArray(s, Y, MAX_PERSON);
 	syncArray(s, Phase, MAX_PERSON);
-	syncArray(s, PersonHide, MAX_PERSON);
-	syncArray(s, PersonRoomNr, MAX_PERSON);
+	syncArray(s, _personHide, MAX_PERSON);
+	syncArray(s, _personRoomNr, MAX_PERSON);
 	syncArray(s, &ZoomXy[0][0], MAX_PERSON * 2);
 	s.syncAsSint16LE(ChewyAni);
 	syncArray(s, PersonGlobalDia, MAX_PERSON);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 7d1fca32f50..57bb390ce69 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -415,8 +415,8 @@ struct Spieler : public SpielerFlags {
 	int16 X[MAX_PERSON] = { 0 };
 	int16 Y[MAX_PERSON] = { 0 };
 	int16 Phase[MAX_PERSON] = { 0 };
-	int16 PersonHide[MAX_PERSON] = { 0 };
-	int16 PersonRoomNr[MAX_PERSON] = { 0 };
+	int16 _personHide[MAX_PERSON] = { 0 };
+	int16 _personRoomNr[MAX_PERSON] = { 0 };
 	int16 ZoomXy[MAX_PERSON][2] = { 0 };
 	int16 PersonGlobalDia[MAX_PERSON] = { 0 };
 	int16 PersonDia[MAX_PERSON] = { 0 };
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index e84856be483..ed1f4f04440 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -94,7 +94,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 
 		// Clear any pending keys
 		_G(in)->_hotkey = 0;
-		_G(kbinfo).key_code = '\0';
+		_G(kbinfo)._keyCode = '\0';
 		_G(kbinfo).scan_code = 0;
 	}
 
@@ -179,7 +179,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		case 171:
 		case 266:
 		case 370:
-			_G(atds)->stop_aad();
+			_G(atds)->stopAad();
 			break;
 		default:
 			break;


Commit: 23c5a4ce3e1386e1cf7ba1d9679fbe43c963c7dc
    https://github.com/scummvm/scummvm/commit/23c5a4ce3e1386e1cf7ba1d9679fbe43c963c7dc
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:37:16-08:00

Commit Message:
CHEWY: More renaming

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/atds.h
    engines/chewy/cursor.cpp
    engines/chewy/defines.h
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/credits.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/effect.cpp
    engines/chewy/globals.h
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/main.h
    engines/chewy/mcga_graphics.cpp
    engines/chewy/mcga_graphics.h
    engines/chewy/menus.cpp
    engines/chewy/menus.h
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room05.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room09.cpp
    engines/chewy/rooms/room11.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room14.cpp
    engines/chewy/rooms/room16.cpp
    engines/chewy/rooms/room17.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room21.cpp
    engines/chewy/rooms/room22.cpp
    engines/chewy/rooms/room25.cpp
    engines/chewy/rooms/room28.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room31.cpp
    engines/chewy/rooms/room32.cpp
    engines/chewy/rooms/room35.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room41.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room52.cpp
    engines/chewy/rooms/room53.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room55.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room62.cpp
    engines/chewy/rooms/room63.cpp
    engines/chewy/rooms/room66.cpp
    engines/chewy/rooms/room67.cpp
    engines/chewy/rooms/room68.cpp
    engines/chewy/rooms/room74.cpp
    engines/chewy/rooms/room76.cpp
    engines/chewy/rooms/room77.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room86.cpp
    engines/chewy/rooms/room87.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room94.cpp
    engines/chewy/rooms/room95.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/t_event.cpp
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index fea1d30921c..90151b17be0 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -578,7 +578,7 @@ DisplayMode &Atdsys::ats_get_status() {
 void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 	if (_atsv._display == DISPLAY_TXT || _atsv._display == DISPLAY_ALL) {
 		if (_atdsv._eventsEnabled) {
-			switch (_G(in)->get_switch_code()) {
+			switch (_G(in)->getSwitchCode()) {
 			case Common::KEYCODE_ESCAPE:
 			case Common::KEYCODE_RETURN:
 			case MAUS_LINKS:
@@ -922,7 +922,7 @@ void Atdsys::stopAad() {
 void Atdsys::print_aad(int16 scrx, int16 scry) {
 	if (_aadv.Dialog) {
 		if (_atdsv._eventsEnabled) {
-			switch (_G(in)->get_switch_code()) {
+			switch (_G(in)->getSwitchCode()) {
 			case Common::KEYCODE_ESCAPE:
 			case Common::KEYCODE_RETURN:
 			case MAUS_LINKS:
@@ -1063,7 +1063,7 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 	}
 }
 
-int16 Atdsys::aad_get_status() {
+int16 Atdsys::aadGetStatus() {
 	return _aadv.StrNr;
 }
 
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 0fb03a137a7..ee56d84a619 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -295,7 +295,7 @@ public:
 	int16 start_aad(int16 dia_nr);
 	void stopAad();
 	void print_aad(int16 scrx, int16 scry);
-	int16 aad_get_status();
+	int16 aadGetStatus();
 	void set_string_end_func(void (*str_func)(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode));
 	void aad_search_dia(int16 dia_nr, char **ptr);
 	int16 aad_get_zeilen(char *str, int16 *txt_len);
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 12329bee153..41fad002aa9 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -67,7 +67,7 @@ void Cursor::plot_cur() {
 				_aniCount = _ani->_start;
 		}
 
-		_out->sprite_set(_curblk->sprite[_aniCount], _cur_x_old, _cur_y_old,
+		_out->spriteSet(_curblk->sprite[_aniCount], _cur_x_old, _cur_y_old,
 		                 _scrWidth);
 		mouse_active = false;
 	}
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 9e2ad7b5756..b0e99a0e0ae 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -75,10 +75,10 @@ enum SetupScreenMode {
 #define CUR_NO_USE 10
 #define CUR_NO_LOOK 11
 #define CUR_NO_TALK 12
-#define CUR_AUSGANG_LINKS 13
-#define CUR_AUSGANG_RECHTS 14
-#define CUR_AUSGANG_OBEN 15
-#define CUR_AUSGANG_UNTEN 16
+#define CUR_EXIT_LEFT 13
+#define CUR_EXIT_RIGHT 14
+#define CUR_EXIT_TOP 15
+#define CUR_EXIT_BOTTOM 16
 #define CUR_USER 17
 
 #define CUR_DISK 18
@@ -86,10 +86,10 @@ enum SetupScreenMode {
 #define CUR_ZEIGE 20
 #define CUR_NICHELLE 21
 #define CUR_22 22
-#define AUSGANG_LINKS_SPR 26
-#define AUSGANG_RECHTS_SPR 27
-#define AUSGANG_OBEN_SPR 28
-#define AUSGANG_UNTEN_SPR 29
+#define EXIT_LEFT_SPR 26
+#define EXIT_RIGHT_SPR 27
+#define EXIT_ABOVE_SPR 28
+#define EXIT_BOTTOM_SPR 29
 
 #define MENU_X 26
 #define MENU_Y 21
@@ -111,7 +111,7 @@ enum SetupScreenMode {
 #define INV_ATS_MODE 0
 #define INV_USE_ATS_MODE 1
 
-#define WIN_INVENTAR WIN_INF_X,WIN_INF_Y,18,11,60,1
+#define WIN_INVENTORY WIN_INF_X,WIN_INF_Y,18,11,60,1
 #define WIN_TEST 24,36,2,8,60,0
 #define WIN_LOOK WIN_LOOK_X,WIN_LOOK_Y,10,6,60,1
 #define WIN_LOOK2 WIN_LOOK_X+4,WIN_LOOK_Y+4,3,3,60,0
@@ -132,7 +132,7 @@ enum SetupScreenMode {
 #define ANI_GO 1
 #define MAX_PROG_ANI 10
 
-#define INVENTAR_NORMAL 0
+#define INVENTORY_NORMAL 0
 
 #define INVENTORY_STATIC 1
 #define STATIC_USE 2
@@ -142,10 +142,10 @@ enum SetupScreenMode {
 #define DETAIL_OBJ 5
 #define SPIELER_OBJ 6
 
-#define CURSOR "misc/cursor.taf"
-#define INVENTAR "misc/inventar.taf"
-#define INVENTAR_IIB "misc/inventar.iib"
-#define INVENTAR_SIB "misc/inventar.sib"
+#define CURSOR_TAF "misc/cursor.taf"
+#define INVENTORY_TAF "misc/inventar.taf"
+#define INVENTORY_IIB "misc/inventar.iib"
+#define INVENTORY_SIB "misc/inventar.sib"
 #define EXIT_EIB "misc/exit.eib"
 #define CHEWY_TAF "misc/ch_walk.taf"
 #define CHEWY_BO_TAF "misc/ch_bork.taf"
@@ -398,7 +398,7 @@ enum SetupScreenMode {
 #define FOOD_CERTIFICATE_INV 101
 #define DIARY_INV 109
 
-#define SIB_SCHLEIM 3
+#define SIB_SLIME 3
 
 #define NO_MOV_OBJ 127
 #define CHEWY_OBJ 255
@@ -573,20 +573,18 @@ enum SetupScreenMode {
 #define FCUT_154 154 // Red space ship being chased (custom callback: flic_user_function)
 #define FCUT_155 155 // Intro logos (German)
 #define FCUT_156 156 // Red space ship entering black hole (custom callback: flic_user_function)
-#define FCUT_157 157 // Red space ship travelling inside black hole (custom callback: flic_user_function)
+#define FCUT_157 157 // Red space ship traveling inside black hole (custom callback: flic_user_function)
 #define FCUT_158 158 // Howard and Chewy waking up
 #define FCUT_159 159 // Credits
 #define FCUT_160 160 // Intro logos (English)
 
-#define AUSGANG_LINKS 1
-#define AUSGANG_RECHTS 2
-#define AUSGANG_OBEN 3
-#define AUSGANG_UNTEN 4
-#define WAIT_TASTE_LOS while (_G(in)->get_switch_code() != 0 \
+#define EXIT_LEFT 1
+#define EXIT_RIGHT 2
+#define EXIT_TOP 3
+#define EXIT_BOTTOM 4
+#define WAIT_TASTE_LOS while (_G(in)->getSwitchCode() != 0 \
 	&& !SHOULD_QUIT) { g_events->update(); }
 
-#define FILEMENUE 1
-
 } // namespace Chewy
 
 #endif
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 1d40baad9c8..b502af22beb 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -497,7 +497,7 @@ void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 			int16 x = _rdi.Sinfo[i].x - scrx;
 			int16 y = _rdi.Sinfo[i].y - scry;
 			byte *simage = _rdi.dptr->_image[_rdi.Sinfo[i].SprNr];
-			_G(out)->sprite_set(simage, x, y, 0);
+			_G(out)->spriteSet(simage, x, y, 0);
 		}
 	}
 }
@@ -579,7 +579,7 @@ SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 	_sprInfo.X1 = _sprInfo._x + Xy[0];
 	_sprInfo.Y1 = _sprInfo._y + Xy[1];
 	if (mode)
-		_G(out)->sprite_set(_sprInfo._image, _sprInfo._x, _sprInfo._y, 0);
+		_G(out)->spriteSet(_sprInfo._image, _sprInfo._x, _sprInfo._y, 0);
 
 	Sound *sound = g_engine->_sound;
 
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index 2e27a00246c..cae7ab12496 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -77,7 +77,7 @@ void Cinema::execute() {
 				int yp = i * 10 + 68;
 
 				if (i == selected)
-					_G(out)->box_fill(37, yp, 308, yp + 10, 42);
+					_G(out)->boxFill(37, yp, 308, yp + 10, 42);
 				_G(out)->printxy(40, yp, 14, 300, 0, csName);
 			}
 		} else {
@@ -207,7 +207,7 @@ void Cinema::execute() {
 }
 
 int16 Cinema::cut_serv(int16 frame) {
-	if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
+	if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
 		_G(sndPlayer)->stopMod();
 		g_engine->_sound->stopAllSounds();
 		return -1;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 7f7086f2527..28e0177e1c4 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -217,7 +217,7 @@ void Credits::execute() {
 	_G(spieler).DelaySpeed = 2;
 
 	for (;;) {
-		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || SHOULD_QUIT)
+		if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE || SHOULD_QUIT)
 			break;
 
 		// Display the starfield background
@@ -229,7 +229,7 @@ void Credits::execute() {
 		if (++_G(spieler).scrollx >= 320)
 			_G(spieler).scrollx = 0;
 
-		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
+		if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE)
 			break;
 
 		++lineScrolled;
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index b8bc9e327c7..1172ba2e223 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -104,12 +104,12 @@ int16 Files::execute(bool isInGame) {
 			if (visibility[j]) {
 				if (!mode[j])
 					// Not pressed
-					_G(out)->sprite_set(
+					_G(out)->spriteSet(
 						ti->_image[i], 16 + ti->_correction[i << 1] + pt[j].x,
 						76 + ti->_correction[(i << 1) + 1] + pt[j].y, 0);
 				else
 					// Pressed
-					_G(out)->sprite_set(ti->_image[i], 16 + ti->_correction[i << 1],
+					_G(out)->spriteSet(ti->_image[i], 16 + ti->_correction[i << 1],
 						76 + ti->_correction[(i << 1) + 1], 0);
 			}
 		}
@@ -122,13 +122,13 @@ int16 Files::execute(bool isInGame) {
 				_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, slot.c_str());
 				_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
 			} else {
-				_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
+				_G(out)->boxFill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
 				_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, slot.c_str());
 				_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
 			}
 		}
 
-		key = _G(in)->get_switch_code();
+		key = _G(in)->getSwitchCode();
 
 		if (mode[SCROLL_UP])
 			--mode[SCROLL_UP];
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 008ae46fdeb..5de0e5aadec 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -52,11 +52,11 @@ int Inventory::keyVal;
 
 void Inventory::plot_menu() {
 	_G(out)->setPointer(_G(workptr));
-	build_menu(WIN_INVENTAR);
+	buildMenu(WIN_INVENTORY);
 
 	for (int16 j = 0; j < 3; j++) {
 		for (int16 i = 0; i < 5; i++)
-			_G(out)->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
+			_G(out)->boxFill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
 				WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
 	}
 
@@ -64,7 +64,7 @@ void Inventory::plot_menu() {
 	int16 k = _G(in)->mouseVector(_G(minfo).x, _G(minfo).y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
 	if (k != -1) {
 		if (k < 5)
-			_G(out)->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
+			_G(out)->boxFill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
 				INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
 		else {
 			int16 x = (_G(minfo).x - (WIN_INF_X)) / 54;
@@ -72,13 +72,13 @@ void Inventory::plot_menu() {
 			k = x + (y * 5);
 			k += _G(spieler).InventY * 5;
 			if (k < (_G(spieler).InventY + 3) * 5)
-				_G(out)->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
+				_G(out)->boxFill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
 					WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
 		}
 	}
 
 	if (inv_rand_x != -1) {
-		_G(out)->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
+		_G(out)->boxFill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
 			WIN_INF_X + 14 + inv_rand_x * 54 + 40, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24, 41);
 		_G(out)->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
 			WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
@@ -98,12 +98,12 @@ void Inventory::plot_menu() {
 			y = 3;
 		else
 			y = 0;
-		_G(out)->sprite_set(_G(curtaf)->_image[_G(ani_count)[i]],
+		_G(out)->spriteSet(_G(curtaf)->_image[_G(ani_count)[i]],
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
 	for (int16 i = 0; i < 2; i++) {
-		_G(out)->sprite_set(_G(menutaf)->_image[PFEIL_UP + i],
+		_G(out)->spriteSet(_G(menutaf)->_image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
@@ -116,7 +116,7 @@ void Inventory::plot_menu() {
 				x1 /= 2;
 				int16 y1 = 24 - xy[1];
 				y1 /= 2;
-				_G(out)->sprite_set(_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
+				_G(out)->spriteSet(_G(inv_spr)[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
 					x1 + WIN_INF_X + 14 + i * 54,
 					y1 + y + 32 * j, _G(scr_width));
 			}
@@ -146,7 +146,7 @@ void Inventory::menu() {
 		cursorChoice(CUR_USE);
 	}
 
-	int16 menu_flag1 = MENU_EINBLENDEN;
+	int16 menu_flag1 = MENU_DISPLAY;
 	int16 taste_flag = 28;
 	_G(kbinfo)._keyCode = '\0';
 	bool mouseFl = true;
@@ -225,7 +225,7 @@ void Inventory::menu() {
 								del_invent_slot(_G(spieler).InventSlot[k]);
 							}
 						} else if (_G(spieler).InventSlot[k] != -1)
-							evaluateObj(_G(spieler).InventSlot[k], INVENTAR_NORMAL);
+							evaluateObj(_G(spieler).InventSlot[k], INVENTORY_NORMAL);
 						else {
 							_G(spieler).InventSlot[k] = _G(spieler).AkInvent;
 							_G(obj)->sort();
@@ -268,7 +268,7 @@ void Inventory::menu() {
 		}
 
 		ret_look = -1;
-		int16 abfrage = _G(in)->get_switch_code();
+		int16 abfrage = _G(in)->getSwitchCode();
 		_G(cur)->hide_cur();
 
 		if (taste_flag) {
@@ -287,7 +287,7 @@ void Inventory::menu() {
 			case Common::KEYCODE_ESCAPE:
 				if (!menuFirstFl) {
 					_G(cur)->show_cur();
-					while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
+					while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
 						setupScreen(NO_SETUP);
 						inv_rand_x = -1;
 						inv_rand_y = -1;
@@ -296,8 +296,8 @@ void Inventory::menu() {
 						_G(out)->back2screen(_G(workpage));
 					}
 				} else {
-					if (menu_flag1 != MENU_EINBLENDEN) {
-						menu_flag1 = MENU_AUSBLENDEN;
+					if (menu_flag1 != MENU_DISPLAY) {
+						menu_flag1 = MENU_HIDE;
 						_G(show_invent_menu) = false;
 					}
 				}
@@ -345,7 +345,7 @@ void Inventory::menu() {
 			setupScreen(NO_SETUP);
 			_G(cur)->move(_G(minfo).x, _G(minfo).y);
 			_G(cur)->show_cur();
-			if (menu_flag1 != MENU_AUSBLENDEN) {
+			if (menu_flag1 != MENU_HIDE) {
 				inv_rand_x = -1;
 				inv_rand_y = -1;
 				plot_menu();
@@ -353,9 +353,9 @@ void Inventory::menu() {
 			if (menu_flag1 == false)
 				_G(cur)->plot_cur();
 			_G(out)->setPointer(nullptr);
-			if (menu_flag1 == MENU_EINBLENDEN) {
+			if (menu_flag1 == MENU_DISPLAY) {
 				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 0, 300);
-			} else if (menu_flag1 == MENU_AUSBLENDEN)
+			} else if (menu_flag1 == MENU_HIDE)
 				_G(fx)->blende1(_G(workptr), _G(screen0), nullptr, 200, 1, 300);
 			menu_flag1 = false;
 			_G(out)->setClip(0, 0, 320, 200);
@@ -368,7 +368,7 @@ void Inventory::menu() {
 	_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
 	_G(minfo).x = _G(maus_old_x);
 	_G(minfo).y = _G(maus_old_y);
-	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
+	while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		setupScreen(NO_SETUP);
 		_G(cur)->plot_cur();
 		_G(out)->back2screen(_G(workpage));
@@ -507,7 +507,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		if (txt_anz > txt_zeilen) {
 			if (txt_start > 0) {
 				if (rect == 6)
-					_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
+					_G(out)->boxFill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
 						WIN_INF_Y + 136 + 14, 41);
 				c[0] = 24;
 				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
@@ -516,7 +516,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 
 			if (txt_start < txt_anz - txt_zeilen) {
 				if (rect == 7)
-					_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
+					_G(out)->boxFill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
 						WIN_INF_Y + 156 + 14, 41);
 				c[0] = 25;
 				_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, _G(scr_width), c);
@@ -535,7 +535,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 		SHOULD_QUIT_RETURN0;
 	}
 
-	while (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
+	while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
 		setupScreen(NO_SETUP);
 		plot_menu();
 		_G(cur)->plot_cur();
@@ -553,7 +553,7 @@ void Inventory::look_screen(int16 txt_mode, int16 txt_nr) {
 	if (!_G(flags).AtsAction) {
 		if (txt_nr != -1) {
 			switch (txt_mode) {
-			case INVENTAR_NORMAL:
+			case INVENTORY_NORMAL:
 			case INVENTORY_STATIC:
 				ok = true;
 				switch (_G(menu_item)) {
@@ -656,11 +656,11 @@ void Inventory::showDiary() {
 	_G(out)->setPointer(nullptr);
 	_G(fx)->blende1(_G(workptr), _G(screen0), _G(pal), 150, 0, 0);
 
-	while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
+	while (_G(in)->getSwitchCode() != Common::KEYCODE_ESCAPE) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
-	while (_G(in)->get_switch_code() != Common::KEYCODE_INVALID) {
+	while (_G(in)->getSwitchCode() != Common::KEYCODE_INVALID) {
 		g_events->update();
 		SHOULD_QUIT_RETURN;
 	}
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 5eecf4bc822..8c75647faa6 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -135,7 +135,7 @@ void MainMenu::execute() {
 void MainMenu::screenFunc() {
 	int vec = _G(det)->maus_vector(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 
-	if (_G(in)->get_switch_code() == 28 || _G(minfo)._button == 1) {
+	if (_G(in)->getSwitchCode() == 28 || _G(minfo)._button == 1) {
 		_selection = vec;
 	}
 }
@@ -177,14 +177,14 @@ int16 MainMenu::creditsFn(int16 key) {
 		key == 128 || key == 165 || key == 185 ||
 		key == 211 || key == 248 || key == 266) {
 		for (int idx = 0; idx < 2000; ++idx) {
-			if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
+			if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE)
 				return -1;
 			g_events->update();
 		}
 		return 0;
 
 	} else {
-		return _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
+		return _G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	}
 }
 
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index bff87afc40d..090c436b739 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -89,64 +89,64 @@ void Options::execute(TafInfo *ti) {
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
-		_G(out)->sprite_set(ti->_image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
+		_G(out)->spriteSet(ti->_image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
 			8 + ti->_correction[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
-		_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
+		_G(out)->boxFill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
 		Common::String fps = Common::String::format("%d", _G(spieler).FramesPerSecond << 1);
 		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, fps.c_str());
 
 		if (_G(spieler).SoundSwitch) {
-			_G(out)->sprite_set(ti->_image[mund_ani],
+			_G(out)->spriteSet(ti->_image[mund_ani],
 				18 + ti->_correction[mund_ani << 1],
 				8 + ti->_correction[(mund_ani << 1) + 1], 0);
-			_G(out)->sprite_set(ti->_image[SCHNULL_OFF],
+			_G(out)->spriteSet(ti->_image[SCHNULL_OFF],
 				18 + ti->_correction[SCHNULL_OFF << 1],
 				8 + ti->_correction[(SCHNULL_OFF << 1) + 1], 0);
 		} else {
-			_G(out)->sprite_set(ti->_image[SCHNULLER],
+			_G(out)->spriteSet(ti->_image[SCHNULLER],
 				18 + ti->_correction[SCHNULLER << 1],
 				8 + ti->_correction[(SCHNULLER << 1) + 1], 0);
-			_G(out)->sprite_set(ti->_image[SCHNULL_BAND],
+			_G(out)->spriteSet(ti->_image[SCHNULL_BAND],
 				18 + ti->_correction[SCHNULL_BAND << 1],
 				8 + ti->_correction[(SCHNULL_BAND << 1) + 1], 0);
 		}
 		_G(out)->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
 		_G(out)->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
-		_G(out)->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
+		_G(out)->boxFill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
 
 		_G(out)->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
 		_G(out)->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
-		_G(out)->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
+		_G(out)->boxFill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
 		if (_G(spieler).MusicSwitch) {
-			_G(out)->sprite_set(ti->_image[MUSIC_ON1],
+			_G(out)->spriteSet(ti->_image[MUSIC_ON1],
 				18 + ti->_correction[MUSIC_ON1 << 1],
 				8 + ti->_correction[(MUSIC_ON1 << 1) + 1], 0);
-			_G(out)->sprite_set(ti->_image[MUSIC_ON2],
+			_G(out)->spriteSet(ti->_image[MUSIC_ON2],
 				18 + ti->_correction[MUSIC_ON2 << 1],
 				8 + ti->_correction[(MUSIC_ON2 << 1) + 1], 0);
 		} else
-			_G(out)->sprite_set(ti->_image[MUSIC_OFF],
+			_G(out)->spriteSet(ti->_image[MUSIC_OFF],
 				18 + ti->_correction[MUSIC_OFF << 1],
 				8 + ti->_correction[(MUSIC_OFF << 1) + 1], 0);
 
 		if (_G(spieler).DisplayText) {
-			_G(out)->sprite_set(ti->_image[tdisp_ani],
+			_G(out)->spriteSet(ti->_image[tdisp_ani],
 				18 + ti->_correction[tdisp_ani << 1],
 				8 + ti->_correction[(tdisp_ani << 1) + 1], 0);
-			_G(out)->sprite_set(ti->_image[TDISP_EIN],
+			_G(out)->spriteSet(ti->_image[TDISP_EIN],
 				18 + ti->_correction[TDISP_EIN << 1],
 				8 + ti->_correction[(TDISP_EIN << 1) + 1], 0);
 		} else
-			_G(out)->sprite_set(ti->_image[TDISP_AUS],
+			_G(out)->spriteSet(ti->_image[TDISP_AUS],
 				18 + ti->_correction[TDISP_AUS << 1],
 				8 + ti->_correction[(TDISP_AUS << 1) + 1], 0);
 
-		_G(out)->sprite_set(ti->_image[EXIT],
+		_G(out)->spriteSet(ti->_image[EXIT],
 			18 + ti->_correction[EXIT << 1],
 			8 + ti->_correction[(EXIT << 1) + 1], 0);
 
-		key = _G(in)->get_switch_code();
+		key = _G(in)->getSwitchCode();
 		if ((_G(minfo)._button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
 
diff --git a/engines/chewy/effect.cpp b/engines/chewy/effect.cpp
index aea85366f9a..011965a28c2 100644
--- a/engines/chewy/effect.cpp
+++ b/engines/chewy/effect.cpp
@@ -41,7 +41,7 @@ void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 				x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
 			else
 				x = rnd_zeiger[i] * 8;
-			_G(out)->box_fill(x, y, x + 8, y + 8, col);
+			_G(out)->boxFill(x, y, x + 8, y + 8, col);
 		}
 		_G(out)->setPalette(palette);
 	}
@@ -55,7 +55,7 @@ void Effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
 		_G(out)->setPointer(sram_speicher);
 		_G(out)->sprite_save(sp, x, y, 8, 8, 0);
 		_G(out)->setPointer(screen);
-		_G(out)->sprite_set(sp, x, y, 0);
+		_G(out)->spriteSet(sp, x, y, 0);
 	}
 	free(sp);
 }
@@ -67,13 +67,13 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 		for (i = 0; i < 13; i++) {
 			int16 x, y, x1;
 			for (x = i; x < 39 - i; x++)
-				_G(out)->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
+				_G(out)->boxFill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
 			for (y = i; y < 24 - i; y++)
-				_G(out)->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
+				_G(out)->boxFill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
 			for (x1 = 39 - i; x1 > i; x1--)
-				_G(out)->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
+				_G(out)->boxFill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
 			for (int16 y1 = 24 - i; y1 >= i; y1--)
-				_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
+				_G(out)->boxFill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
 		}
 		_G(out)->setPalette(palette);
 	}
@@ -85,25 +85,25 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
+				_G(out)->spriteSet(sp, x * 8, i * 8, 0);
 			}
 			for (y = i; y < 24 - i; y++) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
+				_G(out)->spriteSet(sp, x * 8, y * 8, 0);
 			}
 			for (x1 = 39 - i; x1 > i; x1--) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
+				_G(out)->spriteSet(sp, x1 * 8, y * 8, 0);
 			}
 			for (int16 y1 = 24 - i; y1 > i; y1--) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
+				_G(out)->spriteSet(sp, x1 * 8, y1 * 8, 0);
 			}
 		}
 		break;
@@ -115,25 +115,25 @@ void Effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x * 8, i * 8, 0);
+				_G(out)->spriteSet(sp, x * 8, i * 8, 0);
 			}
 			for (y = i; y < 24 - i; y++) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x * 8, y * 8, 0);
+				_G(out)->spriteSet(sp, x * 8, y * 8, 0);
 			}
 			for (x1 = 39 - i; x1 > i; x1--) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
+				_G(out)->spriteSet(sp, x1 * 8, y * 8, 0);
 			}
 			for (int16 y1 = 24 - i; y1 > i; y1--) {
 				_G(out)->setPointer(sram_speicher);
 				_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
 				_G(out)->setPointer(screen);
-				_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
+				_G(out)->spriteSet(sp, x1 * 8, y1 * 8, 0);
 			}
 		}
 		break;
@@ -148,15 +148,15 @@ void Effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
 	if (mode) {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
 			_G(out)->setPointer(workpage_ + 4);
-			_G(out)->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
-			_G(out)->box_fill(x + 160, 0, x + 168, 200, farbe);
+			_G(out)->boxFill(152 - x, 0, 152 - x + 8, 200, farbe);
+			_G(out)->boxFill(x + 160, 0, x + 168, 200, farbe);
 			_G(out)->back2screen(workpage_);
 		}
 	} else {
 		for (int i = 0, x = 0; i < 20; ++i, x += 8) {
 			_G(out)->setPointer(workpage_ + 4);
-			_G(out)->box_fill(x, 0, x + 8, 200, farbe);
-			_G(out)->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
+			_G(out)->boxFill(x, 0, x + 8, 200, farbe);
+			_G(out)->boxFill(312 - x, 0, 31 - x + 8, 200, farbe);
 			_G(out)->back2screen(workpage_);
 		}
 	}
@@ -166,15 +166,15 @@ void Effect::spr_blende(byte *wrkPage, int16 lines, bool mode, int16 col) {
 	if (mode) {
 		for (int i = 0, y = 0; i < 20; ++i, y += 8) {
 			_G(out)->setPointer(wrkPage + 4);
-			_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
-			_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
+			_G(out)->boxFill(0, 92 - y, 320, 92 - y + 8, col);
+			_G(out)->boxFill(0, 100 + y, 320, 108 + y, col);
 			_G(out)->back2screen(wrkPage);
 		}
 	} else {
 		for (int i = 0; i < 20; ++i) {
 			_G(out)->setPointer(wrkPage + 4);
-			_G(out)->box_fill(0, i, 320, i + 8, col);
-			_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
+			_G(out)->boxFill(0, i, 320, i + 8, col);
+			_G(out)->boxFill(0, 192 - i, 320, 200 - i, col);
 			_G(out)->back2screen(wrkPage);
 		}
 	}
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 36de914daa2..bc6854ed990 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -153,7 +153,7 @@ public:
 	int16 _maus_menu_x = 0;
 	int16 _maus_old_x = 0;
 	int16 _maus_old_y = 0;
-	int16 _inventar_nr = 0;
+	int16 _inventoryNr = 0;
 	int16 _invent_cur_mode = 0;
 	byte *_inv_spr[MAX_MOV_OBJ] = { nullptr };
 	int16 _person_tmp_hide[MAX_PERSON] = { 0 };
@@ -341,7 +341,7 @@ void set_ani_screen();
 
 void delInventory(int16 nr);
 
-bool is_cur_inventar(int16 nr);
+bool isCurInventory(int16 nr);
 
 void check_shad(int16 palIdx, int16 mode);
 
@@ -400,12 +400,12 @@ void init_atds();
 
 void init_room();
 
-void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode);
+void buildMenu(int16 x, int16 y, int16 xNr, int16 yNr, int16 col, int16 mode);
 
-void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 zeilen_hoehe,
+void autoMenu(int16 *x, int16 *y, int16 lineNr, int16 zeilen_hoehe,
                char *txt, int16 mode);
 
-void maus_mov_menu();
+void mouseMovMenu();
 
 void cur_2_inventory();
 
@@ -419,9 +419,9 @@ int16 del_invent_slot(int16 nr);
 
 void remove_inventory(int16 nr);
 
-void get_display_xy(int16 *x, int16 *y, int16 nr);
-void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz);
-void ads_menu();
+void getDisplayCoord(int16 *x, int16 *y, int16 nr);
+void calcTxtXy(int16 *x, int16 *y, char *txtAdr, int16 txtNr);
+void adsMenu();
 
 void stop_ads_dialog();
 
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index ffb6bce5350..b477b842cd9 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -64,7 +64,7 @@ void standard_init() {
 
 	// WORKAROUND: Moved from init_load because the original
 	// uses _G(curtaf)->_image below before _G(curtaf) was initialized
-	_G(curtaf) = _G(mem)->taf_adr(CURSOR);
+	_G(curtaf) = _G(mem)->taf_adr(CURSOR_TAF);
 
 	_G(curblk).sprite = _G(curtaf)->_image;
 	_G(curblk).cur_back = _G(cur_back);
@@ -114,7 +114,7 @@ void var_init() {
 
 	_G(auto_p_nr) = 0;
 	_G(menu_item) = CUR_WALK;
-	_G(inventar_nr) = 0;
+	_G(inventoryNr) = 0;
 	_G(ged_mov_ebene) = 1;
 	new_game();
 	_G(spieler).MainMenuY = MENU_Y;
@@ -175,7 +175,7 @@ void var_init() {
 void init_room() {
 	_G(room_blk).AkAblage = 0;
 	_G(room_blk).LowPalMem = _G(pal);
-	_G(room_blk).InvFile = INVENTAR;
+	_G(room_blk).InvFile = INVENTORY_TAF;
 	_G(room_blk).DetFile = DETAILTEST;
 	_G(room_blk).InvSprAdr = &_G(inv_spr)[0];
 	_G(room_blk).Rmo = _G(spieler).room_m_obj;
@@ -231,8 +231,8 @@ void new_game() {
 	for (int16 i = 0; i < MAX_EXIT; i++)
 		_G(spieler).room_e_obj[i].RoomNr = -1;
 
-	_G(obj)->load(INVENTAR_IIB, &_G(spieler).room_m_obj[0]);
-	_G(obj)->load(INVENTAR_SIB, &_G(spieler).room_s_obj[0]);
+	_G(obj)->load(INVENTORY_IIB, &_G(spieler).room_m_obj[0]);
+	_G(obj)->load(INVENTORY_SIB, &_G(spieler).room_s_obj[0]);
 	_G(obj)->load(EXIT_EIB, &_G(spieler).room_e_obj[0]);
 
 	Common::File f;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 3868997879e..4530bc23f42 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -169,24 +169,24 @@ void cursorChoice(int16 nr) {
 		_G(curani)._end = 25;
 		break;
 
-	case CUR_AUSGANG_LINKS:
-		_G(curani)._start = AUSGANG_LINKS_SPR;
-		_G(curani)._end = AUSGANG_LINKS_SPR;
+	case CUR_EXIT_LEFT:
+		_G(curani)._start = EXIT_LEFT_SPR;
+		_G(curani)._end = EXIT_LEFT_SPR;
 		break;
 
-	case CUR_AUSGANG_RECHTS:
-		_G(curani)._start = AUSGANG_RECHTS_SPR;
-		_G(curani)._end = AUSGANG_RECHTS_SPR;
+	case CUR_EXIT_RIGHT:
+		_G(curani)._start = EXIT_RIGHT_SPR;
+		_G(curani)._end = EXIT_RIGHT_SPR;
 		break;
 
-	case CUR_AUSGANG_OBEN:
-		_G(curani)._start = AUSGANG_OBEN_SPR;
-		_G(curani)._end = AUSGANG_OBEN_SPR;
+	case CUR_EXIT_TOP:
+		_G(curani)._start = EXIT_ABOVE_SPR;
+		_G(curani)._end = EXIT_ABOVE_SPR;
 		break;
 
-	case CUR_AUSGANG_UNTEN:
-		_G(curani)._start = AUSGANG_UNTEN_SPR;
-		_G(curani)._end = AUSGANG_UNTEN_SPR;
+	case CUR_EXIT_BOTTOM:
+		_G(curani)._start = EXIT_BOTTOM_SPR;
+		_G(curani)._end = EXIT_BOTTOM_SPR;
 		break;
 
 	case CUR_DISK:
@@ -262,32 +262,32 @@ bool mainLoop(int16 mode) {
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_WALK;
 			cursorChoice(_G(menu_item));
-			if (_G(menu_display) == MENU_EINBLENDEN)
-				_G(menu_display) = MENU_AUSBLENDEN;
+			if (_G(menu_display) == MENU_DISPLAY)
+				_G(menu_display) = MENU_HIDE;
 			break;
 
 		case Common::KEYCODE_F2:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_USE;
 			cursorChoice(_G(menu_item));
-			if (_G(menu_display) == MENU_EINBLENDEN)
-				_G(menu_display) = MENU_AUSBLENDEN;
+			if (_G(menu_display) == MENU_DISPLAY)
+				_G(menu_display) = MENU_HIDE;
 			break;
 
 		case Common::KEYCODE_F3:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_LOOK;
 			cursorChoice(_G(menu_item));
-			if (_G(menu_display) == MENU_EINBLENDEN)
-				_G(menu_display) = MENU_AUSBLENDEN;
+			if (_G(menu_display) == MENU_DISPLAY)
+				_G(menu_display) = MENU_HIDE;
 			break;
 
 		case Common::KEYCODE_F4:
 			_G(spieler).inv_cur = false;
 			_G(menu_item) = CUR_TALK;
 			cursorChoice(_G(menu_item));
-			if (_G(menu_display) == MENU_EINBLENDEN)
-				_G(menu_display) = MENU_AUSBLENDEN;
+			if (_G(menu_display) == MENU_DISPLAY)
+				_G(menu_display) = MENU_HIDE;
 			break;
 
 		case Common::KEYCODE_F5:
@@ -299,7 +299,7 @@ bool mainLoop(int16 mode) {
 			menuEntry();
 			Dialogs::Inventory::menu();
 			menuExit();
-			_G(menu_flag) = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_HIDE;
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
@@ -310,7 +310,7 @@ bool mainLoop(int16 mode) {
 				_G(menu_item) = CUR_USE;
 				cursorChoice(CUR_AK_INVENT);
 
-				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
+				getDisplayCoord(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
 			_G(kbinfo)._keyCode = '\0';
@@ -342,14 +342,14 @@ bool mainLoop(int16 mode) {
 				_G(tmp_menu_item) = _G(menu_item);
 				_G(maus_old_x) = _G(minfo).x;
 				_G(maus_old_y) = _G(minfo).y;
-				_G(menu_display) = MENU_EINBLENDEN;
-				_G(maus_menu_x) = (MAUS_MENU_MAX_X / 5) * (_G(menu_item));
+				_G(menu_display) = MENU_DISPLAY;
+				_G(maus_menu_x) = (MOUSE_MENU_MAX_X / 5) * (_G(menu_item));
 				_G(cur_display) = false;
 				_G(cur)->move(_G(maus_menu_x), 100);
 			} else {
 				menuExit();
 				_G(menu_item) = _G(tmp_menu_item);
-				_G(menu_display) = MENU_AUSBLENDEN;
+				_G(menu_display) = MENU_HIDE;
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
 					cursorChoice(CUR_AK_INVENT);
 				} else
@@ -365,7 +365,7 @@ bool mainLoop(int16 mode) {
 				menuEntry();
 				Dialogs::Inventory::menu();
 				menuExit();
-				_G(menu_flag) = MENU_AUSBLENDEN;
+				_G(menu_flag) = MENU_HIDE;
 				_G(menu_display) = 0;
 				_G(cur_display) = true;
 				if (_G(spieler).AkInvent == -1) {
@@ -375,13 +375,13 @@ bool mainLoop(int16 mode) {
 				} else {
 					_G(menu_item) = CUR_USE;
 					cursorChoice(CUR_AK_INVENT);
-					get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
+					getDisplayCoord(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 				}
 				break;
 
 			case CUR_SAVE: {
 				_G(flags).SaveMenu = true;
-				_G(menu_display) = MENU_EINBLENDEN;
+				_G(menu_display) = MENU_DISPLAY;
 				_G(cur)->move(152, 92);
 				_G(minfo).x = 152;
 				_G(minfo).y = 92;
@@ -397,7 +397,7 @@ bool mainLoop(int16 mode) {
 
 				_G(out)->setPointer(_G(workptr));
 				_G(menu_item) = _G(tmp_menu_item);
-				_G(menu_display) = MENU_AUSBLENDEN;
+				_G(menu_display) = MENU_HIDE;
 
 				if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && _G(menu_item) == CUR_USE) {
 					cursorChoice(CUR_AK_INVENT);
@@ -413,7 +413,7 @@ bool mainLoop(int16 mode) {
 			default:
 				if (_G(menu_display) != 0) {
 					menuExit();
-					_G(menu_flag) = MENU_AUSBLENDEN;
+					_G(menu_flag) = MENU_HIDE;
 					_G(menu_display) = 0;
 					_G(cur_display) = true;
 					_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
@@ -450,9 +450,9 @@ bool mainLoop(int16 mode) {
 			break;
 		}
 
-		if (_G(menu_display) == MENU_AUSBLENDEN) {
+		if (_G(menu_display) == MENU_HIDE) {
 			menuExit();
-			_G(menu_flag) = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_HIDE;
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
@@ -519,9 +519,9 @@ void setupScreen(SetupScreenMode mode) {
 	}
 
 	spriteEngine();
-	if (_G(menu_display) == MENU_EINBLENDEN || _G(flags).InventMenu) {
+	if (_G(menu_display) == MENU_DISPLAY || _G(flags).InventMenu) {
 		if (!_G(flags).InventMenu)
-			plot_main_menu();
+			plotMainMenu();
 	} else {
 		kb_mov(1);
 		_G(det)->unfreeze_ani();
@@ -531,16 +531,16 @@ void setupScreen(SetupScreenMode mode) {
 			calc_ani_timer();
 
 		if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
-			build_menu(invent_display[_G(spieler).InvDisp][0],
+			buildMenu(invent_display[_G(spieler).InvDisp][0],
 			           invent_display[_G(spieler).InvDisp][1], 3, 3, 60, 0);
-			_G(out)->sprite_set(_G(inv_spr)[_G(spieler).AkInvent],
+			_G(out)->spriteSet(_G(inv_spr)[_G(spieler).AkInvent],
 			                 invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
 			                 invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
 			                 , _G(scr_width));
 		}
 
 		if (_G(flags).AdsDialog)
-			ads_menu();
+			adsMenu();
 		if (_G(maus_links_click)) {
 			if (_G(menu_item) == CUR_WALK) {
 				if (_G(cur_ausgang_flag)) {
@@ -597,7 +597,7 @@ void setupScreen(SetupScreenMode mode) {
 		int16 nr = _G(obj)->is_iib_mouse(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
 		if (nr != -1) {
 			txt_nr = _G(obj)->iib_txt_nr(nr);
-			mous_obj_action(nr, mode, INVENTAR_NORMAL, txt_nr);
+			mous_obj_action(nr, mode, INVENTORY_NORMAL, txt_nr);
 		} else {
 			int16 tmp = calcMouseText(_G(minfo).x, _G(minfo).y, mode);
 			if (tmp == -1 || tmp == 255) {
@@ -614,7 +614,7 @@ void setupScreen(SetupScreenMode mode) {
 			_G(cur)->plot_cur();
 
 			if ((_G(spieler).inv_cur) && (_G(flags).CursorStatus == true))
-				_G(out)->sprite_set(_G(curtaf)->_image[_G(pfeil_ani) + 32], _G(minfo).x, _G(minfo).y,
+				_G(out)->spriteSet(_G(curtaf)->_image[_G(pfeil_ani) + 32], _G(minfo).x, _G(minfo).y,
 				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(spieler).DelaySpeed;
@@ -690,7 +690,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 		if (txt_nr != -1 && _G(flags).ShowAtsInvTxt) {
 
 			switch (txt_mode) {
-			case INVENTAR_NORMAL:
+			case INVENTORY_NORMAL:
 			case INVENTORY_STATIC:
 				str_adr = _G(atds)->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATA);
 				break;
@@ -702,7 +702,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
-				calc_txt_xy(&x, &y, str_adr, anz);
+				calcTxtXy(&x, &y, str_adr, anz);
 				for (int16 i = 0; i < anz; i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos(str_adr, i));
 			}
@@ -716,7 +716,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			if (_G(spieler).inv_cur) {
 				evaluateObj(nr, txt_mode);
 			} else {
-				if (txt_mode == INVENTAR_NORMAL) {
+				if (txt_mode == INVENTORY_NORMAL) {
 					if (!_G(flags).ChAutoMov) {
 						_G(maus_links_click) = false;
 						autoMove(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
@@ -754,7 +754,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 void kb_mov(int16 mode) {
 	bool ende = false;
 	while (!ende) {
-		switch (_G(in)->get_switch_code()) {
+		switch (_G(in)->getSwitchCode()) {
 		case Common::KEYCODE_RIGHT:
 			if (_G(minfo).x < 320 - _G(spieler)._curWidth)
 				_G(minfo).x += 2;
@@ -792,36 +792,36 @@ void kb_mov(int16 mode) {
 void kb_cur_action(int16 key, int16 mode) {
 	switch (key) {
 	case Common::KEYCODE_RIGHT:
-		if (_G(menu_display) == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_DISPLAY) {
 			if (_G(menu_item) < 5)
 				++_G(menu_item);
 			else
 				_G(menu_item) = CUR_WALK;
-			_G(maus_menu_x) = (_G(menu_item)) * (MAUS_MENU_MAX_X / 5);
+			_G(maus_menu_x) = (_G(menu_item)) * (MOUSE_MENU_MAX_X / 5);
 			_G(cur)->move(_G(maus_menu_x), 100);
 		}
 		break;
 
 	case Common::KEYCODE_LEFT:
-		if (_G(menu_display) == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_DISPLAY) {
 			if (_G(menu_item) > 0)
 				--_G(menu_item);
 			else
 				_G(menu_item) = CUR_INVENT;
-			_G(maus_menu_x) = (_G(menu_item)) * (MAUS_MENU_MAX_X / 5);
+			_G(maus_menu_x) = (_G(menu_item)) * (MOUSE_MENU_MAX_X / 5);
 			_G(cur)->move(_G(maus_menu_x), 100);
 		}
 		break;
 
 	case Common::KEYCODE_UP:
-		if (_G(menu_display) == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_DISPLAY) {
 			if (_G(spieler).MainMenuY > 1)
 				_G(spieler).MainMenuY -= 2;
 		}
 		break;
 
 	case Common::KEYCODE_DOWN:
-		if (_G(menu_display) == MENU_EINBLENDEN) {
+		if (_G(menu_display) == MENU_DISPLAY) {
 			if (_G(spieler).MainMenuY < 163)
 				_G(spieler).MainMenuY += 2;
 		}
@@ -849,7 +849,7 @@ void mouseAction() {
 		}
 		_G(inv_disp_ok) = false;
 	}
-	if (_G(atds)->aad_get_status() == -1) {
+	if (_G(atds)->aadGetStatus() == -1) {
 		if (_G(minfo)._button || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 
 			if (_G(minfo)._button == 2 || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE) {
@@ -858,7 +858,7 @@ void mouseAction() {
 				}
 			} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 				if (!_G(flags).main_maus_flag) {
-					if (_G(menu_display) == MENU_EINBLENDEN)
+					if (_G(menu_display) == MENU_DISPLAY)
 						_G(kbinfo).scan_code = Common::KEYCODE_RETURN;
 					else if (_G(spieler).AkInvent != -1) {
 						if (_G(inv_disp_ok)) {
@@ -891,7 +891,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 	int16 action_flag = false;
 
 	switch (mode) {
-	case INVENTAR_NORMAL:
+	case INVENTORY_NORMAL:
 		ret = _G(obj)->action_iib_iib(_G(spieler).AkInvent, testNr);
 		if (ret != NO_ACTION) {
 			hideCur();
@@ -901,7 +901,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 					autoMove(_G(spieler).room_m_obj[testNr].AutoMov, P_CHEWY);
 				}
 				txt_nr = _G(obj)->iib_txt_nr(testNr);
-				Dialogs::Inventory::look_screen(INVENTAR_NORMAL, txt_nr);
+				Dialogs::Inventory::look_screen(INVENTORY_NORMAL, txt_nr);
 				if (_G(spieler).room_m_obj[testNr].AniFlag != 255) {
 					_G(spieler)._personHide[P_CHEWY] = _G(spieler).room_m_obj[testNr].HeldHide;
 					play_scene_ani(_G(spieler).room_m_obj[testNr].AniFlag, ANI_FRONT);
@@ -1047,7 +1047,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 	switch (ret) {
 	case OBJECT_1:
 	case OBJECT_2:
-		if (mode == INVENTAR_NORMAL)
+		if (mode == INVENTORY_NORMAL)
 			calc_inv_use_txt(testNr);
 		break;
 
@@ -1222,7 +1222,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 				while (_G(mov)->auto_go_status()) {
 					if (SHOULD_QUIT)
 						return 0;
-					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
+					if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
 						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							key = Common::KEYCODE_ESCAPE;
 							_G(mov)->stop_auto_go();
@@ -1241,7 +1241,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 				_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[playerNum].XyzStart, _G(spieler_mi)[playerNum].Vorschub, &_G(spieler_vector)[playerNum]);
 				get_phase(&_G(spieler_vector)[playerNum], &_G(spieler_mi)[playerNum]);
 				while (!endLoopFl) {
-					if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
+					if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
 						if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 							_G(spieler_vector)[playerNum].Count = 0;
 							movingFl = false;
@@ -1289,7 +1289,7 @@ void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
 		if (mode == ANI_WAIT) {
 			bool endLoopFl = false;
 			while (!endLoopFl) {
-				if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE) {
+				if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
 					if (_G(flags).ExitMov || _G(flags).BreakAMov) {
 						_G(spieler_vector)[personNum].Count = 0;
 						move_status = false;
@@ -1439,7 +1439,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 					if (str_ != 0) {
 						ret = txtNr;
 						_G(fontMgr)->setFont(_G(font8));
-						calc_txt_xy(&x, &y, str_, anz);
+						calcTxtXy(&x, &y, str_, anz);
 						for (int16 i = 0; i < anz; i++)
 							printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 					}
@@ -1504,7 +1504,7 @@ void calc_mouse_person(int16 x, int16 y) {
 			if (!_G(spieler)._personHide[p_nr]) {
 				_G(fontMgr)->setFont(_G(font8));
 				char *str_ = ch_txt[p_nr];
-				calc_txt_xy(&x, &y, str_, 1);
+				calcTxtXy(&x, &y, str_, 1);
 				printShadowed(x, y, 255, 300, 0, _G(scr_width), str_);
 				if (_G(maus_links_click) == 1) {
 					int16 def_nr = -1;
@@ -1629,7 +1629,7 @@ void get_user_key(int16 mode) {
 	_G(maus_links_click) = false;
 
 	if (!_G(inv_disp_ok)) {
-		switch (_G(in)->get_switch_code()) {
+		switch (_G(in)->getSwitchCode()) {
 		case Common::KEYCODE_F5:
 		case Common::KEYCODE_SPACE:
 		case Common::KEYCODE_ESCAPE:
@@ -1639,7 +1639,7 @@ void get_user_key(int16 mode) {
 			_G(tmp_menu_item) = _G(menu_item);
 			_G(menu_item) = CUR_USE;
 			Dialogs::Inventory::menu();
-			_G(menu_flag) = MENU_AUSBLENDEN;
+			_G(menu_flag) = MENU_HIDE;
 			_G(menu_display) = 0;
 			_G(cur_display) = true;
 			if (_G(spieler).AkInvent == -1) {
@@ -1650,7 +1650,7 @@ void get_user_key(int16 mode) {
 				_G(menu_item) = CUR_USE;
 				cursorChoice(CUR_AK_INVENT);
 
-				get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
+				getDisplayCoord(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 			}
 
 			_G(kbinfo)._keyCode = '\0';
@@ -1687,7 +1687,7 @@ void delInventory(int16 nr) {
 	_G(maus_links_click) = false;
 }
 
-bool is_cur_inventar(int16 nr) {
+bool isCurInventory(int16 nr) {
 	int16 ret = false;
 
 	if (_G(spieler).AkInvent == nr && _G(spieler).inv_cur)
@@ -1703,24 +1703,24 @@ void check_mouse_ausgang(int16 x, int16 y) {
 		int16 attr = (nr >= 0 && nr < MAX_EXIT) ? _G(spieler).room_e_obj[nr].Attribut : 0;
 
 		switch (attr) {
-		case AUSGANG_LINKS:
-			_G(cur_ausgang_flag) = AUSGANG_LINKS;
-			cursorChoice(CUR_AUSGANG_LINKS);
+		case EXIT_LEFT:
+			_G(cur_ausgang_flag) = EXIT_LEFT;
+			cursorChoice(CUR_EXIT_LEFT);
 			break;
 
-		case AUSGANG_RECHTS:
-			_G(cur_ausgang_flag) = AUSGANG_RECHTS;
-			cursorChoice(CUR_AUSGANG_RECHTS);
+		case EXIT_RIGHT:
+			_G(cur_ausgang_flag) = EXIT_RIGHT;
+			cursorChoice(CUR_EXIT_RIGHT);
 			break;
 
-		case AUSGANG_OBEN:
-			_G(cur_ausgang_flag) = AUSGANG_OBEN;
-			cursorChoice(CUR_AUSGANG_OBEN);
+		case EXIT_TOP:
+			_G(cur_ausgang_flag) = EXIT_TOP;
+			cursorChoice(CUR_EXIT_TOP);
 			break;
 
-		case AUSGANG_UNTEN:
-			_G(cur_ausgang_flag) = AUSGANG_UNTEN;
-			cursorChoice(CUR_AUSGANG_UNTEN);
+		case EXIT_BOTTOM:
+			_G(cur_ausgang_flag) = EXIT_BOTTOM;
+			cursorChoice(CUR_EXIT_BOTTOM);
 			break;
 
 		default:
@@ -1932,7 +1932,7 @@ void set_person_rnr() {
 bool is_chewy_busy() {
 	bool ret = true;
 	if (_G(atds)->ats_get_status() == DISPLAY_NONE) {
-		if (_G(atds)->aad_get_status() == -1) {
+		if (_G(atds)->aadGetStatus() == -1) {
 			if (_G(atds)->ads_get_status() == -1) {
 				if (!_G(mov)->auto_go_status()) {
 					if (!_G(spieler_vector)[P_CHEWY].Count) {
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 167d1073333..6eabb359bdc 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -29,7 +29,7 @@ namespace Chewy {
 
 void game_main();
 void free_buffers();
-void plot_main_menu();
+void plotMainMenu();
 void palcopy(byte *destPal, const byte *srcPal, int16 destStartIndex,
              int16 srcStartIndex, int16 colorNbr);
 short calcMouseText(int16 x, int16 y, int16 mode);
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 6caec7471bf..9c29e1a5b88 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -168,7 +168,7 @@ void McgaGraphics::box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	line_mcga(x2, y1, x2, y2, farbe);
 }
 
-void McgaGraphics::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
+void McgaGraphics::boxFill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe) {
 	if (x2 == x1)x2++;
 	int16 h = abs(y2 - y1);
 	if (h == 0)
@@ -179,7 +179,7 @@ void McgaGraphics::box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe)
 
 void McgaGraphics::pop_box(int16 x, int16 y, int16 x1, int16 y1, int16 col1, int16 col2, int16 back_col) {
 	if (back_col < 255)
-		box_fill(x, y, x1, y1, back_col);
+		boxFill(x, y, x1, y1, back_col);
 	linie(x, y1, x1, y1, col2);
 	linie(x1, y, x1, y1, col2);
 	linie(x, y, x1, y, col1);
@@ -219,7 +219,7 @@ void McgaGraphics::sprite_save(byte *sptr, int16 x, int16 y, int16 breite, int16
 	spr_save_mcga(sptr, x, y, breite, hoehe, scrwidth);
 }
 
-void McgaGraphics::sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth) {
+void McgaGraphics::spriteSet(byte *sptr, int16 x, int16 y, int16 scrwidth) {
 	mspr_set_mcga(sptr, x, y, scrwidth);
 }
 
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index b70739bbf29..02c6e01cbe5 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -52,7 +52,7 @@ public:
 	uint8 get_pixel(int16 xpos, int16 ypos);
 	void linie(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 	void box(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
-	void box_fill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
+	void boxFill(int16 x1, int16 y1, int16 x2, int16 y2, int16 farbe);
 	void pop_box(int16 x, int16 y, int16 x1, int16 y1,
 	             int16 col1, int16 col2, int16 back_col);
 
@@ -62,7 +62,7 @@ public:
 	void sprite_save(byte *sptr, int16 x, int16 y, int16 breite,
 	                 int16 hoehe, int16 scrwidth);
 	void blockcopy(byte *sptr, int16 x, int16 y, int16 scrwidth);
-	void sprite_set(byte *sptr, int16 x, int16 y, int16 scrwidth);
+	void spriteSet(byte *sptr, int16 x, int16 y, int16 scrwidth);
 	void scale_set(byte *sptr, int16 x, int16 y, int16 xdiff,
 	               int16 ydiff, int16 scrwidth);
 	void map_spr2screen(byte *sptr, int16 x, int16 y);
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 4ef6c320dfc..c417da3911c 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -29,27 +29,27 @@
 
 namespace Chewy {
 
-void plot_main_menu() {
+void plotMainMenu() {
 	static const int IMAGES[] = { 7, 8, 9, 10, 12, 11 };
-	int16 zoomx, zoomy;
+	int16 zoomX, zoomY;
 
 	if (_G(menu_item) != _G(tmp_menu)) {
 		_G(m_flip) = 0;
 		_G(tmp_menu) = _G(menu_item);
 	}
 
-	maus_mov_menu();
-	int16 *korrektur = (int16 *)_G(menutaf)->_correction;
+	mouseMovMenu();
+	int16 *correction = (int16 *)_G(menutaf)->_correction;
 
 	for (int16 i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
 
 		if (i <= 8) {
-			zoomx = 0;
-			zoomy = 0;
+			zoomX = 0;
+			zoomY = 0;
 		} else {
-			zoomx = -3;
-			zoomy = -3;
+			zoomX = -3;
+			zoomY = -3;
 
 			if (i == 11)
 				deltaX = 40;
@@ -58,13 +58,13 @@ void plot_main_menu() {
 		}
 
 		_G(out)->scale_set(_G(menutaf)->_image[i],
-			MENU_X + deltaX + korrektur[i * 2],
-		    _G(spieler).MainMenuY + korrektur[i * 2 + 1],
-			zoomx, zoomy, 0);
+			MENU_X + deltaX + correction[i * 2],
+		    _G(spieler).MainMenuY + correction[i * 2 + 1],
+			zoomX, zoomY, 0);
 	}
 
-	zoomx = 16;
-	zoomy = 16;
+	zoomX = 16;
+	zoomY = 16;
 	++_G(m_flip);
 	if (_G(m_flip) < 12 * (_G(spieler).DelaySpeed + 1)) {
 		int deltaX = 0;
@@ -75,45 +75,45 @@ void plot_main_menu() {
 
 		int img = IMAGES[_G(menu_item)];
 		_G(out)->scale_set(_G(menutaf)->_image[img],
-		    MENU_X + deltaX + korrektur[img * 2] - 5,
-		    _G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
-			zoomx, zoomy, 0);
+		    MENU_X + deltaX + correction[img * 2] - 5,
+		    _G(spieler).MainMenuY + correction[img * 2 + 1] - 10,
+			zoomX, zoomY, 0);
 	} else {
 		if (_G(m_flip) > 15 * (_G(spieler).DelaySpeed + 1))
 			_G(m_flip) = 0;
 	}
 }
 
-void maus_mov_menu() {
+void mouseMovMenu() {
 	_G(maus_menu_x) = g_events->_mousePos.x;
 	if (_G(maus_menu_x) > 200) {
 		g_events->warpMouse(Common::Point(200, g_events->_mousePos.y));
 		_G(maus_menu_x) = 200;
 	}
 
-	_G(menu_item) = (_G(maus_menu_x) / (MAUS_MENU_MAX_X / 5));
+	_G(menu_item) = (_G(maus_menu_x) / (MOUSE_MENU_MAX_X / 5));
 }
 
-void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
+void calcTxtXy(int16 *x, int16 *y, char *txtAdr, int16 txtNr) {
 	int16 len = 0;
-	for (int16 i = 0; i < txt_anz; i++) {
-		int16 tmp_len = strlen(_G(txt)->strPos((char *)txt_adr, i));
-		if (tmp_len > len)
-			len = tmp_len;
+	for (int16 i = 0; i < txtNr; i++) {
+		int16 tmpLen = strlen(_G(txt)->strPos(txtAdr, i));
+		if (tmpLen > len)
+			len = tmpLen;
 	}
 	len = len * _G(fontMgr)->getFont()->getDataWidth();
-	int16 pix_len = len / 2;
-	*x = *x - pix_len + 12;
+	int16 pixLen = len / 2;
+	*x = *x - pixLen + 12;
 	if (*x > (SCREEN_WIDTH - len))
 		*x = SCREEN_WIDTH - len;
 	else if (*x < 0)
 		*x = 0;
-	*y = *y - (10 * txt_anz);
+	*y = *y - (10 * txtNr);
 	if (*y < 0)
 		*y = 0;
 }
 
-void get_display_xy(int16 *x, int16 *y, int16 nr) {
+void getDisplayCoord(int16 *x, int16 *y, int16 nr) {
 	int16 *xy = (int16 *)_G(inv_spr)[nr];
 	int16 x1 = 48 - xy[0];
 	x1 /= 2;
@@ -123,50 +123,50 @@ void get_display_xy(int16 *x, int16 *y, int16 nr) {
 	*y = y1;
 }
 
-void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode) {
-#define BAU_MENU_ECKE_LO 15
-#define BAU_MENU_ECKE_RO 16
-#define BAU_MENU_ECKE_LU 17
-#define BAU_MENU_ECKE_RU 18
-#define BAU_MENU_UNTEN 19
-#define BAU_MENU_SEITE_L 20
-#define BAU_MENU_SEITE_R 21
-#define BAU_MENU_OBEN 22
-#define BAU_MENU_OBEN_L 23
-#define BAU_MENU_OBEN_R 24
-#define BAU_MENU_OBEN_M 25
+void buildMenu(int16 x, int16 y, int16 xNr, int16 yNr, int16 col, int16 mode) {
+#define BUILDING_MENU_CORNER_LO 15
+#define BUILDING_MENU_CORNER_RO 16
+#define BUILDING_MENU_CORNER_LU 17
+#define BUILDING_MENU_CORNER_RU 18
+#define BUILDING_MENU_BELOW 19
+#define BUILDING_MENU_SIDE_L 20
+#define BUILDING_MENU_SIDE_R 21
+#define BUILDING_MENU_ABOVE 22
+#define BUILDING_MENU_ABOVE_L 23
+#define BUILDING_MENU_ABOVE_R 24
+#define BUILDING_MENU_ABOVE_M 25
 	int16 i, j;
 	int16 xy[4][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
-	uint8 sprite_eckenr[4] = { BAU_MENU_ECKE_LO, BAU_MENU_ECKE_RO, BAU_MENU_ECKE_LU, BAU_MENU_ECKE_RU };
+	uint8 spriteCornerNr[4] = { BUILDING_MENU_CORNER_LO, BUILDING_MENU_CORNER_RO, BUILDING_MENU_CORNER_LU, BUILDING_MENU_CORNER_RU };
 
 	xy[0][0] = x;
 	xy[0][1] = y;
-	xy[1][0] = x + 16 * (xanz - 1);
+	xy[1][0] = x + 16 * (xNr - 1);
 	xy[1][1] = y;
 	xy[2][0] = x;
-	xy[2][1] = y + 16 * (yanz - 1);
-	xy[3][0] = x + 16 * (xanz - 1);
-	xy[3][1] = y + 16 * (yanz - 1);
+	xy[2][1] = y + 16 * (yNr - 1);
+	xy[3][0] = x + 16 * (xNr - 1);
+	xy[3][1] = y + 16 * (yNr - 1);
 
 	for (i = 0; i < 4; i++)
-		_G(out)->sprite_set(_G(menutaf)->_image[(int16)sprite_eckenr[i]],
+		_G(out)->spriteSet(_G(menutaf)->_image[(int16)spriteCornerNr[i]],
 		                 xy[i][0], xy[i][1], _G(scr_width));
 
-	int16 s_nr = BAU_MENU_SEITE_L;
+	int16 s_nr = BUILDING_MENU_SIDE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
-		for (i = 0; i < yanz - 2; i++) {
-			_G(out)->sprite_set(_G(menutaf)->_image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
+		for (i = 0; i < yNr - 2; i++) {
+			_G(out)->spriteSet(_G(menutaf)->_image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
 		}
 		++s_nr;
 	}
 
-	s_nr = BAU_MENU_OBEN;
+	s_nr = BUILDING_MENU_ABOVE;
 	for (j = 0; j < 2; j++) {
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
-			for (i = 0; i < xanz - 2; i++) {
-				_G(out)->sprite_set(_G(menutaf)->_image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
+			for (i = 0; i < xNr - 2; i++) {
+				_G(out)->spriteSet(_G(menutaf)->_image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
 		s_nr -= 3;
@@ -174,42 +174,42 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
 
 	if (mode) {
 		int16 leer = 0;
-		int16 mitte;
-		i = xanz - 7;
+		int16 center;
+		i = xNr - 7;
 		if (i == 0)
-			mitte = 1;
+			center = 1;
 		else if (i < 6)
-			mitte = i + 1;
+			center = i + 1;
 		else if (i < 8) {
 			leer = 1;
-			mitte = i - 1;
+			center = i - 1;
 		} else {
 			leer = 2;
-			mitte = i - 3;
+			center = i - 3;
 		}
 
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN], x + i * 16, xy[0][1], _G(scr_width));
+				_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE], x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
-		_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
+		_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
-		for (i = 0; i < mitte; i++)
-			_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_M], x + i * 16, xy[0][1], _G(scr_width));
-		_G(out)->sprite_set(_G(menutaf)->_image[BAU_MENU_OBEN_R], x + i * 16, xy[0][1], _G(scr_width));
+		for (i = 0; i < center; i++)
+			_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_M], x + i * 16, xy[0][1], _G(scr_width));
+		_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_R], x + i * 16, xy[0][1], _G(scr_width));
 	}
 
-	_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16, xy[0][1] + 16 + (yanz - 2) * 16, col);
+	_G(out)->boxFill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xNr - 2) * 16, xy[0][1] + 16 + (yNr - 2) * 16, col);
 }
 
-void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, int16 mode) {
+void autoMenu(int16 *x, int16 *y, int16 lineNr, int16 height, char *text, int16 mode) {
 	int16 tmp;
 
 	int16 x_pix = 0;
-	for (int16 i = 0; i < zeilen_anz; i++) {
+	for (int16 i = 0; i < lineNr; i++) {
 		tmp = strlen(_G(txt)->strPos(text, i));
 		if (x_pix < tmp)
 			x_pix = tmp;
@@ -219,68 +219,68 @@ void auto_menu(int16 *x, int16 *y, int16 zeilen_anz, int16 hoehe, char *text, in
 	tmp = x_pix;
 	if (x_pix % 16)
 		tmp += 16;
-	int16 tmp1 = zeilen_anz * hoehe + 6 + 11;
+	int16 tmp1 = lineNr * height + 6 + 11;
 	if (tmp1 % 16)
 		tmp1 += 16;
 	*x -= ((tmp / 16) * 16) / 2;
 	*y -= ((tmp1 / 16) * 16) / 2;
-	build_menu(*x, *y, tmp / 16, tmp1 / 16, 60, mode);
+	buildMenu(*x, *y, tmp / 16, tmp1 / 16, 60, mode);
 	*x += 6 + (((tmp / 16) * 16) - x_pix) / 2;
-	*y += 5 + ((((tmp1 / 16) * 16) - 4) - (zeilen_anz * hoehe)) / 2;
+	*y += 5 + ((((tmp1 / 16) * 16) - 4) - (lineNr * height)) / 2;
 }
 
 #define ADS_WIN 0,153,20,3,60,1
 
-void ads_menu() {
-	int16 cur_y_start;
+void adsMenu() {
+	int16 curYStart;
 	int16 col;
 
 	if (_G(flags).AdsDialog) {
 		_G(flags).ShowAtsInvTxt = false;
 		_G(flags).MainInput = false;
 		if (_G(ads_item_anz) > 4)
-			cur_y_start = 190;
+			curYStart = 190;
 		else
-			cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
-		int16 cur_y = _G(minfo).y;
-		if (cur_y < 160 || cur_y > cur_y_start + 10)
-			cur_y = 255;
+			curYStart = 190 - (4 - _G(ads_item_anz)) * 10;
+		int16 curY = _G(minfo).y;
+		if (curY < 160 || curY > curYStart + 10)
+			curY = 255;
 		else
-			cur_y = (cur_y_start + 5 - cur_y) / 10;
+			curY = (curYStart + 5 - curY) / 10;
 
-		if (_G(atds)->aad_get_status() == -1 && _G(ads_push) == false &&
+		if (_G(atds)->aadGetStatus() == -1 && _G(ads_push) == false &&
 		        _G(flags).NoDiaBox == false) {
 			_G(cur_display) = true;
 
-			build_menu(ADS_WIN);
+			buildMenu(ADS_WIN);
 			_G(fontMgr)->setFont(_G(font6));
 			if (_G(ads_item_anz) > 4)
-				cur_y_start = 190;
+				curYStart = 190;
 			else
-				cur_y_start = 190 - (4 - _G(ads_item_anz)) * 10;
+				curYStart = 190 - (4 - _G(ads_item_anz)) * 10;
 			for (int16 i = 0; i < _G(ads_item_anz) && i < 4; i++) {
-				if (cur_y == i)
+				if (curY == i)
 					col = 255;
 				else
 					col = 14;
-				_G(out)->printxy(4, cur_y_start - i * 10, col, 300, 0, _G(ads_item_ptr)[i]);
+				_G(out)->printxy(4, curYStart - i * 10, col, 300, 0, _G(ads_item_ptr)[i]);
 			}
 		}
 
-		switch (_G(in)->get_switch_code()) {
+		switch (_G(in)->getSwitchCode()) {
 		case 255:
 		case Common::KEYCODE_RETURN:
-			if (cur_y < _G(ads_item_anz) && cur_y >= 0 && _G(ads_push) == false) {
+			if (curY < _G(ads_item_anz) && curY >= 0 && _G(ads_push) == false) {
 				_G(cur_display) = false;
 				_G(ads_push) = true;
 				_G(minfo).y = 159;
-				AdsNextBlk *an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), cur_y);
+				AdsNextBlk *an_blk = _G(atds)->ads_item_choice(_G(ads_blk_nr), curY);
 				if (an_blk->BlkNr == -1) {
 					adsAction(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					ads_ende(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					stop_ads_dialog();
 				} else {
-					an_blk = _G(atds)->calc_next_block(_G(ads_blk_nr), cur_y);
+					an_blk = _G(atds)->calc_next_block(_G(ads_blk_nr), curY);
 					adsAction(_G(ads_dia_nr), _G(ads_blk_nr), an_blk->EndNr);
 					_G(ads_blk_nr) = an_blk->BlkNr;
 					_G(ads_item_ptr) = _G(atds)->ads_item_ptr(_G(ads_blk_nr),
@@ -332,7 +332,7 @@ void inventory_2_cur(int16 nr) {
 		_G(menu_item) = CUR_USE;
 		_G(spieler).AkInvent = nr;
 		cursorChoice(CUR_AK_INVENT);
-		get_display_xy(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
+		getDisplayCoord(&_G(spieler).DispZx, &_G(spieler).DispZy, _G(spieler).AkInvent);
 	}
 }
 
diff --git a/engines/chewy/menus.h b/engines/chewy/menus.h
index 6666d2e15a0..0f81d4fea16 100644
--- a/engines/chewy/menus.h
+++ b/engines/chewy/menus.h
@@ -24,12 +24,9 @@
 
 namespace Chewy {
 
-#define MAUS_MENU_MAX_X 200
-#define MENU_EINBLENDEN 1
-#define MENU_AUSBLENDEN 2
-#define MENU_INVENTAR 3
-#define MENU_IOMENU 4
-#define MENU_MAIN 5
+#define MOUSE_MENU_MAX_X 200
+#define MENU_DISPLAY 1
+#define MENU_HIDE 2
 
 } // namespace Chewy
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index f629d78a652..97d68ed8e69 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -85,7 +85,7 @@ KbdMouseInfo *InputMgr::getPointer() {
 	return &_inzeig;
 }
 
-int16 InputMgr::get_switch_code() {
+int16 InputMgr::getSwitchCode() {
 	int16 switch_code = 0;
 
 	if (_G(minfo)._button == 2) {
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index 713455a27b0..bc30c862327 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -44,7 +44,7 @@ public:
 	int16 mouseVector(int16 x, int16 y, const int16 *tbl, int16 anz);
 
 	KbdMouseInfo *getPointer();
-	int16 get_switch_code();
+	int16 getSwitchCode();
 
 	int16 _hotkey = Common::KEYCODE_INVALID;
 
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 7fe78690ebf..8ff73eca3d8 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -478,7 +478,7 @@ void exit_room(int16 eib_nr) {
 		_G(flags).NoScroll = false;
 		_G(spieler).R18Gitter = false;
 		_G(spieler).room_e_obj[50].Attribut = 255;
-		_G(spieler).room_e_obj[41].Attribut = AUSGANG_UNTEN;
+		_G(spieler).room_e_obj[41].Attribut = EXIT_BOTTOM;
 		break;
 
 	case 19:
@@ -790,7 +790,7 @@ void print_rows(int16 id) {
 }
 
 int16 flic_user_function(int16 keys) {
-	if (_G(atds)->aad_get_status() != -1) {
+	if (_G(atds)->aadGetStatus() != -1) {
 		switch (_G(flic_val1)) {
 		case 579:
 		case 584:
@@ -809,14 +809,14 @@ int16 flic_user_function(int16 keys) {
 	if (_G(flic_val1) == 594 && keys == 18)
 		_G(atds)->stopAad();
 
-	int ret = _G(in)->get_switch_code() == Common::KEYCODE_ESCAPE ? -1 : 0;
+	int ret = _G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE ? -1 : 0;
 	if (_G(flic_val2) == 140 && keys == 15)
 		ret = -2;
 	if (_G(flic_val2) == 144 && keys == 7)
 		ret = -2;
 	if (_G(flic_val2) == 145 || _G(flic_val2) == 142 ||
 			_G(flic_val2) == 141 || _G(flic_val2) == 146) {
-		if (_G(atds)->aad_get_status() == -1)
+		if (_G(atds)->aadGetStatus() == -1)
 			ret = -2;
 	}
 
@@ -875,7 +875,7 @@ static void flic_proc1() {
 #else
 			g_engine->_video->playVideo(_G(flic_val2));
 #endif
-			flag = VALS4[i] && _G(atds)->aad_get_status() != -1;
+			flag = VALS4[i] && _G(atds)->aadGetStatus() != -1;
 		} while (flag && ret != -1 && ret != -2);
 
 		_G(atds)->stopAad();
@@ -1090,7 +1090,7 @@ void flic_cut(int16 nr) {
 		case FCUT_095:
 			_G(flc)->set_custom_user_function(Room87::proc5);
 
-			while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
+			while (_G(atds)->aadGetStatus() != -1 && !SHOULD_QUIT) {
 #ifndef NEW_VIDEO_CODE
 				_G(mem)->file->select_pool_item(_G(Ci).Handle, nr);
 				_G(flc)->custom_play(&_G(Ci));
@@ -1265,7 +1265,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_TBUTTON1_R7:
 		_G(spieler).R6DoorLeftB = exit_flip_flop(3, 12, 9, 49, 35, SIB_TBUTTON2_R6,
-		                                     AUSGANG_OBEN, AUSGANG_LINKS,
+		                                     EXIT_TOP, EXIT_LEFT,
 		                                     (int16)_G(spieler).R6DoorLeftB);
 		break;
 
@@ -1292,7 +1292,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_TBUTTON2_R7:
 		_G(spieler).R7DoorRight = exit_flip_flop(4, 13, 14, 53, 68, SIB_TUER_R8,
-		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
+		                                     EXIT_RIGHT, EXIT_RIGHT,
 		                                     (int16)_G(spieler).R7DoorRight);
 		break;
 
@@ -1324,7 +1324,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_TUER_R8:
 		_G(spieler).R7DoorRight = exit_flip_flop(-1, 14, 13, 68, 53, SIB_TBUTTON2_R7,
-		                                     AUSGANG_RECHTS, AUSGANG_RECHTS,
+		                                     EXIT_RIGHT, EXIT_RIGHT,
 		                                     (int16)_G(spieler).R7DoorRight);
 		break;
 
@@ -1375,7 +1375,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 	case SIB_GITTER_R16:
 		_G(atds)->set_ats_str(125, 1, ATS_DATA);
-		_G(spieler).room_e_obj[33].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[33].Attribut = EXIT_TOP;
 		break;
 
 	case SIB_SCHALTER1_R21:
@@ -1422,11 +1422,11 @@ int16 sib_event_no_inv(int16 sib_nr) {
 
 		if (!_G(spieler).R6DoorLeftF) {
 			_G(spieler).R6DoorLeftF = exit_flip_flop(-1, 8, -1, 33, -1, SIB_TBUTTON1_R6,
-				AUSGANG_LINKS, -1,
+				EXIT_LEFT, -1,
 				(int16)_G(spieler).R6DoorLeftF);
 		}
 		_G(spieler).R18DoorBruecke = exit_flip_flop(19, 40, 35, 148, -1, -1,
-			AUSGANG_OBEN, AUSGANG_LINKS,
+			EXIT_TOP, EXIT_LEFT,
 			(int16)_G(spieler).R18DoorBruecke);
 		break;
 
@@ -1550,17 +1550,17 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_TBUTTON1_R6:
 		_G(spieler).R6DoorLeftF = exit_flip_flop(4, 8, -1, 33, -1, -1,
-			AUSGANG_LINKS, -1, _G(spieler).R6DoorLeftF);
+			EXIT_LEFT, -1, _G(spieler).R6DoorLeftF);
 		break;
 
 	case SIB_TBUTTON2_R6:
 		_G(spieler).R6DoorLeftB = exit_flip_flop(5, 9, 12, 35, 49, SIB_TBUTTON1_R7,
-			AUSGANG_LINKS, AUSGANG_OBEN, _G(spieler).R6DoorLeftB);
+			EXIT_LEFT, EXIT_TOP, _G(spieler).R6DoorLeftB);
 		break;
 
 	case SIB_TBUTTON3_R6:
 		_G(spieler).R6DoorRightB = exit_flip_flop(6, 11, 20, 37, 99, SIB_TBUTTON3_R11,
-			AUSGANG_RECHTS, AUSGANG_LINKS, _G(spieler).R6DoorRightB);
+			EXIT_RIGHT, EXIT_LEFT, _G(spieler).R6DoorRightB);
 		break;
 
 	case SIB_BOLA_BUTTON_R6:
@@ -1597,17 +1597,17 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_TBUTTON1_R11:
 		_G(spieler).R11DoorRightF = exit_flip_flop(1, 23, -1, 87, -1, -1,
-			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightF);
+			EXIT_TOP, -1, _G(spieler).R11DoorRightF);
 		break;
 
 	case SIB_TBUTTON2_R11:
 		_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
-			AUSGANG_OBEN, -1, _G(spieler).R11DoorRightB);
+			EXIT_TOP, -1, _G(spieler).R11DoorRightB);
 		break;
 
 	case SIB_TBUTTON3_R11:
 		_G(spieler).R6DoorRightB = exit_flip_flop(6, 20, 11, 99, 37, SIB_TBUTTON3_R6,
-			AUSGANG_LINKS, AUSGANG_RECHTS, _G(spieler).R6DoorRightB);
+			EXIT_LEFT, EXIT_RIGHT, _G(spieler).R6DoorRightB);
 		break;
 
 	case SIB_CARTRIDGE_R23:
@@ -1645,7 +1645,7 @@ void sib_event_inv(int16 sib_nr) {
 
 	case SIB_GITTER2_R21:
 		_G(spieler).R21GitterMuell = exit_flip_flop(-1, 46, 27, 132, 90, -1,
-			AUSGANG_RECHTS, AUSGANG_RECHTS, _G(spieler).R21GitterMuell);
+			EXIT_RIGHT, EXIT_RIGHT, _G(spieler).R21GitterMuell);
 		_G(atds)->set_ats_str(90, TXT_MARK_USE, 2, ATS_DATA);
 		break;
 
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index 7491ef8e88a..42cab6037ae 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -50,7 +50,7 @@ namespace Rooms {
 #define KOPF3 48
 
 void Room0::entry() {
-	if (is_cur_inventar(0) || _G(spieler).R0PillowThrow || _G(obj)->checkInventory(0))
+	if (isCurInventory(0) || _G(spieler).R0PillowThrow || _G(obj)->checkInventory(0))
 		_G(det)->hideStaticSpr(6);
 
 	if (!_G(flags).LoadGame) {
@@ -309,15 +309,15 @@ void Room0::calcEyeClick(int16 aniNr) {
 				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
-				calc_txt_xy(&x, &y, str_, anz);
+				calcTxtXy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
 		} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
-			if (is_cur_inventar(SLIME_INV)) {
+			if (isCurInventory(SLIME_INV)) {
 				delInventory(_G(spieler).AkInvent);
 				_G(spieler).R0SlimeUsed = true;
-			} else if (is_cur_inventar(PILLOW_INV)) {
+			} else if (isCurInventory(PILLOW_INV)) {
 				startAtsWait(172, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
@@ -547,15 +547,15 @@ void Room0::calcPillowClick(int16 aniNr) {
 				_G(fontMgr)->setFont(_G(font8));
 				int16 x = _G(minfo).x;
 				int16 y = _G(minfo).y;
-				calc_txt_xy(&x, &y, str_, anz);
+				calcTxtXy(&x, &y, str_, anz);
 				for (int16 i = 0; i < anz; i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), _G(txt)->strPos((char *)str_, i));
 			}
 		} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
-			if (is_cur_inventar(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
+			if (isCurInventory(PILLOW_INV) && _G(spieler).R0SlimeUsed) {
 				delInventory(_G(spieler).AkInvent);
 				_G(spieler).R0PillowThrow = true;
-			} else if (is_cur_inventar(SLIME_INV)) {
+			} else if (isCurInventory(SLIME_INV)) {
 				startAtsWait(173, TXT_MARK_WALK, 14, ATS_DATA);
 			}
 		}
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index b10e8ae297d..ccb84d57594 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -109,7 +109,7 @@ void Room3::terminal() {
 			startAniBlock(2, ABLOCK3);
 			if (_G(spieler).R2FussSchleim) {
 				_G(spieler).R2FussSchleim = false;
-				_G(spieler).room_s_obj[SIB_SCHLEIM].ZustandFlipFlop = 1;
+				_G(spieler).room_s_obj[SIB_SLIME].ZustandFlipFlop = 1;
 			}
 			_G(spieler)._personHide[P_CHEWY] = true;
 			startSetailWait(8, 1, ANI_FRONT);
@@ -349,7 +349,7 @@ void Room3::probeTransfer() {
 			if (i == 2 || i == 1) {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
 					if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
-						if (is_cur_inventar(SPINAT_INV)) {
+						if (isCurInventory(SPINAT_INV)) {
 							_G(ssi)[0].X = 120;
 							_G(ssi)[0].Y = 100;
 							if (_G(spieler)._personRoomNr[P_CHEWY] == 3)
diff --git a/engines/chewy/rooms/room05.cpp b/engines/chewy/rooms/room05.cpp
index d8ce23dcaea..cc26cd8e8e9 100644
--- a/engines/chewy/rooms/room05.cpp
+++ b/engines/chewy/rooms/room05.cpp
@@ -39,7 +39,7 @@ void Room5::pushButton() {
 		int16 strNr;
 		if (_G(spieler).R5Tuer == false) {
 			startSetailWait(9, 1, ANI_FRONT);
-			_G(spieler).room_e_obj[6].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[6].Attribut = EXIT_TOP;
 			strNr = 1;
 		} else {
 			startSetailWait(9, 1, ANI_BACK);
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 02cfab2cf97..768596e02f0 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -114,7 +114,7 @@ void Room8::start_verbrennen() {
 bool Room8::gips_wurf() {
 	bool actionFl = false;
 	
-	if (is_cur_inventar(GIPS_EIMER_INV)) {
+	if (isCurInventory(GIPS_EIMER_INV)) {
 		hideCur();
 		actionFl = true;
 		_G(det)->load_taf_seq(116, 30, nullptr);
@@ -138,7 +138,7 @@ bool Room8::gips_wurf() {
 		autoMove(8, P_CHEWY);
 		_G(flags).AtsAction = false;
 		_G(menu_item) = CUR_USE;
-		Dialogs::Inventory::look_screen(INVENTAR_NORMAL, 178);
+		Dialogs::Inventory::look_screen(INVENTORY_NORMAL, 178);
 		_G(flags).AtsAction = true;
 		_G(spieler)._personHide[P_CHEWY] = true;
 		startSetailWait(20, 1, ANI_FRONT);
@@ -163,7 +163,7 @@ void Room8::open_gdoor() {
 	_G(atds)->del_steuer_bit(69, ATS_AKTIV_BIT, ATS_DATA);
 	_G(obj)->hide_sib(31);
 	_G(spieler).R8GTuer = true;
-	_G(spieler).room_e_obj[15].Attribut = AUSGANG_UNTEN;
+	_G(spieler).room_e_obj[15].Attribut = EXIT_BOTTOM;
 }
 
 void Room8::talk_nimoy() {
diff --git a/engines/chewy/rooms/room09.cpp b/engines/chewy/rooms/room09.cpp
index 9d25b9ae0f7..8504596ea4f 100644
--- a/engines/chewy/rooms/room09.cpp
+++ b/engines/chewy/rooms/room09.cpp
@@ -82,7 +82,7 @@ void Room9::surimy() {
 	surimy_ani();
 	start_spz(CH_TALK11, 255, false, P_CHEWY);
 	startAadWait(56);
-	_G(spieler).room_e_obj[17].Attribut = AUSGANG_RECHTS;
+	_G(spieler).room_e_obj[17].Attribut = EXIT_RIGHT;
 	_G(spieler_vector)[P_CHEWY].Count = tmp;
 	get_phase(&_G(spieler_vector)[P_CHEWY], &_G(spieler_mi)[P_CHEWY]);
 	_G(mov)->continue_auto_go();
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index f1fc7cc661f..0991c4f1b80 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -49,7 +49,7 @@ void Room11::entry() {
 		if (!_G(spieler).R11DoorRightB) {
 			_G(obj)->calc_rsi_flip_flop(SIB_TBUTTON2_R11);
 			_G(spieler).R11DoorRightB = exit_flip_flop(5, 22, -1, 98, -1, -1,
-				AUSGANG_OBEN, -1, (int16)_G(spieler).R11DoorRightB);
+				EXIT_TOP, -1, (int16)_G(spieler).R11DoorRightB);
 			_G(obj)->calc_all_static_detail();
 		}
 
@@ -142,7 +142,7 @@ int16 Room11::scanner() {
 		if (!_G(spieler).R11CardOk) {
 			actionFl = true;
 			startAadWait(13);
-		} else if (is_cur_inventar(BORK_INV)) {
+		} else if (isCurInventory(BORK_INV)) {
 			hideCur();
 			setupScreen(DO_SETUP);
 			actionFl = true;
@@ -191,7 +191,7 @@ void Room11::get_card() {
 }
 
 void Room11::put_card() {
-	if (is_cur_inventar(RED_CARD_INV) || is_cur_inventar(YEL_CARD_INV)) {
+	if (isCurInventory(RED_CARD_INV) || isCurInventory(YEL_CARD_INV)) {
 		_G(spieler).R11IdCardNr = _G(spieler).AkInvent;
 		delInventory(_G(spieler).R11IdCardNr);
 		_G(det)->startDetail(0, 255, ANI_FRONT);
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index cde31cf0dc3..6c6a9c98242 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -74,7 +74,7 @@ void Room13::entry() {
 		}
 		
 		if (!_G(flags).LoadGame && _G(spieler).R13Band) {
-			_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[25].Attribut = EXIT_TOP;
 			_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 			_G(spieler).R13Band = false;
 		}
@@ -85,7 +85,7 @@ void Room13::entry() {
 }
 
 void Room13::xit() {
-	_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[25].Attribut = EXIT_TOP;
 	_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 	_G(spieler).R13Band = false;
 }
@@ -147,8 +147,8 @@ void Room13::talk_bork() {
 		_G(obj)->show_sib(SIB_TBUTTON3_R11);
 
 		if (_G(spieler).R6DoorRightB)
-			_G(spieler).room_e_obj[20].Attribut = AUSGANG_LINKS;
-		_G(spieler).room_e_obj[21].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[20].Attribut = EXIT_LEFT;
+		_G(spieler).room_e_obj[21].Attribut = EXIT_TOP;
 	}
 }
 
@@ -200,7 +200,7 @@ void Room13::jmp_floor() {
 		if (!_G(spieler).R13Surf)
 			_G(obj)->show_sib(SIB_BANDBUTTON_R13);
 
-		_G(spieler).room_e_obj[25].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[25].Attribut = EXIT_TOP;
 		_G(atds)->set_steuer_bit(100, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler).R13Band = false;
 		autoMove(5, P_CHEWY);
diff --git a/engines/chewy/rooms/room14.cpp b/engines/chewy/rooms/room14.cpp
index 2bbe54a8086..3c289bca845 100644
--- a/engines/chewy/rooms/room14.cpp
+++ b/engines/chewy/rooms/room14.cpp
@@ -156,7 +156,7 @@ void Room14::feuer() {
 	_G(flags).AutoAniPlay = true;
 	hideCur();
 
-	if (is_cur_inventar(BWAFFE_INV)) {
+	if (isCurInventory(BWAFFE_INV)) {
 		autoMove(5, P_CHEWY);
 		waffe = true;
 		_G(spieler)._personHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room16.cpp b/engines/chewy/rooms/room16.cpp
index eefbdbf42a5..3a8472c2303 100644
--- a/engines/chewy/rooms/room16.cpp
+++ b/engines/chewy/rooms/room16.cpp
@@ -38,7 +38,7 @@ void Room16::entry() {
 		_G(atds)->del_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATA);
 	} else {
 		_G(det)->hideStaticSpr(4);
-		_G(spieler).room_e_obj[32].Attribut = AUSGANG_LINKS;
+		_G(spieler).room_e_obj[32].Attribut = EXIT_LEFT;
 		_G(atds)->set_steuer_bit(124, ATS_AKTIV_BIT, ATS_DATA);
 	}
 }
diff --git a/engines/chewy/rooms/room17.cpp b/engines/chewy/rooms/room17.cpp
index 172c1f8dc76..c099c75099c 100644
--- a/engines/chewy/rooms/room17.cpp
+++ b/engines/chewy/rooms/room17.cpp
@@ -85,12 +85,12 @@ void Room17::entry() {
 		_G(spieler).room_e_obj[38].Attribut = 255;
 
 		if (_G(spieler).R6DoorLeftF)
-			_G(spieler).room_e_obj[39].Attribut = AUSGANG_RECHTS;
+			_G(spieler).room_e_obj[39].Attribut = EXIT_RIGHT;
 		else
 			_G(spieler).room_e_obj[39].Attribut = 255;
 
 		if (_G(spieler).R18DoorBruecke)
-			_G(spieler).room_e_obj[35].Attribut = AUSGANG_LINKS;
+			_G(spieler).room_e_obj[35].Attribut = EXIT_LEFT;
 		else
 			_G(spieler).room_e_obj[35].Attribut = 255;
 	}
@@ -98,13 +98,13 @@ void Room17::entry() {
 
 void Room17::xit() {
 	if (_G(spieler).R17DoorKommand)
-		_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[36].Attribut = EXIT_TOP;
 	else
 		_G(spieler).room_e_obj[36].Attribut = 255;
 
 	_G(spieler).room_e_obj[35].Attribut = 255;
 	_G(spieler).room_e_obj[39].Attribut = 255;
-	_G(spieler).room_e_obj[38].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[38].Attribut = EXIT_TOP;
 }
 
 bool Room17::timer(int16 t_nr, int16 ani_nr) {
@@ -137,7 +137,7 @@ void Room17::gedAction(int index) {
 int16 Room17::use_seil() {
 	int16 action_flag = false;
 
-	if (!_G(flags).AutoAniPlay && _G(spieler).R17Location == 1 && is_cur_inventar(SEIL_INV)) {
+	if (!_G(flags).AutoAniPlay && _G(spieler).R17Location == 1 && isCurInventory(SEIL_INV)) {
 		action_flag = true;
 		hideCur();
 
@@ -242,7 +242,7 @@ void Room17::door_kommando(int16 mode) {
 
 		if (!mode) {
 			if (!_G(spieler).R17DoorKommand) {
-				_G(spieler).room_e_obj[36].Attribut = AUSGANG_OBEN;
+				_G(spieler).room_e_obj[36].Attribut = EXIT_TOP;
 				_G(spieler).R17DoorKommand = true;
 				startSetailWait(4, 1, ANI_FRONT);
 				stopPerson(P_CHEWY);
@@ -274,7 +274,7 @@ int16 Room17::energie_hebel() {
 	autoMove(7, P_CHEWY);
 
 	if (!_G(spieler).R17HebelOk) {
-		if (is_cur_inventar(BECHER_VOLL_INV)) {
+		if (isCurInventory(BECHER_VOLL_INV)) {
 			delInventory(_G(spieler).AkInvent);
 			_G(spieler).R17HebelOk = true;
 			startAadWait(38);
@@ -321,7 +321,7 @@ int16 Room17::get_oel() {
 		autoMove(4, P_CHEWY);
 		start_spz_wait(CH_EKEL, 3, false, P_CHEWY);
 		startAadWait(60);
-	} else if (is_cur_inventar(BECHER_LEER_INV)) {
+	} else if (isCurInventory(BECHER_LEER_INV)) {
 		action_flag = true;
 		close_door();
 		autoMove(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 2370d0a9e10..f8b739a6c67 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -226,7 +226,7 @@ int16 Room18::sonden_moni() {
 int16 Room18::calc_surimy() {
 	int16 action_flag = false;
 
-	if (is_cur_inventar(SURIMY_INV)) {
+	if (isCurInventory(SURIMY_INV)) {
 		action_flag = true;
 
 		hideCur();
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 45e7323b9c0..54a386a3636 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -225,7 +225,7 @@ void Room21::salto() {
 
 void Room21::use_gitter_energie() {
 	_G(spieler).R21GitterEnergie = exit_flip_flop(-1, 47, -1, 131, 138, -1,
-		AUSGANG_UNTEN, AUSGANG_OBEN, (int16)_G(spieler).R21GitterEnergie);
+		EXIT_BOTTOM, EXIT_TOP, (int16)_G(spieler).R21GitterEnergie);
 	_G(auto_obj) = 0;
 	_G(spieler).R17Location = 1;
 	_G(spieler)._personHide[P_CHEWY] = true;
@@ -253,7 +253,7 @@ int16 Room21::use_fenster() {
 			_G(spieler).R18FirstEntry = true;
 		}
 
-		_G(spieler).room_e_obj[50].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[50].Attribut = EXIT_TOP;
 		_G(spieler).room_e_obj[41].Attribut = 255;
 		_G(flags).AutoAniPlay = false;
 	}
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index e18d32e4d3b..53dc6d17c9a 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -181,7 +181,7 @@ void Room22::get_bork() {
 int16 Room22::malen() {
 	int16 action_flag = false;
 
-	if (!_G(flags).AutoAniPlay && is_cur_inventar(17)) {
+	if (!_G(flags).AutoAniPlay && isCurInventory(17)) {
 		action_flag = true;
 		_G(flags).AutoAniPlay = true;
 		autoMove(8, P_CHEWY);
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index 31daf72074c..4e441f066f4 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -113,7 +113,7 @@ int16 Room25::gleiter_loesch() {
 		}
 
 	} else if (_G(spieler).R25GleiteLoesch) {
-		if (is_cur_inventar(MILCH_LEER_INV)) {
+		if (isCurInventory(MILCH_LEER_INV)) {
 			action_flag = true;
 			autoMove(2, P_CHEWY);
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? 28 : 14, 1, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room28.cpp b/engines/chewy/rooms/room28.cpp
index 60b94d19ef6..94861946223 100644
--- a/engines/chewy/rooms/room28.cpp
+++ b/engines/chewy/rooms/room28.cpp
@@ -169,7 +169,7 @@ void Room28::haendler() {
 	_G(spieler).R28ChewyPump = true;
 	delInventory(K_MASKE_INV);
 	_G(atds)->set_ats_str(209, 1, ATS_DATA);
-	_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[69].Attribut = EXIT_TOP;
 	load_chewy_taf(CHEWY_PUMPKIN);
 
 	setPersonPos(480, 113, P_HOWARD, P_RIGHT);
@@ -262,7 +262,7 @@ void Room28::set_pump() {
 			_G(spieler).R28ChewyPump = true;
 
 			if (_G(spieler).R39TranslatorUsed) {
-				_G(spieler).room_e_obj[69].Attribut = AUSGANG_OBEN;
+				_G(spieler).room_e_obj[69].Attribut = EXIT_TOP;
 			} else {
 				_G(atds)->set_ats_str(209, 1, ATS_DATA);
 			}
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index 7afe38e4a72..c247904d5f0 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -71,7 +71,7 @@ int16 Room29::use_pumpe() {
 	if (!_G(spieler).R29Pumpe) {
 		hideCur();
 
-		if (is_cur_inventar(SCHLAUCH_INV)) {
+		if (isCurInventory(SCHLAUCH_INV)) {
 			action_flag = true;
 			_G(spieler).R29Pumpe = true;
 			_G(spieler).R29Schlauch1 = true;
@@ -109,7 +109,7 @@ int16 Room29::get_schlauch() {
 bool Room29::use_schlauch() {
 	bool result = false;
 
-	if (is_cur_inventar(PUMPE_INV)) {
+	if (isCurInventory(PUMPE_INV)) {
 		result = true;
 		hideCur();
 
diff --git a/engines/chewy/rooms/room31.cpp b/engines/chewy/rooms/room31.cpp
index d2f4421647c..06f2ec1dac9 100644
--- a/engines/chewy/rooms/room31.cpp
+++ b/engines/chewy/rooms/room31.cpp
@@ -79,7 +79,7 @@ void Room31::calc_luke() {
 
 		_G(atds)->set_ats_str(244, 1, ATS_DATA);
 		_G(atds)->del_steuer_bit(245, ATS_AKTIV_BIT, ATS_DATA);
-		_G(spieler).room_e_obj[75].Attribut = AUSGANG_UNTEN;
+		_G(spieler).room_e_obj[75].Attribut = EXIT_BOTTOM;
 
 	} else {
 		for (int16 i = 0; i < 3; i++)
@@ -146,7 +146,7 @@ int16 Room31::use_topf() {
 	hideCur();
 	if (_G(spieler).inv_cur) {
 		if (_G(spieler).R31PflanzeWeg) {
-			if (is_cur_inventar(K_KERNE_INV)) {
+			if (isCurInventory(K_KERNE_INV)) {
 				_G(spieler).R31KoernerDa = true;
 				autoMove(1, P_CHEWY);
 				start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -155,7 +155,7 @@ int16 Room31::use_topf() {
 				dia_nr = 150;
 				_G(atds)->set_ats_str(242, 2, ATS_DATA);
 
-			} else if (is_cur_inventar(MILCH_WAS_INV)) {
+			} else if (isCurInventory(MILCH_WAS_INV)) {
 				if (_G(spieler).R31KoernerDa) {
 					_G(spieler).R31Wasser = true;
 					autoMove(1, P_CHEWY);
@@ -172,7 +172,7 @@ int16 Room31::use_topf() {
 					ani_nr = CH_TALK5;
 					dia_nr = 152;
 				}
-			} else if (is_cur_inventar(SURIMY_INV)) {
+			} else if (isCurInventory(SURIMY_INV)) {
 				if (!_G(spieler).R31SurFurz) {
 					if (_G(spieler).R31Wasser) {
 						if (!_G(spieler).R28SurimyCar) {
diff --git a/engines/chewy/rooms/room32.cpp b/engines/chewy/rooms/room32.cpp
index 3210d631abc..a932bd48cfb 100644
--- a/engines/chewy/rooms/room32.cpp
+++ b/engines/chewy/rooms/room32.cpp
@@ -40,7 +40,7 @@ int16 Room32::use_howard() {
 	int16 action_flag = false;
 	hideCur();
 
-	if (is_cur_inventar(TRICHTER_INV)) {
+	if (isCurInventory(TRICHTER_INV)) {
 		if (_G(spieler).R33MunterGet) {
 			autoMove(1, P_CHEWY);
 			cur_2_inventory();
@@ -75,7 +75,7 @@ int16 Room32::use_howard() {
 			ani_nr = CH_TALK12;
 			dia_nr = 73;
 		}
-	} else if (is_cur_inventar(MUNTER_INV)) {
+	} else if (isCurInventory(MUNTER_INV)) {
 		ani_nr = CH_TALK12;
 		dia_nr = 74;
 	}
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 85dfe56e986..bec52b46f6b 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -76,7 +76,7 @@ int16 Room35::use_cat() {
 	hideCur();
 
 	if (_G(spieler).ChewyAni != CHEWY_ROCKER) {
-		if (is_cur_inventar(TRANSLATOR_INV)) {
+		if (isCurInventory(TRANSLATOR_INV)) {
 			action_flag = true;
 			autoMove(4, P_CHEWY);
 			_G(spieler).R35TransCat = true;
@@ -84,7 +84,7 @@ int16 Room35::use_cat() {
 			flic_cut(FCUT_045);
 			start_spz(CH_TRANS, 1, ANI_FRONT, P_CHEWY);
 			startAadWait(94);
-		} else if (is_cur_inventar(PUTENKEULE_INV)) {
+		} else if (isCurInventory(PUTENKEULE_INV)) {
 			action_flag = true;
 			disable_timer();
 			autoMove(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 91a7a077318..63e3b7f508e 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -105,7 +105,7 @@ short Room37::use_wippe() {
 	if (_G(spieler).inv_cur) {
 		action_flag = true;
 
-		if (is_cur_inventar(H_FUTTER_INV)) {
+		if (isCurInventory(H_FUTTER_INV)) {
 			hideCur();
 			autoMove(0, P_CHEWY);
 			_G(flags).NoScroll = true;
@@ -166,7 +166,7 @@ int16 Room37::use_glas() {
 
 	if (!_G(spieler).R37Gebiss) {
 		action_flag = true;
-		if (is_cur_inventar(ANGEL2_INV)) {
+		if (isCurInventory(ANGEL2_INV)) {
 			_G(flags).NoScroll = true;
 			hideCur();
 			autoMove(5, P_CHEWY);
@@ -282,7 +282,7 @@ void Room37::talk_hahn() {
 }
 
 void Room37::use_hahn() {
-	if (is_cur_inventar(TRANSLATOR_INV)) {
+	if (isCurInventory(TRANSLATOR_INV)) {
 		hideCur();
 		autoMove(7, P_CHEWY);
 		_G(spieler).R37TransHahn = true;
@@ -295,7 +295,7 @@ void Room37::use_hahn() {
 		hahn_dia();
 
 	} else if (_G(spieler).R37TransHahn) {
-		if (is_cur_inventar(GEBISS_INV)) {
+		if (isCurInventory(GEBISS_INV)) {
 			_G(spieler).R37Kloppe = true;
 			hideCur();
 			autoMove(6, P_CHEWY);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index bfb72cb61b5..c0e636d937b 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -75,7 +75,7 @@ short Room39::use_howard() {
 	if (!_G(spieler).R39HowardWach) {
 		int16 dia_nr;
 		if (_G(spieler).inv_cur) {
-			if (is_cur_inventar(MANUSKRIPT_INV)) {
+			if (isCurInventory(MANUSKRIPT_INV)) {
 				hideCur();
 				_G(spieler).R39HowardWach = true;
 				_G(spieler).R39ScriptOk = true;
@@ -172,7 +172,7 @@ int16 Room39::use_tv() {
 	autoMove(2, P_CHEWY);
 	int16 cls_flag = false;
 
-	if (is_cur_inventar(ZAPPER_INV)) {
+	if (isCurInventory(ZAPPER_INV)) {
 		_G(maus_links_click) = false;
 		
 		_G(spieler).R39TvOn = true;
@@ -211,7 +211,7 @@ int16 Room39::use_tv() {
 		}
 
 		action_flag = true;
-	} else if (is_cur_inventar(TRANSLATOR_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
+	} else if (isCurInventory(TRANSLATOR_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 		action_flag = true;
 		if (_G(spieler).R39TvOn) {
 			start_spz_wait(CH_TRANS, 1, false, P_CHEWY);
@@ -243,7 +243,7 @@ int16 Room39::use_tv() {
 
 		set_tv();
 
-	} else if (is_cur_inventar(RECORDER_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
+	} else if (isCurInventory(RECORDER_INV) && _G(spieler).ChewyAni != CHEWY_ROCKER) {
 		action_flag = true;
 		if (_G(spieler).R39TvOn) {
 			if (_G(spieler).R39TranslatorUsed) {
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index b0292da7948..5b11b53843a 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -521,7 +521,7 @@ int16 Room40::use_bmeister() {
 		cursorChoice(_G(menu_item));
 		showCur();
 
-	} else if (is_cur_inventar(LIKOER2_INV)) {
+	} else if (isCurInventory(LIKOER2_INV)) {
 		action_flag = true;
 		if (_G(spieler).flags37_80) {
 			startAadWait(605);
@@ -633,7 +633,7 @@ int16 Room40::use_tele() {
 			int16 timer_wert = 0;
 
 			if (dia_nr1 == 223) {
-				if (is_cur_inventar(DUENGER_INV)) {
+				if (isCurInventory(DUENGER_INV)) {
 					delInventory(_G(spieler).AkInvent);
 				} else {
 					remove_inventory(DUENGER_INV);
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index 0b562cceb6c..ca49211b382 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -213,14 +213,14 @@ int16 Room41::use_brief() {
 	int16 action_flag = false;
 	hideCur();
 
-	if (is_cur_inventar(BRIEF_INV)) {
+	if (isCurInventory(BRIEF_INV)) {
 		action_flag = true;
 		stop_hoggy();
 		autoMove(6, P_CHEWY);
 		startAadWait(126);
 		start_hoggy();
 
-	} else if (is_cur_inventar(BRIEF2_INV)) {
+	} else if (isCurInventory(BRIEF2_INV)) {
 		action_flag = true;
 		autoMove(6, P_CHEWY);
 		delInventory(_G(spieler).AkInvent);
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 2cd4bd14520..9b827152e76 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -116,7 +116,7 @@ int16 Room42::use_psack() {
 		autoMove(4, P_CHEWY);
 		startAadWait(185);
 		_G(spieler).R42HoToBeamter = false;
-	} else if (is_cur_inventar(BRIEF2_INV)) {
+	} else if (isCurInventory(BRIEF2_INV)) {
 		action_flag = true;
 		autoMove(3, P_CHEWY);
 		_G(spieler)._personHide[P_CHEWY] = true;
@@ -131,7 +131,7 @@ int16 Room42::use_psack() {
 		_G(spieler).R28PostCar = true;
 		_G(spieler).R42BriefOk = true;
 
-	} else if (is_cur_inventar(BRIEF_INV)) {
+	} else if (isCurInventory(BRIEF_INV)) {
 		action_flag = true;
 		startAadWait(182);
 	}
@@ -179,7 +179,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 	hideCur();
 
 	if (str_end_nr != 4) {
-		while (_G(atds)->aad_get_status() != -1) {
+		while (_G(atds)->aadGetStatus() != -1) {
 			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
@@ -205,7 +205,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 			break;
 		}
 	} else {
-		while (_G(atds)->aad_get_status() < 2) {
+		while (_G(atds)->aadGetStatus() < 2) {
 			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
@@ -215,7 +215,7 @@ void Room42::dia_beamter(int16 str_end_nr) {
 		startSetailWait(1, 1, ANI_FRONT);
 		_G(det)->startDetail(2, 255, ANI_FRONT);
 
-		while (_G(atds)->aad_get_status() != -1) {
+		while (_G(atds)->aadGetStatus() != -1) {
 			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 		}
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index 0e94a4c2ea0..ae855c1fe92 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -181,13 +181,13 @@ int16 Room45::use_taxi() {
 			action_ret = true;
 			taxi_mov();
 		}
-	} else if (is_cur_inventar(RING_INV)) {
+	} else if (isCurInventory(RING_INV)) {
 		action_ret = true;
 		delInventory(RING_INV);
 		talk_taxi(256);
 		_G(spieler).R45TaxiOk = true;
 		taxi_mov();
-	} else if (is_cur_inventar(UHR_INV)) {
+	} else if (isCurInventory(UHR_INV)) {
 		action_ret = true;
 		talk_taxi(400);
 	}
@@ -240,7 +240,7 @@ int16 Room45::use_boy() {
 	autoMove(2, P_CHEWY);
 
 	if (!_G(spieler).R45MagOk) {
-		if (is_cur_inventar(DOLLAR175_INV)) {
+		if (isCurInventory(DOLLAR175_INV)) {
 			action_ret = true;
 			new_invent_2_cur(CUTMAG_INV);
 			_G(atds)->set_ats_str(DOLLAR175_INV, 1, INV_ATS_DATA);
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 27e0b88e70f..a066a5ac72e 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -165,7 +165,7 @@ void Room46::kloppe() {
 			continue;
 		}
 		
-		while (_G(in)->get_switch_code() == Common::KEYCODE_INVALID && delay) {
+		while (_G(in)->getSwitchCode() == Common::KEYCODE_INVALID && delay) {
 			--delay;
 			SHOULD_QUIT_RETURN;
 		}
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index a8eb98d78f8..5c8778044f2 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -150,17 +150,17 @@ void Room49::calc_boy() {
 int16 Room49::use_boy() {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(SPARK_INV)) {
+	if (isCurInventory(SPARK_INV)) {
 		action_ret = true;
 		hideCur();
 		autoMove(3, P_CHEWY);
 		delInventory(_G(spieler).AkInvent);
 		talk_boy(265);
 		_G(spieler).R49WegFrei = true;
-		_G(spieler).room_e_obj[80].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[80].Attribut = EXIT_TOP;
 		showCur();
 
-	} else if (is_cur_inventar(CIGAR_INV)) {
+	} else if (isCurInventory(CIGAR_INV)) {
 		action_ret = true;
 		use_boy_cigar();
 	}
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 6f38622f6d3..6d45f4788a8 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -161,7 +161,7 @@ void Room50::calc_treppe() {
 int16 Room50::use_gutschein() {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(HOTEL_INV)) {
+	if (isCurInventory(HOTEL_INV)) {
 		action_ret = true;
 		if (!_G(spieler).R50KeyOK) {
 			hideCur();
@@ -183,7 +183,7 @@ int16 Room50::use_gutschein() {
 int16 Room50::use_gum() {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(GUM_INV)) {
+	if (isCurInventory(GUM_INV)) {
 		action_ret = true;
 		hideCur();
 		_G(spieler).R50KeyOK = true;
@@ -222,7 +222,7 @@ int16 Room50::use_gum() {
 		inventory_2_cur(KEY_INV);
 		_G(atds)->set_ats_str(323, 1, ATS_DATA);
 		_G(atds)->set_ats_str(327, 1, ATS_DATA);
-		_G(spieler).room_e_obj[84].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[84].Attribut = EXIT_TOP;
 		showCur();
 	}
 
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 5c2dc7b24a8..d538ec52cae 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -143,7 +143,7 @@ void Room51::setup_func() {
 
 		_G(det)->setStaticPos(17, _tmpx, _tmpy, false, false);
 
-		if ((_G(minfo)._button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
+		if ((_G(minfo)._button == 1 || _G(in)->getSwitchCode() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->setSetailPos(8, _tmpx - 20, _tmpy + 41);
 			startSetailWait(8, 1, ANI_FRONT);
@@ -208,7 +208,7 @@ void Room51::setup_func() {
 int16 Room51::use_door(int16 txt_nr) {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(KEY_INV)) {
+	if (isCurInventory(KEY_INV)) {
 		hideCur();
 		action_ret = true;
 
@@ -222,7 +222,7 @@ int16 Room51::use_door(int16 txt_nr) {
 				autoMove(11, P_HOWARD);
 				setPersonSpr(P_LEFT, P_HOWARD);
 				_G(spieler).R51HotelRoom = true;
-				_G(spieler).room_e_obj[86].Attribut = AUSGANG_LINKS;
+				_G(spieler).room_e_obj[86].Attribut = EXIT_LEFT;
 				startAadWait(285);
 				_G(atds)->set_ats_str(329, 1, ATS_DATA);
 				_G(SetUpScreenFunc) = setup_func;
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 61848cff01b..679598a813e 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -72,7 +72,7 @@ int16 Room52::use_hot_dog() {
 	int16 action_ret = false;
 	hideCur();
 
-	if (is_cur_inventar(BURGER_INV)) {
+	if (isCurInventory(BURGER_INV)) {
 		action_ret = true;
 		autoMove(3, P_CHEWY);
 		start_spz_wait(CH_ROCK_GET1, 1, false, P_CHEWY);
@@ -88,7 +88,7 @@ int16 Room52::use_hot_dog() {
 		setPersonSpr(P_LEFT, P_CHEWY);
 		startAadWait(288);
 
-	} else if (is_cur_inventar(KILLER_INV)) {
+	} else if (isCurInventory(KILLER_INV)) {
 		action_ret = true;
 		autoMove(5, P_CHEWY);
 		_G(spieler)._personHide[P_CHEWY] = true;
diff --git a/engines/chewy/rooms/room53.cpp b/engines/chewy/rooms/room53.cpp
index 3158de5f90d..e706c0c3203 100644
--- a/engines/chewy/rooms/room53.cpp
+++ b/engines/chewy/rooms/room53.cpp
@@ -76,7 +76,7 @@ void Room53::talk_man() {
 int16 Room53::use_man() {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(BESTELL_INV)) {
+	if (isCurInventory(BESTELL_INV)) {
 		action_ret = true;
 		hideCur();
 		_G(spieler).R53Kostuem = true;
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index c2d39f2850b..b328f28a577 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -229,7 +229,7 @@ int16 Room54::use_zelle() {
 	hideCur();
 
 	if (_G(spieler).inv_cur) {
-		if (is_cur_inventar(JMKOST_INV)) {
+		if (isCurInventory(JMKOST_INV)) {
 			action_ret = true;
 
 			if (!_G(spieler).R54Schild) {
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index 673836b3220..276eaa53e03 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -146,7 +146,7 @@ int16 Room55::use_stapel1() {
 			action_ret = true;
 			startAadWait(333);
 		}
-	} else if (is_cur_inventar(MANUSKRIPT_INV)) {
+	} else if (isCurInventory(MANUSKRIPT_INV)) {
 		action_ret = true;
 
 		if (_G(spieler).R55ScriptWeg) {
@@ -167,7 +167,7 @@ int16 Room55::use_stapel1() {
 int16 Room55::use_stapel2() {
 	int16 action_ret = false;
 
-	if (is_cur_inventar(MANUSKRIPT_INV)) {
+	if (isCurInventory(MANUSKRIPT_INV)) {
 		action_ret = true;
 		hideCur();
 		startAadWait(327);
@@ -357,7 +357,7 @@ void Room55::strasse(int16 mode) {
 int16 Room55::use_kammeraus() {
 	int16 action_ret = false;
 
-	if (_G(spieler).R55Location && is_cur_inventar(KILLER_INV)) {
+	if (_G(spieler).R55Location && isCurInventory(KILLER_INV)) {
 		action_ret = true;
 
 		if (!_G(spieler).R52KakerWeg)
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index ba360e577fb..862e7dd1a14 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -249,7 +249,7 @@ void Room56::talk_man() {
 
 int16 Room56::use_man() {
 	int16 action_ret = false;
-	if (_G(spieler).flags32_10 || !is_cur_inventar(FLASCHE_INV))
+	if (_G(spieler).flags32_10 || !isCurInventory(FLASCHE_INV))
 		return action_ret;
 	
 	action_ret = true;
@@ -327,7 +327,7 @@ int16 Room56::use_kneipe() {
 			}
 			showCur();
 		}
-	} else if (is_cur_inventar(18)) {
+	} else if (isCurInventory(18)) {
 		hideCur();
 		if (_G(spieler).flags34_10) {
 			_G(spieler).flags33_80 = true;
@@ -370,7 +370,7 @@ int16 Room56::use_kneipe() {
 int16 Room56::proc1(int16 key) {
 	int16 retVal = 0;
 
-	if (_G(in)->get_switch_code() == 1)
+	if (_G(in)->getSwitchCode() == 1)
 		retVal = -1;
 
 	return retVal;
@@ -443,7 +443,7 @@ void Room56::setup_func() {
 	
 	if (!_G(atds)->get_steuer_bit(362, ATS_AKTIV_BIT, ATS_DATA) && _G(menu_item) == CUR_WALK) {
 		if (_G(minfo).x + _G(spieler).scrollx >= 157 && _G(minfo).x + _G(spieler).scrollx <= 204 && _G(minfo).y >= 28 && _G(minfo).y <= 89)
-			cursorChoice(CUR_AUSGANG_OBEN);
+			cursorChoice(CUR_EXIT_TOP);
 		else
 			cursorChoice(CUR_WALK);
 	}
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 2d429320410..4c6f78de783 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -115,7 +115,7 @@ int16 Room57::use_pfoertner() {
 	_G(det)->set_static_ani(3, -1);
 	hideCur();
 	autoMove(1, P_CHEWY);
-	if (is_cur_inventar(CUTMAG_INV)) {
+	if (isCurInventory(CUTMAG_INV)) {
 		action_ret = true;
 		if (_G(spieler).flags37_10)
 			startAadWait(596);
@@ -124,10 +124,10 @@ int16 Room57::use_pfoertner() {
 			startAadWait(339);
 			new_invent_2_cur(BESTELL_INV);
 		}
-	} else if (is_cur_inventar(JMKOST_INV)) {
+	} else if (isCurInventory(JMKOST_INV)) {
 		action_ret = true;
 		startAadWait(340);
-	} else if (is_cur_inventar(EINLAD_INV)) {
+	} else if (isCurInventory(EINLAD_INV)) {
 		action_ret = true;
 		_G(SetUpScreenFunc) = nullptr;
 		goAutoXy(132, 130, P_HOWARD, ANI_WAIT);
@@ -136,7 +136,7 @@ int16 Room57::use_pfoertner() {
 			goAutoXy(176, 130, P_HOWARD, ANI_WAIT);
 			delInventory(_G(spieler).AkInvent);
 			_G(spieler).R57StudioAuf = true;
-			_G(spieler).room_e_obj[91].Attribut = AUSGANG_OBEN;
+			_G(spieler).room_e_obj[91].Attribut = EXIT_TOP;
 			_G(det)->hideStaticSpr(4);
 			startSetailWait(6, 1, ANI_WAIT);
 			g_engine->_sound->stopSound(0);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 7d72fe89aa7..5035057af01 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -97,7 +97,7 @@ void Room62::setup_func() {
 
 int16 Room62::use_laura() {
 	int16 action_ret = false;
-	if (is_cur_inventar(GERAET_INV)) {
+	if (isCurInventory(GERAET_INV)) {
 		action_ret = true;
 		hideCur();
 		autoMove(2, P_CHEWY);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index 461d4be8a51..479a2ed8d8c 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -132,7 +132,7 @@ void Room63::setup_func() {
 void Room63::bork_platt() {
 	_G(spieler).R62LauraVerwandlung = false;
 	_G(r63Schalter) = false;
-	_G(spieler).room_e_obj[95].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[95].Attribut = EXIT_TOP;
 	flic_cut(FCUT_081);
 	flic_cut(FCUT_082);
 	_G(spieler)._personHide[P_CHEWY] = false;
@@ -195,7 +195,7 @@ void Room63::talk_fx_man() {
 
 int16 Room63::use_fx_man() {
 	int16 action_ret = false;
-	if (is_cur_inventar(MASKE_INV)) {
+	if (isCurInventory(MASKE_INV)) {
 		action_ret = true;
 		hideCur();
 		autoMove(1, P_CHEWY);
@@ -262,7 +262,7 @@ void Room63::talk_girl() {
 
 int16 Room63::use_girl() {
 	int16 action_ret = false;
-	if (is_cur_inventar(UHR_INV)) {
+	if (isCurInventory(UHR_INV)) {
 		action_ret = true;
 		hideCur();
 		autoMove(2, P_CHEWY);
@@ -292,7 +292,7 @@ int16 Room63::use_girl() {
 
 int16 Room63::use_aschenbecher() {
 	int16 action_ret = false;
-	if (is_cur_inventar(ASCHE_INV)) {
+	if (isCurInventory(ASCHE_INV)) {
 		action_ret = true;
 		_G(cur_hide_flag) = false;
 		hideCur();
diff --git a/engines/chewy/rooms/room66.cpp b/engines/chewy/rooms/room66.cpp
index 29d2ca2f385..66b12fad590 100644
--- a/engines/chewy/rooms/room66.cpp
+++ b/engines/chewy/rooms/room66.cpp
@@ -178,7 +178,7 @@ int Room66::proc2() {
 }
 
 int Room66::proc7() {
-	if (!is_cur_inventar(ARTE_INV))
+	if (!isCurInventory(ARTE_INV))
 		return 0;
 
 	hideCur();
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 5c0beda9bfa..26123b581fa 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -78,7 +78,7 @@ void Room67::setup_func() {
 
 int16 Room67::use_grammo() {
 	int16 action_flag = false;
-	if (is_cur_inventar(SCHALL_INV)) {
+	if (isCurInventory(SCHALL_INV)) {
 		hideCur();
 		action_flag = true;
 		autoMove(6, P_CHEWY);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index baf72c178f7..880ef137e41 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -181,7 +181,7 @@ void Room68::talk_indigo(int16 aad_nr) {
 int16 Room68::use_indigo() {
 	int16 action_flag = false;
 	hideCur();
-	if (is_cur_inventar(CLINT_500_INV)) {
+	if (isCurInventory(CLINT_500_INV)) {
 		action_flag = true;
 		if (_G(spieler).R68Lied) {
 			hideCur();
@@ -211,7 +211,7 @@ int16 Room68::use_indigo() {
 		} else {
 			talk_indigo(397);
 		}
-	} else if (is_cur_inventar(CLINT_1500_INV) || is_cur_inventar(CLINT_3000_INV)) {
+	} else if (isCurInventory(CLINT_1500_INV) || isCurInventory(CLINT_3000_INV)) {
 		action_flag = true;
 		startAadWait(393);
 	}
@@ -242,7 +242,7 @@ void Room68::talk_keeper() {
 
 int16 Room68::use_papagei() {
 	int16 action_flag = false;
-	if (is_cur_inventar(PAPAGEI_INV)) {
+	if (isCurInventory(PAPAGEI_INV)) {
 		hideCur();
 		action_flag = true;
 		_G(spieler).R68Papagei = true;
@@ -283,7 +283,7 @@ void Room68::calc_diva() {
 
 int16 Room68::use_keeper() {
 	int16 action_flag = false;
-	if (is_cur_inventar(BAR_GUT_INV)) {
+	if (isCurInventory(BAR_GUT_INV)) {
 		hideCur();
 		delInventory(_G(spieler).AkInvent);
 		action_flag = true;
@@ -303,7 +303,7 @@ int16 Room68::use_keeper() {
 int16 Room68::use_diva() {
 	int16 action_flag;
 	hideCur();
-	if (is_cur_inventar(B_MARY_INV)) {
+	if (isCurInventory(B_MARY_INV)) {
 		delInventory(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
@@ -312,7 +312,7 @@ int16 Room68::use_diva() {
 		startSetailWait(4, 1, ANI_FRONT);
 		_G(spieler).R68Gutschein = false;
 		_G(det)->showStaticSpr(3);
-	} else if (is_cur_inventar(B_MARY2_INV)) {
+	} else if (isCurInventory(B_MARY2_INV)) {
 		delInventory(_G(spieler).AkInvent);
 		action_flag = 1;
 		autoMove(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room74.cpp b/engines/chewy/rooms/room74.cpp
index f3e46ee9a04..077fc20056f 100644
--- a/engines/chewy/rooms/room74.cpp
+++ b/engines/chewy/rooms/room74.cpp
@@ -91,7 +91,7 @@ int Room74::proc1() {
 	int retVal = 0;
 	hideCur();
 
-	if (is_cur_inventar(MACHETE_INV)) {
+	if (isCurInventory(MACHETE_INV)) {
 		retVal = 1;
 		_G(spieler).R74CutRubberPlant = true;
 		autoMove(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room76.cpp b/engines/chewy/rooms/room76.cpp
index ebb46e23d4e..c8800d06f69 100644
--- a/engines/chewy/rooms/room76.cpp
+++ b/engines/chewy/rooms/room76.cpp
@@ -154,7 +154,7 @@ void Room76::proc5() {
 int Room76::proc6() {
 	int retVal = 0;
 
-	if (is_cur_inventar(93)) {
+	if (isCurInventory(93)) {
 		hideCur();
 		delInventory(_G(spieler).AkInvent);
 		_G(spieler).flags29_8 = true;
@@ -168,7 +168,7 @@ int Room76::proc6() {
 		startSetailWait(9, 1, ANI_FRONT);
 		startSetailWait(10, 1, ANI_FRONT);
 		showCur();
-	} else if (is_cur_inventar(94)) {
+	} else if (isCurInventory(94)) {
 		hideCur();
 		retVal = 1;
 		setPersonSpr(P_RIGHT, P_CHEWY);
@@ -180,7 +180,7 @@ int Room76::proc6() {
 }
 
 int Room76::proc7() {
-	if (!is_cur_inventar(96))
+	if (!isCurInventory(96))
 		return 0;
 	
 	if (_G(spieler).flags29_4) {
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index 3decca4f029..b37cd0020a8 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -68,7 +68,7 @@ void Room77::xit() {
 }
 
 int Room77::proc1() {
-	if (_G(spieler).flags29_4 || !is_cur_inventar(103))
+	if (_G(spieler).flags29_4 || !isCurInventory(103))
 		return 0;
 
 	hideCur();
@@ -97,7 +97,7 @@ int Room77::proc1() {
 }
 
 int Room77::proc2() {
-	if (_G(spieler).flags29_4 || !is_cur_inventar(100))
+	if (_G(spieler).flags29_4 || !isCurInventory(100))
 		return 0;
 
 	hideCur();
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 441adada1d9..ca972459822 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -111,17 +111,17 @@ int Room81::proc2() {
 	int aniId = -1;
 
 	hideCur();
-	if (is_cur_inventar(110)) {
+	if (isCurInventory(110)) {
 		autoMove(1, P_CHEWY);
 		start_spz_wait(13, 1, false, P_CHEWY);
 		aniId = 5;
 		diaNr = 462;
 		delInventory(_G(spieler).AkInvent);
 		_G(spieler).flags30_2 = true;
-	} else if (is_cur_inventar(104)) {
+	} else if (isCurInventory(104)) {
 		aniId = 4;
 		diaNr = 463;
-	} else if (is_cur_inventar(102)) {
+	} else if (isCurInventory(102)) {
 		aniId = 4;
 		diaNr = 464;
 	}
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 79ec68ab87c..9b13b033623 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -143,7 +143,7 @@ void Room82::talk3() {
 }
 
 int Room82::proc3() {
-	if (!is_cur_inventar(FOOD_CERTIFICATE_INV))
+	if (!isCurInventory(FOOD_CERTIFICATE_INV))
 		return 0;
 
 	hideCur();
@@ -188,7 +188,7 @@ void Room82::proc4() {
 }
 
 int Room82::proc6() {
-	if (!is_cur_inventar(105) && !is_cur_inventar(106))
+	if (!isCurInventory(105) && !isCurInventory(106))
 		return 0;
 
 	hideCur();
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index d602c667d83..a111fff64da 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -45,7 +45,7 @@ void Room84::entry() {
 	if (_G(spieler).R88UsedMonkey) {
 		_G(det)->del_static_ani(3);
 		_G(det)->stop_detail(0);
-		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[124].Attribut = EXIT_TOP;
 		_G(atds)->set_steuer_bit(478, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(479, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(485, 1, ATS_DATA);	
@@ -68,7 +68,7 @@ void Room84::entry() {
 		_G(atds)->set_steuer_bit(481, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_steuer_bit(482, ATS_AKTIV_BIT, ATS_DATA);
 		_G(atds)->set_ats_str(485, 1, ATS_DATA);		
-		_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+		_G(spieler).room_e_obj[124].Attribut = EXIT_TOP;
 	}
 
 	if (_G(flags).LoadGame) {
@@ -88,7 +88,7 @@ void Room84::entry() {
 			_G(spieler).scrollx = 250;
 			if (_G(spieler).flags32_40) {
 				startAadWait(481);
-				_G(spieler).room_e_obj[124].Attribut = AUSGANG_OBEN;
+				_G(spieler).room_e_obj[124].Attribut = EXIT_TOP;
 			}
 		}
 	} else if (_G(spieler).flags32_20) {
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index fca8ac0502a..2e08b80a60d 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -143,7 +143,7 @@ void Room86::setup_func() {
 }
 
 int Room86::proc2() {
-	if (!is_cur_inventar(94))
+	if (!isCurInventory(94))
 		return 0;
 
 	hideCur();
@@ -159,7 +159,7 @@ int Room86::proc2() {
 	_G(atds)->set_ats_str(497, 1, ATS_DATA);
 	_G(atds)->set_ats_str(498, 1, ATS_DATA);
 	_G(spieler).flags32_2 = true;
-	_G(spieler).room_e_obj[132].Attribut = AUSGANG_RECHTS;
+	_G(spieler).room_e_obj[132].Attribut = EXIT_RIGHT;
 	start_spz(CH_TALK12, 255, false, P_CHEWY);
 	startAadWait(468);
 
diff --git a/engines/chewy/rooms/room87.cpp b/engines/chewy/rooms/room87.cpp
index 16f41665288..7a8cf28527d 100644
--- a/engines/chewy/rooms/room87.cpp
+++ b/engines/chewy/rooms/room87.cpp
@@ -106,7 +106,7 @@ void Room87::xit(int16 eib_nr) {
 }
 
 int Room87::proc2(int16 txt_nr) {
-	if (!is_cur_inventar(107) && !is_cur_inventar(108))
+	if (!isCurInventory(107) && !isCurInventory(108))
 		return 0;
 
 	hideCur();
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 8a544d50cae..9114d35e49b 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -280,7 +280,7 @@ int Room90::getHubcaps() {
 }	
 
 int Room90::shootControlUnit() {
-	if (!is_cur_inventar(111))
+	if (!isCurInventory(111))
 		return 0;
 
 	hideCur();
@@ -322,7 +322,7 @@ int16 Room90::proc5(int16 key) {
 }
 
 int Room90::useSurimyOnWreck() {
-	if (!is_cur_inventar(18))
+	if (!isCurInventory(18))
 		return 0;
 
 	_G(spieler).flags34_10 = true;
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index de538ab45ca..3cdf417b5fa 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -130,7 +130,7 @@ void Room94::talk1() {
 }
 
 int Room94::giveGhostBottle() {
-	if (!is_cur_inventar(LIKOER2_INV))
+	if (!isCurInventory(LIKOER2_INV))
 		return 0;
 
 	hideCur();
@@ -157,7 +157,7 @@ int Room94::giveGhostBottle() {
 	_G(det)->del_static_ani(3);
 	startSetailWait(4, 1, ANI_FRONT);
 	_G(spieler).flags35_10 = true;
-	_G(spieler).room_e_obj[138].Attribut = AUSGANG_OBEN;
+	_G(spieler).room_e_obj[138].Attribut = EXIT_TOP;
 	_G(atds)->set_steuer_bit(522, ATS_AKTIV_BIT, ATS_DATA);
 	new_invent_2_cur(114);
 	
diff --git a/engines/chewy/rooms/room95.cpp b/engines/chewy/rooms/room95.cpp
index 003e1fc0aa3..b82cc875707 100644
--- a/engines/chewy/rooms/room95.cpp
+++ b/engines/chewy/rooms/room95.cpp
@@ -90,7 +90,7 @@ void Room95::setup_func() {
 int Room95::proc2() {
 	hideCur();
 	autoMove(3, P_CHEWY);
-	if (is_cur_inventar(113)) {
+	if (isCurInventory(113)) {
 		delInventory(_G(spieler).AkInvent);
 
 		start_spz_wait(14, 1, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index d6a0502f96e..fce03d3d12f 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -200,7 +200,7 @@ void Room97::setup_func() {
 
 	if (_G(spieler).flags37_1 && _G(menu_item) == CUR_WALK) {
 		if (_G(spieler).scrollx + _G(minfo).x >= 487 && _G(spieler).scrollx + _G(minfo).x <= 522 && _G(minfo).y >= 23 && _G(minfo).y <= 59)
-			cursorChoice(CUR_AUSGANG_OBEN);
+			cursorChoice(CUR_EXIT_TOP);
 		else
 			cursorChoice(CUR_WALK);
 	}
@@ -378,7 +378,7 @@ void Room97::proc4() {
 }
 
 int Room97::proc5() {
-	if (!is_cur_inventar(114))
+	if (!isCurInventory(114))
 		return 0;
 
 	hideCur();
@@ -469,7 +469,7 @@ int Room97::proc7() {
 }
 
 int Room97::proc8() {
-	if (!is_cur_inventar(94))
+	if (!isCurInventory(94))
 		return 0;
 
 	hideCur();
@@ -657,7 +657,7 @@ void Room97::proc13() {
 }
 
 int Room97::throwSlime() {
-	if (!is_cur_inventar(SLIME_INV))
+	if (!isCurInventory(SLIME_INV))
 		return 0;
 
 	_slimeThrown = true;
@@ -684,7 +684,7 @@ void Room97::sensorAnim() {
 	
 	while (_G(det)->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
-		if (_G(minfo)._button == 1 || _G(in)->get_switch_code() == 28) {
+		if (_G(minfo)._button == 1 || _G(in)->getSwitchCode() == 28) {
 			if (_G(spieler).inv_cur)
 				_G(maus_links_click) = true;
 		}
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 0f6e5ba09c7..efd99249985 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -145,7 +145,7 @@ void spriteEngine() {
 			break;
 
 		case ZOBJ_INVENTORY:
-			_G(out)->sprite_set(_G(inv_spr)[nr],
+			_G(out)->spriteSet(_G(inv_spr)[nr],
 			                 _G(spieler).room_m_obj[nr].X - _G(spieler).scrollx,
 			                 _G(spieler).room_m_obj[nr].Y - _G(spieler).scrolly, 0);
 			break;
@@ -203,7 +203,7 @@ void spriteEngine() {
 			}
 			break;
 		case ZOBJ_PROGANI:
-			_G(out)->sprite_set(_G(spr_info)[nr]._image, _G(spr_info)[nr]._x - _G(spieler).scrollx, _G(spr_info)[nr]._y - _G(spieler).scrolly, 0);
+			_G(out)->spriteSet(_G(spr_info)[nr]._image, _G(spr_info)[nr]._x - _G(spieler).scrollx, _G(spr_info)[nr]._y - _G(spieler).scrolly, 0);
 			break;
 
 		case ZOBJ_AUTO_OBJ: {
@@ -457,7 +457,7 @@ void startAadWait(int16 diaNr) {
 	_G(atds)->start_aad(diaNr);
 
 	while (!SHOULD_QUIT && (
-		_G(atds)->aad_get_status() != -1 ||
+		_G(atds)->aadGetStatus() != -1 ||
 		g_engine->_sound->isSpeechActive()
 		)) {
 		setupScreen(DO_SETUP);
@@ -534,11 +534,11 @@ void aadWait(int16 strNr) {
 	const int16 oldMouseLinksClick = _G(maus_links_click);
 	_G(maus_links_click) = false;
 	if (strNr == -1) {
-		while (_G(atds)->aad_get_status() != -1 && !SHOULD_QUIT) {
+		while (_G(atds)->aadGetStatus() != -1 && !SHOULD_QUIT) {
 			setupScreen(DO_SETUP);
 		}
 	} else {
-		while (_G(atds)->aad_get_status() < strNr && !SHOULD_QUIT) {
+		while (_G(atds)->aadGetStatus() < strNr && !SHOULD_QUIT) {
 			setupScreen(DO_SETUP);
 		}
 	}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 0775d36e10b..ac0fbdb4db7 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -135,7 +135,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 71:
-						if (is_cur_inventar(ZANGE_INV))
+						if (isCurInventory(ZANGE_INV))
 							Room8::hole_kohle();
 						else if (!_G(spieler).inv_cur)
 							Room8::start_verbrennen();
@@ -191,7 +191,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
 						break;
 
 					case 104:
-						if (is_cur_inventar(TRANSLATOR_INV)) {
+						if (isCurInventory(TRANSLATOR_INV)) {
 							autoMove(6, P_CHEWY);
 							_G(spieler).R14Translator = true;
 							startAadWait(25);
@@ -2172,11 +2172,11 @@ void calc_inv_use_txt(int16 test_nr) {
 		_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
 		_G(out)->back2screen(_G(workpage));
 
-		while (_G(in)->get_switch_code() != Common::KEYCODE_ESCAPE) {
+		while (_G(in)->getSwitchCode() != Common::KEYCODE_ESCAPE) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}
-		while (_G(in)->get_switch_code() != Common::KEYCODE_INVALID) {
+		while (_G(in)->getSwitchCode() != Common::KEYCODE_INVALID) {
 			g_events->update();
 			SHOULD_QUIT_RETURN;
 		}
@@ -2320,7 +2320,7 @@ bool calc_inv_no_use(int16 test_nr, int16 mode) {
 	bool ret = false;
 
 	switch (mode) {
-	case INVENTAR_NORMAL:
+	case INVENTORY_NORMAL:
 		inv_mode = IUID_IIB;
 		break;
 
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index ed1f4f04440..4068721d153 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -89,7 +89,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
 		// FIXME: We ignore mouse events because the game checks
 		// for left mouse down, instead of up, so releasing the
 		// mouse button results in video skipping
-		if (_G(in)->get_switch_code() == Common::KEYCODE_ESCAPE)
+		if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE)
 			skipVideo = true;
 
 		// Clear any pending keys
@@ -155,7 +155,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 
 		_G(atds)->print_aad(scrollx, scrolly);
 
-		if (cfoDecoder->endOfVideo() && _G(atds)->aad_get_status() != -1)
+		if (cfoDecoder->endOfVideo() && _G(atds)->aadGetStatus() != -1)
 			cfoDecoder->rewind();
 		break;
 	case FCUT_034:
@@ -192,7 +192,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		return (frame >= 12) ? false : true;
 	case FCUT_112:
 		// Room56::proc1
-		return (_G(in)->get_switch_code() == 1) ? false : true;
+		return (_G(in)->getSwitchCode() == 1) ? false : true;
 	default:
 		return true;
 	}


Commit: 5d579f2dff3bcbb638e765f577c3fa84303f8ba3
    https://github.com/scummvm/scummvm/commit/5d579f2dff3bcbb638e765f577c3fa84303f8ba3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:37:21-08:00

Commit Message:
CHEWY: Rename mouseLeftClick

Changed paths:
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/globals.h
    engines/chewy/main.cpp
    engines/chewy/menus.cpp
    engines/chewy/r_event.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room12.cpp
    engines/chewy/rooms/room13.cpp
    engines/chewy/rooms/room18.cpp
    engines/chewy/rooms/room23.cpp
    engines/chewy/rooms/room24.cpp
    engines/chewy/rooms/room29.cpp
    engines/chewy/rooms/room34.cpp
    engines/chewy/rooms/room37.cpp
    engines/chewy/rooms/room39.cpp
    engines/chewy/rooms/room40.cpp
    engines/chewy/rooms/room42.cpp
    engines/chewy/rooms/room45.cpp
    engines/chewy/rooms/room46.cpp
    engines/chewy/rooms/room48.cpp
    engines/chewy/rooms/room49.cpp
    engines/chewy/rooms/room50.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room54.cpp
    engines/chewy/rooms/room56.cpp
    engines/chewy/rooms/room57.cpp
    engines/chewy/rooms/room65.cpp
    engines/chewy/rooms/room80.cpp
    engines/chewy/rooms/room81.cpp
    engines/chewy/rooms/room82.cpp
    engines/chewy/rooms/room84.cpp
    engines/chewy/rooms/room85.cpp
    engines/chewy/rooms/room90.cpp
    engines/chewy/rooms/room91.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 8c75647faa6..f163f8a35e3 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -163,7 +163,7 @@ void MainMenu::animate() {
 	kb_mov(1);
 	calcMouseText(_G(minfo).x, _G(minfo).y, 1);
 	_G(cur)->plot_cur();
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(menu_flag) = 0;
 	_G(out)->setPointer(nullptr);
 	_G(out)->back2screen(_G(workpage));
@@ -258,10 +258,10 @@ void MainMenu::playGame() {
 	_G(inv_disp_ok) = false;
 	_G(cur_display) = true;
 	_G(tmp_menu_item) = 0;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
-	_G(flags).main_maus_flag = false;
+	_G(flags).mainMouseFlag = false;
 	_G(flags).MainInput = true;
 	_G(flags).ShowAtsInvTxt = true;
 	_G(cur)->show_cur();
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index bc6854ed990..08a1b79e63f 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -99,7 +99,7 @@ public:
 	int16 _ged_mov_ebene = 0;
 
 	bool _cur_display = false;
-	int16 _maus_links_click = 0;
+	int16 _mouseLeftClick = 0;
 	Common::String _calc_inv_text_str1, _calc_inv_text_str2;
 	bool _calc_inv_text_set = false;
 	bool _stopAutoMove[3] = { false };
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 4530bc23f42..7bcd70733b8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -541,7 +541,7 @@ void setupScreen(SetupScreenMode mode) {
 
 		if (_G(flags).AdsDialog)
 			adsMenu();
-		if (_G(maus_links_click)) {
+		if (_G(mouseLeftClick)) {
 			if (_G(menu_item) == CUR_WALK) {
 				if (_G(cur_ausgang_flag)) {
 					calc_ausgang(_G(minfo).x + _G(spieler).scrollx, _G(minfo).y + _G(spieler).scrolly);
@@ -631,7 +631,7 @@ void setupScreen(SetupScreenMode mode) {
 	_G(atds)->print_aad(_G(spieler).scrollx, _G(spieler).scrolly);
 	_G(atds)->print_ats(_G(spieler_vector)[P_CHEWY].Xypos[0] + CH_HOT_X,
 	                _G(spieler_vector)[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(menu_flag) = false;
 	if (mode == DO_SETUP) {
 		_G(out)->setPointer(nullptr);
@@ -709,7 +709,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 		}
 	}
 
-	if (_G(maus_links_click)) {
+	if (_G(mouseLeftClick)) {
 		if (_G(menu_item) != CUR_USE)
 			Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 		else {
@@ -718,7 +718,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
 			} else {
 				if (txt_mode == INVENTORY_NORMAL) {
 					if (!_G(flags).ChAutoMov) {
-						_G(maus_links_click) = false;
+						_G(mouseLeftClick) = false;
 						autoMove(_G(spieler).room_m_obj[nr].AutoMov, P_CHEWY);
 						Dialogs::Inventory::look_screen(txt_mode, txt_nr);
 
@@ -853,11 +853,11 @@ void mouseAction() {
 		if (_G(minfo)._button || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
 
 			if (_G(minfo)._button == 2 || _G(kbinfo)._keyCode == Common::KEYCODE_ESCAPE) {
-				if (!_G(flags).main_maus_flag) {
+				if (!_G(flags).mainMouseFlag) {
 					_G(kbinfo).scan_code = Common::KEYCODE_ESCAPE;
 				}
 			} else if (_G(minfo)._button == 1 || _G(kbinfo)._keyCode == Common::KEYCODE_RETURN) {
-				if (!_G(flags).main_maus_flag) {
+				if (!_G(flags).mainMouseFlag) {
 					if (_G(menu_display) == MENU_DISPLAY)
 						_G(kbinfo).scan_code = Common::KEYCODE_RETURN;
 					else if (_G(spieler).AkInvent != -1) {
@@ -871,15 +871,15 @@ void mouseAction() {
 								cursorChoice(CUR_AK_INVENT);
 								_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 							}
-						} else if (!_G(flags).MausLinks)
-							_G(maus_links_click) = true;
-					} else if (!_G(flags).MausLinks)
-						_G(maus_links_click) = true;
+						} else if (!_G(flags).MouseLeft)
+							_G(mouseLeftClick) = true;
+					} else if (!_G(flags).MouseLeft)
+						_G(mouseLeftClick) = true;
 				}
 			}
-			_G(flags).main_maus_flag = 1;
+			_G(flags).mainMouseFlag = 1;
 		} else
-			_G(flags).main_maus_flag = 0;
+			_G(flags).mainMouseFlag = 0;
 	}
 }
 
@@ -897,7 +897,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 			hideCur();
 			if (_G(flags).InventMenu == false) {
 				if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
-					_G(maus_links_click) = false;
+					_G(mouseLeftClick) = false;
 					autoMove(_G(spieler).room_m_obj[testNr].AutoMov, P_CHEWY);
 				}
 				txt_nr = _G(obj)->iib_txt_nr(testNr);
@@ -915,7 +915,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 	case INVENTORY_STATIC:
 		ret = _G(obj)->action_iib_sib(_G(spieler).AkInvent, testNr);
 		if (ret != NO_ACTION) {
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			hideCur();
 			if (_G(spieler).room_m_obj[_G(spieler).AkInvent].AutoMov != 255) {
 				autoMove(_G(spieler).room_s_obj[testNr].AutoMov, P_CHEWY);
@@ -953,7 +953,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 	case STATIC_USE:
 		ret = _G(obj)->calc_static_use(testNr);
 		if (ret == OBJECT_1) {
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			hideCur();
 			if (_G(spieler).room_s_obj[testNr].AutoMov != 255) {
 
@@ -997,7 +997,7 @@ void evaluateObj(int16 testNr, int16 mode) {
 				}
 			}
 		} else if (ret == SIB_GET_INV) {
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			hideCur();
 			if (_G(spieler).room_s_obj[testNr].AutoMov != 255) {
 				autoMove(_G(spieler).room_s_obj[testNr].AutoMov, P_CHEWY);
@@ -1194,8 +1194,8 @@ bool autoMove(int16 movNr, int16 playerNum) {
 			movingFl = true;
 			_G(flags).ChAutoMov = true;
 			_G(auto_p_nr) = playerNum;
-			int16 tmp = _G(maus_links_click);
-			_G(maus_links_click) = false;
+			int16 tmp = _G(mouseLeftClick);
+			_G(mouseLeftClick) = false;
 			_G(gpkt).Dx = _G(Rdi)->AutoMov[movNr].X -
 						  _G(spieler_mi)[playerNum].HotMovX + _G(spieler_mi)[playerNum].HotX;
 			_G(gpkt).Dy = _G(Rdi)->AutoMov[movNr].Y -
@@ -1263,7 +1263,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 				}
 			}
 			_G(auto_p_nr) = P_CHEWY;
-			_G(maus_links_click) = tmp;
+			_G(mouseLeftClick) = tmp;
 			_G(flags).ChAutoMov = false;
 		}
 	}
@@ -1274,8 +1274,8 @@ bool autoMove(int16 movNr, int16 playerNum) {
 void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
 	if (!_G(stopAutoMove)[personNum] && _G(spieler)._personRoomNr[personNum] == _G(spieler)._personRoomNr[P_CHEWY]) {
 		int16 move_status = true;
-		int16 tmp = _G(maus_links_click);
-		_G(maus_links_click) = false;
+		int16 tmp = _G(mouseLeftClick);
+		_G(mouseLeftClick) = false;
 
 		_G(spieler_mi)[personNum].XyzStart[0] = _G(spieler_vector)[personNum].Xypos[0];
 		_G(spieler_mi)[personNum].XyzStart[1] = _G(spieler_vector)[personNum].Xypos[1];
@@ -1307,7 +1307,7 @@ void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
 			}
 		}
 
-		_G(maus_links_click) = tmp;
+		_G(mouseLeftClick) = tmp;
 	}
 }
 
@@ -1347,7 +1347,7 @@ int16 calcMouseText(int16 x, int16 y, int16 mode) {
 				bool dispFl = true;
 				bool actionFl = false;
 
-				if (_G(maus_links_click) && !_G(flags).MausTxt) {
+				if (_G(mouseLeftClick) && !_G(flags).MausTxt) {
 					int16 ok = true;
 					_G(flags).MausTxt = true;
 
@@ -1506,7 +1506,7 @@ void calc_mouse_person(int16 x, int16 y) {
 				char *str_ = ch_txt[p_nr];
 				calcTxtXy(&x, &y, str_, 1);
 				printShadowed(x, y, 255, 300, 0, _G(scr_width), str_);
-				if (_G(maus_links_click) == 1) {
+				if (_G(mouseLeftClick) == 1) {
 					int16 def_nr = -1;
 					if (!_G(spieler).inv_cur) {
 						int16 txt_nr = calc_person_txt(p_nr);
@@ -1626,7 +1626,7 @@ void calc_ani_timer() {
 void get_user_key(int16 mode) {
 	_G(flags).StopAutoObj = true;
 	mouseAction();
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 
 	if (!_G(inv_disp_ok)) {
 		switch (_G(in)->getSwitchCode()) {
@@ -1684,7 +1684,7 @@ void delInventory(int16 nr) {
 	_G(spieler).AkInvent = -1;
 	cursorChoice(_G(menu_item));
 	del_invent_slot(nr);
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 }
 
 bool isCurInventory(int16 nr) {
@@ -1737,7 +1737,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
 
 void calc_ausgang(int16 x, int16 y) {
 	if (!_G(flags).ExitMov) {
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		int16 nr = _G(obj)->is_exit(x, y);
 		if (nr != -1) {
 			_G(flags).ExitMov = true;
@@ -1844,8 +1844,8 @@ void calc_scroll(int16 x, int16 y, int16 pic_x, int16 pic_y, int16 *sc_x, int16
 }
 
 void auto_scroll(int16 scrx, int16 scry) {
-	int16 tmpMouseClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	int16 tmpMouseClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	_G(spieler).scrollx >>= 1;
 	_G(spieler).scrollx <<= 1;
 	_G(spieler).scrolly >>= 1;
@@ -1865,7 +1865,7 @@ void auto_scroll(int16 scrx, int16 scry) {
 		setupScreen(DO_SETUP);
 		SHOULD_QUIT_RETURN;
 	}
-	_G(maus_links_click) = tmpMouseClick;
+	_G(mouseLeftClick) = tmpMouseClick;
 }
 
 void disable_timer() {
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index c417da3911c..6934d3d2b07 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -310,10 +310,10 @@ void stop_ads_dialog() {
 	_G(flags).ShowAtsInvTxt = true;
 	_G(flags).MainInput = true;
 	_G(flags).AdsDialog = false;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(atds)->stop_ads();
 	if (_G(minfo)._button)
-		_G(flags).main_maus_flag = 1;
+		_G(flags).mainMouseFlag = 1;
 }
 
 void cur_2_inventory() {
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 8ff73eca3d8..07bdb7212a4 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -513,7 +513,7 @@ void exit_room(int16 eib_nr) {
 		}
 		_G(menu_item) = CUR_WALK;
 		cursorChoice(_G(menu_item));
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		break;
 
 	case 24: Room24::xit(); break;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index ccb84d57594..ad01bdfa1b1 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -141,7 +141,7 @@ void Room3::terminal() {
 
 	case 1:
 		_G(auto_obj) = 1;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(minfo)._button = 0;
 		stopPerson(P_CHEWY);
 		start_spz(15, 255, false, P_CHEWY);
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index dc74b3214e1..cefdf1843fe 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -60,7 +60,7 @@ int16 Room4::comp_probe() {
 	start_aad(46);
 	while (!endLoop) {
 		mouseAction();
-		if (_G(maus_links_click)) {
+		if (_G(mouseLeftClick)) {
 			switch (_G(in)->mouseVector(_G(minfo).x + 17, _G(minfo).y + 7, &CONSOLE[0][0], 3)) {
 			case 0:
 				if (curX > 0)
@@ -118,7 +118,7 @@ int16 Room4::comp_probe() {
 	cursorChoice(_G(menu_item));
 
 	_G(spieler_vector)[P_CHEWY]._delayCount = 0;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(minfo)._button = 0;
 	_G(spieler)._personRoomNr[P_CHEWY] = 3;
 	_G(room)->loadRoom(&_G(room_blk), 3, &_G(spieler));
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 768596e02f0..17dba57f606 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -119,7 +119,7 @@ bool Room8::gips_wurf() {
 		actionFl = true;
 		_G(det)->load_taf_seq(116, 30, nullptr);
 		autoMove(2, P_CHEWY);
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 
 		_G(spieler)._personHide[P_CHEWY] = true;
 		delInventory(GIPS_EIMER_INV);
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 225010f180e..779686e3e2d 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -157,7 +157,7 @@ void Room12::talk_bork() {
 
 void Room12::bork_ok() {
 	hideCur();
-	_G(flags).MausLinks = true;
+	_G(flags).MouseLeft = true;
 	_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 1000;
 	autoMove(5, P_CHEWY);
 	_G(auto_mov_vector)[R12_BORK_OBJ]._delayCount = 0;
@@ -185,7 +185,7 @@ void Room12::bork_ok() {
 	_G(atds)->set_ats_str(118, TXT_MARK_LOOK, 2, ATS_DATA);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
 
-	_G(flags).MausLinks = false;
+	_G(flags).MouseLeft = false;
 	showCur();
 }
 
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index 6c6a9c98242..e2b57ae9360 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -167,7 +167,7 @@ void Room13::jmp_band() {
 
 		} else {
 			_G(spieler).R13Surf = true;
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			autoMove(12, P_CHEWY);
 			startAadWait(117);
 			_G(flags).NoScroll = true;
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index f8b739a6c67..29f60622a37 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -253,7 +253,7 @@ int16 Room18::calc_surimy() {
 			stopPerson(P_CHEWY);
 			_G(spieler)._personHide[P_CHEWY] = true;
 			startDetailFrame(17, 1, ANI_FRONT, 12);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 
 			init_auto_obj(SURIMY_OBJ, &SURIMY_PHASEN[0][0], _G(mov_phasen)[SURIMY_OBJ].Lines, (const MovLine *)SURIMY_MPKT);
 			waitDetail(17);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index 1ae544a6e68..3d935c74550 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -44,7 +44,7 @@ void Room23::entry() {
 void Room23::cockpit() {
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	switchRoom(23);
 
 	if (!_G(spieler).R23Cartridge || !_G(spieler).R25GleiteLoesch)
@@ -101,7 +101,7 @@ int16 Room23::start_gleiter() {
 					_G(spieler).DelaySpeed = 10;
 					startAadWait(59);
 					stopPerson(P_CHEWY);
-					_G(maus_links_click) = false;
+					_G(mouseLeftClick) = false;
 
 				} else if (_G(spieler).R23GleiterExit == 16) {
 					_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 2bc48dfc745..7a6d7d5c508 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -67,7 +67,7 @@ void Room24::xit() {
 	cursorChoice(_G(menu_item));
 	setPersonPos(263, 144, P_CHEWY, -1);
 	_G(spieler).scrollx = 88;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(flags).MainInput = true;
 }
 
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index c247904d5f0..09aa530cb75 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -150,7 +150,7 @@ void Room29::schlitz_sitz() {
 		_G(det)->stop_detail(2);
 		_G(atds)->del_steuer_bit(212, ATS_AKTIV_BIT, ATS_DATA);
 		_G(spieler)._personHide[P_CHEWY] = false;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 
 		showCur();
diff --git a/engines/chewy/rooms/room34.cpp b/engines/chewy/rooms/room34.cpp
index b6dce90b888..a76d6e03863 100644
--- a/engines/chewy/rooms/room34.cpp
+++ b/engines/chewy/rooms/room34.cpp
@@ -42,7 +42,7 @@ bool Room34::use_kuehlschrank() {
 		if (!_G(flags).LoadGame) {
 			hideCur();
 			autoMove(3, P_CHEWY);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			start_spz_wait((_G(spieler).ChewyAni == CHEWY_ROCKER) ? CH_ROCK_GET2 : CH_LGET_O, 1, false, P_CHEWY);
 			showCur();
 		}
@@ -65,7 +65,7 @@ void Room34::xit_kuehlschrank() {
 	setPersonPos(54, 111, P_CHEWY, -1);
 	switchRoom(33);
 	_G(flags).ChewyDontGo = false;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 }
 
 } // namespace Rooms
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index 63e3b7f508e..27d1dc9aee7 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -87,14 +87,14 @@ void Room37::gedAction(int index) {
 }
 
 void Room37::setup_func() {
-	if (_G(maus_links_click) && !_G(spieler).R37Kloppe &&
+	if (_G(mouseLeftClick) && !_G(spieler).R37Kloppe &&
 			_G(menu_item) == CUR_WALK) {
 		if ((_G(minfo).x + _G(spieler).scrollx > 380 && _G(minfo).y > 120) ||
 			(_G(minfo).x + _G(spieler).scrollx > 482)) {
 			// Don't allow moving into chicken coop area
 			// until the rooster has left
 			autoMove(7, P_CHEWY);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 		}
 	}
 }
@@ -119,7 +119,7 @@ short Room37::use_wippe() {
 			_G(spieler).scrollx = 269;
 			setPersonPos(388, 119, P_CHEWY, P_RIGHT);
 			switchRoom(29);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 
 		} else {
 			start_spz(CH_TALK5, 255, ANI_FRONT, P_CHEWY);
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index c0e636d937b..12bfedf1208 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -173,7 +173,7 @@ int16 Room39::use_tv() {
 	int16 cls_flag = false;
 
 	if (isCurInventory(ZAPPER_INV)) {
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		
 		_G(spieler).R39TvOn = true;
 		if (_G(spieler).R39TvKanal >= 5)
@@ -328,7 +328,7 @@ void Room39::look_tv(bool cls_mode) {
 			}
 		}
 
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(flags).AutoAniPlay = false;
 	}
 }
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index 5b11b53843a..dfa0c4f09fd 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -121,7 +121,7 @@ void Room40::xit(int16 eib_nr) {
 				_G(out)->einblenden(_G(pal), 0);
 				_G(uhr)->enableTimer();
 
-				_G(maus_links_click) = false;
+				_G(mouseLeftClick) = false;
 				startAadWait(238);
 				move_train(1);
 				register_cutscene(15);
@@ -292,7 +292,7 @@ void Room40::setup_func() {
 					_G(spieler).R40PoliceWeg = true;
 					showCur();
 
-					_G(flags).MausLinks = false;
+					_G(flags).MouseLeft = false;
 					_G(flags).MainInput = true;
 					_G(spieler).R40HoUse = false;
 					_G(atds)->set_steuer_bit(276, ATS_AKTIV_BIT, ATS_DATA);
@@ -495,7 +495,7 @@ int16 Room40::use_haendler() {
 			cursorChoice(_G(menu_item));
 			showCur();
 			_G(flags).NoScroll = false;
-			_G(flags).MausLinks = false;
+			_G(flags).MouseLeft = false;
 			_G(spieler).R40HoUse = false;
 		}
 	}
@@ -590,7 +590,7 @@ bool Room40::use_police() {
 			_G(menu_item) = CUR_WALK;
 			cursorChoice(_G(menu_item));
 			showCur();
-			_G(flags).MausLinks = false;
+			_G(flags).MouseLeft = false;
 		}
 	} else {
 		startAadWait(225);
@@ -643,7 +643,7 @@ int16 Room40::use_tele() {
 				autoMove(1, P_CHEWY);
 				_G(spieler).R40DuengerMit = false;
 				_G(spieler).R40DuengerTele = true;
-				_G(flags).MausLinks = true;
+				_G(flags).MouseLeft = true;
 				_G(flags).MainInput = false;
 				timer_wert = 3;
 			}
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 9b827152e76..eb711c58144 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -154,7 +154,7 @@ int16 Room42::use_beamter() {
 		cursorChoice(_G(menu_item));
 		showCur();
 		start_spz(HO_TALK_L, 255, ANI_FRONT, P_HOWARD);
-		_G(flags).MausLinks = false;
+		_G(flags).MouseLeft = false;
 	}
 
 	return action_flag;
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index ae855c1fe92..d418d77be62 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -55,7 +55,7 @@ void Room45::entry(int16 eib_nr) {
 			ho_y = 129;
 
 			_G(spieler).R48TaxiEntry = false;
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 		} else {
 			if (eib_nr == 72) {
 				ch_x = 259;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index a066a5ac72e..2fcb1a4fa5f 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -46,7 +46,7 @@ void Room46::entry(int16 eib_nr) {
 		_G(SetUpScreenFunc) = setup_func;
 
 		if (_G(spieler).flags33_8) {
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			hideCur();
 			setPersonPos(175, 73, P_HOWARD, P_LEFT);
 			setPersonPos(147, 109, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index e53d0017e6e..a7b0c4c8872 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -30,7 +30,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room48::entry() {
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	showCur();
@@ -100,7 +100,7 @@ void Room48::setup_func() {
 				if (_G(spieler).R48Auswahl[idx]) {
 					_G(det)->showStaticSpr(1 + idx);
 
-					if (_G(maus_links_click)) {
+					if (_G(mouseLeftClick)) {
 						int16 r_nr;
 						switch (idx) {
 						case 0:
@@ -142,7 +142,7 @@ void Room48::setup_func() {
 							cursorChoice(_G(menu_item));
 							showCur();
 							_G(spieler).R48TaxiEntry = true;
-							_G(maus_links_click) = false;
+							_G(mouseLeftClick) = false;
 							setupScreen(DO_SETUP);
 
 							for (int16 i = 0; i < MAX_PERSON; i++) {
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 5c8778044f2..9f564ce346e 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -60,7 +60,7 @@ void Room49::entry(int16 eib_nr) {
 			_G(spieler).R48TaxiEntry = false;
 			setPersonPos(527, 76, P_HOWARD, P_LEFT);
 			setPersonPos(491, 98, P_CHEWY, P_LEFT);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			_G(spieler).scrollx = 320;
 			_G(spieler).scrolly = 0;
 			_G(det)->startDetail(5, 1, ANI_FRONT);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 6d45f4788a8..20bdc3d42c0 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -42,7 +42,7 @@ void Room50::entry(int16 eib_nr) {
 	if (_G(spieler).flags32_10) {
 		hideCur();
 		stop_page();
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		setPersonPos(1, 64, P_HOWARD, P_RIGHT);
 		setPersonPos(92, 123, P_CHEWY, P_LEFT);
 		startAadWait(510);
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index d538ec52cae..fd3721b7568 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -55,7 +55,7 @@ void Room51::entry() {
 		_G(atds)->enableEvents(false);
 		_G(spieler)._personHide[P_CHEWY] = true;
 		_G(spieler)._personHide[P_HOWARD] = true;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(spieler).scrollx = 0;
 		setPersonPos(34, 120, P_HOWARD, P_RIGHT);
 		setPersonPos(234, 69, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index b328f28a577..7a603cac02f 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -53,7 +53,7 @@ void Room54::entry(int16 eib_nr) {
 			}
 
 			setPersonPos(300, 80, P_CHEWY, P_LEFT);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			_G(spieler).scrollx = 134;
 			_G(spieler).scrolly = 0;
 
@@ -358,7 +358,7 @@ void Room54::aufzug_ab() {
 	_G(det)->hideStaticSpr(12);
 	setPersonPos(99, 82, P_CHEWY, P_RIGHT);
 	_G(spieler)._personHide[P_CHEWY] = false;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	stopPerson(P_CHEWY);
 	_G(spieler).R55Location = false;
 }
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 862e7dd1a14..da4e54c6522 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -79,10 +79,10 @@ void Room56::entry() {
 			_G(spieler_mi)[P_CHEWY].Mode = true;
 			autoMove(1, P_CHEWY);
 			_G(spieler_mi)[P_CHEWY].Mode = false;
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			showCur();
 		} else if (_G(spieler).R62Flucht && !_G(spieler).flags32_10) {
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			_G(spieler).ZoomXy[P_HOWARD][0] = 40;
 			_G(spieler).ZoomXy[P_HOWARD][1] = 86;
 			_G(zoom_horizont) = 114;
@@ -97,7 +97,7 @@ void Room56::entry() {
 			_G(room)->set_timer_status(0, TIMER_STOP);
 			_G(det)->del_static_ani(0);
 			_G(det)->set_static_ani(3, -1);
-			_G(maus_links_click) = false;
+			_G(mouseLeftClick) = false;
 			_G(atds)->stopAad();
 			hideCur();
 			startAadWait(306);
@@ -349,7 +349,7 @@ int16 Room56::use_kneipe() {
 	} else if (_G(menu_item) == 0 || _G(menu_item) == 2 || (_G(menu_item) == 1 && !_G(spieler).inv_cur)){
 		hideCur();
 		action_ret = 1;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		autoMove(4, P_CHEWY);
 		startAadWait(521);
 		_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room57.cpp b/engines/chewy/rooms/room57.cpp
index 4c6f78de783..15afd8fe301 100644
--- a/engines/chewy/rooms/room57.cpp
+++ b/engines/chewy/rooms/room57.cpp
@@ -48,7 +48,7 @@ void Room57::entry() {
 		setPersonPos(4, 144, P_HOWARD, P_LEFT);
 		setPersonPos(40, 160, P_CHEWY, P_RIGHT);
 		autoMove(2, P_CHEWY);
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		showCur();
 	}
 }
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 8c413b1336e..b5d7de24ce8 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -66,7 +66,7 @@ void Room65::xit() {
 	setPersonPos(_G(r65tmp_ho_x), _G(r65tmp_ho_y), P_HOWARD, -1);
 	_G(room_blk).AadLoad = true;
 	_G(room_blk).AtsLoad = true;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 }
 
 void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int16 mode) {
diff --git a/engines/chewy/rooms/room80.cpp b/engines/chewy/rooms/room80.cpp
index 8be549d71b4..2bb2a2890f8 100644
--- a/engines/chewy/rooms/room80.cpp
+++ b/engines/chewy/rooms/room80.cpp
@@ -29,7 +29,7 @@ namespace Chewy {
 namespace Rooms {
 
 void Room80::entry() {
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(spieler).scrollx = 0;
 	_G(spieler).scrolly = 0;
 	g_engine->_sound->playSound(0, 0);
@@ -89,7 +89,7 @@ void Room80::setup_func() {
 	}
 
 	_G(det)->showStaticSpr(vec);
-	if (!_G(maus_links_click))
+	if (!_G(mouseLeftClick))
 		return;
 
 	int nextRoom;
@@ -119,7 +119,7 @@ void Room80::setup_func() {
 	_G(menu_item) = CUR_WALK;
 	cursorChoice(CUR_WALK);
 	_G(spieler).flags30_1 = true;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	setupScreen(DO_SETUP);
 	
 	for (int i = P_CHEWY; i <= P_NICHELLE; ++i) {
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index ca972459822..0543dda6f36 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -51,7 +51,7 @@ void Room81::entry() {
 	setPersonPos(103, 115, P_HOWARD, P_RIGHT);
 	setPersonPos(62, 112, P_NICHELLE, P_RIGHT);
 	_G(spieler).flags30_1 = false;
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(spieler).scrollx = 0;
 }
 
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index 9b13b033623..80c7c450db7 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -71,7 +71,7 @@ void Room82::entry() {
 		proc4();
 	}
 
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(SetUpScreenFunc) = setup_func;
 }
 
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index a111fff64da..6ea931e7f4b 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -79,7 +79,7 @@ void Room84::entry() {
 		setPersonPos(523, 110, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
 		_G(spieler).flags31_8 = false;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(spieler).scrollx = 319;
 
 		if (_G(spieler).flags32_10) {
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 3019fa9e8c9..b82af74250c 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -62,7 +62,7 @@ void Room85::entry(int16 eib_nr) {
 		setPersonPos(296, 142, P_HOWARD, P_RIGHT);
 		setPersonPos(322, 142, P_NICHELLE, P_RIGHT);
 		_G(spieler).flags30_1 = false;
-		_G(maus_links_click) = false;
+		_G(mouseLeftClick) = false;
 		_G(spieler).scrollx = 78;
 		if (_G(spieler).flags32_40) {
 			_G(atds)->del_steuer_bit(506, ATS_AKTIV_BIT, ATS_DATA);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 9114d35e49b..1a4fa44afb7 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -297,7 +297,7 @@ int Room90::shootControlUnit() {
 	flic_cut(FCUT_107);
 	_G(spieler).scrollx = 0;
 	setPersonPos(76, 145, P_CHEWY, P_LEFT);
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(det)->showStaticSpr(4);
 	_G(det)->showStaticSpr(5);
 	setupScreen(NO_SETUP);
@@ -329,7 +329,7 @@ int Room90::useSurimyOnWreck() {
 	hideCur();
 	cur_2_inventory();
 	autoMove(6, P_CHEWY);
-	_G(maus_links_click) = false;
+	_G(mouseLeftClick) = false;
 	_G(out)->setPointer(nullptr);
 	_G(out)->cls();
 	flic_cut(FCUT_109);
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index 68c6fde6e92..f5fdf736d40 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -106,11 +106,11 @@ void Room91::setup_func() {
 		cur_2_inventory();
 		cursorChoice(CUR_22);
 
-		if (_G(maus_links_click) == 0 || _click)
+		if (_G(mouseLeftClick) == 0 || _click)
 			return;
 
 		const int oldClick = _click;
-		_G(maus_links_click) = oldClick;
+		_G(mouseLeftClick) = oldClick;
 		_click = 1;
 		const int aniNr = 1 + (_G(minfo).y <= 100 ? 1 : 0);
 		hideCur();
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index fce03d3d12f..342511ba85e 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -686,7 +686,7 @@ void Room97::sensorAnim() {
 		get_user_key(NO_SETUP);
 		if (_G(minfo)._button == 1 || _G(in)->getSwitchCode() == 28) {
 			if (_G(spieler).inv_cur)
-				_G(maus_links_click) = true;
+				_G(mouseLeftClick) = true;
 		}
 
 		setupScreen(DO_SETUP);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index efd99249985..ec7da61afac 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -394,18 +394,18 @@ void stopPerson(int16 personNr) {
 }
 
 void startSetailWait(int16 aniNr, int16 rep, int16 mode) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	_G(det)->startDetail(aniNr, rep, mode);
 	while (_G(det)->get_ani_status(aniNr) && !SHOULD_QUIT) {
 		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 }
 
 void startDetailFrame(int16 aniNr, int16 rep, int16 mode, int16 frame) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	_G(det)->startDetail(aniNr, rep, mode);
 	AniDetailInfo *adi = _G(det)->getAniDetail(aniNr);
 	if (mode == ANI_FRONT)
@@ -415,7 +415,7 @@ void startDetailFrame(int16 aniNr, int16 rep, int16 mode, int16 frame) {
 	while (_G(det)->get_ani_status(aniNr) && adi->ani_count != frame && !SHOULD_QUIT) {
 		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 }
 
 void waitDetail(int16 detNr) {
@@ -424,8 +424,8 @@ void waitDetail(int16 detNr) {
 }
 
 void waitShowScreen(int16 frames) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	if (_G(spieler).DelaySpeed > 0)
 		frames *= _G(spieler).DelaySpeed;
 	while (--frames > 0 && !SHOULD_QUIT) {
@@ -433,24 +433,24 @@ void waitShowScreen(int16 frames) {
 			get_user_key(NO_SETUP);
 		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 }
 
 void startAniBlock(int16 nr, const AniBlock *ab) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	for (int16 i = 0; i < nr; i++) {
 		if (ab[i].Mode == ANI_WAIT)
 			startSetailWait(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 		else
 			_G(det)->startDetail(ab[i].Nr, ab[i].Repeat, ab[i].Dir);
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 }
 
 void startAadWait(int16 diaNr) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	_G(talk_start_ani) = -1;
 	_G(talk_hide_static) = -1;
 	setSsiPos();
@@ -463,9 +463,9 @@ void startAadWait(int16 diaNr) {
 		setupScreen(DO_SETUP);
 	}
 
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 	if (_G(minfo)._button)
-		_G(flags).main_maus_flag = 1;
+		_G(flags).mainMouseFlag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 	stop_spz();
 }
@@ -479,8 +479,8 @@ void start_aad(int16 diaNr) {
 bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 	DisplayMode ret = DISPLAY_NONE;
 
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 
 	if (!_G(flags).AtsText) {
 		_G(flags).AtsText = true;
@@ -522,17 +522,17 @@ bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 	}
 
 	if (_G(minfo)._button)
-		_G(flags).main_maus_flag = 1;
+		_G(flags).mainMouseFlag = 1;
 
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 
 	return ret != DISPLAY_NONE;
 }
 
 void aadWait(int16 strNr) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	if (strNr == -1) {
 		while (_G(atds)->aadGetStatus() != -1 && !SHOULD_QUIT) {
 			setupScreen(DO_SETUP);
@@ -542,9 +542,9 @@ void aadWait(int16 strNr) {
 			setupScreen(DO_SETUP);
 		}
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 	if (_G(minfo)._button)
-		_G(flags).main_maus_flag = 1;
+		_G(flags).mainMouseFlag = 1;
 	_G(kbinfo).scan_code = Common::KEYCODE_INVALID;
 }
 
@@ -570,12 +570,12 @@ void startAdsWait(int16 diaNr) {
 }
 
 void wait_auto_obj(int16 nr) {
-	const int16 oldMouseLinksClick = _G(maus_links_click);
-	_G(maus_links_click) = false;
+	const int16 oldMouseLeftClick = _G(mouseLeftClick);
+	_G(mouseLeftClick) = false;
 	while (_G(mov_phasen)[nr].Repeat != -1 && !SHOULD_QUIT) {
 		setupScreen(DO_SETUP);
 	}
-	_G(maus_links_click) = oldMouseLinksClick;
+	_G(mouseLeftClick) = oldMouseLeftClick;
 }
 
 void stop_auto_obj(int16 nr) {
@@ -1071,7 +1071,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
 		_G(spieler_vector)[p_nr].Delay = _G(spieler).DelaySpeed + _G(spz_delay)[p_nr];
 		_G(spieler_vector)[p_nr]._delayCount = 0;
 		_G(spz_count) = count;
-		_G(flags).MausLinks = true;
+		_G(flags).MouseLeft = true;
 		ret = true;
 	}
 	return ret;
@@ -1095,7 +1095,7 @@ void calc_person_spz_ani(ObjMov *om) {
 void stop_spz() {
 	if (_G(flags).SpzAni) {
 		_G(flags).SpzAni = false;
-		_G(flags).MausLinks = false;
+		_G(flags).MouseLeft = false;
 		_G(spz_ani)[_G(spz_p_nr)] = false;
 		_G(spieler_vector)[_G(spz_p_nr)].Count = 0;
 		_G(spieler_vector)[_G(spz_p_nr)].PhNr = 0;
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 57bb390ce69..1031a225cbe 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -580,12 +580,12 @@ struct Flags {
 	uint16 ExitMov : 1;
 	uint16 MausTxt : 1;
 	uint16 LoadGame : 1;
-	uint16 main_maus_flag: 1;
+	uint16 mainMouseFlag: 1;
 	uint16 ZoomMov : 1;
 	uint16 SaveMenu : 1;
 
 	uint16 SpzAni : 1;
-	uint16 MausLinks : 1;
+	uint16 MouseLeft : 1;
 	uint16 ChewyDontGo : 1;
 	uint16 NoPalAfterFlc : 1;
 	uint16 NoDiaBox : 1;


Commit: a48534f32a23bb41af61d644f5f03d043e01f5b8
    https://github.com/scummvm/scummvm/commit/a48534f32a23bb41af61d644f5f03d043e01f5b8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2022-03-03T18:37:21-08:00

Commit Message:
CHEWY: Remove two useless externals in mouse, some renaming

Changed paths:
    engines/chewy/atds.cpp
    engines/chewy/cursor.cpp
    engines/chewy/mouse.cpp
    engines/chewy/mouse.h
    engines/chewy/ngsdefs.h
    engines/chewy/rooms/room12.cpp
    engines/chewy/types.h


diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 90151b17be0..432934f63c9 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -581,7 +581,7 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
 			switch (_G(in)->getSwitchCode()) {
 			case Common::KEYCODE_ESCAPE:
 			case Common::KEYCODE_RETURN:
-			case MAUS_LINKS:
+			case MOUSE_LEFT:
 				if (_mousePush == false) {
 					if (_atsv.SilentCount <= 0 && _atsv.DelayCount > _printDelayCount1) {
 						_mousePush = true;
@@ -925,7 +925,7 @@ void Atdsys::print_aad(int16 scrx, int16 scry) {
 			switch (_G(in)->getSwitchCode()) {
 			case Common::KEYCODE_ESCAPE:
 			case Common::KEYCODE_RETURN:
-			case MAUS_LINKS:
+			case MOUSE_LEFT:
 				EVENTS_CLEAR;
 
 				if (_mousePush == false) {
diff --git a/engines/chewy/cursor.cpp b/engines/chewy/cursor.cpp
index 41fad002aa9..88d939261b9 100644
--- a/engines/chewy/cursor.cpp
+++ b/engines/chewy/cursor.cpp
@@ -44,7 +44,6 @@ Cursor::~Cursor() {
 void Cursor::plot_cur() {
 	if (_visible) {
 		if (_cursorMoveFl) {
-			mouse_active = true;
 			_cursorMoveFl = false;
 			if (!_curblk->no_back) {
 
@@ -67,16 +66,13 @@ void Cursor::plot_cur() {
 				_aniCount = _ani->_start;
 		}
 
-		_out->spriteSet(_curblk->sprite[_aniCount], _cur_x_old, _cur_y_old,
-		                 _scrWidth);
-		mouse_active = false;
+		_out->spriteSet(_curblk->sprite[_aniCount], _cur_x_old, _cur_y_old, _scrWidth);
 	}
 }
 
 void Cursor::show_cur() {
 	if (!_visible) {
 		_visible = true;
-		mouse_active = true;
 
 		_G(minfo).x = g_events->_mousePos.x;
 		_G(minfo).y = g_events->_mousePos.y;
@@ -110,8 +106,6 @@ void Cursor::set_cur_ani(CurAni *ani1) {
 }
 
 void Cursor::move(int16 x, int16 y) {
-	mouse_active = true;
-
 	_G(minfo).x = x;
 	_G(minfo).y = y;
 	_cur_x_old = (_G(minfo).x + _curblk->page_off_x);
@@ -121,7 +115,6 @@ void Cursor::move(int16 x, int16 y) {
 		_cursorMoveFl = true;
 	else
 		_cursorMoveFl = false;
-	mouse_active = false;
 }
 
 } // namespace Chewy
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 97d68ed8e69..8d16d1f6107 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -26,14 +26,8 @@
 
 namespace Chewy {
 
-// FIXME. Externals
-bool mouse_links_los;
-bool mouse_active;
-// end of externals
-
 bool _cursorMoveFl;
 
-
 void set_new_kb_handler(KbdInfo *key) {
 	g_events->setKbdInfo(key);
 }
@@ -91,9 +85,9 @@ int16 InputMgr::getSwitchCode() {
 	if (_G(minfo)._button == 2) {
 		switch_code = Common::KEYCODE_ESCAPE;
 	} else if (_G(minfo)._button == 1)
-		switch_code = 255;
+		switch_code = MOUSE_LEFT;
 	else if (_G(minfo)._button == 4)
-		switch_code = 254;
+		switch_code = MOUSE_CENTER;
 
 	if (_kbInfoBlk && _kbInfoBlk->_keyCode != 0)
 		switch_code = (int16)_kbInfoBlk->_keyCode;
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index bc30c862327..33aba5ebe43 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -29,7 +29,6 @@ namespace Chewy {
 void set_new_kb_handler(KbdInfo *key);
 void set_old_kb_handler();
 
-extern bool mouse_active;
 extern bool _cursorMoveFl;
 
 class InputMgr {
diff --git a/engines/chewy/ngsdefs.h b/engines/chewy/ngsdefs.h
index e01cc7f72c4..0d937674010 100644
--- a/engines/chewy/ngsdefs.h
+++ b/engines/chewy/ngsdefs.h
@@ -55,9 +55,9 @@ namespace Chewy {
 
 #define ALT 0x1000
 
-#define MAUS_LINKS 255
-#define MAUS_RECHTS 1
-#define MAUS_MITTE 254
+#define MOUSE_LEFT 255
+#define MOUSE_RIGHT 1
+#define MOUSE_CENTER 254
 
 #define SOUND 5
 #define BASE 0x220
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index 779686e3e2d..2744be3a448 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -236,7 +236,7 @@ int16 Room12::use_terminal() {
 
 void Room12::use_linke_rohr() {
 	_G(spieler).R12TalismanOk = false;
-	_G(spieler).R12KetteLinks = true;
+	_G(spieler).R12ChainLeft = true;
 	_G(uhr)->disableTimer();
 	_G(obj)->calc_rsi_flip_flop(SIB_L_ROEHRE_R12);
 	_G(obj)->calc_rsi_flip_flop(SIB_ROEHRE_R12);
@@ -268,8 +268,8 @@ int16 Room12::useTransformerTube() {
 	if (!_G(spieler).inv_cur) {
 		result = true;
 
-		if (_G(spieler).R12KetteLinks) {
-			_G(spieler).R12KetteLinks = false;
+		if (_G(spieler).R12ChainLeft) {
+			_G(spieler).R12ChainLeft = false;
 			_G(uhr)->enableTimer();
 			_G(atds)->set_ats_str(117, 1, AAD_DATA);
 		} else {
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 1031a225cbe..7d11f890d9f 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -79,7 +79,7 @@ struct SpielerFlags {
 	bool R12BorkTalk : 1;
 	bool R12BorkInRohr : 1;
 	bool R12TransOn : 1;
-	bool R12KetteLinks : 1;
+	bool R12ChainLeft : 1;
 	bool R13BorkOk : 1;
 	bool R13Band : 1;
 	bool R13Bandlauf : 1;




More information about the Scummvm-git-logs mailing list