aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/heap.cpp8
-rw-r--r--engines/sci/engine/ksound.cpp30
-rw-r--r--engines/sci/engine/scriptdebug.cpp22
3 files changed, 26 insertions, 34 deletions
diff --git a/engines/sci/engine/heap.cpp b/engines/sci/engine/heap.cpp
index c3cea90d64..5907582e37 100644
--- a/engines/sci/engine/heap.cpp
+++ b/engines/sci/engine/heap.cpp
@@ -55,8 +55,8 @@ static unsigned int get_next(heap_t *h, int block_pos) {
}
// Allocates a new heap
-heap_t* heap_new() {
- heap_t* h;
+heap_t *heap_new() {
+ heap_t *h;
if ((h = (heap_t*)sci_malloc(sizeof(heap_t))) == 0)
return 0;
@@ -248,7 +248,7 @@ void heap_dump_all(heap_t *h) {
}
}
-/*
+#if 0
int main(int argc, char **argv) {
heap_t *h = heap_new();
int a, b, c, d, e;
@@ -281,6 +281,6 @@ int main(int argc, char **argv) {
return 0;
}
-*/
+#endif
} // End of namespace Sci
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 22437d86b7..3a60f77fff 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -91,8 +91,7 @@ namespace Sci {
#define SCRIPT_ASSERT_ZERO(fun) if (fun) script_debug_flag = script_error_flag = 1;
-static void
-script_set_priority(EngineState *s, reg_t obj, int priority) {
+static void script_set_priority(EngineState *s, reg_t obj, int priority) {
int song_nr = GET_SEL32V(obj, number);
resource_t *song = scir_find_resource(s->resmgr, sci_sound, song_nr, 0);
int flags = GET_SEL32V(obj, flags);
@@ -110,8 +109,7 @@ script_set_priority(EngineState *s, reg_t obj, int priority) {
PUT_SEL32V(obj, flags, flags);
}
-song_iterator_t *
-build_iterator(EngineState *s, int song_nr, int type, songit_id_t id) {
+song_iterator_t *build_iterator(EngineState *s, int song_nr, int type, songit_id_t id) {
resource_t *song = scir_find_resource(s->resmgr, sci_sound, song_nr, 0);
if (!song)
@@ -121,8 +119,7 @@ build_iterator(EngineState *s, int song_nr, int type, songit_id_t id) {
}
-void
-process_sound_events(EngineState *s) { /* Get all sound events, apply their changes to the heap */
+void process_sound_events(EngineState *s) { /* Get all sound events, apply their changes to the heap */
int result;
song_handle_t handle;
int cue;
@@ -174,8 +171,7 @@ process_sound_events(EngineState *s) { /* Get all sound events, apply their chan
}
-reg_t
-kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = KP_ALT(1, NULL_REG);
uint16 command = UKPV(0);
song_handle_t handle = FROBNICATE_HANDLE(obj);
@@ -362,12 +358,10 @@ kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
-int
-sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
+int sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
int command, int arg1, int arg2);
-reg_t
-kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) {
uint16 command = UKPV(0);
reg_t obj = KP_ALT(1, NULL_REG);
song_handle_t handle = FROBNICATE_HANDLE(obj);
@@ -667,12 +661,10 @@ kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
-int
-sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
+int sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel,
int command, int arg1, int arg2);
-reg_t
-kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
uint16 command = UKPV(0);
reg_t obj = KP_ALT(1, NULL_REG);
song_handle_t handle = FROBNICATE_HANDLE(obj);
@@ -979,8 +971,7 @@ kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
-reg_t
-kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_2)
return kDoSound_SCI1(s, funct_nr, argc, argv);
else if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_1)
@@ -989,8 +980,7 @@ kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return kDoSound_SCI0(s, funct_nr, argc, argv);
}
-reg_t
-kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kDoAudio(EngineState *s, int funct_nr, int argc, reg_t *argv) {
switch (UKPV(0)) {
case _K_SCI1_AUDIO_POSITION :
return make_reg(0, -1); /* Finish immediately */
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 56a9795c9f..b84e703c47 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -1917,10 +1917,10 @@ static int c_gfx_propagate_rect(EngineState *s) {
}
#define GETRECT(ll, rr, tt, bb) \
-ll = GET_SELECTOR(pos, ll); \
-rr = GET_SELECTOR(pos, rr); \
-tt = GET_SELECTOR(pos, tt); \
-bb = GET_SELECTOR(pos, bb);
+ ll = GET_SELECTOR(pos, ll); \
+ rr = GET_SELECTOR(pos, rr); \
+ tt = GET_SELECTOR(pos, tt); \
+ bb = GET_SELECTOR(pos, bb);
#if 0
// Unreferenced - removed
@@ -2207,7 +2207,8 @@ static int c_resource_id(EngineState *s) {
}
static int c_listclones(EngineState *s) {
-/* int i, j = 0;
+#if 0
+ int i, j = 0;
sciprintf("Listing all logged clones:\n");
@@ -2218,7 +2219,8 @@ static int c_listclones(EngineState *s) {
}
}
- sciprintf("Total of %d clones.\n", j);*/
+ sciprintf("Total of %d clones.\n", j);
+#endif
sciprintf("This function is temporarily disabled.\n");
return 0;
@@ -2445,10 +2447,10 @@ int c_simsoundcue(EngineState *s) {
}
#define GETRECT(ll, rr, tt, bb) \
-ll = GET_SELECTOR(pos, ll); \
-rr = GET_SELECTOR(pos, rr); \
-tt = GET_SELECTOR(pos, tt); \
-bb = GET_SELECTOR(pos, bb);
+ ll = GET_SELECTOR(pos, ll); \
+ rr = GET_SELECTOR(pos, rr); \
+ tt = GET_SELECTOR(pos, tt); \
+ bb = GET_SELECTOR(pos, bb);
#if 0
#ifdef __GNUC__