samples/mak/insaner
insaner.abs
55 lines of ArcBasic. Words in colour that are commands link to their help page. To run it, download ArcBasic, open the file and press F5.
Global info1$="Insaner demo!"Global info2$="Arrow keys pan, A/Z zoom"Global info3$="space to toggle hardware multitexturing"Global info4$="Features multitextured dynamic LOD terrain"Include "../start.abs"terrain=LoadTerrain( "hmap.bmp" )TerrainDetail terrain,500,TruePositionEntity terrain,-128,0,-128ScaleEntity terrain,1,50,1EntityFX terrain,1;setup multitexturing:;;dest=( ( (rock-grass) * track ) + grass ) * lighting;tex0=LoadTexture( "CrackedStone_diff.bmp" )ScaleTexture tex0,16,16tex1=LoadTexture( "track.bmp" )ScaleTexture tex1,256,256tex2=LoadTexture( "MossyGround.bmp" )ScaleTexture tex2,16,16TextureBlend tex2,3tex3=LoadTexture( "lmap.bmp" )ScaleTexture tex3,256,256EntityTexture terrain,tex0,0,0EntityTexture terrain,tex1,0,1EntityTexture terrain,tex2,0,2EntityTexture terrain,tex3,0,3camera=CreateCamera()PositionEntity camera,0,200,0RotateEntity camera,90,0,0hwmt=TrueHWMultiTex hwmtWhile Not KeyHit(1) If KeyHit(17) wire=Not wire:WireFrame wire If KeyHit(57) hwmt=Not hwmt:HWMultiTex hwmt If KeyDown(30) TranslateEntity camera,0,-2,0 If KeyDown(44) TranslateEntity camera,0,+2,0 If KeyDown(203) TranslateEntity camera,-2,0,0 If KeyDown(205) TranslateEntity camera,+2,0,0 If KeyDown(200) TranslateEntity camera,0,0,+2 If KeyDown(208) TranslateEntity camera,0,0,-2 UpdateWorld RenderWorld Text 0,0,"HWMultiTex "+hwmt FlipWendEnd
