diff --git a/Makefile.djgpp b/Makefile.djgpp index 51b02cb..1b7bff6 100644 --- a/Makefile.djgpp +++ b/Makefile.djgpp @@ -44,6 +44,7 @@ TARGET_ARCH := # Compiler Flags ALL_CFLAGS := $(CFLAGS) ALL_CFLAGS += -Wall -Ofast +#ALL_CFLAGS += -Wall -O0 -pg # Preprocessor Flags ALL_CPPFLAGS := $(CPPFLAGS) diff --git a/client/src/system/surface.c b/client/src/system/surface.c index 2fccf9c..de0c660 100644 --- a/client/src/system/surface.c +++ b/client/src/system/surface.c @@ -72,13 +72,20 @@ void surfaceBlit(SurfaceT *source, uint16_t x, uint16_t y) { void surfaceClear(ColorT color) { - uint16_t x; - uint16_t y; - for (y=0; y<_activeSurface->height; y++) { - for (x=0; x<_activeSurface->width; x++) { - surfacePutPixel(x, y, color); - } + uint16_t x; + size_t offsetTarget; + + // Draw the top line. + for (x=0; x<_activeSurface->width; x++) { + surfacePutPixel(x, 0, color); + } + + // Copy it to the other lines. + offsetTarget = _activeSurface->scanline; + for (x=1; x<_activeSurface->height; x++) { + memcpy(&_activeSurface->buffer.bits8[offsetTarget], &_activeSurface->buffer.bits8[0], _activeSurface->scanline); + offsetTarget += _activeSurface->scanline; } } @@ -204,6 +211,8 @@ void surfaceRectangleFilledDraw(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t x; uint16_t y; + // This could be optimized similar to surfaceClear + for (y=y1; y<=y2; y++) { for (x=x1; x<=x2; x++) { surfacePutPixel(x, y, color); diff --git a/test.conf b/test.conf index 68770e3..80554f6 100644 --- a/test.conf +++ b/test.conf @@ -193,8 +193,9 @@ convergence = 0 # cycledown: Setting it lower than 100 will be a percentage. core = auto -cputype = 486 -cycles = 5000 +cputype = pentium_slow +cycles = 12000 +#cycles = auto cycleup = 10 cycledown = 20 @@ -457,9 +458,9 @@ phonebookfile = phonebook.txt # Common settings are 3.3, 5.0, 6.22, and 7.1. # keyboardlayout: Language code of the keyboard layout (or none). -xms = true -ems = true -umb = true +xms = false +ems = false +umb = false ver = 5.0 keyboardlayout = auto