mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
42010f8f429846dc07f2b1ca874bcb6510f608e0
This patch fixes a regression caused by commit6b1a7ebce6. When you spawn a crewmate with an invalid color, by doing something like `createentity(100,100,18,-1,0)` (here the color is -1, which is invalid), a white crewmate with the color of solid white (255, 255, 255) would appear. That is, until AllyTally came along and committed commit6b1a7ebce6(Make "[Press ENTER to return to editor]" fade out after a bit) (PR #158). Then after that commit, it would seem like the crewmate didn't appear, but in reality they were just invisible, because they had an invisible color. As part of Ally's changes, to properly support drawing text with a certain amount of alpha, she made BlitSurfaceColoured() account for the alpha of the color given instead of only caring about the RGB of the color, discarding the alpha, and using the alpha of the surface it was drawing instead. This effectively made it so the alpha of whatever it was drawing would be 255 all the time, except for if you had custom textures and your custom textures had translucent pixels. However, the default color set by Graphics::setcol() if you didn't provide a valid color index was 0xFFFFFF. Which is only (255, 255, 255) but ends up having an alpha value of 0 (because it's actually 0x00FFFFFF). And all colors drawn with alpha 0 end up being drawn with alpha 0 after6b1a7ebce6. So invalid-colored entities will end up being invisible. To fix this, I just decided to add alpha to the default value instead. In addition, I used getRGB() to be consistent with all the other colors in the function.
This is the source code to VVVVVV, version 2.0+. For more context about this release, see the announcement on Terry's blog!
License
VVVVVV's source code is made available under a custom license. See LICENSE.md for more details.
In general, if you're interested in creating something that falls outside the license terms, get in touch with Terry and we'll talk about it!
Authors
- Created by Terry Cavanagh
- Room Names by Bennett Foddy
- Music by Magnus Pålsson
- Metal Soundtrack by FamilyJules
- 2.0 Update (C++ Port) by Simon Roth
- 2.2 Update (SDL2/PhysicsFS/Steamworks port) by Ethan Lee
- Beta Testing by Sam Kaplan and Pauli Kohberger
- Ending Picture by Pauli Kohberger
Versions
There are two versions of the VVVVVV source code available - the desktop version (based on the C++ port, and currently live on Steam), and the mobile version (based on a fork of the original flash source code, and currently live on iOS and Android).
Description
Languages
ActionScript
54.4%
C++
44.3%
C
0.7%
Java
0.4%
CMake
0.2%