readme

来自「一段linux下用OpenGL实现的小程序」· 代码 · 共 86 行

TXT
86
字号
                Smooth Scrolling                ----------------      This is a simple demonstration of ultra    smooth scrolling, using OpenGL and sub-pixel      accurate rendering. Map editor included.The demo works best with retrace syncronized pageflipping,and on systems that are fast enough to maintain a steadyfull frame rate. In works pretty well without retrace sync,but it isn't nearly as smooth at higher speeds.Note that interpolation across tile edges is solved in amost primitive way in this demo; it's built right into thetile palette. Rather than having the engine do some magic,I'm just relying on the map to use only "compatible" tilestogether. The net result is that the pixels *outside* atile will always match the corresponding pixels of thesurrounding tiles on the map.Command line switches:	-sdl		Use SDL 2D for rendering	-w		Use windowed mode	-s<scale>	Set scale (Default; SDL: 1, OpenGL: 2)	-b<bpp>		Use <bpp> bits per pixel mode			(Default: auto)	-e		Activate map editor	-m <name>	Use map file <name>	-ntf		Disable the "time filter"Redundant switches:	-gl		Use OpenGL for rendering (default)	-f		Use fullscreen mode (default)	-tf		Enable the "time filter"Control:	Arrow keys	Change the scrolling speed.	SPACE		Stop scrolling instantly.	ESC		Exit demo.Using the Map Editor--------------------This demo includes a primitive map editor that I used tocreate the demo map. The editor works only in SDL mode(which is selected automatically), and supports higherresolutions through the -s<scale> switch. The map fileedited is the default map file, or the file specifiedusing the -m <name> switch.Editor control:	F2 or S		Saves the current map, OVERWRITING			any existing file with the same name			as that specified as the map name.	ESC		Exits the editor WITHOUT saving.	SPACE		Switches between selection mode and			editing mode.	CTRL		Enters selection mode, but only for			as long as the CTRL key is held down.	Arrow keys	Scroll the map.	Mouse		Moving the mouse (obviously) moves			the cursor. An animated marker			indicates which exact tile is under			the cursor.	Mouse buttons		Selection mode:			Selects tile for the button clicked.		Editing mode:			Pastes tile selected for the clicked			button.Have fun!			//David Olofson <david@olofson.net>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?