diff options
Diffstat (limited to 'backends/dc')
-rw-r--r-- | backends/dc/dc.h | 16 | ||||
-rw-r--r-- | backends/dc/dcloader.cpp | 10 | ||||
-rw-r--r-- | backends/dc/dcmain.cpp | 4 | ||||
-rw-r--r-- | backends/dc/display.cpp | 30 | ||||
-rw-r--r-- | backends/dc/icon.cpp | 4 | ||||
-rw-r--r-- | backends/dc/input.cpp | 2 | ||||
-rw-r--r-- | backends/dc/label.cpp | 2 | ||||
-rw-r--r-- | backends/dc/selector.cpp | 26 | ||||
-rw-r--r-- | backends/dc/softkbd.cpp | 2 | ||||
-rw-r--r-- | backends/dc/softkbd.h | 2 | ||||
-rw-r--r-- | backends/dc/vmsave.cpp | 16 |
11 files changed, 57 insertions, 57 deletions
diff --git a/backends/dc/dc.h b/backends/dc/dc.h index e3a0f76325..2f07759754 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -87,28 +87,28 @@ class OSystem_Dreamcast : public OSystem { // Set the bitmap that's used when drawing the cursor. void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); - + // Shaking is used in SCUMM. Set current shake position. void setShakePos(int shake_pos); // Get the number of milliseconds since the program was started. uint32 getMillis(); - + // Delay for a specified amount of milliseconds void delayMillis(uint msecs); - + // Get the next event. - // Returns true if an event was retrieved. + // Returns true if an event was retrieved. bool pollEvent(Event &event); - - // Set function that generates samples + + // Set function that generates samples bool setSoundCallback(SoundProc proc, void *param); void clearSoundCallback(); // Determine the output sample rate. Audio data provided by the sound // callback will be played using this rate. int getOutputSampleRate() const; - + // Initialise the specified CD drive for audio playback. bool openCD(int drive); @@ -118,7 +118,7 @@ class OSystem_Dreamcast : public OSystem { // Play cdrom audio track void playCD(int track, int num_loops, int start_frame, int duration); - + // Stop cdrom audio track void stopCD(); diff --git a/backends/dc/dcloader.cpp b/backends/dc/dcloader.cpp index 918c2a98c8..cb12b081d2 100644 --- a/backends/dc/dcloader.cpp +++ b/backends/dc/dcloader.cpp @@ -181,7 +181,7 @@ bool DLObject::relocate(int fd, unsigned long offset, unsigned long size) } free(rela); - return true; + return true; } @@ -233,7 +233,7 @@ bool DLObject::load(int fd) read(fd, segment, phdr.p_filesz) != phdr.p_filesz) { seterror("Segment load failed."); return false; - } + } DBG("shoff = %d, shentsz = %d, shnum = %d\n", ehdr.e_shoff, ehdr.e_shentsize, ehdr.e_shnum); @@ -309,7 +309,7 @@ bool DLObject::load(int fd) free(shdr); return false; } - + free(shdr); return true; @@ -351,7 +351,7 @@ bool DLObject::open(const char *path) seterror("Missing ctors/dtors."); dtors_start = dtors_end = NULL; unload(); - return false; + return false; } DBG("Calling constructors.\n"); @@ -390,7 +390,7 @@ void *DLObject::symbol(const char *name) } seterror("Symbol \"%s\" not found.", name); - return NULL; + return NULL; } diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp index 8512af7ff1..132b11915e 100644 --- a/backends/dc/dcmain.cpp +++ b/backends/dc/dcmain.cpp @@ -136,7 +136,7 @@ OSystem::MutexRef OSystem_Dreamcast::createMutex() void OSystem_Dreamcast::lockMutex(MutexRef mutex) { } - + void OSystem_Dreamcast::unlockMutex(MutexRef mutex) { } @@ -226,7 +226,7 @@ int DCLauncherDialog::runModal() // Set the game path. if(dir != NULL) ConfMan.set("path", dir, Common::ConfigManager::kTransientDomain); - + // Set the target. _detector.setTarget(base); diff --git a/backends/dc/display.cpp b/backends/dc/display.cpp index e45312bdbb..002229330b 100644 --- a/backends/dc/display.cpp +++ b/backends/dc/display.cpp @@ -106,7 +106,7 @@ static void texture_memcpy64(void *dest, void *src, int cnt) d[4] = *s++; d[5] = *s++; d[6] = *s++; - d[7] = *s++; + d[7] = *s++; asm("pref @%0" : : "r" (d)); d += 8; } @@ -224,7 +224,7 @@ void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int } bool OSystem_Dreamcast::showMouse(bool visible) -{ +{ bool last = _ms_visible; _ms_visible = visible; @@ -243,12 +243,12 @@ void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h, { _ms_cur_w = w; _ms_cur_h = h; - + _ms_hotspot_x = hotspot_x; _ms_hotspot_y = hotspot_y; _ms_keycolor = keycolor; - + if (_ms_buf) free(_ms_buf); @@ -276,7 +276,7 @@ void OSystem_Dreamcast::updateScreen(void) // while((*((volatile unsigned int *)(void*)0xa05f810c) & 0x3ff) != 200); // *((volatile unsigned int *)(void*)0xa05f8040) = 0xff0000; - + for( int y = 0; y<_screen_h; y++ ) { texture_memcpy64_pal( dst, src, _screen_w>>5, palette ); @@ -318,11 +318,11 @@ void OSystem_Dreamcast::updateScreen(void) TA_TEXTUREMODE_STRIDE|TA_TEXTUREMODE_ADDRESS(screen_tx[_screen_buffer]); mypoly.red = mypoly.green = mypoly.blue = mypoly.alpha = 0; - + ta_begin_frame(); // *((volatile unsigned int *)(void*)0xa05f8040) = 0x0000ff; ta_commit_list(&mypoly); - + myvertex.cmd = TA_CMD_VERTEX; myvertex.ocolour = 0; myvertex.colour = 0; @@ -357,7 +357,7 @@ void OSystem_Dreamcast::updateScreen(void) } else { if(_overlay_fade > 0) _overlay_fade -= 0.125; - } + } if(_overlay_fade > 0.0) { @@ -372,11 +372,11 @@ void OSystem_Dreamcast::updateScreen(void) TA_POLYMODE2_U_SIZE_512|TA_POLYMODE2_V_SIZE_512; mypoly.texture = TA_TEXTUREMODE_ARGB4444|TA_TEXTUREMODE_NON_TWIDDLED| TA_TEXTUREMODE_ADDRESS(ovl_tx[_overlay_buffer]); - + mypoly.red = mypoly.green = mypoly.blue = mypoly.alpha = 0.0; ta_commit_list(&mypoly); - + myvertex.cmd = TA_CMD_VERTEX; myvertex.ocolour = 0; myvertex.colour = 0xffffff|(((int)(255*_overlay_fade))<<24); @@ -398,7 +398,7 @@ void OSystem_Dreamcast::updateScreen(void) myvertex.u = 0.0; myvertex.v = OVL_H*(1.0/512.0); ta_commit_list(&myvertex); - + myvertex.x += OVL_W*_xscale; myvertex.u = OVL_W*(1.0/512.0); myvertex.cmd |= TA_CMD_VERTEX_EOS; @@ -453,7 +453,7 @@ void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h, commit_dummy_transpoly(); return; } - + mypoly.cmd = TA_CMD_POLYGON|TA_CMD_POLYGON_TYPE_TRANSPARENT|TA_CMD_POLYGON_SUBLIST| TA_CMD_POLYGON_STRIPLENGTH_2|TA_CMD_POLYGON_PACKED_COLOUR|TA_CMD_POLYGON_TEXTURED; @@ -466,9 +466,9 @@ void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h, TA_TEXTUREMODE_ADDRESS(mouse_tx[_mouse_buffer]); mypoly.red = mypoly.green = mypoly.blue = mypoly.alpha = 0; - + ta_commit_list(&mypoly); - + myvertex.cmd = TA_CMD_VERTEX; myvertex.ocolour = 0; myvertex.colour = 0xffff00; @@ -489,7 +489,7 @@ void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h, myvertex.u = 0.0; myvertex.v = h*(1.0/MOUSE_H); ta_commit_list(&myvertex); - + myvertex.x += w*_xscale; myvertex.u = w*(1.0/MOUSE_W); myvertex.cmd |= TA_CMD_VERTEX_EOS; diff --git a/backends/dc/icon.cpp b/backends/dc/icon.cpp index 95176763e6..9d99674fd0 100644 --- a/backends/dc/icon.cpp +++ b/backends/dc/icon.cpp @@ -32,7 +32,7 @@ void Icon::create_vmicon(void *buffer) for(int n = 0; n<16; n++) { int p = palette[n]; - pal[n] = + pal[n] = ((p>>16)&0xf000)| ((p>>12)&0x0f00)| ((p>> 8)&0x00f0)| @@ -114,7 +114,7 @@ void Icon::draw(float x1, float y1, float x2, float y2, int pal, myvertex.x = x2; myvertex.v = 0.0; myvertex.cmd |= TA_CMD_VERTEX_EOS; - ta_commit_list(&myvertex); + ta_commit_list(&myvertex); } int Icon::find_unused_pixel() diff --git a/backends/dc/input.cpp b/backends/dc/input.cpp index fa389c400a..6513dbd00a 100644 --- a/backends/dc/input.cpp +++ b/backends/dc/input.cpp @@ -66,7 +66,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 2)) rmb++; if(!(buttons & 8)) newkey = 319; - + mouse_x += pad->cond.mouse.axis1; mouse_y += pad->cond.mouse.axis2; mouse_wheel += pad->cond.mouse.axis3; diff --git a/backends/dc/label.cpp b/backends/dc/label.cpp index c9dab67edd..88f4c48f95 100644 --- a/backends/dc/label.cpp +++ b/backends/dc/label.cpp @@ -132,6 +132,6 @@ void Label::draw(float x, float y, unsigned int argb, float scale) myvertex.x = x+u*scale; myvertex.u = 1.0; myvertex.cmd |= TA_CMD_VERTEX_EOS; - ta_commit_list(&myvertex); + ta_commit_list(&myvertex); } diff --git a/backends/dc/selector.cpp b/backends/dc/selector.cpp index cb65e465b2..b275b9033a 100644 --- a/backends/dc/selector.cpp +++ b/backends/dc/selector.cpp @@ -79,7 +79,7 @@ void draw_solid_quad(float x1, float y1, float x2, float y2, myvertex.colour = c3; myvertex.x = x2; myvertex.cmd |= TA_CMD_VERTEX_EOS; - ta_commit_list(&myvertex); + ta_commit_list(&myvertex); } void draw_trans_quad(float x1, float y1, float x2, float y2, @@ -125,7 +125,7 @@ void draw_trans_quad(float x1, float y1, float x2, float y2, myvertex.colour = c3; myvertex.x = x2; myvertex.cmd |= TA_CMD_VERTEX_EOS; - ta_commit_list(&myvertex); + ta_commit_list(&myvertex); } @@ -198,7 +198,7 @@ static bool loadIcon(Game &game, Dir *dirs, int num_dirs) for(int i=0; i<num_dirs; i++) if(!strcmp(dirs[i].name, game.dir) && dirs[i].deficon[0]) { - sprintf(icofn, "%s%s", game.dir, dirs[i].deficon); + sprintf(icofn, "%s%s", game.dir, dirs[i].deficon); if(game.icon.load(icofn)) return true; break; @@ -240,7 +240,7 @@ static int findGames(Game *games, int max) dirs[num_dirs].node = *entry; num_dirs++; } - } else + } else if(isIcon(*entry)) strcpy(dirs[curr_dir-1].deficon, entry->displayName().c_str()); else if(curr_game < max && @@ -303,7 +303,7 @@ void waitForDisk() ta_txrelease(mark); return; } - + ta_begin_frame(); drawBackground(); @@ -347,11 +347,11 @@ int gameMenu(Game *games, int num_games) return -1; ta_begin_frame(); - + drawBackground(); - + ta_commit_end(); - + float y = 40.0; for(int i=top_game, cnt=0; cnt<10 && i<num_games; i++, cnt++) { int pal = 48+(i&15); @@ -375,7 +375,7 @@ int gameMenu(Game *games, int num_games) setimask(15); event = handleInput(locked_get_pads(), mousex, mousey, shiftFlags); setimask(mask); - + if(event==-OSystem::EVENT_LBUTTONDOWN || event==13 || event==319) { int selected_game = top_game + selector_pos; @@ -384,15 +384,15 @@ int gameMenu(Game *games, int num_games) unsigned int fade_colour = 0x00ffffff | ((255-fade)<<24); ta_begin_frame(); - + drawBackground(); - + ta_commit_end(); - + float y = 40.0; if(fade < 256) - for(int i=top_game, cnt=0; cnt<10 && i<num_games; + for(int i=top_game, cnt=0; cnt<10 && i<num_games; i++, cnt++, y += 40.0) if(cnt != selector_pos) drawGameLabel(games[i], 48+(i&15), 50.0, y, 0xffffff, fade); diff --git a/backends/dc/softkbd.cpp b/backends/dc/softkbd.cpp index 7bf12d0632..11622c2f37 100644 --- a/backends/dc/softkbd.cpp +++ b/backends/dc/softkbd.cpp @@ -84,7 +84,7 @@ void SoftKeyboard::draw(float x, float y, int transp) unsigned int bg_alpha_mask = (128-transp)<<24; draw_trans_quad(x, y, x+312.0, y+172.0, - bg_alpha_mask|0x8080ff, bg_alpha_mask|0x8080ff, + bg_alpha_mask|0x8080ff, bg_alpha_mask|0x8080ff, bg_alpha_mask|0x8080ff, bg_alpha_mask|0x8080ff); x0 = x += 4.0; y += 4.0; diff --git a/backends/dc/softkbd.h b/backends/dc/softkbd.h index 3d0d3b0aa5..6cd6a9daee 100644 --- a/backends/dc/softkbd.h +++ b/backends/dc/softkbd.h @@ -32,7 +32,7 @@ class OSystem_Dreamcast; class SoftKeyboard : public Interactive { private: - + const OSystem_Dreamcast *os; Label labels[2][SK_NUM_KEYS]; byte shiftState; diff --git a/backends/dc/vmsave.cpp b/backends/dc/vmsave.cpp index b116b16201..16ea470a53 100644 --- a/backends/dc/vmsave.cpp +++ b/backends/dc/vmsave.cpp @@ -40,7 +40,7 @@ enum vmsaveResult { VMSAVE_OK, VMSAVE_NOVM, VMSAVE_NOSPACE, - VMSAVE_WRITEERROR, + VMSAVE_WRITEERROR, }; @@ -143,7 +143,7 @@ static bool tryLoad(char *&buffer, int &size, const char *filename, int vm) return false; if(!vmsfs_open_file(&super, filename, &file)) return false; - + buffer = new char[size = file.size]; if(vmsfs_read_file(&file, (unsigned char *)buffer, size)) @@ -225,7 +225,7 @@ private: void skip(uint32 offset); public: - InVMSave() + InVMSave() : pos(0), buffer(NULL) { } @@ -264,19 +264,19 @@ private: uint32 write(const void *buf, uint32 cnt); public: - OutVMSave(const char *_filename) + OutVMSave(const char *_filename) : pos(0) { strncpy(filename, _filename, 16); buffer = new char[size = MAX_SAVE_SIZE]; } - + ~OutVMSave(); }; class VMSaveManager : public Common::SaveFileManager { public: - + virtual Common::OutSaveFile *openForSaving(const char *filename) { return new OutVMSave(filename); } @@ -291,7 +291,7 @@ public: return NULL; } } - + virtual void listSavefiles(const char *prefix, bool *marks, int num); }; @@ -353,7 +353,7 @@ uint32 OutVMSave::write(const void *buf, uint32 cnt) void VMSaveManager::listSavefiles(const char *prefix, bool *marks, int num) { memset(marks, false, num*sizeof(bool)); - + for(int i=0; i<24; i++) tryList(prefix, marks, num, i); } |