8/18/2009

Creating 3d data values for drawing ground


To create 3d data values for drawing ground have to calculate from center (0f, 0f, 0f). The left picture shows the four parts which are divided by center.
Every x and y values are increased and decreased by 1.0 or -1.0 except z values. The increase and decrease values have a same pattern. According many OpenGL examples from Internet, we can draw rectangle with 4 vertex points. Each vertex point has x, y and z value. Therefore, the program has to generate rectangle points’ value. Of course, the generated file has also color values.

int main(int argc, char **argv)
{
int nwidth = atoi(argv[1]);
int nheight = atoi(argv[2]);

fnCVertextFile(nheight, nwidth);
}

Example) program 8 8
When the program was executed like an example, then the vector values will be generated 16 * 16 sizes.

typedef struct {
float x, y, z;
} M3DPoint;

typedef struct {
M3DPoint left, top, right, bottom;
} M3DRect;

// the function writes structure values and string values to file.
void fprintfex(FILE *fvfile, M3DRect row1, char *value)
{
fprintf(fvfile, "%f %f %f %s\n", row1.left.x, row1.left.y, row1.left.z, value);
fprintf(fvfile, "%f %f %f %s\n", row1.top.x, row1.top.y, row1.top.z, value);
fprintf(fvfile, "%f %f %f %s\n", row1.right.x, row1.right.y, row1.right.z, value);
fprintf(fvfile, "%f %f %f %s\n", row1.bottom.x, row1.bottom.y, row1.bottom.z, value);
}

