Migration Procedures Advice Manual 3 Wheel

Posted on: 1/24/2018 / Admin
supernewpix.bitballoon.com♥ Migration Procedures Advice Manual 3 Wheel
Migration Procedures Advice Manual 3 WheelMigration Procedures Advice Manual 3 Wheel

TRAVEL TRAILER FIFTH WHEEL OWNERS MANUAL. Hitching Procedures for Fifth Wheel Trailers. In this manual includes fifth wheel travel trailers unless otherwise indi. Migration Procedures Advice Manual 3 Jaw Migration Seminars Australia offers a variety of approved CPD framework seminars for migration agents.

Catalogue Persistent Identifier APA Citation Australia. Department of Immigration and Ethnic Affairs. & Australia. Department of Immigration and Ethnic Affairs. Advisings, Legislation and Legal Policy Branch. Procedures advice manual (PAM 3). [Canberra: Australian Govt.

Service] MLA Citation Australia. Department of Immigration and Ethnic Affairs. and Australia. Department of Immigration and Ethnic Affairs.

Advisings, Legislation and Legal Policy Branch. Procedures advice manual (PAM 3) / AL & LP Branch, Central Office Australian Govt. Service] [Canberra 1994 Australian/Harvard Citation Australia.

Department of Immigration and Ethnic Affairs. & Australia. Department of Immigration and Ethnic Affairs.

Advisings, Legislation and Legal Policy Branch. 1994, Procedures advice manual (PAM 3) / AL & LP Branch, Central Office Australian Govt. Service] [Canberra Wikipedia Citation.

Contents • • • • • • • • • • • • • • • • • • • • • • • • • • Translations • • Une traduction de cette page par Developpez.com est disponible. • If you want to translate this page to other languages, let Ryan know: Introduction After many years in development, SDL 2.0 has finally been released! We are quite proud of it, and we'd like games that are using SDL 1.2 to move up right away.

As this can feel like a daunting task, this document is a simple walkthrough of how to migrate to the new library. We think you'll find it's not as hard as you think, and often times, you'll be either replacing function calls with direct equivalents or undoing some hacks in your code to deal with 1.2 deficiencies. We think you'll be very happy with SDL 2.0, both for the new features and the better experience over SDL 1.2. This document doesn't try to cover all the awesome new things in SDL2--and there are many--but just the things you need to do to get running right now. Once you've ported your code, definitely check out the new stuff; you'll probably want to add some of it to your application, too. SDL_Window * screen = SDL_CreateWindow ( 'My Game Window', SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_FULLSCREEN SDL_WINDOW_OPENGL ); You can see that this maps pretty closely to 1.2. The difference is that you can have multiple windows (if you want), and you can control them more.

SDL_WM_SetCaption() is gone, because we want to allow each window to have its own title (you can change it later with ()), and we want to let you specify a window position (or, in this case, use SDL_WINDOWPOS_UNDEFINED since we don't care where the system places it. SDL_WINDOWPOS_CENTERED is also a good choice). Extra credit for letting users specify a display for the window: SDL2 also allows you to manage systems with multiple monitors. Don't worry about that right now, though. So now that your window is back on the screen, let's talk strategy. SDL2 still has, but what you want, if possible, is the new.

Surfaces are always in system RAM now, and are always operated on by the CPU, so we want to get away from there. SDL2 has a new rendering API. It's meant for use by simple 2D games, but most notably, it's meant to get all that software rendering into video RAM and onto the GPU.

And even if you just want to use it to get your software renderer's work to the screen, it brings some very nice benefits: if possible, it will use OpenGL or Direct3D behind the scenes, which means you'll get faster blits, a working Steam Overlay, and scaling for free. The setup looks like this. SDL_SetVideoMode() becomes (), as we discussed before. But what do we put for the resolution? If your game was hardcoded to 640x480, for example, you probably were running into monitors that couldn't do that fullscreen resolution at this point, and in windowed mode, your game probably looked like an animated postage stamp on really high-end monitors. There's a better solution in SDL2. We don't call SDL_ListModes() anymore.

There's an equivalent in SDL2 (call () in a loop, () times), but instead we're going to use a new feature called 'fullscreen desktop,' which tells SDL 'give me the whole screen and don't change the resolution.' For our hypothetical 640x480 game, it might look like this. SDL_Window * sdlWindow = SDL_CreateWindow ( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 0, 0, SDL_WINDOW_FULLSCREEN_DESKTOP ); Notice how we didn't specify 640 or 480.fullscreen desktop gives you the whole display and ignores any dimensions you specify. The game window should come up immediately, without waiting for the monitor to click into a new resolution, and we'll be using the GPU to scale to the desktop size, which tends to be faster and cleaner-looking than if an LCD is faking a lower resolution. Added bonus: none of your background windows are resizing themselves right now.

Now we need a rendering context. SDL_Renderer * renderer = SDL_CreateRenderer ( sdlWindow, - 1, 0 ); A renderer hides the details of how we draw into the window.

This might be using Direct3D, OpenGL, OpenGL ES, or software surfaces behind the scenes, depending on what the system offers; your code doesn't change, regardless of what SDL chooses (although you are welcome to force one kind of renderer or another). If you want to attempt to force sync-to-vblank to reduce tearing, you can use SDL_RENDERER_PRESENTVSYNC instead of zero for the third parameter. You shouldn't create a window with the SDL_WINDOW_OPENGL flag here. If () decides it wants to use OpenGL, it'll update the window appropriately for you. Now that you understand how this works, you can also do this all in one step with (), if you don't want anything fancy.

SDL_SetRenderDrawColor ( sdlRenderer, 0, 0, 0, 255 ); SDL_RenderClear ( sdlRenderer ); SDL_RenderPresent ( sdlRenderer ); This works like you might think; draw in black (r,g,b all zero, alpha full), clear the whole window, put the cleared window on the screen. That's right, if you've been using SDL_UpdateRect() or SDL_Flip() to get your bits to the screen, the render API uses (). One more general thing to set up here. C Complete Reference 5th Edition Pdf Free Download. Since we're using SDL_WINDOW_FULLSCREEN_DESKTOP, we don't actually know how much screen we've got to draw to. Fortunately, we don't have to know. One of the nice things about 1.2 is that you could say 'I want a 640x480 window and I don't care how you get it done,' even if getting it done meant centering the window in a larger resolution on behalf of your application.

For 2.0, the render API lets you do this. SDL_SetHint ( SDL_HINT_RENDER_SCALE_QUALITY, 'linear' ); // make the scaled rendering look smoother. SDL_RenderSetLogicalSize ( sdlRenderer, 640, 480 ).and it will do the right thing for you. This is nice in that you can change the logical rendering size to achieve various effects, but the primary use is this: instead of trying to make the system work with your rendering size, we can now make your rendering size work with the system. On my 1920x1200 monitor, this app thinks it's talking to a 640x480 resolution now, but SDL is using the GPU to scale it up to use all those pixels. Note that 640x480 and 1920x1200 aren't the same aspect ratio: SDL takes care of that, too, scaling as much as possible and letterboxing the difference.

Now we're ready to start drawing for real. If your game just wants to get fully-rendered frames to the screen A special case for old school software rendered games: the application wants to draw every pixel itself and get that final set of pixels to the screen efficiently in one big blit.

An example of a game like this is Doom, or Duke Nukem 3D, or many others. For this, you're going to want a single SDL_Texture that will represent the screen. Let's create one now for our 640x480 game.

SdlTexture = SDL_CreateTexture ( sdlRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 640, 480 ); This represents a texture on the GPU. The gameplan is to finish each frame by uploading pixels to this texture, drawing the texture to the window, and flipping this drawing onto the screen. SDL_TEXTUREACCESS_STREAMING tells SDL that this texture's contents are going to change frequently. Before you probably had an for the screen that your app drew into, then called SDL_Flip() to put to the screen. Now you can create an that is always in RAM instead of using the one you would have gotten from SDL_SetVideoMode(), or just malloc() a block of pixels to write into. Ideally you write to a buffer of RGBA pixels, but if you need to do a conversion, that's okay too. SDL_UpdateTexture ( sdlTexture, NULL, myPixels, 640 * sizeof ( Uint32 )); This will upload your pixels to GPU memory.

That NULL can be a subregion if you want to mess around with dirty rectangles, but chances are modern hardware can just swallow the whole framebuffer without much trouble. The final argument is the pitch--the number of bytes from the start of one row to the next--and since we have a linear RGBA buffer in this example, it's just 640 times 4 (r,g,b,a). Now get that texture to the screen. SDL_RenderClear ( sdlRenderer ); SDL_RenderCopy ( sdlRenderer, sdlTexture, NULL, NULL ); SDL_RenderPresent ( sdlRenderer ); That's all. () wipes out the existing video framebuffer (in case, say, the Steam Overlay wrote over it last frame), () moves the texture's contents to the video framebuffer (and thanks to (), it will be scaled/centered as if the monitor was 640x480), and () puts it on the screen.

If your game wants to blit surfaces to the screen This scenario has your SDL 1.2 game loading a bunch of graphics from disk into a bunch of, possibly trying to get them into video RAM with SDL_HWSURFACE. You load these once, and you blit them over and over to the framebuffer as necessary, but otherwise they never change.

A simple 2D platformer might do this. If you tend to think of your surfaces as 'sprites,' and not buffers of pixels, then this is probably you. You can build individual textures (surfaces that live in GPU memory) like we did for that one big texture. SdlTexture = SDL_CreateTextureFromSurface ( sdlRenderer, mySurface ); Use this, and you load your as usual, but then at the end you make a texture out of it.

Once you have an, you can free the original surface. At this point, your 1.2 game had a bunch of, which it would () to the screen surface to compose the final framebuffer, and eventually SDL_Flip() to the screen. For SDL 2.0, you have a bunch of, that you will () to your Renderer to compose the final framebuffer, and eventually () to the screen.

It's that simple. If these textures never need modification, you might find your framerate has just gone through the roof, too.

If your game wants to do both Things get slightly more complicated if you want to blit surfaces and modify individual pixels in the framebuffer. Round trips--reading data back from textures--can be painfully expensive; generally you want to be pushing data in one direction always. You are probably best off, in this case, keeping everything in software until the final push to the screen, so we'll combine the two previous techniques. The good news: the 1.2 API mostly still exists.

So change your screen surface from this. // if all this hex scares you, check out SDL_PixelFormatEnumToMasks()! SDL_Surface * screen = SDL_CreateRGBSurface ( 0, 640, 480, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 ); SDL_Texture * sdlTexture = SDL_CreateTexture ( sdlRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 640, 480 ).and continue blitting things around and tweaking pixels as before, composing your final framebuffer into this. Once you're ready to get those pixels on the screen, you do this just like in our first scenario. SDL_UpdateTexture ( sdlTexture, NULL, screen ->pixels, screen ->pitch ); SDL_RenderClear ( sdlRenderer ); SDL_RenderCopy ( sdlRenderer, sdlTexture, NULL, NULL ); SDL_RenderPresent ( sdlRenderer ); Note that texture creation may be both expensive and a limited resource: don't call () every frame.

Set up one texture and one surface and update the former from the latter. There are more features to the Render API, some of which may be able to replace your application's code: scaling, line drawing, etc. If you are reading this section because you have simple needs beyond blitting surfaces, you might be able to stop poking individual pixels and move everything onto the GPU, which will give your program a significant speed boost and probably simplify your code greatly. Other Renderer API notes You can do some simple effects with the render API without having to get down into direct pixel manipulation. Some of these were available on 1.2 surfaces. • Color alpha: now contains a fourth, alpha component. Your 1.2 code that deals with SDL_Colors might be not copying/setting that value (which was named unused).

In 2.0, you should. • Alpha blending: use and instead of SDL_SetAlpha(). Alpha-blending on surfaces can be disabled via () and on textures with ().

• Colorkey: When calling (), you should pass SDL_TRUE instead of SDL_SRCCOLORKEY. • Color modulation: Some renderers now support a global color alteration ( srcC = srcC * color), check () for details. OpenGL If you were already using OpenGL directly, your migration is pretty simple. Change your SDL_SetVideoMode() call to () followed by (), and your SDL_GL_SwapBuffers() call to (window). All the actual calls into the GL are exactly the same. If you had used (SDL_GL_SWAP_CONTROL, x), this has changed.

There is now an (x) call, so you can change this on an existing GL context. Note that SDL 2.0 can toggle windowed/fullscreen and back with OpenGL windows without losing the GL context (hooray!). Use () for this. Input The good news is that SDL 2.0 has made Unicode input usable. The bad news is that it will take some minor changes to your application. In 1.2, many applications that only cared about US English still called SDL_EnableUNICODE(1), because it was useful to get the character that was associated with a keypress. This didn't work well once you got outside of English, and it really didn't work at all once you got to Asian languages.

It turns out, i18n is hard. SDL changed this. SDL_EnableUNICODE() is gone, and so is 's unicode field.

You no longer get character input from events. Use to treat the keyboard like a 101-button joystick now. Text input comes from somewhere else. The new event is. This is triggered whenever there's new text entered by the user.

Note that this text might be coming from keypresses, or it might be coming from some sort of IME (which is a fancy way of entering complicated, multi-character text). This event returns entire strings, which might be one char long, or several codepoints of multi-character data. This string is always in UTF-8 encoding. If all you care about is whether the user pressed a certain key, that's still, but we've split this system into two pieces since 1.2: keycodes and scancodes. Scancodes are meant to be layout-independent. Think of this as 'the user pressed the Q key as it would be on a US QWERTY keyboard' regardless of whether this is actually a European keyboard or a Dvorak keyboard or whatever.

The scancode is always the same key position. Keycodes are meant to be layout-dependent. Think of this as 'the user pressed the key that is labelled 'Q' on a specific keyboard.' In example, if you pressed the key that's two keys to the right of CAPS LOCK on a US QWERTY keyboard, it'll report a scancode of SDL_SCANCODE_S and a keycode of SDLK_S. The same key on a Dvorak keyboard, will report a scancode of SDL_SCANCODE_S and a keycode of SDLK_O. Note that both keycodes and scancodes are now 32 bits, and use a wide range of numbers. There's no SDLK_LAST anymore.

If your program had a lookup table of SDLK_LAST elements, to map between SDL keys and whatever your application wanted internally, that's no longer feasible. Use a hash table instead. A std::map will do. If you're mapping scancodes instead of keycodes, there's SDL_NUM_SCANCODES, which you can use for array bounds. It's 512 at the moment.

SDLMod is now and its 'META' keys (the 'Windows' keys) are now called the 'GUI' keys. SDL_GetKeyState() has been renamed to (). The returned array should now be indexed by SDL_SCANCODE_* values (see ) instead of values. Now, for mouse input. The first change, simply enough, is that the mousewheel is no longer a button.

This was a mistake of history, and we've corrected it in SDL 2.0. Look for events. We support both vertical and horizontal wheels, and some platforms can treat two-finger scrolling on a trackpad as wheel input, too. You will no longer receive events for mouse wheels, and buttons 4 and 5 are real mouse buttons now. If your game needed to roll the mouse in one direction forever, for example to let a player in an FPS to spin around without the mouse hitting the edge of the screen and stopping, you probably hid the mouse cursor and grabbed input. SDL_PeepEvents ( & event, 1, SDL_GETEVENT, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONDOWN ); Audio The good news for audio is that, with one exception, it's entirely backwards compatible with 1.2. If you want the new features, they're available to you, but you'll probably just compile and run without them.

That one really important exception: The audio callback does NOT start with a fully initialized buffer anymore. You must fully write to the buffer in all cases. If you don't have enough audio, your callback should write silence. If you fail to do this, you'll hear repeated audio, or maybe audio corruption. If you want to restore the old behavior of unconditionally initializing the buffer, just put an SDL_memset(stream, 0, len) at the start of your callback.

Joysticks Joystick events now refer to an SDL_JoystickID. This is because SDL 2.0 can handle joysticks coming and going, as devices are plugged in and pulled out during your game's lifetime, so the index into the device list that 1.2 uses would be meaningless as the available device list changes. To get an SDL_JoystickID for your opened SDL_Joystick*, call. SDL_JoystickID myID = SDL_JoystickInstanceID ( myOpenedStick ); And compare the joystick events' which field against myID. If you aren't using the event queue for joysticks, () and friends work just like SDL 1.2.

You should also check out the new too, because it's cool, and maybe you did a lot of tap dancing with the 1.2 API that this new code would solve more cleanly. You can find it in SDL_gamecontroller.h. The Game Controller API integrates really nicely with Steam Big Picture Mode: you get automatic configuration of most controllers, and a nice UI if you have to manually configure it. In either case, Steam passes this configuration on to your SDL application. Support for the older joystick API (/dev/input/js*) for Linux has been dropped from SDL2. SDL2 only supports the newer events API (/dev/input/event*) for joysticks.

These events are not normally readable for normal user accounts, so even if joysticks are plugged in you will likely have none detected. This is something that end users will have to configure for themselves. Threads SDL_KillThread() is gone.

It was never safe or reliable. The best replacement is to set a flag that tells a thread it should quit. That thread should check the flag with some frequency, and then the 'killing' thread calls () to clean up. () takes an extra parameter now, a name for the thread, which can be used by debuggers to identify it. If you don't care about that, just stuff an extra NULL into your function call. Audio CDs The 1.2 CD API is completely gone.

There's no replacement. Chances are you aren't shipping your music as CD-Audio tracks on a disc at this point, if you're shipping a disc at all. You can use or some other audio file format for music, many of which are provided.

Dead platforms We ripped out a bunch of old platforms, like OS/2 and Mac OS 9. It would be easier to list the ones we still support: Windows (XP and later), Linux, Mac OS X, iOS, Android. In SDL tradition, there are others on the periphery that work but aren't heavily supported, like Haiku and Sony PSP.

We'll add any platform that someone sends patches for, but it seemed like it was time to say goodbye to some old friends when moving to the new version. Mobile platforms There have been, for many years, unofficial ports of SDL 1.2 to iOS and Android. SDL now supports these platforms directly, and the 2.0 API is much better suited to them.

Most of the advice you've gotten elsewhere in this document applies, but there are a few other things worth noting. University Of Findlay Faculty Handbook Columbia here. First, there are certain events that only apply to mobile devices, or better said, apply to the way mobile device OSes tend to operate in a post-iPhone world.

We originally tried to map these to the existing SDL events (such as 'your application is going to the background' being treated like a desktop window losing focus), but there's a more urgent concern: most of these events need an immediate response, and if the app doesn't give one, the OS will kill your application. As such, we've added new SDL events for some Android and iOS specific details, but you should set up an SDL event filter to catch them as soon as the OS reports them, because waiting until your next () loop will be too late. For example, there's SDL_APP_WILLENTERBACKGROUND, which is iOS's applicationWillResignActive(), and if you draw to the screen after this event arrives, iOS terminates your process. So you want to catch this immediately.