mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
Fix typos (thanks @qndel!)
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb)
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
libm \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
video/khronos \
video/x11/edid.h \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
This commit is contained in:
@@ -454,11 +454,11 @@ static void PoofThing_ondrag(Thing *thing, int button, float x, float y)
|
||||
static void PoofThing_ontick(Thing *thing, Uint64 now)
|
||||
{
|
||||
const int lifetime = POOF_LIFETIME;
|
||||
const int elasped = (int) (now - thing->createticks);
|
||||
if (elasped > lifetime) {
|
||||
const int elapsed = (int) (now - thing->createticks);
|
||||
if (elapsed > lifetime) {
|
||||
DestroyThing(thing);
|
||||
} else {
|
||||
const float pct = ((float) elasped) / ((float) lifetime);
|
||||
const float pct = ((float) elapsed) / ((float) lifetime);
|
||||
thing->a = (Uint8) (int) (255.0f - (pct * 255.0f));
|
||||
thing->scale = 1.0f - pct; /* shrink to nothing! */
|
||||
}
|
||||
@@ -962,13 +962,13 @@ static void PhysicalDeviceThing_ondrop(Thing *thing, int button, float x, float
|
||||
static void PhysicalDeviceThing_ontick(Thing *thing, Uint64 now)
|
||||
{
|
||||
const int lifetime = POOF_LIFETIME;
|
||||
const int elasped = (int) (now - thing->createticks);
|
||||
if (elasped > lifetime) {
|
||||
const int elapsed = (int) (now - thing->createticks);
|
||||
if (elapsed > lifetime) {
|
||||
thing->scale = 1.0f;
|
||||
thing->a = 255;
|
||||
thing->ontick = NULL; /* no more ticking. */
|
||||
} else {
|
||||
const float pct = ((float) elasped) / ((float) lifetime);
|
||||
const float pct = ((float) elapsed) / ((float) lifetime);
|
||||
thing->a = (Uint8) (int) (pct * 255.0f);
|
||||
thing->scale = pct; /* grow to normal size */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user