theCEED.com - Research your Interests!!
  • MEMBERSHIP PROFILE
  • bar
  • No member information.
  • login_button
  • sign_up_button
no_image

Fun Coding Contest

About the ceed

재밌는 코딩 대회 페이지입니다 :)

대회 일정 및 소개[클릭하세요]
Recommend : 9 I Total List : 58 I 2017-01-09
favorite
테라리아 만들기 게임 001 2017.01.23 18:47:39
Nickname : 1. 그럴수도있어 Recommend : 0 View : 239 btn_recommend.png declaration

Please enter reasons of report.

declaration

이미지 로딩!

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.text.AbstractDocument.Content;
import java.awt.event.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
class WorldriaEx extends JFrame
{
    BufferedImage[][] tex=new BufferedImage[16][16];
    BufferedImage towie;
    Container contentpane;
    int map[][]=new int[300][3000];
    int cX=1500,cY=15,c1=cX,c2=cY;
    JButton[][] picLabel=new JButton[20][30];
    Container contentPane;
    class ImagesLoader{
        ImagesLoader()
        {
            BufferedImage WholeTexture = null;
            try {
                WholeTexture = ImageIO.read(new File("textures/terrain_765082.png"));
                towie=ImageIO.read(new File("Backgrounds/Background.jpg"));
            }catch(IOException e){System.out.println("Image Texture Loading Error");}
            for(int i=0;i<16;i++)
            {
                for(int j=0;j<16;j++)
                {
                    BufferedImage xy2 = WholeTexture.getSubimage(32*i,32*j,32,32);
                    int type = xy2.getType() == 0? BufferedImage.TYPE_INT_ARGB : xy2.getType();
                    BufferedImage resizedImage = new BufferedImage(20,20,type);
                    Graphics2D g = resizedImage.createGraphics();
                    g.drawImage(xy2,0,0,20,20,null);
                    g.dispose();
                    tex[j][i]=resizedImage;
//                  File outputfile = new File("textures/0"+(i*16+j)+".jpg");
//                  try{
//                      ImageIO.write(tex[i][j], "png", outputfile);
//                  }catch(IOException e){}
                }
            }
 
        }
    }
}
cs

 

list
Comments

name

write a comment
TOTAL  1 Comments
namealphablade 2017-01-23 21:49:01
ㅋㅋㅋㅋ