Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12

Merged
merged 8 commits into from Aug 11, 2020
Merged

Fixes #12

merged 8 commits into from Aug 11, 2020

Conversation

JuiP
Copy link
Member

@JuiP JuiP commented Jul 26, 2020

The activity was not usable before these changes.

Also Fixes #4

Regarding commit - f9e7aeb : The required change is due to version differences of Libpng. From what I found, Libpng-1.6 is more stringent about checking ICC profiles than previous versions. We can ignore the warning but to get rid of it, we need to remove the iCCP chunk from the PNG image.

@chimosky @quozl @srevinsaju Please test and review :)

Traceback (most recent call last):
  File "/usr/share/sugar/activities/jamath.activity/sugargame/canvas.py", line 65, in _run_pygame_cb
    main_fn()
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 254, in run
    self.play(level)
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 186, in play
    fondo = [load_image("data/" + str(x) + ".jpg") for x in range(0,NUM_IMAGES)]
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 261, in load_image
    return pygame.image.load(path).convert_alpha()
pygame.error: Couldn't open data/data/0.jpg

Introduced by commit 183ace7
Copy link

@quozl quozl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Comments.

JAMath.py Outdated Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
juego.py Show resolved Hide resolved
juego.py Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
Copy link
Member

@srevinsaju srevinsaju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a small code review. Haven't tested it yet. Btw, is there any reason why Sugargame 1.3 was not used ?

juego.py Outdated Show resolved Hide resolved
juego.py Show resolved Hide resolved
sugargame/__init__.py Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
Traceback (most recent call last):
  File "/usr/share/sugar/activities/jamath.activity/sugargame/canvas.py", line 65, in _run_pygame_cb
    main_fn()
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 254, in run
    self.play(level)
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 189, in play
    puntuacionalta = load_puntuacionalta()
  File "/usr/share/sugar/activities/jamath.activity/juego.py", line 289, in load_puntuacionalta
    file_path = os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'], 'data', 'PuntajeAlto')
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'SUGAR_ACTIVITY_ROOT'
Fix : run should not include pygame.init, stop pygame animation on use of GTK stop button, return on quit, change toolbar definition
Warning, unable to load:  data/./data/menu.ogg
Warning, unable to load:  data/./data/right.ogg
Warning, unable to load:  data/./data/wrong.ogg
@JuiP
Copy link
Member Author

JuiP commented Aug 9, 2020

Made changes as suggested; @quozl @srevinsaju @chimosky Kindly review and test again :)

Copy link
Member

@srevinsaju srevinsaju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed again. Almost ready!!

juego.py Show resolved Hide resolved
juego.py Show resolved Hide resolved
juego.py Outdated Show resolved Hide resolved
JAMath.py Show resolved Hide resolved
activity_root which has the path returned by get_activity_root(), is passed as an argument to the functions
@quozl quozl merged commit d32644b into sugarlabs:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port to other display dimensions
4 participants