void fnCVertextFile(int aRow, int aColumn)
{
M3DRect row1;

float nleft = 0.0f;
float ntop = 0.0f;

char value1[] = {"0.3 0.3 0.3"};
char value2[] = {"0.5 0.5 0.5"};
char *value;
bool toggle = false;

FILE *fvfile = fopen("vector.dat", "w");
if(fvfile == NULL) {
printf("file cannot open!\n");
exit(-1);
}

// count of vertex
fprintf(fvfile, "%d\n", aRow * aColumn * 4 * 4);

for(int j = 0; j < aRow; j++)
{
for(int i = 0; i < aColumn; i++)
{
row1.left.x = nleft; row1.left.y = ntop; row1.left.z = 1.5f;
row1.top.x = nleft+1.0f; row1.top.y = ntop; row1.top.z = 1.5f;
row1.right.x = nleft+1.0f; row1.right.y = ntop+1.0f; row1.right.z = 1.5f;
row1.bottom.x = nleft; row1.bottom.y = ntop+1.0f; row1.bottom.z = 1.5f;
value = (toggle) ? value1 : value2;
fprintfex(fvfile, row1, value);
toggle = !toggle;
nleft += 1.0f;
}
ntop += 1.0f;
nleft = 0.0f;
toggle = !toggle;
}

// was ommited below section of source

7/02/2009

Now, my second app was included some MIDI sounds.

Until I get Android test device, The second app will be like this.

6/27/2009

Qt4.5.2-tower


Recently, Nokia published the new version of Qt4.5.2-tower which can be operated in many platforms. Previously, I installed the Qt4.5.0-garden for s60 and windows platforms. A couple of days ago, I tried to install S60 5th edition SDK and s60 3rd Feature pack II. I already had N97 0.5 version SDK. The S60 5th edition emulator provided a couple of resolution of mobile screen. So, I uninstalled 3rd edition and N97 edition SDK. Yesterday, I downloaded the Qt4.5.2-tower and I did install process into my old laptop notebook. The install required many things to install the Qt4.5.2-tower. I completed the install process yesterday night due to what I got. I like 2d graphics API. It easily use and so powerful. I am not sure now how an application install into real device. Since I like the emulator and I can launch my testing application into the emulator.

6/21/2009

Qt4.5.0-Garden



For Nokia Application developers, Now They have a little strong development toolkit. ‘Qt4.5.0-garden’ which supports library for s60 mobile makes low a barrier then before. It means S60 mobile application developers can develop application more easy. For me, I was trying to learn about Carbide C++ and S60 library but it gave to me very complex. But Qt garden takes away some complex. To launch an application under S60 emulator, it is very simple. The picture shows my first trying of tutorial which was presented from qt garden prereleased web site. At the moment, I only use text editor called Notepad++, Dos command for building tutorial C++ code and emulator. Of course, there are some things should installed before use Qt garden.

6/19/2009

Translation bitmap image



Bitmap image contains BitmapHeader, pixels data and palette. The palette only need less than 16 bit color bitmap image, so This article will not include. Microsoft Visual studio has BitmapHeader structure in some header files. It also provides some functions which often give developer difficult to understand. Anyone who may has basic knowledge of c++ and the structure of bitmap file will has no problem with this article. The aritcle will touch only Device Independent Bitmap and pixels data are not compressed.

Code begining here // ->>
#include <stdio.h>
#include <stdlib.h>

#pragma pack(1) // get the structure size 54 not 56

typedef struct {
unsigned char bfType1; // fixed 'B'
unsigned char bfType2; // fixed 'M'
unsigned int bfSize; // Size of File. Zero is acceptable
unsigned short bfReserved1; // Zero
unsigned short bfReserved2; // Zero
unsigned int bfOffBits; // Offset to beginning of bitmap
unsigned int biSize; // Number of Bytes in Structure
unsigned int biWidth; // width of bitmap in pixels
unsigned int biHeight; // height of bitmap in pixels
unsigned short biPlanes; // Planes in target device = 1
unsigned short biBitCount; // Bits per Pixel 1, 4, 8, 16, 24, 32
unsigned int biCompression; // BI_RGB = 0, BI_RLE8, BI_RLE4
unsigned int biSizeImage; // Size of Image Part (often ignored)
unsigned int biXPelsPerMeter; // Always Zero
unsigned int biYPelsPerMeter; // Always Zero
unsigned int biClrUsed; // Number of Colors used in Palette
unsigned int biClrImportant; // Number of Colors that are Important
} TBmpHeader;
<<- // Code end here

The pixels data fills the end of bitmap file after bitmap header. The 1 point pixel data consists of red, green and blue color value each. The each color value has the size of 8 bit.

This is a structure for 24 bit color.

Code begining here // ->>
typedef struct {
unsigned char rgbBlue; //intensity of blue in the color
unsigned char rgbGreen; //intensity of green in the color
unsigned char rgbRed; //intensity of red in the color
} TRGB;
<<- // Code end here

32 bit color adds alpha color value which sometimes use calcuration for mixing two images.

Code begining here // ->>
typedef struct {
unsigned char rgbBlue; //intensity of blue in the color
unsigned char rgbGreen; //intensity of green in the color
unsigned char rgbRed; //intensity of red in the color
unsigned char rgbAlpha; //intensity of Alpha in the color
} TRGBA;
<<- // Code end here

This routine fills bitmapheader structure by using width, height and color bit. The third argument is color type. It can use with 16, 24 and 32 value.

Code begin here // ->>
TBmpHeader FillBitmapHeader(unsigned int width, unsigned int height,
unsigned short bitmapType)
{
TBmpHeader MyBitmapHeader;

MyBitmapHeader.bfType1 = 0x42;
MyBitmapHeader.bfType2 = 0x4D;
MyBitmapHeader.bfSize = 0x00000000;
MyBitmapHeader.bfReserved1 = 0x0000;
MyBitmapHeader.bfReserved2 = 0x0000;
MyBitmapHeader.bfOffBits = 0x36; // the location of bitmap data
MyBitmapHeader.biSize = 0x28; // Size of the BItmapHeader

MyBitmapHeader.biWidth = width;
MyBitmapHeader.biHeight = height;
MyBitmapHeader.biPlanes = 0x0001; // Plane target device 1

MyBitmapHeader.biBitCount = bitmapType; // Bits per Pixel 1, 4, 8, 16, 24, 32
MyBitmapHeader.biCompression = 0x00000000; // BI_RGB = 0, BI_RLE8, BI_RLE4

MyBitmapHeader.biSizeImage = 0x00000000;
MyBitmapHeader.biXPelsPerMeter = 0x00000000;
MyBitmapHeader.biYPelsPerMeter = 0x00000000;
MyBitmapHeader.biClrUsed = 0x00000000;
MyBitmapHeader.biClrImportant = 0x00000000;

return MyBitmapHeader;
}
<<- // Code end here

16 bit color can consist 32 bit color but each RGBA color has to decrease there own size half. Therefore, the result image can not avoid color loss.

Code begin here // ->>
void ConvertBmp32to16(const char *srcfname, const char *dstfname)
{
TBmpHeader MyBitmapHeader;
FILE *finput = fopen(srcfname, “rb”);
if(finput == NULL) return;
fread(&MyBitmapHeader, sizeof(TBmpHeader), 1, finput);
TRGBA * rgbdata;
unsigned short *rgbdata16;

int SSize = MyBitmapHeader.biWidth * MyBitmapHeader.biHeight;
int Size = SSize * 4;

rgbdata = (TRGBA *)malloc(Size);

fread(rgbdata, Size, 1, finput);
fclose(finput);

rgbdata16 = (unsigned short *)malloc(SSize*2);

unsigned short r, g, b, a;
for(int i=0; i < SSize; i++) {
b = rgbdata[i].rgbBlue >> 4;
g = rgbdata[i].rgbGreen >> 4;
r = rgbdata[i].rgbRed >> 4;
a = rgbdata[i].rgbAlpha >> 4;
rgbdata16[i] = (r << 12) + (g << 8) + (b << 4) + a;
}

MyBitmapHeader = FillBitmapHeader(MyBitmapHeader.biWidth, MyBitmapHeader.biHeight, 16);

FILE *fpout = fopen(dstfname, “wb”);
if(fpout == NULL) return;
fwrite(&MyBitmapHeader, sizeof(TBmpHeader), 1, fpout);
fwrite(rgbdata16, SSize*2, 1, fpout);
fclose(fpout);
free(rgbdata);
free(rgbdata16);
}
<<- // Code End here

After execute the ConvertBmp32to16() routine, a bitmap image will be generated. The aim of this routine is for keeping alpha value after translation. So, you don't have to confirm the generated image.

Code begin here // ->>
void ConvertBmp16to32(const char *srcfname, const char *dstfname)
{
TBmpHeader MyBitmapHeader;
FILE *finput = fopen(srcfname, “rb”);
if(finput == NULL) return;
fread(&MyBitmapHeader, sizeof(TBmpHeader), 1, finput);
TRGBA * rgbdata;
unsigned short *rgbdata16;

int SSize = MyBitmapHeader.biWidth * MyBitmapHeader.biHeight;
int Size = SSize * 2;

rgbdata16 = (unsigned short *)malloc(Size);

fread(rgbdata16, Size, 1, finput);
fclose(finput);

rgbdata = (TRGBA *)malloc(SSize*4);

unsigned short r, g, b, a;
for(int i=0; i < SSize; i++) {
b = (rgbdata16[i] >> 4) & 0x0f;
g = (rgbdata16[i] >> 8) & 0x0f;
r = (rgbdata16[i] >> 12) & 0x0f;
a = rgbdata16[i] & 0x0f;
rgbdata[i].rgbBlue = b << 4;
rgbdata[i].rgbGreen = g << 4;
rgbdata[i].rgbRed = r << 4;
rgbdata[i].rgbAlpha = a << 4;
}

MyBitmapHeader = FillBitmapHeader(MyBitmapHeader.biWidth, MyBitmapHeader.biHeight, 32);

FILE *fpout = fopen(dstfname, “wb”);
if(fpout == NULL) return;
fwrite(&MyBitmapHeader, sizeof(TBmpHeader), 1, fpout);
fwrite(rgbdata, SSize*4, 1, fpout);
fclose(fpout);
free(rgbdata);
free(rgbdata16);
}
<<- // Code end here

After execute the ConvertBmp16to32() routine, a bitmap image will also be generated. The image color shows
some color loss.

The shown below routine is translation routine which converts 24 bit color into 16 bit color bitmap.

Code begin here // ->>
void ConvertBmp24to16_555(const char *srcfname, const char *dstfname)
{
TBmpHeader MyBitmapHeader;
FILE *finput = fopen(srcfname, “rb”);
if(finput == NULL) return;
fread(&MyBitmapHeader, sizeof(TBmpHeader), 1, finput);
TRGB * rgbdata;
unsigned short *rgbdata16;

int SSize = MyBitmapHeader.biWidth * MyBitmapHeader.biHeight;
int Size = SSize * 3;

rgbdata = (TRGB *)malloc(Size);

fread(rgbdata, Size, 1, finput);
fclose(finput);

rgbdata16 = (unsigned short *)malloc(SSize*2);

unsigned short r, g, b, a;
for(int i=0; i < SSize; i++) {
b = rgbdata[i].rgbBlue >> 3;
g = rgbdata[i].rgbGreen >> 3;
r = rgbdata[i].rgbRed >> 3;
rgbdata16[i] = (r << 10) + (g << 5) + b;
}

MyBitmapHeader = FillBitmapHeader(MyBitmapHeader.biWidth, MyBitmapHeader.biHeight, 16);

FILE *fpout = fopen(dstfname, “wb&rdquo);
if(fpout == NULL) return;
fwrite(&MyBitmapHeader, sizeof(TBmpHeader), 1, fpout);
fwrite(rgbdata16, SSize*2, 1, fpout);
fclose(fpout);
free(rgbdata);
free(rgbdata16);
}
<<- // Code end here

Code begin here // ->>
int main(int argc, char **argv)
{
ConvertBmp32to16(“bitmap32.bmp”, “bitmap16r1.bmp”);
ConvertBmp16to32(“bitmap16r1.bmp”, “bitmap32r1.bmp”);
ConvertBmp24to16_555(“bitmap24.bmp”, “bitmap16r2.bmp”);
return 0;
}
<<- // Code end here

6/17/2009

This will be my second Android game application...

Since, I am trying to complete this application. The application still miss some routines but the routines will be made soon.

6/09/2009

Sphere on my Android emulator...



Both 'setModel()' and 'setModelEX()' methods work with making points of sphere surface. Now I get my drawing sphere routine. I recommend a URL which provides some glut functions that can be used under Android. akjava-android-project

class GLBall {
private int VertexCount, mallocCount;
private FloatBuffer mVertexBuffer;
private FloatBuffer mNormalBuffer;
public float z_angle;
private int slices, stacks;

public GLBall()
{
mVertexBuffer = null;
mNormalBuffer = null;
}

public void setModel(double radius, int lats, int longs)
{
double lat0, z0, zr0, lat1, z1, zr1, lng, x, y;
float normal[];
float vertices[];

int mindex = 0, nindex=0;

VertexCount = (lats+1) * (longs+1) * 2;
mallocCount = VertexCount * 3;

normal = new float[mallocCount];
vertices = new float[mallocCount];

stacks = lats+1;
slices = longs+1;

for(int i = 0; i <= lats; i++) {
lat0 = (double)Math.PI * (-0.5 + (i - 1) / (double)lats);
z0 = (double)Math.sin(lat0) * radius;
zr0 = (double)Math.cos(lat0) * radius;

lat1 = (double)Math.PI * (-0.5 + i / (double)lats);
z1 = (double)Math.sin(lat1) * radius;
zr1 = (double)Math.cos(lat1) * radius;
for(int j = 0; j <= longs; j++) {
lng = 2 * Math.PI * (j - 1) /(double)longs;
x = Math.cos(lng);
y = Math.sin(lng);
normal[nindex++] = vertices[mindex++] = (float)(x * zr0);
normal[nindex++] = vertices[mindex++] = (float)(y * zr0);
normal[nindex++] = vertices[mindex++] = (float)z0;
normal[nindex++] = vertices[mindex++] = (float)(x * zr1);
normal[nindex++] = vertices[mindex++] = (float)(y * zr1);
normal[nindex++] = vertices[mindex++] = (float)z1;
}
}
mVertexBuffer = FloatBuffer.wrap(vertices);
mNormalBuffer = FloatBuffer.wrap(normal);
z_angle = 0.0f;
}

public void setModelEX(float radius, int astacks, int aslices)
{
int i, j, vindex = 0, nindex = 0;
float slicestep, stackstep;

stackstep = ((float)Math.PI) / astacks;
slicestep = 2.0f * ((float)Math.PI) / aslices;

VertexCount = astacks * (aslices+1) * 2;
mallocCount = VertexCount * 3;

float normal[] = new float[mallocCount];
float vertices[] = new float[mallocCount];

for (i = 0; i < astacks; i++)
{
float a = i * stackstep;
float b = a + stackstep;

float s0 = (float)Math.sin(a);
float s1 = (float)Math.sin(b);

float c0 = (float)Math.cos(a);
float c1 = (float)Math.cos(b);

float nv;
for (j = 0; j <= aslices; j++)
{
float c = j * slicestep;
float x = (float)Math.cos(c);
float y = (float)Math.sin(c);

nv=x * s0;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;

nv=y * s0;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;

nv=c0;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;

nv=x * s1;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;

nv=y * s1;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;

nv=c1;
normal[nindex++] = nv;
vertices[vindex++] = nv * radius;
}
}
mVertexBuffer = FloatBuffer.wrap(vertices);
mNormalBuffer = FloatBuffer.wrap(normal);
z_angle = 0.0f;

this.stacks = astacks;
this.slices = aslices+1;
}

public void draw(GL10 gl) {
int triangles;
gl.glDisable(GL10.GL_TEXTURE_2D);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer);
gl.glNormalPointer(GL10.GL_FLOAT, 0, mNormalBuffer);

gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_NORMAL_ARRAY);

triangles = slices * 2;
for(int i=0; i < stacks; i++)
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, i*triangles, triangles);

gl.glDisableClientState(GL10.GL_NORMAL_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnable(GL10.GL_TEXTURE_2D);
}
}

6/06/2009

Drawing sphere again


With Mingw I can use OpenGL function within main.cpp. I tried to use OPenGL function in my sphere.cpp but link error occured When i compiled and linked. So, I moved draw() function into my main.cpp. Once sphere
object is made, then the object will can share and will draw many with different color and angle.

main.cpp>

void drawSphere(TSphere sphere)
{
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, sphere.modelvalue);
glNormalPointer(GL_FLOAT, 0, sphere.normalvalue);
glDrawArrays(GL_QUAD_STRIP, 0, sphere.VertexCount);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
}

sphere.h>

#ifndef __SPHERE_H__
#define __SPHERE_H__

#include
#include
#include

typedef struct {
float x, y, z;
} Vertex3D;

class TSphere {
public:
TSphere();
void SetModelValue(float radius, int slices, int stacks);
public:
int VertexCount;
Vertex3D *modelvalue;
Vertex3D *normalvalue;
};

#endif

sphere.cpp>

#include "sphere.h"

TSphere::TSphere()
{
//
}

void TSphere::SetModelValue(float radius, int slices, int stacks)
{
float lat0, z0, zr0, lat1, z1, zr1, x, y, lng;
int index = 0;

VertexCount = (slices+1) * (stacks+1) * 2;
modelvalue = new Vertex3D[VertexCount];
normalvalue = new Vertex3D[VertexCount];

for(int i = 0; i <= slices; i++) {
lat0 = M_PI * (-0.5 + (i - 1) / (float)slices);
z0 = sin(lat0) * radius;
zr0 = cos(lat0) * radius;

lat1 = M_PI * (-0.5 + i / (float)slices);
z1 = sin(lat1) * radius;
zr1 = cos(lat1) * radius;

for(int j = 0; j <= stacks; j++) {
lng = 2 * M_PI * (j - 1) / stacks;
x = cos(lng);
y = sin(lng);
modelvalue[index].x = x * zr0;
modelvalue[index].y = y * zr0;
modelvalue[index].z = z0;
normalvalue[index].x = x * zr0;
normalvalue[index].y = y * zr0;
normalvalue[index].z = z0;
index++;
modelvalue[index].x = x * zr1;
modelvalue[index].y = y * zr1;
modelvalue[index].z = z1;
normalvalue[index].x = x * zr1;
normalvalue[index].y = y * zr1;
normalvalue[index].z = z1;
index++;
}
}
}

Drawing sphere without glut...


Finally, I got a picture which is about drawing sphere. The routine does not contain glut function and neither glBegin() function. It is very simple to use. I would like to appreciate to http://ozark.hendrix.edu/~burch/cs/490/sched/feb8/. You can get c source code by visiting the url but u can see little bit different.

Probably, I will change this routine to c code and Android Java code ...

For example)

SPhere1 := TSPhere.Create;
SPhere1.SetModelValue(0.75, 8, 8);

in my render() routine...
begin
...
glLoadIdentity;
glTranslatef(-1.5, 0.0, -3.0);
glRotatef(Angle, 1.0, 1.0, -1.0);
glColor3f(0.9, 0.9, 0.9);
SPhere1.Draw();
glColor3f(1.0, 1.0, 1.0);
...
end;

type
TXCustomVertex = packed Record
fX, fY, fZ : single;
end;

TSphere = class
public
Constructor Create;
Procedure Draw();
procedure SetModelValue(r: single; lats, longs : Integer);
protected
private
clats, clongs, vertexCount : Integer;
ModelValue : Array of TXCustomVertex;
NormalValue : Array of TXCustomVertex;
end;

Constructor TSphere.Create;
Begin
//
end;

procedure TSphere.SetModelValue(r: single; lats, longs : Integer);
var
i, j, index : Integer;
lat0, z0, zr0, lat1,z1, zr1, lng, x, y : Single;
begin
clats := lats;
clongs := longs;
vertexCount := (lats+1) * (longs+1) * 2;

SetLength(ModelValue, (lats+1) * (longs+1) * 2);
SetLength(NormalValue, (lats+1) * (longs+1) * 2);

index := 0;
for i := 0 to lats do begin
lat0 := PI * (-0.5 + (i - 1) / lats);
z0 := sin(lat0) * r;
zr0 := cos(lat0) * r;

lat1 := PI * (-0.5 + i / lats);
z1 := sin(lat1) * r;
zr1 := cos(lat1) * r;

for j := 0 to longs do begin
lng := 2 * PI * (j - 1) / longs;
x := cos(lng);
y := sin(lng);
ModelValue[index].fX := x * zr0;
ModelValue[index].fY := y * zr0;
ModelValue[index].fZ := z0;
NormalValue[index].fX := x * zr0;
NormalValue[index].fY := y * zr0;
NormalValue[index].fZ := z0;
index := index + 1;
ModelValue[index].fX := x * zr1;
ModelValue[index].fY := y * zr1;
ModelValue[index].fZ := z1;
NormalValue[index].fX := x * zr1;
NormalValue[index].fY := y * zr1;
NormalValue[index].fZ := z1;
index := index + 1;
end;
end;
end;

Procedure TSphere.Draw();
Begin
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);

glVertexPointer(3, GL_Float, 0, ModelValue);
glNormalPointer(GL_Float, 0, NormalValue);

glDrawArrays(GL_QUAD_STRIP, 0, vertexCount);

glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
End;

5/27/2009

My Mog Roulette game likes this...

Probably, it will be completed in the future or may not.

5/26/2009

GNUstep


GNUstep is a way of using with Objective-C under Window or other Platform. Probably many know or not that the language can support same functionality as other languages do. The language is being used with "Cocoa" for building an application for IPhone. The language is quit interesting for learning. There are two installation files should download and install. Before install it, Mingw should install first. Open a new tab this link , get gnustep-system-0.9.1-setup.exe and gnustep-core-0.9.2-setup.exe. After that, install it by order. GNUstep Renaissance will give some special things. go and get it . Probably need its source because should compile and install. Unzip it to MSYS working folder. The working folder will be created by clicking at MSYS shell of GNUstep at first time. The above shown picture shows an execution figure of simple application.

5/14/2009

Clear screen shot of roulette under OpenGL


One of Nehe's OpenGL tutorials gives me an example how to use. The roulette machine will smoothly spin with OpenGL. but since, this picture means alpha valued image works with OpenGL.

To apply for alpha value


To get a proper alpha valued image, some tasks should be included in the previous list. Thank you for Paul Nicholls, I found FloodFill() routine which can be used with TBitmap32.
The above shown picture is alpha valued image. When the generated image is opened by Gimp, it will be the same as the shown above picture. I include its source.

Click -> available download

5/13/2009

Make my own Roulette image...


Making roulette game will have not an easy task. Probably, the task should be included some mathematic routines. I don't know yet what sort of mathematic should be needed for....
At the moment, I will introduce one method how can make roulette image by Delphi 6 and Graphics32. Of course, there are many ways we can make it by using other development tools. To make an executable file with this source, Delphi 6 Standard and Graphics32 Component should be needed.

Uses
  ..., Math, GR32_Image, GR32; // Add this in Uses

// Conversion double rgb color value to TColor value
Function MakeColor(b, g, r: Double): Integer;
begin
    result := Trunc(r * 255) shl 16 + Trunc(b * 255) shl 8 + Trunc(g * 255);
end;

// In order to display text by angle
procedure TextRotate(bitmap: TBitmap32; x, y, angle: integer; atext: string;afont: TFont);
var
    lf:LogFont;
begin
    //Please Change with your country font, test with a different font to get better result...
    Bitmap.Font.Name := '๊ถ์„œ์ฒด';
    Bitmap.Font.Size := 12;
    Windows.GetObject(Bitmap.Font.Handle, sizeof(LOGFONT), @lf);
    lf.lfEscapement := angle * 10;
    lf.lfOrientation := angle * 10;
    Bitmap.Font.Handle := CreateFontIndirect(lf);
    Bitmap.Canvas.Brush.Style := bsClear;
    Bitmap.Textout(x, y, atext);
end;

// Button event for drawing roulette Image
procedure TForm1.BitBtn1Click(Sender: TObject);
{ Draw 1 pixcel width line }
procedure DrawLine(X1, Y1, X2, Y2 : Integer; vBitmap: TBitmap32);
Begin
    { Fill area by drawing lines }
    vBitmap.Canvas.MoveTo(X1,Y1);
    vBitmap.Canvas.LineTo(X2,Y2);
End;

const
    DEG2RAD : double = (3.14159/180);
var
    vBitmap : TBitmap32;
    dAngle, degInRad, dAngleX : Double;
    x1, y1, i, centerx, centery : Integer;
    Color0, Color1, Color2 : Integer;
    Angle, X, Y, H, H2, W, X3 : Integer;
    Step : Real;
    ValueT : Array of String;
begin
    vBitmap := TBitmap32.Create;
    vBitmap.Width := 256;
    vBitmap.Height := 256;
    centerx := 128;
    centery := 128;
    vBitmap.Canvas.Pen.Width := 2;
    vBitmap.Canvas.Pen.Color := MakeColor(0.66, 0.82, 0.82);
    vBitmap.Canvas.Ellipse(10, 10, vBitmap.Width-10, vBitmap.Height-10);
    dAngleX := 360 / 37;
    for i := 0 to 36 do begin
        dAngle := dAngleX * i;
        degInRad := dAngle * DEG2RAD;
        x1 := centerx - trunc(cos(degInRad) * (centerx-10));
        Y1 := centery - trunc(sin(degInRad) * (centery-10));
        vBitmap.Canvas.MoveTo(centerx, centery);
        vBitmap.Canvas.LineTo(X1, Y1);
    end;
    vBitmap.Canvas.Ellipse(40, 40, vBitmap.Width-40, vBitmap.Height-40);

    Color0 := MakeColor(1.0, 0.0, 0.0);
    Color1 := MakeColor(0.0, 1.0, 0.0);
    Color2 := MakeColor(0.0, 0.0, 0.0);
    for i := 0 to 36 do begin
        dAngle := dAngleX * i + 5;
        degInRad := dAngle * DEG2RAD;
        if(i = 0) then
            vBitmap.Canvas.Brush.Color := Color0
        else begin
            if(i mod 2 = 1) then vBitmap.Canvas.Brush.Color := Color1
            else vBitmap.Canvas.Brush.Color := Color2;
        end;
        x1 := centerx - trunc(cos(degInRad) * 110);
        Y1 := centery - trunc(sin(degInRad) * 110);
        vBitmap.Canvas.FloodFill(x1, y1, vBitmap.Canvas.Pen.Color, fsBorder);
    end;
    { Get form size }
    H:=vBitmap.Height;
    W:=vBitmap.Width;

    Angle := 0;
    vBitmap.Canvas.Pen.Color := clBlue;
    while (Angle<360) do begin
        X := centerx - Round(cos(Angle*DEG2RAD) * 88);
        Y := centery - Round(sin(Angle*DEG2RAD) * 88);
        vBitmap.Canvas.Pen.Color:=RGB(255, 255,abs(255-Angle));
        DrawLine(centerx, centery, X, Y, vBitmap);
        Inc(Angle);
    end;

    Angle := 0;
    vBitmap.Canvas.Pen.Color := clBlue;
    while (Angle<360) do begin
        X := centerx - Round(cos(Angle*DEG2RAD) * 48);
        Y := centery - Round(sin(Angle*DEG2RAD) * 48);
        vBitmap.Canvas.Pen.Color:=RGB(abs(255-Angle),abs(255-Angle),abs(255-Angle));
        DrawLine(centerx, centery, X, Y, vBitmap);
        Inc(Angle);
    end;

    vBitmap.Canvas.Brush.Color := RGB($DC, $B4, $8C);
    vBitmap.Canvas.Pen.Color := RGB($DC, $B4, $8C);

    vBitmap.Canvas.Rectangle(126, 128-62, 130, 128+62);
    vBitmap.Canvas.Rectangle(128-62, 126, 128+62, 130);

    vBitmap.Canvas.Rectangle(124, 128-62, 132, 128-22);
    vBitmap.Canvas.Rectangle(124, 128+22, 132, 128+62);
    vBitmap.Canvas.Rectangle(128-62, 124, 128-22, 132);
    vBitmap.Canvas.Rectangle(128+22, 124, 128+62, 132);
    vBitmap.Font.Color := RGB($FF, $FF, $FF);
    vBitmap.Canvas.Brush.Style := bsClear;
    Angle := 90;

    Setlength(ValueT, 37);
    ValueT[0] := '0'; ValueT[1] := '32'; ValueT[2] := '15'; ValueT[3] := '19';
    ValueT[4] := '4'; ValueT[5] := '21'; ValueT[6] := '2'; ValueT[7] := '25';
    ValueT[8] := '17'; ValueT[9] := '34'; ValueT[10] := '6'; ValueT[11] := '27';
    ValueT[12] := '13'; ValueT[13] := '36'; ValueT[14] := '11'; ValueT[15] := '30';
    ValueT[16] := '8'; ValueT[17] := '23'; ValueT[18] := '10'; ValueT[19] := '5';
    ValueT[20] := '24'; ValueT[21] := '16'; ValueT[22] := '33'; ValueT[23] := '1';
    ValueT[24] := '20'; ValueT[25] := '14'; ValueT[26] := '31'; ValueT[27] := '9';
    ValueT[28] := '22'; ValueT[29] := '18'; ValueT[30] := '29'; ValueT[31] := '7';
    ValueT[32] := '28'; ValueT[33] := '12'; ValueT[34] := '35'; ValueT[35] := '5';
    ValueT[36] := '26';
    for i := 0 to 36 do begin
        if(length(ValueT[i]) = 1) Then
            dAngle := dAngleX * i + 3
        else
            dAngle := dAngleX * i;
        degInRad := dAngle * DEG2RAD;
        x1 := centerx - trunc(cos(degInRad) * 110);
        Y1 := centery - trunc(sin(degInRad) * 110);
        TextRotate(vbitmap, x1, y1, Angle, ValueT[i], vBitmap.Font);

        Angle := Angle - 10;
        if(Angle = 0) then Angle := 360;
    end;

    PaintBox01.Canvas.CopyRect(Bounds(0, 0, vBitmap.Width, vBitmap.Height), vBitmap.Canvas,
Bounds(0, 0, vBitmap.Width, vBitmap.Height));
    vBitmap.SaveToFile('image.bmp');
    vBitmap.Free;
end;

5/10/2009

News - 11/05/2009

I am happy to introduce my first free Android application - Mog Poker. Mog Poker is a sort of card game, it is easy to play. Just download it by following the direct link. The game will work on 320 * 320, 320 * 480 and 480 * 320 screen size. If you have a smaller size screen than this, please try not to install it into your mobile. The application does not pay anything to me. I spend months to learn and make this application. Testing this application under emulator, it seemingly doesn't make any problem. Please forgive me about try not to test with a real mobile phone. if you do not meet any problem, please enjoy the game. Before trying it, you can see a couple of demo screen which was made by flash format. You can see the demo screen in the previous list. If you have a problem with viewing the demo screen, please avoid Internet Explorer. No problem with both Google Chrome and Opera.
download 1--> Mog Poker(large size cards)
download 2--> Mog Poker(small size cards)
Important :
The package was complied with Android version 1.5 and the target was Android 1.1.

