Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
aef1c883
Commit
aef1c883
authored
Feb 11, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up the file a bit for tutorial viewing
parent
5540f2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
109 deletions
+23
-109
teststreaming.c
test/teststreaming.c
+23
-109
No files found.
test/teststreaming.c
View file @
aef1c883
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL.h"
...
@@ -17,123 +16,38 @@
...
@@ -17,123 +16,38 @@
#define MOOSEFRAMES_COUNT 10
#define MOOSEFRAMES_COUNT 10
SDL_Color
MooseColors
[
84
]
=
{
SDL_Color
MooseColors
[
84
]
=
{
{
49
,
49
,
49
}
{
49
,
49
,
49
},
{
66
,
24
,
0
},
{
66
,
33
,
0
},
{
66
,
66
,
66
},
,
{
66
,
24
,
0
}
{
66
,
115
,
49
},
{
74
,
33
,
0
},
{
74
,
41
,
16
},
{
82
,
33
,
8
},
,
{
66
,
33
,
0
}
{
82
,
41
,
8
},
{
82
,
49
,
16
},
{
82
,
82
,
82
},
{
90
,
41
,
8
},
,
{
66
,
66
,
66
}
{
90
,
41
,
16
},
{
90
,
57
,
24
},
{
99
,
49
,
16
},
{
99
,
66
,
24
},
,
{
99
,
66
,
33
},
{
99
,
74
,
33
},
{
107
,
57
,
24
},
{
107
,
82
,
41
},
{
66
,
115
,
49
}
{
115
,
57
,
33
},
{
115
,
66
,
33
},
{
115
,
66
,
41
},
{
115
,
74
,
0
},
,
{
74
,
33
,
0
}
{
115
,
90
,
49
},
{
115
,
115
,
115
},
{
123
,
82
,
0
},
{
123
,
99
,
57
},
,
{
74
,
41
,
16
}
{
132
,
66
,
41
},
{
132
,
74
,
41
},
{
132
,
90
,
8
},
{
132
,
99
,
33
},
,
{
82
,
33
,
8
}
{
132
,
99
,
66
},
{
132
,
107
,
66
},
{
140
,
74
,
49
},
{
140
,
99
,
16
},
,
{
140
,
107
,
74
},
{
140
,
115
,
74
},
{
148
,
107
,
24
},
{
148
,
115
,
82
},
{
82
,
41
,
8
}
{
148
,
123
,
74
},
{
148
,
123
,
90
},
{
156
,
115
,
33
},
{
156
,
115
,
90
},
,
{
82
,
49
,
16
}
{
156
,
123
,
82
},
{
156
,
132
,
82
},
{
156
,
132
,
99
},
{
156
,
156
,
156
},
,
{
82
,
82
,
82
}
{
165
,
123
,
49
},
{
165
,
123
,
90
},
{
165
,
132
,
82
},
{
165
,
132
,
90
},
,
{
90
,
41
,
8
}
{
165
,
132
,
99
},
{
165
,
140
,
90
},
{
173
,
132
,
57
},
{
173
,
132
,
99
},
,
{
173
,
140
,
107
},
{
173
,
140
,
115
},
{
173
,
148
,
99
},
{
173
,
173
,
173
},
{
90
,
41
,
16
}
{
181
,
140
,
74
},
{
181
,
148
,
115
},
{
181
,
148
,
123
},
{
181
,
156
,
107
},
,
{
90
,
57
,
24
}
{
189
,
148
,
123
},
{
189
,
156
,
82
},
{
189
,
156
,
123
},
{
189
,
156
,
132
},
,
{
99
,
49
,
16
}
{
189
,
189
,
189
},
{
198
,
156
,
123
},
{
198
,
165
,
132
},
{
206
,
165
,
99
},
,
{
99
,
66
,
24
}
{
206
,
165
,
132
},
{
206
,
173
,
140
},
{
206
,
206
,
206
},
{
214
,
173
,
115
},
,
{
214
,
173
,
140
},
{
222
,
181
,
148
},
{
222
,
189
,
132
},
{
222
,
189
,
156
},
{
99
,
66
,
33
}
{
222
,
222
,
222
},
{
231
,
198
,
165
},
{
231
,
231
,
231
},
{
239
,
206
,
173
}
,
{
99
,
74
,
33
}
,
{
107
,
57
,
24
}
,
{
107
,
82
,
41
}
,
{
115
,
57
,
33
}
,
{
115
,
66
,
33
}
,
{
115
,
66
,
41
}
,
{
115
,
74
,
0
}
,
{
115
,
90
,
49
}
,
{
115
,
115
,
115
}
,
{
123
,
82
,
0
}
,
{
123
,
99
,
57
}
,
{
132
,
66
,
41
}
,
{
132
,
74
,
41
}
,
{
132
,
90
,
8
}
,
{
132
,
99
,
33
}
,
{
132
,
99
,
66
}
,
{
132
,
107
,
66
}
,
{
140
,
74
,
49
}
,
{
140
,
99
,
16
}
,
{
140
,
107
,
74
}
,
{
140
,
115
,
74
}
,
{
148
,
107
,
24
}
,
{
148
,
115
,
82
}
,
{
148
,
123
,
74
}
,
{
148
,
123
,
90
}
,
{
156
,
115
,
33
}
,
{
156
,
115
,
90
}
,
{
156
,
123
,
82
}
,
{
156
,
132
,
82
}
,
{
156
,
132
,
99
}
,
{
156
,
156
,
156
}
,
{
165
,
123
,
49
}
,
{
165
,
123
,
90
}
,
{
165
,
132
,
82
}
,
{
165
,
132
,
90
}
,
{
165
,
132
,
99
}
,
{
165
,
140
,
90
}
,
{
173
,
132
,
57
}
,
{
173
,
132
,
99
}
,
{
173
,
140
,
107
}
,
{
173
,
140
,
115
}
,
{
173
,
148
,
99
}
,
{
173
,
173
,
173
}
,
{
181
,
140
,
74
}
,
{
181
,
148
,
115
}
,
{
181
,
148
,
123
}
,
{
181
,
156
,
107
}
,
{
189
,
148
,
123
}
,
{
189
,
156
,
82
}
,
{
189
,
156
,
123
}
,
{
189
,
156
,
132
}
,
{
189
,
189
,
189
}
,
{
198
,
156
,
123
}
,
{
198
,
165
,
132
}
,
{
206
,
165
,
99
}
,
{
206
,
165
,
132
}
,
{
206
,
173
,
140
}
,
{
206
,
206
,
206
}
,
{
214
,
173
,
115
}
,
{
214
,
173
,
140
}
,
{
222
,
181
,
148
}
,
{
222
,
189
,
132
}
,
{
222
,
189
,
156
}
,
{
222
,
222
,
222
}
,
{
231
,
198
,
165
}
,
{
231
,
231
,
231
}
,
{
239
,
206
,
173
}
};
};
Uint8
MooseFrames
[
MOOSEFRAMES_COUNT
][
MOOSEFRAME_SIZE
];
Uint8
MooseFrames
[
MOOSEFRAMES_COUNT
][
MOOSEFRAME_SIZE
];
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
void
quit
(
int
rc
)
static
void
quit
(
int
rc
)
{
{
SDL_Quit
();
SDL_Quit
();
exit
(
rc
);
exit
(
rc
);
}
}
static
void
UpdateTexture
(
SDL_Texture
*
texture
,
int
frame
)
void
UpdateTexture
(
SDL_Texture
*
texture
,
int
frame
)
{
{
SDL_Color
*
color
;
SDL_Color
*
color
;
Uint8
*
src
;
Uint8
*
src
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment