aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Vilalta Prat2009-02-15 08:34:13 +0000
committerJordi Vilalta Prat2009-02-15 08:34:13 +0000
commit003317e89d890944fc12e622190aa916aad6418c (patch)
tree321c42b2dd44c66cf1eaf7f71b19e3fc57944931
parent1ef23afe6b0441393b6b43ee136552e887c80707 (diff)
downloadscummvm-rg350-003317e89d890944fc12e622190aa916aad6418c.tar.gz
scummvm-rg350-003317e89d890944fc12e622190aa916aad6418c.tar.bz2
scummvm-rg350-003317e89d890944fc12e622190aa916aad6418c.zip
SCI: Get rid of the include directory hack (it compiles but it doesn't link yet)
svn-id: r38201
-rw-r--r--engines/sci/engine/game.c10
-rw-r--r--engines/sci/engine/gc.c2
-rw-r--r--engines/sci/engine/gc.h4
-rw-r--r--engines/sci/engine/grammar.c6
-rw-r--r--engines/sci/engine/heap.c6
-rw-r--r--engines/sci/engine/heap.h2
-rw-r--r--engines/sci/engine/kernel.c10
-rw-r--r--engines/sci/engine/kernel_types.h2
-rw-r--r--engines/sci/engine/kevent.c2
-rw-r--r--engines/sci/engine/kfile.c2
-rw-r--r--engines/sci/engine/kgraphics.c10
-rw-r--r--engines/sci/engine/klists.c2
-rw-r--r--engines/sci/engine/kmath.c2
-rw-r--r--engines/sci/engine/kmenu.c6
-rw-r--r--engines/sci/engine/kmovement.c4
-rw-r--r--engines/sci/engine/kpathing.c6
-rw-r--r--engines/sci/engine/kscripts.c6
-rw-r--r--engines/sci/engine/ksound.c4
-rw-r--r--engines/sci/engine/kstring.c6
-rw-r--r--engines/sci/engine/message.c2
-rw-r--r--engines/sci/engine/message.h2
-rw-r--r--engines/sci/engine/said.c78
-rw-r--r--engines/sci/engine/said.y2
-rw-r--r--engines/sci/engine/savegame.c511
-rw-r--r--engines/sci/engine/savegame.cfsml10
-rw-r--r--engines/sci/engine/scriptdebug.c20
-rw-r--r--engines/sci/engine/seg_manager.c8
-rw-r--r--engines/sci/engine/sys_strings.c4
-rw-r--r--engines/sci/engine/vm.c16
-rw-r--r--engines/sci/gfx/antialias.c4
-rw-r--r--engines/sci/gfx/drivers/scummvm_driver.cpp13
-rw-r--r--engines/sci/gfx/font-5x8.c2
-rw-r--r--engines/sci/gfx/font-6x10.c2
-rw-r--r--engines/sci/gfx/font.c6
-rw-r--r--engines/sci/gfx/gfx_pixmap_scale.c2
-rw-r--r--engines/sci/gfx/gfx_res_options.c6
-rw-r--r--engines/sci/gfx/gfx_resource.c6
-rw-r--r--engines/sci/gfx/gfx_support.c4
-rw-r--r--engines/sci/gfx/gfx_tools.c4
-rw-r--r--engines/sci/gfx/menubar.c6
-rw-r--r--engines/sci/gfx/operations.c4
-rw-r--r--engines/sci/gfx/resmgr.c10
-rw-r--r--engines/sci/gfx/resource/sci_cursor_0.c6
-rw-r--r--engines/sci/gfx/resource/sci_font.c8
-rw-r--r--engines/sci/gfx/resource/sci_pal_1.c6
-rw-r--r--engines/sci/gfx/resource/sci_pic_0.c6
-rw-r--r--engines/sci/gfx/resource/sci_resmgr.c10
-rw-r--r--engines/sci/gfx/resource/sci_view_0.c8
-rw-r--r--engines/sci/gfx/resource/sci_view_1.c8
-rw-r--r--engines/sci/gfx/sbtree.c4
-rw-r--r--engines/sci/gfx/sci_widgets.c10
-rw-r--r--engines/sci/gfx/widgets.c4
-rw-r--r--engines/sci/include/conf_parse.h2
-rw-r--r--engines/sci/include/console.h8
-rw-r--r--engines/sci/include/engine.h22
-rw-r--r--engines/sci/include/event.h2
-rw-r--r--engines/sci/include/gfx_driver.h4
-rw-r--r--engines/sci/include/gfx_operations.h10
-rw-r--r--engines/sci/include/gfx_options.h6
-rw-r--r--engines/sci/include/gfx_res_options.h4
-rw-r--r--engines/sci/include/gfx_resmgr.h4
-rw-r--r--engines/sci/include/gfx_resource.h4
-rw-r--r--engines/sci/include/gfx_state_internal.h10
-rw-r--r--engines/sci/include/gfx_system.h4
-rw-r--r--engines/sci/include/gfx_tools.h4
-rw-r--r--engines/sci/include/gfx_widgets.h2
-rw-r--r--engines/sci/include/heapmgr.h4
-rw-r--r--engines/sci/include/kernel.h8
-rw-r--r--engines/sci/include/menubar.h4
-rw-r--r--engines/sci/include/resource.h2
-rw-r--r--engines/sci/include/sci_memory.h2
-rw-r--r--engines/sci/include/sci_widgets.h2
-rw-r--r--engines/sci/include/sciresource.h4
-rw-r--r--engines/sci/include/script.h2
-rw-r--r--engines/sci/include/seg_manager.h6
-rw-r--r--engines/sci/include/sfx_engine.h8
-rw-r--r--engines/sci/include/sfx_iterator.h4
-rw-r--r--engines/sci/include/sfx_iterator_internal.h4
-rw-r--r--engines/sci/include/sfx_pcm.h8
-rw-r--r--engines/sci/include/sfx_player.h6
-rw-r--r--engines/sci/include/sfx_songlib.h4
-rw-r--r--engines/sci/include/sfx_timer.h2
-rw-r--r--engines/sci/include/versions.h2
-rw-r--r--engines/sci/include/vm.h14
-rw-r--r--engines/sci/include/vm_types.h2
-rw-r--r--engines/sci/include/vocabulary.h4
-rw-r--r--engines/sci/module.mk4
-rw-r--r--engines/sci/scicore/aatree.c4
-rw-r--r--engines/sci/scicore/decompress0.c4
-rw-r--r--engines/sci/scicore/decompress01.c4
-rw-r--r--engines/sci/scicore/decompress1.c4
-rw-r--r--engines/sci/scicore/decompress11.c4
-rw-r--r--engines/sci/scicore/exe.c6
-rw-r--r--engines/sci/scicore/exe_lzexe.c4
-rw-r--r--engines/sci/scicore/exe_raw.c4
-rw-r--r--engines/sci/scicore/int_hashmap.c4
-rw-r--r--engines/sci/scicore/reg_t_hashmap.c4
-rw-r--r--engines/sci/scicore/resource.c6
-rw-r--r--engines/sci/scicore/resource_map.c6
-rw-r--r--engines/sci/scicore/resource_patch.c4
-rw-r--r--engines/sci/scicore/sci_memory.c2
-rw-r--r--engines/sci/scicore/script.c4
-rw-r--r--engines/sci/scicore/tools.c2
-rw-r--r--engines/sci/scicore/versions.c10
-rw-r--r--engines/sci/scicore/vocab.c6
-rw-r--r--engines/sci/scicore/vocab_debug.c4
-rw-r--r--engines/sci/sfx/adlib.c2
-rw-r--r--engines/sci/sfx/adlib.h2
-rw-r--r--engines/sci/sfx/core.c10
-rw-r--r--engines/sci/sfx/device/devices.c2
-rw-r--r--engines/sci/sfx/iterator.c8
-rw-r--r--engines/sci/sfx/mixer.h2
-rw-r--r--engines/sci/sfx/mixer/mixers.c2
-rw-r--r--engines/sci/sfx/mixer/soft.c2
-rw-r--r--engines/sci/sfx/pcm-iterator.c6
-rw-r--r--engines/sci/sfx/pcm_device/pcm_devices.c4
-rw-r--r--engines/sci/sfx/pcm_device/scummvm.cpp4
-rw-r--r--engines/sci/sfx/player/players.c2
-rw-r--r--engines/sci/sfx/player/polled.c6
-rw-r--r--engines/sci/sfx/player/realtime.c4
-rw-r--r--engines/sci/sfx/sequencer.h6
-rw-r--r--engines/sci/sfx/softseq.h8
-rw-r--r--engines/sci/sfx/softseq/SN76496.c4
-rw-r--r--engines/sci/sfx/softseq/amiga.c6
-rw-r--r--engines/sci/sfx/softseq/fmopl.h2
-rw-r--r--engines/sci/sfx/softseq/pcspeaker.c4
-rw-r--r--engines/sci/sfx/songlib.c4
-rw-r--r--engines/sci/sfx/time.c4
-rw-r--r--engines/sci/sfx/timer/scummvm.cpp4
-rw-r--r--engines/sci/sfx/timer/timers.c4
130 files changed, 879 insertions, 375 deletions
diff --git a/engines/sci/engine/game.c b/engines/sci/engine/game.c
index a6672326ef..d630b3c963 100644
--- a/engines/sci/engine/game.c
+++ b/engines/sci/engine/game.c
@@ -39,11 +39,11 @@
# endif
#endif
-#include <sciresource.h>
-#include <engine.h>
-#include <versions.h>
-#include <kernel.h>
-#include "kernel_types.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/versions.h"
+#include "sci/include/kernel.h"
+#include "sci/engine/kernel_types.h"
/* Structures and data from vm.c: */
extern calls_struct_t *send_calls;
diff --git a/engines/sci/engine/gc.c b/engines/sci/engine/gc.c
index 063c58a076..bdad84d7d4 100644
--- a/engines/sci/engine/gc.c
+++ b/engines/sci/engine/gc.c
@@ -18,7 +18,7 @@
***************************************************************************/
-#include "gc.h"
+#include "sci/engine/gc.h"
#define WORKLIST_CHUNK_SIZE 32
diff --git a/engines/sci/engine/gc.h b/engines/sci/engine/gc.h
index b0368ee8c2..4e64c0b424 100644
--- a/engines/sci/engine/gc.h
+++ b/engines/sci/engine/gc.h
@@ -22,8 +22,8 @@
#ifndef GC_H_
#define GC_H_
-#include <reg_t_hashmap.h>
-#include <engine.h>
+#include "sci/include/reg_t_hashmap.h"
+#include "sci/include/engine.h"
reg_t_hash_map_ptr
find_all_used_references(state_t *s);
diff --git a/engines/sci/engine/grammar.c b/engines/sci/engine/grammar.c
index 557c535b77..7daf735b6d 100644
--- a/engines/sci/engine/grammar.c
+++ b/engines/sci/engine/grammar.c
@@ -23,9 +23,9 @@
** that grammar, writing an appropriate node tree if successful.
*/
-#include <resource.h>
-#include <vocabulary.h>
-#include <console.h>
+#include "sci/include/resource.h"
+#include "sci/include/vocabulary.h"
+#include "sci/include/console.h"
#include <stdarg.h>
#include <string.h>
diff --git a/engines/sci/engine/heap.c b/engines/sci/engine/heap.c
index cb5cacaffd..4b2314ace7 100644
--- a/engines/sci/engine/heap.c
+++ b/engines/sci/engine/heap.c
@@ -2,9 +2,9 @@
#include <stdlib.h>
#include <stdio.h>
-#include <engine.h>
-#include <console.h>
-#include "heap.h"
+#include "sci/include/engine.h"
+#include "sci/include/console.h"
+#include "sci/engine/heap.h"
#define assert_in_range(pos) assert(pos>=1000 && pos<=0xffff)
diff --git a/engines/sci/engine/heap.h b/engines/sci/engine/heap.h
index afd2db5c58..8c1f0dd3f4 100644
--- a/engines/sci/engine/heap.h
+++ b/engines/sci/engine/heap.h
@@ -28,7 +28,7 @@
#ifndef _SCI_HEAP_H
#define _SCI_HEAP_H
-#include <resource.h>
+#include "sci/include/resource.h"
#define SCI_HEAP_SIZE 0x10000
diff --git a/engines/sci/engine/kernel.c b/engines/sci/engine/kernel.c
index df3690f467..e0092bfb69 100644
--- a/engines/sci/engine/kernel.c
+++ b/engines/sci/engine/kernel.c
@@ -25,15 +25,15 @@
***************************************************************************/
-#include "gc.h"
-#include <sciresource.h>
-#include <engine.h>
+#include "sci/engine/gc.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
#ifdef _WIN32
# include <windows.h>
#endif /* _WIN32 */
-#include <gfx_operations.h>
-#include "kernel_types.h"
+#include "sci/include/gfx_operations.h"
+#include "sci/engine/kernel_types.h"
/* New kernel functions */
diff --git a/engines/sci/engine/kernel_types.h b/engines/sci/engine/kernel_types.h
index 0ac56bcf6a..f13e793457 100644
--- a/engines/sci/engine/kernel_types.h
+++ b/engines/sci/engine/kernel_types.h
@@ -28,7 +28,7 @@
#ifndef _FREESCI_KERNEL_TYPES_H_
#define _FREESCI_KERNEL_TYPES_H_
-#include "vm_types.h"
+#include "sci/include/vm_types.h"
#define KSIG_TERMINATOR 0
diff --git a/engines/sci/engine/kevent.c b/engines/sci/engine/kevent.c
index 9054aded41..3b6df771e7 100644
--- a/engines/sci/engine/kevent.c
+++ b/engines/sci/engine/kevent.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <engine.h>
+#include "sci/include/engine.h"
int stop_on_event;
diff --git a/engines/sci/engine/kfile.c b/engines/sci/engine/kfile.c
index c4f6c63ac2..90d0b86ed9 100644
--- a/engines/sci/engine/kfile.c
+++ b/engines/sci/engine/kfile.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <engine.h>
+#include "sci/include/engine.h"
#ifdef _WIN32
# ifndef PATH_MAX
diff --git a/engines/sci/engine/kgraphics.c b/engines/sci/engine/kgraphics.c
index 2f15877ac8..963d2362b5 100644
--- a/engines/sci/engine/kgraphics.c
+++ b/engines/sci/engine/kgraphics.c
@@ -25,11 +25,11 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
-#include <gfx_widgets.h>
-#include "sci_graphics.h"
-#include <sci_widgets.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/gfx_widgets.h"
+#include "sci/engine/sci_graphics.h"
+#include "sci/include/sci_widgets.h"
#undef DEBUG_LSRECT
diff --git a/engines/sci/engine/klists.c b/engines/sci/engine/klists.c
index 7637ddd403..96b527d812 100644
--- a/engines/sci/engine/klists.c
+++ b/engines/sci/engine/klists.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <engine.h>
+#include "sci/include/engine.h"
#ifdef LOOKUP_NODE
# undef LOOKUP_NODE
diff --git a/engines/sci/engine/kmath.c b/engines/sci/engine/kmath.c
index 94480ab3bd..4c8ebb8ec5 100644
--- a/engines/sci/engine/kmath.c
+++ b/engines/sci/engine/kmath.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <engine.h>
+#include "sci/include/engine.h"
reg_t
diff --git a/engines/sci/engine/kmenu.c b/engines/sci/engine/kmenu.c
index 4530d5c34f..bd676213f4 100644
--- a/engines/sci/engine/kmenu.c
+++ b/engines/sci/engine/kmenu.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
-#include <sci_widgets.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/sci_widgets.h"
reg_t
diff --git a/engines/sci/engine/kmovement.c b/engines/sci/engine/kmovement.c
index 5f7d1a7281..1234a9028a 100644
--- a/engines/sci/engine/kmovement.c
+++ b/engines/sci/engine/kmovement.c
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
/*
Compute "velocity" vector (xStep,yStep)=(vx,vy) for a jump from (0,0) to (dx,dy), with gravity gy.
diff --git a/engines/sci/engine/kpathing.c b/engines/sci/engine/kpathing.c
index aab4986462..8560ea29b3 100644
--- a/engines/sci/engine/kpathing.c
+++ b/engines/sci/engine/kpathing.c
@@ -31,9 +31,9 @@
#include <math.h>
-#include <engine.h>
-#include <aatree.h>
-#include <list.h>
+#include "sci/include/engine.h"
+#include "sci/include/aatree.h"
+#include "sci/include/list.h"
#define POLY_LAST_POINT 0x7777
#define POLY_POINT_SIZE 4
diff --git a/engines/sci/engine/kscripts.c b/engines/sci/engine/kscripts.c
index 1fd7fd9a85..02517365c8 100644
--- a/engines/sci/engine/kscripts.c
+++ b/engines/sci/engine/kscripts.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
-#include "kernel_types.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/engine/kernel_types.h"
reg_t
read_selector(state_t *s, reg_t object, selector_t selector_id, const char *file, int line)
diff --git a/engines/sci/engine/ksound.c b/engines/sci/engine/ksound.c
index e95f219e4b..6a2cbeec32 100644
--- a/engines/sci/engine/ksound.c
+++ b/engines/sci/engine/ksound.c
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <engine.h>
-#include <sfx_player.h>
+#include "sci/include/engine.h"
+#include "sci/include/sfx_player.h"
#define _K_SCI0_SOUND_INIT_HANDLE 0
#define _K_SCI0_SOUND_PLAY_HANDLE 1
diff --git a/engines/sci/engine/kstring.c b/engines/sci/engine/kstring.c
index c4b5426329..b8e4ec3b74 100644
--- a/engines/sci/engine/kstring.c
+++ b/engines/sci/engine/kstring.c
@@ -26,9 +26,9 @@
***************************************************************************/
/* String and parser handling */
-#include <sciresource.h>
-#include <engine.h>
-#include "message.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/engine/message.h"
#define CHECK_OVERFLOW1(pt, size, rv) \
if (((pt) - (str_base)) + (size) > maxsize) { \
diff --git a/engines/sci/engine/message.c b/engines/sci/engine/message.c
index 97171a9763..bf4657a96e 100644
--- a/engines/sci/engine/message.c
+++ b/engines/sci/engine/message.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include "message.h"
+#include "sci/engine/message.h"
static
int get_talker_trivial(index_record_cursor_t *cursor)
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 7618e55429..6613ff6d0b 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <sciresource.h>
+#include "sci/include/sciresource.h"
typedef struct
{
diff --git a/engines/sci/engine/said.c b/engines/sci/engine/said.c
index 2e90920add..5296fc4b51 100644
--- a/engines/sci/engine/said.c
+++ b/engines/sci/engine/said.c
@@ -104,10 +104,10 @@
/* Copy the first part of user declarations. */
-#line 28 "said.y"
+#line 28 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
-#include <engine.h>
+#include "sci/include/engine.h"
#define SAID_BRANCH_NULL 0
@@ -228,7 +228,7 @@ typedef int YYSTYPE;
/* Line 216 of yacc.c. */
-#line 232 "said.c"
+#line 232 "y.tab.c"
#ifdef short
# undef short
@@ -1472,178 +1472,178 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 139 "said.y"
+#line 139 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_top_branch(said_attach_branch((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]))); }
break;
case 3:
-#line 141 "said.y"
+#line 141 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_top_branch(said_attach_branch((yyvsp[(1) - (3)]), said_attach_branch((yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])))); }
break;
case 4:
-#line 143 "said.y"
+#line 143 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_top_branch(said_attach_branch((yyvsp[(1) - (4)]), said_attach_branch((yyvsp[(2) - (4)]), said_attach_branch((yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]))))); }
break;
case 5:
-#line 148 "said.y"
+#line 148 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = SAID_BRANCH_NULL; }
break;
case 6:
-#line 150 "said.y"
+#line 150 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_paren(said_value(0x14b, said_value(0xf900, said_terminal(0xf900))), SAID_BRANCH_NULL); }
break;
case 7:
-#line 156 "said.y"
+#line 156 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = SAID_BRANCH_NULL; }
break;
case 8:
-#line 158 "said.y"
+#line 158 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_paren(said_value(0x141, said_value(0x149, (yyvsp[(1) - (1)]))), SAID_BRANCH_NULL); }
break;
case 9:
-#line 164 "said.y"
+#line 164 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x142, 0x14a, (yyvsp[(2) - (2)]), SAID_BRANCH_NULL); }
break;
case 10:
-#line 166 "said.y"
+#line 166 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x152, 0x142, said_aug_branch(0x142, 0x14a, (yyvsp[(3) - (4)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 11:
-#line 168 "said.y"
+#line 168 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = SAID_BRANCH_NULL; }
break;
case 12:
-#line 174 "said.y"
+#line 174 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x143, 0x14a, (yyvsp[(2) - (2)]), SAID_BRANCH_NULL); }
break;
case 13:
-#line 176 "said.y"
+#line 176 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x152, 0x143, said_aug_branch(0x143, 0x14a, (yyvsp[(3) - (4)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 14:
-#line 178 "said.y"
+#line 178 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = SAID_BRANCH_NULL; }
break;
case 15:
-#line 184 "said.y"
+#line 184 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_paren(said_value(0x141, said_value(0x153, said_terminal((yyvsp[(1) - (1)])))), SAID_BRANCH_NULL); }
break;
case 16:
-#line 189 "said.y"
+#line 189 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x141, 0x14f, (yyvsp[(1) - (1)]), SAID_BRANCH_NULL); }
break;
case 17:
-#line 191 "said.y"
+#line 191 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x141, 0x14f, said_aug_branch(0x152, 0x14c, said_aug_branch(0x141, 0x14f, (yyvsp[(2) - (3)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 18:
-#line 196 "said.y"
+#line 196 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 19:
-#line 198 "said.y"
+#line 198 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = (yyvsp[(1) - (3)]); }
break;
case 20:
-#line 200 "said.y"
+#line 200 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_attach_branch((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); }
break;
case 21:
-#line 202 "said.y"
+#line 202 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_attach_branch((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); }
break;
case 22:
-#line 204 "said.y"
+#line 204 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_attach_branch((yyvsp[(1) - (5)]), (yyvsp[(3) - (5)])); }
break;
case 23:
-#line 210 "said.y"
+#line 210 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_attach_branch((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
break;
case 24:
-#line 212 "said.y"
+#line 212 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 25:
-#line 214 "said.y"
+#line 214 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 26:
-#line 220 "said.y"
+#line 220 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 27:
-#line 222 "said.y"
+#line 222 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x152, 0x144, (yyvsp[(2) - (3)]), SAID_BRANCH_NULL); }
break;
case 28:
-#line 224 "said.y"
+#line 224 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_attach_branch((yyvsp[(1) - (4)]), said_aug_branch(0x152, 0x144, (yyvsp[(3) - (4)]), SAID_BRANCH_NULL)); }
break;
case 29:
-#line 230 "said.y"
+#line 230 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x144, 0x14f, (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); }
break;
case 30:
-#line 232 "said.y"
+#line 232 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x144, 0x14f, said_aug_branch(0x141, 0x144, (yyvsp[(2) - (4)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 31:
-#line 234 "said.y"
+#line 234 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x144, 0x14f, (yyvsp[(2) - (2)]), SAID_BRANCH_NULL); }
break;
case 32:
-#line 236 "said.y"
+#line 236 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x152, 0x144, said_aug_branch(0x144, 0x14f, (yyvsp[(3) - (4)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 33:
-#line 242 "said.y"
+#line 242 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x141, 0x144, said_aug_branch(0x144, 0x14f, (yyvsp[(2) - (3)]), SAID_BRANCH_NULL), (yyvsp[(3) - (3)])); }
break;
case 34:
-#line 244 "said.y"
+#line 244 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x141, 0x144, said_aug_branch(0x144, 0x14f, (yyvsp[(2) - (2)]), SAID_BRANCH_NULL), SAID_BRANCH_NULL); }
break;
case 35:
-#line 246 "said.y"
+#line 246 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
{ (yyval) = said_aug_branch(0x141, 0x14c, (yyvsp[(2) - (4)]), SAID_BRANCH_NULL); }
break;
/* Line 1267 of yacc.c. */
-#line 1647 "said.c"
+#line 1647 "y.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1857,7 +1857,7 @@ yyreturn:
}
-#line 251 "said.y"
+#line 251 "../../full-svn/scummvm/trunk/engines/sci/engine/said.y"
diff --git a/engines/sci/engine/said.y b/engines/sci/engine/said.y
index fdef2360ae..e2a39d6b34 100644
--- a/engines/sci/engine/said.y
+++ b/engines/sci/engine/said.y
@@ -27,7 +27,7 @@
%{
-#include <engine.h>
+#include "sci/include/engine.h"
#define SAID_BRANCH_NULL 0
diff --git a/engines/sci/engine/savegame.c b/engines/sci/engine/savegame.c
index 0537fcacd5..94011f3277 100644
--- a/engines/sci/engine/savegame.c
+++ b/engines/sci/engine/savegame.c
@@ -30,12 +30,12 @@
** savegame.cfsml. If this doesn't solve your problem, contact the maintainer.
*/
-#include <sci_memory.h>
-#include <gfx_operations.h>
-#include <sfx_engine.h>
-#include <engine.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_operations.h"
+#include "sci/include/sfx_engine.h"
+#include "sci/include/engine.h"
#include <assert.h>
-#include "heap.h"
+#include "sci/engine/heap.h"
#ifdef _MSC_VER
#include <direct.h>
@@ -183,9 +183,11 @@ typedef mem_obj_t *mem_obj_ptr;
/* Auto-generated CFSML declaration and function block */
+#line 796 "savegame.cfsml"
#define CFSML_SUCCESS 0
#define CFSML_FAILURE 1
+#line 102 "savegame.cfsml"
#include <stdarg.h> /* We need va_lists */
#include <sci_memory.h>
@@ -396,6 +398,7 @@ _cfsml_get_identifier(FILE *fd, int *line, int *hiteof, int *assignment)
retval = (char *) sci_realloc(retval, mem += 1);
retval[pos] = 0; /* Terminate string */
+#line 322 "savegame.cfsml"
return _cfsml_last_identifier_retreived = retval;
}
@@ -443,181 +446,217 @@ _cfsml_get_value(FILE *fd, int *line, int *hiteof)
retval = (char *) sci_realloc(retval, mem += 1);
retval[pos] = 0; /* Terminate string */
+#line 379 "savegame.cfsml"
return (_cfsml_last_value_retreived = (char *) sci_realloc(retval, strlen(retval) + 1));
/* Re-allocate; this value might be used for quite some while (if we are
** restoring a string)
*/
}
+#line 431 "savegame.cfsml"
static void
_cfsml_write_synonym_t(FILE *fh, synonym_t* save_struc);
static int
_cfsml_read_synonym_t(FILE *fh, synonym_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_sfx_state_t(FILE *fh, sfx_state_t* save_struc);
static int
_cfsml_read_sfx_state_t(FILE *fh, sfx_state_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_clone_entry_t(FILE *fh, clone_entry_t* save_struc);
static int
_cfsml_read_clone_entry_t(FILE *fh, clone_entry_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_object_t(FILE *fh, object_t* save_struc);
static int
_cfsml_read_object_t(FILE *fh, object_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_string(FILE *fh, char ** save_struc);
static int
_cfsml_read_string(FILE *fh, char ** save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_menubar_t(FILE *fh, menubar_t* save_struc);
static int
_cfsml_read_menubar_t(FILE *fh, menubar_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_size_t(FILE *fh, size_t* save_struc);
static int
_cfsml_read_size_t(FILE *fh, size_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_list_entry_t(FILE *fh, list_entry_t* save_struc);
static int
_cfsml_read_list_entry_t(FILE *fh, list_entry_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_int_hash_map_t(FILE *fh, int_hash_map_t* save_struc);
static int
_cfsml_read_int_hash_map_t(FILE *fh, int_hash_map_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_gint16(FILE *fh, gint16* save_struc);
static int
_cfsml_read_gint16(FILE *fh, gint16* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_song_t(FILE *fh, song_t* save_struc);
static int
_cfsml_read_song_t(FILE *fh, song_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_menu_item_t(FILE *fh, menu_item_t* save_struc);
static int
_cfsml_read_menu_item_t(FILE *fh, menu_item_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_node_entry_t(FILE *fh, node_entry_t* save_struc);
static int
_cfsml_read_node_entry_t(FILE *fh, node_entry_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_seg_id_t(FILE *fh, seg_id_t* save_struc);
static int
_cfsml_read_seg_id_t(FILE *fh, seg_id_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_dynmem_t(FILE *fh, dynmem_t* save_struc);
static int
_cfsml_read_dynmem_t(FILE *fh, dynmem_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_local_variables_t(FILE *fh, local_variables_t* save_struc);
static int
_cfsml_read_local_variables_t(FILE *fh, local_variables_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_state_t(FILE *fh, state_t* save_struc);
static int
_cfsml_read_state_t(FILE *fh, state_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_node_table_t(FILE *fh, node_table_t* save_struc);
static int
_cfsml_read_node_table_t(FILE *fh, node_table_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_sys_strings_t(FILE *fh, sys_strings_t* save_struc);
static int
_cfsml_read_sys_strings_t(FILE *fh, sys_strings_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_byte(FILE *fh, byte* save_struc);
static int
_cfsml_read_byte(FILE *fh, byte* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_node_t(FILE *fh, node_t* save_struc);
static int
_cfsml_read_node_t(FILE *fh, node_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_list_table_t(FILE *fh, list_table_t* save_struc);
static int
_cfsml_read_list_table_t(FILE *fh, list_table_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_class_t(FILE *fh, class_t* save_struc);
static int
_cfsml_read_class_t(FILE *fh, class_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_song_handle_t(FILE *fh, song_handle_t* save_struc);
static int
_cfsml_read_song_handle_t(FILE *fh, song_handle_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_int(FILE *fh, int* save_struc);
static int
_cfsml_read_int(FILE *fh, int* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_menu_t(FILE *fh, menu_t* save_struc);
static int
_cfsml_read_menu_t(FILE *fh, menu_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_long(FILE *fh, long* save_struc);
static int
_cfsml_read_long(FILE *fh, long* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_clone_table_t(FILE *fh, clone_table_t* save_struc);
static int
_cfsml_read_clone_table_t(FILE *fh, clone_table_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_clone_t(FILE *fh, clone_t* save_struc);
static int
_cfsml_read_clone_t(FILE *fh, clone_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_list_t(FILE *fh, list_t* save_struc);
static int
_cfsml_read_list_t(FILE *fh, list_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_sys_string_t(FILE *fh, sys_string_t* save_struc);
static int
_cfsml_read_sys_string_t(FILE *fh, sys_string_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_script_t(FILE *fh, script_t* save_struc);
static int
_cfsml_read_script_t(FILE *fh, script_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 431 "savegame.cfsml"
static void
_cfsml_write_seg_manager_t(FILE *fh, seg_manager_t* save_struc);
static int
_cfsml_read_seg_manager_t(FILE *fh, seg_manager_t* save_struc, char *lastval, int *line, int *hiteof);
+#line 444 "savegame.cfsml"
static void
_cfsml_write_synonym_t(FILE *fh, synonym_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "replaceant = ");
_cfsml_write_int(fh, (int*) &(save_struc->replaceant));
@@ -628,11 +667,13 @@ _cfsml_write_synonym_t(FILE *fh, synonym_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_synonym_t(FILE *fh, synonym_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -664,17 +705,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "replaceant")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->replaceant), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for replaceant at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "replacement")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->replacement), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for replacement at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("synonym_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -684,11 +728,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_sfx_state_t(FILE *fh, sfx_state_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "songlib = ");
write_songlib_t(fh, (songlib_t*) &(save_struc->songlib));
@@ -696,11 +742,13 @@ _cfsml_write_sfx_state_t(FILE *fh, sfx_state_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_sfx_state_t(FILE *fh, sfx_state_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -732,11 +780,13 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "songlib")) {
+#line 749 "savegame.cfsml"
if (read_songlib_t(fh, (songlib_t*) &(save_struc->songlib), value, line, hiteof)) {
_cfsml_error("Token expected by read_songlib_t() for songlib at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("sfx_state_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -746,11 +796,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_clone_entry_t(FILE *fh, clone_entry_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -761,11 +813,13 @@ _cfsml_write_clone_entry_t(FILE *fh, clone_entry_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_clone_entry_t(FILE *fh, clone_entry_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -797,17 +851,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_clone_t(fh, (clone_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_clone_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("clone_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -817,11 +874,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_object_t(FILE *fh, object_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "flags = ");
_cfsml_write_int(fh, (int*) &(save_struc->flags));
@@ -842,6 +901,7 @@ _cfsml_write_object_t(FILE *fh, object_t* save_struc)
min = max = save_struc->variables_nr;
if (!save_struc->variables)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->variables[i]));
@@ -852,11 +912,13 @@ _cfsml_write_object_t(FILE *fh, object_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_object_t(FILE *fh, object_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -888,40 +950,47 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "flags")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "pos")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variable_names_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "methods_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -938,9 +1007,11 @@ int min, max, i;
}
else
save_struc->variables = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -957,6 +1028,7 @@ int min, max, i;
} while (!done);
save_struc->variables_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("object_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -966,9 +1038,11 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_string(FILE *fh, char ** save_struc)
{
+#line 454 "savegame.cfsml"
if (!(*save_struc))
fprintf(fh, "\\null\\");
else {
@@ -978,10 +1052,12 @@ _cfsml_write_string(FILE *fh, char ** save_struc)
}
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_string(FILE *fh, char ** save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 577 "savegame.cfsml"
if (strcmp(lastval, "\\null\\")) { /* null pointer? */
if (*lastval == '"') { /* Quoted string? */
@@ -1007,16 +1083,19 @@ _cfsml_read_string(FILE *fh, char ** save_struc, char *lastval, int *line, int *
}
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_menubar_t(FILE *fh, menubar_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "menus = ");
min = max = save_struc->menus_nr;
if (!save_struc->menus)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_menu_t(fh, &(save_struc->menus[i]));
@@ -1027,11 +1106,13 @@ _cfsml_write_menubar_t(FILE *fh, menubar_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_menubar_t(FILE *fh, menubar_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1063,10 +1144,12 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "menus")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1083,9 +1166,11 @@ int min, max, i;
}
else
save_struc->menus = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1102,6 +1187,7 @@ int min, max, i;
} while (!done);
save_struc->menus_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("menubar_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1111,16 +1197,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_size_t(FILE *fh, size_t* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_size_t(FILE *fh, size_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -1134,11 +1223,13 @@ _cfsml_read_size_t(FILE *fh, size_t* save_struc, char *lastval, int *line, int *
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_list_entry_t(FILE *fh, list_entry_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -1149,11 +1240,13 @@ _cfsml_write_list_entry_t(FILE *fh, list_entry_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_list_entry_t(FILE *fh, list_entry_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1185,17 +1278,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_list_t(fh, (list_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_list_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("list_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1205,17 +1301,20 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_int_hash_map_t(FILE *fh, int_hash_map_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "base_value = ");
_cfsml_write_int(fh, (int*) &(save_struc->base_value));
fprintf(fh, "\n");
fprintf(fh, "nodes = ");
min = max = DCS_INT_HASH_MAX+1;
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
write_int_hash_map_node_tp(fh, &(save_struc->nodes[i]));
@@ -1226,11 +1325,13 @@ _cfsml_write_int_hash_map_t(FILE *fh, int_hash_map_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_int_hash_map_t(FILE *fh, int_hash_map_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1262,21 +1363,25 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "base_value")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->base_value), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for base_value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nodes")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
/* Prepare to restore static array */
max = DCS_INT_HASH_MAX+1;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1292,6 +1397,7 @@ int min, max, i;
} else done = 1;
} while (!done);
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("int_hash_map_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1301,16 +1407,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_gint16(FILE *fh, gint16* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_gint16(FILE *fh, gint16* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -1324,11 +1433,13 @@ _cfsml_read_gint16(FILE *fh, gint16* save_struc, char *lastval, int *line, int *
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_song_t(FILE *fh, song_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "handle = ");
_cfsml_write_song_handle_t(fh, (song_handle_t*) &(save_struc->handle));
@@ -1357,11 +1468,13 @@ _cfsml_write_song_t(FILE *fh, song_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_song_t(FILE *fh, song_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1393,53 +1506,62 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "handle")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_song_handle_t(fh, (song_handle_t*) &(save_struc->handle), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_song_handle_t() for handle at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "resource_num")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->resource_num), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for resource_num at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "priority")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->priority), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for priority at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "restore_behavior")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->restore_behavior), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for restore_behavior at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "restore_time")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->restore_time), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for restore_time at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "loops")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->loops), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for loops at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "hold")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->hold), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for hold at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("song_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1449,11 +1571,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_menu_item_t(FILE *fh, menu_item_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "type = ");
_cfsml_write_int(fh, (int*) &(save_struc->type));
@@ -1469,6 +1593,7 @@ _cfsml_write_menu_item_t(FILE *fh, menu_item_t* save_struc)
fprintf(fh, "\n");
fprintf(fh, "said = ");
min = max = MENU_SAID_SPEC_SIZE;
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_byte(fh, &(save_struc->said[i]));
@@ -1500,11 +1625,13 @@ _cfsml_write_menu_item_t(FILE *fh, menu_item_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_menu_item_t(FILE *fh, menu_item_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1536,39 +1663,46 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "type")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->type), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for type at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "keytext")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->keytext), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for keytext at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "keytext_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->keytext_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for keytext_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "flags")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "said")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
/* Prepare to restore static array */
max = MENU_SAID_SPEC_SIZE;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1585,47 +1719,55 @@ int min, max, i;
} while (!done);
} else
if (!strcmp(token, "said_pos")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->said_pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for said_pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "text")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->text), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for text at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "text_pos")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->text_pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for text_pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "modifiers")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->modifiers), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for modifiers at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "key")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->key), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for key at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "enabled")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->enabled), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for enabled at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "tag")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->tag), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for tag at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("menu_item_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1635,11 +1777,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_node_entry_t(FILE *fh, node_entry_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "next_free = ");
_cfsml_write_int(fh, (int*) &(save_struc->next_free));
@@ -1650,11 +1794,13 @@ _cfsml_write_node_entry_t(FILE *fh, node_entry_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_node_entry_t(FILE *fh, node_entry_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1686,17 +1832,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "next_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->next_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for next_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_node_t(fh, (node_t*) &(save_struc->entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_node_t() for entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("node_entry_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1706,16 +1855,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_seg_id_t(FILE *fh, seg_id_t* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_seg_id_t(FILE *fh, seg_id_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -1729,11 +1881,13 @@ _cfsml_read_seg_id_t(FILE *fh, seg_id_t* save_struc, char *lastval, int *line, i
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_dynmem_t(FILE *fh, dynmem_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "size = ");
_cfsml_write_int(fh, (int*) &(save_struc->size));
@@ -1745,6 +1899,7 @@ _cfsml_write_dynmem_t(FILE *fh, dynmem_t* save_struc)
min = max = save_struc->size;
if (!save_struc->buf)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_byte(fh, &(save_struc->buf[i]));
@@ -1755,11 +1910,13 @@ _cfsml_write_dynmem_t(FILE *fh, dynmem_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_dynmem_t(FILE *fh, dynmem_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1791,22 +1948,26 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "description")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->description), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for description at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "buf")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1823,9 +1984,11 @@ int min, max, i;
}
else
save_struc->buf = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1842,6 +2005,7 @@ int min, max, i;
} while (!done);
save_struc->size = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("dynmem_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1851,11 +2015,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_local_variables_t(FILE *fh, local_variables_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "script_id = ");
_cfsml_write_int(fh, (int*) &(save_struc->script_id));
@@ -1867,6 +2033,7 @@ _cfsml_write_local_variables_t(FILE *fh, local_variables_t* save_struc)
min = max = save_struc->nr;
if (!save_struc->locals)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->locals[i]));
@@ -1877,11 +2044,13 @@ _cfsml_write_local_variables_t(FILE *fh, local_variables_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_local_variables_t(FILE *fh, local_variables_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -1913,22 +2082,26 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "script_id")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->script_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for script_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "locals")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -1945,9 +2118,11 @@ int min, max, i;
}
else
save_struc->locals = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -1964,6 +2139,7 @@ int min, max, i;
} while (!done);
save_struc->nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("local_variables_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -1973,11 +2149,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_state_t(FILE *fh, state_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "savegame_version = ");
_cfsml_write_int(fh, (int*) &(save_struc->savegame_version));
@@ -2007,6 +2185,7 @@ _cfsml_write_state_t(FILE *fh, state_t* save_struc)
min = max = save_struc->classtable_size;
if (!save_struc->classtable)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_class_t(fh, &(save_struc->classtable[i]));
@@ -2020,11 +2199,13 @@ _cfsml_write_state_t(FILE *fh, state_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_state_t(FILE *fh, state_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2056,58 +2237,68 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "savegame_version")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->savegame_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for savegame_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "game_version")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->game_version), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for game_version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "version")) {
+#line 749 "savegame.cfsml"
if (read_sci_version(fh, (sci_version_t*) &(save_struc->version), value, line, hiteof)) {
_cfsml_error("Token expected by read_sci_version() for version at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "menubar")) {
+#line 749 "savegame.cfsml"
if (read_menubar_tp(fh, (menubar_t **) &(save_struc->menubar), value, line, hiteof)) {
_cfsml_error("Token expected by read_menubar_tp() for menubar at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status_bar_foreground")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_foreground), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status_bar_foreground at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "status_bar_background")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->status_bar_background), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for status_bar_background at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "seg_manager")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_seg_manager_t(fh, (seg_manager_t*) &(save_struc->seg_manager), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_manager_t() for seg_manager at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "classtable_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->classtable_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for classtable_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "classtable")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2124,9 +2315,11 @@ int min, max, i;
}
else
save_struc->classtable = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2144,11 +2337,13 @@ int min, max, i;
save_struc->classtable_size = max ; /* Set array size accordingly */
} else
if (!strcmp(token, "sound")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_sfx_state_t(fh, (sfx_state_t*) &(save_struc->sound), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_sfx_state_t() for sound at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("state_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2158,11 +2353,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_node_table_t(FILE *fh, node_table_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -2180,6 +2377,7 @@ _cfsml_write_node_table_t(FILE *fh, node_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_node_entry_t(fh, &(save_struc->table[i]));
@@ -2190,11 +2388,13 @@ _cfsml_write_node_table_t(FILE *fh, node_table_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_node_table_t(FILE *fh, node_table_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2226,34 +2426,40 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2270,9 +2476,11 @@ int min, max, i;
}
else
save_struc->table = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2289,6 +2497,7 @@ int min, max, i;
} while (!done);
save_struc->entries_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("node_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2298,14 +2507,17 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_sys_strings_t(FILE *fh, sys_strings_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "strings = ");
min = max = SYS_STRINGS_MAX;
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_sys_string_t(fh, &(save_struc->strings[i]));
@@ -2316,11 +2528,13 @@ _cfsml_write_sys_strings_t(FILE *fh, sys_strings_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_sys_strings_t(FILE *fh, sys_strings_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2352,15 +2566,18 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "strings")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
/* Prepare to restore static array */
max = SYS_STRINGS_MAX;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2376,6 +2593,7 @@ int min, max, i;
} else done = 1;
} while (!done);
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("sys_strings_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2385,16 +2603,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_byte(FILE *fh, byte* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_byte(FILE *fh, byte* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -2408,11 +2629,13 @@ _cfsml_read_byte(FILE *fh, byte* save_struc, char *lastval, int *line, int *hite
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_node_t(FILE *fh, node_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "pred = ");
write_reg_t(fh, (reg_t*) &(save_struc->pred));
@@ -2429,11 +2652,13 @@ _cfsml_write_node_t(FILE *fh, node_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_node_t(FILE *fh, node_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2465,29 +2690,34 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "pred")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pred), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pred at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "succ")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->succ), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for succ at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "key")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->key), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for key at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "value")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->value), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("node_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2497,11 +2727,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_list_table_t(FILE *fh, list_table_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -2519,6 +2751,7 @@ _cfsml_write_list_table_t(FILE *fh, list_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_list_entry_t(fh, &(save_struc->table[i]));
@@ -2529,11 +2762,13 @@ _cfsml_write_list_table_t(FILE *fh, list_table_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_list_table_t(FILE *fh, list_table_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2565,34 +2800,40 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2609,9 +2850,11 @@ int min, max, i;
}
else
save_struc->table = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2628,6 +2871,7 @@ int min, max, i;
} while (!done);
save_struc->entries_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("list_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2637,11 +2881,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_class_t(FILE *fh, class_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "script = ");
_cfsml_write_int(fh, (int*) &(save_struc->script));
@@ -2652,11 +2898,13 @@ _cfsml_write_class_t(FILE *fh, class_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_class_t(FILE *fh, class_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2688,17 +2936,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "script")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->script), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for script at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "reg")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->reg), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for reg at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("class_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2708,16 +2959,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_song_handle_t(FILE *fh, song_handle_t* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_song_handle_t(FILE *fh, song_handle_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -2731,16 +2985,19 @@ _cfsml_read_song_handle_t(FILE *fh, song_handle_t* save_struc, char *lastval, in
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_int(FILE *fh, int* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_int(FILE *fh, int* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -2754,11 +3011,13 @@ _cfsml_read_int(FILE *fh, int* save_struc, char *lastval, int *line, int *hiteof
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_menu_t(FILE *fh, menu_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "title = ");
_cfsml_write_string(fh, (char **) &(save_struc->title));
@@ -2773,6 +3032,7 @@ _cfsml_write_menu_t(FILE *fh, menu_t* save_struc)
min = max = save_struc->items_nr;
if (!save_struc->items)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_menu_item_t(fh, &(save_struc->items[i]));
@@ -2783,11 +3043,13 @@ _cfsml_write_menu_t(FILE *fh, menu_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_menu_t(FILE *fh, menu_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2819,28 +3081,33 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "title")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->title), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for title at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "title_width")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->title_width), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for title_width at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "width")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->width), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for width at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "items")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -2857,9 +3124,11 @@ int min, max, i;
}
else
save_struc->items = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -2876,6 +3145,7 @@ int min, max, i;
} while (!done);
save_struc->items_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("menu_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -2885,16 +3155,19 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_long(FILE *fh, long* save_struc)
{
fprintf(fh, "%li", (long) *save_struc);
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_long(FILE *fh, long* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
+#line 564 "savegame.cfsml"
*save_struc = strtol(lastval, &token, 0);
if ( (*save_struc == 0) && (token == lastval) ) {
@@ -2908,11 +3181,13 @@ _cfsml_read_long(FILE *fh, long* save_struc, char *lastval, int *line, int *hite
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_clone_table_t(FILE *fh, clone_table_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "entries_nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->entries_nr));
@@ -2930,6 +3205,7 @@ _cfsml_write_clone_table_t(FILE *fh, clone_table_t* save_struc)
min = max = save_struc->entries_nr;
if (!save_struc->table)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_clone_entry_t(fh, &(save_struc->table[i]));
@@ -2940,11 +3216,13 @@ _cfsml_write_clone_table_t(FILE *fh, clone_table_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_clone_table_t(FILE *fh, clone_table_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -2976,34 +3254,40 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "entries_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "first_free")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->first_free), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for first_free at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "entries_used")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->entries_used), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for entries_used at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_entry")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_entry), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_entry at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "table")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3020,9 +3304,11 @@ int min, max, i;
}
else
save_struc->table = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3039,6 +3325,7 @@ int min, max, i;
} while (!done);
save_struc->entries_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("clone_table_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3048,11 +3335,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_clone_t(FILE *fh, clone_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "flags = ");
_cfsml_write_int(fh, (int*) &(save_struc->flags));
@@ -3073,6 +3362,7 @@ _cfsml_write_clone_t(FILE *fh, clone_t* save_struc)
min = max = save_struc->variables_nr;
if (!save_struc->variables)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
write_reg_t(fh, &(save_struc->variables[i]));
@@ -3083,11 +3373,13 @@ _cfsml_write_clone_t(FILE *fh, clone_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_clone_t(FILE *fh, clone_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -3119,40 +3411,47 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "flags")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->flags), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for flags at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "pos")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->pos), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for pos at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variables_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variables_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variable_names_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->variable_names_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for variable_names_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "methods_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->methods_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for methods_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "variables")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3169,9 +3468,11 @@ int min, max, i;
}
else
save_struc->variables = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3188,6 +3489,7 @@ int min, max, i;
} while (!done);
save_struc->variables_nr = max ; /* Set array size accordingly */
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("clone_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3197,11 +3499,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_list_t(FILE *fh, list_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "first = ");
write_reg_t(fh, (reg_t*) &(save_struc->first));
@@ -3212,11 +3516,13 @@ _cfsml_write_list_t(FILE *fh, list_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_list_t(FILE *fh, list_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -3248,17 +3554,20 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "first")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->first), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for first at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "last")) {
+#line 749 "savegame.cfsml"
if (read_reg_t(fh, (reg_t*) &(save_struc->last), value, line, hiteof)) {
_cfsml_error("Token expected by read_reg_t() for last at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("list_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3268,11 +3577,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_sys_string_t(FILE *fh, sys_string_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "name = ");
_cfsml_write_string(fh, (char **) &(save_struc->name));
@@ -3286,11 +3597,13 @@ _cfsml_write_sys_string_t(FILE *fh, sys_string_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_sys_string_t(FILE *fh, sys_string_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -3322,23 +3635,27 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "name")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->name), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for name at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "max_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->max_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for max_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "value")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_string(fh, (char **) &(save_struc->value), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_string() for value at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("sys_string_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3348,11 +3665,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_script_t(FILE *fh, script_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "nr = ");
_cfsml_write_int(fh, (int*) &(save_struc->nr));
@@ -3388,6 +3707,7 @@ _cfsml_write_script_t(FILE *fh, script_t* save_struc)
min = max = save_struc->objects_allocated;
if (!save_struc->objects)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
_cfsml_write_object_t(fh, &(save_struc->objects[i]));
@@ -3407,11 +3727,13 @@ _cfsml_write_script_t(FILE *fh, script_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_script_t(FILE *fh, script_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -3443,70 +3765,82 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "buf_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->buf_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for buf_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "script_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->script_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for script_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "heap_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->heap_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for heap_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "obj_indices")) {
+#line 749 "savegame.cfsml"
if (read_int_hash_map_tp(fh, (int_hash_map_t **) &(save_struc->obj_indices), value, line, hiteof)) {
_cfsml_error("Token expected by read_int_hash_map_tp() for obj_indices at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "exports_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->exports_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for exports_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "synonyms_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->synonyms_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for synonyms_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "lockers")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->lockers), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for lockers at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects_allocated")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->objects_allocated), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for objects_allocated at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects_nr")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->objects_nr), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for objects_nr at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "objects")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3523,9 +3857,11 @@ int min, max, i;
}
else
save_struc->objects = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3543,23 +3879,27 @@ int min, max, i;
save_struc->objects_allocated = max ; /* Set array size accordingly */
} else
if (!strcmp(token, "locals_offset")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->locals_offset), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for locals_offset at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "locals_segment")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->locals_segment), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for locals_segment at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "marked_as_deleted")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->marked_as_deleted), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for marked_as_deleted at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("script_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3569,11 +3909,13 @@ int min, max, i;
return CFSML_SUCCESS;
}
+#line 444 "savegame.cfsml"
static void
_cfsml_write_seg_manager_t(FILE *fh, seg_manager_t* save_struc)
{
int min, max, i;
+#line 464 "savegame.cfsml"
fprintf(fh, "{\n");
fprintf(fh, "id_seg_map = ");
write_int_hash_map_tp(fh, (int_hash_map_t **) &(save_struc->id_seg_map));
@@ -3582,6 +3924,7 @@ _cfsml_write_seg_manager_t(FILE *fh, seg_manager_t* save_struc)
min = max = save_struc->heap_size;
if (!save_struc->heap)
min = max = 0; /* Don't write if it points to NULL */
+#line 490 "savegame.cfsml"
fprintf(fh, "[%d][\n", max);
for (i = 0; i < min; i++) {
write_mem_obj_tp(fh, &(save_struc->heap[i]));
@@ -3619,11 +3962,13 @@ _cfsml_write_seg_manager_t(FILE *fh, seg_manager_t* save_struc)
fprintf(fh, "}");
}
+#line 538 "savegame.cfsml"
static int
_cfsml_read_seg_manager_t(FILE *fh, seg_manager_t* save_struc, char *lastval, int *line, int *hiteof)
{
char *token;
int min, max, i;
+#line 599 "savegame.cfsml"
int assignment, closed, done;
if (strcmp(lastval, "{")) {
@@ -3655,16 +4000,19 @@ int min, max, i;
return CFSML_FAILURE;
}
if (!strcmp(token, "id_seg_map")) {
+#line 749 "savegame.cfsml"
if (read_int_hash_map_tp(fh, (int_hash_map_t **) &(save_struc->id_seg_map), value, line, hiteof)) {
_cfsml_error("Token expected by read_int_hash_map_tp() for id_seg_map at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "heap")) {
+#line 663 "savegame.cfsml"
if ((value[0] != '[') || (value[strlen(value) - 1] != '[')) {
_cfsml_error("Opening brackets expected at line %d\n", *line);
return CFSML_FAILURE;
}
+#line 673 "savegame.cfsml"
/* Prepare to restore dynamic array */
max = strtol(value + 1, NULL, 0);
if (max < 0) {
@@ -3681,9 +4029,11 @@ int min, max, i;
}
else
save_struc->heap = NULL;
+#line 699 "savegame.cfsml"
done = i = 0;
do {
if (!(value = _cfsml_get_identifier(fh, line, hiteof, NULL))) {
+#line 707 "savegame.cfsml"
_cfsml_error("Token expected at line %d\n", *line);
return 1;
}
@@ -3701,59 +4051,69 @@ int min, max, i;
save_struc->heap_size = max ; /* Set array size accordingly */
} else
if (!strcmp(token, "heap_size")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->heap_size), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for heap_size at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "reserved_id")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->reserved_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for reserved_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "exports_wide")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->exports_wide), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for exports_wide at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "sci1_1")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->sci1_1), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for sci1_1 at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "gc_mark_bits")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_int(fh, (int*) &(save_struc->gc_mark_bits), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_int() for gc_mark_bits at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "mem_allocated")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_size_t(fh, (size_t*) &(save_struc->mem_allocated), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_size_t() for mem_allocated at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "clones_seg_id")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->clones_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for clones_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "lists_seg_id")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->lists_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for lists_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
if (!strcmp(token, "nodes_seg_id")) {
+#line 749 "savegame.cfsml"
if (_cfsml_read_seg_id_t(fh, (seg_id_t*) &(save_struc->nodes_seg_id), value, line, hiteof)) {
_cfsml_error("Token expected by _cfsml_read_seg_id_t() for nodes_seg_id at line %d\n", *line);
return CFSML_FAILURE;
}
} else
+#line 758 "savegame.cfsml"
{
_cfsml_error("seg_manager_t: Assignment to invalid identifier '%s' in line %d\n", token, *line);
return CFSML_FAILURE;
@@ -3766,6 +4126,7 @@ int min, max, i;
/* Auto-generated CFSML declaration and function block ends here */
/* Auto-generation performed by cfsml.pl 0.8.2 */
+#line 402 "savegame.cfsml"
void
write_songlib_t(FILE *fh, songlib_t *songlib)
@@ -3780,10 +4141,12 @@ write_songlib_t(FILE *fh, songlib_t *songlib)
while (seeker)
{
seeker->restore_time = seeker->it->get_timepos(seeker->it);
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_song_t(fh, seeker);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 417 "savegame.cfsml"
seeker = seeker->next;
}
fprintf(fh, "]\n");
@@ -3807,12 +4170,18 @@ read_songlib_t(FILE *fh, songlib_t *songlib, char *lastval, int *line, int *hite
for (i = 0; i < songcount; i++)
{
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 839 "savegame.cfsml"
char *_cfsml_inp = lastval;
+#line 847 "savegame.cfsml"
_cfsml_error = read_song_tp(fh, &newsong, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -3823,6 +4192,7 @@ read_songlib_t(FILE *fh, songlib_t *songlib, char *lastval, int *line, int *hite
}
}
/* End of auto-generated CFSML data reader code */
+#line 440 "savegame.cfsml"
song_lib_add(*songlib, newsong);
}
fscanf(fh, "]\n");
@@ -3864,19 +4234,23 @@ static int bucket_length;
void
write_int_hash_map_tp(FILE *fh, int_hash_map_t **foo)
{
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_int_hash_map_t(fh, *foo);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 482 "savegame.cfsml"
}
void
write_song_tp(FILE *fh, song_t **foo)
{
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_song_t(fh, *foo);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 488 "savegame.cfsml"
}
song_iterator_t *
@@ -3890,12 +4264,18 @@ read_song_tp(FILE *fh, song_t **foo, char *lastval, int *line, int *hiteof)
*foo = (song_t*) malloc(sizeof(song_t));
token = _cfsml_get_identifier(fh, line, hiteof, &assignment);
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 839 "savegame.cfsml"
char *_cfsml_inp = token;
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_song_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -3906,6 +4286,7 @@ read_song_tp(FILE *fh, song_t **foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 501 "savegame.cfsml"
(*foo)->delay = 0;
(*foo)->it = NULL;
(*foo)->next_playing = (*foo)->next_stopping = (*foo)->next = NULL;
@@ -3916,12 +4297,18 @@ read_int_hash_map_tp(FILE *fh, int_hash_map_t **foo, char *lastval, int *line, i
{
*foo = (int_hash_map_t*)malloc(sizeof(int_hash_map_t));
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 839 "savegame.cfsml"
char *_cfsml_inp = lastval;
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_int_hash_map_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -3932,6 +4319,7 @@ read_int_hash_map_tp(FILE *fh, int_hash_map_t **foo, char *lastval, int *line, i
}
}
/* End of auto-generated CFSML data reader code */
+#line 511 "savegame.cfsml"
(*foo)->holes = NULL;
return 0;
}
@@ -3947,10 +4335,12 @@ write_int_hash_map_node_tp(FILE *fh, int_hash_map_node_t **foo)
fprintf(fh,"[\n%d=>%d\n", (*foo)->name, (*foo)->value);
if ((*foo)->next)
{
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
write_int_hash_map_node_tp(fh, &((*foo)->next));
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 527 "savegame.cfsml"
} else fputc('L', fh);
fputs("]", fh);
}
@@ -4004,10 +4394,12 @@ write_menubar_tp(FILE *fh, menubar_t **foo)
{
if (*foo) {
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_menubar_t(fh, (*foo));
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 581 "savegame.cfsml"
} else { /* Nothing to write */
fputs("\\null\\", fh);
@@ -4025,12 +4417,18 @@ read_menubar_tp(FILE *fh, menubar_t **foo, char *lastval, int *line, int *hiteof
*foo = (menubar_t *) sci_malloc(sizeof(menubar_t));
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 839 "savegame.cfsml"
char *_cfsml_inp = lastval;
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_menubar_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4041,6 +4439,7 @@ read_menubar_tp(FILE *fh, menubar_t **foo, char *lastval, int *line, int *hiteof
}
}
/* End of auto-generated CFSML data reader code */
+#line 598 "savegame.cfsml"
}
return *hiteof;
@@ -4050,61 +4449,79 @@ void
write_mem_obj_t(FILE *fh, mem_obj_t *foo)
{
fprintf(fh, "%s\n", mem_obj_string_names[foo->type].name);
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_int(fh, &foo->segmgr_id);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 608 "savegame.cfsml"
switch (foo->type)
{
case MEM_OBJ_SCRIPT:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_script_t(fh, &foo->data.script);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 612 "savegame.cfsml"
break;
case MEM_OBJ_CLONES:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_clone_table_t(fh, &foo->data.clones);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 615 "savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_local_variables_t(fh, &foo->data.locals);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 618 "savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_sys_strings_t(fh, &foo->data.sys_strings);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 621 "savegame.cfsml"
break;
case MEM_OBJ_STACK:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_int(fh, &foo->data.stack.nr);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 624 "savegame.cfsml"
break;
case MEM_OBJ_HUNK:
break;
case MEM_OBJ_LISTS:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_list_table_t(fh, &foo->data.lists);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 629 "savegame.cfsml"
break;
case MEM_OBJ_NODES:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_node_table_t(fh, &foo->data.nodes);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 632 "savegame.cfsml"
break;
case MEM_OBJ_DYNMEM:
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_dynmem_t(fh, &foo->data.dynmem);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 635 "savegame.cfsml"
break;
}
}
@@ -4121,13 +4538,19 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_int(fh, &foo->segmgr_id, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4138,17 +4561,24 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 651 "savegame.cfsml"
switch (foo->type)
{
case MEM_OBJ_SCRIPT:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_script_t(fh, &foo->data.script, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4159,16 +4589,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 655 "savegame.cfsml"
break;
case MEM_OBJ_CLONES:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_clone_table_t(fh, &foo->data.clones, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4179,16 +4616,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 658 "savegame.cfsml"
break;
case MEM_OBJ_LOCALS:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_local_variables_t(fh, &foo->data.locals, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4199,16 +4643,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 661 "savegame.cfsml"
break;
case MEM_OBJ_SYS_STRINGS:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_sys_strings_t(fh, &foo->data.sys_strings, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4219,16 +4670,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 664 "savegame.cfsml"
break;
case MEM_OBJ_LISTS:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_list_table_t(fh, &foo->data.lists, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4239,16 +4697,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 667 "savegame.cfsml"
break;
case MEM_OBJ_NODES:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_node_table_t(fh, &foo->data.nodes, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4259,16 +4724,23 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 670 "savegame.cfsml"
break;
case MEM_OBJ_STACK:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_int(fh, &foo->data.stack.nr, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4279,6 +4751,7 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 673 "savegame.cfsml"
foo->data.stack.entries = (reg_t *)sci_calloc(foo->data.stack.nr, sizeof(reg_t));
break;
case MEM_OBJ_HUNK:
@@ -4286,13 +4759,19 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
break;
case MEM_OBJ_DYNMEM:
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(*line), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_dynmem_t(fh, &foo->data.dynmem, _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4303,6 +4782,7 @@ read_mem_obj_t(FILE *fh, mem_obj_t *foo, char *lastval, int *line, int *hiteof)
}
}
/* End of auto-generated CFSML data reader code */
+#line 680 "savegame.cfsml"
break;
}
@@ -4314,10 +4794,12 @@ write_mem_obj_tp(FILE *fh, mem_obj_t **foo)
{
if (*foo) {
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
write_mem_obj_t(fh, (*foo));
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 692 "savegame.cfsml"
} else { /* Nothing to write */
fputs("\\null\\", fh);
@@ -4333,12 +4815,18 @@ read_mem_obj_tp(FILE *fh, mem_obj_t **foo, char *lastval, int *line, int *hiteof
} else {
*foo = (mem_obj_t *) sci_malloc(sizeof(mem_obj_t));
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 839 "savegame.cfsml"
char *_cfsml_inp = lastval;
+#line 847 "savegame.cfsml"
_cfsml_error = read_mem_obj_t(fh, (*foo), _cfsml_inp, &(*line), &_cfsml_eof);
+#line 852 "savegame.cfsml"
*hiteof = _cfsml_error;
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4349,6 +4837,7 @@ read_mem_obj_tp(FILE *fh, mem_obj_t **foo, char *lastval, int *line, int *hiteof
}
}
/* End of auto-generated CFSML data reader code */
+#line 707 "savegame.cfsml"
return *hiteof;
}
return 0;
@@ -4415,10 +4904,12 @@ gamestate_save(state_t *s, char *dirname)
s->game_time = time(NULL) - s->game_start_time.tv_sec;
SCI_MEMTEST;
+#line 877 "savegame.cfsml"
/* Auto-generated CFSML data writer code */
_cfsml_write_state_t(fh, s);
fprintf(fh, "\n");
/* End of auto-generated CFSML data writer code */
+#line 774 "savegame.cfsml"
SCI_MEMTEST;
fclose(fh);
@@ -4762,16 +5253,25 @@ gamestate_restore(state_t *s, char *dirname)
retval->sound_volume = s->sound_volume;
/* Auto-generated CFSML data reader code */
+#line 823 "savegame.cfsml"
{
+#line 826 "savegame.cfsml"
int _cfsml_line_ctr = 0;
+#line 831 "savegame.cfsml"
struct _cfsml_pointer_refstruct **_cfsml_myptrrefptr = _cfsml_get_current_refpointer();
+#line 834 "savegame.cfsml"
int _cfsml_eof = 0, _cfsml_error;
int dummy;
+#line 842 "savegame.cfsml"
char *_cfsml_inp = _cfsml_get_identifier(fh, &(_cfsml_line_ctr), &_cfsml_eof, &dummy);
+#line 847 "savegame.cfsml"
_cfsml_error = _cfsml_read_state_t(fh, retval, _cfsml_inp, &(_cfsml_line_ctr), &_cfsml_eof);
+#line 852 "savegame.cfsml"
read_eof = _cfsml_error;
+#line 856 "savegame.cfsml"
_cfsml_free_pointer_references(_cfsml_myptrrefptr, _cfsml_error);
+#line 859 "savegame.cfsml"
if (_cfsml_last_value_retreived) {
free(_cfsml_last_value_retreived);
_cfsml_last_value_retreived = NULL;
@@ -4782,6 +5282,7 @@ gamestate_restore(state_t *s, char *dirname)
}
}
/* End of auto-generated CFSML data reader code */
+#line 1117 "savegame.cfsml"
fclose(fh);
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index 57abbfb862..5b3abafb13 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -30,12 +30,12 @@
** savegame.cfsml. If this doesn't solve your problem, contact the maintainer.
*/
-#include <sci_memory.h>
-#include <gfx_operations.h>
-#include <sfx_engine.h>
-#include <engine.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_operations.h"
+#include "sci/include/sfx_engine.h"
+#include "sci/include/engine.h"
#include <assert.h>
-#include "heap.h"
+#include "sci/engine/heap.h"
#ifdef _MSC_VER
#include <direct.h>
diff --git a/engines/sci/engine/scriptdebug.c b/engines/sci/engine/scriptdebug.c
index 1a4b53e342..a3e31e3b7c 100644
--- a/engines/sci/engine/scriptdebug.c
+++ b/engines/sci/engine/scriptdebug.c
@@ -25,16 +25,16 @@
***************************************************************************/
/* Script debugger functionality. Absolutely not threadsafe. */
-#include "gc.h"
-#include <sciresource.h>
-#include <engine.h>
-#include <console.h>
-#include <kdebug.h>
-#include <vocabulary.h>
-#include "kernel_types.h"
-#include <sci_midi.h>
-#include <sci_widgets.h>
-#include <reg_t_hashmap.h>
+#include "sci/engine/gc.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/console.h"
+#include "sci/include/kdebug.h"
+#include "sci/include/vocabulary.h"
+#include "sci/engine/kernel_types.h"
+#include "sci/include/sci_midi.h"
+#include "sci/include/sci_widgets.h"
+#include "sci/include/reg_t_hashmap.h"
#ifdef _WIN32
# include <win32/sci_win32.h>
diff --git a/engines/sci/engine/seg_manager.c b/engines/sci/engine/seg_manager.c
index 8bc6187a22..c20461e682 100644
--- a/engines/sci/engine/seg_manager.c
+++ b/engines/sci/engine/seg_manager.c
@@ -25,10 +25,10 @@
***************************************************************************/
-#include <seg_manager.h>
-#include <sciresource.h>
-#include <versions.h>
-#include <engine.h>
+#include "sci/include/seg_manager.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/versions.h"
+#include "sci/include/engine.h"
/*#define GC_DEBUG*/ /* Debug garbage collection */
diff --git a/engines/sci/engine/sys_strings.c b/engines/sci/engine/sys_strings.c
index 945d79343c..5aeb1a64c0 100644
--- a/engines/sci/engine/sys_strings.c
+++ b/engines/sci/engine/sys_strings.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <sys_strings.h>
+#include "sci/include/sys_strings.h"
#include <stdio.h>
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
void
sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_len)
diff --git a/engines/sci/engine/vm.c b/engines/sci/engine/vm.c
index d628e80e7a..d2831fbd69 100644
--- a/engines/sci/engine/vm.c
+++ b/engines/sci/engine/vm.c
@@ -25,14 +25,14 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
-#include <versions.h>
-#include <kdebug.h>
-#include "kernel_types.h"
-#include <seg_manager.h>
-#include "gc.h"
-#include <sfx_player.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/versions.h"
+#include "sci/include/kdebug.h"
+#include "sci/engine/kernel_types.h"
+#include "sci/include/seg_manager.h"
+#include "sci/engine/gc.h"
+#include "sci/include/sfx_player.h"
#ifdef HAVE_SETJMP_H
#include <setjmp.h>
diff --git a/engines/sci/gfx/antialias.c b/engines/sci/gfx/antialias.c
index ad264d18bd..47e70f09e0 100644
--- a/engines/sci/gfx/antialias.c
+++ b/engines/sci/gfx/antialias.c
@@ -27,8 +27,8 @@
/** Antialiasing code **/
-#include <gfx_system.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_tools.h"
static void
antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t *mode)
diff --git a/engines/sci/gfx/drivers/scummvm_driver.cpp b/engines/sci/gfx/drivers/scummvm_driver.cpp
index dc38cb58e4..a528673f6b 100644
--- a/engines/sci/gfx/drivers/scummvm_driver.cpp
+++ b/engines/sci/gfx/drivers/scummvm_driver.cpp
@@ -1,9 +1,9 @@
-#include <common/scummsys.h>
-#include <common/system.h>
-#include <common/events.h>
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/events.h"
-#include "gfx_driver.h"
-#include "gfx_tools.h"
+#include "sci/include/gfx_driver.h"
+#include "sci/include/gfx_tools.h"
struct _scummvm_driver_state {
gfx_pixmap_t *priority[2];
@@ -500,6 +500,9 @@ scummvm_get_event(struct _gfx_driver *drv)
case Common::EVENT_QUIT:
input.type = SCI_EVT_QUIT;
break;
+
+ default:
+ break;
}
}
diff --git a/engines/sci/gfx/font-5x8.c b/engines/sci/gfx/font-5x8.c
index 9fe2e587e7..5234570adc 100644
--- a/engines/sci/gfx/font-5x8.c
+++ b/engines/sci/gfx/font-5x8.c
@@ -1,6 +1,6 @@
/* Auto-generated by bdftofont.c */
-#include <gfx_system.h>
+#include "sci/include/gfx_system.h"
static int gfxfont_5x8_widths[] = {
5, /* 0x00 */
diff --git a/engines/sci/gfx/font-6x10.c b/engines/sci/gfx/font-6x10.c
index 11919c00bd..6fbf661cbe 100644
--- a/engines/sci/gfx/font-6x10.c
+++ b/engines/sci/gfx/font-6x10.c
@@ -1,6 +1,6 @@
/* Auto-generated by bdftofont.c */
-#include <gfx_system.h>
+#include "sci/include/gfx_system.h"
static int gfxfont_6x10_widths[] = {
6, /* 0x00 */
diff --git a/engines/sci/gfx/font.c b/engines/sci/gfx/font.c
index c5de8715b8..c047b78f2e 100644
--- a/engines/sci/gfx/font.c
+++ b/engines/sci/gfx/font.c
@@ -26,9 +26,9 @@
***************************************************************************/
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
int font_counter = 0;
diff --git a/engines/sci/gfx/gfx_pixmap_scale.c b/engines/sci/gfx/gfx_pixmap_scale.c
index c288553eb1..0edd0365c8 100644
--- a/engines/sci/gfx/gfx_pixmap_scale.c
+++ b/engines/sci/gfx/gfx_pixmap_scale.c
@@ -18,7 +18,7 @@
# endif
#endif
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
#define EXTEND_COLOR(x) (unsigned) ((((unsigned) x) << 24) | (((unsigned) x) << 16) | (((unsigned) x) << 8) | ((unsigned) x))
#define PALETTE_MODE mode->palette
diff --git a/engines/sci/gfx/gfx_res_options.c b/engines/sci/gfx/gfx_res_options.c
index cec2c1f26a..0692fece0f 100644
--- a/engines/sci/gfx/gfx_res_options.c
+++ b/engines/sci/gfx/gfx_res_options.c
@@ -27,9 +27,9 @@
***************************************************************************/
-#include <gfx_system.h>
-#include <gfx_options.h>
-#include <gfx_resmgr.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_options.h"
+#include "sci/include/gfx_resmgr.h"
#include <ctype.h>
diff --git a/engines/sci/gfx/gfx_resource.c b/engines/sci/gfx/gfx_resource.c
index 6ac7567d76..3c1bf50326 100644
--- a/engines/sci/gfx/gfx_resource.c
+++ b/engines/sci/gfx/gfx_resource.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */
/* xfact */ 1, /* yfact */ 1,
diff --git a/engines/sci/gfx/gfx_support.c b/engines/sci/gfx/gfx_support.c
index 8edf9b3dff..8a1e86e19f 100644
--- a/engines/sci/gfx/gfx_support.c
+++ b/engines/sci/gfx/gfx_support.c
@@ -28,8 +28,8 @@
** for use with the graphical state manager
*/
-#include <gfx_system.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_tools.h"
#ifdef HAVE_ALPHA_EV6_SUPPORT
int axp_have_mvi = 0;
diff --git a/engines/sci/gfx/gfx_tools.c b/engines/sci/gfx/gfx_tools.c
index b82627c896..b768475f3f 100644
--- a/engines/sci/gfx/gfx_tools.c
+++ b/engines/sci/gfx/gfx_tools.c
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <sci_memory.h>
-#include <gfx_tools.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_tools.h"
/* set optimisations for Win32: */
#ifdef _WIN32
diff --git a/engines/sci/gfx/menubar.c b/engines/sci/gfx/menubar.c
index ff4cb4a11e..38feace8ca 100644
--- a/engines/sci/gfx/menubar.c
+++ b/engines/sci/gfx/menubar.c
@@ -29,9 +29,9 @@
** used for any actual actions on behalf of the interpreter.
*/
-#include <sci_memory.h>
-#include <engine.h>
-#include <menubar.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/engine.h"
+#include "sci/include/menubar.h"
#define SIZE_INF 32767
diff --git a/engines/sci/gfx/operations.c b/engines/sci/gfx/operations.c
index a19e0bc99f..110f52a52c 100644
--- a/engines/sci/gfx/operations.c
+++ b/engines/sci/gfx/operations.c
@@ -25,8 +25,8 @@
***************************************************************************/
/* Graphical operations, called from the widget state manager */
-#include <sci_memory.h>
-#include <gfx_operations.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_operations.h"
#include <ctype.h>
diff --git a/engines/sci/gfx/resmgr.c b/engines/sci/gfx/resmgr.c
index 2a525f675f..d7893738ba 100644
--- a/engines/sci/gfx/resmgr.c
+++ b/engines/sci/gfx/resmgr.c
@@ -27,11 +27,11 @@
/* Resource manager core part */
-#include <gfx_resource.h>
-#include <gfx_tools.h>
-#include <gfx_driver.h>
-#include <gfx_resmgr.h>
-#include <gfx_state_internal.h>
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
+#include "sci/include/gfx_driver.h"
+#include "sci/include/gfx_resmgr.h"
+#include "sci/include/gfx_state_internal.h"
#undef TIME_PICDRAWING
diff --git a/engines/sci/gfx/resource/sci_cursor_0.c b/engines/sci/gfx/resource/sci_cursor_0.c
index 18960516c3..06a8d2b7aa 100644
--- a/engines/sci/gfx/resource/sci_cursor_0.c
+++ b/engines/sci/gfx/resource/sci_cursor_0.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
#define CURSOR_RESOURCE_SIZE 68
diff --git a/engines/sci/gfx/resource/sci_font.c b/engines/sci/gfx/resource/sci_font.c
index 5bdb3be1a1..f1ae4edb19 100644
--- a/engines/sci/gfx/resource/sci_font.c
+++ b/engines/sci/gfx/resource/sci_font.c
@@ -25,10 +25,10 @@
***************************************************************************/
-#include <sci_memory.h>
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
extern int font_counter;
diff --git a/engines/sci/gfx/resource/sci_pal_1.c b/engines/sci/gfx/resource/sci_pal_1.c
index 72adb7b02a..2a127f4bb3 100644
--- a/engines/sci/gfx/resource/sci_pal_1.c
+++ b/engines/sci/gfx/resource/sci_pal_1.c
@@ -26,9 +26,9 @@
***************************************************************************/
/* SCI1 palette resource defrobnicator */
-#include <sci_memory.h>
-#include <gfx_system.h>
-#include <gfx_resource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
#define MAX_COLORS 256
#define PALETTE_START 260
diff --git a/engines/sci/gfx/resource/sci_pic_0.c b/engines/sci/gfx/resource/sci_pic_0.c
index 63130b53f4..a55265c7ef 100644
--- a/engines/sci/gfx/resource/sci_pic_0.c
+++ b/engines/sci/gfx/resource/sci_pic_0.c
@@ -24,12 +24,12 @@
***************************************************************************/
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
#include <assert.h>
#include <math.h>
#include <time.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
#undef GFXR_DEBUG_PIC0 /* Enable to debug pic0 messages */
#undef FILL_RECURSIVE_DEBUG /* Enable for verbose fill debugging */
diff --git a/engines/sci/gfx/resource/sci_resmgr.c b/engines/sci/gfx/resource/sci_resmgr.c
index 6475369230..fce577f8c5 100644
--- a/engines/sci/gfx/resource/sci_resmgr.c
+++ b/engines/sci/gfx/resource/sci_resmgr.c
@@ -25,11 +25,11 @@
***************************************************************************/
/* The interpreter-specific part of the resource manager, for SCI */
-#include <sci_memory.h>
-#include <sciresource.h>
-#include <gfx_widgets.h>
-#include <gfx_resmgr.h>
-#include <gfx_options.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/gfx_widgets.h"
+#include "sci/include/gfx_resmgr.h"
+#include "sci/include/gfx_options.h"
int
gfxr_interpreter_options_hash(gfx_resource_type_t type, int version,
diff --git a/engines/sci/gfx/resource/sci_view_0.c b/engines/sci/gfx/resource/sci_view_0.c
index 98b3654b3c..0101cac5f7 100644
--- a/engines/sci/gfx/resource/sci_view_0.c
+++ b/engines/sci/gfx/resource/sci_view_0.c
@@ -31,10 +31,10 @@
//# pragma intrinsic( memcpy, memset )
#endif
-#include <sci_memory.h>
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
gfx_pixmap_t *
diff --git a/engines/sci/gfx/resource/sci_view_1.c b/engines/sci/gfx/resource/sci_view_1.c
index 1387696416..d747545331 100644
--- a/engines/sci/gfx/resource/sci_view_1.c
+++ b/engines/sci/gfx/resource/sci_view_1.c
@@ -26,10 +26,10 @@
***************************************************************************/
/* SCI 1 view resource defrobnicator */
-#include <sci_memory.h>
-#include <gfx_system.h>
-#include <gfx_resource.h>
-#include <gfx_tools.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
#define V1_LOOPS_NR_OFFSET 0
#define V1_MIRROR_MASK 2
diff --git a/engines/sci/gfx/sbtree.c b/engines/sci/gfx/sbtree.c
index b5e2c6b068..48054d4620 100644
--- a/engines/sci/gfx/sbtree.c
+++ b/engines/sci/gfx/sbtree.c
@@ -27,8 +27,8 @@
/* Static binary lookup tree lookup */
-#include <sci_memory.h>
-#include <sbtree.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sbtree.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/engines/sci/gfx/sci_widgets.c b/engines/sci/gfx/sci_widgets.c
index fe4cfda1a3..0df88236d1 100644
--- a/engines/sci/gfx/sci_widgets.c
+++ b/engines/sci/gfx/sci_widgets.c
@@ -25,11 +25,11 @@
***************************************************************************/
-#include <gfx_operations.h>
-#include <gfx_widgets.h>
-#include <engine.h>
-#include <menubar.h>
-#include <sci_widgets.h>
+#include "sci/include/gfx_operations.h"
+#include "sci/include/gfx_widgets.h"
+#include "sci/include/engine.h"
+#include "sci/include/menubar.h"
+#include "sci/include/sci_widgets.h"
#define SCI_SPECIAL_CHAR_ARROW_UP 0x18
#define SCI_SPECIAL_CHAR_ARROW_DOWN 0x19
diff --git a/engines/sci/gfx/widgets.c b/engines/sci/gfx/widgets.c
index f81a717f21..7516512c29 100644
--- a/engines/sci/gfx/widgets.c
+++ b/engines/sci/gfx/widgets.c
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <sci_memory.h>
-#include <gfx_widgets.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/gfx_widgets.h"
#undef GFXW_DEBUG_DIRTY /* Enable to debug dirty rectangle propagation (writes to stderr) */
diff --git a/engines/sci/include/conf_parse.h b/engines/sci/include/conf_parse.h
index d5ffd5b9da..b4aec93ec2 100644
--- a/engines/sci/include/conf_parse.h
+++ b/engines/sci/include/conf_parse.h
@@ -29,7 +29,7 @@
#ifndef CONF_PARSE_H_
#define CONF_PARSE_H_
-#include <conf_extension.h>
+#include "sci/include/conf_extension.h"
#define CONF_PARSE_TYPE_WHITESPACE 1 /* Whitespace, comments */
#define CONF_PARSE_TYPE_SUBSECTION 2 /* Subsection division */
diff --git a/engines/sci/include/console.h b/engines/sci/include/console.h
index fafa276298..9051b6bcd9 100644
--- a/engines/sci/include/console.h
+++ b/engines/sci/include/console.h
@@ -33,9 +33,9 @@
#ifndef _SCI_CONSOLE_H_
#define _SCI_CONSOLE_H_
-#include <sci_memory.h>
-#include <resource.h>
-#include <vm_types.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/resource.h"
+#include "sci/include/vm_types.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -46,7 +46,7 @@
#endif
#define SCI_CONSOLE
-#include <gfx_operations.h>
+#include "sci/include/gfx_operations.h"
extern DLLEXTERN int con_passthrough;
diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h
index 08a26fe98b..871ffca3e9 100644
--- a/engines/sci/include/engine.h
+++ b/engines/sci/include/engine.h
@@ -30,18 +30,18 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <resource.h>
-#include <sciresource.h>
-#include <script.h>
-#include <vocabulary.h>
-#include <console.h>
-#include <vm.h>
-#include <menubar.h>
+#include "sci/include/resource.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/script.h"
+#include "sci/include/vocabulary.h"
+#include "sci/include/console.h"
+#include "sci/include/vm.h"
+#include "sci/include/menubar.h"
#include <time.h>
-#include <versions.h>
-#include <kernel.h>
-#include <gfx_state_internal.h>
-#include <sfx_engine.h>
+#include "sci/include/versions.h"
+#include "sci/include/kernel.h"
+#include "sci/include/gfx_state_internal.h"
+#include "sci/include/sfx_engine.h"
#define FREESCI_CURRENT_SAVEGAME_VERSION 7
#define FREESCI_MINIMUM_SAVEGAME_VERSION 7
diff --git a/engines/sci/include/event.h b/engines/sci/include/event.h
index aea54b1af2..8346ce7dee 100644
--- a/engines/sci/include/event.h
+++ b/engines/sci/include/event.h
@@ -1,7 +1,7 @@
#ifndef EVENT_H
#define EVENT_H
-#include <uinput.h>
+#include "sci/include/uinput.h"
struct _state;
diff --git a/engines/sci/include/gfx_driver.h b/engines/sci/include/gfx_driver.h
index 9903208988..fe66453932 100644
--- a/engines/sci/include/gfx_driver.h
+++ b/engines/sci/include/gfx_driver.h
@@ -27,8 +27,8 @@
#ifndef _SCI_GFX_DRIVER_H_
#define _SCI_GFX_DRIVER_H_
-#include <gfx_system.h>
-#include <uinput.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/uinput.h"
typedef enum {
diff --git a/engines/sci/include/gfx_operations.h b/engines/sci/include/gfx_operations.h
index 6e94523da8..c1dbe350b1 100644
--- a/engines/sci/include/gfx_operations.h
+++ b/engines/sci/include/gfx_operations.h
@@ -28,11 +28,11 @@
#ifndef _GFX_OPERATIONS_H_
#define _GFX_OPERATIONS_H_
-#include <gfx_resmgr.h>
-#include <gfx_tools.h>
-#include <gfx_options.h>
-#include <gfx_system.h>
-#include <uinput.h>
+#include "sci/include/gfx_resmgr.h"
+#include "sci/include/gfx_tools.h"
+#include "sci/include/gfx_options.h"
+#include "sci/include/gfx_system.h"
+#include "sci/include/uinput.h"
#define GFXOP_NO_POINTER -1
diff --git a/engines/sci/include/gfx_options.h b/engines/sci/include/gfx_options.h
index 51b31f794c..f131b4ac63 100644
--- a/engines/sci/include/gfx_options.h
+++ b/engines/sci/include/gfx_options.h
@@ -29,9 +29,9 @@
#ifndef _GFX_OPTIONS_H_
#define _GFX_OPTIONS_H_
-#include <gfx_resource.h>
-#include <gfx_tools.h>
-#include <gfx_res_options.h>
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_tools.h"
+#include "sci/include/gfx_res_options.h"
/* Dirty rectangle heuristics: */
diff --git a/engines/sci/include/gfx_res_options.h b/engines/sci/include/gfx_res_options.h
index 54138a8813..8e3149368f 100644
--- a/engines/sci/include/gfx_res_options.h
+++ b/engines/sci/include/gfx_res_options.h
@@ -32,8 +32,8 @@
#ifndef _GFX_RES_OPTIONS_H_
#define _GFX_RES_OPTIONS_H_
-#include <gfx_resource.h>
-#include <gfx_resmgr.h>
+#include "sci/include/gfx_resource.h"
+#include "sci/include/gfx_resmgr.h"
#define GFX_RES_PATTERN_MIN 0
#define GFX_RES_PATTERN_MAX 65535
diff --git a/engines/sci/include/gfx_resmgr.h b/engines/sci/include/gfx_resmgr.h
index f6a476b76f..400d2ede70 100644
--- a/engines/sci/include/gfx_resmgr.h
+++ b/engines/sci/include/gfx_resmgr.h
@@ -28,8 +28,8 @@
#ifndef _GFX_RESMGR_H_
#define _GFX_RESMGR_H_
-#include <gfx_resource.h>
-#include <sbtree.h>
+#include "sci/include/gfx_resource.h"
+#include "sci/include/sbtree.h"
typedef enum {
GFX_RESOURCE_TYPE_VIEW = 0,
diff --git a/engines/sci/include/gfx_resource.h b/engines/sci/include/gfx_resource.h
index 34160c5d5d..8632710556 100644
--- a/engines/sci/include/gfx_resource.h
+++ b/engines/sci/include/gfx_resource.h
@@ -30,8 +30,8 @@
#ifndef _GFX_RESOURCE_H_
#define _GFX_RESOURCE_H_
-#include <gfx_system.h>
-#include <gfx_driver.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_driver.h"
/*** Styles for pic0 drawing ***/
/* Dithering modes */
diff --git a/engines/sci/include/gfx_state_internal.h b/engines/sci/include/gfx_state_internal.h
index dc12e3c8b9..059bb08653 100644
--- a/engines/sci/include/gfx_state_internal.h
+++ b/engines/sci/include/gfx_state_internal.h
@@ -28,11 +28,11 @@
#ifndef _GFX_STATE_INTERNAL_H_
#define _GFX_STATE_INTERNAL_H_
-#include <gfx_tools.h>
-#include <gfx_options.h>
-#include <gfx_operations.h>
-#include <gfx_resmgr.h>
-#include <gfx_system.h>
+#include "sci/include/gfx_tools.h"
+#include "sci/include/gfx_options.h"
+#include "sci/include/gfx_operations.h"
+#include "sci/include/gfx_resmgr.h"
+#include "sci/include/gfx_system.h"
#define GFXW_FLAG_VISIBLE (1<<0)
diff --git a/engines/sci/include/gfx_system.h b/engines/sci/include/gfx_system.h
index e83f39fb8e..4943a2aff1 100644
--- a/engines/sci/include/gfx_system.h
+++ b/engines/sci/include/gfx_system.h
@@ -28,8 +28,8 @@
#ifndef _SCI_GFX_SYSTEM_
#define _SCI_GFX_SYSTEM_
-#include <sci_memory.h>
-#include <resource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/resource.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/engines/sci/include/gfx_tools.h b/engines/sci/include/gfx_tools.h
index 65fc5cba72..45005302a7 100644
--- a/engines/sci/include/gfx_tools.h
+++ b/engines/sci/include/gfx_tools.h
@@ -29,8 +29,8 @@
#ifndef _GFX_TOOLS_H_
#define _GFX_TOOLS_H_
-#include <gfx_system.h>
-#include <gfx_driver.h>
+#include "sci/include/gfx_system.h"
+#include "sci/include/gfx_driver.h"
typedef enum {
GFX_XLATE_FILTER_NONE,
diff --git a/engines/sci/include/gfx_widgets.h b/engines/sci/include/gfx_widgets.h
index 9ea9352971..37d5557c7a 100644
--- a/engines/sci/include/gfx_widgets.h
+++ b/engines/sci/include/gfx_widgets.h
@@ -29,7 +29,7 @@
#ifndef _GFX_WIDGETS_H_
#define _GFX_WIDGETS_H_
-#include <gfx_state_internal.h>
+#include "sci/include/gfx_state_internal.h"
/* Enable the next line to keep a list of pointers to all widgets, with up to the specified amount
** of members (/SLOW/) */
diff --git a/engines/sci/include/heapmgr.h b/engines/sci/include/heapmgr.h
index 77583e1f39..6a27e79476 100644
--- a/engines/sci/include/heapmgr.h
+++ b/engines/sci/include/heapmgr.h
@@ -29,8 +29,8 @@
#ifndef _FREESCI_HEAPMGR_H_
#define _FREESCI_HEAPMGR_H_
-#include <resource.h>
-#include <sci_memory.h>
+#include "sci/include/resource.h"
+#include "sci/include/sci_memory.h"
#define HEAPENTRY_INVALID -1
diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h
index 3b675dac65..639db44d65 100644
--- a/engines/sci/include/kernel.h
+++ b/engines/sci/include/kernel.h
@@ -29,10 +29,10 @@
#include <math.h>
#include <ctype.h>
-#include <kdebug.h>
-#include <uinput.h>
-#include <event.h>
-#include <console.h> /* sciprintf() */
+#include "sci/include/kdebug.h"
+#include "sci/include/uinput.h"
+#include "sci/include/event.h"
+#include "sci/include/console.h" /* sciprintf() */
#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
diff --git a/engines/sci/include/menubar.h b/engines/sci/include/menubar.h
index b66b43230a..a2d3c71f7b 100644
--- a/engines/sci/include/menubar.h
+++ b/engines/sci/include/menubar.h
@@ -29,8 +29,8 @@
#ifndef _SCI_MENUBAR_H_
#define _SCI_MENUBAR_H_
-#include <gfx_operations.h>
-#include <gfx_widgets.h>
+#include "sci/include/gfx_operations.h"
+#include "sci/include/gfx_widgets.h"
struct _state;
diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h
index cbb333f574..aa3e31a671 100644
--- a/engines/sci/include/resource.h
+++ b/engines/sci/include/resource.h
@@ -99,7 +99,7 @@
# include <dmalloc.h>
#endif
-#include <scitypes.h>
+#include "sci/include/scitypes.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h
index 41e5aa35ac..9ef7fa41cb 100644
--- a/engines/sci/include/sci_memory.h
+++ b/engines/sci/include/sci_memory.h
@@ -70,7 +70,7 @@
#include <stdio.h>
#include <assert.h>
-#include <resource.h>
+#include "sci/include/resource.h"
#ifdef _WIN32
# undef scim_inline /* just to be sure it is not defined */
diff --git a/engines/sci/include/sci_widgets.h b/engines/sci/include/sci_widgets.h
index f961021622..edd7552fca 100644
--- a/engines/sci/include/sci_widgets.h
+++ b/engines/sci/include/sci_widgets.h
@@ -29,7 +29,7 @@
#ifndef _SCI_WIDGETS_H_
#define _SCI_WIDGETS_H_
-#include <engine.h>
+#include "sci/include/engine.h"
/* The following flags are applicable to windows in SCI0: */
#define WINDOW_FLAG_TRANSPARENT 0x01
diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h
index e9ac7cf5d4..c1eb9bd29b 100644
--- a/engines/sci/include/sciresource.h
+++ b/engines/sci/include/sciresource.h
@@ -35,8 +35,8 @@
/*#define _SCI_RESOURCE_DEBUG */
/*#define _SCI_DECOMPRESS_DEBUG*/
-#include <resource.h>
-#include <versions.h>
+#include "sci/include/resource.h"
+#include "sci/include/versions.h"
#define SCI_MAX_RESOURCE_SIZE 0x0400000
/* The maximum allowed size for a compressed or decompressed resource */
diff --git a/engines/sci/include/script.h b/engines/sci/include/script.h
index f979bd2a1e..4c7892ebae 100644
--- a/engines/sci/include/script.h
+++ b/engines/sci/include/script.h
@@ -20,7 +20,7 @@
#ifndef SCRIPT_H
#define SCRIPT_H
-#include <sciresource.h>
+#include "sci/include/sciresource.h"
/*#define SCRIPT_DEBUG */
diff --git a/engines/sci/include/seg_manager.h b/engines/sci/include/seg_manager.h
index 600792568e..b09632f087 100644
--- a/engines/sci/include/seg_manager.h
+++ b/engines/sci/include/seg_manager.h
@@ -29,9 +29,9 @@
#ifndef _SCI_SEG_MANAGER_H
#define _SCI_SEG_MANAGER_H
-#include <int_hashmap.h>
-#include <sys_strings.h>
-#include <vm.h>
+#include "sci/include/int_hashmap.h"
+#include "sci/include/sys_strings.h"
+#include "sci/include/vm.h"
#define DEFAULT_SCRIPTS 32
#define DEFAULT_OBJECTS 8 /* default # of objects per script */
diff --git a/engines/sci/include/sfx_engine.h b/engines/sci/include/sfx_engine.h
index 950f1e3dc8..dca2cc94df 100644
--- a/engines/sci/include/sfx_engine.h
+++ b/engines/sci/include/sfx_engine.h
@@ -28,10 +28,10 @@
#ifndef _SFX_ENGINE_H_
#define _SFX_ENGINE_H_
-#include <sfx_core.h>
-#include <sfx_songlib.h>
-#include <sfx_iterator.h>
-#include <sciresource.h>
+#include "sci/include/sfx_core.h"
+#include "sci/include/sfx_songlib.h"
+#include "sci/include/sfx_iterator.h"
+#include "sci/include/sciresource.h"
#define SOUND_TICK 1000000 / 60
/* Approximately 16666 microseconds */
diff --git a/engines/sci/include/sfx_iterator.h b/engines/sci/include/sfx_iterator.h
index de357b053d..157fb66cd8 100644
--- a/engines/sci/include/sfx_iterator.h
+++ b/engines/sci/include/sfx_iterator.h
@@ -28,8 +28,8 @@
#ifndef _SCI_SFX_ITERATOR_H_
#define _SCI_SFX_ITERATOR_H_
-#include <sfx_pcm.h>
-#include <listener.h>
+#include "sci/include/sfx_pcm.h"
+#include "sci/include/listener.h"
#define SI_FINISHED -1 /* Song finished playing */
#define SI_LOOP -2 /* Song just looped */
diff --git a/engines/sci/include/sfx_iterator_internal.h b/engines/sci/include/sfx_iterator_internal.h
index 02b32502ac..51a76889af 100644
--- a/engines/sci/include/sfx_iterator_internal.h
+++ b/engines/sci/include/sfx_iterator_internal.h
@@ -28,8 +28,8 @@
#ifndef _SFX_ITERATOR_INTERNAL_
#define _SFX_ITERATOR_INTERNAL_
-#include <sfx_iterator.h>
-#include <sci_midi.h>
+#include "sci/include/sfx_iterator.h"
+#include "sci/include/sci_midi.h"
/* States */
diff --git a/engines/sci/include/sfx_pcm.h b/engines/sci/include/sfx_pcm.h
index b3a44868a9..87da11bbbe 100644
--- a/engines/sci/include/sfx_pcm.h
+++ b/engines/sci/include/sfx_pcm.h
@@ -28,10 +28,10 @@
#ifndef _SFX_PCM_H_
#define _SFX_PCM_H_
-#include <sfx_core.h>
-#include <sfx_timer.h>
-#include <sfx_time.h>
-#include <scitypes.h>
+#include "sci/include/sfx_core.h"
+#include "sci/include/sfx_timer.h"
+#include "sci/include/sfx_time.h"
+#include "sci/include/scitypes.h"
/* A number of standard options most devices will support */
#define SFX_PCM_OPTION_RATE "rate" /* Sampling rate: Number of samples per second */
diff --git a/engines/sci/include/sfx_player.h b/engines/sci/include/sfx_player.h
index 3198ff7c49..855440f968 100644
--- a/engines/sci/include/sfx_player.h
+++ b/engines/sci/include/sfx_player.h
@@ -26,9 +26,9 @@
***************************************************************************/
/* song player structure */
-#include <sfx_engine.h>
-#include <sfx_iterator.h>
-#include <sciresource.h>
+#include "sci/include/sfx_engine.h"
+#include "sci/include/sfx_iterator.h"
+#include "sci/include/sciresource.h"
#ifndef _SFX_PLAYER_H
#define _SFX_PLAYER_H
diff --git a/engines/sci/include/sfx_songlib.h b/engines/sci/include/sfx_songlib.h
index 7aa6ea4fd5..56c9d647d7 100644
--- a/engines/sci/include/sfx_songlib.h
+++ b/engines/sci/include/sfx_songlib.h
@@ -31,8 +31,8 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#include <scitypes.h>
-#include <sfx_iterator.h>
+#include "sci/include/scitypes.h"
+#include "sci/include/sfx_iterator.h"
#define SOUND_STATUS_STOPPED 0
#define SOUND_STATUS_PLAYING 1
diff --git a/engines/sci/include/sfx_timer.h b/engines/sci/include/sfx_timer.h
index d747edc3ac..e3402a24cd 100644
--- a/engines/sci/include/sfx_timer.h
+++ b/engines/sci/include/sfx_timer.h
@@ -28,7 +28,7 @@
#ifndef _FREESCI_SFX_TIMER_H_
#define _FREESCI_SFX_TIMER_H_
-#include <sfx_core.h>
+#include "sci/include/sfx_core.h"
typedef struct {
const char *name;
diff --git a/engines/sci/include/versions.h b/engines/sci/include/versions.h
index ed184d29c0..5cf4c3c00d 100644
--- a/engines/sci/include/versions.h
+++ b/engines/sci/include/versions.h
@@ -31,7 +31,7 @@
#ifndef _SCI_VERSIONS_H_
#define _SCI_VERSIONS_H_
-#include <scitypes.h>
+#include "sci/include/scitypes.h"
struct _state;
diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h
index 567df073f5..1a8a799852 100644
--- a/engines/sci/include/vm.h
+++ b/engines/sci/include/vm.h
@@ -28,13 +28,13 @@
/* VM and kernel declarations */
-#include <script.h>
-#include <vocabulary.h>
-#include <versions.h>
-#include <seg_manager.h>
-#include <vm_types.h>
-#include <sys_strings.h>
-#include <heapmgr.h>
+#include "sci/include/script.h"
+#include "sci/include/vocabulary.h"
+#include "sci/include/versions.h"
+#include "sci/include/seg_manager.h"
+#include "sci/include/vm_types.h"
+#include "sci/include/sys_strings.h"
+#include "sci/include/heapmgr.h"
#ifndef _SCI_VM_H
#define _SCI_VM_H
diff --git a/engines/sci/include/vm_types.h b/engines/sci/include/vm_types.h
index 66758425ae..84bf016014 100644
--- a/engines/sci/include/vm_types.h
+++ b/engines/sci/include/vm_types.h
@@ -29,7 +29,7 @@
#ifndef _SCI_VM_TYPES_H_
#define _SCI_VM_TYPES_H_
-#include <scitypes.h>
+#include "sci/include/scitypes.h"
#define SCI_REG_SIZE 16;
#define SCI_SEG_SIZE 16;
diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h
index fb58dd644b..2219f0ee2a 100644
--- a/engines/sci/include/vocabulary.h
+++ b/engines/sci/include/vocabulary.h
@@ -28,8 +28,8 @@
#ifndef VOCABULARY_H
#define VOCABULARY_H
-#include <versions.h>
-#include <sciresource.h>
+#include "sci/include/versions.h"
+#include "sci/include/sciresource.h"
/*#define VOCABULARY_DEBUG */
/*#define SCI_SIMPLE_SAID_CODE */ /* Whether the simplified Said() matching should be used */
diff --git a/engines/sci/module.mk b/engines/sci/module.mk
index 1f5641ac26..18fa897aaa 100644
--- a/engines/sci/module.mk
+++ b/engines/sci/module.mk
@@ -93,7 +93,7 @@ MODULE_OBJS = \
# FIXME: The following is supposed to be a set of *temporary* hacks
CXXFLAGS += -Wno-variadic-macros
-CPPFLAGS := -DSCUMMVM -I$(srcdir)/engines/sci/include $(CPPFLAGS)
+CPPFLAGS += -DSCUMMVM
# Build .c files as C++
%.o: %.c
@@ -101,7 +101,7 @@ CPPFLAGS := -DSCUMMVM -I$(srcdir)/engines/sci/include $(CPPFLAGS)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
# Generate savegame.cpp
-$(srcdir)/engines/sci/src/engine/savegame.cpp: $(srcdir)/engines/sci/src/engine/savegame.cfsml
+$(srcdir)/engines/sci/engine/savegame.c: $(srcdir)/engines/sci/engine/savegame.cfsml
cat $< | perl $(srcdir)/engines/sci/engine/cfsml.pl -f savegame.cfsml > $@
# This module can be built as a plugin
diff --git a/engines/sci/scicore/aatree.c b/engines/sci/scicore/aatree.c
index 74c8f6519e..7bbef8c43b 100644
--- a/engines/sci/scicore/aatree.c
+++ b/engines/sci/scicore/aatree.c
@@ -26,9 +26,9 @@
***************************************************************************/
#include <stdlib.h>
-#include <aatree.h>
+#include "sci/include/aatree.h"
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
struct aatree
{
diff --git a/engines/sci/scicore/decompress0.c b/engines/sci/scicore/decompress0.c
index 00c98e03df..6dba2d5299 100644
--- a/engines/sci/scicore/decompress0.c
+++ b/engines/sci/scicore/decompress0.c
@@ -28,8 +28,8 @@
** This is for SCI version 0 style compression.
*/
-#include <sci_memory.h>
-#include <sciresource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
/* #define _SCI_DECOMPRESS_DEBUG */
diff --git a/engines/sci/scicore/decompress01.c b/engines/sci/scicore/decompress01.c
index 69795b1c6d..e08e98f95b 100644
--- a/engines/sci/scicore/decompress01.c
+++ b/engines/sci/scicore/decompress01.c
@@ -26,8 +26,8 @@
***************************************************************************/
/* Reads data from a resource file and stores the result in memory */
-#include <sci_memory.h>
-#include <sciresource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
/***************************************************************************
* The following code was originally created by Carl Muckenhoupt for his
diff --git a/engines/sci/scicore/decompress1.c b/engines/sci/scicore/decompress1.c
index 978a00bf86..be88d775aa 100644
--- a/engines/sci/scicore/decompress1.c
+++ b/engines/sci/scicore/decompress1.c
@@ -26,8 +26,8 @@
***************************************************************************/
/* Reads data from a resource file and stores the result in memory */
-#include <sci_memory.h>
-#include <sciresource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
diff --git a/engines/sci/scicore/decompress11.c b/engines/sci/scicore/decompress11.c
index eb3cc39a73..88f3a2795a 100644
--- a/engines/sci/scicore/decompress11.c
+++ b/engines/sci/scicore/decompress11.c
@@ -26,8 +26,8 @@
***************************************************************************/
/* Reads data from a resource file and stores the result in memory */
-#include <sci_memory.h>
-#include <sciresource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
#define DDEBUG if (0) printf
diff --git a/engines/sci/scicore/exe.c b/engines/sci/scicore/exe.c
index d2ff72995a..4e97f80ed5 100644
--- a/engines/sci/scicore/exe.c
+++ b/engines/sci/scicore/exe.c
@@ -25,10 +25,10 @@
***************************************************************************/
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
-#include "exe.h"
-#include "exe_dec.h"
+#include "sci/scicore/exe.h"
+#include "sci/scicore/exe_dec.h"
extern exe_decompressor_t exe_decompressor_lzexe;
extern exe_decompressor_t exe_decompressor_raw;
diff --git a/engines/sci/scicore/exe_lzexe.c b/engines/sci/scicore/exe_lzexe.c
index 2331c01fb4..4445ed8df9 100644
--- a/engines/sci/scicore/exe_lzexe.c
+++ b/engines/sci/scicore/exe_lzexe.c
@@ -28,8 +28,8 @@
/* Based on public domain code by Mitugu Kurizono. */
#include <stdio.h>
-#include <sci_memory.h>
-#include "exe_dec.h"
+#include "sci/include/sci_memory.h"
+#include "sci/scicore/exe_dec.h"
/* Macro to interpret two sequential bytes as an unsigned integer. */
#define UINT16(A) ((*((A) + 1) << 8) + *(A))
diff --git a/engines/sci/scicore/exe_raw.c b/engines/sci/scicore/exe_raw.c
index ecc7089b2a..9a0dc5f742 100644
--- a/engines/sci/scicore/exe_raw.c
+++ b/engines/sci/scicore/exe_raw.c
@@ -26,14 +26,14 @@
***************************************************************************/
#include <stdio.h>
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
struct _exe_handle
{
FILE *f;
};
-#include "exe_dec.h"
+#include "sci/scicore/exe_dec.h"
static exe_handle_t *
raw_open(const char *filename)
diff --git a/engines/sci/scicore/int_hashmap.c b/engines/sci/scicore/int_hashmap.c
index 0b70838e17..d170afd3d5 100644
--- a/engines/sci/scicore/int_hashmap.c
+++ b/engines/sci/scicore/int_hashmap.c
@@ -26,8 +26,8 @@
***************************************************************************/
#define BUILD_MAP_FUNCTIONS
-#include "int_hashmap.h"
+#include "sci/include/int_hashmap.h"
-#include "hashmap.c"
+#include "sci/scicore/hashmap.c"
DEFINE_FUNCTIONS(int)
diff --git a/engines/sci/scicore/reg_t_hashmap.c b/engines/sci/scicore/reg_t_hashmap.c
index 0ac8382422..bee5a8bcf2 100644
--- a/engines/sci/scicore/reg_t_hashmap.c
+++ b/engines/sci/scicore/reg_t_hashmap.c
@@ -26,9 +26,9 @@
***************************************************************************/
#define BUILD_MAP_FUNCTIONS
-#include "reg_t_hashmap.h"
+#include "sci/include/reg_t_hashmap.h"
-#include "hashmap.c"
+#include "sci/scicore/hashmap.c"
static inline int
compare_reg_t (reg_t lhs, reg_t rhs)
diff --git a/engines/sci/scicore/resource.c b/engines/sci/scicore/resource.c
index b137790f89..e131b55606 100644
--- a/engines/sci/scicore/resource.c
+++ b/engines/sci/scicore/resource.c
@@ -30,9 +30,9 @@
***************************************************************************/
/* Resource library */
-#include <sci_memory.h>
-#include <sciresource.h>
-#include <vocabulary.h> /* For SCI version auto-detection */
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/vocabulary.h" /* For SCI version auto-detection */
#include <ctype.h>
diff --git a/engines/sci/scicore/resource_map.c b/engines/sci/scicore/resource_map.c
index 5a85383911..48ea54cb3a 100644
--- a/engines/sci/scicore/resource_map.c
+++ b/engines/sci/scicore/resource_map.c
@@ -25,9 +25,9 @@
***************************************************************************/
-#include <sci_memory.h>
-#include <sciresource.h>
-#include <resource.h>
+#include "sci/include/sci_memory.h"
+#include "sci/include/sciresource.h"
+#include "sci/include/resource.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
diff --git a/engines/sci/scicore/resource_patch.c b/engines/sci/scicore/resource_patch.c
index 3de384e25b..1cdaeb503d 100644
--- a/engines/sci/scicore/resource_patch.c
+++ b/engines/sci/scicore/resource_patch.c
@@ -26,8 +26,8 @@
***************************************************************************/
-#include <sciresource.h>
-#include <sci_memory.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/sci_memory.h"
void
diff --git a/engines/sci/scicore/sci_memory.c b/engines/sci/scicore/sci_memory.c
index ba666e1ceb..4d0395d9dd 100644
--- a/engines/sci/scicore/sci_memory.c
+++ b/engines/sci/scicore/sci_memory.c
@@ -33,7 +33,7 @@
***************************************************************************/
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
/*#define POISON_MEMORY*/
diff --git a/engines/sci/scicore/script.c b/engines/sci/scicore/script.c
index 921e0fa50b..b3d977e5ad 100644
--- a/engines/sci/scicore/script.c
+++ b/engines/sci/scicore/script.c
@@ -27,8 +27,8 @@
***************************************************************************/
-#include <sciresource.h>
-#include <engine.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
/* #define SCRIPT_DEBUG */
diff --git a/engines/sci/scicore/tools.c b/engines/sci/scicore/tools.c
index 4194a44047..11bc00d5a7 100644
--- a/engines/sci/scicore/tools.c
+++ b/engines/sci/scicore/tools.c
@@ -27,7 +27,7 @@
#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */
#include <stdlib.h>
-#include <engine.h>
+#include "sci/include/engine.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
diff --git a/engines/sci/scicore/versions.c b/engines/sci/scicore/versions.c
index 06cab77cd1..6b6e1ef0ee 100644
--- a/engines/sci/scicore/versions.c
+++ b/engines/sci/scicore/versions.c
@@ -19,12 +19,12 @@
***************************************************************************/
#define NEED_SCI_VERSIONS
-#include <versions.h>
-#include <engine.h>
-#include <resource.h>
+#include "sci/include/versions.h"
+#include "sci/include/engine.h"
+#include "sci/include/resource.h"
#include <ctype.h>
-#include "games.h"
-#include "exe.h"
+#include "sci/scicore/games.h"
+#include "sci/scicore/exe.h"
/* Maxmimum number of bytes to hash from start of file */
#define VERSION_DETECT_HASH_SIZE 1000000
diff --git a/engines/sci/scicore/vocab.c b/engines/sci/scicore/vocab.c
index dd70cc2fbe..c712fdf4b5 100644
--- a/engines/sci/scicore/vocab.c
+++ b/engines/sci/scicore/vocab.c
@@ -27,9 +27,9 @@
/* Main vocabulary support functions and word lookup */
-#include <sciresource.h>
-#include <engine.h>
-#include <kernel.h>
+#include "sci/include/sciresource.h"
+#include "sci/include/engine.h"
+#include "sci/include/kernel.h"
#include <ctype.h>
diff --git a/engines/sci/scicore/vocab_debug.c b/engines/sci/scicore/vocab_debug.c
index 1877037040..6e22320ee2 100644
--- a/engines/sci/scicore/vocab_debug.c
+++ b/engines/sci/scicore/vocab_debug.c
@@ -4,8 +4,8 @@
#include <string.h>
-#include <engine.h>
-#include <sciresource.h>
+#include "sci/include/engine.h"
+#include "sci/include/sciresource.h"
/* Default kernel name table */
#define SCI0_KNAMES_WELL_DEFINED 0x6e
diff --git a/engines/sci/sfx/adlib.c b/engines/sci/sfx/adlib.c
index dab3902770..c84a087820 100644
--- a/engines/sci/sfx/adlib.c
+++ b/engines/sci/sfx/adlib.c
@@ -17,7 +17,7 @@
***************************************************************************/
-#include "adlib.h"
+#include "sci/sfx/adlib.h"
adlib_instr adlib_sbi[96];
diff --git a/engines/sci/sfx/adlib.h b/engines/sci/sfx/adlib.h
index 214b7100b7..67572581b5 100644
--- a/engines/sci/sfx/adlib.h
+++ b/engines/sci/sfx/adlib.h
@@ -23,7 +23,7 @@
#ifndef _SFX_ADLIB_H_
#define _SFX_ADLIB_H_
-#include <resource.h>
+#include "sci/include/resource.h"
#define ADLIB_VOICES 12
diff --git a/engines/sci/sfx/core.c b/engines/sci/sfx/core.c
index 9d55ad6bbf..786f80ab45 100644
--- a/engines/sci/sfx/core.c
+++ b/engines/sci/sfx/core.c
@@ -27,11 +27,11 @@
/* Sound subsystem core: Event handler, sound player dispatching */
#include <stdio.h>
-#include <sfx_timer.h>
-#include <sfx_iterator_internal.h>
-#include <sfx_player.h>
-#include "mixer.h"
-#include <sci_midi.h>
+#include "sci/include/sfx_timer.h"
+#include "sci/include/sfx_iterator_internal.h"
+#include "sci/include/sfx_player.h"
+#include "sci/sfx/mixer.h"
+#include "sci/include/sci_midi.h"
/*#define DEBUG_SONG_API*/
diff --git a/engines/sci/sfx/device/devices.c b/engines/sci/sfx/device/devices.c
index 78d8c4279c..2e54b1df4f 100644
--- a/engines/sci/sfx/device/devices.c
+++ b/engines/sci/sfx/device/devices.c
@@ -44,7 +44,7 @@ extern struct _midi_device sfx_device_midi_camd;
#endif
#endif // SCUMMVM
-#include <resource.h>
+#include "sci/include/resource.h"
static struct _midi_device *devices_midi[] = {
#ifndef SCUMMVM
diff --git a/engines/sci/sfx/iterator.c b/engines/sci/sfx/iterator.c
index f6c123a082..2d9008a842 100644
--- a/engines/sci/sfx/iterator.c
+++ b/engines/sci/sfx/iterator.c
@@ -27,10 +27,10 @@
/* Song iterators */
#include <stdio.h>
-#include <sfx_iterator_internal.h>
-#include <sfx_player.h>
-#include <resource.h>
-#include <sci_memory.h>
+#include "sci/include/sfx_iterator_internal.h"
+#include "sci/include/sfx_player.h"
+#include "sci/include/resource.h"
+#include "sci/include/sci_memory.h"
static const int MIDI_cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0,
2, 2, 2, 2, 1, 1, 2, 0};
diff --git a/engines/sci/sfx/mixer.h b/engines/sci/sfx/mixer.h
index 7cf2aae397..2b7aa6fbfb 100644
--- a/engines/sci/sfx/mixer.h
+++ b/engines/sci/sfx/mixer.h
@@ -28,7 +28,7 @@
#ifndef _SFX_MIXER_H_
#define _SFX_MIXER_H_
-#include <sfx_pcm.h>
+#include "sci/include/sfx_pcm.h"
#define SFX_PCM_FEED_MODE_ALIVE 0
diff --git a/engines/sci/sfx/mixer/mixers.c b/engines/sci/sfx/mixer/mixers.c
index 1c7e27ab17..997525f173 100644
--- a/engines/sci/sfx/mixer/mixers.c
+++ b/engines/sci/sfx/mixer/mixers.c
@@ -26,7 +26,7 @@
***************************************************************************/
#include "../mixer.h"
-#include <resource.h>
+#include "sci/include/resource.h"
extern sfx_pcm_mixer_t sfx_pcm_mixer_soft_linear;
diff --git a/engines/sci/sfx/mixer/soft.c b/engines/sci/sfx/mixer/soft.c
index 9f833017df..d71567a209 100644
--- a/engines/sci/sfx/mixer/soft.c
+++ b/engines/sci/sfx/mixer/soft.c
@@ -26,7 +26,7 @@
***************************************************************************/
#include "../mixer.h"
-#include <sci_memory.h>
+#include "sci/include/sci_memory.h"
/* Max. number of microseconds in difference allowed between independent audio streams */
#define TIMESTAMP_MAX_ALLOWED_DELTA 2000
diff --git a/engines/sci/sfx/pcm-iterator.c b/engines/sci/sfx/pcm-iterator.c
index 8d9b86ed0d..cad4bd50f9 100644
--- a/engines/sci/sfx/pcm-iterator.c
+++ b/engines/sci/sfx/pcm-iterator.c
@@ -27,9 +27,9 @@
***************************************************************************/
-#include <sfx_iterator.h>
-#include <resource.h> /* for BREAKPOINT */
-#include <sci_memory.h>
+#include "sci/include/sfx_iterator.h"
+#include "sci/include/resource.h" /* for BREAKPOINT */
+#include "sci/include/sci_memory.h"
#define D ((pcm_data_internal_t *)self->internal)
diff --git a/engines/sci/sfx/pcm_device/pcm_devices.c b/engines/sci/sfx/pcm_device/pcm_devices.c
index 913b59fb08..a29de8896f 100644
--- a/engines/sci/sfx/pcm_device/pcm_devices.c
+++ b/engines/sci/sfx/pcm_device/pcm_devices.c
@@ -17,8 +17,8 @@
***************************************************************************/
-#include <sfx_pcm.h>
-#include <resource.h>
+#include "sci/include/sfx_pcm.h"
+#include "sci/include/resource.h"
#ifndef NO_PCMOUT
#ifdef SCUMMVM
diff --git a/engines/sci/sfx/pcm_device/scummvm.cpp b/engines/sci/sfx/pcm_device/scummvm.cpp
index 1b64dd40d3..c66aa0706e 100644
--- a/engines/sci/sfx/pcm_device/scummvm.cpp
+++ b/engines/sci/sfx/pcm_device/scummvm.cpp
@@ -1,5 +1,5 @@
-#include "sfx_time.h"
-#include "sfx_pcm.h"
+#include "sci/include/sfx_time.h"
+#include "sci/include/sfx_pcm.h"
#include "engines/engine.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
diff --git a/engines/sci/sfx/player/players.c b/engines/sci/sfx/player/players.c
index d6d7cbaf17..eafff46bc3 100644
--- a/engines/sci/sfx/player/players.c
+++ b/engines/sci/sfx/player/players.c
@@ -25,7 +25,7 @@
***************************************************************************/
-#include <sfx_player.h>
+#include "sci/include/sfx_player.h"
extern sfx_player_t sfx_player_realtime;
extern sfx_player_t sfx_player_polled;
diff --git a/engines/sci/sfx/player/polled.c b/engines/sci/sfx/player/polled.c
index 59eeceaac2..2a4c23fa97 100644
--- a/engines/sci/sfx/player/polled.c
+++ b/engines/sci/sfx/player/polled.c
@@ -26,9 +26,9 @@
***************************************************************************/
/* Polled player, mostly for PCM-based thingies (which _can_ poll, after all) */
-#include <sfx_player.h>
-#include "../softseq.h"
-#include "../mixer.h"
+#include "sci/include/sfx_player.h"
+#include "sci/sfx/softseq.h"
+#include "sci/sfx/mixer.h"
static song_iterator_t *play_it;
static int play_paused = 0;
diff --git a/engines/sci/sfx/player/realtime.c b/engines/sci/sfx/player/realtime.c
index 752b0b816b..d3fbae5800 100644
--- a/engines/sci/sfx/player/realtime.c
+++ b/engines/sci/sfx/player/realtime.c
@@ -28,8 +28,8 @@
** prays for some reasonable amount of soft real-time, but it's close
** enough, I guess. */
-#include <sfx_player.h>
-#include "../sequencer.h"
+#include "sci/include/sfx_player.h"
+#include "sci/sfx/sequencer.h"
static sfx_sequencer_t *seq;
diff --git a/engines/sci/sfx/sequencer.h b/engines/sci/sfx/sequencer.h
index 586e4b3e51..bafb6716aa 100644
--- a/engines/sci/sfx/sequencer.h
+++ b/engines/sci/sfx/sequencer.h
@@ -26,10 +26,10 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <sfx_core.h>
+#include "sci/include/sfx_core.h"
#include <stdio.h>
-#include "device.h"
-#include <scitypes.h>
+#include "sci/sfx/device.h"
+#include "sci/include/scitypes.h"
#define SFX_SEQ_PATCHFILE_NONE -1
diff --git a/engines/sci/sfx/softseq.h b/engines/sci/sfx/softseq.h
index 38efac6d59..6284aef8ec 100644
--- a/engines/sci/sfx/softseq.h
+++ b/engines/sci/sfx/softseq.h
@@ -30,10 +30,10 @@
#ifndef SFX_SOFTSEQ_H_
#define SFX_SOFTSEQ_H_
-#include <sfx_core.h>
-#include <sfx_pcm.h>
-#include "sequencer.h"
-#include <resource.h>
+#include "sci/include/sfx_core.h"
+#include "sci/include/sfx_pcm.h"
+#include "sci/sfx/sequencer.h"
+#include "sci/include/resource.h"
/* Software sequencer */
diff --git a/engines/sci/sfx/softseq/SN76496.c b/engines/sci/sfx/softseq/SN76496.c
index cb32b89f0c..6ecd72bf9e 100644
--- a/engines/sci/sfx/softseq/SN76496.c
+++ b/engines/sci/sfx/softseq/SN76496.c
@@ -28,8 +28,8 @@
***************************************************************************/
/* Tandy/PCJr sequencer for FreeSCI */
-#include "../softseq.h"
-#include <sci_midi.h>
+#include "sci/sfx/softseq.h"
+#include "sci/include/sci_midi.h"
#define FREQUENCY 44100
#define CHANNELS_NR 3
diff --git a/engines/sci/sfx/softseq/amiga.c b/engines/sci/sfx/softseq/amiga.c
index 12240897d7..8595899718 100644
--- a/engines/sci/sfx/softseq/amiga.c
+++ b/engines/sci/sfx/softseq/amiga.c
@@ -27,9 +27,9 @@
***************************************************************************/
-#include "resource.h"
-#include "sci_memory.h"
-#include "../softseq.h"
+#include "sci/include/resource.h"
+#include "sci/include/sci_memory.h"
+#include "sci/sfx/softseq.h"
#define FREQUENCY 44100
#define CHANNELS_NR 10
diff --git a/engines/sci/sfx/softseq/fmopl.h b/engines/sci/sfx/softseq/fmopl.h
index 5bb1cd80d7..0250c23a5a 100644
--- a/engines/sci/sfx/softseq/fmopl.h
+++ b/engines/sci/sfx/softseq/fmopl.h
@@ -26,7 +26,7 @@
#ifndef FMOPL_H_
#define FMOPL_H_
-#include <scitypes.h>
+#include "sci/include/scitypes.h"
#define TWELVE_VOICE 1
#ifdef TWELVE_VOICE
diff --git a/engines/sci/sfx/softseq/pcspeaker.c b/engines/sci/sfx/softseq/pcspeaker.c
index 771c8f0da5..727b1f9e5a 100644
--- a/engines/sci/sfx/softseq/pcspeaker.c
+++ b/engines/sci/sfx/softseq/pcspeaker.c
@@ -28,8 +28,8 @@
***************************************************************************/
/* PC speaker software sequencer for FreeSCI */
-#include "../softseq.h"
-#include <sci_midi.h>
+#include "sci/sfx/softseq.h"
+#include "sci/include/sci_midi.h"
#define FREQUENCY 94020
diff --git a/engines/sci/sfx/songlib.c b/engines/sci/sfx/songlib.c
index 36287845f0..57475e82db 100644
--- a/engines/sci/sfx/songlib.c
+++ b/engines/sci/sfx/songlib.c
@@ -25,8 +25,8 @@
***************************************************************************/
#include <stdio.h>
-#include <sfx_engine.h>
-#include <sci_memory.h>
+#include "sci/include/sfx_engine.h"
+#include "sci/include/sci_memory.h"
#define debug_stream stderr
diff --git a/engines/sci/sfx/time.c b/engines/sci/sfx/time.c
index 553eb406f8..0063b8ef65 100644
--- a/engines/sci/sfx/time.c
+++ b/engines/sci/sfx/time.c
@@ -27,8 +27,8 @@
***************************************************************************/
-#include <sfx_time.h>
-#include <resource.h>
+#include "sci/include/sfx_time.h"
+#include "sci/include/resource.h"
sfx_timestamp_t
sfx_new_timestamp(long secs, long usecs, int frame_rate)
diff --git a/engines/sci/sfx/timer/scummvm.cpp b/engines/sci/sfx/timer/scummvm.cpp
index f4e08d441a..c7d225e80c 100644
--- a/engines/sci/sfx/timer/scummvm.cpp
+++ b/engines/sci/sfx/timer/scummvm.cpp
@@ -1,6 +1,6 @@
#include "common/timer.h"
#include "engines/engine.h"
-#include "sfx_timer.h"
+#include "sci/include/sfx_timer.h"
#define FREQ 60
@@ -32,7 +32,7 @@ int scummvm_timer_start(void (*func)(void *), void *data) {
scummvm_timer_callback = func;
scummvm_timer_callback_data = data;
- ::g_engine->_timer->installTimerProc(&scummvm_timer_update_internal, DELAY, NULL);
+ ::g_engine->getTimerManager()->installTimerProc(&scummvm_timer_update_internal, DELAY, NULL);
return SFX_OK;
}
diff --git a/engines/sci/sfx/timer/timers.c b/engines/sci/sfx/timer/timers.c
index b2a51d6062..353ae11ca7 100644
--- a/engines/sci/sfx/timer/timers.c
+++ b/engines/sci/sfx/timer/timers.c
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <sfx_timer.h>
-#include <resource.h>
+#include "sci/include/sfx_timer.h"
+#include "sci/include/resource.h"
#ifdef SCUMMVM
extern sfx_timer_t sfx_timer_scummvm;