当前位置: 首页>>代码示例>>Java>>正文


Java Log.info方法代码示例

本文整理汇总了Java中org.newdawn.slick.util.Log.info方法的典型用法代码示例。如果您正苦于以下问题:Java Log.info方法的具体用法?Java Log.info怎么用?Java Log.info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.newdawn.slick.util.Log的用法示例。


在下文中一共展示了Log.info方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initGL

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Initialise the GL context
 */
protected void initGL() {
	Log.info("Starting display "+width+"x"+height);
	GL.initDisplay(width, height);
	
	if (input == null) {
		input = new Input(height);
	}
	input.init(height);
	// no need to remove listeners?
	//input.removeAllListeners();
	if (game instanceof InputListener) {
		input.removeListener((InputListener) game);
		input.addListener((InputListener) game);
	}

	if (graphics != null) {
		graphics.setDimensions(getWidth(), getHeight());
	}
	lastGame = game;
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:24,代码来源:GameContainer.java

示例2: getCursor

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Get a cursor based on a set of image data
 * 
 * @param buf The image data (stored in RGBA) to load the cursor from
 * @param x The x-coordinate of the cursor hotspot (left -> right)
 * @param y The y-coordinate of the cursor hotspot (bottom -> top)
 * @param width The width of the image data provided
 * @param height The height of the image data provided
 * @return The create cursor
 * @throws IOException Indicates a failure to load the image
 * @throws LWJGLException Indicates a failure to create the hardware cursor
 */
public Cursor getCursor(ByteBuffer buf,int x,int y,int width,int height) throws IOException, LWJGLException {
	for (int i=0;i<buf.limit();i+=4) {
		byte red = buf.get(i);
		byte green = buf.get(i+1);
		byte blue = buf.get(i+2);
		byte alpha = buf.get(i+3);
		
		buf.put(i+2, red);
		buf.put(i+1, green);
		buf.put(i, blue);
		buf.put(i+3, alpha);
	}
	
	try {
		int yspot = height - y - 1;
		if (yspot < 0) {
			yspot = 0;
		}
		return new Cursor(width,height, x, yspot, 1, buf.asIntBuffer(), null);
	} catch (Throwable e) {
		Log.info("Chances are you cursor is too small for this platform");
		throw new LWJGLException(e);
	}
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:37,代码来源:CursorLoader.java

示例3: init

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Initialise offscreen rendering by checking what buffers are supported
 * by the card
 * 
 * @throws SlickException Indicates no buffers are supported
 */
private static void init() throws SlickException {
	init = true;
	
	if (fbo) {
		fbo = GLContext.getCapabilities().GL_EXT_framebuffer_object;
	}
	pbuffer = (Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) != 0;
	pbufferRT = (Pbuffer.getCapabilities() & Pbuffer.RENDER_TEXTURE_SUPPORTED) != 0;
	
	if (!fbo && !pbuffer && !pbufferRT) {
		throw new SlickException("Your OpenGL card does not support offscreen buffers and hence can't handle the dynamic images required for this application.");
	}
	
	Log.info("Offscreen Buffers FBO="+fbo+" PBUFFER="+pbuffer+" PBUFFERRT="+pbufferRT);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:22,代码来源:GraphicsFactory.java

示例4: getCursor

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Get a cursor based on a set of image data
 * 
 * @param imageData The data from which the cursor can read it's contents
 * @param x The x-coordinate of the cursor hotspot (left -> right)
 * @param y The y-coordinate of the cursor hotspot (bottom -> top)
 * @return The create cursor
 * @throws IOException Indicates a failure to load the image
 * @throws LWJGLException Indicates a failure to create the hardware cursor
 */
public Cursor getCursor(ImageData imageData,int x,int y) throws IOException, LWJGLException {
	ByteBuffer buf = imageData.getImageBufferData();
	for (int i=0;i<buf.limit();i+=4) {
		byte red = buf.get(i);
		byte green = buf.get(i+1);
		byte blue = buf.get(i+2);
		byte alpha = buf.get(i+3);
		
		buf.put(i+2, red);
		buf.put(i+1, green);
		buf.put(i, blue);
		buf.put(i+3, alpha);
	}
	
	try {
		int yspot = imageData.getHeight() - y - 1;
		if (yspot < 0) {
			yspot = 0;
		}
		return new Cursor(imageData.getTexWidth(), imageData.getTexHeight(), x, yspot, 1, buf.asIntBuffer(), null);
	} catch (Throwable e) {
		Log.info("Chances are you cursor is too small for this platform");
		throw new LWJGLException(e);
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:36,代码来源:CursorLoader.java

示例5: destroy

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * @see java.applet.Applet#destroy()
 */
public void destroy() {
   if (displayParent != null) {
      remove(displayParent);
   }
   super.destroy();
   
   Log.info("Clear up");
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:12,代码来源:AppletGameContainer.java

示例6: getBuildVersion

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Get the build number of slick 
 * 
 * @return The build number of slick
 */
public static int getBuildVersion() {
	try {
		Properties props = new Properties();
		props.load(ResourceLoader.getResourceAsStream("version"));
		
		int build = Integer.parseInt(props.getProperty("build"));
		Log.info("Slick Build #"+build);
		
		return build;
	} catch (Exception e) {
		Log.error("Unable to determine Slick build number");
		return -1;
	}
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:20,代码来源:GameContainer.java

示例7: isWebstartAvailable

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
/**
 * Quick test to see if running through Java webstart
 * 
 * @return True if jws running
 */
private boolean isWebstartAvailable() {
	try {
		Class.forName("javax.jnlp.ServiceManager");
		// this causes to go and see if the service is available
		ServiceManager.lookup("javax.jnlp.PersistenceService");
		Log.info("Webstart detected using Muffins");
	} catch (Exception e) {
		Log.info("Using Local File System");
		return false;
	}
	return true;
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:18,代码来源:SavedState.java

示例8: init

import org.newdawn.slick.util.Log; //导入方法依赖的package包/类
@Override
public void init(IGameInstance game, IApiHandler apiHandler, IEventHandler eventHandler)
{
	Log.info("Starting RockSolid");

	ModItems.init();
	ModTiles.init();
	ModEntities.init();
}
 
开发者ID:raphydaphy,项目名称:RockSolid,代码行数:10,代码来源:RockSolid.java


注:本文中的org.newdawn.slick.util.Log.info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。