Skip to content

Commit b2e5c11

Browse files
authored
Add files via upload
1 parent 4fc903b commit b2e5c11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+129
-0
lines changed

helloOctober/SDL2.dll

1020 KB
Binary file not shown.

helloOctober/SDL2_image.dll

136 KB
Binary file not shown.

helloOctober/SDL2_mixer.dll

136 KB
Binary file not shown.

helloOctober/bin/Debug/SDL2.dll

1020 KB
Binary file not shown.

helloOctober/bin/Debug/SDL2_image.dll

136 KB
Binary file not shown.

helloOctober/bin/Debug/SDL2_mixer.dll

136 KB
Binary file not shown.
1.52 MB
Binary file not shown.

helloOctober/bin/Debug/libFLAC-8.dll

378 KB
Binary file not shown.

helloOctober/bin/Debug/libjpeg-9.dll

219 KB
Binary file not shown.
372 KB
Binary file not shown.
332 KB
Binary file not shown.

helloOctober/bin/Debug/libogg-0.dll

46 KB
Binary file not shown.
198 KB
Binary file not shown.

helloOctober/bin/Debug/libtiff-5.dll

437 KB
Binary file not shown.
192 KB
Binary file not shown.
62 KB
Binary file not shown.

helloOctober/bin/Debug/libwebp-7.dll

407 KB
Binary file not shown.

helloOctober/bin/Debug/zlib1.dll

125 KB
Binary file not shown.

helloOctober/bin/Release/SDL2.dll

1020 KB
Binary file not shown.
136 KB
Binary file not shown.
136 KB
Binary file not shown.
786 KB
Binary file not shown.
378 KB
Binary file not shown.
219 KB
Binary file not shown.
372 KB
Binary file not shown.
332 KB
Binary file not shown.

helloOctober/bin/Release/libogg-0.dll

46 KB
Binary file not shown.
198 KB
Binary file not shown.
437 KB
Binary file not shown.
192 KB
Binary file not shown.
62 KB
Binary file not shown.
407 KB
Binary file not shown.

helloOctober/bin/Release/zlib1.dll

125 KB
Binary file not shown.

helloOctober/helloOctober.cbp

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<CodeBlocks_project_file>
3+
<FileVersion major="1" minor="6" />
4+
<Project>
5+
<Option title="helloOctober" />
6+
<Option pch_mode="2" />
7+
<Option compiler="gcc" />
8+
<Build>
9+
<Target title="Debug">
10+
<Option output="bin/Debug/helloOctober" prefix_auto="1" extension_auto="1" />
11+
<Option object_output="obj/Debug/" />
12+
<Option type="1" />
13+
<Option compiler="gcc" />
14+
<Compiler>
15+
<Add option="-g" />
16+
</Compiler>
17+
</Target>
18+
<Target title="Release">
19+
<Option output="bin/Release/helloOctober" prefix_auto="1" extension_auto="1" />
20+
<Option object_output="obj/Release/" />
21+
<Option type="1" />
22+
<Option compiler="gcc" />
23+
<Compiler>
24+
<Add option="-O2" />
25+
</Compiler>
26+
<Linker>
27+
<Add option="-s" />
28+
</Linker>
29+
</Target>
30+
</Build>
31+
<Compiler>
32+
<Add option="-Wall" />
33+
<Add option="-fexceptions" />
34+
</Compiler>
35+
<Unit filename="main.cpp" />
36+
<Extensions>
37+
<code_completion />
38+
<envvars />
39+
<debugger />
40+
<lib_finder disable_auto="1" />
41+
</Extensions>
42+
</Project>
43+
</CodeBlocks_project_file>

helloOctober/helloOctober.depend

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# depslib dependency file v1.0
2+
1539573747 source:c:\users\richard\myprograms\myapps\hellooctober\main.cpp
3+
<iostream>
4+
<SDL.h>
5+
<SDL_main.h>
6+
<SDL_image.h>
7+
23.1 KB
28.4 KB
26.7 KB

helloOctober/libFLAC-8.dll

378 KB
Binary file not shown.

helloOctober/libjpeg-9.dll

219 KB
Binary file not shown.

helloOctober/libmodplug-1.dll

372 KB
Binary file not shown.

helloOctober/libmpg123-0.dll

332 KB
Binary file not shown.

helloOctober/libogg-0.dll

46 KB
Binary file not shown.

helloOctober/libpng16-16.dll

198 KB
Binary file not shown.

helloOctober/libtiff-5.dll

437 KB
Binary file not shown.

helloOctober/libvorbis-0.dll

192 KB
Binary file not shown.

helloOctober/libvorbisfile-3.dll

62 KB
Binary file not shown.

helloOctober/libwebp-7.dll

407 KB
Binary file not shown.

helloOctober/main.cpp

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
#include <SDL.h>
5+
#include <SDL_main.h>
6+
#include <SDL_image.h>
7+
int main(int argc, char* argv[])
8+
{
9+
bool october = true;
10+
int frame = 0;
11+
int windowWidth = 800; int windowHeight = 600;
12+
SDL_Init(SDL_INIT_EVERYTHING);
13+
SDL_Window* window =
14+
SDL_CreateWindow("helloOctober", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, windowWidth, windowHeight, SDL_WINDOW_SHOWN );
15+
SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, 0) ;
16+
SDL_Surface* bgSurf1 = IMG_Load("images/halloween-moving1.png") ;
17+
SDL_Texture* bgTexture1 = SDL_CreateTextureFromSurface(renderer, bgSurf1);
18+
SDL_Surface* bgSurf2 = IMG_Load("images/halloween-moving2.png") ;
19+
SDL_Texture* bgTexture2 = SDL_CreateTextureFromSurface(renderer, bgSurf2);
20+
SDL_Surface* bgSurf3 = IMG_Load("images/halloween-moving3.png") ;
21+
SDL_Texture* bgTexture3 = SDL_CreateTextureFromSurface(renderer, bgSurf3);
22+
SDL_Texture* bg[3]; bg[0] = bgTexture1; bg[1] = bgTexture2; bg[2] = bgTexture3;
23+
SDL_Rect bgRect; bgRect.w = windowWidth; bgRect.h = windowHeight; bgRect.x = 0; bgRect.y = 0;
24+
SDL_Event event;
25+
while(october)
26+
{
27+
// message processing loop
28+
29+
while (SDL_PollEvent(&event))
30+
{
31+
// check for messages
32+
switch (event.type)
33+
{
34+
// exit if the window is closed
35+
case SDL_QUIT:
36+
october = false;
37+
break;
38+
39+
// check for keypresses
40+
case SDL_KEYDOWN:
41+
{
42+
// exit if ESCAPE is pressed
43+
if (event.key.keysym.sym == SDLK_ESCAPE)
44+
october = true;
45+
if (event.key.keysym.sym == SDLK_RIGHT)
46+
{
47+
48+
}
49+
if (event.key.keysym.sym == SDLK_LEFT)
50+
{
51+
52+
}
53+
break;
54+
}
55+
} // end switch
56+
} // end of message processing
57+
58+
// DRAWING STARTS HERE
59+
60+
// clear screen
61+
// SDL_RenderClear(renderer);
62+
63+
// draw
64+
SDL_RenderClear(renderer);
65+
//SDL_RenderCopy(renderer, bg[0], &bgRect, NULL);
66+
SDL_RenderCopy(renderer, bg[0], &bgRect, NULL);
67+
SDL_RenderCopy(renderer, bg[frame], &bgRect, NULL);
68+
69+
SDL_RenderPresent(renderer);
70+
frame= frame + 1; if (frame > 2) frame = 1;
71+
SDL_Delay(600);
72+
73+
// DRAWING ENDS HERE
74+
75+
// finally, update the screen :
76+
}
77+
cout << "Hello October!" << endl;
78+
return 0;
79+
}

helloOctober/obj/Debug/main.o

31.1 KB
Binary file not shown.

helloOctober/obj/Release/main.o

2.81 KB
Binary file not shown.

helloOctober/zlib1.dll

125 KB
Binary file not shown.

0 commit comments

Comments
 (0)