5/07/2009

Optimise on a smaller screen.

There is no such a screen size (320 * 320) in Android real mobile phone. However, I want to see my application, how it can be optimized on this small screen. I changed each card size, simply redesign cards. Probably, I have to find out different technique, if I want to operate my application on a smaller screen than this screen size.

4/29/2009

Since, I am doing something with ...


Sometimes, People can understand easily by seeing a picture.

4/28/2009

Installing SDL (Simple DirectMedia Layer), GLUT (OpenGL Utility Kit) under Mingw


All information can be found through their presented web site. Therefore candidates can directly visit by clicking this link. Candidates will find the appreciated library under the "Download" / "SDL 1.2" section. The library contains many files, however candidates do not need copy all of it. Copy inside files of bin, include and lib folders into your Mingw folder.
Compile method 1)
$ g++ “sourcefile.extension” –o “launching program name”-lsdl
Compile method 2 – include OpenGL lib)
$ g++ “sourcefile.extension” –o “launching program name”-lsdl –lglu32 –lglut32 –lopengl32
If candidates want to use glut library, please visit here . And will look appreciate method through the web site. Please check the shown above picture.

4/22/2009

Installation Mingw, MSYS and GTKmm on Windows XP


For a long time, I would install some softwares on my old laptop. Three weeks ago, I bought a 40giga hdd, then tried to install into my labtop computer. But, there had some problem and I spent some days to fix it. Finally I get a 30 giga hdd. It was good thing to me because previously I had a 10 giga hdd.
By the way, to install Mingw is quite simple. Candidates can find automated installation setup file from here . Please candidate version choose when you install. Next, candidates can find MSYS automated installation setup file from same URL . The default installation path of Mingw is “C:\Mingw” and MSYS is “C:\Mingw\Msys”. Give a path “C:/Mingw” when MSYS installer asks where Mingw was installed. After the Installation, Please add “C:\Mingw\bin;” to the environment variable called “Path”. There has some works should do under the MSys shell. Before doing it, let install the GTKmm which is stand for Graphic Tool kit … something like that. Go there , find and download the automated setup file for windows. Next, give a path “C:\Gtk” When Installer asks where does install you want. The setup will add something on your environment variable. So please relax instead of doing something. Under MSys shell, I could compile and execute any examples of GTKmm with `pkg-config`. Before compile with g++ and gcc, execute the MSys shell. If the MSys shell window is displayed, then go to root directory use “cd” instruction ([ex]cd ..). You can check your current folder by using “pwd” instruction. If you are in root folder, the “pwd” instruction will return “/”. Check file and directory by using “ls” instruction. If you can not see the “gtk” folder, make “gtk” folder by using “mkdir” instruction ([ex]mkdir gtk). Next, Candidate can link this path by editing ‘fstab’ file which is located in “/etc” folder. When you open it, you will know how to do it. Add like “c:/gtk /gtk”. To edit file under MSys shell, use vi editor. You can find a manual by searching Internet. Now close the MSys shell and execute again. Go to “/gtk” directory and check file and directory. If you have some files and directories, you get “gtk” under MSys shell. Now go to your working folder by “cd” instruction ([ex]cd). Make example file for compiling. Here is compiling example. Ex) $ gcc tutorial1.cc –o tutorial `pkg-config --cflags --libs gtkmm-2.4`.

4/19/2009

It's a tunning point to make my game application.


Presently, I challenge to make my game application which would be operated under the Android platform. To complete the application I think many days will go. Thank to Nokia forum that I could find a good card resource from them...

4/12/2009

Introduction of Android skin


I think many people already knew this article, however for some people's ignorance I would like to introduce one thing which is about the android skin, it can be downloaded through the suggested URL in this picture. I appreciate to the creator of those skins. The above shown picture is my favorite skin.

์•ˆ๋“œ๋กœ์ด๋“œ ์Šคํ‚จ ์†Œ๊ฐœ


์ด๋ฏธ ์•ˆ๋“œ๋กœ์ด๋“œ๋ฅผ ์•Œ๊ณ  ๊ณ„์‹œ๋Š” ๋ถ„์€ ์ด๋ฏธ ์•Œ๊ณ  ๊ณ„์‹œ๋ฆฌ๋ผ ์ƒ๊ฐ๋˜์ง€๋งŒ ํ˜น์‹œ๋‚˜ ์•„์ง ๋ชจ๋ฅด์‹œ๋Š” ๋ถ„์„ ์œ„ํ•˜์—ฌ ์ด๋ ‡๊ฒŒ ๋ณด๊ธฐ์ข‹์€ ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์Šคํ‚จ์„ ์˜ฌ๋ฆฝ๋‹ˆ๋‹ค. ๊ทธ๋ฆผ์— ์ œ์‹œ๋˜์–ด์ง„ ์ฃผ์†Œ๋ฅผ ์ฐพ์•„ ๊ฐ€์…”์„œ ์ž…๋ง›์— ๋งž๋Š” ์Šคํ‚จ์„ ์‚ฌ์šฉํ•ด ๋ณด์‹œ์‹ญ์š”. ์˜ฌ๋ ค์ง„ ๊ทธ๋ฆผ์€ ์ œ๊ฐ€ ์ข‹์•„ํ•˜๋Š” ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์Šคํ‚จ์ž…๋‹ˆ๋‹ค.

3/26/2009

์ดํด๋ฆฝ์Šค ๊ทธ๋ฆฌ๊ณ  ๋‘๋‹ฌ์ด๋ž€ ์‹œ๊ฐ„๋™์•ˆ...


์ดํด๋ฆฝ์Šค๋ฅผ ์ ‘ํ•˜๊ฒŒ ๋œ๊ฒƒ์€ ์•„๋งˆ๋„ ๋‘๋‹ฌ์ „์œผ๋กœ ๊ฑฐ์Šฌ๋Ÿฌ ์˜ฌ๋ผ๊ฐ‘๋‹ˆ๋‹ค. ์ฒ˜์Œ์—” ์ดํด๋ฆฝ์Šค์— ๊ทธ๋ƒฅ ์ž๋ฐ” ์Šคํƒ ๋‹ค๋“œ ํ”Œ๋žซํผ์„ ์ด์šฉํ•˜์—ฌ ์ผ๋ฐ˜ ๋ฐ์ดํƒ€๋ฒ ์ด์Šค ํด๋ผ์ด์–ธํŠธ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์„ ์ง„ํ–‰ํ•˜๋‹ค๊ฐ€ ์–ด๋Š๋‚  ๋ฌธ๋“ ๋ชจ๋ฐ”์ผ์—์„œ ๋Œ์•„๊ฐ€๋Š” ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค์–ด ๋ณด๊ณ  ์‹ถ๋‹ค๋Š” ์ƒ๊ฐ์— ๊ทธ๋‚  ๋ถ€ํ„ฐ ์ธํ„ฐ๋„ท์„ ์ฐพ์•„๋ณด๋ฉฐ ์ง„ํ–‰์„ ํ–ˆ์Šต๋‹ˆ๋‹ค. Net bean๋„ ์„ค์น˜ํ•ด ์‚ฌ์šฉํ•ด ๋ณด์•˜์ง€๋งŒ ์—ญ์‹œ ๋ณธ์ธ์—๊ฒŒ๋Š” ์ดํด๋ฆฝ์Šค๊ฐ€ ๋” ์ข‹๋„ค์š”. Nokia์˜ Carbide C++์€ ํ•œ๋ฒˆ ์‹œ๋„ํ•ด ๋ณด๊ณ  ์‹ถ์€๋ฐ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋…ธํŠธ๋ถ์ด ์ €์‚ฌ์–‘์ด๊ณ  ์ œ๋Œ€๋กœ ์‚ฌ์šฉํ• ๋ ค๋ฉด ์ƒ๋‹นํžˆ ๋งŽ์€ ์–‘์„ SDK๋ฅผ ํ•„์š”๋กœ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ผ๋‹จ ๋’ค๋กœ ๋ฏธ๋ฃจ๊ณ , ์ด์ „์— ์˜ฌ๋ฆฐ ๊ฒŒ์‹œ๋ฌผ์˜ ์ง€์‹์„ ์–ป๊ธฐ ์œ„ํ•˜์—ฌ ์—ฌ๊ธฐ ์ €๊ธฐ ์ธํ„ฐ๋„ท์„ ๋งŽ์ด ๋Œ์•„ ๋‹ค๋…”์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด์ชฝ๋ถ„์•ผ์˜ ์ง€์‹์„ ์•Œ๊ธฐ ์œ„ํ•ด์„œ ์ „ํ™”๋„ ํ•ด๋ณด๊ณ  ์‚ฌ๋žŒ๋„ ๋งŒ๋‚˜๋ณด๊ณ  ์ฒซ๋ฒˆ์งธ ์—๋ฎฌ๋ ˆ์ดํ„ฐ์—์„œ ๋Œ์•„๊ฐ€๋Š” ์‘์šฉํ”„๋กœ๊ทธ๋žจ ์Šคํฌ๋ฆฐ์ƒท์„ ํ•จ๊ป˜ ์˜ฌ๋ฆฝ๋‹ˆ๋‹ค. ์ด๋ฏธ ๊ตญ๋‚ด์— ์‚ผ์„ฑ๊ณผ LG์— ์ œ๊ฐ€ ๊ตฌ์ƒํ•œ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์ด ํƒ‘์žฌ๋˜ ์žˆ๊ธฐ์— ์˜๋ฏธ๊ฐ€ ์—†์ง€๋งŒ ์—ญ์‹œ ๊ทธ๋ž˜๋„ ๋ฐฐ์›€์ด ์žˆ์—ˆ๊ธฐ์—...

์ดํด๋ฆฝ์Šค์— ๊ตฌ๊ธ€์•ˆ๋“œ๋กœ์ด๋“œ ํ”Œ๋žซํผ ๋ถ™์ด๊ธฐ ๋‘๋ฒˆ์งธ


๊ทธ๋ฆผ์—์„œ ๋ณด๋“ฏ์ด Window > Preferences ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•œ ํ›„ ์™ผ์ชฝ์˜ Android ํ•ญ๋ชฉ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‚˜์„œ ์•ˆ๋“œ๋กœ์ด๋“œ SDK๊ฐ€ ์„ค์น˜๋œ ๊ฒฝ๋กœ๋ฅผ (์˜ˆ: C:\android-sdk-windows-1.1_r1) ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๋‚˜๋จธ์ง€ ์„ค์ •์€ ๊ทธ๋ƒฅ ๋””ํดํŠธ๋กœ ๋‘์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ดํด๋ฆฝ์Šค์— Android Project ๋ฉ”๋‰ด ์ถ”๊ฐ€๋ฅผ ์œ„ํ•˜์—ฌ Windows > Customize Perspective... ๋ฅผ ํด๋ฆญํ•˜์…”์„œ ๋‚˜ํƒ€๋‚˜๋Š” ๋‹ค์ด์•Œ๋กœ๊ทธ์—์„œ Android์™€ ๊ด€๋ จ๋œ ํ•ญ๋ชฉ์„ ์„ ํƒํ•˜์‹œ๋ฉด Android Project๋ฅผ ์‹œ์ž‘ํ•˜์‹ค์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ•จ์œผ๋กœ์จ ์ดํด๋ฆฝ์Šค์™€ ์ž๋ฐ”๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ชจ๋ฐ”์ผ์—์„œ ์‹คํ–‰๋˜์–ด์งˆ ์ˆ˜ ์žˆ๋Š” ๊ฒŒ์ž„๊ฐœ๋ฐœ์— ํ•œ๋ฐœ์ง ๋‹ค๊ฐ€๊ฐˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

3/25/2009

์ดํด๋ฆฝ์Šค์— ๊ตฌ๊ธ€์•ˆ๋“œ๋กœ์ด๋“œ ํ”Œ๋žซํผ ๋ถ™์ด๊ธฐ ์ฒซ๋ฒˆ์งธ

๊ตฌ๊ธ€ ์•ˆ๋“œ๋กœ์ด๋“œ SDK๋Š” ์—ฌ๊ธฐ๋กœ ๊ฐ€์…”์„œ ๋ฐ›์„์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์šด ๋ฐ›์œผ์‹  ํŒŒ์ผ์€ C:\์— ์••์ถ•์„ ํ’€๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ดํด๋ฆฝ์Šค ์œ ๋กœํŒŒ๋‚˜ ๊ฐ€๋‹ˆ๋ฉ”๋ฐ ๋ฒ„์ „์—์„œ ๋Œ์•„๊ฐ€๋ฉฐ OS๋Š” ์œˆ๋„์šฐ์˜ ๊ฒฝ์šฐ Windows XP (32-bit) or Vista (32- or 64-bit) ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๊ณ  ์ดํด๋ฆฝ์Šค ํ”Œ๋Ÿฌ๊ทธ(์ผ๋ช… ADT)์ธ์ด ํ•„์š”ํ•˜๋ฉฐ ์ดํด๋ฆฝ์Šค ๊ฐ€๋‹ˆ๋ฉ”๋ฐ ๋ฒ„์ „์˜ ๊ฒฝ์šฐ ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

1. ์ดํด๋ฆฝ์Šค๋ฅผ ์‹คํ–‰ํ•˜์‹œํ•˜์‹ ํ›„, Help> Software Updates... ์ˆœ์œผ๋กœ ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
2. ๋‚˜ํƒ€๋‚˜๋Š” ๋‹ค์ด์•Œ๋กœ๊ทธ ์•ˆ์—์„œ, Avaiable Software tab์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
3. Add Site...๋ฅผ ํด๋ฆญํ•˜์—ฌ plugin ๋‚ด๋ ค๋ฐ›์„ ์‚ฌ์ดํŠธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
4. ๋‹ค์Œ๊ณผ ๊ฐ™์ด URL์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค. "http://dl-ssl.google.com/android/eclipse/"
5. Android Devlopment Tools, Android Editors๋ฅผ ํด๋ฆญํ•˜์‹  ํ›„ Install ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด Eclipse๋ฅผ ์žฌ๊ตฌ๋™ํ•ฉ๋‹ˆ๋‹ค. ADT์™€ ๊ด€๋ จ๋œ ์„ค์ •์€ ๋‘๋ฒˆ์งธ๋ฅผ ์ฐธ๊ณ  ํ•˜์‹ญ์‹œ์š”. ์•„๋ž˜ ๋™์˜์ƒ์€ ๋ณด๋‹คํฐ์— ์•ˆ๋“œ๋กœ์ด๋“œ ํ”Œ๋žซํผ์ด ํƒ‘์žฌ๋œ ๋™์˜์ƒ ์ž…๋‹ˆ๋‹ค.

์ดํด๋ฆฝ์Šค์— SK-VM ํ”Œ๋žซํผ ์ ์šฉํ•˜๊ธฐ ์„ธ๋ฒˆ์งธ


์ด์   Windows -> Customize Perspective... ๋ฉ”๋‰ด๋ฅผ ์ด์šฉํ•˜์—ฌ XVM Project ํ•ญ๋ชฉ๊ณผ ๊ด€๋ จ๋œ 1๊ฐœ ๋ฉ”๋‰ด๋ฅผ ์ถ”๊ฐ€ํ•จ์œผ๋กœ์จ ๊ฐœ๋ฐœ์ž๋Š” SK-VM์— ์‹คํ–‰๋˜์–ด์ง€๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ ์‰ฝ๊ฒŒ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ดํด๋ฆฝ์Šค์— SK-VM ํ”Œ๋žซํผ ์ ์šฉํ•˜๊ธฐ ๋‘๋ฒˆ์งธ


