Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netrunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Odilitime
netrunner
Commits
30b2a955
Commit
30b2a955
authored
7 years ago
by
despair
Browse files
Options
Downloads
Patches
Plain Diff
activated animu grill in nt builds
parent
65c61d9e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/graphics/components/AnimeComponent.cpp
+14
-1
14 additions, 1 deletion
src/graphics/components/AnimeComponent.cpp
src/main.cpp
+2
-2
2 additions, 2 deletions
src/main.cpp
with
16 additions
and
3 deletions
src/graphics/components/AnimeComponent.cpp
+
14
−
1
View file @
30b2a955
...
...
@@ -2,6 +2,9 @@
#include
<cmath>
#include
<iostream>
#include
"../../pnm.h"
#ifdef __MINGW32__
#include
"../../../anime.h"
#endif
AnimeComponent
::
AnimeComponent
(
const
float
rawX
,
const
float
rawY
,
const
float
rawWidth
,
const
float
rawHeight
,
const
int
passedWindowWidth
,
const
int
passedWindowHeight
)
:
BoxComponent
(
rawX
,
rawY
,
rawWidth
,
rawHeight
,
0x00000000
,
passedWindowWidth
,
passedWindowHeight
)
{
//std::cout << "AnimeComponent::AnimeComponent" << std::endl;
...
...
@@ -14,11 +17,20 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r
width
=
rawWidth
;
height
=
rawHeight
;
#ifdef __MINGW32__ // the old "huge string" works fine with mingw
for
(
int
py
=
0
;
py
<
1024
;
py
++
)
{
for
(
int
px
=
0
;
px
<
1024
;
px
++
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
data
[
1023
-
py
][
px
][
i
]
=
anime
.
pixel_data
[((
px
*
4
)
+
(
py
*
4
*
1024
))
+
i
];
}
}
}
#else // this is either non-Windows or using Microsoft C/C++
RGBAPNMObject
*
anime
=
readPPM
(
"anime.pnm"
);
if
(
!
anime
)
{
std
::
cout
<<
"Can't set up anime component, couldn't read anime.pnm"
<<
std
::
endl
;
}
for
(
int
py
=
0
;
py
<
1024
;
py
++
)
{
for
(
int
px
=
0
;
px
<
1024
;
px
++
)
{
if
(
anime
)
{
...
...
@@ -31,6 +43,7 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r
}
}
}
#endif
float
vx
=
rawX
;
float
vy
=
rawY
;
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
2
−
2
View file @
30b2a955
...
...
@@ -8,11 +8,11 @@
#include
<ctime>
#include
<iostream>
#include
<sys/stat.h>
#ifdef _WIN32
extern
"C"
{
#ifdef _WIN32
void
init_heap
();
#endif
}
#endif
#if defined(_WIN32) && !defined(_WIN64)
#define PLATFORM "i686-pc-winnt"
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment