49 lines
7.3 KiB
TeX
49 lines
7.3 KiB
TeX
\hypertarget{pixel_manager_8cpp_source}{}\doxysection{pixel\+Manager.\+cpp}
|
|
\label{pixel_manager_8cpp_source}\index{src/pixelManager/pixelManager.cpp@{src/pixelManager/pixelManager.cpp}}
|
|
\mbox{\hyperlink{pixel_manager_8cpp}{Go to the documentation of this file.}}
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00001}00001 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{pixel_manager_8h}{pixelManager/pixelManager.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00002}00002 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00003}00003 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00004}\mbox{\hyperlink{class_pixel_manager_a0b28e70e108b042497d483ce85ce5b0e}{00004}} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_pixel_manager_a0b28e70e108b042497d483ce85ce5b0e}{PixelManager::loadSprites}}(vector<Task>\& tasks)\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00005}00005 \mbox{\hyperlink{pixel_manager_8h_a727fdd9384375b1d268475980118b158}{ADD\_SPRITE\_TASK}}(\mbox{\hyperlink{class_pixel_manager_aa108cd115eedc01b2076844b96bc076f}{logo}})}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00006}00006 \mbox{\hyperlink{pixel_manager_8h_a727fdd9384375b1d268475980118b158}{ADD\_SPRITE\_TASK}}(\mbox{\hyperlink{class_pixel_manager_a297c927d2c069c1da7d34d15b11d481d}{menuBackground}})}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00007}00007 \mbox{\hyperlink{pixel_manager_8h_a727fdd9384375b1d268475980118b158}{ADD\_SPRITE\_TASK}}(\mbox{\hyperlink{class_pixel_manager_ad36fc234b6025da179c02d0845df74d8}{gameBackground}})}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00008}00008 \mbox{\hyperlink{pixel_manager_8h_a0d6c7d8ad93692b73f5a30f428af159a}{ADD\_SPRITE\_TASK2}}(\mbox{\hyperlink{class_pixel_manager_a336e6c4321df17aba4b59d07732f051d}{rightHand}}, hand)}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00009}00009 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00010}00010 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00011}\mbox{\hyperlink{class_pixel_manager_a061f872b418537446952b17533ff02d6}{00011}} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_pixel_manager_a061f872b418537446952b17533ff02d6}{PixelManager::startFrame}}()\textcolor{keyword}{ const }\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00012}00012 \mbox{\hyperlink{class_pixel_manager_aaca742e0e39716b5e5a89e422a031c36}{window}}.\mbox{\hyperlink{class_min_g_l_a86c940758616957683ffb2e239bba774}{clearScreen}}();}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00013}00013 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00014}00014 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00015}\mbox{\hyperlink{class_pixel_manager_a39a1801e2c89c10c6a5c9ef33c83e8ec}{00015}} \textcolor{keywordtype}{void} \mbox{\hyperlink{class_pixel_manager_a39a1801e2c89c10c6a5c9ef33c83e8ec}{PixelManager::endFrame}}()\textcolor{keyword}{ const }\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00016}00016 \textcolor{keywordflow}{for}(\mbox{\hyperlink{pixel_manager_8h_a7a271d55f100974f7703690edbaca2e2}{Task}}\& t : \mbox{\hyperlink{class_pixel_manager_a90f43d83f021cebb47740cd4433736dd}{drawTasks}})t.wait();}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00017}00017 \mbox{\hyperlink{class_pixel_manager_aaca742e0e39716b5e5a89e422a031c36}{window}}.\mbox{\hyperlink{class_min_g_l_a489922f0bdde2e38698adddaf57f6eda}{finishFrame}}();}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00018}00018 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00019}00019 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00020}\mbox{\hyperlink{class_pixel_manager_a69a986401035a12c8e12a015b7ac250a}{00020}} \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{class_pixel_manager_a69a986401035a12c8e12a015b7ac250a}{PixelManager::getScreenHeight}}()\textcolor{keyword}{ const }\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00021}00021 \textcolor{keywordflow}{return} \mbox{\hyperlink{class_pixel_manager_aaca742e0e39716b5e5a89e422a031c36}{window}}.\mbox{\hyperlink{class_min_g_l_a92bacd1567089fb4641ed7b416cfe74d}{getWindowSize}}().\mbox{\hyperlink{classns_graphics_1_1_vec2_d_ae70fbda9cca27b9dc0fe068a38ae5e5e}{getY}}();}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00022}00022 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00023}00023 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00024}\mbox{\hyperlink{class_pixel_manager_a755b819d8edf14edcd0d87d5fd3966fd}{00024}} \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{class_pixel_manager_a755b819d8edf14edcd0d87d5fd3966fd}{PixelManager::getScreenWidth}}()\textcolor{keyword}{ const }\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00025}00025 \textcolor{keywordflow}{return} \mbox{\hyperlink{class_pixel_manager_aaca742e0e39716b5e5a89e422a031c36}{window}}.\mbox{\hyperlink{class_min_g_l_a92bacd1567089fb4641ed7b416cfe74d}{getWindowSize}}().\mbox{\hyperlink{classns_graphics_1_1_vec2_d_abcf3d729b05b3cd93e9eff21c74b89a1}{getX}}();}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00026}00026 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00027}00027 }
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00028}00028 vector<RGBAcolor>}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00029}00029 PixelManager::mirrorData(\textcolor{keyword}{const} vector<nsGraphics::RGBAcolor>\& inPixels, \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{sprite_8h_a410460a0a75462ae38c5c9daf5fb06ed}{rowSize}}) \{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00030}00030 vector<RGBAcolor> outPixels;}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00031}00031 \textcolor{comment}{// we reserve size so the vector doesn't dynamically grows}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00032}00032 outPixels.reserve(inPixels.size());}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00033}00033 \textcolor{comment}{//for each line of pixel}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00034}00034 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{unsigned} rowOffset=0; rowOffset < inPixels.size(); rowOffset+=\mbox{\hyperlink{sprite_8h_a410460a0a75462ae38c5c9daf5fb06ed}{rowSize}})\{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00035}00035 \textcolor{comment}{// for each pixel of that line}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00036}00036 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{unsigned} j=0;j<\mbox{\hyperlink{sprite_8h_a410460a0a75462ae38c5c9daf5fb06ed}{rowSize}};++j) \{}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00037}00037 \textcolor{comment}{// push back the pixel opposed to this one (still in the same line)}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00038}00038 outPixels.push\_back(inPixels[rowOffset + \mbox{\hyperlink{sprite_8h_a410460a0a75462ae38c5c9daf5fb06ed}{rowSize}} -\/ j -\/ 1]);}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00039}00039 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00040}00040 \}}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00041}00041 \textcolor{keywordflow}{return} std::move(outPixels);}
|
|
\DoxyCodeLine{\Hypertarget{pixel_manager_8cpp_source_l00042}00042 \}}
|
|
|
|
\end{DoxyCode}
|