SK-VM์„ ์„ค์น˜ํ•˜์‹ ํ›„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์„ค์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. Eclipse์˜ Windows > Preferences ๋ฅผ ํด๋ฆญํ•˜์‹ ํ›„ ์™ผ์ชฝ์€ ์ƒˆ๋กญ๊ฒŒ ๋‚˜ํƒ€๋‚œ XVM์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์—๋ฎฌ๋ ˆ์ดํ„ฐ์˜ ์‹คํ–‰ํŒŒ์ผ ์œ„์น˜์™€ ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์žฅ์น˜(์Šคํ‚จ)์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๋ฉ”๋ชจ๋ฆฌ ์–‘์„ 512 ๋˜๋Š” 1024๋ผ๊ณ  ์ž…๋ ฅํ•˜์‹  ํ›„ ์„ค์ •์„ ๋งˆ์นฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆผ์„ ์ฐธ๊ณ  ํ•˜์‹ญ์‹œ์š”...

์ดํด๋ฆฝ์Šค์— SK-VM ํ”Œ๋žซํผ ์ ์šฉํ•˜๊ธฐ ์ฒซ๋ฒˆ์งธ


SK-VM์€ SK Telecom์—์„œ clean room ๊ธฐ๋ฐ˜์œผ๋กœ ์ž์ฒด ๊ฐœ๋ฐœํ•œ J2ME(Java 2 Micro Eidtion) ์ž๋ฐ” ์‹คํ–‰ ํ™˜๊ฒฝ์œผ๋กœ ๊ฐ€์ƒ๋จธ์‹  ๋ฐ ๋‹จ๋ง ํ™•์žฅ UI, ๋„คํŠธ์›Œํฌ, IO๋ฅผ ํฌํ•จํ•˜๋Š” ํด๋ž˜์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๋ฌด์„ ์ด๋™๋‹จ๋ง๊ธฐ์—์„œ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ์„ ์ œ๊ณตํ•œ๋‹ค.(SK Telecom, XCE)

SK-VM์€ http://developer.xce.co.kr /๋กœ ๊ฐ€์…”์„œ ํšŒ์›๊ฐ€์ž…์„ ํ•˜์‹ ํ›„์— ์—ฌ๊ธฐ์„œ ๋‹ค์šด์„ ๋ฐ›๊ณ  ์„ค์น˜ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜์‹  ํ›„ ์ดํด๋ฆฝ์Šค์˜ ๋ฉ”๋‰ด๋ถ€๋ถ„์„ ํ™•์ธํ•˜์‹ญ์‹œ์š”.


์ฐธ๊ณ 

1. SK Telecom, XCE, 2009.03.25,
view http://www.javastudy.co.kr/docs/lec_j2me/mobilejava/n-top/2.htm

MTJ์„ค์ •ํ›„ Eclipse ์ถ”๊ฐ€์ ์œผ๋กœ ํ• ์ผ๋“ค...


MTJ์™€ Antenna ๊ฐ€ ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜์–ด ์กŒ๋‹ค๋ฉด ์ดํด๋ฆฝ์Šค๋กœ ์šฐ๋ฆฌ๋Š” ํ•ธ๋“œํฐ์šฉ ๊ฒŒ์ž„ ๋˜๋Š” ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ(์ผ๋ช… CLDC, MIDP)์„ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ Windows -> Customize Perspective... ๋ฉ”๋‰ด๋ฅผ ์ด์šฉํ•˜์—ฌ Java ME ํ•ญ๋ชฉ๊ณผ ๊ด€๋ จ๋œ ๋‘๊ฐœ์˜ ๋ฉ”๋‰ด๋ฅผ ์ถ”๊ฐ€ํ•จ์œผ๋กœ์จ Eclipse ์‚ฌ์šฉ์ž๋“ค์€ Midlet ํ”„๋กœ์ ํŠธ๋ฅผ ์‰ฝ๊ฒŒ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ œ ์ดํด๋ฆฝ์Šค์—์„œ ์ž๋ฐ”๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ชจ๋ฐ”์ผ ๊ฒŒ์ž„์„ ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹จ ์™ธ๊ตญ๋ชจ๋ฐ”์ผ ํฐ์— ํ•œ์—์„œ...

Antenna์™€ MTJ...


Antenna๋‚˜๋Š” ์•„ํŒŸ์น˜์˜ Ant์˜ ํ™•์žฅ์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. Ant๋Š” ์ˆœ์ˆ˜ํ•œ ์ž๋ฐ” ํˆด์ด๋ฉฐ, GNU make ๋ณด๋‹ค ๋‹จ์ˆœํ•˜๊ณ  ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•˜๋„ค์š”. ์–ด์จŒ๊ฑฐ๋‚˜ ์„ค์น˜๋Š” antenna-bin-1.0.2.jar ํŒŒ์ผ์€ ์—ฌ๊ธฐ์„œ ๋ฐ›์œผํžŒ ํ›„ antenna-bin-1.0.2.jar ํŒŒ์ผ์„ ํŽธ์˜์ƒ eclipse์˜ plugin ํด๋”์— ๋ณต์‚ฌ ํ•ฉ๋‹ˆ๋‹ค. ์„ค์ •์€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ eclipse๋ฅผ ๊ตฌ๋™ํ•˜์‹  ํ›„ Window -> Preferences ๋ฅผ ํด๋ฆญํ•œ ํ›„ ์™ผ์ชฝ์˜ Java ME ํ•ญ๋ชฉ์„ ์„ ํƒํ•˜์‹  ํ›„ C:\eclipse\plugins\antenna-bin-1.0.2.jar๋ผ๊ณ  Antenna jar ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. Java ME ํ•ญ๋ชฉ > Preprocessor > Symbol Set Definitions์ด ์ถ”๊ฐ€๋๋„ค์š”... MTJ ์‚ฌ์šฉ์ž๋“ค์€ Antenna ํ˜•์‹์— ๋งž๊ฒŒ ์ด๋ฏธ ์ •์˜๋˜์–ด์ง„ ์‹ฌ๋ณผ์„ ์ž„ํฌํŠธ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

์ดํด๋ฆฝ์Šค์— MTJ๋ฅผ ๋ถ™์ด๊ธฐ...

์—ฌ๊ธฐ์„œ MTJ๋Š” Mobile Tools for Java๋ผ๊ณ  ํ‘œ๊ธฐ ๋˜์–ด์งˆ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ดํด๋ฆฝ์Šค์—์„œ ์ž๋ฐ” ๋ชจ๋ฐ”์ผ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ์ข€๋” ์‰ฝ๊ฒŒ ๊ฐœ๋ฐœํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ ์ž…๋‹ˆ๋‹ค. MTJ์˜ Misssion Statement๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

The goal of the Mobile Tools for JavaTM (MTJ) project is to extend existing Eclipse frameworks to support mobile device Java application development.

