Changeset a23fc08 in opengl-game for new-game.cpp


Ignore:
Timestamp:
May 24, 2019, 8:52:32 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
6abfd07
Parents:
98f06d9
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (05/24/19 20:22:31)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (05/24/19 20:52:32)
Message:

Move several functions from new-game.cpp to utils.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • new-game.cpp

    r98f06d9 ra23fc08  
    198198unsigned char* loadImage(string file_name, int* x, int* y);
    199199
    200 void printVec3(string label, const vec3& v);
    201 void printVec4(string label, const vec4& v);
    202 void printMat4(string label, const mat4& m);
    203 
    204200void initObject(SceneObject* obj);
    205201void addObjectToScene(SceneObject* obj,
     
    255251void initGuiValueLists(map<string, vector<UIValue>> valueLists);
    256252void renderGuiValueList(vector<UIValue>& values);
    257 
    258 float getRandomNum(float low, float high);
    259253
    260254#define NUM_KEYS (512)
     
    13481342}
    13491343
    1350 void printVec3(string label, const vec3& v) {
    1351    cout << label << " -> (" << v.x << "," << v.y << "," << v.z << ")" << endl;
    1352 }
    1353 
    1354 void printVec4(string label, const vec4& v) {
    1355    cout << label << " -> (" << v.x << "," << v.y << "," << v.z << "," << v.w << ")" << endl;
    1356 }
    1357 
    1358 void printMat4(string label, const mat4& m) {
    1359    cout << label << ": " << endl;
    1360    cout << "[ " << m[0][0] << " " << m[1][0] << " " << m[2][0] << " " << m[3][0] <<  " ]" << endl;
    1361    cout << "[ " << m[0][1] << " " << m[1][1] << " " << m[2][1] << " " << m[3][1] <<  " ]" << endl;
    1362    cout << "[ " << m[0][2] << " " << m[1][2] << " " << m[2][2] << " " << m[3][2] <<  " ]" << endl;
    1363    cout << "[ " << m[0][3] << " " << m[1][3] << " " << m[2][3] << " " << m[3][3] <<  " ]" << endl;
    1364 }
    1365 
    13661344// TODO: Pass a reference, not a pointer
    13671345void initObject(SceneObject* obj) {
     
    27362714   return obj;
    27372715}
    2738 
    2739 float getRandomNum(float low, float high) {
    2740    return low + ((float)rand() / RAND_MAX) * (high-low);
    2741 }
Note: See TracChangeset for help on using the changeset viewer.