Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (727)
Games in Android Showcase (217)
games submitted by our members
Games in WIP (796)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
  JavaGaming.org - Pastebin



Author: Rayvolution (posted 2014-06-17 03:48:20, viewed 145 times)

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19  
int displayHeight = Display.getHeight()/3;
      int displayWidth = Display.getWidth()/3;
      g.clearAlphaMap();
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
      lightSky.draw(0,0,lightLevel);
      light.startUse();
      for (int x = 0; x < mapWidth; x++) {
         for (int y = 0; y < mapHeight; y++) {
            if ((x*8+mapX > -10) && (x*8+mapX < displayWidth+10) && (y*8+mapY > -10) && (y*8+mapY < displayHeight+10)){
               if (!(lightValue[x][y] == 0)){
                  light.drawEmbedded((x*8)-12+mapX, (y*8)-12+mapY, (x*8)-12+mapX+32, (y*8)-12+mapY+32, 0, 0, 32, 32, colorRange[lightValue[x][y]]);
               }
            }
         }
      }
      light.endUse();
      GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_DST_ALPHA);
      g.fillRect(0, 0, displayWidth+16, displayHeight+16);
      g.setDrawMode(Graphics.MODE_NORMAL);





Dump your java code here :



Special syntax:
  • To highlight a line (yellow background), prefix it with '@@'
  • To indicate that a line should be removed (red background), prefix it with '-'
  • To indicate that a line should be added (green background), prefix it with '+'
  • To post multiple snippets, seperate them by '~~~~'
  EOF
 
Archive (298 views)
2017-04-27 17:45:51

buddyBro (486 views)
2017-04-05 03:38:00

CopyableCougar4 (930 views)
2017-03-24 15:39:42

theagentd (944 views)
2017-03-24 15:32:08

Rule (954 views)
2017-03-19 12:43:22

Rule (923 views)
2017-03-19 12:42:17

Rule (925 views)
2017-03-19 12:36:21

theagentd (986 views)
2017-03-16 05:07:07

theagentd (899 views)
2017-03-15 22:37:06

theagentd (695 views)
2017-03-15 22:32:18
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!