์ž ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋ฐ›์œผ๋Ÿฌ ๊ฐ€์•ผ๋ฉ๋‹ˆ๋‹ค. ๊ฒฝ๋กœ๋Š” ์—ฌ๊ธฐ๋กœ ๊ฐ€์…”์„œ Latest Release๋ฅผ ๋ฐ›์œผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. zip format์˜ ์••์ถ• ํŒŒ์ผ์€ ํ’€๋ฉด features ํด๋”์™€ plugins์ธ ํด๋”๋กœ ๋‚˜์šฐ์–ด์ ธ ์žˆ๋Š”๋ฐ ์„ค์น˜๋œ eclipse ํด๋” ์•ˆ์— ์ด๋ฏธ ์กด์žฌ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฏ€๋กœ ๋ฎ์–ด์“ฐ๊ธฐ ํ˜•ํƒœ๋กœ ํ’€๋ฉด ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์„ค์น˜๋˜๋ฉฐ eclipse๊ฐ€ ๊ตฌ๋™์ค‘์ด๋ผ๋ฉด ์žฌ ๊ตฌ๋™์„ ํ†ตํ•˜์—ฌ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์ œ๋Œ€๋กœ ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ๊ฐ€๋Š ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ผ๋‹จ MTJ๋ฅผ ์„ค์น˜ํ•œ ํ›„ MTJ๊ฐ€ ์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜๊ธฐ ์œ„ํ•˜์—ฌ ์„ค์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. eclipse๋ฅผ ๊ตฌ๋™ํ•˜์‹œ๋ฉด ์•„์ฃผ ์ž˜ ๋งŒ๋“ค์–ด์ง„ IDE๊ฐ€ ๋ณด์ผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋ฉ”๋‰ด๋Š” File, Edit, Navigate ๋“ฑ๋“ฑ์ด ์žˆ๋Š”๋ฐ ์ด์ค‘์—์„œ ์„ค์ •์„ ํ•˜๊ธฐ ์œ„ํ•˜์—ฌ Windows ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๊ฐœ์˜ Submenu์ค‘์— Preferences๋ฅผ ํด๋ฆญํ•˜์‹œ๋ฉด Preferences ํƒ€์ดํ‹€์„ ๊ฐ€์ง„ ๋‹ค์ด์–ผ๋กœ๊ทธ๊ฐ€ ํ™”๋ฉด์— ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค. ์œˆ์ชฝ์˜ ํ•ญ๋ชฉ์—์„œ Java ME๋ฅผ ํด๋ฆญํ•˜์‹ ํ›„ WTK Root ๊ฒฝ๋กœ๋ฅผ ์žก์•„์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค. WTK๋Š” Wireless Tookit for CLDC๋ผ๊ณ  ํ‘œ๊ธฐ ๋˜์–ด์งˆ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ด๋ฏธ ์•ž์—์„œ ์„ค์น˜ํ•˜์˜€์œผ๋ฏ€๋กœ ๊ฒฝ๋กœ๊ฐ€ ์–ด๋””์ธ์ง€๋Š” ์•„์‹ค๊ฒ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ C:\WTK2.5.2_01 ์ด๊ณณ์— ์„ค์น˜๋ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ Java ME์˜ ํ•ญ๋ชฉ์•ˆ์— Device Management๋ฅผ ์„ ํƒํ•œ ํ›„ Import ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ C:\WTK2.5.2_01 ๊ฒฝ๋กœ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. Device Management๋Š” ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์Šคํ‚จ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ดํด๋ฆฝ์Šค์— ์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค๋•Œ๋งˆ๋‹ค ์—ฌ๊ธฐ์„œ ์„ ํƒํ•œ ๋””ํดํŠธ ๋””๋ฐ”์ด์Šค(MediaControlSkin)๊ฐ€ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค๊ณ  ๋‚œ ์ดํ›„์—๋„ ๊ฒฐ๊ณผ ์‹คํ–‰์‹œ ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์Šคํ‚จ์€ ๋ณ€๊ฒฝ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์œผ๋กœ Antenna๋ฅผ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค

์ดํด๋ฆฝ์Šค ์„ค์น˜๋Š” ์ด๋ ‡๊ฒŒ ...


์ดํด๋ฆฝ์Šค ๊ตฌ๋™์˜ ์ตœ์†Œ ์ถฉ๋ถ„ ์กฐ๊ฑด์œผ๋กœ ์ž๋ฐ” ๋Ÿฐํƒ€์ž„ ๋ชจ๋“ˆ ์ตœ์‹ ๋ฒ„์ „์ด ํ•„์š” ํ•ฉ๋‹ˆ๋‹ค. JRE ์ตœ์‹ ๋ฒ„์ „์€ Sun ์—์„œ JRE 6 ๋ฐ”์ด๋„ˆ๋ฆฌ ์„ค์น˜ ๋ชจ๋“ˆ์„ ๋‹ค์šด๋ฐ›์•„์„œ ์„ค์น˜ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ž๋ฐ” ๋Ÿฐํƒ€์ž„ ๋ชจ๋“ˆ ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ์ œ์–ดํŒ์—์„œ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•˜๋ฉฐ ์ดํด๋ฆฝ์Šค ๋‚ด๋ถ€์— ๋”ฐ๋กœ JRE ํด๋”์™€ ํŒŒ์ผ์ด ์กด์žฌ ํ•˜์ง€๋งŒ ์ด๋Š” ์ •์ƒ์ ์œผ๋กœ ์„ค์ •๋˜์ง€ ์•Š์œผ๋ฏ€๋กœ ์ง์ ‘ JRE๋ฅผ ์„ค์น˜ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

์ž๋ฐ” ๋Ÿฐํƒ€์ž„ ๋ชจ๋“ˆ ์„ค์น˜์™ธ์— ์ž๋ฐ” ๊ฐœ๋ฐœ ํˆด (์ผ๋ช… JDK) ์„ค์น˜๋„ ์ƒํ™ฉ์— ๋”ฐ๋ผ ํ•„์š”ํ•œ๋ฐ ์˜ˆ๋ฅผ ๋“ค์ž๋ฉด ๊ตฌ๊ธ€์—์„œ ์ตœ๊ทผ์— ๊ฐœ๋ฐœ ์ค‘์ธ ์•ˆ๋“œ๋กœ์ด๋“œ ํ”Œ๋žซํผ์„ ๊ตฌ๋™ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด JDK ๋˜ํ•œ Sun ์—์„œ ๋‹ค์šด ๋ฐ›์•„์„œ ์„ค์น˜ ํ•ฉ๋‹ˆ๋‹ค.  ์„ค์น˜๋Š” ์ธ์Šคํ†จ๋Ÿฌ๊ฐ€ ์ œ์‹œํ•˜๋Š” ๋ฐ๋กœ ์ง„ํ–‰ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ์ดํด๋ฆฝ์Šค์™€ ์ž๋ฐ” ๋งˆ์ดํฌ๋กœ ์—๋””์…˜์„ ์ด์šฉํ•˜์—ฌ ๋ชจ๋ฐ”์ผ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์„ ๊ฐœ๋ฐœํ•  ์ˆ˜ ์žˆ๋„๋ก Sun ์—์„œ ์ œ๊ณตํ•˜๋Š” Wireless Toolkit์„ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.  ํ˜„์žฌ 3.0 ๋ฒ„์ „๊ณผ  2.5.2 ๋ฒ„์ „ ๋‘๊ฐ€์ง€์ค‘ ํ•„์ž๋Š” ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋…ธํŠธ๋ถ์ด ์ €์‚ฌ์–‘์ด๊ธฐ ๋•Œ๋ฌธ์— 2.5.2 ๋ฒ„์ „์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.  ๋‹ค์šด๋กœ๋“œ๊ฐ€ ๊ฐ€๋Šฅํ•œ URL์€ ์—ฌ๊ธฐ๋กœ ๊ฐ€์„œ ๋‹ค์šด ๋ฐ›์œผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ•˜์—ฌ ์ดํด๋ฆฝ์Šค๋ฅผ ๊ตฌ๋™ํ•˜๊ธฐ ์œ„ํ•œ ํ•„์š” ์ถฉ๋ถ„ ์กฐ๊ฑด์ด ๊ฐ–์ถ”์–ด์กŒ์œผ๋ฏ€๋กœ ์ด์ œ ์ดํด๋ฆฝ์Šค๋ฅผ ๋‹ค์šด๋ฐ›์œผ๋Ÿฌ ๊ฐ€์•ผ ๊ฒ ์ง€์š” ๋‹ค์šด๋กœ๋“œ๊ฐ€ ๊ฐ€๋Šฅํ•œ ์ฃผ์†Œ๋Š” ์—ฌ๊ธฐ๋กœ ๊ฐ€์…”์„œ ์›ํ•˜๋Š” ํŒŒ์ผ์„ ๋‹ค์šด๋ฐ›์œผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋‹ค์šด๋กœ๋“œ๋Š” ๊ตญ๋‚ด์˜ ๊ฒฝ์šฐ ๋‹ค์Œ์„ ํ†ตํ•˜์—ฌ ๋ฐ›์œผ๋ฏ€๋กœ ์ƒ๋‹นํžˆ ๋น ๋ฆ…๋‹ˆ๋‹ค. ์„ค์น˜๋Š” ๊ทธ๋ƒฅ ์••์ถ•์„ C:\์— ํ’€๋ฉด c:\eclipse ๊ฒฝ๋กœ์— ํ’€๋ฆฌ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด์ œ ์œˆ๋„์šฐ ํƒ์ƒ‰๊ธฐ๋ฅผ ์ด์šฉํ•˜์—ฌ C:\eclipse\eclipse.exe ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜์‹œ๋ฉด ์šฐ๋ฆฌ์˜ ์ดํด๋ฆฝ์Šค๋Š” ๋ฉ‹์ง€๊ฒŒ ์‹คํ–‰์ด ๋ฉ๋‹ˆ๋‹ค. ์‹คํ–‰์‹œ์—๋Š” ์ž‘์—…๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•˜์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.