mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
JANITORIAL: use common ARRAYSIZE macro
This commit is contained in:
committed by
Filippos Karapetis
parent
4640c5c9cf
commit
fc6bb6eaac
@@ -33,6 +33,9 @@
|
||||
#include "ROMInfo.h"
|
||||
#include "TVA.h"
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||
#include "common/util.h"
|
||||
|
||||
#if MT32EMU_MONITOR_SYSEX > 0
|
||||
#include "mmath.h"
|
||||
#endif
|
||||
@@ -575,7 +578,7 @@ bool Synth::loadControlROM(const ROMImage &controlROMImage) {
|
||||
// Control ROM successfully loaded, now check whether it's a known type
|
||||
controlROMMap = NULL;
|
||||
controlROMFeatures = NULL;
|
||||
for (unsigned int i = 0; i < sizeof(ControlROMMaps) / sizeof(ControlROMMaps[0]); i++) {
|
||||
for (unsigned int i = 0; i < ARRAYSIZE(ControlROMMaps); i++) {
|
||||
if (strcmp(controlROMInfo->shortName, ControlROMMaps[i].shortName) == 0) {
|
||||
controlROMMap = &ControlROMMaps[i];
|
||||
controlROMFeatures = &controlROMMap->featureSet;
|
||||
|
||||
@@ -496,14 +496,14 @@ Filter::Filter() {
|
||||
|
||||
// Create mappings from FC to cutoff frequency.
|
||||
interpolate(f0_points_6581, f0_points_6581
|
||||
+ sizeof(f0_points_6581)/sizeof(*f0_points_6581) - 1,
|
||||
+ ARRAYSIZE(f0_points_6581) - 1,
|
||||
PointPlotter<sound_sample>(f0_6581), 1.0);
|
||||
|
||||
mixer_DC = (-0xfff*0xff/18) >> 7;
|
||||
|
||||
f0 = f0_6581;
|
||||
f0_points = f0_points_6581;
|
||||
f0_count = sizeof(f0_points_6581)/sizeof(*f0_points_6581);
|
||||
f0_count = ARRAYSIZE(f0_points_6581);
|
||||
|
||||
set_w0();
|
||||
set_Q();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/util.h"
|
||||
|
||||
/* Common memory code used by the Indeo decoder
|
||||
*
|
||||
@@ -33,7 +34,7 @@
|
||||
namespace Image {
|
||||
namespace Indeo {
|
||||
|
||||
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#define FF_ARRAY_ELEMS(a) ARRAYSIZE(a)
|
||||
#define FFALIGN(x, a) (((x) + (a)-1) & ~((a)-1))
|
||||
#define FFSIGN(a) ((a) > 0 ? 1 : -1)
|
||||
#define MAX_INTEGER 0x7ffffff
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "common/fs.h"
|
||||
#include "common/stream.h"
|
||||
#include "common/system.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/managed_surface.h"
|
||||
@@ -984,7 +985,7 @@ public:
|
||||
for (int g = 255; g >= 0; g = (g == 255 ? 128 : (g == 128 ? 0 : -1))) {
|
||||
for (int b = 255; b >= 0; b = (b == 255 ? 128 : (b == 128 ? 0 : -1))) {
|
||||
for (int flipping = 0; flipping <= 3; flipping++) {
|
||||
for (int rect = 0; rect < (int)(sizeof(srcs)/sizeof(srcs[0])); rect++) {
|
||||
for (int rect = 0; rect < ARRAYSIZE(srcs); rect++) {
|
||||
oldSurfDest.fillRect(Common::Rect(0, 0, oldSurfDest.w, oldSurfDest.h), oldSurfDest.format.ARGBToColor(ba, br, bg, bb));
|
||||
oldSurf._alphaMode = (Graphics::AlphaType)alphaType;
|
||||
oldSurf.blit(oldSurfDest, dsts[rect].left, dsts[rect].top, flipping, &srcs[rect], MS_ARGB(a, r, g, b), dsts[rect].width(), dsts[rect].height(), (Graphics::TSpriteBlendMode)blendMode);
|
||||
|
||||
Reference in New Issue
Block a user