diff --git a/cmd/tins2020/res/images/cactus_short_NE.png b/cmd/tins2020/res/images/cactus_short_NE.png index 868501b..69c65ec 100644 Binary files a/cmd/tins2020/res/images/cactus_short_NE.png and b/cmd/tins2020/res/images/cactus_short_NE.png differ diff --git a/cmd/tins2020/res/images/cactus_short_NW.png b/cmd/tins2020/res/images/cactus_short_NW.png index 519219a..73b2496 100644 Binary files a/cmd/tins2020/res/images/cactus_short_NW.png and b/cmd/tins2020/res/images/cactus_short_NW.png differ diff --git a/cmd/tins2020/res/images/cactus_short_SE.png b/cmd/tins2020/res/images/cactus_short_SE.png index 2fdd423..a449000 100644 Binary files a/cmd/tins2020/res/images/cactus_short_SE.png and b/cmd/tins2020/res/images/cactus_short_SE.png differ diff --git a/cmd/tins2020/res/images/cactus_short_SW.png b/cmd/tins2020/res/images/cactus_short_SW.png index 5fcd84c..e3b10e1 100644 Binary files a/cmd/tins2020/res/images/cactus_short_SW.png and b/cmd/tins2020/res/images/cactus_short_SW.png differ diff --git a/cmd/tins2020/res/images/cactus_tall_NE.png b/cmd/tins2020/res/images/cactus_tall_NE.png index 56f8228..4fa2e11 100644 Binary files a/cmd/tins2020/res/images/cactus_tall_NE.png and b/cmd/tins2020/res/images/cactus_tall_NE.png differ diff --git a/cmd/tins2020/res/images/cactus_tall_NW.png b/cmd/tins2020/res/images/cactus_tall_NW.png index 3ce288d..8ae38be 100644 Binary files a/cmd/tins2020/res/images/cactus_tall_NW.png and b/cmd/tins2020/res/images/cactus_tall_NW.png differ diff --git a/cmd/tins2020/res/images/cactus_tall_SE.png b/cmd/tins2020/res/images/cactus_tall_SE.png index e358c89..2b31b3a 100644 Binary files a/cmd/tins2020/res/images/cactus_tall_SE.png and b/cmd/tins2020/res/images/cactus_tall_SE.png differ diff --git a/cmd/tins2020/res/images/cactus_tall_SW.png b/cmd/tins2020/res/images/cactus_tall_SW.png index 4aa12fd..dea5a53 100644 Binary files a/cmd/tins2020/res/images/cactus_tall_SW.png and b/cmd/tins2020/res/images/cactus_tall_SW.png differ diff --git a/cmd/tins2020/res/images/flower_purpleA_NE.png b/cmd/tins2020/res/images/flower_purpleA_NE.png index 08c992b..0b7be51 100644 Binary files a/cmd/tins2020/res/images/flower_purpleA_NE.png and b/cmd/tins2020/res/images/flower_purpleA_NE.png differ diff --git a/cmd/tins2020/res/images/flower_purpleA_NE_disabled.png b/cmd/tins2020/res/images/flower_purpleA_NE_disabled.png index 36644e2..f4945fc 100644 Binary files a/cmd/tins2020/res/images/flower_purpleA_NE_disabled.png and b/cmd/tins2020/res/images/flower_purpleA_NE_disabled.png differ diff --git a/cmd/tins2020/res/images/flower_purpleA_NW.png b/cmd/tins2020/res/images/flower_purpleA_NW.png index 25fbed6..b9f264a 100644 Binary files a/cmd/tins2020/res/images/flower_purpleA_NW.png and b/cmd/tins2020/res/images/flower_purpleA_NW.png differ diff --git a/cmd/tins2020/res/images/flower_purpleA_SE.png b/cmd/tins2020/res/images/flower_purpleA_SE.png index 1bb75cc..8235ee7 100644 Binary files a/cmd/tins2020/res/images/flower_purpleA_SE.png and b/cmd/tins2020/res/images/flower_purpleA_SE.png differ diff --git a/cmd/tins2020/res/images/flower_purpleA_SW.png b/cmd/tins2020/res/images/flower_purpleA_SW.png index a2547d0..5700b5d 100644 Binary files a/cmd/tins2020/res/images/flower_purpleA_SW.png and b/cmd/tins2020/res/images/flower_purpleA_SW.png differ diff --git a/cmd/tins2020/res/images/flower_purpleC_NE.png b/cmd/tins2020/res/images/flower_purpleC_NE.png index ddf8b1f..97241d4 100644 Binary files a/cmd/tins2020/res/images/flower_purpleC_NE.png and b/cmd/tins2020/res/images/flower_purpleC_NE.png differ diff --git a/cmd/tins2020/res/images/flower_purpleC_NE_disabled.png b/cmd/tins2020/res/images/flower_purpleC_NE_disabled.png index a585a57..4f1e32c 100644 Binary files a/cmd/tins2020/res/images/flower_purpleC_NE_disabled.png and b/cmd/tins2020/res/images/flower_purpleC_NE_disabled.png differ diff --git a/cmd/tins2020/res/images/flower_purpleC_NW.png b/cmd/tins2020/res/images/flower_purpleC_NW.png index 0bd8687..05489ee 100644 Binary files a/cmd/tins2020/res/images/flower_purpleC_NW.png and b/cmd/tins2020/res/images/flower_purpleC_NW.png differ diff --git a/cmd/tins2020/res/images/flower_purpleC_SE.png b/cmd/tins2020/res/images/flower_purpleC_SE.png index e8f91e6..6820d41 100644 Binary files a/cmd/tins2020/res/images/flower_purpleC_SE.png and b/cmd/tins2020/res/images/flower_purpleC_SE.png differ diff --git a/cmd/tins2020/res/images/flower_purpleC_SW.png b/cmd/tins2020/res/images/flower_purpleC_SW.png index 2b0d6a3..f02cc17 100644 Binary files a/cmd/tins2020/res/images/flower_purpleC_SW.png and b/cmd/tins2020/res/images/flower_purpleC_SW.png differ diff --git a/cmd/tins2020/res/images/flower_redA_NE.png b/cmd/tins2020/res/images/flower_redA_NE.png index dfbfe92..474fb74 100644 Binary files a/cmd/tins2020/res/images/flower_redA_NE.png and b/cmd/tins2020/res/images/flower_redA_NE.png differ diff --git a/cmd/tins2020/res/images/flower_redA_NE_disabled.png b/cmd/tins2020/res/images/flower_redA_NE_disabled.png index 593c473..065df14 100644 Binary files a/cmd/tins2020/res/images/flower_redA_NE_disabled.png and b/cmd/tins2020/res/images/flower_redA_NE_disabled.png differ diff --git a/cmd/tins2020/res/images/flower_redA_NW.png b/cmd/tins2020/res/images/flower_redA_NW.png index 36992c9..e4b1979 100644 Binary files a/cmd/tins2020/res/images/flower_redA_NW.png and b/cmd/tins2020/res/images/flower_redA_NW.png differ diff --git a/cmd/tins2020/res/images/flower_redA_SE.png b/cmd/tins2020/res/images/flower_redA_SE.png index 2cdf374..7a29449 100644 Binary files a/cmd/tins2020/res/images/flower_redA_SE.png and b/cmd/tins2020/res/images/flower_redA_SE.png differ diff --git a/cmd/tins2020/res/images/flower_redA_SW.png b/cmd/tins2020/res/images/flower_redA_SW.png index 0d6e6f1..c695946 100644 Binary files a/cmd/tins2020/res/images/flower_redA_SW.png and b/cmd/tins2020/res/images/flower_redA_SW.png differ diff --git a/cmd/tins2020/res/images/flower_redC_NE.png b/cmd/tins2020/res/images/flower_redC_NE.png index bd6c52a..475e645 100644 Binary files a/cmd/tins2020/res/images/flower_redC_NE.png and b/cmd/tins2020/res/images/flower_redC_NE.png differ diff --git a/cmd/tins2020/res/images/flower_redC_NE_disabled.png b/cmd/tins2020/res/images/flower_redC_NE_disabled.png index f19b2c1..75e22ac 100644 Binary files a/cmd/tins2020/res/images/flower_redC_NE_disabled.png and b/cmd/tins2020/res/images/flower_redC_NE_disabled.png differ diff --git a/cmd/tins2020/res/images/flower_redC_NW.png b/cmd/tins2020/res/images/flower_redC_NW.png index 5b42412..a81072d 100644 Binary files a/cmd/tins2020/res/images/flower_redC_NW.png and b/cmd/tins2020/res/images/flower_redC_NW.png differ diff --git a/cmd/tins2020/res/images/flower_redC_SE.png b/cmd/tins2020/res/images/flower_redC_SE.png index b5ef786..1cf53b4 100644 Binary files a/cmd/tins2020/res/images/flower_redC_SE.png and b/cmd/tins2020/res/images/flower_redC_SE.png differ diff --git a/cmd/tins2020/res/images/flower_redC_SW.png b/cmd/tins2020/res/images/flower_redC_SW.png index 2782955..bb03b86 100644 Binary files a/cmd/tins2020/res/images/flower_redC_SW.png and b/cmd/tins2020/res/images/flower_redC_SW.png differ diff --git a/cmd/tins2020/res/images/flower_yellowC_NE.png b/cmd/tins2020/res/images/flower_yellowC_NE.png index f7342eb..b802fe2 100644 Binary files a/cmd/tins2020/res/images/flower_yellowC_NE.png and b/cmd/tins2020/res/images/flower_yellowC_NE.png differ diff --git a/cmd/tins2020/res/images/flower_yellowC_NE_disabled.png b/cmd/tins2020/res/images/flower_yellowC_NE_disabled.png index a74d37a..0627989 100644 Binary files a/cmd/tins2020/res/images/flower_yellowC_NE_disabled.png and b/cmd/tins2020/res/images/flower_yellowC_NE_disabled.png differ diff --git a/cmd/tins2020/res/images/flower_yellowC_NW.png b/cmd/tins2020/res/images/flower_yellowC_NW.png index 4150213..a8c8859 100644 Binary files a/cmd/tins2020/res/images/flower_yellowC_NW.png and b/cmd/tins2020/res/images/flower_yellowC_NW.png differ diff --git a/cmd/tins2020/res/images/flower_yellowC_SE.png b/cmd/tins2020/res/images/flower_yellowC_SE.png index 02f9ff4..ae9417c 100644 Binary files a/cmd/tins2020/res/images/flower_yellowC_SE.png and b/cmd/tins2020/res/images/flower_yellowC_SE.png differ diff --git a/cmd/tins2020/res/images/flower_yellowC_SW.png b/cmd/tins2020/res/images/flower_yellowC_SW.png index 77e528d..99f79f1 100644 Binary files a/cmd/tins2020/res/images/flower_yellowC_SW.png and b/cmd/tins2020/res/images/flower_yellowC_SW.png differ diff --git a/cmd/tins2020/res/images/grass_NE.png b/cmd/tins2020/res/images/grass_NE.png index df6feaa..91d0518 100644 Binary files a/cmd/tins2020/res/images/grass_NE.png and b/cmd/tins2020/res/images/grass_NE.png differ diff --git a/cmd/tins2020/res/images/grass_NW.png b/cmd/tins2020/res/images/grass_NW.png index 1aaf997..30da122 100644 Binary files a/cmd/tins2020/res/images/grass_NW.png and b/cmd/tins2020/res/images/grass_NW.png differ diff --git a/cmd/tins2020/res/images/grass_SE.png b/cmd/tins2020/res/images/grass_SE.png index 30793dd..0e53313 100644 Binary files a/cmd/tins2020/res/images/grass_SE.png and b/cmd/tins2020/res/images/grass_SE.png differ diff --git a/cmd/tins2020/res/images/grass_SW.png b/cmd/tins2020/res/images/grass_SW.png index 6901057..40c652b 100644 Binary files a/cmd/tins2020/res/images/grass_SW.png and b/cmd/tins2020/res/images/grass_SW.png differ diff --git a/cmd/tins2020/res/images/grass_leafs_NE.png b/cmd/tins2020/res/images/grass_leafs_NE.png index 475ae3c..8cfe3de 100644 Binary files a/cmd/tins2020/res/images/grass_leafs_NE.png and b/cmd/tins2020/res/images/grass_leafs_NE.png differ diff --git a/cmd/tins2020/res/images/grass_leafs_NW.png b/cmd/tins2020/res/images/grass_leafs_NW.png index ba7a9f2..08bbb52 100644 Binary files a/cmd/tins2020/res/images/grass_leafs_NW.png and b/cmd/tins2020/res/images/grass_leafs_NW.png differ diff --git a/cmd/tins2020/res/images/grass_leafs_SE.png b/cmd/tins2020/res/images/grass_leafs_SE.png index ae728ea..bc862c9 100644 Binary files a/cmd/tins2020/res/images/grass_leafs_SE.png and b/cmd/tins2020/res/images/grass_leafs_SE.png differ diff --git a/cmd/tins2020/res/images/grass_leafs_SW.png b/cmd/tins2020/res/images/grass_leafs_SW.png index ca22418..56bc2b7 100644 Binary files a/cmd/tins2020/res/images/grass_leafs_SW.png and b/cmd/tins2020/res/images/grass_leafs_SW.png differ diff --git a/cmd/tins2020/res/images/plant_bushLarge_NE.png b/cmd/tins2020/res/images/plant_bushLarge_NE.png index 62b7c4a..c689979 100644 Binary files a/cmd/tins2020/res/images/plant_bushLarge_NE.png and b/cmd/tins2020/res/images/plant_bushLarge_NE.png differ diff --git a/cmd/tins2020/res/images/plant_bushLarge_NW.png b/cmd/tins2020/res/images/plant_bushLarge_NW.png index 3260225..8caba96 100644 Binary files a/cmd/tins2020/res/images/plant_bushLarge_NW.png and b/cmd/tins2020/res/images/plant_bushLarge_NW.png differ diff --git a/cmd/tins2020/res/images/plant_bushLarge_SE.png b/cmd/tins2020/res/images/plant_bushLarge_SE.png index a78294a..594e744 100644 Binary files a/cmd/tins2020/res/images/plant_bushLarge_SE.png and b/cmd/tins2020/res/images/plant_bushLarge_SE.png differ diff --git a/cmd/tins2020/res/images/plant_bushLarge_SW.png b/cmd/tins2020/res/images/plant_bushLarge_SW.png index 1fe2d3d..449e3fe 100644 Binary files a/cmd/tins2020/res/images/plant_bushLarge_SW.png and b/cmd/tins2020/res/images/plant_bushLarge_SW.png differ diff --git a/cmd/tins2020/res/images/plant_bushSmall_NE.png b/cmd/tins2020/res/images/plant_bushSmall_NE.png index d5c4025..1921565 100644 Binary files a/cmd/tins2020/res/images/plant_bushSmall_NE.png and b/cmd/tins2020/res/images/plant_bushSmall_NE.png differ diff --git a/cmd/tins2020/res/images/plant_bushSmall_NW.png b/cmd/tins2020/res/images/plant_bushSmall_NW.png index 5e58d5b..b6ab42e 100644 Binary files a/cmd/tins2020/res/images/plant_bushSmall_NW.png and b/cmd/tins2020/res/images/plant_bushSmall_NW.png differ diff --git a/cmd/tins2020/res/images/plant_bushSmall_SE.png b/cmd/tins2020/res/images/plant_bushSmall_SE.png index 5e58d5b..b6ab42e 100644 Binary files a/cmd/tins2020/res/images/plant_bushSmall_SE.png and b/cmd/tins2020/res/images/plant_bushSmall_SE.png differ diff --git a/cmd/tins2020/res/images/plant_bushSmall_SW.png b/cmd/tins2020/res/images/plant_bushSmall_SW.png index d5c4025..1921565 100644 Binary files a/cmd/tins2020/res/images/plant_bushSmall_SW.png and b/cmd/tins2020/res/images/plant_bushSmall_SW.png differ diff --git a/cmd/tins2020/res/images/tile_dirt.png b/cmd/tins2020/res/images/tile_dirt.png index 6195e9d..6928958 100644 Binary files a/cmd/tins2020/res/images/tile_dirt.png and b/cmd/tins2020/res/images/tile_dirt.png differ diff --git a/cmd/tins2020/res/images/tile_grass.png b/cmd/tins2020/res/images/tile_grass.png index 83fbe33..bdfe161 100644 Binary files a/cmd/tins2020/res/images/tile_grass.png and b/cmd/tins2020/res/images/tile_grass.png differ diff --git a/cmd/tins2020/res/images/tile_hover.png b/cmd/tins2020/res/images/tile_hover.png index efea337..6065448 100644 Binary files a/cmd/tins2020/res/images/tile_hover.png and b/cmd/tins2020/res/images/tile_hover.png differ diff --git a/cmd/tins2020/res/images/tile_snow.png b/cmd/tins2020/res/images/tile_snow.png index 376a66c..9f6c9d6 100644 Binary files a/cmd/tins2020/res/images/tile_snow.png and b/cmd/tins2020/res/images/tile_snow.png differ diff --git a/cmd/tins2020/res/images/tree_fat_NE.png b/cmd/tins2020/res/images/tree_fat_NE.png index f35a819..937e7fa 100644 Binary files a/cmd/tins2020/res/images/tree_fat_NE.png and b/cmd/tins2020/res/images/tree_fat_NE.png differ diff --git a/cmd/tins2020/res/images/tree_fat_NW.png b/cmd/tins2020/res/images/tree_fat_NW.png index 66861e8..26f3b74 100644 Binary files a/cmd/tins2020/res/images/tree_fat_NW.png and b/cmd/tins2020/res/images/tree_fat_NW.png differ diff --git a/cmd/tins2020/res/images/tree_fat_SE.png b/cmd/tins2020/res/images/tree_fat_SE.png index 66861e8..26f3b74 100644 Binary files a/cmd/tins2020/res/images/tree_fat_SE.png and b/cmd/tins2020/res/images/tree_fat_SE.png differ diff --git a/cmd/tins2020/res/images/tree_fat_SW.png b/cmd/tins2020/res/images/tree_fat_SW.png index f35a819..937e7fa 100644 Binary files a/cmd/tins2020/res/images/tree_fat_SW.png and b/cmd/tins2020/res/images/tree_fat_SW.png differ diff --git a/cmd/tins2020/res/images/tree_pineDefaultA_NE.png b/cmd/tins2020/res/images/tree_pineDefaultA_NE.png index 50781cf..2ea1847 100644 Binary files a/cmd/tins2020/res/images/tree_pineDefaultA_NE.png and b/cmd/tins2020/res/images/tree_pineDefaultA_NE.png differ diff --git a/cmd/tins2020/res/images/tree_pineDefaultA_NW.png b/cmd/tins2020/res/images/tree_pineDefaultA_NW.png index 5fd449a..22d6a91 100644 Binary files a/cmd/tins2020/res/images/tree_pineDefaultA_NW.png and b/cmd/tins2020/res/images/tree_pineDefaultA_NW.png differ diff --git a/cmd/tins2020/res/images/tree_pineDefaultA_SE.png b/cmd/tins2020/res/images/tree_pineDefaultA_SE.png index 74678b2..1c982f2 100644 Binary files a/cmd/tins2020/res/images/tree_pineDefaultA_SE.png and b/cmd/tins2020/res/images/tree_pineDefaultA_SE.png differ diff --git a/cmd/tins2020/res/images/tree_pineDefaultA_SW.png b/cmd/tins2020/res/images/tree_pineDefaultA_SW.png index d40bac6..64723d2 100644 Binary files a/cmd/tins2020/res/images/tree_pineDefaultA_SW.png and b/cmd/tins2020/res/images/tree_pineDefaultA_SW.png differ diff --git a/gamecontrols.go b/gamecontrols.go index d4c877d..d2dceda 100644 --- a/gamecontrols.go +++ b/gamecontrols.go @@ -60,7 +60,7 @@ func (b *ButtonBar) Render(ctx *Context) { for i, button := range b.Buttons { pos := Pt(b.Left, b.Top+int32(i)*buttonBarWidth) texture := texture(button) - texture.Copy(ctx.Renderer, &sdl.Rect{X: pos.X, Y: pos.Y, W: buttonBarWidth, H: buttonBarWidth}) + texture.Copy(ctx.Renderer, &sdl.Rect{X: pos.X, Y: pos.Y - 40, W: buttonBarWidth, H: 120}) if b.Hover == i { hoverTexture.Copy(ctx.Renderer, hoverTexture.RectOffset(pos)) } diff --git a/projection.go b/projection.go index dd4cb2d..c58e057 100644 --- a/projection.go +++ b/projection.go @@ -21,7 +21,7 @@ type projection struct { } func newProjection() projection { - return projection{zoom: 1, tileScreenDelta: PtF(65, 32), tileScreenDeltaInv: PtF(1./65, 1./32)} + return projection{zoom: 1, tileScreenDelta: PtF(64, 32), tileScreenDeltaInv: PtF(1./64, 1./32)} } func (p *projection) mapToScreen(x, y int32) Point { @@ -30,7 +30,7 @@ func (p *projection) mapToScreen(x, y int32) Point { func (p *projection) mapToScreenF(x, y float32) Point { translated := PtF(x-p.center.X, y-p.center.Y) - return Pt(p.windowCenter.X+int32((translated.X-translated.Y)*65*p.zoomInv), p.windowCenter.Y+int32((translated.X+translated.Y)*32*p.zoomInv)) + return Pt(p.windowCenter.X+int32((translated.X-translated.Y)*64*p.zoomInv), p.windowCenter.Y+int32((translated.X+translated.Y)*32*p.zoomInv)) } func (p *projection) screenToMap(x, y int32) PointF { @@ -55,9 +55,9 @@ func (p *projection) screenToTileRect(pos Point) *sdl.Rect { func (p *projection) update(renderer *sdl.Renderer) { p.zoomInv = 1 / p.zoom - p.tileScreenOffset = Pt(int32(p.zoomInv*256), int32(p.zoomInv*300)) - p.tileScreenSize = Pt(int32(p.zoomInv*512), int32(p.zoomInv*512)) - p.tileFitScreenSize = Pt(int32(p.zoomInv*65), int32(p.zoomInv*32)) + p.tileScreenOffset = Pt(int32(p.zoomInv*64), int32(p.zoomInv*112)) + p.tileScreenSize = Pt(int32(p.zoomInv*128), int32(p.zoomInv*160)) + p.tileFitScreenSize = Pt(int32(p.zoomInv*64), int32(p.zoomInv*32)) windowW, windowH, err := renderer.GetOutputSize() if err != nil { diff --git a/terrainrenderer.go b/terrainrenderer.go index 4e7e00d..e436dde 100644 --- a/terrainrenderer.go +++ b/terrainrenderer.go @@ -149,8 +149,9 @@ func (r *terrainRenderer) Render(ctx *Context) { return toPropTexture(temp, humid, variant) } - // horizontal: [191, 321) = 130 - // vertical: [267,332) = 65 + // horizontal: [0, 128) = 128 + // vertical (tile): [96,160) = 64 + // vertical (total): [0,160) = 160 r.project.visibleTiles(func(x, y int32, pos Point) { text := toTileTexture(x, y)