video card wip for virtual computer

Former-commit-id: 3c71eb0e8614e92e63fd3b29906a3cfd311c916f
Former-commit-id: 3472d6eb7d03a29bfd859e9207f76aeb23cef89b
This commit is contained in:
Song Minjae
2017-02-09 22:18:27 +09:00
parent 9ddf0dee63
commit bd58c9e40b
5 changed files with 485 additions and 41 deletions

View File

@@ -18,7 +18,7 @@ object FeaturesDrawer {
private val ENV_COLTEMP_LOWEST = 5500
private val ENV_COLTEMP_HIGHEST = 7500
val ENV_COLTEMP_NOON = 6500 // 6500 == sRGB White == untouched!
val ENV_COLTEMP_NOON = 6500 // 6500 == sRGB White; do not touch!
var colTemp: Int = 0
private set
@@ -39,6 +39,10 @@ object FeaturesDrawer {
fun render(gc: GameContainer, g: Graphics) {
}
/**
* A colour filter used to provide effect that makes whole screen look warmer/cooler,
* usually targeted for the environmental temperature (desert/winterland), hence the name.
*/
fun drawEnvOverlay(g: Graphics) {
val onscreen_tiles_max = FastMath.ceil(Terrarum.HEIGHT * Terrarum.WIDTH / FastMath.sqr(TILE_SIZE.toFloat())) * 2
val onscreen_tiles_cap = onscreen_tiles_max / 4f
@@ -53,7 +57,6 @@ object FeaturesDrawer {
blendMul()
g.color = ColourTemp(colTemp)
//g.color = getColourFromMap(3022)
g.fillRect(
MapCamera.x * zoom,
MapCamera.y * zoom,