I have read a lot of SDL-related information and have been quite impressed. However, if you want to do a good job, you should first look at how others are doing well. There are many open-source examples on the SDL main site. Here I will select one.
Pig is a relatively simple and displays sdl_video functions. It is a good example.: Http://olofson.net/examples.htmlIn addition, pig requires support for
Since pig uses C code, we can analyze it from Main. The basic steps of the SDL call process are as follows:1. initialize SDL through sdl_init2. Build the main surface through sdl_setvideomode3. Get the keyboard status array through sdl_getkeystate4. Start message loop5. Get the message through sdl_pollevent and process it until it is completed.
The following are the main functions.
/*-----------------------
. Otherwise, the two images are flipped back to the back. How can we determine whether two images are the same, the solution is to determine whether the two images are the same based on the first two-dimensional array PIC [4] [4. Until all the pictures are flipped and the game ends. Finally, the powerful feature of SDL is used to create an animated interface to end the game.
The complete code is as follows:
# Include "
This is a description of the form that uses SDL in Firebreath.At the time, Firebreath used SDL to play video, the video form did not dock on the page, but rather a dialog box floating outside theLooking for a long time, found a related article:in the onwindowattached inside Call Set_sdl_window ();BOOL Yourplugin::onwindowattached (Fb::attachedevent *evt, FB::P luginwindow *win) { //the window is attache
NDK compiles SDLGet ready:Hardwarea computer, experiment in Lenovo T430 ona Android device, experiment at Samsung S3/a7Compilation Environment:Ubuntu 14.04 (Ant\java and other commands must be supported )Tool Kit:NDK:https://dl.google.com/android/ndk/android-ndk32-r10b-linux-x86_64.tar.bz2SDK:https://dl.google.com/android/adt/adt-bundle-linux-x86_64-20140702.zipSDL:http://www.libsdl.org/release/SDL2-2.0.3.tar.gzSteps:Unzip Sdl:Tar-xvzfsdl2-2.0.3.tar.gzcd~/work/study/ffmpeg/sdl2-2.0.3Unzip NDK,
FFMPEG and SDL APIs
Video decoding and display using the ffmpeg api and sdl api seem to be a bit technical. I recently received some emails asking about video decoding and display, today, hanyionet provides a blog article to briefly describe how to use these Apis. In fact, it is not difficult to use these Apis. Do not be afraid of complicated descriptions. All we need to do is first understand
Orx is not a very mature engine. I have always felt that compared with many mature engines, orx still lacks many functions and lacks many useful game concepts. However, we can see the unremitting efforts of the author iarwain. He once mentioned that while working at Ubisoft, he wants to take his children and devote all his spare time to orx development ..... In addition, iarwain development orx is just for fun .....
In version 1.2, iarwain adds new features,"
Custom bitmaps support and UTF-8 s
#include Compile command: ARM-LINUX-GCC bmp.c-o bmp-lpthread LIBSDL.AReference:MFC displays BMP, RGB, YUV http://blog.csdn.net/mao0514/article/details/10007873 with SDLIf you want to display a JPG pictureSdl_image use of libraries sdl bmp format pictures, and in most cases we need to display the Span style= "font-family: ' Times New Roman ', serif;" >jpeg,png format picture, this time we need to use the Span style= "font-family: ' Times Ne
Image loading is a common step in the game, and SDL provides an easy way to load and display pictures
Before this, however, you have to create a window to show that SDL provides the following simple function
sdl_surface* sdl_setvideomode (int width, int height, int bitsperpixel, Uint32 flags);
width, and height two parameters represent the width and height of the window, the BitsPerPixel parameter refers to
Windows 7 has escaped the monthly patching process executed this week, but has not escaped hacker's attention. some security researchers said they have discovered the first zero-day attack security vulnerability in Windows 7. microsoft is investigating this issue.
Security researcher laurentgaffié called Microsoft on Wednesday (March 13, November 11) to criticize Microsoft's SDL (secure development lifecycle) process. he also published a proof of conc
Address: http://www.linuxidc.com/Linux/2010-07/26965.htm
Because of work needs, you need to develop a demo under meegoProgramIn combination with our touch screen, we will demonstrate it to our customers. There was already a software for Windows that imitates the iPhone. The effect was quite good. You can use your fingers to draw pictures and play a virtual piano on your computer screen, so this time we transplanted this program to meego. Since the meego kernel is a standard kernel, it is not a
Today, I took out my work on my computer and tried to use the SDL game engine. A simple version was a 20-second game that a man insisted on ..
Players can use the wsad keyboard to escape objects from all directions and see how long they will last.
Images are obtained online or by yourself.
Game Over
Simply paste the code ~
# Pragma comment (Lib, "SDL/lib/SDL
Use FireBreath to develop real-time playback interfaces (Yate + SIP + FFMPEG + SDL) and firebreathyate
At that time, such a blog post was really needed to guide this function module. Unfortunately, FireBreath has very little information on the Internet and is not very familiar with C ++, so we tried and explored it all the way. Fortunately, we have implemented this module, and now we have recorded it.
First of all, our Yate SIP Server and terminal SI
This article is about how to invoke C (c + +)-written DLLs in a C # environment.
"Reprint marked the source."
First, the preferred creation of a C DLL project, production DLL files used for standby, steps are as follows:
1, VS2010 create C + + Project Select Win32 Application, the name is Createcdll, in the application settings interface to select the DLL, the fo
Stackblur is the Android standard fuzzy algorithm, which also caused a wave of Mao glass. IOS7 uses this algorithm (which is suspected of copying Android because Android1.5 added this function to the library). The algorithm is highly efficient, which is why it can run smoothly on mobile devices. But it is only the standard library function on Andorid, and the ported version only appears on Java. This article brings up a stackblur algorithm that is ported on
Before using the SDL library, you need to load various subsystems, just as if you want to play a movie, you must provide the video to the player.
The function for loading the subsystem is
Int sdl_init (uint32 flags );
The recommended flags values are as follows:
# Define Sdl_init_timer0x00000001 Timer # Define Sdl_init_audio0x00000010 audio # Define Sdl_init_video0x00000020 videos # Define Sdl_init_cdrom0x00000100 Optical Drive #
Tags: Io OS file 2014 problems C R ad UI
Last year, I learned to use the SDL example to compile a plug-in named simpletext. Every time I open trados 2014, I Have To prompt three times to load the plug-in, which is annoying. But when I want to unload it, I have no idea what to do. This problem has plagued me for a long time. This morning, my mind is better. After opening this project in Visual Studio and building it, I found that output is in C: \ Use
Original: http://lazyfoo.net/tutorials/SDL/22_timing/index.php Timing Timing Last Updated 3/10/14 Another important part of any sort of gaming API are the ability to handle time. In this tutorial we'll make a timer we can restart. Another important part of any game API is the ability to handle time parameters. In this tutorial, we will write a timer that can be restarted. Using SDL, Sdl_image, Sdl_ttf, St
you can run it directly. The effect remains to be verified!
SDL is short for Simple DirectMedia Layer (Simple direct control media Layer. It is a cross-platform multi-media library used to directly control the underlying multimedia hardware interfaces. It is mainly used for game development!
Ubuntu's new establishment already contains the SDL library, so you can install it by using a few simple commands, w
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.